@vuetify/nightly 3.4.0-beta.0-dev.2023-11-07 → 3.4.0-dev.2023-11-09
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/CHANGELOG.md +2 -7
- package/dist/json/attributes.json +1974 -1998
- package/dist/json/importMap.json +124 -124
- package/dist/json/tags.json +1 -7
- package/dist/json/web-types.json +3878 -3940
- package/dist/vuetify-labs.css +1253 -1240
- package/dist/vuetify-labs.d.ts +206 -298
- package/dist/vuetify-labs.esm.js +108 -84
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +108 -84
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +738 -725
- package/dist/vuetify.d.ts +240 -332
- package/dist/vuetify.esm.js +108 -84
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +108 -84
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +963 -961
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VAlert/index.d.mts +1 -1
- package/lib/components/VApp/index.d.mts +1 -1
- package/lib/components/VAppBar/VAppBar.mjs +1 -1
- package/lib/components/VAppBar/VAppBar.mjs.map +1 -1
- package/lib/components/VAppBar/index.d.mts +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.mjs +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
- package/lib/components/VAutocomplete/index.d.mts +1 -1
- package/lib/components/VAvatar/index.d.mts +1 -1
- package/lib/components/VBadge/VBadge.mjs +2 -2
- package/lib/components/VBadge/VBadge.mjs.map +1 -1
- package/lib/components/VBadge/index.d.mts +1 -1
- package/lib/components/VBanner/index.d.mts +1 -1
- package/lib/components/VBottomNavigation/index.d.mts +1 -1
- package/lib/components/VBottomSheet/VBottomSheet.mjs +1 -1
- package/lib/components/VBottomSheet/VBottomSheet.mjs.map +1 -1
- package/lib/components/VBottomSheet/index.d.mts +1 -1
- package/lib/components/VBreadcrumbs/index.d.mts +1 -1
- package/lib/components/VBtn/VBtn.css +0 -1
- package/lib/components/VBtn/_variables.scss +1 -1
- package/lib/components/VBtn/index.d.mts +1 -1
- package/lib/components/VBtnGroup/VBtnGroup.css +0 -1
- package/lib/components/VBtnGroup/index.d.mts +1 -1
- package/lib/components/VBtnToggle/VBtnToggle.mjs +1 -1
- package/lib/components/VBtnToggle/VBtnToggle.mjs.map +1 -1
- package/lib/components/VBtnToggle/index.d.mts +1 -1
- package/lib/components/VCard/index.d.mts +1 -1
- package/lib/components/VCarousel/VCarousel.mjs +1 -1
- package/lib/components/VCarousel/VCarousel.mjs.map +1 -1
- package/lib/components/VCarousel/VCarouselItem.mjs +2 -2
- package/lib/components/VCarousel/VCarouselItem.mjs.map +1 -1
- package/lib/components/VCarousel/index.d.mts +1 -1
- package/lib/components/VCheckbox/VCheckbox.mjs +2 -2
- package/lib/components/VCheckbox/VCheckbox.mjs.map +1 -1
- package/lib/components/VCheckbox/VCheckboxBtn.mjs +1 -1
- package/lib/components/VCheckbox/VCheckboxBtn.mjs.map +1 -1
- package/lib/components/VCheckbox/index.d.mts +1 -1
- package/lib/components/VChip/index.d.mts +1 -1
- package/lib/components/VChipGroup/index.d.mts +1 -1
- package/lib/components/VCode/index.d.mts +1 -1
- package/lib/components/VColorPicker/VColorPicker.mjs +1 -1
- package/lib/components/VColorPicker/VColorPicker.mjs.map +1 -1
- package/lib/components/VColorPicker/index.d.mts +1 -1
- package/lib/components/VCombobox/VCombobox.mjs +1 -1
- package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
- package/lib/components/VCombobox/index.d.mts +1 -1
- package/lib/components/VCounter/index.d.mts +1 -1
- package/lib/components/VDataIterator/index.d.mts +1 -1
- package/lib/components/VDataTable/VDataTable.css +6 -1
- package/lib/components/VDataTable/VDataTable.mjs +6 -5
- package/lib/components/VDataTable/VDataTable.mjs.map +1 -1
- package/lib/components/VDataTable/VDataTable.sass +5 -1
- package/lib/components/VDataTable/VDataTableHeaders.mjs +3 -2
- package/lib/components/VDataTable/VDataTableHeaders.mjs.map +1 -1
- package/lib/components/VDataTable/VDataTableServer.mjs +8 -7
- package/lib/components/VDataTable/VDataTableServer.mjs.map +1 -1
- package/lib/components/VDataTable/VDataTableVirtual.mjs +7 -6
- package/lib/components/VDataTable/VDataTableVirtual.mjs.map +1 -1
- package/lib/components/VDataTable/index.d.mts +189 -188
- package/lib/components/VDatePicker/VDatePicker.mjs +6 -6
- package/lib/components/VDatePicker/VDatePicker.mjs.map +1 -1
- package/lib/components/VDatePicker/index.d.mts +1 -1
- package/lib/components/VDefaultsProvider/index.d.mts +1 -1
- package/lib/components/VDialog/VDialog.mjs +1 -1
- package/lib/components/VDialog/VDialog.mjs.map +1 -1
- package/lib/components/VDialog/index.d.mts +1 -1
- package/lib/components/VDivider/index.d.mts +1 -1
- package/lib/components/VExpansionPanel/index.d.mts +1 -1
- package/lib/components/VField/index.d.mts +1 -1
- package/lib/components/VFileInput/VFileInput.mjs +3 -3
- package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
- package/lib/components/VFileInput/index.d.mts +1 -1
- package/lib/components/VFooter/index.d.mts +1 -1
- package/lib/components/VForm/index.d.mts +1 -1
- package/lib/components/VGrid/VSpacer.mjs +3 -0
- package/lib/components/VGrid/VSpacer.mjs.map +1 -1
- package/lib/components/VGrid/index.d.mts +1 -1
- package/lib/components/VHover/index.d.mts +1 -1
- package/lib/components/VIcon/index.d.mts +1 -1
- package/lib/components/VImg/VImg.mjs +1 -1
- package/lib/components/VImg/VImg.mjs.map +1 -1
- package/lib/components/VImg/index.d.mts +1 -1
- package/lib/components/VInfiniteScroll/index.d.mts +1 -1
- package/lib/components/VInput/index.d.mts +1 -1
- package/lib/components/VItemGroup/index.d.mts +1 -1
- package/lib/components/VKbd/index.d.mts +1 -1
- package/lib/components/VLabel/index.d.mts +1 -1
- package/lib/components/VLayout/index.d.mts +1 -1
- package/lib/components/VLazy/index.d.mts +1 -1
- package/lib/components/VList/VList.mjs +2 -2
- package/lib/components/VList/VList.mjs.map +1 -1
- package/lib/components/VList/VListChildren.mjs +1 -1
- package/lib/components/VList/VListChildren.mjs.map +1 -1
- package/lib/components/VList/index.d.mts +1 -1
- package/lib/components/VLocaleProvider/index.d.mts +1 -1
- package/lib/components/VMain/index.d.mts +1 -1
- package/lib/components/VMenu/VMenu.mjs +1 -1
- package/lib/components/VMenu/VMenu.mjs.map +1 -1
- package/lib/components/VMenu/index.d.mts +1 -1
- package/lib/components/VMessages/index.d.mts +1 -1
- package/lib/components/VNavigationDrawer/index.d.mts +1 -1
- package/lib/components/VOtpInput/index.d.mts +1 -1
- package/lib/components/VOverlay/index.d.mts +1 -1
- package/lib/components/VPagination/index.d.mts +1 -1
- package/lib/components/VParallax/index.d.mts +1 -1
- package/lib/components/VProgressCircular/index.d.mts +1 -1
- package/lib/components/VProgressLinear/index.d.mts +1 -1
- package/lib/components/VRadio/index.d.mts +1 -1
- package/lib/components/VRadioGroup/VRadioGroup.mjs +2 -2
- package/lib/components/VRadioGroup/VRadioGroup.mjs.map +1 -1
- package/lib/components/VRadioGroup/index.d.mts +1 -1
- package/lib/components/VRangeSlider/VRangeSlider.mjs +1 -1
- package/lib/components/VRangeSlider/VRangeSlider.mjs.map +1 -1
- package/lib/components/VRangeSlider/index.d.mts +1 -1
- package/lib/components/VRating/index.d.mts +1 -1
- package/lib/components/VResponsive/index.d.mts +1 -1
- package/lib/components/VSelect/VSelect.mjs +1 -1
- package/lib/components/VSelect/VSelect.mjs.map +1 -1
- package/lib/components/VSelect/index.d.mts +1 -1
- package/lib/components/VSelectionControl/index.d.mts +1 -1
- package/lib/components/VSelectionControlGroup/index.d.mts +1 -1
- package/lib/components/VSheet/index.d.mts +1 -1
- package/lib/components/VSkeletonLoader/index.d.mts +1 -1
- package/lib/components/VSlideGroup/index.d.mts +1 -1
- package/lib/components/VSlider/VSlider.mjs +1 -1
- package/lib/components/VSlider/VSlider.mjs.map +1 -1
- package/lib/components/VSlider/index.d.mts +1 -1
- package/lib/components/VSnackbar/VSnackbar.mjs +1 -1
- package/lib/components/VSnackbar/VSnackbar.mjs.map +1 -1
- package/lib/components/VSnackbar/index.d.mts +1 -1
- package/lib/components/VStepper/VStepper.mjs +1 -1
- package/lib/components/VStepper/VStepper.mjs.map +1 -1
- package/lib/components/VStepper/VStepperWindow.mjs +9 -7
- package/lib/components/VStepper/VStepperWindow.mjs.map +1 -1
- package/lib/components/VStepper/VStepperWindowItem.mjs +4 -2
- package/lib/components/VStepper/VStepperWindowItem.mjs.map +1 -1
- package/lib/components/VStepper/index.d.mts +19 -141
- package/lib/components/VSwitch/VSwitch.mjs +2 -2
- package/lib/components/VSwitch/VSwitch.mjs.map +1 -1
- package/lib/components/VSwitch/index.d.mts +1 -1
- package/lib/components/VSystemBar/index.d.mts +1 -1
- package/lib/components/VTable/VTable.css +12 -2
- package/lib/components/VTable/VTable.sass +7 -2
- package/lib/components/VTable/index.d.mts +1 -1
- package/lib/components/VTabs/VTab.mjs +1 -1
- package/lib/components/VTabs/VTab.mjs.map +1 -1
- package/lib/components/VTabs/VTabs.mjs +1 -1
- package/lib/components/VTabs/VTabs.mjs.map +1 -1
- package/lib/components/VTabs/index.d.mts +1 -1
- package/lib/components/VTextField/VTextField.mjs +3 -3
- package/lib/components/VTextField/VTextField.mjs.map +1 -1
- package/lib/components/VTextField/index.d.mts +1 -1
- package/lib/components/VTextarea/VTextarea.mjs +5 -3
- package/lib/components/VTextarea/VTextarea.mjs.map +1 -1
- package/lib/components/VTextarea/index.d.mts +1 -1
- package/lib/components/VThemeProvider/index.d.mts +1 -1
- package/lib/components/VTimeline/index.d.mts +1 -1
- package/lib/components/VToolbar/index.d.mts +1 -1
- package/lib/components/VTooltip/VTooltip.mjs +1 -1
- package/lib/components/VTooltip/VTooltip.mjs.map +1 -1
- package/lib/components/VTooltip/index.d.mts +1 -1
- package/lib/components/VValidation/index.d.mts +1 -1
- package/lib/components/VVirtualScroll/index.d.mts +1 -1
- package/lib/components/VWindow/index.d.mts +1 -1
- package/lib/components/index.d.mts +206 -298
- package/lib/components/transitions/index.d.mts +1 -1
- package/lib/composables/list-items.mjs +2 -2
- package/lib/composables/list-items.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/entry-bundler.mjs.map +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/framework.mjs.map +1 -1
- package/lib/index.d.mts +34 -34
- package/lib/labs/VConfirmEdit/index.d.mts +1 -1
- package/lib/labs/VPicker/VPicker.mjs +1 -1
- package/lib/labs/VPicker/VPicker.mjs.map +1 -1
- package/lib/labs/VPicker/index.d.mts +1 -1
- package/lib/labs/components.d.mts +1 -1
- package/lib/util/defineComponent.mjs +2 -2
- package/lib/util/defineComponent.mjs.map +1 -1
- package/lib/util/helpers.mjs +17 -3
- package/lib/util/helpers.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -2,7 +2,7 @@ import * as vue from 'vue';
|
|
|
2
2
|
import { ComponentPropsOptions, ExtractPropTypes, PropType } from 'vue';
|
|
3
3
|
|
|
4
4
|
interface FilterPropsOptions<PropsOptions extends Readonly<ComponentPropsOptions>, Props = ExtractPropTypes<PropsOptions>> {
|
|
5
|
-
filterProps<T extends Partial<Props>, U extends Exclude<keyof Props, Exclude<keyof Props, keyof T>>>(props: T):
|
|
5
|
+
filterProps<T extends Partial<Props>, U extends Exclude<keyof Props, Exclude<keyof Props, keyof T>>>(props: T): Partial<Pick<T, U>>;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
declare const VDialogTransition: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Utilities
|
|
2
2
|
import { computed } from 'vue';
|
|
3
|
-
import { deepEqual, getPropertyFromItem,
|
|
3
|
+
import { deepEqual, getPropertyFromItem, omit, propsFactory } from "../util/index.mjs"; // Types
|
|
4
4
|
// Composables
|
|
5
5
|
export const makeItemsProps = propsFactory({
|
|
6
6
|
items: {
|
|
@@ -33,7 +33,7 @@ export function transformItem(props, item) {
|
|
|
33
33
|
const title = getPropertyFromItem(item, props.itemTitle, item);
|
|
34
34
|
const value = getPropertyFromItem(item, props.itemValue, title);
|
|
35
35
|
const children = getPropertyFromItem(item, props.itemChildren);
|
|
36
|
-
const itemProps = props.itemProps === true ? typeof item === 'object' && item != null && !Array.isArray(item) ? 'children' in item ?
|
|
36
|
+
const itemProps = props.itemProps === true ? typeof item === 'object' && item != null && !Array.isArray(item) ? 'children' in item ? omit(item, ['children']) : item : undefined : getPropertyFromItem(item, props.itemProps);
|
|
37
37
|
const _props = {
|
|
38
38
|
title,
|
|
39
39
|
value,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-items.mjs","names":["computed","deepEqual","getPropertyFromItem","
|
|
1
|
+
{"version":3,"file":"list-items.mjs","names":["computed","deepEqual","getPropertyFromItem","omit","propsFactory","makeItemsProps","items","type","Array","default","itemTitle","String","Function","itemValue","itemChildren","Boolean","itemProps","returnObject","valueComparator","transformItem","props","item","title","value","children","isArray","undefined","_props","transformItems","raw","array","push","useItems","hasNullItem","some","transformIn","filter","v","map","find","transformOut","_ref","_ref2"],"sources":["../../src/composables/list-items.ts"],"sourcesContent":["// Utilities\nimport { computed } from 'vue'\nimport { deepEqual, getPropertyFromItem, omit, propsFactory } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { InternalItem } from '@/composables/filter'\nimport type { SelectItemKey } from '@/util'\n\nexport interface ListItem<T = any> extends InternalItem<T> {\n title: string\n props: {\n [key: string]: any\n title: string\n value: any\n }\n children?: ListItem<T>[]\n}\n\nexport interface ItemProps {\n items: any[]\n itemTitle: SelectItemKey\n itemValue: SelectItemKey\n itemChildren: SelectItemKey\n itemProps: SelectItemKey\n returnObject: boolean\n valueComparator: typeof deepEqual\n}\n\n// Composables\nexport const makeItemsProps = propsFactory({\n items: {\n type: Array as PropType<ItemProps['items']>,\n default: () => ([]),\n },\n itemTitle: {\n type: [String, Array, Function] as PropType<SelectItemKey>,\n default: 'title',\n },\n itemValue: {\n type: [String, Array, Function] as PropType<SelectItemKey>,\n default: 'value',\n },\n itemChildren: {\n type: [Boolean, String, Array, Function] as PropType<SelectItemKey>,\n default: 'children',\n },\n itemProps: {\n type: [Boolean, String, Array, Function] as PropType<SelectItemKey>,\n default: 'props',\n },\n returnObject: Boolean,\n valueComparator: {\n type: Function as PropType<typeof deepEqual>,\n default: deepEqual,\n },\n}, 'list-items')\n\nexport function transformItem (props: Omit<ItemProps, 'items'>, item: any): ListItem {\n const title = getPropertyFromItem(item, props.itemTitle, item)\n const value = getPropertyFromItem(item, props.itemValue, title)\n const children = getPropertyFromItem(item, props.itemChildren)\n const itemProps = props.itemProps === true\n ? typeof item === 'object' && item != null && !Array.isArray(item)\n ? 'children' in item\n ? omit(item, ['children'])\n : item\n : undefined\n : getPropertyFromItem(item, props.itemProps)\n\n const _props = {\n title,\n value,\n ...itemProps,\n }\n\n return {\n title: String(_props.title ?? ''),\n value: _props.value,\n props: _props,\n children: Array.isArray(children) ? transformItems(props, children) : undefined,\n raw: item,\n }\n}\n\nexport function transformItems (props: Omit<ItemProps, 'items'>, items: ItemProps['items']) {\n const array: ListItem[] = []\n\n for (const item of items) {\n array.push(transformItem(props, item))\n }\n\n return array\n}\n\nexport function useItems (props: ItemProps) {\n const items = computed(() => transformItems(props, props.items))\n const hasNullItem = computed(() => items.value.some(item => item.value === null))\n\n function transformIn (value: any[]): ListItem[] {\n if (!hasNullItem.value) {\n // When the model value is null, return an InternalItem\n // based on null only if null is one of the items\n value = value.filter(v => v !== null)\n }\n\n return value.map(v => {\n if (props.returnObject && typeof v === 'string') {\n // String model value means value is a custom input value from combobox\n // Don't look up existing items if the model value is a string\n return transformItem(props, v)\n }\n return items.value.find(item => props.valueComparator(v, item.value)) || transformItem(props, v)\n })\n }\n\n function transformOut (value: ListItem[]): any[] {\n return props.returnObject\n ? value.map(({ raw }) => raw)\n : value.map(({ value }) => value)\n }\n\n return { items, transformIn, transformOut }\n}\n"],"mappings":"AAA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AAY,EAAc;IAC9C,IAAI,CAACU,WAAW,CAACV,KAAK,EAAE;MACtB;MACA;MACAA,KAAK,GAAGA,KAAK,CAACa,MAAM,CAACC,CAAC,IAAIA,CAAC,KAAK,IAAI,CAAC;IACvC;IAEA,OAAOd,KAAK,CAACe,GAAG,CAACD,CAAC,IAAI;MACpB,IAAIjB,KAAK,CAACH,YAAY,IAAI,OAAOoB,CAAC,KAAK,QAAQ,EAAE;QAC/C;QACA;QACA,OAAOlB,aAAa,CAACC,KAAK,EAAEiB,CAAC,CAAC;MAChC;MACA,OAAO/B,KAAK,CAACiB,KAAK,CAACgB,IAAI,CAAClB,IAAI,IAAID,KAAK,CAACF,eAAe,CAACmB,CAAC,EAAEhB,IAAI,CAACE,KAAK,CAAC,CAAC,IAAIJ,aAAa,CAACC,KAAK,EAAEiB,CAAC,CAAC;IAClG,CAAC,CAAC;EACJ;EAEA,SAASG,YAAYA,CAAEjB,KAAiB,EAAS;IAC/C,OAAOH,KAAK,CAACH,YAAY,GACrBM,KAAK,CAACe,GAAG,CAACG,IAAA;MAAA,IAAC;QAAEZ;MAAI,CAAC,GAAAY,IAAA;MAAA,OAAKZ,GAAG;IAAA,EAAC,GAC3BN,KAAK,CAACe,GAAG,CAACI,KAAA;MAAA,IAAC;QAAEnB;MAAM,CAAC,GAAAmB,KAAA;MAAA,OAAKnB,KAAK;IAAA,EAAC;EACrC;EAEA,OAAO;IAAEjB,KAAK;IAAE6B,WAAW;IAAEK;EAAa,CAAC;AAC7C"}
|
package/lib/entry-bundler.mjs
CHANGED
|
@@ -15,7 +15,7 @@ export const createVuetify = function () {
|
|
|
15
15
|
...options
|
|
16
16
|
});
|
|
17
17
|
};
|
|
18
|
-
export const version = "3.4.0-
|
|
18
|
+
export const version = "3.4.0-dev.2023-11-09";
|
|
19
19
|
createVuetify.version = version;
|
|
20
20
|
export { components, directives };
|
|
21
21
|
export * from "./composables/index.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entry-bundler.mjs","names":["components","directives","createVuetify","_createVuetify","options","arguments","length","undefined","version"],"sources":["../src/entry-bundler.ts"],"sourcesContent":["/* eslint-disable local-rules/sort-imports */\n\n// Styles\nimport './styles/main.sass'\n\n// Components\nimport * as components from './components'\nimport * as directives from './directives'\nimport { createVuetify as _createVuetify } from './framework'\n\n// Types\nimport type { VuetifyOptions } from './framework'\n\nexport const createVuetify = (options: VuetifyOptions = {}) => {\n return _createVuetify({ components, directives, ...options })\n}\n\nexport const version = __VUETIFY_VERSION__\ncreateVuetify.version = version\n\nexport {\n components,\n directives,\n}\nexport * from './composables'\n"],"mappings":"AAAA;;AAEA;AACA;;AAEA;AAAA,OACO,KAAKA,UAAU;AAAA,OACf,KAAKC,UAAU;AAAA,SACbC,aAAa,IAAIC,cAAc,2BAExC;AAGA,OAAO,MAAMD,aAAa,GAAG,SAAAA,CAAA,EAAkC;EAAA,IAAjCE,OAAuB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EACxD,OAAOF,cAAc,CAAC;IAAEH,UAAU;IAAEC,UAAU;IAAE,GAAGG;EAAQ,CAAC,CAAC;AAC/D,CAAC;AAED,OAAO,MAAMI,OAAO,
|
|
1
|
+
{"version":3,"file":"entry-bundler.mjs","names":["components","directives","createVuetify","_createVuetify","options","arguments","length","undefined","version"],"sources":["../src/entry-bundler.ts"],"sourcesContent":["/* eslint-disable local-rules/sort-imports */\n\n// Styles\nimport './styles/main.sass'\n\n// Components\nimport * as components from './components'\nimport * as directives from './directives'\nimport { createVuetify as _createVuetify } from './framework'\n\n// Types\nimport type { VuetifyOptions } from './framework'\n\nexport const createVuetify = (options: VuetifyOptions = {}) => {\n return _createVuetify({ components, directives, ...options })\n}\n\nexport const version = __VUETIFY_VERSION__\ncreateVuetify.version = version\n\nexport {\n components,\n directives,\n}\nexport * from './composables'\n"],"mappings":"AAAA;;AAEA;AACA;;AAEA;AAAA,OACO,KAAKA,UAAU;AAAA,OACf,KAAKC,UAAU;AAAA,SACbC,aAAa,IAAIC,cAAc,2BAExC;AAGA,OAAO,MAAMD,aAAa,GAAG,SAAAA,CAAA,EAAkC;EAAA,IAAjCE,OAAuB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EACxD,OAAOF,cAAc,CAAC;IAAEH,UAAU;IAAEC,UAAU;IAAE,GAAGG;EAAQ,CAAC,CAAC;AAC/D,CAAC;AAED,OAAO,MAAMI,OAAO,yBAAsB;AAC1CN,aAAa,CAACM,OAAO,GAAGA,OAAO;AAE/B,SACER,UAAU,EACVC,UAAU;AACX"}
|
package/lib/framework.mjs
CHANGED
package/lib/framework.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"framework.mjs","names":["createDate","DateAdapterSymbol","createDefaults","DefaultsSymbol","createDisplay","DisplaySymbol","createIcons","IconSymbol","createLocale","LocaleSymbol","createTheme","ThemeSymbol","nextTick","reactive","defineComponent","getUid","IN_BROWSER","mergeDeep","createVuetify","vuetify","arguments","length","undefined","blueprint","rest","options","aliases","components","directives","defaults","display","ssr","theme","icons","locale","date","install","app","key","directive","component","name","aliasName","provide","$nuxt","hook","update","mount","vm","reset","__VUE_OPTIONS_API__","mixin","computed","$vuetify","inject","call","version","$","provides","parent","vnode","appContext"],"sources":["../src/framework.ts"],"sourcesContent":["// Composables\nimport { createDate, DateAdapterSymbol } from '@/composables/date'\nimport { createDefaults, DefaultsSymbol } from '@/composables/defaults'\nimport { createDisplay, DisplaySymbol } from '@/composables/display'\nimport { createIcons, IconSymbol } from '@/composables/icons'\nimport { createLocale, LocaleSymbol } from '@/composables/locale'\nimport { createTheme, ThemeSymbol } from '@/composables/theme'\n\n// Utilities\nimport { nextTick, reactive } from 'vue'\nimport { defineComponent, getUid, IN_BROWSER, mergeDeep } from '@/util'\n\n// Types\nimport type { App, ComponentPublicInstance, InjectionKey } from 'vue'\nimport type { DateOptions } from '@/composables/date'\nimport type { DefaultsOptions } from '@/composables/defaults'\nimport type { DisplayOptions, SSROptions } from '@/composables/display'\nimport type { IconOptions } from '@/composables/icons'\nimport type { LocaleOptions, RtlOptions } from '@/composables/locale'\nimport type { ThemeOptions } from '@/composables/theme'\nexport * from './composables'\nexport type { DateOptions, DateInstance } from '@/composables/date'\n\nexport interface VuetifyOptions {\n aliases?: Record<string, any>\n blueprint?: Blueprint\n components?: Record<string, any>\n date?: DateOptions\n directives?: Record<string, any>\n defaults?: DefaultsOptions\n display?: DisplayOptions\n theme?: ThemeOptions\n icons?: IconOptions\n locale?: LocaleOptions & RtlOptions\n ssr?: SSROptions\n}\n\nexport interface Blueprint extends Omit<VuetifyOptions, 'blueprint'> {}\n\nexport function createVuetify (vuetify: VuetifyOptions = {}) {\n const { blueprint, ...rest } = vuetify\n const options: VuetifyOptions = mergeDeep(blueprint, rest)\n const {\n aliases = {},\n components = {},\n directives = {},\n } = options\n\n const defaults = createDefaults(options.defaults)\n const display = createDisplay(options.display, options.ssr)\n const theme = createTheme(options.theme)\n const icons = createIcons(options.icons)\n const locale = createLocale(options.locale)\n const date = createDate(options.date, locale)\n\n const install = (app: App) => {\n for (const key in directives) {\n app.directive(key, directives[key])\n }\n\n for (const key in components) {\n app.component(key, components[key])\n }\n\n for (const key in aliases) {\n app.component(key, defineComponent({\n ...aliases[key],\n name: key,\n aliasName: aliases[key].name,\n }))\n }\n\n theme.install(app)\n\n app.provide(DefaultsSymbol, defaults)\n app.provide(DisplaySymbol, display)\n app.provide(ThemeSymbol, theme)\n app.provide(IconSymbol, icons)\n app.provide(LocaleSymbol, locale)\n app.provide(DateAdapterSymbol, date)\n\n if (IN_BROWSER && options.ssr) {\n if (app.$nuxt) {\n app.$nuxt.hook('app:suspense:resolve', () => {\n display.update()\n })\n } else {\n const { mount } = app\n app.mount = (...args) => {\n const vm = mount(...args)\n nextTick(() => display.update())\n app.mount = mount\n return vm\n }\n }\n }\n\n getUid.reset()\n\n if (typeof __VUE_OPTIONS_API__ !== 'boolean' || __VUE_OPTIONS_API__) {\n app.mixin({\n computed: {\n $vuetify () {\n return reactive({\n defaults: inject.call(this, DefaultsSymbol),\n display: inject.call(this, DisplaySymbol),\n theme: inject.call(this, ThemeSymbol),\n icons: inject.call(this, IconSymbol),\n locale: inject.call(this, LocaleSymbol),\n date: inject.call(this, DateAdapterSymbol),\n })\n },\n },\n })\n }\n }\n\n return {\n install,\n defaults,\n display,\n theme,\n icons,\n locale,\n date,\n }\n}\n\nexport const version = __VUETIFY_VERSION__\ncreateVuetify.version = version\n\n// Vue's inject() can only be used in setup\nfunction inject (this: ComponentPublicInstance, key: InjectionKey<any> | string) {\n const vm = this.$\n\n const provides = vm.parent?.provides ?? vm.vnode.appContext?.provides\n\n if (provides && (key as any) in provides) {\n return provides[(key as string)]\n }\n}\n"],"mappings":"AAAA;AAAA,SACSA,UAAU,EAAEC,iBAAiB;AAAA,SAC7BC,cAAc,EAAEC,cAAc;AAAA,SAC9BC,aAAa,EAAEC,aAAa;AAAA,SAC5BC,WAAW,EAAEC,UAAU;AAAA,SACvBC,YAAY,EAAEC,YAAY;AAAA,SAC1BC,WAAW,EAAEC,WAAW,mCAEjC;AACA,SAASC,QAAQ,EAAEC,QAAQ,QAAQ,KAAK;AAAA,SAC/BC,eAAe,EAAEC,MAAM,EAAEC,UAAU,EAAEC,SAAS,4BAEvD;AAAA;AA2BA,OAAO,SAASC,aAAaA,CAAA,EAAgC;EAAA,IAA9BC,OAAuB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EACzD,MAAM;IAAEG,SAAS;IAAE,GAAGC;EAAK,CAAC,GAAGL,OAAO;EACtC,MAAMM,OAAuB,GAAGR,SAAS,CAACM,SAAS,EAAEC,IAAI,CAAC;EAC1D,MAAM;IACJE,OAAO,GAAG,CAAC,CAAC;IACZC,UAAU,GAAG,CAAC,CAA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AC,IAAI,EAAE9C,YAAY,CAAC;cACvC0B,IAAI,EAAEmB,MAAM,CAACC,IAAI,CAAC,IAAI,EAAEtD,iBAAiB;YAC3C,CAAC,CAAC;UACJ;QACF;MACF,CAAC,CAAC;IACJ;EACF,CAAC;EAED,OAAO;IACLmC,OAAO;IACPP,QAAQ;IACRC,OAAO;IACPE,KAAK;IACLC,KAAK;IACLC,MAAM;IACNC;EACF,CAAC;AACH;AAEA,OAAO,MAAMqB,OAAO,
|
|
1
|
+
{"version":3,"file":"framework.mjs","names":["createDate","DateAdapterSymbol","createDefaults","DefaultsSymbol","createDisplay","DisplaySymbol","createIcons","IconSymbol","createLocale","LocaleSymbol","createTheme","ThemeSymbol","nextTick","reactive","defineComponent","getUid","IN_BROWSER","mergeDeep","createVuetify","vuetify","arguments","length","undefined","blueprint","rest","options","aliases","components","directives","defaults","display","ssr","theme","icons","locale","date","install","app","key","directive","component","name","aliasName","provide","$nuxt","hook","update","mount","vm","reset","__VUE_OPTIONS_API__","mixin","computed","$vuetify","inject","call","version","$","provides","parent","vnode","appContext"],"sources":["../src/framework.ts"],"sourcesContent":["// Composables\nimport { createDate, DateAdapterSymbol } from '@/composables/date'\nimport { createDefaults, DefaultsSymbol } from '@/composables/defaults'\nimport { createDisplay, DisplaySymbol } from '@/composables/display'\nimport { createIcons, IconSymbol } from '@/composables/icons'\nimport { createLocale, LocaleSymbol } from '@/composables/locale'\nimport { createTheme, ThemeSymbol } from '@/composables/theme'\n\n// Utilities\nimport { nextTick, reactive } from 'vue'\nimport { defineComponent, getUid, IN_BROWSER, mergeDeep } from '@/util'\n\n// Types\nimport type { App, ComponentPublicInstance, InjectionKey } from 'vue'\nimport type { DateOptions } from '@/composables/date'\nimport type { DefaultsOptions } from '@/composables/defaults'\nimport type { DisplayOptions, SSROptions } from '@/composables/display'\nimport type { IconOptions } from '@/composables/icons'\nimport type { LocaleOptions, RtlOptions } from '@/composables/locale'\nimport type { ThemeOptions } from '@/composables/theme'\nexport * from './composables'\nexport type { DateOptions, DateInstance } from '@/composables/date'\n\nexport interface VuetifyOptions {\n aliases?: Record<string, any>\n blueprint?: Blueprint\n components?: Record<string, any>\n date?: DateOptions\n directives?: Record<string, any>\n defaults?: DefaultsOptions\n display?: DisplayOptions\n theme?: ThemeOptions\n icons?: IconOptions\n locale?: LocaleOptions & RtlOptions\n ssr?: SSROptions\n}\n\nexport interface Blueprint extends Omit<VuetifyOptions, 'blueprint'> {}\n\nexport function createVuetify (vuetify: VuetifyOptions = {}) {\n const { blueprint, ...rest } = vuetify\n const options: VuetifyOptions = mergeDeep(blueprint, rest)\n const {\n aliases = {},\n components = {},\n directives = {},\n } = options\n\n const defaults = createDefaults(options.defaults)\n const display = createDisplay(options.display, options.ssr)\n const theme = createTheme(options.theme)\n const icons = createIcons(options.icons)\n const locale = createLocale(options.locale)\n const date = createDate(options.date, locale)\n\n const install = (app: App) => {\n for (const key in directives) {\n app.directive(key, directives[key])\n }\n\n for (const key in components) {\n app.component(key, components[key])\n }\n\n for (const key in aliases) {\n app.component(key, defineComponent({\n ...aliases[key],\n name: key,\n aliasName: aliases[key].name,\n }))\n }\n\n theme.install(app)\n\n app.provide(DefaultsSymbol, defaults)\n app.provide(DisplaySymbol, display)\n app.provide(ThemeSymbol, theme)\n app.provide(IconSymbol, icons)\n app.provide(LocaleSymbol, locale)\n app.provide(DateAdapterSymbol, date)\n\n if (IN_BROWSER && options.ssr) {\n if (app.$nuxt) {\n app.$nuxt.hook('app:suspense:resolve', () => {\n display.update()\n })\n } else {\n const { mount } = app\n app.mount = (...args) => {\n const vm = mount(...args)\n nextTick(() => display.update())\n app.mount = mount\n return vm\n }\n }\n }\n\n getUid.reset()\n\n if (typeof __VUE_OPTIONS_API__ !== 'boolean' || __VUE_OPTIONS_API__) {\n app.mixin({\n computed: {\n $vuetify () {\n return reactive({\n defaults: inject.call(this, DefaultsSymbol),\n display: inject.call(this, DisplaySymbol),\n theme: inject.call(this, ThemeSymbol),\n icons: inject.call(this, IconSymbol),\n locale: inject.call(this, LocaleSymbol),\n date: inject.call(this, DateAdapterSymbol),\n })\n },\n },\n })\n }\n }\n\n return {\n install,\n defaults,\n display,\n theme,\n icons,\n locale,\n date,\n }\n}\n\nexport const version = __VUETIFY_VERSION__\ncreateVuetify.version = version\n\n// Vue's inject() can only be used in setup\nfunction inject (this: ComponentPublicInstance, key: InjectionKey<any> | string) {\n const vm = this.$\n\n const provides = vm.parent?.provides ?? vm.vnode.appContext?.provides\n\n if (provides && (key as any) in provides) {\n return provides[(key as string)]\n }\n}\n"],"mappings":"AAAA;AAAA,SACSA,UAAU,EAAEC,iBAAiB;AAAA,SAC7BC,cAAc,EAAEC,cAAc;AAAA,SAC9BC,aAAa,EAAEC,aAAa;AAAA,SAC5BC,WAAW,EAAEC,UAAU;AAAA,SACvBC,YAAY,EAAEC,YAAY;AAAA,SAC1BC,WAAW,EAAEC,WAAW,mCAEjC;AACA,SAASC,QAAQ,EAAEC,QAAQ,QAAQ,KAAK;AAAA,SAC/BC,eAAe,EAAEC,MAAM,EAAEC,UAAU,EAAEC,SAAS,4BAEvD;AAAA;AA2BA,OAAO,SAASC,aAAaA,CAAA,EAAgC;EAAA,IAA9BC,OAAuB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EACzD,MAAM;IAAEG,SAAS;IAAE,GAAGC;EAAK,CAAC,GAAGL,OAAO;EACtC,MAAMM,OAAuB,GAAGR,SAAS,CAACM,SAAS,EAAEC,IAAI,CAAC;EAC1D,MAAM;IACJE,OAAO,GAAG,CAAC,CAAC;IACZC,UAAU,GAAG,CAAC,CAAC;IACfC,UAAU,GAAG,CAAC;EAChB,CAAC,GAAGH,OAAO;EAEX,MAAMI,QAAQ,GAAG3B,cAAc,CAACuB,OAAO,CAACI,QAAQ,CAAC;EACjD,MAAMC,OAAO,GAAG1B,aAAa,CAACqB,OAAO,CAACK,OAAO,EAAEL,OAAO,CAACM,GAAG,CA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,OAAO;IACPE,KAAK;IACLC,KAAK;IACLC,MAAM;IACNC;EACF,CAAC;AACH;AAEA,OAAO,MAAMqB,OAAO,yBAAsB;AAC1CtC,aAAa,CAACsC,OAAO,GAAGA,OAAO;;AAE/B;AACA,SAASF,MAAMA,CAAiChB,GAA+B,EAAE;EAC/E,MAAMU,EAAE,GAAG,IAAI,CAACS,CAAC;EAEjB,MAAMC,QAAQ,GAAGV,EAAE,CAACW,MAAM,EAAED,QAAQ,IAAIV,EAAE,CAACY,KAAK,CAACC,UAAU,EAAEH,QAAQ;EAErE,IAAIA,QAAQ,IAAKpB,GAAG,IAAYoB,QAAQ,EAAE;IACxC,OAAOA,QAAQ,CAAEpB,GAAG,CAAY;EAClC;AACF"}
|
package/lib/index.d.mts
CHANGED
|
@@ -437,62 +437,56 @@ declare module '@vue/runtime-core' {
|
|
|
437
437
|
}
|
|
438
438
|
|
|
439
439
|
export interface GlobalComponents {
|
|
440
|
+
VApp: typeof import('vuetify/components')['VApp']
|
|
441
|
+
VAlert: typeof import('vuetify/components')['VAlert']
|
|
442
|
+
VAlertTitle: typeof import('vuetify/components')['VAlertTitle']
|
|
440
443
|
VAppBar: typeof import('vuetify/components')['VAppBar']
|
|
441
444
|
VAppBarNavIcon: typeof import('vuetify/components')['VAppBarNavIcon']
|
|
442
445
|
VAppBarTitle: typeof import('vuetify/components')['VAppBarTitle']
|
|
443
|
-
VApp: typeof import('vuetify/components')['VApp']
|
|
444
446
|
VAutocomplete: typeof import('vuetify/components')['VAutocomplete']
|
|
445
|
-
VAlert: typeof import('vuetify/components')['VAlert']
|
|
446
|
-
VAlertTitle: typeof import('vuetify/components')['VAlertTitle']
|
|
447
447
|
VAvatar: typeof import('vuetify/components')['VAvatar']
|
|
448
|
-
VBanner: typeof import('vuetify/components')['VBanner']
|
|
449
|
-
VBannerActions: typeof import('vuetify/components')['VBannerActions']
|
|
450
|
-
VBannerText: typeof import('vuetify/components')['VBannerText']
|
|
451
448
|
VBadge: typeof import('vuetify/components')['VBadge']
|
|
452
449
|
VBottomNavigation: typeof import('vuetify/components')['VBottomNavigation']
|
|
453
450
|
VBottomSheet: typeof import('vuetify/components')['VBottomSheet']
|
|
454
451
|
VBreadcrumbs: typeof import('vuetify/components')['VBreadcrumbs']
|
|
455
452
|
VBreadcrumbsItem: typeof import('vuetify/components')['VBreadcrumbsItem']
|
|
456
453
|
VBreadcrumbsDivider: typeof import('vuetify/components')['VBreadcrumbsDivider']
|
|
454
|
+
VBanner: typeof import('vuetify/components')['VBanner']
|
|
455
|
+
VBannerActions: typeof import('vuetify/components')['VBannerActions']
|
|
456
|
+
VBannerText: typeof import('vuetify/components')['VBannerText']
|
|
457
457
|
VBtn: typeof import('vuetify/components')['VBtn']
|
|
458
458
|
VBtnGroup: typeof import('vuetify/components')['VBtnGroup']
|
|
459
459
|
VBtnToggle: typeof import('vuetify/components')['VBtnToggle']
|
|
460
|
-
VCarousel: typeof import('vuetify/components')['VCarousel']
|
|
461
|
-
VCarouselItem: typeof import('vuetify/components')['VCarouselItem']
|
|
462
460
|
VCard: typeof import('vuetify/components')['VCard']
|
|
463
461
|
VCardActions: typeof import('vuetify/components')['VCardActions']
|
|
464
462
|
VCardItem: typeof import('vuetify/components')['VCardItem']
|
|
465
463
|
VCardSubtitle: typeof import('vuetify/components')['VCardSubtitle']
|
|
466
464
|
VCardText: typeof import('vuetify/components')['VCardText']
|
|
467
465
|
VCardTitle: typeof import('vuetify/components')['VCardTitle']
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
VChipGroup: typeof import('vuetify/components')['VChipGroup']
|
|
466
|
+
VCarousel: typeof import('vuetify/components')['VCarousel']
|
|
467
|
+
VCarouselItem: typeof import('vuetify/components')['VCarouselItem']
|
|
471
468
|
VCheckbox: typeof import('vuetify/components')['VCheckbox']
|
|
472
469
|
VCheckboxBtn: typeof import('vuetify/components')['VCheckboxBtn']
|
|
473
|
-
|
|
470
|
+
VChip: typeof import('vuetify/components')['VChip']
|
|
471
|
+
VChipGroup: typeof import('vuetify/components')['VChipGroup']
|
|
472
|
+
VCode: typeof import('vuetify/components')['VCode']
|
|
474
473
|
VColorPicker: typeof import('vuetify/components')['VColorPicker']
|
|
474
|
+
VCombobox: typeof import('vuetify/components')['VCombobox']
|
|
475
|
+
VCounter: typeof import('vuetify/components')['VCounter']
|
|
475
476
|
VDataTable: typeof import('vuetify/components')['VDataTable']
|
|
476
477
|
VDataTableFooter: typeof import('vuetify/components')['VDataTableFooter']
|
|
477
478
|
VDataTableRows: typeof import('vuetify/components')['VDataTableRows']
|
|
478
479
|
VDataTableRow: typeof import('vuetify/components')['VDataTableRow']
|
|
479
480
|
VDataTableVirtual: typeof import('vuetify/components')['VDataTableVirtual']
|
|
480
481
|
VDataTableServer: typeof import('vuetify/components')['VDataTableServer']
|
|
481
|
-
VCounter: typeof import('vuetify/components')['VCounter']
|
|
482
|
-
VDatePicker: typeof import('vuetify/components')['VDatePicker']
|
|
483
|
-
VDatePickerControls: typeof import('vuetify/components')['VDatePickerControls']
|
|
484
|
-
VDatePickerHeader: typeof import('vuetify/components')['VDatePickerHeader']
|
|
485
|
-
VDatePickerMonth: typeof import('vuetify/components')['VDatePickerMonth']
|
|
486
|
-
VDatePickerMonths: typeof import('vuetify/components')['VDatePickerMonths']
|
|
487
|
-
VDatePickerYears: typeof import('vuetify/components')['VDatePickerYears']
|
|
488
|
-
VDivider: typeof import('vuetify/components')['VDivider']
|
|
489
482
|
VDialog: typeof import('vuetify/components')['VDialog']
|
|
490
|
-
|
|
491
|
-
VFieldLabel: typeof import('vuetify/components')['VFieldLabel']
|
|
483
|
+
VDivider: typeof import('vuetify/components')['VDivider']
|
|
492
484
|
VExpansionPanels: typeof import('vuetify/components')['VExpansionPanels']
|
|
493
485
|
VExpansionPanel: typeof import('vuetify/components')['VExpansionPanel']
|
|
494
486
|
VExpansionPanelText: typeof import('vuetify/components')['VExpansionPanelText']
|
|
495
487
|
VExpansionPanelTitle: typeof import('vuetify/components')['VExpansionPanelTitle']
|
|
488
|
+
VField: typeof import('vuetify/components')['VField']
|
|
489
|
+
VFieldLabel: typeof import('vuetify/components')['VFieldLabel']
|
|
496
490
|
VFileInput: typeof import('vuetify/components')['VFileInput']
|
|
497
491
|
VFooter: typeof import('vuetify/components')['VFooter']
|
|
498
492
|
VIcon: typeof import('vuetify/components')['VIcon']
|
|
@@ -506,7 +500,6 @@ declare module '@vue/runtime-core' {
|
|
|
506
500
|
VItemGroup: typeof import('vuetify/components')['VItemGroup']
|
|
507
501
|
VItem: typeof import('vuetify/components')['VItem']
|
|
508
502
|
VKbd: typeof import('vuetify/components')['VKbd']
|
|
509
|
-
VMain: typeof import('vuetify/components')['VMain']
|
|
510
503
|
VLabel: typeof import('vuetify/components')['VLabel']
|
|
511
504
|
VList: typeof import('vuetify/components')['VList']
|
|
512
505
|
VListGroup: typeof import('vuetify/components')['VListGroup']
|
|
@@ -517,24 +510,25 @@ declare module '@vue/runtime-core' {
|
|
|
517
510
|
VListItemSubtitle: typeof import('vuetify/components')['VListItemSubtitle']
|
|
518
511
|
VListItemTitle: typeof import('vuetify/components')['VListItemTitle']
|
|
519
512
|
VListSubheader: typeof import('vuetify/components')['VListSubheader']
|
|
513
|
+
VMain: typeof import('vuetify/components')['VMain']
|
|
520
514
|
VMenu: typeof import('vuetify/components')['VMenu']
|
|
521
515
|
VMessages: typeof import('vuetify/components')['VMessages']
|
|
522
516
|
VNavigationDrawer: typeof import('vuetify/components')['VNavigationDrawer']
|
|
523
517
|
VOtpInput: typeof import('vuetify/components')['VOtpInput']
|
|
524
|
-
VPagination: typeof import('vuetify/components')['VPagination']
|
|
525
518
|
VOverlay: typeof import('vuetify/components')['VOverlay']
|
|
519
|
+
VPagination: typeof import('vuetify/components')['VPagination']
|
|
526
520
|
VProgressCircular: typeof import('vuetify/components')['VProgressCircular']
|
|
527
|
-
VRadioGroup: typeof import('vuetify/components')['VRadioGroup']
|
|
528
521
|
VProgressLinear: typeof import('vuetify/components')['VProgressLinear']
|
|
522
|
+
VRadioGroup: typeof import('vuetify/components')['VRadioGroup']
|
|
529
523
|
VRating: typeof import('vuetify/components')['VRating']
|
|
530
524
|
VSelect: typeof import('vuetify/components')['VSelect']
|
|
531
525
|
VSelectionControl: typeof import('vuetify/components')['VSelectionControl']
|
|
532
526
|
VSelectionControlGroup: typeof import('vuetify/components')['VSelectionControlGroup']
|
|
533
527
|
VSheet: typeof import('vuetify/components')['VSheet']
|
|
534
|
-
VSlider: typeof import('vuetify/components')['VSlider']
|
|
535
528
|
VSkeletonLoader: typeof import('vuetify/components')['VSkeletonLoader']
|
|
536
529
|
VSlideGroup: typeof import('vuetify/components')['VSlideGroup']
|
|
537
530
|
VSlideGroupItem: typeof import('vuetify/components')['VSlideGroupItem']
|
|
531
|
+
VSlider: typeof import('vuetify/components')['VSlider']
|
|
538
532
|
VSnackbar: typeof import('vuetify/components')['VSnackbar']
|
|
539
533
|
VStepper: typeof import('vuetify/components')['VStepper']
|
|
540
534
|
VStepperActions: typeof import('vuetify/components')['VStepperActions']
|
|
@@ -543,39 +537,39 @@ declare module '@vue/runtime-core' {
|
|
|
543
537
|
VStepperWindow: typeof import('vuetify/components')['VStepperWindow']
|
|
544
538
|
VStepperWindowItem: typeof import('vuetify/components')['VStepperWindowItem']
|
|
545
539
|
VSwitch: typeof import('vuetify/components')['VSwitch']
|
|
540
|
+
VSystemBar: typeof import('vuetify/components')['VSystemBar']
|
|
541
|
+
VTabs: typeof import('vuetify/components')['VTabs']
|
|
542
|
+
VTab: typeof import('vuetify/components')['VTab']
|
|
546
543
|
VTable: typeof import('vuetify/components')['VTable']
|
|
547
544
|
VTextarea: typeof import('vuetify/components')['VTextarea']
|
|
545
|
+
VTextField: typeof import('vuetify/components')['VTextField']
|
|
548
546
|
VTimeline: typeof import('vuetify/components')['VTimeline']
|
|
549
547
|
VTimelineItem: typeof import('vuetify/components')['VTimelineItem']
|
|
550
|
-
VTabs: typeof import('vuetify/components')['VTabs']
|
|
551
|
-
VTab: typeof import('vuetify/components')['VTab']
|
|
552
|
-
VSystemBar: typeof import('vuetify/components')['VSystemBar']
|
|
553
|
-
VTooltip: typeof import('vuetify/components')['VTooltip']
|
|
554
|
-
VTextField: typeof import('vuetify/components')['VTextField']
|
|
555
548
|
VToolbar: typeof import('vuetify/components')['VToolbar']
|
|
556
549
|
VToolbarTitle: typeof import('vuetify/components')['VToolbarTitle']
|
|
557
550
|
VToolbarItems: typeof import('vuetify/components')['VToolbarItems']
|
|
551
|
+
VTooltip: typeof import('vuetify/components')['VTooltip']
|
|
558
552
|
VWindow: typeof import('vuetify/components')['VWindow']
|
|
559
553
|
VWindowItem: typeof import('vuetify/components')['VWindowItem']
|
|
560
554
|
VDataIterator: typeof import('vuetify/components')['VDataIterator']
|
|
561
555
|
VDefaultsProvider: typeof import('vuetify/components')['VDefaultsProvider']
|
|
556
|
+
VForm: typeof import('vuetify/components')['VForm']
|
|
562
557
|
VContainer: typeof import('vuetify/components')['VContainer']
|
|
563
558
|
VCol: typeof import('vuetify/components')['VCol']
|
|
564
559
|
VRow: typeof import('vuetify/components')['VRow']
|
|
565
560
|
VSpacer: typeof import('vuetify/components')['VSpacer']
|
|
566
|
-
VForm: typeof import('vuetify/components')['VForm']
|
|
567
561
|
VHover: typeof import('vuetify/components')['VHover']
|
|
568
562
|
VLayout: typeof import('vuetify/components')['VLayout']
|
|
569
563
|
VLayoutItem: typeof import('vuetify/components')['VLayoutItem']
|
|
570
564
|
VLazy: typeof import('vuetify/components')['VLazy']
|
|
571
565
|
VLocaleProvider: typeof import('vuetify/components')['VLocaleProvider']
|
|
572
566
|
VNoSsr: typeof import('vuetify/components')['VNoSsr']
|
|
573
|
-
VRadio: typeof import('vuetify/components')['VRadio']
|
|
574
567
|
VParallax: typeof import('vuetify/components')['VParallax']
|
|
568
|
+
VRadio: typeof import('vuetify/components')['VRadio']
|
|
575
569
|
VRangeSlider: typeof import('vuetify/components')['VRangeSlider']
|
|
576
570
|
VResponsive: typeof import('vuetify/components')['VResponsive']
|
|
577
|
-
VValidation: typeof import('vuetify/components')['VValidation']
|
|
578
571
|
VThemeProvider: typeof import('vuetify/components')['VThemeProvider']
|
|
572
|
+
VValidation: typeof import('vuetify/components')['VValidation']
|
|
579
573
|
VVirtualScroll: typeof import('vuetify/components')['VVirtualScroll']
|
|
580
574
|
VFabTransition: typeof import('vuetify/components')['VFabTransition']
|
|
581
575
|
VDialogBottomTransition: typeof import('vuetify/components')['VDialogBottomTransition']
|
|
@@ -593,6 +587,12 @@ declare module '@vue/runtime-core' {
|
|
|
593
587
|
VExpandTransition: typeof import('vuetify/components')['VExpandTransition']
|
|
594
588
|
VExpandXTransition: typeof import('vuetify/components')['VExpandXTransition']
|
|
595
589
|
VDialogTransition: typeof import('vuetify/components')['VDialogTransition']
|
|
590
|
+
VDatePicker: typeof import('vuetify/components')['VDatePicker']
|
|
591
|
+
VDatePickerControls: typeof import('vuetify/components')['VDatePickerControls']
|
|
592
|
+
VDatePickerHeader: typeof import('vuetify/components')['VDatePickerHeader']
|
|
593
|
+
VDatePickerMonth: typeof import('vuetify/components')['VDatePickerMonth']
|
|
594
|
+
VDatePickerMonths: typeof import('vuetify/components')['VDatePickerMonths']
|
|
595
|
+
VDatePickerYears: typeof import('vuetify/components')['VDatePickerYears']
|
|
596
596
|
VPicker: typeof import('vuetify/labs/components')['VPicker']
|
|
597
597
|
VPickerTitle: typeof import('vuetify/labs/components')['VPickerTitle']
|
|
598
598
|
VConfirmEdit: typeof import('vuetify/labs/components')['VConfirmEdit']
|
|
@@ -27,7 +27,7 @@ type GenericProps<Props, Slots extends Record<string, unknown>> = {
|
|
|
27
27
|
$slots: MakeSlots<Slots>;
|
|
28
28
|
};
|
|
29
29
|
interface FilterPropsOptions<PropsOptions extends Readonly<ComponentPropsOptions>, Props = ExtractPropTypes<PropsOptions>> {
|
|
30
|
-
filterProps<T extends Partial<Props>, U extends Exclude<keyof Props, Exclude<keyof Props, keyof T>>>(props: T):
|
|
30
|
+
filterProps<T extends Partial<Props>, U extends Exclude<keyof Props, Exclude<keyof Props, keyof T>>>(props: T): Partial<Pick<T, U>>;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
type VConfirmEditSlots<T> = {
|
|
@@ -28,7 +28,7 @@ export const VPicker = genericComponent()({
|
|
|
28
28
|
backgroundColorStyles
|
|
29
29
|
} = useBackgroundColor(toRef(props, 'color'));
|
|
30
30
|
useRender(() => {
|
|
31
|
-
const
|
|
31
|
+
const sheetProps = VSheet.filterProps(props);
|
|
32
32
|
const hasTitle = !!(props.title || slots.title);
|
|
33
33
|
return _createVNode(VSheet, _mergeProps(sheetProps, {
|
|
34
34
|
"color": props.bgColor,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VPicker.mjs","names":["VPickerTitle","VDefaultsProvider","makeVSheetProps","VSheet","useBackgroundColor","toRef","genericComponent","propsFactory","useRender","makeVPickerProps","bgColor","String","landscape","Boolean","title","hideHeader","VPicker","name","props","setup","_ref","slots","backgroundColorClasses","backgroundColorStyles","sheetProps","filterProps","hasTitle","_createVNode","_mergeProps","actions","class","style","default","value","header","VBtn","slim","variant"],"sources":["../../../src/labs/VPicker/VPicker.tsx"],"sourcesContent":["// Styles\nimport './VPicker.sass'\n\n// Components\nimport { VPickerTitle } from './VPickerTitle'\nimport { VDefaultsProvider } from '@/components/VDefaultsProvider/VDefaultsProvider'\nimport { makeVSheetProps, VSheet } from '@/components/VSheet/VSheet'\n\n// Composables\nimport { useBackgroundColor } from '@/composables/color'\n\n// Utilities\nimport { toRef } from 'vue'\nimport { genericComponent, 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 bgColor: String,\n landscape: Boolean,\n title: String,\n hideHeader: Boolean,\n\n ...makeVSheetProps(),\n}, 'VPicker')\n\nexport const VPicker = genericComponent<VPickerSlots>()({\n name: 'VPicker',\n\n props: makeVPickerProps(),\n\n setup (props, { slots }) {\n const { backgroundColorClasses, backgroundColorStyles } = useBackgroundColor(toRef(props, 'color'))\n useRender(() => {\n const
|
|
1
|
+
{"version":3,"file":"VPicker.mjs","names":["VPickerTitle","VDefaultsProvider","makeVSheetProps","VSheet","useBackgroundColor","toRef","genericComponent","propsFactory","useRender","makeVPickerProps","bgColor","String","landscape","Boolean","title","hideHeader","VPicker","name","props","setup","_ref","slots","backgroundColorClasses","backgroundColorStyles","sheetProps","filterProps","hasTitle","_createVNode","_mergeProps","actions","class","style","default","value","header","VBtn","slim","variant"],"sources":["../../../src/labs/VPicker/VPicker.tsx"],"sourcesContent":["// Styles\nimport './VPicker.sass'\n\n// Components\nimport { VPickerTitle } from './VPickerTitle'\nimport { VDefaultsProvider } from '@/components/VDefaultsProvider/VDefaultsProvider'\nimport { makeVSheetProps, VSheet } from '@/components/VSheet/VSheet'\n\n// Composables\nimport { useBackgroundColor } from '@/composables/color'\n\n// Utilities\nimport { toRef } from 'vue'\nimport { genericComponent, 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 bgColor: String,\n landscape: Boolean,\n title: String,\n hideHeader: Boolean,\n\n ...makeVSheetProps(),\n}, 'VPicker')\n\nexport const VPicker = genericComponent<VPickerSlots>()({\n name: 'VPicker',\n\n props: makeVPickerProps(),\n\n setup (props, { slots }) {\n const { backgroundColorClasses, backgroundColorStyles } = useBackgroundColor(toRef(props, 'color'))\n useRender(() => {\n const sheetProps = VSheet.filterProps(props)\n const hasTitle = !!(props.title || slots.title)\n\n return (\n <VSheet\n { ...sheetProps }\n color={ props.bgColor }\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 { !props.hideHeader && (\n <div\n key=\"header\"\n class={[\n backgroundColorClasses.value,\n ]}\n style={[\n backgroundColorStyles.value,\n ]}\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 </div>\n )}\n\n <div class=\"v-picker__body\">\n { slots.default?.() }\n </div>\n\n { slots.actions && (\n <VDefaultsProvider\n defaults={{\n VBtn: {\n slim: true,\n variant: 'text',\n },\n }}\n >\n <div class=\"v-picker__actions\">\n { slots.actions() }\n </div>\n </VDefaultsProvider>\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,iBAAiB;AAAA,SACjBC,eAAe,EAAEC,MAAM,8CAEhC;AAAA,SACSC,kBAAkB,uCAE3B;AACA,SAASC,KAAK,QAAQ,KAAK;AAAA,SAClBC,gBAAgB,EAAEC,YAAY,EAAEC,SAAS,gCAElD;AAQA,OAAO,MAAMC,gBAAgB,GAAGF,YAAY,CAAC;EAC3CG,OAAO,EAAEC,MAAM;EACfC,SAAS,EAAEC,OAAO;EAClBC,KAAK,EAAEH,MAAM;EACbI,UAAU,EAAEF,OAAO;EAEnB,GAAGX,eAAe;AACpB,CAAC,EAAE,SAAS,CAAC;AAEb,OAAO,MAAMc,OAAO,GAAGV,gBAAgB,EAAgB,CAAC;EACtDW,IAAI,EAAE,SAAS;EAEfC,KAAK,EAAET,gBAAgB,EAAE;EAEzBU,KAAKA,CAAED,KAAK,EAAAE,IAAA,EAAa;IAAA,IAAX;MAAEC;IAAM,CAAC,GAAAD,IAAA;IACrB,MAAM;MAAEE,sBAAsB;MAAEC;IAAsB,CAAC,GAAGnB,kBAAkB,CAACC,KAAK,CAACa,KAAK,EAAE,OAAO,CAAC,CAAC;IACnGV,SAAS,CAAC,MAAM;MACd,MAAMgB,UAAU,GAAGrB,MAAM,CAACsB,WAAW,CAACP,KAAK,CAAC;MAC5C,MAAMQ,QAAQ,GAAG,CAAC,EAAER,KAAK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center' | `${Tblock} ${Tinline | 'center'}` | `${Tinline} ${Tblock | 'center'}`;
|
|
9
9
|
|
|
10
10
|
interface FilterPropsOptions<PropsOptions extends Readonly<ComponentPropsOptions>, Props = ExtractPropTypes<PropsOptions>> {
|
|
11
|
-
filterProps<T extends Partial<Props>, U extends Exclude<keyof Props, Exclude<keyof Props, keyof T>>>(props: T):
|
|
11
|
+
filterProps<T extends Partial<Props>, U extends Exclude<keyof Props, Exclude<keyof Props, keyof T>>>(props: T): Partial<Pick<T, U>>;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
declare const VPicker: {
|
|
@@ -33,7 +33,7 @@ type GenericProps<Props, Slots extends Record<string, unknown>> = {
|
|
|
33
33
|
$slots: MakeSlots<Slots>;
|
|
34
34
|
};
|
|
35
35
|
interface FilterPropsOptions<PropsOptions extends Readonly<ComponentPropsOptions>, Props = ExtractPropTypes<PropsOptions>> {
|
|
36
|
-
filterProps<T extends Partial<Props>, U extends Exclude<keyof Props, Exclude<keyof Props, keyof T>>>(props: T):
|
|
36
|
+
filterProps<T extends Partial<Props>, U extends Exclude<keyof Props, Exclude<keyof Props, keyof T>>>(props: T): Partial<Pick<T, U>>;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
type VConfirmEditSlots<T> = {
|
|
@@ -14,9 +14,9 @@ export function defineComponent(options) {
|
|
|
14
14
|
}
|
|
15
15
|
if (options._setup) {
|
|
16
16
|
options.props = propsFactory(options.props ?? {}, options.name)();
|
|
17
|
-
const propKeys = Object.keys(options.props);
|
|
17
|
+
const propKeys = Object.keys(options.props).filter(key => key !== 'class' && key !== 'style');
|
|
18
18
|
options.filterProps = function filterProps(props) {
|
|
19
|
-
return pick(props, propKeys
|
|
19
|
+
return pick(props, propKeys);
|
|
20
20
|
};
|
|
21
21
|
options.props._as = String;
|
|
22
22
|
options.setup = function setup(props, ctx) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defineComponent.mjs","names":["injectDefaults","internalUseDefaults","defineComponent","_defineComponent","consoleWarn","pick","propsFactory","options","_setup","setup","name","props","propKeys","Object","keys","filterProps","_as","String","ctx","defaults","value","_props","provideSubDefaults","setupBindings","genericComponent","exposeDefaults","arguments","length","undefined","defineFunctionalComponent","render"],"sources":["../../src/util/defineComponent.tsx"],"sourcesContent":["// Composables\nimport { injectDefaults, internalUseDefaults } from '@/composables/defaults'\n\n// Utilities\nimport {\n defineComponent as _defineComponent, // eslint-disable-line no-restricted-imports\n} from 'vue'\nimport { consoleWarn } from '@/util/console'\nimport { pick } from '@/util/helpers'\nimport { propsFactory } from '@/util/propsFactory'\n\n// Types\nimport type {\n AllowedComponentProps,\n ComponentCustomProps,\n ComponentInjectOptions,\n ComponentObjectPropsOptions,\n ComponentOptions,\n ComponentOptionsMixin,\n ComponentOptionsWithObjectProps,\n ComponentOptionsWithoutProps,\n ComponentPropsOptions,\n ComputedOptions,\n DefineComponent,\n EmitsOptions,\n ExtractDefaultPropTypes,\n ExtractPropTypes,\n FunctionalComponent,\n MethodOptions,\n ObjectEmitsOptions,\n SlotsType,\n VNode,\n VNodeChild,\n VNodeProps,\n} from 'vue'\n\n// No props\nexport function defineComponent<\n Props = {},\n RawBindings = {},\n D = {},\n C extends ComputedOptions = {},\n M extends MethodOptions = {},\n Mixin extends ComponentOptionsMixin = ComponentOptionsMixin,\n Extends extends ComponentOptionsMixin = ComponentOptionsMixin,\n E extends EmitsOptions = {},\n EE extends string = string,\n I extends {} = {},\n II extends string = string,\n S extends SlotsType = {},\n>(\n options: ComponentOptionsWithoutProps<\n Props,\n RawBindings,\n D,\n C,\n M,\n Mixin,\n Extends,\n E,\n EE,\n I,\n II,\n S\n >\n): DefineComponent<Props, RawBindings, D, C, M, Mixin, Extends, E, EE>\n\n// Object Props\nexport function defineComponent<\n PropsOptions extends Readonly<ComponentPropsOptions>,\n RawBindings,\n D,\n C extends ComputedOptions = {},\n M extends MethodOptions = {},\n Mixin extends ComponentOptionsMixin = ComponentOptionsMixin,\n Extends extends ComponentOptionsMixin = ComponentOptionsMixin,\n E extends EmitsOptions = {},\n EE extends string = string,\n I extends {} = {},\n II extends string = string,\n S extends SlotsType = {},\n>(\n options: ComponentOptionsWithObjectProps<\n PropsOptions,\n RawBindings,\n D,\n C,\n M,\n Mixin,\n Extends,\n E,\n EE,\n I,\n II,\n S\n >\n): DefineComponent<PropsOptions, RawBindings, D, C, M, Mixin, Extends, E, EE> & FilterPropsOptions<PropsOptions>\n\n// Implementation\nexport function defineComponent (options: ComponentOptions) {\n options._setup = options._setup ?? options.setup\n\n if (!options.name) {\n consoleWarn('The component is missing an explicit name, unable to generate default prop value')\n\n return options\n }\n\n if (options._setup) {\n options.props = propsFactory(options.props ?? {}, options.name)()\n const propKeys = Object.keys(options.props)\n options.filterProps = function filterProps (props: Record<string, any>) {\n return pick(props, propKeys, ['class', 'style'])\n }\n\n options.props._as = String\n options.setup = function setup (props: Record<string, any>, ctx) {\n const defaults = injectDefaults()\n\n // Skip props proxy if defaults are not provided\n if (!defaults.value) return options._setup(props, ctx)\n\n const { props: _props, provideSubDefaults } = internalUseDefaults(props, props._as ?? options.name, defaults)\n\n const setupBindings = options._setup(_props, ctx)\n\n provideSubDefaults()\n\n return setupBindings\n }\n }\n\n return options\n}\n\ntype ToListeners<T extends string | number | symbol> = { [K in T]: K extends `on${infer U}` ? Uncapitalize<U> : K }[T]\n\nexport type SlotsToProps<\n U extends RawSlots,\n T = MakeInternalSlots<U>\n> = {\n $children?: (\n | VNodeChild\n | (T extends { default: infer V } ? V : {})\n | { [K in keyof T]?: T[K] }\n )\n 'v-slots'?: { [K in keyof T]?: T[K] | false }\n} & {\n [K in keyof T as `v-slot:${K & string}`]?: T[K] | false\n}\n\ntype RawSlots = Record<string, unknown>\ntype Slot<T> = [T] extends [never] ? () => VNodeChild : (arg: T) => VNodeChild\ntype VueSlot<T> = [T] extends [never] ? () => VNode[] : (arg: T) => VNode[]\ntype MakeInternalSlots<T extends RawSlots> = {\n [K in keyof T]: Slot<T[K]>\n}\ntype MakeSlots<T extends RawSlots> = {\n [K in keyof T]: VueSlot<T[K]>\n}\n\nexport type GenericProps<Props, Slots extends Record<string, unknown>> = {\n $props: Props & SlotsToProps<Slots>\n $slots: MakeSlots<Slots>\n}\n\ntype DefineComponentWithGenericProps<T extends (new (props: Record<string, any>, slots: RawSlots) => {\n $props?: Record<string, any>\n})> = <\n PropsOptions extends Readonly<ComponentObjectPropsOptions>,\n RawBindings,\n D,\n C extends ComputedOptions = {},\n M extends MethodOptions = {},\n Mixin extends ComponentOptionsMixin = ComponentOptionsMixin,\n Extends extends ComponentOptionsMixin = ComponentOptionsMixin,\n E extends EmitsOptions = Record<string, any>,\n EE extends string = string,\n I extends ComponentInjectOptions = {},\n II extends string = string,\n // Slots extends RawSlots = ConstructorParameters<T> extends [any, infer SS extends RawSlots | undefined] ? Exclude<SS, undefined> : {},\n Slots extends RawSlots = ConstructorParameters<T>[1],\n S extends SlotsType = SlotsType<Partial<MakeSlots<Slots>>>,\n III = InstanceType<T>,\n P = III extends Record<'$props', any>\n ? Omit<PropsOptions, keyof III['$props']>\n : PropsOptions,\n Base = DefineComponent<\n P,\n RawBindings,\n D,\n C,\n M,\n Mixin,\n Extends,\n E extends any[] ? E : III extends Record<'$props', any> ? Omit<E, ToListeners<keyof III['$props']>> : E,\n EE,\n PublicProps,\n ExtractPropTypes<P> & ({} extends E ? {} : EmitsToProps<E>),\n ExtractDefaultPropTypes<P>,\n S\n >\n>(\n options: ComponentOptionsWithObjectProps<PropsOptions, RawBindings, D, C, M, Mixin, Extends, E, EE, I, II, S>\n) => Base & T & FilterPropsOptions<PropsOptions>\n\ntype DefineComponentWithSlots<Slots extends RawSlots> = <\n PropsOptions extends Readonly<ComponentPropsOptions>,\n RawBindings,\n D,\n C extends ComputedOptions = {},\n M extends MethodOptions = {},\n Mixin extends ComponentOptionsMixin = ComponentOptionsMixin,\n Extends extends ComponentOptionsMixin = ComponentOptionsMixin,\n E extends EmitsOptions = Record<string, any>,\n EE extends string = string,\n I extends ComponentInjectOptions = {},\n II extends string = string,\n S extends SlotsType = SlotsType<Partial<MakeSlots<Slots>>>,\n>(\n options: ComponentOptionsWithObjectProps<PropsOptions, RawBindings, D, C, M, Mixin, Extends, E, EE, I, II, S>\n) => DefineComponent<\n ExtractPropTypes<PropsOptions> & SlotsToProps<Slots>,\n RawBindings,\n D,\n C,\n M,\n Mixin,\n Extends,\n E,\n EE,\n PublicProps,\n ExtractPropTypes<PropsOptions> & SlotsToProps<Slots> & ({} extends E ? {} : EmitsToProps<E>),\n ExtractDefaultPropTypes<PropsOptions>,\n S\n> & FilterPropsOptions<PropsOptions>\n\n// No argument - simple default slot\nexport function genericComponent (exposeDefaults?: boolean): DefineComponentWithSlots<{ default: never }>\n\n// Generic constructor argument - generic props and slots\nexport function genericComponent<T extends (new (props: Record<string, any>, slots: any) => {\n $props?: Record<string, any>\n})> (exposeDefaults?: boolean): DefineComponentWithGenericProps<T>\n\n// Slots argument - simple slots\nexport function genericComponent<\n Slots extends RawSlots\n> (exposeDefaults?: boolean): DefineComponentWithSlots<Slots>\n\n// Implementation\nexport function genericComponent (exposeDefaults = true) {\n return (options: any) => ((exposeDefaults ? defineComponent : _defineComponent) as any)(options)\n}\n\nexport function defineFunctionalComponent<\n T extends FunctionalComponent<Props>,\n PropsOptions = ComponentObjectPropsOptions,\n Defaults = ExtractDefaultPropTypes<PropsOptions>,\n Props = Readonly<ExtractPropTypes<PropsOptions>>,\n> (props: PropsOptions, render: T): FunctionalComponent<Partial<Defaults> & Omit<Props, keyof Defaults>> {\n render.props = props as any\n return render as any\n}\n\ntype EmitsToProps<T extends EmitsOptions> = T extends string[]\n ? {\n [K in string & `on${Capitalize<T[number]>}`]?: (...args: any[]) => any\n }\n : T extends ObjectEmitsOptions\n ? {\n [K in string &\n `on${Capitalize<string & keyof T>}`]?: K extends `on${infer C}`\n ? T[Uncapitalize<C>] extends null\n ? (...args: any[]) => any\n : (\n ...args: T[Uncapitalize<C>] extends (...args: infer P) => any\n ? P\n : never\n ) => any\n : never\n }\n : {}\n\ntype PublicProps =\n & VNodeProps\n & AllowedComponentProps\n & ComponentCustomProps\n\n// Adds a filterProps method to the component options\nexport interface FilterPropsOptions<PropsOptions extends Readonly<ComponentPropsOptions>, Props = ExtractPropTypes<PropsOptions>> {\n filterProps<\n T extends Partial<Props>,\n U extends Exclude<keyof Props, Exclude<keyof Props, keyof T>>\n > (props: T): [yes: Partial<Pick<T, U>>, no: Omit<T, U>]\n}\n"],"mappings":"AAAA;AAAA,SACSA,cAAc,EAAEC,mBAAmB,uCAE5C;AACA,SACEC,eAAe,IAAIC,gBAAgB,CAAE;AAAA,OAChC,KAAK;AAAA,SACHC,WAAW;AAAA,SACXC,IAAI;AAAA,SACJC,YAAY,8BAErB;AAuFA;AACA,OAAO,SAASJ,eAAeA,CAAEK,OAAyB,EAAE;EAC1DA,OAAO,CAACC,MAAM,GAAGD,OAAO,CAACC,MAAM,IAAID,OAAO,CAACE,KAAK;EAEhD,IAAI,CAACF,OAAO,CAACG,IAAI,EAAE;IACjBN,WAAW,CAAC,kFAAkF,CAAC;IAE/F,OAAOG,OAAO;EAChB;EAEA,IAAIA,OAAO,CAACC,MAAM,EAAE;IAClBD,OAAO,CAACI,KAAK,GAAGL,YAAY,CAACC,OAAO,CAACI,KAAK,IAAI,CAAC,CAAC,EAAEJ,OAAO,CAACG,IAAI,CAAC,EAAE;IACjE,MAAME,QAAQ,GAAGC,MAAM,CAACC,IAAI,CAACP,OAAO,CAACI,KAAK,CAAC;IAC3CJ,OAAO,CAACQ,WAAW,GAAG,SAASA,WAAWA,CAAEJ,KAA0B,EAAE;MACtE,OAAON,IAAI,CAACM,KAAK,EAAEC,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC;IAEDL,OAAO,CAACI,KAAK,CAACK,GAAG,GAAGC,MAAM;IAC1BV,OAAO,CAACE,KAAK,GAAG,SAASA,KAAKA,CAAEE,KAA0B,EAAEO,GAAG,EAAE;MAC/D,MAAMC,QAAQ,GAAGnB,cAAc,EAAE;;MAEjC;MACA,IAAI,CAACmB,QAAQ,CAACC,KAAK,EAAE,OAAOb,OAAO,CAACC,MAAM,CAACG,KAAK,EAAEO,GAAG,CAAC;MAEtD,MAAM;QAAEP,KAAK,EAAEU,MAAM;QAAEC;MAAmB,CAAC,GAAGrB,mBAAmB,CAACU,KAAK,EAAEA,KAAK,CAACK,GAAG,IAAIT,OAAO,CAACG,IAAI,EAAES,QAAQ,CAAC;MAE7G,MAAMI,aAAa,GAAGhB,OAAO,CAACC,MAAM,CAACa,MAAM,EAAEH,GAAG,CAAC;MAEjDI,kBAAkB,EAAE;MAEpB,OAAOC,aAAa;IACtB,CAAC;EACH;EAEA,OAAOhB,OAAO;AAChB;AAqHA;AACA,OAAO,SAASiB,gBAAgBA,CAAA,EAAyB;EAAA,IAAvBC,cAAc,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;EACrD,OAAQnB,OAAY,IAAK,CAAEkB,cAAc,GAAGvB,eAAe,GAAGC,gBAAgB,EAAUI,OAAO,CAAC;AAClG;AAEA,OAAO,SAASsB,yBAAyBA,CAKtClB,KAAmB,EAAEmB,MAAS,EAAwE;EACvGA,MAAM,CAACnB,KAAK,GAAGA,KAAY;EAC3B,OAAOmB,MAAM;AACf"}
|
|
1
|
+
{"version":3,"file":"defineComponent.mjs","names":["injectDefaults","internalUseDefaults","defineComponent","_defineComponent","consoleWarn","pick","propsFactory","options","_setup","setup","name","props","propKeys","Object","keys","filter","key","filterProps","_as","String","ctx","defaults","value","_props","provideSubDefaults","setupBindings","genericComponent","exposeDefaults","arguments","length","undefined","defineFunctionalComponent","render"],"sources":["../../src/util/defineComponent.tsx"],"sourcesContent":["// Composables\nimport { injectDefaults, internalUseDefaults } from '@/composables/defaults'\n\n// Utilities\nimport {\n defineComponent as _defineComponent, // eslint-disable-line no-restricted-imports\n} from 'vue'\nimport { consoleWarn } from '@/util/console'\nimport { pick } from '@/util/helpers'\nimport { propsFactory } from '@/util/propsFactory'\n\n// Types\nimport type {\n AllowedComponentProps,\n ComponentCustomProps,\n ComponentInjectOptions,\n ComponentObjectPropsOptions,\n ComponentOptions,\n ComponentOptionsMixin,\n ComponentOptionsWithObjectProps,\n ComponentOptionsWithoutProps,\n ComponentPropsOptions,\n ComputedOptions,\n DefineComponent,\n EmitsOptions,\n ExtractDefaultPropTypes,\n ExtractPropTypes,\n FunctionalComponent,\n MethodOptions,\n ObjectEmitsOptions,\n SlotsType,\n VNode,\n VNodeChild,\n VNodeProps,\n} from 'vue'\n\n// No props\nexport function defineComponent<\n Props = {},\n RawBindings = {},\n D = {},\n C extends ComputedOptions = {},\n M extends MethodOptions = {},\n Mixin extends ComponentOptionsMixin = ComponentOptionsMixin,\n Extends extends ComponentOptionsMixin = ComponentOptionsMixin,\n E extends EmitsOptions = {},\n EE extends string = string,\n I extends {} = {},\n II extends string = string,\n S extends SlotsType = {},\n>(\n options: ComponentOptionsWithoutProps<\n Props,\n RawBindings,\n D,\n C,\n M,\n Mixin,\n Extends,\n E,\n EE,\n I,\n II,\n S\n >\n): DefineComponent<Props, RawBindings, D, C, M, Mixin, Extends, E, EE>\n\n// Object Props\nexport function defineComponent<\n PropsOptions extends Readonly<ComponentPropsOptions>,\n RawBindings,\n D,\n C extends ComputedOptions = {},\n M extends MethodOptions = {},\n Mixin extends ComponentOptionsMixin = ComponentOptionsMixin,\n Extends extends ComponentOptionsMixin = ComponentOptionsMixin,\n E extends EmitsOptions = {},\n EE extends string = string,\n I extends {} = {},\n II extends string = string,\n S extends SlotsType = {},\n>(\n options: ComponentOptionsWithObjectProps<\n PropsOptions,\n RawBindings,\n D,\n C,\n M,\n Mixin,\n Extends,\n E,\n EE,\n I,\n II,\n S\n >\n): DefineComponent<PropsOptions, RawBindings, D, C, M, Mixin, Extends, E, EE> & FilterPropsOptions<PropsOptions>\n\n// Implementation\nexport function defineComponent (options: ComponentOptions) {\n options._setup = options._setup ?? options.setup\n\n if (!options.name) {\n consoleWarn('The component is missing an explicit name, unable to generate default prop value')\n\n return options\n }\n\n if (options._setup) {\n options.props = propsFactory(options.props ?? {}, options.name)()\n const propKeys = Object.keys(options.props).filter(key => key !== 'class' && key !== 'style')\n options.filterProps = function filterProps (props: Record<string, any>) {\n return pick(props, propKeys)\n }\n\n options.props._as = String\n options.setup = function setup (props: Record<string, any>, ctx) {\n const defaults = injectDefaults()\n\n // Skip props proxy if defaults are not provided\n if (!defaults.value) return options._setup(props, ctx)\n\n const { props: _props, provideSubDefaults } = internalUseDefaults(props, props._as ?? options.name, defaults)\n\n const setupBindings = options._setup(_props, ctx)\n\n provideSubDefaults()\n\n return setupBindings\n }\n }\n\n return options\n}\n\ntype ToListeners<T extends string | number | symbol> = { [K in T]: K extends `on${infer U}` ? Uncapitalize<U> : K }[T]\n\nexport type SlotsToProps<\n U extends RawSlots,\n T = MakeInternalSlots<U>\n> = {\n $children?: (\n | VNodeChild\n | (T extends { default: infer V } ? V : {})\n | { [K in keyof T]?: T[K] }\n )\n 'v-slots'?: { [K in keyof T]?: T[K] | false }\n} & {\n [K in keyof T as `v-slot:${K & string}`]?: T[K] | false\n}\n\ntype RawSlots = Record<string, unknown>\ntype Slot<T> = [T] extends [never] ? () => VNodeChild : (arg: T) => VNodeChild\ntype VueSlot<T> = [T] extends [never] ? () => VNode[] : (arg: T) => VNode[]\ntype MakeInternalSlots<T extends RawSlots> = {\n [K in keyof T]: Slot<T[K]>\n}\ntype MakeSlots<T extends RawSlots> = {\n [K in keyof T]: VueSlot<T[K]>\n}\n\nexport type GenericProps<Props, Slots extends Record<string, unknown>> = {\n $props: Props & SlotsToProps<Slots>\n $slots: MakeSlots<Slots>\n}\n\ntype DefineComponentWithGenericProps<T extends (new (props: Record<string, any>, slots: RawSlots) => {\n $props?: Record<string, any>\n})> = <\n PropsOptions extends Readonly<ComponentObjectPropsOptions>,\n RawBindings,\n D,\n C extends ComputedOptions = {},\n M extends MethodOptions = {},\n Mixin extends ComponentOptionsMixin = ComponentOptionsMixin,\n Extends extends ComponentOptionsMixin = ComponentOptionsMixin,\n E extends EmitsOptions = Record<string, any>,\n EE extends string = string,\n I extends ComponentInjectOptions = {},\n II extends string = string,\n // Slots extends RawSlots = ConstructorParameters<T> extends [any, infer SS extends RawSlots | undefined] ? Exclude<SS, undefined> : {},\n Slots extends RawSlots = ConstructorParameters<T>[1],\n S extends SlotsType = SlotsType<Partial<MakeSlots<Slots>>>,\n III = InstanceType<T>,\n P = III extends Record<'$props', any>\n ? Omit<PropsOptions, keyof III['$props']>\n : PropsOptions,\n Base = DefineComponent<\n P,\n RawBindings,\n D,\n C,\n M,\n Mixin,\n Extends,\n E extends any[] ? E : III extends Record<'$props', any> ? Omit<E, ToListeners<keyof III['$props']>> : E,\n EE,\n PublicProps,\n ExtractPropTypes<P> & ({} extends E ? {} : EmitsToProps<E>),\n ExtractDefaultPropTypes<P>,\n S\n >\n>(\n options: ComponentOptionsWithObjectProps<PropsOptions, RawBindings, D, C, M, Mixin, Extends, E, EE, I, II, S>\n) => Base & T & FilterPropsOptions<PropsOptions>\n\ntype DefineComponentWithSlots<Slots extends RawSlots> = <\n PropsOptions extends Readonly<ComponentPropsOptions>,\n RawBindings,\n D,\n C extends ComputedOptions = {},\n M extends MethodOptions = {},\n Mixin extends ComponentOptionsMixin = ComponentOptionsMixin,\n Extends extends ComponentOptionsMixin = ComponentOptionsMixin,\n E extends EmitsOptions = Record<string, any>,\n EE extends string = string,\n I extends ComponentInjectOptions = {},\n II extends string = string,\n S extends SlotsType = SlotsType<Partial<MakeSlots<Slots>>>,\n>(\n options: ComponentOptionsWithObjectProps<PropsOptions, RawBindings, D, C, M, Mixin, Extends, E, EE, I, II, S>\n) => DefineComponent<\n ExtractPropTypes<PropsOptions> & SlotsToProps<Slots>,\n RawBindings,\n D,\n C,\n M,\n Mixin,\n Extends,\n E,\n EE,\n PublicProps,\n ExtractPropTypes<PropsOptions> & SlotsToProps<Slots> & ({} extends E ? {} : EmitsToProps<E>),\n ExtractDefaultPropTypes<PropsOptions>,\n S\n> & FilterPropsOptions<PropsOptions>\n\n// No argument - simple default slot\nexport function genericComponent (exposeDefaults?: boolean): DefineComponentWithSlots<{ default: never }>\n\n// Generic constructor argument - generic props and slots\nexport function genericComponent<T extends (new (props: Record<string, any>, slots: any) => {\n $props?: Record<string, any>\n})> (exposeDefaults?: boolean): DefineComponentWithGenericProps<T>\n\n// Slots argument - simple slots\nexport function genericComponent<\n Slots extends RawSlots\n> (exposeDefaults?: boolean): DefineComponentWithSlots<Slots>\n\n// Implementation\nexport function genericComponent (exposeDefaults = true) {\n return (options: any) => ((exposeDefaults ? defineComponent : _defineComponent) as any)(options)\n}\n\nexport function defineFunctionalComponent<\n T extends FunctionalComponent<Props>,\n PropsOptions = ComponentObjectPropsOptions,\n Defaults = ExtractDefaultPropTypes<PropsOptions>,\n Props = Readonly<ExtractPropTypes<PropsOptions>>,\n> (props: PropsOptions, render: T): FunctionalComponent<Partial<Defaults> & Omit<Props, keyof Defaults>> {\n render.props = props as any\n return render as any\n}\n\ntype EmitsToProps<T extends EmitsOptions> = T extends string[]\n ? {\n [K in string & `on${Capitalize<T[number]>}`]?: (...args: any[]) => any\n }\n : T extends ObjectEmitsOptions\n ? {\n [K in string &\n `on${Capitalize<string & keyof T>}`]?: K extends `on${infer C}`\n ? T[Uncapitalize<C>] extends null\n ? (...args: any[]) => any\n : (\n ...args: T[Uncapitalize<C>] extends (...args: infer P) => any\n ? P\n : never\n ) => any\n : never\n }\n : {}\n\ntype PublicProps =\n & VNodeProps\n & AllowedComponentProps\n & ComponentCustomProps\n\n// Adds a filterProps method to the component options\nexport interface FilterPropsOptions<PropsOptions extends Readonly<ComponentPropsOptions>, Props = ExtractPropTypes<PropsOptions>> {\n filterProps<\n T extends Partial<Props>,\n U extends Exclude<keyof Props, Exclude<keyof Props, keyof T>>\n > (props: T): Partial<Pick<T, U>>\n}\n"],"mappings":"AAAA;AAAA,S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CAACG,IAAI,EAAEW,QAAQ,CAAC;MAE7G,MAAMI,aAAa,GAAGlB,OAAO,CAACC,MAAM,CAACe,MAAM,EAAEH,GAAG,CAAC;MAEjDI,kBAAkB,EAAE;MAEpB,OAAOC,aAAa;IACtB,CAAC;EACH;EAEA,OAAOlB,OAAO;AAChB;AAqHA;AACA,OAAO,SAASmB,gBAAgBA,CAAA,EAAyB;EAAA,IAAvBC,cAAc,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;EACrD,OAAQrB,OAAY,IAAK,CAAEoB,cAAc,GAAGzB,eAAe,GAAGC,gBAAgB,EAAUI,OAAO,CAAC;AAClG;AAEA,OAAO,SAASwB,yBAAyBA,CAKtCpB,KAAmB,EAAEqB,MAAS,EAAwE;EACvGA,MAAM,CAACrB,KAAK,GAAGA,KAAY;EAC3B,OAAOqB,MAAM;AACf"}
|
package/lib/util/helpers.mjs
CHANGED
|
@@ -143,7 +143,21 @@ export function keys(o) {
|
|
|
143
143
|
export function has(obj, key) {
|
|
144
144
|
return key.every(k => obj.hasOwnProperty(k));
|
|
145
145
|
}
|
|
146
|
-
|
|
146
|
+
// Array of keys
|
|
147
|
+
export function pick(obj, paths) {
|
|
148
|
+
const found = {};
|
|
149
|
+
const keys = new Set(Object.keys(obj));
|
|
150
|
+
for (const path of paths) {
|
|
151
|
+
if (keys.has(path)) {
|
|
152
|
+
found[path] = obj[path];
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
return found;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// Array of keys
|
|
159
|
+
|
|
160
|
+
export function pickWithRest(obj, paths, exclude) {
|
|
147
161
|
const found = Object.create(null);
|
|
148
162
|
const rest = Object.create(null);
|
|
149
163
|
for (const key in obj) {
|
|
@@ -181,9 +195,9 @@ export function isComposingIgnoreKey(e) {
|
|
|
181
195
|
* attributes should be passed to the <input> element inside.
|
|
182
196
|
*/
|
|
183
197
|
export function filterInputAttrs(attrs) {
|
|
184
|
-
const [events, props] =
|
|
198
|
+
const [events, props] = pickWithRest(attrs, [onRE]);
|
|
185
199
|
const inputEvents = omit(events, bubblingEvents);
|
|
186
|
-
const [rootAttrs, inputAttrs] =
|
|
200
|
+
const [rootAttrs, inputAttrs] = pickWithRest(props, ['class', 'style', 'id', /^data-/]);
|
|
187
201
|
Object.assign(rootAttrs, events);
|
|
188
202
|
Object.assign(inputAttrs, inputEvents);
|
|
189
203
|
return [rootAttrs, inputAttrs];
|