asma-ui-core 3.134.1 → 3.134.3

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 +174 -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 +13 -0
  9. package/dist/components/feedback/dialog/useDialogHeaderPinning.js +56 -0
  10. package/dist/components/feedback/minimizable-dialog/MinimizableDialog.js +200 -182
  11. package/dist/components/feedback/minimizable-dialog/v2/MinimizableDialogV2.js +143 -131
  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 +39 -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 Se, isOverlayBackNavigationPending as Ne, 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, dialogScrollerStyle as Ge } from "../dialog/dialogHeaderStyles.js";
17
+ import { fullScreenFieldWidthVars as Pe } from "../../inputs/field-styles.js";
18
+ import Z from "./MinimizableDialog.module.js";
19
+ import { useToggleMenuVisibility as qe } from "../../../hooks/useToggleMenuVisibility.hook.js";
20
+ import B from "clsx";
21
+ import { useId as Le, useLayoutEffect as Te, useRef as N, 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 fi = ({ 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 } = qe(), c = N(null), k = N(null), W = Le(), U = N(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 && Ne() ? !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
+ }), Te(() => {
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
+ ...Pe
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 S = m.current;
63
+ S && (S.querySelector('[data-testid="minimize-button"]') ?? we(S))?.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,152 @@ 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(Se.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: Ge(pe, ge),
140
+ children: [/* @__PURE__ */ l("div", {
141
+ ref: be,
142
+ "data-dialog-header": "",
143
+ "data-header-pinned": v ? "true" : "false",
144
+ "aria-hidden": z || void 0,
145
+ hidden: z,
146
+ className: s(Oe, "rounded-t-lg border-b-[1px] border-delta-200", v && "sticky top-0 z-[2]", z && "hidden"),
147
+ children: [/* @__PURE__ */ l("div", {
148
+ className: De,
149
+ children: [A && /* @__PURE__ */ e("div", {
150
+ className: "min-w-0 flex-auto hyphens-auto text-sm text-delta-700 [overflow-wrap:anywhere]",
151
+ children: A
152
+ }), /* @__PURE__ */ l("div", {
153
+ className: "ml-auto flex items-center gap-x-1 max-xs:flex-wrap max-xs:justify-end max-xs:gap-y-1",
154
+ children: [
155
+ ne,
156
+ ie && /* @__PURE__ */ e(f, {
157
+ title: t === "en" ? "Minimize" : "Minimer",
158
+ children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(a, {
159
+ dataTest: "minimize-button",
160
+ "aria-label": _ ? void 0 : t === "en" ? "Minimize" : "Minimer",
161
+ variant: "textGray",
162
+ size: "small",
163
+ onClick: X,
164
+ endIcon: /* @__PURE__ */ e(ke, {
165
+ height: 20,
166
+ width: 20,
167
+ color: "text-delta-700"
168
+ }),
169
+ children: _
170
+ }) })
151
171
  }),
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"
172
+ (se || I) && le && /* @__PURE__ */ e(f, {
173
+ title: $,
174
+ open: I ? !1 : void 0,
175
+ children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(a, {
176
+ dataTest: "fullscreen-button",
177
+ "aria-label": E ? void 0 : $,
178
+ variant: "textGray",
179
+ size: "small",
180
+ disabled: I,
181
+ disabledReason: L,
182
+ onClick: () => {
183
+ T !== void 0 && H ? H(!o) : me(!V);
184
+ },
185
+ endIcon: o ? /* @__PURE__ */ e(Ie, {
186
+ width: 20,
187
+ height: 20,
188
+ color: "text-delta-700"
189
+ }) : /* @__PURE__ */ e(Ce, {
190
+ width: 20,
191
+ height: 20,
192
+ color: "text-delta-700"
193
+ }),
194
+ children: E
195
+ }) })
195
196
  }),
196
- children: v
197
- }) })
198
- })
199
- ]
197
+ M && /* @__PURE__ */ e(f, {
198
+ title: t === "en" ? "Close" : "Lukk",
199
+ open: d ? !1 : void 0,
200
+ children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(a, {
201
+ dataTest: "close-button",
202
+ "aria-label": u ? void 0 : t === "en" ? "Close" : "Lukk",
203
+ variant: "textGray",
204
+ size: "small",
205
+ disabled: d,
206
+ disabledReason: C,
207
+ onClick: b,
208
+ endIcon: /* @__PURE__ */ e(Y, {
209
+ height: 20,
210
+ width: 20,
211
+ color: "text-delta-700"
212
+ }),
213
+ children: u
214
+ }) })
215
+ })
216
+ ]
217
+ })]
218
+ }), /* @__PURE__ */ e("div", {
219
+ id: W,
220
+ className: je,
221
+ children: g
222
+ })]
223
+ }), /* @__PURE__ */ e("div", {
224
+ "data-dialog-content-flow": "",
225
+ className: v ? "isolate flex-grow" : Fe(v),
226
+ children: typeof x == "function" ? x({ fullScreen: o }) : x
200
227
  })]
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),
228
+ }), (Array.isArray(r) && r.length || typeof r == "function") && h || q ? /* @__PURE__ */ l("div", {
229
+ className: s("flex items-center justify-between border-0 border-t-[1px] border-solid border-delta-200 bg-white p-4", oe),
212
230
  children: [
213
- Array.isArray(n) && n.length && f ? /* @__PURE__ */ l(p, { children: [/* @__PURE__ */ e(r, {
231
+ Array.isArray(r) && r.length && h ? /* @__PURE__ */ l(p, { children: [/* @__PURE__ */ e(a, {
214
232
  dataTest: "extra-actions-button",
215
233
  variant: "textGray",
216
- startIcon: /* @__PURE__ */ e(ue, {
234
+ startIcon: /* @__PURE__ */ e(ye, {
217
235
  width: 24,
218
236
  height: 24
219
237
  }),
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, {
238
+ onClick: ue,
239
+ children: h
240
+ }), /* @__PURE__ */ e(Ee, {
241
+ open: fe,
242
+ anchorEl: he,
243
+ onClose: ve,
244
+ children: r.map((m) => /* @__PURE__ */ e(Me, {
227
245
  className: m.className,
228
246
  onClick: m.onClick,
229
247
  children: m.label
230
248
  }, m.label))
231
- })] }) : f && typeof n == "function" && /* @__PURE__ */ e(r, {
249
+ })] }) : h && typeof r == "function" && /* @__PURE__ */ e(a, {
232
250
  dataTest: "extra-action-button",
233
251
  variant: "text",
234
- onClick: n,
235
- children: f
252
+ onClick: r,
253
+ children: h
236
254
  }),
237
255
  " ",
238
- O,
239
- A ? /* @__PURE__ */ e("div", {
240
- className: s("flex justify-end gap-x-2", G),
241
- children: K
256
+ q,
257
+ J ? /* @__PURE__ */ e("div", {
258
+ className: s("flex justify-end gap-x-2", P),
259
+ children: Q
242
260
  }) : null
243
261
  ]
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
262
+ }) : /* @__PURE__ */ e(p, { children: J ? /* @__PURE__ */ e("div", {
263
+ className: s("flex justify-end gap-x-2 border-t-[1px] border-delta-200 p-4", P),
264
+ children: Q
247
265
  }) : null })]
248
- })]
266
+ })
249
267
  })
250
268
  })
251
269
  ] });
252
270
  };
253
271
  export {
254
- Ye as MinimizableDialog
272
+ fi as MinimizableDialog
255
273
  };