@progress/kendo-react-dateinputs 4.14.1 → 5.0.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.
Files changed (47) hide show
  1. package/dist/cdn/js/kendo-react-dateinputs.js +1 -1
  2. package/dist/es/calendar/components/CalendarHeaderTitle.js +1 -1
  3. package/dist/es/calendar/components/MultiViewCalendar.js +2 -2
  4. package/dist/es/calendar/services/DOMService.js +1 -1
  5. package/dist/es/common/PickerWrap.d.ts +4 -2
  6. package/dist/es/common/PickerWrap.js +2 -1
  7. package/dist/es/dateinput/DateInput.d.ts +43 -0
  8. package/dist/es/dateinput/DateInput.js +26 -20
  9. package/dist/es/datepicker/DatePicker.d.ts +43 -1
  10. package/dist/es/datepicker/DatePicker.js +30 -21
  11. package/dist/es/datepicker/ToggleButton.d.ts +3 -13
  12. package/dist/es/datepicker/ToggleButton.js +2 -6
  13. package/dist/es/datepicker/models/DatePickerSettings.d.ts +1 -2
  14. package/dist/es/daterangepicker/DateRangePicker.d.ts +6 -1
  15. package/dist/es/daterangepicker/DateRangePicker.js +1 -1
  16. package/dist/es/datetimepicker/DateTimePicker.d.ts +43 -1
  17. package/dist/es/datetimepicker/DateTimePicker.js +34 -26
  18. package/dist/es/datetimepicker/DateTimeSelector.js +1 -1
  19. package/dist/es/package-metadata.js +1 -1
  20. package/dist/es/timepicker/TimePart.js +1 -1
  21. package/dist/es/timepicker/TimePicker.d.ts +43 -7
  22. package/dist/es/timepicker/TimePicker.js +32 -35
  23. package/dist/es/timepicker/TimeSelector.js +1 -1
  24. package/dist/npm/calendar/components/CalendarHeaderTitle.js +1 -1
  25. package/dist/npm/calendar/components/MultiViewCalendar.js +2 -2
  26. package/dist/npm/calendar/services/DOMService.js +1 -1
  27. package/dist/npm/common/PickerWrap.d.ts +4 -2
  28. package/dist/npm/common/PickerWrap.js +2 -1
  29. package/dist/npm/dateinput/DateInput.d.ts +43 -0
  30. package/dist/npm/dateinput/DateInput.js +25 -19
  31. package/dist/npm/datepicker/DatePicker.d.ts +43 -1
  32. package/dist/npm/datepicker/DatePicker.js +30 -21
  33. package/dist/npm/datepicker/ToggleButton.d.ts +3 -13
  34. package/dist/npm/datepicker/ToggleButton.js +2 -6
  35. package/dist/npm/datepicker/models/DatePickerSettings.d.ts +1 -2
  36. package/dist/npm/daterangepicker/DateRangePicker.d.ts +6 -1
  37. package/dist/npm/daterangepicker/DateRangePicker.js +1 -1
  38. package/dist/npm/datetimepicker/DateTimePicker.d.ts +43 -1
  39. package/dist/npm/datetimepicker/DateTimePicker.js +33 -25
  40. package/dist/npm/datetimepicker/DateTimeSelector.js +1 -1
  41. package/dist/npm/package-metadata.js +1 -1
  42. package/dist/npm/timepicker/TimePart.js +1 -1
  43. package/dist/npm/timepicker/TimePicker.d.ts +43 -7
  44. package/dist/npm/timepicker/TimePicker.js +31 -34
  45. package/dist/npm/timepicker/TimeSelector.js +1 -1
  46. package/dist/systemjs/kendo-react-dateinputs.js +1 -1
  47. package/package.json +13 -13
@@ -35,6 +35,43 @@ export interface DatePickerProps extends DatePickerSettings, FormComponentProps
35
35
  * > The `value` has to be a valid [JavaScript `Date`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Date) instance.
36
36
  */
37
37
  value?: Date | null;
38
+ /**
39
+ * Configures the `size` of the DatePicker.
40
+ *
41
+ * The available options are:
42
+ * - small
43
+ * - medium
44
+ * - large
45
+ * - null—Does not set a size `className`.
46
+ *
47
+ * @default `medium`
48
+ */
49
+ size?: null | 'small' | 'medium' | 'large';
50
+ /**
51
+ * Configures the `roundness` of the DatePicker.
52
+ *
53
+ * The available options are:
54
+ * - small
55
+ * - medium
56
+ * - large
57
+ * - full
58
+ * - null—Does not set a rounded `className`.
59
+ *
60
+ * @default `medium`
61
+ */
62
+ rounded?: null | 'small' | 'medium' | 'large' | 'full';
63
+ /**
64
+ * Configures the `fillMode` of the DatePicker.
65
+ *
66
+ * The available options are:
67
+ * - solid
68
+ * - outline
69
+ * - flat
70
+ * - null—Does not set a fillMode `className`.
71
+ *
72
+ * @default `solid`
73
+ */
74
+ fillMode?: null | 'solid' | 'flat' | 'outline';
38
75
  }
39
76
  /**
40
77
  * @hidden
@@ -105,6 +142,9 @@ export declare class DatePickerWithoutContext extends React.Component<DatePicker
105
142
  required: PropTypes.Requireable<boolean>;
106
143
  validate: PropTypes.Requireable<boolean>;
107
144
  valid: PropTypes.Requireable<boolean>;
145
+ size: PropTypes.Requireable<"small" | "medium" | "large">;
146
+ rounded: PropTypes.Requireable<"small" | "medium" | "large" | "full">;
147
+ fillMode: PropTypes.Requireable<"solid" | "flat" | "outline">;
108
148
  };
109
149
  /**
110
150
  * @hidden
@@ -126,6 +166,9 @@ export declare class DatePickerWithoutContext extends React.Component<DatePicker
126
166
  weekNumber: boolean;
127
167
  required: boolean;
128
168
  validityStyles: boolean;
169
+ size: "small" | "medium" | "large";
170
+ rounded: "small" | "medium" | "large" | "full";
171
+ fillMode: "solid" | "flat" | "outline";
129
172
  };
130
173
  /**
131
174
  * @hidden
@@ -133,7 +176,6 @@ export declare class DatePickerWithoutContext extends React.Component<DatePicker
133
176
  readonly state: DatePickerState;
134
177
  private _popupId;
135
178
  private _element;
136
- private _wrapper;
137
179
  private _dateInput;
138
180
  private _calendar;
139
181
  private valueDuringOnChange?;
@@ -38,7 +38,6 @@ var PropTypes = require("prop-types");
38
38
  var kendo_react_popup_1 = require("@progress/kendo-react-popup");
39
39
  var kendo_date_math_1 = require("@progress/kendo-date-math");
40
40
  var kendo_react_common_1 = require("@progress/kendo-react-common");
41
- var kendo_react_common_2 = require("@progress/kendo-react-common");
42
41
  var package_metadata_1 = require("../package-metadata");
43
42
  var DateInput_1 = require("../dateinput/DateInput");
44
43
  var Calendar_1 = require("../calendar/components/Calendar");
@@ -56,7 +55,6 @@ var DatePickerWithoutContext = /** @class */ (function (_super) {
56
55
  var _this = _super.call(this, props) || this;
57
56
  _this._popupId = kendo_react_common_1.guid();
58
57
  _this._element = null;
59
- _this._wrapper = null;
60
58
  _this._dateInput = React.createRef();
61
59
  _this._calendar = null;
62
60
  _this.shouldFocusDateInput = false;
@@ -140,7 +138,7 @@ var DatePickerWithoutContext = /** @class */ (function (_super) {
140
138
  _this.setShow(keyCode === kendo_react_common_1.Keys.down);
141
139
  }
142
140
  };
143
- kendo_react_common_2.validatePackage(package_metadata_1.packageMetadata);
141
+ kendo_react_common_1.validatePackage(package_metadata_1.packageMetadata);
144
142
  _this.state = {
145
143
  value: _this.props.defaultValue || DatePickerWithoutContext.defaultProps.defaultValue,
146
144
  show: _this.props.defaultShow || DatePickerWithoutContext.defaultProps.defaultShow,
@@ -350,18 +348,12 @@ var DatePickerWithoutContext = /** @class */ (function (_super) {
350
348
  */
351
349
  DatePickerWithoutContext.prototype.render = function () {
352
350
  var _this = this;
353
- var _a = this.props, disabled = _a.disabled, tabIndex = _a.tabIndex, title = _a.title, id = _a.id, format = _a.format, formatPlaceholder = _a.formatPlaceholder, min = _a.min, max = _a.max, weekNumber = _a.weekNumber, focusedDate = _a.focusedDate, className = _a.className, width = _a.width, name = _a.name, validationMessage = _a.validationMessage, required = _a.required, validityStyles = _a.validityStyles, ariaLabelledBy = _a.ariaLabelledBy, ariaDescribedBy = _a.ariaDescribedBy;
354
- var _b = this.props.popupSettings, popupClass = _b.popupClass, otherPopupSettings = __rest(_b, ["popupClass"]);
351
+ var _a = this.props, _b = _a.size, size = _b === void 0 ? DatePickerWithoutContext.defaultProps.size : _b, _c = _a.rounded, rounded = _c === void 0 ? DatePickerWithoutContext.defaultProps.rounded : _c, _d = _a.fillMode, fillMode = _d === void 0 ? DatePickerWithoutContext.defaultProps.fillMode : _d, disabled = _a.disabled, tabIndex = _a.tabIndex, title = _a.title, id = _a.id, format = _a.format, formatPlaceholder = _a.formatPlaceholder, min = _a.min, max = _a.max, weekNumber = _a.weekNumber, focusedDate = _a.focusedDate, className = _a.className, width = _a.width, name = _a.name, validationMessage = _a.validationMessage, required = _a.required, validityStyles = _a.validityStyles, ariaLabelledBy = _a.ariaLabelledBy, ariaDescribedBy = _a.ariaDescribedBy;
352
+ var _e = this.props.popupSettings, popupClass = _e.popupClass, otherPopupSettings = __rest(_e, ["popupClass"]);
355
353
  var show = this.show;
356
354
  var value = this.value;
357
355
  var sanitizedValue = value && kendo_date_math_1.getDate(value);
358
356
  var isValid = !this.validityStyles || this.validity.valid;
359
- var rootClassName = kendo_react_common_1.classNames('k-widget k-datepicker', className);
360
- var wrapperClassNames = kendo_react_common_1.classNames('k-picker-wrap', {
361
- 'k-state-invalid': !isValid,
362
- 'k-state-disabled': disabled,
363
- 'k-state-focused': this.state.focused
364
- });
365
357
  var popupClassNames = kendo_react_common_1.classNames('k-calendar-container k-group k-reset', popupClass);
366
358
  var dateInputProps = {
367
359
  disabled: disabled,
@@ -384,9 +376,12 @@ var DatePickerWithoutContext = /** @class */ (function (_super) {
384
376
  label: undefined,
385
377
  placeholder: !this.state.focused ? this.props.placeholder : null,
386
378
  ariaHasPopup: true,
387
- ariaExpanded: this.show
379
+ ariaExpanded: this.show,
380
+ size: null,
381
+ fillMode: null,
382
+ rounded: null
388
383
  };
389
- var popupProps = __assign({ show: show, anchor: this._wrapper || this._element, className: popupClassNames, id: this._popupId, anchorAlign: {
384
+ var popupProps = __assign({ show: show, anchor: this._element, className: popupClassNames, id: this._popupId, anchorAlign: {
390
385
  horizontal: 'left',
391
386
  vertical: 'bottom'
392
387
  }, popupAlign: {
@@ -402,14 +397,22 @@ var DatePickerWithoutContext = /** @class */ (function (_super) {
402
397
  focusedDate: focusedDate,
403
398
  onChange: this.handleCalendarValueChange
404
399
  };
400
+ var toggleButtonTitle = kendo_react_intl_1.provideLocalizationService(this)
401
+ .toLanguageString(messages_1.toggleCalendar, messages_1.messages[messages_1.toggleCalendar]);
405
402
  var datepicker = (React.createElement(kendo_react_common_1.AsyncFocusBlur, { onFocus: this.handleFocus, onBlur: this.handleBlur, onSyncBlur: this.props.onBlur, onSyncFocus: this.props.onFocus }, function (_a) {
406
403
  var onFocus = _a.onFocus, onBlur = _a.onBlur;
407
- return (React.createElement("span", { role: "group", "aria-expanded": _this.show, ref: function (span) { _this._element = span; }, className: rootClassName, onKeyDown: _this.handleKeyDown, style: { width: width }, onFocus: onFocus, onBlur: onBlur },
408
- React.createElement(_this.pickerWrapComp, { _ref: function (span) { _this._wrapper = span; }, className: wrapperClassNames },
409
- React.createElement(_this.dateInputComp, __assign({ _ref: _this._dateInput }, dateInputProps)),
410
- React.createElement(_this.toggleButtonComp, { onMouseDown: _this.handleIconMouseDown, onClick: _this.handleIconClick, title: kendo_react_intl_1.provideLocalizationService(_this)
411
- .toLanguageString(messages_1.toggleCalendar, messages_1.messages[messages_1.toggleCalendar]), className: "k-select" },
412
- React.createElement("span", { className: "k-icon k-i-calendar" }))),
404
+ var _b;
405
+ return (React.createElement("span", { role: "group", "aria-expanded": _this.show, ref: function (span) { _this._element = span; }, className: kendo_react_common_1.classNames('k-input', 'k-datepicker', (_b = {},
406
+ _b["k-input-" + (kendo_react_common_1.kendoThemeMaps.sizeMap[size] || size)] = size,
407
+ _b["k-rounded-" + (kendo_react_common_1.kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded,
408
+ _b["k-input-" + fillMode] = fillMode,
409
+ _b['k-valid'] = isValid,
410
+ _b['k-invalid'] = !isValid,
411
+ _b['k-required'] = _this.required,
412
+ _b['k-disabled'] = _this.props.disabled,
413
+ _b), className), onKeyDown: _this.handleKeyDown, style: { width: width }, onFocus: onFocus, onBlur: onBlur },
414
+ React.createElement(_this.dateInputComp, __assign({ _ref: _this._dateInput }, dateInputProps)),
415
+ React.createElement(_this.toggleButtonComp, { type: "button", icon: "calendar", title: toggleButtonTitle, className: "k-input-button", onClick: _this.handleIconClick, "aria-label": toggleButtonTitle, onMouseDown: _this.handleIconMouseDown }),
413
416
  React.createElement(_this.popupComp, __assign({}, popupProps),
414
417
  React.createElement(_this.calendarComp, __assign({ _ref: _this.setCalendarRef }, calendarProps)))));
415
418
  }));
@@ -497,7 +500,10 @@ var DatePickerWithoutContext = /** @class */ (function (_super) {
497
500
  validationMessage: PropTypes.string,
498
501
  required: PropTypes.bool,
499
502
  validate: PropTypes.bool,
500
- valid: PropTypes.bool
503
+ valid: PropTypes.bool,
504
+ size: PropTypes.oneOf([null, 'small', 'medium', 'large']),
505
+ rounded: PropTypes.oneOf([null, 'small', 'medium', 'large', 'full']),
506
+ fillMode: PropTypes.oneOf([null, 'solid', 'flat', 'outline'])
501
507
  };
502
508
  /**
503
509
  * @hidden
@@ -518,7 +524,10 @@ var DatePickerWithoutContext = /** @class */ (function (_super) {
518
524
  tabIndex: 0,
519
525
  weekNumber: false,
520
526
  required: false,
521
- validityStyles: true
527
+ validityStyles: true,
528
+ size: 'medium',
529
+ rounded: 'medium',
530
+ fillMode: 'solid'
522
531
  };
523
532
  return DatePickerWithoutContext;
524
533
  }(React.Component));
@@ -1,20 +1,10 @@
1
- import * as React from 'react';
1
+ import { Button, ButtonProps } from '@progress/kendo-react-buttons';
2
2
  /**
3
3
  * Represents the props of the KendoReact [Toggle Button]({% slug api_dateinputs_togglebutton %}) component.
4
4
  */
5
- export interface ToggleButtonProps {
6
- id?: string;
7
- tabIndex?: number;
8
- className?: string;
9
- children?: React.ReactNode;
10
- style?: React.CSSProperties;
11
- title?: string;
12
- onClick?: (event: React.MouseEvent) => void;
13
- onMouseDown?: (event: React.MouseEvent) => void;
14
- onMouseUp?: (event: React.MouseEvent) => void;
15
- [wildcard: string]: any;
5
+ export interface ToggleButtonProps extends ButtonProps {
16
6
  }
17
7
  /**
18
8
  * Represents the default `toggleButton` component rendered by the [KendoReact Scheduler DatePicker]({% slug overview_datepicker %}).
19
9
  */
20
- export declare const ToggleButton: React.ForwardRefExoticComponent<Pick<ToggleButtonProps, string | number> & React.RefAttributes<HTMLAnchorElement>>;
10
+ export declare const ToggleButton: typeof Button;
@@ -1,11 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- var React = require("react");
4
- var kendo_react_common_1 = require("@progress/kendo-react-common");
3
+ var kendo_react_buttons_1 = require("@progress/kendo-react-buttons");
5
4
  /**
6
5
  * Represents the default `toggleButton` component rendered by the [KendoReact Scheduler DatePicker]({% slug overview_datepicker %}).
7
6
  */
8
- exports.ToggleButton = React.forwardRef(function (props, ref) {
9
- var className = kendo_react_common_1.classNames('k-select', props.className);
10
- return (React.createElement("a", { ref: ref, id: props.id, role: "button", style: props.style, className: className, tabIndex: props.tabIndex, title: props.title, "aria-label": props.title, onMouseDown: props.onMouseDown, onClick: props.onClick, onMouseUp: props.onMouseUp }, props.children));
11
- });
7
+ exports.ToggleButton = kendo_react_buttons_1.Button;
@@ -12,8 +12,7 @@ import { PickerWrapProps } from '../../common/PickerWrap';
12
12
  */
13
13
  export interface DatePickerSettings {
14
14
  /**
15
- * Enables the customization or the override of the default wrapping component around the `DateInput` and `ToggleButton` rendered by the DatePicker
16
- * ([see example]({% slug custom_rendering_datepicker %}#toc-customizing-the-toggle-button)).
15
+ * @deprecated The `DatePicker` no longer renders a `wrapper` around the DatePicker.
17
16
  */
18
17
  pickerWrap?: React.ComponentType<PickerWrapProps>;
19
18
  /**
@@ -93,7 +93,9 @@ export declare class DateRangePickerWithoutContext extends React.Component<DateR
93
93
  year: PropTypes.Requireable<string>;
94
94
  month: PropTypes.Requireable<string>;
95
95
  day: PropTypes.Requireable<string>;
96
- hour: PropTypes.Requireable<string>;
96
+ hour: PropTypes.Requireable<string>; /**
97
+ * @hidden
98
+ */
97
99
  minute: PropTypes.Requireable<string>;
98
100
  second: PropTypes.Requireable<string>;
99
101
  }>>;
@@ -124,6 +126,9 @@ export declare class DateRangePickerWithoutContext extends React.Component<DateR
124
126
  required: PropTypes.Requireable<boolean>;
125
127
  validate: PropTypes.Requireable<boolean>;
126
128
  valid: PropTypes.Requireable<boolean>;
129
+ size: PropTypes.Requireable<"small" | "medium" | "large">;
130
+ rounded: PropTypes.Requireable<"small" | "medium" | "large" | "full">;
131
+ fillMode: PropTypes.Requireable<"solid" | "flat" | "outline">;
127
132
  }>>;
128
133
  focusedDate: PropTypes.Requireable<Date>;
129
134
  format: PropTypes.Requireable<string | PropTypes.InferProps<{
@@ -349,7 +349,7 @@ var DateRangePickerWithoutContext = /** @class */ (function (_super) {
349
349
  var calendar = this.props.calendar
350
350
  ? React.createElement(this.props.calendar, __assign({}, calendarProps))
351
351
  : React.createElement(MultiViewCalendar_1.MultiViewCalendar, __assign({}, calendarProps, { ref: this.setCalendarRef }));
352
- var reverseButton = (React.createElement(kendo_react_buttons_1.Button, __assign({ className: "k-select", look: "flat", title: kendo_react_intl_1.provideLocalizationService(this)
352
+ var reverseButton = (React.createElement(kendo_react_buttons_1.Button, __assign({ className: "k-select", fillMode: "flat", title: kendo_react_intl_1.provideLocalizationService(this)
353
353
  .toLanguageString(messages_1.swapStartEnd, messages_1.messages[messages_1.swapStartEnd]), onMouseDown: this.handleReverseMouseDown, onClick: this.handleReverseClick }, {
354
354
  'aria-controls': startDateInputId + ' ' + endDateInputId,
355
355
  'aria-label': kendo_react_intl_1.provideLocalizationService(this)
@@ -37,6 +37,43 @@ export interface DateTimePickerProps extends DateTimePickerSettings, FormCompone
37
37
  * [JavaScript `Date`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Date) instance.
38
38
  */
39
39
  value?: Date | null;
40
+ /**
41
+ * Configures the `size` of the DateTimePicker.
42
+ *
43
+ * The available options are:
44
+ * - small
45
+ * - medium
46
+ * - large
47
+ * - null&mdash;Does not set a size `className`.
48
+ *
49
+ * @default `medium`
50
+ */
51
+ size?: null | 'small' | 'medium' | 'large';
52
+ /**
53
+ * Configures the `roundness` of the DateTimePicker.
54
+ *
55
+ * The available options are:
56
+ * - small
57
+ * - medium
58
+ * - large
59
+ * - full
60
+ * - null&mdash;Does not set a rounded `className`.
61
+ *
62
+ * @default `medium`
63
+ */
64
+ rounded?: null | 'small' | 'medium' | 'large' | 'full';
65
+ /**
66
+ * Configures the `fillMode` of the DateTimePicker.
67
+ *
68
+ * The available options are:
69
+ * - solid
70
+ * - outline
71
+ * - flat
72
+ * - null&mdash;Does not set a fillMode `className`.
73
+ *
74
+ * @default `solid`
75
+ */
76
+ fillMode?: null | 'solid' | 'flat' | 'outline';
40
77
  }
41
78
  /**
42
79
  * @hidden
@@ -108,6 +145,9 @@ export declare class DateTimePickerWithoutContext extends React.Component<DateTi
108
145
  validate: PropTypes.Requireable<boolean>;
109
146
  valid: PropTypes.Requireable<boolean>;
110
147
  cancelButton: PropTypes.Requireable<boolean>;
148
+ size: PropTypes.Requireable<"small" | "medium" | "large">;
149
+ rounded: PropTypes.Requireable<"small" | "medium" | "large" | "full">;
150
+ fillMode: PropTypes.Requireable<"solid" | "flat" | "outline">;
111
151
  };
112
152
  /**
113
153
  * @hidden
@@ -126,6 +166,9 @@ export declare class DateTimePickerWithoutContext extends React.Component<DateTi
126
166
  validityStyles: boolean;
127
167
  cancelButton: boolean;
128
168
  dateInput: React.ComponentType<DateInputProps<any>>;
169
+ size: "small" | "medium" | "large";
170
+ rounded: "small" | "medium" | "large" | "full";
171
+ fillMode: "solid" | "flat" | "outline";
129
172
  };
130
173
  /**
131
174
  * @hidden
@@ -133,7 +176,6 @@ export declare class DateTimePickerWithoutContext extends React.Component<DateTi
133
176
  readonly state: DateTimePickerState;
134
177
  private _popupId;
135
178
  private _element;
136
- private _wrapper;
137
179
  private _dateInput;
138
180
  private _dateTimeSelector;
139
181
  private valueDuringOnChange?;
@@ -31,6 +31,7 @@ var kendo_date_math_1 = require("@progress/kendo-date-math");
31
31
  var kendo_react_common_1 = require("@progress/kendo-react-common");
32
32
  var DateInput_1 = require("../dateinput/DateInput");
33
33
  var kendo_react_common_2 = require("@progress/kendo-react-common");
34
+ var kendo_react_buttons_1 = require("@progress/kendo-react-buttons");
34
35
  var package_metadata_1 = require("../package-metadata");
35
36
  var utils_1 = require("../utils");
36
37
  var messages_1 = require("../messages");
@@ -46,7 +47,6 @@ var DateTimePickerWithoutContext = /** @class */ (function (_super) {
46
47
  var _this = _super.call(this, props) || this;
47
48
  _this._popupId = kendo_react_common_1.guid();
48
49
  _this._element = null;
49
- _this._wrapper = null;
50
50
  _this._dateInput = React.createRef();
51
51
  _this._dateTimeSelector = null;
52
52
  _this.shouldFocusDateInput = false;
@@ -118,7 +118,7 @@ var DateTimePickerWithoutContext = /** @class */ (function (_super) {
118
118
  };
119
119
  _this.dateInputElement = function () {
120
120
  return (_this.dateInput && _this.dateInput.element) ||
121
- (_this._wrapper && _this._wrapper.querySelector('.k-dateinput-wrap > input.k-input'));
121
+ (_this.element && _this.element.querySelector('.k-dateinput > input.k-input-inner'));
122
122
  };
123
123
  kendo_react_common_2.validatePackage(package_metadata_1.packageMetadata);
124
124
  _this.state = {
@@ -296,15 +296,8 @@ var DateTimePickerWithoutContext = /** @class */ (function (_super) {
296
296
  */
297
297
  DateTimePickerWithoutContext.prototype.render = function () {
298
298
  var _this = this;
299
- var _a = this.props, disabled = _a.disabled, tabIndex = _a.tabIndex, title = _a.title, id = _a.id, format = _a.format, formatPlaceholder = _a.formatPlaceholder, min = _a.min, max = _a.max, weekNumber = _a.weekNumber, focusedDate = _a.focusedDate, className = _a.className, width = _a.width, name = _a.name, validationMessage = _a.validationMessage, required = _a.required, validityStyles = _a.validityStyles, cancelButton = _a.cancelButton, minTime = _a.minTime, maxTime = _a.maxTime, ariaLabelledBy = _a.ariaLabelledBy, ariaDescribedBy = _a.ariaDescribedBy, _b = _a.popup, PopupComponent = _b === void 0 ? kendo_react_popup_1.Popup : _b, calendar = _a.calendar;
299
+ var _a = this.props, _b = _a.size, size = _b === void 0 ? DateTimePickerWithoutContext.defaultProps.size : _b, _c = _a.rounded, rounded = _c === void 0 ? DateTimePickerWithoutContext.defaultProps.rounded : _c, _d = _a.fillMode, fillMode = _d === void 0 ? DateTimePickerWithoutContext.defaultProps.fillMode : _d, disabled = _a.disabled, tabIndex = _a.tabIndex, title = _a.title, id = _a.id, format = _a.format, formatPlaceholder = _a.formatPlaceholder, min = _a.min, max = _a.max, weekNumber = _a.weekNumber, focusedDate = _a.focusedDate, className = _a.className, width = _a.width, name = _a.name, validationMessage = _a.validationMessage, required = _a.required, validityStyles = _a.validityStyles, cancelButton = _a.cancelButton, minTime = _a.minTime, maxTime = _a.maxTime, ariaLabelledBy = _a.ariaLabelledBy, ariaDescribedBy = _a.ariaDescribedBy, _e = _a.popup, PopupComponent = _e === void 0 ? kendo_react_popup_1.Popup : _e, calendar = _a.calendar;
300
300
  var isValid = !this.validityStyles || this.validity.valid;
301
- var rootClassName = kendo_react_common_1.classNames('k-widget k-datetimepicker', {
302
- 'k-state-invalid': !isValid
303
- }, className);
304
- var wrapperClassNames = kendo_react_common_1.classNames('k-picker-wrap', {
305
- 'k-state-disabled': disabled,
306
- 'k-state-focused': this.state.focused
307
- });
308
301
  var dataInputProps = {
309
302
  id: id, ariaLabelledBy: ariaLabelledBy, ariaDescribedBy: ariaDescribedBy, format: format, formatPlaceholder: formatPlaceholder, disabled: disabled,
310
303
  title: title, validityStyles: validityStyles, validationMessage: validationMessage, required: required, min: min, max: max, minTime: minTime, maxTime: maxTime, name: name,
@@ -316,24 +309,33 @@ var DateTimePickerWithoutContext = /** @class */ (function (_super) {
316
309
  label: undefined,
317
310
  placeholder: !this.state.focused ? this.props.placeholder : null,
318
311
  ariaHasPopup: true,
319
- ariaExpanded: this.show
312
+ ariaExpanded: this.show,
313
+ size: null,
314
+ fillMode: null,
315
+ rounded: null
320
316
  };
321
317
  var dateTimePicker = (React.createElement(kendo_react_common_1.AsyncFocusBlur, { onFocus: this.handleFocus, onBlur: this.handleBlur, onSyncFocus: this.props.onFocus, onSyncBlur: this.props.onBlur }, function (_a) {
322
318
  var onFocus = _a.onFocus, onBlur = _a.onBlur;
319
+ var _b;
323
320
  return (React.createElement("div", { ref: function (div) {
324
321
  _this._element = div;
325
- }, className: rootClassName, onKeyDown: _this.handleKeyDown, style: { width: width }, onFocus: onFocus, onBlur: onBlur },
326
- React.createElement("div", { ref: function (span) { _this._wrapper = span; }, className: wrapperClassNames },
327
- React.createElement(_this.dateInputComp, __assign({ _ref: _this._dateInput }, dataInputProps)),
328
- React.createElement("span", __assign({ role: "button", onMouseDown: _this.handleIconMouseDown, onClick: _this.handleDateIconClick, title: kendo_react_intl_1.provideLocalizationService(_this)
329
- .toLanguageString(messages_1.toggleDateTimeSelector, messages_1.messages[messages_1.toggleDateTimeSelector]), className: "k-select" }, {
330
- 'aria-controls': _this._popupId,
331
- 'aria-label': kendo_react_intl_1.provideLocalizationService(_this)
332
- .toLanguageString(messages_1.toggleDateTimeSelector, messages_1.messages[messages_1.toggleDateTimeSelector])
333
- }),
334
- React.createElement("span", { className: "k-link k-link-date" },
335
- React.createElement("span", { className: "k-icon k-i-calendar" })))),
336
- React.createElement(PopupComponent, { show: _this.show, animate: _this._wrapper !== null, anchor: _this._wrapper, className: "k-datetime-container k-group k-reset", id: _this._popupId, anchorAlign: {
322
+ }, className: kendo_react_common_1.classNames('k-input', 'k-datetimepicker', (_b = {},
323
+ _b["k-input-" + (kendo_react_common_1.kendoThemeMaps.sizeMap[size] || size)] = size,
324
+ _b["k-rounded-" + (kendo_react_common_1.kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded,
325
+ _b["k-input-" + fillMode] = fillMode,
326
+ _b['k-valid'] = isValid,
327
+ _b['k-invalid'] = !isValid,
328
+ _b['k-required'] = _this.required,
329
+ _b['k-disabled'] = _this.props.disabled,
330
+ _b), className), onKeyDown: _this.handleKeyDown, style: { width: width }, onFocus: onFocus, onBlur: onBlur },
331
+ React.createElement(_this.dateInputComp, __assign({ _ref: _this._dateInput }, dataInputProps)),
332
+ React.createElement(kendo_react_buttons_1.Button, __assign({ type: "button", icon: 'calendar', onMouseDown: _this.handleIconMouseDown, onClick: _this.handleDateIconClick, title: kendo_react_intl_1.provideLocalizationService(_this)
333
+ .toLanguageString(messages_1.toggleDateTimeSelector, messages_1.messages[messages_1.toggleDateTimeSelector]), className: "k-input-button" }, {
334
+ 'aria-controls': _this._popupId,
335
+ 'aria-label': kendo_react_intl_1.provideLocalizationService(_this)
336
+ .toLanguageString(messages_1.toggleDateTimeSelector, messages_1.messages[messages_1.toggleDateTimeSelector])
337
+ })),
338
+ React.createElement(PopupComponent, { show: _this.show, animate: _this.element !== null, anchor: _this.element, className: "k-datetime-container k-group k-reset", id: _this._popupId, anchorAlign: {
337
339
  horizontal: 'left',
338
340
  vertical: 'bottom'
339
341
  }, popupAlign: {
@@ -424,7 +426,10 @@ var DateTimePickerWithoutContext = /** @class */ (function (_super) {
424
426
  required: PropTypes.bool,
425
427
  validate: PropTypes.bool,
426
428
  valid: PropTypes.bool,
427
- cancelButton: PropTypes.bool
429
+ cancelButton: PropTypes.bool,
430
+ size: PropTypes.oneOf([null, 'small', 'medium', 'large']),
431
+ rounded: PropTypes.oneOf([null, 'small', 'medium', 'large', 'full']),
432
+ fillMode: PropTypes.oneOf([null, 'solid', 'flat', 'outline'])
428
433
  };
429
434
  /**
430
435
  * @hidden
@@ -442,7 +447,10 @@ var DateTimePickerWithoutContext = /** @class */ (function (_super) {
442
447
  required: false,
443
448
  validityStyles: true,
444
449
  cancelButton: true,
445
- dateInput: DateInput_1.DateInput
450
+ dateInput: DateInput_1.DateInput,
451
+ size: 'medium',
452
+ rounded: 'medium',
453
+ fillMode: 'solid'
446
454
  };
447
455
  return DateTimePickerWithoutContext;
448
456
  }(React.Component));
@@ -208,7 +208,7 @@ var DateTimeSelector = /** @class */ (function (_super) {
208
208
  React.createElement("div", { className: "k-datetime-time-wrap" }, React.createElement(TimePart_1.TimePart, { key: 1, onNowClick: this.handleNowClick, disabled: disabled || this.state.tab !== 'time', ref: function (timePart) { _this._timePart = timePart; }, min: this.minTime || utils_1.MIN_TIME, max: this.maxTime || utils_1.MAX_TIME, steps: this.props.steps, value: this.state.timeValue, format: format, onChange: this.handleTimeListContainerChange, onMount: this.handleTimePartMount }))),
209
209
  React.createElement("div", { className: "k-datetime-footer k-actions k-hstack k-justify-content-stretch" },
210
210
  cancelButton && React.createElement(kendo_react_buttons_1.Button, __assign({ type: "button", ref: function (btn) { _this._cancelButton = btn; }, className: "k-time-cancel", onClick: this.handleReject, title: cancelMessage }, { 'aria-label': cancelMessage }), cancelMessage),
211
- React.createElement(kendo_react_buttons_1.Button, __assign({ type: "button", ref: function (btn) { _this._acceptButton = btn; }, className: "k-time-accept", disabled: !this.hasDateValue, onClick: this.handleAccept, title: setMessage }, { 'aria-label': setMessage }), setMessage))));
211
+ React.createElement(kendo_react_buttons_1.Button, __assign({ type: "button", themeColor: "primary", ref: function (btn) { _this._acceptButton = btn; }, className: "k-time-accept", disabled: !this.hasDateValue, onClick: this.handleAccept, title: setMessage }, { 'aria-label': setMessage }), setMessage))));
212
212
  };
213
213
  Object.defineProperty(DateTimeSelector.prototype, "minTime", {
214
214
  get: function () {
@@ -7,7 +7,7 @@ exports.packageMetadata = {
7
7
  name: '@progress/kendo-react-dateinputs',
8
8
  productName: 'KendoReact',
9
9
  productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
10
- publishDate: 1642516221,
10
+ publishDate: 1642764822,
11
11
  version: '',
12
12
  licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
13
13
  };
@@ -219,7 +219,7 @@ var TimePart = /** @class */ (function (_super) {
219
219
  React.createElement("div", { className: "k-time-header" },
220
220
  React.createElement("span", { className: "k-title" }, this.intl.formatDate(this.value, this.dateFormatParts.reduce(this.timeFormatReducer, ''))),
221
221
  this.showNowButton() &&
222
- React.createElement(kendo_react_buttons_1.Button, __assign({ type: "button", ref: function (btn) { _this._nowButton = btn; }, className: "k-time-now", look: "flat", primary: true, title: selectNowMessage }, { 'aria-label': selectNowMessage }, { onClick: onNowClick, tabIndex: disabled ? -1 : 0 }), localizationService.toLanguageString(messages_1.now, messages_1.messages[messages_1.now]))),
222
+ React.createElement(kendo_react_buttons_1.Button, __assign({ type: "button", ref: function (btn) { _this._nowButton = btn; }, className: "k-time-now", fillMode: "flat", themeColor: 'primary', title: selectNowMessage }, { 'aria-label': selectNowMessage }, { onClick: onNowClick, tabIndex: disabled ? -1 : 0 }), localizationService.toLanguageString(messages_1.now, messages_1.messages[messages_1.now]))),
223
223
  React.createElement("div", { className: "k-time-list-container", onKeyDown: this.handleKeyDown },
224
224
  React.createElement("span", { className: "k-time-highlight" }),
225
225
  this.dateFormatParts.map(function (part, idx) {
@@ -32,6 +32,43 @@ export interface TimePickerProps extends TimePickerSettings, FormComponentProps
32
32
  * > The `value` has to be a valid [JavaScript `Date`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Date) instance.
33
33
  */
34
34
  value?: Date | null;
35
+ /**
36
+ * Configures the `size` of the TimePicker.
37
+ *
38
+ * The available options are:
39
+ * - small
40
+ * - medium
41
+ * - large
42
+ * - null&mdash;Does not set a size `className`.
43
+ *
44
+ * @default `medium`
45
+ */
46
+ size?: null | 'small' | 'medium' | 'large';
47
+ /**
48
+ * Configures the `roundness` of the TimePicker.
49
+ *
50
+ * The available options are:
51
+ * - small
52
+ * - medium
53
+ * - large
54
+ * - full
55
+ * - null&mdash;Does not set a rounded `className`.
56
+ *
57
+ * @default `medium`
58
+ */
59
+ rounded?: null | 'small' | 'medium' | 'large' | 'full';
60
+ /**
61
+ * Configures the `fillMode` of the TimePicker.
62
+ *
63
+ * The available options are:
64
+ * - solid
65
+ * - outline
66
+ * - flat
67
+ * - null&mdash;Does not set a fillMode `className`.
68
+ *
69
+ * @default `solid`
70
+ */
71
+ fillMode?: null | 'solid' | 'flat' | 'outline';
35
72
  }
36
73
  /**
37
74
  * @hidden
@@ -108,6 +145,9 @@ export declare class TimePickerWithoutContext extends React.Component<TimePicker
108
145
  required: PropTypes.Requireable<boolean>;
109
146
  validate: PropTypes.Requireable<boolean>;
110
147
  valid: PropTypes.Requireable<boolean>;
148
+ size: PropTypes.Requireable<"small" | "medium" | "large">;
149
+ rounded: PropTypes.Requireable<"small" | "medium" | "large" | "full">;
150
+ fillMode: PropTypes.Requireable<"solid" | "flat" | "outline">;
111
151
  };
112
152
  /**
113
153
  * @hidden
@@ -125,6 +165,9 @@ export declare class TimePickerWithoutContext extends React.Component<TimePicker
125
165
  required: boolean;
126
166
  validityStyles: boolean;
127
167
  dateInput: React.ComponentType<DateInputProps<any>>;
168
+ size: "small" | "medium" | "large";
169
+ rounded: "small" | "medium" | "large" | "full";
170
+ fillMode: "solid" | "flat" | "outline";
128
171
  };
129
172
  /**
130
173
  * @hidden
@@ -132,12 +175,10 @@ export declare class TimePickerWithoutContext extends React.Component<TimePicker
132
175
  readonly state: TimePickerState;
133
176
  private _popupId;
134
177
  private _element;
135
- private _wrapper;
136
178
  private _dateInput;
137
179
  private _timeSelector;
138
180
  private valueDuringOnChange?;
139
181
  private showDuringOnChange?;
140
- private nextTickId;
141
182
  private shouldFocusDateInput;
142
183
  private prevShow;
143
184
  constructor(props: TimePickerProps);
@@ -185,10 +226,6 @@ export declare class TimePickerWithoutContext extends React.Component<TimePicker
185
226
  * @hidden
186
227
  */
187
228
  componentDidMount(): void;
188
- /**
189
- * @hidden
190
- */
191
- componentWillUnmount(): void;
192
229
  /**
193
230
  * @hidden
194
231
  */
@@ -206,7 +243,6 @@ export declare class TimePickerWithoutContext extends React.Component<TimePicker
206
243
  protected nextShow: (nextProps: TimePickerProps, nextState: TimePickerState) => boolean;
207
244
  protected normalizeTime(date: Date): Date;
208
245
  protected setShow(show: boolean): void;
209
- protected nextTick(f: () => any): void;
210
246
  protected mergeTime(value: Date | null): Date | null;
211
247
  private handleInputValueChange;
212
248
  private handleValueChange;