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,60 +1,60 @@
|
|
|
1
|
-
import { cn as
|
|
1
|
+
import { cn as l } from "../../../../helpers/cn.js";
|
|
2
2
|
import { firstTabbable as A } from "../../../../helpers/focusable.js";
|
|
3
|
-
import { StyledTooltip as
|
|
4
|
-
import { DialogBusyContext as L, useDialogBusyBoundary as
|
|
3
|
+
import { StyledTooltip as ne } from "../../../data-display/tooltip/StyledTooltip.js";
|
|
4
|
+
import { DialogBusyContext as L, useDialogBusyBoundary as ie } from "../../dialog/DialogBusyContext.js";
|
|
5
5
|
import { useMobileMediaQuery as oe } from "../../../../hooks/useMediaQuery.hook.js";
|
|
6
|
-
import { OverlayBackOwnerContext as re, isOverlayBackNavigationPending as
|
|
7
|
-
import { useFocusTrap as
|
|
8
|
-
import { fullScreenFieldWidthVars as
|
|
6
|
+
import { OverlayBackOwnerContext as re, isOverlayBackNavigationPending as ae, useBackCloses as se } from "../../../../hooks/useBackCloses.hook.js";
|
|
7
|
+
import { useFocusTrap as ce } from "../../../../hooks/useFocusTrap.hook.js";
|
|
8
|
+
import { fullScreenFieldWidthVars as me } from "../../../inputs/field-styles.js";
|
|
9
9
|
import { CloseBtn as V } from "../components/CloseBtn.js";
|
|
10
10
|
import { MinimizeBtn as $ } from "../components/MinimizeBtn.js";
|
|
11
|
-
import { FullScreenBtn as
|
|
12
|
-
import
|
|
11
|
+
import { FullScreenBtn as de } from "../components/FullscreenBtn.js";
|
|
12
|
+
import v from "./MinimizableDialogV2.module.js";
|
|
13
13
|
import { useTranslations as ue } from "./useTranslations.js";
|
|
14
|
-
import { useControlledProps as
|
|
15
|
-
import
|
|
16
|
-
import { useId as W, useLayoutEffect as H, useRef as
|
|
17
|
-
import { Fragment as
|
|
18
|
-
var
|
|
19
|
-
const { showCloseIcon: R = !0, showMinimizeIcon: _ = !0, showExpandIcon: Q = !0, enableFullscreen: U = !0, fullscreenLockedReason: N, title: u, label:
|
|
14
|
+
import { useControlledProps as xe } from "./useControlledProps.js";
|
|
15
|
+
import fe from "clsx";
|
|
16
|
+
import { useId as W, useLayoutEffect as H, useRef as m } from "react";
|
|
17
|
+
import { Fragment as pe, jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
18
|
+
var Pe = (C) => {
|
|
19
|
+
const { showCloseIcon: R = !0, showMinimizeIcon: _ = !0, showExpandIcon: Q = !0, enableFullscreen: U = !0, fullscreenLockedReason: N, title: u, label: x, children: G, open: n, onClose: J, classNameOverrides: y = {
|
|
20
20
|
maximized: "",
|
|
21
21
|
minimized: "",
|
|
22
22
|
fullscreen: ""
|
|
23
|
-
}, dataTest: K, actionNode: X, locale: Y = "en", busyReason: Z, style: B, initialFocusRef: F } =
|
|
24
|
-
if (
|
|
23
|
+
}, dataTest: K, actionNode: X, locale: Y = "en", busyReason: Z, style: B, initialFocusRef: F } = C, a = oe(), i = ue(Y), o = m(null), f = m(null), S = m(null), k = m(null), b = m(!1), w = m(null), p = W(), T = W(), { minimized: t, setMinimized: I, fullScreen: s, setFullScreen: M } = xe(C), c = s && !t, j = !!N, { busy: g, busyReason: E, contextValue: P } = ie(Z ?? i.waitUntilSaved), h = () => {
|
|
24
|
+
if (g) return !1;
|
|
25
25
|
I(!1), J();
|
|
26
26
|
};
|
|
27
27
|
H(() => {
|
|
28
|
-
|
|
28
|
+
o.current?.toggleAttribute("inert", t), f.current?.toggleAttribute("inert", !t);
|
|
29
29
|
}, [t]), H(() => {
|
|
30
|
-
const
|
|
31
|
-
if (
|
|
32
|
-
const D =
|
|
33
|
-
|
|
30
|
+
const z = n && !b.current, d = !n && b.current;
|
|
31
|
+
if (b.current = n, d) {
|
|
32
|
+
const D = w.current;
|
|
33
|
+
w.current = null, (!document.activeElement || document.activeElement === document.body) && D?.isConnected && D.focus({ preventScroll: !0 });
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
|
-
if (!
|
|
37
|
-
|
|
38
|
-
const q = t ?
|
|
39
|
-
(F?.current ??
|
|
36
|
+
if (!z) return;
|
|
37
|
+
w.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
38
|
+
const q = t ? f.current : o.current, le = t ? k.current : S.current;
|
|
39
|
+
(F?.current ?? le ?? (q ? A(q) : void 0))?.focus({ preventScroll: !0 });
|
|
40
40
|
}, [
|
|
41
41
|
F,
|
|
42
42
|
t,
|
|
43
|
-
|
|
43
|
+
n
|
|
44
44
|
]);
|
|
45
45
|
const O = () => {
|
|
46
|
-
const
|
|
46
|
+
const z = t ? o : f;
|
|
47
47
|
I(!t), requestAnimationFrame(() => {
|
|
48
|
-
const
|
|
49
|
-
|
|
48
|
+
const d = z.current;
|
|
49
|
+
d && (d.querySelector('[data-testid="toggle-minimize-btn"]') ?? A(d))?.focus({ preventScroll: !0 });
|
|
50
50
|
});
|
|
51
51
|
};
|
|
52
|
-
|
|
53
|
-
active:
|
|
54
|
-
requestClose: () => !c &&
|
|
55
|
-
ownerRef:
|
|
52
|
+
ce(n && c, o, h), se({
|
|
53
|
+
active: n && !t,
|
|
54
|
+
requestClose: () => !c && ae() ? !1 : h(),
|
|
55
|
+
ownerRef: o
|
|
56
56
|
});
|
|
57
|
-
const ee = c ?
|
|
57
|
+
const ee = c ? a ? {
|
|
58
58
|
inset: 0,
|
|
59
59
|
maxHeight: "100dvh",
|
|
60
60
|
maxWidth: "100dvw",
|
|
@@ -70,44 +70,44 @@ var je = (w) => {
|
|
|
70
70
|
width: "min(1000px, calc(100vw - 32px))",
|
|
71
71
|
maxWidth: "min(1000px, calc(100vw - 32px))",
|
|
72
72
|
height: "95dvh",
|
|
73
|
-
...
|
|
73
|
+
...me
|
|
74
74
|
} : void 0;
|
|
75
|
-
if (!
|
|
76
|
-
const te =
|
|
77
|
-
return /* @__PURE__ */
|
|
75
|
+
if (!n) return null;
|
|
76
|
+
const te = x ? `${T} ${p}` : p;
|
|
77
|
+
return /* @__PURE__ */ r(pe, { children: [
|
|
78
78
|
/* @__PURE__ */ e("div", {
|
|
79
|
-
ref:
|
|
79
|
+
ref: f,
|
|
80
80
|
style: {
|
|
81
81
|
zIndex: 51,
|
|
82
82
|
...B
|
|
83
83
|
},
|
|
84
|
-
className:
|
|
85
|
-
children: /* @__PURE__ */
|
|
86
|
-
className:
|
|
84
|
+
className: l(v["minimized-dialog"], !t && v.hidden, y.minimized),
|
|
85
|
+
children: /* @__PURE__ */ r("div", {
|
|
86
|
+
className: fe("flex items-center justify-between", !t && "hidden"),
|
|
87
87
|
"data-testid": K,
|
|
88
88
|
children: [/* @__PURE__ */ e("div", {
|
|
89
|
-
className: "max-w-[303px] truncate pr-1 text-lg font-semibold text-delta-800",
|
|
90
|
-
children: /* @__PURE__ */ e(
|
|
89
|
+
className: l("max-w-[303px] truncate pr-1 text-lg font-semibold text-delta-800", "max-xs:hyphens-auto max-xs:whitespace-normal max-xs:![overflow-wrap:anywhere]"),
|
|
90
|
+
children: /* @__PURE__ */ e(ne, {
|
|
91
91
|
title: u,
|
|
92
92
|
placement: "top",
|
|
93
93
|
children: /* @__PURE__ */ e("div", {
|
|
94
|
-
className: "truncate",
|
|
94
|
+
className: l("truncate", "max-xs:hyphens-auto max-xs:whitespace-normal max-xs:![overflow-wrap:anywhere]"),
|
|
95
95
|
children: u
|
|
96
96
|
})
|
|
97
97
|
})
|
|
98
|
-
}), /* @__PURE__ */
|
|
98
|
+
}), /* @__PURE__ */ r("div", {
|
|
99
99
|
className: "flex items-center gap-x-1",
|
|
100
100
|
children: [/* @__PURE__ */ e($, {
|
|
101
101
|
type: "expand",
|
|
102
102
|
visibility: Q,
|
|
103
103
|
onClick: O,
|
|
104
|
-
tooltipTitle:
|
|
104
|
+
tooltipTitle: i.expand
|
|
105
105
|
}), /* @__PURE__ */ e(V, {
|
|
106
106
|
buttonRef: k,
|
|
107
107
|
showCloseIcon: R,
|
|
108
|
-
onClick:
|
|
109
|
-
disabledReason:
|
|
110
|
-
tooltipTitle:
|
|
108
|
+
onClick: h,
|
|
109
|
+
disabledReason: g ? E : void 0,
|
|
110
|
+
tooltipTitle: i.close
|
|
111
111
|
})]
|
|
112
112
|
})]
|
|
113
113
|
})
|
|
@@ -115,7 +115,7 @@ var je = (w) => {
|
|
|
115
115
|
c && /* @__PURE__ */ e("div", {
|
|
116
116
|
className: "fixed inset-0 z-[52] bg-[rgb(98,110,126)] bg-opacity-70",
|
|
117
117
|
onClick: () => {
|
|
118
|
-
|
|
118
|
+
j || M(!1);
|
|
119
119
|
}
|
|
120
120
|
}),
|
|
121
121
|
/* @__PURE__ */ e("div", {
|
|
@@ -124,65 +124,65 @@ var je = (w) => {
|
|
|
124
124
|
...B,
|
|
125
125
|
...ee
|
|
126
126
|
},
|
|
127
|
-
ref:
|
|
127
|
+
ref: o,
|
|
128
128
|
role: "dialog",
|
|
129
129
|
"aria-modal": c ? !0 : void 0,
|
|
130
130
|
"aria-labelledby": te,
|
|
131
|
-
className:
|
|
132
|
-
children: /* @__PURE__ */
|
|
133
|
-
value:
|
|
134
|
-
children: [/* @__PURE__ */
|
|
135
|
-
className:
|
|
136
|
-
children: [/* @__PURE__ */
|
|
137
|
-
className: "flex items-center justify-between",
|
|
138
|
-
children: [
|
|
131
|
+
className: l(v.dialog, t && v.hidden, !s && y.maximized, s && y.fullscreen, c && "fixed z-[53] duration-0"),
|
|
132
|
+
children: /* @__PURE__ */ r(re.Provider, {
|
|
133
|
+
value: o,
|
|
134
|
+
children: [/* @__PURE__ */ r("div", {
|
|
135
|
+
className: l("flex flex-col border-b-[1px] border-delta-200 px-4", a ? "py-3" : "py-4"),
|
|
136
|
+
children: [/* @__PURE__ */ r("div", {
|
|
137
|
+
className: l("flex items-center justify-between", "max-xs:flex-col-reverse max-xs:items-stretch max-xs:gap-2"),
|
|
138
|
+
children: [x ? /* @__PURE__ */ e("div", {
|
|
139
139
|
id: T,
|
|
140
|
-
className: "text-sm text-delta-700",
|
|
141
|
-
children:
|
|
140
|
+
className: "text-sm text-delta-700 max-xs:hyphens-auto max-xs:![overflow-wrap:anywhere]",
|
|
141
|
+
children: x
|
|
142
142
|
}) : /* @__PURE__ */ e("div", {
|
|
143
|
-
id:
|
|
144
|
-
className:
|
|
143
|
+
id: p,
|
|
144
|
+
className: l("font-semibold text-delta-800", a ? "line-clamp-2 text-xl" : "line-clamp-1 text-2xl", "max-xs:line-clamp-none", "max-xs:hyphens-auto max-xs:whitespace-normal max-xs:![overflow-wrap:anywhere]"),
|
|
145
145
|
children: u
|
|
146
|
-
}), /* @__PURE__ */
|
|
147
|
-
className: "flex items-center gap-x-1",
|
|
146
|
+
}), /* @__PURE__ */ r("div", {
|
|
147
|
+
className: "flex items-center gap-x-1 max-xs:flex-wrap max-xs:justify-end max-xs:gap-y-2",
|
|
148
148
|
children: [
|
|
149
149
|
/* @__PURE__ */ e(L.Provider, {
|
|
150
|
-
value:
|
|
150
|
+
value: P,
|
|
151
151
|
children: X
|
|
152
152
|
}),
|
|
153
153
|
/* @__PURE__ */ e($, {
|
|
154
|
-
visibility: _ && !
|
|
154
|
+
visibility: _ && !a,
|
|
155
155
|
type: "minimize",
|
|
156
156
|
onClick: O,
|
|
157
|
-
tooltipTitle:
|
|
157
|
+
tooltipTitle: i.minimize
|
|
158
158
|
}),
|
|
159
|
-
/* @__PURE__ */ e(
|
|
160
|
-
showFullScreenIcon: (U ||
|
|
159
|
+
/* @__PURE__ */ e(de, {
|
|
160
|
+
showFullScreenIcon: (U || j) && !a,
|
|
161
161
|
disabledReason: N,
|
|
162
162
|
fullScreen: s,
|
|
163
163
|
onClick: () => {
|
|
164
164
|
M(!s);
|
|
165
165
|
},
|
|
166
|
-
tooltipTitle: s ?
|
|
166
|
+
tooltipTitle: s ? i.exitFullscreen : i.fullscreen
|
|
167
167
|
}),
|
|
168
168
|
/* @__PURE__ */ e(V, {
|
|
169
169
|
buttonRef: S,
|
|
170
170
|
showCloseIcon: R,
|
|
171
|
-
onClick:
|
|
172
|
-
disabledReason:
|
|
173
|
-
tooltipTitle:
|
|
171
|
+
onClick: h,
|
|
172
|
+
disabledReason: g ? E : void 0,
|
|
173
|
+
tooltipTitle: i.close
|
|
174
174
|
})
|
|
175
175
|
]
|
|
176
176
|
})]
|
|
177
|
-
}),
|
|
178
|
-
id:
|
|
179
|
-
className:
|
|
177
|
+
}), x && /* @__PURE__ */ e("div", {
|
|
178
|
+
id: p,
|
|
179
|
+
className: l("font-semibold text-delta-800", a ? "line-clamp-2 text-xl" : "line-clamp-1 text-2xl", "max-xs:line-clamp-none", "max-xs:hyphens-auto max-xs:whitespace-normal max-xs:![overflow-wrap:anywhere]"),
|
|
180
180
|
children: u
|
|
181
181
|
})]
|
|
182
182
|
}), /* @__PURE__ */ e("div", {
|
|
183
|
-
className:
|
|
183
|
+
className: l(t && "hidden", "flex flex-grow flex-col overflow-y-auto overscroll-contain"),
|
|
184
184
|
children: /* @__PURE__ */ e(L.Provider, {
|
|
185
|
-
value:
|
|
185
|
+
value: P,
|
|
186
186
|
children: G
|
|
187
187
|
})
|
|
188
188
|
})]
|
|
@@ -191,5 +191,5 @@ var je = (w) => {
|
|
|
191
191
|
] });
|
|
192
192
|
};
|
|
193
193
|
export {
|
|
194
|
-
|
|
194
|
+
Pe as MinimizableDialogV2
|
|
195
195
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { cn as i } from "../../../helpers/cn.js";
|
|
2
|
-
import { resolveSx as
|
|
3
|
-
import { CloseIcon as
|
|
4
|
-
import { CheckOutlineIcon as
|
|
5
|
-
import { ErrorOutlineIcon as
|
|
6
|
-
import { InfoOutlineIcon as
|
|
2
|
+
import { resolveSx as f } from "../../../helpers/sx.js";
|
|
3
|
+
import { CloseIcon as h } from "../../icons/close-icon/CloseIcon.js";
|
|
4
|
+
import { CheckOutlineIcon as g } from "./components/CheckOutlineIcon.js";
|
|
5
|
+
import { ErrorOutlineIcon as m } from "./components/ErrorOutlineIcon.js";
|
|
6
|
+
import { InfoOutlineIcon as u } from "./components/InfoOutlineIcon.js";
|
|
7
7
|
import { WarningAmberOutlineIcon as w } from "./components/WarningAmberOutlineIcon.js";
|
|
8
8
|
import { jsx as r, jsxs as p } from "react/jsx-runtime";
|
|
9
9
|
var I = {
|
|
@@ -49,11 +49,11 @@ var I = {
|
|
|
49
49
|
filled: "px-4 py-2",
|
|
50
50
|
outlined: "px-4 py-2"
|
|
51
51
|
}, N = {
|
|
52
|
-
success: /* @__PURE__ */ r(
|
|
52
|
+
success: /* @__PURE__ */ r(g, {
|
|
53
53
|
width: 20,
|
|
54
54
|
height: 20
|
|
55
55
|
}),
|
|
56
|
-
info: /* @__PURE__ */ r(
|
|
56
|
+
info: /* @__PURE__ */ r(u, {
|
|
57
57
|
width: 20,
|
|
58
58
|
height: 20
|
|
59
59
|
}),
|
|
@@ -61,31 +61,31 @@ var I = {
|
|
|
61
61
|
width: 20,
|
|
62
62
|
height: 20
|
|
63
63
|
}),
|
|
64
|
-
error: /* @__PURE__ */ r(
|
|
64
|
+
error: /* @__PURE__ */ r(m, {
|
|
65
65
|
width: 20,
|
|
66
66
|
height: 20
|
|
67
67
|
})
|
|
68
|
-
}, D = ({ severity: e = "success", variant: t = "standard", icon: n, iconMapping:
|
|
69
|
-
const s = n === !1 ? null : n ??
|
|
68
|
+
}, D = ({ severity: e = "success", variant: t = "standard", icon: n, iconMapping: a, action: c, onClose: o, children: d, className: l, sx: x, role: b = "alert" }) => {
|
|
69
|
+
const s = n === !1 ? null : n ?? a?.[e] ?? N[e];
|
|
70
70
|
return /* @__PURE__ */ p("div", {
|
|
71
|
-
role:
|
|
71
|
+
role: b,
|
|
72
72
|
className: i("flex items-center gap-2 rounded text-sm", C[t], I[t][e], l),
|
|
73
|
-
style:
|
|
73
|
+
style: f(x),
|
|
74
74
|
children: [
|
|
75
75
|
s && /* @__PURE__ */ r("span", {
|
|
76
76
|
className: i("flex shrink-0 items-center", A[t][e]),
|
|
77
77
|
children: s
|
|
78
78
|
}),
|
|
79
79
|
/* @__PURE__ */ r("span", {
|
|
80
|
-
className: "min-w-0 flex-1",
|
|
81
|
-
children:
|
|
80
|
+
className: "min-w-0 flex-1 max-xs:hyphens-auto max-xs:![overflow-wrap:anywhere]",
|
|
81
|
+
children: d
|
|
82
82
|
}),
|
|
83
|
-
|
|
83
|
+
c ?? (o && /* @__PURE__ */ r("button", {
|
|
84
84
|
type: "button",
|
|
85
85
|
"aria-label": "Close",
|
|
86
86
|
onClick: o,
|
|
87
87
|
className: "flex h-8 min-w-8 shrink-0 items-center justify-center rounded border-0 bg-transparent px-1.5 hover:bg-black/10",
|
|
88
|
-
children: /* @__PURE__ */ r(
|
|
88
|
+
children: /* @__PURE__ */ r(h, {
|
|
89
89
|
width: 20,
|
|
90
90
|
height: 20
|
|
91
91
|
})
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { StyledTooltip as L } from "../../data-display/tooltip/StyledTooltip.js";
|
|
2
|
-
import { LoadingIcon as
|
|
2
|
+
import { LoadingIcon as O } from "../../icons/loading-icon/LoadingIcon.js";
|
|
3
3
|
import e from "./StyledButton.module.js";
|
|
4
|
-
import { useReportDialogBusy as
|
|
5
|
-
import
|
|
4
|
+
import { useReportDialogBusy as W } from "../../feedback/dialog/DialogBusyContext.js";
|
|
5
|
+
import y from "clsx";
|
|
6
6
|
import "react";
|
|
7
|
-
import { Fragment as _, jsx as
|
|
7
|
+
import { Fragment as _, jsx as o, jsxs as f } from "react/jsx-runtime";
|
|
8
8
|
var F = {
|
|
9
9
|
en: "In progress",
|
|
10
10
|
no: "Pågår"
|
|
11
|
-
},
|
|
11
|
+
}, x = {
|
|
12
12
|
contained: e.contained,
|
|
13
13
|
outlined: e.outlined,
|
|
14
14
|
text: e.text,
|
|
@@ -19,37 +19,38 @@ var F = {
|
|
|
19
19
|
medium: e.medium,
|
|
20
20
|
error: e.error,
|
|
21
21
|
common: e.common
|
|
22
|
-
}, M = ({ variant:
|
|
23
|
-
|
|
24
|
-
const
|
|
22
|
+
}, M = ({ variant: h = "contained", className: v = "", size: r = "medium", children: i, refLink: w, startIcon: B, endIcon: b, dataTest: g, error: S, style: k, disabled: c, disabledReason: p, loading: t, holdsDialog: I = !0, loadingAnnouncement: j, locale: C = "en", onClick: D, ...l }) => {
|
|
23
|
+
W(!!t && I);
|
|
24
|
+
const n = r === "large" || r === "medium", N = S ? "error" : "common", s = !!c && !!p, m = s || !!t, d = n ? 20 : 16, u = (a) => t && a ? /* @__PURE__ */ o("span", {
|
|
25
25
|
style: {
|
|
26
26
|
display: "inline-flex",
|
|
27
27
|
opacity: 0
|
|
28
28
|
},
|
|
29
|
-
children:
|
|
30
|
-
}) :
|
|
29
|
+
children: a
|
|
30
|
+
}) : a, R = (a) => {
|
|
31
31
|
if (m) {
|
|
32
|
-
|
|
32
|
+
a.preventDefault();
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
|
-
|
|
35
|
+
D?.(a);
|
|
36
36
|
}, G = /* @__PURE__ */ f("button", {
|
|
37
37
|
...l,
|
|
38
|
-
disabled: !!
|
|
38
|
+
disabled: !!c && !m,
|
|
39
39
|
"aria-disabled": m ? !0 : l["aria-disabled"],
|
|
40
40
|
"aria-busy": t ? !0 : l["aria-busy"],
|
|
41
41
|
onClick: R,
|
|
42
|
-
className:
|
|
42
|
+
className: y("asma-touch-ready", e["asma-ui-core-button"], x[h], x[N], x[r], "max-xs:h-auto max-xs:max-w-full max-xs:py-1 max-xs:[&>:not(div)]:shrink-0", r === "small" ? "max-xs:min-h-8" : "max-xs:min-h-10", v),
|
|
43
43
|
style: {
|
|
44
|
-
...
|
|
44
|
+
...i ? { flexShrink: 0 } : {},
|
|
45
45
|
...t ? { position: "relative" } : {},
|
|
46
|
-
...
|
|
46
|
+
...k
|
|
47
47
|
},
|
|
48
|
-
ref:
|
|
48
|
+
ref: w,
|
|
49
49
|
"data-testid": g,
|
|
50
50
|
children: [
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
u(B),
|
|
52
|
+
i && /* @__PURE__ */ o("div", {
|
|
53
|
+
className: y("max-xs:hyphens-auto max-xs:whitespace-normal max-xs:![overflow-wrap:anywhere]", "max-xs:text-center"),
|
|
53
54
|
style: {
|
|
54
55
|
opacity: t ? 0 : void 0,
|
|
55
56
|
overflow: "hidden",
|
|
@@ -58,14 +59,14 @@ var F = {
|
|
|
58
59
|
display: "flex",
|
|
59
60
|
alignItems: "center",
|
|
60
61
|
justifyContent: "center",
|
|
61
|
-
gap:
|
|
62
|
-
paddingLeft:
|
|
63
|
-
paddingRight:
|
|
62
|
+
gap: n ? "8px" : "4px",
|
|
63
|
+
paddingLeft: n ? "8px" : "4px",
|
|
64
|
+
paddingRight: n ? "8px" : "4px"
|
|
64
65
|
},
|
|
65
|
-
children:
|
|
66
|
+
children: i
|
|
66
67
|
}),
|
|
67
|
-
|
|
68
|
-
t && /* @__PURE__ */
|
|
68
|
+
u(b),
|
|
69
|
+
t && /* @__PURE__ */ o("span", {
|
|
69
70
|
"aria-hidden": "true",
|
|
70
71
|
style: {
|
|
71
72
|
position: "absolute",
|
|
@@ -74,24 +75,24 @@ var F = {
|
|
|
74
75
|
alignItems: "center",
|
|
75
76
|
justifyContent: "center"
|
|
76
77
|
},
|
|
77
|
-
children: /* @__PURE__ */
|
|
78
|
-
width:
|
|
79
|
-
height:
|
|
78
|
+
children: /* @__PURE__ */ o(O, {
|
|
79
|
+
width: d,
|
|
80
|
+
height: d
|
|
80
81
|
})
|
|
81
82
|
})
|
|
82
83
|
]
|
|
83
84
|
});
|
|
84
|
-
return /* @__PURE__ */ f(_, { children: [/* @__PURE__ */
|
|
85
|
+
return /* @__PURE__ */ f(_, { children: [/* @__PURE__ */ o(L, {
|
|
85
86
|
arrow: !0,
|
|
86
|
-
title:
|
|
87
|
-
open:
|
|
88
|
-
openOnTap:
|
|
89
|
-
persistentDescription:
|
|
87
|
+
title: p,
|
|
88
|
+
open: s ? void 0 : !1,
|
|
89
|
+
openOnTap: s,
|
|
90
|
+
persistentDescription: s,
|
|
90
91
|
children: G
|
|
91
|
-
}), t !== void 0 && /* @__PURE__ */
|
|
92
|
+
}), t !== void 0 && /* @__PURE__ */ o("span", {
|
|
92
93
|
role: "status",
|
|
93
94
|
className: "sr-only",
|
|
94
|
-
children: t ? j ?? F[
|
|
95
|
+
children: t ? j ?? F[C] : ""
|
|
95
96
|
})] });
|
|
96
97
|
};
|
|
97
98
|
export {
|