1 |
- {"version":3,"file":"transition.mjs","names":["h","mergeProps","Transition","propsFactory","makeTransitionProps","transition","type","Boolean","String","Object","default","validator","val","MaybeTransition","props","_ref","slots","disabled","rest","component","customProps","name"],"sources":["../../src/composables/transition.ts"],"sourcesContent":["// Utilities\nimport { h, mergeProps, Transition } from 'vue'\nimport { propsFactory } from '@/util'\n\n// Types\nimport type { Component, FunctionalComponent, PropType, TransitionProps } from 'vue'\n\nexport const makeTransitionProps = propsFactory({\n transition: {\n type: [Boolean, String, Object] as PropType<string | boolean | TransitionProps & { component?: Component }>,\n default: 'fade-transition',\n validator: val => val !== true,\n },\n}, 'transition')\n\ninterface MaybeTransitionProps extends TransitionProps {\n transition?: string | boolean | TransitionProps & { component?: any }\n disabled?: boolean\n}\n\nexport const MaybeTransition: FunctionalComponent<MaybeTransitionProps> = (props, { slots }) => {\n const { transition, disabled, ...rest } = props\n\n const { component = Transition, ...customProps } = typeof transition === 'object' ? transition : {}\n\n return h(\n component,\n mergeProps(typeof transition === 'string'\n ? { name: disabled ? '' : transition }\n : customProps as any,\n rest as any,\n { disabled }),\n slots\n )\n}\n"],"mappings":"AAAA;AACA,SAASA,CAAC,EAAEC,UAAU,EAAEC,UAAU,QAAQ,KAAK;AAAA,SACtCC,YAAY,6BAErB;AAGA,OAAO,MAAMC,mBAAmB,GAAGD,YAAY,CAAC;EAC9CE,UAAU,EAAE;IACVC,IAAI,EAAE,CAACC,OAAO,EAAEC,MAAM,EAAEC,MAAM,CAA6E;IAC3GC,OAAO,EAAE,iBAAiB;IAC1BC,SAAS,EAAEC,GAAG,IAAIA,GAAG,KAAK;EAC5B;AACF,CAAC,EAAE,YAAY,CAAC;AAOhB,OAAO,MAAMC,eAA0D,GAAGA,CAACC,KAAK,EAAAC,IAAA,KAAgB;EAAA,IAAd;IAAEC;EAAM,CAAC,GAAAD,IAAA;EACzF,MAAM;IAAEV,UAAU;IAAEY,QAAQ;IAAE,GAAGC;EAAK,CAAC,GAAGJ,KAAK;EAE/C,MAAM;IAAEK,SAAS,GAAGjB,UAAU;IAAE,GAAGkB;EAAY,CAAC,GAAG,OAAOf,UAAU,KAAK,QAAQ,GAAGA,UAAU,GAAG,CAAC,CAAC;EAEnG,OAAOL,CAAC,CACNmB,SAAS,EACTlB,UAAU,CAAC,OAAOI,UAAU,KAAK,QAAQ,GACrC;IAAEgB,IAAI,EAAEJ,QAAQ,GAAG,EAAE,GAAGZ;EAAW,CAAC,GACpCe,WAAkB,EACtBF,IAAI,EACJ;IAAED;EAAS,CAAC,CAAC,EACbD,KAAK,CACN;AACH,CAAC"}
|