@nuxt/ui 2.11.1 → 2.12.1

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 (74) hide show
  1. package/dist/module.d.mts +100 -28
  2. package/dist/module.d.ts +100 -28
  3. package/dist/module.json +1 -1
  4. package/dist/module.mjs +2 -2
  5. package/dist/runtime/components/data/Table.vue +26 -18
  6. package/dist/runtime/components/data/Table.vue.d.ts +21 -12
  7. package/dist/runtime/components/elements/Accordion.vue +8 -4
  8. package/dist/runtime/components/elements/Accordion.vue.d.ts +4 -4
  9. package/dist/runtime/components/elements/Alert.vue +8 -2
  10. package/dist/runtime/components/elements/Alert.vue.d.ts +5 -10
  11. package/dist/runtime/components/elements/Button.vue +6 -3
  12. package/dist/runtime/components/elements/Button.vue.d.ts +119 -1
  13. package/dist/runtime/components/elements/Chip.vue.d.ts +2 -2
  14. package/dist/runtime/components/elements/Dropdown.vue +66 -17
  15. package/dist/runtime/components/elements/Dropdown.vue.d.ts +31 -4
  16. package/dist/runtime/components/elements/Link.vue +9 -4
  17. package/dist/runtime/components/elements/Link.vue.d.ts +194 -4
  18. package/dist/runtime/components/forms/Form.vue +16 -7
  19. package/dist/runtime/components/forms/Form.vue.d.ts +1 -1
  20. package/dist/runtime/components/forms/Input.vue +1 -1
  21. package/dist/runtime/components/forms/Input.vue.d.ts +1 -1
  22. package/dist/runtime/components/forms/InputMenu.vue +419 -0
  23. package/dist/runtime/components/forms/InputMenu.vue.d.ts +332 -0
  24. package/dist/runtime/components/forms/RadioGroup.vue +1 -1
  25. package/dist/runtime/components/forms/Select.vue +1 -1
  26. package/dist/runtime/components/forms/Select.vue.d.ts +1 -1
  27. package/dist/runtime/components/forms/SelectMenu.vue +70 -21
  28. package/dist/runtime/components/forms/SelectMenu.vue.d.ts +31 -10
  29. package/dist/runtime/components/forms/Toggle.vue +1 -1
  30. package/dist/runtime/components/forms/Toggle.vue.d.ts +2 -1
  31. package/dist/runtime/components/layout/Divider.vue +4 -5
  32. package/dist/runtime/components/navigation/Breadcrumb.vue +8 -5
  33. package/dist/runtime/components/navigation/Breadcrumb.vue.d.ts +4 -2
  34. package/dist/runtime/components/navigation/CommandPalette.vue.d.ts +3 -3
  35. package/dist/runtime/components/navigation/Pagination.vue +9 -4
  36. package/dist/runtime/components/navigation/Pagination.vue.d.ts +9 -0
  37. package/dist/runtime/components/navigation/VerticalNavigation.vue +53 -38
  38. package/dist/runtime/components/navigation/VerticalNavigation.vue.d.ts +8 -5
  39. package/dist/runtime/components/overlays/Modal.vue.d.ts +1 -1
  40. package/dist/runtime/components/overlays/Popover.vue +49 -13
  41. package/dist/runtime/components/overlays/Popover.vue.d.ts +14 -4
  42. package/dist/runtime/components/overlays/Slideover.vue.d.ts +1 -1
  43. package/dist/runtime/components/overlays/Tooltip.vue +1 -1
  44. package/dist/runtime/composables/useShortcuts.mjs +3 -1
  45. package/dist/runtime/types/alert.d.ts +5 -0
  46. package/dist/runtime/types/breadcrumb.d.ts +1 -0
  47. package/dist/runtime/types/chip.d.ts +4 -0
  48. package/dist/runtime/types/dropdown.d.ts +2 -0
  49. package/dist/runtime/types/form.d.ts +1 -0
  50. package/dist/runtime/types/index.d.ts +1 -0
  51. package/dist/runtime/types/link.d.ts +3 -0
  52. package/dist/runtime/types/tooltip.d.ts +7 -0
  53. package/dist/runtime/types/vertical-navigation.d.ts +1 -0
  54. package/dist/runtime/ui.config/forms/input.mjs +12 -12
  55. package/dist/runtime/ui.config/forms/inputMenu.d.ts +64 -0
  56. package/dist/runtime/ui.config/forms/inputMenu.mjs +62 -0
  57. package/dist/runtime/ui.config/forms/selectMenu.d.ts +14 -12
  58. package/dist/runtime/ui.config/forms/selectMenu.mjs +7 -41
  59. package/dist/runtime/ui.config/index.d.ts +1 -0
  60. package/dist/runtime/ui.config/index.mjs +1 -0
  61. package/dist/runtime/ui.config/layout/card.mjs +1 -1
  62. package/dist/runtime/ui.config/navigation/breadcrumb.d.ts +1 -0
  63. package/dist/runtime/ui.config/navigation/breadcrumb.mjs +1 -0
  64. package/dist/runtime/ui.config/navigation/verticalNavigation.d.ts +5 -0
  65. package/dist/runtime/ui.config/navigation/verticalNavigation.mjs +5 -0
  66. package/dist/runtime/ui.config/popper.mjs +2 -1
  67. package/dist/runtime/utils/index.d.ts +1 -0
  68. package/dist/runtime/utils/index.mjs +12 -3
  69. package/dist/runtime/utils/link.d.ts +58 -0
  70. package/dist/runtime/utils/link.mjs +111 -0
  71. package/dist/runtime/utils/uid.mjs +2 -1
  72. package/dist/types.d.mts +2 -2
  73. package/dist/types.d.ts +1 -1
  74. package/package.json +31 -28
package/dist/module.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as _nuxt_schema from '@nuxt/schema';
2
2
  import { CollectionNames, IconsPluginOptions } from '@egoist/tailwindcss-icons';
3
3
 
4
- declare const _default$E: {
4
+ declare const _default$F: {
5
5
  wrapper: string;
6
6
  base: string;
7
7
  divide: string;
@@ -61,7 +61,7 @@ declare const _default$E: {
61
61
  };
62
62
  };
63
63
 
64
- declare const _default$D: {
64
+ declare const _default$E: {
65
65
  wrapper: string;
66
66
  background: string;
67
67
  rounded: string;
@@ -121,13 +121,13 @@ declare const _default$D: {
121
121
  };
122
122
  };
123
123
 
124
- declare const _default$C: {
124
+ declare const _default$D: {
125
125
  wrapper: string;
126
126
  ring: string;
127
127
  margin: string;
128
128
  };
129
129
 
130
- declare const _default$B: {
130
+ declare const _default$C: {
131
131
  base: string;
132
132
  rounded: string;
133
133
  font: string;
@@ -161,7 +161,7 @@ declare const _default$B: {
161
161
  };
162
162
  };
163
163
 
164
- declare const _default$A: {
164
+ declare const _default$B: {
165
165
  base: string;
166
166
  font: string;
167
167
  rounded: string;
@@ -242,7 +242,7 @@ declare const _default$A: {
242
242
  };
243
243
  };
244
244
 
245
- declare const _default$z: {
245
+ declare const _default$A: {
246
246
  wrapper: {
247
247
  horizontal: string;
248
248
  vertical: string;
@@ -343,7 +343,7 @@ declare const _default$z: {
343
343
  };
344
344
  };
345
345
 
346
- declare const _default$y: {
346
+ declare const _default$z: {
347
347
  wrapper: string;
348
348
  base: string;
349
349
  background: string;
@@ -378,7 +378,7 @@ declare const _default$y: {
378
378
  };
379
379
  };
380
380
 
381
- declare const _default$x: {
381
+ declare const _default$y: {
382
382
  wrapper: string;
383
383
  container: string;
384
384
  trigger: string;
@@ -433,7 +433,7 @@ declare const _default$x: {
433
433
  };
434
434
  };
435
435
 
436
- declare const _default$w: {
436
+ declare const _default$x: {
437
437
  wrapper: string;
438
438
  item: {
439
439
  base: string;
@@ -454,7 +454,7 @@ declare const _default$w: {
454
454
  };
455
455
  };
456
456
 
457
- declare const _default$v: {
457
+ declare const _default$w: {
458
458
  wrapper: string;
459
459
  inner: string;
460
460
  title: string;
@@ -495,7 +495,7 @@ declare const _default$v: {
495
495
  };
496
496
  };
497
497
 
498
- declare const _default$u: {
498
+ declare const _default$v: {
499
499
  base: string;
500
500
  padding: string;
501
501
  size: {
@@ -512,7 +512,7 @@ declare const _default$u: {
512
512
  };
513
513
  };
514
514
 
515
- declare const _default$t: {
515
+ declare const _default$u: {
516
516
  wrapper: string;
517
517
  indicator: {
518
518
  container: {
@@ -587,7 +587,7 @@ declare const _default$t: {
587
587
  };
588
588
  };
589
589
 
590
- declare const _default$s: {
590
+ declare const _default$t: {
591
591
  wrapper: string;
592
592
  indicator: {
593
593
  container: string;
@@ -664,7 +664,7 @@ declare const _default$s: {
664
664
  };
665
665
  };
666
666
 
667
- declare const _default$r: {
667
+ declare const _default$s: {
668
668
  wrapper: string;
669
669
  base: string;
670
670
  background: string;
@@ -716,7 +716,7 @@ declare const _default$r: {
716
716
  };
717
717
  };
718
718
 
719
- declare const _default$q: {
719
+ declare const _default$r: {
720
720
  wrapper: string;
721
721
  base: string;
722
722
  form: string;
@@ -823,6 +823,70 @@ declare const _default$q: {
823
823
  };
824
824
  };
825
825
 
826
+ declare const _default$q: {
827
+ container: string;
828
+ trigger: string;
829
+ width: string;
830
+ height: string;
831
+ base: string;
832
+ background: string;
833
+ shadow: string;
834
+ rounded: string;
835
+ padding: string;
836
+ ring: string;
837
+ empty: string;
838
+ option: {
839
+ base: string;
840
+ rounded: string;
841
+ padding: string;
842
+ size: string;
843
+ color: string;
844
+ container: string;
845
+ active: string;
846
+ inactive: string;
847
+ selected: string;
848
+ disabled: string;
849
+ empty: string;
850
+ icon: {
851
+ base: string;
852
+ active: string;
853
+ inactive: string;
854
+ };
855
+ selectedIcon: {
856
+ wrapper: string;
857
+ padding: string;
858
+ base: string;
859
+ };
860
+ avatar: {
861
+ base: string;
862
+ size: "3xs";
863
+ };
864
+ chip: {
865
+ base: string;
866
+ };
867
+ };
868
+ transition: {
869
+ leaveActiveClass: string;
870
+ leaveFromClass: string;
871
+ leaveToClass: string;
872
+ };
873
+ popper: {
874
+ placement: string;
875
+ };
876
+ default: {
877
+ selectedIcon: string;
878
+ trailingIcon: string;
879
+ };
880
+ arrow: {
881
+ ring: string;
882
+ background: string;
883
+ base: string;
884
+ rounded: string;
885
+ shadow: string;
886
+ placement: string;
887
+ };
888
+ };
889
+
826
890
  declare const _default$p: {
827
891
  wrapper: string;
828
892
  label: {
@@ -1063,21 +1127,12 @@ declare const _default$n: {
1063
1127
  };
1064
1128
 
1065
1129
  declare const _default$m: {
1066
- container: string;
1067
- trigger: string;
1068
1130
  select: string;
1069
- width: string;
1070
- height: string;
1071
- base: string;
1072
- background: string;
1073
- shadow: string;
1074
- rounded: string;
1075
- padding: string;
1076
- ring: string;
1077
1131
  input: string;
1078
1132
  required: string;
1079
1133
  label: string;
1080
1134
  option: {
1135
+ create: string;
1081
1136
  base: string;
1082
1137
  rounded: string;
1083
1138
  padding: string;
@@ -1089,7 +1144,6 @@ declare const _default$m: {
1089
1144
  selected: string;
1090
1145
  disabled: string;
1091
1146
  empty: string;
1092
- create: string;
1093
1147
  icon: {
1094
1148
  base: string;
1095
1149
  active: string;
@@ -1118,7 +1172,8 @@ declare const _default$m: {
1118
1172
  };
1119
1173
  default: {
1120
1174
  selectedIcon: string;
1121
- clearOnClose: boolean;
1175
+ clearSearchOnClose: boolean;
1176
+ showCreateOptionWhen: string;
1122
1177
  };
1123
1178
  arrow: {
1124
1179
  ring: string;
@@ -1128,6 +1183,17 @@ declare const _default$m: {
1128
1183
  shadow: string;
1129
1184
  placement: string;
1130
1185
  };
1186
+ container: string;
1187
+ trigger: string;
1188
+ width: string;
1189
+ height: string;
1190
+ base: string;
1191
+ background: string;
1192
+ shadow: string;
1193
+ rounded: string;
1194
+ padding: string;
1195
+ ring: string;
1196
+ empty: string;
1131
1197
  };
1132
1198
 
1133
1199
  declare const _default$l: {
@@ -1397,6 +1463,11 @@ declare const _default$c: {
1397
1463
  active: string;
1398
1464
  inactive: string;
1399
1465
  };
1466
+ divider: {
1467
+ wrapper: {
1468
+ base: string;
1469
+ };
1470
+ };
1400
1471
  };
1401
1472
 
1402
1473
  declare const _default$b: {
@@ -1545,6 +1616,7 @@ declare const _default$8: {
1545
1616
  ol: string;
1546
1617
  li: string;
1547
1618
  base: string;
1619
+ label: string;
1548
1620
  icon: {
1549
1621
  base: string;
1550
1622
  active: string;
@@ -1793,7 +1865,7 @@ declare const _default$1: {
1793
1865
  };
1794
1866
 
1795
1867
  declare namespace config {
1796
- export { _default$w as accordion, _default$v as alert, _default$D as avatar, _default$C as avatarGroup, _default$B as badge, _default$8 as breadcrumb, _default$A as button, _default$z as buttonGroup, _default$g as card, _default$j as checkbox, _default$y as chip, _default$b as commandPalette, _default$f as container, _default$3 as contextMenu, _default$d as divider, _default$x as dropdown, _default$p as formGroup, _default$q as input, _default$u as kbd, _default$s as meter, _default$r as meterGroup, _default$7 as modal, _default$2 as notification, _default$1 as notifications, _default$a as pagination, _default$4 as popover, _default$t as progress, _default$k as radio, _default$l as radioGroup, _default$h as range, _default$n as select, _default$m as selectMenu, _default$e as skeleton, _default$6 as slideover, _default$E as table, _default$9 as tabs, _default$o as textarea, _default$i as toggle, _default$5 as tooltip, _default$c as verticalNavigation };
1868
+ export { _default$x as accordion, _default$w as alert, _default$E as avatar, _default$D as avatarGroup, _default$C as badge, _default$8 as breadcrumb, _default$B as button, _default$A as buttonGroup, _default$g as card, _default$j as checkbox, _default$z as chip, _default$b as commandPalette, _default$f as container, _default$3 as contextMenu, _default$d as divider, _default$y as dropdown, _default$p as formGroup, _default$r as input, _default$q as inputMenu, _default$v as kbd, _default$t as meter, _default$s as meterGroup, _default$7 as modal, _default$2 as notification, _default$1 as notifications, _default$a as pagination, _default$4 as popover, _default$u as progress, _default$k as radio, _default$l as radioGroup, _default$h as range, _default$n as select, _default$m as selectMenu, _default$e as skeleton, _default$6 as slideover, _default$F as table, _default$9 as tabs, _default$o as textarea, _default$i as toggle, _default$5 as tooltip, _default$c as verticalNavigation };
1797
1869
  }
1798
1870
 
1799
1871
  type Strategy = 'merge' | 'override'
package/dist/module.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as _nuxt_schema from '@nuxt/schema';
2
2
  import { CollectionNames, IconsPluginOptions } from '@egoist/tailwindcss-icons';
3
3
 
4
- declare const _default$E: {
4
+ declare const _default$F: {
5
5
  wrapper: string;
6
6
  base: string;
7
7
  divide: string;
@@ -61,7 +61,7 @@ declare const _default$E: {
61
61
  };
62
62
  };
63
63
 
64
- declare const _default$D: {
64
+ declare const _default$E: {
65
65
  wrapper: string;
66
66
  background: string;
67
67
  rounded: string;
@@ -121,13 +121,13 @@ declare const _default$D: {
121
121
  };
122
122
  };
123
123
 
124
- declare const _default$C: {
124
+ declare const _default$D: {
125
125
  wrapper: string;
126
126
  ring: string;
127
127
  margin: string;
128
128
  };
129
129
 
130
- declare const _default$B: {
130
+ declare const _default$C: {
131
131
  base: string;
132
132
  rounded: string;
133
133
  font: string;
@@ -161,7 +161,7 @@ declare const _default$B: {
161
161
  };
162
162
  };
163
163
 
164
- declare const _default$A: {
164
+ declare const _default$B: {
165
165
  base: string;
166
166
  font: string;
167
167
  rounded: string;
@@ -242,7 +242,7 @@ declare const _default$A: {
242
242
  };
243
243
  };
244
244
 
245
- declare const _default$z: {
245
+ declare const _default$A: {
246
246
  wrapper: {
247
247
  horizontal: string;
248
248
  vertical: string;
@@ -343,7 +343,7 @@ declare const _default$z: {
343
343
  };
344
344
  };
345
345
 
346
- declare const _default$y: {
346
+ declare const _default$z: {
347
347
  wrapper: string;
348
348
  base: string;
349
349
  background: string;
@@ -378,7 +378,7 @@ declare const _default$y: {
378
378
  };
379
379
  };
380
380
 
381
- declare const _default$x: {
381
+ declare const _default$y: {
382
382
  wrapper: string;
383
383
  container: string;
384
384
  trigger: string;
@@ -433,7 +433,7 @@ declare const _default$x: {
433
433
  };
434
434
  };
435
435
 
436
- declare const _default$w: {
436
+ declare const _default$x: {
437
437
  wrapper: string;
438
438
  item: {
439
439
  base: string;
@@ -454,7 +454,7 @@ declare const _default$w: {
454
454
  };
455
455
  };
456
456
 
457
- declare const _default$v: {
457
+ declare const _default$w: {
458
458
  wrapper: string;
459
459
  inner: string;
460
460
  title: string;
@@ -495,7 +495,7 @@ declare const _default$v: {
495
495
  };
496
496
  };
497
497
 
498
- declare const _default$u: {
498
+ declare const _default$v: {
499
499
  base: string;
500
500
  padding: string;
501
501
  size: {
@@ -512,7 +512,7 @@ declare const _default$u: {
512
512
  };
513
513
  };
514
514
 
515
- declare const _default$t: {
515
+ declare const _default$u: {
516
516
  wrapper: string;
517
517
  indicator: {
518
518
  container: {
@@ -587,7 +587,7 @@ declare const _default$t: {
587
587
  };
588
588
  };
589
589
 
590
- declare const _default$s: {
590
+ declare const _default$t: {
591
591
  wrapper: string;
592
592
  indicator: {
593
593
  container: string;
@@ -664,7 +664,7 @@ declare const _default$s: {
664
664
  };
665
665
  };
666
666
 
667
- declare const _default$r: {
667
+ declare const _default$s: {
668
668
  wrapper: string;
669
669
  base: string;
670
670
  background: string;
@@ -716,7 +716,7 @@ declare const _default$r: {
716
716
  };
717
717
  };
718
718
 
719
- declare const _default$q: {
719
+ declare const _default$r: {
720
720
  wrapper: string;
721
721
  base: string;
722
722
  form: string;
@@ -823,6 +823,70 @@ declare const _default$q: {
823
823
  };
824
824
  };
825
825
 
826
+ declare const _default$q: {
827
+ container: string;
828
+ trigger: string;
829
+ width: string;
830
+ height: string;
831
+ base: string;
832
+ background: string;
833
+ shadow: string;
834
+ rounded: string;
835
+ padding: string;
836
+ ring: string;
837
+ empty: string;
838
+ option: {
839
+ base: string;
840
+ rounded: string;
841
+ padding: string;
842
+ size: string;
843
+ color: string;
844
+ container: string;
845
+ active: string;
846
+ inactive: string;
847
+ selected: string;
848
+ disabled: string;
849
+ empty: string;
850
+ icon: {
851
+ base: string;
852
+ active: string;
853
+ inactive: string;
854
+ };
855
+ selectedIcon: {
856
+ wrapper: string;
857
+ padding: string;
858
+ base: string;
859
+ };
860
+ avatar: {
861
+ base: string;
862
+ size: "3xs";
863
+ };
864
+ chip: {
865
+ base: string;
866
+ };
867
+ };
868
+ transition: {
869
+ leaveActiveClass: string;
870
+ leaveFromClass: string;
871
+ leaveToClass: string;
872
+ };
873
+ popper: {
874
+ placement: string;
875
+ };
876
+ default: {
877
+ selectedIcon: string;
878
+ trailingIcon: string;
879
+ };
880
+ arrow: {
881
+ ring: string;
882
+ background: string;
883
+ base: string;
884
+ rounded: string;
885
+ shadow: string;
886
+ placement: string;
887
+ };
888
+ };
889
+
826
890
  declare const _default$p: {
827
891
  wrapper: string;
828
892
  label: {
@@ -1063,21 +1127,12 @@ declare const _default$n: {
1063
1127
  };
1064
1128
 
1065
1129
  declare const _default$m: {
1066
- container: string;
1067
- trigger: string;
1068
1130
  select: string;
1069
- width: string;
1070
- height: string;
1071
- base: string;
1072
- background: string;
1073
- shadow: string;
1074
- rounded: string;
1075
- padding: string;
1076
- ring: string;
1077
1131
  input: string;
1078
1132
  required: string;
1079
1133
  label: string;
1080
1134
  option: {
1135
+ create: string;
1081
1136
  base: string;
1082
1137
  rounded: string;
1083
1138
  padding: string;
@@ -1089,7 +1144,6 @@ declare const _default$m: {
1089
1144
  selected: string;
1090
1145
  disabled: string;
1091
1146
  empty: string;
1092
- create: string;
1093
1147
  icon: {
1094
1148
  base: string;
1095
1149
  active: string;
@@ -1118,7 +1172,8 @@ declare const _default$m: {
1118
1172
  };
1119
1173
  default: {
1120
1174
  selectedIcon: string;
1121
- clearOnClose: boolean;
1175
+ clearSearchOnClose: boolean;
1176
+ showCreateOptionWhen: string;
1122
1177
  };
1123
1178
  arrow: {
1124
1179
  ring: string;
@@ -1128,6 +1183,17 @@ declare const _default$m: {
1128
1183
  shadow: string;
1129
1184
  placement: string;
1130
1185
  };
1186
+ container: string;
1187
+ trigger: string;
1188
+ width: string;
1189
+ height: string;
1190
+ base: string;
1191
+ background: string;
1192
+ shadow: string;
1193
+ rounded: string;
1194
+ padding: string;
1195
+ ring: string;
1196
+ empty: string;
1131
1197
  };
1132
1198
 
1133
1199
  declare const _default$l: {
@@ -1397,6 +1463,11 @@ declare const _default$c: {
1397
1463
  active: string;
1398
1464
  inactive: string;
1399
1465
  };
1466
+ divider: {
1467
+ wrapper: {
1468
+ base: string;
1469
+ };
1470
+ };
1400
1471
  };
1401
1472
 
1402
1473
  declare const _default$b: {
@@ -1545,6 +1616,7 @@ declare const _default$8: {
1545
1616
  ol: string;
1546
1617
  li: string;
1547
1618
  base: string;
1619
+ label: string;
1548
1620
  icon: {
1549
1621
  base: string;
1550
1622
  active: string;
@@ -1793,7 +1865,7 @@ declare const _default$1: {
1793
1865
  };
1794
1866
 
1795
1867
  declare namespace config {
1796
- export { _default$w as accordion, _default$v as alert, _default$D as avatar, _default$C as avatarGroup, _default$B as badge, _default$8 as breadcrumb, _default$A as button, _default$z as buttonGroup, _default$g as card, _default$j as checkbox, _default$y as chip, _default$b as commandPalette, _default$f as container, _default$3 as contextMenu, _default$d as divider, _default$x as dropdown, _default$p as formGroup, _default$q as input, _default$u as kbd, _default$s as meter, _default$r as meterGroup, _default$7 as modal, _default$2 as notification, _default$1 as notifications, _default$a as pagination, _default$4 as popover, _default$t as progress, _default$k as radio, _default$l as radioGroup, _default$h as range, _default$n as select, _default$m as selectMenu, _default$e as skeleton, _default$6 as slideover, _default$E as table, _default$9 as tabs, _default$o as textarea, _default$i as toggle, _default$5 as tooltip, _default$c as verticalNavigation };
1868
+ export { _default$x as accordion, _default$w as alert, _default$E as avatar, _default$D as avatarGroup, _default$C as badge, _default$8 as breadcrumb, _default$B as button, _default$A as buttonGroup, _default$g as card, _default$j as checkbox, _default$z as chip, _default$b as commandPalette, _default$f as container, _default$3 as contextMenu, _default$d as divider, _default$y as dropdown, _default$p as formGroup, _default$r as input, _default$q as inputMenu, _default$v as kbd, _default$t as meter, _default$s as meterGroup, _default$7 as modal, _default$2 as notification, _default$1 as notifications, _default$a as pagination, _default$4 as popover, _default$u as progress, _default$k as radio, _default$l as radioGroup, _default$h as range, _default$n as select, _default$m as selectMenu, _default$e as skeleton, _default$6 as slideover, _default$F as table, _default$9 as tabs, _default$o as textarea, _default$i as toggle, _default$5 as tooltip, _default$c as verticalNavigation };
1797
1869
  }
1798
1870
 
1799
1871
  type Strategy = 'merge' | 'override'
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/ui",
3
- "version": "2.11.1",
3
+ "version": "2.12.1",
4
4
  "configKey": "ui",
5
5
  "compatibility": {
6
6
  "nuxt": "^3.0.0-rc.8"
package/dist/module.mjs CHANGED
@@ -14,7 +14,7 @@ const __filename = __cjs_url__.fileURLToPath(import.meta.url);
14
14
  const __dirname = __cjs_path__.dirname(__filename);
15
15
  const require = __cjs_mod__.createRequire(import.meta.url);
16
16
  const name = "@nuxt/ui";
17
- const version = "2.11.1";
17
+ const version = "2.12.1";
18
18
 
19
19
  function omit(object, keysToOmit) {
20
20
  const result = { ...object };
@@ -376,7 +376,7 @@ const module = defineNuxtModule({
376
376
  tailwindConfig.safelist = tailwindConfig.safelist || [];
377
377
  tailwindConfig.safelist.push(...generateSafelist(options.safelistColors || [], colors));
378
378
  tailwindConfig.plugins = tailwindConfig.plugins || [];
379
- tailwindConfig.plugins.push(iconsPlugin(Array.isArray(options.icons) || options.icons === "all" ? { collections: getIconCollections(options.icons) } : typeof options.icons === "object" ? options.icons : {}));
379
+ tailwindConfig.plugins.push(iconsPlugin(Array.isArray(options.icons) ? { collections: getIconCollections(options.icons) } : typeof options.icons === "object" ? options.icons : {}));
380
380
  });
381
381
  createTemplates(nuxt);
382
382
  await installModule("nuxt-icon");
@@ -67,20 +67,31 @@
67
67
  </template>
68
68
 
69
69
  <script>
70
- import { ref, computed, defineComponent, toRaw, toRef } from "vue";
70
+ import { computed, defineComponent, toRaw, toRef } from "vue";
71
71
  import { upperFirst } from "scule";
72
72
  import { defu } from "defu";
73
+ import { useVModel } from "@vueuse/core";
73
74
  import UButton from "../elements/Button.vue";
74
75
  import UIcon from "../elements/Icon.vue";
75
76
  import UCheckbox from "../forms/Checkbox.vue";
76
77
  import { useUI } from "../../composables/useUI";
77
- import { mergeConfig, omit, get } from "../../utils";
78
+ import { mergeConfig, get } from "../../utils";
78
79
  import appConfig from "#build/app.config";
79
80
  import { table } from "#ui/ui.config";
80
81
  const config = mergeConfig(appConfig.ui.strategy, appConfig.ui.table, table);
81
82
  function defaultComparator(a, z) {
82
83
  return a === z;
83
84
  }
85
+ function defaultSort(a, b, direction) {
86
+ if (a === b) {
87
+ return 0;
88
+ }
89
+ if (direction === "asc") {
90
+ return a < b ? -1 : 1;
91
+ } else {
92
+ return a > b ? -1 : 1;
93
+ }
94
+ }
84
95
  export default defineComponent({
85
96
  components: {
86
97
  UButton,
@@ -113,6 +124,10 @@ export default defineComponent({
113
124
  type: Object,
114
125
  default: () => ({})
115
126
  },
127
+ sortMode: {
128
+ type: String,
129
+ default: "auto"
130
+ },
116
131
  sortButton: {
117
132
  type: Object,
118
133
  default: () => config.default.sortButton
@@ -149,25 +164,19 @@ export default defineComponent({
149
164
  emits: ["update:modelValue", "update:sort"],
150
165
  setup(props, { emit, attrs: $attrs }) {
151
166
  const { ui, attrs } = useUI("table", toRef(props, "ui"), config, toRef(props, "class"));
152
- const columns = computed(() => props.columns ?? Object.keys(omit(props.rows[0] ?? {}, ["click"])).map((key) => ({ key, label: upperFirst(key), sortable: false })));
153
- const sort = ref(defu({}, props.sort, { column: null, direction: "asc" }));
154
- const defaultSort = { column: sort.value.column, direction: null };
167
+ const columns = computed(() => props.columns ?? Object.keys(props.rows[0] ?? {}).map((key) => ({ key, label: upperFirst(key), sortable: false, class: void 0, sort: defaultSort })));
168
+ const sort = useVModel(props, "sort", emit, { passive: true, defaultValue: defu({}, props.sort, { column: null, direction: "asc" }) });
169
+ const savedSort = { column: sort.value.column, direction: null };
155
170
  const rows = computed(() => {
156
- if (!sort.value?.column) {
171
+ if (!sort.value?.column || props.sortMode === "manual") {
157
172
  return props.rows;
158
173
  }
159
174
  const { column, direction } = sort.value;
160
175
  return props.rows.slice().sort((a, b) => {
161
176
  const aValue = get(a, column);
162
177
  const bValue = get(b, column);
163
- if (aValue === bValue) {
164
- return 0;
165
- }
166
- if (direction === "asc") {
167
- return aValue < bValue ? -1 : 1;
168
- } else {
169
- return aValue > bValue ? -1 : 1;
170
- }
178
+ const sort2 = columns.value.find((col) => col.key === column)?.sort ?? defaultSort;
179
+ return sort2(aValue, bValue, direction);
171
180
  });
172
181
  });
173
182
  const selected = computed({
@@ -206,14 +215,13 @@ export default defineComponent({
206
215
  if (sort.value.column === column.key) {
207
216
  const direction = !column.direction || column.direction === "asc" ? "desc" : "asc";
208
217
  if (sort.value.direction === direction) {
209
- sort.value = defu({}, defaultSort, { column: null, direction: "asc" });
218
+ sort.value = defu({}, savedSort, { column: null, direction: "asc" });
210
219
  } else {
211
- sort.value.direction = sort.value.direction === "asc" ? "desc" : "asc";
220
+ sort.value = { column: sort.value.column, direction: sort.value.direction === "asc" ? "desc" : "asc" };
212
221
  }
213
222
  } else {
214
223
  sort.value = { column: column.key, direction: column.direction || "asc" };
215
224
  }
216
- emit("update:sort", sort.value);
217
225
  }
218
226
  function onSelect(row) {
219
227
  if (!$attrs.onSelect) {
@@ -236,7 +244,7 @@ export default defineComponent({
236
244
  selected.value = [];
237
245
  }
238
246
  }
239
- function getRowData(row, rowKey, defaultValue = "Failed to get cell value") {
247
+ function getRowData(row, rowKey, defaultValue = "") {
240
248
  return get(row, rowKey, defaultValue);
241
249
  }
242
250
  return {