All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.lib.composables.transition.mjs.map Maven / Gradle / Ivy

{"version":3,"file":"transition.mjs","names":["h","mergeProps","Transition","TransitionGroup","propsFactory","makeTransitionProps","transition","type","Boolean","String","Object","default","validator","val","MaybeTransition","props","_ref","slots","disabled","group","rest","component","customProps","name","fromEntries","entries","filter","_ref2","_","v","undefined"],"sources":["../../src/composables/transition.ts"],"sourcesContent":["// Utilities\nimport { h, mergeProps, Transition, TransitionGroup } 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,\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  group?: boolean\n}\n\nexport const MaybeTransition: FunctionalComponent = (props, { slots }) => {\n  const { transition, disabled, group, ...rest } = props\n\n  const {\n    component = group ? TransitionGroup : Transition,\n    ...customProps\n  } = typeof transition === 'object' ? transition : {}\n\n  return h(\n    component,\n    mergeProps(\n      typeof transition === 'string'\n        ? { name: disabled ? '' : transition }\n        : customProps as any,\n      typeof transition === 'string'\n        ? {}\n        : Object.fromEntries(Object.entries({ disabled, group }).filter(([_, v]) => v !== undefined)),\n      rest as any,\n    ),\n    slots\n  )\n}\n"],"mappings":"AAAA;AACA,SAASA,CAAC,EAAEC,UAAU,EAAEC,UAAU,EAAEC,eAAe,QAAQ,KAAK;AAAA,SACvDC,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;AAC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