@alea-design/ui 0.5.0 → 0.6.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 (100) hide show
  1. package/dist/components/button/Button.d.ts +3 -1
  2. package/dist/components/button/Button.js +64 -63
  3. package/dist/components/card/Card.d.ts +6 -2
  4. package/dist/components/card/Card.js +20 -20
  5. package/dist/components/combobox/Autocomplete.d.ts +4 -0
  6. package/dist/components/combobox/Autocomplete.js +89 -87
  7. package/dist/components/command/CommandPalette.d.ts +10 -0
  8. package/dist/components/command/CommandPalette.js +76 -52
  9. package/dist/components/data/Data.d.ts +6 -4
  10. package/dist/components/data/Data.js +66 -56
  11. package/dist/components/date/Date.d.ts +16 -2
  12. package/dist/components/date/Date.js +80 -69
  13. package/dist/components/display/Display.d.ts +3 -1
  14. package/dist/components/display/Display.js +27 -27
  15. package/dist/components/display/Display2.d.ts +2 -2
  16. package/dist/components/display/Display2.js +28 -27
  17. package/dist/components/feedback/Feedback.d.ts +3 -1
  18. package/dist/components/feedback/Feedback.js +102 -102
  19. package/dist/components/feedback/PageSkeleton.d.ts +19 -0
  20. package/dist/components/feedback/PageSkeleton.js +58 -0
  21. package/dist/components/field/Field.d.ts +3 -1
  22. package/dist/components/field/Field.js +82 -82
  23. package/dist/components/filter/FilterBar.d.ts +5 -2
  24. package/dist/components/filter/FilterBar.js +97 -66
  25. package/dist/components/form/Form.d.ts +8 -2
  26. package/dist/components/form/Form.js +53 -40
  27. package/dist/components/icon/icon-names.d.ts +2 -2
  28. package/dist/components/icon/icon-names.js +4 -2
  29. package/dist/components/list/List.d.ts +6 -2
  30. package/dist/components/list/List.js +65 -62
  31. package/dist/components/list/Lists2.d.ts +4 -0
  32. package/dist/components/list/Lists2.js +35 -35
  33. package/dist/components/media/Media.js +27 -27
  34. package/dist/components/more/More.d.ts +2 -2
  35. package/dist/components/more/More.js +46 -45
  36. package/dist/components/navigation/Navigation.d.ts +7 -5
  37. package/dist/components/navigation/Navigation.js +91 -74
  38. package/dist/components/navigation/Navigation2.d.ts +9 -3
  39. package/dist/components/navigation/Navigation2.js +209 -195
  40. package/dist/components/notification/NotificationCenter.js +70 -70
  41. package/dist/components/overlay/Drawer.d.ts +6 -1
  42. package/dist/components/overlay/Drawer.js +27 -25
  43. package/dist/components/overlay/Modal.d.ts +5 -0
  44. package/dist/components/overlay/Modal.js +16 -15
  45. package/dist/components/overlay/Overlay.d.ts +10 -1
  46. package/dist/components/overlay/Overlay.js +54 -52
  47. package/dist/components/overlay/Sheet.d.ts +2 -0
  48. package/dist/components/overlay/Sheet.js +30 -30
  49. package/dist/components/page/PageParts.js +20 -20
  50. package/dist/components/select/Select.js +75 -70
  51. package/dist/components/settings/Settings.d.ts +29 -0
  52. package/dist/components/settings/Settings.js +31 -0
  53. package/dist/components/shell/AccountMenu.d.ts +20 -0
  54. package/dist/components/shell/AccountMenu.js +32 -0
  55. package/dist/components/shell/AppShell.d.ts +9 -2
  56. package/dist/components/shell/AppShell.js +37 -37
  57. package/dist/components/shell/AppSidebar.d.ts +9 -3
  58. package/dist/components/shell/AppSidebar.js +45 -39
  59. package/dist/components/table/Table.d.ts +18 -4
  60. package/dist/components/table/Table.js +70 -46
  61. package/dist/components/tabs/Tabs.js +105 -94
  62. package/dist/components/theme/Theme.d.ts +7 -4
  63. package/dist/components/theme/Theme.js +127 -130
  64. package/dist/components/upload/Upload.js +62 -54
  65. package/dist/css/base.css +1 -1
  66. package/dist/css/button.css +1 -1
  67. package/dist/css/card.css +1 -1
  68. package/dist/css/command.css +1 -1
  69. package/dist/css/date.css +1 -1
  70. package/dist/css/display.css +1 -1
  71. package/dist/css/feedback.css +1 -1
  72. package/dist/css/field.css +1 -1
  73. package/dist/css/form.css +1 -1
  74. package/dist/css/groups.json +393 -21
  75. package/dist/css/list.css +1 -1
  76. package/dist/css/menu.css +1 -1
  77. package/dist/css/navigation.css +1 -1
  78. package/dist/css/notification.css +1 -1
  79. package/dist/css/overlay.css +1 -1
  80. package/dist/css/page.css +1 -1
  81. package/dist/css/select.css +1 -1
  82. package/dist/css/settings.css +1 -0
  83. package/dist/css/shell.css +1 -1
  84. package/dist/css/table.css +1 -1
  85. package/dist/css/tabs.css +1 -1
  86. package/dist/css/upload.css +1 -1
  87. package/dist/i18n/strings.d.ts +8 -0
  88. package/dist/i18n/strings.js +16 -0
  89. package/dist/index.d.ts +4 -0
  90. package/dist/index.js +318 -306
  91. package/dist/styles.css +1 -1
  92. package/dist/utils/animateRows.d.ts +11 -0
  93. package/dist/utils/animateRows.js +23 -0
  94. package/dist/utils/decimal.d.ts +12 -0
  95. package/dist/utils/decimal.js +48 -0
  96. package/dist/utils/initialFocus.d.ts +6 -0
  97. package/dist/utils/initialFocus.js +24 -0
  98. package/dist/utils/refs.d.ts +2 -0
  99. package/dist/utils/refs.js +14 -6
  100. package/package.json +3 -3
@@ -0,0 +1,58 @@
1
+ "use client";
2
+ import { jsx as e, jsxs as t } from "react/jsx-runtime";
3
+ import { cx as m } from "../../utils/cx.js";
4
+ import { useStrings as w } from "../../i18n/strings.js";
5
+ import { Skeleton as i } from "./Feedback.js";
6
+ function S({ variant: s = "cards", header: o = !0, count: c, animation: p, "aria-label": g, isLoaded: k, children: x, className: d, ...h }) {
7
+ const u = w();
8
+ if (k) return /* @__PURE__ */ e("div", { ...h, className: m("alea-page-skeleton-loaded", d), children: /* @__PURE__ */ e("div", { className: "alea-skeleton-reveal", children: x }) });
9
+ const r = c ?? (s === "cards" ? 6 : 5), a = p, l = Array.from({ length: r }, (n, N) => N);
10
+ return /* @__PURE__ */ t("div", { ...h, className: m("alea-page-skeleton", d), "data-variant": s, "aria-busy": "true", children: [
11
+ /* @__PURE__ */ e("span", { role: "status", className: "alea-visually-hidden", children: g ?? u.loading }),
12
+ o && /* @__PURE__ */ t("div", { className: "alea-page-skeleton-head", "aria-hidden": "true", children: [
13
+ /* @__PURE__ */ e(i, { shape: "text", width: "40%", height: "1.75rem", animation: a }),
14
+ /* @__PURE__ */ e(i, { shape: "text", width: "60%", animation: a })
15
+ ] }),
16
+ s === "cards" && /* @__PURE__ */ e("div", { className: "alea-page-skeleton-cards", "aria-hidden": "true", children: l.map((n) => /* @__PURE__ */ t("div", { className: "alea-page-skeleton-card", children: [
17
+ /* @__PURE__ */ e(i, { shape: "rect", height: "6rem", animation: a }),
18
+ /* @__PURE__ */ e(i, { shape: "text", lines: 2, animation: a })
19
+ ] }, n)) }),
20
+ s === "table" && /* @__PURE__ */ t("div", { className: "alea-page-skeleton-table", "aria-hidden": "true", children: [
21
+ /* @__PURE__ */ t("div", { className: "alea-page-skeleton-row", "data-head": !0, children: [
22
+ /* @__PURE__ */ e(i, { shape: "text", width: "20%", animation: a }),
23
+ /* @__PURE__ */ e(i, { shape: "text", width: "30%", animation: a }),
24
+ /* @__PURE__ */ e(i, { shape: "text", width: "15%", animation: a })
25
+ ] }),
26
+ l.map((n) => /* @__PURE__ */ t("div", { className: "alea-page-skeleton-row", children: [
27
+ /* @__PURE__ */ e(i, { shape: "text", width: "24%", animation: a }),
28
+ /* @__PURE__ */ e(i, { shape: "text", width: "36%", animation: a }),
29
+ /* @__PURE__ */ e(i, { shape: "text", width: "12%", animation: a })
30
+ ] }, n))
31
+ ] }),
32
+ s === "list" && /* @__PURE__ */ e("div", { className: "alea-page-skeleton-list", "aria-hidden": "true", children: l.map((n) => /* @__PURE__ */ t("div", { className: "alea-page-skeleton-item", children: [
33
+ /* @__PURE__ */ e(i, { shape: "circle", width: "2.5rem", animation: a }),
34
+ /* @__PURE__ */ t("div", { className: "alea-page-skeleton-lines", children: [
35
+ /* @__PURE__ */ e(i, { shape: "text", width: "45%", animation: a }),
36
+ /* @__PURE__ */ e(i, { shape: "text", width: "70%", animation: a })
37
+ ] })
38
+ ] }, n)) }),
39
+ s === "detail" && /* @__PURE__ */ t("div", { className: "alea-page-skeleton-detail", "aria-hidden": "true", children: [
40
+ /* @__PURE__ */ e(i, { shape: "rect", height: "12rem", animation: a }),
41
+ /* @__PURE__ */ e(i, { shape: "text", lines: Math.max(2, r - 2), animation: a }),
42
+ /* @__PURE__ */ t("div", { className: "alea-page-skeleton-split", children: [
43
+ /* @__PURE__ */ e(i, { shape: "rect", height: "5rem", animation: a }),
44
+ /* @__PURE__ */ e(i, { shape: "rect", height: "5rem", animation: a })
45
+ ] })
46
+ ] }),
47
+ s === "form" && /* @__PURE__ */ t("div", { className: "alea-page-skeleton-form", "aria-hidden": "true", children: [
48
+ l.map((n) => /* @__PURE__ */ t("div", { className: "alea-page-skeleton-field", children: [
49
+ /* @__PURE__ */ e(i, { shape: "text", width: "25%", animation: a }),
50
+ /* @__PURE__ */ e(i, { shape: "rect", height: "2.75rem", animation: a })
51
+ ] }, n)),
52
+ /* @__PURE__ */ e(i, { shape: "rect", width: "8rem", height: "2.5rem", animation: a })
53
+ ] })
54
+ ] });
55
+ }
56
+ export {
57
+ S as PageSkeleton
58
+ };
@@ -116,11 +116,13 @@ export interface NumberFieldProps extends Omit<RACNumberFieldProps, 'children'>,
116
116
  prefix?: ReactNode;
117
117
  /** Icon or text after the value (a unit). */
118
118
  suffix?: ReactNode;
119
+ /** Where the number sits in the field: center (default with the stepper on the sides), start (default otherwise) or end (amounts and currency, so the digits line up on the right in a column of fields). */
120
+ align?: 'start' | 'center' | 'end';
119
121
  /** Shows a spinner at the end of the number while it is saved or checked. It takes no room, the field stays editable, and screen readers hear it as busy. */
120
122
  isLoading?: boolean;
121
123
  }
122
124
  /** A number input with steppers, min, max, step and locale formatting (currency, percent, units). */
123
- export declare function NumberField({ label, description, errorMessage, warningMessage, showOptional, size, variant, labelPosition, placeholder, showStepper, stepperPosition, prefix, suffix, isLoading, className, ...props }: NumberFieldProps): import("react").JSX.Element;
125
+ export declare function NumberField({ label, description, errorMessage, warningMessage, showOptional, size, variant, labelPosition, placeholder, showStepper, stepperPosition, prefix, suffix, align, isLoading, className, ...props }: NumberFieldProps): import("react").JSX.Element;
124
126
  export interface InputGroupProps {
125
127
  /** Fields, selects and buttons to join into one control, like an amount and its currency, or a search and its button. */
126
128
  children: ReactNode;
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import { jsx as e, jsxs as r, Fragment as j } from "react/jsx-runtime";
3
3
  import { useState as O, useRef as Z } from "react";
4
- import { Text as J, FieldError as K, Group as G, Label as Q, NumberField as W, Button as F, Input as k, SearchField as Y, TextField as L, TextArea as _ } from "react-aria-components";
4
+ import { Text as J, FieldError as K, Group as G, Label as Q, NumberField as W, Button as g, Input as k, SearchField as Y, TextField as L, TextArea as _ } from "react-aria-components";
5
5
  import { Minus as M, Plus as ee, ChevronUp as ae, ChevronDown as le, EyeOff as ie, Eye as se, Search as te, X as U } from "lucide-react";
6
6
  import { cx as $, withBase as A } from "../../utils/cx.js";
7
- import { useStrings as y } from "../../i18n/strings.js";
7
+ import { useStrings as w } from "../../i18n/strings.js";
8
8
  import { useControlled as B } from "../../utils/controlled.js";
9
9
  import { responsiveAttrs as re } from "../../utils/responsive.js";
10
10
  import { Spinner as ne } from "../feedback/Spinner.js";
@@ -12,21 +12,21 @@ import { FieldSpinner as D, loadingAttrs as ce } from "./FieldLoading.js";
12
12
  function de({ className: a, ...l }) {
13
13
  return /* @__PURE__ */ e(Q, { ...l, className: $("alea-label", a) });
14
14
  }
15
- function ue({ className: a, ...l }) {
15
+ function oe({ className: a, ...l }) {
16
16
  return /* @__PURE__ */ e(J, { ...l, slot: "description", className: $("alea-description", a) });
17
17
  }
18
- function oe({ className: a, ...l }) {
18
+ function ue({ className: a, ...l }) {
19
19
  return /* @__PURE__ */ e(K, { ...l, className: $("alea-field-error", a) });
20
20
  }
21
- const R = (a, l, s, i, d) => ({
21
+ const R = (a, l, s, i, u) => ({
22
22
  ...re("size", a, "md"),
23
23
  "data-variant": l !== "outline" ? l : void 0,
24
24
  "data-label-position": s !== "top" ? s : void 0,
25
25
  "data-warning": i ? !0 : void 0,
26
- ...ce(d)
26
+ ...ce(u)
27
27
  });
28
28
  function q({ label: a, showOptional: l, isRequired: s }) {
29
- const i = y();
29
+ const i = w();
30
30
  return a ? /* @__PURE__ */ r(de, { children: [
31
31
  a,
32
32
  s && /* @__PURE__ */ e("span", { className: "alea-label-required", "aria-hidden": "true", children: " *" }),
@@ -38,78 +38,78 @@ function q({ label: a, showOptional: l, isRequired: s }) {
38
38
  ] }) : null;
39
39
  }
40
40
  function E({ description: a, errorMessage: l, warningMessage: s, count: i }) {
41
- const d = y(), n = (i == null ? void 0 : i.max) != null ? i.max - i.n : void 0;
41
+ const u = w(), n = (i == null ? void 0 : i.max) != null ? i.max - i.n : void 0;
42
42
  return /* @__PURE__ */ r(j, { children: [
43
- (a || s) && /* @__PURE__ */ r(ue, { children: [
43
+ (a || s) && /* @__PURE__ */ r(oe, { children: [
44
44
  a,
45
45
  s && /* @__PURE__ */ e("span", { className: "alea-field-warning", children: s })
46
46
  ] }),
47
- /* @__PURE__ */ e(oe, { children: l }),
47
+ /* @__PURE__ */ e(ue, { children: l }),
48
48
  i && /* @__PURE__ */ r("span", { className: "alea-field-count", "data-over": n != null && n < 0 ? !0 : void 0, children: [
49
49
  /* @__PURE__ */ e("span", { "aria-hidden": "true", children: i.max != null ? `${i.n} / ${i.max}` : i.n }),
50
- /* @__PURE__ */ e("span", { className: "alea-visually-hidden", "aria-live": "polite", children: n != null && n <= 10 ? n < 0 ? d.overLimit(-n) : d.charactersLeft(n) : "" })
50
+ /* @__PURE__ */ e("span", { className: "alea-visually-hidden", "aria-live": "polite", children: n != null && n <= 10 ? n < 0 ? u.overLimit(-n) : u.charactersLeft(n) : "" })
51
51
  ] })
52
52
  ] });
53
53
  }
54
- function me({ label: a, description: l, errorMessage: s, warningMessage: i, showOptional: d, size: n, variant: v = "outline", labelPosition: x = "top", placeholder: u, prefix: t, suffix: c, addonStart: m, addonEnd: p, isClearable: o, showCount: h, isLoading: f, min: b, max: g, step: z, className: N, value: S, defaultValue: T, onChange: X, ...w }) {
55
- const H = y(), [C, V] = B(S, T ?? "", X), I = Z(null);
56
- return /* @__PURE__ */ r(L, { ...w, value: C, onChange: V, className: A("alea-field", N), ...R(n, v, x, i, f), children: [
57
- /* @__PURE__ */ e(q, { label: a, showOptional: d, isRequired: w.isRequired }),
54
+ function me({ label: a, description: l, errorMessage: s, warningMessage: i, showOptional: u, size: n, variant: N = "outline", labelPosition: v = "top", placeholder: m, prefix: d, suffix: t, addonStart: h, addonEnd: o, isClearable: x, showCount: c, isLoading: p, min: b, max: F, step: z, className: f, value: S, defaultValue: T, onChange: X, ...y }) {
55
+ const H = w(), [C, V] = B(S, T ?? "", X), I = Z(null);
56
+ return /* @__PURE__ */ r(L, { ...y, value: C, onChange: V, className: A("alea-field", f), ...R(n, N, v, i, p), children: [
57
+ /* @__PURE__ */ e(q, { label: a, showOptional: u, isRequired: y.isRequired }),
58
58
  /* @__PURE__ */ r("div", { className: "alea-input-wrap", children: [
59
- m && /* @__PURE__ */ e("span", { className: "alea-input-addon", "data-side": "start", children: m }),
60
- t && /* @__PURE__ */ e("span", { className: "alea-input-affix", "data-side": "start", children: t }),
61
- /* @__PURE__ */ e(k, { ref: I, className: "alea-input", placeholder: u, min: b, max: g, step: z, "aria-busy": f || void 0 }),
62
- f && /* @__PURE__ */ e(D, {}),
63
- o && C && !w.isDisabled && !w.isReadOnly && /* @__PURE__ */ e(F, { className: "alea-input-clear alea-focus-ring", "aria-label": H.clear, onPress: () => {
59
+ h && /* @__PURE__ */ e("span", { className: "alea-input-addon", "data-side": "start", children: h }),
60
+ d && /* @__PURE__ */ e("span", { className: "alea-input-affix", "data-side": "start", children: d }),
61
+ /* @__PURE__ */ e(k, { ref: I, className: "alea-input", placeholder: m, min: b, max: F, step: z, "aria-busy": p || void 0 }),
62
+ p && /* @__PURE__ */ e(D, {}),
63
+ x && C && !y.isDisabled && !y.isReadOnly && /* @__PURE__ */ e(g, { className: "alea-input-clear alea-focus-ring", "aria-label": H.clear, onPress: () => {
64
64
  var P;
65
65
  V(""), (P = I.current) == null || P.focus();
66
66
  }, children: /* @__PURE__ */ e(U, { size: 14 }) }),
67
- c && /* @__PURE__ */ e("span", { className: "alea-input-affix", "data-side": "end", children: c }),
68
- p && /* @__PURE__ */ e("span", { className: "alea-input-addon", "data-side": "end", children: p })
67
+ t && /* @__PURE__ */ e("span", { className: "alea-input-affix", "data-side": "end", children: t }),
68
+ o && /* @__PURE__ */ e("span", { className: "alea-input-addon", "data-side": "end", children: o })
69
69
  ] }),
70
- /* @__PURE__ */ e(E, { description: l, errorMessage: s, warningMessage: i, count: h ? { n: C.length, max: w.maxLength } : void 0 })
70
+ /* @__PURE__ */ e(E, { description: l, errorMessage: s, warningMessage: i, count: c ? { n: C.length, max: y.maxLength } : void 0 })
71
71
  ] });
72
72
  }
73
- function ye({ label: a, description: l, errorMessage: s, warningMessage: i, showOptional: d, size: n, variant: v = "outline", labelPosition: x = "top", placeholder: u, rows: t = 4, autoGrow: c, maxRows: m = 12, resize: p = "vertical", showCount: o, isLoading: h, className: f, value: b, defaultValue: g, onChange: z, ...N }) {
74
- const [S, T] = B(b, g ?? "", z);
75
- return /* @__PURE__ */ r(L, { ...N, value: S, onChange: T, className: A("alea-field", f), ...R(n, v, x, i, h), children: [
76
- /* @__PURE__ */ e(q, { label: a, showOptional: d, isRequired: N.isRequired }),
73
+ function we({ label: a, description: l, errorMessage: s, warningMessage: i, showOptional: u, size: n, variant: N = "outline", labelPosition: v = "top", placeholder: m, rows: d = 4, autoGrow: t, maxRows: h = 12, resize: o = "vertical", showCount: x, isLoading: c, className: p, value: b, defaultValue: F, onChange: z, ...f }) {
74
+ const [S, T] = B(b, F ?? "", z);
75
+ return /* @__PURE__ */ r(L, { ...f, value: S, onChange: T, className: A("alea-field", p), ...R(n, N, v, i, c), children: [
76
+ /* @__PURE__ */ e(q, { label: a, showOptional: u, isRequired: f.isRequired }),
77
77
  /* @__PURE__ */ r("div", { className: "alea-input-wrap alea-textarea-wrap", children: [
78
78
  /* @__PURE__ */ e(
79
79
  _,
80
80
  {
81
81
  className: "alea-input alea-textarea",
82
- placeholder: u,
83
- rows: t,
84
- "aria-busy": h || void 0,
85
- "data-autogrow": c || void 0,
86
- style: { resize: c ? "none" : p, ...c ? { fieldSizing: "content", minBlockSize: `calc(${t} * 1.5em + var(--alea-space-6))`, maxBlockSize: `calc(${m} * 1.5em + var(--alea-space-6))` } : {} }
82
+ placeholder: m,
83
+ rows: d,
84
+ "aria-busy": c || void 0,
85
+ "data-autogrow": t || void 0,
86
+ style: { resize: t ? "none" : o, ...t ? { fieldSizing: "content", minBlockSize: `calc(${d} * 1.5em + var(--alea-space-6))`, maxBlockSize: `calc(${h} * 1.5em + var(--alea-space-6))` } : {} }
87
87
  }
88
88
  ),
89
- h && /* @__PURE__ */ e(D, {})
89
+ c && /* @__PURE__ */ e(D, {})
90
90
  ] }),
91
- /* @__PURE__ */ e(E, { description: l, errorMessage: s, warningMessage: i, count: o ? { n: S.length, max: N.maxLength } : void 0 })
91
+ /* @__PURE__ */ e(E, { description: l, errorMessage: s, warningMessage: i, count: x ? { n: S.length, max: f.maxLength } : void 0 })
92
92
  ] });
93
93
  }
94
- function Se({ label: a, description: l, errorMessage: s, warningMessage: i, showOptional: d, size: n, variant: v = "outline", labelPosition: x = "top", placeholder: u, isLoading: t, shortcut: c, className: m, onClear: p, ...o }) {
95
- const h = y();
96
- u ?? (u = h.search);
97
- const f = Z(""), [b, g] = O(null);
98
- return /* @__PURE__ */ r(Y, { ...o, onClear: () => {
99
- f.current.trim() && g({ id: Date.now(), words: f.current.split(/(\s+)/) }), f.current = "", p == null || p();
100
- }, className: A("alea-field alea-search-field", m), ...R(n, v, x, i, t), children: [
101
- /* @__PURE__ */ e(q, { label: a, showOptional: d, isRequired: o.isRequired }),
94
+ function Se({ label: a, description: l, errorMessage: s, warningMessage: i, showOptional: u, size: n, variant: N = "outline", labelPosition: v = "top", placeholder: m, isLoading: d, shortcut: t, className: h, onClear: o, ...x }) {
95
+ const c = w();
96
+ m ?? (m = c.search);
97
+ const p = Z(""), [b, F] = O(null);
98
+ return /* @__PURE__ */ r(Y, { ...x, onClear: () => {
99
+ p.current.trim() && F({ id: Date.now(), words: p.current.split(/(\s+)/) }), p.current = "", o == null || o();
100
+ }, className: A("alea-field alea-search-field", h), ...R(n, N, v, i, d), children: [
101
+ /* @__PURE__ */ e(q, { label: a, showOptional: u, isRequired: x.isRequired }),
102
102
  /* @__PURE__ */ r("div", { className: "alea-input-wrap", children: [
103
- /* @__PURE__ */ e("span", { className: "alea-input-affix", "data-side": "start", "aria-hidden": t ? void 0 : !0, children: t ? /* @__PURE__ */ e(ne, { size: "sm", "aria-label": h.searching }) : /* @__PURE__ */ e(te, { size: 16 }) }),
104
- /* @__PURE__ */ e(k, { className: "alea-input", placeholder: u, "aria-busy": t || void 0, onInput: (z) => {
105
- f.current = z.target.value;
103
+ /* @__PURE__ */ e("span", { className: "alea-input-affix", "data-side": "start", "aria-hidden": d ? void 0 : !0, children: d ? /* @__PURE__ */ e(ne, { size: "sm", "aria-label": c.searching }) : /* @__PURE__ */ e(te, { size: 16 }) }),
104
+ /* @__PURE__ */ e(k, { className: "alea-input", placeholder: m, "aria-busy": d || void 0, onInput: (z) => {
105
+ p.current = z.target.value;
106
106
  } }),
107
107
  b && /* @__PURE__ */ e("span", { className: "alea-input-ghost", "aria-hidden": "true", onAnimationEnd: (z) => {
108
- var N;
109
- ((N = z.target.parentElement) == null ? void 0 : N.lastElementChild) === z.target && g(null);
110
- }, children: b.words.map((z, N) => /* @__PURE__ */ e("span", { style: { "--alea-i": N }, children: z }, N)) }, b.id),
111
- c && /* @__PURE__ */ e("kbd", { className: "alea-input-kbd", "aria-hidden": "true", children: c }),
112
- /* @__PURE__ */ e(F, { className: "alea-input-clear alea-focus-ring", "aria-label": h.clearSearch, children: /* @__PURE__ */ e(U, { size: 14 }) })
108
+ var f;
109
+ ((f = z.target.parentElement) == null ? void 0 : f.lastElementChild) === z.target && F(null);
110
+ }, children: b.words.map((z, f) => /* @__PURE__ */ e("span", { style: { "--alea-i": f }, children: z }, f)) }, b.id),
111
+ t && /* @__PURE__ */ e("kbd", { className: "alea-input-kbd", "aria-hidden": "true", children: t }),
112
+ /* @__PURE__ */ e(g, { className: "alea-input-clear alea-focus-ring", "aria-label": c.clearSearch, children: /* @__PURE__ */ e(U, { size: 14 }) })
113
113
  ] }),
114
114
  /* @__PURE__ */ e(E, { description: l, errorMessage: s, warningMessage: i })
115
115
  ] });
@@ -118,22 +118,22 @@ function pe(a) {
118
118
  let l = 0;
119
119
  return a.length >= 8 && l++, a.length >= 12 && l++, /[a-z]/.test(a) && /[A-Z]/.test(a) && l++, /\d/.test(a) && l++, /[^A-Za-z0-9]/.test(a) && l++, l <= 1 ? 0 : l === 2 ? 1 : l === 3 ? 2 : 3;
120
120
  }
121
- function $e({ label: a, showStrength: l, strength: s = pe, value: i, defaultValue: d, onChange: n, description: v, ...x }) {
122
- const u = y();
123
- a ?? (a = u.password);
124
- const [t, c] = O(!1), [m, p] = B(i, d ?? "", n), o = m ? s(m) : -1;
121
+ function $e({ label: a, showStrength: l, strength: s = pe, value: i, defaultValue: u, onChange: n, description: N, ...v }) {
122
+ const m = w(), d = a !== void 0;
123
+ a ?? (a = m.password);
124
+ const [t, h] = O(!1), [o, x] = B(i, u ?? "", n), c = o ? s(o) : -1;
125
125
  return /* @__PURE__ */ e(
126
126
  me,
127
127
  {
128
- ...x,
128
+ ...v,
129
129
  label: a,
130
- value: m,
131
- onChange: p,
130
+ value: o,
131
+ onChange: x,
132
132
  type: t ? "text" : "password",
133
- autoComplete: x.autoComplete || "current-password",
134
- description: l && o >= 0 ? /* @__PURE__ */ r(j, { children: [
135
- v,
136
- /* @__PURE__ */ r("span", { className: "alea-strength", "data-score": o, children: [
133
+ autoComplete: v.autoComplete || "current-password",
134
+ description: l && c >= 0 ? /* @__PURE__ */ r(j, { children: [
135
+ N,
136
+ /* @__PURE__ */ r("span", { className: "alea-strength", "data-score": c, children: [
137
137
  /* @__PURE__ */ r("span", { className: "alea-strength-bars", "aria-hidden": "true", children: [
138
138
  /* @__PURE__ */ e("i", {}),
139
139
  /* @__PURE__ */ e("i", {}),
@@ -141,30 +141,30 @@ function $e({ label: a, showStrength: l, strength: s = pe, value: i, defaultValu
141
141
  /* @__PURE__ */ e("i", {})
142
142
  ] }),
143
143
  /* @__PURE__ */ r("span", { "aria-live": "polite", children: [
144
- u.passwordStrength,
144
+ m.passwordStrength,
145
145
  ": ",
146
- u.strengthLevels[o]
146
+ m.strengthLevels[c]
147
147
  ] })
148
148
  ] })
149
- ] }) : v,
150
- suffix: /* @__PURE__ */ e(F, { className: "alea-input-clear alea-focus-ring", "aria-label": t ? u.hidePassword : u.showPassword, "aria-pressed": t, onPress: () => c((h) => !h), children: t ? /* @__PURE__ */ e(ie, { size: 16 }) : /* @__PURE__ */ e(se, { size: 16 }) })
149
+ ] }) : N,
150
+ suffix: /* @__PURE__ */ e(g, { className: "alea-input-clear alea-focus-ring", "aria-label": (t ? m.hidePassword : m.showPassword) + (d && typeof a == "string" ? ` (${a})` : ""), "aria-pressed": t, onPress: () => h((p) => !p), children: t ? /* @__PURE__ */ e(ie, { size: 16 }) : /* @__PURE__ */ e(se, { size: 16 }) })
151
151
  }
152
152
  );
153
153
  }
154
- function Ae({ label: a, description: l, errorMessage: s, warningMessage: i, showOptional: d, size: n, variant: v = "outline", labelPosition: x = "top", placeholder: u, showStepper: t = !0, stepperPosition: c = "sides", prefix: m, suffix: p, isLoading: o, className: h, ...f }) {
155
- const b = t && c === "sides";
156
- return /* @__PURE__ */ r(W, { ...f, className: A("alea-field", h), ...R(n, v, x, i, o), children: [
157
- /* @__PURE__ */ e(q, { label: a, showOptional: d, isRequired: f.isRequired }),
158
- /* @__PURE__ */ r(G, { className: "alea-input-wrap alea-number", "data-stepper": t ? c : void 0, children: [
159
- b && /* @__PURE__ */ e(F, { slot: "decrement", className: "alea-stepper alea-focus-ring", children: /* @__PURE__ */ e(M, { size: 14 }) }),
160
- m && /* @__PURE__ */ e("span", { className: "alea-input-affix", "data-side": "start", children: m }),
161
- /* @__PURE__ */ e(k, { className: "alea-input", placeholder: u, "aria-busy": o || void 0 }),
162
- o && /* @__PURE__ */ e(D, {}),
163
- p && /* @__PURE__ */ e("span", { className: "alea-input-affix", "data-side": "end", children: p }),
164
- b && /* @__PURE__ */ e(F, { slot: "increment", className: "alea-stepper alea-focus-ring", children: /* @__PURE__ */ e(ee, { size: 14 }) }),
165
- t && c === "end" && /* @__PURE__ */ r("span", { className: "alea-stepper-col", children: [
166
- /* @__PURE__ */ e(F, { slot: "increment", className: "alea-stepper-mini alea-focus-ring", children: /* @__PURE__ */ e(ae, { size: 14 }) }),
167
- /* @__PURE__ */ e(F, { slot: "decrement", className: "alea-stepper-mini alea-focus-ring", children: /* @__PURE__ */ e(le, { size: 14 }) })
154
+ function Ae({ label: a, description: l, errorMessage: s, warningMessage: i, showOptional: u, size: n, variant: N = "outline", labelPosition: v = "top", placeholder: m, showStepper: d = !0, stepperPosition: t = "sides", prefix: h, suffix: o, align: x, isLoading: c, className: p, ...b }) {
155
+ const F = d && t === "sides";
156
+ return /* @__PURE__ */ r(W, { ...b, className: A("alea-field", p), ...R(n, N, v, i, c), children: [
157
+ /* @__PURE__ */ e(q, { label: a, showOptional: u, isRequired: b.isRequired }),
158
+ /* @__PURE__ */ r(G, { className: "alea-input-wrap alea-number", "data-stepper": d ? t : void 0, "data-align": x, children: [
159
+ F && /* @__PURE__ */ e(g, { slot: "decrement", className: "alea-stepper alea-focus-ring", children: /* @__PURE__ */ e(M, { size: 14 }) }),
160
+ h && /* @__PURE__ */ e("span", { className: "alea-input-affix", "data-side": "start", children: h }),
161
+ /* @__PURE__ */ e(k, { className: "alea-input", placeholder: m, "aria-busy": c || void 0 }),
162
+ c && /* @__PURE__ */ e(D, {}),
163
+ o && /* @__PURE__ */ e("span", { className: "alea-input-affix", "data-side": "end", children: o }),
164
+ F && /* @__PURE__ */ e(g, { slot: "increment", className: "alea-stepper alea-focus-ring", children: /* @__PURE__ */ e(ee, { size: 14 }) }),
165
+ d && t === "end" && /* @__PURE__ */ r("span", { className: "alea-stepper-col", children: [
166
+ /* @__PURE__ */ e(g, { slot: "increment", className: "alea-stepper-mini alea-focus-ring", children: /* @__PURE__ */ e(ae, { size: 14 }) }),
167
+ /* @__PURE__ */ e(g, { slot: "decrement", className: "alea-stepper-mini alea-focus-ring", children: /* @__PURE__ */ e(le, { size: 14 }) })
168
168
  ] })
169
169
  ] }),
170
170
  /* @__PURE__ */ e(E, { description: l, errorMessage: s, warningMessage: i })
@@ -174,14 +174,14 @@ function Re({ children: a, className: l, ...s }) {
174
174
  return /* @__PURE__ */ e(G, { ...s, className: $("alea-input-group", l), children: a });
175
175
  }
176
176
  export {
177
- ue as Description,
178
- oe as FieldError,
177
+ oe as Description,
178
+ ue as FieldError,
179
179
  Re as InputGroup,
180
180
  de as Label,
181
181
  Ae as NumberField,
182
182
  $e as PasswordField,
183
183
  Se as SearchField,
184
- ye as TextArea,
184
+ we as TextArea,
185
185
  me as TextField,
186
186
  pe as passwordScore
187
187
  };
@@ -1,14 +1,17 @@
1
1
  import { type ReactNode } from 'react';
2
+ import { type DateRangePreset } from '../date/Date.js';
2
3
  /** A filter people can add: what it filters, and how they pick its value. */
3
4
  export interface FilterDef {
4
5
  id: string;
5
6
  label: string;
6
- /** select: one option; multi: several; text: contains; boolean: on or off. */
7
- type: 'select' | 'multi' | 'text' | 'boolean';
7
+ /** select: one option; multi: several; text: contains; boolean: on or off; date-range: a start and end date, kept as ['2026-01-01', '2026-03-31'] (ISO, start then end). */
8
+ type: 'select' | 'multi' | 'text' | 'boolean' | 'date-range';
8
9
  options?: Array<{
9
10
  id: string;
10
11
  label: string;
11
12
  }>;
13
+ /** With type "date-range": shortcut buttons above the calendar (This month, Last quarter, your fiscal periods). You make them: the bar knows no calendar rules. */
14
+ presets?: DateRangePreset[];
12
15
  icon?: ReactNode;
13
16
  }
14
17
  export type FilterValue = Record<string, string | string[] | boolean | undefined>;
@@ -1,96 +1,127 @@
1
1
  "use client";
2
- import { jsxs as s, jsx as i, Fragment as I } from "react/jsx-runtime";
3
- import { useState as M } from "react";
4
- import { DialogTrigger as K, Button as f } from "react-aria-components";
5
- import { ChevronDown as L, X as O, Plus as k } from "lucide-react";
6
- import { cx as E } from "../../utils/cx.js";
7
- import { useControlled as H } from "../../utils/controlled.js";
8
- import { Button as B } from "../button/Button.js";
9
- import { SearchField as X, TextField as q } from "../field/Field.js";
10
- import { Switch as G } from "../choice/Choice.js";
11
- import { DropdownMenu as J, MenuItem as Q } from "../menu/Menu.js";
12
- import { Popover as R, PopoverDialog as U } from "../overlay/Overlay.js";
13
- import { ListBox as W, SelectItem as Y } from "../select/Select.js";
14
- import { Tabs as Z, TabList as _, Tab as w } from "../tabs/Tabs.js";
15
- import { useStrings as V } from "../../i18n/strings.js";
16
- const u = (r) => Array.isArray(r) ? r.length > 0 : r !== void 0 && r !== "";
17
- function P(r, o) {
18
- if (r.type === "boolean") return o ? "✓" : "✕";
19
- if (r.type === "text") return `“${o}”`;
20
- const d = (Array.isArray(o) ? o : [o]).map((b) => {
21
- var c, m;
22
- return ((m = (c = r.options) == null ? void 0 : c.find((p) => p.id === b)) == null ? void 0 : m.label) ?? b;
2
+ import { jsxs as m, jsx as a, Fragment as R } from "react/jsx-runtime";
3
+ import { useState as U } from "react";
4
+ import { useLocale as k, DialogTrigger as E, Button as j } from "react-aria-components";
5
+ import { DateFormatter as H, parseDate as N } from "@internationalized/date";
6
+ import { ChevronDown as X, X as q, Plus as w } from "lucide-react";
7
+ import { cx as G } from "../../utils/cx.js";
8
+ import { useControlled as J } from "../../utils/controlled.js";
9
+ import { Button as z } from "../button/Button.js";
10
+ import { SearchField as Q, TextField as W } from "../field/Field.js";
11
+ import { Switch as Y } from "../choice/Choice.js";
12
+ import { DropdownMenu as Z, MenuItem as _ } from "../menu/Menu.js";
13
+ import { Popover as V, PopoverDialog as ee } from "../overlay/Overlay.js";
14
+ import { ListBox as ae, SelectItem as le } from "../select/Select.js";
15
+ import { Tabs as ie, TabList as re, Tab as te } from "../tabs/Tabs.js";
16
+ import { RangeCalendar as ne } from "../date/Date.js";
17
+ import { useStrings as se } from "../../i18n/strings.js";
18
+ const v = (t) => Array.isArray(t) ? t.length > 0 : t !== void 0 && t !== "";
19
+ function I(t, n, S) {
20
+ if (t.type === "boolean") return n ? "✓" : "✕";
21
+ if (t.type === "text") return `“${n}”`;
22
+ if (t.type === "date-range") {
23
+ const [s, o] = Array.isArray(n) ? n : [];
24
+ if (!s || !o) return "";
25
+ try {
26
+ const d = new H(S, { dateStyle: "medium" });
27
+ return `${d.format(N(s).toDate("UTC"))} - ${d.format(N(o).toDate("UTC"))}`;
28
+ } catch {
29
+ return `${s} - ${o}`;
30
+ }
31
+ }
32
+ const h = (Array.isArray(n) ? n : [n]).map((s) => {
33
+ var o, d;
34
+ return ((d = (o = t.options) == null ? void 0 : o.find((A) => A.id === s)) == null ? void 0 : d.label) ?? s;
23
35
  });
24
- return d.length > 2 ? `${d.slice(0, 2).join(", ")} +${d.length - 2}` : d.join(", ");
36
+ return h.length > 2 ? `${h.slice(0, 2).join(", ")} +${h.length - 2}` : h.join(", ");
25
37
  }
26
- function ue({ filters: r, value: o, defaultValue: x = {}, onChange: d, search: b, onSearchChange: c, searchPlaceholder: m, views: p, view: T, onViewChange: y, end: S, className: j, "aria-label": C }) {
27
- const a = V(), [n, A] = H(o, x, d), [v, h] = M(null), N = r.filter((e) => u(n[e.id]) || v === e.id), F = r.filter((e) => !N.includes(e)), g = (e, t) => {
28
- const l = { ...n, [e]: t };
29
- u(t) || delete l[e], A(l);
30
- }, D = (e) => {
31
- const t = n[e.id];
32
- return e.type === "boolean" ? /* @__PURE__ */ i(G, { isSelected: !!t, onChange: (l) => g(e.id, l), children: e.label }) : e.type === "text" ? /* @__PURE__ */ i(q, { "aria-label": e.label, autoFocus: !0, defaultValue: t ?? "", onChange: (l) => g(e.id, l), isClearable: !0, size: "sm" }) : /* @__PURE__ */ i(
33
- W,
38
+ function Fe({ filters: t, value: n, defaultValue: S = {}, onChange: C, search: h, onSearchChange: s, searchPlaceholder: o, views: d, view: A, onViewChange: x, end: D, className: L, "aria-label": M }) {
39
+ const i = se(), { locale: $ } = k(), [c, P] = J(n, S, C), [f, u] = U(null), F = t.filter((e) => v(c[e.id]) || f === e.id), T = t.filter((e) => !F.includes(e)), b = (e, r) => {
40
+ const l = { ...c, [e]: r };
41
+ v(r) || delete l[e], P(l);
42
+ }, K = (e) => {
43
+ const r = c[e.id];
44
+ if (e.type === "boolean") return /* @__PURE__ */ a(Y, { isSelected: !!r, onChange: (l) => b(e.id, l), children: e.label });
45
+ if (e.type === "date-range") {
46
+ const [l, g] = Array.isArray(r) ? r : [];
47
+ let y = null;
48
+ try {
49
+ l && g && (y = { start: N(l), end: N(g) });
50
+ } catch {
51
+ y = null;
52
+ }
53
+ return /* @__PURE__ */ m("div", { className: "alea-filter-range", children: [
54
+ e.presets && e.presets.length > 0 && /* @__PURE__ */ a("div", { className: "alea-cal-presets", role: "group", "aria-label": i.dateRangePresets, children: e.presets.map((p, O) => /* @__PURE__ */ a(z, { size: "sm", variant: "soft", onPress: () => {
55
+ const B = p.range();
56
+ b(e.id, [B.start.toString(), B.end.toString()]), u(null);
57
+ }, children: p.label }, p.id ?? (typeof p.label == "string" ? p.label : O))) }),
58
+ /* @__PURE__ */ a(ne, { "aria-label": e.label, value: y, onChange: (p) => {
59
+ b(e.id, [p.start.toString(), p.end.toString()]), u(null);
60
+ } })
61
+ ] });
62
+ }
63
+ return e.type === "text" ? /* @__PURE__ */ a(W, { "aria-label": e.label, autoFocus: !0, defaultValue: r ?? "", onChange: (l) => b(e.id, l), isClearable: !0, size: "sm" }) : /* @__PURE__ */ a(
64
+ ae,
34
65
  {
35
66
  "aria-label": e.label,
36
67
  variant: "plain",
37
68
  maxHeight: 260,
38
69
  selectionMode: e.type === "multi" ? "multiple" : "single",
39
70
  autoFocus: !0,
40
- selectedKeys: Array.isArray(t) ? t : t ? [t] : [],
71
+ selectedKeys: Array.isArray(r) ? r : r ? [r] : [],
41
72
  onSelectionChange: (l) => {
42
- const z = l === "all" ? (e.options || []).map(($) => $.id) : [...l].map(String);
43
- g(e.id, e.type === "multi" ? z : z[0]), e.type === "select" && h(null);
73
+ const g = l === "all" ? (e.options || []).map((y) => y.id) : [...l].map(String);
74
+ b(e.id, e.type === "multi" ? g : g[0]), e.type === "select" && u(null);
44
75
  },
45
76
  items: e.options,
46
- children: (l) => /* @__PURE__ */ i(Y, { id: l.id, children: l.label })
77
+ children: (l) => /* @__PURE__ */ a(le, { id: l.id, children: l.label })
47
78
  }
48
79
  );
49
80
  };
50
- return /* @__PURE__ */ s("div", { className: E("alea-filterbar", j), role: "group", "aria-label": C ?? a.filters, children: [
51
- p && p.length > 0 && /* @__PURE__ */ i(Z, { size: "sm", selectedKey: T, onSelectionChange: (e) => y == null ? void 0 : y(String(e)), children: /* @__PURE__ */ i(_, { "aria-label": a.views, children: p.map((e) => /* @__PURE__ */ i(w, { id: e.id, badge: e.count, children: e.label }, e.id)) }) }),
52
- /* @__PURE__ */ s("div", { className: "alea-filterbar-row", children: [
53
- c && /* @__PURE__ */ i(X, { "aria-label": m ?? a.search, placeholder: m, size: "sm", value: b, onChange: c, className: "alea-filterbar-search" }),
54
- /* @__PURE__ */ i("ul", { className: "alea-filterbar-chips", "aria-label": a.activeFilters, children: N.map((e) => /* @__PURE__ */ s("li", { className: "alea-filter-chip", "data-empty": !u(n[e.id]) || void 0, children: [
55
- /* @__PURE__ */ s(K, { isOpen: v === e.id, onOpenChange: (t) => h(t ? e.id : null), children: [
56
- /* @__PURE__ */ s(f, { className: "alea-filter-chip-main alea-focus-ring", children: [
57
- e.icon && /* @__PURE__ */ i("span", { className: "alea-filter-chip-icon", "aria-hidden": "true", children: e.icon }),
58
- /* @__PURE__ */ s("span", { className: "alea-filter-chip-label", children: [
81
+ return /* @__PURE__ */ m("div", { className: G("alea-filterbar", L), role: "group", "aria-label": M ?? i.filters, children: [
82
+ d && d.length > 0 && /* @__PURE__ */ a(ie, { size: "sm", selectedKey: A, onSelectionChange: (e) => x == null ? void 0 : x(String(e)), children: /* @__PURE__ */ a(re, { "aria-label": i.views, children: d.map((e) => /* @__PURE__ */ a(te, { id: e.id, badge: e.count, children: e.label }, e.id)) }) }),
83
+ /* @__PURE__ */ m("div", { className: "alea-filterbar-row", children: [
84
+ s && /* @__PURE__ */ a(Q, { "aria-label": o ?? i.search, placeholder: o, size: "sm", value: h, onChange: s, className: "alea-filterbar-search" }),
85
+ /* @__PURE__ */ a("ul", { className: "alea-filterbar-chips", "aria-label": i.activeFilters, children: F.map((e) => /* @__PURE__ */ m("li", { className: "alea-filter-chip", "data-empty": !v(c[e.id]) || void 0, children: [
86
+ /* @__PURE__ */ m(E, { isOpen: f === e.id, onOpenChange: (r) => u(r ? e.id : null), children: [
87
+ /* @__PURE__ */ m(j, { className: "alea-filter-chip-main alea-focus-ring", children: [
88
+ e.icon && /* @__PURE__ */ a("span", { className: "alea-filter-chip-icon", "aria-hidden": "true", children: e.icon }),
89
+ /* @__PURE__ */ m("span", { className: "alea-filter-chip-label", children: [
59
90
  e.label,
60
- /* @__PURE__ */ i("span", { className: "alea-visually-hidden", children: ": " })
91
+ /* @__PURE__ */ a("span", { className: "alea-visually-hidden", children: ": " })
61
92
  ] }),
62
- u(n[e.id]) ? /* @__PURE__ */ i("span", { className: "alea-filter-chip-value", children: e.type === "boolean" ? /* @__PURE__ */ s(I, { children: [
63
- /* @__PURE__ */ i("span", { "aria-hidden": "true", children: P(e, n[e.id]) }),
64
- /* @__PURE__ */ i("span", { className: "alea-visually-hidden", children: n[e.id] ? a.on : a.off })
65
- ] }) : P(e, n[e.id]) }) : /* @__PURE__ */ i("span", { className: "alea-visually-hidden", children: a.noValue }),
66
- /* @__PURE__ */ s("span", { className: "alea-visually-hidden", children: [
93
+ v(c[e.id]) ? /* @__PURE__ */ a("span", { className: "alea-filter-chip-value", children: e.type === "boolean" ? /* @__PURE__ */ m(R, { children: [
94
+ /* @__PURE__ */ a("span", { "aria-hidden": "true", children: I(e, c[e.id], $) }),
95
+ /* @__PURE__ */ a("span", { className: "alea-visually-hidden", children: c[e.id] ? i.on : i.off })
96
+ ] }) : I(e, c[e.id], $) }) : /* @__PURE__ */ a("span", { className: "alea-visually-hidden", children: i.noValue }),
97
+ /* @__PURE__ */ m("span", { className: "alea-visually-hidden", children: [
67
98
  ". ",
68
- a.edit
99
+ i.edit
69
100
  ] }),
70
- /* @__PURE__ */ i(L, { size: 14, "aria-hidden": "true" })
101
+ /* @__PURE__ */ a(X, { size: 14, "aria-hidden": "true" })
71
102
  ] }),
72
- /* @__PURE__ */ i(R, { placement: "bottom start", className: "alea-popover alea-filter-popover", children: /* @__PURE__ */ i(U, { title: e.label, children: D(e) }) })
103
+ /* @__PURE__ */ a(V, { placement: "bottom start", className: "alea-popover alea-filter-popover", children: /* @__PURE__ */ a(ee, { title: e.label, children: K(e) }) })
73
104
  ] }),
74
- /* @__PURE__ */ i(f, { className: "alea-filter-chip-remove alea-focus-ring", "aria-label": a.removeItem(e.label), onPress: () => {
75
- g(e.id, void 0), v === e.id && h(null);
76
- }, children: /* @__PURE__ */ i(O, { size: 12, "aria-hidden": "true" }) })
105
+ /* @__PURE__ */ a(j, { className: "alea-filter-chip-remove alea-focus-ring", "aria-label": i.removeItem(e.label), onPress: () => {
106
+ b(e.id, void 0), f === e.id && u(null);
107
+ }, children: /* @__PURE__ */ a(q, { size: 12, "aria-hidden": "true" }) })
77
108
  ] }, e.id)) }),
78
- F.length > 0 && /* @__PURE__ */ i(
79
- J,
109
+ T.length > 0 && /* @__PURE__ */ a(
110
+ Z,
80
111
  {
81
- "aria-label": a.addFilter,
82
- trigger: /* @__PURE__ */ i(B, { size: "sm", variant: "dashed", iconStart: /* @__PURE__ */ i(k, {}), children: a.addFilter }),
83
- menuProps: { onAction: (e) => h(String(e)) },
84
- children: F.map((e) => /* @__PURE__ */ i(Q, { id: e.id, icon: e.icon, children: e.label }, e.id))
112
+ "aria-label": i.addFilter,
113
+ trigger: /* @__PURE__ */ a(z, { size: "sm", variant: "dashed", iconStart: /* @__PURE__ */ a(w, {}), children: i.addFilter }),
114
+ menuProps: { onAction: (e) => u(String(e)) },
115
+ children: T.map((e) => /* @__PURE__ */ a(_, { id: e.id, icon: e.icon, children: e.label }, e.id))
85
116
  }
86
117
  ),
87
- N.some((e) => u(n[e.id])) && /* @__PURE__ */ i(B, { size: "sm", variant: "text", onPress: () => {
88
- A({}), h(null);
89
- }, children: a.clearAll }),
90
- S && /* @__PURE__ */ i("div", { className: "alea-filterbar-end", children: S })
118
+ F.some((e) => v(c[e.id])) && /* @__PURE__ */ a(z, { size: "sm", variant: "text", onPress: () => {
119
+ P({}), u(null);
120
+ }, children: i.clearAll }),
121
+ D && /* @__PURE__ */ a("div", { className: "alea-filterbar-end", children: D })
91
122
  ] })
92
123
  ] });
93
124
  }
94
125
  export {
95
- ue as FilterBar
126
+ Fe as FilterBar
96
127
  };