asma-ui-core 3.121.5 → 3.122.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.
- package/dist/asma-ui-core.css +1 -1
- package/dist/components/custom/module/header-layout/ToolbarRows.js +64 -60
- package/dist/components/custom/pathfinder-card/Pathfinder.module.js +14 -13
- package/dist/components/custom/pathfinder-card/PathfinderCard.js +64 -64
- package/dist/components/custom/widget/widget/StyledWidget.js +44 -37
- package/dist/components/custom/widget/widget-header/StyledWidgetHeader.js +7 -7
- package/dist/components/custom/widget/widget-title/StyledWidgetTitle.js +8 -8
- package/dist/components/data-display/chip/StyledChip.js +42 -42
- package/dist/components/data-display/form-label/components/StyledFormLabel.js +15 -15
- package/dist/components/feedback/dialog/StyledDialog.js +75 -75
- package/dist/components/feedback/dialog/StyledDialogActions.js +4 -4
- package/dist/components/feedback/dialog/StyledDialogTitle.js +13 -13
- package/dist/components/feedback/dialog/dialog-footer/StyledDialogFooter.js +70 -69
- package/dist/components/feedback/minimizable-dialog/MinimizableDialog.js +69 -69
- package/dist/components/feedback/minimizable-dialog/v2/MinimizableDialogV2.js +81 -81
- package/dist/components/feedback/snack-bar/StyledAlert.js +16 -16
- package/dist/components/inputs/button/StyledButton.js +36 -35
- package/dist/components/inputs/input-field/StyledInputField.js +38 -38
- package/dist/components/inputs/search-field/StyledSearchField.js +18 -17
- package/dist/components/miscellaneous/StyledFormControlLabel.js +13 -13
- package/dist/components/navigation/link/StyledLink.js +44 -44
- package/dist/components/navigation/title-chevron/StyledTitleChevron.js +13 -13
- package/dist/components/utils/bottom-sheet/StyledBottomSheet.js +45 -45
- package/dist/components/utils/popover/PopoverAnatomy.js +23 -23
- package/dist/hooks/useMediaQuery.hook.js +3 -2
- package/dist/src/components/custom/module/header-layout/ToolbarRows.d.ts +3 -1
- package/dist/src/hooks/useMediaQuery.hook.d.ts +2 -0
- package/dist/src/table/types.d.ts +8 -0
- package/dist/table/components/TableRow.js +89 -87
- package/package.json +1 -1
|
@@ -7,77 +7,77 @@ import { getChipPadding as J } from "./chipPadding.js";
|
|
|
7
7
|
import Q from "./StyledChip.module.js";
|
|
8
8
|
import { forwardRef as V } from "react";
|
|
9
9
|
import { jsx as p, jsxs as X } from "react/jsx-runtime";
|
|
10
|
-
var Y = ({ readOnly:
|
|
11
|
-
if (o) return
|
|
12
|
-
if (!(
|
|
13
|
-
return
|
|
14
|
-
}, lo = V(({ dataTest:
|
|
15
|
-
const b = !
|
|
16
|
-
paddingTop:
|
|
17
|
-
paddingRight:
|
|
18
|
-
paddingBottom:
|
|
19
|
-
paddingLeft:
|
|
20
|
-
}, E = (
|
|
21
|
-
|
|
22
|
-
}, L = (
|
|
23
|
-
|
|
10
|
+
var Y = ({ readOnly: s, disabled: n, interactive: t, focusableDisabled: o, tabIndex: r }) => {
|
|
11
|
+
if (o) return r ?? 0;
|
|
12
|
+
if (!(s || n))
|
|
13
|
+
return t ? r ?? 0 : r;
|
|
14
|
+
}, lo = V(({ dataTest: s, label: n, size: t = "medium", disabled: o, disabledReason: r, readOnly: e, clickable: _, icon: k, avatar: w, deleteIcon: D, onDelete: h, onClick: x, onMouseDown: B, onMouseUp: C, className: u, classes: i, sx: j, tabIndex: I, deleteButtonTabIndex: M, "aria-label": N, role: f, "aria-checked": R, "aria-readonly": T, "data-hovered": K, "data-focus": P, variant: Z, color: z }, W) => {
|
|
15
|
+
const b = !e && (!!_ || !!x), m = b && !o, d = b && !!o, v = d && !!r, g = w ?? k, y = !!(h && !e), c = J(t, !!g, y), $ = {
|
|
16
|
+
paddingTop: c.top,
|
|
17
|
+
paddingRight: c.right,
|
|
18
|
+
paddingBottom: c.bottom,
|
|
19
|
+
paddingLeft: c.left
|
|
20
|
+
}, E = (a) => {
|
|
21
|
+
a.stopPropagation(), h?.(a);
|
|
22
|
+
}, L = (a) => {
|
|
23
|
+
m && (a.key === "Enter" || a.key === " ") && (a.preventDefault(), x?.(a));
|
|
24
24
|
}, U = S(u, "width"), q = S(u, "max-width"), A = /* @__PURE__ */ X("div", {
|
|
25
25
|
ref: W,
|
|
26
|
-
"data-testid":
|
|
26
|
+
"data-testid": s,
|
|
27
27
|
"data-chip": "",
|
|
28
28
|
"aria-label": N,
|
|
29
29
|
"data-hovered": K,
|
|
30
30
|
"data-focus": P,
|
|
31
|
-
role:
|
|
32
|
-
"aria-disabled":
|
|
33
|
-
"aria-checked":
|
|
34
|
-
"aria-readonly":
|
|
31
|
+
role: f ?? (m || d ? "button" : void 0),
|
|
32
|
+
"aria-disabled": d || void 0,
|
|
33
|
+
"aria-checked": f ? R : void 0,
|
|
34
|
+
"aria-readonly": f ? T : void 0,
|
|
35
35
|
tabIndex: Y({
|
|
36
|
-
readOnly:
|
|
36
|
+
readOnly: e,
|
|
37
37
|
disabled: o,
|
|
38
|
-
interactive:
|
|
39
|
-
focusableDisabled:
|
|
38
|
+
interactive: m,
|
|
39
|
+
focusableDisabled: d,
|
|
40
40
|
tabIndex: I
|
|
41
41
|
}),
|
|
42
|
-
onClick: o ||
|
|
43
|
-
onKeyDown: o ||
|
|
44
|
-
onMouseDown: o ||
|
|
45
|
-
onMouseUp: o ||
|
|
46
|
-
className: l("box-border inline-flex items-center gap-1 rounded-[25px] border border-solid border-delta-300 bg-white text-base text-delta-700", !U && "w-fit", !q && "max-w-full",
|
|
42
|
+
onClick: o || e ? void 0 : x,
|
|
43
|
+
onKeyDown: o || e ? void 0 : L,
|
|
44
|
+
onMouseDown: o || e ? void 0 : B,
|
|
45
|
+
onMouseUp: o || e ? void 0 : C,
|
|
46
|
+
className: l("box-border inline-flex items-center gap-1 rounded-[25px] border border-solid border-delta-300 bg-white text-base text-delta-700", !U && "w-fit", !q && "max-w-full", t === "small" ? "h-6" : "h-8", "max-xs:h-auto max-xs:py-0", t === "small" ? "max-xs:min-h-6" : "max-xs:min-h-8", e && "pointer-events-none", o && "opacity-[0.38]", o && (d ? "cursor-not-allowed" : "pointer-events-none"), m && l("cursor-pointer outline-none", "asma-touch-ready", "active:!border-gama-400 active:bg-gama-25 active:shadow-[0_0_0_2px_var(--colors-gama-400)]"), (m || y && !o) && "data-[hovered]:bg-delta-50 hover:bg-delta-50", Q["focus-ring"], i?.root, u),
|
|
47
47
|
style: {
|
|
48
48
|
...$,
|
|
49
49
|
...F(j)
|
|
50
50
|
},
|
|
51
51
|
children: [
|
|
52
|
-
|
|
53
|
-
className: l("flex shrink-0 items-center justify-center",
|
|
54
|
-
children:
|
|
52
|
+
g && /* @__PURE__ */ p("span", {
|
|
53
|
+
className: l("flex shrink-0 items-center justify-center", t === "small" ? "h-[18px] w-[18px]" : "h-6 w-6", w ? i?.avatar : i?.icon),
|
|
54
|
+
children: g
|
|
55
55
|
}),
|
|
56
56
|
/* @__PURE__ */ p("span", {
|
|
57
|
-
className: l("min-w-0 truncate", i?.label),
|
|
58
|
-
children:
|
|
57
|
+
className: l("min-w-0 truncate", "max-xs:hyphens-auto max-xs:whitespace-normal max-xs:![overflow-wrap:anywhere]", t === "small" ? "max-xs:-my-px" : "max-xs:py-[3px]", i?.label),
|
|
58
|
+
children: n
|
|
59
59
|
}),
|
|
60
|
-
h && !
|
|
60
|
+
h && !e && /* @__PURE__ */ p("button", {
|
|
61
61
|
type: "button",
|
|
62
62
|
tabIndex: M,
|
|
63
|
-
"data-testid": `${
|
|
64
|
-
"aria-label": typeof
|
|
63
|
+
"data-testid": `${s}-delete`,
|
|
64
|
+
"aria-label": typeof n == "string" ? `Remove ${n}` : "Remove",
|
|
65
65
|
onClick: E,
|
|
66
66
|
disabled: o,
|
|
67
|
-
className: l("flex shrink-0 items-center justify-center rounded-full border border-solid border-delta-100 bg-delta-50 p-0 text-delta-700 [outline:none]",
|
|
67
|
+
className: l("flex shrink-0 items-center justify-center rounded-full border border-solid border-delta-100 bg-delta-50 p-0 text-delta-700 [outline:none]", t === "small" ? "h-[18px] w-[18px]" : "h-5 w-5", i?.deleteIcon),
|
|
68
68
|
children: D ?? /* @__PURE__ */ p(H, {
|
|
69
|
-
height:
|
|
70
|
-
width:
|
|
69
|
+
height: t === "small" ? 14 : 16,
|
|
70
|
+
width: t === "small" ? 14 : 16,
|
|
71
71
|
className: "min-w-0 shrink-0"
|
|
72
72
|
})
|
|
73
73
|
})
|
|
74
74
|
]
|
|
75
75
|
});
|
|
76
76
|
return /* @__PURE__ */ p(G, {
|
|
77
|
-
title:
|
|
78
|
-
open:
|
|
79
|
-
openOnTap:
|
|
80
|
-
persistentDescription:
|
|
77
|
+
title: r,
|
|
78
|
+
open: v ? void 0 : !1,
|
|
79
|
+
openOnTap: v,
|
|
80
|
+
persistentDescription: v,
|
|
81
81
|
children: A
|
|
82
82
|
});
|
|
83
83
|
});
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { getStyles as
|
|
2
|
-
import
|
|
3
|
-
import { jsx as
|
|
4
|
-
var
|
|
5
|
-
const
|
|
6
|
-
(
|
|
1
|
+
import { getStyles as x } from "../helpers/getStyles.js";
|
|
2
|
+
import y from "clsx";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
var f = ({ title: t, onClick: e, className: o, dataTest: a, size: s = "base" }) => {
|
|
5
|
+
const m = x({ size: s }), d = e ? (r) => {
|
|
6
|
+
(r.key === "Enter" || r.key === " ") && (r.preventDefault(), e(r));
|
|
7
7
|
} : void 0;
|
|
8
|
-
return /* @__PURE__ */
|
|
9
|
-
className:
|
|
10
|
-
onClick:
|
|
11
|
-
onKeyDown:
|
|
12
|
-
role:
|
|
13
|
-
tabIndex:
|
|
14
|
-
"data-testid":
|
|
15
|
-
children:
|
|
8
|
+
return /* @__PURE__ */ n("div", {
|
|
9
|
+
className: y(m, "max-xs:min-w-0 max-xs:hyphens-auto max-xs:![overflow-wrap:anywhere]", o),
|
|
10
|
+
onClick: e,
|
|
11
|
+
onKeyDown: d,
|
|
12
|
+
role: e ? "button" : void 0,
|
|
13
|
+
tabIndex: e ? 0 : void 0,
|
|
14
|
+
"data-testid": a,
|
|
15
|
+
children: t
|
|
16
16
|
});
|
|
17
17
|
};
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
f as StyledFormLabel
|
|
20
20
|
};
|
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
import { cn as
|
|
1
|
+
import { cn as i } from "../../../helpers/cn.js";
|
|
2
2
|
import { resolveSx as K } from "../../../helpers/sx.js";
|
|
3
|
-
import { registerOpenModalDialog as
|
|
4
|
-
import { CloseIcon as
|
|
5
|
-
import { DialogBusyContext as
|
|
6
|
-
import { StyledButton as
|
|
3
|
+
import { registerOpenModalDialog as he } from "../../../hooks/useTopLayer.hook.js";
|
|
4
|
+
import { CloseIcon as pe } from "../../icons/close-icon/CloseIcon.js";
|
|
5
|
+
import { DialogBusyContext as we, useDialogBusyBoundary as ye } from "./DialogBusyContext.js";
|
|
6
|
+
import { StyledButton as ve } from "../../inputs/button/StyledButton.js";
|
|
7
7
|
import { useMobileMediaQuery as ge } from "../../../hooks/useMediaQuery.hook.js";
|
|
8
8
|
import { OverlayBackOwnerContext as be, isOverlayBackEnabled as T, requestCloseTopOverlayBack as D, useBackCloses as ke } from "../../../hooks/useBackCloses.hook.js";
|
|
9
9
|
import { warnUnnamedDialog as Ce } from "../../../helpers/warnUnnamedDialog.js";
|
|
10
10
|
import Ee from "./StyledDialog.module.js";
|
|
11
11
|
import { StyledDialogTitleContext as Be } from "./dialogTitleContext.js";
|
|
12
|
-
import { useEffect as
|
|
13
|
-
import { jsx as
|
|
12
|
+
import { useEffect as c, useId as I, useLayoutEffect as U, useMemo as De, useRef as l, useState as X } from "react";
|
|
13
|
+
import { jsx as a, jsxs as u } from "react/jsx-runtime";
|
|
14
14
|
var Ie = {
|
|
15
15
|
xs: 444,
|
|
16
16
|
sm: 600,
|
|
17
17
|
md: 900,
|
|
18
18
|
lg: 1200,
|
|
19
19
|
xl: 1536
|
|
20
|
-
}, Fe = ({ open: t, onClose: R, children: S, dataTest:
|
|
21
|
-
const
|
|
22
|
-
titleId:
|
|
20
|
+
}, Fe = ({ open: t, onClose: R, children: S, dataTest: f, maxWidth: N = "sm", fullWidth: G, fullScreen: Q, scroll: V = "paper", disableEscapeKeyDown: H, className: $, style: J, sx: Y, classes: O, PaperProps: Z, slotProps: m, busyReason: ee, locale: te = "en", onCloseText: q, showCloseIcon: M = !0, dialogLabel: x, dialogTitle: h, dialogHeaderNode: re, ariaLabel: b }) => {
|
|
21
|
+
const p = I(), P = I(), [ne, oe] = X(), le = De(() => ({
|
|
22
|
+
titleId: p,
|
|
23
23
|
setTitleId: oe
|
|
24
|
-
}), [
|
|
25
|
-
|
|
24
|
+
}), [p]), w = h ? p : ne ?? (x ? P : void 0), ae = ge(), s = l(null), k = l(null), C = l(!1), E = l(!1), d = l(!1), _ = l(t);
|
|
25
|
+
c(() => {
|
|
26
26
|
_.current = t;
|
|
27
27
|
}, [t]);
|
|
28
|
-
const L = l(t), y = Q ??
|
|
28
|
+
const L = l(t), y = Q ?? ae, { busy: v, busyReason: se, contextValue: ie } = ye(ee, te), j = I(), [g, ce] = X(), W = l(!1);
|
|
29
29
|
U(() => {
|
|
30
|
-
const e = s.current, r = !!
|
|
30
|
+
const e = s.current, r = !!w || !!b, n = e && t && !r ? e.querySelector('h1, h2, h3, h4, h5, h6, [role="heading"]') : null;
|
|
31
31
|
n && !n.id && (n.id = j);
|
|
32
32
|
const o = n?.id;
|
|
33
|
-
o !==
|
|
33
|
+
o !== g && ce(o), e && t && !r && !n && !W.current && (W.current = !0, Ce(f));
|
|
34
34
|
}, [
|
|
35
35
|
t,
|
|
36
|
-
x,
|
|
37
|
-
g,
|
|
38
|
-
S,
|
|
39
36
|
w,
|
|
37
|
+
b,
|
|
38
|
+
S,
|
|
39
|
+
g,
|
|
40
40
|
j,
|
|
41
|
-
|
|
42
|
-
]),
|
|
43
|
-
L.current && !t &&
|
|
44
|
-
}, [t,
|
|
41
|
+
f
|
|
42
|
+
]), c(() => {
|
|
43
|
+
L.current && !t && m?.transition?.onExited?.(), L.current = t;
|
|
44
|
+
}, [t, m]), U(() => {
|
|
45
45
|
const e = s.current;
|
|
46
46
|
if (!e || !t) return;
|
|
47
|
-
e.open || (
|
|
48
|
-
const r =
|
|
47
|
+
e.open || (k.current = document.activeElement instanceof HTMLElement ? document.activeElement : null, e.showModal(), e.focus({ preventScroll: !0 }), requestAnimationFrame(() => e.open && e.focus({ preventScroll: !0 })));
|
|
48
|
+
const r = he(e);
|
|
49
49
|
return () => {
|
|
50
|
-
r(),
|
|
50
|
+
r(), k.current?.isConnected && k.current.focus({ preventScroll: !0 });
|
|
51
51
|
};
|
|
52
|
-
}, [t]),
|
|
52
|
+
}, [t]), c(() => {
|
|
53
53
|
if (!t) return;
|
|
54
54
|
const e = document.body.style.overflow, r = document.documentElement.style.overflow;
|
|
55
55
|
return document.body.style.overflow = "hidden", document.documentElement.style.overflow = "hidden", () => {
|
|
56
56
|
document.body.style.overflow = e, document.documentElement.style.overflow = r;
|
|
57
57
|
};
|
|
58
58
|
}, [t]);
|
|
59
|
-
const
|
|
59
|
+
const B = {
|
|
60
60
|
...Z,
|
|
61
|
-
...
|
|
62
|
-
}, z = N === !1 ? void 0 : Ie[N], { className: de, style: ue, onClick: fe, ...me } =
|
|
63
|
-
if (
|
|
61
|
+
...m?.paper
|
|
62
|
+
}, z = N === !1 ? void 0 : Ie[N], { className: de, style: ue, onClick: fe, ...me } = m?.backdrop ?? {}, A = (e, r) => {
|
|
63
|
+
if (v || d.current) return;
|
|
64
64
|
const n = R?.(e, r);
|
|
65
65
|
if (n && typeof n.then == "function") {
|
|
66
|
-
|
|
66
|
+
d.current = !0;
|
|
67
67
|
const o = () => {
|
|
68
|
-
|
|
68
|
+
d.current = !1;
|
|
69
69
|
};
|
|
70
70
|
n.then(o, o);
|
|
71
71
|
}
|
|
72
72
|
return n;
|
|
73
|
-
}, F = (e) =>
|
|
74
|
-
|
|
73
|
+
}, F = (e) => C.current ? !1 : (C.current = !0, window.setTimeout(() => {
|
|
74
|
+
C.current = !1;
|
|
75
75
|
}, 0), A(e, "escapeKeyDown"));
|
|
76
76
|
ke({
|
|
77
77
|
active: t,
|
|
78
|
-
requestClose: (e) => !R || H ||
|
|
78
|
+
requestClose: (e) => !R || H || v || d.current ? !1 : F(e ?? new Event("overlayBack")),
|
|
79
79
|
ownerRef: s
|
|
80
80
|
});
|
|
81
|
-
const
|
|
82
|
-
e.cancelable && e.preventDefault(), !
|
|
81
|
+
const xe = (e) => {
|
|
82
|
+
e.cancelable && e.preventDefault(), !E.current && T() && D();
|
|
83
83
|
};
|
|
84
|
-
return
|
|
84
|
+
return c(() => {
|
|
85
85
|
const e = s.current;
|
|
86
86
|
if (!e || !t) return;
|
|
87
87
|
let r = !1;
|
|
@@ -90,48 +90,48 @@ var Ie = {
|
|
|
90
90
|
r = !1, _.current && e.isConnected && !e.open && (e.showModal(), e.focus({ preventScroll: !0 }));
|
|
91
91
|
});
|
|
92
92
|
}, o = () => {
|
|
93
|
-
r || (r = !0, T() && !
|
|
93
|
+
r || (r = !0, T() && !d.current && D(), n());
|
|
94
94
|
};
|
|
95
95
|
return e.addEventListener("close", o), () => e.removeEventListener("close", o);
|
|
96
|
-
}, [t]),
|
|
96
|
+
}, [t]), c(() => {
|
|
97
97
|
if (!t || H) return;
|
|
98
98
|
const e = (r) => {
|
|
99
99
|
r.key !== "Escape" || r.defaultPrevented || (r.preventDefault(), r.stopImmediatePropagation(), D(r));
|
|
100
100
|
};
|
|
101
101
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
102
|
-
}),
|
|
102
|
+
}), c(() => {
|
|
103
103
|
if (!t) return;
|
|
104
104
|
const e = (r) => {
|
|
105
|
-
r.key === "Escape" && (
|
|
106
|
-
|
|
105
|
+
r.key === "Escape" && (E.current = !0, window.setTimeout(() => {
|
|
106
|
+
E.current = !1;
|
|
107
107
|
}, 0));
|
|
108
108
|
};
|
|
109
109
|
return window.addEventListener("keydown", e, !0), () => window.removeEventListener("keydown", e, !0);
|
|
110
|
-
}, [t]), t ? /* @__PURE__ */
|
|
110
|
+
}, [t]), t ? /* @__PURE__ */ u("dialog", {
|
|
111
111
|
ref: s,
|
|
112
112
|
tabIndex: -1,
|
|
113
|
-
"data-testid":
|
|
114
|
-
"aria-labelledby":
|
|
115
|
-
"aria-label":
|
|
116
|
-
onCancel:
|
|
113
|
+
"data-testid": f,
|
|
114
|
+
"aria-labelledby": w ?? g,
|
|
115
|
+
"aria-label": w || g ? void 0 : b,
|
|
116
|
+
onCancel: xe,
|
|
117
117
|
onKeyDown: (e) => {
|
|
118
|
-
!
|
|
118
|
+
!v || e.key !== "Escape" || e.target.closest("dialog[open]") === s.current && e.preventDefault();
|
|
119
119
|
},
|
|
120
|
-
className:
|
|
120
|
+
className: i(Ee.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", V === "body" && "overflow-y-auto", $, O?.root),
|
|
121
121
|
style: {
|
|
122
122
|
zIndex: 999,
|
|
123
123
|
...K(Y),
|
|
124
124
|
...J
|
|
125
125
|
},
|
|
126
|
-
children: [/* @__PURE__ */
|
|
126
|
+
children: [/* @__PURE__ */ a("div", {
|
|
127
127
|
...me,
|
|
128
|
-
className:
|
|
128
|
+
className: i("absolute inset-0 bg-[#626e7eb2]", de),
|
|
129
129
|
style: ue,
|
|
130
130
|
onClick: (e) => {
|
|
131
131
|
fe?.(e), e.defaultPrevented || A(e, "backdropClick");
|
|
132
132
|
}
|
|
133
|
-
}), /* @__PURE__ */
|
|
134
|
-
className:
|
|
133
|
+
}), /* @__PURE__ */ u("div", {
|
|
134
|
+
className: i("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]", y && "rounded-none", B.className, O?.paper),
|
|
135
135
|
style: {
|
|
136
136
|
minWidth: 0,
|
|
137
137
|
minHeight: 0,
|
|
@@ -145,8 +145,8 @@ var Ie = {
|
|
|
145
145
|
width: G ? "calc(100% - 64px)" : "auto",
|
|
146
146
|
maxHeight: "100%"
|
|
147
147
|
},
|
|
148
|
-
...K(
|
|
149
|
-
...
|
|
148
|
+
...K(B.sx),
|
|
149
|
+
...B.style,
|
|
150
150
|
...y ? {
|
|
151
151
|
width: "100%",
|
|
152
152
|
maxWidth: "100%",
|
|
@@ -154,32 +154,32 @@ var Ie = {
|
|
|
154
154
|
maxHeight: "100%"
|
|
155
155
|
} : { maxHeight: "calc(100% - 64px)" }
|
|
156
156
|
},
|
|
157
|
-
children: [(!!
|
|
158
|
-
className: "box-border flex w-full min-w-0 max-w-full justify-between px-4 pt-4",
|
|
159
|
-
children: [/* @__PURE__ */
|
|
157
|
+
children: [(!!x || !!h || M) && /* @__PURE__ */ u("div", {
|
|
158
|
+
className: i("box-border flex w-full min-w-0 max-w-full justify-between px-4 pt-4", "max-xs:flex-col-reverse max-xs:gap-2"),
|
|
159
|
+
children: [/* @__PURE__ */ u("div", {
|
|
160
160
|
className: "flex min-w-0 flex-1 flex-col justify-start gap-0.5",
|
|
161
|
-
children: [
|
|
161
|
+
children: [x && /* @__PURE__ */ a("div", {
|
|
162
162
|
id: P,
|
|
163
|
-
className: "flex h-8 items-center text-sm font-normal leading-5 text-delta-600",
|
|
164
|
-
children:
|
|
165
|
-
}), h && /* @__PURE__ */
|
|
166
|
-
id:
|
|
167
|
-
className: "flex text-2xl font-semibold leading-8 text-delta-800",
|
|
163
|
+
className: i("flex h-8 items-center text-sm font-normal leading-5 text-delta-600", "max-xs:h-auto max-xs:min-h-8 max-xs:hyphens-auto max-xs:![overflow-wrap:anywhere]"),
|
|
164
|
+
children: x
|
|
165
|
+
}), h && /* @__PURE__ */ a("div", {
|
|
166
|
+
id: p,
|
|
167
|
+
className: i("flex text-2xl font-semibold leading-8 text-delta-800", "max-xs:hyphens-auto max-xs:![overflow-wrap:anywhere]"),
|
|
168
168
|
children: h
|
|
169
169
|
})]
|
|
170
|
-
}), M && /* @__PURE__ */
|
|
171
|
-
className: "flex min-w-0 max-w-full shrink-0 justify-end gap-2",
|
|
172
|
-
children: [re, /* @__PURE__ */
|
|
173
|
-
dataTest: `close-button-${
|
|
170
|
+
}), M && /* @__PURE__ */ u("div", {
|
|
171
|
+
className: "flex min-w-0 max-w-full shrink-0 justify-end gap-2 max-xs:flex-wrap max-xs:gap-y-2",
|
|
172
|
+
children: [re, /* @__PURE__ */ a(ve, {
|
|
173
|
+
dataTest: `close-button-${f}`,
|
|
174
174
|
"aria-label": q ? void 0 : "Close",
|
|
175
175
|
variant: "textGray",
|
|
176
176
|
size: "small",
|
|
177
|
-
endIcon: /* @__PURE__ */
|
|
177
|
+
endIcon: /* @__PURE__ */ a(pe, {
|
|
178
178
|
width: 20,
|
|
179
179
|
height: 20
|
|
180
180
|
}),
|
|
181
181
|
className: "max-w-full shrink-0 whitespace-nowrap",
|
|
182
|
-
disabled:
|
|
182
|
+
disabled: v,
|
|
183
183
|
disabledReason: se,
|
|
184
184
|
onClick: (e) => {
|
|
185
185
|
F(e);
|
|
@@ -192,12 +192,12 @@ var Ie = {
|
|
|
192
192
|
children: q
|
|
193
193
|
})]
|
|
194
194
|
})]
|
|
195
|
-
}), /* @__PURE__ */
|
|
195
|
+
}), /* @__PURE__ */ a(be.Provider, {
|
|
196
196
|
value: s,
|
|
197
|
-
children: /* @__PURE__ */
|
|
197
|
+
children: /* @__PURE__ */ a(Be.Provider, {
|
|
198
198
|
value: le,
|
|
199
|
-
children: /* @__PURE__ */
|
|
200
|
-
value:
|
|
199
|
+
children: /* @__PURE__ */ a(we.Provider, {
|
|
200
|
+
value: ie,
|
|
201
201
|
children: S
|
|
202
202
|
})
|
|
203
203
|
})
|
|
@@ -2,16 +2,16 @@ import { resolveSx as r } from "../../../helpers/sx.js";
|
|
|
2
2
|
import o from "clsx";
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx as s } from "react/jsx-runtime";
|
|
5
|
-
var x = ({ children: e, className:
|
|
5
|
+
var x = ({ children: e, className: a, sx: i, style: l, classes: c, disableSpacing: d, ...t }) => /* @__PURE__ */ s("div", {
|
|
6
6
|
"data-testid": "styled-dialog-actions",
|
|
7
7
|
className: "m-0 flex shrink-0 justify-center p-0",
|
|
8
8
|
style: {
|
|
9
|
-
...r(
|
|
10
|
-
...
|
|
9
|
+
...r(i),
|
|
10
|
+
...l
|
|
11
11
|
},
|
|
12
12
|
...t,
|
|
13
13
|
children: /* @__PURE__ */ s("div", {
|
|
14
|
-
className: o("flex w-full justify-end gap-2 p-4",
|
|
14
|
+
className: o("flex w-full justify-end gap-2 p-4 max-xs:flex-wrap", a),
|
|
15
15
|
children: e
|
|
16
16
|
})
|
|
17
17
|
});
|
|
@@ -2,30 +2,30 @@ import { resolveSx as n } from "../../../helpers/sx.js";
|
|
|
2
2
|
import { StyledDialogTitleContext as x } from "./dialogTitleContext.js";
|
|
3
3
|
import f from "clsx";
|
|
4
4
|
import { useContext as p, useLayoutEffect as u } from "react";
|
|
5
|
-
import { jsx as
|
|
6
|
-
var
|
|
7
|
-
const t = p(x),
|
|
5
|
+
import { jsx as y } from "react/jsx-runtime";
|
|
6
|
+
var I = ({ children: e, className: l, sx: r, style: i, id: a, classes: c, ...m }) => {
|
|
7
|
+
const t = p(x), s = !!e, o = a ?? t?.titleId;
|
|
8
8
|
if (u(() => {
|
|
9
|
-
if (!(!
|
|
9
|
+
if (!(!s || !t))
|
|
10
10
|
return t.setTitleId(o), () => t.setTitleId(void 0);
|
|
11
11
|
}, [
|
|
12
|
-
|
|
12
|
+
s,
|
|
13
13
|
t,
|
|
14
14
|
o
|
|
15
15
|
]), !e) return null;
|
|
16
|
-
const
|
|
17
|
-
...n(
|
|
18
|
-
...
|
|
16
|
+
const d = {
|
|
17
|
+
...n(r),
|
|
18
|
+
...i
|
|
19
19
|
};
|
|
20
|
-
return /* @__PURE__ */
|
|
20
|
+
return /* @__PURE__ */ y("h2", {
|
|
21
21
|
"data-testid": "styled-dialog-title",
|
|
22
22
|
id: o,
|
|
23
|
-
className: f("mx-3 p-4 text-[20px] font-semibold leading-[20px]",
|
|
24
|
-
style:
|
|
25
|
-
...
|
|
23
|
+
className: f("mx-3 p-4 text-[20px] font-semibold leading-[20px]", "max-xs:hyphens-auto max-xs:![overflow-wrap:anywhere]", l),
|
|
24
|
+
style: d,
|
|
25
|
+
...m,
|
|
26
26
|
children: e
|
|
27
27
|
});
|
|
28
28
|
};
|
|
29
29
|
export {
|
|
30
|
-
|
|
30
|
+
I as StyledDialogTitle
|
|
31
31
|
};
|