@devschile/chucao 1.7.0 → 1.8.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 (124) hide show
  1. package/README.md +13 -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-9a614e82.entry.js → p-13ab5f9a.entry.js} +2 -2
  7. package/dist/chucao/{p-053d58a4.entry.js → p-1cc7042e.entry.js} +2 -2
  8. package/dist/chucao/{p-c598f978.entry.js → p-23c5220b.entry.js} +2 -2
  9. package/dist/chucao/p-2d7e81b2.entry.js +2 -0
  10. package/dist/chucao/p-2d7e81b2.entry.js.map +1 -0
  11. package/dist/chucao/p-421cda05.entry.js +2 -0
  12. package/dist/chucao/{p-0305f2eb.entry.js.map → p-421cda05.entry.js.map} +1 -1
  13. package/dist/chucao/p-Bvah_WQV.js +3 -0
  14. package/dist/chucao/p-Bvah_WQV.js.map +1 -0
  15. package/dist/chucao/{p-ad3206a2.entry.js → p-c16b18b7.entry.js} +2 -2
  16. package/dist/chucao/p-cbb2b478.entry.js +2 -0
  17. package/dist/chucao/p-cbb2b478.entry.js.map +1 -0
  18. package/dist/chucao/{p-20492b73.entry.js → p-cfb6db53.entry.js} +2 -2
  19. package/dist/chucao/{p-488c7838.entry.js → p-df73f786.entry.js} +2 -2
  20. package/dist/chucao/{p-fe8e9537.entry.js → p-e8fe65bb.entry.js} +2 -2
  21. package/dist/cjs/ch-accordion.cjs.entry.js +1 -1
  22. package/dist/cjs/ch-alert_8.cjs.entry.js +4 -4
  23. package/dist/cjs/ch-checkbox.cjs.entry.js +2 -2
  24. package/dist/cjs/ch-divider.cjs.entry.js +1 -1
  25. package/dist/cjs/ch-link.cjs.entry.js +1 -1
  26. package/dist/cjs/ch-modal.cjs.entry.js +167 -0
  27. package/dist/cjs/ch-modal.cjs.entry.js.map +1 -0
  28. package/dist/cjs/ch-radio.cjs.entry.js +1 -1
  29. package/dist/cjs/ch-tabs.cjs.entry.js +1 -1
  30. package/dist/cjs/ch-textarea.cjs.entry.js +2 -2
  31. package/dist/cjs/ch-tooltip.cjs.entry.js +82 -0
  32. package/dist/cjs/ch-tooltip.cjs.entry.js.map +1 -0
  33. package/dist/cjs/chucao.cjs.js +2 -2
  34. package/dist/cjs/{index-ls4U227d.js → index-DMeDkSQU.js} +148 -5
  35. package/dist/cjs/index-DMeDkSQU.js.map +1 -0
  36. package/dist/cjs/index.cjs.js +5 -0
  37. package/dist/cjs/index.cjs.js.map +1 -1
  38. package/dist/cjs/loader.cjs.js +2 -2
  39. package/dist/collection/collection-manifest.json +2 -0
  40. package/dist/collection/components/ch-card/ch-card.js +1 -1
  41. package/dist/collection/components/ch-checkbox/ch-checkbox.js +1 -1
  42. package/dist/collection/components/ch-input/ch-input.js +1 -1
  43. package/dist/collection/components/ch-modal/ch-modal.css +69 -0
  44. package/dist/collection/components/ch-modal/ch-modal.js +278 -0
  45. package/dist/collection/components/ch-modal/ch-modal.js.map +1 -0
  46. package/dist/collection/components/ch-switch/ch-switch.js +1 -1
  47. package/dist/collection/components/ch-textarea/ch-textarea.js +1 -1
  48. package/dist/collection/components/ch-tooltip/ch-tooltip.css +100 -0
  49. package/dist/collection/components/ch-tooltip/ch-tooltip.js +168 -0
  50. package/dist/collection/components/ch-tooltip/ch-tooltip.js.map +1 -0
  51. package/dist/collection/tokens/tokens.js +4 -0
  52. package/dist/collection/tokens/tokens.js.map +1 -1
  53. package/dist/collection/tokens/types.js.map +1 -1
  54. package/dist/components/ch-accordion.js +1 -1
  55. package/dist/components/ch-alert.js +1 -1
  56. package/dist/components/ch-badge.js +1 -1
  57. package/dist/components/ch-button.js +1 -1
  58. package/dist/components/ch-card.js +1 -1
  59. package/dist/components/ch-checkbox.js +1 -1
  60. package/dist/components/ch-divider.js +1 -1
  61. package/dist/components/ch-input.js +1 -1
  62. package/dist/components/ch-link.js +1 -1
  63. package/dist/components/ch-modal.d.ts +11 -0
  64. package/dist/components/ch-modal.js +2 -0
  65. package/dist/components/ch-modal.js.map +1 -0
  66. package/dist/components/ch-radio.js +1 -1
  67. package/dist/components/ch-select.js +1 -1
  68. package/dist/components/ch-spinner.js +1 -1
  69. package/dist/components/ch-switch.js +1 -1
  70. package/dist/components/ch-tabs.js +1 -1
  71. package/dist/components/ch-textarea.js +1 -1
  72. package/dist/components/ch-tooltip.d.ts +11 -0
  73. package/dist/components/ch-tooltip.js +2 -0
  74. package/dist/components/ch-tooltip.js.map +1 -0
  75. package/dist/components/index.js +1 -1
  76. package/dist/components/index.js.map +1 -1
  77. package/dist/components/p-hyy-cLgi.js +2 -0
  78. package/dist/components/p-hyy-cLgi.js.map +1 -0
  79. package/dist/esm/ch-accordion.entry.js +1 -1
  80. package/dist/esm/ch-alert_8.entry.js +4 -4
  81. package/dist/esm/ch-checkbox.entry.js +2 -2
  82. package/dist/esm/ch-divider.entry.js +1 -1
  83. package/dist/esm/ch-link.entry.js +1 -1
  84. package/dist/esm/ch-modal.entry.js +165 -0
  85. package/dist/esm/ch-modal.entry.js.map +1 -0
  86. package/dist/esm/ch-radio.entry.js +1 -1
  87. package/dist/esm/ch-tabs.entry.js +1 -1
  88. package/dist/esm/ch-textarea.entry.js +2 -2
  89. package/dist/esm/ch-tooltip.entry.js +80 -0
  90. package/dist/esm/ch-tooltip.entry.js.map +1 -0
  91. package/dist/esm/chucao.js +3 -3
  92. package/dist/esm/{index-pfWAsOzE.js → index-Bvah_WQV.js} +148 -6
  93. package/dist/esm/index-Bvah_WQV.js.map +1 -0
  94. package/dist/esm/index.js +5 -1
  95. package/dist/esm/index.js.map +1 -1
  96. package/dist/esm/loader.js +3 -3
  97. package/dist/types/components/ch-modal/ch-modal.d.ts +67 -0
  98. package/dist/types/components/ch-tooltip/ch-tooltip.d.ts +47 -0
  99. package/dist/types/components.d.ts +216 -0
  100. package/dist/types/tokens/tokens.d.ts +4 -0
  101. package/dist/types/tokens/types.d.ts +1 -1
  102. package/dist-react/components.d.ts +10 -1
  103. package/dist-react/components.js +21 -0
  104. package/dist-react/components.ts +31 -1
  105. package/dist-vue/index.d.ts +2 -0
  106. package/dist-vue/index.js +15 -0
  107. package/dist-vue/index.ts +19 -0
  108. package/hydrate/index.js +409 -8
  109. package/hydrate/index.mjs +409 -8
  110. package/package.json +1 -1
  111. package/dist/chucao/p-0305f2eb.entry.js +0 -2
  112. package/dist/chucao/p-pfWAsOzE.js +0 -3
  113. package/dist/chucao/p-pfWAsOzE.js.map +0 -1
  114. package/dist/cjs/index-ls4U227d.js.map +0 -1
  115. package/dist/components/p-ONE3uKkF.js +0 -2
  116. package/dist/components/p-ONE3uKkF.js.map +0 -1
  117. package/dist/esm/index-pfWAsOzE.js.map +0 -1
  118. /package/dist/chucao/{p-9a614e82.entry.js.map → p-13ab5f9a.entry.js.map} +0 -0
  119. /package/dist/chucao/{p-053d58a4.entry.js.map → p-1cc7042e.entry.js.map} +0 -0
  120. /package/dist/chucao/{p-c598f978.entry.js.map → p-23c5220b.entry.js.map} +0 -0
  121. /package/dist/chucao/{p-ad3206a2.entry.js.map → p-c16b18b7.entry.js.map} +0 -0
  122. /package/dist/chucao/{p-20492b73.entry.js.map → p-cfb6db53.entry.js.map} +0 -0
  123. /package/dist/chucao/{p-488c7838.entry.js.map → p-df73f786.entry.js.map} +0 -0
  124. /package/dist/chucao/{p-fe8e9537.entry.js.map → p-e8fe65bb.entry.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host } from './index-pfWAsOzE.js';
1
+ import { r as registerInstance, c as createEvent, h, H as Host } from './index-Bvah_WQV.js';
2
2
 
3
3
  const chAccordionCss = () => `:host{display:block}.item{background:var(--surface);border:var(--border-width) solid var(--border);border-radius:var(--radius);transition:border-color var(--duration-normal) var(--easing-default)}.item+.item{margin-top:var(--spacing-md)}.item--open{border-color:var(--border-hover)}.item-head{margin:0}.item-toggle{display:flex;align-items:center;justify-content:space-between;gap:var(--spacing-lg);width:100%;padding:var(--spacing-2xl) var(--spacing-3xl);background:transparent;border:none;color:var(--text);font-family:inherit;font-size:inherit;font-weight:var(--typography-weight-semibold);cursor:pointer}.item-toggle::after{content:'';width:var(--spacing-md);height:var(--spacing-md);flex-shrink:0;border-right:var(--border-width) solid var(--text-muted);border-bottom:var(--border-width) solid var(--text-muted);transform:rotate(45deg);transition:transform var(--duration-normal) var(--easing-default)}.item--open .item-toggle::after{transform:rotate(-135deg)}.item-toggle:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}.item-toggle:disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.item-panel{padding:0 var(--spacing-3xl) var(--spacing-3xl);color:var(--text-muted)}.item-panel[hidden]{display:none}`;
4
4
 
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host } from './index-pfWAsOzE.js';
1
+ import { r as registerInstance, c as createEvent, h, H as Host } from './index-Bvah_WQV.js';
2
2
 
3
3
  const chAlertCss = () => `:host{display:block}.alert{display:flex;align-items:flex-start;gap:var(--spacing-2xl);padding:var(--spacing-2xl) var(--spacing-3xl);border:var(--border-width) solid transparent;border-radius:var(--radius);font-size:var(--typography-size-sm);line-height:1.5}.alert-content{flex:1;min-width:0;overflow-wrap:anywhere}.alert--default{color:var(--text);background:var(--surface);border-color:var(--border)}.alert--positive{color:var(--color-status-positive);background:var(--color-status-positive-background);border-color:var(--color-status-positive)}.alert--warning{color:var(--color-status-warning);background:var(--color-status-warning-background);border-color:var(--color-status-warning)}.alert-dismiss{display:inline-flex;align-items:center;justify-content:center;flex:none;padding:var(--spacing-2xs) var(--spacing-md);border:0;border-radius:var(--radius);background:none;color:inherit;cursor:pointer;font-family:var(--font-heading);font-size:var(--typography-size-lg);line-height:1;transition:background-color var(--duration-normal) var(--easing-default)}.alert-dismiss:hover{background:var(--surface-hover)}.alert-dismiss:focus-visible{outline:var(--focus-outline-width) solid currentColor;outline-offset:var(--focus-outline-offset)}@media (pointer: coarse){.alert-dismiss{min-width:44px;min-height:44px}}@media (prefers-reduced-motion: reduce){.alert-dismiss{transition:none}}`;
4
4
 
@@ -93,7 +93,7 @@ const ChCard = class {
93
93
  registerInstance(this, hostRef);
94
94
  }
95
95
  render() {
96
- return (h(Host, { key: 'de99971fb6a845e8ca6c406d669abd64f7e45068' }, h("div", { key: '6dcae41e636af83221f710212ed1ec16a21dcdde', class: "card" }, h("slot", { key: 'b2a1354d297ce45c97f0ed4378f5710b4b0ac13d' }))));
96
+ return (h(Host, { key: '1541ba4361c996716356fb87cdcc73b1260d4c6a' }, h("div", { key: '924070eeb79f6c8f8e6362772bbab0dcc1c6f315', class: "card" }, h("slot", { key: '2fde36426395a519cb1ebe265ba0eef3aaf6ff38' }))));
97
97
  }
98
98
  };
99
99
  ChCard.style = chCardCss();
@@ -178,7 +178,7 @@ const ChInput = class {
178
178
  return undefined;
179
179
  }
180
180
  render() {
181
- return (h(Host, { key: '5587a60f279a66d0610ab0dd5f9e64510fe47313' }, this.label && (h("label", { key: 'cc4d3718b5eba3f87dd91be2be2d8bfcccbad7db', class: "label", htmlFor: this.inputId }, this.label)), h("input", { key: 'a40ed7693272f9bdbcec81afa3f6f81ea6aa3dac', id: this.label ? this.inputId : undefined, class: { 'input': true, 'input--invalid': this.invalid }, type: this.type, name: this.name, placeholder: this.placeholder, disabled: this.disabled, required: this.required, value: this.value, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onInput: this.handleInput, onChange: this.handleChange }), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: 'b574a65d362071b4528f87013a5349f63f0b1768', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: '061d995029cd884daa9f7c228ade06036369bb24', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
181
+ return (h(Host, { key: '56ef5eab354235c89214be28263cde91168f5dee' }, this.label && (h("label", { key: '745fe11f607591d1c571dcf7d9429d834dfa4f2b', class: "label", htmlFor: this.inputId }, this.label)), h("input", { key: '18739cebe47aa1130b55fa5aaf184a1f3fad88d2', id: this.label ? this.inputId : undefined, class: { 'input': true, 'input--invalid': this.invalid }, type: this.type, name: this.name, placeholder: this.placeholder, disabled: this.disabled, required: this.required, value: this.value, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onInput: this.handleInput, onChange: this.handleChange }), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: '60a43287f6329db3f4b27ad882300fced0925645', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: 'ea18e90000f1a244cbe51126441b5d260562e07a', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
182
182
  }
183
183
  };
184
184
  ChInput.style = chInputCss();
@@ -352,7 +352,7 @@ const ChSwitch = class {
352
352
  return undefined;
353
353
  }
354
354
  render() {
355
- return (h(Host, { key: 'a128c7c2e1585f9a71518600938ec9a3e9d8a4d4' }, h("label", { key: '36f4c5cba4e01a50d2aef68c8114ea77991cd11d', class: { 'control': true, 'control--disabled': this.disabled }, htmlFor: this.switchId }, h("input", { key: '9fbf7fc62f8e9a164c3eceb4981288d848e14165', id: this.switchId, class: { 'input': true, 'input--invalid': this.invalid }, type: "checkbox", role: "switch", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled, required: this.required, "aria-checked": this.checked ? 'true' : 'false', "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }), h("span", { key: 'b5e6e89d183871b88f423c83097c7aaed3a62fe8', class: "track" }, h("span", { key: 'cd092c415e40b88f31a72c8f07df0a7d8e09f03e', class: "thumb" })), this.label && h("span", { key: '58032729eae055013e19e8ac3d2acac959e0f333', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: '37ee421f7d76991d1d040a04402f1da4eaf22397', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: '5ecaa144451f07ecce26e839f757ee53fbdc7265', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
355
+ return (h(Host, { key: 'f95f9b724e37771ea3949ff569881dc1eff370a1' }, h("label", { key: '878c3c47e380356a3b79e79fdd135df627ce37a6', class: { 'control': true, 'control--disabled': this.disabled }, htmlFor: this.switchId }, h("input", { key: '14ee6041b8aeb4115db1f7ca9c542314651f34ea', id: this.switchId, class: { 'input': true, 'input--invalid': this.invalid }, type: "checkbox", role: "switch", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled, required: this.required, "aria-checked": this.checked ? 'true' : 'false', "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }), h("span", { key: '0d58863f220b6e9f04babd6231a35dea039a41a2', class: "track" }, h("span", { key: '588617f6bb1c61168b860c4b2863892828fd5df5', class: "thumb" })), this.label && h("span", { key: '530e64cc85761e91a019431f977bb9d2d8e86e27', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: '71ffd6b56a753673f9d5663054a217e250363ce1', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: '63f9965c30d8cd2820554de31ac7edc364aee22b', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
356
356
  }
357
357
  };
358
358
  ChSwitch.style = chSwitchCss();
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host } from './index-pfWAsOzE.js';
1
+ import { r as registerInstance, c as createEvent, h, H as Host } from './index-Bvah_WQV.js';
2
2
 
3
3
  const chCheckboxCss = () => `:host{display:inline-block}.control{display:inline-flex;align-items:center;gap:var(--spacing-lg);cursor:pointer}.control--disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.input{appearance:none;-webkit-appearance:none;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--spacing-4xl);height:var(--spacing-4xl);margin:0;flex-shrink:0;border:var(--border-width) solid var(--border);border-radius:var(--radius-sm);background:var(--surface);cursor:pointer;transition:border-color var(--duration-normal) var(--easing-default), background-color var(--duration-normal) var(--easing-default), box-shadow var(--duration-normal) var(--easing-default)}.input:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}.input:checked{border-color:var(--accent);background:var(--accent)}.input:checked::before{content:'';width:var(--spacing-xs);height:var(--spacing-lg);border:solid var(--color-accent-text);border-width:0 var(--spacing-shift) var(--spacing-shift) 0;transform:rotate(45deg);margin-top:calc(-1 * var(--spacing-2xs))}.input--invalid{border-color:var(--color-status-warning)}.input--invalid:focus-visible{outline-color:var(--color-status-warning)}.label-text{color:var(--text)}.hint,.error{margin:var(--spacing-sm) 0 0;font-size:var(--typography-size-sm);color:var(--text-muted)}.error{color:var(--color-status-warning)}`;
4
4
 
@@ -67,7 +67,7 @@ const ChCheckbox = class {
67
67
  return undefined;
68
68
  }
69
69
  render() {
70
- return (h(Host, { key: '4675fecfe18e63c55133ffb78e6a6c0548804e1b' }, h("label", { key: '334ddbcfd3ef1640d84dc751a127a3fb6d69e722', class: { 'control': true, 'control--disabled': this.disabled }, htmlFor: this.checkboxId }, h("input", { key: 'a251b722681f33d3c96ce04a0ce915b6be71a81c', id: this.checkboxId, class: { 'input': true, 'input--invalid': this.invalid }, type: "checkbox", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled, required: this.required, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }), this.label && h("span", { key: '2aa179c9467a1b22e7c37b16da44e677cc10bd69', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: 'd31d7b78cc4912b4441b0ab17eb44ed22ef67e6e', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: 'ae43049c16c7c61322785863d0c6e2e90e79d954', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
70
+ return (h(Host, { key: '130d1bf88ae8c73befe7ac288a0d4b7113fd73f7' }, h("label", { key: '6a3dd5bd889a9b41dda934b7c804de3ff2a63584', class: { 'control': true, 'control--disabled': this.disabled }, htmlFor: this.checkboxId }, h("input", { key: '9978d057782e3cf31a2fa7b4042b5d070e015be0', id: this.checkboxId, class: { 'input': true, 'input--invalid': this.invalid }, type: "checkbox", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled, required: this.required, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }), this.label && h("span", { key: '8b12d266d0693b6ad710c5a72df4b3c138435ef1', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: '7aa3b14ccdfb216d8bc831c820e5438e166dab1c', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: 'aeacbc8e1f98162182149e55fde0d8d588c97fa4', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
71
71
  }
72
72
  };
73
73
  ChCheckbox.style = chCheckboxCss();
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h, H as Host } from './index-pfWAsOzE.js';
1
+ import { r as registerInstance, h, H as Host } from './index-Bvah_WQV.js';
2
2
 
3
3
  const chDividerCss = () => `:host{display:block}:host(.divider--vertical){display:inline-block;height:100%;align-self:stretch}.divider{margin:0;border:none;background:var(--border)}.divider--horizontal{width:100%;height:var(--border-width)}.divider--vertical{width:var(--border-width);height:100%}`;
4
4
 
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host } from './index-pfWAsOzE.js';
1
+ import { r as registerInstance, c as createEvent, h, H as Host } from './index-Bvah_WQV.js';
2
2
 
3
3
  const chLinkCss = () => `:host{display:inline}.link{color:var(--accent);font-weight:var(--typography-weight-semibold);text-decoration:var(--ch-link-text-decoration, underline);text-decoration-thickness:var(--border-width);text-underline-offset:var(--spacing-shift);border-radius:var(--radius-sm);transition:color var(--duration-normal) var(--easing-default), opacity var(--duration-normal) var(--easing-default)}.link:hover{color:var(--accent-hover)}.link:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}.link--muted{color:var(--text-muted);text-decoration:none}.link--muted:hover{color:var(--text)}.link--disabled{color:var(--text-muted);text-decoration:none;opacity:var(--opacity-disabled);cursor:not-allowed}`;
4
4
 
@@ -0,0 +1,165 @@
1
+ import { r as registerInstance, c as createEvent, h, H as Host } from './index-Bvah_WQV.js';
2
+
3
+ const chModalCss = () => `.modal{box-sizing:border-box;max-width:min(32rem, calc(100vw - var(--spacing-6xl)));max-height:calc(100vh - var(--spacing-6xl));padding:var(--spacing-5xl);border:var(--border-width) solid var(--border);border-radius:var(--radius);background:var(--color-background-base);color:var(--text);font-family:var(--font-body);font-size:var(--typography-size-md)}.modal::backdrop{background:var(--color-scrim-default);backdrop-filter:blur(var(--effect-blur))}.modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--spacing-2xl);margin-bottom:var(--spacing-2xl)}.modal-body{overflow-y:auto}.modal-close{display:inline-flex;align-items:center;justify-content:center;flex:none;padding:var(--spacing-2xs) var(--spacing-md);border:0;border-radius:var(--radius);background:none;color:var(--text-muted);cursor:pointer;font-family:var(--font-heading);font-size:var(--typography-size-lg);line-height:1;transition:background-color var(--duration-normal) var(--easing-default)}.modal-close:hover{background:var(--surface-hover);color:var(--text)}.modal-close:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}@media (pointer: coarse){.modal-close{min-width:44px;min-height:44px}}@media (prefers-reduced-motion: reduce){.modal-close{transition:none}}`;
4
+
5
+ let openModals = 0;
6
+ let previousOverflow = '';
7
+ let previousPaddingRight = '';
8
+ const ChModal = class {
9
+ constructor(hostRef) {
10
+ registerInstance(this, hostRef);
11
+ this.chOpen = createEvent(this, "chOpen");
12
+ this.chClose = createEvent(this, "chClose");
13
+ }
14
+ /**
15
+ * Whether the dialog is open. Kept in sync when the user closes it with
16
+ * `Escape`, the close button or a click outside.
17
+ */
18
+ open = false;
19
+ /**
20
+ * Accessible name for the dialog, set as `aria-label`. A slotted heading
21
+ * cannot be referenced with `aria-labelledby` across the shadow boundary, so
22
+ * the name comes through this prop — and a modal dialog needs one, so pass
23
+ * the same text as the heading.
24
+ */
25
+ label;
26
+ /**
27
+ * Accessible label for the close button, set as `aria-label`. Setting it is
28
+ * what adds the button: its only content is a decorative glyph, so without a
29
+ * label it would have no accessible name.
30
+ */
31
+ closeLabel;
32
+ /**
33
+ * Emitted after the dialog opens.
34
+ */
35
+ chOpen;
36
+ /**
37
+ * Emitted after the dialog closes, however it was closed.
38
+ */
39
+ chClose;
40
+ dialog;
41
+ scrollLocked = false;
42
+ pointerDownedOutside = false;
43
+ componentDidLoad() {
44
+ // Wired here rather than in JSX because Stencil derives a listener's event
45
+ // name from whether `on<name>` exists on `window`, which differs between
46
+ // the browser and the test environment for pointer events.
47
+ this.dialog?.addEventListener('close', this.handleNativeClose);
48
+ this.dialog?.addEventListener('pointerdown', this.handlePointerDown);
49
+ this.dialog?.addEventListener('click', this.handleClick);
50
+ if (this.open) {
51
+ this.showDialog();
52
+ }
53
+ }
54
+ disconnectedCallback() {
55
+ this.dialog?.removeEventListener('close', this.handleNativeClose);
56
+ this.dialog?.removeEventListener('pointerdown', this.handlePointerDown);
57
+ this.dialog?.removeEventListener('click', this.handleClick);
58
+ this.unlockScroll();
59
+ }
60
+ handleOpenChange(open) {
61
+ if (open) {
62
+ this.showDialog();
63
+ }
64
+ else {
65
+ this.closeDialog();
66
+ }
67
+ }
68
+ showDialog() {
69
+ if (typeof this.dialog?.showModal !== 'function') {
70
+ return;
71
+ }
72
+ this.lockScroll();
73
+ this.dialog.showModal();
74
+ this.chOpen.emit();
75
+ }
76
+ closeDialog() {
77
+ if (typeof this.dialog?.close === 'function' && this.dialog.open) {
78
+ this.dialog.close();
79
+ }
80
+ }
81
+ lockScroll() {
82
+ if (this.scrollLocked) {
83
+ return;
84
+ }
85
+ this.scrollLocked = true;
86
+ openModals += 1;
87
+ if (openModals > 1) {
88
+ return;
89
+ }
90
+ const root = document.documentElement;
91
+ const scrollbar = window.innerWidth - root.clientWidth;
92
+ previousOverflow = root.style.overflow;
93
+ previousPaddingRight = root.style.paddingRight;
94
+ root.style.overflow = 'hidden';
95
+ if (scrollbar > 0) {
96
+ root.style.paddingRight = `${scrollbar}px`;
97
+ }
98
+ }
99
+ unlockScroll() {
100
+ if (!this.scrollLocked) {
101
+ return;
102
+ }
103
+ this.scrollLocked = false;
104
+ openModals -= 1;
105
+ if (openModals > 0) {
106
+ return;
107
+ }
108
+ const root = document.documentElement;
109
+ root.style.overflow = previousOverflow;
110
+ root.style.paddingRight = previousPaddingRight;
111
+ }
112
+ /**
113
+ * True for a pointer event on the backdrop: the `<dialog>` is the event
114
+ * target for its own box only, and the coordinates fall outside that box.
115
+ */
116
+ isOnBackdrop(event) {
117
+ if (!this.dialog || event.target !== this.dialog) {
118
+ return false;
119
+ }
120
+ const box = this.dialog.getBoundingClientRect();
121
+ return event.clientX < box.left || event.clientX > box.right || event.clientY < box.top || event.clientY > box.bottom;
122
+ }
123
+ handlePointerDown = (event) => {
124
+ this.pointerDownedOutside = this.isOnBackdrop(event);
125
+ };
126
+ handleClick = (event) => {
127
+ // Requiring the press to have started on the backdrop too keeps a
128
+ // selection dragged out of the dialog, and a keyboard-synthesised click
129
+ // (which reports coordinates of 0), from closing it.
130
+ const dismiss = this.pointerDownedOutside && this.isOnBackdrop(event);
131
+ this.pointerDownedOutside = false;
132
+ if (dismiss) {
133
+ this.closeDialog();
134
+ }
135
+ };
136
+ handleNativeClose = () => {
137
+ this.unlockScroll();
138
+ if (this.open) {
139
+ this.open = false;
140
+ }
141
+ this.chClose.emit();
142
+ };
143
+ handleCloseClick = () => {
144
+ if (typeof this.dialog?.close === 'function' && this.dialog.open) {
145
+ this.dialog.close();
146
+ return;
147
+ }
148
+ this.open = false;
149
+ this.chClose.emit();
150
+ };
151
+ render() {
152
+ return (h(Host, { key: '92edf16d3ff079f72a4785ec9852e3e25218fd35' }, h("dialog", { key: '546fc72a098e1e2d8c05fafa2f11eac19ff83fd3', class: "modal", "aria-label": this.label, ref: el => (this.dialog = el) }, h("div", { key: '5a67aa39b6687db89d97533eb54d3a3b663bed56', class: "modal-head" }, h("slot", { key: '2e44b59a7c5e6af4a110a7f86362964ddd30d215', name: "heading" }), this.closeLabel && (h("button", { key: 'ce70baaa876c9f7b82865f0547e8e8cef5d5dfde', class: "modal-close", type: "button", "aria-label": this.closeLabel, onClick: this.handleCloseClick }, h("span", { key: 'df4536a8851a1ca9d3d2c46d15d18856660a54f6', "aria-hidden": "true" }, "\u00D7")))), h("div", { key: '5de77062134ccd90643df17d7b0d0ddb161f6a5f', class: "modal-body" }, h("slot", { key: '3b64493e9236b311a4b2f5250c5027f866bce8fd' })))));
153
+ }
154
+ static get watchers() { return {
155
+ "open": [{
156
+ "handleOpenChange": 0
157
+ }]
158
+ }; }
159
+ };
160
+ ChModal.style = chModalCss();
161
+
162
+ export { ChModal as ch_modal };
163
+ //# sourceMappingURL=ch-modal.entry.js.map
164
+
165
+ //# sourceMappingURL=ch-modal.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ch-modal.entry.js","sources":["src/components/ch-modal/ch-modal.css?tag=ch-modal&encapsulation=shadow","src/components/ch-modal/ch-modal.tsx"],"sourcesContent":[".modal {\n box-sizing: border-box;\n max-width: min(32rem, calc(100vw - var(--spacing-6xl)));\n max-height: calc(100vh - var(--spacing-6xl));\n padding: var(--spacing-5xl);\n border: var(--border-width) solid var(--border);\n border-radius: var(--radius);\n background: var(--color-background-base);\n color: var(--text);\n font-family: var(--font-body);\n font-size: var(--typography-size-md);\n}\n\n.modal::backdrop {\n background: var(--color-scrim-default);\n backdrop-filter: blur(var(--effect-blur));\n}\n\n.modal-head {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: var(--spacing-2xl);\n margin-bottom: var(--spacing-2xl);\n}\n\n.modal-body {\n overflow-y: auto;\n}\n\n.modal-close {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: none;\n padding: var(--spacing-2xs) var(--spacing-md);\n border: 0;\n border-radius: var(--radius);\n background: none;\n color: var(--text-muted);\n cursor: pointer;\n font-family: var(--font-heading);\n font-size: var(--typography-size-lg);\n line-height: 1;\n transition: background-color var(--duration-normal) var(--easing-default);\n}\n\n.modal-close:hover {\n background: var(--surface-hover);\n color: var(--text);\n}\n\n.modal-close:focus-visible {\n outline: var(--focus-outline-width) solid var(--accent);\n outline-offset: var(--focus-outline-offset);\n}\n\n@media (pointer: coarse) {\n .modal-close {\n min-width: 44px;\n min-height: 44px;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .modal-close {\n transition: none;\n }\n}\n","import { Component, Event, type EventEmitter, Host, Prop, Watch, h } from '@stencil/core';\n\nlet openModals = 0;\nlet previousOverflow = '';\nlet previousPaddingRight = '';\n\n/**\n * Modal dialog, built on the native `<dialog>` element and opened with\n * `showModal()`.\n *\n * The browser therefore supplies the parts that are easy to get wrong: moving\n * focus into the dialog and returning it afterwards, marking the rest of the\n * document inert, `Escape` to close, the top layer, `::backdrop`, and the\n * implicit `dialog` role with `aria-modal=\"true\"`. Notably it does not trap\n * focus, which is deliberate — the W3C APA group concluded a modal should let\n * keyboard users reach browser UI, so a hand-rolled trap would be less\n * correct, not more.\n *\n * What the platform does not cover, and this component adds: locking the page\n * behind the dialog so it cannot scroll, and closing when the backdrop is\n * clicked. The latter is `closedby=\"any\"` in the platform, which Safari does\n * not support yet, so it is implemented here for every browser alike rather\n * than only for some.\n */\n@Component({\n tag: 'ch-modal',\n styleUrl: 'ch-modal.css',\n shadow: true,\n})\nexport class ChModal {\n /**\n * Whether the dialog is open. Kept in sync when the user closes it with\n * `Escape`, the close button or a click outside.\n */\n @Prop({ mutable: true }) open = false;\n\n /**\n * Accessible name for the dialog, set as `aria-label`. A slotted heading\n * cannot be referenced with `aria-labelledby` across the shadow boundary, so\n * the name comes through this prop — and a modal dialog needs one, so pass\n * the same text as the heading.\n */\n @Prop() label?: string;\n\n /**\n * Accessible label for the close button, set as `aria-label`. Setting it is\n * what adds the button: its only content is a decorative glyph, so without a\n * label it would have no accessible name.\n */\n @Prop() closeLabel?: string;\n\n /**\n * Emitted after the dialog opens.\n */\n @Event() chOpen: EventEmitter<void>;\n\n /**\n * Emitted after the dialog closes, however it was closed.\n */\n @Event() chClose: EventEmitter<void>;\n\n private dialog?: HTMLDialogElement;\n private scrollLocked = false;\n private pointerDownedOutside = false;\n\n componentDidLoad() {\n // Wired here rather than in JSX because Stencil derives a listener's event\n // name from whether `on<name>` exists on `window`, which differs between\n // the browser and the test environment for pointer events.\n this.dialog?.addEventListener('close', this.handleNativeClose);\n this.dialog?.addEventListener('pointerdown', this.handlePointerDown);\n this.dialog?.addEventListener('click', this.handleClick);\n if (this.open) {\n this.showDialog();\n }\n }\n\n disconnectedCallback() {\n this.dialog?.removeEventListener('close', this.handleNativeClose);\n this.dialog?.removeEventListener('pointerdown', this.handlePointerDown);\n this.dialog?.removeEventListener('click', this.handleClick);\n this.unlockScroll();\n }\n\n @Watch('open')\n handleOpenChange(open: boolean) {\n if (open) {\n this.showDialog();\n } else {\n this.closeDialog();\n }\n }\n\n private showDialog() {\n if (typeof this.dialog?.showModal !== 'function') {\n return;\n }\n this.lockScroll();\n this.dialog.showModal();\n this.chOpen.emit();\n }\n\n private closeDialog() {\n if (typeof this.dialog?.close === 'function' && this.dialog.open) {\n this.dialog.close();\n }\n }\n\n private lockScroll() {\n if (this.scrollLocked) {\n return;\n }\n this.scrollLocked = true;\n openModals += 1;\n if (openModals > 1) {\n return;\n }\n const root = document.documentElement;\n const scrollbar = window.innerWidth - root.clientWidth;\n previousOverflow = root.style.overflow;\n previousPaddingRight = root.style.paddingRight;\n root.style.overflow = 'hidden';\n if (scrollbar > 0) {\n root.style.paddingRight = `${scrollbar}px`;\n }\n }\n\n private unlockScroll() {\n if (!this.scrollLocked) {\n return;\n }\n this.scrollLocked = false;\n openModals -= 1;\n if (openModals > 0) {\n return;\n }\n const root = document.documentElement;\n root.style.overflow = previousOverflow;\n root.style.paddingRight = previousPaddingRight;\n }\n\n /**\n * True for a pointer event on the backdrop: the `<dialog>` is the event\n * target for its own box only, and the coordinates fall outside that box.\n */\n private isOnBackdrop(event: MouseEvent) {\n if (!this.dialog || event.target !== this.dialog) {\n return false;\n }\n const box = this.dialog.getBoundingClientRect();\n return event.clientX < box.left || event.clientX > box.right || event.clientY < box.top || event.clientY > box.bottom;\n }\n\n private handlePointerDown = (event: Event) => {\n this.pointerDownedOutside = this.isOnBackdrop(event as MouseEvent);\n };\n\n private handleClick = (event: Event) => {\n // Requiring the press to have started on the backdrop too keeps a\n // selection dragged out of the dialog, and a keyboard-synthesised click\n // (which reports coordinates of 0), from closing it.\n const dismiss = this.pointerDownedOutside && this.isOnBackdrop(event as MouseEvent);\n this.pointerDownedOutside = false;\n if (dismiss) {\n this.closeDialog();\n }\n };\n\n private handleNativeClose = () => {\n this.unlockScroll();\n if (this.open) {\n this.open = false;\n }\n this.chClose.emit();\n };\n\n private handleCloseClick = () => {\n if (typeof this.dialog?.close === 'function' && this.dialog.open) {\n this.dialog.close();\n return;\n }\n this.open = false;\n this.chClose.emit();\n };\n\n render() {\n return (\n <Host>\n <dialog class=\"modal\" aria-label={this.label} ref={el => (this.dialog = el as HTMLDialogElement)}>\n <div class=\"modal-head\">\n <slot name=\"heading\"></slot>\n {this.closeLabel && (\n <button class=\"modal-close\" type=\"button\" aria-label={this.closeLabel} onClick={this.handleCloseClick}>\n <span aria-hidden=\"true\">×</span>\n </button>\n )}\n </div>\n <div class=\"modal-body\">\n <slot></slot>\n </div>\n </dialog>\n </Host>\n );\n }\n}\n"],"names":[],"mappings":";;AAAA,MAAM,UAAU,GAAG,MAAM,CAAC,0yCAA0yC,CAAC;;ACEr0C,IAAI,UAAU,GAAG,CAAC;AAClB,IAAI,gBAAgB,GAAG,EAAE;AACzB,IAAI,oBAAoB,GAAG,EAAE;MAyBhB,OAAO,GAAA,MAAA;;;;;;AAClB;;;AAGG;IACsB,IAAI,GAAG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A,0CAAA,EAAA,EACH,CAAA,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAQ,KAAK,EAAC,OAAO,EAAA,YAAA,EAAa,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,MAAM,GAAG,EAAuB,CAAC,EAAA,EAC9F,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,YAAY,EAAA,EACrB,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,SAAS,EAAA,CAAQ,EAC3B,IAAI,CAAC,UAAU,KACd,+DAAQ,KAAK,EAAC,aAAa,EAAC,IAAI,EAAC,QAAQ,EAAA,YAAA,EAAa,IAAI,CAAC,UAAU,EAAE,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAAA,EACnG,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,aAAA,EAAkB,MAAM,EAAA,EAAA,QAAA,CAAS,CAC1B,CACV,CACG,EACN,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,YAAY,EAAA,EACrB,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAa,CACT,CACC,CACJ;;;;;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host } from './index-pfWAsOzE.js';
1
+ import { r as registerInstance, c as createEvent, h, H as Host } from './index-Bvah_WQV.js';
2
2
 
3
3
  const chRadioCss = () => `:host{display:inline-block}.group-label{display:block;margin-bottom:var(--spacing-sm);font-size:var(--typography-size-sm);font-weight:var(--typography-weight-semibold);color:var(--text)}.radio-group{display:flex;flex-direction:column;gap:var(--spacing-lg)}.control{display:inline-flex;align-items:center;gap:var(--spacing-lg);cursor:pointer}.control--disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.input{appearance:none;-webkit-appearance:none;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--spacing-4xl);height:var(--spacing-4xl);margin:0;flex-shrink:0;border:var(--border-width) solid var(--border);border-radius:50%;background:var(--surface);cursor:pointer;transition:border-color var(--duration-normal) var(--easing-default), box-shadow var(--duration-normal) var(--easing-default)}.input:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}.input:checked{border-color:var(--accent)}.input:checked::before{content:'';width:var(--spacing-md);height:var(--spacing-md);border-radius:50%;background:var(--accent)}.input--invalid{border-color:var(--color-status-warning)}.input--invalid:focus-visible{outline-color:var(--color-status-warning)}.label-text{color:var(--text)}.hint,.error{margin:var(--spacing-sm) 0 0;font-size:var(--typography-size-sm);color:var(--text-muted)}.error{color:var(--color-status-warning)}`;
4
4
 
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host } from './index-pfWAsOzE.js';
1
+ import { r as registerInstance, c as createEvent, h, H as Host } from './index-Bvah_WQV.js';
2
2
 
3
3
  const chTabsCss = () => `:host{display:block}.tablist{display:flex;gap:var(--spacing-2xl);border-bottom:var(--border-width) solid var(--border)}.tab{appearance:none;position:relative;background:transparent;border:none;padding:var(--spacing-md) 0 var(--spacing-xl);margin-bottom:calc(-1 * var(--border-width));color:var(--text-muted);font-family:inherit;font-size:inherit;font-weight:var(--typography-weight-semibold);cursor:pointer;transition:color var(--duration-normal) var(--easing-default), border-color var(--duration-normal) var(--easing-default)}.tab::after{content:'';position:absolute;left:0;right:0;bottom:0;height:var(--border-accent-bar);background:var(--accent);opacity:0;transition:opacity var(--duration-normal) var(--easing-default)}.tab:hover{color:var(--text)}.tab:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}.tab--active{color:var(--text)}.tab--active::after{opacity:1}.tab--disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.tabpanel{padding-top:var(--spacing-2xl);color:var(--text)}.tabpanel[hidden]{display:none}`;
4
4
 
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host } from './index-pfWAsOzE.js';
1
+ import { r as registerInstance, c as createEvent, h, H as Host } from './index-Bvah_WQV.js';
2
2
 
3
3
  const chTextareaCss = () => `:host{display:inline-block;width:100%}.label{display:block;margin-bottom:var(--spacing-sm);font-size:var(--typography-size-sm);font-weight:var(--typography-weight-semibold);color:var(--text)}.textarea{box-sizing:border-box;width:100%;min-height:var(--spacing-6xl);padding:var(--spacing-xl) var(--spacing-3xl);border-radius:var(--radius);border:var(--border-width) solid var(--border);background:var(--surface);color:var(--text);backdrop-filter:blur(var(--effect-blur));font-family:inherit;font-size:inherit;line-height:var(--spacing-5xl);resize:vertical;transition:border-color var(--duration-normal) var(--easing-default), box-shadow var(--duration-normal) var(--easing-default)}.textarea::placeholder{color:var(--text-muted)}.textarea:focus{border-color:var(--accent);box-shadow:var(--shadow-focus-ring);outline:none}.textarea--invalid{border-color:var(--color-status-warning)}.textarea--invalid:focus{border-color:var(--color-status-warning);box-shadow:0 0 0 3px var(--color-status-warning-background)}.textarea:disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.hint,.error{margin:var(--spacing-sm) 0 0;font-size:var(--typography-size-sm);color:var(--text-muted)}.error{color:var(--color-status-warning)}`;
4
4
 
@@ -81,7 +81,7 @@ const ChTextarea = class {
81
81
  return undefined;
82
82
  }
83
83
  render() {
84
- return (h(Host, { key: '894524247096933b3d2f9cd5897da2c10133cefb' }, this.label && (h("label", { key: '1e1d409f458fb7431eb2670ddf2c4146bf28060f', class: "label", htmlFor: this.textareaId }, this.label)), h("textarea", { key: '9e2cd4f388bc31df4d498d8e32d88be063b557f1', id: this.label ? this.textareaId : undefined, class: { 'textarea': true, 'textarea--invalid': this.invalid }, rows: this.rows, name: this.name, placeholder: this.placeholder, disabled: this.disabled, required: this.required, value: this.value, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onInput: this.handleInput, onChange: this.handleChange }), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: 'cea50156d745ca55ef6da857c5302c8e04ceb483', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: 'ea525c23bf381f8382e134c01ea76086d84164da', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
84
+ return (h(Host, { key: '1e5846687f73807b36da2328106aec84bdecb7cb' }, this.label && (h("label", { key: '9a8d410d07bb6b9cc9a5329088786de6365af507', class: "label", htmlFor: this.textareaId }, this.label)), h("textarea", { key: '7353cc267072e7df111d94ad0466588d0b7e77d8', id: this.label ? this.textareaId : undefined, class: { 'textarea': true, 'textarea--invalid': this.invalid }, rows: this.rows, name: this.name, placeholder: this.placeholder, disabled: this.disabled, required: this.required, value: this.value, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onInput: this.handleInput, onChange: this.handleChange }), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: '5b953e2c568b151c502404fccc4a79d6d6e516f9', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: 'bc500a5bd32ac35cf4de723b02cb42f459614c39', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
85
85
  }
86
86
  };
87
87
  ChTextarea.style = chTextareaCss();
@@ -0,0 +1,80 @@
1
+ import { r as registerInstance, a as getElement, h, H as Host } from './index-Bvah_WQV.js';
2
+
3
+ const chTooltipCss = () => `:host{display:inline-block}.anchor{position:relative;display:inline-flex}.bubble{position:absolute;z-index:var(--z-index-dropdown);width:max-content;max-width:16rem;padding:var(--spacing-md) var(--spacing-2xl);border:var(--border-width) solid var(--border);border-radius:var(--radius-sm);background:var(--color-background-base);color:var(--text);font-family:var(--font-body);font-size:var(--typography-size-sm);line-height:1.4;opacity:0;visibility:hidden;transition:opacity var(--duration-fast) var(--easing-default), visibility var(--duration-fast) var(--easing-default)}.bubble--visible{opacity:1;visibility:visible}.bubble::before{content:'';position:absolute}.bubble--top{bottom:100%;left:50%;transform:translateX(-50%);margin-bottom:var(--spacing-md)}.bubble--top::before{top:100%;left:0;right:0;height:var(--spacing-md)}.bubble--bottom{top:100%;left:50%;transform:translateX(-50%);margin-top:var(--spacing-md)}.bubble--bottom::before{bottom:100%;left:0;right:0;height:var(--spacing-md)}.bubble--left{right:100%;top:50%;transform:translateY(-50%);margin-right:var(--spacing-md)}.bubble--left::before{left:100%;top:0;bottom:0;width:var(--spacing-md)}.bubble--right{left:100%;top:50%;transform:translateY(-50%);margin-left:var(--spacing-md)}.bubble--right::before{right:100%;top:0;bottom:0;width:var(--spacing-md)}@media (prefers-reduced-motion: reduce){.bubble{transition:none}}`;
4
+
5
+ let tooltipIds = 0;
6
+ const ChTooltip = class {
7
+ constructor(hostRef) {
8
+ registerInstance(this, hostRef);
9
+ }
10
+ get el() { return getElement(this); }
11
+ fallbackId = `ch-tooltip-${++tooltipIds}`;
12
+ /**
13
+ * Which side of the trigger the bubble is placed on.
14
+ */
15
+ placement = 'top';
16
+ // Hover and focus are tracked apart so that neither cancels the other: a
17
+ // pointer passing over and away must not hide a tooltip whose trigger still
18
+ // holds keyboard focus.
19
+ hovered = false;
20
+ focused = false;
21
+ dismissed = false;
22
+ get visible() {
23
+ return (this.hovered || this.focused) && !this.dismissed;
24
+ }
25
+ componentDidLoad() {
26
+ this.associate();
27
+ }
28
+ handleMouseEnter() {
29
+ this.hovered = true;
30
+ this.dismissed = false;
31
+ }
32
+ handleMouseLeave() {
33
+ this.hovered = false;
34
+ }
35
+ handleFocusIn() {
36
+ this.focused = true;
37
+ this.dismissed = false;
38
+ }
39
+ handleFocusOut() {
40
+ this.focused = false;
41
+ }
42
+ /**
43
+ * Listens on the document because a tooltip opened by hovering leaves focus
44
+ * wherever it was, so a host-scoped handler would never see the key.
45
+ */
46
+ handleKeyDown(event) {
47
+ if (event.key === 'Escape' && this.visible) {
48
+ this.dismissed = true;
49
+ }
50
+ }
51
+ slotted(name) {
52
+ return Array.from(this.el.children).find(child => child.getAttribute('slot') === name);
53
+ }
54
+ /**
55
+ * Points the trigger at the text with `aria-describedby`. Re-run on
56
+ * `slotchange` because a framework re-render can replace the slotted nodes
57
+ * and take the attributes with them.
58
+ */
59
+ associate = () => {
60
+ const trigger = this.slotted('trigger');
61
+ const content = this.slotted('content');
62
+ if (!trigger || !content) {
63
+ return;
64
+ }
65
+ if (!content.id) {
66
+ content.id = this.fallbackId;
67
+ }
68
+ content.setAttribute('role', 'tooltip');
69
+ trigger.setAttribute('aria-describedby', content.id);
70
+ };
71
+ render() {
72
+ return (h(Host, { key: '654d4a12f84c94e014691e911e7c63c6c45b8755' }, h("span", { key: '726269e02fedc37efc39f1561d8b9baf83d6a4cc', class: "anchor" }, h("slot", { key: '876cb19249032d6d1c66f22bd2c255683b6a7f66', name: "trigger", onSlotchange: this.associate }), h("span", { key: '7436eb75b40b33d0b6c8ce194245d4a08a29facb', class: { 'bubble': true, [`bubble--${this.placement}`]: true, 'bubble--visible': this.visible } }, h("slot", { key: '24648cc6078d61803793df011058da9515b466b5', name: "content", onSlotchange: this.associate })))));
73
+ }
74
+ };
75
+ ChTooltip.style = chTooltipCss();
76
+
77
+ export { ChTooltip as ch_tooltip };
78
+ //# sourceMappingURL=ch-tooltip.entry.js.map
79
+
80
+ //# sourceMappingURL=ch-tooltip.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ch-tooltip.entry.js","sources":["src/components/ch-tooltip/ch-tooltip.css?tag=ch-tooltip&encapsulation=shadow","src/components/ch-tooltip/ch-tooltip.tsx"],"sourcesContent":[":host {\n display: inline-block;\n}\n\n.anchor {\n position: relative;\n display: inline-flex;\n}\n\n.bubble {\n position: absolute;\n z-index: var(--z-index-dropdown);\n width: max-content;\n max-width: 16rem;\n padding: var(--spacing-md) var(--spacing-2xl);\n border: var(--border-width) solid var(--border);\n border-radius: var(--radius-sm);\n background: var(--color-background-base);\n color: var(--text);\n font-family: var(--font-body);\n font-size: var(--typography-size-sm);\n line-height: 1.4;\n opacity: 0;\n visibility: hidden;\n transition:\n opacity var(--duration-fast) var(--easing-default),\n visibility var(--duration-fast) var(--easing-default);\n}\n\n.bubble--visible {\n opacity: 1;\n visibility: visible;\n}\n\n.bubble::before {\n content: '';\n position: absolute;\n}\n\n.bubble--top {\n bottom: 100%;\n left: 50%;\n transform: translateX(-50%);\n margin-bottom: var(--spacing-md);\n}\n\n.bubble--top::before {\n top: 100%;\n left: 0;\n right: 0;\n height: var(--spacing-md);\n}\n\n.bubble--bottom {\n top: 100%;\n left: 50%;\n transform: translateX(-50%);\n margin-top: var(--spacing-md);\n}\n\n.bubble--bottom::before {\n bottom: 100%;\n left: 0;\n right: 0;\n height: var(--spacing-md);\n}\n\n.bubble--left {\n right: 100%;\n top: 50%;\n transform: translateY(-50%);\n margin-right: var(--spacing-md);\n}\n\n.bubble--left::before {\n left: 100%;\n top: 0;\n bottom: 0;\n width: var(--spacing-md);\n}\n\n.bubble--right {\n left: 100%;\n top: 50%;\n transform: translateY(-50%);\n margin-left: var(--spacing-md);\n}\n\n.bubble--right::before {\n right: 100%;\n top: 0;\n bottom: 0;\n width: var(--spacing-md);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .bubble {\n transition: none;\n }\n}\n","import { Component, Element, Host, Listen, Prop, State, h } from '@stencil/core';\n\nexport type ChTooltipPlacement = 'top' | 'bottom' | 'left' | 'right';\n\nlet tooltipIds = 0;\n\n/**\n * Short help text shown on hover and on focus.\n *\n * Both the trigger and the text come from the consumer's light DOM through\n * named slots. That is what makes the accessible association work: an\n * `aria-describedby` IDREF only resolves within a single tree, and slotted\n * nodes stay in the document tree even though they render inside the shadow\n * root. Keeping the text in the shadow root instead would need a reference\n * pointing into a shadow tree, which the platform does not allow — element\n * reflection only points outwards, and `referenceTarget` is not available yet.\n *\n * The trigger has to be a natively focusable element (`<button>`, `<a>`,\n * `<input>`). A chucao component such as `ch-button` will not be described,\n * because `aria-*` set on a custom element host does not reach the native\n * element inside it — see the discussion in issue #47.\n */\n@Component({\n tag: 'ch-tooltip',\n styleUrl: 'ch-tooltip.css',\n shadow: true,\n})\nexport class ChTooltip {\n @Element() private el: HTMLElement;\n\n private readonly fallbackId = `ch-tooltip-${++tooltipIds}`;\n\n /**\n * Which side of the trigger the bubble is placed on.\n */\n @Prop() placement: ChTooltipPlacement = 'top';\n\n // Hover and focus are tracked apart so that neither cancels the other: a\n // pointer passing over and away must not hide a tooltip whose trigger still\n // holds keyboard focus.\n @State() hovered = false;\n @State() focused = false;\n @State() dismissed = false;\n\n private get visible() {\n return (this.hovered || this.focused) && !this.dismissed;\n }\n\n componentDidLoad() {\n this.associate();\n }\n\n @Listen('mouseenter')\n handleMouseEnter() {\n this.hovered = true;\n this.dismissed = false;\n }\n\n @Listen('mouseleave')\n handleMouseLeave() {\n this.hovered = false;\n }\n\n @Listen('focusin')\n handleFocusIn() {\n this.focused = true;\n this.dismissed = false;\n }\n\n @Listen('focusout')\n handleFocusOut() {\n this.focused = false;\n }\n\n /**\n * Listens on the document because a tooltip opened by hovering leaves focus\n * wherever it was, so a host-scoped handler would never see the key.\n */\n @Listen('keydown', { target: 'document' })\n handleKeyDown(event: KeyboardEvent) {\n if (event.key === 'Escape' && this.visible) {\n this.dismissed = true;\n }\n }\n\n private slotted(name: string) {\n return Array.from(this.el.children).find(child => child.getAttribute('slot') === name);\n }\n\n /**\n * Points the trigger at the text with `aria-describedby`. Re-run on\n * `slotchange` because a framework re-render can replace the slotted nodes\n * and take the attributes with them.\n */\n private associate = () => {\n const trigger = this.slotted('trigger');\n const content = this.slotted('content');\n if (!trigger || !content) {\n return;\n }\n if (!content.id) {\n content.id = this.fallbackId;\n }\n content.setAttribute('role', 'tooltip');\n trigger.setAttribute('aria-describedby', content.id);\n };\n\n render() {\n return (\n <Host>\n <span class=\"anchor\">\n <slot name=\"trigger\" onSlotchange={this.associate}></slot>\n <span class={{ 'bubble': true, [`bubble--${this.placement}`]: true, 'bubble--visible': this.visible }}>\n <slot name=\"content\" onSlotchange={this.associate}></slot>\n </span>\n </span>\n </Host>\n );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MAAK;QACvB,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC;QACvC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC;AACvC,QAAA,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,EAAE;YACxB;;AAEF,QAAA,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE;AACf,YAAA,OAAO,CAAC,EAAE,GAAG,IAAI,CAAC,UAAU;;AAE9B,QAAA,OAAO,CAAC,YAAY,CAAC,MAAM,EAAE,SAAS,CAAC;QACvC,OAAO,CAAC,YAAY,CAAC,kBAAkB,EAAE,OAAO,CAAC,EAAE,CAAC;AACtD,KAAC;IAED,MAAM,GAAA;QACJ,QACE,EAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACH,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,KAAK,EAAC,QAAQ,EAAA,EAClB,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,SAAS,EAAC,YAAY,EAAE,IAAI,CAAC,SAAS,EAAA,CAAS,EAC1D,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA,QAAA,EAAW,IAAI,CAAC,SAAS,CAAA,CAAE,GAAG,IAAI,EAAE,iBAAiB,EAAE,IAAI,CAAC,OAAO,EAAE,EAAA,EACnG,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,SAAS,EAAC,YAAY,EAAE,IAAI,CAAC,SAAS,EAAA,CAAS,CACrD,CACF,CACF;;;;;;;"}
@@ -1,5 +1,5 @@
1
- import { p as promiseResolve, g as globalScripts, b as bootstrapLazy } from './index-pfWAsOzE.js';
2
- export { s as setNonce } from './index-pfWAsOzE.js';
1
+ import { p as promiseResolve, g as globalScripts, b as bootstrapLazy } from './index-Bvah_WQV.js';
2
+ export { s as setNonce } from './index-Bvah_WQV.js';
3
3
 
4
4
  /*
5
5
  Stencil Client Patch Browser v4.44.0 | MIT Licensed | https://stenciljs.com
@@ -16,7 +16,7 @@ var patchBrowser = () => {
16
16
 
17
17
  patchBrowser().then(async (options) => {
18
18
  await globalScripts();
19
- return bootstrapLazy([["ch-alert_8",[[769,"ch-alert",{"variant":[1],"dismissLabel":[1,"dismiss-label"]}],[769,"ch-badge",{"variant":[1]}],[769,"ch-button",{"variant":[1],"disabled":[4],"label":[1]}],[257,"ch-card"],[513,"ch-input",{"label":[1],"type":[1],"value":[1025],"placeholder":[1],"name":[1],"disabled":[4],"required":[4],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4]}],[513,"ch-select",{"label":[1],"options":[16],"value":[1025],"placeholder":[1],"name":[1],"disabled":[4],"required":[4],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4]}],[513,"ch-spinner",{"size":[1],"label":[1]}],[513,"ch-switch",{"label":[1],"name":[1],"value":[1],"checked":[1028],"disabled":[4],"required":[4],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4]}]]],["ch-accordion",[[769,"ch-accordion",{"items":[16],"value":[1025]}]]],["ch-checkbox",[[513,"ch-checkbox",{"label":[1],"name":[1],"value":[1],"checked":[1028],"disabled":[4],"required":[4],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4]}]]],["ch-divider",[[513,"ch-divider",{"orientation":[1]}]]],["ch-link",[[769,"ch-link",{"href":[1],"target":[1],"variant":[1],"disabled":[4]}]]],["ch-radio",[[513,"ch-radio",{"label":[1],"options":[16],"value":[1025],"name":[1],"disabled":[4],"required":[4],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4]}]]],["ch-tabs",[[769,"ch-tabs",{"tabs":[16],"value":[1025],"label":[1]}]]],["ch-textarea",[[513,"ch-textarea",{"label":[1],"value":[1025],"placeholder":[1],"rows":[2],"name":[1],"disabled":[4],"required":[4],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4]}]]]], options);
19
+ return bootstrapLazy([["ch-alert_8",[[769,"ch-alert",{"variant":[1],"dismissLabel":[1,"dismiss-label"]}],[769,"ch-badge",{"variant":[1]}],[769,"ch-button",{"variant":[1],"disabled":[4],"label":[1]}],[257,"ch-card"],[513,"ch-input",{"label":[1],"type":[1],"value":[1025],"placeholder":[1],"name":[1],"disabled":[4],"required":[4],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4]}],[513,"ch-select",{"label":[1],"options":[16],"value":[1025],"placeholder":[1],"name":[1],"disabled":[4],"required":[4],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4]}],[513,"ch-spinner",{"size":[1],"label":[1]}],[513,"ch-switch",{"label":[1],"name":[1],"value":[1],"checked":[1028],"disabled":[4],"required":[4],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4]}]]],["ch-accordion",[[769,"ch-accordion",{"items":[16],"value":[1025]}]]],["ch-checkbox",[[513,"ch-checkbox",{"label":[1],"name":[1],"value":[1],"checked":[1028],"disabled":[4],"required":[4],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4]}]]],["ch-divider",[[513,"ch-divider",{"orientation":[1]}]]],["ch-link",[[769,"ch-link",{"href":[1],"target":[1],"variant":[1],"disabled":[4]}]]],["ch-modal",[[769,"ch-modal",{"open":[1028],"label":[1],"closeLabel":[1,"close-label"]},null,{"open":[{"handleOpenChange":0}]}]]],["ch-radio",[[513,"ch-radio",{"label":[1],"options":[16],"value":[1025],"name":[1],"disabled":[4],"required":[4],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4]}]]],["ch-tabs",[[769,"ch-tabs",{"tabs":[16],"value":[1025],"label":[1]}]]],["ch-textarea",[[513,"ch-textarea",{"label":[1],"value":[1025],"placeholder":[1],"rows":[2],"name":[1],"disabled":[4],"required":[4],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4]}]]],["ch-tooltip",[[769,"ch-tooltip",{"placement":[1],"hovered":[32],"focused":[32],"dismissed":[32]},[[1,"mouseenter","handleMouseEnter"],[1,"mouseleave","handleMouseLeave"],[0,"focusin","handleFocusIn"],[0,"focusout","handleFocusOut"],[4,"keydown","handleKeyDown"]]]]]], options);
20
20
  });
21
21
  //# sourceMappingURL=chucao.js.map
22
22