@cascivo/react 0.13.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) 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 +14 -12
  6. package/dist/app-shell/app-shell.module.js +8 -8
  7. package/dist/avatar-group/avatar-group.js +6 -6
  8. package/dist/bottom-sheet/bottom-sheet.js +18 -18
  9. package/dist/button/button.js +15 -12
  10. package/dist/button-group/button-group.js +8 -8
  11. package/dist/carousel/carousel.js +20 -20
  12. package/dist/checkbox/checkbox.js +21 -21
  13. package/dist/checkbox-card/checkbox-card.js +15 -13
  14. package/dist/collapsible/collapsible.js +7 -7
  15. package/dist/color-picker/color-picker.js +26 -26
  16. package/dist/combobox/combobox.js +86 -86
  17. package/dist/command-menu/command-menu.js +111 -111
  18. package/dist/comparison/comparison.js +10 -10
  19. package/dist/context-menu/context-menu.js +9 -9
  20. package/dist/copy-button/copy-button.js +18 -16
  21. package/dist/data-table/data-table.js +1 -1
  22. package/dist/date-picker/date-picker.js +25 -25
  23. package/dist/date-range-picker/date-range-picker.js +26 -26
  24. package/dist/drawer/drawer.css +1 -1
  25. package/dist/drawer/drawer.js +18 -17
  26. package/dist/drawer/drawer.module.js +9 -9
  27. package/dist/dropdown/dropdown.js +48 -48
  28. package/dist/editable/editable.js +11 -11
  29. package/dist/fab/fab.js +53 -53
  30. package/dist/field/field.js +8 -8
  31. package/dist/file-uploader/file-uploader.js +19 -19
  32. package/dist/header-panel/header-panel.js +31 -31
  33. package/dist/hover-card/hover-card.js +21 -21
  34. package/dist/icon-button/icon-button.js +5 -5
  35. package/dist/index.d.ts +233 -194
  36. package/dist/input/input.js +22 -21
  37. package/dist/link/link.js +8 -6
  38. package/dist/log-viewer/log-viewer.js +26 -26
  39. package/dist/menu/menu.js +20 -20
  40. package/dist/menu-button/menu-button.js +48 -48
  41. package/dist/menubar/menubar.js +42 -42
  42. package/dist/modal/modal.css +1 -1
  43. package/dist/modal/modal.js +41 -35
  44. package/dist/modal/modal.module.js +8 -7
  45. package/dist/multi-select/multi-select.css +1 -1
  46. package/dist/multi-select/multi-select.js +57 -57
  47. package/dist/multi-select/multi-select.module.js +11 -11
  48. package/dist/native-select/native-select.js +13 -11
  49. package/dist/navigation-menu/navigation-menu.js +46 -46
  50. package/dist/node/accordion/accordion.js +46 -44
  51. package/dist/node/action-sheet/action-sheet.js +16 -16
  52. package/dist/node/alert-dialog/alert-dialog.js +34 -34
  53. package/dist/node/app-shell/app-shell.js +14 -12
  54. package/dist/node/app-shell/app-shell.module.js +8 -8
  55. package/dist/node/avatar-group/avatar-group.js +6 -6
  56. package/dist/node/bottom-sheet/bottom-sheet.js +18 -18
  57. package/dist/node/button/button.js +15 -12
  58. package/dist/node/button-group/button-group.js +8 -8
  59. package/dist/node/carousel/carousel.js +20 -20
  60. package/dist/node/checkbox/checkbox.js +21 -21
  61. package/dist/node/checkbox-card/checkbox-card.js +15 -13
  62. package/dist/node/collapsible/collapsible.js +7 -7
  63. package/dist/node/color-picker/color-picker.js +26 -26
  64. package/dist/node/combobox/combobox.js +86 -86
  65. package/dist/node/command-menu/command-menu.js +111 -111
  66. package/dist/node/comparison/comparison.js +10 -10
  67. package/dist/node/context-menu/context-menu.js +9 -9
  68. package/dist/node/copy-button/copy-button.js +18 -16
  69. package/dist/node/data-table/data-table.js +1 -1
  70. package/dist/node/date-picker/date-picker.js +25 -25
  71. package/dist/node/date-range-picker/date-range-picker.js +26 -26
  72. package/dist/node/drawer/drawer.js +18 -17
  73. package/dist/node/drawer/drawer.module.js +9 -9
  74. package/dist/node/dropdown/dropdown.js +48 -48
  75. package/dist/node/editable/editable.js +11 -11
  76. package/dist/node/fab/fab.js +53 -53
  77. package/dist/node/field/field.js +8 -8
  78. package/dist/node/file-uploader/file-uploader.js +19 -19
  79. package/dist/node/header-panel/header-panel.js +31 -31
  80. package/dist/node/hover-card/hover-card.js +21 -21
  81. package/dist/node/icon-button/icon-button.js +5 -5
  82. package/dist/node/input/input.js +22 -21
  83. package/dist/node/link/link.js +8 -6
  84. package/dist/node/log-viewer/log-viewer.js +26 -26
  85. package/dist/node/menu/menu.js +20 -20
  86. package/dist/node/menu-button/menu-button.js +48 -48
  87. package/dist/node/menubar/menubar.js +42 -42
  88. package/dist/node/modal/modal.js +41 -35
  89. package/dist/node/modal/modal.module.js +8 -7
  90. package/dist/node/multi-select/multi-select.js +57 -57
  91. package/dist/node/multi-select/multi-select.module.js +11 -11
  92. package/dist/node/native-select/native-select.js +13 -11
  93. package/dist/node/navigation-menu/navigation-menu.js +46 -46
  94. package/dist/node/notification/notification.js +26 -26
  95. package/dist/node/number-input/number-input.js +52 -50
  96. package/dist/node/otp-input/otp-input.js +8 -8
  97. package/dist/node/password-input/password-input.js +28 -27
  98. package/dist/node/popover/popover.js +26 -24
  99. package/dist/node/pull-to-refresh/pull-to-refresh.js +13 -13
  100. package/dist/node/radial-progress/radial-progress.js +5 -5
  101. package/dist/node/radio/radio.js +23 -22
  102. package/dist/node/radio-card/radio-card.js +27 -26
  103. package/dist/node/react/src/index.js +3 -3
  104. package/dist/node/react/src/theme.js +30 -19
  105. package/dist/node/resizable/resizable.js +11 -11
  106. package/dist/node/scroll-area/scroll-area.js +4 -4
  107. package/dist/node/search/search.js +49 -49
  108. package/dist/node/select/select.js +27 -26
  109. package/dist/node/sheet/sheet.js +11 -10
  110. package/dist/node/sheet/sheet.module.js +5 -5
  111. package/dist/node/shell-header/shell-header.js +21 -18
  112. package/dist/node/shell-header/shell-header.module.js +20 -19
  113. package/dist/node/side-nav/side-nav.js +91 -91
  114. package/dist/node/skip-nav/skip-nav.js +12 -12
  115. package/dist/node/slider/slider.js +13 -11
  116. package/dist/node/structured-list/structured-list.js +23 -23
  117. package/dist/node/tabs/tabs.js +49 -47
  118. package/dist/node/tags-input/tags-input.js +35 -35
  119. package/dist/node/textarea/textarea.js +22 -21
  120. package/dist/node/time-picker/time-picker.js +22 -21
  121. package/dist/node/timeline/timeline.js +23 -16
  122. package/dist/node/timeline/timeline.module.js +7 -7
  123. package/dist/node/toast/toast.js +15 -15
  124. package/dist/node/toc/toc.js +8 -8
  125. package/dist/node/toggle/toggle.js +15 -13
  126. package/dist/node/toggle-group/toggle-group.js +10 -10
  127. package/dist/node/toggletip/toggletip.js +9 -9
  128. package/dist/node/tooltip/tooltip.js +5 -5
  129. package/dist/node/tree-view/tree-view.js +32 -32
  130. package/dist/notification/notification.js +26 -26
  131. package/dist/number-input/number-input.js +52 -50
  132. package/dist/otp-input/otp-input.js +8 -8
  133. package/dist/password-input/password-input.js +28 -27
  134. package/dist/popover/popover.js +26 -24
  135. package/dist/pull-to-refresh/pull-to-refresh.js +13 -13
  136. package/dist/radial-progress/radial-progress.js +5 -5
  137. package/dist/radio/radio.js +23 -22
  138. package/dist/radio-card/radio-card.js +27 -26
  139. package/dist/react/src/index.js +3 -3
  140. package/dist/react/src/theme.js +30 -19
  141. package/dist/resizable/resizable.js +11 -11
  142. package/dist/scroll-area/scroll-area.js +4 -4
  143. package/dist/search/search.js +49 -49
  144. package/dist/select/select.js +27 -26
  145. package/dist/sheet/sheet.css +1 -1
  146. package/dist/sheet/sheet.js +11 -10
  147. package/dist/sheet/sheet.module.js +5 -5
  148. package/dist/shell-header/shell-header.css +1 -1
  149. package/dist/shell-header/shell-header.js +21 -18
  150. package/dist/shell-header/shell-header.module.js +20 -19
  151. package/dist/side-nav/side-nav.js +91 -91
  152. package/dist/skip-nav/skip-nav.js +12 -12
  153. package/dist/slider/slider.js +13 -11
  154. package/dist/structured-list/structured-list.js +23 -23
  155. package/dist/styles.css +57 -7
  156. package/dist/tabs/tabs.js +49 -47
  157. package/dist/tags-input/tags-input.js +35 -35
  158. package/dist/textarea/textarea.js +22 -21
  159. package/dist/time-picker/time-picker.js +22 -21
  160. package/dist/timeline/timeline.css +1 -1
  161. package/dist/timeline/timeline.js +23 -16
  162. package/dist/timeline/timeline.module.js +7 -7
  163. package/dist/toast/toast.js +15 -15
  164. package/dist/toc/toc.js +8 -8
  165. package/dist/toggle/toggle.js +15 -13
  166. package/dist/toggle-group/toggle-group.js +10 -10
  167. package/dist/toggletip/toggletip.js +9 -9
  168. package/dist/tooltip/tooltip.js +5 -5
  169. package/dist/tree-view/tree-view.js +32 -32
  170. package/package.json +10 -4
@@ -2,94 +2,96 @@
2
2
 
3
3
  import e from "./accordion.module.js";
4
4
  import { cn as t, useSignal as n, useSignals as r } from "@cascivo/core";
5
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
- import { createContext as o, useId as s } from "react";
5
+ import { createContext as i, forwardRef as a, useId as o } from "react";
6
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
7
7
  //#region ../components/src/accordion/accordion.tsx
8
- var c = o(null), l = o(null);
9
- function u(e) {
8
+ var l = i(null), u = i(null);
9
+ function d(e) {
10
10
  return e === void 0 ? [] : Array.isArray(e) ? e : [e];
11
11
  }
12
- function d({ type: r = "single", defaultValue: a, value: o, onValueChange: l, className: d, children: f }) {
13
- let p = s(), m = n(u(o ?? a));
14
- o !== void 0 && (m.value = u(o));
12
+ function f({ type: r = "single", defaultValue: i, value: a, onValueChange: c, className: u, children: f }) {
13
+ let p = o(), m = n(d(a ?? i));
14
+ a !== void 0 && (m.value = d(a));
15
15
  let h = {
16
16
  open: m,
17
17
  baseId: p,
18
18
  toggle: (e) => {
19
19
  let t = m.value, n;
20
- n = r === "multiple" ? t.includes(e) ? t.filter((t) => t !== e) : [...t, e] : t.includes(e) ? [] : [e], o === void 0 && (m.value = n), l?.(r === "multiple" ? n : n[0] ?? "");
20
+ n = r === "multiple" ? t.includes(e) ? t.filter((t) => t !== e) : [...t, e] : t.includes(e) ? [] : [e], a === void 0 && (m.value = n), c?.(r === "multiple" ? n : n[0] ?? "");
21
21
  }
22
22
  };
23
- return /* @__PURE__ */ i(c.Provider, {
23
+ return /* @__PURE__ */ s(l.Provider, {
24
24
  value: h,
25
- children: /* @__PURE__ */ i("div", {
25
+ children: /* @__PURE__ */ s("div", {
26
26
  "data-type": r,
27
- className: t(e.accordion, d),
27
+ className: t(e.accordion, u),
28
28
  children: f
29
29
  })
30
30
  });
31
31
  }
32
- function f({ value: n, className: r, children: a, ...o }) {
33
- return /* @__PURE__ */ i(l.Provider, {
32
+ function p({ value: n, className: r, children: i, ...a }) {
33
+ return /* @__PURE__ */ s(u.Provider, {
34
34
  value: { value: n },
35
- children: /* @__PURE__ */ i("div", {
35
+ children: /* @__PURE__ */ s("div", {
36
36
  "data-value": n,
37
37
  className: t(e.item, r),
38
- ...o,
39
- children: a
38
+ ...a,
39
+ children: i
40
40
  })
41
41
  });
42
42
  }
43
- function p(e) {
44
- return /* @__PURE__ */ i(c.Consumer, { children: (t) => /* @__PURE__ */ i(l.Consumer, { children: (n) => t && n ? /* @__PURE__ */ i(m, {
45
- store: t,
46
- item: n,
43
+ var m = a(function(e, t) {
44
+ return /* @__PURE__ */ s(l.Consumer, { children: (n) => /* @__PURE__ */ s(u.Consumer, { children: (r) => n && r ? /* @__PURE__ */ s(h, {
45
+ store: n,
46
+ item: r,
47
+ buttonRef: t,
47
48
  ...e
48
49
  }) : null }) });
49
- }
50
- function m({ store: n, item: o, className: s, children: c, ...l }) {
50
+ });
51
+ function h({ store: n, item: i, className: a, children: o, buttonRef: l, ...u }) {
51
52
  r();
52
- let u = n.open.value.includes(o.value);
53
- return /* @__PURE__ */ i("h3", {
53
+ let d = n.open.value.includes(i.value);
54
+ return /* @__PURE__ */ s("h3", {
54
55
  className: e.heading,
55
- children: /* @__PURE__ */ a("button", {
56
+ children: /* @__PURE__ */ c("button", {
56
57
  type: "button",
57
- id: `${n.baseId}-trigger-${o.value}`,
58
- "aria-expanded": u,
59
- "aria-controls": `${n.baseId}-content-${o.value}`,
60
- "data-state": u ? "open" : "closed",
61
- className: t(e.trigger, s),
62
- onClick: () => n.toggle(o.value),
63
- ...l,
64
- children: [/* @__PURE__ */ i("span", { children: c }), /* @__PURE__ */ i("span", {
58
+ id: `${n.baseId}-trigger-${i.value}`,
59
+ "aria-expanded": d,
60
+ "aria-controls": `${n.baseId}-content-${i.value}`,
61
+ "data-state": d ? "open" : "closed",
62
+ className: t(e.trigger, a),
63
+ onClick: () => n.toggle(i.value),
64
+ ref: l,
65
+ ...u,
66
+ children: [/* @__PURE__ */ s("span", { children: o }), /* @__PURE__ */ s("span", {
65
67
  className: e.indicator,
66
68
  "aria-hidden": "true"
67
69
  })]
68
70
  })
69
71
  });
70
72
  }
71
- function h(e) {
72
- return /* @__PURE__ */ i(c.Consumer, { children: (t) => /* @__PURE__ */ i(l.Consumer, { children: (n) => t && n ? /* @__PURE__ */ i(g, {
73
+ function g(e) {
74
+ return /* @__PURE__ */ s(l.Consumer, { children: (t) => /* @__PURE__ */ s(u.Consumer, { children: (n) => t && n ? /* @__PURE__ */ s(_, {
73
75
  store: t,
74
76
  item: n,
75
77
  ...e
76
78
  }) : null }) });
77
79
  }
78
- function g({ store: n, item: a, className: o, children: s, ...c }) {
80
+ function _({ store: n, item: i, className: a, children: o, ...c }) {
79
81
  r();
80
- let l = n.open.value.includes(a.value);
81
- return /* @__PURE__ */ i("div", {
82
+ let l = n.open.value.includes(i.value);
83
+ return /* @__PURE__ */ s("div", {
82
84
  role: "region",
83
- id: `${n.baseId}-content-${a.value}`,
84
- "aria-labelledby": `${n.baseId}-trigger-${a.value}`,
85
+ id: `${n.baseId}-content-${i.value}`,
86
+ "aria-labelledby": `${n.baseId}-trigger-${i.value}`,
85
87
  "data-state": l ? "open" : "closed",
86
- className: t(e.content, o),
88
+ className: t(e.content, a),
87
89
  ...c,
88
- children: /* @__PURE__ */ i("div", {
90
+ children: /* @__PURE__ */ s("div", {
89
91
  className: e.contentInner,
90
- children: s
92
+ children: o
91
93
  })
92
94
  });
93
95
  }
94
96
  //#endregion
95
- export { d as Accordion, h as AccordionContent, f as AccordionItem, p as AccordionTrigger };
97
+ export { f as Accordion, g as AccordionContent, p as AccordionItem, m as AccordionTrigger };
@@ -2,9 +2,9 @@
2
2
 
3
3
  import e from "./action-sheet.module.js";
4
4
  import { DismissableLayer as t, FocusScope as n, Portal as r, Presence as i, cn as a, useControllableSignal as o, useRovingFocus as s, useSignals as c } from "@cascivo/core";
5
- import { builtin as l, t as u } from "@cascivo/i18n";
6
- import { jsx as d, jsxs as f } from "react/jsx-runtime";
7
- import { useId as p } from "react";
5
+ import { useId as l } from "react";
6
+ import { builtin as u, t as d } from "@cascivo/i18n";
7
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
8
8
  //#region ../components/src/action-sheet/action-sheet.tsx
9
9
  function m({ open: m, defaultOpen: h, onOpenChange: g, actions: _, title: v, description: y, showCancel: b = !0, labels: x, className: S }) {
10
10
  c();
@@ -15,42 +15,42 @@ function m({ open: m, defaultOpen: h, onOpenChange: g, actions: _, title: v, des
15
15
  }), T = s({
16
16
  orientation: "vertical",
17
17
  loop: !0
18
- }), E = p(), D = p(), O = x?.cancel ?? u(l.actionSheet.cancel), k = x?.label ?? u(l.actionSheet.label), A = (e) => {
18
+ }), E = l(), D = l(), O = x?.cancel ?? d(u.actionSheet.cancel), k = x?.label ?? d(u.actionSheet.label), A = (e) => {
19
19
  e.disabled || (e.onSelect(), w(!1));
20
20
  }, j = _.length;
21
- return /* @__PURE__ */ d(r, { children: /* @__PURE__ */ d(i, {
21
+ return /* @__PURE__ */ f(r, { children: /* @__PURE__ */ f(i, {
22
22
  present: C,
23
- children: /* @__PURE__ */ d("div", {
23
+ children: /* @__PURE__ */ f("div", {
24
24
  className: e.overlay,
25
- children: /* @__PURE__ */ d(t, {
25
+ children: /* @__PURE__ */ f(t, {
26
26
  onDismiss: () => w(!1),
27
- children: /* @__PURE__ */ d(n, {
27
+ children: /* @__PURE__ */ f(n, {
28
28
  trapped: !0,
29
29
  restoreFocus: !0,
30
30
  autoFocus: !0,
31
- children: /* @__PURE__ */ f("div", {
31
+ children: /* @__PURE__ */ p("div", {
32
32
  role: "menu",
33
33
  "aria-label": v ? void 0 : k,
34
34
  "aria-labelledby": v ? E : void 0,
35
35
  "aria-describedby": y ? D : void 0,
36
36
  className: a(e.sheet, S),
37
- children: [/* @__PURE__ */ f("div", {
37
+ children: [/* @__PURE__ */ p("div", {
38
38
  className: e.group,
39
- children: [(v || y) && /* @__PURE__ */ f("div", {
39
+ children: [(v || y) && /* @__PURE__ */ p("div", {
40
40
  className: e.heading,
41
41
  role: "presentation",
42
- children: [v && /* @__PURE__ */ d("p", {
42
+ children: [v && /* @__PURE__ */ f("p", {
43
43
  id: E,
44
44
  className: e.title,
45
45
  children: v
46
- }), y && /* @__PURE__ */ d("p", {
46
+ }), y && /* @__PURE__ */ f("p", {
47
47
  id: D,
48
48
  className: e.description,
49
49
  children: y
50
50
  })]
51
51
  }), _.map((t, n) => {
52
52
  let r = T.getItemProps(n);
53
- return /* @__PURE__ */ d("button", {
53
+ return /* @__PURE__ */ f("button", {
54
54
  ref: r.ref,
55
55
  type: "button",
56
56
  role: "menuitem",
@@ -64,11 +64,11 @@ function m({ open: m, defaultOpen: h, onOpenChange: g, actions: _, title: v, des
64
64
  children: t.label
65
65
  }, n);
66
66
  })]
67
- }), b && /* @__PURE__ */ d("div", {
67
+ }), b && /* @__PURE__ */ f("div", {
68
68
  className: e.group,
69
69
  children: (() => {
70
70
  let t = T.getItemProps(j);
71
- return /* @__PURE__ */ d("button", {
71
+ return /* @__PURE__ */ f("button", {
72
72
  ref: t.ref,
73
73
  type: "button",
74
74
  role: "menuitem",
@@ -1,61 +1,61 @@
1
1
  "use client";
2
2
 
3
3
  import e from "./alert-dialog.module.js";
4
- import { useEffectPropSignal as t, useId as n, useSignalEffect as r } from "@cascivo/core";
5
- import { builtin as i, t as a } from "@cascivo/i18n";
6
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
7
- import { useRef as c } from "react";
4
+ import { focusElement as t, useEffectPropSignal as n, useId as r, useSignalEffect as i } from "@cascivo/core";
5
+ import { useRef as a } from "react";
6
+ import { builtin as o, t as s } from "@cascivo/i18n";
7
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
8
8
  //#region ../components/src/alert-dialog/alert-dialog.tsx
9
- function l({ open: l, title: u, description: d, onConfirm: f, onCancel: p, labels: m, variant: h = "default" }) {
10
- let g = c(null), _ = n("cascivo-alert-dialog-title"), v = n("cascivo-alert-dialog-desc"), y = t(l), b = c(null), x = c(p);
11
- x.current = p;
12
- let S = c(f);
13
- return S.current = f, r(() => {
14
- let e = g.current;
15
- if (e) if (y.value) {
9
+ function u({ open: u, title: d, description: f, onConfirm: p, onCancel: m, labels: h, variant: g = "default" }) {
10
+ let _ = a(null), v = r("cascivo-alert-dialog-title"), y = r("cascivo-alert-dialog-desc"), b = n(u), x = a(null), S = a(m);
11
+ S.current = m;
12
+ let C = a(p);
13
+ return C.current = p, i(() => {
14
+ let e = _.current;
15
+ if (e) if (b.value) {
16
16
  try {
17
17
  e.showPopover();
18
18
  } catch {}
19
- requestAnimationFrame(() => b.current?.focus());
19
+ requestAnimationFrame(() => t(x.current));
20
20
  } else try {
21
21
  e.hidePopover();
22
22
  } catch {}
23
- }), /* @__PURE__ */ o("div", {
24
- ref: g,
23
+ }), /* @__PURE__ */ c("div", {
24
+ ref: _,
25
25
  popover: "manual",
26
26
  role: "alertdialog",
27
27
  "aria-modal": "true",
28
- "aria-labelledby": _,
29
- "aria-describedby": v,
30
- "data-state": l ? "open" : "closed",
31
- "data-variant": h,
28
+ "aria-labelledby": v,
29
+ "aria-describedby": y,
30
+ "data-state": u ? "open" : "closed",
31
+ "data-variant": g,
32
32
  className: e.dialog,
33
- children: /* @__PURE__ */ s("div", {
33
+ children: /* @__PURE__ */ l("div", {
34
34
  className: e.content,
35
35
  children: [
36
- /* @__PURE__ */ o("p", {
37
- id: _,
36
+ /* @__PURE__ */ c("p", {
37
+ id: v,
38
38
  className: e.title,
39
- children: u
39
+ children: d
40
40
  }),
41
- /* @__PURE__ */ o("p", {
42
- id: v,
41
+ /* @__PURE__ */ c("p", {
42
+ id: y,
43
43
  className: e.description,
44
- children: d
44
+ children: f
45
45
  }),
46
- /* @__PURE__ */ s("div", {
46
+ /* @__PURE__ */ l("div", {
47
47
  className: e.actions,
48
- children: [/* @__PURE__ */ o("button", {
49
- ref: b,
48
+ children: [/* @__PURE__ */ c("button", {
49
+ ref: x,
50
50
  type: "button",
51
51
  className: e.cancel,
52
- onClick: () => x.current(),
53
- children: m?.cancel ?? a(i.alertDialog.cancel)
54
- }), /* @__PURE__ */ o("button", {
52
+ onClick: () => S.current(),
53
+ children: h?.cancel ?? s(o.alertDialog.cancel)
54
+ }), /* @__PURE__ */ c("button", {
55
55
  type: "button",
56
56
  className: e.confirm,
57
- onClick: () => S.current(),
58
- children: m?.confirm ?? a(i.alertDialog.confirm)
57
+ onClick: () => C.current(),
58
+ children: h?.confirm ?? s(o.alertDialog.confirm)
59
59
  })]
60
60
  })
61
61
  ]
@@ -63,4 +63,4 @@ function l({ open: l, title: u, description: d, onConfirm: f, onCancel: p, label
63
63
  });
64
64
  }
65
65
  //#endregion
66
- export { l as AlertDialog };
66
+ export { u as AlertDialog };
@@ -1 +1 @@
1
- @layer cascivo.component{._shell_11je2_4{box-sizing:border-box;block-size:100dvh;font-family:var(--cascivo-font-sans);color:var(--cascivo-color-foreground);background-color:var(--cascivo-color-background);flex-direction:column;display:flex;overflow:hidden}._header_11je2_16{z-index:var(--cascivo-z-raised);flex:none}._body_11je2_21{flex:auto;min-block-size:0;display:flex;position:relative}._navWrapper_11je2_32{z-index:var(--cascivo-z-overlay);block-size:100%;transition:transform var(--cascivo-motion-emphasis);position:absolute;inset-block:0;inset-inline-start:0;overflow:hidden;transform:translate(-100%)}._navWrapper_11je2_32[data-open=true]{transform:translate(0)}:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) ._navWrapper_11je2_32{transform:translate(100%)}:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) ._navWrapper_11je2_32[data-open=true]{transform:translate(0)}._navInner_11je2_58{block-size:100%;inline-size:var(--cascivo-shell-panel-inline-size,20rem);display:flex}._navInner_11je2_58>*{flex:auto;min-block-size:0}._scrim_11je2_70{z-index:var(--cascivo-z-dropdown);opacity:0;visibility:hidden;transition:opacity var(--cascivo-motion-emphasis), visibility var(--cascivo-motion-emphasis);background-color:oklch(0% 0 0/.4);position:absolute;inset:0}._scrim_11je2_70[data-open=true]{opacity:1;visibility:visible}._main_11je2_87{flex:auto;min-inline-size:0;overflow-y:auto}._footer_11je2_93{flex:none}@media (width>=64rem){._navWrapper_11je2_32{z-index:auto;inline-size:var(--cascivo-shell-aside-inline-size,18rem);transition:inline-size var(--cascivo-motion-emphasis);position:static;transform:none}._navWrapper_11je2_32[data-open=false]{inline-size:0}._navInner_11je2_58{inline-size:var(--cascivo-shell-aside-inline-size,18rem)}:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) ._navWrapper_11je2_32{transform:none}:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) ._navWrapper_11je2_32[data-open=true]{transform:none}._scrim_11je2_70{display:none}}}
1
+ @layer cascivo.component{._shell_1y4cv_4{box-sizing:border-box;block-size:100dvh;font-family:var(--cascivo-font-sans);color:var(--cascivo-color-foreground);background-color:var(--cascivo-color-background);flex-direction:column;display:flex;overflow:hidden}._header_1y4cv_16{z-index:var(--cascivo-z-raised);flex:none}._body_1y4cv_21{flex:auto;min-block-size:0;display:flex;position:relative}._navWrapper_1y4cv_32{z-index:var(--cascivo-z-overlay);block-size:100%;transition:transform var(--cascivo-motion-emphasis);position:absolute;inset-block:0;inset-inline-start:0;overflow:hidden;transform:translate(-100%)}._navWrapper_1y4cv_32[data-open=true]{transform:translate(0)}:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) ._navWrapper_1y4cv_32{transform:translate(100%)}:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) ._navWrapper_1y4cv_32[data-open=true]{transform:translate(0)}._navInner_1y4cv_58{block-size:100%;inline-size:var(--cascivo-shell-panel-inline-size,20rem);display:flex}._navInner_1y4cv_58>*{flex:auto;min-block-size:0}._scrim_1y4cv_70{z-index:var(--cascivo-z-dropdown);opacity:0;visibility:hidden;transition:opacity var(--cascivo-motion-emphasis), visibility var(--cascivo-motion-emphasis);background-color:oklch(0% 0 0/.4);position:absolute;inset:0}._scrim_1y4cv_70[data-open=true]{opacity:1;visibility:visible}._main_1y4cv_87{flex:auto;min-inline-size:0;overflow-y:auto}._footer_1y4cv_93{flex:none}@media (width>=64rem){._navWrapper_1y4cv_32{z-index:auto;inline-size:var(--cascivo-shell-aside-inline-size,18rem);transition:inline-size var(--cascivo-motion-emphasis);flex-shrink:0;position:static;transform:none}._navWrapper_1y4cv_32[data-open=false]{inline-size:0}._navInner_1y4cv_58{inline-size:var(--cascivo-shell-aside-inline-size,18rem)}:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) ._navWrapper_1y4cv_32{transform:none}:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) ._navWrapper_1y4cv_32[data-open=true]{transform:none}._scrim_1y4cv_70{display:none}}}
@@ -2,14 +2,14 @@
2
2
 
3
3
  import e from "./app-shell.module.js";
4
4
  import { cn as t, useSignal as n, useSignalEffect as r, useSignals as i } from "@cascivo/core";
5
- import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
6
- import { cloneElement as c, isValidElement as l, useRef as u } from "react";
5
+ import { cloneElement as a, isValidElement as o, useRef as s } from "react";
6
+ import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
7
7
  //#region ../components/src/app-shell/app-shell.tsx
8
8
  function d({ header: d, nav: f, children: p, footer: m, open: h, defaultOpen: g, onOpenChange: _, className: v, ...y }) {
9
9
  i();
10
10
  let b = h !== void 0, x = n(h ?? g ?? !0);
11
11
  b && (x.value = h);
12
- let S = u(null), C = u(null);
12
+ let S = s(null), C = s(null);
13
13
  function w(e) {
14
14
  b || (x.value = e), _?.(e);
15
15
  }
@@ -33,44 +33,46 @@ function d({ header: d, nav: f, children: p, footer: m, open: h, defaultOpen: g,
33
33
  t && e.contains(document.activeElement) && t.focus();
34
34
  }
35
35
  });
36
- let E = l(d) && f ? c(d, {
36
+ let E = o(d) && f ? a(d, {
37
37
  onMenuClick: T,
38
38
  menuExpanded: x.value
39
39
  }) : d;
40
- return /* @__PURE__ */ s("div", {
40
+ return /* @__PURE__ */ u("div", {
41
41
  className: t(e.shell, v),
42
42
  "data-open": x.value,
43
43
  ...y,
44
44
  children: [
45
- /* @__PURE__ */ o("div", {
45
+ /* @__PURE__ */ l("div", {
46
46
  className: e.header,
47
47
  children: E
48
48
  }),
49
- /* @__PURE__ */ s("div", {
49
+ /* @__PURE__ */ u("div", {
50
50
  className: e.body,
51
- children: [f && /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o("div", {
51
+ children: [f && /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l("div", {
52
52
  ref: S,
53
53
  className: e.navWrapper,
54
54
  "data-open": x.value,
55
55
  "data-testid": "app-shell-nav",
56
- children: /* @__PURE__ */ o("div", {
56
+ "data-cascivo-appshell-nav": "",
57
+ children: /* @__PURE__ */ l("div", {
57
58
  className: e.navInner,
58
59
  children: f
59
60
  })
60
- }), /* @__PURE__ */ o("div", {
61
+ }), /* @__PURE__ */ l("div", {
61
62
  className: e.scrim,
62
63
  "data-open": x.value,
63
64
  "data-testid": "app-shell-scrim",
64
65
  "aria-hidden": "true",
65
66
  onClick: () => w(!1)
66
- })] }), /* @__PURE__ */ o("main", {
67
+ })] }), /* @__PURE__ */ l("main", {
67
68
  id: "cascade-main",
68
69
  tabIndex: -1,
69
70
  className: e.main,
71
+ "data-cascivo-appshell-main": "",
70
72
  children: p
71
73
  })]
72
74
  }),
73
- m && /* @__PURE__ */ o("div", {
75
+ m && /* @__PURE__ */ l("div", {
74
76
  className: e.footer,
75
77
  children: m
76
78
  })
@@ -2,14 +2,14 @@
2
2
 
3
3
  import './app-shell.css';
4
4
  var e = {
5
- shell: "_shell_11je2_4",
6
- header: "_header_11je2_16",
7
- body: "_body_11je2_21",
8
- navWrapper: "_navWrapper_11je2_32",
9
- navInner: "_navInner_11je2_58",
10
- scrim: "_scrim_11je2_70",
11
- main: "_main_11je2_87",
12
- footer: "_footer_11je2_93"
5
+ shell: "_shell_1y4cv_4",
6
+ header: "_header_1y4cv_16",
7
+ body: "_body_1y4cv_21",
8
+ navWrapper: "_navWrapper_1y4cv_32",
9
+ navInner: "_navInner_1y4cv_58",
10
+ scrim: "_scrim_1y4cv_70",
11
+ main: "_main_1y4cv_87",
12
+ footer: "_footer_1y4cv_93"
13
13
  };
14
14
  //#endregion
15
15
  export { e as default };
@@ -3,19 +3,19 @@
3
3
  import { Avatar as e } from "../avatar/avatar.js";
4
4
  import t from "./avatar-group.module.js";
5
5
  import { cn as n } from "@cascivo/core";
6
- import { builtin as r, t as i } from "@cascivo/i18n";
7
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
8
- import { Children as s } from "react";
6
+ import { Children as r } from "react";
7
+ import { builtin as i, t as a } from "@cascivo/i18n";
8
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
9
9
  //#region ../components/src/avatar-group/avatar-group.tsx
10
10
  function c({ max: c, total: l, spacing: u = "md", isGrid: d = !1, labels: f, className: p, children: m, ...h }) {
11
- let g = s.toArray(m), _ = c == null ? g : g.slice(0, c), v = (l ?? g.length) - _.length, y = f?.more?.(v) ?? i(r.avatarGroup.more, { count: v });
12
- return /* @__PURE__ */ o("div", {
11
+ let g = r.toArray(m), _ = c == null ? g : g.slice(0, c), v = (l ?? g.length) - _.length, y = f?.more?.(v) ?? a(i.avatarGroup.more, { count: v });
12
+ return /* @__PURE__ */ s("div", {
13
13
  role: "group",
14
14
  "data-spacing": u,
15
15
  "data-grid": d || void 0,
16
16
  className: n(t.group, p),
17
17
  ...h,
18
- children: [_, v > 0 && /* @__PURE__ */ a(e, {
18
+ children: [_, v > 0 && /* @__PURE__ */ o(e, {
19
19
  className: t.overflow,
20
20
  fallback: `+${v}`,
21
21
  "aria-label": y
@@ -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 };