@waveso/ui 0.7.7 → 0.8.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 (255) hide show
  1. package/README.md +2 -3
  2. package/dist/accordion.d.ts +1 -2
  3. package/dist/accordion.js +1 -3
  4. package/dist/action-bar.d.ts +1 -2
  5. package/dist/action-bar.js +24 -11
  6. package/dist/alert-dialog.d.ts +1 -2
  7. package/dist/alert-dialog.js +2 -4
  8. package/dist/alert.d.ts +1 -2
  9. package/dist/alert.js +2 -4
  10. package/dist/animate.d.ts +1 -2
  11. package/dist/animate.js +34 -8
  12. package/dist/aspect-ratio.d.ts +1 -2
  13. package/dist/aspect-ratio.js +0 -2
  14. package/dist/autocomplete.d.ts +1 -2
  15. package/dist/autocomplete.js +4 -6
  16. package/dist/avatar.d.ts +1 -2
  17. package/dist/avatar.js +1 -3
  18. package/dist/badge.d.ts +2 -3
  19. package/dist/badge.js +0 -2
  20. package/dist/breadcrumb.d.ts +1 -2
  21. package/dist/breadcrumb.js +0 -2
  22. package/dist/button-group.d.ts +3 -4
  23. package/dist/button-group.js +1 -2
  24. package/dist/button.d.ts +3 -4
  25. package/dist/button.js +1 -3
  26. package/dist/card.d.ts +1 -2
  27. package/dist/card.js +0 -2
  28. package/dist/checkbox.d.ts +1 -2
  29. package/dist/checkbox.js +6 -8
  30. package/dist/collapsible.d.ts +1 -2
  31. package/dist/collapsible.js +0 -2
  32. package/dist/combobox.d.ts +1 -2
  33. package/dist/combobox.js +2 -4
  34. package/dist/context-menu.d.ts +1 -2
  35. package/dist/context-menu.js +3 -5
  36. package/dist/count.d.ts +1 -2
  37. package/dist/count.js +10 -7
  38. package/dist/dialog.d.ts +1 -2
  39. package/dist/dialog.js +1 -3
  40. package/dist/drawer.d.ts +1 -2
  41. package/dist/drawer.js +2 -4
  42. package/dist/encrypted-text.d.ts +1 -2
  43. package/dist/encrypted-text.js +4 -5
  44. package/dist/field.d.ts +1 -2
  45. package/dist/field.js +2 -4
  46. package/dist/film-grain-shader.d.ts +1 -2
  47. package/dist/film-grain-shader.js +0 -2
  48. package/dist/film-grain-webgl.d.ts +1 -4
  49. package/dist/film-grain-webgl.js +7 -6
  50. package/dist/film-grain.d.ts +1 -2
  51. package/dist/film-grain.js +0 -3
  52. package/dist/form.d.ts +1 -2
  53. package/dist/form.js +0 -2
  54. package/dist/gradient-reveal-text.d.ts +1 -2
  55. package/dist/gradient-reveal-text.js +29 -7
  56. package/dist/hooks/use-mobile.d.ts +1 -2
  57. package/dist/hooks/use-mobile.js +0 -2
  58. package/dist/infinite-scroll.d.ts +1 -2
  59. package/dist/infinite-scroll.js +10 -5
  60. package/dist/input-group.d.ts +2 -3
  61. package/dist/input-group.js +3 -5
  62. package/dist/input-otp.d.ts +1 -2
  63. package/dist/input-otp.js +3 -5
  64. package/dist/input.d.ts +1 -2
  65. package/dist/input.js +1 -3
  66. package/dist/item.d.ts +2 -3
  67. package/dist/item.js +3 -5
  68. package/dist/kbd.d.ts +2 -2
  69. package/dist/kbd.js +1 -2
  70. package/dist/label.d.ts +1 -2
  71. package/dist/label.js +0 -2
  72. package/dist/lib/focus.d.ts +1 -2
  73. package/dist/lib/focus.js +0 -2
  74. package/dist/lib/internal-icons.d.ts +3 -10
  75. package/dist/lib/internal-icons.js +3 -12
  76. package/dist/lib/utils.d.ts +1 -2
  77. package/dist/lib/utils.js +0 -2
  78. package/dist/masonry.d.ts +1 -2
  79. package/dist/masonry.js +0 -2
  80. package/dist/menu.d.ts +1 -2
  81. package/dist/menu.js +3 -5
  82. package/dist/menubar.d.ts +1 -2
  83. package/dist/menubar.js +1 -3
  84. package/dist/pagination.d.ts +1 -2
  85. package/dist/pagination.js +0 -2
  86. package/dist/popover.d.ts +1 -2
  87. package/dist/popover.js +0 -2
  88. package/dist/preview-card.d.ts +1 -2
  89. package/dist/preview-card.js +0 -2
  90. package/dist/progress.d.ts +1 -2
  91. package/dist/progress.js +0 -2
  92. package/dist/radio-group.d.ts +1 -2
  93. package/dist/radio-group.js +0 -2
  94. package/dist/radio.d.ts +1 -2
  95. package/dist/radio.js +1 -3
  96. package/dist/scroll-area.d.ts +1 -2
  97. package/dist/scroll-area.js +1 -3
  98. package/dist/select.d.ts +1 -2
  99. package/dist/select.js +1 -4
  100. package/dist/separator.d.ts +1 -2
  101. package/dist/separator.js +0 -2
  102. package/dist/sidebar.d.ts +1 -2
  103. package/dist/sidebar.js +1 -3
  104. package/dist/skeleton.d.ts +2 -2
  105. package/dist/skeleton.js +1 -2
  106. package/dist/slider.d.ts +1 -2
  107. package/dist/slider.js +0 -2
  108. package/dist/spinner.d.ts +2 -2
  109. package/dist/spinner.js +1 -2
  110. package/dist/styles.css +13 -9
  111. package/dist/switch.d.ts +7 -5
  112. package/dist/switch.js +18 -6
  113. package/dist/table.d.ts +1 -2
  114. package/dist/table.js +0 -2
  115. package/dist/tabs.d.ts +1 -2
  116. package/dist/tabs.js +1 -3
  117. package/dist/textarea.d.ts +1 -2
  118. package/dist/textarea.js +1 -3
  119. package/dist/toast.d.ts +2 -3
  120. package/dist/toast.js +5 -7
  121. package/dist/toggle-group.d.ts +2 -2
  122. package/dist/toggle-group.js +5 -4
  123. package/dist/toggle.d.ts +1 -2
  124. package/dist/toggle.js +1 -3
  125. package/dist/tooltip.d.ts +1 -2
  126. package/dist/tooltip.js +0 -2
  127. package/dist/typewriter.d.ts +1 -2
  128. package/dist/typewriter.js +6 -2
  129. package/package.json +24 -8
  130. package/dist/accordion.d.ts.map +0 -1
  131. package/dist/accordion.js.map +0 -1
  132. package/dist/action-bar.d.ts.map +0 -1
  133. package/dist/action-bar.js.map +0 -1
  134. package/dist/alert-dialog.d.ts.map +0 -1
  135. package/dist/alert-dialog.js.map +0 -1
  136. package/dist/alert.d.ts.map +0 -1
  137. package/dist/alert.js.map +0 -1
  138. package/dist/animate.d.ts.map +0 -1
  139. package/dist/animate.js.map +0 -1
  140. package/dist/aspect-ratio.d.ts.map +0 -1
  141. package/dist/aspect-ratio.js.map +0 -1
  142. package/dist/autocomplete.d.ts.map +0 -1
  143. package/dist/autocomplete.js.map +0 -1
  144. package/dist/avatar.d.ts.map +0 -1
  145. package/dist/avatar.js.map +0 -1
  146. package/dist/badge.d.ts.map +0 -1
  147. package/dist/badge.js.map +0 -1
  148. package/dist/breadcrumb.d.ts.map +0 -1
  149. package/dist/breadcrumb.js.map +0 -1
  150. package/dist/button-group.d.ts.map +0 -1
  151. package/dist/button-group.js.map +0 -1
  152. package/dist/button.d.ts.map +0 -1
  153. package/dist/button.js.map +0 -1
  154. package/dist/card.d.ts.map +0 -1
  155. package/dist/card.js.map +0 -1
  156. package/dist/checkbox.d.ts.map +0 -1
  157. package/dist/checkbox.js.map +0 -1
  158. package/dist/collapsible.d.ts.map +0 -1
  159. package/dist/collapsible.js.map +0 -1
  160. package/dist/combobox.d.ts.map +0 -1
  161. package/dist/combobox.js.map +0 -1
  162. package/dist/context-menu.d.ts.map +0 -1
  163. package/dist/context-menu.js.map +0 -1
  164. package/dist/count.d.ts.map +0 -1
  165. package/dist/count.js.map +0 -1
  166. package/dist/dialog.d.ts.map +0 -1
  167. package/dist/dialog.js.map +0 -1
  168. package/dist/drawer.d.ts.map +0 -1
  169. package/dist/drawer.js.map +0 -1
  170. package/dist/encrypted-text.d.ts.map +0 -1
  171. package/dist/encrypted-text.js.map +0 -1
  172. package/dist/field.d.ts.map +0 -1
  173. package/dist/field.js.map +0 -1
  174. package/dist/film-grain-shader.d.ts.map +0 -1
  175. package/dist/film-grain-shader.js.map +0 -1
  176. package/dist/film-grain-webgl.d.ts.map +0 -1
  177. package/dist/film-grain-webgl.js.map +0 -1
  178. package/dist/film-grain.d.ts.map +0 -1
  179. package/dist/film-grain.js.map +0 -1
  180. package/dist/form.d.ts.map +0 -1
  181. package/dist/form.js.map +0 -1
  182. package/dist/gradient-reveal-text.d.ts.map +0 -1
  183. package/dist/gradient-reveal-text.js.map +0 -1
  184. package/dist/hooks/use-mobile.d.ts.map +0 -1
  185. package/dist/hooks/use-mobile.js.map +0 -1
  186. package/dist/infinite-scroll.d.ts.map +0 -1
  187. package/dist/infinite-scroll.js.map +0 -1
  188. package/dist/input-group.d.ts.map +0 -1
  189. package/dist/input-group.js.map +0 -1
  190. package/dist/input-otp.d.ts.map +0 -1
  191. package/dist/input-otp.js.map +0 -1
  192. package/dist/input.d.ts.map +0 -1
  193. package/dist/input.js.map +0 -1
  194. package/dist/item.d.ts.map +0 -1
  195. package/dist/item.js.map +0 -1
  196. package/dist/kbd.d.ts.map +0 -1
  197. package/dist/kbd.js.map +0 -1
  198. package/dist/label.d.ts.map +0 -1
  199. package/dist/label.js.map +0 -1
  200. package/dist/lib/focus.d.ts.map +0 -1
  201. package/dist/lib/focus.js.map +0 -1
  202. package/dist/lib/internal-icons.d.ts.map +0 -1
  203. package/dist/lib/internal-icons.js.map +0 -1
  204. package/dist/lib/utils.d.ts.map +0 -1
  205. package/dist/lib/utils.js.map +0 -1
  206. package/dist/masonry.d.ts.map +0 -1
  207. package/dist/masonry.js.map +0 -1
  208. package/dist/menu.d.ts.map +0 -1
  209. package/dist/menu.js.map +0 -1
  210. package/dist/menubar.d.ts.map +0 -1
  211. package/dist/menubar.js.map +0 -1
  212. package/dist/pagination.d.ts.map +0 -1
  213. package/dist/pagination.js.map +0 -1
  214. package/dist/popover.d.ts.map +0 -1
  215. package/dist/popover.js.map +0 -1
  216. package/dist/preview-card.d.ts.map +0 -1
  217. package/dist/preview-card.js.map +0 -1
  218. package/dist/progress.d.ts.map +0 -1
  219. package/dist/progress.js.map +0 -1
  220. package/dist/radio-group.d.ts.map +0 -1
  221. package/dist/radio-group.js.map +0 -1
  222. package/dist/radio.d.ts.map +0 -1
  223. package/dist/radio.js.map +0 -1
  224. package/dist/scroll-area.d.ts.map +0 -1
  225. package/dist/scroll-area.js.map +0 -1
  226. package/dist/select.d.ts.map +0 -1
  227. package/dist/select.js.map +0 -1
  228. package/dist/separator.d.ts.map +0 -1
  229. package/dist/separator.js.map +0 -1
  230. package/dist/sidebar.d.ts.map +0 -1
  231. package/dist/sidebar.js.map +0 -1
  232. package/dist/skeleton.d.ts.map +0 -1
  233. package/dist/skeleton.js.map +0 -1
  234. package/dist/slider.d.ts.map +0 -1
  235. package/dist/slider.js.map +0 -1
  236. package/dist/spinner.d.ts.map +0 -1
  237. package/dist/spinner.js.map +0 -1
  238. package/dist/switch.d.ts.map +0 -1
  239. package/dist/switch.js.map +0 -1
  240. package/dist/table.d.ts.map +0 -1
  241. package/dist/table.js.map +0 -1
  242. package/dist/tabs.d.ts.map +0 -1
  243. package/dist/tabs.js.map +0 -1
  244. package/dist/textarea.d.ts.map +0 -1
  245. package/dist/textarea.js.map +0 -1
  246. package/dist/toast.d.ts.map +0 -1
  247. package/dist/toast.js.map +0 -1
  248. package/dist/toggle-group.d.ts.map +0 -1
  249. package/dist/toggle-group.js.map +0 -1
  250. package/dist/toggle.d.ts.map +0 -1
  251. package/dist/toggle.js.map +0 -1
  252. package/dist/tooltip.d.ts.map +0 -1
  253. package/dist/tooltip.js.map +0 -1
  254. package/dist/typewriter.d.ts.map +0 -1
  255. package/dist/typewriter.js.map +0 -1
package/README.md CHANGED
@@ -137,11 +137,11 @@ npm install @waveso/ui @base-ui/react class-variance-authority clsx tailwind-mer
137
137
 
138
138
  ## Setup
139
139
 
140
- Add the theme preset and Tailwind to your CSS entry point:
140
+ Import Tailwind, then the Wave UI preset, in your CSS entry point:
141
141
 
142
142
  ```css
143
- @import "@waveso/ui/styles.css";
144
143
  @import "tailwindcss";
144
+ @import "@waveso/ui/styles.css";
145
145
  ```
146
146
 
147
147
  The preset provides every CSS variable (colors, radii, motion, shadows) with light and dark support. Override any variable in your own `:root` / `.dark` blocks to customize the theme.
@@ -193,7 +193,6 @@ Some components have optional peer dependencies — install only what you use:
193
193
  - **Form** — `react-hook-form`
194
194
  - **Input OTP** — `input-otp`
195
195
  - **Animations** — `motion`
196
- - **Sidebar** — `usehooks-ts`
197
196
 
198
197
  ## Development
199
198
 
@@ -26,5 +26,4 @@ declare function AccordionContent({
26
26
  ...props
27
27
  }: AccordionContentProps): _$react_jsx_runtime0.JSX.Element;
28
28
  //#endregion
29
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
30
- //# sourceMappingURL=accordion.d.ts.map
29
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
package/dist/accordion.js CHANGED
@@ -25,7 +25,7 @@ function AccordionTrigger({ className, children, ...props }) {
25
25
  className: "flex",
26
26
  children: /* @__PURE__ */ jsxs(Accordion$1.Trigger, {
27
27
  "data-slot": "accordion-trigger",
28
- className: cn("cursor-clickable focus-visible:ring-focus/50 focus-visible:border-focus focus-visible:after:border-focus **:data-[slot=accordion-trigger-icon]:text-muted group/accordion-trigger relative flex flex-1 items-start justify-between rounded-md border border-transparent py-2.5 text-left text-sm font-medium motion-color outline-none hover:underline focus-visible:ring-3 aria-disabled:pointer-events-none aria-disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4", className),
28
+ className: cn("cursor-clickable focus-visible:ring-focus/50 focus-visible:border-focus focus-visible:after:border-focus **:data-[slot=accordion-trigger-icon]:text-muted group/accordion-trigger relative flex flex-1 items-start justify-between rounded-md border border-transparent py-2.5 text-left text-sm font-medium motion-color outline-hidden hover:underline focus-visible:ring-3 aria-disabled:pointer-events-none aria-disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4", className),
29
29
  ...props,
30
30
  children: [
31
31
  children,
@@ -55,5 +55,3 @@ function AccordionContent({ className, children, ...props }) {
55
55
  }
56
56
  //#endregion
57
57
  export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
58
-
59
- //# sourceMappingURL=accordion.js.map
@@ -79,5 +79,4 @@ declare function useActionBar(id: string, entry: ActionBarEntry): void;
79
79
  */
80
80
  declare function useActionBarGuard(navigate: (href: string) => void): (href: string) => boolean;
81
81
  //#endregion
82
- export { ActionBarEntry, ActionBarProvider, ActionBarProviderProps, useActionBar, useActionBarGuard };
83
- //# sourceMappingURL=action-bar.d.ts.map
82
+ export { ActionBarEntry, ActionBarProvider, ActionBarProviderProps, useActionBar, useActionBarGuard };
@@ -49,12 +49,13 @@ function ActionBarProvider({ children, message = "You have unsaved changes", plu
49
49
  const [, forceUpdate] = React.useState(0);
50
50
  const [jiggleTransform, setJiggleTransform] = React.useState(null);
51
51
  const jiggleTimerRef = React.useRef(null);
52
- const contentRef = React.useRef(null);
52
+ const blockedNoticeRafRef = React.useRef(null);
53
53
  const isMac = useIsMac();
54
54
  const prefersReducedMotion = useReducedMotion();
55
55
  const reducedMotionRef = React.useRef(prefersReducedMotion);
56
56
  reducedMotionRef.current = prefersReducedMotion;
57
57
  const [blockedNotice, setBlockedNotice] = React.useState("");
58
+ const [saveError, setSaveError] = React.useState(false);
58
59
  const register = React.useCallback((id, entry) => {
59
60
  const prev = entriesRef.current.get(id);
60
61
  entriesRef.current.set(id, entry);
@@ -69,7 +70,11 @@ function ActionBarProvider({ children, message = "You have unsaved changes", plu
69
70
  }, []);
70
71
  const jiggle = React.useCallback(() => {
71
72
  setBlockedNotice("");
72
- requestAnimationFrame(() => setBlockedNotice(blockedMessage));
73
+ if (blockedNoticeRafRef.current !== null) cancelAnimationFrame(blockedNoticeRafRef.current);
74
+ blockedNoticeRafRef.current = requestAnimationFrame(() => {
75
+ blockedNoticeRafRef.current = null;
76
+ setBlockedNotice(blockedMessage);
77
+ });
73
78
  if (reducedMotionRef.current) return;
74
79
  if (jiggleTimerRef.current) return;
75
80
  let step = 0;
@@ -87,6 +92,12 @@ function ActionBarProvider({ children, message = "You have unsaved changes", plu
87
92
  }
88
93
  tick();
89
94
  }, [blockedMessage]);
95
+ React.useEffect(() => {
96
+ return () => {
97
+ if (jiggleTimerRef.current !== null) clearTimeout(jiggleTimerRef.current);
98
+ if (blockedNoticeRafRef.current !== null) cancelAnimationFrame(blockedNoticeRafRef.current);
99
+ };
100
+ }, []);
90
101
  const dirty = [];
91
102
  let anySaving = false;
92
103
  for (const entry of entriesRef.current.values()) {
@@ -97,15 +108,20 @@ function ActionBarProvider({ children, message = "You have unsaved changes", plu
97
108
  const dirtyCount = dirty.length;
98
109
  const displayMessage = dirtyCount > 1 ? pluralMessage(dirtyCount) : message;
99
110
  const handleSaveAll = React.useCallback(async () => {
111
+ setSaveError(false);
100
112
  const saves = [...entriesRef.current.values()].filter((e) => e.hasChanges).map((e) => e.onSave());
101
- await Promise.all(saves);
113
+ try {
114
+ await Promise.all(saves);
115
+ } catch {
116
+ setSaveError(true);
117
+ }
102
118
  }, []);
103
119
  const handleResetAll = React.useCallback(() => {
104
120
  for (const entry of entriesRef.current.values()) if (entry.hasChanges) entry.onReset();
105
121
  }, []);
106
122
  React.useEffect(() => {
107
123
  function handleKeyDown(e) {
108
- if ((e.metaKey || e.ctrlKey) && e.key === "s") {
124
+ if ((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === "s") {
109
125
  e.preventDefault();
110
126
  if (hasDirty()) handleSaveAll();
111
127
  }
@@ -136,7 +152,6 @@ function ActionBarProvider({ children, message = "You have unsaved changes", plu
136
152
  children: [
137
153
  /* @__PURE__ */ jsx("div", {
138
154
  "data-slot": "action-bar-shell",
139
- ref: contentRef,
140
155
  style: jiggleTransform ? { transform: jiggleTransform } : void 0,
141
156
  children
142
157
  }),
@@ -150,7 +165,7 @@ function ActionBarProvider({ children, message = "You have unsaved changes", plu
150
165
  "data-slot": "action-bar-blocked-status",
151
166
  "aria-live": "assertive",
152
167
  className: "sr-only",
153
- children: blockedNotice
168
+ children: saveError ? "Couldn't save your changes" : blockedNotice
154
169
  }),
155
170
  /* @__PURE__ */ jsx(AnimatePresence, { children: showBar && /* @__PURE__ */ jsx(motion.div, {
156
171
  "data-slot": "action-bar",
@@ -182,11 +197,11 @@ function ActionBarProvider({ children, message = "You have unsaved changes", plu
182
197
  className: "fixed bottom-6 left-1/2 z-50",
183
198
  children: /* @__PURE__ */ jsxs("div", {
184
199
  "data-slot": "action-bar-content",
185
- className: cn("flex items-center gap-6 rounded-lg border border-line/60 bg-surface px-5 py-2.5 shadow-lg ring-1 ring-line backdrop-blur-sm", className),
200
+ className: cn("flex items-center gap-6 rounded-lg border border-line/60 bg-surface px-5 py-2.5 shadow-lg ring-1 ring-line", className),
186
201
  children: [/* @__PURE__ */ jsx("span", {
187
202
  "data-slot": "action-bar-message",
188
- className: "whitespace-nowrap text-sm font-medium text-contrast",
189
- children: displayMessage
203
+ className: cn("whitespace-nowrap text-sm font-medium", saveError ? "text-destructive" : "text-contrast"),
204
+ children: saveError ? "Couldn't save your changes" : displayMessage
190
205
  }), /* @__PURE__ */ jsxs("div", {
191
206
  "data-slot": "action-bar-actions",
192
207
  className: "flex items-center gap-1.5",
@@ -260,5 +275,3 @@ function useActionBarGuard(navigate) {
260
275
  }
261
276
  //#endregion
262
277
  export { ActionBarProvider, useActionBar, useActionBarGuard };
263
-
264
- //# sourceMappingURL=action-bar.js.map
@@ -67,5 +67,4 @@ declare function AlertDialogCancel({
67
67
  ...props
68
68
  }: AlertDialogCancelProps): _$react_jsx_runtime0.JSX.Element;
69
69
  //#endregion
70
- export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger };
71
- //# sourceMappingURL=alert-dialog.d.ts.map
70
+ export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger };
@@ -34,7 +34,7 @@ function AlertDialogContent({ className, size = "default", ...props }) {
34
34
  return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [/* @__PURE__ */ jsx(AlertDialogOverlay, {}), /* @__PURE__ */ jsx(AlertDialog$1.Popup, {
35
35
  "data-slot": "alert-dialog-content",
36
36
  "data-size": size,
37
- className: cn("motion-scale-lg bg-foundation ring-contrast/10 group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-lg p-4 ring-1 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=lg]:max-w-lg data-[size=xl]:max-w-xl data-[size=default]:sm:max-w-sm data-[size=lg]:sm:max-w-lg data-[size=xl]:sm:max-w-xl", className),
37
+ className: cn("motion-scale-lg bg-foundation ring-contrast/10 group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-lg p-4 ring-1 outline-hidden data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=lg]:max-w-lg data-[size=xl]:max-w-xl data-[size=default]:sm:max-w-sm data-[size=lg]:sm:max-w-lg data-[size=xl]:sm:max-w-xl", className),
38
38
  ...props
39
39
  })] });
40
40
  }
@@ -76,7 +76,7 @@ function AlertDialogDescription({ className, ...props }) {
76
76
  function AlertDialogAction({ className, ...props }) {
77
77
  return /* @__PURE__ */ jsx(Button, {
78
78
  "data-slot": "alert-dialog-action",
79
- className: cn(className),
79
+ className,
80
80
  ...props
81
81
  });
82
82
  }
@@ -93,5 +93,3 @@ function AlertDialogCancel({ className, variant = "outline", size = "default", .
93
93
  }
94
94
  //#endregion
95
95
  export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger };
96
-
97
- //# sourceMappingURL=alert-dialog.js.map
package/dist/alert.d.ts CHANGED
@@ -29,5 +29,4 @@ declare function AlertAction({
29
29
  ...props
30
30
  }: AlertActionProps): _$react_jsx_runtime0.JSX.Element;
31
31
  //#endregion
32
- export { Alert, AlertAction, AlertDescription, AlertTitle };
33
- //# sourceMappingURL=alert.d.ts.map
32
+ export { Alert, AlertAction, AlertDescription, AlertTitle };
package/dist/alert.js CHANGED
@@ -3,7 +3,7 @@ import "react";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  import { cva } from "class-variance-authority";
5
5
  //#region src/alert.tsx
6
- const alertVariants = cva("grid gap-0.5 rounded-md border border-edge px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-data-[icon]:grid-cols-[auto_1fr] has-data-[icon]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4 w-full relative group/alert", {
6
+ const alertVariants = cva("grid gap-0.5 rounded-md border border-edge px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-data-[icon]:grid-cols-[auto_1fr] has-data-[icon]:gap-x-2 *:data-[icon]:col-start-1 *:data-[icon]:row-span-2 *:data-[icon]:translate-y-0.5 *:data-[icon]:text-current *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4 w-full relative group/alert", {
7
7
  variants: { variant: {
8
8
  default: "bg-surface text-contrast",
9
9
  destructive: "text-destructive bg-surface *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"
@@ -28,7 +28,7 @@ function AlertTitle({ className, ...props }) {
28
28
  function AlertDescription({ className, ...props }) {
29
29
  return /* @__PURE__ */ jsx("div", {
30
30
  "data-slot": "alert-description",
31
- className: cn("text-muted [&_a]:hover:text-contrast text-sm text-balance md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_p:not(:last-child)]:mb-4", className),
31
+ className: cn("text-muted [&_a]:hover:text-contrast group-has-data-[icon]/alert:col-start-2 text-sm text-balance md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_p:not(:last-child)]:mb-4", className),
32
32
  ...props
33
33
  });
34
34
  }
@@ -41,5 +41,3 @@ function AlertAction({ className, ...props }) {
41
41
  }
42
42
  //#endregion
43
43
  export { Alert, AlertAction, AlertDescription, AlertTitle };
44
-
45
- //# sourceMappingURL=alert.js.map
package/dist/animate.d.ts CHANGED
@@ -189,5 +189,4 @@ declare function Float({
189
189
  paused
190
190
  }: FloatProps): _$react_jsx_runtime0.JSX.Element;
191
191
  //#endregion
192
- export { AnimateIn, type AnimateInProps, AnimateOnView, type AnimateOnViewProps, type Direction, Float, type FloatProps, Pulse, type PulseProps, Stagger, type StaggerProps };
193
- //# sourceMappingURL=animate.d.ts.map
192
+ export { AnimateIn, type AnimateInProps, AnimateOnView, type AnimateOnViewProps, type Direction, Float, type FloatProps, Pulse, type PulseProps, Stagger, type StaggerProps };
package/dist/animate.js CHANGED
@@ -1,9 +1,15 @@
1
1
  "use client";
2
- import { Children, cloneElement, isValidElement, useEffect, useId, useRef, useState } from "react";
2
+ import { Children, cloneElement, isValidElement, useCallback, useEffect, useId, useLayoutEffect, useRef, useState } from "react";
3
3
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
4
  import { useInView, useReducedMotion } from "motion/react";
5
5
  //#region src/animate.tsx
6
6
  /**
7
+ * `useLayoutEffect` warns when run during SSR. Fall back to `useEffect` on the
8
+ * server so entrance components (which render on the server to avoid hydration
9
+ * mismatch) stay warning-free while still committing pre-paint in the browser.
10
+ */
11
+ const useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect;
12
+ /**
7
13
  * Direction map: `from` means where the element COMES FROM.
8
14
  * `from="left"` = starts to the left, slides right into place.
9
15
  */
@@ -108,14 +114,23 @@ function buildTransitionStr(duration, ease, delay, hasFilter) {
108
114
  function AnimateOnView({ children, delay = 0, from = "down", distance = 16, scale = false, blur = false, rotate = 0, flip = false, spring = false, once = true, transition }) {
109
115
  const ref = useRef(null);
110
116
  const [hydrated, setHydrated] = useState(false);
117
+ const [settled, setSettled] = useState(false);
111
118
  const isInView = useInView(ref, {
112
119
  once,
113
120
  margin: "-50px"
114
121
  });
115
122
  const prefersReducedMotion = useReducedMotion();
116
- useEffect(() => {
123
+ useIsomorphicLayoutEffect(() => {
117
124
  setHydrated(true);
118
125
  }, []);
126
+ useEffect(() => {
127
+ if (!isInView) setSettled(false);
128
+ }, [isInView]);
129
+ const existingOnTransitionEnd = children.props?.onTransitionEnd;
130
+ const handleTransitionEnd = useCallback((event) => {
131
+ if (event.target === ref.current) setSettled(true);
132
+ existingOnTransitionEnd?.(event);
133
+ }, [existingOnTransitionEnd]);
119
134
  if (!isValidElement(children)) return children;
120
135
  const childProps = children.props;
121
136
  const existingStyle = childProps.style ?? {};
@@ -141,11 +156,12 @@ function AnimateOnView({ children, delay = 0, from = "down", distance = 16, scal
141
156
  const transitionStr = buildTransitionStr(duration, ease, delay, styles.hasFilter);
142
157
  return cloneElement(children, {
143
158
  ref: mergeRefs(ref, existingRef),
159
+ onTransitionEnd: handleTransitionEnd,
144
160
  style: {
145
161
  ...existingStyle,
146
162
  ...currentStyle,
147
163
  ...isInView ? { transition: transitionStr } : {},
148
- willChange: "opacity, transform"
164
+ ...isInView && !settled ? { willChange: "opacity, transform" } : {}
149
165
  }
150
166
  });
151
167
  }
@@ -165,12 +181,23 @@ function AnimateOnView({ children, delay = 0, from = "down", distance = 16, scal
165
181
  function AnimateIn({ children, delay = 0, from = "down", distance = 4, scale = false, blur = false, rotate = 0, flip = false, spring = false, transition }) {
166
182
  const ref = useRef(null);
167
183
  const [visible, setVisible] = useState(false);
184
+ const [settled, setSettled] = useState(false);
168
185
  const prefersReducedMotion = useReducedMotion();
169
186
  useEffect(() => {
170
- requestAnimationFrame(() => {
171
- requestAnimationFrame(() => setVisible(true));
187
+ let inner = 0;
188
+ const outer = requestAnimationFrame(() => {
189
+ inner = requestAnimationFrame(() => setVisible(true));
172
190
  });
191
+ return () => {
192
+ cancelAnimationFrame(outer);
193
+ cancelAnimationFrame(inner);
194
+ };
173
195
  }, []);
196
+ const existingOnTransitionEnd = children.props?.onTransitionEnd;
197
+ const handleTransitionEnd = useCallback((event) => {
198
+ if (event.target === ref.current) setSettled(true);
199
+ existingOnTransitionEnd?.(event);
200
+ }, [existingOnTransitionEnd]);
174
201
  if (!isValidElement(children)) return children;
175
202
  const childProps = children.props;
176
203
  const existingStyle = childProps.style ?? {};
@@ -195,11 +222,12 @@ function AnimateIn({ children, delay = 0, from = "down", distance = 4, scale = f
195
222
  const transitionStr = buildTransitionStr(duration, ease, delay, styles.hasFilter);
196
223
  return cloneElement(children, {
197
224
  ref: mergeRefs(ref, existingRef),
225
+ onTransitionEnd: handleTransitionEnd,
198
226
  style: {
199
227
  ...existingStyle,
200
228
  ...currentStyle,
201
229
  ...visible ? { transition: transitionStr } : {},
202
- willChange: "opacity, transform"
230
+ ...visible && !settled ? { willChange: "opacity, transform" } : {}
203
231
  }
204
232
  });
205
233
  }
@@ -305,5 +333,3 @@ function Float({ children, distance = 6, duration = 3, rotate = 0, paused = fals
305
333
  }
306
334
  //#endregion
307
335
  export { AnimateIn, AnimateOnView, Float, Pulse, Stagger };
308
-
309
- //# sourceMappingURL=animate.js.map
@@ -11,5 +11,4 @@ declare function AspectRatio({
11
11
  ...props
12
12
  }: AspectRatioProps): _$react_jsx_runtime0.JSX.Element;
13
13
  //#endregion
14
- export { AspectRatio, type AspectRatioProps };
15
- //# sourceMappingURL=aspect-ratio.d.ts.map
14
+ export { AspectRatio, type AspectRatioProps };
@@ -12,5 +12,3 @@ function AspectRatio({ ratio, className, ...props }) {
12
12
  }
13
13
  //#endregion
14
14
  export { AspectRatio };
15
-
16
- //# sourceMappingURL=aspect-ratio.js.map
@@ -110,5 +110,4 @@ declare function AutocompleteContent({
110
110
  ...props
111
111
  }: AutocompleteContentProps): _$react_jsx_runtime0.JSX.Element;
112
112
  //#endregion
113
- export { Autocomplete, AutocompleteArrow, AutocompleteBackdrop, AutocompleteClear, AutocompleteCollection, AutocompleteContent, AutocompleteEmpty, AutocompleteGroup, AutocompleteGroupLabel, AutocompleteIcon, AutocompleteInput, AutocompleteItem, AutocompleteList, AutocompletePopup, AutocompletePortal, AutocompletePositioner, AutocompleteRow, AutocompleteSeparator, AutocompleteStatus, AutocompleteTrigger, AutocompleteValue };
114
- //# sourceMappingURL=autocomplete.d.ts.map
113
+ export { Autocomplete, AutocompleteArrow, AutocompleteBackdrop, AutocompleteClear, AutocompleteCollection, AutocompleteContent, AutocompleteEmpty, AutocompleteGroup, AutocompleteGroupLabel, AutocompleteIcon, AutocompleteInput, AutocompleteItem, AutocompleteList, AutocompletePopup, AutocompletePortal, AutocompletePositioner, AutocompleteRow, AutocompleteSeparator, AutocompleteStatus, AutocompleteTrigger, AutocompleteValue };
@@ -13,7 +13,7 @@ function Autocomplete({ ...props }) {
13
13
  function AutocompleteInput({ className, ...props }) {
14
14
  return /* @__PURE__ */ jsx(Autocomplete$1.Input, {
15
15
  "data-slot": "autocomplete-input",
16
- className: cn("dark:bg-edge/30 border-edge focus-visible:border-focus focus-visible:ring-focus/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 disabled:bg-edge/50 dark:disabled:bg-edge/80 placeholder:text-soft h-8 w-full min-w-0 rounded-md border bg-transparent px-2.5 py-1 text-base transition-colors outline-none focus-visible:ring-3 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3 md:text-sm", className),
16
+ className: cn("dark:bg-edge/30 border-edge focus-visible:border-focus focus-visible:ring-focus/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 disabled:bg-edge/50 dark:disabled:bg-edge/80 placeholder:text-soft h-8 w-full min-w-0 rounded-md border bg-transparent px-2.5 py-1 text-base transition-colors outline-hidden focus-visible:ring-3 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3 md:text-sm", className),
17
17
  ...props
18
18
  });
19
19
  }
@@ -47,7 +47,7 @@ function AutocompleteValue({ ...props }) {
47
47
  function AutocompletePortal({ className, ...props }) {
48
48
  return /* @__PURE__ */ jsx(Autocomplete$1.Portal, {
49
49
  "data-slot": "autocomplete-portal",
50
- className: cn(className),
50
+ className,
51
51
  ...props
52
52
  });
53
53
  }
@@ -61,7 +61,7 @@ function AutocompleteBackdrop({ className, ...props }) {
61
61
  function AutocompletePositioner({ className, ...props }) {
62
62
  return /* @__PURE__ */ jsx(Autocomplete$1.Positioner, {
63
63
  "data-slot": "autocomplete-positioner",
64
- className: cn(className),
64
+ className,
65
65
  ...props
66
66
  });
67
67
  }
@@ -103,7 +103,7 @@ function AutocompleteList({ className, ...props }) {
103
103
  function AutocompleteRow({ className, ...props }) {
104
104
  return /* @__PURE__ */ jsx(Autocomplete$1.Row, {
105
105
  "data-slot": "autocomplete-row",
106
- className: cn(className),
106
+ className,
107
107
  ...props
108
108
  });
109
109
  }
@@ -156,5 +156,3 @@ function AutocompleteContent({ className, align = "start", alignOffset = 0, side
156
156
  }
157
157
  //#endregion
158
158
  export { Autocomplete, AutocompleteArrow, AutocompleteBackdrop, AutocompleteClear, AutocompleteCollection, AutocompleteContent, AutocompleteEmpty, AutocompleteGroup, AutocompleteGroupLabel, AutocompleteIcon, AutocompleteInput, AutocompleteItem, AutocompleteList, AutocompletePopup, AutocompletePortal, AutocompletePositioner, AutocompleteRow, AutocompleteSeparator, AutocompleteStatus, AutocompleteTrigger, AutocompleteValue };
159
-
160
- //# sourceMappingURL=autocomplete.js.map
package/dist/avatar.d.ts CHANGED
@@ -37,5 +37,4 @@ declare function AvatarGroupCount({
37
37
  ...props
38
38
  }: AvatarGroupCountProps): _$react_jsx_runtime0.JSX.Element;
39
39
  //#endregion
40
- export { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage };
41
- //# sourceMappingURL=avatar.d.ts.map
40
+ export { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage };
package/dist/avatar.js CHANGED
@@ -29,7 +29,7 @@ function AvatarFallback({ className, ...props }) {
29
29
  function AvatarBadge({ className, ...props }) {
30
30
  return /* @__PURE__ */ jsx("span", {
31
31
  "data-slot": "avatar-badge",
32
- className: cn("bg-primary text-white ring-foundation absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-blend-color ring-2 select-none", "group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden", "group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2", "group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2", className),
32
+ className: cn("bg-primary text-white ring-foundation absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full ring-2 select-none", "group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden", "group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2", "group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2", className),
33
33
  ...props
34
34
  });
35
35
  }
@@ -49,5 +49,3 @@ function AvatarGroupCount({ className, ...props }) {
49
49
  }
50
50
  //#endregion
51
51
  export { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage };
52
-
53
- //# sourceMappingURL=avatar.js.map
package/dist/badge.d.ts CHANGED
@@ -5,7 +5,7 @@ import * as _$class_variance_authority_types0 from "class-variance-authority/typ
5
5
 
6
6
  //#region src/badge.d.ts
7
7
  declare const badgeVariants: (props?: ({
8
- variant?: "default" | "link" | "success" | "destructive" | "warning" | "secondary" | "outline" | "ghost" | null | undefined;
8
+ variant?: "default" | "success" | "destructive" | "warning" | "secondary" | "outline" | "ghost" | "link" | null | undefined;
9
9
  } & _$class_variance_authority_types0.ClassProp) | undefined) => string;
10
10
  type BadgeProps = useRender.ComponentProps<"span"> & VariantProps<typeof badgeVariants>;
11
11
  declare function Badge({
@@ -15,5 +15,4 @@ declare function Badge({
15
15
  ...props
16
16
  }: BadgeProps): _$react.ReactElement<unknown, string | _$react.JSXElementConstructor<any>>;
17
17
  //#endregion
18
- export { Badge, badgeVariants };
19
- //# sourceMappingURL=badge.d.ts.map
18
+ export { Badge, badgeVariants };
package/dist/badge.js CHANGED
@@ -33,5 +33,3 @@ function Badge({ className, variant = "default", render, ...props }) {
33
33
  }
34
34
  //#endregion
35
35
  export { Badge, badgeVariants };
36
-
37
- //# sourceMappingURL=badge.js.map
@@ -40,5 +40,4 @@ declare function BreadcrumbEllipsis({
40
40
  ...props
41
41
  }: BreadcrumbEllipsisProps): _$react_jsx_runtime0.JSX.Element;
42
42
  //#endregion
43
- export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator };
44
- //# sourceMappingURL=breadcrumb.d.ts.map
43
+ export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator };
@@ -70,5 +70,3 @@ function BreadcrumbEllipsis({ className, ...props }) {
70
70
  }
71
71
  //#endregion
72
72
  export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator };
73
-
74
- //# sourceMappingURL=breadcrumb.js.map
@@ -1,5 +1,5 @@
1
1
  import { Separator } from "./separator.js";
2
- import * as _$react from "react";
2
+ import * as React from "react";
3
3
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
4
4
  import { VariantProps } from "class-variance-authority";
5
5
  import { useRender } from "@base-ui/react/use-render";
@@ -21,12 +21,11 @@ declare function ButtonGroupText({
21
21
  className,
22
22
  render,
23
23
  ...props
24
- }: ButtonGroupTextProps): _$react.ReactElement<unknown, string | _$react.JSXElementConstructor<any>>;
24
+ }: ButtonGroupTextProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
25
25
  declare function ButtonGroupSeparator({
26
26
  className,
27
27
  orientation,
28
28
  ...props
29
29
  }: ButtonGroupSeparatorProps): _$react_jsx_runtime0.JSX.Element;
30
30
  //#endregion
31
- export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants };
32
- //# sourceMappingURL=button-group.d.ts.map
31
+ export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants };
@@ -1,6 +1,7 @@
1
1
  "use client";
2
2
  import { cn } from "./lib/utils.js";
3
3
  import { Separator } from "./separator.js";
4
+ import "react";
4
5
  import { jsx } from "react/jsx-runtime";
5
6
  import { cva } from "class-variance-authority";
6
7
  import { mergeProps } from "@base-ui/react/merge-props";
@@ -40,5 +41,3 @@ function ButtonGroupSeparator({ className, orientation = "vertical", ...props })
40
41
  }
41
42
  //#endregion
42
43
  export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants };
43
-
44
- //# sourceMappingURL=button-group.js.map
package/dist/button.d.ts CHANGED
@@ -6,8 +6,8 @@ import * as _$class_variance_authority_types0 from "class-variance-authority/typ
6
6
 
7
7
  //#region src/button.d.ts
8
8
  declare const buttonVariants: (props?: ({
9
- variant?: "default" | "link" | "success" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
10
- size?: "default" | "icon" | "xs" | "sm" | "lg" | "xl" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
9
+ variant?: "default" | "success" | "destructive" | "secondary" | "outline" | "ghost" | "link" | null | undefined;
10
+ size?: "default" | "xs" | "sm" | "lg" | "xl" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
11
11
  } & _$class_variance_authority_types0.ClassProp) | undefined) => string;
12
12
  type ButtonProps = React.ComponentProps<typeof Button$1> & VariantProps<typeof buttonVariants>;
13
13
  declare function Button({
@@ -17,5 +17,4 @@ declare function Button({
17
17
  ...props
18
18
  }: ButtonProps): _$react_jsx_runtime0.JSX.Element;
19
19
  //#endregion
20
- export { Button, buttonVariants };
21
- //# sourceMappingURL=button.d.ts.map
20
+ export { Button, buttonVariants };
package/dist/button.js CHANGED
@@ -5,7 +5,7 @@ import { jsx } from "react/jsx-runtime";
5
5
  import { Button as Button$1 } from "@base-ui/react/button";
6
6
  import { cva } from "class-variance-authority";
7
7
  //#region src/button.tsx
8
- const buttonVariants = cva("cursor-clickable focus-visible:border-focus focus-visible:ring-focus/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-md border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 aria-invalid:ring-3 [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap motion-color disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none", {
8
+ const buttonVariants = cva("cursor-clickable focus-visible:border-focus focus-visible:ring-focus/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-md border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 aria-invalid:ring-3 [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap motion-color disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-hidden group/button select-none", {
9
9
  variants: {
10
10
  variant: {
11
11
  default: "bg-primary text-white hover:bg-primary/80",
@@ -46,5 +46,3 @@ function Button({ className, variant = "default", size = "default", ...props })
46
46
  }
47
47
  //#endregion
48
48
  export { Button, buttonVariants };
49
-
50
- //# sourceMappingURL=button.js.map
package/dist/card.d.ts CHANGED
@@ -41,5 +41,4 @@ declare function CardFooter({
41
41
  ...props
42
42
  }: CardFooterProps): _$react_jsx_runtime0.JSX.Element;
43
43
  //#endregion
44
- export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
45
- //# sourceMappingURL=card.d.ts.map
44
+ export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
package/dist/card.js CHANGED
@@ -54,5 +54,3 @@ function CardFooter({ className, ...props }) {
54
54
  }
55
55
  //#endregion
56
56
  export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
57
-
58
- //# sourceMappingURL=card.js.map
@@ -9,5 +9,4 @@ declare function Checkbox({
9
9
  ...props
10
10
  }: CheckboxProps): _$react_jsx_runtime0.JSX.Element;
11
11
  //#endregion
12
- export { Checkbox };
13
- //# sourceMappingURL=checkbox.d.ts.map
12
+ export { Checkbox };
package/dist/checkbox.js CHANGED
@@ -1,23 +1,21 @@
1
1
  "use client";
2
2
  import { cn } from "./lib/utils.js";
3
- import { CheckIcon } from "./lib/internal-icons.js";
3
+ import { CheckIcon, MinusIcon } from "./lib/internal-icons.js";
4
4
  import "react";
5
- import { jsx } from "react/jsx-runtime";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
6
  import { Checkbox as Checkbox$1 } from "@base-ui/react/checkbox";
7
7
  //#region src/checkbox.tsx
8
8
  function Checkbox({ className, ...props }) {
9
9
  return /* @__PURE__ */ jsx(Checkbox$1.Root, {
10
10
  "data-slot": "checkbox",
11
- className: cn("cursor-clickable border-edge dark:bg-edge/30 data-checked:bg-primary data-checked:text-white dark:data-checked:bg-primary data-checked:border-primary aria-invalid:aria-checked:border-primary aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 focus-visible:border-focus focus-visible:ring-focus/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3", className),
11
+ className: cn("cursor-clickable border-edge dark:bg-edge/30 data-checked:bg-primary data-indeterminate:bg-primary data-checked:text-white data-indeterminate:text-white dark:data-checked:bg-primary dark:data-indeterminate:bg-primary data-checked:border-primary data-indeterminate:border-primary aria-invalid:aria-checked:border-primary aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 focus-visible:border-focus focus-visible:ring-focus/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border transition-colors outline-hidden group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3", className),
12
12
  ...props,
13
- children: /* @__PURE__ */ jsx(Checkbox$1.Indicator, {
13
+ children: /* @__PURE__ */ jsxs(Checkbox$1.Indicator, {
14
14
  "data-slot": "checkbox-indicator",
15
- className: "grid place-content-center text-current transition-none [&>svg]:size-3.5",
16
- children: /* @__PURE__ */ jsx(CheckIcon, {})
15
+ className: "group/indicator grid place-content-center text-current transition-none [&>svg]:size-3.5",
16
+ children: [/* @__PURE__ */ jsx(CheckIcon, { className: "col-start-1 row-start-1 group-data-indeterminate/indicator:hidden" }), /* @__PURE__ */ jsx(MinusIcon, { className: "col-start-1 row-start-1 hidden group-data-indeterminate/indicator:block" })]
17
17
  })
18
18
  });
19
19
  }
20
20
  //#endregion
21
21
  export { Checkbox };
22
-
23
- //# sourceMappingURL=checkbox.js.map
@@ -17,5 +17,4 @@ declare function CollapsibleContent({
17
17
  ...props
18
18
  }: CollapsibleContentProps): _$react_jsx_runtime0.JSX.Element;
19
19
  //#endregion
20
- export { Collapsible, CollapsibleContent, CollapsibleTrigger };
21
- //# sourceMappingURL=collapsible.d.ts.map
20
+ export { Collapsible, CollapsibleContent, CollapsibleTrigger };
@@ -25,5 +25,3 @@ function CollapsibleContent({ ...props }) {
25
25
  }
26
26
  //#endregion
27
27
  export { Collapsible, CollapsibleContent, CollapsibleTrigger };
28
-
29
- //# sourceMappingURL=collapsible.js.map
@@ -104,5 +104,4 @@ declare function ComboboxChipsInput({
104
104
  }: ComboboxChipsInputProps): _$react_jsx_runtime0.JSX.Element;
105
105
  declare function useComboboxAnchor(): React.RefObject<HTMLDivElement | null>;
106
106
  //#endregion
107
- export { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxClear, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, useComboboxAnchor };
108
- //# sourceMappingURL=combobox.d.ts.map
107
+ export { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxClear, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, useComboboxAnchor };