asma-ui-core 3.98.1 → 3.99.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,6 +1,6 @@
1
1
  import { cn as re } from "../../../helpers/cn.js";
2
2
  import { firstTabbable as ne } from "../../../helpers/focusable.js";
3
- import { TOP_LAYER_PROPS as ie, TOP_LAYER_RESET_STYLE as se, getOpenModalDialogAncestor as ae, shouldUsePopoverTopLayer as ce, useTopLayerRef as le } from "../../../hooks/useTopLayer.hook.js";
3
+ import { TOP_LAYER_PROPS as ie, TOP_LAYER_RESET_STYLE as se, getOpenModalDialogAncestor as ae, shouldUsePopoverTopLayer as le, useTopLayerRef as ce } from "../../../hooks/useTopLayer.hook.js";
4
4
  import { StyledButton as ue } from "../../inputs/button/StyledButton.js";
5
5
  import { useMobileMediaQuery as de } from "../../../hooks/useMediaQuery.hook.js";
6
6
  import { useDebouncedValue as fe } from "../../../hooks/useDebouncedValue.hook.js";
@@ -8,47 +8,47 @@ import { useFocusTrap as pe } from "../../../hooks/useFocusTrap.hook.js";
8
8
  import { formatResultsLabel as me } from "../bottom-sheet/formatResultsLabel.js";
9
9
  import { StyledBottomSheet as ge } from "../bottom-sheet/StyledBottomSheet.js";
10
10
  import { PopoverAnatomy as ve } from "./PopoverAnatomy.js";
11
- import { useCallback as m, useEffect as b, useId as he, useRef as y, useState as g } from "react";
12
- import { Fragment as N, jsx as c, jsxs as W } from "react/jsx-runtime";
13
- import { FloatingPortal as xe, autoUpdate as _e, flip as Pe, offset as be, shift as ye, size as Re, useDismiss as Ee, useFloating as Se, useInteractions as Te, useMergeRefs as Ae } from "@floating-ui/react";
14
- var Me = 240, we = {
11
+ import { useCallback as v, useEffect as y, useId as he, useRef as T, useState as h } from "react";
12
+ import { Fragment as N, jsx as l, jsxs as W } from "react/jsx-runtime";
13
+ import { FloatingPortal as xe, autoUpdate as _e, flip as Pe, offset as be, shift as Re, size as ye, useDismiss as Te, useFloating as Ee, useInteractions as Me, useMergeRefs as Se } from "@floating-ui/react";
14
+ var we = 240, Ae = {
15
15
  info: 472,
16
16
  action: 472
17
- }, Fe = 0.6, B = "calc(100vw - 32px)", qe = ({ dataTest: s, renderTrigger: R, variant: E = "info", title: l, children: S, viewResultsAction: T, resetAction: A, footerActions: M, resultCount: v, closeLabel: w = "Lukk", ariaLabel: F, onOpenChange: I, className: O }) => {
18
- const a = he(), L = `${a}-title`, [o, X] = g(!1), [H, U] = g(), [Y, $] = g(), u = de(), t = E === "action", j = u && !t, k = u && t, d = m((e) => {
17
+ }, Fe = 0.6, B = "calc(100vw - 32px)", Ie = (n, c, u) => _e(n, c, u, { elementResize: !1 }), qe = ({ dataTest: n, renderTrigger: c, variant: u = "info", title: d, children: E, viewResultsAction: M, resetAction: S, footerActions: w, resultCount: x, closeLabel: A = "Lukk", ariaLabel: F, onOpenChange: I, className: O }) => {
18
+ const a = he(), L = `${a}-title`, [o, X] = h(!1), [H, z] = h(), [U, Y] = h(), f = de(), t = u === "action", $ = f && !t, k = f && t, p = v((e) => {
19
19
  X(e), I?.(e);
20
- }, [I]), { refs: h, floatingStyles: q, context: z } = Se({
20
+ }, [I]), { refs: _, floatingStyles: j, context: q } = Ee({
21
21
  open: o,
22
- onOpenChange: d,
22
+ onOpenChange: p,
23
23
  placement: "bottom-start",
24
24
  strategy: "fixed",
25
- whileElementsMounted: _e,
25
+ whileElementsMounted: Ie,
26
26
  middleware: [
27
27
  be(8),
28
- ...j ? [] : [Pe({ padding: 8 })],
29
- ye({ padding: 8 }),
30
- Re({
28
+ ...$ ? [] : [Pe({ padding: 8 })],
29
+ Re({ padding: 8 }),
30
+ ye({
31
31
  padding: 8,
32
32
  apply({ availableHeight: e }) {
33
- $(Math.min(e, Math.round(window.innerHeight * Fe)));
33
+ Y(Math.min(e, Math.round(window.innerHeight * Fe)));
34
34
  }
35
35
  })
36
36
  ]
37
- }), { getFloatingProps: V } = Te([Ee(z, {
37
+ }), { getFloatingProps: V } = Me([Te(q, {
38
38
  enabled: !k,
39
39
  escapeKey: !0,
40
40
  outsidePress: (e) => {
41
- const i = f.current;
42
- return !(i && e.target instanceof Node && i.contains(e.target));
41
+ const s = m.current;
42
+ return !(s && e.target instanceof Node && s.contains(e.target));
43
43
  }
44
- })]), x = ce(H), C = y(null), [r, G] = g(null), K = m((e) => {
44
+ })]), P = le(H), C = T(null), [r, G] = h(null), K = v((e) => {
45
45
  C.current = e, G(e);
46
- }, []), Q = Ae([le(h.setFloating, x), K]), f = y(null), J = m((e) => {
47
- f.current = e, h.setReference(e);
48
- }, [h]), n = m(() => {
49
- d(!1);
50
- }, [d]);
51
- pe(o && t && r !== null, C), b(() => {
46
+ }, []), Q = Se([ce(_.setFloating, P), K]), m = T(null), J = v((e) => {
47
+ m.current = e, _.setReference(e);
48
+ }, [_]), i = v(() => {
49
+ p(!1);
50
+ }, [p]);
51
+ pe(o && t && r !== null, C), y(() => {
52
52
  if (!r) return;
53
53
  const e = requestAnimationFrame(() => {
54
54
  (t ? ne(r) : r)?.focus({ preventScroll: !0 });
@@ -56,11 +56,11 @@ var Me = 240, we = {
56
56
  return () => {
57
57
  cancelAnimationFrame(e);
58
58
  };
59
- }, [r, t]), b(() => {
59
+ }, [r, t]), y(() => {
60
60
  if (!r || t) return;
61
- const e = (i) => {
62
- const P = i.relatedTarget;
63
- P instanceof Node && (r.contains(P) || f.current?.contains(P)) || n();
61
+ const e = (s) => {
62
+ const R = s.relatedTarget;
63
+ R instanceof Node && (r.contains(R) || m.current?.contains(R)) || i();
64
64
  };
65
65
  return r.addEventListener("focusout", e), () => {
66
66
  r.removeEventListener("focusout", e);
@@ -68,23 +68,23 @@ var Me = 240, we = {
68
68
  }, [
69
69
  r,
70
70
  t,
71
- n
71
+ i
72
72
  ]);
73
- const _ = y(!1);
74
- b(() => {
73
+ const b = T(!1);
74
+ y(() => {
75
75
  if (o) {
76
- _.current = !0;
76
+ b.current = !0;
77
77
  return;
78
78
  }
79
- if (!_.current) return;
80
- _.current = !1;
81
- const e = f.current;
79
+ if (!b.current) return;
80
+ b.current = !1;
81
+ const e = m.current;
82
82
  if (!e) return;
83
- const i = requestAnimationFrame(() => {
83
+ const s = requestAnimationFrame(() => {
84
84
  document.activeElement === document.body && e.focus();
85
85
  });
86
86
  return () => {
87
- cancelAnimationFrame(i);
87
+ cancelAnimationFrame(s);
88
88
  };
89
89
  }, [o]);
90
90
  const D = {
@@ -93,69 +93,69 @@ var Me = 240, we = {
93
93
  triggerProps: {
94
94
  onClick: (e) => {
95
95
  if (o) {
96
- n();
96
+ i();
97
97
  return;
98
98
  }
99
- U(ae(e.currentTarget)), d(!0);
99
+ z(ae(e.currentTarget)), p(!0);
100
100
  },
101
101
  "aria-expanded": o,
102
102
  "aria-controls": o ? a : void 0,
103
103
  "aria-haspopup": t ? "dialog" : void 0,
104
104
  "aria-describedby": !t && o ? a : void 0
105
105
  }
106
- }, p = (e) => typeof e == "function" ? e({ close: n }) : e, Z = fe(v, 500), ee = T ?? (v === void 0 ? void 0 : /* @__PURE__ */ c(ue, {
107
- dataTest: `${s}-view-results`,
106
+ }, g = (e) => typeof e == "function" ? e({ close: i }) : e, Z = fe(x, 500), ee = M ?? (x === void 0 ? void 0 : /* @__PURE__ */ l(ue, {
107
+ dataTest: `${n}-view-results`,
108
108
  type: "button",
109
109
  variant: "text",
110
- onClick: n,
110
+ onClick: i,
111
111
  children: me(Z)
112
- })), te = u ? B : we[E], oe = u ? B : void 0;
113
- return k ? /* @__PURE__ */ W(N, { children: [R(D), /* @__PURE__ */ c(ge, {
112
+ })), te = f ? B : Ae[u], oe = f ? B : void 0;
113
+ return k ? /* @__PURE__ */ W(N, { children: [c(D), /* @__PURE__ */ l(ge, {
114
114
  id: a,
115
- dataTest: s,
115
+ dataTest: n,
116
116
  open: o,
117
- onClose: n,
118
- title: l,
117
+ onClose: i,
118
+ title: d,
119
119
  ariaLabel: F,
120
- viewResultsAction: T,
121
- resetAction: A,
122
- footerActions: M,
123
- resultCount: v,
124
- closeLabel: w,
120
+ viewResultsAction: M,
121
+ resetAction: S,
122
+ footerActions: w,
123
+ resultCount: x,
124
+ closeLabel: A,
125
125
  className: O,
126
- children: S
127
- })] }) : /* @__PURE__ */ W(N, { children: [R(D), o && /* @__PURE__ */ c(xe, {
126
+ children: E
127
+ })] }) : /* @__PURE__ */ W(N, { children: [c(D), o && /* @__PURE__ */ l(xe, {
128
128
  root: H,
129
- children: /* @__PURE__ */ c("div", {
129
+ children: /* @__PURE__ */ l("div", {
130
130
  ...V(),
131
131
  ref: Q,
132
132
  id: a,
133
- "data-test": s,
134
- "data-testid": s,
133
+ "data-test": n,
134
+ "data-testid": n,
135
135
  role: t ? "dialog" : void 0,
136
- "aria-labelledby": t && l ? L : void 0,
137
- "aria-label": t && !l ? F : void 0,
136
+ "aria-labelledby": t && d ? L : void 0,
137
+ "aria-label": t && !d ? F : void 0,
138
138
  tabIndex: t ? void 0 : -1,
139
- ...x ? ie : {},
139
+ ...P ? ie : {},
140
140
  style: {
141
- ...x ? se : {},
142
- ...q,
143
- minWidth: Me,
141
+ ...P ? se : {},
142
+ ...j,
143
+ minWidth: we,
144
144
  width: oe,
145
145
  maxWidth: te,
146
- maxHeight: Y
146
+ maxHeight: U
147
147
  },
148
148
  className: re("z-[1300]", "box-border flex flex-col overflow-hidden rounded-lg bg-white text-delta-700 outline-none shadow-[inset_0_0_0_1px_var(--colors-delta-300),0px_4px_40px_0px_#22213366]", O),
149
- children: /* @__PURE__ */ c(ve, {
150
- dataTest: s,
151
- title: l,
149
+ children: /* @__PURE__ */ l(ve, {
150
+ dataTest: n,
151
+ title: d,
152
152
  titleId: L,
153
- viewResultsAction: p(ee),
154
- resetAction: p(A),
155
- footerActions: p(M),
156
- closeLabel: w,
157
- onClose: n,
158
- children: p(S)
153
+ viewResultsAction: g(ee),
154
+ resetAction: g(S),
155
+ footerActions: g(w),
156
+ closeLabel: A,
157
+ onClose: i,
158
+ children: g(E)
159
159
  })
160
160
  })
161
161
  })] });
@@ -1,103 +1,110 @@
1
- import { useIsMobileView as N } from "../../hooks/useWindowWidthSize.hook.js";
2
- import { StyledDrawer as O } from "../../../components/navigation/drawer/StyledDrawer.js";
3
- import { useBackNavigationClose as I } from "../../hooks/useBackNavigationClose.hook.js";
4
- import { usePopupState as j } from "../../../hooks/usePopupState.js";
5
- import { ClickAwayListener as A } from "../../../components/mui-compat/ClickAwayListener.js";
6
- import { TimePickerPanel as B } from "./components/TimePickerPanel.js";
7
- import { TimePickerPopper as M } from "./TimePickerPopper.js";
8
- import { getTimeFromValue as S } from "./helpers/getTimeFromValue.js";
9
- import { TimePickerInput as F } from "./TimePickerInput.js";
10
- import { useEffect as K, useState as y } from "react";
11
- import { jsx as r, jsxs as C } from "react/jsx-runtime";
12
- import { format as k, isBefore as q, isValid as z } from "date-fns";
13
- var oe = (i) => {
14
- const { value: a, onSelect: n, notBeforeTime: u } = i, o = j({
1
+ import { useIsMobileView as I } from "../../hooks/useWindowWidthSize.hook.js";
2
+ import { StyledDrawer as j } from "../../../components/navigation/drawer/StyledDrawer.js";
3
+ import { useBackNavigationClose as M } from "../../hooks/useBackNavigationClose.hook.js";
4
+ import { usePopupState as A } from "../../../hooks/usePopupState.js";
5
+ import { ClickAwayListener as F } from "../../../components/mui-compat/ClickAwayListener.js";
6
+ import { isBeforeMinTime as V } from "./helpers/minTime.js";
7
+ import { TimePickerPanel as K } from "./components/TimePickerPanel.js";
8
+ import { TimePickerPopper as q } from "./TimePickerPopper.js";
9
+ import { getTimeFromValue as g } from "./helpers/getTimeFromValue.js";
10
+ import { TimePickerInput as z } from "./TimePickerInput.js";
11
+ import { useEffect as G, useState as w } from "react";
12
+ import { jsx as r, jsxs as D } from "react/jsx-runtime";
13
+ import { format as E, isBefore as J, isValid as Q } from "date-fns";
14
+ var ne = (i) => {
15
+ const { value: l, onSelect: n, notBeforeTime: d, minTime: c } = i, o = A({
15
16
  variant: "popper",
16
17
  popupId: "time-picker-popper"
17
- }), c = N();
18
- I({
19
- open: c && o.isOpen,
18
+ }), m = I();
19
+ M({
20
+ open: m && o.isOpen,
20
21
  onClose: o.close
21
22
  });
22
- const { isOpen: V, anchorEl: w, close: p } = o;
23
- K(() => {
24
- if (!V || c) return;
23
+ const { isOpen: x, anchorEl: P, close: h } = o;
24
+ G(() => {
25
+ if (!x || m) return;
25
26
  const e = (t) => {
26
- w?.contains(document.activeElement) && (t.key === "Escape" ? (t.preventDefault(), t.stopPropagation(), p()) : t.key === "Tab" && p());
27
+ P?.contains(document.activeElement) && (t.key === "Escape" ? (t.preventDefault(), t.stopPropagation(), h()) : t.key === "Tab" && h());
27
28
  };
28
29
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
29
30
  }, [
30
- V,
31
- w,
32
- p,
33
- c
31
+ x,
32
+ P,
33
+ h,
34
+ m
34
35
  ]);
35
- const E = a ? k(a, "HH:mm") : "", [b, m] = y(E), [g, l] = y(!1), [D, s] = y(!0), f = g ? b : E, d = (e) => !e || !u || !z(u) || !q(e, u), x = f.length === 5 ? S(f, a) : null, H = x ? d(x) : !0, L = (e) => {
36
+ const T = l ? E(l, "HH:mm") : "", [H, u] = w(T), [S, a] = w(!1), [L, s] = w(!0), v = S ? H : T, y = (e) => !e || !d || !Q(d) || !J(e, d), f = v.length === 5 ? g(v, l) : null, N = f ? y(f) : !0, O = (e) => {
36
37
  const t = e.target.value;
37
- if (l(!0), m(t), t.length !== 5) {
38
+ if (a(!0), u(t), t.length !== 5) {
38
39
  s(!1);
39
40
  return;
40
41
  }
41
- const v = S(t, a);
42
- if (!v) {
42
+ const p = g(t, l);
43
+ if (!p) {
43
44
  n(void 0), s(!1);
44
45
  return;
45
46
  }
46
- s(!0), d(v) ? (n(v), l(!1), o.close()) : n(void 0);
47
- }, P = (e) => {
48
- if (s(!0), d(e)) {
49
- n(e), m(e ? k(e, "HH:mm") : ""), l(!1);
50
- return;
47
+ s(!0), !V(p, c) && (y(p) ? (n(p), a(!1), o.close()) : n(void 0));
48
+ }, C = (e) => {
49
+ if (!(e && V(e, c))) {
50
+ if (s(!0), y(e)) {
51
+ n(e), u(e ? E(e, "HH:mm") : ""), a(!1);
52
+ return;
53
+ }
54
+ n(void 0), u(e ? E(e, "HH:mm") : ""), a(!0);
51
55
  }
52
- n(void 0), m(e ? k(e, "HH:mm") : ""), l(!0);
53
- }, T = () => {
54
- n(void 0), m(""), l(!1), s(!0);
55
- }, h = /* @__PURE__ */ r(F, {
56
+ }, B = () => {
57
+ S && f && V(f, c) && a(!1);
58
+ }, b = () => {
59
+ n(void 0), u(""), a(!1), s(!0);
60
+ }, k = /* @__PURE__ */ r(z, {
56
61
  ...i,
57
62
  popupState: o,
58
- localValue: f,
59
- isValidTime: D,
60
- isValidEndTime: H,
61
- handleChange: L
63
+ localValue: v,
64
+ isValidTime: L,
65
+ isValidEndTime: N,
66
+ handleChange: O,
67
+ handleBlur: B
62
68
  });
63
- return i.disabled || i.readOnly ? h : c ? /* @__PURE__ */ C("div", {
69
+ return i.disabled || i.readOnly ? k : m ? /* @__PURE__ */ D("div", {
64
70
  className: "relative h-auto w-auto",
65
71
  children: [/* @__PURE__ */ r("div", {
66
72
  className: "m-0 flex h-fit items-center justify-center p-0",
67
- children: h
68
- }), /* @__PURE__ */ r(O, {
73
+ children: k
74
+ }), /* @__PURE__ */ r(j, {
69
75
  anchor: "bottom",
70
76
  open: o.isOpen,
71
77
  onClose: o.close,
72
78
  anchorEl: o.anchorEl,
73
79
  children: /* @__PURE__ */ r("div", {
74
80
  className: "mx-auto w-full max-w-[360px] px-4 pb-[max(1rem,env(safe-area-inset-bottom))] pt-2",
75
- children: /* @__PURE__ */ r(B, {
81
+ children: /* @__PURE__ */ r(K, {
76
82
  dataTest: i.dataTest,
77
- value: a,
78
- onSelect: P,
79
- handleClear: T,
83
+ value: l,
84
+ minTime: c,
85
+ onSelect: C,
86
+ handleClear: b,
80
87
  onConfirm: o.close
81
88
  })
82
89
  })
83
90
  })]
84
- }) : /* @__PURE__ */ r(A, {
91
+ }) : /* @__PURE__ */ r(F, {
85
92
  mouseEvent: "onMouseDown",
86
93
  onClickAway: o.close,
87
- children: /* @__PURE__ */ C("div", {
94
+ children: /* @__PURE__ */ D("div", {
88
95
  className: "relative h-auto w-auto",
89
96
  children: [/* @__PURE__ */ r("div", {
90
97
  className: "m-0 flex h-fit items-center justify-center p-0",
91
- children: h
92
- }), o.isOpen && /* @__PURE__ */ r(M, {
98
+ children: k
99
+ }), o.isOpen && /* @__PURE__ */ r(q, {
93
100
  ...i,
94
101
  popupState: o,
95
- handleClear: T,
96
- onSelect: P
102
+ handleClear: b,
103
+ onSelect: C
97
104
  })]
98
105
  })
99
106
  });
100
107
  };
101
108
  export {
102
- oe as StyledTimePicker
109
+ ne as StyledTimePicker
103
110
  };
@@ -1,10 +1,10 @@
1
1
  var e = {
2
- "styled-time-picker-root": "_styled-time-picker-root_qcipa_1",
3
- "styled-time-picker-root_column": "_styled-time-picker-root_column_qcipa_4",
4
- "styled-time-picker-root_cell": "_styled-time-picker-root_cell_qcipa_7",
5
- "styled-time-picker-root_cell__cell-now": "_styled-time-picker-root_cell__cell-now_qcipa_10",
6
- "styled-time-picker-root_cell__cell-selected": "_styled-time-picker-root_cell__cell-selected_qcipa_13",
7
- "time-picker-surface": "_time-picker-surface_qcipa_17"
2
+ "styled-time-picker-root": "_styled-time-picker-root_5uhjk_1",
3
+ "styled-time-picker-root_column": "_styled-time-picker-root_column_5uhjk_4",
4
+ "styled-time-picker-root_cell": "_styled-time-picker-root_cell_5uhjk_7",
5
+ "styled-time-picker-root_cell__cell-now": "_styled-time-picker-root_cell__cell-now_5uhjk_10",
6
+ "styled-time-picker-root_cell__cell-selected": "_styled-time-picker-root_cell__cell-selected_5uhjk_13",
7
+ "time-picker-surface": "_time-picker-surface_5uhjk_20"
8
8
  };
9
9
  export {
10
10
  e as default
@@ -1,24 +1,24 @@
1
- import { ClockOutlineIcon as E } from "../../../components/icons/clock-outline-icon/ClockOutlineIcon.js";
2
- import { StyledInputField as I } from "../../../components/inputs/input-field/StyledInputField.js";
3
- import { useInputMask as N } from "../../../helpers/inputMask.js";
4
- import { HelperText as y, defaultTimePickerHelperMessages as P } from "./components/HelperText.js";
5
- import { useEffect as R, useRef as v } from "react";
6
- import { jsx as r, jsxs as w } from "react/jsx-runtime";
1
+ import { ClockOutlineIcon as I } from "../../../components/icons/clock-outline-icon/ClockOutlineIcon.js";
2
+ import { StyledInputField as N } from "../../../components/inputs/input-field/StyledInputField.js";
3
+ import { useInputMask as y } from "../../../helpers/inputMask.js";
4
+ import { HelperText as P, defaultTimePickerHelperMessages as R } from "./components/HelperText.js";
5
+ import { useEffect as v, useRef as w } from "react";
6
+ import { jsx as o, jsxs as H } from "react/jsx-runtime";
7
7
  var O = (c) => {
8
- const { placeholder: x, disabled: e, inputClassName: f, dataTest: n, width: l, error: h, helperText: u, label: g, locale: k = "en", popupState: a, handleChange: T, isValidTime: p, isValidEndTime: m, localValue: C, title: d, readOnly: t } = c, b = N({
8
+ const { placeholder: x, disabled: e, inputClassName: u, dataTest: n, width: l, error: f, helperText: h, label: g, locale: k = "en", popupState: a, handleChange: T, handleBlur: C, isValidTime: p, isValidEndTime: m, localValue: b, title: d, readOnly: t } = c, E = y({
9
9
  mask: "xx:xx",
10
10
  maskChar: "x",
11
11
  showMask: !1
12
- }), i = !p || !m || !!h, s = v(null);
13
- return R(() => {
12
+ }), i = !p || !m || !!f, s = w(null);
13
+ return v(() => {
14
14
  s.current && a.setAnchorEl(s.current);
15
- }, []), /* @__PURE__ */ w("div", {
15
+ }, []), /* @__PURE__ */ H("div", {
16
16
  style: { height: t ? "40px" : "75px" },
17
- children: [d && /* @__PURE__ */ r("div", {
17
+ children: [d && /* @__PURE__ */ o("div", {
18
18
  className: "pb-1 font-roboto font-semibold text-delta-800",
19
19
  children: d
20
- }), /* @__PURE__ */ r(I, {
21
- inputRef: b,
20
+ }), /* @__PURE__ */ o(N, {
21
+ inputRef: E,
22
22
  autoComplete: "off",
23
23
  type: "text",
24
24
  dataTest: n,
@@ -26,27 +26,28 @@ var O = (c) => {
26
26
  placeholder: x,
27
27
  size: "small",
28
28
  error: i,
29
- helperText: /* @__PURE__ */ r(y, {
29
+ helperText: /* @__PURE__ */ o(P, {
30
30
  isValidTime: p,
31
31
  isValidEndTime: m,
32
32
  error: i,
33
33
  localization: k,
34
- helperText: u,
35
- messages: P
34
+ helperText: h,
35
+ messages: R
36
36
  }),
37
37
  onChange: T,
38
+ onBlur: C,
38
39
  slotProps: {
39
40
  input: {
40
41
  ref: s,
41
- onClick: (o) => {
42
- !e && !t && a.open(o);
42
+ onClick: (r) => {
43
+ !e && !t && a.open(r);
43
44
  },
44
- endAdornment: /* @__PURE__ */ r(E, {
45
+ endAdornment: /* @__PURE__ */ o(I, {
45
46
  width: 24,
46
47
  height: 24,
47
48
  className: e ? "text-delta-300" : "text-delta-700",
48
- onClick: (o) => {
49
- o.stopPropagation(), !e && !t && a.open(o);
49
+ onClick: (r) => {
50
+ r.stopPropagation(), !e && !t && a.open(r);
50
51
  }
51
52
  })
52
53
  },
@@ -55,7 +56,7 @@ var O = (c) => {
55
56
  hideErrorIcon: !0
56
57
  }
57
58
  },
58
- value: C,
59
+ value: b,
59
60
  sx: {
60
61
  maxWidth: l ?? 130,
61
62
  width: l,
@@ -63,7 +64,7 @@ var O = (c) => {
63
64
  },
64
65
  disabled: e,
65
66
  readOnly: t,
66
- className: f,
67
+ className: u,
67
68
  label: g
68
69
  })]
69
70
  });
@@ -1,29 +1,30 @@
1
- import { bindPopper as l } from "../../../hooks/usePopupState.js";
2
- import { Paper as n } from "../../../components/mui-compat/Paper.js";
3
- import { Fade as c } from "../../../components/mui-compat/Fade.js";
4
- import { Popper as d } from "../../../components/mui-compat/Popper.js";
5
- import f from "./StyledTimePicker.module.js";
6
- import { TimePickerPanel as s } from "./components/TimePickerPanel.js";
7
- import u from "clsx";
1
+ import { bindPopper as n } from "../../../hooks/usePopupState.js";
2
+ import { Paper as c } from "../../../components/mui-compat/Paper.js";
3
+ import { Fade as d } from "../../../components/mui-compat/Fade.js";
4
+ import { Popper as f } from "../../../components/mui-compat/Popper.js";
5
+ import s from "./StyledTimePicker.module.js";
6
+ import { TimePickerPanel as u } from "./components/TimePickerPanel.js";
7
+ import P from "clsx";
8
8
  import { jsx as e } from "react/jsx-runtime";
9
- var C = (o) => {
10
- const { popupState: r, dataTest: t, value: i, onSelect: m, handleClear: p } = o;
11
- return /* @__PURE__ */ e(d, {
12
- ...l(r),
9
+ var _ = (o) => {
10
+ const { popupState: r, dataTest: t, value: i, minTime: m, onSelect: p, handleClear: a } = o;
11
+ return /* @__PURE__ */ e(f, {
12
+ ...n(r),
13
13
  transition: !0,
14
14
  style: { zIndex: "1300" },
15
- children: ({ TransitionProps: a }) => /* @__PURE__ */ e(c, {
16
- ...a,
15
+ children: ({ TransitionProps: l }) => /* @__PURE__ */ e(d, {
16
+ ...l,
17
17
  timeout: 350,
18
- children: /* @__PURE__ */ e(n, {
18
+ children: /* @__PURE__ */ e(c, {
19
19
  elevation: 0,
20
- className: u(f["time-picker-surface"]),
20
+ className: P(s["time-picker-surface"]),
21
21
  style: { paddingBottom: "1px" },
22
- children: /* @__PURE__ */ e(s, {
22
+ children: /* @__PURE__ */ e(u, {
23
23
  dataTest: t,
24
24
  value: i,
25
- onSelect: m,
26
- handleClear: p,
25
+ minTime: m,
26
+ onSelect: p,
27
+ handleClear: a,
27
28
  onConfirm: () => r.close()
28
29
  })
29
30
  })
@@ -31,5 +32,5 @@ var C = (o) => {
31
32
  });
32
33
  };
33
34
  export {
34
- C as TimePickerPopper
35
+ _ as TimePickerPopper
35
36
  };
@@ -1,32 +1,34 @@
1
- import f from "../StyledTimePicker.module.js";
2
- import { TimePickerColumn as s } from "./TimePickerColumn.js";
3
- import { useEffect as u, useRef as d } from "react";
4
- import { jsx as m, jsxs as p } from "react/jsx-runtime";
5
- var k = ({ value: l, onSelect: i, dataTest: n }) => {
6
- const t = d(null);
7
- return u(() => {
1
+ import u from "../StyledTimePicker.module.js";
2
+ import { TimePickerColumn as n } from "./TimePickerColumn.js";
3
+ import { useEffect as d, useRef as p } from "react";
4
+ import { jsx as f, jsxs as a } from "react/jsx-runtime";
5
+ var g = ({ value: l, onSelect: c, dataTest: m, minTime: s }) => {
6
+ const t = p(null);
7
+ return d(() => {
8
8
  const r = t.current;
9
9
  if (!r) return;
10
- const c = r.querySelectorAll('[data-cell="selected"]');
11
- (c.length ? c : r.querySelectorAll('[data-cell="now"]')).forEach((o) => {
10
+ const i = r.querySelectorAll('[data-cell="selected"]');
11
+ (i.length ? i : r.querySelectorAll('[data-cell="now"]')).forEach((o) => {
12
12
  const e = o.parentElement;
13
13
  e && (e.scrollTop = o.offsetTop - e.offsetTop - (e.clientHeight - o.clientHeight) / 2);
14
14
  });
15
- }, [t]), /* @__PURE__ */ p("div", {
15
+ }, [t]), /* @__PURE__ */ a("div", {
16
16
  ref: t,
17
- "data-test": n,
18
- className: f["styled-time-picker-root"],
19
- children: [/* @__PURE__ */ m(s, {
17
+ "data-test": m,
18
+ className: u["styled-time-picker-root"],
19
+ children: [/* @__PURE__ */ f(n, {
20
20
  type: "hours",
21
21
  value: l,
22
- onSelect: i
23
- }), /* @__PURE__ */ m(s, {
22
+ onSelect: c,
23
+ minTime: s
24
+ }), /* @__PURE__ */ f(n, {
24
25
  type: "minutes",
25
26
  value: l,
26
- onSelect: i
27
+ onSelect: c,
28
+ minTime: s
27
29
  })]
28
30
  });
29
31
  };
30
32
  export {
31
- k as TimePickerBody
33
+ g as TimePickerBody
32
34
  };