asma-ui-core 3.134.0 → 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.
- package/dist/asma-ui-core.css +1 -1
- package/dist/components/feedback/dialog/StyledDialog.js +177 -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 +7 -0
- package/dist/components/feedback/dialog/useDialogHeaderPinning.js +56 -0
- package/dist/components/feedback/minimizable-dialog/MinimizableDialog.js +203 -182
- package/dist/components/feedback/minimizable-dialog/v2/MinimizableDialogV2.js +148 -133
- package/dist/components/inputs/full-screen-picker/FullScreenPicker.js +1 -1
- package/dist/components/inputs/full-screen-picker/useReleaseFieldOnKeyboardDismiss.js +13 -12
- package/dist/components/inputs/input-field/StyledInputField.js +139 -136
- 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 +28 -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 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
|
|
22
|
-
const [
|
|
23
|
-
if (
|
|
24
|
-
|
|
25
|
-
}, o =
|
|
26
|
-
if (
|
|
27
|
-
active: w && !
|
|
28
|
-
requestClose: () => !
|
|
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
|
-
}),
|
|
31
|
-
c.current?.toggleAttribute("inert",
|
|
32
|
-
}, [
|
|
33
|
-
const
|
|
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
|
-
...
|
|
42
|
-
} : void 0,
|
|
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:
|
|
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 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
|
-
|
|
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,155 @@ 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(Ne.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: {
|
|
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
|
-
|
|
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"
|
|
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
|
-
|
|
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
|
-
}),
|
|
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),
|
|
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(
|
|
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(
|
|
237
|
+
startIcon: /* @__PURE__ */ e(ye, {
|
|
217
238
|
width: 24,
|
|
218
239
|
height: 24
|
|
219
240
|
}),
|
|
220
|
-
onClick:
|
|
221
|
-
children:
|
|
222
|
-
}), /* @__PURE__ */ e(
|
|
223
|
-
open:
|
|
224
|
-
anchorEl:
|
|
225
|
-
onClose:
|
|
226
|
-
children:
|
|
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
|
-
})] }) :
|
|
252
|
+
})] }) : h && typeof r == "function" && /* @__PURE__ */ e(a, {
|
|
232
253
|
dataTest: "extra-action-button",
|
|
233
254
|
variant: "text",
|
|
234
|
-
onClick:
|
|
235
|
-
children:
|
|
255
|
+
onClick: r,
|
|
256
|
+
children: h
|
|
236
257
|
}),
|
|
237
258
|
" ",
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
className: s("flex justify-end gap-x-2",
|
|
241
|
-
children:
|
|
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:
|
|
245
|
-
className: s("flex justify-end gap-x-2 border-t-[1px] border-delta-200 p-4",
|
|
246
|
-
children:
|
|
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
|
-
|
|
275
|
+
mi as MinimizableDialog
|
|
255
276
|
};
|