@progress/kendo-react-dateinputs 13.4.0-develop.4 → 14.0.0-develop.1

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.
@@ -5,114 +5,114 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import * as n from "react";
9
- import e from "prop-types";
10
- import { Popup as ut } from "@progress/kendo-react-popup";
11
- import { cloneDate as ie, getDate as st } from "@progress/kendo-date-math";
12
- import { createPropsContext as ct, useId as dt, useAdaptiveModeContext as ft, usePropsContext as mt, canUseDOM as le, AsyncFocusBlur as pt, classNames as ue, kendoThemeMaps as se, Keys as O } from "@progress/kendo-react-common";
13
- import { calendarIcon as gt } from "@progress/kendo-svg-icons";
14
- import { DateInput as ht } from "../dateinput/DateInput.mjs";
15
- import { Calendar as vt } from "../calendar/components/Calendar.mjs";
16
- import { MIN_DATE as bt, MAX_DATE as wt, isInDateRange as yt, setTime as Ct, nullable as r } from "../utils.mjs";
17
- import { toggleCalendar as ce, messages as Dt } from "../messages/index.mjs";
18
- import { useLocalization as Ot } from "@progress/kendo-react-intl";
19
- import { ToggleButton as kt } from "./ToggleButton.mjs";
20
- import { PickerFloatingLabel as Mt } from "../hooks/usePickerFloatingLabel.mjs";
21
- import { ActionSheetContent as Pt } from "@progress/kendo-react-layout";
22
- import { AdaptiveMode as Rt } from "../common/AdaptiveMode.mjs";
23
- const de = n.forwardRef((a, fe) => {
24
- const L = dt(a.id), me = Ot(), h = ft(), {
25
- defaultShow: pe = i.defaultShow,
26
- defaultValue: ge = i.defaultValue,
27
- dateInput: he = i.dateInput,
28
- calendar: ve = i.calendar,
29
- toggleButton: be = i.toggleButton,
30
- popup: we = i.popup,
31
- disabled: v = i.disabled,
32
- format: ye = i.format,
33
- max: R = i.max,
34
- min: _ = i.min,
35
- popupSettings: b = i.popupSettings,
36
- tabIndex: Ce = i.tabIndex,
37
- weekNumber: De = i.weekNumber,
38
- validityStyles: K = i.validityStyles,
8
+ import * as o from "react";
9
+ import t from "prop-types";
10
+ import { Popup as dt } from "@progress/kendo-react-popup";
11
+ import { cloneDate as le, getDate as ft } from "@progress/kendo-date-math";
12
+ import { createPropsContext as mt, useId as pt, useAdaptiveModeContext as gt, usePropsContext as ht, useKendoPaste as vt, canUseDOM as ue, AsyncFocusBlur as bt, classNames as se, kendoThemeMaps as ce, Keys as k } from "@progress/kendo-react-common";
13
+ import { calendarIcon as wt } from "@progress/kendo-svg-icons";
14
+ import { DateInput as yt } from "../dateinput/DateInput.mjs";
15
+ import { Calendar as Ct } from "../calendar/components/Calendar.mjs";
16
+ import { MIN_DATE as Dt, MAX_DATE as Ot, isInDateRange as de, setTime as Pt, nullable as r } from "../utils.mjs";
17
+ import { toggleCalendar as fe, messages as kt } from "../messages/index.mjs";
18
+ import { useLocalization as Mt } from "@progress/kendo-react-intl";
19
+ import { ToggleButton as Rt } from "./ToggleButton.mjs";
20
+ import { PickerFloatingLabel as St } from "../hooks/usePickerFloatingLabel.mjs";
21
+ import { ActionSheetContent as _t } from "@progress/kendo-react-layout";
22
+ import { AdaptiveMode as It } from "../common/AdaptiveMode.mjs";
23
+ const me = o.forwardRef((a, pe) => {
24
+ const _ = pt(a.id), ge = Mt(), b = gt(), {
25
+ defaultShow: he = i.defaultShow,
26
+ defaultValue: ve = i.defaultValue,
27
+ dateInput: be = i.dateInput,
28
+ calendar: we = i.calendar,
29
+ toggleButton: ye = i.toggleButton,
30
+ popup: Ce = i.popup,
31
+ disabled: m = i.disabled,
32
+ format: De = i.format,
33
+ max: w = i.max,
34
+ min: y = i.min,
35
+ popupSettings: C = i.popupSettings,
36
+ tabIndex: Oe = i.tabIndex,
37
+ weekNumber: Pe = i.weekNumber,
38
+ validityStyles: q = i.validityStyles,
39
39
  size: I = i.size,
40
- rounded: S = i.rounded,
41
- fillMode: E = i.fillMode,
42
- autoFocus: Oe = i.autoFocus,
43
- show: q,
44
- autoSwitchParts: ke,
45
- autoSwitchKeys: Me,
46
- twoDigitYearMax: Pe,
47
- ariaLabel: Re,
48
- adaptive: It,
49
- adaptiveTitle: _e = a.label || void 0,
50
- adaptiveSubtitle: Ie,
51
- formatPlaceholder: Se,
52
- inputAttributes: Ee,
53
- validationMessage: W,
54
- visited: St,
55
- value: B,
56
- touched: Et,
57
- modified: Bt,
58
- _adaptiveMode: xt = h,
59
- valid: H,
60
- focusedDate: Be,
61
- id: xe,
62
- ariaLabelledBy: Te,
63
- ariaDescribedBy: Ae,
40
+ rounded: E = i.rounded,
41
+ fillMode: B = i.fillMode,
42
+ autoFocus: ke = i.autoFocus,
43
+ show: W,
44
+ autoSwitchParts: Me,
45
+ autoSwitchKeys: Re,
46
+ twoDigitYearMax: Se,
47
+ ariaLabel: _e,
48
+ adaptive: Bt,
49
+ adaptiveTitle: Ie = a.label || void 0,
50
+ adaptiveSubtitle: Ee,
51
+ formatPlaceholder: Be,
52
+ inputAttributes: Te,
53
+ validationMessage: H,
54
+ visited: Tt,
55
+ value: T,
56
+ touched: xt,
57
+ modified: Nt,
58
+ _adaptiveMode: At = b,
59
+ valid: U,
60
+ focusedDate: xe,
61
+ id: Ne,
62
+ ariaLabelledBy: Ae,
63
+ ariaDescribedBy: Fe,
64
64
  placeholder: Ve,
65
- onChange: U,
66
- onOpen: Y,
67
- onClose: $,
68
- ...j
69
- } = mt(_t, a), x = () => {
70
- if (le)
71
- return y.current && y.current.ownerDocument || window.document;
72
- }, u = () => !!(g.windowWidth && h && g.windowWidth <= (h == null ? void 0 : h.medium) && a.adaptive), f = () => {
73
- const t = k.current !== void 0 ? k.current : B !== void 0 ? B : g.value;
74
- return t !== null ? ie(t) : null;
75
- }, l = () => M.current !== void 0 ? M.current : q !== void 0 ? q : g.show, Fe = () => he || i.dateInput, Ne = () => be || i.toggleButton, ze = () => ve || i.calendar, Le = () => we || i.popup, X = () => a.required !== void 0 ? a.required : !1, T = () => {
76
- const t = f() || B || null, o = _, s = R, P = yt(t, o, s), F = W !== void 0, N = (!X() || t != null) && P, z = H !== void 0 ? H : N;
65
+ onChange: Y,
66
+ onOpen: $,
67
+ onClose: j,
68
+ ...X
69
+ } = ht(Et, a), x = () => {
70
+ if (ue)
71
+ return d.current && d.current.ownerDocument || window.document;
72
+ }, s = () => !!(v.windowWidth && b && v.windowWidth <= (b == null ? void 0 : b.medium) && a.adaptive), p = () => {
73
+ const e = M.current !== void 0 ? M.current : T !== void 0 ? T : v.value;
74
+ return e !== null ? le(e) : null;
75
+ }, l = () => R.current !== void 0 ? R.current : W !== void 0 ? W : v.show, ze = () => be || i.dateInput, Le = () => ye || i.toggleButton, Ke = () => we || i.calendar, qe = () => Ce || i.popup, Z = () => a.required !== void 0 ? a.required : !1, N = () => {
76
+ const e = p() || T || null, n = y, u = w, S = de(e, n, u), z = H !== void 0, L = (!Z() || e != null) && S, K = U !== void 0 ? U : L;
77
77
  return {
78
- customError: F,
79
- rangeOverflow: t && s.getTime() < t.getTime() || !1,
80
- rangeUnderflow: t && t.getTime() < o.getTime() || !1,
81
- valid: z,
82
- valueMissing: t === null
78
+ customError: z,
79
+ rangeOverflow: e && u.getTime() < e.getTime() || !1,
80
+ rangeUnderflow: e && e.getTime() < n.getTime() || !1,
81
+ valid: K,
82
+ valueMissing: e === null
83
83
  };
84
- }, Ke = (t) => {
85
- for (const o of t)
86
- D({ windowWidth: o.target.clientWidth });
87
- }, qe = () => {
84
+ }, We = (e) => {
85
+ for (const n of e)
86
+ P({ windowWidth: n.target.clientWidth });
87
+ }, He = () => {
88
88
  c.current && c.current.focus();
89
- }, Z = (t) => {
90
- d.current = t;
91
- }, m = (t) => {
92
- l() !== t && (D({ show: t }), t && Y && Y({ target: w.current }), !t && $ && $({ target: w.current }));
93
- }, We = (t) => {
94
- const o = f();
95
- return o && t ? Ct(t, o) : t;
96
- }, He = (t) => {
97
- b != null && b.onMouseDownOutside && b.onMouseDownOutside(t);
98
- }, G = (t, o) => {
99
- D({ value: ie(t || void 0) }), k.current = t, M.current = !1, u() || (p.current = !0), U && U({
100
- syntheticEvent: o.syntheticEvent,
101
- nativeEvent: o.nativeEvent,
102
- value: f(),
89
+ }, G = (e) => {
90
+ f.current = e;
91
+ }, g = (e) => {
92
+ l() !== e && (P({ show: e }), e && $ && $({ target: D.current }), !e && j && j({ target: D.current }));
93
+ }, Ue = (e) => {
94
+ const n = p();
95
+ return n && e ? Pt(e, n) : e;
96
+ }, Ye = (e) => {
97
+ C != null && C.onMouseDownOutside && C.onMouseDownOutside(e);
98
+ }, A = (e, n) => {
99
+ P({ value: le(e || void 0) }), M.current = e, R.current = !1, s() || (h.current = !0), Y && Y({
100
+ syntheticEvent: n.syntheticEvent,
101
+ nativeEvent: n.nativeEvent,
102
+ value: p(),
103
103
  show: l(),
104
- target: w.current
105
- }), k.current = void 0, M.current = void 0, m(!1);
106
- }, Ue = (t) => {
107
- const o = We(t.value);
108
- G(o, t);
104
+ target: D.current
105
+ }), M.current = void 0, R.current = void 0, g(!1);
106
+ }, $e = (e) => {
107
+ const n = Ue(e.value);
108
+ A(n, e);
109
109
  }, J = () => {
110
- const { popupClass: t, ...o } = b, s = l(), P = f(), F = P && st(P), N = ue(t), z = {
110
+ const { popupClass: e, ...n } = C, u = l(), S = p(), z = S && ft(S), L = se(e), K = {
111
111
  popupClass: "k-datepicker-popup",
112
- show: s,
113
- anchor: y.current,
114
- className: N,
115
- id: ee,
112
+ show: u,
113
+ anchor: d.current,
114
+ className: L,
115
+ id: te,
116
116
  anchorAlign: {
117
117
  horizontal: "left",
118
118
  vertical: "bottom"
@@ -121,58 +121,58 @@ const de = n.forwardRef((a, fe) => {
121
121
  horizontal: "left",
122
122
  vertical: "top"
123
123
  },
124
- ...o,
125
- onMouseDownOutside: He
126
- }, re = {
127
- disabled: v,
128
- value: F,
129
- min: _,
130
- max: R,
131
- weekNumber: De,
132
- focusedDate: Be,
133
- className: u() ? "k-calendar-lg" : "",
134
- navigation: !u(),
135
- onChange: Ue
136
- }, ae = ze(), lt = Le();
137
- return u() ? /* @__PURE__ */ n.createElement(ae, { _ref: Z, ...re }) : /* @__PURE__ */ n.createElement(lt, { ...z }, /* @__PURE__ */ n.createElement(ae, { _ref: Z, ...re }));
124
+ ...n,
125
+ onMouseDownOutside: Ye
126
+ }, ae = {
127
+ disabled: m,
128
+ value: z,
129
+ min: y,
130
+ max: w,
131
+ weekNumber: Pe,
132
+ focusedDate: xe,
133
+ className: s() ? "k-calendar-lg" : "",
134
+ navigation: !s(),
135
+ onChange: $e
136
+ }, ie = Ke(), ct = qe();
137
+ return s() ? /* @__PURE__ */ o.createElement(ie, { _ref: G, ...ae }) : /* @__PURE__ */ o.createElement(ct, { ...K }, /* @__PURE__ */ o.createElement(ie, { _ref: G, ...ae }));
138
138
  }, Q = () => {
139
- D({ focused: !1 }), m(!1);
140
- }, Ye = () => {
141
- const { windowWidth: t = 0 } = g, o = {
139
+ P({ focused: !1 }), g(!1);
140
+ }, je = () => {
141
+ const { windowWidth: e = 0 } = v, n = {
142
142
  expand: l(),
143
143
  onClose: Q,
144
- title: _e,
145
- subTitle: Ie,
146
- windowWidth: t
144
+ title: Ie,
145
+ subTitle: Ee,
146
+ windowWidth: e
147
147
  };
148
- return /* @__PURE__ */ n.createElement(Rt, { ...o }, /* @__PURE__ */ n.createElement(Pt, null, J()));
149
- }, $e = (t) => {
150
- G(t.value, t);
151
- }, je = () => {
152
- D({ focused: !0 });
153
- }, Xe = () => {
154
- m(!l());
155
- }, A = () => {
156
- v || (p.current = !0, m(!l()));
157
- }, Ze = (t) => {
158
- t.preventDefault();
159
- }, Ge = (t) => {
160
- const { altKey: o, keyCode: s } = t;
161
- if (s === O.esc && l()) {
162
- p.current = !0, m(!1);
148
+ return /* @__PURE__ */ o.createElement(It, { ...n }, /* @__PURE__ */ o.createElement(_t, null, J()));
149
+ }, Xe = (e) => {
150
+ A(e.value, e);
151
+ }, Ze = () => {
152
+ P({ focused: !0 });
153
+ }, Ge = () => {
154
+ g(!l());
155
+ }, F = () => {
156
+ m || (h.current = !0, g(!l()));
157
+ }, Je = (e) => {
158
+ e.preventDefault();
159
+ }, Qe = (e) => {
160
+ const { altKey: n, keyCode: u } = e;
161
+ if (u === k.esc && l()) {
162
+ h.current = !0, g(!1);
163
163
  return;
164
164
  }
165
- o && (s === O.up || s === O.down) && (t.preventDefault(), t.stopPropagation(), p.current = s === O.up, m(s === O.down));
166
- }, w = n.useRef(null), y = n.useRef(null), c = n.useRef(null), d = n.useRef(null);
167
- n.useImperativeHandle(
168
- w,
165
+ n && (u === k.up || u === k.down) && (e.preventDefault(), e.stopPropagation(), h.current = u === k.up, g(u === k.down));
166
+ }, D = o.useRef(null), d = o.useRef(null), c = o.useRef(null), f = o.useRef(null);
167
+ o.useImperativeHandle(
168
+ D,
169
169
  () => ({
170
170
  props: a,
171
171
  get element() {
172
- return y.current;
172
+ return d.current;
173
173
  },
174
174
  get calendar() {
175
- return d.current;
175
+ return f.current;
176
176
  },
177
177
  get dateInput() {
178
178
  return c.current;
@@ -184,222 +184,250 @@ const de = n.forwardRef((a, fe) => {
184
184
  return l();
185
185
  },
186
186
  get validity() {
187
- return T();
187
+ return N();
188
188
  },
189
189
  get value() {
190
- return f();
190
+ return p();
191
191
  },
192
192
  get mobileMode() {
193
- return u();
193
+ return s();
194
194
  },
195
- togglePopup: Xe,
195
+ togglePopup: Ge,
196
196
  // Hidden Methods but still accessible
197
- focus: qe
197
+ focus: He
198
198
  })
199
- ), n.useImperativeHandle(fe, () => w.current);
200
- const k = n.useRef(void 0), M = n.useRef(void 0), Je = n.useRef(null), p = n.useRef(!1), V = n.useRef(!1), C = n.useRef(null), [g, Qe] = n.useState({
201
- value: ge,
202
- show: pe,
199
+ ), o.useImperativeHandle(pe, () => D.current);
200
+ const M = o.useRef(void 0), R = o.useRef(void 0), et = o.useRef(null), h = o.useRef(!1), V = o.useRef(!1), O = o.useRef(null), [v, tt] = o.useState({
201
+ value: ve,
202
+ show: he,
203
203
  focused: !1
204
- }), [, et] = n.useReducer((t) => t, !0), D = (t) => {
205
- Qe((o) => ({ ...o, ...t }));
204
+ }), [, nt] = o.useReducer((e) => e, !0), ee = a.name || _ || void 0, ot = o.useCallback(
205
+ (e) => {
206
+ if (m)
207
+ return;
208
+ let n = null;
209
+ if (e != null) {
210
+ if (e instanceof Date)
211
+ n = e;
212
+ else if (typeof e == "string" || typeof e == "number") {
213
+ const u = new Date(e);
214
+ isNaN(u.getTime()) || (n = u);
215
+ }
216
+ }
217
+ if (n && de(n, y, w)) {
218
+ const u = {
219
+ target: d.current,
220
+ currentTarget: d.current
221
+ };
222
+ A(n, { syntheticEvent: u });
223
+ }
224
+ },
225
+ [m, y, w]
226
+ );
227
+ vt(d, {
228
+ fieldName: ee,
229
+ onValueChange: ot,
230
+ enabled: !!ee
231
+ });
232
+ const P = (e) => {
233
+ tt((n) => ({ ...n, ...e }));
206
234
  };
207
- n.useEffect(() => {
208
- d.current && d.current.element && l() && !V.current && d.current.element.focus({ preventScroll: !0 }), u() && l() && !V.current && setTimeout(() => {
209
- d.current && d.current.element && d.current.element.focus({ preventScroll: !0 });
210
- }, 300), c.current && c.current.element && !l() && p.current && c.current.element.focus({ preventScroll: !0 }), V.current = l(), p.current = !1;
211
- }), n.useEffect(() => {
212
- var t;
213
- return C.current = le && window.ResizeObserver && new window.ResizeObserver((o) => Ke(o)), l() && et(), (t = x()) != null && t.body && C.current && C.current.observe(x().body), () => {
214
- var o;
215
- clearTimeout(Je.current), (o = x()) != null && o.body && C.current && C.current.disconnect();
235
+ o.useEffect(() => {
236
+ f.current && f.current.element && l() && !V.current && f.current.element.focus({ preventScroll: !0 }), s() && l() && !V.current && setTimeout(() => {
237
+ f.current && f.current.element && f.current.element.focus({ preventScroll: !0 });
238
+ }, 300), c.current && c.current.element && !l() && h.current && c.current.element.focus({ preventScroll: !0 }), V.current = l(), h.current = !1;
239
+ }), o.useEffect(() => {
240
+ var e;
241
+ return O.current = ue && window.ResizeObserver && new window.ResizeObserver((n) => We(n)), l() && nt(), (e = x()) != null && e.body && O.current && O.current.observe(x().body), () => {
242
+ var n;
243
+ clearTimeout(et.current), (n = x()) != null && n.body && O.current && O.current.disconnect();
216
244
  };
217
245
  }, []);
218
- const ee = L + "-popup-id", tt = J(), nt = Fe(), ot = f(), rt = Ne(), at = Ye(), te = !K || T().valid, ne = me.toLanguageString(ce, Dt[ce]), it = {
219
- disabled: v,
220
- format: ye,
221
- formatPlaceholder: Se,
222
- id: xe,
223
- ariaLabelledBy: Te,
224
- ariaDescribedBy: Ae,
225
- ariaLabel: Re,
226
- max: R,
227
- min: _,
246
+ const te = _ + "-popup-id", rt = J(), at = ze(), it = p(), lt = Le(), ut = je(), ne = !q || N().valid, oe = ge.toLanguageString(fe, kt[fe]), st = {
247
+ disabled: m,
248
+ format: De,
249
+ formatPlaceholder: Be,
250
+ id: Ne,
251
+ ariaLabelledBy: Ae,
252
+ ariaDescribedBy: Fe,
253
+ ariaLabel: _e,
254
+ max: w,
255
+ min: y,
228
256
  name: a.name,
229
- onChange: $e,
257
+ onChange: Xe,
230
258
  required: a.required,
231
259
  _ref: c,
232
- tabIndex: l() ? -1 : Ce,
260
+ tabIndex: l() ? -1 : Oe,
233
261
  title: a.title,
234
- valid: T().valid,
235
- validationMessage: W,
236
- validityStyles: K,
237
- value: ot,
262
+ valid: N().valid,
263
+ validationMessage: H,
264
+ validityStyles: q,
265
+ value: it,
238
266
  label: void 0,
239
- placeholder: g.focused ? null : Ve,
267
+ placeholder: v.focused ? null : Ve,
240
268
  ariaExpanded: l(),
241
269
  autoFill: a.autoFill,
242
- twoDigitYearMax: Pe,
270
+ twoDigitYearMax: Se,
243
271
  enableMouseWheel: a.enableMouseWheel,
244
272
  autoCorrectParts: a.autoCorrectParts,
245
- autoSwitchParts: ke,
246
- autoSwitchKeys: Me,
273
+ autoSwitchParts: Me,
274
+ autoSwitchKeys: Re,
247
275
  allowCaretMode: a.allowCaretMode,
248
- inputAttributes: Ee
249
- }, oe = /* @__PURE__ */ n.createElement(
250
- pt,
276
+ inputAttributes: Te
277
+ }, re = /* @__PURE__ */ o.createElement(
278
+ bt,
251
279
  {
252
- onFocus: je,
253
- onBlur: u() ? void 0 : Q,
280
+ onFocus: Ze,
281
+ onBlur: s() ? void 0 : Q,
254
282
  onSyncBlur: a.onBlur,
255
283
  onSyncFocus: a.onFocus
256
284
  },
257
- (t) => /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement(
285
+ (e) => /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement(
258
286
  "span",
259
287
  {
260
- ...a.label ? {} : j,
261
- ref: y,
262
- className: ue(
288
+ ...a.label ? {} : X,
289
+ ref: d,
290
+ className: se(
263
291
  "k-input",
264
292
  "k-datepicker",
265
293
  {
266
- [`k-input-${se.sizeMap[I] || I}`]: I,
267
- [`k-rounded-${se.roundedMap[S] || S}`]: S,
268
- [`k-input-${E}`]: E,
269
- "k-invalid": !te,
270
- "k-required": X(),
271
- "k-disabled": v
294
+ [`k-input-${ce.sizeMap[I] || I}`]: I,
295
+ [`k-rounded-${ce.roundedMap[E] || E}`]: E,
296
+ [`k-input-${B}`]: B,
297
+ "k-invalid": !ne,
298
+ "k-required": Z(),
299
+ "k-disabled": m
272
300
  },
273
301
  a.className
274
302
  ),
275
- onKeyDown: Ge,
303
+ onKeyDown: Qe,
276
304
  style: { width: a.width },
277
- onFocus: u() ? A : t.onFocus,
278
- onBlur: t.onBlur,
279
- onClick: u() ? A : void 0
305
+ onFocus: s() ? F : e.onFocus,
306
+ onBlur: e.onBlur,
307
+ onClick: s() ? F : void 0
280
308
  },
281
- /* @__PURE__ */ n.createElement(
282
- nt,
309
+ /* @__PURE__ */ o.createElement(
310
+ at,
283
311
  {
284
312
  _ref: c,
285
313
  ariaRole: "combobox",
286
314
  ariaExpanded: l(),
287
- ariaControls: ee,
288
- autoFocus: Oe,
289
- ...it
315
+ ariaControls: te,
316
+ autoFocus: ke,
317
+ ...st
290
318
  }
291
319
  ),
292
- /* @__PURE__ */ n.createElement(
293
- rt,
320
+ /* @__PURE__ */ o.createElement(
321
+ lt,
294
322
  {
295
323
  type: "button",
296
324
  icon: "calendar",
297
- svgIcon: gt,
298
- title: ne,
325
+ svgIcon: wt,
326
+ title: oe,
299
327
  className: "k-input-button",
300
- onClick: u() ? void 0 : A,
301
- "aria-label": ne,
302
- fillMode: E,
303
- onMouseDown: Ze
328
+ onClick: s() ? void 0 : F,
329
+ "aria-label": oe,
330
+ fillMode: B,
331
+ onMouseDown: Je
304
332
  }
305
333
  ),
306
- !u() && tt
307
- ), u() && at)
334
+ !s() && rt
335
+ ), s() && ut)
308
336
  );
309
- return a.label ? /* @__PURE__ */ n.createElement(
310
- Mt,
337
+ return a.label ? /* @__PURE__ */ o.createElement(
338
+ St,
311
339
  {
312
340
  dateInput: c,
313
341
  label: a.label,
314
- editorId: L,
315
- editorValid: te,
316
- editorDisabled: v,
317
- children: oe,
342
+ editorId: _,
343
+ editorValid: ne,
344
+ editorDisabled: m,
345
+ children: re,
318
346
  style: { width: a.width },
319
- ...j
347
+ ...X
320
348
  }
321
- ) : oe;
349
+ ) : re;
322
350
  });
323
- de.propTypes = {
324
- className: e.string,
325
- defaultShow: e.bool,
326
- defaultValue: e.instanceOf(Date),
327
- disabled: e.bool,
328
- focusedDate: e.instanceOf(Date),
329
- format: e.oneOfType([
330
- e.string,
331
- e.shape({
332
- skeleton: r(e.string),
333
- pattern: r(e.string),
334
- date: r(e.oneOf(["short", "medium", "long", "full"])),
335
- time: r(e.oneOf(["short", "medium", "long", "full"])),
336
- datetime: r(e.oneOf(["short", "medium", "long", "full"])),
337
- era: r(e.oneOf(["narrow", "short", "long"])),
338
- year: r(e.oneOf(["numeric", "2-digit"])),
339
- month: r(e.oneOf(["numeric", "2-digit", "narrow", "short", "long"])),
340
- day: r(e.oneOf(["numeric", "2-digit"])),
341
- weekday: r(e.oneOf(["narrow", "short", "long"])),
342
- hour: r(e.oneOf(["numeric", "2-digit"])),
343
- hour12: r(e.bool),
344
- minute: r(e.oneOf(["numeric", "2-digit"])),
345
- second: r(e.oneOf(["numeric", "2-digit"])),
346
- timeZoneName: r(e.oneOf(["short", "long"]))
351
+ me.propTypes = {
352
+ className: t.string,
353
+ defaultShow: t.bool,
354
+ defaultValue: t.instanceOf(Date),
355
+ disabled: t.bool,
356
+ focusedDate: t.instanceOf(Date),
357
+ format: t.oneOfType([
358
+ t.string,
359
+ t.shape({
360
+ skeleton: r(t.string),
361
+ pattern: r(t.string),
362
+ date: r(t.oneOf(["short", "medium", "long", "full"])),
363
+ time: r(t.oneOf(["short", "medium", "long", "full"])),
364
+ datetime: r(t.oneOf(["short", "medium", "long", "full"])),
365
+ era: r(t.oneOf(["narrow", "short", "long"])),
366
+ year: r(t.oneOf(["numeric", "2-digit"])),
367
+ month: r(t.oneOf(["numeric", "2-digit", "narrow", "short", "long"])),
368
+ day: r(t.oneOf(["numeric", "2-digit"])),
369
+ weekday: r(t.oneOf(["narrow", "short", "long"])),
370
+ hour: r(t.oneOf(["numeric", "2-digit"])),
371
+ hour12: r(t.bool),
372
+ minute: r(t.oneOf(["numeric", "2-digit"])),
373
+ second: r(t.oneOf(["numeric", "2-digit"])),
374
+ timeZoneName: r(t.oneOf(["short", "long"]))
347
375
  })
348
376
  ]),
349
- formatPlaceholder: e.oneOfType([
377
+ formatPlaceholder: t.oneOfType([
350
378
  r(
351
- e.oneOf(["wide", "narrow", "short", "formatPattern"])
379
+ t.oneOf(["wide", "narrow", "short", "formatPattern"])
352
380
  ),
353
- e.shape({
354
- year: r(e.string),
355
- month: r(e.string),
356
- day: r(e.string),
357
- hour: r(e.string),
358
- minute: r(e.string),
359
- second: r(e.string)
381
+ t.shape({
382
+ year: r(t.string),
383
+ month: r(t.string),
384
+ day: r(t.string),
385
+ hour: r(t.string),
386
+ minute: r(t.string),
387
+ second: r(t.string)
360
388
  })
361
389
  ]),
362
- id: e.string,
363
- ariaLabelledBy: e.string,
364
- ariaDescribedBy: e.string,
365
- ariaLabel: e.string,
366
- min: e.instanceOf(Date),
367
- max: e.instanceOf(Date),
368
- name: e.string,
369
- popupSettings: e.shape({
370
- animate: r(e.bool),
371
- appendTo: r(e.any),
372
- popupClass: r(e.string)
390
+ id: t.string,
391
+ ariaLabelledBy: t.string,
392
+ ariaDescribedBy: t.string,
393
+ ariaLabel: t.string,
394
+ min: t.instanceOf(Date),
395
+ max: t.instanceOf(Date),
396
+ name: t.string,
397
+ popupSettings: t.shape({
398
+ animate: r(t.bool),
399
+ appendTo: r(t.any),
400
+ popupClass: r(t.string)
373
401
  }),
374
- show: e.bool,
375
- tabIndex: e.number,
376
- title: e.string,
377
- value: e.instanceOf(Date),
378
- weekNumber: e.bool,
379
- width: e.oneOfType([e.number, e.string]),
380
- validationMessage: e.string,
381
- required: e.bool,
382
- valid: e.bool,
383
- size: e.oneOf(["small", "medium", "large"]),
384
- rounded: e.oneOf(["small", "medium", "large", "full", "none"]),
385
- fillMode: e.oneOf(["solid", "flat", "outline"]),
386
- adaptive: e.bool,
387
- adaptiveTitle: e.string,
388
- adaptiveSubtitle: e.string,
389
- autoFocus: e.bool,
390
- inputAttributes: e.object
402
+ show: t.bool,
403
+ tabIndex: t.number,
404
+ title: t.string,
405
+ value: t.instanceOf(Date),
406
+ weekNumber: t.bool,
407
+ width: t.oneOfType([t.number, t.string]),
408
+ validationMessage: t.string,
409
+ required: t.bool,
410
+ valid: t.bool,
411
+ size: t.oneOf(["small", "medium", "large"]),
412
+ rounded: t.oneOf(["small", "medium", "large", "full", "none"]),
413
+ fillMode: t.oneOf(["solid", "flat", "outline"]),
414
+ adaptive: t.bool,
415
+ adaptiveTitle: t.string,
416
+ adaptiveSubtitle: t.string,
417
+ autoFocus: t.bool,
418
+ inputAttributes: t.object
391
419
  };
392
420
  const i = {
393
421
  defaultShow: !1,
394
422
  defaultValue: null,
395
- dateInput: ht,
396
- calendar: vt,
397
- toggleButton: kt,
398
- popup: ut,
423
+ dateInput: yt,
424
+ calendar: Ct,
425
+ toggleButton: Rt,
426
+ popup: dt,
399
427
  disabled: !1,
400
428
  format: "d",
401
- max: wt,
402
- min: bt,
429
+ max: Ot,
430
+ min: Dt,
403
431
  popupSettings: {},
404
432
  tabIndex: 0,
405
433
  weekNumber: !1,
@@ -408,10 +436,10 @@ const i = {
408
436
  rounded: void 0,
409
437
  fillMode: void 0,
410
438
  autoFocus: !1
411
- }, _t = ct();
412
- de.displayName = "KendoReactDatePicker";
439
+ }, Et = mt();
440
+ me.displayName = "KendoReactDatePicker";
413
441
  export {
414
- de as DatePicker,
415
- _t as DatePickerPropsContext,
442
+ me as DatePicker,
443
+ Et as DatePickerPropsContext,
416
444
  i as datePickerDefaultProps
417
445
  };