@devschile/chucao 1.2.0 → 1.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 (125) hide show
  1. package/README.md +1 -0
  2. package/dist/chucao/chucao.css +2 -2
  3. package/dist/chucao/chucao.esm.js +1 -1
  4. package/dist/chucao/index.esm.js +1 -1
  5. package/dist/chucao/index.esm.js.map +1 -1
  6. package/dist/chucao/p-1f47dd08.entry.js +2 -0
  7. package/dist/chucao/p-1f47dd08.entry.js.map +1 -0
  8. package/dist/chucao/p-438e1401.entry.js +2 -0
  9. package/dist/chucao/p-438e1401.entry.js.map +1 -0
  10. package/dist/chucao/p-7413b8c3.entry.js +2 -0
  11. package/dist/chucao/p-7413b8c3.entry.js.map +1 -0
  12. package/dist/chucao/p-90db80a2.entry.js +2 -0
  13. package/dist/chucao/p-90db80a2.entry.js.map +1 -0
  14. package/dist/chucao/p-Bk9pvIKL.js +3 -0
  15. package/dist/chucao/p-Bk9pvIKL.js.map +1 -0
  16. package/dist/chucao/p-faa21ce0.entry.js +2 -0
  17. package/dist/chucao/p-faa21ce0.entry.js.map +1 -0
  18. package/dist/cjs/ch-badge_5.cjs.entry.js +57 -9
  19. package/dist/cjs/ch-badge_5.cjs.entry.js.map +1 -1
  20. package/dist/cjs/ch-checkbox.cjs.entry.js +80 -0
  21. package/dist/cjs/ch-checkbox.cjs.entry.js.map +1 -0
  22. package/dist/cjs/ch-radio.cjs.entry.js +83 -0
  23. package/dist/cjs/ch-radio.cjs.entry.js.map +1 -0
  24. package/dist/cjs/ch-switch.cjs.entry.js +80 -0
  25. package/dist/cjs/ch-switch.cjs.entry.js.map +1 -0
  26. package/dist/cjs/ch-textarea.cjs.entry.js +94 -0
  27. package/dist/cjs/ch-textarea.cjs.entry.js.map +1 -0
  28. package/dist/cjs/chucao.cjs.js +2 -2
  29. package/dist/cjs/{index-Tiana_FZ.js → index-DX3RZKi8.js} +6 -3
  30. package/dist/cjs/index-DX3RZKi8.js.map +1 -0
  31. package/dist/cjs/index.cjs.js +148 -7
  32. package/dist/cjs/index.cjs.js.map +1 -1
  33. package/dist/cjs/loader.cjs.js +2 -2
  34. package/dist/collection/collection-manifest.json +5 -1
  35. package/dist/collection/components/ch-badge/ch-badge.css +5 -5
  36. package/dist/collection/components/ch-button/ch-button.css +19 -19
  37. package/dist/collection/components/ch-card/ch-card.css +10 -10
  38. package/dist/collection/components/ch-card/ch-card.js +1 -1
  39. package/dist/collection/components/ch-checkbox/ch-checkbox.css +79 -0
  40. package/dist/collection/components/ch-checkbox/ch-checkbox.js +276 -0
  41. package/dist/collection/components/ch-checkbox/ch-checkbox.js.map +1 -0
  42. package/dist/collection/components/ch-input/ch-input.css +30 -10
  43. package/dist/collection/components/ch-input/ch-input.js +83 -1
  44. package/dist/collection/components/ch-input/ch-input.js.map +1 -1
  45. package/dist/collection/components/ch-radio/ch-radio.css +89 -0
  46. package/dist/collection/components/ch-radio/ch-radio.js +282 -0
  47. package/dist/collection/components/ch-radio/ch-radio.js.map +1 -0
  48. package/dist/collection/components/ch-select/ch-select.css +30 -10
  49. package/dist/collection/components/ch-select/ch-select.js +83 -1
  50. package/dist/collection/components/ch-select/ch-select.js.map +1 -1
  51. package/dist/collection/components/ch-switch/ch-switch.css +92 -0
  52. package/dist/collection/components/ch-switch/ch-switch.js +276 -0
  53. package/dist/collection/components/ch-switch/ch-switch.js.map +1 -0
  54. package/dist/collection/components/ch-textarea/ch-textarea.css +66 -0
  55. package/dist/collection/components/ch-textarea/ch-textarea.js +323 -0
  56. package/dist/collection/components/ch-textarea/ch-textarea.js.map +1 -0
  57. package/dist/collection/tokens/tokens.js +108 -6
  58. package/dist/collection/tokens/tokens.js.map +1 -1
  59. package/dist/collection/tokens/types.js.map +1 -1
  60. package/dist/components/ch-badge.js +1 -1
  61. package/dist/components/ch-badge.js.map +1 -1
  62. package/dist/components/ch-button.js +1 -1
  63. package/dist/components/ch-button.js.map +1 -1
  64. package/dist/components/ch-card.js +1 -1
  65. package/dist/components/ch-card.js.map +1 -1
  66. package/dist/components/ch-checkbox.d.ts +11 -0
  67. package/dist/components/ch-checkbox.js +2 -0
  68. package/dist/components/ch-checkbox.js.map +1 -0
  69. package/dist/components/ch-input.js +1 -1
  70. package/dist/components/ch-input.js.map +1 -1
  71. package/dist/components/ch-radio.d.ts +11 -0
  72. package/dist/components/ch-radio.js +2 -0
  73. package/dist/components/ch-radio.js.map +1 -0
  74. package/dist/components/ch-select.js +1 -1
  75. package/dist/components/ch-select.js.map +1 -1
  76. package/dist/components/ch-switch.d.ts +11 -0
  77. package/dist/components/ch-switch.js +2 -0
  78. package/dist/components/ch-switch.js.map +1 -0
  79. package/dist/components/ch-textarea.d.ts +11 -0
  80. package/dist/components/ch-textarea.js +2 -0
  81. package/dist/components/ch-textarea.js.map +1 -0
  82. package/dist/components/index.js +1 -1
  83. package/dist/components/index.js.map +1 -1
  84. package/dist/components/p-CcEsJ4Ml.js +2 -0
  85. package/dist/components/p-CcEsJ4Ml.js.map +1 -0
  86. package/dist/esm/ch-badge_5.entry.js +57 -9
  87. package/dist/esm/ch-badge_5.entry.js.map +1 -1
  88. package/dist/esm/ch-checkbox.entry.js +78 -0
  89. package/dist/esm/ch-checkbox.entry.js.map +1 -0
  90. package/dist/esm/ch-radio.entry.js +81 -0
  91. package/dist/esm/ch-radio.entry.js.map +1 -0
  92. package/dist/esm/ch-switch.entry.js +78 -0
  93. package/dist/esm/ch-switch.entry.js.map +1 -0
  94. package/dist/esm/ch-textarea.entry.js +92 -0
  95. package/dist/esm/ch-textarea.entry.js.map +1 -0
  96. package/dist/esm/chucao.js +3 -3
  97. package/dist/esm/{index-CuWheDah.js → index-Bk9pvIKL.js} +6 -3
  98. package/dist/esm/index-Bk9pvIKL.js.map +1 -0
  99. package/dist/esm/index.js +109 -7
  100. package/dist/esm/index.js.map +1 -1
  101. package/dist/esm/loader.js +3 -3
  102. package/dist/types/components/ch-checkbox/ch-checkbox.d.ts +51 -0
  103. package/dist/types/components/ch-input/ch-input.d.ts +16 -0
  104. package/dist/types/components/ch-radio/ch-radio.d.ts +58 -0
  105. package/dist/types/components/ch-select/ch-select.d.ts +16 -0
  106. package/dist/types/components/ch-switch/ch-switch.d.ts +51 -0
  107. package/dist/types/components/ch-textarea/ch-textarea.d.ts +60 -0
  108. package/dist/types/components.d.ts +571 -0
  109. package/dist/types/tokens/tokens.d.ts +104 -2
  110. package/dist/types/tokens/types.d.ts +13 -4
  111. package/dist-react/components.d.ts +22 -1
  112. package/dist-react/components.js +39 -0
  113. package/dist-react/components.ts +55 -1
  114. package/dist-vue/index.d.ts +4 -0
  115. package/dist-vue/index.js +69 -0
  116. package/dist-vue/index.ts +77 -0
  117. package/package.json +2 -1
  118. package/dist/chucao/p-035c479d.entry.js +0 -2
  119. package/dist/chucao/p-035c479d.entry.js.map +0 -1
  120. package/dist/chucao/p-CuWheDah.js +0 -3
  121. package/dist/chucao/p-CuWheDah.js.map +0 -1
  122. package/dist/cjs/index-Tiana_FZ.js.map +0 -1
  123. package/dist/components/p-DXg-7eP0.js +0 -2
  124. package/dist/components/p-DXg-7eP0.js.map +0 -1
  125. package/dist/esm/index-CuWheDah.js.map +0 -1
@@ -7,9 +7,11 @@
7
7
  import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
8
  import { ChBadgeVariant } from "./components/ch-badge/ch-badge";
9
9
  import { ChButtonVariant } from "./components/ch-button/ch-button";
10
+ import { ChRadioOption } from "./components/ch-radio/ch-radio";
10
11
  import { ChSelectOption } from "./components/ch-select/ch-select";
11
12
  export { ChBadgeVariant } from "./components/ch-badge/ch-badge";
12
13
  export { ChButtonVariant } from "./components/ch-button/ch-button";
14
+ export { ChRadioOption } from "./components/ch-radio/ch-radio";
13
15
  export { ChSelectOption } from "./components/ch-select/ch-select";
14
16
  export namespace Components {
15
17
  interface ChBadge {
@@ -37,12 +39,68 @@ export namespace Components {
37
39
  }
38
40
  interface ChCard {
39
41
  }
42
+ interface ChCheckbox {
43
+ /**
44
+ * Whether the checkbox is checked.
45
+ * @default false
46
+ */
47
+ "checked": boolean;
48
+ /**
49
+ * Whether the checkbox is disabled.
50
+ * @default false
51
+ */
52
+ "disabled": boolean;
53
+ /**
54
+ * Error message rendered below the checkbox when it is invalid.
55
+ */
56
+ "errorMessage"?: string;
57
+ /**
58
+ * Helper text rendered below the checkbox, associated via `aria-describedby`. Replaced by `errorMessage` when the checkbox is invalid.
59
+ */
60
+ "hint"?: string;
61
+ /**
62
+ * Whether the checkbox is in an invalid state; toggles `aria-invalid` and error styling.
63
+ * @default false
64
+ */
65
+ "invalid": boolean;
66
+ /**
67
+ * Visible label rendered next to the checkbox, associated with it via `for`/`id`, so assistive technology announces the checkbox's purpose.
68
+ */
69
+ "label"?: string;
70
+ /**
71
+ * The name of the checkbox, submitted with form data.
72
+ */
73
+ "name"?: string;
74
+ /**
75
+ * Whether the checkbox is required.
76
+ * @default false
77
+ */
78
+ "required": boolean;
79
+ /**
80
+ * The value of the checkbox, submitted with form data.
81
+ * @default 'on'
82
+ */
83
+ "value": string;
84
+ }
40
85
  interface ChInput {
41
86
  /**
42
87
  * Whether the input is disabled.
43
88
  * @default false
44
89
  */
45
90
  "disabled": boolean;
91
+ /**
92
+ * Error message rendered below the input when it is invalid.
93
+ */
94
+ "errorMessage"?: string;
95
+ /**
96
+ * Helper text rendered below the input, associated via `aria-describedby`. Replaced by `errorMessage` when the input is invalid.
97
+ */
98
+ "hint"?: string;
99
+ /**
100
+ * Whether the input is in an invalid state; toggles `aria-invalid` and error styling.
101
+ * @default false
102
+ */
103
+ "invalid": boolean;
46
104
  /**
47
105
  * Visible label rendered above the input and associated with it via `for`/`id`, so assistive technology announces the input's purpose.
48
106
  */
@@ -71,12 +129,67 @@ export namespace Components {
71
129
  */
72
130
  "value": string;
73
131
  }
132
+ interface ChRadio {
133
+ /**
134
+ * Whether all radios in the group are disabled.
135
+ * @default false
136
+ */
137
+ "disabled": boolean;
138
+ /**
139
+ * Error message rendered below the radio group when it is invalid.
140
+ */
141
+ "errorMessage"?: string;
142
+ /**
143
+ * Helper text rendered below the radio group, associated via `aria-describedby`. Replaced by `errorMessage` when the group is invalid.
144
+ */
145
+ "hint"?: string;
146
+ /**
147
+ * Whether the radio group is in an invalid state; toggles `aria-invalid` and error styling.
148
+ * @default false
149
+ */
150
+ "invalid": boolean;
151
+ /**
152
+ * Visible label describing the radio group, associated with it via `aria-labelledby`.
153
+ */
154
+ "label"?: string;
155
+ /**
156
+ * The name shared by all radio inputs in the group. Defaults to an auto-generated group name so options are mutually exclusive out of the box.
157
+ */
158
+ "name"?: string;
159
+ /**
160
+ * The list of options rendered as radio inputs.
161
+ * @default []
162
+ */
163
+ "options": ChRadioOption[];
164
+ /**
165
+ * Whether a value is required.
166
+ * @default false
167
+ */
168
+ "required": boolean;
169
+ /**
170
+ * The value of the selected option.
171
+ */
172
+ "value"?: string;
173
+ }
74
174
  interface ChSelect {
75
175
  /**
76
176
  * Whether the select is disabled.
77
177
  * @default false
78
178
  */
79
179
  "disabled": boolean;
180
+ /**
181
+ * Error message rendered below the select when it is invalid.
182
+ */
183
+ "errorMessage"?: string;
184
+ /**
185
+ * Helper text rendered below the select, associated via `aria-describedby`. Replaced by `errorMessage` when the select is invalid.
186
+ */
187
+ "hint"?: string;
188
+ /**
189
+ * Whether the select is in an invalid state; toggles `aria-invalid` and error styling.
190
+ * @default false
191
+ */
192
+ "invalid": boolean;
80
193
  /**
81
194
  * Visible label rendered above the select and associated with it via `for`/`id`, so assistive technology announces the select's purpose.
82
195
  */
@@ -104,19 +217,125 @@ export namespace Components {
104
217
  */
105
218
  "value"?: string;
106
219
  }
220
+ interface ChSwitch {
221
+ /**
222
+ * Whether the switch is on.
223
+ * @default false
224
+ */
225
+ "checked": boolean;
226
+ /**
227
+ * Whether the switch is disabled.
228
+ * @default false
229
+ */
230
+ "disabled": boolean;
231
+ /**
232
+ * Error message rendered below the switch when it is invalid.
233
+ */
234
+ "errorMessage"?: string;
235
+ /**
236
+ * Helper text rendered below the switch, associated via `aria-describedby`. Replaced by `errorMessage` when the switch is invalid.
237
+ */
238
+ "hint"?: string;
239
+ /**
240
+ * Whether the switch is in an invalid state; toggles `aria-invalid` and error styling.
241
+ * @default false
242
+ */
243
+ "invalid": boolean;
244
+ /**
245
+ * Visible label rendered next to the switch, associated with it via `for`/`id`, so assistive technology announces the switch's purpose.
246
+ */
247
+ "label"?: string;
248
+ /**
249
+ * The name of the switch, submitted with form data.
250
+ */
251
+ "name"?: string;
252
+ /**
253
+ * Whether the switch is required.
254
+ * @default false
255
+ */
256
+ "required": boolean;
257
+ /**
258
+ * The value of the switch, submitted with form data.
259
+ * @default 'on'
260
+ */
261
+ "value": string;
262
+ }
263
+ interface ChTextarea {
264
+ /**
265
+ * Whether the textarea is disabled.
266
+ * @default false
267
+ */
268
+ "disabled": boolean;
269
+ /**
270
+ * Error message rendered below the textarea when it is invalid.
271
+ */
272
+ "errorMessage"?: string;
273
+ /**
274
+ * Helper text rendered below the textarea, associated via `aria-describedby`. Replaced by `errorMessage` when the textarea is invalid.
275
+ */
276
+ "hint"?: string;
277
+ /**
278
+ * Whether the textarea is in an invalid state; toggles `aria-invalid` and error styling.
279
+ * @default false
280
+ */
281
+ "invalid": boolean;
282
+ /**
283
+ * Visible label rendered above the textarea and associated with it via `for`/`id`, so assistive technology announces the textarea's purpose.
284
+ */
285
+ "label"?: string;
286
+ /**
287
+ * The name of the textarea, submitted with form data.
288
+ */
289
+ "name"?: string;
290
+ /**
291
+ * Placeholder text shown when the textarea is empty.
292
+ */
293
+ "placeholder"?: string;
294
+ /**
295
+ * Whether the textarea is required.
296
+ * @default false
297
+ */
298
+ "required": boolean;
299
+ /**
300
+ * The number of visible rows of the textarea.
301
+ * @default 4
302
+ */
303
+ "rows": number;
304
+ /**
305
+ * The value of the textarea.
306
+ * @default ''
307
+ */
308
+ "value": string;
309
+ }
107
310
  }
108
311
  export interface ChButtonCustomEvent<T> extends CustomEvent<T> {
109
312
  detail: T;
110
313
  target: HTMLChButtonElement;
111
314
  }
315
+ export interface ChCheckboxCustomEvent<T> extends CustomEvent<T> {
316
+ detail: T;
317
+ target: HTMLChCheckboxElement;
318
+ }
112
319
  export interface ChInputCustomEvent<T> extends CustomEvent<T> {
113
320
  detail: T;
114
321
  target: HTMLChInputElement;
115
322
  }
323
+ export interface ChRadioCustomEvent<T> extends CustomEvent<T> {
324
+ detail: T;
325
+ target: HTMLChRadioElement;
326
+ }
116
327
  export interface ChSelectCustomEvent<T> extends CustomEvent<T> {
117
328
  detail: T;
118
329
  target: HTMLChSelectElement;
119
330
  }
331
+ export interface ChSwitchCustomEvent<T> extends CustomEvent<T> {
332
+ detail: T;
333
+ target: HTMLChSwitchElement;
334
+ }
335
+ export interface ChTextareaCustomEvent<T> extends CustomEvent<T> {
336
+ detail: T;
337
+ target: HTMLChTextareaElement;
338
+ }
120
339
  declare global {
121
340
  interface HTMLChBadgeElement extends Components.ChBadge, HTMLStencilElement {
122
341
  }
@@ -147,6 +366,23 @@ declare global {
147
366
  prototype: HTMLChCardElement;
148
367
  new (): HTMLChCardElement;
149
368
  };
369
+ interface HTMLChCheckboxElementEventMap {
370
+ "chChange": boolean;
371
+ }
372
+ interface HTMLChCheckboxElement extends Components.ChCheckbox, HTMLStencilElement {
373
+ addEventListener<K extends keyof HTMLChCheckboxElementEventMap>(type: K, listener: (this: HTMLChCheckboxElement, ev: ChCheckboxCustomEvent<HTMLChCheckboxElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
374
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
375
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
376
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
377
+ removeEventListener<K extends keyof HTMLChCheckboxElementEventMap>(type: K, listener: (this: HTMLChCheckboxElement, ev: ChCheckboxCustomEvent<HTMLChCheckboxElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
378
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
379
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
380
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
381
+ }
382
+ var HTMLChCheckboxElement: {
383
+ prototype: HTMLChCheckboxElement;
384
+ new (): HTMLChCheckboxElement;
385
+ };
150
386
  interface HTMLChInputElementEventMap {
151
387
  "chInput": string;
152
388
  "chChange": string;
@@ -165,6 +401,23 @@ declare global {
165
401
  prototype: HTMLChInputElement;
166
402
  new (): HTMLChInputElement;
167
403
  };
404
+ interface HTMLChRadioElementEventMap {
405
+ "chChange": string;
406
+ }
407
+ interface HTMLChRadioElement extends Components.ChRadio, HTMLStencilElement {
408
+ addEventListener<K extends keyof HTMLChRadioElementEventMap>(type: K, listener: (this: HTMLChRadioElement, ev: ChRadioCustomEvent<HTMLChRadioElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
409
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
410
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
411
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
412
+ removeEventListener<K extends keyof HTMLChRadioElementEventMap>(type: K, listener: (this: HTMLChRadioElement, ev: ChRadioCustomEvent<HTMLChRadioElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
413
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
414
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
415
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
416
+ }
417
+ var HTMLChRadioElement: {
418
+ prototype: HTMLChRadioElement;
419
+ new (): HTMLChRadioElement;
420
+ };
168
421
  interface HTMLChSelectElementEventMap {
169
422
  "chChange": string;
170
423
  }
@@ -182,12 +435,51 @@ declare global {
182
435
  prototype: HTMLChSelectElement;
183
436
  new (): HTMLChSelectElement;
184
437
  };
438
+ interface HTMLChSwitchElementEventMap {
439
+ "chChange": boolean;
440
+ }
441
+ interface HTMLChSwitchElement extends Components.ChSwitch, HTMLStencilElement {
442
+ addEventListener<K extends keyof HTMLChSwitchElementEventMap>(type: K, listener: (this: HTMLChSwitchElement, ev: ChSwitchCustomEvent<HTMLChSwitchElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
443
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
444
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
445
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
446
+ removeEventListener<K extends keyof HTMLChSwitchElementEventMap>(type: K, listener: (this: HTMLChSwitchElement, ev: ChSwitchCustomEvent<HTMLChSwitchElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
447
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
448
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
449
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
450
+ }
451
+ var HTMLChSwitchElement: {
452
+ prototype: HTMLChSwitchElement;
453
+ new (): HTMLChSwitchElement;
454
+ };
455
+ interface HTMLChTextareaElementEventMap {
456
+ "chInput": string;
457
+ "chChange": string;
458
+ }
459
+ interface HTMLChTextareaElement extends Components.ChTextarea, HTMLStencilElement {
460
+ addEventListener<K extends keyof HTMLChTextareaElementEventMap>(type: K, listener: (this: HTMLChTextareaElement, ev: ChTextareaCustomEvent<HTMLChTextareaElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
461
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
462
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
463
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
464
+ removeEventListener<K extends keyof HTMLChTextareaElementEventMap>(type: K, listener: (this: HTMLChTextareaElement, ev: ChTextareaCustomEvent<HTMLChTextareaElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
465
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
466
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
467
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
468
+ }
469
+ var HTMLChTextareaElement: {
470
+ prototype: HTMLChTextareaElement;
471
+ new (): HTMLChTextareaElement;
472
+ };
185
473
  interface HTMLElementTagNameMap {
186
474
  "ch-badge": HTMLChBadgeElement;
187
475
  "ch-button": HTMLChButtonElement;
188
476
  "ch-card": HTMLChCardElement;
477
+ "ch-checkbox": HTMLChCheckboxElement;
189
478
  "ch-input": HTMLChInputElement;
479
+ "ch-radio": HTMLChRadioElement;
190
480
  "ch-select": HTMLChSelectElement;
481
+ "ch-switch": HTMLChSwitchElement;
482
+ "ch-textarea": HTMLChTextareaElement;
191
483
  }
192
484
  }
193
485
  declare namespace LocalJSX {
@@ -220,12 +512,72 @@ declare namespace LocalJSX {
220
512
  }
221
513
  interface ChCard {
222
514
  }
515
+ interface ChCheckbox {
516
+ /**
517
+ * Whether the checkbox is checked.
518
+ * @default false
519
+ */
520
+ "checked"?: boolean;
521
+ /**
522
+ * Whether the checkbox is disabled.
523
+ * @default false
524
+ */
525
+ "disabled"?: boolean;
526
+ /**
527
+ * Error message rendered below the checkbox when it is invalid.
528
+ */
529
+ "errorMessage"?: string;
530
+ /**
531
+ * Helper text rendered below the checkbox, associated via `aria-describedby`. Replaced by `errorMessage` when the checkbox is invalid.
532
+ */
533
+ "hint"?: string;
534
+ /**
535
+ * Whether the checkbox is in an invalid state; toggles `aria-invalid` and error styling.
536
+ * @default false
537
+ */
538
+ "invalid"?: boolean;
539
+ /**
540
+ * Visible label rendered next to the checkbox, associated with it via `for`/`id`, so assistive technology announces the checkbox's purpose.
541
+ */
542
+ "label"?: string;
543
+ /**
544
+ * The name of the checkbox, submitted with form data.
545
+ */
546
+ "name"?: string;
547
+ /**
548
+ * Emitted when the checked state changes, with the new checked value.
549
+ */
550
+ "onChChange"?: (event: ChCheckboxCustomEvent<boolean>) => void;
551
+ /**
552
+ * Whether the checkbox is required.
553
+ * @default false
554
+ */
555
+ "required"?: boolean;
556
+ /**
557
+ * The value of the checkbox, submitted with form data.
558
+ * @default 'on'
559
+ */
560
+ "value"?: string;
561
+ }
223
562
  interface ChInput {
224
563
  /**
225
564
  * Whether the input is disabled.
226
565
  * @default false
227
566
  */
228
567
  "disabled"?: boolean;
568
+ /**
569
+ * Error message rendered below the input when it is invalid.
570
+ */
571
+ "errorMessage"?: string;
572
+ /**
573
+ * Helper text rendered below the input, associated via `aria-describedby`. Replaced by `errorMessage` when the input is invalid.
574
+ */
575
+ "hint"?: string;
576
+ /**
577
+ * Whether the input is in an invalid state; toggles `aria-invalid` and error styling.
578
+ * @default false
579
+ */
580
+ "invalid"?: boolean;
229
581
  /**
230
582
  * Visible label rendered above the input and associated with it via `for`/`id`, so assistive technology announces the input's purpose.
231
583
  */
@@ -262,12 +614,71 @@ declare namespace LocalJSX {
262
614
  */
263
615
  "value"?: string;
264
616
  }
617
+ interface ChRadio {
618
+ /**
619
+ * Whether all radios in the group are disabled.
620
+ * @default false
621
+ */
622
+ "disabled"?: boolean;
623
+ /**
624
+ * Error message rendered below the radio group when it is invalid.
625
+ */
626
+ "errorMessage"?: string;
627
+ /**
628
+ * Helper text rendered below the radio group, associated via `aria-describedby`. Replaced by `errorMessage` when the group is invalid.
629
+ */
630
+ "hint"?: string;
631
+ /**
632
+ * Whether the radio group is in an invalid state; toggles `aria-invalid` and error styling.
633
+ * @default false
634
+ */
635
+ "invalid"?: boolean;
636
+ /**
637
+ * Visible label describing the radio group, associated with it via `aria-labelledby`.
638
+ */
639
+ "label"?: string;
640
+ /**
641
+ * The name shared by all radio inputs in the group. Defaults to an auto-generated group name so options are mutually exclusive out of the box.
642
+ */
643
+ "name"?: string;
644
+ /**
645
+ * Emitted when a new option is selected, with the selected value.
646
+ */
647
+ "onChChange"?: (event: ChRadioCustomEvent<string>) => void;
648
+ /**
649
+ * The list of options rendered as radio inputs.
650
+ * @default []
651
+ */
652
+ "options"?: ChRadioOption[];
653
+ /**
654
+ * Whether a value is required.
655
+ * @default false
656
+ */
657
+ "required"?: boolean;
658
+ /**
659
+ * The value of the selected option.
660
+ */
661
+ "value"?: string;
662
+ }
265
663
  interface ChSelect {
266
664
  /**
267
665
  * Whether the select is disabled.
268
666
  * @default false
269
667
  */
270
668
  "disabled"?: boolean;
669
+ /**
670
+ * Error message rendered below the select when it is invalid.
671
+ */
672
+ "errorMessage"?: string;
673
+ /**
674
+ * Helper text rendered below the select, associated via `aria-describedby`. Replaced by `errorMessage` when the select is invalid.
675
+ */
676
+ "hint"?: string;
677
+ /**
678
+ * Whether the select is in an invalid state; toggles `aria-invalid` and error styling.
679
+ * @default false
680
+ */
681
+ "invalid"?: boolean;
271
682
  /**
272
683
  * Visible label rendered above the select and associated with it via `for`/`id`, so assistive technology announces the select's purpose.
273
684
  */
@@ -299,6 +710,108 @@ declare namespace LocalJSX {
299
710
  */
300
711
  "value"?: string;
301
712
  }
713
+ interface ChSwitch {
714
+ /**
715
+ * Whether the switch is on.
716
+ * @default false
717
+ */
718
+ "checked"?: boolean;
719
+ /**
720
+ * Whether the switch is disabled.
721
+ * @default false
722
+ */
723
+ "disabled"?: boolean;
724
+ /**
725
+ * Error message rendered below the switch when it is invalid.
726
+ */
727
+ "errorMessage"?: string;
728
+ /**
729
+ * Helper text rendered below the switch, associated via `aria-describedby`. Replaced by `errorMessage` when the switch is invalid.
730
+ */
731
+ "hint"?: string;
732
+ /**
733
+ * Whether the switch is in an invalid state; toggles `aria-invalid` and error styling.
734
+ * @default false
735
+ */
736
+ "invalid"?: boolean;
737
+ /**
738
+ * Visible label rendered next to the switch, associated with it via `for`/`id`, so assistive technology announces the switch's purpose.
739
+ */
740
+ "label"?: string;
741
+ /**
742
+ * The name of the switch, submitted with form data.
743
+ */
744
+ "name"?: string;
745
+ /**
746
+ * Emitted when the switch is toggled, with the new on/off state.
747
+ */
748
+ "onChChange"?: (event: ChSwitchCustomEvent<boolean>) => void;
749
+ /**
750
+ * Whether the switch is required.
751
+ * @default false
752
+ */
753
+ "required"?: boolean;
754
+ /**
755
+ * The value of the switch, submitted with form data.
756
+ * @default 'on'
757
+ */
758
+ "value"?: string;
759
+ }
760
+ interface ChTextarea {
761
+ /**
762
+ * Whether the textarea is disabled.
763
+ * @default false
764
+ */
765
+ "disabled"?: boolean;
766
+ /**
767
+ * Error message rendered below the textarea when it is invalid.
768
+ */
769
+ "errorMessage"?: string;
770
+ /**
771
+ * Helper text rendered below the textarea, associated via `aria-describedby`. Replaced by `errorMessage` when the textarea is invalid.
772
+ */
773
+ "hint"?: string;
774
+ /**
775
+ * Whether the textarea is in an invalid state; toggles `aria-invalid` and error styling.
776
+ * @default false
777
+ */
778
+ "invalid"?: boolean;
779
+ /**
780
+ * Visible label rendered above the textarea and associated with it via `for`/`id`, so assistive technology announces the textarea's purpose.
781
+ */
782
+ "label"?: string;
783
+ /**
784
+ * The name of the textarea, submitted with form data.
785
+ */
786
+ "name"?: string;
787
+ /**
788
+ * Emitted when the textarea value is committed (on native `change`).
789
+ */
790
+ "onChChange"?: (event: ChTextareaCustomEvent<string>) => void;
791
+ /**
792
+ * Emitted on every keystroke, with the current textarea value.
793
+ */
794
+ "onChInput"?: (event: ChTextareaCustomEvent<string>) => void;
795
+ /**
796
+ * Placeholder text shown when the textarea is empty.
797
+ */
798
+ "placeholder"?: string;
799
+ /**
800
+ * Whether the textarea is required.
801
+ * @default false
802
+ */
803
+ "required"?: boolean;
804
+ /**
805
+ * The number of visible rows of the textarea.
806
+ * @default 4
807
+ */
808
+ "rows"?: number;
809
+ /**
810
+ * The value of the textarea.
811
+ * @default ''
812
+ */
813
+ "value"?: string;
814
+ }
302
815
 
303
816
  interface ChBadgeAttributes {
304
817
  "variant": ChBadgeVariant;
@@ -308,6 +821,17 @@ declare namespace LocalJSX {
308
821
  "disabled": boolean;
309
822
  "label": string;
310
823
  }
824
+ interface ChCheckboxAttributes {
825
+ "label": string;
826
+ "name": string;
827
+ "value": string;
828
+ "checked": boolean;
829
+ "disabled": boolean;
830
+ "required": boolean;
831
+ "hint": string;
832
+ "errorMessage": string;
833
+ "invalid": boolean;
834
+ }
311
835
  interface ChInputAttributes {
312
836
  "label": string;
313
837
  "type": string;
@@ -316,6 +840,19 @@ declare namespace LocalJSX {
316
840
  "name": string;
317
841
  "disabled": boolean;
318
842
  "required": boolean;
843
+ "hint": string;
844
+ "errorMessage": string;
845
+ "invalid": boolean;
846
+ }
847
+ interface ChRadioAttributes {
848
+ "label": string;
849
+ "value": string;
850
+ "name": string;
851
+ "disabled": boolean;
852
+ "required": boolean;
853
+ "hint": string;
854
+ "errorMessage": string;
855
+ "invalid": boolean;
319
856
  }
320
857
  interface ChSelectAttributes {
321
858
  "label": string;
@@ -324,14 +861,44 @@ declare namespace LocalJSX {
324
861
  "name": string;
325
862
  "disabled": boolean;
326
863
  "required": boolean;
864
+ "hint": string;
865
+ "errorMessage": string;
866
+ "invalid": boolean;
867
+ }
868
+ interface ChSwitchAttributes {
869
+ "label": string;
870
+ "name": string;
871
+ "value": string;
872
+ "checked": boolean;
873
+ "disabled": boolean;
874
+ "required": boolean;
875
+ "hint": string;
876
+ "errorMessage": string;
877
+ "invalid": boolean;
878
+ }
879
+ interface ChTextareaAttributes {
880
+ "label": string;
881
+ "value": string;
882
+ "placeholder": string;
883
+ "rows": number;
884
+ "name": string;
885
+ "disabled": boolean;
886
+ "required": boolean;
887
+ "hint": string;
888
+ "errorMessage": string;
889
+ "invalid": boolean;
327
890
  }
328
891
 
329
892
  interface IntrinsicElements {
330
893
  "ch-badge": Omit<ChBadge, keyof ChBadgeAttributes> & { [K in keyof ChBadge & keyof ChBadgeAttributes]?: ChBadge[K] } & { [K in keyof ChBadge & keyof ChBadgeAttributes as `attr:${K}`]?: ChBadgeAttributes[K] } & { [K in keyof ChBadge & keyof ChBadgeAttributes as `prop:${K}`]?: ChBadge[K] };
331
894
  "ch-button": Omit<ChButton, keyof ChButtonAttributes> & { [K in keyof ChButton & keyof ChButtonAttributes]?: ChButton[K] } & { [K in keyof ChButton & keyof ChButtonAttributes as `attr:${K}`]?: ChButtonAttributes[K] } & { [K in keyof ChButton & keyof ChButtonAttributes as `prop:${K}`]?: ChButton[K] };
332
895
  "ch-card": ChCard;
896
+ "ch-checkbox": Omit<ChCheckbox, keyof ChCheckboxAttributes> & { [K in keyof ChCheckbox & keyof ChCheckboxAttributes]?: ChCheckbox[K] } & { [K in keyof ChCheckbox & keyof ChCheckboxAttributes as `attr:${K}`]?: ChCheckboxAttributes[K] } & { [K in keyof ChCheckbox & keyof ChCheckboxAttributes as `prop:${K}`]?: ChCheckbox[K] };
333
897
  "ch-input": Omit<ChInput, keyof ChInputAttributes> & { [K in keyof ChInput & keyof ChInputAttributes]?: ChInput[K] } & { [K in keyof ChInput & keyof ChInputAttributes as `attr:${K}`]?: ChInputAttributes[K] } & { [K in keyof ChInput & keyof ChInputAttributes as `prop:${K}`]?: ChInput[K] };
898
+ "ch-radio": Omit<ChRadio, keyof ChRadioAttributes> & { [K in keyof ChRadio & keyof ChRadioAttributes]?: ChRadio[K] } & { [K in keyof ChRadio & keyof ChRadioAttributes as `attr:${K}`]?: ChRadioAttributes[K] } & { [K in keyof ChRadio & keyof ChRadioAttributes as `prop:${K}`]?: ChRadio[K] };
334
899
  "ch-select": Omit<ChSelect, keyof ChSelectAttributes> & { [K in keyof ChSelect & keyof ChSelectAttributes]?: ChSelect[K] } & { [K in keyof ChSelect & keyof ChSelectAttributes as `attr:${K}`]?: ChSelectAttributes[K] } & { [K in keyof ChSelect & keyof ChSelectAttributes as `prop:${K}`]?: ChSelect[K] };
900
+ "ch-switch": Omit<ChSwitch, keyof ChSwitchAttributes> & { [K in keyof ChSwitch & keyof ChSwitchAttributes]?: ChSwitch[K] } & { [K in keyof ChSwitch & keyof ChSwitchAttributes as `attr:${K}`]?: ChSwitchAttributes[K] } & { [K in keyof ChSwitch & keyof ChSwitchAttributes as `prop:${K}`]?: ChSwitch[K] };
901
+ "ch-textarea": Omit<ChTextarea, keyof ChTextareaAttributes> & { [K in keyof ChTextarea & keyof ChTextareaAttributes]?: ChTextarea[K] } & { [K in keyof ChTextarea & keyof ChTextareaAttributes as `attr:${K}`]?: ChTextareaAttributes[K] } & { [K in keyof ChTextarea & keyof ChTextareaAttributes as `prop:${K}`]?: ChTextarea[K] };
335
902
  }
336
903
  }
337
904
  export { LocalJSX as JSX };
@@ -341,8 +908,12 @@ declare module "@stencil/core" {
341
908
  "ch-badge": LocalJSX.IntrinsicElements["ch-badge"] & JSXBase.HTMLAttributes<HTMLChBadgeElement>;
342
909
  "ch-button": LocalJSX.IntrinsicElements["ch-button"] & JSXBase.HTMLAttributes<HTMLChButtonElement>;
343
910
  "ch-card": LocalJSX.IntrinsicElements["ch-card"] & JSXBase.HTMLAttributes<HTMLChCardElement>;
911
+ "ch-checkbox": LocalJSX.IntrinsicElements["ch-checkbox"] & JSXBase.HTMLAttributes<HTMLChCheckboxElement>;
344
912
  "ch-input": LocalJSX.IntrinsicElements["ch-input"] & JSXBase.HTMLAttributes<HTMLChInputElement>;
913
+ "ch-radio": LocalJSX.IntrinsicElements["ch-radio"] & JSXBase.HTMLAttributes<HTMLChRadioElement>;
345
914
  "ch-select": LocalJSX.IntrinsicElements["ch-select"] & JSXBase.HTMLAttributes<HTMLChSelectElement>;
915
+ "ch-switch": LocalJSX.IntrinsicElements["ch-switch"] & JSXBase.HTMLAttributes<HTMLChSwitchElement>;
916
+ "ch-textarea": LocalJSX.IntrinsicElements["ch-textarea"] & JSXBase.HTMLAttributes<HTMLChTextareaElement>;
346
917
  }
347
918
  }
348
919
  }