igniteui-webcomponents 5.4.1 → 6.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 (215) hide show
  1. package/CHANGELOG.md +74 -0
  2. package/README.md +6 -1
  3. package/components/avatar/themes/dark/avatar.bootstrap.css.js +1 -1
  4. package/components/avatar/themes/dark/avatar.bootstrap.css.js.map +1 -1
  5. package/components/avatar/themes/dark/avatar.fluent.css.js +1 -1
  6. package/components/avatar/themes/dark/avatar.fluent.css.js.map +1 -1
  7. package/components/avatar/themes/dark/avatar.material.css.js +1 -1
  8. package/components/avatar/themes/dark/avatar.material.css.js.map +1 -1
  9. package/components/calendar/themes/dark/calendar.fluent.css.js +1 -1
  10. package/components/calendar/themes/dark/calendar.fluent.css.js.map +1 -1
  11. package/components/calendar/themes/light/calendar.fluent.css.js +1 -1
  12. package/components/calendar/themes/light/calendar.fluent.css.js.map +1 -1
  13. package/components/calendar/themes/light/calendar.shared.css.js +1 -1
  14. package/components/calendar/themes/light/calendar.shared.css.js.map +1 -1
  15. package/components/checkbox/checkbox-base.d.ts +0 -2
  16. package/components/checkbox/checkbox-base.js.map +1 -1
  17. package/components/chip/chip.d.ts +4 -0
  18. package/components/chip/chip.js +26 -3
  19. package/components/chip/chip.js.map +1 -1
  20. package/components/chip/themes/shared/chip.common.css.js +1 -1
  21. package/components/chip/themes/shared/chip.common.css.js.map +1 -1
  22. package/components/chip/themes/shared/chip.indigo.css.js +1 -1
  23. package/components/chip/themes/shared/chip.indigo.css.js.map +1 -1
  24. package/components/common/controllers/gestures.d.ts +1 -0
  25. package/components/common/controllers/gestures.js.map +1 -1
  26. package/components/common/controllers/resize-observer.d.ts +40 -0
  27. package/components/common/controllers/resize-observer.js +37 -0
  28. package/components/common/controllers/resize-observer.js.map +1 -0
  29. package/components/common/definitions/defineAllComponents.js +0 -2
  30. package/components/common/definitions/defineAllComponents.js.map +1 -1
  31. package/components/common/util.d.ts +1 -17
  32. package/components/common/util.js +10 -10
  33. package/components/common/util.js.map +1 -1
  34. package/components/date-picker/date-picker.d.ts +35 -35
  35. package/components/date-picker/date-picker.js +131 -128
  36. package/components/date-picker/date-picker.js.map +1 -1
  37. package/components/date-picker/themes/dark/date-picker.fluent.css.js +1 -1
  38. package/components/date-picker/themes/dark/date-picker.fluent.css.js.map +1 -1
  39. package/components/date-picker/themes/light/date-picker.fluent.css.js +1 -1
  40. package/components/date-picker/themes/light/date-picker.fluent.css.js.map +1 -1
  41. package/components/date-picker/themes/light/date-picker.shared.css.js +1 -1
  42. package/components/date-picker/themes/light/date-picker.shared.css.js.map +1 -1
  43. package/components/date-time-input/date-time-input.js +1 -1
  44. package/components/date-time-input/date-time-input.js.map +1 -1
  45. package/components/file-input/file-input.d.ts +1 -1
  46. package/components/file-input/file-input.js.map +1 -1
  47. package/components/input/themes/input.base.css.js +1 -1
  48. package/components/input/themes/input.base.css.js.map +1 -1
  49. package/components/popover/popover.js +1 -1
  50. package/components/popover/popover.js.map +1 -1
  51. package/components/popover/themes/light/popover.base.css.js +1 -1
  52. package/components/popover/themes/light/popover.base.css.js.map +1 -1
  53. package/components/progress/themes/circular/dark/circular.progress.shared.css.js +1 -1
  54. package/components/progress/themes/circular/dark/circular.progress.shared.css.js.map +1 -1
  55. package/components/progress/themes/linear/dark/linear.progress.bootstrap.css.js +1 -1
  56. package/components/progress/themes/linear/dark/linear.progress.bootstrap.css.js.map +1 -1
  57. package/components/progress/themes/linear/dark/linear.progress.shared.css.js +1 -1
  58. package/components/progress/themes/linear/dark/linear.progress.shared.css.js.map +1 -1
  59. package/components/radio/radio.d.ts +0 -2
  60. package/components/radio/radio.js.map +1 -1
  61. package/components/radio-group/radio-group.d.ts +2 -1
  62. package/components/radio-group/radio-group.js +23 -10
  63. package/components/radio-group/radio-group.js.map +1 -1
  64. package/components/radio-group/themes/dark/radio-group.bootstrap.css.js +3 -0
  65. package/components/radio-group/themes/dark/radio-group.bootstrap.css.js.map +1 -0
  66. package/components/radio-group/themes/dark/radio-group.fluent.css.js +3 -0
  67. package/components/radio-group/themes/dark/radio-group.fluent.css.js.map +1 -0
  68. package/components/radio-group/themes/dark/radio-group.indigo.css.js +3 -0
  69. package/components/radio-group/themes/dark/radio-group.indigo.css.js.map +1 -0
  70. package/components/radio-group/themes/dark/radio-group.material.css.js +3 -0
  71. package/components/radio-group/themes/dark/radio-group.material.css.js.map +1 -0
  72. package/components/radio-group/themes/light/radio-group.bootstrap.css.js +3 -0
  73. package/components/radio-group/themes/light/radio-group.bootstrap.css.js.map +1 -0
  74. package/components/radio-group/themes/light/radio-group.fluent.css.d.ts +1 -0
  75. package/components/radio-group/themes/light/radio-group.fluent.css.js +3 -0
  76. package/components/radio-group/themes/light/radio-group.fluent.css.js.map +1 -0
  77. package/components/radio-group/themes/light/radio-group.indigo.css.d.ts +1 -0
  78. package/components/radio-group/themes/light/radio-group.indigo.css.js +3 -0
  79. package/components/radio-group/themes/light/radio-group.indigo.css.js.map +1 -0
  80. package/components/radio-group/themes/light/radio-group.material.css.d.ts +1 -0
  81. package/components/radio-group/themes/light/radio-group.material.css.js +3 -0
  82. package/components/radio-group/themes/light/radio-group.material.css.js.map +1 -0
  83. package/components/radio-group/themes/light/radio-group.shared.css.d.ts +1 -0
  84. package/components/radio-group/themes/light/radio-group.shared.css.js +3 -0
  85. package/components/radio-group/themes/light/radio-group.shared.css.js.map +1 -0
  86. package/components/radio-group/themes/radio-group.base.css.d.ts +1 -0
  87. package/components/radio-group/{radio-group.base.css.js → themes/radio-group.base.css.js} +1 -1
  88. package/components/radio-group/themes/radio-group.base.css.js.map +1 -0
  89. package/components/radio-group/themes/shared/radio-group.bootstrap.css.d.ts +1 -0
  90. package/components/radio-group/themes/shared/radio-group.bootstrap.css.js +3 -0
  91. package/components/radio-group/themes/shared/radio-group.bootstrap.css.js.map +1 -0
  92. package/components/radio-group/themes/shared/radio-group.common.css.d.ts +1 -0
  93. package/components/radio-group/themes/shared/radio-group.common.css.js +3 -0
  94. package/components/radio-group/themes/shared/radio-group.common.css.js.map +1 -0
  95. package/components/radio-group/themes/shared/radio-group.fluent.css.d.ts +1 -0
  96. package/components/radio-group/themes/shared/radio-group.fluent.css.js +3 -0
  97. package/components/radio-group/themes/shared/radio-group.fluent.css.js.map +1 -0
  98. package/components/radio-group/themes/shared/radio-group.indigo.css.d.ts +1 -0
  99. package/components/radio-group/themes/shared/radio-group.indigo.css.js +3 -0
  100. package/components/radio-group/themes/shared/radio-group.indigo.css.js.map +1 -0
  101. package/components/radio-group/themes/shared/radio-group.material.css.d.ts +1 -0
  102. package/components/radio-group/themes/shared/radio-group.material.css.js +3 -0
  103. package/components/radio-group/themes/shared/radio-group.material.css.js.map +1 -0
  104. package/components/radio-group/themes/themes.d.ts +2 -0
  105. package/components/radio-group/themes/themes.js +50 -0
  106. package/components/radio-group/themes/themes.js.map +1 -0
  107. package/components/slider/range-slider.d.ts +0 -2
  108. package/components/slider/range-slider.js.map +1 -1
  109. package/components/stepper/step.d.ts +1 -1
  110. package/components/stepper/step.js +3 -2
  111. package/components/stepper/step.js.map +1 -1
  112. package/components/stepper/stepper.common.d.ts +0 -4
  113. package/components/stepper/stepper.common.js.map +1 -1
  114. package/components/stepper/stepper.d.ts +2 -2
  115. package/components/stepper/stepper.js +2 -9
  116. package/components/stepper/stepper.js.map +1 -1
  117. package/components/stepper/themes/step/dark/step.indigo.css.js +1 -1
  118. package/components/stepper/themes/step/dark/step.indigo.css.js.map +1 -1
  119. package/components/stepper/themes/step/light/step.bootstrap.css.js +1 -1
  120. package/components/stepper/themes/step/light/step.bootstrap.css.js.map +1 -1
  121. package/components/stepper/themes/step/light/step.fluent.css.js +1 -1
  122. package/components/stepper/themes/step/light/step.fluent.css.js.map +1 -1
  123. package/components/stepper/themes/step/light/step.indigo.css.js +1 -1
  124. package/components/stepper/themes/step/light/step.indigo.css.js.map +1 -1
  125. package/components/stepper/themes/step/light/step.material.css.js +1 -1
  126. package/components/stepper/themes/step/light/step.material.css.js.map +1 -1
  127. package/components/stepper/themes/step/light/step.shared.css.js +1 -1
  128. package/components/stepper/themes/step/light/step.shared.css.js.map +1 -1
  129. package/components/tabs/tab-dom.d.ts +66 -0
  130. package/components/tabs/tab-dom.js +106 -0
  131. package/components/tabs/tab-dom.js.map +1 -0
  132. package/components/tabs/tab.d.ts +14 -15
  133. package/components/tabs/tab.js +27 -22
  134. package/components/tabs/tab.js.map +1 -1
  135. package/components/tabs/tabs.d.ts +43 -49
  136. package/components/tabs/tabs.js +178 -231
  137. package/components/tabs/tabs.js.map +1 -1
  138. package/components/tabs/themes/dark/tab.indigo.css.js +1 -1
  139. package/components/tabs/themes/dark/tab.indigo.css.js.map +1 -1
  140. package/components/tabs/themes/light/tab.indigo.css.js +1 -1
  141. package/components/tabs/themes/light/tab.indigo.css.js.map +1 -1
  142. package/components/tabs/themes/shared/tab/tab.bootstrap.css.js +1 -1
  143. package/components/tabs/themes/shared/tab/tab.bootstrap.css.js.map +1 -1
  144. package/components/tabs/themes/shared/tab/tab.common.css.js +1 -1
  145. package/components/tabs/themes/shared/tab/tab.common.css.js.map +1 -1
  146. package/components/tabs/themes/shared/tab/tab.fluent.css.js +1 -1
  147. package/components/tabs/themes/shared/tab/tab.fluent.css.js.map +1 -1
  148. package/components/tabs/themes/shared/tab/tab.indigo.css.js +1 -1
  149. package/components/tabs/themes/shared/tab/tab.indigo.css.js.map +1 -1
  150. package/components/tabs/themes/shared/tab/tab.material.css.d.ts +1 -0
  151. package/components/tabs/themes/shared/tab/tab.material.css.js +3 -0
  152. package/components/tabs/themes/shared/tab/tab.material.css.js.map +1 -0
  153. package/components/tabs/themes/shared/tabs/tabs.bootstrap.css.js +1 -1
  154. package/components/tabs/themes/shared/tabs/tabs.bootstrap.css.js.map +1 -1
  155. package/components/tabs/themes/shared/tabs/tabs.common.css.js +1 -1
  156. package/components/tabs/themes/shared/tabs/tabs.common.css.js.map +1 -1
  157. package/components/tabs/themes/shared/tabs/tabs.fluent.css.js +1 -1
  158. package/components/tabs/themes/shared/tabs/tabs.fluent.css.js.map +1 -1
  159. package/components/tabs/themes/shared/tabs/tabs.indigo.css.js +1 -1
  160. package/components/tabs/themes/shared/tabs/tabs.indigo.css.js.map +1 -1
  161. package/components/tabs/themes/shared/tabs/tabs.material.css.d.ts +1 -0
  162. package/components/tabs/themes/shared/tabs/tabs.material.css.js +3 -0
  163. package/components/tabs/themes/shared/tabs/tabs.material.css.js.map +1 -0
  164. package/components/tabs/themes/tab-themes.js +7 -0
  165. package/components/tabs/themes/tab-themes.js.map +1 -1
  166. package/components/tabs/themes/tab.base.css.js +1 -1
  167. package/components/tabs/themes/tab.base.css.js.map +1 -1
  168. package/components/tabs/themes/tabs-themes.js +3 -2
  169. package/components/tabs/themes/tabs-themes.js.map +1 -1
  170. package/components/tabs/themes/tabs.base.css.js +1 -1
  171. package/components/tabs/themes/tabs.base.css.js.map +1 -1
  172. package/components/tabs/themes/tabs.common.css.d.ts +1 -0
  173. package/components/tabs/themes/tabs.common.css.js +3 -0
  174. package/components/tabs/themes/tabs.common.css.js.map +1 -0
  175. package/components/textarea/textarea.d.ts +31 -34
  176. package/components/textarea/textarea.js +89 -91
  177. package/components/textarea/textarea.js.map +1 -1
  178. package/components/tooltip/tooltip.js.map +1 -1
  179. package/components/types.d.ts +2 -2
  180. package/components/types.js.map +1 -1
  181. package/components/validation-container/themes/dark/validator.indigo.css.js +1 -1
  182. package/components/validation-container/themes/dark/validator.indigo.css.js.map +1 -1
  183. package/custom-elements.json +873 -616
  184. package/igniteui-webcomponents.css-data.json +1 -1
  185. package/igniteui-webcomponents.html-data.json +1 -1
  186. package/index.d.ts +0 -5
  187. package/index.js +0 -1
  188. package/index.js.map +1 -1
  189. package/package.json +4 -3
  190. package/themes/dark/bootstrap.css +1 -1
  191. package/themes/dark/fluent.css +1 -1
  192. package/themes/dark/indigo.css +1 -1
  193. package/themes/dark/material.css +1 -1
  194. package/themes/light/bootstrap.css +1 -1
  195. package/themes/light/fluent.css +1 -1
  196. package/themes/light/indigo.css +1 -1
  197. package/themes/light/material.css +1 -1
  198. package/web-types.json +2 -2
  199. package/components/radio-group/radio-group.base.css.js.map +0 -1
  200. package/components/radio-group/radio-group.fluent.css.js +0 -3
  201. package/components/radio-group/radio-group.fluent.css.js.map +0 -1
  202. package/components/radio-group/radio-group.indigo.css.js +0 -3
  203. package/components/radio-group/radio-group.indigo.css.js.map +0 -1
  204. package/components/radio-group/radio-group.material.css.js +0 -3
  205. package/components/radio-group/radio-group.material.css.js.map +0 -1
  206. package/components/tabs/tab-panel.d.ts +0 -21
  207. package/components/tabs/tab-panel.js +0 -26
  208. package/components/tabs/tab-panel.js.map +0 -1
  209. package/components/tabs/themes/tab-panel.base.css.js +0 -3
  210. package/components/tabs/themes/tab-panel.base.css.js.map +0 -1
  211. /package/components/radio-group/{radio-group.base.css.d.ts → themes/dark/radio-group.bootstrap.css.d.ts} +0 -0
  212. /package/components/radio-group/{radio-group.fluent.css.d.ts → themes/dark/radio-group.fluent.css.d.ts} +0 -0
  213. /package/components/radio-group/{radio-group.indigo.css.d.ts → themes/dark/radio-group.indigo.css.d.ts} +0 -0
  214. /package/components/radio-group/{radio-group.material.css.d.ts → themes/dark/radio-group.material.css.d.ts} +0 -0
  215. /package/components/{tabs/themes/tab-panel.base.css.d.ts → radio-group/themes/light/radio-group.bootstrap.css.d.ts} +0 -0
@@ -22,7 +22,7 @@ import { IgcBaseComboBoxLikeComponent } from '../common/mixins/combo-box.js';
22
22
  import { EventEmitterMixin } from '../common/mixins/event-emitter.js';
23
23
  import { FormAssociatedRequiredMixin } from '../common/mixins/forms/associated-required.js';
24
24
  import { createFormValueState, defaultDateTimeTransformers, } from '../common/mixins/forms/form-value.js';
25
- import { createCounter, findElementFromEventPath } from '../common/util.js';
25
+ import { createCounter, findElementFromEventPath, isEmpty, } from '../common/util.js';
26
26
  import IgcDateTimeInputComponent from '../date-time-input/date-time-input.js';
27
27
  import IgcDialogComponent from '../dialog/dialog.js';
28
28
  import IgcFocusTrapComponent from '../focus-trap/focus-trap.js';
@@ -35,13 +35,13 @@ import { all } from './themes/themes.js';
35
35
  import { datePickerValidators } from './validators.js';
36
36
  const formats = new Set(['short', 'medium', 'long', 'full']);
37
37
  let IgcDatePickerComponent = IgcDatePickerComponent_1 = class IgcDatePickerComponent extends FormAssociatedRequiredMixin(EventEmitterMixin(IgcBaseComboBoxLikeComponent)) {
38
- get __validators() {
39
- return datePickerValidators;
40
- }
41
38
  static register() {
42
39
  registerComponent(IgcDatePickerComponent_1, IgcCalendarComponent, IgcDateTimeInputComponent, IgcFocusTrapComponent, IgcIconComponent, IgcPopoverComponent, IgcDialogComponent, IgcValidationContainerComponent);
43
40
  }
44
- get isDropDown() {
41
+ get __validators() {
42
+ return datePickerValidators;
43
+ }
44
+ get _isDropDown() {
45
45
  return this.mode === 'dropdown';
46
46
  }
47
47
  get _isMaterialTheme() {
@@ -62,7 +62,7 @@ let IgcDatePickerComponent = IgcDatePickerComponent_1 = class IgcDatePickerCompo
62
62
  }
63
63
  set min(value) {
64
64
  this._min = convertToDate(value);
65
- this.setDateConstraints();
65
+ this._setDateConstraints();
66
66
  this._updateValidity();
67
67
  }
68
68
  get min() {
@@ -70,7 +70,7 @@ let IgcDatePickerComponent = IgcDatePickerComponent_1 = class IgcDatePickerCompo
70
70
  }
71
71
  set max(value) {
72
72
  this._max = convertToDate(value);
73
- this.setDateConstraints();
73
+ this._setDateConstraints();
74
74
  this._updateValidity();
75
75
  }
76
76
  get max() {
@@ -78,7 +78,7 @@ let IgcDatePickerComponent = IgcDatePickerComponent_1 = class IgcDatePickerCompo
78
78
  }
79
79
  set disabledDates(dates) {
80
80
  this._disabledDates = dates;
81
- this.setDateConstraints();
81
+ this._setDateConstraints();
82
82
  this._updateValidity();
83
83
  }
84
84
  get disabledDates() {
@@ -96,12 +96,12 @@ let IgcDatePickerComponent = IgcDatePickerComponent_1 = class IgcDatePickerCompo
96
96
  get inputFormat() {
97
97
  return this._inputFormat ?? this._input?.inputFormat;
98
98
  }
99
- openChange() {
99
+ _openChange() {
100
100
  this._rootClickController.update();
101
101
  }
102
102
  constructor() {
103
103
  super();
104
- this.inputId = `date-picker-${IgcDatePickerComponent_1.increment()}`;
104
+ this._inputId = `date-picker-${IgcDatePickerComponent_1._increment()}`;
105
105
  this._activeDate = null;
106
106
  this._min = null;
107
107
  this._max = null;
@@ -124,59 +124,64 @@ let IgcDatePickerComponent = IgcDatePickerComponent_1 = class IgcDatePickerCompo
124
124
  initialValue: null,
125
125
  transformers: defaultDateTimeTransformers,
126
126
  });
127
- this.addEventListener('focusin', this.handleFocusIn);
128
- this.addEventListener('focusout', this.handleFocusOut);
129
- this._rootClickController.update({ hideCallback: this.handleClosing });
127
+ this.addEventListener('focusin', this._handleFocusIn);
128
+ this.addEventListener('focusout', this._handleFocusOut);
129
+ this._rootClickController.update({ hideCallback: this._handleClosing });
130
130
  addKeybindings(this, {
131
- skip: () => this.disabled,
131
+ skip: () => this.disabled || this.readOnly,
132
132
  bindingDefaults: { preventDefault: true },
133
133
  })
134
134
  .set([altKey, arrowDown], this.handleAnchorClick)
135
- .set([altKey, arrowUp], this.onEscapeKey)
136
- .set(escapeKey, this.onEscapeKey);
135
+ .set([altKey, arrowUp], this._onEscapeKey)
136
+ .set(escapeKey, this._onEscapeKey);
137
137
  }
138
138
  createRenderRoot() {
139
139
  const root = super.createRenderRoot();
140
140
  root.addEventListener('slotchange', () => this.requestUpdate());
141
141
  return root;
142
142
  }
143
- clear() {
144
- this.value = null;
145
- this._input?.clear();
146
- }
147
- stepUp(datePart, delta) {
148
- this._input.stepUp(datePart, delta);
149
- }
150
- stepDown(datePart, delta) {
151
- this._input.stepDown(datePart, delta);
152
- }
153
- select() {
154
- this._input.select();
155
- }
156
- setSelectionRange(start, end, direction) {
157
- this._input.setSelectionRange(start, end, direction);
143
+ _setDateConstraints() {
144
+ const dates = [];
145
+ if (this._min) {
146
+ dates.push({
147
+ type: DateRangeType.Before,
148
+ dateRange: [this._min],
149
+ });
150
+ }
151
+ if (this._max) {
152
+ dates.push({
153
+ type: DateRangeType.After,
154
+ dateRange: [this._max],
155
+ });
156
+ }
157
+ if (!isEmpty(this._disabledDates ?? [])) {
158
+ dates.push(...this.disabledDates);
159
+ }
160
+ this._dateConstraints = isEmpty(dates) ? undefined : dates;
158
161
  }
159
- setRangeText(replacement, start, end, mode) {
160
- this._input.setRangeText(replacement, start, end, mode);
161
- this.value = this._input.value;
162
+ async _shouldCloseCalendarDropdown() {
163
+ if (!this.keepOpenOnSelect && (await this._hide(true))) {
164
+ this._input.focus();
165
+ this._input.select();
166
+ }
162
167
  }
163
- async onEscapeKey() {
168
+ async _onEscapeKey() {
164
169
  if (await this._hide(true)) {
165
170
  this._input.focus();
166
171
  }
167
172
  }
168
- handleFocusIn() {
173
+ _handleFocusIn() {
169
174
  this._dirty = true;
170
175
  }
171
- handleFocusOut({ relatedTarget }) {
176
+ _handleFocusOut({ relatedTarget }) {
172
177
  if (!this.contains(relatedTarget)) {
173
178
  this.checkValidity();
174
179
  }
175
180
  }
176
- handlerCalendarIconSlotPointerDown(event) {
181
+ _handlerCalendarIconSlotPointerDown(event) {
177
182
  event.preventDefault();
178
183
  }
179
- handleInputClick(event) {
184
+ _handleInputClick(event) {
180
185
  if (findElementFromEventPath('input', event)) {
181
186
  this.handleAnchorClick();
182
187
  }
@@ -187,18 +192,12 @@ let IgcDatePickerComponent = IgcDatePickerComponent_1 = class IgcDatePickerCompo
187
192
  await this.updateComplete;
188
193
  this._calendar[focusActiveDate]();
189
194
  }
190
- async _shouldCloseCalendarDropdown() {
191
- if (!this.keepOpenOnSelect && (await this._hide(true))) {
192
- this._input.focus();
193
- this._input.select();
194
- }
195
- }
196
- handleInputChangeEvent(event) {
195
+ _handleInputChangeEvent(event) {
197
196
  event.stopPropagation();
198
197
  this.value = event.target.value;
199
198
  this.emitEvent('igcChange', { detail: this.value });
200
199
  }
201
- async handleCalendarChangeEvent(event) {
200
+ async _handleCalendarChangeEvent(event) {
202
201
  event.stopPropagation();
203
202
  if (this.readOnly) {
204
203
  await this._calendar.updateComplete;
@@ -209,7 +208,7 @@ let IgcDatePickerComponent = IgcDatePickerComponent_1 = class IgcDatePickerCompo
209
208
  this.emitEvent('igcChange', { detail: this.value });
210
209
  this._shouldCloseCalendarDropdown();
211
210
  }
212
- handleInputEvent(event) {
211
+ _handleInputEvent(event) {
213
212
  event.stopPropagation();
214
213
  if (this.nonEditable) {
215
214
  event.preventDefault();
@@ -218,40 +217,45 @@ let IgcDatePickerComponent = IgcDatePickerComponent_1 = class IgcDatePickerCompo
218
217
  this.value = event.target.value;
219
218
  this.emitEvent('igcInput', { detail: this.value });
220
219
  }
221
- handleClosing() {
220
+ _handleClosing() {
222
221
  this._hide(true);
223
222
  }
224
- handleDialogClosing(event) {
223
+ _handleDialogClosing(event) {
225
224
  event.stopPropagation();
226
225
  this._hide(true);
227
226
  }
228
- handleDialogClosed(event) {
227
+ _handleDialogClosed(event) {
229
228
  event.stopPropagation();
230
229
  }
231
- setDateConstraints() {
232
- const dates = [];
233
- if (this._min) {
234
- dates.push({
235
- type: DateRangeType.Before,
236
- dateRange: [this._min],
237
- });
238
- }
239
- if (this._max) {
240
- dates.push({
241
- type: DateRangeType.After,
242
- dateRange: [this._max],
243
- });
244
- }
245
- if (this._disabledDates?.length) {
246
- dates.push(...this.disabledDates);
247
- }
248
- this._dateConstraints = dates.length ? dates : undefined;
230
+ clear() {
231
+ this.value = null;
232
+ this._input?.clear();
233
+ }
234
+ stepUp(datePart, delta) {
235
+ this._input.stepUp(datePart, delta);
249
236
  }
250
- renderClearIcon() {
237
+ stepDown(datePart, delta) {
238
+ this._input.stepDown(datePart, delta);
239
+ }
240
+ select() {
241
+ this._input.select();
242
+ }
243
+ setSelectionRange(start, end, direction) {
244
+ this._input.setSelectionRange(start, end, direction);
245
+ }
246
+ setRangeText(replacement, start, end, mode) {
247
+ this._input.setRangeText(replacement, start, end, mode);
248
+ this.value = this._input.value;
249
+ }
250
+ _renderClearIcon() {
251
251
  return !this.value
252
252
  ? nothing
253
253
  : html `
254
- <span slot="suffix" part="clear-icon" @click=${this.clear}>
254
+ <span
255
+ slot="suffix"
256
+ part="clear-icon"
257
+ @click=${this.readOnly ? nothing : this.clear}
258
+ >
255
259
  <slot name="clear-icon">
256
260
  <igc-icon
257
261
  name="input_clear"
@@ -262,7 +266,7 @@ let IgcDatePickerComponent = IgcDatePickerComponent_1 = class IgcDatePickerCompo
262
266
  </span>
263
267
  `;
264
268
  }
265
- renderCalendarIcon() {
269
+ _renderCalendarIcon() {
266
270
  const defaultIcon = html `
267
271
  <igc-icon name="today" collection="default" aria-hidden="true"></igc-icon>
268
272
  `;
@@ -271,18 +275,18 @@ let IgcDatePickerComponent = IgcDatePickerComponent_1 = class IgcDatePickerCompo
271
275
  <span
272
276
  slot="prefix"
273
277
  part=${state}
274
- @pointerdown=${this.handlerCalendarIconSlotPointerDown}
275
- @click=${this.handleAnchorClick}
278
+ @pointerdown=${this._handlerCalendarIconSlotPointerDown}
279
+ @click=${this.readOnly ? nothing : this.handleAnchorClick}
276
280
  >
277
281
  <slot name=${state}>${defaultIcon}</slot>
278
282
  </span>
279
283
  `;
280
284
  }
281
- renderCalendarSlots() {
282
- if (this.isDropDown) {
285
+ _renderCalendarSlots() {
286
+ if (this._isDropDown) {
283
287
  return nothing;
284
288
  }
285
- const hasHeaderDate = this.headerDateSlotItems.length ? 'header-date' : '';
289
+ const hasHeaderDate = isEmpty(this._headerSlotItems) ? '' : 'header-date';
286
290
  return html `
287
291
  <slot name="title" slot="title">
288
292
  ${this.resourceStrings.selectDate}
@@ -290,8 +294,8 @@ let IgcDatePickerComponent = IgcDatePickerComponent_1 = class IgcDatePickerCompo
290
294
  <slot name="header-date" slot=${hasHeaderDate}></slot>
291
295
  `;
292
296
  }
293
- renderCalendar(id) {
294
- const hideHeader = this.isDropDown ? true : this.hideHeader;
297
+ _renderCalendar(id) {
298
+ const hideHeader = this._isDropDown ? true : this.hideHeader;
295
299
  return html `
296
300
  <igc-calendar
297
301
  aria-labelledby=${id}
@@ -309,35 +313,32 @@ let IgcDatePickerComponent = IgcDatePickerComponent_1 = class IgcDatePickerCompo
309
313
  .disabledDates=${this._dateConstraints}
310
314
  .specialDates=${this.specialDates}
311
315
  .weekStart=${this.weekStart}
312
- @igcChange=${this.handleCalendarChangeEvent}
316
+ @igcChange=${this._handleCalendarChangeEvent}
313
317
  exportparts="header, header-title, header-date, content: calendar-content, navigation, months-navigation,
314
318
  years-navigation, years-range, navigation-buttons, navigation-button, days-view-container,
315
319
  days-view, months-view, years-view, days-row, label: calendar-label, week-number, week-number-inner, date,
316
320
  date-inner, first, last, inactive, hidden, weekend, range, special, disabled, single, preview,
317
321
  month, month-inner, year, year-inner, selected, current"
318
322
  >
319
- ${this.renderCalendarSlots()}
323
+ ${this._renderCalendarSlots()}
320
324
  </igc-calendar>
321
325
  `;
322
326
  }
323
- renderActions() {
324
- const slot = this.isDropDown || !this.actions.length ? undefined : 'footer';
327
+ _renderActions() {
328
+ const hasActions = !isEmpty(this._actions);
329
+ const slot = this._isDropDown || hasActions ? undefined : 'footer';
325
330
  return html `
326
- <div
327
- part="actions"
328
- ?hidden=${!this.actions.length}
329
- slot=${ifDefined(slot)}
330
- >
331
+ <div part="actions" ?hidden=${!hasActions} slot=${ifDefined(slot)}>
331
332
  <slot name="actions"></slot>
332
333
  </div>
333
334
  `;
334
335
  }
335
- renderPicker(id) {
336
- return this.isDropDown
336
+ _renderPicker(id) {
337
+ return this._isDropDown
337
338
  ? html `
338
339
  <igc-popover ?open=${this.open} anchor=${id} flip shift>
339
340
  <igc-focus-trap ?disabled=${!this.open || this.disabled}>
340
- ${this.renderCalendar(id)}${this.renderActions()}
341
+ ${this._renderCalendar(id)}${this._renderActions()}
341
342
  </igc-focus-trap>
342
343
  </igc-popover>
343
344
  `
@@ -348,32 +349,38 @@ let IgcDatePickerComponent = IgcDatePickerComponent_1 = class IgcDatePickerCompo
348
349
  ?open=${this.open}
349
350
  ?close-on-outside-click=${!this.keepOpenOnOutsideClick}
350
351
  hide-default-action
351
- @igcClosing=${this.handleDialogClosing}
352
- @igcClosed=${this.handleDialogClosed}
352
+ @igcClosing=${this._handleDialogClosing}
353
+ @igcClosed=${this._handleDialogClosed}
353
354
  exportparts="base: dialog-base, title, footer, overlay"
354
355
  >
355
- ${this.renderCalendar(id)}${this.renderActions()}
356
+ ${this._renderCalendar(id)}${this._renderActions()}
356
357
  </igc-dialog>
357
358
  `;
358
359
  }
359
- renderLabel(id) {
360
+ _renderLabel(id) {
361
+ const isDisabled = this._isDropDown || this.readOnly;
360
362
  return this.label
361
- ? html `<label
362
- part="label"
363
- for=${id}
364
- @click=${this.isDropDown ? nothing : this.handleAnchorClick}
365
- >${this.label}</label
366
- >`
363
+ ? html `
364
+ <label
365
+ part="label"
366
+ for=${id}
367
+ @click=${isDisabled ? nothing : this.handleAnchorClick}
368
+ >
369
+ ${this.label}
370
+ </label>
371
+ `
367
372
  : nothing;
368
373
  }
369
- renderHelperText() {
374
+ _renderHelperText() {
370
375
  return IgcValidationContainerComponent.create(this);
371
376
  }
372
- renderInput(id) {
377
+ _renderInput(id) {
373
378
  const format = formats.has(this._displayFormat)
374
379
  ? `${this._displayFormat}Date`
375
380
  : this._displayFormat;
376
- const readOnly = !this.isDropDown || this.readOnly || this.nonEditable;
381
+ const readOnly = !this._isDropDown || this.readOnly || this.nonEditable;
382
+ const prefix = isEmpty(this._prefixes) ? undefined : 'prefix';
383
+ const suffix = isEmpty(this._suffixes) ? undefined : 'suffix';
377
384
  return html `
378
385
  <igc-date-time-input
379
386
  id=${id}
@@ -392,29 +399,25 @@ let IgcDatePickerComponent = IgcDatePickerComponent_1 = class IgcDatePickerCompo
392
399
  .min=${this.min}
393
400
  .max=${this.max}
394
401
  .invalid=${live(this.invalid)}
395
- @igcChange=${this.handleInputChangeEvent}
396
- @igcInput=${this.handleInputEvent}
397
- @click=${this.isDropDown ? nothing : this.handleInputClick}
402
+ @igcChange=${this._handleInputChangeEvent}
403
+ @igcInput=${this._handleInputEvent}
404
+ @click=${this._isDropDown || this.readOnly
405
+ ? nothing
406
+ : this._handleInputClick}
398
407
  exportparts="input, label, prefix, suffix"
399
408
  >
400
- ${this.renderCalendarIcon()}
401
- <slot
402
- name="prefix"
403
- slot=${ifDefined(!this.prefixes.length ? undefined : 'prefix')}
404
- ></slot>
405
- ${this.renderClearIcon()}
406
- <slot
407
- name="suffix"
408
- slot=${ifDefined(!this.suffixes.length ? undefined : 'suffix')}
409
- ></slot>
409
+ ${this._renderCalendarIcon()}
410
+ <slot name="prefix" slot=${ifDefined(prefix)}></slot>
411
+ ${this._renderClearIcon()}
412
+ <slot name="suffix" slot=${ifDefined(suffix)}></slot>
410
413
  </igc-date-time-input>
411
414
  `;
412
415
  }
413
416
  render() {
414
- const id = this.id || this.inputId;
417
+ const id = this.id || this._inputId;
415
418
  return html `
416
- ${!this._isMaterialTheme ? this.renderLabel(id) : nothing}
417
- ${this.renderInput(id)}${this.renderPicker(id)}${this.renderHelperText()}
419
+ ${!this._isMaterialTheme ? this._renderLabel(id) : nothing}
420
+ ${this._renderInput(id)}${this._renderPicker(id)}${this._renderHelperText()}
418
421
  `;
419
422
  }
420
423
  };
@@ -424,7 +427,7 @@ IgcDatePickerComponent.shadowRootOptions = {
424
427
  ...LitElement.shadowRootOptions,
425
428
  delegatesFocus: true,
426
429
  };
427
- IgcDatePickerComponent.increment = createCounter();
430
+ IgcDatePickerComponent._increment = createCounter();
428
431
  __decorate([
429
432
  query(IgcDateTimeInputComponent.tagName)
430
433
  ], IgcDatePickerComponent.prototype, "_input", void 0);
@@ -433,16 +436,16 @@ __decorate([
433
436
  ], IgcDatePickerComponent.prototype, "_calendar", void 0);
434
437
  __decorate([
435
438
  queryAssignedElements({ slot: 'prefix' })
436
- ], IgcDatePickerComponent.prototype, "prefixes", void 0);
439
+ ], IgcDatePickerComponent.prototype, "_prefixes", void 0);
437
440
  __decorate([
438
441
  queryAssignedElements({ slot: 'suffix' })
439
- ], IgcDatePickerComponent.prototype, "suffixes", void 0);
442
+ ], IgcDatePickerComponent.prototype, "_suffixes", void 0);
440
443
  __decorate([
441
444
  queryAssignedElements({ slot: 'actions' })
442
- ], IgcDatePickerComponent.prototype, "actions", void 0);
445
+ ], IgcDatePickerComponent.prototype, "_actions", void 0);
443
446
  __decorate([
444
447
  queryAssignedElements({ slot: 'header-date' })
445
- ], IgcDatePickerComponent.prototype, "headerDateSlotItems", void 0);
448
+ ], IgcDatePickerComponent.prototype, "_headerSlotItems", void 0);
446
449
  __decorate([
447
450
  property({ type: Boolean, reflect: true })
448
451
  ], IgcDatePickerComponent.prototype, "open", void 0);
@@ -515,12 +518,12 @@ __decorate([
515
518
  __decorate([
516
519
  property({ attribute: false })
517
520
  ], IgcDatePickerComponent.prototype, "resourceStrings", void 0);
518
- __decorate([
519
- watch('open')
520
- ], IgcDatePickerComponent.prototype, "openChange", null);
521
521
  __decorate([
522
522
  property({ attribute: 'week-start' })
523
523
  ], IgcDatePickerComponent.prototype, "weekStart", void 0);
524
+ __decorate([
525
+ watch('open')
526
+ ], IgcDatePickerComponent.prototype, "_openChange", null);
524
527
  IgcDatePickerComponent = IgcDatePickerComponent_1 = __decorate([
525
528
  themes(all, { exposeController: true }),
526
529
  blazorAdditionalDependencies('IgcCalendarComponent, IgcDateTimeInputComponent, IgcDialogComponent, IgcIconComponent')