asma-ui-core 3.121.6 → 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.
Files changed (26) hide show
  1. package/dist/asma-ui-core.css +1 -1
  2. package/dist/components/custom/module/header-layout/ToolbarRows.js +64 -60
  3. package/dist/components/custom/widget/widget/StyledWidget.js +44 -37
  4. package/dist/components/custom/widget/widget-header/StyledWidgetHeader.js +7 -7
  5. package/dist/components/custom/widget/widget-title/StyledWidgetTitle.js +8 -8
  6. package/dist/components/data-display/chip/StyledChip.js +42 -42
  7. package/dist/components/data-display/form-label/components/StyledFormLabel.js +15 -15
  8. package/dist/components/feedback/dialog/StyledDialog.js +75 -75
  9. package/dist/components/feedback/dialog/StyledDialogActions.js +4 -4
  10. package/dist/components/feedback/dialog/StyledDialogTitle.js +13 -13
  11. package/dist/components/feedback/dialog/dialog-footer/StyledDialogFooter.js +70 -69
  12. package/dist/components/feedback/minimizable-dialog/MinimizableDialog.js +69 -69
  13. package/dist/components/feedback/minimizable-dialog/v2/MinimizableDialogV2.js +81 -81
  14. package/dist/components/feedback/snack-bar/StyledAlert.js +16 -16
  15. package/dist/components/inputs/button/StyledButton.js +36 -35
  16. package/dist/components/inputs/input-field/StyledInputField.js +38 -38
  17. package/dist/components/inputs/search-field/StyledSearchField.js +18 -17
  18. package/dist/components/miscellaneous/StyledFormControlLabel.js +13 -13
  19. package/dist/components/navigation/link/StyledLink.js +44 -44
  20. package/dist/components/navigation/title-chevron/StyledTitleChevron.js +13 -13
  21. package/dist/components/utils/bottom-sheet/StyledBottomSheet.js +45 -45
  22. package/dist/components/utils/popover/PopoverAnatomy.js +23 -23
  23. package/dist/hooks/useMediaQuery.hook.js +3 -2
  24. package/dist/src/components/custom/module/header-layout/ToolbarRows.d.ts +3 -1
  25. package/dist/src/hooks/useMediaQuery.hook.d.ts +2 -0
  26. package/package.json +1 -1
@@ -1,15 +1,15 @@
1
- import { cn as h } from "../../../helpers/cn.js";
2
- import { firstTabbable as he } from "../../../helpers/focusable.js";
1
+ import { cn as s } from "../../../helpers/cn.js";
2
+ import { firstTabbable as fe } from "../../../helpers/focusable.js";
3
3
  import { StyledTooltip as u } from "../../data-display/tooltip/StyledTooltip.js";
4
4
  import { DotsVerticalIcon as ue } from "../../icons/dots-vertical-icon/DotsVerticalIcon.js";
5
5
  import { CloseIcon as H } from "../../icons/close-icon/CloseIcon.js";
6
6
  import { MinimizeIcon as ve } from "../../icons/minimize-icon/MinimizeIcon.js";
7
- import { KeyboardCapslockIcon as be } from "../../icons/keyboard-capslock-icon/KeyboardCapslockIcon.js";
7
+ import { KeyboardCapslockIcon as xe } from "../../icons/keyboard-capslock-icon/KeyboardCapslockIcon.js";
8
8
  import { ArrowExpandIcon as pe } from "../../icons/arrow-expand-icon/ArrowExpandIcon.js";
9
- import { ArrowShrinkIcon as ge } from "../../icons/arrow-shrink-icon/ArrowShrinkIcon.js";
9
+ import { ArrowShrinkIcon as be } from "../../icons/arrow-shrink-icon/ArrowShrinkIcon.js";
10
10
  import { StyledButton as r } from "../../inputs/button/StyledButton.js";
11
- import { OverlayBackOwnerContext as xe, isOverlayBackNavigationPending as ke, useBackCloses as ye } from "../../../hooks/useBackCloses.hook.js";
12
- import { useFocusTrap as we } from "../../../hooks/useFocusTrap.hook.js";
11
+ import { OverlayBackOwnerContext as ge, isOverlayBackNavigationPending as we, useBackCloses as ye } from "../../../hooks/useBackCloses.hook.js";
12
+ import { useFocusTrap as ke } from "../../../hooks/useFocusTrap.hook.js";
13
13
  import { StyledMenu as ze } from "../../navigation/menu/StyledMenu.js";
14
14
  import { StyledMenuItem as Ne } from "../../navigation/menu/StyledMenuItem.js";
15
15
  import { fullScreenFieldWidthVars as Ce } from "../../inputs/field-styles.js";
@@ -18,19 +18,19 @@ import { useToggleMenuVisibility as Ie } from "../../../hooks/useToggleMenuVisib
18
18
  import Q from "clsx";
19
19
  import { useLayoutEffect as Me, useRef as X, useState as Y } from "react";
20
20
  import { Fragment as p, jsx as e, jsxs as l } from "react/jsx-runtime";
21
- var Ye = ({ onCloseText: v = "", onMinimizeText: I = "", onExpandText: M = "", onFullScreenText: R = "", showCloseIcon: j = !0, showMinimizeIcon: Z = !0, showExpandIcon: B = !0, showFullScreenIcon: L = !0, title: m, label: g, children: x, open: k, onClose: ee, className: F = "", primaryButtonText: S, primaryButtonLoading: n = !1, primaryButtonDisabled: ie, primaryButtonDisabledReason: te, secondaryButtonText: y, onPrimaryButtonClick: _, onSecondaryButtonClick: q, dataTest: E, actionNode: le, extraActions: d, extraActionsText: f, btnContainerClassName: G, footerClassName: re, footerInfo: O, locale: i = "en", enableFullscreen: ne = !0, fullscreenLockedReason: D, fullScreenState: V, handleFullScreenState: P }) => {
22
- const [t, de] = Y(!1), [W, ae] = Y(!1), { open: oe, anchorEl: se, handleOpen: ce, handleClose: me } = Ie(), s = X(null), w = X(null), z = i === "en" ? "Wait until saved" : "Vent til lagringen er ferdig", b = () => {
23
- if (n) return !1;
21
+ var Ye = ({ onCloseText: v = "", onMinimizeText: I = "", onExpandText: M = "", onFullScreenText: R = "", showCloseIcon: j = !0, showMinimizeIcon: Z = !0, showExpandIcon: B = !0, showFullScreenIcon: L = !0, title: h, label: b, children: g, open: w, onClose: ee, className: F = "", primaryButtonText: S, primaryButtonLoading: a = !1, primaryButtonDisabled: te, primaryButtonDisabledReason: ie, secondaryButtonText: y, onPrimaryButtonClick: _, onSecondaryButtonClick: q, dataTest: E, actionNode: le, extraActions: n, extraActionsText: f, btnContainerClassName: G, footerClassName: re, footerInfo: O, locale: i = "en", enableFullscreen: ae = !0, fullscreenLockedReason: D, fullScreenState: V, handleFullScreenState: P }) => {
22
+ const [t, ne] = Y(!1), [W, de] = Y(!1), { open: oe, anchorEl: se, handleOpen: ce, handleClose: me } = Ie(), c = X(null), k = X(null), z = i === "en" ? "Wait until saved" : "Vent til lagringen er ferdig", x = () => {
23
+ if (a) return !1;
24
24
  ee();
25
- }, o = V ?? W, a = o && !t, N = !!D;
26
- if (we(k && a, s, b), ye({
27
- active: k && !t,
28
- requestClose: () => !a && ke() ? !1 : b(),
29
- ownerRef: s
25
+ }, o = V ?? W, d = o && !t, N = !!D;
26
+ if (ke(w && d, c, x), ye({
27
+ active: w && !t,
28
+ requestClose: () => !d && we() ? !1 : x(),
29
+ ownerRef: c
30
30
  }), Me(() => {
31
- s.current?.toggleAttribute("inert", t), w.current?.toggleAttribute("inert", !t);
32
- }, [t]), !k) return null;
33
- const fe = a ? {
31
+ c.current?.toggleAttribute("inert", t), k.current?.toggleAttribute("inert", !t);
32
+ }, [t]), !w) return null;
33
+ const he = d ? {
34
34
  right: "auto",
35
35
  bottom: "auto",
36
36
  left: "50%",
@@ -39,40 +39,40 @@ var Ye = ({ onCloseText: v = "", onMinimizeText: I = "", onExpandText: M = "", o
39
39
  width: "min(1000px, calc(100vw - 32px))",
40
40
  height: "95dvh",
41
41
  ...Ce
42
- } : void 0, U = o ? i === "en" ? "Exit full screen" : "Avslutt fullskjerm" : i === "en" ? "Full screen" : "Fullskjerm", $ = S ?? n, A = $ || y, K = /* @__PURE__ */ l(p, { children: [y && q && /* @__PURE__ */ e(r, {
42
+ } : void 0, U = o ? i === "en" ? "Exit full screen" : "Avslutt fullskjerm" : i === "en" ? "Full screen" : "Fullskjerm", $ = S ?? a, A = $ || y, K = /* @__PURE__ */ l(p, { children: [y && q && /* @__PURE__ */ e(r, {
43
43
  dataTest: "cancel-button",
44
44
  variant: "outlined",
45
- disabled: n,
45
+ disabled: a,
46
46
  disabledReason: z,
47
47
  onClick: q,
48
48
  children: y
49
49
  }), $ && _ && /* @__PURE__ */ e(r, {
50
50
  dataTest: "save-button",
51
- loading: n,
51
+ loading: a,
52
52
  locale: i,
53
- disabled: ie,
54
- disabledReason: te,
53
+ disabled: te,
54
+ disabledReason: ie,
55
55
  onClick: _,
56
56
  children: S
57
57
  })] }), T = () => {
58
- const c = t ? s : w;
59
- de(!t), requestAnimationFrame(() => {
60
- const C = c.current;
61
- C && (C.querySelector('[data-testid="minimize-button"]') ?? he(C))?.focus({ preventScroll: !0 });
58
+ const m = t ? c : k;
59
+ ne(!t), requestAnimationFrame(() => {
60
+ const C = m.current;
61
+ C && (C.querySelector('[data-testid="minimize-button"]') ?? fe(C))?.focus({ preventScroll: !0 });
62
62
  });
63
63
  };
64
64
  return /* @__PURE__ */ l(p, { children: [
65
- a && /* @__PURE__ */ e("div", { className: "fixed inset-0 z-[51] bg-[rgb(98,110,126)] bg-opacity-70" }),
65
+ d && /* @__PURE__ */ e("div", { className: "fixed inset-0 z-[51] bg-[rgb(98,110,126)] bg-opacity-70" }),
66
66
  /* @__PURE__ */ e("div", {
67
- ref: w,
67
+ ref: k,
68
68
  style: { zIndex: 51 },
69
- className: h(J.dialog, !t && J.hidden),
69
+ className: s(J.dialog, !t && J.hidden, t && "max-xs:w-[calc(100vw-32px)]"),
70
70
  children: /* @__PURE__ */ l("div", {
71
71
  className: Q("flex items-center justify-between", !t && "hidden"),
72
72
  "data-testid": E,
73
73
  children: [/* @__PURE__ */ e("div", {
74
74
  className: "truncate text-lg font-semibold text-delta-800",
75
- children: m
75
+ children: h
76
76
  }), /* @__PURE__ */ l("div", {
77
77
  className: "flex items-center gap-x-1",
78
78
  children: [B && /* @__PURE__ */ e(u, {
@@ -83,7 +83,7 @@ var Ye = ({ onCloseText: v = "", onMinimizeText: I = "", onExpandText: M = "", o
83
83
  variant: "text",
84
84
  size: "small",
85
85
  onClick: T,
86
- endIcon: /* @__PURE__ */ e(be, {
86
+ endIcon: /* @__PURE__ */ e(xe, {
87
87
  height: 20,
88
88
  width: 20,
89
89
  color: "text-gama-500"
@@ -92,15 +92,15 @@ var Ye = ({ onCloseText: v = "", onMinimizeText: I = "", onExpandText: M = "", o
92
92
  }) })
93
93
  }), j && /* @__PURE__ */ e(u, {
94
94
  title: i === "en" ? "Close" : "Lukk",
95
- open: n ? !1 : void 0,
95
+ open: a ? !1 : void 0,
96
96
  children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(r, {
97
97
  dataTest: "close-button",
98
98
  "aria-label": v ? void 0 : i === "en" ? "Close" : "Lukk",
99
99
  variant: "textGray",
100
100
  size: "small",
101
- disabled: n,
101
+ disabled: a,
102
102
  disabledReason: z,
103
- onClick: b,
103
+ onClick: x,
104
104
  endIcon: /* @__PURE__ */ e(H, {
105
105
  height: 20,
106
106
  width: 20,
@@ -113,25 +113,25 @@ var Ye = ({ onCloseText: v = "", onMinimizeText: I = "", onExpandText: M = "", o
113
113
  })
114
114
  }),
115
115
  /* @__PURE__ */ e("div", {
116
- ref: s,
117
- style: fe,
118
- role: a ? "dialog" : void 0,
119
- "aria-modal": a ? !0 : void 0,
120
- "aria-label": a && typeof m == "string" ? m : void 0,
121
- className: h("fixed bottom-4 right-4 z-[51] rounded-lg bg-white shadow-[0_4px_40px_0px_rgba(34,33,51,0.4)] transition-all duration-300", F && !t && !o ? F : "", t && "!h-0 !w-0 opacity-0 duration-0", a && "fixed duration-0"),
116
+ ref: c,
117
+ style: he,
118
+ role: d ? "dialog" : void 0,
119
+ "aria-modal": d ? !0 : void 0,
120
+ "aria-label": d && typeof h == "string" ? h : void 0,
121
+ className: s("fixed bottom-4 right-4 z-[51] rounded-lg bg-white shadow-[0_4px_40px_0px_rgba(34,33,51,0.4)] transition-all duration-300", "max-xs:max-w-[calc(100vw-32px)]", F && !t && !o ? F : "", t && "!h-0 !w-0 opacity-0 duration-0", d && "fixed duration-0"),
122
122
  "data-testid": E,
123
- children: /* @__PURE__ */ l(xe.Provider, {
124
- value: s,
123
+ children: /* @__PURE__ */ l(ge.Provider, {
124
+ value: c,
125
125
  children: [/* @__PURE__ */ l("div", {
126
126
  className: "flex flex-col gap-y-2 border-b-[1px] border-delta-200 p-4",
127
127
  children: [/* @__PURE__ */ l("div", {
128
- className: "flex items-center justify-between",
129
- children: [g ? /* @__PURE__ */ e("div", {
128
+ className: "flex items-center justify-between max-xs:flex-wrap max-xs:gap-y-1",
129
+ children: [b ? /* @__PURE__ */ e("div", {
130
130
  className: "text-sm text-delta-700",
131
- children: g
131
+ children: b
132
132
  }) : /* @__PURE__ */ e("div", {
133
- className: "text-2xl font-semibold text-delta-800",
134
- children: m
133
+ className: s("text-2xl font-semibold text-delta-800", "max-xs:hyphens-auto max-xs:whitespace-normal max-xs:![overflow-wrap:anywhere]"),
134
+ children: h
135
135
  }), /* @__PURE__ */ l("div", {
136
136
  className: "flex items-center gap-x-1",
137
137
  children: [
@@ -152,7 +152,7 @@ var Ye = ({ onCloseText: v = "", onMinimizeText: I = "", onExpandText: M = "", o
152
152
  children: I
153
153
  }) })
154
154
  }),
155
- (ne || N) && L && /* @__PURE__ */ e(u, {
155
+ (ae || N) && L && /* @__PURE__ */ e(u, {
156
156
  title: U,
157
157
  open: N ? !1 : void 0,
158
158
  children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(r, {
@@ -163,9 +163,9 @@ var Ye = ({ onCloseText: v = "", onMinimizeText: I = "", onExpandText: M = "", o
163
163
  disabled: N,
164
164
  disabledReason: D,
165
165
  onClick: () => {
166
- V !== void 0 && P ? P(!o) : ae(!W);
166
+ V !== void 0 && P ? P(!o) : de(!W);
167
167
  },
168
- endIcon: o ? /* @__PURE__ */ e(ge, {
168
+ endIcon: o ? /* @__PURE__ */ e(be, {
169
169
  width: 20,
170
170
  height: 20,
171
171
  color: "text-delta-700"
@@ -179,15 +179,15 @@ var Ye = ({ onCloseText: v = "", onMinimizeText: I = "", onExpandText: M = "", o
179
179
  }),
180
180
  j && /* @__PURE__ */ e(u, {
181
181
  title: i === "en" ? "Close" : "Lukk",
182
- open: n ? !1 : void 0,
182
+ open: a ? !1 : void 0,
183
183
  children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(r, {
184
184
  dataTest: "close-button",
185
185
  "aria-label": v ? void 0 : i === "en" ? "Close" : "Lukk",
186
186
  variant: "textGray",
187
187
  size: "small",
188
- disabled: n,
188
+ disabled: a,
189
189
  disabledReason: z,
190
- onClick: b,
190
+ onClick: x,
191
191
  endIcon: /* @__PURE__ */ e(H, {
192
192
  height: 20,
193
193
  width: 20,
@@ -198,19 +198,19 @@ var Ye = ({ onCloseText: v = "", onMinimizeText: I = "", onExpandText: M = "", o
198
198
  })
199
199
  ]
200
200
  })]
201
- }), g && /* @__PURE__ */ e("div", {
202
- className: "truncate text-2xl font-semibold text-delta-800",
203
- children: m
201
+ }), b && /* @__PURE__ */ e("div", {
202
+ className: s("truncate text-2xl font-semibold text-delta-800", "max-xs:hyphens-auto max-xs:whitespace-normal max-xs:![overflow-wrap:anywhere]"),
203
+ children: h
204
204
  })]
205
205
  }), /* @__PURE__ */ l("div", {
206
206
  className: Q("flex flex-col", o && !t && "h-[87dvh]"),
207
207
  children: [/* @__PURE__ */ e("div", {
208
208
  className: "flex-grow overflow-y-auto overscroll-contain",
209
- children: typeof x == "function" ? x({ fullScreen: o }) : x
210
- }), (Array.isArray(d) && d.length || typeof d == "function") && f || O ? /* @__PURE__ */ l("div", {
211
- className: h("flex items-center justify-between border-0 border-t-[1px] border-solid border-delta-200 bg-white p-4", re),
209
+ children: typeof g == "function" ? g({ fullScreen: o }) : g
210
+ }), (Array.isArray(n) && n.length || typeof n == "function") && f || O ? /* @__PURE__ */ l("div", {
211
+ className: s("flex items-center justify-between border-0 border-t-[1px] border-solid border-delta-200 bg-white p-4", re),
212
212
  children: [
213
- Array.isArray(d) && d.length && f ? /* @__PURE__ */ l(p, { children: [/* @__PURE__ */ e(r, {
213
+ Array.isArray(n) && n.length && f ? /* @__PURE__ */ l(p, { children: [/* @__PURE__ */ e(r, {
214
214
  dataTest: "extra-actions-button",
215
215
  variant: "textGray",
216
216
  startIcon: /* @__PURE__ */ e(ue, {
@@ -223,26 +223,26 @@ var Ye = ({ onCloseText: v = "", onMinimizeText: I = "", onExpandText: M = "", o
223
223
  open: oe,
224
224
  anchorEl: se,
225
225
  onClose: me,
226
- children: d.map((c) => /* @__PURE__ */ e(Ne, {
227
- className: c.className,
228
- onClick: c.onClick,
229
- children: c.label
230
- }, c.label))
231
- })] }) : f && typeof d == "function" && /* @__PURE__ */ e(r, {
226
+ children: n.map((m) => /* @__PURE__ */ e(Ne, {
227
+ className: m.className,
228
+ onClick: m.onClick,
229
+ children: m.label
230
+ }, m.label))
231
+ })] }) : f && typeof n == "function" && /* @__PURE__ */ e(r, {
232
232
  dataTest: "extra-action-button",
233
233
  variant: "text",
234
- onClick: d,
234
+ onClick: n,
235
235
  children: f
236
236
  }),
237
237
  " ",
238
238
  O,
239
239
  A ? /* @__PURE__ */ e("div", {
240
- className: h("flex justify-end gap-x-2", G),
240
+ className: s("flex justify-end gap-x-2", G),
241
241
  children: K
242
242
  }) : null
243
243
  ]
244
244
  }) : /* @__PURE__ */ e(p, { children: A ? /* @__PURE__ */ e("div", {
245
- className: h("flex justify-end gap-x-2 border-t-[1px] border-delta-200 p-4", G),
245
+ className: s("flex justify-end gap-x-2 border-t-[1px] border-delta-200 p-4", G),
246
246
  children: K
247
247
  }) : null })]
248
248
  })]
@@ -1,60 +1,60 @@
1
- import { cn as a } from "../../../../helpers/cn.js";
1
+ import { cn as l } from "../../../../helpers/cn.js";
2
2
  import { firstTabbable as A } from "../../../../helpers/focusable.js";
3
- import { StyledTooltip as le } from "../../../data-display/tooltip/StyledTooltip.js";
4
- import { DialogBusyContext as L, useDialogBusyBoundary as ne } from "../../dialog/DialogBusyContext.js";
3
+ import { StyledTooltip as ne } from "../../../data-display/tooltip/StyledTooltip.js";
4
+ import { DialogBusyContext as L, useDialogBusyBoundary as ie } from "../../dialog/DialogBusyContext.js";
5
5
  import { useMobileMediaQuery as oe } from "../../../../hooks/useMediaQuery.hook.js";
6
- import { OverlayBackOwnerContext as re, isOverlayBackNavigationPending as se, useBackCloses as ce } from "../../../../hooks/useBackCloses.hook.js";
7
- import { useFocusTrap as ae } from "../../../../hooks/useFocusTrap.hook.js";
8
- import { fullScreenFieldWidthVars as de } from "../../../inputs/field-styles.js";
6
+ import { OverlayBackOwnerContext as re, isOverlayBackNavigationPending as ae, useBackCloses as se } from "../../../../hooks/useBackCloses.hook.js";
7
+ import { useFocusTrap as ce } from "../../../../hooks/useFocusTrap.hook.js";
8
+ import { fullScreenFieldWidthVars as me } from "../../../inputs/field-styles.js";
9
9
  import { CloseBtn as V } from "../components/CloseBtn.js";
10
10
  import { MinimizeBtn as $ } from "../components/MinimizeBtn.js";
11
- import { FullScreenBtn as me } from "../components/FullscreenBtn.js";
12
- import h from "./MinimizableDialogV2.module.js";
11
+ import { FullScreenBtn as de } from "../components/FullscreenBtn.js";
12
+ import v from "./MinimizableDialogV2.module.js";
13
13
  import { useTranslations as ue } from "./useTranslations.js";
14
- import { useControlledProps as fe } from "./useControlledProps.js";
15
- import pe from "clsx";
16
- import { useId as W, useLayoutEffect as H, useRef as d } from "react";
17
- import { Fragment as xe, jsx as e, jsxs as o } from "react/jsx-runtime";
18
- var je = (w) => {
19
- const { showCloseIcon: R = !0, showMinimizeIcon: _ = !0, showExpandIcon: Q = !0, enableFullscreen: U = !0, fullscreenLockedReason: N, title: u, label: f, children: G, open: i, onClose: J, classNameOverrides: b = {
14
+ import { useControlledProps as xe } from "./useControlledProps.js";
15
+ import fe from "clsx";
16
+ import { useId as W, useLayoutEffect as H, useRef as m } from "react";
17
+ import { Fragment as pe, jsx as e, jsxs as r } from "react/jsx-runtime";
18
+ var Pe = (C) => {
19
+ const { showCloseIcon: R = !0, showMinimizeIcon: _ = !0, showExpandIcon: Q = !0, enableFullscreen: U = !0, fullscreenLockedReason: N, title: u, label: x, children: G, open: n, onClose: J, classNameOverrides: y = {
20
20
  maximized: "",
21
21
  minimized: "",
22
22
  fullscreen: ""
23
- }, dataTest: K, actionNode: X, locale: Y = "en", busyReason: Z, style: B, initialFocusRef: F } = w, r = oe(), l = ue(Y), n = d(null), p = d(null), S = d(null), k = d(null), g = d(!1), y = d(null), x = W(), T = W(), { minimized: t, setMinimized: I, fullScreen: s, setFullScreen: M } = fe(w), c = s && !t, E = !!N, { busy: z, busyReason: P, contextValue: j } = ne(Z ?? l.waitUntilSaved), v = () => {
24
- if (z) return !1;
23
+ }, dataTest: K, actionNode: X, locale: Y = "en", busyReason: Z, style: B, initialFocusRef: F } = C, a = oe(), i = ue(Y), o = m(null), f = m(null), S = m(null), k = m(null), b = m(!1), w = m(null), p = W(), T = W(), { minimized: t, setMinimized: I, fullScreen: s, setFullScreen: M } = xe(C), c = s && !t, j = !!N, { busy: g, busyReason: E, contextValue: P } = ie(Z ?? i.waitUntilSaved), h = () => {
24
+ if (g) return !1;
25
25
  I(!1), J();
26
26
  };
27
27
  H(() => {
28
- n.current?.toggleAttribute("inert", t), p.current?.toggleAttribute("inert", !t);
28
+ o.current?.toggleAttribute("inert", t), f.current?.toggleAttribute("inert", !t);
29
29
  }, [t]), H(() => {
30
- const C = i && !g.current, m = !i && g.current;
31
- if (g.current = i, m) {
32
- const D = y.current;
33
- y.current = null, (!document.activeElement || document.activeElement === document.body) && D?.isConnected && D.focus({ preventScroll: !0 });
30
+ const z = n && !b.current, d = !n && b.current;
31
+ if (b.current = n, d) {
32
+ const D = w.current;
33
+ w.current = null, (!document.activeElement || document.activeElement === document.body) && D?.isConnected && D.focus({ preventScroll: !0 });
34
34
  return;
35
35
  }
36
- if (!C) return;
37
- y.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
38
- const q = t ? p.current : n.current, ie = t ? k.current : S.current;
39
- (F?.current ?? ie ?? (q ? A(q) : void 0))?.focus({ preventScroll: !0 });
36
+ if (!z) return;
37
+ w.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
38
+ const q = t ? f.current : o.current, le = t ? k.current : S.current;
39
+ (F?.current ?? le ?? (q ? A(q) : void 0))?.focus({ preventScroll: !0 });
40
40
  }, [
41
41
  F,
42
42
  t,
43
- i
43
+ n
44
44
  ]);
45
45
  const O = () => {
46
- const C = t ? n : p;
46
+ const z = t ? o : f;
47
47
  I(!t), requestAnimationFrame(() => {
48
- const m = C.current;
49
- m && (m.querySelector('[data-testid="toggle-minimize-btn"]') ?? A(m))?.focus({ preventScroll: !0 });
48
+ const d = z.current;
49
+ d && (d.querySelector('[data-testid="toggle-minimize-btn"]') ?? A(d))?.focus({ preventScroll: !0 });
50
50
  });
51
51
  };
52
- ae(i && c, n, v), ce({
53
- active: i && !t,
54
- requestClose: () => !c && se() ? !1 : v(),
55
- ownerRef: n
52
+ ce(n && c, o, h), se({
53
+ active: n && !t,
54
+ requestClose: () => !c && ae() ? !1 : h(),
55
+ ownerRef: o
56
56
  });
57
- const ee = c ? r ? {
57
+ const ee = c ? a ? {
58
58
  inset: 0,
59
59
  maxHeight: "100dvh",
60
60
  maxWidth: "100dvw",
@@ -70,44 +70,44 @@ var je = (w) => {
70
70
  width: "min(1000px, calc(100vw - 32px))",
71
71
  maxWidth: "min(1000px, calc(100vw - 32px))",
72
72
  height: "95dvh",
73
- ...de
73
+ ...me
74
74
  } : void 0;
75
- if (!i) return null;
76
- const te = f ? `${T} ${x}` : x;
77
- return /* @__PURE__ */ o(xe, { children: [
75
+ if (!n) return null;
76
+ const te = x ? `${T} ${p}` : p;
77
+ return /* @__PURE__ */ r(pe, { children: [
78
78
  /* @__PURE__ */ e("div", {
79
- ref: p,
79
+ ref: f,
80
80
  style: {
81
81
  zIndex: 51,
82
82
  ...B
83
83
  },
84
- className: a(h["minimized-dialog"], !t && h.hidden, b.minimized),
85
- children: /* @__PURE__ */ o("div", {
86
- className: pe("flex items-center justify-between", !t && "hidden"),
84
+ className: l(v["minimized-dialog"], !t && v.hidden, y.minimized),
85
+ children: /* @__PURE__ */ r("div", {
86
+ className: fe("flex items-center justify-between", !t && "hidden"),
87
87
  "data-testid": K,
88
88
  children: [/* @__PURE__ */ e("div", {
89
- className: "max-w-[303px] truncate pr-1 text-lg font-semibold text-delta-800",
90
- children: /* @__PURE__ */ e(le, {
89
+ className: l("max-w-[303px] truncate pr-1 text-lg font-semibold text-delta-800", "max-xs:hyphens-auto max-xs:whitespace-normal max-xs:![overflow-wrap:anywhere]"),
90
+ children: /* @__PURE__ */ e(ne, {
91
91
  title: u,
92
92
  placement: "top",
93
93
  children: /* @__PURE__ */ e("div", {
94
- className: "truncate",
94
+ className: l("truncate", "max-xs:hyphens-auto max-xs:whitespace-normal max-xs:![overflow-wrap:anywhere]"),
95
95
  children: u
96
96
  })
97
97
  })
98
- }), /* @__PURE__ */ o("div", {
98
+ }), /* @__PURE__ */ r("div", {
99
99
  className: "flex items-center gap-x-1",
100
100
  children: [/* @__PURE__ */ e($, {
101
101
  type: "expand",
102
102
  visibility: Q,
103
103
  onClick: O,
104
- tooltipTitle: l.expand
104
+ tooltipTitle: i.expand
105
105
  }), /* @__PURE__ */ e(V, {
106
106
  buttonRef: k,
107
107
  showCloseIcon: R,
108
- onClick: v,
109
- disabledReason: z ? P : void 0,
110
- tooltipTitle: l.close
108
+ onClick: h,
109
+ disabledReason: g ? E : void 0,
110
+ tooltipTitle: i.close
111
111
  })]
112
112
  })]
113
113
  })
@@ -115,7 +115,7 @@ var je = (w) => {
115
115
  c && /* @__PURE__ */ e("div", {
116
116
  className: "fixed inset-0 z-[52] bg-[rgb(98,110,126)] bg-opacity-70",
117
117
  onClick: () => {
118
- E || M(!1);
118
+ j || M(!1);
119
119
  }
120
120
  }),
121
121
  /* @__PURE__ */ e("div", {
@@ -124,65 +124,65 @@ var je = (w) => {
124
124
  ...B,
125
125
  ...ee
126
126
  },
127
- ref: n,
127
+ ref: o,
128
128
  role: "dialog",
129
129
  "aria-modal": c ? !0 : void 0,
130
130
  "aria-labelledby": te,
131
- className: a(h.dialog, t && h.hidden, !s && b.maximized, s && b.fullscreen, c && "fixed z-[53] duration-0"),
132
- children: /* @__PURE__ */ o(re.Provider, {
133
- value: n,
134
- children: [/* @__PURE__ */ o("div", {
135
- className: a("flex flex-col border-b-[1px] border-delta-200 px-4", r ? "py-3" : "py-4"),
136
- children: [/* @__PURE__ */ o("div", {
137
- className: "flex items-center justify-between",
138
- children: [f ? /* @__PURE__ */ e("div", {
131
+ className: l(v.dialog, t && v.hidden, !s && y.maximized, s && y.fullscreen, c && "fixed z-[53] duration-0"),
132
+ children: /* @__PURE__ */ r(re.Provider, {
133
+ value: o,
134
+ children: [/* @__PURE__ */ r("div", {
135
+ className: l("flex flex-col border-b-[1px] border-delta-200 px-4", a ? "py-3" : "py-4"),
136
+ children: [/* @__PURE__ */ r("div", {
137
+ className: l("flex items-center justify-between", "max-xs:flex-col-reverse max-xs:items-stretch max-xs:gap-2"),
138
+ children: [x ? /* @__PURE__ */ e("div", {
139
139
  id: T,
140
- className: "text-sm text-delta-700",
141
- children: f
140
+ className: "text-sm text-delta-700 max-xs:hyphens-auto max-xs:![overflow-wrap:anywhere]",
141
+ children: x
142
142
  }) : /* @__PURE__ */ e("div", {
143
- id: x,
144
- className: a("font-semibold text-delta-800", r ? "line-clamp-2 text-xl" : "line-clamp-1 text-2xl"),
143
+ id: p,
144
+ className: l("font-semibold text-delta-800", a ? "line-clamp-2 text-xl" : "line-clamp-1 text-2xl", "max-xs:line-clamp-none", "max-xs:hyphens-auto max-xs:whitespace-normal max-xs:![overflow-wrap:anywhere]"),
145
145
  children: u
146
- }), /* @__PURE__ */ o("div", {
147
- className: "flex items-center gap-x-1",
146
+ }), /* @__PURE__ */ r("div", {
147
+ className: "flex items-center gap-x-1 max-xs:flex-wrap max-xs:justify-end max-xs:gap-y-2",
148
148
  children: [
149
149
  /* @__PURE__ */ e(L.Provider, {
150
- value: j,
150
+ value: P,
151
151
  children: X
152
152
  }),
153
153
  /* @__PURE__ */ e($, {
154
- visibility: _ && !r,
154
+ visibility: _ && !a,
155
155
  type: "minimize",
156
156
  onClick: O,
157
- tooltipTitle: l.minimize
157
+ tooltipTitle: i.minimize
158
158
  }),
159
- /* @__PURE__ */ e(me, {
160
- showFullScreenIcon: (U || E) && !r,
159
+ /* @__PURE__ */ e(de, {
160
+ showFullScreenIcon: (U || j) && !a,
161
161
  disabledReason: N,
162
162
  fullScreen: s,
163
163
  onClick: () => {
164
164
  M(!s);
165
165
  },
166
- tooltipTitle: s ? l.exitFullscreen : l.fullscreen
166
+ tooltipTitle: s ? i.exitFullscreen : i.fullscreen
167
167
  }),
168
168
  /* @__PURE__ */ e(V, {
169
169
  buttonRef: S,
170
170
  showCloseIcon: R,
171
- onClick: v,
172
- disabledReason: z ? P : void 0,
173
- tooltipTitle: l.close
171
+ onClick: h,
172
+ disabledReason: g ? E : void 0,
173
+ tooltipTitle: i.close
174
174
  })
175
175
  ]
176
176
  })]
177
- }), f && /* @__PURE__ */ e("div", {
178
- id: x,
179
- className: a("font-semibold text-delta-800", r ? "line-clamp-2 text-xl" : "line-clamp-1 text-2xl"),
177
+ }), x && /* @__PURE__ */ e("div", {
178
+ id: p,
179
+ className: l("font-semibold text-delta-800", a ? "line-clamp-2 text-xl" : "line-clamp-1 text-2xl", "max-xs:line-clamp-none", "max-xs:hyphens-auto max-xs:whitespace-normal max-xs:![overflow-wrap:anywhere]"),
180
180
  children: u
181
181
  })]
182
182
  }), /* @__PURE__ */ e("div", {
183
- className: a(t && "hidden", "flex flex-grow flex-col overflow-y-auto overscroll-contain"),
183
+ className: l(t && "hidden", "flex flex-grow flex-col overflow-y-auto overscroll-contain"),
184
184
  children: /* @__PURE__ */ e(L.Provider, {
185
- value: j,
185
+ value: P,
186
186
  children: G
187
187
  })
188
188
  })]
@@ -191,5 +191,5 @@ var je = (w) => {
191
191
  ] });
192
192
  };
193
193
  export {
194
- je as MinimizableDialogV2
194
+ Pe as MinimizableDialogV2
195
195
  };
@@ -1,9 +1,9 @@
1
1
  import { cn as i } from "../../../helpers/cn.js";
2
- import { resolveSx as g } from "../../../helpers/sx.js";
3
- import { CloseIcon as x } from "../../icons/close-icon/CloseIcon.js";
4
- import { CheckOutlineIcon as h } from "./components/CheckOutlineIcon.js";
5
- import { ErrorOutlineIcon as u } from "./components/ErrorOutlineIcon.js";
6
- import { InfoOutlineIcon as m } from "./components/InfoOutlineIcon.js";
2
+ import { resolveSx as f } from "../../../helpers/sx.js";
3
+ import { CloseIcon as h } from "../../icons/close-icon/CloseIcon.js";
4
+ import { CheckOutlineIcon as g } from "./components/CheckOutlineIcon.js";
5
+ import { ErrorOutlineIcon as m } from "./components/ErrorOutlineIcon.js";
6
+ import { InfoOutlineIcon as u } from "./components/InfoOutlineIcon.js";
7
7
  import { WarningAmberOutlineIcon as w } from "./components/WarningAmberOutlineIcon.js";
8
8
  import { jsx as r, jsxs as p } from "react/jsx-runtime";
9
9
  var I = {
@@ -49,11 +49,11 @@ var I = {
49
49
  filled: "px-4 py-2",
50
50
  outlined: "px-4 py-2"
51
51
  }, N = {
52
- success: /* @__PURE__ */ r(h, {
52
+ success: /* @__PURE__ */ r(g, {
53
53
  width: 20,
54
54
  height: 20
55
55
  }),
56
- info: /* @__PURE__ */ r(m, {
56
+ info: /* @__PURE__ */ r(u, {
57
57
  width: 20,
58
58
  height: 20
59
59
  }),
@@ -61,31 +61,31 @@ var I = {
61
61
  width: 20,
62
62
  height: 20
63
63
  }),
64
- error: /* @__PURE__ */ r(u, {
64
+ error: /* @__PURE__ */ r(m, {
65
65
  width: 20,
66
66
  height: 20
67
67
  })
68
- }, D = ({ severity: e = "success", variant: t = "standard", icon: n, iconMapping: c, action: d, onClose: o, children: a, className: l, sx: b, role: f = "alert" }) => {
69
- const s = n === !1 ? null : n ?? c?.[e] ?? N[e];
68
+ }, D = ({ severity: e = "success", variant: t = "standard", icon: n, iconMapping: a, action: c, onClose: o, children: d, className: l, sx: x, role: b = "alert" }) => {
69
+ const s = n === !1 ? null : n ?? a?.[e] ?? N[e];
70
70
  return /* @__PURE__ */ p("div", {
71
- role: f,
71
+ role: b,
72
72
  className: i("flex items-center gap-2 rounded text-sm", C[t], I[t][e], l),
73
- style: g(b),
73
+ style: f(x),
74
74
  children: [
75
75
  s && /* @__PURE__ */ r("span", {
76
76
  className: i("flex shrink-0 items-center", A[t][e]),
77
77
  children: s
78
78
  }),
79
79
  /* @__PURE__ */ r("span", {
80
- className: "min-w-0 flex-1",
81
- children: a
80
+ className: "min-w-0 flex-1 max-xs:hyphens-auto max-xs:![overflow-wrap:anywhere]",
81
+ children: d
82
82
  }),
83
- d ?? (o && /* @__PURE__ */ r("button", {
83
+ c ?? (o && /* @__PURE__ */ r("button", {
84
84
  type: "button",
85
85
  "aria-label": "Close",
86
86
  onClick: o,
87
87
  className: "flex h-8 min-w-8 shrink-0 items-center justify-center rounded border-0 bg-transparent px-1.5 hover:bg-black/10",
88
- children: /* @__PURE__ */ r(x, {
88
+ children: /* @__PURE__ */ r(h, {
89
89
  width: 20,
90
90
  height: 20
91
91
  })