@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
@@ -76,24 +76,24 @@ function p({ item: n }) {
76
76
  })]
77
77
  });
78
78
  }
79
- function m({ brand: e, nav: i, actions: a, end: m, onMenuClick: h, menuExpanded: g, skipToContentHref: _ = "#cascade-main", labels: v, className: y }) {
79
+ function m({ brand: e, nav: i, center: a, actions: m, end: h, onMenuClick: g, menuExpanded: _, skipToContentHref: v = "#cascade-main", labels: y, className: b }) {
80
80
  o();
81
- let b = r(), x = v?.nav ?? c(s.shellHeader.nav), S = g ? v?.closeMenu ?? c(s.shellHeader.closeMenu) : v?.openMenu ?? c(s.shellHeader.openMenu);
81
+ let x = r(), S = y?.nav ?? c(s.shellHeader.nav), C = _ ? y?.closeMenu ?? c(s.shellHeader.closeMenu) : y?.openMenu ?? c(s.shellHeader.openMenu);
82
82
  return /* @__PURE__ */ u("header", {
83
83
  role: "banner",
84
- className: n(t.header, y),
84
+ className: n(t.header, b),
85
85
  children: [
86
- _ !== !1 && /* @__PURE__ */ l("a", {
87
- href: _,
86
+ v !== !1 && /* @__PURE__ */ l("a", {
87
+ href: v,
88
88
  className: t.skipLink,
89
- children: v?.skipToContent ?? c(s.shellHeader.skipToContent)
89
+ children: y?.skipToContent ?? c(s.shellHeader.skipToContent)
90
90
  }),
91
- h && /* @__PURE__ */ l("button", {
91
+ g && /* @__PURE__ */ l("button", {
92
92
  type: "button",
93
- "aria-label": S,
94
- "aria-expanded": g ?? !1,
93
+ "aria-label": C,
94
+ "aria-expanded": _ ?? !1,
95
95
  className: t.menuButton,
96
- onClick: h,
96
+ onClick: g,
97
97
  children: /* @__PURE__ */ l("svg", {
98
98
  viewBox: "0 0 16 16",
99
99
  width: "16",
@@ -107,7 +107,7 @@ function m({ brand: e, nav: i, actions: a, end: m, onMenuClick: h, menuExpanded:
107
107
  })
108
108
  })
109
109
  }),
110
- e != null && (d(e) ? /* @__PURE__ */ u(b, {
110
+ e != null && (d(e) ? /* @__PURE__ */ u(x, {
111
111
  href: e.href ?? "/",
112
112
  "aria-label": [e.prefix, e.name].filter(Boolean).join(" "),
113
113
  className: t.brand,
@@ -123,11 +123,11 @@ function m({ brand: e, nav: i, actions: a, end: m, onMenuClick: h, menuExpanded:
123
123
  children: e
124
124
  })),
125
125
  i && i.length > 0 && /* @__PURE__ */ l("nav", {
126
- "aria-label": x,
126
+ "aria-label": S,
127
127
  className: t.nav,
128
128
  children: /* @__PURE__ */ l("ul", {
129
129
  className: t.navList,
130
- children: i.map((e, n) => f(e) ? /* @__PURE__ */ l(p, { item: e }, e.id ?? `${n}-${e.label}`) : /* @__PURE__ */ l("li", { children: /* @__PURE__ */ l(b, {
130
+ children: i.map((e, n) => f(e) ? /* @__PURE__ */ l(p, { item: e }, e.id ?? `${n}-${e.label}`) : /* @__PURE__ */ l("li", { children: /* @__PURE__ */ l(x, {
131
131
  href: e.href,
132
132
  "aria-current": e.active ? "page" : void 0,
133
133
  "data-state": e.active ? "active" : void 0,
@@ -137,10 +137,13 @@ function m({ brand: e, nav: i, actions: a, end: m, onMenuClick: h, menuExpanded:
137
137
  }) }, e.id ?? `${n}-${e.href}`))
138
138
  })
139
139
  }),
140
- /* @__PURE__ */ l("div", { className: t.spacer }),
141
- a && a.length > 0 && /* @__PURE__ */ l("div", {
140
+ a ? /* @__PURE__ */ l("div", {
141
+ className: t.center,
142
+ children: a
143
+ }) : /* @__PURE__ */ l("div", { className: t.spacer }),
144
+ m && m.length > 0 && /* @__PURE__ */ l("div", {
142
145
  className: t.actions,
143
- children: a.map((e) => /* @__PURE__ */ l("button", {
146
+ children: m.map((e) => /* @__PURE__ */ l("button", {
144
147
  type: "button",
145
148
  "aria-label": e.label,
146
149
  "aria-pressed": e.active ?? !1,
@@ -155,9 +158,9 @@ function m({ brand: e, nav: i, actions: a, end: m, onMenuClick: h, menuExpanded:
155
158
  })
156
159
  }, e.id))
157
160
  }),
158
- m && /* @__PURE__ */ l("div", {
161
+ h && /* @__PURE__ */ l("div", {
159
162
  className: t.end,
160
- children: m
163
+ children: h
161
164
  })
162
165
  ]
163
166
  });
@@ -1,25 +1,26 @@
1
1
  "use client";
2
2
 
3
3
  var e = {
4
- header: "_header_80jhs_2",
5
- skipLink: "_skipLink_80jhs_14",
6
- menuButton: "_menuButton_80jhs_36",
7
- brand: "_brand_80jhs_59",
8
- brandPrefix: "_brandPrefix_80jhs_69",
9
- brandName: "_brandName_80jhs_73",
10
- nav: "_nav_80jhs_77",
11
- navList: "_navList_80jhs_81",
12
- navLink: "_navLink_80jhs_90",
13
- navMenuWrapper: "_navMenuWrapper_80jhs_119",
14
- navMenuTrigger: "_navMenuTrigger_80jhs_124",
15
- chevron: "_chevron_80jhs_156",
16
- navMenuPanel: "_navMenuPanel_80jhs_164",
17
- navMenuItem: "_navMenuItem_80jhs_197",
18
- spacer: "_spacer_80jhs_219",
19
- actions: "_actions_80jhs_223",
20
- action: "_action_80jhs_223",
21
- actionIcon: "_actionIcon_80jhs_257",
22
- end: "_end_80jhs_265"
4
+ header: "_header_6njjo_2",
5
+ skipLink: "_skipLink_6njjo_14",
6
+ menuButton: "_menuButton_6njjo_36",
7
+ brand: "_brand_6njjo_59",
8
+ brandPrefix: "_brandPrefix_6njjo_69",
9
+ brandName: "_brandName_6njjo_73",
10
+ nav: "_nav_6njjo_77",
11
+ navList: "_navList_6njjo_81",
12
+ navLink: "_navLink_6njjo_90",
13
+ navMenuWrapper: "_navMenuWrapper_6njjo_119",
14
+ navMenuTrigger: "_navMenuTrigger_6njjo_124",
15
+ chevron: "_chevron_6njjo_156",
16
+ navMenuPanel: "_navMenuPanel_6njjo_164",
17
+ navMenuItem: "_navMenuItem_6njjo_197",
18
+ spacer: "_spacer_6njjo_219",
19
+ center: "_center_6njjo_226",
20
+ actions: "_actions_6njjo_235",
21
+ action: "_action_6njjo_235",
22
+ actionIcon: "_actionIcon_6njjo_269",
23
+ end: "_end_6njjo_277"
23
24
  };
24
25
  //#endregion
25
26
  export { e as default };
@@ -3,22 +3,22 @@
3
3
  import { Tooltip as e } from "../tooltip/tooltip.js";
4
4
  import { usePopover as t } from "../popover/use-popover.js";
5
5
  import n from "./side-nav.module.js";
6
- import { cn as r, getLinkComponent as i, useSignal as a, useSignals as o } from "@cascivo/core";
7
- import { builtin as s, t as c } from "@cascivo/i18n";
8
- import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
9
- import { Fragment as f, useId as p } from "react";
6
+ import { cn as r, focusElement as i, getLinkComponent as a, useSignal as o, useSignals as s } from "@cascivo/core";
7
+ import { Fragment as c, useId as l } from "react";
8
+ import { builtin as u, t as d } from "@cascivo/i18n";
9
+ import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
10
10
  //#region ../components/src/side-nav/side-nav.tsx
11
- function m(e) {
11
+ function h(e) {
12
12
  return !("type" in e);
13
13
  }
14
- function h() {
15
- return /* @__PURE__ */ u("svg", {
14
+ function g() {
15
+ return /* @__PURE__ */ p("svg", {
16
16
  viewBox: "0 0 16 16",
17
17
  width: "14",
18
18
  height: "14",
19
19
  "aria-hidden": "true",
20
20
  className: n.checkMark,
21
- children: /* @__PURE__ */ u("path", {
21
+ children: /* @__PURE__ */ p("path", {
22
22
  d: "M3.5 8.5l3 3 6-7",
23
23
  fill: "none",
24
24
  stroke: "currentColor",
@@ -28,20 +28,20 @@ function h() {
28
28
  })
29
29
  });
30
30
  }
31
- function g(e, { inMenu: t, onActivate: a, extraClass: o }) {
32
- let s = t ? "menuitem" : void 0, c = r(n.link, n.sublink, o), f = /* @__PURE__ */ d(l, { children: [
33
- e.icon ? /* @__PURE__ */ u("span", {
31
+ function _(e, { inMenu: t, onActivate: i, extraClass: o }) {
32
+ let s = t ? "menuitem" : void 0, c = r(n.link, n.sublink, o), l = /* @__PURE__ */ m(f, { children: [
33
+ e.icon ? /* @__PURE__ */ p("span", {
34
34
  className: n.icon,
35
35
  "aria-hidden": "true",
36
36
  children: e.icon
37
37
  }) : null,
38
- /* @__PURE__ */ u("span", {
38
+ /* @__PURE__ */ p("span", {
39
39
  className: n.label,
40
40
  children: e.label
41
41
  }),
42
- e.selected ? /* @__PURE__ */ u(h, {}) : null
42
+ e.selected ? /* @__PURE__ */ p(g, {}) : null
43
43
  ] });
44
- return e.onSelect && !e.href ? /* @__PURE__ */ u("button", {
44
+ return e.onSelect && !e.href ? /* @__PURE__ */ p("button", {
45
45
  type: "button",
46
46
  role: s,
47
47
  "aria-current": e.active ? "page" : void 0,
@@ -50,10 +50,10 @@ function g(e, { inMenu: t, onActivate: a, extraClass: o }) {
50
50
  disabled: e.disabled,
51
51
  className: c,
52
52
  onClick: () => {
53
- e.onSelect?.(), a?.();
53
+ e.onSelect?.(), i?.();
54
54
  },
55
- children: f
56
- }) : /* @__PURE__ */ u(i(), {
55
+ children: l
56
+ }) : /* @__PURE__ */ p(a(), {
57
57
  href: e.disabled ? void 0 : e.href,
58
58
  role: s,
59
59
  "aria-current": e.active ? "page" : void 0,
@@ -67,116 +67,116 @@ function g(e, { inMenu: t, onActivate: a, extraClass: o }) {
67
67
  t.preventDefault();
68
68
  return;
69
69
  }
70
- e.onSelect?.(), a?.();
70
+ e.onSelect?.(), i?.();
71
71
  },
72
- children: f
72
+ children: l
73
73
  });
74
74
  }
75
- function _(e) {
75
+ function v(e) {
76
76
  if (typeof Intl < "u" && "Segmenter" in Intl) {
77
77
  let t = new Intl.Segmenter(void 0, { granularity: "grapheme" });
78
78
  for (let n of t.segment(e)) return n.segment;
79
79
  }
80
80
  return [...e][0] ?? "";
81
81
  }
82
- function v({ item: e }) {
83
- let { triggerRef: r, popoverRef: i, isOpen: a, anchorName: o, open: s, close: c, toggle: p } = t(), h = "[role=\"menuitem\"]:not([disabled]):not([aria-disabled=\"true\"])";
84
- return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("button", {
82
+ function y({ item: e }) {
83
+ let { triggerRef: r, popoverRef: a, isOpen: o, anchorName: s, open: l, close: u, toggle: d } = t(), g = "[role=\"menuitem\"]:not([disabled]):not([aria-disabled=\"true\"])";
84
+ return /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("button", {
85
85
  ref: r,
86
86
  type: "button",
87
87
  "aria-haspopup": "menu",
88
- "aria-expanded": a.value,
88
+ "aria-expanded": o.value,
89
89
  "aria-label": e.label,
90
- "data-state": a.value ? "open" : "closed",
91
- style: { anchorName: o },
90
+ "data-state": o.value ? "open" : "closed",
91
+ style: { anchorName: s },
92
92
  className: n.groupTrigger,
93
- onClick: () => p(),
93
+ onClick: () => d(),
94
94
  onKeyDown: (e) => {
95
95
  if (e.key === "ArrowDown") {
96
- e.preventDefault(), a.value || s();
97
- let t = i.current;
96
+ e.preventDefault(), o.value || l();
97
+ let t = a.current;
98
98
  t && setTimeout(() => {
99
- t.querySelector(h)?.focus();
99
+ t.querySelector(g)?.focus();
100
100
  }, 0);
101
- } else e.key === "Escape" && c();
101
+ } else e.key === "Escape" && u();
102
102
  },
103
- children: e.icon ? /* @__PURE__ */ u("span", {
103
+ children: e.icon ? /* @__PURE__ */ p("span", {
104
104
  className: n.icon,
105
105
  "aria-hidden": "true",
106
106
  children: e.icon
107
- }) : /* @__PURE__ */ u("span", {
107
+ }) : /* @__PURE__ */ p("span", {
108
108
  className: n.fallbackIcon,
109
109
  "data-fallback-icon": !0,
110
110
  "aria-hidden": "true",
111
- children: _(e.label)
111
+ children: v(e.label)
112
112
  })
113
- }), /* @__PURE__ */ d("div", {
114
- ref: i,
113
+ }), /* @__PURE__ */ m("div", {
114
+ ref: a,
115
115
  popover: "auto",
116
116
  role: "menu",
117
117
  "aria-label": e.label,
118
- style: { positionAnchor: o },
118
+ style: { positionAnchor: s },
119
119
  className: n.railFlyout,
120
120
  onKeyDown: (e) => {
121
- let t = i.current;
121
+ let t = a.current;
122
122
  if (!t) return;
123
- let n = Array.from(t.querySelectorAll(h)), a = n.indexOf(e.target);
124
- e.key === "ArrowDown" ? (e.preventDefault(), n[(a + 1) % n.length]?.focus()) : e.key === "ArrowUp" ? (e.preventDefault(), n[(a - 1 + n.length) % n.length]?.focus()) : e.key === "Escape" && (e.preventDefault(), c(), r.current?.focus());
123
+ let n = Array.from(t.querySelectorAll(g)), o = n.indexOf(e.target);
124
+ e.key === "ArrowDown" ? (e.preventDefault(), n[(o + 1) % n.length]?.focus()) : e.key === "ArrowUp" ? (e.preventDefault(), n[(o - 1 + n.length) % n.length]?.focus()) : e.key === "Escape" && (e.preventDefault(), u(), i(r.current));
125
125
  },
126
- children: [/* @__PURE__ */ u("div", {
126
+ children: [/* @__PURE__ */ p("div", {
127
127
  className: n.railFlyoutCaption,
128
128
  "aria-hidden": "true",
129
129
  children: e.label
130
- }), e.items.map((e, t) => m(e) ? /* @__PURE__ */ u(f, { children: g(e, {
130
+ }), e.items.map((e, t) => h(e) ? /* @__PURE__ */ p(c, { children: _(e, {
131
131
  inMenu: !0,
132
- onActivate: c,
132
+ onActivate: u,
133
133
  extraClass: n.flyoutItem
134
- }) }, t) : e.type === "separator" ? /* @__PURE__ */ u("div", {
134
+ }) }, t) : e.type === "separator" ? /* @__PURE__ */ p("div", {
135
135
  role: "separator",
136
136
  className: n.flyoutSeparator
137
- }, t) : /* @__PURE__ */ u("div", {
137
+ }, t) : /* @__PURE__ */ p("div", {
138
138
  className: n.railFlyoutCaption,
139
139
  "aria-hidden": "true",
140
140
  children: e.label
141
141
  }, t))]
142
142
  })] });
143
143
  }
144
- function y({ items: t, groups: f, collapsed: h, defaultCollapsed: y = !1, onCollapsedChange: b, ariaLabel: x, collapseLabel: S, expandLabel: C, expandOnHover: w = !1, showCollapseToggle: T = !0, header: E, footer: D, className: O }) {
145
- o();
146
- let k = x ?? c(s.sideNav.nav), A = S ?? c(s.sideNav.collapse), j = C ?? c(s.sideNav.expand), M = p(), N = a(h ?? y);
147
- h !== void 0 && (N.value = h);
148
- let P = f ?? (t ? [{ items: t }] : [{ items: [] }]), F = a(P.flatMap((e) => e.items).filter((e) => e.items?.some((e) => m(e) && e.active)).map((e) => e.label)), I = (e) => {
144
+ function b({ items: t, groups: i, collapsed: c, defaultCollapsed: g = !1, onCollapsedChange: b, ariaLabel: x, collapseLabel: S, expandLabel: C, expandOnHover: w = !1, showCollapseToggle: T = !0, header: E, footer: D, className: O }) {
145
+ s();
146
+ let k = x ?? d(u.sideNav.nav), A = S ?? d(u.sideNav.collapse), j = C ?? d(u.sideNav.expand), M = l(), N = o(c ?? g);
147
+ c !== void 0 && (N.value = c);
148
+ let P = i ?? (t ? [{ items: t }] : [{ items: [] }]), F = o(P.flatMap((e) => e.items).filter((e) => e.items?.some((e) => h(e) && e.active)).map((e) => e.label)), I = (e) => {
149
149
  let t = F.value;
150
150
  F.value = t.includes(e) ? t.filter((t) => t !== e) : [...t, e];
151
151
  }, L = () => {
152
152
  let e = !N.value;
153
- h === void 0 && (N.value = e), b?.(e);
153
+ c === void 0 && (N.value = e), b?.(e);
154
154
  }, R = N.value;
155
- return /* @__PURE__ */ d("nav", {
155
+ return /* @__PURE__ */ m("nav", {
156
156
  "aria-label": k,
157
157
  "data-state": R ? "collapsed" : "expanded",
158
158
  "data-expand-on-hover": R && w ? "" : void 0,
159
159
  className: r(n.sideNav, O),
160
160
  children: [
161
- E && /* @__PURE__ */ u("div", {
161
+ E && /* @__PURE__ */ p("div", {
162
162
  className: n.header,
163
163
  children: E
164
164
  }),
165
- /* @__PURE__ */ u("ul", {
165
+ /* @__PURE__ */ p("ul", {
166
166
  className: n.list,
167
- children: P.map((t, r) => /* @__PURE__ */ d("li", {
167
+ children: P.map((t, r) => /* @__PURE__ */ m("li", {
168
168
  className: n.group,
169
- children: [t.label && /* @__PURE__ */ u("h3", {
169
+ children: [t.label && /* @__PURE__ */ p("h3", {
170
170
  className: n.groupLabel,
171
171
  children: t.label
172
- }), /* @__PURE__ */ u("ul", {
172
+ }), /* @__PURE__ */ p("ul", {
173
173
  className: n.groupItems,
174
- children: t.items.map((t, a) => {
175
- let o = `${r}-${a}`;
174
+ children: t.items.map((t, i) => {
175
+ let o = `${r}-${i}`;
176
176
  if (t.items) {
177
- if (R && !w) return /* @__PURE__ */ u("li", { children: /* @__PURE__ */ u(v, { item: t }) }, t.id ?? o);
177
+ if (R && !w) return /* @__PURE__ */ p("li", { children: /* @__PURE__ */ p(y, { item: t }) }, t.id ?? o);
178
178
  let e = F.value.includes(t.label), r = `${M}-group-${o}`;
179
- return /* @__PURE__ */ d("li", { children: [/* @__PURE__ */ d("button", {
179
+ return /* @__PURE__ */ m("li", { children: [/* @__PURE__ */ m("button", {
180
180
  type: "button",
181
181
  "aria-expanded": e,
182
182
  "aria-controls": r,
@@ -185,28 +185,28 @@ function y({ items: t, groups: f, collapsed: h, defaultCollapsed: y = !1, onColl
185
185
  className: n.groupTrigger,
186
186
  onClick: () => I(t.label),
187
187
  children: [
188
- t.icon ? /* @__PURE__ */ u("span", {
188
+ t.icon ? /* @__PURE__ */ p("span", {
189
189
  className: n.icon,
190
190
  "aria-hidden": "true",
191
191
  children: t.icon
192
- }) : R ? /* @__PURE__ */ u("span", {
192
+ }) : R ? /* @__PURE__ */ p("span", {
193
193
  className: n.fallbackIcon,
194
194
  "data-fallback-icon": !0,
195
195
  "aria-hidden": "true",
196
- children: _(t.label)
196
+ children: v(t.label)
197
197
  }) : null,
198
- /* @__PURE__ */ u("span", {
198
+ /* @__PURE__ */ p("span", {
199
199
  className: n.label,
200
200
  "data-rail-hidden": R || void 0,
201
201
  children: t.label
202
202
  }),
203
- /* @__PURE__ */ u("svg", {
203
+ /* @__PURE__ */ p("svg", {
204
204
  viewBox: "0 0 16 16",
205
205
  width: "12",
206
206
  height: "12",
207
207
  "aria-hidden": "true",
208
208
  className: n.groupIndicator,
209
- children: /* @__PURE__ */ u("path", {
209
+ children: /* @__PURE__ */ p("path", {
210
210
  d: "M4 6l4 4 4-4",
211
211
  fill: "none",
212
212
  stroke: "currentColor",
@@ -216,44 +216,44 @@ function y({ items: t, groups: f, collapsed: h, defaultCollapsed: y = !1, onColl
216
216
  })
217
217
  })
218
218
  ]
219
- }), /* @__PURE__ */ u("div", {
219
+ }), /* @__PURE__ */ p("div", {
220
220
  id: r,
221
221
  "data-state": e ? "open" : "closed",
222
222
  className: n.sublist,
223
- children: /* @__PURE__ */ u("ul", {
223
+ children: /* @__PURE__ */ p("ul", {
224
224
  className: n.sublistInner,
225
- children: t.items.map((e, t) => m(e) ? /* @__PURE__ */ u("li", { children: g(e, { inMenu: !1 }) }, t) : e.type === "separator" ? /* @__PURE__ */ u("li", {
225
+ children: t.items.map((e, t) => h(e) ? /* @__PURE__ */ p("li", { children: _(e, { inMenu: !1 }) }, t) : e.type === "separator" ? /* @__PURE__ */ p("li", {
226
226
  role: "separator",
227
227
  className: n.subSeparator
228
- }, t) : /* @__PURE__ */ u("li", {
228
+ }, t) : /* @__PURE__ */ p("li", {
229
229
  className: n.subGroupLabel,
230
230
  children: e.label
231
231
  }, t))
232
232
  })
233
233
  })] }, t.id ?? o);
234
234
  }
235
- let s = /* @__PURE__ */ d(l, { children: [
236
- t.icon ? /* @__PURE__ */ u("span", {
235
+ let s = /* @__PURE__ */ m(f, { children: [
236
+ t.icon ? /* @__PURE__ */ p("span", {
237
237
  className: n.icon,
238
238
  "aria-hidden": "true",
239
239
  children: t.icon
240
- }) : R ? /* @__PURE__ */ u("span", {
240
+ }) : R ? /* @__PURE__ */ p("span", {
241
241
  className: n.fallbackIcon,
242
242
  "data-fallback-icon": !0,
243
243
  "aria-hidden": "true",
244
- children: _(t.label)
244
+ children: v(t.label)
245
245
  }) : null,
246
- /* @__PURE__ */ u("span", {
246
+ /* @__PURE__ */ p("span", {
247
247
  className: n.label,
248
248
  "data-rail-hidden": R || void 0,
249
249
  children: t.label
250
250
  }),
251
- t.trailing == null ? null : /* @__PURE__ */ u("span", {
251
+ t.trailing == null ? null : /* @__PURE__ */ p("span", {
252
252
  className: n.trailing,
253
253
  "data-rail-hidden": R || void 0,
254
254
  children: t.trailing
255
255
  })
256
- ] }), c = t.tone && t.tone !== "default" ? t.tone : void 0, f = {
256
+ ] }), c = t.tone && t.tone !== "default" ? t.tone : void 0, l = {
257
257
  href: t.disabled ? void 0 : t.href,
258
258
  "aria-current": t.active ? "page" : void 0,
259
259
  "aria-label": R ? t.label : void 0,
@@ -270,15 +270,15 @@ function y({ items: t, groups: f, collapsed: h, defaultCollapsed: y = !1, onColl
270
270
  t.onClick?.(e);
271
271
  }
272
272
  };
273
- if (t.render) return /* @__PURE__ */ u("li", {
273
+ if (t.render) return /* @__PURE__ */ p("li", {
274
274
  className: n.customItem,
275
275
  children: t.render({
276
276
  collapsed: R,
277
277
  children: s,
278
- linkProps: f
278
+ linkProps: l
279
279
  })
280
280
  }, t.id ?? o);
281
- let p = i(), h = t.onClick && !t.href ? /* @__PURE__ */ u("button", {
281
+ let u = a(), d = t.onClick && !t.href ? /* @__PURE__ */ p("button", {
282
282
  type: "button",
283
283
  "aria-current": t.active ? "page" : void 0,
284
284
  "aria-label": R ? t.label : void 0,
@@ -288,35 +288,35 @@ function y({ items: t, groups: f, collapsed: h, defaultCollapsed: y = !1, onColl
288
288
  disabled: t.disabled,
289
289
  onClick: (e) => t.onClick?.(e),
290
290
  children: s
291
- }) : /* @__PURE__ */ u(p, {
292
- ...f,
291
+ }) : /* @__PURE__ */ p(u, {
292
+ ...l,
293
293
  children: s
294
294
  });
295
- return /* @__PURE__ */ u("li", { children: R && !w ? /* @__PURE__ */ u(e, {
295
+ return /* @__PURE__ */ p("li", { children: R && !w ? /* @__PURE__ */ p(e, {
296
296
  content: t.label,
297
297
  placement: "right",
298
- children: h
299
- }) : h }, t.id ?? o);
298
+ children: d
299
+ }) : d }, t.id ?? o);
300
300
  })
301
301
  })]
302
302
  }, r))
303
303
  }),
304
- D && /* @__PURE__ */ u("div", {
304
+ D && /* @__PURE__ */ p("div", {
305
305
  className: n.footer,
306
306
  children: D
307
307
  }),
308
- T && /* @__PURE__ */ u("button", {
308
+ T && /* @__PURE__ */ p("button", {
309
309
  type: "button",
310
310
  "aria-label": R ? j : A,
311
311
  className: n.collapseToggle,
312
312
  onClick: L,
313
- children: /* @__PURE__ */ u("svg", {
313
+ children: /* @__PURE__ */ p("svg", {
314
314
  viewBox: "0 0 16 16",
315
315
  width: "14",
316
316
  height: "14",
317
317
  "aria-hidden": "true",
318
318
  className: n.collapseIcon,
319
- children: /* @__PURE__ */ u("path", {
319
+ children: /* @__PURE__ */ p("path", {
320
320
  d: "M10 4l-4 4 4 4",
321
321
  fill: "none",
322
322
  stroke: "currentColor",
@@ -330,4 +330,4 @@ function y({ items: t, groups: f, collapsed: h, defaultCollapsed: y = !1, onColl
330
330
  });
331
331
  }
332
332
  //#endregion
333
- export { y as SideNav };
333
+ export { b as SideNav };
@@ -2,26 +2,26 @@
2
2
 
3
3
  import e from "./skip-nav.module.js";
4
4
  import { cn as t, useSignals as n } from "@cascivo/core";
5
- import { builtin as r, t as i } from "@cascivo/i18n";
6
- import { jsx as a } from "react/jsx-runtime";
5
+ import { forwardRef as r } from "react";
6
+ import { builtin as i, t as a } from "@cascivo/i18n";
7
+ import { jsx as o } from "react/jsx-runtime";
7
8
  //#region ../components/src/skip-nav/skip-nav.tsx
8
- var o = "cascade-skip-target";
9
- function s({ targetId: s = o, labels: c, className: l, ...u }) {
9
+ var s = "cascade-skip-target", c = r(function({ targetId: r = s, labels: c, className: l, ...u }, d) {
10
10
  n();
11
- let d = c?.label ?? i(r.skipNav.label);
12
- return /* @__PURE__ */ a("a", {
13
- href: `#${s}`,
11
+ let f = c?.label ?? a(i.skipNav.label);
12
+ return /* @__PURE__ */ o("a", {
13
+ href: `#${r}`,
14
14
  className: t(e.link, l),
15
15
  ...u,
16
- children: d
16
+ children: f
17
17
  });
18
- }
19
- function c({ id: e = o, ...t }) {
20
- return /* @__PURE__ */ a("div", {
18
+ });
19
+ function l({ id: e = s, ...t }) {
20
+ return /* @__PURE__ */ o("div", {
21
21
  id: e,
22
22
  tabIndex: -1,
23
23
  ...t
24
24
  });
25
25
  }
26
26
  //#endregion
27
- export { s as SkipNavLink, c as SkipNavTarget };
27
+ export { c as SkipNavLink, l as SkipNavTarget };
@@ -2,28 +2,30 @@
2
2
 
3
3
  import e from "./slider.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/slider/slider.tsx
7
- function i({ label: i, className: a, id: o, min: s = 0, max: c = 100, step: l = 1, disabled: u, ...d }) {
8
- let f = o ?? (i ? `cascade-slider-${i.toLowerCase().replace(/\s+/g, "-")}` : void 0);
9
- return /* @__PURE__ */ r("div", {
8
+ var a = n(function({ label: n, className: a, id: o, min: s = 0, max: c = 100, step: l = 1, disabled: u, ...d }, f) {
9
+ let p = o ?? (n ? `cascade-slider-${n.toLowerCase().replace(/\s+/g, "-")}` : void 0);
10
+ return /* @__PURE__ */ i("div", {
10
11
  className: t(e.wrapper, a),
11
12
  "data-disabled": u || void 0,
12
- children: [i && /* @__PURE__ */ n("label", {
13
+ children: [n && /* @__PURE__ */ r("label", {
13
14
  className: e.label,
14
- htmlFor: f,
15
- children: i
16
- }), /* @__PURE__ */ n("input", {
17
- id: f,
15
+ htmlFor: p,
16
+ children: n
17
+ }), /* @__PURE__ */ r("input", {
18
+ id: p,
18
19
  type: "range",
19
20
  min: s,
20
21
  max: c,
21
22
  step: l,
22
23
  disabled: u,
23
24
  className: e.slider,
25
+ ref: f,
24
26
  ...d
25
27
  })]
26
28
  });
27
- }
29
+ });
28
30
  //#endregion
29
- export { i as Slider };
31
+ export { a as Slider };