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

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 (1160) 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 +24 -24
  7. package/dist/cjs/{Heading-CnnBHLhu.js → Heading-DgfHX8iO.js} +2 -2
  8. package/dist/cjs/{api-C-uDDxcA.js → api-Bco3zhNl.js} +30 -30
  9. package/dist/cjs/{app-globals-BfpVa0Lg.js → app-globals-BfjEc9BA.js} +5 -5
  10. package/dist/cjs/{base-BZ3x1Yaj.js → base-BlhVYuZN.js} +14 -14
  11. package/dist/cjs/{base-CeaAJa72.js → base-CaTF8Lsq.js} +10 -10
  12. package/dist/cjs/{base-BIbzHEVE.js → base-CaYE9fE3.js} +70 -36
  13. package/dist/cjs/{base-Cc2tyQoy.js → base-DRkg3lke.js} +13 -13
  14. package/dist/cjs/{base-web-component-B_zszxEg.js → base-web-component-BF8Oc_jN.js} +1 -1
  15. package/dist/cjs/{base-web-component-Dk-So1FD.js → base-web-component-CBcdTiXS.js} +11 -11
  16. package/dist/cjs/{base-web-component-CpqYvVDi.js → base-web-component-CZJc9Ld3.js} +15 -15
  17. package/dist/cjs/{behavior--ZjzmIB4.js → behavior-BsDVus9x.js} +9 -9
  18. package/dist/cjs/{behavior-cEIf2evT.js → behavior-DnJZI13z.js} +9 -9
  19. package/dist/cjs/{behavior-CYg7XOXd.js → behavior-OgRkvokv.js} +6 -6
  20. package/dist/cjs/{bem-registry-CtnO3zCW.js → bem-registry-_oyuMzRs.js} +2 -2
  21. package/dist/cjs/{bootstrap-DOzWgRGX.js → bootstrap-jLvMy9on.js} +5 -5
  22. package/dist/cjs/{color-BJ776mPh.js → color-CBtx0JEd.js} +4 -4
  23. package/dist/cjs/{component-DwuAKOV_.js → component-6M5X_cZt.js} +6 -6
  24. package/dist/cjs/{component-5ABjFE_U.js → component-BG4f8vbN.js} +6 -6
  25. package/dist/cjs/{component-C_9WksgV.js → component-BZT4ABhJ.js} +14 -14
  26. package/dist/cjs/{component-BacsMsF-.js → component-Bf1srWgT.js} +4 -4
  27. package/dist/cjs/{component-Ddp-Luc6.js → component-CYZ74d6d.js} +9 -9
  28. package/dist/cjs/{component-BSx0ZVSD.js → component-CZATN7e7.js} +10 -10
  29. package/dist/cjs/component-CcR692_g.js +178 -0
  30. package/dist/cjs/{component-BTfaB8W5.js → component-DD4gW4Wv.js} +3 -3
  31. package/dist/cjs/{component-D65WOH6c.js → component-DELokt1e.js} +7 -7
  32. package/dist/cjs/{component-DuknrIKz.js → component-G9OBs93q.js} +15 -15
  33. package/dist/cjs/{component-DVf7tz1e.js → component-b8Mw23VK.js} +5 -5
  34. package/dist/cjs/{contrast-DrGTr5zd.js → contrast-Dq0rQJv4.js} +5 -5
  35. package/dist/cjs/{controller-D66Eq44x.js → controller-CYSgD2og.js} +16 -16
  36. package/dist/cjs/{dev.utils-EwVibOKw.js → dev.utils-DbZjSMB_.js} +10 -10
  37. package/dist/cjs/{devtools-CEqUJI9f.js → devtools-Cf9tA39t.js} +24 -24
  38. package/dist/cjs/{disabled-DBnI2OR4.js → disabled-iY2F8CXF.js} +1 -1
  39. package/dist/cjs/{field-control-Jhzreo_j.js → field-control-C23Zk-tt.js} +8 -8
  40. package/dist/cjs/{group-DDmENjNB.js → group-CLctawrF.js} +5 -5
  41. package/dist/cjs/{has-closer-DIk_toj-.js → has-closer-DmnD5ziV.js} +1 -1
  42. package/dist/cjs/{href-_UE7179j.js → href-CPwjE6oZ.js} +1 -1
  43. package/dist/cjs/{i18n-4lKONPdP.js → i18n--y6dSQBm.js} +3 -3
  44. package/dist/cjs/{i18n-CuXZ7SEi.js → i18n-bT7xr2k5.js} +4 -4
  45. package/dist/cjs/{id-JbinnWCW.js → id-hO96Hkhh.js} +1 -1
  46. package/dist/cjs/{index-P8gY4ccL.js → index-B302UiQS.js} +2 -2
  47. package/dist/cjs/index.cjs.js +11 -11
  48. package/dist/cjs/{input-BYfPasa5.js → input-CypPMvU-.js} +5 -5
  49. package/dist/cjs/{input-container-BQlNjdk3.js → input-container-jziuknSu.js} +16 -16
  50. package/dist/cjs/{item-DSSJt2YS.js → item-BkH81iun.js} +8 -8
  51. package/dist/cjs/{item-C6gnuMjx.js → item-DO5SWoIT.js} +8 -8
  52. package/dist/cjs/{item-Dgikq96R.js → item-DyUR8LQP.js} +24 -24
  53. package/dist/cjs/{item-CvvVUcQZ.js → item-FIjcvq4Y.js} +14 -14
  54. package/dist/cjs/kol-abbr.cjs.entry.js +8 -8
  55. package/dist/cjs/kol-accordion.cjs.entry.js +18 -18
  56. package/dist/cjs/kol-alert.cjs.entry.js +27 -27
  57. package/dist/cjs/kol-avatar.cjs.entry.js +17 -20
  58. package/dist/cjs/kol-badge.cjs.entry.js +29 -29
  59. package/dist/cjs/kol-breadcrumb.cjs.entry.js +33 -33
  60. package/dist/cjs/kol-button-link.cjs.entry.js +26 -26
  61. package/dist/cjs/kol-button.cjs.entry.js +26 -26
  62. package/dist/cjs/kol-card.cjs.entry.js +57 -96
  63. package/dist/cjs/kol-combobox.cjs.entry.js +77 -77
  64. package/dist/cjs/kol-details.cjs.entry.js +18 -18
  65. package/dist/cjs/kol-dialog.cjs.entry.js +33 -33
  66. package/dist/cjs/kol-drawer.cjs.entry.js +32 -32
  67. package/dist/cjs/kol-form.cjs.entry.js +28 -28
  68. package/dist/cjs/kol-heading.cjs.entry.js +15 -15
  69. package/dist/cjs/kol-icon.cjs.entry.js +12 -12
  70. package/dist/cjs/kol-image.cjs.entry.js +20 -20
  71. package/dist/cjs/kol-input-checkbox.cjs.entry.js +70 -70
  72. package/dist/cjs/kol-input-color.cjs.entry.js +57 -57
  73. package/dist/cjs/kol-input-date.cjs.entry.js +70 -70
  74. package/dist/cjs/kol-input-email.cjs.entry.js +75 -75
  75. package/dist/cjs/kol-input-file.cjs.entry.js +52 -52
  76. package/dist/cjs/kol-input-number.cjs.entry.js +72 -72
  77. package/dist/cjs/kol-input-password.cjs.entry.js +74 -74
  78. package/dist/cjs/kol-input-radio.cjs.entry.js +53 -53
  79. package/dist/cjs/kol-input-range.cjs.entry.js +58 -58
  80. package/dist/cjs/kol-input-text.cjs.entry.js +87 -87
  81. package/dist/cjs/kol-kolibri.cjs.entry.js +8 -8
  82. package/dist/cjs/kol-link-button.cjs.entry.js +36 -36
  83. package/dist/cjs/kol-link.cjs.entry.js +34 -34
  84. package/dist/cjs/kol-meter.cjs.entry.js +19 -25
  85. package/dist/cjs/kol-modal.cjs.entry.js +33 -33
  86. package/dist/cjs/kol-nav.cjs.entry.js +38 -38
  87. package/dist/cjs/kol-pagination.cjs.entry.js +57 -57
  88. package/dist/cjs/kol-popover-button.cjs.entry.js +60 -95
  89. package/dist/cjs/kol-progress.cjs.entry.js +18 -21
  90. package/dist/cjs/kol-quote.cjs.entry.js +13 -13
  91. package/dist/cjs/kol-select.cjs.entry.js +63 -63
  92. package/dist/cjs/kol-single-select.cjs.entry.js +78 -78
  93. package/dist/cjs/kol-skip-nav.cjs.entry.js +32 -32
  94. package/dist/cjs/kol-spin.cjs.entry.js +23 -23
  95. package/dist/cjs/kol-split-button.cjs.entry.js +30 -30
  96. package/dist/cjs/kol-table-stateful.cjs.entry.js +112 -101
  97. package/dist/cjs/kol-table-stateless.cjs.entry.js +55 -55
  98. package/dist/cjs/kol-tabs.cjs.entry.js +36 -36
  99. package/dist/cjs/kol-textarea.cjs.entry.js +70 -70
  100. package/dist/cjs/kol-toast-container.cjs.entry.js +22 -22
  101. package/dist/cjs/kol-toolbar.cjs.entry.js +45 -45
  102. package/dist/cjs/kol-tooltip-wc.cjs.entry.js +13 -13
  103. package/dist/cjs/kol-tree-item.cjs.entry.js +31 -31
  104. package/dist/cjs/kol-tree.cjs.entry.js +10 -10
  105. package/dist/cjs/kol-version.cjs.entry.js +23 -23
  106. package/dist/cjs/kolibri.cjs.js +4 -4
  107. package/dist/cjs/{label-BAULqhwq.js → label-D2VlEzVW.js} +3 -3
  108. package/dist/cjs/{label-hints-BHw-UcMt.js → label-hints-CeYTIMWM.js} +4 -4
  109. package/dist/cjs/{label-lang-segment-D_UYFhgr.js → label-lang-segment-n4JXXvXq.js} +2 -2
  110. package/dist/cjs/{label-with-expert-slot-XZTOiRp-.js → label-with-expert-slot-BMZi_Wf-.js} +3 -3
  111. package/dist/cjs/{level-CaJUuMiH.js → level-zFWeAW3T.js} +1 -1
  112. package/dist/cjs/{link-target-EZq24qVX.js → link-target-CHHUlWut.js} +1 -1
  113. package/dist/cjs/{links-CNPivOpm.js → links-DNq836FP.js} +3 -3
  114. package/dist/cjs/loader.cjs.js +4 -4
  115. package/dist/cjs/{multiple-D4ktp4Q2.js → multiple-CqTw5Zl-.js} +1 -1
  116. package/dist/cjs/{number-value-BzIR1UvL.js → number-value-CI4C8lZR.js} +3 -2
  117. package/dist/cjs/{open-BYh5VAA1.js → open-CMvvGqsm.js} +1 -1
  118. package/dist/cjs/{options-DkF38kx_.js → options-TlEddxWf.js} +3 -3
  119. package/dist/cjs/{orientation-D4yopkvP.js → orientation-Bw6xTtO9.js} +1 -1
  120. package/dist/cjs/{placeholder-CZOGOuLS.js → placeholder-DuCgyrEW.js} +1 -1
  121. package/dist/cjs/{common-CzGJx0nT.js → prop.validators-C4SLGjLp.js} +24 -91
  122. package/dist/cjs/{props-from-config-CiU21EHb.js → props-from-config-DaGKZuLa.js} +66 -71
  123. package/dist/cjs/{read-only-PNG5jHgh.js → read-only-5clAe4ux.js} +1 -1
  124. package/dist/cjs/{required-mj54_vO_.js → required-G3fEcN7P.js} +1 -1
  125. package/dist/cjs/{resolve-props-CH6OL2es.js → resolve-props-Bbb07BLa.js} +8 -8
  126. package/dist/cjs/{resolve-props-DOnocHFi.js → resolve-props-Csah9JNe.js} +8 -8
  127. package/dist/cjs/{rows-YaAnXjAm.js → rows-DTo_lgOT.js} +1 -1
  128. package/dist/cjs/{scroll-lock-D3pgiG8q.js → scroll-lock-BhxtYYKV.js} +3 -3
  129. package/dist/cjs/{smart-button-BU7mWP5H.js → smart-button-BN5aGm8g.js} +3 -3
  130. package/dist/cjs/{spell-check-CZWiLkQE.js → spell-check-Dv6XW8fA.js} +1 -1
  131. package/dist/cjs/{src-rB2yGTSn.js → src-BaxsjPdd.js} +1 -1
  132. package/dist/cjs/{step-Bo6ILIqa.js → step-yJC7o2qO.js} +1 -1
  133. package/dist/cjs/{suggestions-Ca575hi-.js → suggestions-Bk2UPut-.js} +3 -3
  134. package/dist/cjs/{suggestions-BO4EvOXc.js → suggestions-Bn2BAzI8.js} +4 -4
  135. package/dist/cjs/test-component.cjs.entry.js +2 -2
  136. package/dist/cjs/{toggle-handler-ByJYSOdb.js → toggle-handler-BXGDSkBB.js} +9 -9
  137. package/dist/cjs/{unique-nav-labels-_EHPpYUR.js → unique-nav-labels-CNsmbg7l.js} +3 -3
  138. package/dist/cjs/{unit-Bl0Lyk08.js → unit-Zuxajtin.js} +1 -1
  139. package/dist/cjs/{validators-rLs6tEWo.js → validators-DRNw98Il.js} +1 -1
  140. package/dist/cjs/{value-string-BKsvZy1q.js → value-string-BEW6PiK0.js} +1 -1
  141. package/dist/cjs/{width-DegQFxQB.js → width-BMlp2iV4.js} +1 -1
  142. package/dist/collection/components/abbr/component.js +1 -1
  143. package/dist/collection/components/accordion/component.js +1 -1
  144. package/dist/collection/components/accordion/style.css +2 -2
  145. package/dist/collection/components/alert/component.js +3 -3
  146. package/dist/collection/components/alert/style.css +2 -2
  147. package/dist/collection/components/avatar/component.js +4 -7
  148. package/dist/collection/components/badge/component.js +4 -4
  149. package/dist/collection/components/badge/style.css +2 -2
  150. package/dist/collection/components/breadcrumb/component.js +3 -3
  151. package/dist/collection/components/breadcrumb/style.css +2 -2
  152. package/dist/collection/components/button/base.js +1 -1
  153. package/dist/collection/components/button/component.js +3 -3
  154. package/dist/collection/components/button/style.css +2 -2
  155. package/dist/collection/components/button-link/component.js +3 -3
  156. package/dist/collection/components/button-link/style.css +2 -2
  157. package/dist/collection/components/card/component.js +53 -18
  158. package/dist/collection/components/card/style.css +2 -2
  159. package/dist/collection/components/combobox/component.js +115 -115
  160. package/dist/collection/components/combobox/style.css +2 -2
  161. package/dist/collection/components/details/component.js +1 -1
  162. package/dist/collection/components/details/style.css +2 -2
  163. package/dist/collection/components/dialog/component.js +5 -5
  164. package/dist/collection/components/dialog/style.css +2 -2
  165. package/dist/collection/components/drawer/component.js +3 -3
  166. package/dist/collection/components/drawer/style.css +2 -2
  167. package/dist/collection/components/form/component.js +3 -3
  168. package/dist/collection/components/form/style.css +2 -2
  169. package/dist/collection/components/heading/component.js +4 -4
  170. package/dist/collection/components/icon/component.js +3 -3
  171. package/dist/collection/components/icon/style.css +2 -2
  172. package/dist/collection/components/image/component.js +39 -39
  173. package/dist/collection/components/input-checkbox/component.js +111 -111
  174. package/dist/collection/components/input-checkbox/style.css +2 -2
  175. package/dist/collection/components/input-color/component.js +39 -39
  176. package/dist/collection/components/input-color/style.css +2 -2
  177. package/dist/collection/components/input-date/component.js +78 -78
  178. package/dist/collection/components/input-date/style.css +2 -2
  179. package/dist/collection/components/input-email/component.js +86 -86
  180. package/dist/collection/components/input-email/style.css +2 -2
  181. package/dist/collection/components/input-file/component.js +34 -34
  182. package/dist/collection/components/input-file/style.css +2 -2
  183. package/dist/collection/components/input-number/component.js +68 -68
  184. package/dist/collection/components/input-number/style.css +2 -2
  185. package/dist/collection/components/input-password/component.js +87 -87
  186. package/dist/collection/components/input-password/style.css +2 -2
  187. package/dist/collection/components/input-radio/component.js +36 -36
  188. package/dist/collection/components/input-radio/style.css +2 -2
  189. package/dist/collection/components/input-range/component.js +39 -39
  190. package/dist/collection/components/input-range/style.css +2 -2
  191. package/dist/collection/components/input-text/component.js +145 -145
  192. package/dist/collection/components/input-text/style.css +2 -2
  193. package/dist/collection/components/kolibri/component.js +1 -1
  194. package/dist/collection/components/link/base.js +1 -1
  195. package/dist/collection/components/link/component.js +26 -26
  196. package/dist/collection/components/link/style.css +2 -2
  197. package/dist/collection/components/link-button/component.js +27 -27
  198. package/dist/collection/components/link-button/style.css +2 -2
  199. package/dist/collection/components/meter/component.js +6 -12
  200. package/dist/collection/components/modal/component.js +5 -5
  201. package/dist/collection/components/modal/style.css +2 -2
  202. package/dist/collection/components/nav/component.js +2 -2
  203. package/dist/collection/components/nav/style.css +2 -2
  204. package/dist/collection/components/pagination/component.js +85 -85
  205. package/dist/collection/components/pagination/style.css +2 -2
  206. package/dist/collection/components/popover-button/component.js +40 -11
  207. package/dist/collection/components/popover-button/style.css +2 -2
  208. package/dist/collection/components/progress/component.js +5 -8
  209. package/dist/collection/components/public-api/contract.js +46 -6
  210. package/dist/collection/components/quote/component.js +5 -5
  211. package/dist/collection/components/select/component.js +61 -61
  212. package/dist/collection/components/select/style.css +2 -2
  213. package/dist/collection/components/single-select/component.js +134 -134
  214. package/dist/collection/components/single-select/style.css +2 -2
  215. package/dist/collection/components/skip-nav/component.js +2 -2
  216. package/dist/collection/components/skip-nav/style.css +2 -2
  217. package/dist/collection/components/spin/component.js +29 -29
  218. package/dist/collection/components/spin/style.css +8 -1
  219. package/dist/collection/components/split-button/component.js +5 -5
  220. package/dist/collection/components/split-button/style.css +2 -2
  221. package/dist/collection/components/table-stateful/component.js +107 -113
  222. package/dist/collection/components/table-stateful/style.css +11 -4
  223. package/dist/collection/components/table-stateless/base.js +7 -1
  224. package/dist/collection/components/table-stateless/component.js +53 -53
  225. package/dist/collection/components/table-stateless/style.css +11 -4
  226. package/dist/collection/components/tabs/component.js +12 -12
  227. package/dist/collection/components/tabs/style.css +3 -3
  228. package/dist/collection/components/textarea/component.js +88 -88
  229. package/dist/collection/components/textarea/style.css +2 -2
  230. package/dist/collection/components/toaster/shadow.js +3 -3
  231. package/dist/collection/components/toaster/style.css +2 -2
  232. package/dist/collection/components/toolbar/component.js +33 -33
  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 +2 -2
  236. package/dist/collection/components/tree-item/component.js +35 -35
  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/global/script.js +1 -1
  241. package/dist/collection/index.js +1 -1
  242. package/dist/collection/internal/functional-components/breadcrumb/link-item.js +2 -2
  243. package/dist/collection/internal/functional-components/button/item.js +3 -3
  244. package/dist/collection/internal/functional-components/counter/api.js +1 -1
  245. package/dist/collection/internal/functional-components/dialog/item.js +2 -2
  246. package/dist/collection/{components → internal/functional-components}/form/controller.js +2 -2
  247. package/dist/collection/internal/functional-components/form/error-link-item.js +2 -2
  248. package/dist/collection/internal/functional-components/form-field/base-web-component.js +7 -7
  249. package/dist/collection/internal/functional-components/form-field/msg.js +2 -2
  250. package/dist/collection/internal/functional-components/form-field/number-value.js +1 -1
  251. package/dist/collection/internal/functional-components/link/api.js +1 -1
  252. package/dist/collection/internal/functional-components/link/component.js +1 -1
  253. package/dist/collection/internal/functional-components/link/item.js +3 -3
  254. package/dist/collection/internal/functional-components/pagination/item.js +1 -1
  255. package/dist/collection/internal/functional-components/popover-button/item.js +2 -2
  256. package/dist/collection/internal/functional-components/progress/api.js +1 -1
  257. package/dist/collection/internal/functional-components/skip-nav/api.js +1 -1
  258. package/dist/collection/internal/functional-components/skip-nav/link-item.js +2 -2
  259. package/dist/collection/internal/functional-components/table-stateful/component.js +17 -0
  260. package/dist/collection/internal/functional-components/table-stateful/model.js +11 -7
  261. package/dist/collection/internal/functional-components/table-stateless/component.js +6 -3
  262. package/dist/collection/internal/functional-components/table-stateless/selection-tooltip-item.js +29 -0
  263. package/dist/collection/internal/functional-components/table-stateless/settings.js +2 -2
  264. package/dist/collection/internal/functional-components/tabs/button-item.js +2 -2
  265. package/dist/collection/internal/functional-components/text-input/base-web-component.js +1 -1
  266. package/dist/collection/internal/functional-components/toolbar/{item.js → entry-item.js} +5 -5
  267. package/dist/collection/internal/props/helpers/factory.js +1 -1
  268. package/dist/collection/internal/props/helpers/normalizers.js +2 -5
  269. package/dist/collection/internal/props/index.js +0 -1
  270. package/dist/collection/locales/de.js +2 -2
  271. package/dist/collection/locales/en.js +2 -2
  272. package/dist/collection/schema/components/index.js +0 -30
  273. package/dist/collection/schema/props/accept.js +1 -7
  274. package/dist/collection/schema/props/access-key.js +1 -7
  275. package/dist/collection/schema/props/active.js +1 -7
  276. package/dist/collection/schema/props/adjust-height.js +1 -7
  277. package/dist/collection/schema/props/alert-type.js +0 -7
  278. package/dist/collection/schema/props/align.js +0 -4
  279. package/dist/collection/schema/props/allow-multi-sort.js +1 -7
  280. package/dist/collection/schema/props/alt.js +1 -7
  281. package/dist/collection/schema/props/alternative-button-link-role.js +1 -8
  282. package/dist/collection/schema/props/aria-controls.js +1 -7
  283. package/dist/collection/schema/props/aria-current-value.js +1 -10
  284. package/dist/collection/schema/props/aria-description.js +1 -7
  285. package/dist/collection/schema/props/aria-expanded.js +1 -7
  286. package/dist/collection/schema/props/aria-labelledby.js +6 -4
  287. package/dist/collection/schema/props/aria-owns.js +1 -9
  288. package/dist/collection/schema/props/aria-selected.js +1 -7
  289. package/dist/collection/schema/props/auto-complete.js +0 -6
  290. package/dist/collection/schema/props/badge-text.js +1 -7
  291. package/dist/collection/schema/props/button-callbacks.js +1 -7
  292. package/dist/collection/schema/props/button-type.js +1 -8
  293. package/dist/collection/schema/props/button-variant.js +1 -10
  294. package/dist/collection/schema/props/checked.js +1 -7
  295. package/dist/collection/schema/props/collapsible.js +1 -7
  296. package/dist/collection/schema/props/color.js +1 -14
  297. package/dist/collection/schema/props/current-length.js +1 -7
  298. package/dist/collection/schema/props/custom-class.js +1 -9
  299. package/dist/collection/schema/props/disabled.js +1 -15
  300. package/dist/collection/schema/props/download.js +1 -7
  301. package/dist/collection/schema/props/error-list.js +1 -14
  302. package/dist/collection/schema/props/has-closer.js +1 -7
  303. package/dist/collection/schema/props/has-compact-button.js +1 -7
  304. package/dist/collection/schema/props/has-counter.js +1 -7
  305. package/dist/collection/schema/props/has-create-button.js +1 -7
  306. package/dist/collection/schema/props/has-icons-when-expanded.js +1 -7
  307. package/dist/collection/schema/props/has-settings-menu.js +1 -7
  308. package/dist/collection/schema/props/has-value.js +1 -7
  309. package/dist/collection/schema/props/hide-label.js +1 -7
  310. package/dist/collection/schema/props/hide-msg.js +1 -7
  311. package/dist/collection/schema/props/hint.js +1 -7
  312. package/dist/collection/schema/props/href.js +1 -7
  313. package/dist/collection/schema/props/icons-input-checkbox.js +1 -18
  314. package/dist/collection/schema/props/icons.js +0 -43
  315. package/dist/collection/schema/props/id.js +1 -7
  316. package/dist/collection/schema/props/image-sizes.js +1 -7
  317. package/dist/collection/schema/props/image-source.js +1 -7
  318. package/dist/collection/schema/props/image-srcset.js +1 -7
  319. package/dist/collection/schema/props/indeterminate.js +1 -7
  320. package/dist/collection/schema/props/index.js +4 -0
  321. package/dist/collection/schema/props/inline.js +1 -7
  322. package/dist/collection/schema/props/label-align.js +1 -8
  323. package/dist/collection/schema/props/label.js +0 -35
  324. package/dist/collection/schema/props/link-on-callbacks.js +1 -8
  325. package/dist/collection/schema/props/link-target.js +1 -7
  326. package/dist/collection/schema/props/loading.js +1 -8
  327. package/dist/collection/schema/props/max-length-behavior.js +1 -8
  328. package/dist/collection/schema/props/max-length.js +1 -7
  329. package/dist/collection/schema/props/max.js +1 -7
  330. package/dist/collection/schema/props/modal.js +1 -7
  331. package/dist/collection/schema/props/msg.js +1 -24
  332. package/dist/collection/schema/props/multiple.js +1 -7
  333. package/dist/collection/schema/props/name.js +1 -7
  334. package/dist/collection/schema/props/open.js +1 -7
  335. package/dist/collection/schema/props/options.js +1 -11
  336. package/dist/collection/schema/props/orientation.js +1 -10
  337. package/dist/collection/schema/props/pagination-position.js +1 -10
  338. package/dist/collection/schema/props/pattern.js +1 -7
  339. package/dist/collection/schema/props/placeholder.js +1 -7
  340. package/dist/collection/schema/props/popover-align.js +1 -7
  341. package/dist/collection/schema/props/read-only.js +1 -7
  342. package/dist/collection/schema/props/required.js +1 -7
  343. package/dist/collection/schema/props/resize-textarea.js +0 -9
  344. package/dist/collection/schema/props/rows.js +1 -7
  345. package/dist/collection/schema/props/short-key.js +1 -7
  346. package/dist/collection/schema/props/show.js +1 -7
  347. package/dist/collection/schema/props/spell-check.js +1 -9
  348. package/dist/collection/schema/props/suggestions.js +1 -16
  349. package/dist/collection/schema/props/tab-behavior.js +1 -8
  350. package/dist/collection/schema/props/tab-index.js +1 -16
  351. package/dist/collection/schema/props/table-callbacks.js +1 -10
  352. package/dist/collection/schema/props/table-data-foot.js +1 -21
  353. package/dist/collection/schema/props/table-data.js +1 -21
  354. package/dist/collection/schema/props/table-fixed-cols.js +1 -14
  355. package/dist/collection/schema/props/table-header-cells.js +1 -36
  356. package/dist/collection/schema/props/table-selection.js +1 -22
  357. package/dist/collection/schema/props/toolbar-items.js +1 -21
  358. package/dist/collection/schema/props/tooltip-align.js +1 -7
  359. package/dist/collection/schema/props/touched.js +1 -7
  360. package/dist/collection/schema/props/type-input-date.js +0 -7
  361. package/dist/collection/schema/props/type-input-text.js +0 -7
  362. package/dist/collection/schema/props/unit.js +1 -7
  363. package/dist/collection/schema/props/variant/dialog.js +1 -8
  364. package/dist/collection/schema/props/variant/modal.js +1 -4
  365. package/dist/collection/schema/props/variant/password-variant.js +1 -8
  366. package/dist/collection/schema/props/variant-alert.js +0 -7
  367. package/dist/collection/schema/props/variant-class-name.js +0 -33
  368. package/dist/collection/schema/props/variant-input-checkbox.js +0 -7
  369. package/dist/collection/schema/props/variant-progress.js +0 -7
  370. package/dist/collection/schema/props/visibility-toggle.js +1 -7
  371. package/dist/collection/schema/props/width.js +1 -7
  372. package/dist/collection/schema/utils/contrast.js +1 -1
  373. package/dist/collection/schema/utils/prop.validators.js +1 -132
  374. package/dist/collection/schema/validators/common.js +4 -0
  375. package/dist/collection/schema/validators/index.js +0 -1
  376. package/dist/collection/utils/dev.utils.js +1 -2
  377. package/dist/collection/utils/markdown.js +49 -3
  378. package/dist/collection/utils/testing/logged-messages.js +4 -0
  379. package/dist/collection/utils/testing/snapshot-input-testing.js +1 -1
  380. package/dist/collection/utils/testing/snapshot-testing.js +2 -1
  381. package/dist/components/base-web-component2.js +1 -1
  382. package/dist/components/base-web-component3.js +1 -1
  383. package/dist/components/base-web-component4.js +1 -1
  384. package/dist/components/base.js +1 -1
  385. package/dist/components/base2.js +1 -1
  386. package/dist/components/base3.js +1 -1
  387. package/dist/components/base4.js +1 -1
  388. package/dist/components/behavior.js +1 -1
  389. package/dist/components/behavior2.js +1 -1
  390. package/dist/components/behavior3.js +1 -1
  391. package/dist/components/bem-registry.js +1 -1
  392. package/dist/components/bootstrap.js +1 -1
  393. package/dist/components/component2.js +1 -1
  394. package/dist/components/component5.js +1 -1
  395. package/dist/components/component6.js +1 -1
  396. package/dist/components/component8.js +1 -1
  397. package/dist/components/contrast.js +1 -1
  398. package/dist/components/dev.utils.js +1 -1
  399. package/dist/components/devtools.js +1 -1
  400. package/dist/components/i18n.js +1 -1
  401. package/dist/components/i18n2.js +1 -1
  402. package/dist/components/index.js +1 -1
  403. package/dist/components/input-container.js +1 -1
  404. package/dist/components/item.js +1 -1
  405. package/dist/components/item2.js +1 -1
  406. package/dist/components/item3.js +1 -1
  407. package/dist/components/item4.js +1 -1
  408. package/dist/components/kol-abbr.js +1 -1
  409. package/dist/components/kol-accordion.js +1 -1
  410. package/dist/components/kol-alert.js +1 -1
  411. package/dist/components/kol-avatar.js +1 -1
  412. package/dist/components/kol-badge.js +1 -1
  413. package/dist/components/kol-breadcrumb.js +1 -1
  414. package/dist/components/kol-button-link.js +1 -1
  415. package/dist/components/kol-button.js +1 -1
  416. package/dist/components/kol-card.js +1 -1
  417. package/dist/components/kol-combobox.js +1 -1
  418. package/dist/components/kol-details.js +1 -1
  419. package/dist/components/kol-dialog.js +1 -1
  420. package/dist/components/kol-drawer.js +1 -1
  421. package/dist/components/kol-form.js +1 -1
  422. package/dist/components/kol-heading.js +1 -1
  423. package/dist/components/kol-icon.js +1 -1
  424. package/dist/components/kol-image.js +1 -1
  425. package/dist/components/kol-input-checkbox.js +1 -1
  426. package/dist/components/kol-input-color.js +1 -1
  427. package/dist/components/kol-input-date.js +1 -1
  428. package/dist/components/kol-input-email.js +1 -1
  429. package/dist/components/kol-input-file.js +1 -1
  430. package/dist/components/kol-input-number.js +1 -1
  431. package/dist/components/kol-input-password.js +1 -1
  432. package/dist/components/kol-input-radio.js +1 -1
  433. package/dist/components/kol-input-range.js +1 -1
  434. package/dist/components/kol-input-text.js +1 -1
  435. package/dist/components/kol-kolibri.js +1 -1
  436. package/dist/components/kol-link-button.js +1 -1
  437. package/dist/components/kol-link.js +1 -1
  438. package/dist/components/kol-meter.js +1 -1
  439. package/dist/components/kol-modal.js +1 -1
  440. package/dist/components/kol-nav.js +1 -1
  441. package/dist/components/kol-pagination.js +1 -1
  442. package/dist/components/kol-popover-button.js +1 -1
  443. package/dist/components/kol-progress.js +1 -1
  444. package/dist/components/kol-quote.js +1 -1
  445. package/dist/components/kol-select.js +1 -1
  446. package/dist/components/kol-single-select.js +1 -1
  447. package/dist/components/kol-skip-nav.js +1 -1
  448. package/dist/components/kol-spin.js +1 -1
  449. package/dist/components/kol-split-button.js +1 -1
  450. package/dist/components/kol-table-stateful.js +1 -1
  451. package/dist/components/kol-table-stateless.js +1 -1
  452. package/dist/components/kol-tabs.js +1 -1
  453. package/dist/components/kol-textarea.js +1 -1
  454. package/dist/components/kol-toast-container.js +1 -1
  455. package/dist/components/kol-toolbar.js +1 -1
  456. package/dist/components/kol-tooltip-wc.js +1 -1
  457. package/dist/components/kol-tree-item.js +1 -1
  458. package/dist/components/kol-tree.js +1 -1
  459. package/dist/components/kol-version.js +1 -1
  460. package/dist/components/label-hints.js +1 -1
  461. package/dist/components/label-lang-segment.js +1 -1
  462. package/dist/components/label-with-expert-slot.js +1 -1
  463. package/dist/components/level.js +1 -1
  464. package/dist/components/number-value.js +1 -1
  465. package/dist/components/props-from-config.js +1 -1
  466. package/dist/components/rows.js +1 -1
  467. package/dist/components/unit.js +1 -1
  468. package/dist/components/validators.js +1 -1
  469. package/dist/esm/{Heading-BubZbykM.js → Heading-Cjeak0Ip.js} +2 -2
  470. package/dist/esm/{api-D0RNr-zh.js → api-lgc52EwH.js} +27 -27
  471. package/dist/esm/{app-globals-DYRte_jr.js → app-globals-CJI5vjfG.js} +3 -3
  472. package/dist/esm/{base-BbGt9eYx.js → base-4vZOpHqg.js} +12 -12
  473. package/dist/esm/{base-BP5SdLvQ.js → base-CrFm3Vt_.js} +66 -32
  474. package/dist/esm/{base-Cz00snD6.js → base-DyVivWCE.js} +12 -12
  475. package/dist/esm/{base-CLsKm3-e.js → base-jUFiFkFq.js} +10 -10
  476. package/dist/esm/{base-web-component-DP9_OPgV.js → base-web-component-BhT6Ab3x.js} +15 -15
  477. package/dist/esm/{base-web-component-CdSFFCst.js → base-web-component-Ci40K_CL.js} +9 -9
  478. package/dist/esm/{base-web-component-CYPdDdRn.js → base-web-component-puo2mSiH.js} +1 -1
  479. package/dist/esm/{behavior-DlH8byIw.js → behavior-BOUrKwXj.js} +5 -5
  480. package/dist/esm/{behavior-BJR8CKBx.js → behavior-BeStbAbq.js} +6 -6
  481. package/dist/esm/{behavior-B6y5Gofe.js → behavior-vf9LgKnJ.js} +5 -5
  482. package/dist/esm/{bem-registry-SKACeCny.js → bem-registry-jPrVOPGX.js} +1 -1
  483. package/dist/esm/{bootstrap-Bp7i4RJQ.js → bootstrap-tModZ1Zn.js} +2 -2
  484. package/dist/esm/{color-BbljGuAW.js → color-BBs35rDv.js} +3 -3
  485. package/dist/esm/{component-ZdHnXLLI.js → component-8rE7KeIV.js} +9 -9
  486. package/dist/esm/{component-bIIx1x7q.js → component-B2hvPtlq.js} +3 -3
  487. package/dist/esm/{component-DEwcJKDA.js → component-BGqaexiY.js} +5 -5
  488. package/dist/esm/{component-B8UMedaK.js → component-C3fJM1FJ.js} +4 -4
  489. package/dist/esm/{component-CMHB3reH.js → component-C5YYCLBG.js} +5 -5
  490. package/dist/esm/{component-CiJGQTU0.js → component-CYv5K14M.js} +14 -14
  491. package/dist/esm/{component-CNgECeRi.js → component-ComtEOJP.js} +10 -10
  492. package/dist/esm/{component-6_YiKr2Z.js → component-CtnZeJ8i.js} +14 -14
  493. package/dist/esm/{component-CSsUaL_h.js → component-CuBrmISS.js} +7 -7
  494. package/dist/esm/component-CuPl7i5J.js +173 -0
  495. package/dist/esm/{component-NOe28NXD.js → component-DzwUKDj3.js} +6 -6
  496. package/dist/esm/{contrast-DtK0a6X2.js → contrast-DiGJSn0q.js} +2 -2
  497. package/dist/esm/{controller-CZcQ57AP.js → controller-BNVDUbSt.js} +1 -1
  498. package/dist/esm/{dev.utils-B0t4rcBV.js → dev.utils-CS2a1Xpz.js} +2 -2
  499. package/dist/esm/{devtools-DuJRc6wJ.js → devtools-DDKKBFlN.js} +3 -3
  500. package/dist/esm/{disabled-B2o4Ctgy.js → disabled-CnKpxKzf.js} +1 -1
  501. package/dist/esm/{field-control-C9dIXnES.js → field-control-BRw1DpB2.js} +8 -8
  502. package/dist/esm/{group-DydT1Z92.js → group-CeF4yHhL.js} +5 -5
  503. package/dist/esm/{has-closer-BrG00xL7.js → has-closer-DYgccfEw.js} +1 -1
  504. package/dist/esm/{href-CfNF4pHX.js → href-BJ2DdiWo.js} +1 -1
  505. package/dist/esm/{i18n-BRgvVqCf.js → i18n-6bNr_AKM.js} +4 -4
  506. package/dist/esm/{i18n-BLkzMf6D.js → i18n-DsSD0Coa.js} +2 -2
  507. package/dist/esm/{id-Bh4FF8c0.js → id-BBQitGSa.js} +1 -1
  508. package/dist/esm/{index-Bbr6Os1b.js → index-BFGAlyrC.js} +2 -2
  509. package/dist/esm/index.js +7 -7
  510. package/dist/esm/{input-C1YsxnDL.js → input-Br0RXmck.js} +5 -5
  511. package/dist/esm/{input-container-zXl_6y52.js → input-container-C8HGQnts.js} +7 -7
  512. package/dist/esm/{item-DXDEHrEg.js → item-BHmWBVJU.js} +7 -7
  513. package/dist/esm/{item-zXunNZh5.js → item-C0BsuFnx.js} +21 -21
  514. package/dist/esm/{item-Dms_59sU.js → item-CKABE_5V.js} +13 -13
  515. package/dist/esm/{item-hsQoejqZ.js → item-D-uF2_uB.js} +7 -7
  516. package/dist/esm/kol-abbr.entry.js +8 -8
  517. package/dist/esm/kol-accordion.entry.js +17 -17
  518. package/dist/esm/kol-alert.entry.js +27 -27
  519. package/dist/esm/kol-avatar.entry.js +17 -20
  520. package/dist/esm/kol-badge.entry.js +26 -26
  521. package/dist/esm/kol-breadcrumb.entry.js +30 -30
  522. package/dist/esm/kol-button-link.entry.js +26 -26
  523. package/dist/esm/kol-button.entry.js +26 -26
  524. package/dist/esm/kol-card.entry.js +58 -97
  525. package/dist/esm/kol-combobox.entry.js +77 -77
  526. package/dist/esm/kol-details.entry.js +17 -17
  527. package/dist/esm/kol-dialog.entry.js +33 -33
  528. package/dist/esm/kol-drawer.entry.js +32 -32
  529. package/dist/esm/kol-form.entry.js +27 -27
  530. package/dist/esm/kol-heading.entry.js +15 -15
  531. package/dist/esm/kol-icon.entry.js +12 -12
  532. package/dist/esm/kol-image.entry.js +20 -20
  533. package/dist/esm/kol-input-checkbox.entry.js +70 -70
  534. package/dist/esm/kol-input-color.entry.js +57 -57
  535. package/dist/esm/kol-input-date.entry.js +69 -69
  536. package/dist/esm/kol-input-email.entry.js +75 -75
  537. package/dist/esm/kol-input-file.entry.js +52 -52
  538. package/dist/esm/kol-input-number.entry.js +71 -71
  539. package/dist/esm/kol-input-password.entry.js +73 -73
  540. package/dist/esm/kol-input-radio.entry.js +53 -53
  541. package/dist/esm/kol-input-range.entry.js +58 -58
  542. package/dist/esm/kol-input-text.entry.js +87 -87
  543. package/dist/esm/kol-kolibri.entry.js +8 -8
  544. package/dist/esm/kol-link-button.entry.js +35 -35
  545. package/dist/esm/kol-link.entry.js +34 -34
  546. package/dist/esm/kol-meter.entry.js +19 -25
  547. package/dist/esm/kol-modal.entry.js +33 -33
  548. package/dist/esm/kol-nav.entry.js +36 -36
  549. package/dist/esm/kol-pagination.entry.js +57 -57
  550. package/dist/esm/kol-popover-button.entry.js +60 -95
  551. package/dist/esm/kol-progress.entry.js +18 -21
  552. package/dist/esm/kol-quote.entry.js +13 -13
  553. package/dist/esm/kol-select.entry.js +63 -63
  554. package/dist/esm/kol-single-select.entry.js +78 -78
  555. package/dist/esm/kol-skip-nav.entry.js +30 -30
  556. package/dist/esm/kol-spin.entry.js +23 -23
  557. package/dist/esm/kol-split-button.entry.js +30 -30
  558. package/dist/esm/kol-table-stateful.entry.js +108 -97
  559. package/dist/esm/kol-table-stateless.entry.js +55 -55
  560. package/dist/esm/kol-tabs.entry.js +32 -32
  561. package/dist/esm/kol-textarea.entry.js +70 -70
  562. package/dist/esm/kol-toast-container.entry.js +21 -21
  563. package/dist/esm/kol-toolbar.entry.js +42 -42
  564. package/dist/esm/kol-tooltip-wc.entry.js +13 -13
  565. package/dist/esm/kol-tree-item.entry.js +31 -31
  566. package/dist/esm/kol-tree.entry.js +10 -10
  567. package/dist/esm/kol-version.entry.js +23 -23
  568. package/dist/esm/kolibri.js +5 -5
  569. package/dist/esm/{label-BQVd3bkc.js → label-DQC6csvN.js} +3 -3
  570. package/dist/esm/{label-hints-CZGo9ZD5.js → label-hints-Y3Zh7X3N.js} +2 -2
  571. package/dist/esm/{label-lang-segment-C5LYGOHt.js → label-lang-segment-BnLCd3lO.js} +2 -2
  572. package/dist/esm/{label-with-expert-slot-D1tpX9DI.js → label-with-expert-slot-BxbzJ0aJ.js} +3 -3
  573. package/dist/esm/{level-BVXGgbSM.js → level-BaaaBkKR.js} +1 -1
  574. package/dist/esm/{link-target-BWPSEd9a.js → link-target-BgH0UuzW.js} +1 -1
  575. package/dist/esm/{links-BbsnNXfa.js → links-DnB1I1Gi.js} +2 -2
  576. package/dist/esm/loader.js +5 -5
  577. package/dist/esm/{multiple-S3Ol1G6Z.js → multiple-CoXuIBC5.js} +1 -1
  578. package/dist/esm/{number-value-DmOl1z7z.js → number-value-MjxRVb0R.js} +2 -1
  579. package/dist/esm/{open-DPP79Urq.js → open-DBrDqNNt.js} +1 -1
  580. package/dist/esm/{options-aA3M-QV2.js → options-CQrFWcRm.js} +2 -2
  581. package/dist/esm/{orientation-DlsgaY1v.js → orientation-Dd57TF4f.js} +1 -1
  582. package/dist/esm/{placeholder-DlHbiVjz.js → placeholder-C2TRH0yn.js} +1 -1
  583. package/dist/esm/{common-BdSzSIXg.js → prop.validators-kX7xC6qj.js} +23 -91
  584. package/dist/esm/{props-from-config-BOUcpF7e.js → props-from-config-B_k4h7ak.js} +56 -60
  585. package/dist/esm/{read-only-DSBWEPED.js → read-only-Do20HzKS.js} +1 -1
  586. package/dist/esm/{required-xw5BBPvV.js → required-DBer2Rxa.js} +1 -1
  587. package/dist/esm/{resolve-props-CL8wxjtP.js → resolve-props-BzL6wFWn.js} +8 -8
  588. package/dist/esm/{resolve-props-DAVb5BM3.js → resolve-props-DUtwGFZS.js} +7 -7
  589. package/dist/esm/{rows-DRV8YlQv.js → rows-CA8QgHMZ.js} +1 -1
  590. package/dist/esm/{scroll-lock-BxAe0gL5.js → scroll-lock-Ch4ulFTS.js} +3 -3
  591. package/dist/esm/{smart-button-CQps8AlL.js → smart-button-BB671N1B.js} +2 -2
  592. package/dist/esm/{spell-check-hy6xFhmT.js → spell-check-F1_tx4iu.js} +1 -1
  593. package/dist/esm/{src-AwoM1pRe.js → src-CkojG2tS.js} +1 -1
  594. package/dist/esm/{step-CopA0_m7.js → step-CTjZRMNh.js} +1 -1
  595. package/dist/esm/{suggestions-BsiiaAxK.js → suggestions-By7hmqB7.js} +3 -3
  596. package/dist/esm/{suggestions-CY8BJMOa.js → suggestions-G70JmX5_.js} +2 -2
  597. package/dist/esm/test-component.entry.js +2 -2
  598. package/dist/esm/{toggle-handler-ZMs2rBXc.js → toggle-handler-Cx8yn4d5.js} +9 -9
  599. package/dist/esm/{unique-nav-labels-BV-M3fPR.js → unique-nav-labels-Civ833r0.js} +2 -2
  600. package/dist/esm/{unit-hmMwqE9a.js → unit-JYCI5y5-.js} +1 -1
  601. package/dist/esm/{validators-BgDmq-Qt.js → validators-CAtXsuiZ.js} +1 -1
  602. package/dist/esm/{value-string-Dy8zJxlP.js → value-string-Dz7Sa2ex.js} +1 -1
  603. package/dist/esm/{width-BHn7XHj_.js → width-BikKpAHu.js} +1 -1
  604. package/dist/kolibri/Heading-Cjeak0Ip.js +4 -0
  605. package/dist/kolibri/api-lgc52EwH.js +4 -0
  606. package/dist/kolibri/app-globals-CJI5vjfG.js +4 -0
  607. package/dist/kolibri/base-4vZOpHqg.js +4 -0
  608. package/dist/kolibri/base-CrFm3Vt_.js +4 -0
  609. package/dist/kolibri/base-DyVivWCE.js +4 -0
  610. package/dist/kolibri/base-jUFiFkFq.js +4 -0
  611. package/dist/kolibri/base-web-component-BhT6Ab3x.js +4 -0
  612. package/dist/kolibri/base-web-component-Ci40K_CL.js +4 -0
  613. package/dist/kolibri/{base-web-component-CYPdDdRn.js → base-web-component-puo2mSiH.js} +1 -1
  614. package/dist/kolibri/behavior-BOUrKwXj.js +4 -0
  615. package/dist/kolibri/behavior-BeStbAbq.js +4 -0
  616. package/dist/kolibri/behavior-vf9LgKnJ.js +4 -0
  617. package/dist/kolibri/bem-registry-jPrVOPGX.js +4 -0
  618. package/dist/kolibri/bootstrap-tModZ1Zn.js +4 -0
  619. package/dist/kolibri/color-BBs35rDv.js +4 -0
  620. package/dist/kolibri/component-8rE7KeIV.js +4 -0
  621. package/dist/kolibri/component-B2hvPtlq.js +4 -0
  622. package/dist/kolibri/component-BGqaexiY.js +4 -0
  623. package/dist/kolibri/component-C3fJM1FJ.js +4 -0
  624. package/dist/kolibri/component-C5YYCLBG.js +4 -0
  625. package/dist/kolibri/component-CYv5K14M.js +4 -0
  626. package/dist/kolibri/component-ComtEOJP.js +4 -0
  627. package/dist/kolibri/component-CtnZeJ8i.js +4 -0
  628. package/dist/kolibri/component-CuBrmISS.js +4 -0
  629. package/dist/kolibri/component-CuPl7i5J.js +4 -0
  630. package/dist/kolibri/component-DzwUKDj3.js +4 -0
  631. package/dist/kolibri/contrast-DiGJSn0q.js +4 -0
  632. package/dist/kolibri/controller-BNVDUbSt.js +4 -0
  633. package/dist/kolibri/dev.utils-CS2a1Xpz.js +4 -0
  634. package/dist/kolibri/devtools-DDKKBFlN.js +4 -0
  635. package/dist/kolibri/disabled-CnKpxKzf.js +4 -0
  636. package/dist/kolibri/field-control-BRw1DpB2.js +4 -0
  637. package/dist/kolibri/{group-DydT1Z92.js → group-CeF4yHhL.js} +1 -1
  638. package/dist/kolibri/has-closer-DYgccfEw.js +4 -0
  639. package/dist/kolibri/href-BJ2DdiWo.js +4 -0
  640. package/dist/kolibri/i18n-6bNr_AKM.js +4 -0
  641. package/dist/kolibri/i18n-DsSD0Coa.js +4 -0
  642. package/dist/kolibri/id-BBQitGSa.js +4 -0
  643. package/dist/kolibri/index-BFGAlyrC.js +6 -0
  644. package/dist/kolibri/index.esm.js +1 -1
  645. package/dist/kolibri/input-Br0RXmck.js +4 -0
  646. package/dist/kolibri/input-container-C8HGQnts.js +4 -0
  647. package/dist/kolibri/item-BHmWBVJU.js +4 -0
  648. package/dist/kolibri/item-C0BsuFnx.js +4 -0
  649. package/dist/kolibri/item-CKABE_5V.js +4 -0
  650. package/dist/kolibri/item-D-uF2_uB.js +4 -0
  651. package/dist/kolibri/kol-abbr.entry.js +1 -1
  652. package/dist/kolibri/kol-accordion.entry.js +1 -1
  653. package/dist/kolibri/kol-alert.entry.js +1 -1
  654. package/dist/kolibri/kol-avatar.entry.js +1 -1
  655. package/dist/kolibri/kol-badge.entry.js +1 -1
  656. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  657. package/dist/kolibri/kol-button-link.entry.js +1 -1
  658. package/dist/kolibri/kol-button.entry.js +1 -1
  659. package/dist/kolibri/kol-card.entry.js +1 -1
  660. package/dist/kolibri/kol-combobox.entry.js +1 -1
  661. package/dist/kolibri/kol-details.entry.js +1 -1
  662. package/dist/kolibri/kol-dialog.entry.js +1 -1
  663. package/dist/kolibri/kol-drawer.entry.js +1 -1
  664. package/dist/kolibri/kol-form.entry.js +1 -1
  665. package/dist/kolibri/kol-heading.entry.js +1 -1
  666. package/dist/kolibri/kol-icon.entry.js +1 -1
  667. package/dist/kolibri/kol-image.entry.js +1 -1
  668. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  669. package/dist/kolibri/kol-input-color.entry.js +1 -1
  670. package/dist/kolibri/kol-input-date.entry.js +1 -1
  671. package/dist/kolibri/kol-input-email.entry.js +1 -1
  672. package/dist/kolibri/kol-input-file.entry.js +1 -1
  673. package/dist/kolibri/kol-input-number.entry.js +1 -1
  674. package/dist/kolibri/kol-input-password.entry.js +1 -1
  675. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  676. package/dist/kolibri/kol-input-range.entry.js +1 -1
  677. package/dist/kolibri/kol-input-text.entry.js +1 -1
  678. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  679. package/dist/kolibri/kol-link-button.entry.js +1 -1
  680. package/dist/kolibri/kol-link.entry.js +1 -1
  681. package/dist/kolibri/kol-meter.entry.js +1 -1
  682. package/dist/kolibri/kol-modal.entry.js +1 -1
  683. package/dist/kolibri/kol-nav.entry.js +1 -1
  684. package/dist/kolibri/kol-pagination.entry.js +1 -1
  685. package/dist/kolibri/kol-popover-button.entry.js +1 -1
  686. package/dist/kolibri/kol-progress.entry.js +1 -1
  687. package/dist/kolibri/kol-quote.entry.js +1 -1
  688. package/dist/kolibri/kol-select.entry.js +1 -1
  689. package/dist/kolibri/kol-single-select.entry.js +1 -1
  690. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  691. package/dist/kolibri/kol-spin.entry.js +1 -1
  692. package/dist/kolibri/kol-split-button.entry.js +1 -1
  693. package/dist/kolibri/kol-table-stateful.entry.js +1 -1
  694. package/dist/kolibri/kol-table-stateless.entry.js +1 -1
  695. package/dist/kolibri/kol-tabs.entry.js +1 -1
  696. package/dist/kolibri/kol-textarea.entry.js +1 -1
  697. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  698. package/dist/kolibri/kol-toolbar.entry.js +1 -1
  699. package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
  700. package/dist/kolibri/kol-tree-item.entry.js +1 -1
  701. package/dist/kolibri/kol-tree.entry.js +1 -1
  702. package/dist/kolibri/kol-version.entry.js +1 -1
  703. package/dist/kolibri/kolibri.esm.js +1 -1
  704. package/dist/kolibri/label-DQC6csvN.js +4 -0
  705. package/dist/kolibri/label-hints-Y3Zh7X3N.js +4 -0
  706. package/dist/kolibri/label-lang-segment-BnLCd3lO.js +4 -0
  707. package/dist/kolibri/label-with-expert-slot-BxbzJ0aJ.js +4 -0
  708. package/dist/kolibri/level-BaaaBkKR.js +4 -0
  709. package/dist/kolibri/link-target-BgH0UuzW.js +4 -0
  710. package/dist/kolibri/links-DnB1I1Gi.js +4 -0
  711. package/dist/kolibri/multiple-CoXuIBC5.js +4 -0
  712. package/dist/kolibri/number-value-MjxRVb0R.js +4 -0
  713. package/dist/kolibri/open-DBrDqNNt.js +4 -0
  714. package/dist/kolibri/options-CQrFWcRm.js +4 -0
  715. package/dist/kolibri/{orientation-DlsgaY1v.js → orientation-Dd57TF4f.js} +1 -1
  716. package/dist/kolibri/placeholder-C2TRH0yn.js +4 -0
  717. package/dist/kolibri/prop.validators-kX7xC6qj.js +4 -0
  718. package/dist/kolibri/props-from-config-B_k4h7ak.js +4 -0
  719. package/dist/kolibri/read-only-Do20HzKS.js +4 -0
  720. package/dist/kolibri/required-DBer2Rxa.js +4 -0
  721. package/dist/kolibri/resolve-props-BzL6wFWn.js +4 -0
  722. package/dist/kolibri/resolve-props-DUtwGFZS.js +4 -0
  723. package/dist/kolibri/rows-CA8QgHMZ.js +4 -0
  724. package/dist/kolibri/{scroll-lock-BxAe0gL5.js → scroll-lock-Ch4ulFTS.js} +1 -1
  725. package/dist/kolibri/smart-button-BB671N1B.js +4 -0
  726. package/dist/kolibri/spell-check-F1_tx4iu.js +4 -0
  727. package/dist/kolibri/src-CkojG2tS.js +4 -0
  728. package/dist/kolibri/step-CTjZRMNh.js +4 -0
  729. package/dist/kolibri/suggestions-By7hmqB7.js +4 -0
  730. package/dist/kolibri/suggestions-G70JmX5_.js +4 -0
  731. package/dist/kolibri/test-component.entry.js +1 -1
  732. package/dist/kolibri/toggle-handler-Cx8yn4d5.js +4 -0
  733. package/dist/kolibri/unique-nav-labels-Civ833r0.js +4 -0
  734. package/dist/kolibri/unit-JYCI5y5-.js +4 -0
  735. package/dist/kolibri/validators-CAtXsuiZ.js +4 -0
  736. package/dist/kolibri/value-string-Dz7Sa2ex.js +4 -0
  737. package/dist/kolibri/{width-BHn7XHj_.js → width-BikKpAHu.js} +1 -1
  738. package/dist/types/components/accordion/component.d.ts +2 -2
  739. package/dist/types/components/alert/component.d.ts +2 -2
  740. package/dist/types/components/badge/component.d.ts +2 -2
  741. package/dist/types/components/breadcrumb/component.d.ts +2 -2
  742. package/dist/types/components/button/base.d.ts +1 -1
  743. package/dist/types/components/button/component.d.ts +2 -2
  744. package/dist/types/components/button-link/component.d.ts +2 -2
  745. package/dist/types/components/card/component.d.ts +12 -5
  746. package/dist/types/components/combobox/component.d.ts +10 -10
  747. package/dist/types/components/details/component.d.ts +2 -2
  748. package/dist/types/components/dialog/base.d.ts +1 -1
  749. package/dist/types/components/dialog/component.d.ts +3 -3
  750. package/dist/types/components/drawer/component.d.ts +2 -2
  751. package/dist/types/components/form/component.d.ts +2 -2
  752. package/dist/types/components/heading/component.d.ts +2 -2
  753. package/dist/types/components/image/component.d.ts +2 -2
  754. package/dist/types/components/input-checkbox/component.d.ts +9 -9
  755. package/dist/types/components/input-color/component.d.ts +4 -4
  756. package/dist/types/components/input-date/component.d.ts +6 -6
  757. package/dist/types/components/input-email/component.d.ts +8 -8
  758. package/dist/types/components/input-file/component.d.ts +4 -4
  759. package/dist/types/components/input-number/component.d.ts +6 -6
  760. package/dist/types/components/input-password/component.d.ts +8 -8
  761. package/dist/types/components/input-radio/component.d.ts +5 -5
  762. package/dist/types/components/input-range/component.d.ts +4 -4
  763. package/dist/types/components/input-text/component.d.ts +12 -12
  764. package/dist/types/components/kolibri/component.d.ts +2 -2
  765. package/dist/types/components/link/component.d.ts +4 -4
  766. package/dist/types/components/link-button/component.d.ts +4 -4
  767. package/dist/types/components/modal/component.d.ts +3 -3
  768. package/dist/types/components/nav/component.d.ts +2 -2
  769. package/dist/types/components/pagination/component.d.ts +8 -8
  770. package/dist/types/components/popover-button/component.d.ts +10 -3
  771. package/dist/types/components/public-api/contract.d.ts +7 -2
  772. package/dist/types/components/select/component.d.ts +6 -6
  773. package/dist/types/components/single-select/component.d.ts +10 -10
  774. package/dist/types/components/skip-nav/component.d.ts +2 -2
  775. package/dist/types/components/spin/component.d.ts +2 -2
  776. package/dist/types/components/split-button/component.d.ts +2 -2
  777. package/dist/types/components/table-stateful/component.d.ts +7 -8
  778. package/dist/types/components/table-stateless/base.d.ts +2 -0
  779. package/dist/types/components/table-stateless/component.d.ts +7 -7
  780. package/dist/types/components/tabs/component.d.ts +3 -3
  781. package/dist/types/components/textarea/component.d.ts +8 -8
  782. package/dist/types/components/toaster/shadow.d.ts +5 -3
  783. package/dist/types/components/toolbar/component.d.ts +6 -6
  784. package/dist/types/components/tree/component.d.ts +2 -2
  785. package/dist/types/components/tree-item/component.d.ts +4 -4
  786. package/dist/types/components/version/component.d.ts +2 -2
  787. package/dist/types/components.d.ts +48 -56
  788. package/dist/types/index.d.ts +1 -1
  789. package/dist/types/internal/functional-components/abbr/api.d.ts +1 -1
  790. package/dist/types/internal/functional-components/alert/api.d.ts +1 -1
  791. package/dist/types/internal/functional-components/avatar/api.d.ts +2 -2
  792. package/dist/types/internal/functional-components/badge/api.d.ts +2 -26
  793. package/dist/types/internal/functional-components/base-web-component.d.ts +1 -1
  794. package/dist/types/internal/functional-components/breadcrumb/api.d.ts +1 -1
  795. package/dist/types/internal/functional-components/button/api.d.ts +2 -2
  796. package/dist/types/internal/functional-components/card/api.d.ts +2 -2
  797. package/dist/types/internal/functional-components/collapsible/api.d.ts +2 -2
  798. package/dist/types/internal/functional-components/combobox/api.d.ts +4 -4
  799. package/dist/types/internal/functional-components/counter/api.d.ts +1 -1
  800. package/dist/types/internal/functional-components/dialog/api.d.ts +2 -2
  801. package/dist/types/internal/functional-components/dialog/component.d.ts +1 -1
  802. package/dist/types/internal/functional-components/dialog/item.d.ts +1 -1
  803. package/dist/types/internal/functional-components/drawer/api.d.ts +2 -2
  804. package/dist/types/internal/functional-components/form/api.d.ts +1 -1
  805. package/dist/types/internal/functional-components/form-association/api.d.ts +1 -1
  806. package/dist/types/internal/functional-components/form-field/api.d.ts +3 -3
  807. package/dist/types/internal/functional-components/form-field/base-web-component.d.ts +2 -2
  808. package/dist/types/internal/functional-components/form-field/number-value.d.ts +1 -1
  809. package/dist/types/internal/functional-components/form-field/select-value.d.ts +1 -1
  810. package/dist/types/internal/functional-components/generic-types.d.ts +2 -2
  811. package/dist/types/internal/functional-components/heading/api.d.ts +2 -2
  812. package/dist/types/internal/functional-components/icon/api.d.ts +1 -1
  813. package/dist/types/internal/functional-components/image/api.d.ts +2 -2
  814. package/dist/types/internal/functional-components/input-checkbox/api.d.ts +3 -3
  815. package/dist/types/internal/functional-components/input-color/api.d.ts +4 -28
  816. package/dist/types/internal/functional-components/input-date/api.d.ts +4 -28
  817. package/dist/types/internal/functional-components/input-email/api.d.ts +4 -28
  818. package/dist/types/internal/functional-components/input-file/api.d.ts +4 -28
  819. package/dist/types/internal/functional-components/input-number/api.d.ts +4 -28
  820. package/dist/types/internal/functional-components/input-password/api.d.ts +4 -28
  821. package/dist/types/internal/functional-components/input-radio/api.d.ts +3 -3
  822. package/dist/types/internal/functional-components/input-range/api.d.ts +4 -4
  823. package/dist/types/internal/functional-components/input-text/api.d.ts +4 -28
  824. package/dist/types/internal/functional-components/kolibri/api.d.ts +1 -1
  825. package/dist/types/internal/functional-components/link/api.d.ts +2 -2
  826. package/dist/types/internal/functional-components/meter/api.d.ts +3 -3
  827. package/dist/types/internal/functional-components/nav/api.d.ts +2 -2
  828. package/dist/types/internal/functional-components/pagination/api.d.ts +2 -2
  829. package/dist/types/internal/functional-components/pagination/component.d.ts +1 -1
  830. package/dist/types/internal/functional-components/popover/api.d.ts +1 -1
  831. package/dist/types/internal/functional-components/popover-button/api.d.ts +2 -2
  832. package/dist/types/internal/functional-components/progress/api.d.ts +3 -3
  833. package/dist/types/internal/functional-components/quote/api.d.ts +2 -2
  834. package/dist/types/internal/functional-components/select/api.d.ts +4 -4
  835. package/dist/types/internal/functional-components/single-select/api.d.ts +4 -4
  836. package/dist/types/internal/functional-components/skip-nav/api.d.ts +1 -1
  837. package/dist/types/internal/functional-components/spin/api.d.ts +1 -1
  838. package/dist/types/internal/functional-components/split-button/api.d.ts +1 -1
  839. package/dist/types/internal/functional-components/table-stateful/api.d.ts +2 -2
  840. package/dist/types/internal/functional-components/table-stateful/component.d.ts +10 -0
  841. package/dist/types/internal/functional-components/table-stateless/api.d.ts +2 -2
  842. package/dist/types/internal/functional-components/table-stateless/component.d.ts +2 -0
  843. package/dist/types/internal/functional-components/table-stateless/selection-tooltip-item.d.ts +10 -0
  844. package/dist/types/internal/functional-components/table-stateless/table-model.d.ts +1 -1
  845. package/dist/types/internal/functional-components/tabs/api.d.ts +2 -2
  846. package/dist/types/internal/functional-components/text-input/api.d.ts +4 -28
  847. package/dist/types/internal/functional-components/textarea/api.d.ts +4 -4
  848. package/dist/types/internal/functional-components/toolbar/api.d.ts +3 -3
  849. package/dist/types/internal/functional-components/toolbar/{item.d.ts → entry-item.d.ts} +1 -1
  850. package/dist/types/internal/functional-components/tooltip/api.d.ts +2 -2
  851. package/dist/types/internal/functional-components/tree/api.d.ts +1 -1
  852. package/dist/types/internal/functional-components/tree-item/api.d.ts +2 -2
  853. package/dist/types/internal/functional-components/version/api.d.ts +1 -1
  854. package/dist/types/internal/props/breadcrumb-links.d.ts +1 -1
  855. package/dist/types/internal/props/helpers/iso-date.d.ts +1 -5
  856. package/dist/types/internal/props/helpers/normalizers.d.ts +1 -2
  857. package/dist/types/internal/props/index.d.ts +1 -1
  858. package/dist/types/internal/props/info-popover.d.ts +1 -1
  859. package/dist/types/internal/props/input-date-max.d.ts +1 -1
  860. package/dist/types/internal/props/input-date-min.d.ts +1 -1
  861. package/dist/types/internal/props/nav-links.d.ts +1 -1
  862. package/dist/types/internal/props/skip-nav-links.d.ts +1 -1
  863. package/dist/types/internal/props/smart-button.d.ts +1 -25
  864. package/dist/types/internal/props/value-input-date.d.ts +1 -1
  865. package/dist/types/schema/components/alert.d.ts +2 -8
  866. package/dist/types/schema/components/badge.d.ts +3 -16
  867. package/dist/types/schema/components/breadcrumb.d.ts +0 -15
  868. package/dist/types/schema/components/button.d.ts +3 -3
  869. package/dist/types/schema/components/card.d.ts +0 -9
  870. package/dist/types/schema/components/form.d.ts +0 -13
  871. package/dist/types/schema/components/index.d.ts +0 -30
  872. package/dist/types/schema/components/link.d.ts +2 -2
  873. package/dist/types/schema/components/pagination.d.ts +1 -15
  874. package/dist/types/schema/components/popover-button.d.ts +3 -6
  875. package/dist/types/schema/components/table.d.ts +4 -34
  876. package/dist/types/schema/components/tabs.d.ts +3 -21
  877. package/dist/types/schema/components/textarea.d.ts +0 -28
  878. package/dist/types/schema/components/toaster.d.ts +0 -10
  879. package/dist/types/schema/index.d.ts +1 -1
  880. package/dist/types/schema/props/accept.d.ts +0 -3
  881. package/dist/types/schema/props/access-key.d.ts +0 -2
  882. package/dist/types/schema/props/active.d.ts +0 -3
  883. package/dist/types/schema/props/adjust-height.d.ts +0 -2
  884. package/dist/types/schema/props/alert-type.d.ts +0 -2
  885. package/dist/types/schema/props/align.d.ts +0 -2
  886. package/dist/types/schema/props/allow-multi-sort.d.ts +0 -3
  887. package/dist/types/schema/props/alt.d.ts +0 -3
  888. package/dist/types/schema/props/alternative-button-link-role.d.ts +1 -5
  889. package/dist/types/schema/props/aria-controls.d.ts +0 -2
  890. package/dist/types/schema/props/aria-current-value.d.ts +1 -5
  891. package/dist/types/schema/props/aria-description.d.ts +0 -2
  892. package/dist/types/schema/props/aria-expanded.d.ts +0 -2
  893. package/dist/types/schema/props/aria-owns.d.ts +0 -2
  894. package/dist/types/schema/props/aria-selected.d.ts +0 -2
  895. package/dist/types/schema/props/auto-complete.d.ts +0 -2
  896. package/dist/types/schema/props/badge-text.d.ts +0 -2
  897. package/dist/types/schema/props/button-callbacks.d.ts +0 -3
  898. package/dist/types/schema/props/button-type.d.ts +1 -5
  899. package/dist/types/schema/props/button-variant.d.ts +1 -5
  900. package/dist/types/schema/props/checked.d.ts +0 -2
  901. package/dist/types/schema/props/collapsible.d.ts +0 -2
  902. package/dist/types/schema/props/color.d.ts +0 -4
  903. package/dist/types/schema/props/current-length.d.ts +0 -3
  904. package/dist/types/schema/props/custom-class.d.ts +0 -2
  905. package/dist/types/schema/props/disabled.d.ts +0 -2
  906. package/dist/types/schema/props/download.d.ts +0 -2
  907. package/dist/types/schema/props/error-list.d.ts +0 -2
  908. package/dist/types/schema/props/has-closer.d.ts +0 -2
  909. package/dist/types/schema/props/has-compact-button.d.ts +0 -2
  910. package/dist/types/schema/props/has-counter.d.ts +0 -3
  911. package/dist/types/schema/props/has-create-button.d.ts +0 -2
  912. package/dist/types/schema/props/has-icons-when-expanded.d.ts +0 -2
  913. package/dist/types/schema/props/has-settings-menu.d.ts +0 -2
  914. package/dist/types/schema/props/has-value.d.ts +0 -3
  915. package/dist/types/schema/props/hide-label.d.ts +0 -3
  916. package/dist/types/schema/props/hide-msg.d.ts +0 -3
  917. package/dist/types/schema/props/hint.d.ts +0 -2
  918. package/dist/types/schema/props/href.d.ts +2 -4
  919. package/dist/types/schema/props/icons-input-checkbox.d.ts +0 -2
  920. package/dist/types/schema/props/icons.d.ts +0 -3
  921. package/dist/types/schema/props/id.d.ts +0 -2
  922. package/dist/types/schema/props/image-sizes.d.ts +0 -3
  923. package/dist/types/schema/props/image-source.d.ts +0 -3
  924. package/dist/types/schema/props/image-srcset.d.ts +0 -3
  925. package/dist/types/schema/props/indeterminate.d.ts +0 -2
  926. package/dist/types/schema/props/index.d.ts +4 -0
  927. package/dist/types/schema/props/inline.d.ts +0 -3
  928. package/dist/types/schema/props/label-align.d.ts +1 -5
  929. package/dist/types/schema/props/label.d.ts +3 -7
  930. package/dist/types/schema/props/link-on-callbacks.d.ts +0 -2
  931. package/dist/types/schema/props/link-target.d.ts +0 -2
  932. package/dist/types/schema/props/loading.d.ts +1 -5
  933. package/dist/types/schema/props/max-length-behavior.d.ts +1 -5
  934. package/dist/types/schema/props/max-length.d.ts +0 -3
  935. package/dist/types/schema/props/max.d.ts +0 -4
  936. package/dist/types/schema/props/modal.d.ts +0 -2
  937. package/dist/types/schema/props/msg.d.ts +0 -2
  938. package/dist/types/schema/props/multiple.d.ts +0 -3
  939. package/dist/types/schema/props/name.d.ts +0 -3
  940. package/dist/types/schema/props/open.d.ts +0 -3
  941. package/dist/types/schema/props/options.d.ts +0 -4
  942. package/dist/types/schema/props/orientation.d.ts +1 -5
  943. package/dist/types/schema/props/pagination-position.d.ts +1 -5
  944. package/dist/types/schema/props/pattern.d.ts +0 -3
  945. package/dist/types/schema/props/placeholder.d.ts +0 -3
  946. package/dist/types/schema/props/popover-align.d.ts +0 -2
  947. package/dist/types/schema/props/read-only.d.ts +0 -2
  948. package/dist/types/schema/props/required.d.ts +0 -2
  949. package/dist/types/schema/props/resize-textarea.d.ts +0 -2
  950. package/dist/types/schema/props/rows.d.ts +0 -2
  951. package/dist/types/schema/props/short-key.d.ts +0 -2
  952. package/dist/types/schema/props/show.d.ts +0 -3
  953. package/dist/types/schema/props/spell-check.d.ts +0 -2
  954. package/dist/types/schema/props/suggestions.d.ts +0 -2
  955. package/dist/types/schema/props/tab-behavior.d.ts +1 -5
  956. package/dist/types/schema/props/tab-index.d.ts +0 -2
  957. package/dist/types/schema/props/table-callbacks.d.ts +1 -4
  958. package/dist/types/schema/props/table-data-foot.d.ts +0 -3
  959. package/dist/types/schema/props/table-data.d.ts +0 -3
  960. package/dist/types/schema/props/table-fixed-cols.d.ts +0 -2
  961. package/dist/types/schema/props/table-header-cells.d.ts +0 -2
  962. package/dist/types/schema/props/table-selection.d.ts +0 -2
  963. package/dist/types/schema/props/toolbar-items.d.ts +0 -2
  964. package/dist/types/schema/props/tooltip-align.d.ts +0 -2
  965. package/dist/types/schema/props/touched.d.ts +0 -2
  966. package/dist/types/schema/props/type-input-date.d.ts +4 -2
  967. package/dist/types/schema/props/type-input-text.d.ts +0 -2
  968. package/dist/types/schema/props/unit.d.ts +0 -2
  969. package/dist/types/schema/props/variant/dialog.d.ts +1 -5
  970. package/dist/types/schema/props/variant/modal.d.ts +0 -1
  971. package/dist/types/schema/props/variant/password-variant.d.ts +1 -5
  972. package/dist/types/schema/props/variant-alert.d.ts +0 -2
  973. package/dist/types/schema/props/variant-class-name.d.ts +0 -3
  974. package/dist/types/schema/props/variant-input-checkbox.d.ts +0 -2
  975. package/dist/types/schema/props/variant-progress.d.ts +0 -2
  976. package/dist/types/schema/props/visibility-toggle.d.ts +0 -3
  977. package/dist/types/schema/props/width.d.ts +0 -3
  978. package/dist/types/schema/types/button-link-text.d.ts +4 -4
  979. package/dist/types/schema/utils/prop.validators.d.ts +11 -34
  980. package/dist/types/schema/validators/common.d.ts +2 -0
  981. package/dist/types/schema/validators/index.d.ts +0 -1
  982. package/dist/types/utils/testing/logged-messages.d.ts +1 -0
  983. package/dist/types/utils/testing/snapshot-input-testing.d.ts +2 -1
  984. package/dist/types/utils/testing/snapshot-testing.d.ts +4 -1
  985. package/doc/badge.md +6 -6
  986. package/doc/combobox.md +23 -23
  987. package/doc/input-checkbox.md +2 -2
  988. package/doc/input-color.md +22 -22
  989. package/doc/input-date.md +28 -28
  990. package/doc/input-email.md +30 -30
  991. package/doc/input-file.md +22 -22
  992. package/doc/input-number.md +28 -28
  993. package/doc/input-password.md +29 -29
  994. package/doc/input-radio.md +19 -19
  995. package/doc/input-range.md +24 -24
  996. package/doc/input-text.md +31 -31
  997. package/doc/select.md +24 -24
  998. package/doc/single-select.md +24 -24
  999. package/doc/table-stateful.md +16 -16
  1000. package/doc/tabs.md +1 -1
  1001. package/doc/textarea.md +29 -29
  1002. package/package.json +5 -6
  1003. package/vscode-custom-data.json +50 -138
  1004. package/dist/cjs/component-DE4OHvyu.js +0 -9299
  1005. package/dist/collection/components/card/base.js +0 -79
  1006. package/dist/collection/components/popover-button/base.js +0 -69
  1007. package/dist/collection/schema/components/accordion.js +0 -1
  1008. package/dist/collection/schema/components/button-link.js +0 -1
  1009. package/dist/collection/schema/components/collapsible.js +0 -1
  1010. package/dist/collection/schema/components/combobox.js +0 -1
  1011. package/dist/collection/schema/components/details.js +0 -1
  1012. package/dist/collection/schema/components/dialog.js +0 -1
  1013. package/dist/collection/schema/components/drawer.js +0 -1
  1014. package/dist/collection/schema/components/heading.js +0 -1
  1015. package/dist/collection/schema/components/input-checkbox.js +0 -1
  1016. package/dist/collection/schema/components/input-color.js +0 -1
  1017. package/dist/collection/schema/components/input-date.js +0 -1
  1018. package/dist/collection/schema/components/input-email.js +0 -1
  1019. package/dist/collection/schema/components/input-file.js +0 -1
  1020. package/dist/collection/schema/components/input-number.js +0 -1
  1021. package/dist/collection/schema/components/input-password.js +0 -1
  1022. package/dist/collection/schema/components/input-radio.js +0 -1
  1023. package/dist/collection/schema/components/input-range.js +0 -1
  1024. package/dist/collection/schema/components/input-text.js +0 -1
  1025. package/dist/collection/schema/components/kolibri.js +0 -1
  1026. package/dist/collection/schema/components/link-button.js +0 -1
  1027. package/dist/collection/schema/components/modal.js +0 -1
  1028. package/dist/collection/schema/components/nav.js +0 -1
  1029. package/dist/collection/schema/components/select.js +0 -1
  1030. package/dist/collection/schema/components/single-select.js +0 -1
  1031. package/dist/collection/schema/components/skip-nav.js +0 -1
  1032. package/dist/collection/schema/components/split-button.js +0 -1
  1033. package/dist/collection/schema/components/tableStateless.js +0 -1
  1034. package/dist/collection/schema/components/toolbar.js +0 -1
  1035. package/dist/collection/schema/components/tree-item.js +0 -1
  1036. package/dist/collection/schema/components/tree.js +0 -1
  1037. package/dist/collection/schema/components/version.js +0 -1
  1038. package/dist/collection/schema/validators/alignment.js +0 -10
  1039. package/dist/collection/utils/testing/legacy-component.js +0 -16
  1040. package/dist/esm/component-hiabKVP3.js +0 -9294
  1041. package/dist/kolibri/Heading-BubZbykM.js +0 -4
  1042. package/dist/kolibri/api-D0RNr-zh.js +0 -4
  1043. package/dist/kolibri/app-globals-DYRte_jr.js +0 -4
  1044. package/dist/kolibri/base-BP5SdLvQ.js +0 -4
  1045. package/dist/kolibri/base-BbGt9eYx.js +0 -4
  1046. package/dist/kolibri/base-CLsKm3-e.js +0 -4
  1047. package/dist/kolibri/base-Cz00snD6.js +0 -4
  1048. package/dist/kolibri/base-web-component-CdSFFCst.js +0 -4
  1049. package/dist/kolibri/base-web-component-DP9_OPgV.js +0 -4
  1050. package/dist/kolibri/behavior-B6y5Gofe.js +0 -4
  1051. package/dist/kolibri/behavior-BJR8CKBx.js +0 -4
  1052. package/dist/kolibri/behavior-DlH8byIw.js +0 -4
  1053. package/dist/kolibri/bem-registry-SKACeCny.js +0 -4
  1054. package/dist/kolibri/bootstrap-Bp7i4RJQ.js +0 -4
  1055. package/dist/kolibri/color-BbljGuAW.js +0 -4
  1056. package/dist/kolibri/common-BdSzSIXg.js +0 -4
  1057. package/dist/kolibri/component-6_YiKr2Z.js +0 -4
  1058. package/dist/kolibri/component-B8UMedaK.js +0 -4
  1059. package/dist/kolibri/component-CMHB3reH.js +0 -4
  1060. package/dist/kolibri/component-CNgECeRi.js +0 -4
  1061. package/dist/kolibri/component-CSsUaL_h.js +0 -4
  1062. package/dist/kolibri/component-CiJGQTU0.js +0 -4
  1063. package/dist/kolibri/component-DEwcJKDA.js +0 -4
  1064. package/dist/kolibri/component-NOe28NXD.js +0 -4
  1065. package/dist/kolibri/component-ZdHnXLLI.js +0 -4
  1066. package/dist/kolibri/component-bIIx1x7q.js +0 -4
  1067. package/dist/kolibri/component-hiabKVP3.js +0 -4
  1068. package/dist/kolibri/contrast-DtK0a6X2.js +0 -4
  1069. package/dist/kolibri/controller-CZcQ57AP.js +0 -4
  1070. package/dist/kolibri/dev.utils-B0t4rcBV.js +0 -4
  1071. package/dist/kolibri/devtools-DuJRc6wJ.js +0 -4
  1072. package/dist/kolibri/disabled-B2o4Ctgy.js +0 -4
  1073. package/dist/kolibri/field-control-C9dIXnES.js +0 -4
  1074. package/dist/kolibri/has-closer-BrG00xL7.js +0 -4
  1075. package/dist/kolibri/href-CfNF4pHX.js +0 -4
  1076. package/dist/kolibri/i18n-BLkzMf6D.js +0 -4
  1077. package/dist/kolibri/i18n-BRgvVqCf.js +0 -4
  1078. package/dist/kolibri/id-Bh4FF8c0.js +0 -4
  1079. package/dist/kolibri/index-Bbr6Os1b.js +0 -6
  1080. package/dist/kolibri/input-C1YsxnDL.js +0 -4
  1081. package/dist/kolibri/input-container-zXl_6y52.js +0 -4
  1082. package/dist/kolibri/item-DXDEHrEg.js +0 -4
  1083. package/dist/kolibri/item-Dms_59sU.js +0 -4
  1084. package/dist/kolibri/item-hsQoejqZ.js +0 -4
  1085. package/dist/kolibri/item-zXunNZh5.js +0 -4
  1086. package/dist/kolibri/label-BQVd3bkc.js +0 -4
  1087. package/dist/kolibri/label-hints-CZGo9ZD5.js +0 -4
  1088. package/dist/kolibri/label-lang-segment-C5LYGOHt.js +0 -4
  1089. package/dist/kolibri/label-with-expert-slot-D1tpX9DI.js +0 -4
  1090. package/dist/kolibri/level-BVXGgbSM.js +0 -4
  1091. package/dist/kolibri/link-target-BWPSEd9a.js +0 -4
  1092. package/dist/kolibri/links-BbsnNXfa.js +0 -4
  1093. package/dist/kolibri/multiple-S3Ol1G6Z.js +0 -4
  1094. package/dist/kolibri/number-value-DmOl1z7z.js +0 -4
  1095. package/dist/kolibri/open-DPP79Urq.js +0 -4
  1096. package/dist/kolibri/options-aA3M-QV2.js +0 -4
  1097. package/dist/kolibri/placeholder-DlHbiVjz.js +0 -4
  1098. package/dist/kolibri/props-from-config-BOUcpF7e.js +0 -4
  1099. package/dist/kolibri/read-only-DSBWEPED.js +0 -4
  1100. package/dist/kolibri/required-xw5BBPvV.js +0 -4
  1101. package/dist/kolibri/resolve-props-CL8wxjtP.js +0 -4
  1102. package/dist/kolibri/resolve-props-DAVb5BM3.js +0 -4
  1103. package/dist/kolibri/rows-DRV8YlQv.js +0 -4
  1104. package/dist/kolibri/smart-button-CQps8AlL.js +0 -4
  1105. package/dist/kolibri/spell-check-hy6xFhmT.js +0 -4
  1106. package/dist/kolibri/src-AwoM1pRe.js +0 -4
  1107. package/dist/kolibri/step-CopA0_m7.js +0 -4
  1108. package/dist/kolibri/suggestions-BsiiaAxK.js +0 -4
  1109. package/dist/kolibri/suggestions-CY8BJMOa.js +0 -4
  1110. package/dist/kolibri/toggle-handler-ZMs2rBXc.js +0 -4
  1111. package/dist/kolibri/unique-nav-labels-BV-M3fPR.js +0 -4
  1112. package/dist/kolibri/unit-hmMwqE9a.js +0 -4
  1113. package/dist/kolibri/validators-BgDmq-Qt.js +0 -4
  1114. package/dist/kolibri/value-string-Dy8zJxlP.js +0 -4
  1115. package/dist/types/components/card/base.d.ts +0 -27
  1116. package/dist/types/components/popover-button/base.d.ts +0 -21
  1117. package/dist/types/schema/components/accordion.d.ts +0 -11
  1118. package/dist/types/schema/components/button-link.d.ts +0 -7
  1119. package/dist/types/schema/components/collapsible.d.ts +0 -7
  1120. package/dist/types/schema/components/combobox.d.ts +0 -26
  1121. package/dist/types/schema/components/details.d.ts +0 -11
  1122. package/dist/types/schema/components/dialog.d.ts +0 -21
  1123. package/dist/types/schema/components/drawer.d.ts +0 -17
  1124. package/dist/types/schema/components/heading.d.ts +0 -17
  1125. package/dist/types/schema/components/input-checkbox.d.ts +0 -25
  1126. package/dist/types/schema/components/input-color.d.ts +0 -25
  1127. package/dist/types/schema/components/input-date.d.ts +0 -34
  1128. package/dist/types/schema/components/input-email.d.ts +0 -31
  1129. package/dist/types/schema/components/input-file.d.ts +0 -22
  1130. package/dist/types/schema/components/input-number.d.ts +0 -33
  1131. package/dist/types/schema/components/input-password.d.ts +0 -31
  1132. package/dist/types/schema/components/input-radio.d.ts +0 -22
  1133. package/dist/types/schema/components/input-range.d.ts +0 -27
  1134. package/dist/types/schema/components/input-text.d.ts +0 -33
  1135. package/dist/types/schema/components/kolibri.d.ts +0 -21
  1136. package/dist/types/schema/components/link-button.d.ts +0 -7
  1137. package/dist/types/schema/components/modal.d.ts +0 -4
  1138. package/dist/types/schema/components/nav.d.ts +0 -16
  1139. package/dist/types/schema/components/select.d.ts +0 -24
  1140. package/dist/types/schema/components/single-select.d.ts +0 -24
  1141. package/dist/types/schema/components/skip-nav.d.ts +0 -16
  1142. package/dist/types/schema/components/split-button.d.ts +0 -9
  1143. package/dist/types/schema/components/tableStateless.d.ts +0 -24
  1144. package/dist/types/schema/components/toolbar.d.ts +0 -11
  1145. package/dist/types/schema/components/tree-item.d.ts +0 -12
  1146. package/dist/types/schema/components/tree.d.ts +0 -10
  1147. package/dist/types/schema/components/version.d.ts +0 -10
  1148. package/dist/types/schema/validators/alignment.d.ts +0 -3
  1149. package/dist/types/utils/testing/legacy-component.d.ts +0 -4
  1150. package/dist/cjs/{ariaCurrentService-3051l6MI.js → aria-current-service-3051l6MI.js} +0 -0
  1151. package/dist/collection/{components/link/ariaCurrentService.js → internal/functional-components/link/aria-current-service.js} +0 -0
  1152. package/dist/collection/internal/functional-components/pagination/{page-size-select.js → select-item.js} +9 -9
  1153. package/dist/collection/{components → internal/functional-components}/tree/open-items-cache.js +0 -0
  1154. package/dist/components/{ariaCurrentService.js → aria-current-service.js} +0 -0
  1155. package/dist/esm/{ariaCurrentService-YoLNpD5S.js → aria-current-service-YoLNpD5S.js} +0 -0
  1156. package/dist/kolibri/{ariaCurrentService-YoLNpD5S.js → aria-current-service-YoLNpD5S.js} +0 -0
  1157. package/dist/types/{components → internal/functional-components}/form/controller.d.ts +0 -0
  1158. package/dist/types/{components/link/ariaCurrentService.d.ts → internal/functional-components/link/aria-current-service.d.ts} +0 -0
  1159. package/dist/types/internal/functional-components/pagination/{page-size-select.d.ts → select-item.d.ts} +1 -1
  1160. /package/dist/types/{components → internal/functional-components}/tree/open-items-cache.d.ts +0 -0
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import"./bem-registry.js";import{a as t,d as s,v as i}from"./component2.js";import{a as e,S as o}from"./suggestions2.js";import{h as a,g as r}from"./input-container.js";import{c as h,b as n,e as l}from"./props-from-config.js";import{p}from"./placeholder.js";import{r as d}from"./read-only.js";import{r as c}from"./required.js";import{s as u}from"./smart-button.js";import{s as m}from"./value-string.js";import{f as v,B as y}from"./base-web-component2.js";import{h as b}from"@stencil/core/internal/client";import{s as j}from"./controller.js";import{v as g}from"./access-and-short-key.js";import{c as f}from"./element-interaction.js";import{B as O}from"./base-web-component.js";import{C as x}from"./behavior2.js";const B=h("pattern",void 0,n),K={required:[...v.required],optional:[...v.optional,t,e,a,B,p,d,c,s,u,m,i]},q=class extends y{constructor(){super(...arguments),this.ctaRef=f(),this.counter=new x(O.stateLess),this.needsImmediateCounterUpdate=!1,this.hasValue=!1,this.handleTextInput=t=>{this._value=t.target.value,this.handleInput(t)},this.handleTextChange=(t,s)=>{this.handleChange(t,s)},this.handleTextFocus=t=>{var s,i;this.handleFocus(t),this.counter.retriggerAria(null!==(i=null===(s=this._value)||void 0===s?void 0:s.length)&&void 0!==i?i:0)},this.handleTextKeyDown=t=>{var s,i;this.handleKeyDown(t),this.counter.handleKeyDown(t,null!==(i=null===(s=this.ctaRef.el)||void 0===s?void 0:s.value.length)&&void 0!==i?i:0),j(t,{form:this.host,ref:this.ctaRef.el})}}get textShared(){return this}initHasValue(){this.hasValue=Boolean(this.textShared.getRenderProp("value"))}didLoadTextInput(){var t,s;this.needsImmediateCounterUpdate=!1,(this.counter.hasCounter()||this.counter.hasSoftLimit())&&this.counter.updateImmediate(null!==(s=null===(t=this._value)||void 0===t?void 0:t.length)&&void 0!==s?s:0)}didUpdateTextInput(){var t,s;this.needsImmediateCounterUpdate&&(this.needsImmediateCounterUpdate=!1,(this.counter.hasCounter()||this.counter.hasSoftLimit())&&this.counter.updateImmediate(null!==(s=null===(t=this._value)||void 0===t?void 0:t.length)&&void 0!==s?s:0))}destroyTextInput(){this.destroyFormField(),this.counter.destroy()}applyAccessKey(s){t.apply(s,(t=>this.textShared.setRenderProp("accessKey",t))),g(s,this._shortKey)}applyAutoComplete(t){e.apply(t,(t=>this.textShared.setRenderProp("autoComplete",t)))}applyIcons(t){a.apply(t,(t=>this.textShared.setRenderProp("icons",t)))}applyPattern(t){B.apply(t,(t=>this.textShared.setRenderProp("pattern",t)))}applyPlaceholder(t){p.apply(t,(t=>this.textShared.setRenderProp("placeholder",t)))}applyReadOnly(t){d.apply(t,(t=>this.textShared.setRenderProp("readOnly",t)))}applyRequired(t){c.apply(t,(t=>this.textShared.setRenderProp("required",t)))}applyShortKey(t){s.apply(t,(t=>this.textShared.setRenderProp("shortKey",t))),g(this._accessKey,t)}applySmartButton(t){null==t?this.textShared.unsetRenderProp("smartButton"):u.apply(t,(t=>this.textShared.setRenderProp("smartButton",t)))}applyValue(t){var s;this.initValue(t),this.hasValue=Boolean(this.textShared.getRenderProp("value")),this.counter.update(null!==(s=null==t?void 0:t.length)&&void 0!==s?s:0)}initValue(t){m.apply(t,(t=>this.textShared.setRenderProp("value",t))),this.formAssociation.setFormAssociatedValue(this.textShared.getRenderProp("value"))}initMaxLength(t){this.counter.watchMaxLength(t)}applyVariant(t){i.apply(t,(t=>this.textShared.setRenderProp("variant",t)))}applyHasCounter(t){this.counter.watchHasCounter(t),this.needsImmediateCounterUpdate=!0}applyMaxLength(t){var s,i;this.counter.watchMaxLength(t),this.counter.updateImmediate(null!==(i=null===(s=this._value)||void 0===s?void 0:s.length)&&void 0!==i?i:0)}applyMaxLengthBehavior(t){this.counter.watchMaxLengthBehavior(t),this.needsImmediateCounterUpdate=!0}getTextFormFieldProps(t){const s=this.textShared;return this.getFormFieldProps({class:l(t,{"has-value":this.hasValue,"kol-form-field--has-counter":this.counter.hasSoftLimit()||this.counter.hasCounter()}),accessKey:s.getRenderProp("accessKey")||void 0,shortKey:s.getRenderProp("shortKey")||void 0,variant:s.getRenderProp("variant"),required:s.getRenderProp("required"),readOnly:s.getRenderProp("readOnly"),maxLength:this.counter.getRenderProp("maxLength"),counter:this.counter.getCounterProps()})}getTextInputAdornments(t){return r({icons:this.textShared.getRenderProp("icons"),smartButton:this.getSmartButtonFcProps(this.textShared.getRenderProp("smartButton"),this.textShared.getRenderProp("disabled")),endAdornment:t})}getTextInputProps({type:t,spellcheck:s,multiple:i,suggestions:e},a={}){const r=this.textShared,h=r.getState("id"),n=r.getRenderProp("accessKey"),l=r.getRenderProp("shortKey"),p=r.getRenderProp("placeholder"),d=r.getRenderProp("pattern"),c=this.counter.getMaxLengthAttribute(),u=this.counter.getCharacterLimitHintId(h),{ariaDescribedBy:m,hasError:v}=this.getAria();return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({id:h,hideLabel:r.getRenderProp("hideLabel"),label:r.getRenderProp("label"),disabled:r.getRenderProp("disabled"),name:r.getRenderProp("name")||void 0},n?{accessKey:n}:{}),void 0!==t?{type:t}:{}),{value:r.getRenderProp("value"),required:r.getRenderProp("required")}),void 0!==c?{maxlength:c}:{}),void 0!==p?{placeholder:p}:{}),{autoComplete:r.getRenderProp("autoComplete")}),void 0!==s?{spellcheck:s}:{}),void 0!==d?{pattern:d}:{}),{readonly:r.getRenderProp("readOnly")}),void 0!==i?{multiple:i}:{}),{touched:r.getRenderProp("touched"),msg:r.getRenderProp("msg")}),l?{"aria-keyshortcuts":l}:{}),e&&e.length>0?{suggestions:b(o,{id:h,suggestions:e})}:{}),{ref:this.ctaRef,onBlur:this.handleBlur,onChange:this.handleTextChange,onClick:this.handleClick,onFocus:this.handleTextFocus,onInput:this.handleTextInput,onKeyDown:this.handleTextKeyDown}),a),{ariaDescribedBy:u?[...m,u]:m,"aria-invalid":v?"true":void 0})}};export{q as B,K as t}
4
+ import"./bem-registry.js";import{a as t,d as s,v as i}from"./component2.js";import{a as e,S as o}from"./suggestions2.js";import{h as a,g as r}from"./input-container.js";import{c as h,b as n,e as l}from"./props-from-config.js";import{p}from"./placeholder.js";import{r as d}from"./read-only.js";import{r as c}from"./required.js";import{s as u}from"./smart-button.js";import{s as m}from"./value-string.js";import{f as v,B as y}from"./base-web-component2.js";import{h as b}from"@stencil/core/internal/client";import{v as j}from"./access-and-short-key.js";import{c as g}from"./element-interaction.js";import{B as f}from"./base-web-component.js";import{C as O}from"./behavior2.js";import{s as x}from"./controller.js";const B=h("pattern",void 0,n),K={required:[...v.required],optional:[...v.optional,t,e,a,B,p,d,c,s,u,m,i]},q=class extends y{constructor(){super(...arguments),this.ctaRef=g(),this.counter=new O(f.stateLess),this.needsImmediateCounterUpdate=!1,this.hasValue=!1,this.handleTextInput=t=>{this._value=t.target.value,this.handleInput(t)},this.handleTextChange=(t,s)=>{this.handleChange(t,s)},this.handleTextFocus=t=>{var s,i;this.handleFocus(t),this.counter.retriggerAria(null!==(i=null===(s=this._value)||void 0===s?void 0:s.length)&&void 0!==i?i:0)},this.handleTextKeyDown=t=>{var s,i;this.handleKeyDown(t),this.counter.handleKeyDown(t,null!==(i=null===(s=this.ctaRef.el)||void 0===s?void 0:s.value.length)&&void 0!==i?i:0),x(t,{form:this.host,ref:this.ctaRef.el})}}get textShared(){return this}initHasValue(){this.hasValue=Boolean(this.textShared.getRenderProp("value"))}didLoadTextInput(){var t,s;this.needsImmediateCounterUpdate=!1,(this.counter.hasCounter()||this.counter.hasSoftLimit())&&this.counter.updateImmediate(null!==(s=null===(t=this._value)||void 0===t?void 0:t.length)&&void 0!==s?s:0)}didUpdateTextInput(){var t,s;this.needsImmediateCounterUpdate&&(this.needsImmediateCounterUpdate=!1,(this.counter.hasCounter()||this.counter.hasSoftLimit())&&this.counter.updateImmediate(null!==(s=null===(t=this._value)||void 0===t?void 0:t.length)&&void 0!==s?s:0))}destroyTextInput(){this.destroyFormField(),this.counter.destroy()}applyAccessKey(s){t.apply(s,(t=>this.textShared.setRenderProp("accessKey",t))),j(s,this._shortKey)}applyAutoComplete(t){e.apply(t,(t=>this.textShared.setRenderProp("autoComplete",t)))}applyIcons(t){a.apply(t,(t=>this.textShared.setRenderProp("icons",t)))}applyPattern(t){B.apply(t,(t=>this.textShared.setRenderProp("pattern",t)))}applyPlaceholder(t){p.apply(t,(t=>this.textShared.setRenderProp("placeholder",t)))}applyReadOnly(t){d.apply(t,(t=>this.textShared.setRenderProp("readOnly",t)))}applyRequired(t){c.apply(t,(t=>this.textShared.setRenderProp("required",t)))}applyShortKey(t){s.apply(t,(t=>this.textShared.setRenderProp("shortKey",t))),j(this._accessKey,t)}applySmartButton(t){null==t?this.textShared.unsetRenderProp("smartButton"):u.apply(t,(t=>this.textShared.setRenderProp("smartButton",t)))}applyValue(t){var s;this.initValue(t),this.hasValue=Boolean(this.textShared.getRenderProp("value")),this.counter.update(null!==(s=null==t?void 0:t.length)&&void 0!==s?s:0)}initValue(t){m.apply(t,(t=>this.textShared.setRenderProp("value",t))),this.formAssociation.setFormAssociatedValue(this.textShared.getRenderProp("value"))}initMaxLength(t){this.counter.watchMaxLength(t)}applyVariant(t){i.apply(t,(t=>this.textShared.setRenderProp("variant",t)))}applyHasCounter(t){this.counter.watchHasCounter(t),this.needsImmediateCounterUpdate=!0}applyMaxLength(t){var s,i;this.counter.watchMaxLength(t),this.counter.updateImmediate(null!==(i=null===(s=this._value)||void 0===s?void 0:s.length)&&void 0!==i?i:0)}applyMaxLengthBehavior(t){this.counter.watchMaxLengthBehavior(t),this.needsImmediateCounterUpdate=!0}getTextFormFieldProps(t){const s=this.textShared;return this.getFormFieldProps({class:l(t,{"has-value":this.hasValue,"kol-form-field--has-counter":this.counter.hasSoftLimit()||this.counter.hasCounter()}),accessKey:s.getRenderProp("accessKey")||void 0,shortKey:s.getRenderProp("shortKey")||void 0,variant:s.getRenderProp("variant"),required:s.getRenderProp("required"),readOnly:s.getRenderProp("readOnly"),maxLength:this.counter.getRenderProp("maxLength"),counter:this.counter.getCounterProps()})}getTextInputAdornments(t){return r({icons:this.textShared.getRenderProp("icons"),smartButton:this.getSmartButtonFcProps(this.textShared.getRenderProp("smartButton"),this.textShared.getRenderProp("disabled")),endAdornment:t})}getTextInputProps({type:t,spellcheck:s,multiple:i,suggestions:e},a={}){const r=this.textShared,h=r.getState("id"),n=r.getRenderProp("accessKey"),l=r.getRenderProp("shortKey"),p=r.getRenderProp("placeholder"),d=r.getRenderProp("pattern"),c=this.counter.getMaxLengthAttribute(),u=this.counter.getCharacterLimitHintId(h),{ariaDescribedBy:m,hasError:v}=this.getAria();return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({id:h,hideLabel:r.getRenderProp("hideLabel"),label:r.getRenderProp("label"),disabled:r.getRenderProp("disabled"),name:r.getRenderProp("name")||void 0},n?{accessKey:n}:{}),void 0!==t?{type:t}:{}),{value:r.getRenderProp("value"),required:r.getRenderProp("required")}),void 0!==c?{maxlength:c}:{}),void 0!==p?{placeholder:p}:{}),{autoComplete:r.getRenderProp("autoComplete")}),void 0!==s?{spellcheck:s}:{}),void 0!==d?{pattern:d}:{}),{readonly:r.getRenderProp("readOnly")}),void 0!==i?{multiple:i}:{}),{touched:r.getRenderProp("touched"),msg:r.getRenderProp("msg")}),l?{"aria-keyshortcuts":l}:{}),e&&e.length>0?{suggestions:b(o,{id:h,suggestions:e})}:{}),{ref:this.ctaRef,onBlur:this.handleBlur,onChange:this.handleTextChange,onClick:this.handleClick,onFocus:this.handleTextFocus,onInput:this.handleTextInput,onKeyDown:this.handleTextKeyDown}),a),{ariaDescribedBy:u?[...m,u]:m,"aria-invalid":v?"true":void 0})}};export{q as B,K as t}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{h as e,p as s}from"./bem-registry.js";import{a as t,d as i,t as o,v as r}from"./component2.js";import{h as a,g as l,I as n}from"./input-container.js";import{u as d,v as h,c,g as p,e as u}from"./props-from-config.js";import{m as b}from"./multiple.js";import{r as v}from"./required.js";import{r as m}from"./rows.js";import{f as y,i as f,g as O,c as j,B as g,F as A}from"./base-web-component2.js";import{h as B,Fragment as w}from"@stencil/core/internal/client";import{v as K}from"./access-and-short-key.js";import{f as q}from"./options.js";import{a as P}from"./tslib.es6.js";const k=s=>{if("object"==typeof s&&null!==s){if("string"==typeof s.label&&s.label.length>0)return s.disabled=!0===s.disabled,s.label=`${s.label}`.trim(),!1===d(s.label,3)&&!1===h(s.label)&&e(`A differing Aria-Label (${s.label}) is inaccessible. A differing Aria-Label should consist of at least three readable characters.`),!Array.isArray(s.options)||void 0===s.options.find((e=>!1===k(e)));if("number"==typeof s.label)return!0}return!1},x=c("options",[],(function(e){const t="string"==typeof e?s(e):e;if(Array.isArray(t)&&t.every((e=>k(e))))return t;throw new Error("Invalid select options")})),L=c("value",[],(e=>Array.isArray(e)?e:[e])),$={required:[...y.required],optional:[...y.optional,t,a,b,x,v,m,L,i,o,r]},D=p("kol-select"),E=e=>{var{class:s,index:t,selectedValue:i,selected:o,value:r,label:a,disabled:l}=e,n=P(e,["class","index","selectedValue","selected","value","label","disabled"]);const d=void 0===i?[]:Array.isArray(i)?i:[i],h=o||d.includes(r);return B("option",Object.assign({class:u(D("option",{selected:Boolean(h),disabled:Boolean(l)}),s),selected:h,disabled:l,value:t},n),a)},I=({preKey:e,options:s,disabled:t,value:i,OptionProps:o={},OptionGroupProps:r={}})=>(null==s?void 0:s.length)?B(w,null,s.map(((s,a)=>{const l=[e,`-${a}`].join("");if("options"in s){const e=Boolean(t||s.disabled),{label:a}=s,n=P(s,["label"]);return B("optgroup",Object.assign({class:D("optgroup",{disabled:e}),key:l},r,{label:null==a?void 0:a.toString(),disabled:e}),B(I,Object.assign({OptionGroupProps:r,OptionProps:o,value:i,preKey:l},n,{disabled:e})))}return"value"in s?B(E,Object.assign({key:l},o,{index:l,selectedValue:i},s,{disabled:Boolean(t||s.disabled)})):null}))):null,V=e=>{const{class:s,msg:t,touched:i,disabled:o,required:r,options:a,value:l,OptionProps:n,OptionGroupProps:d,ariaDescribedBy:h,hideLabel:c,label:p}=e,b=P(e,["class","msg","touched","disabled","required","options","value","OptionProps","OptionGroupProps","ariaDescribedBy","hideLabel","label"]),v=Object.assign(Object.assign({class:u(D(Object.assign({disabled:Boolean(o),required:Boolean(r),touched:Boolean(i)},f(t,i)?{[O(t)]:!0}:{})),s),required:r,disabled:o},j({ariaDescribedBy:h,hideLabel:c,label:p})),b);return B("select",Object.assign({},v),B(I,{OptionGroupProps:d,OptionProps:n,disabled:o,options:a,value:l}))},G=(e,s,t)=>{const i=Array.isArray(e);if(s){if(void 0!==e&&!i)throw new Error(`↑ The schema for the property (_value) is not valid for multiple mode. Expected an array. The value will not be changed. (${t} = ${JSON.stringify(e)})`)}else if(i)throw new Error(`↑ The schema for the property (_value) is not valid for single mode. Expected a single value. The value will not be changed. (${t} = ${JSON.stringify(e)})`)},S=(e,s=!1)=>e.flatMap((e=>"options"in e&&Array.isArray(e.options)?S(e.options,Boolean(s||e.disabled)):[Object.assign(Object.assign({},e),{disabled:Boolean(s||e.disabled)})])),T=(e,s,t)=>{if(0===s.length)return e;const i=S(s),o=i.map((e=>e.value)),r=e.every((e=>o.includes(e)))?e:e.filter((e=>o.includes(e)));if(!1===t&&0===r.length){const e=i.find((e=>!0!==e.disabled));return e?[e.value]:r}return r},C=class extends g{constructor(){super(...arguments),this.keyOptionMap=new Map,this.hasValue=!0,this.handleSelectInput=e=>{var s;const t=Array.from((null===(s=this.ctaRef.el)||void 0===s?void 0:s.options)||[]).filter((e=>e.selected)).map((e=>{var s;return null===(s=this.keyOptionMap.get(e.value))||void 0===s?void 0:s.value}));if(this._multiple)this._value=t,this.handleInput(e,t);else{const s=t.length>0?t[0]:void 0;this._value=s,this.handleInput(e,s)}},this.handleSelectChange=e=>{const s=this._value;this.handleChange(e,s),this.hasValue=!!s}}applyAccessKey(e){t.apply(e,(e=>this.setRenderProp("accessKey",e))),K(e,this.getShortKeyProp())}applyShortKey(e){i.apply(e,(e=>this.setRenderProp("shortKey",e))),K(this.getAccessKeyProp(),e)}applyIcons(e){a.apply(e,(e=>this.setRenderProp("icons",e)))}applyMultiple(e){G(this._value,!0===e,"current"),b.apply(e,(e=>{this.setRenderProp("multiple",e),this.setRenderProp("value",T(this.getRenderProp("value"),this.getRenderProp("options"),this._multiple))}))}applyOptions(e){x.apply(e,(e=>{this.setRenderProp("options",e),e.length>0&&(this.keyOptionMap.clear(),q(this.keyOptionMap,e),this.setRenderProp("value",T(this.getRenderProp("value"),e,this._multiple)))}))}applyRequired(e){v.apply(e,(e=>this.setRenderProp("required",e)))}applyRows(e){m.apply(e,(e=>this.setRenderProp("rows",e)))}applyTabIndex(e){o.apply(e,(e=>this.setRenderProp("tabIndex",e)))}applyValue(e){G(e,!0===this._multiple,"received");const s=e=>{const s=T(e,this.getRenderProp("options"),this._multiple);this.setRenderProp("value",s),this.formAssociation.setFormAssociatedValue(this.getModelValue())};null===e?s([null]):L.apply(e,s)}applyVariant(e){r.apply(e,(e=>this.setRenderProp("variant",e)))}getModelValue(){const e=this.getRenderProp("value");return this._multiple?e:Array.isArray(e)&&e.length>0?e[0]:e}getSelectProps(){const{ariaDescribedBy:e,hasError:s}=this.getAria(),t=this.getRenderProp("multiple"),i=this.getRenderProp("shortKey");return Object.assign(Object.assign({id:this.getState("id"),hideLabel:this.getRenderProp("hideLabel"),label:this.getRenderProp("label"),value:this.getRenderProp("value"),options:this.getRenderProp("options"),accessKey:this.getRenderProp("accessKey")||void 0,disabled:this.getRenderProp("disabled"),name:this.getRenderProp("name")||void 0,"aria-invalid":s?"true":void 0,ariaDescribedBy:e,size:t?this.getRenderProp("rows"):void 0,multiple:t,required:this.getRenderProp("required"),touched:this.getRenderProp("touched"),msg:this.getRenderProp("msg")},i?{"aria-keyshortcuts":i}:{}),{ref:this.ctaRef,onBlur:this.handleBlur,onChange:this.handleSelectChange,onClick:this.handleClick,onFocus:this.handleFocus,onInput:this.handleSelectInput,onKeyDown:this.handleKeyDown})}renderSelectField(){const e=this.getRenderProp("disabled"),{startAdornment:s,endAdornment:t}=l({icons:this.getRenderProp("icons")});return B(A,Object.assign({},this.getFormFieldProps({class:u("kol-form-field-select",{"kol-form-field--has-value":this.hasValue}),accessKey:this.getRenderProp("accessKey")||void 0,shortKey:this.getRenderProp("shortKey")||void 0,required:this.getRenderProp("required"),variant:this.getRenderProp("variant")}),{onClick:()=>{var e;return null===(e=this.ctaRef.el)||void 0===e?void 0:e.focus()}}),B(n,{disabled:e,msg:this.getRenderProp("msg"),touched:this.getRenderProp("touched"),startAdornment:s,endAdornment:t},B(V,Object.assign({},this.getSelectProps()))))}};export{C as B,$ as s}
4
+ import{h as e,p as s}from"./bem-registry.js";import{a as t,d as i,t as o,v as r}from"./component2.js";import{h as a,g as l,I as n}from"./input-container.js";import{s as d,u as h,c,g as p,e as u}from"./props-from-config.js";import{m as b}from"./multiple.js";import{r as v}from"./required.js";import{r as m}from"./rows.js";import{f as y,i as f,g as O,c as j,B as g,F as A}from"./base-web-component2.js";import{h as B,Fragment as w}from"@stencil/core/internal/client";import{v as K}from"./access-and-short-key.js";import{f as q}from"./options.js";import{a as P}from"./tslib.es6.js";const k=s=>{if("object"==typeof s&&null!==s){if("string"==typeof s.label&&s.label.length>0)return s.disabled=!0===s.disabled,s.label=`${s.label}`.trim(),!1===d(s.label,3)&&!1===h(s.label)&&e(`A differing Aria-Label (${s.label}) is inaccessible. A differing Aria-Label should consist of at least three readable characters.`),!Array.isArray(s.options)||void 0===s.options.find((e=>!1===k(e)));if("number"==typeof s.label)return!0}return!1},x=c("options",[],(function(e){const t="string"==typeof e?s(e):e;if(Array.isArray(t)&&t.every((e=>k(e))))return t;throw new Error("Invalid select options")})),L=c("value",[],(e=>Array.isArray(e)?e:[e])),$={required:[...y.required],optional:[...y.optional,t,a,b,x,v,m,L,i,o,r]},D=p("kol-select"),E=e=>{var{class:s,index:t,selectedValue:i,selected:o,value:r,label:a,disabled:l}=e,n=P(e,["class","index","selectedValue","selected","value","label","disabled"]);const d=void 0===i?[]:Array.isArray(i)?i:[i],h=o||d.includes(r);return B("option",Object.assign({class:u(D("option",{selected:Boolean(h),disabled:Boolean(l)}),s),selected:h,disabled:l,value:t},n),a)},I=({preKey:e,options:s,disabled:t,value:i,OptionProps:o={},OptionGroupProps:r={}})=>(null==s?void 0:s.length)?B(w,null,s.map(((s,a)=>{const l=[e,`-${a}`].join("");if("options"in s){const e=Boolean(t||s.disabled),{label:a}=s,n=P(s,["label"]);return B("optgroup",Object.assign({class:D("optgroup",{disabled:e}),key:l},r,{label:null==a?void 0:a.toString(),disabled:e}),B(I,Object.assign({OptionGroupProps:r,OptionProps:o,value:i,preKey:l},n,{disabled:e})))}return"value"in s?B(E,Object.assign({key:l},o,{index:l,selectedValue:i},s,{disabled:Boolean(t||s.disabled)})):null}))):null,V=e=>{const{class:s,msg:t,touched:i,disabled:o,required:r,options:a,value:l,OptionProps:n,OptionGroupProps:d,ariaDescribedBy:h,hideLabel:c,label:p}=e,b=P(e,["class","msg","touched","disabled","required","options","value","OptionProps","OptionGroupProps","ariaDescribedBy","hideLabel","label"]),v=Object.assign(Object.assign({class:u(D(Object.assign({disabled:Boolean(o),required:Boolean(r),touched:Boolean(i)},f(t,i)?{[O(t)]:!0}:{})),s),required:r,disabled:o},j({ariaDescribedBy:h,hideLabel:c,label:p})),b);return B("select",Object.assign({},v),B(I,{OptionGroupProps:d,OptionProps:n,disabled:o,options:a,value:l}))},G=(e,s,t)=>{const i=Array.isArray(e);if(s){if(void 0!==e&&!i)throw new Error(`↑ The schema for the property (_value) is not valid for multiple mode. Expected an array. The value will not be changed. (${t} = ${JSON.stringify(e)})`)}else if(i)throw new Error(`↑ The schema for the property (_value) is not valid for single mode. Expected a single value. The value will not be changed. (${t} = ${JSON.stringify(e)})`)},S=(e,s=!1)=>e.flatMap((e=>"options"in e&&Array.isArray(e.options)?S(e.options,Boolean(s||e.disabled)):[Object.assign(Object.assign({},e),{disabled:Boolean(s||e.disabled)})])),T=(e,s,t)=>{if(0===s.length)return e;const i=S(s),o=i.map((e=>e.value)),r=e.every((e=>o.includes(e)))?e:e.filter((e=>o.includes(e)));if(!1===t&&0===r.length){const e=i.find((e=>!0!==e.disabled));return e?[e.value]:r}return r},C=class extends g{constructor(){super(...arguments),this.keyOptionMap=new Map,this.hasValue=!0,this.handleSelectInput=e=>{var s;const t=Array.from((null===(s=this.ctaRef.el)||void 0===s?void 0:s.options)||[]).filter((e=>e.selected)).map((e=>{var s;return null===(s=this.keyOptionMap.get(e.value))||void 0===s?void 0:s.value}));if(this._multiple)this._value=t,this.handleInput(e,t);else{const s=t.length>0?t[0]:void 0;this._value=s,this.handleInput(e,s)}},this.handleSelectChange=e=>{const s=this._value;this.handleChange(e,s),this.hasValue=!!s}}applyAccessKey(e){t.apply(e,(e=>this.setRenderProp("accessKey",e))),K(e,this.getShortKeyProp())}applyShortKey(e){i.apply(e,(e=>this.setRenderProp("shortKey",e))),K(this.getAccessKeyProp(),e)}applyIcons(e){a.apply(e,(e=>this.setRenderProp("icons",e)))}applyMultiple(e){G(this._value,!0===e,"current"),b.apply(e,(e=>{this.setRenderProp("multiple",e),this.setRenderProp("value",T(this.getRenderProp("value"),this.getRenderProp("options"),this._multiple))}))}applyOptions(e){x.apply(e,(e=>{this.setRenderProp("options",e),e.length>0&&(this.keyOptionMap.clear(),q(this.keyOptionMap,e),this.setRenderProp("value",T(this.getRenderProp("value"),e,this._multiple)))}))}applyRequired(e){v.apply(e,(e=>this.setRenderProp("required",e)))}applyRows(e){m.apply(e,(e=>this.setRenderProp("rows",e)))}applyTabIndex(e){o.apply(e,(e=>this.setRenderProp("tabIndex",e)))}applyValue(e){G(e,!0===this._multiple,"received");const s=e=>{const s=T(e,this.getRenderProp("options"),this._multiple);this.setRenderProp("value",s),this.formAssociation.setFormAssociatedValue(this.getModelValue())};null===e?s([null]):L.apply(e,s)}applyVariant(e){r.apply(e,(e=>this.setRenderProp("variant",e)))}getModelValue(){const e=this.getRenderProp("value");return this._multiple?e:Array.isArray(e)&&e.length>0?e[0]:e}getSelectProps(){const{ariaDescribedBy:e,hasError:s}=this.getAria(),t=this.getRenderProp("multiple"),i=this.getRenderProp("shortKey");return Object.assign(Object.assign({id:this.getState("id"),hideLabel:this.getRenderProp("hideLabel"),label:this.getRenderProp("label"),value:this.getRenderProp("value"),options:this.getRenderProp("options"),accessKey:this.getRenderProp("accessKey")||void 0,disabled:this.getRenderProp("disabled"),name:this.getRenderProp("name")||void 0,"aria-invalid":s?"true":void 0,ariaDescribedBy:e,size:t?this.getRenderProp("rows"):void 0,multiple:t,required:this.getRenderProp("required"),touched:this.getRenderProp("touched"),msg:this.getRenderProp("msg")},i?{"aria-keyshortcuts":i}:{}),{ref:this.ctaRef,onBlur:this.handleBlur,onChange:this.handleSelectChange,onClick:this.handleClick,onFocus:this.handleFocus,onInput:this.handleSelectInput,onKeyDown:this.handleKeyDown})}renderSelectField(){const e=this.getRenderProp("disabled"),{startAdornment:s,endAdornment:t}=l({icons:this.getRenderProp("icons")});return B(A,Object.assign({},this.getFormFieldProps({class:u("kol-form-field-select",{"kol-form-field--has-value":this.hasValue}),accessKey:this.getRenderProp("accessKey")||void 0,shortKey:this.getRenderProp("shortKey")||void 0,required:this.getRenderProp("required"),variant:this.getRenderProp("variant")}),{onClick:()=>{var e;return null===(e=this.ctaRef.el)||void 0===e?void 0:e.focus()}}),B(n,{disabled:e,msg:this.getRenderProp("msg"),touched:this.getRenderProp("touched"),startAdornment:s,endAdornment:t},B(V,Object.assign({},this.getSelectProps()))))}};export{C as B,$ as s}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{h as s}from"@stencil/core/internal/client";import{s as i,X as t}from"./bem-registry.js";import{B as a}from"./base-web-component.js";import{b as e,e as o,a as h,n as l,c as r,d as n,B as p}from"./component8.js";import{F as d}from"./behavior3.js";import{T as c}from"./behavior.js";import{a as m,b as y,c as b,f as u,g as f,h as v,s as j,i as x,l as A,d as C,t as I,e as B,v as g}from"./component2.js";import{d as D}from"./disabled.js";import{i as K}from"./id.js";import"./props-from-config.js";import{l as T}from"./label-with-expert-slot.js";import{v as S}from"./access-and-short-key.js";import{c as L}from"./element-interaction.js";import{d as w,K as F}from"./events.js";import{p as H,a as P}from"./controller.js";const E=class extends a{constructor(){super(...arguments),this.ctaRef=L(),this.propsConfig=e,this.tooltipBehavior=new c(this.stateAccess),this.handleClick=s=>{s.stopPropagation(),this.tooltipBehavior.hideTooltip();const t=this.getRenderProp("type");if("submit"===t)H({form:this.host});else if("reset"===t)P({form:this.host});else{this.formAssociation.setFormAssociatedValue(this.formValue);const t=this.getRenderProp("on").onClick;"function"==typeof t&&(i(s,this.ctaRef.el),t(s,this.formValue))}this.host&&w(this.host,F.click,this.formValue)},this.handleMouseDown=s=>{var i,t;null===(t=(i=this.getRenderProp("on")).onMouseDown)||void 0===t||t.call(i,s),this.host&&w(this.host,F.mousedown)},this.handleFocus=s=>{var i,t;null===(t=(i=this.getRenderProp("on")).onFocus)||void 0===t||t.call(i,s),this.host&&w(this.host,F.focus)},this.handleBlur=s=>{var i,t;null===(t=(i=this.getRenderProp("on")).onBlur)||void 0===t||t.call(i,s),this.host&&w(this.host,F.blur)}}initFormAssociation(){this.formAssociation=new d(a.stateLess,{host:this.host,type:"button"})}unsetButtonTabIndex(){this.unsetRenderProp("tabIndex")}initTooltipBehavior(){this.tooltipBehavior.componentWillLoad({label:this.getRenderProp("label"),align:this.getRenderProp("tooltipAlign")})}syncTooltipListeners(){this.ctaRef.el&&this.tooltipBehavior.syncListeners(void 0,this.ctaRef.el,!0)}destroyTooltipBehavior(){this.tooltipBehavior.destroy()}applyAccessKey(s,i){m.apply(s,(s=>this.setRenderProp("accessKey",s))),S(s,i)}applyAriaControls(s){y.apply(s,(s=>this.setRenderProp("ariaControls",s)))}applyAriaDescription(s){b.apply(s,(s=>this.setRenderProp("ariaDescription",s)))}applyAriaExpanded(s){u.apply(s,(s=>this.setRenderProp("ariaExpanded",s)))}applyAriaHasPopup(s){o.apply(s,(s=>this.setRenderProp("ariaHasPopup",s)))}applyAriaSelected(s){h.apply(s,(s=>this.setRenderProp("ariaSelected",s)))}applyCustomClass(s){f.apply(s,(s=>this.setRenderProp("customClass",s)))}applyDisabled(s){D.apply(s,(s=>this.setRenderProp("disabled",s)))}applyHideLabel(s){v.apply(s,(s=>this.setRenderProp("hideLabel",s)))}applyIcons(s){j.apply(s,(s=>this.setRenderProp("icons",s)))}applyId(s){K.apply(s,(s=>this.setRenderProp("id",s)))}applyInline(s){x.apply(s,(s=>this.setRenderProp("inline",s)))}applyLabel(s){T.apply(s,(s=>{this.setRenderProp("label",s),this.tooltipBehavior.watchLabel(s)}),this.isRequired("label"))}applyName(s){l.apply(s,(s=>this.setRenderProp("name",s))),this.formAssociation.watchName(s)}applyOn(s){r.apply(s,(s=>this.setRenderProp("on",s)))}applyRole(s){A.apply(s,(s=>this.setRenderProp("role",s)))}applyShortKey(s,i){C.apply(s,(s=>this.setRenderProp("shortKey",s))),S(i,s)}applySyncValueBySelector(s){this.formAssociation.watchSyncValueBySelector(s)}applyTabIndex(s){"number"==typeof s?I.apply(s,(s=>this.setRenderProp("tabIndex",s))):this.unsetRenderProp("tabIndex")}applyTooltipAlign(s){B.apply(null!=s?s:"top",(s=>{this.setRenderProp("tooltipAlign",s),this.tooltipBehavior.watchAlign(s)}))}applyType(s){n.apply(s,(s=>this.setRenderProp("type",s)))}applyValue(s){this.formValue=s,this.formAssociation.setFormAssociatedValue(s)}applyVariant(s){var i;g.apply(null!==(i=null!=s?s:t("buttonVariantDefault",this.host))&&void 0!==i?i:"normal",(s=>this.setRenderProp("variant",s)))}getButtonFCProps(){return{accessKey:this.getRenderProp("accessKey"),ariaControls:this.getRenderProp("ariaControls"),ariaDescription:this.getRenderProp("ariaDescription"),ariaDescriptionId:this.getState("ariaDescriptionId"),ariaExpanded:this.getRenderProp("ariaExpanded"),ariaHasPopup:this.getRenderProp("ariaHasPopup"),ariaSelected:this.getRenderProp("ariaSelected"),customClass:this.getRenderProp("customClass"),disabled:this.getRenderProp("disabled"),handleBlur:this.handleBlur,handleClick:this.handleClick,handleFocus:this.handleFocus,handleMouseDown:this.handleMouseDown,hideLabel:this.getRenderProp("hideLabel"),icons:this.getRenderProp("icons"),id:this.getRenderProp("id"),inline:this.getRenderProp("inline"),label:this.getRenderProp("label"),name:this.getRenderProp("name"),on:this.getRenderProp("on"),refButton:this.ctaRef,refTooltip:this.tooltipBehavior.setTooltipElementRef,role:this.getRenderProp("role"),shortKey:this.getRenderProp("shortKey"),tabIndex:this.getRenderProp("tabIndex"),tooltipAlign:this.getRenderProp("tooltipAlign"),type:this.getRenderProp("type"),variant:this.getRenderProp("variant")}}renderButtonFC(){return s(p,Object.assign({},this.getButtonFCProps()))}};export{E as B}
4
+ import{h as s}from"@stencil/core/internal/client";import{s as i,X as t}from"./bem-registry.js";import{B as a}from"./base-web-component.js";import{b as e,e as o,a as h,n as l,c as r,d as n,B as p}from"./component8.js";import{F as d}from"./behavior3.js";import{p as c,a as m}from"./controller.js";import{T as y}from"./behavior.js";import{a as b,b as u,c as f,f as v,g as j,h as x,s as A,i as C,l as I,d as B,t as g,e as D,v as K}from"./component2.js";import{d as T}from"./disabled.js";import{i as S}from"./id.js";import"./props-from-config.js";import{l as L}from"./label-with-expert-slot.js";import{v as w}from"./access-and-short-key.js";import{c as F}from"./element-interaction.js";import{d as H,K as P}from"./events.js";const E=class extends a{constructor(){super(...arguments),this.ctaRef=F(),this.propsConfig=e,this.tooltipBehavior=new y(this.stateAccess),this.handleClick=s=>{s.stopPropagation(),this.tooltipBehavior.hideTooltip();const t=this.getRenderProp("type");if("submit"===t)c({form:this.host});else if("reset"===t)m({form:this.host});else{this.formAssociation.setFormAssociatedValue(this.formValue);const t=this.getRenderProp("on").onClick;"function"==typeof t&&(i(s,this.ctaRef.el),t(s,this.formValue))}this.host&&H(this.host,P.click,this.formValue)},this.handleMouseDown=s=>{var i,t;null===(t=(i=this.getRenderProp("on")).onMouseDown)||void 0===t||t.call(i,s),this.host&&H(this.host,P.mousedown)},this.handleFocus=s=>{var i,t;null===(t=(i=this.getRenderProp("on")).onFocus)||void 0===t||t.call(i,s),this.host&&H(this.host,P.focus)},this.handleBlur=s=>{var i,t;null===(t=(i=this.getRenderProp("on")).onBlur)||void 0===t||t.call(i,s),this.host&&H(this.host,P.blur)}}initFormAssociation(){this.formAssociation=new d(a.stateLess,{host:this.host,type:"button"})}unsetButtonTabIndex(){this.unsetRenderProp("tabIndex")}initTooltipBehavior(){this.tooltipBehavior.componentWillLoad({label:this.getRenderProp("label"),align:this.getRenderProp("tooltipAlign")})}syncTooltipListeners(){this.ctaRef.el&&this.tooltipBehavior.syncListeners(void 0,this.ctaRef.el,!0)}destroyTooltipBehavior(){this.tooltipBehavior.destroy()}applyAccessKey(s,i){b.apply(s,(s=>this.setRenderProp("accessKey",s))),w(s,i)}applyAriaControls(s){u.apply(s,(s=>this.setRenderProp("ariaControls",s)))}applyAriaDescription(s){f.apply(s,(s=>this.setRenderProp("ariaDescription",s)))}applyAriaExpanded(s){v.apply(s,(s=>this.setRenderProp("ariaExpanded",s)))}applyAriaHasPopup(s){o.apply(s,(s=>this.setRenderProp("ariaHasPopup",s)))}applyAriaSelected(s){h.apply(s,(s=>this.setRenderProp("ariaSelected",s)))}applyCustomClass(s){j.apply(s,(s=>this.setRenderProp("customClass",s)))}applyDisabled(s){T.apply(s,(s=>this.setRenderProp("disabled",s)))}applyHideLabel(s){x.apply(s,(s=>this.setRenderProp("hideLabel",s)))}applyIcons(s){A.apply(s,(s=>this.setRenderProp("icons",s)))}applyId(s){S.apply(s,(s=>this.setRenderProp("id",s)))}applyInline(s){C.apply(s,(s=>this.setRenderProp("inline",s)))}applyLabel(s){L.apply(s,(s=>{this.setRenderProp("label",s),this.tooltipBehavior.watchLabel(s)}),this.isRequired("label"))}applyName(s){l.apply(s,(s=>this.setRenderProp("name",s))),this.formAssociation.watchName(s)}applyOn(s){r.apply(s,(s=>this.setRenderProp("on",s)))}applyRole(s){I.apply(s,(s=>this.setRenderProp("role",s)))}applyShortKey(s,i){B.apply(s,(s=>this.setRenderProp("shortKey",s))),w(i,s)}applySyncValueBySelector(s){this.formAssociation.watchSyncValueBySelector(s)}applyTabIndex(s){"number"==typeof s?g.apply(s,(s=>this.setRenderProp("tabIndex",s))):this.unsetRenderProp("tabIndex")}applyTooltipAlign(s){D.apply(null!=s?s:"top",(s=>{this.setRenderProp("tooltipAlign",s),this.tooltipBehavior.watchAlign(s)}))}applyType(s){n.apply(s,(s=>this.setRenderProp("type",s)))}applyValue(s){this.formValue=s,this.formAssociation.setFormAssociatedValue(s)}applyVariant(s){var i;K.apply(null!==(i=null!=s?s:t("buttonVariantDefault",this.host))&&void 0!==i?i:"normal",(s=>this.setRenderProp("variant",s)))}getButtonFCProps(){return{accessKey:this.getRenderProp("accessKey"),ariaControls:this.getRenderProp("ariaControls"),ariaDescription:this.getRenderProp("ariaDescription"),ariaDescriptionId:this.getState("ariaDescriptionId"),ariaExpanded:this.getRenderProp("ariaExpanded"),ariaHasPopup:this.getRenderProp("ariaHasPopup"),ariaSelected:this.getRenderProp("ariaSelected"),customClass:this.getRenderProp("customClass"),disabled:this.getRenderProp("disabled"),handleBlur:this.handleBlur,handleClick:this.handleClick,handleFocus:this.handleFocus,handleMouseDown:this.handleMouseDown,hideLabel:this.getRenderProp("hideLabel"),icons:this.getRenderProp("icons"),id:this.getRenderProp("id"),inline:this.getRenderProp("inline"),label:this.getRenderProp("label"),name:this.getRenderProp("name"),on:this.getRenderProp("on"),refButton:this.ctaRef,refTooltip:this.tooltipBehavior.setTooltipElementRef,role:this.getRenderProp("role"),shortKey:this.getRenderProp("shortKey"),tabIndex:this.getRenderProp("tabIndex"),tooltipAlign:this.getRenderProp("tooltipAlign"),type:this.getRenderProp("type"),variant:this.getRenderProp("variant")}}renderButtonFC(){return s(p,Object.assign({},this.getButtonFCProps()))}};export{E as B}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{h as i}from"@stencil/core/internal/client";import{B as s}from"./base-web-component.js";import{r as t,C as o}from"./component7.js";import"./bem-registry.js";import{l}from"./level.js";import{d as h,w as a}from"./width.js";import{F as e,t as r}from"./props-from-config.js";import{l as n}from"./label-lang-segment.js";import{u as d,l as p,D as m}from"./scroll-lock.js";import{T as v}from"./behavior.js";import{c}from"./element-interaction.js";import{d as u,K as f}from"./events.js";import{h as b}from"./tooltip-open-tracking.js";const g={required:[n],optional:[h,l,e,a]},j=class extends s{constructor(){super(...arguments),this.dialogRef=c(),this.cardCloseButtonRef=c(),this.cardCloseTooltipBehavior=new v(this.stateAccess),this.propsConfig=g,this.handleCancel=i=>{var s,t;b(i),i.defaultPrevented||(null===(t=(s=this.getRenderProp("on")).onCancel)||void 0===t||t.call(s,i),i.defaultPrevented||this.host&&!u(this.host,f.cancel)&&i.preventDefault())},this.handleClose=i=>{var s,t,o,l;i.target===this.dialogRef.el&&(d(this),null===(t=(s=this.getRenderProp("on")).onClose)||void 0===t||t.call(s),null===(l=(o=this.getRenderProp("on")).onToggle)||void 0===l||l.call(o,!1),this.host&&(u(this.host,f.close),u(this.host,f.toggle)))},this.handleCardClose=()=>{this.cardCloseTooltipBehavior.hideTooltip(),this.closeDialog(),this.host&&u(this.host,f.close)}}initCardCloseButton(){this.cardCloseButtonProps=t(this.host),this.cardCloseTooltipBehavior.componentWillLoad({label:this.cardCloseButtonProps.label,align:this.cardCloseButtonProps.tooltipAlign})}syncCardCloseTooltipListeners(){this.cardCloseButtonRef.el&&this.cardCloseTooltipBehavior.syncListeners(void 0,this.cardCloseButtonRef.el,!0)}teardownDialog(){this.closeDialog(),d(this),this.cardCloseTooltipBehavior.destroy()}applyLabel(i){n.apply(i,(i=>this.setRenderProp("label",i)),this.isRequired("label"))}applyLevel(i){l.apply(i,(i=>this.setRenderProp("level",i)))}applyOn(i){h.apply(i,(i=>this.setRenderProp("on",i)))}applyVariant(i){e.apply(i,(i=>this.setRenderProp("variant",i)))}applyWidth(i){a.apply(i,(i=>this.setRenderProp("width",i)))}showDialog(i){var s,t,o,l;const h=this.dialogRef.el;(null==h?void 0:h.open)||(this.setState("modal",i),i?(null===(s=null==h?void 0:h.showModal)||void 0===s||s.call(h),h&&p(this)):null===(t=null==h?void 0:h.show)||void 0===t||t.call(h),null===(l=(o=this.getRenderProp("on")).onToggle)||void 0===l||l.call(o,!0),this.host&&u(this.host,f.toggle))}closeDialog(){var i,s;null===(s=null===(i=this.dialogRef.el)||void 0===i?void 0:i.close)||void 0===s||s.call(i)}buildCardProps(){return{ariaDescriptionId:this.getState("ariaDescriptionId"),closeButtonProps:this.cardCloseButtonProps,handleClose:this.handleCardClose,hasCloser:!0,headingId:this.getState("headingId"),label:this.getRenderProp("label"),level:this.getRenderProp("level"),refCloseButton:this.cardCloseButtonRef,refTooltip:this.cardCloseTooltipBehavior.setTooltipElementRef}}renderDialogFC(){const s=this.getRenderProp("variant"),t="card"===s;return i(m,{handleCancel:this.handleCancel,handleClose:this.handleClose,label:r(this.getRenderProp("label")),labelledBy:t?this.getState("headingId"):void 0,modal:this.getState("modal"),refDialog:this.dialogRef,variant:s,width:this.getRenderProp("width")},t?i(o,Object.assign({},this.buildCardProps()),this.renderSlot()):this.renderSlot())}};export{j as B}
4
+ import{h as i}from"@stencil/core/internal/client";import{B as s}from"./base-web-component.js";import{r as t,C as o}from"./component7.js";import"./bem-registry.js";import{l}from"./level.js";import{d as h,w as a}from"./width.js";import{E as e,t as r}from"./props-from-config.js";import{l as n}from"./label-lang-segment.js";import{u as d,l as p,D as m}from"./scroll-lock.js";import{T as v}from"./behavior.js";import{c}from"./element-interaction.js";import{d as u,K as f}from"./events.js";import{h as b}from"./tooltip-open-tracking.js";const g={required:[n],optional:[h,l,e,a]},j=class extends s{constructor(){super(...arguments),this.dialogRef=c(),this.cardCloseButtonRef=c(),this.cardCloseTooltipBehavior=new v(this.stateAccess),this.propsConfig=g,this.handleCancel=i=>{var s,t;b(i),i.defaultPrevented||(null===(t=(s=this.getRenderProp("on")).onCancel)||void 0===t||t.call(s,i),i.defaultPrevented||this.host&&!u(this.host,f.cancel)&&i.preventDefault())},this.handleClose=i=>{var s,t,o,l;i.target===this.dialogRef.el&&(d(this),null===(t=(s=this.getRenderProp("on")).onClose)||void 0===t||t.call(s),null===(l=(o=this.getRenderProp("on")).onToggle)||void 0===l||l.call(o,!1),this.host&&(u(this.host,f.close),u(this.host,f.toggle)))},this.handleCardClose=()=>{this.cardCloseTooltipBehavior.hideTooltip(),this.closeDialog(),this.host&&u(this.host,f.close)}}initCardCloseButton(){this.cardCloseButtonProps=t(this.host),this.cardCloseTooltipBehavior.componentWillLoad({label:this.cardCloseButtonProps.label,align:this.cardCloseButtonProps.tooltipAlign})}syncCardCloseTooltipListeners(){this.cardCloseButtonRef.el&&this.cardCloseTooltipBehavior.syncListeners(void 0,this.cardCloseButtonRef.el,!0)}teardownDialog(){this.closeDialog(),d(this),this.cardCloseTooltipBehavior.destroy()}applyLabel(i){n.apply(i,(i=>this.setRenderProp("label",i)),this.isRequired("label"))}applyLevel(i){l.apply(i,(i=>this.setRenderProp("level",i)))}applyOn(i){h.apply(i,(i=>this.setRenderProp("on",i)))}applyVariant(i){e.apply(i,(i=>this.setRenderProp("variant",i)))}applyWidth(i){a.apply(i,(i=>this.setRenderProp("width",i)))}showDialog(i){var s,t,o,l;const h=this.dialogRef.el;(null==h?void 0:h.open)||(this.setState("modal",i),i?(null===(s=null==h?void 0:h.showModal)||void 0===s||s.call(h),h&&p(this)):null===(t=null==h?void 0:h.show)||void 0===t||t.call(h),null===(l=(o=this.getRenderProp("on")).onToggle)||void 0===l||l.call(o,!0),this.host&&u(this.host,f.toggle))}closeDialog(){var i,s;null===(s=null===(i=this.dialogRef.el)||void 0===i?void 0:i.close)||void 0===s||s.call(i)}buildCardProps(){return{ariaDescriptionId:this.getState("ariaDescriptionId"),closeButtonProps:this.cardCloseButtonProps,handleClose:this.handleCardClose,hasCloser:!0,headingId:this.getState("headingId"),label:this.getRenderProp("label"),level:this.getRenderProp("level"),refCloseButton:this.cardCloseButtonRef,refTooltip:this.cardCloseTooltipBehavior.setTooltipElementRef}}renderDialogFC(){const s=this.getRenderProp("variant"),t="card"===s;return i(m,{handleCancel:this.handleCancel,handleClose:this.handleClose,label:r(this.getRenderProp("label")),labelledBy:t?this.getState("headingId"):void 0,modal:this.getState("modal"),refDialog:this.dialogRef,variant:s,width:this.getRenderProp("width")},t?i(o,Object.assign({},this.buildCardProps()),this.renderSlot()):this.renderSlot())}};export{j as B}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{h as i}from"@stencil/core/internal/client";import{B as s}from"./base-web-component.js";import{l as t,a,c as r,d as e,b as o,L as h}from"./component5.js";import{T as n}from"./behavior.js";import{s as l}from"./bem-registry.js";import{a as p,b as d,c,f as m,g as y,h as b,s as f,i as u,l as C,d as g,t as x,e as j,v}from"./component2.js";import{d as A}from"./disabled.js";import{h as L}from"./href.js";import"./props-from-config.js";import{l as w}from"./label-with-expert-slot.js";import{l as I}from"./link-target.js";import{c as K}from"./element-interaction.js";import{d as D,K as T}from"./events.js";import{o as k}from"./ariaCurrentService.js";const V=class extends s{constructor(){super(...arguments),this.ctaRef=K((()=>!0===this.getRenderProp("disabled"))),this.tooltipBehavior=new n(this.stateAccess),this.propsConfig=t,this.handleAnchorClick=i=>{if(this.tooltipBehavior.hideTooltip(),!0===this.getRenderProp("disabled"))return void i.preventDefault();const s=this.getRenderProp("href"),t=this.getRenderProp("on");"function"==typeof(null==t?void 0:t.onClick)&&(l(i,this.ctaRef.el),t.onClick(i,s)),this.host&&D(this.host,T.click,s)},this.setAnchorRef=i=>{this.ctaRef(i)}}unsetLinkTabIndex(){this.unsetRenderProp("tabIndex")}initLinkBehaviors(){this.unsubscribeOnLocationChange=k((i=>{const s=this.getRenderProp("href"),t=this.getRenderProp("ariaCurrentValue"),a=i===s?t:"";this.getState("ariaCurrent")!==a&&this.setState("ariaCurrent",a)})),this.tooltipBehavior.componentWillLoad({label:this.getTooltipLabel(),align:this.getRenderProp("tooltipAlign")})}syncTooltipListeners(){this.ctaRef.el&&this.tooltipBehavior.syncListeners(void 0,this.ctaRef.el,!0)}destroyLinkBehaviors(){this.unsubscribeOnLocationChange&&(this.unsubscribeOnLocationChange(),this.unsubscribeOnLocationChange=void 0),this.tooltipBehavior.destroy()}getTooltipLabel(){const i=this.getRenderProp("label");if("string"==typeof i&&i.length>0)return i;const s=this.getRenderProp("href");return"string"==typeof s?s:""}applyAccessKey(i){p.apply(i,(i=>this.setRenderProp("accessKey",i)))}applyAriaControls(i){d.apply(i,(i=>this.setRenderProp("ariaControls",i)))}applyAriaCurrentValue(i){a.apply(i,(i=>this.setRenderProp("ariaCurrentValue",i)))}applyAriaDescription(i){c.apply(i,(i=>this.setRenderProp("ariaDescription",i)))}applyAriaExpanded(i){m.apply(i,(i=>this.setRenderProp("ariaExpanded",i)))}applyAriaOwns(i){r.apply(i,(i=>this.setRenderProp("ariaOwns",i)))}applyCustomClass(i){y.apply(i,(i=>this.setRenderProp("customClass",i)))}applyDisabled(i){A.apply(i,(i=>this.setRenderProp("disabled",i)))}applyDownload(i){e.apply(i,(i=>this.setRenderProp("download",i)))}applyHideLabel(i){b.apply(i,(i=>this.setRenderProp("hideLabel",i)))}applyHref(i){L.apply(i,(i=>this.setRenderProp("href",i)),this.isRequired("href"))}applyIcons(i){f.apply(i,(i=>this.setRenderProp("icons",i)))}applyInline(i){u.apply(i,(i=>this.setRenderProp("inline",i)))}applyLabel(i){w.apply(i,(s=>{this.setRenderProp("label",s),this.setState("expertSlot",""===i),this.tooltipBehavior.watchLabel(this.getTooltipLabel())}),this.isRequired("label"))}applyOn(i){o.apply(i,(i=>this.setRenderProp("on",i)))}applyRole(i){C.apply(i,(i=>this.setRenderProp("role",i)))}applyShortKey(i){g.apply(i,(i=>this.setRenderProp("shortKey",i)))}applyTabIndex(i){"number"==typeof i?x.apply(i,(i=>this.setRenderProp("tabIndex",i))):this.unsetRenderProp("tabIndex")}applyTarget(i){I.apply(i,(i=>this.setRenderProp("target",i)))}applyTooltipAlign(i){j.apply(i,(i=>{this.setRenderProp("tooltipAlign",i),this.tooltipBehavior.watchAlign(i)}))}applyVariant(i){v.apply(i,(i=>this.setRenderProp("variant",i)))}renderLinkFC(){return i(h,{accessKey:this.getRenderProp("accessKey"),ariaControls:this.getRenderProp("ariaControls"),ariaCurrent:this.getState("ariaCurrent"),ariaCurrentValue:this.getRenderProp("ariaCurrentValue"),ariaDescription:this.getRenderProp("ariaDescription"),ariaDescriptionId:this.getState("ariaDescriptionId"),ariaExpanded:this.getRenderProp("ariaExpanded"),ariaOwns:this.getRenderProp("ariaOwns"),customClass:this.getRenderProp("customClass"),disabled:this.getRenderProp("disabled"),download:this.getRenderProp("download"),handleAnchorClick:this.handleAnchorClick,hideLabel:this.getRenderProp("hideLabel"),href:this.getRenderProp("href"),icons:this.getRenderProp("icons"),inline:this.getRenderProp("inline"),label:this.getRenderProp("label"),on:this.getRenderProp("on"),refAnchor:this.setAnchorRef,refTooltip:this.tooltipBehavior.setTooltipElementRef,role:this.getRenderProp("role"),shortKey:this.getRenderProp("shortKey"),tabIndex:this.getRenderProp("tabIndex"),target:this.getRenderProp("target"),tooltipAlign:this.getRenderProp("tooltipAlign"),variant:this.getRenderProp("variant"),expertSlot:this.getState("expertSlot")})}};export{V as B}
4
+ import{h as i}from"@stencil/core/internal/client";import{B as s}from"./base-web-component.js";import{l as t,a,c as r,d as e,b as o,L as h}from"./component5.js";import{o as n}from"./aria-current-service.js";import{T as l}from"./behavior.js";import{s as p}from"./bem-registry.js";import{a as d,b as c,c as m,f as y,g as b,h as f,s as u,i as C,l as g,d as x,t as j,e as v,v as A}from"./component2.js";import{d as L}from"./disabled.js";import{h as w}from"./href.js";import"./props-from-config.js";import{l as I}from"./label-with-expert-slot.js";import{l as K}from"./link-target.js";import{c as D}from"./element-interaction.js";import{d as T,K as k}from"./events.js";const V=class extends s{constructor(){super(...arguments),this.ctaRef=D((()=>!0===this.getRenderProp("disabled"))),this.tooltipBehavior=new l(this.stateAccess),this.propsConfig=t,this.handleAnchorClick=i=>{if(this.tooltipBehavior.hideTooltip(),!0===this.getRenderProp("disabled"))return void i.preventDefault();const s=this.getRenderProp("href"),t=this.getRenderProp("on");"function"==typeof(null==t?void 0:t.onClick)&&(p(i,this.ctaRef.el),t.onClick(i,s)),this.host&&T(this.host,k.click,s)},this.setAnchorRef=i=>{this.ctaRef(i)}}unsetLinkTabIndex(){this.unsetRenderProp("tabIndex")}initLinkBehaviors(){this.unsubscribeOnLocationChange=n((i=>{const s=this.getRenderProp("href"),t=this.getRenderProp("ariaCurrentValue"),a=i===s?t:"";this.getState("ariaCurrent")!==a&&this.setState("ariaCurrent",a)})),this.tooltipBehavior.componentWillLoad({label:this.getTooltipLabel(),align:this.getRenderProp("tooltipAlign")})}syncTooltipListeners(){this.ctaRef.el&&this.tooltipBehavior.syncListeners(void 0,this.ctaRef.el,!0)}destroyLinkBehaviors(){this.unsubscribeOnLocationChange&&(this.unsubscribeOnLocationChange(),this.unsubscribeOnLocationChange=void 0),this.tooltipBehavior.destroy()}getTooltipLabel(){const i=this.getRenderProp("label");if("string"==typeof i&&i.length>0)return i;const s=this.getRenderProp("href");return"string"==typeof s?s:""}applyAccessKey(i){d.apply(i,(i=>this.setRenderProp("accessKey",i)))}applyAriaControls(i){c.apply(i,(i=>this.setRenderProp("ariaControls",i)))}applyAriaCurrentValue(i){a.apply(i,(i=>this.setRenderProp("ariaCurrentValue",i)))}applyAriaDescription(i){m.apply(i,(i=>this.setRenderProp("ariaDescription",i)))}applyAriaExpanded(i){y.apply(i,(i=>this.setRenderProp("ariaExpanded",i)))}applyAriaOwns(i){r.apply(i,(i=>this.setRenderProp("ariaOwns",i)))}applyCustomClass(i){b.apply(i,(i=>this.setRenderProp("customClass",i)))}applyDisabled(i){L.apply(i,(i=>this.setRenderProp("disabled",i)))}applyDownload(i){e.apply(i,(i=>this.setRenderProp("download",i)))}applyHideLabel(i){f.apply(i,(i=>this.setRenderProp("hideLabel",i)))}applyHref(i){w.apply(i,(i=>this.setRenderProp("href",i)),this.isRequired("href"))}applyIcons(i){u.apply(i,(i=>this.setRenderProp("icons",i)))}applyInline(i){C.apply(i,(i=>this.setRenderProp("inline",i)))}applyLabel(i){I.apply(i,(s=>{this.setRenderProp("label",s),this.setState("expertSlot",""===i),this.tooltipBehavior.watchLabel(this.getTooltipLabel())}),this.isRequired("label"))}applyOn(i){o.apply(i,(i=>this.setRenderProp("on",i)))}applyRole(i){g.apply(i,(i=>this.setRenderProp("role",i)))}applyShortKey(i){x.apply(i,(i=>this.setRenderProp("shortKey",i)))}applyTabIndex(i){"number"==typeof i?j.apply(i,(i=>this.setRenderProp("tabIndex",i))):this.unsetRenderProp("tabIndex")}applyTarget(i){K.apply(i,(i=>this.setRenderProp("target",i)))}applyTooltipAlign(i){v.apply(i,(i=>{this.setRenderProp("tooltipAlign",i),this.tooltipBehavior.watchAlign(i)}))}applyVariant(i){A.apply(i,(i=>this.setRenderProp("variant",i)))}renderLinkFC(){return i(h,{accessKey:this.getRenderProp("accessKey"),ariaControls:this.getRenderProp("ariaControls"),ariaCurrent:this.getState("ariaCurrent"),ariaCurrentValue:this.getRenderProp("ariaCurrentValue"),ariaDescription:this.getRenderProp("ariaDescription"),ariaDescriptionId:this.getState("ariaDescriptionId"),ariaExpanded:this.getRenderProp("ariaExpanded"),ariaOwns:this.getRenderProp("ariaOwns"),customClass:this.getRenderProp("customClass"),disabled:this.getRenderProp("disabled"),download:this.getRenderProp("download"),handleAnchorClick:this.handleAnchorClick,hideLabel:this.getRenderProp("hideLabel"),href:this.getRenderProp("href"),icons:this.getRenderProp("icons"),inline:this.getRenderProp("inline"),label:this.getRenderProp("label"),on:this.getRenderProp("on"),refAnchor:this.setAnchorRef,refTooltip:this.tooltipBehavior.setTooltipElementRef,role:this.getRenderProp("role"),shortKey:this.getRenderProp("shortKey"),tabIndex:this.getRenderProp("tabIndex"),target:this.getRenderProp("target"),tooltipAlign:this.getRenderProp("tooltipAlign"),variant:this.getRenderProp("variant"),expertSlot:this.getState("expertSlot")})}};export{V as B}
@@ -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,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 u,f as b,n as p,a as v,r as f,B as m,t as y,F as g}from"./props-from-config.js";import{l as k}from"./label-lang-segment.js";import{v as j,j as S}from"./component2.js";import{c as w,d as C,e as _}from"./component-names.js";import{t as x}from"./i18n.js";import{B as O}from"./component8.js";import{I as $}from"./component4.js";import{L as F}from"./component5.js";import{r as L}from"./component6.js";import{S as I}from"./component10.js";import{T}from"./component9.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"./component.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}from"./scroll-lock.js";import{h as W}from"./tooltip-open-tracking.js";import{d as q,w as U}from"./width.js";import{r as V,C as G}from"./component7.js";import{T as J}from"./behavior.js";import{C as Q}from"./keyboard.js";const X=(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):[]},Y=t=>"number"==typeof t&&Number.isInteger(t)&&t>=0,Z=u("fixedCols",[0,0],(t=>b(t)),(t=>2===t.length&&t.every(Y))),tt=u("hasSettingsMenu",!1,p),et=v();function ot(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 lt(t){return t.every((t=>"object"==typeof t&&null!==t))}const it=u("data",[],ot,lt),st=u("dataFoot",[],ot,lt),nt=t=>Array.isArray(t)&&t.every((t=>Array.isArray(t))),at=u("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(!nt(l)||!nt(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))))})),rt=u("loading",!1,p),ct=u("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))})),dt={required:[k,it],optional:[Z,tt,et,st,at,rt,ct,j]},ht=t=>t.flatMap((t=>t.filter((t=>"string"==typeof t.key||"function"==typeof t.render)))),ut=t=>{const e=ht(t.horizontal);if(e.length>0)return{cells:e,horizontal:!0};const o=ht(t.vertical);return{cells:o,horizontal:0===o.length}},bt=(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},pt=(t,e)=>{const o=Math.max(0,...t.map((t=>bt(t,"colSpan"))));return 0===o?e.length:o},vt=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},ft=(t,e,o,l)=>{if(void 0!==l&&!e)return l<t[0]?"left":t[1]>0&&l>=o-t[1]?"right":void 0},mt=(t,e,o,l)=>{var i,s,n,a,r,c;const d=[];for(let a=0;a<e;a++)"left"===ft(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"===ft(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},yt=(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`},gt=(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},kt=({data:t,dataFoot:e,headers:o,isFoot:l,noEntriesLabel:i,primaryHeaders:s})=>{const n=pt(o.horizontal,t),a=s.cells;let r=((t,e,o)=>{const l=Math.max(0,...t.map((t=>bt(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=[],u=[];o.vertical.forEach(((t,e)=>{h[e]=0,u[e]=[]}));for(let i=c;i<r;i++){const r=[];o.vertical.forEach(((t,e)=>{let o=0;if(u[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),u[e].push(t),"number"==typeof l.colSpan&&l.colSpan>1)for(let o=1;o<l.colSpan;o++)u[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=vt(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},jt=({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"},Ct=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))}},_t=(t,e)=>t.filter((t=>!e.disabledKeys.has(String(t[e.keyPropertyName])))),xt=l.forBlock("kol-table"),Ot=xt("body"),$t=xt("cell-actions"),Ft=xt("cell-states"),Lt=xt("footer"),It=xt("head"),Tt=xt("head-row"),Dt=xt("scroll-container"),zt=xt("selection-icon"),At=xt("selection-input-tooltip"),Et=xt("sort"),Mt=xt("sort-button"),Bt=xt("sort-order"),Ht=xt("table"),Kt=`${xt("focus-element")} ${xt("caption")}`,Nt="caption",Pt=(t,e)=>ft(t.fixedCols,t.stickyColsDisabled,t.maxCols,e),Rt=(t,e,o)=>({left:"left"===e?yt(t.fixedOffsets,o,!0,!1!==t.selection):void 0,right:"right"===e?yt(t.fixedOffsets,o,!1,!1!==t.selection):void 0}),Wt=(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)},qt=t=>{const e=x("kol-sort");return"number"==typeof t&&t>0?`${e} – ${x("kol-table-sort-order").replace("{{order}}",`${t}`)}`:e},Ut=(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,u=Pt(t,l),{left:b,right:p}=Rt(t,u,l),v=e.textAlign,f=n?e.sortDirection:void 0;return s("th",{key:`${o}-${l}-${e.label}`,class:xt("cell",{[a]:!0,"align-center":"center"===v,"align-justify":"justify"===v,"align-left":"left"===v,"align-right":"right"===v,header:!0,"sticky-left":"left"===u,"sticky-right":"right"===u}),scope:c,colSpan:e.colSpan,rowSpan:e.rowSpan,style:{width:h,left:b,right:p},"aria-sort":a,"data-sort":f?`sort-${f}`:void 0},f?s("span",{class:Et},s(O,Object.assign({},t.getButtonFcProps(`sort-${i?"vertical":"horizontal"}-${o}-${l}`,{_icons:{right:r},_label:e.label,_ariaDescription:qt(d),_on:{onClick:o=>{t.handleSort(o,{key:e.key,currentSortDirection:f})}}},{class:Mt}))),d&&s("span",{"aria-hidden":"true",class:Bt},d)):e.label)},Vt=(t,e,o,l,i=!1)=>s("tr",{class:xt("row",{body:!i,footer:i}),key:`row-${Wt(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),u=a.selectedKeysSet.has(h),b=a.disabledKeys.has(h),p=n.label(r),v={name:"selection",checked:u,disabled:b,id:String(c),"aria-label":p};return s("td",{key:`tbody-${o}-selection`,class:xt("cell",{selection:!0})},s("div",{class:xt("selection",{checked:u})},d?s("label",{class:xt("selection-label",{disabled:b})},s($,{class:zt,icons:"kolicon "+(u?"kolicon-check":""),label:""}),s("input",Object.assign({class:xt("selection-input",{checkbox:!0})},v,{type:"checkbox",onInput:t=>{const e=u?a.selectedKeys.filter((t=>String(t)!==h)):[...a.selectedKeys,c];i(t,e)}}))):s("label",{class:xt("selection-label")},s("input",Object.assign({class:xt("selection-input",{radio:!0})},v,{type:"radio",onInput:t=>{i(t,[c])}}))),s("div",{class:At},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 Ut(t,e,o,l,i);const a="function"!=typeof e.render&&e.label===t.translateNoEntries,r=gt(t.headers,t.primaryHeaders,l,"action"),c=Boolean(r&&e.data),d=gt(t.headers,t.primaryHeaders,l,"state"),h=Boolean(d&&e.data),u=Pt(t,l),{left:b,right:p}=Rt(t,u,e.colIndex),v="function"==typeof e.render,f=e.textAlign;return s("td",{key:`cell-${n}-${t.settingsChangedCounter}`,class:xt("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"===u,"sticky-right":"right"===u}),"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:b,right:p},ref:v?o=>t.handleRenderCell(e,o):void 0},c&&r&&e.data?((t,e,o,l)=>s("div",{class:$t},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:Ft},i.map(((t,e)=>"badge"===t.type?s(w,Object.assign({key:`state-${o}-${e}`},t)):null))):""})(d,e.data,n):v?"":e.label)})(t,e,o,i,l)))),Gt=(t,e,o)=>{const l=t.headers.vertical.length+vt(null==o?void 0:o[0])+(t.selection?1:0);return s("tr",{"aria-hidden":"true",class:xt("spacer",{[e]:!0})},s("td",{class:xt("spacer-line",{[e]:!0}),colSpan:l}))},Jt=t=>{const e=f(dt,t),{data:o,dataFoot:l,externalLabelElements:i,fixedCols:a,hasScrollbar:r,hasSettingsMenu:c,headers:d,label:h,loading:u,refScrollContainer:b,refTable:p,selection:v,stickyColsDisabled:g,variant:k}=e,j=x("kol-no-entries"),w=ut(d),C=pt(d.horizontal,o),_=Object.assign(Object.assign({},e),{fixedOffsets:mt(w.cells,C,a,g),maxCols:C,primaryHeaders:w,selectionModel:Ct(v),translateNoEntries:j}),O=kt({data:o,dataFoot:l,headers:d,isFoot:!1,noEntriesLabel:j,primaryHeaders:w}),F=0===i.length;return s(m,{block:"kol-table",class:S(k,"table")},c&&t.renderSettings(d.horizontal),s("div",{ref:b,class:Dt,tabindex:r?F?"-1":"0":void 0},s("table",{ref:p,"aria-labelledby":F?Nt:void 0,class:Ht,style:{minWidth:jt(d)}},F&&s("caption",{class:Kt,id:Nt,ref:t=>{t&&(r?t.tabIndex=0:t.removeAttribute("tabindex"))}},L(h)),s("thead",{class:It},[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:xt("cell",{header:!0}),key:"thead-0"});if(!1===l.multiple)return s("th",{scope:"col",key:"thead-0-selection",class:xt("cell",{header:!0,selection:!0})},s("span",{class:"visually-hidden"},x("kol-table-selection")));const n=i.selectedKeys.filter((t=>!i.disabledKeys.has(String(t)))).length,a=n===_t(e,i).length,r=0!==n&&!a;let c;return c=x(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:xt("cell",{header:!0,selection:!0})},s("span",{class:"visually-hidden"},x("kol-table-selection")),s("div",{class:xt("selection",{checked:a,indeterminate:r})},s("label",{class:xt("selection-label")},s($,{class:zt,icons:"kolicon "+(r?"kolicon-minus":a?"kolicon-check":""),label:""}),s("input",{class:xt("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(..._t(t,e).map((t=>null==t?void 0:t[e.keyPropertyName]))),l})(e,i,!a))}})),s("div",{class:At},s(T,{label:c,badgeText:"",refFloating:()=>{}}))))})(_),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})})(_),Array.isArray(t)&&t.map(((t,o)=>Ut(_,t,e,o,!1)))))),Gt(_,"head",d.horizontal)]),s("tbody",{class:Ot},s("div",{class:xt("loader",{shown:u})},s(I,{label:x(u?"kol-table-data-loading":"kol-table-data-loaded").replace("{{caption}}",y(h)),show:u,variant:"cycle"})),O.map(((t,e)=>Vt(_,t,e,!0)))),(t=>{const{dataFoot:e,headers:o,primaryHeaders:l,translateNoEntries:i}=t;if(0===e.length)return null;const n=kt({data:e,dataFoot:e,headers:o,isFoot:!0,noEntriesLabel:i,primaryHeaders:l}),a=pt(o.horizontal,e),r=Object.assign(Object.assign({},t),{fixedOffsets:mt(l.cells,a,t.fixedCols,t.stickyColsDisabled),maxCols:a});return s("tfoot",{class:Lt},[Gt(t,"foot",n),n.map(((t,e)=>Vt(r,t,e,!0,!0)))])})(_))))},Qt=({dialog:t,card:e},o)=>s(R,Object.assign({},t),e?s(G,Object.assign({},e),o):o),Xt=l.forBlock("kol-table")("settings"),Yt=l.forBlock("kol-table-settings"),Zt=Yt(),te=Yt("actions"),ee=Yt("column"),oe=Yt("column-label"),le=Yt("columns"),ie=Yt("content"),se=Yt("error-message"),ne=t=>Number.isFinite(t)&&void 0!==t&&t>0?t:void 0,ae=()=>{},re=(t,e)=>{const o=x("kol-table-settings"),l=x("kol-table-settings-cancel"),i=x("kol-table-settings-apply"),n=x("kol-table-settings-error-all-invisible");let a,h=!1,u=!1;const b=()=>{h=!0,e()},p=d((()=>c(t)),(t=>t.syncListeners()),(t=>t.destroy())),v=((t,e)=>{const o=K(),l=K(),i=new J(r.stateLess),s=z(),n=A("dialog-heading"),c={};let d,h=!0,u={};const b=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;W(t),t.defaultPrevented||(null===(e=u.onCancel)||void 0===e||e.call(u,t),t.defaultPrevented||b(M.cancel)||t.preventDefault())},f=t=>{var e;t.target===o.el&&(N(c),null===(e=u.onClose)||void 0===e||e.call(u),b(M.close))},m=()=>{i.hideTooltip(),p(),b(M.close)};return{getFcProps:e=>{var a,r,c;let b="",p=0,j="blank",S="100%";k.apply(e.label,(t=>{b=t})),H.apply(null!==(a=e.level)&&void 0!==a?a:0,(t=>{p=t})),q.apply(e.on,(t=>{u=t})),g.apply(null!==(r=e.variant)&&void 0!==r?r:"blank",(t=>{j=t})),U.apply(null!==(c=e.width)&&void 0!==c?c:"100%",(t=>{S=t}));const w="card"===j;return w&&!d&&(d=V(t()),i.componentWillLoad({label:d.label,align:d.tooltipAlign})),{dialog:{handleCancel:v,handleClose:f,label:y(b),labelledBy:w?n:void 0,modal:h,refDialog:o,variant:j,width:S},card:w&&d?{ariaDescriptionId:s,closeButtonProps:d,handleClose:m,hasCloser:!0,headingId:n,label:b,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,b),f=A("alert-heading"),m=z();let j,S=[],w=[],$=null;const F=()=>{var t;return null!==(t=w[w.length-1])&&void 0!==t?t:[]},L=t=>{w=w.map(((e,o,l)=>o===l.length-1?t:e)),b()},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 b();if(a){$=null,S=w.map((t=>t.map((t=>Object.assign({},t))))),b();const t=w.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()}},R=t=>{t&&(a=t)};return{beginRender:()=>{p.beginRender(),u=h,h=!1},render:t=>{var e;u||t===j||(j=t,S=(e=t).map((t=>[...t])),w=e.map((t=>t.map((t=>Object.assign({},t))))));const n=F();return s("div",{class:Xt,ref:R},s("div",{class:Zt},s(O,Object.assign({},p.get("toggle").getFcProps({_icons:"kolicon-settings",_label:o,_hideLabel:!0,_on:{onClick:()=>v.show(!0)}})))),s(Qt,Object.assign({},v.getFcProps({label:o,variant:"card",width:"fit-content"})),s("div",{class:ie},$&&s("div",{class:se},s(B,{alert:!1,closerAriaDescriptionId:m,handleCloserClick:ae,hasCloser:!1,headingId:f,label:$,level:0,refCloserButton:ae,refCloserTooltip:ae,type:"error",variant:"msg"})),s("form",{onSubmit:T},s("div",{class:le},n.map(((t,e)=>((t,e,o)=>s("div",{key:t.key,class:ee},s(C,{_checked:!1!==t.visible,_label:x(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:oe},t.label),s(_,{_hideLabel:!0,_value:ne(t.width),_label:x("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=ne(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:x(!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:x(!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:te},s(O,Object.assign({},p.get("cancel").getFcProps({_label:l,_variant:"secondary",_on:{onClick:()=>(w=S.map((t=>[...t])),$=null,b(),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()}}},ce=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=re((()=>this.host),(()=>a(this))),this.linkItems=d((()=>h((()=>a(this)))),(t=>t.syncListeners()),(t=>t.destroy())),this.propsConfig=dt,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){it.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){st.apply(t,(t=>this.setRenderProp("dataFoot",t)))}applyFixedCols(t){Z.apply(t,(t=>this.setRenderProp("fixedCols",t))),this.updateStickyColsDisabled()}applyHasSettingsMenu(t){tt.apply(t,(t=>this.setRenderProp("hasSettingsMenu",t)))}applyHeaders(t){at.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){k.apply(t,(t=>this.setRenderProp("label",t)),this.isRequired("label"))}applyLoading(t){rt.apply(t,(t=>this.setRenderProp("loading",t)))}applyOn(t){et.apply(t,(t=>this.setRenderProp("on",t)))}applySelection(t){ct.apply(t,(t=>this.setRenderProp("selection",t))),this.updateStickyColsDisabled()}applyVariant(t){j.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",Nt)))}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")[Q.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=pt(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")[Q.onSelectionChange];"function"==typeof o&&o(t,e),this.host&&E(this.host,M.selectionChange,e)}emitSort(t,e){const o=this.getRenderProp("on")[Q.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(Jt,{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{ce as B,st as a,it as t,X as v}
4
+ import{r as e}from"./aria-labelledby.js";import{I as t,g as o,p as l,b as i,L as s}from"./bem-registry.js";import{h as n,Fragment as a,forceUpdate as r}from"@stencil/core/internal/client";import{B as c}from"./base-web-component.js";import{c as d}from"./item.js";import{c as h}from"./item-pool.js";import{c as u}from"./item3.js";import{c as b,f as p,n as v,a as f,r as m,B as y,t as g,E as k}from"./props-from-config.js";import{l as j}from"./label-lang-segment.js";import{v as w,j as S}from"./component2.js";import{c as C,d as _,e as x}from"./component-names.js";import{t as O}from"./i18n.js";import{B as $}from"./component8.js";import{I as T}from"./component4.js";import{L as F}from"./component5.js";import{r as L}from"./component6.js";import{S as I}from"./component10.js";import{T as D}from"./component9.js";import{T as z}from"./behavior.js";import{a as A}from"./tslib.es6.js";import{c as E,n as M}from"./dev.utils.js";import{d as B,K as H}from"./events.js";import{A as K}from"./component.js";import{l as N}from"./level.js";import{c as R}from"./element-interaction.js";import{u as P,l as W,D as q}from"./scroll-lock.js";import{h as U}from"./tooltip-open-tracking.js";import{d as V,w as G}from"./width.js";import{r as J,C as Q}from"./component7.js";import{C as X}from"./keyboard.js";const Y=(l,i,s)=>"string"!=typeof s&&void 0!==s?(t()&&o(`[${l.constructor.name}] The property value: (${s}) for '_ariaLabelledby' is not valid. Allowed values are: string, null`),[]):e(i,s),Z=e=>"number"==typeof e&&Number.isInteger(e)&&e>=0,ee=b("fixedCols",[0,0],(e=>p(e)),(e=>2===e.length&&e.every(Z))),te=b("hasSettingsMenu",!1,v),oe=f();function le(e){const t="string"==typeof e?l(e):e;if(Array.isArray(t))return t;throw new Error("Invalid table data: expected an array of row objects.")}function ie(e){return e.every((e=>"object"==typeof e&&null!==e))}const se=b("data",[],le,ie),ne=b("dataFoot",[],le,ie),ae=e=>Array.isArray(e)&&e.every((e=>Array.isArray(e))),re=b("headers",{horizontal:[],vertical:[]},(function(e){const t="string"==typeof e?l(e):e;if("object"!=typeof t||null===t)throw new Error("Invalid table headers: expected an object.");const{horizontal:o=[],vertical:i=[]}=t;if(!ae(o)||!ae(i))throw new Error("Invalid table headers: horizontal and vertical must be arrays of header rows.");return{horizontal:o,vertical:i}}),(function({horizontal:e,vertical:t}){return[...e,...t].every((e=>e.every((e=>void 0===e.width||"number"==typeof e.width))))})),ce=b("loading",!1,v),de=b("selection",!1,(function(e){const t="string"==typeof e?l(e):e;if("object"==typeof t&&null!==t)return t;throw new Error("Invalid table selection: expected an object.")}),(function(e){return!1===e||"function"==typeof e.label&&(!e.selectedKeys||Array.isArray(e.selectedKeys))})),he={required:[j,se],optional:[ee,te,oe,ne,re,ce,de,w]},ue=e=>e.flatMap((e=>e.filter((e=>"string"==typeof e.key||"function"==typeof e.render)))),be=e=>{const t=ue(e.horizontal);if(t.length>0)return{cells:t,horizontal:!0};const o=ue(e.vertical);return{cells:o,horizontal:0===o.length}},pe=(e,t)=>{let o=0;return Array.isArray(e)&&e.forEach((e=>{var l;o+=null!==(l=e[t])&&void 0!==l?l:1})),o},ve=(e,t)=>{const o=Math.max(0,...e.map((e=>pe(e,"colSpan"))));return 0===o?t.length:o},fe=e=>{var t;return null!==(t=null==e?void 0:e.reduce(((e,t)=>"visible"in t&&!1===t.visible?e:e+(t.colSpan||1)),0))&&void 0!==t?t:0},me=(e,t,o,l)=>{if(void 0!==l&&!t)return l<e[0]?"left":e[1]>0&&l>=o-e[1]?"right":void 0},ye=(e,t,o,l)=>{var i,s,n,a,r,c;const d=[];for(let a=0;a<t;a++)"left"===me(o,l,t,a)&&(d[a]=(null!==(i=d[a-1])&&void 0!==i?i:0)+(null!==(n=null===(s=e[a-1])||void 0===s?void 0:s.width)&&void 0!==n?n:0));for(let i=t-1;i>=0;i--)"right"===me(o,l,t,i)&&(d[i]=(null!==(a=d[i+1])&&void 0!==a?a:0)+(null!==(c=null===(r=e[i+1])||void 0===r?void 0:r.width)&&void 0!==c?c:0));return d},ge=(e,t,o,l)=>{const i=void 0===t?void 0:e[t];return o&&l?`calc( var(--kol-table-selection-col-width) + ${i}px)`:`${i}px`},ke=(e,t,o,l)=>{if(0===(t.horizontal?e.horizontal:e.vertical).length)return;const i=t.cells[o];return(null==i?void 0:i.type)===l?i:void 0},je=({data:e,dataFoot:t,headers:o,isFoot:l,noEntriesLabel:i,primaryHeaders:s})=>{const n=ve(o.horizontal,e),a=s.cells;let r=((e,t,o)=>{const l=Math.max(0,...e.map((e=>pe(e,"rowSpan"))));return 0===l?t.length:l-o})(o.vertical,e,t.length),c=0;l&&(c=r,r+=t.length);const d=[],h=[],u=[];o.vertical.forEach(((e,t)=>{h[t]=0,u[t]=[]}));for(let i=c;i<r;i++){const r=[];o.vertical.forEach(((e,t)=>{let o=0;if(u[t].forEach((e=>o+=e)),o<=i){const l=e[i-o+h[t]];if("object"==typeof l){r.push(Object.assign(Object.assign({},l),{headerCell:!0,data:{}}));let e=1;if("number"==typeof l.rowSpan&&l.rowSpan>1&&(e=l.rowSpan),u[t].push(e),"number"==typeof l.colSpan&&l.colSpan>1)for(let o=1;o<l.colSpan;o++)u[t+o].push(e);h[t]++}}}));for(let o=0;o<n;o++)if(s.horizontal){const s=l?t[i-c]:e[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 t=a[i];"object"==typeof t&&null!==t&&"object"==typeof e[o]&&null!==e[o]&&r.push(Object.assign(Object.assign({},t),{colIndex:o,colSpan:void 0,rowSpan:void 0,data:e[o],label:e[o][t.key]}))}d.push(r)}if(0===e.length){let e=fe(o.horizontal[0]),t=0;o.vertical.length>0&&(e-=o.vertical.length,o.vertical[0].forEach((e=>{t+=e.rowSpan||1})));const l={colSpan:e,label:i,render:void 0,rowSpan:Math.max(t,1)};0===d.length?d.push([l]):d[0].push(l)}return d},we=({horizontal:e,vertical:t})=>{const o=e.flatMap((e=>e.filter((e=>!1!==e.visible&&void 0!==e.width&&e.width>0)).map((e=>e.width)))),l=[...t.flatMap((e=>e.filter((e=>void 0!==e.width&&e.width>0)).map((e=>e.width)))),...o];return 0===l.length?"0px":1===l.length?`${l[0]}px`:`calc(${l.map((e=>`${e}px`)).join(" + ")})`},Se=e=>void 0===e?[]:Array.isArray(e)?e:[e],Ce=e=>{var t;return null!==(t=e?e.keyPropertyName:void 0)&&void 0!==t?t:"id"},_e=e=>{const t=e?Se(e.selectedKeys):[];return{disabledKeys:new Set((e?Se(e.disabledKeys):[]).map(String)),keyPropertyName:Ce(e),selectedKeys:t,selectedKeysSet:new Set(t.map(String))}},xe=(e,t)=>e.filter((e=>!t.disabledKeys.has(String(e[t.keyPropertyName])))),Oe=i.forBlock("kol-table"),$e=Oe("body"),Te=Oe("cell-actions"),Fe=Oe("cell-states"),Le=Oe("footer"),Ie=Oe("head"),De=Oe("head-row"),ze=Oe("scroll-container"),Ae=Oe("selection-icon"),Ee=Oe("selection-input-tooltip"),Me=Oe("sort"),Be=Oe("sort-button"),He=Oe("sort-order"),Ke=Oe("table"),Ne=`${Oe("focus-element")} ${Oe("caption")}`,Re="caption",Pe=(e,t)=>me(e.fixedCols,e.stickyColsDisabled,e.maxCols,t),We=(e,t,o)=>({left:"left"===t?ge(e.fixedOffsets,o,!0,!1!==e.selection):void 0,right:"right"===t?ge(e.fixedOffsets,o,!1,!1!==e.selection):void 0}),qe=(e,t,o)=>{var l,i;return null!==(i=e.primaryHeaders.horizontal&&(null===(l=t[0])||void 0===l?void 0:l.data)?e.rowKeys.get(t[0].data):void 0)&&void 0!==i?i:String(o)},Ue=e=>{const t=O("kol-sort");return"number"==typeof e&&e>0?`${t} – ${O("kol-table-sort-order").replace("{{order}}",`${e}`)}`:t},Ve=(e,t,o,l,i)=>{if(!1===t.visible)return"";const s=!1!==(null==t?void 0:t.sortable)&&"string"==typeof t.sortDirection;let a="none",r="kolicon-sort-neutral";if(s&&t.sortDirection)switch(t.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 t.colSpan&&t.colSpan>1?"colgroup":"col",d="number"==typeof t.sortOrder&&t.sortOrder>0?t.sortOrder:void 0,h=void 0!==t.width?`${t.width}px`:void 0,u=Pe(e,l),{left:b,right:p}=We(e,u,l),v=t.textAlign,f=s?t.sortDirection:void 0;return n("th",{key:`${o}-${l}-${t.label}`,class:Oe("cell",{[a]:!0,"align-center":"center"===v,"align-justify":"justify"===v,"align-left":"left"===v,"align-right":"right"===v,header:!0,"sticky-left":"left"===u,"sticky-right":"right"===u}),scope:c,colSpan:t.colSpan,rowSpan:t.rowSpan,style:{width:h,left:b,right:p},"aria-sort":a,"data-sort":f?`sort-${f}`:void 0},f?n("span",{class:Me},n($,Object.assign({},e.getButtonFcProps(`sort-${i?"vertical":"horizontal"}-${o}-${l}`,{_icons:{right:r},_label:t.label,_ariaDescription:Ue(d),_on:{onClick:o=>{e.handleSort(o,{key:t.key,currentSortDirection:f})}}},{class:Be}))),d&&n("span",{"aria-hidden":"true",class:He},d)):t.label)},Ge=(e,t,o,l,i=!1)=>n("tr",{class:Oe("row",{body:!i,footer:i}),key:`row-${qe(e,t,o)}`},((e,t,o)=>{var l;const{handleSelectionChange:i,selection:s,selectionModel:a}=e;if(!s)return"";const r=null===(l=t[0])||void 0===l?void 0:l.data;if(!r)return"";const c=r[a.keyPropertyName],d=s.multiple||void 0===s.multiple,h=String(c),u=a.selectedKeysSet.has(h),b=a.disabledKeys.has(h),p=s.label(r),{refInput:v,refTooltip:f}=e.getSelectionTooltipRefs(`selection-${h}`,p),m={name:"selection",checked:u,disabled:b,id:String(c),ref:v,"aria-label":p};return n("td",{key:`tbody-${o}-selection`,class:Oe("cell",{selection:!0})},n("div",{class:Oe("selection",{checked:u})},d?n("label",{class:Oe("selection-label",{disabled:b})},n(T,{class:Ae,icons:"kolicon "+(u?"kolicon-check":""),label:""}),n("input",Object.assign({class:Oe("selection-input",{checkbox:!0})},m,{type:"checkbox",onInput:e=>{const t=u?a.selectedKeys.filter((e=>String(e)!==h)):[...a.selectedKeys,c];i(e,t)}}))):n("label",{class:Oe("selection-label")},n("input",Object.assign({class:Oe("selection-input",{radio:!0})},m,{type:"radio",onInput:e=>{i(e,[c])}}))),n("div",{class:Ee},n(D,{label:p,badgeText:"",id:`${c}-label`,refFloating:f}))))})(e,t,o),t.map(((t,i)=>((e,t,o,l,i)=>{if(!1===t.visible)return"";let s=`${o}-${l}-${t.label}`;if(t.data){const i=e.rowKeys.get(t.data);s=i?`${i}-${e.primaryHeaders.horizontal?l:o}`:s}if(t.headerCell)return Ve(e,t,o,l,i);const a="function"!=typeof t.render&&t.label===e.translateNoEntries,r=ke(e.headers,e.primaryHeaders,l,"action"),c=Boolean(r&&t.data),d=ke(e.headers,e.primaryHeaders,l,"state"),h=Boolean(d&&t.data),u=Pe(e,l),{left:b,right:p}=We(e,u,t.colIndex),v="function"==typeof t.render,f=t.textAlign;return n("td",{key:`cell-${s}-${e.settingsChangedCounter}`,class:Oe("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"===u,"sticky-right":"right"===u}),"aria-atomic":a?"false":void 0,"aria-live":a?"polite":void 0,"aria-relevant":a?"text":void 0,colSpan:t.colSpan,rowSpan:t.rowSpan,style:{textAlign:f,left:b,right:p},ref:v?o=>e.handleRenderCell(t,o):void 0},c&&r&&t.data?((e,t,o,l)=>n("div",{class:Te},t.actions(o).map(((t,o)=>{const i=`action-${l}-${o}`;return"button"===t.type?n("span",{key:i},n($,Object.assign({},e.getButtonFcProps(i,t)))):"link"===t.type?n("span",{key:i},n(F,Object.assign({},e.getLinkFcProps(i,t)))):null}))))(e,r,t.data,s):h&&d&&t.data?((e,t,o)=>{const l=e.key;if(!l)return"";const i=t[l];return i?n("div",{class:Fe},i.map(((e,t)=>"badge"===e.type?n(C,Object.assign({key:`state-${o}-${t}`},e)):null))):""})(d,t.data,s):v?"":t.label)})(e,t,o,i,l)))),Je=(e,t,o)=>{const l=e.headers.vertical.length+fe(null==o?void 0:o[0])+(e.selection?1:0);return n("tr",{"aria-hidden":"true",class:Oe("spacer",{[t]:!0})},n("td",{class:Oe("spacer-line",{[t]:!0}),colSpan:l}))},Qe=e=>{const t=m(he,e),{data:o,dataFoot:l,externalLabelElements:i,fixedCols:s,hasScrollbar:r,hasSettingsMenu:c,headers:d,label:h,loading:u,refScrollContainer:b,refTable:p,selection:v,stickyColsDisabled:f,variant:k}=t,j=O("kol-no-entries"),w=be(d),C=ve(d.horizontal,o),_=Object.assign(Object.assign({},t),{fixedOffsets:ye(w.cells,C,s,f),maxCols:C,primaryHeaders:w,selectionModel:_e(v),translateNoEntries:j}),x=je({data:o,dataFoot:l,headers:d,isFoot:!1,noEntriesLabel:j,primaryHeaders:w}),$=0===i.length;return n(y,{block:"kol-table",class:S(k,"table")},c&&e.renderSettings(d.horizontal),n("div",{ref:b,class:ze,tabindex:r?$?"-1":"0":void 0},n("table",{ref:p,"aria-labelledby":$?Re:void 0,class:Ke,style:{minWidth:we(d)}},$&&n("caption",{class:Ne,id:Re,ref:e=>{e&&(r?e.tabIndex=0:e.removeAttribute("tabindex"))}},L(h)),n("thead",{class:Ie},[d.horizontal.map(((e,t)=>n("tr",{class:De,key:`thead-${t}`},v&&(e=>{const{data:t,handleSelectionChange:o,selection:l,selectionModel:i}=e;if(!l)return n("td",{class:Oe("cell",{header:!0}),key:"thead-0"});if(!1===l.multiple)return n("th",{scope:"col",key:"thead-0-selection",class:Oe("cell",{header:!0,selection:!0})},n("span",{class:"visually-hidden"},O("kol-table-selection")));const s=i.selectedKeys.filter((e=>!i.disabledKeys.has(String(e)))).length,a=s===xe(t,i).length,r=0!==s&&!a;let c;c=O(0===s?"kol-table-selection-all":a&&!r?"kol-table-selection-none":"kol-table-selection-indeterminate");const{refInput:d,refTooltip:h}=e.getSelectionTooltipRefs("selection-all",c);return n("th",{scope:"col",key:"thead-0-selection",class:Oe("cell",{header:!0,selection:!0})},n("span",{class:"visually-hidden"},O("kol-table-selection")),n("div",{class:Oe("selection",{checked:a,indeterminate:r})},n("label",{class:Oe("selection-label")},n(T,{class:Ae,icons:"kolicon "+(r?"kolicon-minus":a?"kolicon-check":""),label:""}),n("input",{class:Oe("selection-input",{checkbox:!0}),ref:d,name:"selection",checked:a&&!r,indeterminate:r,"aria-label":c,type:"checkbox",onInput:e=>{o(e,((e,t,o)=>{const l=t.selectedKeys.filter((e=>t.disabledKeys.has(String(e))));return o&&l.push(...xe(e,t).map((e=>null==e?void 0:e[t.keyPropertyName]))),l})(t,i,!a))}})),n("div",{class:Ee},n(D,{label:c,badgeText:"",refFloating:h}))))})(_),0===t&&(({headers:e})=>{const{horizontal:t,vertical:o}=e;if(0===t.length||0===o.length)return n(a,null);const l=o.reduce(((e,t)=>{var o,l;return e+(null!==(l=null===(o=null==t?void 0:t[0])||void 0===o?void 0:o.width)&&void 0!==l?l:0)}),0);return n("td",{"aria-hidden":"true",colSpan:o.length,rowSpan:t.length,style:l>0?{width:`${l}px`}:void 0})})(_),Array.isArray(e)&&e.map(((e,o)=>Ve(_,e,t,o,!1)))))),Je(_,"head",d.horizontal)]),n("tbody",{class:$e},n("div",{class:Oe("loader",{shown:u})},n(I,{label:O(u?"kol-table-data-loading":"kol-table-data-loaded").replace("{{caption}}",g(h)),show:u,variant:"cycle"})),x.map(((e,t)=>Ge(_,e,t,!0)))),(e=>{const{dataFoot:t,headers:o,primaryHeaders:l,translateNoEntries:i}=e;if(0===t.length)return null;const s=je({data:t,dataFoot:t,headers:o,isFoot:!0,noEntriesLabel:i,primaryHeaders:l}),a=ve(o.horizontal,t),r=Object.assign(Object.assign({},e),{fixedOffsets:ye(l.cells,a,e.fixedCols,e.stickyColsDisabled),maxCols:a});return n("tfoot",{class:Le},[Je(e,"foot",s),s.map(((e,t)=>Ge(r,e,t,!0,!0)))])})(_))))},Xe=({dialog:e,card:t},o)=>n(q,Object.assign({},e),t?n(Q,Object.assign({},t),o):o),Ye=i.forBlock("kol-table")("settings"),Ze=i.forBlock("kol-table-settings"),et=Ze(),tt=Ze("actions"),ot=Ze("column"),lt=Ze("column-label"),it=Ze("columns"),st=Ze("content"),nt=Ze("error-message"),at=e=>Number.isFinite(e)&&void 0!==e&&e>0?e:void 0,rt=()=>{},ct=(e,t)=>{const o=O("kol-table-settings"),l=O("kol-table-settings-cancel"),i=O("kol-table-settings-apply"),s=O("kol-table-settings-error-all-invisible");let a,r=!1,u=!1;const b=()=>{r=!0,t()},p=h((()=>d(e)),(e=>e.syncListeners()),(e=>e.destroy())),v=((e,t)=>{const o=R(),l=R(),i=new z(c.stateLess),s=E("aria-description"),n=E("dialog-heading"),r={};let d,h=!0,u={};const b=e=>!a||B(a,e),p=()=>{var e,t;null===(t=null===(e=o.el)||void 0===e?void 0:e.close)||void 0===t||t.call(e)},v=e=>{var t;U(e),e.defaultPrevented||(null===(t=u.onCancel)||void 0===t||t.call(u,e),e.defaultPrevented||b(H.cancel)||e.preventDefault())},f=e=>{var t;e.target===o.el&&(P(r),null===(t=u.onClose)||void 0===t||t.call(u),b(H.close))},m=()=>{i.hideTooltip(),p(),b(H.close)};return{getFcProps:t=>{var a,r,c;let b="",p=0,y="blank",w="100%";j.apply(t.label,(e=>{b=e})),N.apply(null!==(a=t.level)&&void 0!==a?a:0,(e=>{p=e})),V.apply(t.on,(e=>{u=e})),k.apply(null!==(r=t.variant)&&void 0!==r?r:"blank",(e=>{y=e})),G.apply(null!==(c=t.width)&&void 0!==c?c:"100%",(e=>{w=e}));const S="card"===y;return S&&!d&&(d=J(e()),i.componentWillLoad({label:d.label,align:d.tooltipAlign})),{dialog:{handleCancel:v,handleClose:f,label:g(b),labelledBy:S?n:void 0,modal:h,refDialog:o,variant:y,width:w},card:S&&d?{ariaDescriptionId:s,closeButtonProps:d,handleClose:m,hasCloser:!0,headingId:n,label:b,level:p,refCloseButton:l,refTooltip:i.setTooltipElementRef}:void 0}},show:e=>{var l,i;const s=o.el;(null==s?void 0:s.open)||(h!==e&&(h=e,t()),e?(null===(l=null==s?void 0:s.showModal)||void 0===l||l.call(s),s&&W(r)):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(),P(r),i.destroy()}}})(e,b),f=E("alert-heading"),m=E("closer-description");let y,w=[],S=[],C=null;const T=()=>{var e;return null!==(e=S[S.length-1])&&void 0!==e?e:[]},F=e=>{S=S.map(((t,o,l)=>o===l.length-1?e:t)),b()},L=(e,t)=>{const o=[...T()],l=o.findIndex((t=>t.key===e));if(-1===l)return;let i;if("up"===t){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),F(o)},I=e=>{if(e.preventDefault(),!T().some((e=>!1!==e.visible)))return C=s,void b();if(a){C=null,w=S.map((e=>e.map((e=>Object.assign({},e))))),b();const e=S.map((e=>e.map((e=>{const t=e,{hidable:o,resizable:l,sortable:i,visible:s,width:n}=t,a=A(t,["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}))));B(a,H.changeHeaderCells,e),v.close()}},D=e=>{e&&(a=e)};return{beginRender:()=>{p.beginRender(),u=r,r=!1},render:e=>{var t;u||e===y||(y=e,w=(t=e).map((e=>[...e])),S=t.map((e=>e.map((e=>Object.assign({},e))))));const s=T();return n("div",{class:Ye,ref:D},n("div",{class:et},n($,Object.assign({},p.get("toggle").getFcProps({_icons:"kolicon-settings",_label:o,_hideLabel:!0,_on:{onClick:()=>v.show(!0)}})))),n(Xe,Object.assign({},v.getFcProps({label:o,variant:"card",width:"fit-content"})),n("div",{class:st},C&&n("div",{class:nt},n(K,{alert:!1,closerAriaDescriptionId:m,handleCloserClick:rt,hasCloser:!1,headingId:f,label:C,level:0,refCloserButton:rt,refCloserTooltip:rt,type:"error",variant:"msg"})),n("form",{onSubmit:I},n("div",{class:it},s.map(((e,t)=>((e,t,o)=>n("div",{key:e.key,class:ot},n(_,{_checked:!1!==e.visible,_label:O(e.hidable?"kol-table-settings-column-hidable":"kol-table-settings-column-not-hidable",{placeholders:{column:e.label}}),_value:!0,_hideLabel:!0,_disabled:!1===e.hidable,_on:{onInput:(t,o)=>{var l;return((e,t)=>{const o=T().map((o=>o.key===e&&!1!==o.hidable?Object.assign(Object.assign({},o),{visible:Boolean(t)}):o));F(o)})(null!==(l=e.key)&&void 0!==l?l:"",o)}}}),n("span",{class:lt},e.label),n(x,{_hideLabel:!0,_value:at(e.width),_label:O("kol-table-settings-column-width",{placeholders:{column:e.label}}),_min:1,_disabled:!1===e.resizable,_on:{onInput:(t,o)=>{var l;return((e,t)=>{const o=at(Number(t)),l=T().map((t=>t.key===e&&!1!==t.resizable?Object.assign(Object.assign({},t),{width:o}):t));F(l)})(null!==(l=e.key)&&void 0!==l?l:"",o)}}}),n($,Object.assign({},p.get(`move-up-${e.key}`).getFcProps({_icons:"kolicon-chevron-up",_label:O(!1===e.sortable||0===t?"kol-table-settings-not-move":"kol-table-settings-move-up",{placeholders:{column:e.label}}),_hideLabel:!0,_variant:"ghost",_on:{onClick:()=>{var t;return L(null!==(t=e.key)&&void 0!==t?t:"","up")}},_disabled:!1===e.sortable||0===t}))),n($,Object.assign({},p.get(`move-down-${e.key}`).getFcProps({_icons:"kolicon-chevron-down",_label:O(!1===e.sortable||t===o.length-1?"kol-table-settings-not-move":"kol-table-settings-move-down",{placeholders:{column:e.label}}),_hideLabel:!0,_variant:"ghost",_on:{onClick:()=>{var t;return L(null!==(t=e.key)&&void 0!==t?t:"","down")}},_disabled:!1===e.sortable||t===o.length-1})))))(e,t,s)))),n("div",{class:tt},n($,Object.assign({},p.get("cancel").getFcProps({_label:l,_variant:"secondary",_on:{onClick:()=>(S=w.map((e=>[...e])),C=null,b(),void v.close())}}))),n($,Object.assign({},p.get("apply").getFcProps({_label:i,_variant:"primary",_type:"submit"}))))))))},sync:()=>{p.endRender(),v.syncListeners()},destroy:()=>{p.destroy(),v.destroy()}}},dt=class extends c{constructor(){super(...arguments),this.hasExternalTableLabelRefs=!1,this.cellRenderTimeouts=new Map,this.buttonItems=h((()=>d((()=>this.host))),(e=>e.syncListeners()),(e=>e.destroy())),this.settings=ct((()=>this.host),(()=>r(this))),this.linkItems=h((()=>u((()=>r(this)))),(e=>e.syncListeners()),(e=>e.destroy())),this.selectionTooltipItems=h((()=>(()=>{const e=new z(c.stateLess);let t;const o={refInput:e=>{t=e},refTooltip:e.setTooltipElementRef};return{getRefs:t=>(e.componentWillLoad({label:t}),o),syncListeners:()=>{t&&e.syncListeners(void 0,t,!0)},destroy:()=>{e.destroy()}}})()),(e=>e.syncListeners()),(e=>e.destroy())),this.propsConfig=he,this.handleResize=()=>{this.updateScrollbarState(),clearTimeout(this.resizeDebounceTimeout),this.resizeDebounceTimeout=setTimeout((()=>{this.updateStickyColsDisabled()}),150)},this.handleSelectionChange=(e,t)=>{this.emitSelectionChange(e,t)},this.handleSort=(e,t)=>{this.emitSort(e,t)},this.handleRenderCell=(e,t)=>{t&&(clearTimeout(this.cellRenderTimeouts.get(t)),this.cellRenderTimeouts.set(t,setTimeout((()=>{if(this.cellRenderTimeouts.delete(t),"function"==typeof e.render){const o=e.render(t,e,e.data,this.getRenderProp("data"));"string"==typeof o&&(t.textContent=o)}}))))},this.refScrollContainer=e=>{this.scrollContainerElement=e},this.refTable=e=>{this.tableElement=e,this.syncTableLabel(this.getState("externalLabelElements"))},this.getButtonFcProps=(e,t,o)=>this.buttonItems.get(e).getFcProps(t,o),this.renderSettings=e=>this.settings.render(e),this.getLinkFcProps=(e,t)=>this.linkItems.get(e).getFcProps(t),this.getSelectionTooltipRefs=(e,t)=>this.selectionTooltipItems.get(e).getRefs(t)}observeScrollContainer(){this.scrollContainerElement&&ResizeObserver&&(this.resizeObserver=new ResizeObserver(this.handleResize),this.resizeObserver.observe(this.scrollContainerElement)),this.updateStickyColsDisabled()}teardownTable(){var e;null===(e=this.resizeObserver)||void 0===e||e.disconnect(),clearTimeout(this.resizeDebounceTimeout),this.cellRenderTimeouts.forEach((e=>clearTimeout(e))),this.cellRenderTimeouts.clear(),this.buttonItems.destroy(),this.linkItems.destroy(),this.selectionTooltipItems.destroy(),this.settings.destroy()}syncTableItems(){this.buttonItems.endRender(),this.linkItems.endRender(),this.selectionTooltipItems.endRender(),this.settings.sync()}applyData(e){se.apply(e,(e=>{this.setRenderProp("data",e),this.setState("rowKeys",((e,t)=>new Map(e.map((e=>{var o;return[e,null!==(o=t.get(e))&&void 0!==o?o:M()]}))))(e,this.getState("rowKeys")))}))}applyDataFoot(e){ne.apply(e,(e=>this.setRenderProp("dataFoot",e)))}applyFixedCols(e){ee.apply(e,(e=>this.setRenderProp("fixedCols",e))),this.updateStickyColsDisabled()}applyHasSettingsMenu(e){te.apply(e,(e=>this.setRenderProp("hasSettingsMenu",e)))}applyHeaders(e){re.apply(e,(e=>this.setRenderProp("headers",(e=>0===e.horizontal.length?e:Object.assign(Object.assign({},e),{horizontal:e.horizontal.map((e=>e.map((e=>Object.assign(Object.assign({},e),{visible:"boolean"!=typeof e.visible||e.visible,hidable:"boolean"!=typeof e.hidable||e.hidable})))))}))(e))))}applyLabel(e){j.apply(e,(e=>this.setRenderProp("label",e)),this.isRequired("label"))}applyLoading(e){ce.apply(e,(e=>this.setRenderProp("loading",e)))}applyOn(e){oe.apply(e,(e=>this.setRenderProp("on",e)))}applySelection(e){de.apply(e,(e=>this.setRenderProp("selection",e))),this.updateStickyColsDisabled()}applyVariant(e){w.apply(e,(e=>this.setRenderProp("variant",e)))}syncTableLabel(e){this.tableElement&&"ariaLabelledByElements"in this.tableElement&&((null==e?void 0:e.length)?(this.tableElement.ariaLabelledByElements=e,this.hasExternalTableLabelRefs=!0,s.debug([this.tableElement,e,this.tableElement.ariaLabelledByElements])):this.hasExternalTableLabelRefs&&(this.hasExternalTableLabelRefs=!1,this.tableElement.ariaLabelledByElements=null,this.tableElement.setAttribute("aria-labelledby",Re)))}moveCheckboxFocus(e){var t,o,l;if("ArrowUp"!==e.key&&"ArrowDown"!==e.key)return;const i=Array.from(null!==(o=null===(t=this.scrollContainerElement)||void 0===t?void 0:t.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&&(e.preventDefault(),n=(n+("ArrowDown"===e.key?1:i.length-1))%i.length,i[n].focus())}applyChangedHeaderCells(e){const t=Object.assign(Object.assign({},this.getRenderProp("headers")),{horizontal:e.detail});this.setRenderProp("headers",t),this.setState("settingsChangedCounter",this.getState("settingsChangedCounter")+1);const o=this.getRenderProp("on")[X.onChangeHeaderCells];"function"==typeof o&&o(e,t)}updateScrollbarState(){if(this.scrollContainerElement){const{clientHeight:e,clientWidth:t,scrollHeight:o,scrollWidth:l}=this.scrollContainerElement;this.setState("hasScrollbar",l>t||o>e&&["auto","scroll"].includes(getComputedStyle(this.scrollContainerElement).overflowY))}}calculateFixedColsWidth(){var e,t,o,l,i,s;const[n,a]=this.getRenderProp("fixedCols"),r=this.getRenderProp("headers"),c=be(r).cells,d=ve(r.horizontal,this.getRenderProp("data"));let h=0;for(let o=0;o<n&&o<c.length;o++)h+=null!==(t=null===(e=c[o])||void 0===e?void 0:e.width)&&void 0!==t?t:0;for(let e=d-a;e<d&&e<c.length;e++)h+=null!==(l=null===(o=c[e])||void 0===o?void 0:o.width)&&void 0!==l?l:0;if(this.getRenderProp("selection")){const e=null===(i=this.scrollContainerElement)||void 0===i?void 0:i.querySelector(".kol-table__cell--selection");h+=null!==(s=null==e?void 0:e.offsetWidth)&&void 0!==s?s:0}return h}updateStickyColsDisabled(){if(!this.scrollContainerElement)return void this.setState("stickyColsDisabled",!1);const e=this.calculateFixedColsWidth();this.setState("stickyColsDisabled",e>0&&e>=this.scrollContainerElement.clientWidth)}emitSelectionChange(e,t){const o=this.getRenderProp("on")[X.onSelectionChange];"function"==typeof o&&o(e,t),this.host&&B(this.host,H.selectionChange,t)}emitSort(e,t){const o=this.getRenderProp("on")[X.onSort];"function"==typeof o&&t.key&&o(e,t),this.host&&B(this.host,H.sort,t)}renderTableStatelessFC(){return this.buttonItems.beginRender(),this.linkItems.beginRender(),this.selectionTooltipItems.beginRender(),this.settings.beginRender(),n(Qe,{data:this.getRenderProp("data"),dataFoot:this.getRenderProp("dataFoot"),externalLabelElements:this.getState("externalLabelElements"),fixedCols:this.getRenderProp("fixedCols"),getButtonFcProps:this.getButtonFcProps,getLinkFcProps:this.getLinkFcProps,getSelectionTooltipRefs:this.getSelectionTooltipRefs,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{dt as B,ne as a,se as t,Y as v}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{y as t,q as e}from"./bem-registry.js";import{t as n,a as i}from"./tooltip-open-tracking.js";import{c as o}from"./component9.js";import{c as r,b as s,d as l}from"./props-from-config.js";import{i as a}from"./id.js";import{l as c}from"./label-lang-segment.js";const u=o("align","top"),f=r("badgeText","",s),h=Math.min,d=Math.max,m=Math.round,p=Math.floor,y=t=>({x:t,y:t}),w={left:"right",right:"left",bottom:"top",top:"bottom"};function g(t,e,n){return d(t,h(e,n))}function x(t,e){return"function"==typeof t?t(e):t}function v(t){return t.split("-")[0]}function b(t){return t.split("-")[1]}function A(t){return"x"===t?"y":"x"}function T(t){return"y"===t?"height":"width"}function S(t){const e=t[0];return"t"===e||"b"===e?"y":"x"}function k(t){return A(S(t))}function R(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const O=["left","right"],F=["right","left"],E=["top","bottom"],L=["bottom","top"];function j(t){const e=v(t);return w[e]+t.slice(e.length)}function z(t){return"number"!=typeof t?function(t){var e,n,i,o;return{top:null!=(e=t.top)?e:0,right:null!=(n=t.right)?n:0,bottom:null!=(i=t.bottom)?i:0,left:null!=(o=t.left)?o:0}}(t):{top:t,right:t,bottom:t,left:t}}function C(t){const{x:e,y:n,width:i,height:o}=t;return{width:i,height:o,top:n,left:e,right:e+i,bottom:n+o,x:e,y:n}}function P(t,e,n){let{reference:i,floating:o}=t;const r=S(e),s=k(e),l=T(s),a=v(e),c="y"===r,u=i.x+i.width/2-o.width/2,f=i.y+i.height/2-o.height/2,h=i[l]/2-o[l]/2;let d;switch(a){case"top":d={x:u,y:i.y-o.height};break;case"bottom":d={x:u,y:i.y+i.height};break;case"right":d={x:i.x+i.width,y:f};break;case"left":d={x:i.x-o.width,y:f};break;default:d={x:i.x,y:i.y}}const m=b(e);return m&&(d[s]+=h*("end"===m?1:-1)*(n&&c?-1:1)),d}async function D(t,e){var n;void 0===e&&(e={});const{x:i,y:o,platform:r,rects:s,elements:l,strategy:a}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:d=0}=x(e,t),m=z(d),p=l[h?"floating"===f?"reference":"floating":f],y=C(await r.getClippingRect({element:null==(n=await(null==r.isElement?void 0:r.isElement(p)))||n?p:p.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:a})),w="floating"===f?{x:i,y:o,width:s.floating.width,height:s.floating.height}:s.reference,g=await(null==r.getOffsetParent?void 0:r.getOffsetParent(l.floating)),v=await(null==r.isElement?void 0:r.isElement(g))&&await(null==r.getScale?void 0:r.getScale(g))||{x:1,y:1},b=C(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:g,strategy:a}):w);return{top:(y.top-b.top+m.top)/v.y,bottom:(b.bottom-y.bottom+m.bottom)/v.y,left:(y.left-b.left+m.left)/v.x,right:(b.right-y.right+m.right)/v.x}}const M=new Set(["left","top"]);function $(){return"undefined"!=typeof window}function B(t){return I(t)?(t.nodeName||"").toLowerCase():"#document"}function q(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function H(t){var e;return null==(e=(I(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function I(t){return!!$()&&(t instanceof Node||t instanceof q(t).Node)}function N(t){return!!$()&&(t instanceof Element||t instanceof q(t).Element)}function V(t){return!!$()&&(t instanceof HTMLElement||t instanceof q(t).HTMLElement)}function _(t){return!(!$()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof q(t).ShadowRoot)}function W(t){const{overflow:e,overflowX:n,overflowY:i,display:o}=et(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&"inline"!==o&&"contents"!==o}function X(t){return/^(table|td|th)$/.test(B(t))}function Y(t){try{if(t.matches(":popover-open"))return!0}catch(t){}try{return t.matches(":modal")}catch(t){return!1}}const G=/transform|translate|scale|rotate|perspective|filter/,J=/paint|layout|strict|content/,K=t=>!!t&&"none"!==t;let Q;function U(t){const e=N(t)?et(t):t;return K(e.transform)||K(e.translate)||K(e.scale)||K(e.rotate)||K(e.perspective)||!Z()&&(K(e.backdropFilter)||K(e.filter))||G.test(e.willChange||"")||J.test(e.contain||"")}function Z(){return null==Q&&(Q="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Q}function tt(t){return/^(html|body|#document)$/.test(B(t))}function et(t){return q(t).getComputedStyle(t)}function nt(t){return N(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function it(t){if("html"===B(t))return t;const e=t.assignedSlot||t.parentNode||_(t)&&t.host||H(t);return _(e)?e.host:e}function ot(t){const e=it(t);return tt(e)?(t.ownerDocument||t).body:V(e)&&W(e)?e:ot(e)}function rt(t,e,n){var i;void 0===e&&(e=[]),void 0===n&&(n=!0);const o=ot(t),r=o===(null==(i=t.ownerDocument)?void 0:i.body),s=q(o);if(r){const t=st(s);return e.concat(s,s.visualViewport||[],W(o)?o:[],t&&n?rt(t):[])}return e.concat(o,rt(o,[],n))}function st(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function lt(t){const e=et(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const o=V(t),r=o?t.offsetWidth:n,s=o?t.offsetHeight:i,l=m(n)!==r||m(i)!==s;return l&&(n=r,i=s),{width:n,height:i,$:l}}function at(t){return N(t)?t:t.contextElement}function ct(t){const e=at(t);if(!V(e))return y(1);const n=e.getBoundingClientRect(),{width:i,height:o,$:r}=lt(e);let s=(r?m(n.width):n.width)/i,l=(r?m(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),l&&Number.isFinite(l)||(l=1),{x:s,y:l}}const ut=y(0);function ft(t){const e=q(t);return Z()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:ut}function ht(t,e,n,i){void 0===e&&(e=!1),void 0===n&&(n=!1);const o=t.getBoundingClientRect(),r=at(t);let s=y(1);e&&(i?N(i)&&(s=ct(i)):s=ct(t));const l=function(t,e,n){return void 0===e&&(e=!1),!!n&&e&&n===q(t)}(r,n,i)?ft(r):y(0);let a=(o.left+l.x)/s.x,c=(o.top+l.y)/s.y,u=o.width/s.x,f=o.height/s.y;if(r&&i){const t=q(r),e=N(i)?q(i):i;let n=t,o=st(n);for(;o&&e!==n;){const t=ct(o),e=o.getBoundingClientRect(),i=et(o),r=e.left+(o.clientLeft+parseFloat(i.paddingLeft))*t.x,s=e.top+(o.clientTop+parseFloat(i.paddingTop))*t.y;a*=t.x,c*=t.y,u*=t.x,f*=t.y,a+=r,c+=s,n=q(o),o=st(n)}}return C({width:u,height:f,x:a,y:c})}function dt(t,e){const n=nt(t).scrollLeft;return e?e.left+n:ht(H(t)).left+n}function mt(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-dt(t,n),y:n.top+e.scrollTop}}function pt(t,e,n){let i;if("viewport"===e||"layoutViewport"===e)i=function(t,e,n){void 0===n&&(n="viewport");const i="layoutViewport"===n,o=q(t),r=H(t),s=o.visualViewport;let l=r.clientWidth,a=r.clientHeight,c=0,u=0;if(s){const t=!Z()||"fixed"===e;i?t||(c=-s.offsetLeft,u=-s.offsetTop):(l=s.width,a=s.height,t&&(c=s.offsetLeft,u=s.offsetTop))}if(dt(r)<=0){const t=r.ownerDocument,e=t.body,n=getComputedStyle(e),i="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-e.clientWidth-i),s="stable both-edges"===getComputedStyle(r).scrollbarGutter?o/2:o;s<=25&&(l-=s)}return{width:l,height:a,x:c,y:u}}(t,n,e);else if("document"===e)i=function(t){const e=nt(t),n=t.ownerDocument.body,i=d(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=d(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let r=-e.scrollLeft+dt(t);const s=-e.scrollTop;return"rtl"===et(n).direction&&(r+=d(t.clientWidth,n.clientWidth)-i),{width:i,height:o,x:r,y:s}}(H(t));else if(N(e))i=function(t,e){const n=ht(t,!0,"fixed"===e),i=n.top+t.clientTop,o=n.left+t.clientLeft,r=ct(t);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:o*r.x,y:i*r.y}}(e,n);else{const n=ft(t);i={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return C(i)}function yt(t,e,n){const i=V(e),o=H(e),r="fixed"===n,s=ht(t,!0,r,e);let l={scrollLeft:0,scrollTop:0};const a=y(0);if((i||!r)&&(("body"!==B(e)||W(o))&&(l=nt(e)),i)){const t=ht(e,!0,r,e);a.x=t.x+e.clientLeft,a.y=t.y+e.clientTop}!i&&o&&(a.x=dt(o));const c=!o||i||r?y(0):mt(o,l);return{x:s.left+l.scrollLeft-a.x-c.x,y:s.top+l.scrollTop-a.y-c.y,width:s.width,height:s.height}}function wt(t){return"static"===et(t).position}function gt(t,e){if(!V(t)||"fixed"===et(t).position)return null;if(e)return e(t);let n=t.offsetParent;return H(t)===n&&(n=n.ownerDocument.body),n}function xt(t,e){const n=q(t);if(Y(t))return n;if(!V(t)){let e=it(t);for(;e&&!tt(e);){if(N(e)&&!wt(e))return e;e=it(e)}return n}let i=gt(t,e);for(;i&&X(i)&&wt(i);)i=gt(i,e);return i&&tt(i)&&wt(i)&&!U(i)?n:i||function(t){let e=it(t);for(;V(e)&&!tt(e);){if(U(e))return e;if(Y(e))return null;e=it(e)}return null}(t)||n}const vt={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:i,strategy:o}=t;const r="fixed"===o,s=H(i),l=!!e&&Y(e.floating);if(i===s||l&&r)return n;let a={scrollLeft:0,scrollTop:0},c=y(1);const u=y(0),f=V(i);if((f||!r)&&(("body"!==B(i)||W(s))&&(a=nt(i)),f)){const t=ht(i);c=ct(i),u.x=t.x+i.clientLeft,u.y=t.y+i.clientTop}const h=!s||f||r?y(0):mt(s,a);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-a.scrollTop*c.y+u.y+h.y}},getDocumentElement:H,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:i,strategy:o}=t;const r=[..."clippingAncestors"===n?Y(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let i=rt(t,[],!1).filter((t=>N(t)&&"body"!==B(t))),o=null;const r="fixed"===et(t).position;let s=r?it(t):t;for(;N(s)&&!tt(s);){const t=et(s),e=U(s),n=o?o.position:r?"fixed":"";e||"fixed"!==n&&("absolute"!==n||"static"!==t.position)?o=t:i=i.filter((t=>t!==s)),s=it(s)}return e.set(t,i),i}(e,this._c):[].concat(n),i],s=pt(e,r[0],o);let l=s.top,a=s.right,c=s.bottom,u=s.left;for(let t=1;t<r.length;t++){const n=pt(e,r[t],o);l=d(n.top,l),a=h(n.right,a),c=h(n.bottom,c),u=d(n.left,u)}return{width:a-u,height:c-l,x:u,y:l}},getOffsetParent:xt,getElementRects:async function(t){const e=this.getOffsetParent||xt,n=this.getDimensions,i=await n(t.floating);return{reference:yt(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},getClientRects:function(t){return t.getClientRects?Array.from(t.getClientRects()):[]},getDimensions:function(t){const{width:e,height:n}=lt(t);return{width:e,height:n}},getScale:ct,isElement:N,isRTL:function(t){return"rtl"===et(t).direction}};function bt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function At(t,e,n,i){void 0===i&&(i={});const{ancestorScroll:o=!0,ancestorResize:r=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:a=!1}=i,c=at(t),u=o||r?[...c?rt(c):[],...e?rt(e):[]]:[];u.forEach((t=>{o&&t.addEventListener("scroll",n),r&&t.addEventListener("resize",n)}));const f=c&&l?function(t,e,n){let i,o=null;const r=H(t);function s(){var t;clearTimeout(i),null==(t=o)||t.disconnect(),o=null}function l(n,a){void 0===n&&(n=!1),void 0===a&&(a=1),s();const c=t.getBoundingClientRect(),{left:u,top:f,width:m,height:y}=c;if(n||e(),!m||!y)return;const w={rootMargin:-p(f)+"px "+-p(r.clientWidth-(u+m))+"px "+-p(r.clientHeight-(f+y))+"px "+-p(u)+"px",threshold:d(0,h(1,a))||1};let g=!0;function x(e){const n=e[0].intersectionRatio;if(!bt(c,t.getBoundingClientRect()))return l();if(n!==a){if(!g)return l();n?l(!1,n):i=setTimeout((()=>{l(!1,1e-7)}),1e3)}g=!1}try{o=new IntersectionObserver(x,{...w,root:r.ownerDocument})}catch(t){o=new IntersectionObserver(x,w)}o.observe(t)}const a=q(t),c=()=>l(n);return a.addEventListener("resize",c),l(!0),()=>{a.removeEventListener("resize",c),s()}}(c,n,r):null;let m,y=-1,w=null;s&&(w=new ResizeObserver((t=>{let[i]=t;i&&i.target===c&&w&&e&&(w.unobserve(e),cancelAnimationFrame(y),y=requestAnimationFrame((()=>{var t;null==(t=w)||t.observe(e)}))),n()})),c&&!a&&w.observe(c),e&&w.observe(e));let g=a?ht(t):null;return a&&function e(){const i=ht(t);g&&!bt(g,i)&&n(),g=i,m=requestAnimationFrame(e)}(),n(),()=>{var t;u.forEach((t=>{o&&t.removeEventListener("scroll",n),r&&t.removeEventListener("resize",n)})),null==f||f(),null==(t=w)||t.disconnect(),w=null,a&&cancelAnimationFrame(m)}}const Tt=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:i,placement:o,platform:r}=e,{mainAxis:s=!0,crossAxis:l=!1,limiter:a={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...c}=x(t,e),u={x:n,y:i},f=await r.detectOverflow(e,c),h=S(o),d=A(h);let m=u[d],p=u[h];const y=(t,e)=>g(e+f["y"===t?"top":"left"],e,e-f["y"===t?"bottom":"right"]);s&&(m=y(d,m)),l&&(p=y(h,p));const w=a.fn({...e,[d]:m,[h]:p});return{...w,data:{x:w.x-n,y:w.y-i,enabled:{[d]:s,[h]:l}}}}}},St=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,i;const{placement:o,middlewareData:r,rects:s,initialPlacement:l,platform:a,elements:c}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:p=!0,...y}=x(t,e);if(null!=(n=r.arrow)&&n.alignmentOffset)return{};const w=v(o),g=S(l),A=v(l)===l,z=await(null==a.isRTL?void 0:a.isRTL(c.floating)),C=h||(A||!p?[j(l)]:function(t){const e=j(t);return[R(t),e,R(e)]}(l)),P="none"!==m;!h&&P&&C.push(...function(t,e,n,i){const o=b(t);let r=function(t,e,n){switch(t){case"top":case"bottom":return n?e?F:O:e?O:F;case"left":case"right":return e?E:L;default:return[]}}(v(t),"start"===n,i);return o&&(r=r.map((t=>t+"-"+o)),e&&(r=r.concat(r.map(R)))),r}(l,p,m,z));const D=[l,...C],M=await a.detectOverflow(e,y),$=[];let B=(null==(i=r.flip)?void 0:i.overflows)||[];if(u&&$.push(M[w]),f){const t=function(t,e,n){void 0===n&&(n=!1);const i=b(t),o=k(t),r=T(o);let s="x"===o?i===(n?"end":"start")?"right":"left":"start"===i?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=j(s)),[s,j(s)]}(o,s,z);$.push(M[t[0]],M[t[1]])}if(B=[...B,{placement:o,overflows:$}],!$.every((t=>t<=0))){var q,H;const t=((null==(q=r.flip)?void 0:q.index)||0)+1,e=D[t];if(e&&("alignment"!==f||g===S(e)||B.every((t=>S(t.placement)!==g||t.overflows[0]>0))))return{data:{index:t,overflows:B},reset:{placement:e}};let n=null==(H=B.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:H.placement;if(!n)switch(d){case"bestFit":{var I;const t=null==(I=B.filter((t=>{if(P){const e=S(t.placement);return e===g||"y"===e}return!0})).map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:I[0];t&&(n=t);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}},kt=async({floatingElement:e,referenceElement:n,arrowElement:i,align:o="top"})=>{var r,s,l;if(!t()){const t=[(l=(null==i?void 0:i.offsetHeight)||10,void 0===l&&(l=0),{name:"offset",options:l,async fn(t){var e,n;const{x:i,y:o,placement:r,middlewareData:s}=t,a=await async function(t,e){const{placement:n,platform:i,elements:o}=t,r=await(null==i.isRTL?void 0:i.isRTL(o.floating)),s=v(n),l=b(n),a="y"===S(n),c=M.has(s)?-1:1,u=r&&a?-1:1,f=x(e,t);let{mainAxis:h,crossAxis:d,alignmentAxis:m}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&"number"==typeof m&&(d="end"===l?-1*m:m),a?{x:d*u,y:h*c}:{x:h*c,y:d*u}}(t,l);return r===(null==(e=s.offset)?void 0:e.placement)&&null!=(n=s.arrow)&&n.alignmentOffset?{}:{x:i+a.x,y:o+a.y,data:{...a,placement:r}}}}),St(),Tt()];i&&t.push((t=>({name:"arrow",options:t,async fn(e){const{x:n,y:i,placement:o,rects:r,platform:s,elements:l,middlewareData:a}=e,{element:c,padding:u=0}=x(t,e)||{};if(null==c)return{};const f=z(u),d={x:n,y:i},m=k(o),p=T(m),y=await s.getDimensions(c),w="y"===m,v=w?"top":"left",A=w?"bottom":"right",S=w?"clientHeight":"clientWidth",R=r.reference[p]+r.reference[m]-d[m]-r.floating[p],O=d[m]-r.reference[m],F=await(null==s.getOffsetParent?void 0:s.getOffsetParent(c));let E=F?F[S]:0;E&&await(null==s.isElement?void 0:s.isElement(F))||(E=l.floating[S]||r.floating[p]);const L=R/2-O/2,j=E/2-y[p]/2-1,C=h(f[v],j),P=h(f[A],j),D=E-y[p]-P,M=E/2-y[p]/2+L,$=g(C,M,D),B=!a.arrow&&null!=b(o)&&M!==$&&r.reference[p]/2-(M<C?C:P)-y[p]/2<0,q=B?M<C?M-C:M-D:0;return{[m]:d[m]+q,data:{[m]:$,centerOffset:M-$-q,...B&&{alignmentOffset:q}},reset:B}}}))({element:i}));const{x:a,y:c,middlewareData:u,placement:f}=await((t,e,n)=>{const i=new Map,o=null!=n?n:{},r={...vt,...o.platform,_c:i};return(async(t,e,n)=>{const{placement:i="bottom",strategy:o="absolute",middleware:r=[],platform:s}=n,l=s.detectOverflow?s:{...s,detectOverflow:D},a=await(null==s.isRTL?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:o}),{x:u,y:f}=P(c,i,a),h=i,d=0;const m={};for(let n=0;n<r.length;n++){const p=r[n];if(!p)continue;const{name:y,fn:w}=p,{x:g,y:x,data:v,reset:b}=await w({x:u,y:f,initialPlacement:i,placement:h,strategy:o,middlewareData:m,rects:c,platform:l,elements:{reference:t,floating:e}});u=null!=g?g:u,f=null!=x?x:f,m[y]={...m[y],...v},b&&d<50&&(d++,"object"==typeof b&&(b.placement&&(h=b.placement),b.rects&&(c=!0===b.rects?await s.getElementRects({reference:t,floating:e,strategy:o}):b.rects),({x:u,y:f}=P(c,h,a))),n=-1)}return{x:u,y:f,placement:h,strategy:o,middlewareData:m}})(t,e,{...o,platform:r})})(n,e,{placement:o,middleware:t,strategy:"fixed"});Object.assign(e.style,{left:`${a}px`,top:`${c}px`,visibility:"visible"}),i&&((null===(r=u.arrow)||void 0===r?void 0:r.x)?Object.assign(i.style,{left:`${u.arrow.x}px`,top:"bottom"===f?-i.offsetHeight/2+"px":"",bottom:"top"===f?-i.offsetHeight/2+"px":""}):(null===(s=u.arrow)||void 0===s?void 0:s.y)&&Object.assign(i.style,{left:"right"===f?-i.offsetWidth/2+"px":"",right:"left"===f?-i.offsetWidth/2+"px":"",top:`${u.arrow.y}px`}))}},Rt=new Set;let Ot=null;class Ft{constructor(t,e){this.setState=t.setState,this.getState=t.getState,this.renderProps=l(e)}setRenderProp(t,e){this.renderProps[t]=e}getRenderProp(t){return this.renderProps[t]}}const Et={required:[c],optional:[u,f,a]};class Lt extends Ft{constructor(t){super(t,Et),this.hasFocusIn=!1,this.hasMouseIn=!1,this.isHiddenForCurrentVisit=!1,this.setTooltipElementRef=t=>{this.tooltipElement=t,this.tooltipElement&&this.addListeners(this.tooltipElement)},this.hideTooltipByEscape=t=>{"Escape"===t.key&&(t.stopPropagation(),t.preventDefault(),this.hideTooltip())},this.handleMouseEnter=()=>{const t=this.isNewVisit();this.hasMouseIn=!0,t&&(this.isHiddenForCurrentVisit=!1),this.showOrHideTooltip()},this.handleMouseLeave=()=>{this.hasMouseIn=!1,this.resetHideFlag(),this.showOrHideTooltip()},this.handleFocusIn=()=>{const t=this.isNewVisit();this.hasFocusIn=!0,t&&(this.isHiddenForCurrentVisit=!1),this.showOrHideTooltip()},this.handleFocusOut=()=>{this.hasFocusIn=!1,this.resetHideFlag(),this.showOrHideTooltip()}}componentWillLoad(t){this.watchLabel(t.label),this.watchAlign(t.align),this.watchBadgeText(t.badgeText),this.watchId(t.id)}watchLabel(t){c.apply(t||void 0,(t=>{this.setRenderProp("label",t)}))}watchAlign(t){u.apply(t,(t=>{this.setRenderProp("align",t)}))}watchBadgeText(t){f.apply(t,(t=>{this.setRenderProp("badgeText",t)}))}watchId(t){a.apply(t,(t=>{this.setRenderProp("id",t)}))}initContext(t){this.previousSibling=t}syncListeners(t,e,n=!1){t&&this.removeListeners(t),e&&(n&&(this.previousSibling=e),this.removeListeners(e),this.addListeners(e))}handleEventListeners(t){this.syncListeners(this.previousSibling,t.previousElementSibling,!0)}hideTooltip(){this.isHiddenForCurrentVisit=!0,this.tooltipElement&&(function(t){if(Rt.delete(t)&&Ot===t){Ot=null;for(const t of Rt)Ot=t;Ot&&Ot.style.setProperty("z-index","1000")}}(this.tooltipElement),n(),this.tooltipElement.classList.remove("show"),this.tooltipElement.classList.add("hide"),this.tooltipElement.addEventListener("animationend",(()=>{var t;(null===(t=this.tooltipElement)||void 0===t?void 0:t.classList.contains("hide"))&&this.tooltipElement.style.removeProperty("display")}),{once:!0}),this.cleanupAutoPositioning&&(this.cleanupAutoPositioning(),this.cleanupAutoPositioning=void 0)),e().removeEventListener("keydown",this.hideTooltipByEscape)}destroy(){clearTimeout(this.overFocusTimeout),this.previousSibling&&(this.removeListeners(this.previousSibling),this.previousSibling=void 0),this.tooltipElement&&this.removeListeners(this.tooltipElement),this.cleanupAutoPositioning&&(this.cleanupAutoPositioning(),this.cleanupAutoPositioning=void 0),e().removeEventListener("keydown",this.hideTooltipByEscape)}isNewVisit(){return!this.hasMouseIn&&!this.hasFocusIn}resetHideFlag(){this.isNewVisit()&&(this.isHiddenForCurrentVisit=!1)}async alignTooltip(){this.tooltipElement&&this.previousSibling&&await kt({align:this.getRenderProp("align"),arrowElement:this.tooltipElement.querySelector(".kol-tooltip__arrow"),floatingElement:this.tooltipElement,referenceElement:this.previousSibling})}showTooltip(){var t;!this.isHiddenForCurrentVisit&&this.previousSibling&&this.tooltipElement&&(Ot!==(t=this.tooltipElement)&&(Ot&&Ot.style.setProperty("z-index","999"),Rt.delete(t),Rt.add(t),t.style.setProperty("z-index","1000"),Ot=t),i(),this.tooltipElement.classList.remove("hide"),this.tooltipElement.classList.add("show"),this.tooltipElement.style.setProperty("display","block"),e().addEventListener("keydown",this.hideTooltipByEscape),this.cleanupAutoPositioning=At(this.previousSibling,this.tooltipElement,(()=>{this.alignTooltip()})))}showOrHideTooltip(){clearTimeout(this.overFocusTimeout),this.overFocusTimeout=setTimeout((()=>{this.hasMouseIn||this.hasFocusIn?this.showTooltip():this.hideTooltip()}),300)}addListeners(t){t.addEventListener("mouseover",this.handleMouseEnter),t.addEventListener("mouseout",this.handleMouseLeave),t.addEventListener("focusin",this.handleFocusIn),t.addEventListener("focusout",this.handleFocusOut)}removeListeners(t){t.removeEventListener("mouseover",this.handleMouseEnter),t.removeEventListener("mouseout",this.handleMouseLeave),t.removeEventListener("focusin",this.handleFocusIn),t.removeEventListener("focusout",this.handleFocusOut)}}export{Ft as B,Lt as T,u as a,kt as b,At as c}
4
+ import{z as t,t as e}from"./bem-registry.js";import{t as n,a as i}from"./tooltip-open-tracking.js";import{c as o}from"./component9.js";import{c as r,b as s,d as l}from"./props-from-config.js";import{i as a}from"./id.js";import{l as c}from"./label-lang-segment.js";const u=o("align","top"),f=r("badgeText","",s),h=Math.min,d=Math.max,m=Math.round,p=Math.floor,y=t=>({x:t,y:t}),w={left:"right",right:"left",bottom:"top",top:"bottom"};function g(t,e,n){return d(t,h(e,n))}function x(t,e){return"function"==typeof t?t(e):t}function v(t){return t.split("-")[0]}function b(t){return t.split("-")[1]}function A(t){return"x"===t?"y":"x"}function T(t){return"y"===t?"height":"width"}function S(t){const e=t[0];return"t"===e||"b"===e?"y":"x"}function k(t){return A(S(t))}function R(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const O=["left","right"],F=["right","left"],E=["top","bottom"],z=["bottom","top"];function L(t){const e=v(t);return w[e]+t.slice(e.length)}function j(t){return"number"!=typeof t?function(t){var e,n,i,o;return{top:null!=(e=t.top)?e:0,right:null!=(n=t.right)?n:0,bottom:null!=(i=t.bottom)?i:0,left:null!=(o=t.left)?o:0}}(t):{top:t,right:t,bottom:t,left:t}}function C(t){const{x:e,y:n,width:i,height:o}=t;return{width:i,height:o,top:n,left:e,right:e+i,bottom:n+o,x:e,y:n}}function P(t,e,n){let{reference:i,floating:o}=t;const r=S(e),s=k(e),l=T(s),a=v(e),c="y"===r,u=i.x+i.width/2-o.width/2,f=i.y+i.height/2-o.height/2,h=i[l]/2-o[l]/2;let d;switch(a){case"top":d={x:u,y:i.y-o.height};break;case"bottom":d={x:u,y:i.y+i.height};break;case"right":d={x:i.x+i.width,y:f};break;case"left":d={x:i.x-o.width,y:f};break;default:d={x:i.x,y:i.y}}const m=b(e);return m&&(d[s]+=h*("end"===m?1:-1)*(n&&c?-1:1)),d}async function D(t,e){var n;void 0===e&&(e={});const{x:i,y:o,platform:r,rects:s,elements:l,strategy:a}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:d=0}=x(e,t),m=j(d),p=l[h?"floating"===f?"reference":"floating":f],y=C(await r.getClippingRect({element:null==(n=await(null==r.isElement?void 0:r.isElement(p)))||n?p:p.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:a})),w="floating"===f?{x:i,y:o,width:s.floating.width,height:s.floating.height}:s.reference,g=await(null==r.getOffsetParent?void 0:r.getOffsetParent(l.floating)),v=await(null==r.isElement?void 0:r.isElement(g))&&await(null==r.getScale?void 0:r.getScale(g))||{x:1,y:1},b=C(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:g,strategy:a}):w);return{top:(y.top-b.top+m.top)/v.y,bottom:(b.bottom-y.bottom+m.bottom)/v.y,left:(y.left-b.left+m.left)/v.x,right:(b.right-y.right+m.right)/v.x}}const M=new Set(["left","top"]);function $(){return"undefined"!=typeof window}function B(t){return N(t)?(t.nodeName||"").toLowerCase():"#document"}function H(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function I(t){var e;return null==(e=(N(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function N(t){return!!$()&&(t instanceof Node||t instanceof H(t).Node)}function V(t){return!!$()&&(t instanceof Element||t instanceof H(t).Element)}function q(t){return!!$()&&(t instanceof HTMLElement||t instanceof H(t).HTMLElement)}function _(t){return!(!$()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof H(t).ShadowRoot)}function W(t){const{overflow:e,overflowX:n,overflowY:i,display:o}=et(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&"inline"!==o&&"contents"!==o}function X(t){return/^(table|td|th)$/.test(B(t))}function Y(t){try{if(t.matches(":popover-open"))return!0}catch(t){}try{return t.matches(":modal")}catch(t){return!1}}const G=/transform|translate|scale|rotate|perspective|filter/,J=/paint|layout|strict|content/,K=t=>!!t&&"none"!==t;let Q;function U(t){const e=V(t)?et(t):t;return K(e.transform)||K(e.translate)||K(e.scale)||K(e.rotate)||K(e.perspective)||!Z()&&(K(e.backdropFilter)||K(e.filter))||G.test(e.willChange||"")||J.test(e.contain||"")}function Z(){return null==Q&&(Q="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Q}function tt(t){return/^(html|body|#document)$/.test(B(t))}function et(t){return H(t).getComputedStyle(t)}function nt(t){return V(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function it(t){if("html"===B(t))return t;const e=t.assignedSlot||t.parentNode||_(t)&&t.host||I(t);return _(e)?e.host:e}function ot(t){const e=it(t);return tt(e)?(t.ownerDocument||t).body:q(e)&&W(e)?e:ot(e)}function rt(t,e,n){var i;void 0===e&&(e=[]),void 0===n&&(n=!0);const o=ot(t),r=o===(null==(i=t.ownerDocument)?void 0:i.body),s=H(o);if(r){const t=st(s);return e.concat(s,s.visualViewport||[],W(o)?o:[],t&&n?rt(t):[])}return e.concat(o,rt(o,[],n))}function st(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function lt(t){const e=et(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const o=q(t),r=o?t.offsetWidth:n,s=o?t.offsetHeight:i,l=m(n)!==r||m(i)!==s;return l&&(n=r,i=s),{width:n,height:i,$:l}}function at(t){return V(t)?t:t.contextElement}function ct(t){const e=at(t);if(!q(e))return y(1);const n=e.getBoundingClientRect(),{width:i,height:o,$:r}=lt(e);let s=(r?m(n.width):n.width)/i,l=(r?m(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),l&&Number.isFinite(l)||(l=1),{x:s,y:l}}const ut=y(0);function ft(t){const e=H(t);return Z()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:ut}function ht(t,e,n,i){void 0===e&&(e=!1),void 0===n&&(n=!1);const o=t.getBoundingClientRect(),r=at(t);let s=y(1);e&&(i?V(i)&&(s=ct(i)):s=ct(t));const l=function(t,e,n){return void 0===e&&(e=!1),!!n&&e&&n===H(t)}(r,n,i)?ft(r):y(0);let a=(o.left+l.x)/s.x,c=(o.top+l.y)/s.y,u=o.width/s.x,f=o.height/s.y;if(r&&i){const t=H(r),e=V(i)?H(i):i;let n=t,o=st(n);for(;o&&e!==n;){const t=ct(o),e=o.getBoundingClientRect(),i=et(o),r=e.left+(o.clientLeft+parseFloat(i.paddingLeft))*t.x,s=e.top+(o.clientTop+parseFloat(i.paddingTop))*t.y;a*=t.x,c*=t.y,u*=t.x,f*=t.y,a+=r,c+=s,n=H(o),o=st(n)}}return C({width:u,height:f,x:a,y:c})}function dt(t,e){const n=nt(t).scrollLeft;return e?e.left+n:ht(I(t)).left+n}function mt(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-dt(t,n),y:n.top+e.scrollTop}}function pt(t,e,n){let i;if("viewport"===e||"layoutViewport"===e)i=function(t,e,n){void 0===n&&(n="viewport");const i="layoutViewport"===n,o=H(t),r=I(t),s=o.visualViewport;let l=r.clientWidth,a=r.clientHeight,c=0,u=0;if(s){const t=!Z()||"fixed"===e;i?t||(c=-s.offsetLeft,u=-s.offsetTop):(l=s.width,a=s.height,t&&(c=s.offsetLeft,u=s.offsetTop))}if(dt(r)<=0){const t=r.ownerDocument,e=t.body,n=getComputedStyle(e),i="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-e.clientWidth-i),s="stable both-edges"===getComputedStyle(r).scrollbarGutter?o/2:o;s<=25&&(l-=s)}return{width:l,height:a,x:c,y:u}}(t,n,e);else if("document"===e)i=function(t){const e=nt(t),n=t.ownerDocument.body,i=d(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=d(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let r=-e.scrollLeft+dt(t);const s=-e.scrollTop;return"rtl"===et(n).direction&&(r+=d(t.clientWidth,n.clientWidth)-i),{width:i,height:o,x:r,y:s}}(I(t));else if(V(e))i=function(t,e){const n=ht(t,!0,"fixed"===e),i=n.top+t.clientTop,o=n.left+t.clientLeft,r=ct(t);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:o*r.x,y:i*r.y}}(e,n);else{const n=ft(t);i={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return C(i)}function yt(t,e,n){const i=q(e),o=I(e),r="fixed"===n,s=ht(t,!0,r,e);let l={scrollLeft:0,scrollTop:0};const a=y(0);if((i||!r)&&(("body"!==B(e)||W(o))&&(l=nt(e)),i)){const t=ht(e,!0,r,e);a.x=t.x+e.clientLeft,a.y=t.y+e.clientTop}!i&&o&&(a.x=dt(o));const c=!o||i||r?y(0):mt(o,l);return{x:s.left+l.scrollLeft-a.x-c.x,y:s.top+l.scrollTop-a.y-c.y,width:s.width,height:s.height}}function wt(t){return"static"===et(t).position}function gt(t,e){if(!q(t)||"fixed"===et(t).position)return null;if(e)return e(t);let n=t.offsetParent;return I(t)===n&&(n=n.ownerDocument.body),n}function xt(t,e){const n=H(t);if(Y(t))return n;if(!q(t)){let e=it(t);for(;e&&!tt(e);){if(V(e)&&!wt(e))return e;e=it(e)}return n}let i=gt(t,e);for(;i&&X(i)&&wt(i);)i=gt(i,e);return i&&tt(i)&&wt(i)&&!U(i)?n:i||function(t){let e=it(t);for(;q(e)&&!tt(e);){if(U(e))return e;if(Y(e))return null;e=it(e)}return null}(t)||n}const vt={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:i,strategy:o}=t;const r="fixed"===o,s=I(i),l=!!e&&Y(e.floating);if(i===s||l&&r)return n;let a={scrollLeft:0,scrollTop:0},c=y(1);const u=y(0),f=q(i);if((f||!r)&&(("body"!==B(i)||W(s))&&(a=nt(i)),f)){const t=ht(i);c=ct(i),u.x=t.x+i.clientLeft,u.y=t.y+i.clientTop}const h=!s||f||r?y(0):mt(s,a);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-a.scrollTop*c.y+u.y+h.y}},getDocumentElement:I,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:i,strategy:o}=t;const r=[..."clippingAncestors"===n?Y(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let i=rt(t,[],!1).filter((t=>V(t)&&"body"!==B(t))),o=null;const r="fixed"===et(t).position;let s=r?it(t):t;for(;V(s)&&!tt(s);){const t=et(s),e=U(s),n=o?o.position:r?"fixed":"";e||"fixed"!==n&&("absolute"!==n||"static"!==t.position)?o=t:i=i.filter((t=>t!==s)),s=it(s)}return e.set(t,i),i}(e,this._c):[].concat(n),i],s=pt(e,r[0],o);let l=s.top,a=s.right,c=s.bottom,u=s.left;for(let t=1;t<r.length;t++){const n=pt(e,r[t],o);l=d(n.top,l),a=h(n.right,a),c=h(n.bottom,c),u=d(n.left,u)}return{width:a-u,height:c-l,x:u,y:l}},getOffsetParent:xt,getElementRects:async function(t){const e=this.getOffsetParent||xt,n=this.getDimensions,i=await n(t.floating);return{reference:yt(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},getClientRects:function(t){return t.getClientRects?Array.from(t.getClientRects()):[]},getDimensions:function(t){const{width:e,height:n}=lt(t);return{width:e,height:n}},getScale:ct,isElement:V,isRTL:function(t){return"rtl"===et(t).direction}};function bt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function At(t,e,n,i){void 0===i&&(i={});const{ancestorScroll:o=!0,ancestorResize:r=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:a=!1}=i,c=at(t),u=o||r?[...c?rt(c):[],...e?rt(e):[]]:[];u.forEach((t=>{o&&t.addEventListener("scroll",n),r&&t.addEventListener("resize",n)}));const f=c&&l?function(t,e,n){let i,o=null;const r=I(t);function s(){var t;clearTimeout(i),null==(t=o)||t.disconnect(),o=null}function l(n,a){void 0===n&&(n=!1),void 0===a&&(a=1),s();const c=t.getBoundingClientRect(),{left:u,top:f,width:m,height:y}=c;if(n||e(),!m||!y)return;const w={rootMargin:-p(f)+"px "+-p(r.clientWidth-(u+m))+"px "+-p(r.clientHeight-(f+y))+"px "+-p(u)+"px",threshold:d(0,h(1,a))||1};let g=!0;function x(e){const n=e[0].intersectionRatio;if(!bt(c,t.getBoundingClientRect()))return l();if(n!==a){if(!g)return l();n?l(!1,n):i=setTimeout((()=>{l(!1,1e-7)}),1e3)}g=!1}try{o=new IntersectionObserver(x,{...w,root:r.ownerDocument})}catch(t){o=new IntersectionObserver(x,w)}o.observe(t)}const a=H(t),c=()=>l(n);return a.addEventListener("resize",c),l(!0),()=>{a.removeEventListener("resize",c),s()}}(c,n,r):null;let m,y=-1,w=null;s&&(w=new ResizeObserver((t=>{let[i]=t;i&&i.target===c&&w&&e&&(w.unobserve(e),cancelAnimationFrame(y),y=requestAnimationFrame((()=>{var t;null==(t=w)||t.observe(e)}))),n()})),c&&!a&&w.observe(c),e&&w.observe(e));let g=a?ht(t):null;return a&&function e(){const i=ht(t);g&&!bt(g,i)&&n(),g=i,m=requestAnimationFrame(e)}(),n(),()=>{var t;u.forEach((t=>{o&&t.removeEventListener("scroll",n),r&&t.removeEventListener("resize",n)})),null==f||f(),null==(t=w)||t.disconnect(),w=null,a&&cancelAnimationFrame(m)}}const Tt=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:i,placement:o,platform:r}=e,{mainAxis:s=!0,crossAxis:l=!1,limiter:a={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...c}=x(t,e),u={x:n,y:i},f=await r.detectOverflow(e,c),h=S(o),d=A(h);let m=u[d],p=u[h];const y=(t,e)=>g(e+f["y"===t?"top":"left"],e,e-f["y"===t?"bottom":"right"]);s&&(m=y(d,m)),l&&(p=y(h,p));const w=a.fn({...e,[d]:m,[h]:p});return{...w,data:{x:w.x-n,y:w.y-i,enabled:{[d]:s,[h]:l}}}}}},St=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,i;const{placement:o,middlewareData:r,rects:s,initialPlacement:l,platform:a,elements:c}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:p=!0,...y}=x(t,e);if(null!=(n=r.arrow)&&n.alignmentOffset)return{};const w=v(o),g=S(l),A=v(l)===l,j=await(null==a.isRTL?void 0:a.isRTL(c.floating)),C=h||(A||!p?[L(l)]:function(t){const e=L(t);return[R(t),e,R(e)]}(l)),P="none"!==m;!h&&P&&C.push(...function(t,e,n,i){const o=b(t);let r=function(t,e,n){switch(t){case"top":case"bottom":return n?e?F:O:e?O:F;case"left":case"right":return e?E:z;default:return[]}}(v(t),"start"===n,i);return o&&(r=r.map((t=>t+"-"+o)),e&&(r=r.concat(r.map(R)))),r}(l,p,m,j));const D=[l,...C],M=await a.detectOverflow(e,y),$=[];let B=(null==(i=r.flip)?void 0:i.overflows)||[];if(u&&$.push(M[w]),f){const t=function(t,e,n){void 0===n&&(n=!1);const i=b(t),o=k(t),r=T(o);let s="x"===o?i===(n?"end":"start")?"right":"left":"start"===i?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=L(s)),[s,L(s)]}(o,s,j);$.push(M[t[0]],M[t[1]])}if(B=[...B,{placement:o,overflows:$}],!$.every((t=>t<=0))){var H,I;const t=((null==(H=r.flip)?void 0:H.index)||0)+1,e=D[t];if(e&&("alignment"!==f||g===S(e)||B.every((t=>S(t.placement)!==g||t.overflows[0]>0))))return{data:{index:t,overflows:B},reset:{placement:e}};let n=null==(I=B.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:I.placement;if(!n)switch(d){case"bestFit":{var N;const t=null==(N=B.filter((t=>{if(P){const e=S(t.placement);return e===g||"y"===e}return!0})).map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:N[0];t&&(n=t);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}},kt=async({floatingElement:e,referenceElement:n,arrowElement:i,align:o="top"})=>{var r,s,l;if(!t()){const t=[(l=(null==i?void 0:i.offsetHeight)||10,void 0===l&&(l=0),{name:"offset",options:l,async fn(t){var e,n;const{x:i,y:o,placement:r,middlewareData:s}=t,a=await async function(t,e){const{placement:n,platform:i,elements:o}=t,r=await(null==i.isRTL?void 0:i.isRTL(o.floating)),s=v(n),l=b(n),a="y"===S(n),c=M.has(s)?-1:1,u=r&&a?-1:1,f=x(e,t);let{mainAxis:h,crossAxis:d,alignmentAxis:m}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&"number"==typeof m&&(d="end"===l?-1*m:m),a?{x:d*u,y:h*c}:{x:h*c,y:d*u}}(t,l);return r===(null==(e=s.offset)?void 0:e.placement)&&null!=(n=s.arrow)&&n.alignmentOffset?{}:{x:i+a.x,y:o+a.y,data:{...a,placement:r}}}}),St(),Tt()];i&&t.push((t=>({name:"arrow",options:t,async fn(e){const{x:n,y:i,placement:o,rects:r,platform:s,elements:l,middlewareData:a}=e,{element:c,padding:u=0}=x(t,e)||{};if(null==c)return{};const f=j(u),d={x:n,y:i},m=k(o),p=T(m),y=await s.getDimensions(c),w="y"===m,v=w?"top":"left",A=w?"bottom":"right",S=w?"clientHeight":"clientWidth",R=r.reference[p]+r.reference[m]-d[m]-r.floating[p],O=d[m]-r.reference[m],F=await(null==s.getOffsetParent?void 0:s.getOffsetParent(c));let E=F?F[S]:0;E&&await(null==s.isElement?void 0:s.isElement(F))||(E=l.floating[S]||r.floating[p]);const z=R/2-O/2,L=E/2-y[p]/2-1,C=h(f[v],L),P=h(f[A],L),D=E-y[p]-P,M=E/2-y[p]/2+z,$=g(C,M,D),B=!a.arrow&&null!=b(o)&&M!==$&&r.reference[p]/2-(M<C?C:P)-y[p]/2<0,H=B?M<C?M-C:M-D:0;return{[m]:d[m]+H,data:{[m]:$,centerOffset:M-$-H,...B&&{alignmentOffset:H}},reset:B}}}))({element:i}));const{x:a,y:c,middlewareData:u,placement:f}=await((t,e,n)=>{const i=new Map,o=null!=n?n:{},r={...vt,...o.platform,_c:i};return(async(t,e,n)=>{const{placement:i="bottom",strategy:o="absolute",middleware:r=[],platform:s}=n,l=s.detectOverflow?s:{...s,detectOverflow:D},a=await(null==s.isRTL?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:o}),{x:u,y:f}=P(c,i,a),h=i,d=0;const m={};for(let n=0;n<r.length;n++){const p=r[n];if(!p)continue;const{name:y,fn:w}=p,{x:g,y:x,data:v,reset:b}=await w({x:u,y:f,initialPlacement:i,placement:h,strategy:o,middlewareData:m,rects:c,platform:l,elements:{reference:t,floating:e}});u=null!=g?g:u,f=null!=x?x:f,m[y]={...m[y],...v},b&&d<50&&(d++,"object"==typeof b&&(b.placement&&(h=b.placement),b.rects&&(c=!0===b.rects?await s.getElementRects({reference:t,floating:e,strategy:o}):b.rects),({x:u,y:f}=P(c,h,a))),n=-1)}return{x:u,y:f,placement:h,strategy:o,middlewareData:m}})(t,e,{...o,platform:r})})(n,e,{placement:o,middleware:t,strategy:"fixed"});Object.assign(e.style,{left:`${a}px`,top:`${c}px`,visibility:"visible"}),i&&((null===(r=u.arrow)||void 0===r?void 0:r.x)?Object.assign(i.style,{left:`${u.arrow.x}px`,top:"bottom"===f?-i.offsetHeight/2+"px":"",bottom:"top"===f?-i.offsetHeight/2+"px":""}):(null===(s=u.arrow)||void 0===s?void 0:s.y)&&Object.assign(i.style,{left:"right"===f?-i.offsetWidth/2+"px":"",right:"left"===f?-i.offsetWidth/2+"px":"",top:`${u.arrow.y}px`}))}},Rt=new Set;let Ot=null;class Ft{constructor(t,e){this.setState=t.setState,this.getState=t.getState,this.renderProps=l(e)}setRenderProp(t,e){this.renderProps[t]=e}getRenderProp(t){return this.renderProps[t]}}const Et={required:[c],optional:[u,f,a]};class zt extends Ft{constructor(t){super(t,Et),this.hasFocusIn=!1,this.hasMouseIn=!1,this.isHiddenForCurrentVisit=!1,this.setTooltipElementRef=t=>{this.tooltipElement=t,this.tooltipElement&&this.addListeners(this.tooltipElement)},this.hideTooltipByEscape=t=>{"Escape"===t.key&&(t.stopPropagation(),t.preventDefault(),this.hideTooltip())},this.handleMouseEnter=()=>{const t=this.isNewVisit();this.hasMouseIn=!0,t&&(this.isHiddenForCurrentVisit=!1),this.showOrHideTooltip()},this.handleMouseLeave=()=>{this.hasMouseIn=!1,this.resetHideFlag(),this.showOrHideTooltip()},this.handleFocusIn=()=>{const t=this.isNewVisit();this.hasFocusIn=!0,t&&(this.isHiddenForCurrentVisit=!1),this.showOrHideTooltip()},this.handleFocusOut=()=>{this.hasFocusIn=!1,this.resetHideFlag(),this.showOrHideTooltip()}}componentWillLoad(t){this.watchLabel(t.label),this.watchAlign(t.align),this.watchBadgeText(t.badgeText),this.watchId(t.id)}watchLabel(t){c.apply(t||void 0,(t=>{this.setRenderProp("label",t)}))}watchAlign(t){u.apply(t,(t=>{this.setRenderProp("align",t)}))}watchBadgeText(t){f.apply(t,(t=>{this.setRenderProp("badgeText",t)}))}watchId(t){a.apply(t,(t=>{this.setRenderProp("id",t)}))}initContext(t){this.previousSibling=t}syncListeners(t,e,n=!1){t&&this.removeListeners(t),e&&(n&&(this.previousSibling=e),this.removeListeners(e),this.addListeners(e))}handleEventListeners(t){this.syncListeners(this.previousSibling,t.previousElementSibling,!0)}hideTooltip(){this.isHiddenForCurrentVisit=!0,this.tooltipElement&&(function(t){if(Rt.delete(t)&&Ot===t){Ot=null;for(const t of Rt)Ot=t;Ot&&Ot.style.setProperty("z-index","1000")}}(this.tooltipElement),n(),this.tooltipElement.classList.remove("show"),this.tooltipElement.classList.add("hide"),this.tooltipElement.addEventListener("animationend",(()=>{var t;(null===(t=this.tooltipElement)||void 0===t?void 0:t.classList.contains("hide"))&&this.tooltipElement.style.removeProperty("display")}),{once:!0}),this.cleanupAutoPositioning&&(this.cleanupAutoPositioning(),this.cleanupAutoPositioning=void 0)),e().removeEventListener("keydown",this.hideTooltipByEscape)}destroy(){clearTimeout(this.overFocusTimeout),this.previousSibling&&(this.removeListeners(this.previousSibling),this.previousSibling=void 0),this.tooltipElement&&this.removeListeners(this.tooltipElement),this.cleanupAutoPositioning&&(this.cleanupAutoPositioning(),this.cleanupAutoPositioning=void 0),e().removeEventListener("keydown",this.hideTooltipByEscape)}isNewVisit(){return!this.hasMouseIn&&!this.hasFocusIn}resetHideFlag(){this.isNewVisit()&&(this.isHiddenForCurrentVisit=!1)}async alignTooltip(){this.tooltipElement&&this.previousSibling&&await kt({align:this.getRenderProp("align"),arrowElement:this.tooltipElement.querySelector(".kol-tooltip__arrow"),floatingElement:this.tooltipElement,referenceElement:this.previousSibling})}showTooltip(){var t;!this.isHiddenForCurrentVisit&&this.previousSibling&&this.tooltipElement&&(Ot!==(t=this.tooltipElement)&&(Ot&&Ot.style.setProperty("z-index","999"),Rt.delete(t),Rt.add(t),t.style.setProperty("z-index","1000"),Ot=t),i(),this.tooltipElement.classList.remove("hide"),this.tooltipElement.classList.add("show"),this.tooltipElement.style.setProperty("display","block"),e().addEventListener("keydown",this.hideTooltipByEscape),this.cleanupAutoPositioning=At(this.previousSibling,this.tooltipElement,(()=>{this.alignTooltip()})))}showOrHideTooltip(){clearTimeout(this.overFocusTimeout),this.overFocusTimeout=setTimeout((()=>{this.hasMouseIn||this.hasFocusIn?this.showTooltip():this.hideTooltip()}),300)}addListeners(t){t.addEventListener("mouseover",this.handleMouseEnter),t.addEventListener("mouseout",this.handleMouseLeave),t.addEventListener("focusin",this.handleFocusIn),t.addEventListener("focusout",this.handleFocusOut)}removeListeners(t){t.removeEventListener("mouseover",this.handleMouseEnter),t.removeEventListener("mouseout",this.handleMouseLeave),t.removeEventListener("focusin",this.handleFocusIn),t.removeEventListener("focusout",this.handleFocusOut)}}export{Ft as B,zt as T,u as a,kt as b,At as c}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{a as t}from"./dev.utils.js";import"./bem-registry.js";import{c as e,n as r,o as i,b as a,i as h}from"./props-from-config.js";import{B as n}from"./behavior.js";import{t as o}from"./i18n.js";const s=e("hasCounter",!1,r),c=e("maxLength",void 0,i,(t=>t>=0)),m=["hard","soft"],u=e("maxLengthBehavior","hard",(function(t){const e=a(t);if(h(e,m))return e;throw new Error(`Invalid max length behavior: ${e}`)})),g={optional:[s,c,u]},l=(t,e,r)=>{if("number"!=typeof e)return o("kol-character-counter-current",{placeholders:{current:String(r)}});if("soft"===t){const t=e-r;return t<0?o("kol-character-limit-exceeded",{placeholders:{over:String(Math.abs(t))}}):o("kol-character-limit-remaining",{placeholders:{remaining:String(t)}})}return o("kol-character-counter-current-of-max-aria",{placeholders:{current:String(r),max:String(e)}})},x=(t,e,r)=>"hard"===t&&"number"==typeof e&&r>=e?o("kol-character-counter-max-aria"):"";class d extends n{constructor(t){super(t,g),this.reannounceToggle=!1,this.setVisualRef=t=>{this.visualSpan=t},this.setAriaRef=t=>{this.ariaSpan=t},this.handleKeyDown=(t,e)=>{const{maxLength:r,maxLengthBehavior:i}=this.getLimit();"hard"!==i||"number"!=typeof r||e<r||(t=>1===t.key.length&&!t.ctrlKey&&!t.metaKey&&!t.altKey)(t)&&this.retriggerAria(e)}}componentWillLoad(t){this.watchHasCounter(t.hasCounter),this.watchMaxLength(t.maxLength),this.watchMaxLengthBehavior(t.maxLengthBehavior)}watchHasCounter(t){s.apply(t,(t=>this.setRenderProp("hasCounter",t)))}watchMaxLength(t){c.apply(t,(t=>this.setRenderProp("maxLength",t)))}watchMaxLengthBehavior(t){u.apply(t,(t=>this.setRenderProp("maxLengthBehavior",t)))}hasCounter(){return!0===this.getRenderProp("hasCounter")}hasSoftLimit(){const{maxLength:t,maxLengthBehavior:e}=this.getLimit();return"number"==typeof t&&"soft"===e}getMaxLengthAttribute(){const{maxLength:t,maxLengthBehavior:e}=this.getLimit();return"hard"===e?t:void 0}getCounterProps(){if(!this.hasCounter())return;const{maxLength:t,maxLengthBehavior:e}=this.getLimit();return{maxLength:t,maxLengthBehavior:e,visualRef:this.setVisualRef,ariaRef:this.setAriaRef}}getCharacterLimitHintId(e){return"number"!=typeof this.getRenderProp("maxLength")||this.hasCounter()?void 0:t(e,"character-limit-hint")}update(t){const e=this.getLimit();this.updateVisual(t,e),clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((()=>this.updateAria(t,e)),1e3)}updateImmediate(t){const e=this.getLimit();this.updateVisual(t,e),clearTimeout(this.debounceTimer),this.updateAria(t,e)}retriggerAria(t){if(!this.ariaSpan)return;const e=this.getLimit();clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((()=>this.updateAria(t,e,!0)),1e3)}destroy(){clearTimeout(this.debounceTimer)}getLimit(){return{maxLength:this.getRenderProp("maxLength"),maxLengthBehavior:this.getRenderProp("maxLengthBehavior")}}updateVisual(t,{maxLength:e,maxLengthBehavior:r}){this.visualSpan&&(this.visualSpan.innerText=((t,e,r)=>{if("number"!=typeof e)return o("kol-character-counter-current",{placeholders:{current:String(r)}});if("soft"===t){const t=e-r;return t<0?o("kol-character-limit-exceeded",{placeholders:{over:String(Math.abs(t))}}):o("kol-character-limit-remaining",{placeholders:{remaining:String(t)}})}return o("kol-character-counter-current-of-max",{placeholders:{current:String(r),max:String(e)}})})(r,e,t),this.visualSpan.classList.toggle("kol-form-field__counter--exceeded","soft"===r&&"number"==typeof e&&t>e))}updateAria(t,{maxLength:e,maxLengthBehavior:r},i=!1){if(!this.ariaSpan)return;let a=[l(r,e,t),x(r,e,t)].filter(Boolean).join(" ");i&&(this.reannounceToggle=!this.reannounceToggle,this.reannounceToggle&&(a+=" ")),this.ariaSpan.innerText=a}}export{d as C}
4
+ import{a as t}from"./dev.utils.js";import"./bem-registry.js";import{c as e,n as r,m as i,b as a,i as h}from"./props-from-config.js";import{B as n}from"./behavior.js";import{t as o}from"./i18n.js";const s=e("hasCounter",!1,r),c=e("maxLength",void 0,i,(t=>t>=0)),m=["hard","soft"],u=e("maxLengthBehavior","hard",(function(t){const e=a(t);if(h(e,m))return e;throw new Error(`Invalid max length behavior: ${e}`)})),g={optional:[s,u,c]},l=(t,e,r)=>{if("number"!=typeof e)return o("kol-character-counter-current",{placeholders:{current:String(r)}});if("soft"===t){const t=e-r;return t<0?o("kol-character-limit-exceeded",{placeholders:{over:String(Math.abs(t))}}):o("kol-character-limit-remaining",{placeholders:{remaining:String(t)}})}return o("kol-character-counter-current-of-max-aria",{placeholders:{current:String(r),max:String(e)}})},x=(t,e,r)=>"hard"===t&&"number"==typeof e&&r>=e?o("kol-character-counter-max-aria"):"";class d extends n{constructor(t){super(t,g),this.reannounceToggle=!1,this.setVisualRef=t=>{this.visualSpan=t},this.setAriaRef=t=>{this.ariaSpan=t},this.handleKeyDown=(t,e)=>{const{maxLength:r,maxLengthBehavior:i}=this.getLimit();"hard"!==i||"number"!=typeof r||e<r||(t=>1===t.key.length&&!t.ctrlKey&&!t.metaKey&&!t.altKey)(t)&&this.retriggerAria(e)}}componentWillLoad(t){this.watchHasCounter(t.hasCounter),this.watchMaxLength(t.maxLength),this.watchMaxLengthBehavior(t.maxLengthBehavior)}watchHasCounter(t){s.apply(t,(t=>this.setRenderProp("hasCounter",t)))}watchMaxLength(t){c.apply(t,(t=>this.setRenderProp("maxLength",t)))}watchMaxLengthBehavior(t){u.apply(t,(t=>this.setRenderProp("maxLengthBehavior",t)))}hasCounter(){return!0===this.getRenderProp("hasCounter")}hasSoftLimit(){const{maxLength:t,maxLengthBehavior:e}=this.getLimit();return"number"==typeof t&&"soft"===e}getMaxLengthAttribute(){const{maxLength:t,maxLengthBehavior:e}=this.getLimit();return"hard"===e?t:void 0}getCounterProps(){if(!this.hasCounter())return;const{maxLength:t,maxLengthBehavior:e}=this.getLimit();return{maxLength:t,maxLengthBehavior:e,visualRef:this.setVisualRef,ariaRef:this.setAriaRef}}getCharacterLimitHintId(e){return"number"!=typeof this.getRenderProp("maxLength")||this.hasCounter()?void 0:t(e,"character-limit-hint")}update(t){const e=this.getLimit();this.updateVisual(t,e),clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((()=>this.updateAria(t,e)),1e3)}updateImmediate(t){const e=this.getLimit();this.updateVisual(t,e),clearTimeout(this.debounceTimer),this.updateAria(t,e)}retriggerAria(t){if(!this.ariaSpan)return;const e=this.getLimit();clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((()=>this.updateAria(t,e,!0)),1e3)}destroy(){clearTimeout(this.debounceTimer)}getLimit(){return{maxLength:this.getRenderProp("maxLength"),maxLengthBehavior:this.getRenderProp("maxLengthBehavior")}}updateVisual(t,{maxLength:e,maxLengthBehavior:r}){this.visualSpan&&(this.visualSpan.innerText=((t,e,r)=>{if("number"!=typeof e)return o("kol-character-counter-current",{placeholders:{current:String(r)}});if("soft"===t){const t=e-r;return t<0?o("kol-character-limit-exceeded",{placeholders:{over:String(Math.abs(t))}}):o("kol-character-limit-remaining",{placeholders:{remaining:String(t)}})}return o("kol-character-counter-current-of-max",{placeholders:{current:String(r),max:String(e)}})})(r,e,t),this.visualSpan.classList.toggle("kol-form-field__counter--exceeded","soft"===r&&"number"==typeof e&&t>e))}updateAria(t,{maxLength:e,maxLengthBehavior:r},i=!1){if(!this.ariaSpan)return;let a=[l(r,e,t),x(r,e,t)].filter(Boolean).join(" ");i&&(this.reannounceToggle=!this.reannounceToggle,this.reannounceToggle&&(a+=" ")),this.ariaSpan.innerText=a}}export{d as C}
@@ -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 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"./component8.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}
4
+ import{g as t}from"./bootstrap.js";import{F as e,g as s,m as i}from"./bem-registry.js";import{c as o,b as n}from"./props-from-config.js";import{n as a}from"./component8.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}