asma-ui-core 3.113.2 → 3.115.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.
@@ -1,110 +1,107 @@
1
1
  import { cn as v } from "../../../../helpers/cn.js";
2
- import { StyledTooltip as Q } from "../../../data-display/tooltip/StyledTooltip.js";
2
+ import { StyledTooltip as X } from "../../../data-display/tooltip/StyledTooltip.js";
3
3
  import { CloseIcon as j } from "../../../icons/close-icon/CloseIcon.js";
4
- import { ErrorOutlineIcon as U } from "../../../icons/error-outline-icon/ErrorOutlineIcon.js";
5
- import { StyledChip as X } from "../../../data-display/chip/StyledChip.js";
4
+ import { ErrorOutlineIcon as Y } from "../../../icons/error-outline-icon/ErrorOutlineIcon.js";
5
+ import { StyledChip as Z } from "../../../data-display/chip/StyledChip.js";
6
6
  import { StyledInteractiveChip as O } from "../../../data-display/interactive-chip/StyledInteractiveChip.js";
7
- import { StyledButton as Y } from "../../button/StyledButton.js";
8
- import { useHelperAlertRole as Z } from "../../../../helpers/useHelperAlertRole.js";
9
- import { warnMissingErrorMessage as _ } from "../../../../helpers/warnMissingErrorMessage.js";
10
- import { fieldWidthStyle as ee } from "../../field-styles.js";
11
- import { useWrap as te } from "../helpers/useWrap.js";
12
- import { DynamicSelectTitle as le } from "./DynamicSelectTitle.js";
7
+ import { StyledButton as _ } from "../../button/StyledButton.js";
8
+ import { useHelperSlot as ee } from "../../../../helpers/useHelperSlot.js";
9
+ import { fieldWidthStyle as te } from "../../field-styles.js";
10
+ import { useWrap as le } from "../helpers/useWrap.js";
11
+ import { DynamicSelectTitle as re } from "./DynamicSelectTitle.js";
13
12
  import { Skeleton as N } from "../../../mui-compat/Skeleton.js";
14
- import { forwardRef as re, useEffect as ie, useId as ae } from "react";
13
+ import { forwardRef as ae, useEffect as ie, useId as ne } from "react";
15
14
  import { jsx as t, jsxs as S } from "react/jsx-runtime";
16
- var ve = re((V, A) => {
17
- const { options: d, dataTest: D, value: r, readOnly: a, multiple: n, title: R, titleSize: z, width: T = "full", disabled: b, onChange: p, required: E, error: f, helperText: C, valueKey: L = "value", labelKey: $ = "label", renderLabel: o, getOptionTooltip: I, loading: B, size: y, locale: q = "en", clearSelectionLabel: G } = V, K = ae();
18
- _("DynamicInteractiveChipGroup", f, C);
19
- const M = Z(f), { containerRef: m, wrapDisabled: w } = te({ dependencyList: [d, d.length] });
15
+ var ve = ae((V, D) => {
16
+ const { options: d, dataTest: z, value: r, readOnly: i, multiple: n, title: A, titleSize: L, width: T = "full", disabled: x, onChange: p, required: R, error: b, helperText: C, disableHelperText: $, valueKey: B = "value", labelKey: E = "label", renderLabel: o, getOptionTooltip: I, loading: H, size: w, locale: q = "en", clearSelectionLabel: G } = V, K = ne(), { show: W, role: F } = ee("DynamicInteractiveChipGroup", b, C, !$), { containerRef: f, wrapDisabled: y } = le({ dependencyList: [d, d.length] });
20
17
  ie(() => {
21
- m.current && (m.current.inert = !0);
22
- }, [m]);
23
- const u = (e) => typeof e == "object" ? e?.[$]?.toString() ?? "" : e?.toString() ?? "", g = (e) => typeof e == "object" ? e?.[L] : e, c = (e) => {
18
+ f.current && (f.current.inert = !0);
19
+ }, [f]);
20
+ const m = (e) => typeof e == "object" ? e?.[E]?.toString() ?? "" : e?.toString() ?? "", g = (e) => typeof e == "object" ? e?.[B] : e, c = (e) => {
24
21
  const l = g(e);
25
- return l == null ? "" : typeof l == "string" || typeof l == "number" || typeof l == "boolean" ? String(l) : e == null ? "" : u(e);
26
- }, s = (e, l) => g(e) === g(l), W = n ? Array.isArray(r) && r.length > 0 : r != null, F = (e) => {
22
+ return l == null ? "" : typeof l == "string" || typeof l == "number" || typeof l == "boolean" ? String(l) : e == null ? "" : m(e);
23
+ }, s = (e, l) => g(e) === g(l), J = n ? Array.isArray(r) && r.length > 0 : r != null, M = (e) => {
27
24
  if (!n) {
28
- const i = s(e, r) ? null : e;
29
- if (i === null) return;
30
- p(i);
25
+ const a = s(e, r) ? null : e;
26
+ if (a === null) return;
27
+ p(a);
31
28
  return;
32
29
  }
33
30
  const l = r ?? [];
34
- p(l.find((i) => s(i, e)) ? l.filter((i) => !s(i, e)) : [...l, e]);
35
- }, h = a ? d.filter((e) => !!(n ? r?.find((l) => s(l, e)) : s(r, e))) : d, H = h.findIndex((e) => !(typeof e == "object" && e?.disabled) && !a);
31
+ p(l.find((a) => s(a, e)) ? l.filter((a) => !s(a, e)) : [...l, e]);
32
+ }, u = i ? d.filter((e) => !!(n ? r?.find((l) => s(l, e)) : s(r, e))) : d, P = u.findIndex((e) => !(typeof e == "object" && e?.disabled) && !i);
36
33
  return /* @__PURE__ */ S("div", {
37
- "data-testid": `${D}-dynamic-radio-group`,
34
+ "data-testid": `${z}-dynamic-radio-group`,
38
35
  className: "relative flex flex-col gap-y-1",
39
36
  "data-field-width": T,
40
- style: ee(T),
37
+ style: te(T),
41
38
  children: [
42
- /* @__PURE__ */ t(le, {
43
- title: R,
44
- titleSize: z
39
+ /* @__PURE__ */ t(re, {
40
+ title: A,
41
+ titleSize: L
45
42
  }),
46
43
  /* @__PURE__ */ t("div", {
47
44
  "aria-hidden": !0,
48
- ref: m,
45
+ ref: f,
49
46
  className: "pointer-events-none absolute left-0 top-0 flex flex-wrap gap-2 opacity-0",
50
47
  style: { width: "100%" },
51
- children: h.map((e) => /* @__PURE__ */ t(O, {
48
+ children: u.map((e) => /* @__PURE__ */ t(O, {
52
49
  className: "w-fit",
53
- readOnly: a,
50
+ readOnly: i,
54
51
  type: n ? "checkbox" : "radio",
55
52
  dataTest: `ic-${c(e)}-hidden`,
56
- label: o ? o(e) : u(e)
53
+ label: o ? o(e) : m(e)
57
54
  }, c(e)))
58
55
  }),
59
56
  /* @__PURE__ */ t("div", {
60
- className: v("flex flex-wrap gap-2", w && "flex-col gap-1"),
61
- children: B ? /* @__PURE__ */ S("div", {
57
+ className: v("flex flex-wrap gap-2", y && "flex-col gap-1"),
58
+ children: H ? /* @__PURE__ */ S("div", {
62
59
  className: "flex flex-wrap gap-2",
63
60
  children: [
64
61
  /* @__PURE__ */ t(N, { className: "h-[32px] w-[60px]" }),
65
62
  /* @__PURE__ */ t(N, { className: "h-[32px] w-[60px]" }),
66
63
  /* @__PURE__ */ t(N, { className: "h-[32px] w-[60px]" })
67
64
  ]
68
- }) : h?.length ? h.map((e, l) => {
69
- const i = !!(n ? r?.find((P) => s(P, e)) : s(r, e)), J = I ? I(e) : null;
70
- if (a && !i) return null;
71
- const x = typeof e == "object" ? !!e?.disabled : !1, k = !x && !a && l === H ? A : void 0;
72
- return /* @__PURE__ */ t(Q, {
73
- title: J,
65
+ }) : u?.length ? u.map((e, l) => {
66
+ const a = !!(n ? r?.find((U) => s(U, e)) : s(r, e)), Q = I ? I(e) : null;
67
+ if (i && !a) return null;
68
+ const h = typeof e == "object" ? !!e?.disabled : !1, k = !h && !i && l === P ? D : void 0;
69
+ return /* @__PURE__ */ t(X, {
70
+ title: Q,
74
71
  arrow: !0,
75
72
  children: /* @__PURE__ */ t("span", {
76
- className: v(x && "cursor-not-allowed"),
77
- children: a && !w ? /* @__PURE__ */ t(X, {
73
+ className: v(h && "cursor-not-allowed"),
74
+ children: i && !y ? /* @__PURE__ */ t(Z, {
78
75
  ref: k,
79
- disabled: !!b || x,
76
+ disabled: !!x || h,
80
77
  classes: { root: "min-h-[32px] h-full" },
81
78
  className: "w-fit",
82
79
  dataTest: `ic-${c(e)}`,
83
- label: o ? o(e) : u(e)
80
+ label: o ? o(e) : m(e)
84
81
  }) : /* @__PURE__ */ t(O, {
85
82
  ref: k,
86
- disabled: !!b || x,
87
- classes: w ? {
83
+ disabled: !!x || h,
84
+ classes: y ? {
88
85
  root: "border-none outline-none bg-transparent w-full flex justify-start h-full min-h-[40px] shadow-none",
89
86
  label: "block whitespace-normal break-words overflow-visible"
90
87
  } : { root: "min-h-[32px] h-full" },
91
88
  className: "w-fit",
92
- readOnly: a,
89
+ readOnly: i,
93
90
  type: n ? "checkbox" : "radio",
94
91
  dataTest: `ic-${c(e)}`,
95
- checked: i,
96
- size: y,
97
- onClick: () => F(e),
98
- label: o ? o(e) : u(e)
92
+ checked: a,
93
+ size: w,
94
+ onClick: () => M(e),
95
+ label: o ? o(e) : m(e)
99
96
  })
100
97
  })
101
98
  }, c(e));
102
99
  }) : /* @__PURE__ */ t("span", { children: "-" })
103
100
  }),
104
- !E && W && !a && !b && /* @__PURE__ */ t(Y, {
101
+ !R && J && !i && !x && /* @__PURE__ */ t(_, {
105
102
  dataTest: "clear-selection-btn",
106
103
  variant: "text",
107
- startIcon: y === "medium" ? /* @__PURE__ */ t(j, {
104
+ startIcon: w === "medium" ? /* @__PURE__ */ t(j, {
108
105
  height: 24,
109
106
  width: 24,
110
107
  className: "size-6"
@@ -114,15 +111,15 @@ var ve = re((V, A) => {
114
111
  className: "size-5"
115
112
  }),
116
113
  className: "w-fit",
117
- size: y,
114
+ size: w,
118
115
  onClick: () => p(n ? [] : null),
119
116
  children: G ?? (q === "en" ? "Clear selection" : "Fjern valget")
120
117
  }),
121
- /* @__PURE__ */ S("div", {
118
+ W && /* @__PURE__ */ S("div", {
122
119
  id: K,
123
- role: M,
124
- className: v("flex min-h-[24px] items-center gap-1 pt-1 text-sm/5 text-delta-600", f && "text-error-500"),
125
- children: [f && /* @__PURE__ */ t(U, {
120
+ role: F,
121
+ className: v("flex min-h-[24px] items-center gap-1 pt-1 text-sm/5 text-delta-600", b && "text-error-500"),
122
+ children: [b && /* @__PURE__ */ t(Y, {
126
123
  width: 20,
127
124
  height: 20,
128
125
  className: "min-w-5"
@@ -1,10 +1,10 @@
1
- import { cn as i } from "../../helpers/cn.js";
2
- var d = () => ({
1
+ import { cn as t } from "../../helpers/cn.js";
2
+ var l = () => ({
3
3
  boxSizing: "border-box",
4
4
  height: 40,
5
5
  minHeight: 40,
6
6
  maxHeight: 40
7
- }), l = ({ paddingLeft: e = 14, paddingRight: r = 14 } = {}) => ({
7
+ }), s = ({ paddingLeft: e = 14, paddingRight: r = 14 } = {}) => ({
8
8
  boxSizing: "border-box",
9
9
  margin: 0,
10
10
  paddingTop: 0,
@@ -16,29 +16,29 @@ var d = () => ({
16
16
  maxHeight: 40,
17
17
  lineHeight: "24px",
18
18
  fontSize: 16
19
- }), s = (e) => e ? {
19
+ }), b = (e) => e ? {
20
20
  top: 0,
21
21
  transform: "translateY(-50%)"
22
22
  } : {
23
23
  top: "50%",
24
24
  transform: "translateY(-50%)"
25
- }, b = (e) => ({
25
+ }, x = (e) => ({
26
26
  width: "100%",
27
27
  maxWidth: `var(--field-width-${e})`
28
- }), x = {
28
+ }), p = {
29
29
  "--field-width-full": "100%",
30
30
  "--form-column-width": "100%"
31
- }, g = (e) => e <= 9 ? "xs" : e <= 15 ? "s" : e <= 27 ? "m" : "full", p = ({ disabled: e } = {}) => i("block pb-1 text-base font-semibold", e ? "text-delta-300" : "text-delta-800"), u = ({ focused: e, error: r, disabled: t, readOnly: o, borderless: a }) => i("pointer-events-none absolute inset-0 rounded border border-solid transition-colors", a && !e ? "border-transparent" : t ? "border-delta-300" : o ? "border-delta-200" : r ? "border-error-500" : e ? "border-focus-ring shadow-[inset_0_0_0_2px_var(--colors-focus-ring)]" : "border-delta-500 group-hover:border-2 group-hover:border-gama-300"), h = ({ focused: e, error: r, disabled: t, readOnly: o, notched: a = !0 }) => i("pointer-events-none absolute z-0 m-0 box-border min-w-0 overflow-hidden rounded border border-solid transition-colors", a ? "inset-x-0 bottom-0 top-[-5px] px-2 py-0" : "inset-0", t ? "border-delta-300" : o ? "border-delta-200" : r ? "border-error-500" : e ? "border-focus-ring shadow-[inset_0_0_0_2px_var(--colors-focus-ring)]" : "border-delta-500 group-hover:border-2 group-hover:border-gama-300"), f = (e) => i("block h-[11px] overflow-hidden bg-white p-0 text-xs leading-[23px] text-transparent transition-[max-width] duration-150", e ? "max-w-full" : "max-w-[0.01px]"), m = ({ shrink: e, focused: r, error: t, disabled: o, readOnly: a }) => i("pointer-events-none absolute left-[14px] z-10 max-w-[calc(100%-1.75rem)] truncate transition-colors duration-150", o ? "text-delta-300" : a ? "text-delta-800" : t ? "text-error-500" : r ? "text-gama-500" : e ? "text-delta-800" : "text-delta-500", e ? "bg-white px-1 text-xs leading-[16px] tracking-[0.24px]" : "text-base leading-[23px] tracking-[0.00938em]");
31
+ }, g = (e) => e <= 9 ? "xs" : e <= 15 ? "s" : e <= 27 ? "m" : "full", h = ({ disabled: e } = {}) => t("block pb-1 text-base font-semibold", e ? "text-delta-300" : "text-delta-800"), n = "shadow-[inset_0_0_0_2px_var(--colors-error-500)]", u = ({ focused: e, error: r, disabled: o, readOnly: a, borderless: i }) => t("pointer-events-none absolute inset-0 rounded border border-solid transition-colors", i && !e ? "border-transparent" : o ? "border-delta-300" : a ? "border-delta-200" : r ? t("border-error-500", e && n) : e ? "border-focus-ring shadow-[inset_0_0_0_2px_var(--colors-focus-ring)]" : "border-delta-500 group-hover:border-2 group-hover:border-gama-300"), v = ({ focused: e, error: r, disabled: o, readOnly: a, notched: i = !0 }) => t("pointer-events-none absolute z-0 m-0 box-border min-w-0 overflow-hidden rounded border border-solid transition-colors", i ? "inset-x-0 bottom-0 top-[-5px] px-2 py-0" : "inset-0", o ? "border-delta-300" : a ? "border-delta-200" : r ? t("border-error-500", e && n) : e ? "border-focus-ring shadow-[inset_0_0_0_2px_var(--colors-focus-ring)]" : "border-delta-500 group-hover:border-2 group-hover:border-gama-300"), m = (e) => t("block h-[11px] overflow-hidden bg-white p-0 text-xs leading-[23px] text-transparent transition-[max-width] duration-150", e ? "max-w-full" : "max-w-[0.01px]"), f = ({ shrink: e, focused: r, error: o, disabled: a, readOnly: i }) => t("pointer-events-none absolute left-[14px] z-10 max-w-[calc(100%-1.75rem)] truncate transition-colors duration-150", a ? "text-delta-300" : i ? "text-delta-800" : o ? "text-error-500" : r ? "text-gama-500" : e ? "text-delta-800" : "text-delta-500", e ? "bg-white px-1 text-xs leading-[16px] tracking-[0.24px]" : "text-base leading-[23px] tracking-[0.00938em]");
32
32
  export {
33
- p as fieldLabelAboveClass,
33
+ h as fieldLabelAboveClass,
34
34
  g as fieldWidthForMaxLength,
35
- b as fieldWidthStyle,
36
- m as floatingLabelClass,
37
- s as floatingLabelLayoutStyle,
38
- x as fullScreenFieldWidthVars,
39
- f as notchedLegendClass,
40
- h as notchedOutlineClass,
35
+ x as fieldWidthStyle,
36
+ f as floatingLabelClass,
37
+ b as floatingLabelLayoutStyle,
38
+ p as fullScreenFieldWidthVars,
39
+ m as notchedLegendClass,
40
+ v as notchedOutlineClass,
41
41
  u as outlineClass,
42
- l as singleLineInputLayoutStyle,
43
- d as singleLineShellLayoutStyle
42
+ s as singleLineInputLayoutStyle,
43
+ l as singleLineShellLayoutStyle
44
44
  };
@@ -1,11 +1,11 @@
1
- var a = "_textarea_lhzo8_1", e = "_active_lhzo8_1", _ = "_error_lhzo8_41", r = "_label_lhzo8_82", l = "_disabled_lhzo8_90", t = "_description_lhzo8_95", o = {
2
- textarea: a,
3
- active: e,
4
- error: _,
5
- label: r,
6
- disabled: l,
7
- description: t
1
+ var e = "_textarea_1sre0_1", r = "_active_1sre0_1", a = "_error_1sre0_43", _ = "_label_1sre0_86", t = "_disabled_1sre0_94", s = "_description_1sre0_99", d = {
2
+ textarea: e,
3
+ active: r,
4
+ error: a,
5
+ label: _,
6
+ disabled: t,
7
+ description: s
8
8
  };
9
9
  export {
10
- o as default
10
+ d as default
11
11
  };
@@ -1,119 +1,120 @@
1
- import { cn as g } from "../../../helpers/cn.js";
2
- import { isOverlayBackEnabled as M, useBackCloses as A } from "../../../hooks/useBackCloses.hook.js";
3
- import { useIsMobileView as q } from "../../hooks/useWindowWidthSize.hook.js";
4
- import { StyledDrawer as F } from "../../../components/navigation/drawer/StyledDrawer.js";
5
- import { useBackNavigationClose as K } from "../../hooks/useBackNavigationClose.hook.js";
6
- import { usePopupState as W } from "../../../hooks/usePopupState.js";
7
- import { ClickAwayListener as z } from "../../../components/mui-compat/ClickAwayListener.js";
8
- import { isBeforeMinTime as w } from "./helpers/minTime.js";
9
- import { TimePickerPanel as G } from "./components/TimePickerPanel.js";
10
- import { TimePickerPopper as J } from "./TimePickerPopper.js";
11
- import { getTimeFromValue as B } from "./helpers/getTimeFromValue.js";
12
- import { timePickerWidthProps as O } from "./helpers/timePickerWidth.js";
13
- import { TimePickerInput as Q } from "./TimePickerInput.js";
14
- import { useEffect as R, useState as E } from "react";
15
- import { jsx as r, jsxs as D } from "react/jsx-runtime";
16
- import { format as V, isBefore as U, isValid as X } from "date-fns";
17
- var fe = (o) => {
18
- const { value: l, onSelect: n, notBeforeTime: d, minTime: c } = o, t = W({
1
+ import { cn as D } from "../../../helpers/cn.js";
2
+ import { isOverlayBackEnabled as q, useBackCloses as F } from "../../../hooks/useBackCloses.hook.js";
3
+ import { useIsMobileView as K } from "../../hooks/useWindowWidthSize.hook.js";
4
+ import { StyledDrawer as W } from "../../../components/navigation/drawer/StyledDrawer.js";
5
+ import { useBackNavigationClose as z } from "../../hooks/useBackNavigationClose.hook.js";
6
+ import { usePopupState as G } from "../../../hooks/usePopupState.js";
7
+ import { ClickAwayListener as J } from "../../../components/mui-compat/ClickAwayListener.js";
8
+ import { isBeforeMinTime as E } from "./helpers/minTime.js";
9
+ import { TimePickerPanel as Q } from "./components/TimePickerPanel.js";
10
+ import { TimePickerPopper as R } from "./TimePickerPopper.js";
11
+ import { getTimeFromValue as C } from "./helpers/getTimeFromValue.js";
12
+ import { timePickerWidthProps as H } from "./helpers/timePickerWidth.js";
13
+ import { TimePickerInput as U } from "./TimePickerInput.js";
14
+ import { useEffect as X, useState as P } from "react";
15
+ import { jsx as i, jsxs as L } from "react/jsx-runtime";
16
+ import { format as V, isBefore as Y, isValid as Z } from "date-fns";
17
+ var de = (r) => {
18
+ const { value: a, onSelect: n, notBeforeTime: v, minTime: c } = r, t = G({
19
19
  variant: "popper",
20
20
  popupId: "time-picker-popper"
21
- }), m = q();
22
- A({
21
+ }), m = K();
22
+ F({
23
23
  active: t.isOpen,
24
24
  requestClose: t.close
25
- }), K({
26
- open: m && t.isOpen && !M(),
25
+ }), z({
26
+ open: m && t.isOpen && !q(),
27
27
  onClose: t.close
28
28
  });
29
- const { isOpen: P, anchorEl: x, close: h } = t;
30
- R(() => {
31
- if (!P || m) return;
32
- const e = (i) => {
33
- x?.contains(document.activeElement) && (i.key === "Escape" ? (i.preventDefault(), i.stopPropagation(), h()) : i.key === "Tab" && h());
29
+ const { isOpen: b, anchorEl: S, close: w } = t;
30
+ X(() => {
31
+ if (!b || m) return;
32
+ const e = (o) => {
33
+ S?.contains(document.activeElement) && (o.key === "Escape" ? (o.preventDefault(), o.stopPropagation(), w()) : o.key === "Tab" && w());
34
34
  };
35
35
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
36
36
  }, [
37
- P,
38
- x,
39
- h,
37
+ b,
38
+ S,
39
+ w,
40
40
  m
41
41
  ]);
42
- const C = l ? V(l, "HH:mm") : "", [H, u] = E(C), [b, a] = E(!1), [L, s] = E(!0), v = b ? H : C, k = (e) => !e || !d || !X(d) || !U(e, d), f = v.length === 5 ? B(v, l) : null, N = f ? k(f) : !0, I = (e) => {
43
- const i = e.target.value;
44
- if (a(!0), u(i), i.length !== 5) {
45
- s(!1);
42
+ const T = a ? V(a, "HH:mm") : "", [k, u] = P(T), [x, s] = P(!1), [B, f] = P(!1), p = x ? k : T, d = (e) => !e || !v || !Z(v) || !Y(e, v), l = p.length === 5 ? C(p, a) : null, j = !B || p === "" || l !== null, I = !B || !l || d(l), g = (e) => {
43
+ if (e === "") return !0;
44
+ const o = C(e, a);
45
+ return o !== null && d(o);
46
+ }, M = (e) => {
47
+ const o = e.target.value;
48
+ if (s(!0), u(o), g(o) && f(!1), o.length !== 5) return;
49
+ const h = C(o, a);
50
+ if (!h) {
51
+ n(void 0);
46
52
  return;
47
53
  }
48
- const p = B(i, l);
49
- if (!p) {
50
- n(void 0), s(!1);
54
+ E(h, c) || (d(h) ? (n(h), s(!1), t.close()) : n(void 0));
55
+ }, O = (e) => {
56
+ if (e && E(e, c)) return;
57
+ const o = d(e);
58
+ if (f(!o), o) {
59
+ n(e), u(e ? V(e, "HH:mm") : ""), s(!1);
51
60
  return;
52
61
  }
53
- s(!0), !w(p, c) && (k(p) ? (n(p), a(!1), t.close()) : n(void 0));
54
- }, T = (e) => {
55
- if (!(e && w(e, c))) {
56
- if (s(!0), k(e)) {
57
- n(e), u(e ? V(e, "HH:mm") : ""), a(!1);
58
- return;
59
- }
60
- n(void 0), u(e ? V(e, "HH:mm") : ""), a(!0);
61
- }
62
- }, j = () => {
63
- b && f && w(f, c) && a(!1);
64
- }, S = () => {
65
- n(void 0), u(""), a(!1), s(!0);
66
- }, y = /* @__PURE__ */ r(Q, {
67
- ...o,
62
+ n(void 0), u(e ? V(e, "HH:mm") : ""), s(!0);
63
+ }, A = () => {
64
+ x && (l && E(l, c) ? s(!1) : k === "" ? n(void 0) : g(k) || f(!0));
65
+ }, N = () => {
66
+ n(void 0), u(""), s(!1), f(!1);
67
+ }, y = /* @__PURE__ */ i(U, {
68
+ ...r,
68
69
  popupState: t,
69
- localValue: v,
70
- isValidTime: L,
71
- isValidEndTime: N,
72
- handleChange: I,
73
- handleBlur: j
70
+ localValue: p,
71
+ isValidTime: j,
72
+ isValidEndTime: I,
73
+ handleChange: M,
74
+ handleBlur: A
74
75
  });
75
- return o.disabled || o.readOnly ? y : m ? /* @__PURE__ */ D("div", {
76
- className: g("relative h-auto", typeof o.width == "number" && "w-auto"),
77
- ...O(o.width),
78
- children: [/* @__PURE__ */ r("div", {
76
+ return r.disabled || r.readOnly ? y : m ? /* @__PURE__ */ L("div", {
77
+ className: D("relative h-auto", typeof r.width == "number" && "w-auto"),
78
+ ...H(r.width),
79
+ children: [/* @__PURE__ */ i("div", {
79
80
  className: "m-0 flex h-fit items-center justify-center p-0",
80
81
  children: y
81
- }), /* @__PURE__ */ r(F, {
82
+ }), /* @__PURE__ */ i(W, {
82
83
  anchor: "bottom",
83
84
  open: t.isOpen,
84
85
  onClose: t.close,
85
86
  anchorEl: t.anchorEl,
86
87
  registerBackClose: !1,
87
- children: /* @__PURE__ */ r("div", {
88
+ children: /* @__PURE__ */ i("div", {
88
89
  className: "mx-auto w-full max-w-[360px] px-4 pb-[max(1rem,env(safe-area-inset-bottom))] pt-2",
89
- children: /* @__PURE__ */ r(G, {
90
- dataTest: o.dataTest,
91
- value: l,
90
+ children: /* @__PURE__ */ i(Q, {
91
+ dataTest: r.dataTest,
92
+ value: a,
92
93
  minTime: c,
93
- onSelect: T,
94
- handleClear: S,
94
+ onSelect: O,
95
+ handleClear: N,
95
96
  onConfirm: t.close
96
97
  })
97
98
  })
98
99
  })]
99
- }) : /* @__PURE__ */ r(z, {
100
+ }) : /* @__PURE__ */ i(J, {
100
101
  mouseEvent: "onMouseDown",
101
102
  onClickAway: t.close,
102
- children: /* @__PURE__ */ D("div", {
103
- className: g("relative h-auto", typeof o.width == "number" && "w-auto"),
104
- ...O(o.width),
105
- children: [/* @__PURE__ */ r("div", {
103
+ children: /* @__PURE__ */ L("div", {
104
+ className: D("relative h-auto", typeof r.width == "number" && "w-auto"),
105
+ ...H(r.width),
106
+ children: [/* @__PURE__ */ i("div", {
106
107
  className: "m-0 flex h-fit items-center justify-center p-0",
107
108
  children: y
108
- }), t.isOpen && /* @__PURE__ */ r(J, {
109
- ...o,
109
+ }), t.isOpen && /* @__PURE__ */ i(R, {
110
+ ...r,
110
111
  popupState: t,
111
- handleClear: S,
112
- onSelect: T
112
+ handleClear: N,
113
+ onSelect: O
113
114
  })]
114
115
  })
115
116
  });
116
117
  };
117
118
  export {
118
- fe as StyledTimePicker
119
+ de as StyledTimePicker
119
120
  };
@@ -67,7 +67,14 @@ interface DynamicSelectCommonProps<TOption extends DynamicSelectOption> {
67
67
  */
68
68
  required?: boolean;
69
69
  helperText?: React.ReactNode;
70
- /** Completely removes the helper text block below the autocomplete */
70
+ /**
71
+ * Stops the helper row being *reserved* below the control. A real `helperText` or an `error` still
72
+ * renders it, growing the layout at that moment — so nothing is silently swallowed.
73
+ *
74
+ * On the autocomplete variant it removes the block outright, which is what it has always done
75
+ * there. On the chip-group variant (1–5 options) it opts out of a 28px row that would otherwise
76
+ * sit empty under the chips.
77
+ */
71
78
  disableHelperText?: boolean;
72
79
  /**
73
80
  * Key of `TOption` used as the option's identity for comparison and as the chip/tag key.
@@ -46,9 +46,12 @@ interface FieldState {
46
46
  /** `variant="standard"`: same geometry as the outlined field, but the border is painted on focus only. */
47
47
  borderless?: boolean;
48
48
  }
49
- /** The border overlay (an absolutely-positioned sibling so width changes never reflow the input). */
49
+ /**
50
+ * The border overlay (an absolutely-positioned sibling so width changes never reflow the input).
51
+ * States: resting 1px delta-500 · focused 3px focus-ring · error 1px error-500 · error + focused 3px error-500.
52
+ */
50
53
  export declare const outlineClass: ({ focused, error, disabled, readOnly, borderless }: FieldState) => string;
51
- /** MUI-compatible fieldset outline used by text fields with floating labels. */
54
+ /** MUI-compatible fieldset outline used by text fields with floating labels. Same states as `outlineClass`. */
52
55
  export declare const notchedOutlineClass: ({ focused, error, disabled, readOnly, notched, }: FieldState & {
53
56
  notched?: boolean;
54
57
  }) => string;
@@ -0,0 +1 @@
1
+ export {};
@@ -43,7 +43,8 @@ type AutocompleteValue<T, Multiple, DisableClearable, FreeSolo> = Multiple exten
43
43
  /**
44
44
  * @figmaNode wXrXt5uKNNzV2DnQCgyYZH#20474-29075
45
45
  * Figma "Autocomplete". The trigger is the outlined **Input field** (shared `field-styles`: 40px,
46
- * border enabled delta-500/`#7a899e`, hover gama-300, focus gama-400 `#1ca1a1`, error error-500),
46
+ * border enabled delta-500/`#7a899e`, hover gama-300, focus 3px `color.focus.ring`, error error-500,
47
+ * error + focus 3px error-500),
47
48
  * so the field **State** (Enabled/Hovered/Focused/Error/Read-only) ← focus/open + `error`/`readOnly`/
48
49
  * `disabled`. **Filled** ← selected value(s): single fills the input text, multiple renders **Tag
49
50
  * chips** (`StyledChip`: h32, radius25, label 16/delta-700 — node 20475-29954). The dropdown is the
@@ -57,7 +57,8 @@ type StyledTextAreaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement> & T
57
57
  * Figma has no standalone "Text area" component — a multiline text control inherits the **Input
58
58
  * field** outlined styling (shared with `StyledInputField`/`field-styles`): radius 4, field text
59
59
  * **Body Base 16/lh24 delta-800**; border **enabled delta-500 #7a899e**, **hover gama-300 #60bdbd
60
- * (2px)**, **focus gama-400 #1ca1a1 (3px)**, **error error-500 #e10700**, **disabled delta-300**.
60
+ * (2px)**, **focus 3px `color.focus.ring`**, **error error-500 #e10700**, **error + focus 3px
61
+ * error-500**, **disabled delta-300**.
61
62
  * Title = **Body Base SemiBold 16 delta-800**; description/helper = **Helper 14/lh20 delta-600**.
62
63
  * State (Enabled/Hover/Focus/Error/Disabled) ← native + `error`/`disabled`; the `not_editable`/
63
64
  * `view_only` variants are the read-only presentations. Colours live in the textarea-only
@@ -2,7 +2,8 @@ import { StyledTimePickerProps } from './types';
2
2
  /**
3
3
  * @figmaNode wXrXt5uKNNzV2DnQCgyYZH#15561-37391
4
4
  * Figma has no distinct time-picker-popover component — the trigger is the outlined **Input field**
5
- * (`field-styles`: 40px, border delta-500 / hover gama-300 / focus gama-400 / error error-500) with
5
+ * (`field-styles`: 40px, border delta-500 / hover gama-300 / focus 3px `color.focus.ring` / error
6
+ * error-500 / error + focus 3px error-500) with
6
7
  * a trailing **clock icon** (delta-700 like the select/search field icons; delta-300 when disabled).
7
8
  * The dropdown follows the **Menus** surface (delta-300 border + Menus shadow `0 2 4 rgba(34,33,51,
8
9
  * .15)`): scrollable hour/minute columns of 36px cells — hover delta-50, "now" gama-50 (like the
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "3.113.2",
6
+ "version": "3.115.0",
7
7
  "type": "module",
8
8
  "sideEffects": [
9
9
  "**/*.css",
@@ -63,8 +63,9 @@
63
63
  --input-error-disabled-cursor: default;
64
64
  --input-error-outline-width: 1px;
65
65
  --input-error-hover-outline-width: 1px;
66
- --input-error-active-outline-width: 1px;
67
- --input-error-focus-outline-width: 1px;
66
+ /* Error like the input field (ASMA-8561): 1px at rest and on hover, 3px on press and focus. */
67
+ --input-error-active-outline-width: 3px;
68
+ --input-error-focus-outline-width: 3px;
68
69
  --input-error-disabled-outline-width: 1px;
69
70
  /* input notEditable */
70
71
  --colors-input-notEditable-placeholder-color: var(--colors-delta-800);