vuetify 3.5.8 → 3.5.10

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.
Files changed (189) hide show
  1. package/dist/_component-variables-labs.sass +1 -0
  2. package/dist/json/attributes.json +525 -13
  3. package/dist/json/importMap-labs.json +24 -8
  4. package/dist/json/importMap.json +130 -130
  5. package/dist/json/tags.json +148 -0
  6. package/dist/json/web-types.json +2021 -147
  7. package/dist/vuetify-labs.css +2819 -2760
  8. package/dist/vuetify-labs.d.ts +5860 -2816
  9. package/dist/vuetify-labs.esm.js +1286 -248
  10. package/dist/vuetify-labs.esm.js.map +1 -1
  11. package/dist/vuetify-labs.js +1286 -247
  12. package/dist/vuetify-labs.min.css +2 -2
  13. package/dist/vuetify.css +553 -547
  14. package/dist/vuetify.d.ts +2835 -2281
  15. package/dist/vuetify.esm.js +883 -408
  16. package/dist/vuetify.esm.js.map +1 -1
  17. package/dist/vuetify.js +882 -406
  18. package/dist/vuetify.js.map +1 -1
  19. package/dist/vuetify.min.css +2 -2
  20. package/dist/vuetify.min.js +1137 -1109
  21. package/dist/vuetify.min.js.map +1 -1
  22. package/lib/components/VAlert/index.d.mts +15 -15
  23. package/lib/components/VApp/index.d.mts +8 -8
  24. package/lib/components/VAppBar/index.d.mts +7 -7
  25. package/lib/components/VAutocomplete/VAutocomplete.mjs +9 -7
  26. package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
  27. package/lib/components/VAutocomplete/index.d.mts +232 -100
  28. package/lib/components/VAvatar/index.d.mts +8 -8
  29. package/lib/components/VBadge/index.d.mts +7 -7
  30. package/lib/components/VBanner/index.d.mts +20 -20
  31. package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs.map +1 -1
  32. package/lib/components/VBreadcrumbs/index.d.mts +27 -26
  33. package/lib/components/VBtnGroup/index.d.mts +8 -8
  34. package/lib/components/VCard/index.d.mts +32 -32
  35. package/lib/components/VCarousel/index.d.mts +6 -6
  36. package/lib/components/VCheckbox/index.d.mts +44 -44
  37. package/lib/components/VChip/index.d.mts +7 -7
  38. package/lib/components/VCode/index.d.mts +8 -8
  39. package/lib/components/VColorPicker/VColorPickerPreview.css +1 -0
  40. package/lib/components/VColorPicker/VColorPickerPreview.sass +1 -0
  41. package/lib/components/VColorPicker/_variables.scss +1 -0
  42. package/lib/components/VCombobox/VCombobox.mjs +10 -7
  43. package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
  44. package/lib/components/VCombobox/index.d.mts +232 -100
  45. package/lib/components/VDataTable/index.d.mts +6 -6
  46. package/lib/components/VDatePicker/VDatePickerControls.mjs +1 -0
  47. package/lib/components/VDatePicker/VDatePickerControls.mjs.map +1 -1
  48. package/lib/components/VDatePicker/VDatePickerMonth.mjs +10 -4
  49. package/lib/components/VDatePicker/VDatePickerMonth.mjs.map +1 -1
  50. package/lib/components/VDatePicker/index.d.mts +10 -10
  51. package/lib/components/VDefaultsProvider/index.d.mts +8 -8
  52. package/lib/components/VDialog/index.d.mts +12 -6
  53. package/lib/components/VDivider/index.d.mts +8 -8
  54. package/lib/components/VExpansionPanel/index.d.mts +19 -19
  55. package/lib/components/VField/VField.css +2 -0
  56. package/lib/components/VField/VField.mjs +1 -1
  57. package/lib/components/VField/VField.mjs.map +1 -1
  58. package/lib/components/VField/VField.sass +2 -0
  59. package/lib/components/VField/index.d.mts +28 -28
  60. package/lib/components/VFileInput/index.d.mts +133 -133
  61. package/lib/components/VFooter/index.d.mts +8 -8
  62. package/lib/components/VGrid/index.d.mts +32 -32
  63. package/lib/components/VIcon/VIcon.css +4 -0
  64. package/lib/components/VIcon/VIcon.mjs +7 -3
  65. package/lib/components/VIcon/VIcon.mjs.map +1 -1
  66. package/lib/components/VIcon/VIcon.sass +4 -0
  67. package/lib/components/VIcon/_variables.scss +1 -0
  68. package/lib/components/VIcon/index.d.mts +25 -16
  69. package/lib/components/VImg/index.d.mts +4 -4
  70. package/lib/components/VInput/index.d.mts +21 -21
  71. package/lib/components/VKbd/index.d.mts +8 -8
  72. package/lib/components/VLabel/index.d.mts +8 -8
  73. package/lib/components/VLayout/index.d.mts +16 -16
  74. package/lib/components/VLazy/index.d.mts +8 -8
  75. package/lib/components/VList/VList.mjs +8 -2
  76. package/lib/components/VList/VList.mjs.map +1 -1
  77. package/lib/components/VList/VListGroup.mjs +3 -1
  78. package/lib/components/VList/VListGroup.mjs.map +1 -1
  79. package/lib/components/VList/VListItem.mjs +17 -4
  80. package/lib/components/VList/VListItem.mjs.map +1 -1
  81. package/lib/components/VList/index.d.mts +156 -54
  82. package/lib/components/VLocaleProvider/index.d.mts +12 -12
  83. package/lib/components/VMain/index.d.mts +8 -8
  84. package/lib/components/VMenu/VMenu.mjs +3 -0
  85. package/lib/components/VMenu/VMenu.mjs.map +1 -1
  86. package/lib/components/VMenu/index.d.mts +14 -8
  87. package/lib/components/VNavigationDrawer/VNavigationDrawer.css +1 -1
  88. package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs +22 -8
  89. package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs.map +1 -1
  90. package/lib/components/VNavigationDrawer/VNavigationDrawer.sass +2 -1
  91. package/lib/components/VNavigationDrawer/index.d.mts +11 -11
  92. package/lib/components/VOtpInput/VOtpInput.mjs +7 -2
  93. package/lib/components/VOtpInput/VOtpInput.mjs.map +1 -1
  94. package/lib/components/VOtpInput/index.d.mts +31 -31
  95. package/lib/components/VOverlay/VOverlay.mjs +8 -3
  96. package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
  97. package/lib/components/VOverlay/index.d.mts +3 -0
  98. package/lib/components/VOverlay/scrollStrategies.mjs +2 -2
  99. package/lib/components/VOverlay/scrollStrategies.mjs.map +1 -1
  100. package/lib/components/VPagination/index.d.mts +7 -7
  101. package/lib/components/VProgressLinear/VProgressLinear.css +0 -1
  102. package/lib/components/VProgressLinear/VProgressLinear.sass +0 -1
  103. package/lib/components/VProgressLinear/index.d.mts +7 -7
  104. package/lib/components/VRadioGroup/index.d.mts +44 -44
  105. package/lib/components/VRangeSlider/index.d.mts +47 -47
  106. package/lib/components/VRating/index.d.mts +7 -7
  107. package/lib/components/VResponsive/index.d.mts +8 -8
  108. package/lib/components/VSelect/VSelect.mjs +5 -3
  109. package/lib/components/VSelect/VSelect.mjs.map +1 -1
  110. package/lib/components/VSelect/index.d.mts +232 -100
  111. package/lib/components/VSheet/index.d.mts +8 -8
  112. package/lib/components/VSkeletonLoader/index.d.mts +8 -8
  113. package/lib/components/VSlider/index.d.mts +47 -47
  114. package/lib/components/VSnackbar/index.d.mts +25 -19
  115. package/lib/components/VStepper/index.d.mts +41 -41
  116. package/lib/components/VSwitch/index.d.mts +39 -39
  117. package/lib/components/VSystemBar/index.d.mts +8 -8
  118. package/lib/components/VTabs/index.d.mts +15 -15
  119. package/lib/components/VTextField/index.d.mts +173 -173
  120. package/lib/components/VTextarea/index.d.mts +119 -119
  121. package/lib/components/VThemeProvider/index.d.mts +8 -8
  122. package/lib/components/VTimeline/index.d.mts +8 -8
  123. package/lib/components/VToolbar/index.d.mts +8 -8
  124. package/lib/components/VTooltip/index.d.mts +14 -8
  125. package/lib/components/VWindow/index.d.mts +10 -10
  126. package/lib/components/index.d.mts +2478 -1943
  127. package/lib/components/transitions/index.d.mts +128 -128
  128. package/lib/composables/date/adapters/vuetify.mjs +1 -1
  129. package/lib/composables/date/adapters/vuetify.mjs.map +1 -1
  130. package/lib/composables/nested/activeStrategies.mjs +121 -0
  131. package/lib/composables/nested/activeStrategies.mjs.map +1 -0
  132. package/lib/composables/nested/nested.mjs +50 -1
  133. package/lib/composables/nested/nested.mjs.map +1 -1
  134. package/lib/composables/nested/selectStrategies.mjs +4 -2
  135. package/lib/composables/nested/selectStrategies.mjs.map +1 -1
  136. package/lib/composables/theme.mjs +1 -1
  137. package/lib/composables/theme.mjs.map +1 -1
  138. package/lib/entry-bundler.mjs +3 -2
  139. package/lib/entry-bundler.mjs.map +1 -1
  140. package/lib/framework.mjs +1 -1
  141. package/lib/framework.mjs.map +1 -1
  142. package/lib/iconsets/fa.mjs +2 -0
  143. package/lib/iconsets/fa.mjs.map +1 -1
  144. package/lib/iconsets/fa4.mjs +2 -0
  145. package/lib/iconsets/fa4.mjs.map +1 -1
  146. package/lib/iconsets/md.mjs +2 -0
  147. package/lib/iconsets/md.mjs.map +1 -1
  148. package/lib/iconsets/mdi-svg.mjs +2 -0
  149. package/lib/iconsets/mdi-svg.mjs.map +1 -1
  150. package/lib/iconsets/mdi.mjs +2 -0
  151. package/lib/iconsets/mdi.mjs.map +1 -1
  152. package/lib/index.d.mts +48 -44
  153. package/lib/labs/VCalendar/index.d.mts +32 -32
  154. package/lib/labs/VFab/index.d.mts +15 -15
  155. package/lib/labs/VNumberInput/VNumberInput.css +38 -0
  156. package/lib/labs/VNumberInput/VNumberInput.mjs +209 -0
  157. package/lib/labs/VNumberInput/VNumberInput.mjs.map +1 -0
  158. package/lib/labs/VNumberInput/VNumberInput.sass +47 -0
  159. package/lib/labs/VNumberInput/_variables.scss +1 -0
  160. package/lib/labs/VNumberInput/index.d.mts +607 -0
  161. package/lib/labs/VNumberInput/index.mjs +2 -0
  162. package/lib/labs/VNumberInput/index.mjs.map +1 -0
  163. package/lib/labs/VPicker/index.d.mts +8 -8
  164. package/lib/labs/VSparkline/index.d.mts +7 -7
  165. package/lib/labs/VSpeedDial/VSpeedDial.mjs +9 -5
  166. package/lib/labs/VSpeedDial/VSpeedDial.mjs.map +1 -1
  167. package/lib/labs/VSpeedDial/index.d.mts +120 -24
  168. package/lib/labs/VTreeview/VTreeview.mjs +154 -0
  169. package/lib/labs/VTreeview/VTreeview.mjs.map +1 -0
  170. package/lib/labs/VTreeview/VTreeviewChildren.mjs +98 -0
  171. package/lib/labs/VTreeview/VTreeviewChildren.mjs.map +1 -0
  172. package/lib/labs/VTreeview/VTreeviewGroup.mjs +48 -0
  173. package/lib/labs/VTreeview/VTreeviewGroup.mjs.map +1 -0
  174. package/lib/labs/VTreeview/VTreeviewItem.css +17 -0
  175. package/lib/labs/VTreeview/VTreeviewItem.mjs +86 -0
  176. package/lib/labs/VTreeview/VTreeviewItem.mjs.map +1 -0
  177. package/lib/labs/VTreeview/VTreeviewItem.sass +19 -0
  178. package/lib/labs/VTreeview/index.d.mts +1975 -0
  179. package/lib/labs/VTreeview/index.mjs +4 -0
  180. package/lib/labs/VTreeview/index.mjs.map +1 -0
  181. package/lib/labs/VTreeview/shared.mjs +4 -0
  182. package/lib/labs/VTreeview/shared.mjs.map +1 -0
  183. package/lib/labs/VTreeview/variables.scss +8 -0
  184. package/lib/labs/components.d.mts +4553 -1925
  185. package/lib/labs/components.mjs +4 -2
  186. package/lib/labs/components.mjs.map +1 -1
  187. package/lib/locale/no.mjs +1 -1
  188. package/lib/locale/no.mjs.map +1 -1
  189. package/package.json +2 -2
@@ -70,11 +70,11 @@ declare const VInput: {
70
70
  disabled: boolean | null;
71
71
  readonly: boolean | null;
72
72
  messages: string | readonly string[];
73
- density: Density;
74
73
  focused: boolean;
75
74
  errorMessages: string | readonly string[] | null;
76
75
  maxErrors: string | number;
77
76
  rules: readonly ValidationRule[];
77
+ density: Density;
78
78
  centerAffix: boolean;
79
79
  hideSpinButtons: boolean;
80
80
  persistentHint: boolean;
@@ -83,13 +83,13 @@ declare const VInput: {
83
83
  name?: string | undefined;
84
84
  label?: string | undefined;
85
85
  class?: any;
86
+ 'onUpdate:focused'?: ((args_0: boolean) => void) | undefined;
87
+ validateOn?: "lazy" | ("input" | "blur" | "submit") | "input lazy" | "blur lazy" | "submit lazy" | "lazy input" | "lazy blur" | "lazy submit" | undefined;
88
+ validationValue?: any;
86
89
  prependIcon?: IconValue | undefined;
87
90
  appendIcon?: IconValue | undefined;
88
91
  'onClick:append'?: ((args_0: MouseEvent) => void) | undefined;
89
92
  'onClick:prepend'?: ((args_0: MouseEvent) => void) | undefined;
90
- 'onUpdate:focused'?: ((args_0: boolean) => void) | undefined;
91
- validateOn?: "lazy" | ("input" | "blur" | "submit") | "input lazy" | "blur lazy" | "submit lazy" | "lazy input" | "lazy blur" | "lazy submit" | undefined;
92
- validationValue?: any;
93
93
  hint?: string | undefined;
94
94
  hideDetails?: boolean | "auto" | undefined;
95
95
  } & {}, {
@@ -100,18 +100,18 @@ declare const VInput: {
100
100
  errorMessages: ComputedRef<string[]>;
101
101
  }, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Omit<{
102
102
  'update:modelValue': (value: any) => true;
103
- }, "$children" | "v-slot:default" | "v-slots" | "v-slot:append" | "v-slot:prepend" | "modelValue" | "update:modelValue" | "v-slot:message" | "v-slot:details">, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
103
+ }, "$children" | "v-slot:default" | "v-slots" | "modelValue" | "v-slot:append" | "v-slot:prepend" | "update:modelValue" | "v-slot:message" | "v-slot:details">, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
104
104
  error: boolean;
105
105
  direction: "horizontal" | "vertical";
106
106
  style: vue.StyleValue;
107
107
  disabled: boolean | null;
108
108
  readonly: boolean | null;
109
109
  messages: string | readonly string[];
110
- density: Density;
111
110
  focused: boolean;
112
111
  errorMessages: string | readonly string[] | null;
113
112
  maxErrors: string | number;
114
113
  rules: readonly ValidationRule[];
114
+ density: Density;
115
115
  centerAffix: boolean;
116
116
  hideSpinButtons: boolean;
117
117
  persistentHint: boolean;
@@ -120,13 +120,13 @@ declare const VInput: {
120
120
  name?: string | undefined;
121
121
  label?: string | undefined;
122
122
  class?: any;
123
+ 'onUpdate:focused'?: ((args_0: boolean) => void) | undefined;
124
+ validateOn?: "lazy" | ("input" | "blur" | "submit") | "input lazy" | "blur lazy" | "submit lazy" | "lazy input" | "lazy blur" | "lazy submit" | undefined;
125
+ validationValue?: any;
123
126
  prependIcon?: IconValue | undefined;
124
127
  appendIcon?: IconValue | undefined;
125
128
  'onClick:append'?: ((args_0: MouseEvent) => void) | undefined;
126
129
  'onClick:prepend'?: ((args_0: MouseEvent) => void) | undefined;
127
- 'onUpdate:focused'?: ((args_0: boolean) => void) | undefined;
128
- validateOn?: "lazy" | ("input" | "blur" | "submit") | "input lazy" | "blur lazy" | "submit lazy" | "lazy input" | "lazy blur" | "lazy submit" | undefined;
129
- validationValue?: any;
130
130
  hint?: string | undefined;
131
131
  hideDetails?: boolean | "auto" | undefined;
132
132
  } & {}, {
@@ -136,11 +136,11 @@ declare const VInput: {
136
136
  disabled: boolean | null;
137
137
  readonly: boolean | null;
138
138
  messages: string | readonly string[];
139
- density: Density;
140
139
  focused: boolean;
141
140
  errorMessages: string | readonly string[] | null;
142
141
  maxErrors: string | number;
143
142
  rules: readonly ValidationRule[];
143
+ density: Density;
144
144
  centerAffix: boolean;
145
145
  hideSpinButtons: boolean;
146
146
  persistentHint: boolean;
@@ -174,11 +174,11 @@ declare const VInput: {
174
174
  disabled: boolean | null;
175
175
  readonly: boolean | null;
176
176
  messages: string | readonly string[];
177
- density: Density;
178
177
  focused: boolean;
179
178
  errorMessages: string | readonly string[] | null;
180
179
  maxErrors: string | number;
181
180
  rules: readonly ValidationRule[];
181
+ density: Density;
182
182
  centerAffix: boolean;
183
183
  hideSpinButtons: boolean;
184
184
  persistentHint: boolean;
@@ -187,13 +187,13 @@ declare const VInput: {
187
187
  name?: string | undefined;
188
188
  label?: string | undefined;
189
189
  class?: any;
190
+ 'onUpdate:focused'?: ((args_0: boolean) => void) | undefined;
191
+ validateOn?: "lazy" | ("input" | "blur" | "submit") | "input lazy" | "blur lazy" | "submit lazy" | "lazy input" | "lazy blur" | "lazy submit" | undefined;
192
+ validationValue?: any;
190
193
  prependIcon?: IconValue | undefined;
191
194
  appendIcon?: IconValue | undefined;
192
195
  'onClick:append'?: ((args_0: MouseEvent) => void) | undefined;
193
196
  'onClick:prepend'?: ((args_0: MouseEvent) => void) | undefined;
194
- 'onUpdate:focused'?: ((args_0: boolean) => void) | undefined;
195
- validateOn?: "lazy" | ("input" | "blur" | "submit") | "input lazy" | "blur lazy" | "submit lazy" | "lazy input" | "lazy blur" | "lazy submit" | undefined;
196
- validationValue?: any;
197
197
  hint?: string | undefined;
198
198
  hideDetails?: boolean | "auto" | undefined;
199
199
  } & {}, {
@@ -209,11 +209,11 @@ declare const VInput: {
209
209
  disabled: boolean | null;
210
210
  readonly: boolean | null;
211
211
  messages: string | readonly string[];
212
- density: Density;
213
212
  focused: boolean;
214
213
  errorMessages: string | readonly string[] | null;
215
214
  maxErrors: string | number;
216
215
  rules: readonly ValidationRule[];
216
+ density: Density;
217
217
  centerAffix: boolean;
218
218
  hideSpinButtons: boolean;
219
219
  persistentHint: boolean;
@@ -228,11 +228,11 @@ declare const VInput: {
228
228
  disabled: boolean | null;
229
229
  readonly: boolean | null;
230
230
  messages: string | readonly string[];
231
- density: Density;
232
231
  focused: boolean;
233
232
  errorMessages: string | readonly string[] | null;
234
233
  maxErrors: string | number;
235
234
  rules: readonly ValidationRule[];
235
+ density: Density;
236
236
  centerAffix: boolean;
237
237
  hideSpinButtons: boolean;
238
238
  persistentHint: boolean;
@@ -241,13 +241,13 @@ declare const VInput: {
241
241
  name?: string | undefined;
242
242
  label?: string | undefined;
243
243
  class?: any;
244
+ 'onUpdate:focused'?: ((args_0: boolean) => void) | undefined;
245
+ validateOn?: "lazy" | ("input" | "blur" | "submit") | "input lazy" | "blur lazy" | "submit lazy" | "lazy input" | "lazy blur" | "lazy submit" | undefined;
246
+ validationValue?: any;
244
247
  prependIcon?: IconValue | undefined;
245
248
  appendIcon?: IconValue | undefined;
246
249
  'onClick:append'?: ((args_0: MouseEvent) => void) | undefined;
247
250
  'onClick:prepend'?: ((args_0: MouseEvent) => void) | undefined;
248
- 'onUpdate:focused'?: ((args_0: boolean) => void) | undefined;
249
- validateOn?: "lazy" | ("input" | "blur" | "submit") | "input lazy" | "blur lazy" | "submit lazy" | "lazy input" | "lazy blur" | "lazy submit" | undefined;
250
- validationValue?: any;
251
251
  hint?: string | undefined;
252
252
  hideDetails?: boolean | "auto" | undefined;
253
253
  } & {}, {
@@ -258,18 +258,18 @@ declare const VInput: {
258
258
  errorMessages: ComputedRef<string[]>;
259
259
  }, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Omit<{
260
260
  'update:modelValue': (value: any) => true;
261
- }, "$children" | "v-slot:default" | "v-slots" | "v-slot:append" | "v-slot:prepend" | "modelValue" | "update:modelValue" | "v-slot:message" | "v-slot:details">, string, {
261
+ }, "$children" | "v-slot:default" | "v-slots" | "modelValue" | "v-slot:append" | "v-slot:prepend" | "update:modelValue" | "v-slot:message" | "v-slot:details">, string, {
262
262
  error: boolean;
263
263
  direction: "horizontal" | "vertical";
264
264
  style: vue.StyleValue;
265
265
  disabled: boolean | null;
266
266
  readonly: boolean | null;
267
267
  messages: string | readonly string[];
268
- density: Density;
269
268
  focused: boolean;
270
269
  errorMessages: string | readonly string[] | null;
271
270
  maxErrors: string | number;
272
271
  rules: readonly ValidationRule[];
272
+ density: Density;
273
273
  centerAffix: boolean;
274
274
  hideSpinButtons: boolean;
275
275
  persistentHint: boolean;
@@ -12,9 +12,9 @@ declare const VKbd: {
12
12
  } & {
13
13
  class?: any;
14
14
  } & {
15
- $children?: vue.VNodeChild | (() => vue.VNodeChild) | {
15
+ $children?: vue.VNodeChild | {
16
16
  default?: (() => vue.VNodeChild) | undefined;
17
- };
17
+ } | (() => vue.VNodeChild);
18
18
  'v-slots'?: {
19
19
  default?: false | (() => vue.VNodeChild) | undefined;
20
20
  } | undefined;
@@ -28,9 +28,9 @@ declare const VKbd: {
28
28
  } & {
29
29
  class?: any;
30
30
  } & {
31
- $children?: vue.VNodeChild | (() => vue.VNodeChild) | {
31
+ $children?: vue.VNodeChild | {
32
32
  default?: (() => vue.VNodeChild) | undefined;
33
- };
33
+ } | (() => vue.VNodeChild);
34
34
  'v-slots'?: {
35
35
  default?: false | (() => vue.VNodeChild) | undefined;
36
36
  } | undefined;
@@ -56,9 +56,9 @@ declare const VKbd: {
56
56
  } & {
57
57
  class?: any;
58
58
  } & {
59
- $children?: vue.VNodeChild | (() => vue.VNodeChild) | {
59
+ $children?: vue.VNodeChild | {
60
60
  default?: (() => vue.VNodeChild) | undefined;
61
- };
61
+ } | (() => vue.VNodeChild);
62
62
  'v-slots'?: {
63
63
  default?: false | (() => vue.VNodeChild) | undefined;
64
64
  } | undefined;
@@ -79,9 +79,9 @@ declare const VKbd: {
79
79
  } & {
80
80
  class?: any;
81
81
  } & {
82
- $children?: vue.VNodeChild | (() => vue.VNodeChild) | {
82
+ $children?: vue.VNodeChild | {
83
83
  default?: (() => vue.VNodeChild) | undefined;
84
- };
84
+ } | (() => vue.VNodeChild);
85
85
  'v-slots'?: {
86
86
  default?: false | (() => vue.VNodeChild) | undefined;
87
87
  } | undefined;
@@ -14,9 +14,9 @@ declare const VLabel: {
14
14
  onClick?: ((args_0: MouseEvent) => void) | undefined;
15
15
  theme?: string | undefined;
16
16
  } & {
17
- $children?: vue.VNodeChild | (() => vue.VNodeChild) | {
17
+ $children?: vue.VNodeChild | {
18
18
  default?: (() => vue.VNodeChild) | undefined;
19
- };
19
+ } | (() => vue.VNodeChild);
20
20
  'v-slots'?: {
21
21
  default?: false | (() => vue.VNodeChild) | undefined;
22
22
  } | undefined;
@@ -30,9 +30,9 @@ declare const VLabel: {
30
30
  onClick?: ((args_0: MouseEvent) => void) | undefined;
31
31
  theme?: string | undefined;
32
32
  } & {
33
- $children?: vue.VNodeChild | (() => vue.VNodeChild) | {
33
+ $children?: vue.VNodeChild | {
34
34
  default?: (() => vue.VNodeChild) | undefined;
35
- };
35
+ } | (() => vue.VNodeChild);
36
36
  'v-slots'?: {
37
37
  default?: false | (() => vue.VNodeChild) | undefined;
38
38
  } | undefined;
@@ -59,9 +59,9 @@ declare const VLabel: {
59
59
  onClick?: ((args_0: MouseEvent) => void) | undefined;
60
60
  theme?: string | undefined;
61
61
  } & {
62
- $children?: vue.VNodeChild | (() => vue.VNodeChild) | {
62
+ $children?: vue.VNodeChild | {
63
63
  default?: (() => vue.VNodeChild) | undefined;
64
- };
64
+ } | (() => vue.VNodeChild);
65
65
  'v-slots'?: {
66
66
  default?: false | (() => vue.VNodeChild) | undefined;
67
67
  } | undefined;
@@ -81,9 +81,9 @@ declare const VLabel: {
81
81
  onClick?: ((args_0: MouseEvent) => void) | undefined;
82
82
  theme?: string | undefined;
83
83
  } & {
84
- $children?: vue.VNodeChild | (() => vue.VNodeChild) | {
84
+ $children?: vue.VNodeChild | {
85
85
  default?: (() => vue.VNodeChild) | undefined;
86
- };
86
+ } | (() => vue.VNodeChild);
87
87
  'v-slots'?: {
88
88
  default?: false | (() => vue.VNodeChild) | undefined;
89
89
  } | undefined;
@@ -15,9 +15,9 @@ declare const VLayout: {
15
15
  class?: any;
16
16
  overlaps?: string[] | undefined;
17
17
  } & {
18
- $children?: vue.VNodeChild | (() => vue.VNodeChild) | {
18
+ $children?: vue.VNodeChild | {
19
19
  default?: (() => vue.VNodeChild) | undefined;
20
- };
20
+ } | (() => vue.VNodeChild);
21
21
  'v-slots'?: {
22
22
  default?: false | (() => vue.VNodeChild) | undefined;
23
23
  } | undefined;
@@ -49,9 +49,9 @@ declare const VLayout: {
49
49
  class?: any;
50
50
  overlaps?: string[] | undefined;
51
51
  } & {
52
- $children?: vue.VNodeChild | (() => vue.VNodeChild) | {
52
+ $children?: vue.VNodeChild | {
53
53
  default?: (() => vue.VNodeChild) | undefined;
54
- };
54
+ } | (() => vue.VNodeChild);
55
55
  'v-slots'?: {
56
56
  default?: false | (() => vue.VNodeChild) | undefined;
57
57
  } | undefined;
@@ -78,9 +78,9 @@ declare const VLayout: {
78
78
  class?: any;
79
79
  overlaps?: string[] | undefined;
80
80
  } & {
81
- $children?: vue.VNodeChild | (() => vue.VNodeChild) | {
81
+ $children?: vue.VNodeChild | {
82
82
  default?: (() => vue.VNodeChild) | undefined;
83
- };
83
+ } | (() => vue.VNodeChild);
84
84
  'v-slots'?: {
85
85
  default?: false | (() => vue.VNodeChild) | undefined;
86
86
  } | undefined;
@@ -119,9 +119,9 @@ declare const VLayout: {
119
119
  class?: any;
120
120
  overlaps?: string[] | undefined;
121
121
  } & {
122
- $children?: vue.VNodeChild | (() => vue.VNodeChild) | {
122
+ $children?: vue.VNodeChild | {
123
123
  default?: (() => vue.VNodeChild) | undefined;
124
- };
124
+ } | (() => vue.VNodeChild);
125
125
  'v-slots'?: {
126
126
  default?: false | (() => vue.VNodeChild) | undefined;
127
127
  } | undefined;
@@ -184,9 +184,9 @@ declare const VLayoutItem: {
184
184
  name?: string | undefined;
185
185
  class?: any;
186
186
  } & {
187
- $children?: vue.VNodeChild | (() => vue.VNodeChild) | {
187
+ $children?: vue.VNodeChild | {
188
188
  default?: (() => vue.VNodeChild) | undefined;
189
- };
189
+ } | (() => vue.VNodeChild);
190
190
  'v-slots'?: {
191
191
  default?: false | (() => vue.VNodeChild) | undefined;
192
192
  } | undefined;
@@ -203,9 +203,9 @@ declare const VLayoutItem: {
203
203
  name?: string | undefined;
204
204
  class?: any;
205
205
  } & {
206
- $children?: vue.VNodeChild | (() => vue.VNodeChild) | {
206
+ $children?: vue.VNodeChild | {
207
207
  default?: (() => vue.VNodeChild) | undefined;
208
- };
208
+ } | (() => vue.VNodeChild);
209
209
  'v-slots'?: {
210
210
  default?: false | (() => vue.VNodeChild) | undefined;
211
211
  } | undefined;
@@ -239,9 +239,9 @@ declare const VLayoutItem: {
239
239
  name?: string | undefined;
240
240
  class?: any;
241
241
  } & {
242
- $children?: vue.VNodeChild | (() => vue.VNodeChild) | {
242
+ $children?: vue.VNodeChild | {
243
243
  default?: (() => vue.VNodeChild) | undefined;
244
- };
244
+ } | (() => vue.VNodeChild);
245
245
  'v-slots'?: {
246
246
  default?: false | (() => vue.VNodeChild) | undefined;
247
247
  } | undefined;
@@ -268,9 +268,9 @@ declare const VLayoutItem: {
268
268
  name?: string | undefined;
269
269
  class?: any;
270
270
  } & {
271
- $children?: vue.VNodeChild | (() => vue.VNodeChild) | {
271
+ $children?: vue.VNodeChild | {
272
272
  default?: (() => vue.VNodeChild) | undefined;
273
- };
273
+ } | (() => vue.VNodeChild);
274
274
  'v-slots'?: {
275
275
  default?: false | (() => vue.VNodeChild) | undefined;
276
276
  } | undefined;
@@ -23,9 +23,9 @@ declare const VLazy: {
23
23
  minWidth?: string | number | undefined;
24
24
  class?: any;
25
25
  } & {
26
- $children?: vue.VNodeChild | (() => vue.VNodeChild) | {
26
+ $children?: vue.VNodeChild | {
27
27
  default?: (() => vue.VNodeChild) | undefined;
28
- };
28
+ } | (() => vue.VNodeChild);
29
29
  'v-slots'?: {
30
30
  default?: false | (() => vue.VNodeChild) | undefined;
31
31
  } | undefined;
@@ -52,9 +52,9 @@ declare const VLazy: {
52
52
  minWidth?: string | number | undefined;
53
53
  class?: any;
54
54
  } & {
55
- $children?: vue.VNodeChild | (() => vue.VNodeChild) | {
55
+ $children?: vue.VNodeChild | {
56
56
  default?: (() => vue.VNodeChild) | undefined;
57
- };
57
+ } | (() => vue.VNodeChild);
58
58
  'v-slots'?: {
59
59
  default?: false | (() => vue.VNodeChild) | undefined;
60
60
  } | undefined;
@@ -98,9 +98,9 @@ declare const VLazy: {
98
98
  minWidth?: string | number | undefined;
99
99
  class?: any;
100
100
  } & {
101
- $children?: vue.VNodeChild | (() => vue.VNodeChild) | {
101
+ $children?: vue.VNodeChild | {
102
102
  default?: (() => vue.VNodeChild) | undefined;
103
- };
103
+ } | (() => vue.VNodeChild);
104
104
  'v-slots'?: {
105
105
  default?: false | (() => vue.VNodeChild) | undefined;
106
106
  } | undefined;
@@ -137,9 +137,9 @@ declare const VLazy: {
137
137
  minWidth?: string | number | undefined;
138
138
  class?: any;
139
139
  } & {
140
- $children?: vue.VNodeChild | (() => vue.VNodeChild) | {
140
+ $children?: vue.VNodeChild | {
141
141
  default?: (() => vue.VNodeChild) | undefined;
142
- };
142
+ } | (() => vue.VNodeChild);
143
143
  'v-slots'?: {
144
144
  default?: false | (() => vue.VNodeChild) | undefined;
145
145
  } | undefined;
@@ -50,7 +50,7 @@ function transformItems(props, items) {
50
50
  }
51
51
  return array;
52
52
  }
53
- function useListItems(props) {
53
+ export function useListItems(props) {
54
54
  const items = computed(() => transformItems(props, props.items));
55
55
  return {
56
56
  items
@@ -97,8 +97,10 @@ export const VList = genericComponent()({
97
97
  props: makeVListProps(),
98
98
  emits: {
99
99
  'update:selected': value => true,
100
+ 'update:activated': value => true,
100
101
  'update:opened': value => true,
101
102
  'click:open': value => true,
103
+ 'click:activate': value => true,
102
104
  'click:select': value => true
103
105
  },
104
106
  setup(props, _ref) {
@@ -131,7 +133,9 @@ export const VList = genericComponent()({
131
133
  roundedClasses
132
134
  } = useRounded(props);
133
135
  const {
136
+ children,
134
137
  open,
138
+ parents,
135
139
  select
136
140
  } = useNested(props);
137
141
  const lineClasses = computed(() => props.lines ? `v-list--${props.lines}-line` : undefined);
@@ -221,7 +225,9 @@ export const VList = genericComponent()({
221
225
  return {
222
226
  open,
223
227
  select,
224
- focus
228
+ focus,
229
+ children,
230
+ parents
225
231
  };
226
232
  }
227
233
  });
@@ -1 +1 @@
1
- {"version":3,"file":"VList.mjs","names":["VListChildren","createList","makeBorderProps","useBorder","useBackgroundColor","makeComponentProps","provideDefaults","makeDensityProps","useDensity","makeDimensionProps","useDimension","makeElevationProps","useElevation","makeItemsProps","makeNestedProps","useNested","makeRoundedProps","useRounded","makeTagProps","makeThemeProps","provideTheme","makeVariantProps","computed","ref","shallowRef","toRef","focusChild","genericComponent","getPropertyFromItem","omit","propsFactory","useRender","isPrimitive","value","transformItem","props","item","type","itemType","title","itemTitle","itemValue","undefined","children","itemChildren","itemProps","_props","transformItems","raw","items","array","push","useListItems","makeVListProps","baseColor","String","activeColor","activeClass","bgColor","disabled","Boolean","expandIcon","collapseIcon","lines","default","slim","nav","selectStrategy","openStrategy","variant","VList","name","emits","setup","_ref","slots","themeClasses","backgroundColorClasses","backgroundColorStyles","borderClasses","densityClasses","dimensionStyles","elevationClasses","roundedClasses","open","select","lineClasses","color","VListGroup","VListItem","density","isFocused","contentRef","onFocusin","e","onFocusout","onFocus","relatedTarget","contains","focus","onKeydown","key","preventDefault","onMousedown","location","_createVNode","tag","class","style","returnObject"],"sources":["../../../src/components/VList/VList.tsx"],"sourcesContent":["// Styles\nimport './VList.sass'\n\n// Components\nimport { VListChildren } from './VListChildren'\n\n// Composables\nimport { createList } from './list'\nimport { makeBorderProps, useBorder } from '@/composables/border'\nimport { useBackgroundColor } from '@/composables/color'\nimport { makeComponentProps } from '@/composables/component'\nimport { provideDefaults } from '@/composables/defaults'\nimport { makeDensityProps, useDensity } from '@/composables/density'\nimport { makeDimensionProps, useDimension } from '@/composables/dimensions'\nimport { makeElevationProps, useElevation } from '@/composables/elevation'\nimport { makeItemsProps } from '@/composables/list-items'\nimport { makeNestedProps, useNested } from '@/composables/nested/nested'\nimport { makeRoundedProps, useRounded } from '@/composables/rounded'\nimport { makeTagProps } from '@/composables/tag'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\nimport { makeVariantProps } from '@/composables/variant'\n\n// Utilities\nimport { computed, ref, shallowRef, toRef } from 'vue'\nimport { focusChild, genericComponent, getPropertyFromItem, omit, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { VListChildrenSlots } from './VListChildren'\nimport type { ItemProps, ListItem } from '@/composables/list-items'\nimport type { GenericProps, SelectItemKey } from '@/util'\n\nexport interface InternalListItem<T = any> extends ListItem<T> {\n type?: 'item' | 'subheader' | 'divider'\n}\n\nfunction isPrimitive (value: unknown): value is string | number | boolean {\n return typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean'\n}\n\nfunction transformItem (props: ItemProps & { itemType: string }, item: any): InternalListItem {\n const type = getPropertyFromItem(item, props.itemType, 'item')\n const title = isPrimitive(item) ? item : getPropertyFromItem(item, props.itemTitle)\n const value = getPropertyFromItem(item, props.itemValue, undefined)\n const children = getPropertyFromItem(item, props.itemChildren)\n const itemProps = props.itemProps === true\n ? omit(item, ['children'])\n : getPropertyFromItem(item, props.itemProps)\n\n const _props = {\n title,\n value,\n ...itemProps,\n }\n\n return {\n type,\n title: _props.title,\n value: _props.value,\n props: _props,\n children: type === 'item' && children ? transformItems(props, children) : undefined,\n raw: item,\n }\n}\n\nfunction transformItems (props: ItemProps & { itemType: string }, items: (string | object)[]) {\n const array: InternalListItem[] = []\n\n for (const item of items) {\n array.push(transformItem(props, item))\n }\n\n return array\n}\n\nfunction useListItems (props: ItemProps & { itemType: string }) {\n const items = computed(() => transformItems(props, props.items))\n\n return { items }\n}\n\nexport const makeVListProps = propsFactory({\n baseColor: String,\n /* @deprecated */\n activeColor: String,\n activeClass: String,\n bgColor: String,\n disabled: Boolean,\n expandIcon: String,\n collapseIcon: String,\n lines: {\n type: [Boolean, String] as PropType<'one' | 'two' | 'three' | false>,\n default: 'one',\n },\n slim: Boolean,\n nav: Boolean,\n\n ...makeNestedProps({\n selectStrategy: 'single-leaf' as const,\n openStrategy: 'list' as const,\n }),\n ...makeBorderProps(),\n ...makeComponentProps(),\n ...makeDensityProps(),\n ...makeDimensionProps(),\n ...makeElevationProps(),\n itemType: {\n type: String,\n default: 'type',\n },\n ...makeItemsProps(),\n ...makeRoundedProps(),\n ...makeTagProps(),\n ...makeThemeProps(),\n ...makeVariantProps({ variant: 'text' } as const),\n}, 'VList')\n\ntype ItemType<T> = T extends readonly (infer U)[] ? U : never\n\nexport const VList = genericComponent<new <\n T extends readonly any[],\n S = unknown,\n O = unknown\n>(\n props: {\n items?: T\n itemTitle?: SelectItemKey<ItemType<T>>\n itemValue?: SelectItemKey<ItemType<T>>\n itemChildren?: SelectItemKey<ItemType<T>>\n itemProps?: SelectItemKey<ItemType<T>>\n selected?: readonly S[]\n 'onUpdate:selected'?: (value: S[]) => void\n opened?: readonly O[]\n 'onUpdate:opened'?: (value: O[]) => void\n },\n slots: VListChildrenSlots<ItemType<T>>\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VList',\n\n props: makeVListProps(),\n\n emits: {\n 'update:selected': (value: unknown[]) => true,\n 'update:opened': (value: unknown[]) => true,\n 'click:open': (value: { id: unknown, value: boolean, path: unknown[] }) => true,\n 'click:select': (value: { id: unknown, value: boolean, path: unknown[] }) => true,\n },\n\n setup (props, { slots }) {\n const { items } = useListItems(props)\n const { themeClasses } = provideTheme(props)\n const { backgroundColorClasses, backgroundColorStyles } = useBackgroundColor(toRef(props, 'bgColor'))\n const { borderClasses } = useBorder(props)\n const { densityClasses } = useDensity(props)\n const { dimensionStyles } = useDimension(props)\n const { elevationClasses } = useElevation(props)\n const { roundedClasses } = useRounded(props)\n const { open, select } = useNested(props)\n const lineClasses = computed(() => props.lines ? `v-list--${props.lines}-line` : undefined)\n const activeColor = toRef(props, 'activeColor')\n const baseColor = toRef(props, 'baseColor')\n const color = toRef(props, 'color')\n\n createList()\n\n provideDefaults({\n VListGroup: {\n activeColor,\n baseColor,\n color,\n expandIcon: toRef(props, 'expandIcon'),\n collapseIcon: toRef(props, 'collapseIcon'),\n },\n VListItem: {\n activeClass: toRef(props, 'activeClass'),\n activeColor,\n baseColor,\n color,\n density: toRef(props, 'density'),\n disabled: toRef(props, 'disabled'),\n lines: toRef(props, 'lines'),\n nav: toRef(props, 'nav'),\n slim: toRef(props, 'slim'),\n variant: toRef(props, 'variant'),\n },\n })\n\n const isFocused = shallowRef(false)\n const contentRef = ref<HTMLElement>()\n function onFocusin (e: FocusEvent) {\n isFocused.value = true\n }\n\n function onFocusout (e: FocusEvent) {\n isFocused.value = false\n }\n\n function onFocus (e: FocusEvent) {\n if (\n !isFocused.value &&\n !(e.relatedTarget && contentRef.value?.contains(e.relatedTarget as Node))\n ) focus()\n }\n\n function onKeydown (e: KeyboardEvent) {\n if (!contentRef.value) return\n\n if (e.key === 'ArrowDown') {\n focus('next')\n } else if (e.key === 'ArrowUp') {\n focus('prev')\n } else if (e.key === 'Home') {\n focus('first')\n } else if (e.key === 'End') {\n focus('last')\n } else {\n return\n }\n\n e.preventDefault()\n }\n\n function onMousedown (e: MouseEvent) {\n isFocused.value = true\n }\n\n function focus (location?: 'next' | 'prev' | 'first' | 'last') {\n if (contentRef.value) {\n return focusChild(contentRef.value, location)\n }\n }\n\n useRender(() => {\n return (\n <props.tag\n ref={ contentRef }\n class={[\n 'v-list',\n {\n 'v-list--disabled': props.disabled,\n 'v-list--nav': props.nav,\n 'v-list--slim': props.slim,\n },\n themeClasses.value,\n backgroundColorClasses.value,\n borderClasses.value,\n densityClasses.value,\n elevationClasses.value,\n lineClasses.value,\n roundedClasses.value,\n props.class,\n ]}\n style={[\n backgroundColorStyles.value,\n dimensionStyles.value,\n props.style,\n ]}\n tabindex={ (props.disabled || isFocused.value) ? -1 : 0 }\n role=\"listbox\"\n aria-activedescendant={ undefined }\n onFocusin={ onFocusin }\n onFocusout={ onFocusout }\n onFocus={ onFocus }\n onKeydown={ onKeydown }\n onMousedown={ onMousedown }\n >\n <VListChildren\n items={ items.value }\n returnObject={ props.returnObject }\n v-slots={ slots }\n />\n </props.tag>\n )\n })\n\n return {\n open,\n select,\n focus,\n }\n },\n})\n\nexport type VList = InstanceType<typeof VList>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,aAAa,+BAEtB;AAAA,SACSC,UAAU;AAAA,SACVC,eAAe,EAAEC,SAAS;AAAA,SAC1BC,kBAAkB;AAAA,SAClBC,kBAAkB;AAAA,SAClBC,eAAe;AAAA,SACfC,gBAAgB,EAAEC,UAAU;AAAA,SAC5BC,kBAAkB,EAAEC,YAAY;AAAA,SAChCC,kBAAkB,EAAEC,YAAY;AAAA,SAChCC,cAAc;AAAA,SACdC,eAAe,EAAEC,SAAS;AAAA,SAC1BC,gBAAgB,EAAEC,UAAU;AAAA,SAC5BC,YAAY;AAAA,SACZC,cAAc,EAAEC,YAAY;AAAA,SAC5BC,gBAAgB,yCAEzB;AACA,SAASC,QAAQ,EAAEC,GAAG,EAAEC,UAAU,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC7CC,UAAU,EAAEC,gBAAgB,EAAEC,mBAAmB,EAAEC,IAAI,EAAEC,YAAY,EAAEC,SAAS,gCAEzF;AAUA,SAASC,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C,aAAa,CAAC9C,KAAK,EACnB+C,cAAc,CAAC/C,KAAK,EACpBiD,gBAAgB,CAACjD,KAAK,EACtBqD,WAAW,CAACrD,KAAK,EACjBkD,cAAc,CAAClD,KAAK,EACpBE,KAAK,CAACwE,KAAK,CACZ;QAAA,SACM,CACL7B,qBAAqB,CAAC7C,KAAK,EAC3BgD,eAAe,CAAChD,KAAK,EACrBE,KAAK,CAACyE,KAAK,CACZ;QAAA,YACWzE,KAAK,CAACwB,QAAQ,IAAIgC,SAAS,CAAC1D,KAAK,GAAI,CAAC,CAAC,GAAG,CAAC;QAAA;QAAA,yBAE/BS,SAAS;QAAA,aACrBmD,SAAS;QAAA,cACRE,UAAU;QAAA,WACbC,OAAO;QAAA,aACLI,SAAS;QAAA,eACPG;MAAW;QAAAvC,OAAA,EAAAA,CAAA,MAAAyC,YAAA,CAAAzG,aAAA;UAAA,SAGfiD,KAAK,CAAChB,KAAK;UAAA,gBACJE,KAAK,CAAC0E;QAAY,GACvBlC,KAAK;MAAA;IAIvB,CAAC,CAAC;IAEF,OAAO;MACLS,IAAI;MACJC,MAAM;MACNc;IACF,CAAC;EACH;AACF,CAAC,CAAC"}
1
+ {"version":3,"file":"VList.mjs","names":["VListChildren","createList","makeBorderProps","useBorder","useBackgroundColor","makeComponentProps","provideDefaults","makeDensityProps","useDensity","makeDimensionProps","useDimension","makeElevationProps","useElevation","makeItemsProps","makeNestedProps","useNested","makeRoundedProps","useRounded","makeTagProps","makeThemeProps","provideTheme","makeVariantProps","computed","ref","shallowRef","toRef","focusChild","genericComponent","getPropertyFromItem","omit","propsFactory","useRender","isPrimitive","value","transformItem","props","item","type","itemType","title","itemTitle","itemValue","undefined","children","itemChildren","itemProps","_props","transformItems","raw","items","array","push","useListItems","makeVListProps","baseColor","String","activeColor","activeClass","bgColor","disabled","Boolean","expandIcon","collapseIcon","lines","default","slim","nav","selectStrategy","openStrategy","variant","VList","name","emits","setup","_ref","slots","themeClasses","backgroundColorClasses","backgroundColorStyles","borderClasses","densityClasses","dimensionStyles","elevationClasses","roundedClasses","open","parents","select","lineClasses","color","VListGroup","VListItem","density","isFocused","contentRef","onFocusin","e","onFocusout","onFocus","relatedTarget","contains","focus","onKeydown","key","preventDefault","onMousedown","location","_createVNode","tag","class","style","returnObject"],"sources":["../../../src/components/VList/VList.tsx"],"sourcesContent":["// Styles\nimport './VList.sass'\n\n// Components\nimport { VListChildren } from './VListChildren'\n\n// Composables\nimport { createList } from './list'\nimport { makeBorderProps, useBorder } from '@/composables/border'\nimport { useBackgroundColor } from '@/composables/color'\nimport { makeComponentProps } from '@/composables/component'\nimport { provideDefaults } from '@/composables/defaults'\nimport { makeDensityProps, useDensity } from '@/composables/density'\nimport { makeDimensionProps, useDimension } from '@/composables/dimensions'\nimport { makeElevationProps, useElevation } from '@/composables/elevation'\nimport { makeItemsProps } from '@/composables/list-items'\nimport { makeNestedProps, useNested } from '@/composables/nested/nested'\nimport { makeRoundedProps, useRounded } from '@/composables/rounded'\nimport { makeTagProps } from '@/composables/tag'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\nimport { makeVariantProps } from '@/composables/variant'\n\n// Utilities\nimport { computed, ref, shallowRef, toRef } from 'vue'\nimport { focusChild, genericComponent, getPropertyFromItem, omit, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { VListChildrenSlots } from './VListChildren'\nimport type { ItemProps, ListItem } from '@/composables/list-items'\nimport type { GenericProps, SelectItemKey } from '@/util'\n\nexport interface InternalListItem<T = any> extends ListItem<T> {\n type?: 'item' | 'subheader' | 'divider'\n}\n\nfunction isPrimitive (value: unknown): value is string | number | boolean {\n return typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean'\n}\n\nfunction transformItem (props: ItemProps & { itemType: string }, item: any): InternalListItem {\n const type = getPropertyFromItem(item, props.itemType, 'item')\n const title = isPrimitive(item) ? item : getPropertyFromItem(item, props.itemTitle)\n const value = getPropertyFromItem(item, props.itemValue, undefined)\n const children = getPropertyFromItem(item, props.itemChildren)\n const itemProps = props.itemProps === true\n ? omit(item, ['children'])\n : getPropertyFromItem(item, props.itemProps)\n\n const _props = {\n title,\n value,\n ...itemProps,\n }\n\n return {\n type,\n title: _props.title,\n value: _props.value,\n props: _props,\n children: type === 'item' && children ? transformItems(props, children) : undefined,\n raw: item,\n }\n}\n\nfunction transformItems (props: ItemProps & { itemType: string }, items: (string | object)[]) {\n const array: InternalListItem[] = []\n\n for (const item of items) {\n array.push(transformItem(props, item))\n }\n\n return array\n}\n\nexport function useListItems (props: ItemProps & { itemType: string }) {\n const items = computed(() => transformItems(props, props.items))\n\n return { items }\n}\n\nexport const makeVListProps = propsFactory({\n baseColor: String,\n /* @deprecated */\n activeColor: String,\n activeClass: String,\n bgColor: String,\n disabled: Boolean,\n expandIcon: String,\n collapseIcon: String,\n lines: {\n type: [Boolean, String] as PropType<'one' | 'two' | 'three' | false>,\n default: 'one',\n },\n slim: Boolean,\n nav: Boolean,\n\n ...makeNestedProps({\n selectStrategy: 'single-leaf' as const,\n openStrategy: 'list' as const,\n }),\n ...makeBorderProps(),\n ...makeComponentProps(),\n ...makeDensityProps(),\n ...makeDimensionProps(),\n ...makeElevationProps(),\n itemType: {\n type: String,\n default: 'type',\n },\n ...makeItemsProps(),\n ...makeRoundedProps(),\n ...makeTagProps(),\n ...makeThemeProps(),\n ...makeVariantProps({ variant: 'text' } as const),\n}, 'VList')\n\ntype ItemType<T> = T extends readonly (infer U)[] ? U : never\n\nexport const VList = genericComponent<new <\n T extends readonly any[],\n S = unknown,\n O = unknown\n>(\n props: {\n items?: T\n itemTitle?: SelectItemKey<ItemType<T>>\n itemValue?: SelectItemKey<ItemType<T>>\n itemChildren?: SelectItemKey<ItemType<T>>\n itemProps?: SelectItemKey<ItemType<T>>\n selected?: readonly S[]\n 'onUpdate:selected'?: (value: S[]) => void\n opened?: readonly O[]\n 'onUpdate:opened'?: (value: O[]) => void\n },\n slots: VListChildrenSlots<ItemType<T>>\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VList',\n\n props: makeVListProps(),\n\n emits: {\n 'update:selected': (value: unknown[]) => true,\n 'update:activated': (value: unknown[]) => true,\n 'update:opened': (value: unknown[]) => true,\n 'click:open': (value: { id: unknown, value: boolean, path: unknown[] }) => true,\n 'click:activate': (value: { id: unknown, value: boolean, path: unknown[] }) => true,\n 'click:select': (value: { id: unknown, value: boolean, path: unknown[] }) => true,\n },\n\n setup (props, { slots }) {\n const { items } = useListItems(props)\n const { themeClasses } = provideTheme(props)\n const { backgroundColorClasses, backgroundColorStyles } = useBackgroundColor(toRef(props, 'bgColor'))\n const { borderClasses } = useBorder(props)\n const { densityClasses } = useDensity(props)\n const { dimensionStyles } = useDimension(props)\n const { elevationClasses } = useElevation(props)\n const { roundedClasses } = useRounded(props)\n const { children, open, parents, select } = useNested(props)\n const lineClasses = computed(() => props.lines ? `v-list--${props.lines}-line` : undefined)\n const activeColor = toRef(props, 'activeColor')\n const baseColor = toRef(props, 'baseColor')\n const color = toRef(props, 'color')\n\n createList()\n\n provideDefaults({\n VListGroup: {\n activeColor,\n baseColor,\n color,\n expandIcon: toRef(props, 'expandIcon'),\n collapseIcon: toRef(props, 'collapseIcon'),\n },\n VListItem: {\n activeClass: toRef(props, 'activeClass'),\n activeColor,\n baseColor,\n color,\n density: toRef(props, 'density'),\n disabled: toRef(props, 'disabled'),\n lines: toRef(props, 'lines'),\n nav: toRef(props, 'nav'),\n slim: toRef(props, 'slim'),\n variant: toRef(props, 'variant'),\n },\n })\n\n const isFocused = shallowRef(false)\n const contentRef = ref<HTMLElement>()\n function onFocusin (e: FocusEvent) {\n isFocused.value = true\n }\n\n function onFocusout (e: FocusEvent) {\n isFocused.value = false\n }\n\n function onFocus (e: FocusEvent) {\n if (\n !isFocused.value &&\n !(e.relatedTarget && contentRef.value?.contains(e.relatedTarget as Node))\n ) focus()\n }\n\n function onKeydown (e: KeyboardEvent) {\n if (!contentRef.value) return\n\n if (e.key === 'ArrowDown') {\n focus('next')\n } else if (e.key === 'ArrowUp') {\n focus('prev')\n } else if (e.key === 'Home') {\n focus('first')\n } else if (e.key === 'End') {\n focus('last')\n } else {\n return\n }\n\n e.preventDefault()\n }\n\n function onMousedown (e: MouseEvent) {\n isFocused.value = true\n }\n\n function focus (location?: 'next' | 'prev' | 'first' | 'last') {\n if (contentRef.value) {\n return focusChild(contentRef.value, location)\n }\n }\n\n useRender(() => {\n return (\n <props.tag\n ref={ contentRef }\n class={[\n 'v-list',\n {\n 'v-list--disabled': props.disabled,\n 'v-list--nav': props.nav,\n 'v-list--slim': props.slim,\n },\n themeClasses.value,\n backgroundColorClasses.value,\n borderClasses.value,\n densityClasses.value,\n elevationClasses.value,\n lineClasses.value,\n roundedClasses.value,\n props.class,\n ]}\n style={[\n backgroundColorStyles.value,\n dimensionStyles.value,\n props.style,\n ]}\n tabindex={ (props.disabled || isFocused.value) ? -1 : 0 }\n role=\"listbox\"\n aria-activedescendant={ undefined }\n onFocusin={ onFocusin }\n onFocusout={ onFocusout }\n onFocus={ onFocus }\n onKeydown={ onKeydown }\n onMousedown={ onMousedown }\n >\n <VListChildren\n items={ items.value }\n returnObject={ props.returnObject }\n v-slots={ slots }\n />\n </props.tag>\n )\n })\n\n return {\n open,\n select,\n focus,\n children,\n parents,\n }\n },\n})\n\nexport type VList = InstanceType<typeof VList>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,aAAa,+BAEtB;AAAA,SACSC,UAAU;AAAA,SACVC,eAAe,EAAEC,SAAS;AAAA,SAC1BC,kBAAkB;AAAA,SAClBC,kBAAkB;AAAA,SAClBC,eAAe;AAAA,SACfC,gBAAgB,EAAEC,UAAU;AAAA,SAC5BC,kBAAkB,EAAEC,YAAY;AAAA,SAChCC,kBAAkB,EAAEC,YAAY;AAAA,SAChCC,cAAc;AAAA,SACdC,eAAe,EAAEC,SAAS;AAAA,SAC1BC,gBAAgB,EAAEC,UAAU;AAAA,SAC5BC,YAAY;AAAA,SACZC,cAAc,EAAEC,YAAY;A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C;MAC/C;IACF;IAEA1E,SAAS,CAAC,MAAM;MACd,OAAA2E,YAAA,CAAAvE,KAAA,CAAAwE,GAAA;QAAA,OAEUd,UAAU;QAAA,SACT,CACL,QAAQ,EACR;UACE,kBAAkB,EAAE1D,KAAK,CAACwB,QAAQ;UAClC,aAAa,EAAExB,KAAK,CAAC+B,GAAG;UACxB,cAAc,EAAE/B,KAAK,CAAC8B;QACxB,CAAC,EACDW,YAAY,CAAC3C,KAAK,EAClB4C,sBAAsB,CAAC5C,KAAK,EAC5B8C,aAAa,CAAC9C,KAAK,EACnB+C,cAAc,CAAC/C,KAAK,EACpBiD,gBAAgB,CAACjD,KAAK,EACtBsD,WAAW,CAACtD,KAAK,EACjBkD,cAAc,CAAClD,KAAK,EACpBE,KAAK,CAACyE,KAAK,CACZ;QAAA,SACM,CACL9B,qBAAqB,CAAC7C,KAAK,EAC3BgD,eAAe,CAAChD,KAAK,EACrBE,KAAK,CAAC0E,KAAK,CACZ;QAAA,YACW1E,KAAK,CAACwB,QAAQ,IAAIiC,SAAS,CAAC3D,KAAK,GAAI,CAAC,CAAC,GAAG,CAAC;QAAA;QAAA,yBAE/BS,SAAS;QAAA,aACrBoD,SAAS;QAAA,cACRE,UAAU;QAAA,WACbC,OAAO;QAAA,aACLI,SAAS;QAAA,eACPG;MAAW;QAAAxC,OAAA,EAAAA,CAAA,MAAA0C,YAAA,CAAA1G,aAAA;UAAA,SAGfiD,KAAK,CAAChB,KAAK;UAAA,gBACJE,KAAK,CAAC2E;QAAY,GACvBnC,KAAK;MAAA;IAIvB,CAAC,CAAC;IAEF,OAAO;MACLS,IAAI;MACJE,MAAM;MACNc,KAAK;MACLzD,QAAQ;MACR0C;IACF,CAAC;EACH;AACF,CAAC,CAAC"}
@@ -112,7 +112,9 @@ export const VListGroup = genericComponent()({
112
112
  }, [slots.default?.()]), [[_vShow, isOpen.value]])]
113
113
  })]
114
114
  }));
115
- return {};
115
+ return {
116
+ isOpen
117
+ };
116
118
  }
117
119
  });
118
120
  //# sourceMappingURL=VListGroup.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"VListGroup.mjs","names":["VExpandTransition","VDefaultsProvider","useList","makeComponentProps","IconValue","useNestedGroupActivator","useNestedItem","useSsrBoot","makeTagProps","MaybeTransition","computed","toRef","defineComponent","genericComponent","propsFactory","useRender","VListGroupActivator","name","setup","_","_ref","slots","default","makeVListGroupProps","activeColor","String","baseColor","color","collapseIcon","type","expandIcon","prependIcon","appendIcon","fluid","Boolean","subgroup","title","value","VListGroup","props","_ref2","isOpen","open","id","_id","list","isBooted","onClick","e","activatorProps","class","toggleIcon","activatorDefaults","VListItem","active","_createVNode","tag","hasPrepend","style","activator","component","_withDirectives","_vShow"],"sources":["../../../src/components/VList/VListGroup.tsx"],"sourcesContent":["// Components\nimport { VExpandTransition } from '@/components/transitions'\nimport { VDefaultsProvider } from '@/components/VDefaultsProvider'\n\n// Composables\nimport { useList } from './list'\nimport { makeComponentProps } from '@/composables/component'\nimport { IconValue } from '@/composables/icons'\nimport { useNestedGroupActivator, useNestedItem } from '@/composables/nested/nested'\nimport { useSsrBoot } from '@/composables/ssrBoot'\nimport { makeTagProps } from '@/composables/tag'\nimport { MaybeTransition } from '@/composables/transition'\n\n// Utilities\nimport { computed, toRef } from 'vue'\nimport { defineComponent, genericComponent, propsFactory, useRender } from '@/util'\n\nexport type VListGroupSlots = {\n default: never\n activator: { isOpen: boolean, props: Record<string, unknown> }\n}\n\nconst VListGroupActivator = defineComponent({\n name: 'VListGroupActivator',\n\n setup (_, { slots }) {\n useNestedGroupActivator()\n\n return () => slots.default?.()\n },\n})\n\nexport const makeVListGroupProps = propsFactory({\n /* @deprecated */\n activeColor: String,\n baseColor: String,\n color: String,\n collapseIcon: {\n type: IconValue,\n default: '$collapse',\n },\n expandIcon: {\n type: IconValue,\n default: '$expand',\n },\n prependIcon: IconValue,\n appendIcon: IconValue,\n fluid: Boolean,\n subgroup: Boolean,\n title: String,\n value: null,\n\n ...makeComponentProps(),\n ...makeTagProps(),\n}, 'VListGroup')\n\nexport const VListGroup = genericComponent<VListGroupSlots>()({\n name: 'VListGroup',\n\n props: makeVListGroupProps(),\n\n setup (props, { slots }) {\n const { isOpen, open, id: _id } = useNestedItem(toRef(props, 'value'), true)\n const id = computed(() => `v-list-group--id-${String(_id.value)}`)\n const list = useList()\n const { isBooted } = useSsrBoot()\n\n function onClick (e: Event) {\n open(!isOpen.value, e)\n }\n\n const activatorProps = computed(() => ({\n onClick,\n class: 'v-list-group__header',\n id: id.value,\n }))\n\n const toggleIcon = computed(() => isOpen.value ? props.collapseIcon : props.expandIcon)\n const activatorDefaults = computed(() => ({\n VListItem: {\n active: isOpen.value,\n activeColor: props.activeColor,\n baseColor: props.baseColor,\n color: props.color,\n prependIcon: props.prependIcon || (props.subgroup && toggleIcon.value),\n appendIcon: props.appendIcon || (!props.subgroup && toggleIcon.value),\n title: props.title,\n value: props.value,\n },\n }))\n\n useRender(() => (\n <props.tag\n class={[\n 'v-list-group',\n {\n 'v-list-group--prepend': list?.hasPrepend.value,\n 'v-list-group--fluid': props.fluid,\n 'v-list-group--subgroup': props.subgroup,\n 'v-list-group--open': isOpen.value,\n },\n props.class,\n ]}\n style={ props.style }\n >\n { slots.activator && (\n <VDefaultsProvider defaults={ activatorDefaults.value }>\n <VListGroupActivator>\n { slots.activator({ props: activatorProps.value, isOpen: isOpen.value }) }\n </VListGroupActivator>\n </VDefaultsProvider>\n )}\n\n <MaybeTransition transition={{ component: VExpandTransition }} disabled={ !isBooted.value }>\n <div class=\"v-list-group__items\" role=\"group\" aria-labelledby={ id.value } v-show={ isOpen.value }>\n { slots.default?.() }\n </div>\n </MaybeTransition>\n </props.tag>\n ))\n\n return {}\n },\n})\n\nexport type VListGroup = InstanceType<typeof VListGroup>\n"],"mappings":";AAAA;AAAA,SACSA,iBAAiB;AAAA,SACjBC,iBAAiB,0CAE1B;AAAA,SACSC,OAAO;AAAA,SACPC,kBAAkB;AAAA,SAClBC,SAAS;AAAA,SACT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,CAAC,CAAC,CAAC;IAEHtB,SAAS,CAAC,MAAAwC,YAAA,CAAAhB,KAAA,CAAAiB,GAAA;MAAA,SAEC,CACL,cAAc,EACd;QACE,uBAAuB,EAAEX,IAAI,EAAEY,UAAU,CAACpB,KAAK;QAC/C,qBAAqB,EAAEE,KAAK,CAACN,KAAK;QAClC,wBAAwB,EAAEM,KAAK,CAACJ,QAAQ;QACxC,oBAAoB,EAAEM,MAAM,CAACJ;MAC/B,CAAC,EACDE,KAAK,CAACW,KAAK,CACZ;MAAA,SACOX,KAAK,CAACmB;IAAK;MAAApC,OAAA,EAAAA,CAAA,MAEjBD,KAAK,CAACsC,SAAS,IAAAJ,YAAA,CAAAtD,iBAAA;QAAA,YACemD,iBAAiB,CAACf;MAAK;QAAAf,OAAA,EAAAA,CAAA,MAAAiC,YAAA,CAAAvC,mBAAA;UAAAM,OAAA,EAAAA,CAAA,MAE/CD,KAAK,CAACsC,SAAS,CAAC;YAAEpB,KAAK,EAAEU,cAAc,CAACZ,KAAK;YAAEI,MAAM,EAAEA,MAAM,CAACJ;UAAM,CAAC,CAAC;QAAA;MAAA,EAG7E,EAAAkB,YAAA,CAAA9C,eAAA;QAAA,cAE4B;UAAEmD,SAAS,EAAE5D;QAAkB,CAAC;QAAA,YAAa,CAAC8C,QAAQ,CAACT;MAAK;QAAAf,OAAA,EAAAA,CAAA,MAAAuC,eAAA,CAAAN,YAAA;UAAA;UAAA;UAAA,mBACvBZ,EAAE,CAACN;QAAK,IACpEhB,KAAK,CAACC,OAAO,GAAG,CAAC,MAAAwC,MAAA,EAD+DrB,MAAM,CAACJ,KAAK;MAAA;IAAA,EAKrG,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC"}
1
+ {"version":3,"file":"VListGroup.mjs","names":["VExpandTransition","VDefaultsProvider","useList","makeComponentProps","IconValue","useNestedGroupActivator","useNestedItem","useSsrBoot","makeTagProps","MaybeTransition","computed","toRef","defineComponent","genericComponent","propsFactory","useRender","VListGroupActivator","name","setup","_","_ref","slots","default","makeVListGroupProps","activeColor","String","baseColor","color","collapseIcon","type","expandIcon","prependIcon","appendIcon","fluid","Boolean","subgroup","title","value","VListGroup","props","_ref2","isOpen","open","id","_id","list","isBooted","onClick","e","activatorProps","class","toggleIcon","activatorDefaults","VListItem","active","_createVNode","tag","hasPrepend","style","activator","component","_withDirectives","_vShow"],"sources":["../../../src/components/VList/VListGroup.tsx"],"sourcesContent":["// Components\nimport { VExpandTransition } from '@/components/transitions'\nimport { VDefaultsProvider } from '@/components/VDefaultsProvider'\n\n// Composables\nimport { useList } from './list'\nimport { makeComponentProps } from '@/composables/component'\nimport { IconValue } from '@/composables/icons'\nimport { useNestedGroupActivator, useNestedItem } from '@/composables/nested/nested'\nimport { useSsrBoot } from '@/composables/ssrBoot'\nimport { makeTagProps } from '@/composables/tag'\nimport { MaybeTransition } from '@/composables/transition'\n\n// Utilities\nimport { computed, toRef } from 'vue'\nimport { defineComponent, genericComponent, propsFactory, useRender } from '@/util'\n\nexport type VListGroupSlots = {\n default: never\n activator: { isOpen: boolean, props: Record<string, unknown> }\n}\n\nconst VListGroupActivator = defineComponent({\n name: 'VListGroupActivator',\n\n setup (_, { slots }) {\n useNestedGroupActivator()\n\n return () => slots.default?.()\n },\n})\n\nexport const makeVListGroupProps = propsFactory({\n /* @deprecated */\n activeColor: String,\n baseColor: String,\n color: String,\n collapseIcon: {\n type: IconValue,\n default: '$collapse',\n },\n expandIcon: {\n type: IconValue,\n default: '$expand',\n },\n prependIcon: IconValue,\n appendIcon: IconValue,\n fluid: Boolean,\n subgroup: Boolean,\n title: String,\n value: null,\n\n ...makeComponentProps(),\n ...makeTagProps(),\n}, 'VListGroup')\n\nexport const VListGroup = genericComponent<VListGroupSlots>()({\n name: 'VListGroup',\n\n props: makeVListGroupProps(),\n\n setup (props, { slots }) {\n const { isOpen, open, id: _id } = useNestedItem(toRef(props, 'value'), true)\n const id = computed(() => `v-list-group--id-${String(_id.value)}`)\n const list = useList()\n const { isBooted } = useSsrBoot()\n\n function onClick (e: Event) {\n open(!isOpen.value, e)\n }\n\n const activatorProps = computed(() => ({\n onClick,\n class: 'v-list-group__header',\n id: id.value,\n }))\n\n const toggleIcon = computed(() => isOpen.value ? props.collapseIcon : props.expandIcon)\n const activatorDefaults = computed(() => ({\n VListItem: {\n active: isOpen.value,\n activeColor: props.activeColor,\n baseColor: props.baseColor,\n color: props.color,\n prependIcon: props.prependIcon || (props.subgroup && toggleIcon.value),\n appendIcon: props.appendIcon || (!props.subgroup && toggleIcon.value),\n title: props.title,\n value: props.value,\n },\n }))\n\n useRender(() => (\n <props.tag\n class={[\n 'v-list-group',\n {\n 'v-list-group--prepend': list?.hasPrepend.value,\n 'v-list-group--fluid': props.fluid,\n 'v-list-group--subgroup': props.subgroup,\n 'v-list-group--open': isOpen.value,\n },\n props.class,\n ]}\n style={ props.style }\n >\n { slots.activator && (\n <VDefaultsProvider defaults={ activatorDefaults.value }>\n <VListGroupActivator>\n { slots.activator({ props: activatorProps.value, isOpen: isOpen.value }) }\n </VListGroupActivator>\n </VDefaultsProvider>\n )}\n\n <MaybeTransition transition={{ component: VExpandTransition }} disabled={ !isBooted.value }>\n <div class=\"v-list-group__items\" role=\"group\" aria-labelledby={ id.value } v-show={ isOpen.value }>\n { slots.default?.() }\n </div>\n </MaybeTransition>\n </props.tag>\n ))\n\n return {\n isOpen,\n }\n },\n})\n\nexport type VListGroup = InstanceType<typeof VListGroup>\n"],"mappings":";AAAA;AAAA,SACSA,iBAAiB;AAAA,SACjBC,iBAAiB,0CAE1B;AAAA,SACSC,OAAO;AAAA,SACPC,kBAAkB;AAAA,SAClBC,SAAS;AAAA,SACTC,uBAAuB,EAAEC,aAAa;AAAA,SACtCC,UAAU;AAAA,SACVC,YAAY;AAAA,SACZC,eAAe,4CAExB;AACA,SAASC,QAAQ,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC5BC,eAAe,EAAEC,gBAAgB,EAAEC,YAAY,EAAEC,SAAS;AA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N,KAAK;QAClC,wBAAwB,EAAEM,KAAK,CAACJ,QAAQ;QACxC,oBAAoB,EAAEM,MAAM,CAACJ;MAC/B,CAAC,EACDE,KAAK,CAACW,KAAK,CACZ;MAAA,SACOX,KAAK,CAACmB;IAAK;MAAApC,OAAA,EAAAA,CAAA,MAEjBD,KAAK,CAACsC,SAAS,IAAAJ,YAAA,CAAAtD,iBAAA;QAAA,YACemD,iBAAiB,CAACf;MAAK;QAAAf,OAAA,EAAAA,CAAA,MAAAiC,YAAA,CAAAvC,mBAAA;UAAAM,OAAA,EAAAA,CAAA,MAE/CD,KAAK,CAACsC,SAAS,CAAC;YAAEpB,KAAK,EAAEU,cAAc,CAACZ,KAAK;YAAEI,MAAM,EAAEA,MAAM,CAACJ;UAAM,CAAC,CAAC;QAAA;MAAA,EAG7E,EAAAkB,YAAA,CAAA9C,eAAA;QAAA,cAE4B;UAAEmD,SAAS,EAAE5D;QAAkB,CAAC;QAAA,YAAa,CAAC8C,QAAQ,CAACT;MAAK;QAAAf,OAAA,EAAAA,CAAA,MAAAuC,eAAA,CAAAN,YAAA;UAAA;UAAA;UAAA,mBACvBZ,EAAE,CAACN;QAAK,IACpEhB,KAAK,CAACC,OAAO,GAAG,CAAC,MAAAwC,MAAA,EAD+DrB,MAAM,CAACJ,KAAK;MAAA;IAAA,EAKrG,CAAC;IAEF,OAAO;MACLI;IACF,CAAC;EACH;AACF,CAAC,CAAC"}
@@ -85,6 +85,8 @@ export const VListItem = genericComponent()({
85
85
  const link = useLink(props, attrs);
86
86
  const id = computed(() => props.value === undefined ? link.href.value : props.value);
87
87
  const {
88
+ activate,
89
+ isActivated,
88
90
  select,
89
91
  isSelected,
90
92
  isIndeterminate,
@@ -94,9 +96,9 @@ export const VListItem = genericComponent()({
94
96
  openOnSelect
95
97
  } = useNestedItem(id, false);
96
98
  const list = useList();
97
- const isActive = computed(() => props.active !== false && (props.active || link.isActive?.value || isSelected.value));
99
+ const isActive = computed(() => props.active !== false && (props.active || link.isActive?.value || (root.activatable.value ? isActivated.value : isSelected.value)));
98
100
  const isLink = computed(() => props.link !== false && link.isLink.value);
99
- const isClickable = computed(() => !props.disabled && props.link !== false && (props.link || link.isClickable.value || props.value != null && !!list));
101
+ const isClickable = computed(() => !props.disabled && props.link !== false && (props.link || link.isClickable.value || !!list && (root.selectable.value || root.activatable.value || props.value != null)));
100
102
  const roundedProps = computed(() => props.rounded || props.nav);
101
103
  const color = computed(() => props.color ?? props.activeColor);
102
104
  const variantProps = computed(() => ({
@@ -147,7 +149,13 @@ export const VListItem = genericComponent()({
147
149
  emit('click', e);
148
150
  if (isGroupActivator || !isClickable.value) return;
149
151
  link.navigate?.(e);
150
- props.value != null && select(!isSelected.value, e);
152
+ if (root.activatable.value) {
153
+ activate(!isActivated.value, e);
154
+ } else if (root.selectable.value) {
155
+ select(!isSelected.value, e);
156
+ } else if (props.value != null) {
157
+ select(!isSelected.value, e);
158
+ }
151
159
  }
152
160
  function onKeyDown(e) {
153
161
  if (e.key === 'Enter' || e.key === ' ') {
@@ -263,7 +271,12 @@ export const VListItem = genericComponent()({
263
271
  }, null)])]
264
272
  }), [[_resolveDirective("ripple"), isClickable.value && props.ripple]]);
265
273
  });
266
- return {};
274
+ return {
275
+ isGroupActivator,
276
+ isSelected,
277
+ list,
278
+ select
279
+ };
267
280
  }
268
281
  });
269
282
  //# sourceMappingURL=VListItem.mjs.map