@nuxt/ui 2.21.1 → 2.22.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 (81) hide show
  1. package/README.md +22 -7
  2. package/dist/module.d.mts +2 -1
  3. package/dist/module.json +3 -3
  4. package/dist/module.mjs +2 -11
  5. package/dist/runtime/components/data/Table.vue +16 -13
  6. package/dist/runtime/components/data/Table.vue.d.ts +44 -347
  7. package/dist/runtime/components/elements/Accordion.vue +4 -4
  8. package/dist/runtime/components/elements/Accordion.vue.d.ts +16 -16
  9. package/dist/runtime/components/elements/Alert.vue +6 -6
  10. package/dist/runtime/components/elements/Alert.vue.d.ts +38 -38
  11. package/dist/runtime/components/elements/Avatar.vue.d.ts +2 -2
  12. package/dist/runtime/components/elements/Badge.vue.d.ts +2 -2
  13. package/dist/runtime/components/elements/Button.vue.d.ts +6 -6
  14. package/dist/runtime/components/elements/Carousel.vue +3 -3
  15. package/dist/runtime/components/elements/Carousel.vue.d.ts +22 -22
  16. package/dist/runtime/components/elements/Chip.vue.d.ts +1 -1
  17. package/dist/runtime/components/elements/Dropdown.vue +1 -1
  18. package/dist/runtime/components/elements/Dropdown.vue.d.ts +19 -19
  19. package/dist/runtime/components/elements/Kbd.vue.d.ts +1 -1
  20. package/dist/runtime/components/elements/Link.vue +7 -7
  21. package/dist/runtime/components/elements/Link.vue.d.ts +2 -2
  22. package/dist/runtime/components/elements/Meter.vue +1 -1
  23. package/dist/runtime/components/elements/Meter.vue.d.ts +3 -3
  24. package/dist/runtime/components/elements/MeterGroup.d.ts +1 -1
  25. package/dist/runtime/components/elements/Progress.vue +1 -1
  26. package/dist/runtime/components/elements/Progress.vue.d.ts +5 -5
  27. package/dist/runtime/components/forms/Checkbox.vue.d.ts +3 -3
  28. package/dist/runtime/components/forms/Form.vue +0 -45
  29. package/dist/runtime/components/forms/Form.vue.d.ts +3 -7
  30. package/dist/runtime/components/forms/FormGroup.vue.d.ts +2 -2
  31. package/dist/runtime/components/forms/Input.vue +3 -3
  32. package/dist/runtime/components/forms/Input.vue.d.ts +3 -3
  33. package/dist/runtime/components/forms/InputMenu.vue +2 -2
  34. package/dist/runtime/components/forms/InputMenu.vue.d.ts +16 -16
  35. package/dist/runtime/components/forms/Radio.vue.d.ts +3 -3
  36. package/dist/runtime/components/forms/RadioGroup.vue.d.ts +6 -6
  37. package/dist/runtime/components/forms/Range.vue.d.ts +3 -3
  38. package/dist/runtime/components/forms/Select.vue +2 -2
  39. package/dist/runtime/components/forms/Select.vue.d.ts +2 -2
  40. package/dist/runtime/components/forms/SelectMenu.vue +4 -4
  41. package/dist/runtime/components/forms/SelectMenu.vue.d.ts +16 -16
  42. package/dist/runtime/components/forms/Textarea.vue.d.ts +3 -3
  43. package/dist/runtime/components/forms/Toggle.vue.d.ts +2 -2
  44. package/dist/runtime/components/layout/Card.vue.d.ts +1 -1
  45. package/dist/runtime/components/layout/Container.vue.d.ts +1 -1
  46. package/dist/runtime/components/layout/Divider.vue.d.ts +15 -15
  47. package/dist/runtime/components/layout/Skeleton.vue.d.ts +1 -1
  48. package/dist/runtime/components/navigation/Breadcrumb.vue +1 -1
  49. package/dist/runtime/components/navigation/Breadcrumb.vue.d.ts +3 -3
  50. package/dist/runtime/components/navigation/CommandPalette.vue +1 -1
  51. package/dist/runtime/components/navigation/CommandPalette.vue.d.ts +33 -33
  52. package/dist/runtime/components/navigation/CommandPaletteGroup.vue.d.ts +30 -30
  53. package/dist/runtime/components/navigation/HorizontalNavigation.vue +5 -5
  54. package/dist/runtime/components/navigation/HorizontalNavigation.vue.d.ts +36 -36
  55. package/dist/runtime/components/navigation/Pagination.vue +5 -5
  56. package/dist/runtime/components/navigation/Pagination.vue.d.ts +34 -34
  57. package/dist/runtime/components/navigation/Tabs.vue.d.ts +1 -1
  58. package/dist/runtime/components/navigation/VerticalNavigation.vue +5 -5
  59. package/dist/runtime/components/navigation/VerticalNavigation.vue.d.ts +58 -58
  60. package/dist/runtime/components/overlays/ContextMenu.vue.d.ts +1 -1
  61. package/dist/runtime/components/overlays/Modal.vue +6 -6
  62. package/dist/runtime/components/overlays/Modal.vue.d.ts +3 -3
  63. package/dist/runtime/components/overlays/Modals.client.vue +5 -7
  64. package/dist/runtime/components/overlays/Modals.client.vue.d.ts +2 -0
  65. package/dist/runtime/components/overlays/Notification.vue +6 -6
  66. package/dist/runtime/components/overlays/Notification.vue.d.ts +42 -42
  67. package/dist/runtime/components/overlays/Notifications.vue.d.ts +67 -67
  68. package/dist/runtime/components/overlays/Popover.vue.d.ts +2 -2
  69. package/dist/runtime/components/overlays/Slideover.vue.d.ts +3 -3
  70. package/dist/runtime/components/overlays/Slideovers.client.vue +5 -7
  71. package/dist/runtime/components/overlays/Slideovers.client.vue.d.ts +2 -0
  72. package/dist/runtime/components/overlays/Tooltip.vue.d.ts +5 -5
  73. package/dist/runtime/composables/useFormGroup.d.ts +1 -1
  74. package/dist/runtime/composables/useToast.d.ts +4 -4
  75. package/dist/runtime/ui.config/forms/selectMenu.d.ts +1 -1
  76. package/dist/runtime/utils/link.js +4 -2
  77. package/dist/types.d.mts +3 -1
  78. package/package.json +60 -35
  79. package/dist/module.cjs +0 -5
  80. package/dist/module.d.ts +0 -40
  81. package/dist/types.d.ts +0 -1
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![nuxt-ui.png](https://volta.s3.fr-par.scw.cloud/nuxt_ui_social_card_531d133fa2.png)](https://ui.nuxt.com)
1
+ [![nuxt-ui.png](https://volta.s3.fr-par.scw.cloud/nuxt_ui_social_card_531d133fa2.png)](https://ui2.nuxt.com)
2
2
 
3
3
  # Nuxt UI
4
4
 
@@ -22,17 +22,32 @@ Its goal is to provide everything related to UI when building a Nuxt app. This i
22
22
  - Fully typed
23
23
  - [Figma Kit](https://www.figma.com/community/file/1436401057300493073)
24
24
 
25
- Read more on [ui.nuxt.com](https://ui.nuxt.com)
25
+ Read more on [ui2.nuxt.com](https://ui2.nuxt.com)
26
26
 
27
27
  ## Installation
28
28
 
29
29
  ```bash
30
- npx nuxi@latest module add ui
30
+ # npm
31
+ npm install @nuxt/ui@2
32
+ # yarn
33
+ yarn add @nuxt/ui@2
34
+ # pnpm
35
+ pnpm add @nuxt/ui@2
36
+ # bun
37
+ bun add @nuxt/ui@2
38
+ ```
39
+
40
+ Next, register the `@nuxt/ui` module in your `nuxt.config.ts`:
41
+
42
+ ```ts
43
+ export default defineNuxtConfig({
44
+ modules: ['@nuxt/ui']
45
+ })
31
46
  ```
32
47
 
33
48
  ## Documentation
34
49
 
35
- Visit https://ui.nuxt.com to explore the documentation.
50
+ Visit https://ui2.nuxt.com to explore the documentation.
36
51
 
37
52
  ## Credits
38
53
 
@@ -49,15 +64,15 @@ Visit https://ui.nuxt.com to explore the documentation.
49
64
  Thank you for considering contributing to Nuxt UI. Here are a few ways you can get involved:
50
65
 
51
66
  - Reporting Bugs: If you come across any bugs or issues, please check out the reporting bugs guide to learn how to submit a bug report.
52
- - Suggestions: Have any thoughts to enhance Nuxt UI? We'd love to hear them! Check out the [contribution guide](https://ui.nuxt.com/getting-started/contributing) to share your suggestions.
67
+ - Suggestions: Have any thoughts to enhance Nuxt UI? We'd love to hear them! Check out the [contribution guide](https://ui2.nuxt.com/getting-started/contributing) to share your suggestions.
53
68
 
54
69
  ## Local Development
55
70
 
56
- Follow the docs to [Set up your local development environment](https://ui.nuxt.com/getting-started/contributing#_2-local-development-setup) and contribute.
71
+ Follow the docs to [Set up your local development environment](https://ui2.nuxt.com/getting-started/contributing#_2-local-development-setup) and contribute.
57
72
 
58
73
  ## License
59
74
 
60
- Licensed under the [MIT license](https://github.com/nuxt/ui/blob/dev/LICENSE.md).
75
+ Licensed under the [MIT license](https://github.com/nuxt/ui/blob/v2/LICENSE.md).
61
76
 
62
77
  <!-- Badges -->
63
78
  [npm-version-src]: https://img.shields.io/npm/v/@nuxt/ui/latest.svg?style=flat&colorA=18181B&colorB=28CF8D
package/dist/module.d.mts CHANGED
@@ -37,4 +37,5 @@ interface ModuleOptions {
37
37
  }
38
38
  declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
39
39
 
40
- export { type ModuleOptions, _default as default };
40
+ export { _default as default };
41
+ export type { ModuleOptions };
package/dist/module.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@nuxt/ui",
3
- "version": "2.21.1",
3
+ "version": "2.22.0",
4
4
  "configKey": "ui",
5
5
  "compatibility": {
6
6
  "nuxt": ">=3.10.0"
7
7
  },
8
8
  "builder": {
9
- "@nuxt/module-builder": "0.8.4",
10
- "unbuild": "2.0.0"
9
+ "@nuxt/module-builder": "1.0.1",
10
+ "unbuild": "3.5.0"
11
11
  }
12
12
  }
package/dist/module.mjs CHANGED
@@ -1,20 +1,11 @@
1
1
  import { createRequire } from 'node:module';
2
- import { addTemplate, useNuxt, installModule, createResolver, defineNuxtModule, addPlugin, addComponentsDir, addImportsDir } from '@nuxt/kit';
2
+ import { useNuxt, addTemplate, createResolver, installModule, defineNuxtModule, addPlugin, addComponentsDir, addImportsDir } from '@nuxt/kit';
3
3
  import { join } from 'pathe';
4
4
  import { defu } from 'defu';
5
5
  import { setGlobalColors } from '../dist/runtime/utils/colors.js';
6
6
 
7
-
8
-
9
- // -- Unbuild CommonJS Shims --
10
- import __cjs_url__ from 'url';
11
- import __cjs_path__ from 'path';
12
- import __cjs_mod__ from 'module';
13
- const __filename = __cjs_url__.fileURLToPath(import.meta.url);
14
- const __dirname = __cjs_path__.dirname(__filename);
15
- const require = __cjs_mod__.createRequire(import.meta.url);
16
7
  const name = "@nuxt/ui";
17
- const version = "2.21.1";
8
+ const version = "2.22.0";
18
9
 
19
10
  function createTemplates(nuxt = useNuxt()) {
20
11
  const template = addTemplate({
@@ -31,8 +31,8 @@
31
31
  <slot v-else :name="`${column.key}-header`" :column="column" :sort="sort" :on-sort="onSort">
32
32
  <UButton
33
33
  v-if="column.sortable"
34
- v-bind="{ ...(ui.default.sortButton || {}), ...sortButton }"
35
- :icon="(!sort.column || sort.column !== column.key) ? (sortButton.icon || ui.default.sortButton.icon) : sort.direction === 'asc' ? sortAscIcon : sortDescIcon"
34
+ v-bind="{ ...ui.default.sortButton || {}, ...sortButton }"
35
+ :icon="!sort.column || sort.column !== column.key ? sortButton.icon || ui.default.sortButton.icon : sort.direction === 'asc' ? sortAscIcon : sortDescIcon"
36
36
  :label="column[columnAttribute]"
37
37
  @click="onSort(column)"
38
38
  />
@@ -43,7 +43,7 @@
43
43
 
44
44
  <tr v-if="loading && progress">
45
45
  <td :colspan="0" :class="ui.progress.wrapper">
46
- <UProgress v-bind="{ ...(ui.default.progress || {}), ...progress }" size="2xs" />
46
+ <UProgress v-bind="{ ...ui.default.progress || {}, ...progress }" size="2xs" />
47
47
  </td>
48
48
  </tr>
49
49
  </thead>
@@ -87,21 +87,24 @@
87
87
  <UButton
88
88
  v-else
89
89
  :disabled="row.disabledExpand"
90
- v-bind="{ ...(ui.default.expandButton || {}), ...expandButton }"
90
+ v-bind="{ ...ui.default.expandButton || {}, ...expandButton }"
91
91
  :ui="{ icon: { base: [ui.expand.icon, isExpanded(row) && 'rotate-180'].join(' ') } }"
92
92
  @click.capture.stop="toggleOpened(row)"
93
93
  />
94
94
  </td>
95
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' " 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
- />
103
- </slot>
104
-
96
+ <!-- This is a workaround: Since the @change event doesn't bubble up naturally, we need to wrap it in another element and use @click.capture.stop to simulate event bubbling behavior -->
97
+ <span v-if="modelValue && column.key === 'select'" @click.capture.stop="() => {
98
+ }">
99
+ <slot name="select-data" :checked="isSelected(row)" :change="(ev) => onChangeCheckbox(ev, row)">
100
+ <UCheckbox
101
+ :model-value="isSelected(row)"
102
+ v-bind="ui.default.checkbox"
103
+ aria-label="Select row"
104
+ @change="onChangeCheckbox($event, row)"
105
+ />
106
+ </slot>
107
+ </span>
105
108
  <slot
106
109
  v-else
107
110
  :name="`${column.key}-data`"