@cascivo/react 0.3.8 → 0.5.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 (52) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +6 -3
  3. package/dist/alert/alert.css +1 -1
  4. package/dist/alert/alert.module.js +7 -7
  5. package/dist/alert-dialog/alert-dialog.js +36 -36
  6. package/dist/avatar/avatar.js +3 -3
  7. package/dist/combobox/combobox.css +1 -1
  8. package/dist/combobox/combobox.js +46 -46
  9. package/dist/combobox/combobox.module.js +15 -15
  10. package/dist/data-table/data-table.css +1 -1
  11. package/dist/data-table/data-table.js +7 -5
  12. package/dist/data-table/data-table.module.js +29 -29
  13. package/dist/date-picker/date-picker.css +1 -1
  14. package/dist/date-picker/date-picker.module.js +19 -19
  15. package/dist/date-range-picker/date-range-picker.js +1 -0
  16. package/dist/dock/dock.js +21 -19
  17. package/dist/fab/fab.js +1 -1
  18. package/dist/file-uploader/file-uploader.css +1 -1
  19. package/dist/file-uploader/file-uploader.module.js +14 -14
  20. package/dist/header/header.js +2 -2
  21. package/dist/index.d.ts +50 -2
  22. package/dist/log-viewer/log-viewer.css +1 -1
  23. package/dist/log-viewer/log-viewer.module.js +12 -12
  24. package/dist/menu/menu.css +1 -1
  25. package/dist/menu/menu.js +60 -35
  26. package/dist/menu/menu.module.js +4 -4
  27. package/dist/modal/modal.js +43 -46
  28. package/dist/multi-select/multi-select.js +3 -2
  29. package/dist/password-input/password-input.js +4 -0
  30. package/dist/popover/popover.css +1 -1
  31. package/dist/popover/popover.module.js +2 -2
  32. package/dist/radial-progress/radial-progress.js +13 -10
  33. package/dist/shell-header/shell-header.js +5 -4
  34. package/dist/side-nav/side-nav.js +4 -4
  35. package/dist/stat/stat.css +1 -1
  36. package/dist/stat/stat.module.js +6 -6
  37. package/dist/steps/steps.css +1 -1
  38. package/dist/steps/steps.js +19 -16
  39. package/dist/steps/steps.module.js +4 -4
  40. package/dist/styles.css +42 -13
  41. package/dist/swipe-item/swipe-item.js +2 -2
  42. package/dist/switcher/switcher.css +1 -1
  43. package/dist/switcher/switcher.js +3 -2
  44. package/dist/switcher/switcher.module.js +4 -4
  45. package/dist/tag/tag.css +1 -1
  46. package/dist/tag/tag.module.js +2 -2
  47. package/dist/tags-input/tags-input.css +1 -1
  48. package/dist/tags-input/tags-input.js +1 -0
  49. package/dist/tags-input/tags-input.module.js +4 -4
  50. package/dist/tooltip/tooltip.js +11 -11
  51. package/package.json +3 -3
  52. package/readme.body.md +6 -3
@@ -1,73 +1,70 @@
1
1
  "use client";
2
2
 
3
3
  import e from "./modal.module.js";
4
- import { cn as t, useDraggable 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";
4
+ import { cn as t, useDraggable as n, useId as r, useSignal as i, useSignalEffect as a, useSignals as o } from "@cascivo/core";
5
+ import { builtin as s, t as c } from "@cascivo/i18n";
6
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
7
+ import { useRef as d } from "react";
8
8
  //#region ../components/src/modal/modal.tsx
9
- function d({ open: d = !1, onClose: f, title: p, description: m, children: h, className: g, size: _ = "md", draggable: v = !1 }) {
10
- a();
11
- let y = u(null), b = u(f);
12
- b.current = f;
13
- let { handleRef: x, offset: S } = n({ isDisabled: !v }), C = v ? {
14
- "--modal-x": `${S.value.x}px`,
15
- "--modal-y": `${S.value.y}px`
16
- } : void 0, w = r(d);
17
- return w.value = d, i(() => {
18
- let e = y.current;
19
- e && (w.value ? e.open || e.showModal() : e.open && e.close());
20
- }), i(() => {
21
- let e = y.current;
9
+ function f({ open: f = !1, onClose: p, title: m, description: h, children: g, className: _, size: v = "md", draggable: y = !1 }) {
10
+ o();
11
+ let b = d(null), x = d(p);
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 ? {
14
+ "--modal-x": `${T.value.x}px`,
15
+ "--modal-y": `${T.value.y}px`
16
+ } : void 0, D = i(f);
17
+ return D.value = f, a(() => {
18
+ let e = b.current;
19
+ e && (D.value ? e.open || e.showModal() : e.open && e.close());
20
+ }), a(() => {
21
+ let e = b.current;
22
22
  if (!e) return;
23
- let t = () => b.current?.();
23
+ let t = () => x.current?.();
24
24
  return e.addEventListener("close", t), () => e.removeEventListener("close", t);
25
- }), /* @__PURE__ */ c("dialog", {
26
- ref: y,
27
- "data-size": _,
28
- "data-draggable": v || void 0,
29
- className: t(e.dialog, g),
30
- style: C,
25
+ }), /* @__PURE__ */ l("dialog", {
26
+ ref: b,
27
+ "data-size": v,
28
+ "data-draggable": y || void 0,
29
+ className: t(e.dialog, _),
30
+ style: E,
31
31
  onClick: (e) => {
32
- e.target === y.current && y.current?.close();
32
+ e.target === b.current && b.current?.close();
33
33
  },
34
- onKeyDown: (e) => {
35
- e.key === "Escape" && (e.preventDefault(), y.current?.close());
36
- },
37
- "aria-labelledby": p ? "cascade-modal-title" : void 0,
38
- "aria-describedby": m ? "cascade-modal-desc" : void 0,
39
- children: /* @__PURE__ */ l("div", {
34
+ "aria-labelledby": m ? S : void 0,
35
+ "aria-describedby": h ? C : void 0,
36
+ children: /* @__PURE__ */ u("div", {
40
37
  className: e.panel,
41
38
  children: [
42
- (p || f) && /* @__PURE__ */ l("div", {
39
+ (m || p) && /* @__PURE__ */ u("div", {
43
40
  className: e.header,
44
- ref: v ? (e) => {
45
- x.current = e;
41
+ ref: y ? (e) => {
42
+ w.current = e;
46
43
  } : void 0,
47
- children: [p && /* @__PURE__ */ c("h2", {
48
- id: "cascade-modal-title",
44
+ children: [m && /* @__PURE__ */ l("h2", {
45
+ id: S,
49
46
  className: e.title,
50
- children: p
51
- }), f && /* @__PURE__ */ c("button", {
47
+ children: m
48
+ }), p && /* @__PURE__ */ l("button", {
52
49
  type: "button",
53
50
  className: e.close,
54
- onClick: () => y.current?.close(),
55
- "aria-label": s(o.modal.close),
51
+ onClick: () => b.current?.close(),
52
+ "aria-label": c(s.modal.close),
56
53
  children: "✕"
57
54
  })]
58
55
  }),
59
- m && /* @__PURE__ */ c("p", {
60
- id: "cascade-modal-desc",
56
+ h && /* @__PURE__ */ l("p", {
57
+ id: C,
61
58
  className: e.description,
62
- children: m
59
+ children: h
63
60
  }),
64
- /* @__PURE__ */ c("div", {
61
+ /* @__PURE__ */ l("div", {
65
62
  className: e.body,
66
- children: h
63
+ children: g
67
64
  })
68
65
  ]
69
66
  })
70
67
  });
71
68
  }
72
69
  //#endregion
73
- export { d as Modal };
70
+ export { f as Modal };
@@ -55,8 +55,6 @@ function f({ options: f, value: p, onValueChange: m, placeholder: h, disabled: g
55
55
  }), /* @__PURE__ */ u("div", {
56
56
  ref: b.popoverRef,
57
57
  popover: "auto",
58
- role: "listbox",
59
- "aria-multiselectable": "true",
60
58
  className: t.panel,
61
59
  style: { positionAnchor: b.anchorName },
62
60
  tabIndex: -1,
@@ -74,6 +72,9 @@ function f({ options: f, value: p, onValueChange: m, placeholder: h, disabled: g
74
72
  })
75
73
  }), /* @__PURE__ */ l("div", {
76
74
  ref: C,
75
+ role: "listbox",
76
+ "aria-multiselectable": "true",
77
+ "aria-label": _?.label ?? c(s.multiSelect.label),
77
78
  className: t.options,
78
79
  children: T.value.length === 0 ? /* @__PURE__ */ l("div", {
79
80
  className: t["no-results"],
@@ -58,7 +58,11 @@ function u({ showStrengthMeter: u = !1, size: d = "md", labels: f, className: p,
58
58
  })]
59
59
  }), u && C && /* @__PURE__ */ o("div", {
60
60
  className: e["strength-meter"],
61
+ role: "meter",
61
62
  "aria-label": T,
63
+ "aria-valuenow": C.score,
64
+ "aria-valuemin": 0,
65
+ "aria-valuemax": 4,
62
66
  "data-strength": C.label,
63
67
  children: [
64
68
  0,
@@ -1 +1 @@
1
- @layer cascivo.component{._content_208tz_6{padding:var(--cascivo-space-3);background:var(--cascivo-color-surface);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-overlay);box-shadow:var(--cascivo-shadow-md);margin:0;position:fixed;inset:auto}@supports (anchor-name:--a){._content_208tz_6{position-try-fallbacks:flip-block, flip-inline, flip-block flip-inline;inset-block-start:anchor(end);inset-inline-start:anchor(start)}}._content_208tz_6{opacity:1;transition:opacity var(--cascivo-motion-enter), translate var(--cascivo-motion-enter), display var(--cascivo-motion-enter) allow-discrete, overlay var(--cascivo-motion-enter) allow-discrete;translate:0}@starting-style{._content_208tz_6{opacity:0;translate:0 calc(-1 * var(--cascivo-space-2))}}._content_208tz_6[data-state=closed]{opacity:0;translate:0 calc(-1 * var(--cascivo-space-2));transition:opacity var(--cascivo-motion-exit), translate var(--cascivo-motion-exit), display var(--cascivo-motion-exit) allow-discrete, overlay var(--cascivo-motion-exit) allow-discrete}}
1
+ @layer cascivo.component{._trigger_13tp0_2{justify-content:center;align-items:center;min-block-size:1.5rem;min-inline-size:1.5rem;display:inline-flex}._content_13tp0_11{padding:var(--cascivo-space-3);background:var(--cascivo-color-surface);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-overlay);box-shadow:var(--cascivo-shadow-md);margin:0;position:fixed;inset:auto}@supports (anchor-name:--a){._content_13tp0_11{position-try-fallbacks:flip-block, flip-inline, flip-block flip-inline;inset-block-start:anchor(end);inset-inline-start:anchor(start)}}._content_13tp0_11{opacity:1;transition:opacity var(--cascivo-motion-enter), translate var(--cascivo-motion-enter), display var(--cascivo-motion-enter) allow-discrete, overlay var(--cascivo-motion-enter) allow-discrete;translate:0}@starting-style{._content_13tp0_11{opacity:0;translate:0 calc(-1 * var(--cascivo-space-2))}}._content_13tp0_11[data-state=closed]{opacity:0;translate:0 calc(-1 * var(--cascivo-space-2));transition:opacity var(--cascivo-motion-exit), translate var(--cascivo-motion-exit), display var(--cascivo-motion-exit) allow-discrete, overlay var(--cascivo-motion-exit) allow-discrete}}
@@ -2,8 +2,8 @@
2
2
 
3
3
  import './popover.css';
4
4
  var e = {
5
- trigger: "_trigger_208tz_2",
6
- content: "_content_208tz_6"
5
+ trigger: "_trigger_13tp0_2",
6
+ content: "_content_13tp0_11"
7
7
  };
8
8
  //#endregion
9
9
  export { e as default };
@@ -2,24 +2,27 @@
2
2
 
3
3
  import e from "./radial-progress.module.js";
4
4
  import { jsx as t } from "react/jsx-runtime";
5
+ import { useId as n } from "react";
5
6
  //#region ../components/src/radial-progress/radial-progress.tsx
6
- function n({ value: n, size: r = "md", variant: i = "primary", children: a, className: o, ...s }) {
7
- let c = Math.min(100, Math.max(0, n));
7
+ function r({ value: r, size: i = "md", variant: a = "primary", children: o, className: s, ...c }) {
8
+ let l = Math.min(100, Math.max(0, r)), u = n();
8
9
  return /* @__PURE__ */ t("div", {
9
10
  role: "progressbar",
10
- "aria-valuenow": c,
11
+ "aria-valuenow": l,
11
12
  "aria-valuemin": 0,
12
13
  "aria-valuemax": 100,
13
- className: [e.radialProgress, o].filter(Boolean).join(" "),
14
- "data-size": r,
15
- "data-variant": i,
16
- style: { "--cascivo-radial-progress": c },
17
- ...s,
14
+ "aria-labelledby": c["aria-label"] ? void 0 : u,
15
+ className: [e.radialProgress, s].filter(Boolean).join(" "),
16
+ "data-size": i,
17
+ "data-variant": a,
18
+ style: { "--cascivo-radial-progress": l },
19
+ ...c,
18
20
  children: /* @__PURE__ */ t("span", {
21
+ id: u,
19
22
  className: e.label,
20
- children: a ?? `${c}%`
23
+ children: o ?? `${l}%`
21
24
  })
22
25
  });
23
26
  }
24
27
  //#endregion
25
- export { n as RadialProgress };
28
+ export { r as RadialProgress };
@@ -64,7 +64,7 @@ function f({ item: n }) {
64
64
  style: { positionAnchor: d },
65
65
  className: t.navMenuPanel,
66
66
  onKeyDown: _,
67
- children: n.items.map((e) => /* @__PURE__ */ c("a", {
67
+ children: n.items.map((e, n) => /* @__PURE__ */ c("a", {
68
68
  href: e.href,
69
69
  role: "menuitem",
70
70
  "aria-current": e.active ? "page" : void 0,
@@ -72,7 +72,7 @@ function f({ item: n }) {
72
72
  className: t.navMenuItem,
73
73
  onClick: p,
74
74
  children: e.label
75
- }, e.href))
75
+ }, e.id ?? `${n}-${e.href}`))
76
76
  })]
77
77
  });
78
78
  }
@@ -127,13 +127,14 @@ function p({ brand: e, nav: r, actions: i, end: p, onMenuClick: m, menuExpanded:
127
127
  className: t.nav,
128
128
  children: /* @__PURE__ */ c("ul", {
129
129
  className: t.navList,
130
- children: r.map((e) => d(e) ? /* @__PURE__ */ c(f, { item: e }, e.label) : /* @__PURE__ */ c("li", { children: /* @__PURE__ */ c("a", {
130
+ children: r.map((e, n) => d(e) ? /* @__PURE__ */ c(f, { item: e }, e.id ?? `${n}-${e.label}`) : /* @__PURE__ */ c("li", { children: /* @__PURE__ */ c("a", {
131
131
  href: e.href,
132
132
  "aria-current": e.active ? "page" : void 0,
133
133
  "data-state": e.active ? "active" : void 0,
134
134
  className: t.navLink,
135
+ ...e.onClick ? { onClick: e.onClick } : {},
135
136
  children: e.label
136
- }) }, e.href))
137
+ }) }, e.id ?? `${n}-${e.href}`))
137
138
  })
138
139
  }),
139
140
  /* @__PURE__ */ c("div", { className: t.spacer }),
@@ -174,7 +174,7 @@ function v({ items: t, groups: d, collapsed: m, defaultCollapsed: v = !1, onColl
174
174
  children: t.items.map((t, i) => {
175
175
  let a = `${r}-${i}`;
176
176
  if (t.items) {
177
- if (L && !C) return /* @__PURE__ */ l("li", { children: /* @__PURE__ */ l(_, { item: t }) }, t.label);
177
+ if (L && !C) return /* @__PURE__ */ l("li", { children: /* @__PURE__ */ l(_, { item: t }) }, t.id ?? a);
178
178
  let e = P.value.includes(t.label), r = `${j}-group-${a}`;
179
179
  return /* @__PURE__ */ u("li", { children: [/* @__PURE__ */ u("button", {
180
180
  type: "button",
@@ -230,12 +230,12 @@ function v({ items: t, groups: d, collapsed: m, defaultCollapsed: v = !1, onColl
230
230
  children: e.label
231
231
  }, t))
232
232
  })
233
- })] }, t.label);
233
+ })] }, t.id ?? a);
234
234
  }
235
235
  if (t.render) return /* @__PURE__ */ l("li", {
236
236
  className: n.customItem,
237
237
  children: t.render({ collapsed: L })
238
- }, t.label);
238
+ }, t.id ?? a);
239
239
  let o = /* @__PURE__ */ u(c, { children: [
240
240
  t.icon ? /* @__PURE__ */ l("span", {
241
241
  className: n.icon,
@@ -289,7 +289,7 @@ function v({ items: t, groups: d, collapsed: m, defaultCollapsed: v = !1, onColl
289
289
  content: t.label,
290
290
  placement: "right",
291
291
  children: d
292
- }) : d }, t.label);
292
+ }) : d }, t.id ?? a);
293
293
  })
294
294
  })]
295
295
  }, r))
@@ -1 +1 @@
1
- @layer cascivo.component{._stat_1gtqw_2{gap:var(--cascivo-space-1);font-family:var(--cascivo-font-sans);flex-direction:column;display:flex}._label_1gtqw_9{font-size:var(--cascivo-text-sm);color:var(--cascivo-color-text-subtle);line-height:var(--cascivo-leading-tight)}._value_1gtqw_15{font-size:var(--cascivo-text-2xl);font-weight:var(--cascivo-font-semibold);color:var(--cascivo-color-text);line-height:var(--cascivo-leading-tight);font-variant-numeric:tabular-nums}._delta_1gtqw_23{align-items:center;gap:var(--cascivo-space-1);font-size:var(--cascivo-text-sm);font-weight:var(--cascivo-font-medium);font-variant-numeric:tabular-nums;display:inline-flex}._delta_1gtqw_23[data-trend=up]{color:var(--cascivo-color-success)}._delta_1gtqw_23[data-trend=down]{color:var(--cascivo-color-destructive)}._delta_1gtqw_23[data-trend=flat]{color:var(--cascivo-color-text-subtle)}._arrow_1gtqw_44{font-size:var(--cascivo-text-xs);line-height:1}._help_1gtqw_49{font-size:var(--cascivo-text-xs);color:var(--cascivo-color-text-subtle);line-height:var(--cascivo-leading-tight)}}
1
+ @layer cascivo.component{._stat_119kx_2{gap:var(--cascivo-space-1);font-family:var(--cascivo-font-sans);flex-direction:column;display:flex}._label_119kx_9{font-size:var(--cascivo-text-sm);color:var(--cascivo-color-text-subtle);line-height:var(--cascivo-leading-tight)}._value_119kx_15{font-size:var(--cascivo-text-2xl);font-weight:var(--cascivo-font-semibold);color:var(--cascivo-color-text);line-height:var(--cascivo-leading-tight);font-variant-numeric:tabular-nums}._delta_119kx_23{align-items:center;gap:var(--cascivo-space-1);font-size:var(--cascivo-text-sm);font-weight:var(--cascivo-font-medium);font-variant-numeric:tabular-nums;display:inline-flex}._delta_119kx_23[data-trend=up]{color:var(--cascivo-color-success-foreground)}._delta_119kx_23[data-trend=down]{color:var(--cascivo-color-destructive-foreground)}._delta_119kx_23[data-trend=flat]{color:var(--cascivo-color-text-subtle)}._arrow_119kx_44{font-size:var(--cascivo-text-xs);line-height:1}._help_119kx_49{font-size:var(--cascivo-text-xs);color:var(--cascivo-color-text-subtle);line-height:var(--cascivo-leading-tight)}}
@@ -2,12 +2,12 @@
2
2
 
3
3
  import './stat.css';
4
4
  var e = {
5
- stat: "_stat_1gtqw_2",
6
- label: "_label_1gtqw_9",
7
- value: "_value_1gtqw_15",
8
- delta: "_delta_1gtqw_23",
9
- arrow: "_arrow_1gtqw_44",
10
- help: "_help_1gtqw_49"
5
+ stat: "_stat_119kx_2",
6
+ label: "_label_119kx_9",
7
+ value: "_value_119kx_15",
8
+ delta: "_delta_119kx_23",
9
+ arrow: "_arrow_119kx_44",
10
+ help: "_help_119kx_49"
11
11
  };
12
12
  //#endregion
13
13
  export { e as default };
@@ -1 +1 @@
1
- @layer cascivo.component{._steps_1xps1_2{gap:0;margin:0;padding:0;list-style:none;display:flex}._steps_1xps1_2[data-orientation=horizontal]{flex-direction:row;align-items:center}._steps_1xps1_2[data-orientation=vertical]{flex-direction:column}._step_1xps1_2{flex:1;align-items:center;gap:.5rem;display:flex;position:relative}._step_1xps1_2:not(:last-child):after{content:"";background-color:var(--cascivo-border-default);flex:1;block-size:1px}._steps_1xps1_2[data-orientation=vertical] ._step_1xps1_2:not(:last-child):after{flex:none;block-size:calc(100% - 1.5rem);inline-size:1px;position:absolute;inset-block-start:2rem;inset-inline-start:.75rem}._circle_1xps1_42{border-radius:var(--cascivo-radius-full);border:2px solid var(--cascivo-border-default);background-color:var(--cascivo-color-surface);block-size:1.5rem;inline-size:1.5rem;color:var(--cascivo-color-text-muted);transition:background-color .15s var(--cascivo-ease-out), border-color .15s var(--cascivo-ease-out);flex-shrink:0;justify-content:center;align-items:center;font-size:.75rem;font-weight:600;display:flex}._step_1xps1_2[data-state=active] ._circle_1xps1_42{background-color:var(--cascivo-color-accent);border-color:var(--cascivo-color-accent);color:var(--cascivo-color-accent-content)}._step_1xps1_2[data-state=complete] ._circle_1xps1_42{background-color:var(--cascivo-color-success);border-color:var(--cascivo-color-success);color:var(--cascivo-color-success-content)}._step_1xps1_2[data-state=error] ._circle_1xps1_42{background-color:var(--cascivo-color-error);border-color:var(--cascivo-color-error);color:var(--cascivo-color-error-content)}._step_1xps1_2[data-state=complete]:not(:last-child):after{background-color:var(--cascivo-color-success)}._label_1xps1_82{color:var(--cascivo-color-text-subtle);font-size:.875rem}._step_1xps1_2[data-state=active] ._label_1xps1_82{color:var(--cascivo-color-text);font-weight:500}._step_1xps1_2[data-state=complete] ._label_1xps1_82{color:var(--cascivo-color-text-subtle)}._step_1xps1_2[data-state=error] ._label_1xps1_82{color:var(--cascivo-color-error)}}
1
+ @layer cascivo.component{._steps_1u41q_2{gap:0;margin:0;padding:0;list-style:none;display:flex}._steps_1u41q_2[data-orientation=horizontal]{flex-direction:row;align-items:center}._steps_1u41q_2[data-orientation=vertical]{flex-direction:column}._step_1u41q_2{flex:1;align-items:center;gap:.5rem;display:flex;position:relative}._step_1u41q_2:not(:last-child):after{content:"";background-color:var(--cascivo-border-default);flex:1;block-size:1px}._steps_1u41q_2[data-orientation=vertical] ._step_1u41q_2:not(:last-child):after{flex:none;block-size:calc(100% - 1.5rem);inline-size:1px;position:absolute;inset-block-start:2rem;inset-inline-start:.75rem}._circle_1u41q_42{border-radius:var(--cascivo-radius-full);border:2px solid var(--cascivo-border-default);background-color:var(--cascivo-color-surface);block-size:1.5rem;inline-size:1.5rem;color:var(--cascivo-color-text-muted);transition:background-color .15s var(--cascivo-ease-out), border-color .15s var(--cascivo-ease-out);flex-shrink:0;justify-content:center;align-items:center;font-size:.75rem;font-weight:600;display:flex}._step_1u41q_2[data-state=active] ._circle_1u41q_42{background-color:var(--cascivo-color-accent);border-color:var(--cascivo-color-accent);color:var(--cascivo-color-accent-content)}._step_1u41q_2[data-state=complete] ._circle_1u41q_42{background-color:var(--cascivo-color-success);border-color:var(--cascivo-color-success);color:var(--cascivo-color-success-content)}._step_1u41q_2[data-state=error] ._circle_1u41q_42{background-color:var(--cascivo-color-error);border-color:var(--cascivo-color-error);color:var(--cascivo-color-error-content)}._step_1u41q_2[data-state=complete]:not(:last-child):after{background-color:var(--cascivo-color-success)}._label_1u41q_82{color:var(--cascivo-color-text-subtle);font-size:.875rem}._step_1u41q_2[data-state=active] ._label_1u41q_82{color:var(--cascivo-color-text);font-weight:500}._step_1u41q_2[data-state=complete] ._label_1u41q_82{color:var(--cascivo-color-text-subtle)}._step_1u41q_2[data-state=error] ._label_1u41q_82{color:var(--cascivo-color-destructive-foreground)}}
@@ -2,25 +2,28 @@
2
2
 
3
3
  import e from "./steps.module.js";
4
4
  import { useSignal as t, useSignals as n } from "@cascivo/core";
5
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
+ import { builtin as r, t as i } from "@cascivo/i18n";
6
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
6
7
  //#region ../components/src/steps/steps.tsx
7
- function a({ steps: a, activeStep: o, orientation: s = "horizontal", className: c }) {
8
+ function s({ steps: s, activeStep: c, orientation: l = "horizontal", className: u, ariaLabel: d }) {
8
9
  n();
9
- let l = t(o ?? 0);
10
- return l.value = o ?? l.value, /* @__PURE__ */ r("ol", {
11
- className: [e.steps, c].filter(Boolean).join(" "),
12
- "data-orientation": s,
13
- "aria-label": "Steps",
14
- children: a.map((t, n) => {
15
- let a = t.state ?? (n < l.value ? "complete" : n === l.value ? "active" : "pending");
16
- return /* @__PURE__ */ i("li", {
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", {
17
20
  className: e.step,
18
- "data-state": a,
19
- "aria-current": a === "active" ? "step" : void 0,
20
- children: [/* @__PURE__ */ r("div", {
21
+ "data-state": r,
22
+ "aria-current": r === "active" ? "step" : void 0,
23
+ children: [/* @__PURE__ */ a("div", {
21
24
  className: e.circle,
22
- children: a === "complete" ? "✓" : a === "error" ? "✕" : n + 1
23
- }), /* @__PURE__ */ r("span", {
25
+ children: r === "complete" ? "✓" : r === "error" ? "✕" : n + 1
26
+ }), /* @__PURE__ */ a("span", {
24
27
  className: e.label,
25
28
  children: t.label
26
29
  })]
@@ -29,4 +32,4 @@ function a({ steps: a, activeStep: o, orientation: s = "horizontal", className:
29
32
  });
30
33
  }
31
34
  //#endregion
32
- export { a as Steps };
35
+ export { s as Steps };
@@ -2,10 +2,10 @@
2
2
 
3
3
  import './steps.css';
4
4
  var e = {
5
- steps: "_steps_1xps1_2",
6
- step: "_step_1xps1_2",
7
- circle: "_circle_1xps1_42",
8
- label: "_label_1xps1_82"
5
+ steps: "_steps_1u41q_2",
6
+ step: "_step_1u41q_2",
7
+ circle: "_circle_1u41q_42",
8
+ label: "_label_1u41q_82"
9
9
  };
10
10
  //#endregion
11
11
  export { e as default };