@devschile/chucao 1.7.0 → 2.0.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 (165) hide show
  1. package/README.md +14 -12
  2. package/dist/chucao/chucao.css +1 -1
  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-10658dc9.entry.js +2 -0
  7. package/dist/chucao/p-10658dc9.entry.js.map +1 -0
  8. package/dist/chucao/p-19dde4f9.entry.js +2 -0
  9. package/dist/chucao/p-19dde4f9.entry.js.map +1 -0
  10. package/dist/chucao/p-2e20c7a1.entry.js +2 -0
  11. package/dist/chucao/p-2e20c7a1.entry.js.map +1 -0
  12. package/dist/chucao/p-66dce533.entry.js +2 -0
  13. package/dist/chucao/p-66dce533.entry.js.map +1 -0
  14. package/dist/chucao/p-75184fe1.entry.js +2 -0
  15. package/dist/chucao/p-75184fe1.entry.js.map +1 -0
  16. package/dist/chucao/p-96c852f5.entry.js +2 -0
  17. package/dist/chucao/p-96c852f5.entry.js.map +1 -0
  18. package/dist/chucao/p-BaKXvAYc.js +3 -0
  19. package/dist/chucao/p-BaKXvAYc.js.map +1 -0
  20. package/dist/chucao/{p-fe8e9537.entry.js → p-a0ec231a.entry.js} +2 -2
  21. package/dist/chucao/{p-488c7838.entry.js → p-e48912c7.entry.js} +2 -2
  22. package/dist/chucao/{p-20492b73.entry.js → p-f04d2f75.entry.js} +2 -2
  23. package/dist/chucao/{p-053d58a4.entry.js → p-f62e1da2.entry.js} +2 -2
  24. package/dist/cjs/ch-accordion.cjs.entry.js +1 -1
  25. package/dist/cjs/ch-alert_8.cjs.entry.js +185 -8
  26. package/dist/cjs/ch-alert_8.cjs.entry.js.map +1 -1
  27. package/dist/cjs/ch-checkbox.cjs.entry.js +62 -3
  28. package/dist/cjs/ch-checkbox.cjs.entry.js.map +1 -1
  29. package/dist/cjs/ch-divider.cjs.entry.js +1 -1
  30. package/dist/cjs/ch-link.cjs.entry.js +1 -1
  31. package/dist/cjs/ch-modal.cjs.entry.js +167 -0
  32. package/dist/cjs/ch-modal.cjs.entry.js.map +1 -0
  33. package/dist/cjs/ch-radio.cjs.entry.js +62 -3
  34. package/dist/cjs/ch-radio.cjs.entry.js.map +1 -1
  35. package/dist/cjs/ch-tabs.cjs.entry.js +1 -1
  36. package/dist/cjs/ch-textarea.cjs.entry.js +62 -3
  37. package/dist/cjs/ch-textarea.cjs.entry.js.map +1 -1
  38. package/dist/cjs/ch-tooltip.cjs.entry.js +82 -0
  39. package/dist/cjs/ch-tooltip.cjs.entry.js.map +1 -0
  40. package/dist/cjs/chucao.cjs.js +2 -2
  41. package/dist/cjs/{index-ls4U227d.js → index-C9Abf0td.js} +204 -9
  42. package/dist/cjs/index-C9Abf0td.js.map +1 -0
  43. package/dist/cjs/index.cjs.js +5 -0
  44. package/dist/cjs/index.cjs.js.map +1 -1
  45. package/dist/cjs/loader.cjs.js +2 -2
  46. package/dist/collection/collection-manifest.json +2 -0
  47. package/dist/collection/components/ch-card/ch-card.js +1 -1
  48. package/dist/collection/components/ch-checkbox/ch-checkbox.css +10 -0
  49. package/dist/collection/components/ch-checkbox/ch-checkbox.js +64 -4
  50. package/dist/collection/components/ch-checkbox/ch-checkbox.js.map +1 -1
  51. package/dist/collection/components/ch-input/ch-input.css +11 -0
  52. package/dist/collection/components/ch-input/ch-input.js +64 -4
  53. package/dist/collection/components/ch-input/ch-input.js.map +1 -1
  54. package/dist/collection/components/ch-modal/ch-modal.css +69 -0
  55. package/dist/collection/components/ch-modal/ch-modal.js +278 -0
  56. package/dist/collection/components/ch-modal/ch-modal.js.map +1 -0
  57. package/dist/collection/components/ch-radio/ch-radio.css +10 -0
  58. package/dist/collection/components/ch-radio/ch-radio.js +64 -4
  59. package/dist/collection/components/ch-radio/ch-radio.js.map +1 -1
  60. package/dist/collection/components/ch-select/ch-select.css +11 -0
  61. package/dist/collection/components/ch-select/ch-select.js +64 -4
  62. package/dist/collection/components/ch-select/ch-select.js.map +1 -1
  63. package/dist/collection/components/ch-switch/ch-switch.css +10 -0
  64. package/dist/collection/components/ch-switch/ch-switch.js +64 -4
  65. package/dist/collection/components/ch-switch/ch-switch.js.map +1 -1
  66. package/dist/collection/components/ch-textarea/ch-textarea.css +11 -0
  67. package/dist/collection/components/ch-textarea/ch-textarea.js +64 -4
  68. package/dist/collection/components/ch-textarea/ch-textarea.js.map +1 -1
  69. package/dist/collection/components/ch-tooltip/ch-tooltip.css +100 -0
  70. package/dist/collection/components/ch-tooltip/ch-tooltip.js +168 -0
  71. package/dist/collection/components/ch-tooltip/ch-tooltip.js.map +1 -0
  72. package/dist/collection/tokens/tokens.js +4 -0
  73. package/dist/collection/tokens/tokens.js.map +1 -1
  74. package/dist/collection/tokens/types.js.map +1 -1
  75. package/dist/components/ch-accordion.js +1 -1
  76. package/dist/components/ch-alert.js +1 -1
  77. package/dist/components/ch-badge.js +1 -1
  78. package/dist/components/ch-button.js +1 -1
  79. package/dist/components/ch-card.js +1 -1
  80. package/dist/components/ch-checkbox.js +1 -1
  81. package/dist/components/ch-checkbox.js.map +1 -1
  82. package/dist/components/ch-divider.js +1 -1
  83. package/dist/components/ch-input.js +1 -1
  84. package/dist/components/ch-input.js.map +1 -1
  85. package/dist/components/ch-link.js +1 -1
  86. package/dist/components/ch-modal.d.ts +11 -0
  87. package/dist/components/ch-modal.js +2 -0
  88. package/dist/components/ch-modal.js.map +1 -0
  89. package/dist/components/ch-radio.js +1 -1
  90. package/dist/components/ch-radio.js.map +1 -1
  91. package/dist/components/ch-select.js +1 -1
  92. package/dist/components/ch-select.js.map +1 -1
  93. package/dist/components/ch-spinner.js +1 -1
  94. package/dist/components/ch-switch.js +1 -1
  95. package/dist/components/ch-switch.js.map +1 -1
  96. package/dist/components/ch-tabs.js +1 -1
  97. package/dist/components/ch-textarea.js +1 -1
  98. package/dist/components/ch-textarea.js.map +1 -1
  99. package/dist/components/ch-tooltip.d.ts +11 -0
  100. package/dist/components/ch-tooltip.js +2 -0
  101. package/dist/components/ch-tooltip.js.map +1 -0
  102. package/dist/components/index.js +1 -1
  103. package/dist/components/index.js.map +1 -1
  104. package/dist/components/p-DL-bL54o.js +2 -0
  105. package/dist/components/p-DL-bL54o.js.map +1 -0
  106. package/dist/esm/ch-accordion.entry.js +1 -1
  107. package/dist/esm/ch-alert_8.entry.js +185 -8
  108. package/dist/esm/ch-alert_8.entry.js.map +1 -1
  109. package/dist/esm/ch-checkbox.entry.js +62 -3
  110. package/dist/esm/ch-checkbox.entry.js.map +1 -1
  111. package/dist/esm/ch-divider.entry.js +1 -1
  112. package/dist/esm/ch-link.entry.js +1 -1
  113. package/dist/esm/ch-modal.entry.js +165 -0
  114. package/dist/esm/ch-modal.entry.js.map +1 -0
  115. package/dist/esm/ch-radio.entry.js +62 -3
  116. package/dist/esm/ch-radio.entry.js.map +1 -1
  117. package/dist/esm/ch-tabs.entry.js +1 -1
  118. package/dist/esm/ch-textarea.entry.js +62 -3
  119. package/dist/esm/ch-textarea.entry.js.map +1 -1
  120. package/dist/esm/ch-tooltip.entry.js +80 -0
  121. package/dist/esm/ch-tooltip.entry.js.map +1 -0
  122. package/dist/esm/chucao.js +3 -3
  123. package/dist/esm/{index-pfWAsOzE.js → index-BaKXvAYc.js} +204 -10
  124. package/dist/esm/index-BaKXvAYc.js.map +1 -0
  125. package/dist/esm/index.js +5 -1
  126. package/dist/esm/index.js.map +1 -1
  127. package/dist/esm/loader.js +3 -3
  128. package/dist/types/components/ch-checkbox/ch-checkbox.d.ts +9 -0
  129. package/dist/types/components/ch-input/ch-input.d.ts +9 -0
  130. package/dist/types/components/ch-modal/ch-modal.d.ts +67 -0
  131. package/dist/types/components/ch-radio/ch-radio.d.ts +9 -0
  132. package/dist/types/components/ch-select/ch-select.d.ts +9 -0
  133. package/dist/types/components/ch-switch/ch-switch.d.ts +9 -0
  134. package/dist/types/components/ch-textarea/ch-textarea.d.ts +9 -0
  135. package/dist/types/components/ch-tooltip/ch-tooltip.d.ts +47 -0
  136. package/dist/types/components.d.ts +240 -0
  137. package/dist/types/tokens/tokens.d.ts +4 -0
  138. package/dist/types/tokens/types.d.ts +1 -1
  139. package/dist-react/components.d.ts +10 -1
  140. package/dist-react/components.js +21 -0
  141. package/dist-react/components.ts +31 -1
  142. package/dist-vue/index.d.ts +2 -0
  143. package/dist-vue/index.js +15 -0
  144. package/dist-vue/index.ts +19 -0
  145. package/hydrate/index.js +836 -61
  146. package/hydrate/index.mjs +836 -61
  147. package/package.json +4 -1
  148. package/dist/chucao/p-0305f2eb.entry.js +0 -2
  149. package/dist/chucao/p-0305f2eb.entry.js.map +0 -1
  150. package/dist/chucao/p-9a614e82.entry.js +0 -2
  151. package/dist/chucao/p-9a614e82.entry.js.map +0 -1
  152. package/dist/chucao/p-ad3206a2.entry.js +0 -2
  153. package/dist/chucao/p-ad3206a2.entry.js.map +0 -1
  154. package/dist/chucao/p-c598f978.entry.js +0 -2
  155. package/dist/chucao/p-c598f978.entry.js.map +0 -1
  156. package/dist/chucao/p-pfWAsOzE.js +0 -3
  157. package/dist/chucao/p-pfWAsOzE.js.map +0 -1
  158. package/dist/cjs/index-ls4U227d.js.map +0 -1
  159. package/dist/components/p-ONE3uKkF.js +0 -2
  160. package/dist/components/p-ONE3uKkF.js.map +0 -1
  161. package/dist/esm/index-pfWAsOzE.js.map +0 -1
  162. /package/dist/chucao/{p-fe8e9537.entry.js.map → p-a0ec231a.entry.js.map} +0 -0
  163. /package/dist/chucao/{p-488c7838.entry.js.map → p-e48912c7.entry.js.map} +0 -0
  164. /package/dist/chucao/{p-20492b73.entry.js.map → p-f04d2f75.entry.js.map} +0 -0
  165. /package/dist/chucao/{p-053d58a4.entry.js.map → p-f62e1da2.entry.js.map} +0 -0
@@ -15,6 +15,7 @@ import { ChRadioOption } from "./components/ch-radio/ch-radio";
15
15
  import { ChSelectOption } from "./components/ch-select/ch-select";
16
16
  import { ChSpinnerSize } from "./components/ch-spinner/ch-spinner";
17
17
  import { ChTab } from "./components/ch-tabs/ch-tabs";
18
+ import { ChTooltipPlacement } from "./components/ch-tooltip/ch-tooltip";
18
19
  export { ChAccordionItem } from "./components/ch-accordion/ch-accordion";
19
20
  export { ChAlertVariant } from "./components/ch-alert/ch-alert";
20
21
  export { ChBadgeVariant } from "./components/ch-badge/ch-badge";
@@ -25,6 +26,7 @@ export { ChRadioOption } from "./components/ch-radio/ch-radio";
25
26
  export { ChSelectOption } from "./components/ch-select/ch-select";
26
27
  export { ChSpinnerSize } from "./components/ch-spinner/ch-spinner";
27
28
  export { ChTab } from "./components/ch-tabs/ch-tabs";
29
+ export { ChTooltipPlacement } from "./components/ch-tooltip/ch-tooltip";
28
30
  export namespace Components {
29
31
  interface ChAccordion {
30
32
  /**
@@ -198,6 +200,37 @@ export namespace Components {
198
200
  */
199
201
  "variant": ChLinkVariant;
200
202
  }
203
+ /**
204
+ * Modal dialog, built on the native `<dialog>` element and opened with
205
+ * `showModal()`.
206
+ * The browser therefore supplies the parts that are easy to get wrong: moving
207
+ * focus into the dialog and returning it afterwards, marking the rest of the
208
+ * document inert, `Escape` to close, the top layer, `::backdrop`, and the
209
+ * implicit `dialog` role with `aria-modal="true"`. Notably it does not trap
210
+ * focus, which is deliberate — the W3C APA group concluded a modal should let
211
+ * keyboard users reach browser UI, so a hand-rolled trap would be less
212
+ * correct, not more.
213
+ * What the platform does not cover, and this component adds: locking the page
214
+ * behind the dialog so it cannot scroll, and closing when the backdrop is
215
+ * clicked. The latter is `closedby="any"` in the platform, which Safari does
216
+ * not support yet, so it is implemented here for every browser alike rather
217
+ * than only for some.
218
+ */
219
+ interface ChModal {
220
+ /**
221
+ * Accessible label for the close button, set as `aria-label`. Setting it is what adds the button: its only content is a decorative glyph, so without a label it would have no accessible name.
222
+ */
223
+ "closeLabel"?: string;
224
+ /**
225
+ * Accessible name for the dialog, set as `aria-label`. A slotted heading cannot be referenced with `aria-labelledby` across the shadow boundary, so the name comes through this prop — and a modal dialog needs one, so pass the same text as the heading.
226
+ */
227
+ "label"?: string;
228
+ /**
229
+ * Whether the dialog is open. Kept in sync when the user closes it with `Escape`, the close button or a click outside.
230
+ * @default false
231
+ */
232
+ "open": boolean;
233
+ }
201
234
  interface ChRadio {
202
235
  /**
203
236
  * Whether all radios in the group are disabled.
@@ -409,6 +442,27 @@ export namespace Components {
409
442
  */
410
443
  "value": string;
411
444
  }
445
+ /**
446
+ * Short help text shown on hover and on focus.
447
+ * Both the trigger and the text come from the consumer's light DOM through
448
+ * named slots. That is what makes the accessible association work: an
449
+ * `aria-describedby` IDREF only resolves within a single tree, and slotted
450
+ * nodes stay in the document tree even though they render inside the shadow
451
+ * root. Keeping the text in the shadow root instead would need a reference
452
+ * pointing into a shadow tree, which the platform does not allow — element
453
+ * reflection only points outwards, and `referenceTarget` is not available yet.
454
+ * The trigger has to be a natively focusable element (`<button>`, `<a>`,
455
+ * `<input>`). A chucao component such as `ch-button` will not be described,
456
+ * because `aria-*` set on a custom element host does not reach the native
457
+ * element inside it — see the discussion in issue #47.
458
+ */
459
+ interface ChTooltip {
460
+ /**
461
+ * Which side of the trigger the bubble is placed on.
462
+ * @default 'top'
463
+ */
464
+ "placement": ChTooltipPlacement;
465
+ }
412
466
  }
413
467
  export interface ChAccordionCustomEvent<T> extends CustomEvent<T> {
414
468
  detail: T;
@@ -434,6 +488,10 @@ export interface ChLinkCustomEvent<T> extends CustomEvent<T> {
434
488
  detail: T;
435
489
  target: HTMLChLinkElement;
436
490
  }
491
+ export interface ChModalCustomEvent<T> extends CustomEvent<T> {
492
+ detail: T;
493
+ target: HTMLChModalElement;
494
+ }
437
495
  export interface ChRadioCustomEvent<T> extends CustomEvent<T> {
438
496
  detail: T;
439
497
  target: HTMLChRadioElement;
@@ -584,6 +642,40 @@ declare global {
584
642
  prototype: HTMLChLinkElement;
585
643
  new (): HTMLChLinkElement;
586
644
  };
645
+ interface HTMLChModalElementEventMap {
646
+ "chOpen": void;
647
+ "chClose": void;
648
+ }
649
+ /**
650
+ * Modal dialog, built on the native `<dialog>` element and opened with
651
+ * `showModal()`.
652
+ * The browser therefore supplies the parts that are easy to get wrong: moving
653
+ * focus into the dialog and returning it afterwards, marking the rest of the
654
+ * document inert, `Escape` to close, the top layer, `::backdrop`, and the
655
+ * implicit `dialog` role with `aria-modal="true"`. Notably it does not trap
656
+ * focus, which is deliberate — the W3C APA group concluded a modal should let
657
+ * keyboard users reach browser UI, so a hand-rolled trap would be less
658
+ * correct, not more.
659
+ * What the platform does not cover, and this component adds: locking the page
660
+ * behind the dialog so it cannot scroll, and closing when the backdrop is
661
+ * clicked. The latter is `closedby="any"` in the platform, which Safari does
662
+ * not support yet, so it is implemented here for every browser alike rather
663
+ * than only for some.
664
+ */
665
+ interface HTMLChModalElement extends Components.ChModal, HTMLStencilElement {
666
+ addEventListener<K extends keyof HTMLChModalElementEventMap>(type: K, listener: (this: HTMLChModalElement, ev: ChModalCustomEvent<HTMLChModalElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
667
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
668
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
669
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
670
+ removeEventListener<K extends keyof HTMLChModalElementEventMap>(type: K, listener: (this: HTMLChModalElement, ev: ChModalCustomEvent<HTMLChModalElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
671
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
672
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
673
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
674
+ }
675
+ var HTMLChModalElement: {
676
+ prototype: HTMLChModalElement;
677
+ new (): HTMLChModalElement;
678
+ };
587
679
  interface HTMLChRadioElementEventMap {
588
680
  "chChange": string;
589
681
  }
@@ -683,6 +775,26 @@ declare global {
683
775
  prototype: HTMLChTextareaElement;
684
776
  new (): HTMLChTextareaElement;
685
777
  };
778
+ /**
779
+ * Short help text shown on hover and on focus.
780
+ * Both the trigger and the text come from the consumer's light DOM through
781
+ * named slots. That is what makes the accessible association work: an
782
+ * `aria-describedby` IDREF only resolves within a single tree, and slotted
783
+ * nodes stay in the document tree even though they render inside the shadow
784
+ * root. Keeping the text in the shadow root instead would need a reference
785
+ * pointing into a shadow tree, which the platform does not allow — element
786
+ * reflection only points outwards, and `referenceTarget` is not available yet.
787
+ * The trigger has to be a natively focusable element (`<button>`, `<a>`,
788
+ * `<input>`). A chucao component such as `ch-button` will not be described,
789
+ * because `aria-*` set on a custom element host does not reach the native
790
+ * element inside it — see the discussion in issue #47.
791
+ */
792
+ interface HTMLChTooltipElement extends Components.ChTooltip, HTMLStencilElement {
793
+ }
794
+ var HTMLChTooltipElement: {
795
+ prototype: HTMLChTooltipElement;
796
+ new (): HTMLChTooltipElement;
797
+ };
686
798
  interface HTMLElementTagNameMap {
687
799
  "ch-accordion": HTMLChAccordionElement;
688
800
  "ch-alert": HTMLChAlertElement;
@@ -693,12 +805,14 @@ declare global {
693
805
  "ch-divider": HTMLChDividerElement;
694
806
  "ch-input": HTMLChInputElement;
695
807
  "ch-link": HTMLChLinkElement;
808
+ "ch-modal": HTMLChModalElement;
696
809
  "ch-radio": HTMLChRadioElement;
697
810
  "ch-select": HTMLChSelectElement;
698
811
  "ch-spinner": HTMLChSpinnerElement;
699
812
  "ch-switch": HTMLChSwitchElement;
700
813
  "ch-tabs": HTMLChTabsElement;
701
814
  "ch-textarea": HTMLChTextareaElement;
815
+ "ch-tooltip": HTMLChTooltipElement;
702
816
  }
703
817
  }
704
818
  declare namespace LocalJSX {
@@ -784,6 +898,10 @@ declare namespace LocalJSX {
784
898
  * Error message rendered below the checkbox when it is invalid.
785
899
  */
786
900
  "errorMessage"?: string;
901
+ /**
902
+ * The `id` of a `<form>` element to associate this element with.
903
+ */
904
+ "form"?: string;
787
905
  /**
788
906
  * Helper text rendered below the checkbox, associated via `aria-describedby`. Replaced by `errorMessage` when the checkbox is invalid.
789
907
  */
@@ -833,6 +951,10 @@ declare namespace LocalJSX {
833
951
  * Error message rendered below the input when it is invalid.
834
952
  */
835
953
  "errorMessage"?: string;
954
+ /**
955
+ * The `id` of a `<form>` element to associate this element with.
956
+ */
957
+ "form"?: string;
836
958
  /**
837
959
  * Helper text rendered below the input, associated via `aria-describedby`. Replaced by `errorMessage` when the input is invalid.
838
960
  */
@@ -902,6 +1024,45 @@ declare namespace LocalJSX {
902
1024
  */
903
1025
  "variant"?: ChLinkVariant;
904
1026
  }
1027
+ /**
1028
+ * Modal dialog, built on the native `<dialog>` element and opened with
1029
+ * `showModal()`.
1030
+ * The browser therefore supplies the parts that are easy to get wrong: moving
1031
+ * focus into the dialog and returning it afterwards, marking the rest of the
1032
+ * document inert, `Escape` to close, the top layer, `::backdrop`, and the
1033
+ * implicit `dialog` role with `aria-modal="true"`. Notably it does not trap
1034
+ * focus, which is deliberate — the W3C APA group concluded a modal should let
1035
+ * keyboard users reach browser UI, so a hand-rolled trap would be less
1036
+ * correct, not more.
1037
+ * What the platform does not cover, and this component adds: locking the page
1038
+ * behind the dialog so it cannot scroll, and closing when the backdrop is
1039
+ * clicked. The latter is `closedby="any"` in the platform, which Safari does
1040
+ * not support yet, so it is implemented here for every browser alike rather
1041
+ * than only for some.
1042
+ */
1043
+ interface ChModal {
1044
+ /**
1045
+ * Accessible label for the close button, set as `aria-label`. Setting it is what adds the button: its only content is a decorative glyph, so without a label it would have no accessible name.
1046
+ */
1047
+ "closeLabel"?: string;
1048
+ /**
1049
+ * Accessible name for the dialog, set as `aria-label`. A slotted heading cannot be referenced with `aria-labelledby` across the shadow boundary, so the name comes through this prop — and a modal dialog needs one, so pass the same text as the heading.
1050
+ */
1051
+ "label"?: string;
1052
+ /**
1053
+ * Emitted after the dialog closes, however it was closed.
1054
+ */
1055
+ "onChClose"?: (event: ChModalCustomEvent<void>) => void;
1056
+ /**
1057
+ * Emitted after the dialog opens.
1058
+ */
1059
+ "onChOpen"?: (event: ChModalCustomEvent<void>) => void;
1060
+ /**
1061
+ * Whether the dialog is open. Kept in sync when the user closes it with `Escape`, the close button or a click outside.
1062
+ * @default false
1063
+ */
1064
+ "open"?: boolean;
1065
+ }
905
1066
  interface ChRadio {
906
1067
  /**
907
1068
  * Whether all radios in the group are disabled.
@@ -912,6 +1073,10 @@ declare namespace LocalJSX {
912
1073
  * Error message rendered below the radio group when it is invalid.
913
1074
  */
914
1075
  "errorMessage"?: string;
1076
+ /**
1077
+ * The `id` of a `<form>` element to associate this element with.
1078
+ */
1079
+ "form"?: string;
915
1080
  /**
916
1081
  * Helper text rendered below the radio group, associated via `aria-describedby`. Replaced by `errorMessage` when the group is invalid.
917
1082
  */
@@ -958,6 +1123,10 @@ declare namespace LocalJSX {
958
1123
  * Error message rendered below the select when it is invalid.
959
1124
  */
960
1125
  "errorMessage"?: string;
1126
+ /**
1127
+ * The `id` of a `<form>` element to associate this element with.
1128
+ */
1129
+ "form"?: string;
961
1130
  /**
962
1131
  * Helper text rendered below the select, associated via `aria-describedby`. Replaced by `errorMessage` when the select is invalid.
963
1132
  */
@@ -1031,6 +1200,10 @@ declare namespace LocalJSX {
1031
1200
  * Error message rendered below the switch when it is invalid.
1032
1201
  */
1033
1202
  "errorMessage"?: string;
1203
+ /**
1204
+ * The `id` of a `<form>` element to associate this element with.
1205
+ */
1206
+ "form"?: string;
1034
1207
  /**
1035
1208
  * Helper text rendered below the switch, associated via `aria-describedby`. Replaced by `errorMessage` when the switch is invalid.
1036
1209
  */
@@ -1092,6 +1265,10 @@ declare namespace LocalJSX {
1092
1265
  * Error message rendered below the textarea when it is invalid.
1093
1266
  */
1094
1267
  "errorMessage"?: string;
1268
+ /**
1269
+ * The `id` of a `<form>` element to associate this element with.
1270
+ */
1271
+ "form"?: string;
1095
1272
  /**
1096
1273
  * Helper text rendered below the textarea, associated via `aria-describedby`. Replaced by `errorMessage` when the textarea is invalid.
1097
1274
  */
@@ -1137,6 +1314,27 @@ declare namespace LocalJSX {
1137
1314
  */
1138
1315
  "value"?: string;
1139
1316
  }
1317
+ /**
1318
+ * Short help text shown on hover and on focus.
1319
+ * Both the trigger and the text come from the consumer's light DOM through
1320
+ * named slots. That is what makes the accessible association work: an
1321
+ * `aria-describedby` IDREF only resolves within a single tree, and slotted
1322
+ * nodes stay in the document tree even though they render inside the shadow
1323
+ * root. Keeping the text in the shadow root instead would need a reference
1324
+ * pointing into a shadow tree, which the platform does not allow — element
1325
+ * reflection only points outwards, and `referenceTarget` is not available yet.
1326
+ * The trigger has to be a natively focusable element (`<button>`, `<a>`,
1327
+ * `<input>`). A chucao component such as `ch-button` will not be described,
1328
+ * because `aria-*` set on a custom element host does not reach the native
1329
+ * element inside it — see the discussion in issue #47.
1330
+ */
1331
+ interface ChTooltip {
1332
+ /**
1333
+ * Which side of the trigger the bubble is placed on.
1334
+ * @default 'top'
1335
+ */
1336
+ "placement"?: ChTooltipPlacement;
1337
+ }
1140
1338
 
1141
1339
  interface ChAccordionAttributes {
1142
1340
  "value": string;
@@ -1185,6 +1383,11 @@ declare namespace LocalJSX {
1185
1383
  "variant": ChLinkVariant;
1186
1384
  "disabled": boolean;
1187
1385
  }
1386
+ interface ChModalAttributes {
1387
+ "open": boolean;
1388
+ "label": string;
1389
+ "closeLabel": string;
1390
+ }
1188
1391
  interface ChRadioAttributes {
1189
1392
  "label": string;
1190
1393
  "value": string;
@@ -1237,6 +1440,9 @@ declare namespace LocalJSX {
1237
1440
  "errorMessage": string;
1238
1441
  "invalid": boolean;
1239
1442
  }
1443
+ interface ChTooltipAttributes {
1444
+ "placement": ChTooltipPlacement;
1445
+ }
1240
1446
 
1241
1447
  interface IntrinsicElements {
1242
1448
  "ch-accordion": Omit<ChAccordion, keyof ChAccordionAttributes> & { [K in keyof ChAccordion & keyof ChAccordionAttributes]?: ChAccordion[K] } & { [K in keyof ChAccordion & keyof ChAccordionAttributes as `attr:${K}`]?: ChAccordionAttributes[K] } & { [K in keyof ChAccordion & keyof ChAccordionAttributes as `prop:${K}`]?: ChAccordion[K] };
@@ -1248,12 +1454,14 @@ declare namespace LocalJSX {
1248
1454
  "ch-divider": Omit<ChDivider, keyof ChDividerAttributes> & { [K in keyof ChDivider & keyof ChDividerAttributes]?: ChDivider[K] } & { [K in keyof ChDivider & keyof ChDividerAttributes as `attr:${K}`]?: ChDividerAttributes[K] } & { [K in keyof ChDivider & keyof ChDividerAttributes as `prop:${K}`]?: ChDivider[K] };
1249
1455
  "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] };
1250
1456
  "ch-link": Omit<ChLink, keyof ChLinkAttributes> & { [K in keyof ChLink & keyof ChLinkAttributes]?: ChLink[K] } & { [K in keyof ChLink & keyof ChLinkAttributes as `attr:${K}`]?: ChLinkAttributes[K] } & { [K in keyof ChLink & keyof ChLinkAttributes as `prop:${K}`]?: ChLink[K] };
1457
+ "ch-modal": Omit<ChModal, keyof ChModalAttributes> & { [K in keyof ChModal & keyof ChModalAttributes]?: ChModal[K] } & { [K in keyof ChModal & keyof ChModalAttributes as `attr:${K}`]?: ChModalAttributes[K] } & { [K in keyof ChModal & keyof ChModalAttributes as `prop:${K}`]?: ChModal[K] };
1251
1458
  "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] };
1252
1459
  "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] };
1253
1460
  "ch-spinner": Omit<ChSpinner, keyof ChSpinnerAttributes> & { [K in keyof ChSpinner & keyof ChSpinnerAttributes]?: ChSpinner[K] } & { [K in keyof ChSpinner & keyof ChSpinnerAttributes as `attr:${K}`]?: ChSpinnerAttributes[K] } & { [K in keyof ChSpinner & keyof ChSpinnerAttributes as `prop:${K}`]?: ChSpinner[K] };
1254
1461
  "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] };
1255
1462
  "ch-tabs": Omit<ChTabs, keyof ChTabsAttributes> & { [K in keyof ChTabs & keyof ChTabsAttributes]?: ChTabs[K] } & { [K in keyof ChTabs & keyof ChTabsAttributes as `attr:${K}`]?: ChTabsAttributes[K] } & { [K in keyof ChTabs & keyof ChTabsAttributes as `prop:${K}`]?: ChTabs[K] };
1256
1463
  "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] };
1464
+ "ch-tooltip": Omit<ChTooltip, keyof ChTooltipAttributes> & { [K in keyof ChTooltip & keyof ChTooltipAttributes]?: ChTooltip[K] } & { [K in keyof ChTooltip & keyof ChTooltipAttributes as `attr:${K}`]?: ChTooltipAttributes[K] } & { [K in keyof ChTooltip & keyof ChTooltipAttributes as `prop:${K}`]?: ChTooltip[K] };
1257
1465
  }
1258
1466
  }
1259
1467
  export { LocalJSX as JSX };
@@ -1277,6 +1485,23 @@ declare module "@stencil/core" {
1277
1485
  "ch-divider": LocalJSX.IntrinsicElements["ch-divider"] & JSXBase.HTMLAttributes<HTMLChDividerElement>;
1278
1486
  "ch-input": LocalJSX.IntrinsicElements["ch-input"] & JSXBase.HTMLAttributes<HTMLChInputElement>;
1279
1487
  "ch-link": LocalJSX.IntrinsicElements["ch-link"] & JSXBase.HTMLAttributes<HTMLChLinkElement>;
1488
+ /**
1489
+ * Modal dialog, built on the native `<dialog>` element and opened with
1490
+ * `showModal()`.
1491
+ * The browser therefore supplies the parts that are easy to get wrong: moving
1492
+ * focus into the dialog and returning it afterwards, marking the rest of the
1493
+ * document inert, `Escape` to close, the top layer, `::backdrop`, and the
1494
+ * implicit `dialog` role with `aria-modal="true"`. Notably it does not trap
1495
+ * focus, which is deliberate — the W3C APA group concluded a modal should let
1496
+ * keyboard users reach browser UI, so a hand-rolled trap would be less
1497
+ * correct, not more.
1498
+ * What the platform does not cover, and this component adds: locking the page
1499
+ * behind the dialog so it cannot scroll, and closing when the backdrop is
1500
+ * clicked. The latter is `closedby="any"` in the platform, which Safari does
1501
+ * not support yet, so it is implemented here for every browser alike rather
1502
+ * than only for some.
1503
+ */
1504
+ "ch-modal": LocalJSX.IntrinsicElements["ch-modal"] & JSXBase.HTMLAttributes<HTMLChModalElement>;
1280
1505
  "ch-radio": LocalJSX.IntrinsicElements["ch-radio"] & JSXBase.HTMLAttributes<HTMLChRadioElement>;
1281
1506
  "ch-select": LocalJSX.IntrinsicElements["ch-select"] & JSXBase.HTMLAttributes<HTMLChSelectElement>;
1282
1507
  /**
@@ -1290,6 +1515,21 @@ declare module "@stencil/core" {
1290
1515
  "ch-switch": LocalJSX.IntrinsicElements["ch-switch"] & JSXBase.HTMLAttributes<HTMLChSwitchElement>;
1291
1516
  "ch-tabs": LocalJSX.IntrinsicElements["ch-tabs"] & JSXBase.HTMLAttributes<HTMLChTabsElement>;
1292
1517
  "ch-textarea": LocalJSX.IntrinsicElements["ch-textarea"] & JSXBase.HTMLAttributes<HTMLChTextareaElement>;
1518
+ /**
1519
+ * Short help text shown on hover and on focus.
1520
+ * Both the trigger and the text come from the consumer's light DOM through
1521
+ * named slots. That is what makes the accessible association work: an
1522
+ * `aria-describedby` IDREF only resolves within a single tree, and slotted
1523
+ * nodes stay in the document tree even though they render inside the shadow
1524
+ * root. Keeping the text in the shadow root instead would need a reference
1525
+ * pointing into a shadow tree, which the platform does not allow — element
1526
+ * reflection only points outwards, and `referenceTarget` is not available yet.
1527
+ * The trigger has to be a natively focusable element (`<button>`, `<a>`,
1528
+ * `<input>`). A chucao component such as `ch-button` will not be described,
1529
+ * because `aria-*` set on a custom element host does not reach the native
1530
+ * element inside it — see the discussion in issue #47.
1531
+ */
1532
+ "ch-tooltip": LocalJSX.IntrinsicElements["ch-tooltip"] & JSXBase.HTMLAttributes<HTMLChTooltipElement>;
1293
1533
  }
1294
1534
  }
1295
1535
  }
@@ -3,6 +3,7 @@ export declare const colorBackgroundTopGlow = "#201e40";
3
3
  export declare const colorBackgroundBottomGlow = "#261226";
4
4
  export declare const colorSurfaceDefault = "rgba(32, 30, 64, 0.6)";
5
5
  export declare const colorSurfaceHover = "rgba(45, 212, 191, 0.08)";
6
+ export declare const colorScrimDefault = "rgba(0, 0, 0, 0.6)";
6
7
  export declare const colorBorderDefault = "rgba(255, 255, 255, 0.08)";
7
8
  export declare const colorBorderHover = "rgba(45, 212, 191, 0.3)";
8
9
  export declare const colorAccentDefault = "#2dd4bf";
@@ -72,6 +73,9 @@ export declare const tokens: {
72
73
  readonly default: "rgba(32, 30, 64, 0.6)";
73
74
  readonly hover: "rgba(45, 212, 191, 0.08)";
74
75
  };
76
+ readonly scrim: {
77
+ readonly default: "rgba(0, 0, 0, 0.6)";
78
+ };
75
79
  readonly border: {
76
80
  readonly default: "rgba(255, 255, 255, 0.08)";
77
81
  readonly hover: "rgba(45, 212, 191, 0.3)";
@@ -1,4 +1,4 @@
1
- export type ColorToken = 'color.background.base' | 'color.background.top-glow' | 'color.background.bottom-glow' | 'color.surface.default' | 'color.surface.hover' | 'color.border.default' | 'color.border.hover' | 'color.accent.default' | 'color.accent.hover' | 'color.accent.text' | 'color.status.positive' | 'color.status.positive-background' | 'color.status.warning' | 'color.status.warning-background' | 'color.text.primary' | 'color.text.secondary' | 'color.brand.huemul-dark' | 'color.brand.huemul-light' | 'color.brand.stroke';
1
+ export type ColorToken = 'color.background.base' | 'color.background.top-glow' | 'color.background.bottom-glow' | 'color.surface.default' | 'color.surface.hover' | 'color.scrim.default' | 'color.border.default' | 'color.border.hover' | 'color.accent.default' | 'color.accent.hover' | 'color.accent.text' | 'color.status.positive' | 'color.status.positive-background' | 'color.status.warning' | 'color.status.warning-background' | 'color.text.primary' | 'color.text.secondary' | 'color.brand.huemul-dark' | 'color.brand.huemul-light' | 'color.brand.stroke';
2
2
  export type TypographyToken = 'typography.body' | 'typography.heading' | 'typography.size.xs' | 'typography.size.sm' | 'typography.size.md' | 'typography.size.lg' | 'typography.size.xl' | 'typography.weight.regular' | 'typography.weight.semibold' | 'typography.weight.bold' | 'typography.tracking.badge';
3
3
  export type SpacingToken = 'spacing.2xs' | 'spacing.xs' | 'spacing.sm' | 'spacing.md' | 'spacing.lg' | 'spacing.xl' | 'spacing.2xl' | 'spacing.3xl' | 'spacing.4xl' | 'spacing.5xl' | 'spacing.6xl' | 'spacing.shift' | 'spacing.elevate';
4
4
  export type RadiusToken = 'radius.sm' | 'radius.md' | 'radius.pill';
@@ -3,7 +3,7 @@
3
3
  * Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
4
4
  */
5
5
  import type { EventName, StencilReactComponent } from '@stencil/react-output-target/runtime';
6
- import { type ChAccordionCustomEvent, type ChAlertCustomEvent, type ChButtonCustomEvent, type ChCheckboxCustomEvent, type ChInputCustomEvent, type ChLinkCustomEvent, type ChRadioCustomEvent, type ChSelectCustomEvent, type ChSwitchCustomEvent, type ChTabsCustomEvent, type ChTextareaCustomEvent } from "@devschile/chucao";
6
+ import { type ChAccordionCustomEvent, type ChAlertCustomEvent, type ChButtonCustomEvent, type ChCheckboxCustomEvent, type ChInputCustomEvent, type ChLinkCustomEvent, type ChModalCustomEvent, type ChRadioCustomEvent, type ChSelectCustomEvent, type ChSwitchCustomEvent, type ChTabsCustomEvent, type ChTextareaCustomEvent } from "@devschile/chucao";
7
7
  import type { Components } from "@devschile/chucao/dist/components";
8
8
  import { ChAccordion as ChAccordionElement } from "@devschile/chucao/dist/components/ch-accordion.js";
9
9
  import { ChAlert as ChAlertElement } from "@devschile/chucao/dist/components/ch-alert.js";
@@ -14,12 +14,14 @@ import { ChCheckbox as ChCheckboxElement } from "@devschile/chucao/dist/componen
14
14
  import { ChDivider as ChDividerElement } from "@devschile/chucao/dist/components/ch-divider.js";
15
15
  import { ChInput as ChInputElement } from "@devschile/chucao/dist/components/ch-input.js";
16
16
  import { ChLink as ChLinkElement } from "@devschile/chucao/dist/components/ch-link.js";
17
+ import { ChModal as ChModalElement } from "@devschile/chucao/dist/components/ch-modal.js";
17
18
  import { ChRadio as ChRadioElement } from "@devschile/chucao/dist/components/ch-radio.js";
18
19
  import { ChSelect as ChSelectElement } from "@devschile/chucao/dist/components/ch-select.js";
19
20
  import { ChSpinner as ChSpinnerElement } from "@devschile/chucao/dist/components/ch-spinner.js";
20
21
  import { ChSwitch as ChSwitchElement } from "@devschile/chucao/dist/components/ch-switch.js";
21
22
  import { ChTabs as ChTabsElement } from "@devschile/chucao/dist/components/ch-tabs.js";
22
23
  import { ChTextarea as ChTextareaElement } from "@devschile/chucao/dist/components/ch-textarea.js";
24
+ import { ChTooltip as ChTooltipElement } from "@devschile/chucao/dist/components/ch-tooltip.js";
23
25
  export type ChAccordionEvents = {
24
26
  onChChange: EventName<ChAccordionCustomEvent<string | undefined>>;
25
27
  };
@@ -51,6 +53,11 @@ export type ChLinkEvents = {
51
53
  onChClick: EventName<ChLinkCustomEvent<MouseEvent>>;
52
54
  };
53
55
  export declare const ChLink: StencilReactComponent<ChLinkElement, ChLinkEvents, Components.ChLink>;
56
+ export type ChModalEvents = {
57
+ onChOpen: EventName<ChModalCustomEvent<void>>;
58
+ onChClose: EventName<ChModalCustomEvent<void>>;
59
+ };
60
+ export declare const ChModal: StencilReactComponent<ChModalElement, ChModalEvents, Components.ChModal>;
54
61
  export type ChRadioEvents = {
55
62
  onChChange: EventName<ChRadioCustomEvent<string>>;
56
63
  };
@@ -74,3 +81,5 @@ export type ChTextareaEvents = {
74
81
  onChChange: EventName<ChTextareaCustomEvent<string>>;
75
82
  };
76
83
  export declare const ChTextarea: StencilReactComponent<ChTextareaElement, ChTextareaEvents, Components.ChTextarea>;
84
+ export type ChTooltipEvents = NonNullable<unknown>;
85
+ export declare const ChTooltip: StencilReactComponent<ChTooltipElement, ChTooltipEvents, Components.ChTooltip>;
@@ -10,12 +10,14 @@ import { ChCheckbox as ChCheckboxElement, defineCustomElement as defineChCheckbo
10
10
  import { ChDivider as ChDividerElement, defineCustomElement as defineChDivider } from "@devschile/chucao/dist/components/ch-divider.js";
11
11
  import { ChInput as ChInputElement, defineCustomElement as defineChInput } from "@devschile/chucao/dist/components/ch-input.js";
12
12
  import { ChLink as ChLinkElement, defineCustomElement as defineChLink } from "@devschile/chucao/dist/components/ch-link.js";
13
+ import { ChModal as ChModalElement, defineCustomElement as defineChModal } from "@devschile/chucao/dist/components/ch-modal.js";
13
14
  import { ChRadio as ChRadioElement, defineCustomElement as defineChRadio } from "@devschile/chucao/dist/components/ch-radio.js";
14
15
  import { ChSelect as ChSelectElement, defineCustomElement as defineChSelect } from "@devschile/chucao/dist/components/ch-select.js";
15
16
  import { ChSpinner as ChSpinnerElement, defineCustomElement as defineChSpinner } from "@devschile/chucao/dist/components/ch-spinner.js";
16
17
  import { ChSwitch as ChSwitchElement, defineCustomElement as defineChSwitch } from "@devschile/chucao/dist/components/ch-switch.js";
17
18
  import { ChTabs as ChTabsElement, defineCustomElement as defineChTabs } from "@devschile/chucao/dist/components/ch-tabs.js";
18
19
  import { ChTextarea as ChTextareaElement, defineCustomElement as defineChTextarea } from "@devschile/chucao/dist/components/ch-textarea.js";
20
+ import { ChTooltip as ChTooltipElement, defineCustomElement as defineChTooltip } from "@devschile/chucao/dist/components/ch-tooltip.js";
19
21
  export const ChAccordion = /*@__PURE__*/ createComponent({
20
22
  tagName: 'ch-accordion',
21
23
  elementClass: ChAccordionElement,
@@ -91,6 +93,17 @@ export const ChLink = /*@__PURE__*/ createComponent({
91
93
  events: { onChClick: 'chClick' },
92
94
  defineCustomElement: defineChLink
93
95
  });
96
+ export const ChModal = /*@__PURE__*/ createComponent({
97
+ tagName: 'ch-modal',
98
+ elementClass: ChModalElement,
99
+ // @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
100
+ react: React,
101
+ events: {
102
+ onChOpen: 'chOpen',
103
+ onChClose: 'chClose'
104
+ },
105
+ defineCustomElement: defineChModal
106
+ });
94
107
  export const ChRadio = /*@__PURE__*/ createComponent({
95
108
  tagName: 'ch-radio',
96
109
  elementClass: ChRadioElement,
@@ -142,3 +155,11 @@ export const ChTextarea = /*@__PURE__*/ createComponent({
142
155
  },
143
156
  defineCustomElement: defineChTextarea
144
157
  });
158
+ export const ChTooltip = /*@__PURE__*/ createComponent({
159
+ tagName: 'ch-tooltip',
160
+ elementClass: ChTooltipElement,
161
+ // @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
162
+ react: React,
163
+ events: {},
164
+ defineCustomElement: defineChTooltip
165
+ });
@@ -11,7 +11,7 @@ import type { EventName, StencilReactComponent } from '@stencil/react-output-tar
11
11
  import { createComponent } from '@stencil/react-output-target/runtime';
12
12
  import React from 'react';
13
13
 
14
- import { type ChAccordionCustomEvent, type ChAlertCustomEvent, type ChButtonCustomEvent, type ChCheckboxCustomEvent, type ChInputCustomEvent, type ChLinkCustomEvent, type ChRadioCustomEvent, type ChSelectCustomEvent, type ChSwitchCustomEvent, type ChTabsCustomEvent, type ChTextareaCustomEvent } from "@devschile/chucao";
14
+ import { type ChAccordionCustomEvent, type ChAlertCustomEvent, type ChButtonCustomEvent, type ChCheckboxCustomEvent, type ChInputCustomEvent, type ChLinkCustomEvent, type ChModalCustomEvent, type ChRadioCustomEvent, type ChSelectCustomEvent, type ChSwitchCustomEvent, type ChTabsCustomEvent, type ChTextareaCustomEvent } from "@devschile/chucao";
15
15
  import type { Components } from "@devschile/chucao/dist/components";
16
16
  import { ChAccordion as ChAccordionElement, defineCustomElement as defineChAccordion } from "@devschile/chucao/dist/components/ch-accordion.js";
17
17
  import { ChAlert as ChAlertElement, defineCustomElement as defineChAlert } from "@devschile/chucao/dist/components/ch-alert.js";
@@ -22,12 +22,14 @@ import { ChCheckbox as ChCheckboxElement, defineCustomElement as defineChCheckbo
22
22
  import { ChDivider as ChDividerElement, defineCustomElement as defineChDivider } from "@devschile/chucao/dist/components/ch-divider.js";
23
23
  import { ChInput as ChInputElement, defineCustomElement as defineChInput } from "@devschile/chucao/dist/components/ch-input.js";
24
24
  import { ChLink as ChLinkElement, defineCustomElement as defineChLink } from "@devschile/chucao/dist/components/ch-link.js";
25
+ import { ChModal as ChModalElement, defineCustomElement as defineChModal } from "@devschile/chucao/dist/components/ch-modal.js";
25
26
  import { ChRadio as ChRadioElement, defineCustomElement as defineChRadio } from "@devschile/chucao/dist/components/ch-radio.js";
26
27
  import { ChSelect as ChSelectElement, defineCustomElement as defineChSelect } from "@devschile/chucao/dist/components/ch-select.js";
27
28
  import { ChSpinner as ChSpinnerElement, defineCustomElement as defineChSpinner } from "@devschile/chucao/dist/components/ch-spinner.js";
28
29
  import { ChSwitch as ChSwitchElement, defineCustomElement as defineChSwitch } from "@devschile/chucao/dist/components/ch-switch.js";
29
30
  import { ChTabs as ChTabsElement, defineCustomElement as defineChTabs } from "@devschile/chucao/dist/components/ch-tabs.js";
30
31
  import { ChTextarea as ChTextareaElement, defineCustomElement as defineChTextarea } from "@devschile/chucao/dist/components/ch-textarea.js";
32
+ import { ChTooltip as ChTooltipElement, defineCustomElement as defineChTooltip } from "@devschile/chucao/dist/components/ch-tooltip.js";
31
33
 
32
34
  export type ChAccordionEvents = { onChChange: EventName<ChAccordionCustomEvent<string | undefined>> };
33
35
 
@@ -134,6 +136,23 @@ export const ChLink: StencilReactComponent<ChLinkElement, ChLinkEvents, Componen
134
136
  defineCustomElement: defineChLink
135
137
  });
136
138
 
139
+ export type ChModalEvents = {
140
+ onChOpen: EventName<ChModalCustomEvent<void>>,
141
+ onChClose: EventName<ChModalCustomEvent<void>>
142
+ };
143
+
144
+ export const ChModal: StencilReactComponent<ChModalElement, ChModalEvents, Components.ChModal> = /*@__PURE__*/ createComponent<ChModalElement, ChModalEvents, Components.ChModal>({
145
+ tagName: 'ch-modal',
146
+ elementClass: ChModalElement,
147
+ // @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
148
+ react: React,
149
+ events: {
150
+ onChOpen: 'chOpen',
151
+ onChClose: 'chClose'
152
+ } as ChModalEvents,
153
+ defineCustomElement: defineChModal
154
+ });
155
+
137
156
  export type ChRadioEvents = { onChChange: EventName<ChRadioCustomEvent<string>> };
138
157
 
139
158
  export const ChRadio: StencilReactComponent<ChRadioElement, ChRadioEvents, Components.ChRadio> = /*@__PURE__*/ createComponent<ChRadioElement, ChRadioEvents, Components.ChRadio>({
@@ -205,3 +224,14 @@ export const ChTextarea: StencilReactComponent<ChTextareaElement, ChTextareaEven
205
224
  } as ChTextareaEvents,
206
225
  defineCustomElement: defineChTextarea
207
226
  });
227
+
228
+ export type ChTooltipEvents = NonNullable<unknown>;
229
+
230
+ export const ChTooltip: StencilReactComponent<ChTooltipElement, ChTooltipEvents, Components.ChTooltip> = /*@__PURE__*/ createComponent<ChTooltipElement, ChTooltipEvents, Components.ChTooltip>({
231
+ tagName: 'ch-tooltip',
232
+ elementClass: ChTooltipElement,
233
+ // @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
234
+ react: React,
235
+ events: {} as ChTooltipEvents,
236
+ defineCustomElement: defineChTooltip
237
+ });
@@ -9,9 +9,11 @@ export declare const ChCheckbox: StencilVueComponent<JSX.ChCheckbox>;
9
9
  export declare const ChDivider: StencilVueComponent<JSX.ChDivider>;
10
10
  export declare const ChInput: StencilVueComponent<JSX.ChInput>;
11
11
  export declare const ChLink: StencilVueComponent<JSX.ChLink>;
12
+ export declare const ChModal: StencilVueComponent<JSX.ChModal>;
12
13
  export declare const ChRadio: StencilVueComponent<JSX.ChRadio>;
13
14
  export declare const ChSelect: StencilVueComponent<JSX.ChSelect>;
14
15
  export declare const ChSpinner: StencilVueComponent<JSX.ChSpinner>;
15
16
  export declare const ChSwitch: StencilVueComponent<JSX.ChSwitch>;
16
17
  export declare const ChTabs: StencilVueComponent<JSX.ChTabs>;
17
18
  export declare const ChTextarea: StencilVueComponent<JSX.ChTextarea>;
19
+ export declare const ChTooltip: StencilVueComponent<JSX.ChTooltip>;
package/dist-vue/index.js CHANGED
@@ -11,12 +11,14 @@ import { defineCustomElement as defineChCheckbox } from '@devschile/chucao/dist/
11
11
  import { defineCustomElement as defineChDivider } from '@devschile/chucao/dist/components/ch-divider.js';
12
12
  import { defineCustomElement as defineChInput } from '@devschile/chucao/dist/components/ch-input.js';
13
13
  import { defineCustomElement as defineChLink } from '@devschile/chucao/dist/components/ch-link.js';
14
+ import { defineCustomElement as defineChModal } from '@devschile/chucao/dist/components/ch-modal.js';
14
15
  import { defineCustomElement as defineChRadio } from '@devschile/chucao/dist/components/ch-radio.js';
15
16
  import { defineCustomElement as defineChSelect } from '@devschile/chucao/dist/components/ch-select.js';
16
17
  import { defineCustomElement as defineChSpinner } from '@devschile/chucao/dist/components/ch-spinner.js';
17
18
  import { defineCustomElement as defineChSwitch } from '@devschile/chucao/dist/components/ch-switch.js';
18
19
  import { defineCustomElement as defineChTabs } from '@devschile/chucao/dist/components/ch-tabs.js';
19
20
  import { defineCustomElement as defineChTextarea } from '@devschile/chucao/dist/components/ch-textarea.js';
21
+ import { defineCustomElement as defineChTooltip } from '@devschile/chucao/dist/components/ch-tooltip.js';
20
22
  export const ChAccordion = /*@__PURE__*/ defineContainer('ch-accordion', defineChAccordion, [
21
23
  'items',
22
24
  'value',
@@ -86,6 +88,16 @@ export const ChLink = /*@__PURE__*/ defineContainer('ch-link', defineChLink, [
86
88
  ], [
87
89
  'chClick'
88
90
  ]);
91
+ export const ChModal = /*@__PURE__*/ defineContainer('ch-modal', defineChModal, [
92
+ 'open',
93
+ 'label',
94
+ 'closeLabel',
95
+ 'chOpen',
96
+ 'chClose'
97
+ ], [
98
+ 'chOpen',
99
+ 'chClose'
100
+ ]);
89
101
  export const ChRadio = /*@__PURE__*/ defineContainer('ch-radio', defineChRadio, [
90
102
  'label',
91
103
  'options',
@@ -158,3 +170,6 @@ export const ChTextarea = /*@__PURE__*/ defineContainer('ch-textarea', defineChT
158
170
  'chInput',
159
171
  'chChange'
160
172
  ]);
173
+ export const ChTooltip = /*@__PURE__*/ defineContainer('ch-tooltip', defineChTooltip, [
174
+ 'placement'
175
+ ]);