@cascivo/react 0.11.1 → 0.12.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 (37) hide show
  1. package/README.md +1 -1
  2. package/dist/alert-dialog/alert-dialog.js +2 -4
  3. package/dist/card/card.css +1 -1
  4. package/dist/card/card.js +21 -11
  5. package/dist/card/card.module.js +8 -5
  6. package/dist/checkbox/checkbox.js +2 -2
  7. package/dist/command-menu/command-menu.js +67 -71
  8. package/dist/dropdown/dropdown.js +48 -50
  9. package/dist/header-panel/header-panel.js +2 -4
  10. package/dist/icon-button/icon-button.js +10 -10
  11. package/dist/index.d.ts +29 -14
  12. package/dist/modal/modal.js +4 -4
  13. package/dist/node/alert-dialog/alert-dialog.js +2 -4
  14. package/dist/node/card/card.js +21 -11
  15. package/dist/node/card/card.module.js +8 -5
  16. package/dist/node/checkbox/checkbox.js +2 -2
  17. package/dist/node/command-menu/command-menu.js +67 -71
  18. package/dist/node/dropdown/dropdown.js +48 -50
  19. package/dist/node/header-panel/header-panel.js +2 -4
  20. package/dist/node/icon-button/icon-button.js +10 -10
  21. package/dist/node/modal/modal.js +4 -4
  22. package/dist/node/popover/use-popover.js +9 -9
  23. package/dist/node/react/src/index.js +63 -63
  24. package/dist/node/search/search.js +19 -22
  25. package/dist/node/sheet/sheet.js +2 -4
  26. package/dist/node/visually-hidden/visually-hidden.js +2 -13
  27. package/dist/popover/use-popover.js +9 -9
  28. package/dist/react/src/index.js +63 -63
  29. package/dist/search/search.js +19 -22
  30. package/dist/sheet/sheet.js +2 -4
  31. package/dist/styles.css +1 -3
  32. package/dist/visually-hidden/visually-hidden.js +2 -13
  33. package/package.json +4 -4
  34. package/readme.body.md +1 -1
  35. package/dist/node/visually-hidden/visually-hidden.module.js +0 -5
  36. package/dist/visually-hidden/visually-hidden.css +0 -1
  37. package/dist/visually-hidden/visually-hidden.module.js +0 -6
@@ -1,102 +1,100 @@
1
1
  "use client";
2
2
 
3
3
  import e from "./dropdown.module.js";
4
- import { composeRefs as t, createMachine as n, useMachine as r, useSignal as i, useSignalEffect as a, useSignals as o } from "@cascivo/core";
5
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
6
- import { cloneElement as l, useRef as u } from "react";
4
+ import { composeRefs as t, createMachine as n, useEffectPropSignal as r, useMachine as i, useSignal as a, useSignalEffect as o, useSignals as s } from "@cascivo/core";
5
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
6
+ import { cloneElement as u, useRef as d } from "react";
7
7
  //#region ../components/src/dropdown/dropdown.tsx
8
- var d = n({
8
+ var f = n({
9
9
  initial: "closed",
10
10
  states: {
11
11
  closed: { on: { OPEN: "open" } },
12
12
  open: { on: { CLOSE: "closed" } }
13
13
  }
14
14
  });
15
- function f({ trigger: n, items: f, onSelect: p, placement: m = "bottom-start", open: h, onOpenChange: g }) {
16
- o();
17
- let [_, v] = r(d), y = u(null), b = u(null), x = u(null), S = u([]), C = i(-1), w = h !== void 0, T = w ? h : _.value === "open", E = i(T);
18
- E.value = T;
19
- let D = f.map((e, t) => ({
15
+ function p({ trigger: n, items: p, onSelect: m, placement: h = "bottom-start", open: g, onOpenChange: _ }) {
16
+ s();
17
+ let [v, y] = i(f), b = d(null), x = d(null), S = d(null), C = d([]), w = a(-1), T = g !== void 0, E = T ? g : v.value === "open", D = r(E), O = p.map((e, t) => ({
20
18
  item: e,
21
19
  index: t
22
- })).filter(({ item: e }) => !e.separator && !e.disabled).map(({ index: e }) => e), O = (e) => {
23
- w || v(e ? "OPEN" : "CLOSE"), g?.(e);
20
+ })).filter(({ item: e }) => !e.separator && !e.disabled).map(({ index: e }) => e), k = (e) => {
21
+ T || y(e ? "OPEN" : "CLOSE"), _?.(e);
24
22
  };
25
- a(() => {
26
- let e = C.value;
27
- E.value && e >= 0 && S.current[e]?.focus();
28
- }), a(() => {
29
- E.value ? C.value = D[0] ?? -1 : C.value = -1;
30
- }), a(() => {
31
- E.value ? x.current?.showPopover() : x.current?.hidePopover();
32
- }), a(() => {
33
- let e = x.current;
23
+ o(() => {
24
+ let e = w.value;
25
+ D.value && e >= 0 && C.current[e]?.focus();
26
+ }), o(() => {
27
+ D.value ? w.value = O[0] ?? -1 : w.value = -1;
28
+ }), o(() => {
29
+ D.value ? S.current?.showPopover() : S.current?.hidePopover();
30
+ }), o(() => {
31
+ let e = S.current;
34
32
  if (!e) return;
35
33
  let t = (e) => {
36
- e.newState === "closed" && O(!1);
34
+ e.newState === "closed" && k(!1);
37
35
  };
38
36
  return e.addEventListener("toggle", t), () => e.removeEventListener("toggle", t);
39
37
  });
40
- let k = (e) => {
41
- let t = f[e];
42
- !t || t.separator || t.disabled || (p?.(t.value), O(!1), b.current?.focus());
43
- }, A = (e) => {
44
- D.length !== 0 && (C.value = D[(D.indexOf(C.value) + e + D.length) % D.length] ?? -1);
38
+ let A = (e) => {
39
+ let t = p[e];
40
+ !t || t.separator || t.disabled || (m?.(t.value), k(!1), x.current?.focus());
45
41
  }, j = (e) => {
42
+ O.length !== 0 && (w.value = O[(O.indexOf(w.value) + e + O.length) % O.length] ?? -1);
43
+ }, M = (e) => {
46
44
  switch (e.key) {
47
45
  case "ArrowDown":
48
- e.preventDefault(), A(1);
46
+ e.preventDefault(), j(1);
49
47
  break;
50
48
  case "ArrowUp":
51
- e.preventDefault(), A(-1);
49
+ e.preventDefault(), j(-1);
52
50
  break;
53
51
  case "Home":
54
- e.preventDefault(), C.value = D[0] ?? -1;
52
+ e.preventDefault(), w.value = O[0] ?? -1;
55
53
  break;
56
54
  case "End":
57
- e.preventDefault(), C.value = D[D.length - 1] ?? -1;
55
+ e.preventDefault(), w.value = O[O.length - 1] ?? -1;
58
56
  break;
59
57
  case "Escape":
60
- e.preventDefault(), O(!1), b.current?.focus();
58
+ e.preventDefault(), k(!1), x.current?.focus();
61
59
  break;
62
60
  case "Enter":
63
61
  case " ":
64
- e.preventDefault(), k(C.value);
62
+ e.preventDefault(), A(w.value);
65
63
  break;
66
64
  }
67
- }, M = n, N = l(M, {
68
- ref: t(b, M.props.ref),
65
+ }, N = n, P = u(N, {
66
+ ref: t(x, N.props.ref),
69
67
  onClick: (e) => {
70
- M.props.onClick?.(e), O(!T);
68
+ N.props.onClick?.(e), k(!E);
71
69
  },
72
70
  "aria-haspopup": "menu",
73
- "aria-expanded": T
71
+ "aria-expanded": E
74
72
  });
75
- return /* @__PURE__ */ c("div", {
76
- ref: y,
73
+ return /* @__PURE__ */ l("div", {
74
+ ref: b,
77
75
  className: e.root,
78
- children: [N, /* @__PURE__ */ s("div", {
79
- ref: x,
76
+ children: [P, /* @__PURE__ */ c("div", {
77
+ ref: S,
80
78
  popover: "auto",
81
79
  role: "menu",
82
- "data-placement": m,
83
- "data-state": T ? "open" : "closed",
80
+ "data-placement": h,
81
+ "data-state": E ? "open" : "closed",
84
82
  className: e.menu,
85
- onKeyDown: j,
86
- children: f.map((t, n) => t.separator ? /* @__PURE__ */ s("div", {
83
+ onKeyDown: M,
84
+ children: p.map((t, n) => t.separator ? /* @__PURE__ */ c("div", {
87
85
  role: "separator",
88
86
  className: e.separator
89
- }, `sep-${n}`) : /* @__PURE__ */ c("button", {
87
+ }, `sep-${n}`) : /* @__PURE__ */ l("button", {
90
88
  type: "button",
91
89
  role: "menuitem",
92
90
  ref: (e) => {
93
- S.current[n] = e;
91
+ C.current[n] = e;
94
92
  },
95
- tabIndex: C.value === n ? 0 : -1,
93
+ tabIndex: w.value === n ? 0 : -1,
96
94
  disabled: t.disabled,
97
95
  className: e.item,
98
- onClick: () => k(n),
99
- children: [t.icon && /* @__PURE__ */ s("span", {
96
+ onClick: () => A(n),
97
+ children: [t.icon && /* @__PURE__ */ c("span", {
100
98
  className: e.icon,
101
99
  "aria-hidden": "true",
102
100
  children: t.icon
@@ -106,4 +104,4 @@ function f({ trigger: n, items: f, onSelect: p, placement: m = "bottom-start", o
106
104
  });
107
105
  }
108
106
  //#endregion
109
- export { f as Dropdown };
107
+ export { p as Dropdown };
@@ -1,16 +1,14 @@
1
1
  "use client";
2
2
 
3
3
  import e from "./header-panel.module.js";
4
- import { cn as t, useSignal as n, useSignalEffect as r, useSignals as i } from "@cascivo/core";
4
+ import { cn as t, useEffectPropSignal as n, useSignalEffect as r, useSignals as i } from "@cascivo/core";
5
5
  import { builtin as a, t as o } from "@cascivo/i18n";
6
6
  import { jsx as s, jsxs as c } from "react/jsx-runtime";
7
7
  import { useRef as l } from "react";
8
8
  //#region ../components/src/header-panel/header-panel.tsx
9
9
  function u({ open: u, onClose: d, label: f, children: p, labels: m, className: h }) {
10
10
  i();
11
- let g = l(null), _ = l(null), v = n(u);
12
- v.value = u;
13
- let y = l(d);
11
+ let g = l(null), _ = l(null), v = n(u), y = l(d);
14
12
  return y.current = d, r(() => {
15
13
  let e = g.current;
16
14
  if (e) if (v.value) {
@@ -5,16 +5,16 @@ import { Slot as t, cn as n } from "@cascivo/core";
5
5
  import { jsx as r } from "react/jsx-runtime";
6
6
  import { forwardRef as i } from "react";
7
7
  //#region ../components/src/icon-button/icon-button.tsx
8
- var a = i(function({ label: i, icon: a, size: o = "md", variant: s = "ghost", asChild: c = !1, className: l, children: u, ...d }, f) {
9
- return /* @__PURE__ */ r(c ? t : "button", {
10
- type: c ? void 0 : "button",
11
- "aria-label": i,
12
- "data-size": o,
13
- "data-variant": s,
14
- className: n(e.iconButton, l),
15
- ref: f,
16
- ...d,
17
- children: u ?? a
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", {
10
+ type: l ? void 0 : "button",
11
+ "aria-label": i ?? a,
12
+ "data-size": s,
13
+ "data-variant": c,
14
+ className: n(e.iconButton, u),
15
+ ref: p,
16
+ ...f,
17
+ children: d ?? o
18
18
  });
19
19
  });
20
20
  //#endregion
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
 
3
3
  import e from "./modal.module.js";
4
- import { cn as t, useDraggable as n, useId as r, useSignal as i, useSignalEffect as a, useSignals as o } from "@cascivo/core";
4
+ import { cn as t, useDraggable as n, useEffectPropSignal as r, useId as i, useSignalEffect as a, useSignals as o } from "@cascivo/core";
5
5
  import { builtin as s, t as c } from "@cascivo/i18n";
6
6
  import { jsx as l, jsxs as u } from "react/jsx-runtime";
7
7
  import { useRef as d } from "react";
@@ -10,11 +10,11 @@ function f({ open: f = !1, onClose: p, title: m, description: h, children: g, cl
10
10
  o();
11
11
  let b = d(null), x = d(p);
12
12
  x.current = p;
13
- let S = r("cascivo-modal-title"), C = r("cascivo-modal-desc"), { handleRef: w, offset: T } = n({ isDisabled: !y }), E = y ? {
13
+ let S = i("cascivo-modal-title"), C = i("cascivo-modal-desc"), { handleRef: w, offset: T } = n({ isDisabled: !y }), E = y ? {
14
14
  "--modal-x": `${T.value.x}px`,
15
15
  "--modal-y": `${T.value.y}px`
16
- } : void 0, D = i(f);
17
- return D.value = f, a(() => {
16
+ } : void 0, D = r(f);
17
+ return a(() => {
18
18
  let e = b.current;
19
19
  e && (D.value ? e.open || e.showModal() : e.open && e.close());
20
20
  }), a(() => {
@@ -1,18 +1,18 @@
1
1
  "use client";
2
2
 
3
- import { useSignal as e, useSignalEffect as t } from "@cascivo/core";
4
- import { useRef as n } from "react";
3
+ import { useId as e, useSignal as t, useSignalEffect as n } from "@cascivo/core";
4
+ import { useRef as r } from "react";
5
5
  //#region ../components/src/popover/use-popover.ts
6
- var r = 0, i = typeof CSS < "u" && typeof CSS.supports == "function" && CSS.supports("anchor-name: --cascivo-a");
6
+ var i = typeof CSS < "u" && typeof CSS.supports == "function" && CSS.supports("anchor-name: --cascivo-a");
7
7
  function a(a = {}) {
8
- let o = n(`--cascivo-popover-${++r}`).current, s = n(null), c = n(null), l = e(a.open ?? !1);
8
+ let o = `--${e("cascivo-popover")}`, s = r(null), c = r(null), l = t(a.open ?? !1);
9
9
  a.open !== void 0 && (l.value = a.open);
10
- let u = n(a.onOpenChange);
10
+ let u = r(a.onOpenChange);
11
11
  u.current = a.onOpenChange;
12
- let d = n(a.placement);
12
+ let d = r(a.placement);
13
13
  d.current = a.placement;
14
- let f = n(a.offset);
15
- return f.current = a.offset, t(() => {
14
+ let f = r(a.offset);
15
+ return f.current = a.offset, n(() => {
16
16
  let e = l.value;
17
17
  u.current?.(e);
18
18
  let t = c.current;
@@ -30,7 +30,7 @@ function a(a = {}) {
30
30
  r === "bottom" ? (t.style.top = `${n.bottom + i + window.scrollY}px`, t.style.left = `${n.left + window.scrollX}px`) : r === "top" ? (t.style.top = `${n.top - i + window.scrollY}px`, t.style.left = `${n.left + window.scrollX}px`, t.style.transform = "translateY(-100%)") : r === "left" ? (t.style.top = `${n.top + window.scrollY}px`, t.style.left = `${n.left - i + window.scrollX}px`, t.style.transform = "translateX(-100%)") : r === "right" && (t.style.top = `${n.top + window.scrollY}px`, t.style.left = `${n.right + i + window.scrollX}px`);
31
31
  }
32
32
  }
33
- }), t(() => {
33
+ }), n(() => {
34
34
  let e = c.current;
35
35
  if (!e) return;
36
36
  let t = (e) => {
@@ -73,66 +73,66 @@ import { CheckboxCard as He } from "../../checkbox-card/checkbox-card.js";
73
73
  import { CopyButton as Ue } from "../../copy-button/copy-button.js";
74
74
  import { Stat as We } from "../../stat/stat.js";
75
75
  import { Status as Ge } from "../../status/status.js";
76
- import { VisuallyHidden as Ke } from "../../visually-hidden/visually-hidden.js";
77
- import { SkipNavLink as qe, SkipNavTarget as Je } from "../../skip-nav/skip-nav.js";
78
- import { Progress as Ye } from "../../progress/progress.js";
79
- import { ProgressCircle as Xe } from "../../progress-circle/progress-circle.js";
80
- import { Heading as Ze } from "../../heading/heading.js";
81
- import { Text as Qe } from "../../text/text.js";
82
- import { Code as $e } from "../../code/code.js";
83
- import { Blockquote as et } from "../../blockquote/blockquote.js";
84
- import { List as tt, ListItem as nt } from "../../list/list.js";
85
- import { LogViewer as rt } from "../../log-viewer/log-viewer.js";
86
- import { Prose as it } from "../../prose/prose.js";
87
- import { PullToRefresh as at } from "../../pull-to-refresh/pull-to-refresh.js";
88
- import { QrCode as ot } from "../../qr-code/qr-code.js";
89
- import { RelativeTime as st } from "../../relative-time/relative-time.js";
90
- import { Label as ct } from "../../label/label.js";
91
- import { Field as lt } from "../../field/field.js";
92
- import { Filter as ut } from "../../filter/filter.js";
93
- import { IconButton as dt } from "../../icon-button/icon-button.js";
94
- import { ButtonGroup as ft } from "../../button-group/button-group.js";
95
- import { ToggleGroup as pt } from "../../toggle-group/toggle-group.js";
96
- import { InlineLoading as mt } from "../../inline-loading/inline-loading.js";
97
- import { Notification as ht } from "../../notification/notification.js";
98
- import { ScrollArea as gt } from "../../scroll-area/scroll-area.js";
99
- import { Collapsible as _t } from "../../collapsible/collapsible.js";
100
- import { AspectRatio as vt } from "../../aspect-ratio/aspect-ratio.js";
101
- import { MenuButton as yt } from "../../menu-button/menu-button.js";
102
- import { Toggletip as bt } from "../../toggletip/toggletip.js";
103
- import { Menubar as xt } from "../../menubar/menubar.js";
104
- import { NavigationMenu as St } from "../../navigation-menu/navigation-menu.js";
105
- import { TreeView as Ct, treeViewMessages as wt } from "../../tree-view/tree-view.js";
106
- import { StructuredList as Tt } from "../../structured-list/structured-list.js";
107
- import { ContainedList as Et, ContainedListItem as Dt } from "../../contained-list/contained-list.js";
108
- import { DataList as Ot } from "../../data-list/data-list.js";
109
- import { Timeline as kt } from "../../timeline/timeline.js";
110
- import { Item as At, ItemActions as jt, ItemContent as Mt, ItemDescription as Nt, ItemMedia as Pt, ItemTitle as Ft } from "../../item/item.js";
111
- import { Calendar as It } from "../../calendar/calendar.js";
112
- import { DateRangePicker as Lt } from "../../date-range-picker/date-range-picker.js";
113
- import { ColorPicker as Rt } from "../../color-picker/color-picker.js";
114
- import { Carousel as zt } from "../../carousel/carousel.js";
115
- import { Resizable as Bt } from "../../resizable/resizable.js";
116
- import { Dock as Vt } from "../../dock/dock.js";
117
- import { Drawer as Ht } from "../../drawer/drawer.js";
118
- import { NativeSelect as Ut } from "../../native-select/native-select.js";
119
- import { CodeSnippet as Wt } from "../../code-snippet/code-snippet.js";
120
- import { Steps as Gt } from "../../steps/steps.js";
121
- import { Tile as Kt } from "../../tile/tile.js";
122
- import { Indicator as qt } from "../../indicator/indicator.js";
123
- import { Join as Jt } from "../../join/join.js";
124
- import { Stack as Yt } from "../../stack/stack.js";
125
- import { AppShell as Xt } from "../../app-shell/app-shell.js";
126
- import { ChatBubble as Zt } from "../../chat-bubble/chat-bubble.js";
127
- import { RadialProgress as Qt } from "../../radial-progress/radial-progress.js";
128
- import { Swap as $t } from "../../swap/swap.js";
129
- import { SwipeItem as en } from "../../swipe-item/swipe-item.js";
130
- import { Grid as tn, GridItem as nn } from "../../layouts/src/grid/grid.js";
131
- import { Flex as rn } from "../../layouts/src/flex/flex.js";
132
- import { Columns as an } from "../../layouts/src/columns/columns.js";
133
- import { Center as on } from "../../layouts/src/center/center.js";
134
- import { Spacer as sn } from "../../layouts/src/spacer/spacer.js";
135
- import { AutoGrid as cn } from "../../layouts/src/auto-grid/auto-grid.js";
136
- import { ThemeProvider as ln, setTheme as un, themePreloadScript as dn, themeSignal as fn, useTheme as pn } from "./theme.js";
137
- import { ErrorBoundary as mn, FocusScope as hn, Portal as gn, SuspenseBoundary as _n, getLinkComponent as vn, setLinkComponent as yn } from "@cascivo/core";
138
- export { M as Accordion, N as AccordionContent, P as AccordionItem, F as AccordionTrigger, I as ActionSheet, d as Alert, ye as AlertDialog, Xt as AppShell, vt as AspectRatio, cn as AutoGrid, f as Avatar, p as AvatarGroup, c as Badge, et as Blockquote, xe as BottomSheet, z as Breadcrumb, t as Button, ft as ButtonGroup, It as Calendar, r as Card, i as CardContent, a as CardFooter, o as CardHeader, s as CardTitle, zt as Carousel, on as Center, Zt as ChatBubble, v as Checkbox, He as CheckboxCard, $e as Code, Wt as CodeSnippet, _t as Collapsible, Rt as ColorPicker, an as Columns, ce as Combobox, ne as CommandMenu, we as Comparison, Et as ContainedList, Dt as ContainedListItem, Se as ContextMenu, Ce as ContextMenuItem, Ue as CopyButton, Ot as DataList, te as DataTable, le as DatePicker, Lt as DateRangePicker, Vt as Dock, Ht as Drawer, w as Dropdown, Ie as Editable, X as EmptyState, mn as ErrorBoundary, Z as Fab, lt as Field, ue as FileUploader, ut as Filter, rn as Flex, hn as FocusScope, ae as Form, tn as Grid, nn as GridItem, H as Header, Be as HeaderPanel, Ze as Heading, Te as HoverCard, Ee as HoverCardContent, De as HoverCardTrigger, dt as IconButton, h as Image, qt as Indicator, mt as InlineLoading, n as Input, Ne as InputGroup, Pe as InputGroupAddon, At as Item, jt as ItemActions, Mt as ItemContent, Nt as ItemDescription, Pt as ItemMedia, Ft as ItemTitle, Jt as Join, L as Kbd, ct as Label, R as Link, tt as List, nt as ListItem, rt as LogViewer, he as Menu, yt as MenuButton, ge as MenuItem, _e as MenuSeparator, ve as MenuTrigger, xt as Menubar, l as Modal, ke as MultiSelect, Ut as NativeSelect, St as NavigationMenu, ht as Notification, ee as NumberInput, je as OtpInput, Q as OverflowMenu, G as Pagination, Oe as PasswordInput, fe as Popover, pe as PopoverContent, me as PopoverTrigger, gn as Portal, Ye as Progress, Y as ProgressBar, Xe as ProgressCircle, K as ProgressIndicator, it as Prose, at as PullToRefresh, ot as QrCode, Qt as RadialProgress, y as Radio, Le as RadioCard, Re as RadioCardGroup, b as RadioGroup, Fe as RatingGroup, st as RelativeTime, Bt as Resizable, gt as ScrollArea, $ as Search, Me as SegmentedControl, _ as Select, u as Separator, be as Sheet, ze as ShellHeader, W as SideNav, J as Skeleton, qe as SkipNavLink, Je as SkipNavTarget, S as Slider, sn as Spacer, e as Spinner, Yt as Stack, We as Stat, Ge as Status, Gt as Steps, Tt as StructuredList, _n as SuspenseBoundary, $t as Swap, en as SwipeItem, Ve as Switcher, O as Tabs, k as TabsContent, A as TabsList, j as TabsTrigger, q as Tag, Ae as TagsInput, Qe as Text, g as Textarea, ln as ThemeProvider, Kt as Tile, de as TimePicker, kt as Timeline, T as ToastProvider, B as Toc, x as Toggle, pt as ToggleGroup, bt as Toggletip, C as Tooltip, Ct as TreeView, m as User, Ke as VisuallyHidden, oe as createForm, E as dismissAllToasts, re as fuzzyMatch, ie as fuzzyScore, vn as getLinkComponent, yn as setLinkComponent, un as setTheme, dn as themePreloadScript, fn as themeSignal, wt as treeViewMessages, se as useForm, U as usePopover, pn as useTheme, D as useToast, V as useTocFromRegion };
76
+ import "../../visually-hidden/visually-hidden.js";
77
+ import { SkipNavLink as Ke, SkipNavTarget as qe } from "../../skip-nav/skip-nav.js";
78
+ import { Progress as Je } from "../../progress/progress.js";
79
+ import { ProgressCircle as Ye } from "../../progress-circle/progress-circle.js";
80
+ import { Heading as Xe } from "../../heading/heading.js";
81
+ import { Text as Ze } from "../../text/text.js";
82
+ import { Code as Qe } from "../../code/code.js";
83
+ import { Blockquote as $e } from "../../blockquote/blockquote.js";
84
+ import { List as et, ListItem as tt } from "../../list/list.js";
85
+ import { LogViewer as nt } from "../../log-viewer/log-viewer.js";
86
+ import { Prose as rt } from "../../prose/prose.js";
87
+ import { PullToRefresh as it } from "../../pull-to-refresh/pull-to-refresh.js";
88
+ import { QrCode as at } from "../../qr-code/qr-code.js";
89
+ import { RelativeTime as ot } from "../../relative-time/relative-time.js";
90
+ import { Label as st } from "../../label/label.js";
91
+ import { Field as ct } from "../../field/field.js";
92
+ import { Filter as lt } from "../../filter/filter.js";
93
+ import { IconButton as ut } from "../../icon-button/icon-button.js";
94
+ import { ButtonGroup as dt } from "../../button-group/button-group.js";
95
+ import { ToggleGroup as ft } from "../../toggle-group/toggle-group.js";
96
+ import { InlineLoading as pt } from "../../inline-loading/inline-loading.js";
97
+ import { Notification as mt } from "../../notification/notification.js";
98
+ import { ScrollArea as ht } from "../../scroll-area/scroll-area.js";
99
+ import { Collapsible as gt } from "../../collapsible/collapsible.js";
100
+ import { AspectRatio as _t } from "../../aspect-ratio/aspect-ratio.js";
101
+ import { MenuButton as vt } from "../../menu-button/menu-button.js";
102
+ import { Toggletip as yt } from "../../toggletip/toggletip.js";
103
+ import { Menubar as bt } from "../../menubar/menubar.js";
104
+ import { NavigationMenu as xt } from "../../navigation-menu/navigation-menu.js";
105
+ import { TreeView as St, treeViewMessages as Ct } from "../../tree-view/tree-view.js";
106
+ import { StructuredList as wt } from "../../structured-list/structured-list.js";
107
+ import { ContainedList as Tt, ContainedListItem as Et } from "../../contained-list/contained-list.js";
108
+ import { DataList as Dt } from "../../data-list/data-list.js";
109
+ import { Timeline as Ot } from "../../timeline/timeline.js";
110
+ import { Item as kt, ItemActions as At, ItemContent as jt, ItemDescription as Mt, ItemMedia as Nt, ItemTitle as Pt } from "../../item/item.js";
111
+ import { Calendar as Ft } from "../../calendar/calendar.js";
112
+ import { DateRangePicker as It } from "../../date-range-picker/date-range-picker.js";
113
+ import { ColorPicker as Lt } from "../../color-picker/color-picker.js";
114
+ import { Carousel as Rt } from "../../carousel/carousel.js";
115
+ import { Resizable as zt } from "../../resizable/resizable.js";
116
+ import { Dock as Bt } from "../../dock/dock.js";
117
+ import { Drawer as Vt } from "../../drawer/drawer.js";
118
+ import { NativeSelect as Ht } from "../../native-select/native-select.js";
119
+ import { CodeSnippet as Ut } from "../../code-snippet/code-snippet.js";
120
+ import { Steps as Wt } from "../../steps/steps.js";
121
+ import { Tile as Gt } from "../../tile/tile.js";
122
+ import { Indicator as Kt } from "../../indicator/indicator.js";
123
+ import { Join as qt } from "../../join/join.js";
124
+ import { Stack as Jt } from "../../stack/stack.js";
125
+ import { AppShell as Yt } from "../../app-shell/app-shell.js";
126
+ import { ChatBubble as Xt } from "../../chat-bubble/chat-bubble.js";
127
+ import { RadialProgress as Zt } from "../../radial-progress/radial-progress.js";
128
+ import { Swap as Qt } from "../../swap/swap.js";
129
+ import { SwipeItem as $t } from "../../swipe-item/swipe-item.js";
130
+ import { Grid as en, GridItem as tn } from "../../layouts/src/grid/grid.js";
131
+ import { Flex as nn } from "../../layouts/src/flex/flex.js";
132
+ import { Columns as rn } from "../../layouts/src/columns/columns.js";
133
+ import { Center as an } from "../../layouts/src/center/center.js";
134
+ import { Spacer as on } from "../../layouts/src/spacer/spacer.js";
135
+ import { AutoGrid as sn } from "../../layouts/src/auto-grid/auto-grid.js";
136
+ import { ThemeProvider as cn, setTheme as ln, themePreloadScript as un, themeSignal as dn, useTheme as fn } from "./theme.js";
137
+ import { DismissableLayer as pn, ErrorBoundary as mn, FocusScope as hn, Portal as gn, Presence as _n, Slot as vn, SuspenseBoundary as yn, VisuallyHidden as bn, batch as xn, cn as Sn, composeRefs as Cn, computePosition as wn, computed as Tn, createMachine as En, createScope as Dn, createStreamBuffer as On, effect as kn, getLinkComponent as An, mergeProps as jn, setLinkComponent as Mn, signal as Nn, useAnchorPosition as Pn, useClipboard as Fn, useComputed as In, useControllableSignal as Ln, useDisclosure as Rn, useEffectPropSignal as zn, useId as Bn, useMachine as Vn, useMediaQuery as Hn, useRovingFocus as Un, useScope as Wn, useScrollLock as Gn, useSignal as Kn, useSignalEffect as qn, useSignals as Jn, useStreamBuffer as Yn, useTypeahead as Xn } from "@cascivo/core";
138
+ export { M as Accordion, N as AccordionContent, P as AccordionItem, F as AccordionTrigger, I as ActionSheet, d as Alert, ye as AlertDialog, Yt as AppShell, _t as AspectRatio, sn as AutoGrid, f as Avatar, p as AvatarGroup, c as Badge, $e as Blockquote, xe as BottomSheet, z as Breadcrumb, t as Button, dt as ButtonGroup, Ft as Calendar, r as Card, i as CardContent, a as CardFooter, o as CardHeader, s as CardTitle, Rt as Carousel, an as Center, Xt as ChatBubble, v as Checkbox, He as CheckboxCard, Qe as Code, Ut as CodeSnippet, gt as Collapsible, Lt as ColorPicker, rn as Columns, ce as Combobox, ne as CommandMenu, we as Comparison, Tt as ContainedList, Et as ContainedListItem, Se as ContextMenu, Ce as ContextMenuItem, Ue as CopyButton, Dt as DataList, te as DataTable, le as DatePicker, It as DateRangePicker, pn as DismissableLayer, Bt as Dock, Vt as Drawer, w as Dropdown, Ie as Editable, X as EmptyState, mn as ErrorBoundary, Z as Fab, ct as Field, ue as FileUploader, lt as Filter, nn as Flex, hn as FocusScope, ae as Form, en as Grid, tn as GridItem, H as Header, Be as HeaderPanel, Xe as Heading, Te as HoverCard, Ee as HoverCardContent, De as HoverCardTrigger, ut as IconButton, h as Image, Kt as Indicator, pt as InlineLoading, n as Input, Ne as InputGroup, Pe as InputGroupAddon, kt as Item, At as ItemActions, jt as ItemContent, Mt as ItemDescription, Nt as ItemMedia, Pt as ItemTitle, qt as Join, L as Kbd, st as Label, R as Link, et as List, tt as ListItem, nt as LogViewer, he as Menu, vt as MenuButton, ge as MenuItem, _e as MenuSeparator, ve as MenuTrigger, bt as Menubar, l as Modal, ke as MultiSelect, Ht as NativeSelect, xt as NavigationMenu, mt as Notification, ee as NumberInput, je as OtpInput, Q as OverflowMenu, G as Pagination, Oe as PasswordInput, fe as Popover, pe as PopoverContent, me as PopoverTrigger, gn as Portal, _n as Presence, Je as Progress, Y as ProgressBar, Ye as ProgressCircle, K as ProgressIndicator, rt as Prose, it as PullToRefresh, at as QrCode, Zt as RadialProgress, y as Radio, Le as RadioCard, Re as RadioCardGroup, b as RadioGroup, Fe as RatingGroup, ot as RelativeTime, zt as Resizable, ht as ScrollArea, $ as Search, Me as SegmentedControl, _ as Select, u as Separator, be as Sheet, ze as ShellHeader, W as SideNav, J as Skeleton, Ke as SkipNavLink, qe as SkipNavTarget, S as Slider, vn as Slot, on as Spacer, e as Spinner, Jt as Stack, We as Stat, Ge as Status, Wt as Steps, wt as StructuredList, yn as SuspenseBoundary, Qt as Swap, $t as SwipeItem, Ve as Switcher, O as Tabs, k as TabsContent, A as TabsList, j as TabsTrigger, q as Tag, Ae as TagsInput, Ze as Text, g as Textarea, cn as ThemeProvider, Gt as Tile, de as TimePicker, Ot as Timeline, T as ToastProvider, B as Toc, x as Toggle, ft as ToggleGroup, yt as Toggletip, C as Tooltip, St as TreeView, m as User, bn as VisuallyHidden, xn as batch, Sn as cn, Cn as composeRefs, wn as computePosition, Tn as computed, oe as createForm, En as createMachine, Dn as createScope, On as createStreamBuffer, E as dismissAllToasts, kn as effect, re as fuzzyMatch, ie as fuzzyScore, An as getLinkComponent, jn as mergeProps, Mn as setLinkComponent, ln as setTheme, Nn as signal, un as themePreloadScript, dn as themeSignal, Ct as treeViewMessages, Pn as useAnchorPosition, Fn as useClipboard, In as useComputed, Ln as useControllableSignal, Rn as useDisclosure, zn as useEffectPropSignal, se as useForm, Bn as useId, Vn as useMachine, Hn as useMediaQuery, U as usePopover, Un as useRovingFocus, Wn as useScope, Gn as useScrollLock, Kn as useSignal, qn as useSignalEffect, Jn as useSignals, Yn as useStreamBuffer, fn as useTheme, D as useToast, V as useTocFromRegion, Xn as useTypeahead };
@@ -1,14 +1,13 @@
1
1
  "use client";
2
2
 
3
3
  import e from "./search.module.js";
4
- import { cn as t, useSignal 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, useId as n, useSignal as r, useSignalEffect as i, useSignals as a } from "@cascivo/core";
5
+ import { builtin as o, t as s } from "@cascivo/i18n";
6
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
7
+ import { useRef as u } from "react";
8
8
  //#region ../components/src/search/search.tsx
9
- var u = 0;
10
9
  function d() {
11
- return /* @__PURE__ */ c("svg", {
10
+ return /* @__PURE__ */ l("svg", {
12
11
  viewBox: "0 0 16 16",
13
12
  width: "16",
14
13
  height: "16",
@@ -17,11 +16,11 @@ function d() {
17
16
  strokeWidth: "1.5",
18
17
  strokeLinecap: "round",
19
18
  "aria-hidden": "true",
20
- children: [/* @__PURE__ */ s("circle", {
19
+ children: [/* @__PURE__ */ c("circle", {
21
20
  cx: "7",
22
21
  cy: "7",
23
22
  r: "4.5"
24
- }), /* @__PURE__ */ s("line", {
23
+ }), /* @__PURE__ */ c("line", {
25
24
  x1: "10.5",
26
25
  y1: "10.5",
27
26
  x2: "14",
@@ -30,17 +29,15 @@ function d() {
30
29
  });
31
30
  }
32
31
  function f({ value: f, defaultValue: p = "", onValueChange: m, onChange: h, onSearch: g, debounceMs: _ = 300, placeholder: v, size: y = "md", label: b, disabled: x = !1, clearLabel: S, id: C, className: w }) {
33
- i();
34
- let T = v ?? o(a.search.placeholder), E = b ?? o(a.search.label), D = S ?? o(a.search.clear), O = l(null), k = l("");
35
- k.current === "" && (u += 1, k.current = `cascade-search-${u}`);
36
- let A = C ?? k.current, j = f !== void 0, M = n(j ? f : p);
32
+ a();
33
+ let T = v ?? s(o.search.placeholder), E = b ?? s(o.search.label), D = S ?? s(o.search.clear), O = u(null), k = n("cascade-search"), A = C ?? k, j = f !== void 0, M = r(j ? f : p);
37
34
  j && (M.value = f);
38
- let N = l(g);
35
+ let N = u(g);
39
36
  N.current = g;
40
- let P = l(null), F = () => {
37
+ let P = u(null), F = () => {
41
38
  P.current !== null && (clearTimeout(P.current), P.current = null);
42
39
  };
43
- r(() => F);
40
+ i(() => F);
44
41
  let I = (e) => {
45
42
  let t = e.target.value;
46
43
  j || (M.value = t), (m ?? h)?.(t), F(), P.current = setTimeout(() => {
@@ -51,21 +48,21 @@ function f({ value: f, defaultValue: p = "", onValueChange: m, onChange: h, onSe
51
48
  }, R = () => {
52
49
  F(), j || (M.value = ""), (m ?? h)?.(""), g?.(""), O.current?.focus();
53
50
  }, z = M.value !== "";
54
- return /* @__PURE__ */ c("div", {
51
+ return /* @__PURE__ */ l("div", {
55
52
  className: t(e.root, w),
56
53
  "data-size": y,
57
54
  "data-state": z ? "filled" : "empty",
58
55
  children: [
59
- /* @__PURE__ */ s("label", {
56
+ /* @__PURE__ */ c("label", {
60
57
  className: e.label,
61
58
  htmlFor: A,
62
59
  children: E
63
60
  }),
64
- /* @__PURE__ */ s("span", {
61
+ /* @__PURE__ */ c("span", {
65
62
  className: e.icon,
66
- children: /* @__PURE__ */ s(d, {})
63
+ children: /* @__PURE__ */ c(d, {})
67
64
  }),
68
- /* @__PURE__ */ s("input", {
65
+ /* @__PURE__ */ c("input", {
69
66
  ref: O,
70
67
  id: A,
71
68
  type: "search",
@@ -76,13 +73,13 @@ function f({ value: f, defaultValue: p = "", onValueChange: m, onChange: h, onSe
76
73
  onChange: I,
77
74
  onKeyDown: L
78
75
  }),
79
- z && /* @__PURE__ */ s("button", {
76
+ z && /* @__PURE__ */ c("button", {
80
77
  type: "button",
81
78
  className: e.clear,
82
79
  "aria-label": D,
83
80
  disabled: x,
84
81
  onClick: R,
85
- children: /* @__PURE__ */ s("span", {
82
+ children: /* @__PURE__ */ c("span", {
86
83
  "aria-hidden": "true",
87
84
  children: "✕"
88
85
  })
@@ -1,15 +1,13 @@
1
1
  "use client";
2
2
 
3
3
  import e from "./sheet.module.js";
4
- import { useSignal as t, useSignalEffect as n } from "@cascivo/core";
4
+ import { useEffectPropSignal as t, useSignalEffect as n } from "@cascivo/core";
5
5
  import { builtin as r, t as i } from "@cascivo/i18n";
6
6
  import { jsx as a, jsxs as o } from "react/jsx-runtime";
7
7
  import { useId as s, useRef as c } from "react";
8
8
  //#region ../components/src/sheet/sheet.tsx
9
9
  function l({ open: l, onClose: u, title: d, children: f, side: p = "end" }) {
10
- let m = c(null), h = s(), g = t(l);
11
- g.value = l;
12
- let _ = c(u);
10
+ let m = c(null), h = s(), g = t(l), _ = c(u);
13
11
  return _.current = u, n(() => {
14
12
  let e = m.current;
15
13
  if (e) if (g.value) try {
@@ -1,15 +1,4 @@
1
1
  "use client";
2
2
 
3
- import e from "./visually-hidden.module.js";
4
- import { cn as t } from "@cascivo/core";
5
- import { jsx as n } from "react/jsx-runtime";
6
- //#region ../components/src/visually-hidden/visually-hidden.tsx
7
- function r({ children: r, className: i, ...a }) {
8
- return /* @__PURE__ */ n("span", {
9
- className: t(e.visuallyHidden, i),
10
- ...a,
11
- children: r
12
- });
13
- }
14
- //#endregion
15
- export { r as VisuallyHidden };
3
+ import "@cascivo/core";
4
+ import "react/jsx-runtime";
@@ -1,18 +1,18 @@
1
1
  "use client";
2
2
 
3
- import { useSignal as e, useSignalEffect as t } from "@cascivo/core";
4
- import { useRef as n } from "react";
3
+ import { useId as e, useSignal as t, useSignalEffect as n } from "@cascivo/core";
4
+ import { useRef as r } from "react";
5
5
  //#region ../components/src/popover/use-popover.ts
6
- var r = 0, i = typeof CSS < "u" && typeof CSS.supports == "function" && CSS.supports("anchor-name: --cascivo-a");
6
+ var i = typeof CSS < "u" && typeof CSS.supports == "function" && CSS.supports("anchor-name: --cascivo-a");
7
7
  function a(a = {}) {
8
- let o = n(`--cascivo-popover-${++r}`).current, s = n(null), c = n(null), l = e(a.open ?? !1);
8
+ let o = `--${e("cascivo-popover")}`, s = r(null), c = r(null), l = t(a.open ?? !1);
9
9
  a.open !== void 0 && (l.value = a.open);
10
- let u = n(a.onOpenChange);
10
+ let u = r(a.onOpenChange);
11
11
  u.current = a.onOpenChange;
12
- let d = n(a.placement);
12
+ let d = r(a.placement);
13
13
  d.current = a.placement;
14
- let f = n(a.offset);
15
- return f.current = a.offset, t(() => {
14
+ let f = r(a.offset);
15
+ return f.current = a.offset, n(() => {
16
16
  let e = l.value;
17
17
  u.current?.(e);
18
18
  let t = c.current;
@@ -30,7 +30,7 @@ function a(a = {}) {
30
30
  r === "bottom" ? (t.style.top = `${n.bottom + i + window.scrollY}px`, t.style.left = `${n.left + window.scrollX}px`) : r === "top" ? (t.style.top = `${n.top - i + window.scrollY}px`, t.style.left = `${n.left + window.scrollX}px`, t.style.transform = "translateY(-100%)") : r === "left" ? (t.style.top = `${n.top + window.scrollY}px`, t.style.left = `${n.left - i + window.scrollX}px`, t.style.transform = "translateX(-100%)") : r === "right" && (t.style.top = `${n.top + window.scrollY}px`, t.style.left = `${n.right + i + window.scrollX}px`);
31
31
  }
32
32
  }
33
- }), t(() => {
33
+ }), n(() => {
34
34
  let e = c.current;
35
35
  if (!e) return;
36
36
  let t = (e) => {