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.
- package/dist/asma-ui-core.css +1 -1
- package/dist/components/feedback/dialog/StyledDialog.js +174 -149
- package/dist/components/feedback/dialog/StyledDialog.module.js +1 -1
- package/dist/components/feedback/dialog/StyledDialogActions.js +4 -3
- package/dist/components/feedback/dialog/StyledDialogContent.js +9 -8
- package/dist/components/feedback/dialog/StyledDialogTitle.js +23 -21
- package/dist/components/feedback/dialog/dialog-footer/StyledDialogFooter.js +1 -0
- package/dist/components/feedback/dialog/dialogHeaderStyles.js +13 -0
- package/dist/components/feedback/dialog/useDialogHeaderPinning.js +56 -0
- package/dist/components/feedback/minimizable-dialog/MinimizableDialog.js +200 -182
- package/dist/components/feedback/minimizable-dialog/v2/MinimizableDialogV2.js +143 -131
- package/dist/components/inputs/full-screen-picker/FullScreenPicker.js +1 -1
- package/dist/components/inputs/full-screen-picker/useReleaseFieldOnKeyboardDismiss.js +13 -12
- package/dist/hooks/useElementHeightPx.js +26 -0
- package/dist/hooks/useLayoutViewportHeight.js +5 -0
- package/dist/hooks/useMediaQuery.hook.js +9 -8
- package/dist/hooks/useOnScreenKeyboard.js +24 -0
- package/dist/index.js +366 -352
- package/dist/src/components/feedback/dialog/StyledDialog.d.ts +4 -3
- package/dist/src/components/feedback/dialog/StyledDialogTitle.d.ts +4 -0
- package/dist/src/components/feedback/dialog/dialogHeaderStyles.d.ts +39 -0
- package/dist/src/components/feedback/dialog/dialogTitleContext.d.ts +5 -0
- package/dist/src/components/feedback/dialog/useDialogHeaderPinning.d.ts +33 -0
- package/dist/src/hooks/useElementHeightPx.d.ts +16 -0
- package/dist/src/hooks/useLayoutViewportHeight.d.ts +6 -0
- package/dist/src/hooks/useMediaQuery.hook.d.ts +6 -0
- package/dist/src/hooks/useOnScreenKeyboard.d.ts +21 -0
- package/dist/src/index.d.ts +6 -0
- package/dist/table/components/StyledTableIndex.js +5 -5
- package/package.json +1 -1
- package/dist/src/table/components/columns/helpers/useElementHeightPx.d.ts +0 -7
- package/dist/table/components/columns/helpers/useElementHeightPx.js +0 -26
- /package/dist/{components/inputs/full-screen-picker → hooks}/useVisualViewportHeight.js +0 -0
- /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
|
|
3
|
-
import { StyledTooltip as
|
|
4
|
-
import { DotsVerticalIcon as
|
|
5
|
-
import { CloseIcon as
|
|
6
|
-
import { MinimizeIcon as
|
|
7
|
-
import { KeyboardCapslockIcon as
|
|
8
|
-
import { ArrowExpandIcon as
|
|
9
|
-
import { ArrowShrinkIcon as
|
|
10
|
-
import { StyledButton as
|
|
11
|
-
import { OverlayBackOwnerContext as
|
|
12
|
-
import { useFocusTrap as
|
|
13
|
-
import { StyledMenu as
|
|
14
|
-
import { StyledMenuItem as
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
18
|
-
import
|
|
19
|
-
import {
|
|
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
|
|
22
|
-
const [
|
|
23
|
-
if (
|
|
24
|
-
|
|
25
|
-
}, o =
|
|
26
|
-
if (
|
|
27
|
-
active: w && !
|
|
28
|
-
requestClose: () => !
|
|
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
|
-
}),
|
|
31
|
-
c.current?.toggleAttribute("inert",
|
|
32
|
-
}, [
|
|
33
|
-
const
|
|
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
|
-
...
|
|
42
|
-
} : void 0,
|
|
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:
|
|
46
|
-
disabledReason:
|
|
47
|
-
onClick:
|
|
47
|
+
disabled: d,
|
|
48
|
+
disabledReason: C,
|
|
49
|
+
onClick: F,
|
|
48
50
|
children: y
|
|
49
|
-
}),
|
|
51
|
+
}), K && j && /* @__PURE__ */ e(a, {
|
|
50
52
|
dataTest: "save-button",
|
|
51
|
-
loading:
|
|
52
|
-
locale:
|
|
53
|
-
disabled:
|
|
54
|
-
disabledReason:
|
|
55
|
-
onClick:
|
|
56
|
-
children:
|
|
57
|
-
})] }),
|
|
58
|
-
const m =
|
|
59
|
-
|
|
60
|
-
const
|
|
61
|
-
|
|
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
|
-
|
|
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(
|
|
71
|
+
className: s(Z.dialog, !i && Z.hidden, i && "max-xs:w-[calc(100vw-32px)]"),
|
|
70
72
|
children: /* @__PURE__ */ l("div", {
|
|
71
|
-
className:
|
|
72
|
-
"data-testid":
|
|
73
|
-
children: [/* @__PURE__ */ e(
|
|
74
|
-
|
|
75
|
-
|
|
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: [
|
|
79
|
-
title:
|
|
80
|
-
children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
|
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":
|
|
90
|
+
"aria-label": R ? void 0 : t === "en" ? "Expand" : "Utvid",
|
|
83
91
|
variant: "text",
|
|
84
92
|
size: "small",
|
|
85
|
-
onClick:
|
|
86
|
-
endIcon: /* @__PURE__ */ e(
|
|
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:
|
|
99
|
+
children: R
|
|
92
100
|
}) })
|
|
93
|
-
}),
|
|
94
|
-
title:
|
|
95
|
-
open:
|
|
96
|
-
children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
|
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":
|
|
106
|
+
"aria-label": u ? void 0 : t === "en" ? "Close" : "Lukk",
|
|
99
107
|
variant: "textGray",
|
|
100
108
|
size: "small",
|
|
101
|
-
disabled:
|
|
102
|
-
disabledReason:
|
|
103
|
-
onClick:
|
|
104
|
-
endIcon: /* @__PURE__ */ e(
|
|
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:
|
|
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:
|
|
118
|
-
role:
|
|
119
|
-
"aria-modal":
|
|
120
|
-
"aria-
|
|
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)]",
|
|
122
|
-
"data-testid":
|
|
123
|
-
children: /* @__PURE__ */
|
|
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:
|
|
126
|
-
className: "flex flex-col
|
|
133
|
+
children: /* @__PURE__ */ l("div", {
|
|
134
|
+
className: B("flex flex-col", o && !i && "h-full"),
|
|
127
135
|
children: [/* @__PURE__ */ l("div", {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
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
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
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
|
-
|
|
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
|
-
}),
|
|
202
|
-
className: s("
|
|
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(
|
|
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(
|
|
234
|
+
startIcon: /* @__PURE__ */ e(ye, {
|
|
217
235
|
width: 24,
|
|
218
236
|
height: 24
|
|
219
237
|
}),
|
|
220
|
-
onClick:
|
|
221
|
-
children:
|
|
222
|
-
}), /* @__PURE__ */ e(
|
|
223
|
-
open:
|
|
224
|
-
anchorEl:
|
|
225
|
-
onClose:
|
|
226
|
-
children:
|
|
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
|
-
})] }) :
|
|
249
|
+
})] }) : h && typeof r == "function" && /* @__PURE__ */ e(a, {
|
|
232
250
|
dataTest: "extra-action-button",
|
|
233
251
|
variant: "text",
|
|
234
|
-
onClick:
|
|
235
|
-
children:
|
|
252
|
+
onClick: r,
|
|
253
|
+
children: h
|
|
236
254
|
}),
|
|
237
255
|
" ",
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
className: s("flex justify-end gap-x-2",
|
|
241
|
-
children:
|
|
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:
|
|
245
|
-
className: s("flex justify-end gap-x-2 border-t-[1px] border-delta-200 p-4",
|
|
246
|
-
children:
|
|
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
|
-
|
|
272
|
+
fi as MinimizableDialog
|
|
255
273
|
};
|