@public-ui/components 4.5.0-rc.6 → 4.5.0-rc.7

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 (580) hide show
  1. package/assets/kolicons/kolicons.eot +0 -0
  2. package/assets/kolicons/kolicons.ttf +0 -0
  3. package/assets/kolicons/kolicons.woff +0 -0
  4. package/assets/kolicons/kolicons.woff2 +0 -0
  5. package/assets/kolicons/style.css +6 -6
  6. package/custom-elements.json +1 -2
  7. package/dist/cjs/{Heading-Bck3PFpH.js → Heading-d30Feghg.js} +3 -3
  8. package/dist/cjs/{Heading-Bck3PFpH.js.map → Heading-d30Feghg.js.map} +1 -1
  9. package/dist/cjs/{api-BcNl2vZm.js → api-C8ZkIyx7.js} +8 -8
  10. package/dist/cjs/{api-BcNl2vZm.js.map → api-C8ZkIyx7.js.map} +1 -1
  11. package/dist/cjs/{api-LP3gnw7U.js → api-CRSjJs8P.js} +12 -12
  12. package/dist/cjs/{api-LP3gnw7U.js.map → api-CRSjJs8P.js.map} +1 -1
  13. package/dist/cjs/{app-globals-oR-jEiju.js → app-globals-B6wB2cXk.js} +4 -4
  14. package/dist/cjs/{app-globals-oR-jEiju.js.map → app-globals-B6wB2cXk.js.map} +1 -1
  15. package/dist/cjs/{base-CwXJywKD.js → base-C3MDHUog.js} +4 -4
  16. package/dist/cjs/{base-CwXJywKD.js.map → base-C3MDHUog.js.map} +1 -1
  17. package/dist/cjs/{base-DbfvhKRa.js → base-CyQnTxi6.js} +4 -4
  18. package/dist/cjs/{base-DbfvhKRa.js.map → base-CyQnTxi6.js.map} +1 -1
  19. package/dist/cjs/{base-DaK2F3pq.js → base-DgUZAiNc.js} +16 -16
  20. package/dist/cjs/{base-DaK2F3pq.js.map → base-DgUZAiNc.js.map} +1 -1
  21. package/dist/cjs/{base-BDGmLWVj.js → base-LmwA5h1k.js} +5 -5
  22. package/dist/cjs/{base-BDGmLWVj.js.map → base-LmwA5h1k.js.map} +1 -1
  23. package/dist/cjs/{base-web-component-C8MLLGxi.js → base-web-component-C-CwpVZw.js} +16 -9
  24. package/dist/cjs/base-web-component-C-CwpVZw.js.map +1 -0
  25. package/dist/cjs/{base-web-component-mmgXJMg0.js → base-web-component-d2k3Mc9P.js} +7 -7
  26. package/dist/cjs/{base-web-component-mmgXJMg0.js.map → base-web-component-d2k3Mc9P.js.map} +1 -1
  27. package/dist/cjs/{behavior-DWqrO2yi.js → behavior-C-BdOoSN.js} +3 -3
  28. package/dist/cjs/{behavior-DWqrO2yi.js.map → behavior-C-BdOoSN.js.map} +1 -1
  29. package/dist/cjs/{color-C9UZwMvC.js → color-CZiNkZFM.js} +3 -3
  30. package/dist/cjs/{color-C9UZwMvC.js.map → color-CZiNkZFM.js.map} +1 -1
  31. package/dist/cjs/{component-GfDUM7Um.js → component-B1kzY-J5.js} +4 -4
  32. package/dist/cjs/{component-GfDUM7Um.js.map → component-B1kzY-J5.js.map} +1 -1
  33. package/dist/cjs/{component-BT86Nj6R.js → component-B1zMXSkZ.js} +5 -5
  34. package/dist/cjs/{component-BT86Nj6R.js.map → component-B1zMXSkZ.js.map} +1 -1
  35. package/dist/cjs/{component-X_thXnkE.js → component-BHDnSaCH.js} +3 -3
  36. package/dist/cjs/{component-X_thXnkE.js.map → component-BHDnSaCH.js.map} +1 -1
  37. package/dist/cjs/{component-1NrcvQzp.js → component-BIz_gAas.js} +7 -7
  38. package/dist/cjs/{component-1NrcvQzp.js.map → component-BIz_gAas.js.map} +1 -1
  39. package/dist/cjs/{component-ZPvcKmPR.js → component-BairlFHi.js} +3 -3
  40. package/dist/cjs/{component-ZPvcKmPR.js.map → component-BairlFHi.js.map} +1 -1
  41. package/dist/cjs/{component-xIM903qi.js → component-CmyhDJ0r.js} +3 -3
  42. package/dist/cjs/{component-xIM903qi.js.map → component-CmyhDJ0r.js.map} +1 -1
  43. package/dist/cjs/{component-DNDfYzXZ.js → component-D2kI8uwF.js} +5 -5
  44. package/dist/cjs/{component-DNDfYzXZ.js.map → component-D2kI8uwF.js.map} +1 -1
  45. package/dist/cjs/{component-CmvG-auD.js → component-D33lYKYT.js} +3 -3
  46. package/dist/cjs/{component-CmvG-auD.js.map → component-D33lYKYT.js.map} +1 -1
  47. package/dist/cjs/{component-uHDfV5D8.js → component-DITtC2F9.js} +7 -7
  48. package/dist/cjs/{component-uHDfV5D8.js.map → component-DITtC2F9.js.map} +1 -1
  49. package/dist/cjs/{component-DuPEYx7z.js → component-DaAVlb5U.js} +4 -4
  50. package/dist/cjs/{component-DuPEYx7z.js.map → component-DaAVlb5U.js.map} +1 -1
  51. package/dist/cjs/{component-CtNPdMS0.js → component-KT0MKnL5.js} +5 -5
  52. package/dist/cjs/{component-CtNPdMS0.js.map → component-KT0MKnL5.js.map} +1 -1
  53. package/dist/cjs/{component-o3s7XplI.js → component-_jdRFw0Y.js} +4 -4
  54. package/dist/cjs/{component-o3s7XplI.js.map → component-_jdRFw0Y.js.map} +1 -1
  55. package/dist/cjs/{contrast-kLMuDQLl.js → contrast-CrL_sMV6.js} +3 -12
  56. package/dist/cjs/contrast-CrL_sMV6.js.map +1 -0
  57. package/dist/cjs/{dev.utils-BjrG4FNf.js → dev.utils-B1bWgxrQ.js} +3 -3
  58. package/dist/cjs/{dev.utils-BjrG4FNf.js.map → dev.utils-B1bWgxrQ.js.map} +1 -1
  59. package/dist/cjs/{devtools-D_afWgpU.js → devtools-DlcIXbRm.js} +4 -4
  60. package/dist/cjs/{devtools-D_afWgpU.js.map → devtools-DlcIXbRm.js.map} +1 -1
  61. package/dist/cjs/{field-control-DAHkvYr4.js → field-control-D0lryu2-.js} +8 -8
  62. package/dist/cjs/{field-control-DAHkvYr4.js.map → field-control-D0lryu2-.js.map} +1 -1
  63. package/dist/cjs/{group-DHYxVn2x.js → group-DIGY9sM6.js} +5 -5
  64. package/dist/cjs/{group-DHYxVn2x.js.map → group-DIGY9sM6.js.map} +1 -1
  65. package/dist/cjs/{index-BnEus4Y9.js → index-qcrGfEY6.js} +3 -3
  66. package/dist/cjs/{index-BnEus4Y9.js.map → index-qcrGfEY6.js.map} +1 -1
  67. package/dist/cjs/{input-eDaEE80n.js → input-BjNjOSo5.js} +5 -5
  68. package/dist/cjs/{input-eDaEE80n.js.map → input-BjNjOSo5.js.map} +1 -1
  69. package/dist/cjs/{input-container-Cye4qL9S.js → input-container-DghKiuUH.js} +7 -7
  70. package/dist/cjs/{input-container-Cye4qL9S.js.map → input-container-DghKiuUH.js.map} +1 -1
  71. package/dist/cjs/{item-C0yzJQUg.js → item-BKz8BDg2.js} +4 -4
  72. package/dist/cjs/{item-C0yzJQUg.js.map → item-BKz8BDg2.js.map} +1 -1
  73. package/dist/cjs/{item-wz0gBnmK.js → item-BMB6SaVm.js} +4 -4
  74. package/dist/cjs/{item-wz0gBnmK.js.map → item-BMB6SaVm.js.map} +1 -1
  75. package/dist/cjs/{item-Dflr47KV.js → item-CFojolE7.js} +8 -8
  76. package/dist/cjs/{item-Dflr47KV.js.map → item-CFojolE7.js.map} +1 -1
  77. package/dist/cjs/{item-BSdQbEav.js → item-DdnTb-BP.js} +3 -3
  78. package/dist/cjs/{item-BSdQbEav.js.map → item-DdnTb-BP.js.map} +1 -1
  79. package/dist/cjs/kol-abbr.cjs.entry.js +2 -2
  80. package/dist/cjs/kol-accordion.cjs.entry.js +7 -7
  81. package/dist/cjs/kol-alert.cjs.entry.js +11 -11
  82. package/dist/cjs/kol-avatar.cjs.entry.js +3 -3
  83. package/dist/cjs/kol-badge.cjs.entry.js +12 -12
  84. package/dist/cjs/kol-breadcrumb.cjs.entry.js +9 -9
  85. package/dist/cjs/kol-button-link.cjs.entry.js +10 -10
  86. package/dist/cjs/kol-button.cjs.entry.js +10 -10
  87. package/dist/cjs/kol-card.cjs.entry.js +11 -11
  88. package/dist/cjs/kol-click-button.cjs.entry.js +2 -2
  89. package/dist/cjs/kol-combobox.cjs.entry.js +18 -18
  90. package/dist/cjs/kol-details.cjs.entry.js +7 -7
  91. package/dist/cjs/kol-dialog.cjs.entry.js +13 -13
  92. package/dist/cjs/kol-drawer.cjs.entry.js +12 -12
  93. package/dist/cjs/kol-form.cjs.entry.js +12 -12
  94. package/dist/cjs/kol-heading.cjs.entry.js +1 -1
  95. package/dist/cjs/kol-icon.cjs.entry.js +3 -3
  96. package/dist/cjs/kol-image.cjs.entry.js +1 -1
  97. package/dist/cjs/kol-input-checkbox.cjs.entry.js +17 -17
  98. package/dist/cjs/kol-input-color.cjs.entry.js +18 -18
  99. package/dist/cjs/kol-input-date.cjs.entry.js +18 -18
  100. package/dist/cjs/kol-input-email.cjs.entry.js +20 -20
  101. package/dist/cjs/kol-input-file.cjs.entry.js +17 -17
  102. package/dist/cjs/kol-input-number.cjs.entry.js +18 -18
  103. package/dist/cjs/kol-input-password.cjs.entry.js +22 -22
  104. package/dist/cjs/kol-input-password.entry.cjs.js.map +1 -1
  105. package/dist/cjs/kol-input-radio.cjs.entry.js +17 -17
  106. package/dist/cjs/kol-input-range.cjs.entry.js +18 -18
  107. package/dist/cjs/kol-input-text.cjs.entry.js +20 -20
  108. package/dist/cjs/kol-kolibri.cjs.entry.js +2 -2
  109. package/dist/cjs/kol-link-button.cjs.entry.js +10 -10
  110. package/dist/cjs/kol-link.cjs.entry.js +10 -10
  111. package/dist/cjs/kol-meter.cjs.entry.js +1 -1
  112. package/dist/cjs/kol-modal.cjs.entry.js +13 -13
  113. package/dist/cjs/kol-nav.cjs.entry.js +13 -13
  114. package/dist/cjs/kol-pagination.cjs.entry.js +18 -18
  115. package/dist/cjs/kol-popover-button.cjs.entry.js +12 -13
  116. package/dist/cjs/kol-popover-button.entry.cjs.js.map +1 -1
  117. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  118. package/dist/cjs/kol-quote.cjs.entry.js +1 -1
  119. package/dist/cjs/kol-select.cjs.entry.js +17 -17
  120. package/dist/cjs/kol-single-select.cjs.entry.js +18 -18
  121. package/dist/cjs/kol-skeleton.cjs.entry.js +2 -2
  122. package/dist/cjs/kol-skip-nav.cjs.entry.js +9 -9
  123. package/dist/cjs/kol-spin.cjs.entry.js +3 -3
  124. package/dist/cjs/kol-split-button.cjs.entry.js +12 -12
  125. package/dist/cjs/kol-table-stateful.cjs.entry.js +25 -25
  126. package/dist/cjs/kol-table-stateless.cjs.entry.js +19 -19
  127. package/dist/cjs/kol-tabs.cjs.entry.js +9 -9
  128. package/dist/cjs/kol-textarea.cjs.entry.js +20 -20
  129. package/dist/cjs/kol-textarea.entry.cjs.js.map +1 -1
  130. package/dist/cjs/kol-toast-container.cjs.entry.js +11 -11
  131. package/dist/cjs/kol-toolbar.cjs.entry.js +33 -14
  132. package/dist/cjs/kol-toolbar.entry.cjs.js.map +1 -1
  133. package/dist/cjs/kol-tooltip-wc.cjs.entry.js +4 -4
  134. package/dist/cjs/kol-tree-item.cjs.entry.js +9 -9
  135. package/dist/cjs/kol-tree.cjs.entry.js +1 -1
  136. package/dist/cjs/kol-version.cjs.entry.js +10 -10
  137. package/dist/cjs/kolibri.cjs.js +2 -2
  138. package/dist/cjs/loader.cjs.js +2 -2
  139. package/dist/cjs/{resolve-props-DOU1VJNL.js → resolve-props-pAyNSZMT.js} +3 -3
  140. package/dist/cjs/{resolve-props-DOU1VJNL.js.map → resolve-props-pAyNSZMT.js.map} +1 -1
  141. package/dist/cjs/{scroll-lock-C6dUw4on.js → scroll-lock-CNwobwd2.js} +3 -3
  142. package/dist/cjs/{scroll-lock-C6dUw4on.js.map → scroll-lock-CNwobwd2.js.map} +1 -1
  143. package/dist/cjs/{suggestions-0hcm13gT.js → suggestions-D4TMMZSv.js} +4 -4
  144. package/dist/cjs/{suggestions-0hcm13gT.js.map → suggestions-D4TMMZSv.js.map} +1 -1
  145. package/dist/cjs/test-component.cjs.entry.js +1 -1
  146. package/dist/cjs/{toggle-handler-kOflG5om.js → toggle-handler-mIB8gvse.js} +5 -5
  147. package/dist/cjs/{toggle-handler-kOflG5om.js.map → toggle-handler-mIB8gvse.js.map} +1 -1
  148. package/dist/collection/components/accordion/style.css +2 -2
  149. package/dist/collection/components/alert/style.css +2 -2
  150. package/dist/collection/components/badge/style.css +2 -2
  151. package/dist/collection/components/breadcrumb/style.css +2 -2
  152. package/dist/collection/components/button/style.css +2 -2
  153. package/dist/collection/components/button-link/style.css +2 -2
  154. package/dist/collection/components/card/style.css +2 -2
  155. package/dist/collection/components/combobox/style.css +2 -2
  156. package/dist/collection/components/details/style.css +2 -2
  157. package/dist/collection/components/dialog/style.css +2 -2
  158. package/dist/collection/components/drawer/style.css +2 -2
  159. package/dist/collection/components/form/style.css +2 -2
  160. package/dist/collection/components/icon/style.css +2 -2
  161. package/dist/collection/components/input-checkbox/style.css +2 -2
  162. package/dist/collection/components/input-color/style.css +2 -2
  163. package/dist/collection/components/input-date/style.css +2 -2
  164. package/dist/collection/components/input-email/style.css +2 -2
  165. package/dist/collection/components/input-file/style.css +2 -2
  166. package/dist/collection/components/input-number/style.css +2 -2
  167. package/dist/collection/components/input-password/component.js +2 -2
  168. package/dist/collection/components/input-password/component.js.map +1 -1
  169. package/dist/collection/components/input-password/style.css +2 -2
  170. package/dist/collection/components/input-radio/style.css +2 -2
  171. package/dist/collection/components/input-range/style.css +2 -2
  172. package/dist/collection/components/input-text/style.css +2 -2
  173. package/dist/collection/components/link/style.css +2 -2
  174. package/dist/collection/components/link-button/style.css +2 -2
  175. package/dist/collection/components/modal/style.css +2 -2
  176. package/dist/collection/components/nav/style.css +2 -2
  177. package/dist/collection/components/pagination/style.css +2 -2
  178. package/dist/collection/components/popover-button/component.js +2 -4
  179. package/dist/collection/components/popover-button/component.js.map +1 -1
  180. package/dist/collection/components/popover-button/style.css +2 -2
  181. package/dist/collection/components/select/style.css +2 -2
  182. package/dist/collection/components/single-select/style.css +2 -2
  183. package/dist/collection/components/skip-nav/style.css +2 -2
  184. package/dist/collection/components/split-button/style.css +2 -2
  185. package/dist/collection/components/table-stateful/style.css +2 -2
  186. package/dist/collection/components/table-stateless/style.css +2 -2
  187. package/dist/collection/components/tabs/style.css +2 -2
  188. package/dist/collection/components/textarea/component.js +3 -3
  189. package/dist/collection/components/textarea/component.js.map +1 -1
  190. package/dist/collection/components/textarea/style.css +2 -2
  191. package/dist/collection/components/toaster/style.css +2 -2
  192. package/dist/collection/components/toolbar/component.js +1 -1
  193. package/dist/collection/components/toolbar/component.js.map +1 -1
  194. package/dist/collection/components/toolbar/style.css +9 -3
  195. package/dist/collection/components/tree-item/style.css +2 -2
  196. package/dist/collection/components/version/style.css +2 -2
  197. package/dist/collection/internal/functional-components/form-field/select-value.js +3 -1
  198. package/dist/collection/internal/functional-components/form-field/select-value.js.map +1 -1
  199. package/dist/collection/internal/functional-components/form-field/select.js +8 -3
  200. package/dist/collection/internal/functional-components/form-field/select.js.map +1 -1
  201. package/dist/collection/internal/functional-components/form-field/select.test.js +88 -0
  202. package/dist/collection/internal/functional-components/form-field/select.test.js.map +1 -1
  203. package/dist/collection/internal/functional-components/form-field/textarea.js.map +1 -1
  204. package/dist/collection/internal/functional-components/toolbar/api.js.map +1 -1
  205. package/dist/collection/internal/functional-components/toolbar/component.js +1 -1
  206. package/dist/collection/internal/functional-components/toolbar/component.js.map +1 -1
  207. package/dist/collection/internal/functional-components/toolbar/item.js +20 -1
  208. package/dist/collection/internal/functional-components/toolbar/item.js.map +1 -1
  209. package/dist/collection/schema/props/toolbar-items.js.map +1 -1
  210. package/dist/collection/schema/utils/contrast.js +2 -10
  211. package/dist/collection/schema/utils/contrast.js.map +1 -1
  212. package/dist/components/base-web-component4.js +11 -4
  213. package/dist/components/base-web-component4.js.map +1 -1
  214. package/dist/components/contrast.js +1 -10
  215. package/dist/components/contrast.js.map +1 -1
  216. package/dist/components/kol-accordion.js +1 -1
  217. package/dist/components/kol-alert.js +1 -1
  218. package/dist/components/kol-badge.js +1 -1
  219. package/dist/components/kol-breadcrumb.js +1 -1
  220. package/dist/components/kol-button-link.js +1 -1
  221. package/dist/components/kol-button.js +1 -1
  222. package/dist/components/kol-card.js +1 -1
  223. package/dist/components/kol-combobox.js +1 -1
  224. package/dist/components/kol-details.js +1 -1
  225. package/dist/components/kol-dialog.js +1 -1
  226. package/dist/components/kol-drawer.js +1 -1
  227. package/dist/components/kol-form.js +1 -1
  228. package/dist/components/kol-icon.js +1 -1
  229. package/dist/components/kol-input-checkbox.js +1 -1
  230. package/dist/components/kol-input-color.js +1 -1
  231. package/dist/components/kol-input-date.js +1 -1
  232. package/dist/components/kol-input-email.js +1 -1
  233. package/dist/components/kol-input-file.js +1 -1
  234. package/dist/components/kol-input-number.js +1 -1
  235. package/dist/components/kol-input-password.js +3 -3
  236. package/dist/components/kol-input-password.js.map +1 -1
  237. package/dist/components/kol-input-radio.js +1 -1
  238. package/dist/components/kol-input-range.js +1 -1
  239. package/dist/components/kol-input-text.js +1 -1
  240. package/dist/components/kol-link-button.js +1 -1
  241. package/dist/components/kol-link.js +1 -1
  242. package/dist/components/kol-modal.js +1 -1
  243. package/dist/components/kol-nav.js +1 -1
  244. package/dist/components/kol-pagination.js +1 -1
  245. package/dist/components/kol-popover-button.js +2 -3
  246. package/dist/components/kol-popover-button.js.map +1 -1
  247. package/dist/components/kol-select.js +1 -1
  248. package/dist/components/kol-single-select.js +1 -1
  249. package/dist/components/kol-skip-nav.js +1 -1
  250. package/dist/components/kol-split-button.js +1 -1
  251. package/dist/components/kol-table-stateful.js +1 -1
  252. package/dist/components/kol-table-stateless.js +1 -1
  253. package/dist/components/kol-tabs.js +1 -1
  254. package/dist/components/kol-textarea.js +4 -4
  255. package/dist/components/kol-textarea.js.map +1 -1
  256. package/dist/components/kol-toast-container.js +1 -1
  257. package/dist/components/kol-toolbar.js +23 -4
  258. package/dist/components/kol-toolbar.js.map +1 -1
  259. package/dist/components/kol-tree-item.js +1 -1
  260. package/dist/components/kol-version.js +1 -1
  261. package/dist/esm/{Heading-DXl16qig.js → Heading-NHB1reiQ.js} +3 -3
  262. package/dist/esm/{Heading-DXl16qig.js.map → Heading-NHB1reiQ.js.map} +1 -1
  263. package/dist/esm/{api-C8TfIYlY.js → api-BAEPnyL7.js} +12 -12
  264. package/dist/{kolibri/api-C8TfIYlY.js.map → esm/api-BAEPnyL7.js.map} +1 -1
  265. package/dist/esm/{api-BA-AFr5H.js → api-CagcODCX.js} +8 -8
  266. package/dist/{kolibri/api-BA-AFr5H.js.map → esm/api-CagcODCX.js.map} +1 -1
  267. package/dist/esm/{app-globals-lFdBwFG2.js → app-globals-CwlOH1sO.js} +4 -4
  268. package/dist/esm/{app-globals-lFdBwFG2.js.map → app-globals-CwlOH1sO.js.map} +1 -1
  269. package/dist/esm/{base-BpqjfzG1.js → base-BFU17cMm.js} +16 -16
  270. package/dist/{kolibri/base-BpqjfzG1.js.map → esm/base-BFU17cMm.js.map} +1 -1
  271. package/dist/esm/{base-D8GcFhvD.js → base-BpKxLJ6r.js} +4 -4
  272. package/dist/{kolibri/base-D8GcFhvD.js.map → esm/base-BpKxLJ6r.js.map} +1 -1
  273. package/dist/esm/{base-DiSQvfGU.js → base-Cm_c8klt.js} +5 -5
  274. package/dist/esm/{base-DiSQvfGU.js.map → base-Cm_c8klt.js.map} +1 -1
  275. package/dist/esm/{base-B5F8ROuQ.js → base-DitGpYOV.js} +4 -4
  276. package/dist/{kolibri/base-B5F8ROuQ.js.map → esm/base-DitGpYOV.js.map} +1 -1
  277. package/dist/esm/{base-web-component-CkaKv7O0.js → base-web-component-6J5sCsnZ.js} +16 -9
  278. package/dist/esm/base-web-component-6J5sCsnZ.js.map +1 -0
  279. package/dist/esm/{base-web-component-BozlJoj7.js → base-web-component-BFCVvyYG.js} +7 -7
  280. package/dist/esm/{base-web-component-BozlJoj7.js.map → base-web-component-BFCVvyYG.js.map} +1 -1
  281. package/dist/esm/{behavior-BuNqmjz8.js → behavior-CH_2MMuX.js} +3 -3
  282. package/dist/esm/{behavior-BuNqmjz8.js.map → behavior-CH_2MMuX.js.map} +1 -1
  283. package/dist/esm/{color-Du3Ft0XV.js → color-QYuhlVFz.js} +3 -3
  284. package/dist/esm/{color-Du3Ft0XV.js.map → color-QYuhlVFz.js.map} +1 -1
  285. package/dist/esm/{component-C9DexidK.js → component-BF8FPuIW.js} +3 -3
  286. package/dist/esm/{component-C9DexidK.js.map → component-BF8FPuIW.js.map} +1 -1
  287. package/dist/esm/{component-Da5dJMKj.js → component-Ba4gjLBG.js} +5 -5
  288. package/dist/{kolibri/component-Da5dJMKj.js.map → esm/component-Ba4gjLBG.js.map} +1 -1
  289. package/dist/esm/{component-BjH8s4-t.js → component-BpOMe842.js} +3 -3
  290. package/dist/{kolibri/component-BjH8s4-t.js.map → esm/component-BpOMe842.js.map} +1 -1
  291. package/dist/esm/{component-BxKN0JbT.js → component-C3sXiwbS.js} +3 -3
  292. package/dist/esm/{component-BxKN0JbT.js.map → component-C3sXiwbS.js.map} +1 -1
  293. package/dist/esm/{component-Bd7PXqOG.js → component-C5BFsKau.js} +5 -5
  294. package/dist/esm/{component-Bd7PXqOG.js.map → component-C5BFsKau.js.map} +1 -1
  295. package/dist/esm/{component-C3aqLFK2.js → component-CBpYh2q-.js} +7 -7
  296. package/dist/esm/{component-C3aqLFK2.js.map → component-CBpYh2q-.js.map} +1 -1
  297. package/dist/esm/{component-D_58mw87.js → component-C_d54ujF.js} +4 -4
  298. package/dist/{kolibri/component-D_58mw87.js.map → esm/component-C_d54ujF.js.map} +1 -1
  299. package/dist/esm/{component-xrrwVuiI.js → component-CvCfEqSE.js} +4 -4
  300. package/dist/esm/{component-xrrwVuiI.js.map → component-CvCfEqSE.js.map} +1 -1
  301. package/dist/esm/{component-CWGVLsSH.js → component-DZbJLUju.js} +4 -4
  302. package/dist/{kolibri/component-CWGVLsSH.js.map → esm/component-DZbJLUju.js.map} +1 -1
  303. package/dist/esm/{component-BKOep2WQ.js → component-Dg6TIbeY.js} +5 -5
  304. package/dist/{kolibri/component-BKOep2WQ.js.map → esm/component-Dg6TIbeY.js.map} +1 -1
  305. package/dist/esm/{component-DD5QqT5m.js → component-Do9rjnte.js} +7 -7
  306. package/dist/{kolibri/component-DD5QqT5m.js.map → esm/component-Do9rjnte.js.map} +1 -1
  307. package/dist/esm/{component-De6Do_gt.js → component-DzoBgfR4.js} +3 -3
  308. package/dist/esm/{component-De6Do_gt.js.map → component-DzoBgfR4.js.map} +1 -1
  309. package/dist/esm/{contrast-BKAJJL2K.js → contrast-DMN9saXP.js} +3 -12
  310. package/dist/esm/contrast-DMN9saXP.js.map +1 -0
  311. package/dist/esm/{dev.utils-CYtV9X0K.js → dev.utils-CJMVCYWh.js} +3 -3
  312. package/dist/esm/{dev.utils-CYtV9X0K.js.map → dev.utils-CJMVCYWh.js.map} +1 -1
  313. package/dist/esm/{devtools-B0qRaQdp.js → devtools-rRHULXVr.js} +4 -4
  314. package/dist/{kolibri/devtools-B0qRaQdp.js.map → esm/devtools-rRHULXVr.js.map} +1 -1
  315. package/dist/esm/{field-control-C5hjw2Rb.js → field-control-DXxCMXvx.js} +8 -8
  316. package/dist/{kolibri/field-control-C5hjw2Rb.js.map → esm/field-control-DXxCMXvx.js.map} +1 -1
  317. package/dist/esm/{group-2hP8qbvk.js → group-CI4sSgiu.js} +5 -5
  318. package/dist/esm/{group-2hP8qbvk.js.map → group-CI4sSgiu.js.map} +1 -1
  319. package/dist/esm/{index-DsCeQ9Ys.js → index-DQdQBwMc.js} +3 -3
  320. package/dist/{kolibri/index-DsCeQ9Ys.js.map → esm/index-DQdQBwMc.js.map} +1 -1
  321. package/dist/esm/{input-Dp5NBocQ.js → input-CDtJZ2sy.js} +5 -5
  322. package/dist/esm/{input-Dp5NBocQ.js.map → input-CDtJZ2sy.js.map} +1 -1
  323. package/dist/esm/{input-container-QA8-0_0p.js → input-container-DROwwh7_.js} +7 -7
  324. package/dist/esm/{input-container-QA8-0_0p.js.map → input-container-DROwwh7_.js.map} +1 -1
  325. package/dist/esm/{item-CaxJw3ad.js → item-C6p5wW-z.js} +4 -4
  326. package/dist/esm/{item-CaxJw3ad.js.map → item-C6p5wW-z.js.map} +1 -1
  327. package/dist/esm/{item-CXyolUj2.js → item-CHP-bw8Q.js} +4 -4
  328. package/dist/{kolibri/item-CXyolUj2.js.map → esm/item-CHP-bw8Q.js.map} +1 -1
  329. package/dist/esm/{item-DY0fVVnj.js → item-Cbi_ZY6o.js} +3 -3
  330. package/dist/esm/{item-DY0fVVnj.js.map → item-Cbi_ZY6o.js.map} +1 -1
  331. package/dist/esm/{item-BIjqEkyy.js → item-ZjrNIhfW.js} +8 -8
  332. package/dist/{kolibri/item-BIjqEkyy.js.map → esm/item-ZjrNIhfW.js.map} +1 -1
  333. package/dist/esm/kol-abbr.entry.js +2 -2
  334. package/dist/esm/kol-accordion.entry.js +7 -7
  335. package/dist/esm/kol-alert.entry.js +11 -11
  336. package/dist/esm/kol-avatar.entry.js +3 -3
  337. package/dist/esm/kol-badge.entry.js +12 -12
  338. package/dist/esm/kol-breadcrumb.entry.js +9 -9
  339. package/dist/esm/kol-button-link.entry.js +10 -10
  340. package/dist/esm/kol-button.entry.js +10 -10
  341. package/dist/esm/kol-card.entry.js +11 -11
  342. package/dist/esm/kol-click-button.entry.js +2 -2
  343. package/dist/esm/kol-combobox.entry.js +18 -18
  344. package/dist/esm/kol-details.entry.js +7 -7
  345. package/dist/esm/kol-dialog.entry.js +13 -13
  346. package/dist/esm/kol-drawer.entry.js +12 -12
  347. package/dist/esm/kol-form.entry.js +12 -12
  348. package/dist/esm/kol-heading.entry.js +1 -1
  349. package/dist/esm/kol-icon.entry.js +3 -3
  350. package/dist/esm/kol-image.entry.js +1 -1
  351. package/dist/esm/kol-input-checkbox.entry.js +17 -17
  352. package/dist/esm/kol-input-color.entry.js +18 -18
  353. package/dist/esm/kol-input-date.entry.js +18 -18
  354. package/dist/esm/kol-input-email.entry.js +20 -20
  355. package/dist/esm/kol-input-file.entry.js +17 -17
  356. package/dist/esm/kol-input-number.entry.js +18 -18
  357. package/dist/esm/kol-input-password.entry.js +22 -22
  358. package/dist/esm/kol-input-password.entry.js.map +1 -1
  359. package/dist/esm/kol-input-radio.entry.js +17 -17
  360. package/dist/esm/kol-input-range.entry.js +18 -18
  361. package/dist/esm/kol-input-text.entry.js +20 -20
  362. package/dist/esm/kol-kolibri.entry.js +2 -2
  363. package/dist/esm/kol-link-button.entry.js +10 -10
  364. package/dist/esm/kol-link.entry.js +10 -10
  365. package/dist/esm/kol-meter.entry.js +1 -1
  366. package/dist/esm/kol-modal.entry.js +13 -13
  367. package/dist/esm/kol-nav.entry.js +13 -13
  368. package/dist/esm/kol-pagination.entry.js +18 -18
  369. package/dist/esm/kol-popover-button.entry.js +12 -13
  370. package/dist/esm/kol-popover-button.entry.js.map +1 -1
  371. package/dist/esm/kol-progress.entry.js +1 -1
  372. package/dist/esm/kol-quote.entry.js +1 -1
  373. package/dist/esm/kol-select.entry.js +17 -17
  374. package/dist/esm/kol-single-select.entry.js +18 -18
  375. package/dist/esm/kol-skeleton.entry.js +2 -2
  376. package/dist/esm/kol-skip-nav.entry.js +9 -9
  377. package/dist/esm/kol-spin.entry.js +3 -3
  378. package/dist/esm/kol-split-button.entry.js +12 -12
  379. package/dist/esm/kol-table-stateful.entry.js +25 -25
  380. package/dist/esm/kol-table-stateless.entry.js +19 -19
  381. package/dist/esm/kol-tabs.entry.js +9 -9
  382. package/dist/esm/kol-textarea.entry.js +20 -20
  383. package/dist/esm/kol-textarea.entry.js.map +1 -1
  384. package/dist/esm/kol-toast-container.entry.js +11 -11
  385. package/dist/esm/kol-toolbar.entry.js +33 -14
  386. package/dist/esm/kol-toolbar.entry.js.map +1 -1
  387. package/dist/esm/kol-tooltip-wc.entry.js +4 -4
  388. package/dist/esm/kol-tree-item.entry.js +9 -9
  389. package/dist/esm/kol-tree.entry.js +1 -1
  390. package/dist/esm/kol-version.entry.js +10 -10
  391. package/dist/esm/kolibri.js +3 -3
  392. package/dist/esm/loader.js +3 -3
  393. package/dist/esm/{resolve-props-DJxTzf-G.js → resolve-props-CjBvvXId.js} +3 -3
  394. package/dist/{kolibri/resolve-props-DJxTzf-G.js.map → esm/resolve-props-CjBvvXId.js.map} +1 -1
  395. package/dist/esm/{scroll-lock-BN6ZnBdc.js → scroll-lock-6SV-XFXR.js} +3 -3
  396. package/dist/{kolibri/scroll-lock-BN6ZnBdc.js.map → esm/scroll-lock-6SV-XFXR.js.map} +1 -1
  397. package/dist/esm/{suggestions-DlpHvEGv.js → suggestions-BYMmW1aV.js} +4 -4
  398. package/dist/esm/{suggestions-DlpHvEGv.js.map → suggestions-BYMmW1aV.js.map} +1 -1
  399. package/dist/esm/test-component.entry.js +1 -1
  400. package/dist/esm/{toggle-handler-Xex3lIll.js → toggle-handler-D-yalcds.js} +5 -5
  401. package/dist/{kolibri/toggle-handler-Xex3lIll.js.map → esm/toggle-handler-D-yalcds.js.map} +1 -1
  402. package/dist/kolibri/{Heading-DXl16qig.js → Heading-NHB1reiQ.js} +2 -2
  403. package/dist/kolibri/{Heading-DXl16qig.js.map → Heading-NHB1reiQ.js.map} +1 -1
  404. package/dist/kolibri/api-BAEPnyL7.js +5 -0
  405. package/dist/{esm/api-C8TfIYlY.js.map → kolibri/api-BAEPnyL7.js.map} +1 -1
  406. package/dist/kolibri/api-CagcODCX.js +5 -0
  407. package/dist/{esm/api-BA-AFr5H.js.map → kolibri/api-CagcODCX.js.map} +1 -1
  408. package/dist/kolibri/app-globals-CwlOH1sO.js +5 -0
  409. package/dist/kolibri/{app-globals-lFdBwFG2.js.map → app-globals-CwlOH1sO.js.map} +1 -1
  410. package/dist/kolibri/base-BFU17cMm.js +5 -0
  411. package/dist/{esm/base-BpqjfzG1.js.map → kolibri/base-BFU17cMm.js.map} +1 -1
  412. package/dist/kolibri/{base-D8GcFhvD.js → base-BpKxLJ6r.js} +2 -2
  413. package/dist/{esm/base-D8GcFhvD.js.map → kolibri/base-BpKxLJ6r.js.map} +1 -1
  414. package/dist/kolibri/{base-DiSQvfGU.js → base-Cm_c8klt.js} +2 -2
  415. package/dist/kolibri/{base-DiSQvfGU.js.map → base-Cm_c8klt.js.map} +1 -1
  416. package/dist/kolibri/{base-B5F8ROuQ.js → base-DitGpYOV.js} +2 -2
  417. package/dist/{esm/base-B5F8ROuQ.js.map → kolibri/base-DitGpYOV.js.map} +1 -1
  418. package/dist/kolibri/base-web-component-6J5sCsnZ.js +5 -0
  419. package/dist/kolibri/base-web-component-6J5sCsnZ.js.map +1 -0
  420. package/dist/kolibri/{base-web-component-BozlJoj7.js → base-web-component-BFCVvyYG.js} +2 -2
  421. package/dist/kolibri/{base-web-component-BozlJoj7.js.map → base-web-component-BFCVvyYG.js.map} +1 -1
  422. package/dist/kolibri/{behavior-BuNqmjz8.js → behavior-CH_2MMuX.js} +2 -2
  423. package/dist/kolibri/{behavior-BuNqmjz8.js.map → behavior-CH_2MMuX.js.map} +1 -1
  424. package/dist/kolibri/{color-Du3Ft0XV.js → color-QYuhlVFz.js} +2 -2
  425. package/dist/kolibri/{color-Du3Ft0XV.js.map → color-QYuhlVFz.js.map} +1 -1
  426. package/dist/kolibri/{component-C9DexidK.js → component-BF8FPuIW.js} +2 -2
  427. package/dist/kolibri/{component-C9DexidK.js.map → component-BF8FPuIW.js.map} +1 -1
  428. package/dist/kolibri/component-Ba4gjLBG.js +5 -0
  429. package/dist/{esm/component-Da5dJMKj.js.map → kolibri/component-Ba4gjLBG.js.map} +1 -1
  430. package/dist/kolibri/{component-BjH8s4-t.js → component-BpOMe842.js} +2 -2
  431. package/dist/{esm/component-BjH8s4-t.js.map → kolibri/component-BpOMe842.js.map} +1 -1
  432. package/dist/kolibri/component-C3sXiwbS.js +5 -0
  433. package/dist/kolibri/{component-BxKN0JbT.js.map → component-C3sXiwbS.js.map} +1 -1
  434. package/dist/kolibri/component-C5BFsKau.js +5 -0
  435. package/dist/kolibri/{component-Bd7PXqOG.js.map → component-C5BFsKau.js.map} +1 -1
  436. package/dist/kolibri/component-CBpYh2q-.js +5 -0
  437. package/dist/kolibri/{component-C3aqLFK2.js.map → component-CBpYh2q-.js.map} +1 -1
  438. package/dist/kolibri/{component-D_58mw87.js → component-C_d54ujF.js} +2 -2
  439. package/dist/{esm/component-D_58mw87.js.map → kolibri/component-C_d54ujF.js.map} +1 -1
  440. package/dist/kolibri/component-CvCfEqSE.js +5 -0
  441. package/dist/kolibri/{component-xrrwVuiI.js.map → component-CvCfEqSE.js.map} +1 -1
  442. package/dist/kolibri/{component-CWGVLsSH.js → component-DZbJLUju.js} +2 -2
  443. package/dist/{esm/component-CWGVLsSH.js.map → kolibri/component-DZbJLUju.js.map} +1 -1
  444. package/dist/kolibri/{component-BKOep2WQ.js → component-Dg6TIbeY.js} +2 -2
  445. package/dist/{esm/component-BKOep2WQ.js.map → kolibri/component-Dg6TIbeY.js.map} +1 -1
  446. package/dist/kolibri/{component-DD5QqT5m.js → component-Do9rjnte.js} +2 -2
  447. package/dist/{esm/component-DD5QqT5m.js.map → kolibri/component-Do9rjnte.js.map} +1 -1
  448. package/dist/kolibri/component-DzoBgfR4.js +5 -0
  449. package/dist/kolibri/{component-De6Do_gt.js.map → component-DzoBgfR4.js.map} +1 -1
  450. package/dist/kolibri/contrast-DMN9saXP.js +5 -0
  451. package/dist/kolibri/contrast-DMN9saXP.js.map +1 -0
  452. package/dist/kolibri/{dev.utils-CYtV9X0K.js → dev.utils-CJMVCYWh.js} +2 -2
  453. package/dist/kolibri/{dev.utils-CYtV9X0K.js.map → dev.utils-CJMVCYWh.js.map} +1 -1
  454. package/dist/kolibri/{devtools-B0qRaQdp.js → devtools-rRHULXVr.js} +2 -2
  455. package/dist/{esm/devtools-B0qRaQdp.js.map → kolibri/devtools-rRHULXVr.js.map} +1 -1
  456. package/dist/kolibri/field-control-DXxCMXvx.js +5 -0
  457. package/dist/{esm/field-control-C5hjw2Rb.js.map → kolibri/field-control-DXxCMXvx.js.map} +1 -1
  458. package/dist/kolibri/{group-2hP8qbvk.js → group-CI4sSgiu.js} +2 -2
  459. package/dist/kolibri/{group-2hP8qbvk.js.map → group-CI4sSgiu.js.map} +1 -1
  460. package/dist/kolibri/{index-DsCeQ9Ys.js → index-DQdQBwMc.js} +2 -2
  461. package/dist/{esm/index-DsCeQ9Ys.js.map → kolibri/index-DQdQBwMc.js.map} +1 -1
  462. package/dist/kolibri/{input-Dp5NBocQ.js → input-CDtJZ2sy.js} +2 -2
  463. package/dist/kolibri/{input-Dp5NBocQ.js.map → input-CDtJZ2sy.js.map} +1 -1
  464. package/dist/kolibri/input-container-DROwwh7_.js +5 -0
  465. package/dist/kolibri/{input-container-QA8-0_0p.js.map → input-container-DROwwh7_.js.map} +1 -1
  466. package/dist/kolibri/item-C6p5wW-z.js +5 -0
  467. package/dist/kolibri/{item-CaxJw3ad.js.map → item-C6p5wW-z.js.map} +1 -1
  468. package/dist/kolibri/{item-CXyolUj2.js → item-CHP-bw8Q.js} +2 -2
  469. package/dist/{esm/item-CXyolUj2.js.map → kolibri/item-CHP-bw8Q.js.map} +1 -1
  470. package/dist/kolibri/item-Cbi_ZY6o.js +5 -0
  471. package/dist/kolibri/{item-DY0fVVnj.js.map → item-Cbi_ZY6o.js.map} +1 -1
  472. package/dist/kolibri/{item-BIjqEkyy.js → item-ZjrNIhfW.js} +2 -2
  473. package/dist/{esm/item-BIjqEkyy.js.map → kolibri/item-ZjrNIhfW.js.map} +1 -1
  474. package/dist/kolibri/kol-abbr.entry.js +1 -1
  475. package/dist/kolibri/kol-accordion.entry.js +1 -1
  476. package/dist/kolibri/kol-alert.entry.js +1 -1
  477. package/dist/kolibri/kol-avatar.entry.js +1 -1
  478. package/dist/kolibri/kol-badge.entry.js +1 -1
  479. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  480. package/dist/kolibri/kol-button-link.entry.js +1 -1
  481. package/dist/kolibri/kol-button.entry.js +1 -1
  482. package/dist/kolibri/kol-card.entry.js +1 -1
  483. package/dist/kolibri/kol-click-button.entry.js +1 -1
  484. package/dist/kolibri/kol-combobox.entry.js +1 -1
  485. package/dist/kolibri/kol-combobox.entry.js.map +1 -1
  486. package/dist/kolibri/kol-details.entry.js +1 -1
  487. package/dist/kolibri/kol-dialog.entry.js +1 -1
  488. package/dist/kolibri/kol-drawer.entry.js +1 -1
  489. package/dist/kolibri/kol-form.entry.js +1 -1
  490. package/dist/kolibri/kol-heading.entry.js +1 -1
  491. package/dist/kolibri/kol-icon.entry.js +1 -1
  492. package/dist/kolibri/kol-image.entry.js +1 -1
  493. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  494. package/dist/kolibri/kol-input-color.entry.js +1 -1
  495. package/dist/kolibri/kol-input-date.entry.js +1 -1
  496. package/dist/kolibri/kol-input-email.entry.js +1 -1
  497. package/dist/kolibri/kol-input-file.entry.js +1 -1
  498. package/dist/kolibri/kol-input-number.entry.js +1 -1
  499. package/dist/kolibri/kol-input-password.entry.esm.js.map +1 -1
  500. package/dist/kolibri/kol-input-password.entry.js +1 -1
  501. package/dist/kolibri/kol-input-password.entry.js.map +1 -1
  502. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  503. package/dist/kolibri/kol-input-range.entry.js +1 -1
  504. package/dist/kolibri/kol-input-text.entry.js +1 -1
  505. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  506. package/dist/kolibri/kol-link-button.entry.js +1 -1
  507. package/dist/kolibri/kol-link.entry.js +1 -1
  508. package/dist/kolibri/kol-meter.entry.js +1 -1
  509. package/dist/kolibri/kol-modal.entry.js +1 -1
  510. package/dist/kolibri/kol-nav.entry.js +1 -1
  511. package/dist/kolibri/kol-pagination.entry.js +1 -1
  512. package/dist/kolibri/kol-popover-button.entry.esm.js.map +1 -1
  513. package/dist/kolibri/kol-popover-button.entry.js +1 -1
  514. package/dist/kolibri/kol-popover-button.entry.js.map +1 -1
  515. package/dist/kolibri/kol-progress.entry.js +1 -1
  516. package/dist/kolibri/kol-quote.entry.js +1 -1
  517. package/dist/kolibri/kol-select.entry.js +1 -1
  518. package/dist/kolibri/kol-single-select.entry.js +1 -1
  519. package/dist/kolibri/kol-skeleton.entry.js +1 -1
  520. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  521. package/dist/kolibri/kol-spin.entry.js +1 -1
  522. package/dist/kolibri/kol-split-button.entry.js +1 -1
  523. package/dist/kolibri/kol-table-stateful.entry.js +1 -1
  524. package/dist/kolibri/kol-table-stateless.entry.js +1 -1
  525. package/dist/kolibri/kol-tabs.entry.js +1 -1
  526. package/dist/kolibri/kol-textarea.entry.esm.js.map +1 -1
  527. package/dist/kolibri/kol-textarea.entry.js +1 -1
  528. package/dist/kolibri/kol-textarea.entry.js.map +1 -1
  529. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  530. package/dist/kolibri/kol-toolbar.entry.esm.js.map +1 -1
  531. package/dist/kolibri/kol-toolbar.entry.js +1 -1
  532. package/dist/kolibri/kol-toolbar.entry.js.map +1 -1
  533. package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
  534. package/dist/kolibri/kol-tree-item.entry.js +1 -1
  535. package/dist/kolibri/kol-tree.entry.js +1 -1
  536. package/dist/kolibri/kol-version.entry.js +1 -1
  537. package/dist/kolibri/kol-version.entry.js.map +1 -1
  538. package/dist/kolibri/kolibri.esm.js +1 -1
  539. package/dist/kolibri/resolve-props-CjBvvXId.js +5 -0
  540. package/dist/{esm/resolve-props-DJxTzf-G.js.map → kolibri/resolve-props-CjBvvXId.js.map} +1 -1
  541. package/dist/kolibri/{scroll-lock-BN6ZnBdc.js → scroll-lock-6SV-XFXR.js} +2 -2
  542. package/dist/{esm/scroll-lock-BN6ZnBdc.js.map → kolibri/scroll-lock-6SV-XFXR.js.map} +1 -1
  543. package/dist/kolibri/suggestions-BYMmW1aV.js +5 -0
  544. package/dist/kolibri/{suggestions-DlpHvEGv.js.map → suggestions-BYMmW1aV.js.map} +1 -1
  545. package/dist/kolibri/test-component.entry.js +1 -1
  546. package/dist/kolibri/toggle-handler-D-yalcds.js +5 -0
  547. package/dist/{esm/toggle-handler-Xex3lIll.js.map → kolibri/toggle-handler-D-yalcds.js.map} +1 -1
  548. package/dist/types/components/toolbar/component.d.ts +2 -2
  549. package/dist/types/components.d.ts +0 -2
  550. package/dist/types/internal/functional-components/form-field/textarea.d.ts +1 -0
  551. package/dist/types/internal/functional-components/toolbar/api.d.ts +2 -2
  552. package/dist/types/internal/functional-components/toolbar/item.d.ts +5 -2
  553. package/dist/types/schema/props/toolbar-items.d.ts +3 -1
  554. package/doc/popover-button.md +1 -1
  555. package/package.json +3 -3
  556. package/dist/cjs/base-web-component-C8MLLGxi.js.map +0 -1
  557. package/dist/cjs/contrast-kLMuDQLl.js.map +0 -1
  558. package/dist/esm/base-web-component-CkaKv7O0.js.map +0 -1
  559. package/dist/esm/contrast-BKAJJL2K.js.map +0 -1
  560. package/dist/kolibri/api-BA-AFr5H.js +0 -5
  561. package/dist/kolibri/api-C8TfIYlY.js +0 -5
  562. package/dist/kolibri/app-globals-lFdBwFG2.js +0 -5
  563. package/dist/kolibri/base-BpqjfzG1.js +0 -5
  564. package/dist/kolibri/base-web-component-CkaKv7O0.js +0 -5
  565. package/dist/kolibri/base-web-component-CkaKv7O0.js.map +0 -1
  566. package/dist/kolibri/component-Bd7PXqOG.js +0 -5
  567. package/dist/kolibri/component-BxKN0JbT.js +0 -5
  568. package/dist/kolibri/component-C3aqLFK2.js +0 -5
  569. package/dist/kolibri/component-Da5dJMKj.js +0 -5
  570. package/dist/kolibri/component-De6Do_gt.js +0 -5
  571. package/dist/kolibri/component-xrrwVuiI.js +0 -5
  572. package/dist/kolibri/contrast-BKAJJL2K.js +0 -5
  573. package/dist/kolibri/contrast-BKAJJL2K.js.map +0 -1
  574. package/dist/kolibri/field-control-C5hjw2Rb.js +0 -5
  575. package/dist/kolibri/input-container-QA8-0_0p.js +0 -5
  576. package/dist/kolibri/item-CaxJw3ad.js +0 -5
  577. package/dist/kolibri/item-DY0fVVnj.js +0 -5
  578. package/dist/kolibri/resolve-props-DJxTzf-G.js +0 -5
  579. package/dist/kolibri/suggestions-DlpHvEGv.js +0 -5
  580. package/dist/kolibri/toggle-handler-Xex3lIll.js +0 -5
@@ -1 +1 @@
1
- {"version":3,"file":"resolve-props-DJxTzf-G.js","sources":["src/internal/functional-components/link/resolve-props.ts"],"sourcesContent":["import type { AriaOwnsPropType, CustomClassPropType, LinkProps, VariantClassNamePropType } from '../../../schema';\nimport { validateAccessAndShortKey } from '../../../schema/validators/access-and-short-key';\nimport {\n\taccessKeyProp,\n\tariaControlsProp,\n\tariaCurrentValueProp,\n\tariaDescriptionProp,\n\tariaExpandedProp,\n\tariaOwnsProp,\n\tcustomClassProp,\n\tdisabledProp,\n\tdownloadProp,\n\thideLabelProp,\n\threfProp,\n\tinlineProp,\n\tlabelWithExpertSlotProp,\n\tlinkCallbacksProp,\n\tlinkRoleProp,\n\tlinkTargetProp,\n\tshortKeyProp,\n\tspanIconsProp,\n\ttabIndexProp,\n\ttooltipAlignProp,\n\tvariantProp,\n} from '../../props';\nimport type { ResolvedProps, StrictFields } from '../generic-types';\nimport { buildDefaultPropsFromConfig } from '../props-from-config';\nimport type { LinkApi } from './api';\nimport { linkPropsConfig } from './api';\n\n/** The fully normalized render props `LinkFC` expects. */\nexport type ResolvedLinkProps = StrictFields<ResolvedProps<LinkApi>>;\n\n/**\n * An embedded link's configuration: the public `LinkProps` plus the internal props that components\n * embedding `LinkFC` may set.\n */\nexport type EmbeddedLinkProps = LinkProps & {\n\t_ariaExpanded?: boolean;\n\t_ariaOwns?: AriaOwnsPropType;\n\t_customClass?: CustomClassPropType;\n\t_variant?: VariantClassNamePropType;\n};\n\n/**\n * The defaults the link elements declare on their `@Prop` fields. `inlineProp` and\n * `tooltipAlignProp` are shared with the button, so they are restated here rather than relied on.\n */\nconst LINK_ELEMENT_DEFAULTS = {\n\tdisabled: false,\n\thideLabel: false,\n\tinline: true,\n\ttooltipAlign: 'right',\n} as const;\n\n/**\n * Normalizes an embedded link's props into the render props `LinkFC` expects — the counterpart\n * of `resolveButtonProps` for a component rendering a link inside its own boundary.\n *\n * Props only. Everything stateful belongs to the composing web component: the `TooltipBehavior`,\n * the click handler dispatching the public DOM event, the anchor ref and the `ariaCurrent`,\n * `ariaDescriptionId` and `expertSlot` states.\n *\n * @param props - The embedded link's configuration, as handed to the host component.\n */\nexport function resolveLinkProps(props: EmbeddedLinkProps): ResolvedLinkProps {\n\tconst resolved = buildDefaultPropsFromConfig(linkPropsConfig) as ResolvedLinkProps;\n\tconst set = <K extends keyof ResolvedLinkProps>(key: K) => {\n\t\treturn (value: ResolvedLinkProps[K]): void => {\n\t\t\tresolved[key] = value;\n\t\t};\n\t};\n\n\threfProp.apply(props._href, set('href'));\n\taccessKeyProp.apply(props._accessKey, set('accessKey'));\n\tariaControlsProp.apply(props._ariaControls, set('ariaControls'));\n\tariaCurrentValueProp.apply(props._ariaCurrentValue, set('ariaCurrentValue'));\n\tariaDescriptionProp.apply(props._ariaDescription, set('ariaDescription'));\n\tariaExpandedProp.apply(props._ariaExpanded, set('ariaExpanded'));\n\tariaOwnsProp.apply(props._ariaOwns, set('ariaOwns'));\n\tcustomClassProp.apply(props._customClass, set('customClass'));\n\tdisabledProp.apply(props._disabled ?? LINK_ELEMENT_DEFAULTS.disabled, set('disabled'));\n\tdownloadProp.apply(props._download, set('download'));\n\thideLabelProp.apply(props._hideLabel ?? LINK_ELEMENT_DEFAULTS.hideLabel, set('hideLabel'));\n\tspanIconsProp.apply(props._icons, set('icons'));\n\tinlineProp.apply(props._inline ?? LINK_ELEMENT_DEFAULTS.inline, set('inline'));\n\tlabelWithExpertSlotProp.apply(props._label, set('label'));\n\tlinkCallbacksProp.apply(props._on, set('on'));\n\tlinkRoleProp.apply(props._role, set('role'));\n\tshortKeyProp.apply(props._shortKey, set('shortKey'));\n\tlinkTargetProp.apply(props._target, set('target'));\n\ttooltipAlignProp.apply(props._tooltipAlign ?? LINK_ELEMENT_DEFAULTS.tooltipAlign, set('tooltipAlign'));\n\tvariantProp.apply(props._variant, set('variant'));\n\n\t// An unset tabindex must not render as `tabindex=\"0\"` — links are natively tabbable and the\n\t// attribute would draw focus outlines the element never had. The props config seeds `0`, so\n\t// anything but an explicit number clears it again.\n\tif (typeof props._tabIndex === 'number') {\n\t\ttabIndexProp.apply(props._tabIndex, set('tabIndex'));\n\t} else {\n\t\tresolved.tabIndex = undefined as unknown as ResolvedLinkProps['tabIndex'];\n\t}\n\n\tvalidateAccessAndShortKey(props._accessKey, props._shortKey);\n\n\treturn resolved;\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;AAgDA,MAAM,qBAAqB,GAAG;AAC7B,IAAA,QAAQ,EAAE,KAAK;AACf,IAAA,SAAS,EAAE,KAAK;AAChB,IAAA,MAAM,EAAE,IAAI;AACZ,IAAA,YAAY,EAAE,OAAO;CACZ;AAYJ,SAAU,gBAAgB,CAAC,KAAwB,EAAA;;AACxD,IAAA,MAAM,QAAQ,GAAG,2BAA2B,CAAC,eAAe,CAAsB;AAClF,IAAA,MAAM,GAAG,GAAG,CAAoC,GAAM,KAAI;QACzD,OAAO,CAAC,KAA2B,KAAU;AAC5C,YAAA,QAAQ,CAAC,GAAG,CAAC,GAAG,KAAK;AACtB,SAAC;AACF,KAAC;AAED,IAAA,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;AACxC,IAAA,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC;AACvD,IAAA,gBAAgB,CAAC,KAAK,CAAC,KAAK,CAAC,aAAa,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;AAChE,IAAA,oBAAoB,CAAC,KAAK,CAAC,KAAK,CAAC,iBAAiB,EAAE,GAAG,CAAC,kBAAkB,CAAC,CAAC;AAC5E,IAAA,mBAAmB,CAAC,KAAK,CAAC,KAAK,CAAC,gBAAgB,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAC;AACzE,IAAA,gBAAgB,CAAC,KAAK,CAAC,KAAK,CAAC,aAAa,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;AAChE,IAAA,YAAY,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC;AACpD,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AAC,OAAO,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;AAClD,IAAA,gBAAgB,CAAC,KAAK,CAAC,CAAA,EAAA,GAAA,KAAK,CAAC,aAAa,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,EAAA,GAAI,qBAAqB,CAAC,YAAY,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;AACtG,IAAA,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC;AAKjD,IAAA,IAAI,OAAO,KAAK,CAAC,SAAS,KAAK,QAAQ,EAAE;AACxC,QAAA,YAAY,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC;;SAC9C;AACN,QAAA,QAAQ,CAAC,QAAQ,GAAG,SAAqD;;IAG1E,yBAAyB,CAAC,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC;AAE5D,IAAA,OAAO,QAAQ;AAChB;;;;"}
1
+ {"version":3,"file":"resolve-props-CjBvvXId.js","sources":["src/internal/functional-components/link/resolve-props.ts"],"sourcesContent":["import type { AriaOwnsPropType, CustomClassPropType, LinkProps, VariantClassNamePropType } from '../../../schema';\nimport { validateAccessAndShortKey } from '../../../schema/validators/access-and-short-key';\nimport {\n\taccessKeyProp,\n\tariaControlsProp,\n\tariaCurrentValueProp,\n\tariaDescriptionProp,\n\tariaExpandedProp,\n\tariaOwnsProp,\n\tcustomClassProp,\n\tdisabledProp,\n\tdownloadProp,\n\thideLabelProp,\n\threfProp,\n\tinlineProp,\n\tlabelWithExpertSlotProp,\n\tlinkCallbacksProp,\n\tlinkRoleProp,\n\tlinkTargetProp,\n\tshortKeyProp,\n\tspanIconsProp,\n\ttabIndexProp,\n\ttooltipAlignProp,\n\tvariantProp,\n} from '../../props';\nimport type { ResolvedProps, StrictFields } from '../generic-types';\nimport { buildDefaultPropsFromConfig } from '../props-from-config';\nimport type { LinkApi } from './api';\nimport { linkPropsConfig } from './api';\n\n/** The fully normalized render props `LinkFC` expects. */\nexport type ResolvedLinkProps = StrictFields<ResolvedProps<LinkApi>>;\n\n/**\n * An embedded link's configuration: the public `LinkProps` plus the internal props that components\n * embedding `LinkFC` may set.\n */\nexport type EmbeddedLinkProps = LinkProps & {\n\t_ariaExpanded?: boolean;\n\t_ariaOwns?: AriaOwnsPropType;\n\t_customClass?: CustomClassPropType;\n\t_variant?: VariantClassNamePropType;\n};\n\n/**\n * The defaults the link elements declare on their `@Prop` fields. `inlineProp` and\n * `tooltipAlignProp` are shared with the button, so they are restated here rather than relied on.\n */\nconst LINK_ELEMENT_DEFAULTS = {\n\tdisabled: false,\n\thideLabel: false,\n\tinline: true,\n\ttooltipAlign: 'right',\n} as const;\n\n/**\n * Normalizes an embedded link's props into the render props `LinkFC` expects — the counterpart\n * of `resolveButtonProps` for a component rendering a link inside its own boundary.\n *\n * Props only. Everything stateful belongs to the composing web component: the `TooltipBehavior`,\n * the click handler dispatching the public DOM event, the anchor ref and the `ariaCurrent`,\n * `ariaDescriptionId` and `expertSlot` states.\n *\n * @param props - The embedded link's configuration, as handed to the host component.\n */\nexport function resolveLinkProps(props: EmbeddedLinkProps): ResolvedLinkProps {\n\tconst resolved = buildDefaultPropsFromConfig(linkPropsConfig) as ResolvedLinkProps;\n\tconst set = <K extends keyof ResolvedLinkProps>(key: K) => {\n\t\treturn (value: ResolvedLinkProps[K]): void => {\n\t\t\tresolved[key] = value;\n\t\t};\n\t};\n\n\threfProp.apply(props._href, set('href'));\n\taccessKeyProp.apply(props._accessKey, set('accessKey'));\n\tariaControlsProp.apply(props._ariaControls, set('ariaControls'));\n\tariaCurrentValueProp.apply(props._ariaCurrentValue, set('ariaCurrentValue'));\n\tariaDescriptionProp.apply(props._ariaDescription, set('ariaDescription'));\n\tariaExpandedProp.apply(props._ariaExpanded, set('ariaExpanded'));\n\tariaOwnsProp.apply(props._ariaOwns, set('ariaOwns'));\n\tcustomClassProp.apply(props._customClass, set('customClass'));\n\tdisabledProp.apply(props._disabled ?? LINK_ELEMENT_DEFAULTS.disabled, set('disabled'));\n\tdownloadProp.apply(props._download, set('download'));\n\thideLabelProp.apply(props._hideLabel ?? LINK_ELEMENT_DEFAULTS.hideLabel, set('hideLabel'));\n\tspanIconsProp.apply(props._icons, set('icons'));\n\tinlineProp.apply(props._inline ?? LINK_ELEMENT_DEFAULTS.inline, set('inline'));\n\tlabelWithExpertSlotProp.apply(props._label, set('label'));\n\tlinkCallbacksProp.apply(props._on, set('on'));\n\tlinkRoleProp.apply(props._role, set('role'));\n\tshortKeyProp.apply(props._shortKey, set('shortKey'));\n\tlinkTargetProp.apply(props._target, set('target'));\n\ttooltipAlignProp.apply(props._tooltipAlign ?? LINK_ELEMENT_DEFAULTS.tooltipAlign, set('tooltipAlign'));\n\tvariantProp.apply(props._variant, set('variant'));\n\n\t// An unset tabindex must not render as `tabindex=\"0\"` — links are natively tabbable and the\n\t// attribute would draw focus outlines the element never had. The props config seeds `0`, so\n\t// anything but an explicit number clears it again.\n\tif (typeof props._tabIndex === 'number') {\n\t\ttabIndexProp.apply(props._tabIndex, set('tabIndex'));\n\t} else {\n\t\tresolved.tabIndex = undefined as unknown as ResolvedLinkProps['tabIndex'];\n\t}\n\n\tvalidateAccessAndShortKey(props._accessKey, props._shortKey);\n\n\treturn resolved;\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;AAgDA,MAAM,qBAAqB,GAAG;AAC7B,IAAA,QAAQ,EAAE,KAAK;AACf,IAAA,SAAS,EAAE,KAAK;AAChB,IAAA,MAAM,EAAE,IAAI;AACZ,IAAA,YAAY,EAAE,OAAO;CACZ;AAYJ,SAAU,gBAAgB,CAAC,KAAwB,EAAA;;AACxD,IAAA,MAAM,QAAQ,GAAG,2BAA2B,CAAC,eAAe,CAAsB;AAClF,IAAA,MAAM,GAAG,GAAG,CAAoC,GAAM,KAAI;QACzD,OAAO,CAAC,KAA2B,KAAU;AAC5C,YAAA,QAAQ,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G,SAAqD;;IAG1E,yBAAyB,CAAC,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC;AAE5D,IAAA,OAAO,QAAQ;AAChB;;;;"}
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{h as e}from"./index-DsCeQ9Ys.js";import{b as n}from"./bem-registry-CX5kvaqt.js";import{c as o}from"./clsx-COFh-Vc8.js";const l=n.forBlock("kol-dialog");const d=n.forBlock("kol-modal");const i=e=>o(l(),d(),l(e),d(e));const t=(n,l)=>{const{blockClass:d,class:i,handleCancel:t,handleClose:a,label:s,labelledBy:r,modal:f,refDialog:c,width:u}=n;return e("dialog",{"aria-label":r?undefined:s,"aria-labelledby":r,"aria-modal":f?"true":"false",class:o(d,i),onCancel:t,onClose:a,ref:c,style:u?{width:u}:undefined},l)};const a=new Set;let s=null;let r=null;function f(e){if(typeof document==="undefined"||typeof window==="undefined"){return}if(a.has(e)){return}if(a.size===0){const e=document.documentElement;s=e.style.getPropertyValue("overflow");r=e.style.getPropertyValue("padding-right");const n=window.innerWidth-e.clientWidth;if(n>0){const o=Number.parseFloat(window.getComputedStyle(e).paddingRight)||0;e.style.setProperty("padding-right",`${o+n}px`)}e.style.setProperty("overflow","hidden")}a.add(e)}function c(e){if(typeof document==="undefined"||typeof window==="undefined"){return}if(!a.delete(e)){return}if(a.size===0){const e=document.documentElement;if(s){e.style.setProperty("overflow",s)}else{e.style.removeProperty("overflow")}if(r){e.style.setProperty("padding-right",r)}else{e.style.removeProperty("padding-right")}s=null;r=null}}export{t as D,i as d,f as l,c as u};
5
- //# sourceMappingURL=scroll-lock-BN6ZnBdc.js.map
4
+ import{h as e}from"./index-DQdQBwMc.js";import{b as n}from"./bem-registry-CX5kvaqt.js";import{c as o}from"./clsx-COFh-Vc8.js";const l=n.forBlock("kol-dialog");const d=n.forBlock("kol-modal");const i=e=>o(l(),d(),l(e),d(e));const t=(n,l)=>{const{blockClass:d,class:i,handleCancel:t,handleClose:a,label:r,labelledBy:s,modal:f,refDialog:c,width:u}=n;return e("dialog",{"aria-label":s?undefined:r,"aria-labelledby":s,"aria-modal":f?"true":"false",class:o(d,i),onCancel:t,onClose:a,ref:c,style:u?{width:u}:undefined},l)};const a=new Set;let r=null;let s=null;function f(e){if(typeof document==="undefined"||typeof window==="undefined"){return}if(a.has(e)){return}if(a.size===0){const e=document.documentElement;r=e.style.getPropertyValue("overflow");s=e.style.getPropertyValue("padding-right");const n=window.innerWidth-e.clientWidth;if(n>0){const o=Number.parseFloat(window.getComputedStyle(e).paddingRight)||0;e.style.setProperty("padding-right",`${o+n}px`)}e.style.setProperty("overflow","hidden")}a.add(e)}function c(e){if(typeof document==="undefined"||typeof window==="undefined"){return}if(!a.delete(e)){return}if(a.size===0){const e=document.documentElement;if(r){e.style.setProperty("overflow",r)}else{e.style.removeProperty("overflow")}if(s){e.style.setProperty("padding-right",s)}else{e.style.removeProperty("padding-right")}r=null;s=null}}export{t as D,i as d,f as l,c as u};
5
+ //# sourceMappingURL=scroll-lock-6SV-XFXR.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"scroll-lock-BN6ZnBdc.js","sources":["src/internal/functional-components/dialog/component.tsx","src/utils/scroll-lock.ts"],"sourcesContent":["import type { FunctionalComponent as FC } from '@stencil/core';\nimport { h } from '@stencil/core';\n\nimport { bem } from '../../../schema/bem-registry';\nimport type { ModalVariantPropType } from '../../../schema/props/variant/modal';\nimport clsx from '../../../utils/clsx';\nimport type { FunctionalComponentProps } from '../generic-types';\nimport type { DialogApi } from './api';\n\nconst dialogBem = bem.forBlock('kol-dialog');\nconst modalBem = bem.forBlock('kol-modal');\n\n/**\n * The dialog's own block classes: `kol-dialog`, the deprecated `kol-modal` alias, and the variant\n * of both as an element-style suffix. Every theme addresses all four names, so they are rendered\n * verbatim.\n */\nexport const dialogBlockClass = (variant: ModalVariantPropType): string => clsx(dialogBem(), modalBem(), dialogBem(variant), modalBem(variant));\n\nexport type DialogFCProps = Pick<FunctionalComponentProps<DialogApi>, 'class' | 'handleCancel' | 'handleClose' | 'label' | 'modal' | 'refDialog'> & {\n\t/**\n\t * Class names of the block this dialog belongs to. `kol-dialog` renders its own block, the\n\t * deprecated `kol-modal` alias and the variant of both; `kol-drawer` renders its\n\t * `kol-drawer__dialog` element class. Every theme styles the two differently — a drawer that\n\t * carried the dialog classes would inherit the dialog's background, radius and backdrop — so\n\t * neither is hard-coded here.\n\t */\n\tblockClass: string;\n\t/**\n\t * DOM id of the heading that labels the dialog. Without one the dialog falls back to\n\t * `aria-label`, which is what the blank variant needs: it renders no heading.\n\t */\n\tlabelledBy?: string;\n\t/** Width of the dialog. Left unset, the dialog keeps its intrinsic size. */\n\twidth?: string;\n};\n\n/**\n * The native `<dialog>` shell, shared by `kol-dialog`, the deprecated `kol-modal`, `kol-drawer` and\n * the settings menu of the table.\n *\n * It owns the element that provides `showModal()`, the top layer and the backdrop — and nothing\n * else. What the dialog contains is the consumer's composition, handed in as children: the dialog\n * renders its card or blank contents, the drawer its sliding wrapper around a card.\n *\n * Root from the `<dialog>` itself, not `BemRootNodeFC`: that always renders a `<div>`, and only the\n * native element carries the dialog semantics.\n *\n * `children` rather than a `<slot />`: Stencil derives light-DOM slot relocation from the JSX in the\n * element file, so each element supplies its own slot.\n */\nexport const DialogFC: FC<DialogFCProps> = (props, children) => {\n\tconst { blockClass, class: hostClass, handleCancel, handleClose, label, labelledBy, modal, refDialog, width } = props;\n\n\treturn (\n\t\t<dialog\n\t\t\taria-label={labelledBy ? undefined : label}\n\t\t\taria-labelledby={labelledBy}\n\t\t\taria-modal={modal ? 'true' : 'false'}\n\t\t\tclass={clsx(blockClass, hostClass)}\n\t\t\tonCancel={handleCancel}\n\t\t\tonClose={handleClose}\n\t\t\tref={refDialog}\n\t\t\tstyle={width ? { width } : undefined}\n\t\t>\n\t\t\t{children}\n\t\t</dialog>\n\t);\n};\n","/**\n * This file contains the functions used to lock the background scroll while\n * a modal overlay (dialog, modal, drawer) is open. The native `showModal()`\n * makes the background inert, but does not prevent the document from scrolling.\n */\n\n/**\n * This set contains all owners (component instances) currently holding the lock.\n * The scroll lock is released once the last owner unlocks.\n */\nconst SCROLL_LOCK_OWNERS: Set<unknown> = new Set();\n\nlet previousOverflow: string | null = null;\nlet previousPaddingRight: string | null = null;\n\n/**\n * Locks the document scroll for the given owner. The first lock stores the\n * current inline styles and hides the viewport scrollbar; the removed\n * scrollbar width is compensated with padding to avoid a layout shift.\n *\n * @param owner The component instance requesting the lock\n */\nexport function lockScroll(owner: unknown): void {\n\tif (typeof document === 'undefined' || typeof window === 'undefined') {\n\t\treturn;\n\t}\n\tif (SCROLL_LOCK_OWNERS.has(owner)) {\n\t\treturn;\n\t}\n\n\tif (SCROLL_LOCK_OWNERS.size === 0) {\n\t\tconst docEl = document.documentElement;\n\t\tpreviousOverflow = docEl.style.getPropertyValue('overflow');\n\t\tpreviousPaddingRight = docEl.style.getPropertyValue('padding-right');\n\n\t\t// Measure before hiding the scrollbar; overlay scrollbars yield 0.\n\t\tconst scrollbarWidth = window.innerWidth - docEl.clientWidth;\n\t\tif (scrollbarWidth > 0) {\n\t\t\tconst currentPaddingRight = Number.parseFloat(window.getComputedStyle(docEl).paddingRight) || 0;\n\t\t\tdocEl.style.setProperty('padding-right', `${currentPaddingRight + scrollbarWidth}px`);\n\t\t}\n\t\tdocEl.style.setProperty('overflow', 'hidden');\n\t}\n\n\tSCROLL_LOCK_OWNERS.add(owner);\n}\n\n/**\n * Releases the scroll lock for the given owner. Calling it for an owner that\n * does not hold a lock is a no-op, so unlocking is idempotent per owner. The\n * previous inline styles are restored once the last owner unlocks.\n *\n * @param owner The component instance releasing the lock\n */\nexport function unlockScroll(owner: unknown): void {\n\tif (typeof document === 'undefined' || typeof window === 'undefined') {\n\t\treturn;\n\t}\n\tif (!SCROLL_LOCK_OWNERS.delete(owner)) {\n\t\treturn;\n\t}\n\n\tif (SCROLL_LOCK_OWNERS.size === 0) {\n\t\tconst docEl = document.documentElement;\n\t\tif (previousOverflow) {\n\t\t\tdocEl.style.setProperty('overflow', previousOverflow);\n\t\t} else {\n\t\t\tdocEl.style.removeProperty('overflow');\n\t\t}\n\t\tif (previousPaddingRight) {\n\t\t\tdocEl.style.setProperty('padding-right', previousPaddingRight);\n\t\t} else {\n\t\t\tdocEl.style.removeProperty('padding-right');\n\t\t}\n\t\tpreviousOverflow = null;\n\t\tpreviousPaddingRight = null;\n\t}\n}\n"],"names":[],"mappings":";;;;;;;AASA,MAAM,SAAS,GAAG,GAAG,CAAC,QAAQ,CAAC,YAAY,CAAC;AAC5C,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC,WAAW,CAAC;AAO7B,MAAA,gBAAgB,GAAG,CAAC,OAA6B,KAAa,IAAI,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,EAAE,SAAS,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC;MAkCjI,QAAQ,GAAsB,CAAC,KAAK,EAAE,QAAQ,KAAI;IAC9D,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,KAAK;AAErH,IAAA,QACC,CAAA,CAAA,QAAA,EAAA,EAAA,YAAA,EACa,UAAU,GAAG,SAAS,GAAG,KAAK,EAAA,iBAAA,EACzB,UAAU,EAAA,YAAA,EACf,KAAK,GAAG,MAAM,GAAG,OAAO,EACpC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC,EAClC,QAAQ,EAAE,YAAY,EACtB,OAAO,EAAE,WAAW,EACpB,GAAG,EAAE,SAAS,EACd,KAAK,EAAE,KAAK,GAAG,EAAE,KAAK,EAAE,GAAG,SAAS,EAAA,EAEnC,QAAQ,CACD;AAEX;;AC1DA,MAAM,kBAAkB,GAAiB,IAAI,GAAG,EAAE;AAElD,IAAI,gBAAgB,GAAk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,QAAQ,CAAC,eAAe;QACtC,IAAI,gBAAgB,EAAE;YACrB,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,UAAU,EAAE,gBAAgB,CAAC;;aAC/C;AACN,YAAA,KAAK,CAAC,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC;;QAEvC,IAAI,oBAAoB,EAAE;YACzB,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,eAAe,EAAE,oBAAoB,CAAC;;aACxD;AACN,YAAA,KAAK,CAAC,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;;QAE5C,gBAAgB,GAAG,IAAI;QACvB,oBAAoB,GAAG,IAAI;;AAE7B;;;;"}
1
+ {"version":3,"file":"scroll-lock-6SV-XFXR.js","sources":["src/internal/functional-components/dialog/component.tsx","src/utils/scroll-lock.ts"],"sourcesContent":["import type { FunctionalComponent as FC } from '@stencil/core';\nimport { h } from '@stencil/core';\n\nimport { bem } from '../../../schema/bem-registry';\nimport type { ModalVariantPropType } from '../../../schema/props/variant/modal';\nimport clsx from '../../../utils/clsx';\nimport type { FunctionalComponentProps } from '../generic-types';\nimport type { DialogApi } from './api';\n\nconst dialogBem = bem.forBlock('kol-dialog');\nconst modalBem = bem.forBlock('kol-modal');\n\n/**\n * The dialog's own block classes: `kol-dialog`, the deprecated `kol-modal` alias, and the variant\n * of both as an element-style suffix. Every theme addresses all four names, so they are rendered\n * verbatim.\n */\nexport const dialogBlockClass = (variant: ModalVariantPropType): string => clsx(dialogBem(), modalBem(), dialogBem(variant), modalBem(variant));\n\nexport type DialogFCProps = Pick<FunctionalComponentProps<DialogApi>, 'class' | 'handleCancel' | 'handleClose' | 'label' | 'modal' | 'refDialog'> & {\n\t/**\n\t * Class names of the block this dialog belongs to. `kol-dialog` renders its own block, the\n\t * deprecated `kol-modal` alias and the variant of both; `kol-drawer` renders its\n\t * `kol-drawer__dialog` element class. Every theme styles the two differently — a drawer that\n\t * carried the dialog classes would inherit the dialog's background, radius and backdrop — so\n\t * neither is hard-coded here.\n\t */\n\tblockClass: string;\n\t/**\n\t * DOM id of the heading that labels the dialog. Without one the dialog falls back to\n\t * `aria-label`, which is what the blank variant needs: it renders no heading.\n\t */\n\tlabelledBy?: string;\n\t/** Width of the dialog. Left unset, the dialog keeps its intrinsic size. */\n\twidth?: string;\n};\n\n/**\n * The native `<dialog>` shell, shared by `kol-dialog`, the deprecated `kol-modal`, `kol-drawer` and\n * the settings menu of the table.\n *\n * It owns the element that provides `showModal()`, the top layer and the backdrop — and nothing\n * else. What the dialog contains is the consumer's composition, handed in as children: the dialog\n * renders its card or blank contents, the drawer its sliding wrapper around a card.\n *\n * Root from the `<dialog>` itself, not `BemRootNodeFC`: that always renders a `<div>`, and only the\n * native element carries the dialog semantics.\n *\n * `children` rather than a `<slot />`: Stencil derives light-DOM slot relocation from the JSX in the\n * element file, so each element supplies its own slot.\n */\nexport const DialogFC: FC<DialogFCProps> = (props, children) => {\n\tconst { blockClass, class: hostClass, handleCancel, handleClose, label, labelledBy, modal, refDialog, width } = props;\n\n\treturn (\n\t\t<dialog\n\t\t\taria-label={labelledBy ? undefined : label}\n\t\t\taria-labelledby={labelledBy}\n\t\t\taria-modal={modal ? 'true' : 'false'}\n\t\t\tclass={clsx(blockClass, hostClass)}\n\t\t\tonCancel={handleCancel}\n\t\t\tonClose={handleClose}\n\t\t\tref={refDialog}\n\t\t\tstyle={width ? { width } : undefined}\n\t\t>\n\t\t\t{children}\n\t\t</dialog>\n\t);\n};\n","/**\n * This file contains the functions used to lock the background scroll while\n * a modal overlay (dialog, modal, drawer) is open. The native `showModal()`\n * makes the background inert, but does not prevent the document from scrolling.\n */\n\n/**\n * This set contains all owners (component instances) currently holding the lock.\n * The scroll lock is released once the last owner unlocks.\n */\nconst SCROLL_LOCK_OWNERS: Set<unknown> = new Set();\n\nlet previousOverflow: string | null = null;\nlet previousPaddingRight: string | null = null;\n\n/**\n * Locks the document scroll for the given owner. The first lock stores the\n * current inline styles and hides the viewport scrollbar; the removed\n * scrollbar width is compensated with padding to avoid a layout shift.\n *\n * @param owner The component instance requesting the lock\n */\nexport function lockScroll(owner: unknown): void {\n\tif (typeof document === 'undefined' || typeof window === 'undefined') {\n\t\treturn;\n\t}\n\tif (SCROLL_LOCK_OWNERS.has(owner)) {\n\t\treturn;\n\t}\n\n\tif (SCROLL_LOCK_OWNERS.size === 0) {\n\t\tconst docEl = document.documentElement;\n\t\tpreviousOverflow = docEl.style.getPropertyValue('overflow');\n\t\tpreviousPaddingRight = docEl.style.getPropertyValue('padding-right');\n\n\t\t// Measure before hiding the scrollbar; overlay scrollbars yield 0.\n\t\tconst scrollbarWidth = window.innerWidth - docEl.clientWidth;\n\t\tif (scrollbarWidth > 0) {\n\t\t\tconst currentPaddingRight = Number.parseFloat(window.getComputedStyle(docEl).paddingRight) || 0;\n\t\t\tdocEl.style.setProperty('padding-right', `${currentPaddingRight + scrollbarWidth}px`);\n\t\t}\n\t\tdocEl.style.setProperty('overflow', 'hidden');\n\t}\n\n\tSCROLL_LOCK_OWNERS.add(owner);\n}\n\n/**\n * Releases the scroll lock for the given owner. Calling it for an owner that\n * does not hold a lock is a no-op, so unlocking is idempotent per owner. The\n * previous inline styles are restored once the last owner unlocks.\n *\n * @param owner The component instance releasing the lock\n */\nexport function unlockScroll(owner: unknown): void {\n\tif (typeof document === 'undefined' || typeof window === 'undefined') {\n\t\treturn;\n\t}\n\tif (!SCROLL_LOCK_OWNERS.delete(owner)) {\n\t\treturn;\n\t}\n\n\tif (SCROLL_LOCK_OWNERS.size === 0) {\n\t\tconst docEl = document.documentElement;\n\t\tif (previousOverflow) {\n\t\t\tdocEl.style.setProperty('overflow', previousOverflow);\n\t\t} else {\n\t\t\tdocEl.style.removeProperty('overflow');\n\t\t}\n\t\tif (previousPaddingRight) {\n\t\t\tdocEl.style.setProperty('padding-right', previousPaddingRight);\n\t\t} else {\n\t\t\tdocEl.style.removeProperty('padding-right');\n\t\t}\n\t\tpreviousOverflow = null;\n\t\tpreviousPaddingRight = null;\n\t}\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B,CAAC;;aACxD;AACN,YAAA,KAAK,CAAC,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;;QAE5C,gBAAgB,GAAG,IAAI;QACvB,oBAAoB,GAAG,IAAI;;AAE7B;;;;"}
@@ -0,0 +1,5 @@
1
+ /*!
2
+ * KoliBri - The accessible HTML-Standard
3
+ */
4
+ import{c as s,b as t}from"./base-web-component-3R1Dy3QK.js";import{a as o}from"./tslib.es6-QNbPBOk5.js";import{h as i}from"./index-DQdQBwMc.js";import{a}from"./dev.utils-CJMVCYWh.js";const e=s("autoComplete","off",t,(s=>s.length>0));const r=s=>{var{id:t,suggestions:e}=s,r=o(s,["id","suggestions"]);if(!e){return null}return i("datalist",Object.assign({id:a(t,"list")},r),e.map((s=>i("option",{value:s}))))};export{r as S,e as a};
5
+ //# sourceMappingURL=suggestions-BYMmW1aV.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"suggestions-DlpHvEGv.js","sources":["src/internal/props/auto-complete.ts","src/internal/functional-components/form-field/suggestions.tsx"],"sourcesContent":["import type { AutoCompletePropType } from '../../schema';\nimport type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeString } from './helpers/normalizers';\n\n/**\n * Auto complete prop for form fields\n *\n * Description:\n * The value of the native `autocomplete` attribute: `'on'`, `'off'` or an autofill token such as\n * `'email'`. Any non-empty string is accepted, the default is `'off'`.\n *\n * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill\n * @see https://www.w3.org/WAI/WCAG21/Understanding/identify-input-purpose.html\n */\nexport type AutoCompleteProp = SimpleProp<'autoComplete', AutoCompletePropType>;\nexport const autoCompleteProp = createPropDefinition<AutoCompleteProp>('autoComplete', 'off', normalizeString, (value) => value.length > 0);\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport type { W3CInputValue } from '../../../schema';\nimport { createRelatedUniqueId } from '../../../utils/dev.utils';\n\nexport type SuggestionsFCProps = JSXBase.HTMLAttributes<HTMLDataListElement> & {\n\t/** ID of the input; the datalist gets the related `list` ID. */\n\tid: string;\n\tsuggestions: W3CInputValue[];\n};\n\n/** Datalist with the suggested values of an input. */\nexport const SuggestionsFC: FC<SuggestionsFCProps> = ({ id, suggestions, ...other }) => {\n\tif (!suggestions) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<datalist id={createRelatedUniqueId(id, 'list')} {...other}>\n\t\t\t{suggestions.map((option: W3CInputValue) => (\n\t\t\t\t<option value={option} />\n\t\t\t))}\n\t\t</datalist>\n\t);\n};\n"],"names":[],"mappings":";;;;;;;;MAgBa,gBAAgB,GAAG,oBAAoB,CAAmB,cAAc,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC,KAAK,KAAK,KAAK,CAAC,MAAM,GAAG,CAAC;;ACJ7H,MAAA,aAAa,GAA2B,CAAC,EAA6B,KAAI;QAAjC,EAAE,EAAE,EAAE,WAAW,EAAA,GAAA,EAAY,EAAP,KAAK,GAAA,MAAA,CAAA,EAAA,EAA3B,qBAA6B,CAAF;IAChF,IAAI,CAAC,WAAW,EAAE;AACjB,QAAA,OAAO,IAAI;;IAGZ,QACC,CAAA,CAAA,UAAA,EAAA,MAAA,CAAA,MAAA,CAAA,EAAU,EAAE,EAAE,qBAAqB,CAAC,EAAE,EAAE,MAAM,CAAC,EAAA,EAAM,KAAK,CAAA,EACxD,WAAW,CAAC,GAAG,CAAC,CAAC,MAAqB,MACtC,CAAQ,CAAA,QAAA,EAAA,EAAA,KAAK,EAAE,MAAM,EAAI,CAAA,CACzB,CAAC,CACQ;AAEb;;;;"}
1
+ {"version":3,"file":"suggestions-BYMmW1aV.js","sources":["src/internal/props/auto-complete.ts","src/internal/functional-components/form-field/suggestions.tsx"],"sourcesContent":["import type { AutoCompletePropType } from '../../schema';\nimport type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeString } from './helpers/normalizers';\n\n/**\n * Auto complete prop for form fields\n *\n * Description:\n * The value of the native `autocomplete` attribute: `'on'`, `'off'` or an autofill token such as\n * `'email'`. Any non-empty string is accepted, the default is `'off'`.\n *\n * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill\n * @see https://www.w3.org/WAI/WCAG21/Understanding/identify-input-purpose.html\n */\nexport type AutoCompleteProp = SimpleProp<'autoComplete', AutoCompletePropType>;\nexport const autoCompleteProp = createPropDefinition<AutoCompleteProp>('autoComplete', 'off', normalizeString, (value) => value.length > 0);\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport type { W3CInputValue } from '../../../schema';\nimport { createRelatedUniqueId } from '../../../utils/dev.utils';\n\nexport type SuggestionsFCProps = JSXBase.HTMLAttributes<HTMLDataListElement> & {\n\t/** ID of the input; the datalist gets the related `list` ID. */\n\tid: string;\n\tsuggestions: W3CInputValue[];\n};\n\n/** Datalist with the suggested values of an input. */\nexport const SuggestionsFC: FC<SuggestionsFCProps> = ({ id, suggestions, ...other }) => {\n\tif (!suggestions) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<datalist id={createRelatedUniqueId(id, 'list')} {...other}>\n\t\t\t{suggestions.map((option: W3CInputValue) => (\n\t\t\t\t<option value={option} />\n\t\t\t))}\n\t\t</datalist>\n\t);\n};\n"],"names":[],"mappings":";;;;;;;;MAgBa,gBAAgB,GAAG,oBAAoB,CAAmB,cAAc,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC,KAAK,KAAK,KAAK,CAAC,MAAM,GAAG,CAAC;;ACJ7H,MAAA,aAAa,GAA2B,CAAC,EAA6B,KAAI;QAAjC,EAAE,EAAE,EAAE,WAAW,EAAA,GAAA,EAAY,EAAP,KAAK,GAAA,MAAA,CAAA,EAAA,EAA3B,qBAA6B,CAAF;IAChF,IAAI,CAAC,WAAW,EAAE;AACjB,QAAA,OAAO,IAAI;;IAGZ,QACC,CAAA,CAAA,UAAA,EAAA,MAAA,CAAA,MAAA,CAAA,EAAU,EAAE,EAAE,qBAAqB,CAAC,EAAE,EAAE,MAAM,CAAC,EAAA,EAAM,KAAK,CAAA,EACxD,WAAW,CAAC,GAAG,CAAC,CAAC,MAAqB,MACtC,CAAQ,CAAA,QAAA,EAAA,EAAA,KAAK,EAAE,MAAM,EAAI,CAAA,CACzB,CAAC,CACQ;AAEb;;;;"}
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as s}from"./index-DsCeQ9Ys.js";import"./common-BqpMtheU.js";const o=class{constructor(o){s(this,o)}};export{o as test_component};
4
+ import{r as o}from"./index-DQdQBwMc.js";import"./common-BqpMtheU.js";const t=class{constructor(t){o(this,t)}};export{t as test_component};
5
5
  //# sourceMappingURL=test-component.entry.js.map
@@ -0,0 +1,5 @@
1
+ /*!
2
+ * KoliBri - The accessible HTML-Standard
3
+ */
4
+ import"./common-BqpMtheU.js";import{l as e}from"./level-Q5lBISho.js";import{a as n}from"./base-web-component-3R1Dy3QK.js";import{d as t}from"./disabled-CdyeAMlW.js";import{l as s}from"./label-c9P7yC4V.js";import{o}from"./open-BK72Y-b2.js";import{h as i}from"./index-DQdQBwMc.js";import{K as r}from"./Heading-NHB1reiQ.js";import{c as a}from"./clsx-COFh-Vc8.js";import{p as l}from"./element-interaction-Cy9tx3Sx.js";import{g as d}from"./block-bem-DxQXsOt3.js";import{S as c}from"./component-C_d54ujF.js";import{d as m,K as u}from"./events-CRHxtwup.js";const p=n();const f={optional:[p,t,e,o],required:[s]};const b=({block:e,contentClass:n,controlId:t,detailsOpen:s,disabled:o,expanded:m,handleToggle:u,headingId:p,icons:f,label:b,level:v,refHeadingButton:j,transitionMs:g},x)=>{const y=d(e);return i("details",{class:y({disabled:o===true,open:m===true}),open:s===true,style:{"--collapsible-transition-duration":`${g}ms`}},i("summary",{"aria-controls":t,"aria-disabled":o===true?"true":undefined,class:y("heading"),id:p,onClick:u,onMouseDown:o===true?l:undefined,ref:j,tabIndex:o===true?-1:undefined},i(r,{level:v!==null&&v!==void 0?v:0},i(c,{icons:f,label:b}))),i("div",{class:y("wrapper")},i("div",{class:y("wrapper-animation")},i("div",{"aria-hidden":m===false?"true":undefined,"aria-labelledby":p,class:a(y("content"),n),id:t,role:"region"},x))))};const v=300;function j(e){if(typeof requestAnimationFrame==="function"){const n=requestAnimationFrame(e);return()=>cancelAnimationFrame(n)}const n=setTimeout(e,0);return()=>clearTimeout(n)}function g({getTransitionMs:e,setDetailsOpen:n,setExpanded:t}){let s;let o;const i=()=>{s===null||s===void 0?void 0:s();s=undefined;clearTimeout(o);o=undefined};return{syncOpen(r,a){i();if(r){n(true);if(a){s=j((()=>t(true)))}else{t(true)}return}t(false);if(a){o=setTimeout((()=>n(false)),e())}else{n(false)}},dispose:i}}const x=25;function y({getHost:e,getOn:n,isDisabled:t,isOpen:s,setOpen:o}){return i=>{i.preventDefault();if(t()){return}const r=!s();o(r);setTimeout((()=>{var t,s;const o=e();if(o){m(o,u.click,r);m(o,u.toggle,r)}const a=n();(t=a.onClick)===null||t===void 0?void 0:t.call(a,i,r);(s=a.onToggle)===null||s===void 0?void 0:s.call(a,i,r)}),x)}}export{b as C,v as D,y as a,p as b,g as c,f as d};
5
+ //# sourceMappingURL=toggle-handler-D-yalcds.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"toggle-handler-Xex3lIll.js","sources":["src/internal/props/collapsible-callbacks.ts","src/internal/functional-components/collapsible/api.tsx","src/internal/functional-components/collapsible/component.tsx","src/internal/functional-components/collapsible/open-animation.ts","src/internal/functional-components/collapsible/toggle-handler.ts"],"sourcesContent":["import type { CollapsibleCallbacksPropType } from '../../schema';\nimport type { SimpleProp } from './helpers/factory';\nimport { createCallbacksPropDefinition } from './helpers/factory';\n\nexport type CollapsibleCallbacksProp = SimpleProp<'on', CollapsibleCallbacksPropType<boolean>>;\n\n/**\n * Callbacks prop shared by `kol-accordion` and `kol-details` — both expose the same\n * `onClick`/`onToggle` pair on their heading toggle button.\n */\nexport const collapsibleCallbacksProp = createCallbacksPropDefinition<CollapsibleCallbacksPropType<boolean>>();\n","import type { IconsPropType, KolFocusOptions } from '../../../schema';\nimport { collapsibleCallbacksProp, disabledProp, labelProp, levelProp, openProp } from '../../props';\nimport type { ApiFromConfig, PropsConfigShape } from '../generic-types';\n\n/**\n * Props configuration shared by the collapsible components (`kol-accordion`, `kol-details`).\n *\n * `label` is the only required prop. All others are optional.\n *\n * Notes on prop choices:\n * - `labelProp` (not `labelWithExpertSlotProp`): the label labels the toggle button and has no\n * expert slot. It keeps the shared 2–80 character validation and accessibility hints.\n * - `openProp`: the toggle state. The public `_open` prop stays mutable and reflected on the web\n * component; the render prop mirrors it for the functional component.\n */\nexport const collapsiblePropsConfig = {\n\toptional: [collapsibleCallbacksProp, disabledProp, levelProp, openProp],\n\trequired: [labelProp],\n} as const satisfies PropsConfigShape;\n\nexport type CollapsibleApi = ApiFromConfig<\n\ttypeof collapsiblePropsConfig,\n\t{\n\t\tCallbacks: {\n\t\t\t/**\n\t\t\t * Click handler bound to the `<summary>` element. Implemented by the web component,\n\t\t\t * which suppresses the user agent's own toggle (so the collapse can be animated), flips\n\t\t\t * the mutable `_open` prop and — delayed so the reflected attribute is already updated —\n\t\t\t * dispatches the custom `KolEvent.click`/`KolEvent.toggle` events on the host element\n\t\t\t * and invokes the consumer's `onClick`/`onToggle` callbacks.\n\t\t\t */\n\t\t\ttoggle: (event: MouseEvent) => void;\n\t\t};\n\t\tMethods: {\n\t\t\tclick: () => void;\n\t\t\tfocus: (options?: KolFocusOptions) => void;\n\t\t};\n\t\tRefs: {\n\t\t\t/** The `<summary>` element — the disclosure control `focus()` and `click()` delegate to. */\n\t\t\theadingButton: HTMLElement;\n\t\t};\n\t\tStates: {\n\t\t\t/**\n\t\t\t * DOM id of the collapsible content region, referenced by the summary's aria-controls\n\t\t\t * attribute. Derived once per web component instance.\n\t\t\t */\n\t\t\tcontrolId: string;\n\t\t\t/**\n\t\t\t * Whether the `open` attribute is set on `<details>`. Tracks {@link expanded}, except\n\t\t\t * while collapsing: the attribute has to outlive the class so the user agent keeps the\n\t\t\t * content rendered until the grid transition has finished.\n\t\t\t */\n\t\t\tdetailsOpen: boolean;\n\t\t\t/**\n\t\t\t * Whether the collapsible is visually expanded — drives the `--open` block modifier\n\t\t\t * and therefore the transition. Set one frame after {@link detailsOpen} when opening,\n\t\t\t * so the transition has a from-state to start from.\n\t\t\t */\n\t\t\texpanded: boolean;\n\t\t\t/**\n\t\t\t * DOM id of the heading toggle button, referenced by the content region's\n\t\t\t * aria-labelledby attribute. Derived once per web component instance.\n\t\t\t */\n\t\t\theadingId: string;\n\t\t\t/**\n\t\t\t * Duration of the open/close transition in milliseconds, from the theme's\n\t\t\t * `collapsibleTransitionMs` feature flag. Rendered as the CSS custom property\n\t\t\t * `--collapsible-transition-duration` on `<details>` so the stylesheet and the timer\n\t\t\t * that keeps the `open` attribute alive share one value.\n\t\t\t */\n\t\t\ttransitionMs: number;\n\t\t};\n\t}\n>;\n\n/**\n * The BEM blocks that render through `CollapsibleFC`.\n *\n * Both are registered in `schema/bem-registry.ts` with the identical element set\n * (`content`, `heading`, `wrapper`, `wrapper-animation`) and modifier set (`disabled`, `open`),\n * which is what lets one functional component serve both: `keyof` over the union of their maps is\n * still exactly those names.\n */\nexport type CollapsibleBlock = 'kol-accordion' | 'kol-details';\n\n/**\n * The per-component differences of the otherwise identical collapsible markup.\n *\n * These are neither public props nor component state, so they stay out of {@link CollapsibleApi}\n * and are passed as plain arguments by the rendering web component — the same way\n * `BemRootNodeFC` and `AriaDescriptionSpanFC` take their own local prop types.\n */\nexport type CollapsibleVariant = {\n\t/** BEM block of the rendering component. */\n\tblock: CollapsibleBlock;\n\t/**\n\t * Icon of the toggle control (`<summary>`). `kol-accordion` swaps it with the open state,\n\t * `kol-details` keeps one icon and rotates it via CSS.\n\t */\n\ticons: IconsPropType;\n\t/** Additional class on the content region — `kol-details` adds `indented-text`. */\n\tcontentClass?: string;\n};\n","import type { FunctionalComponent as FC } from '@stencil/core';\nimport { h } from '@stencil/core';\n\nimport KolHeadingFc from '../../../functional-components/Heading/Heading';\nimport clsx from '../../../utils/clsx';\nimport { preventFocus } from '../../../utils/element-interaction';\nimport { getBlockBem } from '../bem-root-node/block-bem';\nimport type { FunctionalComponentProps } from '../generic-types';\nimport { SpanFC } from '../span/component';\nimport type { CollapsibleApi, CollapsibleVariant } from './api';\n\n/**\n * Renders a collapsible — `kol-accordion` and `kol-details` — on the native `<details>`/`<summary>`\n * elements.\n *\n * `<summary>` is the disclosure control: one tab stop, keyboard handling and the expanded state\n * come from the user agent. It has to be the first child of `<details>`, so the heading sits inside\n * the control; label and icon render through `SpanFC`.\n *\n * `level` is forwarded as `level ?? 0` because `KolHeadingFc` falls back to level 1 on `undefined`,\n * while the collapsible's own `_level` default is 0 — the bold `<strong>` rendering.\n *\n * `open` on `<details>` and the `--open` modifier are driven separately: the attribute has to be set\n * before the modifier flips so the grid transition has a from-state, and it has to outlive the\n * modifier on close so the collapse is visible. The web component owns that sequencing; the FC only\n * renders what it is told.\n */\nexport const CollapsibleFC: FC<FunctionalComponentProps<CollapsibleApi> & CollapsibleVariant> = (\n\t{ block, contentClass, controlId, detailsOpen, disabled, expanded, handleToggle, headingId, icons, label, level, refHeadingButton, transitionMs },\n\tchildren,\n) => {\n\tconst blockBem = getBlockBem(block);\n\n\treturn (\n\t\t<details\n\t\t\tclass={blockBem({\n\t\t\t\tdisabled: disabled === true,\n\t\t\t\topen: expanded === true,\n\t\t\t})}\n\t\t\topen={detailsOpen === true}\n\t\t\tstyle={{ '--collapsible-transition-duration': `${transitionMs}ms` }}\n\t\t>\n\t\t\t<summary\n\t\t\t\taria-controls={controlId}\n\t\t\t\taria-disabled={disabled === true ? 'true' : undefined}\n\t\t\t\tclass={blockBem('heading')}\n\t\t\t\tid={headingId}\n\t\t\t\tonClick={handleToggle}\n\t\t\t\tonMouseDown={disabled === true ? preventFocus : undefined}\n\t\t\t\tref={refHeadingButton}\n\t\t\t\ttabIndex={disabled === true ? -1 : undefined}\n\t\t\t>\n\t\t\t\t<KolHeadingFc level={level ?? 0}>\n\t\t\t\t\t<SpanFC icons={icons} label={label} />\n\t\t\t\t</KolHeadingFc>\n\t\t\t</summary>\n\t\t\t<div class={blockBem('wrapper')}>\n\t\t\t\t<div class={blockBem('wrapper-animation')}>\n\t\t\t\t\t<div\n\t\t\t\t\t\taria-hidden={expanded === false ? 'true' : undefined}\n\t\t\t\t\t\taria-labelledby={headingId}\n\t\t\t\t\t\tclass={clsx(blockBem('content'), contentClass)}\n\t\t\t\t\t\tid={controlId}\n\t\t\t\t\t\trole=\"region\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</details>\n\t);\n};\n","/**\n * Fallback duration of the open/close transition when the theme declares no\n * `collapsibleTransitionMs` feature flag. Mirrors the default of\n * `--collapsible-transition-duration` in `components/@shared/_collapsible.mixin.scss`.\n */\nexport const DEFAULT_COLLAPSIBLE_TRANSITION_MS = 300;\n\n/** Runs `callback` on the next frame; falls back to a macrotask where `requestAnimationFrame` is unavailable (SSR). */\nfunction onNextFrame(callback: () => void): () => void {\n\tif (typeof requestAnimationFrame === 'function') {\n\t\tconst handle = requestAnimationFrame(callback);\n\t\treturn () => cancelAnimationFrame(handle);\n\t}\n\tconst handle = setTimeout(callback, 0);\n\treturn () => clearTimeout(handle);\n}\n\nexport type CollapsibleOpenAnimationContext = {\n\t/** Duration of the CSS transition; the `open` attribute is kept on `<details>` until it has elapsed. */\n\tgetTransitionMs: () => number;\n\t/** Sets the `open` attribute on `<details>`. */\n\tsetDetailsOpen: (value: boolean) => void;\n\t/** Sets the `--open` block modifier, which drives the transition. */\n\tsetExpanded: (value: boolean) => void;\n};\n\nexport type CollapsibleOpenAnimation = {\n\t/**\n\t * Applies an open state to the two rendered flags.\n\t *\n\t * With `animate`, opening sets the `open` attribute first and the modifier one frame later — the\n\t * content is `display:none` while `<details>` is closed, so without that gap the transition has\n\t * no from-state and the panel snaps open. Collapsing does the reverse: the modifier goes first\n\t * and the attribute is removed once the transition has run.\n\t */\n\tsyncOpen: (open: boolean, animate: boolean) => void;\n\t/** Cancels pending frames and timers. Call from `disconnectedCallback`. */\n\tdispose: () => void;\n};\n\nexport function createCollapsibleOpenAnimation({ getTransitionMs, setDetailsOpen, setExpanded }: CollapsibleOpenAnimationContext): CollapsibleOpenAnimation {\n\tlet cancelPendingFrame: (() => void) | undefined;\n\tlet collapseTimeout: ReturnType<typeof setTimeout> | undefined;\n\n\tconst clearPending = (): void => {\n\t\tcancelPendingFrame?.();\n\t\tcancelPendingFrame = undefined;\n\t\tclearTimeout(collapseTimeout);\n\t\tcollapseTimeout = undefined;\n\t};\n\n\treturn {\n\t\tsyncOpen(open, animate) {\n\t\t\tclearPending();\n\n\t\t\tif (open) {\n\t\t\t\tsetDetailsOpen(true);\n\t\t\t\tif (animate) {\n\t\t\t\t\tcancelPendingFrame = onNextFrame(() => setExpanded(true));\n\t\t\t\t} else {\n\t\t\t\t\tsetExpanded(true);\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tsetExpanded(false);\n\t\t\tif (animate) {\n\t\t\t\tcollapseTimeout = setTimeout(() => setDetailsOpen(false), getTransitionMs());\n\t\t\t} else {\n\t\t\t\tsetDetailsOpen(false);\n\t\t\t}\n\t\t},\n\t\tdispose: clearPending,\n\t};\n}\n","import type { CollapsibleCallbacksPropType } from '../../../schema';\nimport { dispatchDomEvent, KolEvent } from '../../../utils/events';\n\n/**\n * Delay between flipping `_open` and announcing the new state.\n *\n * `_open` is declared `@Prop({ mutable: true, reflect: true })`, and Stencil writes the reflected\n * attribute asynchronously. Announcing synchronously would let a consumer callback read a stale\n * `_open` attribute off the host, so the announcement is deferred by one macrotask window.\n */\nconst ANNOUNCE_DELAY_MS = 25;\n\nexport type CollapsibleToggleContext = {\n\t/** The host element the DOM events are dispatched on. */\n\tgetHost: () => HTMLElement | undefined;\n\t/** The normalized `_on` render prop. Read at announce time so late assignments are picked up. */\n\tgetOn: () => CollapsibleCallbacksPropType<boolean>;\n\t/** Whether the collapsible currently refuses interaction. */\n\tisDisabled: () => boolean;\n\t/** The current normalized open state. */\n\tisOpen: () => boolean;\n\t/** Writes the component's mutable `_open` prop, which its watcher turns into rendered state. */\n\tsetOpen: (open: boolean) => void;\n};\n\n/**\n * Builds the `<summary>` click handler shared by `kol-accordion` and `kol-details`.\n *\n * The user agent's own toggle is suppressed: it flips `open` synchronously, which skips the\n * collapse transition and races the component's controlled state. Everything else follows the\n * native element — `<summary>` is still the focusable control, and Enter/Space arrive here as\n * clicks, so keyboard operation needs no extra handling.\n *\n * The new state is captured synchronously, before the deferred announcement, so two quick toggles\n * report their own value rather than the same final one twice.\n */\nexport function createCollapsibleToggleHandler({ getHost, getOn, isDisabled, isOpen, setOpen }: CollapsibleToggleContext): (event: MouseEvent) => void {\n\treturn (event: MouseEvent): void => {\n\t\tevent.preventDefault();\n\n\t\tif (isDisabled()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst open = !isOpen();\n\t\tsetOpen(open);\n\n\t\tsetTimeout(() => {\n\t\t\tconst host = getHost();\n\t\t\tif (host) {\n\t\t\t\tdispatchDomEvent(host, KolEvent.click, open);\n\t\t\t\tdispatchDomEvent(host, KolEvent.toggle, open);\n\t\t\t}\n\n\t\t\tconst on = getOn();\n\t\t\ton.onClick?.(event, open);\n\t\t\ton.onToggle?.(event, open);\n\t\t}, ANNOUNCE_DELAY_MS);\n\t};\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAUa,MAAA,wBAAwB,GAAG,6BAA6B;;ACKxD,MAAA,sBAAsB,GAAG;IACrC,QAAQ,EAAE,CAAC,wBAAwB,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,CAAC;IACvE,QAAQ,EAAE,CAAC,SAAS,CAAC;;;ACUf,MAAM,aAAa,GAAsE,CAC/F,EAAE,KAAK,EAAE,YAAY,EAA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src/internal/props/collapsible-callbacks.ts","src/internal/functional-components/collapsible/api.tsx","src/internal/functional-components/collapsible/component.tsx","src/internal/functional-components/collapsible/open-animation.ts","src/internal/functional-components/collapsible/toggle-handler.ts"],"sourcesContent":["import type { CollapsibleCallbacksPropType } from '../../schema';\nimport type { SimpleProp } from './helpers/factory';\nimport { createCallbacksPropDefinition } from './helpers/factory';\n\nexport type CollapsibleCallbacksProp = SimpleProp<'on', CollapsibleCallbacksPropType<boolean>>;\n\n/**\n * Callbacks prop shared by `kol-accordion` and `kol-details` — both expose the same\n * `onClick`/`onToggle` pair on their heading toggle button.\n */\nexport const collapsibleCallbacksProp = createCallbacksPropDefinition<CollapsibleCallbacksPropType<boolean>>();\n","import type { IconsPropType, KolFocusOptions } from '../../../schema';\nimport { collapsibleCallbacksProp, disabledProp, labelProp, levelProp, openProp } from '../../props';\nimport type { ApiFromConfig, PropsConfigShape } from '../generic-types';\n\n/**\n * Props configuration shared by the collapsible components (`kol-accordion`, `kol-details`).\n *\n * `label` is the only required prop. All others are optional.\n *\n * Notes on prop choices:\n * - `labelProp` (not `labelWithExpertSlotProp`): the label labels the toggle button and has no\n * expert slot. It keeps the shared 2–80 character validation and accessibility hints.\n * - `openProp`: the toggle state. The public `_open` prop stays mutable and reflected on the web\n * component; the render prop mirrors it for the functional component.\n */\nexport const collapsiblePropsConfig = {\n\toptional: [collapsibleCallbacksProp, disabledProp, levelProp, openProp],\n\trequired: [labelProp],\n} as const satisfies PropsConfigShape;\n\nexport type CollapsibleApi = ApiFromConfig<\n\ttypeof collapsiblePropsConfig,\n\t{\n\t\tCallbacks: {\n\t\t\t/**\n\t\t\t * Click handler bound to the `<summary>` element. Implemented by the web component,\n\t\t\t * which suppresses the user agent's own toggle (so the collapse can be animated), flips\n\t\t\t * the mutable `_open` prop and — delayed so the reflected attribute is already updated —\n\t\t\t * dispatches the custom `KolEvent.click`/`KolEvent.toggle` events on the host element\n\t\t\t * and invokes the consumer's `onClick`/`onToggle` callbacks.\n\t\t\t */\n\t\t\ttoggle: (event: MouseEvent) => void;\n\t\t};\n\t\tMethods: {\n\t\t\tclick: () => void;\n\t\t\tfocus: (options?: KolFocusOptions) => void;\n\t\t};\n\t\tRefs: {\n\t\t\t/** The `<summary>` element — the disclosure control `focus()` and `click()` delegate to. */\n\t\t\theadingButton: HTMLElement;\n\t\t};\n\t\tStates: {\n\t\t\t/**\n\t\t\t * DOM id of the collapsible content region, referenced by the summary's aria-controls\n\t\t\t * attribute. Derived once per web component instance.\n\t\t\t */\n\t\t\tcontrolId: string;\n\t\t\t/**\n\t\t\t * Whether the `open` attribute is set on `<details>`. Tracks {@link expanded}, except\n\t\t\t * while collapsing: the attribute has to outlive the class so the user agent keeps the\n\t\t\t * content rendered until the grid transition has finished.\n\t\t\t */\n\t\t\tdetailsOpen: boolean;\n\t\t\t/**\n\t\t\t * Whether the collapsible is visually expanded — drives the `--open` block modifier\n\t\t\t * and therefore the transition. Set one frame after {@link detailsOpen} when opening,\n\t\t\t * so the transition has a from-state to start from.\n\t\t\t */\n\t\t\texpanded: boolean;\n\t\t\t/**\n\t\t\t * DOM id of the heading toggle button, referenced by the content region's\n\t\t\t * aria-labelledby attribute. Derived once per web component instance.\n\t\t\t */\n\t\t\theadingId: string;\n\t\t\t/**\n\t\t\t * Duration of the open/close transition in milliseconds, from the theme's\n\t\t\t * `collapsibleTransitionMs` feature flag. Rendered as the CSS custom property\n\t\t\t * `--collapsible-transition-duration` on `<details>` so the stylesheet and the timer\n\t\t\t * that keeps the `open` attribute alive share one value.\n\t\t\t */\n\t\t\ttransitionMs: number;\n\t\t};\n\t}\n>;\n\n/**\n * The BEM blocks that render through `CollapsibleFC`.\n *\n * Both are registered in `schema/bem-registry.ts` with the identical element set\n * (`content`, `heading`, `wrapper`, `wrapper-animation`) and modifier set (`disabled`, `open`),\n * which is what lets one functional component serve both: `keyof` over the union of their maps is\n * still exactly those names.\n */\nexport type CollapsibleBlock = 'kol-accordion' | 'kol-details';\n\n/**\n * The per-component differences of the otherwise identical collapsible markup.\n *\n * These are neither public props nor component state, so they stay out of {@link CollapsibleApi}\n * and are passed as plain arguments by the rendering web component — the same way\n * `BemRootNodeFC` and `AriaDescriptionSpanFC` take their own local prop types.\n */\nexport type CollapsibleVariant = {\n\t/** BEM block of the rendering component. */\n\tblock: CollapsibleBlock;\n\t/**\n\t * Icon of the toggle control (`<summary>`). `kol-accordion` swaps it with the open state,\n\t * `kol-details` keeps one icon and rotates it via CSS.\n\t */\n\ticons: IconsPropType;\n\t/** Additional class on the content region — `kol-details` adds `indented-text`. */\n\tcontentClass?: string;\n};\n","import type { FunctionalComponent as FC } from '@stencil/core';\nimport { h } from '@stencil/core';\n\nimport KolHeadingFc from '../../../functional-components/Heading/Heading';\nimport clsx from '../../../utils/clsx';\nimport { preventFocus } from '../../../utils/element-interaction';\nimport { getBlockBem } from '../bem-root-node/block-bem';\nimport type { FunctionalComponentProps } from '../generic-types';\nimport { SpanFC } from '../span/component';\nimport type { CollapsibleApi, CollapsibleVariant } from './api';\n\n/**\n * Renders a collapsible — `kol-accordion` and `kol-details` — on the native `<details>`/`<summary>`\n * elements.\n *\n * `<summary>` is the disclosure control: one tab stop, keyboard handling and the expanded state\n * come from the user agent. It has to be the first child of `<details>`, so the heading sits inside\n * the control; label and icon render through `SpanFC`.\n *\n * `level` is forwarded as `level ?? 0` because `KolHeadingFc` falls back to level 1 on `undefined`,\n * while the collapsible's own `_level` default is 0 — the bold `<strong>` rendering.\n *\n * `open` on `<details>` and the `--open` modifier are driven separately: the attribute has to be set\n * before the modifier flips so the grid transition has a from-state, and it has to outlive the\n * modifier on close so the collapse is visible. The web component owns that sequencing; the FC only\n * renders what it is told.\n */\nexport const CollapsibleFC: FC<FunctionalComponentProps<CollapsibleApi> & CollapsibleVariant> = (\n\t{ block, contentClass, controlId, detailsOpen, disabled, expanded, handleToggle, headingId, icons, label, level, refHeadingButton, transitionMs },\n\tchildren,\n) => {\n\tconst blockBem = getBlockBem(block);\n\n\treturn (\n\t\t<details\n\t\t\tclass={blockBem({\n\t\t\t\tdisabled: disabled === true,\n\t\t\t\topen: expanded === true,\n\t\t\t})}\n\t\t\topen={detailsOpen === true}\n\t\t\tstyle={{ '--collapsible-transition-duration': `${transitionMs}ms` }}\n\t\t>\n\t\t\t<summary\n\t\t\t\taria-controls={controlId}\n\t\t\t\taria-disabled={disabled === true ? 'true' : undefined}\n\t\t\t\tclass={blockBem('heading')}\n\t\t\t\tid={headingId}\n\t\t\t\tonClick={handleToggle}\n\t\t\t\tonMouseDown={disabled === true ? preventFocus : undefined}\n\t\t\t\tref={refHeadingButton}\n\t\t\t\ttabIndex={disabled === true ? -1 : undefined}\n\t\t\t>\n\t\t\t\t<KolHeadingFc level={level ?? 0}>\n\t\t\t\t\t<SpanFC icons={icons} label={label} />\n\t\t\t\t</KolHeadingFc>\n\t\t\t</summary>\n\t\t\t<div class={blockBem('wrapper')}>\n\t\t\t\t<div class={blockBem('wrapper-animation')}>\n\t\t\t\t\t<div\n\t\t\t\t\t\taria-hidden={expanded === false ? 'true' : undefined}\n\t\t\t\t\t\taria-labelledby={headingId}\n\t\t\t\t\t\tclass={clsx(blockBem('content'), contentClass)}\n\t\t\t\t\t\tid={controlId}\n\t\t\t\t\t\trole=\"region\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</details>\n\t);\n};\n","/**\n * Fallback duration of the open/close transition when the theme declares no\n * `collapsibleTransitionMs` feature flag. Mirrors the default of\n * `--collapsible-transition-duration` in `components/@shared/_collapsible.mixin.scss`.\n */\nexport const DEFAULT_COLLAPSIBLE_TRANSITION_MS = 300;\n\n/** Runs `callback` on the next frame; falls back to a macrotask where `requestAnimationFrame` is unavailable (SSR). */\nfunction onNextFrame(callback: () => void): () => void {\n\tif (typeof requestAnimationFrame === 'function') {\n\t\tconst handle = requestAnimationFrame(callback);\n\t\treturn () => cancelAnimationFrame(handle);\n\t}\n\tconst handle = setTimeout(callback, 0);\n\treturn () => clearTimeout(handle);\n}\n\nexport type CollapsibleOpenAnimationContext = {\n\t/** Duration of the CSS transition; the `open` attribute is kept on `<details>` until it has elapsed. */\n\tgetTransitionMs: () => number;\n\t/** Sets the `open` attribute on `<details>`. */\n\tsetDetailsOpen: (value: boolean) => void;\n\t/** Sets the `--open` block modifier, which drives the transition. */\n\tsetExpanded: (value: boolean) => void;\n};\n\nexport type CollapsibleOpenAnimation = {\n\t/**\n\t * Applies an open state to the two rendered flags.\n\t *\n\t * With `animate`, opening sets the `open` attribute first and the modifier one frame later — the\n\t * content is `display:none` while `<details>` is closed, so without that gap the transition has\n\t * no from-state and the panel snaps open. Collapsing does the reverse: the modifier goes first\n\t * and the attribute is removed once the transition has run.\n\t */\n\tsyncOpen: (open: boolean, animate: boolean) => void;\n\t/** Cancels pending frames and timers. Call from `disconnectedCallback`. */\n\tdispose: () => void;\n};\n\nexport function createCollapsibleOpenAnimation({ getTransitionMs, setDetailsOpen, setExpanded }: CollapsibleOpenAnimationContext): CollapsibleOpenAnimation {\n\tlet cancelPendingFrame: (() => void) | undefined;\n\tlet collapseTimeout: ReturnType<typeof setTimeout> | undefined;\n\n\tconst clearPending = (): void => {\n\t\tcancelPendingFrame?.();\n\t\tcancelPendingFrame = undefined;\n\t\tclearTimeout(collapseTimeout);\n\t\tcollapseTimeout = undefined;\n\t};\n\n\treturn {\n\t\tsyncOpen(open, animate) {\n\t\t\tclearPending();\n\n\t\t\tif (open) {\n\t\t\t\tsetDetailsOpen(true);\n\t\t\t\tif (animate) {\n\t\t\t\t\tcancelPendingFrame = onNextFrame(() => setExpanded(true));\n\t\t\t\t} else {\n\t\t\t\t\tsetExpanded(true);\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tsetExpanded(false);\n\t\t\tif (animate) {\n\t\t\t\tcollapseTimeout = setTimeout(() => setDetailsOpen(false), getTransitionMs());\n\t\t\t} else {\n\t\t\t\tsetDetailsOpen(false);\n\t\t\t}\n\t\t},\n\t\tdispose: clearPending,\n\t};\n}\n","import type { CollapsibleCallbacksPropType } from '../../../schema';\nimport { dispatchDomEvent, KolEvent } from '../../../utils/events';\n\n/**\n * Delay between flipping `_open` and announcing the new state.\n *\n * `_open` is declared `@Prop({ mutable: true, reflect: true })`, and Stencil writes the reflected\n * attribute asynchronously. Announcing synchronously would let a consumer callback read a stale\n * `_open` attribute off the host, so the announcement is deferred by one macrotask window.\n */\nconst ANNOUNCE_DELAY_MS = 25;\n\nexport type CollapsibleToggleContext = {\n\t/** The host element the DOM events are dispatched on. */\n\tgetHost: () => HTMLElement | undefined;\n\t/** The normalized `_on` render prop. Read at announce time so late assignments are picked up. */\n\tgetOn: () => CollapsibleCallbacksPropType<boolean>;\n\t/** Whether the collapsible currently refuses interaction. */\n\tisDisabled: () => boolean;\n\t/** The current normalized open state. */\n\tisOpen: () => boolean;\n\t/** Writes the component's mutable `_open` prop, which its watcher turns into rendered state. */\n\tsetOpen: (open: boolean) => void;\n};\n\n/**\n * Builds the `<summary>` click handler shared by `kol-accordion` and `kol-details`.\n *\n * The user agent's own toggle is suppressed: it flips `open` synchronously, which skips the\n * collapse transition and races the component's controlled state. Everything else follows the\n * native element — `<summary>` is still the focusable control, and Enter/Space arrive here as\n * clicks, so keyboard operation needs no extra handling.\n *\n * The new state is captured synchronously, before the deferred announcement, so two quick toggles\n * report their own value rather than the same final one twice.\n */\nexport function createCollapsibleToggleHandler({ getHost, getOn, isDisabled, isOpen, setOpen }: CollapsibleToggleContext): (event: MouseEvent) => void {\n\treturn (event: MouseEvent): void => {\n\t\tevent.preventDefault();\n\n\t\tif (isDisabled()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst open = !isOpen();\n\t\tsetOpen(open);\n\n\t\tsetTimeout(() => {\n\t\t\tconst host = getHost();\n\t\t\tif (host) {\n\t\t\t\tdispatchDomEvent(host, KolEvent.click, open);\n\t\t\t\tdispatchDomEvent(host, KolEvent.toggle, open);\n\t\t\t}\n\n\t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AAC,OAAO,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,IAAA,CAAA,EAAA,EAAG,KAAK,EAAE,IAAI,CAAC;AACzB,YAAA,CAAA,EAAA,GAAA,EAAE,CAAC,QAAQ,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,IAAA,CAAA,EAAA,EAAG,KAAK,EAAE,IAAI,CAAC;SAC1B,EAAE,iBAAiB,CAAC;AACtB,KAAC;AACF;;;;"}
@@ -2,13 +2,13 @@ import type { JSX } from '../../stencil-public-runtime';
2
2
  import { BaseWebComponent } from '../../internal/functional-components/base-web-component';
3
3
  import type { WebComponentInterface } from '../../internal/functional-components/generic-types';
4
4
  import type { ToolbarApi } from '../../internal/functional-components/toolbar/api';
5
- import type { ToolbarButtonItem, ToolbarLinkItem } from '../../internal/functional-components/toolbar/item';
5
+ import type { ToolbarButtonItem, ToolbarHRItem, ToolbarLinkItem } from '../../internal/functional-components/toolbar/item';
6
6
  import type { ClickableElement, FocusableElement, KolFocusOptions, ToolbarItemsPropType, ToolbarProps } from '../../schema';
7
7
  import type { OrientationPropType } from '../../schema/props/orientation';
8
8
  export declare class KolToolbar extends BaseWebComponent<ToolbarApi> implements ClickableElement, FocusableElement, ToolbarProps, WebComponentInterface<ToolbarApi> {
9
9
  protected readonly host?: HTMLKolToolbarElement;
10
10
  currentIndex: number;
11
- itemRecords: Array<ToolbarButtonItem | ToolbarLinkItem>;
11
+ itemRecords: Array<ToolbarButtonItem | ToolbarLinkItem | ToolbarHRItem>;
12
12
  location: string;
13
13
  private unsubscribeOnLocationChange?;
14
14
  _label: string;
@@ -2534,7 +2534,6 @@ export namespace Components {
2534
2534
  "_value"?: StencilUnknown;
2535
2535
  /**
2536
2536
  * Defines which variant should be used for presentation.
2537
- * @default 'normal'
2538
2537
  */
2539
2538
  "_variant"?: VariantClassNamePropType;
2540
2539
  /**
@@ -6340,7 +6339,6 @@ declare namespace LocalJSX {
6340
6339
  "_value"?: StencilUnknown;
6341
6340
  /**
6342
6341
  * Defines which variant should be used for presentation.
6343
- * @default 'normal'
6344
6342
  */
6345
6343
  "_variant"?: VariantClassNamePropType;
6346
6344
  }
@@ -6,6 +6,7 @@ export type TextAreaFCProps = DefaultInputProps<JSXBase.TextareaHTMLAttributes<H
6
6
  value?: string;
7
7
  touched?: boolean;
8
8
  msg?: Stringified<MsgPropType>;
9
+ spellcheck?: boolean;
9
10
  } & {
10
11
  [key: `aria-${string}`]: unknown;
11
12
  [key: `data-${string}`]: unknown;
@@ -1,6 +1,6 @@
1
1
  import type { KolFocusOptions } from '../../../schema';
2
2
  import type { ApiFromConfig } from '../generic-types';
3
- import type { ToolbarButtonItem, ToolbarLinkItem } from './item';
3
+ import type { ToolbarButtonItem, ToolbarHRItem, ToolbarLinkItem } from './item';
4
4
  export declare const toolbarPropsConfig: {
5
5
  readonly required: readonly [import("../../props").PropDefinition<string, import("../../props").LabelWithExpertSlotProp>, import("../../props").PropDefinition<import("../../../schema").ToolbarItemsPropType, import("../../props").ToolbarItemsProp>];
6
6
  readonly optional: readonly [import("../../props").PropDefinition<import("../../props").InternalPropValue<import("../../props").OrientationProp>, import("../../props").OrientationProp>];
@@ -12,7 +12,7 @@ export type ToolbarApi = ApiFromConfig<typeof toolbarPropsConfig, {
12
12
  };
13
13
  States: {
14
14
  currentIndex: number;
15
- itemRecords: Array<ToolbarButtonItem | ToolbarLinkItem>;
15
+ itemRecords: Array<ToolbarButtonItem | ToolbarLinkItem | ToolbarHRItem>;
16
16
  location: string;
17
17
  };
18
18
  }>;
@@ -4,7 +4,7 @@ import type { FunctionalComponentProps } from '../generic-types';
4
4
  import type { LinkApi } from '../link/api';
5
5
  type ToolbarItemBase = {
6
6
  disabled: boolean;
7
- getElement(): HTMLAnchorElement | HTMLButtonElement | undefined;
7
+ getElement(): HTMLAnchorElement | HTMLButtonElement | HTMLHRElement | undefined;
8
8
  refWrapper: (element?: HTMLElement) => void;
9
9
  syncListeners(): void;
10
10
  destroy(): void;
@@ -17,5 +17,8 @@ export type ToolbarLinkItem = ToolbarItemBase & {
17
17
  type: 'link';
18
18
  getFcProps(tabIndex: number, location: string): FunctionalComponentProps<LinkApi>;
19
19
  };
20
- export declare const createToolbarItem: (item: ToolbarItemPropType, getFlagHost: () => HTMLElement | undefined) => ToolbarButtonItem | ToolbarLinkItem;
20
+ export type ToolbarHRItem = ToolbarItemBase & {
21
+ type: 'hr';
22
+ };
23
+ export declare const createToolbarItem: (item: ToolbarItemPropType, getFlagHost: () => HTMLElement | undefined) => ToolbarButtonItem | ToolbarLinkItem | ToolbarHRItem;
21
24
  export {};
@@ -4,7 +4,9 @@ export type ToolbarItemPropType = ({
4
4
  type: 'button';
5
5
  } & InternalButtonProps) | ({
6
6
  type: 'link';
7
- } & LinkProps);
7
+ } & LinkProps) | {
8
+ type: 'hr';
9
+ };
8
10
  export type ToolbarItemsPropType = ToolbarItemPropType[];
9
11
  export type PropToolbarItems = {
10
12
  items: ToolbarItemsPropType;
@@ -29,7 +29,7 @@ The popover uses the native HTML Popover API for lightweight, non-modal overlays
29
29
  | `_tooltipAlign` | `_tooltip-align` | Defines where to show the Tooltip preferably: top, right, bottom or left. | `"bottom" \| "left" \| "right" \| "top" \| undefined` | `'top'` |
30
30
  | `_type` | `_type` | Defines either the type of the component or of the components interactive element. | `"button" \| "reset" \| "submit" \| undefined` | `'button'` |
31
31
  | `_value` | `_value` | Defines the value of the element. | `boolean \| null \| number \| object \| string \| undefined` | `undefined` |
32
- | `_variant` | `_variant` | Defines which variant should be used for presentation. | `string \| string[] \| undefined` | `'normal'` |
32
+ | `_variant` | `_variant` | Defines which variant should be used for presentation. | `string \| string[] \| undefined` | `undefined` |
33
33
 
34
34
 
35
35
  ## Methods
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@public-ui/components",
3
- "version": "4.5.0-rc.6",
3
+ "version": "4.5.0-rc.7",
4
4
  "license": "EUPL-1.2",
5
5
  "homepage": "https://public-ui.github.io",
6
6
  "repository": {
@@ -122,9 +122,9 @@
122
122
  "tslib": "2.8.1",
123
123
  "twig": "3.0.0",
124
124
  "typescript": "5.9.3",
125
+ "@public-ui/icons": "0.0.0",
125
126
  "@public-ui/eslint-config": "4.3.0-rc.1",
126
- "@public-ui/stylelint-rules": "4.1.2-rc.1",
127
- "@public-ui/icons": "0.0.0"
127
+ "@public-ui/stylelint-rules": "4.1.2-rc.1"
128
128
  },
129
129
  "peerDependencies": {
130
130
  "adopted-style-sheets": "1.1.9-rc.25"
@@ -1 +0,0 @@
1
- {"version":3,"file":"base-web-component-C8MLLGxi.js","sources":["src/schema/validators/options.ts","src/internal/props/options-with-optgroup.ts","src/internal/props/select-value.ts","src/internal/functional-components/select/api.tsx","src/internal/functional-components/form-field/select.tsx","src/internal/functional-components/form-field/select-value.ts","src/internal/functional-components/select/base-web-component.tsx"],"sourcesContent":["import { containsOnlyNumbers, hasEnoughReadableChars } from '../props';\nimport { a11yHint } from '../utils';\n\nimport type { Optgroup, SelectOption } from '../types';\nexport const validateInputSelectOptions = <T>(option: SelectOption<T>): boolean => {\n\tif (typeof option === 'object' && option !== null) {\n\t\tif (typeof option.label === 'string' && option.label.length > 0) {\n\t\t\toption.disabled = option.disabled === true;\n\t\t\toption.label = `${option.label}`.trim();\n\t\t\tif (hasEnoughReadableChars(option.label, 3) === false && containsOnlyNumbers(option.label) === false) {\n\t\t\t\ta11yHint(`A differing Aria-Label (${option.label}) is inaccessible. A differing Aria-Label should consist of at least three readable characters.`);\n\t\t\t}\n\t\t\tif (Array.isArray((option as Optgroup<T>).options)) {\n\t\t\t\treturn (\n\t\t\t\t\t(option as Optgroup<T>).options.find((item) => {\n\t\t\t\t\t\treturn validateInputSelectOptions(item) === false;\n\t\t\t\t\t}) === undefined\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn true;\n\t\t} else if (typeof option.label === 'number') {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n};\n","import type { Optgroup, Option, OptionsWithOptgroupPropType, StencilUnknown } from '../../schema';\nimport { parseJson, validateInputSelectOptions } from '../../schema';\nimport type { Prop } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\n\nexport type SelectOptionsList = (Option<StencilUnknown> | Optgroup<StencilUnknown>)[];\n\n/**\n * Options prop for `kol-select`\n *\n * Description:\n * Options and optgroups, as an array or as a JSON string when it is passed through an HTML attribute.\n * Every option needs a non-empty string or a number as `label`; one invalid option rejects the whole\n * list. An empty string is rejected as well, because Stencil can pass it for an empty array.\n *\n * The validation is `validateInputSelectOptions` of the schema, which also normalizes each option in\n * place: `disabled` becomes a boolean and a string `label` is trimmed.\n */\nexport type OptionsWithOptgroupProp = Prop<'options', OptionsWithOptgroupPropType, SelectOptionsList>;\n\nfunction normalizeOptionsWithOptgroup(value: unknown): SelectOptionsList | never {\n\tconst parsed = typeof value === 'string' ? parseJson<unknown>(value) : value;\n\tif (Array.isArray(parsed) && parsed.every((option) => validateInputSelectOptions(option as Option<StencilUnknown>))) {\n\t\treturn parsed as SelectOptionsList;\n\t}\n\tthrow new Error('Invalid select options');\n}\n\nexport const optionsWithOptgroupProp = createPropDefinition<OptionsWithOptgroupProp>('options', [], normalizeOptionsWithOptgroup);\n","import type { StencilUnknown, Stringified } from '../../schema';\nimport type { Prop } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\n\n/**\n * Value prop of `kol-select`\n *\n * Description:\n * The selected values; a single value is wrapped into a list. A JSON string is not parsed, it is a\n * value of its own. The default is the empty list. `kol-select` keeps `null` as `[null]` instead of\n * applying this definition to it.\n */\nexport type SelectValueProp = Prop<'value', Stringified<StencilUnknown[]> | Stringified<StencilUnknown>, StencilUnknown[]>;\nexport const selectValueProp = createPropDefinition<SelectValueProp>('value', [], (value: unknown) =>\n\tArray.isArray(value) ? (value as StencilUnknown[]) : [value as StencilUnknown],\n);\n","import {\n\taccessKeyProp,\n\thorizontalIconsProp,\n\tmultipleProp,\n\toptionsWithOptgroupProp,\n\trequiredProp,\n\trowsProp,\n\tselectValueProp,\n\tshortKeyProp,\n\ttabIndexProp,\n\tvariantProp,\n} from '../../props';\nimport type { FormFieldBaseStates } from '../form-field/api';\nimport { formFieldBasePropsConfig } from '../form-field/api';\nimport type { ApiFromConfig, PropsConfigShape } from '../generic-types';\n\nexport const selectPropsConfig = {\n\trequired: [...formFieldBasePropsConfig.required],\n\toptional: [\n\t\t...formFieldBasePropsConfig.optional,\n\t\taccessKeyProp,\n\t\thorizontalIconsProp,\n\t\tmultipleProp,\n\t\toptionsWithOptgroupProp,\n\t\trequiredProp,\n\t\trowsProp,\n\t\tselectValueProp,\n\t\tshortKeyProp,\n\t\ttabIndexProp,\n\t\tvariantProp,\n\t],\n} as const satisfies PropsConfigShape;\n\nexport type SelectApi = ApiFromConfig<typeof selectPropsConfig, { States: FormFieldBaseStates }>;\n","import { Fragment, h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport type { MsgPropType, SelectOption, StencilUnknown, Stringified, W3CInputValue } from '../../../schema';\nimport { getMsgType, isMsgDefinedAndInputTouched } from '../../../schema';\nimport clsx from '../../../utils/clsx';\nimport { getBlockBem } from '../bem-root-node/block-bem';\nimport type { DefaultInputProps } from './default-input-props';\nimport { getDefaultInputProps } from './default-input-props';\n\nconst selectBem = getBlockBem('kol-select');\n\ntype SelectAttributes = JSXBase.SelectHTMLAttributes<HTMLSelectElement>;\n\nexport type SelectOptionFCProps = Omit<JSXBase.OptionHTMLAttributes<HTMLOptionElement>, 'value' | 'label'> & {\n\t/** The value, or the list of values, of the selected options. */\n\tselectedValue?: StencilUnknown | StencilUnknown[];\n\tvalue: StencilUnknown;\n\tlabel: W3CInputValue;\n\t/** The key of the option, rendered as its native value; the field maps it back to `value`. */\n\tindex?: string | number;\n};\n\nexport type SelectOptionListFCProps = {\n\t/** Key prefix of the options in an optgroup. */\n\tpreKey?: string;\n\tdisabled?: boolean;\n\tvalue?: StencilUnknown | StencilUnknown[];\n\toptions?: SelectOption<StencilUnknown>[];\n\tOptionProps?: Omit<JSXBase.OptionHTMLAttributes<HTMLOptionElement>, 'value' | 'label'>;\n\tOptionGroupProps?: Omit<JSXBase.OptgroupHTMLAttributes<HTMLOptGroupElement>, 'label'>;\n};\n\nexport type SelectFCProps = DefaultInputProps<SelectAttributes> &\n\tSelectOptionListFCProps & {\n\t\ttouched?: boolean;\n\t\tmsg?: Stringified<MsgPropType>;\n\t} & {\n\t\t[key: `aria-${string}`]: unknown;\n\t\t[key: `data-${string}`]: unknown;\n\t};\n\n/**\n * Native `<option>`. Its native value is the key (`-<index>`, in an optgroup `-<group>-<index>`), not\n * the option value, because a native value can only be a string.\n */\nexport const SelectOptionFC: FC<SelectOptionFCProps> = ({ class: classNames, index, selectedValue, selected, value, label, disabled, ...other }) => {\n\tconst selectedValues = selectedValue === undefined ? [] : Array.isArray(selectedValue) ? selectedValue : [selectedValue];\n\tconst isSelected = selected || selectedValues.includes(value);\n\n\treturn (\n\t\t<option\n\t\t\tclass={clsx(selectBem('option', { selected: Boolean(isSelected), disabled: Boolean(disabled) }), classNames)}\n\t\t\tselected={isSelected}\n\t\t\tdisabled={disabled}\n\t\t\tvalue={index}\n\t\t\t{...other}\n\t\t>\n\t\t\t{label}\n\t\t</option>\n\t);\n};\n\n/** Options and optgroups of a native select, recursively; an optgroup prefixes the keys of its options. */\nexport const SelectOptionListFC: FC<SelectOptionListFCProps> = ({\n\tpreKey,\n\toptions,\n\tdisabled,\n\tvalue: selectedValue,\n\tOptionProps = {},\n\tOptionGroupProps = {},\n}) => {\n\tif (!options?.length) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{options.map((option, index) => {\n\t\t\t\tconst key = [preKey, `-${index}`].join('');\n\n\t\t\t\tif ('options' in option) {\n\t\t\t\t\tconst { label, ...other } = option;\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<optgroup\n\t\t\t\t\t\t\tclass={selectBem('optgroup', { disabled: Boolean(disabled) })}\n\t\t\t\t\t\t\tkey={key}\n\t\t\t\t\t\t\t{...OptionGroupProps}\n\t\t\t\t\t\t\tlabel={label?.toString()}\n\t\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<SelectOptionListFC OptionGroupProps={OptionGroupProps} OptionProps={OptionProps} value={selectedValue} preKey={key} {...other} />\n\t\t\t\t\t\t</optgroup>\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif ('value' in option) {\n\t\t\t\t\treturn <SelectOptionFC key={key} {...OptionProps} index={key} selectedValue={selectedValue} {...option} />;\n\t\t\t\t}\n\n\t\t\t\treturn null;\n\t\t\t})}\n\t\t</>\n\t);\n};\n\n/**\n * Native `<select>` of a form field with its options. The select itself is the root of the\n * `kol-select` block, so the block classes are set on it directly instead of through `BemRootNodeFC`.\n */\nexport const SelectFC: FC<SelectFCProps> = (props) => {\n\tconst {\n\t\tclass: classNames,\n\t\tmsg,\n\t\ttouched,\n\t\tdisabled,\n\t\trequired,\n\t\toptions,\n\t\tvalue,\n\t\tOptionProps,\n\t\tOptionGroupProps,\n\t\tariaDescribedBy,\n\t\thideLabel,\n\t\tlabel,\n\t\t...other\n\t} = props;\n\n\tconst selectProps: SelectAttributes = {\n\t\tclass: clsx(\n\t\t\tselectBem({\n\t\t\t\tdisabled: Boolean(disabled),\n\t\t\t\trequired: Boolean(required),\n\t\t\t\ttouched: Boolean(touched),\n\t\t\t\t...(isMsgDefinedAndInputTouched(msg, touched) ? { [getMsgType(msg) as string]: true } : {}),\n\t\t\t}),\n\t\t\tclassNames,\n\t\t),\n\t\trequired: required,\n\t\tdisabled: disabled,\n\t\t...getDefaultInputProps({ ariaDescribedBy, hideLabel, label }),\n\t\t...other,\n\t};\n\n\treturn (\n\t\t<select {...selectProps}>\n\t\t\t<SelectOptionListFC options={options} value={value} OptionGroupProps={OptionGroupProps} OptionProps={OptionProps} />\n\t\t</select>\n\t);\n};\n","import type { Option, StencilUnknown } from '../../../schema';\nimport type { SelectOptionsList } from '../../props/options-with-optgroup';\n\n/**\n * Throws when the shape of a `_value` does not match `_multiple`: a list in single mode, or a single\n * value in multiple mode. The field throws from its watcher, so the value is not applied. `source`\n * names the value in the message: the received value of a `_value` change, or the current value on\n * a `_multiple` change.\n */\nexport const assertSelectValueMatchesMultiplicity = (value: unknown, multiple: boolean, source: 'current' | 'received'): void => {\n\tconst isArray = Array.isArray(value);\n\n\tif (multiple) {\n\t\tif (value !== undefined && !isArray) {\n\t\t\tthrow new Error(\n\t\t\t\t`↑ The schema for the property (_value) is not valid for multiple mode. Expected an array. The value will not be changed. (${source} = ${JSON.stringify(value)})`,\n\t\t\t);\n\t\t}\n\t} else if (isArray) {\n\t\tthrow new Error(\n\t\t\t`↑ The schema for the property (_value) is not valid for single mode. Expected a single value. The value will not be changed. (${source} = ${JSON.stringify(value)})`,\n\t\t);\n\t}\n};\n\n/** The options of the list, with the options of each optgroup in place of the optgroup. */\nconst flattenSelectOptions = (options: SelectOptionsList): Option<StencilUnknown>[] =>\n\toptions.flatMap((entry) => ('options' in entry && Array.isArray(entry.options) ? flattenSelectOptions(entry.options) : [entry as Option<StencilUnknown>]));\n\n/**\n * Keeps only the values that belong to an option. Then, in single mode (`multiple === false`, not\n * merely falsy) without a value, the value becomes the value of the first enabled option, which is\n * the option the native select shows. Without options, the value is kept as it is, because the\n * options can follow the value.\n */\nexport const normalizeSelectValue = (value: StencilUnknown[], options: SelectOptionsList, multiple: boolean | undefined): StencilUnknown[] => {\n\tif (options.length === 0) {\n\t\treturn value;\n\t}\n\tconst flatOptions = flattenSelectOptions(options);\n\tconst optionValues = flatOptions.map((option) => option.value);\n\tconst filtered = value.every((item) => optionValues.includes(item)) ? value : value.filter((item) => optionValues.includes(item));\n\tif (multiple === false && filtered.length === 0) {\n\t\tconst firstEnabled = flatOptions.find((option) => option.disabled !== true);\n\t\treturn firstEnabled ? [firstEnabled.value] : filtered;\n\t}\n\treturn filtered;\n};\n","import { h, type JSX } from '@stencil/core';\nimport type {\n\tIconsHorizontalPropType,\n\tMultiplePropType,\n\tOption,\n\tOptionsWithOptgroupPropType,\n\tSelectOption,\n\tShortKeyPropType,\n\tStencilUnknown,\n\tStringified,\n\tVariantClassNamePropType,\n} from '../../../schema';\nimport { validateAccessAndShortKey } from '../../../schema/validators/access-and-short-key';\nimport clsx from '../../../utils/clsx';\nimport type { CtaRef } from '../../../utils/element-interaction';\nimport {\n\taccessKeyProp,\n\thorizontalIconsProp,\n\tmultipleProp,\n\toptionsWithOptgroupProp,\n\trequiredProp,\n\trowsProp,\n\tselectValueProp,\n\tshortKeyProp,\n\ttabIndexProp,\n\tvariantProp,\n} from '../../props';\nimport { getInputAdornments } from '../form-field/adornments';\nimport { BaseFormFieldWebComponent } from '../form-field/base-web-component';\nimport { FormFieldFC } from '../form-field/component';\nimport { InputContainerFC } from '../form-field/input-container';\nimport { fillKeyOptionMap } from '../form-field/options';\nimport type { SelectFCProps } from '../form-field/select';\nimport { SelectFC } from '../form-field/select';\nimport { assertSelectValueMatchesMultiplicity, normalizeSelectValue } from '../form-field/select-value';\nimport type { SelectApi } from './api';\n\n/**\n * Shared orchestrator implementation of `kol-select` and the page size select of the pagination\n * (`PageSizeSelect`): the option map, the value list and its normalization, the native select\n * events and the render.\n *\n * `kol-select` keeps what Stencil has to see in the component class itself (DD16).\n */\nexport abstract class BaseSelectWebComponent extends BaseFormFieldWebComponent<SelectApi> {\n\t/** Read for the multiplicity check and the first option preselection, like the raw prop. */\n\tpublic abstract _multiple?: boolean;\n\t/** Written on user input. */\n\tpublic abstract _value?: Stringified<StencilUnknown[]> | Stringified<StencilUnknown>;\n\n\tprotected abstract readonly ctaRef: CtaRef<HTMLSelectElement>;\n\n\t/** Option of each native option value (`-<index>`). */\n\tprivate readonly keyOptionMap = new Map<string, Option<StencilUnknown>>();\n\n\t/**\n\t * Whether the field has a value, for the class `kol-form-field--has-value`. It starts as `true`\n\t * and follows each `change`; it does not trigger a render of its own.\n\t */\n\tprivate hasValue = true;\n\n\t// --- Prop application (the concrete element's watchers delegate here) ---\n\n\tprotected applyAccessKey(value?: string): void {\n\t\taccessKeyProp.apply(value, (v) => this.setRenderProp('accessKey', v));\n\t\tvalidateAccessAndShortKey(value, this.getShortKeyProp());\n\t}\n\n\tprotected applyShortKey(value?: ShortKeyPropType): void {\n\t\tshortKeyProp.apply(value, (v) => this.setRenderProp('shortKey', v));\n\t\tvalidateAccessAndShortKey(this.getAccessKeyProp(), value);\n\t}\n\n\tprotected abstract getAccessKeyProp(): string | undefined;\n\tprotected abstract getShortKeyProp(): ShortKeyPropType | undefined;\n\n\tprotected applyIcons(value?: IconsHorizontalPropType): void {\n\t\thorizontalIconsProp.apply(value, (v) => this.setRenderProp('icons', v));\n\t}\n\n\tprotected applyMultiple(value?: MultiplePropType): void {\n\t\tassertSelectValueMatchesMultiplicity(this._value, value === true, 'current');\n\t\tmultipleProp.apply(value, (v) => {\n\t\t\tthis.setRenderProp('multiple', v);\n\t\t\tthis.setRenderProp('value', normalizeSelectValue(this.getRenderProp('value'), this.getRenderProp('options'), this._multiple));\n\t\t});\n\t}\n\n\t/** The option map keeps its entries while the list is empty. */\n\tprotected applyOptions(value?: OptionsWithOptgroupPropType): void {\n\t\toptionsWithOptgroupProp.apply(value, (v) => {\n\t\t\tthis.setRenderProp('options', v);\n\t\t\tif (v.length > 0) {\n\t\t\t\tthis.keyOptionMap.clear();\n\t\t\t\tfillKeyOptionMap(this.keyOptionMap, v as SelectOption<StencilUnknown>[]);\n\t\t\t\tthis.setRenderProp('value', normalizeSelectValue(this.getRenderProp('value'), v, this._multiple));\n\t\t\t}\n\t\t});\n\t}\n\n\tprotected applyRequired(value?: boolean): void {\n\t\trequiredProp.apply(value, (v) => this.setRenderProp('required', v));\n\t}\n\n\tprotected applyRows(value?: number): void {\n\t\trowsProp.apply(value, (v) => this.setRenderProp('rows', v));\n\t}\n\n\tprotected applyTabIndex(value?: number): void {\n\t\ttabIndexProp.apply(value, (v) => this.setRenderProp('tabIndex', v));\n\t}\n\n\t/**\n\t * A single value is wrapped into a list and `null` is kept as `[null]`. Only a `_value` change sets\n\t * the form value; the preselection on an `_options` or `_multiple` change does not.\n\t */\n\tprotected applyValue(value?: Stringified<StencilUnknown[]> | Stringified<StencilUnknown>): void {\n\t\tassertSelectValueMatchesMultiplicity(value, this._multiple === true, 'received');\n\t\tconst setValue = (list: StencilUnknown[]): void => {\n\t\t\tconst normalized = normalizeSelectValue(list, this.getRenderProp('options'), this._multiple);\n\t\t\tthis.setRenderProp('value', normalized);\n\t\t\tthis.formAssociation.setFormAssociatedValue(this.getModelValue());\n\t\t};\n\t\tif (value === null) {\n\t\t\tsetValue([null]);\n\t\t} else {\n\t\t\tselectValueProp.apply(value, setValue);\n\t\t}\n\t}\n\n\tprotected applyVariant(value?: VariantClassNamePropType): void {\n\t\tvariantProp.apply(value, (v) => this.setRenderProp('variant', v));\n\t}\n\n\t// --- Value ---\n\n\t/** The value list with `_multiple`, otherwise its first entry (the list itself when empty). */\n\tprotected getModelValue(): StencilUnknown[] | StencilUnknown {\n\t\tconst value = this.getRenderProp('value');\n\t\tif (this._multiple) {\n\t\t\treturn value;\n\t\t}\n\t\treturn Array.isArray(value) && value.length > 0 ? value[0] : value;\n\t}\n\n\t// --- Event handling of the native select ---\n\n\tprivate readonly handleSelectInput = (event: Event): void => {\n\t\tconst selectedValues = Array.from(this.ctaRef.el?.options || [])\n\t\t\t.filter((option) => option.selected)\n\t\t\t.map((option) => this.keyOptionMap.get(option.value)?.value);\n\n\t\tif (this._multiple) {\n\t\t\tthis._value = selectedValues;\n\t\t\tthis.handleInput(event, selectedValues);\n\t\t} else {\n\t\t\tconst singleValue: StencilUnknown = selectedValues.length > 0 ? selectedValues[0] : undefined;\n\t\t\tthis._value = singleValue as Stringified<StencilUnknown>;\n\t\t\tthis.handleInput(event, singleValue);\n\t\t}\n\t};\n\n\tprivate readonly handleSelectChange = (event: Event): void => {\n\t\tconst value = this._value as StencilUnknown;\n\t\tthis.handleChange(event, value);\n\t\tthis.hasValue = !!value;\n\t};\n\n\t// --- Render ---\n\n\tprivate getSelectProps(): SelectFCProps {\n\t\tconst { ariaDescribedBy, hasError } = this.getAria();\n\t\tconst multiple = this.getRenderProp('multiple');\n\t\tconst shortKey = this.getRenderProp('shortKey');\n\n\t\treturn {\n\t\t\tid: this.getState('id'),\n\t\t\thideLabel: this.getRenderProp('hideLabel'),\n\t\t\tlabel: this.getRenderProp('label'),\n\t\t\tvalue: this.getRenderProp('value'),\n\t\t\toptions: this.getRenderProp('options'),\n\t\t\taccessKey: this.getRenderProp('accessKey') || undefined,\n\t\t\tdisabled: this.getRenderProp('disabled'),\n\t\t\tname: this.getRenderProp('name') || undefined,\n\t\t\t'aria-invalid': hasError ? 'true' : undefined,\n\t\t\tariaDescribedBy,\n\t\t\tsize: multiple ? this.getRenderProp('rows') : undefined,\n\t\t\tmultiple,\n\t\t\trequired: this.getRenderProp('required'),\n\t\t\ttouched: this.getRenderProp('touched'),\n\t\t\tmsg: this.getRenderProp('msg'),\n\t\t\t...(shortKey ? { 'aria-keyshortcuts': shortKey } : {}),\n\t\t\tref: this.ctaRef,\n\t\t\tonBlur: this.handleBlur,\n\t\t\tonChange: this.handleSelectChange,\n\t\t\tonClick: this.handleClick,\n\t\t\tonFocus: this.handleFocus,\n\t\t\tonInput: this.handleSelectInput,\n\t\t\tonKeyDown: this.handleKeyDown,\n\t\t};\n\t}\n\n\tprotected renderSelectField(): JSX.Element {\n\t\tconst disabled = this.getRenderProp('disabled');\n\t\tconst { startAdornment, endAdornment } = getInputAdornments({ icons: this.getRenderProp('icons') });\n\n\t\treturn (\n\t\t\t<FormFieldFC\n\t\t\t\t{...this.getFormFieldProps({\n\t\t\t\t\tclass: clsx('kol-form-field-select', { 'kol-form-field--has-value': this.hasValue }),\n\t\t\t\t\taccessKey: this.getRenderProp('accessKey') || undefined,\n\t\t\t\t\tshortKey: this.getRenderProp('shortKey') || undefined,\n\t\t\t\t\trequired: this.getRenderProp('required'),\n\t\t\t\t\tvariant: this.getRenderProp('variant'),\n\t\t\t\t})}\n\t\t\t\tonClick={() => this.ctaRef.el?.focus()}\n\t\t\t>\n\t\t\t\t<InputContainerFC\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tmsg={this.getRenderProp('msg')}\n\t\t\t\t\ttouched={this.getRenderProp('touched')}\n\t\t\t\t\tstartAdornment={startAdornment}\n\t\t\t\t\tendAdornment={endAdornment}\n\t\t\t\t>\n\t\t\t\t\t<SelectFC {...this.getSelectProps()} />\n\t\t\t\t</InputContainerFC>\n\t\t\t</FormFieldFC>\n\t\t);\n\t}\n}\n"],"names":["hasEnoughReadableChars","containsOnlyNumbers","a11yHint","parseJson","createPropDefinition","formFieldBasePropsConfig","accessKeyProp","horizontalIconsProp","multipleProp","requiredProp","rowsProp","shortKeyProp","tabIndexProp","variantProp","getBlockBem","index","__rest","h","clsx","Fragment","isMsgDefinedAndInputTouched","getMsgType","getDefaultInputProps","BaseFormFieldWebComponent","validateAccessAndShortKey","fillKeyOptionMap","getInputAdornments","FormFieldFC","InputContainerFC"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAIO,MAAM,0BAA0B,GAAG,CAAI,MAAuB,KAAa;IACjF,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI,EAAE;AAClD,QAAA,IAAI,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;YAChE,MAAM,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,KAAK,IAAI;YAC1C,MAAM,CAAC,KAAK,GAAG,CAAG,EAAA,MAAM,CAAC,KAAK,CAAE,CAAA,CAAC,IAAI,EAAE;YACvC,IAAIA,4BAAsB,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,KAAK,IAAIC,yBAAmB,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,KAAK,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Ga,iCAAkB,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,CAAC;AAEnG,QAAA,QACCT,OAAC,CAAAU,eAAW,oBACP,IAAI,CAAC,iBAAiB,CAAC;AAC1B,YAAA,KAAK,EAAET,SAAI,CAAC,uBAAuB,EAAE,EAAE,2BAA2B,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC;YACpF,SAAS,EAAE,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,IAAI,SAAS;YACvD,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,IAAI,SAAS;AACrD,YAAA,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC;AACxC,YAAA,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC;SACtC,CAAC,IACF,OAAO,EAAE,MAAK,UAAC,OAAA,CAAA,EAAA,GAAA,IAAI,CAAC,MAAM,CAAC,EAAE,0CAAE,KAAK,EAAE,CAAA,EAAA,EAAA,CAAA,EAEtCD,OAAA,CAACW,+BAAgB,EAAA,EAChB,QAAQ,EAAE,QAAQ,EAClB,GAAG,EAAE,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,EAC9B,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,EACtC,cAAc,EAAE,cAAc,EAC9B,YAAY,EAAE,YAAY,EAAA,EAE1BX,OAAC,CAAA,QAAQ,EAAK,MAAA,CAAA,MAAA,CAAA,EAAA,EAAA,IAAI,CAAC,cAAc,EAAE,CAAI,CAAA,CACrB,CACN;;AAGhB;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"contrast-kLMuDQLl.js","sources":["src/schema/utils/contrast.ts"],"sourcesContent":["import type { RGB } from 'color-convert';\nimport { hex } from 'wcag-contrast';\n\nimport rgba from 'color-rgba';\nimport rgbaConvert from 'rgba-convert';\n\ntype RGBA = [number, number, number, number];\n\n// const calcColor = (color: RGBA, diff: number): RGBA => [\n// Math.max(Math.min(Math.round(color[0] + (color[0] / 100 + 1) * diff), 255), 0),\n// Math.max(Math.min(Math.round(color[1] + (color[1] / 100 + 1) * diff), 255), 0),\n// Math.max(Math.min(Math.round(color[2] + (color[2] / 100 + 1) * diff), 255), 0),\n// color[3],\n// ];\n\n// const relativeLuminanceFormel = (c: number): number => {\n// if (c <= 0.03928) {\n// return c / 12.92;\n// } else {\n// return ((c + 0.055) / 1.055) ** 2.4;\n// }\n// };\n// // https://www.w3.org/TR/WCAG20/#contrast-ratiodef\n// const relativeLuminance = (r: number, g: number, b: number): number => {\n// return (\n// 0.2126 * relativeLuminanceFormel(r) + 0.7152 * relativeLuminanceFormel(g) + 0.0722 * relativeLuminanceFormel(b)\n// );\n// };\n\n// https://css-tricks.com/snippets/javascript/random-hex-color/\n// const randomColor = () => Math.floor(Math.random() * 16777215).toString(16);\n\n// https://24ways.org/2010/calculating-color-contrast/\nexport const getContrastYIQ = (r: number, g: number, b: number): number => {\n\tconst yiq = (r * 299 + g * 587 + b * 114) / 1000;\n\treturn yiq >= 128 ? -1 : 1;\n};\n\ntype ColorPair<T> = {\n\tbackground: T;\n\tforeground: T;\n};\n\nexport type ColorContrast<T> = ColorPair<T> & {\n\tcontrast: number;\n};\n\nexport const calcColorContrast = (baseColor: RGB, contrastColor: RGB, ratio: number, dir = 1): ColorContrast<RGB> => {\n\tconst color: RGB = [\n\t\tMath.max(Math.min(Math.round(contrastColor[0] + dir * Math.max(1, contrastColor[0] / 100)), 255), 0),\n\t\tMath.max(Math.min(Math.round(contrastColor[1] + dir * Math.max(1, contrastColor[1] / 100)), 255), 0),\n\t\tMath.max(Math.min(Math.round(contrastColor[2] + dir * Math.max(1, contrastColor[2] / 100)), 255), 0),\n\t];\n\tconst contrast = hex(rgbaConvert.hex(`rgba(${baseColor.join(',')},1)`), rgbaConvert.hex(`rgba(${color.join(',')},1)`));\n\tconst summe = color[0] + color[1] + color[2];\n\tif (summe === 0 || summe === 765 || contrast > ratio) {\n\t\treturn {\n\t\t\tbackground: baseColor,\n\t\t\tforeground: color,\n\t\t\tcontrast,\n\t\t};\n\t} else {\n\t\treturn calcColorContrast(baseColor, color, ratio, dir);\n\t}\n};\n\nconst cache: Map<unknown, ColorContrast<RGB>> = new Map();\n\nexport const getColorContrast = (baseColor: RGB, contrastColor: RGB, ratio: number, dir = 1): ColorContrast<RGB> => {\n\tif (cache.has(baseColor)) {\n\t\treturn cache.get(baseColor) as ColorContrast<RGB>;\n\t}\n\tconst color = calcColorContrast(baseColor, contrastColor, ratio, dir);\n\tcache.set(baseColor, color);\n\treturn color;\n};\n\n/**\n * Adjusts the foreground in the direction the YIQ brightness of the background suggests. YIQ is only\n * an estimate of the WCAG contrast ratio: for medium bright backgrounds such as `#00aa00` it suggests\n * a light foreground, although even white stays below the ratio there. If the suggested direction does\n * not reach the ratio, the opposite direction is tried and the foreground with the higher WCAG contrast\n * ratio wins, which is black or white at the latest.\n */\nconst chooseColorContrast = (baseColor: RGB, contrastColor: RGB, ratio: number): ColorContrast<RGB> => {\n\tconst dir = getContrastYIQ(baseColor[0], baseColor[1], baseColor[2]);\n\tconst suggested = getColorContrast(baseColor, contrastColor, ratio, dir);\n\tif (suggested.contrast >= ratio) {\n\t\treturn suggested;\n\t}\n\t// Bypasses the cache of `getColorContrast`, which ignores the direction.\n\tconst opposite = calcColorContrast(baseColor, contrastColor, ratio, -dir);\n\treturn opposite.contrast > suggested.contrast ? opposite : suggested;\n};\n\nexport const createContrastColorPair = (color: string | ColorPair<string>, contrastRatio = 7): ColorContrast<string> => {\n\tlet baseColor: RGBA = [0, 0, 0, 1];\n\tlet contrastColor: RGBA = [255, 255, 255, 1];\n\tif (typeof color === 'string') {\n\t\tbaseColor = rgba(color);\n\t\tcontrastColor = baseColor;\n\t} else if (typeof color === 'object' && color !== null && typeof color.background === 'string' && typeof color.foreground === 'string') {\n\t\tbaseColor = rgba(color.background);\n\t\tif (typeof color.foreground === 'string') {\n\t\t\tcontrastColor = rgba(color.foreground);\n\t\t} else {\n\t\t\tcontrastColor = baseColor;\n\t\t}\n\t}\n\tconst colorContrast = chooseColorContrast([baseColor[0], baseColor[1], baseColor[2]], [contrastColor[0], contrastColor[1], contrastColor[2]], contrastRatio);\n\tcontrastColor = [...colorContrast.foreground, 1];\n\n\treturn {\n\t\tbackground: rgbaConvert.hex(`rgba(${baseColor.join(',')})`),\n\t\tforeground: rgbaConvert.hex(`rgba(${contrastColor.join(',')})`),\n\t\tcontrast: colorContrast.contrast,\n\t};\n};\n"],"names":["hex","rgbaConvert","rgba"],"mappings":";;;;;;;;AAiCO,MAAM,cAAc,GAAG,CAAC,CAAS,EAAE,CAAS,EAAE,CAAS,KAAY;AACzE,IAAA,MAAM,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,IAAI,IAAI;AAChD,IAAA,OAAO,GAAG,IAAI,GAAG,GAAG,EAAE,GAAG,CAAC;AAC3B,CAAC;AAWM,MAAM,iBAAiB,GAAG,CAAC,SAAc,EAAE,aAAkB,EAAE,KAAa,EAAE,GAAG,GAAG,CAAC,KAAwB;AACnH,IAAA,MAAM,KAAK,GAAQ;AAClB,QAAA,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;AACpG,QAAA,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,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I,CAAC,KAAK,CAAC,UAAU,CAAC;AAClC,QAAA,IAAI,OAAO,KAAK,CAAC,UAAU,KAAK,QAAQ,EAAE;AACzC,YAAA,aAAa,GAAGA,qBAAI,CAAC,KAAK,CAAC,UAAU,CAAC;;aAChC;YACN,aAAa,GAAG,SAAS;;;AAG3B,IAAA,MAAM,aAAa,GAAG,mBAAmB,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC;IAC5J,aAAa,GAAG,CAAC,GAAG,aAAa,CAAC,UAAU,EAAE,CAAC,CAAC;IAEhD,OAAO;AACN,QAAA,UAAU,EAAED,WAAW,CAAC,GAAG,CAAC,CAAA,KAAA,EAAQ,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;AAC3D,QAAA,UAAU,EAAEA,WAAW,CAAC,GAAG,CAAC,CAAA,KAAA,EAAQ,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;QAC/D,QAAQ,EAAE,aAAa,CAAC,QAAQ;KAChC;AACF;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"base-web-component-CkaKv7O0.js","sources":["src/schema/validators/options.ts","src/internal/props/options-with-optgroup.ts","src/internal/props/select-value.ts","src/internal/functional-components/select/api.tsx","src/internal/functional-components/form-field/select.tsx","src/internal/functional-components/form-field/select-value.ts","src/internal/functional-components/select/base-web-component.tsx"],"sourcesContent":["import { containsOnlyNumbers, hasEnoughReadableChars } from '../props';\nimport { a11yHint } from '../utils';\n\nimport type { Optgroup, SelectOption } from '../types';\nexport const validateInputSelectOptions = <T>(option: SelectOption<T>): boolean => {\n\tif (typeof option === 'object' && option !== null) {\n\t\tif (typeof option.label === 'string' && option.label.length > 0) {\n\t\t\toption.disabled = option.disabled === true;\n\t\t\toption.label = `${option.label}`.trim();\n\t\t\tif (hasEnoughReadableChars(option.label, 3) === false && containsOnlyNumbers(option.label) === false) {\n\t\t\t\ta11yHint(`A differing Aria-Label (${option.label}) is inaccessible. A differing Aria-Label should consist of at least three readable characters.`);\n\t\t\t}\n\t\t\tif (Array.isArray((option as Optgroup<T>).options)) {\n\t\t\t\treturn (\n\t\t\t\t\t(option as Optgroup<T>).options.find((item) => {\n\t\t\t\t\t\treturn validateInputSelectOptions(item) === false;\n\t\t\t\t\t}) === undefined\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn true;\n\t\t} else if (typeof option.label === 'number') {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n};\n","import type { Optgroup, Option, OptionsWithOptgroupPropType, StencilUnknown } from '../../schema';\nimport { parseJson, validateInputSelectOptions } from '../../schema';\nimport type { Prop } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\n\nexport type SelectOptionsList = (Option<StencilUnknown> | Optgroup<StencilUnknown>)[];\n\n/**\n * Options prop for `kol-select`\n *\n * Description:\n * Options and optgroups, as an array or as a JSON string when it is passed through an HTML attribute.\n * Every option needs a non-empty string or a number as `label`; one invalid option rejects the whole\n * list. An empty string is rejected as well, because Stencil can pass it for an empty array.\n *\n * The validation is `validateInputSelectOptions` of the schema, which also normalizes each option in\n * place: `disabled` becomes a boolean and a string `label` is trimmed.\n */\nexport type OptionsWithOptgroupProp = Prop<'options', OptionsWithOptgroupPropType, SelectOptionsList>;\n\nfunction normalizeOptionsWithOptgroup(value: unknown): SelectOptionsList | never {\n\tconst parsed = typeof value === 'string' ? parseJson<unknown>(value) : value;\n\tif (Array.isArray(parsed) && parsed.every((option) => validateInputSelectOptions(option as Option<StencilUnknown>))) {\n\t\treturn parsed as SelectOptionsList;\n\t}\n\tthrow new Error('Invalid select options');\n}\n\nexport const optionsWithOptgroupProp = createPropDefinition<OptionsWithOptgroupProp>('options', [], normalizeOptionsWithOptgroup);\n","import type { StencilUnknown, Stringified } from '../../schema';\nimport type { Prop } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\n\n/**\n * Value prop of `kol-select`\n *\n * Description:\n * The selected values; a single value is wrapped into a list. A JSON string is not parsed, it is a\n * value of its own. The default is the empty list. `kol-select` keeps `null` as `[null]` instead of\n * applying this definition to it.\n */\nexport type SelectValueProp = Prop<'value', Stringified<StencilUnknown[]> | Stringified<StencilUnknown>, StencilUnknown[]>;\nexport const selectValueProp = createPropDefinition<SelectValueProp>('value', [], (value: unknown) =>\n\tArray.isArray(value) ? (value as StencilUnknown[]) : [value as StencilUnknown],\n);\n","import {\n\taccessKeyProp,\n\thorizontalIconsProp,\n\tmultipleProp,\n\toptionsWithOptgroupProp,\n\trequiredProp,\n\trowsProp,\n\tselectValueProp,\n\tshortKeyProp,\n\ttabIndexProp,\n\tvariantProp,\n} from '../../props';\nimport type { FormFieldBaseStates } from '../form-field/api';\nimport { formFieldBasePropsConfig } from '../form-field/api';\nimport type { ApiFromConfig, PropsConfigShape } from '../generic-types';\n\nexport const selectPropsConfig = {\n\trequired: [...formFieldBasePropsConfig.required],\n\toptional: [\n\t\t...formFieldBasePropsConfig.optional,\n\t\taccessKeyProp,\n\t\thorizontalIconsProp,\n\t\tmultipleProp,\n\t\toptionsWithOptgroupProp,\n\t\trequiredProp,\n\t\trowsProp,\n\t\tselectValueProp,\n\t\tshortKeyProp,\n\t\ttabIndexProp,\n\t\tvariantProp,\n\t],\n} as const satisfies PropsConfigShape;\n\nexport type SelectApi = ApiFromConfig<typeof selectPropsConfig, { States: FormFieldBaseStates }>;\n","import { Fragment, h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport type { MsgPropType, SelectOption, StencilUnknown, Stringified, W3CInputValue } from '../../../schema';\nimport { getMsgType, isMsgDefinedAndInputTouched } from '../../../schema';\nimport clsx from '../../../utils/clsx';\nimport { getBlockBem } from '../bem-root-node/block-bem';\nimport type { DefaultInputProps } from './default-input-props';\nimport { getDefaultInputProps } from './default-input-props';\n\nconst selectBem = getBlockBem('kol-select');\n\ntype SelectAttributes = JSXBase.SelectHTMLAttributes<HTMLSelectElement>;\n\nexport type SelectOptionFCProps = Omit<JSXBase.OptionHTMLAttributes<HTMLOptionElement>, 'value' | 'label'> & {\n\t/** The value, or the list of values, of the selected options. */\n\tselectedValue?: StencilUnknown | StencilUnknown[];\n\tvalue: StencilUnknown;\n\tlabel: W3CInputValue;\n\t/** The key of the option, rendered as its native value; the field maps it back to `value`. */\n\tindex?: string | number;\n};\n\nexport type SelectOptionListFCProps = {\n\t/** Key prefix of the options in an optgroup. */\n\tpreKey?: string;\n\tdisabled?: boolean;\n\tvalue?: StencilUnknown | StencilUnknown[];\n\toptions?: SelectOption<StencilUnknown>[];\n\tOptionProps?: Omit<JSXBase.OptionHTMLAttributes<HTMLOptionElement>, 'value' | 'label'>;\n\tOptionGroupProps?: Omit<JSXBase.OptgroupHTMLAttributes<HTMLOptGroupElement>, 'label'>;\n};\n\nexport type SelectFCProps = DefaultInputProps<SelectAttributes> &\n\tSelectOptionListFCProps & {\n\t\ttouched?: boolean;\n\t\tmsg?: Stringified<MsgPropType>;\n\t} & {\n\t\t[key: `aria-${string}`]: unknown;\n\t\t[key: `data-${string}`]: unknown;\n\t};\n\n/**\n * Native `<option>`. Its native value is the key (`-<index>`, in an optgroup `-<group>-<index>`), not\n * the option value, because a native value can only be a string.\n */\nexport const SelectOptionFC: FC<SelectOptionFCProps> = ({ class: classNames, index, selectedValue, selected, value, label, disabled, ...other }) => {\n\tconst selectedValues = selectedValue === undefined ? [] : Array.isArray(selectedValue) ? selectedValue : [selectedValue];\n\tconst isSelected = selected || selectedValues.includes(value);\n\n\treturn (\n\t\t<option\n\t\t\tclass={clsx(selectBem('option', { selected: Boolean(isSelected), disabled: Boolean(disabled) }), classNames)}\n\t\t\tselected={isSelected}\n\t\t\tdisabled={disabled}\n\t\t\tvalue={index}\n\t\t\t{...other}\n\t\t>\n\t\t\t{label}\n\t\t</option>\n\t);\n};\n\n/** Options and optgroups of a native select, recursively; an optgroup prefixes the keys of its options. */\nexport const SelectOptionListFC: FC<SelectOptionListFCProps> = ({\n\tpreKey,\n\toptions,\n\tdisabled,\n\tvalue: selectedValue,\n\tOptionProps = {},\n\tOptionGroupProps = {},\n}) => {\n\tif (!options?.length) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{options.map((option, index) => {\n\t\t\t\tconst key = [preKey, `-${index}`].join('');\n\n\t\t\t\tif ('options' in option) {\n\t\t\t\t\tconst { label, ...other } = option;\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<optgroup\n\t\t\t\t\t\t\tclass={selectBem('optgroup', { disabled: Boolean(disabled) })}\n\t\t\t\t\t\t\tkey={key}\n\t\t\t\t\t\t\t{...OptionGroupProps}\n\t\t\t\t\t\t\tlabel={label?.toString()}\n\t\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<SelectOptionListFC OptionGroupProps={OptionGroupProps} OptionProps={OptionProps} value={selectedValue} preKey={key} {...other} />\n\t\t\t\t\t\t</optgroup>\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif ('value' in option) {\n\t\t\t\t\treturn <SelectOptionFC key={key} {...OptionProps} index={key} selectedValue={selectedValue} {...option} />;\n\t\t\t\t}\n\n\t\t\t\treturn null;\n\t\t\t})}\n\t\t</>\n\t);\n};\n\n/**\n * Native `<select>` of a form field with its options. The select itself is the root of the\n * `kol-select` block, so the block classes are set on it directly instead of through `BemRootNodeFC`.\n */\nexport const SelectFC: FC<SelectFCProps> = (props) => {\n\tconst {\n\t\tclass: classNames,\n\t\tmsg,\n\t\ttouched,\n\t\tdisabled,\n\t\trequired,\n\t\toptions,\n\t\tvalue,\n\t\tOptionProps,\n\t\tOptionGroupProps,\n\t\tariaDescribedBy,\n\t\thideLabel,\n\t\tlabel,\n\t\t...other\n\t} = props;\n\n\tconst selectProps: SelectAttributes = {\n\t\tclass: clsx(\n\t\t\tselectBem({\n\t\t\t\tdisabled: Boolean(disabled),\n\t\t\t\trequired: Boolean(required),\n\t\t\t\ttouched: Boolean(touched),\n\t\t\t\t...(isMsgDefinedAndInputTouched(msg, touched) ? { [getMsgType(msg) as string]: true } : {}),\n\t\t\t}),\n\t\t\tclassNames,\n\t\t),\n\t\trequired: required,\n\t\tdisabled: disabled,\n\t\t...getDefaultInputProps({ ariaDescribedBy, hideLabel, label }),\n\t\t...other,\n\t};\n\n\treturn (\n\t\t<select {...selectProps}>\n\t\t\t<SelectOptionListFC options={options} value={value} OptionGroupProps={OptionGroupProps} OptionProps={OptionProps} />\n\t\t</select>\n\t);\n};\n","import type { Option, StencilUnknown } from '../../../schema';\nimport type { SelectOptionsList } from '../../props/options-with-optgroup';\n\n/**\n * Throws when the shape of a `_value` does not match `_multiple`: a list in single mode, or a single\n * value in multiple mode. The field throws from its watcher, so the value is not applied. `source`\n * names the value in the message: the received value of a `_value` change, or the current value on\n * a `_multiple` change.\n */\nexport const assertSelectValueMatchesMultiplicity = (value: unknown, multiple: boolean, source: 'current' | 'received'): void => {\n\tconst isArray = Array.isArray(value);\n\n\tif (multiple) {\n\t\tif (value !== undefined && !isArray) {\n\t\t\tthrow new Error(\n\t\t\t\t`↑ The schema for the property (_value) is not valid for multiple mode. Expected an array. The value will not be changed. (${source} = ${JSON.stringify(value)})`,\n\t\t\t);\n\t\t}\n\t} else if (isArray) {\n\t\tthrow new Error(\n\t\t\t`↑ The schema for the property (_value) is not valid for single mode. Expected a single value. The value will not be changed. (${source} = ${JSON.stringify(value)})`,\n\t\t);\n\t}\n};\n\n/** The options of the list, with the options of each optgroup in place of the optgroup. */\nconst flattenSelectOptions = (options: SelectOptionsList): Option<StencilUnknown>[] =>\n\toptions.flatMap((entry) => ('options' in entry && Array.isArray(entry.options) ? flattenSelectOptions(entry.options) : [entry as Option<StencilUnknown>]));\n\n/**\n * Keeps only the values that belong to an option. Then, in single mode (`multiple === false`, not\n * merely falsy) without a value, the value becomes the value of the first enabled option, which is\n * the option the native select shows. Without options, the value is kept as it is, because the\n * options can follow the value.\n */\nexport const normalizeSelectValue = (value: StencilUnknown[], options: SelectOptionsList, multiple: boolean | undefined): StencilUnknown[] => {\n\tif (options.length === 0) {\n\t\treturn value;\n\t}\n\tconst flatOptions = flattenSelectOptions(options);\n\tconst optionValues = flatOptions.map((option) => option.value);\n\tconst filtered = value.every((item) => optionValues.includes(item)) ? value : value.filter((item) => optionValues.includes(item));\n\tif (multiple === false && filtered.length === 0) {\n\t\tconst firstEnabled = flatOptions.find((option) => option.disabled !== true);\n\t\treturn firstEnabled ? [firstEnabled.value] : filtered;\n\t}\n\treturn filtered;\n};\n","import { h, type JSX } from '@stencil/core';\nimport type {\n\tIconsHorizontalPropType,\n\tMultiplePropType,\n\tOption,\n\tOptionsWithOptgroupPropType,\n\tSelectOption,\n\tShortKeyPropType,\n\tStencilUnknown,\n\tStringified,\n\tVariantClassNamePropType,\n} from '../../../schema';\nimport { validateAccessAndShortKey } from '../../../schema/validators/access-and-short-key';\nimport clsx from '../../../utils/clsx';\nimport type { CtaRef } from '../../../utils/element-interaction';\nimport {\n\taccessKeyProp,\n\thorizontalIconsProp,\n\tmultipleProp,\n\toptionsWithOptgroupProp,\n\trequiredProp,\n\trowsProp,\n\tselectValueProp,\n\tshortKeyProp,\n\ttabIndexProp,\n\tvariantProp,\n} from '../../props';\nimport { getInputAdornments } from '../form-field/adornments';\nimport { BaseFormFieldWebComponent } from '../form-field/base-web-component';\nimport { FormFieldFC } from '../form-field/component';\nimport { InputContainerFC } from '../form-field/input-container';\nimport { fillKeyOptionMap } from '../form-field/options';\nimport type { SelectFCProps } from '../form-field/select';\nimport { SelectFC } from '../form-field/select';\nimport { assertSelectValueMatchesMultiplicity, normalizeSelectValue } from '../form-field/select-value';\nimport type { SelectApi } from './api';\n\n/**\n * Shared orchestrator implementation of `kol-select` and the page size select of the pagination\n * (`PageSizeSelect`): the option map, the value list and its normalization, the native select\n * events and the render.\n *\n * `kol-select` keeps what Stencil has to see in the component class itself (DD16).\n */\nexport abstract class BaseSelectWebComponent extends BaseFormFieldWebComponent<SelectApi> {\n\t/** Read for the multiplicity check and the first option preselection, like the raw prop. */\n\tpublic abstract _multiple?: boolean;\n\t/** Written on user input. */\n\tpublic abstract _value?: Stringified<StencilUnknown[]> | Stringified<StencilUnknown>;\n\n\tprotected abstract readonly ctaRef: CtaRef<HTMLSelectElement>;\n\n\t/** Option of each native option value (`-<index>`). */\n\tprivate readonly keyOptionMap = new Map<string, Option<StencilUnknown>>();\n\n\t/**\n\t * Whether the field has a value, for the class `kol-form-field--has-value`. It starts as `true`\n\t * and follows each `change`; it does not trigger a render of its own.\n\t */\n\tprivate hasValue = true;\n\n\t// --- Prop application (the concrete element's watchers delegate here) ---\n\n\tprotected applyAccessKey(value?: string): void {\n\t\taccessKeyProp.apply(value, (v) => this.setRenderProp('accessKey', v));\n\t\tvalidateAccessAndShortKey(value, this.getShortKeyProp());\n\t}\n\n\tprotected applyShortKey(value?: ShortKeyPropType): void {\n\t\tshortKeyProp.apply(value, (v) => this.setRenderProp('shortKey', v));\n\t\tvalidateAccessAndShortKey(this.getAccessKeyProp(), value);\n\t}\n\n\tprotected abstract getAccessKeyProp(): string | undefined;\n\tprotected abstract getShortKeyProp(): ShortKeyPropType | undefined;\n\n\tprotected applyIcons(value?: IconsHorizontalPropType): void {\n\t\thorizontalIconsProp.apply(value, (v) => this.setRenderProp('icons', v));\n\t}\n\n\tprotected applyMultiple(value?: MultiplePropType): void {\n\t\tassertSelectValueMatchesMultiplicity(this._value, value === true, 'current');\n\t\tmultipleProp.apply(value, (v) => {\n\t\t\tthis.setRenderProp('multiple', v);\n\t\t\tthis.setRenderProp('value', normalizeSelectValue(this.getRenderProp('value'), this.getRenderProp('options'), this._multiple));\n\t\t});\n\t}\n\n\t/** The option map keeps its entries while the list is empty. */\n\tprotected applyOptions(value?: OptionsWithOptgroupPropType): void {\n\t\toptionsWithOptgroupProp.apply(value, (v) => {\n\t\t\tthis.setRenderProp('options', v);\n\t\t\tif (v.length > 0) {\n\t\t\t\tthis.keyOptionMap.clear();\n\t\t\t\tfillKeyOptionMap(this.keyOptionMap, v as SelectOption<StencilUnknown>[]);\n\t\t\t\tthis.setRenderProp('value', normalizeSelectValue(this.getRenderProp('value'), v, this._multiple));\n\t\t\t}\n\t\t});\n\t}\n\n\tprotected applyRequired(value?: boolean): void {\n\t\trequiredProp.apply(value, (v) => this.setRenderProp('required', v));\n\t}\n\n\tprotected applyRows(value?: number): void {\n\t\trowsProp.apply(value, (v) => this.setRenderProp('rows', v));\n\t}\n\n\tprotected applyTabIndex(value?: number): void {\n\t\ttabIndexProp.apply(value, (v) => this.setRenderProp('tabIndex', v));\n\t}\n\n\t/**\n\t * A single value is wrapped into a list and `null` is kept as `[null]`. Only a `_value` change sets\n\t * the form value; the preselection on an `_options` or `_multiple` change does not.\n\t */\n\tprotected applyValue(value?: Stringified<StencilUnknown[]> | Stringified<StencilUnknown>): void {\n\t\tassertSelectValueMatchesMultiplicity(value, this._multiple === true, 'received');\n\t\tconst setValue = (list: StencilUnknown[]): void => {\n\t\t\tconst normalized = normalizeSelectValue(list, this.getRenderProp('options'), this._multiple);\n\t\t\tthis.setRenderProp('value', normalized);\n\t\t\tthis.formAssociation.setFormAssociatedValue(this.getModelValue());\n\t\t};\n\t\tif (value === null) {\n\t\t\tsetValue([null]);\n\t\t} else {\n\t\t\tselectValueProp.apply(value, setValue);\n\t\t}\n\t}\n\n\tprotected applyVariant(value?: VariantClassNamePropType): void {\n\t\tvariantProp.apply(value, (v) => this.setRenderProp('variant', v));\n\t}\n\n\t// --- Value ---\n\n\t/** The value list with `_multiple`, otherwise its first entry (the list itself when empty). */\n\tprotected getModelValue(): StencilUnknown[] | StencilUnknown {\n\t\tconst value = this.getRenderProp('value');\n\t\tif (this._multiple) {\n\t\t\treturn value;\n\t\t}\n\t\treturn Array.isArray(value) && value.length > 0 ? value[0] : value;\n\t}\n\n\t// --- Event handling of the native select ---\n\n\tprivate readonly handleSelectInput = (event: Event): void => {\n\t\tconst selectedValues = Array.from(this.ctaRef.el?.options || [])\n\t\t\t.filter((option) => option.selected)\n\t\t\t.map((option) => this.keyOptionMap.get(option.value)?.value);\n\n\t\tif (this._multiple) {\n\t\t\tthis._value = selectedValues;\n\t\t\tthis.handleInput(event, selectedValues);\n\t\t} else {\n\t\t\tconst singleValue: StencilUnknown = selectedValues.length > 0 ? selectedValues[0] : undefined;\n\t\t\tthis._value = singleValue as Stringified<StencilUnknown>;\n\t\t\tthis.handleInput(event, singleValue);\n\t\t}\n\t};\n\n\tprivate readonly handleSelectChange = (event: Event): void => {\n\t\tconst value = this._value as StencilUnknown;\n\t\tthis.handleChange(event, value);\n\t\tthis.hasValue = !!value;\n\t};\n\n\t// --- Render ---\n\n\tprivate getSelectProps(): SelectFCProps {\n\t\tconst { ariaDescribedBy, hasError } = this.getAria();\n\t\tconst multiple = this.getRenderProp('multiple');\n\t\tconst shortKey = this.getRenderProp('shortKey');\n\n\t\treturn {\n\t\t\tid: this.getState('id'),\n\t\t\thideLabel: this.getRenderProp('hideLabel'),\n\t\t\tlabel: this.getRenderProp('label'),\n\t\t\tvalue: this.getRenderProp('value'),\n\t\t\toptions: this.getRenderProp('options'),\n\t\t\taccessKey: this.getRenderProp('accessKey') || undefined,\n\t\t\tdisabled: this.getRenderProp('disabled'),\n\t\t\tname: this.getRenderProp('name') || undefined,\n\t\t\t'aria-invalid': hasError ? 'true' : undefined,\n\t\t\tariaDescribedBy,\n\t\t\tsize: multiple ? this.getRenderProp('rows') : undefined,\n\t\t\tmultiple,\n\t\t\trequired: this.getRenderProp('required'),\n\t\t\ttouched: this.getRenderProp('touched'),\n\t\t\tmsg: this.getRenderProp('msg'),\n\t\t\t...(shortKey ? { 'aria-keyshortcuts': shortKey } : {}),\n\t\t\tref: this.ctaRef,\n\t\t\tonBlur: this.handleBlur,\n\t\t\tonChange: this.handleSelectChange,\n\t\t\tonClick: this.handleClick,\n\t\t\tonFocus: this.handleFocus,\n\t\t\tonInput: this.handleSelectInput,\n\t\t\tonKeyDown: this.handleKeyDown,\n\t\t};\n\t}\n\n\tprotected renderSelectField(): JSX.Element {\n\t\tconst disabled = this.getRenderProp('disabled');\n\t\tconst { startAdornment, endAdornment } = getInputAdornments({ icons: this.getRenderProp('icons') });\n\n\t\treturn (\n\t\t\t<FormFieldFC\n\t\t\t\t{...this.getFormFieldProps({\n\t\t\t\t\tclass: clsx('kol-form-field-select', { 'kol-form-field--has-value': this.hasValue }),\n\t\t\t\t\taccessKey: this.getRenderProp('accessKey') || undefined,\n\t\t\t\t\tshortKey: this.getRenderProp('shortKey') || undefined,\n\t\t\t\t\trequired: this.getRenderProp('required'),\n\t\t\t\t\tvariant: this.getRenderProp('variant'),\n\t\t\t\t})}\n\t\t\t\tonClick={() => this.ctaRef.el?.focus()}\n\t\t\t>\n\t\t\t\t<InputContainerFC\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tmsg={this.getRenderProp('msg')}\n\t\t\t\t\ttouched={this.getRenderProp('touched')}\n\t\t\t\t\tstartAdornment={startAdornment}\n\t\t\t\t\tendAdornment={endAdornment}\n\t\t\t\t>\n\t\t\t\t\t<SelectFC {...this.getSelectProps()} />\n\t\t\t\t</InputContainerFC>\n\t\t\t</FormFieldFC>\n\t\t);\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAIO,MAAM,0BAA0B,GAAG,CAAI,MAAuB,KAAa;IACjF,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI,EAAE;AAClD,QAAA,IAAI,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;YAChE,MAAM,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,KAAK,IAAI;YAC1C,MAAM,CAAC,KAAK,GAAG,CAAG,E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contrast';\n\nimport rgba from 'color-rgba';\nimport rgbaConvert from 'rgba-convert';\n\ntype RGBA = [number, number, number, number];\n\n// const calcColor = (color: RGBA, diff: number): RGBA => [\n// Math.max(Math.min(Math.round(color[0] + (color[0] / 100 + 1) * diff), 255), 0),\n// Math.max(Math.min(Math.round(color[1] + (color[1] / 100 + 1) * diff), 255), 0),\n// Math.max(Math.min(Math.round(color[2] + (color[2] / 100 + 1) * diff), 255), 0),\n// color[3],\n// ];\n\n// const relativeLuminanceFormel = (c: number): number => {\n// if (c <= 0.03928) {\n// return c / 12.92;\n// } else {\n// return ((c + 0.055) / 1.055) ** 2.4;\n// }\n// };\n// // https://www.w3.org/TR/WCAG20/#contrast-ratiodef\n// const relativeLuminance = (r: number, g: number, b: number): number => {\n// return (\n// 0.2126 * relativeLuminanceFormel(r) + 0.7152 * relativeLuminanceFormel(g) + 0.0722 * relativeLuminanceFormel(b)\n// );\n// };\n\n// https://css-tricks.com/snippets/javascript/random-hex-color/\n// const randomColor = () => Math.floor(Math.random() * 16777215).toString(16);\n\n// https://24ways.org/2010/calculating-color-contrast/\nexport const getContrastYIQ = (r: number, g: number, b: number): number => {\n\tconst yiq = (r * 299 + g * 587 + b * 114) / 1000;\n\treturn yiq >= 128 ? -1 : 1;\n};\n\ntype ColorPair<T> = {\n\tbackground: T;\n\tforeground: T;\n};\n\nexport type ColorContrast<T> = ColorPair<T> & {\n\tcontrast: number;\n};\n\nexport const calcColorContrast = (baseColor: RGB, contrastColor: RGB, ratio: number, dir = 1): ColorContrast<RGB> => {\n\tconst color: RGB = [\n\t\tMath.max(Math.min(Math.round(contrastColor[0] + dir * Math.max(1, contrastColor[0] / 100)), 255), 0),\n\t\tMath.max(Math.min(Math.round(contrastColor[1] + dir * Math.max(1, contrastColor[1] / 100)), 255), 0),\n\t\tMath.max(Math.min(Math.round(contrastColor[2] + dir * Math.max(1, contrastColor[2] / 100)), 255), 0),\n\t];\n\tconst contrast = hex(rgbaConvert.hex(`rgba(${baseColor.join(',')},1)`), rgbaConvert.hex(`rgba(${color.join(',')},1)`));\n\tconst summe = color[0] + color[1] + color[2];\n\tif (summe === 0 || summe === 765 || contrast > ratio) {\n\t\treturn {\n\t\t\tbackground: baseColor,\n\t\t\tforeground: color,\n\t\t\tcontrast,\n\t\t};\n\t} else {\n\t\treturn calcColorContrast(baseColor, color, ratio, dir);\n\t}\n};\n\nconst cache: Map<unknown, ColorContrast<RGB>> = new Map();\n\nexport const getColorContrast = (baseColor: RGB, contrastColor: RGB, ratio: number, dir = 1): ColorContrast<RGB> => {\n\tif (cache.has(baseColor)) {\n\t\treturn cache.get(baseColor) as ColorContrast<RGB>;\n\t}\n\tconst color = calcColorContrast(baseColor, contrastColor, ratio, dir);\n\tcache.set(baseColor, color);\n\treturn color;\n};\n\n/**\n * Adjusts the foreground in the direction the YIQ brightness of the background suggests. YIQ is only\n * an estimate of the WCAG contrast ratio: for medium bright backgrounds such as `#00aa00` it suggests\n * a light foreground, although even white stays below the ratio there. If the suggested direction does\n * not reach the ratio, the opposite direction is tried and the foreground with the higher WCAG contrast\n * ratio wins, which is black or white at the latest.\n */\nconst chooseColorContrast = (baseColor: RGB, contrastColor: RGB, ratio: number): ColorContrast<RGB> => {\n\tconst dir = getContrastYIQ(baseColor[0], baseColor[1], baseColor[2]);\n\tconst suggested = getColorContrast(baseColor, contrastColor, ratio, dir);\n\tif (suggested.contrast >= ratio) {\n\t\treturn suggested;\n\t}\n\t// Bypasses the cache of `getColorContrast`, which ignores the direction.\n\tconst opposite = calcColorContrast(baseColor, contrastColor, ratio, -dir);\n\treturn opposite.contrast > suggested.contrast ? opposite : suggested;\n};\n\nexport const createContrastColorPair = (color: string | ColorPair<string>, contrastRatio = 7): ColorContrast<string> => {\n\tlet baseColor: RGBA = [0, 0, 0, 1];\n\tlet contrastColor: RGBA = [255, 255, 255, 1];\n\tif (typeof color === 'string') {\n\t\tbaseColor = rgba(color);\n\t\tcontrastColor = baseColor;\n\t} else if (typeof color === 'object' && color !== null && typeof color.background === 'string' && typeof color.foreground === 'string') {\n\t\tbaseColor = rgba(color.background);\n\t\tif (typeof color.foreground === 'string') {\n\t\t\tcontrastColor = rgba(color.foreground);\n\t\t} else {\n\t\t\tcontrastColor = baseColor;\n\t\t}\n\t}\n\tconst colorContrast = chooseColorContrast([baseColor[0], baseColor[1], baseColor[2]], [contrastColor[0], contrastColor[1], contrastColor[2]], contrastRatio);\n\tcontrastColor = [...colorContrast.foreground, 1];\n\n\treturn {\n\t\tbackground: rgbaConvert.hex(`rgba(${baseColor.join(',')})`),\n\t\tforeground: rgbaConvert.hex(`rgba(${contrastColor.join(',')})`),\n\t\tcontrast: colorContrast.contrast,\n\t};\n};\n"],"names":["hex","rgbaConvert"],"mappings":";;;;;;AAiCO,MAAM,cAAc,GAAG,CAAC,CAAS,EAAE,CAAS,EAAE,CAAS,KAAY;AACzE,IAAA,MAAM,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,IAAI,IAAI;AAChD,IAAA,OAAO,GAAG,IAAI,GAAG,GAAG,EAAE,GAAG,CAAC;AAC3B,CAAC;AAWM,MAAM,iBAAiB,GAAG,CAAC,SAAc,EAAE,aAAkB,EAAE,KAAa,EAAE,GAAG,GAAG,CAAC,KAAwB;AACnH,IAAA,MAAM,KAAK,GAAQ;AAClB,QAAA,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;AACpG,QAAA,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,GAAG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K,QAAQ,IAAI,OAAO,KAAK,CAAC,UAAU,KAAK,QAAQ,EAAE;AACvI,QAAA,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC;AAClC,QAAA,IAAI,OAAO,KAAK,CAAC,UAAU,KAAK,QAAQ,EAAE;AACzC,YAAA,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC;;aAChC;YACN,aAAa,GAAG,SAAS;;;AAG3B,IAAA,MAAM,aAAa,GAAG,mBAAmB,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC;IAC5J,aAAa,GAAG,CAAC,GAAG,aAAa,CAAC,UAAU,EAAE,CAAC,CAAC;IAEhD,OAAO;AACN,QAAA,UAAU,EAAEA,MAAW,CAAC,GAAG,CAAC,CAAA,KAAA,EAAQ,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;AAC3D,QAAA,UAAU,EAAEA,MAAW,CAAC,GAAG,CAAC,CAAA,KAAA,EAAQ,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;QAC/D,QAAQ,EAAE,aAAa,CAAC,QAAQ;KAChC;AACF;;;;"}
@@ -1,5 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- import{h as e}from"./index-DsCeQ9Ys.js";import{t as a}from"./i18n-BaCf-SDK.js";import{e as n}from"./common-BqpMtheU.js";import{A as s,c as o}from"./component-C9DexidK.js";import{b as t}from"./bem-registry-CX5kvaqt.js";import{c as i}from"./clsx-COFh-Vc8.js";import{p as r}from"./element-interaction-Cy9tx3Sx.js";import{B as l}from"./component-BxKN0JbT.js";import{I as d}from"./component-BjH8s4-t.js";import{S as c}from"./component-D_58mw87.js";import{T as f}from"./component-xrrwVuiI.js";import{a as p,b as m,c as u,f as b,g as k,h as j,s as x,i as h,l as g,d as y,t as C,e as w,v}from"./variant-CeijQFzL.js";import{c as D,b as _,a as K}from"./base-web-component-3R1Dy3QK.js";import{d as B}from"./disabled-CdyeAMlW.js";import{h as A}from"./href-DOi-fZMu.js";import{l as I}from"./label-with-expert-slot-CocPu9HB.js";import{l as L}from"./link-target-B7A-qwaP.js";const O=["date","location","page","step","time","true","false"];function T(e){const a=_(e);return O.includes(a)?a:"page"}const q=D("ariaCurrentValue","page",T);const M=D("ariaOwns","",_);const S=D("download",undefined,_);const F=K();const Q=t.forBlock("kol-link");const V=(t,p)=>{const{accessKey:m,ariaControls:u,ariaCurrent:b,ariaDescription:k,ariaDescriptionId:j,ariaExpanded:x,ariaOwns:h,class:g,customClass:y,disabled:C,download:w,handleAnchorClick:v,hideLabel:D,href:_,icons:K,inline:B,label:A,on:I,ref:L,refAnchor:O,refTooltip:T,role:q,shortKey:M,tabIndex:S,target:F,variant:V,expertSlot:$}=t;const H=a("kol-open-link-in-tab");const P=typeof F==="string"&&F.length>0&&F!=="_self";const z={href:typeof _==="string"&&_.length>0?_:"javascript:void(0);",target:typeof F==="string"&&F.length>0?F:undefined,rel:P?"noopener":undefined,download:typeof w==="string"?w:undefined};if(D===true&&!A){n(`[KolLink] An aria-label must be set when _hide-label is set.`)}const E=k===null||k===void 0?void 0:k.trim();const J=q||undefined;return e(l,{block:"kol-link",ref:L,class:i(g,{[y]:V.includes("custom")&&y.length>0,[o(V,"link")]:V.length>0}),modifiers:{disabled:C===true,"external-link":P,"hide-label":D===true,inline:B===true,standalone:B===false}},e("a",Object.assign({ref:O},z,{accessKey:m||undefined,"aria-current":b||undefined,"aria-controls":u||undefined,"aria-describedby":E?j:undefined,"aria-disabled":C?"true":undefined,"aria-expanded":x===""?undefined:x,"aria-owns":h||undefined,"aria-label":D&&typeof A==="string"&&A.trim()!==""?`${A}${P?` (${H})`:""}`:undefined,"aria-keyshortcuts":M||undefined,class:Q("interactive-element")},I,{onClick:v,onMouseDown:C?r:undefined,role:J,tabIndex:C?-1:S}),e(c,{class:"kol-link__text",badgeText:m||M,icons:K,hideLabel:D,label:$?"":A||_},p.length>0?p:e("slot",{name:"expert",slot:"expert"})),P&&e(d,{class:"kol-link__icon",label:D?"":H,icons:"kolicon-link-external","aria-hidden":D})),D===true&&!$&&e("div",{class:"kol-link__tooltip"},e(f,{badgeText:m||M||"",label:typeof A==="string"?A:typeof _==="string"?_:"",refFloating:T})),E&&e(s,{description:E,descriptionId:j}))};const $={required:[A],optional:[p,m,q,u,b,M,k,B,S,j,x,h,I,F,g,L,y,C,w,v]};export{V as L,q as a,F as b,M as c,S as d,$ as l};
5
- //# sourceMappingURL=api-BA-AFr5H.js.map