@six-group/ui-library 5.0.0-rc.1 → 5.0.0-rc.2

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 (122) hide show
  1. package/dist/cjs/index-C8rK7OAe.js +4 -0
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/six-range.cjs.entry.js.map +1 -1
  4. package/dist/cjs/six-range.entry.cjs.js.map +1 -1
  5. package/dist/cjs/six-rating.cjs.entry.js +126 -0
  6. package/dist/cjs/six-rating.cjs.entry.js.map +1 -0
  7. package/dist/cjs/six-rating.entry.cjs.js.map +1 -0
  8. package/dist/cjs/six-root.cjs.entry.js +1 -1
  9. package/dist/cjs/six-sidebar-item.cjs.entry.js +2 -2
  10. package/dist/cjs/six-sidebar.cjs.entry.js +2 -2
  11. package/dist/cjs/six-switch.cjs.entry.js +2 -2
  12. package/dist/cjs/six-switch.cjs.entry.js.map +1 -1
  13. package/dist/cjs/six-switch.entry.cjs.js.map +1 -1
  14. package/dist/cjs/six-tab-panel.cjs.entry.js +1 -1
  15. package/dist/cjs/six-tab.cjs.entry.js +2 -2
  16. package/dist/cjs/six-tag.cjs.entry.js +2 -2
  17. package/dist/cjs/six-textarea.cjs.entry.js +2 -2
  18. package/dist/cjs/six-tile.cjs.entry.js +5 -5
  19. package/dist/cjs/six-timepicker.cjs.entry.js +17 -9
  20. package/dist/cjs/six-timepicker.cjs.entry.js.map +1 -1
  21. package/dist/cjs/six-timepicker.entry.cjs.js.map +1 -1
  22. package/dist/cjs/six-tooltip.cjs.entry.js +2 -2
  23. package/dist/cjs/ui-library.cjs.js +1 -1
  24. package/dist/collection/collection-manifest.json +1 -0
  25. package/dist/collection/components/six-rating/six-rating.css +125 -0
  26. package/dist/collection/components/six-rating/six-rating.js +432 -0
  27. package/dist/collection/components/six-rating/six-rating.js.map +1 -0
  28. package/dist/collection/components/six-root/six-root.js +1 -1
  29. package/dist/collection/components/six-sidebar/six-sidebar.js +2 -2
  30. package/dist/collection/components/six-sidebar-item/six-sidebar-item.js +2 -2
  31. package/dist/collection/components/six-switch/six-switch.js +2 -2
  32. package/dist/collection/components/six-tab/six-tab.js +2 -2
  33. package/dist/collection/components/six-tab-panel/six-tab-panel.js +1 -1
  34. package/dist/collection/components/six-tag/six-tag.js +2 -2
  35. package/dist/collection/components/six-textarea/six-textarea.js +2 -2
  36. package/dist/collection/components/six-tile/six-tile.js +5 -5
  37. package/dist/collection/components/six-timepicker/six-timepicker.js +17 -9
  38. package/dist/collection/components/six-timepicker/six-timepicker.js.map +1 -1
  39. package/dist/collection/components/six-tooltip/six-tooltip.js +2 -2
  40. package/dist/components/index.js +2 -0
  41. package/dist/components/index.js.map +1 -1
  42. package/dist/components/{p-DnLdSdN5.js → p-CAJFkiLw.js} +19 -11
  43. package/dist/components/p-CAJFkiLw.js.map +1 -0
  44. package/dist/components/{p-Cs6mMfx-.js → p-ClylOmYH.js} +4 -4
  45. package/dist/components/{p-Cs6mMfx-.js.map → p-ClylOmYH.js.map} +1 -1
  46. package/dist/components/six-datepicker.js +1 -1
  47. package/dist/components/six-range.js.map +1 -1
  48. package/dist/components/six-rating.d.ts +11 -0
  49. package/dist/components/six-rating.js +173 -0
  50. package/dist/components/six-rating.js.map +1 -0
  51. package/dist/components/six-root.js +1 -1
  52. package/dist/components/six-sidebar-item.js +2 -2
  53. package/dist/components/six-sidebar.js +2 -2
  54. package/dist/components/six-switch.js +2 -2
  55. package/dist/components/six-switch.js.map +1 -1
  56. package/dist/components/six-tab-panel.js +1 -1
  57. package/dist/components/six-tab.js +2 -2
  58. package/dist/components/six-tag.js +3 -3
  59. package/dist/components/six-textarea.js +2 -2
  60. package/dist/components/six-tile.js +6 -6
  61. package/dist/components/six-timepicker.js +1 -1
  62. package/dist/components/six-tooltip.js +1 -1
  63. package/dist/components.json +468 -1
  64. package/dist/esm/index-JoG9I7EO.js +4 -0
  65. package/dist/esm/loader.js +1 -1
  66. package/dist/esm/six-range.entry.js.map +1 -1
  67. package/dist/esm/six-rating.entry.js +124 -0
  68. package/dist/esm/six-rating.entry.js.map +1 -0
  69. package/dist/esm/six-root.entry.js +1 -1
  70. package/dist/esm/six-sidebar-item.entry.js +2 -2
  71. package/dist/esm/six-sidebar.entry.js +2 -2
  72. package/dist/esm/six-switch.entry.js +2 -2
  73. package/dist/esm/six-switch.entry.js.map +1 -1
  74. package/dist/esm/six-tab-panel.entry.js +1 -1
  75. package/dist/esm/six-tab.entry.js +2 -2
  76. package/dist/esm/six-tag.entry.js +2 -2
  77. package/dist/esm/six-textarea.entry.js +2 -2
  78. package/dist/esm/six-tile.entry.js +5 -5
  79. package/dist/esm/six-timepicker.entry.js +17 -9
  80. package/dist/esm/six-timepicker.entry.js.map +1 -1
  81. package/dist/esm/six-tooltip.entry.js +2 -2
  82. package/dist/esm/ui-library.js +1 -1
  83. package/dist/types/components/six-rating/six-rating.d.ts +52 -0
  84. package/dist/types/components.d.ts +160 -0
  85. package/dist/ui-library/{p-01243b2e.entry.js → p-03ca4af8.entry.js} +2 -2
  86. package/dist/ui-library/p-12e7a9e1.entry.js +2 -0
  87. package/dist/ui-library/p-12e7a9e1.entry.js.map +1 -0
  88. package/dist/ui-library/{p-362ff192.entry.js → p-21cbccb1.entry.js} +2 -2
  89. package/dist/ui-library/p-39668d61.entry.js +2 -0
  90. package/dist/ui-library/p-39668d61.entry.js.map +1 -0
  91. package/dist/ui-library/{p-ea61b009.entry.js → p-6c8182fa.entry.js} +2 -2
  92. package/dist/ui-library/{p-25ff87fe.entry.js → p-83b35622.entry.js} +2 -2
  93. package/dist/ui-library/{p-f6423fca.entry.js → p-c8fbf085.entry.js} +2 -2
  94. package/dist/ui-library/p-d7c7398d.entry.js +2 -0
  95. package/dist/ui-library/{p-f4dd7b57.entry.js → p-d9e770ab.entry.js} +2 -2
  96. package/dist/ui-library/p-d9e770ab.entry.js.map +1 -0
  97. package/dist/ui-library/p-ea3bf68d.entry.js +2 -0
  98. package/dist/ui-library/p-ee980a0f.entry.js.map +1 -1
  99. package/dist/ui-library/{p-29d79fe3.entry.js → p-f54d3616.entry.js} +2 -2
  100. package/dist/ui-library/{p-285666de.entry.js → p-f6a1c20b.entry.js} +2 -2
  101. package/dist/ui-library/six-range.entry.esm.js.map +1 -1
  102. package/dist/ui-library/six-rating.entry.esm.js.map +1 -0
  103. package/dist/ui-library/six-switch.entry.esm.js.map +1 -1
  104. package/dist/ui-library/six-timepicker.entry.esm.js.map +1 -1
  105. package/dist/ui-library/ui-library.css +1 -1
  106. package/dist/ui-library/ui-library.esm.js +1 -1
  107. package/package.json +1 -1
  108. package/dist/components/p-DnLdSdN5.js.map +0 -1
  109. package/dist/ui-library/p-494546c8.entry.js +0 -2
  110. package/dist/ui-library/p-4f52c56f.entry.js +0 -2
  111. package/dist/ui-library/p-4f52c56f.entry.js.map +0 -1
  112. package/dist/ui-library/p-d36ec323.entry.js +0 -2
  113. package/dist/ui-library/p-f4dd7b57.entry.js.map +0 -1
  114. /package/dist/ui-library/{p-01243b2e.entry.js.map → p-03ca4af8.entry.js.map} +0 -0
  115. /package/dist/ui-library/{p-362ff192.entry.js.map → p-21cbccb1.entry.js.map} +0 -0
  116. /package/dist/ui-library/{p-ea61b009.entry.js.map → p-6c8182fa.entry.js.map} +0 -0
  117. /package/dist/ui-library/{p-25ff87fe.entry.js.map → p-83b35622.entry.js.map} +0 -0
  118. /package/dist/ui-library/{p-f6423fca.entry.js.map → p-c8fbf085.entry.js.map} +0 -0
  119. /package/dist/ui-library/{p-d36ec323.entry.js.map → p-d7c7398d.entry.js.map} +0 -0
  120. /package/dist/ui-library/{p-494546c8.entry.js.map → p-ea3bf68d.entry.js.map} +0 -0
  121. /package/dist/ui-library/{p-29d79fe3.entry.js.map → p-f54d3616.entry.js.map} +0 -0
  122. /package/dist/ui-library/{p-285666de.entry.js.map → p-f6a1c20b.entry.js.map} +0 -0
@@ -0,0 +1,432 @@
1
+ import { h } from "@stencil/core";
2
+ import FormControl from "../../functional-components/form-control/form-control";
3
+ import { hasSlot } from "../../utils/slot";
4
+ export class SixRating {
5
+ constructor() {
6
+ /** The rating's name attribute. */
7
+ this.name = '';
8
+ /** The rating's value attribute. */
9
+ this.value = 0;
10
+ /** Set to true to disable the rating. */
11
+ this.disabled = false;
12
+ /** Set to true to show an asterisk beneath the label. */
13
+ this.required = false;
14
+ /** The label text. */
15
+ this.label = '';
16
+ /** The error message shown, if `invalid` is set to true. */
17
+ this.errorText = '';
18
+ /** If this property is set to true and an error message is provided by `errorText`, the error message is displayed. */
19
+ this.invalid = false;
20
+ /** Maximum number of stars. Default is 5 */
21
+ this.max = 5;
22
+ /** Size of the stars */
23
+ this.size = 'medium';
24
+ /** If its readonly */
25
+ this.readonly = false;
26
+ /** The rating's help text. Alternatively, you can use the help-text slot. */
27
+ this.helpText = '';
28
+ // --
29
+ this.hasFocus = false;
30
+ this.hasLabelSlot = false;
31
+ this.hasErrorSlot = false;
32
+ this.hoveredValue = this.value;
33
+ this.ratingId = `rating-${++SixRating.id}`;
34
+ this.labelId = `rating-label-${SixRating.id}`;
35
+ this.errorTextId = `input-error-text-${SixRating.id}`;
36
+ this.handleSlotChange = () => {
37
+ this.hasLabelSlot = hasSlot(this.el, 'label');
38
+ this.hasErrorSlot = hasSlot(this.el, 'error-text');
39
+ };
40
+ this.handleBlur = () => {
41
+ this.hasFocus = false;
42
+ this.sixBlur.emit(this.value);
43
+ };
44
+ this.handleFocus = () => {
45
+ this.hasFocus = true;
46
+ this.sixFocus.emit();
47
+ };
48
+ this.handleKeyDown = (event) => {
49
+ if (event.key === 'ArrowLeft') {
50
+ event.preventDefault();
51
+ if (this.hoveredValue > 0) {
52
+ this.hoveredValue = this.hoveredValue - 1;
53
+ this.value = this.hoveredValue;
54
+ }
55
+ }
56
+ if (event.key === 'ArrowRight') {
57
+ event.preventDefault();
58
+ if (this.hoveredValue < this.max) {
59
+ this.hoveredValue = this.hoveredValue + 1;
60
+ }
61
+ }
62
+ };
63
+ }
64
+ handleValueChange() {
65
+ this.sixChange.emit(this.value);
66
+ }
67
+ connectedCallback() {
68
+ var _a;
69
+ (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.addEventListener('slotchange', this.handleSlotChange);
70
+ }
71
+ disconnectedCallback() {
72
+ var _a;
73
+ (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.removeEventListener('slotchange', this.handleSlotChange);
74
+ }
75
+ renderStars() {
76
+ return Array.from({ length: this.max }, (_, i) => {
77
+ const handleEvent = (event) => {
78
+ if (this.readonly || this.disabled) {
79
+ return;
80
+ }
81
+ switch (event.type) {
82
+ case 'mouseover':
83
+ this.hoveredValue = i + 1;
84
+ break;
85
+ case 'mouseout':
86
+ this.hoveredValue = this.value;
87
+ break;
88
+ case 'click':
89
+ this.value = this.hoveredValue;
90
+ break;
91
+ }
92
+ };
93
+ return (h("six-icon", { class: {
94
+ 'six-rating__star': true,
95
+ 'six-rating__star--filled': i < this.hoveredValue,
96
+ }, filled: true, size: this.size, onMouseOver: handleEvent, onMouseOut: handleEvent, onClick: handleEvent }, "star_rate"));
97
+ });
98
+ }
99
+ render() {
100
+ return (h(FormControl, { key: 'ca3de959a1ffb915f0102ca6baa4a43c799d67ec', inputId: this.ratingId, label: this.label, labelId: this.labelId, hasLabelSlot: this.hasLabelSlot, errorTextId: this.errorTextId, errorText: this.errorText, errorTextCount: this.errorTextCount, helpText: this.helpText, hasErrorTextSlot: this.hasErrorSlot, size: "medium", disabled: this.disabled, required: this.required, displayError: this.invalid }, h("div", { key: 'ef452485f9c3615f4caeaefce7f7034d7f64119f', part: "base", class: {
101
+ 'six-rating': true,
102
+ 'six-rating--readonly': this.readonly,
103
+ 'six-rating--disabled': this.disabled,
104
+ }, role: "slider", "aria-label": this.label, "aria-disabled": this.disabled ? 'true' : 'false', "aria-readonly": this.readonly ? 'true' : 'false', "aria-valuenow": this.value, "aria-valuemin": 0, "aria-valuemax": this.max, tabindex: this.disabled ? '-1' : '0', onBlur: this.handleBlur, onFocus: this.handleFocus, onKeyDown: this.handleKeyDown }, this.renderStars(), h("input", { key: '187ec03d83c3b29fc5917a9abab324d40930b8f4', part: "input", id: this.ratingId, type: "hidden", max: this.max, min: 0, name: this.name, value: this.value, disabled: this.disabled, required: this.required, role: "slider", "aria-labelledby": this.labelId }))));
105
+ }
106
+ static get is() { return "six-rating"; }
107
+ static get encapsulation() { return "shadow"; }
108
+ static get originalStyleUrls() {
109
+ return {
110
+ "$": ["six-rating.scss"]
111
+ };
112
+ }
113
+ static get styleUrls() {
114
+ return {
115
+ "$": ["six-rating.css"]
116
+ };
117
+ }
118
+ static get properties() {
119
+ return {
120
+ "name": {
121
+ "type": "string",
122
+ "attribute": "name",
123
+ "mutable": false,
124
+ "complexType": {
125
+ "original": "string",
126
+ "resolved": "string",
127
+ "references": {}
128
+ },
129
+ "required": false,
130
+ "optional": false,
131
+ "docs": {
132
+ "tags": [],
133
+ "text": "The rating's name attribute."
134
+ },
135
+ "getter": false,
136
+ "setter": false,
137
+ "reflect": false,
138
+ "defaultValue": "''"
139
+ },
140
+ "value": {
141
+ "type": "number",
142
+ "attribute": "value",
143
+ "mutable": true,
144
+ "complexType": {
145
+ "original": "number",
146
+ "resolved": "number",
147
+ "references": {}
148
+ },
149
+ "required": false,
150
+ "optional": false,
151
+ "docs": {
152
+ "tags": [],
153
+ "text": "The rating's value attribute."
154
+ },
155
+ "getter": false,
156
+ "setter": false,
157
+ "reflect": false,
158
+ "defaultValue": "0"
159
+ },
160
+ "disabled": {
161
+ "type": "boolean",
162
+ "attribute": "disabled",
163
+ "mutable": false,
164
+ "complexType": {
165
+ "original": "boolean",
166
+ "resolved": "boolean",
167
+ "references": {}
168
+ },
169
+ "required": false,
170
+ "optional": false,
171
+ "docs": {
172
+ "tags": [],
173
+ "text": "Set to true to disable the rating."
174
+ },
175
+ "getter": false,
176
+ "setter": false,
177
+ "reflect": false,
178
+ "defaultValue": "false"
179
+ },
180
+ "required": {
181
+ "type": "boolean",
182
+ "attribute": "required",
183
+ "mutable": false,
184
+ "complexType": {
185
+ "original": "boolean",
186
+ "resolved": "boolean",
187
+ "references": {}
188
+ },
189
+ "required": false,
190
+ "optional": false,
191
+ "docs": {
192
+ "tags": [],
193
+ "text": "Set to true to show an asterisk beneath the label."
194
+ },
195
+ "getter": false,
196
+ "setter": false,
197
+ "reflect": false,
198
+ "defaultValue": "false"
199
+ },
200
+ "label": {
201
+ "type": "string",
202
+ "attribute": "label",
203
+ "mutable": false,
204
+ "complexType": {
205
+ "original": "string",
206
+ "resolved": "string",
207
+ "references": {}
208
+ },
209
+ "required": false,
210
+ "optional": false,
211
+ "docs": {
212
+ "tags": [],
213
+ "text": "The label text."
214
+ },
215
+ "getter": false,
216
+ "setter": false,
217
+ "reflect": false,
218
+ "defaultValue": "''"
219
+ },
220
+ "errorText": {
221
+ "type": "string",
222
+ "attribute": "error-text",
223
+ "mutable": false,
224
+ "complexType": {
225
+ "original": "string | string[]",
226
+ "resolved": "string | string[]",
227
+ "references": {}
228
+ },
229
+ "required": false,
230
+ "optional": false,
231
+ "docs": {
232
+ "tags": [],
233
+ "text": "The error message shown, if `invalid` is set to true."
234
+ },
235
+ "getter": false,
236
+ "setter": false,
237
+ "reflect": false,
238
+ "defaultValue": "''"
239
+ },
240
+ "errorTextCount": {
241
+ "type": "number",
242
+ "attribute": "error-text-count",
243
+ "mutable": false,
244
+ "complexType": {
245
+ "original": "number",
246
+ "resolved": "number | undefined",
247
+ "references": {}
248
+ },
249
+ "required": false,
250
+ "optional": true,
251
+ "docs": {
252
+ "tags": [],
253
+ "text": "The number of error texts to be shown (if the error-text slot isn't used). Defaults to 1"
254
+ },
255
+ "getter": false,
256
+ "setter": false,
257
+ "reflect": false
258
+ },
259
+ "invalid": {
260
+ "type": "boolean",
261
+ "attribute": "invalid",
262
+ "mutable": false,
263
+ "complexType": {
264
+ "original": "boolean",
265
+ "resolved": "boolean",
266
+ "references": {}
267
+ },
268
+ "required": false,
269
+ "optional": false,
270
+ "docs": {
271
+ "tags": [],
272
+ "text": "If this property is set to true and an error message is provided by `errorText`, the error message is displayed."
273
+ },
274
+ "getter": false,
275
+ "setter": false,
276
+ "reflect": true,
277
+ "defaultValue": "false"
278
+ },
279
+ "max": {
280
+ "type": "number",
281
+ "attribute": "max",
282
+ "mutable": false,
283
+ "complexType": {
284
+ "original": "number",
285
+ "resolved": "number",
286
+ "references": {}
287
+ },
288
+ "required": false,
289
+ "optional": false,
290
+ "docs": {
291
+ "tags": [],
292
+ "text": "Maximum number of stars. Default is 5"
293
+ },
294
+ "getter": false,
295
+ "setter": false,
296
+ "reflect": false,
297
+ "defaultValue": "5"
298
+ },
299
+ "size": {
300
+ "type": "string",
301
+ "attribute": "size",
302
+ "mutable": false,
303
+ "complexType": {
304
+ "original": "'xSmall' | 'small' | 'medium' | 'large' | 'xLarge' | 'xxLarge' | 'xxxLarge'",
305
+ "resolved": "\"large\" | \"medium\" | \"small\" | \"xLarge\" | \"xSmall\" | \"xxLarge\" | \"xxxLarge\"",
306
+ "references": {}
307
+ },
308
+ "required": false,
309
+ "optional": false,
310
+ "docs": {
311
+ "tags": [],
312
+ "text": "Size of the stars"
313
+ },
314
+ "getter": false,
315
+ "setter": false,
316
+ "reflect": true,
317
+ "defaultValue": "'medium'"
318
+ },
319
+ "readonly": {
320
+ "type": "boolean",
321
+ "attribute": "readonly",
322
+ "mutable": false,
323
+ "complexType": {
324
+ "original": "boolean",
325
+ "resolved": "boolean",
326
+ "references": {}
327
+ },
328
+ "required": false,
329
+ "optional": false,
330
+ "docs": {
331
+ "tags": [],
332
+ "text": "If its readonly"
333
+ },
334
+ "getter": false,
335
+ "setter": false,
336
+ "reflect": false,
337
+ "defaultValue": "false"
338
+ },
339
+ "helpText": {
340
+ "type": "string",
341
+ "attribute": "help-text",
342
+ "mutable": false,
343
+ "complexType": {
344
+ "original": "string",
345
+ "resolved": "string",
346
+ "references": {}
347
+ },
348
+ "required": false,
349
+ "optional": false,
350
+ "docs": {
351
+ "tags": [],
352
+ "text": "The rating's help text. Alternatively, you can use the help-text slot."
353
+ },
354
+ "getter": false,
355
+ "setter": false,
356
+ "reflect": false,
357
+ "defaultValue": "''"
358
+ }
359
+ };
360
+ }
361
+ static get states() {
362
+ return {
363
+ "hasFocus": {},
364
+ "hasLabelSlot": {},
365
+ "hasErrorSlot": {},
366
+ "hoveredValue": {}
367
+ };
368
+ }
369
+ static get events() {
370
+ return [{
371
+ "method": "sixBlur",
372
+ "name": "six-rating-blur",
373
+ "bubbles": true,
374
+ "cancelable": true,
375
+ "composed": true,
376
+ "docs": {
377
+ "tags": [],
378
+ "text": "Emitted when the control loses focus."
379
+ },
380
+ "complexType": {
381
+ "original": "number",
382
+ "resolved": "number",
383
+ "references": {}
384
+ }
385
+ }, {
386
+ "method": "sixChange",
387
+ "name": "six-rating-change",
388
+ "bubbles": true,
389
+ "cancelable": true,
390
+ "composed": true,
391
+ "docs": {
392
+ "tags": [],
393
+ "text": "Emitted when the control's checked state changes."
394
+ },
395
+ "complexType": {
396
+ "original": "number",
397
+ "resolved": "number",
398
+ "references": {}
399
+ }
400
+ }, {
401
+ "method": "sixFocus",
402
+ "name": "six-rating-focus",
403
+ "bubbles": true,
404
+ "cancelable": true,
405
+ "composed": true,
406
+ "docs": {
407
+ "tags": [],
408
+ "text": "Emitted when the control gains focus."
409
+ },
410
+ "complexType": {
411
+ "original": "EmptyPayload",
412
+ "resolved": "undefined",
413
+ "references": {
414
+ "EmptyPayload": {
415
+ "location": "import",
416
+ "path": "../../utils/types",
417
+ "id": "src/utils/types.ts::EmptyPayload"
418
+ }
419
+ }
420
+ }
421
+ }];
422
+ }
423
+ static get elementRef() { return "el"; }
424
+ static get watchers() {
425
+ return [{
426
+ "propName": "value",
427
+ "methodName": "handleValueChange"
428
+ }];
429
+ }
430
+ }
431
+ SixRating.id = 0;
432
+ //# sourceMappingURL=six-rating.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"six-rating.js","sourceRoot":"","sources":["../../../src/components/six-rating/six-rating.tsx"],"names":[],"mappings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AE,IAAI,CAAC,QAAQ,EACvB,IAAI,EAAC,QAAQ,qBACI,IAAI,CAAC,OAAO,GAC7B,CACE,CACM,CACf,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA9Ic,YAAE,GAAW,CAAC,AAAZ,CAAa","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Prop, State, Watch } from '@stencil/core';\nimport FormControl from '../../functional-components/form-control/form-control';\nimport { EmptyPayload } from '../../utils/types';\nimport { hasSlot } from '../../utils/slot';\n\n@Component({\n tag: 'six-rating',\n styleUrl: 'six-rating.scss',\n shadow: true,\n})\nexport class SixRating {\n @Element() el!: HTMLSixRatingElement;\n\n /** The rating's name attribute. */\n @Prop() name = '';\n\n /** The rating's value attribute. */\n @Prop({ mutable: true }) value: number = 0;\n\n /** Set to true to disable the rating. */\n @Prop() disabled = false;\n\n /** Set to true to show an asterisk beneath the label. */\n @Prop() required = false;\n\n /** The label text. */\n @Prop() label: string = '';\n\n /** The error message shown, if `invalid` is set to true. */\n @Prop() errorText: string | string[] = '';\n\n /** The number of error texts to be shown (if the error-text slot isn't used). Defaults to 1 */\n @Prop() errorTextCount?: number;\n\n /** If this property is set to true and an error message is provided by `errorText`, the error message is displayed. */\n @Prop({ reflect: true }) invalid = false;\n\n /** Maximum number of stars. Default is 5 */\n @Prop() max: number = 5;\n\n /** Size of the stars */\n @Prop({ reflect: true }) size: 'xSmall' | 'small' | 'medium' | 'large' | 'xLarge' | 'xxLarge' | 'xxxLarge' = 'medium';\n\n /** If its readonly */\n @Prop() readonly: boolean = false;\n\n /** The rating's help text. Alternatively, you can use the help-text slot. */\n @Prop() helpText = '';\n\n /** Emitted when the control loses focus. */\n @Event({ eventName: 'six-rating-blur' }) sixBlur!: EventEmitter<number>;\n\n /** Emitted when the control's checked state changes. */\n @Event({ eventName: 'six-rating-change' }) sixChange!: EventEmitter<number>;\n\n /** Emitted when the control gains focus. */\n @Event({ eventName: 'six-rating-focus' }) sixFocus!: EventEmitter<EmptyPayload>;\n\n // --\n\n @State() hasFocus = false;\n @State() hasLabelSlot = false;\n @State() hasErrorSlot = false;\n @State() hoveredValue = this.value;\n\n private static id: number = 0;\n\n private ratingId = `rating-${++SixRating.id}`;\n private labelId = `rating-label-${SixRating.id}`;\n private errorTextId = `input-error-text-${SixRating.id}`;\n\n @Watch('value')\n handleValueChange() {\n this.sixChange.emit(this.value);\n }\n\n connectedCallback() {\n this.el.shadowRoot?.addEventListener('slotchange', this.handleSlotChange);\n }\n\n disconnectedCallback() {\n this.el.shadowRoot?.removeEventListener('slotchange', this.handleSlotChange);\n }\n\n private handleSlotChange = () => {\n this.hasLabelSlot = hasSlot(this.el, 'label');\n this.hasErrorSlot = hasSlot(this.el, 'error-text');\n };\n\n private handleBlur = () => {\n this.hasFocus = false;\n this.sixBlur.emit(this.value);\n };\n\n private handleFocus = () => {\n this.hasFocus = true;\n this.sixFocus.emit();\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'ArrowLeft') {\n event.preventDefault();\n if (this.hoveredValue > 0) {\n this.hoveredValue = this.hoveredValue - 1;\n this.value = this.hoveredValue;\n }\n }\n\n if (event.key === 'ArrowRight') {\n event.preventDefault();\n if (this.hoveredValue < this.max) {\n this.hoveredValue = this.hoveredValue + 1;\n }\n }\n };\n\n private renderStars() {\n return Array.from({ length: this.max }, (_, i) => {\n const handleEvent = (event: Event) => {\n if (this.readonly || this.disabled) {\n return;\n }\n switch (event.type) {\n case 'mouseover':\n this.hoveredValue = i + 1;\n break;\n case 'mouseout':\n this.hoveredValue = this.value;\n break;\n case 'click':\n this.value = this.hoveredValue;\n break;\n }\n };\n\n return (\n <six-icon\n class={{\n 'six-rating__star': true,\n 'six-rating__star--filled': i < this.hoveredValue,\n }}\n filled\n size={this.size}\n onMouseOver={handleEvent}\n onMouseOut={handleEvent}\n onClick={handleEvent}\n >\n star_rate\n </six-icon>\n );\n });\n }\n\n render() {\n return (\n <FormControl\n inputId={this.ratingId}\n label={this.label}\n labelId={this.labelId}\n hasLabelSlot={this.hasLabelSlot}\n errorTextId={this.errorTextId}\n errorText={this.errorText}\n errorTextCount={this.errorTextCount}\n helpText={this.helpText}\n hasErrorTextSlot={this.hasErrorSlot}\n size=\"medium\"\n disabled={this.disabled}\n required={this.required}\n displayError={this.invalid}\n >\n <div\n part=\"base\"\n class={{\n 'six-rating': true,\n 'six-rating--readonly': this.readonly,\n 'six-rating--disabled': this.disabled,\n }}\n role=\"slider\"\n aria-label={this.label}\n aria-disabled={this.disabled ? 'true' : 'false'}\n aria-readonly={this.readonly ? 'true' : 'false'}\n aria-valuenow={this.value}\n aria-valuemin={0}\n aria-valuemax={this.max}\n tabindex={this.disabled ? '-1' : '0'}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onKeyDown={this.handleKeyDown}\n >\n {this.renderStars()}\n\n <input\n part=\"input\"\n id={this.ratingId}\n type=\"hidden\"\n max={this.max}\n min={0}\n name={this.name}\n value={this.value}\n disabled={this.disabled}\n required={this.required}\n role=\"slider\"\n aria-labelledby={this.labelId}\n />\n </div>\n </FormControl>\n );\n }\n}\n"]}
@@ -20,7 +20,7 @@ export class SixRoot {
20
20
  this.version = '';
21
21
  }
22
22
  render() {
23
- return (h("host", { key: '005ad5514d4137e97a862fd2a09151013e6250d0', class: "six-root" }, h("header", { key: '4cde9e57f125b9ea179608c36b311d33449ab9d3', part: "header" }, this.stage && h("six-stage-indicator", { key: '9c8d9ce4ae9d7652249fd3e2bbb39431830e6813', stage: this.stage }, this.version), h("slot", { key: 'dd414f2b13ec59e96ebe1e1df8f2fb71de113a60', name: "header" })), h("nav", { key: 'b9abf9d3eae12e6c492b64aada73bd7101a4edb1', class: "six-root__left-sidebar", part: "left-sidebar" }, h("slot", { key: 'd664769001501f55dd65a0c772fa6df6742ffe4c', name: "left-sidebar" })), h("main", { key: '4fb77beeed3e16ccb53a6d486d1307893d16aac3', part: "main" }, h("div", { key: '587d43eedf0a41c790b184c54f41941ea12fdd37', class: { 'six-root__container': true, 'six-root__container--padded': this.padded }, part: "container" }, h("slot", { key: '66473b0c3e44effb55ce262b27f2980b668b4335', name: "main" })), h("div", { key: 'b4dcc58d0fe42bcee91f2d0586e07f026b70bf5f', class: "six-root__footer" }, h("slot", { key: 'bf3efc6011d2cfbdd121973d77b7eba58c12c440', name: "footer" }))), h("nav", { key: '88683d098fd1c75bf35b9ecb9aaf2d2e1b8f6715', class: "six-root__right-sidebar", part: "right-sidebar" }, h("slot", { key: '3e38e0f3d3c0c66075c27f305d0460f52bbf725c', name: "right-sidebar" }))));
23
+ return (h("host", { key: '574331a30ddbdff3fb37129ec8e46c873bc1832e', class: "six-root" }, h("header", { key: 'f70f24b925ba9a88156d46a6481f6ab3f415bdad', part: "header" }, this.stage && h("six-stage-indicator", { key: '4fe5f33c59e77fcd1cae71afa5ccdd227fbd3d74', stage: this.stage }, this.version), h("slot", { key: '92fcdbb991e5593d0f5e602a3dc72b3bc95ce415', name: "header" })), h("nav", { key: 'd26e8e840ae344dcda1e81879e50f45981ad0035', class: "six-root__left-sidebar", part: "left-sidebar" }, h("slot", { key: 'da2e4b7ea1338e68970364d279753b7dd9ce4716', name: "left-sidebar" })), h("main", { key: '13c283e1e1150c3a6f0cc76feed50889023c8bfc', part: "main" }, h("div", { key: '0fd0a46e4d68dc7af4f4444de6cbd0cb68e3098a', class: { 'six-root__container': true, 'six-root__container--padded': this.padded }, part: "container" }, h("slot", { key: '5591878851514068d3ce5751af12fa86aa6449ca', name: "main" })), h("div", { key: 'fe14e87f84217215d03545b5094f462981124093', class: "six-root__footer" }, h("slot", { key: '44cd8020e7ba2ee5a4bfb50a8e9f46cac4c6010f', name: "footer" }))), h("nav", { key: 'a26ca2c92e7e0ef955bea7796270a5d64e9c1aec', class: "six-root__right-sidebar", part: "right-sidebar" }, h("slot", { key: '8d72471d1f4e06722eed5042dd8e4a5f9141b403', name: "right-sidebar" }))));
24
24
  }
25
25
  static get is() { return "six-root"; }
26
26
  static get encapsulation() { return "shadow"; }
@@ -176,7 +176,7 @@ export class SixSidebar {
176
176
  this.open ? this.sixAfterShow.emit() : this.sixAfterHide.emit();
177
177
  }
178
178
  render() {
179
- return (h("host", { key: '38d2d55b73e862c71ef3912fac01f6abd43a3b7c', class: "six-sidebar" }, h("div", { key: 'b8a7a32d48016310f943b42d03f1c4a44ff5bca4', class: {
179
+ return (h("host", { key: '11810533a79d5685e6ab768f0fbc8d9594d44de4', class: "six-sidebar" }, h("div", { key: '6908b34bd6df174046145e9c4813278703e0d7cf', class: {
180
180
  sidebar__container: true,
181
181
  'sidebar--visible': this.isVisible,
182
182
  'sidebar--open': this.open,
@@ -185,7 +185,7 @@ export class SixSidebar {
185
185
  }, style: {
186
186
  width: this.width,
187
187
  [`margin-${this.position}`]: this.open ? '0' : `calc(1rem - ${this.width})`,
188
- }, ref: (el) => (this.sidebar = el), "aria-hidden": this.open ? 'false' : 'true', onTransitionEnd: this.handleTransitionEnd }, h("slot", { key: 'a13e1cd44a68fa3ad15a94ccc56ec7c09f689e4c' }))));
188
+ }, ref: (el) => (this.sidebar = el), "aria-hidden": this.open ? 'false' : 'true', onTransitionEnd: this.handleTransitionEnd }, h("slot", { key: '31557fda47113669da4d999a54f0074b37daffc8' }))));
189
189
  }
190
190
  static get is() { return "six-sidebar"; }
191
191
  static get encapsulation() { return "shadow"; }
@@ -18,11 +18,11 @@ export class SixSidebarItem {
18
18
  }
19
19
  render() {
20
20
  const Tag = this.href != null ? 'a' : 'div';
21
- return (h(Tag, { key: 'd36654ad6af78000c79191da18b9af02d582dde1', class: {
21
+ return (h(Tag, { key: '968d681e125a0c399973cfa9d37ac5f9c269042f', class: {
22
22
  'sidebar-item': true,
23
23
  'sidebar-item--selected': this.selected,
24
24
  'sidebar-item--disabled': this.disabled,
25
- }, role: "menuitem", href: this.href, "aria-selected": this.selected ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false' }, this.icon && h("six-icon", { key: '8664269ee064fa6abd7529ddf92bfcd62e1fe83d', class: "six-sidebar-item__icon" }, this.icon), h("slot", { key: '528d1bd9d6b2e329292a90b7f21412f441dce27b' })));
25
+ }, role: "menuitem", href: this.href, "aria-selected": this.selected ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false' }, this.icon && h("six-icon", { key: 'cd6ecec3465b0aeb625d3f0d0e7f8f6a8e76a25f', class: "six-sidebar-item__icon" }, this.icon), h("slot", { key: 'a54998cb6bc27463ab2f9402736008a8767b8358' })));
26
26
  }
27
27
  static get is() { return "six-sidebar-item"; }
28
28
  static get encapsulation() { return "shadow"; }
@@ -112,12 +112,12 @@ export class SixSwitch {
112
112
  (_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.blur();
113
113
  }
114
114
  render() {
115
- return (h(FormControl, { key: 'a358f086b57322b8e3225f4775b09506e766c968', inputId: this.switchId, label: this.label, labelId: this.labelId, hasLabelSlot: false, errorTextId: this.errorTextId, errorText: this.errorText, errorTextCount: this.errorTextCount, hasErrorTextSlot: this.hasErrorTextSlot, size: "medium", disabled: this.disabled, required: this.required, displayError: this.invalid }, h("label", { key: '7b87b1d45026bb79c0c1ce5c0cf2e969ee0d0ca7', part: "base", htmlFor: this.switchId, class: {
115
+ return (h(FormControl, { key: 'fd6c9c888316e46623e92b779c2215888783413b', inputId: this.switchId, label: this.label, labelId: this.labelId, hasLabelSlot: false, errorTextId: this.errorTextId, errorText: this.errorText, errorTextCount: this.errorTextCount, hasErrorTextSlot: this.hasErrorTextSlot, size: "medium", disabled: this.disabled, required: this.required, displayError: this.invalid }, h("label", { key: 'd7d5f569d8aea4f7203f7c0973cf212bd6bcfc60', part: "base", htmlFor: this.switchId, class: {
116
116
  switch: true,
117
117
  'switch--checked': this.checked,
118
118
  'switch--disabled': this.disabled,
119
119
  'switch--focused': this.hasFocus,
120
- }, onMouseDown: this.handleMouseDown }, h("span", { key: '35bd92fabfb1b177a048789e9f0f9d68499b7bd0', part: "control", class: "switch__control" }, h("span", { key: '0c85de3b5d75b3d083554931a5648be5ba26f7fc', part: "thumb", class: "switch__thumb" }), h("input", { key: '5c807156b356962f347820301050cd096ba67330', ref: (el) => (this.inputElement = el), id: this.switchId, type: "checkbox", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled, required: this.required, role: "switch", "aria-checked": this.checked ? 'true' : 'false', "aria-labelledby": this.labelId, onClick: this.handleClick, onBlur: this.handleBlur, onFocus: this.handleFocus, onKeyDown: this.handleKeyDown })), h("span", { key: '923235545aec3ccb5c04aec3316fd8e5a2d027e2', part: "label", id: this.labelId, class: "switch__label" }, h("slot", { key: '53e2689b7efaac1a93954d02eb7d6b1cdadc8c73' })))));
120
+ }, onMouseDown: this.handleMouseDown }, h("span", { key: '4043bb4abed6a44a360b5409b0e4ebd5929a719f', part: "control", class: "switch__control" }, h("span", { key: 'd93e868866ea81ae2c2832ddc6fdcb11c0b23679', part: "thumb", class: "switch__thumb" }), h("input", { key: '7e5cff86449295f36e85b221f8795f3df18808ae', ref: (el) => (this.inputElement = el), id: this.switchId, type: "checkbox", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled, required: this.required, role: "switch", "aria-checked": this.checked ? 'true' : 'false', "aria-labelledby": this.labelId, onClick: this.handleClick, onBlur: this.handleBlur, onFocus: this.handleFocus, onKeyDown: this.handleKeyDown })), h("span", { key: 'c0823f84eb3a30c2e0fdfe5acb6f1390e2b389aa', part: "label", id: this.labelId, class: "switch__label" }, h("slot", { key: 'aeb69e52fd37efab7ee8061d3c69bfab1c174933' })))));
121
121
  }
122
122
  static get is() { return "six-switch"; }
123
123
  static get encapsulation() { return "shadow"; }
@@ -45,7 +45,7 @@ export class SixTab {
45
45
  const placement = (_a = tabGroup === null || tabGroup === void 0 ? void 0 : tabGroup.placement) !== null && _a !== void 0 ? _a : 'top';
46
46
  return (
47
47
  // If the user didn't provide an ID, we'll set one, so we can link tabs and tab panels with aria labels
48
- h(Host, { key: '6b59af3a0794c9ea26b362fa1ea1c0d7513babea', id: this.host.id || this.componentId }, h("div", { key: '145b15cdb916d93ecb67a966fd558e37500db17c', part: "base", ref: (el) => (this.tab = el), class: {
48
+ h(Host, { key: '40b4042f28816b55ef585cf24570b64a44031863', id: this.host.id || this.componentId }, h("div", { key: 'e4e8ba43cf2e1384a421835fe1131ea411ac7a18', part: "base", ref: (el) => (this.tab = el), class: {
49
49
  tab: true,
50
50
  // Placements
51
51
  'tab--top': placement === 'top',
@@ -56,7 +56,7 @@ export class SixTab {
56
56
  'tab--active': this.active,
57
57
  'tab--closable': this.closable,
58
58
  'tab--disabled': this.disabled,
59
- }, role: "tab", "aria-disabled": this.disabled ? 'true' : 'false', "aria-selected": this.active ? 'true' : 'false', tabindex: this.disabled || !this.active ? '-1' : '0', title: this.host.innerHTML }, h("slot", { key: '2a63428f882a98381746e578c98421cf7d065a16' }), this.closable && (h("six-icon-button", { key: 'dc0dbb47462d86dfae7b6806b667d6af69094f31', name: "close", size: "xSmall", exportparts: "base:close-button", class: "tab__close-button", onClick: this.handleCloseClick, tabIndex: -1, "aria-hidden": "true" }))), h("div", { key: '62bb67bb6a95d732e0961f349ada6f7d78a2e3a1', part: this.active ? 'active-tab-indicator' : '', class: {
59
+ }, role: "tab", "aria-disabled": this.disabled ? 'true' : 'false', "aria-selected": this.active ? 'true' : 'false', tabindex: this.disabled || !this.active ? '-1' : '0', title: this.host.innerHTML }, h("slot", { key: '39b1a75c51726543e0371e2607c6aa9197483b34' }), this.closable && (h("six-icon-button", { key: 'b9b2468f19b875ea58292f9ed330b49cff084d7c', name: "close", size: "xSmall", exportparts: "base:close-button", class: "tab__close-button", onClick: this.handleCloseClick, tabIndex: -1, "aria-hidden": "true" }))), h("div", { key: 'da5cf7175879826bfb96f52cd8aca427372e32e6', part: this.active ? 'active-tab-indicator' : '', class: {
60
60
  tab__indicator: true,
61
61
  'tab__indicator--active': this.active,
62
62
  // Placements
@@ -21,7 +21,7 @@ export class SixTabPanel {
21
21
  render() {
22
22
  return (
23
23
  // If the user didn't provide an ID, we'll set one, so we can link tabs and tab panels with aria labels
24
- h(Host, { key: '2a0ab4d655a8de97585c947099381c1fab61e858', id: this.host.id || this.componentId, style: { display: this.active ? 'block' : 'none' } }, h("div", { key: '7ee7661cd01b4390bea7981c4f3fad3e8bb0e6c0', part: "base", class: "tab-panel", role: "tabpanel", "aria-selected": this.active ? 'true' : 'false', "aria-hidden": this.active ? 'false' : 'true' }, h("slot", { key: '21c8561d0a126ef557c1fa9660209f10b6cd7936' }))));
24
+ h(Host, { key: 'b4c54fb42d68a3462abbd78dda16b1738e81dc57', id: this.host.id || this.componentId, style: { display: this.active ? 'block' : 'none' } }, h("div", { key: '734645855fb3a875a6a43e46383122ddad15bbb3', part: "base", class: "tab-panel", role: "tabpanel", "aria-selected": this.active ? 'true' : 'false', "aria-hidden": this.active ? 'false' : 'true' }, h("slot", { key: '1a789d112f5a048ac36f9a7e70208c99fb66c6c9' }))));
25
25
  }
26
26
  static get is() { return "six-tab-panel"; }
27
27
  static get encapsulation() { return "shadow"; }
@@ -48,7 +48,7 @@ export class SixTag {
48
48
  this.resizeObserver.disconnect();
49
49
  }
50
50
  render() {
51
- return (h("span", { key: '6d436b39d9a220ad7e764afb2a61db3c15052bd8', part: "base", class: {
51
+ return (h("span", { key: 'e8a2448511ebcfa91f9714c1e575679fca929310', part: "base", class: {
52
52
  tag: true,
53
53
  // Types
54
54
  'tag--primary': this.type === 'primary',
@@ -65,7 +65,7 @@ export class SixTag {
65
65
  // Modifers
66
66
  'tag--pill': this.pill,
67
67
  'tag--clear': this.clearable,
68
- } }, h("six-tooltip", { key: '12faec51f7e0ac427c47037b815564ff6509fa5b', ref: (el) => (this.tooltipElement = el) }, h("span", { key: '38d9b9a805f423491334d8c91463ec7f5c4a5460', ref: (el) => (this.contentElement = el), part: "content", class: "tag__content" }, h("slot", { key: '1dce2aee10cb11b41ea4ff2a3691a7ed6050e3b9', ref: (el) => (this.contentSlotElement = el) }))), this.clearable && (h("six-icon-button", { key: 'd31750ec14c421b44ddc7a2f62db6dfd4ac19dd1', exportparts: "base:clear-button", size: "xSmall", name: "clear", class: "tag__clear", onClick: this.handleClearClick }))));
68
+ } }, h("six-tooltip", { key: 'a8bffabc14f61bff5f499cd9324cb17497a6082b', ref: (el) => (this.tooltipElement = el) }, h("span", { key: '28a60248833682018fa9f11be5d02372893645e5', ref: (el) => (this.contentElement = el), part: "content", class: "tag__content" }, h("slot", { key: 'd47d95687a69a4822575ac3219872a51f445441d', ref: (el) => (this.contentSlotElement = el) }))), this.clearable && (h("six-icon-button", { key: '477d12d125ff90d1cc0adb2bb62bf11bc6510927', exportparts: "base:clear-button", size: "xSmall", name: "clear", class: "tag__clear", onClick: this.handleClearClick }))));
69
69
  }
70
70
  static get is() { return "six-tag"; }
71
71
  static get encapsulation() { return "shadow"; }
@@ -179,7 +179,7 @@ export class SixTextarea {
179
179
  return ((_a = this.value) !== null && _a !== void 0 ? _a : '').toString();
180
180
  }
181
181
  render() {
182
- return (h(FormControl, { key: 'e535cb9819c9f78361b451b106349d44aa13bc25', inputId: this.inputId, label: this.label, labelId: this.labelId, hasLabelSlot: this.hasLabelSlot, helpTextId: this.helpTextId, helpText: this.helpText, hasHelpTextSlot: this.hasHelpTextSlot, errorTextId: this.errorTextId, errorText: this.errorText, errorTextCount: this.errorTextCount, hasErrorTextSlot: this.hasErrorTextSlot, size: this.size, disabled: this.disabled, required: this.required, displayError: this.invalid }, h("div", { key: '5cf703bd10753ce53474c724839745a24769f843', part: "base", class: {
182
+ return (h(FormControl, { key: '82dacccbeabf732b3d49738f0b5b9d725938014d', inputId: this.inputId, label: this.label, labelId: this.labelId, hasLabelSlot: this.hasLabelSlot, helpTextId: this.helpTextId, helpText: this.helpText, hasHelpTextSlot: this.hasHelpTextSlot, errorTextId: this.errorTextId, errorText: this.errorText, errorTextCount: this.errorTextCount, hasErrorTextSlot: this.hasErrorTextSlot, size: this.size, disabled: this.disabled, required: this.required, displayError: this.invalid }, h("div", { key: '88ddaeed09431fd06608350652de1280e729d44d', part: "base", class: {
183
183
  textarea: true,
184
184
  // Sizes
185
185
  'textarea--small': this.size === 'small',
@@ -194,7 +194,7 @@ export class SixTextarea {
194
194
  'textarea--resize-none': this.resize === 'none',
195
195
  'textarea--resize-vertical': this.resize === 'vertical',
196
196
  'textarea--resize-auto': this.resize === 'auto',
197
- } }, h("textarea", { key: '1a1fc11b8ae91f3c404670a05ea0cc9e0598fa80', part: "textarea", ref: (el) => (this.nativeTextarea = el), id: this.inputId, class: "textarea__control", name: this.name, placeholder: this.placeholder, disabled: this.disabled, readOnly: this.readonly, rows: this.rows, minLength: this.minlength, maxLength: this.maxlength, value: this.getValue(), autoCapitalize: this.autocapitalize, autoCorrect: this.autocorrect, autoFocus: this.autofocus, spellcheck: this.spellcheck, required: this.required, inputMode: this.inputmode, "aria-labelledby": this.labelId, onChange: this.handleChange, onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur }))));
197
+ } }, h("textarea", { key: '59838f0a6a739c7f6ed950f7ec73c228571e201a', part: "textarea", ref: (el) => (this.nativeTextarea = el), id: this.inputId, class: "textarea__control", name: this.name, placeholder: this.placeholder, disabled: this.disabled, readOnly: this.readonly, rows: this.rows, minLength: this.minlength, maxLength: this.maxlength, value: this.getValue(), autoCapitalize: this.autocapitalize, autoCorrect: this.autocorrect, autoFocus: this.autofocus, spellcheck: this.spellcheck, required: this.required, inputMode: this.inputmode, "aria-labelledby": this.labelId, onChange: this.handleChange, onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur }))));
198
198
  }
199
199
  static get is() { return "six-textarea"; }
200
200
  static get encapsulation() { return "shadow"; }
@@ -55,22 +55,22 @@ export class SixTile {
55
55
  this.handleSlotChange();
56
56
  }
57
57
  render() {
58
- return (h("six-tooltip", { key: '8bab8c04079d331d563099673f512ae71d6f1286', disabled: this.disableTooltip || this.label === '', content: this.label }, h("div", { key: '449bfabf58a6aeba71a1e0b755cf05c5e25b34fe', part: "base", class: {
58
+ return (h("six-tooltip", { key: '165474a4301eff8d60788826d0378f33640476f4', disabled: this.disableTooltip || this.label === '', content: this.label }, h("div", { key: 'ae643873a589d648887ab54c614be1cae1e01a95', part: "base", class: {
59
59
  tile: true,
60
60
  'tile--visible': this.visible,
61
61
  'tile--small': this.size === 'small',
62
62
  'tile--medium': this.size === 'medium',
63
63
  'tile--large': this.size === 'large',
64
64
  'tile--elevated': this.elevated,
65
- } }, h("div", { key: '56d729edf7027563b7172f3f9b18345906e50dff', part: "header", class: "tile__header" }, h("six-icon-button", { key: '7cd9016baa63f562c3b1d0972b3b222c55f9f555', class: {
65
+ } }, h("div", { key: 'b1fc1fabbf6f853611c7e7401bc007ba23a80985', part: "header", class: "tile__header" }, h("six-icon-button", { key: '3c8241f94b14ddbc2aeded4a7471e003112850bf', class: {
66
66
  'tile__header--hidden': !this.closeable,
67
- }, name: "close", size: closeIconSize(this.size), onClick: this.handleCloseClickEvent })), h("div", { key: '2e6d7d3e708360a4018db6dab1daee7a13cd671b', part: "body", class: "tile__body" }, this.iconName && (h("six-icon", { key: '2e0d64a50d9064909c3a0f41a8d8052df6ce1941', onClick: this.handleClickEvent, size: iconSize(this.size) }, this.iconName)), this.hasIconSlot && h("slot", { key: '84c53bc538cfedda0b1365cafb64c86feaf1d5f3', name: "icon" })), h("div", { key: '46e70b405a6d28c09bd6d3a2a9530fcb0415595c', part: "footer", class: {
67
+ }, name: "close", size: closeIconSize(this.size), onClick: this.handleCloseClickEvent })), h("div", { key: '334757a44525044c0d7f78fccf55c9076267c4ff', part: "body", class: "tile__body" }, this.iconName && (h("six-icon", { key: 'ec0904b8125e608d4d1f5ebeeb1b1fd8f8202a18', onClick: this.handleClickEvent, size: iconSize(this.size) }, this.iconName)), this.hasIconSlot && h("slot", { key: '5c4d950efc7de4268da7285024c0900066020c19', name: "icon" })), h("div", { key: '145edac16dcbf511d60d4f044bae7bdd397d939e', part: "footer", class: {
68
68
  'tile__footer--small': this.size === 'small',
69
69
  'tile__footer--medium': this.size === 'medium',
70
70
  'tile__footer--large': this.size === 'large',
71
- } }, this.label && (h("div", { key: '35774ca3faf7192113f5550375ff895a2873bc1f', class: {
71
+ } }, this.label && (h("div", { key: 'e11277aca9e4b1d30050f582fef25f4b77815bfd', class: {
72
72
  '.label__footer': true,
73
- }, onClick: this.handleClickEvent }, this.label)), this.hasLabelSlot && h("slot", { key: '8c1ce8e5e504e6d33f41c0a9f38862fdddd619b1', name: "label" })))));
73
+ }, onClick: this.handleClickEvent }, this.label)), this.hasLabelSlot && h("slot", { key: '39e4128ecdb2166b5fba7955a5370e59beae9801', name: "label" })))));
74
74
  }
75
75
  static get is() { return "six-tile"; }
76
76
  static get encapsulation() { return "shadow"; }