asma-ui-core 3.105.0 → 3.107.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/DynamicToolbar.js +99 -97
- package/dist/components/custom/module/header-layout/ToolbarActionGroup.js +60 -41
- package/dist/components/custom/module/header-layout/ToolbarRows.js +51 -47
- package/dist/components/custom/module/header-layout/useTranslations.js +12 -10
- package/dist/components/custom/page/page-header/PageHeader.js +41 -40
- package/dist/components/custom/widget/widget/StyledWidget.js +21 -20
- package/dist/components/data-display/chip/StyledChip.js +70 -53
- package/dist/components/data-display/tooltip/StyledTooltip.js +116 -73
- package/dist/components/feedback/dialog/DialogBusyContext.js +32 -0
- package/dist/components/feedback/dialog/StyledDialog.js +81 -72
- package/dist/components/feedback/dialog/dialog-footer/StyledDialogFooter.js +76 -71
- package/dist/components/feedback/minimizable-dialog/MinimizableDialog.js +133 -137
- package/dist/components/feedback/minimizable-dialog/components/CloseBtn.js +11 -8
- package/dist/components/feedback/minimizable-dialog/components/FullscreenBtn.js +6 -6
- package/dist/components/feedback/minimizable-dialog/components/MinimizeBtn.js +1 -1
- package/dist/components/feedback/minimizable-dialog/v2/MinimizableDialogV2.js +108 -88
- package/dist/components/feedback/minimizable-dialog/v2/useTranslations.js +6 -4
- package/dist/components/inputs/button/StyledButton.js +83 -33
- package/dist/components/inputs/button/StyledButton.module.js +13 -13
- package/dist/components/inputs/dynamic-select/components/DynamicInteractiveChipGroup.js +32 -32
- package/dist/components/inputs/dynamic-select/components/DynamicSelectAutocomplete.js +6 -6
- package/dist/components/inputs/select/StyledSelect.js +8 -8
- package/dist/components/inputs/select-autocomplete/StyledSelectAutocomplete.js +14 -14
- package/dist/components/navigation/link/StyledLink.js +53 -26
- package/dist/components/navigation/link/StyledLink.module.js +6 -6
- package/dist/components/navigation/menu/StyledMenuItem.js +35 -30
- package/dist/components/navigation/tabs/StyledTab.js +23 -25
- package/dist/components/utils/bottom-sheet/StyledBottomSheet.js +6 -6
- package/dist/components/utils/copy-wrapper/CopyButton.js +4 -4
- package/dist/components/utils/copy-wrapper/CopyWrapper.js +4 -4
- package/dist/datetime/components/date-picker/components/BaseDatePickerInput.js +66 -56
- package/dist/datetime/components/date-picker/components/DatePickerInputSingle.js +13 -12
- package/dist/datetime/components/time-picker/TimePickerInput.js +47 -39
- package/dist/datetime/helpers/getTitleLabelling.js +10 -0
- package/dist/datetime/shared-components/button/StyledButton.module.js +11 -11
- package/dist/helpers/focusable.js +2 -2
- package/dist/index.js +589 -585
- package/dist/src/components/custom/module/header-layout/ToolbarActionGroup.d.ts +13 -2
- package/dist/src/components/custom/module/header-layout/ToolbarRows.d.ts +2 -1
- package/dist/src/components/custom/module/header-layout/planToolbarActions.d.ts +18 -1
- package/dist/src/components/custom/module/header-layout/useTranslations.d.ts +2 -0
- package/dist/src/components/custom/widget/widget/StyledWidget.d.ts +5 -0
- package/dist/src/components/data-display/chip/StyledChip.d.ts +6 -0
- package/dist/src/components/data-display/interactive-chip/StyledInteractiveChip.d.ts +7 -1
- package/dist/src/components/data-display/tooltip/StyledTooltip.d.ts +16 -2
- package/dist/src/components/feedback/dialog/DialogBusy.test.d.ts +1 -0
- package/dist/src/components/feedback/dialog/DialogBusyContext.d.ts +28 -0
- package/dist/src/components/feedback/dialog/StyledDialog.d.ts +5 -0
- package/dist/src/components/feedback/dialog/dialog-footer/StyledDialogFooter.d.ts +9 -8
- package/dist/src/components/feedback/dialog/index.d.ts +1 -0
- package/dist/src/components/feedback/minimizable-dialog/components/CloseBtn.d.ts +2 -0
- package/dist/src/components/feedback/minimizable-dialog/types.d.ts +11 -0
- package/dist/src/components/feedback/minimizable-dialog/v2/types.d.ts +2 -0
- package/dist/src/components/feedback/minimizable-dialog/v2/useTranslations.d.ts +2 -0
- package/dist/src/components/inputs/button/StyledButton.d.ts +25 -1
- package/dist/src/components/inputs/button/StyledButtonBusy.test.d.ts +1 -0
- package/dist/src/components/navigation/link/StyledLink.d.ts +6 -0
- package/dist/src/components/navigation/menu/StyledMenuItem.d.ts +8 -1
- package/dist/src/components/navigation/tabs/StyledTab.d.ts +6 -0
- package/dist/src/datetime/components/date-picker/components/BaseDatePickerInput.d.ts +2 -0
- package/dist/src/datetime/components/date-picker/types.d.ts +6 -0
- package/dist/src/datetime/components/time-picker/types.d.ts +6 -1
- package/dist/src/datetime/helpers/getTitleLabelling.d.ts +12 -0
- package/dist/src/forms/submitChanged.d.ts +3 -0
- package/dist/src/helpers/focusable.d.ts +8 -0
- package/dist/src/helpers/index.d.ts +1 -0
- package/dist/src/helpers/uiCoreLocale.d.ts +1 -0
- package/dist/src/table/shared-components/StyledMenuItem.d.ts +5 -1
- package/dist/table/components/columns/action-column/components/RowActionMenu.js +63 -69
- package/dist/table/shared-components/StyledMenuItem.js +28 -16
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { cn as q } from "../../../../helpers/cn.js";
|
|
2
|
+
import { StyledTooltip as z } from "../../../data-display/tooltip/StyledTooltip.js";
|
|
2
3
|
import { LoadingIcon as te } from "../../../icons/loading-icon/LoadingIcon.js";
|
|
3
4
|
import { CheckIcon as le } from "../../../icons/check-icon/CheckIcon.js";
|
|
4
5
|
import { PlusIconCircle as ae } from "../../../icons/plus-icon-circle/PlusIconCircle.js";
|
|
5
|
-
import { StyledChip as
|
|
6
|
+
import { StyledChip as E } from "../../../data-display/chip/StyledChip.js";
|
|
6
7
|
import { StyledCheckbox as re } from "../../checkbox/base-ui/StyledCheckbox.js";
|
|
7
|
-
import { StyledTooltip as E } from "../../../data-display/tooltip/StyledTooltip.js";
|
|
8
8
|
import { StyledInputField as oe } from "../../input-field/StyledInputField.js";
|
|
9
9
|
import { StyledSelectAutocomplete as ie } from "../../select-autocomplete/StyledSelectAutocomplete.js";
|
|
10
10
|
import { DynamicInteractiveChipGroup as ne } from "./DynamicInteractiveChipGroup.js";
|
|
@@ -55,7 +55,7 @@ var Ce = se((O, H) => {
|
|
|
55
55
|
renderValue: o ? (e) => {
|
|
56
56
|
if (!Array.isArray(e)) return null;
|
|
57
57
|
const t = e, c = X ?? k.length, r = t.slice(0, c), n = t.length - c;
|
|
58
|
-
return [...r.map((a) => /* @__PURE__ */ l(
|
|
58
|
+
return [...r.map((a) => /* @__PURE__ */ l(E, {
|
|
59
59
|
dataTest: `${w(a)}-chip`,
|
|
60
60
|
readOnly: u,
|
|
61
61
|
variant: "outlined",
|
|
@@ -69,7 +69,7 @@ var Ce = se((O, H) => {
|
|
|
69
69
|
onDelete: () => {
|
|
70
70
|
Array.isArray(g) && x(g.filter((p) => !$(p, a)));
|
|
71
71
|
}
|
|
72
|
-
}, w(a))), n > 0 ? /* @__PURE__ */ l(
|
|
72
|
+
}, w(a))), n > 0 ? /* @__PURE__ */ l(E, {
|
|
73
73
|
dataTest: "remaining-count-tag-chip",
|
|
74
74
|
label: `+${n}`,
|
|
75
75
|
variant: "outlined",
|
|
@@ -105,7 +105,7 @@ var Ce = se((O, H) => {
|
|
|
105
105
|
}, j, e["data-active"] !== void 0 && /* @__PURE__ */ l("span", {
|
|
106
106
|
"aria-hidden": "true",
|
|
107
107
|
className: "border-l-solid pointer-events-none absolute inset-y-0 left-0 border-l-[3px] border-focus-ring"
|
|
108
|
-
}), /* @__PURE__ */ l(
|
|
108
|
+
}), /* @__PURE__ */ l(z, {
|
|
109
109
|
arrow: !0,
|
|
110
110
|
title: n,
|
|
111
111
|
open: p,
|
|
@@ -135,7 +135,7 @@ var Ce = se((O, H) => {
|
|
|
135
135
|
}, j, e["data-active"] !== void 0 && /* @__PURE__ */ l("span", {
|
|
136
136
|
"aria-hidden": "true",
|
|
137
137
|
className: "border-l-solid pointer-events-none absolute inset-y-0 left-0 border-l-[3px] border-focus-ring"
|
|
138
|
-
}), /* @__PURE__ */ l(
|
|
138
|
+
}), /* @__PURE__ */ l(z, {
|
|
139
139
|
arrow: !0,
|
|
140
140
|
title: n,
|
|
141
141
|
open: p,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { cn as y } from "../../../helpers/cn.js";
|
|
2
2
|
import { resolveSx as je } from "../../../helpers/sx.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { TOP_LAYER_PROPS as Ue, TOP_LAYER_RESET_STYLE as Ve, getOpenModalDialogAncestor as re, shouldUsePopoverTopLayer as qe, useTopLayerRef as Ye } from "../../../hooks/useTopLayer.hook.js";
|
|
4
|
+
import { ChevronDownIcon as ze } from "../../icons/chevron-down-icon/ChevronDownIcon.js";
|
|
5
|
+
import { CloseIcon as Ke } from "../../icons/close-icon/CloseIcon.js";
|
|
6
6
|
import { HelperRow as We } from "../../../helpers/HelperRow.js";
|
|
7
7
|
import { useHelperRowBudget as Ge } from "../../../helpers/useHelperRowBudget.js";
|
|
8
8
|
import { useHelperSlot as Je } from "../../../helpers/useHelperSlot.js";
|
|
@@ -32,7 +32,7 @@ var Ct = ({ dataTest: T, value: M, defaultValue: ne, onChange: $, error: le, err
|
|
|
32
32
|
at(N, { enabled: !n && !c }),
|
|
33
33
|
ct(N),
|
|
34
34
|
pt(N, { role: "listbox" })
|
|
35
|
-
]), [Q, X] = x(), _ =
|
|
35
|
+
]), [Q, X] = x(), _ = qe(Q), Ee = ft([Ye(Se, _), P]);
|
|
36
36
|
B(() => u?.setFocused(r || k), [
|
|
37
37
|
r,
|
|
38
38
|
k,
|
|
@@ -149,11 +149,11 @@ var Ct = ({ dataTest: T, value: M, defaultValue: ne, onChange: $, error: le, err
|
|
|
149
149
|
onClick: (e) => {
|
|
150
150
|
e.stopPropagation(), ee();
|
|
151
151
|
},
|
|
152
|
-
children: /* @__PURE__ */ l(
|
|
152
|
+
children: /* @__PURE__ */ l(Ke, {
|
|
153
153
|
width: 18,
|
|
154
154
|
height: 18
|
|
155
155
|
})
|
|
156
|
-
}), /* @__PURE__ */ l(
|
|
156
|
+
}), /* @__PURE__ */ l(ze, {
|
|
157
157
|
width: 24,
|
|
158
158
|
height: 24,
|
|
159
159
|
className: y("shrink-0 transition-transform", H ? "text-gama-500" : Me, r && "flip-180")
|
|
@@ -178,9 +178,9 @@ var Ct = ({ dataTest: T, value: M, defaultValue: ne, onChange: $, error: le, err
|
|
|
178
178
|
"aria-multiselectable": d ? !0 : void 0,
|
|
179
179
|
"aria-labelledby": v,
|
|
180
180
|
"aria-label": v ? void 0 : w,
|
|
181
|
-
..._ ?
|
|
181
|
+
..._ ? Ue : {},
|
|
182
182
|
style: {
|
|
183
|
-
..._ ?
|
|
183
|
+
..._ ? Ve : {},
|
|
184
184
|
...Fe,
|
|
185
185
|
fontFamily: "Roboto, Helvetica, Arial, sans-serif"
|
|
186
186
|
},
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { cn as _ } from "../../../helpers/cn.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import { TOP_LAYER_PROPS as nt, TOP_LAYER_RESET_STYLE as at, getOpenModalDialogAncestor as it, shouldUsePopoverTopLayer as ct, useTopLayerRef as dt } from "../../../hooks/useTopLayer.hook.js";
|
|
3
|
+
import { ChevronDownIcon as ut } from "../../icons/chevron-down-icon/ChevronDownIcon.js";
|
|
4
|
+
import { CloseIcon as pt } from "../../icons/close-icon/CloseIcon.js";
|
|
5
|
+
import { CheckIcon as ft } from "../../icons/check-icon/CheckIcon.js";
|
|
6
|
+
import { PlusIconCircle as mt } from "../../icons/plus-icon-circle/PlusIconCircle.js";
|
|
7
|
+
import { StyledChip as ht } from "../../data-display/chip/StyledChip.js";
|
|
7
8
|
import { StyledCheckbox as de } from "../checkbox/base-ui/StyledCheckbox.js";
|
|
8
|
-
import { TOP_LAYER_PROPS as ut, TOP_LAYER_RESET_STYLE as pt, getOpenModalDialogAncestor as ft, shouldUsePopoverTopLayer as mt, useTopLayerRef as ht } from "../../../hooks/useTopLayer.hook.js";
|
|
9
9
|
import { LoadingIcon as bt } from "../../../table/shared-components/LoadingIcon.js";
|
|
10
10
|
import U from "./StyledSelectAutocomplete.module.js";
|
|
11
11
|
import { useEffect as ue, useMemo as V, useRef as pe, useState as D } from "react";
|
|
@@ -64,7 +64,7 @@ function Ut({ dataTest: l, options: b, renderInput: me, value: N, onChange: A, g
|
|
|
64
64
|
He(e.reference.width), We(Ne ? t - 8 : Math.min(t - 8, 320));
|
|
65
65
|
} })
|
|
66
66
|
]
|
|
67
|
-
}), { getReferenceProps: Ve, getFloatingProps: Be, getItemProps: Te } = Nt([Dt(se), At(se, { role: "listbox" })]), Ye = fe([E.setReference]), ne = V(() => a ?
|
|
67
|
+
}), { getReferenceProps: Ve, getFloatingProps: Be, getItemProps: Te } = Nt([Dt(se), At(se, { role: "listbox" })]), Ye = fe([E.setReference]), ne = V(() => a ? it(E.reference.current) : void 0, [a, E]), z = ct(ne), qe = fe([dt(E.setFloating, z)]), Ge = (e) => j.includes(k) ? k : j[e === 1 ? 0 : j.length - 1] ?? null, Je = (e) => {
|
|
68
68
|
h.length !== 0 && x((t) => {
|
|
69
69
|
const n = h.indexOf(t ?? k);
|
|
70
70
|
return n === -1 ? h[e === 1 ? 0 : h.length - 1] ?? null : h[Math.min(Math.max(n + e, 0), h.length - 1)] ?? null;
|
|
@@ -112,7 +112,7 @@ function Ut({ dataTest: l, options: b, renderInput: me, value: N, onChange: A, g
|
|
|
112
112
|
a && o != null && (o === -1 || u[o] !== void 0) && (ce = o === -1 ? `${l}-select-all` : `${l}-option-${o}`);
|
|
113
113
|
const Xe = (e) => {
|
|
114
114
|
e.preventDefault(), !(S || g) && (K.current?.focus(), d(!a));
|
|
115
|
-
}, Ze = r ? Y ? Y(i, ({ index: e }) => ({ "data-index": e })) : i.map((e, t) => /* @__PURE__ */ s(
|
|
115
|
+
}, Ze = r ? Y ? Y(i, ({ index: e }) => ({ "data-index": e })) : i.map((e, t) => /* @__PURE__ */ s(ht, {
|
|
116
116
|
dataTest: `selected-chip-${c(e)}`,
|
|
117
117
|
label: c(e),
|
|
118
118
|
readOnly: g,
|
|
@@ -134,7 +134,7 @@ function Ut({ dataTest: l, options: b, renderInput: me, value: N, onChange: A, g
|
|
|
134
134
|
className: "invisible flex min-h-6 min-w-6 cursor-pointer items-center justify-center rounded-full border-0 bg-delta-50 group-focus-within:visible",
|
|
135
135
|
onMouseDown: (e) => e.preventDefault(),
|
|
136
136
|
onClick: ae,
|
|
137
|
-
children: /* @__PURE__ */ s(
|
|
137
|
+
children: /* @__PURE__ */ s(pt, {
|
|
138
138
|
width: 20,
|
|
139
139
|
height: 20,
|
|
140
140
|
className: "text-delta-700"
|
|
@@ -149,11 +149,11 @@ function Ut({ dataTest: l, options: b, renderInput: me, value: N, onChange: A, g
|
|
|
149
149
|
className: "flex cursor-pointer items-center border-0 bg-transparent",
|
|
150
150
|
onMouseDown: (e) => e.preventDefault(),
|
|
151
151
|
onClick: Xe,
|
|
152
|
-
children: Ie ?? (r ? /* @__PURE__ */ s(
|
|
152
|
+
children: Ie ?? (r ? /* @__PURE__ */ s(mt, {
|
|
153
153
|
width: 24,
|
|
154
154
|
height: 24,
|
|
155
155
|
className: "text-delta-700"
|
|
156
|
-
}) : /* @__PURE__ */ s(
|
|
156
|
+
}) : /* @__PURE__ */ s(ut, {
|
|
157
157
|
width: 24,
|
|
158
158
|
height: 24,
|
|
159
159
|
className: _(U["select-custom-icon"], a && U["select-custom-icon-open"], "text-delta-700")
|
|
@@ -208,7 +208,7 @@ function Ut({ dataTest: l, options: b, renderInput: me, value: N, onChange: A, g
|
|
|
208
208
|
decorative: !0
|
|
209
209
|
}) : /* @__PURE__ */ s("span", {
|
|
210
210
|
className: "w-5",
|
|
211
|
-
children: n.selected && /* @__PURE__ */ s(
|
|
211
|
+
children: n.selected && /* @__PURE__ */ s(ft, {
|
|
212
212
|
width: 20,
|
|
213
213
|
height: 20,
|
|
214
214
|
className: "text-gama-500"
|
|
@@ -252,9 +252,9 @@ function Ut({ dataTest: l, options: b, renderInput: me, value: N, onChange: A, g
|
|
|
252
252
|
root: ne,
|
|
253
253
|
children: /* @__PURE__ */ I("ul", {
|
|
254
254
|
ref: qe,
|
|
255
|
-
...z ?
|
|
255
|
+
...z ? nt : {},
|
|
256
256
|
style: {
|
|
257
|
-
...z ?
|
|
257
|
+
...z ? at : {},
|
|
258
258
|
...Ue,
|
|
259
259
|
width: ze ?? void 0,
|
|
260
260
|
maxHeight: ee ?? void 0,
|
|
@@ -1,40 +1,67 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { StyledTooltip as D } from "../../data-display/tooltip/StyledTooltip.js";
|
|
2
|
+
import e from "./StyledLink.module.js";
|
|
3
|
+
import k from "clsx";
|
|
3
4
|
import "react";
|
|
4
|
-
import { jsxs as
|
|
5
|
-
var
|
|
6
|
-
let
|
|
7
|
-
switch (
|
|
5
|
+
import { jsx as g, jsxs as o } from "react/jsx-runtime";
|
|
6
|
+
var v = ({ href: y, disabled: l, disabledReason: d, size: p = "large", dataTest: m, reflink: u, className: r, content: n, contentNode: s, onClick: x, ...i }) => {
|
|
7
|
+
let a = e["styled-link-large"];
|
|
8
|
+
switch (p) {
|
|
8
9
|
case "large":
|
|
9
|
-
|
|
10
|
+
a = e["styled-link-large"];
|
|
10
11
|
break;
|
|
11
12
|
case "small":
|
|
12
|
-
|
|
13
|
+
a = e["styled-link-small"];
|
|
13
14
|
break;
|
|
14
15
|
case "xs":
|
|
15
|
-
|
|
16
|
+
a = e["styled-link-xs"];
|
|
16
17
|
break;
|
|
17
18
|
}
|
|
18
|
-
|
|
19
|
-
className:
|
|
20
|
-
children: [
|
|
21
|
-
})
|
|
22
|
-
|
|
19
|
+
if (l && !d) return /* @__PURE__ */ o("span", {
|
|
20
|
+
className: k(e["styled-link"], e["styled-link-disabled"], a, r),
|
|
21
|
+
children: [n, s]
|
|
22
|
+
});
|
|
23
|
+
const c = (t) => /* @__PURE__ */ g(D, {
|
|
24
|
+
title: d,
|
|
25
|
+
open: l ? void 0 : !1,
|
|
26
|
+
openOnTap: !!l,
|
|
27
|
+
persistentDescription: !!l,
|
|
28
|
+
children: t
|
|
29
|
+
}), f = (t) => {
|
|
30
|
+
if (l) {
|
|
31
|
+
t.preventDefault();
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
x?.(t);
|
|
35
|
+
};
|
|
36
|
+
return c(y ? /* @__PURE__ */ o("a", {
|
|
37
|
+
...i,
|
|
23
38
|
"data-testid": m,
|
|
24
|
-
ref:
|
|
25
|
-
href:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
39
|
+
ref: u,
|
|
40
|
+
href: l ? void 0 : y,
|
|
41
|
+
role: l ? "link" : i.role,
|
|
42
|
+
"aria-disabled": l ? !0 : i["aria-disabled"],
|
|
43
|
+
tabIndex: l ? 0 : i.tabIndex,
|
|
44
|
+
onClick: f,
|
|
45
|
+
onKeyDown: (t) => {
|
|
46
|
+
if (l && t.key === "Enter") {
|
|
47
|
+
t.preventDefault();
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
i.onKeyDown?.(t);
|
|
51
|
+
},
|
|
52
|
+
className: k(e["styled-link"], l ? e["styled-link-disabled"] : "asma-touch-ready", a, r),
|
|
53
|
+
children: [n, s]
|
|
54
|
+
}) : /* @__PURE__ */ o("button", {
|
|
55
|
+
...i,
|
|
30
56
|
"data-testid": m,
|
|
31
|
-
ref:
|
|
57
|
+
ref: u,
|
|
32
58
|
type: "button",
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
59
|
+
"aria-disabled": l ? !0 : i["aria-disabled"],
|
|
60
|
+
onClick: f,
|
|
61
|
+
className: k(e["styled-link"], e["styled-link-button"], l ? e["styled-link-disabled"] : "asma-touch-ready", a, r),
|
|
62
|
+
children: [n, s]
|
|
63
|
+
}));
|
|
37
64
|
};
|
|
38
65
|
export {
|
|
39
|
-
|
|
66
|
+
v as StyledLink
|
|
40
67
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
var l = {
|
|
2
|
-
"styled-link": "_styled-
|
|
3
|
-
"styled-link-disabled": "_styled-link-
|
|
4
|
-
"styled-link-button": "_styled-link-
|
|
5
|
-
"styled-link-xs": "_styled-link-
|
|
6
|
-
"styled-link-small": "_styled-link-
|
|
7
|
-
"styled-link-large": "_styled-link-
|
|
2
|
+
"styled-link": "_styled-link_ttb58_1",
|
|
3
|
+
"styled-link-disabled": "_styled-link-disabled_ttb58_14",
|
|
4
|
+
"styled-link-button": "_styled-link-button_ttb58_37",
|
|
5
|
+
"styled-link-xs": "_styled-link-xs_ttb58_42",
|
|
6
|
+
"styled-link-small": "_styled-link-small_ttb58_47",
|
|
7
|
+
"styled-link-large": "_styled-link-large_ttb58_52"
|
|
8
8
|
};
|
|
9
9
|
export {
|
|
10
10
|
l as default
|
|
@@ -1,51 +1,56 @@
|
|
|
1
|
-
import { cn as
|
|
2
|
-
import { resolveSx as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { Children as
|
|
1
|
+
import { cn as s } from "../../../helpers/cn.js";
|
|
2
|
+
import { resolveSx as A } from "../../../helpers/sx.js";
|
|
3
|
+
import { StyledTooltip as E } from "../../data-display/tooltip/StyledTooltip.js";
|
|
4
|
+
import { StyledCheckbox as _ } from "../../inputs/checkbox/base-ui/StyledCheckbox.js";
|
|
5
|
+
import { Children as C, isValidElement as S } from "react";
|
|
6
6
|
import { jsx as u } from "react/jsx-runtime";
|
|
7
|
-
var
|
|
7
|
+
var c = {
|
|
8
8
|
en: "Already added",
|
|
9
9
|
no: "Allerede lagt til"
|
|
10
|
-
},
|
|
10
|
+
}, L = () => (typeof document > "u" ? "" : document.documentElement.lang).toLowerCase().startsWith("en") ? c.en : c.no, f = (a) => {
|
|
11
11
|
let t = !1;
|
|
12
|
-
return
|
|
13
|
-
if (t || !
|
|
14
|
-
if (o.type ===
|
|
12
|
+
return C.forEach(a, (o) => {
|
|
13
|
+
if (t || !S(o)) return;
|
|
14
|
+
if (o.type === _) {
|
|
15
15
|
const e = o.props;
|
|
16
16
|
t = e.checked === !0 && e.disabled === !0;
|
|
17
17
|
return;
|
|
18
18
|
}
|
|
19
|
-
const
|
|
20
|
-
|
|
19
|
+
const n = o.props.children;
|
|
20
|
+
n !== void 0 && f(n) && (t = !0);
|
|
21
21
|
}), t;
|
|
22
|
-
},
|
|
23
|
-
const
|
|
22
|
+
}, H = ({ children: a, onClick: t, onMouseDown: o, onMouseUp: n, disabled: e, disabledReason: l, "aria-busy": v, selected: d, dense: y, tooltip: x, className: h, classes: p, sx: b, "data-test": D, "data-testid": w, value: M }) => {
|
|
23
|
+
const g = (i) => {
|
|
24
|
+
e || (i.key === "Enter" || i.key === " ") && (i.preventDefault(), t?.(i));
|
|
25
|
+
}, r = !!e && !!l, k = /* @__PURE__ */ u("li", {
|
|
24
26
|
role: "menuitem",
|
|
25
27
|
"aria-disabled": e ? !0 : void 0,
|
|
28
|
+
"aria-busy": v ? !0 : void 0,
|
|
29
|
+
"data-has-reason": r ? "" : void 0,
|
|
26
30
|
tabIndex: -1,
|
|
27
|
-
"data-test":
|
|
28
|
-
"data-testid":
|
|
31
|
+
"data-test": D,
|
|
32
|
+
"data-testid": w,
|
|
29
33
|
onClick: e ? void 0 : t,
|
|
30
34
|
onMouseDown: e ? void 0 : o,
|
|
31
|
-
onMouseUp: e ? void 0 :
|
|
32
|
-
onKeyDown:
|
|
33
|
-
|
|
34
|
-
},
|
|
35
|
-
className: i("box-border flex items-center px-4 text-base outline-none focus-visible:shadow-[inset_3px_0_var(--colors-focus-ring)]", f ? "min-h-8 py-1" : "min-h-10 py-2", "asma-pressable asma-touch-target", e ? "cursor-not-allowed text-delta-300 aria-disabled:text-delta-300" : i("cursor-pointer text-delta-700", !l && "hover:bg-delta-50"), l && i("bg-gama-50", d?.selected), d?.root, v),
|
|
35
|
+
onMouseUp: e ? void 0 : n,
|
|
36
|
+
onKeyDown: g,
|
|
37
|
+
className: s("box-border flex items-center px-4 text-base outline-none focus-visible:shadow-[inset_3px_0_var(--colors-focus-ring)]", y ? "min-h-8 py-1" : "min-h-10 py-2", "asma-pressable asma-touch-target", e ? "cursor-not-allowed text-delta-300 aria-disabled:text-delta-300" : s("cursor-pointer text-delta-700", !d && "hover:bg-delta-50"), d && s("bg-gama-50", p?.selected), p?.root, h),
|
|
36
38
|
style: {
|
|
37
39
|
fontFamily: "Roboto, Helvetica, Arial, sans-serif",
|
|
38
|
-
...
|
|
40
|
+
...A(b)
|
|
39
41
|
},
|
|
40
|
-
children:
|
|
41
|
-
}), m =
|
|
42
|
-
return
|
|
42
|
+
children: a
|
|
43
|
+
}), m = r ? l : x ?? (f(a) ? L() : void 0);
|
|
44
|
+
return /* @__PURE__ */ u(E, {
|
|
43
45
|
title: m,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
open: m ? void 0 : !1,
|
|
47
|
+
arrow: !r,
|
|
48
|
+
placement: r ? "left" : "top",
|
|
49
|
+
openOnTap: r,
|
|
50
|
+
persistentDescription: r,
|
|
51
|
+
children: k
|
|
52
|
+
});
|
|
48
53
|
};
|
|
49
54
|
export {
|
|
50
|
-
|
|
55
|
+
H as StyledMenuItem
|
|
51
56
|
};
|
|
@@ -1,38 +1,36 @@
|
|
|
1
|
-
import { cn as
|
|
2
|
-
import { resolveSx as
|
|
3
|
-
import { StyledTooltip as
|
|
4
|
-
import { useTabsContext as
|
|
5
|
-
import { useCallback as
|
|
6
|
-
import {
|
|
7
|
-
var A = ({ value:
|
|
8
|
-
const e =
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { cn as y } from "../../../helpers/cn.js";
|
|
2
|
+
import { resolveSx as _ } from "../../../helpers/sx.js";
|
|
3
|
+
import { StyledTooltip as w } from "../../data-display/tooltip/StyledTooltip.js";
|
|
4
|
+
import { useTabsContext as T } from "./TabsContext.js";
|
|
5
|
+
import { useCallback as S } from "react";
|
|
6
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
7
|
+
var A = ({ value: i, label: m, disabled: t, disabledReason: l, tooltip: p, className: n, sx: f, index: x }) => {
|
|
8
|
+
const e = T(), o = i !== void 0 ? i : x, r = e ? e.value === o : !1, b = /\btext-(?:xs|sm|base|lg|xl|\[)/.test(n ?? ""), u = /\bfont-(?:thin|extralight|light|normal|medium|semibold|bold|extrabold|black)\b/.test(n ?? ""), h = /\b(?:uppercase|lowercase|capitalize|normal-case)\b/.test(n ?? ""), d = S((a) => {
|
|
9
|
+
e?.register(o, a);
|
|
10
|
+
}, [e, o]), s = t && l ? l : p, v = !!t && !!s, g = /* @__PURE__ */ c("button", {
|
|
11
|
+
ref: d,
|
|
12
12
|
type: "button",
|
|
13
13
|
role: "tab",
|
|
14
14
|
"aria-selected": r,
|
|
15
|
-
"aria-disabled":
|
|
16
|
-
"aria-describedby": c,
|
|
15
|
+
"aria-disabled": t ? !0 : void 0,
|
|
17
16
|
tabIndex: r ? 0 : -1,
|
|
18
|
-
"data-tab-value": typeof
|
|
19
|
-
onClick: (a) => !
|
|
20
|
-
className:
|
|
17
|
+
"data-tab-value": typeof o == "string" || typeof o == "number" ? String(o) : void 0,
|
|
18
|
+
onClick: (a) => !t && e?.onSelect(a, o),
|
|
19
|
+
className: y("inline-flex min-h-12 min-w-[90px] shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-t-lg border-0 bg-transparent px-4 py-3 tracking-normal outline-none transition-colors", !b && (e?.size === "small" ? "text-base" : "text-lg"), !u && (e?.size === "small" || r || t ? "font-semibold" : "font-medium hover:font-semibold focus-visible:font-semibold"), !h && "normal-case", e?.size === "small" && "min-h-10 px-3 py-2", "asma-pressable", t ? "text-delta-300" : r ? "text-gama-500" : "text-delta-600", t ? "cursor-not-allowed" : "cursor-pointer", "focus-visible:shadow-[inset_0_0_0_3px_var(--colors-focus-ring)]", !t && !r && "hover:shadow-[inset_0_-3px_0_0_var(--colors-delta-300)]", n),
|
|
21
20
|
style: {
|
|
22
21
|
fontFamily: "Roboto, Helvetica, Arial, sans-serif",
|
|
23
|
-
...
|
|
22
|
+
..._(f)
|
|
24
23
|
},
|
|
25
|
-
children:
|
|
24
|
+
children: m
|
|
26
25
|
});
|
|
27
|
-
return
|
|
26
|
+
return /* @__PURE__ */ c(w, {
|
|
28
27
|
title: s,
|
|
28
|
+
open: s ? void 0 : !1,
|
|
29
29
|
arrow: !0,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
})] })
|
|
35
|
-
}) : m;
|
|
30
|
+
openOnTap: v,
|
|
31
|
+
persistentDescription: !!s,
|
|
32
|
+
children: g
|
|
33
|
+
});
|
|
36
34
|
};
|
|
37
35
|
export {
|
|
38
36
|
A as StyledTab
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cn as n } from "../../../helpers/cn.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { registerOpenModalDialog as A } from "../../../hooks/useTopLayer.hook.js";
|
|
3
|
+
import { CloseIcon as H } from "../../icons/close-icon/CloseIcon.js";
|
|
4
|
+
import { IndeterminateIcon as q } from "../../icons/indeterminate-icon/IndeterminateIcon.js";
|
|
5
5
|
import { StyledButton as I } from "../../inputs/button/StyledButton.js";
|
|
6
6
|
import { useShortViewportMediaQuery as G } from "../../../hooks/useMediaQuery.hook.js";
|
|
7
7
|
import { useDebouncedValue as P } from "../../../hooks/useDebouncedValue.hook.js";
|
|
@@ -26,7 +26,7 @@ var te = 500, xe = ({ dataTest: r, id: D, open: a, onClose: o, title: s, ariaLab
|
|
|
26
26
|
v.current = document.activeElement instanceof HTMLElement ? document.activeElement : null, e.open || e.showModal(), e.focus({ preventScroll: !0 });
|
|
27
27
|
const U = requestAnimationFrame(() => {
|
|
28
28
|
y(!0);
|
|
29
|
-
}), V =
|
|
29
|
+
}), V = A(e);
|
|
30
30
|
return () => {
|
|
31
31
|
cancelAnimationFrame(U), V(), y(!1), e.open && e.close();
|
|
32
32
|
const E = v.current;
|
|
@@ -87,12 +87,12 @@ var te = 500, xe = ({ dataTest: r, id: D, open: a, onClose: o, title: s, ariaLab
|
|
|
87
87
|
onClick: () => {
|
|
88
88
|
o("closeButton");
|
|
89
89
|
},
|
|
90
|
-
startIcon: /* @__PURE__ */ t(
|
|
90
|
+
startIcon: /* @__PURE__ */ t(H, {
|
|
91
91
|
width: 24,
|
|
92
92
|
height: 24
|
|
93
93
|
})
|
|
94
94
|
}),
|
|
95
|
-
/* @__PURE__ */ t(
|
|
95
|
+
/* @__PURE__ */ t(q, {
|
|
96
96
|
"aria-hidden": "true",
|
|
97
97
|
focusable: "false",
|
|
98
98
|
width: 24,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { StyledTooltip as c } from "../../data-display/tooltip/StyledTooltip.js";
|
|
2
|
+
import { ContentCopyIcon as d } from "../../icons/content-copy-icon/ContentCopyIcon.js";
|
|
3
3
|
import { StyledButton as m } from "../../inputs/button/StyledButton.js";
|
|
4
4
|
import { useMobileMediaQuery as h } from "../../../hooks/useMediaQuery.hook.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import { jsx as t } from "react/jsx-runtime";
|
|
7
7
|
var g = ({ className: n, contentToCopy: p, locale: r, messageInfo: a, text: e }) => {
|
|
8
8
|
const i = r === "en" ? "Copy" : "Kopier", l = h();
|
|
9
|
-
return /* @__PURE__ */ t(
|
|
9
|
+
return /* @__PURE__ */ t(c, {
|
|
10
10
|
title: i,
|
|
11
11
|
children: /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(m, {
|
|
12
12
|
dataTest: "copy-button",
|
|
@@ -14,7 +14,7 @@ var g = ({ className: n, contentToCopy: p, locale: r, messageInfo: a, text: e })
|
|
|
14
14
|
className: n,
|
|
15
15
|
size: "small",
|
|
16
16
|
variant: "text",
|
|
17
|
-
startIcon: /* @__PURE__ */ t(
|
|
17
|
+
startIcon: /* @__PURE__ */ t(d, {
|
|
18
18
|
width: 20,
|
|
19
19
|
height: 20
|
|
20
20
|
}),
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { cn as m } from "../../../helpers/cn.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { StyledTooltip as s } from "../../data-display/tooltip/StyledTooltip.js";
|
|
3
|
+
import { ContentCopyIcon as c } from "../../icons/content-copy-icon/ContentCopyIcon.js";
|
|
4
4
|
import { StyledButton as d } from "../../inputs/button/StyledButton.js";
|
|
5
5
|
import e from "./CopyWrapper.module.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import { jsx as t, jsxs as h } from "react/jsx-runtime";
|
|
8
8
|
var b = ({ className: i, contentToCopy: p, locale: o, messageInfo: a, children: n }) => /* @__PURE__ */ h("div", {
|
|
9
9
|
className: m("flex items-center hover:text-gama-500", e["copy-wrapper"], i),
|
|
10
|
-
children: [n, /* @__PURE__ */ t(
|
|
10
|
+
children: [n, /* @__PURE__ */ t(s, {
|
|
11
11
|
title: o === "no" ? "Kopier" : "Copy",
|
|
12
12
|
children: /* @__PURE__ */ t("div", {
|
|
13
13
|
className: e["hidden-copy"],
|
|
@@ -22,7 +22,7 @@ var b = ({ className: i, contentToCopy: p, locale: o, messageInfo: a, children:
|
|
|
22
22
|
a(o === "no" ? "Kopiert til utklippstavle" : "Copied to clipboard");
|
|
23
23
|
}).catch((l) => console.error("Copying failed with this: ", l));
|
|
24
24
|
},
|
|
25
|
-
startIcon: /* @__PURE__ */ t(
|
|
25
|
+
startIcon: /* @__PURE__ */ t(c, {
|
|
26
26
|
width: 20,
|
|
27
27
|
height: 20
|
|
28
28
|
})
|