vuetify 3.2.4 → 3.3.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/dist/_component-variables-labs.sass +1 -0
- package/dist/json/attributes.json +2503 -2151
- package/dist/json/importMap-labs.json +12 -4
- package/dist/json/importMap.json +28 -28
- package/dist/json/tags.json +107 -9
- package/dist/json/web-types.json +10785 -7110
- package/dist/vuetify-labs.css +263 -153
- package/dist/vuetify-labs.d.ts +35870 -16257
- package/dist/vuetify-labs.esm.js +1466 -934
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +1465 -933
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +246 -168
- package/dist/vuetify.d.ts +27883 -14061
- package/dist/vuetify.esm.js +477 -300
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +476 -299
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +811 -806
- package/dist/vuetify.min.js.map +1 -1
- package/lib/blueprints/{index.d.ts → index.d.mts} +5 -1
- package/lib/blueprints/{md1.d.ts → md1.d.mts} +5 -1
- package/lib/blueprints/{md2.d.ts → md2.d.mts} +5 -1
- package/lib/blueprints/{md3.d.ts → md3.d.mts} +5 -1
- package/lib/components/VAlert/VAlert.mjs.map +1 -1
- package/lib/components/VAlert/{index.d.ts → index.d.mts} +284 -69
- package/lib/components/VApp/{index.d.ts → index.d.mts} +80 -19
- package/lib/components/VAppBar/{index.d.ts → index.d.mts} +391 -119
- package/lib/components/VAutocomplete/VAutocomplete.css +15 -9
- package/lib/components/VAutocomplete/VAutocomplete.mjs +82 -34
- package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.sass +15 -11
- package/lib/components/VAutocomplete/index.d.mts +2048 -0
- package/lib/components/VAvatar/{index.d.ts → index.d.mts} +85 -30
- package/lib/components/VBadge/_variables.scss +1 -1
- package/lib/components/VBadge/{index.d.ts → index.d.mts} +105 -42
- package/lib/components/VBanner/{index.d.ts → index.d.mts} +282 -63
- package/lib/components/VBottomNavigation/{index.d.ts → index.d.mts} +93 -45
- package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs +1 -1
- package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs.map +1 -1
- package/lib/components/VBreadcrumbs/VBreadcrumbsDivider.mjs +1 -1
- package/lib/components/VBreadcrumbs/VBreadcrumbsDivider.mjs.map +1 -1
- package/lib/components/VBreadcrumbs/{index.d.ts → index.d.mts} +348 -212
- package/lib/components/VBtn/{index.d.ts → index.d.mts} +139 -53
- package/lib/components/VBtnGroup/{index.d.ts → index.d.mts} +84 -27
- package/lib/components/VBtnToggle/{index.d.ts → index.d.mts} +88 -35
- package/lib/components/VCalendar/util/props.mjs.map +1 -1
- package/lib/components/VCard/VCard.mjs.map +1 -1
- package/lib/components/VCard/{index.d.ts → index.d.mts} +957 -419
- package/lib/components/VCarousel/VCarousel.mjs.map +1 -1
- package/lib/components/VCarousel/{index.d.ts → index.d.mts} +616 -111
- package/lib/components/VCheckbox/VCheckboxBtn.mjs +3 -3
- package/lib/components/VCheckbox/VCheckboxBtn.mjs.map +1 -1
- package/lib/components/VCheckbox/{index.d.ts → index.d.mts} +408 -141
- package/lib/components/VChip/VChip.css +4 -2
- package/lib/components/VChip/VChip.mjs.map +1 -1
- package/lib/components/VChip/VChip.sass +3 -2
- package/lib/components/VChip/{index.d.ts → index.d.mts} +376 -85
- package/lib/components/VChipGroup/VChipGroup.mjs.map +1 -1
- package/lib/components/VChipGroup/index.d.mts +470 -0
- package/lib/components/VCode/{index.d.ts → index.d.mts} +78 -17
- package/lib/components/VColorPicker/VColorPicker.mjs +9 -4
- package/lib/components/VColorPicker/VColorPicker.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPickerEdit.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPickerSwatches.mjs +5 -4
- package/lib/components/VColorPicker/VColorPickerSwatches.mjs.map +1 -1
- package/lib/components/VColorPicker/{index.d.ts → index.d.mts} +241 -109
- package/lib/components/VColorPicker/util/index.mjs +2 -22
- package/lib/components/VColorPicker/util/index.mjs.map +1 -1
- package/lib/components/VCombobox/VCombobox.css +15 -9
- package/lib/components/VCombobox/VCombobox.mjs +82 -37
- package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
- package/lib/components/VCombobox/VCombobox.sass +15 -11
- package/lib/components/VCombobox/index.d.mts +2060 -0
- package/lib/components/VCounter/VCounter.mjs.map +1 -1
- package/lib/components/VCounter/{index.d.ts → index.d.mts} +105 -45
- package/lib/components/VDefaultsProvider/{index.d.ts → index.d.mts} +82 -20
- package/lib/components/VDialog/{index.d.ts → index.d.mts} +571 -305
- package/lib/components/VDivider/{index.d.ts → index.d.mts} +81 -21
- package/lib/components/VExpansionPanel/{index.d.ts → index.d.mts} +374 -110
- package/lib/components/VField/VField.css +49 -16
- package/lib/components/VField/VField.mjs +12 -2
- package/lib/components/VField/VField.mjs.map +1 -1
- package/lib/components/VField/VField.sass +40 -11
- package/lib/components/VField/_variables.scss +8 -2
- package/lib/components/VField/index.d.mts +682 -0
- package/lib/components/VFileInput/VFileInput.css +3 -0
- package/lib/components/VFileInput/VFileInput.mjs +7 -1
- package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
- package/lib/components/VFileInput/VFileInput.sass +6 -1
- package/lib/components/VFileInput/{index.d.ts → index.d.mts} +1033 -399
- package/lib/components/VFooter/{index.d.ts → index.d.mts} +85 -29
- package/lib/components/VForm/VForm.mjs.map +1 -1
- package/lib/components/VForm/index.d.mts +993 -0
- package/lib/components/VGrid/{index.d.ts → index.d.mts} +334 -100
- package/lib/components/VHover/VHover.mjs.map +1 -1
- package/lib/components/VHover/{index.d.ts → index.d.mts} +120 -37
- package/lib/components/VIcon/{index.d.ts → index.d.mts} +322 -81
- package/lib/components/VImg/VImg.css +2 -4
- package/lib/components/VImg/VImg.mjs +25 -24
- package/lib/components/VImg/VImg.mjs.map +1 -1
- package/lib/components/VImg/VImg.sass +4 -3
- package/lib/components/VImg/{index.d.ts → index.d.mts} +177 -40
- package/lib/components/VInput/VInput.css +10 -4
- package/lib/components/VInput/VInput.mjs +9 -3
- package/lib/components/VInput/VInput.mjs.map +1 -1
- package/lib/components/VInput/VInput.sass +7 -2
- package/lib/components/VInput/_variables.scss +1 -0
- package/lib/components/VInput/{index.d.ts → index.d.mts} +237 -93
- package/lib/components/VItemGroup/VItem.mjs +1 -1
- package/lib/components/VItemGroup/VItem.mjs.map +1 -1
- package/lib/components/VItemGroup/VItemGroup.mjs.map +1 -1
- package/lib/components/VItemGroup/index.d.mts +781 -0
- package/lib/components/VKbd/{index.d.ts → index.d.mts} +78 -17
- package/lib/components/VLabel/{index.d.ts → index.d.mts} +79 -18
- package/lib/components/VLayout/{index.d.ts → index.d.mts} +161 -42
- package/lib/components/VLazy/{index.d.ts → index.d.mts} +82 -27
- package/lib/components/VList/VList.mjs +6 -1
- package/lib/components/VList/VList.mjs.map +1 -1
- package/lib/components/VList/VListChildren.mjs +4 -8
- package/lib/components/VList/VListChildren.mjs.map +1 -1
- package/lib/components/VList/VListGroup.mjs +3 -0
- package/lib/components/VList/VListGroup.mjs.map +1 -1
- package/lib/components/VList/VListItem.mjs +11 -6
- package/lib/components/VList/VListItem.mjs.map +1 -1
- package/lib/components/VList/{index.d.ts → index.d.mts} +1245 -619
- package/lib/components/VLocaleProvider/{index.d.ts → index.d.mts} +80 -19
- package/lib/components/VMain/{index.d.ts → index.d.mts} +79 -19
- package/lib/components/VMenu/{index.d.ts → index.d.mts} +567 -299
- package/lib/components/VMessages/VMessages.mjs.map +1 -1
- package/lib/components/VMessages/{index.d.ts → index.d.mts} +87 -34
- package/lib/components/VNavigationDrawer/VNavigationDrawer.css +2 -0
- package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs.map +1 -1
- package/lib/components/VNavigationDrawer/VNavigationDrawer.sass +2 -0
- package/lib/components/VNavigationDrawer/{index.d.ts → index.d.mts} +139 -57
- package/lib/components/VOverlay/{index.d.ts → index.d.mts} +159 -75
- package/lib/components/VPagination/VPagination.mjs.map +1 -1
- package/lib/components/VPagination/{index.d.ts → index.d.mts} +229 -125
- package/lib/components/VParallax/{index.d.ts → index.d.mts} +118 -18
- package/lib/components/VProgressCircular/VProgressCircular.mjs.map +1 -1
- package/lib/components/VProgressCircular/{index.d.ts → index.d.mts} +148 -45
- package/lib/components/VProgressLinear/{index.d.ts → index.d.mts} +119 -52
- package/lib/components/VRadio/{index.d.ts → index.d.mts} +139 -40
- package/lib/components/VRadioGroup/{index.d.ts → index.d.mts} +265 -93
- package/lib/components/VRangeSlider/VRangeSlider.mjs +4 -4
- package/lib/components/VRangeSlider/VRangeSlider.mjs.map +1 -1
- package/lib/components/VRangeSlider/{index.d.ts → index.d.mts} +313 -132
- package/lib/components/VRating/{index.d.ts → index.d.mts} +108 -49
- package/lib/components/VResponsive/VResponsive.css +13 -5
- package/lib/components/VResponsive/VResponsive.mjs +4 -1
- package/lib/components/VResponsive/VResponsive.mjs.map +1 -1
- package/lib/components/VResponsive/VResponsive.sass +12 -4
- package/lib/components/VResponsive/{index.d.ts → index.d.mts} +99 -16
- package/lib/components/VSelect/VSelect.css +15 -9
- package/lib/components/VSelect/VSelect.mjs +23 -18
- package/lib/components/VSelect/VSelect.mjs.map +1 -1
- package/lib/components/VSelect/VSelect.sass +14 -11
- package/lib/components/VSelect/index.d.mts +1986 -0
- package/lib/components/VSelectionControl/VSelectionControl.mjs.map +1 -1
- package/lib/components/VSelectionControl/index.d.mts +403 -0
- package/lib/components/VSelectionControlGroup/{index.d.ts → index.d.mts} +90 -38
- package/lib/components/VSheet/{index.d.ts → index.d.mts} +81 -21
- package/lib/components/VSlideGroup/{index.d.ts → index.d.mts} +236 -61
- package/lib/components/VSlider/VSlider.mjs +2 -2
- package/lib/components/VSlider/VSlider.mjs.map +1 -1
- package/lib/components/VSlider/VSliderThumb.mjs +1 -1
- package/lib/components/VSlider/VSliderThumb.mjs.map +1 -1
- package/lib/components/VSlider/VSliderTrack.mjs.map +1 -1
- package/lib/components/VSlider/{index.d.ts → index.d.mts} +308 -126
- package/lib/components/VSlider/slider.mjs +8 -2
- package/lib/components/VSlider/slider.mjs.map +1 -1
- package/lib/components/VSnackbar/{index.d.ts → index.d.mts} +566 -297
- package/lib/components/VSwitch/VSwitch.css +3 -3
- package/lib/components/VSwitch/VSwitch.sass +4 -3
- package/lib/components/VSwitch/{index.d.ts → index.d.mts} +284 -101
- package/lib/components/VSystemBar/{index.d.ts → index.d.mts} +84 -27
- package/lib/components/VTable/{index.d.ts → index.d.mts} +122 -26
- package/lib/components/VTabs/VTabs.mjs.map +1 -1
- package/lib/components/VTabs/{index.d.ts → index.d.mts} +203 -113
- package/lib/components/VTextField/VTextField.css +9 -1
- package/lib/components/VTextField/VTextField.mjs +4 -2
- package/lib/components/VTextField/VTextField.mjs.map +1 -1
- package/lib/components/VTextField/VTextField.sass +8 -1
- package/lib/components/VTextField/index.d.mts +2735 -0
- package/lib/components/VTextarea/VTextarea.mjs +13 -4
- package/lib/components/VTextarea/VTextarea.mjs.map +1 -1
- package/lib/components/VTextarea/{index.d.ts → index.d.mts} +933 -393
- package/lib/components/VThemeProvider/{index.d.ts → index.d.mts} +80 -20
- package/lib/components/VTimeline/{index.d.ts → index.d.mts} +201 -62
- package/lib/components/VToolbar/{index.d.ts → index.d.mts} +325 -73
- package/lib/components/VTooltip/{index.d.ts → index.d.mts} +568 -297
- package/lib/components/VValidation/VValidation.mjs.map +1 -1
- package/lib/components/VValidation/index.d.mts +634 -0
- package/lib/components/VVirtualScroll/VVirtualScroll.mjs.map +1 -1
- package/lib/components/VVirtualScroll/index.d.mts +229 -0
- package/lib/components/VWindow/{index.d.ts → index.d.mts} +271 -68
- package/lib/components/{index.d.ts → index.d.mts} +27847 -14031
- package/lib/components/index.mjs +2 -3
- package/lib/components/index.mjs.map +1 -1
- package/lib/components/transitions/{index.d.ts → index.d.mts} +1330 -355
- package/lib/composables/display.mjs +6 -6
- package/lib/composables/display.mjs.map +1 -1
- package/lib/composables/filter.mjs +5 -4
- package/lib/composables/filter.mjs.map +1 -1
- package/lib/composables/form.mjs +2 -3
- package/lib/composables/form.mjs.map +1 -1
- package/lib/composables/forwardRefs.mjs.map +1 -1
- package/lib/composables/group.mjs +13 -13
- package/lib/composables/group.mjs.map +1 -1
- package/lib/composables/icons.mjs.map +1 -1
- package/lib/composables/{items.mjs → list-items.mjs} +9 -6
- package/lib/composables/list-items.mjs.map +1 -0
- package/lib/composables/nested/nested.mjs.map +1 -1
- package/lib/composables/nested/selectStrategies.mjs.map +1 -1
- package/lib/composables/scroll.mjs +2 -2
- package/lib/composables/scroll.mjs.map +1 -1
- package/lib/composables/validation.mjs +44 -16
- package/lib/composables/validation.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/framework.mjs.map +1 -1
- package/lib/{index.d.ts → index.d.mts} +16 -10
- package/lib/labs/VBottomSheet/VBottomSheet.css +33 -0
- package/lib/labs/VBottomSheet/VBottomSheet.mjs +40 -0
- package/lib/labs/VBottomSheet/VBottomSheet.mjs.map +1 -0
- package/lib/labs/VBottomSheet/VBottomSheet.sass +37 -0
- package/lib/labs/VBottomSheet/_variables.scss +5 -0
- package/lib/labs/VBottomSheet/index.d.mts +871 -0
- package/lib/labs/VBottomSheet/index.mjs +2 -0
- package/lib/labs/VBottomSheet/index.mjs.map +1 -0
- package/lib/labs/VDataIterator/VDataIterator.mjs +160 -0
- package/lib/labs/VDataIterator/VDataIterator.mjs.map +1 -0
- package/lib/labs/VDataIterator/composables/items.mjs +37 -0
- package/lib/labs/VDataIterator/composables/items.mjs.map +1 -0
- package/lib/labs/VDataIterator/index.d.mts +704 -0
- package/lib/labs/VDataIterator/index.mjs +2 -0
- package/lib/labs/VDataIterator/index.mjs.map +1 -0
- package/lib/labs/VDataTable/VDataTable.mjs +58 -20
- package/lib/labs/VDataTable/VDataTable.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableFooter.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableGroupHeaderRow.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableHeaders.mjs +17 -10
- package/lib/labs/VDataTable/VDataTableHeaders.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableRows.mjs +1 -1
- package/lib/labs/VDataTable/VDataTableRows.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableServer.mjs +50 -14
- package/lib/labs/VDataTable/VDataTableServer.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableVirtual.mjs +50 -13
- package/lib/labs/VDataTable/VDataTableVirtual.mjs.map +1 -1
- package/lib/labs/VDataTable/composables/expand.mjs.map +1 -1
- package/lib/labs/VDataTable/composables/group.mjs +8 -6
- package/lib/labs/VDataTable/composables/group.mjs.map +1 -1
- package/lib/labs/VDataTable/composables/headers.mjs +2 -3
- package/lib/labs/VDataTable/composables/headers.mjs.map +1 -1
- package/lib/labs/VDataTable/composables/items.mjs +31 -32
- package/lib/labs/VDataTable/composables/items.mjs.map +1 -1
- package/lib/labs/VDataTable/composables/paginate.mjs +14 -2
- package/lib/labs/VDataTable/composables/paginate.mjs.map +1 -1
- package/lib/labs/VDataTable/composables/select.mjs +3 -3
- package/lib/labs/VDataTable/composables/select.mjs.map +1 -1
- package/lib/labs/VDataTable/composables/sort.mjs +17 -17
- package/lib/labs/VDataTable/composables/sort.mjs.map +1 -1
- package/lib/labs/VDataTable/composables/virtual.mjs.map +1 -1
- package/lib/labs/VDataTable/index.d.mts +9681 -0
- package/lib/labs/VDataTable/index.mjs +1 -1
- package/lib/labs/VDataTable/index.mjs.map +1 -1
- package/lib/labs/VDataTable/types.mjs.map +1 -1
- package/lib/labs/VInfiniteScroll/VInfiniteScroll.mjs.map +1 -1
- package/lib/labs/VInfiniteScroll/{index.d.ts → index.d.mts} +161 -54
- package/lib/labs/VSkeletonLoader/VSkeletonLoader.mjs.map +1 -1
- package/lib/labs/VSkeletonLoader/{index.d.ts → index.d.mts} +92 -31
- package/lib/labs/components.d.mts +11806 -0
- package/lib/labs/components.mjs +2 -0
- package/lib/labs/components.mjs.map +1 -1
- package/lib/labs/date/date.mjs.map +1 -1
- package/lib/labs/date/index.d.mts +70 -0
- package/lib/labs/date/index.mjs +1 -1
- package/lib/labs/date/index.mjs.map +1 -1
- package/lib/styles/settings/_variables.scss +3 -3
- package/lib/util/colorUtils.mjs +68 -3
- package/lib/util/colorUtils.mjs.map +1 -1
- package/lib/util/console.mjs +12 -81
- package/lib/util/console.mjs.map +1 -1
- package/lib/util/defineComponent.mjs.map +1 -1
- package/lib/util/helpers.mjs +4 -18
- package/lib/util/helpers.mjs.map +1 -1
- package/lib/util/propsFactory.mjs +2 -0
- package/lib/util/propsFactory.mjs.map +1 -1
- package/package.json +13 -9
- package/lib/components/VAutocomplete/index.d.ts +0 -2050
- package/lib/components/VBottomSheet/VBottomSheet.mjs +0 -29
- package/lib/components/VBottomSheet/VBottomSheet.mjs.map +0 -1
- package/lib/components/VBottomSheet/VBottomSheet.sass +0 -23
- package/lib/components/VBottomSheet/_variables.scss +0 -3
- package/lib/components/VBottomSheet/index.mjs +0 -4
- package/lib/components/VBottomSheet/index.mjs.map +0 -1
- package/lib/components/VChipGroup/index.d.ts +0 -280
- package/lib/components/VCombobox/index.d.ts +0 -2086
- package/lib/components/VData/VData.mjs +0 -374
- package/lib/components/VData/VData.mjs.map +0 -1
- package/lib/components/VData/index.mjs +0 -4
- package/lib/components/VData/index.mjs.map +0 -1
- package/lib/components/VDataIterator/VDataFooter.mjs +0 -194
- package/lib/components/VDataIterator/VDataFooter.mjs.map +0 -1
- package/lib/components/VDataIterator/VDataFooter.sass +0 -71
- package/lib/components/VDataIterator/VDataIterator.mjs +0 -316
- package/lib/components/VDataIterator/VDataIterator.mjs.map +0 -1
- package/lib/components/VDataIterator/_variables.scss +0 -13
- package/lib/components/VDataIterator/index.mjs +0 -10
- package/lib/components/VDataIterator/index.mjs.map +0 -1
- package/lib/components/VField/index.d.ts +0 -563
- package/lib/components/VForm/index.d.ts +0 -284
- package/lib/components/VItemGroup/index.d.ts +0 -396
- package/lib/components/VSelect/index.d.ts +0 -1981
- package/lib/components/VSelectionControl/index.d.ts +0 -387
- package/lib/components/VTextField/index.d.ts +0 -2061
- package/lib/components/VValidation/index.d.ts +0 -243
- package/lib/components/VVirtualScroll/index.d.ts +0 -197
- package/lib/composables/items.mjs.map +0 -1
- package/lib/labs/VDataTable/index.d.ts +0 -5415
- package/lib/labs/components.d.ts +0 -5945
- package/lib/labs/date/index.d.ts +0 -38
- /package/lib/components/VNoSsr/{index.d.ts → index.d.mts} +0 -0
- /package/lib/directives/{index.d.ts → index.d.mts} +0 -0
- /package/lib/iconsets/{fa-svg.d.ts → fa-svg.d.mts} +0 -0
- /package/lib/iconsets/{fa.d.ts → fa.d.mts} +0 -0
- /package/lib/iconsets/{fa4.d.ts → fa4.d.mts} +0 -0
- /package/lib/iconsets/{md.d.ts → md.d.mts} +0 -0
- /package/lib/iconsets/{mdi-svg.d.ts → mdi-svg.d.mts} +0 -0
- /package/lib/iconsets/{mdi.d.ts → mdi.d.mts} +0 -0
- /package/lib/labs/date/adapters/{vuetify.d.ts → vuetify.d.mts} +0 -0
- /package/lib/locale/adapters/{vue-i18n.d.ts → vue-i18n.d.mts} +0 -0
- /package/lib/locale/adapters/{vuetify.d.ts → vuetify.d.mts} +0 -0
- /package/lib/locale/{index.d.ts → index.d.mts} +0 -0
|
@@ -1,93 +1,150 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
2
|
import { ComponentPropsOptions, ExtractPropTypes, PropType } from 'vue';
|
|
3
3
|
|
|
4
|
+
type HSV = {
|
|
5
|
+
h: number;
|
|
6
|
+
s: number;
|
|
7
|
+
v: number;
|
|
8
|
+
a?: number;
|
|
9
|
+
};
|
|
10
|
+
|
|
4
11
|
interface FilterPropsOptions<PropsOptions extends Readonly<ComponentPropsOptions>, Props = ExtractPropTypes<PropsOptions>> {
|
|
5
12
|
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
13
|
}
|
|
7
14
|
|
|
15
|
+
type ColorPickerMode = {
|
|
16
|
+
inputProps: Record<string, unknown>;
|
|
17
|
+
inputs: {
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
getValue: (color: any) => number | string;
|
|
20
|
+
getColor: (color: any, v: string) => any;
|
|
21
|
+
}[];
|
|
22
|
+
from: (color: any) => HSV;
|
|
23
|
+
to: (color: HSV) => any;
|
|
24
|
+
};
|
|
25
|
+
declare const modes: {
|
|
26
|
+
rgb: {
|
|
27
|
+
inputs: {
|
|
28
|
+
[key: string]: any;
|
|
29
|
+
getValue: (color: any) => number | string;
|
|
30
|
+
getColor: (color: any, v: string) => any;
|
|
31
|
+
}[];
|
|
32
|
+
inputProps: Record<string, unknown>;
|
|
33
|
+
from: (color: any) => HSV;
|
|
34
|
+
to: (color: HSV) => any;
|
|
35
|
+
};
|
|
36
|
+
rgba: ColorPickerMode;
|
|
37
|
+
hsl: {
|
|
38
|
+
inputs: {
|
|
39
|
+
[key: string]: any;
|
|
40
|
+
getValue: (color: any) => number | string;
|
|
41
|
+
getColor: (color: any, v: string) => any;
|
|
42
|
+
}[];
|
|
43
|
+
inputProps: Record<string, unknown>;
|
|
44
|
+
from: (color: any) => HSV;
|
|
45
|
+
to: (color: HSV) => any;
|
|
46
|
+
};
|
|
47
|
+
hsla: ColorPickerMode;
|
|
48
|
+
hex: {
|
|
49
|
+
inputs: {
|
|
50
|
+
label: string;
|
|
51
|
+
getValue: (c: string) => string;
|
|
52
|
+
getColor: (c: string, v: string) => string;
|
|
53
|
+
}[];
|
|
54
|
+
inputProps: Record<string, unknown>;
|
|
55
|
+
from: (color: any) => HSV;
|
|
56
|
+
to: (color: HSV) => any;
|
|
57
|
+
};
|
|
58
|
+
hexa: ColorPickerMode;
|
|
59
|
+
};
|
|
60
|
+
|
|
8
61
|
declare const VColorPicker: {
|
|
9
62
|
new (...args: any[]): {
|
|
10
63
|
$: vue.ComponentInternalInstance;
|
|
11
64
|
$data: {};
|
|
12
|
-
$props:
|
|
13
|
-
width
|
|
14
|
-
style
|
|
15
|
-
disabled
|
|
16
|
-
tag
|
|
17
|
-
mode
|
|
18
|
-
rounded
|
|
19
|
-
dotSize
|
|
20
|
-
modes
|
|
21
|
-
canvasHeight
|
|
22
|
-
hideCanvas
|
|
23
|
-
hideSliders
|
|
24
|
-
hideInputs
|
|
25
|
-
showSwatches
|
|
26
|
-
swatchesMaxHeight
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
validator: (v: any) => boolean;
|
|
77
|
-
};
|
|
78
|
-
showSwatches: BooleanConstructor;
|
|
79
|
-
swatches: PropType<string[][]>;
|
|
80
|
-
swatchesMaxHeight: {
|
|
81
|
-
type: (StringConstructor | NumberConstructor)[];
|
|
82
|
-
default: number;
|
|
83
|
-
};
|
|
84
|
-
modelValue: {
|
|
85
|
-
type: PropType<string | Record<string, unknown> | null | undefined>;
|
|
86
|
-
};
|
|
87
|
-
}>> & {
|
|
65
|
+
$props: {
|
|
66
|
+
width?: NonNullable<string | number> | undefined;
|
|
67
|
+
style?: vue.StyleValue | undefined;
|
|
68
|
+
disabled?: boolean | undefined;
|
|
69
|
+
tag?: string | undefined;
|
|
70
|
+
mode?: "rgb" | "rgba" | "hsl" | "hsla" | "hex" | "hexa" | undefined;
|
|
71
|
+
rounded?: string | number | boolean | undefined;
|
|
72
|
+
dotSize?: string | number | undefined;
|
|
73
|
+
modes?: readonly ("rgb" | "rgba" | "hsl" | "hsla" | "hex" | "hexa")[] | undefined;
|
|
74
|
+
canvasHeight?: string | number | undefined;
|
|
75
|
+
hideCanvas?: boolean | undefined;
|
|
76
|
+
hideSliders?: boolean | undefined;
|
|
77
|
+
hideInputs?: boolean | undefined;
|
|
78
|
+
showSwatches?: boolean | undefined;
|
|
79
|
+
swatchesMaxHeight?: string | number | undefined;
|
|
80
|
+
key?: string | number | symbol | undefined;
|
|
81
|
+
readonly border?: string | number | boolean | undefined;
|
|
82
|
+
readonly color?: string | undefined;
|
|
83
|
+
readonly position?: "fixed" | "absolute" | "static" | "relative" | "sticky" | undefined;
|
|
84
|
+
class?: any;
|
|
85
|
+
readonly elevation?: string | number | undefined;
|
|
86
|
+
ref?: vue.VNodeRef | undefined;
|
|
87
|
+
ref_for?: boolean | undefined;
|
|
88
|
+
ref_key?: string | undefined;
|
|
89
|
+
readonly theme?: string | undefined;
|
|
90
|
+
onVnodeBeforeMount?: ((vnode: vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
91
|
+
[key: string]: any;
|
|
92
|
+
}>) => void) | ((vnode: vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
93
|
+
[key: string]: any;
|
|
94
|
+
}>) => void)[] | undefined;
|
|
95
|
+
onVnodeMounted?: ((vnode: vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
96
|
+
[key: string]: any;
|
|
97
|
+
}>) => void) | ((vnode: vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
98
|
+
[key: string]: any;
|
|
99
|
+
}>) => void)[] | undefined;
|
|
100
|
+
onVnodeBeforeUpdate?: ((vnode: vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
101
|
+
[key: string]: any;
|
|
102
|
+
}>, oldVNode: vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
103
|
+
[key: string]: any;
|
|
104
|
+
}>) => void) | ((vnode: vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
105
|
+
[key: string]: any;
|
|
106
|
+
}>, oldVNode: vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
107
|
+
[key: string]: any;
|
|
108
|
+
}>) => void)[] | undefined;
|
|
109
|
+
onVnodeUpdated?: ((vnode: vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
110
|
+
[key: string]: any;
|
|
111
|
+
}>, oldVNode: vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
112
|
+
[key: string]: any;
|
|
113
|
+
}>) => void) | ((vnode: vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
114
|
+
[key: string]: any;
|
|
115
|
+
}>, oldVNode: vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
116
|
+
[key: string]: any;
|
|
117
|
+
}>) => void)[] | undefined;
|
|
118
|
+
onVnodeBeforeUnmount?: ((vnode: vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
119
|
+
[key: string]: any;
|
|
120
|
+
}>) => void) | ((vnode: vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
121
|
+
[key: string]: any;
|
|
122
|
+
}>) => void)[] | undefined;
|
|
123
|
+
onVnodeUnmounted?: ((vnode: vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
124
|
+
[key: string]: any;
|
|
125
|
+
}>) => void) | ((vnode: vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
126
|
+
[key: string]: any;
|
|
127
|
+
}>) => void)[] | undefined;
|
|
128
|
+
readonly modelValue?: string | Record<string, unknown> | null | undefined;
|
|
88
129
|
"onUpdate:modelValue"?: ((color: any) => any) | undefined;
|
|
89
|
-
"onUpdate:mode"?: ((mode:
|
|
90
|
-
|
|
130
|
+
"onUpdate:mode"?: ((mode: "rgb" | "rgba" | "hsl" | "hsla" | "hex" | "hexa") => any) | undefined;
|
|
131
|
+
readonly swatches?: readonly (readonly (string | number | {
|
|
132
|
+
readonly r: number;
|
|
133
|
+
readonly g: number;
|
|
134
|
+
readonly b: number;
|
|
135
|
+
readonly a?: number | undefined;
|
|
136
|
+
} | {
|
|
137
|
+
readonly h: number;
|
|
138
|
+
readonly s: number;
|
|
139
|
+
readonly v: number;
|
|
140
|
+
readonly a?: number | undefined;
|
|
141
|
+
} | {
|
|
142
|
+
readonly h: number;
|
|
143
|
+
readonly s: number;
|
|
144
|
+
readonly l: number;
|
|
145
|
+
readonly a?: number | undefined;
|
|
146
|
+
})[])[] | undefined;
|
|
147
|
+
};
|
|
91
148
|
$attrs: {
|
|
92
149
|
[x: string]: unknown;
|
|
93
150
|
};
|
|
@@ -95,11 +152,11 @@ declare const VColorPicker: {
|
|
|
95
152
|
[x: string]: unknown;
|
|
96
153
|
};
|
|
97
154
|
$slots: Readonly<{
|
|
98
|
-
[name: string]: vue.Slot | undefined;
|
|
155
|
+
[name: string]: vue.Slot<any> | undefined;
|
|
99
156
|
}>;
|
|
100
|
-
$root: vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
101
|
-
$parent: vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
102
|
-
$emit: ((event: "update:modelValue", color: any) => void) & ((event: "update:mode", mode:
|
|
157
|
+
$root: vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | null;
|
|
158
|
+
$parent: vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | null;
|
|
159
|
+
$emit: ((event: "update:modelValue", color: any) => void) & ((event: "update:mode", mode: "rgb" | "rgba" | "hsl" | "hsla" | "hex" | "hexa") => void);
|
|
103
160
|
$el: any;
|
|
104
161
|
$options: vue.ComponentOptionsBase<Readonly<vue.ExtractPropTypes<{
|
|
105
162
|
width: {
|
|
@@ -143,17 +200,32 @@ declare const VColorPicker: {
|
|
|
143
200
|
hideSliders: BooleanConstructor;
|
|
144
201
|
hideInputs: BooleanConstructor;
|
|
145
202
|
mode: {
|
|
146
|
-
type:
|
|
203
|
+
type: PropType<"rgb" | "rgba" | "hsl" | "hsla" | "hex" | "hexa">;
|
|
147
204
|
default: string;
|
|
148
205
|
validator: (v: string) => boolean;
|
|
149
206
|
};
|
|
150
207
|
modes: {
|
|
151
|
-
type: PropType<
|
|
208
|
+
type: PropType<readonly ("rgb" | "rgba" | "hsl" | "hsla" | "hex" | "hexa")[]>;
|
|
152
209
|
default: () => string[];
|
|
153
210
|
validator: (v: any) => boolean;
|
|
154
211
|
};
|
|
155
212
|
showSwatches: BooleanConstructor;
|
|
156
|
-
swatches: PropType<string
|
|
213
|
+
swatches: PropType<readonly (readonly (string | number | {
|
|
214
|
+
readonly r: number;
|
|
215
|
+
readonly g: number;
|
|
216
|
+
readonly b: number;
|
|
217
|
+
readonly a?: number | undefined;
|
|
218
|
+
} | {
|
|
219
|
+
readonly h: number;
|
|
220
|
+
readonly s: number;
|
|
221
|
+
readonly v: number;
|
|
222
|
+
readonly a?: number | undefined;
|
|
223
|
+
} | {
|
|
224
|
+
readonly h: number;
|
|
225
|
+
readonly s: number;
|
|
226
|
+
readonly l: number;
|
|
227
|
+
readonly a?: number | undefined;
|
|
228
|
+
})[])[]>;
|
|
157
229
|
swatchesMaxHeight: {
|
|
158
230
|
type: (StringConstructor | NumberConstructor)[];
|
|
159
231
|
default: number;
|
|
@@ -163,26 +235,26 @@ declare const VColorPicker: {
|
|
|
163
235
|
};
|
|
164
236
|
}>> & {
|
|
165
237
|
"onUpdate:modelValue"?: ((color: any) => any) | undefined;
|
|
166
|
-
"onUpdate:mode"?: ((mode:
|
|
238
|
+
"onUpdate:mode"?: ((mode: "rgb" | "rgba" | "hsl" | "hsla" | "hex" | "hexa") => any) | undefined;
|
|
167
239
|
}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
168
240
|
'update:modelValue': (color: any) => true;
|
|
169
|
-
'update:mode': (mode:
|
|
241
|
+
'update:mode': (mode: keyof typeof modes) => true;
|
|
170
242
|
}, string, {
|
|
171
243
|
width: NonNullable<string | number>;
|
|
172
244
|
style: vue.StyleValue;
|
|
173
245
|
disabled: boolean;
|
|
174
246
|
tag: string;
|
|
175
|
-
mode:
|
|
247
|
+
mode: "rgb" | "rgba" | "hsl" | "hsla" | "hex" | "hexa";
|
|
176
248
|
rounded: string | number | boolean;
|
|
177
249
|
dotSize: string | number;
|
|
178
|
-
modes:
|
|
250
|
+
modes: readonly ("rgb" | "rgba" | "hsl" | "hsla" | "hex" | "hexa")[];
|
|
179
251
|
canvasHeight: string | number;
|
|
180
252
|
hideCanvas: boolean;
|
|
181
253
|
hideSliders: boolean;
|
|
182
254
|
hideInputs: boolean;
|
|
183
255
|
showSwatches: boolean;
|
|
184
256
|
swatchesMaxHeight: string | number;
|
|
185
|
-
}, {}, string> & {
|
|
257
|
+
}, {}, string, {}> & {
|
|
186
258
|
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
187
259
|
created?: ((() => void) | (() => void)[]) | undefined;
|
|
188
260
|
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
@@ -197,7 +269,7 @@ declare const VColorPicker: {
|
|
|
197
269
|
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
198
270
|
renderTracked?: (((e: vue.DebuggerEvent) => void) | ((e: vue.DebuggerEvent) => void)[]) | undefined;
|
|
199
271
|
renderTriggered?: (((e: vue.DebuggerEvent) => void) | ((e: vue.DebuggerEvent) => void)[]) | undefined;
|
|
200
|
-
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;
|
|
272
|
+
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;
|
|
201
273
|
};
|
|
202
274
|
$forceUpdate: () => void;
|
|
203
275
|
$nextTick: typeof vue.nextTick;
|
|
@@ -244,17 +316,32 @@ declare const VColorPicker: {
|
|
|
244
316
|
hideSliders: BooleanConstructor;
|
|
245
317
|
hideInputs: BooleanConstructor;
|
|
246
318
|
mode: {
|
|
247
|
-
type:
|
|
319
|
+
type: PropType<"rgb" | "rgba" | "hsl" | "hsla" | "hex" | "hexa">;
|
|
248
320
|
default: string;
|
|
249
321
|
validator: (v: string) => boolean;
|
|
250
322
|
};
|
|
251
323
|
modes: {
|
|
252
|
-
type: PropType<
|
|
324
|
+
type: PropType<readonly ("rgb" | "rgba" | "hsl" | "hsla" | "hex" | "hexa")[]>;
|
|
253
325
|
default: () => string[];
|
|
254
326
|
validator: (v: any) => boolean;
|
|
255
327
|
};
|
|
256
328
|
showSwatches: BooleanConstructor;
|
|
257
|
-
swatches: PropType<string
|
|
329
|
+
swatches: PropType<readonly (readonly (string | number | {
|
|
330
|
+
readonly r: number;
|
|
331
|
+
readonly g: number;
|
|
332
|
+
readonly b: number;
|
|
333
|
+
readonly a?: number | undefined;
|
|
334
|
+
} | {
|
|
335
|
+
readonly h: number;
|
|
336
|
+
readonly s: number;
|
|
337
|
+
readonly v: number;
|
|
338
|
+
readonly a?: number | undefined;
|
|
339
|
+
} | {
|
|
340
|
+
readonly h: number;
|
|
341
|
+
readonly s: number;
|
|
342
|
+
readonly l: number;
|
|
343
|
+
readonly a?: number | undefined;
|
|
344
|
+
})[])[]>;
|
|
258
345
|
swatchesMaxHeight: {
|
|
259
346
|
type: (StringConstructor | NumberConstructor)[];
|
|
260
347
|
default: number;
|
|
@@ -264,7 +351,7 @@ declare const VColorPicker: {
|
|
|
264
351
|
};
|
|
265
352
|
}>> & {
|
|
266
353
|
"onUpdate:modelValue"?: ((color: any) => any) | undefined;
|
|
267
|
-
"onUpdate:mode"?: ((mode:
|
|
354
|
+
"onUpdate:mode"?: ((mode: "rgb" | "rgba" | "hsl" | "hsla" | "hex" | "hexa") => any) | undefined;
|
|
268
355
|
} & vue.ShallowUnwrapRef<{}> & {} & vue.ComponentCustomProperties & {};
|
|
269
356
|
__isFragment?: undefined;
|
|
270
357
|
__isTeleport?: undefined;
|
|
@@ -311,17 +398,32 @@ declare const VColorPicker: {
|
|
|
311
398
|
hideSliders: BooleanConstructor;
|
|
312
399
|
hideInputs: BooleanConstructor;
|
|
313
400
|
mode: {
|
|
314
|
-
type:
|
|
401
|
+
type: PropType<"rgb" | "rgba" | "hsl" | "hsla" | "hex" | "hexa">;
|
|
315
402
|
default: string;
|
|
316
403
|
validator: (v: string) => boolean;
|
|
317
404
|
};
|
|
318
405
|
modes: {
|
|
319
|
-
type: PropType<
|
|
406
|
+
type: PropType<readonly ("rgb" | "rgba" | "hsl" | "hsla" | "hex" | "hexa")[]>;
|
|
320
407
|
default: () => string[];
|
|
321
408
|
validator: (v: any) => boolean;
|
|
322
409
|
};
|
|
323
410
|
showSwatches: BooleanConstructor;
|
|
324
|
-
swatches: PropType<string
|
|
411
|
+
swatches: PropType<readonly (readonly (string | number | {
|
|
412
|
+
readonly r: number;
|
|
413
|
+
readonly g: number;
|
|
414
|
+
readonly b: number;
|
|
415
|
+
readonly a?: number | undefined;
|
|
416
|
+
} | {
|
|
417
|
+
readonly h: number;
|
|
418
|
+
readonly s: number;
|
|
419
|
+
readonly v: number;
|
|
420
|
+
readonly a?: number | undefined;
|
|
421
|
+
} | {
|
|
422
|
+
readonly h: number;
|
|
423
|
+
readonly s: number;
|
|
424
|
+
readonly l: number;
|
|
425
|
+
readonly a?: number | undefined;
|
|
426
|
+
})[])[]>;
|
|
325
427
|
swatchesMaxHeight: {
|
|
326
428
|
type: (StringConstructor | NumberConstructor)[];
|
|
327
429
|
default: number;
|
|
@@ -331,26 +433,26 @@ declare const VColorPicker: {
|
|
|
331
433
|
};
|
|
332
434
|
}>> & {
|
|
333
435
|
"onUpdate:modelValue"?: ((color: any) => any) | undefined;
|
|
334
|
-
"onUpdate:mode"?: ((mode:
|
|
436
|
+
"onUpdate:mode"?: ((mode: "rgb" | "rgba" | "hsl" | "hsla" | "hex" | "hexa") => any) | undefined;
|
|
335
437
|
}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
336
438
|
'update:modelValue': (color: any) => true;
|
|
337
|
-
'update:mode': (mode:
|
|
439
|
+
'update:mode': (mode: keyof typeof modes) => true;
|
|
338
440
|
}, string, {
|
|
339
441
|
width: NonNullable<string | number>;
|
|
340
442
|
style: vue.StyleValue;
|
|
341
443
|
disabled: boolean;
|
|
342
444
|
tag: string;
|
|
343
|
-
mode:
|
|
445
|
+
mode: "rgb" | "rgba" | "hsl" | "hsla" | "hex" | "hexa";
|
|
344
446
|
rounded: string | number | boolean;
|
|
345
447
|
dotSize: string | number;
|
|
346
|
-
modes:
|
|
448
|
+
modes: readonly ("rgb" | "rgba" | "hsl" | "hsla" | "hex" | "hexa")[];
|
|
347
449
|
canvasHeight: string | number;
|
|
348
450
|
hideCanvas: boolean;
|
|
349
451
|
hideSliders: boolean;
|
|
350
452
|
hideInputs: boolean;
|
|
351
453
|
showSwatches: boolean;
|
|
352
454
|
swatchesMaxHeight: string | number;
|
|
353
|
-
}, {}, string> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & FilterPropsOptions<{
|
|
455
|
+
}, {}, string, {}> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & FilterPropsOptions<{
|
|
354
456
|
width: {
|
|
355
457
|
type: PropType<NonNullable<string | number>>;
|
|
356
458
|
default: NonNullable<string | number>;
|
|
@@ -392,17 +494,32 @@ declare const VColorPicker: {
|
|
|
392
494
|
hideSliders: BooleanConstructor;
|
|
393
495
|
hideInputs: BooleanConstructor;
|
|
394
496
|
mode: {
|
|
395
|
-
type:
|
|
497
|
+
type: PropType<"rgb" | "rgba" | "hsl" | "hsla" | "hex" | "hexa">;
|
|
396
498
|
default: string;
|
|
397
499
|
validator: (v: string) => boolean;
|
|
398
500
|
};
|
|
399
501
|
modes: {
|
|
400
|
-
type: PropType<
|
|
502
|
+
type: PropType<readonly ("rgb" | "rgba" | "hsl" | "hsla" | "hex" | "hexa")[]>;
|
|
401
503
|
default: () => string[];
|
|
402
504
|
validator: (v: any) => boolean;
|
|
403
505
|
};
|
|
404
506
|
showSwatches: BooleanConstructor;
|
|
405
|
-
swatches: PropType<string
|
|
507
|
+
swatches: PropType<readonly (readonly (string | number | {
|
|
508
|
+
readonly r: number;
|
|
509
|
+
readonly g: number;
|
|
510
|
+
readonly b: number;
|
|
511
|
+
readonly a?: number | undefined;
|
|
512
|
+
} | {
|
|
513
|
+
readonly h: number;
|
|
514
|
+
readonly s: number;
|
|
515
|
+
readonly v: number;
|
|
516
|
+
readonly a?: number | undefined;
|
|
517
|
+
} | {
|
|
518
|
+
readonly h: number;
|
|
519
|
+
readonly s: number;
|
|
520
|
+
readonly l: number;
|
|
521
|
+
readonly a?: number | undefined;
|
|
522
|
+
})[])[]>;
|
|
406
523
|
swatchesMaxHeight: {
|
|
407
524
|
type: (StringConstructor | NumberConstructor)[];
|
|
408
525
|
default: number;
|
|
@@ -452,17 +569,32 @@ declare const VColorPicker: {
|
|
|
452
569
|
hideSliders: BooleanConstructor;
|
|
453
570
|
hideInputs: BooleanConstructor;
|
|
454
571
|
mode: {
|
|
455
|
-
type:
|
|
572
|
+
type: PropType<"rgb" | "rgba" | "hsl" | "hsla" | "hex" | "hexa">;
|
|
456
573
|
default: string;
|
|
457
574
|
validator: (v: string) => boolean;
|
|
458
575
|
};
|
|
459
576
|
modes: {
|
|
460
|
-
type: PropType<
|
|
577
|
+
type: PropType<readonly ("rgb" | "rgba" | "hsl" | "hsla" | "hex" | "hexa")[]>;
|
|
461
578
|
default: () => string[];
|
|
462
579
|
validator: (v: any) => boolean;
|
|
463
580
|
};
|
|
464
581
|
showSwatches: BooleanConstructor;
|
|
465
|
-
swatches: PropType<string
|
|
582
|
+
swatches: PropType<readonly (readonly (string | number | {
|
|
583
|
+
readonly r: number;
|
|
584
|
+
readonly g: number;
|
|
585
|
+
readonly b: number;
|
|
586
|
+
readonly a?: number | undefined;
|
|
587
|
+
} | {
|
|
588
|
+
readonly h: number;
|
|
589
|
+
readonly s: number;
|
|
590
|
+
readonly v: number;
|
|
591
|
+
readonly a?: number | undefined;
|
|
592
|
+
} | {
|
|
593
|
+
readonly h: number;
|
|
594
|
+
readonly s: number;
|
|
595
|
+
readonly l: number;
|
|
596
|
+
readonly a?: number | undefined;
|
|
597
|
+
})[])[]>;
|
|
466
598
|
swatchesMaxHeight: {
|
|
467
599
|
type: (StringConstructor | NumberConstructor)[];
|
|
468
600
|
default: number;
|
|
@@ -1,26 +1,6 @@
|
|
|
1
1
|
// Utilities
|
|
2
|
-
import { HexToHSV, HSLtoHSV, HSVtoHex, HSVtoHSL, HSVtoRGB,
|
|
3
|
-
|
|
4
|
-
return key.every(k => obj.hasOwnProperty(k));
|
|
5
|
-
}
|
|
6
|
-
export function parseColor(color) {
|
|
7
|
-
if (!color) return null;
|
|
8
|
-
let hsva = null;
|
|
9
|
-
if (typeof color === 'string') {
|
|
10
|
-
const hex = parseHex(color);
|
|
11
|
-
hsva = HexToHSV(hex);
|
|
12
|
-
}
|
|
13
|
-
if (typeof color === 'object') {
|
|
14
|
-
if (has(color, ['r', 'g', 'b'])) {
|
|
15
|
-
hsva = RGBtoHSV(color);
|
|
16
|
-
} else if (has(color, ['h', 's', 'l'])) {
|
|
17
|
-
hsva = HSLtoHSV(color);
|
|
18
|
-
} else if (has(color, ['h', 's', 'v'])) {
|
|
19
|
-
hsva = color;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
return hsva;
|
|
23
|
-
}
|
|
2
|
+
import { HexToHSV, HSLtoHSV, HSVtoHex, HSVtoHSL, HSVtoRGB, RGBtoHSV } from "../../../util/colorUtils.mjs";
|
|
3
|
+
import { has } from "../../../util/helpers.mjs"; // Types
|
|
24
4
|
function stripAlpha(color, stripAlpha) {
|
|
25
5
|
if (stripAlpha) {
|
|
26
6
|
const {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["HexToHSV","HSLtoHSV","HSVtoHex","HSVtoHSL","HSVtoRGB","parseHex","RGBtoHSV","has","obj","key","every","k","hasOwnProperty","parseColor","color","hsva","hex","stripAlpha","a","rest","extractColor","input","slice","converted","hasAlpha","length","nullColor","h","s","v","rgba","inputProps","type","min","inputs","label","max","step","getValue","c","Math","round","r","getColor","Number","g","b","_ref","to","from","rgb","hsla","l","_ref2","hsl","hexa","modes"],"sources":["../../../../src/components/VColorPicker/util/index.ts"],"sourcesContent":["// Utilities\nimport {\n HexToHSV,\n HSLtoHSV,\n HSVtoHex,\n HSVtoHSL,\n HSVtoRGB,\n parseHex,\n RGBtoHSV,\n} from '@/util/colorUtils'\n\n// Types\nimport type { HSL, HSV, RGB } from '@/util/colorUtils'\n\nfunction has (obj: object, key: string[]) {\n return key.every(k => obj.hasOwnProperty(k))\n}\n\nexport function parseColor (color: any): HSV | null {\n if (!color) return null\n\n let hsva: HSV | null = null\n\n if (typeof color === 'string') {\n const hex = parseHex(color)\n\n hsva = HexToHSV(hex)\n }\n\n if (typeof color === 'object') {\n if (has(color, ['r', 'g', 'b'])) {\n hsva = RGBtoHSV(color)\n } else if (has(color, ['h', 's', 'l'])) {\n hsva = HSLtoHSV(color)\n } else if (has(color, ['h', 's', 'v'])) {\n hsva = color\n }\n }\n\n return hsva\n}\n\nfunction stripAlpha (color: any, stripAlpha: boolean) {\n if (stripAlpha) {\n const { a, ...rest } = color\n\n return rest\n }\n\n return color\n}\n\nexport function extractColor (color: HSV, input: any) {\n if (input == null || typeof input === 'string') {\n const hex = HSVtoHex(color)\n\n if (color.a === 1) return hex.slice(0, 7)\n else return hex\n }\n\n if (typeof input === 'object') {\n let converted\n\n if (has(input, ['r', 'g', 'b'])) converted = HSVtoRGB(color)\n else if (has(input, ['h', 's', 'l'])) converted = HSVtoHSL(color)\n else if (has(input, ['h', 's', 'v'])) converted = color\n\n return stripAlpha(converted, !has(input, ['a']) && color.a === 1)\n }\n\n return color\n}\n\nexport function hasAlpha (color: any) {\n if (!color) return false\n\n if (typeof color === 'string') {\n return color.length > 7\n }\n\n if (typeof color === 'object') {\n return has(color, ['a']) || has(color, ['alpha'])\n }\n\n return false\n}\n\nexport const nullColor = { h: 0, s: 0, v: 1, a: 1 }\n\nexport type ColorPickerMode = {\n inputProps: Record<string, unknown>\n inputs: {\n [key: string]: any\n getValue: (color: any) => number | string\n getColor: (color: any, v: string) => any\n }[]\n from: (color: any) => HSV\n to: (color: HSV) => any\n}\n\nconst rgba: ColorPickerMode = {\n inputProps: {\n type: 'number',\n min: 0,\n },\n inputs: [\n {\n label: 'R',\n max: 255,\n step: 1,\n getValue: (c: RGB) => Math.round(c.r),\n getColor: (c: RGB, v: string): RGB => ({ ...c, r: Number(v) }),\n },\n {\n label: 'G',\n max: 255,\n step: 1,\n getValue: (c: RGB) => Math.round(c.g),\n getColor: (c: RGB, v: string): RGB => ({ ...c, g: Number(v) }),\n },\n {\n label: 'B',\n max: 255,\n step: 1,\n getValue: (c: RGB) => Math.round(c.b),\n getColor: (c: RGB, v: string): RGB => ({ ...c, b: Number(v) }),\n },\n {\n label: 'A',\n max: 1,\n step: 0.01,\n getValue: ({ a }: RGB) => a != null ? Math.round(a * 100) / 100 : 1,\n getColor: (c: RGB, v: string): RGB => ({ ...c, a: Number(v) }),\n },\n ],\n to: HSVtoRGB,\n from: RGBtoHSV,\n}\n\nconst rgb = {\n ...rgba,\n inputs: rgba.inputs?.slice(0, 3),\n}\n\nconst hsla: ColorPickerMode = {\n inputProps: {\n type: 'number',\n min: 0,\n },\n inputs: [\n {\n label: 'H',\n max: 360,\n step: 1,\n getValue: (c: HSL) => Math.round(c.h),\n getColor: (c: HSL, v: string): HSL => ({ ...c, h: Number(v) }),\n },\n {\n label: 'S',\n max: 1,\n step: 0.01,\n getValue: (c: HSL) => Math.round(c.s * 100) / 100,\n getColor: (c: HSL, v: string): HSL => ({ ...c, s: Number(v) }),\n },\n {\n label: 'L',\n max: 1,\n step: 0.01,\n getValue: (c: HSL) => Math.round(c.l * 100) / 100,\n getColor: (c: HSL, v: string): HSL => ({ ...c, l: Number(v) }),\n },\n {\n label: 'A',\n max: 1,\n step: 0.01,\n getValue: ({ a }: HSL) => a != null ? Math.round(a * 100) / 100 : 1,\n getColor: (c: HSL, v: string): HSL => ({ ...c, a: Number(v) }),\n },\n ],\n to: HSVtoHSL,\n from: HSLtoHSV,\n}\n\nconst hsl = {\n ...hsla,\n inputs: hsla.inputs.slice(0, 3),\n}\n\nconst hexa: ColorPickerMode = {\n inputProps: {\n type: 'text',\n },\n inputs: [\n {\n label: 'HEXA',\n getValue: (c: string) => c,\n getColor: (c: string, v: string) => v,\n },\n ],\n to: HSVtoHex,\n from: HexToHSV,\n}\n\nconst hex = {\n ...hexa,\n inputs: [\n {\n label: 'HEX',\n getValue: (c: string) => c.slice(0, 7),\n getColor: (c: string, v: string) => v,\n },\n ],\n}\n\nexport const modes: Record<string, ColorPickerMode> = {\n rgb,\n rgba,\n hsl,\n hsla,\n hex,\n hexa,\n}\n"],"mappings":"AAAA;AAAA,SAEEA,QAAQ,EACRC,QAAQ,EACRC,QAAQ,EACRC,QAAQ,EACRC,QAAQ,EACRC,QAAQ,EACRC,QAAQ,wCAGV;AAGA,SAASC,GAAGA,CAAEC,GAAW,EAAEC,GAAa,EAAE;EACxC,OAAOA,GAAG,CAACC,KAAK,CAACC,CAAC,IAAIH,GAAG,CAACI,cAAc,CAACD,CAAC,CAAC,CAAC;AAC9C;AAEA,OAAO,SAASE,UAAUA,CAAEC,KAAU,EAAc;EAClD,IAAI,CAACA,KAAK,EAAE,OAAO,IAAI;EAEvB,IAAIC,IAAgB,GAAG,IAAI;EAE3B,IAAI,OAAOD,KAAK,KAAK,QAAQ,EAAE;IAC7B,MAAME,GAAG,GAAGX,QAAQ,CAACS,KAAK,CAAC;IAE3BC,IAAI,GAAGf,QAAQ,CAACgB,GAAG,CAAC;EACtB;EAEA,IAAI,OAAOF,KAAK,KAAK,QAAQ,EAAE;IAC7B,IAAIP,GAAG,CAACO,KAAK,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,EAAE;MAC/BC,IAAI,GAAGT,QAAQ,CAACQ,KAAK,CAAC;IACxB,CAAC,MAAM,IAAIP,GAAG,CAACO,KAAK,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,EAAE;MACtCC,IAAI,GAAGd,QAAQ,CAACa,KAAK,CAAC;IACxB,CAAC,MAAM,IAAIP,GAAG,CAACO,KAAK,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAA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M,CAACZ,KAAK,CAAC,CAAC,EAAE,CAAC;AAChC,CAAC;AAED,MAAMiC,IAAqB,GAAG;EAC5BxB,UAAU,EAAE;IACVC,IAAI,EAAE;EACR,CAAC;EACDE,MAAM,EAAE,CACN;IACEC,KAAK,EAAE,MAAM;IACbG,QAAQ,EAAGC,CAAS,IAAKA,CAAC;IAC1BI,QAAQ,EAAEA,CAACJ,CAAS,EAAEV,CAAS,KAAKA;EACtC,CAAC,CACF;EACDmB,EAAE,EAAE9C,QAAQ;EACZ+C,IAAI,EAAEjD;AACR,CAAC;AAED,MAAMgB,GAAG,GAAG;EACV,GAAGuC,IAAI;EACPrB,MAAM,EAAE,CACN;IACEC,KAAK,EAAE,KAAK;IACZG,QAAQ,EAAGC,CAAS,IAAKA,CAAC,CAACjB,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;IACtCqB,QAAQ,EAAEA,CAACJ,CAAS,EAAEV,CAAS,KAAKA;EACtC,CAAC;AAEL,CAAC;AAED,OAAO,MAAM2B,KAAsC,GAAG;EACpDN,GAAG;EACHpB,IAAI;EACJwB,GAAG;EACHH,IAAI;EACJnC,GAAG;EACHuC;AACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["HexToHSV","HSLtoHSV","HSVtoHex","HSVtoHSL","HSVtoRGB","RGBtoHSV","has","stripAlpha","color","a","rest","extractColor","input","hex","slice","converted","hasAlpha","length","nullColor","h","s","v","rgba","inputProps","type","min","inputs","label","max","step","getValue","c","Math","round","r","getColor","Number","g","b","_ref","to","from","rgb","hsla","l","_ref2","hsl","hexa","modes"],"sources":["../../../../src/components/VColorPicker/util/index.ts"],"sourcesContent":["// Utilities\nimport {\n HexToHSV,\n HSLtoHSV,\n HSVtoHex,\n HSVtoHSL,\n HSVtoRGB,\n RGBtoHSV,\n} from '@/util/colorUtils'\nimport { has } from '@/util/helpers'\n\n// Types\nimport type { HSL, HSV, RGB } from '@/util/colorUtils'\n\nfunction stripAlpha (color: any, stripAlpha: boolean) {\n if (stripAlpha) {\n const { a, ...rest } = color\n\n return rest\n }\n\n return color\n}\n\nexport function extractColor (color: HSV, input: any) {\n if (input == null || typeof input === 'string') {\n const hex = HSVtoHex(color)\n\n if (color.a === 1) return hex.slice(0, 7)\n else return hex\n }\n\n if (typeof input === 'object') {\n let converted\n\n if (has(input, ['r', 'g', 'b'])) converted = HSVtoRGB(color)\n else if (has(input, ['h', 's', 'l'])) converted = HSVtoHSL(color)\n else if (has(input, ['h', 's', 'v'])) converted = color\n\n return stripAlpha(converted, !has(input, ['a']) && color.a === 1)\n }\n\n return color\n}\n\nexport function hasAlpha (color: any) {\n if (!color) return false\n\n if (typeof color === 'string') {\n return color.length > 7\n }\n\n if (typeof color === 'object') {\n return has(color, ['a']) || has(color, ['alpha'])\n }\n\n return false\n}\n\nexport const nullColor = { h: 0, s: 0, v: 1, a: 1 }\n\nexport type ColorPickerMode = {\n inputProps: Record<string, unknown>\n inputs: {\n [key: string]: any\n getValue: (color: any) => number | string\n getColor: (color: any, v: string) => any\n }[]\n from: (color: any) => HSV\n to: (color: HSV) => any\n}\n\nconst rgba: ColorPickerMode = {\n inputProps: {\n type: 'number',\n min: 0,\n },\n inputs: [\n {\n label: 'R',\n max: 255,\n step: 1,\n getValue: (c: RGB) => Math.round(c.r),\n getColor: (c: RGB, v: string): RGB => ({ ...c, r: Number(v) }),\n },\n {\n label: 'G',\n max: 255,\n step: 1,\n getValue: (c: RGB) => Math.round(c.g),\n getColor: (c: RGB, v: string): RGB => ({ ...c, g: Number(v) }),\n },\n {\n label: 'B',\n max: 255,\n step: 1,\n getValue: (c: RGB) => Math.round(c.b),\n getColor: (c: RGB, v: string): RGB => ({ ...c, b: Number(v) }),\n },\n {\n label: 'A',\n max: 1,\n step: 0.01,\n getValue: ({ a }: RGB) => a != null ? Math.round(a * 100) / 100 : 1,\n getColor: (c: RGB, v: string): RGB => ({ ...c, a: Number(v) }),\n },\n ],\n to: HSVtoRGB,\n from: RGBtoHSV,\n}\n\nconst rgb = {\n ...rgba,\n inputs: rgba.inputs?.slice(0, 3),\n}\n\nconst hsla: ColorPickerMode = {\n inputProps: {\n type: 'number',\n min: 0,\n },\n inputs: [\n {\n label: 'H',\n max: 360,\n step: 1,\n getValue: (c: HSL) => Math.round(c.h),\n getColor: (c: HSL, v: string): HSL => ({ ...c, h: Number(v) }),\n },\n {\n label: 'S',\n max: 1,\n step: 0.01,\n getValue: (c: HSL) => Math.round(c.s * 100) / 100,\n getColor: (c: HSL, v: string): HSL => ({ ...c, s: Number(v) }),\n },\n {\n label: 'L',\n max: 1,\n step: 0.01,\n getValue: (c: HSL) => Math.round(c.l * 100) / 100,\n getColor: (c: HSL, v: string): HSL => ({ ...c, l: Number(v) }),\n },\n {\n label: 'A',\n max: 1,\n step: 0.01,\n getValue: ({ a }: HSL) => a != null ? Math.round(a * 100) / 100 : 1,\n getColor: (c: HSL, v: string): HSL => ({ ...c, a: Number(v) }),\n },\n ],\n to: HSVtoHSL,\n from: HSLtoHSV,\n}\n\nconst hsl = {\n ...hsla,\n inputs: hsla.inputs.slice(0, 3),\n}\n\nconst hexa: ColorPickerMode = {\n inputProps: {\n type: 'text',\n },\n inputs: [\n {\n label: 'HEXA',\n getValue: (c: string) => c,\n getColor: (c: string, v: string) => v,\n },\n ],\n to: HSVtoHex,\n from: HexToHSV,\n}\n\nconst hex = {\n ...hexa,\n inputs: [\n {\n label: 'HEX',\n getValue: (c: string) => c.slice(0, 7),\n getColor: (c: string, v: string) => v,\n },\n ],\n}\n\nexport const modes = {\n rgb,\n rgba,\n hsl,\n hsla,\n hex,\n hexa,\n} satisfies Record<string, ColorPickerMode>\n"],"mappings":"AAAA;AAAA,SAEEA,QAAQ,EACRC,QAAQ,EACRC,QAAQ,EACRC,QAAQ,EACRC,QAAQ,EACRC,QAAQ;AAAA,SAEDC,GAAG,qCAEZ;AAGA,SAASC,UAAUA,CAAEC,KAAU,EAAED,UAAmB,EAAE;EACpD,IAAIA,UAAU,EAAE;IACd,MAAM;MAAE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EAAE,MAAM;IACbG,QAAQ,EAAGC,CAAS,IAAKA,CAAC;IAC1BI,QAAQ,EAAEA,CAACJ,CAAS,EAAEV,CAAS,KAAKA;EACtC,CAAC,CACF;EACDmB,EAAE,EAAEtC,QAAQ;EACZuC,IAAI,EAAEzC;AACR,CAAC;AAED,MAAMa,GAAG,GAAG;EACV,GAAGkC,IAAI;EACPrB,MAAM,EAAE,CACN;IACEC,KAAK,EAAE,KAAK;IACZG,QAAQ,EAAGC,CAAS,IAAKA,CAAC,CAACjB,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;IACtCqB,QAAQ,EAAEA,CAACJ,CAAS,EAAEV,CAAS,KAAKA;EACtC,CAAC;AAEL,CAAC;AAED,OAAO,MAAM2B,KAAK,GAAG;EACnBN,GAAG;EACHpB,IAAI;EACJwB,GAAG;EACHH,IAAI;EACJ9B,GAAG;EACHkC;AACF,CAA2C"}
|
|
@@ -15,14 +15,13 @@
|
|
|
15
15
|
.v-combobox .v-field .v-field__input, .v-combobox .v-field.v-field {
|
|
16
16
|
cursor: text;
|
|
17
17
|
}
|
|
18
|
+
.v-combobox .v-field--variant-outlined {
|
|
19
|
+
--combobox-chips-margin-bottom: 2px;
|
|
20
|
+
}
|
|
18
21
|
.v-combobox .v-field .v-field__input > input {
|
|
19
22
|
align-self: flex-start;
|
|
20
23
|
flex: 1 1;
|
|
21
24
|
}
|
|
22
|
-
.v-combobox .v-field .v-field__append-inner > .v-icon {
|
|
23
|
-
margin-inline-start: 4px;
|
|
24
|
-
transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
25
|
-
}
|
|
26
25
|
.v-combobox .v-field:not(.v-field--focused) input {
|
|
27
26
|
min-width: 0;
|
|
28
27
|
}
|
|
@@ -49,15 +48,14 @@
|
|
|
49
48
|
line-height: inherit;
|
|
50
49
|
max-width: 100%;
|
|
51
50
|
}
|
|
52
|
-
.v-combobox--
|
|
53
|
-
|
|
54
|
-
transform: rotate(180deg);
|
|
51
|
+
.v-combobox--chips .v-field__input, .v-combobox--selection-slot .v-field__input {
|
|
52
|
+
min-height: calc(var(--v-field-input-min-height) + var(--combobox-chips-margin-bottom) + 2px);
|
|
55
53
|
}
|
|
56
|
-
.v-combobox--chips .v-combobox__selection {
|
|
54
|
+
.v-combobox--chips .v-combobox__selection, .v-combobox--selection-slot .v-combobox__selection {
|
|
57
55
|
margin-top: 2px;
|
|
58
56
|
margin-bottom: var(--combobox-chips-margin-bottom);
|
|
59
57
|
}
|
|
60
|
-
.v-combobox--chips .v-combobox__selection:first-child {
|
|
58
|
+
.v-combobox--chips .v-combobox__selection:first-child, .v-combobox--selection-slot .v-combobox__selection:first-child {
|
|
61
59
|
margin-inline-start: 0;
|
|
62
60
|
}
|
|
63
61
|
.v-combobox--selecting-index .v-combobox__selection {
|
|
@@ -86,4 +84,12 @@
|
|
|
86
84
|
}
|
|
87
85
|
.v-combobox--single .v-field--focused .v-combobox__selection {
|
|
88
86
|
opacity: 0;
|
|
87
|
+
}
|
|
88
|
+
.v-combobox__menu-icon {
|
|
89
|
+
margin-inline-start: 4px;
|
|
90
|
+
transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
91
|
+
}
|
|
92
|
+
.v-combobox--active-menu .v-combobox__menu-icon {
|
|
93
|
+
opacity: var(--v-high-emphasis-opacity);
|
|
94
|
+
transform: rotate(180deg);
|
|
89
95
|
}
|