@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":"base-web-component-BozlJoj7.js","sources":["src/internal/props/pattern.ts","src/internal/functional-components/text-input/api.tsx","src/internal/functional-components/text-input/base-web-component.tsx"],"sourcesContent":["import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeString } from './helpers/normalizers';\n\n/**\n * Pattern prop for text-based inputs\n *\n * Description:\n * A regular expression the value has to match for the native constraint validation.\n *\n * @see https://html.spec.whatwg.org/multipage/input.html#attr-input-pattern\n */\nexport type PatternProp = SimpleProp<'pattern', string>;\n// The default is `undefined`: the native attribute is only rendered when a pattern is set.\nexport const patternProp = createPropDefinition<PatternProp>('pattern', undefined as unknown as string, normalizeString);\n","import {\n\taccessKeyProp,\n\tautoCompleteProp,\n\thorizontalIconsProp,\n\tpatternProp,\n\tplaceholderProp,\n\treadOnlyProp,\n\trequiredProp,\n\tshortKeyProp,\n\tsmartButtonProp,\n\tstringValueProp,\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\n/**\n * Props email, password and text have in common. The counter props (`hasCounter`, `maxLength`,\n * `maxLengthBehavior`) belong to the `CounterBehavior` and are not part of this config.\n */\nexport const textInputBasePropsConfig = {\n\trequired: [...formFieldBasePropsConfig.required],\n\toptional: [\n\t\t...formFieldBasePropsConfig.optional,\n\t\taccessKeyProp,\n\t\tautoCompleteProp,\n\t\thorizontalIconsProp,\n\t\tpatternProp,\n\t\tplaceholderProp,\n\t\treadOnlyProp,\n\t\trequiredProp,\n\t\tshortKeyProp,\n\t\tsmartButtonProp,\n\t\tstringValueProp,\n\t\tvariantProp,\n\t],\n} as const satisfies PropsConfigShape;\n\nexport type TextInputBaseApi = ApiFromConfig<typeof textInputBasePropsConfig, { States: FormFieldBaseStates }>;\n","import { h } from '@stencil/core';\nimport type { VNode } from '@stencil/core/internal';\nimport { propagateSubmitEventToForm } from '../../../components/form/controller';\nimport type {\n\tAccessKeyPropType,\n\tAutoCompletePropType,\n\tIconsHorizontalPropType,\n\tInternalButtonProps,\n\tMaxLengthBehaviorPropType,\n\tShortKeyPropType,\n\tStringified,\n\tVariantClassNamePropType,\n\tW3CInputValue,\n} from '../../../schema';\nimport { validateAccessAndShortKey } from '../../../schema/validators/access-and-short-key';\nimport clsx from '../../../utils/clsx';\nimport { createCtaRef } from '../../../utils/element-interaction';\nimport {\n\taccessKeyProp,\n\tautoCompleteProp,\n\thorizontalIconsProp,\n\tpatternProp,\n\tplaceholderProp,\n\treadOnlyProp,\n\trequiredProp,\n\tshortKeyProp,\n\tsmartButtonProp,\n\tstringValueProp,\n\tvariantProp,\n} from '../../props';\nimport { BaseWebComponent } from '../base-web-component';\nimport { CounterBehavior } from '../counter/behavior';\nimport { getInputAdornments } from '../form-field/adornments';\nimport { BaseFormFieldWebComponent } from '../form-field/base-web-component';\nimport type { FormFieldFCProps } from '../form-field/component';\nimport type { InputFCProps } from '../form-field/input';\nimport { SuggestionsFC } from '../form-field/suggestions';\nimport type { TextInputBaseApi } from './api';\n\ntype TextInputFieldProps = {\n\t/** Native type; `kol-input-text` passes it where its state carried `_type`, before the value. */\n\ttype?: InputFCProps['type'];\n\tspellcheck?: boolean;\n\tmultiple?: boolean;\n\tsuggestions?: W3CInputValue[];\n};\n\n/**\n * Shared orchestrator implementation of `kol-input-email`, `kol-input-password` and `kol-input-text`\n * on top of the form field base: the common text input props, the character counter, the submit on\n * Enter and the props of the native `<input>`.\n *\n * As in the form field base, the concrete element declares every `@Prop` with its `@Watch`, which\n * calls the matching `apply*` method (DD16).\n */\nexport abstract class BaseTextInputWebComponent<Api extends TextInputBaseApi> extends BaseFormFieldWebComponent<Api> {\n\tpublic abstract _accessKey?: AccessKeyPropType;\n\tpublic abstract _shortKey?: ShortKeyPropType;\n\t/** Written on every input, so the watcher updates the counter and the form value. */\n\tpublic abstract _value?: string;\n\n\tprotected readonly ctaRef = createCtaRef<HTMLInputElement>();\n\n\tprotected readonly counter = new CounterBehavior(BaseWebComponent.stateLess);\n\n\t/**\n\t * Whether the field has a value, rendered as the root class `has-value`. It is a plain field, not\n\t * state: changing it does not re-render, the class follows with the next render (#11053).\n\t */\n\tprotected hasValue = false;\n\n\t/** Typed view on the text input props, see `shared` in the form field base. */\n\tprivate get textShared(): BaseTextInputWebComponent<TextInputBaseApi> {\n\t\treturn this as unknown as BaseTextInputWebComponent<TextInputBaseApi>;\n\t}\n\n\t/** Call from `componentWillLoad`, after the value has been applied. */\n\tprotected initHasValue(): void {\n\t\tthis.hasValue = Boolean(this.textShared.getRenderProp('value'));\n\t}\n\n\t/** Call from `componentDidLoad`: fills the counter spans once they exist. */\n\tprotected didLoadTextInput(): void {\n\t\tif (this.counter.hasCounter() || this.counter.hasSoftLimit()) {\n\t\t\tthis.counter.updateImmediate(this._value?.length ?? 0);\n\t\t}\n\t}\n\n\t/** Call from `disconnectedCallback`. */\n\tprotected destroyTextInput(): void {\n\t\tthis.destroyFormField();\n\t\tthis.counter.destroy();\n\t}\n\n\t// --- Prop application ---\n\n\tprotected applyAccessKey(value?: AccessKeyPropType): void {\n\t\taccessKeyProp.apply(value, (v) => this.textShared.setRenderProp('accessKey', v));\n\t\tvalidateAccessAndShortKey(value, this._shortKey);\n\t}\n\n\tprotected applyAutoComplete(value?: AutoCompletePropType): void {\n\t\tautoCompleteProp.apply(value, (v) => this.textShared.setRenderProp('autoComplete', v));\n\t}\n\n\tprotected applyIcons(value?: IconsHorizontalPropType): void {\n\t\thorizontalIconsProp.apply(value, (v) => this.textShared.setRenderProp('icons', v));\n\t}\n\n\tprotected applyPattern(value?: string): void {\n\t\tpatternProp.apply(value, (v) => this.textShared.setRenderProp('pattern', v));\n\t}\n\n\tprotected applyPlaceholder(value?: string): void {\n\t\tplaceholderProp.apply(value, (v) => this.textShared.setRenderProp('placeholder', v));\n\t}\n\n\tprotected applyReadOnly(value?: boolean): void {\n\t\treadOnlyProp.apply(value, (v) => this.textShared.setRenderProp('readOnly', v));\n\t}\n\n\tprotected applyRequired(value?: boolean): void {\n\t\trequiredProp.apply(value, (v) => this.textShared.setRenderProp('required', v));\n\t}\n\n\tprotected applyShortKey(value?: ShortKeyPropType): void {\n\t\tshortKeyProp.apply(value, (v) => this.textShared.setRenderProp('shortKey', v));\n\t\tvalidateAccessAndShortKey(this._accessKey, value);\n\t}\n\n\t/** Without `_smartButton` no button is rendered, so no default may remain. */\n\tprotected applySmartButton(value?: Stringified<InternalButtonProps>): void {\n\t\tif (value === undefined || value === null) {\n\t\t\tthis.textShared.unsetRenderProp('smartButton');\n\t\t} else {\n\t\t\tsmartButtonProp.apply(value, (v) => this.textShared.setRenderProp('smartButton', v));\n\t\t}\n\t}\n\n\tprotected applyValue(value?: string): void {\n\t\tthis.initValue(value);\n\t\tthis.counter.update(value?.length ?? 0);\n\t}\n\n\t/** Applies the value on load, without a counter update: `didLoadTextInput` fills the counter once its spans exist. */\n\tprotected initValue(value?: string): void {\n\t\tstringValueProp.apply(value, (v) => this.textShared.setRenderProp('value', v));\n\t\tthis.formAssociation.setFormAssociatedValue(this.textShared.getRenderProp('value'));\n\t}\n\n\t/** Applies the maximum on load, without a counter update, see `initValue`. */\n\tprotected initMaxLength(value?: number): void {\n\t\tthis.counter.watchMaxLength(value);\n\t}\n\n\tprotected applyVariant(value?: VariantClassNamePropType): void {\n\t\tvariantProp.apply(value, (v) => this.textShared.setRenderProp('variant', v));\n\t}\n\n\tprotected applyHasCounter(value?: boolean): void {\n\t\tthis.counter.watchHasCounter(value);\n\t}\n\n\tprotected applyMaxLength(value?: number): void {\n\t\tthis.counter.watchMaxLength(value);\n\t\tthis.counter.updateImmediate(this._value?.length ?? 0);\n\t}\n\n\tprotected applyMaxLengthBehavior(value?: MaxLengthBehaviorPropType): void {\n\t\tthis.counter.watchMaxLengthBehavior(value);\n\t}\n\n\t// --- Event handling ---\n\n\t/** Writes the value before the input event is dispatched, so the watcher has run when listeners read it. */\n\tprotected readonly handleTextInput = (event: Event): void => {\n\t\tthis._value = (event.target as HTMLInputElement).value;\n\t\tthis.handleInput(event);\n\t};\n\n\tprotected readonly handleTextChange = (event: Event, value?: unknown): void => {\n\t\tthis.handleChange(event, value);\n\t\tthis.hasValue = Boolean(value ?? (event.target as HTMLInputElement).value);\n\t};\n\n\tprotected readonly handleTextFocus = (event: FocusEvent): void => {\n\t\tthis.handleFocus(event);\n\t\tthis.counter.retriggerAria(this._value?.length ?? 0);\n\t};\n\n\t/** Enter submits the surrounding `kol-form`, like in a native form. */\n\tprotected readonly handleTextKeyDown = (event: KeyboardEvent): void => {\n\t\tthis.handleKeyDown(event);\n\t\tthis.counter.handleKeyDown(event, this.ctaRef.el?.value.length ?? 0);\n\t\tif (event.code === 'Enter' || event.code === 'NumpadEnter') {\n\t\t\tpropagateSubmitEventToForm({\n\t\t\t\tform: this.host,\n\t\t\t\tref: this.ctaRef.el,\n\t\t\t});\n\t\t}\n\t};\n\n\t// --- Render ---\n\n\t/** Props of the form field shell, with the counter, the limit and the root classes of the text fields. */\n\tprotected getTextFormFieldProps(classNames: string): FormFieldFCProps {\n\t\tconst shared = this.textShared;\n\t\treturn this.getFormFieldProps({\n\t\t\tclass: clsx(classNames, {\n\t\t\t\t'has-value': this.hasValue,\n\t\t\t\t'kol-form-field--has-counter': this.counter.hasSoftLimit() || this.counter.hasCounter(),\n\t\t\t}),\n\t\t\taccessKey: shared.getRenderProp('accessKey') || undefined,\n\t\t\tshortKey: shared.getRenderProp('shortKey') || undefined,\n\t\t\tvariant: shared.getRenderProp('variant'),\n\t\t\trequired: shared.getRenderProp('required'),\n\t\t\treadOnly: shared.getRenderProp('readOnly'),\n\t\t\tmaxLength: this.counter.getRenderProp('maxLength'),\n\t\t\tcounter: this.counter.getCounterProps(),\n\t\t});\n\t}\n\n\t/** Adornments of the input container; `endAdornment` is the field-specific button, if any. */\n\tprotected getTextInputAdornments(endAdornment?: VNode | null): { startAdornment: VNode[]; endAdornment: VNode[] } {\n\t\treturn getInputAdornments({\n\t\t\ticons: this.textShared.getRenderProp('icons'),\n\t\t\tsmartButton: this.getSmartButtonFcProps(\n\t\t\t\tthis.textShared.getRenderProp('smartButton') as InternalButtonProps | undefined,\n\t\t\t\tthis.textShared.getRenderProp('disabled'),\n\t\t\t),\n\t\t\tendAdornment,\n\t\t});\n\t}\n\n\t/**\n\t * Props of the native `<input>`. The keys follow the order of the legacy state wrapper, and props\n\t * the legacy state only held once set are only passed when set: the rendered attributes keep their\n\t * order in the hydrate snapshot.\n\t */\n\tprotected getTextInputProps({ type, spellcheck, multiple, suggestions }: TextInputFieldProps, overrides: Partial<InputFCProps> = {}): InputFCProps {\n\t\tconst shared = this.textShared;\n\t\tconst id = shared.getState('id');\n\t\tconst accessKey = shared.getRenderProp('accessKey');\n\t\tconst shortKey = shared.getRenderProp('shortKey');\n\t\tconst placeholder = shared.getRenderProp('placeholder');\n\t\tconst pattern = shared.getRenderProp('pattern');\n\t\tconst maxLength = this.counter.getMaxLengthAttribute();\n\t\tconst characterLimitHintId = this.counter.getCharacterLimitHintId(id);\n\t\tconst { ariaDescribedBy, hasError } = this.getAria();\n\n\t\treturn {\n\t\t\tid,\n\t\t\thideLabel: shared.getRenderProp('hideLabel'),\n\t\t\tlabel: shared.getRenderProp('label'),\n\t\t\tdisabled: shared.getRenderProp('disabled'),\n\t\t\t// The name prop defaults to `''`; an unnamed field renders no `name` attribute.\n\t\t\tname: shared.getRenderProp('name') || undefined,\n\t\t\t...(accessKey ? { accessKey } : {}),\n\t\t\t...(type !== undefined ? { type } : {}),\n\t\t\tvalue: shared.getRenderProp('value'),\n\t\t\trequired: shared.getRenderProp('required'),\n\t\t\t...(maxLength !== undefined ? { maxlength: maxLength } : {}),\n\t\t\t...(placeholder !== undefined ? { placeholder } : {}),\n\t\t\tautoComplete: shared.getRenderProp('autoComplete'),\n\t\t\t...(spellcheck !== undefined ? { spellcheck } : {}),\n\t\t\t...(pattern !== undefined ? { pattern } : {}),\n\t\t\treadonly: shared.getRenderProp('readOnly'),\n\t\t\t...(multiple !== undefined ? { multiple } : {}),\n\t\t\ttouched: shared.getRenderProp('touched'),\n\t\t\tmsg: shared.getRenderProp('msg'),\n\t\t\t...(shortKey ? { 'aria-keyshortcuts': shortKey } : {}),\n\t\t\t...(suggestions && suggestions.length > 0 ? { suggestions: (<SuggestionsFC id={id} suggestions={suggestions} />) as VNode } : {}),\n\t\t\tref: this.ctaRef,\n\t\t\tonBlur: this.handleBlur,\n\t\t\tonChange: this.handleTextChange,\n\t\t\tonClick: this.handleClick,\n\t\t\tonFocus: this.handleTextFocus,\n\t\t\tonInput: this.handleTextInput,\n\t\t\tonKeyDown: this.handleTextKeyDown,\n\t\t\t...overrides,\n\t\t\tariaDescribedBy: characterLimitHintId ? [...ariaDescribedBy, characterLimitHintId] : ariaDescribedBy,\n\t\t\t'aria-invalid': hasError ? 'true' : undefined,\n\t\t};\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAcO,MAAM,WAAW,GAAG,oBAAoB,CAAc,SAAS,EAAE,SAA8B,EAAE,eAAe,CAAC;;ACO3G,MAAA,wBAAwB,GAAG;AACvC,IAAA,QAAQ,EAAE,CAAC,GAAG,wBAAwB,CAAC,QAAQ,CAAC;AAChD,IAAA,QAAQ,EAAE;QACT,GAAG,wBAAwB,CAAC,QAAQ;QACpC,aAAa;QACb,gBAAgB;QAChB,mBAAmB;QACnB,WAAW;QACX,eAAe;QACf,YAAY;QACZ,YAAY;QACZ,YAAY;QACZ,eAAe;QACf,eAAe;QACf,WAAW;AACX,KAAA;;;ACmBI,MAAgB,yBAAwD,SAAQ,yBAA8B,CAAA;AAApH,IAAA,WAAA,GAAA;;AAMoB,QAAA,IAAM,CAAA,MAAA,GAAG,YAAY,EAAoB;QAEzC,IAAO,CAAA,OAAA,GAAG,IAAI,eAAe,CAAC,gBAAgB,CAAC,SAAS,CAAC;AAMlE,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AA0GP,QAAA,IAAA,CAAA,eAAe,GAAG,CAAC,KAAY,KAAU;YAC3D,IAAI,CAAC,MAAM,GAAI,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AAE,IAAI,CAAC,MAAM,EAChB,MAAM,EAAE,IAAI,CAAC,UAAU,EACvB,QAAQ,EAAE,IAAI,CAAC,gBAAgB,EAC/B,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,OAAO,EAAE,IAAI,CAAC,eAAe,EAC7B,OAAO,EAAE,IAAI,CAAC,eAAe,EAC7B,SAAS,EAAE,IAAI,CAAC,iBAAiB,EAAA,CAAA,EAC9B,SAAS,CAAA,EAAA,EACZ,eAAe,EAAE,oBAAoB,GAAG,CAAC,GAAG,eAAe,EAAE,oBAAoB,CAAC,GAAG,eAAe,EACpG,cAAc,EAAE,QAAQ,GAAG,MAAM,GAAG,SAAS,EAC5C,CAAA;;AAEH;;;;"}
1
+ {"version":3,"file":"base-web-component-BFCVvyYG.js","sources":["src/internal/props/pattern.ts","src/internal/functional-components/text-input/api.tsx","src/internal/functional-components/text-input/base-web-component.tsx"],"sourcesContent":["import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeString } from './helpers/normalizers';\n\n/**\n * Pattern prop for text-based inputs\n *\n * Description:\n * A regular expression the value has to match for the native constraint validation.\n *\n * @see https://html.spec.whatwg.org/multipage/input.html#attr-input-pattern\n */\nexport type PatternProp = SimpleProp<'pattern', string>;\n// The default is `undefined`: the native attribute is only rendered when a pattern is set.\nexport const patternProp = createPropDefinition<PatternProp>('pattern', undefined as unknown as string, normalizeString);\n","import {\n\taccessKeyProp,\n\tautoCompleteProp,\n\thorizontalIconsProp,\n\tpatternProp,\n\tplaceholderProp,\n\treadOnlyProp,\n\trequiredProp,\n\tshortKeyProp,\n\tsmartButtonProp,\n\tstringValueProp,\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\n/**\n * Props email, password and text have in common. The counter props (`hasCounter`, `maxLength`,\n * `maxLengthBehavior`) belong to the `CounterBehavior` and are not part of this config.\n */\nexport const textInputBasePropsConfig = {\n\trequired: [...formFieldBasePropsConfig.required],\n\toptional: [\n\t\t...formFieldBasePropsConfig.optional,\n\t\taccessKeyProp,\n\t\tautoCompleteProp,\n\t\thorizontalIconsProp,\n\t\tpatternProp,\n\t\tplaceholderProp,\n\t\treadOnlyProp,\n\t\trequiredProp,\n\t\tshortKeyProp,\n\t\tsmartButtonProp,\n\t\tstringValueProp,\n\t\tvariantProp,\n\t],\n} as const satisfies PropsConfigShape;\n\nexport type TextInputBaseApi = ApiFromConfig<typeof textInputBasePropsConfig, { States: FormFieldBaseStates }>;\n","import { h } from '@stencil/core';\nimport type { VNode } from '@stencil/core/internal';\nimport { propagateSubmitEventToForm } from '../../../components/form/controller';\nimport type {\n\tAccessKeyPropType,\n\tAutoCompletePropType,\n\tIconsHorizontalPropType,\n\tInternalButtonProps,\n\tMaxLengthBehaviorPropType,\n\tShortKeyPropType,\n\tStringified,\n\tVariantClassNamePropType,\n\tW3CInputValue,\n} from '../../../schema';\nimport { validateAccessAndShortKey } from '../../../schema/validators/access-and-short-key';\nimport clsx from '../../../utils/clsx';\nimport { createCtaRef } from '../../../utils/element-interaction';\nimport {\n\taccessKeyProp,\n\tautoCompleteProp,\n\thorizontalIconsProp,\n\tpatternProp,\n\tplaceholderProp,\n\treadOnlyProp,\n\trequiredProp,\n\tshortKeyProp,\n\tsmartButtonProp,\n\tstringValueProp,\n\tvariantProp,\n} from '../../props';\nimport { BaseWebComponent } from '../base-web-component';\nimport { CounterBehavior } from '../counter/behavior';\nimport { getInputAdornments } from '../form-field/adornments';\nimport { BaseFormFieldWebComponent } from '../form-field/base-web-component';\nimport type { FormFieldFCProps } from '../form-field/component';\nimport type { InputFCProps } from '../form-field/input';\nimport { SuggestionsFC } from '../form-field/suggestions';\nimport type { TextInputBaseApi } from './api';\n\ntype TextInputFieldProps = {\n\t/** Native type; `kol-input-text` passes it where its state carried `_type`, before the value. */\n\ttype?: InputFCProps['type'];\n\tspellcheck?: boolean;\n\tmultiple?: boolean;\n\tsuggestions?: W3CInputValue[];\n};\n\n/**\n * Shared orchestrator implementation of `kol-input-email`, `kol-input-password` and `kol-input-text`\n * on top of the form field base: the common text input props, the character counter, the submit on\n * Enter and the props of the native `<input>`.\n *\n * As in the form field base, the concrete element declares every `@Prop` with its `@Watch`, which\n * calls the matching `apply*` method (DD16).\n */\nexport abstract class BaseTextInputWebComponent<Api extends TextInputBaseApi> extends BaseFormFieldWebComponent<Api> {\n\tpublic abstract _accessKey?: AccessKeyPropType;\n\tpublic abstract _shortKey?: ShortKeyPropType;\n\t/** Written on every input, so the watcher updates the counter and the form value. */\n\tpublic abstract _value?: string;\n\n\tprotected readonly ctaRef = createCtaRef<HTMLInputElement>();\n\n\tprotected readonly counter = new CounterBehavior(BaseWebComponent.stateLess);\n\n\t/**\n\t * Whether the field has a value, rendered as the root class `has-value`. It is a plain field, not\n\t * state: changing it does not re-render, the class follows with the next render (#11053).\n\t */\n\tprotected hasValue = false;\n\n\t/** Typed view on the text input props, see `shared` in the form field base. */\n\tprivate get textShared(): BaseTextInputWebComponent<TextInputBaseApi> {\n\t\treturn this as unknown as BaseTextInputWebComponent<TextInputBaseApi>;\n\t}\n\n\t/** Call from `componentWillLoad`, after the value has been applied. */\n\tprotected initHasValue(): void {\n\t\tthis.hasValue = Boolean(this.textShared.getRenderProp('value'));\n\t}\n\n\t/** Call from `componentDidLoad`: fills the counter spans once they exist. */\n\tprotected didLoadTextInput(): void {\n\t\tif (this.counter.hasCounter() || this.counter.hasSoftLimit()) {\n\t\t\tthis.counter.updateImmediate(this._value?.length ?? 0);\n\t\t}\n\t}\n\n\t/** Call from `disconnectedCallback`. */\n\tprotected destroyTextInput(): void {\n\t\tthis.destroyFormField();\n\t\tthis.counter.destroy();\n\t}\n\n\t// --- Prop application ---\n\n\tprotected applyAccessKey(value?: AccessKeyPropType): void {\n\t\taccessKeyProp.apply(value, (v) => this.textShared.setRenderProp('accessKey', v));\n\t\tvalidateAccessAndShortKey(value, this._shortKey);\n\t}\n\n\tprotected applyAutoComplete(value?: AutoCompletePropType): void {\n\t\tautoCompleteProp.apply(value, (v) => this.textShared.setRenderProp('autoComplete', v));\n\t}\n\n\tprotected applyIcons(value?: IconsHorizontalPropType): void {\n\t\thorizontalIconsProp.apply(value, (v) => this.textShared.setRenderProp('icons', v));\n\t}\n\n\tprotected applyPattern(value?: string): void {\n\t\tpatternProp.apply(value, (v) => this.textShared.setRenderProp('pattern', v));\n\t}\n\n\tprotected applyPlaceholder(value?: string): void {\n\t\tplaceholderProp.apply(value, (v) => this.textShared.setRenderProp('placeholder', v));\n\t}\n\n\tprotected applyReadOnly(value?: boolean): void {\n\t\treadOnlyProp.apply(value, (v) => this.textShared.setRenderProp('readOnly', v));\n\t}\n\n\tprotected applyRequired(value?: boolean): void {\n\t\trequiredProp.apply(value, (v) => this.textShared.setRenderProp('required', v));\n\t}\n\n\tprotected applyShortKey(value?: ShortKeyPropType): void {\n\t\tshortKeyProp.apply(value, (v) => this.textShared.setRenderProp('shortKey', v));\n\t\tvalidateAccessAndShortKey(this._accessKey, value);\n\t}\n\n\t/** Without `_smartButton` no button is rendered, so no default may remain. */\n\tprotected applySmartButton(value?: Stringified<InternalButtonProps>): void {\n\t\tif (value === undefined || value === null) {\n\t\t\tthis.textShared.unsetRenderProp('smartButton');\n\t\t} else {\n\t\t\tsmartButtonProp.apply(value, (v) => this.textShared.setRenderProp('smartButton', v));\n\t\t}\n\t}\n\n\tprotected applyValue(value?: string): void {\n\t\tthis.initValue(value);\n\t\tthis.counter.update(value?.length ?? 0);\n\t}\n\n\t/** Applies the value on load, without a counter update: `didLoadTextInput` fills the counter once its spans exist. */\n\tprotected initValue(value?: string): void {\n\t\tstringValueProp.apply(value, (v) => this.textShared.setRenderProp('value', v));\n\t\tthis.formAssociation.setFormAssociatedValue(this.textShared.getRenderProp('value'));\n\t}\n\n\t/** Applies the maximum on load, without a counter update, see `initValue`. */\n\tprotected initMaxLength(value?: number): void {\n\t\tthis.counter.watchMaxLength(value);\n\t}\n\n\tprotected applyVariant(value?: VariantClassNamePropType): void {\n\t\tvariantProp.apply(value, (v) => this.textShared.setRenderProp('variant', v));\n\t}\n\n\tprotected applyHasCounter(value?: boolean): void {\n\t\tthis.counter.watchHasCounter(value);\n\t}\n\n\tprotected applyMaxLength(value?: number): void {\n\t\tthis.counter.watchMaxLength(value);\n\t\tthis.counter.updateImmediate(this._value?.length ?? 0);\n\t}\n\n\tprotected applyMaxLengthBehavior(value?: MaxLengthBehaviorPropType): void {\n\t\tthis.counter.watchMaxLengthBehavior(value);\n\t}\n\n\t// --- Event handling ---\n\n\t/** Writes the value before the input event is dispatched, so the watcher has run when listeners read it. */\n\tprotected readonly handleTextInput = (event: Event): void => {\n\t\tthis._value = (event.target as HTMLInputElement).value;\n\t\tthis.handleInput(event);\n\t};\n\n\tprotected readonly handleTextChange = (event: Event, value?: unknown): void => {\n\t\tthis.handleChange(event, value);\n\t\tthis.hasValue = Boolean(value ?? (event.target as HTMLInputElement).value);\n\t};\n\n\tprotected readonly handleTextFocus = (event: FocusEvent): void => {\n\t\tthis.handleFocus(event);\n\t\tthis.counter.retriggerAria(this._value?.length ?? 0);\n\t};\n\n\t/** Enter submits the surrounding `kol-form`, like in a native form. */\n\tprotected readonly handleTextKeyDown = (event: KeyboardEvent): void => {\n\t\tthis.handleKeyDown(event);\n\t\tthis.counter.handleKeyDown(event, this.ctaRef.el?.value.length ?? 0);\n\t\tif (event.code === 'Enter' || event.code === 'NumpadEnter') {\n\t\t\tpropagateSubmitEventToForm({\n\t\t\t\tform: this.host,\n\t\t\t\tref: this.ctaRef.el,\n\t\t\t});\n\t\t}\n\t};\n\n\t// --- Render ---\n\n\t/** Props of the form field shell, with the counter, the limit and the root classes of the text fields. */\n\tprotected getTextFormFieldProps(classNames: string): FormFieldFCProps {\n\t\tconst shared = this.textShared;\n\t\treturn this.getFormFieldProps({\n\t\t\tclass: clsx(classNames, {\n\t\t\t\t'has-value': this.hasValue,\n\t\t\t\t'kol-form-field--has-counter': this.counter.hasSoftLimit() || this.counter.hasCounter(),\n\t\t\t}),\n\t\t\taccessKey: shared.getRenderProp('accessKey') || undefined,\n\t\t\tshortKey: shared.getRenderProp('shortKey') || undefined,\n\t\t\tvariant: shared.getRenderProp('variant'),\n\t\t\trequired: shared.getRenderProp('required'),\n\t\t\treadOnly: shared.getRenderProp('readOnly'),\n\t\t\tmaxLength: this.counter.getRenderProp('maxLength'),\n\t\t\tcounter: this.counter.getCounterProps(),\n\t\t});\n\t}\n\n\t/** Adornments of the input container; `endAdornment` is the field-specific button, if any. */\n\tprotected getTextInputAdornments(endAdornment?: VNode | null): { startAdornment: VNode[]; endAdornment: VNode[] } {\n\t\treturn getInputAdornments({\n\t\t\ticons: this.textShared.getRenderProp('icons'),\n\t\t\tsmartButton: this.getSmartButtonFcProps(\n\t\t\t\tthis.textShared.getRenderProp('smartButton') as InternalButtonProps | undefined,\n\t\t\t\tthis.textShared.getRenderProp('disabled'),\n\t\t\t),\n\t\t\tendAdornment,\n\t\t});\n\t}\n\n\t/**\n\t * Props of the native `<input>`. The keys follow the order of the legacy state wrapper, and props\n\t * the legacy state only held once set are only passed when set: the rendered attributes keep their\n\t * order in the hydrate snapshot.\n\t */\n\tprotected getTextInputProps({ type, spellcheck, multiple, suggestions }: TextInputFieldProps, overrides: Partial<InputFCProps> = {}): InputFCProps {\n\t\tconst shared = this.textShared;\n\t\tconst id = shared.getState('id');\n\t\tconst accessKey = shared.getRenderProp('accessKey');\n\t\tconst shortKey = shared.getRenderProp('shortKey');\n\t\tconst placeholder = shared.getRenderProp('placeholder');\n\t\tconst pattern = shared.getRenderProp('pattern');\n\t\tconst maxLength = this.counter.getMaxLengthAttribute();\n\t\tconst characterLimitHintId = this.counter.getCharacterLimitHintId(id);\n\t\tconst { ariaDescribedBy, hasError } = this.getAria();\n\n\t\treturn {\n\t\t\tid,\n\t\t\thideLabel: shared.getRenderProp('hideLabel'),\n\t\t\tlabel: shared.getRenderProp('label'),\n\t\t\tdisabled: shared.getRenderProp('disabled'),\n\t\t\t// The name prop defaults to `''`; an unnamed field renders no `name` attribute.\n\t\t\tname: shared.getRenderProp('name') || undefined,\n\t\t\t...(accessKey ? { accessKey } : {}),\n\t\t\t...(type !== undefined ? { type } : {}),\n\t\t\tvalue: shared.getRenderProp('value'),\n\t\t\trequired: shared.getRenderProp('required'),\n\t\t\t...(maxLength !== undefined ? { maxlength: maxLength } : {}),\n\t\t\t...(placeholder !== undefined ? { placeholder } : {}),\n\t\t\tautoComplete: shared.getRenderProp('autoComplete'),\n\t\t\t...(spellcheck !== undefined ? { spellcheck } : {}),\n\t\t\t...(pattern !== undefined ? { pattern } : {}),\n\t\t\treadonly: shared.getRenderProp('readOnly'),\n\t\t\t...(multiple !== undefined ? { multiple } : {}),\n\t\t\ttouched: shared.getRenderProp('touched'),\n\t\t\tmsg: shared.getRenderProp('msg'),\n\t\t\t...(shortKey ? { 'aria-keyshortcuts': shortKey } : {}),\n\t\t\t...(suggestions && suggestions.length > 0 ? { suggestions: (<SuggestionsFC id={id} suggestions={suggestions} />) as VNode } : {}),\n\t\t\tref: this.ctaRef,\n\t\t\tonBlur: this.handleBlur,\n\t\t\tonChange: this.handleTextChange,\n\t\t\tonClick: this.handleClick,\n\t\t\tonFocus: this.handleTextFocus,\n\t\t\tonInput: this.handleTextInput,\n\t\t\tonKeyDown: this.handleTextKeyDown,\n\t\t\t...overrides,\n\t\t\tariaDescribedBy: characterLimitHintId ? [...ariaDescribedBy, characterLimitHintId] : ariaDescribedBy,\n\t\t\t'aria-invalid': hasError ? 'true' : undefined,\n\t\t};\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAcO,MAAM,WAAW,GAAG,oBAAoB,CAAc,SAAS,EAAE,SAA8B,EAAE,eAAe,CAAC;;ACO3G,MAAA,wBAAwB,GAAG;AACvC,IAAA,QAAQ,EAAE,CAAC,GAAG,wBAAwB,CAAC,QAAQ,CAAC;AAChD,IAAA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,EAAE,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,MACtC,QAAQ,KAAK,SAAS,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,EAC9C,EAAA,EAAA,OAAO,EAAE,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC,EACxC,GAAG,EAAE,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,EAC7B,CAAA,GAAC,QAAQ,GAAG,EAAE,mBAAmB,EAAE,QAAQ,EAAE,GAAG,EAAE,EAClD,GAAC,WAAW,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,GAAG,EAAE,WAAW,GAAG,CAAA,CAAC,aAAa,EAAC,EAAA,EAAE,EAAE,EAAE,EAAE,WAAW,EAAE,WAAW,EAAI,CAAA,CAAU,EAAE,GAAG,EAAE,EAChI,EAAA,EAAA,GAAG,EAAE,IAAI,CAAC,MAAM,EAChB,MAAM,EAAE,IAAI,CAAC,UAAU,EACvB,QAAQ,EAAE,IAAI,CAAC,gBAAgB,EAC/B,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,OAAO,EAAE,IAAI,CAAC,eAAe,EAC7B,OAAO,EAAE,IAAI,CAAC,eAAe,EAC7B,SAAS,EAAE,IAAI,CAAC,iBAAiB,EAAA,CAAA,EAC9B,SAAS,CAAA,EAAA,EACZ,eAAe,EAAE,oBAAoB,GAAG,CAAC,GAAG,eAAe,EAAE,oBAAoB,CAAC,GAAG,eAAe,EACpG,cAAc,EAAE,QAAQ,GAAG,MAAM,GAAG,SAAS,EAC5C,CAAA;;AAEH;;;;"}
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{a as t}from"./dev.utils-CYtV9X0K.js";import"./common-BqpMtheU.js";import{c as e,n as r,o as i,b as n,i as a}from"./base-web-component-3R1Dy3QK.js";import{B as h}from"./behavior-D1kOlK6p.js";import{t as o}from"./i18n-BaCf-SDK.js";const s=e("hasCounter",false,r);const c=e("maxLength",undefined,i,(t=>t===undefined||t>=0));const u=["hard","soft"];function m(t){const e=n(t);if(a(e,u)){return e}throw new Error(`Invalid max length behavior: ${e}`)}const l=e("maxLengthBehavior","hard",m);const f={optional:[s,c,l]};const g=(t,e,r)=>{if(typeof e!=="number"){return o("kol-character-counter-current",{placeholders:{current:String(r)}})}if(t==="soft"){const t=e-r;return t<0?o("kol-character-limit-exceeded",{placeholders:{over:String(Math.abs(t))}}):o("kol-character-limit-remaining",{placeholders:{remaining:String(t)}})}return o("kol-character-counter-current-of-max",{placeholders:{current:String(r),max:String(e)}})};const d=(t,e,r)=>{if(typeof e!=="number"){return o("kol-character-counter-current",{placeholders:{current:String(r)}})}if(t==="soft"){const t=e-r;return t<0?o("kol-character-limit-exceeded",{placeholders:{over:String(Math.abs(t))}}):o("kol-character-limit-remaining",{placeholders:{remaining:String(t)}})}return o("kol-character-counter-current-of-max-aria",{placeholders:{current:String(r),max:String(e)}})};const x=(t,e,r)=>{if(t==="hard"&&typeof e==="number"&&r>=e){return o("kol-character-counter-max-aria")}return""};const p=t=>t.key.length===1&&!t.ctrlKey&&!t.metaKey&&!t.altKey;const L=" ";const v=1e3;class B extends h{constructor(t){super(t,f);this.reannounceToggle=false;this.setVisualRef=t=>{this.visualSpan=t};this.setAriaRef=t=>{this.ariaSpan=t};this.handleKeyDown=(t,e)=>{const{maxLength:r,maxLengthBehavior:i}=this.getLimit();if(i!=="hard"||typeof r!=="number"||e<r)return;if(!p(t))return;this.retriggerAria(e)}}componentWillLoad(t){this.watchHasCounter(t.hasCounter);this.watchMaxLength(t.maxLength);this.watchMaxLengthBehavior(t.maxLengthBehavior)}watchHasCounter(t){s.apply(t,(t=>this.setRenderProp("hasCounter",t)))}watchMaxLength(t){c.apply(t,(t=>this.setRenderProp("maxLength",t)))}watchMaxLengthBehavior(t){l.apply(t,(t=>this.setRenderProp("maxLengthBehavior",t)))}hasCounter(){return this.getRenderProp("hasCounter")===true}hasSoftLimit(){const{maxLength:t,maxLengthBehavior:e}=this.getLimit();return typeof t==="number"&&e==="soft"}getMaxLengthAttribute(){const{maxLength:t,maxLengthBehavior:e}=this.getLimit();return e==="hard"?t:undefined}getCounterProps(){if(!this.hasCounter()){return undefined}const{maxLength:t,maxLengthBehavior:e}=this.getLimit();return{maxLength:t,maxLengthBehavior:e,visualRef:this.setVisualRef,ariaRef:this.setAriaRef}}getCharacterLimitHintId(e){return typeof this.getRenderProp("maxLength")==="number"&&!this.hasCounter()?t(e,"character-limit-hint"):undefined}update(t){const e=this.getLimit();this.updateVisual(t,e);clearTimeout(this.debounceTimer);this.debounceTimer=setTimeout((()=>this.updateAria(t,e)),v)}updateImmediate(t){const e=this.getLimit();this.updateVisual(t,e);clearTimeout(this.debounceTimer);this.updateAria(t,e)}retriggerAria(t){if(!this.ariaSpan)return;const e=this.getLimit();clearTimeout(this.debounceTimer);this.debounceTimer=setTimeout((()=>this.updateAria(t,e,true)),v)}destroy(){clearTimeout(this.debounceTimer)}getLimit(){return{maxLength:this.getRenderProp("maxLength"),maxLengthBehavior:this.getRenderProp("maxLengthBehavior")}}updateVisual(t,{maxLength:e,maxLengthBehavior:r}){if(!this.visualSpan)return;this.visualSpan.innerText=g(r,e,t);this.visualSpan.classList.toggle("kol-form-field__counter--exceeded",r==="soft"&&typeof e==="number"&&t>e)}updateAria(t,{maxLength:e,maxLengthBehavior:r},i=false){if(!this.ariaSpan)return;let n=[d(r,e,t),x(r,e,t)].filter(Boolean).join(" ");if(i){this.reannounceToggle=!this.reannounceToggle;if(this.reannounceToggle){n+=L}}this.ariaSpan.innerText=n}}export{B as C};
5
- //# sourceMappingURL=behavior-BuNqmjz8.js.map
4
+ import{a as t}from"./dev.utils-CJMVCYWh.js";import"./common-BqpMtheU.js";import{c as e,n as r,o as i,b as n,i as a}from"./base-web-component-3R1Dy3QK.js";import{B as h}from"./behavior-D1kOlK6p.js";import{t as o}from"./i18n-BaCf-SDK.js";const s=e("hasCounter",false,r);const c=e("maxLength",undefined,i,(t=>t===undefined||t>=0));const u=["hard","soft"];function m(t){const e=n(t);if(a(e,u)){return e}throw new Error(`Invalid max length behavior: ${e}`)}const l=e("maxLengthBehavior","hard",m);const f={optional:[s,c,l]};const g=(t,e,r)=>{if(typeof e!=="number"){return o("kol-character-counter-current",{placeholders:{current:String(r)}})}if(t==="soft"){const t=e-r;return t<0?o("kol-character-limit-exceeded",{placeholders:{over:String(Math.abs(t))}}):o("kol-character-limit-remaining",{placeholders:{remaining:String(t)}})}return o("kol-character-counter-current-of-max",{placeholders:{current:String(r),max:String(e)}})};const d=(t,e,r)=>{if(typeof e!=="number"){return o("kol-character-counter-current",{placeholders:{current:String(r)}})}if(t==="soft"){const t=e-r;return t<0?o("kol-character-limit-exceeded",{placeholders:{over:String(Math.abs(t))}}):o("kol-character-limit-remaining",{placeholders:{remaining:String(t)}})}return o("kol-character-counter-current-of-max-aria",{placeholders:{current:String(r),max:String(e)}})};const x=(t,e,r)=>{if(t==="hard"&&typeof e==="number"&&r>=e){return o("kol-character-counter-max-aria")}return""};const p=t=>t.key.length===1&&!t.ctrlKey&&!t.metaKey&&!t.altKey;const L=" ";const v=1e3;class B extends h{constructor(t){super(t,f);this.reannounceToggle=false;this.setVisualRef=t=>{this.visualSpan=t};this.setAriaRef=t=>{this.ariaSpan=t};this.handleKeyDown=(t,e)=>{const{maxLength:r,maxLengthBehavior:i}=this.getLimit();if(i!=="hard"||typeof r!=="number"||e<r)return;if(!p(t))return;this.retriggerAria(e)}}componentWillLoad(t){this.watchHasCounter(t.hasCounter);this.watchMaxLength(t.maxLength);this.watchMaxLengthBehavior(t.maxLengthBehavior)}watchHasCounter(t){s.apply(t,(t=>this.setRenderProp("hasCounter",t)))}watchMaxLength(t){c.apply(t,(t=>this.setRenderProp("maxLength",t)))}watchMaxLengthBehavior(t){l.apply(t,(t=>this.setRenderProp("maxLengthBehavior",t)))}hasCounter(){return this.getRenderProp("hasCounter")===true}hasSoftLimit(){const{maxLength:t,maxLengthBehavior:e}=this.getLimit();return typeof t==="number"&&e==="soft"}getMaxLengthAttribute(){const{maxLength:t,maxLengthBehavior:e}=this.getLimit();return e==="hard"?t:undefined}getCounterProps(){if(!this.hasCounter()){return undefined}const{maxLength:t,maxLengthBehavior:e}=this.getLimit();return{maxLength:t,maxLengthBehavior:e,visualRef:this.setVisualRef,ariaRef:this.setAriaRef}}getCharacterLimitHintId(e){return typeof this.getRenderProp("maxLength")==="number"&&!this.hasCounter()?t(e,"character-limit-hint"):undefined}update(t){const e=this.getLimit();this.updateVisual(t,e);clearTimeout(this.debounceTimer);this.debounceTimer=setTimeout((()=>this.updateAria(t,e)),v)}updateImmediate(t){const e=this.getLimit();this.updateVisual(t,e);clearTimeout(this.debounceTimer);this.updateAria(t,e)}retriggerAria(t){if(!this.ariaSpan)return;const e=this.getLimit();clearTimeout(this.debounceTimer);this.debounceTimer=setTimeout((()=>this.updateAria(t,e,true)),v)}destroy(){clearTimeout(this.debounceTimer)}getLimit(){return{maxLength:this.getRenderProp("maxLength"),maxLengthBehavior:this.getRenderProp("maxLengthBehavior")}}updateVisual(t,{maxLength:e,maxLengthBehavior:r}){if(!this.visualSpan)return;this.visualSpan.innerText=g(r,e,t);this.visualSpan.classList.toggle("kol-form-field__counter--exceeded",r==="soft"&&typeof e==="number"&&t>e)}updateAria(t,{maxLength:e,maxLengthBehavior:r},i=false){if(!this.ariaSpan)return;let n=[d(r,e,t),x(r,e,t)].filter(Boolean).join(" ");if(i){this.reannounceToggle=!this.reannounceToggle;if(this.reannounceToggle){n+=L}}this.ariaSpan.innerText=n}}export{B as C};
5
+ //# sourceMappingURL=behavior-CH_2MMuX.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"behavior-BuNqmjz8.js","sources":["src/internal/props/has-counter.ts","src/internal/props/max-length.ts","src/internal/props/max-length-behavior.ts","src/internal/functional-components/counter/api.tsx","src/internal/functional-components/counter/texts.ts","src/internal/functional-components/counter/behavior.ts"],"sourcesContent":["import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeBoolean } from './helpers/normalizers';\n\n/**\n * Has counter prop for text-based form fields\n *\n * Description:\n * Shows the character counter below the control.\n */\nexport type HasCounterProp = SimpleProp<'hasCounter', boolean>;\nexport const hasCounterProp = createPropDefinition<HasCounterProp>('hasCounter', false, normalizeBoolean);\n","import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeNumber } from './helpers/normalizers';\n\n/**\n * Max length prop for text-based form fields\n *\n * Description:\n * The maximum number of characters. With the max length behavior `'hard'` it becomes the native\n * `maxlength` attribute, with `'soft'` it is only announced by the character counter.\n *\n * @see https://html.spec.whatwg.org/multipage/input.html#attr-input-maxlength\n */\nexport type MaxLengthProp = SimpleProp<'maxLength', number>;\n// The default is `undefined`: without a maximum there is no limit and no character limit hint. The\n// validation also runs on the default, so it accepts `undefined`.\nexport const maxLengthProp = createPropDefinition<MaxLengthProp>(\n\t'maxLength',\n\tundefined as unknown as number,\n\tnormalizeNumber,\n\t(value) => value === undefined || value >= 0,\n);\n","import type { MaxLengthBehaviorPropType } from '../../schema';\nimport type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { isEnumOption, normalizeString } from './helpers/normalizers';\n\nconst MAX_LENGTH_BEHAVIOR_OPTIONS: readonly MaxLengthBehaviorPropType[] = ['hard', 'soft'];\n\n/**\n * Max length behavior prop for text-based form fields\n *\n * Description:\n * `'hard'` prevents longer input through the native `maxlength` attribute, `'soft'` allows it and\n * lets the character counter announce the exceeded limit.\n */\nexport type MaxLengthBehaviorProp = SimpleProp<'maxLengthBehavior', MaxLengthBehaviorPropType>;\n\nfunction normalizeMaxLengthBehavior(value: unknown): MaxLengthBehaviorPropType {\n\tconst str = normalizeString(value);\n\tif (isEnumOption(str, MAX_LENGTH_BEHAVIOR_OPTIONS)) {\n\t\treturn str;\n\t}\n\tthrow new Error(`Invalid max length behavior: ${str}`);\n}\n\nexport const maxLengthBehaviorProp = createPropDefinition<MaxLengthBehaviorProp>('maxLengthBehavior', 'hard', normalizeMaxLengthBehavior);\n","import { hasCounterProp, maxLengthBehaviorProp, maxLengthProp } from '../../props';\nimport type { ApiFromConfig, PropsConfigShape } from '../generic-types';\n\nexport const counterPropsConfig = {\n\toptional: [hasCounterProp, maxLengthProp, maxLengthBehaviorProp],\n} as const satisfies PropsConfigShape;\n\nexport type CounterApi = ApiFromConfig<typeof counterPropsConfig>;\n","import { translate } from '../../../i18n';\nimport type { MaxLengthBehaviorPropType } from '../../../schema';\n\nexport const getCounterVisualText = (maxLengthBehavior: MaxLengthBehaviorPropType, maxLength: number | undefined, currentLength: number): string => {\n\tif (typeof maxLength !== 'number') {\n\t\treturn translate('kol-character-counter-current', { placeholders: { current: String(currentLength) } });\n\t}\n\tif (maxLengthBehavior === 'soft') {\n\t\tconst remaining = maxLength - currentLength;\n\t\treturn remaining < 0\n\t\t\t? translate('kol-character-limit-exceeded', { placeholders: { over: String(Math.abs(remaining)) } })\n\t\t\t: translate('kol-character-limit-remaining', { placeholders: { remaining: String(remaining) } });\n\t}\n\treturn translate('kol-character-counter-current-of-max', { placeholders: { current: String(currentLength), max: String(maxLength) } });\n};\n\nexport const getCounterAriaText = (maxLengthBehavior: MaxLengthBehaviorPropType, maxLength: number | undefined, currentLength: number): string => {\n\tif (typeof maxLength !== 'number') {\n\t\treturn translate('kol-character-counter-current', { placeholders: { current: String(currentLength) } });\n\t}\n\tif (maxLengthBehavior === 'soft') {\n\t\tconst remaining = maxLength - currentLength;\n\t\treturn remaining < 0\n\t\t\t? translate('kol-character-limit-exceeded', { placeholders: { over: String(Math.abs(remaining)) } })\n\t\t\t: translate('kol-character-limit-remaining', { placeholders: { remaining: String(remaining) } });\n\t}\n\treturn translate('kol-character-counter-current-of-max-aria', { placeholders: { current: String(currentLength), max: String(maxLength) } });\n};\n\nexport const getCounterMaxText = (maxLengthBehavior: MaxLengthBehaviorPropType, maxLength: number | undefined, currentLength: number): string => {\n\tif (maxLengthBehavior === 'hard' && typeof maxLength === 'number' && currentLength >= maxLength) {\n\t\treturn translate('kol-character-counter-max-aria');\n\t}\n\treturn '';\n};\n","import type { MaxLengthBehaviorPropType } from '../../../schema';\nimport { createRelatedUniqueId } from '../../../utils/dev.utils';\nimport { hasCounterProp, maxLengthBehaviorProp, maxLengthProp } from '../../props';\nimport { BaseBehavior } from '../base-behavior';\nimport type { FormFieldFCProps } from '../form-field/component';\nimport type { BehaviorInterface, ResolvedInputProps, StateAccess } from '../generic-types';\nimport type { CounterApi } from './api';\nimport { counterPropsConfig } from './api';\nimport { getCounterAriaText, getCounterMaxText, getCounterVisualText } from './texts';\n\n/** A printable single character without Ctrl, Meta or Alt, i.e. a key press that inserts a character. */\nconst isCharacterInputKey = (event: KeyboardEvent): boolean => event.key.length === 1 && !event.ctrlKey && !event.metaKey && !event.altKey;\n\n/** Invisible no-break space that makes an identical live region text differ, so it is announced again. */\nconst REANNOUNCE_MARKER = ' ';\n\nconst ARIA_DEBOUNCE_MS = 1000;\n\ntype CounterLimit = {\n\tmaxLength?: number;\n\tmaxLengthBehavior: MaxLengthBehaviorPropType;\n};\n\n/**\n * Character counter and character limit of a text field.\n *\n * It owns `hasCounter`, `maxLength` and `maxLengthBehavior` and writes the texts of the two counter\n * spans of `FormFieldFC` directly into the DOM, without a re-render: the visible span immediately,\n * the `aria-live` span debounced, so a screen reader does not announce every key stroke.\n */\nexport class CounterBehavior extends BaseBehavior<CounterApi> implements BehaviorInterface<CounterApi> {\n\tprivate visualSpan?: HTMLSpanElement;\n\tprivate ariaSpan?: HTMLSpanElement;\n\tprivate debounceTimer?: ReturnType<typeof setTimeout>;\n\tprivate reannounceToggle = false;\n\n\tpublic constructor(stateAccess: StateAccess<CounterApi>) {\n\t\tsuper(stateAccess, counterPropsConfig);\n\t}\n\n\tpublic componentWillLoad(props: ResolvedInputProps<CounterApi>): void {\n\t\tthis.watchHasCounter(props.hasCounter);\n\t\tthis.watchMaxLength(props.maxLength);\n\t\tthis.watchMaxLengthBehavior(props.maxLengthBehavior);\n\t}\n\n\tpublic watchHasCounter(value?: boolean): void {\n\t\thasCounterProp.apply(value, (v) => this.setRenderProp('hasCounter', v));\n\t}\n\n\tpublic watchMaxLength(value?: number): void {\n\t\tmaxLengthProp.apply(value, (v) => this.setRenderProp('maxLength', v));\n\t}\n\n\tpublic watchMaxLengthBehavior(value?: MaxLengthBehaviorPropType): void {\n\t\tmaxLengthBehaviorProp.apply(value, (v) => this.setRenderProp('maxLengthBehavior', v));\n\t}\n\n\tpublic readonly setVisualRef = (el?: HTMLSpanElement): void => {\n\t\tthis.visualSpan = el;\n\t};\n\n\tpublic readonly setAriaRef = (el?: HTMLSpanElement): void => {\n\t\tthis.ariaSpan = el;\n\t};\n\n\tpublic hasCounter(): boolean {\n\t\treturn this.getRenderProp('hasCounter') === true;\n\t}\n\n\t/** A maximum with the behavior `'soft'`: the counter announces the exceeded limit instead of `maxlength` preventing it. */\n\tpublic hasSoftLimit(): boolean {\n\t\tconst { maxLength, maxLengthBehavior } = this.getLimit();\n\t\treturn typeof maxLength === 'number' && maxLengthBehavior === 'soft';\n\t}\n\n\t/** The native `maxlength` attribute: only a hard limit prevents longer input. */\n\tpublic getMaxLengthAttribute(): number | undefined {\n\t\tconst { maxLength, maxLengthBehavior } = this.getLimit();\n\t\treturn maxLengthBehavior === 'hard' ? maxLength : undefined;\n\t}\n\n\t/** The `counter` prop of `FormFieldFC`; the counter is only rendered with `hasCounter`. */\n\tpublic getCounterProps(): FormFieldFCProps['counter'] {\n\t\tif (!this.hasCounter()) {\n\t\t\treturn undefined;\n\t\t}\n\t\tconst { maxLength, maxLengthBehavior } = this.getLimit();\n\t\treturn { maxLength, maxLengthBehavior, visualRef: this.setVisualRef, ariaRef: this.setAriaRef };\n\t}\n\n\t/**\n\t * The ID of the hidden character limit hint, which the control references in `aria-describedby`.\n\t * The hint only exists for a maximum without counter, because the counter announces the maximum itself.\n\t */\n\tpublic getCharacterLimitHintId(id: string): string | undefined {\n\t\treturn typeof this.getRenderProp('maxLength') === 'number' && !this.hasCounter() ? createRelatedUniqueId(id, 'character-limit-hint') : undefined;\n\t}\n\n\t/** Updates the visible span immediately and the `aria-live` span debounced. */\n\tpublic update(currentLength: number): void {\n\t\tconst limit = this.getLimit();\n\t\tthis.updateVisual(currentLength, limit);\n\t\tclearTimeout(this.debounceTimer);\n\t\tthis.debounceTimer = setTimeout(() => this.updateAria(currentLength, limit), ARIA_DEBOUNCE_MS);\n\t}\n\n\t/** Updates both spans without debounce, e.g. after the first render or a programmatic change of the limit. */\n\tpublic updateImmediate(currentLength: number): void {\n\t\tconst limit = this.getLimit();\n\t\tthis.updateVisual(currentLength, limit);\n\t\tclearTimeout(this.debounceTimer);\n\t\tthis.updateAria(currentLength, limit);\n\t}\n\n\t/**\n\t * Announces the reached hard limit again on every further typing attempt. `maxlength` blocks the\n\t * input without an `input` event, so the live region would otherwise stay silent.\n\t */\n\tpublic readonly handleKeyDown = (event: KeyboardEvent, currentLength: number): void => {\n\t\tconst { maxLength, maxLengthBehavior } = this.getLimit();\n\t\tif (maxLengthBehavior !== 'hard' || typeof maxLength !== 'number' || currentLength < maxLength) return;\n\t\tif (!isCharacterInputKey(event)) return;\n\t\tthis.retriggerAria(currentLength);\n\t};\n\n\t/** Announces the `aria-live` span again, debounced, even if its text did not change. */\n\tpublic retriggerAria(currentLength: number): void {\n\t\tif (!this.ariaSpan) return;\n\t\tconst limit = this.getLimit();\n\t\tclearTimeout(this.debounceTimer);\n\t\tthis.debounceTimer = setTimeout(() => this.updateAria(currentLength, limit, true), ARIA_DEBOUNCE_MS);\n\t}\n\n\tpublic destroy(): void {\n\t\tclearTimeout(this.debounceTimer);\n\t}\n\n\tprivate getLimit(): CounterLimit {\n\t\treturn { maxLength: this.getRenderProp('maxLength'), maxLengthBehavior: this.getRenderProp('maxLengthBehavior') };\n\t}\n\n\tprivate updateVisual(currentLength: number, { maxLength, maxLengthBehavior }: CounterLimit): void {\n\t\tif (!this.visualSpan) return;\n\t\tthis.visualSpan.innerText = getCounterVisualText(maxLengthBehavior, maxLength, currentLength);\n\t\tthis.visualSpan.classList.toggle(\n\t\t\t'kol-form-field__counter--exceeded',\n\t\t\tmaxLengthBehavior === 'soft' && typeof maxLength === 'number' && currentLength > maxLength,\n\t\t);\n\t}\n\n\tprivate updateAria(currentLength: number, { maxLength, maxLengthBehavior }: CounterLimit, forceReannounce = false): void {\n\t\tif (!this.ariaSpan) return;\n\t\tlet text = [getCounterAriaText(maxLengthBehavior, maxLength, currentLength), getCounterMaxText(maxLengthBehavior, maxLength, currentLength)]\n\t\t\t.filter(Boolean)\n\t\t\t.join(' ');\n\n\t\tif (forceReannounce) {\n\t\t\t// `aria-live` only announces a changed text. A repeated attempt produces the same text, so a\n\t\t\t// no-break space is appended on every other call to make it differ.\n\t\t\tthis.reannounceToggle = !this.reannounceToggle;\n\t\t\tif (this.reannounceToggle) {\n\t\t\t\ttext += REANNOUNCE_MARKER;\n\t\t\t}\n\t\t}\n\n\t\tthis.ariaSpan.innerText = text;\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;AAWO,MAAM,cAAc,GAAG,oBAAoB,CAAiB,YAAY,EAAE,KAAK,EAAE,gBAAgB,CAAC;;ACKlG,MAAM,aAAa,GAAG,oBAAoB,CAChD,WAAW,EACX,SAA8B,EAC9B,eAAe,EACf,CAAC,KAAK,KAAK,KAAK,KAAK,SAAS,IAAI,KAAK,IAAI,CAAC,CAC5C;;AChBD,MAAM,2BAA2B,GAAyC,CAAC,MAAM,EAAE,MAAM,CAAC;AAW1F,SAAS,0BAA0B,CAAC,KAAc,EAAA;AACjD,IAAA,MAAM,GAAG,GAAG,eAAe,CAAC,KAAK,CAAC;AAClC,IAAA,IAAI,YAAY,CAAC,GAAG,EAAE,2BAA2B,CAAC,EAAE;AACnD,QAAA,OAAO,GAAG;;AAEX,IAAA,MAAM,IAAI,KAAK,CAAC,gCAAgC,GAAG,CAAA,CAAE,CAAC;AACvD;AAEO,MAAM,qBAAqB,GAAG,oBAAoB,CAAwB,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AS,EAAE,iBAAiB,EAAgB,EAAE,eAAe,GAAG,KAAK,EAAA;QAChH,IAAI,CAAC,IAAI,CAAC,QAAQ;YAAE;QACpB,IAAI,IAAI,GAAG,CAAC,kBAAkB,CAAC,iBAAiB,EAAE,SAAS,EAAE,aAAa,CAAC,EAAE,iBAAiB,CAAC,iBAAiB,EAAE,SAAS,EAAE,aAAa,CAAC;aACzI,MAAM,CAAC,OAAO;aACd,IAAI,CAAC,GAAG,CAAC;QAEX,IAAI,eAAe,EAAE;AAGpB,YAAA,IAAI,CAAC,gBAAgB,GAAG,CAAC,IAAI,CAAC,gBAAgB;AAC9C,YAAA,IAAI,IAAI,CAAC,gBAAgB,EAAE;gBAC1B,IAAI,IAAI,iBAAiB;;;AAI3B,QAAA,IAAI,CAAC,QAAQ,CAAC,SAAS,GAAG,IAAI;;AAE/B;;;;"}
1
+ {"version":3,"file":"behavior-CH_2MMuX.js","sources":["src/internal/props/has-counter.ts","src/internal/props/max-length.ts","src/internal/props/max-length-behavior.ts","src/internal/functional-components/counter/api.tsx","src/internal/functional-components/counter/texts.ts","src/internal/functional-components/counter/behavior.ts"],"sourcesContent":["import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeBoolean } from './helpers/normalizers';\n\n/**\n * Has counter prop for text-based form fields\n *\n * Description:\n * Shows the character counter below the control.\n */\nexport type HasCounterProp = SimpleProp<'hasCounter', boolean>;\nexport const hasCounterProp = createPropDefinition<HasCounterProp>('hasCounter', false, normalizeBoolean);\n","import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeNumber } from './helpers/normalizers';\n\n/**\n * Max length prop for text-based form fields\n *\n * Description:\n * The maximum number of characters. With the max length behavior `'hard'` it becomes the native\n * `maxlength` attribute, with `'soft'` it is only announced by the character counter.\n *\n * @see https://html.spec.whatwg.org/multipage/input.html#attr-input-maxlength\n */\nexport type MaxLengthProp = SimpleProp<'maxLength', number>;\n// The default is `undefined`: without a maximum there is no limit and no character limit hint. The\n// validation also runs on the default, so it accepts `undefined`.\nexport const maxLengthProp = createPropDefinition<MaxLengthProp>(\n\t'maxLength',\n\tundefined as unknown as number,\n\tnormalizeNumber,\n\t(value) => value === undefined || value >= 0,\n);\n","import type { MaxLengthBehaviorPropType } from '../../schema';\nimport type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { isEnumOption, normalizeString } from './helpers/normalizers';\n\nconst MAX_LENGTH_BEHAVIOR_OPTIONS: readonly MaxLengthBehaviorPropType[] = ['hard', 'soft'];\n\n/**\n * Max length behavior prop for text-based form fields\n *\n * Description:\n * `'hard'` prevents longer input through the native `maxlength` attribute, `'soft'` allows it and\n * lets the character counter announce the exceeded limit.\n */\nexport type MaxLengthBehaviorProp = SimpleProp<'maxLengthBehavior', MaxLengthBehaviorPropType>;\n\nfunction normalizeMaxLengthBehavior(value: unknown): MaxLengthBehaviorPropType {\n\tconst str = normalizeString(value);\n\tif (isEnumOption(str, MAX_LENGTH_BEHAVIOR_OPTIONS)) {\n\t\treturn str;\n\t}\n\tthrow new Error(`Invalid max length behavior: ${str}`);\n}\n\nexport const maxLengthBehaviorProp = createPropDefinition<MaxLengthBehaviorProp>('maxLengthBehavior', 'hard', normalizeMaxLengthBehavior);\n","import { hasCounterProp, maxLengthBehaviorProp, maxLengthProp } from '../../props';\nimport type { ApiFromConfig, PropsConfigShape } from '../generic-types';\n\nexport const counterPropsConfig = {\n\toptional: [hasCounterProp, maxLengthProp, maxLengthBehaviorProp],\n} as const satisfies PropsConfigShape;\n\nexport type CounterApi = ApiFromConfig<typeof counterPropsConfig>;\n","import { translate } from '../../../i18n';\nimport type { MaxLengthBehaviorPropType } from '../../../schema';\n\nexport const getCounterVisualText = (maxLengthBehavior: MaxLengthBehaviorPropType, maxLength: number | undefined, currentLength: number): string => {\n\tif (typeof maxLength !== 'number') {\n\t\treturn translate('kol-character-counter-current', { placeholders: { current: String(currentLength) } });\n\t}\n\tif (maxLengthBehavior === 'soft') {\n\t\tconst remaining = maxLength - currentLength;\n\t\treturn remaining < 0\n\t\t\t? translate('kol-character-limit-exceeded', { placeholders: { over: String(Math.abs(remaining)) } })\n\t\t\t: translate('kol-character-limit-remaining', { placeholders: { remaining: String(remaining) } });\n\t}\n\treturn translate('kol-character-counter-current-of-max', { placeholders: { current: String(currentLength), max: String(maxLength) } });\n};\n\nexport const getCounterAriaText = (maxLengthBehavior: MaxLengthBehaviorPropType, maxLength: number | undefined, currentLength: number): string => {\n\tif (typeof maxLength !== 'number') {\n\t\treturn translate('kol-character-counter-current', { placeholders: { current: String(currentLength) } });\n\t}\n\tif (maxLengthBehavior === 'soft') {\n\t\tconst remaining = maxLength - currentLength;\n\t\treturn remaining < 0\n\t\t\t? translate('kol-character-limit-exceeded', { placeholders: { over: String(Math.abs(remaining)) } })\n\t\t\t: translate('kol-character-limit-remaining', { placeholders: { remaining: String(remaining) } });\n\t}\n\treturn translate('kol-character-counter-current-of-max-aria', { placeholders: { current: String(currentLength), max: String(maxLength) } });\n};\n\nexport const getCounterMaxText = (maxLengthBehavior: MaxLengthBehaviorPropType, maxLength: number | undefined, currentLength: number): string => {\n\tif (maxLengthBehavior === 'hard' && typeof maxLength === 'number' && currentLength >= maxLength) {\n\t\treturn translate('kol-character-counter-max-aria');\n\t}\n\treturn '';\n};\n","import type { MaxLengthBehaviorPropType } from '../../../schema';\nimport { createRelatedUniqueId } from '../../../utils/dev.utils';\nimport { hasCounterProp, maxLengthBehaviorProp, maxLengthProp } from '../../props';\nimport { BaseBehavior } from '../base-behavior';\nimport type { FormFieldFCProps } from '../form-field/component';\nimport type { BehaviorInterface, ResolvedInputProps, StateAccess } from '../generic-types';\nimport type { CounterApi } from './api';\nimport { counterPropsConfig } from './api';\nimport { getCounterAriaText, getCounterMaxText, getCounterVisualText } from './texts';\n\n/** A printable single character without Ctrl, Meta or Alt, i.e. a key press that inserts a character. */\nconst isCharacterInputKey = (event: KeyboardEvent): boolean => event.key.length === 1 && !event.ctrlKey && !event.metaKey && !event.altKey;\n\n/** Invisible no-break space that makes an identical live region text differ, so it is announced again. */\nconst REANNOUNCE_MARKER = ' ';\n\nconst ARIA_DEBOUNCE_MS = 1000;\n\ntype CounterLimit = {\n\tmaxLength?: number;\n\tmaxLengthBehavior: MaxLengthBehaviorPropType;\n};\n\n/**\n * Character counter and character limit of a text field.\n *\n * It owns `hasCounter`, `maxLength` and `maxLengthBehavior` and writes the texts of the two counter\n * spans of `FormFieldFC` directly into the DOM, without a re-render: the visible span immediately,\n * the `aria-live` span debounced, so a screen reader does not announce every key stroke.\n */\nexport class CounterBehavior extends BaseBehavior<CounterApi> implements BehaviorInterface<CounterApi> {\n\tprivate visualSpan?: HTMLSpanElement;\n\tprivate ariaSpan?: HTMLSpanElement;\n\tprivate debounceTimer?: ReturnType<typeof setTimeout>;\n\tprivate reannounceToggle = false;\n\n\tpublic constructor(stateAccess: StateAccess<CounterApi>) {\n\t\tsuper(stateAccess, counterPropsConfig);\n\t}\n\n\tpublic componentWillLoad(props: ResolvedInputProps<CounterApi>): void {\n\t\tthis.watchHasCounter(props.hasCounter);\n\t\tthis.watchMaxLength(props.maxLength);\n\t\tthis.watchMaxLengthBehavior(props.maxLengthBehavior);\n\t}\n\n\tpublic watchHasCounter(value?: boolean): void {\n\t\thasCounterProp.apply(value, (v) => this.setRenderProp('hasCounter', v));\n\t}\n\n\tpublic watchMaxLength(value?: number): void {\n\t\tmaxLengthProp.apply(value, (v) => this.setRenderProp('maxLength', v));\n\t}\n\n\tpublic watchMaxLengthBehavior(value?: MaxLengthBehaviorPropType): void {\n\t\tmaxLengthBehaviorProp.apply(value, (v) => this.setRenderProp('maxLengthBehavior', v));\n\t}\n\n\tpublic readonly setVisualRef = (el?: HTMLSpanElement): void => {\n\t\tthis.visualSpan = el;\n\t};\n\n\tpublic readonly setAriaRef = (el?: HTMLSpanElement): void => {\n\t\tthis.ariaSpan = el;\n\t};\n\n\tpublic hasCounter(): boolean {\n\t\treturn this.getRenderProp('hasCounter') === true;\n\t}\n\n\t/** A maximum with the behavior `'soft'`: the counter announces the exceeded limit instead of `maxlength` preventing it. */\n\tpublic hasSoftLimit(): boolean {\n\t\tconst { maxLength, maxLengthBehavior } = this.getLimit();\n\t\treturn typeof maxLength === 'number' && maxLengthBehavior === 'soft';\n\t}\n\n\t/** The native `maxlength` attribute: only a hard limit prevents longer input. */\n\tpublic getMaxLengthAttribute(): number | undefined {\n\t\tconst { maxLength, maxLengthBehavior } = this.getLimit();\n\t\treturn maxLengthBehavior === 'hard' ? maxLength : undefined;\n\t}\n\n\t/** The `counter` prop of `FormFieldFC`; the counter is only rendered with `hasCounter`. */\n\tpublic getCounterProps(): FormFieldFCProps['counter'] {\n\t\tif (!this.hasCounter()) {\n\t\t\treturn undefined;\n\t\t}\n\t\tconst { maxLength, maxLengthBehavior } = this.getLimit();\n\t\treturn { maxLength, maxLengthBehavior, visualRef: this.setVisualRef, ariaRef: this.setAriaRef };\n\t}\n\n\t/**\n\t * The ID of the hidden character limit hint, which the control references in `aria-describedby`.\n\t * The hint only exists for a maximum without counter, because the counter announces the maximum itself.\n\t */\n\tpublic getCharacterLimitHintId(id: string): string | undefined {\n\t\treturn typeof this.getRenderProp('maxLength') === 'number' && !this.hasCounter() ? createRelatedUniqueId(id, 'character-limit-hint') : undefined;\n\t}\n\n\t/** Updates the visible span immediately and the `aria-live` span debounced. */\n\tpublic update(currentLength: number): void {\n\t\tconst limit = this.getLimit();\n\t\tthis.updateVisual(currentLength, limit);\n\t\tclearTimeout(this.debounceTimer);\n\t\tthis.debounceTimer = setTimeout(() => this.updateAria(currentLength, limit), ARIA_DEBOUNCE_MS);\n\t}\n\n\t/** Updates both spans without debounce, e.g. after the first render or a programmatic change of the limit. */\n\tpublic updateImmediate(currentLength: number): void {\n\t\tconst limit = this.getLimit();\n\t\tthis.updateVisual(currentLength, limit);\n\t\tclearTimeout(this.debounceTimer);\n\t\tthis.updateAria(currentLength, limit);\n\t}\n\n\t/**\n\t * Announces the reached hard limit again on every further typing attempt. `maxlength` blocks the\n\t * input without an `input` event, so the live region would otherwise stay silent.\n\t */\n\tpublic readonly handleKeyDown = (event: KeyboardEvent, currentLength: number): void => {\n\t\tconst { maxLength, maxLengthBehavior } = this.getLimit();\n\t\tif (maxLengthBehavior !== 'hard' || typeof maxLength !== 'number' || currentLength < maxLength) return;\n\t\tif (!isCharacterInputKey(event)) return;\n\t\tthis.retriggerAria(currentLength);\n\t};\n\n\t/** Announces the `aria-live` span again, debounced, even if its text did not change. */\n\tpublic retriggerAria(currentLength: number): void {\n\t\tif (!this.ariaSpan) return;\n\t\tconst limit = this.getLimit();\n\t\tclearTimeout(this.debounceTimer);\n\t\tthis.debounceTimer = setTimeout(() => this.updateAria(currentLength, limit, true), ARIA_DEBOUNCE_MS);\n\t}\n\n\tpublic destroy(): void {\n\t\tclearTimeout(this.debounceTimer);\n\t}\n\n\tprivate getLimit(): CounterLimit {\n\t\treturn { maxLength: this.getRenderProp('maxLength'), maxLengthBehavior: this.getRenderProp('maxLengthBehavior') };\n\t}\n\n\tprivate updateVisual(currentLength: number, { maxLength, maxLengthBehavior }: CounterLimit): void {\n\t\tif (!this.visualSpan) return;\n\t\tthis.visualSpan.innerText = getCounterVisualText(maxLengthBehavior, maxLength, currentLength);\n\t\tthis.visualSpan.classList.toggle(\n\t\t\t'kol-form-field__counter--exceeded',\n\t\t\tmaxLengthBehavior === 'soft' && typeof maxLength === 'number' && currentLength > maxLength,\n\t\t);\n\t}\n\n\tprivate updateAria(currentLength: number, { maxLength, maxLengthBehavior }: CounterLimit, forceReannounce = false): void {\n\t\tif (!this.ariaSpan) return;\n\t\tlet text = [getCounterAriaText(maxLengthBehavior, maxLength, currentLength), getCounterMaxText(maxLengthBehavior, maxLength, currentLength)]\n\t\t\t.filter(Boolean)\n\t\t\t.join(' ');\n\n\t\tif (forceReannounce) {\n\t\t\t// `aria-live` only announces a changed text. A repeated attempt produces the same text, so a\n\t\t\t// no-break space is appended on every other call to make it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AAA,IAAI,CAAC,QAAQ,CAAC,SAAS,GAAG,IAAI;;AAE/B;;;;"}
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{p as o}from"./common-BqpMtheU.js";import{c as r}from"./base-web-component-3R1Dy3QK.js";import{c as n}from"./contrast-BKAJJL2K.js";const t=/^#((\d|[a-f]){8}|(\d|[a-f]){6}|(\d|[a-f]){3,4})$/i;function f(o){return t.test(o)}function c(r){if(typeof r==="string"&&f(r)){const o=n(r);return{backgroundColor:o.background,foregroundColor:o.foreground}}const t=typeof r==="string"?o(r):r;if(typeof t==="object"&&t){const o=t;if(typeof o.backgroundColor==="string"&&typeof o.foregroundColor==="string"&&f(o.backgroundColor)&&f(o.foregroundColor)){const r=n({background:o.backgroundColor,foreground:o.foregroundColor});return{backgroundColor:r.background,foregroundColor:r.foreground}}}throw new Error(`Invalid color ${r}`)}function e(o){return f(o.foregroundColor)&&f(o.backgroundColor)}const s=r("color",{backgroundColor:"#d3d3d3",foregroundColor:"#3f3f3f"},c,e);export{s as c};
5
- //# sourceMappingURL=color-Du3Ft0XV.js.map
4
+ import{p as o}from"./common-BqpMtheU.js";import{c as r}from"./base-web-component-3R1Dy3QK.js";import{c as n}from"./contrast-DMN9saXP.js";const t=/^#((\d|[a-f]){8}|(\d|[a-f]){6}|(\d|[a-f]){3,4})$/i;function f(o){return t.test(o)}function c(r){if(typeof r==="string"&&f(r)){const o=n(r);return{backgroundColor:o.background,foregroundColor:o.foreground}}const t=typeof r==="string"?o(r):r;if(typeof t==="object"&&t){const o=t;if(typeof o.backgroundColor==="string"&&typeof o.foregroundColor==="string"&&f(o.backgroundColor)&&f(o.foregroundColor)){const r=n({background:o.backgroundColor,foreground:o.foregroundColor});return{backgroundColor:r.background,foregroundColor:r.foreground}}}throw new Error(`Invalid color ${r}`)}function e(o){return f(o.foregroundColor)&&f(o.backgroundColor)}const s=r("color",{backgroundColor:"#d3d3d3",foregroundColor:"#3f3f3f"},c,e);export{s as c};
5
+ //# sourceMappingURL=color-QYuhlVFz.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"color-Du3Ft0XV.js","sources":["src/internal/props/color.ts"],"sourcesContent":["import type { ColorPair } from '../../schema';\nimport { createContrastColorPair, parseJson } from '../../schema';\nimport { createPropDefinition, type Prop } from './helpers/factory';\n\n/**\n * Color prop for foreground/background color pairs\n *\n * Description:\n * Defines a color pair consisting of a foreground (text) and background color. Both colors\n * must be provided as valid hex values. The component automatically calculates contrast-safe\n * color pairs to ensure readability.\n *\n * Usage (according to WCAG 2.1):\n * - Single hex value: color=\"#003366\" (background; foreground is auto-calculated for contrast)\n * - Color pair object: color={ backgroundColor: \"#003366\", foregroundColor: \"#ffffff\" }\n * - All color combinations must meet WCAG contrast requirements:\n * - Normal text: minimum contrast ratio 4.5:1 (WCAG 1.4.3 Contrast Minimum, Level AA)\n * - Large text (≥18pt or ≥14pt bold): minimum contrast ratio 3:1\n * - Enhanced: minimum contrast ratio 7:1 for normal text (WCAG 1.4.6 Contrast Enhanced, Level AAA)\n * - Non-text elements (icons, borders) require a minimum contrast ratio of 3:1 (WCAG 1.4.11 Non-text Contrast)\n * - Color must not be the only means of conveying information (WCAG 1.4.1 Use of Color)\n *\n * @see https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html\n * @see https://www.w3.org/WAI/WCAG21/Understanding/contrast-enhanced.html\n * @see https://www.w3.org/WAI/WCAG21/Understanding/non-text-contrast.html\n * @see https://www.w3.org/WAI/WCAG21/Understanding/use-of-color.html\n */\nconst HEX_REGEX = /^#((\\d|[a-f]){8}|(\\d|[a-f]){6}|(\\d|[a-f]){3,4})$/i;\nfunction isHexString(value: string): boolean {\n\treturn HEX_REGEX.test(value);\n}\n\nfunction normalizer(value: unknown): ColorPair {\n\tif (typeof value === 'string' && isHexString(value)) {\n\t\tconst colors = createContrastColorPair(value);\n\t\treturn {\n\t\t\tbackgroundColor: colors.background,\n\t\t\tforegroundColor: colors.foreground,\n\t\t};\n\t}\n\t// The prop is declared `Stringified<PropColor>`, so a color pair also arrives as a JSON string\n\t// whenever it is set through an HTML attribute rather than a JS property.\n\tconst candidate = typeof value === 'string' ? parseJson<ColorPair>(value) : value;\n\tif (typeof candidate === 'object' && candidate) {\n\t\tconst colorPair = candidate as ColorPair;\n\t\tif (\n\t\t\ttypeof colorPair.backgroundColor === 'string' &&\n\t\t\ttypeof colorPair.foregroundColor === 'string' &&\n\t\t\tisHexString(colorPair.backgroundColor) &&\n\t\t\tisHexString(colorPair.foregroundColor)\n\t\t) {\n\t\t\tconst colors = createContrastColorPair({\n\t\t\t\tbackground: colorPair.backgroundColor,\n\t\t\t\tforeground: colorPair.foregroundColor,\n\t\t\t});\n\t\t\treturn {\n\t\t\t\tbackgroundColor: colors.background,\n\t\t\t\tforegroundColor: colors.foreground,\n\t\t\t};\n\t\t}\n\t}\n\tthrow new Error(`Invalid color ${value as string}`);\n}\n\nfunction validator(value: ColorPair) {\n\treturn isHexString(value.foregroundColor) && isHexString(value.backgroundColor);\n}\n\nexport type ColorProp = Prop<'color', ColorPair | string, ColorPair>;\nexport const colorProp = createPropDefinition<ColorProp>(\n\t'color',\n\t{\n\t\tbackgroundColor: '#d3d3d3',\n\t\tforegroundColor: '#3f3f3f',\n\t},\n\tnormalizer,\n\tvalidator,\n);\n"],"names":[],"mappings":";;;;;;;AA2BA,MAAM,SAAS,GAAG,mDAAmD;AACrE,SAAS,WAAW,CAAC,KAAa,EAAA;AACjC,IAAA,OAAO,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC;AAC7B;AAEA,SAAS,UAAU,CAAC,KAAc,EAAA;IACjC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,WAAW,CAAC,KAAK,CAAC,EAAE;AACpD,QAAA,MAAM,MAAM,GAAG,uBAAuB,CAAC,KAAK,CAAC;QAC7C,OAAO;YACN,eAAe,EAAE,MAAM,CAAC,UAAU;YAClC,eAAe,EAAE,MAAM,CAAC,UAAU;SAClC;;AAIF,IAAA,MAAM,SAAS,GAAG,OAAO,KAAK,KAAK,QAAQ,GAAG,SAAS,CAAY,KAAK,CAAC,GAAG,KAAK;AACjF,IAAA,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,SAAS,EAAE;QAC/C,MAAM,SAAS,GAAG,SAAsB;AACxC,QAAA,IACC,OAAO,SAAS,CAAC,eAAe,KAAK,QAAQ;AAC7C,YAAA,OAAO,SAAS,CAAC,eAAe,KAAK,QAAQ;AAC7C,YAAA,WAAW,CAAC,SAAS,CAAC,eAAe,CAAC;AACtC,YAAA,WAAW,CAAC,SAAS,CAAC,eAAe,CAAC,EACrC;YACD,MAAM,MAAM,GAAG,uBAAuB,CAAC;gBACtC,UAAU,EAAE,SAAS,CAAC,eAAe;gBACrC,UAAU,EAAE,SAAS,CAAC,eAAe;AACrC,aAAA,CAAC;YACF,OAAO;gBACN,eAAe,EAAE,MAAM,CAAC,UAAU;gBAClC,eAAe,EAAE,MAAM,CAAC,UAAU;aAClC;;;AAGH,IAAA,MAAM,IAAI,KAAK,CAAC,iBAAiB,KAAe,CAAA,CAAE,CAAC;AACpD;AAEA,SAAS,SAAS,CAAC,KAAgB,EAAA;AAClC,IAAA,OAAO,WAAW,CAAC,KAAK,CAAC,eAAe,CAAC,IAAI,WAAW,CAAC,KAAK,CAAC,eAAe,CAAC;AAChF;AAGa,MAAA,SAAS,GAAG,oBAAoB,CAC5C,OAAO,EACP;AACC,IAAA,eAAe,EAAE,SAAS;AAC1B,IAAA,eAAe,EAAE,SAAS;AAC1B,CAAA,EACD,UAAU,EACV,SAAS;;;;"}
1
+ {"version":3,"file":"color-QYuhlVFz.js","sources":["src/internal/props/color.ts"],"sourcesContent":["import type { ColorPair } from '../../schema';\nimport { createContrastColorPair, parseJson } from '../../schema';\nimport { createPropDefinition, type Prop } from './helpers/factory';\n\n/**\n * Color prop for foreground/background color pairs\n *\n * Description:\n * Defines a color pair consisting of a foreground (text) and background color. Both colors\n * must be provided as valid hex values. The component automatically calculates contrast-safe\n * color pairs to ensure readability.\n *\n * Usage (according to WCAG 2.1):\n * - Single hex value: color=\"#003366\" (background; foreground is auto-calculated for contrast)\n * - Color pair object: color={ backgroundColor: \"#003366\", foregroundColor: \"#ffffff\" }\n * - All color combinations must meet WCAG contrast requirements:\n * - Normal text: minimum contrast ratio 4.5:1 (WCAG 1.4.3 Contrast Minimum, Level AA)\n * - Large text (≥18pt or ≥14pt bold): minimum contrast ratio 3:1\n * - Enhanced: minimum contrast ratio 7:1 for normal text (WCAG 1.4.6 Contrast Enhanced, Level AAA)\n * - Non-text elements (icons, borders) require a minimum contrast ratio of 3:1 (WCAG 1.4.11 Non-text Contrast)\n * - Color must not be the only means of conveying information (WCAG 1.4.1 Use of Color)\n *\n * @see https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html\n * @see https://www.w3.org/WAI/WCAG21/Understanding/contrast-enhanced.html\n * @see https://www.w3.org/WAI/WCAG21/Understanding/non-text-contrast.html\n * @see https://www.w3.org/WAI/WCAG21/Understanding/use-of-color.html\n */\nconst HEX_REGEX = /^#((\\d|[a-f]){8}|(\\d|[a-f]){6}|(\\d|[a-f]){3,4})$/i;\nfunction isHexString(value: string): boolean {\n\treturn HEX_REGEX.test(value);\n}\n\nfunction normalizer(value: unknown): ColorPair {\n\tif (typeof value === 'string' && isHexString(value)) {\n\t\tconst colors = createContrastColorPair(value);\n\t\treturn {\n\t\t\tbackgroundColor: colors.background,\n\t\t\tforegroundColor: colors.foreground,\n\t\t};\n\t}\n\t// The prop is declared `Stringified<PropColor>`, so a color pair also arrives as a JSON string\n\t// whenever it is set through an HTML attribute rather than a JS property.\n\tconst candidate = typeof value === 'string' ? parseJson<ColorPair>(value) : value;\n\tif (typeof candidate === 'object' && candidate) {\n\t\tconst colorPair = candidate as ColorPair;\n\t\tif (\n\t\t\ttypeof colorPair.backgroundColor === 'string' &&\n\t\t\ttypeof colorPair.foregroundColor === 'string' &&\n\t\t\tisHexString(colorPair.backgroundColor) &&\n\t\t\tisHexString(colorPair.foregroundColor)\n\t\t) {\n\t\t\tconst colors = createContrastColorPair({\n\t\t\t\tbackground: colorPair.backgroundColor,\n\t\t\t\tforeground: colorPair.foregroundColor,\n\t\t\t});\n\t\t\treturn {\n\t\t\t\tbackgroundColor: colors.background,\n\t\t\t\tforegroundColor: colors.foreground,\n\t\t\t};\n\t\t}\n\t}\n\tthrow new Error(`Invalid color ${value as string}`);\n}\n\nfunction validator(value: ColorPair) {\n\treturn isHexString(value.foregroundColor) && isHexString(value.backgroundColor);\n}\n\nexport type ColorProp = Prop<'color', ColorPair | string, ColorPair>;\nexport const colorProp = createPropDefinition<ColorProp>(\n\t'color',\n\t{\n\t\tbackgroundColor: '#d3d3d3',\n\t\tforegroundColor: '#3f3f3f',\n\t},\n\tnormalizer,\n\tvalidator,\n);\n"],"names":[],"mappings":";;;;;;;AA2BA,MAAM,SAAS,GAAG,mDAAmD;AACrE,SAAS,WAAW,CAAC,KAAa,EAAA;AACjC,IAAA,OAAO,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC;AAC7B;AAEA,SAAS,UAAU,CAAC,KAAc,EAAA;IACjC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,WAAW,CAAC,KAAK,CAAC,EAAE;AACpD,QAAA,MAAM,MAAM,GAAG,uBAAuB,CAAC,KAAK,CAAC;QAC7C,OAAO;YACN,eAAe,EAAE,MAAM,CAAC,UAAU;YAClC,eAAe,EAAE,MAAM,CAAC,UAAU;SAClC;;AAIF,IAAA,MAAM,SAAS,GAAG,OAAO,KAAK,KAAK,QAAQ,GAAG,SAAS,CAAY,KAAK,CAAC,GAAG,KAAK;AACjF,IAAA,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,SAAS,EAAE;QAC/C,MAAM,SAAS,GAAG,SAAsB;AACxC,QAAA,IACC,OAAO,SAAS,CAAC,eAAe,KAAK,QAAQ;AAC7C,YAAA,OAAO,SAAS,CAAC,eAAe,KAAK,QAAQ;AAC7C,YAAA,WAAW,CAAC,SAAS,CAAC,eAAe,CAAC;AACtC,YAAA,WAAW,CAAC,SAAS,CAAC,eAAe,CAAC,EACrC;YACD,MAAM,MAAM,GAAG,uBAAuB,CAAC;gBACtC,UAAU,EAAE,SAAS,CAAC,eAAe;gBACrC,UAAU,EAAE,SAAS,CAAC,eAAe;AACrC,aAAA,CAAC;YACF,OAAO;gBACN,eAAe,EAAE,MAAM,CAAC,UAAU;gBAClC,eAAe,EAAE,MAAM,CAAC,UAAU;aAClC;;;AAGH,IAAA,MAAM,IAAI,KAAK,CAAC,iBAAiB,KAAe,CAAA,CAAE,CAAC;AACpD;AAEA,SAAS,SAAS,CAAC,KAAgB,EAAA;AAClC,IAAA,OAAO,WAAW,CAAC,KAAK,CAAC,eAAe,CAAC,IAAI,WAAW,CAAC,KAAK,CAAC,eAAe,CAAC;AAChF;AAGa,MAAA,SAAS,GAAG,oBAAoB,CAC5C,OAAO,EACP;AACC,IAAA,eAAe,EAAE,SAAS;AAC1B,IAAA,eAAe,EAAE,SAAS;AAC1B,CAAA,EACD,UAAU,EACV,SAAS;;;;"}
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import"./common-BqpMtheU.js";import{h as s}from"./index-DsCeQ9Ys.js";const i=(s,i)=>{let o="";if(Array.isArray(s)){s.forEach((s=>{o+="kol-"+i+"--"+s+" "}))}return o};const o=({description:i,descriptionId:o})=>i?s("span",{class:"visually-hidden",id:o},i):null;export{o as A,i as c};
5
- //# sourceMappingURL=component-C9DexidK.js.map
4
+ import"./common-BqpMtheU.js";import{h as s}from"./index-DQdQBwMc.js";const i=(s,i)=>{let o="";if(Array.isArray(s)){s.forEach((s=>{o+="kol-"+i+"--"+s+" "}))}return o};const o=({description:i,descriptionId:o})=>i?s("span",{class:"visually-hidden",id:o},i):null;export{o as A,i as c};
5
+ //# sourceMappingURL=component-BF8FPuIW.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"component-C9DexidK.js","sources":["src/schema/props/variant-class-name.ts","src/internal/functional-components/aria-description-span/component.tsx"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\n\nimport type { WatchOptions } from '../utils';\nimport { watchValidator } from '../utils';\nimport { isString } from '../validators';\n\nexport type VariantClassNamePropType = string | string[];\n\nexport type PropVariantClassName = {\n\tvariant: VariantClassNamePropType;\n};\n\nconst SAFE_CLASS_NAME_RE = /^[a-zA-Z][a-zA-Z0-9_-]{3,60}$/;\nconst isValidArrayOrString = (value: unknown) =>\n\t(Array.isArray(value) && value.every(isSafeClassName)) || (isString(value, 1) && (value as string).split(' ').every(isSafeClassName));\nconst isSafeClassName = (value: unknown) => typeof value === 'string' && SAFE_CLASS_NAME_RE.test(value);\nconst SAFE_CLASS_NAME_ALLOWED = new Set([SAFE_CLASS_NAME_RE.source]);\n\nconst beforePatchString = (component: Generic.Element.Component): void => {\n\tif (component.nextState?.has('_variant')) {\n\t\tconst variants = component.nextState?.get('_variant');\n\t\tlet nextStateVariants: VariantClassNamePropType = [];\n\t\tif (isString(variants, 1)) {\n\t\t\tnextStateVariants = (variants as string).split(' ');\n\t\t} else if (Array.isArray(variants)) {\n\t\t\tnextStateVariants = variants;\n\t\t}\n\t\tcomponent.nextState?.set('_variant', nextStateVariants);\n\t}\n};\n\nexport const validateVariantClassName = (component: Generic.Element.Component, value?: VariantClassNamePropType, options: WatchOptions = {}): void => {\n\twatchValidator(component, '_variant', isValidArrayOrString, SAFE_CLASS_NAME_ALLOWED, value, {\n\t\t...options,\n\t\tdefaultValue: [],\n\t\thooks: {\n\t\t\tafterPatch: options.hooks?.afterPatch,\n\t\t\tbeforePatch: (nextValue, nextState, component, key) => {\n\t\t\t\tif (typeof options.hooks?.beforePatch === 'function') {\n\t\t\t\t\toptions.hooks?.beforePatch(nextValue, nextState, component, key);\n\t\t\t\t}\n\t\t\t\tbeforePatchString(component);\n\t\t\t},\n\t\t},\n\t});\n};\n\nexport const classNameFromVariant = (variants: VariantClassNamePropType | undefined, componentName: string): string => {\n\tlet className = '';\n\n\tif (Array.isArray(variants)) {\n\t\tvariants.forEach((variant) => {\n\t\t\tclassName += 'kol-' + componentName + '--' + variant + ' ';\n\t\t});\n\t}\n\treturn className;\n};\n","import type { FunctionalComponent as FC } from '@stencil/core';\nimport { h } from '@stencil/core';\n\ntype AriaDescriptionSpanFCProps = {\n\t/**\n\t * The (already trimmed) description text. Falsy renders nothing — the description is\n\t * optional, and an empty `aria-describedby` target would be pointless.\n\t */\n\tdescription: string | undefined;\n\t/**\n\t * The id referenced by the interactive element's `aria-describedby`.\n\t */\n\tdescriptionId: string;\n};\n\n/**\n * Visually-hidden `aria-describedby` target, shared by `ButtonFC` and `LinkFC`.\n *\n * Must be a sibling of the interactive element, not a child of it — the description is\n * referenced from outside via `aria-describedby`, not folded into the accessible name.\n */\nexport const AriaDescriptionSpanFC: FC<AriaDescriptionSpanFCProps> = ({ description, descriptionId }) =>\n\tdescription ? (\n\t\t<span class=\"visually-hidden\" id={descriptionId}>\n\t\t\t{description}\n\t\t</span>\n\t) : null;\n"],"names":[],"mappings":";;;;;;MA+Ca,oBAAoB,GAAG,CAAC,QAA8C,EAAE,aAAqB,KAAY;IACrH,IAAI,SAAS,GAAG,EAAE;AAElB,IAAA,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;AAC5B,QAAA,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,KAAI;YAC5B,SAAS,IAAI,MAAM,GAAG,aAAa,GAAG,IAAI,GAAG,OAAO,GAAG,GAAG;AAC3D,SAAC,CAAC;;AAEH,IAAA,OAAO,SAAS;AACjB;;ACnCa,MAAA,qBAAqB,GAAmC,CAAC,EAAE,WAAW,EAAE,aAAa,EAAE,KACnG,WAAW,IACV,CAAA,CAAA,MAAA,EAAA,EAAM,KAAK,EAAC,iBAAiB,EAAC,EAAE,EAAE,aAAa,EAC7C,EAAA,WAAW,CACN,IACJ;;;;"}
1
+ {"version":3,"file":"component-BF8FPuIW.js","sources":["src/schema/props/variant-class-name.ts","src/internal/functional-components/aria-description-span/component.tsx"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\n\nimport type { WatchOptions } from '../utils';\nimport { watchValidator } from '../utils';\nimport { isString } from '../validators';\n\nexport type VariantClassNamePropType = string | string[];\n\nexport type PropVariantClassName = {\n\tvariant: VariantClassNamePropType;\n};\n\nconst SAFE_CLASS_NAME_RE = /^[a-zA-Z][a-zA-Z0-9_-]{3,60}$/;\nconst isValidArrayOrString = (value: unknown) =>\n\t(Array.isArray(value) && value.every(isSafeClassName)) || (isString(value, 1) && (value as string).split(' ').every(isSafeClassName));\nconst isSafeClassName = (value: unknown) => typeof value === 'string' && SAFE_CLASS_NAME_RE.test(value);\nconst SAFE_CLASS_NAME_ALLOWED = new Set([SAFE_CLASS_NAME_RE.source]);\n\nconst beforePatchString = (component: Generic.Element.Component): void => {\n\tif (component.nextState?.has('_variant')) {\n\t\tconst variants = component.nextState?.get('_variant');\n\t\tlet nextStateVariants: VariantClassNamePropType = [];\n\t\tif (isString(variants, 1)) {\n\t\t\tnextStateVariants = (variants as string).split(' ');\n\t\t} else if (Array.isArray(variants)) {\n\t\t\tnextStateVariants = variants;\n\t\t}\n\t\tcomponent.nextState?.set('_variant', nextStateVariants);\n\t}\n};\n\nexport const validateVariantClassName = (component: Generic.Element.Component, value?: VariantClassNamePropType, options: WatchOptions = {}): void => {\n\twatchValidator(component, '_variant', isValidArrayOrString, SAFE_CLASS_NAME_ALLOWED, value, {\n\t\t...options,\n\t\tdefaultValue: [],\n\t\thooks: {\n\t\t\tafterPatch: options.hooks?.afterPatch,\n\t\t\tbeforePatch: (nextValue, nextState, component, key) => {\n\t\t\t\tif (typeof options.hooks?.beforePatch === 'function') {\n\t\t\t\t\toptions.hooks?.beforePatch(nextValue, nextState, component, key);\n\t\t\t\t}\n\t\t\t\tbeforePatchString(component);\n\t\t\t},\n\t\t},\n\t});\n};\n\nexport const classNameFromVariant = (variants: VariantClassNamePropType | undefined, componentName: string): string => {\n\tlet className = '';\n\n\tif (Array.isArray(variants)) {\n\t\tvariants.forEach((variant) => {\n\t\t\tclassName += 'kol-' + componentName + '--' + variant + ' ';\n\t\t});\n\t}\n\treturn className;\n};\n","import type { FunctionalComponent as FC } from '@stencil/core';\nimport { h } from '@stencil/core';\n\ntype AriaDescriptionSpanFCProps = {\n\t/**\n\t * The (already trimmed) description text. Falsy renders nothing — the description is\n\t * optional, and an empty `aria-describedby` target would be pointless.\n\t */\n\tdescription: string | undefined;\n\t/**\n\t * The id referenced by the interactive element's `aria-describedby`.\n\t */\n\tdescriptionId: string;\n};\n\n/**\n * Visually-hidden `aria-describedby` target, shared by `ButtonFC` and `LinkFC`.\n *\n * Must be a sibling of the interactive element, not a child of it — the description is\n * referenced from outside via `aria-describedby`, not folded into the accessible name.\n */\nexport const AriaDescriptionSpanFC: FC<AriaDescriptionSpanFCProps> = ({ description, descriptionId }) =>\n\tdescription ? (\n\t\t<span class=\"visually-hidden\" id={descriptionId}>\n\t\t\t{description}\n\t\t</span>\n\t) : null;\n"],"names":[],"mappings":";;;;;;MA+Ca,oBAAoB,GAAG,CAAC,QAA8C,EAAE,aAAqB,KAAY;IACrH,IAAI,SAAS,GAAG,EAAE;AAElB,IAAA,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;AAC5B,QAAA,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,KAAI;YAC5B,SAAS,IAAI,MAAM,GAAG,aAAa,GAAG,IAAI,GAAG,OAAO,GAAG,GAAG;AAC3D,SAAC,CAAC;;AAEH,IAAA,OAAO,SAAS;AACjB;;ACnCa,MAAA,qBAAqB,GAAmC,CAAC,EAAE,WAAW,EAAE,aAAa,EAAE,KACnG,WAAW,IACV,CAAA,CAAA,MAAA,EAAA,EAAM,KAAK,EAAC,iBAAiB,EAAC,EAAE,EAAE,aAAa,EAC7C,EAAA,WAAW,CACN,IACJ;;;;"}
@@ -0,0 +1,5 @@
1
+ /*!
2
+ * KoliBri - The accessible HTML-Standard
3
+ */
4
+ import{t as e}from"./i18n-BaCf-SDK.js";import{r as o}from"./resolve-props-YWmoYL6c.js";import{h as l}from"./index-DQdQBwMc.js";import{K as s}from"./Heading-NHB1reiQ.js";import{b as t}from"./bem-registry-CX5kvaqt.js";import{c as r}from"./clsx-COFh-Vc8.js";import{B as a}from"./component-CBpYh2q-.js";function n(l){return o({_hideLabel:true,_icons:{left:{icon:"kolicon-cross"}},_label:e("kol-close"),_tooltipAlign:"left"},l)}const c=t.forBlock("kol-card");const i=c("close-button");const d=c("content");const f=c("header");const h=c("link");const p=()=>{};const m=({headingId:e,label:o,level:t})=>l(s,{class:f,id:e,level:t},o);const u=(e,o)=>{const{ariaDescriptionId:s,class:t,closeButtonProps:n,handleBlur:f,handleClose:u,handleFocus:b,hasCloser:B,headingId:C,href:g,label:v,level:j,refCloseButton:k,refCta:I,refTooltip:D,target:F}=e;return l("article",{"aria-labelledby":C,class:r(c(),t)},g.length>0?l("a",{class:h,href:g,target:F||undefined,onBlur:f,onFocus:b,ref:I},l(m,{headingId:C,label:v,level:j})):l(m,{headingId:C,label:v,level:j}),l("div",{class:d},o),B&&l("div",{class:r(i,"kol-close-button")},l(a,Object.assign({},n,{ariaDescriptionId:s,handleBlur:p,handleClick:u,handleFocus:p,handleMouseDown:p,refButton:k,refTooltip:D}))))};export{u as C,n as r};
5
+ //# sourceMappingURL=component-Ba4gjLBG.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"component-Da5dJMKj.js","sources":["src/internal/functional-components/card/close-button.ts","src/internal/functional-components/card/component.tsx"],"sourcesContent":["import { translate } from '../../../i18n';\nimport type { ResolvedButtonProps } from '../button/resolve-props';\nimport { resolveButtonProps } from '../button/resolve-props';\n\n/**\n * Normalizes the card's close button into the render props `ButtonFC` expects.\n *\n * The configuration is fixed — an icon-only button whose label lives in its tooltip — so every\n * component rendering `CardFC` resolves it the same way. It is a function rather than a constant\n * because `translate` must run after the i18n bundle is in place.\n *\n * Props only: the tooltip behavior, the click handler and the button ref belong to the composing\n * web component.\n *\n * @param host - The host element, used for the per-theme `buttonVariantDefault` feature flag.\n */\nexport function resolveCardCloseButtonProps(host?: HTMLElement): ResolvedButtonProps {\n\treturn resolveButtonProps(\n\t\t{\n\t\t\t_hideLabel: true,\n\t\t\t_icons: { left: { icon: 'kolicon-cross' } },\n\t\t\t_label: translate('kol-close'),\n\t\t\t_tooltipAlign: 'left',\n\t\t},\n\t\thost,\n\t);\n}\n","import type { FunctionalComponent as FC } from '@stencil/core';\nimport { h } from '@stencil/core';\n\nimport KolHeadingFc from '../../../functional-components/Heading/Heading';\nimport { bem } from '../../../schema/bem-registry';\nimport clsx from '../../../utils/clsx';\nimport { ButtonFC } from '../button/component';\nimport type { ResolvedButtonProps } from '../button/resolve-props';\nimport type { FunctionalComponentProps } from '../generic-types';\nimport type { CardApi } from './api';\n\nconst cardBem = bem.forBlock('kol-card');\nconst BEM_CLASS_CARD__CLOSE_BUTTON = cardBem('close-button');\nconst BEM_CLASS_CARD__CONTENT = cardBem('content');\nconst BEM_CLASS_CARD__HEADER = cardBem('header');\nconst BEM_CLASS_CARD__LINK = cardBem('link');\n\n/**\n * The close button reports only its click. `ButtonFC` requires a handler per callback, and the\n * card's `_on` callbacks describe its heading link, not this button.\n */\nconst NOOP = (): void => {};\n\n/** The heading renders either on its own or wrapped in the link, so it lives in its own FC. */\nconst CardHeadingFC: FC<Pick<FunctionalComponentProps<CardApi>, 'headingId' | 'label' | 'level'>> = ({ headingId, label, level }) => (\n\t<KolHeadingFc class={BEM_CLASS_CARD__HEADER} id={headingId} level={level}>\n\t\t{label}\n\t</KolHeadingFc>\n);\n\nexport type CardFCProps = FunctionalComponentProps<CardApi> & {\n\t/** The close button's normalized `ButtonFC` render props, resolved once by the web component. */\n\tcloseButtonProps: ResolvedButtonProps;\n};\n\n/**\n * Root from `bem.forBlock('kol-card')`, not `BemRootNodeFC`: the card's root is the semantic\n * `<article>` that carries `aria-labelledby`, and `BemRootNodeFC` always renders a `<div>`.\n *\n * The content area renders `children`, not a `<slot />` of its own: Stencil derives its light-DOM\n * slot relocation from the JSX in the element file, so the `<slot />` has to be written there.\n *\n * `.kol-close-button` is a theme hook shared with the alert, and every theme addresses it as an\n * ancestor of `.kol-button`. It therefore stays on a wrapper around `ButtonFC` rather than merging\n * into the button's own root — drop the wrapper once the hook itself moves onto the button root.\n *\n * A forwarded `class` lands on the root, so a consumer that wants its own hook on the card itself\n * can add one. A hook that themes address as an *ancestor* of `.kol-card` must not go here — it\n * belongs on a wrapper around `CardFC`, the way the drawer keeps `.kol-drawer__wrapper`.\n */\nexport const CardFC: FC<CardFCProps> = (props, children) => {\n\tconst {\n\t\tariaDescriptionId,\n\t\tclass: hostClass,\n\t\tcloseButtonProps,\n\t\thandleBlur,\n\t\thandleClose,\n\t\thandleFocus,\n\t\thasCloser,\n\t\theadingId,\n\t\thref,\n\t\tlabel,\n\t\tlevel,\n\t\trefCloseButton,\n\t\trefCta,\n\t\trefTooltip,\n\t\ttarget,\n\t} = props;\n\n\treturn (\n\t\t<article aria-labelledby={headingId} class={clsx(cardBem(), hostClass)}>\n\t\t\t{href.length > 0 ? (\n\t\t\t\t<a class={BEM_CLASS_CARD__LINK} href={href} target={target || undefined} onBlur={handleBlur} onFocus={handleFocus} ref={refCta}>\n\t\t\t\t\t<CardHeadingFC headingId={headingId} label={label} level={level} />\n\t\t\t\t</a>\n\t\t\t) : (\n\t\t\t\t<CardHeadingFC headingId={headingId} label={label} level={level} />\n\t\t\t)}\n\t\t\t<div class={BEM_CLASS_CARD__CONTENT}>{children}</div>\n\t\t\t{hasCloser && (\n\t\t\t\t<div class={clsx(BEM_CLASS_CARD__CLOSE_BUTTON, 'kol-close-button')}>\n\t\t\t\t\t<ButtonFC\n\t\t\t\t\t\t{...closeButtonProps}\n\t\t\t\t\t\tariaDescriptionId={ariaDescriptionId}\n\t\t\t\t\t\thandleBlur={NOOP}\n\t\t\t\t\t\thandleClick={handleClose}\n\t\t\t\t\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AAM,EACN,UAAU,EACV,MAAM,GACN,GAAG,KAAK;AAET,IAAA,QACC,CAAA,CAAA,SAAA,EAAA,EAAA,iBAAA,EAA0B,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,CAAC,EAAA,EACpE,IAAI,CAAC,MAAM,GAAG,CAAC,IACf,CAAA,CAAA,GAAA,EAAA,EAAG,KAAK,EAAE,oBAAoB,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,EAAA,EAC7H,CAAA,CAAC,aAAa,EAAA,EAAC,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAA,CAAI,CAChE,KAEJ,CAAC,CAAA,aAAa,EAAC,EAAA,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,GAAI,CACnE,EACD,CAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAE,uBAAuB,EAAA,EAAG,QAAQ,CAAO,EACpD,SAAS,KACT,CAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAE,IAAI,CAAC,4BAA4B,EAAE,kBAAkB,CAAC,EAAA,EACjE,CAAA,CAAC,QAAQ,EACJ,MAAA,CAAA,MAAA,CAAA,EAAA,EAAA,gBAAgB,EACpB,EAAA,iBAAiB,EAAE,iBAAiB,EACpC,UAAU,EAAE,IAAI,EAChB,WAAW,EAAE,WAAW,EACxB,WAAW,EAAE,IAAI,EACjB,eAAe,EAAE,IAAI,EACrB,SAAS,EAAE,cAAc,EACzB,UAAU,EAAE,UAAU,EACrB,CAAA,CAAA,CACG,CACN,CACQ;AAEZ;;;;"}
1
+ {"version":3,"file":"component-Ba4gjLBG.js","sources":["src/internal/functional-components/card/close-button.ts","src/internal/functional-components/card/component.tsx"],"sourcesContent":["import { translate } from '../../../i18n';\nimport type { ResolvedButtonProps } from '../button/resolve-props';\nimport { resolveButtonProps } from '../button/resolve-props';\n\n/**\n * Normalizes the card's close button into the render props `ButtonFC` expects.\n *\n * The configuration is fixed — an icon-only button whose label lives in its tooltip — so every\n * component rendering `CardFC` resolves it the same way. It is a function rather than a constant\n * because `translate` must run after the i18n bundle is in place.\n *\n * Props only: the tooltip behavior, the click handler and the button ref belong to the composing\n * web component.\n *\n * @param host - The host element, used for the per-theme `buttonVariantDefault` feature flag.\n */\nexport function resolveCardCloseButtonProps(host?: HTMLElement): ResolvedButtonProps {\n\treturn resolveButtonProps(\n\t\t{\n\t\t\t_hideLabel: true,\n\t\t\t_icons: { left: { icon: 'kolicon-cross' } },\n\t\t\t_label: translate('kol-close'),\n\t\t\t_tooltipAlign: 'left',\n\t\t},\n\t\thost,\n\t);\n}\n","import type { FunctionalComponent as FC } from '@stencil/core';\nimport { h } from '@stencil/core';\n\nimport KolHeadingFc from '../../../functional-components/Heading/Heading';\nimport { bem } from '../../../schema/bem-registry';\nimport clsx from '../../../utils/clsx';\nimport { ButtonFC } from '../button/component';\nimport type { ResolvedButtonProps } from '../button/resolve-props';\nimport type { FunctionalComponentProps } from '../generic-types';\nimport type { CardApi } from './api';\n\nconst cardBem = bem.forBlock('kol-card');\nconst BEM_CLASS_CARD__CLOSE_BUTTON = cardBem('close-button');\nconst BEM_CLASS_CARD__CONTENT = cardBem('content');\nconst BEM_CLASS_CARD__HEADER = cardBem('header');\nconst BEM_CLASS_CARD__LINK = cardBem('link');\n\n/**\n * The close button reports only its click. `ButtonFC` requires a handler per callback, and the\n * card's `_on` callbacks describe its heading link, not this button.\n */\nconst NOOP = (): void => {};\n\n/** The heading renders either on its own or wrapped in the link, so it lives in its own FC. */\nconst CardHeadingFC: FC<Pick<FunctionalComponentProps<CardApi>, 'headingId' | 'label' | 'level'>> = ({ headingId, label, level }) => (\n\t<KolHeadingFc class={BEM_CLASS_CARD__HEADER} id={headingId} level={level}>\n\t\t{label}\n\t</KolHeadingFc>\n);\n\nexport type CardFCProps = FunctionalComponentProps<CardApi> & {\n\t/** The close button's normalized `ButtonFC` render props, resolved once by the web component. */\n\tcloseButtonProps: ResolvedButtonProps;\n};\n\n/**\n * Root from `bem.forBlock('kol-card')`, not `BemRootNodeFC`: the card's root is the semantic\n * `<article>` that carries `aria-labelledby`, and `BemRootNodeFC` always renders a `<div>`.\n *\n * The content area renders `children`, not a `<slot />` of its own: Stencil derives its light-DOM\n * slot relocation from the JSX in the element file, so the `<slot />` has to be written there.\n *\n * `.kol-close-button` is a theme hook shared with the alert, and every theme addresses it as an\n * ancestor of `.kol-button`. It therefore stays on a wrapper around `ButtonFC` rather than merging\n * into the button's own root — drop the wrapper once the hook itself moves onto the button root.\n *\n * A forwarded `class` lands on the root, so a consumer that wants its own hook on the card itself\n * can add one. A hook that themes address as an *ancestor* of `.kol-card` must not go here — it\n * belongs on a wrapper around `CardFC`, the way the drawer keeps `.kol-drawer__wrapper`.\n */\nexport const CardFC: FC<CardFCProps> = (props, children) => {\n\tconst {\n\t\tariaDescriptionId,\n\t\tclass: hostClass,\n\t\tcloseButtonProps,\n\t\thandleBlur,\n\t\thandleClose,\n\t\thandleFocus,\n\t\thasCloser,\n\t\theadingId,\n\t\thref,\n\t\tlabel,\n\t\tlevel,\n\t\trefCloseButton,\n\t\trefCta,\n\t\trefTooltip,\n\t\ttarget,\n\t} = props;\n\n\treturn (\n\t\t<article aria-labelledby={headingId} class={clsx(cardBem(), hostClass)}>\n\t\t\t{href.length > 0 ? (\n\t\t\t\t<a class={BEM_CLASS_CARD__LINK} href={href} target={target || undefined} onBlur={handleBlur} onFocus={handleFocus} ref={refCta}>\n\t\t\t\t\t<CardHeadingFC headingId={headingId} label={label} level={level} />\n\t\t\t\t</a>\n\t\t\t) : (\n\t\t\t\t<CardHeadingFC headingId={headingId} label={label} level={level} />\n\t\t\t)}\n\t\t\t<div class={BEM_CLASS_CARD__CONTENT}>{children}</div>\n\t\t\t{hasCloser && (\n\t\t\t\t<div class={clsx(BEM_CLASS_CARD__CLOSE_BUTTON, 'kol-close-button')}>\n\t\t\t\t\t<ButtonFC\n\t\t\t\t\t\t{...closeButtonProps}\n\t\t\t\t\t\tariaDescriptionId={ariaDescriptionId}\n\t\t\t\t\t\thandleBlur={NOOP}\n\t\t\t\t\t\thandleClick={handleClose}\n\t\t\t\t\t\thandleFocus={NOOP}\n\t\t\t\t\t\thandleMouseDown={NOOP}\n\t\t\t\t\t\trefButton={refCloseButton}\n\t\t\t\t\t\trefTooltip={refTooltip}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</article>\n\t);\n};\n"],"names":[],"mappings":";;;;;;;;;;;AAgBM,SAAU,2BAA2B,CAAC,IAAkB,EAAA;AAC7D,IAAA,OAAO,kBAAkB,CACxB;AACC,QAAA,UAAU,EAAE,IAAI;QAChB,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,EAAE;AAC3C,QAAA,MAAM,EAAE,SAAS,CAAC,WAAW,CAAC;AAC9B,QAAA,aAAa,EAAE,MAAM;KACrB,EACD,IAAI,CACJ;AACF;;ACfA,MAAM,OAAO,GAAG,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC;AACxC,MAAM,4BAA4B,GAAG,OAAO,CAAC,cAAc,CAAC;AAC5D,MAAM,uBAAuB,GAAG,OAAO,CAAC,SAAS,CAAC;AAClD,MAAM,sBAAsB,GAAG,OAAO,CAAC,QAAQ,CAAC;AAChD,MAAM,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC;AAM5C,MAAM,IAAI,GAAG,MAAW,GAAG;AAG3B,MAAM,aAAa,GAAiF,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,MAC/H,CAAC,CAAA,YAAY,EAAC,EAAA,KAAK,EAAE,sBAAsB,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAA,EACtE,KAAK,CACQ,C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EAAE,IAAI,EACjB,eAAe,EAAE,IAAI,EACrB,SAAS,EAAE,cAAc,EACzB,UAAU,EAAE,UAAU,EACrB,CAAA,CAAA,CACG,CACN,CACQ;AAEZ;;;;"}
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{a as s}from"./tslib.es6-QNbPBOk5.js";import{h as o}from"./index-DsCeQ9Ys.js";import{b as i}from"./bem-registry-CX5kvaqt.js";import{c as e}from"./clsx-COFh-Vc8.js";const n=i.forBlock("kol-icon");const r=n();const a=n("icon");const t=i=>{var{class:n,icons:t,label:c}=i,l=s(i,["class","icons","label"]);const m=(c===null||c===void 0?void 0:c.length)>0;return o("i",Object.assign({},l,{"aria-hidden":m?undefined:"true","aria-label":m?c:undefined,class:e(r,a,t,n),role:m?"img":"presentation"}))};export{t as I};
5
- //# sourceMappingURL=component-BjH8s4-t.js.map
4
+ import{a as s}from"./tslib.es6-QNbPBOk5.js";import{h as o}from"./index-DQdQBwMc.js";import{b as i}from"./bem-registry-CX5kvaqt.js";import{c as e}from"./clsx-COFh-Vc8.js";const n=i.forBlock("kol-icon");const r=n();const a=n("icon");const t=i=>{var{class:n,icons:t,label:c}=i,l=s(i,["class","icons","label"]);const d=(c===null||c===void 0?void 0:c.length)>0;return o("i",Object.assign({},l,{"aria-hidden":d?undefined:"true","aria-label":d?c:undefined,class:e(r,a,t,n),role:d?"img":"presentation"}))};export{t as I};
5
+ //# sourceMappingURL=component-BpOMe842.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"component-BjH8s4-t.js","sources":["src/internal/functional-components/icon/component.tsx"],"sourcesContent":["import type { FunctionalComponent as FC } from '@stencil/core';\nimport { h } from '@stencil/core';\n\nimport { bem } from '../../../schema/bem-registry';\nimport clsx from '../../../utils/clsx';\nimport type { FunctionalComponentProps } from '../generic-types';\nimport type { IconApi } from './api';\n\nconst iconBem = bem.forBlock('kol-icon');\nconst BEM_CLASS_ICON = iconBem();\nconst BEM_CLASS_ICON__ICON = iconBem('icon');\n\nexport const IconFC: FC<FunctionalComponentProps<IconApi>> = ({ class: classNames, icons, label, ...htmlAttributes }) => {\n\t// label is always a normalized string ('' when unset — see labelProp definition)\n\tconst hasAriaLabel = label?.length > 0;\n\treturn (\n\t\t<i\n\t\t\t{...htmlAttributes}\n\t\t\t/**\n\t\t\t * Die Auszeichnung `aria-hidden` ist eigentlich nicht erforderlich, da die aktuellen\n\t\t\t * Screenreader, wie NVDA und JAWS, es auch ohne `aria-hidden` nicht vorlesen.\n\t\t\t *\n\t\t\t * Referenz: https://www.w3.org/TR/wai-aria/states_and_properties#aria-hidden\n\t\t\t */\n\t\t\taria-hidden={hasAriaLabel ? undefined : 'true'}\n\t\t\taria-label={hasAriaLabel ? label : undefined}\n\t\t\tclass={clsx(BEM_CLASS_ICON, BEM_CLASS_ICON__ICON, icons, classNames)}\n\t\t\trole={hasAriaLabel ? 'img' : 'presentation'}\n\t\t/>\n\t);\n};\n"],"names":[],"mappings":";;;;;;;;AAQA,MAAM,OAAO,GAAG,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC;AACxC,MAAM,cAAc,GAAG,OAAO,EAAE;AAChC,MAAM,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC;AAE/B,MAAA,MAAM,GAA0C,CAAC,EAAsD,KAAI;IAA1D,IAAA,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAA,GAAA,EAAqB,EAAhB,cAAc,GAApD,MAAA,CAAA,EAAA,EAAA,CAAA,OAAA,EAAA,OAAA,EAAA,OAAA,CAAsD,CAAF;IAEjH,MAAM,YAAY,GAAG,CAAA,KAAK,KAAL,IAAA,IAAA,KAAK,KAAL,MAAA,GAAA,MAAA,GAAA,KAAK,CAAE,MAAM,IAAG,CAAC;AACtC,IAAA,QACC,yBACK,cAAc,EAAA,EAAA,aAAA,EAOL,YAAY,GAAG,SAAS,GAAG,MAAM,EAAA,YAAA,EAClC,YAAY,GAAG,KAAK,GAAG,SAAS,EAC5C,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,oBAAoB,EAAE,KAAK,EAAE,UAAU,CAAC,EACpE,IAAI,EAAE,YAAY,GAAG,KAAK,GAAG,cAAc,EAC1C,CAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"component-BpOMe842.js","sources":["src/internal/functional-components/icon/component.tsx"],"sourcesContent":["import type { FunctionalComponent as FC } from '@stencil/core';\nimport { h } from '@stencil/core';\n\nimport { bem } from '../../../schema/bem-registry';\nimport clsx from '../../../utils/clsx';\nimport type { FunctionalComponentProps } from '../generic-types';\nimport type { IconApi } from './api';\n\nconst iconBem = bem.forBlock('kol-icon');\nconst BEM_CLASS_ICON = iconBem();\nconst BEM_CLASS_ICON__ICON = iconBem('icon');\n\nexport const IconFC: FC<FunctionalComponentProps<IconApi>> = ({ class: classNames, icons, label, ...htmlAttributes }) => {\n\t// label is always a normalized string ('' when unset — see labelProp definition)\n\tconst hasAriaLabel = label?.length > 0;\n\treturn (\n\t\t<i\n\t\t\t{...htmlAttributes}\n\t\t\t/**\n\t\t\t * Die Auszeichnung `aria-hidden` ist eigentlich nicht erforderlich, da die aktuellen\n\t\t\t * Screenreader, wie NVDA und JAWS, es auch ohne `aria-hidden` nicht vorlesen.\n\t\t\t *\n\t\t\t * Referenz: https://www.w3.org/TR/wai-aria/states_and_properties#aria-hidden\n\t\t\t */\n\t\t\taria-hidden={hasAriaLabel ? undefined : 'true'}\n\t\t\taria-label={hasAriaLabel ? label : undefined}\n\t\t\tclass={clsx(BEM_CLASS_ICON, BEM_CLASS_ICON__ICON, icons, classNames)}\n\t\t\trole={hasAriaLabel ? 'img' : 'presentation'}\n\t\t/>\n\t);\n};\n"],"names":[],"mappings":";;;;;;;;AAQA,MAAM,OAAO,GAAG,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC;AACxC,MAAM,cAAc,GAAG,OAAO,EAAE;AAChC,MAAM,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC;AAE/B,MAAA,MAAM,GAA0C,CAAC,EAAsD,KAAI;IAA1D,IAAA,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAA,GAAA,EAAqB,EAAhB,cAAc,GAApD,MAAA,CAAA,EAAA,EAAA,CAAA,OAAA,EAAA,OAAA,EAAA,OAAA,CAAsD,CAAF;IAEjH,MAAM,YAAY,GAAG,CAAA,KAAK,KAAL,IAAA,IAAA,KAAK,KAAL,MAAA,GAAA,MAAA,GAAA,KAAK,CAAE,MAAM,IAAG,CAAC;AACtC,IAAA,QACC,yBACK,cAAc,EAAA,EAAA,aAAA,EAOL,YAAY,GAAG,SAAS,GAAG,MAAM,EAAA,YAAA,EAClC,YAAY,GAAG,KAAK,GAAG,SAAS,EAC5C,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,oBAAoB,EAAE,KAAK,EAAE,UAAU,CAAC,EACpE,IAAI,EAAE,YAAY,GAAG,KAAK,GAAG,cAAc,EAC1C,CAAA,CAAA;AAEJ;;;;"}
@@ -0,0 +1,5 @@
1
+ /*!
2
+ * KoliBri - The accessible HTML-Standard
3
+ */
4
+ import{a as s}from"./tslib.es6-QNbPBOk5.js";import{h as o}from"./index-DQdQBwMc.js";import{c}from"./clsx-COFh-Vc8.js";import{g as r}from"./block-bem-DxQXsOt3.js";const t=(t,m)=>{var{block:i,modifiers:e,class:a,component:n="div"}=t,l=s(t,["block","modifiers","class","component"]);const b=r(i);const p=n;return o(p,Object.assign({class:c(b(e),a)},l),m)};export{t as B};
5
+ //# sourceMappingURL=component-C3sXiwbS.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"component-BxKN0JbT.js","sources":["src/internal/functional-components/bem-root-node/component.tsx"],"sourcesContent":["import type { FunctionalComponent as FC } from '@stencil/core';\nimport { h } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\n\nimport type { KoliBriComponentsBemSchema } from '../../../schema/bem-registry';\nimport clsx from '../../../utils/clsx';\nimport type { BlockModifiers } from './block-bem';\nimport { getBlockBem } from './block-bem';\n\ntype FCChildren = Parameters<FC>[1];\n\ntype BemRootNodeFCProps<TBlock extends keyof KoliBriComponentsBemSchema> = {\n\t/**\n\t * BEM block name — must be a key registered in `KoliBriComponentsBemSchema`.\n\t * Constrains `modifiers` to the exact modifier set defined in `bem-registry.ts`.\n\t */\n\tblock: TBlock;\n\t/**\n\t * BEM block modifiers. Keys are validated against the schema (e.g. `'disabled'`, `'inline'`).\n\t * No `kol-link--` prefix needed — typed-bem adds it automatically.\n\t */\n\tmodifiers?: BlockModifiers<TBlock>;\n\t/**\n\t * Additional classes forwarded 1:1 from the FC tag onto the root node.\n\t * Typically the `class` prop received by the surrounding Functional Component\n\t * (i.e. the `class` attribute set by a parent component).\n\t */\n\tclass?: JSXBase.HTMLAttributes<HTMLElement>['class'];\n\t/**\n\t * Element of the root node, `div` by default. `abbr` is the abbreviation itself, `fieldset` groups\n\t * the options of a radio group, `label` wraps the native control of a checkbox or radio, `svg` is\n\t * the root of a graphic.\n\t */\n\tcomponent?: 'abbr' | 'div' | 'fieldset' | 'label' | 'svg';\n\t/** Native `disabled` attribute; only a `fieldset` root supports it. */\n\tdisabled?: boolean;\n} & Partial<Omit<JSXBase.HTMLAttributes<HTMLDivElement>, 'class'>> &\n\tPartial<Omit<JSXBase.SVGAttributes<SVGSVGElement>, 'class' | keyof JSXBase.HTMLAttributes<HTMLDivElement>>>;\n\n/**\n * Single-Root BEM wrapper for all Skeleton Functional Components.\n *\n * Responsibilities:\n * - Renders exactly one root node — a `<div>` unless `component` names another element —\n * enforcing the Single-Root FC rule.\n * - Accepts a `block` name and typed `modifiers` from `KoliBriComponentsBemSchema`.\n * - Calls `bem.forBlock(block)(modifiers)` internally to generate the class string.\n * - Merges the result with the optional `class` prop.\n * - Forwards all remaining HTML attributes (`id`, `role`, `aria-*`, `ref`, …) onto the root\n * node — legacy functional components spread these onto their root, and internal\n * consumers (form, form-field-msg, toast-item) rely on that passthrough.\n *\n * Usage:\n * ```tsx\n * export const LinkFC: FC<LinkFCProps> = ({ ..., class: hostClass, disabled }, children) => (\n * <BemRootNodeFC\n * block=\"kol-link\"\n * modifiers={{ disabled, 'external-link': isExternal }}\n * class={hostClass}\n * >\n * <a class={linkBem('interactive-element')}>…</a>\n * </BemRootNodeFC>\n * );\n * ```\n */\nexport const BemRootNodeFC = <TBlock extends keyof KoliBriComponentsBemSchema>(\n\t{ block, modifiers, class: hostClass, component: Component = 'div', ...rest }: BemRootNodeFCProps<TBlock>,\n\tchildren: FCChildren,\n) => {\n\tconst blockBem = getBlockBem(block);\n\t// The attributes are typed for a `div` plus the SVG attributes; `abbr`, `fieldset` and `label` accept the same global attributes, `fieldset` additionally `disabled`.\n\tconst Root = Component as 'div';\n\treturn (\n\t\t<Root class={clsx(blockBem(modifiers), hostClass)} {...rest}>\n\t\t\t{children}\n\t\t</Root>\n\t);\n};\n"],"names":[],"mappings":";;;;;;;;MAiEa,aAAa,GAAG,CAC5B,EAAyG,EACzG,QAAoB,KACjB;AAFH,IAAA,IAAA,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,GAAG,KAAK,EAAA,GAAA,EAAuC,EAAlC,IAAI,GAAA,MAAA,CAAA,EAAA,EAA3E,4CAA6E,CAAF;AAG3E,IAAA,MAAM,QAAQ,GAAG,WAAW,CAAC,KAAK,CAAC;IAEnC,MAAM,IAAI,GAAG,SAAkB;AAC/B,IAAA,QACC,EAAC,IAAI,EAAA,MAAA,CAAA,MAAA,CAAA,EAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,EAAA,EAAM,IAAI,CACzD,EAAA,QAAQ,CACH;AAET;;;;"}
1
+ {"version":3,"file":"component-C3sXiwbS.js","sources":["src/internal/functional-components/bem-root-node/component.tsx"],"sourcesContent":["import type { FunctionalComponent as FC } from '@stencil/core';\nimport { h } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\n\nimport type { KoliBriComponentsBemSchema } from '../../../schema/bem-registry';\nimport clsx from '../../../utils/clsx';\nimport type { BlockModifiers } from './block-bem';\nimport { getBlockBem } from './block-bem';\n\ntype FCChildren = Parameters<FC>[1];\n\ntype BemRootNodeFCProps<TBlock extends keyof KoliBriComponentsBemSchema> = {\n\t/**\n\t * BEM block name — must be a key registered in `KoliBriComponentsBemSchema`.\n\t * Constrains `modifiers` to the exact modifier set defined in `bem-registry.ts`.\n\t */\n\tblock: TBlock;\n\t/**\n\t * BEM block modifiers. Keys are validated against the schema (e.g. `'disabled'`, `'inline'`).\n\t * No `kol-link--` prefix needed — typed-bem adds it automatically.\n\t */\n\tmodifiers?: BlockModifiers<TBlock>;\n\t/**\n\t * Additional classes forwarded 1:1 from the FC tag onto the root node.\n\t * Typically the `class` prop received by the surrounding Functional Component\n\t * (i.e. the `class` attribute set by a parent component).\n\t */\n\tclass?: JSXBase.HTMLAttributes<HTMLElement>['class'];\n\t/**\n\t * Element of the root node, `div` by default. `abbr` is the abbreviation itself, `fieldset` groups\n\t * the options of a radio group, `label` wraps the native control of a checkbox or radio, `svg` is\n\t * the root of a graphic.\n\t */\n\tcomponent?: 'abbr' | 'div' | 'fieldset' | 'label' | 'svg';\n\t/** Native `disabled` attribute; only a `fieldset` root supports it. */\n\tdisabled?: boolean;\n} & Partial<Omit<JSXBase.HTMLAttributes<HTMLDivElement>, 'class'>> &\n\tPartial<Omit<JSXBase.SVGAttributes<SVGSVGElement>, 'class' | keyof JSXBase.HTMLAttributes<HTMLDivElement>>>;\n\n/**\n * Single-Root BEM wrapper for all Skeleton Functional Components.\n *\n * Responsibilities:\n * - Renders exactly one root node — a `<div>` unless `component` names another element —\n * enforcing the Single-Root FC rule.\n * - Accepts a `block` name and typed `modifiers` from `KoliBriComponentsBemSchema`.\n * - Calls `bem.forBlock(block)(modifiers)` internally to generate the class string.\n * - Merges the result with the optional `class` prop.\n * - Forwards all remaining HTML attributes (`id`, `role`, `aria-*`, `ref`, …) onto the root\n * node — legacy functional components spread these onto their root, and internal\n * consumers (form, form-field-msg, toast-item) rely on that passthrough.\n *\n * Usage:\n * ```tsx\n * export const LinkFC: FC<LinkFCProps> = ({ ..., class: hostClass, disabled }, children) => (\n * <BemRootNodeFC\n * block=\"kol-link\"\n * modifiers={{ disabled, 'external-link': isExternal }}\n * class={hostClass}\n * >\n * <a class={linkBem('interactive-element')}>…</a>\n * </BemRootNodeFC>\n * );\n * ```\n */\nexport const BemRootNodeFC = <TBlock extends keyof KoliBriComponentsBemSchema>(\n\t{ block, modifiers, class: hostClass, component: Component = 'div', ...rest }: BemRootNodeFCProps<TBlock>,\n\tchildren: FCChildren,\n) => {\n\tconst blockBem = getBlockBem(block);\n\t// The attributes are typed for a `div` plus the SVG attributes; `abbr`, `fieldset` and `label` accept the same global attributes, `fieldset` additionally `disabled`.\n\tconst Root = Component as 'div';\n\treturn (\n\t\t<Root class={clsx(blockBem(modifiers), hostClass)} {...rest}>\n\t\t\t{children}\n\t\t</Root>\n\t);\n};\n"],"names":[],"mappings":";;;;;;;;MAiEa,aAAa,GAAG,CAC5B,EAAyG,EACzG,QAAoB,KACjB;AAFH,IAAA,IAAA,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,GAAG,KAAK,EAAA,GAAA,EAAuC,EAAlC,IAAI,GAAA,MAAA,CAAA,EAAA,EAA3E,4CAA6E,CAAF;AAG3E,IAAA,MAAM,QAAQ,GAAG,WAAW,CAAC,KAAK,CAAC;IAEnC,MAAM,IAAI,GAAG,SAAkB;AAC/B,IAAA,QACC,EAAC,IAAI,EAAA,MAAA,CAAA,MAAA,CAAA,EAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,EAAA,EAAM,IAAI,CACzD,EAAA,QAAQ,CACH;AAET;;;;"}
@@ -0,0 +1,5 @@
1
+ /*!
2
+ * KoliBri - The accessible HTML-Standard
3
+ */
4
+ import{c as i}from"./align-DeB15XnU.js";import{a as o,B as e,b as t,c as s}from"./behavior-D1kOlK6p.js";import"./common-BqpMtheU.js";import"./base-web-component-3R1Dy3QK.js";import{h as r}from"./index-DQdQBwMc.js";import{B as a}from"./component-C3sXiwbS.js";import{B as n}from"./component-CBpYh2q-.js";import{a as l}from"./tslib.es6-QNbPBOk5.js";import{c as p}from"./clsx-COFh-Vc8.js";const h=i("popoverAlign","bottom");const c={optional:[o]};class d extends e{constructor(i){super(i,c);this.show=false;this.setPopoverElementRef=i=>{this.popoverElement=i;this.arrowElement=i===null||i===void 0?void 0:i.querySelector(".kol-popover__arrow")};this.setTriggerElement=i=>{this.triggerElement=i};this.alignPopover=async()=>{if(!this.popoverElement||!this.triggerElement){return}await t({align:this.getRenderProp("align"),referenceElement:this.triggerElement,arrowElement:this.arrowElement,floatingElement:this.popoverElement})};this.setupAutoUpdate=()=>{if(!this.popoverElement||!this.triggerElement||this.cleanupAutoUpdate){return}this.cleanupAutoUpdate=s(this.triggerElement,this.popoverElement,(()=>{void this.alignPopover()}))}}componentWillLoad(i){this.watchAlign(i.align)}watchAlign(i){o.apply(i,(i=>{this.setRenderProp("align",i)}))}setShow(i){this.show=i;if(!this.popoverElement){return}if(this.popoverElement.isConnected){this.toggleVisibility()}else{requestAnimationFrame((()=>{this.toggleVisibility()}))}}destroy(){var i;(i=this.cleanupAutoUpdate)===null||i===void 0?void 0:i.call(this);this.cleanupAutoUpdate=undefined;this.popoverElement=undefined;this.arrowElement=undefined;this.triggerElement=undefined}toggleVisibility(){var i;if(!this.popoverElement){return}const o=this.popoverElement.matches(":popover-open");if(this.show){if(!o){try{this.popoverElement.showPopover();this.setupAutoUpdate();void this.alignPopover()}catch(i){}}}else if(o){try{this.popoverElement.hidePopover();(i=this.cleanupAutoUpdate)===null||i===void 0?void 0:i.call(this);this.cleanupAutoUpdate=undefined}catch(i){}}}}const f=(i,o)=>{const{align:e="bottom",popoverRef:t,arrowRef:s,class:a}=i,n=l(i,["align","popoverRef","arrowRef","class"]);return r("div",Object.assign({},n,{class:p("kol-popover",a),ref:t,popover:"auto"}),r("div",{class:p("kol-popover__arrow",`kol-popover__arrow--${e}`),ref:s}),o.length>0?o:r("slot",null))};const u=(i,o)=>{const{accessKey:e,ariaDescription:t,ariaDescriptionId:s,ariaHasPopup:l,ariaSelected:p,customClass:h,disabled:c,handleBlur:d,handleClick:u,handleFocus:m,handleMouseDown:v,hideLabel:b,icons:g,id:w,inline:y,label:B,name:k,on:j,popoverAlign:D,popoverOpen:C,popoverId:_,ref:x,refButton:A,refPopover:K,refTooltip:R,role:I,shortKey:O,tabIndex:P,tooltipAlign:E,type:F,variant:M}=i;return r(a,{block:"kol-popover-button",class:i.class,ref:x,modifiers:{open:C,inline:y===true}},r(n,{accessKey:e,ariaControls:_,ariaDescription:t,ariaDescriptionId:s,ariaExpanded:C?"true":"false",ariaHasPopup:l,ariaSelected:p,customClass:h,disabled:c,handleBlur:d,handleClick:u,handleFocus:m,handleMouseDown:v,hideLabel:b,icons:g,id:w,inline:y,label:B,name:k,on:j,refButton:A,refTooltip:R,role:I,shortKey:O,tabIndex:P,tooltipAlign:E,type:F,variant:M}),r(f,{align:D,class:"kol-popover-button__popover",id:_,popoverRef:K},o))};export{u as P,d as a,h as p};
5
+ //# sourceMappingURL=component-C5BFsKau.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"component-Bd7PXqOG.js","sources":["src/internal/props/popover-align.ts","src/internal/functional-components/popover/api.tsx","src/internal/functional-components/popover/behavior.ts","src/internal/functional-components/popover/component.tsx","src/internal/functional-components/popover-button/component.tsx"],"sourcesContent":["import type { AlignPropType } from '../../schema/props/align-options';\nimport { createAlignPropDefinition } from './helpers/align';\nimport type { SimpleProp } from './helpers/factory';\n\n/**\n * Popover align prop.\n *\n * Same valid values as {@link alignProp} ('top' | 'right' | 'bottom' | 'left'); the default is\n * `'bottom'`, the documented default of `_popoverAlign`.\n */\nexport type PopoverAlignProp = SimpleProp<'popoverAlign', AlignPropType>;\n\nexport const popoverAlignProp = createAlignPropDefinition<PopoverAlignProp>('popoverAlign', 'bottom');\n","import { alignProp } from '../../props';\nimport type { ApiFromConfig, PropsConfigShape } from '../generic-types';\n\nexport const popoverPropsConfig = {\n\toptional: [alignProp],\n} as const satisfies PropsConfigShape;\n\nexport type PopoverApi = ApiFromConfig<typeof popoverPropsConfig>;\n","import { autoUpdate } from '@floating-ui/dom';\nimport { alignFloatingElements } from '../../../utils/align-floating-elements';\nimport { alignProp } from '../../props';\nimport { BaseBehavior } from '../base-behavior';\nimport type { BehaviorInterface, ResolvedInputProps, StateAccess } from '../generic-types';\nimport type { PopoverApi } from './api';\nimport { popoverPropsConfig } from './api';\n\n/**\n * Shows and hides a native popover (`popover=\"auto\"`) and keeps it aligned to its trigger element\n * while it is open.\n *\n * The open state is not kept here: the native popover reports it through its `toggle` event, which\n * the composing web component listens to, so a light dismiss (Escape, click outside) is reflected\n * as well.\n */\nexport class PopoverBehavior extends BaseBehavior<PopoverApi> implements BehaviorInterface<PopoverApi> {\n\tprivate show = false;\n\tprivate popoverElement?: HTMLDivElement;\n\tprivate arrowElement?: HTMLDivElement;\n\tprivate triggerElement?: HTMLElement;\n\tprivate cleanupAutoUpdate?: () => void;\n\n\tpublic constructor(stateAccess: StateAccess<PopoverApi>) {\n\t\tsuper(stateAccess, popoverPropsConfig);\n\t}\n\n\tpublic componentWillLoad(props: ResolvedInputProps<PopoverApi>): void {\n\t\tthis.watchAlign(props.align);\n\t}\n\n\tpublic watchAlign(value?: string): void {\n\t\talignProp.apply(value, (v) => {\n\t\t\tthis.setRenderProp('align', v);\n\t\t});\n\t}\n\n\t/**\n\t * Opens or closes the popover. A popover element that is not connected yet is toggled in the next\n\t * animation frame, after the first render has attached it.\n\t */\n\tpublic setShow(value: boolean): void {\n\t\tthis.show = value;\n\t\tif (!this.popoverElement) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.popoverElement.isConnected) {\n\t\t\tthis.toggleVisibility();\n\t\t} else {\n\t\t\trequestAnimationFrame(() => {\n\t\t\t\tthis.toggleVisibility();\n\t\t\t});\n\t\t}\n\t}\n\n\tpublic setPopoverElementRef = (element?: HTMLDivElement): void => {\n\t\tthis.popoverElement = element;\n\t\tthis.arrowElement = element?.querySelector('.kol-popover__arrow') as HTMLDivElement | undefined;\n\t};\n\n\tpublic setTriggerElement = (element?: HTMLElement): void => {\n\t\tthis.triggerElement = element;\n\t};\n\n\tpublic destroy(): void {\n\t\tthis.cleanupAutoUpdate?.();\n\t\tthis.cleanupAutoUpdate = undefined;\n\t\tthis.popoverElement = undefined;\n\t\tthis.arrowElement = undefined;\n\t\tthis.triggerElement = undefined;\n\t}\n\n\tprivate toggleVisibility(): void {\n\t\tif (!this.popoverElement) {\n\t\t\treturn;\n\t\t}\n\t\tconst isOpen = this.popoverElement.matches(':popover-open');\n\t\tif (this.show) {\n\t\t\tif (!isOpen) {\n\t\t\t\ttry {\n\t\t\t\t\tthis.popoverElement.showPopover();\n\t\t\t\t\tthis.setupAutoUpdate();\n\t\t\t\t\tvoid this.alignPopover();\n\t\t\t\t} catch {\n\t\t\t\t\t// Ignore DOMException if already open\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (isOpen) {\n\t\t\ttry {\n\t\t\t\tthis.popoverElement.hidePopover();\n\t\t\t\tthis.cleanupAutoUpdate?.();\n\t\t\t\tthis.cleanupAutoUpdate = undefined;\n\t\t\t} catch {\n\t\t\t\t// Ignore DOMException if already closed\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate alignPopover = async (): Promise<void> => {\n\t\tif (!this.popoverElement || !this.triggerElement) {\n\t\t\treturn;\n\t\t}\n\n\t\tawait alignFloatingElements({\n\t\t\talign: this.getRenderProp('align'),\n\t\t\treferenceElement: this.triggerElement,\n\t\t\tarrowElement: this.arrowElement,\n\t\t\tfloatingElement: this.popoverElement,\n\t\t});\n\t};\n\n\tprivate setupAutoUpdate = (): void => {\n\t\tif (!this.popoverElement || !this.triggerElement || this.cleanupAutoUpdate) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.cleanupAutoUpdate = autoUpdate(this.triggerElement, this.popoverElement, () => {\n\t\t\tvoid this.alignPopover();\n\t\t});\n\t};\n}\n","import type { FunctionalComponent as FC } from '@stencil/core';\nimport { h } from '@stencil/core';\n\nimport type { JSXBase } from '@stencil/core/internal';\nimport clsx from '../../../utils/clsx';\nimport type { FunctionalComponentProps } from '../generic-types';\nimport type { PopoverApi } from './api';\n\nexport type PopoverFCProps = FunctionalComponentProps<PopoverApi> &\n\tJSXBase.HTMLAttributes<HTMLDivElement> & {\n\t\tpopoverRef?: (el?: HTMLDivElement) => void;\n\t\tarrowRef?: (el?: HTMLDivElement) => void;\n\t};\n\n/**\n * The popover content is the given children; without children, the default slot distributes the\n * light DOM of the surrounding web component.\n */\nexport const PopoverFC: FC<PopoverFCProps> = (props, children) => {\n\tconst { align = 'bottom', popoverRef, arrowRef, class: classNames, ...rest } = props;\n\n\treturn (\n\t\t<div {...rest} class={clsx('kol-popover', classNames)} ref={popoverRef} popover=\"auto\">\n\t\t\t<div class={clsx('kol-popover__arrow', `kol-popover__arrow--${align}`)} ref={arrowRef} />\n\t\t\t{children.length > 0 ? children : <slot />}\n\t\t</div>\n\t);\n};\n","import type { FunctionalComponent as FC } from '@stencil/core';\nimport { h } from '@stencil/core';\n\nimport { BemRootNodeFC } from '../bem-root-node/component';\nimport { ButtonFC } from '../button/component';\nimport type { FunctionalComponentProps } from '../generic-types';\nimport { PopoverFC } from '../popover/component';\nimport type { PopoverButtonApi } from './api';\n\nexport type PopoverButtonFCProps = FunctionalComponentProps<PopoverButtonApi> & {\n\t/** Ref of the `.kol-popover-button` root. */\n\tref?: (element?: HTMLElement) => void;\n};\n\n/**\n * Renders the popover toggle button and the popover as siblings inside a single BEM root.\n *\n * The root must stay an **ancestor** of the button: base and theme styles size the embedded\n * button and style the popover via descendant selectors (`.kol-popover-button--inline\n * .kol-button …`), so the classes cannot merge onto the `kol-button` node itself.\n *\n * The children become the popover content. Without children, the popover's default slot\n * distributes the light DOM of the surrounding web component.\n */\nexport const PopoverButtonFC: FC<PopoverButtonFCProps> = (props, children) => {\n\tconst {\n\t\taccessKey,\n\t\tariaDescription,\n\t\tariaDescriptionId,\n\t\tariaHasPopup,\n\t\tariaSelected,\n\t\tcustomClass,\n\t\tdisabled,\n\t\thandleBlur,\n\t\thandleClick,\n\t\thandleFocus,\n\t\thandleMouseDown,\n\t\thideLabel,\n\t\ticons,\n\t\tid,\n\t\tinline,\n\t\tlabel,\n\t\tname,\n\t\ton,\n\t\tpopoverAlign,\n\t\tpopoverOpen,\n\t\tpopoverId,\n\t\tref,\n\t\trefButton,\n\t\trefPopover,\n\t\trefTooltip,\n\t\trole,\n\t\tshortKey,\n\t\ttabIndex,\n\t\ttooltipAlign,\n\t\ttype,\n\t\tvariant,\n\t} = props;\n\n\treturn (\n\t\t<BemRootNodeFC\n\t\t\tblock=\"kol-popover-button\"\n\t\t\tclass={props.class}\n\t\t\tref={ref}\n\t\t\tmodifiers={{\n\t\t\t\topen: popoverOpen,\n\t\t\t\tinline: inline === true,\n\t\t\t}}\n\t\t>\n\t\t\t<ButtonFC\n\t\t\t\taccessKey={accessKey}\n\t\t\t\tariaControls={popoverId}\n\t\t\t\tariaDescription={ariaDescription}\n\t\t\t\tariaDescriptionId={ariaDescriptionId}\n\t\t\t\tariaExpanded={popoverOpen ? 'true' : 'false'}\n\t\t\t\tariaHasPopup={ariaHasPopup}\n\t\t\t\tariaSelected={ariaSelected}\n\t\t\t\tcustomClass={customClass}\n\t\t\t\tdisabled={disabled}\n\t\t\t\thandleBlur={handleBlur}\n\t\t\t\thandleClick={handleClick}\n\t\t\t\thandleFocus={handleFocus}\n\t\t\t\thandleMouseDown={handleMouseDown}\n\t\t\t\thideLabel={hideLabel}\n\t\t\t\ticons={icons}\n\t\t\t\tid={id}\n\t\t\t\tinline={inline}\n\t\t\t\tlabel={label}\n\t\t\t\tname={name}\n\t\t\t\ton={on}\n\t\t\t\trefButton={refButton}\n\t\t\t\trefTooltip={refTooltip}\n\t\t\t\trole={role}\n\t\t\t\tshortKey={shortKey}\n\t\t\t\ttabIndex={tabIndex}\n\t\t\t\ttooltipAlign={tooltipAlign}\n\t\t\t\ttype={type}\n\t\t\t\tvariant={variant}\n\t\t\t/>\n\t\t\t<PopoverFC align={popoverAlign} class=\"kol-popover-button__popover\" id={popoverId} popoverRef={refPopover}>\n\t\t\t\t{children}\n\t\t\t</PopoverFC>\n\t\t</BemRootNodeFC>\n\t);\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;AAYa,MAAA,gBAAgB,GAAG,yBAAyB,CAAmB,cAAc,EAAE,QAAQ;;ACT7F,MAAM,kBAAkB,GAAG;IACjC,QAAQ,EAAE,CAAC,SAAS,CAAC;CACe;;ACW/B,MAAO,eAAgB,SAAQ,YAAwB,CAAA;AAO5D,IAAA,WAAA,CAAmB,WAAoC,EAAA;AACtD,QAAA,KAAK,CAAC,WAAW,EAAE,kBAAkB,CAAC;AAP/B,QAAA,IAAI,CAAA,IAAA,GAAG,KAAK;AAuCb,QAAA,IAAA,CAAA,oBAAoB,GAAG,CAAC,OAAwB,KAAU;AAChE,YAAA,IAAI,CAAC,cAAc,GAAG,OAAO;YAC7B,IAAI,CAAC,YAAY,GAAG,OAAO,KAAP,IAAA,IAAA,OAAO,KAAP,MAAA,GAAA,MAAA,GAAA,OAAO,CAAE,aAAa,CAAC,qBAAqB,CAA+B;AAChG,SAAC;AAEM,QAAA,IAAA,CAAA,iBAAiB,GAAG,CAAC,OAAqB,KAAU;AAC1D,YAAA,IAAI,CAAC,cAAc,GAAG,OAAO;AAC9B,SAAC;AAoCO,QAAA,IAAY,CAAA,YAAA,GAAG,YAA0B;YAChD,IAAI,CAAC,IAAI,CAAC,cAAc,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE;gBACjD;;AAGD,YAAA,MAAM,qBAAqB,CAAC;AAC3B,gBAAA,KAAK,EAAE,IAAI,CAAC,aA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Y,EAC1B,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,WAAW,EACxB,WAAW,EAAE,WAAW,EACxB,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,EACZ,EAAE,EAAE,EAAE,EACN,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,EAAE,EAAE,EAAE,EACN,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,YAAY,EAC1B,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EACf,CAAA,EACF,CAAC,CAAA,SAAS,IAAC,KAAK,EAAE,YAAY,EAAE,KAAK,EAAC,6BAA6B,EAAC,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,IACvG,QAAQ,CACE,CACG;AAElB;;;;"}
1
+ {"version":3,"file":"component-C5BFsKau.js","sources":["src/internal/props/popover-align.ts","src/internal/functional-components/popover/api.tsx","src/internal/functional-components/popover/behavior.ts","src/internal/functional-components/popover/component.tsx","src/internal/functional-components/popover-button/component.tsx"],"sourcesContent":["import type { AlignPropType } from '../../schema/props/align-options';\nimport { createAlignPropDefinition } from './helpers/align';\nimport type { SimpleProp } from './helpers/factory';\n\n/**\n * Popover align prop.\n *\n * Same valid values as {@link alignProp} ('top' | 'right' | 'bottom' | 'left'); the default is\n * `'bottom'`, the documented default of `_popoverAlign`.\n */\nexport type PopoverAlignProp = SimpleProp<'popoverAlign', AlignPropType>;\n\nexport const popoverAlignProp = createAlignPropDefinition<PopoverAlignProp>('popoverAlign', 'bottom');\n","import { alignProp } from '../../props';\nimport type { ApiFromConfig, PropsConfigShape } from '../generic-types';\n\nexport const popoverPropsConfig = {\n\toptional: [alignProp],\n} as const satisfies PropsConfigShape;\n\nexport type PopoverApi = ApiFromConfig<typeof popoverPropsConfig>;\n","import { autoUpdate } from '@floating-ui/dom';\nimport { alignFloatingElements } from '../../../utils/align-floating-elements';\nimport { alignProp } from '../../props';\nimport { BaseBehavior } from '../base-behavior';\nimport type { BehaviorInterface, ResolvedInputProps, StateAccess } from '../generic-types';\nimport type { PopoverApi } from './api';\nimport { popoverPropsConfig } from './api';\n\n/**\n * Shows and hides a native popover (`popover=\"auto\"`) and keeps it aligned to its trigger element\n * while it is open.\n *\n * The open state is not kept here: the native popover reports it through its `toggle` event, which\n * the composing web component listens to, so a light dismiss (Escape, click outside) is reflected\n * as well.\n */\nexport class PopoverBehavior extends BaseBehavior<PopoverApi> implements BehaviorInterface<PopoverApi> {\n\tprivate show = false;\n\tprivate popoverElement?: HTMLDivElement;\n\tprivate arrowElement?: HTMLDivElement;\n\tprivate triggerElement?: HTMLElement;\n\tprivate cleanupAutoUpdate?: () => void;\n\n\tpublic constructor(stateAccess: StateAccess<PopoverApi>) {\n\t\tsuper(stateAccess, popoverPropsConfig);\n\t}\n\n\tpublic componentWillLoad(props: ResolvedInputProps<PopoverApi>): void {\n\t\tthis.watchAlign(props.align);\n\t}\n\n\tpublic watchAlign(value?: string): void {\n\t\talignProp.apply(value, (v) => {\n\t\t\tthis.setRenderProp('align', v);\n\t\t});\n\t}\n\n\t/**\n\t * Opens or closes the popover. A popover element that is not connected yet is toggled in the next\n\t * animation frame, after the first render has attached it.\n\t */\n\tpublic setShow(value: boolean): void {\n\t\tthis.show = value;\n\t\tif (!this.popoverElement) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.popoverElement.isConnected) {\n\t\t\tthis.toggleVisibility();\n\t\t} else {\n\t\t\trequestAnimationFrame(() => {\n\t\t\t\tthis.toggleVisibility();\n\t\t\t});\n\t\t}\n\t}\n\n\tpublic setPopoverElementRef = (element?: HTMLDivElement): void => {\n\t\tthis.popoverElement = element;\n\t\tthis.arrowElement = element?.querySelector('.kol-popover__arrow') as HTMLDivElement | undefined;\n\t};\n\n\tpublic setTriggerElement = (element?: HTMLElement): void => {\n\t\tthis.triggerElement = element;\n\t};\n\n\tpublic destroy(): void {\n\t\tthis.cleanupAutoUpdate?.();\n\t\tthis.cleanupAutoUpdate = undefined;\n\t\tthis.popoverElement = undefined;\n\t\tthis.arrowElement = undefined;\n\t\tthis.triggerElement = undefined;\n\t}\n\n\tprivate toggleVisibility(): void {\n\t\tif (!this.popoverElement) {\n\t\t\treturn;\n\t\t}\n\t\tconst isOpen = this.popoverElement.matches(':popover-open');\n\t\tif (this.show) {\n\t\t\tif (!isOpen) {\n\t\t\t\ttry {\n\t\t\t\t\tthis.popoverElement.showPopover();\n\t\t\t\t\tthis.setupAutoUpdate();\n\t\t\t\t\tvoid this.alignPopover();\n\t\t\t\t} catch {\n\t\t\t\t\t// Ignore DOMException if already open\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (isOpen) {\n\t\t\ttry {\n\t\t\t\tthis.popoverElement.hidePopover();\n\t\t\t\tthis.cleanupAutoUpdate?.();\n\t\t\t\tthis.cleanupAutoUpdate = undefined;\n\t\t\t} catch {\n\t\t\t\t// Ignore DOMException if already closed\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate alignPopover = async (): Promise<void> => {\n\t\tif (!this.popoverElement || !this.triggerElement) {\n\t\t\treturn;\n\t\t}\n\n\t\tawait alignFloatingElements({\n\t\t\talign: this.getRenderProp('align'),\n\t\t\treferenceElement: this.triggerElement,\n\t\t\tarrowElement: this.arrowElement,\n\t\t\tfloatingElement: this.popoverElement,\n\t\t});\n\t};\n\n\tprivate setupAutoUpdate = (): void => {\n\t\tif (!this.popoverElement || !this.triggerElement || this.cleanupAutoUpdate) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.cleanupAutoUpdate = autoUpdate(this.triggerElement, this.popoverElement, () => {\n\t\t\tvoid this.alignPopover();\n\t\t});\n\t};\n}\n","import type { FunctionalComponent as FC } from '@stencil/core';\nimport { h } from '@stencil/core';\n\nimport type { JSXBase } from '@stencil/core/internal';\nimport clsx from '../../../utils/clsx';\nimport type { FunctionalComponentProps } from '../generic-types';\nimport type { PopoverApi } from './api';\n\nexport type PopoverFCProps = FunctionalComponentProps<PopoverApi> &\n\tJSXBase.HTMLAttributes<HTMLDivElement> & {\n\t\tpopoverRef?: (el?: HTMLDivElement) => void;\n\t\tarrowRef?: (el?: HTMLDivElement) => void;\n\t};\n\n/**\n * The popover content is the given children; without children, the default slot distributes the\n * light DOM of the surrounding web component.\n */\nexport const PopoverFC: FC<PopoverFCProps> = (props, children) => {\n\tconst { align = 'bottom', popoverRef, arrowRef, class: classNames, ...rest } = props;\n\n\treturn (\n\t\t<div {...rest} class={clsx('kol-popover', classNames)} ref={popoverRef} popover=\"auto\">\n\t\t\t<div class={clsx('kol-popover__arrow', `kol-popover__arrow--${align}`)} ref={arrowRef} />\n\t\t\t{children.length > 0 ? children : <slot />}\n\t\t</div>\n\t);\n};\n","import type { FunctionalComponent as FC } from '@stencil/core';\nimport { h } from '@stencil/core';\n\nimport { BemRootNodeFC } from '../bem-root-node/component';\nimport { ButtonFC } from '../button/component';\nimport type { FunctionalComponentProps } from '../generic-types';\nimport { PopoverFC } from '../popover/component';\nimport type { PopoverButtonApi } from './api';\n\nexport type PopoverButtonFCProps = FunctionalComponentProps<PopoverButtonApi> & {\n\t/** Ref of the `.kol-popover-button` root. */\n\tref?: (element?: HTMLElement) => void;\n};\n\n/**\n * Renders the popover toggle button and the popover as siblings inside a single BEM root.\n *\n * The root must stay an **ancestor** of the button: base and theme styles size the embedded\n * button and style the popover via descendant selectors (`.kol-popover-button--inline\n * .kol-button …`), so the classes cannot merge onto the `kol-button` node itself.\n *\n * The children become the popover content. Without children, the popover's default slot\n * distributes the light DOM of the surrounding web component.\n */\nexport const PopoverButtonFC: FC<PopoverButtonFCProps> = (props, children) => {\n\tconst {\n\t\taccessKey,\n\t\tariaDescription,\n\t\tariaDescriptionId,\n\t\tariaHasPopup,\n\t\tariaSelected,\n\t\tcustomClass,\n\t\tdisabled,\n\t\thandleBlur,\n\t\thandleClick,\n\t\thandleFocus,\n\t\thandleMouseDown,\n\t\thideLabel,\n\t\ticons,\n\t\tid,\n\t\tinline,\n\t\tlabel,\n\t\tname,\n\t\ton,\n\t\tpopoverAlign,\n\t\tpopoverOpen,\n\t\tpopoverId,\n\t\tref,\n\t\trefButton,\n\t\trefPopover,\n\t\trefTooltip,\n\t\trole,\n\t\tshortKey,\n\t\ttabIndex,\n\t\ttooltipAlign,\n\t\ttype,\n\t\tvariant,\n\t} = props;\n\n\treturn (\n\t\t<BemRootNodeFC\n\t\t\tblock=\"kol-popover-button\"\n\t\t\tclass={props.class}\n\t\t\tref={ref}\n\t\t\tmodifiers={{\n\t\t\t\topen: popoverOpen,\n\t\t\t\tinline: inline === true,\n\t\t\t}}\n\t\t>\n\t\t\t<ButtonFC\n\t\t\t\taccessKey={accessKey}\n\t\t\t\tariaControls={popoverId}\n\t\t\t\tariaDescription={ariaDescription}\n\t\t\t\tariaDescriptionId={ariaDescriptionId}\n\t\t\t\tariaExpanded={popoverOpen ? 'true' : 'false'}\n\t\t\t\tariaHasPopup={ariaHasPopup}\n\t\t\t\tariaSelected={ariaSelected}\n\t\t\t\tcustomClass={customClass}\n\t\t\t\tdisabled={disabled}\n\t\t\t\thandleBlur={handleBlur}\n\t\t\t\thandleClick={handleClick}\n\t\t\t\thandleFocus={handleFocus}\n\t\t\t\thandleMouseDown={handleMouseDown}\n\t\t\t\thideLabel={hideLabel}\n\t\t\t\ticons={icons}\n\t\t\t\tid={id}\n\t\t\t\tinline={inline}\n\t\t\t\tlabel={label}\n\t\t\t\tname={name}\n\t\t\t\ton={on}\n\t\t\t\trefButton={refButton}\n\t\t\t\trefTooltip={refTooltip}\n\t\t\t\trole={role}\n\t\t\t\tshortKey={shortKey}\n\t\t\t\ttabIndex={tabIndex}\n\t\t\t\ttooltipAlign={tooltipAlign}\n\t\t\t\ttype={type}\n\t\t\t\tvariant={variant}\n\t\t\t/>\n\t\t\t<PopoverFC align={popoverAlign} class=\"kol-popover-button__popover\" id={popoverId} popoverRef={refPopover}>\n\t\t\t\t{children}\n\t\t\t</PopoverFC>\n\t\t</BemRootNodeFC>\n\t);\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;AAYa,MAAA,gBAAgB,GAAG,yBAAyB,CAAmB,cAAc,EAAE,QAAQ;;ACT7F,MAAM,kBAAkB,GAAG;IACjC,QAAQ,EAAE,CAAC,SAAS,CAAC;CACe;;ACW/B,MAAO,eAAgB,SAAQ,YAAwB,CAAA;AAO5D,IAAA,WAAA,CAAmB,WAAoC,EAAA;AACtD,QAAA,KAAK,CAAC,WAAW,EAAE,kBAAkB,CAAC;AAP/B,QAAA,IAAI,CAAA,IAAA,GAAG,KAAK;AAuCb,QAAA,IAAA,CAAA,oBAAoB,GAAG,CAAC,OAAwB,KAAU;AAChE,YAAA,IAAI,CAAC,cAAc,GAAG,OAAO;YAC7B,IAAI,CAAC,YAAY,GAAG,OAAO,KAAP,IAAA,IAAA,OAAO,KAAP,MAAA,GAAA,MAAA,GAAA,OAAO,CAAE,aAAa,CAAC,qBAAqB,CAA+B;AAChG,SAAC;AAEM,QAAA,IAAA,CAAA,iBAAiB,GAAG,CAAC,OAAqB,KAAU;AAC1D,YAAA,IAAI,CAAC,cAAc,GAAG,OAAO;AAC9B,SAAC;AAoCO,QAAA,IAAY,CAAA,YAAA,GAAG,YAA0B;YAChD,IAAI,CAAC,IAAI,CAAC,cAAc,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE;gBACjD;;AAGD,YAAA,MAAM,qBAAqB,CAAC;AAC3B,gBAAA,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC;gBAClC,gBAAgB,EAAE,IAAI,CAAC,cAAc;gBACrC,YAAY,EAAE,IAAI,CAAC,YAAY;gBAC/B,eAAe,EAAE,IAAI,CAAC,cAAc;AACpC,aAAA,CAA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ACxB,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,EACZ,EAAE,EAAE,EAAE,EACN,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,EAAE,EAAE,EAAE,EACN,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,YAAY,EAC1B,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EACf,CAAA,EACF,CAAC,CAAA,SAAS,IAAC,KAAK,EAAE,YAAY,EAAE,KAAK,EAAC,6BAA6B,EAAC,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,IACvG,QAAQ,CACE,CACG;AAElB;;;;"}
@@ -0,0 +1,5 @@
1
+ /*!
2
+ * KoliBri - The accessible HTML-Standard
3
+ */
4
+ import{a as e}from"./tslib.es6-QNbPBOk5.js";import{h as a}from"./index-DQdQBwMc.js";import"./common-BqpMtheU.js";import{A as n,c as o}from"./component-BF8FPuIW.js";import{b as i}from"./bem-registry-CX5kvaqt.js";import{c as s}from"./clsx-COFh-Vc8.js";import{B as t}from"./component-C3sXiwbS.js";import{S as r}from"./component-C_d54ujF.js";import{T as d}from"./component-CvCfEqSE.js";const l=i.forBlock("kol-button");const c=l("interactive-element");const p=l("text");const u=l("tooltip");const m=i=>{const{accessKey:l,ariaControls:m,ariaDescription:b,ariaDescriptionId:f,ariaExpanded:h,ariaHasPopup:x,ariaSelected:C,class:j,customClass:y,disabled:B,handleBlur:k,handleClick:D,handleFocus:F,handleMouseDown:I,hideLabel:v,icons:g,id:w,inline:K,label:M,name:S,refButton:T,refTooltip:E,role:P,shortKey:q,tabIndex:L,type:O,variant:Q}=i,A=e(i,["accessKey","ariaControls","ariaDescription","ariaDescriptionId","ariaExpanded","ariaHasPopup","ariaSelected","class","customClass","disabled","handleBlur","handleClick","handleFocus","handleMouseDown","hideLabel","icons","id","inline","label","name","refButton","refTooltip","role","shortKey","tabIndex","type","variant","on","tooltipAlign"]);const H=l||q;const X=M.length>0;const N=b.trim().length>0;return a(t,Object.assign({block:"kol-button",class:s(j,{[o(Q,"button")]:Q.length>0,[y]:y.length>0}),modifiers:{disabled:B,"hide-label":v,inline:K===true,standalone:K===false}},A),a("button",{ref:T,accessKey:l||undefined,"aria-controls":m||undefined,"aria-describedby":N?f:undefined,"aria-expanded":h||undefined,"aria-haspopup":x||undefined,"aria-keyshortcuts":q||undefined,"aria-label":v&&X?M:undefined,"aria-selected":C||undefined,class:c,disabled:B,id:w||undefined,name:S||undefined,onBlur:k,onClick:D,onFocus:F,onMouseDown:I,role:P||undefined,tabIndex:L,type:O},a(r,{class:p,badgeText:H,icons:g,hideLabel:v,label:M},a("slot",{name:"expert",slot:"expert"}))),v&&X&&a("div",{class:u},a(d,{badgeText:H,label:M,refFloating:E})),N&&a(n,{description:b,descriptionId:f}))};export{m as B};
5
+ //# sourceMappingURL=component-CBpYh2q-.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"component-C3aqLFK2.js","sources":["src/internal/functional-components/button/component.tsx"],"sourcesContent":["import type { FunctionalComponent as FC } from '@stencil/core';\nimport { h } from '@stencil/core';\n\nimport { classNameFromVariant } from '../../../schema';\nimport { bem } from '../../../schema/bem-registry';\nimport clsx from '../../../utils/clsx';\nimport { AriaDescriptionSpanFC } from '../aria-description-span/component';\nimport { BemRootNodeFC } from '../bem-root-node/component';\nimport type { FunctionalComponentProps } from '../generic-types';\nimport { SpanFC } from '../span/component';\nimport { TooltipFC } from '../tooltip/component';\nimport type { ButtonApi } from './api';\n\nconst buttonBem = bem.forBlock('kol-button');\nconst BEM_CLASS_BUTTON__INTERACTIVE_ELEMENT = buttonBem('interactive-element');\nconst BEM_CLASS_BUTTON__TEXT = buttonBem('text');\nconst BEM_CLASS_BUTTON__TOOLTIP = buttonBem('tooltip');\n\n/**\n * Renders the button, its floating tooltip and its visually-hidden description inside a single\n * BEM root, the same shape `LinkFC` uses.\n *\n * The tooltip and the description span cannot live inside the `<button>` — a nested tooltip would\n * become part of the accessible name, and the description is referenced by `aria-describedby`\n * from outside. They are therefore siblings of the `<button>` within the `BemRootNodeFC` wrapper.\n */\nexport const ButtonFC: FC<FunctionalComponentProps<ButtonApi>> = (props) => {\n\tconst {\n\t\taccessKey,\n\t\tariaControls,\n\t\tariaDescription,\n\t\tariaDescriptionId,\n\t\tariaExpanded,\n\t\tariaHasPopup,\n\t\tariaSelected,\n\t\tclass: hostClass,\n\t\tcustomClass,\n\t\tdisabled,\n\t\thandleBlur,\n\t\thandleClick,\n\t\thandleFocus,\n\t\thandleMouseDown,\n\t\thideLabel,\n\t\ticons,\n\t\tid,\n\t\tinline,\n\t\tlabel,\n\t\tname,\n\t\trefButton,\n\t\trefTooltip,\n\t\trole,\n\t\tshortKey,\n\t\ttabIndex,\n\t\ttype,\n\t\tvariant,\n\t\t/* Not rendered as attributes: `on` is kept for the StrictFields contract, `tooltipAlign`\n\t\t is consumed by the tooltip behavior of the web component. */\n\t\ton,\n\t\ttooltipAlign,\n\t\t...rest\n\t} = props;\n\n\t// Marking both as intentionally read keeps them out of the forwarded rest attributes without\n\t// tripping `no-unused-vars`.\n\tvoid on;\n\tvoid tooltipAlign;\n\n\tconst badgeText = accessKey || shortKey;\n\tconst hasLabelText = label.length > 0;\n\tconst hasAriaDescription = ariaDescription.trim().length > 0;\n\n\treturn (\n\t\t<BemRootNodeFC\n\t\t\tblock=\"kol-button\"\n\t\t\tclass={clsx(\n\t\t\t\t// Forwarded 1:1 from the FC tag, so a component embedding a button inside its own\n\t\t\t\t// boundary can mark it — e.g. the badge's `kol-badge__smart-button`.\n\t\t\t\thostClass,\n\t\t\t\t{\n\t\t\t\t\t[classNameFromVariant(variant, 'button')]: variant.length > 0,\n\t\t\t\t\t[customClass]: customClass.length > 0,\n\t\t\t\t},\n\t\t\t)}\n\t\t\tmodifiers={{\n\t\t\t\tdisabled,\n\t\t\t\t'hide-label': hideLabel,\n\t\t\t\tinline: inline === true,\n\t\t\t\tstandalone: inline === false,\n\t\t\t}}\n\t\t\t{...rest}\n\t\t>\n\t\t\t<button\n\t\t\t\tref={refButton}\n\t\t\t\taccessKey={accessKey || undefined}\n\t\t\t\taria-controls={ariaControls || undefined}\n\t\t\t\taria-describedby={hasAriaDescription ? ariaDescriptionId : undefined}\n\t\t\t\taria-expanded={ariaExpanded || undefined}\n\t\t\t\taria-haspopup={ariaHasPopup || undefined}\n\t\t\t\taria-keyshortcuts={shortKey || undefined}\n\t\t\t\taria-label={hideLabel && hasLabelText ? label : undefined}\n\t\t\t\taria-selected={ariaSelected || undefined}\n\t\t\t\tclass={BEM_CLASS_BUTTON__INTERACTIVE_ELEMENT}\n\t\t\t\tdisabled={disabled}\n\t\t\t\tid={id || undefined}\n\t\t\t\tname={name || undefined}\n\t\t\t\tonBlur={handleBlur}\n\t\t\t\tonClick={handleClick}\n\t\t\t\tonFocus={handleFocus}\n\t\t\t\tonMouseDown={handleMouseDown}\n\t\t\t\trole={role || undefined}\n\t\t\t\ttabIndex={tabIndex}\n\t\t\t\ttype={type}\n\t\t\t>\n\t\t\t\t<SpanFC class={BEM_CLASS_BUTTON__TEXT} badgeText={badgeText} icons={icons} hideLabel={hideLabel} label={label}>\n\t\t\t\t\t<slot name=\"expert\" slot=\"expert\"></slot>\n\t\t\t\t</SpanFC>\n\t\t\t</button>\n\t\t\t{hideLabel && hasLabelText && (\n\t\t\t\t<div class={BEM_CLASS_BUTTON__TOOLTIP}>\n\t\t\t\t\t<TooltipFC badgeText={badgeText} label={label} refFloating={refTooltip} />\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t{hasAriaDescription && <AriaDescriptionSpanFC description={ariaDescription} descriptionId={ariaDescriptionId} />}\n\t\t</BemRootNodeFC>\n\t);\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;AAaA,MAAM,SAAS,GAAG,GAA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AK,EAAE,KAAK,EAAA,EAC5G,CAAM,CAAA,MAAA,EAAA,EAAA,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ,EAAQ,CAAA,CACjC,CACD,EACR,SAAS,IAAI,YAAY,KACzB,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAE,yBAAyB,EAAA,EACpC,CAAA,CAAC,SAAS,EAAA,EAAC,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,UAAU,EAAA,CAAI,CACrE,CACN,EACA,kBAAkB,IAAI,CAAA,CAAC,qBAAqB,EAAA,EAAC,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,iBAAiB,EAAI,CAAA,CACjG;AAElB;;;;"}
1
+ {"version":3,"file":"component-CBpYh2q-.js","sources":["src/internal/functional-components/button/component.tsx"],"sourcesContent":["import type { FunctionalComponent as FC } from '@stencil/core';\nimport { h } from '@stencil/core';\n\nimport { classNameFromVariant } from '../../../schema';\nimport { bem } from '../../../schema/bem-registry';\nimport clsx from '../../../utils/clsx';\nimport { AriaDescriptionSpanFC } from '../aria-description-span/component';\nimport { BemRootNodeFC } from '../bem-root-node/component';\nimport type { FunctionalComponentProps } from '../generic-types';\nimport { SpanFC } from '../span/component';\nimport { TooltipFC } from '../tooltip/component';\nimport type { ButtonApi } from './api';\n\nconst buttonBem = bem.forBlock('kol-button');\nconst BEM_CLASS_BUTTON__INTERACTIVE_ELEMENT = buttonBem('interactive-element');\nconst BEM_CLASS_BUTTON__TEXT = buttonBem('text');\nconst BEM_CLASS_BUTTON__TOOLTIP = buttonBem('tooltip');\n\n/**\n * Renders the button, its floating tooltip and its visually-hidden description inside a single\n * BEM root, the same shape `LinkFC` uses.\n *\n * The tooltip and the description span cannot live inside the `<button>` — a nested tooltip would\n * become part of the accessible name, and the description is referenced by `aria-describedby`\n * from outside. They are therefore siblings of the `<button>` within the `BemRootNodeFC` wrapper.\n */\nexport const ButtonFC: FC<FunctionalComponentProps<ButtonApi>> = (props) => {\n\tconst {\n\t\taccessKey,\n\t\tariaControls,\n\t\tariaDescription,\n\t\tariaDescriptionId,\n\t\tariaExpanded,\n\t\tariaHasPopup,\n\t\tariaSelected,\n\t\tclass: hostClass,\n\t\tcustomClass,\n\t\tdisabled,\n\t\thandleBlur,\n\t\thandleClick,\n\t\thandleFocus,\n\t\thandleMouseDown,\n\t\thideLabel,\n\t\ticons,\n\t\tid,\n\t\tinline,\n\t\tlabel,\n\t\tname,\n\t\trefButton,\n\t\trefTooltip,\n\t\trole,\n\t\tshortKey,\n\t\ttabIndex,\n\t\ttype,\n\t\tvariant,\n\t\t/* Not rendered as attributes: `on` is kept for the StrictFields contract, `tooltipAlign`\n\t\t is consumed by the tooltip behavior of the web component. */\n\t\ton,\n\t\ttooltipAlign,\n\t\t...rest\n\t} = props;\n\n\t// Marking both as intentionally read keeps them out of the forwarded rest attributes without\n\t// tripping `no-unused-vars`.\n\tvoid on;\n\tvoid tooltipAlign;\n\n\tconst badgeText = accessKey || shortKey;\n\tconst hasLabelText = label.length > 0;\n\tconst hasAriaDescription = ariaDescription.trim().length > 0;\n\n\treturn (\n\t\t<BemRootNodeFC\n\t\t\tblock=\"kol-button\"\n\t\t\tclass={clsx(\n\t\t\t\t// Forwarded 1:1 from the FC tag, so a component embedding a button inside its own\n\t\t\t\t// boundary can mark it — e.g. the badge's `kol-badge__smart-button`.\n\t\t\t\thostClass,\n\t\t\t\t{\n\t\t\t\t\t[classNameFromVariant(variant, 'button')]: variant.length > 0,\n\t\t\t\t\t[customClass]: customClass.length > 0,\n\t\t\t\t},\n\t\t\t)}\n\t\t\tmodifiers={{\n\t\t\t\tdisabled,\n\t\t\t\t'hide-label': hideLabel,\n\t\t\t\tinline: inline === true,\n\t\t\t\tstandalone: inline === false,\n\t\t\t}}\n\t\t\t{...rest}\n\t\t>\n\t\t\t<button\n\t\t\t\tref={refButton}\n\t\t\t\taccessKey={accessKey || undefined}\n\t\t\t\taria-controls={ariaControls || undefined}\n\t\t\t\taria-describedby={hasAriaDescription ? ariaDescriptionId : undefined}\n\t\t\t\taria-expanded={ariaExpanded || undefined}\n\t\t\t\taria-haspopup={ariaHasPopup || undefined}\n\t\t\t\taria-keyshortcuts={shortKey || undefined}\n\t\t\t\taria-label={hideLabel && hasLabelText ? label : undefined}\n\t\t\t\taria-selected={ariaSelected || undefined}\n\t\t\t\tclass={BEM_CLASS_BUTTON__INTERACTIVE_ELEMENT}\n\t\t\t\tdisabled={disabled}\n\t\t\t\tid={id || undefined}\n\t\t\t\tname={name || undefined}\n\t\t\t\tonBlur={handleBlur}\n\t\t\t\tonClick={handleClick}\n\t\t\t\tonFocus={handleFocus}\n\t\t\t\tonMouseDown={handleMouseDown}\n\t\t\t\trole={role || undefined}\n\t\t\t\ttabIndex={tabIndex}\n\t\t\t\ttype={type}\n\t\t\t>\n\t\t\t\t<SpanFC class={BEM_CLASS_BUTTON__TEXT} badgeText={badgeText} icons={icons} hideLabel={hideLabel} label={label}>\n\t\t\t\t\t<slot name=\"expert\" slot=\"expert\"></slot>\n\t\t\t\t</SpanFC>\n\t\t\t</button>\n\t\t\t{hideLabel && hasLabelText && (\n\t\t\t\t<div class={BEM_CLASS_BUTTON__TOOLTIP}>\n\t\t\t\t\t<TooltipFC badgeText={badgeText} label={label} refFloating={refTooltip} />\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t{hasAriaDescription && <AriaDescriptionSpanFC description={ariaDescription} descriptionId={ariaDescriptionId} />}\n\t\t</BemRootNodeFC>\n\t);\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;AAaA,MAAM,SAAS,GAAG,GAAG,CAAC,QAAQ,CAAC,YAAY,CAAC;AAC5C,MAAM,qCAAqC,GAAG,SAAS,CAAC,qBAAqB,CAAC;AAC9E,MAAM,sBAAsB,GAAG,SAAS,CAAC,MAAM,CAAC;AAChD,MAAM,yBAAyB,GAAG,SAAS,CAAC,SAAS,CAAC;AAUzC,MAAA,QAAQ,GAA4C,CAAC,KAAK,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