@devschile/chucao 2.8.0 → 2.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (216) hide show
  1. package/dist/chucao/chucao.esm.js +1 -1
  2. package/dist/chucao/{p-5093c486.entry.js → p-03acf096.entry.js} +2 -2
  3. package/dist/chucao/{p-f0c288db.entry.js → p-0ce2b15d.entry.js} +2 -2
  4. package/dist/chucao/{p-af088ffd.entry.js → p-10e37157.entry.js} +2 -2
  5. package/dist/chucao/{p-46dae34b.entry.js → p-12043dc1.entry.js} +2 -2
  6. package/dist/chucao/p-1dca55d6.entry.js +2 -0
  7. package/dist/chucao/{p-0831c6f2.entry.js.map → p-1dca55d6.entry.js.map} +1 -1
  8. package/dist/chucao/{p-c4d68ab7.entry.js → p-244d8e96.entry.js} +2 -2
  9. package/dist/chucao/{p-ba589c2f.entry.js → p-29841714.entry.js} +2 -2
  10. package/dist/chucao/{p-5577e0a0.entry.js → p-302ec527.entry.js} +2 -2
  11. package/dist/chucao/{p-25f4f815.entry.js → p-5a62951e.entry.js} +2 -2
  12. package/dist/chucao/{p-3e0d7585.entry.js → p-5d0ac17a.entry.js} +2 -2
  13. package/dist/chucao/{p-b42ec9bf.entry.js → p-5e0e1012.entry.js} +2 -2
  14. package/dist/chucao/{p-56e41372.entry.js → p-61a94a4e.entry.js} +2 -2
  15. package/dist/chucao/p-649c2cef.entry.js +2 -0
  16. package/dist/chucao/p-649c2cef.entry.js.map +1 -0
  17. package/dist/chucao/{p-eb39b9c2.entry.js → p-674c0f61.entry.js} +2 -2
  18. package/dist/chucao/{p-d868bdbc.entry.js → p-67f0fc77.entry.js} +2 -2
  19. package/dist/chucao/{p-d630f662.entry.js → p-68e4a129.entry.js} +2 -2
  20. package/dist/chucao/{p-b80c39c3.entry.js → p-6e345b3f.entry.js} +2 -2
  21. package/dist/chucao/{p-6e93c392.entry.js → p-72d4dacf.entry.js} +2 -2
  22. package/dist/chucao/{p-ca3179ae.entry.js → p-74d9b7e5.entry.js} +2 -2
  23. package/dist/chucao/{p-8b09ad3c.entry.js → p-791ce537.entry.js} +2 -2
  24. package/dist/chucao/{p-ad41da02.entry.js → p-79e8c10b.entry.js} +2 -2
  25. package/dist/chucao/{p-c98e2a50.entry.js → p-7e13f725.entry.js} +2 -2
  26. package/dist/chucao/{p-6c2e5931.entry.js → p-8b23d072.entry.js} +2 -2
  27. package/dist/chucao/{p-920d5727.entry.js → p-a5430e95.entry.js} +2 -2
  28. package/dist/chucao/{p-e6b7b2da.entry.js → p-a7c66879.entry.js} +2 -2
  29. package/dist/chucao/p-b452d6cb.entry.js +2 -0
  30. package/dist/chucao/{p-0d7fc720.entry.js → p-b7332faf.entry.js} +2 -2
  31. package/dist/chucao/{p-19d90f87.entry.js → p-f3d03388.entry.js} +2 -2
  32. package/dist/chucao/{p-8fcf6d36.entry.js → p-f925d45c.entry.js} +2 -2
  33. package/dist/cjs/ch-accordion.cjs.entry.js +1 -1
  34. package/dist/cjs/ch-alert_8.cjs.entry.js +7 -7
  35. package/dist/cjs/ch-checkbox.cjs.entry.js +1 -1
  36. package/dist/cjs/ch-cluster.cjs.entry.js +2 -2
  37. package/dist/cjs/ch-combobox.cjs.entry.js +304 -0
  38. package/dist/cjs/ch-combobox.cjs.entry.js.map +1 -0
  39. package/dist/cjs/ch-confirm-dialog.cjs.entry.js +1 -1
  40. package/dist/cjs/ch-description-list.cjs.entry.js +1 -1
  41. package/dist/cjs/ch-divider.cjs.entry.js +1 -1
  42. package/dist/cjs/ch-drawer.cjs.entry.js +1 -1
  43. package/dist/cjs/ch-emoji.cjs.entry.js +1 -1
  44. package/dist/cjs/ch-empty-state.cjs.entry.js +1 -1
  45. package/dist/cjs/ch-grid.cjs.entry.js +1 -1
  46. package/dist/cjs/ch-icon-button.cjs.entry.js +1 -1
  47. package/dist/cjs/ch-icon.cjs.entry.js +1 -1
  48. package/dist/cjs/ch-modal.cjs.entry.js +1 -1
  49. package/dist/cjs/ch-number-input.cjs.entry.js +2 -2
  50. package/dist/cjs/ch-otp-input.cjs.entry.js +2 -2
  51. package/dist/cjs/ch-page-header.cjs.entry.js +1 -1
  52. package/dist/cjs/ch-pagination.cjs.entry.js +1 -1
  53. package/dist/cjs/ch-radio.cjs.entry.js +1 -1
  54. package/dist/cjs/ch-segmented-control.cjs.entry.js +1 -1
  55. package/dist/cjs/ch-skeleton.cjs.entry.js +1 -1
  56. package/dist/cjs/ch-stack.cjs.entry.js +1 -1
  57. package/dist/cjs/ch-stat.cjs.entry.js +2 -2
  58. package/dist/cjs/ch-table.cjs.entry.js +1 -1
  59. package/dist/cjs/ch-tabs.cjs.entry.js +1 -1
  60. package/dist/cjs/ch-textarea.cjs.entry.js +1 -1
  61. package/dist/cjs/ch-timeline.cjs.entry.js +1 -1
  62. package/dist/cjs/ch-tooltip.cjs.entry.js +2 -2
  63. package/dist/cjs/chucao.cjs.js +1 -1
  64. package/dist/cjs/loader.cjs.js +1 -1
  65. package/dist/collection/collection-manifest.json +1 -0
  66. package/dist/collection/components/ch-accordion/ch-accordion.js +1 -1
  67. package/dist/collection/components/ch-alert/ch-alert.js +1 -1
  68. package/dist/collection/components/ch-badge/ch-badge.js +1 -1
  69. package/dist/collection/components/ch-card/ch-card.js +1 -1
  70. package/dist/collection/components/ch-checkbox/ch-checkbox.js +1 -1
  71. package/dist/collection/components/ch-cluster/ch-cluster.js +2 -2
  72. package/dist/collection/components/ch-combobox/ch-combobox.css +153 -0
  73. package/dist/collection/components/ch-combobox/ch-combobox.js +577 -0
  74. package/dist/collection/components/ch-combobox/ch-combobox.js.map +1 -0
  75. package/dist/collection/components/ch-confirm-dialog/ch-confirm-dialog.js +1 -1
  76. package/dist/collection/components/ch-description-list/ch-description-list.js +1 -1
  77. package/dist/collection/components/ch-divider/ch-divider.js +1 -1
  78. package/dist/collection/components/ch-drawer/ch-drawer.js +1 -1
  79. package/dist/collection/components/ch-emoji/ch-emoji.js +1 -1
  80. package/dist/collection/components/ch-empty-state/ch-empty-state.js +1 -1
  81. package/dist/collection/components/ch-grid/ch-grid.js +1 -1
  82. package/dist/collection/components/ch-icon/ch-icon.js +1 -1
  83. package/dist/collection/components/ch-icon-button/ch-icon-button.js +1 -1
  84. package/dist/collection/components/ch-input/ch-input.js +1 -1
  85. package/dist/collection/components/ch-modal/ch-modal.js +1 -1
  86. package/dist/collection/components/ch-number-input/ch-number-input.js +2 -2
  87. package/dist/collection/components/ch-otp-input/ch-otp-input.js +2 -2
  88. package/dist/collection/components/ch-page-header/ch-page-header.js +1 -1
  89. package/dist/collection/components/ch-pagination/ch-pagination.js +1 -1
  90. package/dist/collection/components/ch-radio/ch-radio.js +1 -1
  91. package/dist/collection/components/ch-segmented-control/ch-segmented-control.js +1 -1
  92. package/dist/collection/components/ch-select/ch-select.js +1 -1
  93. package/dist/collection/components/ch-skeleton/ch-skeleton.js +1 -1
  94. package/dist/collection/components/ch-spinner/ch-spinner.js +1 -1
  95. package/dist/collection/components/ch-stack/ch-stack.js +1 -1
  96. package/dist/collection/components/ch-stat/ch-stat.js +2 -2
  97. package/dist/collection/components/ch-switch/ch-switch.js +1 -1
  98. package/dist/collection/components/ch-table/ch-table.js +1 -1
  99. package/dist/collection/components/ch-tabs/ch-tabs.js +1 -1
  100. package/dist/collection/components/ch-textarea/ch-textarea.js +1 -1
  101. package/dist/collection/components/ch-timeline/ch-timeline.js +1 -1
  102. package/dist/collection/components/ch-tooltip/ch-tooltip.js +2 -2
  103. package/dist/components/ch-accordion.js +1 -1
  104. package/dist/components/ch-alert.js +1 -1
  105. package/dist/components/ch-badge.js +1 -1
  106. package/dist/components/ch-button.js +1 -1
  107. package/dist/components/ch-card.js +1 -1
  108. package/dist/components/ch-checkbox.js +1 -1
  109. package/dist/components/ch-cluster.js +1 -1
  110. package/dist/components/ch-combobox.d.ts +11 -0
  111. package/dist/components/ch-combobox.js +2 -0
  112. package/dist/components/ch-combobox.js.map +1 -0
  113. package/dist/components/ch-confirm-dialog.js +1 -1
  114. package/dist/components/ch-description-list.js +1 -1
  115. package/dist/components/ch-divider.js +1 -1
  116. package/dist/components/ch-drawer.js +1 -1
  117. package/dist/components/ch-emoji.js +1 -1
  118. package/dist/components/ch-empty-state.js +1 -1
  119. package/dist/components/ch-grid.js +1 -1
  120. package/dist/components/ch-icon-button.js +1 -1
  121. package/dist/components/ch-icon.js +1 -1
  122. package/dist/components/ch-input.js +1 -1
  123. package/dist/components/ch-modal.js +1 -1
  124. package/dist/components/ch-number-input.js +1 -1
  125. package/dist/components/ch-otp-input.js +1 -1
  126. package/dist/components/ch-page-header.js +1 -1
  127. package/dist/components/ch-pagination.js +1 -1
  128. package/dist/components/ch-radio.js +1 -1
  129. package/dist/components/ch-segmented-control.js +1 -1
  130. package/dist/components/ch-select.js +1 -1
  131. package/dist/components/ch-skeleton.js +1 -1
  132. package/dist/components/ch-spinner.js +1 -1
  133. package/dist/components/ch-stack.js +1 -1
  134. package/dist/components/ch-stat.js +1 -1
  135. package/dist/components/ch-switch.js +1 -1
  136. package/dist/components/ch-table.js +1 -1
  137. package/dist/components/ch-tabs.js +1 -1
  138. package/dist/components/ch-textarea.js +1 -1
  139. package/dist/components/ch-timeline.js +1 -1
  140. package/dist/components/ch-tooltip.js +1 -1
  141. package/dist/components/{p-CF1yV0aa.js → p-CuSstsTP.js} +2 -2
  142. package/dist/components/{p-CmMN-UuJ.js → p-MBLhKofG.js} +2 -2
  143. package/dist/esm/ch-accordion.entry.js +1 -1
  144. package/dist/esm/ch-alert_8.entry.js +7 -7
  145. package/dist/esm/ch-checkbox.entry.js +1 -1
  146. package/dist/esm/ch-cluster.entry.js +2 -2
  147. package/dist/esm/ch-combobox.entry.js +302 -0
  148. package/dist/esm/ch-combobox.entry.js.map +1 -0
  149. package/dist/esm/ch-confirm-dialog.entry.js +1 -1
  150. package/dist/esm/ch-description-list.entry.js +1 -1
  151. package/dist/esm/ch-divider.entry.js +1 -1
  152. package/dist/esm/ch-drawer.entry.js +1 -1
  153. package/dist/esm/ch-emoji.entry.js +1 -1
  154. package/dist/esm/ch-empty-state.entry.js +1 -1
  155. package/dist/esm/ch-grid.entry.js +1 -1
  156. package/dist/esm/ch-icon-button.entry.js +1 -1
  157. package/dist/esm/ch-icon.entry.js +1 -1
  158. package/dist/esm/ch-modal.entry.js +1 -1
  159. package/dist/esm/ch-number-input.entry.js +2 -2
  160. package/dist/esm/ch-otp-input.entry.js +2 -2
  161. package/dist/esm/ch-page-header.entry.js +1 -1
  162. package/dist/esm/ch-pagination.entry.js +1 -1
  163. package/dist/esm/ch-radio.entry.js +1 -1
  164. package/dist/esm/ch-segmented-control.entry.js +1 -1
  165. package/dist/esm/ch-skeleton.entry.js +1 -1
  166. package/dist/esm/ch-stack.entry.js +1 -1
  167. package/dist/esm/ch-stat.entry.js +2 -2
  168. package/dist/esm/ch-table.entry.js +1 -1
  169. package/dist/esm/ch-tabs.entry.js +1 -1
  170. package/dist/esm/ch-textarea.entry.js +1 -1
  171. package/dist/esm/ch-timeline.entry.js +1 -1
  172. package/dist/esm/ch-tooltip.entry.js +2 -2
  173. package/dist/esm/chucao.js +1 -1
  174. package/dist/esm/loader.js +1 -1
  175. package/dist/types/components/ch-combobox/ch-combobox.d.ts +98 -0
  176. package/dist/types/components.d.ts +209 -0
  177. package/dist-react/components.d.ts +7 -1
  178. package/dist-react/components.js +12 -0
  179. package/dist-react/components.ts +19 -1
  180. package/dist-vue/index.d.ts +1 -0
  181. package/dist-vue/index.js +19 -0
  182. package/dist-vue/index.ts +21 -0
  183. package/hydrate/index.js +376 -39
  184. package/hydrate/index.mjs +376 -39
  185. package/package.json +5 -1
  186. package/dist/chucao/p-0831c6f2.entry.js +0 -2
  187. package/dist/chucao/p-7f99ae48.entry.js +0 -2
  188. /package/dist/chucao/{p-5093c486.entry.js.map → p-03acf096.entry.js.map} +0 -0
  189. /package/dist/chucao/{p-f0c288db.entry.js.map → p-0ce2b15d.entry.js.map} +0 -0
  190. /package/dist/chucao/{p-af088ffd.entry.js.map → p-10e37157.entry.js.map} +0 -0
  191. /package/dist/chucao/{p-46dae34b.entry.js.map → p-12043dc1.entry.js.map} +0 -0
  192. /package/dist/chucao/{p-c4d68ab7.entry.js.map → p-244d8e96.entry.js.map} +0 -0
  193. /package/dist/chucao/{p-ba589c2f.entry.js.map → p-29841714.entry.js.map} +0 -0
  194. /package/dist/chucao/{p-5577e0a0.entry.js.map → p-302ec527.entry.js.map} +0 -0
  195. /package/dist/chucao/{p-25f4f815.entry.js.map → p-5a62951e.entry.js.map} +0 -0
  196. /package/dist/chucao/{p-3e0d7585.entry.js.map → p-5d0ac17a.entry.js.map} +0 -0
  197. /package/dist/chucao/{p-b42ec9bf.entry.js.map → p-5e0e1012.entry.js.map} +0 -0
  198. /package/dist/chucao/{p-56e41372.entry.js.map → p-61a94a4e.entry.js.map} +0 -0
  199. /package/dist/chucao/{p-eb39b9c2.entry.js.map → p-674c0f61.entry.js.map} +0 -0
  200. /package/dist/chucao/{p-d868bdbc.entry.js.map → p-67f0fc77.entry.js.map} +0 -0
  201. /package/dist/chucao/{p-d630f662.entry.js.map → p-68e4a129.entry.js.map} +0 -0
  202. /package/dist/chucao/{p-b80c39c3.entry.js.map → p-6e345b3f.entry.js.map} +0 -0
  203. /package/dist/chucao/{p-6e93c392.entry.js.map → p-72d4dacf.entry.js.map} +0 -0
  204. /package/dist/chucao/{p-ca3179ae.entry.js.map → p-74d9b7e5.entry.js.map} +0 -0
  205. /package/dist/chucao/{p-8b09ad3c.entry.js.map → p-791ce537.entry.js.map} +0 -0
  206. /package/dist/chucao/{p-ad41da02.entry.js.map → p-79e8c10b.entry.js.map} +0 -0
  207. /package/dist/chucao/{p-c98e2a50.entry.js.map → p-7e13f725.entry.js.map} +0 -0
  208. /package/dist/chucao/{p-6c2e5931.entry.js.map → p-8b23d072.entry.js.map} +0 -0
  209. /package/dist/chucao/{p-920d5727.entry.js.map → p-a5430e95.entry.js.map} +0 -0
  210. /package/dist/chucao/{p-e6b7b2da.entry.js.map → p-a7c66879.entry.js.map} +0 -0
  211. /package/dist/chucao/{p-7f99ae48.entry.js.map → p-b452d6cb.entry.js.map} +0 -0
  212. /package/dist/chucao/{p-0d7fc720.entry.js.map → p-b7332faf.entry.js.map} +0 -0
  213. /package/dist/chucao/{p-19d90f87.entry.js.map → p-f3d03388.entry.js.map} +0 -0
  214. /package/dist/chucao/{p-8fcf6d36.entry.js.map → p-f925d45c.entry.js.map} +0 -0
  215. /package/dist/components/{p-CF1yV0aa.js.map → p-CuSstsTP.js.map} +0 -0
  216. /package/dist/components/{p-CmMN-UuJ.js.map → p-MBLhKofG.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{p as e,H as t,c as r,h as s,d as a,t as o}from"./p-qP_9qshx.js";const i=()=>`:host{display:block;font-family:var(--typography-body);color:var(--color-text-primary)}:host([hidden]){display:none}.table__scroll{overflow-x:auto;min-width:0;border:var(--border-width) solid var(--color-border-default);border-radius:var(--radius-md);background:var(--color-surface-default)}.table__scroll:focus-visible{outline:2px solid var(--color-accent-default);outline-offset:2px}.table{width:100%;border-collapse:collapse;font-size:var(--typography-size-sm)}.cell{min-width:8rem}.caption{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.cell{padding:var(--spacing-md) var(--spacing-lg);text-align:left;vertical-align:top;border-bottom:var(--border-width) solid var(--color-border-default)}.cell--header{font-weight:var(--typography-weight-semibold);color:var(--color-text-secondary);white-space:nowrap;background:var(--color-surface-hover)}tbody tr:last-child td{border-bottom:0}.sort{all:unset;display:inline-flex;align-items:center;gap:var(--spacing-xs);cursor:pointer;border-radius:var(--radius-sm)}.sort:focus-visible{outline:2px solid var(--color-accent-default);outline-offset:2px}.sort__cue{font-size:var(--typography-size-xs);color:var(--color-text-secondary)}.table__empty{padding:var(--spacing-2xl) var(--spacing-lg);text-align:center}.table__empty-message{margin:0;font-size:var(--typography-size-sm);color:var(--color-text-secondary)}`;let c=0;const d=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow();this.chSort=r(this,"chSort")}captionId=`ch-table-${++c}-caption`;emptyId=`${this.captionId}-empty`;get host(){return this}columns=[];sortable=false;sortKey;sortDirection="ascending";label;empty="unmeasured";filtered=false;chSort;onFiltered(){this.measure()}rerenderHeaders(){this.rerender=!this.rerender}rerender=false;observer;componentDidLoad(){this.measure();if(typeof MutationObserver==="function"){this.observer=new MutationObserver(this.measure);this.observer.observe(this.host,{childList:true})}}disconnectedCallback(){this.observer?.disconnect();this.observer=undefined}measure=()=>{const e=Array.from(this.host.children).filter((e=>e.tagName==="TR"));this.empty=e.length===0?"true":"none"};get emptyState(){if(this.filtered){return"filtered"}return this.empty}sortCue(e){if(!e){return"⇅"}return this.sortDirection==="ascending"?"▲":"▼"}emptyMessage(e){return e==="filtered"?"No results for these filters.":"Nothing here yet."}nextDirection(e){if(this.sortKey!==e){return"ascending"}return this.sortDirection==="ascending"?"descending":"ascending"}handleSort=e=>{this.chSort.emit({key:e,direction:this.nextDirection(e)})};handleHeaderKeydown=(e,t)=>{if(e.key!=="Enter"&&e.key!==" "){return}e.preventDefault();this.handleSort(t)};renderHeaderCell(e){const t=this.sortable&&e.sortable!==false;if(!t){return s("th",{scope:"col",class:"cell cell--header"},e.label)}const r=this.sortKey===e.key;const a=r?this.sortDirection:"none";return s("th",{scope:"col",class:"cell cell--header","aria-sort":a},s("button",{type:"button",class:"sort",onClick:()=>this.handleSort(e.key),onKeyDown:t=>this.handleHeaderKeydown(t,e.key)},s("span",null,e.label),s("span",{class:"sort__cue","aria-hidden":"true"},this.sortCue(r))))}render(){const e=this.emptyState;return s(a,{key:"e7957ed09b624ec1fdc599f300d7b1a49668ec41",class:{table:true,"table--empty":e==="true"||e==="filtered"}},s("div",{key:"c2fe932de59ee1c557c7a10bdd5f8704b5ee1dd2",class:"table__scroll",tabIndex:0,role:"group","aria-labelledby":this.captionId},s("table",{key:"9e76c06676ef07c3c7fc46e80e78a7baba6f0c33"},s("caption",{key:"3842f79c25b143fdb6d410d985e1d456cbdde190",id:this.captionId,class:"caption"},this.label),s("thead",{key:"1116cf7fed60c9757fac4097332aa2308609cb6b"},s("tr",{key:"f8ea8e04ca4bd02a63768c93c6ce1c5b4e307792"},this.columns.map((e=>this.renderHeaderCell(e))))),s("tbody",{key:"2a2c7b18fad74c854cad9164978753ffe168219f"},s("slot",{key:"514e8c0b56e8beb8c0503723823ce8be7a588af6"})))),(e==="true"||e==="filtered")&&s("div",{key:"a64841b511490e24462b89b8007f79c662de6120",class:"table__empty",id:this.emptyId},s("slot",{key:"32bcbe36421d083883223dadaec7dbd194deab8c",name:"empty"},s("p",{key:"36a9af8b0e9cbb0dfb96d52d057c910a92fe918e",class:"table__empty-message"},this.emptyMessage(e)))))}static get watchers(){return{filtered:[{onFiltered:0}],sortKey:[{rerenderHeaders:0}],sortDirection:[{rerenderHeaders:0}],sortable:[{rerenderHeaders:0}]}}static get style(){return i()}},[769,"ch-table",{columns:[16],sortable:[516],sortKey:[1,"sort-key"],sortDirection:[1,"sort-direction"],label:[1],filtered:[516],empty:[32],rerender:[32]},undefined,{filtered:[{onFiltered:0}],sortKey:[{rerenderHeaders:0}],sortDirection:[{rerenderHeaders:0}],sortable:[{rerenderHeaders:0}]}]);function n(){if(typeof customElements==="undefined"){return}const e=["ch-table"];e.forEach((e=>{switch(e){case"ch-table":if(!customElements.get(o(e))){customElements.define(o(e),d)}break}}))}n();const l=d;const h=n;export{l as ChTable,h as defineCustomElement};
1
+ import{p as e,H as t,c as r,h as s,d as a,t as o}from"./p-qP_9qshx.js";const i=()=>`:host{display:block;font-family:var(--typography-body);color:var(--color-text-primary)}:host([hidden]){display:none}.table__scroll{overflow-x:auto;min-width:0;border:var(--border-width) solid var(--color-border-default);border-radius:var(--radius-md);background:var(--color-surface-default)}.table__scroll:focus-visible{outline:2px solid var(--color-accent-default);outline-offset:2px}.table{width:100%;border-collapse:collapse;font-size:var(--typography-size-sm)}.cell{min-width:8rem}.caption{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.cell{padding:var(--spacing-md) var(--spacing-lg);text-align:left;vertical-align:top;border-bottom:var(--border-width) solid var(--color-border-default)}.cell--header{font-weight:var(--typography-weight-semibold);color:var(--color-text-secondary);white-space:nowrap;background:var(--color-surface-hover)}tbody tr:last-child td{border-bottom:0}.sort{all:unset;display:inline-flex;align-items:center;gap:var(--spacing-xs);cursor:pointer;border-radius:var(--radius-sm)}.sort:focus-visible{outline:2px solid var(--color-accent-default);outline-offset:2px}.sort__cue{font-size:var(--typography-size-xs);color:var(--color-text-secondary)}.table__empty{padding:var(--spacing-2xl) var(--spacing-lg);text-align:center}.table__empty-message{margin:0;font-size:var(--typography-size-sm);color:var(--color-text-secondary)}`;let d=0;const n=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow();this.chSort=r(this,"chSort")}captionId=`ch-table-${++d}-caption`;emptyId=`${this.captionId}-empty`;get host(){return this}columns=[];sortable=false;sortKey;sortDirection="ascending";label;empty="unmeasured";filtered=false;chSort;onFiltered(){this.measure()}rerenderHeaders(){this.rerender=!this.rerender}rerender=false;observer;componentDidLoad(){this.measure();if(typeof MutationObserver==="function"){this.observer=new MutationObserver(this.measure);this.observer.observe(this.host,{childList:true})}}disconnectedCallback(){this.observer?.disconnect();this.observer=undefined}measure=()=>{const e=Array.from(this.host.children).filter((e=>e.tagName==="TR"));this.empty=e.length===0?"true":"none"};get emptyState(){if(this.filtered){return"filtered"}return this.empty}sortCue(e){if(!e){return"⇅"}return this.sortDirection==="ascending"?"▲":"▼"}emptyMessage(e){return e==="filtered"?"No results for these filters.":"Nothing here yet."}nextDirection(e){if(this.sortKey!==e){return"ascending"}return this.sortDirection==="ascending"?"descending":"ascending"}handleSort=e=>{this.chSort.emit({key:e,direction:this.nextDirection(e)})};handleHeaderKeydown=(e,t)=>{if(e.key!=="Enter"&&e.key!==" "){return}e.preventDefault();this.handleSort(t)};renderHeaderCell(e){const t=this.sortable&&e.sortable!==false;if(!t){return s("th",{scope:"col",class:"cell cell--header"},e.label)}const r=this.sortKey===e.key;const a=r?this.sortDirection:"none";return s("th",{scope:"col",class:"cell cell--header","aria-sort":a},s("button",{type:"button",class:"sort",onClick:()=>this.handleSort(e.key),onKeyDown:t=>this.handleHeaderKeydown(t,e.key)},s("span",null,e.label),s("span",{class:"sort__cue","aria-hidden":"true"},this.sortCue(r))))}render(){const e=this.emptyState;return s(a,{key:"bb91f61f579bc99b632bdd5b3a746c6c7319dd70",class:{table:true,"table--empty":e==="true"||e==="filtered"}},s("div",{key:"ddd75bdab98d1784863697dc784d2cec869bd5f5",class:"table__scroll",tabIndex:0,role:"group","aria-labelledby":this.captionId},s("table",{key:"cf02a54dd6b14a1604b417adab84cde9d0f4d814"},s("caption",{key:"fc6f525350e2a51e5325f383edd361c270c25fc0",id:this.captionId,class:"caption"},this.label),s("thead",{key:"2d03b39883847a2ab0f1807fcf767fc4edea8ad9"},s("tr",{key:"739e4f34d5a2338db3fabf2f3c9fa265d6d9f976"},this.columns.map((e=>this.renderHeaderCell(e))))),s("tbody",{key:"7584a38498f3c9521640f1f472d841350605a15f"},s("slot",{key:"81ea6c4992fa3de24916f16db27663646409e8d5"})))),(e==="true"||e==="filtered")&&s("div",{key:"6b745d95d7f9ebf56d73be6723f9b6aba1854709",class:"table__empty",id:this.emptyId},s("slot",{key:"2d3cfd14af06b26e2ea6837cc756b555fbeeb5cf",name:"empty"},s("p",{key:"53a2d940717ae12c04862b544d6eb60c6ed932a5",class:"table__empty-message"},this.emptyMessage(e)))))}static get watchers(){return{filtered:[{onFiltered:0}],sortKey:[{rerenderHeaders:0}],sortDirection:[{rerenderHeaders:0}],sortable:[{rerenderHeaders:0}]}}static get style(){return i()}},[769,"ch-table",{columns:[16],sortable:[516],sortKey:[1,"sort-key"],sortDirection:[1,"sort-direction"],label:[1],filtered:[516],empty:[32],rerender:[32]},undefined,{filtered:[{onFiltered:0}],sortKey:[{rerenderHeaders:0}],sortDirection:[{rerenderHeaders:0}],sortable:[{rerenderHeaders:0}]}]);function l(){if(typeof customElements==="undefined"){return}const e=["ch-table"];e.forEach((e=>{switch(e){case"ch-table":if(!customElements.get(o(e))){customElements.define(o(e),n)}break}}))}l();const c=n;const f=l;export{c as ChTable,f as defineCustomElement};
2
2
  //# sourceMappingURL=ch-table.js.map
@@ -1,2 +1,2 @@
1
- import{p as t,H as a,c as e,h as r,d as i,t as s}from"./p-qP_9qshx.js";const o=()=>`:host{display:block}.tablist{display:flex;gap:var(--spacing-2xl);border-bottom:var(--border-width) solid var(--border)}.tab{appearance:none;position:relative;background:transparent;border:none;padding:var(--spacing-md) 0 var(--spacing-xl);margin-bottom:calc(-1 * var(--border-width));color:var(--text-muted);font-family:inherit;font-size:inherit;font-weight:var(--typography-weight-semibold);cursor:pointer;transition:color var(--duration-normal) var(--easing-default), border-color var(--duration-normal) var(--easing-default)}.tab::after{content:'';position:absolute;left:0;right:0;bottom:0;height:var(--border-accent-bar);background:var(--accent);opacity:0;transition:opacity var(--duration-normal) var(--easing-default)}.tab:hover{color:var(--text)}.tab:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}.tab--active{color:var(--text)}.tab--active::after{opacity:1}.tab--disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.tabpanel{padding-top:var(--spacing-2xl);color:var(--text)}.tabpanel[hidden]{display:none}`;const n=0;const l=-1;const c=1;const d=-1;let b=0;const h=t(class t extends a{constructor(t){super();if(t!==false){this.__registerHost()}this.__attachShadow();this.chChange=e(this,"chChange")}baseId=`ch-tabs-${++b}`;tablistEl;tabs=[];value;label;chChange;tabId(t){return`${this.baseId}-${t}`}panelId(t){return`${this.baseId}-${t}-panel`}get activeValue(){if(this.value&&this.tabs.some((t=>!t.disabled&&t.value===this.value))){return this.value}return this.tabs.find((t=>!t.disabled))?.value}select=t=>{this.value=t;this.chChange.emit(this.value)};focusTab(t){this.tablistEl?.querySelectorAll('[role="tab"]').forEach((a=>{if(a.dataset.value===t){a.focus()}}))}handleKeyDown=t=>{const a=this.tabs.filter((t=>!t.disabled));if(!a.length){return}const e=this.targetFor(t.key,a);if(!e){return}t.preventDefault();this.select(e);this.focusTab(e)};targetFor(t,a){const e=a.findIndex((t=>t.value===this.activeValue));if(t==="ArrowRight"){return a[(e+c)%a.length]?.value}if(t==="ArrowLeft"){return a[(e+d+a.length)%a.length]?.value}if(t==="Home"){return a[n]?.value}if(t==="End"){return a[a.length+l]?.value}return undefined}render(){const t=this.activeValue;return r(i,{key:"596a51404c0d7d87f9988534f65e98135ecfcb75"},r("div",{key:"6eb8cf1c1a986ce1ebd211806d130c0156bad2f1",class:"tablist",role:"tablist","aria-label":this.label,onKeyDown:this.handleKeyDown,ref:t=>this.tablistEl=t},this.tabs.map((a=>{const e=a.value===t;return r("button",{key:a.value,type:"button",class:{tab:true,"tab--active":e,"tab--disabled":Boolean(a.disabled)},role:"tab",id:this.tabId(a.value),"data-value":a.value,"aria-selected":e?"true":"false","aria-controls":this.panelId(a.value),tabIndex:e?n:l,disabled:a.disabled,onClick:()=>this.select(a.value)},a.label)}))),this.tabs.map((a=>r("div",{key:`${a.value}-panel`,class:"tabpanel",id:this.panelId(a.value),role:"tabpanel","aria-labelledby":this.tabId(a.value),tabIndex:n,hidden:a.value!==t},r("slot",{name:`panel-${a.value}`})))))}static get style(){return o()}},[769,"ch-tabs",{tabs:[16],value:[1025],label:[1]}]);function u(){if(typeof customElements==="undefined"){return}const t=["ch-tabs"];t.forEach((t=>{switch(t){case"ch-tabs":if(!customElements.get(s(t))){customElements.define(s(t),h)}break}}))}u();const f=h;const p=u;export{f as ChTabs,p as defineCustomElement};
1
+ import{p as t,H as a,c as e,h as r,d as i,t as s}from"./p-qP_9qshx.js";const o=()=>`:host{display:block}.tablist{display:flex;gap:var(--spacing-2xl);border-bottom:var(--border-width) solid var(--border)}.tab{appearance:none;position:relative;background:transparent;border:none;padding:var(--spacing-md) 0 var(--spacing-xl);margin-bottom:calc(-1 * var(--border-width));color:var(--text-muted);font-family:inherit;font-size:inherit;font-weight:var(--typography-weight-semibold);cursor:pointer;transition:color var(--duration-normal) var(--easing-default), border-color var(--duration-normal) var(--easing-default)}.tab::after{content:'';position:absolute;left:0;right:0;bottom:0;height:var(--border-accent-bar);background:var(--accent);opacity:0;transition:opacity var(--duration-normal) var(--easing-default)}.tab:hover{color:var(--text)}.tab:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}.tab--active{color:var(--text)}.tab--active::after{opacity:1}.tab--disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.tabpanel{padding-top:var(--spacing-2xl);color:var(--text)}.tabpanel[hidden]{display:none}`;const n=0;const l=-1;const c=1;const d=-1;let b=0;const h=t(class t extends a{constructor(t){super();if(t!==false){this.__registerHost()}this.__attachShadow();this.chChange=e(this,"chChange")}baseId=`ch-tabs-${++b}`;tablistEl;tabs=[];value;label;chChange;tabId(t){return`${this.baseId}-${t}`}panelId(t){return`${this.baseId}-${t}-panel`}get activeValue(){if(this.value&&this.tabs.some((t=>!t.disabled&&t.value===this.value))){return this.value}return this.tabs.find((t=>!t.disabled))?.value}select=t=>{this.value=t;this.chChange.emit(this.value)};focusTab(t){this.tablistEl?.querySelectorAll('[role="tab"]').forEach((a=>{if(a.dataset.value===t){a.focus()}}))}handleKeyDown=t=>{const a=this.tabs.filter((t=>!t.disabled));if(!a.length){return}const e=this.targetFor(t.key,a);if(!e){return}t.preventDefault();this.select(e);this.focusTab(e)};targetFor(t,a){const e=a.findIndex((t=>t.value===this.activeValue));if(t==="ArrowRight"){return a[(e+c)%a.length]?.value}if(t==="ArrowLeft"){return a[(e+d+a.length)%a.length]?.value}if(t==="Home"){return a[n]?.value}if(t==="End"){return a[a.length+l]?.value}return undefined}render(){const t=this.activeValue;return r(i,{key:"2f6a0ba1be82d292dcb11f772f8764dcce7201bc"},r("div",{key:"914cb32e1467aaac43178866fbcc9b45d32ec495",class:"tablist",role:"tablist","aria-label":this.label,onKeyDown:this.handleKeyDown,ref:t=>this.tablistEl=t},this.tabs.map((a=>{const e=a.value===t;return r("button",{key:a.value,type:"button",class:{tab:true,"tab--active":e,"tab--disabled":Boolean(a.disabled)},role:"tab",id:this.tabId(a.value),"data-value":a.value,"aria-selected":e?"true":"false","aria-controls":this.panelId(a.value),tabIndex:e?n:l,disabled:a.disabled,onClick:()=>this.select(a.value)},a.label)}))),this.tabs.map((a=>r("div",{key:`${a.value}-panel`,class:"tabpanel",id:this.panelId(a.value),role:"tabpanel","aria-labelledby":this.tabId(a.value),tabIndex:n,hidden:a.value!==t},r("slot",{name:`panel-${a.value}`})))))}static get style(){return o()}},[769,"ch-tabs",{tabs:[16],value:[1025],label:[1]}]);function u(){if(typeof customElements==="undefined"){return}const t=["ch-tabs"];t.forEach((t=>{switch(t){case"ch-tabs":if(!customElements.get(s(t))){customElements.define(s(t),h)}break}}))}u();const f=h;const p=u;export{f as ChTabs,p as defineCustomElement};
2
2
  //# sourceMappingURL=ch-tabs.js.map
@@ -1,2 +1,2 @@
1
- import{p as e,H as t,c as r,h as a,d as s,t as i}from"./p-qP_9qshx.js";import{r as o}from"./p-BXzZsX2r.js";const n=()=>`:host{display:inline-block;width:100%}.label{display:block;margin-bottom:var(--spacing-sm);font-size:var(--typography-size-sm);font-weight:var(--typography-weight-semibold);color:var(--text)}.textarea{box-sizing:border-box;width:100%;min-height:var(--spacing-6xl);padding:var(--spacing-xl) var(--spacing-3xl);border-radius:var(--radius);border:var(--border-width) solid var(--border);background:var(--surface);color:var(--text);backdrop-filter:blur(var(--effect-blur));font-family:inherit;font-size:inherit;line-height:var(--spacing-5xl);resize:vertical;transition:border-color var(--duration-normal) var(--easing-default), box-shadow var(--duration-normal) var(--easing-default)}.textarea::placeholder{color:var(--text-muted)}.textarea:focus{border-color:var(--accent);box-shadow:var(--shadow-focus-ring);outline:none}.textarea--invalid{border-color:var(--color-status-warning)}.textarea--invalid:focus{border-color:var(--color-status-warning);box-shadow:0 0 0 3px var(--color-status-warning-background)}:host([data-touched]:invalid) .textarea,:host(:user-invalid) .textarea{border-color:var(--color-status-warning)}:host([data-touched]:invalid) .textarea:focus,:host(:user-invalid) .textarea:focus{border-color:var(--color-status-warning);box-shadow:0 0 0 3px var(--color-status-warning-background)}.textarea:disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.hint,.error{margin:var(--spacing-sm) 0 0;font-size:var(--typography-size-sm);color:var(--text-muted)}.error{color:var(--color-status-warning)}`;let d=0;const h=4;const l=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow();this.chInput=r(this,"chInput");this.chChange=r(this,"chChange");this.internals=this.attachInternals()}textareaId=`ch-textarea-${++d}`;hintId=`${this.textareaId}-hint`;errorId=`${this.textareaId}-error`;initialValue="";internals;formDisabled=false;get host(){return this}label;value="";placeholder;rows=h;name;disabled=false;required=false;hint;errorMessage;invalid=false;chInput;chChange;handleInput=e=>{this.value=e.target.value;this.chInput.emit(this.value)};handleChange=e=>{this.value=e.target.value;this.chChange.emit(this.value)};syncForm(){const e=this.internals;if(typeof e?.setFormValue!=="function"){return}e.setFormValue(this.value);const{flags:t,message:r}=o({required:this.required,empty:this.value==="",invalid:this.invalid,errorMessage:this.errorMessage});e.setValidity(t,r)}componentDidLoad(){this.initialValue=this.value;this.syncForm();this.host.addEventListener("change",this.markTouched);this.host.addEventListener("focusout",this.markTouched);this.host.addEventListener("invalid",this.markTouched)}markTouched=()=>{this.host.setAttribute("data-touched","")};formResetCallback(){this.value=this.initialValue}formDisabledCallback(e){this.formDisabled=e}get describedBy(){if(this.invalid&&this.errorMessage){return this.errorId}if(this.hint){return this.hintId}return undefined}render(){return a(s,{key:"d416e809a6e1e3efe416add0008da16a690a611f"},this.label&&a("label",{key:"777fd65954d8b346dd58ff06fa482e63ebcc3469",class:"label",htmlFor:this.textareaId},this.label),a("textarea",{key:"5ec5f626a54f7b94be8064e759553f7324499485",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)&&a("p",{key:"dee1dba3eda31566326284fccbdc0f352b14fe8f",class:"hint",id:this.hintId},this.hint),this.invalid&&this.errorMessage&&a("p",{key:"5e1d47eb86b8ddd5284c3bad620bab11e340034c",class:"error",id:this.errorId,role:"alert"},this.errorMessage))}static get formAssociated(){return true}static get watchers(){return{value:[{syncForm:0}],required:[{syncForm:0}],invalid:[{syncForm:0}],errorMessage:[{syncForm:0}]}}static get style(){return n()}},[577,"ch-textarea",{label:[1],value:[1025],placeholder:[1],rows:[2],name:[513],disabled:[516],required:[516],hint:[1],errorMessage:[1,"error-message"],invalid:[4],formDisabled:[32]},undefined,{value:[{syncForm:0}],required:[{syncForm:0}],invalid:[{syncForm:0}],errorMessage:[{syncForm:0}]}]);function c(){if(typeof customElements==="undefined"){return}const e=["ch-textarea"];e.forEach((e=>{switch(e){case"ch-textarea":if(!customElements.get(i(e))){customElements.define(i(e),l)}break}}))}c();const u=l;const f=c;export{u as ChTextarea,f as defineCustomElement};
1
+ import{p as t,H as e,c as r,h as a,d as s,t as i}from"./p-qP_9qshx.js";import{r as o}from"./p-BXzZsX2r.js";const n=()=>`:host{display:inline-block;width:100%}.label{display:block;margin-bottom:var(--spacing-sm);font-size:var(--typography-size-sm);font-weight:var(--typography-weight-semibold);color:var(--text)}.textarea{box-sizing:border-box;width:100%;min-height:var(--spacing-6xl);padding:var(--spacing-xl) var(--spacing-3xl);border-radius:var(--radius);border:var(--border-width) solid var(--border);background:var(--surface);color:var(--text);backdrop-filter:blur(var(--effect-blur));font-family:inherit;font-size:inherit;line-height:var(--spacing-5xl);resize:vertical;transition:border-color var(--duration-normal) var(--easing-default), box-shadow var(--duration-normal) var(--easing-default)}.textarea::placeholder{color:var(--text-muted)}.textarea:focus{border-color:var(--accent);box-shadow:var(--shadow-focus-ring);outline:none}.textarea--invalid{border-color:var(--color-status-warning)}.textarea--invalid:focus{border-color:var(--color-status-warning);box-shadow:0 0 0 3px var(--color-status-warning-background)}:host([data-touched]:invalid) .textarea,:host(:user-invalid) .textarea{border-color:var(--color-status-warning)}:host([data-touched]:invalid) .textarea:focus,:host(:user-invalid) .textarea:focus{border-color:var(--color-status-warning);box-shadow:0 0 0 3px var(--color-status-warning-background)}.textarea:disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.hint,.error{margin:var(--spacing-sm) 0 0;font-size:var(--typography-size-sm);color:var(--text-muted)}.error{color:var(--color-status-warning)}`;let d=0;const h=4;const l=t(class t extends e{constructor(t){super();if(t!==false){this.__registerHost()}this.__attachShadow();this.chInput=r(this,"chInput");this.chChange=r(this,"chChange");this.internals=this.attachInternals()}textareaId=`ch-textarea-${++d}`;hintId=`${this.textareaId}-hint`;errorId=`${this.textareaId}-error`;initialValue="";internals;formDisabled=false;get host(){return this}label;value="";placeholder;rows=h;name;disabled=false;required=false;hint;errorMessage;invalid=false;chInput;chChange;handleInput=t=>{this.value=t.target.value;this.chInput.emit(this.value)};handleChange=t=>{this.value=t.target.value;this.chChange.emit(this.value)};syncForm(){const t=this.internals;if(typeof t?.setFormValue!=="function"){return}t.setFormValue(this.value);const{flags:e,message:r}=o({required:this.required,empty:this.value==="",invalid:this.invalid,errorMessage:this.errorMessage});t.setValidity(e,r)}componentDidLoad(){this.initialValue=this.value;this.syncForm();this.host.addEventListener("change",this.markTouched);this.host.addEventListener("focusout",this.markTouched);this.host.addEventListener("invalid",this.markTouched)}markTouched=()=>{this.host.setAttribute("data-touched","")};formResetCallback(){this.value=this.initialValue}formDisabledCallback(t){this.formDisabled=t}get describedBy(){if(this.invalid&&this.errorMessage){return this.errorId}if(this.hint){return this.hintId}return undefined}render(){return a(s,{key:"2e8db2290d6a221b844ef2b510d9d1db4d9aac18"},this.label&&a("label",{key:"b1687f64d9474706dfcbe7042444e2bfe74a5e49",class:"label",htmlFor:this.textareaId},this.label),a("textarea",{key:"3e45a32bcfb609fb072bcf84cba46e7d0d5806a8",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)&&a("p",{key:"8c013880c709dd0b35d6122765bf2cf8d456f08b",class:"hint",id:this.hintId},this.hint),this.invalid&&this.errorMessage&&a("p",{key:"88d45fbc82deb9131364b5e2f502daf104c72d56",class:"error",id:this.errorId,role:"alert"},this.errorMessage))}static get formAssociated(){return true}static get watchers(){return{value:[{syncForm:0}],required:[{syncForm:0}],invalid:[{syncForm:0}],errorMessage:[{syncForm:0}]}}static get style(){return n()}},[577,"ch-textarea",{label:[1],value:[1025],placeholder:[1],rows:[2],name:[513],disabled:[516],required:[516],hint:[1],errorMessage:[1,"error-message"],invalid:[4],formDisabled:[32]},undefined,{value:[{syncForm:0}],required:[{syncForm:0}],invalid:[{syncForm:0}],errorMessage:[{syncForm:0}]}]);function c(){if(typeof customElements==="undefined"){return}const t=["ch-textarea"];t.forEach((t=>{switch(t){case"ch-textarea":if(!customElements.get(i(t))){customElements.define(i(t),l)}break}}))}c();const u=l;const b=c;export{u as ChTextarea,b as defineCustomElement};
2
2
  //# sourceMappingURL=ch-textarea.js.map
@@ -1,2 +1,2 @@
1
- import{p as t,H as e,h as s,d as a,t as o}from"./p-qP_9qshx.js";const i=()=>`:host{display:block;font-family:var(--typography-body);color:var(--color-text-secondary)}:host([hidden]){display:none}.list{margin:0;padding:0;display:grid;gap:var(--spacing-md);list-style:none}::slotted(li){position:relative;padding-left:var(--spacing-2xl);min-width:0}::slotted(li)::before{content:'';position:absolute;left:0;top:0.35em;width:var(--spacing-sm);height:var(--spacing-sm);border-radius:50%;background:var(--color-border-default)}::slotted(li:not(:last-of-type))::after{content:'';position:absolute;left:calc(var(--spacing-sm) / 2 - var(--border-width));top:calc(0.35em + var(--spacing-sm));bottom:calc(0px - var(--spacing-md));width:var(--border-width);background:var(--color-border-default)}::slotted(time){font-variant-numeric:tabular-nums}`;const r=t(class t extends e{constructor(t){super();if(t!==false){this.__registerHost()}this.__attachShadow()}render(){return s(a,{key:"f8e1398cd3993e0b4fdfa039f2e09d99321745e0",class:"timeline"},s("ol",{key:"0341a6f18ed91895bc18b01b4a2d327eed48befc",class:"list"},s("slot",{key:"90c240cb80a37e844f840d062b7b7e5b97a97c1a"})))}static get style(){return i()}},[257,"ch-timeline"]);function n(){if(typeof customElements==="undefined"){return}const t=["ch-timeline"];t.forEach((t=>{switch(t){case"ch-timeline":if(!customElements.get(o(t))){customElements.define(o(t),r)}break}}))}n();const c=r;const l=n;export{c as ChTimeline,l as defineCustomElement};
1
+ import{p as t,H as e,h as a,d as s,t as o}from"./p-qP_9qshx.js";const i=()=>`:host{display:block;font-family:var(--typography-body);color:var(--color-text-secondary)}:host([hidden]){display:none}.list{margin:0;padding:0;display:grid;gap:var(--spacing-md);list-style:none}::slotted(li){position:relative;padding-left:var(--spacing-2xl);min-width:0}::slotted(li)::before{content:'';position:absolute;left:0;top:0.35em;width:var(--spacing-sm);height:var(--spacing-sm);border-radius:50%;background:var(--color-border-default)}::slotted(li:not(:last-of-type))::after{content:'';position:absolute;left:calc(var(--spacing-sm) / 2 - var(--border-width));top:calc(0.35em + var(--spacing-sm));bottom:calc(0px - var(--spacing-md));width:var(--border-width);background:var(--color-border-default)}::slotted(time){font-variant-numeric:tabular-nums}`;const r=t(class t extends e{constructor(t){super();if(t!==false){this.__registerHost()}this.__attachShadow()}render(){return a(s,{key:"8f9e53b6f2f9c2f9d60a421c1c1c59240e469099",class:"timeline"},a("ol",{key:"535a06f4b150fc1a67a6baae2f406b76f08cf293",class:"list"},a("slot",{key:"584198aa85286147b49f2bd4e3897b0faa529309"})))}static get style(){return i()}},[257,"ch-timeline"]);function n(){if(typeof customElements==="undefined"){return}const t=["ch-timeline"];t.forEach((t=>{switch(t){case"ch-timeline":if(!customElements.get(o(t))){customElements.define(o(t),r)}break}}))}n();const c=r;const l=n;export{c as ChTimeline,l as defineCustomElement};
2
2
  //# sourceMappingURL=ch-timeline.js.map
@@ -1,2 +1,2 @@
1
- import{p as t,H as e,f as o,h as i,d as s,t as n}from"./p-qP_9qshx.js";const r={top:"bottom",bottom:"top",left:"right",right:"left"};const a={top:"vertical",bottom:"vertical",left:"horizontal",right:"horizontal"};function l(t,e){return{top:e.top-t.top,left:e.left-t.left,bottom:t.top+t.height-(e.top+e.height),right:t.left+t.width-(e.left+e.width)}}function c(t,e,o,i){switch(t){case"top":return{top:e.top-o.height-i,left:e.left+(e.width-o.width)/2};case"bottom":return{top:e.top+e.height+i,left:e.left+(e.width-o.width)/2};case"left":return{top:e.top+(e.height-o.height)/2,left:e.left-o.width-i};case"right":return{top:e.top+(e.height-o.height)/2,left:e.left+e.width+i}}}function b({anchor:t,surface:e,viewport:o,preferred:i,gap:s}){const n=[i,r[i]];let b=i;let d=Number.POSITIVE_INFINITY;for(const i of n){const{top:n,left:r}=c(i,t,e,s);const h={top:n,left:r,width:e.width,height:e.height};const p=l(h,o);const u=a[i]==="vertical"?f(p.top)+f(p.bottom):f(p.left)+f(p.right);if(u<d){d=u;b=i}}const{top:p,left:u}=c(b,t,e,s);const m={top:p,left:u,width:e.width,height:e.height};const g=l(m,o);const v=a[b]==="vertical"?{top:p,left:u+h(g.left,g.right)}:{top:p+h(g.top,g.bottom),left:u};return{placement:b,top:v.top,left:v.left}}function f(t){return t>0?t:0}function h(t,e){if(t>0){return t}if(e>0){return-e}return 0}const d=()=>`:host{display:inline-block}.anchor{position:relative;display:inline-flex}.probe{position:fixed;top:0;left:0;width:1px;height:1px;visibility:hidden;pointer-events:none}.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}}`;let p=0;const u=8;const m=t(class t extends e{constructor(t){super();if(t!==false){this.__registerHost()}this.__attachShadow()}get el(){return this}fallbackId=`ch-tooltip-${++p}`;bubbleEl;probeEl;cleanup;placement="top";hovered=false;focused=false;dismissed=false;resolvedPlacement;offset;get visible(){return(this.hovered||this.focused)&&!this.dismissed}componentDidLoad(){this.associate()}connectedCallback(){this.watchViewport()}disconnectedCallback(){this.cleanup?.()}handleMouseEnter(){this.hovered=true;this.dismissed=false;this.position()}handleMouseLeave(){this.hovered=false}handleFocusIn(){this.focused=true;this.dismissed=false;this.position()}handleFocusOut(){this.focused=false}handleKeyDown(t){if(t.key==="Escape"&&this.visible&&!t.defaultPrevented){t.preventDefault();this.dismissed=true}}handleScroll(){if(this.visible&&this.offset){this.position()}}handleResize(){this.position()}watchViewport(){if(typeof window==="undefined"){return}const t=window.visualViewport;if(!t||this.cleanup){return}const e=()=>this.position();t.addEventListener("resize",e);t.addEventListener("scroll",e);this.cleanup=()=>{t.removeEventListener("resize",e);t.removeEventListener("scroll",e)}}slotted(t){return Array.from(this.el.children).find((e=>e.getAttribute("slot")===t))}position(){if(typeof window==="undefined"){return}const t=this.bubbleEl??(this.bubbleEl=this.el.shadowRoot?.querySelector(".bubble")??undefined);const e=this.probeEl??(this.probeEl=this.el.shadowRoot?.querySelector(".probe")??undefined);if(!t||!e||t.offsetWidth===0){return}const i=this.slotted("trigger")?.getBoundingClientRect?.();if(!i){return}const s=e.getBoundingClientRect();const n=s.width||1;const r=s.height||1;const a=t=>({top:(t.top-s.top)/r,left:(t.left-s.left)/n,width:t.width/n,height:t.height/r});const l={width:t.offsetWidth+g(t),height:t.offsetHeight};const c=window.visualViewport;const{placement:f,top:h,left:d}=b({anchor:a(i),surface:l,viewport:a(c?{top:c.offsetTop,left:c.offsetLeft,width:c.width,height:c.height}:{top:0,left:0,width:window.innerWidth,height:window.innerHeight}),preferred:this.placement,gap:u});const p=this.offset;const m=p?.top===h&&p?.left===d&&this.resolvedPlacement===f;this.resolvedPlacement=f;this.offset={top:h,left:d};if(!m){o(this)}}associate=()=>{const t=this.slotted("trigger");const e=this.slotted("content");if(!t||!e){return}if(!e.id){e.id=this.fallbackId}e.setAttribute("role","tooltip");t.setAttribute("aria-describedby",e.id)};render(){const{offset:t}=this;return i(s,{key:"ccc4855053e0c1661f37ef6d40dffc4d0ff8fef3"},i("span",{key:"c71b50bd48142031f60017a01e9abbeaad755f83",class:"anchor"},i("span",{key:"aa337facc4dd983a5c2b2cf68ef1b3079e911f0b",class:"probe","aria-hidden":"true",ref:t=>this.probeEl=t}),i("slot",{key:"d4c7db781d9cad1b61d0b17071e41ee9619e5129",name:"trigger",onSlotchange:this.associate}),i("span",{key:"8eda03e816c13ba58721a3f2c058d1e812c5630e",ref:t=>this.bubbleEl=t,style:{"--ch-tooltip-offset-top":t?`${t.top}px`:null,"--ch-tooltip-offset-left":t?`${t.left}px`:null},class:{bubble:true,"bubble--positioned":Boolean(this.offset),[`bubble--${this.resolvedPlacement??this.placement}`]:true,"bubble--visible":this.visible}},i("slot",{key:"402e2c295e88586d78974a2169a75afda1380c96",name:"content",onSlotchange:this.associate}))))}static get style(){return d()}},[769,"ch-tooltip",{placement:[1],hovered:[32],focused:[32],dismissed:[32],resolvedPlacement:[32]},[[1,"mouseenter","handleMouseEnter"],[1,"mouseleave","handleMouseLeave"],[0,"focusin","handleFocusIn"],[0,"focusout","handleFocusOut"],[4,"keydown","handleKeyDown"],[11,"scroll","handleScroll"],[9,"resize","handleResize"]]]);function g(t){const e=getComputedStyle(t);return(parseFloat(e.marginLeft)||0)+(parseFloat(e.marginRight)||0)}function v(){if(typeof customElements==="undefined"){return}const t=["ch-tooltip"];t.forEach((t=>{switch(t){case"ch-tooltip":if(!customElements.get(n(t))){customElements.define(n(t),m)}break}}))}v();const w=m;const y=v;export{w as ChTooltip,y as defineCustomElement};
1
+ import{p as t,H as e,f as o,h as i,d as s,t as n}from"./p-qP_9qshx.js";const r={top:"bottom",bottom:"top",left:"right",right:"left"};const l={top:"vertical",bottom:"vertical",left:"horizontal",right:"horizontal"};function a(t,e){return{top:e.top-t.top,left:e.left-t.left,bottom:t.top+t.height-(e.top+e.height),right:t.left+t.width-(e.left+e.width)}}function c(t,e,o,i){switch(t){case"top":return{top:e.top-o.height-i,left:e.left+(e.width-o.width)/2};case"bottom":return{top:e.top+e.height+i,left:e.left+(e.width-o.width)/2};case"left":return{top:e.top+(e.height-o.height)/2,left:e.left-o.width-i};case"right":return{top:e.top+(e.height-o.height)/2,left:e.left+e.width+i}}}function b({anchor:t,surface:e,viewport:o,preferred:i,gap:s}){const n=[i,r[i]];let b=i;let d=Number.POSITIVE_INFINITY;for(const i of n){const{top:n,left:r}=c(i,t,e,s);const h={top:n,left:r,width:e.width,height:e.height};const p=a(h,o);const u=l[i]==="vertical"?f(p.top)+f(p.bottom):f(p.left)+f(p.right);if(u<d){d=u;b=i}}const{top:p,left:u}=c(b,t,e,s);const m={top:p,left:u,width:e.width,height:e.height};const g=a(m,o);const v=l[b]==="vertical"?{top:p,left:u+h(g.left,g.right)}:{top:p+h(g.top,g.bottom),left:u};return{placement:b,top:v.top,left:v.left}}function f(t){return t>0?t:0}function h(t,e){if(t>0){return t}if(e>0){return-e}return 0}const d=()=>`:host{display:inline-block}.anchor{position:relative;display:inline-flex}.probe{position:fixed;top:0;left:0;width:1px;height:1px;visibility:hidden;pointer-events:none}.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}}`;let p=0;const u=8;const m=t(class t extends e{constructor(t){super();if(t!==false){this.__registerHost()}this.__attachShadow()}get el(){return this}fallbackId=`ch-tooltip-${++p}`;bubbleEl;probeEl;cleanup;placement="top";hovered=false;focused=false;dismissed=false;resolvedPlacement;offset;get visible(){return(this.hovered||this.focused)&&!this.dismissed}componentDidLoad(){this.associate()}connectedCallback(){this.watchViewport()}disconnectedCallback(){this.cleanup?.()}handleMouseEnter(){this.hovered=true;this.dismissed=false;this.position()}handleMouseLeave(){this.hovered=false}handleFocusIn(){this.focused=true;this.dismissed=false;this.position()}handleFocusOut(){this.focused=false}handleKeyDown(t){if(t.key==="Escape"&&this.visible&&!t.defaultPrevented){t.preventDefault();this.dismissed=true}}handleScroll(){if(this.visible&&this.offset){this.position()}}handleResize(){this.position()}watchViewport(){if(typeof window==="undefined"){return}const t=window.visualViewport;if(!t||this.cleanup){return}const e=()=>this.position();t.addEventListener("resize",e);t.addEventListener("scroll",e);this.cleanup=()=>{t.removeEventListener("resize",e);t.removeEventListener("scroll",e)}}slotted(t){return Array.from(this.el.children).find((e=>e.getAttribute("slot")===t))}position(){if(typeof window==="undefined"){return}const t=this.bubbleEl??(this.bubbleEl=this.el.shadowRoot?.querySelector(".bubble")??undefined);const e=this.probeEl??(this.probeEl=this.el.shadowRoot?.querySelector(".probe")??undefined);if(!t||!e||t.offsetWidth===0){return}const i=this.slotted("trigger")?.getBoundingClientRect?.();if(!i){return}const s=e.getBoundingClientRect();const n=s.width||1;const r=s.height||1;const l=t=>({top:(t.top-s.top)/r,left:(t.left-s.left)/n,width:t.width/n,height:t.height/r});const a={width:t.offsetWidth+g(t),height:t.offsetHeight};const c=window.visualViewport;const{placement:f,top:h,left:d}=b({anchor:l(i),surface:a,viewport:l(c?{top:c.offsetTop,left:c.offsetLeft,width:c.width,height:c.height}:{top:0,left:0,width:window.innerWidth,height:window.innerHeight}),preferred:this.placement,gap:u});const p=this.offset;const m=p?.top===h&&p?.left===d&&this.resolvedPlacement===f;this.resolvedPlacement=f;this.offset={top:h,left:d};if(!m){o(this)}}associate=()=>{const t=this.slotted("trigger");const e=this.slotted("content");if(!t||!e){return}if(!e.id){e.id=this.fallbackId}e.setAttribute("role","tooltip");t.setAttribute("aria-describedby",e.id)};render(){const{offset:t}=this;return i(s,{key:"24f3c1522fdde642c50e0358d32a8b7ea8e0d327"},i("span",{key:"2e09507788b944ab599667bd1bd1d9327e9fc510",class:"anchor"},i("span",{key:"87b00e6c802396181a808823ef7e08a7f2d18bf8",class:"probe","aria-hidden":"true",ref:t=>this.probeEl=t}),i("slot",{key:"9620f1447fa376df84a56348759bac1933f96214",name:"trigger",onSlotchange:this.associate}),i("span",{key:"d8a517178b2035dc9254a48cff8c59cda4025965",ref:t=>this.bubbleEl=t,style:{"--ch-tooltip-offset-top":t?`${t.top}px`:null,"--ch-tooltip-offset-left":t?`${t.left}px`:null},class:{bubble:true,"bubble--positioned":Boolean(this.offset),[`bubble--${this.resolvedPlacement??this.placement}`]:true,"bubble--visible":this.visible}},i("slot",{key:"5f72e3c398fbe6c14ccea1cdd3f20c40beb9f950",name:"content",onSlotchange:this.associate}))))}static get style(){return d()}},[769,"ch-tooltip",{placement:[1],hovered:[32],focused:[32],dismissed:[32],resolvedPlacement:[32]},[[1,"mouseenter","handleMouseEnter"],[1,"mouseleave","handleMouseLeave"],[0,"focusin","handleFocusIn"],[0,"focusout","handleFocusOut"],[4,"keydown","handleKeyDown"],[11,"scroll","handleScroll"],[9,"resize","handleResize"]]]);function g(t){const e=getComputedStyle(t);return(parseFloat(e.marginLeft)||0)+(parseFloat(e.marginRight)||0)}function v(){if(typeof customElements==="undefined"){return}const t=["ch-tooltip"];t.forEach((t=>{switch(t){case"ch-tooltip":if(!customElements.get(n(t))){customElements.define(n(t),m)}break}}))}v();const w=m;const y=v;export{w as ChTooltip,y as defineCustomElement};
2
2
  //# sourceMappingURL=ch-tooltip.js.map
@@ -1,2 +1,2 @@
1
- import{p as e,H as n,h as r,d as s,t as i}from"./p-qP_9qshx.js";const t=()=>`: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)}}`;const a=e(class e extends n{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow()}size="md";label;render(){const e=Boolean(this.label);return r(s,{key:"ed67d11ad7efe04c34372852f5c4b81c71bf2327"},r("span",{key:"fff47dcd59f6e8881ea6295f5d062f888328a081",class:{spinner:true,[`spinner--${this.size}`]:true},role:e?"status":undefined,"aria-label":e?this.label:undefined,"aria-hidden":e?undefined:"true"}))}static get style(){return t()}},[513,"ch-spinner",{size:[1],label:[1]}]);function o(){if(typeof customElements==="undefined"){return}const e=["ch-spinner"];e.forEach((e=>{switch(e){case"ch-spinner":if(!customElements.get(i(e))){customElements.define(i(e),a)}break}}))}o();export{a as C,o as d};
2
- //# sourceMappingURL=p-CF1yV0aa.js.map
1
+ import{p as e,H as n,h as r,d as s,t as i}from"./p-qP_9qshx.js";const t=()=>`: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)}}`;const a=e(class e extends n{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow()}size="md";label;render(){const e=Boolean(this.label);return r(s,{key:"03ab408176f59ecdd51a493d795ccc86acfa563c"},r("span",{key:"db54c4d2001a01caeea33426d4042c7ee5546b75",class:{spinner:true,[`spinner--${this.size}`]:true},role:e?"status":undefined,"aria-label":e?this.label:undefined,"aria-hidden":e?undefined:"true"}))}static get style(){return t()}},[513,"ch-spinner",{size:[1],label:[1]}]);function o(){if(typeof customElements==="undefined"){return}const e=["ch-spinner"];e.forEach((e=>{switch(e){case"ch-spinner":if(!customElements.get(i(e))){customElements.define(i(e),a)}break}}))}o();export{a as C,o as d};
2
+ //# sourceMappingURL=p-CuSstsTP.js.map
@@ -1,2 +1,2 @@
1
- import{p as e,H as a,c as t,h as i,d as s,t as o}from"./p-qP_9qshx.js";import{l,u as r}from"./p-d8DfpzMR.js";const n=()=>`.modal{box-sizing:border-box;max-height:calc(100vh - var(--spacing-6xl));padding:var(--spacing-5xl);border:var(--border-width) solid var(--border);border-radius:var(--radius);background:var(--color-background-base);color:var(--text);font-family:var(--font-body);font-size:var(--typography-size-md)}.modal--sm{max-width:min(var(--ch-modal-width, 24rem), calc(100vw - var(--spacing-6xl)))}.modal--md{max-width:min(var(--ch-modal-width, 32rem), calc(100vw - var(--spacing-6xl)))}.modal--lg{max-width:min(var(--ch-modal-width, 48rem), calc(100vw - var(--spacing-6xl)))}.modal::backdrop{background:var(--color-scrim-default);backdrop-filter:blur(var(--effect-blur))}.modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--spacing-2xl);margin-bottom:var(--spacing-2xl)}.modal-body{overflow-y:auto}.modal-close{display:inline-flex;align-items:center;justify-content:center;flex:none;padding:var(--spacing-2xs) var(--spacing-md);border:0;border-radius:var(--radius);background:none;color:var(--text-muted);cursor:pointer;font-family:var(--font-heading);font-size:var(--typography-size-lg);line-height:1;transition:background-color var(--duration-normal) var(--easing-default)}.modal-close:hover{background:var(--surface-hover);color:var(--text)}.modal-close:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}@media (pointer: coarse){.modal-close{min-width:44px;min-height:44px}}@media (prefers-reduced-motion: reduce){.modal-close{transition:none}}`;const c=e(class e extends a{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow();this.chOpen=t(this,"chOpen");this.chClose=t(this,"chClose")}get el(){return this}open=false;label;closeLabel;size="md";chOpen;chClose;dialog;scrollLocked=false;pointerDownedOutside=false;componentDidLoad(){this.dialog?.addEventListener("close",this.handleNativeClose);this.dialog?.addEventListener("pointerdown",this.handlePointerDown);this.dialog?.addEventListener("click",this.handleClick);if(this.open){this.showDialog()}}disconnectedCallback(){this.dialog?.removeEventListener("close",this.handleNativeClose);this.dialog?.removeEventListener("pointerdown",this.handlePointerDown);this.dialog?.removeEventListener("click",this.handleClick);this.unlockScroll()}handleOpenChange(e){if(e){this.showDialog()}else{this.closeDialog()}}showDialog(){if(typeof this.dialog?.showModal!=="function"){return}this.lockScroll();this.dialog.showModal();this.chOpen.emit()}closeDialog(){if(typeof this.dialog?.close==="function"&&this.dialog.open){this.dialog.close()}}lockScroll(){if(this.scrollLocked){return}this.scrollLocked=true;l()}unlockScroll(){if(!this.scrollLocked){return}this.scrollLocked=false;r()}isOnBackdrop(e){if(!this.dialog||e.target!==this.dialog){return false}const a=this.dialog.getBoundingClientRect();return e.clientX<a.left||e.clientX>a.right||e.clientY<a.top||e.clientY>a.bottom}handlePointerDown=e=>{this.pointerDownedOutside=this.isOnBackdrop(e)};handleClick=e=>{const a=this.pointerDownedOutside&&this.isOnBackdrop(e);this.pointerDownedOutside=false;if(a){this.closeDialog()}};handleNativeClose=()=>{this.unlockScroll();if(this.open){this.open=false}this.chClose.emit()};handleCloseClick=()=>{if(typeof this.dialog?.close==="function"&&this.dialog.open){this.dialog.close();return}this.open=false;this.chClose.emit()};render(){return i(s,{key:"e9b0fe7e84f3de036e01f836bb431849b4486ab3"},i("dialog",{key:"0c5017b5e773534c11a74504a0773ae555b32322",class:{modal:true,[`modal--${this.size}`]:true},"aria-label":this.label,ref:e=>this.dialog=e},i("div",{key:"ae8988208ac3856792eff026e8ebd1f9e696b175",class:"modal-head"},i("slot",{key:"f7f231f4a5b8541ce2da8ea000b5ce95d58484b3",name:"heading"}),this.closeLabel&&i("button",{key:"dbf0962e6244cff373887fa1e1501aaae6e15250",class:"modal-close",type:"button","aria-label":this.closeLabel,onClick:this.handleCloseClick},i("span",{key:"e7e1493a5eca9afb0f9fef279efdd5692157755a","aria-hidden":"true"},"×"))),i("div",{key:"95b719095bac72ce64e6201ef4465c1173dfb16f",class:"modal-body"},i("slot",{key:"bad31888a31219e6dffd294ca18a749e9916c0f2"}))))}static get watchers(){return{open:[{handleOpenChange:0}]}}static get style(){return n()}},[769,"ch-modal",{open:[1028],label:[1],closeLabel:[1,"close-label"],size:[1]},undefined,{open:[{handleOpenChange:0}]}]);function d(){if(typeof customElements==="undefined"){return}const e=["ch-modal"];e.forEach((e=>{switch(e){case"ch-modal":if(!customElements.get(o(e))){customElements.define(o(e),c)}break}}))}d();export{c as C,d};
2
- //# sourceMappingURL=p-CmMN-UuJ.js.map
1
+ import{p as e,H as a,c as t,h as i,d as s,t as o}from"./p-qP_9qshx.js";import{l,u as r}from"./p-d8DfpzMR.js";const d=()=>`.modal{box-sizing:border-box;max-height:calc(100vh - var(--spacing-6xl));padding:var(--spacing-5xl);border:var(--border-width) solid var(--border);border-radius:var(--radius);background:var(--color-background-base);color:var(--text);font-family:var(--font-body);font-size:var(--typography-size-md)}.modal--sm{max-width:min(var(--ch-modal-width, 24rem), calc(100vw - var(--spacing-6xl)))}.modal--md{max-width:min(var(--ch-modal-width, 32rem), calc(100vw - var(--spacing-6xl)))}.modal--lg{max-width:min(var(--ch-modal-width, 48rem), calc(100vw - var(--spacing-6xl)))}.modal::backdrop{background:var(--color-scrim-default);backdrop-filter:blur(var(--effect-blur))}.modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--spacing-2xl);margin-bottom:var(--spacing-2xl)}.modal-body{overflow-y:auto}.modal-close{display:inline-flex;align-items:center;justify-content:center;flex:none;padding:var(--spacing-2xs) var(--spacing-md);border:0;border-radius:var(--radius);background:none;color:var(--text-muted);cursor:pointer;font-family:var(--font-heading);font-size:var(--typography-size-lg);line-height:1;transition:background-color var(--duration-normal) var(--easing-default)}.modal-close:hover{background:var(--surface-hover);color:var(--text)}.modal-close:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}@media (pointer: coarse){.modal-close{min-width:44px;min-height:44px}}@media (prefers-reduced-motion: reduce){.modal-close{transition:none}}`;const c=e(class e extends a{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow();this.chOpen=t(this,"chOpen");this.chClose=t(this,"chClose")}get el(){return this}open=false;label;closeLabel;size="md";chOpen;chClose;dialog;scrollLocked=false;pointerDownedOutside=false;componentDidLoad(){this.dialog?.addEventListener("close",this.handleNativeClose);this.dialog?.addEventListener("pointerdown",this.handlePointerDown);this.dialog?.addEventListener("click",this.handleClick);if(this.open){this.showDialog()}}disconnectedCallback(){this.dialog?.removeEventListener("close",this.handleNativeClose);this.dialog?.removeEventListener("pointerdown",this.handlePointerDown);this.dialog?.removeEventListener("click",this.handleClick);this.unlockScroll()}handleOpenChange(e){if(e){this.showDialog()}else{this.closeDialog()}}showDialog(){if(typeof this.dialog?.showModal!=="function"){return}this.lockScroll();this.dialog.showModal();this.chOpen.emit()}closeDialog(){if(typeof this.dialog?.close==="function"&&this.dialog.open){this.dialog.close()}}lockScroll(){if(this.scrollLocked){return}this.scrollLocked=true;l()}unlockScroll(){if(!this.scrollLocked){return}this.scrollLocked=false;r()}isOnBackdrop(e){if(!this.dialog||e.target!==this.dialog){return false}const a=this.dialog.getBoundingClientRect();return e.clientX<a.left||e.clientX>a.right||e.clientY<a.top||e.clientY>a.bottom}handlePointerDown=e=>{this.pointerDownedOutside=this.isOnBackdrop(e)};handleClick=e=>{const a=this.pointerDownedOutside&&this.isOnBackdrop(e);this.pointerDownedOutside=false;if(a){this.closeDialog()}};handleNativeClose=()=>{this.unlockScroll();if(this.open){this.open=false}this.chClose.emit()};handleCloseClick=()=>{if(typeof this.dialog?.close==="function"&&this.dialog.open){this.dialog.close();return}this.open=false;this.chClose.emit()};render(){return i(s,{key:"36395dc0b52676493b93d02c04d1c810d98c8028"},i("dialog",{key:"99d446c5d0ecd9e16f8d36fc2903f1ab06c274f2",class:{modal:true,[`modal--${this.size}`]:true},"aria-label":this.label,ref:e=>this.dialog=e},i("div",{key:"9dd7043302df7ffa89fdb44f54ed5c93a48fff7e",class:"modal-head"},i("slot",{key:"473041c868d2234c66276936cde0d020b8ed74ce",name:"heading"}),this.closeLabel&&i("button",{key:"e3f65a8c91283b8f3a27975afe44e47e65fbf03f",class:"modal-close",type:"button","aria-label":this.closeLabel,onClick:this.handleCloseClick},i("span",{key:"dbacf11f6b06ed4183e6d277fc807d63867fdf1d","aria-hidden":"true"},"×"))),i("div",{key:"1d9e1567fe0046078f1d26f5dea25c3c06c7e6ed",class:"modal-body"},i("slot",{key:"cc0a63c64b512a6c40c59d8395ced225a961adfc"}))))}static get watchers(){return{open:[{handleOpenChange:0}]}}static get style(){return d()}},[769,"ch-modal",{open:[1028],label:[1],closeLabel:[1,"close-label"],size:[1]},undefined,{open:[{handleOpenChange:0}]}]);function n(){if(typeof customElements==="undefined"){return}const e=["ch-modal"];e.forEach((e=>{switch(e){case"ch-modal":if(!customElements.get(o(e))){customElements.define(o(e),c)}break}}))}n();export{c as C,n as d};
2
+ //# sourceMappingURL=p-MBLhKofG.js.map
@@ -32,7 +32,7 @@ const ChAccordion = class {
32
32
  this.chChange.emit(this.value);
33
33
  };
34
34
  render() {
35
- return (h(Host, { key: 'da264a6faa4d8da510d2964bef410d7c733bc507' }, this.items.map(item => {
35
+ return (h(Host, { key: '75d95349674170ef9e9f6e74b4b3c4369e7f1e21' }, this.items.map(item => {
36
36
  const open = this.value === item.value;
37
37
  return (h("div", { key: item.value, class: { 'item': true, 'item--open': open } }, h("h3", { class: "item-head" }, h("button", { type: "button", class: "item-toggle", id: this.headerId(item.value), "data-value": item.value, "aria-expanded": open ? 'true' : 'false', "aria-controls": this.panelId(item.value), disabled: item.disabled, onClick: () => this.toggle(item.value) }, item.title)), h("div", { class: "item-panel", id: this.panelId(item.value), role: "region", "aria-labelledby": this.headerId(item.value), hidden: !open }, h("slot", { name: `panel-${item.value}` }))));
38
38
  })));
@@ -50,7 +50,7 @@ const ChAlert = class {
50
50
  render() {
51
51
  const role = this.variant === 'warning' ? 'alert' : 'status';
52
52
  const shapes = this.statusCue ? chIcons[VARIANT_ICON[this.variant]] : undefined;
53
- return (h(Host, { key: 'c7fb041416b2958fcda758a3297a0f9546456ef3' }, h("div", { key: role, class: { alert: true, [`alert--${this.variant}`]: true }, role: role }, shapes && (h("svg", { key: '1a89cc6797bd6b425920f61f545f407326422e93', class: "alert-icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", focusable: "false" }, shapes.map(shape => h(shape.tag, shape.attrs)))), h("div", { key: 'd30f1b3897d3ce681789507aa2677b29a83e8346', class: "alert-content" }, h("slot", { key: 'a4bc52ace056a573b21ecec083d017b3c5c22245' })), this.dismissLabel && (h("button", { key: '571947bd96a9c2f22b7af7989abd406dff860256', class: "alert-dismiss", type: "button", "aria-label": this.dismissLabel, onClick: this.handleDismiss }, h("span", { key: 'e8d282730aa25aad78f05ce118cb65fce9ea85c5', "aria-hidden": "true" }, "\u00D7"))))));
53
+ return (h(Host, { key: '55c2c37d0a730000b644c583a99eae37d6f75784' }, h("div", { key: role, class: { alert: true, [`alert--${this.variant}`]: true }, role: role }, shapes && (h("svg", { key: '8fb807cd1f894c0960c55a3e417a418078c79d63', class: "alert-icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", focusable: "false" }, shapes.map(shape => h(shape.tag, shape.attrs)))), h("div", { key: '43784df5b3ede4eb01521439dd90d85fccf6fe43', class: "alert-content" }, h("slot", { key: 'f4643113dfe9e3beb6f5e1ae9794b28c19ea3341' })), this.dismissLabel && (h("button", { key: 'a1b3afee8907514f9448810b8f22d288a2f50057', class: "alert-dismiss", type: "button", "aria-label": this.dismissLabel, onClick: this.handleDismiss }, h("span", { key: '50371733d2358e002f7bdd1d5f8cb61d020c1cb9', "aria-hidden": "true" }, "\u00D7"))))));
54
54
  }
55
55
  };
56
56
  ChAlert.style = chAlertCss();
@@ -72,7 +72,7 @@ const ChBadge = class {
72
72
  */
73
73
  statusCue = true;
74
74
  render() {
75
- return (h(Host, { key: '712c653d4047845d6afce4655271f2c80e3fe6a8' }, h("span", { key: 'dd24bf1f555b229bee277b77c175b485f4a10680', class: { badge: true, [`badge--${this.variant}`]: true } }, this.statusCue && h("span", { key: 'cef4173e40dac2798c2a26381763bb470cf0bacc', class: "badge-dot", "aria-hidden": "true" }), h("slot", { key: '6e8c09dd9260d80c9fda09b402dfc3b1cef53907' }))));
75
+ return (h(Host, { key: '104554450ef32f24bb88afc77ad0b3d79811de6c' }, h("span", { key: '10531c508c51141fe433f794877d38ac8f9d7859', class: { badge: true, [`badge--${this.variant}`]: true } }, this.statusCue && h("span", { key: 'f6bb6f7c23e7d7f4051a6022f76a15f640e35650', class: "badge-dot", "aria-hidden": "true" }), h("slot", { key: '6c4d8c9c981be16facbcf95c3c0abce6f164ed16' }))));
76
76
  }
77
77
  };
78
78
  ChBadge.style = chBadgeCss();
@@ -176,7 +176,7 @@ const ChCard = class {
176
176
  registerInstance(this, hostRef);
177
177
  }
178
178
  render() {
179
- return (h(Host, { key: 'f237dce6afd9f9c88f52784de63073d3b4dc31fd' }, h("div", { key: '2256360ad3b736aaf595cb0440903eb90ffc9968', class: "card" }, h("slot", { key: '5ce63027b9e1abd925b4a1d7261752a4b579b336' }))));
179
+ return (h(Host, { key: 'f3a0efc8ed91ac81cf39d599acdf1944d72b56c1' }, h("div", { key: '5524237836d327c8c988903393b5adc09078b121', class: "card" }, h("slot", { key: '7c5a80c115399f591e40705abafd8288ff575d0f' }))));
180
180
  }
181
181
  };
182
182
  ChCard.style = chCardCss();
@@ -302,7 +302,7 @@ const ChInput = class {
302
302
  return undefined;
303
303
  }
304
304
  render() {
305
- return (h(Host, { key: '2a892c87f8c2d7840c89b546e53b1cd4274de6d1' }, this.label && (h("label", { key: '7c10ad2de5992e8e96accb3752bb62a7ecc5a562', class: "label", htmlFor: this.inputId }, this.label)), h("input", { key: '746c04af3a66f8bd3789f037d77560f30b79ae67', id: this.label ? this.inputId : undefined, class: { 'input': true, 'input--invalid': this.invalid }, type: this.type, name: this.name, placeholder: this.placeholder, disabled: this.disabled || this.formDisabled, required: this.required, value: this.value, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onInput: this.handleInput, onChange: this.handleChange }), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: '5c1985773e1ec0de670e5fa0d94b33cea81b9e63', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: '48a2823957aba104c6a6599dbd409824c2f60f79', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
305
+ return (h(Host, { key: '80dd56c8fa40d4c8c4eec2b62d1fea2aaa574dcc' }, this.label && (h("label", { key: 'd1d4c26e7a49f176f5d986af107395fd32abbd11', class: "label", htmlFor: this.inputId }, this.label)), h("input", { key: '9220c4f98593dce4af626a2d068e654cf360199b', id: this.label ? this.inputId : undefined, class: { 'input': true, 'input--invalid': this.invalid }, type: this.type, name: this.name, placeholder: this.placeholder, disabled: this.disabled || this.formDisabled, required: this.required, value: this.value, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onInput: this.handleInput, onChange: this.handleChange }), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: '802ec36ef19bebd3371ff9535fba4052268f3db6', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: '489b9634ce6577f71c5875a45cfc5b8a5eeb6cf1', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
306
306
  }
307
307
  static get formAssociated() { return true; }
308
308
  static get watchers() { return {
@@ -434,7 +434,7 @@ const ChSelect = class {
434
434
  return undefined;
435
435
  }
436
436
  render() {
437
- return (h(Host, { key: '21825ec1b83a93617413179ec79ba42ef2e980fe' }, this.label && (h("label", { key: 'e41e1268d92384f93bf492f90c6a727ddd5a05e0', class: "label", htmlFor: this.selectId }, this.label)), h("select", { key: '25160df5f7628bf89d6d7bb1f2736b44d02455d9', id: this.label ? this.selectId : undefined, class: { 'select': true, 'select--invalid': this.invalid }, name: this.name, disabled: this.disabled || this.formDisabled, required: this.required, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }, this.placeholder && (h("option", { key: '6e6977e6c5d120a2bf28b1b05892ff90ca32e1ff', value: "", disabled: true, hidden: true, selected: !this.value }, this.placeholder)), this.options.map(option => (h("option", { value: option.value, disabled: option.disabled, selected: option.value === this.value }, option.label)))), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: '92cb97df6b5ff80857fa6463d189e366697d6fd5', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: '08d3f5deefd5d155c0fd54f06a0f6f5c60db8873', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
437
+ return (h(Host, { key: 'bb342289b7725eaf8269ceb86589ebeb61f4c63b' }, this.label && (h("label", { key: '766492635c7eac71f719d52d07f71b9895037410', class: "label", htmlFor: this.selectId }, this.label)), h("select", { key: 'f086a020b93254d04b635677290e6e5ae9b1b35c', id: this.label ? this.selectId : undefined, class: { 'select': true, 'select--invalid': this.invalid }, name: this.name, disabled: this.disabled || this.formDisabled, required: this.required, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }, this.placeholder && (h("option", { key: '3c22ffe91a28b7e9e3a302c31a3c8945335bd2df', value: "", disabled: true, hidden: true, selected: !this.value }, this.placeholder)), this.options.map(option => (h("option", { value: option.value, disabled: option.disabled, selected: option.value === this.value }, option.label)))), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: '495b45c73e98b0b61ccde9e16972d0ff80665edf', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: '62f08ed1c7bce8a3fbc357bcf0928dd23c897a7b', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
438
438
  }
439
439
  static get formAssociated() { return true; }
440
440
  static get watchers() { return {
@@ -475,7 +475,7 @@ const ChSpinner = class {
475
475
  label;
476
476
  render() {
477
477
  const labelled = Boolean(this.label);
478
- return (h(Host, { key: 'ed67d11ad7efe04c34372852f5c4b81c71bf2327' }, h("span", { key: 'fff47dcd59f6e8881ea6295f5d062f888328a081', class: { spinner: true, [`spinner--${this.size}`]: true }, role: labelled ? 'status' : undefined, "aria-label": labelled ? this.label : undefined, "aria-hidden": labelled ? undefined : 'true' })));
478
+ return (h(Host, { key: '03ab408176f59ecdd51a493d795ccc86acfa563c' }, h("span", { key: 'db54c4d2001a01caeea33426d4042c7ee5546b75', class: { spinner: true, [`spinner--${this.size}`]: true }, role: labelled ? 'status' : undefined, "aria-label": labelled ? this.label : undefined, "aria-hidden": labelled ? undefined : 'true' })));
479
479
  }
480
480
  };
481
481
  ChSpinner.style = chSpinnerCss();
@@ -588,7 +588,7 @@ const ChSwitch = class {
588
588
  return undefined;
589
589
  }
590
590
  render() {
591
- return (h(Host, { key: 'f0ad3dab1049febb1e4506c538a938eec237b6ee' }, h("label", { key: '0ec252ff6c58a79c3d1054312f6f92dd03352f69', class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled }, htmlFor: this.switchId }, h("input", { key: 'a2471b09c6e1a026ec6189b3b542edc7147b8759', id: this.switchId, class: { 'input': true, 'input--invalid': this.invalid }, type: "checkbox", role: "switch", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled || this.formDisabled, required: this.required, "aria-checked": this.checked ? 'true' : 'false', "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }), h("span", { key: 'dbcf0512d51e71c0072e4d159e23d822a7676da2', class: "track" }, h("span", { key: 'e7ef5934e2c03ba12e320fe963b4904237bf05d5', class: "thumb" })), this.label && h("span", { key: '90e1fc7560f839ec50014648235cc753c955b82a', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: 'c5150070147fcf40364925a5c164ec80d511b411', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: 'c9cc633cd70f53aa62425faf92e760cf8cb816fd', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
591
+ return (h(Host, { key: 'bae45755c2467bf088ab67b71c6a21289e33f8f2' }, h("label", { key: '5d68a33bb80334a7f5f326bd6f2dfc2f4c3e01df', class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled }, htmlFor: this.switchId }, h("input", { key: 'e48330e2c0b23077d34392960dd3d53052b8b21c', id: this.switchId, class: { 'input': true, 'input--invalid': this.invalid }, type: "checkbox", role: "switch", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled || this.formDisabled, required: this.required, "aria-checked": this.checked ? 'true' : 'false', "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }), h("span", { key: '8f7d8fc472bb03a907e007eaf0c4e81d4f2b1a34', class: "track" }, h("span", { key: '574549aed9d109225c15d2a8b94893dea3799fbf', class: "thumb" })), this.label && h("span", { key: '3da40cbd701270e368f8280fb0475d4372ae65c9', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: '39fbb18961f849f241c19bfcd1895285b948b8da', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: 'a29a1a5dc06732a17e745634bf2874a4f28ff574', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
592
592
  }
593
593
  static get formAssociated() { return true; }
594
594
  static get watchers() { return {
@@ -109,7 +109,7 @@ const ChCheckbox = class {
109
109
  return undefined;
110
110
  }
111
111
  render() {
112
- return (h(Host, { key: '3e0f2f162d1ec1a4715b44a37211a30c63f830b2' }, h("label", { key: '8042cb81ab53a9451a8757dfa63ef8cea8f41954', class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled }, htmlFor: this.checkboxId }, h("input", { key: '0d55f22c4625f48c8bf2eee15a7710cfb80c4328', id: this.checkboxId, class: { 'input': true, 'input--invalid': this.invalid }, type: "checkbox", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled || this.formDisabled, required: this.required, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }), this.label && h("span", { key: '146e3b4fa88237da4af8f8b0a408909b4d11555e', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: 'd82032ae57e8e818a91fa04cfd5e505dea47c22d', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: '9f418c648d4929086a77ca868a7c13cdccb328cb', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
112
+ return (h(Host, { key: 'cf170be4d00e1ccb5511b0b72f6d42faa35b6371' }, h("label", { key: '3af65f435365b1ffdaf2d4149d87c8c4f7630998', class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled }, htmlFor: this.checkboxId }, h("input", { key: '3073840bef40f15e7688920209df189e831d4139', id: this.checkboxId, class: { 'input': true, 'input--invalid': this.invalid }, type: "checkbox", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled || this.formDisabled, required: this.required, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }), this.label && h("span", { key: 'a2630c7bf760b5adcd5b22e423d20e1bf7bb5107', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: '4c51711fe4a623c2b9a77dc66b2e2668c905fc19', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: '053569a86c7c3cd01b2278d3dcde7c649142a7c3', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
113
113
  }
114
114
  static get formAssociated() { return true; }
115
115
  static get watchers() { return {
@@ -28,13 +28,13 @@ const ChCluster = class {
28
28
  return GAPS.has(this.gap) ? this.gap : 'md';
29
29
  }
30
30
  render() {
31
- return (h(Host, { key: 'd1852bc490835eb559f31039e14b87d59b151b11', class: {
31
+ return (h(Host, { key: '82b4133e903fd75e71314ae814d7c76d1844bcdc', class: {
32
32
  'cluster': true,
33
33
  [`cluster--gap-${this.gapStep}`]: true,
34
34
  [`cluster--align-${this.align}`]: true,
35
35
  [`cluster--justify-${this.justify}`]: true,
36
36
  'cluster--nowrap': !this.wrap,
37
- } }, h("slot", { key: '7dc3c83e40d8e0d5dd18052bb9c36898a443ce23' })));
37
+ } }, h("slot", { key: 'a53161dbf0dbfeb52e5dae80de4764d9c708c3c6' })));
38
38
  }
39
39
  };
40
40
  ChCluster.style = chClusterCss();
@@ -0,0 +1,302 @@
1
+ import { r as registerInstance, c as createEvent, a as getElement, h, H as Host } from './index-8l_6qAY9.js';
2
+ import { r as resolveValidity } from './validation-message-BXzZsX2r.js';
3
+
4
+ const chComboboxCss = () => `:host{display:block;width:100%;font-family:var(--typography-body)}:host([hidden]){display:none}.label{display:block;margin-bottom:var(--spacing-sm);font-size:var(--typography-size-sm);font-weight:var(--typography-weight-semibold);color:var(--color-text-primary)}.chips{display:flex;flex-wrap:wrap;gap:var(--spacing-xs);margin:0 0 var(--spacing-sm);padding:0;list-style:none}.chip{display:inline-flex;align-items:center;gap:var(--spacing-xs);max-width:100%;padding:var(--spacing-2xs) var(--spacing-sm);border:var(--border-width) solid var(--color-border-default);border-radius:var(--radius-sm);background:var(--color-surface-hover);font-size:var(--typography-size-sm)}.chip__label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chip__remove{all:unset;cursor:pointer;padding:0 var(--spacing-2xs);border-radius:var(--radius-sm);color:var(--color-text-secondary);line-height:1}.chip__remove:focus-visible{outline:2px solid var(--color-accent-default);outline-offset:1px}.field{position:relative}.input{box-sizing:border-box;width:100%;padding:var(--spacing-xl) var(--spacing-3xl);border:var(--border-width) solid var(--color-border-default);border-radius:var(--radius-sm);background:var(--color-surface-default);color:var(--color-text-primary);font-family:inherit;font-size:var(--typography-size-md);transition:border-color var(--duration-normal) var(--easing-default)}.input::placeholder{color:var(--color-text-secondary)}.input:focus{border-color:var(--color-accent-default);outline:2px solid var(--color-accent-default);outline-offset:1px}.input:disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.input--invalid{border-color:var(--color-status-warning)}.listbox{position:absolute;z-index:var(--z-index-dropdown);top:calc(100% + var(--spacing-2xs));left:0;right:0;max-height:16rem;margin:0;padding:var(--spacing-2xs);overflow-y:auto;list-style:none;border:var(--border-width) solid var(--color-border-default);border-radius:var(--radius-sm);background:var(--color-surface-default);box-shadow:var(--shadow-elevate)}.listbox[hidden]{display:none}.listbox__option{padding:var(--spacing-sm) var(--spacing-md);border-radius:var(--radius-sm);font-size:var(--typography-size-sm);cursor:pointer}.listbox__option--active{background:var(--color-surface-hover);font-weight:var(--typography-weight-semibold);box-shadow:inset 2px 0 0 var(--color-accent-default)}.listbox__option--disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.listbox__empty{padding:var(--spacing-sm) var(--spacing-md);font-size:var(--typography-size-sm);color:var(--color-text-secondary)}.hint,.error{margin:var(--spacing-sm) 0 0;font-size:var(--typography-size-sm);color:var(--color-text-secondary)}.error{color:var(--color-status-warning)}`;
5
+
6
+ let comboboxIds = 0;
7
+ const ChCombobox = class {
8
+ constructor(hostRef) {
9
+ registerInstance(this, hostRef);
10
+ this.chChange = createEvent(this, "chChange");
11
+ this.chFilter = createEvent(this, "chFilter");
12
+ if (hostRef.$hostElement$["s-ei"]) {
13
+ this.internals = hostRef.$hostElement$["s-ei"];
14
+ }
15
+ else {
16
+ this.internals = hostRef.$hostElement$.attachInternals();
17
+ hostRef.$hostElement$["s-ei"] = this.internals;
18
+ }
19
+ }
20
+ inputId = `ch-combobox-${++comboboxIds}`;
21
+ listId = `${this.inputId}-list`;
22
+ hintId = `${this.inputId}-hint`;
23
+ errorId = `${this.inputId}-error`;
24
+ initialValue = [];
25
+ internals;
26
+ formDisabled = false;
27
+ get host() { return getElement(this); }
28
+ /** Visible label, associated with the input via `for`/`id`. */
29
+ label;
30
+ /** The options to filter and choose from. */
31
+ options = [];
32
+ /** The committed value. An array when `multiple`. */
33
+ value;
34
+ /** Whether the user can pick more than one option. */
35
+ multiple = false;
36
+ /** Placeholder shown while the field is empty. */
37
+ placeholder;
38
+ /** Name submitted with the form. Repeated once per value when `multiple`. */
39
+ name;
40
+ /** Whether the field is disabled. */
41
+ disabled = false;
42
+ /** Whether at least one value is required. */
43
+ required = false;
44
+ /** Helper text, replaced by `errorMessage` when invalid. */
45
+ hint;
46
+ /** Custom error message; wins over the built-in messages. */
47
+ errorMessage;
48
+ /** Whether the field is marked invalid by the consumer. */
49
+ invalid = false;
50
+ /** Text the user has typed to filter with. */
51
+ query = '';
52
+ /** Whether the list is rendered. */
53
+ expanded = false;
54
+ /** Index into `visibleOptions` of the option under the keyboard cursor. */
55
+ activeIndex = -1;
56
+ /** Emitted whenever the committed value changes. */
57
+ chChange;
58
+ /** Emitted as the user types, with the raw query, so a consumer can filter remotely. */
59
+ chFilter;
60
+ /** The committed values as an array, whatever the mode. */
61
+ get selected() {
62
+ if (Array.isArray(this.value)) {
63
+ return this.value;
64
+ }
65
+ return this.value === undefined || this.value === '' ? [] : [this.value];
66
+ }
67
+ /** Options that match the current query. */
68
+ get visibleOptions() {
69
+ const query = this.query.trim().toLowerCase();
70
+ if (query === '') {
71
+ return this.options;
72
+ }
73
+ return this.options.filter(option => option.label.toLowerCase().includes(query));
74
+ }
75
+ /** Options that are still choosable: already-picked ones drop out in multiple mode. */
76
+ get choosable() {
77
+ if (!this.multiple) {
78
+ return this.visibleOptions;
79
+ }
80
+ const chosen = new Set(this.selected);
81
+ return this.visibleOptions.filter(option => !chosen.has(option.value));
82
+ }
83
+ labelFor(value) {
84
+ return this.options.find(option => option.value === value)?.label ?? value;
85
+ }
86
+ componentDidLoad() {
87
+ this.initialValue = this.selected;
88
+ this.syncForm();
89
+ this.host.addEventListener('focusout', this.handleFocusOut);
90
+ this.host.addEventListener('invalid', this.markTouched);
91
+ }
92
+ disconnectedCallback() {
93
+ this.host.removeEventListener('focusout', this.handleFocusOut);
94
+ }
95
+ markTouched = () => {
96
+ this.host.setAttribute('data-touched', '');
97
+ };
98
+ /**
99
+ * Closing on blur is deferred: clicking an option also blurs the input, and
100
+ * the click must be allowed to land first.
101
+ */
102
+ handleFocusOut = () => {
103
+ this.markTouched();
104
+ window.setTimeout(() => {
105
+ if (!this.host.contains(document.activeElement) && this.host.shadowRoot?.activeElement == null) {
106
+ this.expanded = false;
107
+ this.syncForm();
108
+ }
109
+ }, 0);
110
+ };
111
+ syncForm() {
112
+ const internals = this.internals;
113
+ if (typeof internals?.setFormValue !== 'function') {
114
+ return;
115
+ }
116
+ const values = this.selected;
117
+ // Multiple entries are submitted once per value, the way a multi-select does.
118
+ if (this.multiple) {
119
+ const data = new FormData();
120
+ for (const entry of values) {
121
+ data.append(this.name ?? '', entry);
122
+ }
123
+ internals.setFormValue(values.length === 0 ? null : data);
124
+ }
125
+ else {
126
+ internals.setFormValue(values[0] ?? '');
127
+ }
128
+ const { flags, message } = resolveValidity({
129
+ required: this.required,
130
+ empty: values.length === 0,
131
+ invalid: this.invalid,
132
+ errorMessage: this.errorMessage,
133
+ });
134
+ internals.setValidity(flags, message);
135
+ }
136
+ formResetCallback() {
137
+ this.value = this.multiple ? [...this.initialValue] : (this.initialValue[0] ?? '');
138
+ this.query = '';
139
+ this.syncForm();
140
+ const input = this.host.shadowRoot?.querySelector('.input');
141
+ if (input) {
142
+ input.value = '';
143
+ }
144
+ }
145
+ formDisabledCallback(isDisabled) {
146
+ this.formDisabled = isDisabled;
147
+ }
148
+ commit(value) {
149
+ if (this.multiple) {
150
+ const next = this.selected.includes(value) ? this.selected : [...this.selected, value];
151
+ this.value = next;
152
+ this.query = '';
153
+ const input = this.host.shadowRoot?.querySelector('.input');
154
+ if (input) {
155
+ input.value = '';
156
+ }
157
+ // Keep the list open: choosing again is the common case here.
158
+ this.activeIndex = -1;
159
+ }
160
+ else {
161
+ this.value = value;
162
+ this.query = this.labelFor(value);
163
+ this.expanded = false;
164
+ this.activeIndex = -1;
165
+ }
166
+ this.chChange.emit(this.value);
167
+ this.syncForm();
168
+ }
169
+ remove(value) {
170
+ const next = this.selected.filter(entry => entry !== value);
171
+ this.value = this.multiple ? next : '';
172
+ this.chChange.emit(this.value);
173
+ this.syncForm();
174
+ }
175
+ open() {
176
+ if (this.disabled || this.formDisabled) {
177
+ return;
178
+ }
179
+ this.expanded = true;
180
+ }
181
+ moveActive(delta) {
182
+ const count = this.choosable.length;
183
+ if (count === 0) {
184
+ return;
185
+ }
186
+ const next = this.activeIndex + delta;
187
+ this.activeIndex = next < 0 ? count - 1 : next >= count ? 0 : next;
188
+ }
189
+ handleInput = (event) => {
190
+ const input = event.target;
191
+ this.query = input.value;
192
+ this.expanded = true;
193
+ this.activeIndex = this.choosable.length > 0 ? 0 : -1;
194
+ // Single mode shows a typed-but-uncommitted value as no value at all.
195
+ if (!this.multiple && this.value !== undefined && this.value !== this.labelFor(this.selected[0] ?? '')) {
196
+ this.value = '';
197
+ }
198
+ this.chFilter.emit(this.query);
199
+ };
200
+ handleKeyDown = (event) => {
201
+ if (event.key === 'ArrowDown') {
202
+ event.preventDefault();
203
+ this.open();
204
+ this.moveActive(1);
205
+ return;
206
+ }
207
+ if (event.key === 'ArrowUp') {
208
+ event.preventDefault();
209
+ this.open();
210
+ this.moveActive(-1);
211
+ return;
212
+ }
213
+ if (event.key === 'Enter') {
214
+ const option = this.choosable[this.activeIndex];
215
+ if (this.expanded && option && !option.disabled) {
216
+ event.preventDefault();
217
+ this.commit(option.value);
218
+ }
219
+ return;
220
+ }
221
+ if (event.key === 'Escape' && this.expanded) {
222
+ event.preventDefault();
223
+ this.expanded = false;
224
+ this.activeIndex = -1;
225
+ return;
226
+ }
227
+ // Backspace in an empty multiple field removes the last chip.
228
+ if (event.key === 'Backspace' && this.multiple && this.query === '') {
229
+ const last = this.selected[this.selected.length - 1];
230
+ if (last !== undefined) {
231
+ event.preventDefault();
232
+ this.remove(last);
233
+ }
234
+ }
235
+ };
236
+ handleFocus = () => {
237
+ this.open();
238
+ };
239
+ handleBlur = () => {
240
+ // A single-mode field shows the chosen label, not what was typed.
241
+ const input = this.host.shadowRoot?.querySelector('.input');
242
+ if (input && !this.multiple) {
243
+ this.query = '';
244
+ input.value = this.selected.length > 0 ? this.labelFor(this.selected[0]) : '';
245
+ }
246
+ };
247
+ get isInvalid() {
248
+ return this.invalid || (this.host.hasAttribute('data-touched') && this.selected.length === 0 && this.required);
249
+ }
250
+ get describedBy() {
251
+ if (this.isInvalid && this.errorMessage) {
252
+ return this.errorId;
253
+ }
254
+ return this.hint ? this.hintId : undefined;
255
+ }
256
+ /** The option id for `aria-activedescendant`. */
257
+ optionId(index) {
258
+ return `${this.inputId}-option-${index}`;
259
+ }
260
+ render() {
261
+ const options = this.choosable;
262
+ const active = this.activeIndex >= 0 && this.activeIndex < options.length ? options[this.activeIndex] : undefined;
263
+ const chosen = this.selected;
264
+ const showError = this.isInvalid && this.errorMessage;
265
+ return (h(Host, { key: '783df95d2970b0db5c6f839fb0acbaa7582301f0' }, this.label && (h("label", { key: '232933c04601d543b391d15603f1dcfafa2f6e73', class: "label", htmlFor: this.inputId }, this.label)), this.multiple && chosen.length > 0 && (h("ul", { key: 'e7e92805f42a9a97d0587463f0b68fa79368cc6b', class: "chips", "aria-label": "Selected values" }, chosen.map(entry => (h("li", { class: "chip", key: entry }, h("span", { class: "chip__label" }, this.labelFor(entry)), h("button", { type: "button", class: "chip__remove", "aria-label": `Remove ${this.labelFor(entry)}`, onClick: () => this.remove(entry) }, h("span", { "aria-hidden": "true" }, "\u00D7"))))))), h("div", { key: '076bd78c0c43327c298baf37e9411d68e6b03734', class: "field" }, h("input", { key: '0e2caa28567ea21d8b5a98a8b1ed949e07731e09', id: this.label && !this.multiple ? this.inputId : undefined, class: { 'input': true, 'input--invalid': this.isInvalid }, type: "text", role: "combobox", autocomplete: "off", "aria-expanded": this.expanded ? 'true' : 'false', "aria-controls": this.listId, "aria-autocomplete": "list", "aria-activedescendant": active ? this.optionId(this.activeIndex) : undefined, "aria-invalid": this.isInvalid ? 'true' : undefined, "aria-describedby": this.describedBy, name: this.name, disabled: this.disabled || this.formDisabled, required: this.required, placeholder: chosen.length === 0 ? this.placeholder : undefined, value: this.multiple ? this.query : this.query || (chosen[0] !== undefined ? this.labelFor(chosen[0]) : ''), onInput: this.handleInput, onKeyDown: this.handleKeyDown, onFocus: this.handleFocus, onBlur: this.handleBlur }), h("ul", { key: '5f843aef03c09ff9dd1e02c3da90f6e9dbcca858', class: "listbox", id: this.listId, role: "listbox", "aria-multiselectable": this.multiple ? 'true' : undefined, hidden: !this.expanded }, options.length === 0 && (h("li", { key: '1bb282438f1889da96af7d27b504e31ab19088e5', class: "listbox__empty", role: "presentation" }, "No results")), options.map((option, index) => (h("li", { class: {
266
+ 'listbox__option': true,
267
+ 'listbox__option--active': index === this.activeIndex,
268
+ 'listbox__option--disabled': option.disabled === true,
269
+ }, id: this.optionId(index), key: option.value, role: "option", "aria-selected": this.multiple ? 'false' : chosen[0] === option.value ? 'true' : 'false', "aria-disabled": option.disabled ? 'true' : undefined,
270
+ // Pointer-down commits before the input's blur closes the list.
271
+ onMouseDown: event => {
272
+ event.preventDefault();
273
+ if (!option.disabled) {
274
+ this.commit(option.value);
275
+ }
276
+ } }, option.label))))), this.hint && !showError && (h("p", { key: 'dc7f8a5d26e55d2d7836bf72a5359a6c0fbe0220', class: "hint", id: this.hintId }, this.hint)), showError && (h("p", { key: 'd3d9beaa0eb9d830b2c9f3082ea0bf0490efe3ee', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
277
+ }
278
+ static get formAssociated() { return true; }
279
+ static get watchers() { return {
280
+ "value": [{
281
+ "syncForm": 0
282
+ }],
283
+ "required": [{
284
+ "syncForm": 0
285
+ }],
286
+ "invalid": [{
287
+ "syncForm": 0
288
+ }],
289
+ "errorMessage": [{
290
+ "syncForm": 0
291
+ }],
292
+ "multiple": [{
293
+ "syncForm": 0
294
+ }]
295
+ }; }
296
+ };
297
+ ChCombobox.style = chComboboxCss();
298
+
299
+ export { ChCombobox as ch_combobox };
300
+ //# sourceMappingURL=ch-combobox.entry.js.map
301
+
302
+ //# sourceMappingURL=ch-combobox.entry.js.map