@haiilo/catalyst 5.3.0 → 5.4.0

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 (169) hide show
  1. package/dist/catalyst/catalyst.css +56 -39
  2. package/dist/catalyst/catalyst.esm.js +1 -1
  3. package/dist/catalyst/catalyst.esm.js.map +1 -1
  4. package/dist/catalyst/index.cdn.js +1 -0
  5. package/dist/catalyst/index.esm.js +2 -2
  6. package/dist/catalyst/index.esm.js.map +1 -1
  7. package/dist/catalyst/p-34e0cbba.entry.js +10 -0
  8. package/dist/catalyst/p-34e0cbba.entry.js.map +1 -0
  9. package/dist/catalyst/{p-d1fb9d96.js → p-ce6a1db2.js} +1 -1
  10. package/dist/catalyst/p-ce6a1db2.js.map +1 -0
  11. package/dist/catalyst/p-cf32399c.js +2 -0
  12. package/dist/catalyst/p-cf32399c.js.map +1 -0
  13. package/dist/catalyst/scss/_snippets/_checkbox-hint.scss +20 -0
  14. package/dist/catalyst/scss/utils/_border.scss +14 -0
  15. package/dist/catalyst/scss/utils/_media.mixins.scss +0 -1
  16. package/dist/catalyst/scss/utils/_typography.mixins.scss +1 -0
  17. package/dist/cjs/{cat-alert_25.cjs.entry.js → cat-alert_27.cjs.entry.js} +3628 -185
  18. package/dist/cjs/cat-alert_27.cjs.entry.js.map +1 -0
  19. package/dist/cjs/{cat-icon-registry-671af264.js → cat-icon-registry-228164a1.js} +43 -2
  20. package/dist/cjs/cat-icon-registry-228164a1.js.map +1 -0
  21. package/dist/cjs/catalyst.cjs.js +3 -3
  22. package/dist/cjs/catalyst.cjs.js.map +1 -1
  23. package/dist/cjs/{index-01312a2e.js → index-4258b31e.js} +8 -1
  24. package/dist/{catalyst/p-d1fb9d96.js.map → cjs/index-4258b31e.js.map} +1 -1
  25. package/dist/cjs/index.cjs.js +2 -2
  26. package/dist/cjs/index.cjs.js.map +1 -1
  27. package/dist/cjs/loader.cjs.js +3 -3
  28. package/dist/cjs/loader.cjs.js.map +1 -1
  29. package/dist/collection/collection-manifest.json +4 -2
  30. package/dist/collection/components/cat-alert/cat-alert.js +5 -5
  31. package/dist/collection/components/cat-alert/cat-alert.js.map +1 -1
  32. package/dist/collection/components/cat-button/cat-button.css +7 -7
  33. package/dist/collection/components/cat-button/cat-button.js +6 -24
  34. package/dist/collection/components/cat-button/cat-button.js.map +1 -1
  35. package/dist/collection/components/cat-checkbox/cat-checkbox.css +24 -1
  36. package/dist/collection/components/cat-checkbox/cat-checkbox.js +8 -4
  37. package/dist/collection/components/cat-checkbox/cat-checkbox.js.map +1 -1
  38. package/dist/collection/components/cat-datepicker/cat-datepicker.css +381 -0
  39. package/dist/collection/components/cat-datepicker/cat-datepicker.js +873 -0
  40. package/dist/collection/components/cat-datepicker/cat-datepicker.js.map +1 -0
  41. package/dist/collection/components/cat-datepicker/datepicker-type.js +8 -0
  42. package/dist/collection/components/cat-datepicker/datepicker-type.js.map +1 -0
  43. package/dist/collection/components/cat-datepicker/dayjs.config.js +8 -0
  44. package/dist/collection/components/cat-datepicker/dayjs.config.js.map +1 -0
  45. package/dist/collection/components/cat-datepicker/vanillajs-datepicker.config.js +46 -0
  46. package/dist/collection/components/cat-datepicker/vanillajs-datepicker.config.js.map +1 -0
  47. package/dist/collection/components/cat-dropdown/cat-dropdown.css +1 -0
  48. package/dist/collection/components/cat-dropdown/cat-dropdown.js +12 -5
  49. package/dist/collection/components/cat-dropdown/cat-dropdown.js.map +1 -1
  50. package/dist/collection/components/cat-form-group/cat-form-group.js +1 -1
  51. package/dist/collection/components/cat-form-group/cat-form-group.js.map +1 -1
  52. package/dist/collection/components/cat-icon/cat-icon-registry.js +29 -1
  53. package/dist/collection/components/cat-icon/cat-icon-registry.js.map +1 -1
  54. package/dist/collection/components/cat-input/cat-input.css +384 -11
  55. package/dist/collection/components/cat-input/cat-input.js +8 -4
  56. package/dist/collection/components/cat-input/cat-input.js.map +1 -1
  57. package/dist/collection/components/cat-notification/cat-notification.js +1 -1
  58. package/dist/collection/components/cat-notification/cat-notification.js.map +1 -1
  59. package/dist/collection/components/cat-pagination/cat-pagination.js +28 -6
  60. package/dist/collection/components/cat-pagination/cat-pagination.js.map +1 -1
  61. package/dist/collection/components/cat-radio/cat-radio.css +24 -1
  62. package/dist/collection/components/cat-radio/cat-radio.js +8 -4
  63. package/dist/collection/components/cat-radio/cat-radio.js.map +1 -1
  64. package/dist/collection/components/cat-radio-group/cat-radio-group.js +7 -3
  65. package/dist/collection/components/cat-radio-group/cat-radio-group.js.map +1 -1
  66. package/dist/collection/components/cat-scrollable/cat-scrollable.css +1 -4
  67. package/dist/collection/components/cat-select/cat-select.css +8 -11
  68. package/dist/collection/components/cat-select/cat-select.js +43 -18
  69. package/dist/collection/components/cat-select/cat-select.js.map +1 -1
  70. package/dist/collection/components/cat-skeleton/cat-skeleton.css +1 -1
  71. package/dist/collection/components/cat-textarea/cat-textarea.css +9 -12
  72. package/dist/collection/components/cat-textarea/cat-textarea.js +8 -4
  73. package/dist/collection/components/cat-textarea/cat-textarea.js.map +1 -1
  74. package/dist/collection/components/cat-timepicker/cat-timepicker.css +5 -0
  75. package/dist/collection/components/cat-timepicker/cat-timepicker.js +668 -0
  76. package/dist/collection/components/cat-timepicker/cat-timepicker.js.map +1 -0
  77. package/dist/collection/components/cat-toggle/cat-toggle.css +24 -1
  78. package/dist/collection/components/cat-toggle/cat-toggle.js +8 -4
  79. package/dist/collection/components/cat-toggle/cat-toggle.js.map +1 -1
  80. package/dist/collection/components/cat-tooltip/cat-tooltip.css +1 -1
  81. package/dist/collection/index.cdn.js +1 -0
  82. package/dist/collection/scss/_snippets/_checkbox-hint.scss +20 -0
  83. package/dist/collection/scss/utils/_border.scss +14 -0
  84. package/dist/collection/scss/utils/_media.mixins.scss +0 -1
  85. package/dist/collection/scss/utils/_typography.mixins.scss +1 -0
  86. package/dist/components/cat-alert.js +5 -5
  87. package/dist/components/cat-alert.js.map +1 -1
  88. package/dist/components/cat-button2.js +7 -9
  89. package/dist/components/cat-button2.js.map +1 -1
  90. package/dist/components/cat-checkbox2.js +2 -2
  91. package/dist/components/cat-checkbox2.js.map +1 -1
  92. package/dist/components/cat-datepicker.d.ts +11 -0
  93. package/dist/components/cat-datepicker.js +3210 -0
  94. package/dist/components/cat-datepicker.js.map +1 -0
  95. package/dist/components/cat-dropdown2.js +182 -57
  96. package/dist/components/cat-dropdown2.js.map +1 -1
  97. package/dist/components/cat-form-group.js +1 -1
  98. package/dist/components/cat-form-group.js.map +1 -1
  99. package/dist/components/cat-icon-registry.js +42 -1
  100. package/dist/components/cat-icon-registry.js.map +1 -1
  101. package/dist/components/cat-input.js +1 -226
  102. package/dist/components/cat-input.js.map +1 -1
  103. package/dist/components/cat-input2.js +230 -0
  104. package/dist/components/cat-input2.js.map +1 -0
  105. package/dist/components/cat-pagination.js +10 -5
  106. package/dist/components/cat-pagination.js.map +1 -1
  107. package/dist/components/cat-radio-group.js.map +1 -1
  108. package/dist/components/cat-radio.js +2 -2
  109. package/dist/components/cat-radio.js.map +1 -1
  110. package/dist/components/cat-scrollable2.js +7 -5
  111. package/dist/components/cat-scrollable2.js.map +1 -1
  112. package/dist/components/cat-select-demo.js +2 -2
  113. package/dist/components/cat-select-demo.js.map +1 -1
  114. package/dist/components/cat-select2.js +37 -16
  115. package/dist/components/cat-select2.js.map +1 -1
  116. package/dist/components/cat-skeleton2.js +1 -1
  117. package/dist/components/cat-skeleton2.js.map +1 -1
  118. package/dist/components/cat-textarea.js +3 -3
  119. package/dist/components/cat-textarea.js.map +1 -1
  120. package/dist/components/cat-timepicker.d.ts +11 -0
  121. package/dist/components/cat-timepicker.js +258 -0
  122. package/dist/components/cat-timepicker.js.map +1 -0
  123. package/dist/components/cat-toggle.js +2 -2
  124. package/dist/components/cat-toggle.js.map +1 -1
  125. package/dist/components/cat-tooltip.js +1 -1
  126. package/dist/components/cat-tooltip.js.map +1 -1
  127. package/dist/components/floating-ui.dom.esm.js +64 -62
  128. package/dist/components/floating-ui.dom.esm.js.map +1 -1
  129. package/dist/components/index.js +1 -1
  130. package/dist/components/index.js.map +1 -1
  131. package/dist/esm/{cat-alert_25.entry.js → cat-alert_27.entry.js} +3627 -186
  132. package/dist/esm/cat-alert_27.entry.js.map +1 -0
  133. package/dist/esm/{cat-icon-registry-d6b80490.js → cat-icon-registry-4bd597f4.js} +43 -2
  134. package/dist/esm/cat-icon-registry-4bd597f4.js.map +1 -0
  135. package/dist/esm/catalyst.js +4 -4
  136. package/dist/esm/catalyst.js.map +1 -1
  137. package/dist/esm/{index-fc2f91a4.js → index-636ce8d6.js} +8 -1
  138. package/dist/esm/index-636ce8d6.js.map +1 -0
  139. package/dist/esm/index.js +3 -3
  140. package/dist/esm/index.js.map +1 -1
  141. package/dist/esm/loader.js +4 -4
  142. package/dist/esm/loader.js.map +1 -1
  143. package/dist/types/components/cat-button/cat-button.d.ts +0 -5
  144. package/dist/types/components/cat-checkbox/cat-checkbox.d.ts +1 -1
  145. package/dist/types/components/cat-datepicker/cat-datepicker.d.ts +187 -0
  146. package/dist/types/components/cat-datepicker/datepicker-type.d.ts +7 -0
  147. package/dist/types/components/cat-datepicker/datepicker.d.ts +1 -0
  148. package/dist/types/components/cat-datepicker/dayjs.config.d.ts +3 -0
  149. package/dist/types/components/cat-datepicker/vanillajs-datepicker.config.d.ts +4 -0
  150. package/dist/types/components/cat-input/cat-input.d.ts +1 -1
  151. package/dist/types/components/cat-pagination/cat-pagination.d.ts +6 -0
  152. package/dist/types/components/cat-radio/cat-radio.d.ts +1 -1
  153. package/dist/types/components/cat-radio-group/cat-radio-group.d.ts +1 -1
  154. package/dist/types/components/cat-select/cat-select.d.ts +6 -1
  155. package/dist/types/components/cat-textarea/cat-textarea.d.ts +1 -1
  156. package/dist/types/components/cat-timepicker/cat-timepicker.d.ts +158 -0
  157. package/dist/types/components/cat-toggle/cat-toggle.d.ts +1 -1
  158. package/dist/types/components.d.ts +532 -17
  159. package/package.json +22 -18
  160. package/dist/catalyst/p-ba081831.entry.js +0 -10
  161. package/dist/catalyst/p-ba081831.entry.js.map +0 -1
  162. package/dist/catalyst/p-ccfebe33.js +0 -2
  163. package/dist/catalyst/p-ccfebe33.js.map +0 -1
  164. package/dist/cjs/cat-alert_25.cjs.entry.js.map +0 -1
  165. package/dist/cjs/cat-icon-registry-671af264.js.map +0 -1
  166. package/dist/cjs/index-01312a2e.js.map +0 -1
  167. package/dist/esm/cat-alert_25.entry.js.map +0 -1
  168. package/dist/esm/cat-icon-registry-d6b80490.js.map +0 -1
  169. package/dist/esm/index-fc2f91a4.js.map +0 -1
@@ -0,0 +1,873 @@
1
+ import { Host, h } from '@stencil/core';
2
+ import log from 'loglevel';
3
+ import dayjs from './dayjs.config';
4
+ import Datepicker, { getDatepickerOptions } from './vanillajs-datepicker.config';
5
+ /**
6
+ * Inputs are used to allow users to provide text input when the expected input
7
+ * is short. As well as plain text, Input supports various types of text,
8
+ * including passwords and numbers.
9
+ *
10
+ * @slot hint - Optional hint element to be displayed with the input.
11
+ * @slot label - The slotted label. If both the label property and the label slot are present, only the label slot will be displayed.
12
+ * @part label - The label content.
13
+ */
14
+ export class CatDatepicker {
15
+ constructor() {
16
+ this.hasSlottedLabel = false;
17
+ this.hasSlottedHint = false;
18
+ this.requiredMarker = 'optional';
19
+ this.horizontal = false;
20
+ this.autoComplete = undefined;
21
+ this.clearable = false;
22
+ this.disabled = false;
23
+ this.hint = undefined;
24
+ this.icon = undefined;
25
+ this.iconLeft = false;
26
+ this.identifier = undefined;
27
+ this.label = '';
28
+ this.labelHidden = false;
29
+ this.max = undefined;
30
+ this.min = undefined;
31
+ this.name = undefined;
32
+ this.placeholder = undefined;
33
+ this.textPrefix = undefined;
34
+ this.textSuffix = undefined;
35
+ this.readonly = false;
36
+ this.required = false;
37
+ this.format = 'mm/dd/yyyy';
38
+ this.weekNumbers = true;
39
+ this.type = 'date';
40
+ this.datesDisabled = undefined;
41
+ this.value = undefined;
42
+ this.errors = undefined;
43
+ this.errorUpdate = 0;
44
+ this.nativeAttributes = undefined;
45
+ }
46
+ /**
47
+ * Programmatically move focus to the input. Use this method instead of
48
+ * `input.focus()`.
49
+ *
50
+ * @param options An optional object providing options to control aspects of
51
+ * the focusing process.
52
+ */
53
+ async doFocus(options) {
54
+ this.input.focus(options);
55
+ }
56
+ /**
57
+ * Programmatically remove focus from the input. Use this method instead of
58
+ * `input.blur()`.
59
+ */
60
+ async doBlur() {
61
+ this.input.blur();
62
+ }
63
+ /**
64
+ * Programmatically simulate a click on the input.
65
+ */
66
+ async doClick() {
67
+ this.input.click();
68
+ }
69
+ /**
70
+ * Clear the input.
71
+ */
72
+ async clear() {
73
+ this.value = '';
74
+ }
75
+ componentWillRender() {
76
+ this.hasSlottedLabel = !!this.hostElement.querySelector('[slot="label"]');
77
+ this.hasSlottedHint = !!this.hostElement.querySelector('[slot="hint"]');
78
+ }
79
+ render() {
80
+ return (h(Host, null, h("cat-input", { ref: el => (this.catInput = el), requiredMarker: this.requiredMarker, horizontal: this.horizontal, autoComplete: this.autoComplete, clearable: this.clearable, disabled: this.disabled, hint: this.hint, icon: this.icon, iconRight: !this.iconLeft, identifier: this.identifier, label: this.label, labelHidden: this.labelHidden, name: this.name, placeholder: this.placeholder, textPrefix: this.textPrefix, textSuffix: this.textSuffix, readonly: this.readonly, required: this.required, value: this.value, errors: this.errors, errorUpdate: this.errorUpdate, nativeAttributes: this.nativeAttributes, onCatChange: event => this.onCatChange(event), onCatFocus: event => this.onCatFocus(event.detail), onCatBlur: event => this.onCatBlur(event.detail) }, this.hasSlottedLabel && (h("span", { slot: "label" }, h("slot", { name: "label" }))), this.hasSlottedHint && (h("span", { slot: "hint" }, h("slot", { name: "hint" }))))));
81
+ }
82
+ componentDidLoad() {
83
+ var _a;
84
+ if (this.hostElement) {
85
+ const inputWrapper = (_a = this.catInput.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.input-wrapper');
86
+ const inputElement = inputWrapper === null || inputWrapper === void 0 ? void 0 : inputWrapper.querySelector('input');
87
+ if (inputElement) {
88
+ this.input = inputElement;
89
+ }
90
+ else {
91
+ log.error('[CatInput] Missing input element', this);
92
+ return;
93
+ }
94
+ this.datepicker = new Datepicker(inputElement, Object.assign(Object.assign({}, getDatepickerOptions(this.type, this.value)), { container: inputWrapper, maxDate: this.max, minDate: this.min, datesDisabled: this.datesDisabled, prevArrow: '←', nextArrow: '→', weekNumbers: this.weekNumbers ? 1 : 0, format: {
95
+ toValue: (dateStr) => this.type === 'week' ? this.fromISOWeek(dateStr) : Datepicker.parseDate(dateStr, this.dateFormat),
96
+ toDisplay: (date) => this.type === 'week' ? this.toISOWeek(date).toString() : Datepicker.formatDate(date, this.dateFormat)
97
+ }, beforeShowDay: (date) => (this.shouldHighlightAsToday(date) ? 'today' : null), beforeShowMonth: (date) => (this.shouldHighlightAsToday(date) ? 'today' : null), beforeShowYear: (date) => (this.shouldHighlightAsToday(date) ? 'today' : null) }));
98
+ if (this.type === 'week') {
99
+ this.datepicker.pickerElement.classList.add('weekly');
100
+ }
101
+ this.input.addEventListener('show', this.handleWeekDays.bind(this));
102
+ this.input.addEventListener('changeDate', this.handleDateChange.bind(this));
103
+ this.input.addEventListener('changeMonth', this.handleWeekDays.bind(this));
104
+ this.input.addEventListener('changeView', this.handleWeekDays.bind(this));
105
+ this.input.addEventListener('keydown', this.focusAllWeekDays.bind(this));
106
+ }
107
+ }
108
+ disconnectedCallback() {
109
+ this.input.removeEventListener('show', this.handleWeekDays.bind(this));
110
+ this.input.removeEventListener('changeDate', this.handleDateChange.bind(this));
111
+ this.input.removeEventListener('changeMonth', this.handleWeekDays.bind(this));
112
+ this.input.removeEventListener('changeView', this.handleWeekDays.bind(this));
113
+ this.input.removeEventListener('keydown', this.focusAllWeekDays.bind(this));
114
+ }
115
+ handleDateChange(event) {
116
+ this.selectAllWeekDays(event.detail.date);
117
+ this.value = this.input.value;
118
+ this.catChange.emit();
119
+ }
120
+ handleWeekDays(event) {
121
+ this.selectAllWeekDays(event);
122
+ this.focusAllWeekDays();
123
+ }
124
+ selectAllWeekDays(event) {
125
+ var _a, _b;
126
+ const date = event instanceof Date ? event : (_a = event.detail) === null || _a === void 0 ? void 0 : _a.date;
127
+ if (this.type !== 'week') {
128
+ return;
129
+ }
130
+ if ((_b = this.input) === null || _b === void 0 ? void 0 : _b.value) {
131
+ const firstDayOfWeek = dayjs(date).startOf('isoWeek');
132
+ if (!firstDayOfWeek.isSame(dayjs(date).startOf('day'))) {
133
+ this.datepicker.setDate(firstDayOfWeek.toDate());
134
+ }
135
+ else {
136
+ this.addClassToAllWeekDays('selected');
137
+ }
138
+ }
139
+ }
140
+ focusAllWeekDays() {
141
+ const date = dayjs(this.datepicker.picker.viewDate);
142
+ if (this.type !== 'week' || !date) {
143
+ return;
144
+ }
145
+ const firstDayOfWeek = dayjs(date).startOf('isoWeek');
146
+ if (!firstDayOfWeek.isSame(dayjs(date).startOf('day'))) {
147
+ this.datepicker.setFocusedDate(firstDayOfWeek.toDate());
148
+ }
149
+ this.addClassToAllWeekDays('focused');
150
+ }
151
+ addClassToAllWeekDays(className) {
152
+ let weekdaysCount = 7;
153
+ const pickerElement = this.datepicker.pickerElement;
154
+ let selected = pickerElement.querySelector(`.datepicker-cell:not(.month):not(.year).${className}`);
155
+ while (weekdaysCount > 1) {
156
+ if (selected) {
157
+ selected = selected.nextElementSibling;
158
+ selected === null || selected === void 0 ? void 0 : selected.classList.add(className);
159
+ weekdaysCount--;
160
+ }
161
+ else {
162
+ break;
163
+ }
164
+ }
165
+ }
166
+ onCatChange(event) {
167
+ this.value = this.input.value;
168
+ this.catChange.emit(event);
169
+ }
170
+ onCatFocus(event) {
171
+ this.catFocus.emit(event);
172
+ }
173
+ onCatBlur(event) {
174
+ this.catBlur.emit(event);
175
+ }
176
+ shouldHighlightAsToday(date) {
177
+ const now = new Date();
178
+ const isSameYear = now.getFullYear() === date.getFullYear();
179
+ const isSameMonth = now.getMonth() === date.getMonth();
180
+ const isSameDay = now.getDate() === date.getDate();
181
+ switch (this.type) {
182
+ case 'date':
183
+ return isSameYear && isSameMonth && isSameDay;
184
+ case 'week':
185
+ return isSameYear && this.toISOWeek(now) === this.toISOWeek(date);
186
+ case 'month':
187
+ return isSameYear && isSameMonth;
188
+ case 'year':
189
+ return isSameYear;
190
+ default:
191
+ return false;
192
+ }
193
+ }
194
+ // ----- Date handling
195
+ get dateFormat() {
196
+ const date = new Date(Date.UTC(3333, 10, 22));
197
+ const dateStr = new Intl.DateTimeFormat('en-US', {
198
+ year: 'numeric',
199
+ month: this.type !== 'year' ? 'numeric' : undefined,
200
+ day: this.type === 'date' || this.type === 'week' ? 'numeric' : undefined
201
+ }).format(date);
202
+ return dateStr.replace('22', 'dd').replace('11', 'mm').replace('3333', 'yyyy');
203
+ }
204
+ fromISOWeek(week) {
205
+ if (typeof week === 'string' || typeof week === 'number') {
206
+ const weekNumber = parseInt(week.toString(), 10);
207
+ return isNaN(weekNumber) ? new Date() : this.fromISOWeekNumber(weekNumber);
208
+ }
209
+ return week;
210
+ }
211
+ fromISOWeekNumber(weekNumber, year = new Date().getFullYear()) {
212
+ const refDate = new Date(Date.UTC(year, 0, 4)); // January 4th
213
+ const diffDays = (weekNumber - 1) * 7 - (refDate.getUTCDay() || 7) + 1;
214
+ const date = new Date(refDate);
215
+ date.setUTCDate(date.getUTCDate() + diffDays);
216
+ return date;
217
+ }
218
+ toISOWeek(date) {
219
+ const currentDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()));
220
+ currentDate.setUTCDate(currentDate.getUTCDate() + 4 - (currentDate.getUTCDay() || 7));
221
+ const firstDayOfYear = new Date(Date.UTC(currentDate.getUTCFullYear(), 0, 1));
222
+ return Math.ceil(((currentDate.getTime() - firstDayOfYear.getTime()) / 86400000 + 1) / 7);
223
+ }
224
+ static get is() { return "cat-datepicker"; }
225
+ static get encapsulation() { return "shadow"; }
226
+ static get originalStyleUrls() {
227
+ return {
228
+ "$": ["cat-datepicker.scss"]
229
+ };
230
+ }
231
+ static get styleUrls() {
232
+ return {
233
+ "$": ["cat-datepicker.css"]
234
+ };
235
+ }
236
+ static get properties() {
237
+ return {
238
+ "requiredMarker": {
239
+ "type": "string",
240
+ "mutable": false,
241
+ "complexType": {
242
+ "original": "'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!'",
243
+ "resolved": "\"none!\" | \"none\" | \"optional!\" | \"optional\" | \"required!\" | \"required\"",
244
+ "references": {}
245
+ },
246
+ "required": false,
247
+ "optional": false,
248
+ "docs": {
249
+ "tags": [],
250
+ "text": "Whether the label need a marker to shown if the input is required or optional."
251
+ },
252
+ "attribute": "required-marker",
253
+ "reflect": false,
254
+ "defaultValue": "'optional'"
255
+ },
256
+ "horizontal": {
257
+ "type": "boolean",
258
+ "mutable": false,
259
+ "complexType": {
260
+ "original": "boolean",
261
+ "resolved": "boolean",
262
+ "references": {}
263
+ },
264
+ "required": false,
265
+ "optional": false,
266
+ "docs": {
267
+ "tags": [],
268
+ "text": "Whether the label is on top or left."
269
+ },
270
+ "attribute": "horizontal",
271
+ "reflect": false,
272
+ "defaultValue": "false"
273
+ },
274
+ "autoComplete": {
275
+ "type": "string",
276
+ "mutable": false,
277
+ "complexType": {
278
+ "original": "string",
279
+ "resolved": "string | undefined",
280
+ "references": {}
281
+ },
282
+ "required": false,
283
+ "optional": true,
284
+ "docs": {
285
+ "tags": [],
286
+ "text": "Hint for form autofill feature."
287
+ },
288
+ "attribute": "auto-complete",
289
+ "reflect": false
290
+ },
291
+ "clearable": {
292
+ "type": "boolean",
293
+ "mutable": false,
294
+ "complexType": {
295
+ "original": "boolean",
296
+ "resolved": "boolean",
297
+ "references": {}
298
+ },
299
+ "required": false,
300
+ "optional": false,
301
+ "docs": {
302
+ "tags": [],
303
+ "text": "Whether the input should show a clear button."
304
+ },
305
+ "attribute": "clearable",
306
+ "reflect": false,
307
+ "defaultValue": "false"
308
+ },
309
+ "disabled": {
310
+ "type": "boolean",
311
+ "mutable": false,
312
+ "complexType": {
313
+ "original": "boolean",
314
+ "resolved": "boolean",
315
+ "references": {}
316
+ },
317
+ "required": false,
318
+ "optional": false,
319
+ "docs": {
320
+ "tags": [],
321
+ "text": "Whether the input is disabled."
322
+ },
323
+ "attribute": "disabled",
324
+ "reflect": false,
325
+ "defaultValue": "false"
326
+ },
327
+ "hint": {
328
+ "type": "string",
329
+ "mutable": false,
330
+ "complexType": {
331
+ "original": "string | string[]",
332
+ "resolved": "string | string[] | undefined",
333
+ "references": {}
334
+ },
335
+ "required": false,
336
+ "optional": true,
337
+ "docs": {
338
+ "tags": [],
339
+ "text": "Optional hint text(s) to be displayed with the input."
340
+ },
341
+ "attribute": "hint",
342
+ "reflect": false
343
+ },
344
+ "icon": {
345
+ "type": "string",
346
+ "mutable": false,
347
+ "complexType": {
348
+ "original": "string",
349
+ "resolved": "string | undefined",
350
+ "references": {}
351
+ },
352
+ "required": false,
353
+ "optional": true,
354
+ "docs": {
355
+ "tags": [],
356
+ "text": "The name of an icon to be displayed in the input."
357
+ },
358
+ "attribute": "icon",
359
+ "reflect": false
360
+ },
361
+ "iconLeft": {
362
+ "type": "boolean",
363
+ "mutable": false,
364
+ "complexType": {
365
+ "original": "boolean",
366
+ "resolved": "boolean",
367
+ "references": {}
368
+ },
369
+ "required": false,
370
+ "optional": false,
371
+ "docs": {
372
+ "tags": [],
373
+ "text": "Display the icon on the left."
374
+ },
375
+ "attribute": "icon-left",
376
+ "reflect": false,
377
+ "defaultValue": "false"
378
+ },
379
+ "identifier": {
380
+ "type": "string",
381
+ "mutable": false,
382
+ "complexType": {
383
+ "original": "string",
384
+ "resolved": "string | undefined",
385
+ "references": {}
386
+ },
387
+ "required": false,
388
+ "optional": true,
389
+ "docs": {
390
+ "tags": [],
391
+ "text": "A unique identifier for the input."
392
+ },
393
+ "attribute": "identifier",
394
+ "reflect": false
395
+ },
396
+ "label": {
397
+ "type": "string",
398
+ "mutable": false,
399
+ "complexType": {
400
+ "original": "string",
401
+ "resolved": "string",
402
+ "references": {}
403
+ },
404
+ "required": false,
405
+ "optional": false,
406
+ "docs": {
407
+ "tags": [],
408
+ "text": "The label for the input."
409
+ },
410
+ "attribute": "label",
411
+ "reflect": false,
412
+ "defaultValue": "''"
413
+ },
414
+ "labelHidden": {
415
+ "type": "boolean",
416
+ "mutable": false,
417
+ "complexType": {
418
+ "original": "boolean",
419
+ "resolved": "boolean",
420
+ "references": {}
421
+ },
422
+ "required": false,
423
+ "optional": false,
424
+ "docs": {
425
+ "tags": [],
426
+ "text": "Visually hide the label, but still show it to assistive technologies like screen readers."
427
+ },
428
+ "attribute": "label-hidden",
429
+ "reflect": false,
430
+ "defaultValue": "false"
431
+ },
432
+ "max": {
433
+ "type": "any",
434
+ "mutable": false,
435
+ "complexType": {
436
+ "original": "number | string",
437
+ "resolved": "number | string | undefined",
438
+ "references": {}
439
+ },
440
+ "required": false,
441
+ "optional": true,
442
+ "docs": {
443
+ "tags": [],
444
+ "text": "A maximum value for date, time and numeric values."
445
+ },
446
+ "attribute": "max",
447
+ "reflect": false
448
+ },
449
+ "min": {
450
+ "type": "any",
451
+ "mutable": false,
452
+ "complexType": {
453
+ "original": "number | string",
454
+ "resolved": "number | string | undefined",
455
+ "references": {}
456
+ },
457
+ "required": false,
458
+ "optional": true,
459
+ "docs": {
460
+ "tags": [],
461
+ "text": "A minimum value for date, time and numeric values."
462
+ },
463
+ "attribute": "min",
464
+ "reflect": false
465
+ },
466
+ "name": {
467
+ "type": "string",
468
+ "mutable": false,
469
+ "complexType": {
470
+ "original": "string",
471
+ "resolved": "string | undefined",
472
+ "references": {}
473
+ },
474
+ "required": false,
475
+ "optional": true,
476
+ "docs": {
477
+ "tags": [],
478
+ "text": "The name of the form control. Submitted with the form as part of a name/value pair."
479
+ },
480
+ "attribute": "name",
481
+ "reflect": false
482
+ },
483
+ "placeholder": {
484
+ "type": "string",
485
+ "mutable": false,
486
+ "complexType": {
487
+ "original": "string",
488
+ "resolved": "string | undefined",
489
+ "references": {}
490
+ },
491
+ "required": false,
492
+ "optional": true,
493
+ "docs": {
494
+ "tags": [],
495
+ "text": "The placeholder text to display within the input."
496
+ },
497
+ "attribute": "placeholder",
498
+ "reflect": false
499
+ },
500
+ "textPrefix": {
501
+ "type": "string",
502
+ "mutable": false,
503
+ "complexType": {
504
+ "original": "string",
505
+ "resolved": "string | undefined",
506
+ "references": {}
507
+ },
508
+ "required": false,
509
+ "optional": true,
510
+ "docs": {
511
+ "tags": [],
512
+ "text": "A textual prefix to be displayed in the input."
513
+ },
514
+ "attribute": "text-prefix",
515
+ "reflect": false
516
+ },
517
+ "textSuffix": {
518
+ "type": "string",
519
+ "mutable": false,
520
+ "complexType": {
521
+ "original": "string",
522
+ "resolved": "string | undefined",
523
+ "references": {}
524
+ },
525
+ "required": false,
526
+ "optional": true,
527
+ "docs": {
528
+ "tags": [],
529
+ "text": "A textual suffix to be displayed in the input."
530
+ },
531
+ "attribute": "text-suffix",
532
+ "reflect": false
533
+ },
534
+ "readonly": {
535
+ "type": "boolean",
536
+ "mutable": false,
537
+ "complexType": {
538
+ "original": "boolean",
539
+ "resolved": "boolean",
540
+ "references": {}
541
+ },
542
+ "required": false,
543
+ "optional": false,
544
+ "docs": {
545
+ "tags": [],
546
+ "text": "The value is not editable."
547
+ },
548
+ "attribute": "readonly",
549
+ "reflect": false,
550
+ "defaultValue": "false"
551
+ },
552
+ "required": {
553
+ "type": "boolean",
554
+ "mutable": false,
555
+ "complexType": {
556
+ "original": "boolean",
557
+ "resolved": "boolean",
558
+ "references": {}
559
+ },
560
+ "required": false,
561
+ "optional": false,
562
+ "docs": {
563
+ "tags": [],
564
+ "text": "A value is required or must be check for the form to be submittable."
565
+ },
566
+ "attribute": "required",
567
+ "reflect": false,
568
+ "defaultValue": "false"
569
+ },
570
+ "format": {
571
+ "type": "string",
572
+ "mutable": false,
573
+ "complexType": {
574
+ "original": "string",
575
+ "resolved": "string",
576
+ "references": {}
577
+ },
578
+ "required": false,
579
+ "optional": false,
580
+ "docs": {
581
+ "tags": [],
582
+ "text": "The date format after picker selection."
583
+ },
584
+ "attribute": "format",
585
+ "reflect": false,
586
+ "defaultValue": "'mm/dd/yyyy'"
587
+ },
588
+ "weekNumbers": {
589
+ "type": "boolean",
590
+ "mutable": false,
591
+ "complexType": {
592
+ "original": "boolean",
593
+ "resolved": "boolean",
594
+ "references": {}
595
+ },
596
+ "required": false,
597
+ "optional": false,
598
+ "docs": {
599
+ "tags": [],
600
+ "text": "Whether the picker should show the week numbers."
601
+ },
602
+ "attribute": "week-numbers",
603
+ "reflect": false,
604
+ "defaultValue": "true"
605
+ },
606
+ "type": {
607
+ "type": "string",
608
+ "mutable": false,
609
+ "complexType": {
610
+ "original": "DatepickerType",
611
+ "resolved": "\"date\" | \"month\" | \"week\" | \"year\"",
612
+ "references": {
613
+ "DatepickerType": {
614
+ "location": "import",
615
+ "path": "./datepicker-type"
616
+ }
617
+ }
618
+ },
619
+ "required": false,
620
+ "optional": false,
621
+ "docs": {
622
+ "tags": [],
623
+ "text": "Type of datepicker ('date', 'week', 'month', 'year')."
624
+ },
625
+ "attribute": "type",
626
+ "reflect": false,
627
+ "defaultValue": "'date'"
628
+ },
629
+ "datesDisabled": {
630
+ "type": "unknown",
631
+ "mutable": false,
632
+ "complexType": {
633
+ "original": "Array<Date> | Array<string>",
634
+ "resolved": "Date[] | string[]",
635
+ "references": {
636
+ "Array": {
637
+ "location": "global"
638
+ },
639
+ "Date": {
640
+ "location": "global"
641
+ }
642
+ }
643
+ },
644
+ "required": true,
645
+ "optional": false,
646
+ "docs": {
647
+ "tags": [],
648
+ "text": "Dates that should be disabled inside the picker"
649
+ }
650
+ },
651
+ "value": {
652
+ "type": "string",
653
+ "mutable": true,
654
+ "complexType": {
655
+ "original": "string",
656
+ "resolved": "string | undefined",
657
+ "references": {}
658
+ },
659
+ "required": false,
660
+ "optional": true,
661
+ "docs": {
662
+ "tags": [],
663
+ "text": "The value of the control."
664
+ },
665
+ "attribute": "value",
666
+ "reflect": false
667
+ },
668
+ "errors": {
669
+ "type": "boolean",
670
+ "mutable": false,
671
+ "complexType": {
672
+ "original": "boolean | string[] | ErrorMap",
673
+ "resolved": "boolean | string[] | undefined | { [key: string]: any; }",
674
+ "references": {
675
+ "ErrorMap": {
676
+ "location": "import",
677
+ "path": "../cat-form-hint/cat-form-hint"
678
+ }
679
+ }
680
+ },
681
+ "required": false,
682
+ "optional": true,
683
+ "docs": {
684
+ "tags": [],
685
+ "text": "The validation errors for this input. Will render a hint under the input\nwith the translated error message(s) `error.${key}`. If an object is\npassed, the keys will be used as error keys and the values translation\nparameters.\nIf the value is `true`, the input will be marked as invalid without any\nhints under the input."
686
+ },
687
+ "attribute": "errors",
688
+ "reflect": false
689
+ },
690
+ "errorUpdate": {
691
+ "type": "any",
692
+ "mutable": false,
693
+ "complexType": {
694
+ "original": "boolean | number",
695
+ "resolved": "boolean | number",
696
+ "references": {}
697
+ },
698
+ "required": false,
699
+ "optional": false,
700
+ "docs": {
701
+ "tags": [],
702
+ "text": "Fine-grained control over when the errors are shown. Can be `false` to\nnever show errors, `true` to show errors on blur, or a number to show\nerrors on change with the given delay in milliseconds."
703
+ },
704
+ "attribute": "error-update",
705
+ "reflect": false,
706
+ "defaultValue": "0"
707
+ },
708
+ "nativeAttributes": {
709
+ "type": "unknown",
710
+ "mutable": false,
711
+ "complexType": {
712
+ "original": "{ [key: string]: string }",
713
+ "resolved": "undefined | { [key: string]: string; }",
714
+ "references": {}
715
+ },
716
+ "required": false,
717
+ "optional": true,
718
+ "docs": {
719
+ "tags": [],
720
+ "text": "Attributes that will be added to the native HTML input element."
721
+ }
722
+ }
723
+ };
724
+ }
725
+ static get states() {
726
+ return {
727
+ "hasSlottedLabel": {},
728
+ "hasSlottedHint": {}
729
+ };
730
+ }
731
+ static get events() {
732
+ return [{
733
+ "method": "catChange",
734
+ "name": "catChange",
735
+ "bubbles": true,
736
+ "cancelable": true,
737
+ "composed": true,
738
+ "docs": {
739
+ "tags": [],
740
+ "text": "Emitted when the value is changed."
741
+ },
742
+ "complexType": {
743
+ "original": "InputEvent",
744
+ "resolved": "InputEvent",
745
+ "references": {
746
+ "InputEvent": {
747
+ "location": "global"
748
+ }
749
+ }
750
+ }
751
+ }, {
752
+ "method": "catFocus",
753
+ "name": "catFocus",
754
+ "bubbles": true,
755
+ "cancelable": true,
756
+ "composed": true,
757
+ "docs": {
758
+ "tags": [],
759
+ "text": "Emitted when the input received focus."
760
+ },
761
+ "complexType": {
762
+ "original": "FocusEvent",
763
+ "resolved": "FocusEvent",
764
+ "references": {
765
+ "FocusEvent": {
766
+ "location": "global"
767
+ }
768
+ }
769
+ }
770
+ }, {
771
+ "method": "catBlur",
772
+ "name": "catBlur",
773
+ "bubbles": true,
774
+ "cancelable": true,
775
+ "composed": true,
776
+ "docs": {
777
+ "tags": [],
778
+ "text": "Emitted when the input loses focus."
779
+ },
780
+ "complexType": {
781
+ "original": "FocusEvent",
782
+ "resolved": "FocusEvent",
783
+ "references": {
784
+ "FocusEvent": {
785
+ "location": "global"
786
+ }
787
+ }
788
+ }
789
+ }];
790
+ }
791
+ static get methods() {
792
+ return {
793
+ "doFocus": {
794
+ "complexType": {
795
+ "signature": "(options?: FocusOptions) => Promise<void>",
796
+ "parameters": [{
797
+ "tags": [{
798
+ "name": "param",
799
+ "text": "options An optional object providing options to control aspects of\nthe focusing process."
800
+ }],
801
+ "text": "An optional object providing options to control aspects of\nthe focusing process."
802
+ }],
803
+ "references": {
804
+ "Promise": {
805
+ "location": "global"
806
+ },
807
+ "FocusOptions": {
808
+ "location": "global"
809
+ }
810
+ },
811
+ "return": "Promise<void>"
812
+ },
813
+ "docs": {
814
+ "text": "Programmatically move focus to the input. Use this method instead of\n`input.focus()`.",
815
+ "tags": [{
816
+ "name": "param",
817
+ "text": "options An optional object providing options to control aspects of\nthe focusing process."
818
+ }]
819
+ }
820
+ },
821
+ "doBlur": {
822
+ "complexType": {
823
+ "signature": "() => Promise<void>",
824
+ "parameters": [],
825
+ "references": {
826
+ "Promise": {
827
+ "location": "global"
828
+ }
829
+ },
830
+ "return": "Promise<void>"
831
+ },
832
+ "docs": {
833
+ "text": "Programmatically remove focus from the input. Use this method instead of\n`input.blur()`.",
834
+ "tags": []
835
+ }
836
+ },
837
+ "doClick": {
838
+ "complexType": {
839
+ "signature": "() => Promise<void>",
840
+ "parameters": [],
841
+ "references": {
842
+ "Promise": {
843
+ "location": "global"
844
+ }
845
+ },
846
+ "return": "Promise<void>"
847
+ },
848
+ "docs": {
849
+ "text": "Programmatically simulate a click on the input.",
850
+ "tags": []
851
+ }
852
+ },
853
+ "clear": {
854
+ "complexType": {
855
+ "signature": "() => Promise<void>",
856
+ "parameters": [],
857
+ "references": {
858
+ "Promise": {
859
+ "location": "global"
860
+ }
861
+ },
862
+ "return": "Promise<void>"
863
+ },
864
+ "docs": {
865
+ "text": "Clear the input.",
866
+ "tags": []
867
+ }
868
+ }
869
+ };
870
+ }
871
+ static get elementRef() { return "hostElement"; }
872
+ }
873
+ //# sourceMappingURL=cat-datepicker.js.map