@vuetify/nightly 3.6.5-master.2024-05-14 → 3.6.6-master.2024-05-16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/CHANGELOG.md +3 -11
  2. package/dist/json/importMap-labs.json +20 -20
  3. package/dist/json/importMap.json +104 -104
  4. package/dist/json/web-types.json +5 -5
  5. package/dist/vuetify-labs.css +2749 -2748
  6. package/dist/vuetify-labs.d.ts +60 -36
  7. package/dist/vuetify-labs.esm.js +23 -17
  8. package/dist/vuetify-labs.esm.js.map +1 -1
  9. package/dist/vuetify-labs.js +23 -17
  10. package/dist/vuetify-labs.min.css +2 -2
  11. package/dist/vuetify.css +932 -931
  12. package/dist/vuetify.d.ts +97 -73
  13. package/dist/vuetify.esm.js +11 -7
  14. package/dist/vuetify.esm.js.map +1 -1
  15. package/dist/vuetify.js +11 -7
  16. package/dist/vuetify.js.map +1 -1
  17. package/dist/vuetify.min.css +2 -2
  18. package/dist/vuetify.min.js +8 -8
  19. package/dist/vuetify.min.js.map +1 -1
  20. package/lib/components/VBanner/VBanner.mjs +3 -1
  21. package/lib/components/VBanner/VBanner.mjs.map +1 -1
  22. package/lib/components/VBanner/index.d.mts +15 -9
  23. package/lib/components/VChipGroup/index.d.mts +15 -9
  24. package/lib/components/VDivider/VDivider.css +1 -0
  25. package/lib/components/VDivider/VDivider.sass +1 -0
  26. package/lib/components/VMenu/VMenu.mjs +1 -1
  27. package/lib/components/VMenu/VMenu.mjs.map +1 -1
  28. package/lib/components/VSelect/VSelect.mjs +1 -1
  29. package/lib/components/VSelect/VSelect.mjs.map +1 -1
  30. package/lib/components/VSlideGroup/VSlideGroup.mjs +3 -1
  31. package/lib/components/VSlideGroup/VSlideGroup.mjs.map +1 -1
  32. package/lib/components/VSlideGroup/index.d.mts +15 -9
  33. package/lib/components/VTabs/index.d.mts +15 -9
  34. package/lib/components/index.d.mts +60 -36
  35. package/lib/entry-bundler.mjs +1 -1
  36. package/lib/framework.mjs +1 -1
  37. package/lib/index.d.mts +37 -37
  38. package/lib/labs/VTreeview/VTreeviewChildren.mjs +12 -10
  39. package/lib/labs/VTreeview/VTreeviewChildren.mjs.map +1 -1
  40. package/lib/locale/de.mjs +4 -4
  41. package/lib/locale/de.mjs.map +1 -1
  42. package/package.json +1 -1
@@ -9095,7 +9095,7 @@ declare const VBanner: {
9095
9095
  new (...args: any[]): vue.CreateComponentPublicInstance<{
9096
9096
  style: vue.StyleValue;
9097
9097
  tag: string;
9098
- mobile: boolean | null;
9098
+ mobile: NonNullable<boolean | null> | null;
9099
9099
  sticky: boolean;
9100
9100
  tile: boolean;
9101
9101
  density: Density;
@@ -9142,7 +9142,7 @@ declare const VBanner: {
9142
9142
  }, void, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
9143
9143
  style: vue.StyleValue;
9144
9144
  tag: string;
9145
- mobile: boolean | null;
9145
+ mobile: NonNullable<boolean | null> | null;
9146
9146
  sticky: boolean;
9147
9147
  tile: boolean;
9148
9148
  density: Density;
@@ -9189,7 +9189,7 @@ declare const VBanner: {
9189
9189
  }, {
9190
9190
  style: vue.StyleValue;
9191
9191
  tag: string;
9192
- mobile: boolean | null;
9192
+ mobile: NonNullable<boolean | null> | null;
9193
9193
  sticky: boolean;
9194
9194
  rounded: string | number | boolean;
9195
9195
  tile: boolean;
@@ -9218,7 +9218,7 @@ declare const VBanner: {
9218
9218
  }, {
9219
9219
  style: vue.StyleValue;
9220
9220
  tag: string;
9221
- mobile: boolean | null;
9221
+ mobile: NonNullable<boolean | null> | null;
9222
9222
  sticky: boolean;
9223
9223
  tile: boolean;
9224
9224
  density: Density;
@@ -9265,7 +9265,7 @@ declare const VBanner: {
9265
9265
  }, {}, {}, {}, {}, {
9266
9266
  style: vue.StyleValue;
9267
9267
  tag: string;
9268
- mobile: boolean | null;
9268
+ mobile: NonNullable<boolean | null> | null;
9269
9269
  sticky: boolean;
9270
9270
  rounded: string | number | boolean;
9271
9271
  tile: boolean;
@@ -9278,7 +9278,7 @@ declare const VBanner: {
9278
9278
  } & vue.ComponentOptionsBase<{
9279
9279
  style: vue.StyleValue;
9280
9280
  tag: string;
9281
- mobile: boolean | null;
9281
+ mobile: NonNullable<boolean | null> | null;
9282
9282
  sticky: boolean;
9283
9283
  tile: boolean;
9284
9284
  density: Density;
@@ -9325,7 +9325,7 @@ declare const VBanner: {
9325
9325
  }, void, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, {
9326
9326
  style: vue.StyleValue;
9327
9327
  tag: string;
9328
- mobile: boolean | null;
9328
+ mobile: NonNullable<boolean | null> | null;
9329
9329
  sticky: boolean;
9330
9330
  rounded: string | number | boolean;
9331
9331
  tile: boolean;
@@ -9364,9 +9364,12 @@ declare const VBanner: {
9364
9364
  type: (StringConstructor | NumberConstructor)[];
9365
9365
  validator(v: any): boolean;
9366
9366
  };
9367
- mobile: {
9367
+ mobile: Omit<{
9368
9368
  type: PropType<boolean | null>;
9369
9369
  default: boolean;
9370
+ }, "default" | "type"> & {
9371
+ type: PropType<NonNullable<boolean | null> | null>;
9372
+ default: NonNullable<boolean | null> | null;
9370
9373
  };
9371
9374
  mobileBreakpoint: PropType<number | DisplayBreakpoint>;
9372
9375
  height: (StringConstructor | NumberConstructor)[];
@@ -9414,9 +9417,12 @@ declare const VBanner: {
9414
9417
  type: (StringConstructor | NumberConstructor)[];
9415
9418
  validator(v: any): boolean;
9416
9419
  };
9417
- mobile: {
9420
+ mobile: Omit<{
9418
9421
  type: PropType<boolean | null>;
9419
9422
  default: boolean;
9423
+ }, "default" | "type"> & {
9424
+ type: PropType<NonNullable<boolean | null> | null>;
9425
+ default: NonNullable<boolean | null> | null;
9420
9426
  };
9421
9427
  mobileBreakpoint: PropType<number | DisplayBreakpoint>;
9422
9428
  height: (StringConstructor | NumberConstructor)[];
@@ -17340,7 +17346,7 @@ declare const VChipGroup: {
17340
17346
  style: vue.StyleValue;
17341
17347
  disabled: boolean;
17342
17348
  tag: string;
17343
- mobile: boolean | null;
17349
+ mobile: NonNullable<boolean | null> | null;
17344
17350
  variant: NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
17345
17351
  column: boolean;
17346
17352
  multiple: boolean;
@@ -17366,7 +17372,7 @@ declare const VChipGroup: {
17366
17372
  style: vue.StyleValue;
17367
17373
  disabled: boolean;
17368
17374
  tag: string;
17369
- mobile: boolean | null;
17375
+ mobile: NonNullable<boolean | null> | null;
17370
17376
  variant: NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
17371
17377
  column: boolean;
17372
17378
  multiple: boolean;
@@ -17390,7 +17396,7 @@ declare const VChipGroup: {
17390
17396
  style: vue.StyleValue;
17391
17397
  disabled: boolean;
17392
17398
  tag: string;
17393
- mobile: boolean | null;
17399
+ mobile: NonNullable<boolean | null> | null;
17394
17400
  variant: NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
17395
17401
  column: boolean;
17396
17402
  multiple: boolean;
@@ -17423,7 +17429,7 @@ declare const VChipGroup: {
17423
17429
  style: vue.StyleValue;
17424
17430
  disabled: boolean;
17425
17431
  tag: string;
17426
- mobile: boolean | null;
17432
+ mobile: NonNullable<boolean | null> | null;
17427
17433
  variant: NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
17428
17434
  column: boolean;
17429
17435
  multiple: boolean;
@@ -17447,7 +17453,7 @@ declare const VChipGroup: {
17447
17453
  style: vue.StyleValue;
17448
17454
  disabled: boolean;
17449
17455
  tag: string;
17450
- mobile: boolean | null;
17456
+ mobile: NonNullable<boolean | null> | null;
17451
17457
  variant: NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
17452
17458
  column: boolean;
17453
17459
  multiple: boolean;
@@ -17467,7 +17473,7 @@ declare const VChipGroup: {
17467
17473
  style: vue.StyleValue;
17468
17474
  disabled: boolean;
17469
17475
  tag: string;
17470
- mobile: boolean | null;
17476
+ mobile: NonNullable<boolean | null> | null;
17471
17477
  variant: NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
17472
17478
  column: boolean;
17473
17479
  multiple: boolean;
@@ -17493,7 +17499,7 @@ declare const VChipGroup: {
17493
17499
  style: vue.StyleValue;
17494
17500
  disabled: boolean;
17495
17501
  tag: string;
17496
- mobile: boolean | null;
17502
+ mobile: NonNullable<boolean | null> | null;
17497
17503
  variant: NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
17498
17504
  column: boolean;
17499
17505
  multiple: boolean;
@@ -17551,9 +17557,12 @@ declare const VChipGroup: {
17551
17557
  type: PropType<vue.StyleValue>;
17552
17558
  default: null;
17553
17559
  };
17554
- mobile: {
17560
+ mobile: Omit<{
17555
17561
  type: PropType<boolean | null>;
17556
17562
  default: boolean;
17563
+ }, "default" | "type"> & {
17564
+ type: PropType<NonNullable<boolean | null> | null>;
17565
+ default: NonNullable<boolean | null> | null;
17557
17566
  };
17558
17567
  mobileBreakpoint: PropType<number | DisplayBreakpoint>;
17559
17568
  centerActive: BooleanConstructor;
@@ -17615,9 +17624,12 @@ declare const VChipGroup: {
17615
17624
  type: PropType<vue.StyleValue>;
17616
17625
  default: null;
17617
17626
  };
17618
- mobile: {
17627
+ mobile: Omit<{
17619
17628
  type: PropType<boolean | null>;
17620
17629
  default: boolean;
17630
+ }, "default" | "type"> & {
17631
+ type: PropType<NonNullable<boolean | null> | null>;
17632
+ default: NonNullable<boolean | null> | null;
17621
17633
  };
17622
17634
  mobileBreakpoint: PropType<number | DisplayBreakpoint>;
17623
17635
  centerActive: BooleanConstructor;
@@ -53246,7 +53258,7 @@ declare const VSlideGroup: {
53246
53258
  style: vue.StyleValue;
53247
53259
  disabled: boolean;
53248
53260
  tag: string;
53249
- mobile: boolean | null;
53261
+ mobile: NonNullable<boolean | null> | null;
53250
53262
  multiple: boolean;
53251
53263
  direction: "horizontal" | "vertical";
53252
53264
  selectedClass: string;
@@ -53271,7 +53283,7 @@ declare const VSlideGroup: {
53271
53283
  style: vue.StyleValue;
53272
53284
  disabled: boolean;
53273
53285
  tag: string;
53274
- mobile: boolean | null;
53286
+ mobile: NonNullable<boolean | null> | null;
53275
53287
  multiple: boolean;
53276
53288
  direction: "horizontal" | "vertical";
53277
53289
  selectedClass: string;
@@ -53289,7 +53301,7 @@ declare const VSlideGroup: {
53289
53301
  style: vue.StyleValue;
53290
53302
  disabled: boolean;
53291
53303
  tag: string;
53292
- mobile: boolean | null;
53304
+ mobile: NonNullable<boolean | null> | null;
53293
53305
  multiple: boolean;
53294
53306
  direction: "horizontal" | "vertical";
53295
53307
  selectedClass: string;
@@ -53318,7 +53330,7 @@ declare const VSlideGroup: {
53318
53330
  style: vue.StyleValue;
53319
53331
  disabled: boolean;
53320
53332
  tag: string;
53321
- mobile: boolean | null;
53333
+ mobile: NonNullable<boolean | null> | null;
53322
53334
  multiple: boolean;
53323
53335
  direction: "horizontal" | "vertical";
53324
53336
  selectedClass: string;
@@ -53341,7 +53353,7 @@ declare const VSlideGroup: {
53341
53353
  style: vue.StyleValue;
53342
53354
  disabled: boolean;
53343
53355
  tag: string;
53344
- mobile: boolean | null;
53356
+ mobile: NonNullable<boolean | null> | null;
53345
53357
  multiple: boolean;
53346
53358
  direction: "horizontal" | "vertical";
53347
53359
  selectedClass: string;
@@ -53357,7 +53369,7 @@ declare const VSlideGroup: {
53357
53369
  style: vue.StyleValue;
53358
53370
  disabled: boolean;
53359
53371
  tag: string;
53360
- mobile: boolean | null;
53372
+ mobile: NonNullable<boolean | null> | null;
53361
53373
  multiple: boolean;
53362
53374
  direction: "horizontal" | "vertical";
53363
53375
  selectedClass: string;
@@ -53382,7 +53394,7 @@ declare const VSlideGroup: {
53382
53394
  style: vue.StyleValue;
53383
53395
  disabled: boolean;
53384
53396
  tag: string;
53385
- mobile: boolean | null;
53397
+ mobile: NonNullable<boolean | null> | null;
53386
53398
  multiple: boolean;
53387
53399
  direction: "horizontal" | "vertical";
53388
53400
  selectedClass: string;
@@ -53422,9 +53434,12 @@ declare const VSlideGroup: {
53422
53434
  type: StringConstructor;
53423
53435
  default: string;
53424
53436
  };
53425
- mobile: {
53437
+ mobile: Omit<{
53426
53438
  type: PropType<boolean | null>;
53427
53439
  default: boolean;
53440
+ }, "default" | "type"> & {
53441
+ type: PropType<NonNullable<boolean | null> | null>;
53442
+ default: NonNullable<boolean | null> | null;
53428
53443
  };
53429
53444
  mobileBreakpoint: PropType<number | DisplayBreakpoint>;
53430
53445
  class: PropType<any>;
@@ -53470,9 +53485,12 @@ declare const VSlideGroup: {
53470
53485
  type: StringConstructor;
53471
53486
  default: string;
53472
53487
  };
53473
- mobile: {
53488
+ mobile: Omit<{
53474
53489
  type: PropType<boolean | null>;
53475
53490
  default: boolean;
53491
+ }, "default" | "type"> & {
53492
+ type: PropType<NonNullable<boolean | null> | null>;
53493
+ default: NonNullable<boolean | null> | null;
53476
53494
  };
53477
53495
  mobileBreakpoint: PropType<number | DisplayBreakpoint>;
53478
53496
  class: PropType<any>;
@@ -61907,7 +61925,7 @@ declare const VTabs: {
61907
61925
  style: vue.StyleValue;
61908
61926
  disabled: boolean;
61909
61927
  tag: string;
61910
- mobile: boolean | null;
61928
+ mobile: NonNullable<boolean | null> | null;
61911
61929
  items: readonly TabItem[];
61912
61930
  mandatory: NonNullable<boolean | "force">;
61913
61931
  multiple: boolean;
@@ -61965,7 +61983,7 @@ declare const VTabs: {
61965
61983
  style: vue.StyleValue;
61966
61984
  disabled: boolean;
61967
61985
  tag: string;
61968
- mobile: boolean | null;
61986
+ mobile: NonNullable<boolean | null> | null;
61969
61987
  items: readonly TabItem[];
61970
61988
  mandatory: NonNullable<boolean | "force">;
61971
61989
  multiple: boolean;
@@ -62022,7 +62040,7 @@ declare const VTabs: {
62022
62040
  height: string | number;
62023
62041
  disabled: boolean;
62024
62042
  tag: string;
62025
- mobile: boolean | null;
62043
+ mobile: NonNullable<boolean | null> | null;
62026
62044
  modelValue: any;
62027
62045
  items: readonly TabItem[];
62028
62046
  mandatory: NonNullable<boolean | "force">;
@@ -62069,7 +62087,7 @@ declare const VTabs: {
62069
62087
  style: vue.StyleValue;
62070
62088
  disabled: boolean;
62071
62089
  tag: string;
62072
- mobile: boolean | null;
62090
+ mobile: NonNullable<boolean | null> | null;
62073
62091
  items: readonly TabItem[];
62074
62092
  mandatory: NonNullable<boolean | "force">;
62075
62093
  multiple: boolean;
@@ -62126,7 +62144,7 @@ declare const VTabs: {
62126
62144
  height: string | number;
62127
62145
  disabled: boolean;
62128
62146
  tag: string;
62129
- mobile: boolean | null;
62147
+ mobile: NonNullable<boolean | null> | null;
62130
62148
  modelValue: any;
62131
62149
  items: readonly TabItem[];
62132
62150
  mandatory: NonNullable<boolean | "force">;
@@ -62151,7 +62169,7 @@ declare const VTabs: {
62151
62169
  style: vue.StyleValue;
62152
62170
  disabled: boolean;
62153
62171
  tag: string;
62154
- mobile: boolean | null;
62172
+ mobile: NonNullable<boolean | null> | null;
62155
62173
  items: readonly TabItem[];
62156
62174
  mandatory: NonNullable<boolean | "force">;
62157
62175
  multiple: boolean;
@@ -62210,7 +62228,7 @@ declare const VTabs: {
62210
62228
  height: string | number;
62211
62229
  disabled: boolean;
62212
62230
  tag: string;
62213
- mobile: boolean | null;
62231
+ mobile: NonNullable<boolean | null> | null;
62214
62232
  modelValue: any;
62215
62233
  items: readonly TabItem[];
62216
62234
  mandatory: NonNullable<boolean | "force">;
@@ -62273,9 +62291,12 @@ declare const VTabs: {
62273
62291
  default: string;
62274
62292
  };
62275
62293
  disabled: BooleanConstructor;
62276
- mobile: {
62294
+ mobile: Omit<{
62277
62295
  type: PropType<boolean | null>;
62278
62296
  default: boolean;
62297
+ }, "default" | "type"> & {
62298
+ type: PropType<NonNullable<boolean | null> | null>;
62299
+ default: NonNullable<boolean | null> | null;
62279
62300
  };
62280
62301
  mobileBreakpoint: PropType<number | DisplayBreakpoint>;
62281
62302
  class: PropType<any>;
@@ -62351,9 +62372,12 @@ declare const VTabs: {
62351
62372
  default: string;
62352
62373
  };
62353
62374
  disabled: BooleanConstructor;
62354
- mobile: {
62375
+ mobile: Omit<{
62355
62376
  type: PropType<boolean | null>;
62356
62377
  default: boolean;
62378
+ }, "default" | "type"> & {
62379
+ type: PropType<NonNullable<boolean | null> | null>;
62380
+ default: NonNullable<boolean | null> | null;
62357
62381
  };
62358
62382
  mobileBreakpoint: PropType<number | DisplayBreakpoint>;
62359
62383
  class: PropType<any>;
@@ -16,7 +16,7 @@ export const createVuetify = function () {
16
16
  ...options
17
17
  });
18
18
  };
19
- export const version = "3.6.5-master.2024-05-14";
19
+ export const version = "3.6.6-master.2024-05-16";
20
20
  createVuetify.version = version;
21
21
  export { blueprints, components, directives };
22
22
  export * from "./composables/index.mjs";
package/lib/framework.mjs CHANGED
@@ -97,7 +97,7 @@ export function createVuetify() {
97
97
  goTo
98
98
  };
99
99
  }
100
- export const version = "3.6.5-master.2024-05-14";
100
+ export const version = "3.6.6-master.2024-05-16";
101
101
  createVuetify.version = version;
102
102
 
103
103
  // Vue's inject() can only be used in setup
package/lib/index.d.mts CHANGED
@@ -494,40 +494,40 @@ declare module '@vue/runtime-core' {
494
494
 
495
495
  export interface GlobalComponents {
496
496
  VApp: typeof import('vuetify/components')['VApp']
497
+ VAlert: typeof import('vuetify/components')['VAlert']
498
+ VAlertTitle: typeof import('vuetify/components')['VAlertTitle']
499
+ VAutocomplete: typeof import('vuetify/components')['VAutocomplete']
497
500
  VAppBar: typeof import('vuetify/components')['VAppBar']
498
501
  VAppBarNavIcon: typeof import('vuetify/components')['VAppBarNavIcon']
499
502
  VAppBarTitle: typeof import('vuetify/components')['VAppBarTitle']
500
- VBanner: typeof import('vuetify/components')['VBanner']
501
- VBannerActions: typeof import('vuetify/components')['VBannerActions']
502
- VBannerText: typeof import('vuetify/components')['VBannerText']
503
- VAutocomplete: typeof import('vuetify/components')['VAutocomplete']
504
- VAlert: typeof import('vuetify/components')['VAlert']
505
- VAlertTitle: typeof import('vuetify/components')['VAlertTitle']
506
503
  VBadge: typeof import('vuetify/components')['VBadge']
507
504
  VAvatar: typeof import('vuetify/components')['VAvatar']
508
- VBottomSheet: typeof import('vuetify/components')['VBottomSheet']
509
505
  VBottomNavigation: typeof import('vuetify/components')['VBottomNavigation']
506
+ VBottomSheet: typeof import('vuetify/components')['VBottomSheet']
507
+ VBanner: typeof import('vuetify/components')['VBanner']
508
+ VBannerActions: typeof import('vuetify/components')['VBannerActions']
509
+ VBannerText: typeof import('vuetify/components')['VBannerText']
510
510
  VBtn: typeof import('vuetify/components')['VBtn']
511
511
  VBreadcrumbs: typeof import('vuetify/components')['VBreadcrumbs']
512
512
  VBreadcrumbsItem: typeof import('vuetify/components')['VBreadcrumbsItem']
513
513
  VBreadcrumbsDivider: typeof import('vuetify/components')['VBreadcrumbsDivider']
514
514
  VBtnGroup: typeof import('vuetify/components')['VBtnGroup']
515
+ VBtnToggle: typeof import('vuetify/components')['VBtnToggle']
515
516
  VCard: typeof import('vuetify/components')['VCard']
516
517
  VCardActions: typeof import('vuetify/components')['VCardActions']
517
518
  VCardItem: typeof import('vuetify/components')['VCardItem']
518
519
  VCardSubtitle: typeof import('vuetify/components')['VCardSubtitle']
519
520
  VCardText: typeof import('vuetify/components')['VCardText']
520
521
  VCardTitle: typeof import('vuetify/components')['VCardTitle']
521
- VBtnToggle: typeof import('vuetify/components')['VBtnToggle']
522
522
  VCarousel: typeof import('vuetify/components')['VCarousel']
523
523
  VCarouselItem: typeof import('vuetify/components')['VCarouselItem']
524
+ VChip: typeof import('vuetify/components')['VChip']
525
+ VCode: typeof import('vuetify/components')['VCode']
524
526
  VChipGroup: typeof import('vuetify/components')['VChipGroup']
525
527
  VCheckbox: typeof import('vuetify/components')['VCheckbox']
526
528
  VCheckboxBtn: typeof import('vuetify/components')['VCheckboxBtn']
527
- VChip: typeof import('vuetify/components')['VChip']
528
- VCode: typeof import('vuetify/components')['VCode']
529
- VColorPicker: typeof import('vuetify/components')['VColorPicker']
530
529
  VCombobox: typeof import('vuetify/components')['VCombobox']
530
+ VColorPicker: typeof import('vuetify/components')['VColorPicker']
531
531
  VCounter: typeof import('vuetify/components')['VCounter']
532
532
  VDataTable: typeof import('vuetify/components')['VDataTable']
533
533
  VDataTableHeaders: typeof import('vuetify/components')['VDataTableHeaders']
@@ -543,28 +543,27 @@ declare module '@vue/runtime-core' {
543
543
  VDatePickerMonths: typeof import('vuetify/components')['VDatePickerMonths']
544
544
  VDatePickerYears: typeof import('vuetify/components')['VDatePickerYears']
545
545
  VDivider: typeof import('vuetify/components')['VDivider']
546
- VEmptyState: typeof import('vuetify/components')['VEmptyState']
546
+ VFab: typeof import('vuetify/components')['VFab']
547
547
  VDialog: typeof import('vuetify/components')['VDialog']
548
+ VEmptyState: typeof import('vuetify/components')['VEmptyState']
548
549
  VExpansionPanels: typeof import('vuetify/components')['VExpansionPanels']
549
550
  VExpansionPanel: typeof import('vuetify/components')['VExpansionPanel']
550
551
  VExpansionPanelText: typeof import('vuetify/components')['VExpansionPanelText']
551
552
  VExpansionPanelTitle: typeof import('vuetify/components')['VExpansionPanelTitle']
552
- VFab: typeof import('vuetify/components')['VFab']
553
553
  VField: typeof import('vuetify/components')['VField']
554
554
  VFieldLabel: typeof import('vuetify/components')['VFieldLabel']
555
- VFileInput: typeof import('vuetify/components')['VFileInput']
556
555
  VFooter: typeof import('vuetify/components')['VFooter']
557
- VImg: typeof import('vuetify/components')['VImg']
558
- VInfiniteScroll: typeof import('vuetify/components')['VInfiniteScroll']
556
+ VFileInput: typeof import('vuetify/components')['VFileInput']
559
557
  VIcon: typeof import('vuetify/components')['VIcon']
560
558
  VComponentIcon: typeof import('vuetify/components')['VComponentIcon']
561
559
  VSvgIcon: typeof import('vuetify/components')['VSvgIcon']
562
560
  VLigatureIcon: typeof import('vuetify/components')['VLigatureIcon']
563
561
  VClassIcon: typeof import('vuetify/components')['VClassIcon']
562
+ VImg: typeof import('vuetify/components')['VImg']
563
+ VInput: typeof import('vuetify/components')['VInput']
564
+ VInfiniteScroll: typeof import('vuetify/components')['VInfiniteScroll']
564
565
  VItemGroup: typeof import('vuetify/components')['VItemGroup']
565
566
  VItem: typeof import('vuetify/components')['VItem']
566
- VInput: typeof import('vuetify/components')['VInput']
567
- VLabel: typeof import('vuetify/components')['VLabel']
568
567
  VKbd: typeof import('vuetify/components')['VKbd']
569
568
  VList: typeof import('vuetify/components')['VList']
570
569
  VListGroup: typeof import('vuetify/components')['VListGroup']
@@ -575,43 +574,44 @@ declare module '@vue/runtime-core' {
575
574
  VListItemSubtitle: typeof import('vuetify/components')['VListItemSubtitle']
576
575
  VListItemTitle: typeof import('vuetify/components')['VListItemTitle']
577
576
  VListSubheader: typeof import('vuetify/components')['VListSubheader']
577
+ VLabel: typeof import('vuetify/components')['VLabel']
578
578
  VMain: typeof import('vuetify/components')['VMain']
579
579
  VMenu: typeof import('vuetify/components')['VMenu']
580
- VNavigationDrawer: typeof import('vuetify/components')['VNavigationDrawer']
581
580
  VMessages: typeof import('vuetify/components')['VMessages']
582
581
  VOtpInput: typeof import('vuetify/components')['VOtpInput']
582
+ VNavigationDrawer: typeof import('vuetify/components')['VNavigationDrawer']
583
583
  VOverlay: typeof import('vuetify/components')['VOverlay']
584
584
  VProgressCircular: typeof import('vuetify/components')['VProgressCircular']
585
585
  VPagination: typeof import('vuetify/components')['VPagination']
586
- VProgressLinear: typeof import('vuetify/components')['VProgressLinear']
587
- VRating: typeof import('vuetify/components')['VRating']
588
586
  VRadioGroup: typeof import('vuetify/components')['VRadioGroup']
587
+ VProgressLinear: typeof import('vuetify/components')['VProgressLinear']
589
588
  VSelect: typeof import('vuetify/components')['VSelect']
589
+ VRating: typeof import('vuetify/components')['VRating']
590
+ VSelectionControl: typeof import('vuetify/components')['VSelectionControl']
590
591
  VSelectionControlGroup: typeof import('vuetify/components')['VSelectionControlGroup']
592
+ VSnackbar: typeof import('vuetify/components')['VSnackbar']
591
593
  VSheet: typeof import('vuetify/components')['VSheet']
592
- VSelectionControl: typeof import('vuetify/components')['VSelectionControl']
593
- VSkeletonLoader: typeof import('vuetify/components')['VSkeletonLoader']
594
+ VSlideGroup: typeof import('vuetify/components')['VSlideGroup']
595
+ VSlideGroupItem: typeof import('vuetify/components')['VSlideGroupItem']
594
596
  VSlider: typeof import('vuetify/components')['VSlider']
595
- VSnackbar: typeof import('vuetify/components')['VSnackbar']
596
597
  VStepper: typeof import('vuetify/components')['VStepper']
597
598
  VStepperActions: typeof import('vuetify/components')['VStepperActions']
598
599
  VStepperHeader: typeof import('vuetify/components')['VStepperHeader']
599
600
  VStepperItem: typeof import('vuetify/components')['VStepperItem']
600
601
  VStepperWindow: typeof import('vuetify/components')['VStepperWindow']
601
602
  VStepperWindowItem: typeof import('vuetify/components')['VStepperWindowItem']
602
- VSlideGroup: typeof import('vuetify/components')['VSlideGroup']
603
- VSlideGroupItem: typeof import('vuetify/components')['VSlideGroupItem']
604
603
  VSwitch: typeof import('vuetify/components')['VSwitch']
605
- VSystemBar: typeof import('vuetify/components')['VSystemBar']
604
+ VSkeletonLoader: typeof import('vuetify/components')['VSkeletonLoader']
606
605
  VTable: typeof import('vuetify/components')['VTable']
607
606
  VTab: typeof import('vuetify/components')['VTab']
608
607
  VTabs: typeof import('vuetify/components')['VTabs']
609
608
  VTabsWindow: typeof import('vuetify/components')['VTabsWindow']
610
609
  VTabsWindowItem: typeof import('vuetify/components')['VTabsWindowItem']
611
- VTextarea: typeof import('vuetify/components')['VTextarea']
612
- VTextField: typeof import('vuetify/components')['VTextField']
613
610
  VTimeline: typeof import('vuetify/components')['VTimeline']
614
611
  VTimelineItem: typeof import('vuetify/components')['VTimelineItem']
612
+ VSystemBar: typeof import('vuetify/components')['VSystemBar']
613
+ VTextField: typeof import('vuetify/components')['VTextField']
614
+ VTextarea: typeof import('vuetify/components')['VTextarea']
615
615
  VToolbar: typeof import('vuetify/components')['VToolbar']
616
616
  VToolbarTitle: typeof import('vuetify/components')['VToolbarTitle']
617
617
  VToolbarItems: typeof import('vuetify/components')['VToolbarItems']
@@ -633,8 +633,8 @@ declare module '@vue/runtime-core' {
633
633
  VLocaleProvider: typeof import('vuetify/components')['VLocaleProvider']
634
634
  VNoSsr: typeof import('vuetify/components')['VNoSsr']
635
635
  VParallax: typeof import('vuetify/components')['VParallax']
636
- VRadio: typeof import('vuetify/components')['VRadio']
637
636
  VRangeSlider: typeof import('vuetify/components')['VRangeSlider']
637
+ VRadio: typeof import('vuetify/components')['VRadio']
638
638
  VResponsive: typeof import('vuetify/components')['VResponsive']
639
639
  VSparkline: typeof import('vuetify/components')['VSparkline']
640
640
  VSpeedDial: typeof import('vuetify/components')['VSpeedDial']
@@ -663,18 +663,18 @@ declare module '@vue/runtime-core' {
663
663
  VCalendarInterval: typeof import('vuetify/labs/components')['VCalendarInterval']
664
664
  VCalendarIntervalEvent: typeof import('vuetify/labs/components')['VCalendarIntervalEvent']
665
665
  VCalendarMonthDay: typeof import('vuetify/labs/components')['VCalendarMonthDay']
666
- VNumberInput: typeof import('vuetify/labs/components')['VNumberInput']
666
+ VStepperVertical: typeof import('vuetify/labs/components')['VStepperVertical']
667
+ VStepperVerticalItem: typeof import('vuetify/labs/components')['VStepperVerticalItem']
668
+ VStepperVerticalActions: typeof import('vuetify/labs/components')['VStepperVerticalActions']
667
669
  VPicker: typeof import('vuetify/labs/components')['VPicker']
668
670
  VPickerTitle: typeof import('vuetify/labs/components')['VPickerTitle']
669
- VTimePicker: typeof import('vuetify/labs/components')['VTimePicker']
670
- VTimePickerClock: typeof import('vuetify/labs/components')['VTimePickerClock']
671
- VTimePickerControls: typeof import('vuetify/labs/components')['VTimePickerControls']
672
671
  VTreeview: typeof import('vuetify/labs/components')['VTreeview']
673
672
  VTreeviewItem: typeof import('vuetify/labs/components')['VTreeviewItem']
674
673
  VTreeviewGroup: typeof import('vuetify/labs/components')['VTreeviewGroup']
675
- VStepperVertical: typeof import('vuetify/labs/components')['VStepperVertical']
676
- VStepperVerticalItem: typeof import('vuetify/labs/components')['VStepperVerticalItem']
677
- VStepperVerticalActions: typeof import('vuetify/labs/components')['VStepperVerticalActions']
674
+ VNumberInput: typeof import('vuetify/labs/components')['VNumberInput']
675
+ VTimePicker: typeof import('vuetify/labs/components')['VTimePicker']
676
+ VTimePickerClock: typeof import('vuetify/labs/components')['VTimePickerClock']
677
+ VTimePickerControls: typeof import('vuetify/labs/components')['VTimePickerControls']
678
678
  VDateInput: typeof import('vuetify/labs/components')['VDateInput']
679
679
  VPullToRefresh: typeof import('vuetify/labs/components')['VPullToRefresh']
680
680
  VSnackbarQueue: typeof import('vuetify/labs/components')['VSnackbarQueue']
@@ -22,17 +22,18 @@ export const VTreeviewChildren = genericComponent()({
22
22
  emit,
23
23
  slots
24
24
  } = _ref;
25
- const isLoading = shallowRef(false);
26
- const hasLoaded = shallowRef(false);
25
+ const isLoading = shallowRef(null);
27
26
  function checkChildren(item) {
28
27
  return new Promise(resolve => {
29
- if (!props.items?.length || !props.loadChildren || hasLoaded.value) return resolve();
30
- isLoading.value = true;
31
- props.loadChildren(item).then(resolve);
32
- }).then(() => {
33
- hasLoaded.value = true;
28
+ if (!props.items?.length || !props.loadChildren) return resolve();
29
+ if (item?.children?.length === 0) {
30
+ isLoading.value = item.value;
31
+ props.loadChildren(item).then(resolve);
32
+ return;
33
+ }
34
+ resolve();
34
35
  }).finally(() => {
35
- isLoading.value = false;
36
+ isLoading.value = null;
36
37
  });
37
38
  }
38
39
  function onClick(e, item) {
@@ -45,6 +46,7 @@ export const VTreeviewChildren = genericComponent()({
45
46
  props: itemProps,
46
47
  raw: item
47
48
  } = _ref2;
49
+ const loading = isLoading.value === item.value;
48
50
  const slotsWithItem = {
49
51
  prepend: slots.prepend ? slotProps => slots.prepend?.({
50
52
  ...slotProps,
@@ -58,7 +60,7 @@ export const VTreeviewChildren = genericComponent()({
58
60
  "key": item.value,
59
61
  "tabindex": "-1",
60
62
  "modelValue": isSelected,
61
- "loading": isLoading.value,
63
+ "loading": loading,
62
64
  "indeterminate": isIndeterminate,
63
65
  "onClick": e => onClick(e, item)
64
66
  }, null);
@@ -82,7 +84,7 @@ export const VTreeviewChildren = genericComponent()({
82
84
  props: activatorProps
83
85
  } = _ref4;
84
86
  return _createVNode(VTreeviewItem, _mergeProps(itemProps, activatorProps, {
85
- "loading": isLoading.value,
87
+ "loading": loading,
86
88
  "onClick": e => onClick(e, item)
87
89
  }), slotsWithItem);
88
90
  },
@@ -1 +1 @@
1
- {"version":3,"file":"VTreeviewChildren.mjs","names":["VTreeviewGroup","VTreeviewItem","VCheckboxBtn","shallowRef","genericComponent","propsFactory","makeVTreeviewChildrenProps","loadChildren","Function","loadingIcon","type","String","default","items","Array","selectable","Boolean","VTreeviewChildren","name","props","setup","_ref","emit","slots","isLoading","hasLoaded","checkChildren","item","Promise","resolve","length","value","then","finally","onClick","e","stopPropagation","map","_ref2","children","itemProps","raw","slotsWithItem","prepend","slotProps","_ref3","isSelected","isIndeterminate","_createVNode","undefined","append","title","treeviewGroupProps","filterProps","treeviewChildrenProps","_mergeProps","activator","_ref4","activatorProps"],"sources":["../../../src/labs/VTreeview/VTreeviewChildren.tsx"],"sourcesContent":["// Components\nimport { VTreeviewGroup } from './VTreeviewGroup'\nimport { VTreeviewItem } from './VTreeviewItem'\nimport { VCheckboxBtn } from '@/components/VCheckbox'\n\n// Utilities\nimport { shallowRef } from 'vue'\nimport { genericComponent, propsFactory } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { InternalListItem } from '@/components/VList/VList'\nimport type { VListItemSlots } from '@/components/VList/VListItem'\nimport type { GenericProps } from '@/util'\n\nexport type VTreeviewChildrenSlots<T> = {\n [K in keyof Omit<VListItemSlots, 'default'>]: VListItemSlots[K] & { item: T }\n} & {\n default: never\n item: { props: InternalListItem['props'] }\n}\n\nexport const makeVTreeviewChildrenProps = propsFactory({\n loadChildren: Function as PropType<(item: unknown) => Promise<void>>,\n loadingIcon: {\n type: String,\n default: '$loading',\n },\n items: Array as PropType<readonly InternalListItem[]>,\n selectable: Boolean,\n}, 'VTreeviewChildren')\n\nexport const VTreeviewChildren = genericComponent<new <T extends InternalListItem>(\n props: {\n items?: readonly T[]\n },\n slots: VTreeviewChildrenSlots<T>\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VTreeviewChildren',\n\n props: makeVTreeviewChildrenProps(),\n\n setup (props, { emit, slots }) {\n const isLoading = shallowRef(false)\n const hasLoaded = shallowRef(false)\n\n function checkChildren (item: unknown) {\n return new Promise<void>(resolve => {\n if (!props.items?.length || !props.loadChildren || hasLoaded.value) return resolve()\n\n isLoading.value = true\n props.loadChildren(item).then(resolve)\n }).then(() => {\n hasLoaded.value = true\n }).finally(() => {\n isLoading.value = false\n })\n }\n\n function onClick (e: MouseEvent | KeyboardEvent, item: any) {\n e.stopPropagation()\n\n checkChildren(item)\n }\n\n return () => slots.default?.() ?? props.items?.map(({ children, props: itemProps, raw: item }) => {\n const slotsWithItem = {\n prepend: slots.prepend\n ? slotProps => slots.prepend?.({ ...slotProps, item })\n : props.selectable\n ? ({ isSelected, isIndeterminate }) => (\n <VCheckboxBtn\n key={ item.value }\n tabindex=\"-1\"\n modelValue={ isSelected }\n loading={ isLoading.value }\n indeterminate={ isIndeterminate }\n onClick={ (e: MouseEvent) => onClick(e, item) }\n />\n )\n : undefined,\n append: slots.append ? slotProps => slots.append?.({ ...slotProps, item }) : undefined,\n title: slots.title ? slotProps => slots.title?.({ ...slotProps, item }) : undefined,\n } satisfies VTreeviewItem['$props']['$children']\n\n const treeviewGroupProps = VTreeviewGroup.filterProps(itemProps)\n const treeviewChildrenProps = VTreeviewChildren.filterProps(props)\n\n return children ? (\n <VTreeviewGroup\n value={ itemProps?.value }\n { ...treeviewGroupProps }\n >\n {{\n activator: ({ props: activatorProps }) => (\n <VTreeviewItem\n { ...itemProps }\n { ...activatorProps }\n loading={ isLoading.value }\n v-slots={ slotsWithItem }\n onClick={ (e: MouseEvent | KeyboardEvent) => onClick(e, item) }\n />\n ),\n default: () => (\n <VTreeviewChildren\n { ...treeviewChildrenProps }\n items={ children }\n v-slots={ slots }\n />\n ),\n }}\n </VTreeviewGroup>\n ) : (\n slots.item?.({ props: itemProps }) ?? (\n <VTreeviewItem\n { ...itemProps }\n v-slots={ slotsWithItem }\n />\n ))\n })\n },\n})\n"],"mappings":";AAAA;AAAA,SACSA,cAAc;AAAA,SACdC,aAAa;AAAA,SACbC,YAAY,gDAErB;AACA,SAASC,UAAU,QAAQ,KAAK;AAAA,SACvBC,gBAAgB,EAAEC,YAAY,gCAEvC;AAaA,OAAO,MAAMC,0BAA0B,GAAGD,YAAY,CAAC;EACrDE,YAAY,EAAEC,QAAsD;EACpEC,WAAW,EAAE;IACXC,IAAI,EAAEC,MAAM;IACZC,OAAO,EAAE;EACX,CAAC;EACDC,KAAK,EAAEC,KAA8C;EACrDC,UAAU,EAAEC;AACd,CAAC,EAAE,mBAAmB,CAAC;AAEvB,OAAO,MAAMC,iBAAiB,GAAGb,gBAAgB,CAKF,CAAC,CAAC;EAC/Cc,IAAI,EAAE,mBAAmB;EAEzBC,KAAK,EAAEb,0BAA0B,CAAC,CAAC;EAEnCc,KAAKA,CAAED,KAAK,EAAAE,IAAA,EAAmB;IAAA,IAAjB;MAAEC,IAAI;MAAEC;IAAM,CAAC,GAAAF,IAAA;IAC3B,MAAMG,SAAS,GAAGrB,UAAU,CAAC,KAAK,CAAC;IACnC,MAAMsB,SAAS,GAAGtB,UAAU,CAAC,KAAK,CAAC;IAEnC,SAASuB,aAAaA,CAAEC,IAAa,EAAE;MACrC,OAAO,IAAIC,OAAO,CAAOC,OAAO,IAAI;QAClC,IAAI,CAACV,KAAK,CAACN,KAAK,EAAEiB,MAAM,IAAI,CAACX,KAAK,CAACZ,YAAY,IAAIkB,SAAS,CAACM,KAAK,EAAE,OAAOF,OAAO,CAAC,CAAC;QAEpFL,SAAS,CAACO,KAAK,GAAG,IAAI;QACtBZ,KAAK,CAACZ,YAAY,CAACoB,IAAI,CA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KAAK,GAAGP,SAAS,IAAIrB,KAAK,CAAC4B,KAAK,GAAG;UAAE,GAAGP,SAAS;UAAEjB;QAAK,CAAC,CAAC,GAAGsB;MAC5E,CAAgD;MAEhD,MAAMG,kBAAkB,GAAGpD,cAAc,CAACqD,WAAW,CAACb,SAAS,CAAC;MAChE,MAAMc,qBAAqB,GAAGrC,iBAAiB,CAACoC,WAAW,CAAClC,KAAK,CAAC;MAElE,OAAOoB,QAAQ,GAAAS,YAAA,CAAAhD,cAAA,EAAAuD,WAAA;QAAA,SAEHf,SAAS,EAAET;MAAK,GACnBqB,kBAAkB;QAGrBI,SAAS,EAAEC,KAAA;UAAA,IAAC;YAAEtC,KAAK,EAAEuC;UAAe,CAAC,GAAAD,KAAA;UAAA,OAAAT,YAAA,CAAA/C,aAAA,EAAAsD,WAAA,CAE5Bf,SAAS,EACTkB,cAAc;YAAA,WACTlC,SAAS,CAACO,KAAK;YAAA,WAEdI,CAA6B,IAAKD,OAAO,CAACC,CAAC,EAAER,IAAI;UAAC,IADnDe,aAAa;QAAA,CAG1B;QACD9B,OAAO,EAAEA,CAAA,KAAAoC,YAAA,CAAA/B,iBAAA,EAAAsC,WAAA,CAEAD,qBAAqB;UAAA,SAClBf;QAAQ,IACNhB,KAAK;MAElB,KAILA,KAAK,CAACI,IAAI,GAAG;QAAER,KAAK,EAAEqB;MAAU,CAAC,CAAC,IAAAQ,YAAA,CAAA/C,aAAA,EAEzBuC,SAAS,EACJE,aAAa,CAEzB;IACN,CAAC,CAAC;EACJ;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"VTreeviewChildren.mjs","names":["VTreeviewGroup","VTreeviewItem","VCheckboxBtn","shallowRef","genericComponent","propsFactory","makeVTreeviewChildrenProps","loadChildren","Function","loadingIcon","type","String","default","items","Array","selectable","Boolean","VTreeviewChildren","name","props","setup","_ref","emit","slots","isLoading","checkChildren","item","Promise","resolve","length","children","value","then","finally","onClick","e","stopPropagation","map","_ref2","itemProps","raw","loading","slotsWithItem","prepend","slotProps","_ref3","isSelected","isIndeterminate","_createVNode","undefined","append","title","treeviewGroupProps","filterProps","treeviewChildrenProps","_mergeProps","activator","_ref4","activatorProps"],"sources":["../../../src/labs/VTreeview/VTreeviewChildren.tsx"],"sourcesContent":["// Components\nimport { VTreeviewGroup } from './VTreeviewGroup'\nimport { VTreeviewItem } from './VTreeviewItem'\nimport { VCheckboxBtn } from '@/components/VCheckbox'\n\n// Utilities\nimport { shallowRef } from 'vue'\nimport { genericComponent, propsFactory } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { InternalListItem } from '@/components/VList/VList'\nimport type { VListItemSlots } from '@/components/VList/VListItem'\nimport type { GenericProps } from '@/util'\n\nexport type VTreeviewChildrenSlots<T> = {\n [K in keyof Omit<VListItemSlots, 'default'>]: VListItemSlots[K] & { item: T }\n} & {\n default: never\n item: { props: InternalListItem['props'] }\n}\n\nexport const makeVTreeviewChildrenProps = propsFactory({\n loadChildren: Function as PropType<(item: unknown) => Promise<void>>,\n loadingIcon: {\n type: String,\n default: '$loading',\n },\n items: Array as PropType<readonly InternalListItem[]>,\n selectable: Boolean,\n}, 'VTreeviewChildren')\n\nexport const VTreeviewChildren = genericComponent<new <T extends InternalListItem>(\n props: {\n items?: readonly T[]\n },\n slots: VTreeviewChildrenSlots<T>\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VTreeviewChildren',\n\n props: makeVTreeviewChildrenProps(),\n\n setup (props, { emit, slots }) {\n const isLoading = shallowRef(null)\n\n function checkChildren (item: any) {\n return new Promise<void>(resolve => {\n if (!props.items?.length || !props.loadChildren) return resolve()\n\n if (item?.children?.length === 0) {\n isLoading.value = item.value\n props.loadChildren(item).then(resolve)\n\n return\n }\n\n resolve()\n }).finally(() => {\n isLoading.value = null\n })\n }\n\n function onClick (e: MouseEvent | KeyboardEvent, item: any) {\n e.stopPropagation()\n\n checkChildren(item)\n }\n\n return () => slots.default?.() ?? props.items?.map(({ children, props: itemProps, raw: item }) => {\n const loading = isLoading.value === item.value\n const slotsWithItem = {\n prepend: slots.prepend\n ? slotProps => slots.prepend?.({ ...slotProps, item })\n : props.selectable\n ? ({ isSelected, isIndeterminate }) => (\n <VCheckboxBtn\n key={ item.value }\n tabindex=\"-1\"\n modelValue={ isSelected }\n loading={ loading }\n indeterminate={ isIndeterminate }\n onClick={ (e: MouseEvent) => onClick(e, item) }\n />\n )\n : undefined,\n append: slots.append ? slotProps => slots.append?.({ ...slotProps, item }) : undefined,\n title: slots.title ? slotProps => slots.title?.({ ...slotProps, item }) : undefined,\n } satisfies VTreeviewItem['$props']['$children']\n\n const treeviewGroupProps = VTreeviewGroup.filterProps(itemProps)\n const treeviewChildrenProps = VTreeviewChildren.filterProps(props)\n\n return children ? (\n <VTreeviewGroup\n value={ itemProps?.value }\n { ...treeviewGroupProps }\n >\n {{\n activator: ({ props: activatorProps }) => (\n <VTreeviewItem\n { ...itemProps }\n { ...activatorProps }\n loading={ loading }\n v-slots={ slotsWithItem }\n onClick={ (e: MouseEvent | KeyboardEvent) => onClick(e, item) }\n />\n ),\n default: () => (\n <VTreeviewChildren\n { ...treeviewChildrenProps }\n items={ children }\n v-slots={ slots }\n />\n ),\n }}\n </VTreeviewGroup>\n ) : (\n slots.item?.({ props: itemProps }) ?? (\n <VTreeviewItem\n { ...itemProps }\n v-slots={ slotsWithItem }\n />\n ))\n })\n },\n})\n"],"mappings":";AAAA;AAAA,SACSA,cAAc;AAAA,SACdC,aAAa;AAAA,SACbC,YAAY,gDAErB;AACA,SAASC,UAAU,QAAQ,KAAK;AAAA,SACvBC,gBAAgB,EAAEC,YAAY,gCAEvC;AAaA,OAAO,MAAMC,0BAA0B,GAAGD,YAAY,CAAC;EACrDE,YAAY,EAAEC,QAAsD;EACpEC,WAAW,EAAE;IACXC,IAAI,EAAEC,MAAM;IACZC,OAAO,EAAE;EACX,CAAC;EACDC,KAAK,EAAEC,KAA8C;EACrDC,UAAU,EAAEC;AACd,CAAC,EAAE,mBAAmB,CA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