@nuxt/ui 2.10.0 → 2.11.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 (208) hide show
  1. package/README.md +11 -0
  2. package/dist/module.d.mts +387 -104
  3. package/dist/module.d.ts +387 -104
  4. package/dist/module.json +1 -1
  5. package/dist/module.mjs +16 -7
  6. package/dist/runtime/components/data/Table.vue +3 -3
  7. package/dist/runtime/components/data/Table.vue.d.ts +7 -7
  8. package/dist/runtime/components/elements/Accordion.vue +2 -2
  9. package/dist/runtime/components/elements/Accordion.vue.d.ts +7 -7
  10. package/dist/runtime/components/elements/Alert.vue +13 -12
  11. package/dist/runtime/components/elements/Alert.vue.d.ts +12 -11
  12. package/dist/runtime/components/elements/Avatar.vue +2 -2
  13. package/dist/runtime/components/elements/Avatar.vue.d.ts +11 -10
  14. package/dist/runtime/components/elements/AvatarGroup.d.ts +11 -10
  15. package/dist/runtime/components/elements/AvatarGroup.mjs +2 -2
  16. package/dist/runtime/components/elements/Badge.vue +6 -4
  17. package/dist/runtime/components/elements/Badge.vue.d.ts +11 -11
  18. package/dist/runtime/components/elements/Button.vue +16 -12
  19. package/dist/runtime/components/elements/Button.vue.d.ts +13 -12
  20. package/dist/runtime/components/elements/ButtonGroup.d.ts +12 -11
  21. package/dist/runtime/components/elements/ButtonGroup.mjs +8 -34
  22. package/dist/runtime/components/elements/Chip.vue +85 -0
  23. package/dist/runtime/components/elements/Chip.vue.d.ts +90 -0
  24. package/dist/runtime/components/elements/Dropdown.vue +35 -21
  25. package/dist/runtime/components/elements/Dropdown.vue.d.ts +13 -7
  26. package/dist/runtime/components/elements/Icon.vue +16 -2
  27. package/dist/runtime/components/elements/Icon.vue.d.ts +14 -2
  28. package/dist/runtime/components/elements/Kbd.vue +2 -2
  29. package/dist/runtime/components/elements/Kbd.vue.d.ts +12 -11
  30. package/dist/runtime/components/elements/Link.vue +2 -5
  31. package/dist/runtime/components/elements/Meter.vue +2 -2
  32. package/dist/runtime/components/elements/Meter.vue.d.ts +9 -9
  33. package/dist/runtime/components/elements/MeterGroup.d.ts +10 -10
  34. package/dist/runtime/components/elements/MeterGroup.mjs +8 -21
  35. package/dist/runtime/components/elements/Progress.vue +6 -95
  36. package/dist/runtime/components/elements/Progress.vue.d.ts +123 -1
  37. package/dist/runtime/components/forms/Checkbox.vue +8 -10
  38. package/dist/runtime/components/forms/Checkbox.vue.d.ts +10 -10
  39. package/dist/runtime/components/forms/Form.vue +1 -1
  40. package/dist/runtime/components/forms/FormGroup.vue +9 -5
  41. package/dist/runtime/components/forms/FormGroup.vue.d.ts +21 -11
  42. package/dist/runtime/components/forms/Input.vue +43 -12
  43. package/dist/runtime/components/forms/Input.vue.d.ts +38 -15
  44. package/dist/runtime/components/forms/Radio.vue +18 -12
  45. package/dist/runtime/components/forms/Radio.vue.d.ts +11 -10
  46. package/dist/runtime/components/forms/RadioGroup.vue +3 -3
  47. package/dist/runtime/components/forms/RadioGroup.vue.d.ts +13 -13
  48. package/dist/runtime/components/forms/Range.vue +5 -5
  49. package/dist/runtime/components/forms/Range.vue.d.ts +11 -10
  50. package/dist/runtime/components/forms/Select.vue +12 -9
  51. package/dist/runtime/components/forms/Select.vue.d.ts +15 -14
  52. package/dist/runtime/components/forms/SelectMenu.vue +42 -25
  53. package/dist/runtime/components/forms/SelectMenu.vue.d.ts +28 -19
  54. package/dist/runtime/components/forms/Textarea.vue +36 -6
  55. package/dist/runtime/components/forms/Textarea.vue.d.ts +37 -14
  56. package/dist/runtime/components/forms/Toggle.vue +25 -7
  57. package/dist/runtime/components/forms/Toggle.vue.d.ts +20 -7
  58. package/dist/runtime/components/layout/Card.vue +2 -2
  59. package/dist/runtime/components/layout/Card.vue.d.ts +7 -7
  60. package/dist/runtime/components/layout/Container.vue +2 -2
  61. package/dist/runtime/components/layout/Container.vue.d.ts +7 -7
  62. package/dist/runtime/components/layout/Divider.vue +3 -8
  63. package/dist/runtime/components/layout/Divider.vue.d.ts +9 -9
  64. package/dist/runtime/components/layout/Skeleton.vue +2 -2
  65. package/dist/runtime/components/layout/Skeleton.vue.d.ts +7 -7
  66. package/dist/runtime/components/navigation/Breadcrumb.vue +78 -0
  67. package/dist/runtime/components/navigation/Breadcrumb.vue.d.ts +50 -0
  68. package/dist/runtime/components/navigation/CommandPalette.vue +50 -37
  69. package/dist/runtime/components/navigation/CommandPalette.vue.d.ts +15 -8
  70. package/dist/runtime/components/navigation/CommandPaletteGroup.vue +1 -3
  71. package/dist/runtime/components/navigation/Pagination.vue +7 -7
  72. package/dist/runtime/components/navigation/Pagination.vue.d.ts +11 -11
  73. package/dist/runtime/components/navigation/Tabs.vue +8 -5
  74. package/dist/runtime/components/navigation/Tabs.vue.d.ts +10 -10
  75. package/dist/runtime/components/navigation/VerticalNavigation.vue +2 -2
  76. package/dist/runtime/components/navigation/VerticalNavigation.vue.d.ts +7 -7
  77. package/dist/runtime/components/overlays/ContextMenu.vue +4 -3
  78. package/dist/runtime/components/overlays/ContextMenu.vue.d.ts +7 -7
  79. package/dist/runtime/components/overlays/Modal.vue +3 -6
  80. package/dist/runtime/components/overlays/Modal.vue.d.ts +7 -7
  81. package/dist/runtime/components/overlays/Notification.vue +30 -31
  82. package/dist/runtime/components/overlays/Notification.vue.d.ts +10 -9
  83. package/dist/runtime/components/overlays/Notifications.vue +18 -16
  84. package/dist/runtime/components/overlays/Notifications.vue.d.ts +7 -7
  85. package/dist/runtime/components/overlays/Popover.vue +14 -4
  86. package/dist/runtime/components/overlays/Popover.vue.d.ts +20 -9
  87. package/dist/runtime/components/overlays/Slideover.vue +6 -6
  88. package/dist/runtime/components/overlays/Slideover.vue.d.ts +7 -7
  89. package/dist/runtime/components/overlays/Tooltip.vue +6 -5
  90. package/dist/runtime/components/overlays/Tooltip.vue.d.ts +7 -7
  91. package/dist/runtime/composables/defineShortcuts.d.ts +1 -1
  92. package/dist/runtime/composables/defineShortcuts.mjs +8 -4
  93. package/dist/runtime/composables/useButtonGroup.d.ts +20 -0
  94. package/dist/runtime/composables/useButtonGroup.mjs +52 -0
  95. package/dist/runtime/composables/useFormGroup.d.ts +2 -0
  96. package/dist/runtime/composables/useFormGroup.mjs +3 -2
  97. package/dist/runtime/composables/useShortcuts.d.ts +2 -2
  98. package/dist/runtime/composables/useUI.d.ts +3 -3
  99. package/dist/runtime/types/alert.d.ts +7 -0
  100. package/dist/runtime/types/avatar.d.ts +3 -1
  101. package/dist/runtime/types/badge.d.ts +5 -4
  102. package/dist/runtime/types/breadcrumb.d.ts +9 -0
  103. package/dist/runtime/types/button.d.ts +5 -4
  104. package/dist/runtime/types/chip.d.ts +11 -0
  105. package/dist/runtime/types/dropdown.d.ts +2 -2
  106. package/dist/runtime/types/form-group.d.ts +5 -0
  107. package/dist/runtime/types/form.d.ts +3 -2
  108. package/dist/runtime/types/index.d.ts +10 -0
  109. package/dist/runtime/types/input.d.ts +8 -0
  110. package/dist/runtime/types/kbd.d.ts +5 -0
  111. package/dist/runtime/types/popper.d.ts +2 -0
  112. package/dist/runtime/types/range.d.ts +5 -0
  113. package/dist/runtime/types/select.d.ts +8 -0
  114. package/dist/runtime/types/textarea.d.ts +8 -0
  115. package/dist/runtime/types/toggle.d.ts +5 -0
  116. package/dist/runtime/types/utils.d.ts +24 -7
  117. package/dist/runtime/ui.config/data/table.d.ts +60 -0
  118. package/dist/runtime/ui.config/data/table.mjs +59 -0
  119. package/dist/runtime/ui.config/elements/accordion.d.ts +21 -0
  120. package/dist/runtime/ui.config/elements/accordion.mjs +20 -0
  121. package/dist/runtime/ui.config/elements/alert.d.ts +41 -0
  122. package/dist/runtime/ui.config/elements/alert.mjs +40 -0
  123. package/dist/runtime/ui.config/elements/avatar.d.ts +60 -0
  124. package/dist/runtime/ui.config/elements/avatar.mjs +59 -0
  125. package/dist/runtime/ui.config/elements/avatarGroup.d.ts +6 -0
  126. package/dist/runtime/ui.config/elements/avatarGroup.mjs +5 -0
  127. package/dist/runtime/ui.config/elements/badge.d.ts +34 -0
  128. package/dist/runtime/ui.config/elements/badge.mjs +33 -0
  129. package/dist/runtime/ui.config/elements/button.d.ts +81 -0
  130. package/dist/runtime/ui.config/elements/button.mjs +80 -0
  131. package/dist/runtime/ui.config/elements/buttonGroup.d.ts +101 -0
  132. package/dist/runtime/ui.config/elements/buttonGroup.mjs +19 -0
  133. package/dist/runtime/ui.config/elements/chip.d.ts +35 -0
  134. package/dist/runtime/ui.config/elements/chip.mjs +34 -0
  135. package/dist/runtime/ui.config/elements/dropdown.d.ts +55 -0
  136. package/dist/runtime/ui.config/elements/dropdown.mjs +53 -0
  137. package/dist/runtime/ui.config/elements/kbd.d.ts +17 -0
  138. package/dist/runtime/ui.config/elements/kbd.mjs +16 -0
  139. package/dist/runtime/ui.config/elements/meter.d.ts +77 -0
  140. package/dist/runtime/ui.config/elements/meter.mjs +76 -0
  141. package/dist/runtime/ui.config/elements/meterGroup.d.ts +52 -0
  142. package/dist/runtime/ui.config/elements/meterGroup.mjs +24 -0
  143. package/dist/runtime/ui.config/elements/progress.d.ts +75 -0
  144. package/dist/runtime/ui.config/elements/progress.mjs +74 -0
  145. package/dist/runtime/ui.config/forms/checkbox.d.ts +19 -0
  146. package/dist/runtime/ui.config/forms/checkbox.mjs +18 -0
  147. package/dist/runtime/ui.config/forms/formGroup.d.ts +25 -0
  148. package/dist/runtime/ui.config/forms/formGroup.mjs +25 -0
  149. package/dist/runtime/ui.config/forms/input.d.ts +107 -0
  150. package/dist/runtime/ui.config/forms/input.mjs +106 -0
  151. package/dist/runtime/ui.config/forms/radio.d.ts +18 -0
  152. package/dist/runtime/ui.config/forms/radio.mjs +17 -0
  153. package/dist/runtime/ui.config/forms/radioGroup.d.ts +8 -0
  154. package/dist/runtime/ui.config/forms/radioGroup.mjs +7 -0
  155. package/dist/runtime/ui.config/forms/range.d.ts +64 -0
  156. package/dist/runtime/ui.config/forms/range.mjs +63 -0
  157. package/dist/runtime/ui.config/forms/select.d.ts +108 -0
  158. package/dist/runtime/ui.config/forms/select.mjs +13 -0
  159. package/dist/runtime/ui.config/forms/selectMenu.d.ts +68 -0
  160. package/dist/runtime/ui.config/forms/selectMenu.mjs +66 -0
  161. package/dist/runtime/ui.config/forms/textarea.d.ts +106 -0
  162. package/dist/runtime/ui.config/forms/textarea.mjs +10 -0
  163. package/dist/runtime/ui.config/forms/toggle.d.ts +61 -0
  164. package/dist/runtime/ui.config/forms/toggle.mjs +60 -0
  165. package/dist/runtime/ui.config/index.d.ts +40 -0
  166. package/dist/runtime/ui.config/index.mjs +40 -0
  167. package/dist/runtime/ui.config/layout/card.d.ts +24 -0
  168. package/dist/runtime/ui.config/layout/card.mjs +23 -0
  169. package/dist/runtime/ui.config/layout/container.d.ts +6 -0
  170. package/dist/runtime/ui.config/layout/container.mjs +5 -0
  171. package/dist/runtime/ui.config/layout/divider.d.ts +35 -0
  172. package/dist/runtime/ui.config/layout/divider.mjs +34 -0
  173. package/dist/runtime/ui.config/layout/skeleton.d.ts +6 -0
  174. package/dist/runtime/ui.config/layout/skeleton.mjs +5 -0
  175. package/dist/runtime/ui.config/navigation/breadcrumb.d.ts +20 -0
  176. package/dist/runtime/ui.config/navigation/breadcrumb.mjs +19 -0
  177. package/dist/runtime/ui.config/navigation/commandPalette.d.ts +72 -0
  178. package/dist/runtime/ui.config/navigation/commandPalette.mjs +71 -0
  179. package/dist/runtime/ui.config/navigation/pagination.d.ts +35 -0
  180. package/dist/runtime/ui.config/navigation/pagination.mjs +34 -0
  181. package/dist/runtime/ui.config/navigation/tabs.d.ts +34 -0
  182. package/dist/runtime/ui.config/navigation/tabs.mjs +33 -0
  183. package/dist/runtime/ui.config/navigation/verticalNavigation.d.ts +28 -0
  184. package/dist/runtime/ui.config/navigation/verticalNavigation.mjs +27 -0
  185. package/dist/runtime/ui.config/overlays/contextMenu.d.ts +31 -0
  186. package/dist/runtime/ui.config/overlays/contextMenu.mjs +25 -0
  187. package/dist/runtime/ui.config/overlays/modal.d.ts +36 -0
  188. package/dist/runtime/ui.config/overlays/modal.mjs +37 -0
  189. package/dist/runtime/ui.config/overlays/notification.d.ts +50 -0
  190. package/dist/runtime/ui.config/overlays/notification.mjs +50 -0
  191. package/dist/runtime/ui.config/overlays/notifications.d.ts +7 -0
  192. package/dist/runtime/ui.config/overlays/notifications.mjs +6 -0
  193. package/dist/runtime/ui.config/overlays/popover.d.ts +43 -0
  194. package/dist/runtime/ui.config/overlays/popover.mjs +37 -0
  195. package/dist/runtime/ui.config/overlays/slideover.d.ts +32 -0
  196. package/dist/runtime/ui.config/overlays/slideover.mjs +33 -0
  197. package/dist/runtime/ui.config/overlays/tooltip.d.ts +33 -0
  198. package/dist/runtime/ui.config/overlays/tooltip.mjs +27 -0
  199. package/dist/runtime/ui.config/popper.d.ts +8 -0
  200. package/dist/runtime/ui.config/popper.mjs +8 -0
  201. package/dist/runtime/ui.css +1 -13
  202. package/dist/runtime/utils/index.d.ts +5 -0
  203. package/dist/runtime/utils/index.mjs +7 -3
  204. package/dist/types.d.mts +3 -2
  205. package/dist/types.d.ts +3 -2
  206. package/package.json +32 -21
  207. package/dist/runtime/ui.config.d.ts +0 -1470
  208. package/dist/runtime/ui.config.mjs +0 -1273
@@ -0,0 +1,37 @@
1
+ export default {
2
+ wrapper: "relative z-50",
3
+ inner: "fixed inset-0 overflow-y-auto",
4
+ container: "flex min-h-full items-end sm:items-center justify-center text-center",
5
+ padding: "p-4 sm:p-0",
6
+ margin: "sm:my-8",
7
+ base: "relative text-left rtl:text-right overflow-hidden flex flex-col",
8
+ overlay: {
9
+ base: "fixed inset-0 transition-opacity",
10
+ background: "bg-gray-200/75 dark:bg-gray-800/75",
11
+ // Syntax for `<TransitionRoot>` component https://headlessui.com/vue/transition#basic-example
12
+ transition: {
13
+ enter: "ease-out duration-300",
14
+ enterFrom: "opacity-0",
15
+ enterTo: "opacity-100",
16
+ leave: "ease-in duration-200",
17
+ leaveFrom: "opacity-100",
18
+ leaveTo: "opacity-0"
19
+ }
20
+ },
21
+ background: "bg-white dark:bg-gray-900",
22
+ ring: "",
23
+ rounded: "rounded-lg",
24
+ shadow: "shadow-xl",
25
+ width: "w-full sm:max-w-lg",
26
+ height: "",
27
+ fullscreen: "w-screen h-screen",
28
+ // Syntax for `<TransitionRoot>` component https://headlessui.com/vue/transition#basic-example
29
+ transition: {
30
+ enter: "ease-out duration-300",
31
+ enterFrom: "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
32
+ enterTo: "opacity-100 translate-y-0 sm:scale-100",
33
+ leave: "ease-in duration-200",
34
+ leaveFrom: "opacity-100 translate-y-0 sm:scale-100",
35
+ leaveTo: "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
36
+ }
37
+ };
@@ -0,0 +1,50 @@
1
+ declare const _default: {
2
+ wrapper: string;
3
+ container: string;
4
+ inner: string;
5
+ title: string;
6
+ description: string;
7
+ actions: string;
8
+ background: string;
9
+ shadow: string;
10
+ rounded: string;
11
+ padding: string;
12
+ gap: string;
13
+ ring: string;
14
+ icon: {
15
+ base: string;
16
+ color: string;
17
+ };
18
+ avatar: {
19
+ base: string;
20
+ size: "md";
21
+ };
22
+ progress: {
23
+ base: string;
24
+ background: string;
25
+ };
26
+ transition: {
27
+ enterActiveClass: string;
28
+ enterFromClass: string;
29
+ enterToClass: string;
30
+ leaveActiveClass: string;
31
+ leaveFromClass: string;
32
+ leaveToClass: string;
33
+ };
34
+ default: {
35
+ color: string;
36
+ icon: null;
37
+ timeout: number;
38
+ closeButton: {
39
+ icon: string;
40
+ color: "gray";
41
+ variant: "link";
42
+ padded: boolean;
43
+ };
44
+ actionButton: {
45
+ size: "xs";
46
+ color: "white";
47
+ };
48
+ };
49
+ };
50
+ export default _default;
@@ -0,0 +1,50 @@
1
+ export default {
2
+ wrapper: "w-full pointer-events-auto",
3
+ container: "relative overflow-hidden",
4
+ inner: "w-0 flex-1",
5
+ title: "text-sm font-medium text-gray-900 dark:text-white",
6
+ description: "mt-1 text-sm leading-4 text-gray-500 dark:text-gray-400",
7
+ actions: "flex items-center gap-2 mt-3 flex-shrink-0",
8
+ background: "bg-white dark:bg-gray-900",
9
+ shadow: "shadow-lg",
10
+ rounded: "rounded-lg",
11
+ padding: "p-4",
12
+ gap: "gap-3",
13
+ ring: "ring-1 ring-gray-200 dark:ring-gray-800",
14
+ icon: {
15
+ base: "flex-shrink-0 w-5 h-5",
16
+ color: "text-{color}-500 dark:text-{color}-400"
17
+ },
18
+ avatar: {
19
+ base: "flex-shrink-0 self-center",
20
+ size: "md"
21
+ },
22
+ progress: {
23
+ base: "absolute bottom-0 end-0 start-0 h-1",
24
+ background: "bg-{color}-500 dark:bg-{color}-400"
25
+ },
26
+ // Syntax for `<Transition>` component https://vuejs.org/guide/built-ins/transition.html#css-based-transitions
27
+ transition: {
28
+ enterActiveClass: "transform ease-out duration-300 transition",
29
+ enterFromClass: "translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2",
30
+ enterToClass: "translate-y-0 opacity-100 sm:translate-x-0",
31
+ leaveActiveClass: "transition ease-in duration-100",
32
+ leaveFromClass: "opacity-100",
33
+ leaveToClass: "opacity-0"
34
+ },
35
+ default: {
36
+ color: "primary",
37
+ icon: null,
38
+ timeout: 5e3,
39
+ closeButton: {
40
+ icon: "i-heroicons-x-mark-20-solid",
41
+ color: "gray",
42
+ variant: "link",
43
+ padded: false
44
+ },
45
+ actionButton: {
46
+ size: "xs",
47
+ color: "white"
48
+ }
49
+ }
50
+ };
@@ -0,0 +1,7 @@
1
+ declare const _default: {
2
+ wrapper: string;
3
+ position: string;
4
+ width: string;
5
+ container: string;
6
+ };
7
+ export default _default;
@@ -0,0 +1,6 @@
1
+ export default {
2
+ wrapper: "fixed flex flex-col justify-end z-[55]",
3
+ position: "bottom-0 end-0",
4
+ width: "w-full sm:w-96",
5
+ container: "px-4 sm:px-6 py-6 space-y-3 overflow-y-auto"
6
+ };
@@ -0,0 +1,43 @@
1
+ declare const _default: {
2
+ wrapper: string;
3
+ container: string;
4
+ trigger: string;
5
+ width: string;
6
+ background: string;
7
+ shadow: string;
8
+ rounded: string;
9
+ ring: string;
10
+ base: string;
11
+ transition: {
12
+ enterActiveClass: string;
13
+ enterFromClass: string;
14
+ enterToClass: string;
15
+ leaveActiveClass: string;
16
+ leaveFromClass: string;
17
+ leaveToClass: string;
18
+ };
19
+ overlay: {
20
+ base: string;
21
+ background: string;
22
+ transition: {
23
+ enterActiveClass: string;
24
+ enterFromClass: string;
25
+ enterToClass: string;
26
+ leaveActiveClass: string;
27
+ leaveFromClass: string;
28
+ leaveToClass: string;
29
+ };
30
+ };
31
+ popper: {
32
+ strategy: string;
33
+ };
34
+ arrow: {
35
+ base: string;
36
+ ring: string;
37
+ rounded: string;
38
+ background: string;
39
+ shadow: string;
40
+ placement: string;
41
+ };
42
+ };
43
+ export default _default;
@@ -0,0 +1,37 @@
1
+ import { arrow } from "../popper.mjs";
2
+ export default {
3
+ wrapper: "relative",
4
+ container: "z-50 group",
5
+ trigger: "inline-flex w-full",
6
+ width: "",
7
+ background: "bg-white dark:bg-gray-900",
8
+ shadow: "shadow-lg",
9
+ rounded: "rounded-md",
10
+ ring: "ring-1 ring-gray-200 dark:ring-gray-800",
11
+ base: "overflow-hidden focus:outline-none relative",
12
+ // Syntax for `<Transition>` component https://vuejs.org/guide/built-ins/transition.html#css-based-transitions
13
+ transition: {
14
+ enterActiveClass: "transition ease-out duration-200",
15
+ enterFromClass: "opacity-0 translate-y-1",
16
+ enterToClass: "opacity-100 translate-y-0",
17
+ leaveActiveClass: "transition ease-in duration-150",
18
+ leaveFromClass: "opacity-100 translate-y-0",
19
+ leaveToClass: "opacity-0 translate-y-1"
20
+ },
21
+ overlay: {
22
+ base: "fixed inset-0 transition-opacity z-50",
23
+ background: "bg-gray-200/75 dark:bg-gray-800/75",
24
+ transition: {
25
+ enterActiveClass: "ease-out duration-200",
26
+ enterFromClass: "opacity-0",
27
+ enterToClass: "opacity-100",
28
+ leaveActiveClass: "ease-in duration-150",
29
+ leaveFromClass: "opacity-100",
30
+ leaveToClass: "opacity-0"
31
+ }
32
+ },
33
+ popper: {
34
+ strategy: "fixed"
35
+ },
36
+ arrow
37
+ };
@@ -0,0 +1,32 @@
1
+ declare const _default: {
2
+ wrapper: string;
3
+ overlay: {
4
+ base: string;
5
+ background: string;
6
+ transition: {
7
+ enter: string;
8
+ enterFrom: string;
9
+ enterTo: string;
10
+ leave: string;
11
+ leaveFrom: string;
12
+ leaveTo: string;
13
+ };
14
+ };
15
+ base: string;
16
+ background: string;
17
+ ring: string;
18
+ rounded: string;
19
+ padding: string;
20
+ shadow: string;
21
+ width: string;
22
+ translate: {
23
+ base: string;
24
+ left: string;
25
+ right: string;
26
+ };
27
+ transition: {
28
+ enter: string;
29
+ leave: string;
30
+ };
31
+ };
32
+ export default _default;
@@ -0,0 +1,33 @@
1
+ export default {
2
+ wrapper: "fixed inset-0 flex z-50",
3
+ overlay: {
4
+ base: "fixed inset-0 transition-opacity",
5
+ background: "bg-gray-200/75 dark:bg-gray-800/75",
6
+ // Syntax for `<TransitionRoot>` component https://headlessui.com/vue/transition#basic-example
7
+ transition: {
8
+ enter: "ease-in-out duration-500",
9
+ enterFrom: "opacity-0",
10
+ enterTo: "opacity-100",
11
+ leave: "ease-in-out duration-500",
12
+ leaveFrom: "opacity-100",
13
+ leaveTo: "opacity-0"
14
+ }
15
+ },
16
+ base: "relative flex-1 flex flex-col w-full focus:outline-none",
17
+ background: "bg-white dark:bg-gray-900",
18
+ ring: "",
19
+ rounded: "",
20
+ padding: "",
21
+ shadow: "shadow-xl",
22
+ width: "w-screen max-w-md",
23
+ translate: {
24
+ base: "translate-x-0",
25
+ left: "-translate-x-full",
26
+ right: "translate-x-full"
27
+ },
28
+ // Syntax for `<TransitionRoot>` component https://headlessui.com/vue/transition#basic-example
29
+ transition: {
30
+ enter: "transform transition ease-in-out duration-300",
31
+ leave: "transform transition ease-in-out duration-200"
32
+ }
33
+ };
@@ -0,0 +1,33 @@
1
+ declare const _default: {
2
+ wrapper: string;
3
+ container: string;
4
+ width: string;
5
+ background: string;
6
+ color: string;
7
+ shadow: string;
8
+ rounded: string;
9
+ ring: string;
10
+ base: string;
11
+ shortcuts: string;
12
+ middot: string;
13
+ transition: {
14
+ enterActiveClass: string;
15
+ enterFromClass: string;
16
+ enterToClass: string;
17
+ leaveActiveClass: string;
18
+ leaveFromClass: string;
19
+ leaveToClass: string;
20
+ };
21
+ popper: {
22
+ strategy: string;
23
+ };
24
+ arrow: {
25
+ base: string;
26
+ ring: string;
27
+ rounded: string;
28
+ background: string;
29
+ shadow: string;
30
+ placement: string;
31
+ };
32
+ };
33
+ export default _default;
@@ -0,0 +1,27 @@
1
+ import { arrow } from "../popper.mjs";
2
+ export default {
3
+ wrapper: "relative inline-flex",
4
+ container: "z-20 group",
5
+ width: "max-w-xs",
6
+ background: "bg-white dark:bg-gray-900",
7
+ color: "text-gray-900 dark:text-white",
8
+ shadow: "shadow",
9
+ rounded: "rounded",
10
+ ring: "ring-1 ring-gray-200 dark:ring-gray-800",
11
+ base: "[@media(pointer:coarse)]:hidden h-6 px-2 py-1 text-xs font-normal truncate relative",
12
+ shortcuts: "hidden md:inline-flex flex-shrink-0 gap-0.5",
13
+ middot: "mx-1 text-gray-700 dark:text-gray-200",
14
+ // Syntax for `<Transition>` component https://vuejs.org/guide/built-ins/transition.html#css-based-transitions
15
+ transition: {
16
+ enterActiveClass: "transition ease-out duration-200",
17
+ enterFromClass: "opacity-0 translate-y-1",
18
+ enterToClass: "opacity-100 translate-y-0",
19
+ leaveActiveClass: "transition ease-in duration-150",
20
+ leaveFromClass: "opacity-100 translate-y-0",
21
+ leaveToClass: "opacity-0 translate-y-1"
22
+ },
23
+ popper: {
24
+ strategy: "fixed"
25
+ },
26
+ arrow
27
+ };
@@ -0,0 +1,8 @@
1
+ export declare const arrow: {
2
+ base: string;
3
+ ring: string;
4
+ rounded: string;
5
+ background: string;
6
+ shadow: string;
7
+ placement: string;
8
+ };
@@ -0,0 +1,8 @@
1
+ export const arrow = {
2
+ base: "invisible before:visible before:block before:rotate-45 before:z-[-1] before:w-2 before:h-2",
3
+ ring: "before:ring-1 before:ring-gray-200 dark:before:ring-gray-800",
4
+ rounded: "before:rounded-sm",
5
+ background: "before:bg-gray-200 dark:before:bg-gray-800",
6
+ shadow: "before:shadow",
7
+ placement: 'group-data-[popper-placement*="right"]:-left-1 group-data-[popper-placement*="left"]:-right-1 group-data-[popper-placement*="top"]:-bottom-1 group-data-[popper-placement*="bottom"]:-top-1'
8
+ };
@@ -1,13 +1 @@
1
- .dark {
2
- color-scheme: dark;
3
- }
4
-
5
- a:focus-visible {
6
- @apply outline-primary;
7
- }
8
-
9
- ::selection { @apply bg-primary/40; }
10
-
11
- select {
12
- background-image: none;
13
- }
1
+ .dark{color-scheme:dark}a:focus-visible{@apply outline-primary}::-moz-selection{@apply bg-primary/40}::selection{@apply bg-primary/40}select{background-image:none}
@@ -2,4 +2,9 @@ import type { Strategy } from '../types';
2
2
  export declare function mergeConfig<T>(strategy: Strategy, ...configs: any[]): T;
3
3
  export declare function hexToRgb(hex: string): string | null;
4
4
  export declare function getSlotsChildren(slots: any): any;
5
+ /**
6
+ * "123-foo" will be parsed to 123
7
+ * This is used for the .number modifier in v-model
8
+ */
9
+ export declare function looseToNumber(val: any): any;
5
10
  export * from './lodash';
@@ -6,7 +6,7 @@ const customTwMerge = extendTailwindMerge({
6
6
  }
7
7
  });
8
8
  const defuTwMerge = createDefu((obj, key, value, namespace) => {
9
- if (namespace !== "default" && typeof obj[key] === "string" && typeof value === "string" && obj[key] && value) {
9
+ if (namespace !== "default" && !namespace.startsWith("default.") && typeof obj[key] === "string" && typeof value === "string" && obj[key] && value) {
10
10
  obj[key] = customTwMerge(obj[key], value);
11
11
  return true;
12
12
  }
@@ -27,7 +27,7 @@ export function hexToRgb(hex) {
27
27
  }
28
28
  export function getSlotsChildren(slots) {
29
29
  let children = slots.default?.();
30
- if (children.length) {
30
+ if (children?.length) {
31
31
  children = children.flatMap((c) => {
32
32
  if (typeof c.type === "symbol") {
33
33
  if (typeof c.children === "string") {
@@ -40,6 +40,10 @@ export function getSlotsChildren(slots) {
40
40
  return c;
41
41
  }).filter(Boolean);
42
42
  }
43
- return children;
43
+ return children || [];
44
+ }
45
+ export function looseToNumber(val) {
46
+ const n = parseFloat(val);
47
+ return isNaN(n) ? val : n;
44
48
  }
45
49
  export * from "./lodash.mjs";
package/dist/types.d.mts CHANGED
@@ -1,5 +1,6 @@
1
1
 
2
- import { ModuleOptions } from './module'
2
+ import type { ModuleOptions } from './module'
3
+
3
4
 
4
5
  declare module '@nuxt/schema' {
5
6
  interface NuxtConfig { ['ui']?: Partial<ModuleOptions> }
@@ -12,4 +13,4 @@ declare module 'nuxt/schema' {
12
13
  }
13
14
 
14
15
 
15
- export { accordion, alert, avatar, avatarGroup, badge, button, buttonGroup, card, checkbox, commandPalette, container, contextMenu, divider, dropdown, formGroup, input, kbd, meter, meterGroup, modal, notification, notifications, pagination, popover, progress, radio, radioGroup, range, select, selectMenu, skeleton, slideover, table, tabs, textarea, toggle, tooltip, verticalNavigation } from './module'
16
+ export type { accordion, alert, avatar, avatarGroup, badge, breadcrumb, button, buttonGroup, card, checkbox, chip, commandPalette, container, contextMenu, divider, dropdown, formGroup, input, kbd, meter, meterGroup, modal, notification, notifications, pagination, popover, progress, radio, radioGroup, range, select, selectMenu, skeleton, slideover, table, tabs, textarea, toggle, tooltip, verticalNavigation } from './module'
package/dist/types.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
 
2
- import { ModuleOptions } from './module'
2
+ import type { ModuleOptions } from './module'
3
+
3
4
 
4
5
  declare module '@nuxt/schema' {
5
6
  interface NuxtConfig { ['ui']?: Partial<ModuleOptions> }
@@ -12,4 +13,4 @@ declare module 'nuxt/schema' {
12
13
  }
13
14
 
14
15
 
15
- export { accordion, alert, avatar, avatarGroup, badge, button, buttonGroup, card, checkbox, commandPalette, container, contextMenu, divider, dropdown, formGroup, input, kbd, meter, meterGroup, modal, notification, notifications, pagination, popover, progress, radio, radioGroup, range, select, selectMenu, skeleton, slideover, table, tabs, textarea, toggle, tooltip, verticalNavigation } from './module'
16
+ export type { accordion, alert, avatar, avatarGroup, badge, breadcrumb, button, buttonGroup, card, checkbox, chip, commandPalette, container, contextMenu, divider, dropdown, formGroup, input, kbd, meter, meterGroup, modal, notification, notifications, pagination, popover, progress, radio, radioGroup, range, select, selectMenu, skeleton, slideover, table, tabs, textarea, toggle, tooltip, verticalNavigation } from './module'
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@nuxt/ui",
3
- "version": "2.10.0",
4
- "repository": "https://github.com/nuxt/ui",
3
+ "version": "2.11.1",
4
+ "repository": "nuxt/ui",
5
+ "homepage": "https://ui.nuxt.com",
5
6
  "license": "MIT",
6
7
  "exports": {
7
8
  ".": {
@@ -27,45 +28,55 @@
27
28
  "lint:fix": "eslint . --fix",
28
29
  "typecheck": "vue-tsc --noEmit && nuxi typecheck docs",
29
30
  "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare docs",
30
- "release": "release-it"
31
+ "release": "release-it",
32
+ "test": "vitest"
31
33
  },
32
34
  "dependencies": {
33
35
  "@egoist/tailwindcss-icons": "^1.4.0",
34
36
  "@headlessui/tailwindcss": "^0.2.0",
35
37
  "@headlessui/vue": "^1.7.16",
36
- "@iconify-json/heroicons": "^1.1.13",
37
- "@nuxt/kit": "^3.8.0",
38
- "@nuxtjs/color-mode": "^3.3.0",
39
- "@nuxtjs/tailwindcss": "^6.8.1",
38
+ "@iconify-json/heroicons": "^1.1.15",
39
+ "@nuxt/kit": "^3.8.2",
40
+ "@nuxtjs/color-mode": "^3.3.2",
41
+ "@nuxtjs/tailwindcss": "^6.10.1",
40
42
  "@popperjs/core": "^2.11.8",
41
43
  "@tailwindcss/aspect-ratio": "^0.4.2",
42
44
  "@tailwindcss/container-queries": "^0.1.1",
43
- "@tailwindcss/forms": "^0.5.6",
45
+ "@tailwindcss/forms": "^0.5.7",
44
46
  "@tailwindcss/typography": "^0.5.10",
45
- "@vueuse/core": "^10.5.0",
46
- "@vueuse/integrations": "^10.5.0",
47
- "@vueuse/math": "^10.5.0",
47
+ "@vueuse/core": "^10.7.0",
48
+ "@vueuse/integrations": "^10.7.0",
49
+ "@vueuse/math": "^10.7.0",
48
50
  "defu": "^6.1.3",
49
51
  "fuse.js": "^6.6.2",
52
+ "nuxt-icon": "^0.6.7",
50
53
  "ohash": "^1.1.3",
51
54
  "pathe": "^1.1.1",
52
- "scule": "^1.0.0",
55
+ "scule": "^1.1.1",
53
56
  "tailwind-merge": "^1.14.0",
54
- "tailwindcss": "^3.3.5"
57
+ "tailwindcss": "^3.3.6"
55
58
  },
56
59
  "devDependencies": {
57
60
  "@nuxt/eslint-config": "^0.2.0",
58
- "@nuxt/module-builder": "^0.5.2",
59
- "@release-it/conventional-changelog": "^7.0.2",
60
- "eslint": "^8.52.0",
61
+ "@nuxt/module-builder": "^0.5.4",
62
+ "@release-it/conventional-changelog": "^8.0.1",
63
+ "eslint": "^8.55.0",
64
+ "happy-dom": "^12.10.3",
61
65
  "joi": "^17.11.0",
62
- "nuxt": "^3.8.0",
63
- "release-it": "^16.2.1",
64
- "typescript": "^5.2.2",
66
+ "nuxt": "^3.8.2",
67
+ "nuxt-vitest": "^0.11.5",
68
+ "release-it": "^17.0.0",
69
+ "typescript": "^5.3.3",
65
70
  "unbuild": "^2.0.0",
66
- "valibot": "^0.19.0",
67
- "vue-tsc": "^1.8.21",
71
+ "valibot": "^0.21.0",
72
+ "vitest": "^0.33.0",
73
+ "vue-tsc": "^1.8.25",
68
74
  "yup": "^1.3.2",
69
75
  "zod": "^3.22.4"
76
+ },
77
+ "resolutions": {
78
+ "@nuxt/kit": "3.8.2",
79
+ "@nuxt/schema": "3.8.2",
80
+ "vue": "3.3.8"
70
81
  }
71
82
  }