@cascivo/react 0.8.0 → 0.10.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 (287) hide show
  1. package/README.md +24 -11
  2. package/dist/combobox/combobox.js +73 -73
  3. package/dist/command-menu/command-menu.js +2 -2
  4. package/dist/date-picker/date-picker.js +95 -95
  5. package/dist/field/field.js +24 -15
  6. package/dist/filter/filter.js +12 -12
  7. package/dist/index.d.ts +74 -8
  8. package/dist/index.js +2 -0
  9. package/dist/node/accordion/accordion.js +95 -0
  10. package/dist/node/accordion/accordion.module.js +13 -0
  11. package/dist/node/action-sheet/action-sheet.js +91 -0
  12. package/dist/node/action-sheet/action-sheet.module.js +14 -0
  13. package/dist/node/alert/alert.js +55 -0
  14. package/dist/node/alert/alert.module.js +13 -0
  15. package/dist/node/alert-dialog/alert-dialog.js +68 -0
  16. package/dist/node/alert-dialog/alert-dialog.module.js +13 -0
  17. package/dist/node/app-shell/app-shell.js +80 -0
  18. package/dist/node/app-shell/app-shell.module.js +14 -0
  19. package/dist/node/aspect-ratio/aspect-ratio.js +22 -0
  20. package/dist/node/aspect-ratio/aspect-ratio.module.js +8 -0
  21. package/dist/node/avatar/avatar.js +57 -0
  22. package/dist/node/avatar/avatar.module.js +10 -0
  23. package/dist/node/avatar-group/avatar-group.js +26 -0
  24. package/dist/node/avatar-group/avatar-group.module.js +8 -0
  25. package/dist/node/badge/badge.js +17 -0
  26. package/dist/node/badge/badge.module.js +5 -0
  27. package/dist/node/blockquote/blockquote.js +18 -0
  28. package/dist/node/blockquote/blockquote.module.js +8 -0
  29. package/dist/node/bottom-sheet/bottom-sheet.js +111 -0
  30. package/dist/node/bottom-sheet/bottom-sheet.module.js +16 -0
  31. package/dist/node/breadcrumb/breadcrumb.js +28 -0
  32. package/dist/node/breadcrumb/breadcrumb.module.js +5 -0
  33. package/dist/node/button/button.js +31 -0
  34. package/dist/node/button/button.module.js +5 -0
  35. package/dist/node/button-group/button-group.js +39 -0
  36. package/dist/node/button-group/button-group.module.js +5 -0
  37. package/dist/node/calendar/calendar.js +195 -0
  38. package/dist/node/calendar/calendar.module.js +16 -0
  39. package/dist/node/card/card.js +45 -0
  40. package/dist/node/card/card.module.js +11 -0
  41. package/dist/node/carousel/carousel.js +138 -0
  42. package/dist/node/carousel/carousel.module.js +15 -0
  43. package/dist/node/chat-bubble/chat-bubble.js +33 -0
  44. package/dist/node/chat-bubble/chat-bubble.module.js +13 -0
  45. package/dist/node/checkbox/checkbox.js +38 -0
  46. package/dist/node/checkbox/checkbox.module.js +10 -0
  47. package/dist/node/checkbox-card/checkbox-card.js +48 -0
  48. package/dist/node/checkbox-card/checkbox-card.module.js +13 -0
  49. package/dist/node/code/code.js +16 -0
  50. package/dist/node/code/code.module.js +5 -0
  51. package/dist/node/code-snippet/code-snippet.js +116 -0
  52. package/dist/node/code-snippet/code-snippet.module.js +19 -0
  53. package/dist/node/code-snippet/highlight.js +69 -0
  54. package/dist/node/collapsible/collapsible.js +42 -0
  55. package/dist/node/collapsible/collapsible.module.js +10 -0
  56. package/dist/node/color-picker/color-picker.js +268 -0
  57. package/dist/node/color-picker/color-picker.module.js +20 -0
  58. package/dist/node/combobox/combobox.js +164 -0
  59. package/dist/node/combobox/combobox.module.js +21 -0
  60. package/dist/node/command-menu/command-menu.js +425 -0
  61. package/dist/node/command-menu/command-menu.module.js +36 -0
  62. package/dist/node/comparison/comparison.js +69 -0
  63. package/dist/node/comparison/comparison.module.js +11 -0
  64. package/dist/node/contained-list/contained-list.js +41 -0
  65. package/dist/node/contained-list/contained-list.module.js +13 -0
  66. package/dist/node/context-menu/context-menu.js +89 -0
  67. package/dist/node/context-menu/context-menu.module.js +9 -0
  68. package/dist/node/copy-button/copy-button.js +58 -0
  69. package/dist/node/copy-button/copy-button.module.js +8 -0
  70. package/dist/node/data-list/data-list.js +27 -0
  71. package/dist/node/data-list/data-list.module.js +10 -0
  72. package/dist/node/data-table/data-table.js +370 -0
  73. package/dist/node/data-table/data-table.module.js +35 -0
  74. package/dist/node/date-picker/date-picker.js +218 -0
  75. package/dist/node/date-picker/date-picker.module.js +25 -0
  76. package/dist/node/date-range-picker/date-range-picker.js +196 -0
  77. package/dist/node/date-range-picker/date-range-picker.module.js +20 -0
  78. package/dist/node/dock/dock.js +34 -0
  79. package/dist/node/dock/dock.module.js +10 -0
  80. package/dist/node/drawer/drawer.js +95 -0
  81. package/dist/node/drawer/drawer.module.js +15 -0
  82. package/dist/node/dropdown/dropdown.js +109 -0
  83. package/dist/node/dropdown/dropdown.module.js +11 -0
  84. package/dist/node/editable/editable.js +67 -0
  85. package/dist/node/editable/editable.module.js +13 -0
  86. package/dist/node/empty-state/empty-state.js +34 -0
  87. package/dist/node/empty-state/empty-state.module.js +11 -0
  88. package/dist/node/fab/fab.js +93 -0
  89. package/dist/node/fab/fab.module.js +14 -0
  90. package/dist/node/field/field.js +48 -0
  91. package/dist/node/field/field.module.js +9 -0
  92. package/dist/node/file-uploader/file-uploader.js +122 -0
  93. package/dist/node/file-uploader/file-uploader.module.js +20 -0
  94. package/dist/node/filter/filter.js +34 -0
  95. package/dist/node/filter/filter.module.js +8 -0
  96. package/dist/node/form/form.js +95 -0
  97. package/dist/node/form/form.module.js +5 -0
  98. package/dist/node/header/header.js +44 -0
  99. package/dist/node/header/header.module.js +13 -0
  100. package/dist/node/header-panel/header-panel.js +74 -0
  101. package/dist/node/header-panel/header-panel.module.js +11 -0
  102. package/dist/node/heading/heading.js +24 -0
  103. package/dist/node/heading/heading.module.js +5 -0
  104. package/dist/node/hover-card/hover-card.js +84 -0
  105. package/dist/node/hover-card/hover-card.module.js +8 -0
  106. package/dist/node/icon-button/icon-button.js +21 -0
  107. package/dist/node/icon-button/icon-button.module.js +5 -0
  108. package/dist/node/image/image.js +64 -0
  109. package/dist/node/image/image.module.js +11 -0
  110. package/dist/node/index.js +2 -0
  111. package/dist/node/indicator/indicator.js +18 -0
  112. package/dist/node/indicator/indicator.module.js +8 -0
  113. package/dist/node/inline-loading/inline-loading.js +76 -0
  114. package/dist/node/inline-loading/inline-loading.module.js +11 -0
  115. package/dist/node/input/input.js +54 -0
  116. package/dist/node/input/input.module.js +11 -0
  117. package/dist/node/input-group/input-group.js +41 -0
  118. package/dist/node/input-group/input-group.module.js +11 -0
  119. package/dist/node/item/item.js +52 -0
  120. package/dist/node/item/item.module.js +12 -0
  121. package/dist/node/join/join.js +14 -0
  122. package/dist/node/join/join.module.js +5 -0
  123. package/dist/node/kbd/kbd.js +16 -0
  124. package/dist/node/kbd/kbd.module.js +5 -0
  125. package/dist/node/label/label.js +25 -0
  126. package/dist/node/label/label.module.js +9 -0
  127. package/dist/node/layouts/src/auto-grid/auto-grid.js +19 -0
  128. package/dist/node/layouts/src/auto-grid/auto-grid.module.js +6 -0
  129. package/dist/node/layouts/src/center/center.js +18 -0
  130. package/dist/node/layouts/src/center/center.module.js +5 -0
  131. package/dist/node/layouts/src/columns/columns.js +23 -0
  132. package/dist/node/layouts/src/columns/columns.module.js +8 -0
  133. package/dist/node/layouts/src/flex/flex.js +22 -0
  134. package/dist/node/layouts/src/flex/flex.module.js +5 -0
  135. package/dist/node/layouts/src/grid/grid.js +57 -0
  136. package/dist/node/layouts/src/grid/grid.module.js +9 -0
  137. package/dist/node/layouts/src/spacer/spacer.js +19 -0
  138. package/dist/node/layouts/src/spacer/spacer.module.js +5 -0
  139. package/dist/node/link/link.js +22 -0
  140. package/dist/node/link/link.module.js +5 -0
  141. package/dist/node/list/list.js +23 -0
  142. package/dist/node/list/list.module.js +8 -0
  143. package/dist/node/log-viewer/log-viewer.js +184 -0
  144. package/dist/node/log-viewer/log-viewer.module.js +18 -0
  145. package/dist/node/menu/menu.js +121 -0
  146. package/dist/node/menu/menu.module.js +10 -0
  147. package/dist/node/menu-button/menu-button.js +92 -0
  148. package/dist/node/menu-button/menu-button.module.js +10 -0
  149. package/dist/node/menubar/menubar.js +103 -0
  150. package/dist/node/menubar/menubar.module.js +10 -0
  151. package/dist/node/modal/modal.js +70 -0
  152. package/dist/node/modal/modal.module.js +13 -0
  153. package/dist/node/multi-select/multi-select.js +106 -0
  154. package/dist/node/multi-select/multi-select.module.js +17 -0
  155. package/dist/node/native-select/native-select.js +37 -0
  156. package/dist/node/native-select/native-select.module.js +9 -0
  157. package/dist/node/navigation-menu/navigation-menu.js +99 -0
  158. package/dist/node/navigation-menu/navigation-menu.module.js +12 -0
  159. package/dist/node/notification/notification.js +134 -0
  160. package/dist/node/notification/notification.module.js +13 -0
  161. package/dist/node/number-input/number-input.js +145 -0
  162. package/dist/node/number-input/number-input.module.js +14 -0
  163. package/dist/node/otp-input/otp-input.js +70 -0
  164. package/dist/node/otp-input/otp-input.module.js +8 -0
  165. package/dist/node/overflow-menu/overflow-menu.js +65 -0
  166. package/dist/node/overflow-menu/overflow-menu.module.js +9 -0
  167. package/dist/node/pagination/pagination.js +92 -0
  168. package/dist/node/pagination/pagination.module.js +13 -0
  169. package/dist/node/password-input/password-input.js +80 -0
  170. package/dist/node/password-input/password-input.module.js +13 -0
  171. package/dist/node/popover/popover.js +49 -0
  172. package/dist/node/popover/popover.module.js +8 -0
  173. package/dist/node/popover/use-popover.js +57 -0
  174. package/dist/node/progress/progress.js +17 -0
  175. package/dist/node/progress/progress.module.js +8 -0
  176. package/dist/node/progress-bar/progress-bar.js +44 -0
  177. package/dist/node/progress-bar/progress-bar.module.js +13 -0
  178. package/dist/node/progress-circle/progress-circle.js +48 -0
  179. package/dist/node/progress-circle/progress-circle.module.js +11 -0
  180. package/dist/node/progress-indicator/progress-indicator.js +36 -0
  181. package/dist/node/progress-indicator/progress-indicator.module.js +12 -0
  182. package/dist/node/prose/prose.js +15 -0
  183. package/dist/node/prose/prose.module.js +5 -0
  184. package/dist/node/pull-to-refresh/pull-to-refresh.js +82 -0
  185. package/dist/node/pull-to-refresh/pull-to-refresh.module.js +11 -0
  186. package/dist/node/qr-code/encode.js +585 -0
  187. package/dist/node/qr-code/qr-code.js +41 -0
  188. package/dist/node/qr-code/qr-code.module.js +8 -0
  189. package/dist/node/radial-progress/radial-progress.js +28 -0
  190. package/dist/node/radial-progress/radial-progress.module.js +8 -0
  191. package/dist/node/radio/radio.js +49 -0
  192. package/dist/node/radio/radio.module.js +11 -0
  193. package/dist/node/radio-card/radio-card.js +63 -0
  194. package/dist/node/radio-card/radio-card.module.js +13 -0
  195. package/dist/node/rating-group/rating-group.js +37 -0
  196. package/dist/node/rating-group/rating-group.module.js +8 -0
  197. package/dist/node/react/src/index.js +138 -0
  198. package/dist/node/react/src/theme.js +54 -0
  199. package/dist/node/relative-time/relative-time.js +66 -0
  200. package/dist/node/relative-time/relative-time.module.js +5 -0
  201. package/dist/node/resizable/resizable.js +80 -0
  202. package/dist/node/resizable/resizable.module.js +10 -0
  203. package/dist/node/scroll-area/scroll-area.js +38 -0
  204. package/dist/node/scroll-area/scroll-area.module.js +5 -0
  205. package/dist/node/search/search.js +94 -0
  206. package/dist/node/search/search.module.js +11 -0
  207. package/dist/node/segmented-control/segmented-control.js +43 -0
  208. package/dist/node/segmented-control/segmented-control.module.js +8 -0
  209. package/dist/node/select/select.js +71 -0
  210. package/dist/node/select/select.module.js +13 -0
  211. package/dist/node/separator/separator.js +21 -0
  212. package/dist/node/separator/separator.module.js +5 -0
  213. package/dist/node/sheet/sheet.js +50 -0
  214. package/dist/node/sheet/sheet.module.js +11 -0
  215. package/dist/node/shell-header/shell-header.js +166 -0
  216. package/dist/node/shell-header/shell-header.module.js +25 -0
  217. package/dist/node/side-nav/side-nav.js +333 -0
  218. package/dist/node/side-nav/side-nav.module.js +33 -0
  219. package/dist/node/skeleton/skeleton.js +25 -0
  220. package/dist/node/skeleton/skeleton.module.js +9 -0
  221. package/dist/node/skip-nav/skip-nav.js +27 -0
  222. package/dist/node/skip-nav/skip-nav.module.js +5 -0
  223. package/dist/node/slider/slider.js +29 -0
  224. package/dist/node/slider/slider.module.js +9 -0
  225. package/dist/node/spinner/spinner.js +18 -0
  226. package/dist/node/spinner/spinner.module.js +8 -0
  227. package/dist/node/stack/stack.js +19 -0
  228. package/dist/node/stack/stack.module.js +8 -0
  229. package/dist/node/stat/stat.js +41 -0
  230. package/dist/node/stat/stat.module.js +13 -0
  231. package/dist/node/status/status.js +20 -0
  232. package/dist/node/status/status.module.js +9 -0
  233. package/dist/node/steps/steps.js +35 -0
  234. package/dist/node/steps/steps.module.js +10 -0
  235. package/dist/node/storage/src/drivers.js +36 -0
  236. package/dist/node/storage/src/persisted-signal.js +43 -0
  237. package/dist/node/structured-list/structured-list.js +101 -0
  238. package/dist/node/structured-list/structured-list.module.js +14 -0
  239. package/dist/node/swap/swap.js +36 -0
  240. package/dist/node/swap/swap.module.js +9 -0
  241. package/dist/node/swipe-item/swipe-item.js +62 -0
  242. package/dist/node/swipe-item/swipe-item.module.js +14 -0
  243. package/dist/node/switcher/switcher.js +32 -0
  244. package/dist/node/switcher/switcher.module.js +10 -0
  245. package/dist/node/tabs/tabs.js +95 -0
  246. package/dist/node/tabs/tabs.module.js +10 -0
  247. package/dist/node/tag/tag.js +26 -0
  248. package/dist/node/tag/tag.module.js +8 -0
  249. package/dist/node/tags-input/tags-input.js +64 -0
  250. package/dist/node/tags-input/tags-input.module.js +10 -0
  251. package/dist/node/text/text.js +18 -0
  252. package/dist/node/text/text.module.js +5 -0
  253. package/dist/node/textarea/textarea.js +56 -0
  254. package/dist/node/textarea/textarea.module.js +11 -0
  255. package/dist/node/tile/tile.js +39 -0
  256. package/dist/node/tile/tile.module.js +9 -0
  257. package/dist/node/time-picker/time-picker.js +62 -0
  258. package/dist/node/time-picker/time-picker.module.js +11 -0
  259. package/dist/node/timeline/timeline.js +41 -0
  260. package/dist/node/timeline/timeline.module.js +13 -0
  261. package/dist/node/toast/toast.js +85 -0
  262. package/dist/node/toast/toast.module.js +13 -0
  263. package/dist/node/toc/toc.js +42 -0
  264. package/dist/node/toc/toc.module.js +5 -0
  265. package/dist/node/toc/use-toc-from-region.js +18 -0
  266. package/dist/node/toggle/toggle.js +39 -0
  267. package/dist/node/toggle/toggle.module.js +10 -0
  268. package/dist/node/toggle-group/toggle-group.js +55 -0
  269. package/dist/node/toggle-group/toggle-group.module.js +8 -0
  270. package/dist/node/toggletip/toggletip.js +49 -0
  271. package/dist/node/toggletip/toggletip.module.js +9 -0
  272. package/dist/node/tooltip/tooltip.js +58 -0
  273. package/dist/node/tooltip/tooltip.module.js +8 -0
  274. package/dist/node/tree-view/tree-view.js +201 -0
  275. package/dist/node/tree-view/tree-view.module.js +15 -0
  276. package/dist/node/user/user.js +37 -0
  277. package/dist/node/user/user.module.js +11 -0
  278. package/dist/node/visually-hidden/visually-hidden.js +15 -0
  279. package/dist/node/visually-hidden/visually-hidden.module.js +5 -0
  280. package/dist/number-input/number-input.js +41 -41
  281. package/dist/react/src/theme.js +42 -31
  282. package/dist/search/search.js +35 -35
  283. package/dist/swap/swap.js +12 -12
  284. package/dist/time-picker/time-picker.js +24 -24
  285. package/dist/toggle/toggle.js +12 -12
  286. package/package.json +7 -6
  287. package/readme.body.md +24 -11
@@ -0,0 +1,333 @@
1
+ "use client";
2
+
3
+ import { Tooltip as e } from "../tooltip/tooltip.js";
4
+ import { usePopover as t } from "../popover/use-popover.js";
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";
10
+ //#region ../components/src/side-nav/side-nav.tsx
11
+ function m(e) {
12
+ return !("type" in e);
13
+ }
14
+ function h() {
15
+ return /* @__PURE__ */ u("svg", {
16
+ viewBox: "0 0 16 16",
17
+ width: "14",
18
+ height: "14",
19
+ "aria-hidden": "true",
20
+ className: n.checkMark,
21
+ children: /* @__PURE__ */ u("path", {
22
+ d: "M3.5 8.5l3 3 6-7",
23
+ fill: "none",
24
+ stroke: "currentColor",
25
+ strokeWidth: "1.5",
26
+ strokeLinecap: "round",
27
+ strokeLinejoin: "round"
28
+ })
29
+ });
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", {
34
+ className: n.icon,
35
+ "aria-hidden": "true",
36
+ children: e.icon
37
+ }) : null,
38
+ /* @__PURE__ */ u("span", {
39
+ className: n.label,
40
+ children: e.label
41
+ }),
42
+ e.selected ? /* @__PURE__ */ u(h, {}) : null
43
+ ] });
44
+ return e.onSelect && !e.href ? /* @__PURE__ */ u("button", {
45
+ type: "button",
46
+ role: s,
47
+ "aria-current": e.active ? "page" : void 0,
48
+ "data-state": e.active ? "active" : void 0,
49
+ "data-selected": e.selected || void 0,
50
+ disabled: e.disabled,
51
+ className: c,
52
+ onClick: () => {
53
+ e.onSelect?.(), a?.();
54
+ },
55
+ children: f
56
+ }) : /* @__PURE__ */ u(i(), {
57
+ href: e.disabled ? void 0 : e.href,
58
+ role: s,
59
+ "aria-current": e.active ? "page" : void 0,
60
+ "aria-disabled": e.disabled || void 0,
61
+ tabIndex: e.disabled ? -1 : void 0,
62
+ "data-state": e.active ? "active" : void 0,
63
+ "data-selected": e.selected || void 0,
64
+ className: c,
65
+ onClick: (t) => {
66
+ if (e.disabled) {
67
+ t.preventDefault();
68
+ return;
69
+ }
70
+ e.onSelect?.(), a?.();
71
+ },
72
+ children: f
73
+ });
74
+ }
75
+ function _(e) {
76
+ if (typeof Intl < "u" && "Segmenter" in Intl) {
77
+ let t = new Intl.Segmenter(void 0, { granularity: "grapheme" });
78
+ for (let n of t.segment(e)) return n.segment;
79
+ }
80
+ return [...e][0] ?? "";
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", {
85
+ ref: r,
86
+ type: "button",
87
+ "aria-haspopup": "menu",
88
+ "aria-expanded": a.value,
89
+ "aria-label": e.label,
90
+ "data-state": a.value ? "open" : "closed",
91
+ style: { anchorName: o },
92
+ className: n.groupTrigger,
93
+ onClick: () => p(),
94
+ onKeyDown: (e) => {
95
+ if (e.key === "ArrowDown") {
96
+ e.preventDefault(), a.value || s();
97
+ let t = i.current;
98
+ t && setTimeout(() => {
99
+ t.querySelector(h)?.focus();
100
+ }, 0);
101
+ } else e.key === "Escape" && c();
102
+ },
103
+ children: e.icon ? /* @__PURE__ */ u("span", {
104
+ className: n.icon,
105
+ "aria-hidden": "true",
106
+ children: e.icon
107
+ }) : /* @__PURE__ */ u("span", {
108
+ className: n.fallbackIcon,
109
+ "data-fallback-icon": !0,
110
+ "aria-hidden": "true",
111
+ children: _(e.label)
112
+ })
113
+ }), /* @__PURE__ */ d("div", {
114
+ ref: i,
115
+ popover: "auto",
116
+ role: "menu",
117
+ "aria-label": e.label,
118
+ style: { positionAnchor: o },
119
+ className: n.railFlyout,
120
+ onKeyDown: (e) => {
121
+ let t = i.current;
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());
125
+ },
126
+ children: [/* @__PURE__ */ u("div", {
127
+ className: n.railFlyoutCaption,
128
+ "aria-hidden": "true",
129
+ children: e.label
130
+ }), e.items.map((e, t) => m(e) ? /* @__PURE__ */ u(f, { children: g(e, {
131
+ inMenu: !0,
132
+ onActivate: c,
133
+ extraClass: n.flyoutItem
134
+ }) }, t) : e.type === "separator" ? /* @__PURE__ */ u("div", {
135
+ role: "separator",
136
+ className: n.flyoutSeparator
137
+ }, t) : /* @__PURE__ */ u("div", {
138
+ className: n.railFlyoutCaption,
139
+ "aria-hidden": "true",
140
+ children: e.label
141
+ }, t))]
142
+ })] });
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) => {
149
+ let t = F.value;
150
+ F.value = t.includes(e) ? t.filter((t) => t !== e) : [...t, e];
151
+ }, L = () => {
152
+ let e = !N.value;
153
+ h === void 0 && (N.value = e), b?.(e);
154
+ }, R = N.value;
155
+ return /* @__PURE__ */ d("nav", {
156
+ "aria-label": k,
157
+ "data-state": R ? "collapsed" : "expanded",
158
+ "data-expand-on-hover": R && w ? "" : void 0,
159
+ className: r(n.sideNav, O),
160
+ children: [
161
+ E && /* @__PURE__ */ u("div", {
162
+ className: n.header,
163
+ children: E
164
+ }),
165
+ /* @__PURE__ */ u("ul", {
166
+ className: n.list,
167
+ children: P.map((t, r) => /* @__PURE__ */ d("li", {
168
+ className: n.group,
169
+ children: [t.label && /* @__PURE__ */ u("h3", {
170
+ className: n.groupLabel,
171
+ children: t.label
172
+ }), /* @__PURE__ */ u("ul", {
173
+ className: n.groupItems,
174
+ children: t.items.map((t, a) => {
175
+ let o = `${r}-${a}`;
176
+ if (t.items) {
177
+ if (R && !w) return /* @__PURE__ */ u("li", { children: /* @__PURE__ */ u(v, { item: t }) }, t.id ?? o);
178
+ let e = F.value.includes(t.label), r = `${M}-group-${o}`;
179
+ return /* @__PURE__ */ d("li", { children: [/* @__PURE__ */ d("button", {
180
+ type: "button",
181
+ "aria-expanded": e,
182
+ "aria-controls": r,
183
+ "aria-label": R ? t.label : void 0,
184
+ "data-state": e ? "open" : "closed",
185
+ className: n.groupTrigger,
186
+ onClick: () => I(t.label),
187
+ children: [
188
+ t.icon ? /* @__PURE__ */ u("span", {
189
+ className: n.icon,
190
+ "aria-hidden": "true",
191
+ children: t.icon
192
+ }) : R ? /* @__PURE__ */ u("span", {
193
+ className: n.fallbackIcon,
194
+ "data-fallback-icon": !0,
195
+ "aria-hidden": "true",
196
+ children: _(t.label)
197
+ }) : null,
198
+ /* @__PURE__ */ u("span", {
199
+ className: n.label,
200
+ "data-rail-hidden": R || void 0,
201
+ children: t.label
202
+ }),
203
+ /* @__PURE__ */ u("svg", {
204
+ viewBox: "0 0 16 16",
205
+ width: "12",
206
+ height: "12",
207
+ "aria-hidden": "true",
208
+ className: n.groupIndicator,
209
+ children: /* @__PURE__ */ u("path", {
210
+ d: "M4 6l4 4 4-4",
211
+ fill: "none",
212
+ stroke: "currentColor",
213
+ strokeWidth: "1.5",
214
+ strokeLinecap: "round",
215
+ strokeLinejoin: "round"
216
+ })
217
+ })
218
+ ]
219
+ }), /* @__PURE__ */ u("div", {
220
+ id: r,
221
+ "data-state": e ? "open" : "closed",
222
+ className: n.sublist,
223
+ children: /* @__PURE__ */ u("ul", {
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", {
226
+ role: "separator",
227
+ className: n.subSeparator
228
+ }, t) : /* @__PURE__ */ u("li", {
229
+ className: n.subGroupLabel,
230
+ children: e.label
231
+ }, t))
232
+ })
233
+ })] }, t.id ?? o);
234
+ }
235
+ let s = /* @__PURE__ */ d(l, { children: [
236
+ t.icon ? /* @__PURE__ */ u("span", {
237
+ className: n.icon,
238
+ "aria-hidden": "true",
239
+ children: t.icon
240
+ }) : R ? /* @__PURE__ */ u("span", {
241
+ className: n.fallbackIcon,
242
+ "data-fallback-icon": !0,
243
+ "aria-hidden": "true",
244
+ children: _(t.label)
245
+ }) : null,
246
+ /* @__PURE__ */ u("span", {
247
+ className: n.label,
248
+ "data-rail-hidden": R || void 0,
249
+ children: t.label
250
+ }),
251
+ t.trailing == null ? null : /* @__PURE__ */ u("span", {
252
+ className: n.trailing,
253
+ "data-rail-hidden": R || void 0,
254
+ children: t.trailing
255
+ })
256
+ ] }), c = t.tone && t.tone !== "default" ? t.tone : void 0, f = {
257
+ href: t.disabled ? void 0 : t.href,
258
+ "aria-current": t.active ? "page" : void 0,
259
+ "aria-label": R ? t.label : void 0,
260
+ "aria-disabled": t.disabled || void 0,
261
+ tabIndex: t.disabled ? -1 : void 0,
262
+ "data-state": t.active ? "active" : void 0,
263
+ "data-tone": c,
264
+ className: n.link,
265
+ onClick: (e) => {
266
+ if (t.disabled) {
267
+ e.preventDefault();
268
+ return;
269
+ }
270
+ t.onClick?.(e);
271
+ }
272
+ };
273
+ if (t.render) return /* @__PURE__ */ u("li", {
274
+ className: n.customItem,
275
+ children: t.render({
276
+ collapsed: R,
277
+ children: s,
278
+ linkProps: f
279
+ })
280
+ }, t.id ?? o);
281
+ let p = i(), h = t.onClick && !t.href ? /* @__PURE__ */ u("button", {
282
+ type: "button",
283
+ "aria-current": t.active ? "page" : void 0,
284
+ "aria-label": R ? t.label : void 0,
285
+ "data-state": t.active ? "active" : void 0,
286
+ "data-tone": c,
287
+ className: n.link,
288
+ disabled: t.disabled,
289
+ onClick: (e) => t.onClick?.(e),
290
+ children: s
291
+ }) : /* @__PURE__ */ u(p, {
292
+ ...f,
293
+ children: s
294
+ });
295
+ return /* @__PURE__ */ u("li", { children: R && !w ? /* @__PURE__ */ u(e, {
296
+ content: t.label,
297
+ placement: "right",
298
+ children: h
299
+ }) : h }, t.id ?? o);
300
+ })
301
+ })]
302
+ }, r))
303
+ }),
304
+ D && /* @__PURE__ */ u("div", {
305
+ className: n.footer,
306
+ children: D
307
+ }),
308
+ T && /* @__PURE__ */ u("button", {
309
+ type: "button",
310
+ "aria-label": R ? j : A,
311
+ className: n.collapseToggle,
312
+ onClick: L,
313
+ children: /* @__PURE__ */ u("svg", {
314
+ viewBox: "0 0 16 16",
315
+ width: "14",
316
+ height: "14",
317
+ "aria-hidden": "true",
318
+ className: n.collapseIcon,
319
+ children: /* @__PURE__ */ u("path", {
320
+ d: "M10 4l-4 4 4 4",
321
+ fill: "none",
322
+ stroke: "currentColor",
323
+ strokeWidth: "1.5",
324
+ strokeLinecap: "round",
325
+ strokeLinejoin: "round"
326
+ })
327
+ })
328
+ })
329
+ ]
330
+ });
331
+ }
332
+ //#endregion
333
+ export { y as SideNav };
@@ -0,0 +1,33 @@
1
+ "use client";
2
+
3
+ var e = {
4
+ sideNav: "_sideNav_1v53b_2",
5
+ label: "_label_1v53b_24",
6
+ trailing: "_trailing_1v53b_25",
7
+ groupIndicator: "_groupIndicator_1v53b_29",
8
+ link: "_link_1v53b_50",
9
+ groupTrigger: "_groupTrigger_1v53b_51",
10
+ fallbackIcon: "_fallbackIcon_1v53b_60",
11
+ list: "_list_1v53b_67",
12
+ sublistInner: "_sublistInner_1v53b_68",
13
+ groupItems: "_groupItems_1v53b_69",
14
+ group: "_group_1v53b_29",
15
+ groupLabel: "_groupLabel_1v53b_84",
16
+ checkMark: "_checkMark_1v53b_185",
17
+ icon: "_icon_1v53b_191",
18
+ sublist: "_sublist_1v53b_68",
19
+ sublink: "_sublink_1v53b_251",
20
+ subSeparator: "_subSeparator_1v53b_263",
21
+ subGroupLabel: "_subGroupLabel_1v53b_270",
22
+ header: "_header_1v53b_282",
23
+ footer: "_footer_1v53b_289",
24
+ customItem: "_customItem_1v53b_296",
25
+ collapseToggle: "_collapseToggle_1v53b_301",
26
+ collapseIcon: "_collapseIcon_1v53b_327",
27
+ railFlyout: "_railFlyout_1v53b_336",
28
+ railFlyoutCaption: "_railFlyoutCaption_1v53b_368",
29
+ flyoutItem: "_flyoutItem_1v53b_378",
30
+ flyoutSeparator: "_flyoutSeparator_1v53b_383"
31
+ };
32
+ //#endregion
33
+ export { e as default };
@@ -0,0 +1,25 @@
1
+ "use client";
2
+
3
+ import e from "./skeleton.module.js";
4
+ import { cn as t } from "@cascivo/core";
5
+ import { jsx as n } from "react/jsx-runtime";
6
+ //#region ../components/src/skeleton/skeleton.tsx
7
+ function r({ variant: r = "text", width: i, height: a, lines: o = 1, className: s, style: c, ...l }) {
8
+ let u = {
9
+ ...i !== void 0 && { "--cascivo-skeleton-width": i },
10
+ ...a !== void 0 && { "--cascivo-skeleton-height": a }
11
+ };
12
+ return /* @__PURE__ */ n("div", {
13
+ "aria-hidden": "true",
14
+ "data-variant": r,
15
+ className: t(e.skeleton, s),
16
+ style: {
17
+ ...u,
18
+ ...c
19
+ },
20
+ ...l,
21
+ children: r === "text" && Array.from({ length: o }, (t, r) => /* @__PURE__ */ n("span", { className: e.line }, r))
22
+ });
23
+ }
24
+ //#endregion
25
+ export { r as Skeleton };
@@ -0,0 +1,9 @@
1
+ "use client";
2
+
3
+ var e = {
4
+ skeleton: "_skeleton_14kv6_2",
5
+ line: "_line_14kv6_23",
6
+ "cascade-shimmer": "_cascade-shimmer_14kv6_1"
7
+ };
8
+ //#endregion
9
+ export { e as default };
@@ -0,0 +1,27 @@
1
+ "use client";
2
+
3
+ import e from "./skip-nav.module.js";
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";
7
+ //#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 }) {
10
+ n();
11
+ let d = c?.label ?? i(r.skipNav.label);
12
+ return /* @__PURE__ */ a("a", {
13
+ href: `#${s}`,
14
+ className: t(e.link, l),
15
+ ...u,
16
+ children: d
17
+ });
18
+ }
19
+ function c({ id: e = o, ...t }) {
20
+ return /* @__PURE__ */ a("div", {
21
+ id: e,
22
+ tabIndex: -1,
23
+ ...t
24
+ });
25
+ }
26
+ //#endregion
27
+ export { s as SkipNavLink, c as SkipNavTarget };
@@ -0,0 +1,5 @@
1
+ "use client";
2
+
3
+ var e = { link: "_link_19qpc_2" };
4
+ //#endregion
5
+ export { e as default };
@@ -0,0 +1,29 @@
1
+ "use client";
2
+
3
+ import e from "./slider.module.js";
4
+ import { cn as t } from "@cascivo/core";
5
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
6
+ //#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", {
10
+ className: t(e.wrapper, a),
11
+ "data-disabled": u || void 0,
12
+ children: [i && /* @__PURE__ */ n("label", {
13
+ className: e.label,
14
+ htmlFor: f,
15
+ children: i
16
+ }), /* @__PURE__ */ n("input", {
17
+ id: f,
18
+ type: "range",
19
+ min: s,
20
+ max: c,
21
+ step: l,
22
+ disabled: u,
23
+ className: e.slider,
24
+ ...d
25
+ })]
26
+ });
27
+ }
28
+ //#endregion
29
+ export { i as Slider };
@@ -0,0 +1,9 @@
1
+ "use client";
2
+
3
+ var e = {
4
+ wrapper: "_wrapper_vzj57_2",
5
+ label: "_label_vzj57_13",
6
+ slider: "_slider_vzj57_21"
7
+ };
8
+ //#endregion
9
+ export { e as default };
@@ -0,0 +1,18 @@
1
+ "use client";
2
+
3
+ import e from "./spinner.module.js";
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";
7
+ //#region ../components/src/spinner/spinner.tsx
8
+ function o({ size: o = "md", label: s, className: c, ...l }) {
9
+ return n(), /* @__PURE__ */ a("span", {
10
+ role: "status",
11
+ "aria-label": s ?? i(r.spinner.label),
12
+ "data-size": o,
13
+ className: t(e.spinner, c),
14
+ ...l
15
+ });
16
+ }
17
+ //#endregion
18
+ export { o as Spinner };
@@ -0,0 +1,8 @@
1
+ "use client";
2
+
3
+ var e = {
4
+ spinner: "_spinner_a8uzh_2",
5
+ "cascade-spin": "_cascade-spin_a8uzh_1"
6
+ };
7
+ //#endregion
8
+ export { e as default };
@@ -0,0 +1,19 @@
1
+ "use client";
2
+
3
+ import e from "./stack.module.js";
4
+ import { jsx as t } from "react/jsx-runtime";
5
+ //#region ../components/src/stack/stack.tsx
6
+ function n({ children: n, offset: r = 4, className: i }) {
7
+ let a = Array.isArray(n) ? n : [n];
8
+ return /* @__PURE__ */ t("div", {
9
+ className: [e.stack, i].filter(Boolean).join(" "),
10
+ style: { "--cascivo-stack-offset": `${r}px` },
11
+ children: a.map((n, r) => /* @__PURE__ */ t("div", {
12
+ className: e.layer,
13
+ style: { "--cascivo-stack-index": r },
14
+ children: n
15
+ }, r))
16
+ });
17
+ }
18
+ //#endregion
19
+ export { n as Stack };
@@ -0,0 +1,8 @@
1
+ "use client";
2
+
3
+ var e = {
4
+ stack: "_stack_2ay4v_2",
5
+ layer: "_layer_2ay4v_8"
6
+ };
7
+ //#endregion
8
+ export { e as default };
@@ -0,0 +1,41 @@
1
+ "use client";
2
+
3
+ import e from "./stat.module.js";
4
+ import { cn as t } from "@cascivo/core";
5
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
6
+ //#region ../components/src/stat/stat.tsx
7
+ function i({ label: i, value: a, delta: o, trend: s = "flat", helpText: c, visual: l, className: u, ...d }) {
8
+ return /* @__PURE__ */ r("div", {
9
+ className: t(e.stat, u),
10
+ ...d,
11
+ children: [
12
+ /* @__PURE__ */ n("span", {
13
+ className: e.label,
14
+ children: i
15
+ }),
16
+ /* @__PURE__ */ n("span", {
17
+ className: e.value,
18
+ children: a
19
+ }),
20
+ o && /* @__PURE__ */ r("span", {
21
+ "data-trend": s,
22
+ className: e.delta,
23
+ children: [/* @__PURE__ */ n("span", {
24
+ "aria-hidden": "true",
25
+ className: e.arrow,
26
+ children: s === "up" ? "▲" : s === "down" ? "▼" : "–"
27
+ }), o]
28
+ }),
29
+ c && /* @__PURE__ */ n("span", {
30
+ className: e.help,
31
+ children: c
32
+ }),
33
+ l && /* @__PURE__ */ n("span", {
34
+ className: e.visual,
35
+ children: l
36
+ })
37
+ ]
38
+ });
39
+ }
40
+ //#endregion
41
+ export { i as Stat };
@@ -0,0 +1,13 @@
1
+ "use client";
2
+
3
+ var e = {
4
+ stat: "_stat_r3v5x_2",
5
+ label: "_label_r3v5x_9",
6
+ value: "_value_r3v5x_15",
7
+ delta: "_delta_r3v5x_23",
8
+ arrow: "_arrow_r3v5x_44",
9
+ help: "_help_r3v5x_49",
10
+ visual: "_visual_r3v5x_55"
11
+ };
12
+ //#endregion
13
+ export { e as default };
@@ -0,0 +1,20 @@
1
+ "use client";
2
+
3
+ import e from "./status.module.js";
4
+ import { cn as t } from "@cascivo/core";
5
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
6
+ //#region ../components/src/status/status.tsx
7
+ function i({ status: i = "neutral", pulse: a = !1, className: o, children: s, ...c }) {
8
+ return /* @__PURE__ */ r("span", {
9
+ "data-status": i,
10
+ "data-pulse": a ? "" : void 0,
11
+ className: t(e.status, o),
12
+ ...c,
13
+ children: [/* @__PURE__ */ n("span", {
14
+ "aria-hidden": "true",
15
+ className: e.dot
16
+ }), s]
17
+ });
18
+ }
19
+ //#endregion
20
+ export { i as Status };
@@ -0,0 +1,9 @@
1
+ "use client";
2
+
3
+ var e = {
4
+ status: "_status_u4gep_2",
5
+ dot: "_dot_u4gep_11",
6
+ "cascade-status-pulse": "_cascade-status-pulse_u4gep_1"
7
+ };
8
+ //#endregion
9
+ export { e as default };
@@ -0,0 +1,35 @@
1
+ "use client";
2
+
3
+ import e from "./steps.module.js";
4
+ import { useSignal as t, useSignals as n } from "@cascivo/core";
5
+ import { builtin as r, t as i } from "@cascivo/i18n";
6
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
7
+ //#region ../components/src/steps/steps.tsx
8
+ function s({ steps: s, activeStep: c, orientation: l = "horizontal", className: u, ariaLabel: d }) {
9
+ n();
10
+ let f = t(c ?? 0);
11
+ f.value = c ?? f.value;
12
+ let p = d ?? i(r.steps.label);
13
+ return /* @__PURE__ */ a("ol", {
14
+ className: [e.steps, u].filter(Boolean).join(" "),
15
+ "data-orientation": l,
16
+ "aria-label": p,
17
+ children: s.map((t, n) => {
18
+ let r = t.state ?? (n < f.value ? "complete" : n === f.value ? "active" : "pending");
19
+ return /* @__PURE__ */ o("li", {
20
+ className: e.step,
21
+ "data-state": r,
22
+ "aria-current": r === "active" ? "step" : void 0,
23
+ children: [/* @__PURE__ */ a("div", {
24
+ className: e.circle,
25
+ children: r === "complete" ? "✓" : r === "error" ? "✕" : n + 1
26
+ }), /* @__PURE__ */ a("span", {
27
+ className: e.label,
28
+ children: t.label
29
+ })]
30
+ }, n);
31
+ })
32
+ });
33
+ }
34
+ //#endregion
35
+ export { s as Steps };
@@ -0,0 +1,10 @@
1
+ "use client";
2
+
3
+ var e = {
4
+ steps: "_steps_1u41q_2",
5
+ step: "_step_1u41q_2",
6
+ circle: "_circle_1u41q_42",
7
+ label: "_label_1u41q_82"
8
+ };
9
+ //#endregion
10
+ export { e as default };