@progress/kendo-vue-dateinputs 2.7.3 → 2.8.0-dev.202201111325

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 (84) hide show
  1. package/dist/cdn/js/kendo-vue-dateinputs.js +1 -1
  2. package/dist/es/additionalTypes.ts +7 -1
  3. package/dist/es/calendar/components/Calendar.d.ts +2 -3
  4. package/dist/es/calendar/components/CalendarCell.d.ts +2 -3
  5. package/dist/es/calendar/components/CalendarCell.js +1 -1
  6. package/dist/es/calendar/components/CalendarHeaderTitle.d.ts +2 -3
  7. package/dist/es/calendar/components/CalendarHeaderTitle.js +19 -12
  8. package/dist/es/calendar/components/CalendarWeekCell.d.ts +2 -3
  9. package/dist/es/calendar/components/Header.d.ts +2 -3
  10. package/dist/es/calendar/components/Header.js +36 -37
  11. package/dist/es/calendar/components/View.d.ts +2 -3
  12. package/dist/es/calendar/components/ViewList.d.ts +2 -3
  13. package/dist/es/common/PickerWrap.d.ts +2 -3
  14. package/dist/es/dateinput/DateInput.d.ts +2 -3
  15. package/dist/es/dateinput/DateInput.js +62 -49
  16. package/dist/es/dateinput/models/DateInputSettings.d.ts +39 -0
  17. package/dist/es/dateinput/utils.js +2 -2
  18. package/dist/es/datepicker/DatePicker.d.ts +2 -3
  19. package/dist/es/datepicker/DatePicker.js +66 -80
  20. package/dist/es/datepicker/ToggleButton.d.ts +3 -24
  21. package/dist/es/datepicker/ToggleButton.js +2 -67
  22. package/dist/es/datepicker/interfaces/DatePickerComputed.d.ts +0 -1
  23. package/dist/es/datepicker/models/DatePickerSettings.d.ts +39 -0
  24. package/dist/es/daterangepicker/DateRangePicker.d.ts +2 -3
  25. package/dist/es/daterangepicker/DateRangePicker.js +49 -20
  26. package/dist/es/daterangepicker/models/DateRangePickerSettings.d.ts +39 -0
  27. package/dist/es/datetimepicker/DateTimePicker.d.ts +2 -3
  28. package/dist/es/datetimepicker/DateTimePicker.js +75 -51
  29. package/dist/es/datetimepicker/DateTimeSelector.d.ts +2 -3
  30. package/dist/es/datetimepicker/DateTimeSelector.js +21 -14
  31. package/dist/es/datetimepicker/models/DateTimePickerSettings.d.ts +39 -0
  32. package/dist/es/main.d.ts +2 -2
  33. package/dist/es/package-metadata.js +1 -1
  34. package/dist/es/timepicker/TimeList.d.ts +2 -3
  35. package/dist/es/timepicker/TimePart.d.ts +2 -3
  36. package/dist/es/timepicker/TimePart.js +13 -6
  37. package/dist/es/timepicker/TimePicker.d.ts +2 -3
  38. package/dist/es/timepicker/TimePicker.js +73 -41
  39. package/dist/es/timepicker/TimeSelector.d.ts +2 -3
  40. package/dist/es/timepicker/TimeSelector.js +20 -11
  41. package/dist/es/timepicker/models/TimePickerSettings.d.ts +39 -0
  42. package/dist/es/virtualization/Virtualization.d.ts +2 -3
  43. package/dist/npm/additionalTypes.ts +7 -1
  44. package/dist/npm/calendar/components/Calendar.d.ts +2 -3
  45. package/dist/npm/calendar/components/CalendarCell.d.ts +2 -3
  46. package/dist/npm/calendar/components/CalendarCell.js +1 -1
  47. package/dist/npm/calendar/components/CalendarHeaderTitle.d.ts +2 -3
  48. package/dist/npm/calendar/components/CalendarHeaderTitle.js +20 -12
  49. package/dist/npm/calendar/components/CalendarWeekCell.d.ts +2 -3
  50. package/dist/npm/calendar/components/Header.d.ts +2 -3
  51. package/dist/npm/calendar/components/Header.js +37 -37
  52. package/dist/npm/calendar/components/View.d.ts +2 -3
  53. package/dist/npm/calendar/components/ViewList.d.ts +2 -3
  54. package/dist/npm/common/PickerWrap.d.ts +2 -3
  55. package/dist/npm/dateinput/DateInput.d.ts +2 -3
  56. package/dist/npm/dateinput/DateInput.js +60 -46
  57. package/dist/npm/dateinput/models/DateInputSettings.d.ts +39 -0
  58. package/dist/npm/dateinput/utils.js +2 -2
  59. package/dist/npm/datepicker/DatePicker.d.ts +2 -3
  60. package/dist/npm/datepicker/DatePicker.js +65 -80
  61. package/dist/npm/datepicker/ToggleButton.d.ts +3 -24
  62. package/dist/npm/datepicker/ToggleButton.js +3 -69
  63. package/dist/npm/datepicker/interfaces/DatePickerComputed.d.ts +0 -1
  64. package/dist/npm/datepicker/models/DatePickerSettings.d.ts +39 -0
  65. package/dist/npm/daterangepicker/DateRangePicker.d.ts +2 -3
  66. package/dist/npm/daterangepicker/DateRangePicker.js +49 -20
  67. package/dist/npm/daterangepicker/models/DateRangePickerSettings.d.ts +39 -0
  68. package/dist/npm/datetimepicker/DateTimePicker.d.ts +2 -3
  69. package/dist/npm/datetimepicker/DateTimePicker.js +75 -50
  70. package/dist/npm/datetimepicker/DateTimeSelector.d.ts +2 -3
  71. package/dist/npm/datetimepicker/DateTimeSelector.js +21 -14
  72. package/dist/npm/datetimepicker/models/DateTimePickerSettings.d.ts +39 -0
  73. package/dist/npm/main.d.ts +2 -2
  74. package/dist/npm/package-metadata.js +1 -1
  75. package/dist/npm/timepicker/TimeList.d.ts +2 -3
  76. package/dist/npm/timepicker/TimePart.d.ts +2 -3
  77. package/dist/npm/timepicker/TimePart.js +14 -6
  78. package/dist/npm/timepicker/TimePicker.d.ts +2 -3
  79. package/dist/npm/timepicker/TimePicker.js +73 -40
  80. package/dist/npm/timepicker/TimeSelector.d.ts +2 -3
  81. package/dist/npm/timepicker/TimeSelector.js +21 -11
  82. package/dist/npm/timepicker/models/TimePickerSettings.d.ts +39 -0
  83. package/dist/npm/virtualization/Virtualization.d.ts +2 -3
  84. package/package.json +7 -7
@@ -5,9 +5,10 @@ var gh = allVue.h;
5
5
  var ref = allVue.ref;
6
6
  var inject = allVue.inject;
7
7
  import { FloatingLabel } from '@progress/kendo-vue-labels';
8
+ import { Button } from '@progress/kendo-vue-buttons';
8
9
  import { Popup } from '@progress/kendo-vue-popup';
9
10
  import { cloneDate } from '@progress/kendo-date-math';
10
- import { classNames, guid, Keys, templateRendering, getListeners, getTemplate, validatePackage, canUseDOM } from '@progress/kendo-vue-common';
11
+ import { classNames, guid, Keys, templateRendering, getListeners, getTemplate, validatePackage, canUseDOM, kendoThemeMaps, getDefaultSlots } from '@progress/kendo-vue-common';
11
12
  import { DateInput } from '../dateinput/DateInput';
12
13
  import { packageMetadata } from '../package-metadata';
13
14
  import { MIN_DATE, MAX_DATE, isInDateRange, MAX_TIME } from '../utils';
@@ -77,6 +78,27 @@ var DateTimePicker = {
77
78
  return defaultFormatPlaceholder;
78
79
  }
79
80
  },
81
+ rounded: {
82
+ type: String,
83
+ default: 'medium',
84
+ validator: function validator(value) {
85
+ return ['small', 'medium', 'large', 'full'].includes(value);
86
+ }
87
+ },
88
+ fillMode: {
89
+ type: String,
90
+ default: 'solid',
91
+ validator: function validator(value) {
92
+ return ['solid', 'flat', 'outline'].includes(value);
93
+ }
94
+ },
95
+ size: {
96
+ type: String,
97
+ default: 'medium',
98
+ validator: function validator(value) {
99
+ return ['small', 'medium', 'large'].includes(value);
100
+ }
101
+ },
80
102
  id: String,
81
103
  ariaLabelledBy: String,
82
104
  ariaDescribedBy: String,
@@ -255,44 +277,43 @@ var DateTimePicker = {
255
277
  },
256
278
  // @ts-ignore
257
279
  render: function render(createElement) {
280
+ var _a;
281
+
258
282
  var _this = this;
259
283
 
260
284
  var h = gh || createElement;
261
- var _a = this.$props,
262
- disabled = _a.disabled,
263
- tabIndex = _a.tabIndex,
264
- title = _a.title,
265
- id = _a.id,
266
- format = _a.format,
267
- formatPlaceholder = _a.formatPlaceholder,
268
- min = _a.min,
269
- max = _a.max,
270
- weekNumber = _a.weekNumber,
271
- focusedDate = _a.focusedDate,
272
- width = _a.width,
273
- name = _a.name,
274
- steps = _a.steps,
275
- placeholder = _a.placeholder,
276
- validationMessage = _a.validationMessage,
277
- required = _a.required,
278
- validityStyles = _a.validityStyles,
279
- cancelButton = _a.cancelButton,
280
- minTime = _a.minTime,
281
- maxTime = _a.maxTime,
282
- ariaLabelledBy = _a.ariaLabelledBy,
283
- ariaDescribedBy = _a.ariaDescribedBy;
284
- var _b = this.$props.popupSettings,
285
- popupClass = _b.popupClass,
286
- appendTo = _b.appendTo,
287
- animate = _b.animate;
285
+ var defaultSlot = getDefaultSlots(this);
286
+ var _b = this.$props,
287
+ disabled = _b.disabled,
288
+ tabIndex = _b.tabIndex,
289
+ title = _b.title,
290
+ id = _b.id,
291
+ format = _b.format,
292
+ formatPlaceholder = _b.formatPlaceholder,
293
+ min = _b.min,
294
+ max = _b.max,
295
+ weekNumber = _b.weekNumber,
296
+ focusedDate = _b.focusedDate,
297
+ width = _b.width,
298
+ name = _b.name,
299
+ steps = _b.steps,
300
+ placeholder = _b.placeholder,
301
+ validationMessage = _b.validationMessage,
302
+ required = _b.required,
303
+ validityStyles = _b.validityStyles,
304
+ cancelButton = _b.cancelButton,
305
+ minTime = _b.minTime,
306
+ maxTime = _b.maxTime,
307
+ ariaLabelledBy = _b.ariaLabelledBy,
308
+ ariaDescribedBy = _b.ariaDescribedBy,
309
+ size = _b.size,
310
+ fillMode = _b.fillMode,
311
+ rounded = _b.rounded;
312
+ var _c = this.$props.popupSettings,
313
+ popupClass = _c.popupClass,
314
+ appendTo = _c.appendTo,
315
+ animate = _c.animate;
288
316
  var isValid = !this.$props.validityStyles || this.validity().valid;
289
- var rootClassName = classNames('k-widget k-datetimepicker', {
290
- 'k-state-invalid': !isValid
291
- });
292
- var wrapperClassNames = classNames('k-picker-wrap', {
293
- 'k-state-disabled': disabled,
294
- 'k-state-focused': this.isFocused
295
- });
296
317
  var dateInput = this.$props.dateInput ? templateRendering.call(this, this.$props.dateInput, getListeners.call(this)) : undefined;
297
318
  var dateInputDefaultRendering = // @ts-ignore function children
298
319
  h(DateInput, {
@@ -313,6 +334,9 @@ var DateTimePicker = {
313
334
  minTime: minTime,
314
335
  maxTime: maxTime,
315
336
  name: name,
337
+ size: null,
338
+ rounded: null,
339
+ fillMode: null,
316
340
  required: required,
317
341
  steps: steps,
318
342
  tabIndex: !this.computedShow ? tabIndex : -1,
@@ -333,6 +357,9 @@ var DateTimePicker = {
333
357
  minTime: minTime,
334
358
  maxTime: maxTime,
335
359
  name: name,
360
+ size: null,
361
+ rounded: null,
362
+ fillMode: null,
336
363
  onChange: this.handleValueChange,
337
364
  on: this.v3 ? undefined : {
338
365
  "change": this.handleValueChange
@@ -345,7 +372,9 @@ var DateTimePicker = {
345
372
  validationMessage: validationMessage,
346
373
  validityStyles: validityStyles,
347
374
  value: this.computedValue
348
- });
375
+ }, this.v3 ? function () {
376
+ return [defaultSlot];
377
+ } : [defaultSlot]);
349
378
  var dateInputRendering = getTemplate.call(this, {
350
379
  h: h,
351
380
  template: dateInput,
@@ -437,7 +466,10 @@ var DateTimePicker = {
437
466
  defaultSlots: dataTimeSelector
438
467
  });
439
468
  var dateTimePicker = h("div", {
440
- "class": rootClassName,
469
+ "class": classNames('k-input', 'k-datetimepicker', (_a = {}, _a["k-input-" + (kendoThemeMaps.sizeMap[size] || size)] = size, _a["k-input-" + fillMode] = fillMode, _a["k-rounded-" + (kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded, _a['k-valid'] = isValid, _a['k-invalid'] = !isValid, _a['k-required'] = this.required, _a['k-disabled'] = this.$props.disabled, _a['k-focus'] = this.isFocused, _a)),
470
+ ref: this.v3 ? function (el) {
471
+ _this.kendoAnchorRef = el;
472
+ } : this._anchor,
441
473
  onKeydown: this.handleKeyDown,
442
474
  on: this.v3 ? undefined : {
443
475
  "keydown": this.handleKeyDown,
@@ -449,15 +481,11 @@ var DateTimePicker = {
449
481
  },
450
482
  onFocusin: this.handleFocus,
451
483
  onFocusout: this.handleBlur
452
- }, [h("div", {
453
- ref: this.v3 ? function (el) {
454
- _this.kendoAnchorRef = el;
455
- } : this._anchor,
456
- "class": wrapperClassNames
457
- }, [dateInputRendering, h("span", {
458
- role: "button",
484
+ }, [dateInputRendering, // @ts-ignore
485
+ h(Button, {
486
+ icon: 'calendar',
459
487
  attrs: this.v3 ? undefined : {
460
- role: "button",
488
+ icon: 'calendar',
461
489
  title: provideLocalizationService(this).toLanguageString(toggleDateTimeSelector, messages[toggleDateTimeSelector]),
462
490
  "aria-controls": this._popupId,
463
491
  "aria-label": provideLocalizationService(this).toLanguageString(toggleDateTimeSelector, messages[toggleDateTimeSelector])
@@ -469,14 +497,10 @@ var DateTimePicker = {
469
497
  },
470
498
  onClick: this.handleDateIconClick,
471
499
  title: provideLocalizationService(this).toLanguageString(toggleDateTimeSelector, messages[toggleDateTimeSelector]),
472
- "class": "k-select",
500
+ "class": "k-input-button",
473
501
  "aria-controls": this._popupId,
474
502
  "aria-label": provideLocalizationService(this).toLanguageString(toggleDateTimeSelector, messages[toggleDateTimeSelector])
475
- }, [h("span", {
476
- "class": "k-link k-link-date"
477
- }, [h("span", {
478
- "class": "k-icon k-i-calendar"
479
- })])])]), popupRendering]);
503
+ }), popupRendering]);
480
504
  return this.$props.label ? // @ts-ignore function children
481
505
  h(FloatingLabel, {
482
506
  label: this.$props.label,
@@ -1,5 +1,4 @@
1
- import { DefineComponent } from '../additionalTypes';
2
- import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
1
+ import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
3
2
  declare type DefaultData<V> = object | ((this: V) => {});
4
3
  declare type DefaultMethods<V> = {
5
4
  [key: string]: (this: V, ...args: any[]) => any;
@@ -97,7 +96,7 @@ export interface DateTimeSelectorMethods {
97
96
  /**
98
97
  * @hidden
99
98
  */
100
- export interface DateTimeSelectorAll extends Vue, DateTimeSelectorMethods, DateTimeSelectorData, DateTimeSelectorComputed, DateTimeSelectorState {
99
+ export interface DateTimeSelectorAll extends Vue2type, DateTimeSelectorMethods, DateTimeSelectorData, DateTimeSelectorComputed, DateTimeSelectorState {
101
100
  }
102
101
  declare let DateTimeSelector: ComponentOptions<DateTimeSelectorAll, DefaultData<DateTimeSelectorData>, DefaultMethods<DateTimeSelectorAll>, DateTimeSelectorComputed, RecordPropsDefinition<DateTimeSelectorProps>>;
103
102
  declare const DateTimeSelectorVue3: DefineComponent<DateTimeSelectorProps, any, DateTimeSelectorData, DateTimeSelectorComputed, DateTimeSelectorMethods, {}, {}, {}, string, DateTimeSelectorProps, DateTimeSelectorProps, {}>;
@@ -139,9 +139,6 @@ var DateTimeSelector = {
139
139
  'k-time-tab': this.currentTab === 'time',
140
140
  'k-state-disabled': disabled
141
141
  }, 'k-datetime-wrap');
142
- var setButtonClassName = classNames({
143
- 'k-state-disabled': !this.hasDateValue
144
- }, 'k-time-accept k-button k-primary');
145
142
  var localizationService = provideLocalizationService(this);
146
143
  var dateMessage = localizationService.toLanguageString(date, messages[date]);
147
144
  var timeMessage = localizationService.toLanguageString(time, messages[time]);
@@ -290,10 +287,11 @@ var DateTimeSelector = {
290
287
  onFocus: this.handleFocus,
291
288
  onBlur: this.handleBlur
292
289
  })])]), h("div", {
293
- "class": "k-datetime-footer k-action-buttons"
294
- }, [cancelButton && h("button", {
290
+ "class": "k-datetime-footer k-actions k-actions-stretched"
291
+ }, [cancelButton && // @ts-ignore function children
292
+ h(Button, {
295
293
  ref: 'cancelButton',
296
- "class": "k-button k-time-cancel",
294
+ "class": "k-time-cancel",
297
295
  onClick: this.handleReject,
298
296
  on: this.v3 ? undefined : {
299
297
  "click": this.handleReject
@@ -304,20 +302,29 @@ var DateTimeSelector = {
304
302
  "aria-label": cancelMessage
305
303
  },
306
304
  "aria-label": cancelMessage
307
- }, [cancelMessage]), h("button", {
305
+ }, this.v3 ? function () {
306
+ return [cancelMessage];
307
+ } : [cancelMessage]), // @ts-ignore function children
308
+ h(Button, {
308
309
  ref: 'acceptButton',
309
- "class": setButtonClassName,
310
+ disabled: !this.hasDateValue,
311
+ attrs: this.v3 ? undefined : {
312
+ disabled: !this.hasDateValue,
313
+ themeColor: 'primary',
314
+ title: setMessage,
315
+ "aria-label": setMessage
316
+ },
317
+ themeColor: 'primary',
318
+ "class": 'k-time-accept',
310
319
  onClick: this.handleAccept,
311
320
  on: this.v3 ? undefined : {
312
321
  "click": this.handleAccept
313
322
  },
314
323
  title: setMessage,
315
- attrs: this.v3 ? undefined : {
316
- title: setMessage,
317
- "aria-label": setMessage
318
- },
319
324
  "aria-label": setMessage
320
- }, [setMessage])])]);
325
+ }, this.v3 ? function () {
326
+ return [setMessage];
327
+ } : [setMessage])])]);
321
328
  },
322
329
  methods: {
323
330
  handleBlur: function handleBlur(event) {
@@ -352,7 +359,7 @@ var DateTimeSelector = {
352
359
  return false;
353
360
  }
354
361
 
355
- return canUseDOM && (document.activeElement === this._acceptButton || document.activeElement === this._cancelButton);
362
+ return canUseDOM && (document.activeElement === this._acceptButton.$el || document.activeElement === this._cancelButton.$el);
356
363
  },
357
364
  mergeTime: function mergeTime(current, candidate) {
358
365
  return current && candidate ? setTime(candidate, current) : candidate;
@@ -70,6 +70,45 @@ export interface DateTimePickerSettings {
70
70
  min?: Date;
71
71
  minTime?: Date;
72
72
  maxTime?: Date;
73
+ /**
74
+ * Configures the `size` of the DateTimePicker.
75
+ *
76
+ * The available options are:
77
+ * - small
78
+ * - medium
79
+ * - large
80
+ * - null&mdash;Does not set a size `class`.
81
+ *
82
+ * @default `medium`
83
+ */
84
+ size?: null | 'small' | 'medium' | 'large' | string;
85
+ /**
86
+ * Configures the `roundness` of the DateTimePicker.
87
+ *
88
+ * The available options are:
89
+ * - small
90
+ * - medium
91
+ * - large
92
+ * - circle
93
+ * - full
94
+ * - null&mdash;Does not set a rounded `class`.
95
+ *
96
+ * @default `medium`
97
+ */
98
+ rounded?: null | 'small' | 'medium' | 'large' | 'full' | string;
99
+ /**
100
+ * Configures the `fillMode` of the DateTimePicker.
101
+ *
102
+ * The available options are:
103
+ * - solid
104
+ * - outline
105
+ * - flat
106
+ * - link
107
+ * - null&mdash;Does not set a fillMode `class`.
108
+ *
109
+ * @default `solid`
110
+ */
111
+ fillMode?: null | 'solid' | 'outline' | 'flat' | string;
73
112
  /**
74
113
  * Specifies the `name` property of the `input` DOM element.
75
114
  */
package/dist/es/main.d.ts CHANGED
@@ -19,6 +19,6 @@ import { DatePickerSettings } from './datepicker/models';
19
19
  import { DateTimePickerSettings } from './datetimepicker/models';
20
20
  import { TimePickerSettings } from './timepicker/models';
21
21
  import { DateRangePickerSettings, DateRangePickerPopupSettings, DateRangePickerCalendarSettings, DateRangePickerDateInputSettings } from './daterangepicker/models';
22
- import { ToggleButton, ToggleButtonVue3, ToggleButtonProps } from './datepicker/ToggleButton';
22
+ import { ToggleButton, ToggleButtonVue3 } from './datepicker/ToggleButton';
23
23
  import { PickerWrap, PickerWrapVue3, PickerWrapProps } from './common/PickerWrap';
24
- export { PickerWrap, PickerWrapVue3, PickerWrapProps, ToggleButton, ToggleButtonVue3, ToggleButtonProps, ActiveView, Calendar, CalendarVue3, CalendarProps, CalendarSettings, CalendarViewEnum, CalendarChangeEvent, CalendarWeekCellClickEvent, CalendarCell, CalendarCellVue3, CalendarCellProps, CalendarWeekCell, CalendarWeekCellVue3, CalendarWeekCellProps, CalendarHeaderTitle, CalendarHeaderTitleVue3, CalendarHeaderTitleProps, DateInput, DateInputVue3, DateInputProps, DateInputSettings, DateInputChangeEvent, DateInputIncrementalSteps, DateInputFormatPlaceholder, DateInputCustomFormatPlaceholder, DatePicker, DatePickerVue3, DatePickerProps, DatePickerSettings, DatePickerChangeEvent, TimePicker, TimePickerVue3, TimePickerProps, TimePickerSettings, TimePickerChangeEvent, DateRangePicker, DateRangePickerProps, DateRangePickerSettings, DateRangePickerCalendarSettings, DateRangePickerDateInputSettings, DateRangePickerPopupSettings, DateRangePickerChangeEvent, DateTimePicker, DateTimePickerVue3, DateTimePickerProps, DateTimePickerSettings, DateTimePickerChangeEvent, SelectionRange };
24
+ export { PickerWrap, PickerWrapVue3, PickerWrapProps, ToggleButton, ToggleButtonVue3, ActiveView, Calendar, CalendarVue3, CalendarProps, CalendarSettings, CalendarViewEnum, CalendarChangeEvent, CalendarWeekCellClickEvent, CalendarCell, CalendarCellVue3, CalendarCellProps, CalendarWeekCell, CalendarWeekCellVue3, CalendarWeekCellProps, CalendarHeaderTitle, CalendarHeaderTitleVue3, CalendarHeaderTitleProps, DateInput, DateInputVue3, DateInputProps, DateInputSettings, DateInputChangeEvent, DateInputIncrementalSteps, DateInputFormatPlaceholder, DateInputCustomFormatPlaceholder, DatePicker, DatePickerVue3, DatePickerProps, DatePickerSettings, DatePickerChangeEvent, TimePicker, TimePickerVue3, TimePickerProps, TimePickerSettings, TimePickerChangeEvent, DateRangePicker, DateRangePickerProps, DateRangePickerSettings, DateRangePickerCalendarSettings, DateRangePickerDateInputSettings, DateRangePickerPopupSettings, DateRangePickerChangeEvent, DateTimePicker, DateTimePickerVue3, DateTimePickerProps, DateTimePickerSettings, DateTimePickerChangeEvent, SelectionRange };
@@ -5,7 +5,7 @@ export var packageMetadata = {
5
5
  name: '@progress/kendo-vue-dateinputs',
6
6
  productName: 'Kendo UI for Vue',
7
7
  productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
8
- publishDate: 1641561446,
8
+ publishDate: 1641907085,
9
9
  version: '',
10
10
  licensingDocsUrl: 'https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning'
11
11
  };
@@ -1,5 +1,4 @@
1
- import { DefineComponent } from '../additionalTypes';
2
- import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
1
+ import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
3
2
  declare type DefaultData<V> = object | ((this: V) => {});
4
3
  declare type DefaultMethods<V> = {
5
4
  [key: string]: (this: V, ...args: any[]) => any;
@@ -75,7 +74,7 @@ export interface TimeListMethods {
75
74
  /**
76
75
  * @hidden
77
76
  */
78
- export interface TimeListAll extends Vue, TimeListMethods, TimeListData, TimeListComputed, TimeListState {
77
+ export interface TimeListAll extends Vue2type, TimeListMethods, TimeListData, TimeListComputed, TimeListState {
79
78
  }
80
79
  declare let TimeList: ComponentOptions<TimeListAll, DefaultData<TimeListData>, DefaultMethods<TimeListAll>, TimeListComputed, RecordPropsDefinition<TimeListProps>>;
81
80
  declare const TimeListVue3: DefineComponent<TimeListProps, any, TimeListData, TimeListComputed, TimeListMethods, {}, {}, {}, string, TimeListProps, TimeListProps, {}>;
@@ -1,5 +1,4 @@
1
- import { DefineComponent } from '../additionalTypes';
2
- import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
1
+ import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
3
2
  declare type DefaultData<V> = object | ((this: V) => {});
4
3
  declare type DefaultMethods<V> = {
5
4
  [key: string]: (this: V, ...args: any[]) => any;
@@ -87,7 +86,7 @@ export interface TimePartMethods {
87
86
  /**
88
87
  * @hidden
89
88
  */
90
- export interface TimePartAll extends Vue, TimePartMethods, TimePartData, TimePartComputed, TimePartState {
89
+ export interface TimePartAll extends Vue2type, TimePartMethods, TimePartData, TimePartComputed, TimePartState {
91
90
  }
92
91
  declare let TimePart: ComponentOptions<TimePartAll, DefaultData<TimePartData>, DefaultMethods<TimePartAll>, TimePartComputed, RecordPropsDefinition<TimePartProps>>;
93
92
  declare const TimePartVue3: DefineComponent<TimePartProps, any, TimePartData, TimePartComputed, TimePartMethods, {}, {}, {}, string, TimePartProps, TimePartProps, {}>;
@@ -3,6 +3,7 @@ import * as Vue from 'vue';
3
3
  var allVue = Vue;
4
4
  var gh = allVue.h;
5
5
  var inject = allVue.inject;
6
+ import { Button } from '@progress/kendo-vue-buttons';
6
7
  import { cloneDate } from '@progress/kendo-date-math';
7
8
  import { canUseDOM, classNames, Keys } from '@progress/kendo-vue-common';
8
9
  import { provideIntlService, provideLocalizationService } from '@progress/kendo-vue-intl';
@@ -78,7 +79,8 @@ var TimePart = {
78
79
  emits: {
79
80
  'change': null,
80
81
  'focus': null,
81
- 'blur': null
82
+ 'blur': null,
83
+ 'nowclick': null
82
84
  },
83
85
  created: function created() {
84
86
  this.timeLists = [];
@@ -157,22 +159,27 @@ var TimePart = {
157
159
  "class": "k-time-header"
158
160
  }, [h("span", {
159
161
  "class": "k-title"
160
- }, [this.intl.formatDate(this.computedValue, this.dateFormatParts.reduce(this.timeFormatReducer, ''))]), this.showNowButton() && h("button", {
162
+ }, [this.intl.formatDate(this.computedValue, this.dateFormatParts.reduce(this.timeFormatReducer, ''))]), this.showNowButton() && // @ts-ignore function children
163
+ h(Button, {
161
164
  ref: 'nowButton',
162
- "class": "k-button k-flat k-time-now",
163
- title: selectNowMessage,
165
+ fillMode: 'flat',
164
166
  attrs: this.v3 ? undefined : {
167
+ fillMode: 'flat',
165
168
  title: selectNowMessage,
166
169
  "aria-label": selectNowMessage,
167
170
  tabIndex: disabled ? -1 : 0
168
171
  },
172
+ "class": "k-time-now",
173
+ title: selectNowMessage,
169
174
  "aria-label": selectNowMessage,
170
175
  onClick: this.onNowClick,
171
176
  on: this.v3 ? undefined : {
172
177
  "click": this.onNowClick
173
178
  },
174
179
  tabIndex: disabled ? -1 : 0
175
- }, [localizationService.toLanguageString(now, messages[now])])]), h("div", {
180
+ }, this.v3 ? function () {
181
+ return [localizationService.toLanguageString(now, messages[now])];
182
+ } : [localizationService.toLanguageString(now, messages[now])])]), h("div", {
176
183
  "class": "k-time-list-container",
177
184
  onKeydown: this.handleKeyDown,
178
185
  on: this.v3 ? undefined : {
@@ -277,7 +284,7 @@ var TimePart = {
277
284
  return formatRegExp.test(part.type || '');
278
285
  },
279
286
  hasActiveButton: function hasActiveButton() {
280
- return canUseDOM && document.activeElement === this._nowButton;
287
+ return canUseDOM && document.activeElement === this._nowButton.$el;
281
288
  },
282
289
  focusList: function focusList(dir) {
283
290
  if (!this.timeLists.length) {
@@ -1,5 +1,4 @@
1
- import { DefineComponent } from '../additionalTypes';
2
- import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
1
+ import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
3
2
  declare type DefaultData<V> = object | ((this: V) => {});
4
3
  declare type DefaultMethods<V> = {
5
4
  [key: string]: (this: V, ...args: any[]) => any;
@@ -106,7 +105,7 @@ export interface TimePickerComputed {
106
105
  /**
107
106
  * @hidden
108
107
  */
109
- export interface TimePickerAll extends Vue, TimePickerMethods, TimePickerData, TimePickerComputed, TimePickerState {
108
+ export interface TimePickerAll extends Vue2type, TimePickerMethods, TimePickerData, TimePickerComputed, TimePickerState {
110
109
  }
111
110
  declare let TimePicker: ComponentOptions<TimePickerAll, DefaultData<TimePickerData>, DefaultMethods<TimePickerAll>, TimePickerComputed, RecordPropsDefinition<TimePickerProps>>;
112
111
  declare const TimePickerVue3: DefineComponent<TimePickerProps, any, TimePickerData, TimePickerComputed, TimePickerMethods, {}, {}, {}, string, TimePickerProps, TimePickerProps, {}>;
@@ -23,8 +23,9 @@ var inject = allVue.inject;
23
23
  import { FloatingLabel } from '@progress/kendo-vue-labels';
24
24
  import { Popup } from '@progress/kendo-vue-popup';
25
25
  import { cloneDate } from '@progress/kendo-date-math';
26
- import { classNames, guid, Keys, templateRendering, getListeners, getTemplate, canUseDOM } from '@progress/kendo-vue-common';
26
+ import { classNames, guid, Keys, templateRendering, getListeners, getTemplate, canUseDOM, kendoThemeMaps, getDefaultSlots } from '@progress/kendo-vue-common';
27
27
  import { provideLocalizationService } from '@progress/kendo-vue-intl';
28
+ import { Button as KButton } from '@progress/kendo-vue-buttons';
28
29
  import { messages, toggleTimeSelector, toggleClock } from '../messages';
29
30
  import { DateInput } from '../dateinput/DateInput';
30
31
  import { TimeSelector } from './TimeSelector';
@@ -96,6 +97,27 @@ var TimePicker = {
96
97
  return defaultFormatPlaceholder;
97
98
  }
98
99
  },
100
+ rounded: {
101
+ type: String,
102
+ default: 'medium',
103
+ validator: function validator(value) {
104
+ return ['small', 'medium', 'large', 'full'].includes(value);
105
+ }
106
+ },
107
+ fillMode: {
108
+ type: String,
109
+ default: 'solid',
110
+ validator: function validator(value) {
111
+ return ['solid', 'flat', 'outline'].includes(value);
112
+ }
113
+ },
114
+ size: {
115
+ type: String,
116
+ default: 'medium',
117
+ validator: function validator(value) {
118
+ return ['small', 'medium', 'large'].includes(value);
119
+ }
120
+ },
99
121
  id: String,
100
122
  ariaLabelledBy: String,
101
123
  ariaDescribedBy: String,
@@ -259,38 +281,43 @@ var TimePicker = {
259
281
  },
260
282
  // @ts-ignore
261
283
  render: function render(createElement) {
284
+ var _a;
285
+
262
286
  var _this = this;
263
287
 
264
288
  var h = gh || createElement;
265
- var _a = this.$props,
266
- disabled = _a.disabled,
267
- tabIndex = _a.tabIndex,
268
- title = _a.title,
269
- id = _a.id,
270
- placeholder = _a.placeholder,
271
- format = _a.format,
272
- formatPlaceholder = _a.formatPlaceholder,
273
- smoothScroll = _a.smoothScroll,
274
- width = _a.width,
275
- name = _a.name,
276
- steps = _a.steps,
277
- cancelButton = _a.cancelButton,
278
- nowButton = _a.nowButton,
279
- validationMessage = _a.validationMessage,
280
- required = _a.required,
281
- validityStyles = _a.validityStyles,
282
- ariaLabelledBy = _a.ariaLabelledBy,
283
- ariaDescribedBy = _a.ariaDescribedBy;
284
- var _b = this.$props.popupSettings,
285
- popupClass = _b.popupClass,
286
- appendTo = _b.appendTo,
287
- animate = _b.animate;
289
+ var defaultSlot = getDefaultSlots(this);
290
+ var _b = this.$props,
291
+ disabled = _b.disabled,
292
+ tabIndex = _b.tabIndex,
293
+ title = _b.title,
294
+ id = _b.id,
295
+ placeholder = _b.placeholder,
296
+ format = _b.format,
297
+ formatPlaceholder = _b.formatPlaceholder,
298
+ smoothScroll = _b.smoothScroll,
299
+ width = _b.width,
300
+ name = _b.name,
301
+ steps = _b.steps,
302
+ cancelButton = _b.cancelButton,
303
+ nowButton = _b.nowButton,
304
+ validationMessage = _b.validationMessage,
305
+ required = _b.required,
306
+ validityStyles = _b.validityStyles,
307
+ ariaLabelledBy = _b.ariaLabelledBy,
308
+ ariaDescribedBy = _b.ariaDescribedBy,
309
+ size = _b.size,
310
+ rounded = _b.rounded,
311
+ fillMode = _b.fillMode;
312
+ var _c = this.$props.popupSettings,
313
+ popupClass = _c.popupClass,
314
+ appendTo = _c.appendTo,
315
+ animate = _c.animate;
288
316
  var isValid = !this.$props.validityStyles || this.validity().valid;
289
- var rootClassName = classNames('k-widget k-timepicker');
290
317
  var wrapperClassNames = classNames('k-picker-wrap', {
291
- 'k-state-invalid': !isValid,
292
- 'k-state-disabled': disabled,
293
- 'k-state-focused': this.isFocused
318
+ 'k-invalid': !isValid,
319
+ 'k-disabled': disabled,
320
+ 'k-focus': this.isFocused
294
321
  });
295
322
  var popupClassNames = classNames('k-group k-reset', popupClass);
296
323
  var localizationService = provideLocalizationService(this);
@@ -309,6 +336,9 @@ var TimePicker = {
309
336
  format: format,
310
337
  formatPlaceholder: formatPlaceholder,
311
338
  id: id,
339
+ size: null,
340
+ rounded: null,
341
+ fillMode: null,
312
342
  ariaLabelledBy: ariaLabelledBy,
313
343
  ariaDescribedBy: ariaDescribedBy,
314
344
  max: this.normalizeTime(this.$props.max),
@@ -327,6 +357,9 @@ var TimePicker = {
327
357
  format: format,
328
358
  formatPlaceholder: formatPlaceholder,
329
359
  id: id,
360
+ size: null,
361
+ rounded: null,
362
+ fillMode: null,
330
363
  ariaLabelledBy: ariaLabelledBy,
331
364
  ariaDescribedBy: ariaDescribedBy,
332
365
  max: this.normalizeTime(this.$props.max),
@@ -344,7 +377,9 @@ var TimePicker = {
344
377
  validationMessage: validationMessage,
345
378
  validityStyles: validityStyles,
346
379
  value: this.computedValue && this.normalizeTime(this.computedValue)
347
- });
380
+ }, this.v3 ? function () {
381
+ return [defaultSlot];
382
+ } : [defaultSlot]);
348
383
  var timeSelector = // @ts-ignore function children
349
384
  h(TimeSelector, {
350
385
  ref: 'timeSelector',
@@ -428,7 +463,7 @@ var TimePicker = {
428
463
  defaultSlots: timeSelector
429
464
  });
430
465
  var timePicker = h("div", {
431
- "class": rootClassName,
466
+ "class": classNames('k-input', 'k-timepicker', (_a = {}, _a["k-input-" + (kendoThemeMaps.sizeMap[size] || size)] = size, _a["k-input-" + fillMode] = fillMode, _a["k-rounded-" + (kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded, _a['k-valid'] = isValid, _a['k-invalid'] = !isValid, _a['k-required'] = this.required, _a['k-disabled'] = this.$props.disabled, _a['k-focus'] = this.isFocused, _a)),
432
467
  onKeydown: this.handleKeyDown,
433
468
  on: this.v3 ? undefined : {
434
469
  "keydown": this.handleKeyDown,
@@ -439,16 +474,15 @@ var TimePicker = {
439
474
  width: width
440
475
  },
441
476
  onFocusin: this.handleFocus,
442
- onFocusout: this.handleBlur
443
- }, [h("span", {
477
+ onFocusout: this.handleBlur,
444
478
  ref: this.v3 ? function (el) {
445
479
  _this.kendoAnchorRef = el;
446
- } : this._anchor,
447
- "class": wrapperClassNames
448
- }, [dateInputRendering, h("span", {
449
- role: "button",
480
+ } : this._anchor
481
+ }, [dateInputRendering, // @ts-ignore
482
+ h(KButton, {
483
+ icon: 'clock',
450
484
  attrs: this.v3 ? undefined : {
451
- role: "button",
485
+ icon: 'clock',
452
486
  title: toggleTimeMessage,
453
487
  "aria-controls": this._popupId,
454
488
  "aria-label": toggleClockMessage
@@ -460,12 +494,10 @@ var TimePicker = {
460
494
  },
461
495
  onClick: this.handleIconClick,
462
496
  title: toggleTimeMessage,
463
- "class": "k-select",
497
+ "class": "k-input-button",
464
498
  "aria-controls": this._popupId,
465
499
  "aria-label": toggleClockMessage
466
- }, [h("span", {
467
- "class": "k-icon k-i-clock"
468
- })])]), popupRendering]);
500
+ }), popupRendering]);
469
501
  return this.$props.label ? // @ts-ignore function children
470
502
  h(FloatingLabel, {
471
503
  label: this.$props.label,