@alea-design/ui 0.7.2 → 0.8.1

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 (41) hide show
  1. package/dist/components/button/Button.d.ts +13 -2
  2. package/dist/components/button/Button.js +144 -111
  3. package/dist/components/celebrate/Celebrate.d.ts +31 -0
  4. package/dist/components/celebrate/Celebrate.js +50 -0
  5. package/dist/components/display/Display.d.ts +6 -1
  6. package/dist/components/display/Display.js +64 -63
  7. package/dist/components/feedback/Feedback.js +23 -23
  8. package/dist/components/field/Field.d.ts +15 -2
  9. package/dist/components/field/Field.js +165 -134
  10. package/dist/components/more/More.d.ts +3 -1
  11. package/dist/components/more/More.js +53 -53
  12. package/dist/components/notification/NotificationCenter.js +15 -15
  13. package/dist/components/picker/Picker.d.ts +5 -1
  14. package/dist/components/picker/Picker.js +212 -209
  15. package/dist/components/print/PrintSheet.d.ts +18 -0
  16. package/dist/components/print/PrintSheet.js +14 -0
  17. package/dist/components/shell/AccountFooter.d.ts +31 -0
  18. package/dist/components/shell/AccountFooter.js +43 -0
  19. package/dist/components/shell/AppShell.js +18 -18
  20. package/dist/components/shell/AppSidebar.js +31 -31
  21. package/dist/components/shell/sidebar-context.d.ts +5 -0
  22. package/dist/components/shell/sidebar-context.js +6 -0
  23. package/dist/css/base.css +1 -1
  24. package/dist/css/button.css +1 -1
  25. package/dist/css/celebrate.css +1 -0
  26. package/dist/css/choice.css +1 -1
  27. package/dist/css/display.css +1 -1
  28. package/dist/css/feedback.css +1 -1
  29. package/dist/css/field.css +1 -1
  30. package/dist/css/groups.json +28 -8
  31. package/dist/css/picker.css +1 -1
  32. package/dist/css/print.css +1 -0
  33. package/dist/css/shell.css +1 -1
  34. package/dist/i18n/strings.d.ts +17 -0
  35. package/dist/i18n/strings.js +41 -7
  36. package/dist/index.d.ts +4 -0
  37. package/dist/index.js +276 -267
  38. package/dist/styles.css +1 -1
  39. package/dist/utils/announcer.d.ts +21 -0
  40. package/dist/utils/announcer.js +30 -0
  41. package/package.json +3 -3
@@ -14,9 +14,9 @@ import { DotField as J } from "../../utils/DotField.js";
14
14
  import { SkeletonBlueprint as K } from "../../utils/Blueprint.js";
15
15
  import { inertProps as Q } from "../../utils/inert.js";
16
16
  import { renamed as Y } from "../../utils/vocabulary.js";
17
- function ga({ label: e, showValue: r, size: p = "md", tone: f, striped: l, valuePosition: n = "top", description: h, className: c, ...i }) {
17
+ function ga({ label: e, showValue: r, size: m = "md", tone: f, striped: l, valuePosition: n = "top", description: h, className: c, ...i }) {
18
18
  const o = r ?? (!!e || n === "end");
19
- return /* @__PURE__ */ a($, { ...i, className: C("alea-progress", c), "data-size": p, "data-tone": f, "data-striped": l || void 0, "data-value-position": n !== "top" ? n : void 0, children: ({ percentage: g, valueText: u, isIndeterminate: v }) => /* @__PURE__ */ y(M, { children: [
19
+ return /* @__PURE__ */ a($, { ...i, className: C("alea-progress", c), "data-size": m, "data-tone": f, "data-striped": l || void 0, "data-value-position": n !== "top" ? n : void 0, children: ({ percentage: g, valueText: u, isIndeterminate: v }) => /* @__PURE__ */ y(M, { children: [
20
20
  (e || o && n === "top") && /* @__PURE__ */ y("div", { className: "alea-progress-head", children: [
21
21
  e && /* @__PURE__ */ a(E, { className: "alea-label", children: e }),
22
22
  o && n === "top" && !v && /* @__PURE__ */ a("span", { className: "alea-progress-value", children: u })
@@ -28,8 +28,8 @@ function ga({ label: e, showValue: r, size: p = "md", tone: f, striped: l, value
28
28
  h && /* @__PURE__ */ a("span", { className: "alea-description", children: h })
29
29
  ] }) });
30
30
  }
31
- function va({ size: e = "md", showValue: r, tone: p, thickness: f = 5, children: l, className: n, ...h }) {
32
- return /* @__PURE__ */ a($, { ...h, className: C("alea-progress-circle", n), "data-size": e, "data-tone": p, children: ({ percentage: c = 0, valueText: i, isIndeterminate: o }) => {
31
+ function va({ size: e = "md", showValue: r, tone: m, thickness: f = 5, children: l, className: n, ...h }) {
32
+ return /* @__PURE__ */ a($, { ...h, className: C("alea-progress-circle", n), "data-size": e, "data-tone": m, children: ({ percentage: c = 0, valueText: i, isIndeterminate: o }) => {
33
33
  const g = 24 - f / 2 - 1, u = 2 * Math.PI * g;
34
34
  return /* @__PURE__ */ y(M, { children: [
35
35
  /* @__PURE__ */ y("svg", { viewBox: "0 0 48 48", "aria-hidden": "true", "data-indeterminate": o || void 0, children: [
@@ -40,9 +40,9 @@ function va({ size: e = "md", showValue: r, tone: p, thickness: f = 5, children:
40
40
  ] });
41
41
  } });
42
42
  }
43
- function Na({ label: e, showValue: r = !0, tone: p = "accent", className: f, ...l }) {
43
+ function Na({ label: e, showValue: r = !0, tone: m = "accent", className: f, ...l }) {
44
44
  return /* @__PURE__ */ a(O, { ...l, className: C("alea-progress alea-meter", f), children: ({ percentage: n, valueText: h }) => {
45
- const c = p === "auto" ? n > 90 ? "danger" : n > 70 ? "warning" : "success" : p;
45
+ const c = m === "auto" ? n > 90 ? "danger" : n > 70 ? "warning" : "success" : m;
46
46
  return /* @__PURE__ */ y(M, { children: [
47
47
  (e || r) && /* @__PURE__ */ y("div", { className: "alea-progress-head", children: [
48
48
  e && /* @__PURE__ */ a(E, { className: "alea-label", children: e }),
@@ -52,9 +52,9 @@ function Na({ label: e, showValue: r = !0, tone: p = "accent", className: f, ...
52
52
  ] });
53
53
  } });
54
54
  }
55
- function xa({ shape: e = "text", width: r, height: p, lines: f = 1, isLoaded: l, animation: n, rows: h, cols: c, children: i, className: o, style: g, ...u }) {
55
+ function xa({ shape: e = "text", width: r, height: m, lines: f = 1, isLoaded: l, animation: n, rows: h, cols: c, children: i, className: o, style: g, ...u }) {
56
56
  const v = T();
57
- if (n === "blueprint") return /* @__PURE__ */ a(K, { ...u, shape: e, width: r, height: p, rows: h, isLoaded: l, className: o, style: g, children: i });
57
+ if (n === "blueprint") return /* @__PURE__ */ a(K, { ...u, shape: e, width: r, height: m, rows: h, isLoaded: l, className: o, style: g, children: i });
58
58
  if (n === "matrix") {
59
59
  const N = i != null && i !== !1, { "aria-label": x, ...b } = u, t = h != null || c != null;
60
60
  return /* @__PURE__ */ y(
@@ -67,7 +67,7 @@ function xa({ shape: e = "text", width: r, height: p, lines: f = 1, isLoaded: l,
67
67
  "data-content": N || void 0,
68
68
  "data-sized": t || void 0,
69
69
  "aria-busy": !l,
70
- style: { width: r, ...N ? { minHeight: p } : { height: p ?? (e === "circle" ? r : void 0) }, ...c != null ? { "--alea-dots-cols": c } : null, ...h != null ? { "--alea-dots-rows": h } : null, ...g },
70
+ style: { width: r, ...N ? { minHeight: m } : { height: m ?? (e === "circle" ? r : void 0) }, ...c != null ? { "--alea-dots-cols": c } : null, ...h != null ? { "--alea-dots-rows": h } : null, ...g },
71
71
  children: [
72
72
  /* @__PURE__ */ a(J, { rows: h, cols: c }),
73
73
  N && /* @__PURE__ */ a("span", { className: "alea-skeleton-matrix-content", ...Q(!l), children: i }),
@@ -76,39 +76,39 @@ function xa({ shape: e = "text", width: r, height: p, lines: f = 1, isLoaded: l,
76
76
  }
77
77
  );
78
78
  }
79
- return l ? /* @__PURE__ */ a("span", { className: "alea-skeleton-reveal", children: i }) : e === "text" && f > 1 ? /* @__PURE__ */ a("span", { className: w("alea-skeleton-lines", o), "aria-hidden": "true", children: Array.from({ length: f }, (N, x) => /* @__PURE__ */ a("span", { className: "alea-skeleton", "data-shape": "text", "data-animation": n, style: { width: x === f - 1 ? "60%" : r } }, x)) }) : /* @__PURE__ */ a("span", { ...u, "aria-hidden": "true", className: w("alea-skeleton", o), "data-shape": e, "data-animation": n, style: { width: r, height: p ?? (e === "circle" ? r : void 0), ...g } });
79
+ return l ? /* @__PURE__ */ a("span", { className: "alea-skeleton-reveal", children: i }) : e === "text" && f > 1 ? /* @__PURE__ */ a("span", { className: w("alea-skeleton-lines", o), "aria-hidden": "true", children: Array.from({ length: f }, (N, x) => /* @__PURE__ */ a("span", { className: "alea-skeleton", "data-shape": "text", "data-animation": n, style: { width: x === f - 1 ? "60%" : r } }, x)) }) : /* @__PURE__ */ a("span", { ...u, "aria-hidden": "true", className: w("alea-skeleton", o), "data-shape": e, "data-animation": n, style: { width: r, height: m ?? (e === "circle" ? r : void 0), ...g } });
80
80
  }
81
- const L = { neutral: A, accent: A, info: A, success: H, warning: W, danger: V }, ya = D(function({ tone: r = "info", title: p, children: f, actions: l, onDismiss: n, live: h, hideIcon: c, icon: i, appearance: o, variant: g, size: u, className: v, ...N }, x) {
81
+ const L = { neutral: A, accent: A, info: A, success: H, warning: W, danger: V }, ya = D(function({ tone: r = "info", title: m, children: f, actions: l, onDismiss: n, live: h, hideIcon: c, icon: i, appearance: o, variant: g, size: u, className: v, ...N }, x) {
82
82
  const b = T(), t = Y("Alert", "variant", g, "appearance", o) ?? "soft", s = L[r];
83
83
  return /* @__PURE__ */ y("div", { ref: x, ...N, className: w("alea-alert", v), "data-tone": r, "data-variant": t !== "soft" ? t : void 0, "data-size": u, role: h ? r === "danger" ? "alert" : "status" : N.role, children: [
84
84
  !c && (i ? /* @__PURE__ */ a("span", { className: "alea-alert-icon", "aria-hidden": "true", ...z(r, t === "solid"), children: i }) : /* @__PURE__ */ a(s, { className: "alea-alert-icon", size: u === "sm" ? 16 : 20, "aria-hidden": "true", ...z(r, t === "solid") })),
85
85
  /* @__PURE__ */ y("div", { className: "alea-alert-body", children: [
86
- p && /* @__PURE__ */ a("p", { className: "alea-alert-title", children: p }),
86
+ m && /* @__PURE__ */ a("p", { className: "alea-alert-title", children: m }),
87
87
  f && /* @__PURE__ */ a("div", { className: "alea-alert-text", children: f })
88
88
  ] }),
89
89
  l && /* @__PURE__ */ a("div", { className: "alea-alert-actions", children: l }),
90
90
  n && /* @__PURE__ */ a(X, { "aria-label": b.dismiss, size: "sm", variant: "ghost", onPress: n, className: "alea-alert-x", children: /* @__PURE__ */ a(I, {}) })
91
91
  ] });
92
92
  }), Z = 600, _ = R(null);
93
- function ba({ children: e, placement: r = "bottom-end", motion: p, stacked: f, offset: l, surface: n, radius: h }) {
93
+ function ba({ children: e, placement: r = "bottom-end", motion: m, stacked: f, offset: l, surface: n, radius: h }) {
94
94
  const c = T(), [i, o] = S([]), g = B(1), u = k((t) => o((s) => s.filter((d) => d.id !== t)), []), v = k((t) => {
95
95
  o((s) => s.map((d) => d.id === t ? { ...d, exiting: !0 } : d)), setTimeout(() => u(t), Z);
96
96
  }, [u]), N = k((t) => {
97
97
  const s = g.current++;
98
98
  return o((d) => [...d.slice(-4), { ...t, id: s }]), s;
99
- }, []), x = k((t, s) => o((d) => d.map((m) => m.id === t ? { ...m, ...s, version: (m.version ?? 0) + 1 } : m)), []), b = k((t, s) => {
99
+ }, []), x = k((t, s) => o((d) => d.map((p) => p.id === t ? { ...p, ...s, version: (p.version ?? 0) + 1 } : p)), []), b = k((t, s) => {
100
100
  const d = N({ title: s.loading, isLoading: !0, tone: "neutral" });
101
101
  return t.then(
102
- (m) => x(d, { title: typeof s.success == "function" ? s.success(m) : s.success, tone: "success", isLoading: !1 }),
103
- (m) => x(d, { title: typeof s.error == "function" ? s.error(m) : s.error, tone: "danger", isLoading: !1 })
102
+ (p) => x(d, { title: typeof s.success == "function" ? s.success(p) : s.success, tone: "success", isLoading: !1 }),
103
+ (p) => x(d, { title: typeof s.error == "function" ? s.error(p) : s.error, tone: "danger", isLoading: !1 })
104
104
  ), t;
105
105
  }, [N, x]);
106
106
  return /* @__PURE__ */ y(_.Provider, { value: { show: N, close: v, update: x, promise: b }, children: [
107
107
  e,
108
- /* @__PURE__ */ a("section", { className: "alea-toast-region", hidden: i.length === 0, "data-placement": r, "data-stacked": f || void 0, style: l === void 0 ? void 0 : { "--alea-toast-offset": typeof l == "number" ? `${l / 16}rem` : l }, "aria-label": c.notifications, tabIndex: -1, children: /* @__PURE__ */ a("div", { className: "alea-toast-list", children: i.map((t) => /* @__PURE__ */ a(aa, { item: t, motion: p, surface: n, radius: h, onClose: () => v(t.id), onExited: () => u(t.id) }, t.id)) }) })
108
+ /* @__PURE__ */ a("section", { className: "alea-toast-region", "data-react-aria-top-layer": "true", hidden: i.length === 0, "data-placement": r, "data-stacked": f || void 0, style: l === void 0 ? void 0 : { "--alea-toast-offset": typeof l == "number" ? `${l / 16}rem` : l }, "aria-label": c.notifications, tabIndex: -1, children: /* @__PURE__ */ a("div", { className: "alea-toast-list", children: i.map((t) => /* @__PURE__ */ a(aa, { item: t, motion: m, surface: n, radius: h, onClose: () => v(t.id), onExited: () => u(t.id) }, t.id)) }) })
109
109
  ] });
110
110
  }
111
- function aa({ item: e, onClose: r, onExited: p, motion: f, surface: l, radius: n }) {
111
+ function aa({ item: e, onClose: r, onExited: m, motion: f, surface: l, radius: n }) {
112
112
  const h = T(), c = e.tone || "neutral", i = e.isLoading ? 0 : e.timeout ?? (c === "danger" ? 0 : 5e3), [o, g] = S(!1);
113
113
  j(() => {
114
114
  if (!i || o) return;
@@ -123,13 +123,13 @@ function aa({ item: e, onClose: r, onExited: p, motion: f, surface: l, radius: n
123
123
  if (!s || s.id !== t.pointerId) return;
124
124
  const d = t.clientX - s.x;
125
125
  if (Math.abs(d) < 4) return;
126
- const m = t.currentTarget;
127
- m.setAttribute("data-swiping", ""), (P = m.setPointerCapture) == null || P.call(m, t.pointerId), m.style.setProperty("--alea-swipe-x", `${d}px`), m.style.setProperty("--alea-swipe-n", String(d / 160));
126
+ const p = t.currentTarget;
127
+ p.setAttribute("data-swiping", ""), (P = p.setPointerCapture) == null || P.call(p, t.pointerId), p.style.setProperty("--alea-swipe-x", `${d}px`), p.style.setProperty("--alea-swipe-n", String(d / 160));
128
128
  }, b = (t) => {
129
129
  const s = v.current;
130
130
  if (v.current = null, !s) return;
131
- const d = t.currentTarget, m = t.clientX - s.x, P = Math.abs(m) / Math.max(1, performance.now() - s.t) > 0.6;
132
- d.removeAttribute("data-swiping"), Math.abs(m) > 80 || P && Math.abs(m) > 24 ? r() : (d.style.removeProperty("--alea-swipe-x"), d.style.removeProperty("--alea-swipe-n"));
131
+ const d = t.currentTarget, p = t.clientX - s.x, P = Math.abs(p) / Math.max(1, performance.now() - s.t) > 0.6;
132
+ d.removeAttribute("data-swiping"), Math.abs(p) > 80 || P && Math.abs(p) > 24 ? r() : (d.style.removeProperty("--alea-swipe-x"), d.style.removeProperty("--alea-swipe-n"));
133
133
  };
134
134
  return /* @__PURE__ */ y(
135
135
  "div",
@@ -144,7 +144,7 @@ function aa({ item: e, onClose: r, onExited: p, motion: f, surface: l, radius: n
144
144
  "aria-busy": e.isLoading || void 0,
145
145
  style: { ...G(f), "--alea-toast-ms": `${i}ms` },
146
146
  onAnimationEnd: (t) => {
147
- e.exiting && t.target === t.currentTarget && p();
147
+ e.exiting && t.target === t.currentTarget && m();
148
148
  },
149
149
  onPointerDown: N,
150
150
  onPointerMove: x,
@@ -95,7 +95,20 @@ export interface SearchFieldProps extends Omit<RACSearchFieldProps, 'children'>,
95
95
  }
96
96
  /** A search box with a clear button; Escape clears it too. */
97
97
  export declare function SearchField({ label, description, errorMessage, warningMessage, showOptional, size, variant, labelPosition, placeholder, isLoading, shortcut, className, onClear, ...props }: SearchFieldProps): import("react").JSX.Element;
98
+ /** One rule of a password policy shown under a PasswordField. */
99
+ export interface PasswordRequirement {
100
+ /** A stable name for the rule. */
101
+ id: string;
102
+ /** What the rule asks for ("At least 12 characters"). */
103
+ label: ReactNode;
104
+ /** Checks the rule against what is typed. */
105
+ test?: (value: string) => boolean;
106
+ /** Your own answer, for a rule the field cannot check by itself (one that needs the server, or the account email). It wins over `test`. */
107
+ met?: boolean;
108
+ }
98
109
  export interface PasswordFieldProps extends Omit<TextFieldProps, 'type' | 'suffix' | 'isClearable'> {
110
+ /** The rules of your password policy, listed under the field with a mark for each one that is met (the mark is an icon and a hidden word, never only a color). Screen readers hear what changed after a short pause in typing, not every keystroke. */
111
+ requirements?: PasswordRequirement[];
99
112
  /** Shows a four step strength meter under the field (length, case, digits and symbols). */
100
113
  showStrength?: boolean;
101
114
  /** Your own score from 0 (weak) to 3 (strong), from your own password checker. */
@@ -103,8 +116,8 @@ export interface PasswordFieldProps extends Omit<TextFieldProps, 'type' | 'suffi
103
116
  }
104
117
  /** A rough strength score: length, mixed case, digits and symbols. */
105
118
  export declare function passwordScore(v: string): 0 | 1 | 2 | 3;
106
- /** A password input with a show/hide button and an optional strength meter. */
107
- export declare function PasswordField({ label, showStrength, strength, value, defaultValue, onChange, description, ...props }: PasswordFieldProps): import("react").JSX.Element;
119
+ /** A password input with a show/hide button, an optional strength meter and an optional list of the rules it has to meet. */
120
+ export declare function PasswordField({ label, showStrength, strength, requirements, value, defaultValue, onChange, description, ...props }: PasswordFieldProps): import("react").JSX.Element;
108
121
  export interface NumberFieldProps extends Omit<RACNumberFieldProps, 'children'>, FieldBits {
109
122
  /** Placeholder text. */
110
123
  placeholder?: string;
@@ -1,187 +1,218 @@
1
1
  "use client";
2
- import { jsx as e, jsxs as r, Fragment as j } from "react/jsx-runtime";
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 g, Input as k, SearchField as Y, TextField as L, TextArea as _ } from "react-aria-components";
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
- import { cx as $, withBase as A } from "../../utils/cx.js";
7
- import { useStrings as w } from "../../i18n/strings.js";
8
- import { useControlled as B } from "../../utils/controlled.js";
9
- import { responsiveAttrs as re } from "../../utils/responsive.js";
10
- import { Spinner as ne } from "../feedback/Spinner.js";
11
- import { FieldSpinner as D, loadingAttrs as ce } from "./FieldLoading.js";
12
- function de({ className: a, ...l }) {
13
- return /* @__PURE__ */ e(Q, { ...l, className: $("alea-label", a) });
2
+ import { jsx as e, jsxs as d, Fragment as B } from "react/jsx-runtime";
3
+ import { useState as j, useRef as R, useEffect as X } from "react";
4
+ import { Text as H, FieldError as J, Group as U, Label as K, NumberField as Q, Button as F, Input as D, SearchField as W, TextField as Z, TextArea as Y } from "react-aria-components";
5
+ import { Minus as ee, Plus as ae, ChevronUp as le, ChevronDown as te, EyeOff as ie, Eye as ne, Search as se, X as _, Check as re, Circle as ce } from "lucide-react";
6
+ import { cx as S, withBase as w } from "../../utils/cx.js";
7
+ import { useStrings as y } from "../../i18n/strings.js";
8
+ import { useControlled as V } from "../../utils/controlled.js";
9
+ import { responsiveAttrs as de } from "../../utils/responsive.js";
10
+ import { Spinner as oe } from "../feedback/Spinner.js";
11
+ import { FieldSpinner as I, loadingAttrs as ue } from "./FieldLoading.js";
12
+ function me({ className: a, ...t }) {
13
+ return /* @__PURE__ */ e(K, { ...t, className: S("alea-label", a) });
14
14
  }
15
- function oe({ className: a, ...l }) {
16
- return /* @__PURE__ */ e(J, { ...l, slot: "description", className: $("alea-description", a) });
15
+ function pe({ className: a, ...t }) {
16
+ return /* @__PURE__ */ e(H, { ...t, slot: "description", className: S("alea-description", a) });
17
17
  }
18
- function ue({ className: a, ...l }) {
19
- return /* @__PURE__ */ e(K, { ...l, className: $("alea-field-error", a) });
18
+ function he({ className: a, ...t }) {
19
+ return /* @__PURE__ */ e(J, { ...t, className: S("alea-field-error", a) });
20
20
  }
21
- const R = (a, l, s, i, u) => ({
22
- ...re("size", a, "md"),
23
- "data-variant": l !== "outline" ? l : void 0,
24
- "data-label-position": s !== "top" ? s : void 0,
25
- "data-warning": i ? !0 : void 0,
26
- ...ce(u)
21
+ const A = (a, t, n, l, c) => ({
22
+ ...de("size", a, "md"),
23
+ "data-variant": t !== "outline" ? t : void 0,
24
+ "data-label-position": n !== "top" ? n : void 0,
25
+ "data-warning": l ? !0 : void 0,
26
+ ...ue(c)
27
27
  });
28
- function q({ label: a, showOptional: l, isRequired: s }) {
29
- const i = w();
30
- return a ? /* @__PURE__ */ r(de, { children: [
28
+ function C({ label: a, showOptional: t, isRequired: n }) {
29
+ const l = y();
30
+ return a ? /* @__PURE__ */ d(me, { children: [
31
31
  a,
32
- s && /* @__PURE__ */ e("span", { className: "alea-label-required", "aria-hidden": "true", children: " *" }),
33
- l && !s && /* @__PURE__ */ r("span", { className: "alea-label-optional", children: [
32
+ n && /* @__PURE__ */ e("span", { className: "alea-label-required", "aria-hidden": "true", children: " *" }),
33
+ t && !n && /* @__PURE__ */ d("span", { className: "alea-label-optional", children: [
34
34
  " (",
35
- i.optional,
35
+ l.optional,
36
36
  ")"
37
37
  ] })
38
38
  ] }) : null;
39
39
  }
40
- function E({ description: a, errorMessage: l, warningMessage: s, count: i }) {
41
- const u = w(), n = (i == null ? void 0 : i.max) != null ? i.max - i.n : void 0;
42
- return /* @__PURE__ */ r(j, { children: [
43
- (a || s) && /* @__PURE__ */ r(oe, { children: [
40
+ function E({ description: a, errorMessage: t, warningMessage: n, count: l }) {
41
+ const c = y(), o = (l == null ? void 0 : l.max) != null ? l.max - l.n : void 0;
42
+ return /* @__PURE__ */ d(B, { children: [
43
+ (a || n) && /* @__PURE__ */ d(pe, { children: [
44
44
  a,
45
- s && /* @__PURE__ */ e("span", { className: "alea-field-warning", children: s })
45
+ n && /* @__PURE__ */ e("span", { className: "alea-field-warning", children: n })
46
46
  ] }),
47
- /* @__PURE__ */ e(ue, { children: l }),
48
- i && /* @__PURE__ */ r("span", { className: "alea-field-count", "data-over": n != null && n < 0 ? !0 : void 0, children: [
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 ? u.overLimit(-n) : u.charactersLeft(n) : "" })
47
+ /* @__PURE__ */ e(he, { children: t }),
48
+ l && /* @__PURE__ */ d("span", { className: "alea-field-count", "data-over": o != null && o < 0 ? !0 : void 0, children: [
49
+ /* @__PURE__ */ e("span", { "aria-hidden": "true", children: l.max != null ? `${l.n} / ${l.max}` : l.n }),
50
+ /* @__PURE__ */ e("span", { className: "alea-visually-hidden", "aria-live": "polite", children: o != null && o <= 10 ? o < 0 ? c.overLimit(-o) : c.charactersLeft(o) : "" })
51
51
  ] })
52
52
  ] });
53
53
  }
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
- /* @__PURE__ */ r("div", { className: "alea-input-wrap", children: [
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: () => {
54
+ function fe({ label: a, description: t, errorMessage: n, warningMessage: l, showOptional: c, size: o, variant: f = "outline", labelPosition: v = "top", placeholder: N, prefix: i, suffix: s, addonStart: p, addonEnd: h, isClearable: m, showCount: r, isLoading: u, min: x, max: z, step: g, className: b, value: q, defaultValue: T, onChange: G, ...$ }) {
55
+ const L = y(), [k, M] = V(q, T ?? "", G), O = R(null);
56
+ return /* @__PURE__ */ d(Z, { ...$, value: k, onChange: M, className: w("alea-field", b), ...A(o, f, v, l, u), children: [
57
+ /* @__PURE__ */ e(C, { label: a, showOptional: c, isRequired: $.isRequired }),
58
+ /* @__PURE__ */ d("div", { className: "alea-input-wrap", children: [
59
+ p && /* @__PURE__ */ e("span", { className: "alea-input-addon", "data-side": "start", children: p }),
60
+ i && /* @__PURE__ */ e("span", { className: "alea-input-affix", "data-side": "start", children: i }),
61
+ /* @__PURE__ */ e(D, { ref: O, className: "alea-input", placeholder: N, min: x, max: z, step: g, "aria-busy": u || void 0 }),
62
+ u && /* @__PURE__ */ e(I, {}),
63
+ m && k && !$.isDisabled && !$.isReadOnly && /* @__PURE__ */ e(F, { className: "alea-input-clear alea-focus-ring", "aria-label": L.clear, onPress: () => {
64
64
  var P;
65
- V(""), (P = I.current) == null || P.focus();
66
- }, children: /* @__PURE__ */ e(U, { size: 14 }) }),
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 })
65
+ M(""), (P = O.current) == null || P.focus();
66
+ }, children: /* @__PURE__ */ e(_, { size: 14 }) }),
67
+ s && /* @__PURE__ */ e("span", { className: "alea-input-affix", "data-side": "end", children: s }),
68
+ h && /* @__PURE__ */ e("span", { className: "alea-input-addon", "data-side": "end", children: h })
69
69
  ] }),
70
- /* @__PURE__ */ e(E, { description: l, errorMessage: s, warningMessage: i, count: c ? { n: C.length, max: y.maxLength } : void 0 })
70
+ /* @__PURE__ */ e(E, { description: t, errorMessage: n, warningMessage: l, count: r ? { n: k.length, max: $.maxLength } : void 0 })
71
71
  ] });
72
72
  }
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
- /* @__PURE__ */ r("div", { className: "alea-input-wrap alea-textarea-wrap", children: [
73
+ function Ae({ label: a, description: t, errorMessage: n, warningMessage: l, showOptional: c, size: o, variant: f = "outline", labelPosition: v = "top", placeholder: N, rows: i = 4, autoGrow: s, maxRows: p = 12, resize: h = "vertical", showCount: m, isLoading: r, className: u, value: x, defaultValue: z, onChange: g, ...b }) {
74
+ const [q, T] = V(x, z ?? "", g);
75
+ return /* @__PURE__ */ d(Z, { ...b, value: q, onChange: T, className: w("alea-field", u), ...A(o, f, v, l, r), children: [
76
+ /* @__PURE__ */ e(C, { label: a, showOptional: c, isRequired: b.isRequired }),
77
+ /* @__PURE__ */ d("div", { className: "alea-input-wrap alea-textarea-wrap", children: [
78
78
  /* @__PURE__ */ e(
79
- _,
79
+ Y,
80
80
  {
81
81
  className: "alea-input alea-textarea",
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))` } : {} }
82
+ placeholder: N,
83
+ rows: i,
84
+ "aria-busy": r || void 0,
85
+ "data-autogrow": s || void 0,
86
+ style: { resize: s ? "none" : h, ...s ? { fieldSizing: "content", minBlockSize: `calc(${i} * 1.5em + var(--alea-space-6))`, maxBlockSize: `calc(${p} * 1.5em + var(--alea-space-6))` } : {} }
87
87
  }
88
88
  ),
89
- c && /* @__PURE__ */ e(D, {})
89
+ r && /* @__PURE__ */ e(I, {})
90
90
  ] }),
91
- /* @__PURE__ */ e(E, { description: l, errorMessage: s, warningMessage: i, count: x ? { n: S.length, max: f.maxLength } : void 0 })
91
+ /* @__PURE__ */ e(E, { description: t, errorMessage: n, warningMessage: l, count: m ? { n: q.length, max: b.maxLength } : void 0 })
92
92
  ] });
93
93
  }
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
- /* @__PURE__ */ r("div", { className: "alea-input-wrap", children: [
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;
94
+ function Ce({ label: a, description: t, errorMessage: n, warningMessage: l, showOptional: c, size: o, variant: f = "outline", labelPosition: v = "top", placeholder: N, isLoading: i, shortcut: s, className: p, onClear: h, ...m }) {
95
+ const r = y();
96
+ N ?? (N = r.search);
97
+ const u = R(""), [x, z] = j(null);
98
+ return /* @__PURE__ */ d(W, { ...m, onClear: () => {
99
+ u.current.trim() && z({ id: Date.now(), words: u.current.split(/(\s+)/) }), u.current = "", h == null || h();
100
+ }, className: w("alea-field alea-search-field", p), ...A(o, f, v, l, i), children: [
101
+ /* @__PURE__ */ e(C, { label: a, showOptional: c, isRequired: m.isRequired }),
102
+ /* @__PURE__ */ d("div", { className: "alea-input-wrap", children: [
103
+ /* @__PURE__ */ e("span", { className: "alea-input-affix", "data-side": "start", "aria-hidden": i ? void 0 : !0, children: i ? /* @__PURE__ */ e(oe, { size: "sm", "aria-label": r.searching }) : /* @__PURE__ */ e(se, { size: 16 }) }),
104
+ /* @__PURE__ */ e(D, { className: "alea-input", placeholder: N, "aria-busy": i || void 0, onInput: (g) => {
105
+ u.current = g.target.value;
106
106
  } }),
107
- b && /* @__PURE__ */ e("span", { className: "alea-input-ghost", "aria-hidden": "true", onAnimationEnd: (z) => {
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 }) })
107
+ x && /* @__PURE__ */ e("span", { className: "alea-input-ghost", "aria-hidden": "true", onAnimationEnd: (g) => {
108
+ var b;
109
+ ((b = g.target.parentElement) == null ? void 0 : b.lastElementChild) === g.target && z(null);
110
+ }, children: x.words.map((g, b) => /* @__PURE__ */ e("span", { style: { "--alea-i": b }, children: g }, b)) }, x.id),
111
+ s && /* @__PURE__ */ e("kbd", { className: "alea-input-kbd", "aria-hidden": "true", children: s }),
112
+ /* @__PURE__ */ e(F, { className: "alea-input-clear alea-focus-ring", "aria-label": r.clearSearch, children: /* @__PURE__ */ e(_, { size: 14 }) })
113
113
  ] }),
114
- /* @__PURE__ */ e(E, { description: l, errorMessage: s, warningMessage: i })
114
+ /* @__PURE__ */ e(E, { description: t, errorMessage: n, warningMessage: l })
115
115
  ] });
116
116
  }
117
- function pe(a) {
118
- let l = 0;
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;
117
+ function Ne(a) {
118
+ let t = 0;
119
+ return a.length >= 8 && t++, a.length >= 12 && t++, /[a-z]/.test(a) && /[A-Z]/.test(a) && t++, /\d/.test(a) && t++, /[^A-Za-z0-9]/.test(a) && t++, t <= 1 ? 0 : t === 2 ? 1 : t === 3 ? 2 : 3;
120
120
  }
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;
121
+ const ve = 800;
122
+ function xe({ items: a, value: t }) {
123
+ const n = y(), l = a.map((i) => {
124
+ var s;
125
+ return i.met ?? ((s = i.test) == null ? void 0 : s.call(i, t)) ?? !1;
126
+ }), c = l.map(Number).join(""), o = R(null), f = R(c), [v, N] = j("");
127
+ return X(() => {
128
+ if (c === f.current) return;
129
+ const i = setTimeout(() => {
130
+ const s = f.current;
131
+ f.current = c;
132
+ const p = a.flatMap((m, r) => c[r] !== s[r] ? [r] : []), h = (m) => {
133
+ var r, u;
134
+ return ((u = (r = o.current) == null ? void 0 : r.querySelector(`[data-req="${m}"] .alea-requirement-text`)) == null ? void 0 : u.textContent) ?? "";
135
+ };
136
+ N(p.length <= 2 ? p.map((m) => `${h(m)}: ${c[m] === "1" ? n.requirementMet : n.requirementNotMet}`).join(". ") : n.requirementsMetCount(l.filter(Boolean).length, a.length));
137
+ }, ve);
138
+ return () => clearTimeout(i);
139
+ }, [c]), /* @__PURE__ */ d(B, { children: [
140
+ /* @__PURE__ */ e("span", { ref: o, className: "alea-requirements", role: "list", "aria-label": n.passwordRequirements, children: a.map((i, s) => /* @__PURE__ */ d("span", { role: "listitem", className: "alea-requirement", "data-req": s, "data-met": l[s] || void 0, children: [
141
+ l[s] ? /* @__PURE__ */ e(re, { size: 16, "aria-hidden": "true" }) : /* @__PURE__ */ e(ce, { size: 16, "aria-hidden": "true" }),
142
+ /* @__PURE__ */ e("span", { className: "alea-requirement-text", children: i.label }),
143
+ /* @__PURE__ */ d("span", { className: "alea-visually-hidden", children: [
144
+ ": ",
145
+ l[s] ? n.requirementMet : n.requirementNotMet
146
+ ] })
147
+ ] }, i.id)) }),
148
+ /* @__PURE__ */ e("span", { className: "alea-visually-hidden", role: "status", "aria-live": "polite", children: v })
149
+ ] });
150
+ }
151
+ function Ee({ label: a, showStrength: t, strength: n = Ne, requirements: l, value: c, defaultValue: o, onChange: f, description: v, ...N }) {
152
+ const i = y(), s = a !== void 0;
153
+ a ?? (a = i.password);
154
+ const [p, h] = j(!1), [m, r] = V(c, o ?? "", f), u = m ? n(m) : -1;
125
155
  return /* @__PURE__ */ e(
126
- me,
156
+ fe,
127
157
  {
128
- ...v,
158
+ ...N,
129
159
  label: a,
130
- value: o,
131
- onChange: x,
132
- type: t ? "text" : "password",
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
- /* @__PURE__ */ r("span", { className: "alea-strength-bars", "aria-hidden": "true", children: [
160
+ value: m,
161
+ onChange: r,
162
+ type: p ? "text" : "password",
163
+ autoComplete: N.autoComplete || "current-password",
164
+ description: t && u >= 0 || l != null && l.length ? /* @__PURE__ */ d(B, { children: [
165
+ v,
166
+ t && u >= 0 && /* @__PURE__ */ d("span", { className: "alea-strength", "data-score": u, children: [
167
+ /* @__PURE__ */ d("span", { className: "alea-strength-bars", "aria-hidden": "true", children: [
138
168
  /* @__PURE__ */ e("i", {}),
139
169
  /* @__PURE__ */ e("i", {}),
140
170
  /* @__PURE__ */ e("i", {}),
141
171
  /* @__PURE__ */ e("i", {})
142
172
  ] }),
143
- /* @__PURE__ */ r("span", { "aria-live": "polite", children: [
144
- m.passwordStrength,
173
+ /* @__PURE__ */ d("span", { "aria-live": "polite", children: [
174
+ i.passwordStrength,
145
175
  ": ",
146
- m.strengthLevels[c]
176
+ i.strengthLevels[u]
147
177
  ] })
148
- ] })
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 }) })
178
+ ] }),
179
+ l != null && l.length ? /* @__PURE__ */ e(xe, { items: l, value: m }) : null
180
+ ] }) : v,
181
+ suffix: /* @__PURE__ */ e(F, { className: "alea-input-clear alea-focus-ring", "aria-label": (p ? i.hidePassword : i.showPassword) + (s && typeof a == "string" ? ` (${a})` : ""), "aria-pressed": p, onPress: () => h((x) => !x), children: p ? /* @__PURE__ */ e(ie, { size: 16 }) : /* @__PURE__ */ e(ne, { size: 16 }) })
151
182
  }
152
183
  );
153
184
  }
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 }) })
185
+ function Te({ label: a, description: t, errorMessage: n, warningMessage: l, showOptional: c, size: o, variant: f = "outline", labelPosition: v = "top", placeholder: N, showStepper: i = !0, stepperPosition: s = "sides", prefix: p, suffix: h, align: m, isLoading: r, className: u, ...x }) {
186
+ const z = i && s === "sides";
187
+ return /* @__PURE__ */ d(Q, { ...x, className: w("alea-field", u), ...A(o, f, v, l, r), children: [
188
+ /* @__PURE__ */ e(C, { label: a, showOptional: c, isRequired: x.isRequired }),
189
+ /* @__PURE__ */ d(U, { className: "alea-input-wrap alea-number", "data-stepper": i ? s : void 0, "data-align": m, children: [
190
+ z && /* @__PURE__ */ e(F, { slot: "decrement", className: "alea-stepper alea-focus-ring", children: /* @__PURE__ */ e(ee, { size: 14 }) }),
191
+ p && /* @__PURE__ */ e("span", { className: "alea-input-affix", "data-side": "start", children: p }),
192
+ /* @__PURE__ */ e(D, { className: "alea-input", placeholder: N, "aria-busy": r || void 0 }),
193
+ r && /* @__PURE__ */ e(I, {}),
194
+ h && /* @__PURE__ */ e("span", { className: "alea-input-affix", "data-side": "end", children: h }),
195
+ z && /* @__PURE__ */ e(F, { slot: "increment", className: "alea-stepper alea-focus-ring", children: /* @__PURE__ */ e(ae, { size: 14 }) }),
196
+ i && s === "end" && /* @__PURE__ */ d("span", { className: "alea-stepper-col", children: [
197
+ /* @__PURE__ */ e(F, { slot: "increment", className: "alea-stepper-mini alea-focus-ring", children: /* @__PURE__ */ e(le, { size: 14 }) }),
198
+ /* @__PURE__ */ e(F, { slot: "decrement", className: "alea-stepper-mini alea-focus-ring", children: /* @__PURE__ */ e(te, { size: 14 }) })
168
199
  ] })
169
200
  ] }),
170
- /* @__PURE__ */ e(E, { description: l, errorMessage: s, warningMessage: i })
201
+ /* @__PURE__ */ e(E, { description: t, errorMessage: n, warningMessage: l })
171
202
  ] });
172
203
  }
173
- function Re({ children: a, className: l, ...s }) {
174
- return /* @__PURE__ */ e(G, { ...s, className: $("alea-input-group", l), children: a });
204
+ function ke({ children: a, className: t, ...n }) {
205
+ return /* @__PURE__ */ e(U, { ...n, className: S("alea-input-group", t), children: a });
175
206
  }
176
207
  export {
177
- oe as Description,
178
- ue as FieldError,
179
- Re as InputGroup,
180
- de as Label,
181
- Ae as NumberField,
182
- $e as PasswordField,
183
- Se as SearchField,
184
- we as TextArea,
185
- me as TextField,
186
- pe as passwordScore
208
+ pe as Description,
209
+ he as FieldError,
210
+ ke as InputGroup,
211
+ me as Label,
212
+ Te as NumberField,
213
+ Ee as PasswordField,
214
+ Ce as SearchField,
215
+ Ae as TextArea,
216
+ fe as TextField,
217
+ Ne as passwordScore
187
218
  };
@@ -172,7 +172,9 @@ export interface BannerProps {
172
172
  onDismiss?: () => void;
173
173
  /** Name of the region. Default "Announcement"; give each banner its own when there are several. */
174
174
  'aria-label'?: string;
175
+ /** region (default, a landmark that is not announced), status (announced politely when it appears or changes: a note about something that just happened) or alert (announced at once: only for what needs action now). */
176
+ role?: 'region' | 'status' | 'alert';
175
177
  className?: string;
176
178
  }
177
179
  /** A site-wide announcement bar above the header: launches, sales, outages. */
178
- export declare function Banner({ children, tone, size, action, onDismiss, className, 'aria-label': label }: BannerProps): import("react").JSX.Element | null;
180
+ export declare function Banner({ children, tone, size, action, onDismiss, className, 'aria-label': label, role }: BannerProps): import("react").JSX.Element | null;