@public-ui/components 2.0.1 → 2.0.2

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 (495) hide show
  1. package/custom-elements.json +1 -1
  2. package/dist/cjs/{InternalUnderlinedAccessKey-db20fe4c.js → InternalUnderlinedAccessKey-6642b2c7.js} +1 -1
  3. package/dist/cjs/{InternalUnderlinedAccessKey-db20fe4c.js.map → InternalUnderlinedAccessKey-6642b2c7.js.map} +1 -1
  4. package/dist/cjs/{a11y.tipps-5093e030.js → a11y.tipps-bde4c917.js} +1 -1
  5. package/dist/cjs/{a11y.tipps-5093e030.js.map → a11y.tipps-bde4c917.js.map} +1 -1
  6. package/dist/cjs/access-key-0cc8c925.js +4 -0
  7. package/dist/cjs/{access-key-08e22c70.js.map → access-key-0cc8c925.js.map} +1 -1
  8. package/dist/cjs/{align-floating-elements-dca98687.js → align-floating-elements-656b8edb.js} +1 -1
  9. package/dist/cjs/align-floating-elements-656b8edb.js.map +1 -0
  10. package/dist/cjs/{alignment-da95c567.js → alignment-ed625336.js} +1 -1
  11. package/dist/cjs/{alignment-da95c567.js.map → alignment-ed625336.js.map} +1 -1
  12. package/dist/cjs/alternative-button-link-role-d4424d08.js +4 -0
  13. package/dist/cjs/{alternative-button-link-role-46c7e9ff.js.map → alternative-button-link-role-d4424d08.js.map} +1 -1
  14. package/dist/cjs/{app-globals-dbba0fd7.js → app-globals-0b0132d3.js} +1 -1
  15. package/dist/cjs/{app-globals-dbba0fd7.js.map → app-globals-0b0132d3.js.map} +1 -1
  16. package/dist/cjs/{associated.controller-665c978d.js → associated.controller-b24b75d0.js} +1 -1
  17. package/dist/cjs/{associated.controller-665c978d.js.map → associated.controller-b24b75d0.js.map} +1 -1
  18. package/dist/cjs/{color-f3eb202a.js → color-7a4690e4.js} +1 -1
  19. package/dist/cjs/{color-f3eb202a.js.map → color-7a4690e4.js.map} +1 -1
  20. package/dist/cjs/{controller-3a053b42.js → controller-0ccb739c.js} +1 -1
  21. package/dist/cjs/{controller-3a053b42.js.map → controller-0ccb739c.js.map} +1 -1
  22. package/dist/cjs/{controller-318aaac7.js → controller-2d5e8b0b.js} +1 -1
  23. package/dist/cjs/{controller-318aaac7.js.map → controller-2d5e8b0b.js.map} +1 -1
  24. package/dist/cjs/{controller-5a5b8671.js → controller-3c7a8401.js} +1 -1
  25. package/dist/cjs/{controller-5a5b8671.js.map → controller-3c7a8401.js.map} +1 -1
  26. package/dist/cjs/{controller-8f3bdef3.js → controller-924d172b.js} +1 -1
  27. package/dist/cjs/{controller-8f3bdef3.js.map → controller-924d172b.js.map} +1 -1
  28. package/dist/cjs/{controller-644ec366.js → controller-e36ad432.js} +1 -1
  29. package/dist/cjs/{controller-644ec366.js.map → controller-e36ad432.js.map} +1 -1
  30. package/dist/cjs/{controller-icon-870a91fe.js → controller-icon-71e37377.js} +1 -1
  31. package/dist/cjs/{controller-icon-870a91fe.js.map → controller-icon-71e37377.js.map} +1 -1
  32. package/dist/cjs/custom-class-00d4c432.js +4 -0
  33. package/dist/cjs/{custom-class-fe018ec9.js.map → custom-class-00d4c432.js.map} +1 -1
  34. package/dist/cjs/{dev.utils-dd133f0a.js → dev.utils-a6b6f115.js} +1 -1
  35. package/dist/cjs/dev.utils-a6b6f115.js.map +1 -0
  36. package/dist/cjs/devtools-5d316ec1.js +4 -0
  37. package/dist/cjs/devtools-5d316ec1.js.map +1 -0
  38. package/dist/cjs/has-closer-135c8b18.js +4 -0
  39. package/dist/cjs/{has-closer-e0792c7f.js.map → has-closer-135c8b18.js.map} +1 -1
  40. package/dist/cjs/hide-label-869c662f.js +4 -0
  41. package/dist/cjs/{hide-label-69a12ef6.js.map → hide-label-869c662f.js.map} +1 -1
  42. package/dist/cjs/{i18n-9b1797b5.js → i18n-3094a3c4.js} +1 -1
  43. package/dist/cjs/{i18n-9b1797b5.js.map → i18n-3094a3c4.js.map} +1 -1
  44. package/dist/cjs/{icons-7d782feb.js → icons-cd5e767b.js} +1 -1
  45. package/dist/cjs/{icons-7d782feb.js.map → icons-cd5e767b.js.map} +1 -1
  46. package/dist/cjs/image-source-4b6e0c0e.js +4 -0
  47. package/dist/cjs/{image-source-9b7df5ba.js.map → image-source-4b6e0c0e.js.map} +1 -1
  48. package/dist/cjs/index-3145a30d.js +4 -0
  49. package/dist/cjs/index-3145a30d.js.map +1 -0
  50. package/dist/cjs/{index-814a048a.js → index-e779e8b0.js} +1 -1
  51. package/dist/cjs/{index-814a048a.js.map → index-e779e8b0.js.map} +1 -1
  52. package/dist/cjs/index.cjs.js +1 -1
  53. package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
  54. package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
  55. package/dist/cjs/kol-alert-wc_2.cjs.entry.js +1 -1
  56. package/dist/cjs/kol-alert.cjs.entry.js +1 -1
  57. package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
  58. package/dist/cjs/kol-avatar.cjs.entry.js +1 -1
  59. package/dist/cjs/kol-badge.cjs.entry.js +1 -1
  60. package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
  61. package/dist/cjs/kol-button-group-wc.cjs.entry.js +1 -1
  62. package/dist/cjs/kol-button-group.cjs.entry.js +1 -1
  63. package/dist/cjs/kol-button-link-text-switch.cjs.entry.js +1 -1
  64. package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
  65. package/dist/cjs/kol-button-wc_2.cjs.entry.js +1 -1
  66. package/dist/cjs/kol-button-wc_2.cjs.entry.js.map +1 -1
  67. package/dist/cjs/kol-button.cjs.entry.js +1 -1
  68. package/dist/cjs/kol-card.cjs.entry.js +1 -1
  69. package/dist/cjs/kol-details.cjs.entry.js +1 -1
  70. package/dist/cjs/kol-form.cjs.entry.js +1 -1
  71. package/dist/cjs/kol-heading.cjs.entry.js +1 -1
  72. package/dist/cjs/kol-icon.cjs.entry.js +1 -1
  73. package/dist/cjs/kol-image.cjs.entry.js +1 -1
  74. package/dist/cjs/kol-indented-text.cjs.entry.js +1 -1
  75. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  76. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  77. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  78. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  79. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  80. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  81. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  82. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  83. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  84. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  85. package/dist/cjs/kol-input.cjs.entry.js +1 -1
  86. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  87. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  88. package/dist/cjs/kol-link-group.cjs.entry.js +1 -1
  89. package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
  90. package/dist/cjs/kol-link.cjs.entry.js +1 -1
  91. package/dist/cjs/kol-logo.cjs.entry.js +1 -1
  92. package/dist/cjs/kol-modal.cjs.entry.js +1 -1
  93. package/dist/cjs/kol-modal.cjs.entry.js.map +1 -1
  94. package/dist/cjs/kol-nav.cjs.entry.js +1 -1
  95. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  96. package/dist/cjs/kol-popover-wc.cjs.entry.js +1 -1
  97. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  98. package/dist/cjs/kol-quote.cjs.entry.js +1 -1
  99. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  100. package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
  101. package/dist/cjs/kol-span-wc.cjs.entry.js +1 -1
  102. package/dist/cjs/kol-span.cjs.entry.js +1 -1
  103. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  104. package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
  105. package/dist/cjs/kol-symbol.cjs.entry.js +1 -1
  106. package/dist/cjs/kol-table.cjs.entry.js +1 -1
  107. package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
  108. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  109. package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
  110. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  111. package/dist/cjs/kolibri.cjs.js +1 -1
  112. package/dist/cjs/kolibri.cjs.js.map +1 -1
  113. package/dist/cjs/{label-1ffb616a.js → label-a5fa1288.js} +1 -1
  114. package/dist/cjs/{label-1ffb616a.js.map → label-a5fa1288.js.map} +1 -1
  115. package/dist/cjs/loader.cjs.js +1 -1
  116. package/dist/cjs/open-ca19e687.js +4 -0
  117. package/dist/cjs/{open-4fe1ba4b.js.map → open-ca19e687.js.map} +1 -1
  118. package/dist/cjs/{prop.validators-85dcd797.js → prop.validators-03eee51d.js} +1 -1
  119. package/dist/cjs/{prop.validators-85dcd797.js.map → prop.validators-03eee51d.js.map} +1 -1
  120. package/dist/cjs/rows-7e3a7f8b.js +4 -0
  121. package/dist/cjs/{rows-e1b2cbc4.js.map → rows-7e3a7f8b.js.map} +1 -1
  122. package/dist/cjs/show-48f559f5.js +4 -0
  123. package/dist/cjs/{show-5514164d.js.map → show-48f559f5.js.map} +1 -1
  124. package/dist/cjs/suggestions-2d56c664.js +4 -0
  125. package/dist/cjs/{suggestions-c6f511ef.js.map → suggestions-2d56c664.js.map} +1 -1
  126. package/dist/cjs/{tab-index-9a2f9acd.js → tab-index-3943c150.js} +1 -1
  127. package/dist/cjs/{tab-index-9a2f9acd.js.map → tab-index-3943c150.js.map} +1 -1
  128. package/dist/cjs/{tooltip-align-231659b9.js → tooltip-align-d904bd68.js} +1 -1
  129. package/dist/cjs/{tooltip-align-231659b9.js.map → tooltip-align-d904bd68.js.map} +1 -1
  130. package/dist/cjs/{validation-fb5cac9f.js → validation-a0c362ef.js} +1 -1
  131. package/dist/cjs/{validation-fb5cac9f.js.map → validation-a0c362ef.js.map} +1 -1
  132. package/dist/cjs/{validation-ffe8a5ab.js → validation-c3b2105a.js} +1 -1
  133. package/dist/cjs/{validation-ffe8a5ab.js.map → validation-c3b2105a.js.map} +1 -1
  134. package/dist/components/align-floating-elements.js +1 -1
  135. package/dist/components/align-floating-elements.js.map +1 -1
  136. package/dist/components/color.js +1 -1
  137. package/dist/components/component.js +1 -1
  138. package/dist/components/component15.js +1 -1
  139. package/dist/components/component2.js +1 -1
  140. package/dist/components/component3.js +1 -1
  141. package/dist/components/component3.js.map +1 -1
  142. package/dist/components/component4.js +1 -1
  143. package/dist/components/component5.js +1 -1
  144. package/dist/components/component6.js +1 -1
  145. package/dist/components/component9.js +1 -1
  146. package/dist/components/controller.js +1 -1
  147. package/dist/components/controller2.js +1 -1
  148. package/dist/components/controller4.js +1 -1
  149. package/dist/components/devtools.js +1 -1
  150. package/dist/components/devtools.js.map +1 -1
  151. package/dist/components/has-closer.js +1 -1
  152. package/dist/components/i18n.js +1 -1
  153. package/dist/components/i18n.js.map +1 -1
  154. package/dist/components/image-source.js +1 -1
  155. package/dist/components/kol-form.js +1 -1
  156. package/dist/components/kol-image.js +1 -1
  157. package/dist/components/kol-input-checkbox.js +1 -1
  158. package/dist/components/kol-input-color.js +1 -1
  159. package/dist/components/kol-input-date.js +1 -1
  160. package/dist/components/kol-input-email.js +1 -1
  161. package/dist/components/kol-input-file.js +1 -1
  162. package/dist/components/kol-input-number.js +1 -1
  163. package/dist/components/kol-input-text.js +1 -1
  164. package/dist/components/kol-kolibri.js +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-progress.js +1 -1
  169. package/dist/components/kol-quote.js +1 -1
  170. package/dist/components/kol-symbol.js +1 -1
  171. package/dist/components/kol-table.js +1 -1
  172. package/dist/components/kol-textarea.js +1 -1
  173. package/dist/components/label.js +1 -1
  174. package/dist/components/open.js +1 -1
  175. package/dist/components/prop.validators.js +1 -1
  176. package/dist/components/prop.validators.js.map +1 -1
  177. package/dist/components/show.js +1 -1
  178. package/dist/components/suggestions.js +1 -1
  179. package/dist/components/tab-index.js +1 -1
  180. package/dist/esm/{InternalUnderlinedAccessKey-e3698cee.js → InternalUnderlinedAccessKey-3d146073.js} +1 -1
  181. package/dist/esm/{InternalUnderlinedAccessKey-e3698cee.js.map → InternalUnderlinedAccessKey-3d146073.js.map} +1 -1
  182. package/dist/esm/{a11y.tipps-f367a979.js → a11y.tipps-f14bff66.js} +1 -1
  183. package/dist/esm/{a11y.tipps-f367a979.js.map → a11y.tipps-f14bff66.js.map} +1 -1
  184. package/dist/esm/{access-key-d70aa275.js → access-key-d9d3ed1b.js} +1 -1
  185. package/dist/esm/{access-key-d70aa275.js.map → access-key-d9d3ed1b.js.map} +1 -1
  186. package/dist/esm/{align-floating-elements-cadb5c5b.js → align-floating-elements-e1edfaae.js} +1 -1
  187. package/dist/esm/align-floating-elements-e1edfaae.js.map +1 -0
  188. package/dist/esm/{alignment-493b6c84.js → alignment-3d2d9391.js} +1 -1
  189. package/dist/esm/{alignment-493b6c84.js.map → alignment-3d2d9391.js.map} +1 -1
  190. package/dist/esm/alternative-button-link-role-30b77bb6.js +4 -0
  191. package/dist/esm/{alternative-button-link-role-0fc029bf.js.map → alternative-button-link-role-30b77bb6.js.map} +1 -1
  192. package/dist/esm/app-globals-b8186895.js +4 -0
  193. package/dist/esm/{app-globals-f7f4352c.js.map → app-globals-b8186895.js.map} +1 -1
  194. package/dist/esm/{associated.controller-700d5133.js → associated.controller-e642039e.js} +1 -1
  195. package/dist/esm/{associated.controller-700d5133.js.map → associated.controller-e642039e.js.map} +1 -1
  196. package/dist/esm/{color-afc2e34f.js → color-d4c99af3.js} +1 -1
  197. package/dist/esm/{color-afc2e34f.js.map → color-d4c99af3.js.map} +1 -1
  198. package/dist/esm/{controller-17eb7878.js → controller-3577ccfd.js} +1 -1
  199. package/dist/esm/{controller-17eb7878.js.map → controller-3577ccfd.js.map} +1 -1
  200. package/dist/esm/{controller-60b830eb.js → controller-7d1c3e92.js} +1 -1
  201. package/dist/esm/{controller-60b830eb.js.map → controller-7d1c3e92.js.map} +1 -1
  202. package/dist/esm/{controller-6e772d91.js → controller-8698d9f4.js} +1 -1
  203. package/dist/esm/{controller-6e772d91.js.map → controller-8698d9f4.js.map} +1 -1
  204. package/dist/esm/{controller-ae07d1c7.js → controller-9df5563d.js} +1 -1
  205. package/dist/esm/{controller-ae07d1c7.js.map → controller-9df5563d.js.map} +1 -1
  206. package/dist/esm/{controller-e23535f2.js → controller-b2e189a7.js} +1 -1
  207. package/dist/esm/{controller-e23535f2.js.map → controller-b2e189a7.js.map} +1 -1
  208. package/dist/esm/{controller-icon-01cabd99.js → controller-icon-508a2cb1.js} +1 -1
  209. package/dist/esm/{controller-icon-01cabd99.js.map → controller-icon-508a2cb1.js.map} +1 -1
  210. package/dist/esm/custom-class-6cd3b804.js +4 -0
  211. package/dist/esm/{custom-class-603a7fda.js.map → custom-class-6cd3b804.js.map} +1 -1
  212. package/dist/esm/{dev.utils-da51d5d8.js → dev.utils-889226ab.js} +1 -1
  213. package/dist/esm/dev.utils-889226ab.js.map +1 -0
  214. package/dist/esm/devtools-cc168b70.js +4 -0
  215. package/dist/esm/devtools-cc168b70.js.map +1 -0
  216. package/dist/esm/{has-closer-091d5cc7.js → has-closer-0601d93e.js} +1 -1
  217. package/dist/esm/{has-closer-091d5cc7.js.map → has-closer-0601d93e.js.map} +1 -1
  218. package/dist/esm/{hide-label-e711f812.js → hide-label-6593df3f.js} +1 -1
  219. package/dist/esm/{hide-label-e711f812.js.map → hide-label-6593df3f.js.map} +1 -1
  220. package/dist/esm/{i18n-d92de40a.js → i18n-9a4c8edc.js} +1 -1
  221. package/dist/esm/{i18n-d92de40a.js.map → i18n-9a4c8edc.js.map} +1 -1
  222. package/dist/esm/{icons-1ad89985.js → icons-44b68720.js} +1 -1
  223. package/dist/esm/{icons-1ad89985.js.map → icons-44b68720.js.map} +1 -1
  224. package/dist/esm/{image-source-f76f6ad4.js → image-source-4b04e9f2.js} +1 -1
  225. package/dist/esm/{image-source-f76f6ad4.js.map → image-source-4b04e9f2.js.map} +1 -1
  226. package/dist/esm/index-12eec578.js +4 -0
  227. package/dist/esm/{index-9fc5c44a.js.map → index-12eec578.js.map} +1 -1
  228. package/dist/esm/index-5dfe6d77.js +4 -0
  229. package/dist/esm/index-5dfe6d77.js.map +1 -0
  230. package/dist/esm/index.js +1 -1
  231. package/dist/esm/kol-abbr.entry.js +1 -1
  232. package/dist/esm/kol-accordion.entry.js +1 -1
  233. package/dist/esm/kol-alert-wc_2.entry.js +1 -1
  234. package/dist/esm/kol-alert.entry.js +1 -1
  235. package/dist/esm/kol-avatar-wc.entry.js +1 -1
  236. package/dist/esm/kol-avatar.entry.js +1 -1
  237. package/dist/esm/kol-badge.entry.js +1 -1
  238. package/dist/esm/kol-breadcrumb.entry.js +1 -1
  239. package/dist/esm/kol-button-group-wc.entry.js +1 -1
  240. package/dist/esm/kol-button-group.entry.js +1 -1
  241. package/dist/esm/kol-button-link-text-switch.entry.js +1 -1
  242. package/dist/esm/kol-button-link.entry.js +1 -1
  243. package/dist/esm/kol-button-wc_2.entry.js +1 -1
  244. package/dist/esm/kol-button-wc_2.entry.js.map +1 -1
  245. package/dist/esm/kol-button.entry.js +1 -1
  246. package/dist/esm/kol-card.entry.js +1 -1
  247. package/dist/esm/kol-details.entry.js +1 -1
  248. package/dist/esm/kol-form.entry.js +1 -1
  249. package/dist/esm/kol-heading.entry.js +1 -1
  250. package/dist/esm/kol-icon.entry.js +1 -1
  251. package/dist/esm/kol-image.entry.js +1 -1
  252. package/dist/esm/kol-indented-text.entry.js +1 -1
  253. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  254. package/dist/esm/kol-input-color.entry.js +1 -1
  255. package/dist/esm/kol-input-date.entry.js +1 -1
  256. package/dist/esm/kol-input-email.entry.js +1 -1
  257. package/dist/esm/kol-input-file.entry.js +1 -1
  258. package/dist/esm/kol-input-number.entry.js +1 -1
  259. package/dist/esm/kol-input-password.entry.js +1 -1
  260. package/dist/esm/kol-input-radio.entry.js +1 -1
  261. package/dist/esm/kol-input-range.entry.js +1 -1
  262. package/dist/esm/kol-input-text.entry.js +1 -1
  263. package/dist/esm/kol-input.entry.js +1 -1
  264. package/dist/esm/kol-kolibri.entry.js +1 -1
  265. package/dist/esm/kol-link-button.entry.js +1 -1
  266. package/dist/esm/kol-link-group.entry.js +1 -1
  267. package/dist/esm/kol-link-wc.entry.js +1 -1
  268. package/dist/esm/kol-link.entry.js +1 -1
  269. package/dist/esm/kol-logo.entry.js +1 -1
  270. package/dist/esm/kol-modal.entry.js +1 -1
  271. package/dist/esm/kol-modal.entry.js.map +1 -1
  272. package/dist/esm/kol-nav.entry.js +1 -1
  273. package/dist/esm/kol-pagination.entry.js +1 -1
  274. package/dist/esm/kol-popover-wc.entry.js +1 -1
  275. package/dist/esm/kol-progress.entry.js +1 -1
  276. package/dist/esm/kol-quote.entry.js +1 -1
  277. package/dist/esm/kol-select.entry.js +1 -1
  278. package/dist/esm/kol-skip-nav.entry.js +1 -1
  279. package/dist/esm/kol-span-wc.entry.js +1 -1
  280. package/dist/esm/kol-span.entry.js +1 -1
  281. package/dist/esm/kol-spin.entry.js +1 -1
  282. package/dist/esm/kol-split-button.entry.js +1 -1
  283. package/dist/esm/kol-symbol.entry.js +1 -1
  284. package/dist/esm/kol-table.entry.js +1 -1
  285. package/dist/esm/kol-tabs.entry.js +1 -1
  286. package/dist/esm/kol-textarea.entry.js +1 -1
  287. package/dist/esm/kol-toast-container.entry.js +1 -1
  288. package/dist/esm/kol-version.entry.js +1 -1
  289. package/dist/esm/kolibri.js +1 -1
  290. package/dist/esm/kolibri.js.map +1 -1
  291. package/dist/esm/{label-8ddb917e.js → label-8258848f.js} +1 -1
  292. package/dist/esm/{label-8ddb917e.js.map → label-8258848f.js.map} +1 -1
  293. package/dist/esm/loader.js +1 -1
  294. package/dist/esm/{open-0bdcff02.js → open-329b7907.js} +1 -1
  295. package/dist/esm/{open-0bdcff02.js.map → open-329b7907.js.map} +1 -1
  296. package/dist/esm/{prop.validators-f887ad3b.js → prop.validators-c12923a5.js} +1 -1
  297. package/dist/esm/{prop.validators-f887ad3b.js.map → prop.validators-c12923a5.js.map} +1 -1
  298. package/dist/esm/{rows-77cd583c.js → rows-14d6fb92.js} +1 -1
  299. package/dist/esm/{rows-77cd583c.js.map → rows-14d6fb92.js.map} +1 -1
  300. package/dist/esm/{show-8341c904.js → show-9a06c90e.js} +1 -1
  301. package/dist/esm/{show-8341c904.js.map → show-9a06c90e.js.map} +1 -1
  302. package/dist/esm/{suggestions-40d68773.js → suggestions-dc12a293.js} +1 -1
  303. package/dist/esm/{suggestions-40d68773.js.map → suggestions-dc12a293.js.map} +1 -1
  304. package/dist/esm/{tab-index-2206620f.js → tab-index-9e8a3c00.js} +1 -1
  305. package/dist/esm/{tab-index-2206620f.js.map → tab-index-9e8a3c00.js.map} +1 -1
  306. package/dist/esm/{tooltip-align-00398d75.js → tooltip-align-a3d27a89.js} +1 -1
  307. package/dist/esm/{tooltip-align-00398d75.js.map → tooltip-align-a3d27a89.js.map} +1 -1
  308. package/dist/esm/validation-17e52787.js +4 -0
  309. package/dist/esm/{validation-34db9bcf.js.map → validation-17e52787.js.map} +1 -1
  310. package/dist/esm/{validation-503191a4.js → validation-3c0b31d7.js} +1 -1
  311. package/dist/esm/{validation-503191a4.js.map → validation-3c0b31d7.js.map} +1 -1
  312. package/dist/kolibri/InternalUnderlinedAccessKey-3d146073.js +4 -0
  313. package/dist/kolibri/{a11y.tipps-f367a979.js → a11y.tipps-f14bff66.js} +1 -1
  314. package/dist/kolibri/access-key-d9d3ed1b.js +4 -0
  315. package/dist/kolibri/{align-floating-elements-cadb5c5b.js → align-floating-elements-e1edfaae.js} +1 -1
  316. package/dist/kolibri/{align-floating-elements-cadb5c5b.js.map → align-floating-elements-e1edfaae.js.map} +1 -1
  317. package/dist/kolibri/{alignment-493b6c84.js → alignment-3d2d9391.js} +1 -1
  318. package/dist/kolibri/alternative-button-link-role-30b77bb6.js +4 -0
  319. package/dist/kolibri/app-globals-b8186895.js +4 -0
  320. package/dist/kolibri/{app-globals-f7f4352c.js.map → app-globals-b8186895.js.map} +1 -1
  321. package/dist/kolibri/{associated.controller-700d5133.js → associated.controller-e642039e.js} +1 -1
  322. package/dist/kolibri/{color-afc2e34f.js → color-d4c99af3.js} +1 -1
  323. package/dist/kolibri/{controller-17eb7878.js → controller-3577ccfd.js} +1 -1
  324. package/dist/kolibri/{controller-60b830eb.js → controller-7d1c3e92.js} +1 -1
  325. package/dist/kolibri/{controller-6e772d91.js → controller-8698d9f4.js} +1 -1
  326. package/dist/kolibri/{controller-ae07d1c7.js → controller-9df5563d.js} +1 -1
  327. package/dist/kolibri/{controller-e23535f2.js → controller-b2e189a7.js} +1 -1
  328. package/dist/kolibri/controller-icon-508a2cb1.js +4 -0
  329. package/dist/kolibri/custom-class-6cd3b804.js +4 -0
  330. package/dist/kolibri/{dev.utils-da51d5d8.js → dev.utils-889226ab.js} +1 -1
  331. package/dist/kolibri/dev.utils-889226ab.js.map +1 -0
  332. package/dist/kolibri/devtools-cc168b70.js +4 -0
  333. package/dist/kolibri/devtools-cc168b70.js.map +1 -0
  334. package/dist/kolibri/has-closer-0601d93e.js +4 -0
  335. package/dist/kolibri/hide-label-6593df3f.js +4 -0
  336. package/dist/kolibri/{i18n-d92de40a.js → i18n-9a4c8edc.js} +1 -1
  337. package/dist/kolibri/{icons-1ad89985.js → icons-44b68720.js} +1 -1
  338. package/dist/kolibri/image-source-4b04e9f2.js +4 -0
  339. package/dist/kolibri/{index-9fc5c44a.js → index-12eec578.js} +1 -1
  340. package/dist/kolibri/index-12eec578.js.map +1 -0
  341. package/dist/kolibri/index-5dfe6d77.js +5 -0
  342. package/dist/kolibri/index-5dfe6d77.js.map +1 -0
  343. package/dist/kolibri/index.esm.js +1 -1
  344. package/dist/kolibri/kol-abbr.entry.js +1 -1
  345. package/dist/kolibri/kol-accordion.entry.js +1 -1
  346. package/dist/kolibri/kol-alert-wc_2.entry.js +1 -1
  347. package/dist/kolibri/kol-alert.entry.js +1 -1
  348. package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
  349. package/dist/kolibri/kol-avatar.entry.js +1 -1
  350. package/dist/kolibri/kol-badge.entry.js +1 -1
  351. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  352. package/dist/kolibri/kol-button-group-wc.entry.js +1 -1
  353. package/dist/kolibri/kol-button-group.entry.js +1 -1
  354. package/dist/kolibri/kol-button-link-text-switch.entry.js +1 -1
  355. package/dist/kolibri/kol-button-link.entry.js +1 -1
  356. package/dist/kolibri/kol-button-wc_2.entry.js +1 -1
  357. package/dist/kolibri/kol-button-wc_2.entry.js.map +1 -1
  358. package/dist/kolibri/kol-button.entry.js +1 -1
  359. package/dist/kolibri/kol-card.entry.js +1 -1
  360. package/dist/kolibri/kol-details.entry.js +1 -1
  361. package/dist/kolibri/kol-form.entry.js +1 -1
  362. package/dist/kolibri/kol-heading.entry.js +1 -1
  363. package/dist/kolibri/kol-icon.entry.js +1 -1
  364. package/dist/kolibri/kol-image.entry.js +1 -1
  365. package/dist/kolibri/kol-indented-text.entry.js +1 -1
  366. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  367. package/dist/kolibri/kol-input-color.entry.js +1 -1
  368. package/dist/kolibri/kol-input-date.entry.js +1 -1
  369. package/dist/kolibri/kol-input-email.entry.js +1 -1
  370. package/dist/kolibri/kol-input-file.entry.js +1 -1
  371. package/dist/kolibri/kol-input-number.entry.js +1 -1
  372. package/dist/kolibri/kol-input-password.entry.js +1 -1
  373. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  374. package/dist/kolibri/kol-input-range.entry.js +1 -1
  375. package/dist/kolibri/kol-input-text.entry.js +1 -1
  376. package/dist/kolibri/kol-input.entry.js +1 -1
  377. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  378. package/dist/kolibri/kol-link-button.entry.js +1 -1
  379. package/dist/kolibri/kol-link-group.entry.js +1 -1
  380. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  381. package/dist/kolibri/kol-link.entry.js +1 -1
  382. package/dist/kolibri/kol-logo.entry.js +1 -1
  383. package/dist/kolibri/kol-modal.entry.js +1 -1
  384. package/dist/kolibri/kol-modal.entry.js.map +1 -1
  385. package/dist/kolibri/kol-nav.entry.js +1 -1
  386. package/dist/kolibri/kol-nav.entry.js.map +1 -1
  387. package/dist/kolibri/kol-pagination.entry.js +1 -1
  388. package/dist/kolibri/kol-popover-wc.entry.js +1 -1
  389. package/dist/kolibri/kol-progress.entry.js +1 -1
  390. package/dist/kolibri/kol-quote.entry.js +1 -1
  391. package/dist/kolibri/kol-select.entry.js +1 -1
  392. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  393. package/dist/kolibri/kol-span-wc.entry.js +1 -1
  394. package/dist/kolibri/kol-span.entry.js +1 -1
  395. package/dist/kolibri/kol-spin.entry.js +1 -1
  396. package/dist/kolibri/kol-split-button.entry.js +1 -1
  397. package/dist/kolibri/kol-symbol.entry.js +1 -1
  398. package/dist/kolibri/kol-symbol.entry.js.map +1 -1
  399. package/dist/kolibri/kol-table.entry.js +1 -1
  400. package/dist/kolibri/kol-tabs.entry.js +1 -1
  401. package/dist/kolibri/kol-textarea.entry.js +1 -1
  402. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  403. package/dist/kolibri/kol-version.entry.js +1 -1
  404. package/dist/kolibri/kolibri.esm.js +1 -1
  405. package/dist/kolibri/kolibri.esm.js.map +1 -1
  406. package/dist/kolibri/{label-8ddb917e.js → label-8258848f.js} +1 -1
  407. package/dist/kolibri/open-329b7907.js +4 -0
  408. package/dist/kolibri/{prop.validators-f887ad3b.js → prop.validators-c12923a5.js} +1 -1
  409. package/dist/kolibri/rows-14d6fb92.js +4 -0
  410. package/dist/kolibri/show-9a06c90e.js +4 -0
  411. package/dist/kolibri/{suggestions-40d68773.js → suggestions-dc12a293.js} +1 -1
  412. package/dist/kolibri/tab-index-9e8a3c00.js +4 -0
  413. package/dist/kolibri/{tab-index-2206620f.js.map → tab-index-9e8a3c00.js.map} +1 -1
  414. package/dist/kolibri/tooltip-align-a3d27a89.js +4 -0
  415. package/dist/kolibri/validation-17e52787.js +4 -0
  416. package/dist/kolibri/{validation-503191a4.js → validation-3c0b31d7.js} +1 -1
  417. package/dist/types/utils/dev.utils.d.ts +2 -2
  418. package/doc/toaster.md +6 -0
  419. package/package.json +1 -1
  420. package/dist/cjs/access-key-08e22c70.js +0 -4
  421. package/dist/cjs/align-floating-elements-dca98687.js.map +0 -1
  422. package/dist/cjs/alternative-button-link-role-46c7e9ff.js +0 -4
  423. package/dist/cjs/custom-class-fe018ec9.js +0 -4
  424. package/dist/cjs/dev.utils-dd133f0a.js.map +0 -1
  425. package/dist/cjs/devtools-59e9f930.js +0 -4
  426. package/dist/cjs/devtools-59e9f930.js.map +0 -1
  427. package/dist/cjs/has-closer-e0792c7f.js +0 -4
  428. package/dist/cjs/hide-label-69a12ef6.js +0 -4
  429. package/dist/cjs/image-source-9b7df5ba.js +0 -4
  430. package/dist/cjs/index-de77e597.js +0 -5
  431. package/dist/cjs/index-de77e597.js.map +0 -1
  432. package/dist/cjs/open-4fe1ba4b.js +0 -4
  433. package/dist/cjs/rows-e1b2cbc4.js +0 -4
  434. package/dist/cjs/show-5514164d.js +0 -4
  435. package/dist/cjs/suggestions-c6f511ef.js +0 -4
  436. package/dist/esm/align-floating-elements-cadb5c5b.js.map +0 -1
  437. package/dist/esm/alternative-button-link-role-0fc029bf.js +0 -4
  438. package/dist/esm/app-globals-f7f4352c.js +0 -4
  439. package/dist/esm/custom-class-603a7fda.js +0 -4
  440. package/dist/esm/dev.utils-da51d5d8.js.map +0 -1
  441. package/dist/esm/devtools-308d0386.js +0 -4
  442. package/dist/esm/devtools-308d0386.js.map +0 -1
  443. package/dist/esm/index-6ea18cec.js +0 -5
  444. package/dist/esm/index-6ea18cec.js.map +0 -1
  445. package/dist/esm/index-9fc5c44a.js +0 -4
  446. package/dist/esm/validation-34db9bcf.js +0 -4
  447. package/dist/kolibri/InternalUnderlinedAccessKey-e3698cee.js +0 -4
  448. package/dist/kolibri/access-key-d70aa275.js +0 -4
  449. package/dist/kolibri/alternative-button-link-role-0fc029bf.js +0 -4
  450. package/dist/kolibri/app-globals-f7f4352c.js +0 -4
  451. package/dist/kolibri/controller-icon-01cabd99.js +0 -4
  452. package/dist/kolibri/custom-class-603a7fda.js +0 -4
  453. package/dist/kolibri/dev.utils-da51d5d8.js.map +0 -1
  454. package/dist/kolibri/devtools-308d0386.js +0 -4
  455. package/dist/kolibri/devtools-308d0386.js.map +0 -1
  456. package/dist/kolibri/has-closer-091d5cc7.js +0 -4
  457. package/dist/kolibri/hide-label-e711f812.js +0 -4
  458. package/dist/kolibri/image-source-f76f6ad4.js +0 -4
  459. package/dist/kolibri/index-6ea18cec.js +0 -5
  460. package/dist/kolibri/index-6ea18cec.js.map +0 -1
  461. package/dist/kolibri/index-9fc5c44a.js.map +0 -1
  462. package/dist/kolibri/open-0bdcff02.js +0 -4
  463. package/dist/kolibri/rows-77cd583c.js +0 -4
  464. package/dist/kolibri/show-8341c904.js +0 -4
  465. package/dist/kolibri/tab-index-2206620f.js +0 -4
  466. package/dist/kolibri/tooltip-align-00398d75.js +0 -4
  467. package/dist/kolibri/validation-34db9bcf.js +0 -4
  468. /package/dist/kolibri/{InternalUnderlinedAccessKey-e3698cee.js.map → InternalUnderlinedAccessKey-3d146073.js.map} +0 -0
  469. /package/dist/kolibri/{a11y.tipps-f367a979.js.map → a11y.tipps-f14bff66.js.map} +0 -0
  470. /package/dist/kolibri/{access-key-d70aa275.js.map → access-key-d9d3ed1b.js.map} +0 -0
  471. /package/dist/kolibri/{alignment-493b6c84.js.map → alignment-3d2d9391.js.map} +0 -0
  472. /package/dist/kolibri/{alternative-button-link-role-0fc029bf.js.map → alternative-button-link-role-30b77bb6.js.map} +0 -0
  473. /package/dist/kolibri/{associated.controller-700d5133.js.map → associated.controller-e642039e.js.map} +0 -0
  474. /package/dist/kolibri/{color-afc2e34f.js.map → color-d4c99af3.js.map} +0 -0
  475. /package/dist/kolibri/{controller-17eb7878.js.map → controller-3577ccfd.js.map} +0 -0
  476. /package/dist/kolibri/{controller-60b830eb.js.map → controller-7d1c3e92.js.map} +0 -0
  477. /package/dist/kolibri/{controller-6e772d91.js.map → controller-8698d9f4.js.map} +0 -0
  478. /package/dist/kolibri/{controller-ae07d1c7.js.map → controller-9df5563d.js.map} +0 -0
  479. /package/dist/kolibri/{controller-e23535f2.js.map → controller-b2e189a7.js.map} +0 -0
  480. /package/dist/kolibri/{controller-icon-01cabd99.js.map → controller-icon-508a2cb1.js.map} +0 -0
  481. /package/dist/kolibri/{custom-class-603a7fda.js.map → custom-class-6cd3b804.js.map} +0 -0
  482. /package/dist/kolibri/{has-closer-091d5cc7.js.map → has-closer-0601d93e.js.map} +0 -0
  483. /package/dist/kolibri/{hide-label-e711f812.js.map → hide-label-6593df3f.js.map} +0 -0
  484. /package/dist/kolibri/{i18n-d92de40a.js.map → i18n-9a4c8edc.js.map} +0 -0
  485. /package/dist/kolibri/{icons-1ad89985.js.map → icons-44b68720.js.map} +0 -0
  486. /package/dist/kolibri/{image-source-f76f6ad4.js.map → image-source-4b04e9f2.js.map} +0 -0
  487. /package/dist/kolibri/{label-8ddb917e.js.map → label-8258848f.js.map} +0 -0
  488. /package/dist/kolibri/{open-0bdcff02.js.map → open-329b7907.js.map} +0 -0
  489. /package/dist/kolibri/{prop.validators-f887ad3b.js.map → prop.validators-c12923a5.js.map} +0 -0
  490. /package/dist/kolibri/{rows-77cd583c.js.map → rows-14d6fb92.js.map} +0 -0
  491. /package/dist/kolibri/{show-8341c904.js.map → show-9a06c90e.js.map} +0 -0
  492. /package/dist/kolibri/{suggestions-40d68773.js.map → suggestions-dc12a293.js.map} +0 -0
  493. /package/dist/kolibri/{tooltip-align-00398d75.js.map → tooltip-align-a3d27a89.js.map} +0 -0
  494. /package/dist/kolibri/{validation-34db9bcf.js.map → validation-17e52787.js.map} +0 -0
  495. /package/dist/kolibri/{validation-503191a4.js.map → validation-3c0b31d7.js.map} +0 -0
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h,Host,Fragment}from"@stencil/core/internal/client";import{g as watchBoolean,q as featureHint,r as propagateFocus,t as setState,n as nonce,s as showExpertSlot}from"./prop.validators.js";import{p as propagateSubmitEventToForm,d as defineCustomElement$7}from"./component5.js";import{g as getRenderStates}from"./controller.js";import{I as InternalUnderlinedAccessKey,d as defineCustomElement$3}from"./component2.js";import{a as InputTextController}from"./controller3.js";import{d as defineCustomElement$9}from"./shadow.js";import{d as defineCustomElement$8}from"./component6.js";import{d as defineCustomElement$6}from"./component4.js";import{d as defineCustomElement$5}from"./component.js";import{d as defineCustomElement$4}from"./component13.js";import{d as defineCustomElement$2}from"./component3.js";const validateAlert=(t,e)=>{watchBoolean(t,"_alert",e)},defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * Minimum size of interactive elements.\n\t\t */\n\t\t--a11y-min-size: 44px;\n\t\t/*\n\t\t * No element should be used without a background and font color whose contrast ratio has\n\t\t * not been checked. By initially setting the background color to white and the font color\n\t\t * to black, the contrast ratio is ensured and explicit adjustment is forced.\n\t\t */\n\t\tbackground-color: white;\n\t\tcolor: black;\n\t\t/*\n\t\t * Verdana is an accessible font that can be used without requiring additional loading time.\n\t\t */\n\t\tfont-family: Verdana;\n\t}\n\n\t* {\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\thyphens: auto;\n\t\t/*\n\t\t * Letter spacing is required for all texts.\n\t\t */\n\t\tletter-spacing: inherit;\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\tword-break: break-word;\n\t\t/*\n\t\t * Word spacing is required for all texts.\n\t\t */\n\t\tword-spacing: inherit;\n\t}\n\n\t/*\n\t * All interactive elements should have a minimum size of 44px.\n\t */\n\t/* input:not([type='checkbox'], [type='radio'], [type='range']), */\n\t/* option, */\n\t/* select, */\n\t/* textarea, */\n\t[role='button'],\n\tbutton:not([role='link']),\n\tkol-input .input {\n\t\tmin-height: var(--a11y-min-size);\n\t\tmin-width: var(--a11y-min-size);\n\t}\n\n\t/*\n\t * Some interactive elements should not inherit the font-family and font-size.\n\t */\n\ta,\n\tbutton,\n\th1,\n\th2,\n\th3,\n\th4,\n\th5,\n\th6,\n\tinput,\n\toption,\n\tselect,\n\ttextarea {\n\t\t/*\n\t\t * All elements should inherit the font family from his parent element.\n\t\t */\n\t\tfont-family: inherit;\n\t\t/*\n\t\t * All elements should inherit the font size from his parent element.\n\t\t */\n\t\tfont-size: inherit;\n\t}\n}\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\tclip: rect(0 0 0 0);\n\tclip-path: inset(50%);\n\theight: 1px;\n\toverflow: hidden;\n\tposition: absolute;\n\twhite-space: nowrap;\n\twidth: 1px;\n}\n\n@layer kol-global {\n\t/*\n\t * Dieses CSS stellt sicher, dass der Standard-Style\n\t * von A und Button resettet werden.\n\t */\n\t:is(a, button) {\n\t\tbackground-color: transparent;\n\t\tborder: none;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\twidth: 100%; /* 100% needed for custom width from outside */\n\t}\n\n\t/*\n\t * Ensure elements with hidden attribute to be actually not visible\n\t * @see https://meowni.ca/hidden.is.a.lie.html\n\t */\n\t[hidden] {\n\t\tdisplay: none !important;\n\t}\n}\n\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * The max-width is needed to prevent the table from overflowing the\n\t\t * parent node, if the table is wider than the parent node.\n\t\t */\n\t\tmax-width: 100%;\n\t}\n\n\t* {\n\t\t/*\n\t\t * We prefer to box-sizing: border-box for all elements.\n\t\t */\n\t\tbox-sizing: border-box;\n\t}\n\n\t/* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n\tkol-span-wc {\n\t\tdisplay: grid;\n\t\tplace-items: center;\n\t}\n\n\t/* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n\tkol-span-wc > span {\n\t\tdisplay: flex;\n\t\tplace-items: center;\n\t}\n\n\ta,\n\tbutton {\n\t\tcursor: pointer;\n\t}\n\n\t/* This is the text label. */\n\t.icon-only > kol-span-wc > span > span {\n\t\tdisplay: none;\n\t}\n}\n\n@layer kol-component {\n\t.required label > span::after,\n\t.required legend > span::after {\n\t\tcontent: '*';\n\t}\n}\n\n@layer kol-component {\n\t:host {\n\t\tdisplay: block;\n\t}\n}\n\n@layer kol-component {\n\tinput,\n\ttextarea {\n\t\tcursor: text;\n\t}\n\n\tinput[type='checkbox'],\n\tinput[type='color'],\n\tinput[type='file'],\n\tinput[type='radio'],\n\tinput[type='range'],\n\tlabel,\n\toption,\n\tselect {\n\t\tcursor: pointer;\n\t}\n\n\t/* input[type='checkbox'], */\n\t/* input[type='radio'], */\n\t/* input[type='range'], */\n\tinput[type='color'],\n\tinput[type='date'],\n\tinput[type='datetime-local'],\n\tinput[type='email'],\n\tinput[type='file'],\n\tinput[type='month'],\n\tinput[type='number'],\n\tinput[type='password'],\n\tinput[type='search'],\n\tinput[type='tel'],\n\tinput[type='text'],\n\tinput[type='time'],\n\tinput[type='url'],\n\tinput[type='week'],\n\tselect,\n\tselect[multiple] option,\n\ttextarea {\n\t\tfont-size: 1rem;\n\t\twidth: 100%;\n\t}\n\n\t/* needed hack for vertical alignment */\n\tinput[type='file'] {\n\t\tpadding: calc((var(--a11y-min-size) - 1rem) / 10) 0.5em;\n\t}\n\n\t/* needed hack for vertical alignment */\n\tselect[multiple] option {\n\t\tpadding: calc((var(--a11y-min-size) - 1rem) / 2) 0.5em;\n\t}\n\n\tkol-input.disabled :is(button, input, option, select, textarea, .input-label) {\n\t\tcursor: not-allowed;\n\t\topacity: 0.5;\n\t}\n}\n\n@layer kol-component {\n\tkol-input {\n\t\tdisplay: grid;\n\t}\n\n\tkol-input .input-slot {\n\t\tflex-grow: 1;\n\t}\n\n\tinput:not([type='checkbox'], [type='radio']),\n\tselect:not([multiple], [size]) {\n\t\theight: 2.75em;\n\t}\n\n\tinput:focus,\n\toption:focus,\n\tselect:focus,\n\ttextarea:focus {\n\t\toutline: 0;\n\t}\n\n\t.input {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\n\t.input > kol-icon {\n\t\tdisplay: grid;\n\t\theight: var(--a11y-min-size);\n\t\tplace-items: center;\n\t}\n\n\tkol-input.required .input-tooltip .span-label::after {\n\t\tcontent: '*';\n\t}\n}\n\n@layer kol-component {\n\t.error.hidden {\n\t\tdisplay: none;\n\t}\n}\n";featureHint("[KolInputText] Pre- und post-Label für Währung usw.");const KolInputText$1=proxyCustomElement(class extends HTMLElement{async getValue(){var t;return null===(t=this.ref)||void 0===t?void 0:t.value}render(){const{ariaDescribedBy:t}=getRenderStates(this.state),e=Array.isArray(this.state._suggestions)&&this.state._suggestions.length>0,n=showExpertSlot(this.state._label);return h(Host,{class:{"has-value":this.state._hasValue}},h("kol-input",{class:{[this.state._type]:!0,"hide-label":!!this.state._hideLabel},_accessKey:this.state._accessKey,_currentLength:this.state._currentLength,_disabled:this.state._disabled,_error:this.state._error,_hideError:this.state._hideError,_hasCounter:this.state._hasCounter,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_icons:this.state._icons,_id:this.state._id,_label:this.state._label,_suggestions:this.state._suggestions,_maxLength:this.state._maxLength,_readOnly:this.state._readOnly,_required:this.state._required,_smartButton:this.state._smartButton,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched,onClick:()=>{var t;return null===(t=this.ref)||void 0===t?void 0:t.focus()}},h("span",{slot:"label"},n?h("slot",{name:"expert"}):"string"==typeof this.state._accessKey?h(Fragment,null,h(InternalUnderlinedAccessKey,{accessKey:this.state._accessKey,label:this.state._label})," ",h("span",{class:"access-key-hint","aria-hidden":"true"},this.state._accessKey)):h("span",null,this.state._label)),h("div",{slot:"input"},h("input",Object.assign({ref:this.catchRef,title:"",accessKey:this.state._accessKey,"aria-describedby":t.length>0?t.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,autoCapitalize:"off",autoComplete:this.state._autoComplete,autoCorrect:"off",disabled:this.state._disabled,id:this.state._id,list:e?`${this.state._id}-list`:void 0,maxlength:this.state._maxLength,name:this.state._name,pattern:this.state._pattern,placeholder:this.state._placeholder,readOnly:this.state._readOnly,required:this.state._required,spellcheck:"false",type:this.state._type,value:this.state._value},this.controller.onFacade,{onKeyUp:this.onKeyUp})))))}constructor(){super(),this.__registerHost(),this.__attachShadow(),this.catchRef=t=>{var e;this.ref=t,propagateFocus(this.host,this.ref),this.disconnectedCallback(),null===(e=this.ref)||void 0===e||e.addEventListener("search",this.onChange)},this.onKeyUp=t=>{setState(this,"_currentLength",t.target.value.length),"Enter"===t.code||"NumpadEnter"===t.code?propagateSubmitEventToForm({form:this.host,ref:this.ref}):this.onChange(t)},this.onChange=t=>{var e,n;this.oldValue!==(null===(e=this.ref)||void 0===e?void 0:e.value)&&(this.oldValue=null===(n=this.ref)||void 0===n?void 0:n.value,this.controller.onFacade.onChange(t))},this._accessKey=void 0,this._alert=!0,this._autoComplete=void 0,this._disabled=!1,this._error=void 0,this._hasCounter=!1,this._hideError=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._maxLength=void 0,this._name=void 0,this._on=void 0,this._pattern=void 0,this._placeholder=void 0,this._readOnly=!1,this._required=!1,this._suggestions=void 0,this._smartButton=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._type="text",this._value=void 0,this.state={_autoComplete:"off",_currentLength:0,_hasValue:!1,_hideError:!1,_id:`id-${nonce()}`,_label:"",_suggestions:[],_type:"text"},this.controller=new InputTextController(this,"input-text",this.host)}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAlert(t){validateAlert(this,t)}validateAutoComplete(t){this.controller.validateAutoComplete(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateError(t){this.controller.validateError(t)}validateHasCounter(t){this.controller.validateHasCounter(t)}validateHideError(t){this.controller.validateHideError(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateMaxLength(t){this.controller.validateMaxLength(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validatePattern(t){this.controller.validatePattern(t)}validatePlaceholder(t){this.controller.validatePlaceholder(t)}validateReadOnly(t){this.controller.validateReadOnly(t)}validateRequired(t){this.controller.validateRequired(t)}validateSuggestions(t){this.controller.validateSuggestions(t)}validateSmartButton(t){this.controller.validateSmartButton(t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTabIndex(t){this.controller.validateTabIndex(t)}validateTouched(t){this.controller.validateTouched(t)}validateType(t){this.controller.validateType(t)}validateValue(t){this.controller.validateValue(t)}componentWillLoad(){this._alert=!0===this._alert,this._touched=!0===this._touched,this.oldValue=this._value,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener((t=>this.state._hasValue=!!t))}disconnectedCallback(){var t;null===(t=this.ref)||void 0===t||t.removeEventListener("search",this.onChange)}get host(){return this}static get watchers(){return{_accessKey:["validateAccessKey"],_alert:["validateAlert"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_error:["validateError"],_hasCounter:["validateHasCounter"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_maxLength:["validateMaxLength"],_name:["validateName"],_on:["validateOn"],_pattern:["validatePattern"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_suggestions:["validateSuggestions"],_smartButton:["validateSmartButton"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_type:["validateType"],_value:["validateValue"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-input-text",{_accessKey:[1,"_access-key"],_alert:[1540],_autoComplete:[1,"_auto-complete"],_disabled:[4],_error:[1],_hasCounter:[4,"_has-counter"],_hideError:[1540,"_hide-error"],_hideLabel:[4,"_hide-label"],_hint:[1],_icons:[1],_id:[1],_label:[1],_maxLength:[2,"_max-length"],_name:[1],_on:[16],_pattern:[1],_placeholder:[1],_readOnly:[4,"_read-only"],_required:[4],_suggestions:[1],_smartButton:[1,"_smart-button"],_syncValueBySelector:[1,"_sync-value-by-selector"],_tabIndex:[2,"_tab-index"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_type:[1],_value:[1025],state:[32],getValue:[64]},void 0,{_accessKey:["validateAccessKey"],_alert:["validateAlert"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_error:["validateError"],_hasCounter:["validateHasCounter"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_maxLength:["validateMaxLength"],_name:["validateName"],_on:["validateOn"],_pattern:["validatePattern"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_suggestions:["validateSuggestions"],_smartButton:["validateSmartButton"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_type:["validateType"],_value:["validateValue"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-input-text","kol-alert","kol-alert-wc","kol-button-wc","kol-heading-wc","kol-icon","kol-input","kol-span-wc","kol-tooltip-wc"].forEach((t=>{switch(t){case"kol-input-text":customElements.get(t)||customElements.define(t,KolInputText$1);break;case"kol-alert":customElements.get(t)||defineCustomElement$9();break;case"kol-alert-wc":customElements.get(t)||defineCustomElement$8();break;case"kol-button-wc":customElements.get(t)||defineCustomElement$7();break;case"kol-heading-wc":customElements.get(t)||defineCustomElement$6();break;case"kol-icon":customElements.get(t)||defineCustomElement$5();break;case"kol-input":customElements.get(t)||defineCustomElement$4();break;case"kol-span-wc":customElements.get(t)||defineCustomElement$3();break;case"kol-tooltip-wc":customElements.get(t)||defineCustomElement$2()}}))}const KolInputText=KolInputText$1,defineCustomElement=defineCustomElement$1;export{KolInputText,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host,Fragment}from"@stencil/core/internal/client";import{f as watchBoolean,q as featureHint,r as propagateFocus,t as setState,n as nonce,s as showExpertSlot}from"./prop.validators.js";import{p as propagateSubmitEventToForm,d as defineCustomElement$7}from"./component5.js";import{g as getRenderStates}from"./controller.js";import{I as InternalUnderlinedAccessKey,d as defineCustomElement$3}from"./component2.js";import{a as InputTextController}from"./controller3.js";import{d as defineCustomElement$9}from"./shadow.js";import{d as defineCustomElement$8}from"./component6.js";import{d as defineCustomElement$6}from"./component4.js";import{d as defineCustomElement$5}from"./component.js";import{d as defineCustomElement$4}from"./component13.js";import{d as defineCustomElement$2}from"./component3.js";const validateAlert=(t,e)=>{watchBoolean(t,"_alert",e)},defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * Minimum size of interactive elements.\n\t\t */\n\t\t--a11y-min-size: 44px;\n\t\t/*\n\t\t * No element should be used without a background and font color whose contrast ratio has\n\t\t * not been checked. By initially setting the background color to white and the font color\n\t\t * to black, the contrast ratio is ensured and explicit adjustment is forced.\n\t\t */\n\t\tbackground-color: white;\n\t\tcolor: black;\n\t\t/*\n\t\t * Verdana is an accessible font that can be used without requiring additional loading time.\n\t\t */\n\t\tfont-family: Verdana;\n\t}\n\n\t* {\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\thyphens: auto;\n\t\t/*\n\t\t * Letter spacing is required for all texts.\n\t\t */\n\t\tletter-spacing: inherit;\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\tword-break: break-word;\n\t\t/*\n\t\t * Word spacing is required for all texts.\n\t\t */\n\t\tword-spacing: inherit;\n\t}\n\n\t/*\n\t * All interactive elements should have a minimum size of 44px.\n\t */\n\t/* input:not([type='checkbox'], [type='radio'], [type='range']), */\n\t/* option, */\n\t/* select, */\n\t/* textarea, */\n\t[role='button'],\n\tbutton:not([role='link']),\n\tkol-input .input {\n\t\tmin-height: var(--a11y-min-size);\n\t\tmin-width: var(--a11y-min-size);\n\t}\n\n\t/*\n\t * Some interactive elements should not inherit the font-family and font-size.\n\t */\n\ta,\n\tbutton,\n\th1,\n\th2,\n\th3,\n\th4,\n\th5,\n\th6,\n\tinput,\n\toption,\n\tselect,\n\ttextarea {\n\t\t/*\n\t\t * All elements should inherit the font family from his parent element.\n\t\t */\n\t\tfont-family: inherit;\n\t\t/*\n\t\t * All elements should inherit the font size from his parent element.\n\t\t */\n\t\tfont-size: inherit;\n\t}\n}\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\tclip: rect(0 0 0 0);\n\tclip-path: inset(50%);\n\theight: 1px;\n\toverflow: hidden;\n\tposition: absolute;\n\twhite-space: nowrap;\n\twidth: 1px;\n}\n\n@layer kol-global {\n\t/*\n\t * Dieses CSS stellt sicher, dass der Standard-Style\n\t * von A und Button resettet werden.\n\t */\n\t:is(a, button) {\n\t\tbackground-color: transparent;\n\t\tborder: none;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\twidth: 100%; /* 100% needed for custom width from outside */\n\t}\n\n\t/*\n\t * Ensure elements with hidden attribute to be actually not visible\n\t * @see https://meowni.ca/hidden.is.a.lie.html\n\t */\n\t[hidden] {\n\t\tdisplay: none !important;\n\t}\n}\n\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * The max-width is needed to prevent the table from overflowing the\n\t\t * parent node, if the table is wider than the parent node.\n\t\t */\n\t\tmax-width: 100%;\n\t}\n\n\t* {\n\t\t/*\n\t\t * We prefer to box-sizing: border-box for all elements.\n\t\t */\n\t\tbox-sizing: border-box;\n\t}\n\n\t/* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n\tkol-span-wc {\n\t\tdisplay: grid;\n\t\tplace-items: center;\n\t}\n\n\t/* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n\tkol-span-wc > span {\n\t\tdisplay: flex;\n\t\tplace-items: center;\n\t}\n\n\ta,\n\tbutton {\n\t\tcursor: pointer;\n\t}\n\n\t/* This is the text label. */\n\t.icon-only > kol-span-wc > span > span {\n\t\tdisplay: none;\n\t}\n}\n\n@layer kol-component {\n\t.required label > span::after,\n\t.required legend > span::after {\n\t\tcontent: '*';\n\t}\n}\n\n@layer kol-component {\n\t:host {\n\t\tdisplay: block;\n\t}\n}\n\n@layer kol-component {\n\tinput,\n\ttextarea {\n\t\tcursor: text;\n\t}\n\n\tinput[type='checkbox'],\n\tinput[type='color'],\n\tinput[type='file'],\n\tinput[type='radio'],\n\tinput[type='range'],\n\tlabel,\n\toption,\n\tselect {\n\t\tcursor: pointer;\n\t}\n\n\t/* input[type='checkbox'], */\n\t/* input[type='radio'], */\n\t/* input[type='range'], */\n\tinput[type='color'],\n\tinput[type='date'],\n\tinput[type='datetime-local'],\n\tinput[type='email'],\n\tinput[type='file'],\n\tinput[type='month'],\n\tinput[type='number'],\n\tinput[type='password'],\n\tinput[type='search'],\n\tinput[type='tel'],\n\tinput[type='text'],\n\tinput[type='time'],\n\tinput[type='url'],\n\tinput[type='week'],\n\tselect,\n\tselect[multiple] option,\n\ttextarea {\n\t\tfont-size: 1rem;\n\t\twidth: 100%;\n\t}\n\n\t/* needed hack for vertical alignment */\n\tinput[type='file'] {\n\t\tpadding: calc((var(--a11y-min-size) - 1rem) / 10) 0.5em;\n\t}\n\n\t/* needed hack for vertical alignment */\n\tselect[multiple] option {\n\t\tpadding: calc((var(--a11y-min-size) - 1rem) / 2) 0.5em;\n\t}\n\n\tkol-input.disabled :is(button, input, option, select, textarea, .input-label) {\n\t\tcursor: not-allowed;\n\t\topacity: 0.5;\n\t}\n}\n\n@layer kol-component {\n\tkol-input {\n\t\tdisplay: grid;\n\t}\n\n\tkol-input .input-slot {\n\t\tflex-grow: 1;\n\t}\n\n\tinput:not([type='checkbox'], [type='radio']),\n\tselect:not([multiple], [size]) {\n\t\theight: 2.75em;\n\t}\n\n\tinput:focus,\n\toption:focus,\n\tselect:focus,\n\ttextarea:focus {\n\t\toutline: 0;\n\t}\n\n\t.input {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\n\t.input > kol-icon {\n\t\tdisplay: grid;\n\t\theight: var(--a11y-min-size);\n\t\tplace-items: center;\n\t}\n\n\tkol-input.required .input-tooltip .span-label::after {\n\t\tcontent: '*';\n\t}\n}\n\n@layer kol-component {\n\t.error.hidden {\n\t\tdisplay: none;\n\t}\n}\n";featureHint("[KolInputText] Pre- und post-Label für Währung usw.");const KolInputText$1=proxyCustomElement(class extends HTMLElement{async getValue(){var t;return null===(t=this.ref)||void 0===t?void 0:t.value}render(){const{ariaDescribedBy:t}=getRenderStates(this.state),e=Array.isArray(this.state._suggestions)&&this.state._suggestions.length>0,n=showExpertSlot(this.state._label);return h(Host,{class:{"has-value":this.state._hasValue}},h("kol-input",{class:{[this.state._type]:!0,"hide-label":!!this.state._hideLabel},_accessKey:this.state._accessKey,_currentLength:this.state._currentLength,_disabled:this.state._disabled,_error:this.state._error,_hideError:this.state._hideError,_hasCounter:this.state._hasCounter,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_icons:this.state._icons,_id:this.state._id,_label:this.state._label,_suggestions:this.state._suggestions,_maxLength:this.state._maxLength,_readOnly:this.state._readOnly,_required:this.state._required,_smartButton:this.state._smartButton,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched,onClick:()=>{var t;return null===(t=this.ref)||void 0===t?void 0:t.focus()}},h("span",{slot:"label"},n?h("slot",{name:"expert"}):"string"==typeof this.state._accessKey?h(Fragment,null,h(InternalUnderlinedAccessKey,{accessKey:this.state._accessKey,label:this.state._label})," ",h("span",{class:"access-key-hint","aria-hidden":"true"},this.state._accessKey)):h("span",null,this.state._label)),h("div",{slot:"input"},h("input",Object.assign({ref:this.catchRef,title:"",accessKey:this.state._accessKey,"aria-describedby":t.length>0?t.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,autoCapitalize:"off",autoComplete:this.state._autoComplete,autoCorrect:"off",disabled:this.state._disabled,id:this.state._id,list:e?`${this.state._id}-list`:void 0,maxlength:this.state._maxLength,name:this.state._name,pattern:this.state._pattern,placeholder:this.state._placeholder,readOnly:this.state._readOnly,required:this.state._required,spellcheck:"false",type:this.state._type,value:this.state._value},this.controller.onFacade,{onKeyUp:this.onKeyUp})))))}constructor(){super(),this.__registerHost(),this.__attachShadow(),this.catchRef=t=>{var e;this.ref=t,propagateFocus(this.host,this.ref),this.disconnectedCallback(),null===(e=this.ref)||void 0===e||e.addEventListener("search",this.onChange)},this.onKeyUp=t=>{setState(this,"_currentLength",t.target.value.length),"Enter"===t.code||"NumpadEnter"===t.code?propagateSubmitEventToForm({form:this.host,ref:this.ref}):this.onChange(t)},this.onChange=t=>{var e,n;this.oldValue!==(null===(e=this.ref)||void 0===e?void 0:e.value)&&(this.oldValue=null===(n=this.ref)||void 0===n?void 0:n.value,this.controller.onFacade.onChange(t))},this._accessKey=void 0,this._alert=!0,this._autoComplete=void 0,this._disabled=!1,this._error=void 0,this._hasCounter=!1,this._hideError=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._maxLength=void 0,this._name=void 0,this._on=void 0,this._pattern=void 0,this._placeholder=void 0,this._readOnly=!1,this._required=!1,this._suggestions=void 0,this._smartButton=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._type="text",this._value=void 0,this.state={_autoComplete:"off",_currentLength:0,_hasValue:!1,_hideError:!1,_id:`id-${nonce()}`,_label:"",_suggestions:[],_type:"text"},this.controller=new InputTextController(this,"input-text",this.host)}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAlert(t){validateAlert(this,t)}validateAutoComplete(t){this.controller.validateAutoComplete(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateError(t){this.controller.validateError(t)}validateHasCounter(t){this.controller.validateHasCounter(t)}validateHideError(t){this.controller.validateHideError(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateMaxLength(t){this.controller.validateMaxLength(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validatePattern(t){this.controller.validatePattern(t)}validatePlaceholder(t){this.controller.validatePlaceholder(t)}validateReadOnly(t){this.controller.validateReadOnly(t)}validateRequired(t){this.controller.validateRequired(t)}validateSuggestions(t){this.controller.validateSuggestions(t)}validateSmartButton(t){this.controller.validateSmartButton(t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTabIndex(t){this.controller.validateTabIndex(t)}validateTouched(t){this.controller.validateTouched(t)}validateType(t){this.controller.validateType(t)}validateValue(t){this.controller.validateValue(t)}componentWillLoad(){this._alert=!0===this._alert,this._touched=!0===this._touched,this.oldValue=this._value,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener((t=>this.state._hasValue=!!t))}disconnectedCallback(){var t;null===(t=this.ref)||void 0===t||t.removeEventListener("search",this.onChange)}get host(){return this}static get watchers(){return{_accessKey:["validateAccessKey"],_alert:["validateAlert"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_error:["validateError"],_hasCounter:["validateHasCounter"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_maxLength:["validateMaxLength"],_name:["validateName"],_on:["validateOn"],_pattern:["validatePattern"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_suggestions:["validateSuggestions"],_smartButton:["validateSmartButton"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_type:["validateType"],_value:["validateValue"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-input-text",{_accessKey:[1,"_access-key"],_alert:[1540],_autoComplete:[1,"_auto-complete"],_disabled:[4],_error:[1],_hasCounter:[4,"_has-counter"],_hideError:[1540,"_hide-error"],_hideLabel:[4,"_hide-label"],_hint:[1],_icons:[1],_id:[1],_label:[1],_maxLength:[2,"_max-length"],_name:[1],_on:[16],_pattern:[1],_placeholder:[1],_readOnly:[4,"_read-only"],_required:[4],_suggestions:[1],_smartButton:[1,"_smart-button"],_syncValueBySelector:[1,"_sync-value-by-selector"],_tabIndex:[2,"_tab-index"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_type:[1],_value:[1025],state:[32],getValue:[64]},void 0,{_accessKey:["validateAccessKey"],_alert:["validateAlert"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_error:["validateError"],_hasCounter:["validateHasCounter"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_maxLength:["validateMaxLength"],_name:["validateName"],_on:["validateOn"],_pattern:["validatePattern"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_suggestions:["validateSuggestions"],_smartButton:["validateSmartButton"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_type:["validateType"],_value:["validateValue"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-input-text","kol-alert","kol-alert-wc","kol-button-wc","kol-heading-wc","kol-icon","kol-input","kol-span-wc","kol-tooltip-wc"].forEach((t=>{switch(t){case"kol-input-text":customElements.get(t)||customElements.define(t,KolInputText$1);break;case"kol-alert":customElements.get(t)||defineCustomElement$9();break;case"kol-alert-wc":customElements.get(t)||defineCustomElement$8();break;case"kol-button-wc":customElements.get(t)||defineCustomElement$7();break;case"kol-heading-wc":customElements.get(t)||defineCustomElement$6();break;case"kol-icon":customElements.get(t)||defineCustomElement$5();break;case"kol-input":customElements.get(t)||defineCustomElement$4();break;case"kol-span-wc":customElements.get(t)||defineCustomElement$3();break;case"kol-tooltip-wc":customElements.get(t)||defineCustomElement$2()}}))}const KolInputText=KolInputText$1,defineCustomElement=defineCustomElement$1;export{KolInputText,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{a as translate}from"./i18n.js";import{c as colorRgba,v as validateColor}from"./color.js";import{d as devHint,g as watchBoolean}from"./prop.validators.js";const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * Minimum size of interactive elements.\n\t\t */\n\t\t--a11y-min-size: 44px;\n\t\t/*\n\t\t * No element should be used without a background and font color whose contrast ratio has\n\t\t * not been checked. By initially setting the background color to white and the font color\n\t\t * to black, the contrast ratio is ensured and explicit adjustment is forced.\n\t\t */\n\t\tbackground-color: white;\n\t\tcolor: black;\n\t\t/*\n\t\t * Verdana is an accessible font that can be used without requiring additional loading time.\n\t\t */\n\t\tfont-family: Verdana;\n\t}\n\n\t* {\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\thyphens: auto;\n\t\t/*\n\t\t * Letter spacing is required for all texts.\n\t\t */\n\t\tletter-spacing: inherit;\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\tword-break: break-word;\n\t\t/*\n\t\t * Word spacing is required for all texts.\n\t\t */\n\t\tword-spacing: inherit;\n\t}\n\n\t/*\n\t * All interactive elements should have a minimum size of 44px.\n\t */\n\t/* input:not([type='checkbox'], [type='radio'], [type='range']), */\n\t/* option, */\n\t/* select, */\n\t/* textarea, */\n\t[role='button'],\n\tbutton:not([role='link']),\n\tkol-input .input {\n\t\tmin-height: var(--a11y-min-size);\n\t\tmin-width: var(--a11y-min-size);\n\t}\n\n\t/*\n\t * Some interactive elements should not inherit the font-family and font-size.\n\t */\n\ta,\n\tbutton,\n\th1,\n\th2,\n\th3,\n\th4,\n\th5,\n\th6,\n\tinput,\n\toption,\n\tselect,\n\ttextarea {\n\t\t/*\n\t\t * All elements should inherit the font family from his parent element.\n\t\t */\n\t\tfont-family: inherit;\n\t\t/*\n\t\t * All elements should inherit the font size from his parent element.\n\t\t */\n\t\tfont-size: inherit;\n\t}\n}\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\tclip: rect(0 0 0 0);\n\tclip-path: inset(50%);\n\theight: 1px;\n\toverflow: hidden;\n\tposition: absolute;\n\twhite-space: nowrap;\n\twidth: 1px;\n}\n\n@layer kol-global {\n\t/*\n\t * Dieses CSS stellt sicher, dass der Standard-Style\n\t * von A und Button resettet werden.\n\t */\n\t:is(a, button) {\n\t\tbackground-color: transparent;\n\t\tborder: none;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\twidth: 100%; /* 100% needed for custom width from outside */\n\t}\n\n\t/*\n\t * Ensure elements with hidden attribute to be actually not visible\n\t * @see https://meowni.ca/hidden.is.a.lie.html\n\t */\n\t[hidden] {\n\t\tdisplay: none !important;\n\t}\n}\n\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * The max-width is needed to prevent the table from overflowing the\n\t\t * parent node, if the table is wider than the parent node.\n\t\t */\n\t\tmax-width: 100%;\n\t}\n\n\t* {\n\t\t/*\n\t\t * We prefer to box-sizing: border-box for all elements.\n\t\t */\n\t\tbox-sizing: border-box;\n\t}\n\n\t/* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n\tkol-span-wc {\n\t\tdisplay: grid;\n\t\tplace-items: center;\n\t}\n\n\t/* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n\tkol-span-wc > span {\n\t\tdisplay: flex;\n\t\tplace-items: center;\n\t}\n\n\ta,\n\tbutton {\n\t\tcursor: pointer;\n\t}\n\n\t/* This is the text label. */\n\t.icon-only > kol-span-wc > span > span {\n\t\tdisplay: none;\n\t}\n}\n\n@layer kol-component {\n\t:host {\n\t\tdisplay: inline-block;\n\t}\n\n\ttext {\n\t\tfont-size: 90px;\n\t\tletter-spacing: normal;\n\t\tword-spacing: normal;\n\t}\n\n\tsvg {\n\t\tmax-height: 100%;\n\t}\n}\n",KolKolibri$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.handleColorChange=(t,n)=>{if("string"==typeof t){const e=colorRgba(t);n.set("_color",{red:e[0],green:e[1],blue:e[2]})}else devHint("[KolKolibri] You used the complex color schema. For the KoliBri we use need the color as hex string.")},this._color="#003c78",this._labeled=void 0,this.state={_color:{red:0,green:60,blue:120},_labeled:!0}}render(){const t=`rgb(${this.state._color.red},${this.state._color.green},${this.state._color.blue})`;return h(Host,null,h("svg",{role:"img","aria-label":translate("kol-kolibri-logo"),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 600 600",fill:t},h("path",{d:"M353 322L213 304V434L353 322Z"}),h("path",{d:"M209 564V304L149 434L209 564Z"}),h("path",{d:"M357 316L417 250L361 210L275 244L357 316Z"}),h("path",{d:"M329 218L237 92L250 222L272 241L329 218Z"}),h("path",{d:"M353 318L35 36L213 300L353 318Z"}),h("path",{d:"M391 286L565 272L421 252L391 286Z"}),!0===this.state._labeled&&h("text",{x:"250",y:"525",fill:t},"KoliBri")))}validateColor(t){validateColor(this,t,{defaultValue:"#003c78",hooks:{beforePatch:this.handleColorChange}})}validateLabeled(t){watchBoolean(this,"_labeled",t)}componentWillLoad(){this.validateColor(this._color),this.validateLabeled(this._labeled)}static get watchers(){return{_color:["validateColor"],_labeled:["validateLabeled"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-kolibri",{_color:[1],_labeled:[4],state:[32]},void 0,{_color:["validateColor"],_labeled:["validateLabeled"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-kolibri"].forEach((t=>{if("kol-kolibri"===t)customElements.get(t)||customElements.define(t,KolKolibri$1)}))}const KolKolibri=KolKolibri$1,defineCustomElement=defineCustomElement$1;export{KolKolibri,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{a as translate}from"./i18n.js";import{c as colorRgba,v as validateColor}from"./color.js";import{d as devHint,f as watchBoolean}from"./prop.validators.js";const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * Minimum size of interactive elements.\n\t\t */\n\t\t--a11y-min-size: 44px;\n\t\t/*\n\t\t * No element should be used without a background and font color whose contrast ratio has\n\t\t * not been checked. By initially setting the background color to white and the font color\n\t\t * to black, the contrast ratio is ensured and explicit adjustment is forced.\n\t\t */\n\t\tbackground-color: white;\n\t\tcolor: black;\n\t\t/*\n\t\t * Verdana is an accessible font that can be used without requiring additional loading time.\n\t\t */\n\t\tfont-family: Verdana;\n\t}\n\n\t* {\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\thyphens: auto;\n\t\t/*\n\t\t * Letter spacing is required for all texts.\n\t\t */\n\t\tletter-spacing: inherit;\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\tword-break: break-word;\n\t\t/*\n\t\t * Word spacing is required for all texts.\n\t\t */\n\t\tword-spacing: inherit;\n\t}\n\n\t/*\n\t * All interactive elements should have a minimum size of 44px.\n\t */\n\t/* input:not([type='checkbox'], [type='radio'], [type='range']), */\n\t/* option, */\n\t/* select, */\n\t/* textarea, */\n\t[role='button'],\n\tbutton:not([role='link']),\n\tkol-input .input {\n\t\tmin-height: var(--a11y-min-size);\n\t\tmin-width: var(--a11y-min-size);\n\t}\n\n\t/*\n\t * Some interactive elements should not inherit the font-family and font-size.\n\t */\n\ta,\n\tbutton,\n\th1,\n\th2,\n\th3,\n\th4,\n\th5,\n\th6,\n\tinput,\n\toption,\n\tselect,\n\ttextarea {\n\t\t/*\n\t\t * All elements should inherit the font family from his parent element.\n\t\t */\n\t\tfont-family: inherit;\n\t\t/*\n\t\t * All elements should inherit the font size from his parent element.\n\t\t */\n\t\tfont-size: inherit;\n\t}\n}\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\tclip: rect(0 0 0 0);\n\tclip-path: inset(50%);\n\theight: 1px;\n\toverflow: hidden;\n\tposition: absolute;\n\twhite-space: nowrap;\n\twidth: 1px;\n}\n\n@layer kol-global {\n\t/*\n\t * Dieses CSS stellt sicher, dass der Standard-Style\n\t * von A und Button resettet werden.\n\t */\n\t:is(a, button) {\n\t\tbackground-color: transparent;\n\t\tborder: none;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\twidth: 100%; /* 100% needed for custom width from outside */\n\t}\n\n\t/*\n\t * Ensure elements with hidden attribute to be actually not visible\n\t * @see https://meowni.ca/hidden.is.a.lie.html\n\t */\n\t[hidden] {\n\t\tdisplay: none !important;\n\t}\n}\n\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * The max-width is needed to prevent the table from overflowing the\n\t\t * parent node, if the table is wider than the parent node.\n\t\t */\n\t\tmax-width: 100%;\n\t}\n\n\t* {\n\t\t/*\n\t\t * We prefer to box-sizing: border-box for all elements.\n\t\t */\n\t\tbox-sizing: border-box;\n\t}\n\n\t/* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n\tkol-span-wc {\n\t\tdisplay: grid;\n\t\tplace-items: center;\n\t}\n\n\t/* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n\tkol-span-wc > span {\n\t\tdisplay: flex;\n\t\tplace-items: center;\n\t}\n\n\ta,\n\tbutton {\n\t\tcursor: pointer;\n\t}\n\n\t/* This is the text label. */\n\t.icon-only > kol-span-wc > span > span {\n\t\tdisplay: none;\n\t}\n}\n\n@layer kol-component {\n\t:host {\n\t\tdisplay: inline-block;\n\t}\n\n\ttext {\n\t\tfont-size: 90px;\n\t\tletter-spacing: normal;\n\t\tword-spacing: normal;\n\t}\n\n\tsvg {\n\t\tmax-height: 100%;\n\t}\n}\n",KolKolibri$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.handleColorChange=(t,n)=>{if("string"==typeof t){const e=colorRgba(t);n.set("_color",{red:e[0],green:e[1],blue:e[2]})}else devHint("[KolKolibri] You used the complex color schema. For the KoliBri we use need the color as hex string.")},this._color="#003c78",this._labeled=void 0,this.state={_color:{red:0,green:60,blue:120},_labeled:!0}}render(){const t=`rgb(${this.state._color.red},${this.state._color.green},${this.state._color.blue})`;return h(Host,null,h("svg",{role:"img","aria-label":translate("kol-kolibri-logo"),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 600 600",fill:t},h("path",{d:"M353 322L213 304V434L353 322Z"}),h("path",{d:"M209 564V304L149 434L209 564Z"}),h("path",{d:"M357 316L417 250L361 210L275 244L357 316Z"}),h("path",{d:"M329 218L237 92L250 222L272 241L329 218Z"}),h("path",{d:"M353 318L35 36L213 300L353 318Z"}),h("path",{d:"M391 286L565 272L421 252L391 286Z"}),!0===this.state._labeled&&h("text",{x:"250",y:"525",fill:t},"KoliBri")))}validateColor(t){validateColor(this,t,{defaultValue:"#003c78",hooks:{beforePatch:this.handleColorChange}})}validateLabeled(t){watchBoolean(this,"_labeled",t)}componentWillLoad(){this.validateColor(this._color),this.validateLabeled(this._labeled)}static get watchers(){return{_color:["validateColor"],_labeled:["validateLabeled"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-kolibri",{_color:[1],_labeled:[4],state:[32]},void 0,{_color:["validateColor"],_labeled:["validateLabeled"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-kolibri"].forEach((t=>{if("kol-kolibri"===t)customElements.get(t)||customElements.define(t,KolKolibri$1)}))}const KolKolibri=KolKolibri$1,defineCustomElement=defineCustomElement$1;export{KolKolibri,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{v as validateLabel}from"./label.js";import{a as KoliBri,w as watchValidator,q as featureHint,t as setState,f as watchString}from"./prop.validators.js";const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * Minimum size of interactive elements.\n\t\t */\n\t\t--a11y-min-size: 44px;\n\t\t/*\n\t\t * No element should be used without a background and font color whose contrast ratio has\n\t\t * not been checked. By initially setting the background color to white and the font color\n\t\t * to black, the contrast ratio is ensured and explicit adjustment is forced.\n\t\t */\n\t\tbackground-color: white;\n\t\tcolor: black;\n\t\t/*\n\t\t * Verdana is an accessible font that can be used without requiring additional loading time.\n\t\t */\n\t\tfont-family: Verdana;\n\t}\n\n\t* {\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\thyphens: auto;\n\t\t/*\n\t\t * Letter spacing is required for all texts.\n\t\t */\n\t\tletter-spacing: inherit;\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\tword-break: break-word;\n\t\t/*\n\t\t * Word spacing is required for all texts.\n\t\t */\n\t\tword-spacing: inherit;\n\t}\n\n\t/*\n\t * All interactive elements should have a minimum size of 44px.\n\t */\n\t/* input:not([type='checkbox'], [type='radio'], [type='range']), */\n\t/* option, */\n\t/* select, */\n\t/* textarea, */\n\t[role='button'],\n\tbutton:not([role='link']),\n\tkol-input .input {\n\t\tmin-height: var(--a11y-min-size);\n\t\tmin-width: var(--a11y-min-size);\n\t}\n\n\t/*\n\t * Some interactive elements should not inherit the font-family and font-size.\n\t */\n\ta,\n\tbutton,\n\th1,\n\th2,\n\th3,\n\th4,\n\th5,\n\th6,\n\tinput,\n\toption,\n\tselect,\n\ttextarea {\n\t\t/*\n\t\t * All elements should inherit the font family from his parent element.\n\t\t */\n\t\tfont-family: inherit;\n\t\t/*\n\t\t * All elements should inherit the font size from his parent element.\n\t\t */\n\t\tfont-size: inherit;\n\t}\n}\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\tclip: rect(0 0 0 0);\n\tclip-path: inset(50%);\n\theight: 1px;\n\toverflow: hidden;\n\tposition: absolute;\n\twhite-space: nowrap;\n\twidth: 1px;\n}\n\n@layer kol-global {\n\t/*\n\t * Dieses CSS stellt sicher, dass der Standard-Style\n\t * von A und Button resettet werden.\n\t */\n\t:is(a, button) {\n\t\tbackground-color: transparent;\n\t\tborder: none;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\twidth: 100%; /* 100% needed for custom width from outside */\n\t}\n\n\t/*\n\t * Ensure elements with hidden attribute to be actually not visible\n\t * @see https://meowni.ca/hidden.is.a.lie.html\n\t */\n\t[hidden] {\n\t\tdisplay: none !important;\n\t}\n}\n\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * The max-width is needed to prevent the table from overflowing the\n\t\t * parent node, if the table is wider than the parent node.\n\t\t */\n\t\tmax-width: 100%;\n\t}\n\n\t* {\n\t\t/*\n\t\t * We prefer to box-sizing: border-box for all elements.\n\t\t */\n\t\tbox-sizing: border-box;\n\t}\n\n\t/* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n\tkol-span-wc {\n\t\tdisplay: grid;\n\t\tplace-items: center;\n\t}\n\n\t/* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n\tkol-span-wc > span {\n\t\tdisplay: flex;\n\t\tplace-items: center;\n\t}\n\n\ta,\n\tbutton {\n\t\tcursor: pointer;\n\t}\n\n\t/* This is the text label. */\n\t.icon-only > kol-span-wc > span > span {\n\t\tdisplay: none;\n\t}\n}\n\n@layer kol-component {\n\t.overlay {\n\t\tbackground-color: rgba(0, 0, 0, 0.33);\n\t\tdisplay: flex;\n\t\theight: 100%;\n\t\tinset: 0;\n\t\tposition: fixed;\n\t\twidth: 100%;\n\t\tz-index: 100;\n\t}\n\n\t.modal {\n\t\tmargin: auto;\n\t\tmax-height: 100%;\n\t\tmax-width: 100%;\n\t}\n}\n",KolModal$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.onKeyDown=t=>{t&&"Escape"===t.code&&(this._activeElement=null)},this._activeElement=void 0,this._label=void 0,this._on=void 0,this._width="100%",this.state={_activeElement:null,_label:"…",_width:"100%"}}componentDidRender(){this.hostElement&&(this.state._activeElement?KoliBri.Modal.openModal(this.hostElement,this.state._activeElement):KoliBri.Modal.closeModal(this.hostElement))}disconnectedCallback(){this.hostElement&&KoliBri.Modal.closeModal(this.hostElement)}render(){return h(Host,{ref:t=>{this.hostElement=t}},this.state._activeElement&&h("div",{class:"overlay"},h("div",{class:"modal",style:{width:this.state._width},"aria-label":this.state._label,"aria-modal":"true",role:"dialog",onKeyDown:this.onKeyDown,ref:t=>{t&&(t.setAttribute("tabindex","0"),setTimeout((()=>t.focus()),250))}},h("slot",null))))}validateActiveElement(t){watchValidator(this,"_activeElement",(t=>"object"==typeof t||null===t),new Set(["HTMLElement","null"]),t,{defaultValue:null,hooks:{afterPatch:()=>{var t;null===this._activeElement&&(null===(t=this.state._on)||void 0===t?void 0:t.onClose)&&this.state._on.onClose()}}})}validateLabel(t){validateLabel(this,t)}validateOn(t){if("object"==typeof t&&null!==t){featureHint("[KolTabs] Prüfen, wie man auch einen EventCallback einzeln ändern kann.");const e={};"function"!=typeof t.onClose&&!0!==t.onClose||(e.onClose=t.onClose),setState(this,"_on",e)}}validateWidth(t){watchString(this,"_width",t,{defaultValue:"100%"})}componentWillLoad(){this.validateActiveElement(this._activeElement),this.validateLabel(this._label),this.validateOn(this._on),this.validateWidth(this._width)}static get watchers(){return{_activeElement:["validateActiveElement"],_label:["validateLabel"],_on:["validateOn"],_width:["validateWidth"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-modal",{_activeElement:[1040],_label:[1],_on:[16],_width:[1],state:[32]},void 0,{_activeElement:["validateActiveElement"],_label:["validateLabel"],_on:["validateOn"],_width:["validateWidth"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-modal"].forEach((t=>{if("kol-modal"===t)customElements.get(t)||customElements.define(t,KolModal$1)}))}const KolModal=KolModal$1,defineCustomElement=defineCustomElement$1;export{KolModal,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{v as validateLabel}from"./label.js";import{g as getKoliBri,w as watchValidator,q as featureHint,t as setState,b as watchString}from"./prop.validators.js";const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * Minimum size of interactive elements.\n\t\t */\n\t\t--a11y-min-size: 44px;\n\t\t/*\n\t\t * No element should be used without a background and font color whose contrast ratio has\n\t\t * not been checked. By initially setting the background color to white and the font color\n\t\t * to black, the contrast ratio is ensured and explicit adjustment is forced.\n\t\t */\n\t\tbackground-color: white;\n\t\tcolor: black;\n\t\t/*\n\t\t * Verdana is an accessible font that can be used without requiring additional loading time.\n\t\t */\n\t\tfont-family: Verdana;\n\t}\n\n\t* {\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\thyphens: auto;\n\t\t/*\n\t\t * Letter spacing is required for all texts.\n\t\t */\n\t\tletter-spacing: inherit;\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\tword-break: break-word;\n\t\t/*\n\t\t * Word spacing is required for all texts.\n\t\t */\n\t\tword-spacing: inherit;\n\t}\n\n\t/*\n\t * All interactive elements should have a minimum size of 44px.\n\t */\n\t/* input:not([type='checkbox'], [type='radio'], [type='range']), */\n\t/* option, */\n\t/* select, */\n\t/* textarea, */\n\t[role='button'],\n\tbutton:not([role='link']),\n\tkol-input .input {\n\t\tmin-height: var(--a11y-min-size);\n\t\tmin-width: var(--a11y-min-size);\n\t}\n\n\t/*\n\t * Some interactive elements should not inherit the font-family and font-size.\n\t */\n\ta,\n\tbutton,\n\th1,\n\th2,\n\th3,\n\th4,\n\th5,\n\th6,\n\tinput,\n\toption,\n\tselect,\n\ttextarea {\n\t\t/*\n\t\t * All elements should inherit the font family from his parent element.\n\t\t */\n\t\tfont-family: inherit;\n\t\t/*\n\t\t * All elements should inherit the font size from his parent element.\n\t\t */\n\t\tfont-size: inherit;\n\t}\n}\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\tclip: rect(0 0 0 0);\n\tclip-path: inset(50%);\n\theight: 1px;\n\toverflow: hidden;\n\tposition: absolute;\n\twhite-space: nowrap;\n\twidth: 1px;\n}\n\n@layer kol-global {\n\t/*\n\t * Dieses CSS stellt sicher, dass der Standard-Style\n\t * von A und Button resettet werden.\n\t */\n\t:is(a, button) {\n\t\tbackground-color: transparent;\n\t\tborder: none;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\twidth: 100%; /* 100% needed for custom width from outside */\n\t}\n\n\t/*\n\t * Ensure elements with hidden attribute to be actually not visible\n\t * @see https://meowni.ca/hidden.is.a.lie.html\n\t */\n\t[hidden] {\n\t\tdisplay: none !important;\n\t}\n}\n\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * The max-width is needed to prevent the table from overflowing the\n\t\t * parent node, if the table is wider than the parent node.\n\t\t */\n\t\tmax-width: 100%;\n\t}\n\n\t* {\n\t\t/*\n\t\t * We prefer to box-sizing: border-box for all elements.\n\t\t */\n\t\tbox-sizing: border-box;\n\t}\n\n\t/* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n\tkol-span-wc {\n\t\tdisplay: grid;\n\t\tplace-items: center;\n\t}\n\n\t/* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n\tkol-span-wc > span {\n\t\tdisplay: flex;\n\t\tplace-items: center;\n\t}\n\n\ta,\n\tbutton {\n\t\tcursor: pointer;\n\t}\n\n\t/* This is the text label. */\n\t.icon-only > kol-span-wc > span > span {\n\t\tdisplay: none;\n\t}\n}\n\n@layer kol-component {\n\t.overlay {\n\t\tbackground-color: rgba(0, 0, 0, 0.33);\n\t\tdisplay: flex;\n\t\theight: 100%;\n\t\tinset: 0;\n\t\tposition: fixed;\n\t\twidth: 100%;\n\t\tz-index: 100;\n\t}\n\n\t.modal {\n\t\tmargin: auto;\n\t\tmax-height: 100%;\n\t\tmax-width: 100%;\n\t}\n}\n",KolModal$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.onKeyDown=t=>{t&&"Escape"===t.code&&(this._activeElement=null)},this._activeElement=void 0,this._label=void 0,this._on=void 0,this._width="100%",this.state={_activeElement:null,_label:"…",_width:"100%"}}componentDidRender(){this.hostElement&&(this.state._activeElement?getKoliBri().Modal.openModal(this.hostElement,this.state._activeElement):getKoliBri().Modal.closeModal(this.hostElement))}disconnectedCallback(){this.hostElement&&getKoliBri().Modal.closeModal(this.hostElement)}render(){return h(Host,{ref:t=>{this.hostElement=t}},this.state._activeElement&&h("div",{class:"overlay"},h("div",{class:"modal",style:{width:this.state._width},"aria-label":this.state._label,"aria-modal":"true",role:"dialog",onKeyDown:this.onKeyDown,ref:t=>{t&&(t.setAttribute("tabindex","0"),setTimeout((()=>t.focus()),250))}},h("slot",null))))}validateActiveElement(t){watchValidator(this,"_activeElement",(t=>"object"==typeof t||null===t),new Set(["HTMLElement","null"]),t,{defaultValue:null,hooks:{afterPatch:()=>{var t;null===this._activeElement&&(null===(t=this.state._on)||void 0===t?void 0:t.onClose)&&this.state._on.onClose()}}})}validateLabel(t){validateLabel(this,t)}validateOn(t){if("object"==typeof t&&null!==t){featureHint("[KolTabs] Prüfen, wie man auch einen EventCallback einzeln ändern kann.");const e={};"function"!=typeof t.onClose&&!0!==t.onClose||(e.onClose=t.onClose),setState(this,"_on",e)}}validateWidth(t){watchString(this,"_width",t,{defaultValue:"100%"})}componentWillLoad(){this.validateActiveElement(this._activeElement),this.validateLabel(this._label),this.validateOn(this._on),this.validateWidth(this._width)}static get watchers(){return{_activeElement:["validateActiveElement"],_label:["validateLabel"],_on:["validateOn"],_width:["validateWidth"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-modal",{_activeElement:[1040],_label:[1],_on:[16],_width:[1],state:[32]},void 0,{_activeElement:["validateActiveElement"],_label:["validateLabel"],_on:["validateOn"],_width:["validateWidth"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-modal"].forEach((t=>{if("kol-modal"===t)customElements.get(t)||customElements.define(t,KolModal$1)}))}const KolModal=KolModal$1,defineCustomElement=defineCustomElement$1;export{KolModal,defineCustomElement};
@@ -1 +1 @@
1
- {"file":"kol-modal.js","mappings":";;;;;;;AAAA,MAAM,eAAe,GAAG,03HAA03H;;MC0Br4HA,UAAQ;;;;;QAmBH,cAAS,GAAG,CAAC,KAAoB;YACjD,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE;gBACrC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;aAC3B;SACD,CAAC;;;;sBAqD+B,MAAM;qBAEP;YAC/B,cAAc,EAAE,IAAI;YACpB,MAAM,EAAE,GAAG;YACX,MAAM,EAAE,MAAM;SACd;;IA/EM,kBAAkB;QACxB,IAAI,IAAI,CAAC,WAAW,EAAmC;YACtD,IAAI,IAAI,CAAC,KAAK,CAAC,cAAc,EAAmC;gBAC9D,OAAO,CAAC,KAAsB,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;aACvF;iBAAM;gBACL,OAAO,CAAC,KAAsB,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;aAC7D;SACD;KACD;IAEM,oBAAoB;QAC1B,IAAI,IAAI,CAAC,WAAW,EAAmC;YACrD,OAAO,CAAC,KAAsB,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;SAC7D;KACD;IAQM,MAAM;QACZ,QACC,EAAC,IAAI,IACJ,GAAG,EAAE,CAAC,EAAE;gBACP,IAAI,CAAC,WAAW,GAAG,EAAiB,CAAC;aACrC,IAEA,IAAI,CAAC,KAAK,CAAC,cAAc,KACzB,WAAK,KAAK,EAAC,SAAS,IACnB,WACC,KAAK,EAAC,OAAO,EACb,KAAK,EAAE;gBACN,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM;aACxB,gBACW,IAAI,CAAC,KAAK,CAAC,MAAM,gBAClB,MAAM,EACjB,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,GAAG,EAAE,CAAC,EAAE;gBACP,IAAI,EAAE,EAAmC;oBACxC,EAAE,CAAC,YAAY,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;oBACjC,UAAU,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,GAAG,CAAC,CAAC;iBAClC;aACD,IAED,eAAQ,CACH,CACD,CACN,CACK,EACN;KACF;IA6BM,qBAAqB,CAAC,KAA0B;QACtD,cAAc,CAAC,IAAI,EAAE,gBAAgB,EAAE,CAAC,KAAK,KAAc,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE,IAAI,GAAG,CAAC,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE;YAChJ,YAAY,EAAE,IAAI;YAClB,KAAK,EAAE;gBACN,UAAU,EAAE;;oBAEX,IAAI,IAAI,CAAC,cAAc,KAAK,IAAI,KAAI,MAAA,IAAI,CAAC,KAAK,CAAC,GAAG,0CAAE,OAAO,CAAA,EAAE;wBAC5D,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;qBACzB;iBACD;aACD;SACD,CAAC,CAAC;KACH;IAGM,aAAa,CAAC,KAAqB;QACzC,aAAa,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;KAC3B;IAGM,UAAU,CAAC,KAAkC;QACnD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE;YAChD,WAAW,CAAC,yEAAyE,CAAC,CAAC;YACvF,MAAM,SAAS,GAA+B,EAAE,CAAC;YACjD,IAAI,OAAO,KAAK,CAAC,OAAO,KAAK,UAAU,IAAI,KAAK,CAAC,OAAO,KAAK,IAAI,EAAE;gBAClE,SAAS,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;aAClC;YACD,QAAQ,CAA6B,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;SAC7D;KACD;IAGM,aAAa,CAAC,KAAc;QAClC,WAAW,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE;YAClC,YAAY,EAAE,MAAM;SACpB,CAAC,CAAC;KACH;IAEM,iBAAiB;QACvB,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAChD,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAChC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC1B,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;KAChC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolModal"],"sources":["src/components/modal/style.css?tag=kol-modal&mode=default&encapsulation=shadow","src/components/modal/component.tsx"],"sourcesContent":["@import url(../style.css);\n@layer kol-component {\n\t.overlay {\n\t\tbackground-color: rgba(0, 0, 0, 0.33);\n\t\tdisplay: flex;\n\t\theight: 100%;\n\t\tinset: 0;\n\t\tposition: fixed;\n\t\twidth: 100%;\n\t\tz-index: 100;\n\t}\n\n\t.modal {\n\t\tmargin: auto;\n\t\tmax-height: 100%;\n\t\tmax-width: 100%;\n\t}\n}\n","/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */\nimport { Component, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { KoliBriModalEventCallbacks } from '../../types/modal';\nimport { LabelPropType, validateLabel } from '../../types/props/label';\nimport { featureHint } from '../../utils/a11y.tipps';\nimport { KoliBri } from '../../utils/dev.utils';\nimport { setState, watchString, watchValidator } from '../../utils/prop.validators';\nimport { ModalService } from './service';\nimport { API, States } from './types';\n\n/**\n * https://en.wikipedia.org/wiki/Modal_window\n * @deprecated use the native <dialog> instead\n */\n\n/**\n * @slot - Der Inhalt des Modals.\n */\n@Component({\n\ttag: 'kol-modal',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolModal implements API {\n\tprivate hostElement?: HTMLElement;\n\n\tpublic componentDidRender(): void {\n\t\tif (this.hostElement /* SSR instanceof HTMLElement */) {\n\t\t\tif (this.state._activeElement /* SSR instanceof HTMLElement */) {\n\t\t\t\t(KoliBri.Modal as ModalService).openModal(this.hostElement, this.state._activeElement);\n\t\t\t} else {\n\t\t\t\t(KoliBri.Modal as ModalService).closeModal(this.hostElement);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic disconnectedCallback(): void {\n\t\tif (this.hostElement /* SSR instanceof HTMLElement */) {\n\t\t\t(KoliBri.Modal as ModalService).closeModal(this.hostElement);\n\t\t}\n\t}\n\n\tprivate readonly onKeyDown = (event: KeyboardEvent) => {\n\t\tif (event && event.code === 'Escape') {\n\t\t\tthis._activeElement = null;\n\t\t}\n\t};\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tref={(el) => {\n\t\t\t\t\tthis.hostElement = el as HTMLElement;\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{this.state._activeElement /* SSR instanceof HTMLElement */ && (\n\t\t\t\t\t<div class=\"overlay\">\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass=\"modal\"\n\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\twidth: this.state._width,\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\taria-label={this.state._label}\n\t\t\t\t\t\t\taria-modal=\"true\"\n\t\t\t\t\t\t\trole=\"dialog\"\n\t\t\t\t\t\t\tonKeyDown={this.onKeyDown}\n\t\t\t\t\t\t\tref={(el) => {\n\t\t\t\t\t\t\t\tif (el /* SSR instanceof HTMLElement */) {\n\t\t\t\t\t\t\t\t\tel.setAttribute('tabindex', '0');\n\t\t\t\t\t\t\t\t\tsetTimeout(() => el.focus(), 250);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Gibt die Referenz auf das auslösende HTML-Element an, wodurch das Modal geöffnet wurde.\n\t */\n\t@Prop({ mutable: true }) public _activeElement?: HTMLElement | null;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() public _label!: LabelPropType;\n\n\t/**\n\t * Gibt die EventCallback-Function für das Schließen des Modals an.\n\t */\n\t@Prop() public _on?: KoliBriModalEventCallbacks;\n\n\t/**\n\t * Defines the width of the modal. (max-width: 100%)\n\t */\n\t@Prop() public _width?: string = '100%';\n\n\t@State() public state: States = {\n\t\t_activeElement: null,\n\t\t_label: '…', // ⚠ required\n\t\t_width: '100%',\n\t};\n\n\t@Watch('_activeElement')\n\tpublic validateActiveElement(value?: HTMLElement | null): void {\n\t\twatchValidator(this, '_activeElement', (value): boolean => typeof value === 'object' || value === null, new Set(['HTMLElement', 'null']), value, {\n\t\t\tdefaultValue: null,\n\t\t\thooks: {\n\t\t\t\tafterPatch: () => {\n\t\t\t\t\t/* Call onClose event in the _activeElement watcher because activeElement can be set internally and from the outside and closes the modal when set to null. */\n\t\t\t\t\tif (this._activeElement === null && this.state._on?.onClose) {\n\t\t\t\t\t\tthis.state._on.onClose();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelPropType): void {\n\t\tvalidateLabel(this, value);\n\t}\n\n\t@Watch('_on')\n\tpublic validateOn(value?: KoliBriModalEventCallbacks): void {\n\t\tif (typeof value === 'object' && value !== null) {\n\t\t\tfeatureHint('[KolTabs] Prüfen, wie man auch einen EventCallback einzeln ändern kann.');\n\t\t\tconst callbacks: KoliBriModalEventCallbacks = {};\n\t\t\tif (typeof value.onClose === 'function' || value.onClose === true) {\n\t\t\t\tcallbacks.onClose = value.onClose;\n\t\t\t}\n\t\t\tsetState<KoliBriModalEventCallbacks>(this, '_on', callbacks);\n\t\t}\n\t}\n\n\t@Watch('_width')\n\tpublic validateWidth(value?: string): void {\n\t\twatchString(this, '_width', value, {\n\t\t\tdefaultValue: '100%',\n\t\t});\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateActiveElement(this._activeElement);\n\t\tthis.validateLabel(this._label);\n\t\tthis.validateOn(this._on);\n\t\tthis.validateWidth(this._width);\n\t}\n}\n"],"version":3}
1
+ {"file":"kol-modal.js","mappings":";;;;;;;AAAA,MAAM,eAAe,GAAG,03HAA03H;;MC0Br4HA,UAAQ;;;;;QAmBH,cAAS,GAAG,CAAC,KAAoB;YACjD,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE;gBACrC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;aAC3B;SACD,CAAC;;;;sBAqD+B,MAAM;qBAEP;YAC/B,cAAc,EAAE,IAAI;YACpB,MAAM,EAAE,GAAG;YACX,MAAM,EAAE,MAAM;SACd;;IA/EM,kBAAkB;QACxB,IAAI,IAAI,CAAC,WAAW,EAAmC;YACtD,IAAI,IAAI,CAAC,KAAK,CAAC,cAAc,EAAmC;gBAC9D,UAAU,EAAE,CAAC,KAAsB,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;aAC5F;iBAAM;gBACL,UAAU,EAAE,CAAC,KAAsB,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;aAClE;SACD;KACD;IAEM,oBAAoB;QAC1B,IAAI,IAAI,CAAC,WAAW,EAAmC;YACrD,UAAU,EAAE,CAAC,KAAsB,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;SAClE;KACD;IAQM,MAAM;QACZ,QACC,EAAC,IAAI,IACJ,GAAG,EAAE,CAAC,EAAE;gBACP,IAAI,CAAC,WAAW,GAAG,EAAiB,CAAC;aACrC,IAEA,IAAI,CAAC,KAAK,CAAC,cAAc,KACzB,WAAK,KAAK,EAAC,SAAS,IACnB,WACC,KAAK,EAAC,OAAO,EACb,KAAK,EAAE;gBACN,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM;aACxB,gBACW,IAAI,CAAC,KAAK,CAAC,MAAM,gBAClB,MAAM,EACjB,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,GAAG,EAAE,CAAC,EAAE;gBACP,IAAI,EAAE,EAAmC;oBACxC,EAAE,CAAC,YAAY,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;oBACjC,UAAU,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,GAAG,CAAC,CAAC;iBAClC;aACD,IAED,eAAQ,CACH,CACD,CACN,CACK,EACN;KACF;IA6BM,qBAAqB,CAAC,KAA0B;QACtD,cAAc,CAAC,IAAI,EAAE,gBAAgB,EAAE,CAAC,KAAK,KAAc,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE,IAAI,GAAG,CAAC,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE;YAChJ,YAAY,EAAE,IAAI;YAClB,KAAK,EAAE;gBACN,UAAU,EAAE;;oBAEX,IAAI,IAAI,CAAC,cAAc,KAAK,IAAI,KAAI,MAAA,IAAI,CAAC,KAAK,CAAC,GAAG,0CAAE,OAAO,CAAA,EAAE;wBAC5D,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;qBACzB;iBACD;aACD;SACD,CAAC,CAAC;KACH;IAGM,aAAa,CAAC,KAAqB;QACzC,aAAa,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;KAC3B;IAGM,UAAU,CAAC,KAAkC;QACnD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE;YAChD,WAAW,CAAC,yEAAyE,CAAC,CAAC;YACvF,MAAM,SAAS,GAA+B,EAAE,CAAC;YACjD,IAAI,OAAO,KAAK,CAAC,OAAO,KAAK,UAAU,IAAI,KAAK,CAAC,OAAO,KAAK,IAAI,EAAE;gBAClE,SAAS,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;aAClC;YACD,QAAQ,CAA6B,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;SAC7D;KACD;IAGM,aAAa,CAAC,KAAc;QAClC,WAAW,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE;YAClC,YAAY,EAAE,MAAM;SACpB,CAAC,CAAC;KACH;IAEM,iBAAiB;QACvB,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAChD,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAChC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC1B,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;KAChC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolModal"],"sources":["src/components/modal/style.css?tag=kol-modal&mode=default&encapsulation=shadow","src/components/modal/component.tsx"],"sourcesContent":["@import url(../style.css);\n@layer kol-component {\n\t.overlay {\n\t\tbackground-color: rgba(0, 0, 0, 0.33);\n\t\tdisplay: flex;\n\t\theight: 100%;\n\t\tinset: 0;\n\t\tposition: fixed;\n\t\twidth: 100%;\n\t\tz-index: 100;\n\t}\n\n\t.modal {\n\t\tmargin: auto;\n\t\tmax-height: 100%;\n\t\tmax-width: 100%;\n\t}\n}\n","/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */\nimport { Component, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { KoliBriModalEventCallbacks } from '../../types/modal';\nimport { LabelPropType, validateLabel } from '../../types/props/label';\nimport { featureHint } from '../../utils/a11y.tipps';\nimport { getKoliBri } from '../../utils/dev.utils';\nimport { setState, watchString, watchValidator } from '../../utils/prop.validators';\nimport { ModalService } from './service';\nimport { API, States } from './types';\n\n/**\n * https://en.wikipedia.org/wiki/Modal_window\n * @deprecated use the native <dialog> instead\n */\n\n/**\n * @slot - Der Inhalt des Modals.\n */\n@Component({\n\ttag: 'kol-modal',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolModal implements API {\n\tprivate hostElement?: HTMLElement;\n\n\tpublic componentDidRender(): void {\n\t\tif (this.hostElement /* SSR instanceof HTMLElement */) {\n\t\t\tif (this.state._activeElement /* SSR instanceof HTMLElement */) {\n\t\t\t\t(getKoliBri().Modal as ModalService).openModal(this.hostElement, this.state._activeElement);\n\t\t\t} else {\n\t\t\t\t(getKoliBri().Modal as ModalService).closeModal(this.hostElement);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic disconnectedCallback(): void {\n\t\tif (this.hostElement /* SSR instanceof HTMLElement */) {\n\t\t\t(getKoliBri().Modal as ModalService).closeModal(this.hostElement);\n\t\t}\n\t}\n\n\tprivate readonly onKeyDown = (event: KeyboardEvent) => {\n\t\tif (event && event.code === 'Escape') {\n\t\t\tthis._activeElement = null;\n\t\t}\n\t};\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tref={(el) => {\n\t\t\t\t\tthis.hostElement = el as HTMLElement;\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{this.state._activeElement /* SSR instanceof HTMLElement */ && (\n\t\t\t\t\t<div class=\"overlay\">\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass=\"modal\"\n\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\twidth: this.state._width,\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\taria-label={this.state._label}\n\t\t\t\t\t\t\taria-modal=\"true\"\n\t\t\t\t\t\t\trole=\"dialog\"\n\t\t\t\t\t\t\tonKeyDown={this.onKeyDown}\n\t\t\t\t\t\t\tref={(el) => {\n\t\t\t\t\t\t\t\tif (el /* SSR instanceof HTMLElement */) {\n\t\t\t\t\t\t\t\t\tel.setAttribute('tabindex', '0');\n\t\t\t\t\t\t\t\t\tsetTimeout(() => el.focus(), 250);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Gibt die Referenz auf das auslösende HTML-Element an, wodurch das Modal geöffnet wurde.\n\t */\n\t@Prop({ mutable: true }) public _activeElement?: HTMLElement | null;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() public _label!: LabelPropType;\n\n\t/**\n\t * Gibt die EventCallback-Function für das Schließen des Modals an.\n\t */\n\t@Prop() public _on?: KoliBriModalEventCallbacks;\n\n\t/**\n\t * Defines the width of the modal. (max-width: 100%)\n\t */\n\t@Prop() public _width?: string = '100%';\n\n\t@State() public state: States = {\n\t\t_activeElement: null,\n\t\t_label: '…', // ⚠ required\n\t\t_width: '100%',\n\t};\n\n\t@Watch('_activeElement')\n\tpublic validateActiveElement(value?: HTMLElement | null): void {\n\t\twatchValidator(this, '_activeElement', (value): boolean => typeof value === 'object' || value === null, new Set(['HTMLElement', 'null']), value, {\n\t\t\tdefaultValue: null,\n\t\t\thooks: {\n\t\t\t\tafterPatch: () => {\n\t\t\t\t\t/* Call onClose event in the _activeElement watcher because activeElement can be set internally and from the outside and closes the modal when set to null. */\n\t\t\t\t\tif (this._activeElement === null && this.state._on?.onClose) {\n\t\t\t\t\t\tthis.state._on.onClose();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelPropType): void {\n\t\tvalidateLabel(this, value);\n\t}\n\n\t@Watch('_on')\n\tpublic validateOn(value?: KoliBriModalEventCallbacks): void {\n\t\tif (typeof value === 'object' && value !== null) {\n\t\t\tfeatureHint('[KolTabs] Prüfen, wie man auch einen EventCallback einzeln ändern kann.');\n\t\t\tconst callbacks: KoliBriModalEventCallbacks = {};\n\t\t\tif (typeof value.onClose === 'function' || value.onClose === true) {\n\t\t\t\tcallbacks.onClose = value.onClose;\n\t\t\t}\n\t\t\tsetState<KoliBriModalEventCallbacks>(this, '_on', callbacks);\n\t\t}\n\t}\n\n\t@Watch('_width')\n\tpublic validateWidth(value?: string): void {\n\t\twatchString(this, '_width', value, {\n\t\t\tdefaultValue: '100%',\n\t\t});\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateActiveElement(this._activeElement);\n\t\tthis.validateLabel(this._label);\n\t\tthis.validateOn(this._on);\n\t\tthis.validateWidth(this._width);\n\t}\n}\n"],"version":3}
@@ -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{a as translate}from"./i18n.js";import{g as watchBoolean,y as devWarning,F as a11yHintLabelingLandmarks,d as devHint,w as watchValidator}from"./prop.validators.js";import{a as validateHideLabel,d as defineCustomElement$3}from"./component2.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"./validation.js";import{d as defineCustomElement$8}from"./shadow3.js";import{d as defineCustomElement$7}from"./component11.js";import{d as defineCustomElement$6}from"./component5.js";import{d as defineCustomElement$5}from"./component.js";import{d as defineCustomElement$4}from"./component9.js";import{d as defineCustomElement$2}from"./component3.js";const validateCollapsible=(t,e)=>{watchBoolean(t,"_collapsible",e)},validateHasCompactButton=(t,e)=>{watchBoolean(t,"_hasCompactButton",e)},defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * Minimum size of interactive elements.\n\t\t */\n\t\t--a11y-min-size: 44px;\n\t\t/*\n\t\t * No element should be used without a background and font color whose contrast ratio has\n\t\t * not been checked. By initially setting the background color to white and the font color\n\t\t * to black, the contrast ratio is ensured and explicit adjustment is forced.\n\t\t */\n\t\tbackground-color: white;\n\t\tcolor: black;\n\t\t/*\n\t\t * Verdana is an accessible font that can be used without requiring additional loading time.\n\t\t */\n\t\tfont-family: Verdana;\n\t}\n\n\t* {\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\thyphens: auto;\n\t\t/*\n\t\t * Letter spacing is required for all texts.\n\t\t */\n\t\tletter-spacing: inherit;\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\tword-break: break-word;\n\t\t/*\n\t\t * Word spacing is required for all texts.\n\t\t */\n\t\tword-spacing: inherit;\n\t}\n\n\t/*\n\t * All interactive elements should have a minimum size of 44px.\n\t */\n\t/* input:not([type='checkbox'], [type='radio'], [type='range']), */\n\t/* option, */\n\t/* select, */\n\t/* textarea, */\n\t[role='button'],\n\tbutton:not([role='link']),\n\tkol-input .input {\n\t\tmin-height: var(--a11y-min-size);\n\t\tmin-width: var(--a11y-min-size);\n\t}\n\n\t/*\n\t * Some interactive elements should not inherit the font-family and font-size.\n\t */\n\ta,\n\tbutton,\n\th1,\n\th2,\n\th3,\n\th4,\n\th5,\n\th6,\n\tinput,\n\toption,\n\tselect,\n\ttextarea {\n\t\t/*\n\t\t * All elements should inherit the font family from his parent element.\n\t\t */\n\t\tfont-family: inherit;\n\t\t/*\n\t\t * All elements should inherit the font size from his parent element.\n\t\t */\n\t\tfont-size: inherit;\n\t}\n}\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\tclip: rect(0 0 0 0);\n\tclip-path: inset(50%);\n\theight: 1px;\n\toverflow: hidden;\n\tposition: absolute;\n\twhite-space: nowrap;\n\twidth: 1px;\n}\n\n@layer kol-global {\n\t/*\n\t * Dieses CSS stellt sicher, dass der Standard-Style\n\t * von A und Button resettet werden.\n\t */\n\t:is(a, button) {\n\t\tbackground-color: transparent;\n\t\tborder: none;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\twidth: 100%; /* 100% needed for custom width from outside */\n\t}\n\n\t/*\n\t * Ensure elements with hidden attribute to be actually not visible\n\t * @see https://meowni.ca/hidden.is.a.lie.html\n\t */\n\t[hidden] {\n\t\tdisplay: none !important;\n\t}\n}\n\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * The max-width is needed to prevent the table from overflowing the\n\t\t * parent node, if the table is wider than the parent node.\n\t\t */\n\t\tmax-width: 100%;\n\t}\n\n\t* {\n\t\t/*\n\t\t * We prefer to box-sizing: border-box for all elements.\n\t\t */\n\t\tbox-sizing: border-box;\n\t}\n\n\t/* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n\tkol-span-wc {\n\t\tdisplay: grid;\n\t\tplace-items: center;\n\t}\n\n\t/* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n\tkol-span-wc > span {\n\t\tdisplay: flex;\n\t\tplace-items: center;\n\t}\n\n\ta,\n\tbutton {\n\t\tcursor: pointer;\n\t}\n\n\t/* This is the text label. */\n\t.icon-only > kol-span-wc > span > span {\n\t\tdisplay: none;\n\t}\n}\n\n@layer kol-component {\n\t:host > div {\n\t\tdisplay: grid;\n\t\tplace-items: center;\n\t}\n\n\tnav {\n\t\twidth: 100%;\n\t}\n\n\t.list {\n\t\tdisplay: flex;\n\t\tlist-style: none;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t}\n\n\t.list.vertical {\n\t\tflex-direction: column;\n\t}\n\n\t.entry {\n\t\tdisplay: flex;\n\t}\n\n\t.button-link-text-switch {\n\t\tflex-grow: 1;\n\t}\n\n\t.entry kol-span-wc {\n\t\tjustify-items: start;\n\t}\n}\n",KolNav$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.onClick=t=>{t._active=!t._active,this.state=Object.assign({},this.state)},this.hasActiveChild=t=>!!(Array.isArray(t._children)&&t._children.length>0)&&t._children.some(this.hasActiveChild),this.linkList=t=>h("ul",{class:"list "+(0===t.deep&&"horizontal"===t.orientation?" horizontal":" vertical"),"data-deep":t.deep},t.links.map(((e,n)=>this.li(t.collapsible,t.hideLabel,t.deep,n,e,t.orientation)))),this._collapsible=!0,this._hasCompactButton=!1,this._hideLabel=!1,this._label=void 0,this._links=void 0,this._orientation="vertical",this.state={_collapsible:!0,_hasCompactButton:!1,_hideLabel:!1,_label:"…",_links:[],_orientation:"vertical"}}entry(t,e,n,i,a){return h("div",{class:{entry:!0,"hide-label":e}},h("kol-button-link-text-switch",{class:"button-link-text-switch",_link:Object.assign(Object.assign({},i),{_hideLabel:e})}),n?this.expandButton(t,i,a):"")}expandButton(t,e,n){return h("kol-button-wc",{class:"expand-button",_ariaExpanded:n,_disabled:!t,_icons:"codicon codicon-"+(n?"remove":"add"),_hideLabel:!0,_label:`Untermenü zu ${e._label} ${n?"schließen":"öffnen"}`,_on:{onClick:()=>this.onClick(e)}})}li(t,e,n,i,a,l){const o=!!a._active,s=Array.isArray(a._children)&&a._children.length>0,r=s&&o;return h("li",{class:{active:o,expanded:r,"has-children":s},key:i},this.entry(t,e,s,a,o),r?h(this.linkList,{collapsible:t,hideLabel:e,deep:n+1,links:a._children||[],orientation:l}):"")}render(){let t=this.state._hasCompactButton;"horizontal"===this.state._orientation&&!0===this.state._hasCompactButton&&(t=!1,devWarning("[KolNav] Wenn eine horizontale Navigation verwendet wird, kann die Option _hasCompactButton nicht aktiviert werden."));const e=!0===this.state._collapsible,n=!0===this.state._hideLabel,i=this.state._orientation;return h(Host,null,h("div",{class:{[i]:!0}},h("nav",{"aria-label":this.state._label,id:"nav"},h(this.linkList,{collapsible:e,hideLabel:n,deep:0,links:this.state._links,orientation:i})),t&&h("div",{class:"compact"},h("kol-button",{_ariaControls:"nav",_ariaExpanded:!n,_icons:n?"codicon codicon-chevron-right":"codicon codicon-chevron-left",_hideLabel:!0,_label:translate(n?"kol-nav-maximize":"kol-nav-minimize"),_on:{onClick:()=>{this.state=Object.assign(Object.assign({},this.state),{_hideLabel:!1===this.state._hideLabel})}},_tooltipAlign:"right",_variant:"ghost"}))))}validateCollapsible(t){validateCollapsible(this,t)}validateHasCompactButton(t){validateHasCompactButton(this,t)}validateHideLabel(t){validateHideLabel(this,t)}validateLabel(t,e,n=!1){n||removeNavLabel(this.state._label),validateLabel(this,t),a11yHintLabelingLandmarks(t),addNavLabel(this.state._label)}validateLinks(t){watchNavLinks("KolNav",this,t),devHint("[KolNav] Die Navigationsstruktur wird noch nicht rekursiv validiert.")}validateOrientation(t){watchValidator(this,"_orientation",(t=>"horizontal"===t||"vertical"===t),new Set(["Orientation {horizontal, vertical}"]),t,{defaultValue:"vertical"})}componentWillLoad(){this.validateCollapsible(this._collapsible),this.validateHideLabel(this._hideLabel),this.validateHasCompactButton(this._hasCompactButton),this.validateLabel(this._label,void 0,!0),this.validateLinks(this._links),this.validateOrientation(this._orientation)}disconnectedCallback(){removeNavLabel(this.state._label)}static get watchers(){return{_collapsible:["validateCollapsible"],_hasCompactButton:["validateHasCompactButton"],_hideLabel:["validateHideLabel"],_label:["validateLabel"],_links:["validateLinks"],_orientation:["validateOrientation"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-nav",{_collapsible:[4],_hasCompactButton:[4,"_has-compact-button"],_hideLabel:[4,"_hide-label"],_label:[1],_links:[1],_orientation:[1],state:[32]},void 0,{_collapsible:["validateCollapsible"],_hasCompactButton:["validateHasCompactButton"],_hideLabel:["validateHideLabel"],_label:["validateLabel"],_links:["validateLinks"],_orientation:["validateOrientation"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-nav","kol-button","kol-button-link-text-switch","kol-button-wc","kol-icon","kol-link-wc","kol-span-wc","kol-tooltip-wc"].forEach((t=>{switch(t){case"kol-nav":customElements.get(t)||customElements.define(t,KolNav$1);break;case"kol-button":customElements.get(t)||defineCustomElement$8();break;case"kol-button-link-text-switch":customElements.get(t)||defineCustomElement$7();break;case"kol-button-wc":customElements.get(t)||defineCustomElement$6();break;case"kol-icon":customElements.get(t)||defineCustomElement$5();break;case"kol-link-wc":customElements.get(t)||defineCustomElement$4();break;case"kol-span-wc":customElements.get(t)||defineCustomElement$3();break;case"kol-tooltip-wc":customElements.get(t)||defineCustomElement$2()}}))}const KolNav=KolNav$1,defineCustomElement=defineCustomElement$1;export{KolNav,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{a as translate}from"./i18n.js";import{f as watchBoolean,y as devWarning,F as a11yHintLabelingLandmarks,d as devHint,w as watchValidator}from"./prop.validators.js";import{a as validateHideLabel,d as defineCustomElement$3}from"./component2.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"./validation.js";import{d as defineCustomElement$8}from"./shadow3.js";import{d as defineCustomElement$7}from"./component11.js";import{d as defineCustomElement$6}from"./component5.js";import{d as defineCustomElement$5}from"./component.js";import{d as defineCustomElement$4}from"./component9.js";import{d as defineCustomElement$2}from"./component3.js";const validateCollapsible=(t,e)=>{watchBoolean(t,"_collapsible",e)},validateHasCompactButton=(t,e)=>{watchBoolean(t,"_hasCompactButton",e)},defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * Minimum size of interactive elements.\n\t\t */\n\t\t--a11y-min-size: 44px;\n\t\t/*\n\t\t * No element should be used without a background and font color whose contrast ratio has\n\t\t * not been checked. By initially setting the background color to white and the font color\n\t\t * to black, the contrast ratio is ensured and explicit adjustment is forced.\n\t\t */\n\t\tbackground-color: white;\n\t\tcolor: black;\n\t\t/*\n\t\t * Verdana is an accessible font that can be used without requiring additional loading time.\n\t\t */\n\t\tfont-family: Verdana;\n\t}\n\n\t* {\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\thyphens: auto;\n\t\t/*\n\t\t * Letter spacing is required for all texts.\n\t\t */\n\t\tletter-spacing: inherit;\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\tword-break: break-word;\n\t\t/*\n\t\t * Word spacing is required for all texts.\n\t\t */\n\t\tword-spacing: inherit;\n\t}\n\n\t/*\n\t * All interactive elements should have a minimum size of 44px.\n\t */\n\t/* input:not([type='checkbox'], [type='radio'], [type='range']), */\n\t/* option, */\n\t/* select, */\n\t/* textarea, */\n\t[role='button'],\n\tbutton:not([role='link']),\n\tkol-input .input {\n\t\tmin-height: var(--a11y-min-size);\n\t\tmin-width: var(--a11y-min-size);\n\t}\n\n\t/*\n\t * Some interactive elements should not inherit the font-family and font-size.\n\t */\n\ta,\n\tbutton,\n\th1,\n\th2,\n\th3,\n\th4,\n\th5,\n\th6,\n\tinput,\n\toption,\n\tselect,\n\ttextarea {\n\t\t/*\n\t\t * All elements should inherit the font family from his parent element.\n\t\t */\n\t\tfont-family: inherit;\n\t\t/*\n\t\t * All elements should inherit the font size from his parent element.\n\t\t */\n\t\tfont-size: inherit;\n\t}\n}\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\tclip: rect(0 0 0 0);\n\tclip-path: inset(50%);\n\theight: 1px;\n\toverflow: hidden;\n\tposition: absolute;\n\twhite-space: nowrap;\n\twidth: 1px;\n}\n\n@layer kol-global {\n\t/*\n\t * Dieses CSS stellt sicher, dass der Standard-Style\n\t * von A und Button resettet werden.\n\t */\n\t:is(a, button) {\n\t\tbackground-color: transparent;\n\t\tborder: none;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\twidth: 100%; /* 100% needed for custom width from outside */\n\t}\n\n\t/*\n\t * Ensure elements with hidden attribute to be actually not visible\n\t * @see https://meowni.ca/hidden.is.a.lie.html\n\t */\n\t[hidden] {\n\t\tdisplay: none !important;\n\t}\n}\n\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * The max-width is needed to prevent the table from overflowing the\n\t\t * parent node, if the table is wider than the parent node.\n\t\t */\n\t\tmax-width: 100%;\n\t}\n\n\t* {\n\t\t/*\n\t\t * We prefer to box-sizing: border-box for all elements.\n\t\t */\n\t\tbox-sizing: border-box;\n\t}\n\n\t/* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n\tkol-span-wc {\n\t\tdisplay: grid;\n\t\tplace-items: center;\n\t}\n\n\t/* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n\tkol-span-wc > span {\n\t\tdisplay: flex;\n\t\tplace-items: center;\n\t}\n\n\ta,\n\tbutton {\n\t\tcursor: pointer;\n\t}\n\n\t/* This is the text label. */\n\t.icon-only > kol-span-wc > span > span {\n\t\tdisplay: none;\n\t}\n}\n\n@layer kol-component {\n\t:host > div {\n\t\tdisplay: grid;\n\t\tplace-items: center;\n\t}\n\n\tnav {\n\t\twidth: 100%;\n\t}\n\n\t.list {\n\t\tdisplay: flex;\n\t\tlist-style: none;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t}\n\n\t.list.vertical {\n\t\tflex-direction: column;\n\t}\n\n\t.entry {\n\t\tdisplay: flex;\n\t}\n\n\t.button-link-text-switch {\n\t\tflex-grow: 1;\n\t}\n\n\t.entry kol-span-wc {\n\t\tjustify-items: start;\n\t}\n}\n",KolNav$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.onClick=t=>{t._active=!t._active,this.state=Object.assign({},this.state)},this.hasActiveChild=t=>!!(Array.isArray(t._children)&&t._children.length>0)&&t._children.some(this.hasActiveChild),this.linkList=t=>h("ul",{class:"list "+(0===t.deep&&"horizontal"===t.orientation?" horizontal":" vertical"),"data-deep":t.deep},t.links.map(((e,n)=>this.li(t.collapsible,t.hideLabel,t.deep,n,e,t.orientation)))),this._collapsible=!0,this._hasCompactButton=!1,this._hideLabel=!1,this._label=void 0,this._links=void 0,this._orientation="vertical",this.state={_collapsible:!0,_hasCompactButton:!1,_hideLabel:!1,_label:"…",_links:[],_orientation:"vertical"}}entry(t,e,n,i,a){return h("div",{class:{entry:!0,"hide-label":e}},h("kol-button-link-text-switch",{class:"button-link-text-switch",_link:Object.assign(Object.assign({},i),{_hideLabel:e})}),n?this.expandButton(t,i,a):"")}expandButton(t,e,n){return h("kol-button-wc",{class:"expand-button",_ariaExpanded:n,_disabled:!t,_icons:"codicon codicon-"+(n?"remove":"add"),_hideLabel:!0,_label:`Untermenü zu ${e._label} ${n?"schließen":"öffnen"}`,_on:{onClick:()=>this.onClick(e)}})}li(t,e,n,i,a,l){const o=!!a._active,s=Array.isArray(a._children)&&a._children.length>0,r=s&&o;return h("li",{class:{active:o,expanded:r,"has-children":s},key:i},this.entry(t,e,s,a,o),r?h(this.linkList,{collapsible:t,hideLabel:e,deep:n+1,links:a._children||[],orientation:l}):"")}render(){let t=this.state._hasCompactButton;"horizontal"===this.state._orientation&&!0===this.state._hasCompactButton&&(t=!1,devWarning("[KolNav] Wenn eine horizontale Navigation verwendet wird, kann die Option _hasCompactButton nicht aktiviert werden."));const e=!0===this.state._collapsible,n=!0===this.state._hideLabel,i=this.state._orientation;return h(Host,null,h("div",{class:{[i]:!0}},h("nav",{"aria-label":this.state._label,id:"nav"},h(this.linkList,{collapsible:e,hideLabel:n,deep:0,links:this.state._links,orientation:i})),t&&h("div",{class:"compact"},h("kol-button",{_ariaControls:"nav",_ariaExpanded:!n,_icons:n?"codicon codicon-chevron-right":"codicon codicon-chevron-left",_hideLabel:!0,_label:translate(n?"kol-nav-maximize":"kol-nav-minimize"),_on:{onClick:()=>{this.state=Object.assign(Object.assign({},this.state),{_hideLabel:!1===this.state._hideLabel})}},_tooltipAlign:"right",_variant:"ghost"}))))}validateCollapsible(t){validateCollapsible(this,t)}validateHasCompactButton(t){validateHasCompactButton(this,t)}validateHideLabel(t){validateHideLabel(this,t)}validateLabel(t,e,n=!1){n||removeNavLabel(this.state._label),validateLabel(this,t),a11yHintLabelingLandmarks(t),addNavLabel(this.state._label)}validateLinks(t){watchNavLinks("KolNav",this,t),devHint("[KolNav] Die Navigationsstruktur wird noch nicht rekursiv validiert.")}validateOrientation(t){watchValidator(this,"_orientation",(t=>"horizontal"===t||"vertical"===t),new Set(["Orientation {horizontal, vertical}"]),t,{defaultValue:"vertical"})}componentWillLoad(){this.validateCollapsible(this._collapsible),this.validateHideLabel(this._hideLabel),this.validateHasCompactButton(this._hasCompactButton),this.validateLabel(this._label,void 0,!0),this.validateLinks(this._links),this.validateOrientation(this._orientation)}disconnectedCallback(){removeNavLabel(this.state._label)}static get watchers(){return{_collapsible:["validateCollapsible"],_hasCompactButton:["validateHasCompactButton"],_hideLabel:["validateHideLabel"],_label:["validateLabel"],_links:["validateLinks"],_orientation:["validateOrientation"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-nav",{_collapsible:[4],_hasCompactButton:[4,"_has-compact-button"],_hideLabel:[4,"_hide-label"],_label:[1],_links:[1],_orientation:[1],state:[32]},void 0,{_collapsible:["validateCollapsible"],_hasCompactButton:["validateHasCompactButton"],_hideLabel:["validateHideLabel"],_label:["validateLabel"],_links:["validateLinks"],_orientation:["validateOrientation"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-nav","kol-button","kol-button-link-text-switch","kol-button-wc","kol-icon","kol-link-wc","kol-span-wc","kol-tooltip-wc"].forEach((t=>{switch(t){case"kol-nav":customElements.get(t)||customElements.define(t,KolNav$1);break;case"kol-button":customElements.get(t)||defineCustomElement$8();break;case"kol-button-link-text-switch":customElements.get(t)||defineCustomElement$7();break;case"kol-button-wc":customElements.get(t)||defineCustomElement$6();break;case"kol-icon":customElements.get(t)||defineCustomElement$5();break;case"kol-link-wc":customElements.get(t)||defineCustomElement$4();break;case"kol-span-wc":customElements.get(t)||defineCustomElement$3();break;case"kol-tooltip-wc":customElements.get(t)||defineCustomElement$2()}}))}const KolNav=KolNav$1,defineCustomElement=defineCustomElement$1;export{KolNav,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{v as validateLabel}from"./label.js";import{C as watchNumber,f as watchString,w as watchValidator}from"./prop.validators.js";var KoliBriProgressVariantEnum;!function(t){t.bar="bar",t.cycle="cycle",t["cycle-value-label"]="cycle-value-label",t["cycle-label-value"]="cycle-label-value"}(KoliBriProgressVariantEnum||(KoliBriProgressVariantEnum={}));const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * Minimum size of interactive elements.\n\t\t */\n\t\t--a11y-min-size: 44px;\n\t\t/*\n\t\t * No element should be used without a background and font color whose contrast ratio has\n\t\t * not been checked. By initially setting the background color to white and the font color\n\t\t * to black, the contrast ratio is ensured and explicit adjustment is forced.\n\t\t */\n\t\tbackground-color: white;\n\t\tcolor: black;\n\t\t/*\n\t\t * Verdana is an accessible font that can be used without requiring additional loading time.\n\t\t */\n\t\tfont-family: Verdana;\n\t}\n\n\t* {\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\thyphens: auto;\n\t\t/*\n\t\t * Letter spacing is required for all texts.\n\t\t */\n\t\tletter-spacing: inherit;\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\tword-break: break-word;\n\t\t/*\n\t\t * Word spacing is required for all texts.\n\t\t */\n\t\tword-spacing: inherit;\n\t}\n\n\t/*\n\t * All interactive elements should have a minimum size of 44px.\n\t */\n\t/* input:not([type='checkbox'], [type='radio'], [type='range']), */\n\t/* option, */\n\t/* select, */\n\t/* textarea, */\n\t[role='button'],\n\tbutton:not([role='link']),\n\tkol-input .input {\n\t\tmin-height: var(--a11y-min-size);\n\t\tmin-width: var(--a11y-min-size);\n\t}\n\n\t/*\n\t * Some interactive elements should not inherit the font-family and font-size.\n\t */\n\ta,\n\tbutton,\n\th1,\n\th2,\n\th3,\n\th4,\n\th5,\n\th6,\n\tinput,\n\toption,\n\tselect,\n\ttextarea {\n\t\t/*\n\t\t * All elements should inherit the font family from his parent element.\n\t\t */\n\t\tfont-family: inherit;\n\t\t/*\n\t\t * All elements should inherit the font size from his parent element.\n\t\t */\n\t\tfont-size: inherit;\n\t}\n}\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\tclip: rect(0 0 0 0);\n\tclip-path: inset(50%);\n\theight: 1px;\n\toverflow: hidden;\n\tposition: absolute;\n\twhite-space: nowrap;\n\twidth: 1px;\n}\n\n@layer kol-global {\n\t/*\n\t * Dieses CSS stellt sicher, dass der Standard-Style\n\t * von A und Button resettet werden.\n\t */\n\t:is(a, button) {\n\t\tbackground-color: transparent;\n\t\tborder: none;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\twidth: 100%; /* 100% needed for custom width from outside */\n\t}\n\n\t/*\n\t * Ensure elements with hidden attribute to be actually not visible\n\t * @see https://meowni.ca/hidden.is.a.lie.html\n\t */\n\t[hidden] {\n\t\tdisplay: none !important;\n\t}\n}\n\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * The max-width is needed to prevent the table from overflowing the\n\t\t * parent node, if the table is wider than the parent node.\n\t\t */\n\t\tmax-width: 100%;\n\t}\n\n\t* {\n\t\t/*\n\t\t * We prefer to box-sizing: border-box for all elements.\n\t\t */\n\t\tbox-sizing: border-box;\n\t}\n\n\t/* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n\tkol-span-wc {\n\t\tdisplay: grid;\n\t\tplace-items: center;\n\t}\n\n\t/* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n\tkol-span-wc > span {\n\t\tdisplay: flex;\n\t\tplace-items: center;\n\t}\n\n\ta,\n\tbutton {\n\t\tcursor: pointer;\n\t}\n\n\t/* This is the text label. */\n\t.icon-only > kol-span-wc > span > span {\n\t\tdisplay: none;\n\t}\n}\n\n@layer kol-component {\n\tprogress {\n\t\tdisplay: block;\n\t\theight: 0;\n\t\toverflow: hidden;\n\t\twidth: 0;\n\t}\n\n\t.bar .border {\n\t\tfill: transparent;\n\t\tstroke: black;\n\t}\n\n\t.bar .background {\n\t\tfill: lightgray;\n\t\tstroke: white;\n\t}\n\n\t.bar .progress {\n\t\tfill: #0075ff;\n\t\tstroke: transparent;\n\t\ttransition: 250ms ease-in-out 50ms;\n\t}\n\n\t.cycle .background {\n\t\tfill: transparent;\n\t\tstroke: lightgray;\n\t}\n\n\t.cycle .border {\n\t\tfill: transparent;\n\t\tstroke: black;\n\t}\n\n\t.cycle .whitespace {\n\t\tfill: transparent;\n\t\tstroke: white;\n\t}\n\n\t.cycle .progress {\n\t\tfill: transparent;\n\t\tstroke: #0075ff;\n\t\ttransform-origin: 50% 50%;\n\t\ttransform: rotate(-90deg);\n\t\ttransition: 250ms ease-in-out 50ms;\n\t}\n\n\t/* https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion */\n\t@media (prefers-reduced-motion) {\n\t\t.progress {\n\t\t\ttransition-duration: 0s;\n\t\t\ttransition-delay: 0s;\n\t\t}\n\t}\n}\n",VALID_VARIANTS=Object.keys(KoliBriProgressVariantEnum),createProgressSVG=t=>{let e="43%",n=t._label?"57%":"50%";switch(t._variant){case"cycle-value-label":t._label&&(e="57%",n="43%");case"cycle":case"cycle-label-value":return h("svg",{class:"cycle",width:"100",viewBox:"0 0 120 120",xmlns:"http://www.w3.org/2000/svg"},h("circle",{class:"background",cx:"60",cy:"60",r:"54.5",fill:"currentColor",stroke:"currentColor","stroke-width":"8"}),h("circle",{class:"whitespace",cx:"60",cy:"60",r:"59",fill:"currentColor",stroke:"currentColor","stroke-width":"3"}),h("circle",{class:"border",cx:"60",cy:"60",r:"59",fill:"currentColor",stroke:"currentColor","stroke-width":"1"}),h("circle",{class:"whitespace",cx:"60",cy:"60",r:"51",fill:"currentColor",stroke:"currentColor","stroke-width":"1"}),h("circle",{class:"border",cx:"60",cy:"60",r:"50",fill:"currentColor",stroke:"currentColor","stroke-width":"1"}),h("circle",{class:"progress",fill:"currentColor",stroke:"currentColor","stroke-linecap":"round","stroke-dasharray":`${Math.round(t._value/t._max*342)}px 342px`,"stroke-width":"6",cx:"60",cy:"60",r:"54.5"}),t._label&&h("text",{"aria-hidden":"true",x:"50%",y:e,"text-anchor":"middle",fill:"currentColor"},t._label),h("text",{"aria-hidden":"true",x:"50%",y:n,"text-anchor":"middle",fill:"currentColor"},t._value,t._unit));default:return h("div",{class:"bar"},t._label&&h("div",null,t._label),h("div",{style:{display:"flex",gap:"0.3em"}},h("svg",{width:"100",viewBox:"0 0 102 8",xmlns:"http://www.w3.org/2000/svg"},h("rect",{class:"background",x:"1",y:"1",height:"10",rx:"5",fill:"currentColor",stroke:"currentColor","stroke-width":"3",width:"100"}),h("rect",{class:"progress",x:"2.5",y:"2.5",height:"7",rx:"3.5",fill:"currentColor",stroke:"currentColor","stroke-width":"3",width:t._value/t._max*95}),h("rect",{class:"border",x:"1",y:"1",height:"10",rx:"5",fill:"currentColor",stroke:"currentColor","stroke-width":"1",width:"100"})),h("text",{"aria-hidden":"true","text-anchor":"middle","dominant-baseline":"central",fill:"currentColor"},t._value,t._unit)))}},KolProcess=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this._label=void 0,this._max=void 0,this._unit="%",this._value=void 0,this._variant=void 0,this.state={_max:100,_unit:"%",_value:0,_variant:"bar",_liveValue:0}}render(){return h(Host,null,createProgressSVG(this.state),h("progress",{"aria-busy":this.state._value<this.state._max?"true":"false",max:this.state._max,value:this.state._value}),h("span",{"aria-live":"polite","aria-relevant":"removals text",hidden:!0},this.state._liveValue," von ",this.state._max," ",this.state._unit))}validateLabel(t){validateLabel(this,t)}validateMax(t){"number"!=typeof t&&(t=100),watchNumber(this,"_max",t,{required:!0})}validateUnit(t){watchString(this,"_unit",t)}validateValue(t){"number"!=typeof t&&(t=0),watchNumber(this,"_value",t,{required:!0})}validateVariant(t){watchValidator(this,"_variant",(t=>"string"==typeof t&&VALID_VARIANTS.includes(t)),new Set(VALID_VARIANTS),t)}componentWillLoad(){this.validateLabel(this._label),this.validateMax(this._max),this.validateUnit(this._unit),this.validateValue(this._value),this.validateVariant(this._variant),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}}},[33,"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((t=>{if("kol-progress"===t)customElements.get(t)||customElements.define(t,KolProcess)}))}const KolProgress=KolProcess,defineCustomElement=defineCustomElement$1;export{KolProgress,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{v as validateLabel}from"./label.js";import{C as watchNumber,b as watchString,w as watchValidator}from"./prop.validators.js";var KoliBriProgressVariantEnum;!function(t){t.bar="bar",t.cycle="cycle",t["cycle-value-label"]="cycle-value-label",t["cycle-label-value"]="cycle-label-value"}(KoliBriProgressVariantEnum||(KoliBriProgressVariantEnum={}));const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * Minimum size of interactive elements.\n\t\t */\n\t\t--a11y-min-size: 44px;\n\t\t/*\n\t\t * No element should be used without a background and font color whose contrast ratio has\n\t\t * not been checked. By initially setting the background color to white and the font color\n\t\t * to black, the contrast ratio is ensured and explicit adjustment is forced.\n\t\t */\n\t\tbackground-color: white;\n\t\tcolor: black;\n\t\t/*\n\t\t * Verdana is an accessible font that can be used without requiring additional loading time.\n\t\t */\n\t\tfont-family: Verdana;\n\t}\n\n\t* {\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\thyphens: auto;\n\t\t/*\n\t\t * Letter spacing is required for all texts.\n\t\t */\n\t\tletter-spacing: inherit;\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\tword-break: break-word;\n\t\t/*\n\t\t * Word spacing is required for all texts.\n\t\t */\n\t\tword-spacing: inherit;\n\t}\n\n\t/*\n\t * All interactive elements should have a minimum size of 44px.\n\t */\n\t/* input:not([type='checkbox'], [type='radio'], [type='range']), */\n\t/* option, */\n\t/* select, */\n\t/* textarea, */\n\t[role='button'],\n\tbutton:not([role='link']),\n\tkol-input .input {\n\t\tmin-height: var(--a11y-min-size);\n\t\tmin-width: var(--a11y-min-size);\n\t}\n\n\t/*\n\t * Some interactive elements should not inherit the font-family and font-size.\n\t */\n\ta,\n\tbutton,\n\th1,\n\th2,\n\th3,\n\th4,\n\th5,\n\th6,\n\tinput,\n\toption,\n\tselect,\n\ttextarea {\n\t\t/*\n\t\t * All elements should inherit the font family from his parent element.\n\t\t */\n\t\tfont-family: inherit;\n\t\t/*\n\t\t * All elements should inherit the font size from his parent element.\n\t\t */\n\t\tfont-size: inherit;\n\t}\n}\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\tclip: rect(0 0 0 0);\n\tclip-path: inset(50%);\n\theight: 1px;\n\toverflow: hidden;\n\tposition: absolute;\n\twhite-space: nowrap;\n\twidth: 1px;\n}\n\n@layer kol-global {\n\t/*\n\t * Dieses CSS stellt sicher, dass der Standard-Style\n\t * von A und Button resettet werden.\n\t */\n\t:is(a, button) {\n\t\tbackground-color: transparent;\n\t\tborder: none;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\twidth: 100%; /* 100% needed for custom width from outside */\n\t}\n\n\t/*\n\t * Ensure elements with hidden attribute to be actually not visible\n\t * @see https://meowni.ca/hidden.is.a.lie.html\n\t */\n\t[hidden] {\n\t\tdisplay: none !important;\n\t}\n}\n\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * The max-width is needed to prevent the table from overflowing the\n\t\t * parent node, if the table is wider than the parent node.\n\t\t */\n\t\tmax-width: 100%;\n\t}\n\n\t* {\n\t\t/*\n\t\t * We prefer to box-sizing: border-box for all elements.\n\t\t */\n\t\tbox-sizing: border-box;\n\t}\n\n\t/* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n\tkol-span-wc {\n\t\tdisplay: grid;\n\t\tplace-items: center;\n\t}\n\n\t/* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n\tkol-span-wc > span {\n\t\tdisplay: flex;\n\t\tplace-items: center;\n\t}\n\n\ta,\n\tbutton {\n\t\tcursor: pointer;\n\t}\n\n\t/* This is the text label. */\n\t.icon-only > kol-span-wc > span > span {\n\t\tdisplay: none;\n\t}\n}\n\n@layer kol-component {\n\tprogress {\n\t\tdisplay: block;\n\t\theight: 0;\n\t\toverflow: hidden;\n\t\twidth: 0;\n\t}\n\n\t.bar .border {\n\t\tfill: transparent;\n\t\tstroke: black;\n\t}\n\n\t.bar .background {\n\t\tfill: lightgray;\n\t\tstroke: white;\n\t}\n\n\t.bar .progress {\n\t\tfill: #0075ff;\n\t\tstroke: transparent;\n\t\ttransition: 250ms ease-in-out 50ms;\n\t}\n\n\t.cycle .background {\n\t\tfill: transparent;\n\t\tstroke: lightgray;\n\t}\n\n\t.cycle .border {\n\t\tfill: transparent;\n\t\tstroke: black;\n\t}\n\n\t.cycle .whitespace {\n\t\tfill: transparent;\n\t\tstroke: white;\n\t}\n\n\t.cycle .progress {\n\t\tfill: transparent;\n\t\tstroke: #0075ff;\n\t\ttransform-origin: 50% 50%;\n\t\ttransform: rotate(-90deg);\n\t\ttransition: 250ms ease-in-out 50ms;\n\t}\n\n\t/* https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion */\n\t@media (prefers-reduced-motion) {\n\t\t.progress {\n\t\t\ttransition-duration: 0s;\n\t\t\ttransition-delay: 0s;\n\t\t}\n\t}\n}\n",VALID_VARIANTS=Object.keys(KoliBriProgressVariantEnum),createProgressSVG=t=>{let e="43%",n=t._label?"57%":"50%";switch(t._variant){case"cycle-value-label":t._label&&(e="57%",n="43%");case"cycle":case"cycle-label-value":return h("svg",{class:"cycle",width:"100",viewBox:"0 0 120 120",xmlns:"http://www.w3.org/2000/svg"},h("circle",{class:"background",cx:"60",cy:"60",r:"54.5",fill:"currentColor",stroke:"currentColor","stroke-width":"8"}),h("circle",{class:"whitespace",cx:"60",cy:"60",r:"59",fill:"currentColor",stroke:"currentColor","stroke-width":"3"}),h("circle",{class:"border",cx:"60",cy:"60",r:"59",fill:"currentColor",stroke:"currentColor","stroke-width":"1"}),h("circle",{class:"whitespace",cx:"60",cy:"60",r:"51",fill:"currentColor",stroke:"currentColor","stroke-width":"1"}),h("circle",{class:"border",cx:"60",cy:"60",r:"50",fill:"currentColor",stroke:"currentColor","stroke-width":"1"}),h("circle",{class:"progress",fill:"currentColor",stroke:"currentColor","stroke-linecap":"round","stroke-dasharray":`${Math.round(t._value/t._max*342)}px 342px`,"stroke-width":"6",cx:"60",cy:"60",r:"54.5"}),t._label&&h("text",{"aria-hidden":"true",x:"50%",y:e,"text-anchor":"middle",fill:"currentColor"},t._label),h("text",{"aria-hidden":"true",x:"50%",y:n,"text-anchor":"middle",fill:"currentColor"},t._value,t._unit));default:return h("div",{class:"bar"},t._label&&h("div",null,t._label),h("div",{style:{display:"flex",gap:"0.3em"}},h("svg",{width:"100",viewBox:"0 0 102 8",xmlns:"http://www.w3.org/2000/svg"},h("rect",{class:"background",x:"1",y:"1",height:"10",rx:"5",fill:"currentColor",stroke:"currentColor","stroke-width":"3",width:"100"}),h("rect",{class:"progress",x:"2.5",y:"2.5",height:"7",rx:"3.5",fill:"currentColor",stroke:"currentColor","stroke-width":"3",width:t._value/t._max*95}),h("rect",{class:"border",x:"1",y:"1",height:"10",rx:"5",fill:"currentColor",stroke:"currentColor","stroke-width":"1",width:"100"})),h("text",{"aria-hidden":"true","text-anchor":"middle","dominant-baseline":"central",fill:"currentColor"},t._value,t._unit)))}},KolProcess=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this._label=void 0,this._max=void 0,this._unit="%",this._value=void 0,this._variant=void 0,this.state={_max:100,_unit:"%",_value:0,_variant:"bar",_liveValue:0}}render(){return h(Host,null,createProgressSVG(this.state),h("progress",{"aria-busy":this.state._value<this.state._max?"true":"false",max:this.state._max,value:this.state._value}),h("span",{"aria-live":"polite","aria-relevant":"removals text",hidden:!0},this.state._liveValue," von ",this.state._max," ",this.state._unit))}validateLabel(t){validateLabel(this,t)}validateMax(t){"number"!=typeof t&&(t=100),watchNumber(this,"_max",t,{required:!0})}validateUnit(t){watchString(this,"_unit",t)}validateValue(t){"number"!=typeof t&&(t=0),watchNumber(this,"_value",t,{required:!0})}validateVariant(t){watchValidator(this,"_variant",(t=>"string"==typeof t&&VALID_VARIANTS.includes(t)),new Set(VALID_VARIANTS),t)}componentWillLoad(){this.validateLabel(this._label),this.validateMax(this._max),this.validateUnit(this._unit),this.validateValue(this._value),this.validateVariant(this._variant),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}}},[33,"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((t=>{if("kol-progress"===t)customElements.get(t)||customElements.define(t,KolProcess)}))}const KolProgress=KolProcess,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,Host}from"@stencil/core/internal/client";import{v as validateLabel}from"./label.js";import{f as watchString,w as watchValidator,s as showExpertSlot}from"./prop.validators.js";import{d as defineCustomElement$6}from"./component.js";import{d as defineCustomElement$5}from"./shadow2.js";import{d as defineCustomElement$4}from"./component9.js";import{d as defineCustomElement$3}from"./component2.js";import{d as defineCustomElement$2}from"./component3.js";const koliBriQuoteVariantOptions=["block","inline"],defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * Minimum size of interactive elements.\n\t\t */\n\t\t--a11y-min-size: 44px;\n\t\t/*\n\t\t * No element should be used without a background and font color whose contrast ratio has\n\t\t * not been checked. By initially setting the background color to white and the font color\n\t\t * to black, the contrast ratio is ensured and explicit adjustment is forced.\n\t\t */\n\t\tbackground-color: white;\n\t\tcolor: black;\n\t\t/*\n\t\t * Verdana is an accessible font that can be used without requiring additional loading time.\n\t\t */\n\t\tfont-family: Verdana;\n\t}\n\n\t* {\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\thyphens: auto;\n\t\t/*\n\t\t * Letter spacing is required for all texts.\n\t\t */\n\t\tletter-spacing: inherit;\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\tword-break: break-word;\n\t\t/*\n\t\t * Word spacing is required for all texts.\n\t\t */\n\t\tword-spacing: inherit;\n\t}\n\n\t/*\n\t * All interactive elements should have a minimum size of 44px.\n\t */\n\t/* input:not([type='checkbox'], [type='radio'], [type='range']), */\n\t/* option, */\n\t/* select, */\n\t/* textarea, */\n\t[role='button'],\n\tbutton:not([role='link']),\n\tkol-input .input {\n\t\tmin-height: var(--a11y-min-size);\n\t\tmin-width: var(--a11y-min-size);\n\t}\n\n\t/*\n\t * Some interactive elements should not inherit the font-family and font-size.\n\t */\n\ta,\n\tbutton,\n\th1,\n\th2,\n\th3,\n\th4,\n\th5,\n\th6,\n\tinput,\n\toption,\n\tselect,\n\ttextarea {\n\t\t/*\n\t\t * All elements should inherit the font family from his parent element.\n\t\t */\n\t\tfont-family: inherit;\n\t\t/*\n\t\t * All elements should inherit the font size from his parent element.\n\t\t */\n\t\tfont-size: inherit;\n\t}\n}\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\tclip: rect(0 0 0 0);\n\tclip-path: inset(50%);\n\theight: 1px;\n\toverflow: hidden;\n\tposition: absolute;\n\twhite-space: nowrap;\n\twidth: 1px;\n}\n\n@layer kol-global {\n\t/*\n\t * Dieses CSS stellt sicher, dass der Standard-Style\n\t * von A und Button resettet werden.\n\t */\n\t:is(a, button) {\n\t\tbackground-color: transparent;\n\t\tborder: none;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\twidth: 100%; /* 100% needed for custom width from outside */\n\t}\n\n\t/*\n\t * Ensure elements with hidden attribute to be actually not visible\n\t * @see https://meowni.ca/hidden.is.a.lie.html\n\t */\n\t[hidden] {\n\t\tdisplay: none !important;\n\t}\n}\n\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * The max-width is needed to prevent the table from overflowing the\n\t\t * parent node, if the table is wider than the parent node.\n\t\t */\n\t\tmax-width: 100%;\n\t}\n\n\t* {\n\t\t/*\n\t\t * We prefer to box-sizing: border-box for all elements.\n\t\t */\n\t\tbox-sizing: border-box;\n\t}\n\n\t/* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n\tkol-span-wc {\n\t\tdisplay: grid;\n\t\tplace-items: center;\n\t}\n\n\t/* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n\tkol-span-wc > span {\n\t\tdisplay: flex;\n\t\tplace-items: center;\n\t}\n\n\ta,\n\tbutton {\n\t\tcursor: pointer;\n\t}\n\n\t/* This is the text label. */\n\t.icon-only > kol-span-wc > span > span {\n\t\tdisplay: none;\n\t}\n}\n\n@layer kol-component {\n\tcite,\n\tfigure,\n\tq + figcaption {\n\t\tdisplay: inline;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t}\n\n\tblockquote:before {\n\t\tcontent: open-quote;\n\t}\n\n\tblockquote::after {\n\t\tcontent: close-quote;\n\t}\n\n\tcite:before {\n\t\tcontent: '—';\n\t}\n\n\t.block cite:before {\n\t\tpadding-right: 0.5em;\n\t}\n\n\t.inline cite:before {\n\t\tpadding: 0.5em;\n\t}\n}\n",KolQuote$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this._label=void 0,this._href=void 0,this._quote=void 0,this._variant="inline",this.state={_href:"…",_quote:"…",_variant:"inline"}}validateLabel(t){validateLabel(this,t)}validateHref(t){watchString(this,"_href",t,{required:!0})}validateQuote(t){watchString(this,"_quote",t,{required:!0})}validateVariant(t){watchValidator(this,"_variant",(t=>"string"==typeof t&&koliBriQuoteVariantOptions.includes(t)),new Set(koliBriQuoteVariantOptions),t)}componentWillLoad(){this.validateHref(this._href),this.validateLabel(this._label),this.validateQuote(this._quote),this.validateVariant(this._variant)}render(){const t=showExpertSlot(this.state._quote);return h(Host,null,h("figure",{class:{[this.state._variant]:!0}},"block"===this.state._variant?h("blockquote",{cite:this.state._href},this.state._quote,h("span",{"aria-hidden":t?void 0:"true",hidden:!t},h("slot",{name:"expert"}))):h("q",{cite:this.state._href},this.state._quote,h("span",{"aria-hidden":t?void 0:"true",hidden:!t},h("slot",{name:"expert"}))),"string"==typeof this.state._label&&this.state._label.length>0&&h("figcaption",null,h("cite",null,h("kol-link",{_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}}},[33,"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","kol-icon","kol-link","kol-link-wc","kol-span-wc","kol-tooltip-wc"].forEach((t=>{switch(t){case"kol-quote":customElements.get(t)||customElements.define(t,KolQuote$1);break;case"kol-icon":customElements.get(t)||defineCustomElement$6();break;case"kol-link":customElements.get(t)||defineCustomElement$5();break;case"kol-link-wc":customElements.get(t)||defineCustomElement$4();break;case"kol-span-wc":customElements.get(t)||defineCustomElement$3();break;case"kol-tooltip-wc":customElements.get(t)||defineCustomElement$2()}}))}const KolQuote=KolQuote$1,defineCustomElement=defineCustomElement$1;export{KolQuote,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{v as validateLabel}from"./label.js";import{b as watchString,w as watchValidator,s as showExpertSlot}from"./prop.validators.js";import{d as defineCustomElement$6}from"./component.js";import{d as defineCustomElement$5}from"./shadow2.js";import{d as defineCustomElement$4}from"./component9.js";import{d as defineCustomElement$3}from"./component2.js";import{d as defineCustomElement$2}from"./component3.js";const koliBriQuoteVariantOptions=["block","inline"],defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * Minimum size of interactive elements.\n\t\t */\n\t\t--a11y-min-size: 44px;\n\t\t/*\n\t\t * No element should be used without a background and font color whose contrast ratio has\n\t\t * not been checked. By initially setting the background color to white and the font color\n\t\t * to black, the contrast ratio is ensured and explicit adjustment is forced.\n\t\t */\n\t\tbackground-color: white;\n\t\tcolor: black;\n\t\t/*\n\t\t * Verdana is an accessible font that can be used without requiring additional loading time.\n\t\t */\n\t\tfont-family: Verdana;\n\t}\n\n\t* {\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\thyphens: auto;\n\t\t/*\n\t\t * Letter spacing is required for all texts.\n\t\t */\n\t\tletter-spacing: inherit;\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\tword-break: break-word;\n\t\t/*\n\t\t * Word spacing is required for all texts.\n\t\t */\n\t\tword-spacing: inherit;\n\t}\n\n\t/*\n\t * All interactive elements should have a minimum size of 44px.\n\t */\n\t/* input:not([type='checkbox'], [type='radio'], [type='range']), */\n\t/* option, */\n\t/* select, */\n\t/* textarea, */\n\t[role='button'],\n\tbutton:not([role='link']),\n\tkol-input .input {\n\t\tmin-height: var(--a11y-min-size);\n\t\tmin-width: var(--a11y-min-size);\n\t}\n\n\t/*\n\t * Some interactive elements should not inherit the font-family and font-size.\n\t */\n\ta,\n\tbutton,\n\th1,\n\th2,\n\th3,\n\th4,\n\th5,\n\th6,\n\tinput,\n\toption,\n\tselect,\n\ttextarea {\n\t\t/*\n\t\t * All elements should inherit the font family from his parent element.\n\t\t */\n\t\tfont-family: inherit;\n\t\t/*\n\t\t * All elements should inherit the font size from his parent element.\n\t\t */\n\t\tfont-size: inherit;\n\t}\n}\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\tclip: rect(0 0 0 0);\n\tclip-path: inset(50%);\n\theight: 1px;\n\toverflow: hidden;\n\tposition: absolute;\n\twhite-space: nowrap;\n\twidth: 1px;\n}\n\n@layer kol-global {\n\t/*\n\t * Dieses CSS stellt sicher, dass der Standard-Style\n\t * von A und Button resettet werden.\n\t */\n\t:is(a, button) {\n\t\tbackground-color: transparent;\n\t\tborder: none;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\twidth: 100%; /* 100% needed for custom width from outside */\n\t}\n\n\t/*\n\t * Ensure elements with hidden attribute to be actually not visible\n\t * @see https://meowni.ca/hidden.is.a.lie.html\n\t */\n\t[hidden] {\n\t\tdisplay: none !important;\n\t}\n}\n\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * The max-width is needed to prevent the table from overflowing the\n\t\t * parent node, if the table is wider than the parent node.\n\t\t */\n\t\tmax-width: 100%;\n\t}\n\n\t* {\n\t\t/*\n\t\t * We prefer to box-sizing: border-box for all elements.\n\t\t */\n\t\tbox-sizing: border-box;\n\t}\n\n\t/* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n\tkol-span-wc {\n\t\tdisplay: grid;\n\t\tplace-items: center;\n\t}\n\n\t/* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n\tkol-span-wc > span {\n\t\tdisplay: flex;\n\t\tplace-items: center;\n\t}\n\n\ta,\n\tbutton {\n\t\tcursor: pointer;\n\t}\n\n\t/* This is the text label. */\n\t.icon-only > kol-span-wc > span > span {\n\t\tdisplay: none;\n\t}\n}\n\n@layer kol-component {\n\tcite,\n\tfigure,\n\tq + figcaption {\n\t\tdisplay: inline;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t}\n\n\tblockquote:before {\n\t\tcontent: open-quote;\n\t}\n\n\tblockquote::after {\n\t\tcontent: close-quote;\n\t}\n\n\tcite:before {\n\t\tcontent: '—';\n\t}\n\n\t.block cite:before {\n\t\tpadding-right: 0.5em;\n\t}\n\n\t.inline cite:before {\n\t\tpadding: 0.5em;\n\t}\n}\n",KolQuote$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this._label=void 0,this._href=void 0,this._quote=void 0,this._variant="inline",this.state={_href:"…",_quote:"…",_variant:"inline"}}validateLabel(t){validateLabel(this,t)}validateHref(t){watchString(this,"_href",t,{required:!0})}validateQuote(t){watchString(this,"_quote",t,{required:!0})}validateVariant(t){watchValidator(this,"_variant",(t=>"string"==typeof t&&koliBriQuoteVariantOptions.includes(t)),new Set(koliBriQuoteVariantOptions),t)}componentWillLoad(){this.validateHref(this._href),this.validateLabel(this._label),this.validateQuote(this._quote),this.validateVariant(this._variant)}render(){const t=showExpertSlot(this.state._quote);return h(Host,null,h("figure",{class:{[this.state._variant]:!0}},"block"===this.state._variant?h("blockquote",{cite:this.state._href},this.state._quote,h("span",{"aria-hidden":t?void 0:"true",hidden:!t},h("slot",{name:"expert"}))):h("q",{cite:this.state._href},this.state._quote,h("span",{"aria-hidden":t?void 0:"true",hidden:!t},h("slot",{name:"expert"}))),"string"==typeof this.state._label&&this.state._label.length>0&&h("figcaption",null,h("cite",null,h("kol-link",{_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}}},[33,"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","kol-icon","kol-link","kol-link-wc","kol-span-wc","kol-tooltip-wc"].forEach((t=>{switch(t){case"kol-quote":customElements.get(t)||customElements.define(t,KolQuote$1);break;case"kol-icon":customElements.get(t)||defineCustomElement$6();break;case"kol-link":customElements.get(t)||defineCustomElement$5();break;case"kol-link-wc":customElements.get(t)||defineCustomElement$4();break;case"kol-span-wc":customElements.get(t)||defineCustomElement$3();break;case"kol-tooltip-wc":customElements.get(t)||defineCustomElement$2()}}))}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{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{a as translate}from"./i18n.js";import{v as validateLabel}from"./label.js";import{f as watchString}from"./prop.validators.js";const KolSymbol$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this._label=void 0,this._symbol=void 0,this.state={_label:translate("kol-warning"),_symbol:"…"}}render(){return h(Host,null,h("span",{"aria-label":this.state._label,role:"term"},this.state._symbol))}validateLabel(e){validateLabel(this,e)}validateSymbol(e){watchString(this,"_symbol",e,{required:!0})}componentWillLoad(){this.validateLabel(this._label),this.validateSymbol(this._symbol)}static get watchers(){return{_label:["validateLabel"],_symbol:["validateSymbol"]}}},[0,"kol-symbol",{_label:[1],_symbol:[1],state:[32]},void 0,{_label:["validateLabel"],_symbol:["validateSymbol"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-symbol"].forEach((e=>{if("kol-symbol"===e)customElements.get(e)||customElements.define(e,KolSymbol$1)}))}const KolSymbol=KolSymbol$1,defineCustomElement=defineCustomElement$1;export{KolSymbol,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{a as translate}from"./i18n.js";import{v as validateLabel}from"./label.js";import{b as watchString}from"./prop.validators.js";const KolSymbol$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this._label=void 0,this._symbol=void 0,this.state={_label:translate("kol-warning"),_symbol:"…"}}render(){return h(Host,null,h("span",{"aria-label":this.state._label,role:"term"},this.state._symbol))}validateLabel(e){validateLabel(this,e)}validateSymbol(e){watchString(this,"_symbol",e,{required:!0})}componentWillLoad(){this.validateLabel(this._label),this.validateSymbol(this._symbol)}static get watchers(){return{_label:["validateLabel"],_symbol:["validateSymbol"]}}},[0,"kol-symbol",{_label:[1],_symbol:[1],state:[32]},void 0,{_label:["validateLabel"],_symbol:["validateSymbol"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-symbol"].forEach((e=>{if("kol-symbol"===e)customElements.get(e)||customElements.define(e,KolSymbol$1)}))}const KolSymbol=KolSymbol$1,defineCustomElement=defineCustomElement$1;export{KolSymbol,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{a as translate}from"./i18n.js";import{v as validateLabel}from"./label.js";import{t as setState,w as watchValidator,N as emptyStringByArrayHandler,f as watchString,h as parseJson,o as objectObjectHandler,d as devHint}from"./prop.validators.js";import{d as defineCustomElement$c}from"./shadow.js";import{d as defineCustomElement$b}from"./component6.js";import{d as defineCustomElement$a}from"./shadow3.js";import{d as defineCustomElement$9}from"./component5.js";import{d as defineCustomElement$8}from"./component4.js";import{d as defineCustomElement$7}from"./component.js";import{d as defineCustomElement$6}from"./component13.js";import{d as defineCustomElement$5}from"./component14.js";import{d as defineCustomElement$4}from"./component15.js";import{d as defineCustomElement$3}from"./component2.js";import{d as defineCustomElement$2}from"./component3.js";const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * Minimum size of interactive elements.\n\t\t */\n\t\t--a11y-min-size: 44px;\n\t\t/*\n\t\t * No element should be used without a background and font color whose contrast ratio has\n\t\t * not been checked. By initially setting the background color to white and the font color\n\t\t * to black, the contrast ratio is ensured and explicit adjustment is forced.\n\t\t */\n\t\tbackground-color: white;\n\t\tcolor: black;\n\t\t/*\n\t\t * Verdana is an accessible font that can be used without requiring additional loading time.\n\t\t */\n\t\tfont-family: Verdana;\n\t}\n\n\t* {\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\thyphens: auto;\n\t\t/*\n\t\t * Letter spacing is required for all texts.\n\t\t */\n\t\tletter-spacing: inherit;\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\tword-break: break-word;\n\t\t/*\n\t\t * Word spacing is required for all texts.\n\t\t */\n\t\tword-spacing: inherit;\n\t}\n\n\t/*\n\t * All interactive elements should have a minimum size of 44px.\n\t */\n\t/* input:not([type='checkbox'], [type='radio'], [type='range']), */\n\t/* option, */\n\t/* select, */\n\t/* textarea, */\n\t[role='button'],\n\tbutton:not([role='link']),\n\tkol-input .input {\n\t\tmin-height: var(--a11y-min-size);\n\t\tmin-width: var(--a11y-min-size);\n\t}\n\n\t/*\n\t * Some interactive elements should not inherit the font-family and font-size.\n\t */\n\ta,\n\tbutton,\n\th1,\n\th2,\n\th3,\n\th4,\n\th5,\n\th6,\n\tinput,\n\toption,\n\tselect,\n\ttextarea {\n\t\t/*\n\t\t * All elements should inherit the font family from his parent element.\n\t\t */\n\t\tfont-family: inherit;\n\t\t/*\n\t\t * All elements should inherit the font size from his parent element.\n\t\t */\n\t\tfont-size: inherit;\n\t}\n}\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\tclip: rect(0 0 0 0);\n\tclip-path: inset(50%);\n\theight: 1px;\n\toverflow: hidden;\n\tposition: absolute;\n\twhite-space: nowrap;\n\twidth: 1px;\n}\n\n@layer kol-global {\n\t/*\n\t * Dieses CSS stellt sicher, dass der Standard-Style\n\t * von A und Button resettet werden.\n\t */\n\t:is(a, button) {\n\t\tbackground-color: transparent;\n\t\tborder: none;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\twidth: 100%; /* 100% needed for custom width from outside */\n\t}\n\n\t/*\n\t * Ensure elements with hidden attribute to be actually not visible\n\t * @see https://meowni.ca/hidden.is.a.lie.html\n\t */\n\t[hidden] {\n\t\tdisplay: none !important;\n\t}\n}\n\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * The max-width is needed to prevent the table from overflowing the\n\t\t * parent node, if the table is wider than the parent node.\n\t\t */\n\t\tmax-width: 100%;\n\t}\n\n\t* {\n\t\t/*\n\t\t * We prefer to box-sizing: border-box for all elements.\n\t\t */\n\t\tbox-sizing: border-box;\n\t}\n\n\t/* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n\tkol-span-wc {\n\t\tdisplay: grid;\n\t\tplace-items: center;\n\t}\n\n\t/* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n\tkol-span-wc > span {\n\t\tdisplay: flex;\n\t\tplace-items: center;\n\t}\n\n\ta,\n\tbutton {\n\t\tcursor: pointer;\n\t}\n\n\t/* This is the text label. */\n\t.icon-only > kol-span-wc > span > span {\n\t\tdisplay: none;\n\t}\n}\n\n@layer kol-component {\n\t:host {\n\t\tdisplay: block;\n\t}\n}\n\n@layer kol-component {\n\t:host {\n\t\tdisplay: grid;\n\t}\n\n\t:host > div.table {\n\t\tmax-width: 100%;\n\t\torder: 1;\n\t\toverflow-x: auto;\n\t\toverflow-y: hidden;\n\t}\n\n\t:host > div.table table {\n\t\twidth: 100%;\n\t}\n\n\tth > div {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: 1fr auto;\n\t\tplace-items: center;\n\t}\n\n\tdiv.pagination {\n\t\torder: 2;\n\t}\n\n\tdiv.pagination,\n\tdiv.pagination > div:last-child {\n\t\tdisplay: grid;\n\t\tplace-items: center;\n\t}\n\n\t@media (min-width: 1024px) {\n\t\tdiv.pagination,\n\t\tdiv.pagination > div:last-child {\n\t\t\tgrid-auto-flow: column;\n\t\t}\n\n\t\tdiv.pagination kol-pagination {\n\t\t\tdisplay: flex;\n\t\t}\n\t}\n}\n",PAGINATION_OPTIONS=[10,20,50,100],CELL_REFS=new Map,KolTable$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.horizontal=!0,this.sortDirections=new Map,this.sortData=[],this.showPagination=!1,this.pageStartSlice=0,this.pageEndSlice=10,this.disableSort=!1,this.sortedColumnHead={label:"",key:"",sortDirection:"NOS"},this.ariaLive="",this.setSortDirection=(t,e)=>{this.sortDirections.clear(),this.sortDirections.set(t,e),this.sortFunction=t},this.handlePagination={onClick:(t,e)=>{var n;"function"==typeof(null===(n=this.state._pagination._on)||void 0===n?void 0:n.onClick)&&this.state._pagination._on.onClick(t,e),setState(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:e}))},onChangePage:(t,e)=>{var n;"function"==typeof(null===(n=this.state._pagination._on)||void 0===n?void 0:n.onChangePage)&&this.state._pagination._on.onChangePage(t,e),setState(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:e}))},onChangePageSize:(t,e)=>{var n;"function"==typeof(null===(n=this.state._pagination._on)||void 0===n?void 0:n.onChangePageSize)&&this.state._pagination._on.onChangePageSize(t,e),setState(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_pageSize:e})),setState(this,"_pageSize",e)}},this.beforePatchPagination=(t,e,n,a)=>{"_pagination"===a&&(this.showPagination=!0===t||""===t||"object"==typeof t&&null!==t)},this.updateSortedData=(t=this.sortedColumnHead)=>{if(this.disableSort)return void setState(this,"_sortedData",this.state._data);let e=this.state._data;if(this.sortData.length>0)if(e=this.state._data.sort(((t,e)=>{for(let n=0;n<this.sortData.length;n++){const a=this.sortData[n],i=a.compareFn(t,e);if(0!==i)return"ASC"===a.direction?i:-i}return 0})),1===this.sortData.length)this.ariaLive=translate("kol-sort-"+("ASC"===this.sortData[0].direction?"ascending":"descending"),{placeholders:{column:this.sortData[0].label,multi:""}});else{let t="";for(let e=1;e<this.sortData.length-1;e++){const n=this.sortData[e];t+=translate("kol-sort-then-"+("ASC"===n.direction?"ascending":"descending"),{placeholders:{column:n.label}})}t+=translate("kol-sort-then-last-"+("ASC"===this.sortData[this.sortData.length-1].direction?"ascending":"descending"),{placeholders:{column:this.sortData[this.sortData.length-1].label}}),this.ariaLive=translate("kol-sort-"+("ASC"===this.sortData[0].direction?"ascending":"descending"),{placeholders:{column:this.sortData[0].label,multi:t}})}else if("function"==typeof this.sortFunction)switch(this.sortDirections.get(this.sortFunction)){case"ASC":e=this.sortFunction([...this.state._data]),this.ariaLive=translate("kol-sort-ascending",{placeholders:{column:t.label}}),this.sortedColumnHead={label:t.label,key:t.key,sortDirection:"ASC"};break;case"DESC":e=this.sortFunction([...this.state._data]).reverse(),this.ariaLive=translate("kol-sort-descending",{placeholders:{column:t.label}}),this.sortedColumnHead={label:t.label,key:t.key,sortDirection:"DESC"};break;default:e=[...this.state._data],this.sortedColumnHead={label:"",key:"",sortDirection:"NOS"},this.ariaLive=translate("kol-sort-none",{placeholders:{column:t.label}})}else this.ariaLive=translate("kol-table-sort-none");setState(this,"_sortedData",e)},this.renderTableRow=(t,e)=>h("tr",{key:`tbody-${e}`},t.map(((t,n)=>this.renderTableCell(t,e,n)))),this.renderTableCell=(t,e,n)=>{if(!1===t.asTd){const a=t;let i,o="NOS",s="codicon codicon-fold";if(!this.disableSort){if(a.key){const t=this.sortData.find((t=>t.key===a.key));if(t)switch(o=t.direction,t.direction){case"ASC":s="codicon codicon-chevron-up",i="ascending";break;case"DESC":s="codicon codicon-chevron-down",i="descending"}}if(a.key===this.sortedColumnHead.key)switch(o=this.sortedColumnHead.sortDirection,this.sortedColumnHead.sortDirection){case"ASC":s="codicon codicon-chevron-up",i="ascending";break;case"DESC":s="codicon codicon-chevron-down",i="descending"}}return h("th",{key:`tbody-${e}-${n}-${a.label}`,scope:"number"==typeof a.rowSpan&&a.rowSpan>1?"rowgroup":"row",colSpan:a.colSpan,rowSpan:a.rowSpan,style:{textAlign:a.textAlign,width:a.width},"aria-sort":i,"data-sort":`sort-${o}`},h("div",{class:"w-full flex gap-1 items-center"},h("div",{class:{"w-full":!0,[a.textAlign]:"string"==typeof a.textAlign&&a.textAlign.length>0},style:{textAlign:a.textAlign}},a.label),!this.disableSort&&("function"==typeof a.compareFn||"function"==typeof a.sort)&&h("kol-button",{exportparts:"icon",_icons:s,_hideLabel:!0,_label:translate("kol-change-order",{placeholders:{colLabel:a.label}}),_on:{onClick:()=>this.changeCellSort(a)},_variant:"ghost"})))}return h("td",{key:`tbody-${e}-${n}-${t.label}`,class:{[t.textAlign]:"string"==typeof t.textAlign&&t.textAlign.length>0},colSpan:t.colSpan,rowSpan:t.rowSpan,style:{textAlign:t.textAlign,width:t.width},ref:"function"==typeof t.render?e=>{this.cellRender(t,e)}:void 0},"function"!=typeof t.render?t.label:"")},this.renderFoot=()=>{const t=this.createDataField(this.state._dataFoot,this.state._headers,!0);return h("tfoot",null,t.map(this.renderTableRow))},this._allowMultiSort=void 0,this._data=void 0,this._dataFoot=void 0,this._headers=void 0,this._label=void 0,this._minWidth=void 0,this._pagination=void 0,this.state={_allowMultiSort:!1,_label:"…",_data:[],_dataFoot:[],_headers:{horizontal:[],vertical:[]},_pagination:{_page:1,_pageSize:10,_max:0},_sortedData:[]}}validateAllowMultiSort(t){watchValidator(this,"_allowMultiSort",(()=>!0),new Set(["boolean"]),t,{defaultValue:!1})}validateData(t){emptyStringByArrayHandler(t,(()=>{objectObjectHandler(t,(()=>{void 0===t&&(t=[]);try{t=parseJson(t)}catch(t){}Array.isArray(t)&&void 0===t.find((t=>!("object"==typeof t&&null!==t)))&&setState(this,"_data",t,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}))}))}validateDataFoot(t){emptyStringByArrayHandler(t,(()=>{objectObjectHandler(t,(()=>{void 0===t&&(t=[]);try{t=parseJson(t)}catch(t){}Array.isArray(t)&&void 0===t.find((t=>!("object"==typeof t&&null!==t)))&&setState(this,"_dataFoot",t,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}))}))}changeCellSort(t){var e;if("function"==typeof t.compareFn){this.state._allowMultiSort||t.key==(null===(e=this.sortData[0])||void 0===e?void 0:e.key)||(this.sortData=[]);const n=this.sortData.findIndex((e=>e.key===t.key));if(n>=0){const t=this.sortData[n];switch(t.direction){case"ASC":t.direction="DESC";break;case"DESC":this.sortData.splice(n,1);break;default:t.direction="ASC"}}else t.key&&this.sortData.push({label:t.label,key:t.key,compareFn:t.compareFn,direction:"ASC"});this.updateSortedData(t)}else if("function"==typeof t.sort){switch(this.sortFunction=t.sort,this.sortDirections.get(this.sortFunction)){case"ASC":this.setSortDirection(this.sortFunction,"DESC");break;case"DESC":this.setSortDirection(this.sortFunction,"NOS");break;default:this.setSortDirection(this.sortFunction,"ASC")}this.updateSortedData(t)}}validateHeaders(t){emptyStringByArrayHandler(t,(()=>{objectObjectHandler(t,(()=>{try{t=parseJson(t)}catch(t){}watchValidator(this,"_headers",(t=>"object"==typeof t&&null!==t),new Set(["KoliBriTableHeaders"]),t,{hooks:{beforePatch:t=>{var e,n,a,i;const o=t=>{let e=!1;t.forEach((t=>{const n=t.key;if(!n)return;const a=t.sortDirection;"ASC"!==a&&"DESC"!==a||("function"==typeof t.compareFn?((this.state._allowMultiSort||0===this.sortData.length)&&this.sortData.push({label:t.label,key:n,compareFn:t.compareFn,direction:a}),e=!0):"function"==typeof t.sort&&(this.setSortDirection(t.sort,a),setTimeout((()=>this.updateSortedData({key:n,label:t.label,sortDirection:a})))))})),e&&setTimeout((()=>this.updateSortedData()))},s=t;null===(e=s.horizontal)||void 0===e||e.forEach(o),null===(n=s.vertical)||void 0===n||n.forEach(o),s.horizontal&&s.vertical&&(null===(a=s.horizontal)||void 0===a?void 0:a.length)>0&&(null===(i=s.vertical)||void 0===i?void 0:i.length)>0&&(this.disableSort=!0,devHint("Table: You can not sort the table data, if horizontal and vertical headers are defined at the same time. (https://github.com/public-ui/kolibri/issues/2372)"))}}})}))}))}validateLabel(t){validateLabel(this,t)}validateMinWidth(t){watchString(this,"_minWidth",t,{defaultValue:void 0})}validatePagination(t){try{t=parseJson(t)}catch(t){}watchValidator(this,"_pagination",(()=>!0),new Set(["boolean","KoliBriTablePagination"]),t,{hooks:{beforePatch:this.beforePatchPagination}})}componentWillLoad(){this.validateAllowMultiSort(this._allowMultiSort),this.validateData(this._data),this.validateDataFoot(this._dataFoot),this.validateHeaders(this._headers),this.validateLabel(this._label),this.validateMinWidth(this._minWidth),this.validatePagination(this._pagination)}getNumberOfCols(t,e){let n=0;return t.forEach((t=>{let e=0;t.forEach((t=>{var n;return e+=null!==(n=t.colSpan)&&void 0!==n?n:1})),n<e&&(n=e)})),0===n&&(n=e.length),n}getNumberOfRows(t,e){let n=0;return t.forEach((t=>{let e=0;t.forEach((t=>{var n;return e+=null!==(n=t.rowSpan)&&void 0!==n?n:1})),n<e&&(n=e)})),0===n?n=e.length:n-=this.state._dataFoot.length,n}filterHeaderKeys(t){const e=[];return t.forEach((t=>{t.forEach((t=>{"string"==typeof t.key&&e.push(t)}))})),e}getPrimaryHeader(t){var e,n;let a=this.filterHeaderKeys(null!==(e=t.horizontal)&&void 0!==e?e:[]);return this.horizontal=!0,0===a.length&&(a=this.filterHeaderKeys(null!==(n=t.vertical)&&void 0!==n?n:[]),a.length>0&&(this.horizontal=!1)),a}createDataField(t,e,n){e.horizontal=Array.isArray(null==e?void 0:e.horizontal)?e.horizontal:[],e.vertical=Array.isArray(null==e?void 0:e.vertical)?e.vertical:[];const a=this.getPrimaryHeader(e),i=this.getNumberOfCols(e.horizontal,t);let o=this.getNumberOfRows(e.vertical,t),s=0;n&&(s=o,o+=this.state._dataFoot.length);const l=[],r=[],d=[];e.vertical.forEach(((t,e)=>{r[e]=0,d[e]=[]}));for(let h=s;h<o;h++){const o=[];e.vertical.forEach(((t,e)=>{let n=0;if(d[e].forEach((t=>n+=t)),n<=h){const a=t[h-n+r[e]];if("object"==typeof a){o.push(Object.assign(Object.assign({},a),{asTd:!1,data:{}}));let t=1;if("number"==typeof a.rowSpan&&a.rowSpan>1&&(t=a.rowSpan),d[e].push(t),"number"==typeof a.colSpan&&a.colSpan>1)for(let n=1;n<a.colSpan;n++)d[e+n].push(t);r[e]++}}}));for(let e=0;e<i;e++)if(!0===this.horizontal){const i=n?this.state._dataFoot[h-s]:t[h];"object"==typeof a[e]&&null!==a[e]&&"string"==typeof a[e].key&&"object"==typeof i&&null!==i&&o.push(Object.assign(Object.assign({},a[e]),{colSpan:void 0,data:i,label:i[a[e].key],rowSpan:void 0}))}else"object"==typeof a[h]&&null!==a[h]&&"string"==typeof a[h].key&&"object"==typeof t[e]&&null!==t[e]&&o.push(Object.assign(Object.assign({},a[h]),{colSpan:void 0,data:t[e],label:t[e][a[h].key],rowSpan:void 0}));l.push(o)}if(0===t.length){let t=0,n=0;Array.isArray(e.horizontal)&&e.horizontal.length>0&&e.horizontal[0].forEach((e=>{t+=e.colSpan||1})),Array.isArray(e.vertical)&&e.vertical.length>0&&(t-=e.vertical.length,e.vertical[0].forEach((t=>{n+=t.rowSpan||1})));const a={colSpan:t,label:translate("kol-no-entries"),render:void 0,rowSpan:Math.max(n,1)};0===l.length?l.push([a]):l[0].push(a)}return l}selectDisplayedData(t,e,n){return"number"==typeof e&&e>0&&"number"==typeof n&&n>0?(this.pageStartSlice=e*(n-1),this.pageEndSlice=e*n>t.length?t.length:e*n,t.slice(this.pageStartSlice,this.pageEndSlice)):(this.pageStartSlice=0,this.pageEndSlice=t.length,t)}cellRender(t,e){e&&(clearTimeout(CELL_REFS.get(e)),CELL_REFS.set(e,setTimeout((()=>{clearTimeout(CELL_REFS.get(e));const n=t.render(e,{asTd:t.asTd,label:t.label,textAlign:t.textAlign,width:t.width},t.data,this.state._data);"string"==typeof n&&(e.textContent=n)}))))}render(){var t,e;const n=this.selectDisplayedData(this.state._sortedData,this.showPagination?null!==(e=null===(t=this.state._pagination)||void 0===t?void 0:t._pageSize)&&void 0!==e?e:10:this.state._sortedData.length,this.state._pagination._page||1),a=this.createDataField(n,this.state._headers);return h(Host,null,h("div",{style:{height:"0",width:"0",overflow:"hidden"},"aria-live":"assertive"},this.ariaLive),this.pageEndSlice>0&&this.showPagination&&h("div",{class:"pagination"},h("span",null,"Einträge ",this.pageEndSlice>0?this.pageStartSlice+1:0," bis ",this.pageEndSlice," von"," ",this.state._pagination._max||(Array.isArray(this.state._data)?this.state._data.length:0)," angezeigt"),h("div",null,h("kol-pagination",{_boundaryCount:this.state._pagination._boundaryCount,_customClass:this.state._pagination._customClass,_on:this.handlePagination,_page:this.state._pagination._page,_pageSize:this.state._pagination._pageSize,_pageSizeOptions:this.state._pagination._pageSizeOptions||PAGINATION_OPTIONS,_siblingCount:this.state._pagination._siblingCount,_tooltipAlign:"bottom",_max:this.state._pagination._max||this.state._pagination._max||this.state._data.length,_label:translate("kol-table-pagination-label",{placeholders:{label:this.state._label}})}))),h("div",{class:"table",tabindex:"0"},h("table",{style:{minWidth:this.state._minWidth}},h("caption",null,this.state._label),Array.isArray(this.state._headers.horizontal)&&h("thead",null,this.state._headers.horizontal.map(((t,e)=>h("tr",{key:`thead-${e}`},t.map(((t,n)=>{if(!0===t.asTd)return h("td",{key:`thead-${e}-${n}-${t.label}`,class:{[t.textAlign]:"string"==typeof t.textAlign&&t.textAlign.length>0},colSpan:t.colSpan,rowSpan:t.rowSpan,style:{textAlign:t.textAlign,width:t.width},ref:"function"==typeof t.render?e=>{this.cellRender(t,e)}:void 0},"function"!=typeof t.render?t.label:"");{const a=t;let i,o="NOS",s="codicon codicon-fold";if(a.key){const t=this.sortData.find((t=>t.key===a.key));if(t)switch(o=t.direction,t.direction){case"ASC":s="codicon codicon-chevron-up",i="ascending";break;case"DESC":s="codicon codicon-chevron-down",i="descending"}}if(a.key===this.sortedColumnHead.key)switch(o=this.sortedColumnHead.sortDirection,this.sortedColumnHead.sortDirection){case"ASC":s="codicon codicon-chevron-up",i="ascending";break;case"DESC":s="codicon codicon-chevron-down",i="descending"}return h("th",{key:`thead-${e}-${n}-${a.label}`,scope:"number"==typeof a.colSpan&&a.colSpan>1?"colgroup":"col",colSpan:a.colSpan,rowSpan:a.rowSpan,style:{textAlign:t.textAlign,width:t.width},"aria-sort":i,"data-sort":`sort-${o}`},h("div",{class:"w-full flex gap-1 items-center"},h("div",{class:{"w-full":!0,[t.textAlign]:"string"==typeof t.textAlign&&t.textAlign.length>0},style:{textAlign:t.textAlign}},t.label),!this.disableSort&&("function"==typeof a.compareFn||"function"==typeof a.sort)&&h("kol-button",{exportparts:"icon",_icons:s,_hideLabel:!0,_label:translate("kol-change-order",{placeholders:{colLabel:t.label}}),_on:{onClick:()=>this.changeCellSort(a)},_variant:"ghost"})))}})))))),h("tbody",null,a.map(this.renderTableRow)),this.state._dataFoot.length>0?this.renderFoot():"")))}static get watchers(){return{_allowMultiSort:["validateAllowMultiSort"],_data:["validateData"],_dataFoot:["validateDataFoot"],_headers:["validateHeaders"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_pagination:["validatePagination"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-table",{_allowMultiSort:[4,"_allow-multi-sort"],_data:[1],_dataFoot:[1,"_data-foot"],_headers:[1],_label:[1],_minWidth:[1,"_min-width"],_pagination:[8],state:[32]},void 0,{_allowMultiSort:["validateAllowMultiSort"],_data:["validateData"],_dataFoot:["validateDataFoot"],_headers:["validateHeaders"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_pagination:["validatePagination"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-table","kol-alert","kol-alert-wc","kol-button","kol-button-wc","kol-heading-wc","kol-icon","kol-input","kol-pagination","kol-select","kol-span-wc","kol-tooltip-wc"].forEach((t=>{switch(t){case"kol-table":customElements.get(t)||customElements.define(t,KolTable$1);break;case"kol-alert":customElements.get(t)||defineCustomElement$c();break;case"kol-alert-wc":customElements.get(t)||defineCustomElement$b();break;case"kol-button":customElements.get(t)||defineCustomElement$a();break;case"kol-button-wc":customElements.get(t)||defineCustomElement$9();break;case"kol-heading-wc":customElements.get(t)||defineCustomElement$8();break;case"kol-icon":customElements.get(t)||defineCustomElement$7();break;case"kol-input":customElements.get(t)||defineCustomElement$6();break;case"kol-pagination":customElements.get(t)||defineCustomElement$5();break;case"kol-select":customElements.get(t)||defineCustomElement$4();break;case"kol-span-wc":customElements.get(t)||defineCustomElement$3();break;case"kol-tooltip-wc":customElements.get(t)||defineCustomElement$2()}}))}const KolTable=KolTable$1,defineCustomElement=defineCustomElement$1;export{KolTable,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{a as translate}from"./i18n.js";import{v as validateLabel}from"./label.js";import{t as setState,w as watchValidator,N as emptyStringByArrayHandler,b as watchString,h as parseJson,o as objectObjectHandler,d as devHint}from"./prop.validators.js";import{d as defineCustomElement$c}from"./shadow.js";import{d as defineCustomElement$b}from"./component6.js";import{d as defineCustomElement$a}from"./shadow3.js";import{d as defineCustomElement$9}from"./component5.js";import{d as defineCustomElement$8}from"./component4.js";import{d as defineCustomElement$7}from"./component.js";import{d as defineCustomElement$6}from"./component13.js";import{d as defineCustomElement$5}from"./component14.js";import{d as defineCustomElement$4}from"./component15.js";import{d as defineCustomElement$3}from"./component2.js";import{d as defineCustomElement$2}from"./component3.js";const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * Minimum size of interactive elements.\n\t\t */\n\t\t--a11y-min-size: 44px;\n\t\t/*\n\t\t * No element should be used without a background and font color whose contrast ratio has\n\t\t * not been checked. By initially setting the background color to white and the font color\n\t\t * to black, the contrast ratio is ensured and explicit adjustment is forced.\n\t\t */\n\t\tbackground-color: white;\n\t\tcolor: black;\n\t\t/*\n\t\t * Verdana is an accessible font that can be used without requiring additional loading time.\n\t\t */\n\t\tfont-family: Verdana;\n\t}\n\n\t* {\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\thyphens: auto;\n\t\t/*\n\t\t * Letter spacing is required for all texts.\n\t\t */\n\t\tletter-spacing: inherit;\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\tword-break: break-word;\n\t\t/*\n\t\t * Word spacing is required for all texts.\n\t\t */\n\t\tword-spacing: inherit;\n\t}\n\n\t/*\n\t * All interactive elements should have a minimum size of 44px.\n\t */\n\t/* input:not([type='checkbox'], [type='radio'], [type='range']), */\n\t/* option, */\n\t/* select, */\n\t/* textarea, */\n\t[role='button'],\n\tbutton:not([role='link']),\n\tkol-input .input {\n\t\tmin-height: var(--a11y-min-size);\n\t\tmin-width: var(--a11y-min-size);\n\t}\n\n\t/*\n\t * Some interactive elements should not inherit the font-family and font-size.\n\t */\n\ta,\n\tbutton,\n\th1,\n\th2,\n\th3,\n\th4,\n\th5,\n\th6,\n\tinput,\n\toption,\n\tselect,\n\ttextarea {\n\t\t/*\n\t\t * All elements should inherit the font family from his parent element.\n\t\t */\n\t\tfont-family: inherit;\n\t\t/*\n\t\t * All elements should inherit the font size from his parent element.\n\t\t */\n\t\tfont-size: inherit;\n\t}\n}\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\tclip: rect(0 0 0 0);\n\tclip-path: inset(50%);\n\theight: 1px;\n\toverflow: hidden;\n\tposition: absolute;\n\twhite-space: nowrap;\n\twidth: 1px;\n}\n\n@layer kol-global {\n\t/*\n\t * Dieses CSS stellt sicher, dass der Standard-Style\n\t * von A und Button resettet werden.\n\t */\n\t:is(a, button) {\n\t\tbackground-color: transparent;\n\t\tborder: none;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\twidth: 100%; /* 100% needed for custom width from outside */\n\t}\n\n\t/*\n\t * Ensure elements with hidden attribute to be actually not visible\n\t * @see https://meowni.ca/hidden.is.a.lie.html\n\t */\n\t[hidden] {\n\t\tdisplay: none !important;\n\t}\n}\n\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * The max-width is needed to prevent the table from overflowing the\n\t\t * parent node, if the table is wider than the parent node.\n\t\t */\n\t\tmax-width: 100%;\n\t}\n\n\t* {\n\t\t/*\n\t\t * We prefer to box-sizing: border-box for all elements.\n\t\t */\n\t\tbox-sizing: border-box;\n\t}\n\n\t/* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n\tkol-span-wc {\n\t\tdisplay: grid;\n\t\tplace-items: center;\n\t}\n\n\t/* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n\tkol-span-wc > span {\n\t\tdisplay: flex;\n\t\tplace-items: center;\n\t}\n\n\ta,\n\tbutton {\n\t\tcursor: pointer;\n\t}\n\n\t/* This is the text label. */\n\t.icon-only > kol-span-wc > span > span {\n\t\tdisplay: none;\n\t}\n}\n\n@layer kol-component {\n\t:host {\n\t\tdisplay: block;\n\t}\n}\n\n@layer kol-component {\n\t:host {\n\t\tdisplay: grid;\n\t}\n\n\t:host > div.table {\n\t\tmax-width: 100%;\n\t\torder: 1;\n\t\toverflow-x: auto;\n\t\toverflow-y: hidden;\n\t}\n\n\t:host > div.table table {\n\t\twidth: 100%;\n\t}\n\n\tth > div {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: 1fr auto;\n\t\tplace-items: center;\n\t}\n\n\tdiv.pagination {\n\t\torder: 2;\n\t}\n\n\tdiv.pagination,\n\tdiv.pagination > div:last-child {\n\t\tdisplay: grid;\n\t\tplace-items: center;\n\t}\n\n\t@media (min-width: 1024px) {\n\t\tdiv.pagination,\n\t\tdiv.pagination > div:last-child {\n\t\t\tgrid-auto-flow: column;\n\t\t}\n\n\t\tdiv.pagination kol-pagination {\n\t\t\tdisplay: flex;\n\t\t}\n\t}\n}\n",PAGINATION_OPTIONS=[10,20,50,100],CELL_REFS=new Map,KolTable$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.horizontal=!0,this.sortDirections=new Map,this.sortData=[],this.showPagination=!1,this.pageStartSlice=0,this.pageEndSlice=10,this.disableSort=!1,this.sortedColumnHead={label:"",key:"",sortDirection:"NOS"},this.ariaLive="",this.setSortDirection=(t,e)=>{this.sortDirections.clear(),this.sortDirections.set(t,e),this.sortFunction=t},this.handlePagination={onClick:(t,e)=>{var n;"function"==typeof(null===(n=this.state._pagination._on)||void 0===n?void 0:n.onClick)&&this.state._pagination._on.onClick(t,e),setState(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:e}))},onChangePage:(t,e)=>{var n;"function"==typeof(null===(n=this.state._pagination._on)||void 0===n?void 0:n.onChangePage)&&this.state._pagination._on.onChangePage(t,e),setState(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:e}))},onChangePageSize:(t,e)=>{var n;"function"==typeof(null===(n=this.state._pagination._on)||void 0===n?void 0:n.onChangePageSize)&&this.state._pagination._on.onChangePageSize(t,e),setState(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_pageSize:e})),setState(this,"_pageSize",e)}},this.beforePatchPagination=(t,e,n,a)=>{"_pagination"===a&&(this.showPagination=!0===t||""===t||"object"==typeof t&&null!==t)},this.updateSortedData=(t=this.sortedColumnHead)=>{if(this.disableSort)return void setState(this,"_sortedData",this.state._data);let e=this.state._data;if(this.sortData.length>0)if(e=this.state._data.sort(((t,e)=>{for(let n=0;n<this.sortData.length;n++){const a=this.sortData[n],i=a.compareFn(t,e);if(0!==i)return"ASC"===a.direction?i:-i}return 0})),1===this.sortData.length)this.ariaLive=translate("kol-sort-"+("ASC"===this.sortData[0].direction?"ascending":"descending"),{placeholders:{column:this.sortData[0].label,multi:""}});else{let t="";for(let e=1;e<this.sortData.length-1;e++){const n=this.sortData[e];t+=translate("kol-sort-then-"+("ASC"===n.direction?"ascending":"descending"),{placeholders:{column:n.label}})}t+=translate("kol-sort-then-last-"+("ASC"===this.sortData[this.sortData.length-1].direction?"ascending":"descending"),{placeholders:{column:this.sortData[this.sortData.length-1].label}}),this.ariaLive=translate("kol-sort-"+("ASC"===this.sortData[0].direction?"ascending":"descending"),{placeholders:{column:this.sortData[0].label,multi:t}})}else if("function"==typeof this.sortFunction)switch(this.sortDirections.get(this.sortFunction)){case"ASC":e=this.sortFunction([...this.state._data]),this.ariaLive=translate("kol-sort-ascending",{placeholders:{column:t.label}}),this.sortedColumnHead={label:t.label,key:t.key,sortDirection:"ASC"};break;case"DESC":e=this.sortFunction([...this.state._data]).reverse(),this.ariaLive=translate("kol-sort-descending",{placeholders:{column:t.label}}),this.sortedColumnHead={label:t.label,key:t.key,sortDirection:"DESC"};break;default:e=[...this.state._data],this.sortedColumnHead={label:"",key:"",sortDirection:"NOS"},this.ariaLive=translate("kol-sort-none",{placeholders:{column:t.label}})}else this.ariaLive=translate("kol-table-sort-none");setState(this,"_sortedData",e)},this.renderTableRow=(t,e)=>h("tr",{key:`tbody-${e}`},t.map(((t,n)=>this.renderTableCell(t,e,n)))),this.renderTableCell=(t,e,n)=>{if(!1===t.asTd){const a=t;let i,o="NOS",s="codicon codicon-fold";if(!this.disableSort){if(a.key){const t=this.sortData.find((t=>t.key===a.key));if(t)switch(o=t.direction,t.direction){case"ASC":s="codicon codicon-chevron-up",i="ascending";break;case"DESC":s="codicon codicon-chevron-down",i="descending"}}if(a.key===this.sortedColumnHead.key)switch(o=this.sortedColumnHead.sortDirection,this.sortedColumnHead.sortDirection){case"ASC":s="codicon codicon-chevron-up",i="ascending";break;case"DESC":s="codicon codicon-chevron-down",i="descending"}}return h("th",{key:`tbody-${e}-${n}-${a.label}`,scope:"number"==typeof a.rowSpan&&a.rowSpan>1?"rowgroup":"row",colSpan:a.colSpan,rowSpan:a.rowSpan,style:{textAlign:a.textAlign,width:a.width},"aria-sort":i,"data-sort":`sort-${o}`},h("div",{class:"w-full flex gap-1 items-center"},h("div",{class:{"w-full":!0,[a.textAlign]:"string"==typeof a.textAlign&&a.textAlign.length>0},style:{textAlign:a.textAlign}},a.label),!this.disableSort&&("function"==typeof a.compareFn||"function"==typeof a.sort)&&h("kol-button",{exportparts:"icon",_icons:s,_hideLabel:!0,_label:translate("kol-change-order",{placeholders:{colLabel:a.label}}),_on:{onClick:()=>this.changeCellSort(a)},_variant:"ghost"})))}return h("td",{key:`tbody-${e}-${n}-${t.label}`,class:{[t.textAlign]:"string"==typeof t.textAlign&&t.textAlign.length>0},colSpan:t.colSpan,rowSpan:t.rowSpan,style:{textAlign:t.textAlign,width:t.width},ref:"function"==typeof t.render?e=>{this.cellRender(t,e)}:void 0},"function"!=typeof t.render?t.label:"")},this.renderFoot=()=>{const t=this.createDataField(this.state._dataFoot,this.state._headers,!0);return h("tfoot",null,t.map(this.renderTableRow))},this._allowMultiSort=void 0,this._data=void 0,this._dataFoot=void 0,this._headers=void 0,this._label=void 0,this._minWidth=void 0,this._pagination=void 0,this.state={_allowMultiSort:!1,_label:"…",_data:[],_dataFoot:[],_headers:{horizontal:[],vertical:[]},_pagination:{_page:1,_pageSize:10,_max:0},_sortedData:[]}}validateAllowMultiSort(t){watchValidator(this,"_allowMultiSort",(()=>!0),new Set(["boolean"]),t,{defaultValue:!1})}validateData(t){emptyStringByArrayHandler(t,(()=>{objectObjectHandler(t,(()=>{void 0===t&&(t=[]);try{t=parseJson(t)}catch(t){}Array.isArray(t)&&void 0===t.find((t=>!("object"==typeof t&&null!==t)))&&setState(this,"_data",t,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}))}))}validateDataFoot(t){emptyStringByArrayHandler(t,(()=>{objectObjectHandler(t,(()=>{void 0===t&&(t=[]);try{t=parseJson(t)}catch(t){}Array.isArray(t)&&void 0===t.find((t=>!("object"==typeof t&&null!==t)))&&setState(this,"_dataFoot",t,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}))}))}changeCellSort(t){var e;if("function"==typeof t.compareFn){this.state._allowMultiSort||t.key==(null===(e=this.sortData[0])||void 0===e?void 0:e.key)||(this.sortData=[]);const n=this.sortData.findIndex((e=>e.key===t.key));if(n>=0){const t=this.sortData[n];switch(t.direction){case"ASC":t.direction="DESC";break;case"DESC":this.sortData.splice(n,1);break;default:t.direction="ASC"}}else t.key&&this.sortData.push({label:t.label,key:t.key,compareFn:t.compareFn,direction:"ASC"});this.updateSortedData(t)}else if("function"==typeof t.sort){switch(this.sortFunction=t.sort,this.sortDirections.get(this.sortFunction)){case"ASC":this.setSortDirection(this.sortFunction,"DESC");break;case"DESC":this.setSortDirection(this.sortFunction,"NOS");break;default:this.setSortDirection(this.sortFunction,"ASC")}this.updateSortedData(t)}}validateHeaders(t){emptyStringByArrayHandler(t,(()=>{objectObjectHandler(t,(()=>{try{t=parseJson(t)}catch(t){}watchValidator(this,"_headers",(t=>"object"==typeof t&&null!==t),new Set(["KoliBriTableHeaders"]),t,{hooks:{beforePatch:t=>{var e,n,a,i;const o=t=>{let e=!1;t.forEach((t=>{const n=t.key;if(!n)return;const a=t.sortDirection;"ASC"!==a&&"DESC"!==a||("function"==typeof t.compareFn?((this.state._allowMultiSort||0===this.sortData.length)&&this.sortData.push({label:t.label,key:n,compareFn:t.compareFn,direction:a}),e=!0):"function"==typeof t.sort&&(this.setSortDirection(t.sort,a),setTimeout((()=>this.updateSortedData({key:n,label:t.label,sortDirection:a})))))})),e&&setTimeout((()=>this.updateSortedData()))},s=t;null===(e=s.horizontal)||void 0===e||e.forEach(o),null===(n=s.vertical)||void 0===n||n.forEach(o),s.horizontal&&s.vertical&&(null===(a=s.horizontal)||void 0===a?void 0:a.length)>0&&(null===(i=s.vertical)||void 0===i?void 0:i.length)>0&&(this.disableSort=!0,devHint("Table: You can not sort the table data, if horizontal and vertical headers are defined at the same time. (https://github.com/public-ui/kolibri/issues/2372)"))}}})}))}))}validateLabel(t){validateLabel(this,t)}validateMinWidth(t){watchString(this,"_minWidth",t,{defaultValue:void 0})}validatePagination(t){try{t=parseJson(t)}catch(t){}watchValidator(this,"_pagination",(()=>!0),new Set(["boolean","KoliBriTablePagination"]),t,{hooks:{beforePatch:this.beforePatchPagination}})}componentWillLoad(){this.validateAllowMultiSort(this._allowMultiSort),this.validateData(this._data),this.validateDataFoot(this._dataFoot),this.validateHeaders(this._headers),this.validateLabel(this._label),this.validateMinWidth(this._minWidth),this.validatePagination(this._pagination)}getNumberOfCols(t,e){let n=0;return t.forEach((t=>{let e=0;t.forEach((t=>{var n;return e+=null!==(n=t.colSpan)&&void 0!==n?n:1})),n<e&&(n=e)})),0===n&&(n=e.length),n}getNumberOfRows(t,e){let n=0;return t.forEach((t=>{let e=0;t.forEach((t=>{var n;return e+=null!==(n=t.rowSpan)&&void 0!==n?n:1})),n<e&&(n=e)})),0===n?n=e.length:n-=this.state._dataFoot.length,n}filterHeaderKeys(t){const e=[];return t.forEach((t=>{t.forEach((t=>{"string"==typeof t.key&&e.push(t)}))})),e}getPrimaryHeader(t){var e,n;let a=this.filterHeaderKeys(null!==(e=t.horizontal)&&void 0!==e?e:[]);return this.horizontal=!0,0===a.length&&(a=this.filterHeaderKeys(null!==(n=t.vertical)&&void 0!==n?n:[]),a.length>0&&(this.horizontal=!1)),a}createDataField(t,e,n){e.horizontal=Array.isArray(null==e?void 0:e.horizontal)?e.horizontal:[],e.vertical=Array.isArray(null==e?void 0:e.vertical)?e.vertical:[];const a=this.getPrimaryHeader(e),i=this.getNumberOfCols(e.horizontal,t);let o=this.getNumberOfRows(e.vertical,t),s=0;n&&(s=o,o+=this.state._dataFoot.length);const l=[],r=[],d=[];e.vertical.forEach(((t,e)=>{r[e]=0,d[e]=[]}));for(let h=s;h<o;h++){const o=[];e.vertical.forEach(((t,e)=>{let n=0;if(d[e].forEach((t=>n+=t)),n<=h){const a=t[h-n+r[e]];if("object"==typeof a){o.push(Object.assign(Object.assign({},a),{asTd:!1,data:{}}));let t=1;if("number"==typeof a.rowSpan&&a.rowSpan>1&&(t=a.rowSpan),d[e].push(t),"number"==typeof a.colSpan&&a.colSpan>1)for(let n=1;n<a.colSpan;n++)d[e+n].push(t);r[e]++}}}));for(let e=0;e<i;e++)if(!0===this.horizontal){const i=n?this.state._dataFoot[h-s]:t[h];"object"==typeof a[e]&&null!==a[e]&&"string"==typeof a[e].key&&"object"==typeof i&&null!==i&&o.push(Object.assign(Object.assign({},a[e]),{colSpan:void 0,data:i,label:i[a[e].key],rowSpan:void 0}))}else"object"==typeof a[h]&&null!==a[h]&&"string"==typeof a[h].key&&"object"==typeof t[e]&&null!==t[e]&&o.push(Object.assign(Object.assign({},a[h]),{colSpan:void 0,data:t[e],label:t[e][a[h].key],rowSpan:void 0}));l.push(o)}if(0===t.length){let t=0,n=0;Array.isArray(e.horizontal)&&e.horizontal.length>0&&e.horizontal[0].forEach((e=>{t+=e.colSpan||1})),Array.isArray(e.vertical)&&e.vertical.length>0&&(t-=e.vertical.length,e.vertical[0].forEach((t=>{n+=t.rowSpan||1})));const a={colSpan:t,label:translate("kol-no-entries"),render:void 0,rowSpan:Math.max(n,1)};0===l.length?l.push([a]):l[0].push(a)}return l}selectDisplayedData(t,e,n){return"number"==typeof e&&e>0&&"number"==typeof n&&n>0?(this.pageStartSlice=e*(n-1),this.pageEndSlice=e*n>t.length?t.length:e*n,t.slice(this.pageStartSlice,this.pageEndSlice)):(this.pageStartSlice=0,this.pageEndSlice=t.length,t)}cellRender(t,e){e&&(clearTimeout(CELL_REFS.get(e)),CELL_REFS.set(e,setTimeout((()=>{clearTimeout(CELL_REFS.get(e));const n=t.render(e,{asTd:t.asTd,label:t.label,textAlign:t.textAlign,width:t.width},t.data,this.state._data);"string"==typeof n&&(e.textContent=n)}))))}render(){var t,e;const n=this.selectDisplayedData(this.state._sortedData,this.showPagination?null!==(e=null===(t=this.state._pagination)||void 0===t?void 0:t._pageSize)&&void 0!==e?e:10:this.state._sortedData.length,this.state._pagination._page||1),a=this.createDataField(n,this.state._headers);return h(Host,null,h("div",{style:{height:"0",width:"0",overflow:"hidden"},"aria-live":"assertive"},this.ariaLive),this.pageEndSlice>0&&this.showPagination&&h("div",{class:"pagination"},h("span",null,"Einträge ",this.pageEndSlice>0?this.pageStartSlice+1:0," bis ",this.pageEndSlice," von"," ",this.state._pagination._max||(Array.isArray(this.state._data)?this.state._data.length:0)," angezeigt"),h("div",null,h("kol-pagination",{_boundaryCount:this.state._pagination._boundaryCount,_customClass:this.state._pagination._customClass,_on:this.handlePagination,_page:this.state._pagination._page,_pageSize:this.state._pagination._pageSize,_pageSizeOptions:this.state._pagination._pageSizeOptions||PAGINATION_OPTIONS,_siblingCount:this.state._pagination._siblingCount,_tooltipAlign:"bottom",_max:this.state._pagination._max||this.state._pagination._max||this.state._data.length,_label:translate("kol-table-pagination-label",{placeholders:{label:this.state._label}})}))),h("div",{class:"table",tabindex:"0"},h("table",{style:{minWidth:this.state._minWidth}},h("caption",null,this.state._label),Array.isArray(this.state._headers.horizontal)&&h("thead",null,this.state._headers.horizontal.map(((t,e)=>h("tr",{key:`thead-${e}`},t.map(((t,n)=>{if(!0===t.asTd)return h("td",{key:`thead-${e}-${n}-${t.label}`,class:{[t.textAlign]:"string"==typeof t.textAlign&&t.textAlign.length>0},colSpan:t.colSpan,rowSpan:t.rowSpan,style:{textAlign:t.textAlign,width:t.width},ref:"function"==typeof t.render?e=>{this.cellRender(t,e)}:void 0},"function"!=typeof t.render?t.label:"");{const a=t;let i,o="NOS",s="codicon codicon-fold";if(a.key){const t=this.sortData.find((t=>t.key===a.key));if(t)switch(o=t.direction,t.direction){case"ASC":s="codicon codicon-chevron-up",i="ascending";break;case"DESC":s="codicon codicon-chevron-down",i="descending"}}if(a.key===this.sortedColumnHead.key)switch(o=this.sortedColumnHead.sortDirection,this.sortedColumnHead.sortDirection){case"ASC":s="codicon codicon-chevron-up",i="ascending";break;case"DESC":s="codicon codicon-chevron-down",i="descending"}return h("th",{key:`thead-${e}-${n}-${a.label}`,scope:"number"==typeof a.colSpan&&a.colSpan>1?"colgroup":"col",colSpan:a.colSpan,rowSpan:a.rowSpan,style:{textAlign:t.textAlign,width:t.width},"aria-sort":i,"data-sort":`sort-${o}`},h("div",{class:"w-full flex gap-1 items-center"},h("div",{class:{"w-full":!0,[t.textAlign]:"string"==typeof t.textAlign&&t.textAlign.length>0},style:{textAlign:t.textAlign}},t.label),!this.disableSort&&("function"==typeof a.compareFn||"function"==typeof a.sort)&&h("kol-button",{exportparts:"icon",_icons:s,_hideLabel:!0,_label:translate("kol-change-order",{placeholders:{colLabel:t.label}}),_on:{onClick:()=>this.changeCellSort(a)},_variant:"ghost"})))}})))))),h("tbody",null,a.map(this.renderTableRow)),this.state._dataFoot.length>0?this.renderFoot():"")))}static get watchers(){return{_allowMultiSort:["validateAllowMultiSort"],_data:["validateData"],_dataFoot:["validateDataFoot"],_headers:["validateHeaders"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_pagination:["validatePagination"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-table",{_allowMultiSort:[4,"_allow-multi-sort"],_data:[1],_dataFoot:[1,"_data-foot"],_headers:[1],_label:[1],_minWidth:[1,"_min-width"],_pagination:[8],state:[32]},void 0,{_allowMultiSort:["validateAllowMultiSort"],_data:["validateData"],_dataFoot:["validateDataFoot"],_headers:["validateHeaders"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_pagination:["validatePagination"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-table","kol-alert","kol-alert-wc","kol-button","kol-button-wc","kol-heading-wc","kol-icon","kol-input","kol-pagination","kol-select","kol-span-wc","kol-tooltip-wc"].forEach((t=>{switch(t){case"kol-table":customElements.get(t)||customElements.define(t,KolTable$1);break;case"kol-alert":customElements.get(t)||defineCustomElement$c();break;case"kol-alert-wc":customElements.get(t)||defineCustomElement$b();break;case"kol-button":customElements.get(t)||defineCustomElement$a();break;case"kol-button-wc":customElements.get(t)||defineCustomElement$9();break;case"kol-heading-wc":customElements.get(t)||defineCustomElement$8();break;case"kol-icon":customElements.get(t)||defineCustomElement$7();break;case"kol-input":customElements.get(t)||defineCustomElement$6();break;case"kol-pagination":customElements.get(t)||defineCustomElement$5();break;case"kol-select":customElements.get(t)||defineCustomElement$4();break;case"kol-span-wc":customElements.get(t)||defineCustomElement$3();break;case"kol-tooltip-wc":customElements.get(t)||defineCustomElement$2()}}))}const KolTable=KolTable$1,defineCustomElement=defineCustomElement$1;export{KolTable,defineCustomElement};