@progress/kendo-react-dateinputs 9.0.0-develop.2 → 9.0.0-develop.20

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 (40) hide show
  1. package/README.md +47 -46
  2. package/calendar/components/Calendar.mjs +57 -60
  3. package/calendar/components/CalendarNavigationItem.mjs +10 -12
  4. package/calendar/components/CalendarWeekCell.mjs +9 -1
  5. package/calendar/components/HorizontalViewList.mjs +8 -11
  6. package/calendar/components/MultiViewCalendar.mjs +13 -8
  7. package/calendar/components/Navigation.mjs +11 -11
  8. package/calendar/components/View.mjs +8 -25
  9. package/common/PickerWrap.mjs +2 -15
  10. package/dateinput/DateInput.js +1 -1
  11. package/dateinput/DateInput.mjs +264 -321
  12. package/dateinput/dateInputIntl.js +8 -0
  13. package/dateinput/dateInputIntl.mjs +20 -0
  14. package/dateinput/utils.js +1 -1
  15. package/dateinput/utils.mjs +4 -27
  16. package/datepicker/DatePicker.js +1 -1
  17. package/datepicker/DatePicker.mjs +104 -82
  18. package/daterangepicker/DateRangePicker.mjs +14 -3
  19. package/datetimepicker/DateTimePicker.js +1 -1
  20. package/datetimepicker/DateTimePicker.mjs +102 -81
  21. package/dist/cdn/js/kendo-react-dateinputs.js +1 -1
  22. package/hooks/usePickerFloatingLabel.js +1 -1
  23. package/hooks/usePickerFloatingLabel.mjs +6 -11
  24. package/index.d.mts +177 -36
  25. package/index.d.ts +177 -36
  26. package/package-metadata.mjs +1 -1
  27. package/package.json +8 -7
  28. package/timepicker/TimeList.mjs +27 -12
  29. package/timepicker/TimePart.mjs +55 -75
  30. package/timepicker/TimePicker.js +1 -1
  31. package/timepicker/TimePicker.mjs +85 -69
  32. package/timepicker/services/DOMService.mjs +7 -4
  33. package/timepicker/services/DayPeriodService.mjs +1 -4
  34. package/timepicker/utils.mjs +3 -15
  35. package/virtualization/Virtualization.js +1 -1
  36. package/virtualization/Virtualization.mjs +3 -13
  37. package/dateinput/models/kendo-date.js +0 -8
  38. package/dateinput/models/kendo-date.mjs +0 -233
  39. package/dateinput/models/mask.js +0 -8
  40. package/dateinput/models/mask.mjs +0 -16
package/index.d.ts CHANGED
@@ -5,20 +5,26 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { Button } from '@progress/kendo-react-buttons';
8
+ import { ButtonHandle } from '@progress/kendo-react-buttons';
9
9
  import { ButtonProps } from '@progress/kendo-react-buttons';
10
+ import { DateFieldNameOptions } from '@progress/kendo-intl';
10
11
  import { DateFormatOptions } from '@progress/kendo-react-intl';
12
+ import { DateFormatOptions as DateFormatOptions_2 } from '@progress/kendo-intl';
11
13
  import { DateFormatPart } from '@progress/kendo-react-intl';
14
+ import { DateFormatPart as DateFormatPart_2 } from '@progress/kendo-intl';
12
15
  import { DateInputsClassStructure } from '@progress/kendo-react-common';
13
16
  import { FormComponent } from '@progress/kendo-react-common';
14
17
  import { FormComponentProps } from '@progress/kendo-react-common';
15
18
  import { FormComponentValidity } from '@progress/kendo-react-common';
19
+ import { ForwardRefExoticComponent } from 'react';
16
20
  import { IntlService } from '@progress/kendo-react-intl';
17
21
  import { JSX as JSX_2 } from 'react/jsx-runtime';
18
22
  import { LocalizationService } from '@progress/kendo-react-intl';
23
+ import { NumberFormatOptions } from '@progress/kendo-intl';
19
24
  import { PopupProps } from '@progress/kendo-react-popup';
20
25
  import PropTypes from 'prop-types';
21
26
  import * as React_2 from 'react';
27
+ import { RefAttributes } from 'react';
22
28
 
23
29
  /**
24
30
  * @hidden
@@ -562,6 +568,34 @@ export declare interface DateInputChangeEvent<T = DateInput> {
562
568
  target: T;
563
569
  }
564
570
 
571
+ /** @hidden */
572
+ declare interface DateInputCommonPackageProps {
573
+ /**
574
+ * Determines whether to autocorrect invalid segments automatically.
575
+ *
576
+ * @default `true`
577
+ */
578
+ autoCorrectParts?: boolean;
579
+ /**
580
+ * Determines whether to automatically move to the next segment after the user completes the current one.
581
+ *
582
+ * @default `true`
583
+ */
584
+ autoSwitchParts?: boolean;
585
+ /**
586
+ * A string array representing custom keys, which will move the focus to the next date format segment.
587
+ *
588
+ * @default `[]`
589
+ */
590
+ autoSwitchKeys?: string[];
591
+ /**
592
+ * Determines if the users should see a blinking caret inside the Date Input when possible.
593
+ *
594
+ * @default `false`
595
+ */
596
+ allowCaretMode?: boolean;
597
+ }
598
+
565
599
  /**
566
600
  * The interface which defines a custom-format placeholder structure in the DateInput.
567
601
  */
@@ -637,10 +671,29 @@ export declare interface DateInputIncrementalSteps {
637
671
  second?: number;
638
672
  }
639
673
 
674
+ declare class DateInputIntl {
675
+ private service;
676
+ format: (format: string, ...values: any[]) => string;
677
+ toString: (value: any, format: any, localeId?: string) => string;
678
+ formatDate: (value: Date, format?: string | DateFormatOptions_2, localeId?: string) => string;
679
+ parseDate: (value: string, format?: string | DateFormatOptions_2 | string[] | DateFormatOptions_2[], localeId?: string) => Date;
680
+ parseNumber: (value: string, format?: string | NumberFormatOptions, localeId?: string) => number;
681
+ formatNumber: (value: number, format: string | NumberFormatOptions, localeId?: string) => string;
682
+ splitDateFormat: (format: string | DateFormatOptions_2, localeId?: string) => DateFormatPart_2[];
683
+ numberSymbols: (localeId?: string) => void;
684
+ firstDay: (localeId?: string) => number;
685
+ weekendRange: (localeId?: string) => any;
686
+ dateFieldName: (options: DateFieldNameOptions, localeId?: string) => string;
687
+ dateFormatNames: (localeId: any, options: any) => any;
688
+ cldr: any;
689
+ localeId: string;
690
+ constructor(service: IntlService);
691
+ }
692
+
640
693
  /**
641
694
  * Represents the props of the [KendoReact DateInput component]({% slug overview_dateinput %}). The generic argument is passed to the `onChange` property and is used as a target in the [`DateInputChangeEvent`]({% slug api_dateinputs_dateinputchangeevent %}) interface.
642
695
  */
643
- export declare interface DateInputProps<T extends DateInput = any> extends FormComponentProps, DateInputSettings {
696
+ export declare interface DateInputProps<T extends DateInput = any> extends FormComponentProps, DateInputSettings, DateInputCommonPackageProps {
644
697
  /** @hidden */
645
698
  _ref?: React_2.MutableRefObject<DateInput | null>;
646
699
  /**
@@ -665,6 +718,8 @@ export declare interface DateInputProps<T extends DateInput = any> extends FormC
665
718
  defaultValue?: Date | null;
666
719
  /**
667
720
  * Indicates the availability of interactive popup element that can be triggered by an element. By default the property is set to `grid`.
721
+ *
722
+ * @default `grid`
668
723
  */
669
724
  ariaHasPopup?: boolean | 'grid' | 'dialog';
670
725
  /**
@@ -730,8 +785,29 @@ export declare interface DateInputProps<T extends DateInput = any> extends FormC
730
785
  clearButton?: boolean;
731
786
  /**
732
787
  * Represents the `autoFocus` HTML attribute that will be applied to the input element of the DateInput. (Defaults to `false`)
788
+ *
789
+ * @default `false`
733
790
  */
734
791
  autoFocus?: boolean;
792
+ /**
793
+ * When enabled, the DateInput will autofill the rest of the date to the current date when the component loses focus.
794
+ *
795
+ * @default `false`
796
+ */
797
+ autoFill?: boolean;
798
+ /**
799
+ * The maximum year to assume to be from the current century when typing two-digit year value ([see example]({% slug formats_dateinput %}#toc-two---digit-year-max)).
800
+ * The default value of 68, indicating that typing any value less than 69 will be assumed to be 20xx, while 69 and larger will be assumed to be 19xx.
801
+ *
802
+ * @default `68`
803
+ */
804
+ twoDigitYearMax?: number;
805
+ /**
806
+ * Indicates whether the mouse scroll can be used to increase/decrease the date segments values.
807
+ *
808
+ * @default `true`
809
+ */
810
+ enableMouseWheel?: boolean;
735
811
  /**
736
812
  * @hidden
737
813
  */
@@ -979,34 +1055,23 @@ export declare class DateInputWithoutContext extends React_2.Component<DateInput
979
1055
  validityStyles: boolean;
980
1056
  validationMessage: string;
981
1057
  placeholder: null;
1058
+ enableMouseWheel: boolean;
1059
+ autoCorrectParts: boolean;
1060
+ autoSwitchParts: boolean;
1061
+ allowCaretMode: boolean;
1062
+ twoDigitYearMax: number;
982
1063
  ariaHasPopup: string;
983
1064
  autoFocus: boolean;
984
1065
  };
985
1066
  private kendoDate;
986
- private currentFormat;
1067
+ private kendoDateObject;
1068
+ private mounted;
987
1069
  private valueDuringOnChange;
988
- private paste;
989
1070
  private _element;
990
1071
  private _wrapper;
1072
+ private _nativeEvent;
991
1073
  private get _inputId();
992
- private _lastSelectedSymbol;
993
1074
  constructor(props: DateInputProps);
994
- /**
995
- * @hidden
996
- */
997
- componentDidMount(): void;
998
- /**
999
- * @hidden
1000
- */
1001
- componentDidUpdate(_: any, prevState: any): void;
1002
- /**
1003
- * @hidden
1004
- */
1005
- componentWillUnmount(): void;
1006
- /**
1007
- * @hidden
1008
- */
1009
- render(): any;
1010
1075
  /**
1011
1076
  * Gets the value of the DateInput.
1012
1077
  */
@@ -1017,6 +1082,7 @@ export declare class DateInputWithoutContext extends React_2.Component<DateInput
1017
1082
  get name(): string | undefined;
1018
1083
  protected get min(): Date;
1019
1084
  protected get max(): Date;
1085
+ protected get isInSegmentSelection(): Date;
1020
1086
  /**
1021
1087
  * @hidden
1022
1088
  */
@@ -1073,34 +1139,65 @@ export declare class DateInputWithoutContext extends React_2.Component<DateInput
1073
1139
  * @hidden
1074
1140
  */
1075
1141
  protected get wrapper(): HTMLSpanElement | null;
1142
+ /**
1143
+ * @hidden
1144
+ */
1145
+ get options(): {
1146
+ format: string | DateFormatOptions | undefined;
1147
+ steps: DateInputIncrementalSteps | undefined;
1148
+ formatPlaceholder: string;
1149
+ placeholder: string | null | undefined;
1150
+ selectPreviousSegmentOnBackspace: boolean;
1151
+ value: Date | null;
1152
+ intlService: DateInputIntl;
1153
+ autoFill: boolean;
1154
+ enableMouseWheel: boolean | undefined;
1155
+ autoCorrectParts: boolean | undefined;
1156
+ autoSwitchParts: boolean | undefined;
1157
+ autoSwitchKeys: string[];
1158
+ twoDigitYearMax: number | undefined;
1159
+ allowCaretMode: boolean | undefined;
1160
+ };
1161
+ /**
1162
+ * @hidden
1163
+ */
1164
+ componentDidMount(): void;
1165
+ /**
1166
+ * @hidden
1167
+ */
1168
+ componentDidUpdate(prevProps: DateInputProps): void;
1169
+ /**
1170
+ * @hidden
1171
+ */
1172
+ componentWillUnmount(): void;
1173
+ /**
1174
+ * @hidden
1175
+ */
1176
+ render(): any;
1076
1177
  /**
1077
1178
  * @hidden
1078
1179
  */
1079
1180
  intl(): IntlService;
1181
+ /**
1182
+ * @hidden
1183
+ */
1184
+ private intlProvider;
1185
+ get intlCommon(): IntlService;
1080
1186
  /**
1081
1187
  * @hidden
1082
1188
  */
1083
1189
  protected setValidity: () => void;
1084
1190
  protected updateOnPaste: (event: React_2.SyntheticEvent<HTMLInputElement>) => void;
1085
1191
  private spinnersMouseDown;
1086
- private handlePaste;
1087
1192
  private handleClick;
1088
- private elementChange;
1089
- private elementClick;
1090
1193
  private nativeWheel;
1091
- private wheel;
1092
1194
  private increasePart;
1093
1195
  private decreasePart;
1094
- private elementKeyDown;
1095
1196
  private elementOnFocus;
1096
1197
  private elementOnBlur;
1097
- private get selection();
1098
- private setSelection;
1099
1198
  private triggerChange;
1100
- private selectionBySymbol;
1101
- private selectionByIndex;
1102
- private switchDateSegment;
1103
- private modifyDateSegmentValue;
1199
+ private onChange;
1200
+ private initKendoDate;
1104
1201
  }
1105
1202
 
1106
1203
  /** @hidden */
@@ -1176,7 +1273,7 @@ export declare interface DatePickerOpenEvent {
1176
1273
  /**
1177
1274
  * Represents the props of the [KendoReact DatePicker component]({% slug overview_datepicker %}).
1178
1275
  */
1179
- export declare interface DatePickerProps extends DatePickerSettings, FormComponentProps, Omit<(React_2.HTMLAttributes<HTMLElement>), 'defaultValue' | 'onChange' | 'onBlur' | 'onFocus' | 'placeholder'> {
1276
+ export declare interface DatePickerProps extends DatePickerSettings, FormComponentProps, DateInputCommonPackageProps, Omit<React_2.HTMLAttributes<HTMLElement>, 'defaultValue' | 'onChange' | 'onBlur' | 'onFocus' | 'placeholder'> {
1180
1277
  /**
1181
1278
  * Sets the default value of the DatePicker ([see example]({% slug default_value_datepicker %})).
1182
1279
  */
@@ -1260,6 +1357,25 @@ export declare interface DatePickerProps extends DatePickerSettings, FormCompone
1260
1357
  * @hidden
1261
1358
  */
1262
1359
  modified?: boolean;
1360
+ /**
1361
+ * When enabled, the DatePicker will autofill the rest of the date to the current date when the component loses focus.
1362
+ *
1363
+ * @default `false`
1364
+ */
1365
+ autoFill?: boolean;
1366
+ /**
1367
+ * The maximum year to assume to be from the current century when typing two-digit year value ([see example]({% slug formats_dateinput %}#toc-two---digit-year-max)).
1368
+ * The default value of 68, indicating that typing any value less than 69 will be assumed to be 20xx, while 69 and larger will be assumed to be 19xx.
1369
+ *
1370
+ * @default `68`
1371
+ */
1372
+ twoDigitYearMax?: number;
1373
+ /**
1374
+ * Indicates whether the mouse scroll can be used to increase/decrease the date segments values.
1375
+ *
1376
+ * @default `true`
1377
+ */
1378
+ enableMouseWheel?: boolean;
1263
1379
  }
1264
1380
 
1265
1381
  /**
@@ -2168,7 +2284,7 @@ export declare interface DateTimePickerOpenEvent {
2168
2284
  /**
2169
2285
  * Represents the props of the [KendoReact DateTimePicker component]({% slug overview_datetimepicker %}).
2170
2286
  */
2171
- export declare interface DateTimePickerProps extends DateTimePickerSettings, FormComponentProps {
2287
+ export declare interface DateTimePickerProps extends DateTimePickerSettings, FormComponentProps, DateInputCommonPackageProps {
2172
2288
  /**
2173
2289
  * Sets the default value of the DateTimePicker
2174
2290
  * ([see example]({% slug default_value_datetimepicker %})).
@@ -2250,6 +2366,25 @@ export declare interface DateTimePickerProps extends DateTimePickerSettings, For
2250
2366
  * @hidden
2251
2367
  */
2252
2368
  unstyled?: DateInputsClassStructure;
2369
+ /**
2370
+ * When enabled, the DateTimePicker will autofill the rest of the date/time to the current date/time when the component loses focus.
2371
+ *
2372
+ * @default `false`
2373
+ */
2374
+ autoFill?: boolean;
2375
+ /**
2376
+ * The maximum year to assume to be from the current century when typing two-digit year value ([see example]({% slug formats_dateinput %}#toc-two---digit-year-max)).
2377
+ * The default value of 68, indicating that typing any value less than 69 will be assumed to be 20xx, while 69 and larger will be assumed to be 19xx.
2378
+ *
2379
+ * @default `68`
2380
+ */
2381
+ twoDigitYearMax?: number;
2382
+ /**
2383
+ * Indicates whether the mouse scroll can be used to increase/decrease the datetime segments values.
2384
+ *
2385
+ * @default `true`
2386
+ */
2387
+ enableMouseWheel?: boolean;
2253
2388
  }
2254
2389
 
2255
2390
  /**
@@ -3785,7 +3920,7 @@ export declare interface TimePickerOpenEvent {
3785
3920
  /**
3786
3921
  * Represents the props of the [KendoReact TimePicker component]({% slug overview_timepicker %}).
3787
3922
  */
3788
- export declare interface TimePickerProps extends TimePickerSettings, FormComponentProps {
3923
+ export declare interface TimePickerProps extends TimePickerSettings, FormComponentProps, DateInputCommonPackageProps {
3789
3924
  /**
3790
3925
  * Sets the default value of the TimePicker ([see example]({% slug default_value_timepicker %}#toc-setting-the-default-value)).
3791
3926
  */
@@ -3857,6 +3992,12 @@ export declare interface TimePickerProps extends TimePickerSettings, FormCompone
3857
3992
  * @hidden
3858
3993
  */
3859
3994
  unstyled?: DateInputsClassStructure;
3995
+ /**
3996
+ * Indicates whether the mouse scroll can be used to increase/decrease the time segments values.
3997
+ *
3998
+ * @default `true`
3999
+ */
4000
+ enableMouseWheel?: boolean;
3860
4001
  }
3861
4002
 
3862
4003
  /**
@@ -4350,7 +4491,7 @@ declare interface TodayCommandProps {
4350
4491
  /**
4351
4492
  * Represents the default `toggleButton` component rendered by the [KendoReact Scheduler DatePicker]({% slug overview_datepicker %}).
4352
4493
  */
4353
- export declare const ToggleButton: typeof Button;
4494
+ export declare const ToggleButton: ForwardRefExoticComponent<ButtonProps & RefAttributes<ButtonHandle | null>>;
4354
4495
 
4355
4496
  /**
4356
4497
  * Represents the props of the KendoReact [Toggle Button]({% slug api_dateinputs_togglebutton %}) component.
@@ -10,7 +10,7 @@ const e = {
10
10
  name: "@progress/kendo-react-dateinputs",
11
11
  productName: "KendoReact",
12
12
  productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
13
- publishDate: 1729236335,
13
+ publishDate: 1731056714,
14
14
  version: "",
15
15
  licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"
16
16
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-dateinputs",
3
- "version": "9.0.0-develop.2",
3
+ "version": "9.0.0-develop.20",
4
4
  "description": "React DateInput is a perfect input component for handling quick and efficient date values. KendoReact Date Inputs package",
5
5
  "author": "Progress",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -24,12 +24,13 @@
24
24
  "peerDependencies": {
25
25
  "@progress/kendo-date-math": "^1.4.0",
26
26
  "@progress/kendo-licensing": "^1.3.4",
27
- "@progress/kendo-react-buttons": "9.0.0-develop.2",
28
- "@progress/kendo-react-common": "9.0.0-develop.2",
29
- "@progress/kendo-react-intl": "9.0.0-develop.2",
30
- "@progress/kendo-react-labels": "9.0.0-develop.2",
31
- "@progress/kendo-react-layout": "9.0.0-develop.2",
32
- "@progress/kendo-react-popup": "9.0.0-develop.2",
27
+ "@progress/kendo-dateinputs-common": "0.3.5",
28
+ "@progress/kendo-react-buttons": "9.0.0-develop.20",
29
+ "@progress/kendo-react-common": "9.0.0-develop.20",
30
+ "@progress/kendo-react-intl": "9.0.0-develop.20",
31
+ "@progress/kendo-react-labels": "9.0.0-develop.20",
32
+ "@progress/kendo-react-layout": "9.0.0-develop.20",
33
+ "@progress/kendo-react-popup": "9.0.0-develop.20",
33
34
  "@progress/kendo-svg-icons": "^3.0.0",
34
35
  "react": "^16.8.2 || ^17.0.0 || ^18.0.0",
35
36
  "react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"
@@ -47,7 +47,11 @@ const F = 2, S = 0.05, N = 100, k = 0, T = 9, B = {
47
47
  this.dom.didCalculate && (this.itemHeight = this.dom.itemHeight, this.listHeight = this.dom.timeListHeight, this.topOffset = (this.listHeight - this.itemHeight) / 2, this.bottomOffset = this.listHeight - this.itemHeight, this.props.mobileMode && (this.topOffset += T, this.bottomOffset += T * 2), this.topThreshold = this.itemHeight * S, this.bottomThreshold = this.itemHeight * (1 - S));
48
48
  }, this.configureServices = ({ min: t, max: s, value: e } = this.props) => {
49
49
  if (this.service) {
50
- const [o, l] = this.service.limitRange(t || this.min, s || this.max, e || this.props.value);
50
+ const [o, l] = this.service.limitRange(
51
+ t || this.min,
52
+ s || this.max,
53
+ e || this.props.value
54
+ );
51
55
  this.service.configure(this.serviceSettings({ min: o, max: l }));
52
56
  }
53
57
  }, this.serviceSettings = (t) => {
@@ -82,10 +86,7 @@ const F = 2, S = 0.05, N = 100, k = 0, T = 9, B = {
82
86
  return;
83
87
  const { keyCode: s } = t;
84
88
  (s === c.down || s === c.up || s === c.end || s === c.home) && t.preventDefault();
85
- const o = (B[t.keyCode] || H)(
86
- this.service.data(this.props.value),
87
- this.service.selectedIndex(this.props.value)
88
- );
89
+ const o = (B[t.keyCode] || H)(this.service.data(this.props.value), this.service.selectedIndex(this.props.value));
89
90
  o && this.handleChange(o);
90
91
  }, this.handleChange = _((t) => {
91
92
  if (!this.service)
@@ -148,9 +149,17 @@ const F = 2, S = 0.05, N = 100, k = 0, T = 9, B = {
148
149
  style: { transform: l, msTransform: l },
149
150
  className: u(a.ul({ c: e }))
150
151
  },
151
- o.map((p, b) => /* @__PURE__ */ n.createElement("li", { key: b, className: u(a.li({ c: e })), onClick: () => {
152
- this.handleChange(p);
153
- } }, /* @__PURE__ */ n.createElement("span", null, p.text)))
152
+ o.map((p, b) => /* @__PURE__ */ n.createElement(
153
+ "li",
154
+ {
155
+ key: b,
156
+ className: u(a.li({ c: e })),
157
+ onClick: () => {
158
+ this.handleChange(p);
159
+ }
160
+ },
161
+ /* @__PURE__ */ n.createElement("span", null, p.text)
162
+ ))
154
163
  ), /* @__PURE__ */ n.createElement("div", { className: u(a.scrollablePlaceholder({ c: e })) }));
155
164
  return /* @__PURE__ */ n.createElement(
156
165
  "div",
@@ -189,10 +198,16 @@ const F = 2, S = 0.05, N = 100, k = 0, T = 9, B = {
189
198
  total: d,
190
199
  unstyled: s
191
200
  }
192
- ) : /* @__PURE__ */ n.createElement("div", { className: u(
193
- a.containerSelector({ c: e }),
194
- a.container({ c: e, content: !0, scrollable: !0 })
195
- ) }, v)
201
+ ) : /* @__PURE__ */ n.createElement(
202
+ "div",
203
+ {
204
+ className: u(
205
+ a.containerSelector({ c: e }),
206
+ a.container({ c: e, content: !0, scrollable: !0 })
207
+ )
208
+ },
209
+ v
210
+ )
196
211
  );
197
212
  }
198
213
  };
@@ -17,7 +17,9 @@ import { MIN_TIME as A, MAX_TIME as K, MIDNIGHT_DATE as _ } from "../utils.mjs";
17
17
  import { TIME_PART as d } from "./models/TimePart.mjs";
18
18
  import { isInTimeRange as $, getNow as z, snapTime as N, generateSnappers as B, timeInRange as W } from "./utils.mjs";
19
19
  import { Button as j } from "@progress/kendo-react-buttons";
20
- const v = new RegExp(`${d.hour}|${d.minute}|${d.second}|${d.dayperiod}|literal`), a = class a extends n.Component {
20
+ const v = new RegExp(
21
+ `${d.hour}|${d.minute}|${d.second}|${d.dayperiod}|literal`
22
+ ), a = class a extends n.Component {
21
23
  constructor(i) {
22
24
  super(i), this._element = null, this._nowButton = null, this.dateFormatParts = [], this.timeLists = [], this.focus = (s, e) => {
23
25
  Promise.resolve().then(() => {
@@ -30,10 +32,12 @@ const v = new RegExp(`${d.hour}|${d.minute}|${d.second}|${d.dayperiod}|literal`)
30
32
  return r && r && s.type === "literal" ? v.test(r.type || "") : v.test(s.type || "");
31
33
  }, this.focusList = (s) => {
32
34
  this.timeLists.length && this.timeLists.reduce(this.listReducer, []).map((e) => s === 1 ? e.next : e.prev).map((e) => e && e.element && e.element.focus({ preventScroll: !0 }));
33
- }, this.listReducer = (s, e, o, r) => s.length || e.props.id !== this.state.activeListIndex ? s : [{
34
- next: r[o + 1] || e,
35
- prev: r[o - 1] || e
36
- }], this.showNowButton = () => !this.hasSteps() && this.props.nowButton && $(z(), this.min, this.max), this.handleKeyDown = (s) => {
35
+ }, this.listReducer = (s, e, o, r) => s.length || e.props.id !== this.state.activeListIndex ? s : [
36
+ {
37
+ next: r[o + 1] || e,
38
+ prev: r[o - 1] || e
39
+ }
40
+ ], this.showNowButton = () => !this.hasSteps() && this.props.nowButton && $(z(), this.min, this.max), this.handleKeyDown = (s) => {
37
41
  const { keyCode: e } = s;
38
42
  switch (e) {
39
43
  case T.left:
@@ -62,9 +66,7 @@ const v = new RegExp(`${d.hour}|${d.minute}|${d.second}|${d.dayperiod}|literal`)
62
66
  }, this.handleChange = (s) => {
63
67
  const { onChange: e } = this.props;
64
68
  e && e.call(void 0, s);
65
- }, this.snapTime = N(
66
- B(this.props.steps, this.props.min || a.defaultProps.min)
67
- ), this.state = {
69
+ }, this.snapTime = N(B(this.props.steps, this.props.min || a.defaultProps.min)), this.state = {
68
70
  activeListIndex: -1
69
71
  }, this.hasActiveButton = this.hasActiveButton.bind(this);
70
72
  }
@@ -75,11 +77,7 @@ const v = new RegExp(`${d.hour}|${d.minute}|${d.second}|${d.dayperiod}|literal`)
75
77
  return this._element;
76
78
  }
77
79
  get value() {
78
- return W(
79
- this.snapTime(O(this.props.value || _)),
80
- this.min,
81
- this.max
82
- );
80
+ return W(this.snapTime(O(this.props.value || _)), this.min, this.max);
83
81
  }
84
82
  get intl() {
85
83
  return k(this);
@@ -110,17 +108,7 @@ const v = new RegExp(`${d.hour}|${d.minute}|${d.second}|${d.dayperiod}|literal`)
110
108
  * @hidden
111
109
  */
112
110
  render() {
113
- const {
114
- format: i,
115
- smoothScroll: s,
116
- onNowClick: e,
117
- className: o,
118
- disabled: r,
119
- mobileMode: w,
120
- show: D,
121
- onNowKeyDown: E,
122
- unstyled: g
123
- } = this.props, m = g && g.uTime;
111
+ const { format: i, smoothScroll: s, onNowClick: e, className: o, disabled: r, mobileMode: w, show: D, onNowKeyDown: E, unstyled: g } = this.props, m = g && g.uTime;
124
112
  this.snapTime = N(B(this.steps, this.min)), this.dateFormatParts = this.intl.splitDateFormat(i || a.defaultProps.format).filter(this.timeFormatFilter);
125
113
  const F = l(
126
114
  h.part({
@@ -149,63 +137,55 @@ const v = new RegExp(`${d.hour}|${d.minute}|${d.second}|${d.dayperiod}|literal`)
149
137
  tabIndex: r ? -1 : 0
150
138
  },
151
139
  b.toLanguageString(I, x[I])
152
- )), /* @__PURE__ */ n.createElement(
140
+ )), /* @__PURE__ */ n.createElement("div", { className: l(h.listContainer({ c: m })), onKeyDown: this.handleKeyDown }, /* @__PURE__ */ n.createElement("span", { className: l(h.highlight({ c: m })) }), this.dateFormatParts.map((u, c) => u.type !== "literal" ? /* @__PURE__ */ n.createElement(
153
141
  "div",
154
142
  {
155
- className: l(h.listContainer({ c: m })),
156
- onKeyDown: this.handleKeyDown
143
+ key: c,
144
+ className: l(
145
+ h.listWrapper({
146
+ c: m,
147
+ focused: c === this.state.activeListIndex
148
+ })
149
+ ),
150
+ role: "presentation",
151
+ tabIndex: -1
157
152
  },
158
- /* @__PURE__ */ n.createElement("span", { className: l(h.highlight({ c: m })) }),
159
- this.dateFormatParts.map((u, c) => u.type !== "literal" ? /* @__PURE__ */ n.createElement(
160
- "div",
153
+ /* @__PURE__ */ n.createElement(
154
+ "span",
161
155
  {
162
- key: c,
163
- className: l(
164
- h.listWrapper({
165
- c: m,
166
- focused: c === this.state.activeListIndex
167
- })
168
- ),
169
- role: "presentation",
170
- tabIndex: -1
171
- },
172
- /* @__PURE__ */ n.createElement("span", { className: l(h.title({ c: m })), onMouseDown: (p) => {
173
- p.preventDefault();
174
- } }, this.intl.dateFieldName(u)),
175
- /* @__PURE__ */ n.createElement(
176
- P,
177
- {
178
- min: this.min,
179
- max: this.max,
180
- boundRange: this.boundRange,
181
- part: u,
182
- step: u.type ? this.steps[u.type] : 1,
183
- smoothScroll: s,
184
- ref: (p) => {
185
- p && this.timeLists.push(p);
186
- },
187
- id: c,
188
- onFocus: () => {
189
- this.handleListFocus(c);
190
- },
191
- onBlur: this.handleListBlur,
192
- onChange: this.handleChange,
193
- value: this.value,
194
- disabled: r,
195
- show: D,
196
- mobileMode: w,
197
- unstyled: g
156
+ className: l(h.title({ c: m })),
157
+ onMouseDown: (p) => {
158
+ p.preventDefault();
198
159
  }
199
- )
200
- ) : /* @__PURE__ */ n.createElement(
201
- "div",
202
- {
203
- key: c,
204
- className: l(h.separator({ c: m }))
205
160
  },
206
- u.pattern
207
- ))
208
- ));
161
+ this.intl.dateFieldName(u)
162
+ ),
163
+ /* @__PURE__ */ n.createElement(
164
+ P,
165
+ {
166
+ min: this.min,
167
+ max: this.max,
168
+ boundRange: this.boundRange,
169
+ part: u,
170
+ step: u.type ? this.steps[u.type] : 1,
171
+ smoothScroll: s,
172
+ ref: (p) => {
173
+ p && this.timeLists.push(p);
174
+ },
175
+ id: c,
176
+ onFocus: () => {
177
+ this.handleListFocus(c);
178
+ },
179
+ onBlur: this.handleListBlur,
180
+ onChange: this.handleChange,
181
+ value: this.value,
182
+ disabled: r,
183
+ show: D,
184
+ mobileMode: w,
185
+ unstyled: g
186
+ }
187
+ )
188
+ ) : /* @__PURE__ */ n.createElement("div", { key: c, className: l(h.separator({ c: m })) }, u.pattern))));
209
189
  }
210
190
  nextTick(i) {
211
191
  clearTimeout(this.nextTickId), this.nextTickId = window.setTimeout(() => i());