asma-ui-core 3.121.5 → 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.
- package/dist/asma-ui-core.css +1 -1
- package/dist/components/custom/module/header-layout/ToolbarRows.js +64 -60
- package/dist/components/custom/pathfinder-card/Pathfinder.module.js +14 -13
- package/dist/components/custom/pathfinder-card/PathfinderCard.js +64 -64
- package/dist/components/custom/widget/widget/StyledWidget.js +44 -37
- package/dist/components/custom/widget/widget-header/StyledWidgetHeader.js +7 -7
- package/dist/components/custom/widget/widget-title/StyledWidgetTitle.js +8 -8
- package/dist/components/data-display/chip/StyledChip.js +42 -42
- package/dist/components/data-display/form-label/components/StyledFormLabel.js +15 -15
- package/dist/components/feedback/dialog/StyledDialog.js +75 -75
- package/dist/components/feedback/dialog/StyledDialogActions.js +4 -4
- package/dist/components/feedback/dialog/StyledDialogTitle.js +13 -13
- package/dist/components/feedback/dialog/dialog-footer/StyledDialogFooter.js +70 -69
- package/dist/components/feedback/minimizable-dialog/MinimizableDialog.js +69 -69
- package/dist/components/feedback/minimizable-dialog/v2/MinimizableDialogV2.js +81 -81
- package/dist/components/feedback/snack-bar/StyledAlert.js +16 -16
- package/dist/components/inputs/button/StyledButton.js +36 -35
- package/dist/components/inputs/input-field/StyledInputField.js +38 -38
- package/dist/components/inputs/search-field/StyledSearchField.js +18 -17
- package/dist/components/miscellaneous/StyledFormControlLabel.js +13 -13
- package/dist/components/navigation/link/StyledLink.js +44 -44
- package/dist/components/navigation/title-chevron/StyledTitleChevron.js +13 -13
- package/dist/components/utils/bottom-sheet/StyledBottomSheet.js +45 -45
- package/dist/components/utils/popover/PopoverAnatomy.js +23 -23
- package/dist/hooks/useMediaQuery.hook.js +3 -2
- package/dist/src/components/custom/module/header-layout/ToolbarRows.d.ts +3 -1
- package/dist/src/hooks/useMediaQuery.hook.d.ts +2 -0
- package/dist/src/table/types.d.ts +8 -0
- package/dist/table/components/TableRow.js +89 -87
- package/package.json +1 -1
|
@@ -1,36 +1,37 @@
|
|
|
1
|
-
import { cn as
|
|
2
|
-
import { StyledTooltip as
|
|
3
|
-
import { DotsVerticalIcon as
|
|
4
|
-
import { DialogBusyContext as
|
|
5
|
-
import { StyledButton as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { cn as w } from "../../../../helpers/cn.js";
|
|
2
|
+
import { StyledTooltip as K } from "../../../data-display/tooltip/StyledTooltip.js";
|
|
3
|
+
import { DotsVerticalIcon as U } from "../../../icons/dots-vertical-icon/DotsVerticalIcon.js";
|
|
4
|
+
import { DialogBusyContext as X, WAIT_UNTIL_SAVED as V, useReportDialogBusy as G } from "../DialogBusyContext.js";
|
|
5
|
+
import { StyledButton as I } from "../../../inputs/button/StyledButton.js";
|
|
6
|
+
import { useMaxXsMediaQuery as Y } from "../../../../hooks/useMediaQuery.hook.js";
|
|
7
|
+
import { StyledMenu as Q } from "../../../navigation/menu/StyledMenu.js";
|
|
8
|
+
import { StyledMenuItem as q } from "../../../navigation/menu/StyledMenuItem.js";
|
|
9
|
+
import { useElementWidthPx as J } from "../../../../hooks/useElementWidthPx.js";
|
|
10
|
+
import { useWidthRegistry as Z } from "../../../../hooks/useWidthRegistry.js";
|
|
11
|
+
import { planToolbarActions as ee } from "../../../custom/module/header-layout/planToolbarActions.js";
|
|
12
|
+
import { ToolbarActionButton as oe, overflowItemState as re } from "../../../custom/module/header-layout/ToolbarActionGroup.js";
|
|
13
|
+
import { useToolbarTranslations as ne } from "../../../custom/module/header-layout/useTranslations.js";
|
|
14
|
+
import { useContext as le, useMemo as P, useState as ae } from "react";
|
|
15
|
+
import { Fragment as R, jsx as o, jsxs as c } from "react/jsx-runtime";
|
|
16
|
+
var ie = 2, te = 470, se = 8, _ = "dialog-footer-right", O = "dialog-footer-more", E = (n, l) => `dialog-footer-action:${n}:${l ? "label" : "icon"}`;
|
|
17
|
+
function Ce({ leftActions: n = [], leadingSlot: l, secondaryAction: f, primaryAction: p, fixed: L = !1, rounded: W = !0, locale: a = "en", className: S, dataTest: x = "styled-dialog-footer" }) {
|
|
18
|
+
const T = le(X), h = ne(a), { ref: D, widthPx: u } = J(), { register: g, widths: i } = Z(), [b, v] = ae(null), t = u > 0 && u < te, j = t ? 8 : 16, s = P(() => n.filter((e) => !e.hidden).map((e) => e.icon == null && e.canHideLabel == null ? {
|
|
18
19
|
...e,
|
|
19
20
|
canHideLabel: !1
|
|
20
|
-
} : e), [n]), $ =
|
|
21
|
-
if (s.length >=
|
|
21
|
+
} : e), [n]), $ = i[_] ?? 0, B = f != null || p != null, z = Y(), C = Math.max(0, u - j * 2 - (z ? 0 : $ + (B ? se : 0))), d = P(() => {
|
|
22
|
+
if (s.length >= ie) return {
|
|
22
23
|
inlineActions: [],
|
|
23
24
|
overflowActions: s,
|
|
24
25
|
showMoreMenu: !0
|
|
25
26
|
};
|
|
26
|
-
const e =
|
|
27
|
+
const e = ee({
|
|
27
28
|
actions: s,
|
|
28
|
-
availableWidth:
|
|
29
|
+
availableWidth: C,
|
|
29
30
|
collapseLabels: !0,
|
|
30
|
-
resolveActionWidth: (r,
|
|
31
|
-
moreButtonWidthPx:
|
|
31
|
+
resolveActionWidth: (r, m) => i[E(r.id, m)],
|
|
32
|
+
moreButtonWidthPx: i[O]
|
|
32
33
|
});
|
|
33
|
-
return
|
|
34
|
+
return t ? {
|
|
34
35
|
...e,
|
|
35
36
|
inlineActions: e.inlineActions.map((r) => r.action.canHideLabel === !1 ? r : {
|
|
36
37
|
...r,
|
|
@@ -39,75 +40,75 @@ function Te({ leftActions: n = [], leadingSlot: l, secondaryAction: f, primaryAc
|
|
|
39
40
|
} : e;
|
|
40
41
|
}, [
|
|
41
42
|
s,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
C,
|
|
44
|
+
i,
|
|
45
|
+
t
|
|
45
46
|
]);
|
|
46
47
|
G(l == null && d.overflowActions.some((e) => !!e.loading && e.holdsDialog !== !1));
|
|
47
|
-
const
|
|
48
|
-
const N =
|
|
49
|
-
locale:
|
|
50
|
-
dataTest: e.dataTest ?? `${
|
|
48
|
+
const M = (e, r, m) => {
|
|
49
|
+
const N = m === "secondary" && T?.busy, y = !!e.disabled || !!N, k = N ? T.busyReason ?? V[a] : e.tooltip, A = y || !!e.loading, F = /* @__PURE__ */ o(I, {
|
|
50
|
+
locale: a,
|
|
51
|
+
dataTest: e.dataTest ?? `${x}-${m}`,
|
|
51
52
|
variant: e.variant ?? r,
|
|
52
53
|
error: e.tone === "danger",
|
|
53
54
|
size: "medium",
|
|
54
55
|
type: e.type ?? "button",
|
|
55
|
-
disabled: y && !!
|
|
56
|
-
"aria-disabled":
|
|
57
|
-
disabledReason:
|
|
56
|
+
disabled: y && !!k,
|
|
57
|
+
"aria-disabled": A || void 0,
|
|
58
|
+
disabledReason: k,
|
|
58
59
|
loading: !!e.loading,
|
|
59
60
|
startIcon: e.icon,
|
|
60
61
|
endIcon: e.endIcon,
|
|
61
|
-
onClick:
|
|
62
|
+
onClick: A ? (H) => H.preventDefault() : e.onClick,
|
|
62
63
|
"aria-label": e.ariaLabel,
|
|
63
64
|
children: e.label
|
|
64
65
|
});
|
|
65
|
-
return /* @__PURE__ */ o(
|
|
66
|
+
return /* @__PURE__ */ o(K, {
|
|
66
67
|
arrow: !0,
|
|
67
68
|
title: e.tooltip,
|
|
68
69
|
open: y || !e.tooltip ? !1 : void 0,
|
|
69
70
|
children: /* @__PURE__ */ o("span", {
|
|
70
71
|
className: "inline-flex",
|
|
71
|
-
children:
|
|
72
|
+
children: F
|
|
72
73
|
})
|
|
73
74
|
});
|
|
74
75
|
};
|
|
75
|
-
return /* @__PURE__ */
|
|
76
|
-
ref:
|
|
77
|
-
"data-testid":
|
|
78
|
-
className:
|
|
76
|
+
return /* @__PURE__ */ c("div", {
|
|
77
|
+
ref: D,
|
|
78
|
+
"data-testid": x,
|
|
79
|
+
className: w("flex items-center justify-end self-stretch border-0 border-t border-solid border-delta-200 bg-white", "max-xs:flex-wrap max-xs:justify-between max-xs:gap-y-2", t ? "gap-2 p-2" : "gap-4 p-4", W && "rounded-b-lg", L && "sticky bottom-0 z-[1]", S),
|
|
79
80
|
children: [/* @__PURE__ */ o("div", {
|
|
80
|
-
className: "flex shrink-0 flex-nowrap items-center gap-2",
|
|
81
|
-
children: l ?? /* @__PURE__ */
|
|
82
|
-
ref:
|
|
81
|
+
className: "flex shrink-0 flex-nowrap items-center gap-2 max-xs:min-w-0 max-xs:shrink",
|
|
82
|
+
children: l ?? /* @__PURE__ */ c(R, { children: [d.inlineActions.map(({ action: e, showLabel: r }) => /* @__PURE__ */ o("span", {
|
|
83
|
+
ref: g(E(e.id, r)),
|
|
83
84
|
className: "inline-flex shrink-0",
|
|
84
|
-
children: /* @__PURE__ */ o(
|
|
85
|
+
children: /* @__PURE__ */ o(oe, {
|
|
85
86
|
action: e,
|
|
86
87
|
showLabel: r,
|
|
87
|
-
inProgressLabel:
|
|
88
|
+
inProgressLabel: h.inProgress
|
|
88
89
|
})
|
|
89
|
-
}, e.id)), d.showMoreMenu && /* @__PURE__ */
|
|
90
|
-
ref:
|
|
90
|
+
}, e.id)), d.showMoreMenu && /* @__PURE__ */ c(R, { children: [/* @__PURE__ */ o("span", {
|
|
91
|
+
ref: g(O),
|
|
91
92
|
className: "inline-flex shrink-0",
|
|
92
|
-
children: /* @__PURE__ */ o(
|
|
93
|
-
locale:
|
|
94
|
-
dataTest: `${
|
|
93
|
+
children: /* @__PURE__ */ o(I, {
|
|
94
|
+
locale: a,
|
|
95
|
+
dataTest: `${x}-more`,
|
|
95
96
|
variant: "outlined",
|
|
96
97
|
size: "medium",
|
|
97
98
|
type: "button",
|
|
98
|
-
onClick: (e) =>
|
|
99
|
-
"aria-label":
|
|
99
|
+
onClick: (e) => v(e.currentTarget),
|
|
100
|
+
"aria-label": h.more,
|
|
100
101
|
"aria-haspopup": "menu",
|
|
101
|
-
"aria-expanded":
|
|
102
|
-
startIcon: /* @__PURE__ */ o(
|
|
102
|
+
"aria-expanded": b != null,
|
|
103
|
+
startIcon: /* @__PURE__ */ o(U, {
|
|
103
104
|
width: 24,
|
|
104
105
|
height: 24
|
|
105
106
|
})
|
|
106
107
|
})
|
|
107
|
-
}), /* @__PURE__ */ o(
|
|
108
|
-
anchorEl:
|
|
109
|
-
open:
|
|
110
|
-
onClose: () =>
|
|
108
|
+
}), /* @__PURE__ */ o(Q, {
|
|
109
|
+
anchorEl: b,
|
|
110
|
+
open: b != null,
|
|
111
|
+
onClose: () => v(null),
|
|
111
112
|
anchorOrigin: {
|
|
112
113
|
vertical: "top",
|
|
113
114
|
horizontal: "left"
|
|
@@ -116,10 +117,10 @@ function Te({ leftActions: n = [], leadingSlot: l, secondaryAction: f, primaryAc
|
|
|
116
117
|
vertical: "bottom",
|
|
117
118
|
horizontal: "left"
|
|
118
119
|
},
|
|
119
|
-
children: d.overflowActions.map((e) => /* @__PURE__ */ o(
|
|
120
|
-
...
|
|
120
|
+
children: d.overflowActions.map((e) => /* @__PURE__ */ o(q, {
|
|
121
|
+
...re(e, h.inProgress),
|
|
121
122
|
onClick: () => {
|
|
122
|
-
|
|
123
|
+
v(null), e.onClick();
|
|
123
124
|
},
|
|
124
125
|
children: /* @__PURE__ */ o("span", {
|
|
125
126
|
className: e.tone === "danger" ? "text-beta-500" : "text-delta-700",
|
|
@@ -127,16 +128,16 @@ function Te({ leftActions: n = [], leadingSlot: l, secondaryAction: f, primaryAc
|
|
|
127
128
|
})
|
|
128
129
|
}, e.id))
|
|
129
130
|
})] })] })
|
|
130
|
-
}),
|
|
131
|
-
className: "flex min-w-px flex-1 flex-nowrap items-center justify-end",
|
|
132
|
-
children: /* @__PURE__ */
|
|
133
|
-
ref:
|
|
134
|
-
className: "flex shrink-0 flex-nowrap items-center gap-2",
|
|
135
|
-
children: [f &&
|
|
131
|
+
}), B && /* @__PURE__ */ o("span", {
|
|
132
|
+
className: w("flex min-w-px flex-1 flex-nowrap items-center justify-end", "max-xs:min-w-fit max-xs:flex-wrap max-xs:gap-y-2"),
|
|
133
|
+
children: /* @__PURE__ */ c("span", {
|
|
134
|
+
ref: g(_),
|
|
135
|
+
className: w("flex shrink-0 flex-nowrap items-center gap-2", "max-xs:max-w-full max-xs:shrink max-xs:flex-wrap max-xs:justify-end"),
|
|
136
|
+
children: [f && M(f, "outlined", "secondary"), p && M(p, "contained", "primary")]
|
|
136
137
|
})
|
|
137
138
|
})]
|
|
138
139
|
});
|
|
139
140
|
}
|
|
140
141
|
export {
|
|
141
|
-
|
|
142
|
+
Ce as StyledDialogFooter
|
|
142
143
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { cn as
|
|
2
|
-
import { firstTabbable as
|
|
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
|
|
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
|
|
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
|
|
12
|
-
import { useFocusTrap as
|
|
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:
|
|
22
|
-
const [t,
|
|
23
|
-
if (
|
|
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,
|
|
26
|
-
if (
|
|
27
|
-
active:
|
|
28
|
-
requestClose: () => !
|
|
29
|
-
ownerRef:
|
|
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
|
-
|
|
32
|
-
}, [t]), !
|
|
33
|
-
const
|
|
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 ??
|
|
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:
|
|
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:
|
|
51
|
+
loading: a,
|
|
52
52
|
locale: i,
|
|
53
|
-
disabled:
|
|
54
|
-
disabledReason:
|
|
53
|
+
disabled: te,
|
|
54
|
+
disabledReason: ie,
|
|
55
55
|
onClick: _,
|
|
56
56
|
children: S
|
|
57
57
|
})] }), T = () => {
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
const C =
|
|
61
|
-
C && (C.querySelector('[data-testid="minimize-button"]') ??
|
|
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
|
-
|
|
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:
|
|
67
|
+
ref: k,
|
|
68
68
|
style: { zIndex: 51 },
|
|
69
|
-
className:
|
|
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:
|
|
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(
|
|
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:
|
|
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:
|
|
101
|
+
disabled: a,
|
|
102
102
|
disabledReason: z,
|
|
103
|
-
onClick:
|
|
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:
|
|
117
|
-
style:
|
|
118
|
-
role:
|
|
119
|
-
"aria-modal":
|
|
120
|
-
"aria-label":
|
|
121
|
-
className:
|
|
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(
|
|
124
|
-
value:
|
|
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: [
|
|
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:
|
|
131
|
+
children: b
|
|
132
132
|
}) : /* @__PURE__ */ e("div", {
|
|
133
|
-
className: "text-2xl font-semibold text-delta-800",
|
|
134
|
-
children:
|
|
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
|
-
(
|
|
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) :
|
|
166
|
+
V !== void 0 && P ? P(!o) : de(!W);
|
|
167
167
|
},
|
|
168
|
-
endIcon: o ? /* @__PURE__ */ e(
|
|
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:
|
|
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:
|
|
188
|
+
disabled: a,
|
|
189
189
|
disabledReason: z,
|
|
190
|
-
onClick:
|
|
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
|
-
}),
|
|
202
|
-
className: "truncate text-2xl font-semibold text-delta-800",
|
|
203
|
-
children:
|
|
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
|
|
210
|
-
}), (Array.isArray(
|
|
211
|
-
className:
|
|
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(
|
|
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:
|
|
227
|
-
className:
|
|
228
|
-
onClick:
|
|
229
|
-
children:
|
|
230
|
-
},
|
|
231
|
-
})] }) : f && typeof
|
|
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:
|
|
234
|
+
onClick: n,
|
|
235
235
|
children: f
|
|
236
236
|
}),
|
|
237
237
|
" ",
|
|
238
238
|
O,
|
|
239
239
|
A ? /* @__PURE__ */ e("div", {
|
|
240
|
-
className:
|
|
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:
|
|
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
|
})]
|