@antcde/component-library 0.0.4 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/component-library.css +1 -1
- package/dist/index.js +11633 -11114
- package/dist/types/components/BaseAppCard.vue.d.ts +5 -1
- package/node_modules/vuetify/dist/json/attributes.json +2765 -2749
- package/node_modules/vuetify/dist/json/importMap-labs.json +8 -8
- package/node_modules/vuetify/dist/json/importMap.json +158 -158
- package/node_modules/vuetify/dist/json/tags.json +6 -2
- package/node_modules/vuetify/dist/json/web-types.json +5003 -4921
- package/node_modules/vuetify/dist/vuetify-labs.css +2500 -2499
- package/node_modules/vuetify/dist/vuetify-labs.d.ts +509 -229
- package/node_modules/vuetify/dist/vuetify-labs.esm.js +250 -147
- package/node_modules/vuetify/dist/vuetify-labs.esm.js.map +1 -1
- package/node_modules/vuetify/dist/vuetify-labs.js +249 -146
- package/node_modules/vuetify/dist/vuetify-labs.min.css +2 -2
- package/node_modules/vuetify/dist/vuetify.css +2957 -2956
- package/node_modules/vuetify/dist/vuetify.d.ts +417 -234
- package/node_modules/vuetify/dist/vuetify.esm.js +122 -72
- package/node_modules/vuetify/dist/vuetify.esm.js.map +1 -1
- package/node_modules/vuetify/dist/vuetify.js +121 -71
- package/node_modules/vuetify/dist/vuetify.js.map +1 -1
- package/node_modules/vuetify/dist/vuetify.min.css +2 -2
- package/node_modules/vuetify/dist/vuetify.min.js +474 -473
- package/node_modules/vuetify/dist/vuetify.min.js.map +1 -1
- package/node_modules/vuetify/lib/components/VAppBar/index.d.mts +15 -6
- package/node_modules/vuetify/lib/components/VAutocomplete/index.d.mts +23 -8
- package/node_modules/vuetify/lib/components/VBadge/VBadge.mjs +2 -2
- package/node_modules/vuetify/lib/components/VBadge/VBadge.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VBtn/VBtn.mjs +6 -3
- package/node_modules/vuetify/lib/components/VBtn/VBtn.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VBtn/index.d.mts +15 -6
- package/node_modules/vuetify/lib/components/VCard/VCard.mjs +12 -3
- package/node_modules/vuetify/lib/components/VCard/VCard.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VCard/VCardItem.mjs +11 -4
- package/node_modules/vuetify/lib/components/VCard/VCardItem.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VCard/index.d.mts +75 -30
- package/node_modules/vuetify/lib/components/VCarousel/VCarousel.mjs +1 -1
- package/node_modules/vuetify/lib/components/VCarousel/VCarousel.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VChip/VChip.mjs +6 -3
- package/node_modules/vuetify/lib/components/VChip/VChip.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VChip/index.d.mts +15 -6
- package/node_modules/vuetify/lib/components/VCombobox/index.d.mts +23 -8
- package/node_modules/vuetify/lib/components/VDataIterator/index.d.mts +2 -2
- package/node_modules/vuetify/lib/components/VDataTable/VDataTableRow.mjs +18 -3
- package/node_modules/vuetify/lib/components/VDataTable/VDataTableRow.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VDataTable/composables/headers.mjs +3 -1
- package/node_modules/vuetify/lib/components/VDataTable/composables/headers.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VDataTable/composables/paginate.mjs +2 -2
- package/node_modules/vuetify/lib/components/VDataTable/composables/paginate.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VDataTable/index.d.mts +125 -122
- package/node_modules/vuetify/lib/components/VDataTable/types.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VDatePicker/VDatePicker.mjs +1 -1
- package/node_modules/vuetify/lib/components/VDatePicker/VDatePicker.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VDatePicker/VDatePickerControls.mjs +5 -5
- package/node_modules/vuetify/lib/components/VDatePicker/VDatePickerControls.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VDialog/__test__/VDialog.spec.browser.mjs +50 -0
- package/node_modules/vuetify/lib/components/VDialog/__test__/VDialog.spec.browser.mjs.map +1 -0
- package/node_modules/vuetify/lib/components/VDialog/index.d.mts +21 -6
- package/node_modules/vuetify/lib/components/VFab/index.d.mts +15 -6
- package/node_modules/vuetify/lib/components/VField/VField.mjs +1 -6
- package/node_modules/vuetify/lib/components/VField/VField.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VFileInput/VFileInput.mjs +2 -2
- package/node_modules/vuetify/lib/components/VFileInput/VFileInput.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VIcon/VIcon.mjs +2 -2
- package/node_modules/vuetify/lib/components/VIcon/VIcon.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VList/VListItem.mjs +11 -5
- package/node_modules/vuetify/lib/components/VList/VListItem.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VList/index.d.mts +32 -14
- package/node_modules/vuetify/lib/components/VMenu/index.d.mts +21 -6
- package/node_modules/vuetify/lib/components/VOverlay/VOverlay.mjs +10 -1
- package/node_modules/vuetify/lib/components/VOverlay/VOverlay.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VOverlay/index.d.mts +6 -0
- package/node_modules/vuetify/lib/components/VPagination/VPagination.mjs +3 -3
- package/node_modules/vuetify/lib/components/VPagination/VPagination.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VParallax/VParallax.mjs +1 -1
- package/node_modules/vuetify/lib/components/VParallax/VParallax.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VRating/VRating.mjs +1 -1
- package/node_modules/vuetify/lib/components/VRating/VRating.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VSelect/index.d.mts +23 -8
- package/node_modules/vuetify/lib/components/VSlider/slider.mjs +1 -1
- package/node_modules/vuetify/lib/components/VSlider/slider.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VSnackbar/index.d.mts +21 -6
- package/node_modules/vuetify/lib/components/VSparkline/VBarline.mjs +1 -1
- package/node_modules/vuetify/lib/components/VSparkline/VBarline.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VTabs/index.d.mts +39 -24
- package/node_modules/vuetify/lib/components/VTextField/VTextField.mjs +2 -2
- package/node_modules/vuetify/lib/components/VTextField/VTextField.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VTextarea/VTextarea.mjs +4 -4
- package/node_modules/vuetify/lib/components/VTextarea/VTextarea.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VToolbar/VToolbar.css +1 -0
- package/node_modules/vuetify/lib/components/VToolbar/VToolbar.sass +1 -0
- package/node_modules/vuetify/lib/components/VTooltip/index.d.mts +21 -6
- package/node_modules/vuetify/lib/components/index.d.mts +365 -182
- package/node_modules/vuetify/lib/composables/calendar.mjs +1 -1
- package/node_modules/vuetify/lib/composables/calendar.mjs.map +1 -1
- package/node_modules/vuetify/lib/composables/stack.mjs +2 -2
- package/node_modules/vuetify/lib/composables/stack.mjs.map +1 -1
- package/node_modules/vuetify/lib/composables/theme.mjs +1 -1
- package/node_modules/vuetify/lib/composables/theme.mjs.map +1 -1
- package/node_modules/vuetify/lib/composables/validation.mjs +2 -2
- package/node_modules/vuetify/lib/composables/validation.mjs.map +1 -1
- package/node_modules/vuetify/lib/entry-bundler.mjs +1 -1
- package/node_modules/vuetify/lib/framework.mjs +1 -1
- package/node_modules/vuetify/lib/index.d.mts +52 -52
- package/node_modules/vuetify/lib/labs/VDateInput/VDateInput.mjs +79 -21
- package/node_modules/vuetify/lib/labs/VDateInput/VDateInput.mjs.map +1 -1
- package/node_modules/vuetify/lib/labs/VDateInput/index.d.mts +53 -10
- package/node_modules/vuetify/lib/labs/VFileUpload/VFileUpload.mjs +3 -2
- package/node_modules/vuetify/lib/labs/VFileUpload/VFileUpload.mjs.map +1 -1
- package/node_modules/vuetify/lib/labs/VFileUpload/index.d.mts +32 -14
- package/node_modules/vuetify/lib/labs/VNumberInput/VNumberInput.mjs +5 -5
- package/node_modules/vuetify/lib/labs/VNumberInput/VNumberInput.mjs.map +1 -1
- package/node_modules/vuetify/lib/labs/VSnackbarQueue/index.d.mts +21 -6
- package/node_modules/vuetify/lib/labs/VTimePicker/VTimePicker.mjs +30 -31
- package/node_modules/vuetify/lib/labs/VTimePicker/VTimePicker.mjs.map +1 -1
- package/node_modules/vuetify/lib/labs/VTimePicker/VTimePickerControls.mjs +14 -13
- package/node_modules/vuetify/lib/labs/VTimePicker/VTimePickerControls.mjs.map +1 -1
- package/node_modules/vuetify/lib/labs/VTimePicker/index.d.mts +35 -13
- package/node_modules/vuetify/lib/labs/VTimePicker/shared.mjs +2 -0
- package/node_modules/vuetify/lib/labs/VTimePicker/shared.mjs.map +1 -0
- package/node_modules/vuetify/lib/labs/VTreeview/index.d.mts +32 -14
- package/node_modules/vuetify/lib/labs/components.d.mts +171 -59
- package/node_modules/vuetify/lib/locale/adapters/vuetify.mjs +1 -1
- package/node_modules/vuetify/lib/locale/adapters/vuetify.mjs.map +1 -1
- package/node_modules/vuetify/lib/util/animation.mjs +8 -8
- package/node_modules/vuetify/lib/util/animation.mjs.map +1 -1
- package/node_modules/vuetify/lib/util/helpers.mjs +7 -5
- package/node_modules/vuetify/lib/util/helpers.mjs.map +1 -1
- package/node_modules/vuetify/package.json +2 -2
- package/package.json +3 -3
- package/node_modules/vuetify/lib/components/VDialog/__test__/VDialog.spec.cy.mjs +0 -39
- package/node_modules/vuetify/lib/components/VDialog/__test__/VDialog.spec.cy.mjs.map +0 -1
- package/node_modules/vuetify/lib/labs/VTimePicker/SelectingTimes.mjs +0 -10
- package/node_modules/vuetify/lib/labs/VTimePicker/SelectingTimes.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.mjs","names":[],"sources":["../../../src/components/VDataTable/types.ts"],"sourcesContent":["// Types\nimport type { provideExpanded } from './composables/expand'\nimport type { Group, GroupableItem, provideGroupBy } from './composables/group'\nimport type { provideSelection, SelectableItem } from './composables/select'\nimport type { FilterFunction, InternalItem } from '@/composables/filter'\nimport type { SelectItemKey } from '@/util'\n\nexport type DataTableCompareFunction<T = any> = (a: T, b: T) => number | null\n\nexport type DataTableHeader<T = Record<string, any>> = {\n key?: 'data-table-group' | 'data-table-select' | 'data-table-expand' | (string & {})\n value?: SelectItemKey<T>\n title?: string\n\n fixed?: boolean\n align?: 'start' | 'end' | 'center'\n\n width?: number | string\n minWidth?: string\n maxWidth?: string\n nowrap?: boolean\n\n headerProps?: Record<string, any>\n cellProps?: HeaderCellProps\n\n sortable?: boolean\n sort?: DataTableCompareFunction\n sortRaw?: DataTableCompareFunction\n filter?: FilterFunction\n\n children?: DataTableHeader<T>[]\n}\n\nexport type InternalDataTableHeader = Omit<DataTableHeader, 'key' | 'value' | 'children'> & {\n key: string | null\n value: SelectItemKey | null\n sortable: boolean\n fixedOffset?: number\n lastFixed?: boolean\n nowrap?: boolean\n colspan?: number\n rowspan?: number\n children?: InternalDataTableHeader[]\n}\n\nexport interface DataTableItem<T = any> extends InternalItem<T>, GroupableItem<T>, SelectableItem {\n key: any\n index: number\n columns: {\n [key: string]: any\n }\n}\n\nexport type GroupHeaderSlot = {\n index: number\n item: Group\n columns: InternalDataTableHeader[]\n isExpanded: ReturnType<typeof provideExpanded>['isExpanded']\n toggleExpand: ReturnType<typeof provideExpanded>['toggleExpand']\n isSelected: ReturnType<typeof provideSelection>['isSelected']\n toggleSelect: ReturnType<typeof provideSelection>['toggleSelect']\n toggleGroup: ReturnType<typeof provideGroupBy>['toggleGroup']\n isGroupOpen: ReturnType<typeof provideGroupBy>['isGroupOpen']\n}\n\ntype ItemSlotBase<T> = {\n index: number\n item: T\n internalItem: DataTableItem<T>\n isExpanded: ReturnType<typeof provideExpanded>['isExpanded']\n toggleExpand: ReturnType<typeof provideExpanded>['toggleExpand']\n isSelected: ReturnType<typeof provideSelection>['isSelected']\n toggleSelect: ReturnType<typeof provideSelection>['toggleSelect']\n}\n\nexport type ItemSlot<T> = ItemSlotBase<T> & {\n columns: InternalDataTableHeader[]\n}\n\nexport type ItemKeySlot<T> = ItemSlotBase<T> & {\n value: any\n column: InternalDataTableHeader\n}\n\nexport type RowProps<T> =\n | Record<string, any>\n | ((data: Pick<ItemKeySlot<T>, 'index' | 'item' | 'internalItem'>) => Record<string, any>)\n\nexport type CellProps<T> =\n | Record<string, any>\n | ((data: Pick<ItemKeySlot<T>, 'index' | 'item' | 'internalItem' | 'value' | 'column'>) => Record<string, any>)\n\nexport type HeaderCellProps =\n | Record<string, any>\n | ((data: Pick<ItemKeySlot<any>, 'index' | 'item' | 'internalItem' | 'value'>) => Record<string, any>)\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"types.mjs","names":[],"sources":["../../../src/components/VDataTable/types.ts"],"sourcesContent":["// Types\nimport type { provideExpanded } from './composables/expand'\nimport type { Group, GroupableItem, provideGroupBy } from './composables/group'\nimport type { provideSelection, SelectableItem } from './composables/select'\nimport type { FilterFunction, InternalItem } from '@/composables/filter'\nimport type { SelectItemKey } from '@/util'\n\nexport type DataTableCompareFunction<T = any> = (a: T, b: T) => number | null\n\nexport type DataTableHeader<T = Record<string, any>> = {\n key?: 'data-table-group' | 'data-table-select' | 'data-table-expand' | (string & {})\n value?: SelectItemKey<T>\n title?: string\n\n fixed?: boolean\n align?: 'start' | 'end' | 'center'\n\n width?: number | string\n minWidth?: number | string\n maxWidth?: number | string\n nowrap?: boolean\n\n headerProps?: Record<string, any>\n cellProps?: HeaderCellProps\n\n sortable?: boolean\n sort?: DataTableCompareFunction\n sortRaw?: DataTableCompareFunction\n filter?: FilterFunction\n\n children?: DataTableHeader<T>[]\n}\n\nexport type InternalDataTableHeader = Omit<DataTableHeader, 'key' | 'value' | 'children'> & {\n key: string | null\n value: SelectItemKey | null\n sortable: boolean\n fixedOffset?: number\n lastFixed?: boolean\n nowrap?: boolean\n colspan?: number\n rowspan?: number\n children?: InternalDataTableHeader[]\n}\n\nexport interface DataTableItem<T = any> extends InternalItem<T>, GroupableItem<T>, SelectableItem {\n key: any\n index: number\n columns: {\n [key: string]: any\n }\n}\n\nexport type GroupHeaderSlot = {\n index: number\n item: Group\n columns: InternalDataTableHeader[]\n isExpanded: ReturnType<typeof provideExpanded>['isExpanded']\n toggleExpand: ReturnType<typeof provideExpanded>['toggleExpand']\n isSelected: ReturnType<typeof provideSelection>['isSelected']\n toggleSelect: ReturnType<typeof provideSelection>['toggleSelect']\n toggleGroup: ReturnType<typeof provideGroupBy>['toggleGroup']\n isGroupOpen: ReturnType<typeof provideGroupBy>['isGroupOpen']\n}\n\ntype ItemSlotBase<T> = {\n index: number\n item: T\n internalItem: DataTableItem<T>\n isExpanded: ReturnType<typeof provideExpanded>['isExpanded']\n toggleExpand: ReturnType<typeof provideExpanded>['toggleExpand']\n isSelected: ReturnType<typeof provideSelection>['isSelected']\n toggleSelect: ReturnType<typeof provideSelection>['toggleSelect']\n}\n\nexport type ItemSlot<T> = ItemSlotBase<T> & {\n columns: InternalDataTableHeader[]\n}\n\nexport type ItemKeySlot<T> = ItemSlotBase<T> & {\n value: any\n column: InternalDataTableHeader\n}\n\nexport type RowProps<T> =\n | Record<string, any>\n | ((data: Pick<ItemKeySlot<T>, 'index' | 'item' | 'internalItem'>) => Record<string, any>)\n\nexport type CellProps<T> =\n | Record<string, any>\n | ((data: Pick<ItemKeySlot<T>, 'index' | 'item' | 'internalItem' | 'value' | 'column'>) => Record<string, any>)\n\nexport type HeaderCellProps =\n | Record<string, any>\n | ((data: Pick<ItemKeySlot<any>, 'index' | 'item' | 'internalItem' | 'value'>) => Record<string, any>)\n"],"mappings":"","ignoreList":[]}
|
|
@@ -73,7 +73,7 @@ export const VDatePicker = genericComponent()({
|
|
|
73
73
|
const {
|
|
74
74
|
t
|
|
75
75
|
} = useLocale();
|
|
76
|
-
const model = useProxiedModel(props, 'modelValue', undefined, v => wrapInArray(v), v => props.multiple ? v : v[0]);
|
|
76
|
+
const model = useProxiedModel(props, 'modelValue', undefined, v => wrapInArray(v).map(i => adapter.date(i)), v => props.multiple ? v : v[0]);
|
|
77
77
|
const viewMode = useProxiedModel(props, 'viewMode');
|
|
78
78
|
// const inputMode = useProxiedModel(props, 'inputMode')
|
|
79
79
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VDatePicker.mjs","names":["makeVDatePickerControlsProps","VDatePickerControls","VDatePickerHeader","makeVDatePickerMonthProps","VDatePickerMonth","makeVDatePickerMonthsProps","VDatePickerMonths","makeVDatePickerYearsProps","VDatePickerYears","VFadeTransition","VDefaultsProvider","makeVPickerProps","VPicker","useDate","useLocale","useProxiedModel","computed","ref","shallowRef","watch","genericComponent","omit","propsFactory","useRender","wrapInArray","makeVDatePickerProps","header","type","String","default","weeksInMonth","title","modelValue","VDatePicker","name","props","emits","date","setup","_ref","emit","slots","adapter","t","model","undefined","v","multiple","viewMode","minDate","min","isValid","maxDate","max","internal","today","value","isBefore","isAfter","month","Number","getMonth","startOfMonth","year","getYear","startOfYear","setMonth","isReversing","length","format","text","setDate","setYear","headerTransition","disabled","targets","push","_date","addDays","endOfMonth","onClickNext","onUpdateYear","onUpdateMonth","onClickPrev","onClickDate","onClickMonth","onClickYear","val","oldVal","arrBefore","arrAfter","before","after","newMonth","newYear","pickerProps","filterProps","datePickerControlsProps","datePickerHeaderProps","datePickerMonthProps","datePickerMonthsProps","datePickerYearsProps","headerProps","transition","_createVNode","_mergeProps","showWeek","class","style","_Fragment","$event","actions"],"sources":["../../../src/components/VDatePicker/VDatePicker.tsx"],"sourcesContent":["// Styles\nimport './VDatePicker.sass'\n\n// Components\nimport { makeVDatePickerControlsProps, VDatePickerControls } from './VDatePickerControls'\nimport { VDatePickerHeader } from './VDatePickerHeader'\nimport { makeVDatePickerMonthProps, VDatePickerMonth } from './VDatePickerMonth'\nimport { makeVDatePickerMonthsProps, VDatePickerMonths } from './VDatePickerMonths'\nimport { makeVDatePickerYearsProps, VDatePickerYears } from './VDatePickerYears'\nimport { VFadeTransition } from '@/components/transitions'\nimport { VDefaultsProvider } from '@/components/VDefaultsProvider'\nimport { makeVPickerProps, VPicker } from '@/labs/VPicker/VPicker'\n\n// Composables\nimport { useDate } from '@/composables/date'\nimport { useLocale } from '@/composables/locale'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, ref, shallowRef, watch } from 'vue'\nimport { genericComponent, omit, propsFactory, useRender, wrapInArray } from '@/util'\n\n// Types\nimport type { VPickerSlots } from '@/labs/VPicker/VPicker'\nimport type { GenericProps } from '@/util'\n\n// Types\nexport type VDatePickerSlots = Omit<VPickerSlots, 'header'> & {\n header: {\n header: string\n transition: string\n }\n}\n\nexport const makeVDatePickerProps = propsFactory({\n // TODO: implement in v3.5\n // calendarIcon: {\n // type: String,\n // default: '$calendar',\n // },\n // keyboardIcon: {\n // type: String,\n // default: '$edit',\n // },\n // inputMode: {\n // type: String as PropType<'calendar' | 'keyboard'>,\n // default: 'calendar',\n // },\n // inputText: {\n // type: String,\n // default: '$vuetify.datePicker.input.placeholder',\n // },\n // inputPlaceholder: {\n // type: String,\n // default: 'dd/mm/yyyy',\n // },\n header: {\n type: String,\n default: '$vuetify.datePicker.header',\n },\n\n ...makeVDatePickerControlsProps(),\n ...makeVDatePickerMonthProps({\n weeksInMonth: 'static' as const,\n }),\n ...omit(makeVDatePickerMonthsProps(), ['modelValue']),\n ...omit(makeVDatePickerYearsProps(), ['modelValue']),\n ...makeVPickerProps({ title: '$vuetify.datePicker.title' }),\n\n modelValue: null,\n}, 'VDatePicker')\n\nexport const VDatePicker = genericComponent<new <\n T,\n Multiple extends boolean | 'range' | number | (string & {}) = false,\n TModel = Multiple extends true | number | string\n ? T[]\n : T,\n> (\n props: {\n modelValue?: TModel\n 'onUpdate:modelValue'?: (value: TModel) => void\n multiple?: Multiple\n },\n slots: VDatePickerSlots\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VDatePicker',\n\n props: makeVDatePickerProps(),\n\n emits: {\n 'update:modelValue': (date: any) => true,\n 'update:month': (date: any) => true,\n 'update:year': (date: any) => true,\n // 'update:inputMode': (date: any) => true,\n 'update:viewMode': (date: any) => true,\n },\n\n setup (props, { emit, slots }) {\n const adapter = useDate()\n const { t } = useLocale()\n\n const model = useProxiedModel(\n props,\n 'modelValue',\n undefined,\n v => wrapInArray(v),\n v => props.multiple ? v : v[0],\n )\n\n const viewMode = useProxiedModel(props, 'viewMode')\n // const inputMode = useProxiedModel(props, 'inputMode')\n\n const minDate = computed(() => {\n const date = adapter.date(props.min)\n\n return props.min && adapter.isValid(date) ? date : null\n })\n const maxDate = computed(() => {\n const date = adapter.date(props.max)\n\n return props.max && adapter.isValid(date) ? date : null\n })\n\n const internal = computed(() => {\n const today = adapter.date()\n let value = today\n if (model.value?.[0]) {\n value = adapter.date(model.value[0])\n } else if (minDate.value && adapter.isBefore(today, minDate.value)) {\n value = minDate.value\n } else if (maxDate.value && adapter.isAfter(today, maxDate.value)) {\n value = maxDate.value\n }\n\n return value && adapter.isValid(value) ? value : today\n })\n\n const month = ref(Number(props.month ?? adapter.getMonth(adapter.startOfMonth(internal.value))))\n const year = ref(Number(props.year ?? adapter.getYear(adapter.startOfYear(adapter.setMonth(internal.value, month.value)))))\n\n const isReversing = shallowRef(false)\n const header = computed(() => {\n if (props.multiple && model.value.length > 1) {\n return t('$vuetify.datePicker.itemsSelected', model.value.length)\n }\n\n return (model.value[0] && adapter.isValid(model.value[0]))\n ? adapter.format(adapter.date(model.value[0]), 'normalDateWithWeekday')\n : t(props.header)\n })\n const text = computed(() => {\n let date = adapter.date()\n\n date = adapter.setDate(date, 1)\n date = adapter.setMonth(date, month.value)\n date = adapter.setYear(date, year.value)\n\n return adapter.format(date, 'monthAndYear')\n })\n // const headerIcon = computed(() => props.inputMode === 'calendar' ? props.keyboardIcon : props.calendarIcon)\n const headerTransition = computed(() => `date-picker-header${isReversing.value ? '-reverse' : ''}-transition`)\n\n const disabled = computed(() => {\n if (props.disabled) return true\n\n const targets = []\n\n if (viewMode.value !== 'month') {\n targets.push(...['prev', 'next'])\n } else {\n let _date = adapter.date()\n\n _date = adapter.startOfMonth(_date)\n _date = adapter.setMonth(_date, month.value)\n _date = adapter.setYear(_date, year.value)\n\n if (minDate.value) {\n const date = adapter.addDays(adapter.startOfMonth(_date), -1)\n\n adapter.isAfter(minDate.value, date) && targets.push('prev')\n }\n\n if (maxDate.value) {\n const date = adapter.addDays(adapter.endOfMonth(_date), 1)\n\n adapter.isAfter(date, maxDate.value) && targets.push('next')\n }\n }\n\n return targets\n })\n\n // function onClickAppend () {\n // inputMode.value = inputMode.value === 'calendar' ? 'keyboard' : 'calendar'\n // }\n\n function onClickNext () {\n if (month.value < 11) {\n month.value++\n } else {\n year.value++\n month.value = 0\n onUpdateYear(year.value)\n }\n onUpdateMonth(month.value)\n }\n\n function onClickPrev () {\n if (month.value > 0) {\n month.value--\n } else {\n year.value--\n month.value = 11\n onUpdateYear(year.value)\n }\n onUpdateMonth(month.value)\n }\n\n function onClickDate () {\n viewMode.value = 'month'\n }\n\n function onClickMonth () {\n viewMode.value = viewMode.value === 'months' ? 'month' : 'months'\n }\n\n function onClickYear () {\n viewMode.value = viewMode.value === 'year' ? 'month' : 'year'\n }\n\n function onUpdateMonth (value: number) {\n if (viewMode.value === 'months') onClickMonth()\n\n emit('update:month', value)\n }\n\n function onUpdateYear (value: number) {\n if (viewMode.value === 'year') onClickYear()\n\n emit('update:year', value)\n }\n\n watch(model, (val, oldVal) => {\n const arrBefore = wrapInArray(oldVal)\n const arrAfter = wrapInArray(val)\n\n if (!arrAfter.length) return\n\n const before = adapter.date(arrBefore[arrBefore.length - 1])\n const after = adapter.date(arrAfter[arrAfter.length - 1])\n const newMonth = adapter.getMonth(after)\n const newYear = adapter.getYear(after)\n\n if (newMonth !== month.value) {\n month.value = newMonth\n onUpdateMonth(month.value)\n }\n\n if (newYear !== year.value) {\n year.value = newYear\n onUpdateYear(year.value)\n }\n\n isReversing.value = adapter.isBefore(before, after)\n })\n\n useRender(() => {\n const pickerProps = VPicker.filterProps(props)\n const datePickerControlsProps = VDatePickerControls.filterProps(props)\n const datePickerHeaderProps = VDatePickerHeader.filterProps(props)\n const datePickerMonthProps = VDatePickerMonth.filterProps(props)\n const datePickerMonthsProps = omit(VDatePickerMonths.filterProps(props), ['modelValue'])\n const datePickerYearsProps = omit(VDatePickerYears.filterProps(props), ['modelValue'])\n\n const headerProps = {\n header: header.value,\n transition: headerTransition.value,\n }\n\n return (\n <VPicker\n { ...pickerProps }\n class={[\n 'v-date-picker',\n `v-date-picker--${viewMode.value}`,\n {\n 'v-date-picker--show-week': props.showWeek,\n },\n props.class,\n ]}\n style={ props.style }\n v-slots={{\n title: () => slots.title?.() ?? (\n <div class=\"v-date-picker__title\">\n { t(props.title) }\n </div>\n ),\n header: () => slots.header ? (\n <VDefaultsProvider\n defaults={{\n VDatePickerHeader: { ...headerProps },\n }}\n >\n { slots.header?.(headerProps) }\n </VDefaultsProvider>\n ) : (\n <VDatePickerHeader\n key=\"header\"\n { ...datePickerHeaderProps }\n { ...headerProps }\n onClick={ viewMode.value !== 'month' ? onClickDate : undefined }\n v-slots={{\n ...slots,\n default: undefined,\n }}\n />\n ),\n default: () => (\n <>\n <VDatePickerControls\n { ...datePickerControlsProps }\n disabled={ disabled.value }\n text={ text.value }\n onClick:next={ onClickNext }\n onClick:prev={ onClickPrev }\n onClick:month={ onClickMonth }\n onClick:year={ onClickYear }\n />\n\n <VFadeTransition hideOnLeave>\n { viewMode.value === 'months' ? (\n <VDatePickerMonths\n key=\"date-picker-months\"\n { ...datePickerMonthsProps }\n v-model={ month.value }\n onUpdate:modelValue={ onUpdateMonth }\n min={ minDate.value }\n max={ maxDate.value }\n year={ year.value }\n />\n ) : viewMode.value === 'year' ? (\n <VDatePickerYears\n key=\"date-picker-years\"\n { ...datePickerYearsProps }\n v-model={ year.value }\n onUpdate:modelValue={ onUpdateYear }\n min={ minDate.value }\n max={ maxDate.value }\n />\n ) : (\n <VDatePickerMonth\n key=\"date-picker-month\"\n { ...datePickerMonthProps }\n v-model={ model.value }\n v-model:month={ month.value }\n v-model:year={ year.value }\n onUpdate:month={ onUpdateMonth }\n onUpdate:year={ onUpdateYear }\n min={ minDate.value }\n max={ maxDate.value }\n />\n )}\n </VFadeTransition>\n </>\n ),\n actions: slots.actions,\n }}\n />\n )\n })\n\n return {}\n },\n})\n\nexport type VDatePicker = InstanceType<typeof VDatePicker>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,4BAA4B,EAAEC,mBAAmB;AAAA,SACjDC,iBAAiB;AAAA,SACjBC,yBAAyB,EAAEC,gBAAgB;AAAA,SAC3CC,0BAA0B,EAAEC,iBAAiB;AAAA,SAC7CC,yBAAyB,EAAEC,gBAAgB;AAAA,SAC3CC,eAAe;AAAA,SACfC,iBAAiB;AAAA,SACjBC,gBAAgB,EAAEC,OAAO,0CAElC;AAAA,SACSC,OAAO;AAAA,SACPC,SAAS;AAAA,SACTC,eAAe,8CAExB;AACA,SAASC,QAAQ,EAAEC,GAAG,EAAEC,UAAU,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC7CC,gBAAgB,EAAEC,IAAI,EAAEC,YAAY,EAAEC,SAAS,EAAEC,WAAW,gCAErE;AAIA;AAQA,OAAO,MAAMC,oBAAoB,GAAGH,YAAY,CAAC;EAC/C;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACAI,MAAM,EAAE;IACNC,IAAI,EAAEC,MAAM;IACZC,OAAO,EAAE;EACX,CAAC;EAED,GAAG7B,4BAA4B,CAAC,CAAC;EACjC,GAAGG,yBAAyB,CAAC;IAC3B2B,YAAY,EAAE;EAChB,CAAC,CAAC;EACF,GAAGT,IAAI,CAAChB,0BAA0B,CAAC,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC;EACrD,GAAGgB,IAAI,CAACd,yBAAyB,CAAC,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC;EACpD,GAAGI,gBAAgB,CAAC;IAAEoB,KAAK,EAAE;EAA4B,CAAC,CAAC;EAE3DC,UAAU,EAAE;AACd,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EAET7B,YAAY;YAAA,OACtBhC,OAAO,CAACO,KAAK;YAAA,OACbJ,OAAO,CAACI;UAAK,SAEtB;QAAA,IAGN;QACDuD,OAAO,EAAEtE,KAAK,CAACsE;MACjB,CAAC;IAGP,CAAC,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"VDatePicker.mjs","names":["makeVDatePickerControlsProps","VDatePickerControls","VDatePickerHeader","makeVDatePickerMonthProps","VDatePickerMonth","makeVDatePickerMonthsProps","VDatePickerMonths","makeVDatePickerYearsProps","VDatePickerYears","VFadeTransition","VDefaultsProvider","makeVPickerProps","VPicker","useDate","useLocale","useProxiedModel","computed","ref","shallowRef","watch","genericComponent","omit","propsFactory","useRender","wrapInArray","makeVDatePickerProps","header","type","String","default","weeksInMonth","title","modelValue","VDatePicker","name","props","emits","date","setup","_ref","emit","slots","adapter","t","model","undefined","v","map","i","multiple","viewMode","minDate","min","isValid","maxDate","max","internal","today","value","isBefore","isAfter","month","Number","getMonth","startOfMonth","year","getYear","startOfYear","setMonth","isReversing","length","format","text","setDate","setYear","headerTransition","disabled","targets","push","_date","addDays","endOfMonth","onClickNext","onUpdateYear","onUpdateMonth","onClickPrev","onClickDate","onClickMonth","onClickYear","val","oldVal","arrBefore","arrAfter","before","after","newMonth","newYear","pickerProps","filterProps","datePickerControlsProps","datePickerHeaderProps","datePickerMonthProps","datePickerMonthsProps","datePickerYearsProps","headerProps","transition","_createVNode","_mergeProps","showWeek","class","style","_Fragment","$event","actions"],"sources":["../../../src/components/VDatePicker/VDatePicker.tsx"],"sourcesContent":["// Styles\nimport './VDatePicker.sass'\n\n// Components\nimport { makeVDatePickerControlsProps, VDatePickerControls } from './VDatePickerControls'\nimport { VDatePickerHeader } from './VDatePickerHeader'\nimport { makeVDatePickerMonthProps, VDatePickerMonth } from './VDatePickerMonth'\nimport { makeVDatePickerMonthsProps, VDatePickerMonths } from './VDatePickerMonths'\nimport { makeVDatePickerYearsProps, VDatePickerYears } from './VDatePickerYears'\nimport { VFadeTransition } from '@/components/transitions'\nimport { VDefaultsProvider } from '@/components/VDefaultsProvider'\nimport { makeVPickerProps, VPicker } from '@/labs/VPicker/VPicker'\n\n// Composables\nimport { useDate } from '@/composables/date'\nimport { useLocale } from '@/composables/locale'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, ref, shallowRef, watch } from 'vue'\nimport { genericComponent, omit, propsFactory, useRender, wrapInArray } from '@/util'\n\n// Types\nimport type { VPickerSlots } from '@/labs/VPicker/VPicker'\nimport type { GenericProps } from '@/util'\n\n// Types\nexport type VDatePickerSlots = Omit<VPickerSlots, 'header'> & {\n header: {\n header: string\n transition: string\n }\n}\n\nexport const makeVDatePickerProps = propsFactory({\n // TODO: implement in v3.5\n // calendarIcon: {\n // type: String,\n // default: '$calendar',\n // },\n // keyboardIcon: {\n // type: String,\n // default: '$edit',\n // },\n // inputMode: {\n // type: String as PropType<'calendar' | 'keyboard'>,\n // default: 'calendar',\n // },\n // inputText: {\n // type: String,\n // default: '$vuetify.datePicker.input.placeholder',\n // },\n // inputPlaceholder: {\n // type: String,\n // default: 'dd/mm/yyyy',\n // },\n header: {\n type: String,\n default: '$vuetify.datePicker.header',\n },\n\n ...makeVDatePickerControlsProps(),\n ...makeVDatePickerMonthProps({\n weeksInMonth: 'static' as const,\n }),\n ...omit(makeVDatePickerMonthsProps(), ['modelValue']),\n ...omit(makeVDatePickerYearsProps(), ['modelValue']),\n ...makeVPickerProps({ title: '$vuetify.datePicker.title' }),\n\n modelValue: null,\n}, 'VDatePicker')\n\nexport const VDatePicker = genericComponent<new <\n T,\n Multiple extends boolean | 'range' | number | (string & {}) = false,\n TModel = Multiple extends true | number | string\n ? T[]\n : T,\n> (\n props: {\n modelValue?: TModel\n 'onUpdate:modelValue'?: (value: TModel) => void\n multiple?: Multiple\n },\n slots: VDatePickerSlots\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VDatePicker',\n\n props: makeVDatePickerProps(),\n\n emits: {\n 'update:modelValue': (date: any) => true,\n 'update:month': (date: any) => true,\n 'update:year': (date: any) => true,\n // 'update:inputMode': (date: any) => true,\n 'update:viewMode': (date: any) => true,\n },\n\n setup (props, { emit, slots }) {\n const adapter = useDate()\n const { t } = useLocale()\n\n const model = useProxiedModel(\n props,\n 'modelValue',\n undefined,\n v => wrapInArray(v).map(i => adapter.date(i)),\n v => props.multiple ? v : v[0],\n )\n\n const viewMode = useProxiedModel(props, 'viewMode')\n // const inputMode = useProxiedModel(props, 'inputMode')\n\n const minDate = computed(() => {\n const date = adapter.date(props.min)\n\n return props.min && adapter.isValid(date) ? date : null\n })\n const maxDate = computed(() => {\n const date = adapter.date(props.max)\n\n return props.max && adapter.isValid(date) ? date : null\n })\n\n const internal = computed(() => {\n const today = adapter.date()\n let value = today\n if (model.value?.[0]) {\n value = adapter.date(model.value[0])\n } else if (minDate.value && adapter.isBefore(today, minDate.value)) {\n value = minDate.value\n } else if (maxDate.value && adapter.isAfter(today, maxDate.value)) {\n value = maxDate.value\n }\n\n return value && adapter.isValid(value) ? value : today\n })\n\n const month = ref(Number(props.month ?? adapter.getMonth(adapter.startOfMonth(internal.value))))\n const year = ref(Number(props.year ?? adapter.getYear(adapter.startOfYear(adapter.setMonth(internal.value, month.value)))))\n\n const isReversing = shallowRef(false)\n const header = computed(() => {\n if (props.multiple && model.value.length > 1) {\n return t('$vuetify.datePicker.itemsSelected', model.value.length)\n }\n\n return (model.value[0] && adapter.isValid(model.value[0]))\n ? adapter.format(adapter.date(model.value[0]), 'normalDateWithWeekday')\n : t(props.header)\n })\n const text = computed(() => {\n let date = adapter.date()\n\n date = adapter.setDate(date, 1)\n date = adapter.setMonth(date, month.value)\n date = adapter.setYear(date, year.value)\n\n return adapter.format(date, 'monthAndYear')\n })\n // const headerIcon = computed(() => props.inputMode === 'calendar' ? props.keyboardIcon : props.calendarIcon)\n const headerTransition = computed(() => `date-picker-header${isReversing.value ? '-reverse' : ''}-transition`)\n\n const disabled = computed(() => {\n if (props.disabled) return true\n\n const targets = []\n\n if (viewMode.value !== 'month') {\n targets.push(...['prev', 'next'])\n } else {\n let _date = adapter.date()\n\n _date = adapter.startOfMonth(_date)\n _date = adapter.setMonth(_date, month.value)\n _date = adapter.setYear(_date, year.value)\n\n if (minDate.value) {\n const date = adapter.addDays(adapter.startOfMonth(_date), -1)\n\n adapter.isAfter(minDate.value, date) && targets.push('prev')\n }\n\n if (maxDate.value) {\n const date = adapter.addDays(adapter.endOfMonth(_date), 1)\n\n adapter.isAfter(date, maxDate.value) && targets.push('next')\n }\n }\n\n return targets\n })\n\n // function onClickAppend () {\n // inputMode.value = inputMode.value === 'calendar' ? 'keyboard' : 'calendar'\n // }\n\n function onClickNext () {\n if (month.value < 11) {\n month.value++\n } else {\n year.value++\n month.value = 0\n onUpdateYear(year.value)\n }\n onUpdateMonth(month.value)\n }\n\n function onClickPrev () {\n if (month.value > 0) {\n month.value--\n } else {\n year.value--\n month.value = 11\n onUpdateYear(year.value)\n }\n onUpdateMonth(month.value)\n }\n\n function onClickDate () {\n viewMode.value = 'month'\n }\n\n function onClickMonth () {\n viewMode.value = viewMode.value === 'months' ? 'month' : 'months'\n }\n\n function onClickYear () {\n viewMode.value = viewMode.value === 'year' ? 'month' : 'year'\n }\n\n function onUpdateMonth (value: number) {\n if (viewMode.value === 'months') onClickMonth()\n\n emit('update:month', value)\n }\n\n function onUpdateYear (value: number) {\n if (viewMode.value === 'year') onClickYear()\n\n emit('update:year', value)\n }\n\n watch(model, (val, oldVal) => {\n const arrBefore = wrapInArray(oldVal)\n const arrAfter = wrapInArray(val)\n\n if (!arrAfter.length) return\n\n const before = adapter.date(arrBefore[arrBefore.length - 1])\n const after = adapter.date(arrAfter[arrAfter.length - 1])\n const newMonth = adapter.getMonth(after)\n const newYear = adapter.getYear(after)\n\n if (newMonth !== month.value) {\n month.value = newMonth\n onUpdateMonth(month.value)\n }\n\n if (newYear !== year.value) {\n year.value = newYear\n onUpdateYear(year.value)\n }\n\n isReversing.value = adapter.isBefore(before, after)\n })\n\n useRender(() => {\n const pickerProps = VPicker.filterProps(props)\n const datePickerControlsProps = VDatePickerControls.filterProps(props)\n const datePickerHeaderProps = VDatePickerHeader.filterProps(props)\n const datePickerMonthProps = VDatePickerMonth.filterProps(props)\n const datePickerMonthsProps = omit(VDatePickerMonths.filterProps(props), ['modelValue'])\n const datePickerYearsProps = omit(VDatePickerYears.filterProps(props), ['modelValue'])\n\n const headerProps = {\n header: header.value,\n transition: headerTransition.value,\n }\n\n return (\n <VPicker\n { ...pickerProps }\n class={[\n 'v-date-picker',\n `v-date-picker--${viewMode.value}`,\n {\n 'v-date-picker--show-week': props.showWeek,\n },\n props.class,\n ]}\n style={ props.style }\n v-slots={{\n title: () => slots.title?.() ?? (\n <div class=\"v-date-picker__title\">\n { t(props.title) }\n </div>\n ),\n header: () => slots.header ? (\n <VDefaultsProvider\n defaults={{\n VDatePickerHeader: { ...headerProps },\n }}\n >\n { slots.header?.(headerProps) }\n </VDefaultsProvider>\n ) : (\n <VDatePickerHeader\n key=\"header\"\n { ...datePickerHeaderProps }\n { ...headerProps }\n onClick={ viewMode.value !== 'month' ? onClickDate : undefined }\n v-slots={{\n ...slots,\n default: undefined,\n }}\n />\n ),\n default: () => (\n <>\n <VDatePickerControls\n { ...datePickerControlsProps }\n disabled={ disabled.value }\n text={ text.value }\n onClick:next={ onClickNext }\n onClick:prev={ onClickPrev }\n onClick:month={ onClickMonth }\n onClick:year={ onClickYear }\n />\n\n <VFadeTransition hideOnLeave>\n { viewMode.value === 'months' ? (\n <VDatePickerMonths\n key=\"date-picker-months\"\n { ...datePickerMonthsProps }\n v-model={ month.value }\n onUpdate:modelValue={ onUpdateMonth }\n min={ minDate.value }\n max={ maxDate.value }\n year={ year.value }\n />\n ) : viewMode.value === 'year' ? (\n <VDatePickerYears\n key=\"date-picker-years\"\n { ...datePickerYearsProps }\n v-model={ year.value }\n onUpdate:modelValue={ onUpdateYear }\n min={ minDate.value }\n max={ maxDate.value }\n />\n ) : (\n <VDatePickerMonth\n key=\"date-picker-month\"\n { ...datePickerMonthProps }\n v-model={ model.value }\n v-model:month={ month.value }\n v-model:year={ year.value }\n onUpdate:month={ onUpdateMonth }\n onUpdate:year={ onUpdateYear }\n min={ minDate.value }\n max={ maxDate.value }\n />\n )}\n </VFadeTransition>\n </>\n ),\n actions: slots.actions,\n }}\n />\n )\n })\n\n return {}\n },\n})\n\nexport type VDatePicker = InstanceType<typeof VDatePicker>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,4BAA4B,EAAEC,mBAAmB;AAAA,SACjDC,iBAAiB;AAAA,SACjBC,yBAAyB,EAAEC,gBAAgB;AAAA,SAC3CC,0BAA0B,EAAEC,iBAAiB;AAAA,SAC7CC,yBAAyB,EAAEC,gBAAgB;AAAA,SAC3CC,eAAe;AAAA,SACfC,iBAAiB;AAAA,SACjBC,gBAAgB,EAAEC,OAAO,0CAElC;AAAA,SACSC,OAAO;AAAA,SACPC,SAAS;AAAA,SACTC,eAAe,8CAExB;AACA,SAASC,QAAQ,EAAEC,GAAG,EAAEC,UAAU,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC7CC,gBAAgB,EAAEC,IAAI,EAAEC,YAAY,EAAEC,SAAS,EAAEC,WAAW,gCAErE;AAIA;AAQA,OAAO,MAAMC,oBAAoB,GAAGH,YAAY,CAAC;EAC/C;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACAI,MAAM,EAAE;IACNC,IAAI,EAAEC,MAAM;IACZC,OAAO,EAAE;EACX,CAAC;EAED,GAAG7B,4BAA4B,CAAC,CAAC;EACjC,GAAGG,yBAAyB,CAAC;IAC3B2B,YAAY,EAAE;EAChB,CAAC,CAAC;EACF,GAAGT,IAAI,CAAChB,0BAA0B,CAAC,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC;EAC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AACc,KAAK;YAAA,uBAAAsD,MAAA,IAAXpE,KAAK,CAACc,KAAK,GAAAsD,MAAA;YAAA,SACLnD,KAAK,CAACH,KAAK;YAAA,mBAAAsD,MAAA,IAAXnD,KAAK,CAACH,KAAK,GAAAsD,MAAA,EAEV5B,aAAa;YAAA,QADfnB,IAAI,CAACP,KAAK;YAAA,kBAAAsD,MAAA,IAAV/C,IAAI,CAACP,KAAK,GAAAsD,MAAA,EAET7B,YAAY;YAAA,OACtBhC,OAAO,CAACO,KAAK;YAAA,OACbJ,OAAO,CAACI;UAAK,SAEtB;QAAA,IAGN;QACDuD,OAAO,EAAExE,KAAK,CAACwE;MACjB,CAAC;IAGP,CAAC,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -79,30 +79,30 @@ export const VDatePickerControls = genericComponent()({
|
|
|
79
79
|
"class": ['v-date-picker-controls']
|
|
80
80
|
}, [_createVNode(VBtn, {
|
|
81
81
|
"class": "v-date-picker-controls__month-btn",
|
|
82
|
+
"data-testid": "month-btn",
|
|
82
83
|
"disabled": disableMonth.value,
|
|
83
84
|
"text": props.text,
|
|
84
85
|
"variant": "text",
|
|
85
86
|
"rounded": true,
|
|
86
87
|
"onClick": onClickMonth
|
|
87
88
|
}, null), _createVNode(VBtn, {
|
|
88
|
-
"key": "mode-btn",
|
|
89
89
|
"class": "v-date-picker-controls__mode-btn",
|
|
90
|
+
"data-testid": "year-btn",
|
|
90
91
|
"disabled": disableYear.value,
|
|
91
92
|
"density": "comfortable",
|
|
92
93
|
"icon": props.modeIcon,
|
|
93
94
|
"variant": "text",
|
|
94
95
|
"onClick": onClickYear
|
|
95
|
-
}, null), _createVNode(VSpacer, {
|
|
96
|
-
"key": "mode-spacer"
|
|
97
|
-
}, null), _createVNode("div", {
|
|
98
|
-
"key": "month-buttons",
|
|
96
|
+
}, null), _createVNode(VSpacer, null, null), _createVNode("div", {
|
|
99
97
|
"class": "v-date-picker-controls__month"
|
|
100
98
|
}, [_createVNode(VBtn, {
|
|
99
|
+
"data-testid": "prev-month",
|
|
101
100
|
"disabled": disablePrev.value,
|
|
102
101
|
"icon": props.prevIcon,
|
|
103
102
|
"variant": "text",
|
|
104
103
|
"onClick": onClickPrev
|
|
105
104
|
}, null), _createVNode(VBtn, {
|
|
105
|
+
"data-testid": "next-month",
|
|
106
106
|
"disabled": disableNext.value,
|
|
107
107
|
"icon": props.nextIcon,
|
|
108
108
|
"variant": "text",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VDatePickerControls.mjs","names":["VBtn","VSpacer","IconValue","computed","genericComponent","propsFactory","useRender","makeVDatePickerControlsProps","active","type","String","Array","default","undefined","disabled","Boolean","nextIcon","prevIcon","modeIcon","text","viewMode","VDatePickerControls","name","props","emits","click:year","click:month","click:prev","click:next","click:text","setup","_ref","emit","disableMonth","isArray","includes","disableYear","disablePrev","disableNext","onClickPrev","onClickNext","onClickYear","onClickMonth","_createVNode","value"],"sources":["../../../src/components/VDatePicker/VDatePickerControls.tsx"],"sourcesContent":["// Styles\nimport './VDatePickerControls.sass'\n\n// Components\nimport { VBtn } from '@/components/VBtn'\nimport { VSpacer } from '@/components/VGrid'\n\n// Composables\nimport { IconValue } from '@/composables/icons'\n\n// Utilities\nimport { computed } from 'vue'\nimport { genericComponent, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\n\nexport const makeVDatePickerControlsProps = propsFactory({\n active: {\n type: [String, Array] as PropType<string | string[]>,\n default: undefined,\n },\n disabled: {\n type: [Boolean, String, Array] as PropType<boolean | string | string[] | null>,\n default: null,\n },\n nextIcon: {\n type: IconValue,\n default: '$next',\n },\n prevIcon: {\n type: IconValue,\n default: '$prev',\n },\n modeIcon: {\n type: IconValue,\n default: '$subgroup',\n },\n text: String,\n viewMode: {\n type: String as PropType<'month' | 'months' | 'year'>,\n default: 'month',\n },\n}, 'VDatePickerControls')\n\nexport const VDatePickerControls = genericComponent()({\n name: 'VDatePickerControls',\n\n props: makeVDatePickerControlsProps(),\n\n emits: {\n 'click:year': () => true,\n 'click:month': () => true,\n 'click:prev': () => true,\n 'click:next': () => true,\n 'click:text': () => true,\n },\n\n setup (props, { emit }) {\n const disableMonth = computed(() => {\n return Array.isArray(props.disabled)\n ? props.disabled.includes('text')\n : !!props.disabled\n })\n const disableYear = computed(() => {\n return Array.isArray(props.disabled)\n ? props.disabled.includes('mode')\n : !!props.disabled\n })\n const disablePrev = computed(() => {\n return Array.isArray(props.disabled)\n ? props.disabled.includes('prev')\n : !!props.disabled\n })\n const disableNext = computed(() => {\n return Array.isArray(props.disabled)\n ? props.disabled.includes('next')\n : !!props.disabled\n })\n\n function onClickPrev () {\n emit('click:prev')\n }\n\n function onClickNext () {\n emit('click:next')\n }\n\n function onClickYear () {\n emit('click:year')\n }\n\n function onClickMonth () {\n emit('click:month')\n }\n\n useRender(() => {\n // TODO: add slot support and scope defaults\n return (\n <div\n class={[\n 'v-date-picker-controls',\n ]}\n >\n <VBtn\n class=\"v-date-picker-controls__month-btn\"\n disabled={ disableMonth.value }\n text={ props.text }\n variant=\"text\"\n rounded\n onClick={ onClickMonth }\n ></VBtn>\n\n <VBtn\n
|
|
1
|
+
{"version":3,"file":"VDatePickerControls.mjs","names":["VBtn","VSpacer","IconValue","computed","genericComponent","propsFactory","useRender","makeVDatePickerControlsProps","active","type","String","Array","default","undefined","disabled","Boolean","nextIcon","prevIcon","modeIcon","text","viewMode","VDatePickerControls","name","props","emits","click:year","click:month","click:prev","click:next","click:text","setup","_ref","emit","disableMonth","isArray","includes","disableYear","disablePrev","disableNext","onClickPrev","onClickNext","onClickYear","onClickMonth","_createVNode","value"],"sources":["../../../src/components/VDatePicker/VDatePickerControls.tsx"],"sourcesContent":["// Styles\nimport './VDatePickerControls.sass'\n\n// Components\nimport { VBtn } from '@/components/VBtn'\nimport { VSpacer } from '@/components/VGrid'\n\n// Composables\nimport { IconValue } from '@/composables/icons'\n\n// Utilities\nimport { computed } from 'vue'\nimport { genericComponent, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\n\nexport const makeVDatePickerControlsProps = propsFactory({\n active: {\n type: [String, Array] as PropType<string | string[]>,\n default: undefined,\n },\n disabled: {\n type: [Boolean, String, Array] as PropType<boolean | string | string[] | null>,\n default: null,\n },\n nextIcon: {\n type: IconValue,\n default: '$next',\n },\n prevIcon: {\n type: IconValue,\n default: '$prev',\n },\n modeIcon: {\n type: IconValue,\n default: '$subgroup',\n },\n text: String,\n viewMode: {\n type: String as PropType<'month' | 'months' | 'year'>,\n default: 'month',\n },\n}, 'VDatePickerControls')\n\nexport const VDatePickerControls = genericComponent()({\n name: 'VDatePickerControls',\n\n props: makeVDatePickerControlsProps(),\n\n emits: {\n 'click:year': () => true,\n 'click:month': () => true,\n 'click:prev': () => true,\n 'click:next': () => true,\n 'click:text': () => true,\n },\n\n setup (props, { emit }) {\n const disableMonth = computed(() => {\n return Array.isArray(props.disabled)\n ? props.disabled.includes('text')\n : !!props.disabled\n })\n const disableYear = computed(() => {\n return Array.isArray(props.disabled)\n ? props.disabled.includes('mode')\n : !!props.disabled\n })\n const disablePrev = computed(() => {\n return Array.isArray(props.disabled)\n ? props.disabled.includes('prev')\n : !!props.disabled\n })\n const disableNext = computed(() => {\n return Array.isArray(props.disabled)\n ? props.disabled.includes('next')\n : !!props.disabled\n })\n\n function onClickPrev () {\n emit('click:prev')\n }\n\n function onClickNext () {\n emit('click:next')\n }\n\n function onClickYear () {\n emit('click:year')\n }\n\n function onClickMonth () {\n emit('click:month')\n }\n\n useRender(() => {\n // TODO: add slot support and scope defaults\n return (\n <div\n class={[\n 'v-date-picker-controls',\n ]}\n >\n <VBtn\n class=\"v-date-picker-controls__month-btn\"\n data-testid=\"month-btn\"\n disabled={ disableMonth.value }\n text={ props.text }\n variant=\"text\"\n rounded\n onClick={ onClickMonth }\n ></VBtn>\n\n <VBtn\n class=\"v-date-picker-controls__mode-btn\"\n data-testid=\"year-btn\"\n disabled={ disableYear.value }\n density=\"comfortable\"\n icon={ props.modeIcon }\n variant=\"text\"\n onClick={ onClickYear }\n />\n\n <VSpacer />\n\n <div class=\"v-date-picker-controls__month\">\n <VBtn\n data-testid=\"prev-month\"\n disabled={ disablePrev.value }\n icon={ props.prevIcon }\n variant=\"text\"\n onClick={ onClickPrev }\n />\n\n <VBtn\n data-testid=\"next-month\"\n disabled={ disableNext.value }\n icon={ props.nextIcon }\n variant=\"text\"\n onClick={ onClickNext }\n />\n </div>\n </div>\n )\n })\n\n return {}\n },\n})\n\nexport type VDatePickerControls = InstanceType<typeof VDatePickerControls>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,IAAI;AAAA,SACJC,OAAO,8BAEhB;AAAA,SACSC,SAAS,uCAElB;AACA,SAASC,QAAQ,QAAQ,KAAK;AAAA,SACrBC,gBAAgB,EAAEC,YAAY,EAAEC,SAAS,gCAElD;AAGA,OAAO,MAAMC,4BAA4B,GAAGF,YAAY,CAAC;EACvDG,MAAM,EAAE;IACNC,IAAI,EAAE,CAACC,MAAM,EAAEC,KAAK,CAAgC;IACpDC,OAAO,EAAEC;EACX,CAAC;EACDC,QAAQ,EAAE;IACRL,IAAI,EAAE,CAACM,OAAO,EAAEL,MAAM,EAAEC,KAAK,CAAiD;IAC9EC,OAAO,EAAE;EACX,CAAC;EACDI,QAAQ,EAAE;IACRP,IAAI,EAAEP,SAAS;IACfU,OAAO,EAAE;EACX,CAAC;EACDK,QAAQ,EAAE;IACRR,IAAI,EAAEP,SAAS;IACfU,OAAO,EAAE;EACX,CAAC;EACDM,QAAQ,EAAE;IACRT,IAAI,EAAEP,SAAS;IACfU,OAAO,EAAE;EACX,CAAC;EACDO,IAAI,EAAET,MAAM;EACZU,QAAQ,EAAE;IACRX,IAAI,EAAEC,MAA+C;IACrDE,OAAO,EAAE;EACX;AACF,CAAC,EAAE,qBAAqB,CAAC;AAEzB,OAAO,MAAMS,mBAAmB,GAAGjB,gBAAgB,CAAC,CAAC,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CAAC,GAC/B,CAAC,CAACZ,KAAK,CAACT,QAAQ;IACtB,CAAC,CAAC;IAEF,SAASyB,WAAWA,CAAA,EAAI;MACtBP,IAAI,CAAC,YAAY,CAAC;IACpB;IAEA,SAASQ,WAAWA,CAAA,EAAI;MACtBR,IAAI,CAAC,YAAY,CAAC;IACpB;IAEA,SAASS,WAAWA,CAAA,EAAI;MACtBT,IAAI,CAAC,YAAY,CAAC;IACpB;IAEA,SAASU,YAAYA,CAAA,EAAI;MACvBV,IAAI,CAAC,aAAa,CAAC;IACrB;IAEA1B,SAAS,CAAC,MAAM;MACd;MACA,OAAAqC,YAAA;QAAA,SAEW,CACL,wBAAwB;MACzB,IAAAA,YAAA,CAAA3C,IAAA;QAAA;QAAA;QAAA,YAKYiC,YAAY,CAACW,KAAK;QAAA,QACtBrB,KAAK,CAACJ,IAAI;QAAA;QAAA;QAAA,WAGPuB;MAAY,UAAAC,YAAA,CAAA3C,IAAA;QAAA;QAAA;QAAA,YAMXoC,WAAW,CAACQ,KAAK;QAAA;QAAA,QAErBrB,KAAK,CAACL,QAAQ;QAAA;QAAA,WAEXuB;MAAW,UAAAE,YAAA,CAAA1C,OAAA,eAAA0C,YAAA;QAAA;MAAA,IAAAA,YAAA,CAAA3C,IAAA;QAAA;QAAA,YAQRqC,WAAW,CAACO,KAAK;QAAA,QACrBrB,KAAK,CAACN,QAAQ;QAAA;QAAA,WAEXsB;MAAW,UAAAI,YAAA,CAAA3C,IAAA;QAAA;QAAA,YAKVsC,WAAW,CAACM,KAAK;QAAA,QACrBrB,KAAK,CAACP,QAAQ;QAAA;QAAA,WAEXwB;MAAW;IAK/B,CAAC,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { createTextVNode as _createTextVNode, createVNode as _createVNode } from "vue";
|
|
2
|
+
// Components
|
|
3
|
+
import { VDialog } from "../VDialog.mjs"; // Utilities
|
|
4
|
+
import { render, screen, userEvent } from '@test';
|
|
5
|
+
import { nextTick, ref } from 'vue';
|
|
6
|
+
|
|
7
|
+
// Tests
|
|
8
|
+
describe('VDialog', () => {
|
|
9
|
+
it('should render correctly', async () => {
|
|
10
|
+
const model = ref(false);
|
|
11
|
+
const {
|
|
12
|
+
element
|
|
13
|
+
} = render(() => _createVNode("div", null, [_createVNode(VDialog, {
|
|
14
|
+
"modelValue": model.value,
|
|
15
|
+
"onUpdate:modelValue": $event => model.value = $event,
|
|
16
|
+
"data-testid": "dialog"
|
|
17
|
+
}, {
|
|
18
|
+
default: () => [_createVNode("div", {
|
|
19
|
+
"data-testid": "content"
|
|
20
|
+
}, [_createTextVNode("Content")])]
|
|
21
|
+
})]));
|
|
22
|
+
expect(screen.queryByTestId('dialog')).toBeNull();
|
|
23
|
+
model.value = true;
|
|
24
|
+
await nextTick();
|
|
25
|
+
await expect(screen.findByTestId('dialog')).resolves.toBeVisible();
|
|
26
|
+
await expect.element(await screen.findByTestId('content')).toBeVisible();
|
|
27
|
+
await userEvent.click(element);
|
|
28
|
+
await expect.poll(() => model.value).toBeFalsy();
|
|
29
|
+
await expect.poll(() => screen.queryByTestId('dialog')).toBeNull();
|
|
30
|
+
await expect.poll(() => screen.queryByTestId('content')).toBeNull();
|
|
31
|
+
});
|
|
32
|
+
it('should emit afterLeave', async () => {
|
|
33
|
+
const model = ref(true);
|
|
34
|
+
const onAfterLeave = vi.fn();
|
|
35
|
+
const {
|
|
36
|
+
element
|
|
37
|
+
} = render(() => _createVNode("div", null, [_createVNode(VDialog, {
|
|
38
|
+
"modelValue": model.value,
|
|
39
|
+
"onUpdate:modelValue": $event => model.value = $event,
|
|
40
|
+
"onAfterLeave": onAfterLeave
|
|
41
|
+
}, {
|
|
42
|
+
default: () => [_createVNode("div", {
|
|
43
|
+
"data-test": "content"
|
|
44
|
+
}, [_createTextVNode("Content")])]
|
|
45
|
+
})]));
|
|
46
|
+
await userEvent.click(element);
|
|
47
|
+
await expect.poll(() => onAfterLeave).toHaveBeenCalledTimes(1);
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
//# sourceMappingURL=VDialog.spec.browser.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VDialog.spec.browser.mjs","names":["VDialog","render","screen","userEvent","nextTick","ref","describe","it","model","element","_createVNode","value","$event","default","_createTextVNode","expect","queryByTestId","toBeNull","findByTestId","resolves","toBeVisible","click","poll","toBeFalsy","onAfterLeave","vi","fn","toHaveBeenCalledTimes"],"sources":["../../../../src/components/VDialog/__test__/VDialog.spec.browser.tsx"],"sourcesContent":["// Components\nimport { VDialog } from '../VDialog'\n\n// Utilities\nimport { render, screen, userEvent } from '@test'\nimport { nextTick, ref } from 'vue'\n\n// Tests\ndescribe('VDialog', () => {\n it('should render correctly', async () => {\n const model = ref(false)\n const { element } = render(() => (\n <div>\n <VDialog v-model={ model.value } data-testid=\"dialog\">\n <div data-testid=\"content\">Content</div>\n </VDialog>\n </div>\n ))\n\n expect(screen.queryByTestId('dialog')).toBeNull()\n\n model.value = true\n await nextTick()\n await expect(screen.findByTestId('dialog')).resolves.toBeVisible()\n await expect.element(await screen.findByTestId('content')).toBeVisible()\n\n await userEvent.click(element)\n await expect.poll(() => model.value).toBeFalsy()\n await expect.poll(() => screen.queryByTestId('dialog')).toBeNull()\n await expect.poll(() => screen.queryByTestId('content')).toBeNull()\n })\n\n it('should emit afterLeave', async () => {\n const model = ref(true)\n const onAfterLeave = vi.fn()\n const { element } = render(() => (\n <div>\n <VDialog v-model={ model.value } onAfterLeave={ onAfterLeave }>\n <div data-test=\"content\">Content</div>\n </VDialog>\n </div>\n ))\n\n await userEvent.click(element)\n await expect.poll(() => onAfterLeave).toHaveBeenCalledTimes(1)\n })\n})\n"],"mappings":";AAAA;AAAA,SACSA,OAAO,0BAEhB;AACA,SAASC,MAAM,EAAEC,MAAM,EAAEC,SAAS,QAAQ,OAAO;AACjD,SAASC,QAAQ,EAAEC,GAAG,QA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AAY;IACvC,MAAMC,KAAK,GAAGH,GAAG,CAAC,IAAI,CAAC;IACvB,MAAMmB,YAAY,GAAGC,EAAE,CAACC,EAAE,CAAC,CAAC;IAC5B,MAAM;MAAEjB;IAAQ,CAAC,GAAGR,MAAM,CAAC,MAAAS,YAAA,eAAAA,YAAA,CAAAV,OAAA;MAAA,cAEJQ,KAAK,CAACG,KAAK;MAAA,uBAAAC,MAAA,IAAXJ,KAAK,CAACG,KAAK,GAAAC,MAAA;MAAA,gBAAkBY;IAAY;MAAAX,OAAA,EAAAA,CAAA,MAAAH,YAAA;QAAA;MAAA,IAAAI,gBAAA;IAAA,IAI/D,CAAC;IAEF,MAAMX,SAAS,CAACkB,KAAK,CAACZ,OAAO,CAAC;IAC9B,MAAMM,MAAM,CAACO,IAAI,CAAC,MAAME,YAAY,CAAC,CAACG,qBAAqB,CAAC,CAAC,CAAC;EAChE,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -284,6 +284,7 @@ declare const VDialog: {
|
|
|
284
284
|
}) => vue.VNodeChild) | undefined;
|
|
285
285
|
onAfterEnter?: (() => any) | undefined;
|
|
286
286
|
onAfterLeave?: (() => any) | undefined;
|
|
287
|
+
onKeydown?: ((e: KeyboardEvent) => any) | undefined;
|
|
287
288
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
288
289
|
"onClick:outside"?: ((e: MouseEvent) => any) | undefined;
|
|
289
290
|
} & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
|
|
@@ -366,6 +367,7 @@ declare const VDialog: {
|
|
|
366
367
|
} & {
|
|
367
368
|
onAfterEnter?: (() => any) | undefined;
|
|
368
369
|
onAfterLeave?: (() => any) | undefined;
|
|
370
|
+
onKeydown?: ((e: KeyboardEvent) => any) | undefined;
|
|
369
371
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
370
372
|
"onClick:outside"?: ((e: MouseEvent) => any) | undefined;
|
|
371
373
|
}, "absolute" | "location" | "origin" | "transition" | "zIndex" | "style" | "eager" | "disabled" | "persistent" | "modelValue" | "locationStrategy" | "scrollStrategy" | "activatorProps" | "openOnClick" | "openOnHover" | "openOnFocus" | "closeOnContentClick" | "closeOnBack" | "contained" | "noClickAnimation" | "scrim" | "_disableGlobalStack">;
|
|
@@ -387,7 +389,7 @@ declare const VDialog: {
|
|
|
387
389
|
}>;
|
|
388
390
|
$root: vue.ComponentPublicInstance | null;
|
|
389
391
|
$parent: vue.ComponentPublicInstance | null;
|
|
390
|
-
$emit: ((event: "update:modelValue", value: boolean) => void) & ((event: "click:outside", e: MouseEvent) => void) & ((event: "afterEnter") => void) & ((event: "afterLeave") => void);
|
|
392
|
+
$emit: ((event: "keydown", e: KeyboardEvent) => void) & ((event: "update:modelValue", value: boolean) => void) & ((event: "click:outside", e: MouseEvent) => void) & ((event: "afterEnter") => void) & ((event: "afterLeave") => void);
|
|
391
393
|
$el: any;
|
|
392
394
|
$options: vue.ComponentOptionsBase<{
|
|
393
395
|
absolute: boolean;
|
|
@@ -469,6 +471,7 @@ declare const VDialog: {
|
|
|
469
471
|
} & {
|
|
470
472
|
onAfterEnter?: (() => any) | undefined;
|
|
471
473
|
onAfterLeave?: (() => any) | undefined;
|
|
474
|
+
onKeydown?: ((e: KeyboardEvent) => any) | undefined;
|
|
472
475
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
473
476
|
"onClick:outside"?: ((e: MouseEvent) => any) | undefined;
|
|
474
477
|
}, {
|
|
@@ -483,6 +486,7 @@ declare const VDialog: {
|
|
|
483
486
|
}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
484
487
|
'click:outside': (e: MouseEvent) => true;
|
|
485
488
|
'update:modelValue': (value: boolean) => true;
|
|
489
|
+
keydown: (e: KeyboardEvent) => true;
|
|
486
490
|
afterEnter: () => true;
|
|
487
491
|
afterLeave: () => true;
|
|
488
492
|
}, string, {
|
|
@@ -621,6 +625,7 @@ declare const VDialog: {
|
|
|
621
625
|
} & {
|
|
622
626
|
onAfterEnter?: (() => any) | undefined;
|
|
623
627
|
onAfterLeave?: (() => any) | undefined;
|
|
628
|
+
onKeydown?: ((e: KeyboardEvent) => any) | undefined;
|
|
624
629
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
625
630
|
"onClick:outside"?: ((e: MouseEvent) => any) | undefined;
|
|
626
631
|
}, "target" | "contentEl" | "activatorEl" | "scrimEl" | "animateClick" | "globalTop" | "localTop" | "updateLocation"> & vue.ShallowUnwrapRef<{
|
|
@@ -632,7 +637,7 @@ declare const VDialog: {
|
|
|
632
637
|
globalTop: Readonly<vue.Ref<boolean>>;
|
|
633
638
|
localTop: vue.ComputedRef<boolean>;
|
|
634
639
|
updateLocation: vue.Ref<((e: Event) => void) | undefined>;
|
|
635
|
-
}> & {} & vue.ComponentCustomProperties & {}, "offset" | "key" | "height" | "width" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "opacity" | "target" | "class" | "theme" | "ref" | "onAfterEnter" | "onAfterLeave" | "$children" | "v-slots" | "v-slot:default" | "ref_for" | "ref_key" | "onVnodeBeforeMount" | "onVnodeMounted" | "onVnodeBeforeUpdate" | "onVnodeUpdated" | "onVnodeBeforeUnmount" | "onVnodeUnmounted" | "onUpdate:modelValue" | "contentClass" | "activator" | "v-slot:activator" | "closeDelay" | "openDelay" | "contentProps" | "attach" | "onClick:outside" | ("absolute" | "location" | "origin" | "transition" | "zIndex" | "style" | "eager" | "disabled" | "persistent" | "modelValue" | "locationStrategy" | "scrollStrategy" | "activatorProps" | "openOnClick" | "openOnHover" | "openOnFocus" | "closeOnContentClick" | "closeOnBack" | "contained" | "noClickAnimation" | "scrim" | "_disableGlobalStack")>, `$${any}`> & {
|
|
640
|
+
}> & {} & vue.ComponentCustomProperties & {}, "offset" | "key" | "height" | "width" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "opacity" | "target" | "class" | "theme" | "ref" | "onAfterEnter" | "onAfterLeave" | "onKeydown" | "$children" | "v-slots" | "v-slot:default" | "ref_for" | "ref_key" | "onVnodeBeforeMount" | "onVnodeMounted" | "onVnodeBeforeUpdate" | "onVnodeUpdated" | "onVnodeBeforeUnmount" | "onVnodeUnmounted" | "onUpdate:modelValue" | "contentClass" | "activator" | "v-slot:activator" | "closeDelay" | "openDelay" | "contentProps" | "attach" | "onClick:outside" | ("absolute" | "location" | "origin" | "transition" | "zIndex" | "style" | "eager" | "disabled" | "persistent" | "modelValue" | "locationStrategy" | "scrollStrategy" | "activatorProps" | "openOnClick" | "openOnHover" | "openOnFocus" | "closeOnContentClick" | "closeOnBack" | "contained" | "noClickAnimation" | "scrim" | "_disableGlobalStack")>, `$${any}`> & {
|
|
636
641
|
_allExposed: {
|
|
637
642
|
activatorEl: vue.Ref<HTMLElement | undefined>;
|
|
638
643
|
scrimEl: vue.Ref<HTMLElement | undefined>;
|
|
@@ -970,6 +975,7 @@ declare const VDialog: {
|
|
|
970
975
|
}) => vue.VNodeChild) | undefined;
|
|
971
976
|
onAfterEnter?: (() => any) | undefined;
|
|
972
977
|
onAfterLeave?: (() => any) | undefined;
|
|
978
|
+
onKeydown?: ((e: KeyboardEvent) => any) | undefined;
|
|
973
979
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
974
980
|
"onClick:outside"?: ((e: MouseEvent) => any) | undefined;
|
|
975
981
|
} & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
|
|
@@ -1052,6 +1058,7 @@ declare const VDialog: {
|
|
|
1052
1058
|
} & {
|
|
1053
1059
|
onAfterEnter?: (() => any) | undefined;
|
|
1054
1060
|
onAfterLeave?: (() => any) | undefined;
|
|
1061
|
+
onKeydown?: ((e: KeyboardEvent) => any) | undefined;
|
|
1055
1062
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
1056
1063
|
"onClick:outside"?: ((e: MouseEvent) => any) | undefined;
|
|
1057
1064
|
}, "absolute" | "location" | "origin" | "transition" | "zIndex" | "style" | "eager" | "disabled" | "persistent" | "modelValue" | "locationStrategy" | "scrollStrategy" | "activatorProps" | "openOnClick" | "openOnHover" | "openOnFocus" | "closeOnContentClick" | "closeOnBack" | "contained" | "noClickAnimation" | "scrim" | "_disableGlobalStack">;
|
|
@@ -1073,7 +1080,7 @@ declare const VDialog: {
|
|
|
1073
1080
|
}>;
|
|
1074
1081
|
$root: vue.ComponentPublicInstance | null;
|
|
1075
1082
|
$parent: vue.ComponentPublicInstance | null;
|
|
1076
|
-
$emit: ((event: "update:modelValue", value: boolean) => void) & ((event: "click:outside", e: MouseEvent) => void) & ((event: "afterEnter") => void) & ((event: "afterLeave") => void);
|
|
1083
|
+
$emit: ((event: "keydown", e: KeyboardEvent) => void) & ((event: "update:modelValue", value: boolean) => void) & ((event: "click:outside", e: MouseEvent) => void) & ((event: "afterEnter") => void) & ((event: "afterLeave") => void);
|
|
1077
1084
|
$el: any;
|
|
1078
1085
|
$options: vue.ComponentOptionsBase<{
|
|
1079
1086
|
absolute: boolean;
|
|
@@ -1155,6 +1162,7 @@ declare const VDialog: {
|
|
|
1155
1162
|
} & {
|
|
1156
1163
|
onAfterEnter?: (() => any) | undefined;
|
|
1157
1164
|
onAfterLeave?: (() => any) | undefined;
|
|
1165
|
+
onKeydown?: ((e: KeyboardEvent) => any) | undefined;
|
|
1158
1166
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
1159
1167
|
"onClick:outside"?: ((e: MouseEvent) => any) | undefined;
|
|
1160
1168
|
}, {
|
|
@@ -1169,6 +1177,7 @@ declare const VDialog: {
|
|
|
1169
1177
|
}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
1170
1178
|
'click:outside': (e: MouseEvent) => true;
|
|
1171
1179
|
'update:modelValue': (value: boolean) => true;
|
|
1180
|
+
keydown: (e: KeyboardEvent) => true;
|
|
1172
1181
|
afterEnter: () => true;
|
|
1173
1182
|
afterLeave: () => true;
|
|
1174
1183
|
}, string, {
|
|
@@ -1307,6 +1316,7 @@ declare const VDialog: {
|
|
|
1307
1316
|
} & {
|
|
1308
1317
|
onAfterEnter?: (() => any) | undefined;
|
|
1309
1318
|
onAfterLeave?: (() => any) | undefined;
|
|
1319
|
+
onKeydown?: ((e: KeyboardEvent) => any) | undefined;
|
|
1310
1320
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
1311
1321
|
"onClick:outside"?: ((e: MouseEvent) => any) | undefined;
|
|
1312
1322
|
}, "target" | "contentEl" | "activatorEl" | "scrimEl" | "animateClick" | "globalTop" | "localTop" | "updateLocation"> & vue.ShallowUnwrapRef<{
|
|
@@ -1318,7 +1328,7 @@ declare const VDialog: {
|
|
|
1318
1328
|
globalTop: Readonly<vue.Ref<boolean>>;
|
|
1319
1329
|
localTop: vue.ComputedRef<boolean>;
|
|
1320
1330
|
updateLocation: vue.Ref<((e: Event) => void) | undefined>;
|
|
1321
|
-
}> & {} & vue.ComponentCustomProperties & {}, "offset" | "key" | "height" | "width" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "opacity" | "target" | "class" | "theme" | "ref" | "onAfterEnter" | "onAfterLeave" | "$children" | "v-slots" | "v-slot:default" | "ref_for" | "ref_key" | "onVnodeBeforeMount" | "onVnodeMounted" | "onVnodeBeforeUpdate" | "onVnodeUpdated" | "onVnodeBeforeUnmount" | "onVnodeUnmounted" | "onUpdate:modelValue" | "contentClass" | "activator" | "v-slot:activator" | "closeDelay" | "openDelay" | "contentProps" | "attach" | "onClick:outside" | ("absolute" | "location" | "origin" | "transition" | "zIndex" | "style" | "eager" | "disabled" | "persistent" | "modelValue" | "locationStrategy" | "scrollStrategy" | "activatorProps" | "openOnClick" | "openOnHover" | "openOnFocus" | "closeOnContentClick" | "closeOnBack" | "contained" | "noClickAnimation" | "scrim" | "_disableGlobalStack")>, `$${any}`> & {
|
|
1331
|
+
}> & {} & vue.ComponentCustomProperties & {}, "offset" | "key" | "height" | "width" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "opacity" | "target" | "class" | "theme" | "ref" | "onAfterEnter" | "onAfterLeave" | "onKeydown" | "$children" | "v-slots" | "v-slot:default" | "ref_for" | "ref_key" | "onVnodeBeforeMount" | "onVnodeMounted" | "onVnodeBeforeUpdate" | "onVnodeUpdated" | "onVnodeBeforeUnmount" | "onVnodeUnmounted" | "onUpdate:modelValue" | "contentClass" | "activator" | "v-slot:activator" | "closeDelay" | "openDelay" | "contentProps" | "attach" | "onClick:outside" | ("absolute" | "location" | "origin" | "transition" | "zIndex" | "style" | "eager" | "disabled" | "persistent" | "modelValue" | "locationStrategy" | "scrollStrategy" | "activatorProps" | "openOnClick" | "openOnHover" | "openOnFocus" | "closeOnContentClick" | "closeOnBack" | "contained" | "noClickAnimation" | "scrim" | "_disableGlobalStack")>, `$${any}`> & {
|
|
1322
1332
|
_allExposed: {
|
|
1323
1333
|
activatorEl: vue.Ref<HTMLElement | undefined>;
|
|
1324
1334
|
scrimEl: vue.Ref<HTMLElement | undefined>;
|
|
@@ -1555,6 +1565,7 @@ declare const VDialog: {
|
|
|
1555
1565
|
}) => vue.VNodeChild) | undefined;
|
|
1556
1566
|
onAfterEnter?: (() => any) | undefined;
|
|
1557
1567
|
onAfterLeave?: (() => any) | undefined;
|
|
1568
|
+
onKeydown?: ((e: KeyboardEvent) => any) | undefined;
|
|
1558
1569
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
1559
1570
|
"onClick:outside"?: ((e: MouseEvent) => any) | undefined;
|
|
1560
1571
|
} & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
|
|
@@ -1637,6 +1648,7 @@ declare const VDialog: {
|
|
|
1637
1648
|
} & {
|
|
1638
1649
|
onAfterEnter?: (() => any) | undefined;
|
|
1639
1650
|
onAfterLeave?: (() => any) | undefined;
|
|
1651
|
+
onKeydown?: ((e: KeyboardEvent) => any) | undefined;
|
|
1640
1652
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
1641
1653
|
"onClick:outside"?: ((e: MouseEvent) => any) | undefined;
|
|
1642
1654
|
}, "absolute" | "location" | "origin" | "transition" | "zIndex" | "style" | "eager" | "disabled" | "persistent" | "modelValue" | "locationStrategy" | "scrollStrategy" | "activatorProps" | "openOnClick" | "openOnHover" | "openOnFocus" | "closeOnContentClick" | "closeOnBack" | "contained" | "noClickAnimation" | "scrim" | "_disableGlobalStack">;
|
|
@@ -1658,7 +1670,7 @@ declare const VDialog: {
|
|
|
1658
1670
|
}>;
|
|
1659
1671
|
$root: vue.ComponentPublicInstance | null;
|
|
1660
1672
|
$parent: vue.ComponentPublicInstance | null;
|
|
1661
|
-
$emit: ((event: "update:modelValue", value: boolean) => void) & ((event: "click:outside", e: MouseEvent) => void) & ((event: "afterEnter") => void) & ((event: "afterLeave") => void);
|
|
1673
|
+
$emit: ((event: "keydown", e: KeyboardEvent) => void) & ((event: "update:modelValue", value: boolean) => void) & ((event: "click:outside", e: MouseEvent) => void) & ((event: "afterEnter") => void) & ((event: "afterLeave") => void);
|
|
1662
1674
|
$el: any;
|
|
1663
1675
|
$options: vue.ComponentOptionsBase<{
|
|
1664
1676
|
absolute: boolean;
|
|
@@ -1740,6 +1752,7 @@ declare const VDialog: {
|
|
|
1740
1752
|
} & {
|
|
1741
1753
|
onAfterEnter?: (() => any) | undefined;
|
|
1742
1754
|
onAfterLeave?: (() => any) | undefined;
|
|
1755
|
+
onKeydown?: ((e: KeyboardEvent) => any) | undefined;
|
|
1743
1756
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
1744
1757
|
"onClick:outside"?: ((e: MouseEvent) => any) | undefined;
|
|
1745
1758
|
}, {
|
|
@@ -1754,6 +1767,7 @@ declare const VDialog: {
|
|
|
1754
1767
|
}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
1755
1768
|
'click:outside': (e: MouseEvent) => true;
|
|
1756
1769
|
'update:modelValue': (value: boolean) => true;
|
|
1770
|
+
keydown: (e: KeyboardEvent) => true;
|
|
1757
1771
|
afterEnter: () => true;
|
|
1758
1772
|
afterLeave: () => true;
|
|
1759
1773
|
}, string, {
|
|
@@ -1892,6 +1906,7 @@ declare const VDialog: {
|
|
|
1892
1906
|
} & {
|
|
1893
1907
|
onAfterEnter?: (() => any) | undefined;
|
|
1894
1908
|
onAfterLeave?: (() => any) | undefined;
|
|
1909
|
+
onKeydown?: ((e: KeyboardEvent) => any) | undefined;
|
|
1895
1910
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
1896
1911
|
"onClick:outside"?: ((e: MouseEvent) => any) | undefined;
|
|
1897
1912
|
}, "target" | "contentEl" | "activatorEl" | "scrimEl" | "animateClick" | "globalTop" | "localTop" | "updateLocation"> & vue.ShallowUnwrapRef<{
|
|
@@ -1903,7 +1918,7 @@ declare const VDialog: {
|
|
|
1903
1918
|
globalTop: Readonly<vue.Ref<boolean>>;
|
|
1904
1919
|
localTop: vue.ComputedRef<boolean>;
|
|
1905
1920
|
updateLocation: vue.Ref<((e: Event) => void) | undefined>;
|
|
1906
|
-
}> & {} & vue.ComponentCustomProperties & {}, "offset" | "key" | "height" | "width" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "opacity" | "target" | "class" | "theme" | "ref" | "onAfterEnter" | "onAfterLeave" | "$children" | "v-slots" | "v-slot:default" | "ref_for" | "ref_key" | "onVnodeBeforeMount" | "onVnodeMounted" | "onVnodeBeforeUpdate" | "onVnodeUpdated" | "onVnodeBeforeUnmount" | "onVnodeUnmounted" | "onUpdate:modelValue" | "contentClass" | "activator" | "v-slot:activator" | "closeDelay" | "openDelay" | "contentProps" | "attach" | "onClick:outside" | ("absolute" | "location" | "origin" | "transition" | "zIndex" | "style" | "eager" | "disabled" | "persistent" | "modelValue" | "locationStrategy" | "scrollStrategy" | "activatorProps" | "openOnClick" | "openOnHover" | "openOnFocus" | "closeOnContentClick" | "closeOnBack" | "contained" | "noClickAnimation" | "scrim" | "_disableGlobalStack")>, `$${any}`> & {
|
|
1921
|
+
}> & {} & vue.ComponentCustomProperties & {}, "offset" | "key" | "height" | "width" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "opacity" | "target" | "class" | "theme" | "ref" | "onAfterEnter" | "onAfterLeave" | "onKeydown" | "$children" | "v-slots" | "v-slot:default" | "ref_for" | "ref_key" | "onVnodeBeforeMount" | "onVnodeMounted" | "onVnodeBeforeUpdate" | "onVnodeUpdated" | "onVnodeBeforeUnmount" | "onVnodeUnmounted" | "onUpdate:modelValue" | "contentClass" | "activator" | "v-slot:activator" | "closeDelay" | "openDelay" | "contentProps" | "attach" | "onClick:outside" | ("absolute" | "location" | "origin" | "transition" | "zIndex" | "style" | "eager" | "disabled" | "persistent" | "modelValue" | "locationStrategy" | "scrollStrategy" | "activatorProps" | "openOnClick" | "openOnHover" | "openOnFocus" | "closeOnContentClick" | "closeOnBack" | "contained" | "noClickAnimation" | "scrim" | "_disableGlobalStack")>, `$${any}`> & {
|
|
1907
1922
|
_allExposed: {
|
|
1908
1923
|
activatorEl: vue.Ref<HTMLElement | undefined>;
|
|
1909
1924
|
scrimEl: vue.Ref<HTMLElement | undefined>;
|
|
@@ -107,7 +107,7 @@ declare const VFab: {
|
|
|
107
107
|
position?: "fixed" | "absolute" | "relative" | "static" | "sticky" | undefined;
|
|
108
108
|
value?: any;
|
|
109
109
|
loading?: string | boolean | undefined;
|
|
110
|
-
text?: string | undefined;
|
|
110
|
+
text?: string | number | boolean | undefined;
|
|
111
111
|
class?: any;
|
|
112
112
|
theme?: string | undefined;
|
|
113
113
|
to?: string | vue_router.RouteLocationAsRelativeGeneric | vue_router.RouteLocationAsPathGeneric | undefined;
|
|
@@ -178,7 +178,7 @@ declare const VFab: {
|
|
|
178
178
|
position?: "fixed" | "absolute" | "relative" | "static" | "sticky" | undefined;
|
|
179
179
|
value?: any;
|
|
180
180
|
loading?: string | boolean | undefined;
|
|
181
|
-
text?: string | undefined;
|
|
181
|
+
text?: string | number | boolean | undefined;
|
|
182
182
|
class?: any;
|
|
183
183
|
theme?: string | undefined;
|
|
184
184
|
to?: string | vue_router.RouteLocationAsRelativeGeneric | vue_router.RouteLocationAsPathGeneric | undefined;
|
|
@@ -217,6 +217,7 @@ declare const VFab: {
|
|
|
217
217
|
component?: vue.Component;
|
|
218
218
|
});
|
|
219
219
|
style: vue.StyleValue;
|
|
220
|
+
text: string | number | boolean;
|
|
220
221
|
disabled: boolean;
|
|
221
222
|
size: string | number;
|
|
222
223
|
readonly: boolean;
|
|
@@ -288,7 +289,7 @@ declare const VFab: {
|
|
|
288
289
|
position?: "fixed" | "absolute" | "relative" | "static" | "sticky" | undefined;
|
|
289
290
|
value?: any;
|
|
290
291
|
loading?: string | boolean | undefined;
|
|
291
|
-
text?: string | undefined;
|
|
292
|
+
text?: string | number | boolean | undefined;
|
|
292
293
|
class?: any;
|
|
293
294
|
theme?: string | undefined;
|
|
294
295
|
to?: string | vue_router.RouteLocationAsRelativeGeneric | vue_router.RouteLocationAsPathGeneric | undefined;
|
|
@@ -327,6 +328,7 @@ declare const VFab: {
|
|
|
327
328
|
component?: vue.Component;
|
|
328
329
|
});
|
|
329
330
|
style: vue.StyleValue;
|
|
331
|
+
text: string | number | boolean;
|
|
330
332
|
disabled: boolean;
|
|
331
333
|
size: string | number;
|
|
332
334
|
readonly: boolean;
|
|
@@ -393,7 +395,7 @@ declare const VFab: {
|
|
|
393
395
|
position?: "fixed" | "absolute" | "relative" | "static" | "sticky" | undefined;
|
|
394
396
|
value?: any;
|
|
395
397
|
loading?: string | boolean | undefined;
|
|
396
|
-
text?: string | undefined;
|
|
398
|
+
text?: string | number | boolean | undefined;
|
|
397
399
|
class?: any;
|
|
398
400
|
theme?: string | undefined;
|
|
399
401
|
to?: string | vue_router.RouteLocationAsRelativeGeneric | vue_router.RouteLocationAsPathGeneric | undefined;
|
|
@@ -434,6 +436,7 @@ declare const VFab: {
|
|
|
434
436
|
component?: vue.Component;
|
|
435
437
|
});
|
|
436
438
|
style: vue.StyleValue;
|
|
439
|
+
text: string | number | boolean;
|
|
437
440
|
disabled: boolean;
|
|
438
441
|
size: string | number;
|
|
439
442
|
readonly: boolean;
|
|
@@ -518,7 +521,10 @@ declare const VFab: {
|
|
|
518
521
|
type: vue.PropType<vue.StyleValue>;
|
|
519
522
|
default: null;
|
|
520
523
|
};
|
|
521
|
-
text:
|
|
524
|
+
text: {
|
|
525
|
+
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
526
|
+
default: undefined;
|
|
527
|
+
};
|
|
522
528
|
disabled: BooleanConstructor;
|
|
523
529
|
size: {
|
|
524
530
|
type: (StringConstructor | NumberConstructor)[];
|
|
@@ -636,7 +642,10 @@ declare const VFab: {
|
|
|
636
642
|
type: vue.PropType<vue.StyleValue>;
|
|
637
643
|
default: null;
|
|
638
644
|
};
|
|
639
|
-
text:
|
|
645
|
+
text: {
|
|
646
|
+
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
647
|
+
default: undefined;
|
|
648
|
+
};
|
|
640
649
|
disabled: BooleanConstructor;
|
|
641
650
|
size: {
|
|
642
651
|
type: (StringConstructor | NumberConstructor)[];
|
|
@@ -16,7 +16,7 @@ import { useRtl } from "../../composables/locale.mjs";
|
|
|
16
16
|
import { makeRoundedProps, useRounded } from "../../composables/rounded.mjs";
|
|
17
17
|
import { makeThemeProps, provideTheme } from "../../composables/theme.mjs"; // Utilities
|
|
18
18
|
import { computed, ref, toRef, watch } from 'vue';
|
|
19
|
-
import { animate, convertToUnit, EventProp, genericComponent, getUid,
|
|
19
|
+
import { animate, convertToUnit, EventProp, genericComponent, getUid, nullifyTransforms, propsFactory, standardEasing, useRender } from "../../util/index.mjs"; // Types
|
|
20
20
|
const allowedVariants = ['underlined', 'outlined', 'filled', 'solo', 'solo-inverted', 'solo-filled', 'plain'];
|
|
21
21
|
export const makeVFieldProps = propsFactory({
|
|
22
22
|
appendInnerIcon: IconValue,
|
|
@@ -301,9 +301,4 @@ export const VField = genericComponent()({
|
|
|
301
301
|
};
|
|
302
302
|
}
|
|
303
303
|
});
|
|
304
|
-
// TODO: this is kinda slow, might be better to implicitly inherit props instead
|
|
305
|
-
export function filterFieldProps(attrs) {
|
|
306
|
-
const keys = Object.keys(VField.props).filter(k => !isOn(k) && k !== 'class' && k !== 'style');
|
|
307
|
-
return pick(attrs, keys);
|
|
308
|
-
}
|
|
309
304
|
//# sourceMappingURL=VField.mjs.map
|