@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,18 +1,18 @@
1
1
  "use client";
2
2
 
3
3
  import e from "./header-panel.module.js";
4
- import { cn as t, useEffectPropSignal as n, useSignalEffect as r, useSignals as i } from "@cascivo/core";
5
- import { builtin as a, t as o } from "@cascivo/i18n";
6
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
7
- import { useRef as l } from "react";
4
+ import { cn as t, focusElement as n, useEffectPropSignal as r, useSignalEffect as i, useSignals as a } from "@cascivo/core";
5
+ import { useRef as o } from "react";
6
+ import { builtin as s, t as c } from "@cascivo/i18n";
7
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
8
8
  //#region ../components/src/header-panel/header-panel.tsx
9
- function u({ open: u, onClose: d, label: f, children: p, labels: m, className: h }) {
10
- i();
11
- let g = l(null), _ = l(null), v = n(u), y = l(d);
12
- return y.current = d, r(() => {
13
- let e = g.current;
14
- if (e) if (v.value) {
15
- _.current = document.activeElement;
9
+ function d({ open: d, onClose: f, label: p, children: m, labels: h, className: g }) {
10
+ a();
11
+ let _ = o(null), v = o(null), y = r(d), b = o(f);
12
+ return b.current = f, i(() => {
13
+ let e = _.current;
14
+ if (e) if (y.value) {
15
+ v.current = document.activeElement;
16
16
  try {
17
17
  e.showPopover();
18
18
  } catch {}
@@ -21,40 +21,40 @@ function u({ open: u, onClose: d, label: f, children: p, labels: m, className: h
21
21
  try {
22
22
  e.hidePopover();
23
23
  } catch {}
24
- _.current?.focus(), _.current = null;
24
+ n(v.current), v.current = null;
25
25
  }
26
- }), r(() => {
27
- let e = g.current;
26
+ }), i(() => {
27
+ let e = _.current;
28
28
  if (!e) return;
29
29
  let t = (e) => {
30
30
  let t = "newState" in e ? e.newState === "closed" : !0;
31
- v.peek() && t && y.current();
31
+ y.peek() && t && b.current();
32
32
  };
33
33
  return e.addEventListener("toggle", t), () => e.removeEventListener("toggle", t);
34
- }), /* @__PURE__ */ c("div", {
35
- ref: g,
34
+ }), /* @__PURE__ */ u("div", {
35
+ ref: _,
36
36
  popover: "auto",
37
37
  role: "region",
38
- "aria-label": f,
38
+ "aria-label": p,
39
39
  tabIndex: -1,
40
- "data-state": u ? "open" : "closed",
41
- className: t(e.panel, h),
42
- children: [/* @__PURE__ */ c("div", {
40
+ "data-state": d ? "open" : "closed",
41
+ className: t(e.panel, g),
42
+ children: [/* @__PURE__ */ u("div", {
43
43
  className: e.header,
44
- children: [/* @__PURE__ */ s("span", {
44
+ children: [/* @__PURE__ */ l("span", {
45
45
  className: e.title,
46
- children: f
47
- }), /* @__PURE__ */ s("button", {
46
+ children: p
47
+ }), /* @__PURE__ */ l("button", {
48
48
  type: "button",
49
- "aria-label": m?.close ?? o(a.headerPanel.close),
49
+ "aria-label": h?.close ?? c(s.headerPanel.close),
50
50
  className: e.close,
51
- onClick: () => y.current(),
52
- children: /* @__PURE__ */ s("svg", {
51
+ onClick: () => b.current(),
52
+ children: /* @__PURE__ */ l("svg", {
53
53
  viewBox: "0 0 16 16",
54
54
  width: "14",
55
55
  height: "14",
56
56
  "aria-hidden": "true",
57
- children: /* @__PURE__ */ s("path", {
57
+ children: /* @__PURE__ */ l("path", {
58
58
  d: "M4 4l8 8M12 4l-8 8",
59
59
  stroke: "currentColor",
60
60
  strokeWidth: "1.5",
@@ -62,11 +62,11 @@ function u({ open: u, onClose: d, label: f, children: p, labels: m, className: h
62
62
  })
63
63
  })
64
64
  })]
65
- }), /* @__PURE__ */ s("div", {
65
+ }), /* @__PURE__ */ l("div", {
66
66
  className: e.body,
67
- children: p
67
+ children: m
68
68
  })]
69
69
  });
70
70
  }
71
71
  //#endregion
72
- export { u as HeaderPanel };
72
+ export { d as HeaderPanel };
@@ -3,15 +3,15 @@
3
3
  import { usePopover as e } from "../popover/use-popover.js";
4
4
  import t from "./hover-card.module.js";
5
5
  import { useSignalEffect as n, useSignals as r } from "@cascivo/core";
6
- import { jsx as i } from "react/jsx-runtime";
7
- import { createContext as a, useRef as o } from "react";
6
+ import { createContext as i, useRef as a } from "react";
7
+ import { jsx as o } from "react/jsx-runtime";
8
8
  //#region ../components/src/hover-card/hover-card.tsx
9
- var s = a(null);
10
- function c({ children: t, openDelay: r = 300, closeDelay: a = 100 }) {
11
- let c = e(), l = o(void 0), u = o(void 0), d = o(r);
9
+ var s = i(null);
10
+ function c({ children: t, openDelay: r = 300, closeDelay: i = 100 }) {
11
+ let c = e(), l = a(void 0), u = a(void 0), d = a(r);
12
12
  d.current = r;
13
- let f = o(a);
14
- f.current = a;
13
+ let f = a(i);
14
+ f.current = i;
15
15
  let p = {
16
16
  ...c,
17
17
  open: () => {
@@ -27,17 +27,17 @@ function c({ children: t, openDelay: r = 300, closeDelay: a = 100 }) {
27
27
  };
28
28
  return n(() => () => {
29
29
  clearTimeout(l.current), clearTimeout(u.current);
30
- }), /* @__PURE__ */ i(s.Provider, {
30
+ }), /* @__PURE__ */ o(s.Provider, {
31
31
  value: p,
32
32
  children: t
33
33
  });
34
34
  }
35
35
  function l({ ctx: e, children: n }) {
36
36
  r();
37
- let { triggerRef: a, anchorName: o, open: s, close: c } = e;
38
- return /* @__PURE__ */ i("span", {
39
- ref: a,
40
- style: { anchorName: o },
37
+ let { triggerRef: i, anchorName: a, open: s, close: c } = e;
38
+ return /* @__PURE__ */ o("span", {
39
+ ref: i,
40
+ style: { anchorName: a },
41
41
  onMouseEnter: s,
42
42
  onMouseLeave: c,
43
43
  onFocus: s,
@@ -47,33 +47,33 @@ function l({ ctx: e, children: n }) {
47
47
  });
48
48
  }
49
49
  function u({ children: e }) {
50
- return /* @__PURE__ */ i(s.Consumer, { children: (t) => {
50
+ return /* @__PURE__ */ o(s.Consumer, { children: (t) => {
51
51
  if (!t) throw Error("HoverCardTrigger must be inside <HoverCard>");
52
- return /* @__PURE__ */ i(l, {
52
+ return /* @__PURE__ */ o(l, {
53
53
  ctx: t,
54
54
  children: e
55
55
  });
56
56
  } });
57
57
  }
58
- function d({ ctx: e, children: n, className: a }) {
58
+ function d({ ctx: e, children: n, className: i }) {
59
59
  r();
60
- let { popoverRef: o, anchorName: s, isOpen: c, open: l, close: u } = e;
61
- return /* @__PURE__ */ i("div", {
62
- ref: o,
60
+ let { popoverRef: a, anchorName: s, isOpen: c, open: l, close: u } = e;
61
+ return /* @__PURE__ */ o("div", {
62
+ ref: a,
63
63
  popover: "auto",
64
64
  role: "complementary",
65
65
  "data-state": c.value ? "open" : "closed",
66
66
  style: { positionAnchor: s },
67
67
  onMouseEnter: l,
68
68
  onMouseLeave: u,
69
- className: [t.content, a].filter(Boolean).join(" "),
69
+ className: [t.content, i].filter(Boolean).join(" "),
70
70
  children: n
71
71
  });
72
72
  }
73
73
  function f({ children: e, className: t }) {
74
- return /* @__PURE__ */ i(s.Consumer, { children: (n) => {
74
+ return /* @__PURE__ */ o(s.Consumer, { children: (n) => {
75
75
  if (!n) throw Error("HoverCardContent must be inside <HoverCard>");
76
- return /* @__PURE__ */ i(d, {
76
+ return /* @__PURE__ */ o(d, {
77
77
  ctx: n,
78
78
  ...t !== void 0 && { className: t },
79
79
  children: e
@@ -2,13 +2,13 @@
2
2
 
3
3
  import e from "./icon-button.module.js";
4
4
  import { Slot as t, cn as n } from "@cascivo/core";
5
- import { jsx as r } from "react/jsx-runtime";
6
- import { forwardRef as i } from "react";
5
+ import { forwardRef as r } from "react";
6
+ import { jsx as i } from "react/jsx-runtime";
7
7
  //#region ../components/src/icon-button/icon-button.tsx
8
- var a = i(function({ label: i, ariaLabel: a, icon: o, size: s = "md", variant: c = "ghost", asChild: l = !1, className: u, children: d, ...f }, p) {
9
- return /* @__PURE__ */ r(l ? t : "button", {
8
+ var a = r(function({ label: r, ariaLabel: a, icon: o, size: s = "md", variant: c = "ghost", asChild: l = !1, className: u, children: d, ...f }, p) {
9
+ return /* @__PURE__ */ i(l ? t : "button", {
10
10
  type: l ? void 0 : "button",
11
- "aria-label": i ?? a,
11
+ "aria-label": r ?? a,
12
12
  "data-size": s,
13
13
  "data-variant": c,
14
14
  className: n(e.iconButton, u),
@@ -1,5 +1,5 @@
1
1
  "use client";
2
2
 
3
- var e = { iconButton: "_iconButton_13zh2_2" };
3
+ var e = { iconButton: "_iconButton_1f9hf_2" };
4
4
  //#endregion
5
5
  export { e as default };
@@ -2,53 +2,54 @@
2
2
 
3
3
  import e from "./input.module.js";
4
4
  import { cn as t, createMachine as n, useMachine as r } from "@cascivo/core";
5
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
5
+ import { forwardRef as i } from "react";
6
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
6
7
  //#region ../components/src/input/input.tsx
7
- var o = n({
8
+ var s = n({
8
9
  initial: "idle",
9
10
  states: {
10
11
  idle: { on: { FOCUS: "focused" } },
11
12
  focused: { on: { BLUR: "idle" } }
12
13
  }
13
- });
14
- function s({ label: n, hint: s, error: c, size: l = "md", className: u, id: d, onFocus: f, onBlur: p, ...m }) {
15
- let [h, g] = r(o), _ = d ?? (n ? `cascade-input-${n.toLowerCase().replace(/\s+/g, "-")}` : void 0);
16
- return /* @__PURE__ */ a("div", {
14
+ }), c = i(function({ label: n, hint: i, error: c, size: l = "md", className: u, id: d, onFocus: f, onBlur: p, ...m }, h) {
15
+ let [g, _] = r(s), v = d ?? (n ? `cascade-input-${n.toLowerCase().replace(/\s+/g, "-")}` : void 0);
16
+ return /* @__PURE__ */ o("div", {
17
17
  className: t(e.wrapper, u),
18
- "data-state": c ? "error" : h.value,
18
+ "data-state": c ? "error" : g.value,
19
19
  "data-size": l,
20
20
  children: [
21
- n && /* @__PURE__ */ i("label", {
21
+ n && /* @__PURE__ */ a("label", {
22
22
  className: e.label,
23
- htmlFor: _,
23
+ htmlFor: v,
24
24
  children: n
25
25
  }),
26
- /* @__PURE__ */ i("input", {
27
- id: _,
26
+ /* @__PURE__ */ a("input", {
27
+ ref: h,
28
+ id: v,
28
29
  className: e.input,
29
30
  "aria-invalid": c ? !0 : void 0,
30
- "aria-describedby": c ? `${_}-error` : s ? `${_}-hint` : void 0,
31
+ "aria-describedby": c ? `${v}-error` : i ? `${v}-hint` : void 0,
31
32
  onFocus: (e) => {
32
- g("FOCUS"), f?.(e);
33
+ _("FOCUS"), f?.(e);
33
34
  },
34
35
  onBlur: (e) => {
35
- g("BLUR"), p?.(e);
36
+ _("BLUR"), p?.(e);
36
37
  },
37
38
  ...m
38
39
  }),
39
- c && /* @__PURE__ */ i("span", {
40
- id: `${_}-error`,
40
+ c && /* @__PURE__ */ a("span", {
41
+ id: `${v}-error`,
41
42
  className: e.error,
42
43
  role: "alert",
43
44
  children: c
44
45
  }),
45
- !c && s && /* @__PURE__ */ i("span", {
46
- id: `${_}-hint`,
46
+ !c && i && /* @__PURE__ */ a("span", {
47
+ id: `${v}-hint`,
47
48
  className: e.hint,
48
- children: s
49
+ children: i
49
50
  })
50
51
  ]
51
52
  });
52
- }
53
+ });
53
54
  //#endregion
54
- export { s as Input };
55
+ export { c as Input };
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
 
3
3
  var e = {
4
- wrapper: "_wrapper_ao79u_2",
5
- label: "_label_ao79u_26",
6
- input: "_input_ao79u_34",
7
- error: "_error_ao79u_77",
8
- hint: "_hint_ao79u_84"
4
+ wrapper: "_wrapper_swdj6_2",
5
+ label: "_label_swdj6_30",
6
+ input: "_input_swdj6_38",
7
+ error: "_error_swdj6_81",
8
+ hint: "_hint_swdj6_88"
9
9
  };
10
10
  //#endregion
11
11
  export { e as default };
@@ -1,12 +1,12 @@
1
1
  "use client";
2
2
 
3
3
  var e = {
4
- item: "_item_1uxrt_2",
5
- media: "_media_1uxrt_30",
6
- content: "_content_1uxrt_38",
7
- title: "_title_1uxrt_45",
8
- description: "_description_1uxrt_51",
9
- actions: "_actions_1uxrt_58"
4
+ item: "_item_e9n8e_2",
5
+ media: "_media_e9n8e_32",
6
+ content: "_content_e9n8e_40",
7
+ title: "_title_e9n8e_47",
8
+ description: "_description_e9n8e_53",
9
+ actions: "_actions_e9n8e_60"
10
10
  };
11
11
  //#endregion
12
12
  export { e as default };
@@ -0,0 +1,33 @@
1
+ "use client";
2
+
3
+ import e from "./page-header.module.js";
4
+ import { cn as t } from "@cascivo/core";
5
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
6
+ //#region ../layouts/src/page-header/page-header.tsx
7
+ function i({ title: i, description: a, breadcrumb: o, actions: s, className: c }) {
8
+ return /* @__PURE__ */ r("header", {
9
+ className: t(e.header, c),
10
+ children: [
11
+ o && /* @__PURE__ */ n("div", {
12
+ className: e.breadcrumb,
13
+ children: o
14
+ }),
15
+ /* @__PURE__ */ r("div", {
16
+ className: e.row,
17
+ children: [/* @__PURE__ */ n("h1", {
18
+ className: e.title,
19
+ children: i
20
+ }), s && /* @__PURE__ */ n("div", {
21
+ className: e.actions,
22
+ children: s
23
+ })]
24
+ }),
25
+ a && /* @__PURE__ */ n("p", {
26
+ className: e.description,
27
+ children: a
28
+ })
29
+ ]
30
+ });
31
+ }
32
+ //#endregion
33
+ export { i as PageHeader };
@@ -0,0 +1,12 @@
1
+ "use client";
2
+
3
+ var e = {
4
+ header: "_header_e7nyb_2",
5
+ breadcrumb: "_breadcrumb_e7nyb_8",
6
+ row: "_row_e7nyb_12",
7
+ title: "_title_e7nyb_20",
8
+ actions: "_actions_e7nyb_28",
9
+ description: "_description_e7nyb_35"
10
+ };
11
+ //#endregion
12
+ export { e as default };
@@ -1,22 +1,24 @@
1
1
  "use client";
2
2
 
3
3
  import e from "./link.module.js";
4
- import { cn as t } from "@cascivo/core";
5
- import { jsx as n } from "react/jsx-runtime";
4
+ import { Slot as t, cn as n } from "@cascivo/core";
5
+ import { forwardRef as r } from "react";
6
+ import { jsx as i } from "react/jsx-runtime";
6
7
  //#region ../components/src/link/link.tsx
7
- function r({ variant: r = "standalone", size: i = "md", external: a = !1, className: o, children: s, ...c }) {
8
- return /* @__PURE__ */ n("a", {
8
+ var a = r(function({ variant: r = "standalone", size: a = "md", external: o = !1, asChild: s = !1, className: c, children: l, ...u }, d) {
9
+ return /* @__PURE__ */ i(s ? t : "a", {
9
10
  "data-variant": r,
10
- "data-size": i,
11
- "data-external": a || void 0,
12
- className: t(e.link, o),
13
- ...a ? {
11
+ "data-size": a,
12
+ "data-external": o || void 0,
13
+ className: n(e.link, c),
14
+ ...o ? {
14
15
  target: "_blank",
15
16
  rel: "noreferrer"
16
17
  } : {},
17
- ...c,
18
- children: s
18
+ ref: d,
19
+ ...u,
20
+ children: l
19
21
  });
20
- }
22
+ });
21
23
  //#endregion
22
- export { r as Link };
24
+ export { a as Link };
@@ -2,9 +2,9 @@
2
2
 
3
3
  import e from "./log-viewer.module.js";
4
4
  import { VisuallyHidden as t, cn as n, useClipboard as r, useComputed as i, useControllableSignal as a, useResizeObserver as o, useSignal as s, useSignalEffect 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 { Fragment as m } from "react";
5
+ import { Fragment 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/log-viewer/log-viewer.tsx
9
9
  var h = {
10
10
  30: "black",
@@ -52,11 +52,11 @@ function g(e) {
52
52
  function _(e, t, n) {
53
53
  if (!t) return e;
54
54
  let r = e.toLowerCase(), i = t.toLowerCase(), a = [], o = 0, s = r.indexOf(i, o), c = 0;
55
- for (; s !== -1;) s > o && a.push(e.slice(o, s)), a.push(/* @__PURE__ */ f("mark", { children: e.slice(s, s + i.length) }, `${n}-${c++}`)), o = s + i.length, s = r.indexOf(i, o);
55
+ for (; s !== -1;) s > o && a.push(e.slice(o, s)), a.push(/* @__PURE__ */ p("mark", { children: e.slice(s, s + i.length) }, `${n}-${c++}`)), o = s + i.length, s = r.indexOf(i, o);
56
56
  return o < e.length && a.push(e.slice(o)), a;
57
57
  }
58
58
  function v(t, n, r) {
59
- return (n ? g(t.text) : [{ text: t.text }]).map((n, i) => /* @__PURE__ */ f("span", {
59
+ return (n ? g(t.text) : [{ text: t.text }]).map((n, i) => /* @__PURE__ */ p("span", {
60
60
  "data-ansi": n.color,
61
61
  style: n.bold ? { fontWeight: 700 } : void 0,
62
62
  className: n.color ? e.ansi : void 0,
@@ -66,13 +66,13 @@ function v(t, n, r) {
66
66
  function y({ lines: h, rowHeight: g = 20, overscan: _ = 8, follow: y, onFollowChange: b, ansi: x = !1, search: S, maxHeight: C = "24rem", labels: w, className: T, ...E }) {
67
67
  l();
68
68
  let D = {
69
- searchPlaceholder: w?.searchPlaceholder ?? d(u.logViewer.search),
70
- follow: w?.follow ?? d(u.logViewer.follow),
71
- paused: w?.paused ?? d(u.logViewer.paused),
72
- copy: w?.copy ?? d(u.logViewer.copy),
73
- copied: w?.copied ?? d(u.logViewer.copied),
74
- empty: w?.empty ?? d(u.logViewer.empty),
75
- label: d(u.logViewer.label)
69
+ searchPlaceholder: w?.searchPlaceholder ?? f(d.logViewer.search),
70
+ follow: w?.follow ?? f(d.logViewer.follow),
71
+ paused: w?.paused ?? f(d.logViewer.paused),
72
+ copy: w?.copy ?? f(d.logViewer.copy),
73
+ copied: w?.copied ?? f(d.logViewer.copied),
74
+ empty: w?.empty ?? f(d.logViewer.empty),
75
+ label: f(d.logViewer.label)
76
76
  }, O = s(Array.isArray(h) ? h : []);
77
77
  Array.isArray(h) && (O.value = h);
78
78
  let k = Array.isArray(h) ? O : h, { ref: A, size: j } = o(), M = s(0), [N, P] = a({
@@ -103,14 +103,14 @@ function y({ lines: h, rowHeight: g = 20, overscan: _ = 8, follow: y, onFollowCh
103
103
  let t = e.currentTarget;
104
104
  M.value = t.scrollTop, P(t.scrollHeight - t.clientHeight - t.scrollTop <= g);
105
105
  }, V = R.value, H = F.value.trim();
106
- return /* @__PURE__ */ p("div", {
106
+ return /* @__PURE__ */ m("div", {
107
107
  className: n(e.root, T),
108
108
  ...E,
109
109
  children: [
110
- /* @__PURE__ */ p("div", {
110
+ /* @__PURE__ */ m("div", {
111
111
  className: e.toolbar,
112
112
  children: [
113
- /* @__PURE__ */ f("input", {
113
+ /* @__PURE__ */ p("input", {
114
114
  type: "search",
115
115
  className: e.search,
116
116
  placeholder: D.searchPlaceholder,
@@ -120,13 +120,13 @@ function y({ lines: h, rowHeight: g = 20, overscan: _ = 8, follow: y, onFollowCh
120
120
  F.value = e.currentTarget.value;
121
121
  }
122
122
  }),
123
- H ? /* @__PURE__ */ f("span", {
123
+ H ? /* @__PURE__ */ p("span", {
124
124
  className: e.count,
125
125
  "aria-live": "polite",
126
- children: d(u.logViewer.matches, { count: z.value })
126
+ children: f(d.logViewer.matches, { count: z.value })
127
127
  }) : null,
128
- /* @__PURE__ */ f("span", { className: e.spacer }),
129
- /* @__PURE__ */ f("button", {
128
+ /* @__PURE__ */ p("span", { className: e.spacer }),
129
+ /* @__PURE__ */ p("button", {
130
130
  type: "button",
131
131
  className: e.toggle,
132
132
  "aria-pressed": N.value,
@@ -139,7 +139,7 @@ function y({ lines: h, rowHeight: g = 20, overscan: _ = 8, follow: y, onFollowCh
139
139
  },
140
140
  children: N.value ? D.follow : D.paused
141
141
  }),
142
- /* @__PURE__ */ f("button", {
142
+ /* @__PURE__ */ p("button", {
143
143
  type: "button",
144
144
  className: e.copy,
145
145
  onClick: () => void L(k.value.map((e) => e.text).join("\n")),
@@ -147,7 +147,7 @@ function y({ lines: h, rowHeight: g = 20, overscan: _ = 8, follow: y, onFollowCh
147
147
  })
148
148
  ]
149
149
  }),
150
- /* @__PURE__ */ f("div", {
150
+ /* @__PURE__ */ p("div", {
151
151
  ref: A,
152
152
  className: e.scroll,
153
153
  role: "log",
@@ -156,13 +156,13 @@ function y({ lines: h, rowHeight: g = 20, overscan: _ = 8, follow: y, onFollowCh
156
156
  tabIndex: 0,
157
157
  style: { maxBlockSize: C },
158
158
  onScroll: B,
159
- children: V.total === 0 ? /* @__PURE__ */ f("div", {
159
+ children: V.total === 0 ? /* @__PURE__ */ p("div", {
160
160
  className: e.empty,
161
161
  children: D.empty
162
- }) : /* @__PURE__ */ f("div", {
162
+ }) : /* @__PURE__ */ p("div", {
163
163
  className: e.sizer,
164
164
  style: { blockSize: V.total * g },
165
- children: V.rows.map((t, n) => /* @__PURE__ */ f(m, { children: /* @__PURE__ */ f("div", {
165
+ children: V.rows.map((t, n) => /* @__PURE__ */ p(u, { children: /* @__PURE__ */ p("div", {
166
166
  className: e.line,
167
167
  "data-level": t.level,
168
168
  style: {
@@ -173,9 +173,9 @@ function y({ lines: h, rowHeight: g = 20, overscan: _ = 8, follow: y, onFollowCh
173
173
  }) }, t.id))
174
174
  })
175
175
  }),
176
- /* @__PURE__ */ f(t, {
176
+ /* @__PURE__ */ p(t, {
177
177
  "aria-live": "polite",
178
- children: d(u.logViewer.lines, { count: V.total })
178
+ children: f(d.logViewer.lines, { count: V.total })
179
179
  })
180
180
  ]
181
181
  });
@@ -3,11 +3,11 @@
3
3
  import { usePopover as e } from "../popover/use-popover.js";
4
4
  import t from "./menu.module.js";
5
5
  import { useSignalEffect as n, useSignals as r, useTypeahead as i } from "@cascivo/core";
6
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
7
- import { createContext as s } from "react";
6
+ import { createContext as a } from "react";
7
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
8
8
  //#region ../components/src/menu/menu.tsx
9
- var c = s(null);
10
- function l({ ctx: e, children: o }) {
9
+ var c = a(null);
10
+ function l({ ctx: e, children: a }) {
11
11
  r();
12
12
  let { popoverRef: s, anchorName: c, isOpen: l } = e, u = () => {
13
13
  let e = s.current;
@@ -22,7 +22,7 @@ function l({ ctx: e, children: o }) {
22
22
  if (!l.value) return;
23
23
  let e = s.current;
24
24
  e && e.querySelector("[role=\"menuitem\"]:not([aria-disabled=\"true\"])")?.focus();
25
- }), /* @__PURE__ */ a("div", {
25
+ }), /* @__PURE__ */ o("div", {
26
26
  ref: s,
27
27
  popover: "auto",
28
28
  role: "menu",
@@ -46,13 +46,13 @@ function l({ ctx: e, children: o }) {
46
46
  default: f.onKeyDown(e);
47
47
  }
48
48
  },
49
- children: o
49
+ children: a
50
50
  });
51
51
  }
52
52
  function u({ children: e }) {
53
- return /* @__PURE__ */ a(c.Consumer, { children: (t) => {
53
+ return /* @__PURE__ */ o(c.Consumer, { children: (t) => {
54
54
  if (!t) throw Error("MenuPanel must be inside <Menu>");
55
- return /* @__PURE__ */ a(l, {
55
+ return /* @__PURE__ */ o(l, {
56
56
  ctx: t,
57
57
  children: e
58
58
  });
@@ -60,16 +60,16 @@ function u({ children: e }) {
60
60
  }
61
61
  function d({ children: t }) {
62
62
  let n = e(), [r, ...i] = Array.isArray(t) ? t : [t];
63
- return /* @__PURE__ */ o(c.Provider, {
63
+ return /* @__PURE__ */ s(c.Provider, {
64
64
  value: n,
65
- children: [r, /* @__PURE__ */ a(u, { children: i })]
65
+ children: [r, /* @__PURE__ */ o(u, { children: i })]
66
66
  });
67
67
  }
68
68
  function f({ ctx: e, children: n, "aria-label": i }) {
69
69
  r();
70
- let { triggerRef: o, toggle: s, anchorName: c, isOpen: l } = e;
71
- return /* @__PURE__ */ a("button", {
72
- ref: o,
70
+ let { triggerRef: a, toggle: s, anchorName: c, isOpen: l } = e;
71
+ return /* @__PURE__ */ o("button", {
72
+ ref: a,
73
73
  type: "button",
74
74
  "aria-haspopup": "menu",
75
75
  "aria-expanded": l.value,
@@ -81,9 +81,9 @@ function f({ ctx: e, children: n, "aria-label": i }) {
81
81
  });
82
82
  }
83
83
  function p({ children: e, "aria-label": t }) {
84
- return /* @__PURE__ */ a(c.Consumer, { children: (n) => {
84
+ return /* @__PURE__ */ o(c.Consumer, { children: (n) => {
85
85
  if (!n) throw Error("MenuTrigger must be inside <Menu>");
86
- return /* @__PURE__ */ a(f, {
86
+ return /* @__PURE__ */ o(f, {
87
87
  ctx: n,
88
88
  ...t !== void 0 && { "aria-label": t },
89
89
  children: e
@@ -91,16 +91,16 @@ function p({ children: e, "aria-label": t }) {
91
91
  } });
92
92
  }
93
93
  function m({ children: e, onSelect: n, disabled: r }) {
94
- return /* @__PURE__ */ a(c.Consumer, { children: (i) => {
94
+ return /* @__PURE__ */ o(c.Consumer, { children: (i) => {
95
95
  if (!i) throw Error("MenuItem must be inside <Menu>");
96
- let { close: o } = i;
96
+ let { close: a } = i;
97
97
  function s() {
98
- r || (n(), o());
98
+ r || (n(), a());
99
99
  }
100
100
  function c(e) {
101
101
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), s());
102
102
  }
103
- return /* @__PURE__ */ a("div", {
103
+ return /* @__PURE__ */ o("div", {
104
104
  role: "menuitem",
105
105
  tabIndex: r ? -1 : 0,
106
106
  "aria-disabled": r,
@@ -112,7 +112,7 @@ function m({ children: e, onSelect: n, disabled: r }) {
112
112
  } });
113
113
  }
114
114
  function h() {
115
- return /* @__PURE__ */ a("div", {
115
+ return /* @__PURE__ */ o("div", {
116
116
  role: "separator",
117
117
  className: t.separator
118
118
  });