@vuetify/nightly 3.7.4-next.2024-11-06 → 3.7.5-dev.2024-12-16
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/json/attributes.json +2853 -2845
- package/dist/json/importMap-labs.json +20 -20
- package/dist/json/importMap.json +150 -150
- package/dist/json/tags.json +2 -0
- package/dist/json/web-types.json +5324 -5306
- package/dist/vuetify-labs.css +25135 -23418
- package/dist/vuetify-labs.d.ts +202 -196
- package/dist/vuetify-labs.esm.js +107 -106
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +106 -105
- package/dist/vuetify-labs.min.css +4 -3
- package/dist/vuetify.css +23838 -22118
- package/dist/vuetify.d.ts +191 -185
- package/dist/vuetify.esm.js +96 -96
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +95 -95
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +4 -3
- package/dist/vuetify.min.js +884 -889
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VAlert/VAlert.css +215 -207
- package/lib/components/VApp/VApp.css +15 -16
- package/lib/components/VAppBar/VAppBar.css +12 -14
- package/lib/components/VAppBar/index.d.mts +6 -6
- package/lib/components/VAutocomplete/VAutocomplete.css +85 -86
- package/lib/components/VAutocomplete/VAutocomplete.mjs +4 -4
- package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
- package/lib/components/VAutocomplete/index.d.mts +22 -22
- package/lib/components/VAvatar/VAvatar.css +106 -108
- package/lib/components/VBadge/VBadge.css +77 -73
- package/lib/components/VBadge/VBadge.sass +4 -0
- package/lib/components/VBanner/VBanner.css +166 -161
- package/lib/components/VBottomNavigation/VBottomNavigation.css +63 -64
- package/lib/components/VBottomSheet/VBottomSheet.css +31 -34
- package/lib/components/VBreadcrumbs/VBreadcrumbs.css +57 -54
- package/lib/components/VBtn/VBtn.css +408 -385
- package/lib/components/VBtn/VBtn.sass +4 -4
- package/lib/components/VBtn/index.d.mts +7 -7
- package/lib/components/VBtnGroup/VBtnGroup.css +64 -63
- package/lib/components/VBtnToggle/VBtnToggle.css +14 -16
- package/lib/components/VBtnToggle/index.d.mts +9 -9
- package/lib/components/VCard/VCard.css +302 -294
- package/lib/components/VCarousel/VCarousel.css +65 -63
- package/lib/components/VCarousel/VCarousel.mjs.map +1 -1
- package/lib/components/VCarousel/VCarousel.sass +1 -1
- package/lib/components/VCarousel/index.d.mts +9 -9
- package/lib/components/VCheckbox/VCheckbox.css +5 -7
- package/lib/components/VCheckbox/VCheckbox.mjs +3 -3
- package/lib/components/VCheckbox/VCheckbox.mjs.map +1 -1
- package/lib/components/VChip/VChip.css +411 -378
- package/lib/components/VChip/VChip.mjs +18 -10
- package/lib/components/VChip/VChip.mjs.map +1 -1
- package/lib/components/VChip/index.d.mts +13 -8
- package/lib/components/VChipGroup/VChipGroup.css +18 -19
- package/lib/components/VChipGroup/VChipGroup.mjs +2 -0
- package/lib/components/VChipGroup/VChipGroup.mjs.map +1 -1
- package/lib/components/VChipGroup/index.d.mts +20 -15
- package/lib/components/VCode/VCode.css +8 -10
- package/lib/components/VColorPicker/VColorPicker.css +22 -22
- package/lib/components/VColorPicker/VColorPickerCanvas.css +22 -24
- package/lib/components/VColorPicker/VColorPickerEdit.css +28 -29
- package/lib/components/VColorPicker/VColorPickerPreview.css +67 -69
- package/lib/components/VColorPicker/VColorPickerPreview.sass +2 -4
- package/lib/components/VColorPicker/VColorPickerSwatches.css +34 -34
- package/lib/components/VCombobox/VCombobox.css +85 -86
- package/lib/components/VCombobox/VCombobox.mjs +4 -4
- package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
- package/lib/components/VCombobox/index.d.mts +22 -22
- package/lib/components/VConfirmEdit/VConfirmEdit.mjs +9 -7
- package/lib/components/VConfirmEdit/VConfirmEdit.mjs.map +1 -1
- package/lib/components/VConfirmEdit/__test__/VConfirmEdit.spec.browser.mjs +1 -1
- package/lib/components/VConfirmEdit/__test__/VConfirmEdit.spec.browser.mjs.map +1 -1
- package/lib/components/VConfirmEdit/index.d.mts +3 -7
- package/lib/components/VCounter/VCounter.css +5 -7
- package/lib/components/VDataTable/VDataTable.css +186 -189
- package/lib/components/VDataTable/VDataTable.sass +10 -20
- package/lib/components/VDataTable/VDataTableFooter.css +31 -33
- package/lib/components/VDatePicker/VDatePicker.css +6 -8
- package/lib/components/VDatePicker/VDatePickerControls.css +56 -54
- package/lib/components/VDatePicker/VDatePickerHeader.css +60 -56
- package/lib/components/VDatePicker/VDatePickerHeader.mjs +2 -1
- package/lib/components/VDatePicker/VDatePickerHeader.mjs.map +1 -1
- package/lib/components/VDatePicker/VDatePickerMonth.css +55 -51
- package/lib/components/VDatePicker/VDatePickerMonths.css +19 -20
- package/lib/components/VDatePicker/VDatePickerYears.css +15 -16
- package/lib/components/VDatePicker/index.d.mts +5 -5
- package/lib/components/VDialog/VDialog.css +95 -95
- package/lib/components/VDivider/VDivider.css +52 -52
- package/lib/components/VEmptyState/VEmptyState.css +67 -62
- package/lib/components/VExpansionPanel/VExpansionPanel.css +209 -203
- package/lib/components/VExpansionPanel/VExpansionPanel.sass +25 -27
- package/lib/components/VExpansionPanel/index.d.mts +7 -7
- package/lib/components/VFab/VFab.css +69 -74
- package/lib/components/VFab/VFab.sass +4 -5
- package/lib/components/VFab/index.d.mts +6 -6
- package/lib/components/VField/VField.css +579 -539
- package/lib/components/VField/VField.mjs +5 -4
- package/lib/components/VField/VField.mjs.map +1 -1
- package/lib/components/VFileInput/VFileInput.css +29 -31
- package/lib/components/VFooter/VFooter.css +36 -38
- package/lib/components/VGrid/VGrid.css +592 -565
- package/lib/components/VIcon/VIcon.css +52 -51
- package/lib/components/VImg/VImg.css +51 -50
- package/lib/components/VInfiniteScroll/VInfiniteScroll.css +37 -36
- package/lib/components/VInput/VInput.css +142 -131
- package/lib/components/VInput/VInput.mjs +3 -3
- package/lib/components/VInput/VInput.mjs.map +1 -1
- package/lib/components/VItemGroup/VItemGroup.css +5 -7
- package/lib/components/VItemGroup/VItemGroup.mjs.map +1 -1
- package/lib/components/VItemGroup/index.d.mts +9 -9
- package/lib/components/VKbd/VKbd.css +11 -13
- package/lib/components/VLabel/VLabel.css +15 -16
- package/lib/components/VLayout/VLayout.css +8 -10
- package/lib/components/VLayout/VLayoutItem.css +7 -8
- package/lib/components/VList/VList.css +108 -104
- package/lib/components/VList/VList.mjs +3 -2
- package/lib/components/VList/VList.mjs.map +1 -1
- package/lib/components/VList/VList.sass +1 -1
- package/lib/components/VList/VListItem.css +452 -440
- package/lib/components/VList/VListItem.mjs +3 -2
- package/lib/components/VList/VListItem.mjs.map +1 -1
- package/lib/components/VList/VListItem.sass +1 -2
- package/lib/components/VList/index.d.mts +10 -10
- package/lib/components/VLocaleProvider/VLocaleProvider.css +2 -4
- package/lib/components/VMain/VMain.css +30 -32
- package/lib/components/VMenu/VMenu.css +19 -21
- package/lib/components/VMenu/VMenu.mjs +3 -3
- package/lib/components/VMenu/VMenu.mjs.map +1 -1
- package/lib/components/VMenu/index.d.mts +6 -6
- package/lib/components/VMessages/VMessages.css +15 -17
- package/lib/components/VNavigationDrawer/VNavigationDrawer.css +108 -106
- package/lib/components/VOtpInput/VOtpInput.css +58 -56
- package/lib/components/VOverlay/VOverlay.css +63 -60
- package/lib/components/VOverlay/VOverlay.sass +13 -14
- package/lib/components/VPagination/VPagination.css +8 -10
- package/lib/components/VParallax/VParallax.css +6 -8
- package/lib/components/VProgressCircular/VProgressCircular.css +101 -95
- package/lib/components/VProgressLinear/VProgressLinear.css +222 -209
- package/lib/components/VRadioGroup/VRadioGroup.css +12 -14
- package/lib/components/VRadioGroup/VRadioGroup.mjs +3 -3
- package/lib/components/VRadioGroup/VRadioGroup.mjs.map +1 -1
- package/lib/components/VRating/VRating.css +53 -52
- package/lib/components/VRating/VRating.mjs +4 -3
- package/lib/components/VRating/VRating.mjs.map +1 -1
- package/lib/components/VResponsive/VResponsive.css +26 -25
- package/lib/components/VSelect/VSelect.css +52 -54
- package/lib/components/VSelect/VSelect.mjs +3 -3
- package/lib/components/VSelect/VSelect.mjs.map +1 -1
- package/lib/components/VSelect/index.d.mts +22 -22
- package/lib/components/VSelectionControl/VSelectionControl.css +102 -100
- package/lib/components/VSelectionControl/VSelectionControl.mjs +3 -3
- package/lib/components/VSelectionControl/VSelectionControl.mjs.map +1 -1
- package/lib/components/VSelectionControlGroup/VSelectionControlGroup.css +8 -10
- package/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs +3 -3
- package/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs.map +1 -1
- package/lib/components/VSheet/VSheet.css +36 -38
- package/lib/components/VSkeletonLoader/VSkeletonLoader.css +224 -225
- package/lib/components/VSlideGroup/VSlideGroup.css +55 -53
- package/lib/components/VSlideGroup/index.d.mts +10 -10
- package/lib/components/VSlider/VSlider.css +57 -53
- package/lib/components/VSlider/VSliderThumb.css +153 -142
- package/lib/components/VSlider/VSliderTrack.css +174 -155
- package/lib/components/VSnackbar/VSnackbar.css +140 -140
- package/lib/components/VSparkline/VBarline.mjs +3 -3
- package/lib/components/VSparkline/VBarline.mjs.map +1 -1
- package/lib/components/VSparkline/VTrendline.mjs +3 -3
- package/lib/components/VSparkline/VTrendline.mjs.map +1 -1
- package/lib/components/VSpeedDial/VSpeedDial.css +41 -43
- package/lib/components/VStepper/VStepper.css +56 -55
- package/lib/components/VStepper/VStepper.mjs +5 -4
- package/lib/components/VStepper/VStepper.mjs.map +1 -1
- package/lib/components/VStepper/VStepperItem.css +115 -112
- package/lib/components/VStepper/VStepperItem.mjs +5 -4
- package/lib/components/VStepper/VStepperItem.mjs.map +1 -1
- package/lib/components/VStepper/index.d.mts +51 -45
- package/lib/components/VSwitch/VSwitch.css +139 -129
- package/lib/components/VSwitch/VSwitch.mjs +3 -3
- package/lib/components/VSwitch/VSwitch.mjs.map +1 -1
- package/lib/components/VSystemBar/VSystemBar.css +43 -45
- package/lib/components/VTable/VTable.css +141 -140
- package/lib/components/VTable/VTable.sass +2 -4
- package/lib/components/VTabs/VTab.css +29 -30
- package/lib/components/VTabs/VTabs.css +65 -59
- package/lib/components/VTabs/index.d.mts +7 -7
- package/lib/components/VTextField/VTextField.css +68 -65
- package/lib/components/VTextarea/VTextarea.css +39 -47
- package/lib/components/VTextarea/VTextarea.sass +2 -4
- package/lib/components/VThemeProvider/VThemeProvider.css +3 -5
- package/lib/components/VTimeline/VTimeline.css +418 -379
- package/lib/components/VToolbar/VToolbar.css +143 -136
- package/lib/components/VTooltip/VTooltip.css +21 -25
- package/lib/components/VTooltip/VTooltip.mjs +3 -3
- package/lib/components/VTooltip/VTooltip.mjs.map +1 -1
- package/lib/components/VTooltip/VTooltip.sass +6 -8
- package/lib/components/VVirtualScroll/VVirtualScroll.css +9 -11
- package/lib/components/VWindow/VWindow.css +70 -73
- package/lib/components/VWindow/index.d.mts +7 -7
- package/lib/components/index.d.mts +138 -132
- package/lib/composables/form.mjs +7 -2
- package/lib/composables/form.mjs.map +1 -1
- package/lib/composables/group.mjs +3 -3
- package/lib/composables/group.mjs.map +1 -1
- package/lib/composables/layout.mjs +3 -3
- package/lib/composables/layout.mjs.map +1 -1
- package/lib/composables/nested/nested.mjs +2 -2
- package/lib/composables/nested/nested.mjs.map +1 -1
- package/lib/composables/theme.mjs +4 -4
- package/lib/composables/theme.mjs.map +1 -1
- package/lib/composables/validation.mjs +13 -15
- package/lib/composables/validation.mjs.map +1 -1
- package/lib/directives/ripple/VRipple.css +36 -38
- package/lib/entry-bundler.mjs +1 -1
- package/lib/entry-bundler.mjs.map +1 -1
- package/lib/framework.mjs +2 -3
- package/lib/framework.mjs.map +1 -1
- package/lib/index.d.mts +53 -53
- package/lib/labs/VCalendar/VCalendar.css +225 -219
- package/lib/labs/VCalendar/VCalendarDay.css +32 -33
- package/lib/labs/VCalendar/VCalendarHeader.css +13 -13
- package/lib/labs/VCalendar/VCalendarInterval.css +42 -43
- package/lib/labs/VCalendar/VCalendarIntervalEvent.css +5 -7
- package/lib/labs/VCalendar/VCalendarMonthDay.css +58 -61
- package/lib/labs/VCalendar/VCalendarMonthDay.sass +2 -3
- package/lib/labs/VDateInput/VDateInput.mjs +1 -1
- package/lib/labs/VDateInput/VDateInput.mjs.map +1 -1
- package/lib/labs/VNumberInput/VNumberInput.css +38 -40
- package/lib/labs/VNumberInput/VNumberInput.mjs +7 -5
- package/lib/labs/VNumberInput/VNumberInput.mjs.map +1 -1
- package/lib/labs/VPicker/VPicker.css +57 -53
- package/lib/labs/VStepperVertical/index.d.mts +44 -44
- package/lib/labs/VTimePicker/VTimePicker.css +7 -9
- package/lib/labs/VTimePicker/VTimePickerClock.css +129 -126
- package/lib/labs/VTimePicker/VTimePickerControls.css +103 -102
- package/lib/labs/VTreeview/VTreeviewItem.css +15 -17
- package/lib/labs/VTreeview/VTreeviewItem.mjs +3 -4
- package/lib/labs/VTreeview/VTreeviewItem.mjs.map +1 -1
- package/lib/labs/VTreeview/VTreeviewItem.sass +1 -2
- package/lib/labs/VTreeview/index.d.mts +20 -20
- package/lib/labs/components.d.mts +64 -64
- package/lib/locale/fr.mjs +1 -1
- package/lib/locale/fr.mjs.map +1 -1
- package/lib/styles/elements/_global.sass +1 -1
- package/lib/styles/generic/_colors.scss +3 -3
- package/lib/styles/generic/_layers.scss +1 -13
- package/lib/styles/generic/_transitions.scss +32 -32
- package/lib/styles/main.css +16139 -14666
- package/lib/styles/settings/_utilities.scss +5 -0
- package/lib/styles/settings/_variables.scss +2 -1
- package/lib/styles/tools/_bootable.sass +3 -0
- package/lib/styles/tools/_border.sass +4 -4
- package/lib/styles/tools/_display.sass +10 -0
- package/lib/styles/tools/_elevation.sass +2 -2
- package/lib/styles/tools/_index.sass +2 -0
- package/lib/styles/tools/_layer.scss +2 -4
- package/lib/styles/tools/_position.sass +2 -2
- package/lib/styles/tools/_radius.sass +10 -0
- package/lib/styles/tools/_rounded.sass +2 -2
- package/lib/styles/tools/_utilities.sass +5 -1
- package/lib/styles/utilities/_elevation.scss +1 -1
- package/lib/util/getCurrentInstance.mjs +1 -15
- package/lib/util/getCurrentInstance.mjs.map +1 -1
- package/package.json +1 -1
@@ -1,64 +1,66 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
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
|
-
|
1
|
+
.v-carousel {
|
2
|
+
overflow: hidden;
|
3
|
+
position: relative;
|
4
|
+
width: 100%;
|
5
|
+
}
|
6
|
+
.v-carousel__controls {
|
7
|
+
align-items: center;
|
8
|
+
bottom: 0;
|
9
|
+
display: flex;
|
10
|
+
height: 50px;
|
11
|
+
justify-content: center;
|
12
|
+
list-style-type: none;
|
13
|
+
position: absolute;
|
14
|
+
width: 100%;
|
15
|
+
z-index: 1;
|
16
|
+
}
|
17
|
+
.v-carousel__controls {
|
18
|
+
background: rgba(var(--v-theme-surface-variant), 0.3);
|
19
|
+
color: rgb(var(--v-theme-on-surface-variant));
|
20
|
+
}
|
21
|
+
.v-carousel__controls > .v-item-group {
|
22
|
+
flex: 0 1 auto;
|
23
|
+
}
|
24
|
+
.v-carousel__controls__item {
|
25
|
+
margin: 0 8px;
|
26
|
+
}
|
27
|
+
.v-carousel__controls__item .v-icon {
|
28
|
+
opacity: 0.5;
|
29
|
+
}
|
30
|
+
.v-carousel__controls__item--active .v-icon {
|
31
|
+
opacity: 1;
|
32
|
+
vertical-align: middle;
|
33
|
+
}
|
34
|
+
.v-carousel__controls__item:hover {
|
35
|
+
background: none;
|
36
|
+
}
|
37
|
+
.v-carousel__controls__item:hover .v-icon {
|
38
|
+
opacity: 0.8;
|
39
|
+
}
|
40
|
+
|
41
|
+
.v-carousel__progress {
|
42
|
+
margin: 0;
|
43
|
+
position: absolute;
|
44
|
+
bottom: 0;
|
45
|
+
left: 0;
|
46
|
+
right: 0;
|
47
|
+
}
|
48
|
+
|
49
|
+
.v-carousel-item {
|
50
|
+
display: block;
|
51
|
+
height: inherit;
|
52
|
+
text-decoration: none;
|
53
|
+
}
|
54
|
+
.v-carousel-item > .v-img {
|
55
|
+
height: inherit;
|
56
|
+
}
|
57
|
+
|
58
|
+
.v-carousel--hide-delimiter-background .v-carousel__controls {
|
59
|
+
background: transparent;
|
60
|
+
}
|
61
|
+
|
62
|
+
.v-carousel--vertical-delimiters .v-carousel__controls {
|
63
|
+
flex-direction: column;
|
64
|
+
height: 100% !important;
|
65
|
+
width: 50px;
|
64
66
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"VCarousel.mjs","names":["VBtn","VDefaultsProvider","VProgressLinear","makeVWindowProps","VWindow","IconValue","useLocale","useProxiedModel","onMounted","ref","watch","convertToUnit","genericComponent","propsFactory","useRender","makeVCarouselProps","color","String","cycle","Boolean","delimiterIcon","type","default","height","Number","hideDelimiters","hideDelimiterBackground","interval","validator","value","progress","verticalDelimiters","continuous","mandatory","showArrows","VCarousel","name","props","emits","setup","_ref","slots","model","t","windowRef","slideTimeout","restartTimeout","val","window","clearTimeout","startTimeout","setTimeout","group","next","requestAnimationFrame","windowProps","filterProps","_createVNode","_mergeProps","$event","class","style","additional","_ref2","_Fragment","left","right","items","length","icon","size","variant","map","item","index","id","isSelected","onClick","select","undefined","getItemIndex","prev"],"sources":["../../../src/components/VCarousel/VCarousel.tsx"],"sourcesContent":["// Styles\nimport './VCarousel.sass'\n\n// Components\nimport { VBtn } from '@/components/VBtn'\nimport { VDefaultsProvider } from '@/components/VDefaultsProvider'\nimport { VProgressLinear } from '@/components/VProgressLinear'\nimport { makeVWindowProps, VWindow } from '@/components/VWindow/VWindow'\n\n// Composables\nimport { IconValue } from '@/composables/icons'\nimport { useLocale } from '@/composables/locale'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { onMounted, ref, watch } from 'vue'\nimport { convertToUnit, genericComponent, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { VWindowSlots } from '@/components/VWindow/VWindow'\nimport type { GroupProvide } from '@/composables/group'\nimport type { GenericProps } from '@/util'\n\nexport const makeVCarouselProps = propsFactory({\n color: String,\n cycle: Boolean,\n delimiterIcon: {\n type: IconValue,\n default: '$delimiter',\n },\n height: {\n type: [Number, String],\n default: 500,\n },\n hideDelimiters: Boolean,\n hideDelimiterBackground: Boolean,\n interval: {\n type: [Number, String],\n default: 6000,\n validator: (value: string | number) => Number(value) > 0,\n },\n progress: [Boolean, String],\n verticalDelimiters: [Boolean, String] as PropType<boolean | 'left' | 'right'>,\n\n ...makeVWindowProps({\n continuous: true,\n mandatory: 'force' as const,\n showArrows: true,\n }),\n}, 'VCarousel')\n\ntype VCarouselSlots = VWindowSlots & {\n item: {\n props: Record<string, any>\n item: {\n id: number\n value: unknown\n disabled: boolean | undefined\n }\n }\n}\n\nexport const VCarousel = genericComponent<new <T>(\n props: {\n modelValue?: T\n 'onUpdate:modelValue'?: (value: T) => void\n },\n slots: VCarouselSlots,\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VCarousel',\n\n props: makeVCarouselProps(),\n\n emits: {\n 'update:modelValue': (value: any) => true,\n },\n\n setup (props, { slots }) {\n const model = useProxiedModel(props, 'modelValue')\n const { t } = useLocale()\n const windowRef = ref<VWindow>()\n\n let slideTimeout = -1\n watch(model, restartTimeout)\n watch(() => props.interval, restartTimeout)\n watch(() => props.cycle, val => {\n if (val) restartTimeout()\n else window.clearTimeout(slideTimeout)\n })\n\n onMounted(startTimeout)\n\n function startTimeout () {\n if (!props.cycle || !windowRef.value) return\n\n slideTimeout = window.setTimeout(windowRef.value.group.next, +props.interval > 0 ? +props.interval : 6000)\n }\n\n function restartTimeout () {\n window.clearTimeout(slideTimeout)\n window.requestAnimationFrame(startTimeout)\n }\n\n useRender(() => {\n const windowProps = VWindow.filterProps(props)\n\n return (\n <VWindow\n ref={ windowRef }\n { ...windowProps }\n v-model={ model.value }\n class={[\n 'v-carousel',\n {\n 'v-carousel--hide-delimiter-background': props.hideDelimiterBackground,\n 'v-carousel--vertical-delimiters': props.verticalDelimiters,\n },\n props.class,\n ]}\n style={[\n { height: convertToUnit(props.height) },\n props.style,\n ]}\n >\n {{\n default: slots.default,\n additional: ({ group }: { group: GroupProvide }) => (\n <>\n { !props.hideDelimiters && (\n <div\n class=\"v-carousel__controls\"\n style={{\n left: props.verticalDelimiters === 'left' && props.verticalDelimiters ? 0 : 'auto',\n right: props.verticalDelimiters === 'right' ? 0 : 'auto',\n }}\n >\n { group.items.value.length > 0 && (\n <VDefaultsProvider\n defaults={{\n VBtn: {\n color: props.color,\n icon: props.delimiterIcon,\n size: 'x-small',\n variant: 'text',\n },\n }}\n scoped\n >\n { group.items.value.map((item, index) => {\n const props = {\n id: `carousel-item-${item.id}`,\n 'aria-label': t('$vuetify.carousel.ariaLabel.delimiter', index + 1, group.items.value.length),\n class: [\n 'v-carousel__controls__item',\n group.isSelected(item.id) && 'v-btn--active',\n ],\n onClick: () => group.select(item.id, true),\n }\n\n return slots.item\n ? slots.item({ props, item })\n : (<VBtn { ...item } { ...props } />)\n })}\n </VDefaultsProvider>\n )}\n </div>\n )}\n\n { props.progress && (\n <VProgressLinear\n class=\"v-carousel__progress\"\n color={ typeof props.progress === 'string' ? props.progress : undefined }\n modelValue={ (group.getItemIndex(model.value) + 1) / group.items.value.length * 100 }\n />\n )}\n </>\n ),\n prev: slots.prev,\n next: slots.next,\n }}\n </VWindow>\n )\n })\n\n return {}\n },\n})\n\nexport type VCarousel = InstanceType<typeof VCarousel>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,IAAI;AAAA,SACJC,iBAAiB;AAAA,SACjBC,eAAe;AAAA,SACfC,gBAAgB,EAAEC,OAAO,kCAElC;AAAA,SACSC,SAAS;AAAA,SACTC,SAAS;AAAA,SACTC,eAAe,8CAExB;AACA,SAASC,SAAS,EAAEC,GAAG,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAClCC,aAAa,EAAEC,gBAAgB,EAAEC,YAAY,EAAEC,SAAS,gCAEjE;AAMA,OAAO,MAAMC,kBAAkB,GAAGF,YAAY,CAAC;EAC7CG,KAAK,EAAEC,MAAM;EACbC,KAAK,EAAEC,OAAO;EACdC,aAAa,EAAE;IACbC,IAAI,EAAEhB,SAAS;IACfiB,OAAO,EAAE;EACX,CAAC;EACDC,MAAM,EAAE;IACNF,IAAI,EAAE,CAACG,MAAM,EAAEP,MAAM,CAAC;IACtBK,OAAO,EAAE;EACX,CAAC;EACDG,cAAc,EAAEN,OAAO;EACvBO,uBAAuB,EAAEP,OAAO;EAChCQ,QAAQ,EAAE;IACRN,IAAI,EAAE,CAACG,MAAM,EAAEP,MAAM,CAAC;IACtBK,OAAO,EAAE,IAAI;IACbM,SAAS,EAAGC,KAAsB,IAAKL,MAAM,CAACK,KAAK,CAAC,GAAG;EACzD,CAAC;EACDC,QAAQ,EAAE,CAACX,OAAO,EAAEF,MAAM,CAAC;EAC3Bc,kBAAkB,EAAE,CAACZ,OAAO,EAAEF,MAAM,CAAyC;EAE7E,GAAGd,gBAAgB,CAAC;IAClB6B,UAAU,EAAE,IAAI;IAChBC,SAAS,EAAE,OAAgB;IAC3BC,UAAU,EAAE;EACd,CAAC;AACH,CAAC,EAAE,WAAW,CAAC;AAaf,OAAO,MAA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","ignoreList":[]}
|
1
|
+
{"version":3,"file":"VCarousel.mjs","names":["VBtn","VDefaultsProvider","VProgressLinear","makeVWindowProps","VWindow","IconValue","useLocale","useProxiedModel","onMounted","ref","watch","convertToUnit","genericComponent","propsFactory","useRender","makeVCarouselProps","color","String","cycle","Boolean","delimiterIcon","type","default","height","Number","hideDelimiters","hideDelimiterBackground","interval","validator","value","progress","verticalDelimiters","continuous","mandatory","showArrows","VCarousel","name","props","emits","setup","_ref","slots","model","t","windowRef","slideTimeout","restartTimeout","val","window","clearTimeout","startTimeout","setTimeout","group","next","requestAnimationFrame","windowProps","filterProps","_createVNode","_mergeProps","$event","class","style","additional","_ref2","_Fragment","left","right","items","length","icon","size","variant","map","item","index","id","isSelected","onClick","select","undefined","getItemIndex","prev"],"sources":["../../../src/components/VCarousel/VCarousel.tsx"],"sourcesContent":["// Styles\nimport './VCarousel.sass'\n\n// Components\nimport { VBtn } from '@/components/VBtn'\nimport { VDefaultsProvider } from '@/components/VDefaultsProvider'\nimport { VProgressLinear } from '@/components/VProgressLinear'\nimport { makeVWindowProps, VWindow } from '@/components/VWindow/VWindow'\n\n// Composables\nimport { IconValue } from '@/composables/icons'\nimport { useLocale } from '@/composables/locale'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { onMounted, ref, watch } from 'vue'\nimport { convertToUnit, genericComponent, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { VWindowSlots } from '@/components/VWindow/VWindow'\nimport type { GroupProvide } from '@/composables/group'\nimport type { GenericProps } from '@/util'\n\nexport const makeVCarouselProps = propsFactory({\n color: String,\n cycle: Boolean,\n delimiterIcon: {\n type: IconValue,\n default: '$delimiter',\n },\n height: {\n type: [Number, String],\n default: 500,\n },\n hideDelimiters: Boolean,\n hideDelimiterBackground: Boolean,\n interval: {\n type: [Number, String],\n default: 6000,\n validator: (value: string | number) => Number(value) > 0,\n },\n progress: [Boolean, String],\n verticalDelimiters: [Boolean, String] as PropType<boolean | 'left' | 'right'>,\n\n ...makeVWindowProps({\n continuous: true,\n mandatory: 'force' as const,\n showArrows: true,\n }),\n}, 'VCarousel')\n\ntype VCarouselSlots = VWindowSlots & {\n item: {\n props: Record<string, any>\n item: {\n id: string\n value: unknown\n disabled: boolean | undefined\n }\n }\n}\n\nexport const VCarousel = genericComponent<new <T>(\n props: {\n modelValue?: T\n 'onUpdate:modelValue'?: (value: T) => void\n },\n slots: VCarouselSlots,\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VCarousel',\n\n props: makeVCarouselProps(),\n\n emits: {\n 'update:modelValue': (value: any) => true,\n },\n\n setup (props, { slots }) {\n const model = useProxiedModel(props, 'modelValue')\n const { t } = useLocale()\n const windowRef = ref<VWindow>()\n\n let slideTimeout = -1\n watch(model, restartTimeout)\n watch(() => props.interval, restartTimeout)\n watch(() => props.cycle, val => {\n if (val) restartTimeout()\n else window.clearTimeout(slideTimeout)\n })\n\n onMounted(startTimeout)\n\n function startTimeout () {\n if (!props.cycle || !windowRef.value) return\n\n slideTimeout = window.setTimeout(windowRef.value.group.next, +props.interval > 0 ? +props.interval : 6000)\n }\n\n function restartTimeout () {\n window.clearTimeout(slideTimeout)\n window.requestAnimationFrame(startTimeout)\n }\n\n useRender(() => {\n const windowProps = VWindow.filterProps(props)\n\n return (\n <VWindow\n ref={ windowRef }\n { ...windowProps }\n v-model={ model.value }\n class={[\n 'v-carousel',\n {\n 'v-carousel--hide-delimiter-background': props.hideDelimiterBackground,\n 'v-carousel--vertical-delimiters': props.verticalDelimiters,\n },\n props.class,\n ]}\n style={[\n { height: convertToUnit(props.height) },\n props.style,\n ]}\n >\n {{\n default: slots.default,\n additional: ({ group }: { group: GroupProvide }) => (\n <>\n { !props.hideDelimiters && (\n <div\n class=\"v-carousel__controls\"\n style={{\n left: props.verticalDelimiters === 'left' && props.verticalDelimiters ? 0 : 'auto',\n right: props.verticalDelimiters === 'right' ? 0 : 'auto',\n }}\n >\n { group.items.value.length > 0 && (\n <VDefaultsProvider\n defaults={{\n VBtn: {\n color: props.color,\n icon: props.delimiterIcon,\n size: 'x-small',\n variant: 'text',\n },\n }}\n scoped\n >\n { group.items.value.map((item, index) => {\n const props = {\n id: `carousel-item-${item.id}`,\n 'aria-label': t('$vuetify.carousel.ariaLabel.delimiter', index + 1, group.items.value.length),\n class: [\n 'v-carousel__controls__item',\n group.isSelected(item.id) && 'v-btn--active',\n ],\n onClick: () => group.select(item.id, true),\n }\n\n return slots.item\n ? slots.item({ props, item })\n : (<VBtn { ...item } { ...props } />)\n })}\n </VDefaultsProvider>\n )}\n </div>\n )}\n\n { props.progress && (\n <VProgressLinear\n class=\"v-carousel__progress\"\n color={ typeof props.progress === 'string' ? props.progress : undefined }\n modelValue={ (group.getItemIndex(model.value) + 1) / group.items.value.length * 100 }\n />\n )}\n </>\n ),\n prev: slots.prev,\n next: slots.next,\n }}\n </VWindow>\n )\n })\n\n return {}\n },\n})\n\nexport type VCarousel = InstanceType<typeof VCarousel>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,IAAI;AAAA,SACJC,iBAAiB;AAAA,SACjBC,eAAe;AAAA,SACfC,gBAAgB,EAAEC,OAAO,kCAElC;AAAA,SACSC,SAAS;AAAA,SACTC,SAAS;AAAA,SACTC,eAAe,8CAExB;AACA,SAASC,SAAS,EAAEC,GAAG,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAClCC,aAAa,EAAEC,gBAAgB,EAAEC,YAAY,EAAEC,SAAS,gCAEjE;AAMA,OAAO,MAAMC,kBAAkB,GAAGF,YAAY,CAAC;EAC7CG,KAAK,EAAEC,MAAM;EACbC,KAAK,EAAEC,OAAO;EACdC,aAAa,EAAE;IACbC,IAAI,EAAEhB,SAAS;IACfiB,OAAO,EAAE;EACX,CAAC;EACDC,MAAM,EAAE;IACNF,IAAI,EAAE,CAACG,MAAM,EAAEP,MAAM,CAAC;IACtBK,OAAO,EAAE;EACX,CAAC;EACDG,cAAc,EAAEN,OAAO;EACv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KAAK,CAACP,QAAQ,IAAA2B,YAAA,CAAAvD,eAAA;YAAA;YAAA,SAGJ,OAAOmC,KAAK,CAACP,QAAQ,KAAK,QAAQ,GAAGO,KAAK,CAACP,QAAQ,GAAGiD,SAAS;YAAA,cAC1D,CAAC3B,KAAK,CAAC4B,YAAY,CAACtC,KAAK,CAACb,KAAK,CAAC,GAAG,CAAC,IAAIuB,KAAK,CAACe,KAAK,CAACtC,KAAK,CAACuC,MAAM,GAAG;UAAG,QAEtF;QAAA,CAEJ;QACDa,IAAI,EAAExC,KAAK,CAACwC,IAAI;QAChB5B,IAAI,EAAEZ,KAAK,CAACY;MAAI;IAIxB,CAAC,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC","ignoreList":[]}
|
@@ -65,22 +65,22 @@ type IconValue = string | (string | [path: string, opacity: number])[] | JSXComp
|
|
65
65
|
declare const IconValue: PropType<IconValue>;
|
66
66
|
|
67
67
|
interface GroupItem {
|
68
|
-
id:
|
68
|
+
id: string;
|
69
69
|
value: Ref<unknown>;
|
70
70
|
disabled: Ref<boolean | undefined>;
|
71
71
|
useIndexAsValue?: boolean;
|
72
72
|
}
|
73
73
|
interface GroupProvide {
|
74
74
|
register: (item: GroupItem, cmp: ComponentInternalInstance) => void;
|
75
|
-
unregister: (id:
|
76
|
-
select: (id:
|
77
|
-
selected: Ref<Readonly<
|
78
|
-
isSelected: (id:
|
75
|
+
unregister: (id: string) => void;
|
76
|
+
select: (id: string, value: boolean) => void;
|
77
|
+
selected: Ref<Readonly<string[]>>;
|
78
|
+
isSelected: (id: string) => boolean;
|
79
79
|
prev: () => void;
|
80
80
|
next: () => void;
|
81
81
|
selectedClass: Ref<string | undefined>;
|
82
82
|
items: ComputedRef<{
|
83
|
-
id:
|
83
|
+
id: string;
|
84
84
|
value: unknown;
|
85
85
|
disabled: boolean | undefined;
|
86
86
|
}[]>;
|
@@ -113,7 +113,7 @@ type VCarouselSlots = VWindowSlots & {
|
|
113
113
|
item: {
|
114
114
|
props: Record<string, any>;
|
115
115
|
item: {
|
116
|
-
id:
|
116
|
+
id: string;
|
117
117
|
value: unknown;
|
118
118
|
disabled: boolean | undefined;
|
119
119
|
};
|
@@ -192,7 +192,7 @@ declare const VCarousel: {
|
|
192
192
|
item: (arg: {
|
193
193
|
props: Record<string, any>;
|
194
194
|
item: {
|
195
|
-
id:
|
195
|
+
id: string;
|
196
196
|
value: unknown;
|
197
197
|
disabled: boolean | undefined;
|
198
198
|
};
|
@@ -324,7 +324,7 @@ declare const VCarousel: {
|
|
324
324
|
item: (arg: {
|
325
325
|
props: Record<string, any>;
|
326
326
|
item: {
|
327
|
-
id:
|
327
|
+
id: string;
|
328
328
|
value: unknown;
|
329
329
|
disabled: boolean | undefined;
|
330
330
|
};
|
@@ -1,8 +1,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
min-height: var(--v-input-control-height);
|
7
|
-
}
|
1
|
+
.v-checkbox.v-input {
|
2
|
+
flex: 0 1 auto;
|
3
|
+
}
|
4
|
+
.v-checkbox .v-selection-control {
|
5
|
+
min-height: var(--v-input-control-height);
|
8
6
|
}
|
@@ -7,8 +7,8 @@ import { makeVCheckboxBtnProps, VCheckboxBtn } from "./VCheckboxBtn.mjs";
|
|
7
7
|
import { makeVInputProps, VInput } from "../VInput/VInput.mjs"; // Composables
|
8
8
|
import { useFocus } from "../../composables/focus.mjs";
|
9
9
|
import { useProxiedModel } from "../../composables/proxiedModel.mjs"; // Utilities
|
10
|
-
import { computed } from 'vue';
|
11
|
-
import { filterInputAttrs, genericComponent,
|
10
|
+
import { computed, useId } from 'vue';
|
11
|
+
import { filterInputAttrs, genericComponent, omit, propsFactory, useRender } from "../../util/index.mjs"; // Types
|
12
12
|
export const makeVCheckboxProps = propsFactory({
|
13
13
|
...makeVInputProps(),
|
14
14
|
...omit(makeVCheckboxBtnProps(), ['inline'])
|
@@ -32,7 +32,7 @@ export const VCheckbox = genericComponent()({
|
|
32
32
|
focus,
|
33
33
|
blur
|
34
34
|
} = useFocus(props);
|
35
|
-
const uid =
|
35
|
+
const uid = useId();
|
36
36
|
const id = computed(() => props.id || `checkbox-${uid}`);
|
37
37
|
useRender(() => {
|
38
38
|
const [rootAttrs, controlAttrs] = filterInputAttrs(attrs);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"VCheckbox.mjs","names":["makeVCheckboxBtnProps","VCheckboxBtn","makeVInputProps","VInput","useFocus","useProxiedModel","computed","
|
1
|
+
{"version":3,"file":"VCheckbox.mjs","names":["makeVCheckboxBtnProps","VCheckboxBtn","makeVInputProps","VInput","useFocus","useProxiedModel","computed","useId","filterInputAttrs","genericComponent","omit","propsFactory","useRender","makeVCheckboxProps","VCheckbox","name","inheritAttrs","props","emits","value","focused","setup","_ref","attrs","slots","model","isFocused","focus","blur","uid","id","rootAttrs","controlAttrs","inputProps","filterProps","checkboxProps","_createVNode","_mergeProps","class","$event","style","default","_ref2","messagesId","isDisabled","isReadonly","isValid"],"sources":["../../../src/components/VCheckbox/VCheckbox.tsx"],"sourcesContent":["// Styles\nimport './VCheckbox.sass'\n\n// Components\nimport { makeVCheckboxBtnProps, VCheckboxBtn } from './VCheckboxBtn'\nimport { makeVInputProps, VInput } from '@/components/VInput/VInput'\n\n// Composables\nimport { useFocus } from '@/composables/focus'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, useId } from 'vue'\nimport { filterInputAttrs, genericComponent, omit, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { VSelectionControlSlots } from '../VSelectionControl/VSelectionControl'\nimport type { VInputSlots } from '@/components/VInput/VInput'\nimport type { GenericProps } from '@/util'\n\nexport type VCheckboxSlots = Omit<VInputSlots, 'default'> & VSelectionControlSlots\n\nexport const makeVCheckboxProps = propsFactory({\n ...makeVInputProps(),\n ...omit(makeVCheckboxBtnProps(), ['inline']),\n}, 'VCheckbox')\n\nexport const VCheckbox = genericComponent<new <T>(\n props: {\n modelValue?: T | null\n 'onUpdate:modelValue'?: (value: T | null) => void\n },\n slots: VCheckboxSlots,\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VCheckbox',\n\n inheritAttrs: false,\n\n props: makeVCheckboxProps(),\n\n emits: {\n 'update:modelValue': (value: any) => true,\n 'update:focused': (focused: boolean) => true,\n },\n\n setup (props, { attrs, slots }) {\n const model = useProxiedModel(props, 'modelValue')\n const { isFocused, focus, blur } = useFocus(props)\n\n const uid = useId()\n const id = computed(() => props.id || `checkbox-${uid}`)\n\n useRender(() => {\n const [rootAttrs, controlAttrs] = filterInputAttrs(attrs)\n const inputProps = VInput.filterProps(props)\n const checkboxProps = VCheckboxBtn.filterProps(props)\n\n return (\n <VInput\n class={[\n 'v-checkbox',\n props.class,\n ]}\n { ...rootAttrs }\n { ...inputProps }\n v-model={ model.value }\n id={ id.value }\n focused={ isFocused.value }\n style={ props.style }\n >\n {{\n ...slots,\n default: ({\n id,\n messagesId,\n isDisabled,\n isReadonly,\n isValid,\n }) => (\n <VCheckboxBtn\n { ...checkboxProps }\n id={ id.value }\n aria-describedby={ messagesId.value }\n disabled={ isDisabled.value }\n readonly={ isReadonly.value }\n { ...controlAttrs }\n error={ isValid.value === false }\n v-model={ model.value }\n onFocus={ focus }\n onBlur={ blur }\n v-slots={ slots }\n />\n ),\n }}\n </VInput>\n )\n })\n\n return {}\n },\n})\n\nexport type VCheckbox = InstanceType<typeof VCheckbox>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,qBAAqB,EAAEC,YAAY;AAAA,SACnCC,eAAe,EAAEC,MAAM,gCAEhC;AAAA,SACSC,QAAQ;AAAA,SACRC,eAAe,8CAExB;AACA,SAASC,QAAQ,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC5BC,gBAAgB,EAAEC,gBAAgB,EAAEC,IAAI,EAAEC,YAAY,EAAEC,SAAS,gCAE1E;AAOA,OAAO,MAAMC,kBAAkB,GAAGF,YAAY,CAAC;EAC7C,GAAGT,e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