asma-ui-core 3.103.0 → 3.104.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 (24) hide show
  1. package/dist/asma-ui-core.css +1 -1
  2. package/dist/components/data-display/badge/StyledBadge.js +30 -34
  3. package/dist/components/data-display/virtualized-list/VirtualizedList.js +16 -15
  4. package/dist/components/feedback/dialog/StyledDialog.js +71 -62
  5. package/dist/components/feedback/dialog/StyledDialogTitle.js +25 -14
  6. package/dist/components/feedback/dialog/dialogTitleContext.js +5 -0
  7. package/dist/components/miscellaneous/StyledFormControlLabel.js +14 -14
  8. package/dist/components/navigation/link/StyledLink.js +25 -18
  9. package/dist/components/navigation/link/StyledLink.module.js +6 -5
  10. package/dist/components/navigation/menu/StyledMenu.js +17 -16
  11. package/dist/components/navigation/menu/StyledMenu.module.js +5 -2
  12. package/dist/components/navigation/menu/StyledMenuList.js +35 -30
  13. package/dist/src/components/feedback/dialog/StyledDialog.d.ts +2 -0
  14. package/dist/src/components/feedback/dialog/StyledDialogTitle.d.ts +4 -1
  15. package/dist/src/components/feedback/dialog/dialogTitleContext.d.ts +15 -0
  16. package/dist/src/components/navigation/link/StyledLink.d.ts +3 -2
  17. package/dist/src/table/components/columns/dndHandleColumn.d.ts +2 -1
  18. package/dist/src/table/components/columns/expandColumn.d.ts +1 -1
  19. package/dist/src/table/components/columns/showTextColumn.d.ts +1 -1
  20. package/dist/table/components/columns/dndHandleColumn.js +20 -18
  21. package/dist/table/components/columns/expandColumn.js +15 -15
  22. package/dist/table/components/columns/showTextColumn.js +20 -19
  23. package/dist/table/helpers/injectColumns.js +8 -8
  24. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
- import { resolveSx as g } from "../../../helpers/sx.js";
2
- import y from "clsx";
3
- import { useEffect as Z, useRef as h } from "react";
4
- import { jsx as _, jsxs as G } from "react/jsx-runtime";
5
- var w = {
1
+ import { resolveSx as u } from "../../../helpers/sx.js";
2
+ import b from "clsx";
3
+ import "react";
4
+ import { jsx as x, jsxs as I } from "react/jsx-runtime";
5
+ var v = {
6
6
  primary: {
7
7
  backgroundColor: "var(--colors-badge-background)",
8
8
  color: "var(--colors-badge-label)"
@@ -31,55 +31,51 @@ var w = {
31
31
  backgroundColor: "var(--colors-warning-700)",
32
32
  color: "#fff"
33
33
  }
34
- }, H = {
34
+ }, L = {
35
35
  "top-right": "top-0 right-0 translate-x-1/2 -translate-y-1/2 origin-[100%_0%]",
36
36
  "top-left": "top-0 left-0 -translate-x-1/2 -translate-y-1/2 origin-[0%_0%]",
37
37
  "bottom-right": "bottom-0 right-0 translate-x-1/2 translate-y-1/2 origin-[100%_100%]",
38
38
  "bottom-left": "bottom-0 left-0 -translate-x-1/2 translate-y-1/2 origin-[0%_100%]"
39
- }, S = "& .MuiBadge-badge", P = ({ color: i = "primary", dataTest: k, size: c = "medium", badgeContent: o, max: W, showZero: X, variant: j = "standard", purpose: A = "notification", statusMessage: d, invisible: C, anchorOrigin: f, children: p, className: u, sx: e, overlap: Y, classes: q, slots: F, slotProps: m, component: J, tabIndex: K, "aria-label": a, ...O }) => {
40
- const n = h(null), l = typeof o == "number" ? o : void 0, b = h(l);
41
- Z(() => {
42
- l !== b.current && (b.current = l, n.current && (n.current.textContent = d ?? ""));
43
- }, [l, d]);
44
- const x = e && typeof e == "object" && !Array.isArray(e) ? e : {}, R = g(x[S]), B = g(Object.fromEntries(Object.entries(x).filter(([T]) => T !== S))), r = j === "dot", s = r && A !== "notification", t = p === void 0, v = !!C || !r && (o === 0 || o === void 0 || o === null), D = r ? null : typeof o == "number" && o > 99 ? "99+" : o, E = typeof o == "number" && o > 0 && o < 10, N = f?.vertical ?? "top", $ = f?.horizontal ?? "right", z = i === "primary" && !s ? {
39
+ }, g = "& .MuiBadge-badge", K = ({ color: i = "primary", dataTest: y, size: n = "medium", badgeContent: o, max: T, showZero: Z, variant: h = "standard", purpose: _ = "notification", statusMessage: w, invisible: S, anchorOrigin: c, children: d, className: p, sx: a, overlap: G, classes: H, slots: M, slotProps: m, component: W, tabIndex: X, "aria-label": e, ...k }) => {
40
+ const j = typeof o == "number" ? o : void 0, f = a && typeof a == "object" && !Array.isArray(a) ? a : {}, A = u(f[g]), O = u(Object.fromEntries(Object.entries(f).filter(([z]) => z !== g))), r = h === "dot", l = r && _ !== "notification", t = d === void 0, s = !!S || !r && (o === 0 || o === void 0 || o === null), B = r ? null : typeof o == "number" && o > 99 ? "99+" : o, C = typeof o == "number" && o > 0 && o < 10, D = c?.vertical ?? "top", N = c?.horizontal ?? "right", E = i === "primary" && !l ? {
45
41
  borderColor: r ? "var(--colors-badge-border-dot)" : "var(--colors-badge-border-count)",
46
42
  borderStyle: "solid",
47
43
  borderWidth: r ? "var(--border-badge-dot)" : "var(--border-badge-count)"
48
- } : {}, I = t && !v && a ? {
44
+ } : {}, R = t && !s && e ? {
49
45
  role: "img",
50
- "aria-label": a
51
- } : {}, L = !t && a ? { "aria-label": a } : {};
52
- return /* @__PURE__ */ G("span", {
53
- className: t ? y("inline-flex shrink-0 align-middle", u) : "relative inline-flex shrink-0 align-middle",
54
- "data-testid": k,
55
- style: B,
56
- ...L,
57
- ...I,
58
- ...O,
46
+ "aria-label": e
47
+ } : {}, $ = !t && e ? { "aria-label": e } : {};
48
+ return /* @__PURE__ */ I("span", {
49
+ className: t ? b("inline-flex shrink-0 align-middle", p) : "relative inline-flex shrink-0 align-middle",
50
+ "data-testid": y,
51
+ style: O,
52
+ ...$,
53
+ ...R,
54
+ ...k,
59
55
  children: [
60
- p,
61
- !v && /* @__PURE__ */ _("span", {
56
+ d,
57
+ !s && /* @__PURE__ */ x("span", {
62
58
  "aria-hidden": "true",
63
- className: y("box-border flex items-center justify-center whitespace-nowrap font-roboto font-semibold", !t && "absolute z-[1]", !t && H[`${N}-${$}`], s ? "h-[8px] w-[8px] min-w-[8px] rounded-full p-0" : r ? "h-[12px] w-[12px] min-w-[12px] rounded-full p-0" : c === "small" ? "h-[16px] w-max min-w-[16px] rounded-[20px] px-[4px] text-[0.75rem]" : "h-[20px] min-w-[20px] rounded-[20px] px-[6px] text-sm leading-5", !r && c === "medium" && E && "w-[20px]", !t && u, m?.badge?.className),
59
+ className: b("box-border flex items-center justify-center whitespace-nowrap font-roboto font-semibold", !t && "absolute z-[1]", !t && L[`${D}-${N}`], l ? "h-[8px] w-[8px] min-w-[8px] rounded-full p-0" : r ? "h-[12px] w-[12px] min-w-[12px] rounded-full p-0" : n === "small" ? "h-[16px] w-max min-w-[16px] rounded-[20px] px-[4px] text-[0.75rem]" : "h-[20px] min-w-[20px] rounded-[20px] px-[6px] text-sm leading-5", !r && n === "medium" && C && "w-[20px]", !t && p, m?.badge?.className),
64
60
  style: {
65
- ...w[i] ?? w.default,
66
- ...s ? { backgroundColor: "var(--colors-gama-500)" } : {},
67
- ...z,
68
- ...R,
61
+ ...v[i] ?? v.default,
62
+ ...l ? { backgroundColor: "var(--colors-gama-500)" } : {},
63
+ ...E,
64
+ ...A,
69
65
  ...m?.badge?.style
70
66
  },
71
- children: D
67
+ children: B
72
68
  }),
73
- /* @__PURE__ */ _("span", {
74
- ref: n,
69
+ /* @__PURE__ */ x("span", {
75
70
  "aria-atomic": "true",
76
71
  "aria-live": "polite",
77
72
  className: "sr-only",
78
- role: "status"
73
+ role: "status",
74
+ children: s || j === void 0 ? "" : w ?? ""
79
75
  })
80
76
  ]
81
77
  });
82
78
  };
83
79
  export {
84
- P as StyledBadge
80
+ K as StyledBadge
85
81
  };
@@ -1,29 +1,30 @@
1
1
  import { useRef as m } from "react";
2
- import { Fragment as g, jsx as t } from "react/jsx-runtime";
3
- import { useVirtualizer as h } from "@tanstack/react-virtual";
4
- function v({ className: a, dataTest: o, emptyState: i, estimatedItemHeight: d = 48, getItemKey: u, items: r, overscan: c = 8, renderItem: f }) {
5
- const s = m(null), l = h({
2
+ import { Fragment as x, jsx as t } from "react/jsx-runtime";
3
+ import { useVirtualizer as g } from "@tanstack/react-virtual";
4
+ function v({ className: s, dataTest: o, emptyState: i, estimatedItemHeight: d = 48, getItemKey: u, items: r, overscan: c = 8, renderItem: f }) {
5
+ const a = m(null), n = g({
6
6
  count: r.length,
7
7
  estimateSize: () => d,
8
- getScrollElement: () => s.current,
8
+ getScrollElement: () => a.current,
9
9
  overscan: c
10
10
  });
11
- return r.length === 0 ? i === void 0 ? null : /* @__PURE__ */ t(g, { children: i }) : /* @__PURE__ */ t("div", {
12
- className: a,
11
+ return r.length === 0 ? i === void 0 ? null : /* @__PURE__ */ t(x, { children: i }) : /* @__PURE__ */ t("div", {
12
+ className: s,
13
13
  "data-testid": o,
14
- ref: s,
14
+ ref: a,
15
+ tabIndex: 0,
15
16
  children: /* @__PURE__ */ t("div", {
16
17
  className: "relative w-full",
17
- style: { height: l.getTotalSize() },
18
- children: l.getVirtualItems().map((e) => {
19
- const n = r[e.index];
20
- return n === void 0 ? null : /* @__PURE__ */ t("div", {
18
+ style: { height: n.getTotalSize() },
19
+ children: n.getVirtualItems().map((e) => {
20
+ const l = r[e.index];
21
+ return l === void 0 ? null : /* @__PURE__ */ t("div", {
21
22
  className: "absolute left-0 top-0 w-full",
22
23
  "data-index": e.index,
23
- ref: l.measureElement,
24
+ ref: n.measureElement,
24
25
  style: { transform: `translateY(${e.start}px)` },
25
- children: f(n, e.index)
26
- }, u(n, e.index));
26
+ children: f(l, e.index)
27
+ }, u(l, e.index));
27
28
  })
28
29
  })
29
30
  });
@@ -1,117 +1,123 @@
1
1
  import { cn as h } from "../../../helpers/cn.js";
2
- import { resolveSx as S } from "../../../helpers/sx.js";
3
- import { CloseIcon as X } from "../../icons/close-icon/CloseIcon.js";
4
- import { registerOpenModalDialog as B } from "../../../hooks/useTopLayer.hook.js";
5
- import { StyledButton as G } from "../../inputs/button/StyledButton.js";
6
- import { useMobileMediaQuery as Q } from "../../../hooks/useMediaQuery.hook.js";
7
- import $ from "./StyledDialog.module.js";
8
- import { useEffect as w, useLayoutEffect as J, useRef as a } from "react";
9
- import { jsx as r, jsxs as l } from "react/jsx-runtime";
10
- var U = {
2
+ import { resolveSx as D } from "../../../helpers/sx.js";
3
+ import { CloseIcon as J } from "../../icons/close-icon/CloseIcon.js";
4
+ import { registerOpenModalDialog as U } from "../../../hooks/useTopLayer.hook.js";
5
+ import { StyledButton as V } from "../../inputs/button/StyledButton.js";
6
+ import { useMobileMediaQuery as Y } from "../../../hooks/useMediaQuery.hook.js";
7
+ import Z from "./StyledDialog.module.js";
8
+ import { StyledDialogTitleContext as ee } from "./dialogTitleContext.js";
9
+ import { useEffect as w, useId as te, useLayoutEffect as le, useMemo as ne, useRef as s, useState as re } from "react";
10
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
11
+ var oe = {
11
12
  xs: 444,
12
13
  sm: 600,
13
14
  md: 900,
14
15
  lg: 1200,
15
16
  xl: 1536
16
- }, oe = ({ open: t, onClose: c, children: C, dataTest: d, maxWidth: y = "sm", fullWidth: D, fullScreen: H, scroll: _ = "paper", disableEscapeKeyDown: M, className: j, style: O, sx: R, classes: v, PaperProps: W, slotProps: o, onCloseText: b, showCloseIcon: g = !0, dialogLabel: s, dialogTitle: m, dialogHeaderNode: I }) => {
17
- const z = Q(), u = a(null), f = a(null), p = a(!1), k = a(t), i = H ?? z;
17
+ }, he = ({ open: t, onClose: c, children: I, dataTest: y, maxWidth: v = "sm", fullWidth: H, fullScreen: M, scroll: _ = "paper", disableEscapeKeyDown: j, className: O, style: R, sx: W, classes: b, PaperProps: z, slotProps: o, onCloseText: g, showCloseIcon: k = !0, dialogLabel: m, dialogTitle: i, ariaLabel: L, dialogHeaderNode: P }) => {
18
+ const d = te(), [q, A] = re(), B = ne(() => ({
19
+ titleId: d,
20
+ setTitleId: A
21
+ }), [d]), E = i ? d : q, F = Y(), u = s(null), f = s(null), x = s(!1), C = s(t), a = M ?? F;
18
22
  w(() => {
19
- k.current && !t && o?.transition?.onExited?.(), k.current = t;
20
- }, [t, o]), J(() => {
23
+ C.current && !t && o?.transition?.onExited?.(), C.current = t;
24
+ }, [t, o]), le(() => {
21
25
  const e = u.current;
22
26
  if (!e || !t) return;
23
27
  e.open || (f.current = document.activeElement instanceof HTMLElement ? document.activeElement : null, e.showModal(), e.focus({ preventScroll: !0 }), requestAnimationFrame(() => e.open && e.focus({ preventScroll: !0 })));
24
- const n = B(e);
28
+ const l = U(e);
25
29
  return () => {
26
- n(), f.current?.isConnected && f.current.focus({ preventScroll: !0 });
30
+ l(), f.current?.isConnected && f.current.focus({ preventScroll: !0 });
27
31
  };
28
32
  }, [t]), w(() => {
29
33
  if (!t) return;
30
- const e = document.body.style.overflow, n = document.documentElement.style.overflow;
34
+ const e = document.body.style.overflow, l = document.documentElement.style.overflow;
31
35
  return document.body.style.overflow = "hidden", document.documentElement.style.overflow = "hidden", () => {
32
- document.body.style.overflow = e, document.documentElement.style.overflow = n;
36
+ document.body.style.overflow = e, document.documentElement.style.overflow = l;
33
37
  };
34
38
  }, [t]);
35
- const x = {
36
- ...W,
39
+ const p = {
40
+ ...z,
37
41
  ...o?.paper
38
- }, E = y === !1 ? void 0 : U[y], { className: L, style: q, onClick: A, ...F } = o?.backdrop ?? {}, K = (e) => {
39
- p.current || (p.current = !0, window.setTimeout(() => {
40
- p.current = !1;
42
+ }, N = v === !1 ? void 0 : oe[v], { className: K, style: T, onClick: X, ...G } = o?.backdrop ?? {}, Q = (e) => {
43
+ x.current || (x.current = !0, window.setTimeout(() => {
44
+ x.current = !1;
41
45
  }, 0), c?.(e, "escapeKeyDown"));
42
- }, P = (e) => {
46
+ }, $ = (e) => {
43
47
  e.preventDefault();
44
48
  };
45
49
  return w(() => {
46
- if (!t || M) return;
47
- const e = (n) => {
48
- if (n.key !== "Escape" || n.defaultPrevented) return;
49
- const N = document.activeElement;
50
- N instanceof Element && N.closest("dialog[open]") !== u.current || K(n);
50
+ if (!t || j) return;
51
+ const e = (l) => {
52
+ if (l.key !== "Escape" || l.defaultPrevented) return;
53
+ const S = document.activeElement;
54
+ S instanceof Element && S.closest("dialog[open]") !== u.current || Q(l);
51
55
  };
52
56
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
53
- }), t ? /* @__PURE__ */ l("dialog", {
57
+ }), t ? /* @__PURE__ */ r("dialog", {
54
58
  ref: u,
55
59
  tabIndex: -1,
56
- "data-testid": d,
57
- "aria-label": d,
58
- onCancel: P,
59
- className: h($.StyledDialog, "fixed inset-0 m-0 h-full max-h-none w-full max-w-none items-center justify-center overflow-hidden border-0 bg-transparent p-0 outline-none open:flex", _ === "body" && "overflow-y-auto", j, v?.root),
60
+ "data-testid": y,
61
+ "aria-labelledby": E,
62
+ "aria-label": E ? void 0 : L,
63
+ onCancel: $,
64
+ className: h(Z.StyledDialog, "fixed inset-0 m-0 h-full max-h-none w-full max-w-none items-center justify-center overflow-hidden border-0 bg-transparent p-0 outline-none open:flex", _ === "body" && "overflow-y-auto", O, b?.root),
60
65
  style: {
61
66
  zIndex: 999,
62
- ...S(R),
63
- ...O
67
+ ...D(W),
68
+ ...R
64
69
  },
65
- children: [/* @__PURE__ */ r("div", {
66
- ...F,
67
- className: h("absolute inset-0 bg-[#626e7eb2]", L),
68
- style: q,
70
+ children: [/* @__PURE__ */ n("div", {
71
+ ...G,
72
+ className: h("absolute inset-0 bg-[#626e7eb2]", K),
73
+ style: T,
69
74
  onClick: (e) => {
70
- A?.(e), e.defaultPrevented || c?.(e, "backdropClick");
75
+ X?.(e), e.defaultPrevented || c?.(e, "backdropClick");
71
76
  }
72
- }), /* @__PURE__ */ l("div", {
73
- className: h("relative z-[1] flex flex-col overflow-hidden rounded-lg border-0 bg-white p-0 text-delta-800 shadow-[0px_4px_40px_0px_#22213366]", i && "rounded-none", x.className, v?.paper),
77
+ }), /* @__PURE__ */ r("div", {
78
+ className: h("relative z-[1] flex flex-col overflow-hidden rounded-lg border-0 bg-white p-0 text-delta-800 shadow-[0px_4px_40px_0px_#22213366]", a && "rounded-none", p.className, b?.paper),
74
79
  style: {
75
80
  minWidth: 0,
76
81
  minHeight: 0,
77
- ...!i && E ? { maxWidth: E } : {},
78
- ...i ? {
82
+ ...!a && N ? { maxWidth: N } : {},
83
+ ...a ? {
79
84
  width: "100%",
80
85
  maxWidth: "100%",
81
86
  height: "100%",
82
87
  maxHeight: "100%"
83
88
  } : {
84
- width: D ? "calc(100% - 64px)" : "auto",
89
+ width: H ? "calc(100% - 64px)" : "auto",
85
90
  maxHeight: "100%"
86
91
  },
87
- ...S(x.sx),
88
- ...x.style,
89
- ...i ? {
92
+ ...D(p.sx),
93
+ ...p.style,
94
+ ...a ? {
90
95
  width: "100%",
91
96
  maxWidth: "100%",
92
97
  height: "100%",
93
98
  maxHeight: "100%"
94
99
  } : { maxHeight: "calc(100% - 64px)" }
95
100
  },
96
- children: [(!!s || !!m || g) && /* @__PURE__ */ l("div", {
101
+ children: [(!!m || !!i || k) && /* @__PURE__ */ r("div", {
97
102
  className: "box-border flex w-full min-w-0 max-w-full justify-between px-4 pt-4",
98
- children: [/* @__PURE__ */ l("div", {
103
+ children: [/* @__PURE__ */ r("div", {
99
104
  className: "flex min-w-0 flex-1 flex-col justify-start gap-0.5",
100
- children: [s && /* @__PURE__ */ r("div", {
105
+ children: [m && /* @__PURE__ */ n("div", {
101
106
  className: "flex h-8 items-center text-sm font-normal leading-5 text-delta-600",
102
- children: s
103
- }), m && /* @__PURE__ */ r("div", {
104
- className: "flex text-2xl font-semibold leading-8 text-delta-800",
105
107
  children: m
108
+ }), i && /* @__PURE__ */ n("div", {
109
+ id: d,
110
+ className: "flex text-2xl font-semibold leading-8 text-delta-800",
111
+ children: i
106
112
  })]
107
- }), g && /* @__PURE__ */ l("div", {
113
+ }), k && /* @__PURE__ */ r("div", {
108
114
  className: "flex min-w-0 max-w-full shrink-0 justify-end gap-2",
109
- children: [I, /* @__PURE__ */ r(G, {
110
- dataTest: `close-button-${d}`,
111
- "aria-label": b ? void 0 : "Close",
115
+ children: [P, /* @__PURE__ */ n(V, {
116
+ dataTest: `close-button-${y}`,
117
+ "aria-label": g ? void 0 : "Close",
112
118
  variant: "textGray",
113
119
  size: "small",
114
- endIcon: /* @__PURE__ */ r(X, {
120
+ endIcon: /* @__PURE__ */ n(J, {
115
121
  width: 20,
116
122
  height: 20
117
123
  }),
@@ -122,13 +128,16 @@ var U = {
122
128
  paddingRight: "6px",
123
129
  paddingLeft: "6px"
124
130
  },
125
- children: b
131
+ children: g
126
132
  })]
127
133
  })]
128
- }), C]
134
+ }), /* @__PURE__ */ n(ee.Provider, {
135
+ value: B,
136
+ children: I
137
+ })]
129
138
  })]
130
139
  }) : null;
131
140
  };
132
141
  export {
133
- oe as StyledDialog
142
+ he as StyledDialog
134
143
  };
@@ -1,20 +1,31 @@
1
- import { resolveSx as a } from "../../../helpers/sx.js";
2
- import i from "clsx";
3
- import { jsx as m } from "react/jsx-runtime";
4
- var n = ({ children: t, className: e, sx: l, style: s, classes: x, ...o }) => {
5
- if (!t) return null;
6
- const r = {
7
- ...a(l),
8
- ...s
1
+ import { resolveSx as n } from "../../../helpers/sx.js";
2
+ import { StyledDialogTitleContext as x } from "./dialogTitleContext.js";
3
+ import f from "clsx";
4
+ import { useContext as p, useLayoutEffect as u } from "react";
5
+ import { jsx as c } from "react/jsx-runtime";
6
+ var v = ({ children: e, className: s, sx: i, style: r, id: d, classes: g, ...a }) => {
7
+ const t = p(x), l = !!e, o = d ?? t?.titleId;
8
+ if (u(() => {
9
+ if (!(!l || !t))
10
+ return t.setTitleId(o), () => t.setTitleId(void 0);
11
+ }, [
12
+ l,
13
+ t,
14
+ o
15
+ ]), !e) return null;
16
+ const m = {
17
+ ...n(i),
18
+ ...r
9
19
  };
10
- return /* @__PURE__ */ m("h2", {
20
+ return /* @__PURE__ */ c("h2", {
11
21
  "data-testid": "styled-dialog-title",
12
- className: i("mx-3 p-4 text-[20px] font-semibold leading-[20px]", e),
13
- style: r,
14
- ...o,
15
- children: t
22
+ id: o,
23
+ className: f("mx-3 p-4 text-[20px] font-semibold leading-[20px]", s),
24
+ style: m,
25
+ ...a,
26
+ children: e
16
27
  });
17
28
  };
18
29
  export {
19
- n as StyledDialogTitle
30
+ v as StyledDialogTitle
20
31
  };
@@ -0,0 +1,5 @@
1
+ import { createContext as t } from "react";
2
+ var o = t(null);
3
+ export {
4
+ o as StyledDialogTitleContext
5
+ };
@@ -1,34 +1,34 @@
1
1
  import { cn as o } from "../../helpers/cn.js";
2
- import { resolveSx as h } from "../../helpers/sx.js";
3
- import { cloneElement as g, isValidElement as t, useId as C } from "react";
4
- import { jsx as y, jsxs as A } from "react/jsx-runtime";
2
+ import { resolveSx as g } from "../../helpers/sx.js";
3
+ import { cloneElement as y, isValidElement as s, useId as C } from "react";
4
+ import { jsx as L, jsxs as A } from "react/jsx-runtime";
5
5
  var E = {
6
6
  end: "flex-row",
7
7
  start: "flex-row-reverse",
8
8
  top: "flex-col-reverse",
9
9
  bottom: "flex-col"
10
- }, k = ({ control: l, label: a, checked: i, disabled: d, name: m, value: c, labelPlacement: b = "end", className: f, sx: x, onChange: p }) => {
11
- const e = t(l) ? l.props : {}, s = d ?? e.disabled ?? !1, r = C(), u = e["aria-label"] != null || e["aria-labelledby"] != null, n = t(l) && a != null && !u, v = t(l) ? g(l, {
10
+ }, w = ({ control: l, label: a, checked: i, disabled: d, name: m, value: c, labelPlacement: f = "end", className: x, sx: p, onChange: b }) => {
11
+ const e = s(l) ? l.props : {}, t = d ?? e.disabled ?? !1, n = C(), u = e["aria-label"] != null || e["aria-labelledby"] != null, h = typeof a == "string" ? a.trim().length > 0 : a != null, r = s(l) && h && !u, v = s(l) ? y(l, {
12
12
  checked: e.checked ?? i,
13
- onChange: e.onChange ?? p,
14
- disabled: s,
13
+ onChange: e.onChange ?? b,
14
+ disabled: t,
15
15
  name: e.name ?? m,
16
16
  value: e.value ?? c,
17
- ...n ? { "aria-labelledby": r } : {}
17
+ ...r ? { "aria-labelledby": n } : {}
18
18
  }) : l;
19
19
  return /* @__PURE__ */ A("label", {
20
- className: o("m-0 inline-flex items-center gap-2 align-middle text-delta-800", s ? "cursor-default" : "cursor-pointer", E[b], f),
20
+ className: o("m-0 inline-flex items-center gap-2 align-middle text-delta-800", t ? "cursor-default" : "cursor-pointer", E[f], x),
21
21
  style: {
22
22
  fontFamily: "Roboto, Helvetica, Arial, sans-serif",
23
- ...h(x)
23
+ ...g(p)
24
24
  },
25
- children: [v, a != null && /* @__PURE__ */ y("span", {
26
- id: n ? r : void 0,
27
- className: o("text-sm leading-5 tracking-[0.00938em]", s && "text-delta-300"),
25
+ children: [v, a != null && /* @__PURE__ */ L("span", {
26
+ id: r ? n : void 0,
27
+ className: o("text-sm leading-5 tracking-[0.00938em]", t && "text-delta-300"),
28
28
  children: a
29
29
  })]
30
30
  });
31
31
  };
32
32
  export {
33
- k as StyledFormControlLabel
33
+ w as StyledFormControlLabel
34
34
  };
@@ -1,33 +1,40 @@
1
- import e from "./StyledLink.module.js";
2
- import t from "clsx";
1
+ import l from "./StyledLink.module.js";
2
+ import s from "clsx";
3
3
  import "react";
4
4
  import { jsxs as i } from "react/jsx-runtime";
5
- var u = ({ href: d, disabled: m, size: k = "large", dataTest: n, reflink: y, className: a, content: r, contentNode: s, ...c }) => {
6
- let l = e["styled-link-large"];
7
- switch (k) {
5
+ var g = ({ href: d, disabled: n, size: u = "large", dataTest: m, reflink: y, className: t, content: a, contentNode: r, onClick: c, ...k }) => {
6
+ let e = l["styled-link-large"];
7
+ switch (u) {
8
8
  case "large":
9
- l = e["styled-link-large"];
9
+ e = l["styled-link-large"];
10
10
  break;
11
11
  case "small":
12
- l = e["styled-link-small"];
12
+ e = l["styled-link-small"];
13
13
  break;
14
14
  case "xs":
15
- l = e["styled-link-xs"];
15
+ e = l["styled-link-xs"];
16
16
  break;
17
17
  }
18
- return m ? /* @__PURE__ */ i("span", {
19
- className: t(e["styled-link"], e["styled-link-disabled"], l, a),
20
- children: [r, s]
21
- }) : /* @__PURE__ */ i("a", {
22
- ...c,
23
- "data-testid": n,
18
+ return n ? /* @__PURE__ */ i("span", {
19
+ className: s(l["styled-link"], l["styled-link-disabled"], e, t),
20
+ children: [a, r]
21
+ }) : d ? /* @__PURE__ */ i("a", {
22
+ ...k,
23
+ "data-testid": m,
24
24
  ref: y,
25
25
  href: d,
26
- tabIndex: 0,
27
- className: t(e["styled-link"], "asma-touch-ready", l, a),
28
- children: [r, s]
26
+ className: s(l["styled-link"], "asma-touch-ready", e, t),
27
+ children: [a, r]
28
+ }) : /* @__PURE__ */ i("button", {
29
+ ...k,
30
+ "data-testid": m,
31
+ ref: y,
32
+ type: "button",
33
+ onClick: c,
34
+ className: s(l["styled-link"], l["styled-link-button"], "asma-touch-ready", e, t),
35
+ children: [a, r]
29
36
  });
30
37
  };
31
38
  export {
32
- u as StyledLink
39
+ g as StyledLink
33
40
  };
@@ -1,9 +1,10 @@
1
1
  var l = {
2
- "styled-link": "_styled-link_1mhky_1",
3
- "styled-link-disabled": "_styled-link-disabled_1mhky_14",
4
- "styled-link-xs": "_styled-link-xs_1mhky_30",
5
- "styled-link-small": "_styled-link-small_1mhky_35",
6
- "styled-link-large": "_styled-link-large_1mhky_40"
2
+ "styled-link": "_styled-link_1au3b_1",
3
+ "styled-link-disabled": "_styled-link-disabled_1au3b_14",
4
+ "styled-link-button": "_styled-link-button_1au3b_30",
5
+ "styled-link-xs": "_styled-link-xs_1au3b_35",
6
+ "styled-link-small": "_styled-link-small_1au3b_40",
7
+ "styled-link-large": "_styled-link-large_1au3b_45"
7
8
  };
8
9
  export {
9
10
  l as default
@@ -1,33 +1,34 @@
1
- import { cn as c } from "../../../helpers/cn.js";
1
+ import { cn as a } from "../../../helpers/cn.js";
2
2
  import { StyledPopover as x } from "../../utils/popover/StyledPopover.js";
3
- import { StyledMenuList as N } from "./StyledMenuList.js";
4
- import { jsx as o } from "react/jsx-runtime";
5
- var S = { border: "1px solid var(--colors-delta-300)" }, w = ({ open: p, anchorEl: m, onClose: t, anchorOrigin: l, transformOrigin: i, id: s, className: d, sx: n, classes: a, slotProps: e, autoFocus: y = !0, onClick: f, children: u, keepMounted: b }) => /* @__PURE__ */ o(x, {
6
- open: p,
7
- anchorEl: m,
3
+ import S from "./StyledMenu.module.js";
4
+ import { StyledMenuList as M } from "./StyledMenuList.js";
5
+ import { jsx as p } from "react/jsx-runtime";
6
+ var N = { border: "1px solid var(--colors-delta-300)" }, v = ({ open: m, anchorEl: l, onClose: t, anchorOrigin: d, transformOrigin: i, id: n, className: s, sx: u, classes: o, slotProps: e, autoFocus: y = !0, onClick: f, children: c, keepMounted: b }) => /* @__PURE__ */ p(x, {
7
+ open: m,
8
+ anchorEl: l,
8
9
  onClose: t,
9
10
  tabIntoContent: !1,
10
- anchorOrigin: l,
11
+ anchorOrigin: d,
11
12
  transformOrigin: i,
12
- id: s,
13
- className: d,
14
- sx: n,
13
+ id: n,
14
+ className: s,
15
+ sx: u,
15
16
  keepMounted: b,
16
17
  slotProps: { paper: {
17
- className: c("rounded", a?.paper, e?.paper?.className),
18
- sx: [S, e?.paper?.sx],
18
+ className: a("rounded", o?.paper, e?.paper?.className),
19
+ sx: [N, e?.paper?.sx],
19
20
  style: e?.paper?.style
20
21
  } },
21
- children: /* @__PURE__ */ o(N, {
22
+ children: /* @__PURE__ */ p(M, {
22
23
  autoFocus: y,
23
- className: a?.list,
24
+ className: a(S.anchoredList, o?.list),
24
25
  onClick: f,
25
26
  onKeyDown: (r) => {
26
27
  r.key === "Tab" && r.target.getAttribute("role") === "menuitem" && t?.(r, "tabKeyDown");
27
28
  },
28
- children: u
29
+ children: c
29
30
  })
30
31
  });
31
32
  export {
32
- w as StyledMenu
33
+ v as StyledMenu
33
34
  };
@@ -1,4 +1,7 @@
1
- var t = "_list_1t3hh_1", e = { list: t };
1
+ var a = "_list_6z23v_1", e = "_anchoredList_6z23v_16", t = {
2
+ list: a,
3
+ anchoredList: e
4
+ };
2
5
  export {
3
- e as default
6
+ t as default
4
7
  };