@owp/core 2.5.20 → 2.5.21

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