@cascivo/react 0.11.1 → 0.13.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 (124) hide show
  1. package/README.md +1 -1
  2. package/dist/alert-dialog/alert-dialog.js +2 -4
  3. package/dist/app-shell/app-shell.js +24 -23
  4. package/dist/badge/badge.js +17 -10
  5. package/dist/button/button.css +1 -1
  6. package/dist/button/button.module.js +1 -1
  7. package/dist/card/card.css +1 -1
  8. package/dist/card/card.js +21 -11
  9. package/dist/card/card.module.js +8 -5
  10. package/dist/checkbox/checkbox.js +2 -2
  11. package/dist/combobox/combobox.css +1 -1
  12. package/dist/combobox/combobox.module.js +15 -15
  13. package/dist/command-menu/command-menu.js +67 -71
  14. package/dist/data-table/data-table.css +1 -1
  15. package/dist/data-table/data-table.js +7 -1
  16. package/dist/data-table/data-table.module.js +29 -29
  17. package/dist/date-picker/date-picker.css +1 -1
  18. package/dist/date-picker/date-picker.module.js +19 -19
  19. package/dist/dropdown/dropdown.js +48 -50
  20. package/dist/file-uploader/file-uploader.css +1 -1
  21. package/dist/file-uploader/file-uploader.module.js +14 -14
  22. package/dist/filter/filter.js +10 -9
  23. package/dist/header-panel/header-panel.js +2 -4
  24. package/dist/icon-button/icon-button.css +1 -1
  25. package/dist/icon-button/icon-button.js +10 -10
  26. package/dist/icon-button/icon-button.module.js +1 -1
  27. package/dist/index.d.ts +1300 -69
  28. package/dist/input/input.css +1 -1
  29. package/dist/input/input.module.js +5 -5
  30. package/dist/item/item.css +1 -1
  31. package/dist/item/item.module.js +6 -6
  32. package/dist/layouts/src/page-header/page-header.css +1 -0
  33. package/dist/layouts/src/page-header/page-header.js +33 -0
  34. package/dist/layouts/src/page-header/page-header.module.js +13 -0
  35. package/dist/link/link.js +12 -12
  36. package/dist/modal/modal.js +4 -4
  37. package/dist/multi-select/multi-select.css +1 -1
  38. package/dist/multi-select/multi-select.module.js +11 -11
  39. package/dist/node/alert-dialog/alert-dialog.js +2 -4
  40. package/dist/node/app-shell/app-shell.js +24 -23
  41. package/dist/node/badge/badge.js +17 -10
  42. package/dist/node/button/button.module.js +1 -1
  43. package/dist/node/card/card.js +21 -11
  44. package/dist/node/card/card.module.js +8 -5
  45. package/dist/node/checkbox/checkbox.js +2 -2
  46. package/dist/node/combobox/combobox.module.js +15 -15
  47. package/dist/node/command-menu/command-menu.js +67 -71
  48. package/dist/node/data-table/data-table.js +7 -1
  49. package/dist/node/data-table/data-table.module.js +29 -29
  50. package/dist/node/date-picker/date-picker.module.js +19 -19
  51. package/dist/node/dropdown/dropdown.js +48 -50
  52. package/dist/node/file-uploader/file-uploader.module.js +14 -14
  53. package/dist/node/filter/filter.js +10 -9
  54. package/dist/node/header-panel/header-panel.js +2 -4
  55. package/dist/node/icon-button/icon-button.js +10 -10
  56. package/dist/node/icon-button/icon-button.module.js +1 -1
  57. package/dist/node/input/input.module.js +5 -5
  58. package/dist/node/item/item.module.js +6 -6
  59. package/dist/node/layouts/src/page-header/page-header.js +33 -0
  60. package/dist/node/layouts/src/page-header/page-header.module.js +12 -0
  61. package/dist/node/link/link.js +12 -12
  62. package/dist/node/modal/modal.js +4 -4
  63. package/dist/node/multi-select/multi-select.module.js +11 -11
  64. package/dist/node/notification/notification.js +50 -44
  65. package/dist/node/notification/notification.module.js +7 -7
  66. package/dist/node/number-input/number-input.module.js +8 -8
  67. package/dist/node/otp-input/otp-input.module.js +2 -2
  68. package/dist/node/overflow-menu/overflow-menu.js +18 -13
  69. package/dist/node/password-input/password-input.module.js +7 -7
  70. package/dist/node/popover/use-popover.js +9 -9
  71. package/dist/node/progress/progress.js +3 -2
  72. package/dist/node/react/src/index.js +63 -62
  73. package/dist/node/search/search.js +19 -22
  74. package/dist/node/search/search.module.js +5 -5
  75. package/dist/node/sheet/sheet.js +2 -4
  76. package/dist/node/stat/stat.js +6 -5
  77. package/dist/node/stat/stat.module.js +7 -7
  78. package/dist/node/status/status.js +18 -11
  79. package/dist/node/steps/steps.js +23 -23
  80. package/dist/node/structured-list/structured-list.js +14 -13
  81. package/dist/node/tag/tag.js +22 -15
  82. package/dist/node/tags-input/tags-input.module.js +4 -4
  83. package/dist/node/tile/tile.module.js +3 -3
  84. package/dist/node/time-picker/time-picker.module.js +5 -5
  85. package/dist/node/timeline/timeline.js +22 -16
  86. package/dist/node/visually-hidden/visually-hidden.js +2 -13
  87. package/dist/notification/notification.css +1 -1
  88. package/dist/notification/notification.js +50 -44
  89. package/dist/notification/notification.module.js +7 -7
  90. package/dist/number-input/number-input.css +1 -1
  91. package/dist/number-input/number-input.module.js +8 -8
  92. package/dist/otp-input/otp-input.css +1 -1
  93. package/dist/otp-input/otp-input.module.js +2 -2
  94. package/dist/overflow-menu/overflow-menu.js +18 -13
  95. package/dist/password-input/password-input.css +1 -1
  96. package/dist/password-input/password-input.module.js +7 -7
  97. package/dist/popover/use-popover.js +9 -9
  98. package/dist/progress/progress.js +3 -2
  99. package/dist/react/src/index.js +63 -62
  100. package/dist/search/search.css +1 -1
  101. package/dist/search/search.js +19 -22
  102. package/dist/search/search.module.js +5 -5
  103. package/dist/sheet/sheet.js +2 -4
  104. package/dist/stat/stat.css +1 -1
  105. package/dist/stat/stat.js +6 -5
  106. package/dist/stat/stat.module.js +7 -7
  107. package/dist/status/status.js +18 -11
  108. package/dist/steps/steps.js +23 -23
  109. package/dist/structured-list/structured-list.js +14 -13
  110. package/dist/styles.css +33 -21
  111. package/dist/tag/tag.js +22 -15
  112. package/dist/tags-input/tags-input.css +1 -1
  113. package/dist/tags-input/tags-input.module.js +4 -4
  114. package/dist/tile/tile.css +1 -1
  115. package/dist/tile/tile.module.js +3 -3
  116. package/dist/time-picker/time-picker.css +1 -1
  117. package/dist/time-picker/time-picker.module.js +5 -5
  118. package/dist/timeline/timeline.js +22 -16
  119. package/dist/visually-hidden/visually-hidden.js +2 -13
  120. package/package.json +4 -4
  121. package/readme.body.md +1 -1
  122. package/dist/node/visually-hidden/visually-hidden.module.js +0 -5
  123. package/dist/visually-hidden/visually-hidden.css +0 -1
  124. package/dist/visually-hidden/visually-hidden.module.js +0 -6
@@ -4,28 +4,29 @@ import e from "./filter.module.js";
4
4
  import { useControllableSignal as t, useSignals as n } from "@cascivo/core";
5
5
  import { jsx as r } from "react/jsx-runtime";
6
6
  //#region ../components/src/filter/filter.tsx
7
- function i({ options: i, value: a, defaultValue: o = [], onValueChange: s, onChange: c, multi: l = !1, variant: u = "pill", className: d, ...f }) {
7
+ function i({ options: i, value: a, defaultValue: o = [], onValueChange: s, onChange: c, multi: l = !1, variant: u = "pill", className: d, ariaLabel: f, ...p }) {
8
8
  n();
9
- let [p, m] = t({
9
+ let [m, h] = t({
10
10
  value: a,
11
11
  defaultValue: o,
12
12
  onChange: s ?? c
13
13
  });
14
- function h(e) {
15
- let t = p.value, n;
16
- n = l ? t.includes(e) ? t.filter((t) => t !== e) : [...t, e] : t.includes(e) ? [] : [e], m(n);
14
+ function g(e) {
15
+ let t = m.value, n;
16
+ n = l ? t.includes(e) ? t.filter((t) => t !== e) : [...t, e] : t.includes(e) ? [] : [e], h(n);
17
17
  }
18
18
  return /* @__PURE__ */ r("div", {
19
19
  role: "group",
20
20
  className: [e.filter, d].filter(Boolean).join(" "),
21
21
  "data-variant": u,
22
- ...f,
22
+ "aria-label": p["aria-label"] ?? f,
23
+ ...p,
23
24
  children: i.map((t) => /* @__PURE__ */ r("button", {
24
25
  type: "button",
25
26
  className: e.item,
26
- "data-selected": p.value.includes(t.value) || void 0,
27
- onClick: () => h(t.value),
28
- "aria-pressed": p.value.includes(t.value),
27
+ "data-selected": m.value.includes(t.value) || void 0,
28
+ onClick: () => g(t.value),
29
+ "aria-pressed": m.value.includes(t.value),
29
30
  children: t.label
30
31
  }, t.value))
31
32
  });
@@ -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,5 +1,5 @@
1
1
  "use client";
2
2
 
3
- var e = { iconButton: "_iconButton_13zh2_2" };
3
+ var e = { iconButton: "_iconButton_1f9hf_2" };
4
4
  //#endregion
5
5
  export { e as default };
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
 
3
3
  var e = {
4
- wrapper: "_wrapper_ao79u_2",
5
- label: "_label_ao79u_26",
6
- input: "_input_ao79u_34",
7
- error: "_error_ao79u_77",
8
- hint: "_hint_ao79u_84"
4
+ wrapper: "_wrapper_swdj6_2",
5
+ label: "_label_swdj6_30",
6
+ input: "_input_swdj6_38",
7
+ error: "_error_swdj6_81",
8
+ hint: "_hint_swdj6_88"
9
9
  };
10
10
  //#endregion
11
11
  export { e as default };
@@ -1,12 +1,12 @@
1
1
  "use client";
2
2
 
3
3
  var e = {
4
- item: "_item_1uxrt_2",
5
- media: "_media_1uxrt_30",
6
- content: "_content_1uxrt_38",
7
- title: "_title_1uxrt_45",
8
- description: "_description_1uxrt_51",
9
- actions: "_actions_1uxrt_58"
4
+ item: "_item_e9n8e_2",
5
+ media: "_media_e9n8e_32",
6
+ content: "_content_e9n8e_40",
7
+ title: "_title_e9n8e_47",
8
+ description: "_description_e9n8e_53",
9
+ actions: "_actions_e9n8e_60"
10
10
  };
11
11
  //#endregion
12
12
  export { e as default };
@@ -0,0 +1,33 @@
1
+ "use client";
2
+
3
+ import e from "./page-header.module.js";
4
+ import { cn as t } from "@cascivo/core";
5
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
6
+ //#region ../layouts/src/page-header/page-header.tsx
7
+ function i({ title: i, description: a, breadcrumb: o, actions: s, className: c }) {
8
+ return /* @__PURE__ */ r("header", {
9
+ className: t(e.header, c),
10
+ children: [
11
+ o && /* @__PURE__ */ n("div", {
12
+ className: e.breadcrumb,
13
+ children: o
14
+ }),
15
+ /* @__PURE__ */ r("div", {
16
+ className: e.row,
17
+ children: [/* @__PURE__ */ n("h1", {
18
+ className: e.title,
19
+ children: i
20
+ }), s && /* @__PURE__ */ n("div", {
21
+ className: e.actions,
22
+ children: s
23
+ })]
24
+ }),
25
+ a && /* @__PURE__ */ n("p", {
26
+ className: e.description,
27
+ children: a
28
+ })
29
+ ]
30
+ });
31
+ }
32
+ //#endregion
33
+ export { i as PageHeader };
@@ -0,0 +1,12 @@
1
+ "use client";
2
+
3
+ var e = {
4
+ header: "_header_e7nyb_2",
5
+ breadcrumb: "_breadcrumb_e7nyb_8",
6
+ row: "_row_e7nyb_12",
7
+ title: "_title_e7nyb_20",
8
+ actions: "_actions_e7nyb_28",
9
+ description: "_description_e7nyb_35"
10
+ };
11
+ //#endregion
12
+ export { e as default };
@@ -1,22 +1,22 @@
1
1
  "use client";
2
2
 
3
3
  import e from "./link.module.js";
4
- import { cn as t } from "@cascivo/core";
5
- import { jsx as n } from "react/jsx-runtime";
4
+ import { Slot as t, cn as n } from "@cascivo/core";
5
+ import { jsx as r } from "react/jsx-runtime";
6
6
  //#region ../components/src/link/link.tsx
7
- function r({ variant: r = "standalone", size: i = "md", external: a = !1, className: o, children: s, ...c }) {
8
- return /* @__PURE__ */ n("a", {
9
- "data-variant": r,
10
- "data-size": i,
11
- "data-external": a || void 0,
12
- className: t(e.link, o),
13
- ...a ? {
7
+ function i({ variant: i = "standalone", size: a = "md", external: o = !1, asChild: s = !1, className: c, children: l, ...u }) {
8
+ return /* @__PURE__ */ r(s ? t : "a", {
9
+ "data-variant": i,
10
+ "data-size": a,
11
+ "data-external": o || void 0,
12
+ className: n(e.link, c),
13
+ ...o ? {
14
14
  target: "_blank",
15
15
  rel: "noreferrer"
16
16
  } : {},
17
- ...c,
18
- children: s
17
+ ...u,
18
+ children: l
19
19
  });
20
20
  }
21
21
  //#endregion
22
- export { r as Link };
22
+ export { i as Link };
@@ -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,17 +1,17 @@
1
1
  "use client";
2
2
 
3
3
  var e = {
4
- wrapper: "_wrapper_nkk1l_2",
5
- trigger: "_trigger_nkk1l_8",
6
- "trigger-label": "_trigger-label_nkk1l_47",
7
- chevron: "_chevron_nkk1l_59",
8
- panel: "_panel_nkk1l_79",
9
- "search-row": "_search-row_nkk1l_117",
10
- search: "_search_nkk1l_117",
11
- options: "_options_nkk1l_138",
12
- option: "_option_nkk1l_138",
13
- checkbox: "_checkbox_nkk1l_166",
14
- "no-results": "_no-results_nkk1l_181"
4
+ wrapper: "_wrapper_1r5fv_2",
5
+ trigger: "_trigger_1r5fv_12",
6
+ "trigger-label": "_trigger-label_1r5fv_51",
7
+ chevron: "_chevron_1r5fv_63",
8
+ panel: "_panel_1r5fv_83",
9
+ "search-row": "_search-row_1r5fv_121",
10
+ search: "_search_1r5fv_121",
11
+ options: "_options_1r5fv_142",
12
+ option: "_option_1r5fv_142",
13
+ checkbox: "_checkbox_1r5fv_170",
14
+ "no-results": "_no-results_1r5fv_185"
15
15
  };
16
16
  //#endregion
17
17
  export { e as default };
@@ -1,80 +1,86 @@
1
1
  "use client";
2
2
 
3
3
  import e from "./notification.module.js";
4
- import { Presence as t, cn as n, useSignal 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 { Presence as t, cn as n, normalizeTone as r, useSignal 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/notification/notification.tsx
9
- var u = new Set(["warning", "error"]), d = 160;
10
- function f({ variant: e }) {
11
- return e === "success" ? /* @__PURE__ */ c("svg", {
9
+ var d = {
10
+ neutral: "neutral",
11
+ info: "info",
12
+ success: "success",
13
+ warning: "warning",
14
+ danger: "error"
15
+ }, f = new Set(["warning", "error"]), p = 160;
16
+ function m({ variant: e }) {
17
+ return e === "success" ? /* @__PURE__ */ l("svg", {
12
18
  viewBox: "0 0 20 20",
13
19
  width: "20",
14
20
  height: "20",
15
21
  fill: "none",
16
22
  "aria-hidden": "true",
17
- children: [/* @__PURE__ */ s("circle", {
23
+ children: [/* @__PURE__ */ c("circle", {
18
24
  cx: "10",
19
25
  cy: "10",
20
26
  r: "8",
21
27
  stroke: "currentColor",
22
28
  strokeWidth: "1.5"
23
- }), /* @__PURE__ */ s("path", {
29
+ }), /* @__PURE__ */ c("path", {
24
30
  d: "M6.5 10.5l2.5 2.5 4.5-5",
25
31
  stroke: "currentColor",
26
32
  strokeWidth: "1.5",
27
33
  strokeLinecap: "round",
28
34
  strokeLinejoin: "round"
29
35
  })]
30
- }) : e === "warning" ? /* @__PURE__ */ c("svg", {
36
+ }) : e === "warning" ? /* @__PURE__ */ l("svg", {
31
37
  viewBox: "0 0 20 20",
32
38
  width: "20",
33
39
  height: "20",
34
40
  fill: "none",
35
41
  "aria-hidden": "true",
36
- children: [/* @__PURE__ */ s("path", {
42
+ children: [/* @__PURE__ */ c("path", {
37
43
  d: "M10 2.5L18.5 17H1.5L10 2.5z",
38
44
  stroke: "currentColor",
39
45
  strokeWidth: "1.5",
40
46
  strokeLinejoin: "round"
41
- }), /* @__PURE__ */ s("path", {
47
+ }), /* @__PURE__ */ c("path", {
42
48
  d: "M10 8v3.5M10 14h.01",
43
49
  stroke: "currentColor",
44
50
  strokeWidth: "1.5",
45
51
  strokeLinecap: "round"
46
52
  })]
47
- }) : e === "error" ? /* @__PURE__ */ c("svg", {
53
+ }) : e === "error" ? /* @__PURE__ */ l("svg", {
48
54
  viewBox: "0 0 20 20",
49
55
  width: "20",
50
56
  height: "20",
51
57
  fill: "none",
52
58
  "aria-hidden": "true",
53
- children: [/* @__PURE__ */ s("circle", {
59
+ children: [/* @__PURE__ */ c("circle", {
54
60
  cx: "10",
55
61
  cy: "10",
56
62
  r: "8",
57
63
  stroke: "currentColor",
58
64
  strokeWidth: "1.5"
59
- }), /* @__PURE__ */ s("path", {
65
+ }), /* @__PURE__ */ c("path", {
60
66
  d: "M10 6v4.5M10 13.5h.01",
61
67
  stroke: "currentColor",
62
68
  strokeWidth: "1.5",
63
69
  strokeLinecap: "round"
64
70
  })]
65
- }) : /* @__PURE__ */ c("svg", {
71
+ }) : /* @__PURE__ */ l("svg", {
66
72
  viewBox: "0 0 20 20",
67
73
  width: "20",
68
74
  height: "20",
69
75
  fill: "none",
70
76
  "aria-hidden": "true",
71
- children: [/* @__PURE__ */ s("circle", {
77
+ children: [/* @__PURE__ */ c("circle", {
72
78
  cx: "10",
73
79
  cy: "10",
74
80
  r: "8",
75
81
  stroke: "currentColor",
76
82
  strokeWidth: "1.5"
77
- }), /* @__PURE__ */ s("path", {
83
+ }), /* @__PURE__ */ c("path", {
78
84
  d: "M10 9v5M10 6.5h.01",
79
85
  stroke: "currentColor",
80
86
  strokeWidth: "1.5",
@@ -82,48 +88,48 @@ function f({ variant: e }) {
82
88
  })]
83
89
  });
84
90
  }
85
- function p({ title: p, description: m, variant: h = "info", dismissible: g = !1, onDismiss: _, actions: v, icon: y, labels: b, className: x, ...S }) {
86
- i();
87
- let C = r(!0), w = l(_);
88
- w.current = _;
89
- let T = g || _ !== void 0, E = () => {
90
- C.value = !1, setTimeout(() => w.current?.(), d);
91
+ function h({ title: h, description: g, variant: _ = "info", dismissible: v = !1, onDismiss: y, actions: b, icon: x, labels: S, className: C, ...w }) {
92
+ a();
93
+ let T = d[r(_)] ?? _, E = i(!0), D = u(y);
94
+ D.current = y;
95
+ let O = v || y !== void 0, k = () => {
96
+ E.value = !1, setTimeout(() => D.current?.(), p);
91
97
  };
92
- return /* @__PURE__ */ s(t, {
93
- present: C,
94
- children: /* @__PURE__ */ c("div", {
95
- role: u.has(h) ? "alert" : "status",
96
- "data-variant": h,
97
- className: n(e.notification, x),
98
- ...S,
98
+ return /* @__PURE__ */ c(t, {
99
+ present: E,
100
+ children: /* @__PURE__ */ l("div", {
101
+ role: f.has(T) ? "alert" : "status",
102
+ "data-variant": T,
103
+ className: n(e.notification, C),
104
+ ...w,
99
105
  children: [
100
- /* @__PURE__ */ s("span", {
106
+ /* @__PURE__ */ c("span", {
101
107
  className: e.icon,
102
108
  "aria-hidden": "true",
103
- children: y ?? /* @__PURE__ */ s(f, { variant: h })
109
+ children: x ?? /* @__PURE__ */ c(m, { variant: T })
104
110
  }),
105
- /* @__PURE__ */ c("div", {
111
+ /* @__PURE__ */ l("div", {
106
112
  className: e.body,
107
113
  children: [
108
- /* @__PURE__ */ s("div", {
114
+ /* @__PURE__ */ c("div", {
109
115
  className: e.title,
110
- children: p
116
+ children: h
111
117
  }),
112
- m && /* @__PURE__ */ s("div", {
118
+ g && /* @__PURE__ */ c("div", {
113
119
  className: e.description,
114
- children: m
120
+ children: g
115
121
  }),
116
- v && /* @__PURE__ */ s("div", {
122
+ b && /* @__PURE__ */ c("div", {
117
123
  className: e.actions,
118
- children: v
124
+ children: b
119
125
  })
120
126
  ]
121
127
  }),
122
- T && /* @__PURE__ */ s("button", {
128
+ O && /* @__PURE__ */ c("button", {
123
129
  type: "button",
124
130
  className: e.dismiss,
125
- "aria-label": b?.dismiss ?? o(a.notification.dismiss),
126
- onClick: E,
131
+ "aria-label": S?.dismiss ?? s(o.notification.dismiss),
132
+ onClick: k,
127
133
  children: "✕"
128
134
  })
129
135
  ]
@@ -131,4 +137,4 @@ function p({ title: p, description: m, variant: h = "info", dismissible: g = !1,
131
137
  });
132
138
  }
133
139
  //#endregion
134
- export { p as Notification };
140
+ export { h as Notification };
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
 
3
3
  var e = {
4
- notification: "_notification_10586_2",
5
- icon: "_icon_10586_58",
6
- body: "_body_10586_79",
7
- title: "_title_10586_87",
8
- description: "_description_10586_93",
9
- actions: "_actions_10586_99",
10
- dismiss: "_dismiss_10586_106"
4
+ notification: "_notification_imxvx_2",
5
+ icon: "_icon_imxvx_65",
6
+ body: "_body_imxvx_86",
7
+ title: "_title_imxvx_94",
8
+ description: "_description_imxvx_100",
9
+ actions: "_actions_imxvx_106",
10
+ dismiss: "_dismiss_imxvx_113"
11
11
  };
12
12
  //#endregion
13
13
  export { e as default };
@@ -1,14 +1,14 @@
1
1
  "use client";
2
2
 
3
3
  var e = {
4
- wrapper: "_wrapper_q5e5w_2",
5
- label: "_label_q5e5w_27",
6
- field: "_field_q5e5w_35",
7
- input: "_input_q5e5w_39",
8
- steppers: "_steppers_q5e5w_84",
9
- stepper: "_stepper_q5e5w_84",
10
- error: "_error_q5e5w_131",
11
- hint: "_hint_q5e5w_138"
4
+ wrapper: "_wrapper_aavdw_2",
5
+ label: "_label_aavdw_31",
6
+ field: "_field_aavdw_39",
7
+ input: "_input_aavdw_43",
8
+ steppers: "_steppers_aavdw_88",
9
+ stepper: "_stepper_aavdw_88",
10
+ error: "_error_aavdw_135",
11
+ hint: "_hint_aavdw_142"
12
12
  };
13
13
  //#endregion
14
14
  export { e as default };
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
 
3
3
  var e = {
4
- wrapper: "_wrapper_15f1m_2",
5
- slot: "_slot_15f1m_8"
4
+ wrapper: "_wrapper_k67bx_2",
5
+ slot: "_slot_k67bx_12"
6
6
  };
7
7
  //#endregion
8
8
  export { e as default };
@@ -6,7 +6,12 @@ import { cn as n, useSignals as r } from "@cascivo/core";
6
6
  import { builtin as i, t as a } from "@cascivo/i18n";
7
7
  import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
8
8
  //#region ../components/src/overflow-menu/overflow-menu.tsx
9
- function l() {
9
+ function l(e) {
10
+ let t = e.value ?? e.id;
11
+ if (t === void 0) throw Error(`OverflowMenu: item "${e.label}" has neither \`value\` nor \`id\`. One of them is required — it is what \`onSelect\` receives.`);
12
+ return t;
13
+ }
14
+ function u() {
10
15
  return /* @__PURE__ */ c("svg", {
11
16
  viewBox: "0 0 16 16",
12
17
  width: "16",
@@ -32,12 +37,12 @@ function l() {
32
37
  ]
33
38
  });
34
39
  }
35
- function u({ items: u, onSelect: d, placement: f = "bottom-end", ariaLabel: p, size: m = "md", disabled: h = !1, className: g }) {
40
+ function d({ items: d, onSelect: f, placement: p = "bottom-end", ariaLabel: m, size: h = "md", disabled: g = !1, className: _ }) {
36
41
  r();
37
- let _ = p ?? a(i.overflowMenu.trigger), v = u.map((e) => {
42
+ let v = m ?? a(i.overflowMenu.trigger), y = d.map((e) => {
38
43
  let n = {
39
44
  label: e.label,
40
- value: e.value
45
+ value: l(e)
41
46
  };
42
47
  return e.disabled !== void 0 && (n.disabled = e.disabled), e.destructive ? n.icon = /* @__PURE__ */ c(o, { children: [e.icon, /* @__PURE__ */ s("span", {
43
48
  className: t["destructive-flag"],
@@ -45,21 +50,21 @@ function u({ items: u, onSelect: d, placement: f = "bottom-end", ariaLabel: p, s
45
50
  })] }) : e.icon !== void 0 && (n.icon = e.icon), n;
46
51
  });
47
52
  return /* @__PURE__ */ s("div", {
48
- className: n(t.root, g),
53
+ className: n(t.root, _),
49
54
  children: /* @__PURE__ */ s(e, {
50
- items: v,
51
- onSelect: (e) => d?.(e),
52
- placement: f,
55
+ items: y,
56
+ onSelect: (e) => f?.(e),
57
+ placement: p,
53
58
  trigger: /* @__PURE__ */ s("button", {
54
59
  type: "button",
55
60
  className: t.trigger,
56
- "data-size": m,
57
- disabled: h,
58
- "aria-label": _,
59
- children: /* @__PURE__ */ s(l, {})
61
+ "data-size": h,
62
+ disabled: g,
63
+ "aria-label": v,
64
+ children: /* @__PURE__ */ s(u, {})
60
65
  })
61
66
  })
62
67
  });
63
68
  }
64
69
  //#endregion
65
- export { u as OverflowMenu };
70
+ export { d as OverflowMenu };
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
 
3
3
  var e = {
4
- wrapper: "_wrapper_r2rcd_2",
5
- "input-row": "_input-row_r2rcd_26",
6
- input: "_input_r2rcd_26",
7
- "reveal-btn": "_reveal-btn_r2rcd_68",
8
- "reveal-icon": "_reveal-icon_r2rcd_94",
9
- "strength-meter": "_strength-meter_r2rcd_114",
10
- "strength-segment": "_strength-segment_r2rcd_135"
4
+ wrapper: "_wrapper_19052_2",
5
+ "input-row": "_input-row_19052_30",
6
+ input: "_input_19052_30",
7
+ "reveal-btn": "_reveal-btn_19052_72",
8
+ "reveal-icon": "_reveal-icon_19052_98",
9
+ "strength-meter": "_strength-meter_19052_118",
10
+ "strength-segment": "_strength-segment_19052_139"
11
11
  };
12
12
  //#endregion
13
13
  export { e as default };
@@ -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) => {
@@ -3,14 +3,15 @@
3
3
  import e from "./progress.module.js";
4
4
  import { jsx as t } from "react/jsx-runtime";
5
5
  //#region ../components/src/progress/progress.tsx
6
- function n({ value: n, variant: r = "primary", size: i = "md", className: a, ...o }) {
6
+ function n({ value: n, variant: r = "primary", size: i = "md", className: a, ariaLabel: o, ...s }) {
7
7
  return /* @__PURE__ */ t("progress", {
8
+ "aria-label": s["aria-label"] ?? o,
8
9
  className: [e.progress, a].filter(Boolean).join(" "),
9
10
  "data-variant": r,
10
11
  "data-size": i,
11
12
  value: n,
12
13
  max: n === void 0 ? void 0 : 100,
13
- ...o
14
+ ...s
14
15
  });
15
16
  }
16
17
  //#endregion