@public-ui/components 4.6.0-rc.1 → 4.6.0-rc.3

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 (693) 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 +3 -3
  7. package/dist/cjs/{Heading-DpKpW9_U.js → Heading-DqZXie2T.js} +1 -1
  8. package/dist/cjs/{api-DSnFV5pX.js → api-Cc1hT-oO.js} +25 -24
  9. package/dist/cjs/{app-globals-DWk29tH4.js → app-globals-DtXiFJRj.js} +3 -3
  10. package/dist/cjs/{aria-labelledby-BRMgWRVp.js → aria-labelledby-By2dgbCn.js} +0 -13
  11. package/dist/cjs/{base-uTtcb6OV.js → base-B-wbGF-X.js} +30 -36
  12. package/dist/cjs/{base-DB-5MCfF.js → base-BKsPSdXS.js} +12 -12
  13. package/dist/cjs/{base-Cdk10fDz.js → base-BjiXfuju.js} +10 -10
  14. package/dist/cjs/{base-B1L6tTOu.js → base-CoMrpiHg.js} +11 -11
  15. package/dist/cjs/{base-web-component-BdHm5Oq9.js → base-web-component-BXtl3Nmq.js} +10 -10
  16. package/dist/cjs/{base-web-component-CyF5QpIH.js → base-web-component-DApRK7Vs.js} +15 -15
  17. package/dist/cjs/{base-web-component-B6mwGD0m.js → base-web-component-DXCN-Sp3.js} +1 -1
  18. package/dist/cjs/{behavior-D5F_9gEC.js → behavior-DIv2ciyM.js} +5 -5
  19. package/dist/cjs/{behavior-C3w_8ifK.js → behavior-DtHCmCCv.js} +5 -5
  20. package/dist/cjs/{behavior-BnUihLzw.js → behavior-GG5TOrTV.js} +6 -13
  21. package/dist/cjs/{bem-registry-ZJZujhCi.js → bem-registry-h_moyLBn.js} +40 -1
  22. package/dist/cjs/{block-bem-CMvCkLkl.js → block-bem-BVBM34Tu.js} +1 -1
  23. package/dist/cjs/{bootstrap-C4lWLUW9.js → bootstrap-HU5YhM_w.js} +2 -2
  24. package/dist/cjs/{color-BW4t1Cif.js → color-C3xsA3Uk.js} +3 -3
  25. package/dist/cjs/{common-C-hcIfzh.js → common-CzGJx0nT.js} +31 -30
  26. package/dist/cjs/{component-BXz1XtoE.js → component-BE_fK-Xu.js} +15 -15
  27. package/dist/cjs/{component-DsWMXDya.js → component-BOI4FdZE.js} +7 -7
  28. package/dist/cjs/{component-CWEYNtAH.js → component-C9B-yJ93.js} +5 -5
  29. package/dist/cjs/{component-C46QQbMS.js → component-CNNGo5gU.js} +11 -11
  30. package/dist/cjs/{component-_p4OHWcc.js → component-CVLJJvvd.js} +14 -14
  31. package/dist/cjs/{component-CrW05zUq.js → component-Cnc2NyzE.js} +5 -5
  32. package/dist/cjs/{component-N-3XFtFS.js → component-CsnTf_45.js} +8 -8
  33. package/dist/cjs/{component-DfChjUi8.js → component-CxwSVBBv.js} +10 -10
  34. package/dist/cjs/{component-B2l8N5t_.js → component-D0uxhuF3.js} +4 -4
  35. package/dist/cjs/{component-BE_gS80r.js → component-DNQW0lG8.js} +2 -2
  36. package/dist/cjs/{component-eYoUHQ64.js → component-DfGgpwuP.js} +2 -2
  37. package/dist/cjs/{component-BwrQID5A.js → component-DlyhBQIa.js} +4 -4
  38. package/dist/cjs/{contrast-4mAdSLs0.js → contrast-6Nku3lih.js} +2 -2
  39. package/dist/cjs/{controller-DcinOUmN.js → controller-D66Eq44x.js} +1 -1
  40. package/dist/cjs/{dev.utils-Bxq7b-n1.js → dev.utils-DTQy7QrG.js} +2 -2
  41. package/dist/cjs/{devtools-BLvPSoCH.js → devtools-BAChPN0l.js} +3 -3
  42. package/dist/cjs/{disabled-jYcvcwjv.js → disabled-CilmJ-p-.js} +1 -1
  43. package/dist/cjs/{field-control-D9t3USqP.js → field-control-Bxj6Xuu8.js} +8 -8
  44. package/dist/cjs/{group-CFBPF3hG.js → group-BUdQbdkp.js} +7 -7
  45. package/dist/cjs/{has-closer-CvNa5gqv.js → has-closer-iSIrv52u.js} +1 -1
  46. package/dist/cjs/{href-BBhiVyPb.js → href-xojo1zy_.js} +1 -1
  47. package/dist/cjs/{i18n-BnOWw1MQ.js → i18n-D7UmRsV8.js} +2 -2
  48. package/dist/cjs/{i18n-BSWM5nea.js → i18n-DgHI4-xa.js} +2 -0
  49. package/dist/cjs/{id-D1VZsLkg.js → id-DP-w6i4q.js} +1 -1
  50. package/dist/cjs/{index-CNhjOFBg.js → index-BaB_2Z5W.js} +23 -12
  51. package/dist/cjs/index.cjs.js +4 -4
  52. package/dist/cjs/{input-C3F73RZW.js → input-CtqTozTO.js} +5 -5
  53. package/dist/cjs/{input-container-B5-_NcRy.js → input-container-BcwbGU2R.js} +8 -8
  54. package/dist/cjs/{item-nAB1wPvv.js → item-BLrLbhAD.js} +12 -12
  55. package/dist/cjs/{item-dlea1NHr.js → item-BXt0-A5j.js} +30 -15
  56. package/dist/cjs/{item-CfCrfeQL.js → item-BYKMN41a.js} +5 -5
  57. package/dist/cjs/{item-DvddzW3M.js → item-DJ-XUS77.js} +6 -6
  58. package/dist/cjs/kol-abbr.cjs.entry.js +13 -12
  59. package/dist/cjs/kol-accordion.cjs.entry.js +21 -20
  60. package/dist/cjs/kol-alert.cjs.entry.js +32 -30
  61. package/dist/cjs/kol-avatar.cjs.entry.js +17 -16
  62. package/dist/cjs/kol-badge.cjs.entry.js +30 -29
  63. package/dist/cjs/kol-breadcrumb.cjs.entry.js +32 -31
  64. package/dist/cjs/kol-button-link.cjs.entry.js +29 -28
  65. package/dist/cjs/kol-button.cjs.entry.js +29 -28
  66. package/dist/cjs/kol-card.cjs.entry.js +34 -33
  67. package/dist/cjs/kol-combobox.cjs.entry.js +47 -46
  68. package/dist/cjs/kol-details.cjs.entry.js +21 -20
  69. package/dist/cjs/kol-dialog.cjs.entry.js +37 -36
  70. package/dist/cjs/kol-drawer.cjs.entry.js +36 -35
  71. package/dist/cjs/kol-form.cjs.entry.js +30 -29
  72. package/dist/cjs/kol-heading.cjs.entry.js +15 -14
  73. package/dist/cjs/kol-icon.cjs.entry.js +20 -16
  74. package/dist/cjs/kol-image.cjs.entry.js +10 -9
  75. package/dist/cjs/kol-input-checkbox.cjs.entry.js +54 -52
  76. package/dist/cjs/kol-input-color.cjs.entry.js +47 -45
  77. package/dist/cjs/kol-input-date.cjs.entry.js +49 -47
  78. package/dist/cjs/kol-input-email.cjs.entry.js +51 -49
  79. package/dist/cjs/kol-input-file.cjs.entry.js +46 -44
  80. package/dist/cjs/kol-input-number.cjs.entry.js +52 -50
  81. package/dist/cjs/kol-input-password.cjs.entry.js +50 -48
  82. package/dist/cjs/kol-input-radio.cjs.entry.js +42 -41
  83. package/dist/cjs/kol-input-range.cjs.entry.js +45 -44
  84. package/dist/cjs/kol-input-text.cjs.entry.js +51 -49
  85. package/dist/cjs/kol-kolibri.cjs.entry.js +13 -12
  86. package/dist/cjs/kol-link-button.cjs.entry.js +30 -29
  87. package/dist/cjs/kol-link.cjs.entry.js +30 -29
  88. package/dist/cjs/kol-meter.cjs.entry.js +20 -22
  89. package/dist/cjs/kol-modal.cjs.entry.js +37 -36
  90. package/dist/cjs/kol-nav.cjs.entry.js +38 -37
  91. package/dist/cjs/kol-pagination.cjs.entry.js +46 -45
  92. package/dist/cjs/kol-popover-button.cjs.entry.js +30 -29
  93. package/dist/cjs/kol-progress.cjs.entry.js +21 -17
  94. package/dist/cjs/kol-quote.cjs.entry.js +12 -11
  95. package/dist/cjs/kol-select.cjs.entry.js +42 -41
  96. package/dist/cjs/kol-single-select.cjs.entry.js +54 -48
  97. package/dist/cjs/kol-skip-nav.cjs.entry.js +32 -31
  98. package/dist/cjs/kol-spin.cjs.entry.js +17 -16
  99. package/dist/cjs/kol-split-button.cjs.entry.js +33 -32
  100. package/dist/cjs/kol-table-stateful.cjs.entry.js +59 -59
  101. package/dist/cjs/kol-table-stateless.cjs.entry.js +47 -47
  102. package/dist/cjs/kol-tabs.cjs.entry.js +36 -38
  103. package/dist/cjs/kol-textarea.cjs.entry.js +49 -46
  104. package/dist/cjs/kol-toast-container.cjs.entry.js +25 -24
  105. package/dist/cjs/kol-toolbar.cjs.entry.js +35 -34
  106. package/dist/cjs/kol-tooltip-wc.cjs.entry.js +15 -14
  107. package/dist/cjs/kol-tree-item.cjs.entry.js +32 -28
  108. package/dist/cjs/kol-tree.cjs.entry.js +26 -14
  109. package/dist/cjs/kol-version.cjs.entry.js +27 -26
  110. package/dist/cjs/kolibri.cjs.js +4 -4
  111. package/dist/cjs/{label-vVOiX4dC.js → label-D6c6jfqK.js} +3 -3
  112. package/dist/cjs/{label-hints-D6EBRW9T.js → label-hints-q3XenWLW.js} +2 -2
  113. package/dist/cjs/{label-lang-segment-CYlAqtUl.js → label-lang-segment-k4OY9qRY.js} +2 -2
  114. package/dist/cjs/{label-with-expert-slot-B9z4nqW1.js → label-with-expert-slot-CJoz7BLw.js} +3 -3
  115. package/dist/cjs/{level-BAiEYu4U.js → level-B6vFMm9s.js} +1 -1
  116. package/dist/cjs/{link-target-4AzB3I84.js → link-target-0qSVsAb2.js} +1 -1
  117. package/dist/cjs/{links-CPNK7VZo.js → links-Ur1e9DOK.js} +2 -2
  118. package/dist/cjs/loader.cjs.js +3 -3
  119. package/dist/cjs/{multiple-B3ZpkzWu.js → multiple-CCxtzqez.js} +1 -1
  120. package/dist/cjs/{number-value-B2yoKlvx.js → number-value-DzAHCwlP.js} +1 -1
  121. package/dist/cjs/{open-CvoX_qxD.js → open-Gxr_K7HK.js} +1 -1
  122. package/dist/cjs/{options-B2pQC9w2.js → options-BT0m0gRT.js} +2 -2
  123. package/dist/cjs/{orientation-u2cvwgBc.js → orientation-CeHU4dT8.js} +1 -1
  124. package/dist/cjs/{placeholder-C9Ngp2tQ.js → placeholder-22xUUFff.js} +1 -1
  125. package/dist/cjs/{props-from-config-BQ2SOZlz.js → props-from-config-D1qhXS9j.js} +1 -1
  126. package/dist/cjs/{read-only-DfWF-Coi.js → read-only-iHApMQEg.js} +1 -1
  127. package/dist/cjs/{required-CdXn16dq.js → required-BYdSI25I.js} +1 -1
  128. package/dist/cjs/{resolve-props-BUSerQcI.js → resolve-props-B7klWjLx.js} +8 -8
  129. package/dist/cjs/{resolve-props-ClWlRbhz.js → resolve-props-c-uwDulF.js} +7 -7
  130. package/dist/cjs/{rows-Ca5ya9tG.js → rows-C9vBSQK1.js} +1 -1
  131. package/dist/cjs/{scroll-lock-CSW_wA0P.js → scroll-lock-daUQqmx_.js} +2 -2
  132. package/dist/cjs/{smart-button-CB8qIzgQ.js → smart-button-DRMmUyQ5.js} +2 -2
  133. package/dist/cjs/{spell-check-DKRC8xbW.js → spell-check-CxgvHcGA.js} +1 -1
  134. package/dist/cjs/{src-C3NG0rLO.js → src-Bmd7gQCS.js} +1 -1
  135. package/dist/cjs/{step-CZNyTb2h.js → step-CCqgsPCX.js} +1 -1
  136. package/dist/cjs/{suggestions-BRclldK2.js → suggestions-CoUp7HmN.js} +2 -2
  137. package/dist/cjs/{suggestions-CIGYxDps.js → suggestions-D3snLGL_.js} +3 -3
  138. package/dist/cjs/test-component.cjs.entry.js +4 -3
  139. package/dist/cjs/{toggle-handler-Cy5RcTS_.js → toggle-handler-B0xib7fH.js} +10 -10
  140. package/dist/cjs/{unique-nav-labels-CIAwid5V.js → unique-nav-labels-CgxOyb6V.js} +2 -2
  141. package/dist/cjs/{unit-bsoemclF.js → unit-_oDj-vIB.js} +1 -1
  142. package/dist/cjs/{validators-DuLdbf2D.js → validators-CpCJvM4r.js} +3 -1
  143. package/dist/cjs/{value-string-DZ_FFaUt.js → value-string-CKppMGVM.js} +1 -1
  144. package/dist/cjs/{width-BklaRCqt.js → width-e7f3wHF3.js} +1 -1
  145. package/dist/collection/collection-manifest.json +1 -1
  146. package/dist/collection/components/abbr/component.js +2 -2
  147. package/dist/collection/components/accordion/component.js +2 -2
  148. package/dist/collection/components/accordion/style.css +2 -2
  149. package/dist/collection/components/alert/component.js +4 -3
  150. package/dist/collection/components/alert/style.css +2 -2
  151. package/dist/collection/components/avatar/component.js +2 -2
  152. package/dist/collection/components/badge/component.js +2 -2
  153. package/dist/collection/components/badge/style.css +2 -2
  154. package/dist/collection/components/breadcrumb/component.js +2 -2
  155. package/dist/collection/components/breadcrumb/style.css +2 -2
  156. package/dist/collection/components/button/component.js +1 -1
  157. package/dist/collection/components/button/style.css +2 -2
  158. package/dist/collection/components/button-link/component.js +1 -1
  159. package/dist/collection/components/button-link/style.css +2 -2
  160. package/dist/collection/components/card/component.js +2 -2
  161. package/dist/collection/components/card/style.css +5 -2
  162. package/dist/collection/components/combobox/component.js +4 -4
  163. package/dist/collection/components/combobox/style.css +2 -2
  164. package/dist/collection/components/details/component.js +2 -2
  165. package/dist/collection/components/details/style.css +2 -2
  166. package/dist/collection/components/dialog/component.js +2 -2
  167. package/dist/collection/components/dialog/style.css +5 -2
  168. package/dist/collection/components/drawer/component.js +2 -2
  169. package/dist/collection/components/drawer/style.css +5 -2
  170. package/dist/collection/components/form/component.js +2 -2
  171. package/dist/collection/components/form/style.css +2 -2
  172. package/dist/collection/components/heading/component.js +2 -2
  173. package/dist/collection/components/icon/component.js +5 -5
  174. package/dist/collection/components/icon/style.css +2 -2
  175. package/dist/collection/components/image/component.js +2 -2
  176. package/dist/collection/components/input-checkbox/component.js +13 -11
  177. package/dist/collection/components/input-checkbox/style.css +2 -2
  178. package/dist/collection/components/input-color/component.js +6 -4
  179. package/dist/collection/components/input-color/style.css +2 -2
  180. package/dist/collection/components/input-date/component.js +5 -3
  181. package/dist/collection/components/input-date/style.css +2 -2
  182. package/dist/collection/components/input-email/component.js +4 -1
  183. package/dist/collection/components/input-email/style.css +2 -2
  184. package/dist/collection/components/input-file/component.js +6 -3
  185. package/dist/collection/components/input-file/style.css +2 -2
  186. package/dist/collection/components/input-number/component.js +6 -4
  187. package/dist/collection/components/input-number/style.css +2 -2
  188. package/dist/collection/components/input-password/component.js +5 -2
  189. package/dist/collection/components/input-password/style.css +2 -2
  190. package/dist/collection/components/input-radio/component.js +1 -1
  191. package/dist/collection/components/input-radio/style.css +2 -2
  192. package/dist/collection/components/input-range/component.js +2 -2
  193. package/dist/collection/components/input-range/style.css +2 -2
  194. package/dist/collection/components/input-text/component.js +4 -2
  195. package/dist/collection/components/input-text/style.css +2 -2
  196. package/dist/collection/components/kolibri/component.js +2 -2
  197. package/dist/collection/components/link/component.js +2 -2
  198. package/dist/collection/components/link/style.css +2 -2
  199. package/dist/collection/components/link-button/component.js +2 -2
  200. package/dist/collection/components/link-button/style.css +2 -2
  201. package/dist/collection/components/meter/component.js +2 -2
  202. package/dist/collection/components/modal/component.js +2 -2
  203. package/dist/collection/components/modal/style.css +5 -2
  204. package/dist/collection/components/nav/component.js +2 -2
  205. package/dist/collection/components/nav/style.css +2 -2
  206. package/dist/collection/components/pagination/component.js +2 -2
  207. package/dist/collection/components/pagination/style.css +2 -2
  208. package/dist/collection/components/popover-button/component.js +1 -1
  209. package/dist/collection/components/popover-button/style.css +2 -2
  210. package/dist/collection/components/progress/component.js +6 -3
  211. package/dist/collection/components/quote/component.js +2 -2
  212. package/dist/collection/components/select/component.js +1 -1
  213. package/dist/collection/components/select/style.css +2 -2
  214. package/dist/collection/components/single-select/component.js +10 -6
  215. package/dist/collection/components/single-select/style.css +2 -2
  216. package/dist/collection/components/skip-nav/component.js +2 -2
  217. package/dist/collection/components/skip-nav/style.css +2 -2
  218. package/dist/collection/components/spin/component.js +2 -2
  219. package/dist/collection/components/split-button/component.js +1 -1
  220. package/dist/collection/components/split-button/style.css +2 -2
  221. package/dist/collection/components/table-stateful/component.js +4 -6
  222. package/dist/collection/components/table-stateful/style.css +5 -2
  223. package/dist/collection/components/table-stateless/base.js +3 -0
  224. package/dist/collection/components/table-stateless/component.js +4 -6
  225. package/dist/collection/components/table-stateless/style.css +5 -2
  226. package/dist/collection/components/tabs/component.js +2 -11
  227. package/dist/collection/components/tabs/style.css +2 -2
  228. package/dist/collection/components/textarea/component.js +5 -3
  229. package/dist/collection/components/textarea/style.css +2 -2
  230. package/dist/collection/components/toaster/shadow.js +1 -1
  231. package/dist/collection/components/toaster/style.css +2 -2
  232. package/dist/collection/components/toolbar/component.js +2 -2
  233. package/dist/collection/components/toolbar/style.css +2 -2
  234. package/dist/collection/components/tooltip/component.js +1 -1
  235. package/dist/collection/components/tree/component.js +16 -5
  236. package/dist/collection/components/tree-item/component.js +6 -3
  237. package/dist/collection/components/tree-item/style.css +2 -2
  238. package/dist/collection/components/version/component.js +2 -2
  239. package/dist/collection/components/version/style.css +2 -2
  240. package/dist/collection/internal/functional-components/form-association/api.js +2 -2
  241. package/dist/collection/internal/functional-components/form-association/behavior.js +1 -5
  242. package/dist/collection/internal/functional-components/form-field/base-web-component.js +0 -1
  243. package/dist/collection/internal/functional-components/form-field/custom-suggestions.js +1 -1
  244. package/dist/collection/internal/functional-components/icon/api.js +2 -2
  245. package/dist/collection/internal/functional-components/link/component.js +1 -1
  246. package/dist/collection/internal/functional-components/meter/component.js +3 -6
  247. package/dist/collection/internal/functional-components/pagination/component.js +2 -3
  248. package/dist/collection/internal/functional-components/pagination/item.js +15 -0
  249. package/dist/collection/internal/functional-components/progress/component.js +1 -1
  250. package/dist/collection/internal/functional-components/single-select/component.js +2 -1
  251. package/dist/collection/internal/functional-components/tabs/component.js +7 -1
  252. package/dist/collection/internal/props/helpers/validators.js +1 -0
  253. package/dist/collection/internal/props/index.js +1 -0
  254. package/dist/collection/internal/props/label-decorative.js +10 -0
  255. package/dist/collection/locales/de.js +1 -0
  256. package/dist/collection/locales/en.js +1 -0
  257. package/dist/collection/schema/bem-registry.js +39 -0
  258. package/dist/collection/schema/i18n-keys.js +29 -28
  259. package/dist/collection/schema/props/aria-details.js +1 -22
  260. package/dist/collection/schema/props/aria-labelledby.js +3 -12
  261. package/dist/collection/utils/aria-labelledby.js +0 -12
  262. package/dist/components/aria-labelledby.js +1 -1
  263. package/dist/components/base-web-component2.js +1 -1
  264. package/dist/components/base4.js +1 -1
  265. package/dist/components/behavior3.js +1 -1
  266. package/dist/components/bem-registry.js +1 -1
  267. package/dist/components/component3.js +1 -1
  268. package/dist/components/component6.js +1 -1
  269. package/dist/components/group.js +1 -1
  270. package/dist/components/i18n2.js +1 -1
  271. package/dist/components/item4.js +1 -1
  272. package/dist/components/kol-abbr.js +1 -1
  273. package/dist/components/kol-accordion.js +1 -1
  274. package/dist/components/kol-alert.js +1 -1
  275. package/dist/components/kol-avatar.js +1 -1
  276. package/dist/components/kol-badge.js +1 -1
  277. package/dist/components/kol-breadcrumb.js +1 -1
  278. package/dist/components/kol-button-link.js +1 -1
  279. package/dist/components/kol-button.js +1 -1
  280. package/dist/components/kol-card.js +1 -1
  281. package/dist/components/kol-combobox.js +1 -1
  282. package/dist/components/kol-details.js +1 -1
  283. package/dist/components/kol-dialog.js +1 -1
  284. package/dist/components/kol-drawer.js +1 -1
  285. package/dist/components/kol-form.js +1 -1
  286. package/dist/components/kol-heading.js +1 -1
  287. package/dist/components/kol-icon.js +1 -1
  288. package/dist/components/kol-image.js +1 -1
  289. package/dist/components/kol-input-checkbox.js +1 -1
  290. package/dist/components/kol-input-color.js +1 -1
  291. package/dist/components/kol-input-date.js +1 -1
  292. package/dist/components/kol-input-email.js +1 -1
  293. package/dist/components/kol-input-file.js +1 -1
  294. package/dist/components/kol-input-number.js +1 -1
  295. package/dist/components/kol-input-password.js +1 -1
  296. package/dist/components/kol-input-radio.js +1 -1
  297. package/dist/components/kol-input-range.js +1 -1
  298. package/dist/components/kol-input-text.js +1 -1
  299. package/dist/components/kol-kolibri.js +1 -1
  300. package/dist/components/kol-link-button.js +1 -1
  301. package/dist/components/kol-link.js +1 -1
  302. package/dist/components/kol-meter.js +1 -1
  303. package/dist/components/kol-modal.js +1 -1
  304. package/dist/components/kol-nav.js +1 -1
  305. package/dist/components/kol-pagination.js +1 -1
  306. package/dist/components/kol-popover-button.js +1 -1
  307. package/dist/components/kol-progress.js +1 -1
  308. package/dist/components/kol-quote.js +1 -1
  309. package/dist/components/kol-select.js +1 -1
  310. package/dist/components/kol-single-select.js +1 -1
  311. package/dist/components/kol-skip-nav.js +1 -1
  312. package/dist/components/kol-spin.js +1 -1
  313. package/dist/components/kol-split-button.js +1 -1
  314. package/dist/components/kol-table-stateful.js +1 -1
  315. package/dist/components/kol-table-stateless.js +1 -1
  316. package/dist/components/kol-tabs.js +1 -1
  317. package/dist/components/kol-textarea.js +1 -1
  318. package/dist/components/kol-toast-container.js +1 -1
  319. package/dist/components/kol-toolbar.js +1 -1
  320. package/dist/components/kol-tooltip-wc.js +1 -1
  321. package/dist/components/kol-tree-item.js +1 -1
  322. package/dist/components/kol-tree.js +1 -1
  323. package/dist/components/kol-version.js +1 -1
  324. package/dist/components/label-with-expert-slot.js +1 -1
  325. package/dist/components/label.js +1 -1
  326. package/dist/components/validators.js +1 -1
  327. package/dist/esm/{Heading-wrhAEuG3.js → Heading-GZb1f2pZ.js} +1 -1
  328. package/dist/esm/{api-7B_iI89k.js → api-CBPlj155.js} +23 -22
  329. package/dist/esm/{app-globals-tRqgHq3P.js → app-globals-DRl9A82c.js} +3 -3
  330. package/dist/esm/{aria-labelledby-CLehu03h.js → aria-labelledby-DqJY_4G-.js} +1 -13
  331. package/dist/esm/{base-C32RNC8q.js → base-BByRnpRm.js} +12 -12
  332. package/dist/esm/{base-BVztEKgJ.js → base-C7BBsrYZ.js} +30 -36
  333. package/dist/esm/{base-D_-9Lzkd.js → base-DO0KvOv9.js} +11 -11
  334. package/dist/esm/{base-BDYPTFjC.js → base-Dtxcvto_.js} +10 -10
  335. package/dist/esm/{base-web-component-DdY5aIHN.js → base-web-component-BxXLva5d.js} +10 -10
  336. package/dist/esm/{base-web-component-XgI4wUyN.js → base-web-component-CC_gpyDb.js} +1 -1
  337. package/dist/esm/{base-web-component-BUu68byc.js → base-web-component-CfPyCJDJ.js} +15 -15
  338. package/dist/esm/{behavior-fGxZN96S.js → behavior-CKU2tmCj.js} +5 -5
  339. package/dist/esm/{behavior-DsTiTiJC.js → behavior-CsNDRS2z.js} +5 -5
  340. package/dist/esm/{behavior-DN-22cB1.js → behavior-ewHvUWVk.js} +7 -13
  341. package/dist/esm/{bem-registry-Crcs_65u.js → bem-registry-D1KgKnyz.js} +40 -1
  342. package/dist/esm/{block-bem-DehcAQZQ.js → block-bem-D3ixJyOY.js} +1 -1
  343. package/dist/esm/{bootstrap-DHXUvPBY.js → bootstrap-tgQ2nQQI.js} +2 -2
  344. package/dist/esm/{color-eAL9I7Wq.js → color-D1gM-F2l.js} +3 -3
  345. package/dist/esm/{common-OzsC_6kt.js → common-BdSzSIXg.js} +31 -30
  346. package/dist/esm/{component-4xXBb7K-.js → component-6l69Jvwl.js} +4 -4
  347. package/dist/esm/{component-Cxdi6on4.js → component-B3OziaRC.js} +11 -11
  348. package/dist/esm/{component-DHNcVTi0.js → component-By8ggItU.js} +8 -8
  349. package/dist/esm/{component-EK9BJR6z.js → component-CF8uFG0A.js} +15 -15
  350. package/dist/esm/{component-BJ4gGOph.js → component-Ccv2lqNq.js} +2 -2
  351. package/dist/esm/{component-0IO2wu9i.js → component-Cmi6iGfA.js} +10 -10
  352. package/dist/esm/{component-CPq3i3I_.js → component-D4-NVnsT.js} +5 -5
  353. package/dist/esm/{component-ChuoBFI-.js → component-D6_K50vT.js} +4 -4
  354. package/dist/esm/{component-CTOYF3q6.js → component-D6lo0LzE.js} +7 -7
  355. package/dist/esm/{component-NEw1tN3M.js → component-D9NreIlK.js} +5 -5
  356. package/dist/esm/{component-DWywPG_a.js → component-DAk3R8NN.js} +14 -14
  357. package/dist/esm/{component-et0GdBuf.js → component-EDDTMC-J.js} +2 -2
  358. package/dist/esm/{contrast-D78VGPFR.js → contrast-BNoQruBh.js} +2 -2
  359. package/dist/esm/{controller-Cb-96wE-.js → controller-CZcQ57AP.js} +1 -1
  360. package/dist/esm/{dev.utils-Bg7nZBMk.js → dev.utils-BwYCy1rP.js} +2 -2
  361. package/dist/esm/{devtools-nUT3JVTV.js → devtools-CGP3Nzsw.js} +3 -3
  362. package/dist/esm/{disabled-Cqhc40CU.js → disabled-BZXlWAgK.js} +1 -1
  363. package/dist/esm/{field-control-D2tOd14v.js → field-control-0TRmF7Ea.js} +8 -8
  364. package/dist/esm/{group-CxWsx0aJ.js → group-DapkT_Yh.js} +7 -7
  365. package/dist/esm/{has-closer-B9NQY7BK.js → has-closer-DUB0QcS9.js} +1 -1
  366. package/dist/esm/{href-JqLbNBsW.js → href-CxokGOJ2.js} +1 -1
  367. package/dist/esm/{i18n-Dl6Jjofb.js → i18n-4J6U3ZDc.js} +2 -0
  368. package/dist/esm/{i18n-DtLKn3Xt.js → i18n-ePBcLlCr.js} +2 -2
  369. package/dist/esm/{id-CIYvVaNr.js → id-BI0ZuK17.js} +1 -1
  370. package/dist/esm/{index-B_bJG8-2.js → index-DEcM8BEc.js} +23 -12
  371. package/dist/esm/index.js +6 -6
  372. package/dist/esm/{input-Ia9Z3AP7.js → input-CDUCo1S5.js} +5 -5
  373. package/dist/esm/{input-container-Y_8n5Sen.js → input-container-BipAkWn4.js} +8 -8
  374. package/dist/esm/{item-BjriQHQl.js → item-B0oQTeju.js} +6 -6
  375. package/dist/esm/{item-BuqBMSYI.js → item-Boe3t0Dm.js} +12 -12
  376. package/dist/esm/{item-BZtI88zF.js → item-BvnZc8uV.js} +5 -5
  377. package/dist/esm/{item-BKVeXzUO.js → item-UgJ2uikD.js} +30 -15
  378. package/dist/esm/kol-abbr.entry.js +13 -12
  379. package/dist/esm/kol-accordion.entry.js +21 -20
  380. package/dist/esm/kol-alert.entry.js +32 -30
  381. package/dist/esm/kol-avatar.entry.js +17 -16
  382. package/dist/esm/kol-badge.entry.js +30 -29
  383. package/dist/esm/kol-breadcrumb.entry.js +32 -31
  384. package/dist/esm/kol-button-link.entry.js +29 -28
  385. package/dist/esm/kol-button.entry.js +29 -28
  386. package/dist/esm/kol-card.entry.js +34 -33
  387. package/dist/esm/kol-combobox.entry.js +47 -46
  388. package/dist/esm/kol-details.entry.js +21 -20
  389. package/dist/esm/kol-dialog.entry.js +37 -36
  390. package/dist/esm/kol-drawer.entry.js +36 -35
  391. package/dist/esm/kol-form.entry.js +30 -29
  392. package/dist/esm/kol-heading.entry.js +15 -14
  393. package/dist/esm/kol-icon.entry.js +20 -16
  394. package/dist/esm/kol-image.entry.js +10 -9
  395. package/dist/esm/kol-input-checkbox.entry.js +54 -52
  396. package/dist/esm/kol-input-color.entry.js +47 -45
  397. package/dist/esm/kol-input-date.entry.js +49 -47
  398. package/dist/esm/kol-input-email.entry.js +51 -49
  399. package/dist/esm/kol-input-file.entry.js +46 -44
  400. package/dist/esm/kol-input-number.entry.js +52 -50
  401. package/dist/esm/kol-input-password.entry.js +50 -48
  402. package/dist/esm/kol-input-radio.entry.js +42 -41
  403. package/dist/esm/kol-input-range.entry.js +45 -44
  404. package/dist/esm/kol-input-text.entry.js +51 -49
  405. package/dist/esm/kol-kolibri.entry.js +13 -12
  406. package/dist/esm/kol-link-button.entry.js +30 -29
  407. package/dist/esm/kol-link.entry.js +30 -29
  408. package/dist/esm/kol-meter.entry.js +20 -22
  409. package/dist/esm/kol-modal.entry.js +37 -36
  410. package/dist/esm/kol-nav.entry.js +38 -37
  411. package/dist/esm/kol-pagination.entry.js +46 -45
  412. package/dist/esm/kol-popover-button.entry.js +30 -29
  413. package/dist/esm/kol-progress.entry.js +21 -17
  414. package/dist/esm/kol-quote.entry.js +12 -11
  415. package/dist/esm/kol-select.entry.js +42 -41
  416. package/dist/esm/kol-single-select.entry.js +54 -48
  417. package/dist/esm/kol-skip-nav.entry.js +32 -31
  418. package/dist/esm/kol-spin.entry.js +17 -16
  419. package/dist/esm/kol-split-button.entry.js +33 -32
  420. package/dist/esm/kol-table-stateful.entry.js +59 -59
  421. package/dist/esm/kol-table-stateless.entry.js +47 -47
  422. package/dist/esm/kol-tabs.entry.js +36 -38
  423. package/dist/esm/kol-textarea.entry.js +49 -46
  424. package/dist/esm/kol-toast-container.entry.js +25 -24
  425. package/dist/esm/kol-toolbar.entry.js +35 -34
  426. package/dist/esm/kol-tooltip-wc.entry.js +15 -14
  427. package/dist/esm/kol-tree-item.entry.js +32 -28
  428. package/dist/esm/kol-tree.entry.js +26 -14
  429. package/dist/esm/kol-version.entry.js +27 -26
  430. package/dist/esm/kolibri.js +5 -5
  431. package/dist/esm/{label-BRosRgdX.js → label-B-Dr7VaP.js} +3 -3
  432. package/dist/esm/{label-hints-Jn18RUT-.js → label-hints-CLMiVvfk.js} +2 -2
  433. package/dist/esm/{label-lang-segment-2_GnxjFp.js → label-lang-segment-iVD9hoM3.js} +2 -2
  434. package/dist/esm/{label-with-expert-slot-CicRes-W.js → label-with-expert-slot-BbZ9nx0l.js} +3 -3
  435. package/dist/esm/{level-CA1s1_Mf.js → level-DsQ_pcyD.js} +1 -1
  436. package/dist/esm/{link-target-FX94oqMo.js → link-target-D7lYILOV.js} +1 -1
  437. package/dist/esm/{links-DwucTqcR.js → links-IkK4zoXw.js} +2 -2
  438. package/dist/esm/loader.js +4 -4
  439. package/dist/esm/{multiple-DqrZxybx.js → multiple--ay1C1n3.js} +1 -1
  440. package/dist/esm/{number-value-B-SJ1dRo.js → number-value-Dl9-2O4r.js} +1 -1
  441. package/dist/esm/{open-DRRv1KFK.js → open-CNHJhHsy.js} +1 -1
  442. package/dist/esm/{options-DCaUcfAu.js → options-DwO32GBF.js} +2 -2
  443. package/dist/esm/{orientation-XNOCaPwy.js → orientation-ChJ0S24M.js} +1 -1
  444. package/dist/esm/{placeholder-BeLIzdJv.js → placeholder-UxmBJ4Vl.js} +1 -1
  445. package/dist/esm/{props-from-config-Ci0dILpz.js → props-from-config-ytxYrJUY.js} +1 -1
  446. package/dist/esm/{read-only-Bby9r6ZX.js → read-only-DytZ5HZJ.js} +1 -1
  447. package/dist/esm/{required-hoaT7UmZ.js → required-BriHhuO4.js} +1 -1
  448. package/dist/esm/{resolve-props-CHPFh7Tn.js → resolve-props-DTXKtzir.js} +7 -7
  449. package/dist/esm/{resolve-props-BkF1VBBB.js → resolve-props-kM9N-fzf.js} +8 -8
  450. package/dist/esm/{rows-B0x8CR7K.js → rows-I1jrTjzU.js} +1 -1
  451. package/dist/esm/{scroll-lock-D7Zo0QLt.js → scroll-lock-Bv-U2FHM.js} +2 -2
  452. package/dist/esm/{smart-button-CS_ZriPt.js → smart-button-DM5g48-g.js} +2 -2
  453. package/dist/esm/{spell-check-DzgftyqL.js → spell-check-BWCnJG5v.js} +1 -1
  454. package/dist/esm/{src-DaGhmCL1.js → src-ziOwSglN.js} +1 -1
  455. package/dist/esm/{step-Bdj89bGO.js → step-BcyhvRtu.js} +1 -1
  456. package/dist/esm/{suggestions-GEr-cvbz.js → suggestions-D0u80DtA.js} +3 -3
  457. package/dist/esm/{suggestions-Dy1X-Pc3.js → suggestions-LO267l8F.js} +2 -2
  458. package/dist/esm/test-component.entry.js +4 -3
  459. package/dist/esm/{toggle-handler-Bqoo8tCo.js → toggle-handler-mPlmvrq7.js} +10 -10
  460. package/dist/esm/{unique-nav-labels-h2KOu5Qy.js → unique-nav-labels-CxFUYSVY.js} +2 -2
  461. package/dist/esm/{unit-BUhhJbhT.js → unit-1ix-K9SD.js} +1 -1
  462. package/dist/esm/{validators-BVM40IEr.js → validators-CTjxOidB.js} +3 -2
  463. package/dist/esm/{value-string-e9pwLcS-.js → value-string-CxDz7dhD.js} +1 -1
  464. package/dist/esm/{width-CgYY17tL.js → width-C1_yZHyL.js} +1 -1
  465. package/dist/kolibri/Heading-GZb1f2pZ.js +4 -0
  466. package/dist/kolibri/api-CBPlj155.js +4 -0
  467. package/dist/kolibri/app-globals-DRl9A82c.js +4 -0
  468. package/dist/kolibri/aria-labelledby-DqJY_4G-.js +4 -0
  469. package/dist/kolibri/base-BByRnpRm.js +4 -0
  470. package/dist/kolibri/base-C7BBsrYZ.js +4 -0
  471. package/dist/kolibri/{base-D_-9Lzkd.js → base-DO0KvOv9.js} +1 -1
  472. package/dist/kolibri/{base-BDYPTFjC.js → base-Dtxcvto_.js} +1 -1
  473. package/dist/kolibri/{base-web-component-DdY5aIHN.js → base-web-component-BxXLva5d.js} +1 -1
  474. package/dist/kolibri/{base-web-component-XgI4wUyN.js → base-web-component-CC_gpyDb.js} +1 -1
  475. package/dist/kolibri/{base-web-component-BUu68byc.js → base-web-component-CfPyCJDJ.js} +1 -1
  476. package/dist/kolibri/{behavior-fGxZN96S.js → behavior-CKU2tmCj.js} +1 -1
  477. package/dist/kolibri/{behavior-DsTiTiJC.js → behavior-CsNDRS2z.js} +1 -1
  478. package/dist/kolibri/behavior-ewHvUWVk.js +4 -0
  479. package/dist/kolibri/{bem-registry-Crcs_65u.js → bem-registry-D1KgKnyz.js} +1 -1
  480. package/dist/kolibri/block-bem-D3ixJyOY.js +4 -0
  481. package/dist/kolibri/bootstrap-tgQ2nQQI.js +4 -0
  482. package/dist/kolibri/{color-eAL9I7Wq.js → color-D1gM-F2l.js} +1 -1
  483. package/dist/kolibri/common-BdSzSIXg.js +4 -0
  484. package/dist/kolibri/component-6l69Jvwl.js +4 -0
  485. package/dist/kolibri/component-B3OziaRC.js +4 -0
  486. package/dist/kolibri/{component-DHNcVTi0.js → component-By8ggItU.js} +1 -1
  487. package/dist/kolibri/component-CF8uFG0A.js +4 -0
  488. package/dist/kolibri/component-Ccv2lqNq.js +4 -0
  489. package/dist/kolibri/component-Cmi6iGfA.js +4 -0
  490. package/dist/kolibri/component-D4-NVnsT.js +4 -0
  491. package/dist/kolibri/component-D6_K50vT.js +4 -0
  492. package/dist/kolibri/component-D6lo0LzE.js +4 -0
  493. package/dist/kolibri/{component-NEw1tN3M.js → component-D9NreIlK.js} +1 -1
  494. package/dist/kolibri/component-DAk3R8NN.js +4 -0
  495. package/dist/kolibri/{component-et0GdBuf.js → component-EDDTMC-J.js} +1 -1
  496. package/dist/kolibri/contrast-BNoQruBh.js +4 -0
  497. package/dist/kolibri/{controller-Cb-96wE-.js → controller-CZcQ57AP.js} +1 -1
  498. package/dist/kolibri/dev.utils-BwYCy1rP.js +4 -0
  499. package/dist/kolibri/{devtools-nUT3JVTV.js → devtools-CGP3Nzsw.js} +1 -1
  500. package/dist/kolibri/disabled-BZXlWAgK.js +4 -0
  501. package/dist/kolibri/field-control-0TRmF7Ea.js +4 -0
  502. package/dist/kolibri/group-DapkT_Yh.js +4 -0
  503. package/dist/kolibri/has-closer-DUB0QcS9.js +4 -0
  504. package/dist/kolibri/href-CxokGOJ2.js +4 -0
  505. package/dist/kolibri/i18n-4J6U3ZDc.js +4 -0
  506. package/dist/kolibri/i18n-ePBcLlCr.js +4 -0
  507. package/dist/kolibri/id-BI0ZuK17.js +4 -0
  508. package/dist/kolibri/index-DEcM8BEc.js +6 -0
  509. package/dist/kolibri/index.esm.js +1 -1
  510. package/dist/kolibri/input-CDUCo1S5.js +4 -0
  511. package/dist/kolibri/input-container-BipAkWn4.js +4 -0
  512. package/dist/kolibri/item-B0oQTeju.js +4 -0
  513. package/dist/kolibri/item-Boe3t0Dm.js +4 -0
  514. package/dist/kolibri/item-BvnZc8uV.js +4 -0
  515. package/dist/kolibri/item-UgJ2uikD.js +4 -0
  516. package/dist/kolibri/kol-abbr.entry.js +1 -1
  517. package/dist/kolibri/kol-accordion.entry.js +1 -1
  518. package/dist/kolibri/kol-alert.entry.js +1 -1
  519. package/dist/kolibri/kol-avatar.entry.js +1 -1
  520. package/dist/kolibri/kol-badge.entry.js +1 -1
  521. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  522. package/dist/kolibri/kol-button-link.entry.js +1 -1
  523. package/dist/kolibri/kol-button.entry.js +1 -1
  524. package/dist/kolibri/kol-card.entry.js +1 -1
  525. package/dist/kolibri/kol-combobox.entry.js +1 -1
  526. package/dist/kolibri/kol-details.entry.js +1 -1
  527. package/dist/kolibri/kol-dialog.entry.js +1 -1
  528. package/dist/kolibri/kol-drawer.entry.js +1 -1
  529. package/dist/kolibri/kol-form.entry.js +1 -1
  530. package/dist/kolibri/kol-heading.entry.js +1 -1
  531. package/dist/kolibri/kol-icon.entry.js +1 -1
  532. package/dist/kolibri/kol-image.entry.js +1 -1
  533. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  534. package/dist/kolibri/kol-input-color.entry.js +1 -1
  535. package/dist/kolibri/kol-input-date.entry.js +1 -1
  536. package/dist/kolibri/kol-input-email.entry.js +1 -1
  537. package/dist/kolibri/kol-input-file.entry.js +1 -1
  538. package/dist/kolibri/kol-input-number.entry.js +1 -1
  539. package/dist/kolibri/kol-input-password.entry.js +1 -1
  540. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  541. package/dist/kolibri/kol-input-range.entry.js +1 -1
  542. package/dist/kolibri/kol-input-text.entry.js +1 -1
  543. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  544. package/dist/kolibri/kol-link-button.entry.js +1 -1
  545. package/dist/kolibri/kol-link.entry.js +1 -1
  546. package/dist/kolibri/kol-meter.entry.js +1 -1
  547. package/dist/kolibri/kol-modal.entry.js +1 -1
  548. package/dist/kolibri/kol-nav.entry.js +1 -1
  549. package/dist/kolibri/kol-pagination.entry.js +1 -1
  550. package/dist/kolibri/kol-popover-button.entry.js +1 -1
  551. package/dist/kolibri/kol-progress.entry.js +1 -1
  552. package/dist/kolibri/kol-quote.entry.js +1 -1
  553. package/dist/kolibri/kol-select.entry.js +1 -1
  554. package/dist/kolibri/kol-single-select.entry.js +1 -1
  555. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  556. package/dist/kolibri/kol-spin.entry.js +1 -1
  557. package/dist/kolibri/kol-split-button.entry.js +1 -1
  558. package/dist/kolibri/kol-table-stateful.entry.js +1 -1
  559. package/dist/kolibri/kol-table-stateless.entry.js +1 -1
  560. package/dist/kolibri/kol-tabs.entry.js +1 -1
  561. package/dist/kolibri/kol-textarea.entry.js +1 -1
  562. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  563. package/dist/kolibri/kol-toolbar.entry.js +1 -1
  564. package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
  565. package/dist/kolibri/kol-tree-item.entry.js +1 -1
  566. package/dist/kolibri/kol-tree.entry.js +1 -1
  567. package/dist/kolibri/kol-version.entry.js +1 -1
  568. package/dist/kolibri/kolibri.esm.js +1 -1
  569. package/dist/kolibri/label-B-Dr7VaP.js +4 -0
  570. package/dist/kolibri/label-hints-CLMiVvfk.js +4 -0
  571. package/dist/kolibri/label-lang-segment-iVD9hoM3.js +4 -0
  572. package/dist/kolibri/label-with-expert-slot-BbZ9nx0l.js +4 -0
  573. package/dist/kolibri/level-DsQ_pcyD.js +4 -0
  574. package/dist/kolibri/link-target-D7lYILOV.js +4 -0
  575. package/dist/kolibri/links-IkK4zoXw.js +4 -0
  576. package/dist/kolibri/multiple--ay1C1n3.js +4 -0
  577. package/dist/kolibri/number-value-Dl9-2O4r.js +4 -0
  578. package/dist/kolibri/open-CNHJhHsy.js +4 -0
  579. package/dist/kolibri/options-DwO32GBF.js +4 -0
  580. package/dist/kolibri/orientation-ChJ0S24M.js +4 -0
  581. package/dist/kolibri/placeholder-UxmBJ4Vl.js +4 -0
  582. package/dist/kolibri/{props-from-config-Ci0dILpz.js → props-from-config-ytxYrJUY.js} +1 -1
  583. package/dist/kolibri/read-only-DytZ5HZJ.js +4 -0
  584. package/dist/kolibri/required-BriHhuO4.js +4 -0
  585. package/dist/kolibri/resolve-props-DTXKtzir.js +4 -0
  586. package/dist/kolibri/resolve-props-kM9N-fzf.js +4 -0
  587. package/dist/kolibri/rows-I1jrTjzU.js +4 -0
  588. package/dist/kolibri/{scroll-lock-D7Zo0QLt.js → scroll-lock-Bv-U2FHM.js} +1 -1
  589. package/dist/kolibri/{smart-button-CS_ZriPt.js → smart-button-DM5g48-g.js} +1 -1
  590. package/dist/kolibri/spell-check-BWCnJG5v.js +4 -0
  591. package/dist/kolibri/src-ziOwSglN.js +4 -0
  592. package/dist/kolibri/step-BcyhvRtu.js +4 -0
  593. package/dist/kolibri/suggestions-D0u80DtA.js +4 -0
  594. package/dist/kolibri/{suggestions-Dy1X-Pc3.js → suggestions-LO267l8F.js} +1 -1
  595. package/dist/kolibri/test-component.entry.js +1 -1
  596. package/dist/kolibri/toggle-handler-mPlmvrq7.js +4 -0
  597. package/dist/kolibri/unique-nav-labels-CxFUYSVY.js +4 -0
  598. package/dist/kolibri/unit-1ix-K9SD.js +4 -0
  599. package/dist/kolibri/validators-CTjxOidB.js +4 -0
  600. package/dist/kolibri/value-string-CxDz7dhD.js +4 -0
  601. package/dist/kolibri/{width-CgYY17tL.js → width-C1_yZHyL.js} +1 -1
  602. package/dist/types/components/progress/component.d.ts +1 -0
  603. package/dist/types/components/single-select/component.d.ts +1 -0
  604. package/dist/types/components/table-stateful/component.d.ts +0 -1
  605. package/dist/types/components/table-stateless/component.d.ts +0 -1
  606. package/dist/types/components/tabs/component.d.ts +0 -1
  607. package/dist/types/components/tree/component.d.ts +1 -0
  608. package/dist/types/components.d.ts +4 -4
  609. package/dist/types/internal/functional-components/form-association/api.d.ts +1 -1
  610. package/dist/types/internal/functional-components/form-association/behavior.d.ts +0 -1
  611. package/dist/types/internal/functional-components/form-field/custom-suggestions.d.ts +1 -0
  612. package/dist/types/internal/functional-components/icon/api.d.ts +1 -1
  613. package/dist/types/internal/functional-components/single-select/component.d.ts +3 -0
  614. package/dist/types/internal/props/helpers/validators.d.ts +2 -1
  615. package/dist/types/internal/props/index.d.ts +1 -0
  616. package/dist/types/internal/props/label-decorative.d.ts +4 -0
  617. package/dist/types/locales/de.d.ts +1 -0
  618. package/dist/types/locales/en.d.ts +1 -0
  619. package/dist/types/schema/bem-registry.d.ts +49 -0
  620. package/dist/types/schema/i18n-keys.d.ts +29 -28
  621. package/dist/types/schema/index.d.ts +1 -1
  622. package/dist/types/schema/props/aria-details.d.ts +0 -2
  623. package/dist/types/schema/props/aria-labelledby.d.ts +1 -2
  624. package/dist/types/schema/props/label.d.ts +1 -0
  625. package/dist/types/stencil-public-runtime.d.ts +1 -1
  626. package/dist/types/utils/aria-labelledby.d.ts +0 -6
  627. package/doc/table-stateful.md +16 -16
  628. package/doc/table-stateless.md +14 -14
  629. package/package.json +6 -6
  630. package/vscode-custom-data.json +2 -2
  631. package/dist/kolibri/Heading-wrhAEuG3.js +0 -4
  632. package/dist/kolibri/api-7B_iI89k.js +0 -4
  633. package/dist/kolibri/app-globals-tRqgHq3P.js +0 -4
  634. package/dist/kolibri/aria-labelledby-CLehu03h.js +0 -4
  635. package/dist/kolibri/base-BVztEKgJ.js +0 -4
  636. package/dist/kolibri/base-C32RNC8q.js +0 -4
  637. package/dist/kolibri/behavior-DN-22cB1.js +0 -4
  638. package/dist/kolibri/block-bem-DehcAQZQ.js +0 -4
  639. package/dist/kolibri/bootstrap-DHXUvPBY.js +0 -4
  640. package/dist/kolibri/common-OzsC_6kt.js +0 -4
  641. package/dist/kolibri/component-0IO2wu9i.js +0 -4
  642. package/dist/kolibri/component-4xXBb7K-.js +0 -4
  643. package/dist/kolibri/component-BJ4gGOph.js +0 -4
  644. package/dist/kolibri/component-CPq3i3I_.js +0 -4
  645. package/dist/kolibri/component-CTOYF3q6.js +0 -4
  646. package/dist/kolibri/component-ChuoBFI-.js +0 -4
  647. package/dist/kolibri/component-Cxdi6on4.js +0 -4
  648. package/dist/kolibri/component-DWywPG_a.js +0 -4
  649. package/dist/kolibri/component-EK9BJR6z.js +0 -4
  650. package/dist/kolibri/contrast-D78VGPFR.js +0 -4
  651. package/dist/kolibri/dev.utils-Bg7nZBMk.js +0 -4
  652. package/dist/kolibri/disabled-Cqhc40CU.js +0 -4
  653. package/dist/kolibri/field-control-D2tOd14v.js +0 -4
  654. package/dist/kolibri/group-CxWsx0aJ.js +0 -4
  655. package/dist/kolibri/has-closer-B9NQY7BK.js +0 -4
  656. package/dist/kolibri/href-JqLbNBsW.js +0 -4
  657. package/dist/kolibri/i18n-Dl6Jjofb.js +0 -4
  658. package/dist/kolibri/i18n-DtLKn3Xt.js +0 -4
  659. package/dist/kolibri/id-CIYvVaNr.js +0 -4
  660. package/dist/kolibri/index-B_bJG8-2.js +0 -6
  661. package/dist/kolibri/input-Ia9Z3AP7.js +0 -4
  662. package/dist/kolibri/input-container-Y_8n5Sen.js +0 -4
  663. package/dist/kolibri/item-BKVeXzUO.js +0 -4
  664. package/dist/kolibri/item-BZtI88zF.js +0 -4
  665. package/dist/kolibri/item-BjriQHQl.js +0 -4
  666. package/dist/kolibri/item-BuqBMSYI.js +0 -4
  667. package/dist/kolibri/label-BRosRgdX.js +0 -4
  668. package/dist/kolibri/label-hints-Jn18RUT-.js +0 -4
  669. package/dist/kolibri/label-lang-segment-2_GnxjFp.js +0 -4
  670. package/dist/kolibri/label-with-expert-slot-CicRes-W.js +0 -4
  671. package/dist/kolibri/level-CA1s1_Mf.js +0 -4
  672. package/dist/kolibri/link-target-FX94oqMo.js +0 -4
  673. package/dist/kolibri/links-DwucTqcR.js +0 -4
  674. package/dist/kolibri/multiple-DqrZxybx.js +0 -4
  675. package/dist/kolibri/number-value-B-SJ1dRo.js +0 -4
  676. package/dist/kolibri/open-DRRv1KFK.js +0 -4
  677. package/dist/kolibri/options-DCaUcfAu.js +0 -4
  678. package/dist/kolibri/orientation-XNOCaPwy.js +0 -4
  679. package/dist/kolibri/placeholder-BeLIzdJv.js +0 -4
  680. package/dist/kolibri/read-only-Bby9r6ZX.js +0 -4
  681. package/dist/kolibri/required-hoaT7UmZ.js +0 -4
  682. package/dist/kolibri/resolve-props-BkF1VBBB.js +0 -4
  683. package/dist/kolibri/resolve-props-CHPFh7Tn.js +0 -4
  684. package/dist/kolibri/rows-B0x8CR7K.js +0 -4
  685. package/dist/kolibri/spell-check-DzgftyqL.js +0 -4
  686. package/dist/kolibri/src-DaGhmCL1.js +0 -4
  687. package/dist/kolibri/step-Bdj89bGO.js +0 -4
  688. package/dist/kolibri/suggestions-GEr-cvbz.js +0 -4
  689. package/dist/kolibri/toggle-handler-Bqoo8tCo.js +0 -4
  690. package/dist/kolibri/unique-nav-labels-h2KOu5Qy.js +0 -4
  691. package/dist/kolibri/unit-BUhhJbhT.js +0 -4
  692. package/dist/kolibri/validators-BVM40IEr.js +0 -4
  693. package/dist/kolibri/value-string-e9pwLcS-.js +0 -4
@@ -46,6 +46,7 @@ export default {
46
46
  pagination: 'Paginierung',
47
47
  'pagination-position-bottom': 'unten',
48
48
  'pagination-position-top': 'oben',
49
+ progress: 'Fortschritt',
49
50
  readonly: 'schreibgeschützt',
50
51
  'show-password': 'Passwort einblenden',
51
52
  'show-suggestions': 'Vorschläge anzeigen',
@@ -46,6 +46,7 @@ export default {
46
46
  pagination: 'Pagination',
47
47
  'pagination-position-bottom': 'bottom',
48
48
  'pagination-position-top': 'top',
49
+ progress: 'Progress',
49
50
  readonly: 'read-only',
50
51
  'show-password': 'Show password',
51
52
  'show-suggestions': 'Show suggestions',
@@ -282,6 +282,39 @@ const BEM = {
282
282
  'warning',
283
283
  ]),
284
284
  },
285
+ 'kol-input-checkbox': {
286
+ elements: {
287
+ 'field-control': { modifiers: new Set(['checked', 'indeterminate', 'variant-button', 'variant-default', 'variant-switch']) },
288
+ },
289
+ modifiers: new Set(['checked', 'indeterminate', 'label-align-left', 'label-align-right', 'variant-button', 'variant-default', 'variant-switch']),
290
+ },
291
+ 'kol-input-color': {
292
+ elements: {
293
+ input: { modifiers: new Set(['color']) },
294
+ },
295
+ modifiers: null,
296
+ },
297
+ 'kol-input-date': {
298
+ modifiers: null,
299
+ },
300
+ 'kol-input-email': {
301
+ modifiers: null,
302
+ },
303
+ 'kol-input-file': {
304
+ modifiers: null,
305
+ },
306
+ 'kol-input-number': {
307
+ elements: {
308
+ 'step-button': { modifiers: null },
309
+ },
310
+ modifiers: null,
311
+ },
312
+ 'kol-input-password': {
313
+ elements: {
314
+ 'password-toggle-button': { modifiers: null },
315
+ },
316
+ modifiers: null,
317
+ },
285
318
  'kol-input-radio': {
286
319
  elements: {
287
320
  input: { modifiers: null },
@@ -340,6 +373,12 @@ const BEM = {
340
373
  },
341
374
  modifiers: null,
342
375
  },
376
+ 'kol-input-text': {
377
+ elements: {
378
+ 'clear-button': { modifiers: new Set(['hidden']) },
379
+ },
380
+ modifiers: null,
381
+ },
343
382
  'kol-split-button': {
344
383
  elements: {
345
384
  button: { modifiers: null },
@@ -47,32 +47,33 @@ export var KeyEnum;
47
47
  KeyEnum[KeyEnum["pagination"] = 41] = "pagination";
48
48
  KeyEnum[KeyEnum["pagination-position-bottom"] = 42] = "pagination-position-bottom";
49
49
  KeyEnum[KeyEnum["pagination-position-top"] = 43] = "pagination-position-top";
50
- KeyEnum[KeyEnum["readonly"] = 44] = "readonly";
51
- KeyEnum[KeyEnum["show-password"] = 45] = "show-password";
52
- KeyEnum[KeyEnum["show-suggestions"] = 46] = "show-suggestions";
53
- KeyEnum[KeyEnum["sort"] = 47] = "sort";
54
- KeyEnum[KeyEnum["split-button-dropdown-label-open"] = 48] = "split-button-dropdown-label-open";
55
- KeyEnum[KeyEnum["success"] = 49] = "success";
56
- KeyEnum[KeyEnum["table-data-loading"] = 50] = "table-data-loading";
57
- KeyEnum[KeyEnum["table-data-loaded"] = 51] = "table-data-loaded";
58
- KeyEnum[KeyEnum["table-pagination-label"] = 52] = "table-pagination-label";
59
- KeyEnum[KeyEnum["table-selection"] = 53] = "table-selection";
60
- KeyEnum[KeyEnum["table-selection-all"] = 54] = "table-selection-all";
61
- KeyEnum[KeyEnum["table-selection-indeterminate"] = 55] = "table-selection-indeterminate";
62
- KeyEnum[KeyEnum["table-selection-none"] = 56] = "table-selection-none";
63
- KeyEnum[KeyEnum["table-settings"] = 57] = "table-settings";
64
- KeyEnum[KeyEnum["table-settings-apply"] = 58] = "table-settings-apply";
65
- KeyEnum[KeyEnum["table-settings-cancel"] = 59] = "table-settings-cancel";
66
- KeyEnum[KeyEnum["table-settings-column-hidable"] = 60] = "table-settings-column-hidable";
67
- KeyEnum[KeyEnum["table-settings-column-not-hidable"] = 61] = "table-settings-column-not-hidable";
68
- KeyEnum[KeyEnum["table-settings-column-width"] = 62] = "table-settings-column-width";
69
- KeyEnum[KeyEnum["table-settings-error-all-invisible"] = 63] = "table-settings-error-all-invisible";
70
- KeyEnum[KeyEnum["table-settings-move-down"] = 64] = "table-settings-move-down";
71
- KeyEnum[KeyEnum["table-settings-move-up"] = 65] = "table-settings-move-up";
72
- KeyEnum[KeyEnum["table-settings-not-move"] = 66] = "table-settings-not-move";
73
- KeyEnum[KeyEnum["table-sort-order"] = 67] = "table-sort-order";
74
- KeyEnum[KeyEnum["table-visible-range"] = 68] = "table-visible-range";
75
- KeyEnum[KeyEnum["toast-close-all"] = 69] = "toast-close-all";
76
- KeyEnum[KeyEnum["version"] = 70] = "version";
77
- KeyEnum[KeyEnum["warning"] = 71] = "warning";
50
+ KeyEnum[KeyEnum["progress"] = 44] = "progress";
51
+ KeyEnum[KeyEnum["readonly"] = 45] = "readonly";
52
+ KeyEnum[KeyEnum["show-password"] = 46] = "show-password";
53
+ KeyEnum[KeyEnum["show-suggestions"] = 47] = "show-suggestions";
54
+ KeyEnum[KeyEnum["sort"] = 48] = "sort";
55
+ KeyEnum[KeyEnum["split-button-dropdown-label-open"] = 49] = "split-button-dropdown-label-open";
56
+ KeyEnum[KeyEnum["success"] = 50] = "success";
57
+ KeyEnum[KeyEnum["table-data-loading"] = 51] = "table-data-loading";
58
+ KeyEnum[KeyEnum["table-data-loaded"] = 52] = "table-data-loaded";
59
+ KeyEnum[KeyEnum["table-pagination-label"] = 53] = "table-pagination-label";
60
+ KeyEnum[KeyEnum["table-selection"] = 54] = "table-selection";
61
+ KeyEnum[KeyEnum["table-selection-all"] = 55] = "table-selection-all";
62
+ KeyEnum[KeyEnum["table-selection-indeterminate"] = 56] = "table-selection-indeterminate";
63
+ KeyEnum[KeyEnum["table-selection-none"] = 57] = "table-selection-none";
64
+ KeyEnum[KeyEnum["table-settings"] = 58] = "table-settings";
65
+ KeyEnum[KeyEnum["table-settings-apply"] = 59] = "table-settings-apply";
66
+ KeyEnum[KeyEnum["table-settings-cancel"] = 60] = "table-settings-cancel";
67
+ KeyEnum[KeyEnum["table-settings-column-hidable"] = 61] = "table-settings-column-hidable";
68
+ KeyEnum[KeyEnum["table-settings-column-not-hidable"] = 62] = "table-settings-column-not-hidable";
69
+ KeyEnum[KeyEnum["table-settings-column-width"] = 63] = "table-settings-column-width";
70
+ KeyEnum[KeyEnum["table-settings-error-all-invisible"] = 64] = "table-settings-error-all-invisible";
71
+ KeyEnum[KeyEnum["table-settings-move-down"] = 65] = "table-settings-move-down";
72
+ KeyEnum[KeyEnum["table-settings-move-up"] = 66] = "table-settings-move-up";
73
+ KeyEnum[KeyEnum["table-settings-not-move"] = 67] = "table-settings-not-move";
74
+ KeyEnum[KeyEnum["table-sort-order"] = 68] = "table-sort-order";
75
+ KeyEnum[KeyEnum["table-visible-range"] = 69] = "table-visible-range";
76
+ KeyEnum[KeyEnum["toast-close-all"] = 70] = "toast-close-all";
77
+ KeyEnum[KeyEnum["version"] = 71] = "version";
78
+ KeyEnum[KeyEnum["warning"] = 72] = "warning";
78
79
  })(KeyEnum || (KeyEnum = {}));
@@ -1,22 +1 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- import { resolveTargets } from "../../utils/aria-labelledby";
5
- import { Log, watchValidator } from "../utils";
6
- export const validateAriaDetails = (component, host, internals, value) => {
7
- const isValid = (value) => typeof value === 'string' || typeof value === 'undefined';
8
- watchValidator(component, '_ariaDetails', isValid, new Set(['string']), value);
9
- if (!isValid(value)) {
10
- return [];
11
- }
12
- const elements = resolveTargets(host, value);
13
- if (internals) {
14
- try {
15
- internals.ariaDetailsElements = elements;
16
- }
17
- catch (_a) {
18
- }
19
- Log.debug(['WebComponent internals', internals]);
20
- }
21
- return elements;
22
- };
1
+ export {};
@@ -2,21 +2,12 @@
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
4
  import { resolveTargets } from "../../utils/aria-labelledby";
5
- import { Log, watchValidator } from "../utils";
6
- export const validateAriaLabelledby = (component, host, internals, value) => {
5
+ import { watchValidator } from "../utils";
6
+ export const validateAriaLabelledby = (component, host, value) => {
7
7
  const isValid = (value) => typeof value === 'string' || typeof value === 'undefined';
8
8
  watchValidator(component, '_ariaLabelledby', isValid, new Set(['string']), value);
9
9
  if (!isValid(value)) {
10
10
  return [];
11
11
  }
12
- const elements = resolveTargets(host, value);
13
- if (internals) {
14
- try {
15
- internals.ariaLabelledByElements = elements;
16
- }
17
- catch (_a) {
18
- }
19
- Log.debug(['WebComponent internals', internals]);
20
- }
21
- return elements;
12
+ return resolveTargets(host, value);
22
13
  };
@@ -22,15 +22,3 @@ export const resolveTargets = (host, value) => {
22
22
  };
23
23
  return ids.map(getById).filter((el) => !!el);
24
24
  };
25
- export const attachInternals = (host) => {
26
- const attach = host === null || host === void 0 ? void 0 : host.attachInternals;
27
- if (!attach)
28
- return undefined;
29
- try {
30
- const internals = attach.call(host);
31
- return internals;
32
- }
33
- catch (_a) {
34
- return undefined;
35
- }
36
- };
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- const n=(n,o)=>{const t=(null!=o?o:"").trim().split(/\s+/).filter(Boolean);if(!t.length)return[];const e=null==n?void 0:n.getRootNode();return t.map((n=>"undefined"!=typeof Document&&e instanceof Document?e.getElementById(n):"undefined"!=typeof ShadowRoot&&e instanceof ShadowRoot?e.querySelector(`#${(n=>{var o;return(null===(o=globalThis.CSS)||void 0===o?void 0:o.escape)?globalThis.CSS.escape(n):n.replace(/[^a-zA-Z0-9_-]/g,"\\$&")})(n)}`):"undefined"!=typeof document?document.getElementById(n):null)).filter((n=>!!n))},o=n=>{const o=null==n?void 0:n.attachInternals;if(o)try{return o.call(n)}catch(n){return}};export{o as a,n as r}
4
+ const o=(o,n)=>{const e=(null!=n?n:"").trim().split(/\s+/).filter(Boolean);if(!e.length)return[];const t=null==o?void 0:o.getRootNode();return e.map((o=>"undefined"!=typeof Document&&t instanceof Document?t.getElementById(o):"undefined"!=typeof ShadowRoot&&t instanceof ShadowRoot?t.querySelector(`#${(o=>{var n;return(null===(n=globalThis.CSS)||void 0===n?void 0:n.escape)?globalThis.CSS.escape(o):o.replace(/[^a-zA-Z0-9_-]/g,"\\$&")})(o)}`):"undefined"!=typeof document?document.getElementById(o):null)).filter((o=>!!o))};export{o as r}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{p as e,k as i,H as t,b as o}from"./bem-registry.js";import{a as s,F as l}from"./behavior3.js";import{d as r}from"./disabled.js";import{h as a,e as n,j as d}from"./component3.js";import{c as h,n as c,b as p,a as u,t as m}from"./props-from-config.js";import{l as v}from"./label-with-expert-slot.js";import{n as b}from"./component9.js";import{a as f}from"./tslib.es6.js";import{S as g,b as y,s as j}from"./component7.js";import{r as _}from"./aria-labelledby.js";import{a as B,c as L,n as O}from"./dev.utils.js";import{K as T,d as F}from"./events.js";import{B as N}from"./base-web-component.js";import{c as x}from"./item.js";import{c as K}from"./item2.js";import{T as k}from"./behavior.js";import{h as w}from"@stencil/core/internal/client";import{t as A}from"./i18n.js";import{c as P}from"./clsx.js";import{B as C}from"./component.js";import{T as H}from"./component10.js";import{P as D}from"./behavior4.js";import{A as I}from"./component2.js";function M(e,i){return Boolean(e)&&!0===i}function S(e){var i;return"string"==typeof e?"error":null!==(i=null==e?void 0:e._type)&&void 0!==i?i:"error"}const q=h("hideMsg",!1,c),E=h("hint","",p),$=h("infoPopover",void 0,(function(e){if("object"==typeof e&&null!==e)return e;throw new Error("Invalid info popover: "+typeof e)})),z=u(),R=h("msg",void 0,(function(i){if("string"==typeof i)try{return e(i)}catch(e){return i}return i}),(function(e){return void 0===e||("string"==typeof e?e.length>0:i(e)&&t(e._description,1))})),V=h("touched",!1,c),G={required:[v],optional:[s,r,a,q,E,$,z,R,b,n,V]},J=e=>{var{id:i,class:t,hint:o,baseClassName:s="kol-form-field"}=e,l=f(e,["id","class","hint","baseClassName"]);return o?w("span",Object.assign({class:P(`${s}__hint`,t),id:B(i||"","hint")},l),o):null},Q=e=>{var{component:i="label",id:t,baseClassName:o="kol-form-field",class:s,accessKey:l,shortKey:r,label:a,hideLabel:n,hasExpertSlot:d,omitId:h,showBadge:c=!0,readOnly:p,infoPopover:u}=e,m=f(e,["component","id","baseClassName","class","accessKey","shortKey","label","hideLabel","hasExpertSlot","omitId","showBadge","readOnly","infoPopover"]);const v=!d&&n,b=!1===c?void 0:y(l,r);return w(i,Object.assign({},m,{class:P(`${o}__label`,s),id:v||h?void 0:B(t,"label"),hidden:v,htmlFor:"legend"===i?void 0:t}),w(g,{class:`${o}__label-text`,label:d?"":null!=a?a:"",badgeText:b},w("slot",{name:"expert"})),!d&&p&&w("span",{class:`${o}__label__read-only`,"aria-hidden":"true"},"(",A("kol-readonly"),")"),!d&&u&&w("span",null,w(D,Object.assign({},u.popoverButton),w("div",{class:"kol-popover-button__popover--styled"},u.content))))},U=i=>{var t,o,{alert:s,hideMsg:l,msg:r,id:a,class:n}=i,d=f(i,["alert","hideMsg","msg","id","class"]);const h=function(i){if("string"==typeof i)try{return e(i)}catch(e){return{_description:i,_type:"error"}}return i&&"object"==typeof i&&!("_type"in i)?Object.assign(Object.assign({},i),{_type:"error"}):i}(r);return w(I,Object.assign({alert:!l&&(null!==(t=null==h?void 0:h._alert)&&void 0!==t?t:!0===s),class:P("kol-form-field__msg",l&&"visually-hidden",n),closerAriaDescriptionId:O(),handleCloserClick:()=>{},hasCloser:!1,headingId:L("alert-heading"),id:B(a,"msg"),label:"",level:0,refCloserButton:()=>{},refCloserTooltip:()=>{},type:null!==(o=null==h?void 0:h._type)&&void 0!==o?o:"error",variant:"msg"},d),(null==h?void 0:h._description)||void 0)},W=o.forBlock("kol-form-field"),X=({hideLabel:e,label:i,renderNoTooltip:t})=>!t&&!j(i)&&!0===e,Y=e=>{const i=S(e);return{[i]:!0,[`msg-type-${i}`]:!0}},Z=(e,i)=>{const{renderNoLabel:t,renderNoTooltip:o,renderNoHint:s,id:l,required:r,alert:a,disabled:n,class:h,msg:c,hideMsg:p,hideLabel:u,label:m,infoPopover:v,hint:b,accessKey:g,shortKey:_,counter:L,readOnly:O,touched:T,maxLength:F,ariaDescribedBy:N,showBadge:x,tooltipAlign:K,variant:k,component:D="div",orientation:I,refInput:S,refTooltip:q}=e,E=f(e,["renderNoLabel","renderNoTooltip","renderNoHint","id","required","alert","disabled","class","msg","hideMsg","hideLabel","label","infoPopover","hint","accessKey","shortKey","counter","readOnly","touched","maxLength","ariaDescribedBy","showBadge","tooltipAlign","variant","component","orientation","refInput","refTooltip"]),$=j(m),z=M(c,T),R=y(g,_),V=X({hideLabel:u,label:m,renderNoTooltip:o}),G="fieldset"===D;return w(C,Object.assign({component:D,block:"kol-form-field",modifiers:Object.assign({disabled:Boolean(n),required:Boolean(r),touched:Boolean(T),"hide-label":Boolean(u),"read-only":Boolean(O),"hidden-msg":Boolean(p)},z?Y(c):{}),class:P(k&&d(k,"form-field"),h),disabled:!(!G||!n)||void 0,"aria-describedby":N},E),!t&&w(Q,{component:G?"legend":"label",class:G?"kol-form-field__label--legend":void 0,id:l,hasExpertSlot:$,hideLabel:u,label:m,accessKey:g,shortKey:_,readOnly:O,showBadge:x,infoPopover:v}),w("div",{class:W("input",{"orientation-horizontal":"horizontal"===I,"orientation-vertical":"vertical"===I}),ref:S},i,V&&w("div",{class:W("tooltip")},w(H,{badgeText:R||"",label:m,align:K,id:B(l,"label"),refFloating:q}))),L&&!("soft"===L.maxLengthBehavior&&"number"!=typeof L.maxLength)&&w("div",{class:W("counter")},w("span",{"aria-hidden":"true",class:W("counter"),ref:L.visualRef}),w("span",{"aria-live":"polite",class:"visually-hidden",id:B(l,"counter"),ref:L.ariaRef})),z&&w(U,{id:l,alert:a,hideMsg:p,msg:c}),!s&&w(J,{id:l,hint:b}),"number"==typeof F&&!L&&w("span",{id:B(l,"character-limit-hint"),class:"visually-hidden"},A("kol-character-limit-hint",{placeholders:{limit:String(F)}})))};function ee({ariaDescribedBy:e,hideLabel:i,label:t}){return{title:"",autoCapitalize:"off",autoCorrect:"off","aria-describedby":(null==e?void 0:e.length)?e.join(" "):void 0,"aria-label":i&&t?m(t):void 0}}const ie=class extends N{constructor(){super(...arguments),this.tooltipBehavior=new k(N.stateLess),this.smartButton=x((()=>this.host)),this.infoPopover=K({getFlagHost:()=>this.host,getOpen:()=>!0===this.infoPopoverOpen,setOpen:e=>{this.infoPopoverOpen=e}}),this.focusEventSent=!1,this.handleChange=(e,i)=>{var t,o;e.stopPropagation(),void 0===i&&(i=e.target.value),this.emit(T.change,i),null===(o=null===(t=this._on)||void 0===t?void 0:t.onChange)||void 0===o||o.call(t,e,i)},this.handleInput=(e,i)=>{var t,o;e.stopPropagation(),void 0===i&&(i=e.target.value),this.emit(T.input,i),this.formAssociation.setFormAssociatedValue(i),null===(o=null===(t=this._on)||void 0===t?void 0:t.onInput)||void 0===o||o.call(t,e,i)},this.handleClick=e=>{var i,t;this.emit(T.click),null===(t=null===(i=this._on)||void 0===i?void 0:i.onClick)||void 0===t||t.call(i,e)},this.handleFocus=e=>{var i,t;this.focusEventSent||(this.emit(T.focus),null===(t=null===(i=this._on)||void 0===i?void 0:i.onFocus)||void 0===t||t.call(i,e),this.focusEventSent=!0),this.shared.setState("inputHasFocus",!0)},this.handleBlur=e=>{this.handleFocusLeave(e),this.shared.setState("inputHasFocus",!1)},this.handleKeyDown=e=>{var i,t;this.emit(T.keydown),null===(t=null===(i=this._on)||void 0===i?void 0:i.onKeyDown)||void 0===t||t.call(i,e)},this.setInputRef=e=>{this.tooltipAnchor=e,e&&this.isTooltipShown()&&(this.tooltipBehavior.initContext(e),this.tooltipBehavior.syncListeners(void 0,e,!0))},this.setTooltipRef=e=>{this.tooltipBehavior.setTooltipElementRef(e)}}get shared(){return this}initFormAssociation(e,i){this.formAssociation=new l(N.stateLess,{host:this.host,type:e,name:i})}syncFormField(){this.smartButton.syncListeners(),this.infoPopover.syncListeners(),this.syncAriaDetails()}destroyFormField(){this.tooltipBehavior.destroy(),this.smartButton.destroy(),this.infoPopover.destroy()}connectedCallback(){this.syncFormField(),this.tooltipAnchor&&this.isTooltipShown()&&(this.tooltipBehavior.initContext(this.tooltipAnchor),this.tooltipBehavior.syncListeners(void 0,this.tooltipAnchor,!0))}getInfoPopover(){const e=this.shared.getRenderProp("infoPopover");if(!e)return;const{_content:i}=e,t=f(e,["_content"]);return{popoverButton:this.infoPopover.getFcProps(Object.assign(Object.assign({_variant:"ghost"},t),{_hideLabel:!0,_inline:!0})),content:i}}getSmartButtonFcProps(e,i){if("object"==typeof e&&null!==e)return this.smartButton.getFcProps(Object.assign({_hideLabel:!0,_disabled:i},e),{class:"kol-input-container__smart-button"})}applyAriaDetails(e){s.apply(e,(e=>this.shared.setRenderProp("ariaDetails",e))),this.formAssociation.watchAriaDetails(e),this.syncAriaDetails()}syncAriaDetails(){var e,i,t,o;const s=null===(i=null===(e=this.host)||void 0===e?void 0:e.shadowRoot)||void 0===i?void 0:i.querySelector("input, select, textarea");if(!s||!("ariaDetailsElements"in s))return;const l=_(this.host,this.shared.getRenderProp("ariaDetails")),r=this.pushedDetailsElements;(s!==this.ariaDetailsTarget||(null!==(t=null==r?void 0:r.length)&&void 0!==t?t:0)!==l.length||null!==(o=null==r?void 0:r.some(((e,i)=>e!==l[i])))&&void 0!==o&&o)&&(this.ariaDetailsTarget=s,this.pushedDetailsElements=l,s.ariaDetailsElements=l.length?l:null)}applyDisabled(e){r.apply(e,(e=>this.shared.setRenderProp("disabled",e)))}applyHideLabel(e){a.apply(e,(e=>this.shared.setRenderProp("hideLabel",e)))}applyHideMsg(e){q.apply(e,(e=>this.shared.setRenderProp("hideMsg",e)))}applyHint(e){E.apply(e,(e=>this.shared.setRenderProp("hint",e)))}applyInfoPopover(e){$.apply(e,(e=>this.shared.setRenderProp("infoPopover",e)))}applyLabel(e){v.apply(e,(e=>this.shared.setRenderProp("label",e)),this.isRequired("label"))}applyMsg(e){R.apply(e,(e=>this.shared.setRenderProp("msg",e)))}applyName(e){b.apply(e,(e=>this.shared.setRenderProp("name",e))),this.formAssociation.watchName(e)}applyOn(e){z.apply(e,(e=>this.shared.setRenderProp("on",e)))}applySyncValueBySelector(e){this.formAssociation.watchSyncValueBySelector(e)}applyTooltipAlign(e){n.apply(null!=e?e:"top",(e=>this.shared.setRenderProp("tooltipAlign",e)))}applyTouched(e){V.apply(e,(e=>this.shared.setRenderProp("touched",e)))}get eventHost(){var e,i;return null!==(i=null===(e=this.formAssociation)||void 0===e?void 0:e.host)&&void 0!==i?i:this.host}emit(e,i){this.eventHost&&F(this.eventHost,e,i)}handleFocusLeave(e){var i,t;if(this._disabled)return;const o=this.eventHost,s=(null==o?void 0:o.shadowRoot)||o,l=(null==s?void 0:s.contains(e.relatedTarget))||o===e.relatedTarget;this.focusEventSent&&!l&&(this._touched=!0,this.emit(T.blur),null===(t=null===(i=this._on)||void 0===i?void 0:i.onBlur)||void 0===t||t.call(i,e),this.focusEventSent=!1)}getAria(){const e=this.shared;return(({id:e,msg:i,hint:t,touched:o})=>{const s="string"==typeof i?i:null==i?void 0:i._description,l=Boolean(s&&s.length>0),r="error"===S(i)&&l&&!0===o,a="string"==typeof t&&t.length>0,n=[];return l&&!0===o&&n.push(B(e,"msg")),a&&n.push(B(e,"hint")),{hasError:r,hasHint:a,ariaDescribedBy:n}})({id:e.getState("id"),msg:e.getRenderProp("msg"),hint:e.getRenderProp("hint"),touched:e.getRenderProp("touched")})}showAsAlert(){return Boolean(this.shared.getRenderProp("touched"))&&!this.shared.getState("inputHasFocus")}isTooltipShown(){const e=this.shared;return X({hideLabel:e.getRenderProp("hideLabel"),label:m(e.getRenderProp("label"))})}getLabelTooltipRefs(){return{refInput:this.setInputRef,refTooltip:this.setTooltipRef}}getFormFieldProps({class:e,accessKey:i,shortKey:t,variant:o,counter:s,maxLength:l,readOnly:r,renderNoLabel:a,renderNoTooltip:n,required:d}){const h=this.shared,c=h.getState("id"),p=h.getRenderProp("label"),u=h.getRenderProp("tooltipAlign");return this.isTooltipShown()?(this.tooltipBehavior.watchAlign(u),this.tooltipBehavior.watchBadgeText(y(i,t)||""),this.tooltipBehavior.watchId(B(c,"label")),this.tooltipBehavior.watchLabel(p)):this.tooltipBehavior.destroy(),{id:c,disabled:h.getRenderProp("disabled"),msg:h.getRenderProp("msg"),hint:h.getRenderProp("hint"),label:p,hideLabel:h.getRenderProp("hideLabel"),hideMsg:h.getRenderProp("hideMsg"),touched:h.getRenderProp("touched"),showBadge:Boolean(i)||Boolean(t),required:d,readOnly:r,accessKey:i,shortKey:t,maxLength:l,counter:s,variant:o,class:e,tooltipAlign:u,alert:this.showAsAlert(),infoPopover:this.getInfoPopover(),renderNoLabel:a,renderNoTooltip:n,refInput:n?void 0:this.setInputRef,refTooltip:this.setTooltipRef}}};export{ie as B,Z as F,J as a,Q as b,ee as c,G as f,S as g,M as i}
4
+ import{p as e,k as i,H as t,b as o}from"./bem-registry.js";import{d as s}from"./disabled.js";import{h as l,e as r,j as a}from"./component3.js";import{c as n,b as d,n as h,a as c,t as p}from"./props-from-config.js";import{l as u}from"./label-with-expert-slot.js";import{n as m}from"./component9.js";import{a as v}from"./tslib.es6.js";import{S as b,b as f,s as g}from"./component7.js";import{r as y}from"./aria-labelledby.js";import{a as j,c as _,n as B}from"./dev.utils.js";import{K as L,d as O}from"./events.js";import{B as T}from"./base-web-component.js";import{c as F}from"./item.js";import{F as N}from"./behavior3.js";import{c as x}from"./item2.js";import{T as K}from"./behavior.js";import{h as k}from"@stencil/core/internal/client";import{t as w}from"./i18n.js";import{c as A}from"./clsx.js";import{B as P}from"./component.js";import{T as C}from"./component10.js";import{P as D}from"./behavior4.js";import{A as H}from"./component2.js";function I(e,i){return Boolean(e)&&!0===i}function M(e){var i;return"string"==typeof e?"error":null!==(i=null==e?void 0:e._type)&&void 0!==i?i:"error"}const S=n("ariaDetails","",d),q=n("hideMsg",!1,h),E=n("hint","",d),$=n("infoPopover",void 0,(function(e){if("object"==typeof e&&null!==e)return e;throw new Error("Invalid info popover: "+typeof e)})),z=c(),R=n("msg",void 0,(function(i){if("string"==typeof i)try{return e(i)}catch(e){return i}return i}),(function(e){return void 0===e||("string"==typeof e?e.length>0:i(e)&&t(e._description,1))})),V=n("touched",!1,h),G={required:[u],optional:[S,s,l,q,E,$,z,R,m,r,V]},J=e=>{var{id:i,class:t,hint:o,baseClassName:s="kol-form-field"}=e,l=v(e,["id","class","hint","baseClassName"]);return o?k("span",Object.assign({class:A(`${s}__hint`,t),id:j(i||"","hint")},l),o):null},Q=e=>{var{component:i="label",id:t,baseClassName:o="kol-form-field",class:s,accessKey:l,shortKey:r,label:a,hideLabel:n,hasExpertSlot:d,omitId:h,showBadge:c=!0,readOnly:p,infoPopover:u}=e,m=v(e,["component","id","baseClassName","class","accessKey","shortKey","label","hideLabel","hasExpertSlot","omitId","showBadge","readOnly","infoPopover"]);const g=!d&&n,y=!1===c?void 0:f(l,r);return k(i,Object.assign({},m,{class:A(`${o}__label`,s),id:g||h?void 0:j(t,"label"),hidden:g,htmlFor:"legend"===i?void 0:t}),k(b,{class:`${o}__label-text`,label:d?"":null!=a?a:"",badgeText:y},k("slot",{name:"expert"})),!d&&p&&k("span",{class:`${o}__label__read-only`,"aria-hidden":"true"},"(",w("kol-readonly"),")"),!d&&u&&k("span",null,k(D,Object.assign({},u.popoverButton),k("div",{class:"kol-popover-button__popover--styled"},u.content))))},U=i=>{var t,o,{alert:s,hideMsg:l,msg:r,id:a,class:n}=i,d=v(i,["alert","hideMsg","msg","id","class"]);const h=function(i){if("string"==typeof i)try{return e(i)}catch(e){return{_description:i,_type:"error"}}return i&&"object"==typeof i&&!("_type"in i)?Object.assign(Object.assign({},i),{_type:"error"}):i}(r);return k(H,Object.assign({alert:!l&&(null!==(t=null==h?void 0:h._alert)&&void 0!==t?t:!0===s),class:A("kol-form-field__msg",l&&"visually-hidden",n),closerAriaDescriptionId:B(),handleCloserClick:()=>{},hasCloser:!1,headingId:_("alert-heading"),id:j(a,"msg"),label:"",level:0,refCloserButton:()=>{},refCloserTooltip:()=>{},type:null!==(o=null==h?void 0:h._type)&&void 0!==o?o:"error",variant:"msg"},d),(null==h?void 0:h._description)||void 0)},W=o.forBlock("kol-form-field"),X=({hideLabel:e,label:i,renderNoTooltip:t})=>!t&&!g(i)&&!0===e,Y=e=>{const i=M(e);return{[i]:!0,[`msg-type-${i}`]:!0}},Z=(e,i)=>{const{renderNoLabel:t,renderNoTooltip:o,renderNoHint:s,id:l,required:r,alert:n,disabled:d,class:h,msg:c,hideMsg:p,hideLabel:u,label:m,infoPopover:b,hint:y,accessKey:_,shortKey:B,counter:L,readOnly:O,touched:T,maxLength:F,ariaDescribedBy:N,showBadge:x,tooltipAlign:K,variant:D,component:H="div",orientation:M,refInput:S,refTooltip:q}=e,E=v(e,["renderNoLabel","renderNoTooltip","renderNoHint","id","required","alert","disabled","class","msg","hideMsg","hideLabel","label","infoPopover","hint","accessKey","shortKey","counter","readOnly","touched","maxLength","ariaDescribedBy","showBadge","tooltipAlign","variant","component","orientation","refInput","refTooltip"]),$=g(m),z=I(c,T),R=f(_,B),V=X({hideLabel:u,label:m,renderNoTooltip:o}),G="fieldset"===H;return k(P,Object.assign({component:H,block:"kol-form-field",modifiers:Object.assign({disabled:Boolean(d),required:Boolean(r),touched:Boolean(T),"hide-label":Boolean(u),"read-only":Boolean(O),"hidden-msg":Boolean(p)},z?Y(c):{}),class:A(D&&a(D,"form-field"),h),disabled:!(!G||!d)||void 0,"aria-describedby":N},E),!t&&k(Q,{component:G?"legend":"label",class:G?"kol-form-field__label--legend":void 0,id:l,hasExpertSlot:$,hideLabel:u,label:m,accessKey:_,shortKey:B,readOnly:O,showBadge:x,infoPopover:b}),k("div",{class:W("input",{"orientation-horizontal":"horizontal"===M,"orientation-vertical":"vertical"===M}),ref:S},i,V&&k("div",{class:W("tooltip")},k(C,{badgeText:R||"",label:m,align:K,id:j(l,"label"),refFloating:q}))),L&&!("soft"===L.maxLengthBehavior&&"number"!=typeof L.maxLength)&&k("div",{class:W("counter")},k("span",{"aria-hidden":"true",class:W("counter"),ref:L.visualRef}),k("span",{"aria-live":"polite",class:"visually-hidden",id:j(l,"counter"),ref:L.ariaRef})),z&&k(U,{id:l,alert:n,hideMsg:p,msg:c}),!s&&k(J,{id:l,hint:y}),"number"==typeof F&&!L&&k("span",{id:j(l,"character-limit-hint"),class:"visually-hidden"},w("kol-character-limit-hint",{placeholders:{limit:String(F)}})))};function ee({ariaDescribedBy:e,hideLabel:i,label:t}){return{title:"",autoCapitalize:"off",autoCorrect:"off","aria-describedby":(null==e?void 0:e.length)?e.join(" "):void 0,"aria-label":i&&t?p(t):void 0}}const ie=class extends T{constructor(){super(...arguments),this.tooltipBehavior=new K(T.stateLess),this.smartButton=F((()=>this.host)),this.infoPopover=x({getFlagHost:()=>this.host,getOpen:()=>!0===this.infoPopoverOpen,setOpen:e=>{this.infoPopoverOpen=e}}),this.focusEventSent=!1,this.handleChange=(e,i)=>{var t,o;e.stopPropagation(),void 0===i&&(i=e.target.value),this.emit(L.change,i),null===(o=null===(t=this._on)||void 0===t?void 0:t.onChange)||void 0===o||o.call(t,e,i)},this.handleInput=(e,i)=>{var t,o;e.stopPropagation(),void 0===i&&(i=e.target.value),this.emit(L.input,i),this.formAssociation.setFormAssociatedValue(i),null===(o=null===(t=this._on)||void 0===t?void 0:t.onInput)||void 0===o||o.call(t,e,i)},this.handleClick=e=>{var i,t;this.emit(L.click),null===(t=null===(i=this._on)||void 0===i?void 0:i.onClick)||void 0===t||t.call(i,e)},this.handleFocus=e=>{var i,t;this.focusEventSent||(this.emit(L.focus),null===(t=null===(i=this._on)||void 0===i?void 0:i.onFocus)||void 0===t||t.call(i,e),this.focusEventSent=!0),this.shared.setState("inputHasFocus",!0)},this.handleBlur=e=>{this.handleFocusLeave(e),this.shared.setState("inputHasFocus",!1)},this.handleKeyDown=e=>{var i,t;this.emit(L.keydown),null===(t=null===(i=this._on)||void 0===i?void 0:i.onKeyDown)||void 0===t||t.call(i,e)},this.setInputRef=e=>{this.tooltipAnchor=e,e&&this.isTooltipShown()&&(this.tooltipBehavior.initContext(e),this.tooltipBehavior.syncListeners(void 0,e,!0))},this.setTooltipRef=e=>{this.tooltipBehavior.setTooltipElementRef(e)}}get shared(){return this}initFormAssociation(e,i){this.formAssociation=new N(T.stateLess,{host:this.host,type:e,name:i})}syncFormField(){this.smartButton.syncListeners(),this.infoPopover.syncListeners(),this.syncAriaDetails()}destroyFormField(){this.tooltipBehavior.destroy(),this.smartButton.destroy(),this.infoPopover.destroy()}connectedCallback(){this.syncFormField(),this.tooltipAnchor&&this.isTooltipShown()&&(this.tooltipBehavior.initContext(this.tooltipAnchor),this.tooltipBehavior.syncListeners(void 0,this.tooltipAnchor,!0))}getInfoPopover(){const e=this.shared.getRenderProp("infoPopover");if(!e)return;const{_content:i}=e,t=v(e,["_content"]);return{popoverButton:this.infoPopover.getFcProps(Object.assign(Object.assign({_variant:"ghost"},t),{_hideLabel:!0,_inline:!0})),content:i}}getSmartButtonFcProps(e,i){if("object"==typeof e&&null!==e)return this.smartButton.getFcProps(Object.assign({_hideLabel:!0,_disabled:i},e),{class:"kol-input-container__smart-button"})}applyAriaDetails(e){S.apply(e,(e=>this.shared.setRenderProp("ariaDetails",e))),this.syncAriaDetails()}syncAriaDetails(){var e,i,t,o;const s=null===(i=null===(e=this.host)||void 0===e?void 0:e.shadowRoot)||void 0===i?void 0:i.querySelector("input, select, textarea");if(!s||!("ariaDetailsElements"in s))return;const l=y(this.host,this.shared.getRenderProp("ariaDetails")),r=this.pushedDetailsElements;(s!==this.ariaDetailsTarget||(null!==(t=null==r?void 0:r.length)&&void 0!==t?t:0)!==l.length||null!==(o=null==r?void 0:r.some(((e,i)=>e!==l[i])))&&void 0!==o&&o)&&(this.ariaDetailsTarget=s,this.pushedDetailsElements=l,s.ariaDetailsElements=l.length?l:null)}applyDisabled(e){s.apply(e,(e=>this.shared.setRenderProp("disabled",e)))}applyHideLabel(e){l.apply(e,(e=>this.shared.setRenderProp("hideLabel",e)))}applyHideMsg(e){q.apply(e,(e=>this.shared.setRenderProp("hideMsg",e)))}applyHint(e){E.apply(e,(e=>this.shared.setRenderProp("hint",e)))}applyInfoPopover(e){$.apply(e,(e=>this.shared.setRenderProp("infoPopover",e)))}applyLabel(e){u.apply(e,(e=>this.shared.setRenderProp("label",e)),this.isRequired("label"))}applyMsg(e){R.apply(e,(e=>this.shared.setRenderProp("msg",e)))}applyName(e){m.apply(e,(e=>this.shared.setRenderProp("name",e))),this.formAssociation.watchName(e)}applyOn(e){z.apply(e,(e=>this.shared.setRenderProp("on",e)))}applySyncValueBySelector(e){this.formAssociation.watchSyncValueBySelector(e)}applyTooltipAlign(e){r.apply(null!=e?e:"top",(e=>this.shared.setRenderProp("tooltipAlign",e)))}applyTouched(e){V.apply(e,(e=>this.shared.setRenderProp("touched",e)))}get eventHost(){var e,i;return null!==(i=null===(e=this.formAssociation)||void 0===e?void 0:e.host)&&void 0!==i?i:this.host}emit(e,i){this.eventHost&&O(this.eventHost,e,i)}handleFocusLeave(e){var i,t;if(this._disabled)return;const o=this.eventHost,s=(null==o?void 0:o.shadowRoot)||o,l=(null==s?void 0:s.contains(e.relatedTarget))||o===e.relatedTarget;this.focusEventSent&&!l&&(this._touched=!0,this.emit(L.blur),null===(t=null===(i=this._on)||void 0===i?void 0:i.onBlur)||void 0===t||t.call(i,e),this.focusEventSent=!1)}getAria(){const e=this.shared;return(({id:e,msg:i,hint:t,touched:o})=>{const s="string"==typeof i?i:null==i?void 0:i._description,l=Boolean(s&&s.length>0),r="error"===M(i)&&l&&!0===o,a="string"==typeof t&&t.length>0,n=[];return l&&!0===o&&n.push(j(e,"msg")),a&&n.push(j(e,"hint")),{hasError:r,hasHint:a,ariaDescribedBy:n}})({id:e.getState("id"),msg:e.getRenderProp("msg"),hint:e.getRenderProp("hint"),touched:e.getRenderProp("touched")})}showAsAlert(){return Boolean(this.shared.getRenderProp("touched"))&&!this.shared.getState("inputHasFocus")}isTooltipShown(){const e=this.shared;return X({hideLabel:e.getRenderProp("hideLabel"),label:p(e.getRenderProp("label"))})}getLabelTooltipRefs(){return{refInput:this.setInputRef,refTooltip:this.setTooltipRef}}getFormFieldProps({class:e,accessKey:i,shortKey:t,variant:o,counter:s,maxLength:l,readOnly:r,renderNoLabel:a,renderNoTooltip:n,required:d}){const h=this.shared,c=h.getState("id"),p=h.getRenderProp("label"),u=h.getRenderProp("tooltipAlign");return this.isTooltipShown()?(this.tooltipBehavior.watchAlign(u),this.tooltipBehavior.watchBadgeText(f(i,t)||""),this.tooltipBehavior.watchId(j(c,"label")),this.tooltipBehavior.watchLabel(p)):this.tooltipBehavior.destroy(),{id:c,disabled:h.getRenderProp("disabled"),msg:h.getRenderProp("msg"),hint:h.getRenderProp("hint"),label:p,hideLabel:h.getRenderProp("hideLabel"),hideMsg:h.getRenderProp("hideMsg"),touched:h.getRenderProp("touched"),showBadge:Boolean(i)||Boolean(t),required:d,readOnly:r,accessKey:i,shortKey:t,maxLength:l,counter:s,variant:o,class:e,tooltipAlign:u,alert:this.showAsAlert(),infoPopover:this.getInfoPopover(),renderNoLabel:a,renderNoTooltip:n,refInput:n?void 0:this.setInputRef,refTooltip:this.setTooltipRef}}};export{ie as B,Z as F,J as a,Q as b,ee as c,G as f,M as g,I as i}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as t}from"./aria-labelledby.js";import{I as e,L as o,p as l,b as i}from"./bem-registry.js";import{h as s,Fragment as n,forceUpdate as a}from"@stencil/core/internal/client";import{B as r}from"./base-web-component.js";import{c}from"./item.js";import{c as d}from"./item-pool.js";import{c as h}from"./item3.js";import{c as b,e as u,n as p,a as v,r as f,t as m,C as y}from"./props-from-config.js";import{l as g}from"./label-lang-segment.js";import{v as k,j}from"./component3.js";import{c as C,d as S,e as w}from"./component-names.js";import{t as _}from"./i18n.js";import{B as x}from"./component.js";import{B as O}from"./component9.js";import{I as $}from"./component5.js";import{L as F}from"./component6.js";import{r as L}from"./component7.js";import{S as I}from"./component11.js";import{T as D}from"./component10.js";import{a as T}from"./tslib.es6.js";import{n as z,c as A}from"./dev.utils.js";import{d as E,K as M}from"./events.js";import{A as B}from"./component2.js";import{l as H}from"./level.js";import{c as K}from"./element-interaction.js";import{u as N,l as P,d as W,D as R}from"./scroll-lock.js";import{h as q}from"./tooltip-open-tracking.js";import{d as U,w as V}from"./width.js";import{r as G,C as J}from"./component8.js";import{T as Q}from"./behavior.js";import{C as X}from"./keyboard.js";const Y=(l,i,s,n)=>{const a=t=>"string"==typeof t||void 0===t;if(e(l,"_ariaLabelledby",a,new Set(["string"]),n),!a(n))return[];const r=t(i,n);if(s){try{s.ariaLabelledByElements=r}catch(t){}o.debug(["WebComponent internals",s])}return r},Z=t=>"number"==typeof t&&Number.isInteger(t)&&t>=0,tt=b("fixedCols",[0,0],(t=>u(t)),(t=>2===t.length&&t.every(Z))),et=b("hasSettingsMenu",!1,p),ot=v();function lt(t){const e="string"==typeof t?l(t):t;if(Array.isArray(e))return e;throw new Error("Invalid table data: expected an array of row objects.")}function it(t){return t.every((t=>"object"==typeof t&&null!==t))}const st=b("data",[],lt,it),nt=b("dataFoot",[],lt,it),at=t=>Array.isArray(t)&&t.every((t=>Array.isArray(t))),rt=b("headers",{horizontal:[],vertical:[]},(function(t){const e="string"==typeof t?l(t):t;if("object"!=typeof e||null===e)throw new Error("Invalid table headers: expected an object.");const{horizontal:o=[],vertical:i=[]}=e;if(!at(o)||!at(i))throw new Error("Invalid table headers: horizontal and vertical must be arrays of header rows.");return{horizontal:o,vertical:i}}),(function({horizontal:t,vertical:e}){return[...t,...e].every((t=>t.every((t=>void 0===t.width||"number"==typeof t.width))))})),ct=b("loading",!1,p),dt=b("selection",!1,(function(t){const e="string"==typeof t?l(t):t;if("object"==typeof e&&null!==e)return e;throw new Error("Invalid table selection: expected an object.")}),(function(t){return!1===t||"function"==typeof t.label&&(!t.selectedKeys||Array.isArray(t.selectedKeys))})),ht={required:[g,st],optional:[tt,et,ot,nt,rt,ct,dt,k]},bt=t=>t.flatMap((t=>t.filter((t=>"string"==typeof t.key||"function"==typeof t.render)))),ut=t=>{const e=bt(t.horizontal);if(e.length>0)return{cells:e,horizontal:!0};const o=bt(t.vertical);return{cells:o,horizontal:0===o.length}},pt=(t,e)=>{let o=0;return Array.isArray(t)&&t.forEach((t=>{var l;o+=null!==(l=t[e])&&void 0!==l?l:1})),o},vt=(t,e)=>{const o=Math.max(0,...t.map((t=>pt(t,"colSpan"))));return 0===o?e.length:o},ft=t=>{var e;return null!==(e=null==t?void 0:t.reduce(((t,e)=>"visible"in e&&!1===e.visible?t:t+(e.colSpan||1)),0))&&void 0!==e?e:0},mt=(t,e,o,l)=>{if(void 0!==l&&!e)return l<t[0]?"left":t[1]>0&&l>=o-t[1]?"right":void 0},yt=(t,e,o,l)=>{var i,s,n,a,r,c;const d=[];for(let a=0;a<e;a++)"left"===mt(o,l,e,a)&&(d[a]=(null!==(i=d[a-1])&&void 0!==i?i:0)+(null!==(n=null===(s=t[a-1])||void 0===s?void 0:s.width)&&void 0!==n?n:0));for(let i=e-1;i>=0;i--)"right"===mt(o,l,e,i)&&(d[i]=(null!==(a=d[i+1])&&void 0!==a?a:0)+(null!==(c=null===(r=t[i+1])||void 0===r?void 0:r.width)&&void 0!==c?c:0));return d},gt=(t,e,o,l)=>{const i=void 0===e?void 0:t[e];return o&&l?`calc( var(--kol-table-selection-col-width) + ${i}px)`:`${i}px`},kt=(t,e,o,l)=>{if(0===(e.horizontal?t.horizontal:t.vertical).length)return;const i=e.cells[o];return(null==i?void 0:i.type)===l?i:void 0},jt=({data:t,dataFoot:e,headers:o,isFoot:l,noEntriesLabel:i,primaryHeaders:s})=>{const n=vt(o.horizontal,t),a=s.cells;let r=((t,e,o)=>{const l=Math.max(0,...t.map((t=>pt(t,"rowSpan"))));return 0===l?e.length:l-o})(o.vertical,t,e.length),c=0;l&&(c=r,r+=e.length);const d=[],h=[],b=[];o.vertical.forEach(((t,e)=>{h[e]=0,b[e]=[]}));for(let i=c;i<r;i++){const r=[];o.vertical.forEach(((t,e)=>{let o=0;if(b[e].forEach((t=>o+=t)),o<=i){const l=t[i-o+h[e]];if("object"==typeof l){r.push(Object.assign(Object.assign({},l),{headerCell:!0,data:{}}));let t=1;if("number"==typeof l.rowSpan&&l.rowSpan>1&&(t=l.rowSpan),b[e].push(t),"number"==typeof l.colSpan&&l.colSpan>1)for(let o=1;o<l.colSpan;o++)b[e+o].push(t);h[e]++}}}));for(let o=0;o<n;o++)if(s.horizontal){const s=l?e[i-c]:t[i],n=a[o];"object"==typeof n&&null!==n&&"object"==typeof s&&null!==s&&r.push(Object.assign(Object.assign({},n),{colIndex:o,colSpan:void 0,rowSpan:void 0,data:s,label:s[n.key]}))}else{const e=a[i];"object"==typeof e&&null!==e&&"object"==typeof t[o]&&null!==t[o]&&r.push(Object.assign(Object.assign({},e),{colIndex:o,colSpan:void 0,rowSpan:void 0,data:t[o],label:t[o][e.key]}))}d.push(r)}if(0===t.length){let t=ft(o.horizontal[0]),e=0;o.vertical.length>0&&(t-=o.vertical.length,o.vertical[0].forEach((t=>{e+=t.rowSpan||1})));const l={colSpan:t,label:i,render:void 0,rowSpan:Math.max(e,1)};0===d.length?d.push([l]):d[0].push(l)}return d},Ct=({horizontal:t,vertical:e})=>{const o=t.flatMap((t=>t.filter((t=>!1!==t.visible&&void 0!==t.width&&t.width>0)).map((t=>t.width)))),l=[...e.flatMap((t=>t.filter((t=>void 0!==t.width&&t.width>0)).map((t=>t.width)))),...o];return 0===l.length?"0px":1===l.length?`${l[0]}px`:`calc(${l.map((t=>`${t}px`)).join(" + ")})`},St=t=>void 0===t?[]:Array.isArray(t)?t:[t],wt=t=>{var e;return null!==(e=t?t.keyPropertyName:void 0)&&void 0!==e?e:"id"},_t=t=>{const e=t?St(t.selectedKeys):[];return{disabledKeys:new Set((t?St(t.disabledKeys):[]).map(String)),keyPropertyName:wt(t),selectedKeys:e,selectedKeysSet:new Set(e.map(String))}},xt=(t,e)=>t.filter((t=>!e.disabledKeys.has(String(t[e.keyPropertyName])))),Ot=i.forBlock("kol-table"),$t=Ot("body"),Ft=Ot("cell-actions"),Lt=Ot("cell-states"),It=Ot("footer"),Dt=Ot("head"),Tt=Ot("head-row"),zt=Ot("scroll-container"),At=Ot("selection-icon"),Et=Ot("selection-input-tooltip"),Mt=Ot("sort"),Bt=Ot("sort-button"),Ht=Ot("sort-order"),Kt=Ot("table"),Nt=`${Ot("focus-element")} ${Ot("caption")}`,Pt="caption",Wt=(t,e)=>mt(t.fixedCols,t.stickyColsDisabled,t.maxCols,e),Rt=(t,e,o)=>({left:"left"===e?gt(t.fixedOffsets,o,!0,!1!==t.selection):void 0,right:"right"===e?gt(t.fixedOffsets,o,!1,!1!==t.selection):void 0}),qt=(t,e,o)=>{var l,i;return null!==(i=t.primaryHeaders.horizontal&&(null===(l=e[0])||void 0===l?void 0:l.data)?t.rowKeys.get(e[0].data):void 0)&&void 0!==i?i:String(o)},Ut=t=>{const e=_("kol-sort");return"number"==typeof t&&t>0?`${e} – ${_("kol-table-sort-order").replace("{{order}}",`${t}`)}`:e},Vt=(t,e,o,l,i)=>{if(!1===e.visible)return"";const n=!1!==(null==e?void 0:e.sortable)&&"string"==typeof e.sortDirection;let a="none",r="kolicon-sort-neutral";if(n&&e.sortDirection)switch(e.sortDirection){case"ASC":r="kolicon-sort-asc",a="ascending";break;case"DESC":r="kolicon-sort-desc",a="descending";break;default:a="none"}const c=i?"row":"number"==typeof e.colSpan&&e.colSpan>1?"colgroup":"col",d="number"==typeof e.sortOrder&&e.sortOrder>0?e.sortOrder:void 0,h=void 0!==e.width?`${e.width}px`:void 0,b=Wt(t,l),{left:u,right:p}=Rt(t,b,l),v=e.textAlign,f=n?e.sortDirection:void 0;return s("th",{key:`${o}-${l}-${e.label}`,class:Ot("cell",{[a]:!0,"align-center":"center"===v,"align-justify":"justify"===v,"align-left":"left"===v,"align-right":"right"===v,header:!0,"sticky-left":"left"===b,"sticky-right":"right"===b}),scope:c,colSpan:e.colSpan,rowSpan:e.rowSpan,style:{width:h,left:u,right:p},"aria-sort":a,"data-sort":f?`sort-${f}`:void 0},f?s("span",{class:Mt},s(O,Object.assign({},t.getButtonFcProps(`sort-${i?"vertical":"horizontal"}-${o}-${l}`,{_icons:{right:r},_label:e.label,_ariaDescription:Ut(d),_on:{onClick:o=>{t.handleSort(o,{key:e.key,currentSortDirection:f})}}},{class:Bt}))),d&&s("span",{"aria-hidden":"true",class:Ht},d)):e.label)},Gt=(t,e,o,l,i=!1)=>s("tr",{class:Ot("row",{body:!i,footer:i}),key:`row-${qt(t,e,o)}`},((t,e,o)=>{var l;const{handleSelectionChange:i,selection:n,selectionModel:a}=t;if(!n)return"";const r=null===(l=e[0])||void 0===l?void 0:l.data;if(!r)return"";const c=r[a.keyPropertyName],d=n.multiple||void 0===n.multiple,h=String(c),b=a.selectedKeysSet.has(h),u=a.disabledKeys.has(h),p=n.label(r),v={name:"selection",checked:b,disabled:u,id:String(c),"aria-label":p};return s("td",{key:`tbody-${o}-selection`,class:Ot("cell",{selection:!0})},s("div",{class:Ot("selection",{checked:b})},d?s("label",{class:Ot("selection-label",{disabled:u})},s($,{class:At,icons:"kolicon "+(b?"kolicon-check":""),label:""}),s("input",Object.assign({class:Ot("selection-input",{checkbox:!0})},v,{type:"checkbox",onInput:t=>{const e=b?a.selectedKeys.filter((t=>String(t)!==h)):[...a.selectedKeys,c];i(t,e)}}))):s("label",{class:Ot("selection-label")},s("input",Object.assign({class:Ot("selection-input",{radio:!0})},v,{type:"radio",onInput:t=>{i(t,[c])}}))),s("div",{class:Et},s(D,{label:p,badgeText:"",id:`${c}-label`,refFloating:()=>{}}))))})(t,e,o),e.map(((e,i)=>((t,e,o,l,i)=>{if(!1===e.visible)return"";let n=`${o}-${l}-${e.label}`;if(e.data){const i=t.rowKeys.get(e.data);n=i?`${i}-${t.primaryHeaders.horizontal?l:o}`:n}if(e.headerCell)return Vt(t,e,o,l,i);const a="function"!=typeof e.render&&e.label===t.translateNoEntries,r=kt(t.headers,t.primaryHeaders,l,"action"),c=Boolean(r&&e.data),d=kt(t.headers,t.primaryHeaders,l,"state"),h=Boolean(d&&e.data),b=Wt(t,l),{left:u,right:p}=Rt(t,b,e.colIndex),v="function"==typeof e.render,f=e.textAlign;return s("td",{key:`cell-${n}-${t.settingsChangedCounter}`,class:Ot("cell",{actions:c,"align-center":"center"===f,"align-justify":"justify"===f,"align-left":"left"===f,"align-right":"right"===f,body:!0,states:h,"sticky-left":"left"===b,"sticky-right":"right"===b}),"aria-atomic":a?"false":void 0,"aria-live":a?"polite":void 0,"aria-relevant":a?"text":void 0,colSpan:e.colSpan,rowSpan:e.rowSpan,style:{textAlign:f,left:u,right:p},ref:v?o=>t.handleRenderCell(e,o):void 0},c&&r&&e.data?((t,e,o,l)=>s("div",{class:Ft},e.actions(o).map(((e,o)=>{const i=`action-${l}-${o}`;return"button"===e.type?s("span",{key:i},s(O,Object.assign({},t.getButtonFcProps(i,e)))):"link"===e.type?s("span",{key:i},s(F,Object.assign({},t.getLinkFcProps(i,e)))):null}))))(t,r,e.data,n):h&&d&&e.data?((t,e,o)=>{const l=t.key;if(!l)return"";const i=e[l];return i?s("div",{class:Lt},i.map(((t,e)=>"badge"===t.type?s(C,Object.assign({key:`state-${o}-${e}`},t)):null))):""})(d,e.data,n):v?"":e.label)})(t,e,o,i,l)))),Jt=(t,e,o)=>{const l=t.headers.vertical.length+ft(null==o?void 0:o[0])+(t.selection?1:0);return s("tr",{"aria-hidden":"true",class:Ot("spacer",{[e]:!0})},s("td",{class:Ot("spacer-line",{[e]:!0}),colSpan:l}))},Qt=t=>{const e=f(ht,t),{data:o,dataFoot:l,externalLabelElements:i,fixedCols:a,hasScrollbar:r,hasSettingsMenu:c,headers:d,label:h,loading:b,refScrollContainer:u,refTable:p,selection:v,stickyColsDisabled:y,variant:g}=e,k=_("kol-no-entries"),C=ut(d),S=vt(d.horizontal,o),w=Object.assign(Object.assign({},e),{fixedOffsets:yt(C.cells,S,a,y),maxCols:S,primaryHeaders:C,selectionModel:_t(v),translateNoEntries:k}),O=jt({data:o,dataFoot:l,headers:d,isFoot:!1,noEntriesLabel:k,primaryHeaders:C}),F=0===i.length;return s(x,{block:"kol-table",class:j(g,"table")},c&&t.renderSettings(d.horizontal),s("div",{ref:u,class:zt,tabindex:r?F?"-1":"0":void 0},s("table",{ref:p,"aria-labelledby":F?Pt:void 0,class:Kt,style:{minWidth:Ct(d)}},F&&s("caption",{class:Nt,id:Pt,ref:t=>{t&&(r?t.tabIndex=0:t.removeAttribute("tabindex"))}},L(h)),s("thead",{class:Dt},[d.horizontal.map(((t,e)=>s("tr",{class:Tt,key:`thead-${e}`},v&&(t=>{const{data:e,handleSelectionChange:o,selection:l,selectionModel:i}=t;if(!l)return s("td",{class:Ot("cell",{header:!0}),key:"thead-0"});if(!1===l.multiple)return s("th",{scope:"col",key:"thead-0-selection",class:Ot("cell",{header:!0,selection:!0})},s("span",{class:"visually-hidden"},_("kol-table-selection")));const n=i.selectedKeys.filter((t=>!i.disabledKeys.has(String(t)))).length,a=n===xt(e,i).length,r=0!==n&&!a;let c;return c=_(0===n?"kol-table-selection-all":a&&!r?"kol-table-selection-none":"kol-table-selection-indeterminate"),s("th",{scope:"col",key:"thead-0-selection",class:Ot("cell",{header:!0,selection:!0})},s("span",{class:"visually-hidden"},_("kol-table-selection")),s("div",{class:Ot("selection",{checked:a,indeterminate:r})},s("label",{class:Ot("selection-label")},s($,{class:At,icons:"kolicon "+(r?"kolicon-minus":a?"kolicon-check":""),label:""}),s("input",{class:Ot("selection-input",{checkbox:!0}),name:"selection",checked:a&&!r,indeterminate:r,"aria-label":c,type:"checkbox",onInput:t=>{o(t,((t,e,o)=>{const l=e.selectedKeys.filter((t=>e.disabledKeys.has(String(t))));return o&&l.push(...xt(t,e).map((t=>null==t?void 0:t[e.keyPropertyName]))),l})(e,i,!a))}})),s("div",{class:Et},s(D,{label:c,badgeText:"",refFloating:()=>{}}))))})(w),0===e&&(({headers:t})=>{const{horizontal:e,vertical:o}=t;if(0===e.length||0===o.length)return s(n,null);const l=o.reduce(((t,e)=>{var o,l;return t+(null!==(l=null===(o=null==e?void 0:e[0])||void 0===o?void 0:o.width)&&void 0!==l?l:0)}),0);return s("td",{"aria-hidden":"true",colSpan:o.length,rowSpan:e.length,style:l>0?{width:`${l}px`}:void 0})})(w),Array.isArray(t)&&t.map(((t,o)=>Vt(w,t,e,o,!1)))))),Jt(w,"head",d.horizontal)]),s("tbody",{class:$t},s("div",{class:Ot("loader",{shown:b})},s(I,{label:_(b?"kol-table-data-loading":"kol-table-data-loaded").replace("{{caption}}",m(h)),show:b,variant:"cycle"})),O.map(((t,e)=>Gt(w,t,e,!0)))),(t=>{const{dataFoot:e,headers:o,primaryHeaders:l,translateNoEntries:i}=t;if(0===e.length)return null;const n=jt({data:e,dataFoot:e,headers:o,isFoot:!0,noEntriesLabel:i,primaryHeaders:l}),a=vt(o.horizontal,e),r=Object.assign(Object.assign({},t),{fixedOffsets:yt(l.cells,a,t.fixedCols,t.stickyColsDisabled),maxCols:a});return s("tfoot",{class:It},[Jt(t,"foot",n),n.map(((t,e)=>Gt(r,t,e,!0,!0)))])})(w))))},Xt=({dialog:t,card:e},o)=>s(R,Object.assign({},t),e?s(J,Object.assign({},e),o):o),Yt=i.forBlock("kol-table")("settings"),Zt=t=>Number.isFinite(t)&&void 0!==t&&t>0?t:void 0,te=()=>{},ee=(t,e)=>{const o=_("kol-table-settings"),l=_("kol-table-settings-cancel"),i=_("kol-table-settings-apply"),n=_("kol-table-settings-error-all-invisible");let a,h=!1,b=!1;const u=()=>{h=!0,e()},p=d((()=>c(t)),(t=>t.syncListeners()),(t=>t.destroy())),v=((t,e)=>{const o=K(),l=K(),i=new Q(r.stateLess),s=z(),n=A("dialog-heading"),c={};let d,h=!0,b={};const u=t=>!a||E(a,t),p=()=>{var t,e;null===(e=null===(t=o.el)||void 0===t?void 0:t.close)||void 0===e||e.call(t)},v=t=>{var e;q(t),t.defaultPrevented||(null===(e=b.onCancel)||void 0===e||e.call(b,t),t.defaultPrevented||u(M.cancel)||t.preventDefault())},f=t=>{var e;t.target===o.el&&(N(c),null===(e=b.onClose)||void 0===e||e.call(b),u(M.close))},k=()=>{i.hideTooltip(),p(),u(M.close)};return{getFcProps:e=>{var a,r,c;let u="",p=0,j="blank",C="100%";g.apply(e.label,(t=>{u=t})),H.apply(null!==(a=e.level)&&void 0!==a?a:0,(t=>{p=t})),U.apply(e.on,(t=>{b=t})),y.apply(null!==(r=e.variant)&&void 0!==r?r:"blank",(t=>{j=t})),V.apply(null!==(c=e.width)&&void 0!==c?c:"100%",(t=>{C=t}));const S="card"===j;return S&&!d&&(d=G(t()),i.componentWillLoad({label:d.label,align:d.tooltipAlign})),{dialog:{blockClass:W(j),handleCancel:v,handleClose:f,label:m(u),labelledBy:S?n:void 0,modal:h,refDialog:o,width:C},card:S&&d?{ariaDescriptionId:s,closeButtonProps:d,handleClose:k,hasCloser:!0,headingId:n,label:u,level:p,refCloseButton:l,refTooltip:i.setTooltipElementRef}:void 0}},show:t=>{var l,i;const s=o.el;(null==s?void 0:s.open)||(h!==t&&(h=t,e()),t?(null===(l=null==s?void 0:s.showModal)||void 0===l||l.call(s),s&&P(c)):null===(i=null==s?void 0:s.show)||void 0===i||i.call(s))},close:p,syncListeners:()=>{l.el&&i.syncListeners(void 0,l.el,!0)},destroy:()=>{p(),N(c),i.destroy()}}})(t,u),f=A("alert-heading"),k=z();let j,C=[],x=[],$=null;const F=()=>{var t;return null!==(t=x[x.length-1])&&void 0!==t?t:[]},L=t=>{x=x.map(((e,o,l)=>o===l.length-1?t:e)),u()},I=(t,e)=>{const o=[...F()],l=o.findIndex((e=>e.key===t));if(-1===l)return;let i;if("up"===e){if(0===l)return;i=l-1}else{if(l===o.length-1)return;i=l+1}const[s]=o.splice(l,1);o.splice(i,0,s),L(o)},D=t=>{if(t.preventDefault(),!F().some((t=>!1!==t.visible)))return $=n,void u();if(a){$=null,C=x.map((t=>t.map((t=>Object.assign({},t))))),u();const t=x.map((t=>t.map((t=>{const e=t,{hidable:o,resizable:l,sortable:i,visible:s,width:n}=e,a=T(e,["hidable","resizable","sortable","visible","width"]),r=Object.assign({},a);return void 0!==s&&(r.visible=s),void 0!==o&&(r.hidable=o),void 0!==i&&(r.sortable=i),void 0!==l&&(r.resizable=l),null!=n&&(r.width=n),r}))));E(a,M.changeHeaderCells,t),v.close()}},R=t=>{t&&(a=t)};return{beginRender:()=>{p.beginRender(),b=h,h=!1},render:t=>{var e;b||t===j||(j=t,C=(e=t).map((t=>[...t])),x=e.map((t=>t.map((t=>Object.assign({},t))))));const n=F();return s("div",{class:Yt,ref:R},s("div",{class:"kol-table-settings"},s(O,Object.assign({},p.get("toggle").getFcProps({_icons:"kolicon-settings",_label:o,_hideLabel:!0,_on:{onClick:()=>v.show(!0)}})))),s(Xt,Object.assign({},v.getFcProps({label:o,variant:"card",width:"fit-content"})),s("div",{class:"kol-table-settings__content"},$&&s("div",{class:"kol-table-settings__error-message"},s(B,{alert:!1,closerAriaDescriptionId:k,handleCloserClick:te,hasCloser:!1,headingId:f,label:$,level:0,refCloserButton:te,refCloserTooltip:te,type:"error",variant:"msg"})),s("form",{onSubmit:D},s("div",{class:"kol-table-settings__columns"},n.map(((t,e)=>((t,e,o)=>s("div",{key:t.key,class:"kol-table-settings__column"},s(S,{_checked:!1!==t.visible,_label:_(t.hidable?"kol-table-settings-column-hidable":"kol-table-settings-column-not-hidable",{placeholders:{column:t.label}}),_value:!0,_hideLabel:!0,_disabled:!1===t.hidable,_on:{onInput:(e,o)=>{var l;return((t,e)=>{const o=F().map((o=>o.key===t&&!1!==o.hidable?Object.assign(Object.assign({},o),{visible:Boolean(e)}):o));L(o)})(null!==(l=t.key)&&void 0!==l?l:"",o)}}}),s("span",{class:"kol-table-settings__column-label"},t.label),s(w,{_hideLabel:!0,_value:Zt(t.width),_label:_("kol-table-settings-column-width",{placeholders:{column:t.label}}),_min:1,_disabled:!1===t.resizable,_on:{onInput:(e,o)=>{var l;return((t,e)=>{const o=Zt(Number(e)),l=F().map((e=>e.key===t&&!1!==e.resizable?Object.assign(Object.assign({},e),{width:o}):e));L(l)})(null!==(l=t.key)&&void 0!==l?l:"",o)}}}),s(O,Object.assign({},p.get(`move-up-${t.key}`).getFcProps({_icons:"kolicon-chevron-up",_label:_(!1===t.sortable||0===e?"kol-table-settings-not-move":"kol-table-settings-move-up",{placeholders:{column:t.label}}),_hideLabel:!0,_variant:"ghost",_on:{onClick:()=>{var e;return I(null!==(e=t.key)&&void 0!==e?e:"","up")}},_disabled:!1===t.sortable||0===e}))),s(O,Object.assign({},p.get(`move-down-${t.key}`).getFcProps({_icons:"kolicon-chevron-down",_label:_(!1===t.sortable||e===o.length-1?"kol-table-settings-not-move":"kol-table-settings-move-down",{placeholders:{column:t.label}}),_hideLabel:!0,_variant:"ghost",_on:{onClick:()=>{var e;return I(null!==(e=t.key)&&void 0!==e?e:"","down")}},_disabled:!1===t.sortable||e===o.length-1})))))(t,e,n)))),s("div",{class:"kol-table-settings__actions"},s(O,Object.assign({},p.get("cancel").getFcProps({_label:l,_variant:"secondary",_on:{onClick:()=>(x=C.map((t=>[...t])),$=null,u(),void v.close())}}))),s(O,Object.assign({},p.get("apply").getFcProps({_label:i,_variant:"primary",_type:"submit"}))))))))},sync:()=>{p.endRender(),v.syncListeners()},destroy:()=>{p.destroy(),v.destroy()}}},oe=class extends r{constructor(){super(...arguments),this.hasExternalTableLabelRefs=!1,this.cellRenderTimeouts=new Map,this.buttonItems=d((()=>c((()=>this.host))),(t=>t.syncListeners()),(t=>t.destroy())),this.settings=ee((()=>this.host),(()=>a(this))),this.linkItems=d((()=>h((()=>a(this)))),(t=>t.syncListeners()),(t=>t.destroy())),this.propsConfig=ht,this.handleResize=()=>{this.updateScrollbarState(),clearTimeout(this.resizeDebounceTimeout),this.resizeDebounceTimeout=setTimeout((()=>{this.updateStickyColsDisabled()}),150)},this.handleSelectionChange=(t,e)=>{this.emitSelectionChange(t,e)},this.handleSort=(t,e)=>{this.emitSort(t,e)},this.handleRenderCell=(t,e)=>{e&&(clearTimeout(this.cellRenderTimeouts.get(e)),this.cellRenderTimeouts.set(e,setTimeout((()=>{if("function"==typeof t.render){const o=t.render(e,t,t.data,this.getRenderProp("data"));"string"==typeof o&&(e.textContent=o)}}))))},this.refScrollContainer=t=>{this.scrollContainerElement=t},this.refTable=t=>{this.tableElement=t,this.syncTableLabel(this.getState("externalLabelElements"))},this.getButtonFcProps=(t,e,o)=>this.buttonItems.get(t).getFcProps(e,o),this.renderSettings=t=>this.settings.render(t),this.getLinkFcProps=(t,e)=>this.linkItems.get(t).getFcProps(e)}observeScrollContainer(){this.scrollContainerElement&&ResizeObserver&&(this.resizeObserver=new ResizeObserver(this.handleResize),this.resizeObserver.observe(this.scrollContainerElement)),this.updateStickyColsDisabled()}teardownTable(){var t;null===(t=this.resizeObserver)||void 0===t||t.disconnect(),clearTimeout(this.resizeDebounceTimeout),this.buttonItems.destroy(),this.linkItems.destroy(),this.settings.destroy()}syncTableItems(){this.buttonItems.endRender(),this.linkItems.endRender(),this.settings.sync()}applyData(t){st.apply(t,(t=>{this.setRenderProp("data",t),this.setState("rowKeys",((t,e)=>new Map(t.map((t=>{var o;return[t,null!==(o=e.get(t))&&void 0!==o?o:z()]}))))(t,this.getState("rowKeys")))}))}applyDataFoot(t){nt.apply(t,(t=>this.setRenderProp("dataFoot",t)))}applyFixedCols(t){tt.apply(t,(t=>this.setRenderProp("fixedCols",t))),this.updateStickyColsDisabled()}applyHasSettingsMenu(t){et.apply(t,(t=>this.setRenderProp("hasSettingsMenu",t)))}applyHeaders(t){rt.apply(t,(t=>this.setRenderProp("headers",(t=>0===t.horizontal.length?t:Object.assign(Object.assign({},t),{horizontal:t.horizontal.map((t=>t.map((t=>Object.assign(Object.assign({},t),{visible:"boolean"!=typeof t.visible||t.visible,hidable:"boolean"!=typeof t.hidable||t.hidable})))))}))(t))))}applyLabel(t){g.apply(t,(t=>this.setRenderProp("label",t)),this.isRequired("label"))}applyLoading(t){ct.apply(t,(t=>this.setRenderProp("loading",t)))}applyOn(t){ot.apply(t,(t=>this.setRenderProp("on",t)))}applySelection(t){dt.apply(t,(t=>this.setRenderProp("selection",t))),this.updateStickyColsDisabled()}applyVariant(t){k.apply(t,(t=>this.setRenderProp("variant",t)))}syncTableLabel(t){this.tableElement&&"ariaLabelledByElements"in this.tableElement&&((null==t?void 0:t.length)?(this.tableElement.ariaLabelledByElements=t,this.hasExternalTableLabelRefs=!0,o.debug([this.tableElement,t,this.tableElement.ariaLabelledByElements])):this.hasExternalTableLabelRefs&&(this.hasExternalTableLabelRefs=!1,this.tableElement.ariaLabelledByElements=null,this.tableElement.setAttribute("aria-labelledby",Pt)))}moveCheckboxFocus(t){var e,o,l;if("ArrowUp"!==t.key&&"ArrowDown"!==t.key)return;const i=Array.from(null!==(o=null===(e=this.scrollContainerElement)||void 0===e?void 0:e.querySelectorAll(".kol-table__selection-input--checkbox"))&&void 0!==o?o:[]),s=null===(l=this.scrollContainerElement)||void 0===l?void 0:l.querySelector(":focus");let n=i.indexOf(s);n>-1&&(t.preventDefault(),n=(n+("ArrowDown"===t.key?1:i.length-1))%i.length,i[n].focus())}applyChangedHeaderCells(t){const e=Object.assign(Object.assign({},this.getRenderProp("headers")),{horizontal:t.detail});this.setRenderProp("headers",e),this.setState("settingsChangedCounter",this.getState("settingsChangedCounter")+1);const o=this.getRenderProp("on")[X.onChangeHeaderCells];"function"==typeof o&&o(t,e)}updateScrollbarState(){if(this.scrollContainerElement){const{clientHeight:t,clientWidth:e,scrollHeight:o,scrollWidth:l}=this.scrollContainerElement;this.setState("hasScrollbar",l>e||o>t&&["auto","scroll"].includes(getComputedStyle(this.scrollContainerElement).overflowY))}}calculateFixedColsWidth(){var t,e,o,l,i,s;const[n,a]=this.getRenderProp("fixedCols"),r=this.getRenderProp("headers"),c=ut(r).cells,d=vt(r.horizontal,this.getRenderProp("data"));let h=0;for(let o=0;o<n&&o<c.length;o++)h+=null!==(e=null===(t=c[o])||void 0===t?void 0:t.width)&&void 0!==e?e:0;for(let t=d-a;t<d&&t<c.length;t++)h+=null!==(l=null===(o=c[t])||void 0===o?void 0:o.width)&&void 0!==l?l:0;if(this.getRenderProp("selection")){const t=null===(i=this.scrollContainerElement)||void 0===i?void 0:i.querySelector(".kol-table__cell--selection");h+=null!==(s=null==t?void 0:t.offsetWidth)&&void 0!==s?s:0}return h}updateStickyColsDisabled(){if(!this.scrollContainerElement)return void this.setState("stickyColsDisabled",!1);const t=this.calculateFixedColsWidth();this.setState("stickyColsDisabled",t>0&&t>=this.scrollContainerElement.clientWidth)}emitSelectionChange(t,e){const o=this.getRenderProp("on")[X.onSelectionChange];"function"==typeof o&&o(t,e),this.host&&E(this.host,M.selectionChange,e)}emitSort(t,e){const o=this.getRenderProp("on")[X.onSort];"function"==typeof o&&e.key&&o(t,e),this.host&&E(this.host,M.sort,e)}renderTableStatelessFC(){return this.buttonItems.beginRender(),this.linkItems.beginRender(),this.settings.beginRender(),s(Qt,{data:this.getRenderProp("data"),dataFoot:this.getRenderProp("dataFoot"),externalLabelElements:this.getState("externalLabelElements"),fixedCols:this.getRenderProp("fixedCols"),getButtonFcProps:this.getButtonFcProps,getLinkFcProps:this.getLinkFcProps,renderSettings:this.renderSettings,handleRenderCell:this.handleRenderCell,handleSelectionChange:this.handleSelectionChange,handleSort:this.handleSort,hasScrollbar:this.getState("hasScrollbar"),hasSettingsMenu:this.getRenderProp("hasSettingsMenu"),headers:this.getRenderProp("headers"),label:this.getRenderProp("label"),loading:this.getRenderProp("loading"),on:this.getRenderProp("on"),refScrollContainer:this.refScrollContainer,refTable:this.refTable,rowKeys:this.getState("rowKeys"),selection:this.getRenderProp("selection"),settingsChangedCounter:this.getState("settingsChangedCounter"),stickyColsDisabled:this.getState("stickyColsDisabled"),variant:this.getRenderProp("variant")})}};export{oe as B,nt as a,st as t,Y as v}
4
+ import{r as t}from"./aria-labelledby.js";import{I as e,p as o,b as l,L as i}from"./bem-registry.js";import{h as s,Fragment as n,forceUpdate as a}from"@stencil/core/internal/client";import{B as r}from"./base-web-component.js";import{c}from"./item.js";import{c as d}from"./item-pool.js";import{c as h}from"./item3.js";import{c as b,e as u,n as p,a as v,r as f,t as m,C as y}from"./props-from-config.js";import{l as g}from"./label-lang-segment.js";import{v as k,j}from"./component3.js";import{c as C,d as S,e as w}from"./component-names.js";import{t as _}from"./i18n.js";import{B as x}from"./component.js";import{B as O}from"./component9.js";import{I as $}from"./component5.js";import{L as F}from"./component6.js";import{r as L}from"./component7.js";import{S as I}from"./component11.js";import{T}from"./component10.js";import{a as D}from"./tslib.es6.js";import{n as z,c as A}from"./dev.utils.js";import{d as E,K as M}from"./events.js";import{A as B}from"./component2.js";import{l as H}from"./level.js";import{c as K}from"./element-interaction.js";import{u as N,l as P,d as R,D as W}from"./scroll-lock.js";import{h as q}from"./tooltip-open-tracking.js";import{d as U,w as V}from"./width.js";import{r as G,C as J}from"./component8.js";import{T as Q}from"./behavior.js";import{C as X}from"./keyboard.js";const Y=(o,l,i)=>{const s=t=>"string"==typeof t||void 0===t;return e(o,"_ariaLabelledby",s,new Set(["string"]),i),s(i)?t(l,i):[]},Z=t=>"number"==typeof t&&Number.isInteger(t)&&t>=0,tt=b("fixedCols",[0,0],(t=>u(t)),(t=>2===t.length&&t.every(Z))),et=b("hasSettingsMenu",!1,p),ot=v();function lt(t){const e="string"==typeof t?o(t):t;if(Array.isArray(e))return e;throw new Error("Invalid table data: expected an array of row objects.")}function it(t){return t.every((t=>"object"==typeof t&&null!==t))}const st=b("data",[],lt,it),nt=b("dataFoot",[],lt,it),at=t=>Array.isArray(t)&&t.every((t=>Array.isArray(t))),rt=b("headers",{horizontal:[],vertical:[]},(function(t){const e="string"==typeof t?o(t):t;if("object"!=typeof e||null===e)throw new Error("Invalid table headers: expected an object.");const{horizontal:l=[],vertical:i=[]}=e;if(!at(l)||!at(i))throw new Error("Invalid table headers: horizontal and vertical must be arrays of header rows.");return{horizontal:l,vertical:i}}),(function({horizontal:t,vertical:e}){return[...t,...e].every((t=>t.every((t=>void 0===t.width||"number"==typeof t.width))))})),ct=b("loading",!1,p),dt=b("selection",!1,(function(t){const e="string"==typeof t?o(t):t;if("object"==typeof e&&null!==e)return e;throw new Error("Invalid table selection: expected an object.")}),(function(t){return!1===t||"function"==typeof t.label&&(!t.selectedKeys||Array.isArray(t.selectedKeys))})),ht={required:[g,st],optional:[tt,et,ot,nt,rt,ct,dt,k]},bt=t=>t.flatMap((t=>t.filter((t=>"string"==typeof t.key||"function"==typeof t.render)))),ut=t=>{const e=bt(t.horizontal);if(e.length>0)return{cells:e,horizontal:!0};const o=bt(t.vertical);return{cells:o,horizontal:0===o.length}},pt=(t,e)=>{let o=0;return Array.isArray(t)&&t.forEach((t=>{var l;o+=null!==(l=t[e])&&void 0!==l?l:1})),o},vt=(t,e)=>{const o=Math.max(0,...t.map((t=>pt(t,"colSpan"))));return 0===o?e.length:o},ft=t=>{var e;return null!==(e=null==t?void 0:t.reduce(((t,e)=>"visible"in e&&!1===e.visible?t:t+(e.colSpan||1)),0))&&void 0!==e?e:0},mt=(t,e,o,l)=>{if(void 0!==l&&!e)return l<t[0]?"left":t[1]>0&&l>=o-t[1]?"right":void 0},yt=(t,e,o,l)=>{var i,s,n,a,r,c;const d=[];for(let a=0;a<e;a++)"left"===mt(o,l,e,a)&&(d[a]=(null!==(i=d[a-1])&&void 0!==i?i:0)+(null!==(n=null===(s=t[a-1])||void 0===s?void 0:s.width)&&void 0!==n?n:0));for(let i=e-1;i>=0;i--)"right"===mt(o,l,e,i)&&(d[i]=(null!==(a=d[i+1])&&void 0!==a?a:0)+(null!==(c=null===(r=t[i+1])||void 0===r?void 0:r.width)&&void 0!==c?c:0));return d},gt=(t,e,o,l)=>{const i=void 0===e?void 0:t[e];return o&&l?`calc( var(--kol-table-selection-col-width) + ${i}px)`:`${i}px`},kt=(t,e,o,l)=>{if(0===(e.horizontal?t.horizontal:t.vertical).length)return;const i=e.cells[o];return(null==i?void 0:i.type)===l?i:void 0},jt=({data:t,dataFoot:e,headers:o,isFoot:l,noEntriesLabel:i,primaryHeaders:s})=>{const n=vt(o.horizontal,t),a=s.cells;let r=((t,e,o)=>{const l=Math.max(0,...t.map((t=>pt(t,"rowSpan"))));return 0===l?e.length:l-o})(o.vertical,t,e.length),c=0;l&&(c=r,r+=e.length);const d=[],h=[],b=[];o.vertical.forEach(((t,e)=>{h[e]=0,b[e]=[]}));for(let i=c;i<r;i++){const r=[];o.vertical.forEach(((t,e)=>{let o=0;if(b[e].forEach((t=>o+=t)),o<=i){const l=t[i-o+h[e]];if("object"==typeof l){r.push(Object.assign(Object.assign({},l),{headerCell:!0,data:{}}));let t=1;if("number"==typeof l.rowSpan&&l.rowSpan>1&&(t=l.rowSpan),b[e].push(t),"number"==typeof l.colSpan&&l.colSpan>1)for(let o=1;o<l.colSpan;o++)b[e+o].push(t);h[e]++}}}));for(let o=0;o<n;o++)if(s.horizontal){const s=l?e[i-c]:t[i],n=a[o];"object"==typeof n&&null!==n&&"object"==typeof s&&null!==s&&r.push(Object.assign(Object.assign({},n),{colIndex:o,colSpan:void 0,rowSpan:void 0,data:s,label:s[n.key]}))}else{const e=a[i];"object"==typeof e&&null!==e&&"object"==typeof t[o]&&null!==t[o]&&r.push(Object.assign(Object.assign({},e),{colIndex:o,colSpan:void 0,rowSpan:void 0,data:t[o],label:t[o][e.key]}))}d.push(r)}if(0===t.length){let t=ft(o.horizontal[0]),e=0;o.vertical.length>0&&(t-=o.vertical.length,o.vertical[0].forEach((t=>{e+=t.rowSpan||1})));const l={colSpan:t,label:i,render:void 0,rowSpan:Math.max(e,1)};0===d.length?d.push([l]):d[0].push(l)}return d},Ct=({horizontal:t,vertical:e})=>{const o=t.flatMap((t=>t.filter((t=>!1!==t.visible&&void 0!==t.width&&t.width>0)).map((t=>t.width)))),l=[...e.flatMap((t=>t.filter((t=>void 0!==t.width&&t.width>0)).map((t=>t.width)))),...o];return 0===l.length?"0px":1===l.length?`${l[0]}px`:`calc(${l.map((t=>`${t}px`)).join(" + ")})`},St=t=>void 0===t?[]:Array.isArray(t)?t:[t],wt=t=>{var e;return null!==(e=t?t.keyPropertyName:void 0)&&void 0!==e?e:"id"},_t=t=>{const e=t?St(t.selectedKeys):[];return{disabledKeys:new Set((t?St(t.disabledKeys):[]).map(String)),keyPropertyName:wt(t),selectedKeys:e,selectedKeysSet:new Set(e.map(String))}},xt=(t,e)=>t.filter((t=>!e.disabledKeys.has(String(t[e.keyPropertyName])))),Ot=l.forBlock("kol-table"),$t=Ot("body"),Ft=Ot("cell-actions"),Lt=Ot("cell-states"),It=Ot("footer"),Tt=Ot("head"),Dt=Ot("head-row"),zt=Ot("scroll-container"),At=Ot("selection-icon"),Et=Ot("selection-input-tooltip"),Mt=Ot("sort"),Bt=Ot("sort-button"),Ht=Ot("sort-order"),Kt=Ot("table"),Nt=`${Ot("focus-element")} ${Ot("caption")}`,Pt="caption",Rt=(t,e)=>mt(t.fixedCols,t.stickyColsDisabled,t.maxCols,e),Wt=(t,e,o)=>({left:"left"===e?gt(t.fixedOffsets,o,!0,!1!==t.selection):void 0,right:"right"===e?gt(t.fixedOffsets,o,!1,!1!==t.selection):void 0}),qt=(t,e,o)=>{var l,i;return null!==(i=t.primaryHeaders.horizontal&&(null===(l=e[0])||void 0===l?void 0:l.data)?t.rowKeys.get(e[0].data):void 0)&&void 0!==i?i:String(o)},Ut=t=>{const e=_("kol-sort");return"number"==typeof t&&t>0?`${e} – ${_("kol-table-sort-order").replace("{{order}}",`${t}`)}`:e},Vt=(t,e,o,l,i)=>{if(!1===e.visible)return"";const n=!1!==(null==e?void 0:e.sortable)&&"string"==typeof e.sortDirection;let a="none",r="kolicon-sort-neutral";if(n&&e.sortDirection)switch(e.sortDirection){case"ASC":r="kolicon-sort-asc",a="ascending";break;case"DESC":r="kolicon-sort-desc",a="descending";break;default:a="none"}const c=i?"row":"number"==typeof e.colSpan&&e.colSpan>1?"colgroup":"col",d="number"==typeof e.sortOrder&&e.sortOrder>0?e.sortOrder:void 0,h=void 0!==e.width?`${e.width}px`:void 0,b=Rt(t,l),{left:u,right:p}=Wt(t,b,l),v=e.textAlign,f=n?e.sortDirection:void 0;return s("th",{key:`${o}-${l}-${e.label}`,class:Ot("cell",{[a]:!0,"align-center":"center"===v,"align-justify":"justify"===v,"align-left":"left"===v,"align-right":"right"===v,header:!0,"sticky-left":"left"===b,"sticky-right":"right"===b}),scope:c,colSpan:e.colSpan,rowSpan:e.rowSpan,style:{width:h,left:u,right:p},"aria-sort":a,"data-sort":f?`sort-${f}`:void 0},f?s("span",{class:Mt},s(O,Object.assign({},t.getButtonFcProps(`sort-${i?"vertical":"horizontal"}-${o}-${l}`,{_icons:{right:r},_label:e.label,_ariaDescription:Ut(d),_on:{onClick:o=>{t.handleSort(o,{key:e.key,currentSortDirection:f})}}},{class:Bt}))),d&&s("span",{"aria-hidden":"true",class:Ht},d)):e.label)},Gt=(t,e,o,l,i=!1)=>s("tr",{class:Ot("row",{body:!i,footer:i}),key:`row-${qt(t,e,o)}`},((t,e,o)=>{var l;const{handleSelectionChange:i,selection:n,selectionModel:a}=t;if(!n)return"";const r=null===(l=e[0])||void 0===l?void 0:l.data;if(!r)return"";const c=r[a.keyPropertyName],d=n.multiple||void 0===n.multiple,h=String(c),b=a.selectedKeysSet.has(h),u=a.disabledKeys.has(h),p=n.label(r),v={name:"selection",checked:b,disabled:u,id:String(c),"aria-label":p};return s("td",{key:`tbody-${o}-selection`,class:Ot("cell",{selection:!0})},s("div",{class:Ot("selection",{checked:b})},d?s("label",{class:Ot("selection-label",{disabled:u})},s($,{class:At,icons:"kolicon "+(b?"kolicon-check":""),label:""}),s("input",Object.assign({class:Ot("selection-input",{checkbox:!0})},v,{type:"checkbox",onInput:t=>{const e=b?a.selectedKeys.filter((t=>String(t)!==h)):[...a.selectedKeys,c];i(t,e)}}))):s("label",{class:Ot("selection-label")},s("input",Object.assign({class:Ot("selection-input",{radio:!0})},v,{type:"radio",onInput:t=>{i(t,[c])}}))),s("div",{class:Et},s(T,{label:p,badgeText:"",id:`${c}-label`,refFloating:()=>{}}))))})(t,e,o),e.map(((e,i)=>((t,e,o,l,i)=>{if(!1===e.visible)return"";let n=`${o}-${l}-${e.label}`;if(e.data){const i=t.rowKeys.get(e.data);n=i?`${i}-${t.primaryHeaders.horizontal?l:o}`:n}if(e.headerCell)return Vt(t,e,o,l,i);const a="function"!=typeof e.render&&e.label===t.translateNoEntries,r=kt(t.headers,t.primaryHeaders,l,"action"),c=Boolean(r&&e.data),d=kt(t.headers,t.primaryHeaders,l,"state"),h=Boolean(d&&e.data),b=Rt(t,l),{left:u,right:p}=Wt(t,b,e.colIndex),v="function"==typeof e.render,f=e.textAlign;return s("td",{key:`cell-${n}-${t.settingsChangedCounter}`,class:Ot("cell",{actions:c,"align-center":"center"===f,"align-justify":"justify"===f,"align-left":"left"===f,"align-right":"right"===f,body:!0,states:h,"sticky-left":"left"===b,"sticky-right":"right"===b}),"aria-atomic":a?"false":void 0,"aria-live":a?"polite":void 0,"aria-relevant":a?"text":void 0,colSpan:e.colSpan,rowSpan:e.rowSpan,style:{textAlign:f,left:u,right:p},ref:v?o=>t.handleRenderCell(e,o):void 0},c&&r&&e.data?((t,e,o,l)=>s("div",{class:Ft},e.actions(o).map(((e,o)=>{const i=`action-${l}-${o}`;return"button"===e.type?s("span",{key:i},s(O,Object.assign({},t.getButtonFcProps(i,e)))):"link"===e.type?s("span",{key:i},s(F,Object.assign({},t.getLinkFcProps(i,e)))):null}))))(t,r,e.data,n):h&&d&&e.data?((t,e,o)=>{const l=t.key;if(!l)return"";const i=e[l];return i?s("div",{class:Lt},i.map(((t,e)=>"badge"===t.type?s(C,Object.assign({key:`state-${o}-${e}`},t)):null))):""})(d,e.data,n):v?"":e.label)})(t,e,o,i,l)))),Jt=(t,e,o)=>{const l=t.headers.vertical.length+ft(null==o?void 0:o[0])+(t.selection?1:0);return s("tr",{"aria-hidden":"true",class:Ot("spacer",{[e]:!0})},s("td",{class:Ot("spacer-line",{[e]:!0}),colSpan:l}))},Qt=t=>{const e=f(ht,t),{data:o,dataFoot:l,externalLabelElements:i,fixedCols:a,hasScrollbar:r,hasSettingsMenu:c,headers:d,label:h,loading:b,refScrollContainer:u,refTable:p,selection:v,stickyColsDisabled:y,variant:g}=e,k=_("kol-no-entries"),C=ut(d),S=vt(d.horizontal,o),w=Object.assign(Object.assign({},e),{fixedOffsets:yt(C.cells,S,a,y),maxCols:S,primaryHeaders:C,selectionModel:_t(v),translateNoEntries:k}),O=jt({data:o,dataFoot:l,headers:d,isFoot:!1,noEntriesLabel:k,primaryHeaders:C}),F=0===i.length;return s(x,{block:"kol-table",class:j(g,"table")},c&&t.renderSettings(d.horizontal),s("div",{ref:u,class:zt,tabindex:r?F?"-1":"0":void 0},s("table",{ref:p,"aria-labelledby":F?Pt:void 0,class:Kt,style:{minWidth:Ct(d)}},F&&s("caption",{class:Nt,id:Pt,ref:t=>{t&&(r?t.tabIndex=0:t.removeAttribute("tabindex"))}},L(h)),s("thead",{class:Tt},[d.horizontal.map(((t,e)=>s("tr",{class:Dt,key:`thead-${e}`},v&&(t=>{const{data:e,handleSelectionChange:o,selection:l,selectionModel:i}=t;if(!l)return s("td",{class:Ot("cell",{header:!0}),key:"thead-0"});if(!1===l.multiple)return s("th",{scope:"col",key:"thead-0-selection",class:Ot("cell",{header:!0,selection:!0})},s("span",{class:"visually-hidden"},_("kol-table-selection")));const n=i.selectedKeys.filter((t=>!i.disabledKeys.has(String(t)))).length,a=n===xt(e,i).length,r=0!==n&&!a;let c;return c=_(0===n?"kol-table-selection-all":a&&!r?"kol-table-selection-none":"kol-table-selection-indeterminate"),s("th",{scope:"col",key:"thead-0-selection",class:Ot("cell",{header:!0,selection:!0})},s("span",{class:"visually-hidden"},_("kol-table-selection")),s("div",{class:Ot("selection",{checked:a,indeterminate:r})},s("label",{class:Ot("selection-label")},s($,{class:At,icons:"kolicon "+(r?"kolicon-minus":a?"kolicon-check":""),label:""}),s("input",{class:Ot("selection-input",{checkbox:!0}),name:"selection",checked:a&&!r,indeterminate:r,"aria-label":c,type:"checkbox",onInput:t=>{o(t,((t,e,o)=>{const l=e.selectedKeys.filter((t=>e.disabledKeys.has(String(t))));return o&&l.push(...xt(t,e).map((t=>null==t?void 0:t[e.keyPropertyName]))),l})(e,i,!a))}})),s("div",{class:Et},s(T,{label:c,badgeText:"",refFloating:()=>{}}))))})(w),0===e&&(({headers:t})=>{const{horizontal:e,vertical:o}=t;if(0===e.length||0===o.length)return s(n,null);const l=o.reduce(((t,e)=>{var o,l;return t+(null!==(l=null===(o=null==e?void 0:e[0])||void 0===o?void 0:o.width)&&void 0!==l?l:0)}),0);return s("td",{"aria-hidden":"true",colSpan:o.length,rowSpan:e.length,style:l>0?{width:`${l}px`}:void 0})})(w),Array.isArray(t)&&t.map(((t,o)=>Vt(w,t,e,o,!1)))))),Jt(w,"head",d.horizontal)]),s("tbody",{class:$t},s("div",{class:Ot("loader",{shown:b})},s(I,{label:_(b?"kol-table-data-loading":"kol-table-data-loaded").replace("{{caption}}",m(h)),show:b,variant:"cycle"})),O.map(((t,e)=>Gt(w,t,e,!0)))),(t=>{const{dataFoot:e,headers:o,primaryHeaders:l,translateNoEntries:i}=t;if(0===e.length)return null;const n=jt({data:e,dataFoot:e,headers:o,isFoot:!0,noEntriesLabel:i,primaryHeaders:l}),a=vt(o.horizontal,e),r=Object.assign(Object.assign({},t),{fixedOffsets:yt(l.cells,a,t.fixedCols,t.stickyColsDisabled),maxCols:a});return s("tfoot",{class:It},[Jt(t,"foot",n),n.map(((t,e)=>Gt(r,t,e,!0,!0)))])})(w))))},Xt=({dialog:t,card:e},o)=>s(W,Object.assign({},t),e?s(J,Object.assign({},e),o):o),Yt=l.forBlock("kol-table")("settings"),Zt=t=>Number.isFinite(t)&&void 0!==t&&t>0?t:void 0,te=()=>{},ee=(t,e)=>{const o=_("kol-table-settings"),l=_("kol-table-settings-cancel"),i=_("kol-table-settings-apply"),n=_("kol-table-settings-error-all-invisible");let a,h=!1,b=!1;const u=()=>{h=!0,e()},p=d((()=>c(t)),(t=>t.syncListeners()),(t=>t.destroy())),v=((t,e)=>{const o=K(),l=K(),i=new Q(r.stateLess),s=z(),n=A("dialog-heading"),c={};let d,h=!0,b={};const u=t=>!a||E(a,t),p=()=>{var t,e;null===(e=null===(t=o.el)||void 0===t?void 0:t.close)||void 0===e||e.call(t)},v=t=>{var e;q(t),t.defaultPrevented||(null===(e=b.onCancel)||void 0===e||e.call(b,t),t.defaultPrevented||u(M.cancel)||t.preventDefault())},f=t=>{var e;t.target===o.el&&(N(c),null===(e=b.onClose)||void 0===e||e.call(b),u(M.close))},k=()=>{i.hideTooltip(),p(),u(M.close)};return{getFcProps:e=>{var a,r,c;let u="",p=0,j="blank",C="100%";g.apply(e.label,(t=>{u=t})),H.apply(null!==(a=e.level)&&void 0!==a?a:0,(t=>{p=t})),U.apply(e.on,(t=>{b=t})),y.apply(null!==(r=e.variant)&&void 0!==r?r:"blank",(t=>{j=t})),V.apply(null!==(c=e.width)&&void 0!==c?c:"100%",(t=>{C=t}));const S="card"===j;return S&&!d&&(d=G(t()),i.componentWillLoad({label:d.label,align:d.tooltipAlign})),{dialog:{blockClass:R(j),handleCancel:v,handleClose:f,label:m(u),labelledBy:S?n:void 0,modal:h,refDialog:o,width:C},card:S&&d?{ariaDescriptionId:s,closeButtonProps:d,handleClose:k,hasCloser:!0,headingId:n,label:u,level:p,refCloseButton:l,refTooltip:i.setTooltipElementRef}:void 0}},show:t=>{var l,i;const s=o.el;(null==s?void 0:s.open)||(h!==t&&(h=t,e()),t?(null===(l=null==s?void 0:s.showModal)||void 0===l||l.call(s),s&&P(c)):null===(i=null==s?void 0:s.show)||void 0===i||i.call(s))},close:p,syncListeners:()=>{l.el&&i.syncListeners(void 0,l.el,!0)},destroy:()=>{p(),N(c),i.destroy()}}})(t,u),f=A("alert-heading"),k=z();let j,C=[],x=[],$=null;const F=()=>{var t;return null!==(t=x[x.length-1])&&void 0!==t?t:[]},L=t=>{x=x.map(((e,o,l)=>o===l.length-1?t:e)),u()},I=(t,e)=>{const o=[...F()],l=o.findIndex((e=>e.key===t));if(-1===l)return;let i;if("up"===e){if(0===l)return;i=l-1}else{if(l===o.length-1)return;i=l+1}const[s]=o.splice(l,1);o.splice(i,0,s),L(o)},T=t=>{if(t.preventDefault(),!F().some((t=>!1!==t.visible)))return $=n,void u();if(a){$=null,C=x.map((t=>t.map((t=>Object.assign({},t))))),u();const t=x.map((t=>t.map((t=>{const e=t,{hidable:o,resizable:l,sortable:i,visible:s,width:n}=e,a=D(e,["hidable","resizable","sortable","visible","width"]),r=Object.assign({},a);return void 0!==s&&(r.visible=s),void 0!==o&&(r.hidable=o),void 0!==i&&(r.sortable=i),void 0!==l&&(r.resizable=l),null!=n&&(r.width=n),r}))));E(a,M.changeHeaderCells,t),v.close()}},W=t=>{t&&(a=t)};return{beginRender:()=>{p.beginRender(),b=h,h=!1},render:t=>{var e;b||t===j||(j=t,C=(e=t).map((t=>[...t])),x=e.map((t=>t.map((t=>Object.assign({},t))))));const n=F();return s("div",{class:Yt,ref:W},s("div",{class:"kol-table-settings"},s(O,Object.assign({},p.get("toggle").getFcProps({_icons:"kolicon-settings",_label:o,_hideLabel:!0,_on:{onClick:()=>v.show(!0)}})))),s(Xt,Object.assign({},v.getFcProps({label:o,variant:"card",width:"fit-content"})),s("div",{class:"kol-table-settings__content"},$&&s("div",{class:"kol-table-settings__error-message"},s(B,{alert:!1,closerAriaDescriptionId:k,handleCloserClick:te,hasCloser:!1,headingId:f,label:$,level:0,refCloserButton:te,refCloserTooltip:te,type:"error",variant:"msg"})),s("form",{onSubmit:T},s("div",{class:"kol-table-settings__columns"},n.map(((t,e)=>((t,e,o)=>s("div",{key:t.key,class:"kol-table-settings__column"},s(S,{_checked:!1!==t.visible,_label:_(t.hidable?"kol-table-settings-column-hidable":"kol-table-settings-column-not-hidable",{placeholders:{column:t.label}}),_value:!0,_hideLabel:!0,_disabled:!1===t.hidable,_on:{onInput:(e,o)=>{var l;return((t,e)=>{const o=F().map((o=>o.key===t&&!1!==o.hidable?Object.assign(Object.assign({},o),{visible:Boolean(e)}):o));L(o)})(null!==(l=t.key)&&void 0!==l?l:"",o)}}}),s("span",{class:"kol-table-settings__column-label"},t.label),s(w,{_hideLabel:!0,_value:Zt(t.width),_label:_("kol-table-settings-column-width",{placeholders:{column:t.label}}),_min:1,_disabled:!1===t.resizable,_on:{onInput:(e,o)=>{var l;return((t,e)=>{const o=Zt(Number(e)),l=F().map((e=>e.key===t&&!1!==e.resizable?Object.assign(Object.assign({},e),{width:o}):e));L(l)})(null!==(l=t.key)&&void 0!==l?l:"",o)}}}),s(O,Object.assign({},p.get(`move-up-${t.key}`).getFcProps({_icons:"kolicon-chevron-up",_label:_(!1===t.sortable||0===e?"kol-table-settings-not-move":"kol-table-settings-move-up",{placeholders:{column:t.label}}),_hideLabel:!0,_variant:"ghost",_on:{onClick:()=>{var e;return I(null!==(e=t.key)&&void 0!==e?e:"","up")}},_disabled:!1===t.sortable||0===e}))),s(O,Object.assign({},p.get(`move-down-${t.key}`).getFcProps({_icons:"kolicon-chevron-down",_label:_(!1===t.sortable||e===o.length-1?"kol-table-settings-not-move":"kol-table-settings-move-down",{placeholders:{column:t.label}}),_hideLabel:!0,_variant:"ghost",_on:{onClick:()=>{var e;return I(null!==(e=t.key)&&void 0!==e?e:"","down")}},_disabled:!1===t.sortable||e===o.length-1})))))(t,e,n)))),s("div",{class:"kol-table-settings__actions"},s(O,Object.assign({},p.get("cancel").getFcProps({_label:l,_variant:"secondary",_on:{onClick:()=>(x=C.map((t=>[...t])),$=null,u(),void v.close())}}))),s(O,Object.assign({},p.get("apply").getFcProps({_label:i,_variant:"primary",_type:"submit"}))))))))},sync:()=>{p.endRender(),v.syncListeners()},destroy:()=>{p.destroy(),v.destroy()}}},oe=class extends r{constructor(){super(...arguments),this.hasExternalTableLabelRefs=!1,this.cellRenderTimeouts=new Map,this.buttonItems=d((()=>c((()=>this.host))),(t=>t.syncListeners()),(t=>t.destroy())),this.settings=ee((()=>this.host),(()=>a(this))),this.linkItems=d((()=>h((()=>a(this)))),(t=>t.syncListeners()),(t=>t.destroy())),this.propsConfig=ht,this.handleResize=()=>{this.updateScrollbarState(),clearTimeout(this.resizeDebounceTimeout),this.resizeDebounceTimeout=setTimeout((()=>{this.updateStickyColsDisabled()}),150)},this.handleSelectionChange=(t,e)=>{this.emitSelectionChange(t,e)},this.handleSort=(t,e)=>{this.emitSort(t,e)},this.handleRenderCell=(t,e)=>{e&&(clearTimeout(this.cellRenderTimeouts.get(e)),this.cellRenderTimeouts.set(e,setTimeout((()=>{if(this.cellRenderTimeouts.delete(e),"function"==typeof t.render){const o=t.render(e,t,t.data,this.getRenderProp("data"));"string"==typeof o&&(e.textContent=o)}}))))},this.refScrollContainer=t=>{this.scrollContainerElement=t},this.refTable=t=>{this.tableElement=t,this.syncTableLabel(this.getState("externalLabelElements"))},this.getButtonFcProps=(t,e,o)=>this.buttonItems.get(t).getFcProps(e,o),this.renderSettings=t=>this.settings.render(t),this.getLinkFcProps=(t,e)=>this.linkItems.get(t).getFcProps(e)}observeScrollContainer(){this.scrollContainerElement&&ResizeObserver&&(this.resizeObserver=new ResizeObserver(this.handleResize),this.resizeObserver.observe(this.scrollContainerElement)),this.updateStickyColsDisabled()}teardownTable(){var t;null===(t=this.resizeObserver)||void 0===t||t.disconnect(),clearTimeout(this.resizeDebounceTimeout),this.cellRenderTimeouts.forEach((t=>clearTimeout(t))),this.cellRenderTimeouts.clear(),this.buttonItems.destroy(),this.linkItems.destroy(),this.settings.destroy()}syncTableItems(){this.buttonItems.endRender(),this.linkItems.endRender(),this.settings.sync()}applyData(t){st.apply(t,(t=>{this.setRenderProp("data",t),this.setState("rowKeys",((t,e)=>new Map(t.map((t=>{var o;return[t,null!==(o=e.get(t))&&void 0!==o?o:z()]}))))(t,this.getState("rowKeys")))}))}applyDataFoot(t){nt.apply(t,(t=>this.setRenderProp("dataFoot",t)))}applyFixedCols(t){tt.apply(t,(t=>this.setRenderProp("fixedCols",t))),this.updateStickyColsDisabled()}applyHasSettingsMenu(t){et.apply(t,(t=>this.setRenderProp("hasSettingsMenu",t)))}applyHeaders(t){rt.apply(t,(t=>this.setRenderProp("headers",(t=>0===t.horizontal.length?t:Object.assign(Object.assign({},t),{horizontal:t.horizontal.map((t=>t.map((t=>Object.assign(Object.assign({},t),{visible:"boolean"!=typeof t.visible||t.visible,hidable:"boolean"!=typeof t.hidable||t.hidable})))))}))(t))))}applyLabel(t){g.apply(t,(t=>this.setRenderProp("label",t)),this.isRequired("label"))}applyLoading(t){ct.apply(t,(t=>this.setRenderProp("loading",t)))}applyOn(t){ot.apply(t,(t=>this.setRenderProp("on",t)))}applySelection(t){dt.apply(t,(t=>this.setRenderProp("selection",t))),this.updateStickyColsDisabled()}applyVariant(t){k.apply(t,(t=>this.setRenderProp("variant",t)))}syncTableLabel(t){this.tableElement&&"ariaLabelledByElements"in this.tableElement&&((null==t?void 0:t.length)?(this.tableElement.ariaLabelledByElements=t,this.hasExternalTableLabelRefs=!0,i.debug([this.tableElement,t,this.tableElement.ariaLabelledByElements])):this.hasExternalTableLabelRefs&&(this.hasExternalTableLabelRefs=!1,this.tableElement.ariaLabelledByElements=null,this.tableElement.setAttribute("aria-labelledby",Pt)))}moveCheckboxFocus(t){var e,o,l;if("ArrowUp"!==t.key&&"ArrowDown"!==t.key)return;const i=Array.from(null!==(o=null===(e=this.scrollContainerElement)||void 0===e?void 0:e.querySelectorAll(".kol-table__selection-input--checkbox"))&&void 0!==o?o:[]),s=null===(l=this.scrollContainerElement)||void 0===l?void 0:l.querySelector(":focus");let n=i.indexOf(s);n>-1&&(t.preventDefault(),n=(n+("ArrowDown"===t.key?1:i.length-1))%i.length,i[n].focus())}applyChangedHeaderCells(t){const e=Object.assign(Object.assign({},this.getRenderProp("headers")),{horizontal:t.detail});this.setRenderProp("headers",e),this.setState("settingsChangedCounter",this.getState("settingsChangedCounter")+1);const o=this.getRenderProp("on")[X.onChangeHeaderCells];"function"==typeof o&&o(t,e)}updateScrollbarState(){if(this.scrollContainerElement){const{clientHeight:t,clientWidth:e,scrollHeight:o,scrollWidth:l}=this.scrollContainerElement;this.setState("hasScrollbar",l>e||o>t&&["auto","scroll"].includes(getComputedStyle(this.scrollContainerElement).overflowY))}}calculateFixedColsWidth(){var t,e,o,l,i,s;const[n,a]=this.getRenderProp("fixedCols"),r=this.getRenderProp("headers"),c=ut(r).cells,d=vt(r.horizontal,this.getRenderProp("data"));let h=0;for(let o=0;o<n&&o<c.length;o++)h+=null!==(e=null===(t=c[o])||void 0===t?void 0:t.width)&&void 0!==e?e:0;for(let t=d-a;t<d&&t<c.length;t++)h+=null!==(l=null===(o=c[t])||void 0===o?void 0:o.width)&&void 0!==l?l:0;if(this.getRenderProp("selection")){const t=null===(i=this.scrollContainerElement)||void 0===i?void 0:i.querySelector(".kol-table__cell--selection");h+=null!==(s=null==t?void 0:t.offsetWidth)&&void 0!==s?s:0}return h}updateStickyColsDisabled(){if(!this.scrollContainerElement)return void this.setState("stickyColsDisabled",!1);const t=this.calculateFixedColsWidth();this.setState("stickyColsDisabled",t>0&&t>=this.scrollContainerElement.clientWidth)}emitSelectionChange(t,e){const o=this.getRenderProp("on")[X.onSelectionChange];"function"==typeof o&&o(t,e),this.host&&E(this.host,M.selectionChange,e)}emitSort(t,e){const o=this.getRenderProp("on")[X.onSort];"function"==typeof o&&e.key&&o(t,e),this.host&&E(this.host,M.sort,e)}renderTableStatelessFC(){return this.buttonItems.beginRender(),this.linkItems.beginRender(),this.settings.beginRender(),s(Qt,{data:this.getRenderProp("data"),dataFoot:this.getRenderProp("dataFoot"),externalLabelElements:this.getState("externalLabelElements"),fixedCols:this.getRenderProp("fixedCols"),getButtonFcProps:this.getButtonFcProps,getLinkFcProps:this.getLinkFcProps,renderSettings:this.renderSettings,handleRenderCell:this.handleRenderCell,handleSelectionChange:this.handleSelectionChange,handleSort:this.handleSort,hasScrollbar:this.getState("hasScrollbar"),hasSettingsMenu:this.getRenderProp("hasSettingsMenu"),headers:this.getRenderProp("headers"),label:this.getRenderProp("label"),loading:this.getRenderProp("loading"),on:this.getRenderProp("on"),refScrollContainer:this.refScrollContainer,refTable:this.refTable,rowKeys:this.getState("rowKeys"),selection:this.getRenderProp("selection"),settingsChangedCounter:this.getState("settingsChangedCounter"),stickyColsDisabled:this.getState("stickyColsDisabled"),variant:this.getRenderProp("variant")})}};export{oe as B,nt as a,st as t,Y as v}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{g as t}from"./bootstrap.js";import{F as e,g as i,l as s}from"./bem-registry.js";import{c as o,b as a}from"./props-from-config.js";import{n}from"./component9.js";import{B as r}from"./behavior.js";const l=o("ariaDetails","",a),c=o("syncValueBySelector",void 0,a),u={optional:[l,n,c]},h=new Set(["KOL-COMBOBOX","KOL-INPUT-CHECKBOX","KOL-INPUT-COLOR","KOL-INPUT-DATE","KOL-INPUT-EMAIL","KOL-INPUT-FILE","KOL-INPUT-NUMBER","KOL-INPUT-PASSWORD","KOL-INPUT-RADIO","KOL-INPUT-RANGE","KOL-INPUT-TEXT","KOL-SELECT","KOL-SINGLE-SELECT","KOL-TEXTAREA"]);class d extends r{constructor(s,{host:o,type:a,name:n}){var r,l,c,d,f;super(s,u),this.experimentalMode=e(),this.setFormAssociatedValue=t=>{var e;const s=null===(e=this.formAssociated)||void 0===e?void 0:e.getAttribute("name");null!==s&&""!==s||i(` The form field (${this.type}) must have a name attribute to be form-associated. Please define the _name attribute.`);const o=this.tryToStringifyValue(t);this.syncValue(t,o,this.formAssociated),this.syncValue(t,o,this.syncToOwnInput)},this.host=this.findHostWithShadowRoot(o),this.type=a,(null===(r=t())||void 0===r?void 0:r.reflectInputValues)&&h.has(null!==(c=null===(l=this.host)||void 0===l?void 0:l.tagName)&&void 0!==c?c:"")&&n&&(null===(d=this.host)||void 0===d||d.querySelectorAll("input,select,textarea").forEach((t=>{var e;null===(e=this.host)||void 0===e||e.removeChild(t)})),this.formAssociated=this.createFormAssociatedElement(),this.formAssociated.setAttribute("data-form-associated",""),this.formAssociated.setAttribute("hidden",""),null===(f=this.host)||void 0===f||f.appendChild(this.formAssociated))}componentWillLoad(t){this.watchName(t.name),this.watchSyncValueBySelector(t.syncValueBySelector),this.watchAriaDetails(t.ariaDetails)}watchAriaDetails(t){l.apply(t,(t=>this.setRenderProp("ariaDetails",t)))}watchName(t){n.apply(t,(t=>{this.setRenderProp("name",t),this.setNameAttribute(t)})),void 0===t&&i("A name on input fields or switches is not strictly required, but it might be relevant for the autocomplete function and for the static submission of the input field.")}watchSyncValueBySelector(t){if(this.experimentalMode&&"string"==typeof t){this.setRenderProp("syncValueBySelector",t);const e=document.querySelector(t);e&&(this.syncToOwnInput=e)}}setNameAttribute(t){this.setAttribute("name",this.formAssociated,t)}createFormAssociatedElement(){switch(this.type){case"color":case"date":case"email":case"file":case"number":case"password":case"radio":case"range":case"text":{const t=document.createElement("input");return t.setAttribute("type",this.type),t}case"select":{const t=document.createElement("select");return t.setAttribute("multiple",""),t}case"textarea":return document.createElement("textarea");default:{const t=document.createElement("input");return t.setAttribute("type","hidden"),t}}}findHostWithShadowRoot(t){for(;null===(null==t?void 0:t.shadowRoot)&&t!==document.body;){const e=t.parentNode;t=11===(null==e?void 0:e.nodeType)&&"host"in e?e.host:1===(null==e?void 0:e.nodeType)?e:void 0}return t}setAttribute(t,e,i){if(this.experimentalMode)try{if("boolean"!=typeof(i="object"==typeof i&&null!==i?JSON.stringify(i):i)&&"number"!=typeof i&&"string"!=typeof i)throw new Error("Invalid value type: "+typeof i);null==e||e.setAttribute(t,`${i}`)}catch(i){null==e||e.removeAttribute(t)}}tryToStringifyValue(t){try{return"object"==typeof t&&null!==t?JSON.stringify(t).toString():null==t?null:t.toString()}catch(t){return s(`The form field raw value is not able to stringify! ${t}`),""}}syncValue(t,e,i){if(i)switch(this.type){case"file":"undefined"!=typeof FileList&&t instanceof FileList?i.files=t:i.value="";break;case"select":"SELECT"===i.tagName?this.syncSelectOptions(t,i):this.syncValueAttribute(e,i);break;case"radio":"string"==typeof e&&(i.setAttribute("value",e),i.setAttribute("checked",""),i.value=e);break;default:this.syncValueAttribute(e,i)}}syncSelectOptions(t,e){e.querySelectorAll("option").forEach((t=>{e.removeChild(t)})),(Array.isArray(t)?t:null==t?[]:[t]).forEach((t=>{const i=this.tryToStringifyValue(t);if("string"==typeof i){const t=document.createElement("option");t.setAttribute("value",i),t.setAttribute("selected",""),e.appendChild(t)}}))}syncValueAttribute(t,e){"string"==typeof t?(e.setAttribute("value",t),e.value=t):(e.removeAttribute("value"),e.value="")}}export{d as F,l as a}
4
+ import{g as t}from"./bootstrap.js";import{F as e,g as s,l as i}from"./bem-registry.js";import{c as o,b as n}from"./props-from-config.js";import{n as a}from"./component9.js";import{B as r}from"./behavior.js";const l=o("syncValueBySelector",void 0,n),c={optional:[a,l]},u=new Set(["KOL-COMBOBOX","KOL-INPUT-CHECKBOX","KOL-INPUT-COLOR","KOL-INPUT-DATE","KOL-INPUT-EMAIL","KOL-INPUT-FILE","KOL-INPUT-NUMBER","KOL-INPUT-PASSWORD","KOL-INPUT-RADIO","KOL-INPUT-RANGE","KOL-INPUT-TEXT","KOL-SELECT","KOL-SINGLE-SELECT","KOL-TEXTAREA"]);class h extends r{constructor(i,{host:o,type:n,name:a}){var r,l,h,d,f;super(i,c),this.experimentalMode=e(),this.setFormAssociatedValue=t=>{var e;const i=null===(e=this.formAssociated)||void 0===e?void 0:e.getAttribute("name");null!==i&&""!==i||s(` The form field (${this.type}) must have a name attribute to be form-associated. Please define the _name attribute.`);const o=this.tryToStringifyValue(t);this.syncValue(t,o,this.formAssociated),this.syncValue(t,o,this.syncToOwnInput)},this.host=this.findHostWithShadowRoot(o),this.type=n,(null===(r=t())||void 0===r?void 0:r.reflectInputValues)&&u.has(null!==(h=null===(l=this.host)||void 0===l?void 0:l.tagName)&&void 0!==h?h:"")&&a&&(null===(d=this.host)||void 0===d||d.querySelectorAll("input,select,textarea").forEach((t=>{var e;null===(e=this.host)||void 0===e||e.removeChild(t)})),this.formAssociated=this.createFormAssociatedElement(),this.formAssociated.setAttribute("data-form-associated",""),this.formAssociated.setAttribute("hidden",""),null===(f=this.host)||void 0===f||f.appendChild(this.formAssociated))}componentWillLoad(t){this.watchName(t.name),this.watchSyncValueBySelector(t.syncValueBySelector)}watchName(t){a.apply(t,(t=>{this.setRenderProp("name",t),this.setNameAttribute(t)})),void 0===t&&s("A name on input fields or switches is not strictly required, but it might be relevant for the autocomplete function and for the static submission of the input field.")}watchSyncValueBySelector(t){if(this.experimentalMode&&"string"==typeof t){this.setRenderProp("syncValueBySelector",t);const e=document.querySelector(t);e&&(this.syncToOwnInput=e)}}setNameAttribute(t){this.setAttribute("name",this.formAssociated,t)}createFormAssociatedElement(){switch(this.type){case"color":case"date":case"email":case"file":case"number":case"password":case"radio":case"range":case"text":{const t=document.createElement("input");return t.setAttribute("type",this.type),t}case"select":{const t=document.createElement("select");return t.setAttribute("multiple",""),t}case"textarea":return document.createElement("textarea");default:{const t=document.createElement("input");return t.setAttribute("type","hidden"),t}}}findHostWithShadowRoot(t){for(;null===(null==t?void 0:t.shadowRoot)&&t!==document.body;){const e=t.parentNode;t=11===(null==e?void 0:e.nodeType)&&"host"in e?e.host:1===(null==e?void 0:e.nodeType)?e:void 0}return t}setAttribute(t,e,s){if(this.experimentalMode)try{if("boolean"!=typeof(s="object"==typeof s&&null!==s?JSON.stringify(s):s)&&"number"!=typeof s&&"string"!=typeof s)throw new Error("Invalid value type: "+typeof s);null==e||e.setAttribute(t,`${s}`)}catch(s){null==e||e.removeAttribute(t)}}tryToStringifyValue(t){try{return"object"==typeof t&&null!==t?JSON.stringify(t).toString():null==t?null:t.toString()}catch(t){return i(`The form field raw value is not able to stringify! ${t}`),""}}syncValue(t,e,s){if(s)switch(this.type){case"file":"undefined"!=typeof FileList&&t instanceof FileList?s.files=t:s.value="";break;case"select":"SELECT"===s.tagName?this.syncSelectOptions(t,s):this.syncValueAttribute(e,s);break;case"radio":"string"==typeof e&&(s.setAttribute("value",e),s.setAttribute("checked",""),s.value=e);break;default:this.syncValueAttribute(e,s)}}syncSelectOptions(t,e){e.querySelectorAll("option").forEach((t=>{e.removeChild(t)})),(Array.isArray(t)?t:null==t?[]:[t]).forEach((t=>{const s=this.tryToStringifyValue(t);if("string"==typeof s){const t=document.createElement("option");t.setAttribute("value",s),t.setAttribute("selected",""),e.appendChild(t)}}))}syncValueAttribute(t,e){"string"==typeof t?(e.setAttribute("value",t),e.value=t):(e.removeAttribute("value"),e.value="")}}export{h as F}