@vuetify/nightly 3.2.0-dev-20230214.0 → 3.2.0-dev-20230322.0
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 +5 -17
- package/dist/json/attributes.json +243 -59
- package/dist/json/tags.json +48 -2
- package/dist/json/web-types.json +1648 -279
- package/dist/vuetify-labs.css +666 -482
- package/dist/vuetify-labs.d.ts +59419 -13475
- package/dist/vuetify-labs.esm.js +797 -531
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +797 -531
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +524 -355
- package/dist/vuetify.d.ts +55670 -14368
- package/dist/vuetify.esm.js +607 -462
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +607 -462
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +793 -793
- package/dist/vuetify.min.js.map +1 -1
- package/lib/blueprints/index.d.ts +6 -9
- package/lib/blueprints/md1.d.ts +6 -9
- package/lib/blueprints/md2.d.ts +6 -9
- package/lib/blueprints/md3.d.ts +6 -9
- package/lib/blueprints/md3.mjs +6 -0
- package/lib/blueprints/md3.mjs.map +1 -1
- package/lib/components/VAlert/VAlert.css +1 -1
- package/lib/components/VAlert/VAlert.mjs +29 -15
- package/lib/components/VAlert/VAlert.mjs.map +1 -1
- package/lib/components/VAlert/_variables.scss +1 -1
- package/lib/components/VAlert/index.d.ts +515 -65
- package/lib/components/VApp/VApp.css +1 -0
- package/lib/components/VApp/VApp.sass +1 -0
- package/lib/components/VApp/index.d.ts +161 -17
- package/lib/components/VAppBar/VAppBar.mjs +9 -4
- package/lib/components/VAppBar/VAppBar.mjs.map +1 -1
- package/lib/components/VAppBar/index.d.ts +624 -82
- package/lib/components/VAutocomplete/VAutocomplete.mjs +23 -8
- package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
- package/lib/components/VAutocomplete/index.d.ts +1744 -113
- package/lib/components/VAvatar/index.d.ts +207 -25
- package/lib/components/VBadge/index.d.ts +286 -36
- package/lib/components/VBanner/VBanner.mjs +19 -12
- package/lib/components/VBanner/VBanner.mjs.map +1 -1
- package/lib/components/VBanner/index.d.ts +485 -67
- package/lib/components/VBottomNavigation/VBottomNavigation.mjs +6 -2
- package/lib/components/VBottomNavigation/VBottomNavigation.mjs.map +1 -1
- package/lib/components/VBottomNavigation/index.d.ts +323 -36
- package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs +11 -7
- package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs.map +1 -1
- package/lib/components/VBreadcrumbs/index.d.ts +346 -42
- package/lib/components/VBtn/VBtn.css +0 -5
- package/lib/components/VBtn/VBtn.mjs +65 -58
- package/lib/components/VBtn/VBtn.mjs.map +1 -1
- package/lib/components/VBtn/VBtn.sass +0 -7
- package/lib/components/VBtn/_variables.scss +0 -2
- package/lib/components/VBtn/index.d.ts +454 -59
- package/lib/components/VBtnGroup/VBtnGroup.mjs +1 -7
- package/lib/components/VBtnGroup/VBtnGroup.mjs.map +1 -1
- package/lib/components/VBtnGroup/index.d.ts +187 -22
- package/lib/components/VBtnToggle/VBtnToggle.mjs +2 -2
- package/lib/components/VBtnToggle/VBtnToggle.mjs.map +1 -1
- package/lib/components/VBtnToggle/index.d.ts +248 -32
- package/lib/components/VCard/VCard.mjs +10 -6
- package/lib/components/VCard/VCard.mjs.map +1 -1
- package/lib/components/VCard/VCardItem.mjs +27 -23
- package/lib/components/VCard/VCardItem.mjs.map +1 -1
- package/lib/components/VCard/index.d.ts +958 -132
- package/lib/components/VCarousel/VCarousel.mjs.map +1 -1
- package/lib/components/VCarousel/index.d.ts +585 -87
- package/lib/components/VCheckbox/VCheckbox.mjs +2 -2
- package/lib/components/VCheckbox/VCheckbox.mjs.map +1 -1
- package/lib/components/VCheckbox/VCheckboxBtn.mjs +1 -4
- package/lib/components/VCheckbox/VCheckboxBtn.mjs.map +1 -1
- package/lib/components/VCheckbox/index.d.ts +841 -119
- package/lib/components/VChip/VChip.css +110 -90
- package/lib/components/VChip/VChip.mjs +70 -48
- package/lib/components/VChip/VChip.mjs.map +1 -1
- package/lib/components/VChip/_mixins.scss +27 -23
- package/lib/components/VChip/index.d.ts +476 -66
- package/lib/components/VChipGroup/VChipGroup.mjs.map +1 -1
- package/lib/components/VChipGroup/index.d.ts +229 -28
- package/lib/components/VCode/index.d.ts +112 -13
- package/lib/components/VColorPicker/VColorPicker.mjs +9 -1
- package/lib/components/VColorPicker/VColorPicker.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPickerCanvas.css +2 -1
- package/lib/components/VColorPicker/VColorPickerCanvas.mjs +36 -18
- package/lib/components/VColorPicker/VColorPickerCanvas.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPickerCanvas.sass +2 -1
- package/lib/components/VColorPicker/VColorPickerEdit.mjs +4 -4
- package/lib/components/VColorPicker/VColorPickerEdit.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPickerPreview.mjs +2 -2
- package/lib/components/VColorPicker/VColorPickerPreview.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPickerSwatches.mjs.map +1 -1
- package/lib/components/VColorPicker/index.d.ts +284 -20
- package/lib/components/VColorPicker/util/index.mjs +2 -5
- package/lib/components/VColorPicker/util/index.mjs.map +1 -1
- package/lib/components/VCombobox/VCombobox.mjs +23 -8
- package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
- package/lib/components/VCombobox/index.d.ts +1756 -113
- package/lib/components/VCounter/index.d.ts +1909 -78
- package/lib/components/VDefaultsProvider/VDefaultsProvider.mjs +4 -1
- package/lib/components/VDefaultsProvider/VDefaultsProvider.mjs.map +1 -1
- package/lib/components/VDefaultsProvider/index.d.ts +136 -18
- package/lib/components/VDialog/VDialog.css +31 -24
- package/lib/components/VDialog/VDialog.mjs +2 -2
- package/lib/components/VDialog/VDialog.mjs.map +1 -1
- package/lib/components/VDialog/VDialog.sass +19 -12
- package/lib/components/VDialog/index.d.ts +2403 -124
- package/lib/components/VDivider/VDivider.mjs.map +1 -1
- package/lib/components/VDivider/index.d.ts +132 -19
- package/lib/components/VExpansionPanel/VExpansionPanel.mjs.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanelText.mjs.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanelTitle.mjs.map +1 -1
- package/lib/components/VExpansionPanel/index.d.ts +741 -104
- package/lib/components/VField/VField.mjs.map +1 -1
- package/lib/components/VField/index.d.ts +179 -23
- package/lib/components/VFileInput/VFileInput.mjs +1 -0
- package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
- package/lib/components/VFileInput/index.d.ts +1069 -93
- package/lib/components/VFooter/VFooter.css +2 -0
- package/lib/components/VFooter/VFooter.sass +2 -0
- package/lib/components/VFooter/_variables.scss +2 -0
- package/lib/components/VFooter/index.d.ts +206 -25
- package/lib/components/VForm/index.d.ts +207 -20
- package/lib/components/VGrid/VCol.mjs +6 -5
- package/lib/components/VGrid/VCol.mjs.map +1 -1
- package/lib/components/VGrid/VRow.mjs +4 -4
- package/lib/components/VGrid/VRow.mjs.map +1 -1
- package/lib/components/VGrid/index.d.ts +745 -64
- package/lib/components/VHover/index.d.ts +188 -29
- package/lib/components/VIcon/index.d.ts +500 -44
- package/lib/components/VImg/VImg.mjs +2 -2
- package/lib/components/VImg/VImg.mjs.map +1 -1
- package/lib/components/VImg/index.d.ts +281 -40
- package/lib/components/VInput/VInput.mjs.map +1 -1
- package/lib/components/VInput/index.d.ts +321 -47
- package/lib/components/VItemGroup/VItemGroup.mjs.map +1 -1
- package/lib/components/VItemGroup/index.d.ts +313 -45
- package/lib/components/VKbd/VKbd.css +1 -0
- package/lib/components/VKbd/VKbd.sass +1 -0
- package/lib/components/VKbd/_variables.scss +1 -0
- package/lib/components/VKbd/index.d.ts +112 -13
- package/lib/components/VLabel/index.d.ts +115 -16
- package/lib/components/VLayout/index.d.ts +302 -35
- package/lib/components/VLazy/VLazy.mjs +4 -1
- package/lib/components/VLazy/VLazy.mjs.map +1 -1
- package/lib/components/VLazy/index.d.ts +222 -27
- package/lib/components/VList/VListChildren.mjs +2 -2
- package/lib/components/VList/VListChildren.mjs.map +1 -1
- package/lib/components/VList/VListGroup.mjs +1 -4
- package/lib/components/VList/VListGroup.mjs.map +1 -1
- package/lib/components/VList/VListItem.mjs +23 -19
- package/lib/components/VList/VListItem.mjs.map +1 -1
- package/lib/components/VList/VListSubheader.mjs.map +1 -1
- package/lib/components/VList/index.d.ts +1500 -191
- package/lib/components/VLocaleProvider/index.d.ts +123 -16
- package/lib/components/VMain/index.d.ts +121 -14
- package/lib/components/VMenu/VMenu.css +4 -4
- package/lib/components/VMenu/VMenu.mjs +8 -7
- package/lib/components/VMenu/VMenu.mjs.map +1 -1
- package/lib/components/VMenu/VMenu.sass +1 -1
- package/lib/components/VMenu/index.d.ts +2411 -121
- package/lib/components/VMessages/VMessages.mjs.map +1 -1
- package/lib/components/VMessages/index.d.ts +1934 -87
- package/lib/components/VNavigationDrawer/index.d.ts +382 -47
- package/lib/components/VNoSsr/index.d.ts +6 -0
- package/lib/components/VOverlay/VOverlay.css +2 -2
- package/lib/components/VOverlay/VOverlay.mjs +1 -4
- package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
- package/lib/components/VOverlay/VOverlay.sass +1 -1
- package/lib/components/VOverlay/_variables.scss +1 -1
- package/lib/components/VOverlay/index.d.ts +527 -75
- package/lib/components/VOverlay/scrollStrategies.mjs +2 -2
- package/lib/components/VOverlay/scrollStrategies.mjs.map +1 -1
- package/lib/components/VPagination/VPagination.mjs.map +1 -1
- package/lib/components/VPagination/index.d.ts +504 -56
- package/lib/components/VParallax/VParallax.mjs +3 -3
- package/lib/components/VParallax/VParallax.mjs.map +1 -1
- package/lib/components/VParallax/index.d.ts +144 -19
- package/lib/components/VProgressCircular/VProgressCircular.mjs.map +1 -1
- package/lib/components/VProgressCircular/index.d.ts +189 -22
- package/lib/components/VProgressLinear/VProgressLinear.mjs.map +1 -1
- package/lib/components/VProgressLinear/index.d.ts +325 -42
- package/lib/components/VRadio/index.d.ts +318 -46
- package/lib/components/VRadioGroup/VRadioGroup.mjs +4 -6
- package/lib/components/VRadioGroup/VRadioGroup.mjs.map +1 -1
- package/lib/components/VRadioGroup/index.d.ts +468 -66
- package/lib/components/VRangeSlider/VRangeSlider.mjs.map +1 -1
- package/lib/components/VRangeSlider/index.d.ts +530 -66
- package/lib/components/VRating/VRating.css +0 -4
- package/lib/components/VRating/VRating.mjs +6 -35
- package/lib/components/VRating/VRating.mjs.map +1 -1
- package/lib/components/VRating/VRating.sass +0 -5
- package/lib/components/VRating/index.d.ts +309 -38
- package/lib/components/VResponsive/index.d.ts +144 -21
- package/lib/components/VSelect/VSelect.mjs +23 -8
- package/lib/components/VSelect/VSelect.mjs.map +1 -1
- package/lib/components/VSelect/index.d.ts +3150 -247
- package/lib/components/VSelectionControl/VSelectionControl.mjs +1 -4
- package/lib/components/VSelectionControl/VSelectionControl.mjs.map +1 -1
- package/lib/components/VSelectionControl/index.d.ts +90 -10
- package/lib/components/VSelectionControlGroup/index.d.ts +245 -35
- package/lib/components/VSheet/VSheet.mjs +16 -12
- package/lib/components/VSheet/VSheet.mjs.map +1 -1
- package/lib/components/VSheet/index.d.ts +196 -27
- package/lib/components/VSlideGroup/VSlideGroup.mjs.map +1 -1
- package/lib/components/VSlideGroup/index.d.ts +488 -70
- package/lib/components/VSlider/VSliderTrack.mjs +1 -0
- package/lib/components/VSlider/VSliderTrack.mjs.map +1 -1
- package/lib/components/VSlider/index.d.ts +523 -65
- package/lib/components/VSlider/slider.mjs +5 -6
- package/lib/components/VSlider/slider.mjs.map +1 -1
- package/lib/components/VSnackbar/VSnackbar.css +2 -9
- package/lib/components/VSnackbar/VSnackbar.mjs +10 -11
- package/lib/components/VSnackbar/VSnackbar.mjs.map +1 -1
- package/lib/components/VSnackbar/VSnackbar.sass +3 -10
- package/lib/components/VSnackbar/index.d.ts +1255 -74
- package/lib/components/VSwitch/VSwitch.mjs +2 -2
- package/lib/components/VSwitch/VSwitch.mjs.map +1 -1
- package/lib/components/VSwitch/index.d.ts +503 -75
- package/lib/components/VSystemBar/VSystemBar.css +5 -1
- package/lib/components/VSystemBar/VSystemBar.mjs +6 -2
- package/lib/components/VSystemBar/VSystemBar.mjs.map +1 -1
- package/lib/components/VSystemBar/VSystemBar.sass +5 -1
- package/lib/components/VSystemBar/_variables.scss +4 -1
- package/lib/components/VSystemBar/index.d.ts +186 -23
- package/lib/components/VTable/VTable.mjs.map +1 -1
- package/lib/components/VTable/index.d.ts +193 -26
- package/lib/components/VTabs/VTab.mjs +7 -23
- package/lib/components/VTabs/VTab.mjs.map +1 -1
- package/lib/components/VTabs/VTabs.mjs.map +1 -1
- package/lib/components/VTabs/index.d.ts +628 -64
- package/lib/components/VTextField/VTextField.mjs +9 -5
- package/lib/components/VTextField/VTextField.mjs.map +1 -1
- package/lib/components/VTextField/index.d.ts +1447 -101
- package/lib/components/VTextarea/VTextarea.mjs +8 -1
- package/lib/components/VTextarea/VTextarea.mjs.map +1 -1
- package/lib/components/VTextarea/index.d.ts +1043 -93
- package/lib/components/VThemeProvider/index.d.ts +127 -16
- package/lib/components/VTimeline/VTimelineDivider.mjs +18 -10
- package/lib/components/VTimeline/VTimelineDivider.mjs.map +1 -1
- package/lib/components/VTimeline/VTimelineItem.mjs.map +1 -1
- package/lib/components/VTimeline/index.d.ts +446 -60
- package/lib/components/VToolbar/VToolbar.mjs +10 -9
- package/lib/components/VToolbar/VToolbar.mjs.map +1 -1
- package/lib/components/VToolbar/VToolbarTitle.mjs.map +1 -1
- package/lib/components/VToolbar/index.d.ts +552 -73
- package/lib/components/VTooltip/VTooltip.css +3 -3
- package/lib/components/VTooltip/VTooltip.mjs +4 -4
- package/lib/components/VTooltip/VTooltip.mjs.map +1 -1
- package/lib/components/VTooltip/VTooltip.sass +1 -1
- package/lib/components/VTooltip/index.d.ts +1315 -73
- package/lib/components/VValidation/index.d.ts +204 -27
- package/lib/components/VWindow/index.d.ts +541 -75
- package/lib/components/index.d.ts +55694 -14389
- package/lib/components/transitions/createTransition.mjs +1 -1
- package/lib/components/transitions/createTransition.mjs.map +1 -1
- package/lib/components/transitions/index.d.ts +2144 -259
- package/lib/composables/defaults.mjs +5 -1
- package/lib/composables/defaults.mjs.map +1 -1
- package/lib/composables/display.mjs +15 -10
- package/lib/composables/display.mjs.map +1 -1
- package/lib/composables/form.mjs.map +1 -1
- package/lib/composables/loader.mjs.map +1 -1
- package/lib/composables/nested/nested.mjs +2 -2
- package/lib/composables/nested/nested.mjs.map +1 -1
- package/lib/composables/nested/selectStrategies.mjs +7 -1
- package/lib/composables/nested/selectStrategies.mjs.map +1 -1
- package/lib/composables/proxiedModel.mjs +1 -1
- package/lib/composables/proxiedModel.mjs.map +1 -1
- package/lib/composables/resizeObserver.mjs.map +1 -1
- package/lib/composables/stack.mjs +2 -2
- package/lib/composables/stack.mjs.map +1 -1
- package/lib/composables/theme.mjs +28 -23
- package/lib/composables/theme.mjs.map +1 -1
- package/lib/composables/variant.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/index.d.ts +6 -9
- package/lib/labs/VDataTable/VDataTable.css +15 -0
- package/lib/labs/VDataTable/VDataTable.mjs +45 -19
- package/lib/labs/VDataTable/VDataTable.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTable.sass +9 -0
- package/lib/labs/VDataTable/VDataTableFooter.mjs +3 -2
- package/lib/labs/VDataTable/VDataTableFooter.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableHeaders.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableRow.mjs +8 -2
- package/lib/labs/VDataTable/VDataTableRow.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableRows.mjs +6 -7
- package/lib/labs/VDataTable/VDataTableRows.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableServer.mjs +41 -19
- package/lib/labs/VDataTable/VDataTableServer.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableVirtual.mjs +27 -14
- package/lib/labs/VDataTable/VDataTableVirtual.mjs.map +1 -1
- package/lib/labs/VDataTable/composables/expand.mjs +1 -1
- package/lib/labs/VDataTable/composables/expand.mjs.map +1 -1
- package/lib/labs/VDataTable/composables/group.mjs +12 -1
- package/lib/labs/VDataTable/composables/group.mjs.map +1 -1
- package/lib/labs/VDataTable/composables/options.mjs +4 -10
- package/lib/labs/VDataTable/composables/options.mjs.map +1 -1
- package/lib/labs/VDataTable/composables/paginate.mjs +25 -4
- package/lib/labs/VDataTable/composables/paginate.mjs.map +1 -1
- package/lib/labs/VDataTable/composables/select.mjs +1 -1
- package/lib/labs/VDataTable/composables/select.mjs.map +1 -1
- package/lib/labs/VDataTable/composables/sort.mjs +19 -3
- package/lib/labs/VDataTable/composables/sort.mjs.map +1 -1
- package/lib/labs/VDataTable/index.d.ts +4934 -317
- package/lib/labs/VVirtualScroll/VVirtualScroll.mjs +18 -5
- package/lib/labs/VVirtualScroll/VVirtualScroll.mjs.map +1 -1
- package/lib/labs/VVirtualScroll/index.d.ts +41 -7
- package/lib/labs/components.d.ts +4970 -324
- package/lib/locale/adapters/vue-i18n.d.ts +1 -1
- package/lib/locale/adapters/vue-i18n.mjs +1 -1
- package/lib/locale/adapters/vue-i18n.mjs.map +1 -1
- package/lib/locale/index.mjs +1 -1
- package/lib/locale/index.mjs.map +1 -1
- package/lib/styles/elements/_global.sass +0 -4
- package/lib/styles/generic/_index.scss +0 -1
- package/lib/styles/generic/_transitions.scss +111 -9
- package/lib/styles/main.css +316 -167
- package/lib/styles/settings/_utilities.scss +7 -0
- package/lib/styles/tools/_sheet.sass +3 -6
- package/lib/styles/utilities/_display.sass +6 -5
- package/lib/styles/utilities/_elevation.scss +13 -0
- package/lib/styles/utilities/_index.sass +3 -2
- package/lib/styles/utilities/_screenreaders.sass +13 -11
- package/lib/util/animation.mjs +8 -1
- package/lib/util/animation.mjs.map +1 -1
- package/lib/util/colorUtils.mjs +4 -5
- package/lib/util/colorUtils.mjs.map +1 -1
- package/lib/util/defineComponent.mjs +15 -7
- package/lib/util/defineComponent.mjs.map +1 -1
- package/lib/util/helpers.mjs +4 -0
- package/lib/util/helpers.mjs.map +1 -1
- package/package.json +15 -7
- package/lib/styles/generic/_elevation.scss +0 -10
|
@@ -1,8 +1,164 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
|
+
import { ComponentPropsOptions, ExtractPropTypes, PropType } from 'vue';
|
|
3
|
+
|
|
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): [yes: Partial<Pick<T, U>>, no: Omit<T, U>];
|
|
6
|
+
}
|
|
2
7
|
|
|
3
8
|
declare function deepEqual(a: any, b: any): boolean;
|
|
4
9
|
|
|
5
|
-
declare const VChipGroup:
|
|
10
|
+
declare const VChipGroup: {
|
|
11
|
+
new (...args: any[]): {
|
|
12
|
+
$: vue.ComponentInternalInstance;
|
|
13
|
+
$data: {};
|
|
14
|
+
$props: Partial<{
|
|
15
|
+
filter: boolean;
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
multiple: boolean;
|
|
18
|
+
tag: string;
|
|
19
|
+
column: boolean;
|
|
20
|
+
variant: NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
|
|
21
|
+
modelValue: any;
|
|
22
|
+
selectedClass: string;
|
|
23
|
+
valueComparator: typeof deepEqual;
|
|
24
|
+
}> & Omit<{
|
|
25
|
+
filter: boolean;
|
|
26
|
+
disabled: boolean;
|
|
27
|
+
multiple: boolean;
|
|
28
|
+
tag: string;
|
|
29
|
+
column: boolean;
|
|
30
|
+
variant: NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
|
|
31
|
+
selectedClass: string;
|
|
32
|
+
valueComparator: typeof deepEqual;
|
|
33
|
+
} & {
|
|
34
|
+
max?: number | undefined;
|
|
35
|
+
color?: string | undefined;
|
|
36
|
+
mandatory?: boolean | "force" | undefined;
|
|
37
|
+
theme?: string | undefined;
|
|
38
|
+
modelValue?: any;
|
|
39
|
+
} & {
|
|
40
|
+
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
|
|
41
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
42
|
+
};
|
|
43
|
+
$slots?: {
|
|
44
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
45
|
+
} | undefined;
|
|
46
|
+
'v-slots'?: {
|
|
47
|
+
default?: false | (() => vue.VNodeChild) | undefined;
|
|
48
|
+
} | undefined;
|
|
49
|
+
} & {
|
|
50
|
+
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
|
|
51
|
+
} & {
|
|
52
|
+
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
53
|
+
} & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, "filter" | "disabled" | "multiple" | "tag" | "column" | "variant" | "modelValue" | "selectedClass" | "valueComparator">;
|
|
54
|
+
$attrs: {
|
|
55
|
+
[x: string]: unknown;
|
|
56
|
+
};
|
|
57
|
+
$refs: {
|
|
58
|
+
[x: string]: unknown;
|
|
59
|
+
};
|
|
60
|
+
$slots: Readonly<{
|
|
61
|
+
[name: string]: vue.Slot | undefined;
|
|
62
|
+
}>;
|
|
63
|
+
$root: vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
64
|
+
$parent: vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
65
|
+
$emit: (event: "update:modelValue", value: any) => void;
|
|
66
|
+
$el: any;
|
|
67
|
+
$options: vue.ComponentOptionsBase<{
|
|
68
|
+
filter: boolean;
|
|
69
|
+
disabled: boolean;
|
|
70
|
+
multiple: boolean;
|
|
71
|
+
tag: string;
|
|
72
|
+
column: boolean;
|
|
73
|
+
variant: NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
|
|
74
|
+
selectedClass: string;
|
|
75
|
+
valueComparator: typeof deepEqual;
|
|
76
|
+
} & {
|
|
77
|
+
max?: number | undefined;
|
|
78
|
+
color?: string | undefined;
|
|
79
|
+
mandatory?: boolean | "force" | undefined;
|
|
80
|
+
theme?: string | undefined;
|
|
81
|
+
modelValue?: any;
|
|
82
|
+
} & {
|
|
83
|
+
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
|
|
84
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
85
|
+
};
|
|
86
|
+
$slots?: {
|
|
87
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
88
|
+
} | undefined;
|
|
89
|
+
'v-slots'?: {
|
|
90
|
+
default?: false | (() => vue.VNodeChild) | undefined;
|
|
91
|
+
} | undefined;
|
|
92
|
+
} & {
|
|
93
|
+
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
|
|
94
|
+
} & {
|
|
95
|
+
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
96
|
+
}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
97
|
+
'update:modelValue': (value: any) => boolean;
|
|
98
|
+
}, string, {
|
|
99
|
+
filter: boolean;
|
|
100
|
+
disabled: boolean;
|
|
101
|
+
multiple: boolean;
|
|
102
|
+
tag: string;
|
|
103
|
+
column: boolean;
|
|
104
|
+
variant: NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
|
|
105
|
+
modelValue: any;
|
|
106
|
+
selectedClass: string;
|
|
107
|
+
valueComparator: typeof deepEqual;
|
|
108
|
+
}, {}, string> & {
|
|
109
|
+
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
110
|
+
created?: ((() => void) | (() => void)[]) | undefined;
|
|
111
|
+
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
112
|
+
mounted?: ((() => void) | (() => void)[]) | undefined;
|
|
113
|
+
beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
|
|
114
|
+
updated?: ((() => void) | (() => void)[]) | undefined;
|
|
115
|
+
activated?: ((() => void) | (() => void)[]) | undefined;
|
|
116
|
+
deactivated?: ((() => void) | (() => void)[]) | undefined;
|
|
117
|
+
beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
|
|
118
|
+
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
119
|
+
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
120
|
+
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
121
|
+
renderTracked?: (((e: vue.DebuggerEvent) => void) | ((e: vue.DebuggerEvent) => void)[]) | undefined;
|
|
122
|
+
renderTriggered?: (((e: vue.DebuggerEvent) => void) | ((e: vue.DebuggerEvent) => void)[]) | undefined;
|
|
123
|
+
errorCaptured?: (((err: unknown, instance: vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void) | ((err: unknown, instance: vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void)[]) | undefined;
|
|
124
|
+
};
|
|
125
|
+
$forceUpdate: () => void;
|
|
126
|
+
$nextTick: typeof vue.nextTick;
|
|
127
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: vue.WatchOptions<boolean> | undefined): vue.WatchStopHandle;
|
|
128
|
+
} & {
|
|
129
|
+
filter: boolean;
|
|
130
|
+
disabled: boolean;
|
|
131
|
+
multiple: boolean;
|
|
132
|
+
tag: string;
|
|
133
|
+
column: boolean;
|
|
134
|
+
variant: NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
|
|
135
|
+
selectedClass: string;
|
|
136
|
+
valueComparator: typeof deepEqual;
|
|
137
|
+
} & {
|
|
138
|
+
max?: number | undefined;
|
|
139
|
+
color?: string | undefined;
|
|
140
|
+
mandatory?: boolean | "force" | undefined;
|
|
141
|
+
theme?: string | undefined;
|
|
142
|
+
modelValue?: any;
|
|
143
|
+
} & {
|
|
144
|
+
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
|
|
145
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
146
|
+
};
|
|
147
|
+
$slots?: {
|
|
148
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
149
|
+
} | undefined;
|
|
150
|
+
'v-slots'?: {
|
|
151
|
+
default?: false | (() => vue.VNodeChild) | undefined;
|
|
152
|
+
} | undefined;
|
|
153
|
+
} & {
|
|
154
|
+
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
|
|
155
|
+
} & {
|
|
156
|
+
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
157
|
+
} & vue.ShallowUnwrapRef<{}> & {} & vue.ComponentCustomProperties & {};
|
|
158
|
+
__isFragment?: undefined;
|
|
159
|
+
__isTeleport?: undefined;
|
|
160
|
+
__isSuspense?: undefined;
|
|
161
|
+
} & vue.ComponentOptionsBase<{
|
|
6
162
|
filter: boolean;
|
|
7
163
|
disabled: boolean;
|
|
8
164
|
multiple: boolean;
|
|
@@ -21,32 +177,9 @@ declare const VChipGroup: vue.DefineComponent<{
|
|
|
21
177
|
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
|
|
22
178
|
default?: (() => vue.VNodeChild) | undefined;
|
|
23
179
|
};
|
|
24
|
-
|
|
25
|
-
default?: false | (() => vue.VNodeChild) | undefined;
|
|
26
|
-
} | undefined;
|
|
27
|
-
} & {
|
|
28
|
-
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
|
|
29
|
-
}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
30
|
-
'update:modelValue': (value: any) => boolean;
|
|
31
|
-
}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, {
|
|
32
|
-
filter: boolean;
|
|
33
|
-
disabled: boolean;
|
|
34
|
-
multiple: boolean;
|
|
35
|
-
tag: string;
|
|
36
|
-
column: boolean;
|
|
37
|
-
variant: NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
|
|
38
|
-
selectedClass: string;
|
|
39
|
-
valueComparator: typeof deepEqual;
|
|
40
|
-
} & {
|
|
41
|
-
max?: number | undefined;
|
|
42
|
-
color?: string | undefined;
|
|
43
|
-
mandatory?: boolean | "force" | undefined;
|
|
44
|
-
theme?: string | undefined;
|
|
45
|
-
modelValue?: any;
|
|
46
|
-
} & {
|
|
47
|
-
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
|
|
180
|
+
$slots?: {
|
|
48
181
|
default?: (() => vue.VNodeChild) | undefined;
|
|
49
|
-
};
|
|
182
|
+
} | undefined;
|
|
50
183
|
'v-slots'?: {
|
|
51
184
|
default?: false | (() => vue.VNodeChild) | undefined;
|
|
52
185
|
} | undefined;
|
|
@@ -54,7 +187,9 @@ declare const VChipGroup: vue.DefineComponent<{
|
|
|
54
187
|
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
|
|
55
188
|
} & {
|
|
56
189
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
57
|
-
}, {
|
|
190
|
+
}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
191
|
+
'update:modelValue': (value: any) => boolean;
|
|
192
|
+
}, string, {
|
|
58
193
|
filter: boolean;
|
|
59
194
|
disabled: boolean;
|
|
60
195
|
multiple: boolean;
|
|
@@ -64,7 +199,73 @@ declare const VChipGroup: vue.DefineComponent<{
|
|
|
64
199
|
modelValue: any;
|
|
65
200
|
selectedClass: string;
|
|
66
201
|
valueComparator: typeof deepEqual;
|
|
67
|
-
}
|
|
202
|
+
}, {}, string> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & FilterPropsOptions<{
|
|
203
|
+
color: StringConstructor;
|
|
204
|
+
variant: Omit<{
|
|
205
|
+
type: PropType<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
|
|
206
|
+
default: string;
|
|
207
|
+
validator: (v: any) => boolean;
|
|
208
|
+
}, "type" | "default"> & {
|
|
209
|
+
type: PropType<NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">>;
|
|
210
|
+
default: NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
|
|
211
|
+
};
|
|
212
|
+
theme: StringConstructor;
|
|
213
|
+
tag: {
|
|
214
|
+
type: StringConstructor;
|
|
215
|
+
default: string;
|
|
216
|
+
};
|
|
217
|
+
modelValue: {
|
|
218
|
+
type: null;
|
|
219
|
+
default: undefined;
|
|
220
|
+
};
|
|
221
|
+
multiple: BooleanConstructor;
|
|
222
|
+
mandatory: PropType<boolean | "force">;
|
|
223
|
+
max: NumberConstructor;
|
|
224
|
+
selectedClass: {
|
|
225
|
+
type: PropType<string>;
|
|
226
|
+
default: string;
|
|
227
|
+
};
|
|
228
|
+
disabled: BooleanConstructor;
|
|
229
|
+
column: BooleanConstructor;
|
|
230
|
+
filter: BooleanConstructor;
|
|
231
|
+
valueComparator: {
|
|
232
|
+
type: PropType<typeof deepEqual>;
|
|
233
|
+
default: typeof deepEqual;
|
|
234
|
+
};
|
|
235
|
+
}, vue.ExtractPropTypes<{
|
|
236
|
+
color: StringConstructor;
|
|
237
|
+
variant: Omit<{
|
|
238
|
+
type: PropType<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
|
|
239
|
+
default: string;
|
|
240
|
+
validator: (v: any) => boolean;
|
|
241
|
+
}, "type" | "default"> & {
|
|
242
|
+
type: PropType<NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">>;
|
|
243
|
+
default: NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
|
|
244
|
+
};
|
|
245
|
+
theme: StringConstructor;
|
|
246
|
+
tag: {
|
|
247
|
+
type: StringConstructor;
|
|
248
|
+
default: string;
|
|
249
|
+
};
|
|
250
|
+
modelValue: {
|
|
251
|
+
type: null;
|
|
252
|
+
default: undefined;
|
|
253
|
+
};
|
|
254
|
+
multiple: BooleanConstructor;
|
|
255
|
+
mandatory: PropType<boolean | "force">;
|
|
256
|
+
max: NumberConstructor;
|
|
257
|
+
selectedClass: {
|
|
258
|
+
type: PropType<string>;
|
|
259
|
+
default: string;
|
|
260
|
+
};
|
|
261
|
+
disabled: BooleanConstructor;
|
|
262
|
+
column: BooleanConstructor;
|
|
263
|
+
filter: BooleanConstructor;
|
|
264
|
+
valueComparator: {
|
|
265
|
+
type: PropType<typeof deepEqual>;
|
|
266
|
+
default: typeof deepEqual;
|
|
267
|
+
};
|
|
268
|
+
}>>;
|
|
68
269
|
type VChipGroup = InstanceType<typeof VChipGroup>;
|
|
69
270
|
|
|
70
271
|
export { VChipGroup };
|
|
@@ -1,11 +1,111 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
|
+
import { ComponentPropsOptions, ExtractPropTypes } from 'vue';
|
|
2
3
|
|
|
3
|
-
|
|
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): [yes: Partial<Pick<T, U>>, no: Omit<T, U>];
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
declare const VCode: {
|
|
9
|
+
new (...args: any[]): {
|
|
10
|
+
$: vue.ComponentInternalInstance;
|
|
11
|
+
$data: {};
|
|
12
|
+
$props: Partial<{
|
|
13
|
+
tag: string;
|
|
14
|
+
}> & Omit<{
|
|
15
|
+
tag: string;
|
|
16
|
+
} & {} & {
|
|
17
|
+
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
|
|
18
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
19
|
+
};
|
|
20
|
+
$slots?: {
|
|
21
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
22
|
+
} | undefined;
|
|
23
|
+
'v-slots'?: {
|
|
24
|
+
default?: false | (() => vue.VNodeChild) | undefined;
|
|
25
|
+
} | undefined;
|
|
26
|
+
} & {
|
|
27
|
+
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
|
|
28
|
+
} & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, "tag">;
|
|
29
|
+
$attrs: {
|
|
30
|
+
[x: string]: unknown;
|
|
31
|
+
};
|
|
32
|
+
$refs: {
|
|
33
|
+
[x: string]: unknown;
|
|
34
|
+
};
|
|
35
|
+
$slots: Readonly<{
|
|
36
|
+
[name: string]: vue.Slot | undefined;
|
|
37
|
+
}>;
|
|
38
|
+
$root: vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
39
|
+
$parent: vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
40
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
41
|
+
$el: any;
|
|
42
|
+
$options: vue.ComponentOptionsBase<{
|
|
43
|
+
tag: string;
|
|
44
|
+
} & {} & {
|
|
45
|
+
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
|
|
46
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
47
|
+
};
|
|
48
|
+
$slots?: {
|
|
49
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
50
|
+
} | undefined;
|
|
51
|
+
'v-slots'?: {
|
|
52
|
+
default?: false | (() => vue.VNodeChild) | undefined;
|
|
53
|
+
} | undefined;
|
|
54
|
+
} & {
|
|
55
|
+
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
|
|
56
|
+
}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
57
|
+
[key: string]: any;
|
|
58
|
+
}>, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, {
|
|
59
|
+
tag: string;
|
|
60
|
+
}, {}, string> & {
|
|
61
|
+
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
62
|
+
created?: ((() => void) | (() => void)[]) | undefined;
|
|
63
|
+
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
64
|
+
mounted?: ((() => void) | (() => void)[]) | undefined;
|
|
65
|
+
beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
|
|
66
|
+
updated?: ((() => void) | (() => void)[]) | undefined;
|
|
67
|
+
activated?: ((() => void) | (() => void)[]) | undefined;
|
|
68
|
+
deactivated?: ((() => void) | (() => void)[]) | undefined;
|
|
69
|
+
beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
|
|
70
|
+
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
71
|
+
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
72
|
+
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
73
|
+
renderTracked?: (((e: vue.DebuggerEvent) => void) | ((e: vue.DebuggerEvent) => void)[]) | undefined;
|
|
74
|
+
renderTriggered?: (((e: vue.DebuggerEvent) => void) | ((e: vue.DebuggerEvent) => void)[]) | undefined;
|
|
75
|
+
errorCaptured?: (((err: unknown, instance: vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void) | ((err: unknown, instance: vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void)[]) | undefined;
|
|
76
|
+
};
|
|
77
|
+
$forceUpdate: () => void;
|
|
78
|
+
$nextTick: typeof vue.nextTick;
|
|
79
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: vue.WatchOptions<boolean> | undefined): vue.WatchStopHandle;
|
|
80
|
+
} & {
|
|
81
|
+
tag: string;
|
|
82
|
+
} & {} & {
|
|
83
|
+
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
|
|
84
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
85
|
+
};
|
|
86
|
+
$slots?: {
|
|
87
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
88
|
+
} | undefined;
|
|
89
|
+
'v-slots'?: {
|
|
90
|
+
default?: false | (() => vue.VNodeChild) | undefined;
|
|
91
|
+
} | undefined;
|
|
92
|
+
} & {
|
|
93
|
+
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
|
|
94
|
+
} & vue.ShallowUnwrapRef<() => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
95
|
+
[key: string]: any;
|
|
96
|
+
}>> & {} & vue.ComponentCustomProperties & {};
|
|
97
|
+
__isFragment?: undefined;
|
|
98
|
+
__isTeleport?: undefined;
|
|
99
|
+
__isSuspense?: undefined;
|
|
100
|
+
} & vue.ComponentOptionsBase<{
|
|
4
101
|
tag: string;
|
|
5
102
|
} & {} & {
|
|
6
103
|
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
|
|
7
104
|
default?: (() => vue.VNodeChild) | undefined;
|
|
8
105
|
};
|
|
106
|
+
$slots?: {
|
|
107
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
108
|
+
} | undefined;
|
|
9
109
|
'v-slots'?: {
|
|
10
110
|
default?: false | (() => vue.VNodeChild) | undefined;
|
|
11
111
|
} | undefined;
|
|
@@ -13,20 +113,19 @@ declare const VCode: vue.DefineComponent<{
|
|
|
13
113
|
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
|
|
14
114
|
}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
15
115
|
[key: string]: any;
|
|
16
|
-
}>, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string,
|
|
116
|
+
}>, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, {
|
|
17
117
|
tag: string;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
118
|
+
}, {}, string> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & FilterPropsOptions<{
|
|
119
|
+
tag: {
|
|
120
|
+
type: StringConstructor;
|
|
121
|
+
default: string;
|
|
21
122
|
};
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
tag: string;
|
|
29
|
-
}>;
|
|
123
|
+
}, vue.ExtractPropTypes<{
|
|
124
|
+
tag: {
|
|
125
|
+
type: StringConstructor;
|
|
126
|
+
default: string;
|
|
127
|
+
};
|
|
128
|
+
}>>;
|
|
30
129
|
type VCode = InstanceType<typeof VCode>;
|
|
31
130
|
|
|
32
131
|
export { VCode };
|
|
@@ -11,7 +11,8 @@ import { VSheet } from "../VSheet/index.mjs"; // Composables
|
|
|
11
11
|
import { makeElevationProps } from "../../composables/elevation.mjs";
|
|
12
12
|
import { makeRoundedProps } from "../../composables/rounded.mjs";
|
|
13
13
|
import { makeThemeProps } from "../../composables/theme.mjs";
|
|
14
|
-
import { useProxiedModel } from "../../composables/proxiedModel.mjs";
|
|
14
|
+
import { useProxiedModel } from "../../composables/proxiedModel.mjs";
|
|
15
|
+
import { provideDefaults } from "../../composables/defaults.mjs"; // Utilities
|
|
15
16
|
import { defineComponent, HSVtoCSS, useRender } from "../../util/index.mjs";
|
|
16
17
|
import { extractColor, modes, nullColor, parseColor } from "./util/index.mjs";
|
|
17
18
|
import { onMounted, ref } from 'vue';
|
|
@@ -89,6 +90,13 @@ export const VColorPicker = defineComponent({
|
|
|
89
90
|
onMounted(() => {
|
|
90
91
|
if (!props.modes.includes(mode.value)) mode.value = props.modes[0];
|
|
91
92
|
});
|
|
93
|
+
provideDefaults({
|
|
94
|
+
VSlider: {
|
|
95
|
+
color: undefined,
|
|
96
|
+
trackColor: undefined,
|
|
97
|
+
trackFillColor: undefined
|
|
98
|
+
}
|
|
99
|
+
});
|
|
92
100
|
useRender(() => _createVNode(VSheet, {
|
|
93
101
|
"rounded": props.rounded,
|
|
94
102
|
"elevation": props.elevation,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VColorPicker.mjs","names":["VColorPickerCanvas","VColorPickerEdit","VColorPickerPreview","VColorPickerSwatches","VSheet","makeElevationProps","makeRoundedProps","makeThemeProps","useProxiedModel","defineComponent","HSVtoCSS","useRender","extractColor","modes","nullColor","parseColor","onMounted","ref","VColorPicker","name","props","canvasHeight","type","String","Number","default","disabled","Boolean","dotSize","hideCanvas","hideSliders","hideInputs","mode","validator","v","Object","keys","includes","Array","isArray","every","m","showSwatches","swatches","swatchesMaxHeight","modelValue","width","emits","color","setup","lastPickedColor","currentColor","undefined","c","value","h","updateColor","hsva","rounded","elevation","theme","a","endsWith"],"sources":["../../../src/components/VColorPicker/VColorPicker.tsx"],"sourcesContent":["// Styles\nimport './VColorPicker.sass'\n\n// Components\nimport { VColorPickerCanvas } from './VColorPickerCanvas'\nimport { VColorPickerEdit } from './VColorPickerEdit'\nimport { VColorPickerPreview } from './VColorPickerPreview'\nimport { VColorPickerSwatches } from './VColorPickerSwatches'\nimport { VSheet } from '@/components/VSheet'\n\n// Composables\nimport { makeElevationProps } from '@/composables/elevation'\nimport { makeRoundedProps } from '@/composables/rounded'\nimport { makeThemeProps } from '@/composables/theme'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { defineComponent, HSVtoCSS, useRender } from '@/util'\nimport { extractColor, modes, nullColor, parseColor } from './util'\nimport { onMounted, ref } from 'vue'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { HSV } from '@/util'\n\nexport const VColorPicker = defineComponent({\n name: 'VColorPicker',\n\n props: {\n canvasHeight: {\n type: [String, Number],\n default: 150,\n },\n disabled: Boolean,\n dotSize: {\n type: [Number, String],\n default: 10,\n },\n hideCanvas: Boolean,\n hideSliders: Boolean,\n hideInputs: Boolean,\n mode: {\n type: String,\n default: 'rgba',\n validator: (v: string) => Object.keys(modes).includes(v),\n },\n modes: {\n type: Array as PropType<string[]>,\n default: () => Object.keys(modes),\n validator: (v: any) => Array.isArray(v) && v.every(m => Object.keys(modes).includes(m)),\n },\n showSwatches: Boolean,\n swatches: Array as PropType<string[][]>,\n swatchesMaxHeight: {\n type: [Number, String],\n default: 150,\n },\n modelValue: {\n type: [Object, String] as PropType<Record<string, unknown> | string | undefined | null>,\n },\n width: {\n type: [Number, String],\n default: 300,\n },\n\n ...makeElevationProps(),\n ...makeRoundedProps(),\n ...makeThemeProps(),\n },\n\n emits: {\n 'update:modelValue': (color: any) => true,\n 'update:mode': (mode: string) => true,\n },\n\n setup (props) {\n const mode = useProxiedModel(props, 'mode')\n const lastPickedColor = ref<HSV | null>(null)\n const currentColor = useProxiedModel(\n props,\n 'modelValue',\n undefined,\n v => {\n let c = parseColor(v)\n\n if (!c) return null\n\n if (lastPickedColor.value) {\n c = { ...c, h: lastPickedColor.value.h }\n lastPickedColor.value = null\n }\n\n return c\n },\n v => {\n if (!v) return null\n\n return extractColor(v, props.modelValue)\n }\n )\n\n const updateColor = (hsva: HSV) => {\n currentColor.value = hsva\n lastPickedColor.value = hsva\n }\n\n onMounted(() => {\n if (!props.modes.includes(mode.value)) mode.value = props.modes[0]\n })\n\n useRender(() => (\n <VSheet\n rounded={ props.rounded }\n elevation={ props.elevation }\n theme={ props.theme }\n class={[\n 'v-color-picker',\n ]}\n style={{\n '--v-color-picker-color-hsv': HSVtoCSS({ ...(currentColor.value ?? nullColor), a: 1 }),\n }}\n maxWidth={ props.width }\n >\n { !props.hideCanvas && (\n <VColorPickerCanvas\n key=\"canvas\"\n color={ currentColor.value }\n onUpdate:color={ updateColor }\n disabled={ props.disabled }\n dotSize={ props.dotSize }\n width={ props.width }\n height={ props.canvasHeight }\n />\n )
|
|
1
|
+
{"version":3,"file":"VColorPicker.mjs","names":["VColorPickerCanvas","VColorPickerEdit","VColorPickerPreview","VColorPickerSwatches","VSheet","makeElevationProps","makeRoundedProps","makeThemeProps","useProxiedModel","provideDefaults","defineComponent","HSVtoCSS","useRender","extractColor","modes","nullColor","parseColor","onMounted","ref","VColorPicker","name","props","canvasHeight","type","String","Number","default","disabled","Boolean","dotSize","hideCanvas","hideSliders","hideInputs","mode","validator","v","Object","keys","includes","Array","isArray","every","m","showSwatches","swatches","swatchesMaxHeight","modelValue","width","emits","color","setup","lastPickedColor","currentColor","undefined","c","value","h","updateColor","hsva","VSlider","trackColor","trackFillColor","rounded","elevation","theme","a","endsWith"],"sources":["../../../src/components/VColorPicker/VColorPicker.tsx"],"sourcesContent":["// Styles\nimport './VColorPicker.sass'\n\n// Components\nimport { VColorPickerCanvas } from './VColorPickerCanvas'\nimport { VColorPickerEdit } from './VColorPickerEdit'\nimport { VColorPickerPreview } from './VColorPickerPreview'\nimport { VColorPickerSwatches } from './VColorPickerSwatches'\nimport { VSheet } from '@/components/VSheet'\n\n// Composables\nimport { makeElevationProps } from '@/composables/elevation'\nimport { makeRoundedProps } from '@/composables/rounded'\nimport { makeThemeProps } from '@/composables/theme'\nimport { useProxiedModel } from '@/composables/proxiedModel'\nimport { provideDefaults } from '@/composables/defaults'\n\n// Utilities\nimport { defineComponent, HSVtoCSS, useRender } from '@/util'\nimport { extractColor, modes, nullColor, parseColor } from './util'\nimport { onMounted, ref } from 'vue'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { HSV } from '@/util'\n\nexport const VColorPicker = defineComponent({\n name: 'VColorPicker',\n\n props: {\n canvasHeight: {\n type: [String, Number],\n default: 150,\n },\n disabled: Boolean,\n dotSize: {\n type: [Number, String],\n default: 10,\n },\n hideCanvas: Boolean,\n hideSliders: Boolean,\n hideInputs: Boolean,\n mode: {\n type: String,\n default: 'rgba',\n validator: (v: string) => Object.keys(modes).includes(v),\n },\n modes: {\n type: Array as PropType<string[]>,\n default: () => Object.keys(modes),\n validator: (v: any) => Array.isArray(v) && v.every(m => Object.keys(modes).includes(m)),\n },\n showSwatches: Boolean,\n swatches: Array as PropType<string[][]>,\n swatchesMaxHeight: {\n type: [Number, String],\n default: 150,\n },\n modelValue: {\n type: [Object, String] as PropType<Record<string, unknown> | string | undefined | null>,\n },\n width: {\n type: [Number, String],\n default: 300,\n },\n\n ...makeElevationProps(),\n ...makeRoundedProps(),\n ...makeThemeProps(),\n },\n\n emits: {\n 'update:modelValue': (color: any) => true,\n 'update:mode': (mode: string) => true,\n },\n\n setup (props) {\n const mode = useProxiedModel(props, 'mode')\n const lastPickedColor = ref<HSV | null>(null)\n const currentColor = useProxiedModel(\n props,\n 'modelValue',\n undefined,\n v => {\n let c = parseColor(v)\n\n if (!c) return null\n\n if (lastPickedColor.value) {\n c = { ...c, h: lastPickedColor.value.h }\n lastPickedColor.value = null\n }\n\n return c\n },\n v => {\n if (!v) return null\n\n return extractColor(v, props.modelValue)\n }\n )\n\n const updateColor = (hsva: HSV) => {\n currentColor.value = hsva\n lastPickedColor.value = hsva\n }\n\n onMounted(() => {\n if (!props.modes.includes(mode.value)) mode.value = props.modes[0]\n })\n\n provideDefaults({\n VSlider: {\n color: undefined,\n trackColor: undefined,\n trackFillColor: undefined,\n },\n })\n\n useRender(() => (\n <VSheet\n rounded={ props.rounded }\n elevation={ props.elevation }\n theme={ props.theme }\n class={[\n 'v-color-picker',\n ]}\n style={{\n '--v-color-picker-color-hsv': HSVtoCSS({ ...(currentColor.value ?? nullColor), a: 1 }),\n }}\n maxWidth={ props.width }\n >\n { !props.hideCanvas && (\n <VColorPickerCanvas\n key=\"canvas\"\n color={ currentColor.value }\n onUpdate:color={ updateColor }\n disabled={ props.disabled }\n dotSize={ props.dotSize }\n width={ props.width }\n height={ props.canvasHeight }\n />\n )}\n\n { (!props.hideSliders || !props.hideInputs) && (\n <div key=\"controls\" class=\"v-color-picker__controls\">\n { !props.hideSliders && (\n <VColorPickerPreview\n key=\"preview\"\n color={ currentColor.value }\n onUpdate:color={ updateColor }\n hideAlpha={ !mode.value.endsWith('a') }\n disabled={ props.disabled }\n />\n )}\n\n { !props.hideInputs && (\n <VColorPickerEdit\n key=\"edit\"\n modes={ props.modes }\n mode={ mode.value }\n onUpdate:mode={ m => mode.value = m }\n color={ currentColor.value }\n onUpdate:color={ updateColor }\n disabled={ props.disabled }\n />\n )}\n </div>\n )}\n\n { props.showSwatches && (\n <VColorPickerSwatches\n key=\"swatches\"\n color={ currentColor.value }\n onUpdate:color={ updateColor }\n maxHeight={ props.swatchesMaxHeight }\n swatches={ props.swatches }\n disabled={ props.disabled }\n />\n )}\n </VSheet>\n ))\n\n return {}\n },\n})\n\nexport type VColorPicker = InstanceType<typeof VColorPicker>\n"],"mappings":"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"}
|
|
@@ -2,7 +2,8 @@ import { createVNode as _createVNode } from "vue";
|
|
|
2
2
|
// Styles
|
|
3
3
|
import "./VColorPickerCanvas.css";
|
|
4
4
|
|
|
5
|
-
//
|
|
5
|
+
// Composables
|
|
6
|
+
import { useResizeObserver } from "../../composables/resizeObserver.mjs"; // Utilities
|
|
6
7
|
import { clamp, convertToUnit, defineComponent, getEventCoordinates, useRender } from "../../util/index.mjs";
|
|
7
8
|
import { computed, onMounted, ref, watch } from 'vue';
|
|
8
9
|
|
|
@@ -55,6 +56,19 @@ export const VColorPickerCanvas = defineComponent({
|
|
|
55
56
|
};
|
|
56
57
|
});
|
|
57
58
|
const canvasRef = ref();
|
|
59
|
+
const canvasWidth = ref(parseFloat(props.width));
|
|
60
|
+
const canvasHeight = ref(parseFloat(props.height));
|
|
61
|
+
const {
|
|
62
|
+
resizeRef
|
|
63
|
+
} = useResizeObserver(entries => {
|
|
64
|
+
if (!resizeRef.value?.offsetParent) return;
|
|
65
|
+
const {
|
|
66
|
+
width,
|
|
67
|
+
height
|
|
68
|
+
} = entries[0].contentRect;
|
|
69
|
+
canvasWidth.value = width;
|
|
70
|
+
canvasHeight.value = height;
|
|
71
|
+
});
|
|
58
72
|
function updateDotPosition(x, y, rect) {
|
|
59
73
|
const {
|
|
60
74
|
left,
|
|
@@ -99,18 +113,14 @@ export const VColorPickerCanvas = defineComponent({
|
|
|
99
113
|
return;
|
|
100
114
|
}
|
|
101
115
|
if (!canvasRef.value) return;
|
|
102
|
-
const {
|
|
103
|
-
width,
|
|
104
|
-
height
|
|
105
|
-
} = canvasRef.value.getBoundingClientRect();
|
|
106
116
|
const {
|
|
107
117
|
x,
|
|
108
118
|
y
|
|
109
119
|
} = dotPosition.value;
|
|
110
120
|
emit('update:color', {
|
|
111
121
|
h: props.color?.h ?? 0,
|
|
112
|
-
s: clamp(x, 0,
|
|
113
|
-
v: 1 - clamp(y, 0,
|
|
122
|
+
s: clamp(x, 0, canvasWidth.value) / canvasWidth.value,
|
|
123
|
+
v: 1 - clamp(y, 0, canvasHeight.value) / canvasHeight.value,
|
|
114
124
|
a: props.color?.a ?? 1
|
|
115
125
|
});
|
|
116
126
|
});
|
|
@@ -133,16 +143,27 @@ export const VColorPickerCanvas = defineComponent({
|
|
|
133
143
|
watch(() => props.color?.h, updateCanvas, {
|
|
134
144
|
immediate: true
|
|
135
145
|
});
|
|
146
|
+
watch(() => [canvasWidth.value, canvasHeight.value], (newVal, oldVal) => {
|
|
147
|
+
updateCanvas();
|
|
148
|
+
dotPosition.value = {
|
|
149
|
+
x: dotPosition.value.x * newVal[0] / oldVal[0],
|
|
150
|
+
y: dotPosition.value.y * newVal[1] / oldVal[1]
|
|
151
|
+
};
|
|
152
|
+
}, {
|
|
153
|
+
flush: 'post'
|
|
154
|
+
});
|
|
136
155
|
watch(() => props.color, () => {
|
|
137
156
|
if (isInteracting.value) {
|
|
138
157
|
isInteracting.value = false;
|
|
139
158
|
return;
|
|
140
159
|
}
|
|
141
|
-
if (!props.color) return;
|
|
142
160
|
isOutsideUpdate.value = true;
|
|
143
|
-
dotPosition.value = {
|
|
144
|
-
x: props.color.s *
|
|
145
|
-
y: (1 - props.color.v) *
|
|
161
|
+
dotPosition.value = props.color ? {
|
|
162
|
+
x: props.color.s * canvasWidth.value,
|
|
163
|
+
y: (1 - props.color.v) * canvasHeight.value
|
|
164
|
+
} : {
|
|
165
|
+
x: 0,
|
|
166
|
+
y: 0
|
|
146
167
|
};
|
|
147
168
|
}, {
|
|
148
169
|
deep: true,
|
|
@@ -150,19 +171,16 @@ export const VColorPickerCanvas = defineComponent({
|
|
|
150
171
|
});
|
|
151
172
|
onMounted(() => updateCanvas());
|
|
152
173
|
useRender(() => _createVNode("div", {
|
|
174
|
+
"ref": resizeRef,
|
|
153
175
|
"class": "v-color-picker-canvas",
|
|
154
|
-
"style": {
|
|
155
|
-
width: convertToUnit(props.width),
|
|
156
|
-
height: convertToUnit(props.height)
|
|
157
|
-
},
|
|
158
176
|
"onClick": handleClick,
|
|
159
177
|
"onMousedown": handleMouseDown,
|
|
160
178
|
"onTouchstart": handleMouseDown
|
|
161
179
|
}, [_createVNode("canvas", {
|
|
162
180
|
"ref": canvasRef,
|
|
163
|
-
"width":
|
|
164
|
-
"height":
|
|
165
|
-
}, null), _createVNode("div", {
|
|
181
|
+
"width": canvasWidth.value,
|
|
182
|
+
"height": canvasHeight.value
|
|
183
|
+
}, null), props.color && _createVNode("div", {
|
|
166
184
|
"class": ['v-color-picker-canvas__dot', {
|
|
167
185
|
'v-color-picker-canvas__dot--disabled': props.disabled
|
|
168
186
|
}],
|