@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
@@ -26,9 +26,10 @@ import * as React from 'react';
26
26
  import * as PropTypes from 'prop-types';
27
27
  import { Popup } from '@progress/kendo-react-popup';
28
28
  import { cloneDate } from '@progress/kendo-date-math';
29
- import { classNames, guid, Keys, AsyncFocusBlur, createPropsContext, withPropsContext } from '@progress/kendo-react-common';
29
+ import { classNames, guid, Keys, AsyncFocusBlur, createPropsContext, withPropsContext, kendoThemeMaps } from '@progress/kendo-react-common';
30
30
  import { DateInput } from '../dateinput/DateInput';
31
31
  import { validatePackage } from '@progress/kendo-react-common';
32
+ import { Button } from '@progress/kendo-react-buttons';
32
33
  import { packageMetadata } from '../package-metadata';
33
34
  import { MIN_DATE, MAX_DATE, isInDateRange, MAX_TIME } from '../utils';
34
35
  import { messages, toggleDateTimeSelector } from '../messages';
@@ -44,7 +45,6 @@ var DateTimePickerWithoutContext = /** @class */ (function (_super) {
44
45
  var _this = _super.call(this, props) || this;
45
46
  _this._popupId = guid();
46
47
  _this._element = null;
47
- _this._wrapper = null;
48
48
  _this._dateInput = React.createRef();
49
49
  _this._dateTimeSelector = null;
50
50
  _this.shouldFocusDateInput = false;
@@ -116,7 +116,7 @@ var DateTimePickerWithoutContext = /** @class */ (function (_super) {
116
116
  };
117
117
  _this.dateInputElement = function () {
118
118
  return (_this.dateInput && _this.dateInput.element) ||
119
- (_this._wrapper && _this._wrapper.querySelector('.k-dateinput-wrap > input.k-input'));
119
+ (_this.element && _this.element.querySelector('.k-dateinput > input.k-input-inner'));
120
120
  };
121
121
  validatePackage(packageMetadata);
122
122
  _this.state = {
@@ -294,15 +294,8 @@ var DateTimePickerWithoutContext = /** @class */ (function (_super) {
294
294
  */
295
295
  DateTimePickerWithoutContext.prototype.render = function () {
296
296
  var _this = this;
297
- 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 ? Popup : _b, calendar = _a.calendar;
297
+ 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 ? Popup : _e, calendar = _a.calendar;
298
298
  var isValid = !this.validityStyles || this.validity.valid;
299
- var rootClassName = classNames('k-widget k-datetimepicker', {
300
- 'k-state-invalid': !isValid
301
- }, className);
302
- var wrapperClassNames = classNames('k-picker-wrap', {
303
- 'k-state-disabled': disabled,
304
- 'k-state-focused': this.state.focused
305
- });
306
299
  var dataInputProps = {
307
300
  id: id, ariaLabelledBy: ariaLabelledBy, ariaDescribedBy: ariaDescribedBy, format: format, formatPlaceholder: formatPlaceholder, disabled: disabled,
308
301
  title: title, validityStyles: validityStyles, validationMessage: validationMessage, required: required, min: min, max: max, minTime: minTime, maxTime: maxTime, name: name,
@@ -314,24 +307,33 @@ var DateTimePickerWithoutContext = /** @class */ (function (_super) {
314
307
  label: undefined,
315
308
  placeholder: !this.state.focused ? this.props.placeholder : null,
316
309
  ariaHasPopup: true,
317
- ariaExpanded: this.show
310
+ ariaExpanded: this.show,
311
+ size: null,
312
+ fillMode: null,
313
+ rounded: null
318
314
  };
319
315
  var dateTimePicker = (React.createElement(AsyncFocusBlur, { onFocus: this.handleFocus, onBlur: this.handleBlur, onSyncFocus: this.props.onFocus, onSyncBlur: this.props.onBlur }, function (_a) {
320
316
  var onFocus = _a.onFocus, onBlur = _a.onBlur;
317
+ var _b;
321
318
  return (React.createElement("div", { ref: function (div) {
322
319
  _this._element = div;
323
- }, className: rootClassName, onKeyDown: _this.handleKeyDown, style: { width: width }, onFocus: onFocus, onBlur: onBlur },
324
- React.createElement("div", { ref: function (span) { _this._wrapper = span; }, className: wrapperClassNames },
325
- React.createElement(_this.dateInputComp, __assign({ _ref: _this._dateInput }, dataInputProps)),
326
- React.createElement("span", __assign({ role: "button", onMouseDown: _this.handleIconMouseDown, onClick: _this.handleDateIconClick, title: provideLocalizationService(_this)
327
- .toLanguageString(toggleDateTimeSelector, messages[toggleDateTimeSelector]), className: "k-select" }, {
328
- 'aria-controls': _this._popupId,
329
- 'aria-label': provideLocalizationService(_this)
330
- .toLanguageString(toggleDateTimeSelector, messages[toggleDateTimeSelector])
331
- }),
332
- React.createElement("span", { className: "k-link k-link-date" },
333
- React.createElement("span", { className: "k-icon k-i-calendar" })))),
334
- 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: {
320
+ }, className: classNames('k-input', 'k-datetimepicker', (_b = {},
321
+ _b["k-input-" + (kendoThemeMaps.sizeMap[size] || size)] = size,
322
+ _b["k-rounded-" + (kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded,
323
+ _b["k-input-" + fillMode] = fillMode,
324
+ _b['k-valid'] = isValid,
325
+ _b['k-invalid'] = !isValid,
326
+ _b['k-required'] = _this.required,
327
+ _b['k-disabled'] = _this.props.disabled,
328
+ _b), className), onKeyDown: _this.handleKeyDown, style: { width: width }, onFocus: onFocus, onBlur: onBlur },
329
+ React.createElement(_this.dateInputComp, __assign({ _ref: _this._dateInput }, dataInputProps)),
330
+ React.createElement(Button, __assign({ type: "button", icon: 'calendar', onMouseDown: _this.handleIconMouseDown, onClick: _this.handleDateIconClick, title: provideLocalizationService(_this)
331
+ .toLanguageString(toggleDateTimeSelector, messages[toggleDateTimeSelector]), className: "k-input-button" }, {
332
+ 'aria-controls': _this._popupId,
333
+ 'aria-label': provideLocalizationService(_this)
334
+ .toLanguageString(toggleDateTimeSelector, messages[toggleDateTimeSelector])
335
+ })),
336
+ 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: {
335
337
  horizontal: 'left',
336
338
  vertical: 'bottom'
337
339
  }, popupAlign: {
@@ -422,7 +424,10 @@ var DateTimePickerWithoutContext = /** @class */ (function (_super) {
422
424
  required: PropTypes.bool,
423
425
  validate: PropTypes.bool,
424
426
  valid: PropTypes.bool,
425
- cancelButton: PropTypes.bool
427
+ cancelButton: PropTypes.bool,
428
+ size: PropTypes.oneOf([null, 'small', 'medium', 'large']),
429
+ rounded: PropTypes.oneOf([null, 'small', 'medium', 'large', 'full']),
430
+ fillMode: PropTypes.oneOf([null, 'solid', 'flat', 'outline'])
426
431
  };
427
432
  /**
428
433
  * @hidden
@@ -440,7 +445,10 @@ var DateTimePickerWithoutContext = /** @class */ (function (_super) {
440
445
  required: false,
441
446
  validityStyles: true,
442
447
  cancelButton: true,
443
- dateInput: DateInput
448
+ dateInput: DateInput,
449
+ size: 'medium',
450
+ rounded: 'medium',
451
+ fillMode: 'solid'
444
452
  };
445
453
  return DateTimePickerWithoutContext;
446
454
  }(React.Component));
@@ -206,7 +206,7 @@ var DateTimeSelector = /** @class */ (function (_super) {
206
206
  React.createElement("div", { className: "k-datetime-time-wrap" }, React.createElement(TimePart, { key: 1, onNowClick: this.handleNowClick, disabled: disabled || this.state.tab !== 'time', ref: function (timePart) { _this._timePart = timePart; }, min: this.minTime || MIN_TIME, max: this.maxTime || MAX_TIME, steps: this.props.steps, value: this.state.timeValue, format: format, onChange: this.handleTimeListContainerChange, onMount: this.handleTimePartMount }))),
207
207
  React.createElement("div", { className: "k-datetime-footer k-actions k-hstack k-justify-content-stretch" },
208
208
  cancelButton && React.createElement(Button, __assign({ type: "button", ref: function (btn) { _this._cancelButton = btn; }, className: "k-time-cancel", onClick: this.handleReject, title: cancelMessage }, { 'aria-label': cancelMessage }), cancelMessage),
209
- React.createElement(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))));
209
+ React.createElement(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))));
210
210
  };
211
211
  Object.defineProperty(DateTimeSelector.prototype, "minTime", {
212
212
  get: function () {
@@ -5,7 +5,7 @@ export var packageMetadata = {
5
5
  name: '@progress/kendo-react-dateinputs',
6
6
  productName: 'KendoReact',
7
7
  productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
8
- publishDate: 1642516221,
8
+ publishDate: 1642764822,
9
9
  version: '',
10
10
  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'
11
11
  };
@@ -217,7 +217,7 @@ var TimePart = /** @class */ (function (_super) {
217
217
  React.createElement("div", { className: "k-time-header" },
218
218
  React.createElement("span", { className: "k-title" }, this.intl.formatDate(this.value, this.dateFormatParts.reduce(this.timeFormatReducer, ''))),
219
219
  this.showNowButton() &&
220
- React.createElement(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(now, messages[now]))),
220
+ React.createElement(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(now, messages[now]))),
221
221
  React.createElement("div", { className: "k-time-list-container", onKeyDown: this.handleKeyDown },
222
222
  React.createElement("span", { className: "k-time-highlight" }),
223
223
  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—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—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—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;
@@ -35,7 +35,7 @@ import * as React from 'react';
35
35
  import * as PropTypes from 'prop-types';
36
36
  import { Popup } from '@progress/kendo-react-popup';
37
37
  import { cloneDate } from '@progress/kendo-date-math';
38
- import { classNames, guid, Keys, AsyncFocusBlur, createPropsContext, withPropsContext } from '@progress/kendo-react-common';
38
+ import { classNames, guid, Keys, AsyncFocusBlur, createPropsContext, withPropsContext, kendoThemeMaps } from '@progress/kendo-react-common';
39
39
  import { registerForLocalization, provideLocalizationService } from '@progress/kendo-react-intl';
40
40
  import { validatePackage } from '@progress/kendo-react-common';
41
41
  import { packageMetadata } from '../package-metadata';
@@ -45,6 +45,7 @@ import { TimeSelector } from './TimeSelector';
45
45
  import { MIDNIGHT_DATE, MIN_TIME, MAX_TIME, setTime } from '../utils';
46
46
  import { isInRange, isSmallerThanMin, isBiggerThanMax } from './utils';
47
47
  import { PickerFloatingLabel } from '../hooks/usePickerFloatingLabel';
48
+ import { Button } from '@progress/kendo-react-buttons';
48
49
  /** @hidden */
49
50
  var TimePickerWithoutContext = /** @class */ (function (_super) {
50
51
  __extends(TimePickerWithoutContext, _super);
@@ -52,7 +53,6 @@ var TimePickerWithoutContext = /** @class */ (function (_super) {
52
53
  var _this = _super.call(this, props) || this;
53
54
  _this._popupId = guid();
54
55
  _this._element = null;
55
- _this._wrapper = null;
56
56
  _this._dateInput = React.createRef();
57
57
  _this._timeSelector = null;
58
58
  _this.shouldFocusDateInput = false;
@@ -144,7 +144,6 @@ var TimePickerWithoutContext = /** @class */ (function (_super) {
144
144
  };
145
145
  _this.normalizeTime = _this.normalizeTime.bind(_this);
146
146
  _this.setShow = _this.setShow.bind(_this);
147
- _this.nextTick = _this.nextTick.bind(_this);
148
147
  _this.mergeTime = _this.mergeTime.bind(_this);
149
148
  return _this;
150
149
  }
@@ -301,12 +300,6 @@ var TimePickerWithoutContext = /** @class */ (function (_super) {
301
300
  this.forceUpdate();
302
301
  }
303
302
  };
304
- /**
305
- * @hidden
306
- */
307
- TimePickerWithoutContext.prototype.componentWillUnmount = function () {
308
- clearTimeout(this.nextTickId);
309
- };
310
303
  /**
311
304
  * @hidden
312
305
  */
@@ -328,15 +321,9 @@ var TimePickerWithoutContext = /** @class */ (function (_super) {
328
321
  */
329
322
  TimePickerWithoutContext.prototype.render = function () {
330
323
  var _this = this;
331
- var _a = this.props, disabled = _a.disabled, tabIndex = _a.tabIndex, title = _a.title, id = _a.id, className = _a.className, format = _a.format, formatPlaceholder = _a.formatPlaceholder, smoothScroll = _a.smoothScroll, width = _a.width, name = _a.name, steps = _a.steps, cancelButton = _a.cancelButton, nowButton = _a.nowButton, validationMessage = _a.validationMessage, required = _a.required, validityStyles = _a.validityStyles, ariaLabelledBy = _a.ariaLabelledBy, ariaDescribedBy = _a.ariaDescribedBy;
332
- var _b = this.popupSettings, popupClass = _b.popupClass, otherPopupSettings = __rest(_b, ["popupClass"]);
324
+ var _a = this.props, _b = _a.size, size = _b === void 0 ? TimePickerWithoutContext.defaultProps.size : _b, _c = _a.rounded, rounded = _c === void 0 ? TimePickerWithoutContext.defaultProps.rounded : _c, _d = _a.fillMode, fillMode = _d === void 0 ? TimePickerWithoutContext.defaultProps.fillMode : _d, disabled = _a.disabled, tabIndex = _a.tabIndex, title = _a.title, id = _a.id, className = _a.className, format = _a.format, formatPlaceholder = _a.formatPlaceholder, smoothScroll = _a.smoothScroll, width = _a.width, name = _a.name, steps = _a.steps, cancelButton = _a.cancelButton, nowButton = _a.nowButton, validationMessage = _a.validationMessage, required = _a.required, validityStyles = _a.validityStyles, ariaLabelledBy = _a.ariaLabelledBy, ariaDescribedBy = _a.ariaDescribedBy;
325
+ var _e = this.popupSettings, popupClass = _e.popupClass, otherPopupSettings = __rest(_e, ["popupClass"]);
333
326
  var isValid = !this.validityStyles || this.validity.valid;
334
- var rootClassName = classNames('k-widget k-timepicker', className);
335
- var wrapperClassNames = classNames('k-picker-wrap', {
336
- 'k-state-invalid': !isValid,
337
- 'k-state-disabled': disabled,
338
- 'k-state-focused': this.state.focused
339
- });
340
327
  var popupClassNames = classNames('k-group k-reset', popupClass);
341
328
  var dateInputProps = {
342
329
  disabled: disabled,
@@ -360,9 +347,12 @@ var TimePickerWithoutContext = /** @class */ (function (_super) {
360
347
  label: undefined,
361
348
  placeholder: !this.state.focused ? this.props.placeholder : null,
362
349
  ariaHasPopup: true,
363
- ariaExpanded: this.show
350
+ ariaExpanded: this.show,
351
+ size: null,
352
+ fillMode: null,
353
+ rounded: null
364
354
  };
365
- var popupProps = __assign({ show: this.show, animate: this._wrapper !== null, anchor: this._wrapper, className: popupClassNames, id: this._popupId, anchorAlign: {
355
+ var popupProps = __assign({ show: this.show, animate: this.element !== null, anchor: this.element, className: popupClassNames, id: this._popupId, anchorAlign: {
366
356
  horizontal: 'left',
367
357
  vertical: 'bottom'
368
358
  }, popupAlign: {
@@ -376,14 +366,21 @@ var TimePickerWithoutContext = /** @class */ (function (_super) {
376
366
  .toLanguageString(toggleTimeSelector, messages[toggleTimeSelector]);
377
367
  var timepicker = (React.createElement(AsyncFocusBlur, { onFocus: this.handleFocus, onBlur: this.handleBlur, onSyncBlur: this.props.onBlur, onSyncFocus: this.props.onFocus }, function (_a) {
378
368
  var onFocus = _a.onFocus, onBlur = _a.onBlur;
379
- return (React.createElement("div", { ref: function (span) { _this._element = span; }, className: rootClassName, onKeyDown: _this.handleKeyDown, style: { width: width }, onFocus: onFocus, onBlur: onBlur },
380
- React.createElement("span", { ref: function (span) { _this._wrapper = span; }, className: wrapperClassNames },
381
- React.createElement(_this.dateInputComp, __assign({ _ref: _this._dateInput }, dateInputProps)),
382
- React.createElement("span", __assign({ role: "button", onMouseDown: _this.handleIconMouseDown, onClick: _this.handleIconClick, title: toggleTimeMessage, className: "k-select" }, {
383
- 'aria-controls': _this._popupId,
384
- 'aria-label': toggleClockMessage
385
- }),
386
- React.createElement("span", { className: "k-icon k-i-clock" }))),
369
+ var _b;
370
+ return (React.createElement("div", { ref: function (span) { _this._element = span; }, className: classNames('k-input', 'k-timepicker', (_b = {},
371
+ _b["k-input-" + (kendoThemeMaps.sizeMap[size] || size)] = size,
372
+ _b["k-rounded-" + (kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded,
373
+ _b["k-input-" + fillMode] = fillMode,
374
+ _b['k-valid'] = isValid,
375
+ _b['k-invalid'] = !isValid,
376
+ _b['k-required'] = _this.required,
377
+ _b['k-disabled'] = _this.props.disabled,
378
+ _b), className), onKeyDown: _this.handleKeyDown, style: { width: width }, onFocus: onFocus, onBlur: onBlur },
379
+ React.createElement(_this.dateInputComp, __assign({ _ref: _this._dateInput }, dateInputProps)),
380
+ React.createElement(Button, __assign({ type: "button", icon: 'clock', onMouseDown: _this.handleIconMouseDown, onClick: _this.handleIconClick, title: toggleTimeMessage, "aria-label": toggleTimeMessage, className: "k-input-button" }, {
381
+ 'aria-controls': _this._popupId,
382
+ 'aria-label': toggleClockMessage
383
+ })),
387
384
  _this.props.popup
388
385
  ? React.createElement(_this.props.popup, __assign({}, popupProps), timeSelector)
389
386
  : React.createElement(Popup, __assign({}, popupProps), timeSelector)));
@@ -401,12 +398,6 @@ var TimePickerWithoutContext = /** @class */ (function (_super) {
401
398
  }
402
399
  this.setState({ show: show });
403
400
  };
404
- TimePickerWithoutContext.prototype.nextTick = function (f) {
405
- // XXX: use window.setTimeout due to async focus/blur events in IE, and missing relatedTarget prop.
406
- // XXX: https://github.com/facebook/react/issues/3751
407
- clearTimeout(this.nextTickId);
408
- this.nextTickId = window.setTimeout(function () { return f(); });
409
- };
410
401
  TimePickerWithoutContext.prototype.mergeTime = function (value) {
411
402
  return this.value && value ? setTime(this.value, value) : value;
412
403
  };
@@ -480,7 +471,10 @@ var TimePickerWithoutContext = /** @class */ (function (_super) {
480
471
  validationMessage: PropTypes.string,
481
472
  required: PropTypes.bool,
482
473
  validate: PropTypes.bool,
483
- valid: PropTypes.bool
474
+ valid: PropTypes.bool,
475
+ size: PropTypes.oneOf([null, 'small', 'medium', 'large']),
476
+ rounded: PropTypes.oneOf([null, 'small', 'medium', 'large', 'full']),
477
+ fillMode: PropTypes.oneOf([null, 'solid', 'flat', 'outline'])
484
478
  };
485
479
  /**
486
480
  * @hidden
@@ -497,7 +491,10 @@ var TimePickerWithoutContext = /** @class */ (function (_super) {
497
491
  steps: {},
498
492
  required: false,
499
493
  validityStyles: true,
500
- dateInput: DateInput
494
+ dateInput: DateInput,
495
+ size: 'medium',
496
+ rounded: 'medium',
497
+ fillMode: 'solid'
501
498
  };
502
499
  return TimePickerWithoutContext;
503
500
  }(React.Component));
@@ -179,7 +179,7 @@ var TimeSelector = /** @class */ (function (_super) {
179
179
  React.createElement("div", { className: "k-time-footer k-actions k-hstack k-justify-content-stretch" },
180
180
  cancelButton &&
181
181
  React.createElement(Button, __assign({ type: "button", ref: function (btn) { _this._cancelButton = btn; }, className: "k-time-cancel", onClick: this.handleReject, title: cancelMessage }, { 'aria-label': cancelMessage }), cancelMessage),
182
- React.createElement(Button, __assign({ type: "button", ref: function (btn) { _this._acceptButton = btn; }, className: "k-time-accept", primary: true, onClick: this.handleAccept, title: setMessage }, { 'aria-label': setMessage }), setMessage))));
182
+ React.createElement(Button, __assign({ type: "button", ref: function (btn) { _this._acceptButton = btn; }, className: "k-time-accept", themeColor: 'primary', onClick: this.handleAccept, title: setMessage }, { 'aria-label': setMessage }), setMessage))));
183
183
  };
184
184
  TimeSelector.prototype.nextTick = function (f) {
185
185
  // XXX: use window.setTimeout due to async focus/blur events in IE, and missing relatedTarget prop.
@@ -52,7 +52,7 @@ var CalendarHeaderTitle = /** @class */ (function (_super) {
52
52
  */
53
53
  CalendarHeaderTitle.prototype.render = function () {
54
54
  var _a = this.props, view = _a.view, props = __rest(_a, ["view"]);
55
- return (React.createElement(kendo_react_buttons_1.Button, __assign({ type: "button", look: "flat" }, props), this.props.children));
55
+ return (React.createElement(kendo_react_buttons_1.Button, __assign({ type: "button", fillMode: "flat" }, props), this.props.children));
56
56
  };
57
57
  return CalendarHeaderTitle;
58
58
  }(React.PureComponent));
@@ -459,9 +459,9 @@ var MultiViewCalendarWithoutContext = /** @class */ (function (_super) {
459
459
  var activeDate = kendo_date_math_1.cloneDate(this.dates && this.dates[0] ? this.dates[0] : utils_1.getToday());
460
460
  return (React.createElement("div", __assign({ ref: function (el) { _this._element = el; }, className: wrapperClassName, id: this.props.id || this.wrapperID, "aria-labelledby": this.props.ariaLabelledBy, "aria-describedby": this.props.ariaDescribedBy, role: 'grid', tabIndex: !this.props.disabled ? this.props.tabIndex : undefined, onFocus: this.handleFocus, onBlur: this.handleBlur, onMouseDown: this.handleMouseDown, onClick: this.handleClick, onKeyDown: this.handleKeyDown }, wrapperAria),
461
461
  React.createElement(Header_1.Header, { key: ".kendo.calendar.header." + activeDate.getTime(), activeView: activeView, currentDate: activeDate, min: this.min, max: this.max, rangeLength: this.props.views, bus: this.bus, service: this.service, headerTitle: this.props.headerTitle, commands: (React.createElement(React.Fragment, null,
462
- React.createElement(kendo_react_buttons_1.Button, __assign({ type: "button", className: "k-nav-prev", icon: "arrow-chevron-left", look: "flat", title: prevViewTitle, disabled: isPrevDisabled, onClick: this.handlePrevButtonClick }, prevBtnAria)),
462
+ React.createElement(kendo_react_buttons_1.Button, __assign({ type: "button", className: "k-nav-prev", icon: "arrow-chevron-left", fillMode: "flat", title: prevViewTitle, disabled: isPrevDisabled, onClick: this.handlePrevButtonClick }, prevBtnAria)),
463
463
  React.createElement(TodayCommand_1.TodayCommand, { min: this.min, max: this.max, onClick: this.handleTodayClick, disabled: !this.todayIsInRange }),
464
- React.createElement(kendo_react_buttons_1.Button, __assign({ type: "button", className: "k-nav-next", icon: "arrow-chevron-right", look: "flat", title: nextViewTittle, disabled: isNextDisabled, onClick: this.handleNextButtonClick }, nextBtnAria)))) }),
464
+ React.createElement(kendo_react_buttons_1.Button, __assign({ type: "button", className: "k-nav-next", icon: "arrow-chevron-right", fillMode: "flat", title: nextViewTittle, disabled: isNextDisabled, onClick: this.handleNextButtonClick }, nextBtnAria)))) }),
465
465
  React.createElement(HorizontalViewList_1.HorizontalViewList, { ref: function (el) { _this.calendarViewList = el; }, dates: this.dates, activeView: activeView, focusedDate: this.focusedDate, min: this.min, max: this.max, bus: this.bus, service: this.service, selectionRange: visualizedRange, value: this.selectedMultiple || this.selectedDate, cellUID: this.cellUID, views: this.props.views, onChange: this.handleDateChange, showWeekNumbers: this.props.weekNumber, onCellEnter: this.handleCellEnter, cell: this.props.cell, weekCell: this.props.weekCell, headerTitle: this.props.headerTitle })));
466
466
  };
467
467
  /**
@@ -30,7 +30,7 @@ var DOMService = /** @class */ (function () {
30
30
  var tbody = utils_1.domContainerFactory('tbody');
31
31
  var thead = utils_1.domContainerFactory('thead');
32
32
  var table = utils_1.domContainerFactory('table');
33
- var monthHeader = function () { return (div("\n <span class=\"k-button k-flat k-calendar-title\">\n <span className=\"k-button-text\">March 2017</span>\n </span>\n <span class=\"k-spacer\"></span>\n <span class=\"k-calendar-nav k-hstack\"><span class=\"k-nav-today\">TODAY</span></span>\n ", 'k-calendar-header k-hstack')); };
33
+ var monthHeader = function () { return (div("\n <span class=\"k-button k-button-md k-button-rectangle k-button-solid k-button-solid-base k-button-flat k-calendar-title\">\n <span className=\"k-button-text\">March 2017</span>\n </span>\n <span class=\"k-spacer\"></span>\n <span class=\"k-calendar-nav k-hstack\"><span class=\"k-nav-today\">TODAY</span></span>\n ", 'k-calendar-header k-hstack')); };
34
34
  var monthWeekHeader = function () { return (table([
35
35
  thead([
36
36
  tr([th('MO', 'k-calendar-th')], 'k-calendar-tr')
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
2
  /**
3
- * Represents the props of the KendoReact [PickerWrap]({% slug api_dateinputs_pickerwrap %}) component.
3
+ * @hidden
4
+ * @deprecated
4
5
  */
5
6
  export interface PickerWrapProps {
6
7
  _ref?: React.Ref<HTMLSpanElement | null>;
@@ -11,6 +12,7 @@ export interface PickerWrapProps {
11
12
  style?: React.CSSProperties;
12
13
  }
13
14
  /**
14
- * Represents the default `pickerWrap` component rendered by the [KendoReact Scheduler DatePicker]({% slug overview_datepicker %}).
15
+ * @hidden
16
+ * @deprecated
15
17
  */
16
18
  export declare const PickerWrap: React.ForwardRefExoticComponent<PickerWrapProps & React.RefAttributes<HTMLSpanElement>>;
@@ -3,7 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var React = require("react");
4
4
  var kendo_react_common_1 = require("@progress/kendo-react-common");
5
5
  /**
6
- * Represents the default `pickerWrap` component rendered by the [KendoReact Scheduler DatePicker]({% slug overview_datepicker %}).
6
+ * @hidden
7
+ * @deprecated
7
8
  */
8
9
  exports.PickerWrap = React.forwardRef(function (props, ref) {
9
10
  var _ref = props._ref;
@@ -42,6 +42,43 @@ export interface DateInputProps<T extends DateInput = any> extends FormComponent
42
42
  * Determines the event handler that will be fired when the user edits the value ([see example]({% slug dateranges_dateinput %})).
43
43
  */
44
44
  onChange?: (event: DateInputChangeEvent<T>) => void;
45
+ /**
46
+ * Configures the `size` of the DateInput.
47
+ *
48
+ * The available options are:
49
+ * - small
50
+ * - medium
51
+ * - large
52
+ * - null&mdash;Does not set a size `className`.
53
+ *
54
+ * @default `medium`
55
+ */
56
+ size?: null | 'small' | 'medium' | 'large';
57
+ /**
58
+ * Configures the `roundness` of the DateInput.
59
+ *
60
+ * The available options are:
61
+ * - small
62
+ * - medium
63
+ * - large
64
+ * - full
65
+ * - null&mdash;Does not set a rounded `className`.
66
+ *
67
+ * @default `medium`
68
+ */
69
+ rounded?: null | 'small' | 'medium' | 'large' | 'full';
70
+ /**
71
+ * Configures the `fillMode` of the DateInput.
72
+ *
73
+ * The available options are:
74
+ * - solid
75
+ * - outline
76
+ * - flat
77
+ * - null&mdash;Does not set a fillMode `className`.
78
+ *
79
+ * @default `solid`
80
+ */
81
+ fillMode?: null | 'solid' | 'flat' | 'outline';
45
82
  }
46
83
  /** @hidden */
47
84
  export declare class DateInputWithoutContext extends React.Component<DateInputProps, {
@@ -108,12 +145,18 @@ export declare class DateInputWithoutContext extends React.Component<DateInputPr
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
114
154
  */
115
155
  static defaultProps: {
116
156
  format: string;
157
+ size: "small" | "medium" | "large";
158
+ rounded: "small" | "medium" | "large" | "full";
159
+ fillMode: "solid" | "flat" | "outline";
117
160
  formatPlaceholder: DateInputFormatPlaceholder;
118
161
  spinners: boolean;
119
162
  disabled: boolean;
@@ -27,6 +27,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
27
27
  var React = require("react");
28
28
  var PropTypes = require("prop-types");
29
29
  var kendo_date_math_1 = require("@progress/kendo-date-math");
30
+ var kendo_react_buttons_1 = require("@progress/kendo-react-buttons");
30
31
  var kendo_react_intl_1 = require("@progress/kendo-react-intl");
31
32
  var models_1 = require("./models");
32
33
  var kendo_react_common_1 = require("@progress/kendo-react-common");
@@ -234,6 +235,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
234
235
  */
235
236
  DateInputWithoutContext.prototype.render = function () {
236
237
  var _this = this;
238
+ var _a = this.props, _b = _a.size, size = _b === void 0 ? DateInputWithoutContext.defaultProps.size : _b, _c = _a.fillMode, fillMode = _c === void 0 ? DateInputWithoutContext.defaultProps.fillMode : _c, _d = _a.rounded, rounded = _d === void 0 ? DateInputWithoutContext.defaultProps.rounded : _d;
237
239
  if (this.props._ref) {
238
240
  this.props._ref.current = this;
239
241
  }
@@ -259,25 +261,23 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
259
261
  }
260
262
  var dateinput = (React.createElement(kendo_react_common_1.AsyncFocusBlur, { onFocus: this.elementOnFocus, onBlur: this.elementOnBlur }, function (_a) {
261
263
  var onFocus = _a.onFocus, onBlur = _a.onBlur;
262
- return (React.createElement("span", { style: !label
264
+ var _b;
265
+ return (React.createElement("span", { ref: function (span) { _this._wrapper = span; }, style: !label
263
266
  ? { width: _this.props.width }
264
- : undefined, dir: _this.props.dir, className: wrapperClassesInstance.join(' '), onFocus: onFocus, onBlur: onBlur },
265
- React.createElement("span", { className: kendo_react_common_1.classNames('k-dateinput-wrap', {
266
- 'k-state-disabled': _this.props.disabled,
267
- 'k-state-invalid': !isValid
268
- }), ref: function (span) { _this._wrapper = span; } },
269
- React.createElement("input", __assign({ role: "spinbutton", tabIndex: _this.props.tabIndex, disabled: _this.props.disabled, title: _this.props.title !== undefined ? _this.props.title : currentText, type: "text", spellCheck: false, autoComplete: "off", autoCorrect: "off", className: "k-input", id: inputId, "aria-labelledby": _this.props.ariaLabelledBy, "aria-describedby": _this.props.ariaDescribedBy, "aria-expanded": _this.props.ariaExpanded, "aria-haspopup": _this.props.ariaHasPopup, onWheel: _this.wheel, onClick: _this.elementClick, onInput: _this.elementChange, onPaste: _this.handlePaste, onKeyDown: _this.elementKeyDown, onChange: kendo_react_common_1.noop, value: text, placeholder: placeholder, name: name }, ariaProps, { ref: function (input) { return _this._element = input; } })),
270
- _this.props.children,
271
- _this.props.spinners &&
272
- React.createElement("span", { className: "k-select", onMouseDown: _this.spinnersMouseDown },
273
- React.createElement("span", { className: "k-link k-link-increase", "aria-label": localizationService
274
- .toLanguageString(messages_1.increaseValue, messages_1.messages[messages_1.increaseValue]), title: localizationService
275
- .toLanguageString(messages_1.increaseValue, messages_1.messages[messages_1.increaseValue]), onClick: _this.increasePart },
276
- React.createElement("span", { className: "k-icon k-i-arrow-n" })),
277
- React.createElement("span", { className: "k-link k-link-decrease", "aria-label": localizationService
278
- .toLanguageString(messages_1.decreaseValue, messages_1.messages[messages_1.decreaseValue]), title: localizationService
279
- .toLanguageString(messages_1.decreaseValue, messages_1.messages[messages_1.decreaseValue]), onClick: _this.decreasePart },
280
- React.createElement("span", { className: "k-icon k-i-arrow-s" }))))));
267
+ : undefined, dir: _this.props.dir, className: kendo_react_common_1.classNames('k-dateinput', 'k-input', (_b = {},
268
+ _b["k-input-" + (kendo_react_common_1.kendoThemeMaps.sizeMap[size] || size)] = size,
269
+ _b["k-input-" + fillMode] = fillMode,
270
+ _b["k-rounded-" + (kendo_react_common_1.kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded,
271
+ _b['k-valid'] = isValid,
272
+ _b['k-invalid'] = !isValid,
273
+ _b['k-required'] = _this.required,
274
+ _b['k-disabled'] = _this.props.disabled,
275
+ _b), _this.props.className), onFocus: onFocus, onBlur: onBlur },
276
+ React.createElement("input", __assign({ role: "spinbutton", tabIndex: _this.props.tabIndex, disabled: _this.props.disabled, title: _this.props.title !== undefined ? _this.props.title : currentText, type: "text", spellCheck: false, autoComplete: "off", autoCorrect: "off", className: "k-input-inner", id: inputId, "aria-labelledby": _this.props.ariaLabelledBy, "aria-describedby": _this.props.ariaDescribedBy, "aria-expanded": _this.props.ariaExpanded, "aria-haspopup": _this.props.ariaHasPopup, onWheel: _this.wheel, onClick: _this.elementClick, onInput: _this.elementChange, onPaste: _this.handlePaste, onKeyDown: _this.elementKeyDown, onChange: kendo_react_common_1.noop, value: text, placeholder: placeholder, name: name }, ariaProps, { ref: function (input) { return _this._element = input; } })),
277
+ _this.props.children,
278
+ _this.props.spinners && (React.createElement("span", { className: "k-input-spinner k-spin-button", onMouseDown: _this.spinnersMouseDown },
279
+ React.createElement(kendo_react_buttons_1.Button, { type: "button", className: "k-spinner-increase", icon: 'arrow-n', "aria-label": localizationService.toLanguageString(messages_1.increaseValue, messages_1.messages[messages_1.increaseValue]), title: localizationService.toLanguageString(messages_1.increaseValue, messages_1.messages[messages_1.increaseValue]), onClick: _this.increasePart }),
280
+ React.createElement(kendo_react_buttons_1.Button, { type: "button", className: "k-spinner-decrease", icon: 'arrow-s', "aria-label": localizationService.toLanguageString(messages_1.decreaseValue, messages_1.messages[messages_1.decreaseValue]), title: localizationService.toLanguageString(messages_1.decreaseValue, messages_1.messages[messages_1.decreaseValue]), onClick: _this.decreasePart })))));
281
281
  }));
282
282
  return label
283
283
  ? (React.createElement(kendo_react_labels_1.FloatingLabel, { label: label, editorId: inputId, editorValue: currentText, editorValid: isValid, editorDisabled: this.props.disabled, children: dateinput, style: { width: this.props.width } }))
@@ -636,13 +636,19 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
636
636
  validationMessage: PropTypes.string,
637
637
  required: PropTypes.bool,
638
638
  validate: PropTypes.bool,
639
- valid: PropTypes.bool
639
+ valid: PropTypes.bool,
640
+ size: PropTypes.oneOf([null, 'small', 'medium', 'large']),
641
+ rounded: PropTypes.oneOf([null, 'small', 'medium', 'large', 'full']),
642
+ fillMode: PropTypes.oneOf([null, 'solid', 'flat', 'outline'])
640
643
  };
641
644
  /**
642
645
  * @hidden
643
646
  */
644
647
  DateInputWithoutContext.defaultProps = {
645
648
  format: utils_1.defaultFormat,
649
+ size: 'medium',
650
+ rounded: 'medium',
651
+ fillMode: 'solid',
646
652
  formatPlaceholder: utils_1.defaultFormatPlaceholder,
647
653
  // defaultValue: null as Date | null,
648
654
  spinners: false,