@devschile/chucao 2.3.0 → 2.5.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 (341) hide show
  1. package/README.md +17 -16
  2. package/dist/chucao/chucao.css +1 -1
  3. package/dist/chucao/chucao.esm.js +1 -1
  4. package/dist/chucao/chucao.esm.js.map +1 -1
  5. package/dist/chucao/index.esm.js +1 -1
  6. package/dist/chucao/index.esm.js.map +1 -1
  7. package/dist/chucao/p-0bc141a2.entry.js +2 -0
  8. package/dist/chucao/p-0bc141a2.entry.js.map +1 -0
  9. package/dist/chucao/p-0e044eff.entry.js +2 -0
  10. package/dist/chucao/p-0e044eff.entry.js.map +1 -0
  11. package/dist/chucao/{p-ff5f5c1f.entry.js → p-1108062e.entry.js} +2 -2
  12. package/dist/chucao/p-26e144ff.entry.js +2 -0
  13. package/dist/chucao/p-26e144ff.entry.js.map +1 -0
  14. package/dist/chucao/p-2c681cc0.entry.js +2 -0
  15. package/dist/chucao/p-2c681cc0.entry.js.map +1 -0
  16. package/dist/chucao/p-2e785177.entry.js +2 -0
  17. package/dist/chucao/p-2e785177.entry.js.map +1 -0
  18. package/dist/chucao/{p-04dbcfa0.entry.js → p-337d7f68.entry.js} +2 -2
  19. package/dist/chucao/p-350f974d.entry.js +2 -0
  20. package/dist/chucao/p-350f974d.entry.js.map +1 -0
  21. package/dist/chucao/p-4846cac4.entry.js +2 -0
  22. package/dist/chucao/p-6345c9e1.entry.js +2 -0
  23. package/dist/chucao/p-6345c9e1.entry.js.map +1 -0
  24. package/dist/chucao/p-957acf39.entry.js +2 -0
  25. package/dist/chucao/p-957acf39.entry.js.map +1 -0
  26. package/dist/chucao/p-97655c41.entry.js +2 -0
  27. package/dist/chucao/p-97655c41.entry.js.map +1 -0
  28. package/dist/chucao/{p-6a4bc80c.entry.js → p-9f73855e.entry.js} +2 -2
  29. package/dist/chucao/p-BXzZsX2r.js +2 -0
  30. package/dist/chucao/p-BXzZsX2r.js.map +1 -0
  31. package/dist/chucao/p-CIV5Gg1o.js +3 -0
  32. package/dist/chucao/p-CIV5Gg1o.js.map +1 -0
  33. package/dist/chucao/p-CnivhwvG.js +2 -0
  34. package/dist/chucao/p-CnivhwvG.js.map +1 -0
  35. package/dist/chucao/p-b53d954e.entry.js +2 -0
  36. package/dist/chucao/p-b53d954e.entry.js.map +1 -0
  37. package/dist/chucao/{p-c986036f.entry.js → p-b6cc08f0.entry.js} +2 -2
  38. package/dist/chucao/p-be7b5c21.entry.js +2 -0
  39. package/dist/chucao/p-be7b5c21.entry.js.map +1 -0
  40. package/dist/chucao/p-c165f839.entry.js +2 -0
  41. package/dist/chucao/p-c165f839.entry.js.map +1 -0
  42. package/dist/chucao/p-c251b0d1.entry.js +2 -0
  43. package/dist/chucao/p-c251b0d1.entry.js.map +1 -0
  44. package/dist/chucao/p-f5b74bca.entry.js +2 -0
  45. package/dist/chucao/p-f5b74bca.entry.js.map +1 -0
  46. package/dist/chucao/p-f9fe752c.entry.js +2 -0
  47. package/dist/chucao/p-f9fe752c.entry.js.map +1 -0
  48. package/dist/chucao/p-fdf065e6.entry.js +2 -0
  49. package/dist/chucao/p-fdf065e6.entry.js.map +1 -0
  50. package/dist/cjs/ch-accordion.cjs.entry.js +1 -1
  51. package/dist/cjs/ch-alert_8.cjs.entry.js +69 -38
  52. package/dist/cjs/ch-alert_8.cjs.entry.js.map +1 -1
  53. package/dist/cjs/ch-checkbox.cjs.entry.js +9 -11
  54. package/dist/cjs/ch-checkbox.cjs.entry.js.map +1 -1
  55. package/dist/cjs/ch-cluster.cjs.entry.js +47 -0
  56. package/dist/cjs/ch-cluster.cjs.entry.js.map +1 -0
  57. package/dist/cjs/ch-divider.cjs.entry.js +2 -2
  58. package/dist/cjs/ch-drawer.cjs.entry.js +4 -3
  59. package/dist/cjs/ch-drawer.cjs.entry.js.map +1 -1
  60. package/dist/cjs/ch-emoji.cjs.entry.js +2 -2
  61. package/dist/cjs/ch-empty-state.cjs.entry.js +34 -0
  62. package/dist/cjs/ch-empty-state.cjs.entry.js.map +1 -0
  63. package/dist/cjs/ch-grid.cjs.entry.js +59 -0
  64. package/dist/cjs/ch-grid.cjs.entry.js.map +1 -0
  65. package/dist/cjs/ch-icon-button.cjs.entry.js +51 -0
  66. package/dist/cjs/ch-icon-button.cjs.entry.js.map +1 -0
  67. package/dist/cjs/ch-icon.cjs.entry.js +38 -0
  68. package/dist/cjs/ch-icon.cjs.entry.js.map +1 -0
  69. package/dist/cjs/ch-link.cjs.entry.js +1 -1
  70. package/dist/cjs/ch-modal.cjs.entry.js +4 -3
  71. package/dist/cjs/ch-modal.cjs.entry.js.map +1 -1
  72. package/dist/cjs/ch-page-header.cjs.entry.js +45 -0
  73. package/dist/cjs/ch-page-header.cjs.entry.js.map +1 -0
  74. package/dist/cjs/ch-radio.cjs.entry.js +9 -11
  75. package/dist/cjs/ch-radio.cjs.entry.js.map +1 -1
  76. package/dist/cjs/ch-segmented-control.cjs.entry.js +8 -7
  77. package/dist/cjs/ch-segmented-control.cjs.entry.js.map +1 -1
  78. package/dist/cjs/ch-skeleton.cjs.entry.js +58 -0
  79. package/dist/cjs/ch-skeleton.cjs.entry.js.map +1 -0
  80. package/dist/cjs/ch-stack.cjs.entry.js +37 -0
  81. package/dist/cjs/ch-stack.cjs.entry.js.map +1 -0
  82. package/dist/cjs/ch-tabs.cjs.entry.js +2 -2
  83. package/dist/cjs/ch-textarea.cjs.entry.js +9 -11
  84. package/dist/cjs/ch-textarea.cjs.entry.js.map +1 -1
  85. package/dist/cjs/ch-tooltip.cjs.entry.js +204 -5
  86. package/dist/cjs/ch-tooltip.cjs.entry.js.map +1 -1
  87. package/dist/cjs/chucao.cjs.js +3 -3
  88. package/dist/cjs/chucao.cjs.js.map +1 -1
  89. package/dist/cjs/icons-CNyDgV-q.js +88 -0
  90. package/dist/cjs/icons-CNyDgV-q.js.map +1 -0
  91. package/dist/cjs/{index-C9cpLteP.js → index-ByZY6aTj.js} +119 -16
  92. package/dist/cjs/index-ByZY6aTj.js.map +1 -0
  93. package/dist/cjs/index.cjs.js +16 -0
  94. package/dist/cjs/index.cjs.js.map +1 -1
  95. package/dist/cjs/loader.cjs.js +2 -2
  96. package/dist/cjs/validation-message-bbtJ2sa_.js +26 -0
  97. package/dist/cjs/validation-message-bbtJ2sa_.js.map +1 -0
  98. package/dist/collection/collection-manifest.json +9 -1
  99. package/dist/collection/components/ch-alert/ch-alert.css +13 -0
  100. package/dist/collection/components/ch-alert/ch-alert.js +44 -1
  101. package/dist/collection/components/ch-alert/ch-alert.js.map +1 -1
  102. package/dist/collection/components/ch-badge/ch-badge.css +30 -1
  103. package/dist/collection/components/ch-badge/ch-badge.js +35 -1
  104. package/dist/collection/components/ch-badge/ch-badge.js.map +1 -1
  105. package/dist/collection/components/ch-button/ch-button.js +9 -2
  106. package/dist/collection/components/ch-button/ch-button.js.map +1 -1
  107. package/dist/collection/components/ch-card/ch-card.js +1 -1
  108. package/dist/collection/components/ch-checkbox/ch-checkbox.js +8 -10
  109. package/dist/collection/components/ch-checkbox/ch-checkbox.js.map +1 -1
  110. package/dist/collection/components/ch-cluster/ch-cluster.css +93 -0
  111. package/dist/collection/components/ch-cluster/ch-cluster.js +152 -0
  112. package/dist/collection/components/ch-cluster/ch-cluster.js.map +1 -0
  113. package/dist/collection/components/ch-divider/ch-divider.js +1 -1
  114. package/dist/collection/components/ch-drawer/ch-drawer.js +9 -3
  115. package/dist/collection/components/ch-drawer/ch-drawer.js.map +1 -1
  116. package/dist/collection/components/ch-emoji/ch-emoji.js +1 -1
  117. package/dist/collection/components/ch-empty-state/ch-empty-state.css +67 -0
  118. package/dist/collection/components/ch-empty-state/ch-empty-state.js +108 -0
  119. package/dist/collection/components/ch-empty-state/ch-empty-state.js.map +1 -0
  120. package/dist/collection/components/ch-grid/ch-grid.css +47 -0
  121. package/dist/collection/components/ch-grid/ch-grid.js +137 -0
  122. package/dist/collection/components/ch-grid/ch-grid.js.map +1 -0
  123. package/dist/collection/components/ch-icon/ch-icon.css +25 -0
  124. package/dist/collection/components/ch-icon/ch-icon.js +121 -0
  125. package/dist/collection/components/ch-icon/ch-icon.js.map +1 -0
  126. package/dist/collection/components/ch-icon-button/ch-icon-button.css +99 -0
  127. package/dist/collection/components/ch-icon-button/ch-icon-button.js +216 -0
  128. package/dist/collection/components/ch-icon-button/ch-icon-button.js.map +1 -0
  129. package/dist/collection/components/ch-input/ch-input.js +8 -10
  130. package/dist/collection/components/ch-input/ch-input.js.map +1 -1
  131. package/dist/collection/components/ch-modal/ch-modal.js +9 -3
  132. package/dist/collection/components/ch-modal/ch-modal.js.map +1 -1
  133. package/dist/collection/components/ch-page-header/ch-page-header.css +84 -0
  134. package/dist/collection/components/ch-page-header/ch-page-header.js +162 -0
  135. package/dist/collection/components/ch-page-header/ch-page-header.js.map +1 -0
  136. package/dist/collection/components/ch-radio/ch-radio.js +8 -10
  137. package/dist/collection/components/ch-radio/ch-radio.js.map +1 -1
  138. package/dist/collection/components/ch-segmented-control/ch-segmented-control.js +7 -6
  139. package/dist/collection/components/ch-segmented-control/ch-segmented-control.js.map +1 -1
  140. package/dist/collection/components/ch-select/ch-select.js +8 -10
  141. package/dist/collection/components/ch-select/ch-select.js.map +1 -1
  142. package/dist/collection/components/ch-skeleton/ch-skeleton.css +50 -0
  143. package/dist/collection/components/ch-skeleton/ch-skeleton.js +175 -0
  144. package/dist/collection/components/ch-skeleton/ch-skeleton.js.map +1 -0
  145. package/dist/collection/components/ch-spinner/ch-spinner.js +1 -1
  146. package/dist/collection/components/ch-stack/ch-stack.css +83 -0
  147. package/dist/collection/components/ch-stack/ch-stack.js +124 -0
  148. package/dist/collection/components/ch-stack/ch-stack.js.map +1 -0
  149. package/dist/collection/components/ch-switch/ch-switch.js +8 -10
  150. package/dist/collection/components/ch-switch/ch-switch.js.map +1 -1
  151. package/dist/collection/components/ch-tabs/ch-tabs.js +1 -1
  152. package/dist/collection/components/ch-textarea/ch-textarea.js +8 -10
  153. package/dist/collection/components/ch-textarea/ch-textarea.js.map +1 -1
  154. package/dist/collection/components/ch-tooltip/ch-tooltip.css +29 -1
  155. package/dist/collection/components/ch-tooltip/ch-tooltip.js +125 -6
  156. package/dist/collection/components/ch-tooltip/ch-tooltip.js.map +1 -1
  157. package/dist/collection/tokens/tokens.js +12 -0
  158. package/dist/collection/tokens/tokens.js.map +1 -1
  159. package/dist/collection/tokens/types.js.map +1 -1
  160. package/dist/collection/utils/accessibility.js +24 -0
  161. package/dist/collection/utils/accessibility.js.map +1 -0
  162. package/dist/collection/utils/icons.js +82 -0
  163. package/dist/collection/utils/icons.js.map +1 -0
  164. package/dist/collection/utils/overlay.js +101 -0
  165. package/dist/collection/utils/overlay.js.map +1 -0
  166. package/dist/collection/utils/validation-message.js +20 -0
  167. package/dist/collection/utils/validation-message.js.map +1 -0
  168. package/dist/components/ch-accordion.js +1 -1
  169. package/dist/components/ch-alert.js +1 -1
  170. package/dist/components/ch-alert.js.map +1 -1
  171. package/dist/components/ch-badge.js +1 -1
  172. package/dist/components/ch-badge.js.map +1 -1
  173. package/dist/components/ch-button.js +1 -1
  174. package/dist/components/ch-button.js.map +1 -1
  175. package/dist/components/ch-card.js +1 -1
  176. package/dist/components/ch-checkbox.js +1 -1
  177. package/dist/components/ch-checkbox.js.map +1 -1
  178. package/dist/components/ch-cluster.d.ts +11 -0
  179. package/dist/components/ch-cluster.js +2 -0
  180. package/dist/components/ch-cluster.js.map +1 -0
  181. package/dist/components/ch-divider.js +1 -1
  182. package/dist/components/ch-drawer.js +1 -1
  183. package/dist/components/ch-drawer.js.map +1 -1
  184. package/dist/components/ch-emoji.js +1 -1
  185. package/dist/components/ch-empty-state.d.ts +11 -0
  186. package/dist/components/ch-empty-state.js +2 -0
  187. package/dist/components/ch-empty-state.js.map +1 -0
  188. package/dist/components/ch-grid.d.ts +11 -0
  189. package/dist/components/ch-grid.js +2 -0
  190. package/dist/components/ch-grid.js.map +1 -0
  191. package/dist/components/ch-icon-button.d.ts +11 -0
  192. package/dist/components/ch-icon-button.js +2 -0
  193. package/dist/components/ch-icon-button.js.map +1 -0
  194. package/dist/components/ch-icon.d.ts +11 -0
  195. package/dist/components/ch-icon.js +2 -0
  196. package/dist/components/ch-icon.js.map +1 -0
  197. package/dist/components/ch-input.js +1 -1
  198. package/dist/components/ch-input.js.map +1 -1
  199. package/dist/components/ch-link.js +1 -1
  200. package/dist/components/ch-modal.js +1 -1
  201. package/dist/components/ch-modal.js.map +1 -1
  202. package/dist/components/ch-page-header.d.ts +11 -0
  203. package/dist/components/ch-page-header.js +2 -0
  204. package/dist/components/ch-page-header.js.map +1 -0
  205. package/dist/components/ch-radio.js +1 -1
  206. package/dist/components/ch-radio.js.map +1 -1
  207. package/dist/components/ch-segmented-control.js +1 -1
  208. package/dist/components/ch-segmented-control.js.map +1 -1
  209. package/dist/components/ch-select.js +1 -1
  210. package/dist/components/ch-select.js.map +1 -1
  211. package/dist/components/ch-skeleton.d.ts +11 -0
  212. package/dist/components/ch-skeleton.js +2 -0
  213. package/dist/components/ch-skeleton.js.map +1 -0
  214. package/dist/components/ch-spinner.js +1 -1
  215. package/dist/components/ch-stack.d.ts +11 -0
  216. package/dist/components/ch-stack.js +2 -0
  217. package/dist/components/ch-stack.js.map +1 -0
  218. package/dist/components/ch-switch.js +1 -1
  219. package/dist/components/ch-switch.js.map +1 -1
  220. package/dist/components/ch-tabs.js +1 -1
  221. package/dist/components/ch-textarea.js +1 -1
  222. package/dist/components/ch-textarea.js.map +1 -1
  223. package/dist/components/ch-tooltip.js +1 -1
  224. package/dist/components/ch-tooltip.js.map +1 -1
  225. package/dist/components/index.js +1 -1
  226. package/dist/components/index.js.map +1 -1
  227. package/dist/components/p-BXzZsX2r.js +2 -0
  228. package/dist/components/p-BXzZsX2r.js.map +1 -0
  229. package/dist/components/{p-C1995t1C.js → p-CV0rD-fF.js} +2 -2
  230. package/dist/components/p-CnivhwvG.js +2 -0
  231. package/dist/components/p-CnivhwvG.js.map +1 -0
  232. package/dist/components/p-qP_9qshx.js +2 -0
  233. package/dist/components/p-qP_9qshx.js.map +1 -0
  234. package/dist/esm/ch-accordion.entry.js +1 -1
  235. package/dist/esm/ch-alert_8.entry.js +69 -38
  236. package/dist/esm/ch-alert_8.entry.js.map +1 -1
  237. package/dist/esm/ch-checkbox.entry.js +9 -11
  238. package/dist/esm/ch-checkbox.entry.js.map +1 -1
  239. package/dist/esm/ch-cluster.entry.js +45 -0
  240. package/dist/esm/ch-cluster.entry.js.map +1 -0
  241. package/dist/esm/ch-divider.entry.js +2 -2
  242. package/dist/esm/ch-drawer.entry.js +4 -3
  243. package/dist/esm/ch-drawer.entry.js.map +1 -1
  244. package/dist/esm/ch-emoji.entry.js +2 -2
  245. package/dist/esm/ch-empty-state.entry.js +32 -0
  246. package/dist/esm/ch-empty-state.entry.js.map +1 -0
  247. package/dist/esm/ch-grid.entry.js +57 -0
  248. package/dist/esm/ch-grid.entry.js.map +1 -0
  249. package/dist/esm/ch-icon-button.entry.js +49 -0
  250. package/dist/esm/ch-icon-button.entry.js.map +1 -0
  251. package/dist/esm/ch-icon.entry.js +36 -0
  252. package/dist/esm/ch-icon.entry.js.map +1 -0
  253. package/dist/esm/ch-link.entry.js +1 -1
  254. package/dist/esm/ch-modal.entry.js +4 -3
  255. package/dist/esm/ch-modal.entry.js.map +1 -1
  256. package/dist/esm/ch-page-header.entry.js +43 -0
  257. package/dist/esm/ch-page-header.entry.js.map +1 -0
  258. package/dist/esm/ch-radio.entry.js +9 -11
  259. package/dist/esm/ch-radio.entry.js.map +1 -1
  260. package/dist/esm/ch-segmented-control.entry.js +8 -7
  261. package/dist/esm/ch-segmented-control.entry.js.map +1 -1
  262. package/dist/esm/ch-skeleton.entry.js +56 -0
  263. package/dist/esm/ch-skeleton.entry.js.map +1 -0
  264. package/dist/esm/ch-stack.entry.js +35 -0
  265. package/dist/esm/ch-stack.entry.js.map +1 -0
  266. package/dist/esm/ch-tabs.entry.js +2 -2
  267. package/dist/esm/ch-textarea.entry.js +9 -11
  268. package/dist/esm/ch-textarea.entry.js.map +1 -1
  269. package/dist/esm/ch-tooltip.entry.js +204 -5
  270. package/dist/esm/ch-tooltip.entry.js.map +1 -1
  271. package/dist/esm/chucao.js +4 -4
  272. package/dist/esm/chucao.js.map +1 -1
  273. package/dist/esm/icons-CnivhwvG.js +86 -0
  274. package/dist/esm/icons-CnivhwvG.js.map +1 -0
  275. package/dist/esm/{index-DWC12BJ-.js → index-CIV5Gg1o.js} +119 -17
  276. package/dist/esm/index-CIV5Gg1o.js.map +1 -0
  277. package/dist/esm/index.js +13 -1
  278. package/dist/esm/index.js.map +1 -1
  279. package/dist/esm/loader.js +3 -3
  280. package/dist/esm/validation-message-BXzZsX2r.js +24 -0
  281. package/dist/esm/validation-message-BXzZsX2r.js.map +1 -0
  282. package/dist/types/components/ch-alert/ch-alert.d.ts +11 -0
  283. package/dist/types/components/ch-badge/ch-badge.d.ts +14 -0
  284. package/dist/types/components/ch-button/ch-button.d.ts +3 -1
  285. package/dist/types/components/ch-cluster/ch-cluster.d.ts +28 -0
  286. package/dist/types/components/ch-drawer/ch-drawer.d.ts +2 -1
  287. package/dist/types/components/ch-empty-state/ch-empty-state.d.ts +25 -0
  288. package/dist/types/components/ch-grid/ch-grid.d.ts +38 -0
  289. package/dist/types/components/ch-icon/ch-icon.d.ts +29 -0
  290. package/dist/types/components/ch-icon-button/ch-icon-button.d.ts +36 -0
  291. package/dist/types/components/ch-modal/ch-modal.d.ts +2 -1
  292. package/dist/types/components/ch-page-header/ch-page-header.d.ts +39 -0
  293. package/dist/types/components/ch-skeleton/ch-skeleton.d.ts +39 -0
  294. package/dist/types/components/ch-stack/ch-stack.d.ts +26 -0
  295. package/dist/types/components/ch-tooltip/ch-tooltip.d.ts +32 -2
  296. package/dist/types/components.d.ts +807 -8
  297. package/dist/types/stencil-public-runtime.d.ts +61 -55
  298. package/dist/types/tokens/tokens.d.ts +12 -0
  299. package/dist/types/tokens/types.d.ts +2 -1
  300. package/dist/types/utils/accessibility.d.ts +2 -0
  301. package/dist/types/utils/icons.d.ts +15 -0
  302. package/dist/types/utils/overlay.d.ts +49 -0
  303. package/dist/types/utils/validation-message.d.ts +20 -0
  304. package/dist-react/components.d.ts +27 -1
  305. package/dist-react/components.js +72 -0
  306. package/dist-react/components.ts +97 -1
  307. package/dist-vue/index.d.ts +8 -0
  308. package/dist-vue/index.js +62 -1
  309. package/dist-vue/index.ts +78 -1
  310. package/hydrate/index.js +1114 -132
  311. package/hydrate/index.mjs +1114 -132
  312. package/package.json +112 -5
  313. package/dist/chucao/p-37e7f9cc.entry.js +0 -2
  314. package/dist/chucao/p-37e7f9cc.entry.js.map +0 -1
  315. package/dist/chucao/p-3db38c49.entry.js +0 -2
  316. package/dist/chucao/p-3db38c49.entry.js.map +0 -1
  317. package/dist/chucao/p-60c2fd71.entry.js +0 -2
  318. package/dist/chucao/p-60c2fd71.entry.js.map +0 -1
  319. package/dist/chucao/p-6c617158.entry.js +0 -2
  320. package/dist/chucao/p-6c617158.entry.js.map +0 -1
  321. package/dist/chucao/p-DWC12BJ-.js +0 -3
  322. package/dist/chucao/p-DWC12BJ-.js.map +0 -1
  323. package/dist/chucao/p-aeea9cbe.entry.js +0 -2
  324. package/dist/chucao/p-aeea9cbe.entry.js.map +0 -1
  325. package/dist/chucao/p-bb2445d1.entry.js +0 -2
  326. package/dist/chucao/p-c4806e96.entry.js +0 -2
  327. package/dist/chucao/p-c4806e96.entry.js.map +0 -1
  328. package/dist/chucao/p-e3265e38.entry.js +0 -2
  329. package/dist/chucao/p-e3265e38.entry.js.map +0 -1
  330. package/dist/chucao/p-f78f0163.entry.js +0 -2
  331. package/dist/chucao/p-f78f0163.entry.js.map +0 -1
  332. package/dist/cjs/index-C9cpLteP.js.map +0 -1
  333. package/dist/components/p-BhAZrOxf.js +0 -2
  334. package/dist/components/p-BhAZrOxf.js.map +0 -1
  335. package/dist/esm/index-DWC12BJ-.js.map +0 -1
  336. /package/dist/chucao/{p-ff5f5c1f.entry.js.map → p-1108062e.entry.js.map} +0 -0
  337. /package/dist/chucao/{p-04dbcfa0.entry.js.map → p-337d7f68.entry.js.map} +0 -0
  338. /package/dist/chucao/{p-bb2445d1.entry.js.map → p-4846cac4.entry.js.map} +0 -0
  339. /package/dist/chucao/{p-6a4bc80c.entry.js.map → p-9f73855e.entry.js.map} +0 -0
  340. /package/dist/chucao/{p-c986036f.entry.js.map → p-b6cc08f0.entry.js.map} +0 -0
  341. /package/dist/components/{p-C1995t1C.js.map → p-CV0rD-fF.js.map} +0 -0
package/hydrate/index.mjs CHANGED
@@ -1,6 +1,10 @@
1
1
  import { Readable } from 'stream';
2
2
 
3
- const modeResolutionChain = [];
3
+ const modeResolver = [];
4
+
5
+ // captured here, at true module scope, before hydrateFactory shadows the
6
+ // AbortController identifier for component code below.
7
+ var $stencilNativeAbortController = AbortController;
4
8
 
5
9
  function hydrateFactory($stencilWindow, $stencilHydrateOpts, $stencilHydrateResults, $stencilAfterHydrate, $stencilHydrateResolve) {
6
10
  var globalThis = $stencilWindow;
@@ -93,8 +97,46 @@ function hydrateFactory($stencilWindow, $stencilHydrateOpts, $stencilHydrateResu
93
97
 
94
98
  var fetch, FetchError, Headers, Request, Response;
95
99
 
100
+ // Aborted when the render times out or errors, so in-flight fetch() calls
101
+ // made by component code stop holding the render's window/results alive
102
+ // instead of running to completion against a torn-down window. See #6864.
103
+ var $stencilAbortController = new $stencilNativeAbortController();
104
+
105
+ // Any AbortController a component creates itself is transparently wired to
106
+ // cascade-abort when the render times out too, so component code using the
107
+ // standard AbortController convention for its own cancellable work (axios,
108
+ // aws-sdk v3, the mongodb driver, etc.) gets cancelled automatically.
109
+ var AbortController = function () {
110
+ var controller = new $stencilNativeAbortController();
111
+ $stencilAbortController.signal.addEventListener(
112
+ 'abort',
113
+ function () {
114
+ controller.abort();
115
+ },
116
+ { once: true },
117
+ );
118
+ return controller;
119
+ };
120
+
121
+ function $stencilFetchSignal(callerSignal) {
122
+ if (!callerSignal) {
123
+ return $stencilAbortController.signal;
124
+ }
125
+ if (callerSignal.aborted || $stencilAbortController.signal.aborted) {
126
+ return callerSignal.aborted ? callerSignal : $stencilAbortController.signal;
127
+ }
128
+ var merged = new $stencilNativeAbortController();
129
+ var onAbort = function () { merged.abort(); };
130
+ callerSignal.addEventListener('abort', onAbort, { once: true });
131
+ $stencilAbortController.signal.addEventListener('abort', onAbort, { once: true });
132
+ return merged.signal;
133
+ }
134
+
96
135
  if (typeof $stencilWindow.fetch === 'function') {
97
- fetch = $stencilWindow.fetch;
136
+ var $stencilRawFetch = $stencilWindow.fetch;
137
+ fetch = $stencilWindow.fetch = function(input, init) {
138
+ return $stencilRawFetch(input, Object.assign({}, init, { signal: $stencilFetchSignal(init && init.signal) }));
139
+ };
98
140
  } else {
99
141
  fetch = $stencilWindow.fetch = function() { throw new Error('fetch() is not implemented'); };
100
142
  }
@@ -133,7 +175,7 @@ const NAMESPACE = 'chucao';
133
175
  const BUILD = /* chucao */ { hotModuleReplacement: false, slotRelocation: true, state: true, updatable: true};
134
176
 
135
177
  /*
136
- Stencil Hydrate Platform v4.44.2 | MIT Licensed | https://stenciljs.com
178
+ Stencil Hydrate Platform v4.45.1 | MIT Licensed | https://stenciljs.com
137
179
  */
138
180
  var __create = Object.create;
139
181
  var __defProp = Object.defineProperty;
@@ -381,6 +423,10 @@ var require_brace_expansion = __commonJS({
381
423
  }
382
424
  }
383
425
  });
426
+
427
+ // src/utils/constants.ts
428
+ var SVG_NS = "http://www.w3.org/2000/svg";
429
+ var HTML_NS = "http://www.w3.org/1999/xhtml";
384
430
  var PrimitiveType = /* @__PURE__ */ ((PrimitiveType2) => {
385
431
  PrimitiveType2["Undefined"] = "undefined";
386
432
  PrimitiveType2["Null"] = "null";
@@ -797,6 +843,13 @@ var h = (nodeName, vnodeData, ...children) => {
797
843
  }
798
844
  }
799
845
  }
846
+ if (typeof nodeName === "function") {
847
+ return nodeName(
848
+ vnodeData === null ? {} : vnodeData,
849
+ vNodeChildren,
850
+ vdomFnUtils
851
+ );
852
+ }
800
853
  const vnode = newVNode(nodeName, null);
801
854
  vnode.$attrs$ = vnodeData;
802
855
  if (vNodeChildren.length > 0) {
@@ -832,6 +885,36 @@ var newVNode = (tag, text) => {
832
885
  };
833
886
  var Host = {};
834
887
  var isHost = (node) => node && node.$tag$ === Host;
888
+ var vdomFnUtils = {
889
+ forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
890
+ map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate)
891
+ };
892
+ var convertToPublic = (node) => ({
893
+ vattrs: node.$attrs$,
894
+ vchildren: node.$children$,
895
+ vkey: node.$key$,
896
+ vname: node.$name$,
897
+ vtag: node.$tag$,
898
+ vtext: node.$text$
899
+ });
900
+ var convertToPrivate = (node) => {
901
+ if (typeof node.vtag === "function") {
902
+ const vnodeData = { ...node.vattrs };
903
+ if (node.vkey) {
904
+ vnodeData.key = node.vkey;
905
+ }
906
+ if (node.vname) {
907
+ vnodeData.name = node.vname;
908
+ }
909
+ return h(node.vtag, vnodeData, ...node.vchildren || []);
910
+ }
911
+ const vnode = newVNode(node.vtag, node.vtext);
912
+ vnode.$attrs$ = node.vattrs;
913
+ vnode.$children$ = node.vchildren;
914
+ vnode.$key$ = node.vkey;
915
+ vnode.$name$ = node.vname;
916
+ return vnode;
917
+ };
835
918
 
836
919
  // src/runtime/client-hydrate.ts
837
920
  var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
@@ -1525,13 +1608,14 @@ var scopeSelector = (selector, scopeSelectorText, hostSelector, slotSelector) =>
1525
1608
  }
1526
1609
  }).join(", ");
1527
1610
  };
1611
+ var isScopableAtRule = (selector) => selector.startsWith("@media") || selector.startsWith("@supports") || selector.startsWith("@page") || selector.startsWith("@document") || selector.startsWith("@layer");
1528
1612
  var scopeSelectors = (cssText, scopeSelectorText, hostSelector, slotSelector, commentOriginalSelector) => {
1529
1613
  return processRules(cssText, (rule) => {
1530
1614
  let selector = rule.selector;
1531
1615
  let content = rule.content;
1532
1616
  if (rule.selector[0] !== "@") {
1533
1617
  selector = scopeSelector(rule.selector, scopeSelectorText, hostSelector, slotSelector);
1534
- } else if (rule.selector.startsWith("@media") || rule.selector.startsWith("@supports") || rule.selector.startsWith("@page") || rule.selector.startsWith("@document")) {
1618
+ } else if (isScopableAtRule(rule.selector)) {
1535
1619
  content = scopeSelectors(rule.content, scopeSelectorText, hostSelector, slotSelector);
1536
1620
  }
1537
1621
  const cssRule = {
@@ -1610,15 +1694,16 @@ var scopeCss = (cssText, scopeId2, commentOriginalSelector) => {
1610
1694
  rule.selector = placeholder + rule.selector;
1611
1695
  return rule;
1612
1696
  };
1613
- cssText = processRules(cssText, (rule) => {
1697
+ const commentSelectors = (input) => processRules(input, (rule) => {
1614
1698
  if (rule.selector[0] !== "@") {
1615
1699
  return processCommentedSelector(rule);
1616
- } else if (rule.selector.startsWith("@media") || rule.selector.startsWith("@supports") || rule.selector.startsWith("@page") || rule.selector.startsWith("@document")) {
1617
- rule.content = processRules(rule.content, processCommentedSelector);
1618
- return rule;
1700
+ }
1701
+ if (isScopableAtRule(rule.selector)) {
1702
+ rule.content = commentSelectors(rule.content);
1619
1703
  }
1620
1704
  return rule;
1621
1705
  });
1706
+ cssText = commentSelectors(cssText);
1622
1707
  }
1623
1708
  const scoped = scopeCssText(cssText, scopeId2, hostScopeId, slotScopeId);
1624
1709
  cssText = [scoped.cssText, ...commentsWithHash].join("\n");
@@ -1634,6 +1719,8 @@ var scopeCss = (cssText, scopeId2, commentOriginalSelector) => {
1634
1719
  cssText = expandPartSelectors(cssText);
1635
1720
  return cssText;
1636
1721
  };
1722
+ var setMode = (handler) => {
1723
+ };
1637
1724
 
1638
1725
  // src/runtime/normalize-watchers.ts
1639
1726
  var normalizeWatchers = (raw) => {
@@ -1841,6 +1928,23 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
1841
1928
  classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
1842
1929
  classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
1843
1930
  }
1931
+ } else if (memberName === "style") {
1932
+ {
1933
+ for (const prop in oldValue) {
1934
+ if (!newValue || newValue[prop] == null) {
1935
+ {
1936
+ elm.style[prop] = "";
1937
+ }
1938
+ }
1939
+ }
1940
+ }
1941
+ for (const prop in newValue) {
1942
+ if (!oldValue || newValue[prop] !== oldValue[prop]) {
1943
+ {
1944
+ elm.style[prop] = newValue[prop];
1945
+ }
1946
+ }
1947
+ }
1844
1948
  } else if (memberName === "key") ; else if (memberName === "ref") {
1845
1949
  if (newValue) {
1846
1950
  queueRefAttachment(newValue, elm);
@@ -2025,12 +2129,19 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
2025
2129
  updateElement(null, newVNode2, isSvgMode);
2026
2130
  }
2027
2131
  } else {
2132
+ if (!isSvgMode) {
2133
+ isSvgMode = newVNode2.$tag$ === "svg";
2134
+ }
2028
2135
  if (!win.document) {
2029
2136
  throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");
2030
2137
  }
2031
- elm = newVNode2.$elm$ = win.document.createElement(
2138
+ elm = newVNode2.$elm$ = win.document.createElementNS(
2139
+ isSvgMode ? SVG_NS : HTML_NS,
2032
2140
  !useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
2033
- );
2141
+ ) ;
2142
+ if (isSvgMode && newVNode2.$tag$ === "foreignObject") {
2143
+ isSvgMode = false;
2144
+ }
2034
2145
  {
2035
2146
  updateElement(null, newVNode2, isSvgMode);
2036
2147
  }
@@ -2046,6 +2157,13 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
2046
2157
  }
2047
2158
  }
2048
2159
  }
2160
+ {
2161
+ if (newVNode2.$tag$ === "svg") {
2162
+ isSvgMode = false;
2163
+ } else if (elm.tagName === "foreignObject") {
2164
+ isSvgMode = true;
2165
+ }
2166
+ }
2049
2167
  }
2050
2168
  elm["s-hn"] = hostTagName;
2051
2169
  {
@@ -2211,7 +2329,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
2211
2329
  if (idxInOld >= 0) {
2212
2330
  elmToMove = oldCh[idxInOld];
2213
2331
  if (elmToMove.$tag$ !== newStartVnode.$tag$) {
2214
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
2332
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
2215
2333
  } else {
2216
2334
  patch(elmToMove, newStartVnode, isInitialRender);
2217
2335
  oldCh[idxInOld] = void 0;
@@ -2270,6 +2388,9 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
2270
2388
  const text = newVNode2.$text$;
2271
2389
  let defaultHolder;
2272
2390
  if (text == null) {
2391
+ {
2392
+ isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
2393
+ }
2273
2394
  {
2274
2395
  if (tag === "slot" && !useNativeShadowDom) {
2275
2396
  if (oldVNode.$name$ !== newVNode2.$name$) {
@@ -2294,6 +2415,9 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
2294
2415
  } else if (isInitialRender && BUILD.updatable && oldChildren !== null && newChildren === null) {
2295
2416
  newVNode2.$children$ = oldChildren;
2296
2417
  }
2418
+ if (isSvgMode && tag === "svg") {
2419
+ isSvgMode = false;
2420
+ }
2297
2421
  } else if ((defaultHolder = elm["s-cr"])) {
2298
2422
  defaultHolder.parentNode.textContent = text;
2299
2423
  } else if (oldVNode.$text$ !== text) {
@@ -3074,6 +3198,9 @@ var getHostListenerTarget = (doc, elm, flags) => {
3074
3198
  if (flags & 4 /* TargetDocument */) {
3075
3199
  return doc;
3076
3200
  }
3201
+ if (flags & 8 /* TargetWindow */) {
3202
+ return win;
3203
+ }
3077
3204
  return elm;
3078
3205
  };
3079
3206
  var hostListenerOpts = (flags) => (flags & 2 /* Capture */) !== 0;
@@ -4949,7 +5076,7 @@ function forceUpdate2() {
4949
5076
  }
4950
5077
 
4951
5078
  // src/hydrate/platform/hydrate-app.ts
4952
- function hydrateApp(win2, opts, results, afterHydrate, resolve) {
5079
+ function hydrateApp(win2, opts, results, afterHydrate, resolve, abortController) {
4953
5080
  const connectedElements = /* @__PURE__ */ new Set();
4954
5081
  const createdElements = /* @__PURE__ */ new Set();
4955
5082
  const waitingElements = /* @__PURE__ */ new Set();
@@ -4959,6 +5086,13 @@ function hydrateApp(win2, opts, results, afterHydrate, resolve) {
4959
5086
  setScopedSSR(opts);
4960
5087
  let tmrId;
4961
5088
  let ranCompleted = false;
5089
+ const abortedPromise = new Promise((res) => {
5090
+ if (abortController.signal.aborted) {
5091
+ res();
5092
+ } else {
5093
+ abortController.signal.addEventListener("abort", () => res(), { once: true });
5094
+ }
5095
+ });
4962
5096
  function hydratedComplete() {
4963
5097
  globalThis.clearTimeout(tmrId);
4964
5098
  createdElements.clear();
@@ -4980,6 +5114,7 @@ function hydrateApp(win2, opts, results, afterHydrate, resolve) {
4980
5114
  }
4981
5115
  function hydratedError(err2) {
4982
5116
  renderCatchError(opts, results, err2);
5117
+ abortController.abort();
4983
5118
  hydratedComplete();
4984
5119
  }
4985
5120
  function timeoutExceeded() {
@@ -5025,7 +5160,7 @@ function hydrateApp(win2, opts, results, afterHydrate, resolve) {
5025
5160
  if (isValidComponent(elm, opts) && results.hydratedCount < opts.maxHydrateCount) {
5026
5161
  if (!connectedElements.has(elm) && shouldHydrate(elm)) {
5027
5162
  connectedElements.add(elm);
5028
- return hydrateComponent.call(elm, win2, results, elm.nodeName, elm, waitingElements);
5163
+ return hydrateComponent.call(elm, win2, results, elm.nodeName, elm, waitingElements, abortedPromise);
5029
5164
  }
5030
5165
  }
5031
5166
  return resolved2;
@@ -5048,13 +5183,16 @@ function hydrateApp(win2, opts, results, afterHydrate, resolve) {
5048
5183
  };
5049
5184
  tmrId = globalThis.setTimeout(timeoutExceeded, opts.timeout);
5050
5185
  plt.$resourcesUrl$ = new URL(opts.resourcesUrl || "./", win2.document.baseURI).href;
5186
+ if (Array.isArray(opts.modes)) {
5187
+ opts.modes.forEach((mode) => setMode());
5188
+ }
5051
5189
  patchChild2(win2.document.body);
5052
5190
  waitLoop2().then(hydratedComplete).catch(hydratedError);
5053
5191
  } catch (e) {
5054
5192
  hydratedError(e);
5055
5193
  }
5056
5194
  }
5057
- async function hydrateComponent(win2, results, tagName, elm, waitingElements) {
5195
+ async function hydrateComponent(win2, results, tagName, elm, waitingElements, aborted) {
5058
5196
  tagName = tagName.toLowerCase();
5059
5197
  const Cstr = loadModule(
5060
5198
  {
@@ -5070,17 +5208,19 @@ async function hydrateComponent(win2, results, tagName, elm, waitingElements) {
5070
5208
  addHostEventListeners(this, hostRef, cmpMeta.$listeners$);
5071
5209
  try {
5072
5210
  connectedCallback(elm);
5073
- await elm.componentOnReady();
5074
- results.hydratedCount++;
5075
- const ref = getHostRef(elm);
5076
- const modeName = !(ref == null ? void 0 : ref.$modeName$) ? "$" : ref == null ? void 0 : ref.$modeName$;
5077
- if (!results.components.some((c) => c.tag === tagName && c.mode === modeName)) {
5078
- results.components.push({
5079
- tag: tagName,
5080
- mode: modeName,
5081
- count: 0,
5082
- depth: -1
5083
- });
5211
+ const wasAborted = await Promise.race([elm.componentOnReady().then(() => false), aborted.then(() => true)]);
5212
+ if (!wasAborted) {
5213
+ results.hydratedCount++;
5214
+ const ref = getHostRef(elm);
5215
+ const modeName = !(ref == null ? void 0 : ref.$modeName$) ? "$" : ref == null ? void 0 : ref.$modeName$;
5216
+ if (!results.components.some((c) => c.tag === tagName && c.mode === modeName)) {
5217
+ results.components.push({
5218
+ tag: tagName,
5219
+ mode: modeName,
5220
+ count: 0,
5221
+ depth: -1
5222
+ });
5223
+ }
5084
5224
  }
5085
5225
  } catch (e) {
5086
5226
  win2.console.error(e);
@@ -5377,8 +5517,100 @@ class ChAccordion {
5377
5517
  }; }
5378
5518
  }
5379
5519
 
5380
- 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}}`;
5520
+ const chIcons = {
5521
+ alert: [
5522
+ { tag: 'path', attrs: { d: 'm21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3' } },
5523
+ { tag: 'path', attrs: { d: 'M12 9v4' } },
5524
+ { tag: 'path', attrs: { d: 'M12 17h.01' } },
5525
+ ],
5526
+ arrowRight: [
5527
+ { tag: 'path', attrs: { d: 'M5 12h14' } },
5528
+ { tag: 'path', attrs: { d: 'm12 5 7 7-7 7' } },
5529
+ ],
5530
+ check: [{ tag: 'path', attrs: { d: 'M20 6 9 17l-5-5' } }],
5531
+ chevronDown: [{ tag: 'path', attrs: { d: 'm6 9 6 6 6-6' } }],
5532
+ chevronRight: [{ tag: 'path', attrs: { d: 'm9 18 6-6-6-6' } }],
5533
+ close: [
5534
+ { tag: 'path', attrs: { d: 'M18 6 6 18' } },
5535
+ { tag: 'path', attrs: { d: 'm6 6 12 12' } },
5536
+ ],
5537
+ copy: [
5538
+ { tag: 'rect', attrs: { width: '14', height: '14', x: '8', y: '8', rx: '2', ry: '2' } },
5539
+ { tag: 'path', attrs: { d: 'M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2' } },
5540
+ ],
5541
+ delete: [
5542
+ { tag: 'path', attrs: { d: 'M10 11v6' } },
5543
+ { tag: 'path', attrs: { d: 'M14 11v6' } },
5544
+ { tag: 'path', attrs: { d: 'M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6' } },
5545
+ { tag: 'path', attrs: { d: 'M3 6h18' } },
5546
+ { tag: 'path', attrs: { d: 'M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2' } },
5547
+ ],
5548
+ download: [
5549
+ { tag: 'path', attrs: { d: 'M12 15V3' } },
5550
+ { tag: 'path', attrs: { d: 'M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4' } },
5551
+ { tag: 'path', attrs: { d: 'm7 10 5 5 5-5' } },
5552
+ ],
5553
+ error: [
5554
+ { tag: 'circle', attrs: { cx: '12', cy: '12', r: '10' } },
5555
+ { tag: 'line', attrs: {} },
5556
+ { tag: 'line', attrs: {} },
5557
+ ],
5558
+ externalLink: [
5559
+ { tag: 'path', attrs: { d: 'M15 3h6v6' } },
5560
+ { tag: 'path', attrs: { d: 'M10 14 21 3' } },
5561
+ { tag: 'path', attrs: { d: 'M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6' } },
5562
+ ],
5563
+ info: [
5564
+ { tag: 'circle', attrs: { cx: '12', cy: '12', r: '10' } },
5565
+ { tag: 'path', attrs: { d: 'M12 16v-4' } },
5566
+ { tag: 'path', attrs: { d: 'M12 8h.01' } },
5567
+ ],
5568
+ menu: [
5569
+ { tag: 'path', attrs: { d: 'M4 5h16' } },
5570
+ { tag: 'path', attrs: { d: 'M4 12h16' } },
5571
+ { tag: 'path', attrs: { d: 'M4 19h16' } },
5572
+ ],
5573
+ plus: [
5574
+ { tag: 'path', attrs: { d: 'M5 12h14' } },
5575
+ { tag: 'path', attrs: { d: 'M12 5v14' } },
5576
+ ],
5577
+ search: [
5578
+ { tag: 'path', attrs: { d: 'm21 21-4.34-4.34' } },
5579
+ { tag: 'circle', attrs: { cx: '11', cy: '11', r: '8' } },
5580
+ ],
5581
+ spinner: [
5582
+ { tag: 'path', attrs: { d: 'M12 2v4' } },
5583
+ { tag: 'path', attrs: { d: 'm16.2 7.8 2.9-2.9' } },
5584
+ { tag: 'path', attrs: { d: 'M18 12h4' } },
5585
+ { tag: 'path', attrs: { d: 'm16.2 16.2 2.9 2.9' } },
5586
+ { tag: 'path', attrs: { d: 'M12 18v4' } },
5587
+ { tag: 'path', attrs: { d: 'm4.9 19.1 2.9-2.9' } },
5588
+ { tag: 'path', attrs: { d: 'M2 12h4' } },
5589
+ { tag: 'path', attrs: { d: 'm4.9 4.9 2.9 2.9' } },
5590
+ ],
5591
+ success: [
5592
+ { tag: 'circle', attrs: { cx: '12', cy: '12', r: '10' } },
5593
+ { tag: 'path', attrs: { d: 'm16 9-5.5 5.5L8 12' } },
5594
+ ],
5595
+ upload: [
5596
+ { tag: 'path', attrs: { d: 'M12 3v12' } },
5597
+ { tag: 'path', attrs: { d: 'm17 8-5-5-5 5' } },
5598
+ { tag: 'path', attrs: { d: 'M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4' } },
5599
+ ],
5600
+ };
5601
+
5602
+ 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-left:var(--border-accent-bar) solid transparent;border-radius:var(--radius);font-size:var(--typography-size-sm);line-height:1.5}.alert-icon{width:var(--icon-size-md);height:var(--icon-size-md);flex:none;margin-top:1px}.alert-content{flex:1;min-width:0;overflow-wrap:anywhere}.alert--default{color:var(--text);background:var(--surface);border-color:var(--border);border-left-color:var(--color-text-secondary)}.alert--positive{color:var(--color-status-positive);background:var(--color-status-positive-background);border-color:var(--color-status-positive);border-left-color:var(--color-status-positive)}.alert--warning{color:var(--color-status-warning);background:var(--color-status-warning-background);border-color:var(--color-status-warning);border-left-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}}`;
5381
5603
 
5604
+ /**
5605
+ * The glyph paired with each variant. It is what makes the variants
5606
+ * distinguishable without colour: `default` is informational, `positive`
5607
+ * confirms and `warning` warns, and each reads differently in grayscale.
5608
+ */
5609
+ const VARIANT_ICON = {
5610
+ default: 'info',
5611
+ positive: 'success',
5612
+ warning: 'alert',
5613
+ };
5382
5614
  /**
5383
5615
  * Block-level status message.
5384
5616
  *
@@ -5387,6 +5619,11 @@ const chAlertCss = () => `:host{display:block}.alert{display:flex;align-items:fl
5387
5619
  * interrupt. Both announce reliably when the alert is added to the page in
5388
5620
  * response to something — an alert already present at load may not be read out,
5389
5621
  * which is how live regions work rather than something this component controls.
5622
+ *
5623
+ * Every variant also carries an icon and a thicker leading edge, so the three
5624
+ * states stay distinguishable without colour vision. The icon is decorative:
5625
+ * the text next to it already says what happened, and announcing "check
5626
+ * circle" before it would only add noise.
5390
5627
  */
5391
5628
  class ChAlert {
5392
5629
  constructor(hostRef) {
@@ -5405,6 +5642,12 @@ class ChAlert {
5405
5642
  * so without a label it would have no accessible name at all.
5406
5643
  */
5407
5644
  dismissLabel;
5645
+ /**
5646
+ * Whether to show the variant's icon. On by default so the status is not
5647
+ * colour-only; turn it off when the surrounding copy already carries the cue
5648
+ * and a second marker would be redundant.
5649
+ */
5650
+ statusCue = true;
5408
5651
  /**
5409
5652
  * Emitted when the dismiss button is clicked. The alert stays in the DOM —
5410
5653
  * whether to remove it is the consumer's decision. If you do remove it, move
@@ -5417,7 +5660,8 @@ class ChAlert {
5417
5660
  };
5418
5661
  render() {
5419
5662
  const role = this.variant === 'warning' ? 'alert' : 'status';
5420
- return (hAsync(Host, { key: '7d96602ad2c2b3824588f01d5b94d73098da6ce4' }, hAsync("div", { key: role, class: { alert: true, [`alert--${this.variant}`]: true }, role: role }, hAsync("div", { key: '64d7af5aad0e4b103b35cc2ba3756b1a1601b148', class: "alert-content" }, hAsync("slot", { key: '44573092407161bbeafe5117bddb54168b183d90' })), this.dismissLabel && (hAsync("button", { key: '018858ac292c0fb7f26c788f629638f533d0dfd6', class: "alert-dismiss", type: "button", "aria-label": this.dismissLabel, onClick: this.handleDismiss }, hAsync("span", { key: 'f6454d5285ed9c7c414d839d2d35d2ce0c271dd4', "aria-hidden": "true" }, "\u00D7"))))));
5663
+ const shapes = this.statusCue ? chIcons[VARIANT_ICON[this.variant]] : undefined;
5664
+ return (hAsync(Host, { key: '5a14801af29be0634bd35cf8706446a3a5d33286' }, hAsync("div", { key: role, class: { alert: true, [`alert--${this.variant}`]: true }, role: role }, shapes && (hAsync("svg", { key: 'dbaf65b9d7dc08e2ba51b60b273a16ae42eacb02', 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 => hAsync(shape.tag, shape.attrs)))), hAsync("div", { key: 'ad1c508dea9e3f9e718ec8104f8236065f3eb0e8', class: "alert-content" }, hAsync("slot", { key: '6f906d355fa416b674994716a3ca896ae517f492' })), this.dismissLabel && (hAsync("button", { key: '165af98fa093bda95c785e86c078b69aee2c0580', class: "alert-dismiss", type: "button", "aria-label": this.dismissLabel, onClick: this.handleDismiss }, hAsync("span", { key: '0a05eff2d077559dc267bd72898299c5d42eaf8a', "aria-hidden": "true" }, "\u00D7"))))));
5421
5665
  }
5422
5666
  static get style() { return chAlertCss(); }
5423
5667
  static get cmpMeta() { return {
@@ -5425,7 +5669,8 @@ class ChAlert {
5425
5669
  "$tagName$": "ch-alert",
5426
5670
  "$members$": {
5427
5671
  "variant": [1],
5428
- "dismissLabel": [1, "dismiss-label"]
5672
+ "dismissLabel": [1, "dismiss-label"],
5673
+ "statusCue": [4, "status-cue"]
5429
5674
  },
5430
5675
  "$listeners$": undefined,
5431
5676
  "$lazyBundleId$": "-",
@@ -5433,8 +5678,16 @@ class ChAlert {
5433
5678
  }; }
5434
5679
  }
5435
5680
 
5436
- const chBadgeCss = () => `:host{display:inline-block}.badge{display:inline-block;padding:var(--spacing-2xs) var(--spacing-lg);border-radius:var(--radius-pill);font-size:var(--typography-size-xs);font-weight:var(--typography-weight-semibold);text-transform:uppercase;letter-spacing:var(--typography-tracking-badge)}.badge--default{background:var(--color-surface-hover);color:var(--accent)}.badge--positive{background:var(--color-status-positive-background);color:var(--color-status-positive)}.badge--warning{background:var(--color-status-warning-background);color:var(--color-status-warning)}`;
5681
+ const chBadgeCss = () => `:host{display:inline-block}.badge{display:inline-flex;align-items:center;gap:var(--spacing-xs);padding:var(--spacing-2xs) var(--spacing-lg);border:var(--border-width) solid transparent;border-radius:var(--radius-pill);font-size:var(--typography-size-xs);font-weight:var(--typography-weight-semibold);text-transform:uppercase;letter-spacing:var(--typography-tracking-badge)}.badge-dot{display:block;flex:none;width:0.45em;height:0.45em;background:currentColor;border-radius:var(--radius-pill)}.badge--default{background:var(--color-surface-hover);color:var(--accent);border-color:var(--accent)}.badge--positive{background:var(--color-status-positive-background);color:var(--color-status-positive);border-color:var(--color-status-positive)}.badge--positive .badge-dot{background:transparent;border:var(--border-width) solid currentColor;border-radius:var(--radius-pill)}.badge--warning{background:var(--color-status-warning-background);color:var(--color-status-warning);border-color:var(--color-status-warning)}.badge--warning .badge-dot{border-radius:0}`;
5437
5682
 
5683
+ /**
5684
+ * Small status label.
5685
+ *
5686
+ * Variants are not colour-only: each one also changes the leading dot's shape
5687
+ * and adds a matching border, so a badge still says which state it is in when
5688
+ * printed in grayscale or seen with colour-vision deficiency. `default` uses a
5689
+ * filled dot, `positive` a ring, and `warning` a filled square.
5690
+ */
5438
5691
  class ChBadge {
5439
5692
  constructor(hostRef) {
5440
5693
  registerInstance(this, hostRef);
@@ -5443,15 +5696,22 @@ class ChBadge {
5443
5696
  * The visual style of the badge. Either `default`, `positive`, or `warning`.
5444
5697
  */
5445
5698
  variant = 'default';
5699
+ /**
5700
+ * Whether to show the variant marker. On by default so the state does not
5701
+ * depend on colour; turn it off for a badge that only repeats text already
5702
+ * carrying the meaning.
5703
+ */
5704
+ statusCue = true;
5446
5705
  render() {
5447
- return (hAsync(Host, { key: 'ca1fb0c9d678b6ea5b68ca131ba153116bbd577d' }, hAsync("span", { key: '929e2268094bdad7df6e3c8371896e364ebf79c3', class: { badge: true, [`badge--${this.variant}`]: true } }, hAsync("slot", { key: '64422988ad046244722755d39e564295f79a6ce1' }))));
5706
+ return (hAsync(Host, { key: '4690e03d920f9fd89afc7a37cab1e2c57d26f1f2' }, hAsync("span", { key: '73bac91869bb6e37d1434e7318fd716ffedc2120', class: { badge: true, [`badge--${this.variant}`]: true } }, this.statusCue && hAsync("span", { key: '8272f087de323e6d729a1820d971da6c5dc7c5b5', class: "badge-dot", "aria-hidden": "true" }), hAsync("slot", { key: 'bafc32e7a928fa7c458efb12a08fa0bbf18e83e6' }))));
5448
5707
  }
5449
5708
  static get style() { return chBadgeCss(); }
5450
5709
  static get cmpMeta() { return {
5451
5710
  "$flags$": 777,
5452
5711
  "$tagName$": "ch-badge",
5453
5712
  "$members$": {
5454
- "variant": [1]
5713
+ "variant": [1],
5714
+ "statusCue": [4, "status-cue"]
5455
5715
  },
5456
5716
  "$listeners$": undefined,
5457
5717
  "$lazyBundleId$": "-",
@@ -5459,6 +5719,18 @@ class ChBadge {
5459
5719
  }; }
5460
5720
  }
5461
5721
 
5722
+ function hasLightDomText(host) {
5723
+ return Array.from(host.childNodes).some(child => {
5724
+ if (child.nodeType !== 3 && child.nodeType !== 1) {
5725
+ return false;
5726
+ }
5727
+ if (child.nodeType === 1 && child.hasAttribute('slot')) {
5728
+ return false;
5729
+ }
5730
+ return (child.textContent ?? '').trim() !== '';
5731
+ });
5732
+ }
5733
+
5462
5734
  const chButtonCss = () => `:host{display:inline-block}.btn{display:inline-flex;align-items:center;justify-content:center;gap:var(--spacing-sm);box-sizing:border-box;border:var(--border-width) solid transparent;border-radius:var(--radius-pill);cursor:pointer;font-family:inherit;font-weight:var(--typography-weight-bold);text-decoration:none;line-height:1.2;transition:background-color var(--duration-normal) var(--easing-default), border-color var(--duration-normal) var(--easing-default), color var(--duration-normal) var(--easing-default), transform var(--duration-fast) var(--easing-default)}.btn--sm{padding:var(--spacing-2xs) var(--spacing-lg);font-size:var(--typography-size-sm)}.btn--md{padding:var(--spacing-xs) var(--spacing-xl);font-size:inherit}.btn--lg{padding:var(--spacing-sm) var(--spacing-2xl);font-size:var(--typography-size-lg)}.btn:disabled,.btn--disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.btn--loading:disabled,.btn--loading.btn--disabled{opacity:1;cursor:progress}.btn:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}.btn--primary{background-color:var(--accent);color:var(--color-accent-text)}.btn--primary:hover:not(:disabled){background-color:var(--accent-hover);transform:translateY(calc(-1 * var(--spacing-elevate)))}.btn--secondary{background-color:transparent;color:var(--text);border-color:var(--border)}.btn--secondary:hover:not(:disabled){border-color:var(--border-hover);background-color:var(--surface-hover);transform:translateY(calc(-1 * var(--spacing-elevate)))}.btn--ghost{background-color:transparent;color:var(--text)}.btn--ghost:hover:not(:disabled){background-color:var(--surface-hover)}.btn--danger{background-color:var(--color-status-warning);color:var(--bg)}.btn--danger:hover:not(:disabled){filter:brightness(0.92);transform:translateY(calc(-1 * var(--spacing-elevate)))}`;
5463
5735
 
5464
5736
  class ChButton {
@@ -5466,6 +5738,7 @@ class ChButton {
5466
5738
  registerInstance(this, hostRef);
5467
5739
  this.chClick = createEvent(this, "chClick");
5468
5740
  }
5741
+ get el() { return getElement(this); }
5469
5742
  /**
5470
5743
  * The visual style of the button. One of `primary`, `secondary`, `ghost`,
5471
5744
  * or `danger`.
@@ -5498,7 +5771,8 @@ class ChButton {
5498
5771
  /**
5499
5772
  * Accessible label set as `aria-label` on the native element. Use it when
5500
5773
  * the button's content doesn't convey its purpose on its own (e.g. an
5501
- * icon-only button).
5774
+ * icon-only button). Omitting it on an icon-only button logs a warning in
5775
+ * development builds.
5502
5776
  */
5503
5777
  label;
5504
5778
  /**
@@ -5519,6 +5793,7 @@ class ChButton {
5519
5793
  return [this.loading ? hAsync("ch-spinner", { size: this.spinnerSize }) : hAsync("slot", { name: "start" }), hAsync("slot", null), hAsync("slot", { name: "end" })];
5520
5794
  }
5521
5795
  render() {
5796
+ if (!this.label && !hasLightDomText(this.el)) ;
5522
5797
  const classes = {
5523
5798
  'btn': true,
5524
5799
  [`btn--${this.variant}`]: true,
@@ -5559,7 +5834,7 @@ class ChCard {
5559
5834
  registerInstance(this, hostRef);
5560
5835
  }
5561
5836
  render() {
5562
- return (hAsync(Host, { key: '6d8b2d96c45fe2b0d5f23562d3c1b394adc8f9ea' }, hAsync("div", { key: '79b824b6924adbc407334adcd82128f8b1ec8a0a', class: "card" }, hAsync("slot", { key: '89b6bea5dee03bc65faf4aadb1725df393d55f51' }))));
5837
+ return (hAsync(Host, { key: 'b3952612583c8f61076164d3795b56d54b023a77' }, hAsync("div", { key: 'd0f58a9f84006c942ef9b27926f8cfa3138ad7d2', class: "card" }, hAsync("slot", { key: '9b1b54af6c5ff58417732764d4fcb8a8114348c4' }))));
5563
5838
  }
5564
5839
  static get style() { return chCardCss(); }
5565
5840
  static get cmpMeta() { return {
@@ -5572,6 +5847,26 @@ class ChCard {
5572
5847
  }; }
5573
5848
  }
5574
5849
 
5850
+ const VALUE_MISSING_MESSAGE = 'Please fill out this field.';
5851
+ /**
5852
+ * Turns a form control's state into the flags and message passed to
5853
+ * `ElementInternals.setValidity()`, so the six controls that mirror their
5854
+ * props into constraint validation cannot drift apart.
5855
+ *
5856
+ * A custom error wins over `valueMissing` for the message, matching the native
5857
+ * rule order, while both flags are reported when both apply.
5858
+ */
5859
+ function resolveValidity({ required, empty, invalid, errorMessage }) {
5860
+ const flags = {};
5861
+ if (required && empty) {
5862
+ flags.valueMissing = true;
5863
+ }
5864
+ if (invalid && errorMessage) {
5865
+ flags.customError = true;
5866
+ }
5867
+ return { flags, message: errorMessage || (flags.valueMissing ? VALUE_MISSING_MESSAGE : undefined) };
5868
+ }
5869
+
5575
5870
  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)}`;
5576
5871
 
5577
5872
  let checkboxIds = 0;
@@ -5646,15 +5941,12 @@ class ChCheckbox {
5646
5941
  return;
5647
5942
  }
5648
5943
  internals.setFormValue(this.checked ? this.value : null);
5649
- const flags = {};
5650
- let message;
5651
- if (this.required && !this.checked) {
5652
- flags.valueMissing = true;
5653
- }
5654
- if (this.invalid && this.errorMessage) {
5655
- flags.customError = true;
5656
- }
5657
- message = this.errorMessage ?? (flags.valueMissing ? 'Please fill out this field.' : undefined);
5944
+ const { flags, message } = resolveValidity({
5945
+ required: this.required,
5946
+ empty: !this.checked,
5947
+ invalid: this.invalid,
5948
+ errorMessage: this.errorMessage,
5949
+ });
5658
5950
  internals.setValidity(flags, message);
5659
5951
  }
5660
5952
  componentDidLoad() {
@@ -5683,7 +5975,7 @@ class ChCheckbox {
5683
5975
  return undefined;
5684
5976
  }
5685
5977
  render() {
5686
- return (hAsync(Host, { key: '664ce0b9de17ed5beb378ed2ebaf2b554002a0c0' }, hAsync("label", { key: 'a9115153696ea97d404e901e463b9c2aa3fbc9c6', class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled }, htmlFor: this.checkboxId }, hAsync("input", { key: '2b8254463d3af0c36a46fda4fbe0eabbc8875e74', 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 && hAsync("span", { key: '764e0e2d588f25850efa559487f62ed72f3422ef', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: '5ec4c53625bfb0a56451e8a6eab285d5268ac246', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: '36dabfce3ea276a4cc77b5f1e8b799403abcfccc', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
5978
+ return (hAsync(Host, { key: '5246c3e6798a4ad0407f3b817ca1b83ab786ca1e' }, hAsync("label", { key: 'c3fda492b9c61c81fd3c7afe62e5c379f783ff28', class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled }, htmlFor: this.checkboxId }, hAsync("input", { key: 'd77cdf632cbe58c74719567a52fbe224fcceca0b', 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 && hAsync("span", { key: 'b2707475cc9b3f1e70044566e16ce1b90facabc6', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: 'f597fbea344370911f71f2360db4eb0e57d3999d', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: '75082edd8a5a477c7c95365e6e2da66f6b69d6cc', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
5687
5979
  }
5688
5980
  static get formAssociated() { return true; }
5689
5981
  static get watchers() { return {
@@ -5722,6 +6014,62 @@ class ChCheckbox {
5722
6014
  }; }
5723
6015
  }
5724
6016
 
6017
+ 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}`;
6018
+
6019
+ const GAPS$2 = new Set(['none', '2xs', 'xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl', '6xl']);
6020
+ /**
6021
+ * Horizontal flow that wraps when it runs out of room, with a token-driven
6022
+ * gap in both axes — the layout a toolbar, a tag list or a button row needs.
6023
+ */
6024
+ class ChCluster {
6025
+ constructor(hostRef) {
6026
+ registerInstance(this, hostRef);
6027
+ }
6028
+ /**
6029
+ * Space between children in both axes, as a step of the spacing scale
6030
+ * (`2xs` … `6xl`), or `none`. An unknown value falls back to `md`.
6031
+ */
6032
+ gap = 'md';
6033
+ /**
6034
+ * Cross-axis alignment of the children.
6035
+ */
6036
+ align = 'center';
6037
+ /**
6038
+ * Main-axis distribution of the children.
6039
+ */
6040
+ justify = 'start';
6041
+ /**
6042
+ * Whether the children wrap onto a new line when they run out of room.
6043
+ */
6044
+ wrap = true;
6045
+ get gapStep() {
6046
+ return GAPS$2.has(this.gap) ? this.gap : 'md';
6047
+ }
6048
+ render() {
6049
+ return (hAsync(Host, { key: 'f55b938f1f3e898b63646945af934258bf87b1af', class: {
6050
+ 'cluster': true,
6051
+ [`cluster--gap-${this.gapStep}`]: true,
6052
+ [`cluster--align-${this.align}`]: true,
6053
+ [`cluster--justify-${this.justify}`]: true,
6054
+ 'cluster--nowrap': !this.wrap,
6055
+ } }, hAsync("slot", { key: 'b4c3adf66aa275eac6f60c512454a9b4391e14d3' })));
6056
+ }
6057
+ static get style() { return chClusterCss(); }
6058
+ static get cmpMeta() { return {
6059
+ "$flags$": 777,
6060
+ "$tagName$": "ch-cluster",
6061
+ "$members$": {
6062
+ "gap": [1],
6063
+ "align": [1],
6064
+ "justify": [1],
6065
+ "wrap": [4]
6066
+ },
6067
+ "$listeners$": undefined,
6068
+ "$lazyBundleId$": "-",
6069
+ "$attrsToReflect$": []
6070
+ }; }
6071
+ }
6072
+
5725
6073
  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%}`;
5726
6074
 
5727
6075
  class ChDivider {
@@ -5733,7 +6081,7 @@ class ChDivider {
5733
6081
  */
5734
6082
  orientation = 'horizontal';
5735
6083
  render() {
5736
- return (hAsync(Host, { key: '26aa4586507d821e539adcf1e057467654c19491', class: { 'divider--vertical': this.orientation === 'vertical' } }, hAsync("hr", { key: '599b22093ffe91c87899d84ad8c63ab6279107cb', class: { divider: true, [`divider--${this.orientation}`]: true }, "aria-orientation": this.orientation })));
6084
+ return (hAsync(Host, { key: 'bf9e60345f2958ac334df8e8b3cf135363a4cd84', class: { 'divider--vertical': this.orientation === 'vertical' } }, hAsync("hr", { key: '9a6348a2e46fa30c7b58a96f875c438468866b44', class: { divider: true, [`divider--${this.orientation}`]: true }, "aria-orientation": this.orientation })));
5737
6085
  }
5738
6086
  static get style() { return chDividerCss(); }
5739
6087
  static get cmpMeta() { return {
@@ -5811,6 +6159,7 @@ class ChDrawer {
5811
6159
  this.chOpen = createEvent(this, "chOpen");
5812
6160
  this.chClose = createEvent(this, "chClose");
5813
6161
  }
6162
+ get el() { return getElement(this); }
5814
6163
  /**
5815
6164
  * Whether the drawer is open. Kept in sync when the user closes it with
5816
6165
  * `Escape`, the close button or a click outside.
@@ -5825,7 +6174,7 @@ class ChDrawer {
5825
6174
  * Accessible name for the drawer, set as `aria-label`. A slotted heading
5826
6175
  * cannot be referenced with `aria-labelledby` across the shadow boundary, so
5827
6176
  * the name comes through this prop — and a modal dialog needs one, so pass
5828
- * the same text as the heading.
6177
+ * the same text as the heading. Omitting it logs a warning in development builds.
5829
6178
  */
5830
6179
  label;
5831
6180
  /**
@@ -5937,7 +6286,7 @@ class ChDrawer {
5937
6286
  this.chClose.emit();
5938
6287
  };
5939
6288
  render() {
5940
- return (hAsync(Host, { key: '8ee0dd329f7304e3f4804c26c75514372d49b4b8' }, hAsync("dialog", { key: '7f99c8edf6f820b595d4360ccc90123da37f9314', class: { drawer: true, [`drawer--${this.side}`]: true }, "aria-label": this.label, ref: el => (this.dialog = el) }, hAsync("div", { key: '65c2a386b36305ece253fe644db2a198bc245d12', class: "drawer-head" }, hAsync("slot", { key: '6c259b14a1fea3a38014c832d917554e3d431e18', name: "header" }), this.closeLabel && (hAsync("button", { key: '4d259fbd9850ea4f379f07be50f863e896e67312', class: "drawer-close", type: "button", "aria-label": this.closeLabel, onClick: this.handleCloseClick }, hAsync("span", { key: 'f1623602e84587020e77ec84c4b997c726414193', "aria-hidden": "true" }, "\u00D7")))), hAsync("div", { key: 'b239b7da3c9b00a6e80d33290d810297301206de', class: "drawer-body" }, hAsync("slot", { key: 'c3739f84975fc5f4717986214217c23eacb4432f' })), hAsync("slot", { key: '469be1ccedaf474fe40a9c2d264b6c128715cfc7', name: "footer" }))));
6289
+ return (hAsync(Host, { key: '38cbc3aa6b3c94202a4809193415b7ace9a4b377' }, hAsync("dialog", { key: '1c130ab25aabe596b87711ff5e61f121281ec98e', class: { drawer: true, [`drawer--${this.side}`]: true }, "aria-label": this.label, ref: el => (this.dialog = el) }, hAsync("div", { key: '7307a0835d140253a7ac6070cdd26eb82deb45e4', class: "drawer-head" }, hAsync("slot", { key: '371e0df2e6152642ae90763387985647fbf45794', name: "header" }), this.closeLabel && (hAsync("button", { key: 'e568aae38a6440e873342c931e0db9f6f933e20f', class: "drawer-close", type: "button", "aria-label": this.closeLabel, onClick: this.handleCloseClick }, hAsync("span", { key: 'cf5e72590342726586bd1d4e10e879531e70aba7', "aria-hidden": "true" }, "\u00D7")))), hAsync("div", { key: 'c832d23ce2be0e3cfd8e07a23a807cf4bc9163db', class: "drawer-body" }, hAsync("slot", { key: '16850f131819ae59d07893f40296cefd2bd4ce70' })), hAsync("slot", { key: '1682090d53ce7df009caa7d3360fc39e7bc5e47c', name: "footer" }))));
5941
6290
  }
5942
6291
  static get watchers() { return {
5943
6292
  "open": [{
@@ -6049,7 +6398,7 @@ class ChEmoji {
6049
6398
  this.loaded = true;
6050
6399
  };
6051
6400
  render() {
6052
- return (hAsync(Host, { key: '494b67e2300a9e1e9bb013aeefa6154cd26984ee' }, hAsync("img", { key: 'f05cacf5cdfdf09ba21a5841a6571741aa86e8b5', class: {
6401
+ return (hAsync(Host, { key: '403f04792b293ef20f1e01c201bc530e5bd4429c' }, hAsync("img", { key: '00b8c6f0cc5a048d21cca594472f17bcbc9882a5', class: {
6053
6402
  'emoji': true,
6054
6403
  [`emoji--${this.size}`]: true,
6055
6404
  'emoji--hidden': !this.loaded,
@@ -6077,6 +6426,238 @@ class ChEmoji {
6077
6426
  }; }
6078
6427
  }
6079
6428
 
6429
+ const chEmptyStateCss = () => `:host{display:block;font-family:var(--typography-body);color:var(--color-text-secondary);text-align:center}:host([hidden]){display:none}.empty-state__inner{display:flex;flex-direction:column;align-items:center;gap:var(--spacing-sm);padding:var(--spacing-6xl) var(--spacing-2xl);border:var(--border-width) dashed var(--color-border-default);border-radius:var(--radius-md);background:var(--color-surface-default)}.empty-state--sm .empty-state__inner{padding:var(--spacing-3xl) var(--spacing-xl);gap:var(--spacing-xs)}.empty-state__icon{display:contents;font-size:var(--typography-size-xl);line-height:1}.empty-state__icon:empty{display:none}.empty-state__title{margin:0;font-family:var(--typography-heading);font-size:var(--typography-size-md);font-weight:var(--typography-weight-semibold);color:var(--color-text-primary)}.empty-state--md .empty-state__title{font-size:var(--typography-size-lg)}.empty-state__description{margin:0;max-width:36ch;font-size:var(--typography-size-sm);line-height:1.5}.empty-state__actions:empty{display:none}.empty-state__actions{display:flex;flex-wrap:wrap;gap:var(--spacing-sm);justify-content:center;margin-top:var(--spacing-xs)}`;
6430
+
6431
+ /**
6432
+ * The standard "there is nothing here" block: an optional visual, a title, a
6433
+ * description and an action, laid out the same way everywhere.
6434
+ *
6435
+ * It works both inside a table cell and as a whole-page view: it fills its
6436
+ * container but never claims a fixed height.
6437
+ */
6438
+ class ChEmptyState {
6439
+ constructor(hostRef) {
6440
+ registerInstance(this, hostRef);
6441
+ }
6442
+ /**
6443
+ * Short heading stating what is missing, used as the accessible name of the
6444
+ * block.
6445
+ */
6446
+ title;
6447
+ /**
6448
+ * One or two sentences explaining what the user can do about it.
6449
+ */
6450
+ description;
6451
+ /**
6452
+ * Visual density. `sm` is for a region inside a page (a card, a table cell),
6453
+ * `md` for a whole view.
6454
+ */
6455
+ size = 'md';
6456
+ render() {
6457
+ return (hAsync(Host, { key: '7438cc3c538a3d789fb3c4832d5483ce7032fcdb', class: { 'empty-state': true, [`empty-state--${this.size}`]: true } }, hAsync("div", { key: '29d06044057fc95e977fba87ce0965628509e6ef', class: "empty-state__inner" }, hAsync("div", { key: 'c49c5331ab11c03a5a0ea42fd3e622ee0093c5d6', class: "empty-state__icon", "aria-hidden": "true" }, hAsync("slot", { key: 'c5f1e5dd26438b66df8ca46c1ff7830606af2742', name: "icon" })), hAsync("h3", { key: '9604df7541e0a03c99045b93bd771a27251dbea2', class: "empty-state__title" }, this.title), this.description && hAsync("p", { key: '10800f7b89bb93c979566b657a17fb36dbb9bce8', class: "empty-state__description" }, this.description), hAsync("div", { key: '38ecef67b8c7e264acf460f715299fa21c4d7dea', class: "empty-state__actions" }, hAsync("slot", { key: '1d266f2914232f16b9e212c7cf3b2eb13d4a0fe2' })))));
6458
+ }
6459
+ static get style() { return chEmptyStateCss(); }
6460
+ static get cmpMeta() { return {
6461
+ "$flags$": 777,
6462
+ "$tagName$": "ch-empty-state",
6463
+ "$members$": {
6464
+ "title": [1],
6465
+ "description": [1],
6466
+ "size": [1]
6467
+ },
6468
+ "$listeners$": undefined,
6469
+ "$lazyBundleId$": "-",
6470
+ "$attrsToReflect$": []
6471
+ }; }
6472
+ }
6473
+
6474
+ const chGridCss = () => `:host{display:grid;grid-template-columns:var(--ch-grid-columns, repeat(auto-fit, minmax(min(16rem, 100%), 1fr)));box-sizing:border-box}:host([hidden]){display:none}.grid--gap-none{gap:0}.grid--gap-2xs{gap:var(--spacing-2xs)}.grid--gap-xs{gap:var(--spacing-xs)}.grid--gap-sm{gap:var(--spacing-sm)}.grid--gap-md{gap:var(--spacing-md)}.grid--gap-lg{gap:var(--spacing-lg)}.grid--gap-xl{gap:var(--spacing-xl)}.grid--gap-2xl{gap:var(--spacing-2xl)}.grid--gap-3xl{gap:var(--spacing-3xl)}.grid--gap-4xl{gap:var(--spacing-4xl)}.grid--gap-5xl{gap:var(--spacing-5xl)}.grid--gap-6xl{gap:var(--spacing-6xl)}`;
6475
+
6476
+ const GAPS$1 = new Set(['none', '2xs', 'xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl', '6xl']);
6477
+ /**
6478
+ * Responsive grid of equal cells.
6479
+ *
6480
+ * `columns` takes a fixed count (`1`…`12`) or `auto-fit`, which fits as many
6481
+ * columns as `min-item-width` allows into the available width. That second mode
6482
+ * is the one a card list almost always wants: it needs no breakpoints and no
6483
+ * media queries of its own.
6484
+ */
6485
+ class ChGrid {
6486
+ constructor(hostRef) {
6487
+ registerInstance(this, hostRef);
6488
+ }
6489
+ get el() { return getElement(this); }
6490
+ /**
6491
+ * Number of equal columns (`1`…`12`), or `auto-fit` to fit as many as
6492
+ * `min-item-width` allows. An unknown value falls back to `auto-fit`.
6493
+ */
6494
+ columns = 'auto-fit';
6495
+ /**
6496
+ * Space between cells in both axes, as a step of the spacing scale
6497
+ * (`2xs` … `6xl`), or `none`. An unknown value falls back to `md`.
6498
+ */
6499
+ gap = 'md';
6500
+ /**
6501
+ * Smallest width a cell may take in `auto-fit` mode, as a CSS length. It also
6502
+ * caps the column count in fixed mode, so a cell never gets narrower than it.
6503
+ */
6504
+ minItemWidth = '16rem';
6505
+ get gapStep() {
6506
+ return GAPS$1.has(this.gap) ? this.gap : 'md';
6507
+ }
6508
+ get fixedColumns() {
6509
+ const count = Number(this.columns);
6510
+ return Number.isInteger(count) && count >= 1 && count <= 12 ? count : null;
6511
+ }
6512
+ componentWillLoad() {
6513
+ this.applyColumns();
6514
+ }
6515
+ componentDidUpdate() {
6516
+ this.applyColumns();
6517
+ }
6518
+ /**
6519
+ * The column template is written as a CSS custom property rather than an
6520
+ * inline style: the template carries a comma and an internal `1fr`, and a
6521
+ * custom property keeps it out of the style string Stencil parses.
6522
+ */
6523
+ applyColumns() {
6524
+ const template = this.fixedColumns === null ? `repeat(auto-fit, minmax(min(${this.minItemWidth}, 100%), 1fr))` : `repeat(${this.fixedColumns}, minmax(0, 1fr))`;
6525
+ this.el.style.setProperty('--ch-grid-columns', template);
6526
+ }
6527
+ render() {
6528
+ return (hAsync(Host, { key: 'a453ec09920d782d4ad324a773b1e67634e2012f', class: { grid: true, [`grid--gap-${this.gapStep}`]: true } }, hAsync("slot", { key: 'b0efb94df64941d5a94c06ae04d299e1b04f6109' })));
6529
+ }
6530
+ static get style() { return chGridCss(); }
6531
+ static get cmpMeta() { return {
6532
+ "$flags$": 777,
6533
+ "$tagName$": "ch-grid",
6534
+ "$members$": {
6535
+ "columns": [1],
6536
+ "gap": [1],
6537
+ "minItemWidth": [1, "min-item-width"]
6538
+ },
6539
+ "$listeners$": undefined,
6540
+ "$lazyBundleId$": "-",
6541
+ "$attrsToReflect$": []
6542
+ }; }
6543
+ }
6544
+
6545
+ const chIconCss = () => `:host{display:inline-flex;line-height:0}.icon{display:block;flex:none;color:inherit}.icon--sm{width:var(--icon-size-sm);height:var(--icon-size-sm)}.icon--md{width:var(--icon-size-md);height:var(--icon-size-md)}.icon--lg{width:var(--icon-size-lg);height:var(--icon-size-lg)}`;
6546
+
6547
+ /**
6548
+ * A single Lucide glyph.
6549
+ *
6550
+ * Decorative by default: the icon is hidden from assistive technology unless
6551
+ * you give it a `label`, because most icons sit next to text that already says
6552
+ * what they mean and a second announcement is noise. Set `label` only when the
6553
+ * icon carries meaning on its own; a control whose only content is an icon
6554
+ * should use `ch-icon-button`, which requires the name.
6555
+ */
6556
+ class ChIcon {
6557
+ constructor(hostRef) {
6558
+ registerInstance(this, hostRef);
6559
+ }
6560
+ /**
6561
+ * Which glyph to draw. Unknown values render nothing rather than throwing,
6562
+ * so a stale name in a data payload cannot break the page.
6563
+ */
6564
+ name;
6565
+ /**
6566
+ * `sm` is 16px, `md` is 20px and `lg` is 24px — the sizes the scale's line
6567
+ * heights were built around.
6568
+ */
6569
+ size = 'md';
6570
+ /**
6571
+ * Accessible name. When set, the icon becomes `role="img"` and is announced;
6572
+ * when omitted it is `aria-hidden`.
6573
+ */
6574
+ label;
6575
+ render() {
6576
+ const shapes = this.name ? chIcons[this.name] : undefined;
6577
+ const decorative = !this.label;
6578
+ return (hAsync(Host, { key: '46040274042301b799f103c483281a0c8088c23d' }, hAsync("svg", { key: '9e116b6983020700ceababc691216b1f05d1c460', class: `icon icon--${this.size}`, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", role: decorative ? undefined : 'img', "aria-label": this.label, "aria-hidden": decorative ? 'true' : undefined, focusable: "false" }, (shapes ?? []).map(shape => hAsync(shape.tag, shape.attrs)))));
6579
+ }
6580
+ static get style() { return chIconCss(); }
6581
+ static get cmpMeta() { return {
6582
+ "$flags$": 521,
6583
+ "$tagName$": "ch-icon",
6584
+ "$members$": {
6585
+ "name": [1],
6586
+ "size": [1],
6587
+ "label": [1]
6588
+ },
6589
+ "$listeners$": undefined,
6590
+ "$lazyBundleId$": "-",
6591
+ "$attrsToReflect$": []
6592
+ }; }
6593
+ }
6594
+
6595
+ const chIconButtonCss = () => `:host{display:inline-block}.button{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;border:var(--border-width) solid var(--border);border-radius:var(--radius-pill);background:transparent;color:var(--text);cursor:pointer;transition:background-color var(--duration-normal) var(--easing-default), border-color var(--duration-normal) var(--easing-default), color var(--duration-normal) var(--easing-default)}.button--sm{width:calc(var(--icon-size-sm) + 2 * var(--spacing-md));height:calc(var(--icon-size-sm) + 2 * var(--spacing-md))}.button--md{width:calc(var(--icon-size-md) + 2 * var(--spacing-xl));height:calc(var(--icon-size-md) + 2 * var(--spacing-xl))}.button--lg{width:calc(var(--icon-size-lg) + 2 * var(--spacing-2xl));height:calc(var(--icon-size-lg) + 2 * var(--spacing-2xl))}.button--sm .icon{width:var(--icon-size-sm);height:var(--icon-size-sm)}.button--md .icon{width:var(--icon-size-md);height:var(--icon-size-md)}.button--lg .icon{width:var(--icon-size-lg);height:var(--icon-size-lg)}.button:hover:not([aria-disabled='true']){border-color:var(--border-hover);background:var(--surface-hover)}.button:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}.button[aria-disabled='true']{opacity:var(--opacity-disabled);cursor:not-allowed}.button[aria-busy='true']{cursor:progress}.button[aria-busy='true'] .icon{animation:ch-icon-button-spin var(--duration-spin) linear infinite}@keyframes ch-icon-button-spin{to{transform:rotate(360deg)}}@media (pointer: coarse){.button--sm{min-width:44px;min-height:44px}}@media (prefers-reduced-motion: reduce){.button{transition:none}.button[aria-busy='true'] .icon{animation:none}}`;
6596
+
6597
+ /**
6598
+ * A button whose only content is an icon.
6599
+ *
6600
+ * The label is required rather than optional. An icon-only button without an
6601
+ * accessible name is unusable by voice, screen reader or automation, and there
6602
+ * is no adjacent text to fall back on — the same reasoning as `ch-modal`, and
6603
+ * the reason this component exists instead of letting consumers bolt an icon
6604
+ * slot onto `ch-button` and forget the name.
6605
+ */
6606
+ class ChIconButton {
6607
+ constructor(hostRef) {
6608
+ registerInstance(this, hostRef);
6609
+ this.chClick = createEvent(this, "chClick");
6610
+ }
6611
+ /** The glyph to draw. */
6612
+ name;
6613
+ /**
6614
+ * Accessible name, set as `aria-label`. Required: say what the button does
6615
+ * ("Eliminar producto"), not what the glyph is ("papelera").
6616
+ */
6617
+ label;
6618
+ /** Visual size. `md` matches the height of a default `ch-button`. */
6619
+ size = 'md';
6620
+ /** Native button type, defaulting to `button` so it never submits a form by accident. */
6621
+ type = 'button';
6622
+ disabled = false;
6623
+ /**
6624
+ * Blocks pointer and keyboard activation and marks the button `aria-busy`
6625
+ * while keeping it focusable, so focus does not fall to `<body>` when an
6626
+ * action completes.
6627
+ */
6628
+ loading = false;
6629
+ /** Emitted on click. A click while disabled or loading emits nothing. */
6630
+ chClick;
6631
+ handleClick = (event) => {
6632
+ if (this.disabled || this.loading) {
6633
+ event.preventDefault();
6634
+ event.stopImmediatePropagation();
6635
+ return;
6636
+ }
6637
+ this.chClick.emit(event);
6638
+ };
6639
+ render() {
6640
+ const shapes = this.name ? chIcons[this.name] : undefined;
6641
+ return (hAsync(Host, { key: '235a3813a30b5e98cc0b37774e0fe9cce680ac4c' }, hAsync("button", { key: 'e2d76ea663bb4746f1431affde538c2429033615', class: `button button--${this.size}`, type: this.type, "aria-label": this.label, "aria-busy": this.loading ? 'true' : undefined, "aria-disabled": this.disabled ? 'true' : undefined, onClick: this.handleClick }, hAsync("svg", { key: '3cbc2fc57cf274920dbb12fb7f0a6eed189e7b23', class: "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 => hAsync(shape.tag, shape.attrs))))));
6642
+ }
6643
+ static get style() { return chIconButtonCss(); }
6644
+ static get cmpMeta() { return {
6645
+ "$flags$": 521,
6646
+ "$tagName$": "ch-icon-button",
6647
+ "$members$": {
6648
+ "name": [1],
6649
+ "label": [1],
6650
+ "size": [1],
6651
+ "type": [1],
6652
+ "disabled": [4],
6653
+ "loading": [4]
6654
+ },
6655
+ "$listeners$": undefined,
6656
+ "$lazyBundleId$": "-",
6657
+ "$attrsToReflect$": []
6658
+ }; }
6659
+ }
6660
+
6080
6661
  const chInputCss = () => `: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)}.input{box-sizing:border-box;width:100%;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;transition:border-color var(--duration-normal) var(--easing-default), box-shadow var(--duration-normal) var(--easing-default)}.input::placeholder{color:var(--text-muted)}.input:focus{border-color:var(--accent);box-shadow:var(--shadow-focus-ring);outline:none}.input--invalid{border-color:var(--color-status-warning)}.input--invalid:focus{border-color:var(--color-status-warning);box-shadow:0 0 0 3px var(--color-status-warning-background)}:host([data-touched]:invalid) .input,:host(:user-invalid) .input{border-color:var(--color-status-warning)}:host([data-touched]:invalid) .input:focus,:host(:user-invalid) .input:focus{border-color:var(--color-status-warning);box-shadow:0 0 0 3px var(--color-status-warning-background)}.input: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)}`;
6081
6662
 
6082
6663
  let inputIds = 0;
@@ -6164,15 +6745,12 @@ class ChInput {
6164
6745
  return;
6165
6746
  }
6166
6747
  internals.setFormValue(this.value);
6167
- const flags = {};
6168
- let message;
6169
- if (this.required && this.value === '') {
6170
- flags.valueMissing = true;
6171
- }
6172
- if (this.invalid && this.errorMessage) {
6173
- flags.customError = true;
6174
- }
6175
- message = this.errorMessage ?? (flags.valueMissing ? 'Please fill out this field.' : undefined);
6748
+ const { flags, message } = resolveValidity({
6749
+ required: this.required,
6750
+ empty: this.value === '',
6751
+ invalid: this.invalid,
6752
+ errorMessage: this.errorMessage,
6753
+ });
6176
6754
  internals.setValidity(flags, message);
6177
6755
  }
6178
6756
  componentDidLoad() {
@@ -6201,7 +6779,7 @@ class ChInput {
6201
6779
  return undefined;
6202
6780
  }
6203
6781
  render() {
6204
- return (hAsync(Host, { key: 'cf143097fd39199c6c8a81484a4e8621e7c4d9cb' }, this.label && (hAsync("label", { key: '40643f72949b11fc7dcdd4a43794a37103708992', class: "label", htmlFor: this.inputId }, this.label)), hAsync("input", { key: 'ab3a0b8cc51e9c863001ddb089516bbf0874e889', 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) && (hAsync("p", { key: 'ad7eb7b40aaab69b6bc929c632ce4736fe3c39a5', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: '6f7738076128a8242d1dcc97ac99ee1275fc7e14', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
6782
+ return (hAsync(Host, { key: 'e0bbbb592d8c90897f48060f570606453c125ce5' }, this.label && (hAsync("label", { key: '2748fad40236a1ebe4acba6405c73f26e1284dd1', class: "label", htmlFor: this.inputId }, this.label)), hAsync("input", { key: 'b7c6ed3c9135ecaddde161a88077bd415900b465', 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) && (hAsync("p", { key: 'f87c7300a6cfca70770cd9eb05e5ba242698b3cf', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: 'e8ed5e8059e06d23c0e742de33c0a9b651e1ced4', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
6205
6783
  }
6206
6784
  static get formAssociated() { return true; }
6207
6785
  static get watchers() { return {
@@ -6321,6 +6899,7 @@ class ChModal {
6321
6899
  this.chOpen = createEvent(this, "chOpen");
6322
6900
  this.chClose = createEvent(this, "chClose");
6323
6901
  }
6902
+ get el() { return getElement(this); }
6324
6903
  /**
6325
6904
  * Whether the dialog is open. Kept in sync when the user closes it with
6326
6905
  * `Escape`, the close button or a click outside.
@@ -6330,7 +6909,7 @@ class ChModal {
6330
6909
  * Accessible name for the dialog, set as `aria-label`. A slotted heading
6331
6910
  * cannot be referenced with `aria-labelledby` across the shadow boundary, so
6332
6911
  * the name comes through this prop — and a modal dialog needs one, so pass
6333
- * the same text as the heading.
6912
+ * the same text as the heading. Omitting it logs a warning in development builds.
6334
6913
  */
6335
6914
  label;
6336
6915
  /**
@@ -6449,7 +7028,7 @@ class ChModal {
6449
7028
  this.chClose.emit();
6450
7029
  };
6451
7030
  render() {
6452
- return (hAsync(Host, { key: 'd4dfbaad43391e3f34eb890b0d04a6ee38fa82e5' }, hAsync("dialog", { key: '3a3142c9baee06b381c7aaa920718f92bb8f1176', class: { modal: true, [`modal--${this.size}`]: true }, "aria-label": this.label, ref: el => (this.dialog = el) }, hAsync("div", { key: '34855134cc5cb2701a9b8b60ee46087d4f00fd13', class: "modal-head" }, hAsync("slot", { key: '7fa6a49a0f6b914fc8b825009bb46f5cd799f33b', name: "heading" }), this.closeLabel && (hAsync("button", { key: '55f15f81f94c7a08f54e9d6f9a722452b32f01af', class: "modal-close", type: "button", "aria-label": this.closeLabel, onClick: this.handleCloseClick }, hAsync("span", { key: '545af17e1065c558a1cc5274a444f610a77a3044', "aria-hidden": "true" }, "\u00D7")))), hAsync("div", { key: 'a78ea4c9f66c03d641c9ef1aa14058b6371160fb', class: "modal-body" }, hAsync("slot", { key: 'ffc1accb70cfc2e8ee6f11088a3a1da09a8b3430' })))));
7031
+ return (hAsync(Host, { key: 'c50dad31f2b1897549837aed1d8e6df2df8cd491' }, hAsync("dialog", { key: '327f6ef27b447386c180248bbeab4cc3ee0160eb', class: { modal: true, [`modal--${this.size}`]: true }, "aria-label": this.label, ref: el => (this.dialog = el) }, hAsync("div", { key: 'c8c2f8eacf26c817073920bc2ef1c7ac89fe8208', class: "modal-head" }, hAsync("slot", { key: '73d0e3ae45c7936d345ce6f3262d9ce08058b9e7', name: "heading" }), this.closeLabel && (hAsync("button", { key: 'a72d04701cd9d60e6c1486f5c38f46f7f3ff1da5', class: "modal-close", type: "button", "aria-label": this.closeLabel, onClick: this.handleCloseClick }, hAsync("span", { key: '10d1b697611309e79f28dcad9385fa7e4300c916', "aria-hidden": "true" }, "\u00D7")))), hAsync("div", { key: '040029fdc7dc7544a15b51f3c0b7d855902b7028', class: "modal-body" }, hAsync("slot", { key: '00291b7d78f49dcf366c1780562893260be3dc74' })))));
6453
7032
  }
6454
7033
  static get watchers() { return {
6455
7034
  "open": [{
@@ -6472,6 +7051,68 @@ class ChModal {
6472
7051
  }; }
6473
7052
  }
6474
7053
 
7054
+ const chPageHeaderCss = () => `:host{display:block}.header{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:var(--spacing-2xl);padding-bottom:var(--spacing-2xl);border-bottom:var(--border-width) solid var(--border)}.header-text{display:flex;flex-direction:column;gap:var(--spacing-xs);flex:1 1 20rem;min-width:0}.header-eyebrow{margin:0;color:var(--text-secondary);font-family:var(--font-heading);font-size:var(--typography-size-xs);letter-spacing:var(--typography-tracking-badge);text-transform:uppercase}.header-title{margin:0;color:var(--text);font-family:var(--font-heading);font-size:var(--typography-size-xl);font-weight:var(--typography-weight-bold);line-height:1.2;overflow-wrap:anywhere}.header-description{margin:0;color:var(--text-secondary);font-size:var(--typography-size-sm);line-height:1.5;overflow-wrap:anywhere}.header-actions{display:flex;flex-wrap:wrap;align-items:center;gap:var(--spacing-md);max-width:100%}.header-actions:empty{display:none}.header--stacked .header-actions{flex-basis:100%}@media (max-width: 30rem){.header{flex-direction:column}.header-actions{width:100%}}@media (forced-colors: active){.header{border-bottom-color:CanvasText}}`;
7055
+
7056
+ /**
7057
+ * The heading block at the top of a page: title, optional eyebrow and
7058
+ * description, and a trailing actions area.
7059
+ *
7060
+ * The title is a `title` prop rather than a slot so the heading level always
7061
+ * matches the page. A slotted heading lets a consumer nest a second `h1`, and
7062
+ * "one top-level heading per page" then depends on every caller remembering it;
7063
+ * here the level is explicit and defaults to `h1`. The actions wrap rather than
7064
+ * push the page sideways at 390px, and the DOM order keeps the heading before
7065
+ * the actions so reading and focus order still start with the title.
7066
+ */
7067
+ class ChPageHeader {
7068
+ constructor(hostRef) {
7069
+ registerInstance(this, hostRef);
7070
+ }
7071
+ /**
7072
+ * The page title. Rendered as a real heading, so it also works as the
7073
+ * accessible name of the page region.
7074
+ */
7075
+ title;
7076
+ /**
7077
+ * Heading element to render. Use `h2` (or `h3`) when the page already has a
7078
+ * higher-level heading above this block, so the document outline stays valid.
7079
+ */
7080
+ headingLevel = 'h1';
7081
+ /**
7082
+ * Optional small label above the title, as slotted content. Use it for a
7083
+ * section or entity kind ("Proyecto", "Factura #1042"), not for the title.
7084
+ */
7085
+ eyebrow;
7086
+ /**
7087
+ * Optional supporting line under the title.
7088
+ */
7089
+ description;
7090
+ /**
7091
+ * Puts the actions below the title instead of beside it. Use it when the
7092
+ * actions are too wide to sit on the same row even after wrapping.
7093
+ */
7094
+ actionsStacked = false;
7095
+ render() {
7096
+ const Heading = this.headingLevel;
7097
+ return (hAsync(Host, { key: '02317c9b8a8164400ac269cbfd872e066e3269e3' }, hAsync("div", { key: 'c1ab176079e95f4854826588405cd49c1bc42b58', class: { 'header': true, 'header--stacked': this.actionsStacked } }, hAsync("div", { key: '57553e0d8ac563dfd55bedb23fb6896f922c187c', class: "header-text" }, this.eyebrow && hAsync("p", { key: 'b38cbdfbc5a08cfddf60e9f82481df3ed8ad48e6', class: "header-eyebrow" }, this.eyebrow), hAsync(Heading, { key: '521003f555a4adaae81bac11a6410638db923399', class: "header-title" }, this.title), this.description && hAsync("p", { key: '0625bcd1903f52dfe16963bfc6d3ccf7e404d13a', class: "header-description" }, this.description)), hAsync("div", { key: '23b65e1729bfa24324c24958b946435ff247cb4d', class: "header-actions" }, hAsync("slot", { key: '45b4c24e4ce2bb4edc2929a2f17563260efb410f', name: "actions" })))));
7098
+ }
7099
+ static get style() { return chPageHeaderCss(); }
7100
+ static get cmpMeta() { return {
7101
+ "$flags$": 777,
7102
+ "$tagName$": "ch-page-header",
7103
+ "$members$": {
7104
+ "title": [1],
7105
+ "headingLevel": [1, "heading-level"],
7106
+ "eyebrow": [1],
7107
+ "description": [1],
7108
+ "actionsStacked": [4, "actions-stacked"]
7109
+ },
7110
+ "$listeners$": undefined,
7111
+ "$lazyBundleId$": "-",
7112
+ "$attrsToReflect$": []
7113
+ }; }
7114
+ }
7115
+
6475
7116
  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)}: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)}`;
6476
7117
 
6477
7118
  let radioIds = 0;
@@ -6548,15 +7189,12 @@ class ChRadio {
6548
7189
  return;
6549
7190
  }
6550
7191
  internals.setFormValue(this.value ?? null);
6551
- const flags = {};
6552
- let message;
6553
- if (this.required && !this.value) {
6554
- flags.valueMissing = true;
6555
- }
6556
- if (this.invalid && this.errorMessage) {
6557
- flags.customError = true;
6558
- }
6559
- message = this.errorMessage ?? (flags.valueMissing ? 'Please fill out this field.' : undefined);
7192
+ const { flags, message } = resolveValidity({
7193
+ required: this.required,
7194
+ empty: !this.value,
7195
+ invalid: this.invalid,
7196
+ errorMessage: this.errorMessage,
7197
+ });
6560
7198
  internals.setValidity(flags, message);
6561
7199
  }
6562
7200
  componentDidLoad() {
@@ -6586,7 +7224,7 @@ class ChRadio {
6586
7224
  }
6587
7225
  render() {
6588
7226
  const groupName = this.name || `${this.groupId}-group`;
6589
- return (hAsync(Host, { key: '67d5306b86b9c5f6a085748cf18bcd8421afb7df' }, this.label && (hAsync("span", { key: '65ff0ced1f1954899765b1df3e77a0a10830b952', class: "group-label", id: this.labelId }, this.label)), hAsync("div", { key: '65d1a571a6a88ded21b3adc25dff9bd9cfbc5634', class: "radio-group", role: "radiogroup", "aria-labelledby": this.label ? this.labelId : undefined }, this.options.map(option => (hAsync("label", { class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled || option.disabled } }, hAsync("input", { class: { 'input': true, 'input--invalid': this.invalid }, type: "radio", name: groupName, value: option.value, checked: option.value === this.value, disabled: this.disabled || this.formDisabled || option.disabled, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }), hAsync("span", { class: "mark" }), hAsync("span", { class: "label-text" }, option.label))))), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: '328c40801e34c823de319f5de92be8eb19360bcb', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: '3606463c798a7bd3ff0545e7691107cf506a2df1', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
7227
+ return (hAsync(Host, { key: '9803d5b41d3985503d1b304d53504239d2a2de1d' }, this.label && (hAsync("span", { key: 'f75cf217d50a300e5c6ddcdcfb9c5832e1f6b964', class: "group-label", id: this.labelId }, this.label)), hAsync("div", { key: 'd8e9e24e82dfb77f728e8d9c994102202a9ce85b', class: "radio-group", role: "radiogroup", "aria-labelledby": this.label ? this.labelId : undefined }, this.options.map(option => (hAsync("label", { class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled || option.disabled } }, hAsync("input", { class: { 'input': true, 'input--invalid': this.invalid }, type: "radio", name: groupName, value: option.value, checked: option.value === this.value, disabled: this.disabled || this.formDisabled || option.disabled, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }), hAsync("span", { class: "mark" }), hAsync("span", { class: "label-text" }, option.label))))), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: '91bed0d5cd70a032de7b8ba6e298903b387e1a4a', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: 'a2e6d6c87d60e98ac3d396f7dde907ce1e46946a', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
6590
7228
  }
6591
7229
  static get formAssociated() { return true; }
6592
7230
  static get watchers() { return {
@@ -6706,11 +7344,11 @@ class ChSegmentedControl {
6706
7344
  return;
6707
7345
  }
6708
7346
  internals.setFormValue(this.value ?? null);
6709
- const flags = {};
6710
- if (this.required && !this.value) {
6711
- flags.valueMissing = true;
6712
- }
6713
- internals.setValidity(flags, flags.valueMissing ? 'Please fill out this field.' : undefined);
7347
+ const { flags, message } = resolveValidity({
7348
+ required: this.required,
7349
+ empty: !this.value,
7350
+ });
7351
+ internals.setValidity(flags, message);
6714
7352
  }
6715
7353
  componentDidLoad() {
6716
7354
  this.initialValue = this.value;
@@ -6730,7 +7368,7 @@ class ChSegmentedControl {
6730
7368
  }
6731
7369
  render() {
6732
7370
  const groupName = this.name || `${this.groupId}-group`;
6733
- return (hAsync(Host, { key: 'd1b6810caed6826dc4020962c0e9dd0a037013e9' }, this.label && (hAsync("span", { key: '11bc2a5a41b38f10c7d5a6687609c3f3688db533', class: "group-label", id: this.labelId }, this.label)), hAsync("div", { key: 'ca18b975c4a0b7d42fea8ca6d483d58d15112f58', class: { segmented: true, [`segmented--${this.size}`]: true }, role: "radiogroup", "aria-labelledby": this.label ? this.labelId : undefined }, this.options.map(option => (hAsync("label", { class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled || option.disabled } }, hAsync("input", { class: "input", type: "radio", name: groupName, value: option.value, checked: option.value === this.value, disabled: this.disabled || this.formDisabled || option.disabled, onChange: this.handleChange }), hAsync("span", { class: "label-text" }, option.label)))))));
7371
+ return (hAsync(Host, { key: 'd6a9a720a1a210c73711cff1f7cd6c1ffa0c89b2' }, this.label && (hAsync("span", { key: 'af5fb9ab87e918ac6047ebd6e65e540044c6a2d0', class: "group-label", id: this.labelId }, this.label)), hAsync("div", { key: '8dd76ea8d792d918ac5e413946e8a08cb89480c7', class: { segmented: true, [`segmented--${this.size}`]: true }, role: "radiogroup", "aria-labelledby": this.label ? this.labelId : undefined }, this.options.map(option => (hAsync("label", { class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled || option.disabled } }, hAsync("input", { class: "input", type: "radio", name: groupName, value: option.value, checked: option.value === this.value, disabled: this.disabled || this.formDisabled || option.disabled, onChange: this.handleChange }), hAsync("span", { class: "label-text" }, option.label)))))));
6734
7372
  }
6735
7373
  static get formAssociated() { return true; }
6736
7374
  static get watchers() { return {
@@ -6839,15 +7477,12 @@ class ChSelect {
6839
7477
  return;
6840
7478
  }
6841
7479
  internals.setFormValue(this.value ?? '');
6842
- const flags = {};
6843
- let message;
6844
- if (this.required && !this.value) {
6845
- flags.valueMissing = true;
6846
- }
6847
- if (this.invalid && this.errorMessage) {
6848
- flags.customError = true;
6849
- }
6850
- message = this.errorMessage ?? (flags.valueMissing ? 'Please fill out this field.' : undefined);
7480
+ const { flags, message } = resolveValidity({
7481
+ required: this.required,
7482
+ empty: !this.value,
7483
+ invalid: this.invalid,
7484
+ errorMessage: this.errorMessage,
7485
+ });
6851
7486
  internals.setValidity(flags, message);
6852
7487
  }
6853
7488
  componentDidLoad() {
@@ -6876,7 +7511,7 @@ class ChSelect {
6876
7511
  return undefined;
6877
7512
  }
6878
7513
  render() {
6879
- return (hAsync(Host, { key: '3490540c681d453acea3a53fe09f52d1e51c61b3' }, this.label && (hAsync("label", { key: '33d478bb47da9fca08c57021decdf6c9eac00142', class: "label", htmlFor: this.selectId }, this.label)), hAsync("select", { key: 'b109bcf23a516df3190a6648d02163b84c0418ad', 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 && (hAsync("option", { key: '76e447051d2cf751211884a926df71a0eed141a7', value: "", disabled: true, hidden: true, selected: !this.value }, this.placeholder)), this.options.map(option => (hAsync("option", { value: option.value, disabled: option.disabled, selected: option.value === this.value }, option.label)))), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: '8756bc6783bdb9d18d306516a89c805e6fc5b647', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: 'f52f95a4d067f29ae7ac22337622411a762385a0', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
7514
+ return (hAsync(Host, { key: 'b01c1dca70dbf88556521faa1be7430dc3d2355c' }, this.label && (hAsync("label", { key: '265a09b70dafca0c9330ceaec2477b6b203a71eb', class: "label", htmlFor: this.selectId }, this.label)), hAsync("select", { key: '43b387edff4fd326beac608fa16e50f3407e8cac', 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 && (hAsync("option", { key: '456e5220d2fd6fdb2a2171d10bcd11c6d2c58956', value: "", disabled: true, hidden: true, selected: !this.value }, this.placeholder)), this.options.map(option => (hAsync("option", { value: option.value, disabled: option.disabled, selected: option.value === this.value }, option.label)))), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: '7f4609f6441f9ce6c5f13b4a12875d85c110ccd8', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: 'e05a04a3f43ad055cd7cc57deb48f8b19d1a7084', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
6880
7515
  }
6881
7516
  static get formAssociated() { return true; }
6882
7517
  static get watchers() { return {
@@ -6916,6 +7551,78 @@ class ChSelect {
6916
7551
  }; }
6917
7552
  }
6918
7553
 
7554
+ const chSkeletonCss = () => `:host{display:block;width:100%}:host([hidden]){display:none}:host(.skeleton--circle){width:auto;display:inline-flex}.skeleton__item{display:block;background:var(--color-surface-default);border-radius:var(--radius-sm)}.skeleton--circle .skeleton__item{border-radius:50%}.skeleton--rect .skeleton__item{border-radius:var(--radius-md)}.skeleton--animated .skeleton__item{background-image:linear-gradient(90deg, transparent 0%, var(--color-surface-hover) 50%, transparent 100%);background-size:200% 100%;background-repeat:no-repeat;animation:ch-skeleton-shimmer 1.4s ease-in-out infinite}@keyframes ch-skeleton-shimmer{from{background-position:100% 0}to{background-position:-100% 0}}@media (prefers-reduced-motion: reduce){.skeleton--animated .skeleton__item{animation:none;background-image:none}}`;
7555
+
7556
+ /**
7557
+ * Decorative loading placeholder that reserves the space real content will
7558
+ * take, so the page does not jump when the data arrives.
7559
+ *
7560
+ * It stays out of the accessibility tree on purpose: a screen reader should
7561
+ * hear nothing about a placeholder. Mark the region that is actually loading
7562
+ * with `aria-busy="true"` yourself, and announce the result when it lands.
7563
+ */
7564
+ class ChSkeleton {
7565
+ constructor(hostRef) {
7566
+ registerInstance(this, hostRef);
7567
+ }
7568
+ /**
7569
+ * Width of a placeholder. For `line` and `rect` it is a CSS length or a
7570
+ * percentage; `circle` is square, so this sets its diameter too.
7571
+ */
7572
+ width = '100%';
7573
+ /**
7574
+ * Height of a placeholder, as a CSS length. Ignored by `circle`, which is
7575
+ * square.
7576
+ */
7577
+ height = '1rem';
7578
+ /**
7579
+ * Shape of the placeholder: `line` for text, `circle` for avatars and
7580
+ * icons, `rect` for images and cards.
7581
+ */
7582
+ shape = 'line';
7583
+ /**
7584
+ * How many placeholders to render in a row, for multi-line text blocks. A
7585
+ * value below 1 renders one.
7586
+ */
7587
+ count = 1;
7588
+ /**
7589
+ * Whether the shimmer runs. It is also disabled automatically for people who
7590
+ * asked for reduced motion.
7591
+ */
7592
+ animated = true;
7593
+ get items() {
7594
+ const count = Number(this.count);
7595
+ return Number.isInteger(count) && count >= 1 ? count : 1;
7596
+ }
7597
+ get sizeStyle() {
7598
+ if (this.shape === 'circle') {
7599
+ return { width: this.width, height: this.width };
7600
+ }
7601
+ if (this.shape === 'line') {
7602
+ return { width: this.width, height: this.height };
7603
+ }
7604
+ return { width: this.width, height: this.height };
7605
+ }
7606
+ render() {
7607
+ return (hAsync(Host, { key: 'bbcafacc79f0288204028378f2cf460f793ca702', "aria-hidden": "true", class: { 'skeleton': true, [`skeleton--${this.shape}`]: true, 'skeleton--animated': this.animated } }, Array.from({ length: this.items }).map((value, index) => (hAsync("span", { class: "skeleton__item", style: this.sizeStyle, key: index, "data-index": String(value) })))));
7608
+ }
7609
+ static get style() { return chSkeletonCss(); }
7610
+ static get cmpMeta() { return {
7611
+ "$flags$": 521,
7612
+ "$tagName$": "ch-skeleton",
7613
+ "$members$": {
7614
+ "width": [1],
7615
+ "height": [1],
7616
+ "shape": [1],
7617
+ "count": [2],
7618
+ "animated": [4]
7619
+ },
7620
+ "$listeners$": undefined,
7621
+ "$lazyBundleId$": "-",
7622
+ "$attrsToReflect$": []
7623
+ }; }
7624
+ }
7625
+
6919
7626
  const chSpinnerCss = () => `:host{display:inline-block;vertical-align:middle}.spinner{display:block;box-sizing:border-box;width:1em;height:1em;border:0.125em solid currentColor;border-top-color:transparent;border-radius:50%;animation:ch-spinner-rotate var(--duration-spin) var(--easing-linear) infinite}.spinner--sm{font-size:var(--typography-size-sm)}.spinner--md{font-size:var(--typography-size-lg)}.spinner--lg{font-size:var(--typography-size-xl)}@keyframes ch-spinner-rotate{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.spinner{animation-duration:calc(var(--duration-spin) * 4)}}`;
6920
7627
 
6921
7628
  /**
@@ -6945,7 +7652,7 @@ class ChSpinner {
6945
7652
  label;
6946
7653
  render() {
6947
7654
  const labelled = Boolean(this.label);
6948
- return (hAsync(Host, { key: '027b184e902f41230aa10e15a3a28f2795758c57' }, hAsync("span", { key: '8fa60714afc8767a01f2b8b3313eb003576592b6', class: { spinner: true, [`spinner--${this.size}`]: true }, role: labelled ? 'status' : undefined, "aria-label": labelled ? this.label : undefined, "aria-hidden": labelled ? undefined : 'true' })));
7655
+ return (hAsync(Host, { key: '9e1cc36781db28cded8318f67158332168b0bbfc' }, hAsync("span", { key: '9c923d38545c0fceab0f244b4374708e2b7e2043', class: { spinner: true, [`spinner--${this.size}`]: true }, role: labelled ? 'status' : undefined, "aria-label": labelled ? this.label : undefined, "aria-hidden": labelled ? undefined : 'true' })));
6949
7656
  }
6950
7657
  static get style() { return chSpinnerCss(); }
6951
7658
  static get cmpMeta() { return {
@@ -6961,6 +7668,53 @@ class ChSpinner {
6961
7668
  }; }
6962
7669
  }
6963
7670
 
7671
+ const chStackCss = () => `:host{display:flex;flex-direction:column;box-sizing:border-box}:host([hidden]){display:none}.stack--gap-none{gap:0}.stack--gap-2xs{gap:var(--spacing-2xs)}.stack--gap-xs{gap:var(--spacing-xs)}.stack--gap-sm{gap:var(--spacing-sm)}.stack--gap-md{gap:var(--spacing-md)}.stack--gap-lg{gap:var(--spacing-lg)}.stack--gap-xl{gap:var(--spacing-xl)}.stack--gap-2xl{gap:var(--spacing-2xl)}.stack--gap-3xl{gap:var(--spacing-3xl)}.stack--gap-4xl{gap:var(--spacing-4xl)}.stack--gap-5xl{gap:var(--spacing-5xl)}.stack--gap-6xl{gap:var(--spacing-6xl)}.stack--align-stretch{align-items:stretch}.stack--align-start{align-items:flex-start}.stack--align-center{align-items:center}.stack--align-end{align-items:flex-end}.stack--justify-start{justify-content:flex-start}.stack--justify-center{justify-content:center}.stack--justify-end{justify-content:flex-end}.stack--justify-between{justify-content:space-between}.stack--justify-around{justify-content:space-around}`;
7672
+
7673
+ const GAPS = new Set(['none', '2xs', 'xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl', '6xl']);
7674
+ /**
7675
+ * Vertical flow: children stack top to bottom with a token-driven gap.
7676
+ *
7677
+ * It is a real host with `display: flex`, not `display: contents`, so a
7678
+ * consumer's own classes and attributes on `<ch-stack>` keep working.
7679
+ */
7680
+ class ChStack {
7681
+ constructor(hostRef) {
7682
+ registerInstance(this, hostRef);
7683
+ }
7684
+ /**
7685
+ * Space between children, as a step of the spacing scale (`2xs` … `6xl`),
7686
+ * or `none` for no gap. An unknown value falls back to `md`.
7687
+ */
7688
+ gap = 'md';
7689
+ /**
7690
+ * Cross-axis alignment of the children.
7691
+ */
7692
+ align = 'stretch';
7693
+ /**
7694
+ * Main-axis distribution of the children.
7695
+ */
7696
+ justify = 'start';
7697
+ get gapStep() {
7698
+ return GAPS.has(this.gap) ? this.gap : 'md';
7699
+ }
7700
+ render() {
7701
+ return (hAsync(Host, { key: '646286c45adc0d816b0fdbcdfe9e70f809fedb95', class: { stack: true, [`stack--gap-${this.gapStep}`]: true, [`stack--align-${this.align}`]: true, [`stack--justify-${this.justify}`]: true } }, hAsync("slot", { key: '1c18713eb95fc568a08bcbd6e018add9336a0fd0' })));
7702
+ }
7703
+ static get style() { return chStackCss(); }
7704
+ static get cmpMeta() { return {
7705
+ "$flags$": 777,
7706
+ "$tagName$": "ch-stack",
7707
+ "$members$": {
7708
+ "gap": [1],
7709
+ "align": [1],
7710
+ "justify": [1]
7711
+ },
7712
+ "$listeners$": undefined,
7713
+ "$lazyBundleId$": "-",
7714
+ "$attrsToReflect$": []
7715
+ }; }
7716
+ }
7717
+
6964
7718
  const chSwitchCss = () => `:host{display:inline-block}.control{position:relative;display:inline-flex;align-items:center;gap:var(--spacing-lg);cursor:pointer}.control--disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}.input:focus-visible~.track{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}.track{position:relative;box-sizing:border-box;width:var(--spacing-6xl);height:var(--spacing-5xl);flex-shrink:0;border:var(--border-width) solid var(--border);border-radius:var(--radius-pill);background:var(--surface);transition:border-color var(--duration-normal) var(--easing-default), background-color var(--duration-normal) var(--easing-default)}.thumb{position:absolute;top:50%;left:var(--spacing-2xs);width:var(--spacing-2xl);height:var(--spacing-2xl);border-radius:50%;background:var(--text-muted);transform:translateY(-50%);transition:left var(--duration-normal) var(--easing-default), background-color var(--duration-normal) var(--easing-default)}.input:checked~.track{border-color:var(--accent);background:var(--accent)}.input:checked~.track .thumb{left:calc(100% - var(--spacing-2xl) - var(--spacing-2xs));background:var(--color-accent-text)}.input--invalid~.track{border-color:var(--color-status-warning)}.input--invalid:focus-visible~.track{outline-color:var(--color-status-warning)}:host([data-touched]:invalid) .track,:host(:user-invalid) .track{border-color:var(--color-status-warning)}:host([data-touched]:invalid) .input:focus-visible~.track,:host(:user-invalid) .input:focus-visible~.track{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)}`;
6965
7719
 
6966
7720
  let switchIds = 0;
@@ -7035,15 +7789,12 @@ class ChSwitch {
7035
7789
  return;
7036
7790
  }
7037
7791
  internals.setFormValue(this.checked ? this.value : null);
7038
- const flags = {};
7039
- let message;
7040
- if (this.required && !this.checked) {
7041
- flags.valueMissing = true;
7042
- }
7043
- if (this.invalid && this.errorMessage) {
7044
- flags.customError = true;
7045
- }
7046
- message = this.errorMessage ?? (flags.valueMissing ? 'Please fill out this field.' : undefined);
7792
+ const { flags, message } = resolveValidity({
7793
+ required: this.required,
7794
+ empty: !this.checked,
7795
+ invalid: this.invalid,
7796
+ errorMessage: this.errorMessage,
7797
+ });
7047
7798
  internals.setValidity(flags, message);
7048
7799
  }
7049
7800
  componentDidLoad() {
@@ -7072,7 +7823,7 @@ class ChSwitch {
7072
7823
  return undefined;
7073
7824
  }
7074
7825
  render() {
7075
- return (hAsync(Host, { key: '0aae2ddd370936be88af621aba79507531c9ca46' }, hAsync("label", { key: '70a97960763688fbdcad1807468ce647c33c6601', class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled }, htmlFor: this.switchId }, hAsync("input", { key: '6addc2227c9f8a07f9695f1c40a6cf1667a097e6', 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 }), hAsync("span", { key: '06dc52e18e506a49bf188d4d1562c73d1e2b141c', class: "track" }, hAsync("span", { key: 'c7072be8d8a38472aa88e2f7ae1db4c79960ccda', class: "thumb" })), this.label && hAsync("span", { key: 'b3b24e569e5d46d51600fab3546c5d4bf5aca515', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: '0b7bb4fff74be16b96d18af71ef46b0d6dec7984', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: 'b8bfccb23ee16e3885508dbb23052ebc297c36de', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
7826
+ return (hAsync(Host, { key: '7c862590fa8ce9c53d168cb670361259405c72bb' }, hAsync("label", { key: 'e5602d4daa8ebf1a9832282fffb9e538fc1592a8', class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled }, htmlFor: this.switchId }, hAsync("input", { key: 'd29c00496c4a05ccbe66ffdbebf3a496c5ae6995', 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 }), hAsync("span", { key: '5739a0b689ac7ed9ebc917e6102b3951e80ac06d', class: "track" }, hAsync("span", { key: 'e10c21f740092750dd9bb00cde84fa1c26746eb9', class: "thumb" })), this.label && hAsync("span", { key: 'bec86897b1ef0023d3eb8c8438bf6740f32a5921', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: '2568bcf74334e5f081df8efa9a1196c69cb3093d', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: '319d5583cf10e329f05430a577d2f1f956ac8dd5', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
7076
7827
  }
7077
7828
  static get formAssociated() { return true; }
7078
7829
  static get watchers() { return {
@@ -7195,7 +7946,7 @@ class ChTabs {
7195
7946
  }
7196
7947
  render() {
7197
7948
  const active = this.activeValue;
7198
- return (hAsync(Host, { key: '831a0c2d53d4caa19be95a3c2cbbfefb84f65599' }, hAsync("div", { key: '791bb980cb6d7bb137390737bba4796b9f86c963', class: "tablist", role: "tablist", "aria-label": this.label, onKeyDown: this.handleKeyDown, ref: el => (this.tablistEl = el) }, this.tabs.map(tab => {
7949
+ return (hAsync(Host, { key: '915c7a584397bbe10a72642a1ce5ed68f2264ed2' }, hAsync("div", { key: 'b37a294722442c73d224410793cd0c098734993f', class: "tablist", role: "tablist", "aria-label": this.label, onKeyDown: this.handleKeyDown, ref: el => (this.tablistEl = el) }, this.tabs.map(tab => {
7199
7950
  const selected = tab.value === active;
7200
7951
  return (hAsync("button", { key: tab.value, type: "button", class: { 'tab': true, 'tab--active': selected, 'tab--disabled': Boolean(tab.disabled) }, role: "tab", id: this.tabId(tab.value), "data-value": tab.value, "aria-selected": selected ? 'true' : 'false', "aria-controls": this.panelId(tab.value), tabIndex: selected ? FIRST_TAB_INDEX : LAST_TAB_INDEX, disabled: tab.disabled, onClick: () => this.select(tab.value) }, tab.label));
7201
7952
  })), this.tabs.map(tab => (hAsync("div", { key: `${tab.value}-panel`, class: "tabpanel", id: this.panelId(tab.value), role: "tabpanel", "aria-labelledby": this.tabId(tab.value), tabIndex: FIRST_TAB_INDEX, hidden: tab.value !== active }, hAsync("slot", { name: `panel-${tab.value}` }))))));
@@ -7303,15 +8054,12 @@ class ChTextarea {
7303
8054
  return;
7304
8055
  }
7305
8056
  internals.setFormValue(this.value);
7306
- const flags = {};
7307
- let message;
7308
- if (this.required && this.value === '') {
7309
- flags.valueMissing = true;
7310
- }
7311
- if (this.invalid && this.errorMessage) {
7312
- flags.customError = true;
7313
- }
7314
- message = this.errorMessage ?? (flags.valueMissing ? 'Please fill out this field.' : undefined);
8057
+ const { flags, message } = resolveValidity({
8058
+ required: this.required,
8059
+ empty: this.value === '',
8060
+ invalid: this.invalid,
8061
+ errorMessage: this.errorMessage,
8062
+ });
7315
8063
  internals.setValidity(flags, message);
7316
8064
  }
7317
8065
  componentDidLoad() {
@@ -7340,7 +8088,7 @@ class ChTextarea {
7340
8088
  return undefined;
7341
8089
  }
7342
8090
  render() {
7343
- return (hAsync(Host, { key: '35cdb2ec4cb35cb33492c4827f6f69251eea64be' }, this.label && (hAsync("label", { key: '157579852d461707fddc660f33acd21768f7d3fe', class: "label", htmlFor: this.textareaId }, this.label)), hAsync("textarea", { key: 'bf43052c6c66c24a906f6e4fae4256675a1b9f89', 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 || 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) && (hAsync("p", { key: '3dcacf048dccc3474d9397f917da32b334a072fd', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: '22e706a1e0b17112b39e296d267d33a1bced06ee', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
8091
+ return (hAsync(Host, { key: '5e7f4e6c779b677f259b56ebf6cb2e829511275e' }, this.label && (hAsync("label", { key: '73a3a3d44b4926aaf0681aa68f878932c7932dae', class: "label", htmlFor: this.textareaId }, this.label)), hAsync("textarea", { key: '10edc56d4846b578bd11c7bd001e7ca47aa1838d', 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 || 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) && (hAsync("p", { key: '393ea00da6e7def75d4305c242a9cf957013359b', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: 'ba405aec9d92b410e063cec29235240a4a4ec715', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
7344
8092
  }
7345
8093
  static get formAssociated() { return true; }
7346
8094
  static get watchers() { return {
@@ -7380,9 +8128,112 @@ class ChTextarea {
7380
8128
  }; }
7381
8129
  }
7382
8130
 
7383
- 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}}`;
8131
+ const OPPOSITE = {
8132
+ top: 'bottom',
8133
+ bottom: 'top',
8134
+ left: 'right',
8135
+ right: 'left',
8136
+ };
8137
+ const AXIS = {
8138
+ top: 'vertical',
8139
+ bottom: 'vertical',
8140
+ left: 'horizontal',
8141
+ right: 'horizontal',
8142
+ };
8143
+ /**
8144
+ * How far a placed surface overflows each viewport edge. Positive values are
8145
+ * overflow. Used both to pick a placement and to shift the surface back in.
8146
+ */
8147
+ function overflowOf(surface, viewport) {
8148
+ return {
8149
+ top: viewport.top - surface.top,
8150
+ left: viewport.left - surface.left,
8151
+ bottom: surface.top + surface.height - (viewport.top + viewport.height),
8152
+ right: surface.left + surface.width - (viewport.left + viewport.width),
8153
+ };
8154
+ }
8155
+ function offsetFor(placement, anchor, surface, gap) {
8156
+ switch (placement) {
8157
+ case 'top':
8158
+ return {
8159
+ top: anchor.top - surface.height - gap,
8160
+ left: anchor.left + (anchor.width - surface.width) / 2,
8161
+ };
8162
+ case 'bottom':
8163
+ return {
8164
+ top: anchor.top + anchor.height + gap,
8165
+ left: anchor.left + (anchor.width - surface.width) / 2,
8166
+ };
8167
+ case 'left':
8168
+ return {
8169
+ top: anchor.top + (anchor.height - surface.height) / 2,
8170
+ left: anchor.left - surface.width - gap,
8171
+ };
8172
+ case 'right':
8173
+ return {
8174
+ top: anchor.top + (anchor.height - surface.height) / 2,
8175
+ left: anchor.left + anchor.width + gap,
8176
+ };
8177
+ }
8178
+ }
8179
+ /**
8180
+ * Picks the placement that overflows least and then shifts the surface along
8181
+ * the cross axis so it stays inside the viewport.
8182
+ *
8183
+ * The main-axis overflow is not compensated with a translate: a tooltip pinned
8184
+ * to the top edge would cover its own trigger. Flipping to the other side is
8185
+ * what keeps it readable, and the caller decides whether to accept the
8186
+ * remaining overflow.
8187
+ */
8188
+ function placeOverlay({ anchor, surface, viewport, preferred, gap, }) {
8189
+ const candidates = [preferred, OPPOSITE[preferred]];
8190
+ let placement = preferred;
8191
+ let best = Number.POSITIVE_INFINITY;
8192
+ for (const candidate of candidates) {
8193
+ const { top, left } = offsetFor(candidate, anchor, surface, gap);
8194
+ const rect = { top, left, width: surface.width, height: surface.height };
8195
+ const overflow = overflowOf(rect, viewport);
8196
+ const main = AXIS[candidate] === 'vertical' ? clamp(overflow.top) + clamp(overflow.bottom) : clamp(overflow.left) + clamp(overflow.right);
8197
+ if (main < best) {
8198
+ best = main;
8199
+ placement = candidate;
8200
+ }
8201
+ }
8202
+ const { top, left } = offsetFor(placement, anchor, surface, gap);
8203
+ const rect = { top, left, width: surface.width, height: surface.height };
8204
+ const overflow = overflowOf(rect, viewport);
8205
+ const shifted = AXIS[placement] === 'vertical' ? { top, left: left + correction(overflow.left, overflow.right) } : { top: top + correction(overflow.top, overflow.bottom), left };
8206
+ return { placement, top: shifted.top, left: shifted.left };
8207
+ }
8208
+ /** Only real overflow counts: the side that fits contributes nothing. */
8209
+ function clamp(overflow) {
8210
+ return overflow > 0 ? overflow : 0;
8211
+ }
8212
+ /**
8213
+ * Turns the two overflows on an axis into a shift. `before` is the overflow on
8214
+ * the leading edge (top or left), `after` the one on the trailing edge; both
8215
+ * are positive when the surface spills past that edge.
8216
+ *
8217
+ * Pushing away from the leading edge moves the surface inwards, so the shift is
8218
+ * `+before`. The trailing edge needs the opposite sign. When both overflow the
8219
+ * surface is larger than the viewport: pin it to the leading edge and let
8220
+ * `max-width` stop the spill.
8221
+ */
8222
+ function correction(before, after) {
8223
+ if (before > 0) {
8224
+ return before;
8225
+ }
8226
+ if (after > 0) {
8227
+ return -after;
8228
+ }
8229
+ return 0;
8230
+ }
8231
+
8232
+ 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:min(16rem, calc(100vw - 2 * var(--spacing-2xl)));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--positioned{position:fixed;top:var(--ch-tooltip-offset-top);left:var(--ch-tooltip-offset-left);transform:none;margin:0}.bubble--top{bottom:100%;left:50%;transform:translateX(-50%);margin-bottom:var(--spacing-md)}.bubble.bubble--positioned.bubble--top,.bubble.bubble--positioned.bubble--bottom,.bubble.bubble--positioned.bubble--left,.bubble.bubble--positioned.bubble--right{inset:auto;top:var(--ch-tooltip-offset-top);left:var(--ch-tooltip-offset-left);right:auto;bottom:auto;transform:none;margin:0}.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}}`;
7384
8233
 
7385
8234
  let tooltipIds = 0;
8235
+ /** Space between the trigger and the bubble, matching `--spacing-md`. */
8236
+ const GAP = 8;
7386
8237
  /**
7387
8238
  * Short help text shown on hover and on focus.
7388
8239
  *
@@ -7398,6 +8249,13 @@ let tooltipIds = 0;
7398
8249
  * `<input>`). A chucao component such as `ch-button` will not be described,
7399
8250
  * because `aria-*` set on a custom element host does not reach the native
7400
8251
  * element inside it — see the discussion in issue #47.
8252
+ *
8253
+ * Positioning is measured, not purely CSS: `placement` is the preferred side,
8254
+ * and the bubble flips to the opposite side when the preferred one does not
8255
+ * fit, then shifts along the other axis to stay inside the viewport. It
8256
+ * re-measures on scroll, resize and visual-viewport changes, which is what
8257
+ * keeps it correct inside a scrolling modal or drawer and when a mobile
8258
+ * keyboard shrinks the visible area.
7401
8259
  */
7402
8260
  class ChTooltip {
7403
8261
  constructor(hostRef) {
@@ -7405,8 +8263,11 @@ class ChTooltip {
7405
8263
  }
7406
8264
  get el() { return getElement(this); }
7407
8265
  fallbackId = `ch-tooltip-${++tooltipIds}`;
8266
+ bubbleEl;
8267
+ cleanup;
7408
8268
  /**
7409
- * Which side of the trigger the bubble is placed on.
8269
+ * The side the bubble is placed on. It is a preference: when that side has no
8270
+ * room the bubble flips to the opposite one.
7410
8271
  */
7411
8272
  placement = 'top';
7412
8273
  // Hover and focus are tracked apart so that neither cancels the other: a
@@ -7415,15 +8276,26 @@ class ChTooltip {
7415
8276
  hovered = false;
7416
8277
  focused = false;
7417
8278
  dismissed = false;
8279
+ /** The placement actually used, which may differ from the prop after a flip. */
8280
+ resolvedPlacement;
8281
+ /** Offset applied to the bubble once it has been measured. */
8282
+ offset;
7418
8283
  get visible() {
7419
8284
  return (this.hovered || this.focused) && !this.dismissed;
7420
8285
  }
7421
8286
  componentDidLoad() {
7422
8287
  this.associate();
7423
8288
  }
8289
+ connectedCallback() {
8290
+ this.watchViewport();
8291
+ }
8292
+ disconnectedCallback() {
8293
+ this.cleanup?.();
8294
+ }
7424
8295
  handleMouseEnter() {
7425
8296
  this.hovered = true;
7426
8297
  this.dismissed = false;
8298
+ this.position();
7427
8299
  }
7428
8300
  handleMouseLeave() {
7429
8301
  this.hovered = false;
@@ -7431,6 +8303,7 @@ class ChTooltip {
7431
8303
  handleFocusIn() {
7432
8304
  this.focused = true;
7433
8305
  this.dismissed = false;
8306
+ this.position();
7434
8307
  }
7435
8308
  handleFocusOut() {
7436
8309
  this.focused = false;
@@ -7438,15 +8311,78 @@ class ChTooltip {
7438
8311
  /**
7439
8312
  * Listens on the document because a tooltip opened by hovering leaves focus
7440
8313
  * wherever it was, so a host-scoped handler would never see the key.
8314
+ *
8315
+ * Only the outermost Escape handler is stopped from propagating, so a
8316
+ * tooltip inside an open modal closes itself and leaves the modal open.
7441
8317
  */
7442
8318
  handleKeyDown(event) {
7443
- if (event.key === 'Escape' && this.visible) {
8319
+ if (event.key === 'Escape' && this.visible && !event.defaultPrevented) {
8320
+ event.preventDefault();
7444
8321
  this.dismissed = true;
7445
8322
  }
7446
8323
  }
8324
+ /** Cheap guard so scroll frames do not measure while nothing is shown. */
8325
+ handleScroll() {
8326
+ if (this.visible && this.offset) {
8327
+ this.position();
8328
+ }
8329
+ }
8330
+ handleResize() {
8331
+ this.position();
8332
+ }
8333
+ watchViewport() {
8334
+ if (typeof window === 'undefined') {
8335
+ return;
8336
+ }
8337
+ const viewport = window.visualViewport;
8338
+ if (!viewport || this.cleanup) {
8339
+ return;
8340
+ }
8341
+ const update = () => this.position();
8342
+ viewport.addEventListener('resize', update);
8343
+ viewport.addEventListener('scroll', update);
8344
+ this.cleanup = () => {
8345
+ viewport.removeEventListener('resize', update);
8346
+ viewport.removeEventListener('scroll', update);
8347
+ };
8348
+ }
7447
8349
  slotted(name) {
7448
8350
  return Array.from(this.el.children).find(child => child.getAttribute('slot') === name);
7449
8351
  }
8352
+ /**
8353
+ * Measures the anchor and the bubble and stores the offset that keeps the
8354
+ * bubble inside the viewport. Nothing is measured before the bubble has a
8355
+ * box to measure, so the pre-paint render uses plain CSS.
8356
+ */
8357
+ position() {
8358
+ if (typeof window === 'undefined') {
8359
+ return;
8360
+ }
8361
+ const bubble = this.bubbleEl ?? (this.bubbleEl = this.el.shadowRoot?.querySelector('.bubble') ?? undefined);
8362
+ if (!bubble || bubble.offsetWidth === 0) {
8363
+ return;
8364
+ }
8365
+ const anchorRect = this.slotted('trigger')?.getBoundingClientRect?.();
8366
+ if (!anchorRect) {
8367
+ return;
8368
+ }
8369
+ const surface = {
8370
+ width: bubble.offsetWidth + horizontalMargin(bubble),
8371
+ height: bubble.offsetHeight,
8372
+ };
8373
+ const viewport = window.visualViewport;
8374
+ const { placement, top, left } = placeOverlay({
8375
+ anchor: { top: anchorRect.top, left: anchorRect.left, width: anchorRect.width, height: anchorRect.height },
8376
+ surface,
8377
+ viewport: viewport
8378
+ ? { top: viewport.offsetTop, left: viewport.offsetLeft, width: viewport.width, height: viewport.height }
8379
+ : { top: 0, left: 0, width: window.innerWidth, height: window.innerHeight },
8380
+ preferred: this.placement,
8381
+ gap: GAP,
8382
+ });
8383
+ this.resolvedPlacement = placement;
8384
+ this.offset = { top, left };
8385
+ }
7450
8386
  /**
7451
8387
  * Points the trigger at the text with `aria-describedby`. Re-run on
7452
8388
  * `slotchange` because a framework re-render can replace the slotted nodes
@@ -7465,7 +8401,16 @@ class ChTooltip {
7465
8401
  trigger.setAttribute('aria-describedby', content.id);
7466
8402
  };
7467
8403
  render() {
7468
- return (hAsync(Host, { key: '77c1788847db3e52409bf13d1d21bf7828310ef5' }, hAsync("span", { key: '8fcb630946914891dbc1812e506a4160c101c426', class: "anchor" }, hAsync("slot", { key: '798c3d880b53191653f02fab57ce400fcf679f55', name: "trigger", onSlotchange: this.associate }), hAsync("span", { key: '3c10d8e0872da7c0f2920283f812e652ae3f2b71', class: { 'bubble': true, [`bubble--${this.placement}`]: true, 'bubble--visible': this.visible } }, hAsync("slot", { key: '3a9bc13d5871144d75153d248ee05a28dda6679e', name: "content", onSlotchange: this.associate })))));
8404
+ const { offset } = this;
8405
+ return (hAsync(Host, { key: 'fb651dc0bf007fb86c9f69b2c714106520df4d4a' }, hAsync("span", { key: '74324b8e4c0b7c552255605c6aa4ae739e16d832', class: "anchor" }, hAsync("slot", { key: 'd4c2025af2d96b2ea4e7d8d601ce803be82a4a3e', name: "trigger", onSlotchange: this.associate }), hAsync("span", { key: 'f6561dce022d8d9d2d0fb2b6984591301483b1f3', ref: el => (this.bubbleEl = el), style: {
8406
+ '--ch-tooltip-offset-top': offset ? `${offset.top}px` : null,
8407
+ '--ch-tooltip-offset-left': offset ? `${offset.left}px` : null,
8408
+ }, class: {
8409
+ 'bubble': true,
8410
+ 'bubble--positioned': Boolean(this.offset),
8411
+ [`bubble--${this.resolvedPlacement ?? this.placement}`]: true,
8412
+ 'bubble--visible': this.visible,
8413
+ } }, hAsync("slot", { key: 'a099d15660ea17211b4c50912842b3152e5f652c', name: "content", onSlotchange: this.associate })))));
7469
8414
  }
7470
8415
  static get style() { return chTooltipCss(); }
7471
8416
  static get cmpMeta() { return {
@@ -7475,13 +8420,18 @@ class ChTooltip {
7475
8420
  "placement": [1],
7476
8421
  "hovered": [32],
7477
8422
  "focused": [32],
7478
- "dismissed": [32]
8423
+ "dismissed": [32],
8424
+ "resolvedPlacement": [32]
7479
8425
  },
7480
- "$listeners$": [[1, "mouseenter", "handleMouseEnter"], [1, "mouseleave", "handleMouseLeave"], [0, "focusin", "handleFocusIn"], [0, "focusout", "handleFocusOut"], [4, "keydown", "handleKeyDown"]],
8426
+ "$listeners$": [[1, "mouseenter", "handleMouseEnter"], [1, "mouseleave", "handleMouseLeave"], [0, "focusin", "handleFocusIn"], [0, "focusout", "handleFocusOut"], [4, "keydown", "handleKeyDown"], [11, "scroll", "handleScroll"], [9, "resize", "handleResize"]],
7481
8427
  "$lazyBundleId$": "-",
7482
8428
  "$attrsToReflect$": []
7483
8429
  }; }
7484
8430
  }
8431
+ function horizontalMargin(el) {
8432
+ const style = getComputedStyle(el);
8433
+ return (parseFloat(style.marginLeft) || 0) + (parseFloat(style.marginRight) || 0);
8434
+ }
7485
8435
 
7486
8436
  registerComponents([
7487
8437
  ChAccordion,
@@ -7490,16 +8440,24 @@ registerComponents([
7490
8440
  ChButton,
7491
8441
  ChCard,
7492
8442
  ChCheckbox,
8443
+ ChCluster,
7493
8444
  ChDivider,
7494
8445
  ChDrawer,
7495
8446
  ChEmoji,
8447
+ ChEmptyState,
8448
+ ChGrid,
8449
+ ChIcon,
8450
+ ChIconButton,
7496
8451
  ChInput,
7497
8452
  ChLink,
7498
8453
  ChModal,
8454
+ ChPageHeader,
7499
8455
  ChRadio,
7500
8456
  ChSegmentedControl,
7501
8457
  ChSelect,
8458
+ ChSkeleton,
7502
8459
  ChSpinner,
8460
+ ChStack,
7503
8461
  ChSwitch,
7504
8462
  ChTabs,
7505
8463
  ChTextarea,
@@ -7510,7 +8468,7 @@ exports.hydrateApp = hydrateApp;
7510
8468
 
7511
8469
 
7512
8470
  /*hydrateAppClosure end*/
7513
- hydrateApp(window, $stencilHydrateOpts, $stencilHydrateResults, $stencilAfterHydrate, $stencilHydrateResolve);
8471
+ hydrateApp(window, $stencilHydrateOpts, $stencilHydrateResults, $stencilAfterHydrate, $stencilHydrateResolve, $stencilAbortController);
7514
8472
  }
7515
8473
 
7516
8474
  hydrateAppClosure($stencilWindow);
@@ -7605,7 +8563,7 @@ var NAMESPACE = (
7605
8563
  );
7606
8564
 
7607
8565
  /*
7608
- Stencil Hydrate Runner v4.44.2 | MIT Licensed | https://stenciljs.com
8566
+ Stencil Hydrate Runner v4.45.1 | MIT Licensed | https://stenciljs.com
7609
8567
  */
7610
8568
  var __create = Object.create;
7611
8569
  var __defProp = Object.defineProperty;
@@ -21752,11 +22710,14 @@ function resetWindow(win2) {
21752
22710
  } catch (e) {
21753
22711
  }
21754
22712
  }
21755
- win2.fetch = null;
21756
- win2.Headers = null;
21757
- win2.Request = null;
21758
- win2.Response = null;
21759
- win2.FetchError = null;
22713
+ const windowDestroyed = () => {
22714
+ throw new Error("MockWindow was already destroyed");
22715
+ };
22716
+ win2.fetch = windowDestroyed;
22717
+ win2.Headers = windowDestroyed;
22718
+ win2.Request = windowDestroyed;
22719
+ win2.Response = windowDestroyed;
22720
+ win2.FetchError = windowDestroyed;
21760
22721
  }
21761
22722
  }
21762
22723
  function resetWindowDimensions(win2) {
@@ -22156,9 +23117,6 @@ var _cssColonHostContextRe = new RegExp("(" + _polyfillHostContext + _parenSuffi
22156
23117
  var _cssColonSlottedRe = new RegExp("(" + _polyfillSlotted + _parenSuffix, "gim");
22157
23118
  var _polyfillHostNoCombinator = _polyfillHost + "-no-combinator";
22158
23119
 
22159
- // src/runtime/mode.ts
22160
- var setMode = (handler) => modeResolutionChain.push(handler);
22161
-
22162
23120
  // src/utils/local-value.ts
22163
23121
  var LocalValue = class _LocalValue {
22164
23122
  type;
@@ -24235,6 +25193,37 @@ var relocateMetaCharset = (doc) => {
24235
25193
  };
24236
25194
 
24237
25195
  // src/compiler/style/css-parser/parse-css.ts
25196
+ var splitSelectorList = (selectors) => {
25197
+ const parts = [];
25198
+ let depth = 0;
25199
+ let quote = null;
25200
+ let start = 0;
25201
+ for (let i = 0; i < selectors.length; i++) {
25202
+ const ch = selectors[i];
25203
+ if (quote) {
25204
+ if (ch === "\\") {
25205
+ i++;
25206
+ } else if (ch === quote) {
25207
+ quote = null;
25208
+ }
25209
+ continue;
25210
+ }
25211
+ if (ch === '"' || ch === "'") {
25212
+ quote = ch;
25213
+ } else if (ch === "\\") {
25214
+ i++;
25215
+ } else if (ch === "(") {
25216
+ depth++;
25217
+ } else if (ch === ")") {
25218
+ depth = Math.max(0, depth - 1);
25219
+ } else if (ch === "," && depth === 0) {
25220
+ parts.push(selectors.slice(start, i));
25221
+ start = i + 1;
25222
+ }
25223
+ }
25224
+ parts.push(selectors.slice(start));
25225
+ return parts.map((s) => s.trim());
25226
+ };
24238
25227
  var parseCss = (css, filePath) => {
24239
25228
  let lineno = 1;
24240
25229
  let column = 1;
@@ -24356,11 +25345,8 @@ var parseCss = (css, filePath) => {
24356
25345
  const selector = () => {
24357
25346
  const m = match2(/^([^{]+)/);
24358
25347
  if (!m) return null;
24359
- return trim(m[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g, "").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g, function(m2) {
24360
- return m2.replace(/,/g, "\u200C");
24361
- }).split(/\s*(?![^(]*\)),\s*/).map(function(s) {
24362
- return s.replace(/\u200C/g, ",");
24363
- });
25348
+ const cleaned = trim(m[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g, "");
25349
+ return splitSelectorList(cleaned);
24364
25350
  };
24365
25351
  const declaration = () => {
24366
25352
  const pos = position();
@@ -25534,10 +26520,6 @@ async function render2(win2, opts, results) {
25534
26520
  try {
25535
26521
  await Promise.resolve(beforeHydrateFn(win2.document));
25536
26522
  return new Promise((resolve) => {
25537
- if (Array.isArray(opts.modes)) {
25538
- modeResolutionChain.length = 0;
25539
- opts.modes.forEach((mode) => setMode(mode));
25540
- }
25541
26523
  return hydrateFactory(win2, opts, results, afterHydrate, resolve);
25542
26524
  });
25543
26525
  } catch (e) {