@nuxt/ui 2.19.1 → 2.20.0

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 (77) hide show
  1. package/README.md +2 -2
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +1 -1
  4. package/dist/runtime/components/data/Table.vue +75 -34
  5. package/dist/runtime/components/data/Table.vue.d.ts +74 -61
  6. package/dist/runtime/components/elements/Accordion.vue +3 -1
  7. package/dist/runtime/components/elements/Accordion.vue.d.ts +25 -24
  8. package/dist/runtime/components/elements/Alert.vue.d.ts +39 -39
  9. package/dist/runtime/components/elements/Avatar.vue.d.ts +3 -3
  10. package/dist/runtime/components/elements/AvatarGroup.d.ts +11 -9
  11. package/dist/runtime/components/elements/Badge.vue +69 -2
  12. package/dist/runtime/components/elements/Badge.vue.d.ts +131 -4
  13. package/dist/runtime/components/elements/Button.vue.d.ts +20 -20
  14. package/dist/runtime/components/elements/ButtonGroup.d.ts +15 -13
  15. package/dist/runtime/components/elements/Carousel.vue.d.ts +43 -41
  16. package/dist/runtime/components/elements/Chip.vue.d.ts +5 -5
  17. package/dist/runtime/components/elements/Dropdown.vue.d.ts +7 -7
  18. package/dist/runtime/components/elements/Link.vue +15 -4
  19. package/dist/runtime/components/elements/Link.vue.d.ts +30 -29
  20. package/dist/runtime/components/elements/Meter.vue.d.ts +3 -3
  21. package/dist/runtime/components/elements/MeterGroup.d.ts +20 -18
  22. package/dist/runtime/components/elements/Progress.vue.d.ts +2 -2
  23. package/dist/runtime/components/forms/Checkbox.vue.d.ts +2 -2
  24. package/dist/runtime/components/forms/Form.vue +6 -5
  25. package/dist/runtime/components/forms/FormGroup.vue.d.ts +2 -2
  26. package/dist/runtime/components/forms/Input.vue.d.ts +3 -3
  27. package/dist/runtime/components/forms/InputMenu.vue +35 -5
  28. package/dist/runtime/components/forms/InputMenu.vue.d.ts +13 -12
  29. package/dist/runtime/components/forms/Radio.vue.d.ts +2 -2
  30. package/dist/runtime/components/forms/RadioGroup.vue.d.ts +4 -4
  31. package/dist/runtime/components/forms/Range.vue.d.ts +2 -2
  32. package/dist/runtime/components/forms/Select.vue.d.ts +3 -3
  33. package/dist/runtime/components/forms/SelectMenu.vue +46 -23
  34. package/dist/runtime/components/forms/SelectMenu.vue.d.ts +12 -11
  35. package/dist/runtime/components/forms/Textarea.vue.d.ts +3 -3
  36. package/dist/runtime/components/forms/Toggle.vue.d.ts +1 -1
  37. package/dist/runtime/components/layout/Card.vue.d.ts +1 -1
  38. package/dist/runtime/components/layout/Container.vue.d.ts +1 -1
  39. package/dist/runtime/components/layout/Divider.vue.d.ts +19 -19
  40. package/dist/runtime/components/layout/Skeleton.vue.d.ts +1 -1
  41. package/dist/runtime/components/navigation/Breadcrumb.vue.d.ts +3 -3
  42. package/dist/runtime/components/navigation/CommandPalette.vue.d.ts +26 -26
  43. package/dist/runtime/components/navigation/CommandPaletteGroup.vue.d.ts +3 -3
  44. package/dist/runtime/components/navigation/HorizontalNavigation.vue.d.ts +164 -22
  45. package/dist/runtime/components/navigation/Pagination.vue.d.ts +38 -38
  46. package/dist/runtime/components/navigation/Tabs.vue.d.ts +2 -2
  47. package/dist/runtime/components/navigation/VerticalNavigation.vue.d.ts +186 -44
  48. package/dist/runtime/components/overlays/ContextMenu.vue.d.ts +1 -1
  49. package/dist/runtime/components/overlays/Notification.vue +6 -2
  50. package/dist/runtime/components/overlays/Notification.vue.d.ts +50 -41
  51. package/dist/runtime/components/overlays/Notifications.vue +2 -2
  52. package/dist/runtime/components/overlays/Notifications.vue.d.ts +55 -46
  53. package/dist/runtime/components/overlays/Popover.vue.d.ts +1 -1
  54. package/dist/runtime/components/overlays/Tooltip.vue.d.ts +2 -2
  55. package/dist/runtime/types/button.d.ts +1 -0
  56. package/dist/runtime/types/checkbox.d.ts +3 -0
  57. package/dist/runtime/types/divider.d.ts +1 -1
  58. package/dist/runtime/types/index.d.ts +1 -0
  59. package/dist/runtime/types/index.js +1 -0
  60. package/dist/runtime/types/link.d.ts +1 -1
  61. package/dist/runtime/types/utils.d.ts +1 -1
  62. package/dist/runtime/ui.config/data/table.d.ts +9 -8
  63. package/dist/runtime/ui.config/elements/accordion.d.ts +1 -1
  64. package/dist/runtime/ui.config/elements/alert.d.ts +5 -4
  65. package/dist/runtime/ui.config/elements/badge.d.ts +15 -0
  66. package/dist/runtime/ui.config/elements/badge.js +15 -0
  67. package/dist/runtime/ui.config/elements/carousel.d.ts +3 -2
  68. package/dist/runtime/ui.config/elements/dropdown.d.ts +2 -1
  69. package/dist/runtime/ui.config/forms/inputMenu.d.ts +2 -1
  70. package/dist/runtime/ui.config/forms/selectMenu.d.ts +1 -1
  71. package/dist/runtime/ui.config/layout/divider.d.ts +4 -3
  72. package/dist/runtime/ui.config/navigation/commandPalette.d.ts +2 -1
  73. package/dist/runtime/ui.config/navigation/horizontalNavigation.d.ts +5 -4
  74. package/dist/runtime/ui.config/navigation/pagination.d.ts +7 -6
  75. package/dist/runtime/ui.config/navigation/verticalNavigation.d.ts +5 -4
  76. package/dist/runtime/ui.config/overlays/notification.d.ts +6 -5
  77. package/package.json +20 -17
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![nuxt-ui.png](https://repository-images.githubusercontent.com/428329515/43fec891-9030-4601-8233-5d45ba5c6013)](https://ui.nuxt.com)
1
+ [![nuxt-ui.png](https://volta.s3.fr-par.scw.cloud/nuxt_ui_social_card_531d133fa2.png)](https://ui.nuxt.com)
2
2
 
3
3
  # Nuxt UI
4
4
 
@@ -20,7 +20,7 @@ Its goal is to provide everything related to UI when building a Nuxt app. This i
20
20
  - Keyboard shortcuts
21
21
  - Bundled icons
22
22
  - Fully typed
23
- - [Figma Kit](https://www.figma.com/community/file/1288455405058138934)
23
+ - [Figma Kit](https://www.figma.com/community/file/1436401057300493073)
24
24
 
25
25
  Read more on [ui.nuxt.com](https://ui.nuxt.com)
26
26
 
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/ui",
3
- "version": "2.19.1",
3
+ "version": "2.20.0",
4
4
  "configKey": "ui",
5
5
  "compatibility": {
6
6
  "nuxt": ">=3.10.0"
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.19.1";
17
+ const version = "2.20.0";
18
18
 
19
19
  function createTemplates(nuxt = useNuxt()) {
20
20
  const template = addTemplate({
@@ -8,28 +8,27 @@
8
8
  </slot>
9
9
  <thead :class="ui.thead">
10
10
  <tr :class="ui.tr.base">
11
- <th v-if="modelValue" scope="col" :class="ui.checkbox.padding">
12
- <UCheckbox
13
- :model-value="isAllRowChecked"
14
- :indeterminate="indeterminate"
15
- v-bind="ui.default.checkbox"
16
- aria-label="Select all"
17
- @change="onChange"
18
- />
19
- </th>
20
-
21
11
  <th v-if="expand" scope="col" :class="ui.tr.base">
22
12
  <span class="sr-only">Expand</span>
23
13
  </th>
24
-
25
14
  <th
26
15
  v-for="(column, index) in columns"
27
16
  :key="index"
28
17
  scope="col"
29
- :class="[ui.th.base, ui.th.padding, ui.th.color, ui.th.font, ui.th.size, column.class]"
18
+ :class="[ui.th.base, ui.th.padding, ui.th.color, ui.th.font, ui.th.size, column.key === 'select' && ui.checkbox.padding, column.class]"
30
19
  :aria-sort="getAriaSort(column)"
31
20
  >
32
- <slot :name="`${column.key}-header`" :column="column" :sort="sort" :on-sort="onSort">
21
+ <slot v-if="!singleSelect && modelValue && (column.key === 'select' || shouldRenderColumnInFirstPlace(index, 'select'))" name="select-header" :indeterminate="indeterminate" :checked="isAllRowChecked" :change="onChange">
22
+ <UCheckbox
23
+ :model-value="isAllRowChecked"
24
+ :indeterminate="indeterminate"
25
+ v-bind="ui.default.checkbox"
26
+ aria-label="Select all"
27
+ @change="onChange"
28
+ />
29
+ </slot>
30
+
31
+ <slot v-else :name="`${column.key}-header`" :column="column" :sort="sort" :on-sort="onSort">
33
32
  <UButton
34
33
  v-if="column.sortable"
35
34
  v-bind="{ ...(ui.default.sortButton || {}), ...sortButton }"
@@ -77,16 +76,7 @@
77
76
 
78
77
  <template v-else>
79
78
  <template v-for="(row, index) in rows" :key="index">
80
- <tr :class="[ui.tr.base, isSelected(row) && ui.tr.selected, isExpanded(row) && ui.tr.expanded, $attrs.onSelect && ui.tr.active, row?.class]" @click="() => onSelect(row)">
81
- <td v-if="modelValue" :class="ui.checkbox.padding">
82
- <UCheckbox
83
- :model-value="isSelected(row)"
84
- v-bind="ui.default.checkbox"
85
- aria-label="Select row"
86
- @change="onChangeCheckbox($event, row)"
87
- @click.capture.stop="() => onSelect(row)"
88
- />
89
- </td>
79
+ <tr :class="[ui.tr.base, isSelected(row) && ui.tr.selected, isExpanded(row) && ui.tr.expanded, $attrs.onSelect && ui.tr.active, row?.class]" @click="() => onSelect(row)" @contextmenu="(event) => onContextmenu(event, row)">
90
80
  <td
91
81
  v-if="expand"
92
82
  :class="[ui.td.base, ui.td.padding, ui.td.color, ui.td.font, ui.td.size]"
@@ -102,8 +92,26 @@
102
92
  @click.capture.stop="toggleOpened(row)"
103
93
  />
104
94
  </td>
105
- <td v-for="(column, subIndex) in columns" :key="subIndex" :class="[ui.td.base, ui.td.padding, ui.td.color, ui.td.font, ui.td.size, column?.rowClass, row[column.key]?.class]">
106
- <slot :name="`${column.key}-data`" :column="column" :row="row" :index="index" :get-row-data="(defaultValue) => getRowData(row, column.key, defaultValue)">
95
+ <td v-for="(column, subIndex) in columns" :key="subIndex" :class="[ui.td.base, ui.td.padding, ui.td.color, ui.td.font, ui.td.size, column?.rowClass, row[column.key]?.class, column.key === 'select' && ui.checkbox.padding]">
96
+ <slot v-if="modelValue && (column.key === 'select' || shouldRenderColumnInFirstPlace(subIndex, 'select')) " name="select-data" :checked="isSelected(row)" :change="(ev: boolean) => onChangeCheckbox(ev, row)">
97
+ <UCheckbox
98
+ :model-value="isSelected(row)"
99
+ v-bind="ui.default.checkbox"
100
+ aria-label="Select row"
101
+ @change="onChangeCheckbox($event, row)"
102
+ @click.capture.stop="() => onSelect(row)"
103
+ />
104
+ </slot>
105
+
106
+ <slot
107
+ v-else
108
+ :key="retriggerSlot"
109
+ :name="`${column.key}-data`"
110
+ :column="column"
111
+ :row="row"
112
+ :index="index"
113
+ :get-row-data="(defaultValue) => getRowData(row, column.key, defaultValue)"
114
+ >
107
115
  {{ getRowData(row, column.key) }}
108
116
  </slot>
109
117
  </td>
@@ -125,10 +133,11 @@
125
133
  </template>
126
134
 
127
135
  <script>
128
- import { computed, defineComponent, toRaw, toRef } from "vue";
136
+ import { computed, defineComponent, ref, toRaw, toRef, watch } from "vue";
129
137
  import { upperFirst } from "scule";
130
138
  import { defu } from "defu";
131
139
  import { useVModel } from "@vueuse/core";
140
+ import { isEqual } from "ohash";
132
141
  import UIcon from "../elements/Icon.vue";
133
142
  import UButton from "../elements/Button.vue";
134
143
  import UProgress from "../elements/Progress.vue";
@@ -139,7 +148,7 @@ import appConfig from "#build/app.config";
139
148
  import { table } from "#ui/ui.config";
140
149
  const config = mergeConfig(appConfig.ui.strategy, appConfig.ui.table, table);
141
150
  function defaultComparator(a, z) {
142
- return JSON.stringify(a) === JSON.stringify(z);
151
+ return isEqual(a, z);
143
152
  }
144
153
  function defaultSort(a, b, direction) {
145
154
  if (a === b) {
@@ -151,6 +160,12 @@ function defaultSort(a, b, direction) {
151
160
  return a > b ? -1 : 1;
152
161
  }
153
162
  }
163
+ function getStringifiedSet(arr) {
164
+ return new Set(arr.map((item) => JSON.stringify(item)));
165
+ }
166
+ function accessor(key) {
167
+ return (obj) => get(obj, key);
168
+ }
154
169
  export default defineComponent({
155
170
  components: {
156
171
  UIcon,
@@ -239,9 +254,13 @@ export default defineComponent({
239
254
  multipleExpand: {
240
255
  type: Boolean,
241
256
  default: true
257
+ },
258
+ singleSelect: {
259
+ type: Boolean,
260
+ default: false
242
261
  }
243
262
  },
244
- emits: ["update:modelValue", "update:sort", "update:expand"],
263
+ emits: ["update:modelValue", "update:sort", "update:expand", "select:all"],
245
264
  setup(props, { emit, attrs: $attrs }) {
246
265
  const { ui, attrs } = useUI("table", toRef(props, "ui"), config, toRef(props, "class"));
247
266
  const columns = computed(() => props.columns ?? Object.keys(props.rows[0] ?? {}).map((key) => ({ key, label: upperFirst(key), sortable: false, class: void 0, sort: defaultSort })));
@@ -253,6 +272,7 @@ export default defineComponent({
253
272
  row: null
254
273
  })
255
274
  });
275
+ const retriggerSlot = ref(null);
256
276
  const savedSort = { column: sort.value.column, direction: null };
257
277
  const rows = computed(() => {
258
278
  if (!sort.value?.column || props.sortMode === "manual") {
@@ -274,7 +294,6 @@ export default defineComponent({
274
294
  emit("update:modelValue", value);
275
295
  }
276
296
  });
277
- const getStringifiedSet = (arr) => new Set(arr.map((item) => JSON.stringify(item)));
278
297
  const totalRows = computed(() => props.rows.length);
279
298
  const countCheckedRow = computed(() => {
280
299
  const selectedData = getStringifiedSet(selected.value);
@@ -301,9 +320,6 @@ export default defineComponent({
301
320
  }
302
321
  return props.by(a, z);
303
322
  }
304
- function accessor(key) {
305
- return (obj) => get(obj, key);
306
- }
307
323
  function isSelected(row) {
308
324
  if (!props.modelValue) {
309
325
  return false;
@@ -323,11 +339,21 @@ export default defineComponent({
323
339
  }
324
340
  }
325
341
  function onSelect(row) {
342
+ const selection = window.getSelection();
343
+ if (selection && selection.toString().length > 0) {
344
+ return;
345
+ }
326
346
  if (!$attrs.onSelect) {
327
347
  return;
328
348
  }
329
349
  $attrs.onSelect(row);
330
350
  }
351
+ function onContextmenu(event, row) {
352
+ if (!$attrs.onContextmenu) {
353
+ return;
354
+ }
355
+ $attrs.onContextmenu(event, row);
356
+ }
331
357
  function selectAllRows() {
332
358
  const newSelected = [...selected.value];
333
359
  props.rows.forEach((row) => {
@@ -343,10 +369,11 @@ export default defineComponent({
343
369
  } else {
344
370
  selected.value = [];
345
371
  }
372
+ emit("select:all", checked);
346
373
  }
347
374
  function onChangeCheckbox(checked, row) {
348
375
  if (checked) {
349
- selected.value.push(row);
376
+ selected.value = props.singleSelect ? [row] : [...selected.value, row];
350
377
  } else {
351
378
  const index = selected.value.findIndex((item) => compare(item, row));
352
379
  selected.value.splice(index, 1);
@@ -358,6 +385,12 @@ export default defineComponent({
358
385
  function isExpanded(row) {
359
386
  return expand.value?.openedRows ? expand.value.openedRows.some((openedRow) => compare(openedRow, row)) : false;
360
387
  }
388
+ function shouldRenderColumnInFirstPlace(index, key) {
389
+ if (!props.columns) {
390
+ return index === 0;
391
+ }
392
+ return index === 0 && !props.columns.find((col) => col.key === key);
393
+ }
361
394
  function toggleOpened(row) {
362
395
  expand.value = {
363
396
  openedRows: isExpanded(row) ? expand.value.openedRows.filter((v) => !compare(v, row)) : props.multipleExpand ? [...expand.value.openedRows, row] : [row],
@@ -379,6 +412,11 @@ export default defineComponent({
379
412
  }
380
413
  return void 0;
381
414
  }
415
+ watch(rows, () => {
416
+ retriggerSlot.value = /* @__PURE__ */ new Date();
417
+ }, {
418
+ deep: true
419
+ });
382
420
  return {
383
421
  // eslint-disable-next-line vue/no-dupe-keys
384
422
  ui,
@@ -400,11 +438,14 @@ export default defineComponent({
400
438
  isSelected,
401
439
  onSort,
402
440
  onSelect,
441
+ onContextmenu,
403
442
  onChange,
404
443
  getRowData,
405
444
  toggleOpened,
406
445
  getAriaSort,
407
- isExpanded
446
+ isExpanded,
447
+ shouldRenderColumnInFirstPlace,
448
+ retriggerSlot
408
449
  };
409
450
  }
410
451
  });
@@ -53,23 +53,23 @@ declare const config: {
53
53
  icon: string;
54
54
  trailing: boolean;
55
55
  square: boolean;
56
- color: "gray";
57
- variant: "ghost";
56
+ color: import("../../types/button").ButtonColor;
57
+ variant: import("../../types/button").ButtonVariant;
58
58
  class: string;
59
59
  };
60
60
  expandButton: {
61
61
  icon: string;
62
- color: "gray";
63
- variant: "ghost";
64
- size: "xs";
62
+ color: import("../../types/button").ButtonColor;
63
+ variant: import("../../types/button").ButtonVariant;
64
+ size: import("../../types/button").ButtonSize;
65
65
  class: string;
66
66
  };
67
67
  checkbox: {
68
- color: "primary";
68
+ color: import("../../types/checkbox").CheckboxColor;
69
69
  };
70
70
  progress: {
71
- color: "primary";
72
- animation: "carousel";
71
+ color: ProgressColor;
72
+ animation: ProgressAnimation;
73
73
  };
74
74
  loadingState: {
75
75
  icon: string;
@@ -142,7 +142,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
142
142
  type: PropType<{
143
143
  icon: string;
144
144
  label: string;
145
- }>;
145
+ } | null>;
146
146
  default: () => {
147
147
  icon: string;
148
148
  label: string;
@@ -168,8 +168,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
168
168
  animation: ProgressAnimation;
169
169
  }>;
170
170
  default: () => {
171
- color: "primary";
172
- animation: "carousel";
171
+ color: ProgressColor;
172
+ animation: ProgressAnimation;
173
173
  };
174
174
  };
175
175
  class: {
@@ -186,6 +186,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
186
186
  type: BooleanConstructor;
187
187
  default: boolean;
188
188
  };
189
+ singleSelect: {
190
+ type: BooleanConstructor;
191
+ default: boolean;
192
+ };
189
193
  }>, {
190
194
  ui: import("vue").ComputedRef<{
191
195
  wrapper: string;
@@ -240,23 +244,23 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
240
244
  icon: string;
241
245
  trailing: boolean;
242
246
  square: boolean;
243
- color: "gray";
244
- variant: "ghost";
247
+ color: import("../../types/button").ButtonColor;
248
+ variant: import("../../types/button").ButtonVariant;
245
249
  class: string;
246
250
  };
247
251
  expandButton: {
248
252
  icon: string;
249
- color: "gray";
250
- variant: "ghost";
251
- size: "xs";
253
+ color: import("../../types/button").ButtonColor;
254
+ variant: import("../../types/button").ButtonVariant;
255
+ size: import("../../types/button").ButtonSize;
252
256
  class: string;
253
257
  };
254
258
  checkbox: {
255
- color: "primary";
259
+ color: import("../../types/checkbox").CheckboxColor;
256
260
  };
257
261
  progress: {
258
- color: "primary";
259
- animation: "carousel";
262
+ color: ProgressColor;
263
+ animation: ProgressAnimation;
260
264
  };
261
265
  loadingState: {
262
266
  icon: string;
@@ -298,12 +302,15 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
298
302
  direction?: "asc" | "desc";
299
303
  }) => void;
300
304
  onSelect: (row: TableRow) => void;
305
+ onContextmenu: (event: any, row: any) => void;
301
306
  onChange: (checked: boolean) => void;
302
307
  getRowData: (row: TableRow, rowKey: string | string[], defaultValue?: any) => any;
303
308
  toggleOpened: (row: TableRow) => void;
304
309
  getAriaSort: (column: TableColumn) => AriaAttributes["aria-sort"];
305
310
  isExpanded: (row: TableRow) => boolean;
306
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:sort" | "update:expand")[], "update:modelValue" | "update:sort" | "update:expand", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
311
+ shouldRenderColumnInFirstPlace: (index: number, key: string) => boolean;
312
+ retriggerSlot: import("vue").Ref<any, any>;
313
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:sort" | "update:expand" | "select:all")[], "update:modelValue" | "update:sort" | "update:expand" | "select:all", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
307
314
  modelValue: {
308
315
  type: ArrayConstructor;
309
316
  default: any;
@@ -363,7 +370,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
363
370
  type: PropType<{
364
371
  icon: string;
365
372
  label: string;
366
- }>;
373
+ } | null>;
367
374
  default: () => {
368
375
  icon: string;
369
376
  label: string;
@@ -389,8 +396,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
389
396
  animation: ProgressAnimation;
390
397
  }>;
391
398
  default: () => {
392
- color: "primary";
393
- animation: "carousel";
399
+ color: ProgressColor;
400
+ animation: ProgressAnimation;
394
401
  };
395
402
  };
396
403
  class: {
@@ -407,22 +414,21 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
407
414
  type: BooleanConstructor;
408
415
  default: boolean;
409
416
  };
417
+ singleSelect: {
418
+ type: BooleanConstructor;
419
+ default: boolean;
420
+ };
410
421
  }>> & Readonly<{
411
422
  "onUpdate:modelValue"?: (...args: any[]) => any;
412
423
  "onUpdate:sort"?: (...args: any[]) => any;
413
424
  "onUpdate:expand"?: (...args: any[]) => any;
425
+ "onSelect:all"?: (...args: any[]) => any;
414
426
  }>, {
415
427
  sort: {
416
428
  column: string;
417
429
  direction: "asc" | "desc";
418
430
  };
419
431
  class: any;
420
- caption: string;
421
- columns: TableColumn[];
422
- progress: {
423
- color: ProgressColor;
424
- animation: ProgressAnimation;
425
- };
426
432
  ui: {
427
433
  wrapper?: string;
428
434
  base?: string;
@@ -476,23 +482,23 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
476
482
  icon: string;
477
483
  trailing: boolean;
478
484
  square: boolean;
479
- color: "gray";
480
- variant: "ghost";
485
+ color: import("../../types/button").ButtonColor;
486
+ variant: import("../../types/button").ButtonVariant;
481
487
  class: string;
482
488
  };
483
489
  expandButton: {
484
490
  icon: string;
485
- color: "gray";
486
- variant: "ghost";
487
- size: "xs";
491
+ color: import("../../types/button").ButtonColor;
492
+ variant: import("../../types/button").ButtonVariant;
493
+ size: import("../../types/button").ButtonSize;
488
494
  class: string;
489
495
  };
490
496
  checkbox: {
491
- color: "primary";
497
+ color: import("../../types/checkbox").CheckboxColor;
492
498
  };
493
499
  progress: {
494
- color: "primary";
495
- animation: "carousel";
500
+ color: ProgressColor;
501
+ animation: ProgressAnimation;
496
502
  };
497
503
  loadingState: {
498
504
  icon: string;
@@ -508,6 +514,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
508
514
  } & {
509
515
  strategy?: Strategy;
510
516
  };
517
+ caption: string;
518
+ columns: TableColumn[];
519
+ progress: {
520
+ color: ProgressColor;
521
+ animation: ProgressAnimation;
522
+ };
511
523
  modelValue: unknown[];
512
524
  loading: boolean;
513
525
  loadingState: {
@@ -528,6 +540,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
528
540
  sortDescIcon: string;
529
541
  expandButton: Button;
530
542
  multipleExpand: boolean;
543
+ singleSelect: boolean;
531
544
  }, {}, {
532
545
  UIcon: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
533
546
  name: {
@@ -1125,23 +1138,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1125
1138
  class: any;
1126
1139
  to: string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric;
1127
1140
  disabled: boolean;
1128
- truncate: boolean;
1129
- target: "_blank" | "_parent" | "_self" | "_top" | (string & {});
1130
- activeClass: string;
1131
- exactActiveClass: string;
1132
- ariaCurrentValue: "page" | "step" | "location" | "date" | "time" | "true" | "false";
1133
- replace: boolean;
1134
- noRel: boolean;
1135
- prefetch: boolean;
1136
- noPrefetch: boolean;
1137
- prefetchedClass: string;
1138
- external: boolean;
1139
- leading: boolean;
1140
- color: import("../../types/button").ButtonColor;
1141
- variant: import("../../types/button").ButtonVariant;
1142
- href: string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric;
1143
- rel: any;
1144
- label: string;
1145
1141
  ui: {
1146
1142
  base?: string;
1147
1143
  font?: string;
@@ -1226,6 +1222,23 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1226
1222
  } & {
1227
1223
  strategy?: Strategy;
1228
1224
  };
1225
+ color: import("../../types/button").ButtonColor;
1226
+ variant: import("../../types/button").ButtonVariant;
1227
+ truncate: boolean;
1228
+ target: "_blank" | "_parent" | "_self" | "_top" | (string & {});
1229
+ activeClass: string;
1230
+ exactActiveClass: string;
1231
+ ariaCurrentValue: "page" | "step" | "location" | "date" | "time" | "true" | "false";
1232
+ replace: boolean;
1233
+ noRel: boolean;
1234
+ prefetch: boolean;
1235
+ noPrefetch: boolean;
1236
+ prefetchedClass: string;
1237
+ external: boolean;
1238
+ leading: boolean;
1239
+ href: string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric;
1240
+ rel: any;
1241
+ label: string;
1229
1242
  icon: string;
1230
1243
  block: boolean;
1231
1244
  square: boolean;
@@ -1303,7 +1316,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1303
1316
  default: boolean;
1304
1317
  };
1305
1318
  exactQuery: {
1306
- type: BooleanConstructor;
1319
+ type: PropType<boolean | "partial">;
1307
1320
  default: boolean;
1308
1321
  };
1309
1322
  exactHash: {
@@ -1406,7 +1419,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1406
1419
  default: boolean;
1407
1420
  };
1408
1421
  exactQuery: {
1409
- type: BooleanConstructor;
1422
+ type: PropType<boolean | "partial">;
1410
1423
  default: boolean;
1411
1424
  };
1412
1425
  exactHash: {
@@ -1499,7 +1512,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1499
1512
  as: string;
1500
1513
  active: boolean;
1501
1514
  exact: boolean;
1502
- exactQuery: boolean;
1515
+ exactQuery: boolean | "partial";
1503
1516
  exactHash: boolean;
1504
1517
  inactiveClass: string;
1505
1518
  href: string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric;
@@ -1846,11 +1859,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1846
1859
  default: () => {};
1847
1860
  };
1848
1861
  }>> & Readonly<{}>, {
1849
- size: "xs" | "sm" | "2xs" | "md" | "lg" | "xl" | "2xl";
1862
+ size: "sm" | "xs" | "2xs" | "md" | "lg" | "xl" | "2xl";
1850
1863
  class: any;
1851
1864
  max: number | any[];
1852
1865
  animation: "carousel" | "carousel-inverse" | "swing" | "elastic";
1853
- color: "primary" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose";
1854
1866
  ui: {
1855
1867
  wrapper?: string;
1856
1868
  indicator?: DeepPartial<{
@@ -1929,6 +1941,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1929
1941
  } & {
1930
1942
  strategy?: Strategy;
1931
1943
  };
1944
+ color: "primary" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose";
1932
1945
  value: number;
1933
1946
  indicator: boolean;
1934
1947
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -2113,8 +2126,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
2113
2126
  required: boolean;
2114
2127
  class: any;
2115
2128
  disabled: boolean;
2116
- color: "primary" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose";
2117
- label: string;
2118
2129
  ui: {
2119
2130
  wrapper?: string;
2120
2131
  container?: string;
@@ -2137,6 +2148,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
2137
2148
  } & {
2138
2149
  strategy?: Strategy;
2139
2150
  };
2151
+ color: "primary" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose";
2152
+ label: string;
2140
2153
  id: string;
2141
2154
  modelValue: boolean | any[];
2142
2155
  value: string | number | boolean | Record<string, any>;
@@ -120,7 +120,7 @@ export default defineComponent({
120
120
  default: () => ({})
121
121
  }
122
122
  },
123
- emits: ["open"],
123
+ emits: ["open", "close"],
124
124
  setup(props, { emit }) {
125
125
  const { ui, attrs } = useUI("accordion", toRef(props, "ui"), config, toRef(props, "class"));
126
126
  const uiButton = computed(() => configButton);
@@ -132,6 +132,8 @@ export default defineComponent({
132
132
  const isOpenAfter = newValue[index];
133
133
  if (!isOpenBefore && isOpenAfter) {
134
134
  emit("open", index);
135
+ } else if (isOpenBefore && !isOpenAfter) {
136
+ emit("close", index);
135
137
  }
136
138
  }
137
139
  }, { immediate: true });