VPicker.mjs.map 3.5 KB

1
  1. {"version":3,"file":"VPicker.mjs","names":["VPickerTitle","makeVSheetProps","VSheet","genericComponent","omit","propsFactory","useRender","makeVPickerProps","landscape","Boolean","title","String","VPicker","name","props","setup","_ref","slots","sheetProps","filterProps","hasTitle","_createVNode","_mergeProps","actions","class","style","default","header","children"],"sources":["../../../src/labs/VPicker/VPicker.tsx"],"sourcesContent":["// Styles\nimport './VPicker.sass'\n\n// Components\nimport { VPickerTitle } from './VPickerTitle'\nimport { makeVSheetProps, VSheet } from '@/components/VSheet/VSheet'\n\n// Utilities\nimport { genericComponent, omit, propsFactory, useRender } from '@/util'\n\n// Types\nexport type VPickerSlots = {\n header: never\n default: never\n actions: never\n title: never\n}\n\nexport const makeVPickerProps = propsFactory({\n landscape: Boolean,\n title: String,\n\n ...omit(makeVSheetProps(), ['color']),\n}, 'VPicker')\n\nexport const VPicker = genericComponent<VPickerSlots>()({\n name: 'VPicker',\n\n props: makeVPickerProps(),\n\n setup (props, { slots }) {\n useRender(() => {\n const [sheetProps] = VSheet.filterProps(props)\n const hasTitle = !!(props.title || slots.title)\n\n return (\n <VSheet\n { ...sheetProps }\n class={[\n 'v-picker',\n {\n 'v-picker--landscape': props.landscape,\n 'v-picker--with-actions': !!slots.actions,\n },\n props.class,\n ]}\n style={ props.style }\n >\n { hasTitle && (\n <VPickerTitle key=\"picker-title\">\n { slots.title?.() ?? props.title }\n </VPickerTitle>\n )}\n\n { slots.header && (\n <div class=\"v-picker__header\">\n { slots.header() }\n </div>\n )}\n\n <div class=\"v-picker__body\">\n { slots.default?.() }\n </div>\n\n { slots.actions?.()[0]?.children && (\n <div class=\"v-picker__actions\">\n { slots.actions() }\n </div>\n )}\n </VSheet>\n )\n })\n\n return {}\n },\n})\n\nexport type VPicker = InstanceType<typeof VPicker>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,YAAY;AAAA,SACZC,eAAe,EAAEC,MAAM,8CAEhC;AAAA,SACSC,gBAAgB,EAAE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