@owp/core 2.5.43 → 2.5.45

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 (27) hide show
  1. package/dist/_virtual/index16.js +4 -4
  2. package/dist/_virtual/index17.js +4 -4
  3. package/dist/_virtual/index18.js +4 -4
  4. package/dist/_virtual/index19.js +4 -4
  5. package/dist/components/OwpPicker/OwpTimePicker.js +286 -271
  6. package/dist/components/OwpPicker/OwpTimePicker.js.map +1 -1
  7. package/dist/components/OwpTreeGrid/OwpTreeGrid.js +215 -208
  8. package/dist/components/OwpTreeGrid/OwpTreeGrid.js.map +1 -1
  9. package/dist/components/OwpTreeGrid/internal/OwpTreeGridAddedRowBoxOverlay.js +31 -0
  10. package/dist/components/OwpTreeGrid/internal/OwpTreeGridAddedRowBoxOverlay.js.map +1 -0
  11. package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridAddedRowBoxOverlay.js +147 -0
  12. package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridAddedRowBoxOverlay.js.map +1 -0
  13. package/dist/components/OwpTreeGrid/internal/treeGridTheme.js +2 -1
  14. package/dist/components/OwpTreeGrid/internal/treeGridTheme.js.map +1 -1
  15. package/dist/layout/components/toggles/NavigationSearchToggle.js +3 -3
  16. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/constants.js +1 -1
  17. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/constants.js +1 -1
  18. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js +1 -1
  19. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js +1 -1
  20. package/dist/node_modules/.pnpm/react-overlays@5.2.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/react-overlays/esm/Portal.js +1 -1
  21. package/dist/types/components/OwpPicker/OwpTimePicker.d.ts +2 -2
  22. package/dist/types/components/OwpTreeGrid/internal/OwpTreeGridAddedRowBoxOverlay.d.ts +10 -0
  23. package/dist/types/components/OwpTreeGrid/internal/hooks/useOwpTreeGridAddedRowBoxOverlay.d.ts +21 -0
  24. package/dist/types/components/OwpTreeGrid/internal/treeGridTheme.d.ts +1 -0
  25. package/dist/utils/treeGridUtil.js +100 -91
  26. package/dist/utils/treeGridUtil.js.map +1 -1
  27. package/package.json +1 -1
@@ -1,20 +1,24 @@
1
- var xn = Object.defineProperty;
2
- var u = (r, I) => xn(r, "name", { value: I, configurable: !0 });
3
- import { jsx as w, jsxs as en } from "../../node_modules/.pnpm/@emotion_react@11.14.0_@types_react@19.2.14_react@19.2.4/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js";
4
- import { useOwpTranslation as Fn } from "../../hooks/useOwpTranslation.js";
5
- import An from "../../node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/Clear.js";
6
- import { Popper as Pn, Paper as ne, InputAdornment as bn, IconButton as Rn } from "@mui/material";
7
- import { TimePicker as ee, MultiSectionDigitalClock as te, LocalizationProvider as re } from "@mui/x-date-pickers";
1
+ var Fn = Object.defineProperty;
2
+ var a = (t, m) => Fn(t, "name", { value: m, configurable: !0 });
3
+ import { jsx as w, jsxs as cn } from "../../node_modules/.pnpm/@emotion_react@11.14.0_@types_react@19.2.14_react@19.2.4/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js";
4
+ import { useOwpTranslation as Pn } from "../../hooks/useOwpTranslation.js";
5
+ import Rn from "../../node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/Clear.js";
6
+ import { Popper as ne, Paper as ee, InputAdornment as Sn, IconButton as On } from "@mui/material";
7
+ import { TimePicker as te, MultiSectionDigitalClock as re, LocalizationProvider as ie } from "@mui/x-date-pickers";
8
8
  import { AdapterDayjs as ae } from "@mui/x-date-pickers/AdapterDayjs";
9
- import { clsx as ie } from "../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
10
- import { owpDayjs as O } from "../../dayjs.js";
11
- import { useMemo as tn, useState as Y, useRef as D, useCallback as o, useEffect as rn } from "react";
12
- import { TIME_PICKER_EDITOR_SECTION_WIDTH as ce, VALUE_TIME_SECOND_FORMATTER as G, VALUE_TIME_FORMATTER as J, PICKER_TRANSITION_DURATION as Mn, PICKER_EXIT_TRANSFORM_DELAY as ue, PICKER_TRANSFORM_TRANSITION_DURATION as oe, PICKER_INVALID_INPUT_MESSAGE_KEY as se, TIME_PICKER_SELECTED_ITEM_SX as le } from "./constants/index.js";
13
- import { getOwpPickerEditorPaperSx as fe, getOwpPickerEditorInputSx as de, getOwpTimePickerClockSx as me } from "./styles/pickerEditorStyles.js";
14
- import { useOwpPickerPopperTransition as Ie } from "./hooks/useOwpPickerPopperTransition.js";
15
- import { getAdjacentFocusableElement as Te, getPickerInputMask as we } from "./utils/index.js";
9
+ import { clsx as ce } from "../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
10
+ import { owpDayjs as K } from "../../dayjs.js";
11
+ import { useMemo as J, useState as Q, useRef as O, useCallback as u, useEffect as on } from "react";
12
+ import { TIME_PICKER_EDITOR_SECTION_WIDTH as oe, VALUE_TIME_SECOND_FORMATTER as x, VALUE_TIME_FORMATTER as F, PICKER_TRANSITION_DURATION as _n, PICKER_EXIT_TRANSFORM_DELAY as ue, PICKER_TRANSFORM_TRANSITION_DURATION as se, PICKER_INVALID_INPUT_MESSAGE_KEY as de, TIME_PICKER_SELECTED_ITEM_SX as le } from "./constants/index.js";
13
+ import { getOwpPickerEditorPaperSx as fe, getOwpPickerEditorInputSx as me, getOwpTimePickerClockSx as Ie } from "./styles/pickerEditorStyles.js";
14
+ import { useOwpPickerPopperTransition as Te } from "./hooks/useOwpPickerPopperTransition.js";
15
+ import { getAdjacentFocusableElement as we, getPickerInputMask as ke } from "./utils/index.js";
16
16
  import { OwpTextMaskField as ye } from "../OwpTextField/OwpTextMaskField.js";
17
- const an = "––", ke = {
17
+ const Z = "––", pe = [
18
+ '[role="spinbutton"]:not([tabindex="-1"]):not([aria-disabled="true"])',
19
+ '[role="group"] [tabindex="0"]:not([aria-disabled="true"])',
20
+ '[contenteditable="true"]:not([tabindex="-1"]):not([aria-disabled="true"])'
21
+ ].join(","), Ee = {
18
22
  "& .MuiInputBase-root": {
19
23
  alignItems: "center"
20
24
  },
@@ -40,340 +44,351 @@ const an = "––", ke = {
40
44
  visibility: "visible"
41
45
  }
42
46
  }
43
- }, pe = /* @__PURE__ */ u((r) => r.ctrlKey || r.altKey || r.metaKey ? !1 : r.key.length === 1 || r.key === "Backspace" || r.key === "Delete", "isValueEditingKey"), Ee = /* @__PURE__ */ u((r) => r.ctrlKey || r.altKey || r.metaKey || r.key === "Escape" || r.key === "Enter" || r.key === "Tab" ? !1 : r.key.length === 1 || r.key.startsWith("Arrow"), "isTimePickerOpenKey"), cn = /* @__PURE__ */ u((r, I) => {
44
- const Q = r.trim(), d = I ? "(\\d{2}):(\\d{2}):(\\d{2})" : "(\\d{2}):(\\d{2})", A = Q.match(new RegExp(`^${d}$`));
45
- if (!A)
47
+ }, De = /* @__PURE__ */ a((t) => t.ctrlKey || t.altKey || t.metaKey ? !1 : t.key.length === 1 || t.key === "Backspace" || t.key === "Delete", "isValueEditingKey"), be = /* @__PURE__ */ a((t) => t.ctrlKey || t.altKey || t.metaKey || t.key === "Escape" || t.key === "Enter" || t.key === "Tab" ? !1 : t.key.length === 1 || t.key.startsWith("Arrow"), "isTimePickerOpenKey"), un = /* @__PURE__ */ a((t, m) => {
48
+ const E = t.trim(), s = m ? "(\\d{2}):(\\d{2}):(\\d{2})" : "(\\d{2}):(\\d{2})", y = E.match(new RegExp(`^${s}$`));
49
+ if (!y)
46
50
  return null;
47
- const S = Number(A[1]), L = Number(A[2]), _ = I ? Number(A[3]) : 0;
48
- if (L > 59 || _ > 59 || S > 24 || S === 24 && (L > 0 || _ > 0))
51
+ const D = Number(y[1]), _ = Number(y[2]), b = m ? Number(y[3]) : 0;
52
+ if (_ > 59 || b > 59 || D > 24 || D === 24 && (_ > 0 || b > 0))
49
53
  return null;
50
- const V = [S, L, ...I ? [_] : []].map((i) => String(i).padStart(2, "0")).join(":");
54
+ const z = [D, _, ...m ? [b] : []].map((c) => String(c).padStart(2, "0")).join(":");
51
55
  return {
52
- dateValue: S === 24 ? O("00:00:00", G, !0).add(1, "day") : O(V, I ? G : J, !0),
53
- valueText: V
56
+ dateValue: D === 24 ? K("00:00:00", x, !0).add(1, "day") : K(z, m ? x : F, !0),
57
+ valueText: z
54
58
  };
55
- }, "parseTimePickerInput"), un = /* @__PURE__ */ u((r, I) => r.format(I ? G : J), "formatTimePickerDisplayInput"), De = /* @__PURE__ */ u((r, I) => {
56
- if (r) {
57
- if (typeof r == "function") {
58
- r(I);
59
+ }, "parseTimePickerInput"), sn = /* @__PURE__ */ a((t, m) => t.format(m ? x : F), "formatTimePickerDisplayInput"), Ae = /* @__PURE__ */ a((t) => (t == null ? void 0 : t.querySelector(pe)) ?? null, "getTimePickerFocusTarget"), Re = /* @__PURE__ */ a((t, m) => {
60
+ const E = m ? t.indexOf(" ") : -1, s = E >= 0 ? t.slice(0, E) : "", y = E >= 0 ? t.slice(E + 1) : t, [D, _, b] = y.split(":");
61
+ return {
62
+ hours: D || Z,
63
+ minutes: _ || Z,
64
+ seconds: b || Z,
65
+ meridiem: s || Z
66
+ };
67
+ }, "getTimePickerPlaceholderSections"), Se = /* @__PURE__ */ a((t, m) => {
68
+ if (t) {
69
+ if (typeof t == "function") {
70
+ t(m);
59
71
  return;
60
72
  }
61
- r.current = I;
73
+ t.current = m;
62
74
  }
63
- }, "assignInputRef"), qe = /* @__PURE__ */ u(({
64
- label: r,
65
- variant: I = "standard",
66
- sx: Q,
67
- value: d,
68
- format: A = J,
69
- useAmPm: S,
70
- placeholder: L,
71
- clearable: _ = !0,
72
- fullWidth: V,
73
- onChange: i,
74
- textFieldProps: t,
75
- localeText: On,
76
- open: on,
77
- onOpen: q,
78
- onClose: C,
79
- slots: Sn,
80
- slotProps: a,
75
+ }, "assignInputRef"), Xe = /* @__PURE__ */ a(({
76
+ label: t,
77
+ variant: m = "standard",
78
+ sx: E,
79
+ value: s,
80
+ format: y = F,
81
+ useAmPm: D,
82
+ placeholder: _,
83
+ clearable: b = !0,
84
+ fullWidth: z,
85
+ onChange: c,
86
+ textFieldProps: r,
87
+ localeText: Mn,
88
+ open: dn,
89
+ onOpen: $,
90
+ onClose: W,
91
+ slots: gn,
92
+ slotProps: i,
81
93
  ...l
82
94
  }) => {
83
- var En;
84
- const m = /s/i.test(A), T = m ? G : J, K = S ?? /a/i.test(A), _n = K ? m ? "A hh:mm:ss" : "A hh:mm" : T, Kn = l.closeOnSelect ?? !1, sn = {
95
+ var bn;
96
+ const I = /s/i.test(y), T = I ? x : F, A = D ?? /a/i.test(y), hn = A ? I ? "A hh:mm:ss" : "A hh:mm" : T, Kn = l.closeOnSelect ?? !1, ln = {
85
97
  minutes: 1,
86
98
  seconds: 1,
87
99
  ...l.timeSteps
88
- }, g = tn(
89
- () => m ? ["hours", "minutes", "seconds"] : ["hours", "minutes"],
90
- [m]
91
- ), ln = g.length - 1, Z = ce * (g.length + (K ? 1 : 0)), [gn, fn] = Y(!1), [h, hn] = Y(""), [dn, mn] = Y(!1), [Nn, N] = Y(null), $ = D(null), In = D(null), Tn = D(null), x = D(null), W = D(!1), X = D(!1), k = D(0), F = D(!1), { t: P, i18n: wn } = Fn(), Bn = (wn.resolvedLanguage ?? wn.language ?? "kr") === "kr" ? "ko" : "en", nn = {
92
- okButtonLabel: P("Button.확인"),
93
- clearButtonLabel: P("Button.초기화"),
94
- fieldHoursPlaceholder: /* @__PURE__ */ u(() => an, "fieldHoursPlaceholder"),
95
- fieldMinutesPlaceholder: /* @__PURE__ */ u(() => an, "fieldMinutesPlaceholder"),
96
- fieldMeridiemPlaceholder: /* @__PURE__ */ u(() => an, "fieldMeridiemPlaceholder"),
97
- ...On
98
- }, Ln = L ?? (K ? "–– ––:––" : "––:––"), Vn = [ke, Q, t == null ? void 0 : t.sx].filter(
100
+ }, N = J(
101
+ () => I ? ["hours", "minutes", "seconds"] : ["hours", "minutes"],
102
+ [I]
103
+ ), fn = N.length - 1, P = oe * (N.length + (A ? 1 : 0)), [Nn, mn] = Q(!1), [B, Bn] = Q(""), [In, Tn] = Q(!1), [Ln, L] = Q(null), j = O(null), wn = O(null), kn = O(null), nn = O(null), X = O(!1), v = O(!1), p = O(0), en = O(!1), { t: tn, i18n: yn } = Pn(), Vn = (yn.resolvedLanguage ?? yn.language ?? "kr") === "kr" ? "ko" : "en", rn = _ ?? (A ? "–– ––:––" : "––:––"), H = J(
104
+ () => Re(rn, A),
105
+ [rn, A]
106
+ ), an = {
107
+ okButtonLabel: tn("Button.확인"),
108
+ clearButtonLabel: tn("Button.초기화"),
109
+ fieldHoursPlaceholder: /* @__PURE__ */ a(() => H.hours, "fieldHoursPlaceholder"),
110
+ fieldMinutesPlaceholder: /* @__PURE__ */ a(() => H.minutes, "fieldMinutesPlaceholder"),
111
+ fieldSecondsPlaceholder: /* @__PURE__ */ a(() => H.seconds, "fieldSecondsPlaceholder"),
112
+ fieldMeridiemPlaceholder: /* @__PURE__ */ a(() => H.meridiem, "fieldMeridiemPlaceholder"),
113
+ ...Mn
114
+ }, zn = [Ee, E, r == null ? void 0 : r.sx].filter(
99
115
  Boolean
100
- ), zn = !!(!_ || l.disabled || l.readOnly), jn = !!i && _, z = on !== void 0, s = z ? on : gn, v = Ie(s), f = o((n) => {
101
- hn(n), mn(!1);
102
- }, []), b = o(() => {
116
+ ), jn = !!(!b || l.disabled || l.readOnly), Cn = !!c && b, C = dn !== void 0, d = C ? dn : Nn, Y = Te(d), f = u((n) => {
117
+ Bn(n), Tn(!1);
118
+ }, []), M = u(() => {
103
119
  var n;
104
- (n = x.current) == null || n.focus();
105
- }, []), R = tn(() => {
106
- if (!d)
120
+ (n = nn.current) == null || n.focus();
121
+ }, []), g = J(() => {
122
+ if (!s)
107
123
  return null;
108
- if (O.isDayjs(d))
109
- return d;
110
- if (typeof d == "string") {
111
- const e = cn(d, m);
124
+ if (K.isDayjs(s))
125
+ return s;
126
+ if (typeof s == "string") {
127
+ const e = un(s, I);
112
128
  if (e != null && e.dateValue.isValid())
113
129
  return e.dateValue;
114
- const c = O(d, T, !0);
115
- return c.isValid() ? c : null;
130
+ const o = K(s, T, !0);
131
+ return o.isValid() ? o : null;
116
132
  }
117
- const n = O(d);
133
+ const n = K(s);
118
134
  return n.isValid() ? n : null;
119
- }, [m, T, d]), B = tn(() => {
120
- if (!d)
135
+ }, [I, T, s]), V = J(() => {
136
+ if (!s)
121
137
  return "";
122
- if (typeof d == "string") {
123
- const e = O(d, T, !0);
124
- return e.isValid() ? un(e, m) : d;
138
+ if (typeof s == "string") {
139
+ const e = K(s, T, !0);
140
+ return e.isValid() ? sn(e, I) : s;
125
141
  }
126
- const n = O(d);
127
- return n.isValid() ? un(n, m) : "";
128
- }, [m, T, d]), Un = /* @__PURE__ */ u((n) => {
142
+ const n = K(s);
143
+ return n.isValid() ? sn(n, I) : "";
144
+ }, [I, T, s]), Un = /* @__PURE__ */ a((n) => {
129
145
  const e = n != null && n.isValid() ? n.format(T) : void 0;
130
146
  f(
131
- n != null && n.isValid() ? un(n, m) : ""
132
- ), i == null || i(e);
133
- }, "handleChange"), M = o(
147
+ n != null && n.isValid() ? sn(n, I) : ""
148
+ ), c == null || c(e);
149
+ }, "handleChange"), h = u(
134
150
  (n) => {
135
- if (!h)
136
- return f(""), i == null || i(""), !0;
137
- const e = cn(h, m);
138
- return e != null && e.dateValue.isValid() ? (f(e.valueText), i == null || i(e.valueText), !0) : (n && h && mn(!0), !1);
151
+ if (!B)
152
+ return f(""), c == null || c(""), !0;
153
+ const e = un(B, I);
154
+ return e != null && e.dateValue.isValid() ? (f(e.valueText), c == null || c(e.valueText), !0) : (n && B && Tn(!0), !1);
139
155
  },
140
- [m, h, i, f]
141
- ), p = o(() => {
142
- if (X.current || Date.now() < k.current) {
143
- X.current = !1;
156
+ [I, B, c, f]
157
+ ), R = u(() => {
158
+ if (v.current || Date.now() < p.current) {
159
+ v.current = !1;
144
160
  return;
145
161
  }
146
- z || fn(!0), f(B), N(R), q == null || q();
147
- }, [z, q, B, R, f]), y = o(() => {
148
- z || fn(!1), C == null || C();
149
- }, [z, C]), E = o(() => {
150
- M(), y();
151
- }, [y, M]), yn = o(() => {
152
- k.current = Date.now() + 200, E();
153
- }, [E]), kn = o(() => {
154
- k.current = Date.now() + 200, y();
155
- }, [y]), H = o((n) => {
156
- const e = $.current;
162
+ C || mn(!0), f(V), L(g), $ == null || $();
163
+ }, [C, $, V, g, f]), k = u(() => {
164
+ C || mn(!1), W == null || W();
165
+ }, [C, W]), S = u(() => {
166
+ h(), k();
167
+ }, [k, h]), pn = u(() => {
168
+ p.current = Date.now() + 200, S();
169
+ }, [S]), En = u(() => {
170
+ p.current = Date.now() + 200, k();
171
+ }, [k]), G = u((n) => {
172
+ const e = j.current;
157
173
  e && window.requestAnimationFrame(() => {
158
- var c;
159
- (c = Te(e, n)) == null || c.focus();
174
+ var o;
175
+ (o = we(e, n)) == null || o.focus();
160
176
  });
161
- }, []), j = o(() => {
177
+ }, []), U = u(() => {
162
178
  window.requestAnimationFrame(() => {
163
179
  var n;
164
- (n = Tn.current) == null || n.focus();
180
+ (n = Ae(j.current) ?? kn.current) == null || n.focus();
165
181
  });
166
- }, []), qn = o(
182
+ }, []), qn = u(
167
183
  (n) => {
168
- Tn.current = n, De(t == null ? void 0 : t.inputRef, n);
184
+ kn.current = n, Se(r == null ? void 0 : r.inputRef, n);
169
185
  },
170
- [t == null ? void 0 : t.inputRef]
171
- ), Cn = o(
186
+ [r == null ? void 0 : r.inputRef]
187
+ ), $n = u(
172
188
  (n) => {
173
- x.current = n, !(!n || !s) && (window.requestAnimationFrame(() => {
174
- b();
189
+ nn.current = n, !(!n || !d) && (window.requestAnimationFrame(() => {
190
+ M();
175
191
  }), window.setTimeout(() => {
176
- b();
192
+ M();
177
193
  }));
178
194
  },
179
- [b, s]
180
- ), $n = /* @__PURE__ */ u(() => {
181
- i == null || i(""), f("");
182
- }, "handleClear"), Wn = o(
195
+ [M, d]
196
+ ), Wn = /* @__PURE__ */ a(() => {
197
+ c == null || c(""), f("");
198
+ }, "handleClear"), Xn = u(
183
199
  (n) => {
184
- const e = n.target.value, c = cn(e, m);
185
- f(e), c != null && c.dateValue.isValid() && N(c.dateValue);
200
+ const e = n.target.value, o = un(e, I);
201
+ f(e), o != null && o.dateValue.isValid() && L(o.dateValue);
186
202
  },
187
- [m, f]
188
- ), pn = o(
203
+ [I, f]
204
+ ), Dn = u(
189
205
  (n) => {
190
206
  n.stopPropagation(), n.nativeEvent.stopImmediatePropagation();
191
207
  },
192
208
  []
193
- ), Xn = o(
209
+ ), vn = u(
194
210
  (n) => {
195
- if (pn(n), n.key === "Escape") {
196
- n.preventDefault(), k.current = Date.now() + 200, f(B), N(R), y(), j();
211
+ if (Dn(n), n.key === "Escape") {
212
+ n.preventDefault(), p.current = Date.now() + 200, f(V), L(g), k(), U();
197
213
  return;
198
214
  }
199
215
  if (n.key === "Tab") {
200
- if (n.preventDefault(), !M(!0))
216
+ if (n.preventDefault(), !h(!0))
201
217
  return;
202
- k.current = Date.now() + 200, y(), H(n.shiftKey);
218
+ p.current = Date.now() + 200, k(), G(n.shiftKey);
203
219
  return;
204
220
  }
205
- n.key === "Enter" && (n.preventDefault(), M(!0) && (k.current = Date.now() + 200, y(), j()));
221
+ n.key === "Enter" && (n.preventDefault(), h(!0) && (p.current = Date.now() + 200, k(), U()));
206
222
  },
207
223
  [
208
- y,
209
- M,
210
- H,
211
- j,
212
- B,
213
- R,
224
+ k,
225
+ h,
226
+ G,
227
+ U,
228
+ V,
229
+ g,
214
230
  f,
215
- pn
231
+ Dn
216
232
  ]
217
- ), vn = o(
233
+ ), Hn = u(
218
234
  (n) => {
219
- n.stopPropagation(), n.key === "Tab" && (n.preventDefault(), M(!0) && (k.current = Date.now() + 200, y(), H(n.shiftKey)));
235
+ n.stopPropagation(), n.key === "Tab" && (n.preventDefault(), h(!0) && (p.current = Date.now() + 200, k(), G(n.shiftKey)));
220
236
  },
221
- [y, M, H]
222
- ), Hn = o(
237
+ [k, h, G]
238
+ ), Yn = u(
223
239
  (n) => {
224
240
  var e;
225
- n.preventDefault(), n.stopPropagation(), i == null || i(""), f(""), N(null), (e = x.current) == null || e.focus();
241
+ n.preventDefault(), n.stopPropagation(), c == null || c(""), f(""), L(null), (e = nn.current) == null || e.focus();
226
242
  },
227
- [i, f]
228
- ), Yn = o(
243
+ [c, f]
244
+ ), Gn = u(
229
245
  (n, e) => {
230
246
  if (!(n != null && n.isValid()))
231
247
  return;
232
- const c = n.format(T);
233
- N(n), f(c), e === g[ln] && (k.current = Date.now() + 200, i == null || i(c), kn(), j());
248
+ const o = n.format(T);
249
+ L(n), f(o), e === N[fn] && (p.current = Date.now() + 200, c == null || c(o), En(), U());
234
250
  },
235
251
  [
236
- ln,
237
- kn,
238
- j,
252
+ fn,
253
+ En,
254
+ U,
239
255
  T,
240
- i,
256
+ c,
241
257
  f,
242
- g
258
+ N
243
259
  ]
244
- ), Gn = o(
260
+ ), Jn = u(
245
261
  (n) => {
246
262
  var e;
247
- (e = t == null ? void 0 : t.onMouseDown) == null || e.call(t, n), W.current = !0;
263
+ (e = r == null ? void 0 : r.onMouseDown) == null || e.call(r, n), X.current = !0;
248
264
  },
249
- [t]
250
- ), Jn = o(
265
+ [r]
266
+ ), Qn = u(
251
267
  (n) => {
252
268
  var e;
253
- (e = t == null ? void 0 : t.onFocus) == null || e.call(t, n), !(n.defaultPrevented || l.disabled || l.readOnly || s) && (F.current = W.current, p());
269
+ (e = r == null ? void 0 : r.onFocus) == null || e.call(r, n), !(n.defaultPrevented || l.disabled || l.readOnly || d) && (en.current = X.current, R());
254
270
  },
255
- [p, s, t, l.disabled, l.readOnly]
256
- ), Qn = o(
271
+ [R, d, r, l.disabled, l.readOnly]
272
+ ), Zn = u(
257
273
  (n) => {
258
274
  var e;
259
- if ((e = t == null ? void 0 : t.onClick) == null || e.call(t, n), !(n.defaultPrevented || l.disabled || l.readOnly)) {
260
- if (F.current) {
261
- F.current = !1, W.current = !1;
275
+ if ((e = r == null ? void 0 : r.onClick) == null || e.call(r, n), !(n.defaultPrevented || l.disabled || l.readOnly)) {
276
+ if (en.current) {
277
+ en.current = !1, X.current = !1;
262
278
  return;
263
279
  }
264
- if (W.current = !1, s) {
265
- X.current = !0, E(), queueMicrotask(() => {
266
- X.current = !1;
280
+ if (X.current = !1, d) {
281
+ v.current = !0, S(), queueMicrotask(() => {
282
+ v.current = !1;
267
283
  });
268
284
  return;
269
285
  }
270
- p();
286
+ R();
271
287
  }
272
288
  },
273
289
  [
274
- E,
275
- p,
276
- s,
277
- t,
290
+ S,
291
+ R,
292
+ d,
293
+ r,
278
294
  l.disabled,
279
295
  l.readOnly
280
296
  ]
281
- ), Zn = o(
297
+ ), xn = u(
282
298
  (n) => {
283
299
  var e;
284
- if ((e = t == null ? void 0 : t.onKeyDown) == null || e.call(t, n), !(n.defaultPrevented || l.disabled || l.readOnly)) {
285
- if (!s && Ee(n)) {
286
- n.preventDefault(), p();
300
+ if ((e = r == null ? void 0 : r.onKeyDown) == null || e.call(r, n), !(n.defaultPrevented || l.disabled || l.readOnly)) {
301
+ if (!d && be(n)) {
302
+ n.preventDefault(), R();
287
303
  return;
288
304
  }
289
- if (s && n.key === "Tab") {
290
- k.current = Date.now() + 200, E();
305
+ if (d && n.key === "Tab") {
306
+ p.current = Date.now() + 200, S();
291
307
  return;
292
308
  }
293
- !s || !pe(n) || E();
309
+ !d || !De(n) || S();
294
310
  }
295
311
  },
296
312
  [
297
- E,
298
- p,
299
- s,
300
- t,
313
+ S,
314
+ R,
315
+ d,
316
+ r,
301
317
  l.disabled,
302
318
  l.readOnly
303
319
  ]
304
320
  );
305
- return rn(() => {
306
- s && (f(B), N(R));
307
- }, [s, B, R, f]), rn(() => {
308
- if (!s || v.state !== "open")
321
+ return on(() => {
322
+ d && (f(V), L(g));
323
+ }, [d, V, g, f]), on(() => {
324
+ if (!d || Y.state !== "open")
309
325
  return;
310
326
  const n = window.requestAnimationFrame(() => {
311
- b();
327
+ M();
312
328
  }), e = window.setTimeout(() => {
313
- b();
314
- }), c = window.setTimeout(() => {
315
- b();
316
- }, Mn);
329
+ M();
330
+ }), o = window.setTimeout(() => {
331
+ M();
332
+ }, _n);
317
333
  return () => {
318
- window.cancelAnimationFrame(n), window.clearTimeout(e), window.clearTimeout(c);
334
+ window.cancelAnimationFrame(n), window.clearTimeout(e), window.clearTimeout(o);
319
335
  };
320
- }, [b, s, v.state]), rn(() => {
321
- if (!s)
336
+ }, [M, d, Y.state]), on(() => {
337
+ if (!d)
322
338
  return;
323
- const n = /* @__PURE__ */ u((e) => {
324
- var U, Dn;
325
- const c = e.target;
326
- c instanceof Node && ((U = $.current) != null && U.contains(c) || (Dn = In.current) != null && Dn.contains(c) || yn());
339
+ const n = /* @__PURE__ */ a((e) => {
340
+ var q, An;
341
+ const o = e.target;
342
+ o instanceof Node && ((q = j.current) != null && q.contains(o) || (An = wn.current) != null && An.contains(o) || pn());
327
343
  }, "handleDocumentMouseDown");
328
344
  return document.addEventListener("mousedown", n, !0), () => {
329
345
  document.removeEventListener("mousedown", n, !0);
330
346
  };
331
- }, [yn, s]), /* @__PURE__ */ w(re, { dateAdapter: ae, adapterLocale: Bn, children: /* @__PURE__ */ en("div", { ref: $, children: [
347
+ }, [pn, d]), /* @__PURE__ */ w(ie, { dateAdapter: ae, adapterLocale: Vn, children: /* @__PURE__ */ cn("div", { ref: j, children: [
332
348
  /* @__PURE__ */ w(
333
- ee,
349
+ te,
334
350
  {
335
351
  ...l,
336
- enableAccessibleFieldDOMStructure: !1,
337
- ampm: K,
352
+ ampm: A,
338
353
  open: !1,
339
354
  closeOnSelect: Kn,
340
- timeSteps: sn,
341
- label: r,
342
- value: R,
343
- views: g,
344
- format: _n,
345
- localeText: nn,
355
+ timeSteps: ln,
356
+ label: t,
357
+ value: g,
358
+ views: N,
359
+ format: hn,
360
+ localeText: an,
346
361
  onChange: Un,
347
- onOpen: p,
348
- onClose: E,
362
+ onOpen: R,
363
+ onClose: S,
349
364
  slots: {
350
- ...Sn,
351
- inputAdornment: /* @__PURE__ */ u(({ position: n, children: e, ...c }) => /* @__PURE__ */ en(bn, { position: n, ...c, children: [
352
- n === "end" && jn && /* @__PURE__ */ w(
353
- Rn,
365
+ ...gn,
366
+ inputAdornment: /* @__PURE__ */ a(({ position: n, children: e, ...o }) => /* @__PURE__ */ cn(Sn, { position: n, ...o, children: [
367
+ n === "end" && Cn && /* @__PURE__ */ w(
368
+ On,
354
369
  {
355
370
  className: "clearButton",
356
371
  size: "small",
357
372
  tabIndex: -1,
358
- "aria-label": nn.clearButtonLabel,
359
- disabled: zn,
360
- onClick: /* @__PURE__ */ u((U) => {
361
- U.preventDefault(), U.stopPropagation(), $n();
373
+ "aria-label": an.clearButtonLabel,
374
+ disabled: jn,
375
+ onClick: /* @__PURE__ */ a((q) => {
376
+ q.preventDefault(), q.stopPropagation(), Wn();
362
377
  }, "onClick"),
363
- children: /* @__PURE__ */ w(An, { fontSize: "small" })
378
+ children: /* @__PURE__ */ w(Rn, { fontSize: "small" })
364
379
  }
365
380
  ),
366
381
  e
367
382
  ] }), "TimePickerInputAdornment")
368
383
  },
369
384
  slotProps: {
370
- ...a,
385
+ ...i,
371
386
  openPickerButton: {
372
- ...typeof (a == null ? void 0 : a.openPickerButton) == "function" || a == null ? void 0 : a.openPickerButton,
387
+ ...typeof (i == null ? void 0 : i.openPickerButton) == "function" || i == null ? void 0 : i.openPickerButton,
373
388
  size: "small",
374
389
  tabIndex: -1,
375
- onClick: /* @__PURE__ */ u((n) => {
376
- n.preventDefault(), n.stopPropagation(), s || p();
390
+ onClick: /* @__PURE__ */ a((n) => {
391
+ n.preventDefault(), n.stopPropagation(), d || R();
377
392
  }, "onClick"),
378
393
  sx: {
379
394
  margin: 0,
@@ -381,44 +396,44 @@ const an = "––", ke = {
381
396
  }
382
397
  },
383
398
  openPickerIcon: {
384
- ...typeof (a == null ? void 0 : a.openPickerIcon) == "function" || a == null ? void 0 : a.openPickerIcon,
399
+ ...typeof (i == null ? void 0 : i.openPickerIcon) == "function" || i == null ? void 0 : i.openPickerIcon,
385
400
  fontSize: "small"
386
401
  },
387
402
  inputAdornment: {
388
- ...typeof (a == null ? void 0 : a.inputAdornment) == "function" || a == null ? void 0 : a.inputAdornment,
403
+ ...typeof (i == null ? void 0 : i.inputAdornment) == "function" || i == null ? void 0 : i.inputAdornment,
389
404
  sx: {
390
405
  marginBottom: 0,
391
406
  marginLeft: 0,
392
407
  gap: 0,
393
- ...typeof (a == null ? void 0 : a.inputAdornment) == "function" || (En = a == null ? void 0 : a.inputAdornment) == null ? void 0 : En.sx
408
+ ...typeof (i == null ? void 0 : i.inputAdornment) == "function" || (bn = i == null ? void 0 : i.inputAdornment) == null ? void 0 : bn.sx
394
409
  }
395
410
  },
396
411
  textField: {
397
- variant: I,
398
- fullWidth: V,
399
- ...t,
400
- className: ie(
401
- !V && (K ? "w-[160px]" : "w-[140px]"),
402
- t == null ? void 0 : t.className
412
+ variant: m,
413
+ fullWidth: z,
414
+ ...r,
415
+ className: ce(
416
+ !z && (A ? "w-[160px]" : "w-[140px]"),
417
+ r == null ? void 0 : r.className
403
418
  ),
404
- onMouseDown: Gn,
405
- onFocus: Jn,
406
- onClick: Qn,
407
- onKeyDown: Zn,
419
+ onMouseDown: Jn,
420
+ onFocus: Qn,
421
+ onClick: Zn,
422
+ onKeyDown: xn,
408
423
  inputRef: qn,
409
- placeholder: Ln,
410
- sx: Vn
424
+ placeholder: rn,
425
+ sx: zn
411
426
  }
412
427
  }
413
428
  }
414
429
  ),
415
- v.shouldRender && /* @__PURE__ */ w(
416
- Pn,
430
+ Y.shouldRender && /* @__PURE__ */ w(
431
+ ne,
417
432
  {
418
433
  open: !0,
419
- anchorEl: $.current,
434
+ anchorEl: j.current,
420
435
  placement: "bottom-end",
421
- ref: In,
436
+ ref: wn,
422
437
  modifiers: [
423
438
  {
424
439
  name: "offset",
@@ -427,96 +442,96 @@ const an = "––", ke = {
427
442
  }
428
443
  }
429
444
  ],
430
- sx: { zIndex: /* @__PURE__ */ u((n) => n.zIndex.modal, "zIndex") },
445
+ sx: { zIndex: /* @__PURE__ */ a((n) => n.zIndex.modal, "zIndex") },
431
446
  children: /* @__PURE__ */ w(
432
447
  "div",
433
448
  {
434
449
  className: "owp-animated-picker-popper",
435
- "data-state": v.state,
450
+ "data-state": Y.state,
436
451
  style: {
437
- "--owp-calendar-transition-duration": `${Mn}ms`,
438
- "--owp-calendar-transform-transition-duration": `${oe}ms`,
452
+ "--owp-calendar-transition-duration": `${_n}ms`,
453
+ "--owp-calendar-transform-transition-duration": `${se}ms`,
439
454
  "--owp-calendar-exit-transform-delay": `${ue}ms`
440
455
  },
441
- children: /* @__PURE__ */ en(
442
- ne,
456
+ children: /* @__PURE__ */ cn(
457
+ ee,
443
458
  {
444
459
  elevation: 8,
445
- onClick: /* @__PURE__ */ u((n) => {
460
+ onClick: /* @__PURE__ */ a((n) => {
446
461
  n.stopPropagation();
447
462
  }, "onClick"),
448
- onKeyDown: vn,
449
- onKeyUp: /* @__PURE__ */ u((n) => {
463
+ onKeyDown: Hn,
464
+ onKeyUp: /* @__PURE__ */ a((n) => {
450
465
  n.stopPropagation();
451
466
  }, "onKeyUp"),
452
- onMouseDown: /* @__PURE__ */ u((n) => {
467
+ onMouseDown: /* @__PURE__ */ a((n) => {
453
468
  n.stopPropagation();
454
469
  }, "onMouseDown"),
455
- sx: fe(Z),
470
+ sx: fe(P),
456
471
  children: [
457
472
  /* @__PURE__ */ w(
458
473
  ye,
459
474
  {
460
475
  autoFocus: !0,
461
- inputRef: Cn,
476
+ inputRef: $n,
462
477
  fullWidth: !0,
463
478
  size: "small",
464
479
  variant: "outlined",
465
- value: h,
466
- error: dn,
467
- helperText: dn ? P(se) : void 0,
468
- mask: we(T),
480
+ value: B,
481
+ error: In,
482
+ helperText: In ? tn(de) : void 0,
483
+ mask: ke(T),
469
484
  placeholder: T,
470
- onChange: Wn,
471
- onKeyDown: Xn,
485
+ onChange: Xn,
486
+ onKeyDown: vn,
472
487
  inputProps: {
473
488
  inputMode: "numeric",
474
489
  "aria-label": T
475
490
  },
476
491
  endAdornment: /* @__PURE__ */ w(
477
- bn,
492
+ Sn,
478
493
  {
479
494
  position: "end",
480
495
  sx: {
481
496
  marginLeft: 0
482
497
  },
483
498
  children: /* @__PURE__ */ w(
484
- Rn,
499
+ On,
485
500
  {
486
501
  size: "small",
487
502
  tabIndex: -1,
488
- "aria-label": nn.clearButtonLabel,
489
- disabled: !h,
490
- onClick: Hn,
491
- onMouseDown: /* @__PURE__ */ u((n) => {
503
+ "aria-label": an.clearButtonLabel,
504
+ disabled: !B,
505
+ onClick: Yn,
506
+ onMouseDown: /* @__PURE__ */ a((n) => {
492
507
  n.preventDefault(), n.stopPropagation();
493
508
  }, "onMouseDown"),
494
509
  sx: {
495
510
  margin: 0,
496
511
  padding: 0.25
497
512
  },
498
- children: /* @__PURE__ */ w(An, { fontSize: "small" })
513
+ children: /* @__PURE__ */ w(Rn, { fontSize: "small" })
499
514
  }
500
515
  )
501
516
  }
502
517
  ),
503
- sx: de(Z)
518
+ sx: me(P)
504
519
  }
505
520
  ),
506
521
  /* @__PURE__ */ w(
507
- te,
522
+ re,
508
523
  {
509
- ampm: K,
510
- value: Nn,
511
- views: g,
512
- onChange: /* @__PURE__ */ u((n, e, c) => Yn(n, c), "onChange"),
513
- timeSteps: sn,
524
+ ampm: A,
525
+ value: Ln,
526
+ views: N,
527
+ onChange: /* @__PURE__ */ a((n, e, o) => Gn(n, o), "onChange"),
528
+ timeSteps: ln,
514
529
  slotProps: {
515
530
  digitalClockSectionItem: {
516
531
  sx: le
517
532
  }
518
533
  },
519
- sx: me(Z)
534
+ sx: Ie(P)
520
535
  }
521
536
  )
522
537
  ]
@@ -529,6 +544,6 @@ const an = "––", ke = {
529
544
  ] }) });
530
545
  }, "OwpTimePicker");
531
546
  export {
532
- qe as OwpTimePicker
547
+ Xe as OwpTimePicker
533
548
  };
534
549
  //# sourceMappingURL=OwpTimePicker.js.map