@public-ui/components 3.0.7-rc.0 → 4.0.0-alpha.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 (494) hide show
  1. package/custom-elements.json +1 -1
  2. package/dist/cjs/{Alert-pYM9xL1B.js → Alert-DDA66DVu.js} +1 -1
  3. package/dist/cjs/Alert-DDA66DVu.js.map +1 -0
  4. package/dist/cjs/{Collapsible-CEcUGOI1.js → Collapsible-IhYdCplx.js} +1 -1
  5. package/dist/cjs/{Collapsible-CEcUGOI1.js.map → Collapsible-IhYdCplx.js.map} +1 -1
  6. package/dist/cjs/{CustomSuggestionsToggle-CPk5IOdw.js → CustomSuggestionsToggle-CeGKydyw.js} +1 -1
  7. package/dist/cjs/{CustomSuggestionsToggle-CPk5IOdw.js.map → CustomSuggestionsToggle-CeGKydyw.js.map} +1 -1
  8. package/dist/cjs/FieldControlStateWrapper-DPxapC_D.js +4 -0
  9. package/dist/cjs/FieldControlStateWrapper-DPxapC_D.js.map +1 -0
  10. package/dist/cjs/FormFieldStateWrapper-C2VTSu-i.js +4 -0
  11. package/dist/cjs/FormFieldStateWrapper-C2VTSu-i.js.map +1 -0
  12. package/dist/cjs/{Heading-CPcp0Wr1.js → Heading-DJ48CpuI.js} +1 -1
  13. package/dist/cjs/{Heading-CPcp0Wr1.js.map → Heading-DJ48CpuI.js.map} +1 -1
  14. package/dist/cjs/{Icon-B8rPDYT-.js → Icon-D6G0_09j.js} +1 -1
  15. package/dist/cjs/{Icon-B8rPDYT-.js.map → Icon-D6G0_09j.js.map} +1 -1
  16. package/dist/cjs/Input-BRmqCQyF.js +4 -0
  17. package/dist/cjs/{Input-CMtYrIiX.js.map → Input-BRmqCQyF.js.map} +1 -1
  18. package/dist/cjs/{InputStateWrapper-CyxEYc7X.js → InputStateWrapper-BBi90S8D.js} +1 -1
  19. package/dist/cjs/{InputStateWrapper-CyxEYc7X.js.map → InputStateWrapper-BBi90S8D.js.map} +1 -1
  20. package/dist/cjs/{InternalUnderlinedBadgeText-6WeC6ukm.js → InternalUnderlinedBadgeText-D0tClEJo.js} +1 -1
  21. package/dist/cjs/{InternalUnderlinedBadgeText-6WeC6ukm.js.map → InternalUnderlinedBadgeText-D0tClEJo.js.map} +1 -1
  22. package/dist/cjs/{Span-CSTnGgMo.js → Span-BZT0Xgoj.js} +1 -1
  23. package/dist/cjs/{Span-CSTnGgMo.js.map → Span-BZT0Xgoj.js.map} +1 -1
  24. package/dist/cjs/{app-globals-EBS1Rxmp.js → app-globals-CprMO-cF.js} +1 -1
  25. package/dist/cjs/{app-globals-EBS1Rxmp.js.map → app-globals-CprMO-cF.js.map} +1 -1
  26. package/dist/cjs/{controller-p8a-m8p9.js → controller-BY1lNpWb.js} +1 -1
  27. package/dist/cjs/{controller-p8a-m8p9.js.map → controller-BY1lNpWb.js.map} +1 -1
  28. package/dist/cjs/{controller-h186ZoKi.js → controller-C36y36pM.js} +1 -1
  29. package/dist/cjs/{controller-h186ZoKi.js.map → controller-C36y36pM.js.map} +1 -1
  30. package/dist/cjs/{controller-dziW0eTQ.js → controller-CygpdBUj.js} +1 -1
  31. package/dist/cjs/{controller-dziW0eTQ.js.map → controller-CygpdBUj.js.map} +1 -1
  32. package/dist/cjs/{controller-icon-flui-j3P.js → controller-icon-CdU193q2.js} +1 -1
  33. package/dist/cjs/{controller-icon-flui-j3P.js.map → controller-icon-CdU193q2.js.map} +1 -1
  34. package/dist/cjs/{dev.utils-NQv4Or1w.js → dev.utils-BMH6oSjV.js} +1 -1
  35. package/dist/cjs/{dev.utils-NQv4Or1w.js.map → dev.utils-BMH6oSjV.js.map} +1 -1
  36. package/dist/cjs/{devtools-DJ5Gsvbm.js → devtools-BI89G7wy.js} +1 -1
  37. package/dist/cjs/{devtools-DJ5Gsvbm.js.map → devtools-BI89G7wy.js.map} +1 -1
  38. package/dist/cjs/index-DBmXlvaP.js +4 -0
  39. package/dist/cjs/index-DBmXlvaP.js.map +1 -0
  40. package/dist/cjs/index.cjs.js +1 -1
  41. package/dist/cjs/index.cjs.js.map +1 -1
  42. package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
  43. package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
  44. package/dist/cjs/kol-alert-wc.cjs.entry.js +1 -1
  45. package/dist/cjs/kol-alert.cjs.entry.js +1 -1
  46. package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
  47. package/dist/cjs/kol-avatar.cjs.entry.js +1 -1
  48. package/dist/cjs/kol-badge.cjs.entry.js +1 -1
  49. package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
  50. package/dist/cjs/kol-breadcrumb.entry.cjs.js.map +1 -1
  51. package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
  52. package/dist/cjs/kol-button-link.entry.cjs.js.map +1 -1
  53. package/dist/cjs/kol-button-wc.cjs.entry.js +1 -1
  54. package/dist/cjs/kol-button-wc.entry.cjs.js.map +1 -1
  55. package/dist/cjs/kol-button.cjs.entry.js +1 -1
  56. package/dist/cjs/kol-card-wc.cjs.entry.js +1 -1
  57. package/dist/cjs/kol-card.cjs.entry.js +1 -1
  58. package/dist/cjs/kol-combobox.cjs.entry.js +1 -1
  59. package/dist/cjs/kol-details.cjs.entry.js +1 -1
  60. package/dist/cjs/kol-drawer.cjs.entry.js +1 -1
  61. package/dist/cjs/kol-drawer.entry.cjs.js.map +1 -1
  62. package/dist/cjs/kol-form.cjs.entry.js +1 -1
  63. package/dist/cjs/kol-form.entry.cjs.js.map +1 -1
  64. package/dist/cjs/kol-heading.cjs.entry.js +1 -1
  65. package/dist/cjs/kol-icon.cjs.entry.js +1 -1
  66. package/dist/cjs/kol-icon.entry.cjs.js.map +1 -1
  67. package/dist/cjs/kol-image.cjs.entry.js +1 -1
  68. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  69. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  70. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  71. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  72. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  73. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  74. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  75. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  76. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  77. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  78. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  79. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  80. package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
  81. package/dist/cjs/kol-link-wc.entry.cjs.js.map +1 -1
  82. package/dist/cjs/kol-link.cjs.entry.js +1 -1
  83. package/dist/cjs/kol-link.entry.cjs.js.map +1 -1
  84. package/dist/cjs/kol-modal.cjs.entry.js +1 -1
  85. package/dist/cjs/kol-modal.entry.cjs.js.map +1 -1
  86. package/dist/cjs/kol-nav.cjs.entry.js +1 -1
  87. package/dist/cjs/kol-nav.entry.cjs.js.map +1 -1
  88. package/dist/cjs/kol-pagination-wc.cjs.entry.js +1 -1
  89. package/dist/cjs/kol-pagination-wc.entry.cjs.js.map +1 -1
  90. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  91. package/dist/cjs/kol-popover-button-wc.cjs.entry.js +1 -1
  92. package/dist/cjs/kol-popover-button.cjs.entry.js +1 -1
  93. package/dist/cjs/kol-popover-wc.cjs.entry.js +1 -1
  94. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  95. package/dist/cjs/kol-quote.cjs.entry.js +1 -1
  96. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  97. package/dist/cjs/kol-single-select.cjs.entry.js +1 -1
  98. package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
  99. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  100. package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
  101. package/dist/cjs/kol-table-settings-wc.cjs.entry.js +1 -1
  102. package/dist/cjs/kol-table-stateful.cjs.entry.js +1 -1
  103. package/dist/cjs/kol-table-stateless-wc.cjs.entry.js +1 -1
  104. package/dist/cjs/kol-table-stateless.cjs.entry.js +1 -1
  105. package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
  106. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  107. package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
  108. package/dist/cjs/kol-toast-container.entry.cjs.js.map +1 -1
  109. package/dist/cjs/kol-toolbar.cjs.entry.js +1 -1
  110. package/dist/cjs/kol-tooltip-wc.cjs.entry.js +1 -1
  111. package/dist/cjs/kol-tooltip-wc.entry.cjs.js.map +1 -1
  112. package/dist/cjs/kol-tree-item-wc.cjs.entry.js +1 -1
  113. package/dist/cjs/kol-tree-item.cjs.entry.js +1 -1
  114. package/dist/cjs/kol-tree-wc.cjs.entry.js +1 -1
  115. package/dist/cjs/kol-tree.cjs.entry.js +1 -1
  116. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  117. package/dist/cjs/kolibri.cjs.js +1 -1
  118. package/dist/cjs/loader.cjs.js +1 -1
  119. package/dist/cjs/test-component.cjs.entry.js +1 -1
  120. package/dist/cjs/tooltip-open-tracking-Ba0udJRU.js +4 -0
  121. package/dist/cjs/tooltip-open-tracking-Ba0udJRU.js.map +1 -0
  122. package/dist/components/Alert.js +1 -1
  123. package/dist/components/Alert.js.map +1 -1
  124. package/dist/components/FieldControlStateWrapper.js +1 -1
  125. package/dist/components/FieldControlStateWrapper.js.map +1 -1
  126. package/dist/components/controller2.js +1 -1
  127. package/dist/components/controller2.js.map +1 -1
  128. package/dist/components/index.js +1 -1
  129. package/dist/components/index.js.map +1 -1
  130. package/dist/components/kol-accordion.js +1 -1
  131. package/dist/components/kol-breadcrumb.js +1 -1
  132. package/dist/components/kol-breadcrumb.js.map +1 -1
  133. package/dist/components/kol-button-link.js +1 -1
  134. package/dist/components/kol-button-link.js.map +1 -1
  135. package/dist/components/kol-button-wc.js +1 -1
  136. package/dist/components/kol-button-wc.js.map +1 -1
  137. package/dist/components/kol-card-wc.js +1 -1
  138. package/dist/components/kol-card.js +1 -1
  139. package/dist/components/kol-combobox.js +1 -1
  140. package/dist/components/kol-details.js +1 -1
  141. package/dist/components/kol-drawer.js +1 -1
  142. package/dist/components/kol-drawer.js.map +1 -1
  143. package/dist/components/kol-form.js +1 -1
  144. package/dist/components/kol-form.js.map +1 -1
  145. package/dist/components/kol-heading.js +1 -1
  146. package/dist/components/kol-icon.js +1 -1
  147. package/dist/components/kol-icon.js.map +1 -1
  148. package/dist/components/kol-image.js +1 -1
  149. package/dist/components/kol-input-checkbox.js +1 -1
  150. package/dist/components/kol-input-color.js +1 -1
  151. package/dist/components/kol-input-date.js +1 -1
  152. package/dist/components/kol-input-email.js +1 -1
  153. package/dist/components/kol-input-file.js +1 -1
  154. package/dist/components/kol-input-number.js +1 -1
  155. package/dist/components/kol-input-password.js +1 -1
  156. package/dist/components/kol-input-radio.js +1 -1
  157. package/dist/components/kol-input-range.js +1 -1
  158. package/dist/components/kol-input-text.js +1 -1
  159. package/dist/components/kol-kolibri.js +1 -1
  160. package/dist/components/kol-link-button.js +1 -1
  161. package/dist/components/kol-link-wc.js +1 -1
  162. package/dist/components/kol-link-wc.js.map +1 -1
  163. package/dist/components/kol-link.js +1 -1
  164. package/dist/components/kol-link.js.map +1 -1
  165. package/dist/components/kol-modal.js +1 -1
  166. package/dist/components/kol-modal.js.map +1 -1
  167. package/dist/components/kol-nav.js +1 -1
  168. package/dist/components/kol-nav.js.map +1 -1
  169. package/dist/components/kol-pagination-wc.js +1 -1
  170. package/dist/components/kol-pagination-wc.js.map +1 -1
  171. package/dist/components/kol-pagination.js +1 -1
  172. package/dist/components/kol-popover-button-wc.js +1 -1
  173. package/dist/components/kol-popover-button.js +1 -1
  174. package/dist/components/kol-popover-wc.js +1 -1
  175. package/dist/components/kol-progress.js +1 -1
  176. package/dist/components/kol-quote.js +1 -1
  177. package/dist/components/kol-select.js +1 -1
  178. package/dist/components/kol-single-select.js +1 -1
  179. package/dist/components/kol-skip-nav.js +1 -1
  180. package/dist/components/kol-spin.js +1 -1
  181. package/dist/components/kol-split-button.js +1 -1
  182. package/dist/components/kol-table-settings-wc.js +1 -1
  183. package/dist/components/kol-table-stateful.js +1 -1
  184. package/dist/components/kol-table-stateless-wc.js +1 -1
  185. package/dist/components/kol-table-stateless.js +1 -1
  186. package/dist/components/kol-tabs.js +1 -1
  187. package/dist/components/kol-textarea.js +1 -1
  188. package/dist/components/kol-toast-container.js +1 -1
  189. package/dist/components/kol-toast-container.js.map +1 -1
  190. package/dist/components/kol-toolbar.js +1 -1
  191. package/dist/components/kol-tooltip-wc.js +1 -1
  192. package/dist/components/kol-tooltip-wc.js.map +1 -1
  193. package/dist/components/kol-tree-item-wc.js +1 -1
  194. package/dist/components/kol-tree-item.js +1 -1
  195. package/dist/components/kol-tree-wc.js +1 -1
  196. package/dist/components/kol-tree.js +1 -1
  197. package/dist/components/kol-version.js +1 -1
  198. package/dist/components/tooltip-open-tracking.js +4 -0
  199. package/dist/components/tooltip-open-tracking.js.map +1 -0
  200. package/dist/esm/{Alert-qJPuIv8b.js → Alert-yh8R3coC.js} +1 -1
  201. package/dist/esm/Alert-yh8R3coC.js.map +1 -0
  202. package/dist/esm/{Collapsible-VwOBRTg-.js → Collapsible-DMNJjdc3.js} +1 -1
  203. package/dist/esm/{Collapsible-VwOBRTg-.js.map → Collapsible-DMNJjdc3.js.map} +1 -1
  204. package/dist/esm/{CustomSuggestionsToggle-BtYSYCn5.js → CustomSuggestionsToggle-_i-9Z6oo.js} +1 -1
  205. package/dist/{kolibri/CustomSuggestionsToggle-BtYSYCn5.js.map → esm/CustomSuggestionsToggle-_i-9Z6oo.js.map} +1 -1
  206. package/dist/esm/FieldControlStateWrapper-DxTxYvO0.js +4 -0
  207. package/dist/esm/FieldControlStateWrapper-DxTxYvO0.js.map +1 -0
  208. package/dist/esm/FormFieldStateWrapper-DRcnPo2o.js +4 -0
  209. package/dist/esm/FormFieldStateWrapper-DRcnPo2o.js.map +1 -0
  210. package/dist/esm/{Heading-CMd-jtC1.js → Heading-KhwFHPZb.js} +1 -1
  211. package/dist/{kolibri/Heading-CMd-jtC1.js.map → esm/Heading-KhwFHPZb.js.map} +1 -1
  212. package/dist/esm/Icon-BsRmEtCa.js +4 -0
  213. package/dist/esm/{Icon-BQRZwXjg.js.map → Icon-BsRmEtCa.js.map} +1 -1
  214. package/dist/esm/Input-BxElrU0N.js +4 -0
  215. package/dist/esm/{Input-BQNyXbdV.js.map → Input-BxElrU0N.js.map} +1 -1
  216. package/dist/esm/{InputStateWrapper-5DGko7Ry.js → InputStateWrapper-GJbSTDc8.js} +1 -1
  217. package/dist/esm/{InputStateWrapper-5DGko7Ry.js.map → InputStateWrapper-GJbSTDc8.js.map} +1 -1
  218. package/dist/esm/InternalUnderlinedBadgeText-BnPUgbKl.js +4 -0
  219. package/dist/esm/{InternalUnderlinedBadgeText-DeV9AANw.js.map → InternalUnderlinedBadgeText-BnPUgbKl.js.map} +1 -1
  220. package/dist/esm/{Span-9Jbefwfo.js → Span-5ZR0JDnP.js} +1 -1
  221. package/dist/esm/{Span-9Jbefwfo.js.map → Span-5ZR0JDnP.js.map} +1 -1
  222. package/dist/esm/{app-globals-BV7c4MN_.js → app-globals-COkPg4hl.js} +1 -1
  223. package/dist/esm/{app-globals-BV7c4MN_.js.map → app-globals-COkPg4hl.js.map} +1 -1
  224. package/dist/esm/{controller-BMZRH6Si.js → controller-BiC2tpL8.js} +1 -1
  225. package/dist/esm/{controller-BMZRH6Si.js.map → controller-BiC2tpL8.js.map} +1 -1
  226. package/dist/esm/{controller-C7skty3T.js → controller-CeGWU1Au.js} +1 -1
  227. package/dist/{kolibri/controller-C7skty3T.js.map → esm/controller-CeGWU1Au.js.map} +1 -1
  228. package/dist/esm/{controller-B_Bwl5E9.js → controller-HR9pimff.js} +1 -1
  229. package/dist/esm/{controller-B_Bwl5E9.js.map → controller-HR9pimff.js.map} +1 -1
  230. package/dist/esm/{controller-icon-DcftMfhw.js → controller-icon-DN63N3Rm.js} +1 -1
  231. package/dist/esm/{controller-icon-DcftMfhw.js.map → controller-icon-DN63N3Rm.js.map} +1 -1
  232. package/dist/esm/{dev.utils-D2H-D7vZ.js → dev.utils-0SH3ep_K.js} +1 -1
  233. package/dist/esm/{dev.utils-D2H-D7vZ.js.map → dev.utils-0SH3ep_K.js.map} +1 -1
  234. package/dist/esm/{devtools-Bv4R5yuw.js → devtools-Cg1RmbyV.js} +1 -1
  235. package/dist/esm/{devtools-Bv4R5yuw.js.map → devtools-Cg1RmbyV.js.map} +1 -1
  236. package/dist/esm/index-Dina3aff.js +4 -0
  237. package/dist/esm/index-Dina3aff.js.map +1 -0
  238. package/dist/esm/index.js +1 -1
  239. package/dist/esm/index.js.map +1 -1
  240. package/dist/esm/kol-abbr.entry.js +1 -1
  241. package/dist/esm/kol-accordion.entry.js +1 -1
  242. package/dist/esm/kol-alert-wc.entry.js +1 -1
  243. package/dist/esm/kol-alert.entry.js +1 -1
  244. package/dist/esm/kol-avatar-wc.entry.js +1 -1
  245. package/dist/esm/kol-avatar.entry.js +1 -1
  246. package/dist/esm/kol-badge.entry.js +1 -1
  247. package/dist/esm/kol-breadcrumb.entry.js +1 -1
  248. package/dist/esm/kol-breadcrumb.entry.js.map +1 -1
  249. package/dist/esm/kol-button-link.entry.js +1 -1
  250. package/dist/esm/kol-button-link.entry.js.map +1 -1
  251. package/dist/esm/kol-button-wc.entry.js +1 -1
  252. package/dist/esm/kol-button-wc.entry.js.map +1 -1
  253. package/dist/esm/kol-button.entry.js +1 -1
  254. package/dist/esm/kol-card-wc.entry.js +1 -1
  255. package/dist/esm/kol-card.entry.js +1 -1
  256. package/dist/esm/kol-combobox.entry.js +1 -1
  257. package/dist/esm/kol-details.entry.js +1 -1
  258. package/dist/esm/kol-drawer.entry.js +1 -1
  259. package/dist/esm/kol-drawer.entry.js.map +1 -1
  260. package/dist/esm/kol-form.entry.js +1 -1
  261. package/dist/esm/kol-form.entry.js.map +1 -1
  262. package/dist/esm/kol-heading.entry.js +1 -1
  263. package/dist/esm/kol-icon.entry.js +1 -1
  264. package/dist/esm/kol-icon.entry.js.map +1 -1
  265. package/dist/esm/kol-image.entry.js +1 -1
  266. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  267. package/dist/esm/kol-input-color.entry.js +1 -1
  268. package/dist/esm/kol-input-date.entry.js +1 -1
  269. package/dist/esm/kol-input-email.entry.js +1 -1
  270. package/dist/esm/kol-input-file.entry.js +1 -1
  271. package/dist/esm/kol-input-number.entry.js +1 -1
  272. package/dist/esm/kol-input-password.entry.js +1 -1
  273. package/dist/esm/kol-input-radio.entry.js +1 -1
  274. package/dist/esm/kol-input-range.entry.js +1 -1
  275. package/dist/esm/kol-input-text.entry.js +1 -1
  276. package/dist/esm/kol-kolibri.entry.js +1 -1
  277. package/dist/esm/kol-link-button.entry.js +1 -1
  278. package/dist/esm/kol-link-wc.entry.js +1 -1
  279. package/dist/esm/kol-link-wc.entry.js.map +1 -1
  280. package/dist/esm/kol-link.entry.js +1 -1
  281. package/dist/esm/kol-link.entry.js.map +1 -1
  282. package/dist/esm/kol-modal.entry.js +1 -1
  283. package/dist/esm/kol-modal.entry.js.map +1 -1
  284. package/dist/esm/kol-nav.entry.js +1 -1
  285. package/dist/esm/kol-nav.entry.js.map +1 -1
  286. package/dist/esm/kol-pagination-wc.entry.js +1 -1
  287. package/dist/esm/kol-pagination-wc.entry.js.map +1 -1
  288. package/dist/esm/kol-pagination.entry.js +1 -1
  289. package/dist/esm/kol-popover-button-wc.entry.js +1 -1
  290. package/dist/esm/kol-popover-button.entry.js +1 -1
  291. package/dist/esm/kol-popover-wc.entry.js +1 -1
  292. package/dist/esm/kol-progress.entry.js +1 -1
  293. package/dist/esm/kol-quote.entry.js +1 -1
  294. package/dist/esm/kol-select.entry.js +1 -1
  295. package/dist/esm/kol-single-select.entry.js +1 -1
  296. package/dist/esm/kol-skip-nav.entry.js +1 -1
  297. package/dist/esm/kol-spin.entry.js +1 -1
  298. package/dist/esm/kol-split-button.entry.js +1 -1
  299. package/dist/esm/kol-table-settings-wc.entry.js +1 -1
  300. package/dist/esm/kol-table-stateful.entry.js +1 -1
  301. package/dist/esm/kol-table-stateless-wc.entry.js +1 -1
  302. package/dist/esm/kol-table-stateless.entry.js +1 -1
  303. package/dist/esm/kol-tabs.entry.js +1 -1
  304. package/dist/esm/kol-textarea.entry.js +1 -1
  305. package/dist/esm/kol-toast-container.entry.js +1 -1
  306. package/dist/esm/kol-toast-container.entry.js.map +1 -1
  307. package/dist/esm/kol-toolbar.entry.js +1 -1
  308. package/dist/esm/kol-tooltip-wc.entry.js +1 -1
  309. package/dist/esm/kol-tooltip-wc.entry.js.map +1 -1
  310. package/dist/esm/kol-tree-item-wc.entry.js +1 -1
  311. package/dist/esm/kol-tree-item.entry.js +1 -1
  312. package/dist/esm/kol-tree-wc.entry.js +1 -1
  313. package/dist/esm/kol-tree.entry.js +1 -1
  314. package/dist/esm/kol-version.entry.js +1 -1
  315. package/dist/esm/kolibri.js +1 -1
  316. package/dist/esm/loader.js +1 -1
  317. package/dist/esm/test-component.entry.js +1 -1
  318. package/dist/esm/tooltip-open-tracking-rBbBgPWP.js +4 -0
  319. package/dist/esm/tooltip-open-tracking-rBbBgPWP.js.map +1 -0
  320. package/dist/kolibri/Alert-yh8R3coC.js +4 -0
  321. package/dist/kolibri/Alert-yh8R3coC.js.map +1 -0
  322. package/dist/kolibri/{Collapsible-VwOBRTg-.js → Collapsible-DMNJjdc3.js} +1 -1
  323. package/dist/kolibri/{Collapsible-VwOBRTg-.js.map → Collapsible-DMNJjdc3.js.map} +1 -1
  324. package/dist/kolibri/{CustomSuggestionsToggle-BtYSYCn5.js → CustomSuggestionsToggle-_i-9Z6oo.js} +1 -1
  325. package/dist/{esm/CustomSuggestionsToggle-BtYSYCn5.js.map → kolibri/CustomSuggestionsToggle-_i-9Z6oo.js.map} +1 -1
  326. package/dist/kolibri/FieldControlStateWrapper-DxTxYvO0.js +4 -0
  327. package/dist/kolibri/FieldControlStateWrapper-DxTxYvO0.js.map +1 -0
  328. package/dist/kolibri/FormFieldStateWrapper-DRcnPo2o.js +4 -0
  329. package/dist/kolibri/FormFieldStateWrapper-DRcnPo2o.js.map +1 -0
  330. package/dist/kolibri/Heading-KhwFHPZb.js +4 -0
  331. package/dist/{esm/Heading-CMd-jtC1.js.map → kolibri/Heading-KhwFHPZb.js.map} +1 -1
  332. package/dist/kolibri/Icon-BsRmEtCa.js +4 -0
  333. package/dist/kolibri/{Icon-BQRZwXjg.js.map → Icon-BsRmEtCa.js.map} +1 -1
  334. package/dist/kolibri/Input-BxElrU0N.js +4 -0
  335. package/dist/kolibri/{Input-BQNyXbdV.js.map → Input-BxElrU0N.js.map} +1 -1
  336. package/dist/kolibri/InputStateWrapper-GJbSTDc8.js +4 -0
  337. package/dist/kolibri/{InputStateWrapper-5DGko7Ry.js.map → InputStateWrapper-GJbSTDc8.js.map} +1 -1
  338. package/dist/kolibri/InternalUnderlinedBadgeText-BnPUgbKl.js +4 -0
  339. package/dist/kolibri/{InternalUnderlinedBadgeText-DeV9AANw.js.map → InternalUnderlinedBadgeText-BnPUgbKl.js.map} +1 -1
  340. package/dist/kolibri/Span-5ZR0JDnP.js +4 -0
  341. package/dist/kolibri/{Span-9Jbefwfo.js.map → Span-5ZR0JDnP.js.map} +1 -1
  342. package/dist/kolibri/app-globals-COkPg4hl.js +4 -0
  343. package/dist/kolibri/{app-globals-BV7c4MN_.js.map → app-globals-COkPg4hl.js.map} +1 -1
  344. package/dist/kolibri/{controller-BMZRH6Si.js → controller-BiC2tpL8.js} +1 -1
  345. package/dist/kolibri/{controller-BMZRH6Si.js.map → controller-BiC2tpL8.js.map} +1 -1
  346. package/dist/kolibri/{controller-C7skty3T.js → controller-CeGWU1Au.js} +1 -1
  347. package/dist/{esm/controller-C7skty3T.js.map → kolibri/controller-CeGWU1Au.js.map} +1 -1
  348. package/dist/kolibri/{controller-B_Bwl5E9.js → controller-HR9pimff.js} +1 -1
  349. package/dist/kolibri/{controller-B_Bwl5E9.js.map → controller-HR9pimff.js.map} +1 -1
  350. package/dist/kolibri/{controller-icon-DcftMfhw.js → controller-icon-DN63N3Rm.js} +1 -1
  351. package/dist/kolibri/{controller-icon-DcftMfhw.js.map → controller-icon-DN63N3Rm.js.map} +1 -1
  352. package/dist/kolibri/{dev.utils-D2H-D7vZ.js → dev.utils-0SH3ep_K.js} +1 -1
  353. package/dist/kolibri/{dev.utils-D2H-D7vZ.js.map → dev.utils-0SH3ep_K.js.map} +1 -1
  354. package/dist/kolibri/{devtools-Bv4R5yuw.js → devtools-Cg1RmbyV.js} +1 -1
  355. package/dist/kolibri/{devtools-Bv4R5yuw.js.map → devtools-Cg1RmbyV.js.map} +1 -1
  356. package/dist/kolibri/{index-DKFHNf-G.js → index-Dina3aff.js} +1 -1
  357. package/dist/kolibri/index-Dina3aff.js.map +1 -0
  358. package/dist/kolibri/index.esm.js +1 -1
  359. package/dist/kolibri/index.esm.js.map +1 -1
  360. package/dist/kolibri/kol-abbr.entry.js +1 -1
  361. package/dist/kolibri/kol-accordion.entry.js +1 -1
  362. package/dist/kolibri/kol-alert-wc.entry.js +1 -1
  363. package/dist/kolibri/kol-alert.entry.js +1 -1
  364. package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
  365. package/dist/kolibri/kol-avatar.entry.js +1 -1
  366. package/dist/kolibri/kol-badge.entry.js +1 -1
  367. package/dist/kolibri/kol-breadcrumb.entry.esm.js.map +1 -1
  368. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  369. package/dist/kolibri/kol-breadcrumb.entry.js.map +1 -1
  370. package/dist/kolibri/kol-button-link.entry.esm.js.map +1 -1
  371. package/dist/kolibri/kol-button-link.entry.js +1 -1
  372. package/dist/kolibri/kol-button-link.entry.js.map +1 -1
  373. package/dist/kolibri/kol-button-wc.entry.esm.js.map +1 -1
  374. package/dist/kolibri/kol-button-wc.entry.js +1 -1
  375. package/dist/kolibri/kol-button-wc.entry.js.map +1 -1
  376. package/dist/kolibri/kol-button.entry.js +1 -1
  377. package/dist/kolibri/kol-card-wc.entry.js +1 -1
  378. package/dist/kolibri/kol-card.entry.js +1 -1
  379. package/dist/kolibri/kol-combobox.entry.js +1 -1
  380. package/dist/kolibri/kol-details.entry.js +1 -1
  381. package/dist/kolibri/kol-drawer.entry.esm.js.map +1 -1
  382. package/dist/kolibri/kol-drawer.entry.js +1 -1
  383. package/dist/kolibri/kol-drawer.entry.js.map +1 -1
  384. package/dist/kolibri/kol-form.entry.esm.js.map +1 -1
  385. package/dist/kolibri/kol-form.entry.js +1 -1
  386. package/dist/kolibri/kol-form.entry.js.map +1 -1
  387. package/dist/kolibri/kol-heading.entry.js +1 -1
  388. package/dist/kolibri/kol-icon.entry.esm.js.map +1 -1
  389. package/dist/kolibri/kol-icon.entry.js +1 -1
  390. package/dist/kolibri/kol-icon.entry.js.map +1 -1
  391. package/dist/kolibri/kol-image.entry.js +1 -1
  392. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  393. package/dist/kolibri/kol-input-color.entry.js +1 -1
  394. package/dist/kolibri/kol-input-date.entry.js +1 -1
  395. package/dist/kolibri/kol-input-date.entry.js.map +1 -1
  396. package/dist/kolibri/kol-input-email.entry.js +1 -1
  397. package/dist/kolibri/kol-input-file.entry.js +1 -1
  398. package/dist/kolibri/kol-input-number.entry.js +1 -1
  399. package/dist/kolibri/kol-input-password.entry.js +1 -1
  400. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  401. package/dist/kolibri/kol-input-range.entry.js +1 -1
  402. package/dist/kolibri/kol-input-text.entry.js +1 -1
  403. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  404. package/dist/kolibri/kol-link-button.entry.js +1 -1
  405. package/dist/kolibri/kol-link-wc.entry.esm.js.map +1 -1
  406. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  407. package/dist/kolibri/kol-link-wc.entry.js.map +1 -1
  408. package/dist/kolibri/kol-link.entry.esm.js.map +1 -1
  409. package/dist/kolibri/kol-link.entry.js +1 -1
  410. package/dist/kolibri/kol-link.entry.js.map +1 -1
  411. package/dist/kolibri/kol-modal.entry.esm.js.map +1 -1
  412. package/dist/kolibri/kol-modal.entry.js +1 -1
  413. package/dist/kolibri/kol-modal.entry.js.map +1 -1
  414. package/dist/kolibri/kol-nav.entry.esm.js.map +1 -1
  415. package/dist/kolibri/kol-nav.entry.js +1 -1
  416. package/dist/kolibri/kol-nav.entry.js.map +1 -1
  417. package/dist/kolibri/kol-pagination-wc.entry.esm.js.map +1 -1
  418. package/dist/kolibri/kol-pagination-wc.entry.js +1 -1
  419. package/dist/kolibri/kol-pagination-wc.entry.js.map +1 -1
  420. package/dist/kolibri/kol-pagination.entry.js +1 -1
  421. package/dist/kolibri/kol-popover-button-wc.entry.js +1 -1
  422. package/dist/kolibri/kol-popover-button.entry.js +1 -1
  423. package/dist/kolibri/kol-popover-wc.entry.js +1 -1
  424. package/dist/kolibri/kol-progress.entry.js +1 -1
  425. package/dist/kolibri/kol-quote.entry.js +1 -1
  426. package/dist/kolibri/kol-select.entry.js +1 -1
  427. package/dist/kolibri/kol-single-select.entry.js +1 -1
  428. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  429. package/dist/kolibri/kol-spin.entry.js +1 -1
  430. package/dist/kolibri/kol-split-button.entry.js +1 -1
  431. package/dist/kolibri/kol-table-settings-wc.entry.js +1 -1
  432. package/dist/kolibri/kol-table-stateful.entry.js +1 -1
  433. package/dist/kolibri/kol-table-stateless-wc.entry.js +1 -1
  434. package/dist/kolibri/kol-table-stateless.entry.js +1 -1
  435. package/dist/kolibri/kol-tabs.entry.js +1 -1
  436. package/dist/kolibri/kol-textarea.entry.js +1 -1
  437. package/dist/kolibri/kol-toast-container.entry.esm.js.map +1 -1
  438. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  439. package/dist/kolibri/kol-toast-container.entry.js.map +1 -1
  440. package/dist/kolibri/kol-toolbar.entry.js +1 -1
  441. package/dist/kolibri/kol-tooltip-wc.entry.esm.js.map +1 -1
  442. package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
  443. package/dist/kolibri/kol-tooltip-wc.entry.js.map +1 -1
  444. package/dist/kolibri/kol-tree-item-wc.entry.js +1 -1
  445. package/dist/kolibri/kol-tree-item.entry.js +1 -1
  446. package/dist/kolibri/kol-tree-wc.entry.js +1 -1
  447. package/dist/kolibri/kol-tree.entry.js +1 -1
  448. package/dist/kolibri/kol-version.entry.js +1 -1
  449. package/dist/kolibri/kolibri.esm.js +1 -1
  450. package/dist/kolibri/test-component.entry.js +1 -1
  451. package/dist/kolibri/tooltip-open-tracking-rBbBgPWP.js +4 -0
  452. package/dist/kolibri/tooltip-open-tracking-rBbBgPWP.js.map +1 -0
  453. package/dist/types/components/button/component.d.ts +0 -1
  454. package/dist/types/components/drawer/shadow.d.ts +1 -1
  455. package/dist/types/components/link/component.d.ts +0 -1
  456. package/dist/types/components/nav/shadow.d.ts +3 -1
  457. package/dist/types/functional-components/FormFieldTooltip/FormFieldTooltip.d.ts +0 -1
  458. package/dist/types/index.d.ts +1 -0
  459. package/dist/types/schema/components/toaster.d.ts +3 -3
  460. package/dist/types/utils/tooltip-open-tracking.d.ts +4 -0
  461. package/doc/toaster.md +3 -3
  462. package/package.json +1 -1
  463. package/dist/cjs/Alert-pYM9xL1B.js.map +0 -1
  464. package/dist/cjs/FieldControlStateWrapper-CxSfV7UW.js +0 -4
  465. package/dist/cjs/FieldControlStateWrapper-CxSfV7UW.js.map +0 -1
  466. package/dist/cjs/FormFieldStateWrapper-CujxRl8G.js +0 -4
  467. package/dist/cjs/FormFieldStateWrapper-CujxRl8G.js.map +0 -1
  468. package/dist/cjs/Input-CMtYrIiX.js +0 -4
  469. package/dist/cjs/index-DHm-aTX3.js +0 -4
  470. package/dist/cjs/index-DHm-aTX3.js.map +0 -1
  471. package/dist/esm/Alert-qJPuIv8b.js.map +0 -1
  472. package/dist/esm/FieldControlStateWrapper-CIWPKSbC.js +0 -4
  473. package/dist/esm/FieldControlStateWrapper-CIWPKSbC.js.map +0 -1
  474. package/dist/esm/FormFieldStateWrapper-CKwM-DIl.js +0 -4
  475. package/dist/esm/FormFieldStateWrapper-CKwM-DIl.js.map +0 -1
  476. package/dist/esm/Icon-BQRZwXjg.js +0 -4
  477. package/dist/esm/Input-BQNyXbdV.js +0 -4
  478. package/dist/esm/InternalUnderlinedBadgeText-DeV9AANw.js +0 -4
  479. package/dist/esm/index-DKFHNf-G.js +0 -4
  480. package/dist/esm/index-DKFHNf-G.js.map +0 -1
  481. package/dist/kolibri/Alert-qJPuIv8b.js +0 -4
  482. package/dist/kolibri/Alert-qJPuIv8b.js.map +0 -1
  483. package/dist/kolibri/FieldControlStateWrapper-CIWPKSbC.js +0 -4
  484. package/dist/kolibri/FieldControlStateWrapper-CIWPKSbC.js.map +0 -1
  485. package/dist/kolibri/FormFieldStateWrapper-CKwM-DIl.js +0 -4
  486. package/dist/kolibri/FormFieldStateWrapper-CKwM-DIl.js.map +0 -1
  487. package/dist/kolibri/Heading-CMd-jtC1.js +0 -4
  488. package/dist/kolibri/Icon-BQRZwXjg.js +0 -4
  489. package/dist/kolibri/Input-BQNyXbdV.js +0 -4
  490. package/dist/kolibri/InputStateWrapper-5DGko7Ry.js +0 -4
  491. package/dist/kolibri/InternalUnderlinedBadgeText-DeV9AANw.js +0 -4
  492. package/dist/kolibri/Span-9Jbefwfo.js +0 -4
  493. package/dist/kolibri/app-globals-BV7c4MN_.js +0 -4
  494. package/dist/kolibri/index-DKFHNf-G.js.map +0 -1
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{i as KolPaginationWcTag}from"./component-names.js";const defaultStyleCss="@charset \"UTF-8\";\n/* forward the rem function */\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n}\n@layer kol-component {\n .kol-pagination {\n display: grid;\n gap: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n align-items: center;\n grid-template-columns: 1fr auto;\n }\n .kol-pagination__navigation-list {\n display: inline-flex;\n margin: 0;\n padding: 0;\n gap: 0.5em;\n flex-wrap: wrap;\n align-items: center;\n list-style: none;\n }\n .kol-pagination__separator:before {\n content: \"•••\";\n }\n}",KolPagination$1=proxyCustomElement(class extends HTMLElement{constructor(n){super(),!1!==n&&this.__registerHost(),this.__attachShadow(),this._boundaryCount=1,this._hasButtons=!0,this._pageSize=1,this._pageSizeOptions=[],this._siblingCount=1,this._tooltipAlign="top"}render(){return h(KolPaginationWcTag,{key:"14b17e953d67caaa9892271b9c19d40044558418",_boundaryCount:this._boundaryCount,_label:this._label,_customClass:this._customClass,_on:this._on,_hasButtons:this._hasButtons,_page:this._page,_pageSize:this._pageSize,_pageSizeOptions:this._pageSizeOptions,_siblingCount:this._siblingCount,_tooltipAlign:this._tooltipAlign,_max:this._max})}static get style(){return{default:defaultStyleCss}}},[289,"kol-pagination",{_boundaryCount:[2,"_boundary-count"],_customClass:[1,"_custom-class"],_label:[1],_hasButtons:[8,"_has-buttons"],_page:[2],_pageSize:[1026,"_page-size"],_pageSizeOptions:[1,"_page-size-options"],_on:[16],_siblingCount:[2,"_sibling-count"],_tooltipAlign:[1,"_tooltip-align"],_max:[2]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-pagination"].forEach(n=>{if("kol-pagination"===n)customElements.get(n)||customElements.define(n,KolPagination$1)})}const KolPagination=KolPagination$1,defineCustomElement=defineCustomElement$1;export{KolPagination,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{i as KolPaginationWcTag}from"./component-names.js";const defaultStyleCss="@charset \"UTF-8\";\n/* forward the rem function */\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n}\n@layer kol-component {\n .kol-pagination {\n display: grid;\n gap: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n align-items: center;\n grid-template-columns: 1fr auto;\n }\n .kol-pagination__navigation-list {\n display: inline-flex;\n margin: 0;\n padding: 0;\n gap: 0.5em;\n flex-wrap: wrap;\n align-items: center;\n list-style: none;\n }\n .kol-pagination__separator:before {\n content: \"•••\";\n }\n}",KolPagination$1=proxyCustomElement(class extends HTMLElement{constructor(n){super(),!1!==n&&this.__registerHost(),this.__attachShadow(),this._boundaryCount=1,this._hasButtons=!0,this._pageSize=1,this._pageSizeOptions=[],this._siblingCount=1,this._tooltipAlign="top"}render(){return h(KolPaginationWcTag,{key:"0b69912aa6d98d2db1a05f3ea1ae8ee6aa8f0623",_boundaryCount:this._boundaryCount,_label:this._label,_customClass:this._customClass,_on:this._on,_hasButtons:this._hasButtons,_page:this._page,_pageSize:this._pageSize,_pageSizeOptions:this._pageSizeOptions,_siblingCount:this._siblingCount,_tooltipAlign:this._tooltipAlign,_max:this._max})}static get style(){return{default:defaultStyleCss}}},[289,"kol-pagination",{_boundaryCount:[2,"_boundary-count"],_customClass:[1,"_custom-class"],_label:[1],_hasButtons:[8,"_has-buttons"],_page:[2],_pageSize:[1026,"_page-size"],_pageSizeOptions:[1,"_page-size-options"],_on:[16],_siblingCount:[2,"_sibling-count"],_tooltipAlign:[1,"_tooltip-align"],_max:[2]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-pagination"].forEach(n=>{if("kol-pagination"===n)customElements.get(n)||customElements.define(n,KolPagination$1)})}const KolPagination=KolPagination$1,defineCustomElement=defineCustomElement$1;export{KolPagination,defineCustomElement};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{a as alignFloatingElements,b as autoUpdate}from"./align-floating-elements.js";import{d as KolButtonWcTag}from"./component-names.js";import"./common.js";import{a as validateAlignment}from"./align.js";const validatePopoverAlign=(e,o)=>{validateAlignment(e,"_popoverAlign",o)},KolPopoverButton=proxyCustomElement(class extends HTMLElement{constructor(e){super(),!1!==e&&this.__registerHost(),this.state={_label:"",_popoverAlign:"bottom"},this.justClosed=!1,this.popoverOpen=!1,this._disabled=!1,this._hideLabel=!1,this._popoverAlign="bottom",this._tooltipAlign="top",this._type="button",this._variant="normal"}async hidePopover(){var e;null===(e=this.refPopover)||void 0===e||e.hidePopover()}handleBeforeToggle(e){var o;"closed"===e.newState?(this.justClosed=!0,setTimeout(()=>{this.justClosed=!1},10)):(this.refPopover&&(this.refPopover.style.visibility="hidden"),null===(o=this.refButton)||void 0===o||o.hideTooltip())}alignPopover(){this.refPopover&&this.refButton&&alignFloatingElements({align:this.state._popoverAlign,floatingElement:this.refPopover,referenceElement:this.refButton})}handleToggle(e){this.popoverOpen="open"===e.newState,this.popoverOpen?this.refPopover&&this.refButton&&(this.cleanupAutoPositioning=autoUpdate(this.refButton,this.refPopover,()=>{this.alignPopover()})):this.cleanupAutoPositioning&&(this.cleanupAutoPositioning(),this.cleanupAutoPositioning=void 0)}handleButtonClick(){var e;this.justClosed||null===(e=this.refPopover)||void 0===e||e.togglePopover()}componentDidRender(){var e,o;null===(e=this.refPopover)||void 0===e||e.addEventListener("toggle",this.handleToggle.bind(this)),null===(o=this.refPopover)||void 0===o||o.addEventListener("beforetoggle",this.handleBeforeToggle.bind(this))}disconnectedCallback(){var e,o,t;null===(e=this.refPopover)||void 0===e||e.removeEventListener("toggle",this.handleToggle.bind(this)),null===(o=this.refPopover)||void 0===o||o.removeEventListener("beforetoggle",this.handleBeforeToggle.bind(this)),null===(t=this.cleanupAutoPositioning)||void 0===t||t.call(this)}render(){return h("div",{key:"ed9bd3791a41c429effa8bba1fd4f835b26e7417",class:"kol-popover-button"},h(KolButtonWcTag,{key:"43ae7fc22399fd5d6aa526eb9c9402e877a71f3e",_accessKey:this._accessKey,"_aria-controls":"popover",_ariaControls:this._ariaControls,_ariaDescription:this._ariaDescription,_ariaExpanded:this.popoverOpen,_ariaHasPopup:"dialog",_ariaSelected:this._ariaSelected,_customClass:this._customClass,_disabled:this._disabled,_hideLabel:this._hideLabel,_icons:this._icons,_id:this._id,_label:this._label,_name:this._name,_on:this._on,_role:this._role,_shortKey:this._shortKey,_syncValueBySelector:this._syncValueBySelector,_tabIndex:this._tabIndex,_tooltipAlign:this._tooltipAlign,_type:this._type,_value:this._value,_buttonVariant:this._variant,"data-testid":"popover-button",class:"kol-popover-button__button",ref:e=>this.refButton=e,onClick:this.handleButtonClick.bind(this)},h("slot",{key:"4e312ac4d1c7e5695d78cd48feba9b3738a540a6",name:"expert",slot:"expert"})),h("div",{key:"c5dccff4d149aa043963ed1c81ba0f2391526a18",ref:e=>this.refPopover=e,"data-testid":"popover-content",popover:"auto",id:"popover",class:"kol-popover-button__popover"},h("slot",{key:"36f4ed8c4df5e3c80d6706ea3bdc440c77b987fc"})))}validatePopoverAlign(e){validatePopoverAlign(this,e)}componentWillLoad(){this.validatePopoverAlign(this._popoverAlign)}static get watchers(){return{_popoverAlign:["validatePopoverAlign"]}}},[260,"kol-popover-button-wc",{_accessKey:[1,"_access-key"],_ariaControls:[1,"_aria-controls"],_ariaDescription:[1,"_aria-description"],_ariaSelected:[4,"_aria-selected"],_customClass:[1,"_custom-class"],_disabled:[4],_hideLabel:[4,"_hide-label"],_icons:[1],_id:[1],_label:[1],_name:[1],_on:[16],_popoverAlign:[1,"_popover-align"],_role:[1],_shortKey:[1,"_short-key"],_syncValueBySelector:[1,"_sync-value-by-selector"],_tabIndex:[2,"_tab-index"],_tooltipAlign:[1,"_tooltip-align"],_type:[1],_value:[8],_variant:[1],state:[32],justClosed:[32],popoverOpen:[32],hidePopover:[64]},void 0,{_popoverAlign:["validatePopoverAlign"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-popover-button-wc"].forEach(e=>{if("kol-popover-button-wc"===e)customElements.get(e)||customElements.define(e,KolPopoverButton)})}const KolPopoverButtonWc=KolPopoverButton,defineCustomElement=defineCustomElement$1;export{KolPopoverButtonWc,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{a as alignFloatingElements,b as autoUpdate}from"./align-floating-elements.js";import{d as KolButtonWcTag}from"./component-names.js";import"./common.js";import{a as validateAlignment}from"./align.js";const validatePopoverAlign=(e,o)=>{validateAlignment(e,"_popoverAlign",o)},KolPopoverButton=proxyCustomElement(class extends HTMLElement{constructor(e){super(),!1!==e&&this.__registerHost(),this.state={_label:"",_popoverAlign:"bottom"},this.justClosed=!1,this.popoverOpen=!1,this._disabled=!1,this._hideLabel=!1,this._popoverAlign="bottom",this._tooltipAlign="top",this._type="button",this._variant="normal"}async hidePopover(){var e;null===(e=this.refPopover)||void 0===e||e.hidePopover()}handleBeforeToggle(e){var o;"closed"===e.newState?(this.justClosed=!0,setTimeout(()=>{this.justClosed=!1},10)):(this.refPopover&&(this.refPopover.style.visibility="hidden"),null===(o=this.refButton)||void 0===o||o.hideTooltip())}alignPopover(){this.refPopover&&this.refButton&&alignFloatingElements({align:this.state._popoverAlign,floatingElement:this.refPopover,referenceElement:this.refButton})}handleToggle(e){this.popoverOpen="open"===e.newState,this.popoverOpen?this.refPopover&&this.refButton&&(this.cleanupAutoPositioning=autoUpdate(this.refButton,this.refPopover,()=>{this.alignPopover()})):this.cleanupAutoPositioning&&(this.cleanupAutoPositioning(),this.cleanupAutoPositioning=void 0)}handleButtonClick(){var e;this.justClosed||null===(e=this.refPopover)||void 0===e||e.togglePopover()}componentDidRender(){var e,o;null===(e=this.refPopover)||void 0===e||e.addEventListener("toggle",this.handleToggle.bind(this)),null===(o=this.refPopover)||void 0===o||o.addEventListener("beforetoggle",this.handleBeforeToggle.bind(this))}disconnectedCallback(){var e,o,t;null===(e=this.refPopover)||void 0===e||e.removeEventListener("toggle",this.handleToggle.bind(this)),null===(o=this.refPopover)||void 0===o||o.removeEventListener("beforetoggle",this.handleBeforeToggle.bind(this)),null===(t=this.cleanupAutoPositioning)||void 0===t||t.call(this)}render(){return h("div",{key:"189f95dc5c7d15990e6d2903fc151bc89b850023",class:"kol-popover-button"},h(KolButtonWcTag,{key:"1f7953cbde3265b80f8ee6a6a6d86039a9b6fd61",_accessKey:this._accessKey,"_aria-controls":"popover",_ariaControls:this._ariaControls,_ariaDescription:this._ariaDescription,_ariaExpanded:this.popoverOpen,_ariaHasPopup:"dialog",_ariaSelected:this._ariaSelected,_customClass:this._customClass,_disabled:this._disabled,_hideLabel:this._hideLabel,_icons:this._icons,_id:this._id,_label:this._label,_name:this._name,_on:this._on,_role:this._role,_shortKey:this._shortKey,_syncValueBySelector:this._syncValueBySelector,_tabIndex:this._tabIndex,_tooltipAlign:this._tooltipAlign,_type:this._type,_value:this._value,_buttonVariant:this._variant,"data-testid":"popover-button",class:"kol-popover-button__button",ref:e=>this.refButton=e,onClick:this.handleButtonClick.bind(this)},h("slot",{key:"be0a9094a249e64b327e19ac0086f89566c2e258",name:"expert",slot:"expert"})),h("div",{key:"3de284cea084dff89ae462a286116bdc45e5c05c",ref:e=>this.refPopover=e,"data-testid":"popover-content",popover:"auto",id:"popover",class:"kol-popover-button__popover"},h("slot",{key:"8037d5890351fa0f66c6b9d811c6e284fb2a46d7"})))}validatePopoverAlign(e){validatePopoverAlign(this,e)}componentWillLoad(){this.validatePopoverAlign(this._popoverAlign)}static get watchers(){return{_popoverAlign:["validatePopoverAlign"]}}},[260,"kol-popover-button-wc",{_accessKey:[1,"_access-key"],_ariaControls:[1,"_aria-controls"],_ariaDescription:[1,"_aria-description"],_ariaSelected:[4,"_aria-selected"],_customClass:[1,"_custom-class"],_disabled:[4],_hideLabel:[4,"_hide-label"],_icons:[1],_id:[1],_label:[1],_name:[1],_on:[16],_popoverAlign:[1,"_popover-align"],_role:[1],_shortKey:[1,"_short-key"],_syncValueBySelector:[1,"_sync-value-by-selector"],_tabIndex:[2,"_tab-index"],_tooltipAlign:[1,"_tooltip-align"],_type:[1],_value:[8],_variant:[1],state:[32],justClosed:[32],popoverOpen:[32],hidePopover:[64]},void 0,{_popoverAlign:["validatePopoverAlign"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-popover-button-wc"].forEach(e=>{if("kol-popover-button-wc"===e)customElements.get(e)||customElements.define(e,KolPopoverButton)})}const KolPopoverButtonWc=KolPopoverButton,defineCustomElement=defineCustomElement$1;export{KolPopoverButtonWc,defineCustomElement};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{k as KolPopoverButtonWcTag}from"./component-names.js";const defaultStyleCss="@charset \"UTF-8\";\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n}\n@layer kol-component {\n :host {\n display: inline-block;\n }\n .kol-button {\n display: inline-flex;\n place-items: center;\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-align: center;\n text-decoration-line: none;\n }\n .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: \"​\";\n }\n .kol-button__text {\n width: 100%;\n margin: auto;\n }\n .kol-popover-button__button {\n display: inline-block;\n }\n .kol-popover-button__popover {\n margin: 0;\n padding: 0;\n border: 0;\n }\n}",KolPopoverButton$1=proxyCustomElement(class extends HTMLElement{constructor(n){super(),!1!==n&&this.__registerHost(),this.__attachShadow(),this.catchRef=n=>{this.ref=n},this._disabled=!1,this._hideLabel=!1,this._popoverAlign="bottom",this._tooltipAlign="top",this._type="button",this._variant="normal"}async hidePopover(){var n;null===(n=this.ref)||void 0===n||n.hidePopover()}render(){return h(KolPopoverButtonWcTag,{key:"874bfd4d3738aee7db007df7f1f072a312bda82b",ref:this.catchRef,_accessKey:this._accessKey,_ariaControls:this._ariaControls,_ariaDescription:this._ariaDescription,_ariaSelected:this._ariaSelected,_customClass:this._customClass,_disabled:this._disabled,_hideLabel:this._hideLabel,_icons:this._icons,_id:this._id,_label:this._label,_name:this._name,_on:this._on,_popoverAlign:this._popoverAlign,_shortKey:this._shortKey,_syncValueBySelector:this._syncValueBySelector,_tabIndex:this._tabIndex,_tooltipAlign:this._tooltipAlign,_type:this._type,_value:this._value,_variant:this._variant},h("slot",{key:"3e3353a2aa09a4ab53145811a9baaf69c6eb5fe7",name:"expert",slot:"expert"}),h("slot",{key:"ae349ddc431b20ba527dac3c30edf1ba9e61cb2d"}))}static get style(){return{default:defaultStyleCss}}},[289,"kol-popover-button",{_accessKey:[1,"_access-key"],_ariaControls:[1,"_aria-controls"],_ariaDescription:[1,"_aria-description"],_ariaSelected:[4,"_aria-selected"],_customClass:[1,"_custom-class"],_disabled:[4],_hideLabel:[4,"_hide-label"],_icons:[1],_id:[1],_label:[1],_name:[1],_on:[16],_popoverAlign:[1,"_popover-align"],_role:[1],_shortKey:[1,"_short-key"],_syncValueBySelector:[1,"_sync-value-by-selector"],_tabIndex:[2,"_tab-index"],_tooltipAlign:[1,"_tooltip-align"],_type:[1],_value:[8],_variant:[1],hidePopover:[64]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-popover-button"].forEach(n=>{if("kol-popover-button"===n)customElements.get(n)||customElements.define(n,KolPopoverButton$1)})}const KolPopoverButton=KolPopoverButton$1,defineCustomElement=defineCustomElement$1;export{KolPopoverButton,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{k as KolPopoverButtonWcTag}from"./component-names.js";const defaultStyleCss="@charset \"UTF-8\";\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n}\n@layer kol-component {\n :host {\n display: inline-block;\n }\n .kol-button {\n display: inline-flex;\n place-items: center;\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-align: center;\n text-decoration-line: none;\n }\n .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: \"​\";\n }\n .kol-button__text {\n width: 100%;\n margin: auto;\n }\n .kol-popover-button__button {\n display: inline-block;\n }\n .kol-popover-button__popover {\n margin: 0;\n padding: 0;\n border: 0;\n }\n}",KolPopoverButton$1=proxyCustomElement(class extends HTMLElement{constructor(n){super(),!1!==n&&this.__registerHost(),this.__attachShadow(),this.catchRef=n=>{this.ref=n},this._disabled=!1,this._hideLabel=!1,this._popoverAlign="bottom",this._tooltipAlign="top",this._type="button",this._variant="normal"}async hidePopover(){var n;null===(n=this.ref)||void 0===n||n.hidePopover()}render(){return h(KolPopoverButtonWcTag,{key:"3d9ceba2ba454ac2fc535ac743b0a12faa0785e5",ref:this.catchRef,_accessKey:this._accessKey,_ariaControls:this._ariaControls,_ariaDescription:this._ariaDescription,_ariaSelected:this._ariaSelected,_customClass:this._customClass,_disabled:this._disabled,_hideLabel:this._hideLabel,_icons:this._icons,_id:this._id,_label:this._label,_name:this._name,_on:this._on,_popoverAlign:this._popoverAlign,_shortKey:this._shortKey,_syncValueBySelector:this._syncValueBySelector,_tabIndex:this._tabIndex,_tooltipAlign:this._tooltipAlign,_type:this._type,_value:this._value,_variant:this._variant},h("slot",{key:"f9dd94cd3e288a23c035f82f7e551a243c6dd675",name:"expert",slot:"expert"}),h("slot",{key:"04e668416cb7a3692597ec1e1035f26a728214f1"}))}static get style(){return{default:defaultStyleCss}}},[289,"kol-popover-button",{_accessKey:[1,"_access-key"],_ariaControls:[1,"_aria-controls"],_ariaDescription:[1,"_aria-description"],_ariaSelected:[4,"_aria-selected"],_customClass:[1,"_custom-class"],_disabled:[4],_hideLabel:[4,"_hide-label"],_icons:[1],_id:[1],_label:[1],_name:[1],_on:[16],_popoverAlign:[1,"_popover-align"],_role:[1],_shortKey:[1,"_short-key"],_syncValueBySelector:[1,"_sync-value-by-selector"],_tabIndex:[2,"_tab-index"],_tooltipAlign:[1,"_tooltip-align"],_type:[1],_value:[8],_variant:[1],hidePopover:[64]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-popover-button"].forEach(n=>{if("kol-popover-button"===n)customElements.get(n)||customElements.define(n,KolPopoverButton$1)})}const KolPopoverButton=KolPopoverButton$1,defineCustomElement=defineCustomElement$1;export{KolPopoverButton,defineCustomElement};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{w as watchValidator,D as getDocument}from"./common.js";import{v as validateAlign}from"./align.js";import{v as validateShow}from"./show.js";import{a as alignFloatingElements}from"./align-floating-elements.js";import{c as clsx}from"./clsx.js";import{d as dispatchDomEvent,K as KolEvent}from"./events.js";const validatePopoverCallbacks=(e,t)=>{watchValidator(e,"_on",e=>"object"==typeof e&&null!==e,new Set(["PopoverCallbacksPropType {Events.onClose}"]),t)},KolPopover=proxyCustomElement(class extends HTMLElement{constructor(e){super(),!1!==e&&this.__registerHost(),this.hidePopoverByEscape=e=>{"Escape"===e.key&&this.hidePopover(e)},this.hidePopoverByClickOutside=e=>{this.host&&!this.host.contains(e.target)&&this.hidePopover(e)},this.catchHostAndTriggerElement=e=>{e&&(this.host=e,this.triggerElement=e.previousElementSibling)},this.catchPopoverElement=e=>{this.popoverElement=e},this.catchArrowElement=e=>{this.arrowElement=e},this._align="top",this._show=!1,this.state={_align:"top",_on:{},_show:!1,_visible:!1}}async showPopover(){this.addListenersToBody(),this.triggerElement&&this.popoverElement&&(await alignFloatingElements({align:this._align,referenceElement:this.triggerElement,arrowElement:this.arrowElement,floatingElement:this.popoverElement}),this.state=Object.assign(Object.assign({},this.state),{_visible:!0}))}hidePopover(e){var t,o,s;this.state=Object.assign(Object.assign({},this.state),{_visible:!1}),this._show=!1,null===(t=this.triggerElement)||void 0===t||t.focus(),this.removeListenersToBody(),null===(s=null===(o=this.state._on)||void 0===o?void 0:o.onClose)||void 0===s||s.call(o,e),this.host&&dispatchDomEvent(this.host,KolEvent.close)}addListenersToBody(){var e;const t=getDocument().body;t.addEventListener("keyup",this.hidePopoverByEscape),t.addEventListener("click",this.hidePopoverByClickOutside),null===(e=document.scrollingElement)||void 0===e||e.addEventListener("scroll",()=>{this.showPopover()},{passive:!0})}removeListenersToBody(){var e;const t=getDocument().body;t.removeEventListener("keyup",this.hidePopoverByEscape),t.removeEventListener("click",this.hidePopoverByClickOutside),null===(e=document.scrollingElement)||void 0===e||e.removeEventListener("scroll",()=>{this.showPopover()})}render(){return h(Host,{key:"53179ace5c0dfabbe1dd00ba8ddfe453ef55ccd5",ref:this.catchHostAndTriggerElement,class:"kol-popover"},h("div",{key:"f42aafe81aaa0a09526b4e9923a96133ee81c5d2",class:clsx("kol-popover__content",{"kol-popover__content--visible":this.state._visible}),ref:this.catchPopoverElement,hidden:!this.state._show},h("div",{key:"25719436c820c214a2e3c0fac47449f842c4f68c",class:clsx("kol-popover__arrow",`kol-popover__arrow--${this.state._align}`),ref:this.catchArrowElement}),h("slot",{key:"fff04758761fb36389c6698b17730b604981ca66"})))}validateAlign(e){validateAlign(this,e)}validateOn(e){validatePopoverCallbacks(this,e)}validateShow(e){validateShow(this,e),e&&this.showPopover()}componentWillLoad(){this.validateAlign(this._align),this.validateShow(this._show)}static get watchers(){return{_align:["validateAlign"],_on:["validateOn"],_show:["validateShow"]}}},[260,"kol-popover-wc",{_align:[1],_on:[16],_show:[1540],state:[32]},void 0,{_align:["validateAlign"],_on:["validateOn"],_show:["validateShow"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-popover-wc"].forEach(e=>{if("kol-popover-wc"===e)customElements.get(e)||customElements.define(e,KolPopover)})}const KolPopoverWc=KolPopover,defineCustomElement=defineCustomElement$1;export{KolPopoverWc,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{w as watchValidator,D as getDocument}from"./common.js";import{v as validateAlign}from"./align.js";import{v as validateShow}from"./show.js";import{a as alignFloatingElements}from"./align-floating-elements.js";import{c as clsx}from"./clsx.js";import{d as dispatchDomEvent,K as KolEvent}from"./events.js";const validatePopoverCallbacks=(e,t)=>{watchValidator(e,"_on",e=>"object"==typeof e&&null!==e,new Set(["PopoverCallbacksPropType {Events.onClose}"]),t)},KolPopover=proxyCustomElement(class extends HTMLElement{constructor(e){super(),!1!==e&&this.__registerHost(),this.hidePopoverByEscape=e=>{"Escape"===e.key&&this.hidePopover(e)},this.hidePopoverByClickOutside=e=>{this.host&&!this.host.contains(e.target)&&this.hidePopover(e)},this.catchHostAndTriggerElement=e=>{e&&(this.host=e,this.triggerElement=e.previousElementSibling)},this.catchPopoverElement=e=>{this.popoverElement=e},this.catchArrowElement=e=>{this.arrowElement=e},this._align="top",this._show=!1,this.state={_align:"top",_on:{},_show:!1,_visible:!1}}async showPopover(){this.addListenersToBody(),this.triggerElement&&this.popoverElement&&(await alignFloatingElements({align:this._align,referenceElement:this.triggerElement,arrowElement:this.arrowElement,floatingElement:this.popoverElement}),this.state=Object.assign(Object.assign({},this.state),{_visible:!0}))}hidePopover(e){var t,o,s;this.state=Object.assign(Object.assign({},this.state),{_visible:!1}),this._show=!1,null===(t=this.triggerElement)||void 0===t||t.focus(),this.removeListenersToBody(),null===(s=null===(o=this.state._on)||void 0===o?void 0:o.onClose)||void 0===s||s.call(o,e),this.host&&dispatchDomEvent(this.host,KolEvent.close)}addListenersToBody(){var e;const t=getDocument().body;t.addEventListener("keyup",this.hidePopoverByEscape),t.addEventListener("click",this.hidePopoverByClickOutside),null===(e=document.scrollingElement)||void 0===e||e.addEventListener("scroll",()=>{this.showPopover()},{passive:!0})}removeListenersToBody(){var e;const t=getDocument().body;t.removeEventListener("keyup",this.hidePopoverByEscape),t.removeEventListener("click",this.hidePopoverByClickOutside),null===(e=document.scrollingElement)||void 0===e||e.removeEventListener("scroll",()=>{this.showPopover()})}render(){return h(Host,{key:"73e96ffd3bd3e790af370c6b6c04b8000abd1ce2",ref:this.catchHostAndTriggerElement,class:"kol-popover"},h("div",{key:"5ed3a18bf6b76f8d607c17352fd9956f3cb3782c",class:clsx("kol-popover__content",{"kol-popover__content--visible":this.state._visible}),ref:this.catchPopoverElement,hidden:!this.state._show},h("div",{key:"aa1ca688f04b23b180c64b841a17ee6b3d6812b0",class:clsx("kol-popover__arrow",`kol-popover__arrow--${this.state._align}`),ref:this.catchArrowElement}),h("slot",{key:"d94f499e6fbbb7e855487d870cfca3ddfec7e495"})))}validateAlign(e){validateAlign(this,e)}validateOn(e){validatePopoverCallbacks(this,e)}validateShow(e){validateShow(this,e),e&&this.showPopover()}componentWillLoad(){this.validateAlign(this._align),this.validateShow(this._show)}static get watchers(){return{_align:["validateAlign"],_on:["validateOn"],_show:["validateShow"]}}},[260,"kol-popover-wc",{_align:[1],_on:[16],_show:[1540],state:[32]},void 0,{_align:["validateAlign"],_on:["validateOn"],_show:["validateShow"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-popover-wc"].forEach(e=>{if("kol-popover-wc"===e)customElements.get(e)||customElements.define(e,KolPopover)})}const KolPopoverWc=KolPopover,defineCustomElement=defineCustomElement$1;export{KolPopoverWc,defineCustomElement};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{h as watchString,w as watchValidator,N as watchNumber}from"./common.js";import{v as validateLabel}from"./label.js";const validateUnit=(e,t)=>{watchString(e,"_unit",t)},progressVariantOptions=["bar","cycle"],isProgressVariantPropType=e=>"string"==typeof e&&progressVariantOptions.includes(e),validateVariantProgress=(e,t)=>{watchValidator(e,"_variant",isProgressVariantPropType,new Set(progressVariantOptions),t)},defaultStyleCss="/* forward the rem function */\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n .kol-progress__bar {\n display: grid;\n column-gap: 0.05rem;\n align-items: center;\n grid-template-areas: \"LABEL LABEL LABEL\" \"BAR VALUE UNIT\";\n grid-template-columns: 1fr auto;\n }\n .kol-progress__bar-label {\n grid-column-end: 2;\n grid-area: LABEL;\n }\n .kol-progress__bar svg {\n grid-area: BAR;\n }\n .kol-progress__bar-value {\n grid-area: VALUE;\n text-align: right;\n }\n .kol-progress__bar-unit {\n grid-area: UNIT;\n }\n .kol-progress__bar-border {\n fill: transparent;\n stroke: black;\n }\n .kol-progress__bar-background {\n fill: lightgray;\n stroke: white;\n }\n .kol-progress__bar-progress {\n fill: #0075ff;\n stroke: transparent;\n }\n @media (prefers-reduced-motion: no-preference) {\n .kol-progress__bar-progress {\n transition: 250ms ease-in-out 50ms;\n }\n }\n .kol-progress__cycle {\n display: grid;\n align-content: center;\n justify-items: center;\n grid-template-areas: \"ALL\";\n grid-template-columns: auto;\n }\n .kol-progress__cycle > * {\n grid-area: ALL;\n }\n .kol-progress__cycle-text {\n display: flex;\n flex-direction: column;\n justify-content: center;\n font-size: x-small;\n text-align: center;\n }\n .kol-progress__cycle-text * {\n background-color: white;\n }\n .kol-progress__cycle-background {\n fill: transparent;\n stroke: lightgray;\n }\n .kol-progress__cycle-border {\n fill: transparent;\n stroke: black;\n }\n .kol-progress__cycle-whitespace {\n fill: transparent;\n stroke: white;\n }\n .kol-progress__cycle-progress {\n transform: rotate(-90deg);\n transform-origin: 50% 50%;\n fill: transparent;\n stroke: #0075ff;\n }\n @media (prefers-reduced-motion: no-preference) {\n .kol-progress__cycle-progress {\n transition: 250ms ease-in-out 50ms;\n }\n }\n}",CycleSvg=({state:e})=>h("svg",{width:"100",viewBox:"0 0 120 120",xmlns:"http://www.w3.org/2000/svg"},h("circle",{class:"kol-progress__cycle-background",cx:"60",cy:"60",r:"54.5",fill:"currentColor",stroke:"currentColor","stroke-width":"8"}),h("circle",{class:"kol-progress__cycle-whitespace",cx:"60",cy:"60",r:"59",fill:"currentColor",stroke:"currentColor","stroke-width":"3"}),h("circle",{class:"kol-progress__cycle-border",cx:"60",cy:"60",r:"59",fill:"currentColor",stroke:"currentColor","stroke-width":"1"}),h("circle",{class:"kol-progress__cycle-whitespace",cx:"60",cy:"60",r:"51",fill:"currentColor",stroke:"currentColor","stroke-width":"1"}),h("circle",{class:"kol-progress__cycle-border",cx:"60",cy:"60",r:"50",fill:"currentColor",stroke:"currentColor","stroke-width":"1"}),h("circle",{class:"kol-progress__cycle-progress",fill:"currentColor",stroke:"currentColor","stroke-linecap":"round","stroke-dasharray":`${Math.round(e._value/e._max*342)}px 342px`,"stroke-width":"6",cx:"60",cy:"60",r:"54.5"})),BarSvg=({state:e})=>{const t=e._value/e._max*100;return h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"12",overflow:"visible"},h("rect",{class:"kol-progress__bar-background",x:"1",y:"1",height:"11",rx:"5",fill:"currentColor",stroke:"currentColor","stroke-width":"3",width:"100%"}),h("rect",{class:"kol-progress__bar-border",x:"1",y:"1",height:"11",rx:"5",fill:"currentColor",stroke:"currentColor","stroke-width":"1",width:"100%"}),h("rect",{class:"kol-progress__bar-progress",x:"3",y:"3",height:"7",rx:"3.5",fill:"currentColor",stroke:"currentColor","stroke-width":"3",style:{width:`calc(${t}% - 4px)`}}))},createProgressSVG=e=>{switch(e._variant){case"cycle":return h(CycleSvg,{state:e});case"bar":return h(BarSvg,{state:e});default:throw new Error(`Progress variant ${e._variant} not implemented.`)}},KolProgress$1=proxyCustomElement(class extends HTMLElement{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this._unit="%",this.state={_max:100,_unit:"%",_value:0,_variant:"bar",_liveValue:0}}render(){const e="%"===this.state._unit,t=e?`${Math.round(this.state._liveValue/this.state._max*100)}`:this.state._liveValue,n=e?Math.round(this.state._value/this.state._max*100):this.state._value;return h("div",{key:"30c2914505a2921a767ffb7b9e8e120bf2c0f371",class:"kol-progress"},h("div",{key:"b78153292354cb734b5ce72cb024b7b05ff65ecb","aria-hidden":"true",class:{"kol-progress__cycle":"cycle"===this.state._variant,"kol-progress__bar":"bar"===this.state._variant}},"bar"===this.state._variant&&this.state._label&&h("div",{key:"d19dd3020c5e756eee36d11ed3f108d74ae2ad3b",class:"kol-progress__bar-label"},this.state._label),createProgressSVG(this.state),"cycle"===this.state._variant&&h("div",{key:"412a00560e3d04e9eaba630bc18b1b0911a1739e",class:"kol-progress__cycle-text"},this.state._label&&h("div",{key:"6c95c1357dfbfb5e9659081753c19c977ec1d307",class:"kol-progress__cycle-label"},this.state._label),h("div",{key:"654bb1038ac1202cec59740dcfb781a83e7f3b0e",class:"kol-progress__cycle-value"},`${n} ${this.state._unit}`)),"bar"===this.state._variant&&h("div",{key:"79f03f81f500e7806c470f7e862e84d923ca019a",class:"kol-progress__bar-value",style:{width:`${`${(e?100:this.state._max)+1}`.length}ch`}},n),"bar"===this.state._variant&&h("div",{key:"91e7c2d27ad4734119d125b7839d8c64ac67b089",class:"kol-progress__bar-unit"},this.state._unit)),h("progress",{key:"036f25010c9d5581020aa33c8dd2c2e562a421be",class:"visually-hidden","aria-busy":this.state._value<this.state._max?"true":"false",max:this.state._max,value:this.state._value}),h("span",{key:"9704c069d644b44000003e1147395f930e634dd7","aria-live":"polite","aria-relevant":"removals text",class:"visually-hidden"},e?`${t} %`:`${t} von ${this.state._max} ${this.state._unit}`))}validateLabel(e){validateLabel(this,e)}validateMax(e){"number"!=typeof e&&(e=100),watchNumber(this,"_max",e,{required:!0})}validateUnit(e){validateUnit(this,e)}validateValue(e){"number"!=typeof e&&(e=0),watchNumber(this,"_value",e,{required:!0})}validateVariant(e){validateVariantProgress(this,e)}componentWillLoad(){this.validateLabel(this._label),this.validateMax(this._max),this.validateUnit(this._unit),this.validateValue(this._value),this.validateVariant(this._variant),this.state=Object.assign(Object.assign({},this.state),{_liveValue:this.state._value}),this.interval=setInterval(()=>{this.state._liveValue!==this.state._value&&(this.state=Object.assign(Object.assign({},this.state),{_liveValue:this.state._value}))},5e3)}disconnectedCallback(){clearInterval(this.interval)}static get watchers(){return{_label:["validateLabel"],_max:["validateMax"],_unit:["validateUnit"],_value:["validateValue"],_variant:["validateVariant"]}}static get style(){return{default:defaultStyleCss}}},[289,"kol-progress",{_label:[1],_max:[2],_unit:[1],_value:[2],_variant:[1],state:[32]},void 0,{_label:["validateLabel"],_max:["validateMax"],_unit:["validateUnit"],_value:["validateValue"],_variant:["validateVariant"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-progress"].forEach(e=>{if("kol-progress"===e)customElements.get(e)||customElements.define(e,KolProgress$1)})}const KolProgress=KolProgress$1,defineCustomElement=defineCustomElement$1;export{KolProgress,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{h as watchString,w as watchValidator,N as watchNumber}from"./common.js";import{v as validateLabel}from"./label.js";const validateUnit=(e,t)=>{watchString(e,"_unit",t)},progressVariantOptions=["bar","cycle"],isProgressVariantPropType=e=>"string"==typeof e&&progressVariantOptions.includes(e),validateVariantProgress=(e,t)=>{watchValidator(e,"_variant",isProgressVariantPropType,new Set(progressVariantOptions),t)},defaultStyleCss="/* forward the rem function */\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n .kol-progress__bar {\n display: grid;\n column-gap: 0.05rem;\n align-items: center;\n grid-template-areas: \"LABEL LABEL LABEL\" \"BAR VALUE UNIT\";\n grid-template-columns: 1fr auto;\n }\n .kol-progress__bar-label {\n grid-column-end: 2;\n grid-area: LABEL;\n }\n .kol-progress__bar svg {\n grid-area: BAR;\n }\n .kol-progress__bar-value {\n grid-area: VALUE;\n text-align: right;\n }\n .kol-progress__bar-unit {\n grid-area: UNIT;\n }\n .kol-progress__bar-border {\n fill: transparent;\n stroke: black;\n }\n .kol-progress__bar-background {\n fill: lightgray;\n stroke: white;\n }\n .kol-progress__bar-progress {\n fill: #0075ff;\n stroke: transparent;\n }\n @media (prefers-reduced-motion: no-preference) {\n .kol-progress__bar-progress {\n transition: 250ms ease-in-out 50ms;\n }\n }\n .kol-progress__cycle {\n display: grid;\n align-content: center;\n justify-items: center;\n grid-template-areas: \"ALL\";\n grid-template-columns: auto;\n }\n .kol-progress__cycle > * {\n grid-area: ALL;\n }\n .kol-progress__cycle-text {\n display: flex;\n flex-direction: column;\n justify-content: center;\n font-size: x-small;\n text-align: center;\n }\n .kol-progress__cycle-text * {\n background-color: white;\n }\n .kol-progress__cycle-background {\n fill: transparent;\n stroke: lightgray;\n }\n .kol-progress__cycle-border {\n fill: transparent;\n stroke: black;\n }\n .kol-progress__cycle-whitespace {\n fill: transparent;\n stroke: white;\n }\n .kol-progress__cycle-progress {\n transform: rotate(-90deg);\n transform-origin: 50% 50%;\n fill: transparent;\n stroke: #0075ff;\n }\n @media (prefers-reduced-motion: no-preference) {\n .kol-progress__cycle-progress {\n transition: 250ms ease-in-out 50ms;\n }\n }\n}",CycleSvg=({state:e})=>h("svg",{width:"100",viewBox:"0 0 120 120",xmlns:"http://www.w3.org/2000/svg"},h("circle",{class:"kol-progress__cycle-background",cx:"60",cy:"60",r:"54.5",fill:"currentColor",stroke:"currentColor","stroke-width":"8"}),h("circle",{class:"kol-progress__cycle-whitespace",cx:"60",cy:"60",r:"59",fill:"currentColor",stroke:"currentColor","stroke-width":"3"}),h("circle",{class:"kol-progress__cycle-border",cx:"60",cy:"60",r:"59",fill:"currentColor",stroke:"currentColor","stroke-width":"1"}),h("circle",{class:"kol-progress__cycle-whitespace",cx:"60",cy:"60",r:"51",fill:"currentColor",stroke:"currentColor","stroke-width":"1"}),h("circle",{class:"kol-progress__cycle-border",cx:"60",cy:"60",r:"50",fill:"currentColor",stroke:"currentColor","stroke-width":"1"}),h("circle",{class:"kol-progress__cycle-progress",fill:"currentColor",stroke:"currentColor","stroke-linecap":"round","stroke-dasharray":`${Math.round(e._value/e._max*342)}px 342px`,"stroke-width":"6",cx:"60",cy:"60",r:"54.5"})),BarSvg=({state:e})=>{const t=e._value/e._max*100;return h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"12",overflow:"visible"},h("rect",{class:"kol-progress__bar-background",x:"1",y:"1",height:"11",rx:"5",fill:"currentColor",stroke:"currentColor","stroke-width":"3",width:"100%"}),h("rect",{class:"kol-progress__bar-border",x:"1",y:"1",height:"11",rx:"5",fill:"currentColor",stroke:"currentColor","stroke-width":"1",width:"100%"}),h("rect",{class:"kol-progress__bar-progress",x:"3",y:"3",height:"7",rx:"3.5",fill:"currentColor",stroke:"currentColor","stroke-width":"3",style:{width:`calc(${t}% - 4px)`}}))},createProgressSVG=e=>{switch(e._variant){case"cycle":return h(CycleSvg,{state:e});case"bar":return h(BarSvg,{state:e});default:throw new Error(`Progress variant ${e._variant} not implemented.`)}},KolProgress$1=proxyCustomElement(class extends HTMLElement{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this._unit="%",this.state={_max:100,_unit:"%",_value:0,_variant:"bar",_liveValue:0}}render(){const e="%"===this.state._unit,t=e?`${Math.round(this.state._liveValue/this.state._max*100)}`:this.state._liveValue,n=e?Math.round(this.state._value/this.state._max*100):this.state._value;return h("div",{key:"07fbfb3f4cbf32a7ad5f7cc9a721ab2c60405f66",class:"kol-progress"},h("div",{key:"9793059300b8ccd4fe00ac804a935696a2f15177","aria-hidden":"true",class:{"kol-progress__cycle":"cycle"===this.state._variant,"kol-progress__bar":"bar"===this.state._variant}},"bar"===this.state._variant&&this.state._label&&h("div",{key:"66efddf0c7b50e0071f7378bac16e3c29ad487c9",class:"kol-progress__bar-label"},this.state._label),createProgressSVG(this.state),"cycle"===this.state._variant&&h("div",{key:"9c3317e954737da80a048054705896a46ddb41a4",class:"kol-progress__cycle-text"},this.state._label&&h("div",{key:"3ff383a5253793f48fcccc908a0efa02db72590c",class:"kol-progress__cycle-label"},this.state._label),h("div",{key:"37728879affa27b704266f05a5d42c9a13a1c2ff",class:"kol-progress__cycle-value"},`${n} ${this.state._unit}`)),"bar"===this.state._variant&&h("div",{key:"0fdfff089fb5b9867bfceeca9e9fd3e8ccb52527",class:"kol-progress__bar-value",style:{width:`${`${(e?100:this.state._max)+1}`.length}ch`}},n),"bar"===this.state._variant&&h("div",{key:"de6fdfc8a8afefe9c9ba9c8b8cb437fa9e644f38",class:"kol-progress__bar-unit"},this.state._unit)),h("progress",{key:"5ef01b32eb1e15038fcca69aa9dda54f7c340f19",class:"visually-hidden","aria-busy":this.state._value<this.state._max?"true":"false",max:this.state._max,value:this.state._value}),h("span",{key:"90a1838d38c1193e840400eca8adf0688beee983","aria-live":"polite","aria-relevant":"removals text",class:"visually-hidden"},e?`${t} %`:`${t} von ${this.state._max} ${this.state._unit}`))}validateLabel(e){validateLabel(this,e)}validateMax(e){"number"!=typeof e&&(e=100),watchNumber(this,"_max",e,{required:!0})}validateUnit(e){validateUnit(this,e)}validateValue(e){"number"!=typeof e&&(e=0),watchNumber(this,"_value",e,{required:!0})}validateVariant(e){validateVariantProgress(this,e)}componentWillLoad(){this.validateLabel(this._label),this.validateMax(this._max),this.validateUnit(this._unit),this.validateValue(this._value),this.validateVariant(this._variant),this.state=Object.assign(Object.assign({},this.state),{_liveValue:this.state._value}),this.interval=setInterval(()=>{this.state._liveValue!==this.state._value&&(this.state=Object.assign(Object.assign({},this.state),{_liveValue:this.state._value}))},5e3)}disconnectedCallback(){clearInterval(this.interval)}static get watchers(){return{_label:["validateLabel"],_max:["validateMax"],_unit:["validateUnit"],_value:["validateValue"],_variant:["validateVariant"]}}static get style(){return{default:defaultStyleCss}}},[289,"kol-progress",{_label:[1],_max:[2],_unit:[1],_value:[2],_variant:[1],state:[32]},void 0,{_label:["validateLabel"],_max:["validateMax"],_unit:["validateUnit"],_value:["validateValue"],_variant:["validateVariant"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-progress"].forEach(e=>{if("kol-progress"===e)customElements.get(e)||customElements.define(e,KolProgress$1)})}const KolProgress=KolProgress$1,defineCustomElement=defineCustomElement$1;export{KolProgress,defineCustomElement};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{h as watchString,w as watchValidator}from"./common.js";import{s as showExpertSlot}from"./reuse.js";import{v as validateLabel}from"./label.js";import{l as KolLinkTag}from"./component-names.js";import{c as clsx}from"./clsx.js";const validateQuote=(e,n)=>{watchString(e,"_quote",n,{required:!0})},quoteVariantOptions=["block","inline"],isQuoteVariantPropType=e=>"string"==typeof e&&quoteVariantOptions.includes(e),validateVariantQuote=(e,n)=>{watchValidator(e,"_variant",isQuoteVariantPropType,new Set(quoteVariantOptions),n)},defaultStyleCss="@charset \"UTF-8\";\n/* forward the rem function */\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n .kol-quote {\n display: inline;\n margin: 0;\n padding: 0;\n }\n .kol-quote__cite::before {\n content: \"—\";\n }\n .kol-quote--block .kol-quote__cite::before {\n padding-right: 0.5em;\n }\n .kol-quote--inline .kol-quote__cite::before {\n padding: 0.5em;\n }\n .kol-quote--block .kol-quote__figcaption {\n display: inline;\n margin: 0;\n padding: 0;\n }\n .kol-quote__blockquote::before {\n content: open-quote;\n }\n .kol-quote__blockquote::after {\n content: close-quote;\n }\n}",KolQuote$1=proxyCustomElement(class extends HTMLElement{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this._variant="inline",this.state={_href:"",_quote:"",_variant:"inline"}}validateLabel(e){validateLabel(this,e)}validateHref(e){watchString(this,"_href",e,{required:!0})}validateQuote(e){validateQuote(this,e)}validateVariant(e){validateVariantQuote(this,e)}componentWillLoad(){this.validateHref(this._href),this.validateLabel(this._label),this.validateQuote(this._quote),this.validateVariant(this._variant)}render(){const e=showExpertSlot(this.state._quote);return h("figure",{key:"3577d4eb15e4d4fb90bb23b73b070b84af133407",class:clsx("kol-quote",`kol-quote--${this.state._variant}`)},"block"===this.state._variant?h("blockquote",{class:"kol-quote__blockquote",cite:this.state._href},this.state._quote,h("span",{"aria-hidden":e?void 0:"true",hidden:!e},h("slot",{name:"expert"}))):h("q",{class:"kol-quote__quote",cite:this.state._href},this.state._quote,h("span",{"aria-hidden":e?void 0:"true",hidden:!e},h("slot",{name:"expert"}))),"string"==typeof this.state._label&&this.state._label.length>0&&h("figcaption",{key:"1b5f3dd6c8b687afdc02679fb0d4a2ec978c2adf",class:"kol-quote__figcaption"},h("cite",{key:"bfe86e4a9b0e10a45973d76f68c699771f59b4be",class:"kol-quote__cite"},h(KolLinkTag,{key:"146d5d83a83a8b8a5688be828a605c65c0d703dd",_href:this.state._href,_label:this.state._label,_target:"_blank"}))))}static get watchers(){return{_label:["validateLabel"],_href:["validateHref"],_quote:["validateQuote"],_variant:["validateVariant"]}}static get style(){return{default:defaultStyleCss}}},[289,"kol-quote",{_label:[1],_href:[1],_quote:[1],_variant:[1],state:[32]},void 0,{_label:["validateLabel"],_href:["validateHref"],_quote:["validateQuote"],_variant:["validateVariant"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-quote"].forEach(e=>{if("kol-quote"===e)customElements.get(e)||customElements.define(e,KolQuote$1)})}const KolQuote=KolQuote$1,defineCustomElement=defineCustomElement$1;export{KolQuote,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{h as watchString,w as watchValidator}from"./common.js";import{s as showExpertSlot}from"./reuse.js";import{v as validateLabel}from"./label.js";import{l as KolLinkTag}from"./component-names.js";import{c as clsx}from"./clsx.js";const validateQuote=(e,n)=>{watchString(e,"_quote",n,{required:!0})},quoteVariantOptions=["block","inline"],isQuoteVariantPropType=e=>"string"==typeof e&&quoteVariantOptions.includes(e),validateVariantQuote=(e,n)=>{watchValidator(e,"_variant",isQuoteVariantPropType,new Set(quoteVariantOptions),n)},defaultStyleCss="@charset \"UTF-8\";\n/* forward the rem function */\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n .kol-quote {\n display: inline;\n margin: 0;\n padding: 0;\n }\n .kol-quote__cite::before {\n content: \"—\";\n }\n .kol-quote--block .kol-quote__cite::before {\n padding-right: 0.5em;\n }\n .kol-quote--inline .kol-quote__cite::before {\n padding: 0.5em;\n }\n .kol-quote--block .kol-quote__figcaption {\n display: inline;\n margin: 0;\n padding: 0;\n }\n .kol-quote__blockquote::before {\n content: open-quote;\n }\n .kol-quote__blockquote::after {\n content: close-quote;\n }\n}",KolQuote$1=proxyCustomElement(class extends HTMLElement{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this._variant="inline",this.state={_href:"",_quote:"",_variant:"inline"}}validateLabel(e){validateLabel(this,e)}validateHref(e){watchString(this,"_href",e,{required:!0})}validateQuote(e){validateQuote(this,e)}validateVariant(e){validateVariantQuote(this,e)}componentWillLoad(){this.validateHref(this._href),this.validateLabel(this._label),this.validateQuote(this._quote),this.validateVariant(this._variant)}render(){const e=showExpertSlot(this.state._quote);return h("figure",{key:"7ac209984bade360715ca4edf77fad317687e6ea",class:clsx("kol-quote",`kol-quote--${this.state._variant}`)},"block"===this.state._variant?h("blockquote",{class:"kol-quote__blockquote",cite:this.state._href},this.state._quote,h("span",{"aria-hidden":e?void 0:"true",hidden:!e},h("slot",{name:"expert"}))):h("q",{class:"kol-quote__quote",cite:this.state._href},this.state._quote,h("span",{"aria-hidden":e?void 0:"true",hidden:!e},h("slot",{name:"expert"}))),"string"==typeof this.state._label&&this.state._label.length>0&&h("figcaption",{key:"f259d9c9d6a5a9bf0f5c5a9dc234cb453c963b60",class:"kol-quote__figcaption"},h("cite",{key:"0ea0d21cab1594be38e354010606eb8799da6db6",class:"kol-quote__cite"},h(KolLinkTag,{key:"94b7de0e854ac54d75abd09e781e93111dfae101",_href:this.state._href,_label:this.state._label,_target:"_blank"}))))}static get watchers(){return{_label:["validateLabel"],_href:["validateHref"],_quote:["validateQuote"],_variant:["validateVariant"]}}static get style(){return{default:defaultStyleCss}}},[289,"kol-quote",{_label:[1],_href:[1],_quote:[1],_variant:[1],state:[32]},void 0,{_label:["validateLabel"],_href:["validateHref"],_quote:["validateQuote"],_variant:["validateVariant"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-quote"].forEach(e=>{if("kol-quote"===e)customElements.get(e)||customElements.define(e,KolQuote$1)})}const KolQuote=KolQuote$1,defineCustomElement=defineCustomElement$1;export{KolQuote,defineCustomElement};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{h,Fragment,proxyCustomElement,HTMLElement}from"@stencil/core/internal/client";import{c as clsx}from"./clsx.js";import{c as checkHasMsg,d as getDefaultProps,g as getRenderStates,F as FormFieldStateWrapper}from"./controller2.js";import{I as InputIconController,a as InputContainerStateWrapperFc}from"./controller-icon.js";import{_ as __rest}from"./tslib.es6.js";import{q as watchJsonArrayString}from"./common.js";import{n as nonce}from"./dev.utils.js";import{p as propagateSubmitEventToForm}from"./controller.js";import{v as validateMultiple}from"./multiple.js";import{f as fillKeyOptionMap,v as validateOptionsWithOptgroup}from"./controller3.js";import{v as validateRequired}from"./required.js";import{v as validateRows}from"./rows.js";const NativeOptionFc=e=>{var{baseClassName:t="kol-select",class:n,index:i,selectedValue:o,selected:a,value:l,label:s,disabled:r}=e,d=__rest(e,["baseClassName","class","index","selectedValue","selected","value","label","disabled"]);void 0===o?o=[]:Array.isArray(o)||(o=[o]);const c=a||o.includes(l);return h("option",Object.assign({class:clsx(`${t}__option`,{[`${t}__option--selected`]:c,[`${t}__option--disabled`]:r},n),selected:c,disabled:r,value:i},d),s)},NativeOptionListFc=({baseClassName:e,preKey:t,options:n,disabled:i,value:o,OptionProps:a={},OptionGroupProps:l={}})=>(null==n?void 0:n.length)?h(Fragment,null,n.map((s,r)=>{const d=[t,`-${r}`].join("");if("options"in s){if(!n.length)return null;const{label:t}=s,r=__rest(s,["label"]);return h("optgroup",Object.assign({class:clsx(`${e}__optgroup`,{[`${e}__optgroup--disabled`]:i}),key:d},l,{label:null==t?void 0:t.toString(),disabled:i}),h(NativeOptionListFc,Object.assign({baseClassName:e,OptionGroupProps:l,OptionProps:a,value:o,preKey:d},r)))}return"value"in s?h(NativeOptionFc,Object.assign({key:d,baseClassName:e},a,{index:d,selectedValue:o},s)):null})):null,NativeSelectFc=e=>{const{class:t,msg:n,touched:i,disabled:o,required:a,options:l,value:s,OptionProps:r,OptionGroupProps:d,ariaDescribedBy:c,hideLabel:p,label:u}=e,m=__rest(e,["class","msg","touched","disabled","required","options","value","OptionProps","OptionGroupProps","ariaDescribedBy","hideLabel","label"]),v=checkHasMsg(n,i),f="string"==typeof n?"error":null==n?void 0:n._type,_={"kol-select--disabled":Boolean(o),"kol-select--required":Boolean(a),"kol-select--touched":Boolean(i),[`kol-select--${f||"error"}`]:v},b=Object.assign(Object.assign({class:clsx("kol-select",_,t),required:a,disabled:o},getDefaultProps({ariaDescribedBy:c,hideLabel:p,label:u})),m);return h("select",Object.assign({},b),h(NativeOptionListFc,{baseClassName:"kol-select",options:l,value:s,OptionGroupProps:d,OptionProps:r}))};function getSelectProps(e){const{ariaDescribedBy:t}=getRenderStates(e),n={id:e._id,hideLabel:e._hideLabel,label:e._label,value:e._value,options:e._options,accessKey:e._accessKey,disabled:e._disabled,name:e._name,ariaDescribedBy:t,size:e._rows,multiple:e._multiple,required:e._required,touched:e._touched,msg:e._msg};return"_shortKey"in e&&(n["aria-keyshortcuts"]=e._shortKey),n}const SelectStateWrapper=e=>{var{state:t}=e,n=__rest(e,["state"]);return h(NativeSelectFc,Object.assign({},getSelectProps(t),n))};class SelectController extends InputIconController{constructor(e,t,n){super(e,t,n),this.keyOptionMap=new Map,this.getOptionByKey=e=>this.keyOptionMap.get(e),this.isValueInOptions=(e,t)=>void 0!==t.find(t=>"string"==typeof t.value?t.value===e:!!Array.isArray(t.options)&&this.isValueInOptions(e,t.options)),this.filterValuesInOptions=(e,t)=>e.filter(e=>void 0!==this.isValueInOptions(e,t)),this.afterPatchOptions=(e,t,n,i)=>{"_value"===i&&this.setFormAssociatedValue(e)},this.beforePatchOptions=(e,t)=>{const n=t.get("_value");void 0===n||Array.isArray(n)||t.set("_value",[n]);const i=t.has("_options")?t.get("_options"):this.component.state._options;if(Array.isArray(i)&&i.length>0){this.keyOptionMap.clear(),fillKeyOptionMap(this.keyOptionMap,i);const e=t.has("_value")?t.get("_value"):this.component.state._value,n=this.filterValuesInOptions(Array.isArray(e)&&e.length>0?e:[],i);!1===this.component._multiple&&0===n.length?t.set("_value",[i[0].value]):Array.isArray(e)&&n.length<e.length&&t.set("_value",n)}},this.component=e}validateOptions(e){validateOptionsWithOptgroup(this.component,e,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}validateMultiple(e){this.assertComponentValueMatchesMultiplicity(!0===e),validateMultiple(this.component,e,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}validateRequired(e){validateRequired(this.component,e)}validateRows(e){validateRows(this.component,e)}validateValue(e){this.assertValueMatchesMultiplicity(e),watchJsonArrayString(this.component,"_value",()=>!0,void 0===e?[]:Array.isArray(e)?e:[e],void 0,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}componentWillLoad(){super.componentWillLoad(),this.validateOptions(this.component._options),this.validateMultiple(this.component._multiple),this.validateRequired(this.component._required),this.validateRows(this.component._rows),this.validateValue(this.component._value)}assertValueMatchesMultiplicity(e){const t=Array.isArray(e);if(!0===this.component._multiple){if(void 0!==e&&!t)throw new Error(`↑ The schema for the property (_value) is not valid for multiple mode. Expected an array. The value will not be changed. (received = ${JSON.stringify(e)})`)}else if(t)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. (received = ${JSON.stringify(e)})`)}assertComponentValueMatchesMultiplicity(e){const t=this.component._value;if(e){if(void 0!==t&&!Array.isArray(t))throw new Error(`↑ The schema for the property (_value) is not valid for multiple mode. Expected an array. The value will not be changed. (current = ${JSON.stringify(t)})`)}else if(Array.isArray(t))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. (current = ${JSON.stringify(t)})`)}}const defaultStyleCss='@charset "UTF-8";\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type=\'checkbox\'], [type=\'radio\'], [type=\'range\']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don\'t want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field {\n display: grid;\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text::after {\n content: "*";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: "*";\n }\n .kol-input-container {\n background-color: white;\n display: grid;\n width: 100%;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n grid-template-columns: 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--end) {\n grid-template-columns: 1fr auto;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start):has(> .kol-input-container__adornment--end) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-select {\n width: 100%;\n /* needed hack for vertical alignment */\n }\n .kol-select:not(:disabled) {\n cursor: pointer;\n }\n .kol-select:not([multiple], [size]) {\n height: 2.75em;\n }\n .kol-select:focus {\n outline: none;\n }\n .kol-select__option:checked::before {\n content: "✓ ";\n }\n .kol-select[multiple] option {\n padding: calc((var(--a11y-min-size) - 16 * 1rem / var(--kolibri-root-font-size, 16)) / 2) 0.5em;\n }\n}',KolSelect$1=proxyCustomElement(class extends HTMLElement{async getValue(){return this._multiple?this.state._value:Array.isArray(this.state._value)&&this.state._value.length>0?this.state._value[0]:this.state._value}async kolFocus(){var e;null===(e=this.selectRef)||void 0===e||e.focus()}getFormFieldProps(){return{state:this.state,class:clsx("kol-form-field-select",{"kol-form-field--has-value":this.state._hasValue}),tooltipAlign:this._tooltipAlign,onClick:()=>{var e;return null===(e=this.selectRef)||void 0===e?void 0:e.focus()},alert:this.showAsAlert()}}getSelectProps(){return Object.assign(Object.assign({ref:this.catchRef,state:this.state},this.controller.onFacade),{onInput:this.onInput.bind(this),onChange:this.onChange.bind(this),onFocus:e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},onBlur:e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1}})}render(){return h(FormFieldStateWrapper,Object.assign({key:"adcb9f796ccfdb4ca138c08ce006abe09cab1b2d"},this.getFormFieldProps()),h(InputContainerStateWrapperFc,{key:"8a26ab066a1caac5ebc68d78902f71f32c1cd9e8",state:this.state},h("form",{key:"72ece646a96c4d67c19131a7559865859ce8255d",onSubmit:e=>{e.preventDefault(),propagateSubmitEventToForm({form:this.host})}},h("input",{key:"3135a18fd70d2c70caa6b273dc6c0d60cd5ebc16",type:"submit",hidden:!0}),h(SelectStateWrapper,Object.assign({key:"57adf44c46c1fc70b664e135ec7d9028c7cf903e"},this.getSelectProps())))))}constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.catchRef=e=>{this.selectRef=e},this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._multiple=!1,this._required=!1,this._tooltipAlign="top",this._touched=!1,this.state={_hasValue:!1,_hideMsg:!1,_id:`id-${nonce()}`,_label:"",_multiple:!1,_options:[],_value:[]},this.inputHasFocus=!1,this.controller=new SelectController(this,"select",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(e){this.controller.validateAccessKey(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHideMsg(e){this.controller.validateHideMsg(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMsg(e){this.controller.validateMsg(e)}validateMultiple(e){this.controller.validateMultiple(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validateOptions(e){this.controller.validateOptions(e)}validateRequired(e){this.controller.validateRequired(e)}validateRows(e){this.controller.validateRows(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTabIndex(e){this.controller.validateTabIndex(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener(e=>this.state._hasValue=!!e)}onInput(e){var t;const n=Array.from((null===(t=this.selectRef)||void 0===t?void 0:t.options)||[]).filter(e=>e.selected).map(e=>{var t;return null===(t=this.controller.getOptionByKey(e.value))||void 0===t?void 0:t.value});if(this._multiple)this._value=n,this.controller.onFacade.onInput(e,!0,n);else{const t=n.length>0?n[0]:void 0;this._value=t,this.controller.onFacade.onInput(e,!0,t)}}onChange(e){this._multiple,this.controller.onFacade.onChange(e,this._value)}get host(){return this}static get watchers(){return{_accessKey:["validateAccessKey"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_msg:["validateMsg"],_multiple:["validateMultiple"],_name:["validateName"],_on:["validateOn"],_options:["validateOptions"],_required:["validateRequired"],_rows:["validateRows"],_shortKey:["validateShortKey"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}static get style(){return{default:defaultStyleCss}}},[289,"kol-select",{_accessKey:[1,"_access-key"],_disabled:[4],_hideMsg:[4,"_hide-msg"],_hideLabel:[4,"_hide-label"],_hint:[1],_icons:[1],_id:[1],_label:[1],_msg:[1],_multiple:[4],_name:[1],_on:[16],_options:[1],_required:[4],_shortKey:[1,"_short-key"],_rows:[2],_syncValueBySelector:[1,"_sync-value-by-selector"],_tabIndex:[2,"_tab-index"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_value:[1544],state:[32],inputHasFocus:[32],getValue:[64],kolFocus:[64]},void 0,{_accessKey:["validateAccessKey"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_msg:["validateMsg"],_multiple:["validateMultiple"],_name:["validateName"],_on:["validateOn"],_options:["validateOptions"],_required:["validateRequired"],_rows:["validateRows"],_shortKey:["validateShortKey"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-select"].forEach(e=>{if("kol-select"===e)customElements.get(e)||customElements.define(e,KolSelect$1)})}const KolSelect=KolSelect$1,defineCustomElement=defineCustomElement$1;export{KolSelect,defineCustomElement};
4
+ import{h,Fragment,proxyCustomElement,HTMLElement}from"@stencil/core/internal/client";import{c as clsx}from"./clsx.js";import{c as checkHasMsg,d as getDefaultProps,g as getRenderStates,F as FormFieldStateWrapper}from"./controller2.js";import{I as InputIconController,a as InputContainerStateWrapperFc}from"./controller-icon.js";import{_ as __rest}from"./tslib.es6.js";import{q as watchJsonArrayString}from"./common.js";import{n as nonce}from"./dev.utils.js";import{p as propagateSubmitEventToForm}from"./controller.js";import{v as validateMultiple}from"./multiple.js";import{f as fillKeyOptionMap,v as validateOptionsWithOptgroup}from"./controller3.js";import{v as validateRequired}from"./required.js";import{v as validateRows}from"./rows.js";const NativeOptionFc=e=>{var{baseClassName:t="kol-select",class:n,index:i,selectedValue:o,selected:a,value:l,label:s,disabled:r}=e,d=__rest(e,["baseClassName","class","index","selectedValue","selected","value","label","disabled"]);void 0===o?o=[]:Array.isArray(o)||(o=[o]);const c=a||o.includes(l);return h("option",Object.assign({class:clsx(`${t}__option`,{[`${t}__option--selected`]:c,[`${t}__option--disabled`]:r},n),selected:c,disabled:r,value:i},d),s)},NativeOptionListFc=({baseClassName:e,preKey:t,options:n,disabled:i,value:o,OptionProps:a={},OptionGroupProps:l={}})=>(null==n?void 0:n.length)?h(Fragment,null,n.map((s,r)=>{const d=[t,`-${r}`].join("");if("options"in s){if(!n.length)return null;const{label:t}=s,r=__rest(s,["label"]);return h("optgroup",Object.assign({class:clsx(`${e}__optgroup`,{[`${e}__optgroup--disabled`]:i}),key:d},l,{label:null==t?void 0:t.toString(),disabled:i}),h(NativeOptionListFc,Object.assign({baseClassName:e,OptionGroupProps:l,OptionProps:a,value:o,preKey:d},r)))}return"value"in s?h(NativeOptionFc,Object.assign({key:d,baseClassName:e},a,{index:d,selectedValue:o},s)):null})):null,NativeSelectFc=e=>{const{class:t,msg:n,touched:i,disabled:o,required:a,options:l,value:s,OptionProps:r,OptionGroupProps:d,ariaDescribedBy:c,hideLabel:p,label:u}=e,m=__rest(e,["class","msg","touched","disabled","required","options","value","OptionProps","OptionGroupProps","ariaDescribedBy","hideLabel","label"]),f=checkHasMsg(n,i),v="string"==typeof n?"error":null==n?void 0:n._type,_={"kol-select--disabled":Boolean(o),"kol-select--required":Boolean(a),"kol-select--touched":Boolean(i),[`kol-select--${v||"error"}`]:f},b=Object.assign(Object.assign({class:clsx("kol-select",_,t),required:a,disabled:o},getDefaultProps({ariaDescribedBy:c,hideLabel:p,label:u})),m);return h("select",Object.assign({},b),h(NativeOptionListFc,{baseClassName:"kol-select",options:l,value:s,OptionGroupProps:d,OptionProps:r}))};function getSelectProps(e){const{ariaDescribedBy:t}=getRenderStates(e),n={id:e._id,hideLabel:e._hideLabel,label:e._label,value:e._value,options:e._options,accessKey:e._accessKey,disabled:e._disabled,name:e._name,ariaDescribedBy:t,size:e._rows,multiple:e._multiple,required:e._required,touched:e._touched,msg:e._msg};return"_shortKey"in e&&(n["aria-keyshortcuts"]=e._shortKey),n}const SelectStateWrapper=e=>{var{state:t}=e,n=__rest(e,["state"]);return h(NativeSelectFc,Object.assign({},getSelectProps(t),n))};class SelectController extends InputIconController{constructor(e,t,n){super(e,t,n),this.keyOptionMap=new Map,this.getOptionByKey=e=>this.keyOptionMap.get(e),this.isValueInOptions=(e,t)=>void 0!==t.find(t=>"string"==typeof t.value?t.value===e:!!Array.isArray(t.options)&&this.isValueInOptions(e,t.options)),this.filterValuesInOptions=(e,t)=>e.filter(e=>void 0!==this.isValueInOptions(e,t)),this.afterPatchOptions=(e,t,n,i)=>{"_value"===i&&this.setFormAssociatedValue(e)},this.beforePatchOptions=(e,t)=>{const n=t.get("_value");void 0===n||Array.isArray(n)||t.set("_value",[n]);const i=t.has("_options")?t.get("_options"):this.component.state._options;if(Array.isArray(i)&&i.length>0){this.keyOptionMap.clear(),fillKeyOptionMap(this.keyOptionMap,i);const e=t.has("_value")?t.get("_value"):this.component.state._value,n=this.filterValuesInOptions(Array.isArray(e)&&e.length>0?e:[],i);!1===this.component._multiple&&0===n.length?t.set("_value",[i[0].value]):Array.isArray(e)&&n.length<e.length&&t.set("_value",n)}},this.component=e}validateOptions(e){validateOptionsWithOptgroup(this.component,e,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}validateMultiple(e){this.assertComponentValueMatchesMultiplicity(!0===e),validateMultiple(this.component,e,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}validateRequired(e){validateRequired(this.component,e)}validateRows(e){validateRows(this.component,e)}validateValue(e){this.assertValueMatchesMultiplicity(e),watchJsonArrayString(this.component,"_value",()=>!0,void 0===e?[]:Array.isArray(e)?e:[e],void 0,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}componentWillLoad(){super.componentWillLoad(),this.validateOptions(this.component._options),this.validateMultiple(this.component._multiple),this.validateRequired(this.component._required),this.validateRows(this.component._rows),this.validateValue(this.component._value)}assertValueMatchesMultiplicity(e){const t=Array.isArray(e);if(!0===this.component._multiple){if(void 0!==e&&!t)throw new Error(`↑ The schema for the property (_value) is not valid for multiple mode. Expected an array. The value will not be changed. (received = ${JSON.stringify(e)})`)}else if(t)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. (received = ${JSON.stringify(e)})`)}assertComponentValueMatchesMultiplicity(e){const t=this.component._value;if(e){if(void 0!==t&&!Array.isArray(t))throw new Error(`↑ The schema for the property (_value) is not valid for multiple mode. Expected an array. The value will not be changed. (current = ${JSON.stringify(t)})`)}else if(Array.isArray(t))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. (current = ${JSON.stringify(t)})`)}}const defaultStyleCss='@charset "UTF-8";\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type=\'checkbox\'], [type=\'radio\'], [type=\'range\']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don\'t want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field {\n display: grid;\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text::after {\n content: "*";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: "*";\n }\n .kol-input-container {\n background-color: white;\n display: grid;\n width: 100%;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n grid-template-columns: 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--end) {\n grid-template-columns: 1fr auto;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start):has(> .kol-input-container__adornment--end) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-select {\n width: 100%;\n /* needed hack for vertical alignment */\n }\n .kol-select:not(:disabled) {\n cursor: pointer;\n }\n .kol-select:not([multiple], [size]) {\n height: 2.75em;\n }\n .kol-select:focus {\n outline: none;\n }\n .kol-select__option:checked::before {\n content: "✓ ";\n }\n .kol-select[multiple] option {\n padding: calc((var(--a11y-min-size) - 16 * 1rem / var(--kolibri-root-font-size, 16)) / 2) 0.5em;\n }\n}',KolSelect$1=proxyCustomElement(class extends HTMLElement{async getValue(){return this._multiple?this.state._value:Array.isArray(this.state._value)&&this.state._value.length>0?this.state._value[0]:this.state._value}async kolFocus(){var e;null===(e=this.selectRef)||void 0===e||e.focus()}getFormFieldProps(){return{state:this.state,class:clsx("kol-form-field-select",{"kol-form-field--has-value":this.state._hasValue}),tooltipAlign:this._tooltipAlign,onClick:()=>{var e;return null===(e=this.selectRef)||void 0===e?void 0:e.focus()},alert:this.showAsAlert()}}getSelectProps(){return Object.assign(Object.assign({ref:this.catchRef,state:this.state},this.controller.onFacade),{onInput:this.onInput.bind(this),onChange:this.onChange.bind(this),onFocus:e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},onBlur:e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1}})}render(){return h(FormFieldStateWrapper,Object.assign({key:"8da4f1e8ccf2788b6a803b5f12f934f4efb7aea9"},this.getFormFieldProps()),h(InputContainerStateWrapperFc,{key:"866b50395d3859f859cadffd7dfebe197ec06a72",state:this.state},h("form",{key:"0d54f77ed083677fcef88da3ca291455a6ae11c8",onSubmit:e=>{e.preventDefault(),propagateSubmitEventToForm({form:this.host})}},h("input",{key:"cb127a25839560683f5ef32a6b6924a2033dff2e",type:"submit",hidden:!0}),h(SelectStateWrapper,Object.assign({key:"b92a71fb9409ac048cb6a91ca4f17ec7dca63930"},this.getSelectProps())))))}constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.catchRef=e=>{this.selectRef=e},this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._multiple=!1,this._required=!1,this._tooltipAlign="top",this._touched=!1,this.state={_hasValue:!1,_hideMsg:!1,_id:`id-${nonce()}`,_label:"",_multiple:!1,_options:[],_value:[]},this.inputHasFocus=!1,this.controller=new SelectController(this,"select",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(e){this.controller.validateAccessKey(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHideMsg(e){this.controller.validateHideMsg(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMsg(e){this.controller.validateMsg(e)}validateMultiple(e){this.controller.validateMultiple(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validateOptions(e){this.controller.validateOptions(e)}validateRequired(e){this.controller.validateRequired(e)}validateRows(e){this.controller.validateRows(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTabIndex(e){this.controller.validateTabIndex(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener(e=>this.state._hasValue=!!e)}onInput(e){var t;const n=Array.from((null===(t=this.selectRef)||void 0===t?void 0:t.options)||[]).filter(e=>e.selected).map(e=>{var t;return null===(t=this.controller.getOptionByKey(e.value))||void 0===t?void 0:t.value});if(this._multiple)this._value=n,this.controller.onFacade.onInput(e,!0,n);else{const t=n.length>0?n[0]:void 0;this._value=t,this.controller.onFacade.onInput(e,!0,t)}}onChange(e){this._multiple,this.controller.onFacade.onChange(e,this._value)}get host(){return this}static get watchers(){return{_accessKey:["validateAccessKey"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_msg:["validateMsg"],_multiple:["validateMultiple"],_name:["validateName"],_on:["validateOn"],_options:["validateOptions"],_required:["validateRequired"],_rows:["validateRows"],_shortKey:["validateShortKey"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}static get style(){return{default:defaultStyleCss}}},[289,"kol-select",{_accessKey:[1,"_access-key"],_disabled:[4],_hideMsg:[4,"_hide-msg"],_hideLabel:[4,"_hide-label"],_hint:[1],_icons:[1],_id:[1],_label:[1],_msg:[1],_multiple:[4],_name:[1],_on:[16],_options:[1],_required:[4],_shortKey:[1,"_short-key"],_rows:[2],_syncValueBySelector:[1,"_sync-value-by-selector"],_tabIndex:[2,"_tab-index"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_value:[1544],state:[32],inputHasFocus:[32],getValue:[64],kolFocus:[64]},void 0,{_accessKey:["validateAccessKey"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_msg:["validateMsg"],_multiple:["validateMultiple"],_name:["validateName"],_on:["validateOn"],_options:["validateOptions"],_required:["validateRequired"],_rows:["validateRows"],_shortKey:["validateShortKey"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-select"].forEach(e=>{if("kol-select"===e)customElements.get(e)||customElements.define(e,KolSelect$1)})}const KolSelect=KolSelect$1,defineCustomElement=defineCustomElement$1;export{KolSelect,defineCustomElement};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{c as clsx}from"./clsx.js";import{e as KolIconTag}from"./component-names.js";import{g as getRenderStates,F as FormFieldStateWrapper}from"./controller2.js";import{I as InputIconController,a as InputContainerStateWrapperFc}from"./controller-icon.js";import{I as InputStateWrapper}from"./InputStateWrapper.js";import{C as CustomSuggestionsToggleFc,a as CustomSuggestionsOptionsGroupFc,b as CustomSuggestionsOptionFc}from"./CustomSuggestionsToggle.js";import{t as translate}from"./i18n.js";import{n as nonce}from"./dev.utils.js";import{w as watchValidator,c as watchBoolean,N as watchNumber}from"./common.js";import{f as fillKeyOptionMap,b as validateOptions}from"./controller3.js";import{v as validatePlaceholder}from"./placeholder.js";import{v as validateRequired}from"./required.js";class SingleSelectController extends InputIconController{constructor(e,t,n){super(e,t,n),this.keyOptionMap=new Map,this.afterPatchOptions=(e,t,n,i)=>{"_value"===i&&this.setFormAssociatedValue(e)},this.beforePatchOptions=(e,t)=>{const n=t.has("_options")?t.get("_options"):this.component.state._options;Array.isArray(n)&&n.length>0&&(this.keyOptionMap.clear(),fillKeyOptionMap(this.keyOptionMap,n))},this.component=e}validateOptions(e){validateOptions(this.component,e,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}validateRequired(e){validateRequired(this.component,e)}validateValue(e){watchValidator(this.component,"_value",e=>void 0!==e,new Set(["KoliBriUnknown"]),e)}validatePlaceholder(e){validatePlaceholder(this.component,e)}validateHideClearButton(e){watchBoolean(this.component,"_hideClearButton",e)}validateRows(e){watchNumber(this.component,"_rows",e)}componentWillLoad(){super.componentWillLoad(),this.validateOptions(this.component._options),this.validateRequired(this.component._required),this.validateValue(this.component._value),this.validatePlaceholder(this.component._placeholder),this.validateHideClearButton(this.component._hideClearButton),this.validateRows(this.component._rows)}}const defaultStyleCss="/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-custom-suggestions-option {\n line-height: 1.5;\n white-space: normal;\n cursor: pointer;\n overflow-wrap: break-word;\n }\n .kol-custom-suggestions-options-group--cursor-hidden .kol-custom-suggestions-option {\n cursor: none !important;\n }\n .kol-custom-suggestions-options-group {\n background-color: white;\n display: block;\n position: absolute;\n z-index: 2;\n max-height: calc(250 * 1rem / var(--kolibri-root-font-size, 16));\n margin: 0;\n padding: 0;\n overflow-x: hidden;\n overflow-y: auto;\n list-style-type: none;\n }\n .kol-custom-suggestions-toggle {\n display: flex;\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n align-items: center;\n }\n .kol-custom-suggestions-toggle:not(:disabled) {\n cursor: pointer;\n }\n .kol-form-field {\n display: grid;\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text::after {\n content: \"*\";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: \"*\";\n }\n .kol-input-container {\n background-color: white;\n display: grid;\n width: 100%;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n grid-template-columns: 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--end) {\n grid-template-columns: 1fr auto;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start):has(> .kol-input-container__adornment--end) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-input {\n width: 100%;\n min-width: var(--a11y-min-size);\n }\n .kol-input:focus {\n outline: none;\n }\n .kol-single-select__delete {\n cursor: pointer;\n }\n .kol-single-select__delete--disabled {\n cursor: not-allowed;\n }\n .kol-single-select__no-results-message {\n display: flex;\n min-height: calc(50 * 1rem / var(--kolibri-root-font-size, 16));\n align-items: center;\n justify-content: center;\n cursor: default;\n }\n .kol-single-select .kol-custom-suggestions-options-group {\n max-height: calc(40 * 1rem / var(--kolibri-root-font-size, 16) * var(--visible-options, 5) + 2 * 1rem / var(--kolibri-root-font-size, 16)) !important;\n }\n}",KolSingleSelect$1=proxyCustomElement(class extends HTMLElement{async getValue(){return this._value}async kolFocus(){var e;null===(e=this.refInput)||void 0===e||e.focus()}onBlur(){var e,t,n;const i=null===(e=this.state._options)||void 0===e?void 0:e.find(e=>{var t,n;return(null===(t=e.label)||void 0===t?void 0:t.toLowerCase())===(null===(n=this._inputValue)||void 0===n?void 0:n.toLowerCase())});i?this.selectOption(i):(this._inputValue=null===(n=null===(t=this.state._options)||void 0===t?void 0:t.find(e=>e.value===this._value))||void 0===n?void 0:n.label,this._filteredOptions=[...this.state._options]),this._isOpen=!1,this._hasOpened=!1}createEventWithTarget(e,t){const n=new CustomEvent(e,{bubbles:!0,detail:t});return this.refInput&&(Object.defineProperty(n,"target",{value:this.refInput}),Object.defineProperty(n,"currentTarget",{value:this.refInput})),n}clearSelection(){if(!(!0===this.state._disabled)){const e=null;this._focusedOptionIndex=-1,this._value=e,this._inputValue="",this._filteredOptions=[...this.state._options];const t=this.createEventWithTarget("input",{name:this.state._name,value:e}),n=this.createEventWithTarget("change",{name:this.state._name,value:e});this.controller.onFacade.onInput(t,!0,{value:e}),this.controller.onFacade.onChange(n,{value:e})}}selectOption(e){var t,n;if(e.value===this._value)return this._inputValue=e.label,void(this._filteredOptions=[...this.state._options]);this._value=e.value,this._inputValue=e.label;const i=this.createEventWithTarget("input",{name:null!==(t=this.state._name)&&void 0!==t?t:"",value:e.value}),o=this.createEventWithTarget("change",{name:null!==(n=this.state._name)&&void 0!==n?n:"",value:e.value});this.controller.onFacade.onInput(i,!1,e.value),this.controller.onFacade.onChange(o,e.value),this._filteredOptions=[...this.state._options],this.controller.setFormAssociatedValue(this._value)}onInput(e){const t=e.target;this._inputValue=t.value,this._isOpen=!0,this.setFilteredOptionsByQuery(t.value),this._focusedOptionIndex=-1}handleKeyDownDropdown(e){1===e.key.length&&/[a-z0-9]/i.test(e.key)&&(e.preventDefault(),this._isOpen=!0,this.focusSuggestionStartingWith(e.key))}setFilteredOptionsByQuery(e){""===(null==e?void 0:e.trim())?this._filteredOptions=[...this.state._options]:Array.isArray(this.state._options)&&this.state._options.length>0&&e.length>0&&(this._filteredOptions=this.state._options.filter(t=>{var n,i;return null===(i=null===(n=t.label)||void 0===n?void 0:n.toLowerCase())||void 0===i?void 0:i.includes(null==e?void 0:e.toLowerCase())}))}moveFocus(e){if(!this._filteredOptions)return;let t=this._focusedOptionIndex+e;t>=this._filteredOptions.length&&(t=0),t<0&&(t=this._filteredOptions.length-1),this._focusedOptionIndex=t,this.focusOption(this._focusedOptionIndex)}focusOption(e){if(this.refOptions){const t=this.refOptions[e];null==t||t.focus()}}focusSuggestionStartingWith(e){const t=e.toLowerCase(),n=Array.isArray(this._filteredOptions)&&this._filteredOptions.findIndex(e=>e.label.toLowerCase().startsWith(t));"number"==typeof n&&(this._focusedOptionIndex=n,this.focusOption(n))}getFormFieldProps(){return{state:this.state,class:"kol-single-select",tooltipAlign:this._tooltipAlign,onClick:()=>{var e;return null===(e=this.refInput)||void 0===e?void 0:e.focus()},alert:this.showAsAlert()}}getInputProps(){const{ariaDescribedBy:e}=getRenderStates(this.state),t=!0===this.state._disabled;return Object.assign(Object.assign({"aria-activedescendant":this._isOpen&&this._focusedOptionIndex>=0?`option-${this._focusedOptionIndex}`:void 0,"aria-autocomplete":"both","aria-controls":"listbox","aria-describedby":e.length>0?e.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,"aria-keyshortcuts":this.state._shortKey,accessKey:this.state._accessKey,autocapitalize:"off",autocorrect:"off",class:"kol-single-select__input",disabled:t,name:this.state._name,placeholder:this.state._placeholder,ref:this.catchRef,required:this.state._required,state:this.state,type:"text",value:this._inputValue},this.controller.onFacade),{onChange:this.onChange.bind(this),onClick:this.onClick.bind(this),onInput:this.onInput.bind(this),onFocus:e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},onBlur:e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1}})}render(){var e;const t=!0===this.state._disabled;return h(FormFieldStateWrapper,Object.assign({key:"2b5a713a2e92acfad9df7e92be6f9f76d50a6ec3"},this.getFormFieldProps()),h(InputContainerStateWrapperFc,{key:"34463eb1e93d3d47ed2971c8d7ca6e2e10cf98f6",state:this.state},h("div",{key:"52e358cac067801ffbf09c826bc3ae3fe89a5822",class:"kol-single-select__group"},h(InputStateWrapper,Object.assign({key:"c73a67a263d8a48a2e205019a03d1ad4bc4fefe4"},this.getInputProps())),this._inputValue&&!this.state._hideClearButton&&h(KolIconTag,{key:"ca9eb8dd6f20cbc0e599f65862f0e601e438ed80",_icons:"codicon codicon-close","data-testid":"single-select-delete",_label:this.translateDeleteSelection,onClick:()=>{var e;this.clearSelection(),null===(e=this.refInput)||void 0===e||e.focus()},class:clsx("kol-single-select__delete",{"kol-single-select__delete--disabled":t})}),h(CustomSuggestionsToggleFc,{key:"89934aae9c38683724faab14fc08ede3ac509b9e",onClick:this.toggleListbox.bind(this),disabled:t})),this._isOpen&&!t&&h(CustomSuggestionsOptionsGroupFc,{key:"cde42384d14b755bd5c73a033cb6f13038320717",blockSuggestionMouseOver:this.blockSuggestionMouseOver,onKeyDown:this.handleKeyDownDropdown.bind(this),style:{"--visible-options":`${null!==(e=this._rows)&&void 0!==e?e:5}`}},Array.isArray(this._filteredOptions)&&this._filteredOptions.length>0?this._filteredOptions.map((e,t)=>h(CustomSuggestionsOptionFc,{index:t,option:e.label,searchTerm:this._inputValue,ref:e=>{e&&(this.refOptions[t]=e)},selected:this._value===e.value,onClick:t=>{var n;this.selectOption(e),null===(n=this.refInput)||void 0===n||n.focus(),this.toggleListbox(t),this._isOpen=!1,this._hasOpened=!1},onMouseOver:()=>{this.blockSuggestionMouseOver||(this._focusedOptionIndex=t,this.focusOption(t))},onFocus:()=>{this._focusedOptionIndex=t,this.focusOption(t)},onKeyDown:t=>{var n;"Enter"!==t.key&&"NumpadEnter"!==t.key||(this.selectOption(e),null===(n=this.refInput)||void 0===n||n.focus(),this.toggleListbox(t),t.preventDefault())}})):h("li",{class:"kol-single-select__no-results-message"},this.translateNoResultsMessage," "))))}handleFocusOut(){setTimeout(()=>{var e;(null===(e=this.host)||void 0===e?void 0:e.contains(document.activeElement))||this.onBlur()},0)}handleWindowBlur(){this.onBlur()}handleKeyDown(e){var t,n;const i=(t,n)=>{var i;e.preventDefault(),void 0!==t&&(this._isOpen=t,t||null===(i=this.refInput)||void 0===i||i.focus()),null==n||n()};switch(e.key){case"Down":case"ArrowDown":this.blockSuggestionMouseOver=!0,i(!0,()=>this.moveFocus(1));break;case"Up":case"ArrowUp":this.blockSuggestionMouseOver=!0,i(!0,()=>this.moveFocus(-1));break;case"Tab":this._isOpen&&(this._isOpen=!this._isOpen,null===(t=this.refInput)||void 0===t||t.focus());break;case"Esc":case"Escape":this._hasOpened=!1,this._isOpen=!1,i(!1);break;case" ":this._isOpen?Array.isArray(this._filteredOptions)&&this._filteredOptions.length>0&&(this.selectOption(this._filteredOptions[this._focusedOptionIndex]),null===(n=this.refInput)||void 0===n||n.focus(),i(!1)):this.toggleListbox(e);break;case"NumpadEnter":case"Enter":this.toggleListbox(e),this._hasOpened=!1,this._isOpen=!1;break;case"Home":this.blockSuggestionMouseOver=!0,i(void 0,()=>{this._isOpen&&(this._focusedOptionIndex=0,this.focusOption(this._focusedOptionIndex))});break;case"End":this.blockSuggestionMouseOver=!0,i(void 0,()=>{this._isOpen&&(this._focusedOptionIndex=this._filteredOptions?this._filteredOptions.length-1:0,this.focusOption(this._focusedOptionIndex))});break;case"PageUp":this.blockSuggestionMouseOver=!0,i(void 0,()=>this._isOpen&&this.moveFocus(-10));break;case"PageDown":this.blockSuggestionMouseOver=!0,i(void 0,()=>this._isOpen&&this.moveFocus(10))}}constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.refOptions=[],this.translateDeleteSelection=translate("kol-delete-selection"),this.translateNoResultsMessage=translate("kol-no-results-message"),this.catchRef=e=>{this.refInput=e},this.toggleListbox=e=>{var t;null==e||e.preventDefault();if(!(!0===this.state._disabled||this._hasOpened)){this._isOpen=!0,this._hasOpened=!0,null===(t=this.refInput)||void 0===t||t.focus();const e=Array.isArray(this._filteredOptions)?this._filteredOptions.findIndex(e=>e.label===this._inputValue):-1;this._focusedOptionIndex=e>=0?e:-1,this.focusOption(this._focusedOptionIndex)}},this._focusedOptionIndex=-1,this._isOpen=!1,this._filteredOptions=[],this._inputValue="",this.blockSuggestionMouseOver=!1,this._hasOpened=!1,this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._required=!1,this._tooltipAlign="top",this._touched=!1,this._value=null,this._hideClearButton=!1,this.state={_hideMsg:!1,_id:`id-${nonce()}`,_label:"",_options:[],_hideClearButton:!1},this.inputHasFocus=!1,this.controller=new SingleSelectController(this,"single-select",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validatePlaceholder(e){this.controller.validatePlaceholder(e)}validateAccessKey(e){this.controller.validateAccessKey(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHideMsg(e){this.controller.validateHideMsg(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validateOptions(e){this.controller.validateOptions(e),this._filteredOptions=e,this.updateInputValue(this._value)}validateRequired(e){this.controller.validateRequired(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e),this.oldValue=e,this.updateInputValue(e)}validateHideClearButton(e){this.controller.validateHideClearButton(e)}validateRows(e){this.controller.validateRows(e)}handleMouseEvent(){this.blockSuggestionMouseOver=!1}updateInputValue(e){if(Array.isArray(this._options)){const t=this._options.find(t=>t.value===e);this._inputValue=t?String(t.label):""}}componentWillLoad(){this.refOptions=[],this._touched=!0===this._touched,this.controller.componentWillLoad(),this.oldValue=this._value,this._filteredOptions=this.state._options,this.updateInputValue(this._value)}onChange(e){var t,n;this.oldValue!==(null===(t=this.refInput)||void 0===t?void 0:t.value)&&(this.oldValue=null===(n=this.refInput)||void 0===n?void 0:n.value),this._isOpen||this.controller.onFacade.onChange(e,this._value)}onClick(e){this.toggleListbox(e),this.controller.onFacade.onClick(e)}static get delegatesFocus(){return!0}get host(){return this}static get watchers(){return{_placeholder:["validatePlaceholder"],_accessKey:["validateAccessKey"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_options:["validateOptions"],_required:["validateRequired"],_shortKey:["validateShortKey"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"],"_hideClearButton ":["validateHideClearButton"],_rows:["validateRows"]}}static get style(){return{default:defaultStyleCss}}},[305,"kol-single-select",{_accessKey:[1,"_access-key"],_placeholder:[1],_disabled:[4],_hideMsg:[4,"_hide-msg"],_hideLabel:[4,"_hide-label"],_hint:[1],_icons:[1],_id:[1],_label:[1],_msg:[1],_name:[1],_on:[16],_options:[1],_required:[4],_shortKey:[1,"_short-key"],_syncValueBySelector:[1,"_sync-value-by-selector"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_value:[1544],_hideClearButton:[4,"_hide-clear-button"],_rows:[2],_isOpen:[32],_filteredOptions:[32],_inputValue:[32],blockSuggestionMouseOver:[32],_hasOpened:[32],state:[32],inputHasFocus:[32],getValue:[64],kolFocus:[64]},[[8,"focusout","handleFocusOut"],[8,"blur","handleWindowBlur"],[0,"keydown","handleKeyDown"],[1,"mousemove","handleMouseEvent"]],{_placeholder:["validatePlaceholder"],_accessKey:["validateAccessKey"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_options:["validateOptions"],_required:["validateRequired"],_shortKey:["validateShortKey"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"],"_hideClearButton ":["validateHideClearButton"],_rows:["validateRows"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-single-select"].forEach(e=>{if("kol-single-select"===e)customElements.get(e)||customElements.define(e,KolSingleSelect$1)})}const KolSingleSelect=KolSingleSelect$1,defineCustomElement=defineCustomElement$1;export{KolSingleSelect,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{c as clsx}from"./clsx.js";import{e as KolIconTag}from"./component-names.js";import{g as getRenderStates,F as FormFieldStateWrapper}from"./controller2.js";import{I as InputIconController,a as InputContainerStateWrapperFc}from"./controller-icon.js";import{I as InputStateWrapper}from"./InputStateWrapper.js";import{C as CustomSuggestionsToggleFc,a as CustomSuggestionsOptionsGroupFc,b as CustomSuggestionsOptionFc}from"./CustomSuggestionsToggle.js";import{t as translate}from"./i18n.js";import{n as nonce}from"./dev.utils.js";import{w as watchValidator,c as watchBoolean,N as watchNumber}from"./common.js";import{f as fillKeyOptionMap,b as validateOptions}from"./controller3.js";import{v as validatePlaceholder}from"./placeholder.js";import{v as validateRequired}from"./required.js";class SingleSelectController extends InputIconController{constructor(e,t,n){super(e,t,n),this.keyOptionMap=new Map,this.afterPatchOptions=(e,t,n,i)=>{"_value"===i&&this.setFormAssociatedValue(e)},this.beforePatchOptions=(e,t)=>{const n=t.has("_options")?t.get("_options"):this.component.state._options;Array.isArray(n)&&n.length>0&&(this.keyOptionMap.clear(),fillKeyOptionMap(this.keyOptionMap,n))},this.component=e}validateOptions(e){validateOptions(this.component,e,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}validateRequired(e){validateRequired(this.component,e)}validateValue(e){watchValidator(this.component,"_value",e=>void 0!==e,new Set(["KoliBriUnknown"]),e)}validatePlaceholder(e){validatePlaceholder(this.component,e)}validateHideClearButton(e){watchBoolean(this.component,"_hideClearButton",e)}validateRows(e){watchNumber(this.component,"_rows",e)}componentWillLoad(){super.componentWillLoad(),this.validateOptions(this.component._options),this.validateRequired(this.component._required),this.validateValue(this.component._value),this.validatePlaceholder(this.component._placeholder),this.validateHideClearButton(this.component._hideClearButton),this.validateRows(this.component._rows)}}const defaultStyleCss="/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-custom-suggestions-option {\n line-height: 1.5;\n white-space: normal;\n cursor: pointer;\n overflow-wrap: break-word;\n }\n .kol-custom-suggestions-options-group--cursor-hidden .kol-custom-suggestions-option {\n cursor: none !important;\n }\n .kol-custom-suggestions-options-group {\n background-color: white;\n display: block;\n position: absolute;\n z-index: 2;\n max-height: calc(250 * 1rem / var(--kolibri-root-font-size, 16));\n margin: 0;\n padding: 0;\n overflow-x: hidden;\n overflow-y: auto;\n list-style-type: none;\n }\n .kol-custom-suggestions-toggle {\n display: flex;\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n align-items: center;\n }\n .kol-custom-suggestions-toggle:not(:disabled) {\n cursor: pointer;\n }\n .kol-form-field {\n display: grid;\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text::after {\n content: \"*\";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: \"*\";\n }\n .kol-input-container {\n background-color: white;\n display: grid;\n width: 100%;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n grid-template-columns: 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--end) {\n grid-template-columns: 1fr auto;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start):has(> .kol-input-container__adornment--end) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-input {\n width: 100%;\n min-width: var(--a11y-min-size);\n }\n .kol-input:focus {\n outline: none;\n }\n .kol-single-select__delete {\n cursor: pointer;\n }\n .kol-single-select__delete--disabled {\n cursor: not-allowed;\n }\n .kol-single-select__no-results-message {\n display: flex;\n min-height: calc(50 * 1rem / var(--kolibri-root-font-size, 16));\n align-items: center;\n justify-content: center;\n cursor: default;\n }\n .kol-single-select .kol-custom-suggestions-options-group {\n max-height: calc(40 * 1rem / var(--kolibri-root-font-size, 16) * var(--visible-options, 5) + 2 * 1rem / var(--kolibri-root-font-size, 16)) !important;\n }\n}",KolSingleSelect$1=proxyCustomElement(class extends HTMLElement{async getValue(){return this._value}async kolFocus(){var e;null===(e=this.refInput)||void 0===e||e.focus()}onBlur(){var e,t,n;const i=null===(e=this.state._options)||void 0===e?void 0:e.find(e=>{var t,n;return(null===(t=e.label)||void 0===t?void 0:t.toLowerCase())===(null===(n=this._inputValue)||void 0===n?void 0:n.toLowerCase())});i?this.selectOption(i):(this._inputValue=null===(n=null===(t=this.state._options)||void 0===t?void 0:t.find(e=>e.value===this._value))||void 0===n?void 0:n.label,this._filteredOptions=[...this.state._options]),this._isOpen=!1,this._hasOpened=!1}createEventWithTarget(e,t){const n=new CustomEvent(e,{bubbles:!0,detail:t});return this.refInput&&(Object.defineProperty(n,"target",{value:this.refInput}),Object.defineProperty(n,"currentTarget",{value:this.refInput})),n}clearSelection(){if(!(!0===this.state._disabled)){const e=null;this._focusedOptionIndex=-1,this._value=e,this._inputValue="",this._filteredOptions=[...this.state._options];const t=this.createEventWithTarget("input",{name:this.state._name,value:e}),n=this.createEventWithTarget("change",{name:this.state._name,value:e});this.controller.onFacade.onInput(t,!0,{value:e}),this.controller.onFacade.onChange(n,{value:e})}}selectOption(e){var t,n;if(e.value===this._value)return this._inputValue=e.label,void(this._filteredOptions=[...this.state._options]);this._value=e.value,this._inputValue=e.label;const i=this.createEventWithTarget("input",{name:null!==(t=this.state._name)&&void 0!==t?t:"",value:e.value}),o=this.createEventWithTarget("change",{name:null!==(n=this.state._name)&&void 0!==n?n:"",value:e.value});this.controller.onFacade.onInput(i,!1,e.value),this.controller.onFacade.onChange(o,e.value),this._filteredOptions=[...this.state._options],this.controller.setFormAssociatedValue(this._value)}onInput(e){const t=e.target;this._inputValue=t.value,this._isOpen=!0,this.setFilteredOptionsByQuery(t.value),this._focusedOptionIndex=-1}handleKeyDownDropdown(e){1===e.key.length&&/[a-z0-9]/i.test(e.key)&&(e.preventDefault(),this._isOpen=!0,this.focusSuggestionStartingWith(e.key))}setFilteredOptionsByQuery(e){""===(null==e?void 0:e.trim())?this._filteredOptions=[...this.state._options]:Array.isArray(this.state._options)&&this.state._options.length>0&&e.length>0&&(this._filteredOptions=this.state._options.filter(t=>{var n,i;return null===(i=null===(n=t.label)||void 0===n?void 0:n.toLowerCase())||void 0===i?void 0:i.includes(null==e?void 0:e.toLowerCase())}))}moveFocus(e){if(!this._filteredOptions)return;let t=this._focusedOptionIndex+e;t>=this._filteredOptions.length&&(t=0),t<0&&(t=this._filteredOptions.length-1),this._focusedOptionIndex=t,this.focusOption(this._focusedOptionIndex)}focusOption(e){if(this.refOptions){const t=this.refOptions[e];null==t||t.focus()}}focusSuggestionStartingWith(e){const t=e.toLowerCase(),n=Array.isArray(this._filteredOptions)&&this._filteredOptions.findIndex(e=>e.label.toLowerCase().startsWith(t));"number"==typeof n&&(this._focusedOptionIndex=n,this.focusOption(n))}getFormFieldProps(){return{state:this.state,class:"kol-single-select",tooltipAlign:this._tooltipAlign,onClick:()=>{var e;return null===(e=this.refInput)||void 0===e?void 0:e.focus()},alert:this.showAsAlert()}}getInputProps(){const{ariaDescribedBy:e}=getRenderStates(this.state),t=!0===this.state._disabled;return Object.assign(Object.assign({"aria-activedescendant":this._isOpen&&this._focusedOptionIndex>=0?`option-${this._focusedOptionIndex}`:void 0,"aria-autocomplete":"both","aria-controls":"listbox","aria-describedby":e.length>0?e.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,"aria-keyshortcuts":this.state._shortKey,accessKey:this.state._accessKey,autocapitalize:"off",autocorrect:"off",class:"kol-single-select__input",disabled:t,name:this.state._name,placeholder:this.state._placeholder,ref:this.catchRef,required:this.state._required,state:this.state,type:"text",value:this._inputValue},this.controller.onFacade),{onChange:this.onChange.bind(this),onClick:this.onClick.bind(this),onInput:this.onInput.bind(this),onFocus:e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},onBlur:e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1}})}render(){var e;const t=!0===this.state._disabled;return h(FormFieldStateWrapper,Object.assign({key:"e2cf3b85addd01646a534c14892c8891b800b7ce"},this.getFormFieldProps()),h(InputContainerStateWrapperFc,{key:"4aa11a93338d3244adbc24b2fdbeb210f6bcefc7",state:this.state},h("div",{key:"fefbbd217a319c3755d49a4d533e000f0ff7bce5",class:"kol-single-select__group"},h(InputStateWrapper,Object.assign({key:"1bcf38931fccff130458d6bc1ddcbdbe0a3cc182"},this.getInputProps())),this._inputValue&&!this.state._hideClearButton&&h(KolIconTag,{key:"32667712e9b5f58dae75aeb54f616a5d1cbcd759",_icons:"codicon codicon-close","data-testid":"single-select-delete",_label:this.translateDeleteSelection,onClick:()=>{var e;this.clearSelection(),null===(e=this.refInput)||void 0===e||e.focus()},class:clsx("kol-single-select__delete",{"kol-single-select__delete--disabled":t})}),h(CustomSuggestionsToggleFc,{key:"72a745808952b57d8a5a22edf4170e6ee6cbf57a",onClick:this.toggleListbox.bind(this),disabled:t})),this._isOpen&&!t&&h(CustomSuggestionsOptionsGroupFc,{key:"212d41e037edd61b5b798218172ed38104cc5111",blockSuggestionMouseOver:this.blockSuggestionMouseOver,onKeyDown:this.handleKeyDownDropdown.bind(this),style:{"--visible-options":`${null!==(e=this._rows)&&void 0!==e?e:5}`}},Array.isArray(this._filteredOptions)&&this._filteredOptions.length>0?this._filteredOptions.map((e,t)=>h(CustomSuggestionsOptionFc,{index:t,option:e.label,searchTerm:this._inputValue,ref:e=>{e&&(this.refOptions[t]=e)},selected:this._value===e.value,onClick:t=>{var n;this.selectOption(e),null===(n=this.refInput)||void 0===n||n.focus(),this.toggleListbox(t),this._isOpen=!1,this._hasOpened=!1},onMouseOver:()=>{this.blockSuggestionMouseOver||(this._focusedOptionIndex=t,this.focusOption(t))},onFocus:()=>{this._focusedOptionIndex=t,this.focusOption(t)},onKeyDown:t=>{var n;"Enter"!==t.key&&"NumpadEnter"!==t.key||(this.selectOption(e),null===(n=this.refInput)||void 0===n||n.focus(),this.toggleListbox(t),t.preventDefault())}})):h("li",{class:"kol-single-select__no-results-message"},this.translateNoResultsMessage," "))))}handleFocusOut(){setTimeout(()=>{var e;(null===(e=this.host)||void 0===e?void 0:e.contains(document.activeElement))||this.onBlur()},0)}handleWindowBlur(){this.onBlur()}handleKeyDown(e){var t,n;const i=(t,n)=>{var i;e.preventDefault(),void 0!==t&&(this._isOpen=t,t||null===(i=this.refInput)||void 0===i||i.focus()),null==n||n()};switch(e.key){case"Down":case"ArrowDown":this.blockSuggestionMouseOver=!0,i(!0,()=>this.moveFocus(1));break;case"Up":case"ArrowUp":this.blockSuggestionMouseOver=!0,i(!0,()=>this.moveFocus(-1));break;case"Tab":this._isOpen&&(this._isOpen=!this._isOpen,null===(t=this.refInput)||void 0===t||t.focus());break;case"Esc":case"Escape":this._hasOpened=!1,this._isOpen=!1,i(!1);break;case" ":this._isOpen?Array.isArray(this._filteredOptions)&&this._filteredOptions.length>0&&(this.selectOption(this._filteredOptions[this._focusedOptionIndex]),null===(n=this.refInput)||void 0===n||n.focus(),i(!1)):this.toggleListbox(e);break;case"NumpadEnter":case"Enter":this.toggleListbox(e),this._hasOpened=!1,this._isOpen=!1;break;case"Home":this.blockSuggestionMouseOver=!0,i(void 0,()=>{this._isOpen&&(this._focusedOptionIndex=0,this.focusOption(this._focusedOptionIndex))});break;case"End":this.blockSuggestionMouseOver=!0,i(void 0,()=>{this._isOpen&&(this._focusedOptionIndex=this._filteredOptions?this._filteredOptions.length-1:0,this.focusOption(this._focusedOptionIndex))});break;case"PageUp":this.blockSuggestionMouseOver=!0,i(void 0,()=>this._isOpen&&this.moveFocus(-10));break;case"PageDown":this.blockSuggestionMouseOver=!0,i(void 0,()=>this._isOpen&&this.moveFocus(10))}}constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.refOptions=[],this.translateDeleteSelection=translate("kol-delete-selection"),this.translateNoResultsMessage=translate("kol-no-results-message"),this.catchRef=e=>{this.refInput=e},this.toggleListbox=e=>{var t;null==e||e.preventDefault();if(!(!0===this.state._disabled||this._hasOpened)){this._isOpen=!0,this._hasOpened=!0,null===(t=this.refInput)||void 0===t||t.focus();const e=Array.isArray(this._filteredOptions)?this._filteredOptions.findIndex(e=>e.label===this._inputValue):-1;this._focusedOptionIndex=e>=0?e:-1,this.focusOption(this._focusedOptionIndex)}},this._focusedOptionIndex=-1,this._isOpen=!1,this._filteredOptions=[],this._inputValue="",this.blockSuggestionMouseOver=!1,this._hasOpened=!1,this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._required=!1,this._tooltipAlign="top",this._touched=!1,this._value=null,this._hideClearButton=!1,this.state={_hideMsg:!1,_id:`id-${nonce()}`,_label:"",_options:[],_hideClearButton:!1},this.inputHasFocus=!1,this.controller=new SingleSelectController(this,"single-select",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validatePlaceholder(e){this.controller.validatePlaceholder(e)}validateAccessKey(e){this.controller.validateAccessKey(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHideMsg(e){this.controller.validateHideMsg(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validateOptions(e){this.controller.validateOptions(e),this._filteredOptions=e,this.updateInputValue(this._value)}validateRequired(e){this.controller.validateRequired(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e),this.oldValue=e,this.updateInputValue(e)}validateHideClearButton(e){this.controller.validateHideClearButton(e)}validateRows(e){this.controller.validateRows(e)}handleMouseEvent(){this.blockSuggestionMouseOver=!1}updateInputValue(e){if(Array.isArray(this._options)){const t=this._options.find(t=>t.value===e);this._inputValue=t?String(t.label):""}}componentWillLoad(){this.refOptions=[],this._touched=!0===this._touched,this.controller.componentWillLoad(),this.oldValue=this._value,this._filteredOptions=this.state._options,this.updateInputValue(this._value)}onChange(e){var t,n;this.oldValue!==(null===(t=this.refInput)||void 0===t?void 0:t.value)&&(this.oldValue=null===(n=this.refInput)||void 0===n?void 0:n.value),this._isOpen||this.controller.onFacade.onChange(e,this._value)}onClick(e){this.toggleListbox(e),this.controller.onFacade.onClick(e)}static get delegatesFocus(){return!0}get host(){return this}static get watchers(){return{_placeholder:["validatePlaceholder"],_accessKey:["validateAccessKey"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_options:["validateOptions"],_required:["validateRequired"],_shortKey:["validateShortKey"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"],"_hideClearButton ":["validateHideClearButton"],_rows:["validateRows"]}}static get style(){return{default:defaultStyleCss}}},[305,"kol-single-select",{_accessKey:[1,"_access-key"],_placeholder:[1],_disabled:[4],_hideMsg:[4,"_hide-msg"],_hideLabel:[4,"_hide-label"],_hint:[1],_icons:[1],_id:[1],_label:[1],_msg:[1],_name:[1],_on:[16],_options:[1],_required:[4],_shortKey:[1,"_short-key"],_syncValueBySelector:[1,"_sync-value-by-selector"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_value:[1544],_hideClearButton:[4,"_hide-clear-button"],_rows:[2],_isOpen:[32],_filteredOptions:[32],_inputValue:[32],blockSuggestionMouseOver:[32],_hasOpened:[32],state:[32],inputHasFocus:[32],getValue:[64],kolFocus:[64]},[[8,"focusout","handleFocusOut"],[8,"blur","handleWindowBlur"],[0,"keydown","handleKeyDown"],[1,"mousemove","handleMouseEvent"]],{_placeholder:["validatePlaceholder"],_accessKey:["validateAccessKey"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_options:["validateOptions"],_required:["validateRequired"],_shortKey:["validateShortKey"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"],"_hideClearButton ":["validateHideClearButton"],_rows:["validateRows"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-single-select"].forEach(e=>{if("kol-single-select"===e)customElements.get(e)||customElements.define(e,KolSingleSelect$1)})}const KolSingleSelect=KolSingleSelect$1,defineCustomElement=defineCustomElement$1;export{KolSingleSelect,defineCustomElement};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import"./common.js";import{v as validateLabel}from"./label.js";import{r as removeNavLabel,a as addNavLabel}from"./unique-nav-labels.js";import{w as watchNavLinks}from"./validation2.js";import{f as KolLinkWcTag}from"./component-names.js";const defaultStyleCss="/* forward the rem function */\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n .kol-skip-nav__list {\n display: grid;\n place-items: center;\n list-style: none;\n }\n .kol-skip-nav__list-item {\n height: 0;\n }\n .kol-skip-nav .kol-link {\n position: absolute;\n left: calc(-99999 * 1rem / var(--kolibri-root-font-size, 16));\n z-index: 9999999;\n line-height: 1;\n }\n .kol-skip-nav .kol-link:focus {\n background-color: #fff;\n position: unset;\n left: unset;\n }\n}",KolSkipNav$1=proxyCustomElement(class extends HTMLElement{constructor(n){super(),!1!==n&&this.__registerHost(),this.__attachShadow(),this.state={_label:"",_links:[]}}render(){return h("nav",{key:"912f8ac6ce63cddd0fa738db9ef6ff987b2a2db9",class:"kol-skip-nav","aria-label":this.state._label},h("ul",{key:"79991f7d918e9bbf6891d479804f2520356f2a41",class:"kol-skip-nav__list"},this.state._links.map((n,e)=>h("li",{class:"kol-skip-nav__list-item",key:e},h(KolLinkWcTag,Object.assign({},n))))))}validateLabel(n,e,t=!1){t||removeNavLabel(this.state._label),validateLabel(this,n,{required:!0}),addNavLabel(this.state._label)}validateLinks(n){watchNavLinks("KolSkipNav",this,n)}componentWillLoad(){this.validateLabel(this._label,void 0,!0),this.validateLinks(this._links)}disconnectedCallback(){removeNavLabel(this.state._label)}static get watchers(){return{_label:["validateLabel"],_links:["validateLinks"]}}static get style(){return{default:defaultStyleCss}}},[289,"kol-skip-nav",{_label:[1],_links:[1],state:[32]},void 0,{_label:["validateLabel"],_links:["validateLinks"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-skip-nav"].forEach(n=>{if("kol-skip-nav"===n)customElements.get(n)||customElements.define(n,KolSkipNav$1)})}const KolSkipNav=KolSkipNav$1,defineCustomElement=defineCustomElement$1;export{KolSkipNav,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import"./common.js";import{v as validateLabel}from"./label.js";import{r as removeNavLabel,a as addNavLabel}from"./unique-nav-labels.js";import{w as watchNavLinks}from"./validation2.js";import{f as KolLinkWcTag}from"./component-names.js";const defaultStyleCss="/* forward the rem function */\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n .kol-skip-nav__list {\n display: grid;\n place-items: center;\n list-style: none;\n }\n .kol-skip-nav__list-item {\n height: 0;\n }\n .kol-skip-nav .kol-link {\n position: absolute;\n left: calc(-99999 * 1rem / var(--kolibri-root-font-size, 16));\n z-index: 9999999;\n line-height: 1;\n }\n .kol-skip-nav .kol-link:focus {\n background-color: #fff;\n position: unset;\n left: unset;\n }\n}",KolSkipNav$1=proxyCustomElement(class extends HTMLElement{constructor(n){super(),!1!==n&&this.__registerHost(),this.__attachShadow(),this.state={_label:"",_links:[]}}render(){return h("nav",{key:"a515409957ec96cb079350271ee28d62c99b93c3",class:"kol-skip-nav","aria-label":this.state._label},h("ul",{key:"de4b6fb648d18295d68eec0372b7c97cfcfb8e6a",class:"kol-skip-nav__list"},this.state._links.map((n,e)=>h("li",{class:"kol-skip-nav__list-item",key:e},h(KolLinkWcTag,Object.assign({},n))))))}validateLabel(n,e,t=!1){t||removeNavLabel(this.state._label),validateLabel(this,n,{required:!0}),addNavLabel(this.state._label)}validateLinks(n){watchNavLinks("KolSkipNav",this,n)}componentWillLoad(){this.validateLabel(this._label,void 0,!0),this.validateLinks(this._links)}disconnectedCallback(){removeNavLabel(this.state._label)}static get watchers(){return{_label:["validateLabel"],_links:["validateLinks"]}}static get style(){return{default:defaultStyleCss}}},[289,"kol-skip-nav",{_label:[1],_links:[1],state:[32]},void 0,{_label:["validateLabel"],_links:["validateLinks"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-skip-nav"].forEach(n=>{if("kol-skip-nav"===n)customElements.get(n)||customElements.define(n,KolSkipNav$1)})}const KolSkipNav=KolSkipNav$1,defineCustomElement=defineCustomElement$1;export{KolSkipNav,defineCustomElement};