asma-ui-core 3.134.1 → 3.134.2

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 (34) hide show
  1. package/dist/asma-ui-core.css +1 -1
  2. package/dist/components/feedback/dialog/StyledDialog.js +177 -149
  3. package/dist/components/feedback/dialog/StyledDialog.module.js +1 -1
  4. package/dist/components/feedback/dialog/StyledDialogActions.js +4 -3
  5. package/dist/components/feedback/dialog/StyledDialogContent.js +9 -8
  6. package/dist/components/feedback/dialog/StyledDialogTitle.js +23 -21
  7. package/dist/components/feedback/dialog/dialog-footer/StyledDialogFooter.js +1 -0
  8. package/dist/components/feedback/dialog/dialogHeaderStyles.js +7 -0
  9. package/dist/components/feedback/dialog/useDialogHeaderPinning.js +56 -0
  10. package/dist/components/feedback/minimizable-dialog/MinimizableDialog.js +203 -182
  11. package/dist/components/feedback/minimizable-dialog/v2/MinimizableDialogV2.js +148 -133
  12. package/dist/components/inputs/full-screen-picker/FullScreenPicker.js +1 -1
  13. package/dist/components/inputs/full-screen-picker/useReleaseFieldOnKeyboardDismiss.js +13 -12
  14. package/dist/hooks/useElementHeightPx.js +26 -0
  15. package/dist/hooks/useLayoutViewportHeight.js +5 -0
  16. package/dist/hooks/useMediaQuery.hook.js +9 -8
  17. package/dist/hooks/useOnScreenKeyboard.js +24 -0
  18. package/dist/index.js +366 -352
  19. package/dist/src/components/feedback/dialog/StyledDialog.d.ts +4 -3
  20. package/dist/src/components/feedback/dialog/StyledDialogTitle.d.ts +4 -0
  21. package/dist/src/components/feedback/dialog/dialogHeaderStyles.d.ts +28 -0
  22. package/dist/src/components/feedback/dialog/dialogTitleContext.d.ts +5 -0
  23. package/dist/src/components/feedback/dialog/useDialogHeaderPinning.d.ts +33 -0
  24. package/dist/src/hooks/useElementHeightPx.d.ts +16 -0
  25. package/dist/src/hooks/useLayoutViewportHeight.d.ts +6 -0
  26. package/dist/src/hooks/useMediaQuery.hook.d.ts +6 -0
  27. package/dist/src/hooks/useOnScreenKeyboard.d.ts +21 -0
  28. package/dist/src/index.d.ts +6 -0
  29. package/dist/table/components/StyledTableIndex.js +5 -5
  30. package/package.json +1 -1
  31. package/dist/src/table/components/columns/helpers/useElementHeightPx.d.ts +0 -7
  32. package/dist/table/components/columns/helpers/useElementHeightPx.js +0 -26
  33. /package/dist/{components/inputs/full-screen-picker → hooks}/useVisualViewportHeight.js +0 -0
  34. /package/dist/src/{components/inputs/full-screen-picker → hooks}/useVisualViewportHeight.d.ts +0 -0
@@ -1,36 +1,38 @@
1
1
  import { cn as s } from "../../../helpers/cn.js";
2
- import { firstTabbable as fe } from "../../../helpers/focusable.js";
3
- import { StyledTooltip as u } from "../../data-display/tooltip/StyledTooltip.js";
4
- import { DotsVerticalIcon as ue } from "../../icons/dots-vertical-icon/DotsVerticalIcon.js";
5
- import { CloseIcon as H } from "../../icons/close-icon/CloseIcon.js";
6
- import { MinimizeIcon as ve } from "../../icons/minimize-icon/MinimizeIcon.js";
7
- import { KeyboardCapslockIcon as xe } from "../../icons/keyboard-capslock-icon/KeyboardCapslockIcon.js";
8
- import { ArrowExpandIcon as pe } from "../../icons/arrow-expand-icon/ArrowExpandIcon.js";
9
- import { ArrowShrinkIcon as be } from "../../icons/arrow-shrink-icon/ArrowShrinkIcon.js";
10
- import { StyledButton as r } from "../../inputs/button/StyledButton.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
- import { StyledMenu as ze } from "../../navigation/menu/StyledMenu.js";
14
- import { StyledMenuItem as Ne } from "../../navigation/menu/StyledMenuItem.js";
15
- import { fullScreenFieldWidthVars as Ce } from "../../inputs/field-styles.js";
16
- import J from "./MinimizableDialog.module.js";
17
- import { useToggleMenuVisibility as Ie } from "../../../hooks/useToggleMenuVisibility.hook.js";
18
- import Q from "clsx";
19
- import { useLayoutEffect as Me, useRef as X, useState as Y } from "react";
2
+ import { firstTabbable as we } from "../../../helpers/focusable.js";
3
+ import { StyledTooltip as f } from "../../data-display/tooltip/StyledTooltip.js";
4
+ import { DotsVerticalIcon as ye } from "../../icons/dots-vertical-icon/DotsVerticalIcon.js";
5
+ import { CloseIcon as Y } from "../../icons/close-icon/CloseIcon.js";
6
+ import { MinimizeIcon as ke } from "../../icons/minimize-icon/MinimizeIcon.js";
7
+ import { KeyboardCapslockIcon as ze } from "../../icons/keyboard-capslock-icon/KeyboardCapslockIcon.js";
8
+ import { ArrowExpandIcon as Ce } from "../../icons/arrow-expand-icon/ArrowExpandIcon.js";
9
+ import { ArrowShrinkIcon as Ie } from "../../icons/arrow-shrink-icon/ArrowShrinkIcon.js";
10
+ import { StyledButton as a } from "../../inputs/button/StyledButton.js";
11
+ import { OverlayBackOwnerContext as Ne, isOverlayBackNavigationPending as Se, useBackCloses as _e } from "../../../hooks/useBackCloses.hook.js";
12
+ import { useFocusTrap as Re } from "../../../hooks/useFocusTrap.hook.js";
13
+ import { StyledMenu as Ee } from "../../navigation/menu/StyledMenu.js";
14
+ import { StyledMenuItem as Me } from "../../navigation/menu/StyledMenuItem.js";
15
+ import { useDialogHeaderPinning as Ae } from "../dialog/useDialogHeaderPinning.js";
16
+ import { DIALOG_HEADER_ACTIONS_ROW_CLASSES as De, DIALOG_HEADER_CLASSES as Oe, DIALOG_TITLE_CLASSES as je, dialogContentFlowClasses as Fe } from "../dialog/dialogHeaderStyles.js";
17
+ import { fullScreenFieldWidthVars as Ge } from "../../inputs/field-styles.js";
18
+ import Z from "./MinimizableDialog.module.js";
19
+ import { useToggleMenuVisibility as Pe } from "../../../hooks/useToggleMenuVisibility.hook.js";
20
+ import B from "clsx";
21
+ import { useId as qe, useLayoutEffect as Le, useRef as S, useState as ee } from "react";
20
22
  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: 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
- ee();
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(),
23
+ var mi = ({ onCloseText: u = "", onMinimizeText: _ = "", onExpandText: R = "", onFullScreenText: E = "", showCloseIcon: M = !0, showMinimizeIcon: ie = !0, showExpandIcon: te = !0, showFullScreenIcon: le = !0, title: g, label: A, children: x, open: w, onClose: ae, className: D = "", primaryButtonText: O, primaryButtonLoading: d = !1, primaryButtonDisabled: de, primaryButtonDisabledReason: re, secondaryButtonText: y, onPrimaryButtonClick: j, onSecondaryButtonClick: F, dataTest: G, actionNode: ne, extraActions: r, extraActionsText: h, btnContainerClassName: P, footerClassName: oe, footerInfo: q, locale: t = "en", enableFullscreen: se = !0, fullscreenLockedReason: L, fullScreenState: T, handleFullScreenState: H }) => {
24
+ const [i, ce] = ee(!1), [V, me] = ee(!1), { open: fe, anchorEl: he, handleOpen: ue, handleClose: ve } = Pe(), c = S(null), k = S(null), W = qe(), U = S(null), { headerRef: be, pinned: v, hidden: z, scrollPaddingTop: pe, scrollPaddingBottom: ge } = Ae(U), C = t === "en" ? "Wait until saved" : "Vent til lagringen er ferdig", b = () => {
25
+ if (d) return !1;
26
+ ae();
27
+ }, o = T ?? V, n = o && !i, I = !!L;
28
+ if (Re(w && n, c, b), _e({
29
+ active: w && !i,
30
+ requestClose: () => !n && Se() ? !1 : b(),
29
31
  ownerRef: c
30
- }), Me(() => {
31
- c.current?.toggleAttribute("inert", t), k.current?.toggleAttribute("inert", !t);
32
- }, [t]), !w) return null;
33
- const he = d ? {
32
+ }), Le(() => {
33
+ c.current?.toggleAttribute("inert", i), k.current?.toggleAttribute("inert", !i);
34
+ }, [i]), !w) return null;
35
+ const xe = n ? {
34
36
  right: "auto",
35
37
  bottom: "auto",
36
38
  left: "50%",
@@ -38,75 +40,81 @@ var Ye = ({ onCloseText: v = "", onMinimizeText: I = "", onExpandText: M = "", o
38
40
  transform: "translate(-50%, -50%)",
39
41
  width: "min(1000px, calc(100vw - 32px))",
40
42
  height: "95dvh",
41
- ...Ce
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
+ ...Ge
44
+ } : void 0, $ = o ? t === "en" ? "Exit full screen" : "Avslutt fullskjerm" : t === "en" ? "Full screen" : "Fullskjerm", K = O ?? d, J = K || y, Q = /* @__PURE__ */ l(p, { children: [y && F && /* @__PURE__ */ e(a, {
43
45
  dataTest: "cancel-button",
44
46
  variant: "outlined",
45
- disabled: a,
46
- disabledReason: z,
47
- onClick: q,
47
+ disabled: d,
48
+ disabledReason: C,
49
+ onClick: F,
48
50
  children: y
49
- }), $ && _ && /* @__PURE__ */ e(r, {
51
+ }), K && j && /* @__PURE__ */ e(a, {
50
52
  dataTest: "save-button",
51
- loading: a,
52
- locale: i,
53
- disabled: te,
54
- disabledReason: ie,
55
- onClick: _,
56
- children: S
57
- })] }), T = () => {
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 });
53
+ loading: d,
54
+ locale: t,
55
+ disabled: de,
56
+ disabledReason: re,
57
+ onClick: j,
58
+ children: O
59
+ })] }), X = () => {
60
+ const m = i ? c : k;
61
+ ce(!i), requestAnimationFrame(() => {
62
+ const N = m.current;
63
+ N && (N.querySelector('[data-testid="minimize-button"]') ?? we(N))?.focus({ preventScroll: !0 });
62
64
  });
63
65
  };
64
66
  return /* @__PURE__ */ l(p, { children: [
65
- d && /* @__PURE__ */ e("div", { className: "fixed inset-0 z-[51] bg-[rgb(98,110,126)] bg-opacity-70" }),
67
+ n && /* @__PURE__ */ e("div", { className: "fixed inset-0 z-[51] bg-[rgb(98,110,126)] bg-opacity-70" }),
66
68
  /* @__PURE__ */ e("div", {
67
69
  ref: k,
68
70
  style: { zIndex: 51 },
69
- className: s(J.dialog, !t && J.hidden, t && "max-xs:w-[calc(100vw-32px)]"),
71
+ className: s(Z.dialog, !i && Z.hidden, i && "max-xs:w-[calc(100vw-32px)]"),
70
72
  children: /* @__PURE__ */ l("div", {
71
- className: Q("flex items-center justify-between", !t && "hidden"),
72
- "data-testid": E,
73
- children: [/* @__PURE__ */ e("div", {
74
- className: "truncate text-lg font-semibold text-delta-800",
75
- children: h
73
+ className: B("flex items-center justify-between", !i && "hidden"),
74
+ "data-testid": G,
75
+ children: [/* @__PURE__ */ e(f, {
76
+ title: g,
77
+ placement: "top",
78
+ children: /* @__PURE__ */ e("div", {
79
+ tabIndex: 0,
80
+ "data-testid": "minimized-title",
81
+ className: "min-w-0 truncate text-lg font-semibold text-delta-800 focus-visible:[outline-offset:-2px]",
82
+ children: g
83
+ })
76
84
  }), /* @__PURE__ */ l("div", {
77
85
  className: "flex items-center gap-x-1",
78
- children: [B && /* @__PURE__ */ e(u, {
79
- title: i === "en" ? "Expand" : "Utvid",
80
- children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(r, {
86
+ children: [te && /* @__PURE__ */ e(f, {
87
+ title: t === "en" ? "Expand" : "Utvid",
88
+ children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(a, {
81
89
  dataTest: "minimize-button",
82
- "aria-label": M ? void 0 : i === "en" ? "Expand" : "Utvid",
90
+ "aria-label": R ? void 0 : t === "en" ? "Expand" : "Utvid",
83
91
  variant: "text",
84
92
  size: "small",
85
- onClick: T,
86
- endIcon: /* @__PURE__ */ e(xe, {
93
+ onClick: X,
94
+ endIcon: /* @__PURE__ */ e(ze, {
87
95
  height: 20,
88
96
  width: 20,
89
97
  color: "text-gama-500"
90
98
  }),
91
- children: M
99
+ children: R
92
100
  }) })
93
- }), j && /* @__PURE__ */ e(u, {
94
- title: i === "en" ? "Close" : "Lukk",
95
- open: a ? !1 : void 0,
96
- children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(r, {
101
+ }), M && /* @__PURE__ */ e(f, {
102
+ title: t === "en" ? "Close" : "Lukk",
103
+ open: d ? !1 : void 0,
104
+ children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(a, {
97
105
  dataTest: "close-button",
98
- "aria-label": v ? void 0 : i === "en" ? "Close" : "Lukk",
106
+ "aria-label": u ? void 0 : t === "en" ? "Close" : "Lukk",
99
107
  variant: "textGray",
100
108
  size: "small",
101
- disabled: a,
102
- disabledReason: z,
103
- onClick: x,
104
- endIcon: /* @__PURE__ */ e(H, {
109
+ disabled: d,
110
+ disabledReason: C,
111
+ onClick: b,
112
+ endIcon: /* @__PURE__ */ e(Y, {
105
113
  height: 20,
106
114
  width: 20,
107
115
  color: "text-delta-700"
108
116
  }),
109
- children: v
117
+ children: u
110
118
  }) })
111
119
  })]
112
120
  })]
@@ -114,142 +122,155 @@ var Ye = ({ onCloseText: v = "", onMinimizeText: I = "", onExpandText: M = "", o
114
122
  }),
115
123
  /* @__PURE__ */ e("div", {
116
124
  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
- "data-testid": E,
123
- children: /* @__PURE__ */ l(ge.Provider, {
125
+ style: xe,
126
+ role: n ? "dialog" : void 0,
127
+ "aria-modal": n ? !0 : void 0,
128
+ "aria-labelledby": n ? W : void 0,
129
+ 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)]", D && !i && !o ? D : "", i && "!h-0 !w-0 opacity-0 duration-0", n && "fixed duration-0"),
130
+ "data-testid": G,
131
+ children: /* @__PURE__ */ e(Ne.Provider, {
124
132
  value: c,
125
- children: [/* @__PURE__ */ l("div", {
126
- className: "flex flex-col gap-y-2 border-b-[1px] border-delta-200 p-4",
133
+ children: /* @__PURE__ */ l("div", {
134
+ className: B("flex flex-col", o && !i && "h-full"),
127
135
  children: [/* @__PURE__ */ l("div", {
128
- className: "flex items-center justify-between max-xs:flex-wrap max-xs:gap-y-1",
129
- children: [b ? /* @__PURE__ */ e("div", {
130
- className: "text-sm text-delta-700",
131
- children: b
132
- }) : /* @__PURE__ */ e("div", {
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
- }), /* @__PURE__ */ l("div", {
136
- className: "flex items-center gap-x-1",
137
- children: [
138
- le,
139
- Z && /* @__PURE__ */ e(u, {
140
- title: i === "en" ? "Minimize" : "Minimer",
141
- children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(r, {
142
- dataTest: "minimize-button",
143
- "aria-label": I ? void 0 : i === "en" ? "Minimize" : "Minimer",
144
- variant: "textGray",
145
- size: "small",
146
- onClick: T,
147
- endIcon: /* @__PURE__ */ e(ve, {
148
- height: 20,
149
- width: 20,
150
- color: "text-delta-700"
136
+ ref: U,
137
+ "data-dialog-body": "",
138
+ className: s("flex min-h-0 flex-grow flex-col overflow-y-auto overscroll-contain", "[&_[data-dialog-footer]]:sticky [&_[data-dialog-footer]]:bottom-0 [&_[data-dialog-footer]]:z-[2] [&_[data-dialog-footer]]:bg-white"),
139
+ style: {
140
+ scrollPaddingTop: pe,
141
+ scrollPaddingBottom: ge
142
+ },
143
+ children: [/* @__PURE__ */ l("div", {
144
+ ref: be,
145
+ "data-dialog-header": "",
146
+ "data-header-pinned": v ? "true" : "false",
147
+ "aria-hidden": z || void 0,
148
+ hidden: z,
149
+ className: s(Oe, "rounded-t-lg border-b-[1px] border-delta-200", v && "sticky top-0 z-[2]", z && "hidden"),
150
+ children: [/* @__PURE__ */ l("div", {
151
+ className: De,
152
+ children: [A && /* @__PURE__ */ e("div", {
153
+ className: "min-w-0 flex-auto hyphens-auto text-sm text-delta-700 [overflow-wrap:anywhere]",
154
+ children: A
155
+ }), /* @__PURE__ */ l("div", {
156
+ className: "ml-auto flex items-center gap-x-1 max-xs:flex-wrap max-xs:justify-end max-xs:gap-y-1",
157
+ children: [
158
+ ne,
159
+ ie && /* @__PURE__ */ e(f, {
160
+ title: t === "en" ? "Minimize" : "Minimer",
161
+ children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(a, {
162
+ dataTest: "minimize-button",
163
+ "aria-label": _ ? void 0 : t === "en" ? "Minimize" : "Minimer",
164
+ variant: "textGray",
165
+ size: "small",
166
+ onClick: X,
167
+ endIcon: /* @__PURE__ */ e(ke, {
168
+ height: 20,
169
+ width: 20,
170
+ color: "text-delta-700"
171
+ }),
172
+ children: _
173
+ }) })
151
174
  }),
152
- children: I
153
- }) })
154
- }),
155
- (ae || N) && L && /* @__PURE__ */ e(u, {
156
- title: U,
157
- open: N ? !1 : void 0,
158
- children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(r, {
159
- dataTest: "fullscreen-button",
160
- "aria-label": R ? void 0 : U,
161
- variant: "textGray",
162
- size: "small",
163
- disabled: N,
164
- disabledReason: D,
165
- onClick: () => {
166
- V !== void 0 && P ? P(!o) : de(!W);
167
- },
168
- endIcon: o ? /* @__PURE__ */ e(be, {
169
- width: 20,
170
- height: 20,
171
- color: "text-delta-700"
172
- }) : /* @__PURE__ */ e(pe, {
173
- width: 20,
174
- height: 20,
175
- color: "text-delta-700"
176
- }),
177
- children: R
178
- }) })
179
- }),
180
- j && /* @__PURE__ */ e(u, {
181
- title: i === "en" ? "Close" : "Lukk",
182
- open: a ? !1 : void 0,
183
- children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(r, {
184
- dataTest: "close-button",
185
- "aria-label": v ? void 0 : i === "en" ? "Close" : "Lukk",
186
- variant: "textGray",
187
- size: "small",
188
- disabled: a,
189
- disabledReason: z,
190
- onClick: x,
191
- endIcon: /* @__PURE__ */ e(H, {
192
- height: 20,
193
- width: 20,
194
- color: "text-delta-700"
175
+ (se || I) && le && /* @__PURE__ */ e(f, {
176
+ title: $,
177
+ open: I ? !1 : void 0,
178
+ children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(a, {
179
+ dataTest: "fullscreen-button",
180
+ "aria-label": E ? void 0 : $,
181
+ variant: "textGray",
182
+ size: "small",
183
+ disabled: I,
184
+ disabledReason: L,
185
+ onClick: () => {
186
+ T !== void 0 && H ? H(!o) : me(!V);
187
+ },
188
+ endIcon: o ? /* @__PURE__ */ e(Ie, {
189
+ width: 20,
190
+ height: 20,
191
+ color: "text-delta-700"
192
+ }) : /* @__PURE__ */ e(Ce, {
193
+ width: 20,
194
+ height: 20,
195
+ color: "text-delta-700"
196
+ }),
197
+ children: E
198
+ }) })
195
199
  }),
196
- children: v
197
- }) })
198
- })
199
- ]
200
+ M && /* @__PURE__ */ e(f, {
201
+ title: t === "en" ? "Close" : "Lukk",
202
+ open: d ? !1 : void 0,
203
+ children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(a, {
204
+ dataTest: "close-button",
205
+ "aria-label": u ? void 0 : t === "en" ? "Close" : "Lukk",
206
+ variant: "textGray",
207
+ size: "small",
208
+ disabled: d,
209
+ disabledReason: C,
210
+ onClick: b,
211
+ endIcon: /* @__PURE__ */ e(Y, {
212
+ height: 20,
213
+ width: 20,
214
+ color: "text-delta-700"
215
+ }),
216
+ children: u
217
+ }) })
218
+ })
219
+ ]
220
+ })]
221
+ }), /* @__PURE__ */ e("div", {
222
+ id: W,
223
+ className: je,
224
+ children: g
225
+ })]
226
+ }), /* @__PURE__ */ e("div", {
227
+ "data-dialog-content-flow": "",
228
+ className: v ? "flex-grow" : Fe(v),
229
+ children: typeof x == "function" ? x({ fullScreen: o }) : x
200
230
  })]
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
- })]
205
- }), /* @__PURE__ */ l("div", {
206
- className: Q("flex flex-col", o && !t && "h-[87dvh]"),
207
- children: [/* @__PURE__ */ e("div", {
208
- className: "flex-grow overflow-y-auto overscroll-contain",
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),
231
+ }), (Array.isArray(r) && r.length || typeof r == "function") && h || q ? /* @__PURE__ */ l("div", {
232
+ className: s("flex items-center justify-between border-0 border-t-[1px] border-solid border-delta-200 bg-white p-4", oe),
212
233
  children: [
213
- Array.isArray(n) && n.length && f ? /* @__PURE__ */ l(p, { children: [/* @__PURE__ */ e(r, {
234
+ Array.isArray(r) && r.length && h ? /* @__PURE__ */ l(p, { children: [/* @__PURE__ */ e(a, {
214
235
  dataTest: "extra-actions-button",
215
236
  variant: "textGray",
216
- startIcon: /* @__PURE__ */ e(ue, {
237
+ startIcon: /* @__PURE__ */ e(ye, {
217
238
  width: 24,
218
239
  height: 24
219
240
  }),
220
- onClick: ce,
221
- children: f
222
- }), /* @__PURE__ */ e(ze, {
223
- open: oe,
224
- anchorEl: se,
225
- onClose: me,
226
- children: n.map((m) => /* @__PURE__ */ e(Ne, {
241
+ onClick: ue,
242
+ children: h
243
+ }), /* @__PURE__ */ e(Ee, {
244
+ open: fe,
245
+ anchorEl: he,
246
+ onClose: ve,
247
+ children: r.map((m) => /* @__PURE__ */ e(Me, {
227
248
  className: m.className,
228
249
  onClick: m.onClick,
229
250
  children: m.label
230
251
  }, m.label))
231
- })] }) : f && typeof n == "function" && /* @__PURE__ */ e(r, {
252
+ })] }) : h && typeof r == "function" && /* @__PURE__ */ e(a, {
232
253
  dataTest: "extra-action-button",
233
254
  variant: "text",
234
- onClick: n,
235
- children: f
255
+ onClick: r,
256
+ children: h
236
257
  }),
237
258
  " ",
238
- O,
239
- A ? /* @__PURE__ */ e("div", {
240
- className: s("flex justify-end gap-x-2", G),
241
- children: K
259
+ q,
260
+ J ? /* @__PURE__ */ e("div", {
261
+ className: s("flex justify-end gap-x-2", P),
262
+ children: Q
242
263
  }) : null
243
264
  ]
244
- }) : /* @__PURE__ */ e(p, { children: A ? /* @__PURE__ */ e("div", {
245
- className: s("flex justify-end gap-x-2 border-t-[1px] border-delta-200 p-4", G),
246
- children: K
265
+ }) : /* @__PURE__ */ e(p, { children: J ? /* @__PURE__ */ e("div", {
266
+ className: s("flex justify-end gap-x-2 border-t-[1px] border-delta-200 p-4", P),
267
+ children: Q
247
268
  }) : null })]
248
- })]
269
+ })
249
270
  })
250
271
  })
251
272
  ] });
252
273
  };
253
274
  export {
254
- Ye as MinimizableDialog
275
+ mi as MinimizableDialog
255
276
  };