@vuetify/nightly 3.0.0-beta.0 → 3.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +53 -2
- package/dist/json/attributes.json +343 -195
- package/dist/json/importMap.json +20 -0
- package/dist/json/tags.json +106 -44
- package/dist/json/web-types.json +946 -549
- package/dist/vuetify.css +1486 -1085
- package/dist/vuetify.d.ts +9036 -8077
- package/dist/vuetify.esm.js +1511 -944
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +1510 -943
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +3 -3
- package/dist/vuetify.min.js +825 -754
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VAlert/VAlert.css +29 -8
- package/lib/components/VAlert/VAlert.mjs +31 -17
- package/lib/components/VAlert/VAlert.mjs.map +1 -1
- package/lib/components/VAlert/VAlert.sass +27 -7
- package/lib/components/VAlert/VAlertTitle.mjs +1 -0
- package/lib/components/VAlert/VAlertTitle.mjs.map +1 -1
- package/lib/components/VAlert/_variables.scss +14 -7
- package/lib/components/VApp/VApp.css +1 -0
- package/lib/components/VApp/VApp.sass +1 -0
- package/lib/components/VAppBar/VAppBar.mjs +7 -3
- package/lib/components/VAppBar/VAppBar.mjs.map +1 -1
- package/lib/components/VAppBar/VAppBarTitle.mjs.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.mjs +82 -69
- package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
- package/lib/components/VAvatar/VAvatar.mjs +15 -14
- package/lib/components/VAvatar/VAvatar.mjs.map +1 -1
- package/lib/components/VBanner/VBanner.css +82 -58
- package/lib/components/VBanner/VBanner.mjs +39 -43
- package/lib/components/VBanner/VBanner.mjs.map +1 -1
- package/lib/components/VBanner/VBanner.sass +61 -54
- package/lib/components/VBanner/VBannerActions.mjs +34 -2
- package/lib/components/VBanner/VBannerActions.mjs.map +1 -1
- package/lib/components/VBanner/VBannerAvatar.mjs +20 -0
- package/lib/components/VBanner/VBannerAvatar.mjs.map +1 -0
- package/lib/components/VBanner/VBannerIcon.mjs +20 -0
- package/lib/components/VBanner/VBannerIcon.mjs.map +1 -0
- package/lib/components/VBanner/_variables.scss +10 -14
- package/lib/components/VBanner/index.mjs +2 -0
- package/lib/components/VBanner/index.mjs.map +1 -1
- package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs +2 -0
- package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs.map +1 -1
- package/lib/components/VBreadcrumbs/VBreadcrumbsItem.mjs +10 -9
- package/lib/components/VBreadcrumbs/VBreadcrumbsItem.mjs.map +1 -1
- package/lib/components/VBtn/VBtn.css +20 -1
- package/lib/components/VBtn/VBtn.mjs +20 -7
- package/lib/components/VBtn/VBtn.mjs.map +1 -1
- package/lib/components/VBtn/VBtn.sass +15 -2
- package/lib/components/VBtn/_variables.scss +3 -0
- package/lib/components/VBtnGroup/VBtnGroup.css +14 -6
- package/lib/components/VBtnGroup/VBtnGroup.sass +14 -6
- package/lib/components/VCard/VCard.css +13 -11
- package/lib/components/VCard/VCard.mjs +5 -2
- package/lib/components/VCard/VCard.mjs.map +1 -1
- package/lib/components/VCard/VCard.sass +12 -9
- package/lib/components/VCard/VCardActions.mjs +1 -2
- package/lib/components/VCard/VCardActions.mjs.map +1 -1
- package/lib/components/VCard/VCardContent.mjs +3 -0
- package/lib/components/VCard/VCardContent.mjs.map +1 -0
- package/lib/components/VCard/_variables.scss +11 -5
- package/lib/components/VCard/index.mjs +1 -0
- package/lib/components/VCard/index.mjs.map +1 -1
- package/lib/components/VCarousel/VCarousel.mjs +1 -1
- package/lib/components/VCarousel/VCarousel.mjs.map +1 -1
- package/lib/components/VCheckbox/VCheckbox.mjs +2 -2
- package/lib/components/VCheckbox/VCheckbox.mjs.map +1 -1
- package/lib/components/VChip/VChip.css +3 -0
- package/lib/components/VChip/VChip.sass +3 -0
- package/lib/components/VChip/_variables.scss +3 -0
- package/lib/components/VColorPicker/VColorPickerCanvas.css +1 -1
- package/lib/components/VCombobox/VCombobox.mjs +92 -74
- package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
- package/lib/components/VDialog/VDialog.css +31 -11
- package/lib/components/VDialog/VDialog.mjs +6 -9
- package/lib/components/VDialog/VDialog.mjs.map +1 -1
- package/lib/components/VDialog/VDialog.sass +27 -10
- package/lib/components/VDialog/_variables.scss +3 -6
- package/lib/components/VExpansionPanel/VExpansionPanel.css +3 -2
- package/lib/components/VExpansionPanel/VExpansionPanel.mjs +6 -2
- package/lib/components/VExpansionPanel/VExpansionPanel.mjs.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanelTitle.mjs +5 -3
- package/lib/components/VExpansionPanel/VExpansionPanelTitle.mjs.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanels.mjs +4 -0
- package/lib/components/VExpansionPanel/VExpansionPanels.mjs.map +1 -1
- package/lib/components/VField/VField.css +1 -1
- package/lib/components/VField/VField.mjs +3 -4
- package/lib/components/VField/VField.mjs.map +1 -1
- package/lib/components/VField/VField.sass +1 -1
- package/lib/components/VFileInput/VFileInput.mjs +2 -1
- package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
- package/lib/components/VFooter/VFooter.mjs +32 -15
- package/lib/components/VFooter/VFooter.mjs.map +1 -1
- package/lib/components/VForm/VForm.mjs +25 -11
- package/lib/components/VForm/VForm.mjs.map +1 -1
- package/lib/components/VIcon/VIcon.css +27 -12
- package/lib/components/VIcon/VIcon.mjs +19 -16
- package/lib/components/VIcon/VIcon.mjs.map +1 -1
- package/lib/components/VIcon/VIcon.sass +27 -16
- package/lib/components/VIcon/_variables.scss +1 -0
- package/lib/components/VInput/VInput.css +3 -1
- package/lib/components/VInput/VInput.mjs +3 -4
- package/lib/components/VInput/VInput.mjs.map +1 -1
- package/lib/components/VInput/VInput.sass +3 -1
- package/lib/components/VInput/_variables.scss +4 -0
- package/lib/components/VList/VList.css +7 -6
- package/lib/components/VList/VList.mjs +36 -17
- package/lib/components/VList/VList.mjs.map +1 -1
- package/lib/components/VList/VList.sass +3 -2
- package/lib/components/VList/VListChildren.mjs +1 -1
- package/lib/components/VList/VListChildren.mjs.map +1 -1
- package/lib/components/VList/VListGroup.mjs +28 -10
- package/lib/components/VList/VListGroup.mjs.map +1 -1
- package/lib/components/VList/VListItem.css +119 -42
- package/lib/components/VList/VListItem.mjs +36 -32
- package/lib/components/VList/VListItem.mjs.map +1 -1
- package/lib/components/VList/VListItem.sass +76 -28
- package/lib/components/VList/VListItemAction.mjs +29 -0
- package/lib/components/VList/VListItemAction.mjs.map +1 -0
- package/lib/components/VList/VListItemAvatar.mjs +10 -16
- package/lib/components/VList/VListItemAvatar.mjs.map +1 -1
- package/lib/components/VList/VListItemIcon.mjs +23 -0
- package/lib/components/VList/VListItemIcon.mjs.map +1 -0
- package/lib/components/VList/VListItemMedia.mjs +4 -4
- package/lib/components/VList/VListItemMedia.mjs.map +1 -1
- package/lib/components/VList/_variables.scss +12 -3
- package/lib/components/VList/index.mjs +2 -0
- package/lib/components/VList/index.mjs.map +1 -1
- package/lib/components/VMenu/VMenu.css +2 -12
- package/lib/components/VMenu/VMenu.mjs +61 -31
- package/lib/components/VMenu/VMenu.mjs.map +1 -1
- package/lib/components/VMenu/VMenu.sass +3 -6
- package/lib/components/VMenu/shared.mjs +2 -0
- package/lib/components/VMenu/shared.mjs.map +1 -0
- package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs +1 -1
- package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs.map +1 -1
- package/lib/components/VOverlay/VOverlay.css +8 -0
- package/lib/components/VOverlay/VOverlay.mjs +16 -15
- package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
- package/lib/components/VOverlay/VOverlay.sass +9 -0
- package/lib/components/VOverlay/_variables.scss +1 -0
- package/lib/components/VOverlay/positionStrategies.mjs +7 -3
- package/lib/components/VOverlay/positionStrategies.mjs.map +1 -1
- package/lib/components/VOverlay/scrollStrategies.mjs +9 -0
- package/lib/components/VOverlay/scrollStrategies.mjs.map +1 -1
- package/lib/components/VOverlay/useActivator.mjs +50 -14
- package/lib/components/VOverlay/useActivator.mjs.map +1 -1
- package/lib/components/VPagination/VPagination.mjs +10 -12
- package/lib/components/VPagination/VPagination.mjs.map +1 -1
- package/lib/components/VProgressLinear/VProgressLinear.css +1 -1
- package/lib/components/VRadio/VRadio.mjs +1 -2
- package/lib/components/VRadio/VRadio.mjs.map +1 -1
- package/lib/components/VRadioGroup/VRadioGroup.mjs +2 -2
- package/lib/components/VRadioGroup/VRadioGroup.mjs.map +1 -1
- package/lib/components/VRangeSlider/VRangeSlider.mjs +5 -2
- package/lib/components/VRangeSlider/VRangeSlider.mjs.map +1 -1
- package/lib/components/VRating/VRating.css +2 -2
- package/lib/components/VRating/VRating.mjs +13 -3
- package/lib/components/VRating/VRating.mjs.map +1 -1
- package/lib/components/VRating/VRating.sass +2 -2
- package/lib/components/VSelect/VSelect.mjs +70 -91
- package/lib/components/VSelect/VSelect.mjs.map +1 -1
- package/lib/components/VSelectionControl/VSelectionControl.mjs +2 -1
- package/lib/components/VSelectionControl/VSelectionControl.mjs.map +1 -1
- package/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs +2 -2
- package/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs.map +1 -1
- package/lib/components/VSlideGroup/VSlideGroup.css +0 -5
- package/lib/components/VSlideGroup/VSlideGroup.mjs +36 -14
- package/lib/components/VSlideGroup/VSlideGroup.mjs.map +1 -1
- package/lib/components/VSlideGroup/VSlideGroup.sass +0 -4
- package/lib/components/VSlideGroup/VSlideGroupItem.mjs +3 -1
- package/lib/components/VSlideGroup/VSlideGroupItem.mjs.map +1 -1
- package/lib/components/VSlider/VSlider.css +7 -2
- package/lib/components/VSlider/VSlider.sass +11 -5
- package/lib/components/VSlider/VSliderTrack.css +6 -6
- package/lib/components/VSlider/VSliderTrack.mjs +1 -1
- package/lib/components/VSlider/VSliderTrack.mjs.map +1 -1
- package/lib/components/VSlider/VSliderTrack.sass +7 -7
- package/lib/components/VSlider/_variables.scss +5 -2
- package/lib/components/VSnackbar/VSnackbar.css +14 -13
- package/lib/components/VSnackbar/VSnackbar.mjs +22 -10
- package/lib/components/VSnackbar/VSnackbar.mjs.map +1 -1
- package/lib/components/VSnackbar/VSnackbar.sass +15 -16
- package/lib/components/VSnackbar/_variables.scss +0 -4
- package/lib/components/VSwitch/VSwitch.mjs +8 -5
- package/lib/components/VSwitch/VSwitch.mjs.map +1 -1
- package/lib/components/VSystemBar/VSystemBar.css +0 -5
- package/lib/components/VSystemBar/VSystemBar.mjs +31 -14
- package/lib/components/VSystemBar/VSystemBar.mjs.map +1 -1
- package/lib/components/VSystemBar/VSystemBar.sass +0 -5
- package/lib/components/VSystemBar/_variables.scss +0 -3
- package/lib/components/VTabs/VTab.mjs +28 -32
- package/lib/components/VTabs/VTab.mjs.map +1 -1
- package/lib/components/VTabs/VTabs.css +6 -2
- package/lib/components/VTabs/VTabs.mjs +7 -8
- package/lib/components/VTabs/VTabs.mjs.map +1 -1
- package/lib/components/VTabs/VTabs.sass +6 -1
- package/lib/components/VTabs/shared.mjs +2 -0
- package/lib/components/VTabs/shared.mjs.map +1 -0
- package/lib/components/VTextField/VTextField.css +4 -4
- package/lib/components/VTextField/VTextField.mjs +5 -9
- package/lib/components/VTextField/VTextField.mjs.map +1 -1
- package/lib/components/VTextField/VTextField.sass +5 -5
- package/lib/components/VTextarea/VTextarea.css +7 -4
- package/lib/components/VTextarea/VTextarea.sass +9 -5
- package/lib/components/VTimeline/VTimeline.css +187 -48
- package/lib/components/VTimeline/VTimeline.mjs +27 -11
- package/lib/components/VTimeline/VTimeline.mjs.map +1 -1
- package/lib/components/VTimeline/VTimeline.sass +196 -51
- package/lib/components/VTimeline/VTimelineDivider.mjs +2 -1
- package/lib/components/VTimeline/VTimelineDivider.mjs.map +1 -1
- package/lib/components/VTimeline/_variables.scss +2 -1
- package/lib/components/VToolbar/VToolbar.css +8 -1
- package/lib/components/VToolbar/VToolbar.mjs +8 -11
- package/lib/components/VToolbar/VToolbar.mjs.map +1 -1
- package/lib/components/VToolbar/VToolbar.sass +2 -1
- package/lib/components/VToolbar/VToolbarItems.mjs +0 -1
- package/lib/components/VToolbar/VToolbarItems.mjs.map +1 -1
- package/lib/components/VToolbar/_variables.scss +13 -1
- package/lib/components/VWindow/VWindow.mjs +0 -8
- package/lib/components/VWindow/VWindow.mjs.map +1 -1
- package/lib/components/index.d.ts +9025 -8077
- package/lib/composables/defaults.mjs +2 -2
- package/lib/composables/defaults.mjs.map +1 -1
- package/lib/composables/form.mjs +18 -5
- package/lib/composables/form.mjs.map +1 -1
- package/lib/composables/forwardRef.mjs +10 -6
- package/lib/composables/forwardRef.mjs.map +1 -1
- package/lib/composables/group.mjs +14 -6
- package/lib/composables/group.mjs.map +1 -1
- package/lib/composables/index.mjs.map +1 -1
- package/lib/composables/items.mjs +56 -0
- package/lib/composables/items.mjs.map +1 -0
- package/lib/composables/layout.mjs +7 -3
- package/lib/composables/layout.mjs.map +1 -1
- package/lib/composables/loader.mjs.map +1 -1
- package/lib/composables/nested/nested.mjs +27 -14
- package/lib/composables/nested/nested.mjs.map +1 -1
- package/lib/composables/nested/openStrategies.mjs +63 -36
- package/lib/composables/nested/openStrategies.mjs.map +1 -1
- package/lib/composables/nested/selectStrategies.mjs +163 -122
- package/lib/composables/nested/selectStrategies.mjs.map +1 -1
- package/lib/composables/overlay.mjs +5 -1
- package/lib/composables/overlay.mjs.map +1 -1
- package/lib/composables/proxiedModel.mjs.map +1 -1
- package/lib/composables/resizeObserver.mjs +1 -9
- package/lib/composables/resizeObserver.mjs.map +1 -1
- package/lib/composables/router.mjs +17 -5
- package/lib/composables/router.mjs.map +1 -1
- package/lib/composables/selectLink.mjs +19 -0
- package/lib/composables/selectLink.mjs.map +1 -0
- package/lib/composables/stack.mjs +7 -4
- package/lib/composables/stack.mjs.map +1 -1
- package/lib/composables/validation.mjs +6 -3
- package/lib/composables/validation.mjs.map +1 -1
- package/lib/composables/variant.mjs +0 -3
- package/lib/composables/variant.mjs.map +1 -1
- package/lib/directives/ripple/index.mjs +15 -3
- package/lib/directives/ripple/index.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +12 -7
- package/lib/framework.mjs.map +1 -1
- package/lib/index.d.ts +18 -2
- package/lib/locale/ca.mjs +9 -9
- package/lib/locale/ca.mjs.map +1 -1
- package/lib/styles/generic/_colors.scss +0 -1
- package/lib/styles/main.css +400 -392
- package/lib/styles/settings/_utilities.scss +54 -26
- package/lib/styles/tools/_states.sass +2 -1
- package/lib/util/defineComponent.mjs +37 -6
- package/lib/util/defineComponent.mjs.map +1 -1
- package/lib/util/getCurrentInstance.mjs +1 -1
- package/lib/util/getCurrentInstance.mjs.map +1 -1
- package/lib/util/helpers.mjs.map +1 -1
- package/package.json +31 -29
|
@@ -27,10 +27,11 @@
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
.v-list-item--active:hover.v-list-item__overlay,
|
|
30
|
-
.v-list-item--active .v-list-item__overlay
|
|
30
|
+
.v-list-item--active .v-list-item__overlay, .v-list-item[aria-haspopup=menu][aria-expanded=true]:hover.v-list-item__overlay,
|
|
31
|
+
.v-list-item[aria-haspopup=menu][aria-expanded=true] .v-list-item__overlay {
|
|
31
32
|
opacity: calc(0.12 * var(--v-theme-overlay-multiplier));
|
|
32
33
|
}
|
|
33
|
-
.v-list-item--active:focus .v-list-item__overlay {
|
|
34
|
+
.v-list-item--active:focus .v-list-item__overlay, .v-list-item[aria-haspopup=menu][aria-expanded=true]:focus .v-list-item__overlay {
|
|
34
35
|
opacity: calc(0.16 * var(--v-theme-overlay-multiplier));
|
|
35
36
|
}
|
|
36
37
|
.v-list-item--variant-plain, .v-list-item--variant-outlined, .v-list-item--variant-text, .v-list-item--variant-contained-text {
|
|
@@ -50,6 +51,9 @@
|
|
|
50
51
|
background: rgba(var(--v-theme-surface));
|
|
51
52
|
color: rgba(var(--v-theme-on-surface), var(--v-high-emphasis-opacity));
|
|
52
53
|
}
|
|
54
|
+
.v-list-item--variant-contained {
|
|
55
|
+
box-shadow: 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12);
|
|
56
|
+
}
|
|
53
57
|
.v-list-item--variant-contained-flat {
|
|
54
58
|
box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12);
|
|
55
59
|
}
|
|
@@ -83,38 +87,52 @@
|
|
|
83
87
|
cursor: pointer;
|
|
84
88
|
}
|
|
85
89
|
|
|
86
|
-
.v-list-item-
|
|
90
|
+
.v-list-item-action,
|
|
91
|
+
.v-list-item-avatar,
|
|
92
|
+
.v-list-item-icon {
|
|
87
93
|
align-self: center;
|
|
94
|
+
display: flex;
|
|
95
|
+
align-items: center;
|
|
96
|
+
flex: none;
|
|
88
97
|
transition: inherit;
|
|
89
98
|
transition-property: height, width;
|
|
90
99
|
}
|
|
91
|
-
.v-list-item-
|
|
92
|
-
|
|
100
|
+
.v-list-item--three-line .v-list-item-action,
|
|
101
|
+
.v-list-item--three-line .v-list-item-avatar,
|
|
102
|
+
.v-list-item--three-line .v-list-item-icon {
|
|
103
|
+
align-self: flex-start;
|
|
93
104
|
}
|
|
105
|
+
|
|
94
106
|
.v-list-item-avatar--start {
|
|
95
107
|
margin-inline-end: 16px;
|
|
96
108
|
}
|
|
97
109
|
.v-list-item-avatar--end {
|
|
98
110
|
margin-inline-start: 16px;
|
|
99
111
|
}
|
|
100
|
-
.v-list--density-default.v-list--three-line .v-list-item-avatar {
|
|
112
|
+
.v-list-item--density-default.v-list-item--three-line .v-list-item-avatar {
|
|
101
113
|
margin-top: 4px;
|
|
102
114
|
}
|
|
103
115
|
|
|
104
|
-
.v-list--density-comfortable.v-list--three-line .v-list-item-avatar {
|
|
116
|
+
.v-list-item--density-comfortable.v-list-item--three-line .v-list-item-avatar {
|
|
105
117
|
margin-top: 8px;
|
|
106
118
|
}
|
|
107
119
|
|
|
108
|
-
.v-list--density-compact.v-list--three-line .v-list-item-avatar {
|
|
120
|
+
.v-list-item--density-compact.v-list-item--three-line .v-list-item-avatar {
|
|
109
121
|
margin-top: 12px;
|
|
110
122
|
}
|
|
111
123
|
|
|
112
|
-
.v-list
|
|
113
|
-
margin-
|
|
114
|
-
margin-bottom: 4px;
|
|
124
|
+
.v-list-item-icon--start {
|
|
125
|
+
margin-inline-end: 32px;
|
|
115
126
|
}
|
|
116
|
-
.v-list
|
|
117
|
-
|
|
127
|
+
.v-list-item-icon--end {
|
|
128
|
+
margin-inline-start: 32px;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.v-list-item-action--start {
|
|
132
|
+
margin-inline-end: 12px;
|
|
133
|
+
}
|
|
134
|
+
.v-list-item-action--end {
|
|
135
|
+
margin-inline-start: 12px;
|
|
118
136
|
}
|
|
119
137
|
|
|
120
138
|
.v-list-item-media {
|
|
@@ -127,11 +145,11 @@
|
|
|
127
145
|
.v-list-item-media--end {
|
|
128
146
|
margin-inline-start: 16px;
|
|
129
147
|
}
|
|
130
|
-
.v-list--two-line .v-list-item-media {
|
|
148
|
+
.v-list-item--two-line .v-list-item-media {
|
|
131
149
|
margin-top: -4px;
|
|
132
150
|
margin-bottom: -4px;
|
|
133
151
|
}
|
|
134
|
-
.v-list--three-line .v-list-item-media {
|
|
152
|
+
.v-list-item--three-line .v-list-item-media {
|
|
135
153
|
margin-top: 0;
|
|
136
154
|
margin-bottom: 0;
|
|
137
155
|
}
|
|
@@ -154,13 +172,16 @@
|
|
|
154
172
|
line-height: 1rem;
|
|
155
173
|
text-transform: none;
|
|
156
174
|
}
|
|
157
|
-
.v-list--
|
|
175
|
+
.v-list-item--one-line .v-list-item-subtitle {
|
|
158
176
|
-webkit-line-clamp: 1;
|
|
159
177
|
}
|
|
160
|
-
.v-list--
|
|
178
|
+
.v-list-item--two-line .v-list-item-subtitle {
|
|
161
179
|
-webkit-line-clamp: 2;
|
|
162
180
|
}
|
|
163
|
-
.v-list--
|
|
181
|
+
.v-list-item--three-line .v-list-item-subtitle {
|
|
182
|
+
-webkit-line-clamp: 3;
|
|
183
|
+
}
|
|
184
|
+
.v-list-item--nav .v-list-item-subtitle {
|
|
164
185
|
font-size: 0.75rem;
|
|
165
186
|
font-weight: 400;
|
|
166
187
|
letter-spacing: 0.0178571429em;
|
|
@@ -182,50 +203,103 @@
|
|
|
182
203
|
line-height: 1.5rem;
|
|
183
204
|
text-transform: none;
|
|
184
205
|
}
|
|
185
|
-
.v-list--nav .v-list-item-title {
|
|
206
|
+
.v-list-item--nav .v-list-item-title {
|
|
186
207
|
font-size: 0.8125rem;
|
|
187
208
|
font-weight: 500;
|
|
188
209
|
letter-spacing: normal;
|
|
189
210
|
line-height: 1rem;
|
|
190
211
|
}
|
|
191
212
|
|
|
192
|
-
.v-list--density-default.v-list--one-line
|
|
193
|
-
min-height:
|
|
194
|
-
padding: 8px
|
|
213
|
+
.v-list-item--density-default.v-list-item--one-line {
|
|
214
|
+
min-height: 40px;
|
|
215
|
+
padding-top: 8px;
|
|
216
|
+
padding-bottom: 8px;
|
|
195
217
|
}
|
|
196
|
-
.v-list--density-default.v-list--two-line
|
|
218
|
+
.v-list-item--density-default.v-list-item--two-line {
|
|
197
219
|
min-height: 64px;
|
|
198
|
-
padding: 12px
|
|
220
|
+
padding-top: 12px;
|
|
221
|
+
padding-bottom: 12px;
|
|
199
222
|
}
|
|
200
|
-
.v-list--density-default.v-list--three-line
|
|
223
|
+
.v-list-item--density-default.v-list-item--three-line {
|
|
201
224
|
min-height: 88px;
|
|
202
|
-
padding: 16px
|
|
225
|
+
padding-top: 16px;
|
|
226
|
+
padding-bottom: 16px;
|
|
227
|
+
}
|
|
228
|
+
.v-list-item--density-default:not(.v-list-item--nav).v-list-item--one-line {
|
|
229
|
+
padding-inline-start: 16px;
|
|
230
|
+
padding-inline-end: 16px;
|
|
231
|
+
}
|
|
232
|
+
.v-list-item--density-default:not(.v-list-item--nav).v-list-item--two-line {
|
|
233
|
+
padding-inline-start: 16px;
|
|
234
|
+
padding-inline-end: 16px;
|
|
235
|
+
}
|
|
236
|
+
.v-list-item--density-default:not(.v-list-item--nav).v-list-item--three-line {
|
|
237
|
+
padding-inline-start: 16px;
|
|
238
|
+
padding-inline-end: 16px;
|
|
203
239
|
}
|
|
204
240
|
|
|
205
|
-
.v-list--density-comfortable.v-list--one-line
|
|
206
|
-
min-height:
|
|
207
|
-
padding: 4px
|
|
241
|
+
.v-list-item--density-comfortable.v-list-item--one-line {
|
|
242
|
+
min-height: 36px;
|
|
243
|
+
padding-top: 4px;
|
|
244
|
+
padding-bottom: 4px;
|
|
208
245
|
}
|
|
209
|
-
.v-list--density-comfortable.v-list--two-line
|
|
246
|
+
.v-list-item--density-comfortable.v-list-item--two-line {
|
|
210
247
|
min-height: 60px;
|
|
211
|
-
padding: 8px
|
|
248
|
+
padding-top: 8px;
|
|
249
|
+
padding-bottom: 8px;
|
|
212
250
|
}
|
|
213
|
-
.v-list--density-comfortable.v-list--three-line
|
|
251
|
+
.v-list-item--density-comfortable.v-list-item--three-line {
|
|
214
252
|
min-height: 84px;
|
|
215
|
-
padding: 12px
|
|
253
|
+
padding-top: 12px;
|
|
254
|
+
padding-bottom: 12px;
|
|
255
|
+
}
|
|
256
|
+
.v-list-item--density-comfortable:not(.v-list-item--nav).v-list-item--one-line {
|
|
257
|
+
padding-inline-start: 16px;
|
|
258
|
+
padding-inline-end: 16px;
|
|
259
|
+
}
|
|
260
|
+
.v-list-item--density-comfortable:not(.v-list-item--nav).v-list-item--two-line {
|
|
261
|
+
padding-inline-start: 16px;
|
|
262
|
+
padding-inline-end: 16px;
|
|
263
|
+
}
|
|
264
|
+
.v-list-item--density-comfortable:not(.v-list-item--nav).v-list-item--three-line {
|
|
265
|
+
padding-inline-start: 16px;
|
|
266
|
+
padding-inline-end: 16px;
|
|
216
267
|
}
|
|
217
268
|
|
|
218
|
-
.v-list--density-compact.v-list--one-line
|
|
219
|
-
min-height:
|
|
220
|
-
padding: 0px
|
|
269
|
+
.v-list-item--density-compact.v-list-item--one-line {
|
|
270
|
+
min-height: 32px;
|
|
271
|
+
padding-top: 0px;
|
|
272
|
+
padding-bottom: 0px;
|
|
221
273
|
}
|
|
222
|
-
.v-list--density-compact.v-list--two-line
|
|
274
|
+
.v-list-item--density-compact.v-list-item--two-line {
|
|
223
275
|
min-height: 56px;
|
|
224
|
-
padding: 4px
|
|
276
|
+
padding-top: 4px;
|
|
277
|
+
padding-bottom: 4px;
|
|
225
278
|
}
|
|
226
|
-
.v-list--density-compact.v-list--three-line
|
|
279
|
+
.v-list-item--density-compact.v-list-item--three-line {
|
|
227
280
|
min-height: 80px;
|
|
228
|
-
padding: 8px
|
|
281
|
+
padding-top: 8px;
|
|
282
|
+
padding-bottom: 8px;
|
|
283
|
+
}
|
|
284
|
+
.v-list-item--density-compact:not(.v-list-item--nav).v-list-item--one-line {
|
|
285
|
+
padding-inline-start: 16px;
|
|
286
|
+
padding-inline-end: 16px;
|
|
287
|
+
}
|
|
288
|
+
.v-list-item--density-compact:not(.v-list-item--nav).v-list-item--two-line {
|
|
289
|
+
padding-inline-start: 16px;
|
|
290
|
+
padding-inline-end: 16px;
|
|
291
|
+
}
|
|
292
|
+
.v-list-item--density-compact:not(.v-list-item--nav).v-list-item--three-line {
|
|
293
|
+
padding-inline-start: 16px;
|
|
294
|
+
padding-inline-end: 16px;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.v-list-item--nav {
|
|
298
|
+
padding-inline-start: 8px;
|
|
299
|
+
padding-inline-end: 8px;
|
|
300
|
+
}
|
|
301
|
+
.v-list .v-list-item--nav:not(:last-child):not(:only-child) {
|
|
302
|
+
margin-bottom: 4px;
|
|
229
303
|
}
|
|
230
304
|
|
|
231
305
|
.v-list-item__overlay {
|
|
@@ -247,6 +321,9 @@
|
|
|
247
321
|
.v-list {
|
|
248
322
|
--indent-padding: 0px;
|
|
249
323
|
}
|
|
324
|
+
.v-list--nav {
|
|
325
|
+
--indent-padding: -8px;
|
|
326
|
+
}
|
|
250
327
|
|
|
251
328
|
.v-list-group {
|
|
252
329
|
--parent-padding: var(--indent-padding);
|
|
@@ -263,8 +340,8 @@
|
|
|
263
340
|
padding-inline-start: calc(16px + var(--indent-padding)) !important;
|
|
264
341
|
}
|
|
265
342
|
|
|
266
|
-
.v-list-item--prepend,
|
|
267
|
-
.v-list-group__items .v-list-item--prepend {
|
|
343
|
+
.v-list-item--prepend .v-list-item-avatar,
|
|
344
|
+
.v-list-group__items .v-list-item--prepend .v-list-item-avatar {
|
|
268
345
|
padding-inline-start: calc(16px + var(--indent-padding) + 40px + 16px) !important;
|
|
269
346
|
}
|
|
270
347
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { withDirectives as _withDirectives, resolveDirective as _resolveDirective, createVNode as _createVNode } from "vue";
|
|
1
|
+
import { withDirectives as _withDirectives, resolveDirective as _resolveDirective, createVNode as _createVNode, Fragment as _Fragment } from "vue";
|
|
2
2
|
// Styles
|
|
3
3
|
import "./VListItem.css"; // Components
|
|
4
4
|
|
|
5
|
-
import { VAvatar } from "../VAvatar/index.mjs";
|
|
6
5
|
import { VListItemAvatar } from "./VListItemAvatar.mjs";
|
|
7
6
|
import { VListItemHeader } from "./VListItemHeader.mjs";
|
|
7
|
+
import { VListItemIcon } from "./VListItemIcon.mjs";
|
|
8
8
|
import { VListItemSubtitle } from "./VListItemSubtitle.mjs";
|
|
9
9
|
import { VListItemTitle } from "./VListItemTitle.mjs"; // Composables
|
|
10
10
|
|
|
@@ -37,12 +37,14 @@ export const VListItem = genericComponent()({
|
|
|
37
37
|
appendAvatar: String,
|
|
38
38
|
appendIcon: String,
|
|
39
39
|
disabled: Boolean,
|
|
40
|
-
|
|
40
|
+
lines: String,
|
|
41
|
+
nav: Boolean,
|
|
41
42
|
prependAvatar: String,
|
|
42
43
|
prependIcon: String,
|
|
43
44
|
subtitle: String,
|
|
44
45
|
title: String,
|
|
45
46
|
value: null,
|
|
47
|
+
link: Boolean,
|
|
46
48
|
...makeBorderProps(),
|
|
47
49
|
...makeDensityProps(),
|
|
48
50
|
...makeDimensionProps(),
|
|
@@ -70,6 +72,8 @@ export const VListItem = genericComponent()({
|
|
|
70
72
|
const {
|
|
71
73
|
select,
|
|
72
74
|
isSelected,
|
|
75
|
+
isIndeterminate,
|
|
76
|
+
isGroupActivator,
|
|
73
77
|
root,
|
|
74
78
|
parent
|
|
75
79
|
} = useNestedItem(id, false);
|
|
@@ -79,13 +83,12 @@ export const VListItem = genericComponent()({
|
|
|
79
83
|
|
|
80
84
|
return props.active || ((_link$isExactActive = link.isExactActive) == null ? void 0 : _link$isExactActive.value) || isSelected.value;
|
|
81
85
|
});
|
|
86
|
+
const roundedProps = computed(() => props.rounded || props.nav);
|
|
82
87
|
const variantProps = computed(() => {
|
|
83
88
|
var _props$activeColor;
|
|
84
89
|
|
|
85
|
-
const activeColor = (_props$activeColor = props.activeColor) != null ? _props$activeColor : props.color;
|
|
86
90
|
return {
|
|
87
|
-
color: isActive.value ? activeColor : props.color,
|
|
88
|
-
textColor: props.textColor,
|
|
91
|
+
color: isActive.value ? (_props$activeColor = props.activeColor) != null ? _props$activeColor : props.color : props.color,
|
|
89
92
|
variant: props.variant
|
|
90
93
|
};
|
|
91
94
|
});
|
|
@@ -127,50 +130,53 @@ export const VListItem = genericComponent()({
|
|
|
127
130
|
} = useElevation(props);
|
|
128
131
|
const {
|
|
129
132
|
roundedClasses
|
|
130
|
-
} = useRounded(
|
|
133
|
+
} = useRounded(roundedProps);
|
|
134
|
+
const lineClasses = computed(() => props.lines ? `v-list-item--${props.lines}-line` : undefined);
|
|
131
135
|
const slotProps = computed(() => ({
|
|
132
136
|
isActive: isActive.value,
|
|
133
137
|
select,
|
|
134
|
-
isSelected: isSelected.value
|
|
138
|
+
isSelected: isSelected.value,
|
|
139
|
+
isIndeterminate: isIndeterminate.value
|
|
135
140
|
}));
|
|
136
141
|
useRender(() => {
|
|
137
|
-
var _slots$default;
|
|
142
|
+
var _slots$prepend, _slots$default, _slots$append;
|
|
138
143
|
|
|
139
144
|
const Tag = link.isLink.value ? 'a' : props.tag;
|
|
145
|
+
const hasColor = !list || isSelected.value || isActive.value;
|
|
140
146
|
const hasTitle = slots.title || props.title;
|
|
141
147
|
const hasSubtitle = slots.subtitle || props.subtitle;
|
|
142
148
|
const hasHeader = !!(hasTitle || hasSubtitle);
|
|
143
149
|
const hasAppend = !!(slots.append || props.appendAvatar || props.appendIcon);
|
|
144
150
|
const hasPrepend = !!(slots.prepend || props.prependAvatar || props.prependIcon);
|
|
145
|
-
const isClickable = !props.disabled && (link.isClickable.value || props.
|
|
151
|
+
const isClickable = !props.disabled && (props.link || link.isClickable.value || props.value != null && !!list);
|
|
146
152
|
list == null ? void 0 : list.updateHasPrepend(hasPrepend);
|
|
147
153
|
return _withDirectives(_createVNode(Tag, {
|
|
148
154
|
"class": ['v-list-item', {
|
|
149
155
|
'v-list-item--active': isActive.value,
|
|
150
156
|
'v-list-item--disabled': props.disabled,
|
|
151
157
|
'v-list-item--link': isClickable,
|
|
158
|
+
'v-list-item--nav': props.nav,
|
|
152
159
|
'v-list-item--prepend': !hasPrepend && (list == null ? void 0 : list.hasPrepend.value),
|
|
153
|
-
[`${props.activeClass}`]: isActive.value
|
|
154
|
-
}, themeClasses.value, borderClasses.value, colorClasses.value, densityClasses.value, elevationClasses.value, roundedClasses.value, variantClasses.value],
|
|
155
|
-
"style": [colorStyles.value, dimensionStyles.value],
|
|
160
|
+
[`${props.activeClass}`]: isActive.value
|
|
161
|
+
}, themeClasses.value, borderClasses.value, hasColor ? colorClasses.value : undefined, densityClasses.value, elevationClasses.value, lineClasses.value, roundedClasses.value, variantClasses.value],
|
|
162
|
+
"style": [hasColor ? colorStyles.value : undefined, dimensionStyles.value],
|
|
156
163
|
"href": link.href.value,
|
|
157
164
|
"tabindex": isClickable ? 0 : undefined,
|
|
158
165
|
"onClick": isClickable && (e => {
|
|
159
166
|
var _link$navigate;
|
|
160
167
|
|
|
168
|
+
if (isGroupActivator) return;
|
|
161
169
|
(_link$navigate = link.navigate) == null ? void 0 : _link$navigate.call(link, e);
|
|
162
|
-
select(!isSelected.value, e);
|
|
170
|
+
props.value != null && select(!isSelected.value, e);
|
|
163
171
|
})
|
|
164
172
|
}, {
|
|
165
|
-
default: () => [genOverlays(isClickable || isActive.value, 'v-list-item'), hasPrepend && (
|
|
166
|
-
"
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
}, null)]
|
|
173
|
-
})), hasHeader && _createVNode(VListItemHeader, null, {
|
|
173
|
+
default: () => [genOverlays(isClickable || isActive.value, 'v-list-item'), hasPrepend && _createVNode(_Fragment, null, [props.prependAvatar && _createVNode(VListItemAvatar, {
|
|
174
|
+
"image": props.prependAvatar,
|
|
175
|
+
"start": true
|
|
176
|
+
}, null), props.prependIcon && _createVNode(VListItemIcon, {
|
|
177
|
+
"icon": props.prependIcon,
|
|
178
|
+
"start": true
|
|
179
|
+
}, null), (_slots$prepend = slots.prepend) == null ? void 0 : _slots$prepend.call(slots, slotProps.value)]), hasHeader && _createVNode(VListItemHeader, null, {
|
|
174
180
|
default: () => [hasTitle && _createVNode(VListItemTitle, null, {
|
|
175
181
|
default: () => [slots.title ? slots.title({
|
|
176
182
|
title: props.title
|
|
@@ -180,15 +186,13 @@ export const VListItem = genericComponent()({
|
|
|
180
186
|
subtitle: props.subtitle
|
|
181
187
|
}) : props.subtitle]
|
|
182
188
|
})]
|
|
183
|
-
}), (_slots$default = slots.default) == null ? void 0 : _slots$default.call(slots, slotProps.value), hasAppend && (slots.append ?
|
|
184
|
-
"
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
}, null)]
|
|
191
|
-
}))]
|
|
189
|
+
}), (_slots$default = slots.default) == null ? void 0 : _slots$default.call(slots, slotProps.value), hasAppend && _createVNode(_Fragment, null, [(_slots$append = slots.append) == null ? void 0 : _slots$append.call(slots, slotProps.value), props.appendAvatar && _createVNode(VListItemAvatar, {
|
|
190
|
+
"image": props.appendAvatar,
|
|
191
|
+
"end": true
|
|
192
|
+
}, null), props.appendIcon && _createVNode(VListItemIcon, {
|
|
193
|
+
"icon": props.appendIcon,
|
|
194
|
+
"end": true
|
|
195
|
+
}, null)])]
|
|
192
196
|
}), [[_resolveDirective("ripple"), isClickable]]);
|
|
193
197
|
});
|
|
194
198
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/VList/VListItem.tsx"],"names":["VAvatar","VListItemAvatar","VListItemHeader","VListItemSubtitle","VListItemTitle","genOverlays","makeVariantProps","useVariant","makeBorderProps","useBorder","makeDensityProps","useDensity","makeDimensionProps","useDimension","makeElevationProps","useElevation","makeRoundedProps","useRounded","makeRouterProps","useLink","makeTagProps","makeThemeProps","provideTheme","useList","Ripple","computed","onMounted","watch","genericComponent","useRender","useNestedItem","VListItem","name","directives","props","active","Boolean","activeColor","String","activeClass","appendAvatar","appendIcon","disabled","link","prependAvatar","prependIcon","subtitle","title","value","variant","setup","attrs","slots","id","href","select","isSelected","root","parent","list","isActive","isExactActive","variantProps","color","textColor","open","val","themeClasses","borderClasses","colorClasses","colorStyles","variantClasses","densityClasses","dimensionStyles","elevationClasses","roundedClasses","slotProps","Tag","isLink","tag","hasTitle","hasSubtitle","hasHeader","hasAppend","append","hasPrepend","prepend","isClickable","updateHasPrepend","undefined","e","navigate","density","default"],"mappings":";AAAA;AACA,yB,CAEA;;SACSA,O;SACAC,e;SACAC,e;SACAC,iB;SACAC,c,gCAET;;SACSC,W,EAAaC,gB,EAAkBC,U;SAC/BC,e,EAAiBC,S;SACjBC,gB,EAAkBC,U;SAClBC,kB,EAAoBC,Y;SACpBC,kB,EAAoBC,Y;SACpBC,gB,EA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f;AAAA,yCA6Be+C,WA7Bf;AAsFD,KAjGQ,CAAT;AAkGD;;AA3KE,CARoC,CAAlC","sourcesContent":["// Styles\nimport './VListItem.sass'\n\n// Components\nimport { VAvatar } from '@/components/VAvatar'\nimport { VListItemAvatar } from './VListItemAvatar'\nimport { VListItemHeader } from './VListItemHeader'\nimport { VListItemSubtitle } from './VListItemSubtitle'\nimport { VListItemTitle } from './VListItemTitle'\n\n// Composables\nimport { genOverlays, makeVariantProps, useVariant } from '@/composables/variant'\nimport { makeBorderProps, useBorder } from '@/composables/border'\nimport { makeDensityProps, useDensity } from '@/composables/density'\nimport { makeDimensionProps, useDimension } from '@/composables/dimensions'\nimport { makeElevationProps, useElevation } from '@/composables/elevation'\nimport { makeRoundedProps, useRounded } from '@/composables/rounded'\nimport { makeRouterProps, useLink } from '@/composables/router'\nimport { makeTagProps } from '@/composables/tag'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\nimport { useList } from './list'\n\n// Directives\nimport { Ripple } from '@/directives/ripple'\n\n// Utilities\nimport { computed, onMounted, watch } from 'vue'\nimport { genericComponent, useRender } from '@/util'\nimport { useNestedItem } from '@/composables/nested/nested'\n\n// Types\nimport type { MakeSlots } from '@/util'\n\ntype ListItemSlot = {\n isActive: boolean\n activate: (value: boolean) => void\n isSelected: boolean\n select: (value: boolean) => void\n}\n\nexport type ListItemTitleSlot = {\n title?: string\n}\n\nexport type ListItemSubtitleSlot = {\n subtitle?: string\n}\n\nexport const VListItem = genericComponent<new () => {\n $slots: MakeSlots<{\n prepend: [ListItemSlot]\n append: [ListItemSlot]\n default: [ListItemSlot]\n title: [ListItemTitleSlot]\n subtitle: [ListItemSubtitleSlot]\n }>\n}>()({\n name: 'VListItem',\n\n directives: { Ripple },\n\n props: {\n active: Boolean,\n activeColor: String,\n activeClass: String,\n appendAvatar: String,\n appendIcon: String,\n disabled: Boolean,\n link: Boolean,\n prependAvatar: String,\n prependIcon: String,\n subtitle: String,\n title: String,\n value: null,\n\n ...makeBorderProps(),\n ...makeDensityProps(),\n ...makeDimensionProps(),\n ...makeElevationProps(),\n ...makeRoundedProps(),\n ...makeRouterProps(),\n ...makeTagProps(),\n ...makeThemeProps(),\n ...makeVariantProps({ variant: 'text' } as const),\n },\n\n setup (props, { attrs, slots }) {\n const link = useLink(props, attrs)\n const id = computed(() => props.value ?? link.href.value)\n const { select, isSelected, root, parent } = useNestedItem(id, false)\n const list = useList()\n const isActive = computed(() => {\n return props.active || link.isExactActive?.value || isSelected.value\n })\n const variantProps = computed(() => {\n const activeColor = props.activeColor ?? props.color\n return {\n color: isActive.value ? activeColor : props.color,\n textColor: props.textColor,\n variant: props.variant,\n }\n })\n\n onMounted(() => {\n if (link.isExactActive?.value && parent.value != null) {\n root.open(parent.value, true)\n }\n })\n\n watch(() => link.isExactActive?.value, val => {\n if (val && parent.value != null) {\n root.open(parent.value, true)\n }\n })\n\n const { themeClasses } = provideTheme(props)\n const { borderClasses } = useBorder(props)\n const { colorClasses, colorStyles, variantClasses } = useVariant(variantProps)\n const { densityClasses } = useDensity(props)\n const { dimensionStyles } = useDimension(props)\n const { elevationClasses } = useElevation(props)\n const { roundedClasses } = useRounded(props)\n\n const slotProps = computed(() => ({\n isActive: isActive.value,\n select,\n isSelected: isSelected.value,\n }))\n\n useRender(() => {\n const Tag = (link.isLink.value) ? 'a' : props.tag\n const hasTitle = (slots.title || props.title)\n const hasSubtitle = (slots.subtitle || props.subtitle)\n const hasHeader = !!(hasTitle || hasSubtitle)\n const hasAppend = !!(slots.append || props.appendAvatar || props.appendIcon)\n const hasPrepend = !!(slots.prepend || props.prependAvatar || props.prependIcon)\n const isClickable = !props.disabled && (link.isClickable.value || props.link || props.value != null)\n\n list?.updateHasPrepend(hasPrepend)\n\n return (\n <Tag\n class={[\n 'v-list-item',\n {\n 'v-list-item--active': isActive.value,\n 'v-list-item--disabled': props.disabled,\n 'v-list-item--link': isClickable,\n 'v-list-item--prepend': !hasPrepend && list?.hasPrepend.value,\n [`${props.activeClass}`]: isActive.value && props.activeClass,\n },\n themeClasses.value,\n borderClasses.value,\n colorClasses.value,\n densityClasses.value,\n elevationClasses.value,\n roundedClasses.value,\n variantClasses.value,\n ]}\n style={[\n colorStyles.value,\n dimensionStyles.value,\n ]}\n href={ link.href.value }\n tabindex={ isClickable ? 0 : undefined }\n onClick={ isClickable && ((e: MouseEvent) => {\n link.navigate?.(e)\n select(!isSelected.value, e)\n })}\n v-ripple={ isClickable }\n >\n { genOverlays(isClickable || isActive.value, 'v-list-item') }\n\n { hasPrepend && (\n slots.prepend\n ? slots.prepend(slotProps.value)\n : (\n <VListItemAvatar left>\n <VAvatar\n density={ props.density }\n icon={ props.prependIcon }\n image={ props.prependAvatar }\n />\n </VListItemAvatar>\n )\n ) }\n\n { hasHeader && (\n <VListItemHeader>\n { hasTitle && (\n <VListItemTitle>\n { slots.title\n ? slots.title({ title: props.title })\n : props.title\n }\n </VListItemTitle>\n ) }\n\n { hasSubtitle && (\n <VListItemSubtitle>\n { slots.subtitle\n ? slots.subtitle({ subtitle: props.subtitle })\n : props.subtitle\n }\n </VListItemSubtitle>\n ) }\n </VListItemHeader>\n ) }\n\n { slots.default?.(slotProps.value) }\n\n { hasAppend && (\n slots.append\n ? slots.append(slotProps.value)\n : (\n <VListItemAvatar right>\n <VAvatar\n density={ props.density }\n icon={ props.appendIcon }\n image={ props.appendAvatar }\n />\n </VListItemAvatar>\n )\n ) }\n </Tag>\n )\n })\n },\n})\n\nexport type VListItem = InstanceType<typeof VListItem>\n"],"file":"VListItem.mjs"}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/VList/VListItem.tsx"],"names":["VListItemAvatar","VListItemHeader","VListItemIcon","VListItemSubtitle","VListItemTitle","genOverlays","makeVariantProps","useVariant","makeBorderProps","useBorder","makeDensityProps","useDensity","makeDimensionProps","useDimension","makeElevationProps","useElevation","makeRoundedProps","useRounded","makeRouterProps","useLink","makeTagProps","makeThemeProps","provideTheme","useList","Ripple","computed","onMounted","watch","genericComponent","useRender","useNestedItem","VListItem","name","directives","props","active","Boolean","activeColor","String","activeClass","appendAvatar","appendIcon","disabled","lines","nav","prependAvatar","prependIcon","subtitle","title","value","link","variant","setup","attrs","slots","id","href","select","isSelected","isIndeterminate","isGroupActivator","root","parent","list","isActive","isExactActive","roundedProps","rounded","variantProps","color","open","val","themeClasses","borderClasses","colorClasses","colorStyles","variantClasses","densityClasses","dimensionStyles","elevationClasses","roundedClasses","lineClasses","undefined","slotProps","Tag","isLink","tag","hasColor","hasTitle","hasSubtitle","hasHeader","hasAppend","append","hasPrepend","prepend","isClickable","updateHasPrepend","e","navigate","default"],"mappings":";AAAA;AACA,yB,CAEA;;SACSA,e;SACAC,e;SACAC,a;SACAC,iB;SACAC,c,gCAET;;SACSC,W,EAAaC,gB,EAAkBC,U;SAC/BC,e,EAAiBC,S;SACjBC,gB,EAAkBC,U;SAClBC,kB,EAAoBC,Y;SACpBC,kB,EAAoBC,Y;SACpBC,gB,EAAkBC,U;SAClBC,e,EAAiBC,O;SACjBC,Y;SACAC,c,EAAgBC,Y;SAChBC,O,sBAET;;SACSC,M,6CAET;;AACA,SAASC,QAAT,EAAmBC,SAAnB,EAA8BC,KAA9B,QAA2C,KAA3C;SACSC,gB,EAAkBC,S;SAClBC,a,+CAET;;AAmBA,OAAO,MAAMC,SAAS,GAAGH,gBAAgB,GAQpC;AACHI,EAAAA,IAAI,EAAE,WADH;AAGHC,EAAAA,UAAU,EAAE;AAAET,IAAAA;AAAF,GAHT;AAKHU,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAEC,OADH;AAELC,IAAAA,WAAW,EAAEC,MAFR;AAGLC,IAAAA,WAAW,EAAED,MAHR;AAILE,IAAAA,YAAY,EAAEF,MAJT;AAKLG,IAAAA,UAAU,EAAEH,MALP;AAMLI,IAAAA,QAAQ,EAAEN,OANL;AAOLO,IAAAA,KAAK,EAAEL,MAPF;AAQLM,IAAAA,GAAG,EAAER,OARA;AASLS,IAAAA,aAAa,EAAEP,MATV;AA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AAAA,yCAiCesD,WAjCf;AAsGD,KAlHQ,CAAT;AAmHD;;AA7LE,CARoC,CAAlC","sourcesContent":["// Styles\nimport './VListItem.sass'\n\n// Components\nimport { VListItemAvatar } from './VListItemAvatar'\nimport { VListItemHeader } from './VListItemHeader'\nimport { VListItemIcon } from './VListItemIcon'\nimport { VListItemSubtitle } from './VListItemSubtitle'\nimport { VListItemTitle } from './VListItemTitle'\n\n// Composables\nimport { genOverlays, makeVariantProps, useVariant } from '@/composables/variant'\nimport { makeBorderProps, useBorder } from '@/composables/border'\nimport { makeDensityProps, useDensity } from '@/composables/density'\nimport { makeDimensionProps, useDimension } from '@/composables/dimensions'\nimport { makeElevationProps, useElevation } from '@/composables/elevation'\nimport { makeRoundedProps, useRounded } from '@/composables/rounded'\nimport { makeRouterProps, useLink } from '@/composables/router'\nimport { makeTagProps } from '@/composables/tag'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\nimport { useList } from './list'\n\n// Directives\nimport { Ripple } from '@/directives/ripple'\n\n// Utilities\nimport { computed, onMounted, watch } from 'vue'\nimport { genericComponent, useRender } from '@/util'\nimport { useNestedItem } from '@/composables/nested/nested'\n\n// Types\nimport type { MakeSlots } from '@/util'\nimport type { PropType } from 'vue'\n\ntype ListItemSlot = {\n isActive: boolean\n activate: (value: boolean) => void\n isSelected: boolean\n select: (value: boolean) => void\n}\n\nexport type ListItemTitleSlot = {\n title?: string\n}\n\nexport type ListItemSubtitleSlot = {\n subtitle?: string\n}\n\nexport const VListItem = genericComponent<new () => {\n $slots: MakeSlots<{\n prepend: [ListItemSlot]\n append: [ListItemSlot]\n default: [ListItemSlot]\n title: [ListItemTitleSlot]\n subtitle: [ListItemSubtitleSlot]\n }>\n}>()({\n name: 'VListItem',\n\n directives: { Ripple },\n\n props: {\n active: Boolean,\n activeColor: String,\n activeClass: String,\n appendAvatar: String,\n appendIcon: String,\n disabled: Boolean,\n lines: String as PropType<'one' | 'two' | 'three'>,\n nav: Boolean,\n prependAvatar: String,\n prependIcon: String,\n subtitle: String,\n title: String,\n value: null,\n link: Boolean,\n\n ...makeBorderProps(),\n ...makeDensityProps(),\n ...makeDimensionProps(),\n ...makeElevationProps(),\n ...makeRoundedProps(),\n ...makeRouterProps(),\n ...makeTagProps(),\n ...makeThemeProps(),\n ...makeVariantProps({ variant: 'text' } as const),\n },\n\n setup (props, { attrs, slots }) {\n const link = useLink(props, attrs)\n const id = computed(() => props.value ?? link.href.value)\n const { select, isSelected, isIndeterminate, isGroupActivator, root, parent } = useNestedItem(id, false)\n const list = useList()\n const isActive = computed(() => {\n return props.active || link.isExactActive?.value || isSelected.value\n })\n const roundedProps = computed(() => props.rounded || props.nav)\n const variantProps = computed(() => ({\n color: isActive.value ? props.activeColor ?? props.color : props.color,\n variant: props.variant,\n }))\n\n onMounted(() => {\n if (link.isExactActive?.value && parent.value != null) {\n root.open(parent.value, true)\n }\n })\n\n watch(() => link.isExactActive?.value, val => {\n if (val && parent.value != null) {\n root.open(parent.value, true)\n }\n })\n\n const { themeClasses } = provideTheme(props)\n const { borderClasses } = useBorder(props)\n const { colorClasses, colorStyles, variantClasses } = useVariant(variantProps)\n const { densityClasses } = useDensity(props)\n const { dimensionStyles } = useDimension(props)\n const { elevationClasses } = useElevation(props)\n const { roundedClasses } = useRounded(roundedProps)\n const lineClasses = computed(() => props.lines ? `v-list-item--${props.lines}-line` : undefined)\n\n const slotProps = computed(() => ({\n isActive: isActive.value,\n select,\n isSelected: isSelected.value,\n isIndeterminate: isIndeterminate.value,\n }))\n\n useRender(() => {\n const Tag = (link.isLink.value) ? 'a' : props.tag\n const hasColor = !list || isSelected.value || isActive.value\n const hasTitle = (slots.title || props.title)\n const hasSubtitle = (slots.subtitle || props.subtitle)\n const hasHeader = !!(hasTitle || hasSubtitle)\n const hasAppend = !!(slots.append || props.appendAvatar || props.appendIcon)\n const hasPrepend = !!(slots.prepend || props.prependAvatar || props.prependIcon)\n const isClickable = !props.disabled && (props.link || link.isClickable.value || (props.value != null && !!list))\n\n list?.updateHasPrepend(hasPrepend)\n\n return (\n <Tag\n class={[\n 'v-list-item',\n {\n 'v-list-item--active': isActive.value,\n 'v-list-item--disabled': props.disabled,\n 'v-list-item--link': isClickable,\n 'v-list-item--nav': props.nav,\n 'v-list-item--prepend': !hasPrepend && list?.hasPrepend.value,\n [`${props.activeClass}`]: isActive.value,\n },\n themeClasses.value,\n borderClasses.value,\n hasColor ? colorClasses.value : undefined,\n densityClasses.value,\n elevationClasses.value,\n lineClasses.value,\n roundedClasses.value,\n variantClasses.value,\n ]}\n style={[\n hasColor ? colorStyles.value : undefined,\n dimensionStyles.value,\n ]}\n href={ link.href.value }\n tabindex={ isClickable ? 0 : undefined }\n onClick={ isClickable && ((e: MouseEvent) => {\n if (isGroupActivator) return\n\n link.navigate?.(e)\n props.value != null && select(!isSelected.value, e)\n })}\n v-ripple={ isClickable }\n >\n { genOverlays(isClickable || isActive.value, 'v-list-item') }\n\n { hasPrepend && (\n <>\n { props.prependAvatar && (\n <VListItemAvatar\n image={ props.prependAvatar }\n start\n />\n ) }\n\n { props.prependIcon && (\n <VListItemIcon\n icon={ props.prependIcon }\n start\n />\n ) }\n\n { slots.prepend?.(slotProps.value) }\n </>\n ) }\n\n { hasHeader && (\n <VListItemHeader>\n { hasTitle && (\n <VListItemTitle>\n { slots.title\n ? slots.title({ title: props.title })\n : props.title\n }\n </VListItemTitle>\n ) }\n\n { hasSubtitle && (\n <VListItemSubtitle>\n { slots.subtitle\n ? slots.subtitle({ subtitle: props.subtitle })\n : props.subtitle\n }\n </VListItemSubtitle>\n ) }\n </VListItemHeader>\n ) }\n\n { slots.default?.(slotProps.value) }\n\n { hasAppend && (\n <>\n { slots.append?.(slotProps.value) }\n\n { props.appendAvatar && (\n <VListItemAvatar\n image={ props.appendAvatar }\n end\n />\n ) }\n\n { props.appendIcon && (\n <VListItemIcon\n icon={ props.appendIcon }\n end\n />\n ) }\n </>\n ) }\n </Tag>\n )\n })\n },\n})\n\nexport type VListItem = InstanceType<typeof VListItem>\n"],"file":"VListItem.mjs"}
|
|
@@ -28,15 +28,21 @@
|
|
|
28
28
|
&--link
|
|
29
29
|
cursor: pointer
|
|
30
30
|
|
|
31
|
-
.v-list-item-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
.v-list-item-action,
|
|
32
|
+
.v-list-item-avatar,
|
|
33
|
+
.v-list-item-icon
|
|
34
34
|
align-self: center
|
|
35
|
+
display: flex
|
|
36
|
+
align-items: center
|
|
37
|
+
flex: none
|
|
35
38
|
transition: inherit
|
|
36
39
|
transition-property: height, width
|
|
37
40
|
|
|
38
|
-
|
|
39
|
-
|
|
41
|
+
.v-list-item--three-line &
|
|
42
|
+
align-self: flex-start
|
|
43
|
+
|
|
44
|
+
.v-list-item-avatar
|
|
45
|
+
$root: &
|
|
40
46
|
|
|
41
47
|
&--start
|
|
42
48
|
margin-inline-end: $list-item-avatar-margin-end
|
|
@@ -45,16 +51,23 @@
|
|
|
45
51
|
margin-inline-start: $list-item-avatar-margin-start
|
|
46
52
|
|
|
47
53
|
@at-root
|
|
48
|
-
@include tools.density('v-list', $list-density) using ($modifier)
|
|
49
|
-
&.v-list--three-line #{$root}
|
|
54
|
+
@include tools.density('v-list-item', $list-density) using ($modifier)
|
|
55
|
+
&.v-list-item--three-line #{$root}
|
|
50
56
|
margin-top: $list-item-avatar-margin-y - $modifier
|
|
51
57
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
margin-
|
|
58
|
+
.v-list-item-icon
|
|
59
|
+
&--start
|
|
60
|
+
margin-inline-end: $list-item-icon-margin-end
|
|
55
61
|
|
|
56
|
-
|
|
57
|
-
|
|
62
|
+
&--end
|
|
63
|
+
margin-inline-start: $list-item-icon-margin-start
|
|
64
|
+
|
|
65
|
+
.v-list-item-action
|
|
66
|
+
&--start
|
|
67
|
+
margin-inline-end: $list-item-action-margin-start
|
|
68
|
+
|
|
69
|
+
&--end
|
|
70
|
+
margin-inline-start: $list-item-action-margin-end
|
|
58
71
|
|
|
59
72
|
.v-list-item-media
|
|
60
73
|
margin-top: $list-item-media-margin-top
|
|
@@ -66,11 +79,11 @@
|
|
|
66
79
|
&--end
|
|
67
80
|
margin-inline-start: $list-item-media-margin-start
|
|
68
81
|
|
|
69
|
-
.v-list--two-line &
|
|
82
|
+
.v-list-item--two-line &
|
|
70
83
|
margin-top: $list-item-media-two-line-margin-top
|
|
71
84
|
margin-bottom: $list-item-media-two-line-margin-bottom
|
|
72
85
|
|
|
73
|
-
.v-list--three-line &
|
|
86
|
+
.v-list-item--three-line &
|
|
74
87
|
margin-top: $list-item-media-three-line-margin-top
|
|
75
88
|
margin-bottom: $list-item-media-three-line-margin-bottom
|
|
76
89
|
|
|
@@ -86,15 +99,18 @@
|
|
|
86
99
|
padding: $list-item-subtitle-padding
|
|
87
100
|
text-overflow: ellipsis
|
|
88
101
|
|
|
89
|
-
.v-list--
|
|
102
|
+
.v-list-item--one-line &
|
|
90
103
|
-webkit-line-clamp: 1
|
|
91
104
|
|
|
92
|
-
.v-list--
|
|
105
|
+
.v-list-item--two-line &
|
|
93
106
|
-webkit-line-clamp: 2
|
|
94
107
|
|
|
108
|
+
.v-list-item--three-line &
|
|
109
|
+
-webkit-line-clamp: 3
|
|
110
|
+
|
|
95
111
|
@include tools.typography($list-item-subtitle-typography...)
|
|
96
112
|
|
|
97
|
-
.v-list--nav &
|
|
113
|
+
.v-list-item--nav &
|
|
98
114
|
@include tools.typography($list-item-nav-subtitle-typography...)
|
|
99
115
|
|
|
100
116
|
.v-list-item-title
|
|
@@ -109,25 +125,53 @@
|
|
|
109
125
|
|
|
110
126
|
@include tools.typography($list-item-title-typography...)
|
|
111
127
|
|
|
112
|
-
.v-list--nav &
|
|
128
|
+
.v-list-item--nav &
|
|
113
129
|
@include tools.typography($list-item-nav-title-typography...)
|
|
114
130
|
|
|
115
131
|
.v-list-item
|
|
116
|
-
$root: &
|
|
117
|
-
|
|
118
132
|
@at-root
|
|
119
|
-
@include tools.density('v-list', $list-density) using ($modifier)
|
|
120
|
-
&.v-list--one-line
|
|
133
|
+
@include tools.density('v-list-item', $list-density) using ($modifier)
|
|
134
|
+
&.v-list-item--one-line
|
|
135
|
+
$one-line-padding: (list.nth($list-item-padding, 1) + $modifier)
|
|
136
|
+
|
|
121
137
|
min-height: $list-item-min-height + $modifier
|
|
122
|
-
padding:
|
|
138
|
+
padding-top: $one-line-padding
|
|
139
|
+
padding-bottom: $one-line-padding
|
|
140
|
+
|
|
141
|
+
&.v-list-item--two-line
|
|
142
|
+
$two-line-padding: (list.nth($list-item-two-line-padding, 1) + $modifier)
|
|
123
143
|
|
|
124
|
-
&.v-list--two-line #{$root}
|
|
125
144
|
min-height: $list-item-two-line-min-height + $modifier
|
|
126
|
-
padding:
|
|
145
|
+
padding-top: $two-line-padding
|
|
146
|
+
padding-bottom: $two-line-padding
|
|
147
|
+
|
|
148
|
+
&.v-list-item--three-line
|
|
149
|
+
$three-line-padding: (list.nth($list-item-three-line-padding, 1) + $modifier)
|
|
127
150
|
|
|
128
|
-
&.v-list--three-line #{$root}
|
|
129
151
|
min-height: $list-item-three-line-min-height + $modifier
|
|
130
|
-
padding:
|
|
152
|
+
padding-top: $three-line-padding
|
|
153
|
+
padding-bottom: $three-line-padding
|
|
154
|
+
|
|
155
|
+
&:not(.v-list-item--nav)
|
|
156
|
+
&.v-list-item--one-line
|
|
157
|
+
padding-inline-start: list.nth($list-item-padding, 2)
|
|
158
|
+
padding-inline-end: list.nth($list-item-padding, 2)
|
|
159
|
+
|
|
160
|
+
&.v-list-item--two-line
|
|
161
|
+
padding-inline-start: list.nth($list-item-two-line-padding, 2)
|
|
162
|
+
padding-inline-end: list.nth($list-item-two-line-padding, 2)
|
|
163
|
+
|
|
164
|
+
&.v-list-item--three-line
|
|
165
|
+
padding-inline-start: list.nth($list-item-three-line-padding, 2)
|
|
166
|
+
padding-inline-end: list.nth($list-item-three-line-padding, 2)
|
|
167
|
+
|
|
168
|
+
&--nav
|
|
169
|
+
padding-inline-start: $list-nav-padding
|
|
170
|
+
padding-inline-end: $list-nav-padding
|
|
171
|
+
|
|
172
|
+
.v-list &
|
|
173
|
+
&:not(:last-child):not(:only-child)
|
|
174
|
+
margin-bottom: $list-item-nav-margin-top
|
|
131
175
|
|
|
132
176
|
.v-list-item__overlay
|
|
133
177
|
background-color: currentColor
|
|
@@ -148,6 +192,9 @@ $base-padding: list.nth($list-item-padding, 2)
|
|
|
148
192
|
.v-list
|
|
149
193
|
--indent-padding: 0px
|
|
150
194
|
|
|
195
|
+
&--nav
|
|
196
|
+
--indent-padding: -#{$list-nav-padding}
|
|
197
|
+
|
|
151
198
|
.v-list-group
|
|
152
199
|
--parent-padding: var(--indent-padding)
|
|
153
200
|
&--prepend
|
|
@@ -161,7 +208,8 @@ $base-padding: list.nth($list-item-padding, 2)
|
|
|
161
208
|
|
|
162
209
|
.v-list-item--prepend,
|
|
163
210
|
.v-list-group__items .v-list-item--prepend
|
|
164
|
-
|
|
211
|
+
.v-list-item-avatar
|
|
212
|
+
padding-inline-start: calc(#{$base-padding} + var(--indent-padding) + #{$list-item-avatar-size} + #{$list-item-avatar-margin-start}) !important
|
|
165
213
|
|
|
166
214
|
.v-list-group__header.v-list-item--active
|
|
167
215
|
.v-list-item__overlay
|