@cascivo/react 0.12.0 → 0.13.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 (237) hide show
  1. package/dist/accordion/accordion.js +46 -44
  2. package/dist/action-sheet/action-sheet.js +16 -16
  3. package/dist/alert-dialog/alert-dialog.js +34 -34
  4. package/dist/app-shell/app-shell.css +1 -1
  5. package/dist/app-shell/app-shell.js +36 -33
  6. package/dist/app-shell/app-shell.module.js +8 -8
  7. package/dist/avatar-group/avatar-group.js +6 -6
  8. package/dist/badge/badge.js +17 -10
  9. package/dist/bottom-sheet/bottom-sheet.js +18 -18
  10. package/dist/button/button.css +1 -1
  11. package/dist/button/button.js +15 -12
  12. package/dist/button/button.module.js +1 -1
  13. package/dist/button-group/button-group.js +8 -8
  14. package/dist/card/card.css +1 -1
  15. package/dist/card/card.module.js +8 -8
  16. package/dist/carousel/carousel.js +20 -20
  17. package/dist/checkbox/checkbox.js +21 -21
  18. package/dist/checkbox-card/checkbox-card.js +15 -13
  19. package/dist/collapsible/collapsible.js +7 -7
  20. package/dist/color-picker/color-picker.js +26 -26
  21. package/dist/combobox/combobox.css +1 -1
  22. package/dist/combobox/combobox.js +86 -86
  23. package/dist/combobox/combobox.module.js +15 -15
  24. package/dist/command-menu/command-menu.js +111 -111
  25. package/dist/comparison/comparison.js +10 -10
  26. package/dist/context-menu/context-menu.js +9 -9
  27. package/dist/copy-button/copy-button.js +18 -16
  28. package/dist/data-table/data-table.css +1 -1
  29. package/dist/data-table/data-table.js +8 -2
  30. package/dist/data-table/data-table.module.js +29 -29
  31. package/dist/date-picker/date-picker.css +1 -1
  32. package/dist/date-picker/date-picker.js +25 -25
  33. package/dist/date-picker/date-picker.module.js +19 -19
  34. package/dist/date-range-picker/date-range-picker.js +26 -26
  35. package/dist/drawer/drawer.css +1 -1
  36. package/dist/drawer/drawer.js +18 -17
  37. package/dist/drawer/drawer.module.js +9 -9
  38. package/dist/dropdown/dropdown.js +48 -48
  39. package/dist/editable/editable.js +11 -11
  40. package/dist/fab/fab.js +53 -53
  41. package/dist/field/field.js +8 -8
  42. package/dist/file-uploader/file-uploader.css +1 -1
  43. package/dist/file-uploader/file-uploader.js +19 -19
  44. package/dist/file-uploader/file-uploader.module.js +14 -14
  45. package/dist/filter/filter.js +10 -9
  46. package/dist/header-panel/header-panel.js +31 -31
  47. package/dist/hover-card/hover-card.js +21 -21
  48. package/dist/icon-button/icon-button.css +1 -1
  49. package/dist/icon-button/icon-button.js +5 -5
  50. package/dist/icon-button/icon-button.module.js +1 -1
  51. package/dist/index.d.ts +1475 -251
  52. package/dist/input/input.css +1 -1
  53. package/dist/input/input.js +22 -21
  54. package/dist/input/input.module.js +5 -5
  55. package/dist/item/item.css +1 -1
  56. package/dist/item/item.module.js +6 -6
  57. package/dist/layouts/src/page-header/page-header.css +1 -0
  58. package/dist/layouts/src/page-header/page-header.js +33 -0
  59. package/dist/layouts/src/page-header/page-header.module.js +13 -0
  60. package/dist/link/link.js +14 -12
  61. package/dist/log-viewer/log-viewer.js +26 -26
  62. package/dist/menu/menu.js +20 -20
  63. package/dist/menu-button/menu-button.js +48 -48
  64. package/dist/menubar/menubar.js +42 -42
  65. package/dist/modal/modal.css +1 -1
  66. package/dist/modal/modal.js +41 -35
  67. package/dist/modal/modal.module.js +8 -7
  68. package/dist/multi-select/multi-select.css +1 -1
  69. package/dist/multi-select/multi-select.js +57 -57
  70. package/dist/multi-select/multi-select.module.js +11 -11
  71. package/dist/native-select/native-select.js +13 -11
  72. package/dist/navigation-menu/navigation-menu.js +46 -46
  73. package/dist/node/accordion/accordion.js +46 -44
  74. package/dist/node/action-sheet/action-sheet.js +16 -16
  75. package/dist/node/alert-dialog/alert-dialog.js +34 -34
  76. package/dist/node/app-shell/app-shell.js +36 -33
  77. package/dist/node/app-shell/app-shell.module.js +8 -8
  78. package/dist/node/avatar-group/avatar-group.js +6 -6
  79. package/dist/node/badge/badge.js +17 -10
  80. package/dist/node/bottom-sheet/bottom-sheet.js +18 -18
  81. package/dist/node/button/button.js +15 -12
  82. package/dist/node/button/button.module.js +1 -1
  83. package/dist/node/button-group/button-group.js +8 -8
  84. package/dist/node/card/card.module.js +8 -8
  85. package/dist/node/carousel/carousel.js +20 -20
  86. package/dist/node/checkbox/checkbox.js +21 -21
  87. package/dist/node/checkbox-card/checkbox-card.js +15 -13
  88. package/dist/node/collapsible/collapsible.js +7 -7
  89. package/dist/node/color-picker/color-picker.js +26 -26
  90. package/dist/node/combobox/combobox.js +86 -86
  91. package/dist/node/combobox/combobox.module.js +15 -15
  92. package/dist/node/command-menu/command-menu.js +111 -111
  93. package/dist/node/comparison/comparison.js +10 -10
  94. package/dist/node/context-menu/context-menu.js +9 -9
  95. package/dist/node/copy-button/copy-button.js +18 -16
  96. package/dist/node/data-table/data-table.js +8 -2
  97. package/dist/node/data-table/data-table.module.js +29 -29
  98. package/dist/node/date-picker/date-picker.js +25 -25
  99. package/dist/node/date-picker/date-picker.module.js +19 -19
  100. package/dist/node/date-range-picker/date-range-picker.js +26 -26
  101. package/dist/node/drawer/drawer.js +18 -17
  102. package/dist/node/drawer/drawer.module.js +9 -9
  103. package/dist/node/dropdown/dropdown.js +48 -48
  104. package/dist/node/editable/editable.js +11 -11
  105. package/dist/node/fab/fab.js +53 -53
  106. package/dist/node/field/field.js +8 -8
  107. package/dist/node/file-uploader/file-uploader.js +19 -19
  108. package/dist/node/file-uploader/file-uploader.module.js +14 -14
  109. package/dist/node/filter/filter.js +10 -9
  110. package/dist/node/header-panel/header-panel.js +31 -31
  111. package/dist/node/hover-card/hover-card.js +21 -21
  112. package/dist/node/icon-button/icon-button.js +5 -5
  113. package/dist/node/icon-button/icon-button.module.js +1 -1
  114. package/dist/node/input/input.js +22 -21
  115. package/dist/node/input/input.module.js +5 -5
  116. package/dist/node/item/item.module.js +6 -6
  117. package/dist/node/layouts/src/page-header/page-header.js +33 -0
  118. package/dist/node/layouts/src/page-header/page-header.module.js +12 -0
  119. package/dist/node/link/link.js +14 -12
  120. package/dist/node/log-viewer/log-viewer.js +26 -26
  121. package/dist/node/menu/menu.js +20 -20
  122. package/dist/node/menu-button/menu-button.js +48 -48
  123. package/dist/node/menubar/menubar.js +42 -42
  124. package/dist/node/modal/modal.js +41 -35
  125. package/dist/node/modal/modal.module.js +8 -7
  126. package/dist/node/multi-select/multi-select.js +57 -57
  127. package/dist/node/multi-select/multi-select.module.js +11 -11
  128. package/dist/node/native-select/native-select.js +13 -11
  129. package/dist/node/navigation-menu/navigation-menu.js +46 -46
  130. package/dist/node/notification/notification.js +50 -44
  131. package/dist/node/notification/notification.module.js +7 -7
  132. package/dist/node/number-input/number-input.js +52 -50
  133. package/dist/node/number-input/number-input.module.js +8 -8
  134. package/dist/node/otp-input/otp-input.js +8 -8
  135. package/dist/node/otp-input/otp-input.module.js +2 -2
  136. package/dist/node/overflow-menu/overflow-menu.js +18 -13
  137. package/dist/node/password-input/password-input.js +28 -27
  138. package/dist/node/password-input/password-input.module.js +7 -7
  139. package/dist/node/popover/popover.js +26 -24
  140. package/dist/node/progress/progress.js +3 -2
  141. package/dist/node/pull-to-refresh/pull-to-refresh.js +13 -13
  142. package/dist/node/radial-progress/radial-progress.js +5 -5
  143. package/dist/node/radio/radio.js +23 -22
  144. package/dist/node/radio-card/radio-card.js +27 -26
  145. package/dist/node/react/src/index.js +4 -3
  146. package/dist/node/react/src/theme.js +30 -19
  147. package/dist/node/resizable/resizable.js +11 -11
  148. package/dist/node/scroll-area/scroll-area.js +4 -4
  149. package/dist/node/search/search.js +49 -49
  150. package/dist/node/search/search.module.js +5 -5
  151. package/dist/node/select/select.js +27 -26
  152. package/dist/node/sheet/sheet.js +11 -10
  153. package/dist/node/sheet/sheet.module.js +5 -5
  154. package/dist/node/side-nav/side-nav.js +91 -91
  155. package/dist/node/skip-nav/skip-nav.js +12 -12
  156. package/dist/node/slider/slider.js +13 -11
  157. package/dist/node/stat/stat.js +6 -5
  158. package/dist/node/stat/stat.module.js +7 -7
  159. package/dist/node/status/status.js +18 -11
  160. package/dist/node/steps/steps.js +23 -23
  161. package/dist/node/structured-list/structured-list.js +33 -32
  162. package/dist/node/tabs/tabs.js +49 -47
  163. package/dist/node/tag/tag.js +22 -15
  164. package/dist/node/tags-input/tags-input.js +35 -35
  165. package/dist/node/tags-input/tags-input.module.js +4 -4
  166. package/dist/node/textarea/textarea.js +22 -21
  167. package/dist/node/tile/tile.module.js +3 -3
  168. package/dist/node/time-picker/time-picker.js +22 -21
  169. package/dist/node/time-picker/time-picker.module.js +5 -5
  170. package/dist/node/timeline/timeline.js +22 -16
  171. package/dist/node/toast/toast.js +15 -15
  172. package/dist/node/toc/toc.js +8 -8
  173. package/dist/node/toggle/toggle.js +15 -13
  174. package/dist/node/toggle-group/toggle-group.js +10 -10
  175. package/dist/node/toggletip/toggletip.js +9 -9
  176. package/dist/node/tooltip/tooltip.js +5 -5
  177. package/dist/node/tree-view/tree-view.js +32 -32
  178. package/dist/notification/notification.css +1 -1
  179. package/dist/notification/notification.js +50 -44
  180. package/dist/notification/notification.module.js +7 -7
  181. package/dist/number-input/number-input.css +1 -1
  182. package/dist/number-input/number-input.js +52 -50
  183. package/dist/number-input/number-input.module.js +8 -8
  184. package/dist/otp-input/otp-input.css +1 -1
  185. package/dist/otp-input/otp-input.js +8 -8
  186. package/dist/otp-input/otp-input.module.js +2 -2
  187. package/dist/overflow-menu/overflow-menu.js +18 -13
  188. package/dist/password-input/password-input.css +1 -1
  189. package/dist/password-input/password-input.js +28 -27
  190. package/dist/password-input/password-input.module.js +7 -7
  191. package/dist/popover/popover.js +26 -24
  192. package/dist/progress/progress.js +3 -2
  193. package/dist/pull-to-refresh/pull-to-refresh.js +13 -13
  194. package/dist/radial-progress/radial-progress.js +5 -5
  195. package/dist/radio/radio.js +23 -22
  196. package/dist/radio-card/radio-card.js +27 -26
  197. package/dist/react/src/index.js +4 -3
  198. package/dist/react/src/theme.js +30 -19
  199. package/dist/resizable/resizable.js +11 -11
  200. package/dist/scroll-area/scroll-area.js +4 -4
  201. package/dist/search/search.css +1 -1
  202. package/dist/search/search.js +49 -49
  203. package/dist/search/search.module.js +5 -5
  204. package/dist/select/select.js +27 -26
  205. package/dist/sheet/sheet.css +1 -1
  206. package/dist/sheet/sheet.js +11 -10
  207. package/dist/sheet/sheet.module.js +5 -5
  208. package/dist/side-nav/side-nav.js +91 -91
  209. package/dist/skip-nav/skip-nav.js +12 -12
  210. package/dist/slider/slider.js +13 -11
  211. package/dist/stat/stat.css +1 -1
  212. package/dist/stat/stat.js +6 -5
  213. package/dist/stat/stat.module.js +7 -7
  214. package/dist/status/status.js +18 -11
  215. package/dist/steps/steps.js +23 -23
  216. package/dist/structured-list/structured-list.js +33 -32
  217. package/dist/styles.css +87 -23
  218. package/dist/tabs/tabs.js +49 -47
  219. package/dist/tag/tag.js +22 -15
  220. package/dist/tags-input/tags-input.css +1 -1
  221. package/dist/tags-input/tags-input.js +35 -35
  222. package/dist/tags-input/tags-input.module.js +4 -4
  223. package/dist/textarea/textarea.js +22 -21
  224. package/dist/tile/tile.css +1 -1
  225. package/dist/tile/tile.module.js +3 -3
  226. package/dist/time-picker/time-picker.css +1 -1
  227. package/dist/time-picker/time-picker.js +22 -21
  228. package/dist/time-picker/time-picker.module.js +5 -5
  229. package/dist/timeline/timeline.js +22 -16
  230. package/dist/toast/toast.js +15 -15
  231. package/dist/toc/toc.js +8 -8
  232. package/dist/toggle/toggle.js +15 -13
  233. package/dist/toggle-group/toggle-group.js +10 -10
  234. package/dist/toggletip/toggletip.js +9 -9
  235. package/dist/tooltip/tooltip.js +5 -5
  236. package/dist/tree-view/tree-view.js +32 -32
  237. package/package.json +10 -4
@@ -1,17 +1,24 @@
1
1
  "use client";
2
2
 
3
3
  import e from "./badge.module.js";
4
- import { cn as t } from "@cascivo/core";
5
- import { jsx as n } from "react/jsx-runtime";
4
+ import { cn as t, normalizeTone as n } from "@cascivo/core";
5
+ import { jsx as r } from "react/jsx-runtime";
6
6
  //#region ../components/src/badge/badge.tsx
7
- function r({ variant: r = "default", size: i = "md", className: a, children: o, ...s }) {
8
- return /* @__PURE__ */ n("span", {
9
- "data-variant": r,
10
- "data-size": i,
11
- className: t(e.badge, a),
12
- ...s,
13
- children: o
7
+ var i = {
8
+ neutral: "default",
9
+ info: "info",
10
+ success: "success",
11
+ warning: "warning",
12
+ danger: "destructive"
13
+ };
14
+ function a({ variant: a = "default", size: o = "md", className: s, children: c, ...l }) {
15
+ return /* @__PURE__ */ r("span", {
16
+ "data-variant": i[n(a)] ?? a,
17
+ "data-size": o,
18
+ className: t(e.badge, s),
19
+ ...l,
20
+ children: c
14
21
  });
15
22
  }
16
23
  //#endregion
17
- export { r as Badge };
24
+ export { a as Badge };
@@ -2,9 +2,9 @@
2
2
 
3
3
  import e from "./bottom-sheet.module.js";
4
4
  import { DismissableLayer as t, FocusScope as n, Portal as r, Presence as i, cn as a, useControllableSignal as o, useDraggable as s, useScrollLock as c, useSignals as l } from "@cascivo/core";
5
- import { builtin as u, t as d } from "@cascivo/i18n";
6
- import { jsx as f, jsxs as p } from "react/jsx-runtime";
7
- import { useId as m } from "react";
5
+ import { useId as u } from "react";
6
+ import { builtin as d, t as f } from "@cascivo/i18n";
7
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
8
8
  //#region ../components/src/bottom-sheet/bottom-sheet.tsx
9
9
  var h = 120, g = .6, _ = .1, v = [.5, .92];
10
10
  function y({ open: y, defaultOpen: b, onOpenChange: x, snapPoints: S = v, activeSnap: C, defaultSnap: w = 0, onSnapChange: T, title: E, description: D, children: O, labels: k, className: A }) {
@@ -33,22 +33,22 @@ function y({ open: y, defaultOpen: b, onOpenChange: x, snapPoints: S = v, active
33
33
  for (let e = 1; e < F.length; e++) Math.abs((F[e] ?? 0) - r) < Math.abs((F[i] ?? 0) - r) && (i = e);
34
34
  P(i);
35
35
  }
36
- }), W = m(), G = m(), K = k?.close ?? d(u.bottomSheet.close), q = k?.handle ?? d(u.bottomSheet.handle), J = `${(1 - R / I) * 100}%`, Y = {
36
+ }), W = u(), G = u(), K = k?.close ?? f(d.bottomSheet.close), q = k?.handle ?? f(d.bottomSheet.handle), J = `${(1 - R / I) * 100}%`, Y = {
37
37
  "--_sheet-height": `${I * 100}dvh`,
38
38
  "--_sheet-y": J,
39
39
  "--_sheet-drag": `${B.value.y}px`
40
40
  };
41
- return /* @__PURE__ */ f(r, { children: /* @__PURE__ */ f(i, {
41
+ return /* @__PURE__ */ p(r, { children: /* @__PURE__ */ p(i, {
42
42
  present: j,
43
- children: /* @__PURE__ */ f("div", {
43
+ children: /* @__PURE__ */ p("div", {
44
44
  className: e.overlay,
45
- children: /* @__PURE__ */ f(t, {
45
+ children: /* @__PURE__ */ p(t, {
46
46
  onDismiss: () => M(!1),
47
- children: /* @__PURE__ */ f(n, {
47
+ children: /* @__PURE__ */ p(n, {
48
48
  trapped: !0,
49
49
  restoreFocus: !0,
50
50
  autoFocus: !0,
51
- children: /* @__PURE__ */ p("div", {
51
+ children: /* @__PURE__ */ m("div", {
52
52
  role: "dialog",
53
53
  "aria-modal": "true",
54
54
  "aria-labelledby": E ? W : void 0,
@@ -56,38 +56,38 @@ function y({ open: y, defaultOpen: b, onOpenChange: x, snapPoints: S = v, active
56
56
  "data-dragging": H.value ? "" : void 0,
57
57
  className: a(e.panel, A),
58
58
  style: Y,
59
- children: [/* @__PURE__ */ p("div", {
59
+ children: [/* @__PURE__ */ m("div", {
60
60
  className: e.header,
61
61
  ref: z,
62
62
  children: [
63
- /* @__PURE__ */ f("div", {
63
+ /* @__PURE__ */ p("div", {
64
64
  className: e.handle,
65
65
  role: "separator",
66
66
  "aria-label": q,
67
67
  "aria-orientation": "horizontal"
68
68
  }),
69
- (E || D) && /* @__PURE__ */ p("div", {
69
+ (E || D) && /* @__PURE__ */ m("div", {
70
70
  className: e.heading,
71
- children: [E && /* @__PURE__ */ f("h2", {
71
+ children: [E && /* @__PURE__ */ p("h2", {
72
72
  id: W,
73
73
  className: e.title,
74
74
  children: E
75
- }), D && /* @__PURE__ */ f("p", {
75
+ }), D && /* @__PURE__ */ p("p", {
76
76
  id: G,
77
77
  className: e.description,
78
78
  children: D
79
79
  })]
80
80
  }),
81
- /* @__PURE__ */ f("button", {
81
+ /* @__PURE__ */ p("button", {
82
82
  type: "button",
83
83
  "aria-label": K,
84
84
  onClick: () => M(!1),
85
85
  className: e.close,
86
- children: /* @__PURE__ */ f("svg", {
86
+ children: /* @__PURE__ */ p("svg", {
87
87
  "aria-hidden": "true",
88
88
  viewBox: "0 0 16 16",
89
89
  className: e.closeIcon,
90
- children: /* @__PURE__ */ f("path", {
90
+ children: /* @__PURE__ */ p("path", {
91
91
  d: "M4 4l8 8M12 4l-8 8",
92
92
  fill: "none",
93
93
  stroke: "currentColor",
@@ -97,7 +97,7 @@ function y({ open: y, defaultOpen: b, onOpenChange: x, snapPoints: S = v, active
97
97
  })
98
98
  })
99
99
  ]
100
- }), /* @__PURE__ */ f("div", {
100
+ }), /* @__PURE__ */ p("div", {
101
101
  className: e.body,
102
102
  children: O
103
103
  })]
@@ -3,29 +3,32 @@
3
3
  import { Spinner as e } from "../spinner/spinner.js";
4
4
  import t from "./button.module.js";
5
5
  import { Slot as n, cn as r } from "@cascivo/core";
6
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
+ import { forwardRef as i } from "react";
7
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
7
8
  //#region ../components/src/button/button.tsx
8
- function o({ variant: o = "primary", size: s = "md", loading: c = !1, asChild: l = !1, className: u, disabled: d, children: f, ...p }) {
9
- let m = {
10
- "data-variant": o,
9
+ var s = i(function({ variant: i = "primary", size: s = "md", loading: c = !1, asChild: l = !1, className: u, disabled: d, children: f, ...p }, m) {
10
+ let h = {
11
+ "data-variant": i,
11
12
  "data-size": s,
12
13
  "data-state": c ? "loading" : "idle",
13
14
  "aria-busy": c || void 0,
14
15
  className: r(t.button, u)
15
16
  };
16
- return l ? /* @__PURE__ */ i(n, {
17
- ...m,
17
+ return l ? /* @__PURE__ */ a(n, {
18
+ ...h,
19
+ ref: m,
18
20
  ...p,
19
21
  children: f
20
- }) : /* @__PURE__ */ a("button", {
21
- ...m,
22
+ }) : /* @__PURE__ */ o("button", {
23
+ ...h,
24
+ ref: m,
22
25
  disabled: d || c,
23
26
  ...p,
24
- children: [c && /* @__PURE__ */ i(e, {
27
+ children: [c && /* @__PURE__ */ a(e, {
25
28
  size: "sm",
26
29
  "aria-hidden": "true"
27
- }), /* @__PURE__ */ i("span", { children: f })]
30
+ }), /* @__PURE__ */ a("span", { children: f })]
28
31
  });
29
- }
32
+ });
30
33
  //#endregion
31
- export { o as Button };
34
+ export { s as Button };
@@ -1,5 +1,5 @@
1
1
  "use client";
2
2
 
3
- var e = { button: "_button_11p57_2" };
3
+ var e = { button: "_button_131qn_2" };
4
4
  //#endregion
5
5
  export { e as default };
@@ -2,24 +2,24 @@
2
2
 
3
3
  import e from "./button-group.module.js";
4
4
  import { cn as t } from "@cascivo/core";
5
- import { jsx as n } from "react/jsx-runtime";
6
- import { forwardRef as r } from "react";
5
+ import { forwardRef as n } from "react";
6
+ import { jsx as r } from "react/jsx-runtime";
7
7
  //#region ../components/src/button-group/button-group.tsx
8
8
  function i(e) {
9
9
  return Array.from(e.querySelectorAll("button, a[href], [tabindex]")).filter((e) => !e.hasAttribute("disabled") && e.getAttribute("aria-disabled") !== "true");
10
10
  }
11
- var a = r(function({ orientation: r = "horizontal", size: a = "md", roving: o = !1, loop: s = !1, className: c, onKeyDown: l, children: u, ...d }, f) {
12
- return /* @__PURE__ */ n("div", {
11
+ var a = n(function({ orientation: n = "horizontal", size: a = "md", roving: o = !1, loop: s = !1, className: c, onKeyDown: l, children: u, ...d }, f) {
12
+ return /* @__PURE__ */ r("div", {
13
13
  role: "group",
14
- "data-orientation": r,
14
+ "data-orientation": n,
15
15
  "data-size": a,
16
16
  className: t(e.buttonGroup, c),
17
17
  ref: f,
18
18
  onKeyDown: (e) => {
19
19
  if (l?.(e), !o) return;
20
- let t = r === "horizontal", n = t ? "ArrowRight" : "ArrowDown", a = t ? "ArrowLeft" : "ArrowUp";
20
+ let t = n === "horizontal", r = t ? "ArrowRight" : "ArrowDown", a = t ? "ArrowLeft" : "ArrowUp";
21
21
  if (![
22
- n,
22
+ r,
23
23
  a,
24
24
  "Home",
25
25
  "End"
@@ -29,7 +29,7 @@ var a = r(function({ orientation: r = "horizontal", size: a = "md", roving: o =
29
29
  let u = c.indexOf(document.activeElement);
30
30
  if (u === -1) return;
31
31
  let d = u;
32
- e.key === n ? d = u + 1 : e.key === a ? d = u - 1 : e.key === "Home" ? d = 0 : e.key === "End" && (d = c.length - 1), d < 0 && (d = s ? c.length - 1 : 0), d >= c.length && (d = s ? 0 : c.length - 1), e.preventDefault(), c[d]?.focus();
32
+ e.key === r ? d = u + 1 : e.key === a ? d = u - 1 : e.key === "Home" ? d = 0 : e.key === "End" && (d = c.length - 1), d < 0 && (d = s ? c.length - 1 : 0), d >= c.length && (d = s ? 0 : c.length - 1), e.preventDefault(), c[d]?.focus();
33
33
  },
34
34
  ...d,
35
35
  children: u
@@ -1,14 +1,14 @@
1
1
  "use client";
2
2
 
3
3
  var e = {
4
- card: "_card_4huda_2",
5
- header: "_header_4huda_35",
6
- headerRow: "_headerRow_4huda_49",
7
- headerMain: "_headerMain_4huda_57",
8
- headerActions: "_headerActions_4huda_64",
9
- title: "_title_4huda_72",
10
- content: "_content_4huda_81",
11
- footer: "_footer_4huda_89"
4
+ card: "_card_ssezx_2",
5
+ header: "_header_ssezx_12",
6
+ content: "_content_ssezx_12",
7
+ footer: "_footer_ssezx_12",
8
+ headerRow: "_headerRow_ssezx_67",
9
+ headerMain: "_headerMain_ssezx_75",
10
+ headerActions: "_headerActions_ssezx_82",
11
+ title: "_title_ssezx_90"
12
12
  };
13
13
  //#endregion
14
14
  export { e as default };
@@ -2,20 +2,20 @@
2
2
 
3
3
  import e from "./carousel.module.js";
4
4
  import { cn as t, useControllableSignal as n, useRovingFocus as r, useSignalEffect as i, useSignals as a } from "@cascivo/core";
5
- import { builtin as o, t as s } from "@cascivo/i18n";
6
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
7
- import { useId as u, useRef as d } from "react";
5
+ import { useId as o, useRef as s } from "react";
6
+ import { builtin as c, t as l } from "@cascivo/i18n";
7
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
8
8
  //#region ../components/src/carousel/carousel.tsx
9
9
  function f(e, t) {
10
10
  return t || (e == null ? [] : Array.isArray(e) ? e : [e]);
11
11
  }
12
12
  function p({ children: p, slides: m, index: h, defaultIndex: g, onIndexChange: _, loop: v = !1, className: y, labels: b }) {
13
13
  a();
14
- let x = u(), S = f(p, m), C = S.length, [w, T] = n({
14
+ let x = o(), S = f(p, m), C = S.length, [w, T] = n({
15
15
  value: h,
16
16
  defaultValue: g ?? 0,
17
17
  onChange: _
18
- }), E = d(null), D = d([]), O = d(!1), { getItemProps: k, setActiveIndex: A } = r({
18
+ }), E = s(null), D = s([]), O = s(!1), { getItemProps: k, setActiveIndex: A } = r({
19
19
  orientation: "horizontal",
20
20
  loop: v
21
21
  });
@@ -40,28 +40,28 @@ function p({ children: p, slides: m, index: h, defaultIndex: g, onIndexChange: _
40
40
  }), window.setTimeout(() => {
41
41
  O.current = !1;
42
42
  }, 400)), T(t), A(t);
43
- }, M = b?.region ?? s(o.carousel.region), N = b?.previous ?? s(o.carousel.previous), P = b?.next ?? s(o.carousel.next);
44
- return /* @__PURE__ */ l("section", {
43
+ }, M = b?.region ?? l(c.carousel.region), N = b?.previous ?? l(c.carousel.previous), P = b?.next ?? l(c.carousel.next);
44
+ return /* @__PURE__ */ d("section", {
45
45
  className: t(e.carousel, y),
46
46
  "aria-roledescription": "carousel",
47
47
  "aria-label": M,
48
- children: [/* @__PURE__ */ l("div", {
48
+ children: [/* @__PURE__ */ d("div", {
49
49
  className: e.viewport,
50
50
  children: [
51
- /* @__PURE__ */ c("button", {
51
+ /* @__PURE__ */ u("button", {
52
52
  type: "button",
53
53
  className: t(e.nav, e.prev),
54
54
  "aria-label": N,
55
55
  "aria-controls": `${x}-track`,
56
56
  disabled: !v && w.value <= 0,
57
57
  onClick: () => j(w.value - 1),
58
- children: /* @__PURE__ */ c("svg", {
58
+ children: /* @__PURE__ */ u("svg", {
59
59
  width: "20",
60
60
  height: "20",
61
61
  viewBox: "0 0 24 24",
62
62
  fill: "none",
63
63
  "aria-hidden": "true",
64
- children: /* @__PURE__ */ c("path", {
64
+ children: /* @__PURE__ */ u("path", {
65
65
  d: "m15 18-6-6 6-6",
66
66
  stroke: "currentColor",
67
67
  strokeWidth: "2",
@@ -70,18 +70,18 @@ function p({ children: p, slides: m, index: h, defaultIndex: g, onIndexChange: _
70
70
  })
71
71
  })
72
72
  }),
73
- /* @__PURE__ */ c("div", {
73
+ /* @__PURE__ */ u("div", {
74
74
  ref: E,
75
75
  id: `${x}-track`,
76
76
  className: e.track,
77
- children: S.map((t, n) => /* @__PURE__ */ c("div", {
77
+ children: S.map((t, n) => /* @__PURE__ */ u("div", {
78
78
  ref: (e) => {
79
79
  D.current[n] = e;
80
80
  },
81
81
  className: e.slide,
82
82
  role: "group",
83
83
  "aria-roledescription": "slide",
84
- "aria-label": s(o.carousel.slide, {
84
+ "aria-label": l(c.carousel.slide, {
85
85
  n: n + 1,
86
86
  total: C
87
87
  }),
@@ -89,20 +89,20 @@ function p({ children: p, slides: m, index: h, defaultIndex: g, onIndexChange: _
89
89
  children: t
90
90
  }, n))
91
91
  }),
92
- /* @__PURE__ */ c("button", {
92
+ /* @__PURE__ */ u("button", {
93
93
  type: "button",
94
94
  className: t(e.nav, e.next),
95
95
  "aria-label": P,
96
96
  "aria-controls": `${x}-track`,
97
97
  disabled: !v && w.value >= C - 1,
98
98
  onClick: () => j(w.value + 1),
99
- children: /* @__PURE__ */ c("svg", {
99
+ children: /* @__PURE__ */ u("svg", {
100
100
  width: "20",
101
101
  height: "20",
102
102
  viewBox: "0 0 24 24",
103
103
  fill: "none",
104
104
  "aria-hidden": "true",
105
- children: /* @__PURE__ */ c("path", {
105
+ children: /* @__PURE__ */ u("path", {
106
106
  d: "m9 18 6-6-6-6",
107
107
  stroke: "currentColor",
108
108
  strokeWidth: "2",
@@ -112,17 +112,17 @@ function p({ children: p, slides: m, index: h, defaultIndex: g, onIndexChange: _
112
112
  })
113
113
  })
114
114
  ]
115
- }), /* @__PURE__ */ c("div", {
115
+ }), /* @__PURE__ */ u("div", {
116
116
  className: e.dots,
117
117
  role: "group",
118
118
  "aria-label": M,
119
119
  children: S.map((t, n) => {
120
120
  let r = k(n);
121
- return /* @__PURE__ */ c("button", {
121
+ return /* @__PURE__ */ u("button", {
122
122
  ref: r.ref,
123
123
  type: "button",
124
124
  className: e.dot,
125
- "aria-label": s(o.carousel.goTo, { n: n + 1 }),
125
+ "aria-label": l(c.carousel.goTo, { n: n + 1 }),
126
126
  "aria-current": n === w.value || void 0,
127
127
  "data-active": n === w.value || void 0,
128
128
  tabIndex: r.tabIndex,
@@ -1,38 +1,38 @@
1
1
  "use client";
2
2
 
3
3
  import e from "./checkbox.module.js";
4
- import { cn as t, useEffectPropSignal as n, useSignalEffect as r } from "@cascivo/core";
5
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
- import { useRef as o } from "react";
4
+ import { cn as t, composeRefs as n, useEffectPropSignal as r, useSignalEffect as i } from "@cascivo/core";
5
+ import { forwardRef as a, useRef as o } from "react";
6
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
7
7
  //#region ../components/src/checkbox/checkbox.tsx
8
- function s({ label: s, indeterminate: c = !1, className: l, id: u, disabled: d, ...f }) {
9
- let p = o(null), m = n(c);
10
- r(() => {
11
- p.current && (p.current.indeterminate = m.value);
8
+ var l = a(function({ label: a, indeterminate: l = !1, className: u, id: d, disabled: f, ...p }, m) {
9
+ let h = o(null), g = r(l);
10
+ i(() => {
11
+ h.current && (h.current.indeterminate = g.value);
12
12
  });
13
- let h = u ?? (s ? `cascade-checkbox-${s.toLowerCase().replace(/\s+/g, "-")}` : void 0);
14
- return /* @__PURE__ */ a("label", {
15
- className: t(e.wrapper, l),
16
- "data-disabled": d || void 0,
13
+ let _ = d ?? (a ? `cascade-checkbox-${a.toLowerCase().replace(/\s+/g, "-")}` : void 0);
14
+ return /* @__PURE__ */ c("label", {
15
+ className: t(e.wrapper, u),
16
+ "data-disabled": f || void 0,
17
17
  children: [
18
- /* @__PURE__ */ i("input", {
19
- ref: p,
20
- id: h,
18
+ /* @__PURE__ */ s("input", {
19
+ ref: n(m, h),
20
+ id: _,
21
21
  type: "checkbox",
22
22
  className: e.input,
23
- disabled: d,
24
- ...f
23
+ disabled: f,
24
+ ...p
25
25
  }),
26
- /* @__PURE__ */ i("span", {
26
+ /* @__PURE__ */ s("span", {
27
27
  className: e.control,
28
28
  "aria-hidden": "true"
29
29
  }),
30
- s && /* @__PURE__ */ i("span", {
30
+ a && /* @__PURE__ */ s("span", {
31
31
  className: e.label,
32
- children: s
32
+ children: a
33
33
  })
34
34
  ]
35
35
  });
36
- }
36
+ });
37
37
  //#endregion
38
- export { s as Checkbox };
38
+ export { l as Checkbox };
@@ -2,28 +2,30 @@
2
2
 
3
3
  import e from "./checkbox-card.module.js";
4
4
  import { cn as t } from "@cascivo/core";
5
- import { jsx as n, jsxs as r } from "react/jsx-runtime";
5
+ import { forwardRef as n } from "react";
6
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
6
7
  //#region ../components/src/checkbox-card/checkbox-card.tsx
7
- function i({ title: i, description: a, checked: o, defaultChecked: s, disabled: c, onCheckedChange: l, className: u, ...d }) {
8
- return /* @__PURE__ */ r("label", {
8
+ var a = n(function({ title: n, description: a, checked: o, defaultChecked: s, disabled: c, onCheckedChange: l, className: u, ...d }, f) {
9
+ return /* @__PURE__ */ i("label", {
9
10
  className: t(e.card, u),
10
11
  "data-disabled": c || void 0,
11
12
  children: [
12
- /* @__PURE__ */ n("input", {
13
+ /* @__PURE__ */ r("input", {
13
14
  type: "checkbox",
14
15
  className: e.input,
15
16
  disabled: c,
16
17
  ...o === void 0 ? { defaultChecked: s } : { checked: o },
17
18
  onChange: (e) => l?.(e.currentTarget.checked),
19
+ ref: f,
18
20
  ...d
19
21
  }),
20
- /* @__PURE__ */ n("span", {
22
+ /* @__PURE__ */ r("span", {
21
23
  className: e.glyph,
22
24
  "aria-hidden": "true",
23
- children: /* @__PURE__ */ n("svg", {
25
+ children: /* @__PURE__ */ r("svg", {
24
26
  viewBox: "0 0 12 12",
25
27
  className: e.check,
26
- children: /* @__PURE__ */ n("path", {
28
+ children: /* @__PURE__ */ r("path", {
27
29
  d: "M2.5 6.5 5 9l4.5-5.5",
28
30
  fill: "none",
29
31
  stroke: "currentColor",
@@ -31,18 +33,18 @@ function i({ title: i, description: a, checked: o, defaultChecked: s, disabled:
31
33
  })
32
34
  })
33
35
  }),
34
- /* @__PURE__ */ r("span", {
36
+ /* @__PURE__ */ i("span", {
35
37
  className: e.body,
36
- children: [/* @__PURE__ */ n("span", {
38
+ children: [/* @__PURE__ */ r("span", {
37
39
  className: e.title,
38
- children: i
39
- }), a && /* @__PURE__ */ n("span", {
40
+ children: n
41
+ }), a && /* @__PURE__ */ r("span", {
40
42
  className: e.description,
41
43
  children: a
42
44
  })]
43
45
  })
44
46
  ]
45
47
  });
46
- }
48
+ });
47
49
  //#endregion
48
- export { i as CheckboxCard };
50
+ export { a as CheckboxCard };
@@ -2,8 +2,8 @@
2
2
 
3
3
  import e from "./collapsible.module.js";
4
4
  import { cn as t, useControllableSignal as n, useSignals as r } from "@cascivo/core";
5
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
- import { useId as o } from "react";
5
+ import { useId as i } from "react";
6
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
7
7
  //#region ../components/src/collapsible/collapsible.tsx
8
8
  function s({ open: s, defaultOpen: c = !1, onOpenChange: l, trigger: u, disabled: d = !1, className: f, children: p }) {
9
9
  r();
@@ -11,11 +11,11 @@ function s({ open: s, defaultOpen: c = !1, onOpenChange: l, trigger: u, disabled
11
11
  ...s === void 0 ? {} : { value: s },
12
12
  defaultValue: c,
13
13
  ...l ? { onChange: l } : {}
14
- }), g = o(), _ = `${g}-content`, v = `${g}-trigger`, y = m.value;
15
- return /* @__PURE__ */ a("div", {
14
+ }), g = i(), _ = `${g}-content`, v = `${g}-trigger`, y = m.value;
15
+ return /* @__PURE__ */ o("div", {
16
16
  "data-state": y ? "open" : "closed",
17
17
  className: t(e.root, f),
18
- children: [/* @__PURE__ */ i("button", {
18
+ children: [/* @__PURE__ */ a("button", {
19
19
  type: "button",
20
20
  id: v,
21
21
  "aria-expanded": y,
@@ -25,13 +25,13 @@ function s({ open: s, defaultOpen: c = !1, onOpenChange: l, trigger: u, disabled
25
25
  className: e.trigger,
26
26
  onClick: () => h(!y),
27
27
  children: u
28
- }), /* @__PURE__ */ i("div", {
28
+ }), /* @__PURE__ */ a("div", {
29
29
  id: _,
30
30
  role: "region",
31
31
  "aria-labelledby": v,
32
32
  "data-state": y ? "open" : "closed",
33
33
  className: e.content,
34
- children: /* @__PURE__ */ i("div", {
34
+ children: /* @__PURE__ */ a("div", {
35
35
  className: e.contentInner,
36
36
  children: p
37
37
  })