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

package.lib.components.VDatePicker.VDatePickerHeader.mjs.map Maven / Gradle / Ivy

{"version":3,"file":"VDatePickerHeader.mjs","names":["VBtn","VDefaultsProvider","useBackgroundColor","MaybeTransition","EventProp","genericComponent","propsFactory","useRender","makeVDatePickerHeaderProps","appendIcon","String","color","header","transition","onClick","VDatePickerHeader","name","props","emits","click","click:append","setup","_ref","emit","slots","backgroundColorClasses","backgroundColorStyles","onClickAppend","hasContent","default","hasAppend","append","_createVNode","value","prepend","icon","variant"],"sources":["../../../src/components/VDatePicker/VDatePickerHeader.tsx"],"sourcesContent":["// Styles\nimport './VDatePickerHeader.sass'\n\n// Components\nimport { VBtn } from '@/components/VBtn'\nimport { VDefaultsProvider } from '@/components/VDefaultsProvider'\n\n// Composables\nimport { useBackgroundColor } from '@/composables/color'\nimport { MaybeTransition } from '@/composables/transition'\n\n// Utilities\nimport { EventProp, genericComponent, propsFactory, useRender } from '@/util'\n\n// Types\nexport type VDatePickerHeaderSlots = {\n  prepend: never\n  default: never\n  append: never\n}\n\nexport const makeVDatePickerHeaderProps = propsFactory({\n  appendIcon: String,\n  color: String,\n  header: String,\n  transition: String,\n  onClick: EventProp<[MouseEvent]>(),\n}, 'VDatePickerHeader')\n\nexport const VDatePickerHeader = genericComponent()({\n  name: 'VDatePickerHeader',\n\n  props: makeVDatePickerHeaderProps(),\n\n  emits: {\n    click: () => true,\n    'click:append': () => true,\n  },\n\n  setup (props, { emit, slots }) {\n    const { backgroundColorClasses, backgroundColorStyles } = useBackgroundColor(props, 'color')\n\n    function onClick () {\n      emit('click')\n    }\n\n    function onClickAppend () {\n      emit('click:append')\n    }\n\n    useRender(() => {\n      const hasContent = !!(slots.default || props.header)\n      const hasAppend = !!(slots.append || props.appendIcon)\n\n      return (\n        \n          { slots.prepend && (\n            
\n { slots.prepend() }\n
\n )}\n\n { hasContent && (\n \n
\n { slots.default?.() ?? props.header }\n
\n
\n )}\n\n { hasAppend && (\n
\n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