@devschile/chucao 2.7.1 → 2.9.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 (253) hide show
  1. package/dist/chucao/chucao.esm.js +1 -1
  2. package/dist/chucao/{p-01b6c7bf.entry.js → p-03acf096.entry.js} +2 -2
  3. package/dist/chucao/{p-10f6801e.entry.js → p-0ce2b15d.entry.js} +2 -2
  4. package/dist/chucao/p-10e37157.entry.js +2 -0
  5. package/dist/chucao/p-10e37157.entry.js.map +1 -0
  6. package/dist/chucao/{p-f917d34f.entry.js → p-12043dc1.entry.js} +2 -2
  7. package/dist/chucao/p-1dca55d6.entry.js +2 -0
  8. package/dist/chucao/{p-deb2571b.entry.js.map → p-1dca55d6.entry.js.map} +1 -1
  9. package/dist/chucao/{p-0c7f6f8d.entry.js → p-244d8e96.entry.js} +2 -2
  10. package/dist/chucao/{p-a7c674b7.entry.js → p-29841714.entry.js} +2 -2
  11. package/dist/chucao/{p-ffecdf25.entry.js → p-302ec527.entry.js} +2 -2
  12. package/dist/chucao/{p-337d7f68.entry.js → p-51f6327c.entry.js} +2 -2
  13. package/dist/chucao/{p-1b70e3f1.entry.js → p-5a62951e.entry.js} +2 -2
  14. package/dist/chucao/{p-472ec451.entry.js → p-5d0ac17a.entry.js} +2 -2
  15. package/dist/chucao/{p-d8b71751.entry.js → p-5e0e1012.entry.js} +2 -2
  16. package/dist/chucao/{p-15d27bb7.entry.js → p-61a94a4e.entry.js} +2 -2
  17. package/dist/chucao/p-649c2cef.entry.js +2 -0
  18. package/dist/chucao/p-649c2cef.entry.js.map +1 -0
  19. package/dist/chucao/p-674c0f61.entry.js +2 -0
  20. package/dist/chucao/p-674c0f61.entry.js.map +1 -0
  21. package/dist/chucao/{p-c4b2bd1f.entry.js → p-67f0fc77.entry.js} +2 -2
  22. package/dist/chucao/{p-5240f5ac.entry.js → p-68e4a129.entry.js} +2 -2
  23. package/dist/chucao/{p-2e37c61b.entry.js → p-6e345b3f.entry.js} +2 -2
  24. package/dist/chucao/{p-f6ab0a11.entry.js → p-72d4dacf.entry.js} +2 -2
  25. package/dist/chucao/{p-8ae680a4.entry.js → p-74d9b7e5.entry.js} +2 -2
  26. package/dist/chucao/p-791ce537.entry.js +2 -0
  27. package/dist/chucao/p-791ce537.entry.js.map +1 -0
  28. package/dist/chucao/{p-c90da3c0.entry.js → p-79e8c10b.entry.js} +2 -2
  29. package/dist/chucao/{p-90284ebe.entry.js → p-7e13f725.entry.js} +2 -2
  30. package/dist/chucao/{p-9ebcc7be.entry.js → p-8b23d072.entry.js} +2 -2
  31. package/dist/chucao/{p-CIV5Gg1o.js → p-8l_6qAY9.js} +3 -3
  32. package/dist/chucao/p-8l_6qAY9.js.map +1 -0
  33. package/dist/chucao/{p-1e4cd3aa.entry.js → p-a5430e95.entry.js} +2 -2
  34. package/dist/chucao/{p-e77d35c3.entry.js → p-a7c66879.entry.js} +2 -2
  35. package/dist/chucao/p-b452d6cb.entry.js +2 -0
  36. package/dist/chucao/p-b7332faf.entry.js +2 -0
  37. package/dist/chucao/{p-60e1c1df.entry.js.map → p-b7332faf.entry.js.map} +1 -1
  38. package/dist/chucao/{p-42028c97.entry.js → p-f3d03388.entry.js} +2 -2
  39. package/dist/chucao/{p-7cdc71cc.entry.js → p-f925d45c.entry.js} +2 -2
  40. package/dist/cjs/ch-accordion.cjs.entry.js +2 -2
  41. package/dist/cjs/ch-alert_8.cjs.entry.js +8 -8
  42. package/dist/cjs/ch-checkbox.cjs.entry.js +2 -2
  43. package/dist/cjs/ch-cluster.cjs.entry.js +3 -3
  44. package/dist/cjs/ch-combobox.cjs.entry.js +304 -0
  45. package/dist/cjs/ch-combobox.cjs.entry.js.map +1 -0
  46. package/dist/cjs/ch-confirm-dialog.cjs.entry.js +138 -0
  47. package/dist/cjs/ch-confirm-dialog.cjs.entry.js.map +1 -0
  48. package/dist/cjs/ch-description-list.cjs.entry.js +2 -2
  49. package/dist/cjs/ch-divider.cjs.entry.js +2 -2
  50. package/dist/cjs/ch-drawer.cjs.entry.js +2 -2
  51. package/dist/cjs/ch-emoji.cjs.entry.js +2 -2
  52. package/dist/cjs/ch-empty-state.cjs.entry.js +2 -2
  53. package/dist/cjs/ch-grid.cjs.entry.js +2 -2
  54. package/dist/cjs/ch-icon-button.cjs.entry.js +2 -2
  55. package/dist/cjs/ch-icon.cjs.entry.js +2 -2
  56. package/dist/cjs/ch-link.cjs.entry.js +1 -1
  57. package/dist/cjs/ch-modal.cjs.entry.js +2 -2
  58. package/dist/cjs/ch-number-input.cjs.entry.js +3 -3
  59. package/dist/cjs/ch-otp-input.cjs.entry.js +196 -0
  60. package/dist/cjs/ch-otp-input.cjs.entry.js.map +1 -0
  61. package/dist/cjs/ch-page-header.cjs.entry.js +2 -2
  62. package/dist/cjs/ch-pagination.cjs.entry.js +67 -0
  63. package/dist/cjs/ch-pagination.cjs.entry.js.map +1 -0
  64. package/dist/cjs/ch-radio.cjs.entry.js +2 -2
  65. package/dist/cjs/ch-segmented-control.cjs.entry.js +2 -2
  66. package/dist/cjs/ch-skeleton.cjs.entry.js +2 -2
  67. package/dist/cjs/ch-stack.cjs.entry.js +2 -2
  68. package/dist/cjs/ch-stat.cjs.entry.js +3 -3
  69. package/dist/cjs/ch-table.cjs.entry.js +2 -2
  70. package/dist/cjs/ch-tabs.cjs.entry.js +2 -2
  71. package/dist/cjs/ch-textarea.cjs.entry.js +2 -2
  72. package/dist/cjs/ch-timeline.cjs.entry.js +2 -2
  73. package/dist/cjs/ch-tooltip.cjs.entry.js +3 -3
  74. package/dist/cjs/chucao.cjs.js +2 -2
  75. package/dist/cjs/{index-ByZY6aTj.js → index-C6khqyw3.js} +19 -2
  76. package/dist/cjs/index-C6khqyw3.js.map +1 -0
  77. package/dist/cjs/loader.cjs.js +2 -2
  78. package/dist/collection/collection-manifest.json +4 -0
  79. package/dist/collection/components/ch-accordion/ch-accordion.js +1 -1
  80. package/dist/collection/components/ch-alert/ch-alert.js +1 -1
  81. package/dist/collection/components/ch-badge/ch-badge.js +1 -1
  82. package/dist/collection/components/ch-card/ch-card.js +1 -1
  83. package/dist/collection/components/ch-checkbox/ch-checkbox.js +1 -1
  84. package/dist/collection/components/ch-cluster/ch-cluster.js +2 -2
  85. package/dist/collection/components/ch-combobox/ch-combobox.css +153 -0
  86. package/dist/collection/components/ch-combobox/ch-combobox.js +577 -0
  87. package/dist/collection/components/ch-combobox/ch-combobox.js.map +1 -0
  88. package/dist/collection/components/ch-confirm-dialog/ch-confirm-dialog.css +71 -0
  89. package/dist/collection/components/ch-confirm-dialog/ch-confirm-dialog.js +382 -0
  90. package/dist/collection/components/ch-confirm-dialog/ch-confirm-dialog.js.map +1 -0
  91. package/dist/collection/components/ch-description-list/ch-description-list.js +1 -1
  92. package/dist/collection/components/ch-divider/ch-divider.js +1 -1
  93. package/dist/collection/components/ch-drawer/ch-drawer.js +1 -1
  94. package/dist/collection/components/ch-emoji/ch-emoji.js +1 -1
  95. package/dist/collection/components/ch-empty-state/ch-empty-state.js +1 -1
  96. package/dist/collection/components/ch-grid/ch-grid.js +1 -1
  97. package/dist/collection/components/ch-icon/ch-icon.js +1 -1
  98. package/dist/collection/components/ch-icon-button/ch-icon-button.js +1 -1
  99. package/dist/collection/components/ch-input/ch-input.js +1 -1
  100. package/dist/collection/components/ch-modal/ch-modal.js +1 -1
  101. package/dist/collection/components/ch-number-input/ch-number-input.js +2 -2
  102. package/dist/collection/components/ch-otp-input/ch-otp-input.css +86 -0
  103. package/dist/collection/components/ch-otp-input/ch-otp-input.js +478 -0
  104. package/dist/collection/components/ch-otp-input/ch-otp-input.js.map +1 -0
  105. package/dist/collection/components/ch-page-header/ch-page-header.js +1 -1
  106. package/dist/collection/components/ch-pagination/ch-pagination.css +63 -0
  107. package/dist/collection/components/ch-pagination/ch-pagination.js +228 -0
  108. package/dist/collection/components/ch-pagination/ch-pagination.js.map +1 -0
  109. package/dist/collection/components/ch-radio/ch-radio.js +1 -1
  110. package/dist/collection/components/ch-segmented-control/ch-segmented-control.js +1 -1
  111. package/dist/collection/components/ch-select/ch-select.js +1 -1
  112. package/dist/collection/components/ch-skeleton/ch-skeleton.js +1 -1
  113. package/dist/collection/components/ch-spinner/ch-spinner.js +1 -1
  114. package/dist/collection/components/ch-stack/ch-stack.js +1 -1
  115. package/dist/collection/components/ch-stat/ch-stat.js +2 -2
  116. package/dist/collection/components/ch-switch/ch-switch.js +1 -1
  117. package/dist/collection/components/ch-table/ch-table.js +1 -1
  118. package/dist/collection/components/ch-tabs/ch-tabs.js +1 -1
  119. package/dist/collection/components/ch-textarea/ch-textarea.js +1 -1
  120. package/dist/collection/components/ch-timeline/ch-timeline.js +1 -1
  121. package/dist/collection/components/ch-tooltip/ch-tooltip.js +2 -2
  122. package/dist/components/ch-accordion.js +1 -1
  123. package/dist/components/ch-alert.js +1 -1
  124. package/dist/components/ch-badge.js +1 -1
  125. package/dist/components/ch-button.js +1 -1
  126. package/dist/components/ch-card.js +1 -1
  127. package/dist/components/ch-checkbox.js +1 -1
  128. package/dist/components/ch-cluster.js +1 -1
  129. package/dist/components/ch-combobox.d.ts +11 -0
  130. package/dist/components/ch-combobox.js +2 -0
  131. package/dist/components/ch-combobox.js.map +1 -0
  132. package/dist/components/ch-confirm-dialog.d.ts +11 -0
  133. package/dist/components/ch-confirm-dialog.js +2 -0
  134. package/dist/components/ch-confirm-dialog.js.map +1 -0
  135. package/dist/components/ch-description-list.js +1 -1
  136. package/dist/components/ch-divider.js +1 -1
  137. package/dist/components/ch-drawer.js +1 -1
  138. package/dist/components/ch-emoji.js +1 -1
  139. package/dist/components/ch-empty-state.js +1 -1
  140. package/dist/components/ch-grid.js +1 -1
  141. package/dist/components/ch-icon-button.js +1 -1
  142. package/dist/components/ch-icon.js +1 -1
  143. package/dist/components/ch-input.js +1 -1
  144. package/dist/components/ch-modal.js +1 -1
  145. package/dist/components/ch-modal.js.map +1 -1
  146. package/dist/components/ch-number-input.js +1 -1
  147. package/dist/components/ch-otp-input.d.ts +11 -0
  148. package/dist/components/ch-otp-input.js +2 -0
  149. package/dist/components/ch-otp-input.js.map +1 -0
  150. package/dist/components/ch-page-header.js +1 -1
  151. package/dist/components/ch-pagination.d.ts +11 -0
  152. package/dist/components/ch-pagination.js +2 -0
  153. package/dist/components/ch-pagination.js.map +1 -0
  154. package/dist/components/ch-radio.js +1 -1
  155. package/dist/components/ch-segmented-control.js +1 -1
  156. package/dist/components/ch-select.js +1 -1
  157. package/dist/components/ch-skeleton.js +1 -1
  158. package/dist/components/ch-spinner.js +1 -1
  159. package/dist/components/ch-stack.js +1 -1
  160. package/dist/components/ch-stat.js +1 -1
  161. package/dist/components/ch-switch.js +1 -1
  162. package/dist/components/ch-table.js +1 -1
  163. package/dist/components/ch-tabs.js +1 -1
  164. package/dist/components/ch-textarea.js +1 -1
  165. package/dist/components/ch-timeline.js +1 -1
  166. package/dist/components/ch-tooltip.js +1 -1
  167. package/dist/components/{p-DiUN1WGc.js → p-CuSstsTP.js} +2 -2
  168. package/dist/components/p-MBLhKofG.js +2 -0
  169. package/dist/components/p-MBLhKofG.js.map +1 -0
  170. package/dist/components/p-qP_9qshx.js.map +1 -1
  171. package/dist/esm/ch-accordion.entry.js +2 -2
  172. package/dist/esm/ch-alert_8.entry.js +8 -8
  173. package/dist/esm/ch-checkbox.entry.js +2 -2
  174. package/dist/esm/ch-cluster.entry.js +3 -3
  175. package/dist/esm/ch-combobox.entry.js +302 -0
  176. package/dist/esm/ch-combobox.entry.js.map +1 -0
  177. package/dist/esm/ch-confirm-dialog.entry.js +136 -0
  178. package/dist/esm/ch-confirm-dialog.entry.js.map +1 -0
  179. package/dist/esm/ch-description-list.entry.js +2 -2
  180. package/dist/esm/ch-divider.entry.js +2 -2
  181. package/dist/esm/ch-drawer.entry.js +2 -2
  182. package/dist/esm/ch-emoji.entry.js +2 -2
  183. package/dist/esm/ch-empty-state.entry.js +2 -2
  184. package/dist/esm/ch-grid.entry.js +2 -2
  185. package/dist/esm/ch-icon-button.entry.js +2 -2
  186. package/dist/esm/ch-icon.entry.js +2 -2
  187. package/dist/esm/ch-link.entry.js +1 -1
  188. package/dist/esm/ch-modal.entry.js +2 -2
  189. package/dist/esm/ch-number-input.entry.js +3 -3
  190. package/dist/esm/ch-otp-input.entry.js +194 -0
  191. package/dist/esm/ch-otp-input.entry.js.map +1 -0
  192. package/dist/esm/ch-page-header.entry.js +2 -2
  193. package/dist/esm/ch-pagination.entry.js +65 -0
  194. package/dist/esm/ch-pagination.entry.js.map +1 -0
  195. package/dist/esm/ch-radio.entry.js +2 -2
  196. package/dist/esm/ch-segmented-control.entry.js +2 -2
  197. package/dist/esm/ch-skeleton.entry.js +2 -2
  198. package/dist/esm/ch-stack.entry.js +2 -2
  199. package/dist/esm/ch-stat.entry.js +3 -3
  200. package/dist/esm/ch-table.entry.js +2 -2
  201. package/dist/esm/ch-tabs.entry.js +2 -2
  202. package/dist/esm/ch-textarea.entry.js +2 -2
  203. package/dist/esm/ch-timeline.entry.js +2 -2
  204. package/dist/esm/ch-tooltip.entry.js +3 -3
  205. package/dist/esm/chucao.js +3 -3
  206. package/dist/esm/{index-CIV5Gg1o.js → index-8l_6qAY9.js} +19 -2
  207. package/dist/esm/index-8l_6qAY9.js.map +1 -0
  208. package/dist/esm/loader.js +3 -3
  209. package/dist/types/components/ch-combobox/ch-combobox.d.ts +98 -0
  210. package/dist/types/components/ch-confirm-dialog/ch-confirm-dialog.d.ts +81 -0
  211. package/dist/types/components/ch-otp-input/ch-otp-input.d.ts +79 -0
  212. package/dist/types/components/ch-pagination/ch-pagination.d.ts +44 -0
  213. package/dist/types/components.d.ts +757 -0
  214. package/dist-react/components.d.ts +27 -1
  215. package/dist-react/components.js +45 -0
  216. package/dist-react/components.ts +67 -1
  217. package/dist-vue/index.d.ts +4 -0
  218. package/dist-vue/index.js +67 -0
  219. package/dist-vue/index.ts +75 -0
  220. package/hydrate/index.js +855 -35
  221. package/hydrate/index.mjs +855 -35
  222. package/package.json +17 -1
  223. package/dist/chucao/p-60e1c1df.entry.js +0 -2
  224. package/dist/chucao/p-9db118d9.entry.js +0 -2
  225. package/dist/chucao/p-CIV5Gg1o.js.map +0 -1
  226. package/dist/chucao/p-deb2571b.entry.js +0 -2
  227. package/dist/cjs/index-ByZY6aTj.js.map +0 -1
  228. package/dist/esm/index-CIV5Gg1o.js.map +0 -1
  229. /package/dist/chucao/{p-01b6c7bf.entry.js.map → p-03acf096.entry.js.map} +0 -0
  230. /package/dist/chucao/{p-10f6801e.entry.js.map → p-0ce2b15d.entry.js.map} +0 -0
  231. /package/dist/chucao/{p-f917d34f.entry.js.map → p-12043dc1.entry.js.map} +0 -0
  232. /package/dist/chucao/{p-0c7f6f8d.entry.js.map → p-244d8e96.entry.js.map} +0 -0
  233. /package/dist/chucao/{p-a7c674b7.entry.js.map → p-29841714.entry.js.map} +0 -0
  234. /package/dist/chucao/{p-ffecdf25.entry.js.map → p-302ec527.entry.js.map} +0 -0
  235. /package/dist/chucao/{p-337d7f68.entry.js.map → p-51f6327c.entry.js.map} +0 -0
  236. /package/dist/chucao/{p-1b70e3f1.entry.js.map → p-5a62951e.entry.js.map} +0 -0
  237. /package/dist/chucao/{p-472ec451.entry.js.map → p-5d0ac17a.entry.js.map} +0 -0
  238. /package/dist/chucao/{p-d8b71751.entry.js.map → p-5e0e1012.entry.js.map} +0 -0
  239. /package/dist/chucao/{p-15d27bb7.entry.js.map → p-61a94a4e.entry.js.map} +0 -0
  240. /package/dist/chucao/{p-c4b2bd1f.entry.js.map → p-67f0fc77.entry.js.map} +0 -0
  241. /package/dist/chucao/{p-5240f5ac.entry.js.map → p-68e4a129.entry.js.map} +0 -0
  242. /package/dist/chucao/{p-2e37c61b.entry.js.map → p-6e345b3f.entry.js.map} +0 -0
  243. /package/dist/chucao/{p-f6ab0a11.entry.js.map → p-72d4dacf.entry.js.map} +0 -0
  244. /package/dist/chucao/{p-8ae680a4.entry.js.map → p-74d9b7e5.entry.js.map} +0 -0
  245. /package/dist/chucao/{p-c90da3c0.entry.js.map → p-79e8c10b.entry.js.map} +0 -0
  246. /package/dist/chucao/{p-90284ebe.entry.js.map → p-7e13f725.entry.js.map} +0 -0
  247. /package/dist/chucao/{p-9ebcc7be.entry.js.map → p-8b23d072.entry.js.map} +0 -0
  248. /package/dist/chucao/{p-1e4cd3aa.entry.js.map → p-a5430e95.entry.js.map} +0 -0
  249. /package/dist/chucao/{p-e77d35c3.entry.js.map → p-a7c66879.entry.js.map} +0 -0
  250. /package/dist/chucao/{p-9db118d9.entry.js.map → p-b452d6cb.entry.js.map} +0 -0
  251. /package/dist/chucao/{p-42028c97.entry.js.map → p-f3d03388.entry.js.map} +0 -0
  252. /package/dist/chucao/{p-7cdc71cc.entry.js.map → p-f925d45c.entry.js.map} +0 -0
  253. /package/dist/components/{p-DiUN1WGc.js.map → p-CuSstsTP.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host } from './index-CIV5Gg1o.js';
1
+ import { r as registerInstance, c as createEvent, h, H as Host } from './index-8l_6qAY9.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
 
@@ -32,7 +32,7 @@ const ChAccordion = class {
32
32
  this.chChange.emit(this.value);
33
33
  };
34
34
  render() {
35
- return (h(Host, { key: 'f147314134464f7455ac179fad62c1b9318efc92' }, this.items.map(item => {
35
+ return (h(Host, { key: '75d95349674170ef9e9f6e74b4b3c4369e7f1e21' }, this.items.map(item => {
36
36
  const open = this.value === item.value;
37
37
  return (h("div", { key: item.value, class: { 'item': true, 'item--open': open } }, h("h3", { class: "item-head" }, h("button", { type: "button", class: "item-toggle", id: this.headerId(item.value), "data-value": item.value, "aria-expanded": open ? 'true' : 'false', "aria-controls": this.panelId(item.value), disabled: item.disabled, onClick: () => this.toggle(item.value) }, item.title)), h("div", { class: "item-panel", id: this.panelId(item.value), role: "region", "aria-labelledby": this.headerId(item.value), hidden: !open }, h("slot", { name: `panel-${item.value}` }))));
38
38
  })));
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-CIV5Gg1o.js';
1
+ import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-8l_6qAY9.js';
2
2
  import { c as chIcons } from './icons-CnivhwvG.js';
3
3
  import { r as resolveValidity } from './validation-message-BXzZsX2r.js';
4
4
 
@@ -50,7 +50,7 @@ const ChAlert = class {
50
50
  render() {
51
51
  const role = this.variant === 'warning' ? 'alert' : 'status';
52
52
  const shapes = this.statusCue ? chIcons[VARIANT_ICON[this.variant]] : undefined;
53
- return (h(Host, { key: 'a223f49acce9b1336d1791c547be15e76e6fd740' }, h("div", { key: role, class: { alert: true, [`alert--${this.variant}`]: true }, role: role }, shapes && (h("svg", { key: 'd14bf776a7c2c570203d4785c51a7e2e2110a837', class: "alert-icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", focusable: "false" }, shapes.map(shape => h(shape.tag, shape.attrs)))), h("div", { key: 'be4eb0acb06ba3b95eae29a08911f4e3a76a5998', class: "alert-content" }, h("slot", { key: '1ebb312baa833210658003113d6aee562a05cb50' })), this.dismissLabel && (h("button", { key: '388986c78e41cf66e74071a27c0ffa9a146fcacb', class: "alert-dismiss", type: "button", "aria-label": this.dismissLabel, onClick: this.handleDismiss }, h("span", { key: '24c24edbee8549bb64a6e9dcc381ebdae8d5d72d', "aria-hidden": "true" }, "\u00D7"))))));
53
+ return (h(Host, { key: '55c2c37d0a730000b644c583a99eae37d6f75784' }, h("div", { key: role, class: { alert: true, [`alert--${this.variant}`]: true }, role: role }, shapes && (h("svg", { key: '8fb807cd1f894c0960c55a3e417a418078c79d63', class: "alert-icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", focusable: "false" }, shapes.map(shape => h(shape.tag, shape.attrs)))), h("div", { key: '43784df5b3ede4eb01521439dd90d85fccf6fe43', class: "alert-content" }, h("slot", { key: 'f4643113dfe9e3beb6f5e1ae9794b28c19ea3341' })), this.dismissLabel && (h("button", { key: 'a1b3afee8907514f9448810b8f22d288a2f50057', class: "alert-dismiss", type: "button", "aria-label": this.dismissLabel, onClick: this.handleDismiss }, h("span", { key: '50371733d2358e002f7bdd1d5f8cb61d020c1cb9', "aria-hidden": "true" }, "\u00D7"))))));
54
54
  }
55
55
  };
56
56
  ChAlert.style = chAlertCss();
@@ -72,7 +72,7 @@ const ChBadge = class {
72
72
  */
73
73
  statusCue = true;
74
74
  render() {
75
- return (h(Host, { key: '8d92a45ab1f2932deb6a316d20e3aecd59d35498' }, h("span", { key: '16e499ffe26d47e2da057fd49fa214fba0dc9277', class: { badge: true, [`badge--${this.variant}`]: true } }, this.statusCue && h("span", { key: '040dbe5203403812ed98f84b03029ae38071f533', class: "badge-dot", "aria-hidden": "true" }), h("slot", { key: '89c1c35f937bc141bad71a9bee0f76d8b2d28666' }))));
75
+ return (h(Host, { key: '104554450ef32f24bb88afc77ad0b3d79811de6c' }, h("span", { key: '10531c508c51141fe433f794877d38ac8f9d7859', class: { badge: true, [`badge--${this.variant}`]: true } }, this.statusCue && h("span", { key: 'f6bb6f7c23e7d7f4051a6022f76a15f640e35650', class: "badge-dot", "aria-hidden": "true" }), h("slot", { key: '6c4d8c9c981be16facbcf95c3c0abce6f164ed16' }))));
76
76
  }
77
77
  };
78
78
  ChBadge.style = chBadgeCss();
@@ -176,7 +176,7 @@ const ChCard = class {
176
176
  registerInstance(this, hostRef);
177
177
  }
178
178
  render() {
179
- return (h(Host, { key: '2857d45b454709a8285fd52dbaa0943d571908b1' }, h("div", { key: 'a252222f7d25a697b4d6e8cd240564668a908652', class: "card" }, h("slot", { key: '4cadc2ad7fdbb2141d2a77bc19d5e6344e574b7a' }))));
179
+ return (h(Host, { key: 'f3a0efc8ed91ac81cf39d599acdf1944d72b56c1' }, h("div", { key: '5524237836d327c8c988903393b5adc09078b121', class: "card" }, h("slot", { key: '7c5a80c115399f591e40705abafd8288ff575d0f' }))));
180
180
  }
181
181
  };
182
182
  ChCard.style = chCardCss();
@@ -302,7 +302,7 @@ const ChInput = class {
302
302
  return undefined;
303
303
  }
304
304
  render() {
305
- return (h(Host, { key: '2b6755db381eeecb5c7c15730f351b5a28b2f89a' }, this.label && (h("label", { key: 'a4c4be2f9ca0dddc175597a12d2e48c3a5030131', class: "label", htmlFor: this.inputId }, this.label)), h("input", { key: 'b080e37229425a745588d6080bab48cf62be8aa8', 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 || this.formDisabled, 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: '857edf91f7b9657b34763fa06bae3d57e07d861c', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: '4516a30cd0d40e3b9e53430416934497c92b1f88', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
305
+ return (h(Host, { key: '80dd56c8fa40d4c8c4eec2b62d1fea2aaa574dcc' }, this.label && (h("label", { key: 'd1d4c26e7a49f176f5d986af107395fd32abbd11', class: "label", htmlFor: this.inputId }, this.label)), h("input", { key: '9220c4f98593dce4af626a2d068e654cf360199b', 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 || this.formDisabled, 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: '802ec36ef19bebd3371ff9535fba4052268f3db6', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: '489b9634ce6577f71c5875a45cfc5b8a5eeb6cf1', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
306
306
  }
307
307
  static get formAssociated() { return true; }
308
308
  static get watchers() { return {
@@ -434,7 +434,7 @@ const ChSelect = class {
434
434
  return undefined;
435
435
  }
436
436
  render() {
437
- return (h(Host, { key: 'f57fbcbfaaf64a9cbf1f201edd2f9f714db9afee' }, this.label && (h("label", { key: 'e7a4a802ff85cd597e5bdb9a54858e3cbbbcf73b', class: "label", htmlFor: this.selectId }, this.label)), h("select", { key: '5d70a598757d9440d90351e8639a876388b5f7a7', id: this.label ? this.selectId : undefined, class: { 'select': true, 'select--invalid': this.invalid }, name: this.name, disabled: this.disabled || this.formDisabled, required: this.required, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }, this.placeholder && (h("option", { key: '9a002af8f52ab2bb2d2c762417cad071b7dd06c7', value: "", disabled: true, hidden: true, selected: !this.value }, this.placeholder)), this.options.map(option => (h("option", { value: option.value, disabled: option.disabled, selected: option.value === this.value }, option.label)))), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: '0224ab6e0a54b925e0754c43bb15ceaab84c34a4', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: '1624ae9938d47971ee8195f986c45454dad7f846', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
437
+ return (h(Host, { key: 'bb342289b7725eaf8269ceb86589ebeb61f4c63b' }, this.label && (h("label", { key: '766492635c7eac71f719d52d07f71b9895037410', class: "label", htmlFor: this.selectId }, this.label)), h("select", { key: 'f086a020b93254d04b635677290e6e5ae9b1b35c', id: this.label ? this.selectId : undefined, class: { 'select': true, 'select--invalid': this.invalid }, name: this.name, disabled: this.disabled || this.formDisabled, required: this.required, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }, this.placeholder && (h("option", { key: '3c22ffe91a28b7e9e3a302c31a3c8945335bd2df', value: "", disabled: true, hidden: true, selected: !this.value }, this.placeholder)), this.options.map(option => (h("option", { value: option.value, disabled: option.disabled, selected: option.value === this.value }, option.label)))), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: '495b45c73e98b0b61ccde9e16972d0ff80665edf', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: '62f08ed1c7bce8a3fbc357bcf0928dd23c897a7b', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
438
438
  }
439
439
  static get formAssociated() { return true; }
440
440
  static get watchers() { return {
@@ -475,7 +475,7 @@ const ChSpinner = class {
475
475
  label;
476
476
  render() {
477
477
  const labelled = Boolean(this.label);
478
- return (h(Host, { key: '1d8ef18f03d7a52d61854cc84fb39994ee8ce0a9' }, h("span", { key: '28ec4657d1a0de9181f9d31742fc6bd26b284b14', class: { spinner: true, [`spinner--${this.size}`]: true }, role: labelled ? 'status' : undefined, "aria-label": labelled ? this.label : undefined, "aria-hidden": labelled ? undefined : 'true' })));
478
+ return (h(Host, { key: '03ab408176f59ecdd51a493d795ccc86acfa563c' }, h("span", { key: 'db54c4d2001a01caeea33426d4042c7ee5546b75', class: { spinner: true, [`spinner--${this.size}`]: true }, role: labelled ? 'status' : undefined, "aria-label": labelled ? this.label : undefined, "aria-hidden": labelled ? undefined : 'true' })));
479
479
  }
480
480
  };
481
481
  ChSpinner.style = chSpinnerCss();
@@ -588,7 +588,7 @@ const ChSwitch = class {
588
588
  return undefined;
589
589
  }
590
590
  render() {
591
- return (h(Host, { key: '8bafcbe9b03858f278f0884d43b9ce579a98c84e' }, h("label", { key: '8783c0e8ce0bb9c03a3772a08afb383e338b5be4', class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled }, htmlFor: this.switchId }, h("input", { key: '4093d398ed167ede08749050b6a9c9d5b25f2470', 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 || this.formDisabled, 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: 'eea728ebbf6c6fefd761415bf8cb00765e5c2e76', class: "track" }, h("span", { key: '4d18d8c9ed871bbf6e537b93bcce14c0f00f00e9', class: "thumb" })), this.label && h("span", { key: '048657735d8fdf9a03a89b83cf3f3d65a466d886', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: '869a40f9ce8bd2f93d918426f119c637039ac5e9', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: '08d947e2909706290b7efbb3e8af6999ad249dea', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
591
+ return (h(Host, { key: 'bae45755c2467bf088ab67b71c6a21289e33f8f2' }, h("label", { key: '5d68a33bb80334a7f5f326bd6f2dfc2f4c3e01df', class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled }, htmlFor: this.switchId }, h("input", { key: 'e48330e2c0b23077d34392960dd3d53052b8b21c', 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 || this.formDisabled, 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: '8f7d8fc472bb03a907e007eaf0c4e81d4f2b1a34', class: "track" }, h("span", { key: '574549aed9d109225c15d2a8b94893dea3799fbf', class: "thumb" })), this.label && h("span", { key: '3da40cbd701270e368f8280fb0475d4372ae65c9', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: '39fbb18961f849f241c19bfcd1895285b948b8da', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: 'a29a1a5dc06732a17e745634bf2874a4f28ff574', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
592
592
  }
593
593
  static get formAssociated() { return true; }
594
594
  static get watchers() { return {
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, a as getElement, h, H as Host } from './index-CIV5Gg1o.js';
1
+ import { r as registerInstance, c as createEvent, a as getElement, h, H as Host } from './index-8l_6qAY9.js';
2
2
  import { r as resolveValidity } from './validation-message-BXzZsX2r.js';
3
3
 
4
4
  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)}:host([data-touched]:invalid) .input,:host(:user-invalid) .input{border-color:var(--color-status-warning)}:host([data-touched]:invalid) .input:focus-visible,:host(:user-invalid) .input: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)}`;
@@ -109,7 +109,7 @@ const ChCheckbox = class {
109
109
  return undefined;
110
110
  }
111
111
  render() {
112
- return (h(Host, { key: 'b3ea4a0cfad08ea8c00ac1fbdb54f130a76943b4' }, h("label", { key: '7e1736c41138ab6b73ee30590f290768feb786a1', class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled }, htmlFor: this.checkboxId }, h("input", { key: '1d70b3936da371de75a931e3033f08ed05b62101', id: this.checkboxId, class: { 'input': true, 'input--invalid': this.invalid }, type: "checkbox", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled || this.formDisabled, required: this.required, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }), this.label && h("span", { key: '581b62c2a907bc9634d8c137f2539e47c90f79e1', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: '51ea863dd984d90fdf70a6f6d8dabdffa92d7340', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: '561ef3469af4bbf8f4eef568a0372f78618c047b', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
112
+ return (h(Host, { key: 'cf170be4d00e1ccb5511b0b72f6d42faa35b6371' }, h("label", { key: '3af65f435365b1ffdaf2d4149d87c8c4f7630998', class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled }, htmlFor: this.checkboxId }, h("input", { key: '3073840bef40f15e7688920209df189e831d4139', id: this.checkboxId, class: { 'input': true, 'input--invalid': this.invalid }, type: "checkbox", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled || this.formDisabled, required: this.required, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }), this.label && h("span", { key: 'a2630c7bf760b5adcd5b22e423d20e1bf7bb5107', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: '4c51711fe4a623c2b9a77dc66b2e2668c905fc19', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: '053569a86c7c3cd01b2278d3dcde7c649142a7c3', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
113
113
  }
114
114
  static get formAssociated() { return true; }
115
115
  static get watchers() { return {
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h, H as Host } from './index-CIV5Gg1o.js';
1
+ import { r as registerInstance, h, H as Host } from './index-8l_6qAY9.js';
2
2
 
3
3
  const chClusterCss = () => `:host{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;box-sizing:border-box}:host([hidden]){display:none}.cluster--nowrap{flex-wrap:nowrap}.cluster--gap-none{gap:0}.cluster--gap-2xs{gap:var(--spacing-2xs)}.cluster--gap-xs{gap:var(--spacing-xs)}.cluster--gap-sm{gap:var(--spacing-sm)}.cluster--gap-md{gap:var(--spacing-md)}.cluster--gap-lg{gap:var(--spacing-lg)}.cluster--gap-xl{gap:var(--spacing-xl)}.cluster--gap-2xl{gap:var(--spacing-2xl)}.cluster--gap-3xl{gap:var(--spacing-3xl)}.cluster--gap-4xl{gap:var(--spacing-4xl)}.cluster--gap-5xl{gap:var(--spacing-5xl)}.cluster--gap-6xl{gap:var(--spacing-6xl)}.cluster--align-stretch{align-items:stretch}.cluster--align-start{align-items:flex-start}.cluster--align-center{align-items:center}.cluster--align-end{align-items:flex-end}.cluster--align-baseline{align-items:baseline}.cluster--justify-start{justify-content:flex-start}.cluster--justify-center{justify-content:center}.cluster--justify-end{justify-content:flex-end}.cluster--justify-between{justify-content:space-between}.cluster--justify-around{justify-content:space-around}`;
4
4
 
@@ -28,13 +28,13 @@ const ChCluster = class {
28
28
  return GAPS.has(this.gap) ? this.gap : 'md';
29
29
  }
30
30
  render() {
31
- return (h(Host, { key: '63f10662f55078a9aec2680653c040c8411cd80f', class: {
31
+ return (h(Host, { key: '82b4133e903fd75e71314ae814d7c76d1844bcdc', class: {
32
32
  'cluster': true,
33
33
  [`cluster--gap-${this.gapStep}`]: true,
34
34
  [`cluster--align-${this.align}`]: true,
35
35
  [`cluster--justify-${this.justify}`]: true,
36
36
  'cluster--nowrap': !this.wrap,
37
- } }, h("slot", { key: '60f9896089d707fe0ef1980dcb9115bcf3308a2f' })));
37
+ } }, h("slot", { key: 'a53161dbf0dbfeb52e5dae80de4764d9c708c3c6' })));
38
38
  }
39
39
  };
40
40
  ChCluster.style = chClusterCss();
@@ -0,0 +1,302 @@
1
+ import { r as registerInstance, c as createEvent, a as getElement, h, H as Host } from './index-8l_6qAY9.js';
2
+ import { r as resolveValidity } from './validation-message-BXzZsX2r.js';
3
+
4
+ const chComboboxCss = () => `:host{display:block;width:100%;font-family:var(--typography-body)}:host([hidden]){display:none}.label{display:block;margin-bottom:var(--spacing-sm);font-size:var(--typography-size-sm);font-weight:var(--typography-weight-semibold);color:var(--color-text-primary)}.chips{display:flex;flex-wrap:wrap;gap:var(--spacing-xs);margin:0 0 var(--spacing-sm);padding:0;list-style:none}.chip{display:inline-flex;align-items:center;gap:var(--spacing-xs);max-width:100%;padding:var(--spacing-2xs) var(--spacing-sm);border:var(--border-width) solid var(--color-border-default);border-radius:var(--radius-sm);background:var(--color-surface-hover);font-size:var(--typography-size-sm)}.chip__label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chip__remove{all:unset;cursor:pointer;padding:0 var(--spacing-2xs);border-radius:var(--radius-sm);color:var(--color-text-secondary);line-height:1}.chip__remove:focus-visible{outline:2px solid var(--color-accent-default);outline-offset:1px}.field{position:relative}.input{box-sizing:border-box;width:100%;padding:var(--spacing-xl) var(--spacing-3xl);border:var(--border-width) solid var(--color-border-default);border-radius:var(--radius-sm);background:var(--color-surface-default);color:var(--color-text-primary);font-family:inherit;font-size:var(--typography-size-md);transition:border-color var(--duration-normal) var(--easing-default)}.input::placeholder{color:var(--color-text-secondary)}.input:focus{border-color:var(--color-accent-default);outline:2px solid var(--color-accent-default);outline-offset:1px}.input:disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.input--invalid{border-color:var(--color-status-warning)}.listbox{position:absolute;z-index:var(--z-index-dropdown);top:calc(100% + var(--spacing-2xs));left:0;right:0;max-height:16rem;margin:0;padding:var(--spacing-2xs);overflow-y:auto;list-style:none;border:var(--border-width) solid var(--color-border-default);border-radius:var(--radius-sm);background:var(--color-surface-default);box-shadow:var(--shadow-elevate)}.listbox[hidden]{display:none}.listbox__option{padding:var(--spacing-sm) var(--spacing-md);border-radius:var(--radius-sm);font-size:var(--typography-size-sm);cursor:pointer}.listbox__option--active{background:var(--color-surface-hover);font-weight:var(--typography-weight-semibold);box-shadow:inset 2px 0 0 var(--color-accent-default)}.listbox__option--disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.listbox__empty{padding:var(--spacing-sm) var(--spacing-md);font-size:var(--typography-size-sm);color:var(--color-text-secondary)}.hint,.error{margin:var(--spacing-sm) 0 0;font-size:var(--typography-size-sm);color:var(--color-text-secondary)}.error{color:var(--color-status-warning)}`;
5
+
6
+ let comboboxIds = 0;
7
+ const ChCombobox = class {
8
+ constructor(hostRef) {
9
+ registerInstance(this, hostRef);
10
+ this.chChange = createEvent(this, "chChange");
11
+ this.chFilter = createEvent(this, "chFilter");
12
+ if (hostRef.$hostElement$["s-ei"]) {
13
+ this.internals = hostRef.$hostElement$["s-ei"];
14
+ }
15
+ else {
16
+ this.internals = hostRef.$hostElement$.attachInternals();
17
+ hostRef.$hostElement$["s-ei"] = this.internals;
18
+ }
19
+ }
20
+ inputId = `ch-combobox-${++comboboxIds}`;
21
+ listId = `${this.inputId}-list`;
22
+ hintId = `${this.inputId}-hint`;
23
+ errorId = `${this.inputId}-error`;
24
+ initialValue = [];
25
+ internals;
26
+ formDisabled = false;
27
+ get host() { return getElement(this); }
28
+ /** Visible label, associated with the input via `for`/`id`. */
29
+ label;
30
+ /** The options to filter and choose from. */
31
+ options = [];
32
+ /** The committed value. An array when `multiple`. */
33
+ value;
34
+ /** Whether the user can pick more than one option. */
35
+ multiple = false;
36
+ /** Placeholder shown while the field is empty. */
37
+ placeholder;
38
+ /** Name submitted with the form. Repeated once per value when `multiple`. */
39
+ name;
40
+ /** Whether the field is disabled. */
41
+ disabled = false;
42
+ /** Whether at least one value is required. */
43
+ required = false;
44
+ /** Helper text, replaced by `errorMessage` when invalid. */
45
+ hint;
46
+ /** Custom error message; wins over the built-in messages. */
47
+ errorMessage;
48
+ /** Whether the field is marked invalid by the consumer. */
49
+ invalid = false;
50
+ /** Text the user has typed to filter with. */
51
+ query = '';
52
+ /** Whether the list is rendered. */
53
+ expanded = false;
54
+ /** Index into `visibleOptions` of the option under the keyboard cursor. */
55
+ activeIndex = -1;
56
+ /** Emitted whenever the committed value changes. */
57
+ chChange;
58
+ /** Emitted as the user types, with the raw query, so a consumer can filter remotely. */
59
+ chFilter;
60
+ /** The committed values as an array, whatever the mode. */
61
+ get selected() {
62
+ if (Array.isArray(this.value)) {
63
+ return this.value;
64
+ }
65
+ return this.value === undefined || this.value === '' ? [] : [this.value];
66
+ }
67
+ /** Options that match the current query. */
68
+ get visibleOptions() {
69
+ const query = this.query.trim().toLowerCase();
70
+ if (query === '') {
71
+ return this.options;
72
+ }
73
+ return this.options.filter(option => option.label.toLowerCase().includes(query));
74
+ }
75
+ /** Options that are still choosable: already-picked ones drop out in multiple mode. */
76
+ get choosable() {
77
+ if (!this.multiple) {
78
+ return this.visibleOptions;
79
+ }
80
+ const chosen = new Set(this.selected);
81
+ return this.visibleOptions.filter(option => !chosen.has(option.value));
82
+ }
83
+ labelFor(value) {
84
+ return this.options.find(option => option.value === value)?.label ?? value;
85
+ }
86
+ componentDidLoad() {
87
+ this.initialValue = this.selected;
88
+ this.syncForm();
89
+ this.host.addEventListener('focusout', this.handleFocusOut);
90
+ this.host.addEventListener('invalid', this.markTouched);
91
+ }
92
+ disconnectedCallback() {
93
+ this.host.removeEventListener('focusout', this.handleFocusOut);
94
+ }
95
+ markTouched = () => {
96
+ this.host.setAttribute('data-touched', '');
97
+ };
98
+ /**
99
+ * Closing on blur is deferred: clicking an option also blurs the input, and
100
+ * the click must be allowed to land first.
101
+ */
102
+ handleFocusOut = () => {
103
+ this.markTouched();
104
+ window.setTimeout(() => {
105
+ if (!this.host.contains(document.activeElement) && this.host.shadowRoot?.activeElement == null) {
106
+ this.expanded = false;
107
+ this.syncForm();
108
+ }
109
+ }, 0);
110
+ };
111
+ syncForm() {
112
+ const internals = this.internals;
113
+ if (typeof internals?.setFormValue !== 'function') {
114
+ return;
115
+ }
116
+ const values = this.selected;
117
+ // Multiple entries are submitted once per value, the way a multi-select does.
118
+ if (this.multiple) {
119
+ const data = new FormData();
120
+ for (const entry of values) {
121
+ data.append(this.name ?? '', entry);
122
+ }
123
+ internals.setFormValue(values.length === 0 ? null : data);
124
+ }
125
+ else {
126
+ internals.setFormValue(values[0] ?? '');
127
+ }
128
+ const { flags, message } = resolveValidity({
129
+ required: this.required,
130
+ empty: values.length === 0,
131
+ invalid: this.invalid,
132
+ errorMessage: this.errorMessage,
133
+ });
134
+ internals.setValidity(flags, message);
135
+ }
136
+ formResetCallback() {
137
+ this.value = this.multiple ? [...this.initialValue] : (this.initialValue[0] ?? '');
138
+ this.query = '';
139
+ this.syncForm();
140
+ const input = this.host.shadowRoot?.querySelector('.input');
141
+ if (input) {
142
+ input.value = '';
143
+ }
144
+ }
145
+ formDisabledCallback(isDisabled) {
146
+ this.formDisabled = isDisabled;
147
+ }
148
+ commit(value) {
149
+ if (this.multiple) {
150
+ const next = this.selected.includes(value) ? this.selected : [...this.selected, value];
151
+ this.value = next;
152
+ this.query = '';
153
+ const input = this.host.shadowRoot?.querySelector('.input');
154
+ if (input) {
155
+ input.value = '';
156
+ }
157
+ // Keep the list open: choosing again is the common case here.
158
+ this.activeIndex = -1;
159
+ }
160
+ else {
161
+ this.value = value;
162
+ this.query = this.labelFor(value);
163
+ this.expanded = false;
164
+ this.activeIndex = -1;
165
+ }
166
+ this.chChange.emit(this.value);
167
+ this.syncForm();
168
+ }
169
+ remove(value) {
170
+ const next = this.selected.filter(entry => entry !== value);
171
+ this.value = this.multiple ? next : '';
172
+ this.chChange.emit(this.value);
173
+ this.syncForm();
174
+ }
175
+ open() {
176
+ if (this.disabled || this.formDisabled) {
177
+ return;
178
+ }
179
+ this.expanded = true;
180
+ }
181
+ moveActive(delta) {
182
+ const count = this.choosable.length;
183
+ if (count === 0) {
184
+ return;
185
+ }
186
+ const next = this.activeIndex + delta;
187
+ this.activeIndex = next < 0 ? count - 1 : next >= count ? 0 : next;
188
+ }
189
+ handleInput = (event) => {
190
+ const input = event.target;
191
+ this.query = input.value;
192
+ this.expanded = true;
193
+ this.activeIndex = this.choosable.length > 0 ? 0 : -1;
194
+ // Single mode shows a typed-but-uncommitted value as no value at all.
195
+ if (!this.multiple && this.value !== undefined && this.value !== this.labelFor(this.selected[0] ?? '')) {
196
+ this.value = '';
197
+ }
198
+ this.chFilter.emit(this.query);
199
+ };
200
+ handleKeyDown = (event) => {
201
+ if (event.key === 'ArrowDown') {
202
+ event.preventDefault();
203
+ this.open();
204
+ this.moveActive(1);
205
+ return;
206
+ }
207
+ if (event.key === 'ArrowUp') {
208
+ event.preventDefault();
209
+ this.open();
210
+ this.moveActive(-1);
211
+ return;
212
+ }
213
+ if (event.key === 'Enter') {
214
+ const option = this.choosable[this.activeIndex];
215
+ if (this.expanded && option && !option.disabled) {
216
+ event.preventDefault();
217
+ this.commit(option.value);
218
+ }
219
+ return;
220
+ }
221
+ if (event.key === 'Escape' && this.expanded) {
222
+ event.preventDefault();
223
+ this.expanded = false;
224
+ this.activeIndex = -1;
225
+ return;
226
+ }
227
+ // Backspace in an empty multiple field removes the last chip.
228
+ if (event.key === 'Backspace' && this.multiple && this.query === '') {
229
+ const last = this.selected[this.selected.length - 1];
230
+ if (last !== undefined) {
231
+ event.preventDefault();
232
+ this.remove(last);
233
+ }
234
+ }
235
+ };
236
+ handleFocus = () => {
237
+ this.open();
238
+ };
239
+ handleBlur = () => {
240
+ // A single-mode field shows the chosen label, not what was typed.
241
+ const input = this.host.shadowRoot?.querySelector('.input');
242
+ if (input && !this.multiple) {
243
+ this.query = '';
244
+ input.value = this.selected.length > 0 ? this.labelFor(this.selected[0]) : '';
245
+ }
246
+ };
247
+ get isInvalid() {
248
+ return this.invalid || (this.host.hasAttribute('data-touched') && this.selected.length === 0 && this.required);
249
+ }
250
+ get describedBy() {
251
+ if (this.isInvalid && this.errorMessage) {
252
+ return this.errorId;
253
+ }
254
+ return this.hint ? this.hintId : undefined;
255
+ }
256
+ /** The option id for `aria-activedescendant`. */
257
+ optionId(index) {
258
+ return `${this.inputId}-option-${index}`;
259
+ }
260
+ render() {
261
+ const options = this.choosable;
262
+ const active = this.activeIndex >= 0 && this.activeIndex < options.length ? options[this.activeIndex] : undefined;
263
+ const chosen = this.selected;
264
+ const showError = this.isInvalid && this.errorMessage;
265
+ return (h(Host, { key: '783df95d2970b0db5c6f839fb0acbaa7582301f0' }, this.label && (h("label", { key: '232933c04601d543b391d15603f1dcfafa2f6e73', class: "label", htmlFor: this.inputId }, this.label)), this.multiple && chosen.length > 0 && (h("ul", { key: 'e7e92805f42a9a97d0587463f0b68fa79368cc6b', class: "chips", "aria-label": "Selected values" }, chosen.map(entry => (h("li", { class: "chip", key: entry }, h("span", { class: "chip__label" }, this.labelFor(entry)), h("button", { type: "button", class: "chip__remove", "aria-label": `Remove ${this.labelFor(entry)}`, onClick: () => this.remove(entry) }, h("span", { "aria-hidden": "true" }, "\u00D7"))))))), h("div", { key: '076bd78c0c43327c298baf37e9411d68e6b03734', class: "field" }, h("input", { key: '0e2caa28567ea21d8b5a98a8b1ed949e07731e09', id: this.label && !this.multiple ? this.inputId : undefined, class: { 'input': true, 'input--invalid': this.isInvalid }, type: "text", role: "combobox", autocomplete: "off", "aria-expanded": this.expanded ? 'true' : 'false', "aria-controls": this.listId, "aria-autocomplete": "list", "aria-activedescendant": active ? this.optionId(this.activeIndex) : undefined, "aria-invalid": this.isInvalid ? 'true' : undefined, "aria-describedby": this.describedBy, name: this.name, disabled: this.disabled || this.formDisabled, required: this.required, placeholder: chosen.length === 0 ? this.placeholder : undefined, value: this.multiple ? this.query : this.query || (chosen[0] !== undefined ? this.labelFor(chosen[0]) : ''), onInput: this.handleInput, onKeyDown: this.handleKeyDown, onFocus: this.handleFocus, onBlur: this.handleBlur }), h("ul", { key: '5f843aef03c09ff9dd1e02c3da90f6e9dbcca858', class: "listbox", id: this.listId, role: "listbox", "aria-multiselectable": this.multiple ? 'true' : undefined, hidden: !this.expanded }, options.length === 0 && (h("li", { key: '1bb282438f1889da96af7d27b504e31ab19088e5', class: "listbox__empty", role: "presentation" }, "No results")), options.map((option, index) => (h("li", { class: {
266
+ 'listbox__option': true,
267
+ 'listbox__option--active': index === this.activeIndex,
268
+ 'listbox__option--disabled': option.disabled === true,
269
+ }, id: this.optionId(index), key: option.value, role: "option", "aria-selected": this.multiple ? 'false' : chosen[0] === option.value ? 'true' : 'false', "aria-disabled": option.disabled ? 'true' : undefined,
270
+ // Pointer-down commits before the input's blur closes the list.
271
+ onMouseDown: event => {
272
+ event.preventDefault();
273
+ if (!option.disabled) {
274
+ this.commit(option.value);
275
+ }
276
+ } }, option.label))))), this.hint && !showError && (h("p", { key: 'dc7f8a5d26e55d2d7836bf72a5359a6c0fbe0220', class: "hint", id: this.hintId }, this.hint)), showError && (h("p", { key: 'd3d9beaa0eb9d830b2c9f3082ea0bf0490efe3ee', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
277
+ }
278
+ static get formAssociated() { return true; }
279
+ static get watchers() { return {
280
+ "value": [{
281
+ "syncForm": 0
282
+ }],
283
+ "required": [{
284
+ "syncForm": 0
285
+ }],
286
+ "invalid": [{
287
+ "syncForm": 0
288
+ }],
289
+ "errorMessage": [{
290
+ "syncForm": 0
291
+ }],
292
+ "multiple": [{
293
+ "syncForm": 0
294
+ }]
295
+ }; }
296
+ };
297
+ ChCombobox.style = chComboboxCss();
298
+
299
+ export { ChCombobox as ch_combobox };
300
+ //# sourceMappingURL=ch-combobox.entry.js.map
301
+
302
+ //# sourceMappingURL=ch-combobox.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ch-combobox.entry.js","sources":["src/components/ch-combobox/ch-combobox.css?tag=ch-combobox&encapsulation=shadow","src/components/ch-combobox/ch-combobox.tsx"],"sourcesContent":[":host {\n display: block;\n width: 100%;\n font-family: var(--typography-body);\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.label {\n display: block;\n margin-bottom: var(--spacing-sm);\n font-size: var(--typography-size-sm);\n font-weight: var(--typography-weight-semibold);\n color: var(--color-text-primary);\n}\n\n.chips {\n display: flex;\n flex-wrap: wrap;\n gap: var(--spacing-xs);\n margin: 0 0 var(--spacing-sm);\n padding: 0;\n list-style: none;\n}\n\n.chip {\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-xs);\n max-width: 100%;\n padding: var(--spacing-2xs) var(--spacing-sm);\n border: var(--border-width) solid var(--color-border-default);\n border-radius: var(--radius-sm);\n background: var(--color-surface-hover);\n font-size: var(--typography-size-sm);\n}\n\n.chip__label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.chip__remove {\n all: unset;\n cursor: pointer;\n padding: 0 var(--spacing-2xs);\n border-radius: var(--radius-sm);\n color: var(--color-text-secondary);\n line-height: 1;\n}\n\n.chip__remove:focus-visible {\n outline: 2px solid var(--color-accent-default);\n outline-offset: 1px;\n}\n\n/* The list is positioned against the field, not the viewport: a dropdown that\n * is part of a form flow should move with it, unlike a tooltip. */\n.field {\n position: relative;\n}\n\n.input {\n box-sizing: border-box;\n width: 100%;\n padding: var(--spacing-xl) var(--spacing-3xl);\n border: var(--border-width) solid var(--color-border-default);\n border-radius: var(--radius-sm);\n background: var(--color-surface-default);\n color: var(--color-text-primary);\n font-family: inherit;\n font-size: var(--typography-size-md);\n transition: border-color var(--duration-normal) var(--easing-default);\n}\n\n.input::placeholder {\n color: var(--color-text-secondary);\n}\n\n.input:focus {\n border-color: var(--color-accent-default);\n outline: 2px solid var(--color-accent-default);\n outline-offset: 1px;\n}\n\n.input:disabled {\n opacity: var(--opacity-disabled);\n cursor: not-allowed;\n}\n\n.input--invalid {\n border-color: var(--color-status-warning);\n}\n\n.listbox {\n position: absolute;\n z-index: var(--z-index-dropdown);\n top: calc(100% + var(--spacing-2xs));\n left: 0;\n right: 0;\n max-height: 16rem;\n margin: 0;\n padding: var(--spacing-2xs);\n overflow-y: auto;\n list-style: none;\n border: var(--border-width) solid var(--color-border-default);\n border-radius: var(--radius-sm);\n background: var(--color-surface-default);\n box-shadow: var(--shadow-elevate);\n}\n\n.listbox[hidden] {\n display: none;\n}\n\n.listbox__option {\n padding: var(--spacing-sm) var(--spacing-md);\n border-radius: var(--radius-sm);\n font-size: var(--typography-size-sm);\n cursor: pointer;\n}\n\n/* The active option is marked by a rule and weight, not only a tint. */\n.listbox__option--active {\n background: var(--color-surface-hover);\n font-weight: var(--typography-weight-semibold);\n box-shadow: inset 2px 0 0 var(--color-accent-default);\n}\n\n.listbox__option--disabled {\n opacity: var(--opacity-disabled);\n cursor: not-allowed;\n}\n\n.listbox__empty {\n padding: var(--spacing-sm) var(--spacing-md);\n font-size: var(--typography-size-sm);\n color: var(--color-text-secondary);\n}\n\n.hint,\n.error {\n margin: var(--spacing-sm) 0 0;\n font-size: var(--typography-size-sm);\n color: var(--color-text-secondary);\n}\n\n.error {\n color: var(--color-status-warning);\n}\n","import { AttachInternals, Component, Element, Event, type EventEmitter, Host, Prop, State, Watch, h } from '@stencil/core';\n\nimport { resolveValidity } from '../../utils/validation-message';\n\nexport interface ChComboboxOption {\n label: string;\n value: string;\n disabled?: boolean;\n /** Optional grouping label; consecutive options with the same group are announced together. */\n group?: string;\n}\n\nlet comboboxIds = 0;\n\n/**\n * A text field that filters a list of options and commits a choice.\n *\n * The input is a native `<input>` rather than `ch-input`: the combobox role\n * and its `aria-*` state have to sit on the element that owns the interaction,\n * and ARIA does not forward through a wrapper component.\n *\n * Single and multiple are one component. `multiple` changes the value shape\n * (`string` vs `string[]`), renders the chosen values as removable chips, and\n * keeps the list open after a pick; single commits and closes. Everything else\n * — filtering, the active option, keyboard behaviour, validity — is shared, so\n * the two cannot drift apart.\n *\n * The consumer owns the options and, if it fetches them, their ordering: this\n * component never sorts, debounces or requests anything. It filters what it is\n * given, and reports what the user asked for.\n */\n@Component({\n tag: 'ch-combobox',\n styleUrl: 'ch-combobox.css',\n shadow: true,\n formAssociated: true,\n})\nexport class ChCombobox {\n private readonly inputId = `ch-combobox-${++comboboxIds}`;\n private readonly listId = `${this.inputId}-list`;\n private readonly hintId = `${this.inputId}-hint`;\n private readonly errorId = `${this.inputId}-error`;\n private initialValue: string[] = [];\n\n @AttachInternals() internals!: ElementInternals;\n @State() formDisabled = false;\n @Element() private host!: HTMLElement;\n\n /** Visible label, associated with the input via `for`/`id`. */\n @Prop() label?: string;\n\n /** The options to filter and choose from. */\n @Prop() options: ChComboboxOption[] = [];\n\n /** The committed value. An array when `multiple`. */\n @Prop({ mutable: true }) value?: string | string[];\n\n /** Whether the user can pick more than one option. */\n @Prop({ reflect: true }) multiple = false;\n\n /** Placeholder shown while the field is empty. */\n @Prop() placeholder?: string;\n\n /** Name submitted with the form. Repeated once per value when `multiple`. */\n @Prop({ reflect: true }) name?: string;\n\n /** Whether the field is disabled. */\n @Prop({ reflect: true }) disabled = false;\n\n /** Whether at least one value is required. */\n @Prop({ reflect: true }) required = false;\n\n /** Helper text, replaced by `errorMessage` when invalid. */\n @Prop() hint?: string;\n\n /** Custom error message; wins over the built-in messages. */\n @Prop() errorMessage?: string;\n\n /** Whether the field is marked invalid by the consumer. */\n @Prop() invalid = false;\n\n /** Text the user has typed to filter with. */\n @State() private query = '';\n\n /** Whether the list is rendered. */\n @State() private expanded = false;\n\n /** Index into `visibleOptions` of the option under the keyboard cursor. */\n @State() private activeIndex = -1;\n\n /** Emitted whenever the committed value changes. */\n @Event() chChange: EventEmitter<string | string[]>;\n\n /** Emitted as the user types, with the raw query, so a consumer can filter remotely. */\n @Event() chFilter: EventEmitter<string>;\n\n /** The committed values as an array, whatever the mode. */\n private get selected(): string[] {\n if (Array.isArray(this.value)) {\n return this.value;\n }\n return this.value === undefined || this.value === '' ? [] : [this.value];\n }\n\n /** Options that match the current query. */\n private get visibleOptions(): ChComboboxOption[] {\n const query = this.query.trim().toLowerCase();\n if (query === '') {\n return this.options;\n }\n return this.options.filter(option => option.label.toLowerCase().includes(query));\n }\n\n /** Options that are still choosable: already-picked ones drop out in multiple mode. */\n private get choosable(): ChComboboxOption[] {\n if (!this.multiple) {\n return this.visibleOptions;\n }\n const chosen = new Set(this.selected);\n return this.visibleOptions.filter(option => !chosen.has(option.value));\n }\n\n private labelFor(value: string): string {\n return this.options.find(option => option.value === value)?.label ?? value;\n }\n\n componentDidLoad() {\n this.initialValue = this.selected;\n this.syncForm();\n this.host.addEventListener('focusout', this.handleFocusOut);\n this.host.addEventListener('invalid', this.markTouched);\n }\n\n disconnectedCallback() {\n this.host.removeEventListener('focusout', this.handleFocusOut);\n }\n\n private markTouched = (): void => {\n this.host.setAttribute('data-touched', '');\n };\n\n /**\n * Closing on blur is deferred: clicking an option also blurs the input, and\n * the click must be allowed to land first.\n */\n private handleFocusOut = () => {\n this.markTouched();\n window.setTimeout(() => {\n if (!this.host.contains(document.activeElement) && this.host.shadowRoot?.activeElement == null) {\n this.expanded = false;\n this.syncForm();\n }\n }, 0);\n };\n\n @Watch('value')\n @Watch('required')\n @Watch('invalid')\n @Watch('errorMessage')\n @Watch('multiple')\n protected syncForm(): void {\n const internals = this.internals;\n if (typeof internals?.setFormValue !== 'function') {\n return;\n }\n const values = this.selected;\n // Multiple entries are submitted once per value, the way a multi-select does.\n if (this.multiple) {\n const data = new FormData();\n for (const entry of values) {\n data.append(this.name ?? '', entry);\n }\n internals.setFormValue(values.length === 0 ? null : data);\n } else {\n internals.setFormValue(values[0] ?? '');\n }\n\n const { flags, message } = resolveValidity({\n required: this.required,\n empty: values.length === 0,\n invalid: this.invalid,\n errorMessage: this.errorMessage,\n });\n internals.setValidity(flags, message);\n }\n\n formResetCallback(): void {\n this.value = this.multiple ? [...this.initialValue] : (this.initialValue[0] ?? '');\n this.query = '';\n this.syncForm();\n const input = this.host.shadowRoot?.querySelector('.input') as HTMLInputElement | null;\n if (input) {\n input.value = '';\n }\n }\n\n formDisabledCallback(isDisabled: boolean): void {\n this.formDisabled = isDisabled;\n }\n\n private commit(value: string) {\n if (this.multiple) {\n const next = this.selected.includes(value) ? this.selected : [...this.selected, value];\n this.value = next;\n this.query = '';\n const input = this.host.shadowRoot?.querySelector('.input') as HTMLInputElement | null;\n if (input) {\n input.value = '';\n }\n // Keep the list open: choosing again is the common case here.\n this.activeIndex = -1;\n } else {\n this.value = value;\n this.query = this.labelFor(value);\n this.expanded = false;\n this.activeIndex = -1;\n }\n this.chChange.emit(this.value as string | string[]);\n this.syncForm();\n }\n\n private remove(value: string) {\n const next = this.selected.filter(entry => entry !== value);\n this.value = this.multiple ? next : '';\n this.chChange.emit(this.value as string | string[]);\n this.syncForm();\n }\n\n private open() {\n if (this.disabled || this.formDisabled) {\n return;\n }\n this.expanded = true;\n }\n\n private moveActive(delta: number) {\n const count = this.choosable.length;\n if (count === 0) {\n return;\n }\n const next = this.activeIndex + delta;\n this.activeIndex = next < 0 ? count - 1 : next >= count ? 0 : next;\n }\n\n private handleInput = (event: InputEvent) => {\n const input = event.target as HTMLInputElement;\n this.query = input.value;\n this.expanded = true;\n this.activeIndex = this.choosable.length > 0 ? 0 : -1;\n // Single mode shows a typed-but-uncommitted value as no value at all.\n if (!this.multiple && this.value !== undefined && this.value !== this.labelFor(this.selected[0] ?? '')) {\n this.value = '';\n }\n this.chFilter.emit(this.query);\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n this.open();\n this.moveActive(1);\n return;\n }\n if (event.key === 'ArrowUp') {\n event.preventDefault();\n this.open();\n this.moveActive(-1);\n return;\n }\n if (event.key === 'Enter') {\n const option = this.choosable[this.activeIndex];\n if (this.expanded && option && !option.disabled) {\n event.preventDefault();\n this.commit(option.value);\n }\n return;\n }\n if (event.key === 'Escape' && this.expanded) {\n event.preventDefault();\n this.expanded = false;\n this.activeIndex = -1;\n return;\n }\n // Backspace in an empty multiple field removes the last chip.\n if (event.key === 'Backspace' && this.multiple && this.query === '') {\n const last = this.selected[this.selected.length - 1];\n if (last !== undefined) {\n event.preventDefault();\n this.remove(last);\n }\n }\n };\n\n private handleFocus = () => {\n this.open();\n };\n\n private handleBlur = () => {\n // A single-mode field shows the chosen label, not what was typed.\n const input = this.host.shadowRoot?.querySelector('.input') as HTMLInputElement | null;\n if (input && !this.multiple) {\n this.query = '';\n input.value = this.selected.length > 0 ? this.labelFor(this.selected[0]) : '';\n }\n };\n\n private get isInvalid(): boolean {\n return this.invalid || (this.host.hasAttribute('data-touched') && this.selected.length === 0 && this.required);\n }\n\n private get describedBy(): string | undefined {\n if (this.isInvalid && this.errorMessage) {\n return this.errorId;\n }\n return this.hint ? this.hintId : undefined;\n }\n\n /** The option id for `aria-activedescendant`. */\n private optionId(index: number): string {\n return `${this.inputId}-option-${index}`;\n }\n\n render() {\n const options = this.choosable;\n const active = this.activeIndex >= 0 && this.activeIndex < options.length ? options[this.activeIndex] : undefined;\n const chosen = this.selected;\n const showError = this.isInvalid && this.errorMessage;\n\n return (\n <Host>\n {this.label && (\n <label class=\"label\" htmlFor={this.inputId}>\n {this.label}\n </label>\n )}\n {this.multiple && chosen.length > 0 && (\n <ul class=\"chips\" aria-label=\"Selected values\">\n {chosen.map(entry => (\n <li class=\"chip\" key={entry}>\n <span class=\"chip__label\">{this.labelFor(entry)}</span>\n <button type=\"button\" class=\"chip__remove\" aria-label={`Remove ${this.labelFor(entry)}`} onClick={() => this.remove(entry)}>\n <span aria-hidden=\"true\">×</span>\n </button>\n </li>\n ))}\n </ul>\n )}\n <div class=\"field\">\n <input\n id={this.label && !this.multiple ? this.inputId : undefined}\n class={{ 'input': true, 'input--invalid': this.isInvalid }}\n type=\"text\"\n role=\"combobox\"\n autocomplete=\"off\"\n aria-expanded={this.expanded ? 'true' : 'false'}\n aria-controls={this.listId}\n aria-autocomplete=\"list\"\n aria-activedescendant={active ? this.optionId(this.activeIndex) : undefined}\n aria-invalid={this.isInvalid ? 'true' : undefined}\n aria-describedby={this.describedBy}\n name={this.name}\n disabled={this.disabled || this.formDisabled}\n required={this.required}\n placeholder={chosen.length === 0 ? this.placeholder : undefined}\n value={this.multiple ? this.query : this.query || (chosen[0] !== undefined ? this.labelFor(chosen[0]) : '')}\n onInput={this.handleInput}\n onKeyDown={this.handleKeyDown}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n <ul class=\"listbox\" id={this.listId} role=\"listbox\" aria-multiselectable={this.multiple ? 'true' : undefined} hidden={!this.expanded}>\n {options.length === 0 && (\n <li class=\"listbox__empty\" role=\"presentation\">\n No results\n </li>\n )}\n {options.map((option, index) => (\n <li\n class={{\n 'listbox__option': true,\n 'listbox__option--active': index === this.activeIndex,\n 'listbox__option--disabled': option.disabled === true,\n }}\n id={this.optionId(index)}\n key={option.value}\n role=\"option\"\n aria-selected={this.multiple ? 'false' : chosen[0] === option.value ? 'true' : 'false'}\n aria-disabled={option.disabled ? 'true' : undefined}\n // Pointer-down commits before the input's blur closes the list.\n onMouseDown={event => {\n event.preventDefault();\n if (!option.disabled) {\n this.commit(option.value);\n }\n }}\n >\n {option.label}\n </li>\n ))}\n </ul>\n </div>\n {this.hint && !showError && (\n <p class=\"hint\" id={this.hintId}>\n {this.hint}\n </p>\n )}\n {showError && (\n <p class=\"error\" id={this.errorId} role=\"alert\">\n {this.errorMessage}\n </p>\n )}\n </Host>\n );\n }\n}\n"],"names":[],"mappings":";;;AAAA,MAAM,aAAa,GAAG,MAAM,CAAC,0qFAA0qF,CAAC;;ACYxsF,IAAI,WAAW,GAAG,CAAC;MAyBN,UAAU,GAAA,MAAA;;;;;;;;;;;;;AACJ,IAAA,OAAO,GAAG,CAAA,YAAA,EAAe,EAAE,WAAW,EAAE;AACxC,IAAA,MAAM,GAAG,CAAA,EAAG,IAAI,CAAC,OAAO,OAAO;AAC/B,IAAA,MAAM,GAAG,CAAA,EAAG,IAAI,CAAC,OAAO,OAAO;AAC/B,IAAA,OAAO,GAAG,CAAA,EAAG,IAAI,CAAC,OAAO,QAAQ;IAC1C,YAAY,GAAa,EAAE;AAEhB,IAAA,SAAS;IACnB,YAAY,GAAG,KAAK;;;AAIrB,IAAA,KAAK;;IAGL,OAAO,GAAuB,EAAE;;AAGf,IAAA,KAAK;;IAGL,QAAQ,GAAG,KAAK;;AAGjC,IAAA,WAAW;;AAGM,IAAA,IAAI;;IAGJ,QAAQ,GAAG,KAAK;;IAGhB,QAAQ,GAAG,KAAK;;AAGjC,IAAA,IAAI;;AAGJ,IAAA,YAAY;;IAGZ,OAAO,GAAG,KAAK;;IAGN,KAAK,GAAG,EAAE;;IAGV,QAAQ,GAAG,KAAK;;IAGhB,WAAW,GAAG,EAAE;;AAGxB,IAAA,QAAQ;;AAGR,IAAA,QAAQ;;AAGjB,IAAA,IAAY,QAAQ,GAAA;QAClB,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;YAC7B,OAAO,IAAI,CAAC,KAAK;;QAEnB,OAAO,IAAI,CAAC,KAAK,KAAK,SAAS,IAAI,IAAI,CAAC,KAAK,KAAK,EAAE,GAAG,E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