asma-ui-core 3.105.0 → 3.106.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.
Files changed (64) hide show
  1. package/dist/asma-ui-core.css +1 -1
  2. package/dist/components/custom/module/header-layout/DynamicToolbar.js +99 -97
  3. package/dist/components/custom/module/header-layout/ToolbarActionGroup.js +60 -41
  4. package/dist/components/custom/module/header-layout/ToolbarRows.js +51 -47
  5. package/dist/components/custom/module/header-layout/useTranslations.js +12 -10
  6. package/dist/components/custom/page/page-header/PageHeader.js +41 -40
  7. package/dist/components/custom/widget/widget/StyledWidget.js +21 -20
  8. package/dist/components/data-display/chip/StyledChip.js +70 -53
  9. package/dist/components/data-display/tooltip/StyledTooltip.js +116 -73
  10. package/dist/components/feedback/dialog/DialogBusyContext.js +32 -0
  11. package/dist/components/feedback/dialog/StyledDialog.js +81 -72
  12. package/dist/components/feedback/dialog/dialog-footer/StyledDialogFooter.js +76 -71
  13. package/dist/components/feedback/minimizable-dialog/MinimizableDialog.js +133 -137
  14. package/dist/components/feedback/minimizable-dialog/components/CloseBtn.js +11 -8
  15. package/dist/components/feedback/minimizable-dialog/components/FullscreenBtn.js +6 -6
  16. package/dist/components/feedback/minimizable-dialog/components/MinimizeBtn.js +1 -1
  17. package/dist/components/feedback/minimizable-dialog/v2/MinimizableDialogV2.js +94 -85
  18. package/dist/components/feedback/minimizable-dialog/v2/useTranslations.js +6 -4
  19. package/dist/components/inputs/button/StyledButton.js +83 -33
  20. package/dist/components/inputs/button/StyledButton.module.js +13 -13
  21. package/dist/components/inputs/dynamic-select/components/DynamicInteractiveChipGroup.js +32 -32
  22. package/dist/components/inputs/dynamic-select/components/DynamicSelectAutocomplete.js +6 -6
  23. package/dist/components/inputs/select/StyledSelect.js +8 -8
  24. package/dist/components/inputs/select-autocomplete/StyledSelectAutocomplete.js +14 -14
  25. package/dist/components/navigation/link/StyledLink.js +53 -26
  26. package/dist/components/navigation/link/StyledLink.module.js +6 -6
  27. package/dist/components/navigation/menu/StyledMenuItem.js +35 -30
  28. package/dist/components/navigation/tabs/StyledTab.js +23 -25
  29. package/dist/components/utils/bottom-sheet/StyledBottomSheet.js +6 -6
  30. package/dist/components/utils/copy-wrapper/CopyButton.js +4 -4
  31. package/dist/components/utils/copy-wrapper/CopyWrapper.js +4 -4
  32. package/dist/datetime/shared-components/button/StyledButton.module.js +11 -11
  33. package/dist/helpers/focusable.js +2 -2
  34. package/dist/index.js +589 -585
  35. package/dist/src/components/custom/module/header-layout/ToolbarActionGroup.d.ts +13 -2
  36. package/dist/src/components/custom/module/header-layout/ToolbarRows.d.ts +2 -1
  37. package/dist/src/components/custom/module/header-layout/planToolbarActions.d.ts +18 -1
  38. package/dist/src/components/custom/module/header-layout/useTranslations.d.ts +2 -0
  39. package/dist/src/components/custom/widget/widget/StyledWidget.d.ts +5 -0
  40. package/dist/src/components/data-display/chip/StyledChip.d.ts +6 -0
  41. package/dist/src/components/data-display/interactive-chip/StyledInteractiveChip.d.ts +7 -1
  42. package/dist/src/components/data-display/tooltip/StyledTooltip.d.ts +16 -2
  43. package/dist/src/components/feedback/dialog/DialogBusy.test.d.ts +1 -0
  44. package/dist/src/components/feedback/dialog/DialogBusyContext.d.ts +28 -0
  45. package/dist/src/components/feedback/dialog/StyledDialog.d.ts +5 -0
  46. package/dist/src/components/feedback/dialog/dialog-footer/StyledDialogFooter.d.ts +9 -8
  47. package/dist/src/components/feedback/dialog/index.d.ts +1 -0
  48. package/dist/src/components/feedback/minimizable-dialog/components/CloseBtn.d.ts +2 -0
  49. package/dist/src/components/feedback/minimizable-dialog/types.d.ts +11 -0
  50. package/dist/src/components/feedback/minimizable-dialog/v2/types.d.ts +2 -0
  51. package/dist/src/components/feedback/minimizable-dialog/v2/useTranslations.d.ts +2 -0
  52. package/dist/src/components/inputs/button/StyledButton.d.ts +25 -1
  53. package/dist/src/components/inputs/button/StyledButtonBusy.test.d.ts +1 -0
  54. package/dist/src/components/navigation/link/StyledLink.d.ts +6 -0
  55. package/dist/src/components/navigation/menu/StyledMenuItem.d.ts +8 -1
  56. package/dist/src/components/navigation/tabs/StyledTab.d.ts +6 -0
  57. package/dist/src/forms/submitChanged.d.ts +3 -0
  58. package/dist/src/helpers/focusable.d.ts +8 -0
  59. package/dist/src/helpers/index.d.ts +1 -0
  60. package/dist/src/helpers/uiCoreLocale.d.ts +1 -0
  61. package/dist/src/table/shared-components/StyledMenuItem.d.ts +5 -1
  62. package/dist/table/components/columns/action-column/components/RowActionMenu.js +63 -69
  63. package/dist/table/shared-components/StyledMenuItem.js +28 -16
  64. 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 z } from "../../../data-display/chip/StyledChip.js";
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(z, {
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(z, {
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(E, {
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(E, {
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 { ChevronDownIcon as Ue } from "../../icons/chevron-down-icon/ChevronDownIcon.js";
4
- import { CloseIcon as Ve } from "../../icons/close-icon/CloseIcon.js";
5
- import { TOP_LAYER_PROPS as qe, TOP_LAYER_RESET_STYLE as Ye, getOpenModalDialogAncestor as re, shouldUsePopoverTopLayer as ze, useTopLayerRef as Ke } from "../../../hooks/useTopLayer.hook.js";
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(), _ = ze(Q), Ee = ft([Ke(Se, _), P]);
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(Ve, {
152
+ children: /* @__PURE__ */ l(Ke, {
153
153
  width: 18,
154
154
  height: 18
155
155
  })
156
- }), /* @__PURE__ */ l(Ue, {
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
- ..._ ? qe : {},
181
+ ..._ ? Ue : {},
182
182
  style: {
183
- ..._ ? Ye : {},
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 { ChevronDownIcon as nt } from "../../icons/chevron-down-icon/ChevronDownIcon.js";
3
- import { CloseIcon as at } from "../../icons/close-icon/CloseIcon.js";
4
- import { CheckIcon as it } from "../../icons/check-icon/CheckIcon.js";
5
- import { PlusIconCircle as ct } from "../../icons/plus-icon-circle/PlusIconCircle.js";
6
- import { StyledChip as dt } from "../../data-display/chip/StyledChip.js";
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 ? ft(E.reference.current) : void 0, [a, E]), z = mt(ne), qe = fe([ht(E.setFloating, z)]), Ge = (e) => j.includes(k) ? k : j[e === 1 ? 0 : j.length - 1] ?? null, Je = (e) => {
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(dt, {
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(at, {
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(ct, {
152
+ children: Ie ?? (r ? /* @__PURE__ */ s(mt, {
153
153
  width: 24,
154
154
  height: 24,
155
155
  className: "text-delta-700"
156
- }) : /* @__PURE__ */ s(nt, {
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(it, {
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 ? ut : {},
255
+ ...z ? nt : {},
256
256
  style: {
257
- ...z ? pt : {},
257
+ ...z ? at : {},
258
258
  ...Ue,
259
259
  width: ze ?? void 0,
260
260
  maxHeight: ee ?? void 0,
@@ -1,40 +1,67 @@
1
- import l from "./StyledLink.module.js";
2
- import s from "clsx";
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 i } from "react/jsx-runtime";
5
- var g = ({ href: d, disabled: n, size: u = "large", dataTest: m, reflink: y, className: t, content: a, contentNode: r, onClick: c, ...k }) => {
6
- let e = l["styled-link-large"];
7
- switch (u) {
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
- e = l["styled-link-large"];
10
+ a = e["styled-link-large"];
10
11
  break;
11
12
  case "small":
12
- e = l["styled-link-small"];
13
+ a = e["styled-link-small"];
13
14
  break;
14
15
  case "xs":
15
- e = l["styled-link-xs"];
16
+ a = e["styled-link-xs"];
16
17
  break;
17
18
  }
18
- return n ? /* @__PURE__ */ i("span", {
19
- className: s(l["styled-link"], l["styled-link-disabled"], e, t),
20
- children: [a, r]
21
- }) : d ? /* @__PURE__ */ i("a", {
22
- ...k,
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: y,
25
- href: d,
26
- className: s(l["styled-link"], "asma-touch-ready", e, t),
27
- children: [a, r]
28
- }) : /* @__PURE__ */ i("button", {
29
- ...k,
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: y,
57
+ ref: u,
32
58
  type: "button",
33
- onClick: c,
34
- className: s(l["styled-link"], l["styled-link-button"], "asma-touch-ready", e, t),
35
- children: [a, r]
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
- g as StyledLink
66
+ v as StyledLink
40
67
  };
@@ -1,10 +1,10 @@
1
1
  var l = {
2
- "styled-link": "_styled-link_1au3b_1",
3
- "styled-link-disabled": "_styled-link-disabled_1au3b_14",
4
- "styled-link-button": "_styled-link-button_1au3b_30",
5
- "styled-link-xs": "_styled-link-xs_1au3b_35",
6
- "styled-link-small": "_styled-link-small_1au3b_40",
7
- "styled-link-large": "_styled-link-large_1au3b_45"
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 i } from "../../../helpers/cn.js";
2
- import { resolveSx as w } from "../../../helpers/sx.js";
3
- import { StyledCheckbox as D } from "../../inputs/checkbox/base-ui/StyledCheckbox.js";
4
- import { StyledTooltip as g } from "../../data-display/tooltip/StyledTooltip.js";
5
- import { Children as k, isValidElement as A } from "react";
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 p = {
7
+ var c = {
8
8
  en: "Already added",
9
9
  no: "Allerede lagt til"
10
- }, E = () => (typeof document > "u" ? "" : document.documentElement.lang).toLowerCase().startsWith("en") ? p.en : p.no, c = (r) => {
10
+ }, L = () => (typeof document > "u" ? "" : document.documentElement.lang).toLowerCase().startsWith("en") ? c.en : c.no, f = (a) => {
11
11
  let t = !1;
12
- return k.forEach(r, (o) => {
13
- if (t || !A(o)) return;
14
- if (o.type === D) {
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 a = o.props.children;
20
- a !== void 0 && c(a) && (t = !0);
19
+ const n = o.props.children;
20
+ n !== void 0 && f(n) && (t = !0);
21
21
  }), t;
22
- }, j = ({ children: r, onClick: t, onMouseDown: o, onMouseUp: a, disabled: e, selected: l, dense: f, tooltip: y, className: v, classes: d, sx: x, "data-test": h, "data-testid": b, value: _ }) => {
23
- const s = /* @__PURE__ */ u("li", {
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": h,
28
- "data-testid": b,
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 : a,
32
- onKeyDown: (n) => {
33
- e || (n.key === "Enter" || n.key === " ") && (n.preventDefault(), t?.(n));
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
- ...w(x)
40
+ ...A(b)
39
41
  },
40
- children: r
41
- }), m = y ?? (c(r) ? E() : void 0);
42
- return m ? /* @__PURE__ */ u(g, {
42
+ children: a
43
+ }), m = r ? l : x ?? (f(a) ? L() : void 0);
44
+ return /* @__PURE__ */ u(E, {
43
45
  title: m,
44
- arrow: !0,
45
- placement: "top",
46
- children: s
47
- }) : s;
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
- j as StyledMenuItem
55
+ H as StyledMenuItem
51
56
  };
@@ -1,38 +1,36 @@
1
- import { cn as g } from "../../../helpers/cn.js";
2
- import { resolveSx as v } from "../../../helpers/sx.js";
3
- import { StyledTooltip as y } from "../../data-display/tooltip/StyledTooltip.js";
4
- import { useTabsContext as _ } from "./TabsContext.js";
5
- import { useCallback as w, useId as S } from "react";
6
- import { Fragment as T, jsx as i, jsxs as k } from "react/jsx-runtime";
7
- var A = ({ value: l, label: d, disabled: o, tooltip: s, className: n, sx: b, index: f }) => {
8
- const e = _(), p = S(), c = s ? `${p}-reason` : void 0, t = l !== void 0 ? l : f, r = e ? e.value === t : !1, x = /\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 ?? ""), m = /* @__PURE__ */ i("button", {
9
- ref: w((a) => {
10
- e?.register(t, a);
11
- }, [e, t]),
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": o ? !0 : void 0,
16
- "aria-describedby": c,
15
+ "aria-disabled": t ? !0 : void 0,
17
16
  tabIndex: r ? 0 : -1,
18
- "data-tab-value": typeof t == "string" || typeof t == "number" ? String(t) : void 0,
19
- onClick: (a) => !o && e?.onSelect(a, t),
20
- className: g("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", !x && (e?.size === "small" ? "text-base" : "text-lg"), !u && (e?.size === "small" || r || o ? "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", o ? "text-delta-300" : r ? "text-gama-500" : "text-delta-600", o ? "cursor-not-allowed" : "cursor-pointer", "focus-visible:shadow-[inset_0_0_0_3px_var(--colors-focus-ring)]", !o && !r && "hover:shadow-[inset_0_-3px_0_0_var(--colors-delta-300)]", n),
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
- ...v(b)
22
+ ..._(f)
24
23
  },
25
- children: d
24
+ children: m
26
25
  });
27
- return s ? /* @__PURE__ */ i(y, {
26
+ return /* @__PURE__ */ c(w, {
28
27
  title: s,
28
+ open: s ? void 0 : !1,
29
29
  arrow: !0,
30
- children: /* @__PURE__ */ k(T, { children: [m, /* @__PURE__ */ i("span", {
31
- id: c,
32
- hidden: !0,
33
- children: s
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 { CloseIcon as A } from "../../icons/close-icon/CloseIcon.js";
3
- import { IndeterminateIcon as H } from "../../icons/indeterminate-icon/IndeterminateIcon.js";
4
- import { registerOpenModalDialog as q } from "../../../hooks/useTopLayer.hook.js";
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 = q(e);
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(A, {
90
+ startIcon: /* @__PURE__ */ t(H, {
91
91
  width: 24,
92
92
  height: 24
93
93
  })
94
94
  }),
95
- /* @__PURE__ */ t(H, {
95
+ /* @__PURE__ */ t(q, {
96
96
  "aria-hidden": "true",
97
97
  focusable: "false",
98
98
  width: 24,
@@ -1,12 +1,12 @@
1
- import { ContentCopyIcon as c } from "../../icons/content-copy-icon/ContentCopyIcon.js";
2
- import { StyledTooltip as d } from "../../data-display/tooltip/StyledTooltip.js";
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(d, {
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(c, {
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 { ContentCopyIcon as s } from "../../icons/content-copy-icon/ContentCopyIcon.js";
3
- import { StyledTooltip as c } from "../../data-display/tooltip/StyledTooltip.js";
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(c, {
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(s, {
25
+ startIcon: /* @__PURE__ */ t(c, {
26
26
  width: 20,
27
27
  height: 20
28
28
  })
@@ -1,16 +1,16 @@
1
- var e = "_contained_efhli_6", _ = "_common_efhli_6", t = "_medium_efhli_56", a = "_small_efhli_61", r = "_large_efhli_66", l = "_error_efhli_76", i = "_outlined_efhli_146", o = "_text_efhli_286", f = "_textGray_efhli_426", h = "_textWhite_efhli_496", m = {
2
- "asma-core-ui-button": "_asma-core-ui-button_efhli_1",
3
- contained: e,
4
- common: _,
1
+ var _ = "_contained_11nol_6", o = "_common_11nol_6", t = "_medium_11nol_56", a = "_small_11nol_61", e = "_large_11nol_66", r = "_error_11nol_76", l = "_outlined_11nol_146", n = "_text_11nol_286", m = "_textGray_11nol_426", u = "_textWhite_11nol_496", v = {
2
+ "asma-core-ui-button": "_asma-core-ui-button_11nol_1",
3
+ contained: _,
4
+ common: o,
5
5
  medium: t,
6
6
  small: a,
7
- large: r,
8
- error: l,
9
- outlined: i,
10
- text: o,
11
- textGray: f,
12
- textWhite: h
7
+ large: e,
8
+ error: r,
9
+ outlined: l,
10
+ text: n,
11
+ textGray: m,
12
+ textWhite: u
13
13
  };
14
14
  export {
15
- m as default
15
+ v as default
16
16
  };
@@ -1,6 +1,6 @@
1
- var a = (r) => r.tabIndex >= 0 && !r.matches(":disabled") && !r.closest("[inert]") && (r.checkVisibility?.() ?? !0), b = (r) => Array.from(r.querySelectorAll("*")).filter(a), l = (r) => a(r) ? r : Array.from(r.querySelectorAll("*")).find(a) ?? null, i = (r) => (r.tabIndex >= 0 || r.hasAttribute("tabindex")) && !r.matches(":disabled") && !r.closest("[inert]") && (r.checkVisibility?.() ?? !0), s = (r) => i(r) ? r : Array.from(r.querySelectorAll("*")).find(i) ?? null;
1
+ var r = (a) => a.tabIndex >= 0 && !a.matches(":disabled") && !a.closest("[inert]") && (a.checkVisibility?.() ?? !0), b = (a) => (a.tabIndex >= 0 || a.hasAttribute("tabindex")) && !a.matches(":disabled"), i = (a) => Array.from(a.querySelectorAll("*")).filter(r), l = (a) => r(a) ? a : Array.from(a.querySelectorAll("*")).find(r) ?? null, s = (a) => b(a) ? a : Array.from(a.querySelectorAll("*")).find(b) ?? null;
2
2
  export {
3
3
  s as firstFocusable,
4
4
  l as firstTabbable,
5
- b as tabbableWithin
5
+ i as tabbableWithin
6
6
  };