@public-ui/components 2.1.4-alpha.1 → 2.1.4

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 (467) hide show
  1. package/custom-elements.json +216 -32
  2. package/dist/cjs/{InternalUnderlinedAccessKey-9908abb2.js → InternalUnderlinedAccessKey-03d810c0.js} +1 -1
  3. package/dist/cjs/{InternalUnderlinedAccessKey-9908abb2.js.map → InternalUnderlinedAccessKey-03d810c0.js.map} +1 -1
  4. package/dist/cjs/{app-globals-22aa54ed.js → app-globals-8ec1aa7e.js} +1 -1
  5. package/dist/cjs/{app-globals-22aa54ed.js.map → app-globals-8ec1aa7e.js.map} +1 -1
  6. package/dist/cjs/{dev.utils-cf2db529.js → dev.utils-ea52f01d.js} +1 -1
  7. package/dist/cjs/{dev.utils-cf2db529.js.map → dev.utils-ea52f01d.js.map} +1 -1
  8. package/dist/cjs/{devtools-05c27e74.js → devtools-23786135.js} +1 -1
  9. package/dist/cjs/{devtools-05c27e74.js.map → devtools-23786135.js.map} +1 -1
  10. package/dist/cjs/{form-field-msg-74092e71.js → form-field-msg-72f38184.js} +1 -1
  11. package/dist/cjs/{form-field-msg-74092e71.js.map → form-field-msg-72f38184.js.map} +1 -1
  12. package/dist/cjs/index-1069403a.js +4 -0
  13. package/dist/cjs/index-1069403a.js.map +1 -0
  14. package/dist/cjs/index.cjs.js.map +1 -1
  15. package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
  16. package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
  17. package/dist/cjs/kol-accordion.cjs.entry.js.map +1 -1
  18. package/dist/cjs/kol-alert-wc.cjs.entry.js +1 -1
  19. package/dist/cjs/kol-alert.cjs.entry.js +1 -1
  20. package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
  21. package/dist/cjs/kol-avatar.cjs.entry.js +1 -1
  22. package/dist/cjs/kol-badge.cjs.entry.js +1 -1
  23. package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
  24. package/dist/cjs/kol-button-group-wc.cjs.entry.js +1 -1
  25. package/dist/cjs/kol-button-group.cjs.entry.js +1 -1
  26. package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
  27. package/dist/cjs/kol-button-link.cjs.entry.js.map +1 -1
  28. package/dist/cjs/kol-button-wc.cjs.entry.js +1 -1
  29. package/dist/cjs/kol-button-wc.cjs.entry.js.map +1 -1
  30. package/dist/cjs/kol-button.cjs.entry.js +1 -1
  31. package/dist/cjs/kol-button.cjs.entry.js.map +1 -1
  32. package/dist/cjs/kol-card.cjs.entry.js +1 -1
  33. package/dist/cjs/kol-combobox.cjs.entry.js +1 -1
  34. package/dist/cjs/kol-combobox.cjs.entry.js.map +1 -1
  35. package/dist/cjs/kol-details.cjs.entry.js +1 -1
  36. package/dist/cjs/kol-details.cjs.entry.js.map +1 -1
  37. package/dist/cjs/kol-drawer.cjs.entry.js +1 -1
  38. package/dist/cjs/kol-form.cjs.entry.js +1 -1
  39. package/dist/cjs/kol-heading-wc.cjs.entry.js +1 -1
  40. package/dist/cjs/kol-heading.cjs.entry.js +1 -1
  41. package/dist/cjs/kol-icon.cjs.entry.js +1 -1
  42. package/dist/cjs/kol-image.cjs.entry.js +1 -1
  43. package/dist/cjs/kol-indented-text.cjs.entry.js +1 -1
  44. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  45. package/dist/cjs/kol-input-checkbox.cjs.entry.js.map +1 -1
  46. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  47. package/dist/cjs/kol-input-color.cjs.entry.js.map +1 -1
  48. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  49. package/dist/cjs/kol-input-date.cjs.entry.js.map +1 -1
  50. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  51. package/dist/cjs/kol-input-email.cjs.entry.js.map +1 -1
  52. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  53. package/dist/cjs/kol-input-file.cjs.entry.js.map +1 -1
  54. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  55. package/dist/cjs/kol-input-number.cjs.entry.js.map +1 -1
  56. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  57. package/dist/cjs/kol-input-password.cjs.entry.js.map +1 -1
  58. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  59. package/dist/cjs/kol-input-radio.cjs.entry.js.map +1 -1
  60. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  61. package/dist/cjs/kol-input-range.cjs.entry.js.map +1 -1
  62. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  63. package/dist/cjs/kol-input-text.cjs.entry.js.map +1 -1
  64. package/dist/cjs/kol-input.cjs.entry.js +1 -1
  65. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  66. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  67. package/dist/cjs/kol-link-button.cjs.entry.js.map +1 -1
  68. package/dist/cjs/kol-link-group.cjs.entry.js +1 -1
  69. package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
  70. package/dist/cjs/kol-link-wc.cjs.entry.js.map +1 -1
  71. package/dist/cjs/kol-link.cjs.entry.js +1 -1
  72. package/dist/cjs/kol-link.cjs.entry.js.map +1 -1
  73. package/dist/cjs/kol-logo.cjs.entry.js +1 -1
  74. package/dist/cjs/kol-modal.cjs.entry.js +1 -1
  75. package/dist/cjs/kol-nav.cjs.entry.js +1 -1
  76. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  77. package/dist/cjs/kol-popover-wc.cjs.entry.js +1 -1
  78. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  79. package/dist/cjs/kol-quote.cjs.entry.js +1 -1
  80. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  81. package/dist/cjs/kol-select.cjs.entry.js.map +1 -1
  82. package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
  83. package/dist/cjs/kol-span-wc.cjs.entry.js +1 -1
  84. package/dist/cjs/kol-span.cjs.entry.js +1 -1
  85. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  86. package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
  87. package/dist/cjs/kol-symbol.cjs.entry.js +1 -1
  88. package/dist/cjs/kol-table-stateful.cjs.entry.js +1 -1
  89. package/dist/cjs/kol-table-stateless-wc.cjs.entry.js +1 -1
  90. package/dist/cjs/kol-table-stateless.cjs.entry.js +1 -1
  91. package/dist/cjs/kol-table.cjs.entry.js +1 -1
  92. package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
  93. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  94. package/dist/cjs/kol-textarea.cjs.entry.js.map +1 -1
  95. package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
  96. package/dist/cjs/kol-toolbar.cjs.entry.js +1 -1
  97. package/dist/cjs/kol-toolbar.cjs.entry.js.map +1 -1
  98. package/dist/cjs/kol-tooltip-wc.cjs.entry.js +1 -1
  99. package/dist/cjs/kol-tree-item-wc.cjs.entry.js +1 -1
  100. package/dist/cjs/kol-tree-item-wc.cjs.entry.js.map +1 -1
  101. package/dist/cjs/kol-tree-item.cjs.entry.js +1 -1
  102. package/dist/cjs/kol-tree-wc.cjs.entry.js +1 -1
  103. package/dist/cjs/kol-tree.cjs.entry.js +1 -1
  104. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  105. package/dist/cjs/kolibri.cjs.js +1 -1
  106. package/dist/cjs/loader.cjs.js +1 -1
  107. package/dist/components/events2.js +1 -1
  108. package/dist/components/icons.js +1 -1
  109. package/dist/components/index.js.map +1 -1
  110. package/dist/components/kol-accordion.js +1 -1
  111. package/dist/components/kol-accordion.js.map +1 -1
  112. package/dist/components/kol-button-link.js +1 -1
  113. package/dist/components/kol-button-link.js.map +1 -1
  114. package/dist/components/kol-button-wc.js +1 -1
  115. package/dist/components/kol-button-wc.js.map +1 -1
  116. package/dist/components/kol-button.js +1 -1
  117. package/dist/components/kol-button.js.map +1 -1
  118. package/dist/components/kol-combobox.js +1 -1
  119. package/dist/components/kol-combobox.js.map +1 -1
  120. package/dist/components/kol-details.js +1 -1
  121. package/dist/components/kol-details.js.map +1 -1
  122. package/dist/components/kol-input-checkbox.js +1 -1
  123. package/dist/components/kol-input-checkbox.js.map +1 -1
  124. package/dist/components/kol-input-color.js +1 -1
  125. package/dist/components/kol-input-color.js.map +1 -1
  126. package/dist/components/kol-input-date.js +1 -1
  127. package/dist/components/kol-input-date.js.map +1 -1
  128. package/dist/components/kol-input-email.js +1 -1
  129. package/dist/components/kol-input-email.js.map +1 -1
  130. package/dist/components/kol-input-file.js +1 -1
  131. package/dist/components/kol-input-file.js.map +1 -1
  132. package/dist/components/kol-input-number.js +1 -1
  133. package/dist/components/kol-input-number.js.map +1 -1
  134. package/dist/components/kol-input-password.js +1 -1
  135. package/dist/components/kol-input-password.js.map +1 -1
  136. package/dist/components/kol-input-radio.js +1 -1
  137. package/dist/components/kol-input-radio.js.map +1 -1
  138. package/dist/components/kol-input-range.js +1 -1
  139. package/dist/components/kol-input-range.js.map +1 -1
  140. package/dist/components/kol-input-text.js +1 -1
  141. package/dist/components/kol-input-text.js.map +1 -1
  142. package/dist/components/kol-link-button.js +1 -1
  143. package/dist/components/kol-link-button.js.map +1 -1
  144. package/dist/components/kol-link-wc.js +1 -1
  145. package/dist/components/kol-link-wc.js.map +1 -1
  146. package/dist/components/kol-link.js +1 -1
  147. package/dist/components/kol-link.js.map +1 -1
  148. package/dist/components/kol-select.js +1 -1
  149. package/dist/components/kol-select.js.map +1 -1
  150. package/dist/components/kol-textarea.js +1 -1
  151. package/dist/components/kol-textarea.js.map +1 -1
  152. package/dist/components/kol-toolbar.js +1 -1
  153. package/dist/components/kol-toolbar.js.map +1 -1
  154. package/dist/components/kol-tree-item-wc.js +1 -1
  155. package/dist/components/kol-tree-item-wc.js.map +1 -1
  156. package/dist/components/reuse.js +1 -1
  157. package/dist/esm/{InternalUnderlinedAccessKey-fd8927df.js → InternalUnderlinedAccessKey-4607eee7.js} +1 -1
  158. package/dist/esm/{InternalUnderlinedAccessKey-fd8927df.js.map → InternalUnderlinedAccessKey-4607eee7.js.map} +1 -1
  159. package/dist/esm/{align-floating-elements-9f85ac8b.js → align-floating-elements-e596c0fa.js} +1 -1
  160. package/dist/esm/{align-floating-elements-9f85ac8b.js.map → align-floating-elements-e596c0fa.js.map} +1 -1
  161. package/dist/esm/{app-globals-94e8e6c8.js → app-globals-703ac18d.js} +1 -1
  162. package/dist/esm/{app-globals-94e8e6c8.js.map → app-globals-703ac18d.js.map} +1 -1
  163. package/dist/esm/{controller-cc7e4e3f.js → controller-13997e91.js} +1 -1
  164. package/dist/esm/{controller-cc7e4e3f.js.map → controller-13997e91.js.map} +1 -1
  165. package/dist/esm/{controller-cbe5ff75.js → controller-618eff75.js} +1 -1
  166. package/dist/esm/{controller-cbe5ff75.js.map → controller-618eff75.js.map} +1 -1
  167. package/dist/esm/{controller-icon-b6046f95.js → controller-icon-1fda7e70.js} +1 -1
  168. package/dist/esm/{controller-icon-b6046f95.js.map → controller-icon-1fda7e70.js.map} +1 -1
  169. package/dist/esm/{dev.utils-a14ff412.js → dev.utils-d751d0cd.js} +1 -1
  170. package/dist/esm/{dev.utils-a14ff412.js.map → dev.utils-d751d0cd.js.map} +1 -1
  171. package/dist/esm/{devtools-38b004b8.js → devtools-6b1e2c90.js} +1 -1
  172. package/dist/esm/{devtools-38b004b8.js.map → devtools-6b1e2c90.js.map} +1 -1
  173. package/dist/esm/{events-ba948f16.js → events-2b67c17a.js} +1 -1
  174. package/dist/esm/{events-ba948f16.js.map → events-2b67c17a.js.map} +1 -1
  175. package/dist/esm/{form-field-msg-c7c48d5a.js → form-field-msg-60b6ca7c.js} +1 -1
  176. package/dist/esm/{form-field-msg-c7c48d5a.js.map → form-field-msg-60b6ca7c.js.map} +1 -1
  177. package/dist/esm/{i18n-112381e9.js → i18n-2cbb513e.js} +1 -1
  178. package/dist/esm/{i18n-112381e9.js.map → i18n-2cbb513e.js.map} +1 -1
  179. package/dist/esm/{icons-e32ba753.js → icons-05788852.js} +1 -1
  180. package/dist/esm/{icons-e32ba753.js.map → icons-05788852.js.map} +1 -1
  181. package/dist/esm/index-b5e5a1b4.js +4 -0
  182. package/dist/esm/index-b5e5a1b4.js.map +1 -0
  183. package/dist/esm/index.js.map +1 -1
  184. package/dist/esm/kol-abbr.entry.js +1 -1
  185. package/dist/esm/kol-accordion.entry.js +1 -1
  186. package/dist/esm/kol-accordion.entry.js.map +1 -1
  187. package/dist/esm/kol-alert-wc.entry.js +1 -1
  188. package/dist/esm/kol-alert.entry.js +1 -1
  189. package/dist/esm/kol-avatar-wc.entry.js +1 -1
  190. package/dist/esm/kol-avatar.entry.js +1 -1
  191. package/dist/esm/kol-badge.entry.js +1 -1
  192. package/dist/esm/kol-breadcrumb.entry.js +1 -1
  193. package/dist/esm/kol-button-group-wc.entry.js +1 -1
  194. package/dist/esm/kol-button-group.entry.js +1 -1
  195. package/dist/esm/kol-button-link.entry.js +1 -1
  196. package/dist/esm/kol-button-link.entry.js.map +1 -1
  197. package/dist/esm/kol-button-wc.entry.js +1 -1
  198. package/dist/esm/kol-button-wc.entry.js.map +1 -1
  199. package/dist/esm/kol-button.entry.js +1 -1
  200. package/dist/esm/kol-button.entry.js.map +1 -1
  201. package/dist/esm/kol-card.entry.js +1 -1
  202. package/dist/esm/kol-combobox.entry.js +1 -1
  203. package/dist/esm/kol-combobox.entry.js.map +1 -1
  204. package/dist/esm/kol-details.entry.js +1 -1
  205. package/dist/esm/kol-details.entry.js.map +1 -1
  206. package/dist/esm/kol-drawer.entry.js +1 -1
  207. package/dist/esm/kol-form.entry.js +1 -1
  208. package/dist/esm/kol-heading-wc.entry.js +1 -1
  209. package/dist/esm/kol-heading.entry.js +1 -1
  210. package/dist/esm/kol-icon.entry.js +1 -1
  211. package/dist/esm/kol-image.entry.js +1 -1
  212. package/dist/esm/kol-indented-text.entry.js +1 -1
  213. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  214. package/dist/esm/kol-input-checkbox.entry.js.map +1 -1
  215. package/dist/esm/kol-input-color.entry.js +1 -1
  216. package/dist/esm/kol-input-color.entry.js.map +1 -1
  217. package/dist/esm/kol-input-date.entry.js +1 -1
  218. package/dist/esm/kol-input-date.entry.js.map +1 -1
  219. package/dist/esm/kol-input-email.entry.js +1 -1
  220. package/dist/esm/kol-input-email.entry.js.map +1 -1
  221. package/dist/esm/kol-input-file.entry.js +1 -1
  222. package/dist/esm/kol-input-file.entry.js.map +1 -1
  223. package/dist/esm/kol-input-number.entry.js +1 -1
  224. package/dist/esm/kol-input-number.entry.js.map +1 -1
  225. package/dist/esm/kol-input-password.entry.js +1 -1
  226. package/dist/esm/kol-input-password.entry.js.map +1 -1
  227. package/dist/esm/kol-input-radio.entry.js +1 -1
  228. package/dist/esm/kol-input-radio.entry.js.map +1 -1
  229. package/dist/esm/kol-input-range.entry.js +1 -1
  230. package/dist/esm/kol-input-range.entry.js.map +1 -1
  231. package/dist/esm/kol-input-text.entry.js +1 -1
  232. package/dist/esm/kol-input-text.entry.js.map +1 -1
  233. package/dist/esm/kol-input.entry.js +1 -1
  234. package/dist/esm/kol-kolibri.entry.js +1 -1
  235. package/dist/esm/kol-link-button.entry.js +1 -1
  236. package/dist/esm/kol-link-button.entry.js.map +1 -1
  237. package/dist/esm/kol-link-group.entry.js +1 -1
  238. package/dist/esm/kol-link-wc.entry.js +1 -1
  239. package/dist/esm/kol-link-wc.entry.js.map +1 -1
  240. package/dist/esm/kol-link.entry.js +1 -1
  241. package/dist/esm/kol-link.entry.js.map +1 -1
  242. package/dist/esm/kol-logo.entry.js +1 -1
  243. package/dist/esm/kol-modal.entry.js +1 -1
  244. package/dist/esm/kol-nav.entry.js +1 -1
  245. package/dist/esm/kol-pagination.entry.js +1 -1
  246. package/dist/esm/kol-popover-wc.entry.js +1 -1
  247. package/dist/esm/kol-progress.entry.js +1 -1
  248. package/dist/esm/kol-quote.entry.js +1 -1
  249. package/dist/esm/kol-select.entry.js +1 -1
  250. package/dist/esm/kol-select.entry.js.map +1 -1
  251. package/dist/esm/kol-skip-nav.entry.js +1 -1
  252. package/dist/esm/kol-span-wc.entry.js +1 -1
  253. package/dist/esm/kol-span.entry.js +1 -1
  254. package/dist/esm/kol-spin.entry.js +1 -1
  255. package/dist/esm/kol-split-button.entry.js +1 -1
  256. package/dist/esm/kol-symbol.entry.js +1 -1
  257. package/dist/esm/kol-table-stateful.entry.js +1 -1
  258. package/dist/esm/kol-table-stateless-wc.entry.js +1 -1
  259. package/dist/esm/kol-table-stateless.entry.js +1 -1
  260. package/dist/esm/kol-table.entry.js +1 -1
  261. package/dist/esm/kol-tabs.entry.js +1 -1
  262. package/dist/esm/kol-textarea.entry.js +1 -1
  263. package/dist/esm/kol-textarea.entry.js.map +1 -1
  264. package/dist/esm/kol-toast-container.entry.js +1 -1
  265. package/dist/esm/kol-toolbar.entry.js +1 -1
  266. package/dist/esm/kol-toolbar.entry.js.map +1 -1
  267. package/dist/esm/kol-tooltip-wc.entry.js +1 -1
  268. package/dist/esm/kol-tree-item-wc.entry.js +1 -1
  269. package/dist/esm/kol-tree-item-wc.entry.js.map +1 -1
  270. package/dist/esm/kol-tree-item.entry.js +1 -1
  271. package/dist/esm/kol-tree-wc.entry.js +1 -1
  272. package/dist/esm/kol-tree.entry.js +1 -1
  273. package/dist/esm/kol-version.entry.js +1 -1
  274. package/dist/esm/kolibri.js +1 -1
  275. package/dist/esm/loader.js +1 -1
  276. package/dist/esm/{reuse-b66836de.js → reuse-108ee8f5.js} +1 -1
  277. package/dist/esm/{reuse-b66836de.js.map → reuse-108ee8f5.js.map} +1 -1
  278. package/dist/kolibri/InternalUnderlinedAccessKey-4607eee7.js +4 -0
  279. package/dist/kolibri/{align-floating-elements-9f85ac8b.js → align-floating-elements-e596c0fa.js} +1 -1
  280. package/dist/kolibri/{app-globals-94e8e6c8.js → app-globals-703ac18d.js} +1 -1
  281. package/dist/kolibri/{controller-cc7e4e3f.js → controller-13997e91.js} +1 -1
  282. package/dist/kolibri/{controller-cbe5ff75.js → controller-618eff75.js} +1 -1
  283. package/dist/kolibri/{controller-icon-b6046f95.js → controller-icon-1fda7e70.js} +1 -1
  284. package/dist/kolibri/{dev.utils-a14ff412.js → dev.utils-d751d0cd.js} +1 -1
  285. package/dist/kolibri/{devtools-38b004b8.js → devtools-6b1e2c90.js} +1 -1
  286. package/dist/kolibri/{events-ba948f16.js → events-2b67c17a.js} +1 -1
  287. package/dist/kolibri/{form-field-msg-c7c48d5a.js → form-field-msg-60b6ca7c.js} +1 -1
  288. package/dist/kolibri/i18n-2cbb513e.js +4 -0
  289. package/dist/kolibri/{icons-e32ba753.js → icons-05788852.js} +1 -1
  290. package/dist/kolibri/index-b5e5a1b4.js +5 -0
  291. package/dist/kolibri/index-b5e5a1b4.js.map +1 -0
  292. package/dist/kolibri/index.esm.js.map +1 -1
  293. package/dist/kolibri/kol-abbr.entry.js +1 -1
  294. package/dist/kolibri/kol-accordion.entry.js +1 -1
  295. package/dist/kolibri/kol-accordion.entry.js.map +1 -1
  296. package/dist/kolibri/kol-alert-wc.entry.js +1 -1
  297. package/dist/kolibri/kol-alert.entry.js +1 -1
  298. package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
  299. package/dist/kolibri/kol-avatar.entry.js +1 -1
  300. package/dist/kolibri/kol-badge.entry.js +1 -1
  301. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  302. package/dist/kolibri/kol-button-group-wc.entry.js +1 -1
  303. package/dist/kolibri/kol-button-group.entry.js +1 -1
  304. package/dist/kolibri/kol-button-link.entry.js +1 -1
  305. package/dist/kolibri/kol-button-link.entry.js.map +1 -1
  306. package/dist/kolibri/kol-button-wc.entry.js +1 -1
  307. package/dist/kolibri/kol-button-wc.entry.js.map +1 -1
  308. package/dist/kolibri/kol-button.entry.js +1 -1
  309. package/dist/kolibri/kol-button.entry.js.map +1 -1
  310. package/dist/kolibri/kol-card.entry.js +1 -1
  311. package/dist/kolibri/kol-combobox.entry.js +1 -1
  312. package/dist/kolibri/kol-combobox.entry.js.map +1 -1
  313. package/dist/kolibri/kol-details.entry.js +1 -1
  314. package/dist/kolibri/kol-details.entry.js.map +1 -1
  315. package/dist/kolibri/kol-drawer.entry.js +1 -1
  316. package/dist/kolibri/kol-form.entry.js +1 -1
  317. package/dist/kolibri/kol-heading-wc.entry.js +1 -1
  318. package/dist/kolibri/kol-heading.entry.js +1 -1
  319. package/dist/kolibri/kol-icon.entry.js +1 -1
  320. package/dist/kolibri/kol-image.entry.js +1 -1
  321. package/dist/kolibri/kol-indented-text.entry.js +1 -1
  322. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  323. package/dist/kolibri/kol-input-checkbox.entry.js.map +1 -1
  324. package/dist/kolibri/kol-input-color.entry.js +1 -1
  325. package/dist/kolibri/kol-input-color.entry.js.map +1 -1
  326. package/dist/kolibri/kol-input-date.entry.js +1 -1
  327. package/dist/kolibri/kol-input-date.entry.js.map +1 -1
  328. package/dist/kolibri/kol-input-email.entry.js +1 -1
  329. package/dist/kolibri/kol-input-email.entry.js.map +1 -1
  330. package/dist/kolibri/kol-input-file.entry.js +1 -1
  331. package/dist/kolibri/kol-input-file.entry.js.map +1 -1
  332. package/dist/kolibri/kol-input-number.entry.js +1 -1
  333. package/dist/kolibri/kol-input-number.entry.js.map +1 -1
  334. package/dist/kolibri/kol-input-password.entry.js +1 -1
  335. package/dist/kolibri/kol-input-password.entry.js.map +1 -1
  336. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  337. package/dist/kolibri/kol-input-radio.entry.js.map +1 -1
  338. package/dist/kolibri/kol-input-range.entry.js +1 -1
  339. package/dist/kolibri/kol-input-range.entry.js.map +1 -1
  340. package/dist/kolibri/kol-input-text.entry.js +1 -1
  341. package/dist/kolibri/kol-input-text.entry.js.map +1 -1
  342. package/dist/kolibri/kol-input.entry.js +1 -1
  343. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  344. package/dist/kolibri/kol-link-button.entry.js +1 -1
  345. package/dist/kolibri/kol-link-button.entry.js.map +1 -1
  346. package/dist/kolibri/kol-link-group.entry.js +1 -1
  347. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  348. package/dist/kolibri/kol-link-wc.entry.js.map +1 -1
  349. package/dist/kolibri/kol-link.entry.js +1 -1
  350. package/dist/kolibri/kol-link.entry.js.map +1 -1
  351. package/dist/kolibri/kol-logo.entry.js +1 -1
  352. package/dist/kolibri/kol-modal.entry.js +1 -1
  353. package/dist/kolibri/kol-nav.entry.js +1 -1
  354. package/dist/kolibri/kol-pagination.entry.js +1 -1
  355. package/dist/kolibri/kol-popover-wc.entry.js +1 -1
  356. package/dist/kolibri/kol-progress.entry.js +1 -1
  357. package/dist/kolibri/kol-quote.entry.js +1 -1
  358. package/dist/kolibri/kol-select.entry.js +1 -1
  359. package/dist/kolibri/kol-select.entry.js.map +1 -1
  360. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  361. package/dist/kolibri/kol-span-wc.entry.js +1 -1
  362. package/dist/kolibri/kol-span.entry.js +1 -1
  363. package/dist/kolibri/kol-spin.entry.js +1 -1
  364. package/dist/kolibri/kol-split-button.entry.js +1 -1
  365. package/dist/kolibri/kol-symbol.entry.js +1 -1
  366. package/dist/kolibri/kol-table-stateful.entry.js +1 -1
  367. package/dist/kolibri/kol-table-stateless-wc.entry.js +1 -1
  368. package/dist/kolibri/kol-table-stateless.entry.js +1 -1
  369. package/dist/kolibri/kol-table.entry.js +1 -1
  370. package/dist/kolibri/kol-tabs.entry.js +1 -1
  371. package/dist/kolibri/kol-textarea.entry.js +1 -1
  372. package/dist/kolibri/kol-textarea.entry.js.map +1 -1
  373. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  374. package/dist/kolibri/kol-toolbar.entry.js +1 -1
  375. package/dist/kolibri/kol-toolbar.entry.js.map +1 -1
  376. package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
  377. package/dist/kolibri/kol-tree-item-wc.entry.js +1 -1
  378. package/dist/kolibri/kol-tree-item-wc.entry.js.map +1 -1
  379. package/dist/kolibri/kol-tree-item.entry.js +1 -1
  380. package/dist/kolibri/kol-tree-wc.entry.js +1 -1
  381. package/dist/kolibri/kol-tree.entry.js +1 -1
  382. package/dist/kolibri/kol-version.entry.js +1 -1
  383. package/dist/kolibri/kolibri.esm.js +1 -1
  384. package/dist/kolibri/kolibri.esm.js.map +1 -1
  385. package/dist/kolibri/{reuse-b66836de.js → reuse-108ee8f5.js} +1 -1
  386. package/dist/types/components/accordion/shadow.d.ts +5 -3
  387. package/dist/types/components/button/component.d.ts +4 -3
  388. package/dist/types/components/button/shadow.d.ts +5 -3
  389. package/dist/types/components/button-link/shadow.d.ts +5 -3
  390. package/dist/types/components/combobox/shadow.d.ts +1 -0
  391. package/dist/types/components/details/shadow.d.ts +4 -3
  392. package/dist/types/components/input-checkbox/shadow.d.ts +5 -1
  393. package/dist/types/components/input-color/shadow.d.ts +5 -3
  394. package/dist/types/components/input-date/shadow.d.ts +5 -3
  395. package/dist/types/components/input-email/shadow.d.ts +5 -3
  396. package/dist/types/components/input-file/shadow.d.ts +5 -3
  397. package/dist/types/components/input-number/shadow.d.ts +5 -3
  398. package/dist/types/components/input-password/shadow.d.ts +6 -4
  399. package/dist/types/components/input-radio/shadow.d.ts +5 -3
  400. package/dist/types/components/input-range/shadow.d.ts +4 -2
  401. package/dist/types/components/input-text/shadow.d.ts +5 -3
  402. package/dist/types/components/link/component.d.ts +4 -4
  403. package/dist/types/components/link/shadow.d.ts +5 -3
  404. package/dist/types/components/link-button/shadow.d.ts +5 -3
  405. package/dist/types/components/select/shadow.d.ts +5 -3
  406. package/dist/types/components/textarea/shadow.d.ts +5 -3
  407. package/dist/types/components.d.ts +92 -0
  408. package/dist/types/index.d.ts +1 -1
  409. package/dist/types/schema/index.d.ts +1 -0
  410. package/dist/types/schema/interfaces/FocusableElement.d.ts +3 -0
  411. package/dist/types/schema/interfaces/index.d.ts +1 -0
  412. package/doc/accordion.md +25 -0
  413. package/doc/alert.md +2 -0
  414. package/doc/avatar.md +2 -0
  415. package/doc/button-link.md +20 -0
  416. package/doc/button.md +20 -0
  417. package/doc/combobox.md +2 -0
  418. package/doc/details.md +25 -0
  419. package/doc/drawer.md +2 -0
  420. package/doc/image.md +2 -0
  421. package/doc/input-checkbox.md +20 -0
  422. package/doc/input-color.md +20 -0
  423. package/doc/input-date.md +22 -0
  424. package/doc/input-email.md +20 -0
  425. package/doc/input-file.md +22 -0
  426. package/doc/input-number.md +20 -0
  427. package/doc/input-password.md +20 -0
  428. package/doc/input-radio.md +22 -0
  429. package/doc/input-range.md +22 -0
  430. package/doc/input-text.md +22 -0
  431. package/doc/link-button.md +23 -0
  432. package/doc/link.md +23 -0
  433. package/doc/modal.md +5 -1
  434. package/doc/nav.md +2 -0
  435. package/doc/select.md +22 -0
  436. package/doc/spin.md +2 -0
  437. package/doc/table-stateful.md +2 -0
  438. package/doc/table-stateless.md +2 -0
  439. package/doc/table.md +2 -0
  440. package/doc/tabs.md +2 -0
  441. package/doc/textarea.md +20 -0
  442. package/doc/toaster.md +2 -0
  443. package/doc/tooltip.md +2 -0
  444. package/doc/tree.md +2 -0
  445. package/package.json +1 -1
  446. package/vscode-custom-data.json +27 -27
  447. package/dist/cjs/index-5cf289dd.js +0 -4
  448. package/dist/cjs/index-5cf289dd.js.map +0 -1
  449. package/dist/esm/index-b2c61df0.js +0 -4
  450. package/dist/esm/index-b2c61df0.js.map +0 -1
  451. package/dist/kolibri/InternalUnderlinedAccessKey-fd8927df.js +0 -4
  452. package/dist/kolibri/i18n-112381e9.js +0 -4
  453. package/dist/kolibri/index-b2c61df0.js +0 -5
  454. package/dist/kolibri/index-b2c61df0.js.map +0 -1
  455. /package/dist/kolibri/{InternalUnderlinedAccessKey-fd8927df.js.map → InternalUnderlinedAccessKey-4607eee7.js.map} +0 -0
  456. /package/dist/kolibri/{align-floating-elements-9f85ac8b.js.map → align-floating-elements-e596c0fa.js.map} +0 -0
  457. /package/dist/kolibri/{app-globals-94e8e6c8.js.map → app-globals-703ac18d.js.map} +0 -0
  458. /package/dist/kolibri/{controller-cc7e4e3f.js.map → controller-13997e91.js.map} +0 -0
  459. /package/dist/kolibri/{controller-cbe5ff75.js.map → controller-618eff75.js.map} +0 -0
  460. /package/dist/kolibri/{controller-icon-b6046f95.js.map → controller-icon-1fda7e70.js.map} +0 -0
  461. /package/dist/kolibri/{dev.utils-a14ff412.js.map → dev.utils-d751d0cd.js.map} +0 -0
  462. /package/dist/kolibri/{devtools-38b004b8.js.map → devtools-6b1e2c90.js.map} +0 -0
  463. /package/dist/kolibri/{events-ba948f16.js.map → events-2b67c17a.js.map} +0 -0
  464. /package/dist/kolibri/{form-field-msg-c7c48d5a.js.map → form-field-msg-60b6ca7c.js.map} +0 -0
  465. /package/dist/kolibri/{i18n-112381e9.js.map → i18n-2cbb513e.js.map} +0 -0
  466. /package/dist/kolibri/{icons-e32ba753.js.map → icons-05788852.js.map} +0 -0
  467. /package/dist/kolibri/{reuse-b66836de.js.map → reuse-108ee8f5.js.map} +0 -0
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as n,h as e,H as i,F as t}from"./index-b2c61df0.js";import{t as o}from"./i18n-112381e9.js";import{v as a}from"./show-bd1ff7bd.js";import{w as r}from"./prop.validators-db70e3c4.js";import"./i18n-66b52d13.js";import"./reuse-b66836de.js";import"./index-db4aa6e4.js";import"./dev.utils-1ca991a2.js";const s=["cycle","dot","none"],l=(n,e)=>{r(n,"_variant",(n=>"string"==typeof n&&s.includes(n)),new Set(s),e)},d="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: 44px;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of 44px.\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n .spin.cycle {\n width: calc(48rem / var(--kolibri-root-font-size, 16));\n height: calc(48rem / var(--kolibri-root-font-size, 16));\n }\n .spin.cycle > .loader {\n display: block;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n position: relative;\n animation: 2s linear infinite rotate;\n }\n .spin.cycle > .loader::before {\n content: \"\";\n box-sizing: border-box;\n position: absolute;\n inset: 0px;\n border-radius: 50%;\n border: 5px solid #333;\n animation: 3s linear infinite prixClipFix;\n }\n @keyframes rotate {\n 100% {\n transform: rotate(360deg);\n }\n }\n @keyframes prixClipFix {\n 0% {\n border-color: #fff;\n clip-path: polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0);\n }\n 25% {\n border-color: #666;\n clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0);\n }\n 50% {\n border-color: #fc0;\n clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 100% 100%, 100% 100%);\n }\n 75% {\n border-color: red;\n clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%);\n }\n 100% {\n border-color: #000;\n clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0);\n }\n } /* https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion#toning_down_the_animation_scaling */\n @media (prefers-reduced-motion) {\n .spin.cycle > .loader {\n animation-duration: 4s;\n }\n .spin.cycle > .loader::before {\n animation-duration: 6s;\n }\n }\n}\n@layer kol-component {\n .spin.dot {\n height: calc(16rem / var(--kolibri-root-font-size, 16));\n width: calc(48rem / var(--kolibri-root-font-size, 16));\n }\n .spin.dot > span {\n animation-timing-function: cubic-bezier(0, 1, 1, 0);\n border-radius: 50%;\n border: calc(0.16rem / var(--kolibri-root-font-size, 16)) solid #fff;\n height: calc(12.8rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n top: calc(0.16rem / var(--kolibri-root-font-size, 16));\n width: calc(12.8rem / var(--kolibri-root-font-size, 16));\n }\n .spin.dot > span:first-child {\n background-color: #fc0;\n z-index: 0;\n animation: 1s infinite spin1;\n left: calc(0.16rem / var(--kolibri-root-font-size, 16));\n }\n .spin.dot > span:nth-child(2) {\n background-color: red;\n z-index: 1;\n animation: 1s infinite spin2;\n left: calc(0.16rem / var(--kolibri-root-font-size, 16));\n }\n .spin.dot > span:nth-child(3) {\n background-color: #000;\n z-index: 1;\n animation: 1s infinite spin2;\n left: calc(17.6rem / var(--kolibri-root-font-size, 16));\n }\n .spin.dot > span:nth-child(4) {\n background-color: #666;\n z-index: 0;\n animation: 1s infinite spin3;\n left: calc(33.6rem / var(--kolibri-root-font-size, 16));\n }\n @keyframes spin1 {\n 0% {\n transform: scale(0);\n }\n 100% {\n transform: scale(1);\n }\n }\n @keyframes spin2 {\n 0% {\n transform: translate(0, 0);\n }\n 100% {\n transform: translate(calc(16rem / var(--kolibri-root-font-size, 16)), 0);\n }\n }\n @keyframes spin3 {\n 0% {\n transform: scale(1);\n }\n 100% {\n transform: scale(0);\n }\n } /* https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion#toning_down_the_animation_scaling */\n @media (prefers-reduced-motion) {\n .spin.dot > span:first-child,\n .spin.dot > span:nth-child(2),\n .spin.dot > span:nth-child(3),\n .spin.dot > span:nth-child(4) {\n animation-duration: 2s;\n }\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .spin {\n display: block;\n padding: calc(2rem / var(--kolibri-root-font-size, 16));\n position: relative;\n }\n}",c=d;function p(n){switch(n){case"cycle":return e("span",{class:"loader"});case"none":return e("slot",{name:"expert"});default:return e(t,null,e("span",{class:"bg-spin-1"}),e("span",{class:"bg-spin-2"}),e("span",{class:"bg-spin-3"}),e("span",{class:"bg-neutral"}))}}const h=class{constructor(e){n(this,e),this.showToggled=!1,this._show=!1,this._variant="dot",this.state={_variant:"dot"}}render(){return e(i,{key:"1341f6f7b72ff1c95f3a73f163364342172d5cad",class:"kol-spin"},this.state._show?e("span",{"aria-busy":"true","aria-label":o("kol-action-running"),"aria-live":"polite",class:{spin:!0,[this.state._variant]:!0},role:"alert"},p(this.state._variant)):this.showToggled&&e("span",{"aria-label":o("kol-action-done"),"aria-busy":"false","aria-live":"polite",role:"alert"}))}validateShow(n){this.showToggled=!0===this.state._show&&!1===this._show,a(this,n)}validateVariant(n){l(this,n)}componentWillLoad(){this.validateShow(this._show),this.validateVariant(this._variant)}static get watchers(){return{_show:["validateShow"],_variant:["validateVariant"]}}};h.style={default:c};export{h as kol_spin};
4
+ import{r as n,h as e,H as i,F as t}from"./index-b5e5a1b4.js";import{t as o}from"./i18n-2cbb513e.js";import{v as a}from"./show-bd1ff7bd.js";import{w as r}from"./prop.validators-db70e3c4.js";import"./i18n-66b52d13.js";import"./reuse-108ee8f5.js";import"./index-db4aa6e4.js";import"./dev.utils-1ca991a2.js";const s=["cycle","dot","none"],l=(n,e)=>{r(n,"_variant",(n=>"string"==typeof n&&s.includes(n)),new Set(s),e)},d="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: 44px;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of 44px.\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n .spin.cycle {\n width: calc(48rem / var(--kolibri-root-font-size, 16));\n height: calc(48rem / var(--kolibri-root-font-size, 16));\n }\n .spin.cycle > .loader {\n display: block;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n position: relative;\n animation: 2s linear infinite rotate;\n }\n .spin.cycle > .loader::before {\n content: \"\";\n box-sizing: border-box;\n position: absolute;\n inset: 0px;\n border-radius: 50%;\n border: 5px solid #333;\n animation: 3s linear infinite prixClipFix;\n }\n @keyframes rotate {\n 100% {\n transform: rotate(360deg);\n }\n }\n @keyframes prixClipFix {\n 0% {\n border-color: #fff;\n clip-path: polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0);\n }\n 25% {\n border-color: #666;\n clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0);\n }\n 50% {\n border-color: #fc0;\n clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 100% 100%, 100% 100%);\n }\n 75% {\n border-color: red;\n clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%);\n }\n 100% {\n border-color: #000;\n clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0);\n }\n } /* https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion#toning_down_the_animation_scaling */\n @media (prefers-reduced-motion) {\n .spin.cycle > .loader {\n animation-duration: 4s;\n }\n .spin.cycle > .loader::before {\n animation-duration: 6s;\n }\n }\n}\n@layer kol-component {\n .spin.dot {\n height: calc(16rem / var(--kolibri-root-font-size, 16));\n width: calc(48rem / var(--kolibri-root-font-size, 16));\n }\n .spin.dot > span {\n animation-timing-function: cubic-bezier(0, 1, 1, 0);\n border-radius: 50%;\n border: calc(0.16rem / var(--kolibri-root-font-size, 16)) solid #fff;\n height: calc(12.8rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n top: calc(0.16rem / var(--kolibri-root-font-size, 16));\n width: calc(12.8rem / var(--kolibri-root-font-size, 16));\n }\n .spin.dot > span:first-child {\n background-color: #fc0;\n z-index: 0;\n animation: 1s infinite spin1;\n left: calc(0.16rem / var(--kolibri-root-font-size, 16));\n }\n .spin.dot > span:nth-child(2) {\n background-color: red;\n z-index: 1;\n animation: 1s infinite spin2;\n left: calc(0.16rem / var(--kolibri-root-font-size, 16));\n }\n .spin.dot > span:nth-child(3) {\n background-color: #000;\n z-index: 1;\n animation: 1s infinite spin2;\n left: calc(17.6rem / var(--kolibri-root-font-size, 16));\n }\n .spin.dot > span:nth-child(4) {\n background-color: #666;\n z-index: 0;\n animation: 1s infinite spin3;\n left: calc(33.6rem / var(--kolibri-root-font-size, 16));\n }\n @keyframes spin1 {\n 0% {\n transform: scale(0);\n }\n 100% {\n transform: scale(1);\n }\n }\n @keyframes spin2 {\n 0% {\n transform: translate(0, 0);\n }\n 100% {\n transform: translate(calc(16rem / var(--kolibri-root-font-size, 16)), 0);\n }\n }\n @keyframes spin3 {\n 0% {\n transform: scale(1);\n }\n 100% {\n transform: scale(0);\n }\n } /* https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion#toning_down_the_animation_scaling */\n @media (prefers-reduced-motion) {\n .spin.dot > span:first-child,\n .spin.dot > span:nth-child(2),\n .spin.dot > span:nth-child(3),\n .spin.dot > span:nth-child(4) {\n animation-duration: 2s;\n }\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .spin {\n display: block;\n padding: calc(2rem / var(--kolibri-root-font-size, 16));\n position: relative;\n }\n}",c=d;function p(n){switch(n){case"cycle":return e("span",{class:"loader"});case"none":return e("slot",{name:"expert"});default:return e(t,null,e("span",{class:"bg-spin-1"}),e("span",{class:"bg-spin-2"}),e("span",{class:"bg-spin-3"}),e("span",{class:"bg-neutral"}))}}const h=class{constructor(e){n(this,e),this.showToggled=!1,this._show=!1,this._variant="dot",this.state={_variant:"dot"}}render(){return e(i,{key:"1341f6f7b72ff1c95f3a73f163364342172d5cad",class:"kol-spin"},this.state._show?e("span",{"aria-busy":"true","aria-label":o("kol-action-running"),"aria-live":"polite",class:{spin:!0,[this.state._variant]:!0},role:"alert"},p(this.state._variant)):this.showToggled&&e("span",{"aria-label":o("kol-action-done"),"aria-busy":"false","aria-live":"polite",role:"alert"}))}validateShow(n){this.showToggled=!0===this.state._show&&!1===this._show,a(this,n)}validateVariant(n){l(this,n)}componentWillLoad(){this.validateShow(this._show),this.validateVariant(this._variant)}static get watchers(){return{_show:["validateShow"],_variant:["validateVariant"]}}};h.style={default:c};export{h as kol_spin};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as n,h as e,H as t}from"./index-b2c61df0.js";import{t as i}from"./i18n-112381e9.js";import{c as s}from"./component-names-068dc2ae.js";import"./i18n-66b52d13.js";import"./reuse-b66836de.js";const o="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: 44px;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of 44px.\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: flex;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n position: relative;\n }\n .main-button {\n flex-grow: 1;\n text-align: left;\n }\n /* popover */\n .popover {\n height: 0;\n left: 0;\n min-width: 100%;\n overflow: hidden;\n position: absolute;\n top: 100%;\n transition: height 0.3s ease-in-out;\n }\n .popover-content {\n inset: 0 0 auto 0;\n min-width: 100%;\n position: absolute;\n }\n}",a=o,l=class{constructor(t){n(this,t),this.clickButtonHandler={onClick:n=>{var t,e;"function"==typeof(null===(t=this._on)||void 0===t?void 0:t.onClick)?null===(e=this._on)||void 0===e||e.onClick(n,this._value):this.toggleDropdown()}},this.clickToggleHandler={onClick:()=>this.toggleDropdown()},this.openDropdown=()=>{this.dropdown&&this.dropdownContent&&(this.dropdown.style.height=`${this.dropdownContent.clientHeight}px`,this.state=Object.assign(Object.assign({},this.state),{_show:!0}))},this.closeDropdown=()=>{this.dropdown&&this.dropdownContent&&(this.dropdown.style.height="",this.state=Object.assign(Object.assign({},this.state),{_show:!1}))},this.toggleDropdown=n=>{("boolean"==typeof n?n:!this.state._show)?this.openDropdown():this.closeDropdown()},this.catchDropdownElements=n=>{n&&(this.dropdown=n,setTimeout((()=>{this.dropdownContent=n.firstChild})))},this._ariaControls=void 0,this._ariaExpanded=void 0,this._ariaSelected=void 0,this._customClass=void 0,this._disabled=!1,this._hideLabel=!1,this._icons=void 0,this._id=void 0,this._label=void 0,this._name=void 0,this._on=void 0,this._role=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._type="button",this._value=void 0,this._variant="normal",this.state={_show:!1}}render(){const n="kol-split-button-dropdown-label";return e(t,{key:"a527306b3af651544bf317a61dee2398c1390034",class:"kol-split-button"},e(s,{key:"8b72ca7871e344472433e3e63cbcc3282ae653b7",class:{"main-button":!0,button:!0,[this._variant]:"custom"!==this._variant,[this._customClass]:"custom"===this._variant&&"string"==typeof this._customClass&&this._customClass.length>0},_ariaControls:this._ariaControls,_ariaExpanded:this._ariaExpanded,_ariaSelected:this._ariaSelected,_customClass:this._customClass,_disabled:this._disabled,_icons:this._icons,_hideLabel:this._hideLabel,_label:this._label,_name:this._name,_on:this.clickButtonHandler,_role:this._role,_syncValueBySelector:this._syncValueBySelector,_tabIndex:this._tabIndex,_tooltipAlign:this._tooltipAlign,_type:this._type,_value:this._value,_variant:this._variant}),e("div",{key:"40a3ce6bc755a453d9823706b89bed3638aa7608",class:"horizontal-line"}),e(s,{key:"4ad3cc5acdb289695cc73edc65b285aed4b7aa94",class:"secondary-button",_disabled:this._disabled,_hideLabel:!0,_icons:"codicon codicon-triangle-down",_label:this.state._show?i(`${n}-close`):i(`${n}-open`),_on:this.clickToggleHandler}),e("div",{key:"056b57cd9712ef379f49c894f749c32d43404986",class:"popover",ref:this.catchDropdownElements},e("div",{key:"814797a3e331a3e0352da52e82dfa33b3f27eddf",class:"popover-content"},e("slot",{key:"3ba6188d4b04dac4703cbe3d486d487c983a3324"}))))}};l.style={default:a};export{l as kol_split_button};
4
+ import{r as n,h as e,H as t}from"./index-b5e5a1b4.js";import{t as i}from"./i18n-2cbb513e.js";import{c as s}from"./component-names-068dc2ae.js";import"./i18n-66b52d13.js";import"./reuse-108ee8f5.js";const o="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: 44px;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of 44px.\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: flex;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n position: relative;\n }\n .main-button {\n flex-grow: 1;\n text-align: left;\n }\n /* popover */\n .popover {\n height: 0;\n left: 0;\n min-width: 100%;\n overflow: hidden;\n position: absolute;\n top: 100%;\n transition: height 0.3s ease-in-out;\n }\n .popover-content {\n inset: 0 0 auto 0;\n min-width: 100%;\n position: absolute;\n }\n}",a=o,l=class{constructor(t){n(this,t),this.clickButtonHandler={onClick:n=>{var t,e;"function"==typeof(null===(t=this._on)||void 0===t?void 0:t.onClick)?null===(e=this._on)||void 0===e||e.onClick(n,this._value):this.toggleDropdown()}},this.clickToggleHandler={onClick:()=>this.toggleDropdown()},this.openDropdown=()=>{this.dropdown&&this.dropdownContent&&(this.dropdown.style.height=`${this.dropdownContent.clientHeight}px`,this.state=Object.assign(Object.assign({},this.state),{_show:!0}))},this.closeDropdown=()=>{this.dropdown&&this.dropdownContent&&(this.dropdown.style.height="",this.state=Object.assign(Object.assign({},this.state),{_show:!1}))},this.toggleDropdown=n=>{("boolean"==typeof n?n:!this.state._show)?this.openDropdown():this.closeDropdown()},this.catchDropdownElements=n=>{n&&(this.dropdown=n,setTimeout((()=>{this.dropdownContent=n.firstChild})))},this._ariaControls=void 0,this._ariaExpanded=void 0,this._ariaSelected=void 0,this._customClass=void 0,this._disabled=!1,this._hideLabel=!1,this._icons=void 0,this._id=void 0,this._label=void 0,this._name=void 0,this._on=void 0,this._role=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._type="button",this._value=void 0,this._variant="normal",this.state={_show:!1}}render(){const n="kol-split-button-dropdown-label";return e(t,{key:"a527306b3af651544bf317a61dee2398c1390034",class:"kol-split-button"},e(s,{key:"8b72ca7871e344472433e3e63cbcc3282ae653b7",class:{"main-button":!0,button:!0,[this._variant]:"custom"!==this._variant,[this._customClass]:"custom"===this._variant&&"string"==typeof this._customClass&&this._customClass.length>0},_ariaControls:this._ariaControls,_ariaExpanded:this._ariaExpanded,_ariaSelected:this._ariaSelected,_customClass:this._customClass,_disabled:this._disabled,_icons:this._icons,_hideLabel:this._hideLabel,_label:this._label,_name:this._name,_on:this.clickButtonHandler,_role:this._role,_syncValueBySelector:this._syncValueBySelector,_tabIndex:this._tabIndex,_tooltipAlign:this._tooltipAlign,_type:this._type,_value:this._value,_variant:this._variant}),e("div",{key:"40a3ce6bc755a453d9823706b89bed3638aa7608",class:"horizontal-line"}),e(s,{key:"4ad3cc5acdb289695cc73edc65b285aed4b7aa94",class:"secondary-button",_disabled:this._disabled,_hideLabel:!0,_icons:"codicon codicon-triangle-down",_label:this.state._show?i(`${n}-close`):i(`${n}-open`),_on:this.clickToggleHandler}),e("div",{key:"056b57cd9712ef379f49c894f749c32d43404986",class:"popover",ref:this.catchDropdownElements},e("div",{key:"814797a3e331a3e0352da52e82dfa33b3f27eddf",class:"popover-content"},e("slot",{key:"3ba6188d4b04dac4703cbe3d486d487c983a3324"}))))}};l.style={default:a};export{l as kol_split_button};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as e,h as s,H as a}from"./index-b2c61df0.js";import{t}from"./i18n-112381e9.js";import{v as i}from"./label-20475610.js";import{i as r}from"./prop.validators-db70e3c4.js";import"./i18n-66b52d13.js";import"./reuse-b66836de.js";import"./index-db4aa6e4.js";import"./dev.utils-1ca991a2.js";const o=class{constructor(a){e(this,a),this._label=void 0,this._symbol=void 0,this.state={_label:t("kol-warning"),_symbol:""}}render(){return s(a,{key:"5a17cb366a4268e6010c15c5a82f72a53313ecad",class:"kol-symbol"},s("span",{key:"00ac2ef03b17992d53ee2975ba2513b0e857fd1f","aria-label":this.state._label,role:"term"},this.state._symbol))}validateLabel(a){i(this,a,{required:!0})}validateSymbol(a){r(this,"_symbol",a,{required:!0})}componentWillLoad(){this.validateLabel(this._label),this.validateSymbol(this._symbol)}static get watchers(){return{_label:["validateLabel"],_symbol:["validateSymbol"]}}};export{o as kol_symbol};
4
+ import{r as e,h as a,H as s}from"./index-b5e5a1b4.js";import{t}from"./i18n-2cbb513e.js";import{v as i}from"./label-20475610.js";import{i as r}from"./prop.validators-db70e3c4.js";import"./i18n-66b52d13.js";import"./reuse-108ee8f5.js";import"./index-db4aa6e4.js";import"./dev.utils-1ca991a2.js";const o=class{constructor(a){e(this,a),this._label=void 0,this._symbol=void 0,this.state={_label:t("kol-warning"),_symbol:""}}render(){return a(s,{key:"5a17cb366a4268e6010c15c5a82f72a53313ecad",class:"kol-symbol"},a("span",{key:"00ac2ef03b17992d53ee2975ba2513b0e857fd1f","aria-label":this.state._label,role:"term"},this.state._symbol))}validateLabel(a){i(this,a,{required:!0})}validateSymbol(a){r(this,"_symbol",a,{required:!0})}componentWillLoad(){this.validateLabel(this._label),this.validateSymbol(this._symbol)}static get watchers(){return{_label:["validateLabel"],_symbol:["validateSymbol"]}}};export{o as kol_symbol};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as t,h as n,H as i,g as e}from"./index-b2c61df0.js";import{t as o}from"./i18n-112381e9.js";import{t as s,r as a}from"./component-names-068dc2ae.js";import{t as l}from"./events-29e84d75.js";import{v as h,a as r,b as d,c,E as u}from"./events-ba948f16.js";import{w as f,s as p,t as b,i as m,p as g,o as v,j as y}from"./prop.validators-db70e3c4.js";import{v as w}from"./label-20475610.js";import"./i18n-66b52d13.js";import"./reuse-b66836de.js";import"./index-db4aa6e4.js";import"./dev.utils-1ca991a2.js";const _=["top","bottom","both"],k=(t,e)=>{f(t,"_paginationPosition",(t=>"string"==typeof t&&_.includes(t)),new Set([`PaginationPositionPropType {${_.join(", ")}`]),e,{defaultValue:"bottom"})},S="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: 44px;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of 44px.\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n :root {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n div.pagination .kol-pagination {\n display: flex;\n flex-wrap: wrap;\n }\n div.pagination,\n div.pagination > div:last-child {\n display: grid;\n place-items: center;\n }\n @media (max-width: 1024px) {\n div.pagination .kol-pagination {\n flex-direction: column;\n }\n }\n @media (min-width: 1024px) {\n div.pagination,\n div.pagination > div:last-child {\n grid-auto-flow: column;\n }\n div.pagination .kol-pagination {\n display: flex;\n }\n }\n}\n@layer kol-component {\n :host,\n .kol-table-stateless-wc {\n display: block;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .table {\n max-width: 100%;\n overflow-x: auto;\n overflow-y: hidden;\n }\n table {\n width: 100%;\n }\n caption {\n text-align: start;\n }\n .focus-element {\n font-size: 0;\n }\n .focus-element:focus {\n outline: 0 !important;\n }\n .table:has(.focus-element:focus) {\n /* @see https://remysharp.com/til/css/focus-ring-default-styles */\n outline: 5px auto Highlight;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: 2px;\n }\n .table-sort-button .button {\n color: inherit;\n }\n tbody th,\n th.align-left {\n text-align: left;\n }\n tbody th .table-sort-button .button-inner,\n th.align-left .table-sort-button .button-inner {\n justify-items: start;\n }\n th.align-center {\n text-align: center;\n }\n th.align-center .table-sort-button .button-inner {\n justify-items: center;\n }\n th.align-right {\n text-align: right;\n }\n th.align-right .table-sort-button .button-inner {\n justify-items: end;\n }\n .selection-header-cell {\n width: 0;\n }\n .selection-cell {\n white-space: nowrap;\n }\n}",x=S,j=[10,20,50,100],z=t=>!0===t||""===t||"object"==typeof t&&null!==t,C=class{constructor(e){t(this,e),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.setSortDirection=(t,e)=>{this.sortDirections.clear(),this.sortDirections.set(t,e),this.sortFunction=t},this.handlePagination={onClick:(t,e)=>{var i;"function"==typeof(null===(i=this.state._pagination._on)||void 0===i?void 0:i.onClick)&&this.state._pagination._on.onClick(t,e),p(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:e}))},onChangePage:(t,e)=>{var i;"function"==typeof(null===(i=this.state._pagination._on)||void 0===i?void 0:i.onChangePage)&&this.state._pagination._on.onChangePage(t,e),p(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:e}))},onChangePageSize:(t,e)=>{var i;"function"==typeof(null===(i=this.state._pagination._on)||void 0===i?void 0:i.onChangePageSize)&&this.state._pagination._on.onChangePageSize(t,e),p(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_pageSize:e})),p(this,"_pageSize",e)}},this.updateSortedData=(t=this.sortedColumnHead)=>{if(this.disableSort)return void p(this,"_sortedData",this.state._data);let e=this.state._data;if(this.sortData.length>0)e=this.state._data.sort(((t,e)=>{for(let i=0;i<this.sortData.length;i++){const n=this.sortData[i],a=n.compareFn(t,e);if(0!==a)return"ASC"===n.direction?a:-a}return 0}));else if("function"==typeof this.sortFunction)switch(this.sortDirections.get(this.sortFunction)){case"ASC":e=this.sortFunction([...this.state._data]),this.sortedColumnHead={label:t.label,key:t.key,sortDirection:"ASC"};break;case"DESC":e=this.sortFunction([...this.state._data]).reverse(),this.sortedColumnHead={label:t.label,key:t.key,sortDirection:"DESC"};break;default:e=[...this.state._data],this.sortedColumnHead={label:"",key:"",sortDirection:"NOS"}}p(this,"_sortedData",e)},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._paginationPosition="bottom",this._selection=void 0,this._on=void 0,this.state={_allowMultiSort:!1,_data:[],_dataFoot:[],_headers:{horizontal:[],vertical:[]},_label:"",_pagination:{_page:1,_pageSize:10,_max:0},_sortedData:[],_paginationPosition:"bottom"}}validateAllowMultiSort(t){f(this,"_allowMultiSort",(()=>!0),new Set(["boolean"]),t,{defaultValue:!1})}validateData(t){h(this,t,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}validateDataFoot(t){r(this,t,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}validatePaginationPosition(t){k(this,t)}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 i=this.sortData.findIndex((e=>e.key===t.key));if(i>=0){const t=this.sortData[i];switch(t.direction){case"ASC":t.direction="DESC";break;case"DESC":this.sortData.splice(i,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){b(t,(()=>{v(t,(()=>{try{t=g(t)}catch(t){}f(this,"_headers",(t=>"object"==typeof t&&null!==t),new Set(["KoliBriTableHeaders"]),t,{hooks:{beforePatch:t=>{var e,i,n,a;const o=t=>{let e=!1;t.forEach((t=>{const i=t.key;if(!i)return;const n=t.sortDirection;"ASC"!==n&&"DESC"!==n||("function"==typeof t.compareFn?((this.state._allowMultiSort||0===this.sortData.length)&&this.sortData.push({label:t.label,key:i,compareFn:t.compareFn,direction:n}),e=!0):"function"==typeof t.sort&&(this.setSortDirection(t.sort,n),setTimeout((()=>this.updateSortedData({key:i,label:t.label,sortDirection:n})))))})),e&&setTimeout((()=>this.updateSortedData()))},s=t;null===(e=s.horizontal)||void 0===e||e.forEach(o),null===(i=s.vertical)||void 0===i||i.forEach(o),s.horizontal&&s.vertical&&(null===(n=s.horizontal)||void 0===n?void 0:n.length)>0&&(null===(a=s.vertical)||void 0===a?void 0:a.length)>0&&(this.disableSort=!0,y("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){w(this,t,{required:!0})}validateMinWidth(t){m(this,"_minWidth",t,{defaultValue:void 0})}validateSelection(t){d(this,t)}validateOn(t){c(this,t)}validatePagination(t){try{t=g(t)}catch(t){}this.showPagination=z(t),f(this,"_pagination",z,new Set(["boolean","KoliBriTablePagination"]),t,{defaultValue:{_page:1,_pageSize:10,_max:0}})}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),this.validatePaginationPosition(this._paginationPosition),this.validateSelection(this._selection)}selectDisplayedData(t,e,i){return"number"==typeof e&&e>0&&"number"==typeof i&&i>0?(this.pageStartSlice=e*(i-1),this.pageEndSlice=e*i>t.length?t.length:e*i,t.slice(this.pageStartSlice,this.pageEndSlice)):(this.pageStartSlice=0,this.pageEndSlice=t.length,t)}renderPagination(){return n("div",{class:"pagination"},n("span",null,o("kol-table-visible-range",{placeholders:{start:this.pageEndSlice>0?(this.pageStartSlice+1).toString():"0",end:this.pageEndSlice.toString(),total:this.state._pagination&&this.state._pagination._max>0?this.state._pagination._max.toString():Array.isArray(this.state._data)?this.state._data.length.toString():"0"}})),n("div",null,n(s,{_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||j,_siblingCount:this.state._pagination._siblingCount,_tooltipAlign:"bottom",_max:this.state._pagination._max||this.state._pagination._max||this.state._data.length,_label:o("kol-table-pagination-label",{placeholders:{label:this.state._label}})})))}getHeaderCellSortState(t){if(!this.disableSort&&("function"==typeof t.compareFn||"function"==typeof t.sort)){if(t.key===this.sortedColumnHead.key)return this.sortedColumnHead.sortDirection;if(t.key){const e=this.sortData.find((e=>e.key===t.key));if(null==e?void 0:e.direction)return e.direction}return"NOS"}}handleSort({key:t}){const e=[...(this.state._headers.horizontal||[]).flat(),...(this.state._headers.vertical||[]).flat()].find((e=>e.key===t));e&&this.changeCellSort(e)}getSelectedData(t){var e;if(this.state._selection){const i=null!==(e=this.state._selection.keyPropertyName)&&void 0!==e?e:"id";if(i)return this.state._sortedData.filter((e=>t.includes(e[i])))}return[]}handleSelectionChange(t,e){var i;this.state._selection&&(this.state=Object.assign(Object.assign({},this.state),{_selection:Object.assign(Object.assign({},this.state._selection),{selectedKeys:e})}));const n=this.getSelectedData(e);l("selection-change",this.host,n),"function"==typeof(null===(i=this.state._on)||void 0===i?void 0:i[u.onSelectionChange])&&this.state._on[u.onSelectionChange](t,n)}async getSelection(){var t;const e=(null===(t=this.state._selection)||void 0===t?void 0:t.selectedKeys)||[];return this.getSelectedData(e)}render(){var t,e,o,s;const l=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),r="top"===this._paginationPosition||"both"===this._paginationPosition?this.renderPagination():null,h="bottom"===this._paginationPosition||"both"===this._paginationPosition?this.renderPagination():null,d={horizontal:null===(o=this.state._headers.horizontal)||void 0===o?void 0:o.map((t=>t.map((t=>Object.assign(Object.assign({},t),{sortDirection:this.getHeaderCellSortState(t)}))))),vertical:null===(s=this.state._headers.vertical)||void 0===s?void 0:s.map((t=>t.map((t=>Object.assign(Object.assign({},t),{sortDirection:this.getHeaderCellSortState(t)})))))};return n(i,{key:"bdce96077b735bf0a23e6bd2de10e79a55e244c6",class:"kol-table-stateful"},this.pageEndSlice>0&&this.showPagination&&r,n(a,{key:"0306216fc6f81b985e95f4178213e1a11f23f9bc",_data:l,_headerCells:d,_label:this.state._label,_dataFoot:this.state._dataFoot,_minWidth:this.state._minWidth,_on:{onSort:(t,e)=>{this.handleSort(e)},onSelectionChange:(t,e)=>{this.handleSelectionChange(t,e)}},_selection:this.state._selection}),this.pageEndSlice>0&&this.showPagination&&h)}get host(){return e(this)}static get watchers(){return{_allowMultiSort:["validateAllowMultiSort"],_data:["validateData"],_dataFoot:["validateDataFoot"],_paginationPosition:["validatePaginationPosition"],_headers:["validateHeaders"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_selection:["validateSelection"],_on:["validateOn"],_pagination:["validatePagination"]}}};C.style={default:x};export{C as kol_table_stateful};
4
+ import{r as t,h as n,H as i,g as e}from"./index-b5e5a1b4.js";import{t as o}from"./i18n-2cbb513e.js";import{t as s,r as a}from"./component-names-068dc2ae.js";import{t as l}from"./events-29e84d75.js";import{v as h,a as r,b as d,c,E as u}from"./events-2b67c17a.js";import{w as f,s as b,t as p,i as m,p as g,o as v,j as y}from"./prop.validators-db70e3c4.js";import{v as w}from"./label-20475610.js";import"./i18n-66b52d13.js";import"./reuse-108ee8f5.js";import"./index-db4aa6e4.js";import"./dev.utils-1ca991a2.js";const _=["top","bottom","both"],k=(t,e)=>{f(t,"_paginationPosition",(t=>"string"==typeof t&&_.includes(t)),new Set([`PaginationPositionPropType {${_.join(", ")}`]),e,{defaultValue:"bottom"})},S="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: 44px;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of 44px.\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n :root {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n div.pagination .kol-pagination {\n display: flex;\n flex-wrap: wrap;\n }\n div.pagination,\n div.pagination > div:last-child {\n display: grid;\n place-items: center;\n }\n @media (max-width: 1024px) {\n div.pagination .kol-pagination {\n flex-direction: column;\n }\n }\n @media (min-width: 1024px) {\n div.pagination,\n div.pagination > div:last-child {\n grid-auto-flow: column;\n }\n div.pagination .kol-pagination {\n display: flex;\n }\n }\n}\n@layer kol-component {\n :host,\n .kol-table-stateless-wc {\n display: block;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .table {\n max-width: 100%;\n overflow-x: auto;\n overflow-y: hidden;\n }\n table {\n width: 100%;\n }\n caption {\n text-align: start;\n }\n .focus-element {\n font-size: 0;\n }\n .focus-element:focus {\n outline: 0 !important;\n }\n .table:has(.focus-element:focus) {\n /* @see https://remysharp.com/til/css/focus-ring-default-styles */\n outline: 5px auto Highlight;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: 2px;\n }\n .table-sort-button .button {\n color: inherit;\n }\n tbody th,\n th.align-left {\n text-align: left;\n }\n tbody th .table-sort-button .button-inner,\n th.align-left .table-sort-button .button-inner {\n justify-items: start;\n }\n th.align-center {\n text-align: center;\n }\n th.align-center .table-sort-button .button-inner {\n justify-items: center;\n }\n th.align-right {\n text-align: right;\n }\n th.align-right .table-sort-button .button-inner {\n justify-items: end;\n }\n .selection-header-cell {\n width: 0;\n }\n .selection-cell {\n white-space: nowrap;\n }\n}",x=S,j=[10,20,50,100],z=t=>!0===t||""===t||"object"==typeof t&&null!==t,C=class{constructor(e){t(this,e),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.setSortDirection=(t,e)=>{this.sortDirections.clear(),this.sortDirections.set(t,e),this.sortFunction=t},this.handlePagination={onClick:(t,e)=>{var i;"function"==typeof(null===(i=this.state._pagination._on)||void 0===i?void 0:i.onClick)&&this.state._pagination._on.onClick(t,e),b(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:e}))},onChangePage:(t,e)=>{var i;"function"==typeof(null===(i=this.state._pagination._on)||void 0===i?void 0:i.onChangePage)&&this.state._pagination._on.onChangePage(t,e),b(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:e}))},onChangePageSize:(t,e)=>{var i;"function"==typeof(null===(i=this.state._pagination._on)||void 0===i?void 0:i.onChangePageSize)&&this.state._pagination._on.onChangePageSize(t,e),b(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_pageSize:e})),b(this,"_pageSize",e)}},this.updateSortedData=(t=this.sortedColumnHead)=>{if(this.disableSort)return void b(this,"_sortedData",this.state._data);let e=this.state._data;if(this.sortData.length>0)e=this.state._data.sort(((t,e)=>{for(let i=0;i<this.sortData.length;i++){const n=this.sortData[i],a=n.compareFn(t,e);if(0!==a)return"ASC"===n.direction?a:-a}return 0}));else if("function"==typeof this.sortFunction)switch(this.sortDirections.get(this.sortFunction)){case"ASC":e=this.sortFunction([...this.state._data]),this.sortedColumnHead={label:t.label,key:t.key,sortDirection:"ASC"};break;case"DESC":e=this.sortFunction([...this.state._data]).reverse(),this.sortedColumnHead={label:t.label,key:t.key,sortDirection:"DESC"};break;default:e=[...this.state._data],this.sortedColumnHead={label:"",key:"",sortDirection:"NOS"}}b(this,"_sortedData",e)},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._paginationPosition="bottom",this._selection=void 0,this._on=void 0,this.state={_allowMultiSort:!1,_data:[],_dataFoot:[],_headers:{horizontal:[],vertical:[]},_label:"",_pagination:{_page:1,_pageSize:10,_max:0},_sortedData:[],_paginationPosition:"bottom"}}validateAllowMultiSort(t){f(this,"_allowMultiSort",(()=>!0),new Set(["boolean"]),t,{defaultValue:!1})}validateData(t){h(this,t,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}validateDataFoot(t){r(this,t,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}validatePaginationPosition(t){k(this,t)}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 i=this.sortData.findIndex((e=>e.key===t.key));if(i>=0){const t=this.sortData[i];switch(t.direction){case"ASC":t.direction="DESC";break;case"DESC":this.sortData.splice(i,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){p(t,(()=>{v(t,(()=>{try{t=g(t)}catch(t){}f(this,"_headers",(t=>"object"==typeof t&&null!==t),new Set(["KoliBriTableHeaders"]),t,{hooks:{beforePatch:t=>{var e,i,n,a;const o=t=>{let e=!1;t.forEach((t=>{const i=t.key;if(!i)return;const n=t.sortDirection;"ASC"!==n&&"DESC"!==n||("function"==typeof t.compareFn?((this.state._allowMultiSort||0===this.sortData.length)&&this.sortData.push({label:t.label,key:i,compareFn:t.compareFn,direction:n}),e=!0):"function"==typeof t.sort&&(this.setSortDirection(t.sort,n),setTimeout((()=>this.updateSortedData({key:i,label:t.label,sortDirection:n})))))})),e&&setTimeout((()=>this.updateSortedData()))},s=t;null===(e=s.horizontal)||void 0===e||e.forEach(o),null===(i=s.vertical)||void 0===i||i.forEach(o),s.horizontal&&s.vertical&&(null===(n=s.horizontal)||void 0===n?void 0:n.length)>0&&(null===(a=s.vertical)||void 0===a?void 0:a.length)>0&&(this.disableSort=!0,y("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){w(this,t,{required:!0})}validateMinWidth(t){m(this,"_minWidth",t,{defaultValue:void 0})}validateSelection(t){d(this,t)}validateOn(t){c(this,t)}validatePagination(t){try{t=g(t)}catch(t){}this.showPagination=z(t),f(this,"_pagination",z,new Set(["boolean","KoliBriTablePagination"]),t,{defaultValue:{_page:1,_pageSize:10,_max:0}})}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),this.validatePaginationPosition(this._paginationPosition),this.validateSelection(this._selection)}selectDisplayedData(t,e,i){return"number"==typeof e&&e>0&&"number"==typeof i&&i>0?(this.pageStartSlice=e*(i-1),this.pageEndSlice=e*i>t.length?t.length:e*i,t.slice(this.pageStartSlice,this.pageEndSlice)):(this.pageStartSlice=0,this.pageEndSlice=t.length,t)}renderPagination(){return n("div",{class:"pagination"},n("span",null,o("kol-table-visible-range",{placeholders:{start:this.pageEndSlice>0?(this.pageStartSlice+1).toString():"0",end:this.pageEndSlice.toString(),total:this.state._pagination&&this.state._pagination._max>0?this.state._pagination._max.toString():Array.isArray(this.state._data)?this.state._data.length.toString():"0"}})),n("div",null,n(s,{_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||j,_siblingCount:this.state._pagination._siblingCount,_tooltipAlign:"bottom",_max:this.state._pagination._max||this.state._pagination._max||this.state._data.length,_label:o("kol-table-pagination-label",{placeholders:{label:this.state._label}})})))}getHeaderCellSortState(t){if(!this.disableSort&&("function"==typeof t.compareFn||"function"==typeof t.sort)){if(t.key===this.sortedColumnHead.key)return this.sortedColumnHead.sortDirection;if(t.key){const e=this.sortData.find((e=>e.key===t.key));if(null==e?void 0:e.direction)return e.direction}return"NOS"}}handleSort({key:t}){const e=[...(this.state._headers.horizontal||[]).flat(),...(this.state._headers.vertical||[]).flat()].find((e=>e.key===t));e&&this.changeCellSort(e)}getSelectedData(t){var e;if(this.state._selection){const i=null!==(e=this.state._selection.keyPropertyName)&&void 0!==e?e:"id";if(i)return this.state._sortedData.filter((e=>t.includes(e[i])))}return[]}handleSelectionChange(t,e){var i;this.state._selection&&(this.state=Object.assign(Object.assign({},this.state),{_selection:Object.assign(Object.assign({},this.state._selection),{selectedKeys:e})}));const n=this.getSelectedData(e);l("selection-change",this.host,n),"function"==typeof(null===(i=this.state._on)||void 0===i?void 0:i[u.onSelectionChange])&&this.state._on[u.onSelectionChange](t,n)}async getSelection(){var t;const e=(null===(t=this.state._selection)||void 0===t?void 0:t.selectedKeys)||[];return this.getSelectedData(e)}render(){var t,e,o,s;const l=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),r="top"===this._paginationPosition||"both"===this._paginationPosition?this.renderPagination():null,h="bottom"===this._paginationPosition||"both"===this._paginationPosition?this.renderPagination():null,d={horizontal:null===(o=this.state._headers.horizontal)||void 0===o?void 0:o.map((t=>t.map((t=>Object.assign(Object.assign({},t),{sortDirection:this.getHeaderCellSortState(t)}))))),vertical:null===(s=this.state._headers.vertical)||void 0===s?void 0:s.map((t=>t.map((t=>Object.assign(Object.assign({},t),{sortDirection:this.getHeaderCellSortState(t)})))))};return n(i,{key:"bdce96077b735bf0a23e6bd2de10e79a55e244c6",class:"kol-table-stateful"},this.pageEndSlice>0&&this.showPagination&&r,n(a,{key:"0306216fc6f81b985e95f4178213e1a11f23f9bc",_data:l,_headerCells:d,_label:this.state._label,_dataFoot:this.state._dataFoot,_minWidth:this.state._minWidth,_on:{onSort:(t,e)=>{this.handleSort(e)},onSelectionChange:(t,e)=>{this.handleSelectionChange(t,e)}},_selection:this.state._selection}),this.pageEndSlice>0&&this.showPagination&&h)}get host(){return e(this)}static get watchers(){return{_allowMultiSort:["validateAllowMultiSort"],_data:["validateData"],_dataFoot:["validateDataFoot"],_paginationPosition:["validatePaginationPosition"],_headers:["validateHeaders"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_selection:["validateSelection"],_on:["validateOn"],_pagination:["validatePagination"]}}};C.style={default:x};export{C as kol_table_stateful};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as t,h as e,H as i,g as s}from"./index-b2c61df0.js";import{x as n,c as o}from"./component-names-068dc2ae.js";import{t as a}from"./i18n-112381e9.js";import{t as l}from"./events-29e84d75.js";import{n as d}from"./dev.utils-a14ff412.js";import{t as r,o as c,p as h,w as f,i as u}from"./prop.validators-db70e3c4.js";import{v as b,a as p,d as v,b as y,E as m}from"./events-ba948f16.js";import{v as g}from"./label-20475610.js";import"./i18n-66b52d13.js";import"./reuse-b66836de.js";import"./dev.utils-1ca991a2.js";import"./index-db4aa6e4.js";const j=(e,t)=>{r(t,(()=>{c(t,(()=>{try{t=h(t)}catch(e){}f(e,"_headerCells",(e=>"object"==typeof e&&null!==e),new Set(["TableHeaderCellsPropType"]),t)}))}))},k=class{constructor(a){t(this,a),this.horizontal=!0,this.cellsToRenderTimeouts=new Map,this.dataToKeyMap=new Map,this.renderTableRow=(t,a)=>{var i,l;let o=String(a);return this.horizontal&&(null===(i=t[0])||void 0===i?void 0:i.data)&&(o=null!==(l=this.getDataKey(t[0].data))&&void 0!==l?l:o),e("tr",{key:`row-${o}`},this.renderSelectionCell(t,a),t.map(((e,t)=>this.renderTableCell(e,a,t))))},this.renderTableCell=(t,a,i)=>{let l=`${a}-${i}-${t.label}`;if(t.data){const e=this.getDataKey(t.data);l=this.horizontal?e?`${e}-${i}`:l:e?`${e}-${a}`:l}return!1===t.asTd?this.renderHeadingCell(t,a,i):e("td",{key:`cell-${l}`,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.state={_data:[],_label:"",_headerCells:{horizontal:[],vertical:[]}},this.tableDivElementHasScrollbar=!1,this._data=void 0,this._dataFoot=void 0,this._headerCells=void 0,this._label=void 0,this._minWidth=void 0,this._on=void 0,this._selection=void 0}validateData(e){b(this,e,{beforePatch:e=>{this.updateDataToKeyMap(e)}})}validateDataFoot(e){p(this,e)}validateHeaderCells(e){j(this,e)}validateLabel(e){g(this,e,{required:!0})}validateMinWidth(e){u(this,"_minWidth",e,{defaultValue:void 0})}validateOn(e){v(this,e)}validateSelection(e){y(this,e)}componentDidRender(){this.checkDivElementScrollbar()}componentDidLoad(){this.tableDivElement&&ResizeObserver&&(this.tableDivElementResizeObserver=new ResizeObserver(this.checkDivElementScrollbar.bind(this)),this.tableDivElementResizeObserver.observe(this.tableDivElement))}disconnectedCallback(){var e;null===(e=this.tableDivElementResizeObserver)||void 0===e||e.disconnect()}checkDivElementScrollbar(){this.tableDivElement&&(this.tableDivElementHasScrollbar=this.tableDivElement.scrollWidth>this.tableDivElement.clientWidth)}updateDataToKeyMap(e){e.forEach((e=>{this.dataToKeyMap.has(e)||this.dataToKeyMap.set(e,d())})),this.dataToKeyMap.forEach(((t,a)=>{e.includes(a)||this.dataToKeyMap.delete(a)}))}getDataKey(e){return this.dataToKeyMap.get(e)}cellRender(e,t){t&&(clearTimeout(this.cellsToRenderTimeouts.get(t)),this.cellsToRenderTimeouts.set(t,setTimeout((()=>{if("function"==typeof e.render){const a=e.render(t,e,e.data,this.state._data);"string"==typeof a&&(t.textContent=a)}}))))}getNumberOfCols(e,t){let a=0;return e.forEach((e=>{let t=0;e.forEach((e=>{var a;return t+=null!==(a=e.colSpan)&&void 0!==a?a:1})),a<t&&(a=t)})),0===a&&(a=t.length),a}getNumberOfRows(e,t){var a;let i=0;return e.forEach((e=>{let t=0;e.forEach((e=>{var a;return t+=null!==(a=e.rowSpan)&&void 0!==a?a:1})),i<t&&(i=t)})),0===i?i=t.length:i-=(null===(a=this.state._dataFoot)||void 0===a?void 0:a.length)||0,i}filterHeaderKeys(e){const t=[];return e.forEach((e=>{e.forEach((e=>{"string"==typeof e.key&&t.push(e)}))})),t}getPrimaryHeader(e){var t,a;let i=this.filterHeaderKeys(null!==(t=e.horizontal)&&void 0!==t?t:[]);return this.horizontal=!0,0===i.length&&(i=this.filterHeaderKeys(null!==(a=e.vertical)&&void 0!==a?a:[]),i.length>0&&(this.horizontal=!1)),i}createDataField(e,t,i){var l;t.horizontal=Array.isArray(null==t?void 0:t.horizontal)?t.horizontal:[],t.vertical=Array.isArray(null==t?void 0:t.vertical)?t.vertical:[];const o=this.getPrimaryHeader(t),s=this.getNumberOfCols(t.horizontal,e);let n=this.getNumberOfRows(t.vertical,e),r=0;i&&(r=n,n+=(null===(l=this.state._dataFoot)||void 0===l?void 0:l.length)||0);const d=[],c=[],h=[];t.vertical.forEach(((e,t)=>{c[t]=0,h[t]=[]}));for(let a=r;a<n;a++){const l=[];t.vertical.forEach(((e,t)=>{let i=0;if(h[t].forEach((e=>i+=e)),i<=a){const o=e[a-i+c[t]];if("object"==typeof o){l.push(Object.assign(Object.assign({},o),{asTd:!1,data:{}}));let e=1;if("number"==typeof o.rowSpan&&o.rowSpan>1&&(e=o.rowSpan),h[t].push(e),"number"==typeof o.colSpan&&o.colSpan>1)for(let a=1;a<o.colSpan;a++)h[t+a].push(e);c[t]++}}}));for(let t=0;t<s;t++)if(!0===this.horizontal){const s=i&&this.state._dataFoot?this.state._dataFoot[a-r]:e[a];"object"==typeof o[t]&&null!==o[t]&&"string"==typeof o[t].key&&"object"==typeof s&&null!==s&&l.push(Object.assign(Object.assign({},o[t]),{colSpan:void 0,data:s,label:s[o[t].key],rowSpan:void 0}))}else"object"==typeof o[a]&&null!==o[a]&&"string"==typeof o[a].key&&"object"==typeof e[t]&&null!==e[t]&&l.push(Object.assign(Object.assign({},o[a]),{colSpan:void 0,data:e[t],label:e[t][o[a].key],rowSpan:void 0}));d.push(l)}if(0===e.length){let e=0,i=0;Array.isArray(t.horizontal)&&t.horizontal.length>0&&t.horizontal[0].forEach((t=>{e+=t.colSpan||1})),Array.isArray(t.vertical)&&t.vertical.length>0&&(e-=t.vertical.length,t.vertical[0].forEach((e=>{i+=e.rowSpan||1})));const l={colSpan:e,label:a("kol-no-entries"),render:void 0,rowSpan:Math.max(i,1)};0===d.length?d.push([l]):d[0].push(l)}return d}componentWillLoad(){this.validateData(this._data),this.validateDataFoot(this._dataFoot),this.validateHeaderCells(this._headerCells),this.validateLabel(this._label),this.validateMinWidth(this._minWidth),this.validateOn(this._on),this.validateSelection(this._selection)}renderSelectionCell(t,a){var i,o,s;if(this.state._selection){const r=null!==(i=this.state._selection.keyPropertyName)&&void 0!==i?i:"id",d=t.find((e=>e.key===r));if(d){const t=(null==d?void 0:d.data)[r],i=null===(s=null===(o=this.state._selection)||void 0===o?void 0:o.selectedKeys)||void 0===s?void 0:s.includes(t),c=this.state._selection.label(d.data);return e("td",{key:`tbody-${a}-selection`,class:"selection-cell"},e(n,{_label:c,_hideLabel:!0,_checked:i,_tooltipAlign:"right",_on:{onInput:(e,a)=>{var i,o;if(null===(i=this.state._selection)||void 0===i?void 0:i.selectedKeys){const i=a?[...this.state._selection.selectedKeys,t]:this.state._selection.selectedKeys.filter((e=>e!==t));l("selection-change",this.host,i),"function"==typeof(null===(o=this.state._on)||void 0===o?void 0:o[m.onSelectionChange])&&this.state._on[m.onSelectionChange](e,i)}}}}))}}return""}renderHeadingCell(t,a,i){let l,s="codicon codicon-fold";if(t.sortDirection)switch(t.sortDirection){case"ASC":s="codicon codicon-chevron-up",l="ascending";break;case"DESC":s="codicon codicon-chevron-down",l="descending"}return e("th",{key:`${a}-${i}-${t.label}`,class:t.textAlign?`align-${t.textAlign}`:void 0,scope:"number"==typeof t.colSpan&&t.colSpan>1?"colgroup":"col",colSpan:t.colSpan,rowSpan:t.rowSpan,style:{width:t.width},"aria-sort":l,"data-sort":`sort-${t.sortDirection}`},t.sortDirection?e(o,{class:"table-sort-button",exportparts:"icon",_icons:{right:s},_label:t.label,_on:{onClick:e=>{var a;"function"==typeof(null===(a=this.state._on)||void 0===a?void 0:a.onSort)&&t.key&&t.sortDirection&&this.state._on.onSort(e,{key:t.key,currentSortDirection:t.sortDirection})}}}):t.label)}renderFoot(){if(!this.state._dataFoot||0===this.state._dataFoot.length)return"";const t=this.createDataField(this.state._dataFoot,this.state._headerCells,!0);return e("tfoot",null,t.map(this.renderTableRow))}render(){const t=this.createDataField(this.state._data,this.state._headerCells);return e(i,{key:"6ff227efb6562cc4802f7f3cdcc07da9b15f6144",class:"kol-table-stateless-wc"},e("div",{key:"f85881b7a6221b40b72d938398111391b6d1a66e",ref:e=>this.tableDivElement=e,class:"table",tabindex:this.tableDivElementHasScrollbar?"-1":void 0},e("table",{key:"855e72ca4c4770fda2cedd5c894ec81c9207405f",style:{minWidth:this.state._minWidth}},e("div",{key:"a793e72c2157d6a857111b2fe96e0463d43e18ba",class:"focus-element",tabindex:this.tableDivElementHasScrollbar?"0":void 0,"aria-describedby":"caption"}," "),e("caption",{key:"cb84389391bcaa93093d86d7b96e41265befad1c",id:"caption"},this.state._label),Array.isArray(this.state._headerCells.horizontal)&&e("thead",{key:"887ede1cde2c05062e7279143e75cf76c5e30f4a"},this.state._headerCells.horizontal.map(((t,a)=>e("tr",{key:`thead-${a}`},this.state._selection&&e("td",{key:"thead-selection",class:"selection-header-cell"}),t.map(((t,i)=>!0===t.asTd?e("td",{key:`thead-${a}-${i}-${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.renderHeadingCell(t,a,i))))))),e("tbody",{key:"87c7b41c699b02f2fe8802befd7f5d5013b2d4be"},t.map(this.renderTableRow)),this.renderFoot())))}get host(){return s(this)}static get watchers(){return{_data:["validateData"],_dataFoot:["validateDataFoot"],_headerCells:["validateHeaderCells"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_on:["validateOn"],_selection:["validateSelection"]}}};export{k as kol_table_stateless_wc};
4
+ import{r as t,h as e,H as i,g as s}from"./index-b5e5a1b4.js";import{x as n,c as o}from"./component-names-068dc2ae.js";import{t as a}from"./i18n-2cbb513e.js";import{t as l}from"./events-29e84d75.js";import{n as d}from"./dev.utils-d751d0cd.js";import{t as r,o as c,p as h,w as f,i as u}from"./prop.validators-db70e3c4.js";import{v as b,a as p,d as v,b as y,E as m}from"./events-2b67c17a.js";import{v as g}from"./label-20475610.js";import"./i18n-66b52d13.js";import"./reuse-108ee8f5.js";import"./dev.utils-1ca991a2.js";import"./index-db4aa6e4.js";const j=(e,t)=>{r(t,(()=>{c(t,(()=>{try{t=h(t)}catch(e){}f(e,"_headerCells",(e=>"object"==typeof e&&null!==e),new Set(["TableHeaderCellsPropType"]),t)}))}))},k=class{constructor(a){t(this,a),this.horizontal=!0,this.cellsToRenderTimeouts=new Map,this.dataToKeyMap=new Map,this.renderTableRow=(t,a)=>{var i,l;let o=String(a);return this.horizontal&&(null===(i=t[0])||void 0===i?void 0:i.data)&&(o=null!==(l=this.getDataKey(t[0].data))&&void 0!==l?l:o),e("tr",{key:`row-${o}`},this.renderSelectionCell(t,a),t.map(((e,t)=>this.renderTableCell(e,a,t))))},this.renderTableCell=(t,a,i)=>{let l=`${a}-${i}-${t.label}`;if(t.data){const e=this.getDataKey(t.data);l=this.horizontal?e?`${e}-${i}`:l:e?`${e}-${a}`:l}return!1===t.asTd?this.renderHeadingCell(t,a,i):e("td",{key:`cell-${l}`,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.state={_data:[],_label:"",_headerCells:{horizontal:[],vertical:[]}},this.tableDivElementHasScrollbar=!1,this._data=void 0,this._dataFoot=void 0,this._headerCells=void 0,this._label=void 0,this._minWidth=void 0,this._on=void 0,this._selection=void 0}validateData(e){b(this,e,{beforePatch:e=>{this.updateDataToKeyMap(e)}})}validateDataFoot(e){p(this,e)}validateHeaderCells(e){j(this,e)}validateLabel(e){g(this,e,{required:!0})}validateMinWidth(e){u(this,"_minWidth",e,{defaultValue:void 0})}validateOn(e){v(this,e)}validateSelection(e){y(this,e)}componentDidRender(){this.checkDivElementScrollbar()}componentDidLoad(){this.tableDivElement&&ResizeObserver&&(this.tableDivElementResizeObserver=new ResizeObserver(this.checkDivElementScrollbar.bind(this)),this.tableDivElementResizeObserver.observe(this.tableDivElement))}disconnectedCallback(){var e;null===(e=this.tableDivElementResizeObserver)||void 0===e||e.disconnect()}checkDivElementScrollbar(){this.tableDivElement&&(this.tableDivElementHasScrollbar=this.tableDivElement.scrollWidth>this.tableDivElement.clientWidth)}updateDataToKeyMap(e){e.forEach((e=>{this.dataToKeyMap.has(e)||this.dataToKeyMap.set(e,d())})),this.dataToKeyMap.forEach(((t,a)=>{e.includes(a)||this.dataToKeyMap.delete(a)}))}getDataKey(e){return this.dataToKeyMap.get(e)}cellRender(e,t){t&&(clearTimeout(this.cellsToRenderTimeouts.get(t)),this.cellsToRenderTimeouts.set(t,setTimeout((()=>{if("function"==typeof e.render){const a=e.render(t,e,e.data,this.state._data);"string"==typeof a&&(t.textContent=a)}}))))}getNumberOfCols(e,t){let a=0;return e.forEach((e=>{let t=0;e.forEach((e=>{var a;return t+=null!==(a=e.colSpan)&&void 0!==a?a:1})),a<t&&(a=t)})),0===a&&(a=t.length),a}getNumberOfRows(e,t){var a;let i=0;return e.forEach((e=>{let t=0;e.forEach((e=>{var a;return t+=null!==(a=e.rowSpan)&&void 0!==a?a:1})),i<t&&(i=t)})),0===i?i=t.length:i-=(null===(a=this.state._dataFoot)||void 0===a?void 0:a.length)||0,i}filterHeaderKeys(e){const t=[];return e.forEach((e=>{e.forEach((e=>{"string"==typeof e.key&&t.push(e)}))})),t}getPrimaryHeader(e){var t,a;let i=this.filterHeaderKeys(null!==(t=e.horizontal)&&void 0!==t?t:[]);return this.horizontal=!0,0===i.length&&(i=this.filterHeaderKeys(null!==(a=e.vertical)&&void 0!==a?a:[]),i.length>0&&(this.horizontal=!1)),i}createDataField(e,t,i){var l;t.horizontal=Array.isArray(null==t?void 0:t.horizontal)?t.horizontal:[],t.vertical=Array.isArray(null==t?void 0:t.vertical)?t.vertical:[];const o=this.getPrimaryHeader(t),s=this.getNumberOfCols(t.horizontal,e);let n=this.getNumberOfRows(t.vertical,e),r=0;i&&(r=n,n+=(null===(l=this.state._dataFoot)||void 0===l?void 0:l.length)||0);const d=[],c=[],h=[];t.vertical.forEach(((e,t)=>{c[t]=0,h[t]=[]}));for(let a=r;a<n;a++){const l=[];t.vertical.forEach(((e,t)=>{let i=0;if(h[t].forEach((e=>i+=e)),i<=a){const o=e[a-i+c[t]];if("object"==typeof o){l.push(Object.assign(Object.assign({},o),{asTd:!1,data:{}}));let e=1;if("number"==typeof o.rowSpan&&o.rowSpan>1&&(e=o.rowSpan),h[t].push(e),"number"==typeof o.colSpan&&o.colSpan>1)for(let a=1;a<o.colSpan;a++)h[t+a].push(e);c[t]++}}}));for(let t=0;t<s;t++)if(!0===this.horizontal){const s=i&&this.state._dataFoot?this.state._dataFoot[a-r]:e[a];"object"==typeof o[t]&&null!==o[t]&&"string"==typeof o[t].key&&"object"==typeof s&&null!==s&&l.push(Object.assign(Object.assign({},o[t]),{colSpan:void 0,data:s,label:s[o[t].key],rowSpan:void 0}))}else"object"==typeof o[a]&&null!==o[a]&&"string"==typeof o[a].key&&"object"==typeof e[t]&&null!==e[t]&&l.push(Object.assign(Object.assign({},o[a]),{colSpan:void 0,data:e[t],label:e[t][o[a].key],rowSpan:void 0}));d.push(l)}if(0===e.length){let e=0,i=0;Array.isArray(t.horizontal)&&t.horizontal.length>0&&t.horizontal[0].forEach((t=>{e+=t.colSpan||1})),Array.isArray(t.vertical)&&t.vertical.length>0&&(e-=t.vertical.length,t.vertical[0].forEach((e=>{i+=e.rowSpan||1})));const l={colSpan:e,label:a("kol-no-entries"),render:void 0,rowSpan:Math.max(i,1)};0===d.length?d.push([l]):d[0].push(l)}return d}componentWillLoad(){this.validateData(this._data),this.validateDataFoot(this._dataFoot),this.validateHeaderCells(this._headerCells),this.validateLabel(this._label),this.validateMinWidth(this._minWidth),this.validateOn(this._on),this.validateSelection(this._selection)}renderSelectionCell(t,a){var i,o,s;if(this.state._selection){const r=null!==(i=this.state._selection.keyPropertyName)&&void 0!==i?i:"id",d=t.find((e=>e.key===r));if(d){const t=(null==d?void 0:d.data)[r],i=null===(s=null===(o=this.state._selection)||void 0===o?void 0:o.selectedKeys)||void 0===s?void 0:s.includes(t),c=this.state._selection.label(d.data);return e("td",{key:`tbody-${a}-selection`,class:"selection-cell"},e(n,{_label:c,_hideLabel:!0,_checked:i,_tooltipAlign:"right",_on:{onInput:(e,a)=>{var i,o;if(null===(i=this.state._selection)||void 0===i?void 0:i.selectedKeys){const i=a?[...this.state._selection.selectedKeys,t]:this.state._selection.selectedKeys.filter((e=>e!==t));l("selection-change",this.host,i),"function"==typeof(null===(o=this.state._on)||void 0===o?void 0:o[m.onSelectionChange])&&this.state._on[m.onSelectionChange](e,i)}}}}))}}return""}renderHeadingCell(t,a,i){let l,s="codicon codicon-fold";if(t.sortDirection)switch(t.sortDirection){case"ASC":s="codicon codicon-chevron-up",l="ascending";break;case"DESC":s="codicon codicon-chevron-down",l="descending"}return e("th",{key:`${a}-${i}-${t.label}`,class:t.textAlign?`align-${t.textAlign}`:void 0,scope:"number"==typeof t.colSpan&&t.colSpan>1?"colgroup":"col",colSpan:t.colSpan,rowSpan:t.rowSpan,style:{width:t.width},"aria-sort":l,"data-sort":`sort-${t.sortDirection}`},t.sortDirection?e(o,{class:"table-sort-button",exportparts:"icon",_icons:{right:s},_label:t.label,_on:{onClick:e=>{var a;"function"==typeof(null===(a=this.state._on)||void 0===a?void 0:a.onSort)&&t.key&&t.sortDirection&&this.state._on.onSort(e,{key:t.key,currentSortDirection:t.sortDirection})}}}):t.label)}renderFoot(){if(!this.state._dataFoot||0===this.state._dataFoot.length)return"";const t=this.createDataField(this.state._dataFoot,this.state._headerCells,!0);return e("tfoot",null,t.map(this.renderTableRow))}render(){const t=this.createDataField(this.state._data,this.state._headerCells);return e(i,{key:"6ff227efb6562cc4802f7f3cdcc07da9b15f6144",class:"kol-table-stateless-wc"},e("div",{key:"f85881b7a6221b40b72d938398111391b6d1a66e",ref:e=>this.tableDivElement=e,class:"table",tabindex:this.tableDivElementHasScrollbar?"-1":void 0},e("table",{key:"855e72ca4c4770fda2cedd5c894ec81c9207405f",style:{minWidth:this.state._minWidth}},e("div",{key:"a793e72c2157d6a857111b2fe96e0463d43e18ba",class:"focus-element",tabindex:this.tableDivElementHasScrollbar?"0":void 0,"aria-describedby":"caption"}," "),e("caption",{key:"cb84389391bcaa93093d86d7b96e41265befad1c",id:"caption"},this.state._label),Array.isArray(this.state._headerCells.horizontal)&&e("thead",{key:"887ede1cde2c05062e7279143e75cf76c5e30f4a"},this.state._headerCells.horizontal.map(((t,a)=>e("tr",{key:`thead-${a}`},this.state._selection&&e("td",{key:"thead-selection",class:"selection-header-cell"}),t.map(((t,i)=>!0===t.asTd?e("td",{key:`thead-${a}-${i}-${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.renderHeadingCell(t,a,i))))))),e("tbody",{key:"87c7b41c699b02f2fe8802befd7f5d5013b2d4be"},t.map(this.renderTableRow)),this.renderFoot())))}get host(){return s(this)}static get watchers(){return{_data:["validateData"],_dataFoot:["validateDataFoot"],_headerCells:["validateHeaderCells"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_on:["validateOn"],_selection:["validateSelection"]}}};export{k as kol_table_stateless_wc};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as n,h as e,H as t}from"./index-b2c61df0.js";import{r as i}from"./component-names-068dc2ae.js";const o="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: 44px;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of 44px.\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: 44px;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of 44px.\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n :host,\n .kol-table-stateless-wc {\n display: block;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .table {\n max-width: 100%;\n overflow-x: auto;\n overflow-y: hidden;\n }\n table {\n width: 100%;\n }\n caption {\n text-align: start;\n }\n .focus-element {\n font-size: 0;\n }\n .focus-element:focus {\n outline: 0 !important;\n }\n .table:has(.focus-element:focus) {\n /* @see https://remysharp.com/til/css/focus-ring-default-styles */\n outline: 5px auto Highlight;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: 2px;\n }\n .table-sort-button .button {\n color: inherit;\n }\n tbody th,\n th.align-left {\n text-align: left;\n }\n tbody th .table-sort-button .button-inner,\n th.align-left .table-sort-button .button-inner {\n justify-items: start;\n }\n th.align-center {\n text-align: center;\n }\n th.align-center .table-sort-button .button-inner {\n justify-items: center;\n }\n th.align-right {\n text-align: right;\n }\n th.align-right .table-sort-button .button-inner {\n justify-items: end;\n }\n .selection-header-cell {\n width: 0;\n }\n .selection-cell {\n white-space: nowrap;\n }\n}",a=o,l=class{constructor(e){n(this,e),this._data=void 0,this._dataFoot=void 0,this._headerCells=void 0,this._label=void 0,this._minWidth=void 0,this._on=void 0,this._selection=void 0}render(){return e(t,{key:"d8c2f6eed229d8b9d475dfdb9678a3ed3055cecd",class:"kol-table-stateless"},e(i,{key:"f0b6f632885da05dd020af5318c287cacb117f3c",_data:this._data,_dataFoot:this._dataFoot,_headerCells:this._headerCells,_label:this._label,_minWidth:this._minWidth,_on:this._on,_selection:this._selection}))}};l.style={default:a};export{l as kol_table_stateless};
4
+ import{r as n,h as e,H as t}from"./index-b5e5a1b4.js";import{r as i}from"./component-names-068dc2ae.js";const o="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: 44px;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of 44px.\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: 44px;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of 44px.\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n :host,\n .kol-table-stateless-wc {\n display: block;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .table {\n max-width: 100%;\n overflow-x: auto;\n overflow-y: hidden;\n }\n table {\n width: 100%;\n }\n caption {\n text-align: start;\n }\n .focus-element {\n font-size: 0;\n }\n .focus-element:focus {\n outline: 0 !important;\n }\n .table:has(.focus-element:focus) {\n /* @see https://remysharp.com/til/css/focus-ring-default-styles */\n outline: 5px auto Highlight;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: 2px;\n }\n .table-sort-button .button {\n color: inherit;\n }\n tbody th,\n th.align-left {\n text-align: left;\n }\n tbody th .table-sort-button .button-inner,\n th.align-left .table-sort-button .button-inner {\n justify-items: start;\n }\n th.align-center {\n text-align: center;\n }\n th.align-center .table-sort-button .button-inner {\n justify-items: center;\n }\n th.align-right {\n text-align: right;\n }\n th.align-right .table-sort-button .button-inner {\n justify-items: end;\n }\n .selection-header-cell {\n width: 0;\n }\n .selection-cell {\n white-space: nowrap;\n }\n}",a=o,l=class{constructor(e){n(this,e),this._data=void 0,this._dataFoot=void 0,this._headerCells=void 0,this._label=void 0,this._minWidth=void 0,this._on=void 0,this._selection=void 0}render(){return e(t,{key:"d8c2f6eed229d8b9d475dfdb9678a3ed3055cecd",class:"kol-table-stateless"},e(i,{key:"f0b6f632885da05dd020af5318c287cacb117f3c",_data:this._data,_dataFoot:this._dataFoot,_headerCells:this._headerCells,_label:this._label,_minWidth:this._minWidth,_on:this._on,_selection:this._selection}))}};l.style={default:a};export{l as kol_table_stateless};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as i,h as t}from"./index-b2c61df0.js";import{q as e}from"./component-names-068dc2ae.js";const n=class{constructor(t){i(this,t),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._paginationPosition="bottom",this._selection=void 0,this._on=void 0}render(){return t(e,{key:"c65b251dc7c47eda8c7fa491a83608370dd0da2a",_allowMultiSort:this._allowMultiSort,_data:this._data,_dataFoot:this._dataFoot,_headers:this._headers,_label:this._label,_minWidth:this._minWidth,_pagination:this._pagination,_paginationPosition:this._paginationPosition,_selection:this._selection,_on:this._on})}};export{n as kol_table};
4
+ import{r as i,h as t}from"./index-b5e5a1b4.js";import{q as e}from"./component-names-068dc2ae.js";const n=class{constructor(t){i(this,t),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._paginationPosition="bottom",this._selection=void 0,this._on=void 0}render(){return t(e,{key:"c65b251dc7c47eda8c7fa491a83608370dd0da2a",_allowMultiSort:this._allowMultiSort,_data:this._data,_dataFoot:this._dataFoot,_headers:this._headers,_label:this._label,_minWidth:this._minWidth,_pagination:this._pagination,_paginationPosition:this._paginationPosition,_selection:this._selection,_on:this._on})}};export{n as kol_table};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as n,h as t,H as i,g as e}from"./index-b2c61df0.js";import{t as o}from"./i18n-112381e9.js";import{c as s,i as a}from"./component-names-068dc2ae.js";import{j as l,f as r,s as d,k as h,g as c,h as b,v as u}from"./prop.validators-db70e3c4.js";import{a as p}from"./align-6c0a2935.js";import{v as f}from"./label-20475610.js";import{L as g}from"./dev.utils-1ca991a2.js";import"./i18n-66b52d13.js";import"./reuse-b66836de.js";import"./index-db4aa6e4.js";const m="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: 44px;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of 44px.\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-button-group-wc {\n display: inline-flex;\n flex-wrap: wrap;\n }\n .kol-button-group-wc button {\n border-bottom-color: transparent;\n border-bottom-style: solid;\n display: block;\n }\n div.grid,\n div[role=tabpanel] {\n height: 100%;\n }\n :host > .tabs-align-right {\n display: grid;\n grid-template-columns: 1fr auto;\n }\n :host > .tabs-align-right .kol-button-group-wc {\n display: grid;\n order: 2;\n }\n :host > .tabs-align-left {\n display: grid;\n grid-template-columns: auto 1fr;\n }\n :host > .tabs-align-left .kol-button-group-wc {\n display: grid;\n order: 0;\n }\n :host > .tabs-align-bottom {\n display: grid;\n grid-template-rows: 1fr auto;\n }\n :host > .tabs-align-bottom .kol-button-group-wc {\n order: 2;\n }\n :host > .tabs-align-bottom .kol-button-group-wc > div {\n display: flex;\n }\n :host > .tabs-align-bottom > .kol-button-group-wc > div > div:first-child {\n margin: 0 1em 0 0;\n }\n :host > .tabs-align-bottom > .kol-button-group-wc > div > div {\n margin: 0 1em;\n }\n :host > .tabs-align-top {\n display: grid;\n grid-template-rows: auto 1fr;\n }\n :host > .tabs-align-top .kol-button-group-wc {\n order: 0;\n }\n :host > .tabs-align-top .kol-button-group-wc > div {\n display: flex;\n }\n :host > .tabs-align-top > .kol-button-group-wc > div > div:first-child {\n margin: 0 1em 0 0;\n }\n :host > .tabs-align-top > .kol-button-group-wc > div > div {\n margin: 0 1em;\n }\n :host > div {\n display: grid;\n }\n :host > .tabs-align-left .kol-button-group-wc,\n :host > .tabs-align-top .kol-button-group-wc {\n order: 0;\n }\n :host > .tabs-align-bottom .kol-button-group-wc,\n :host > .tabs-align-right .kol-button-group-wc {\n order: 1;\n }\n :host > div.tabs-align-left .kol-button-group-wc > div,\n :host > div.tabs-align-left .kol-button-group-wc > div > div,\n :host > div.tabs-align-right .kol-button-group-wc > div,\n :host > div.tabs-align-right .kol-button-group-wc > div > div {\n display: grid;\n }\n :host > div.tabs-align-left .kol-button-group-wc > div > div .kol-button-wc,\n :host > div.tabs-align-right .kol-button-group-wc > div > div .kol-button-wc {\n width: 100%;\n }\n :host > div.tabs-align-bottom .kol-button-group-wc div,\n :host > div.tabs-align-top .kol-button-group-wc div {\n display: flex;\n flex-wrap: wrap;\n }\n}",v=m,w=class{constructor(t){n(this,t),this.onCreateLabel=`${o("kol-new")} …`,this.showCreateTab=!1,this.nextPossibleTabIndex=(t,e,n)=>{if(n>0){if(e+n<t.length)return t[e+n]._disabled?this.nextPossibleTabIndex(t,e,n+1):e+n}else if(n<0&&e+n>=0)return t[e+n]._disabled?this.nextPossibleTabIndex(t,e,n-1):e+n;return e},this.onKeyDown=t=>{var e,n;let o=null;switch(t.key){case"ArrowRight":o=this.nextPossibleTabIndex(this.state._tabs,this.state._selected,1);break;case"ArrowLeft":o=this.nextPossibleTabIndex(this.state._tabs,this.state._selected,-1)}if(null!==o){const a=this.state._tabs[o];(null===(e=a._on)||void 0===e?void 0:e.onSelect)&&(null===(n=a._on)||void 0===n||n.onSelect(t,o)),this.onSelect(t,o)}},this.onClickSelect=(t,e)=>{var n,o;const a=this.state._tabs[e];(null===(n=a._on)||void 0===n?void 0:n.onSelect)&&(null===(o=a._on)||void 0===o||o.onSelect(t,e)),this.onSelect(t,e)},this.onMouseDown=t=>{t.preventDefault(),t.stopPropagation()},this.callbacks={onClick:this.onClickSelect,onMouseDown:this.onMouseDown},this.catchTabPanelHost=t=>{this.tabPanelHost=t},this.selectNextNotDisabledTab=(t,e,n=!0,o)=>{if(t>e.length-1&&(t=e.length-1),t<0&&(t=0),Array.isArray(e)&&e[t]&&e[t]._disabled){if(!0===n){if(t<e.length-1)return this.selectNextNotDisabledTab(t+1,e,!0,o||t);t=o||t,n=!1}if(!1===n){if(t>0)return this.selectNextNotDisabledTab(t-1,e,!1,o||t);l("[KolTabs] All tabs are disabled, and therefore no tab can be displayed.")}}return t},this.syncSelectedAndTabs=(t,e,n,o)=>{let a,i;a="_selected"===o?t:this.state._selected,i="_tabs"===o?t:this.state._tabs,i.length>0&&e.set("_selected",this.selectNextNotDisabledTab(a,i))},this.handleTabPanels=()=>{var t,e,n;if(this.tabPanelHost instanceof HTMLDivElement)for(let o=this.tabPanelHost.children.length;o<this.state._tabs.length;o++){const a=document.createElement("div");a.setAttribute("aria-labelledby",`${this.state._label.replace(/\s/g,"-")}-tab-${o}`),a.setAttribute("id",`tabpanel-${o}`),a.setAttribute("role","tabpanel"),a.setAttribute("hidden","");const i=document.createElement("slot");i.setAttribute("name",`tabpanel-slot-${o}`),a.appendChild(i),this.tabPanelHost.appendChild(a),(null===(t=this.host)||void 0===t?void 0:t.children)instanceof HTMLCollection&&(null===(e=this.host)||void 0===e?void 0:e.children[o])&&(null===(n=this.host)||void 0===n||n.children[o].setAttribute("slot",`tabpanel-slot-${o}`))}},this.onCreate=t=>{var e,n;t.preventDefault(),t.stopPropagation(),"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e.onCreate)&&(null===(n=this.state._on)||void 0===n||n.onCreate(t))},this._align="top",this._label=void 0,this._on=void 0,this._selected=0,this._tabs=void 0,this.state={_align:"top",_label:"",_selected:0,_tabs:[]}}renderButtonGroup(){return t(a,{class:"tabs-button-group",role:"tablist","aria-label":this.state._label,onKeyDown:this.onKeyDown},this.state._tabs.map(((e,n)=>t(s,{_disabled:e._disabled,_icons:e._icons,_hideLabel:e._hideLabel,_label:e._label,_on:this.callbacks,_tabIndex:this.state._selected===n?0:-1,_tooltipAlign:e._tooltipAlign,_variant:this.state._selected===n?"custom":void 0,_customClass:this.state._selected===n?"selected":void 0,_ariaControls:`tabpanel-${n}`,_ariaSelected:this.state._selected===n,_id:`${this.state._label.replace(/\s/g,"-")}-tab-${n}`,_role:"tab",_value:n}))),this.showCreateTab&&t(s,{class:"create-button",_label:this.onCreateLabel,_on:{onClick:this.onCreate}}))}render(){return t(i,{key:"1092ece9e1623621dcd253ff8d32eb1470471993",class:"kol-tabs"},t("div",{key:"42c75328542b14057998aaa615c692e15870e5ce",ref:t=>{this.tabPanelsElement=t},class:{[`tabs-align-${this.state._align}`]:!0}},this.renderButtonGroup(),t("div",{key:"89eb64ffefa3234cb2ba93532a775cc2e1cf0968",class:"tabs-content",ref:this.catchTabPanelHost})))}validateAlign(t){p(this,t)}validateLabel(t){f(this,t,{required:!0})}validateOn(t){if("object"==typeof t&&null!==t){r("[KolTabs] Prüfen, wie man auch einen EventCallback einzeln ändern kann.");const e={};"function"!=typeof t.onCreate&&"object"!=typeof t.onCreate||("object"==typeof t.onCreate?("string"==typeof t.onCreate.label&&t.onCreate.label.length>0?this.onCreateLabel=t.onCreate.label:g.debug("[KolTabs] The label text for New in {\n onCreate: {\n label: string (!),\n callback: Function\n }\n} is not set correctly."),"function"==typeof t.onCreate.callback?e.onCreate=t.onCreate.callback:g.debug("[KolTabs] The onCreate callback function for New in {\n onCreate: {\n label: string,\n callback: Function (!)\n }\n} is not set correctly.")):e.onCreate=t.onCreate,this.showCreateTab="function"==typeof e.onCreate),"function"==typeof t.onSelect&&(e.onSelect=t.onSelect),d(this,"_on",e)}}validateSelected(t){h(this,"_selected",t,{hooks:{beforePatch:this.syncSelectedAndTabs}})}validateTabs(t){c(this,"_tabs",(t=>"object"==typeof t&&null!==t&&"string"==typeof t._label&&t._label.length>0),t,void 0,{hooks:{beforePatch:this.syncSelectedAndTabs}}),b("KolTabs",this.state._tabs.length)}componentWillLoad(){this.validateAlign(this._align),this.validateLabel(this._label),this.validateOn(this._on),this.validateSelected(this._selected),this.validateTabs(this._tabs)}componentDidRender(){if(this.handleTabPanels(),this.tabPanelHost instanceof HTMLDivElement)for(let t=0;t<this.tabPanelHost.children.length;t++)t!==this.state._selected?this.tabPanelHost.children[t].setAttribute("hidden",""):this.tabPanelHost.children[t].removeAttribute("hidden")}onSelect(t,e){var n,o;if(this._selected=e,"function"==typeof(null===(n=this._on)||void 0===n?void 0:n.onSelect)&&(null===(o=this._on)||void 0===o||o.onSelect(t,e)),this.tabPanelsElement){const t=u(`button#${this.state._label.replace(/\s/g,"-")}-tab-${e}`,this.tabPanelsElement);null==t||t.focus()}}get host(){return e(this)}static get watchers(){return{_align:["validateAlign"],_label:["validateLabel"],_on:["validateOn"],_selected:["validateSelected"],_tabs:["validateTabs"]}}};w.style={default:v};export{w as kol_tabs};
4
+ import{r as n,h as t,H as i,g as e}from"./index-b5e5a1b4.js";import{t as o}from"./i18n-2cbb513e.js";import{c as s,i as a}from"./component-names-068dc2ae.js";import{j as l,f as r,s as d,k as h,g as c,h as b,v as u}from"./prop.validators-db70e3c4.js";import{a as p}from"./align-6c0a2935.js";import{v as f}from"./label-20475610.js";import{L as g}from"./dev.utils-1ca991a2.js";import"./i18n-66b52d13.js";import"./reuse-108ee8f5.js";import"./index-db4aa6e4.js";const m="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: 44px;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of 44px.\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-button-group-wc {\n display: inline-flex;\n flex-wrap: wrap;\n }\n .kol-button-group-wc button {\n border-bottom-color: transparent;\n border-bottom-style: solid;\n display: block;\n }\n div.grid,\n div[role=tabpanel] {\n height: 100%;\n }\n :host > .tabs-align-right {\n display: grid;\n grid-template-columns: 1fr auto;\n }\n :host > .tabs-align-right .kol-button-group-wc {\n display: grid;\n order: 2;\n }\n :host > .tabs-align-left {\n display: grid;\n grid-template-columns: auto 1fr;\n }\n :host > .tabs-align-left .kol-button-group-wc {\n display: grid;\n order: 0;\n }\n :host > .tabs-align-bottom {\n display: grid;\n grid-template-rows: 1fr auto;\n }\n :host > .tabs-align-bottom .kol-button-group-wc {\n order: 2;\n }\n :host > .tabs-align-bottom .kol-button-group-wc > div {\n display: flex;\n }\n :host > .tabs-align-bottom > .kol-button-group-wc > div > div:first-child {\n margin: 0 1em 0 0;\n }\n :host > .tabs-align-bottom > .kol-button-group-wc > div > div {\n margin: 0 1em;\n }\n :host > .tabs-align-top {\n display: grid;\n grid-template-rows: auto 1fr;\n }\n :host > .tabs-align-top .kol-button-group-wc {\n order: 0;\n }\n :host > .tabs-align-top .kol-button-group-wc > div {\n display: flex;\n }\n :host > .tabs-align-top > .kol-button-group-wc > div > div:first-child {\n margin: 0 1em 0 0;\n }\n :host > .tabs-align-top > .kol-button-group-wc > div > div {\n margin: 0 1em;\n }\n :host > div {\n display: grid;\n }\n :host > .tabs-align-left .kol-button-group-wc,\n :host > .tabs-align-top .kol-button-group-wc {\n order: 0;\n }\n :host > .tabs-align-bottom .kol-button-group-wc,\n :host > .tabs-align-right .kol-button-group-wc {\n order: 1;\n }\n :host > div.tabs-align-left .kol-button-group-wc > div,\n :host > div.tabs-align-left .kol-button-group-wc > div > div,\n :host > div.tabs-align-right .kol-button-group-wc > div,\n :host > div.tabs-align-right .kol-button-group-wc > div > div {\n display: grid;\n }\n :host > div.tabs-align-left .kol-button-group-wc > div > div .kol-button-wc,\n :host > div.tabs-align-right .kol-button-group-wc > div > div .kol-button-wc {\n width: 100%;\n }\n :host > div.tabs-align-bottom .kol-button-group-wc div,\n :host > div.tabs-align-top .kol-button-group-wc div {\n display: flex;\n flex-wrap: wrap;\n }\n}",v=m,w=class{constructor(t){n(this,t),this.onCreateLabel=`${o("kol-new")} …`,this.showCreateTab=!1,this.nextPossibleTabIndex=(t,e,n)=>{if(n>0){if(e+n<t.length)return t[e+n]._disabled?this.nextPossibleTabIndex(t,e,n+1):e+n}else if(n<0&&e+n>=0)return t[e+n]._disabled?this.nextPossibleTabIndex(t,e,n-1):e+n;return e},this.onKeyDown=t=>{var e,n;let o=null;switch(t.key){case"ArrowRight":o=this.nextPossibleTabIndex(this.state._tabs,this.state._selected,1);break;case"ArrowLeft":o=this.nextPossibleTabIndex(this.state._tabs,this.state._selected,-1)}if(null!==o){const a=this.state._tabs[o];(null===(e=a._on)||void 0===e?void 0:e.onSelect)&&(null===(n=a._on)||void 0===n||n.onSelect(t,o)),this.onSelect(t,o)}},this.onClickSelect=(t,e)=>{var n,o;const a=this.state._tabs[e];(null===(n=a._on)||void 0===n?void 0:n.onSelect)&&(null===(o=a._on)||void 0===o||o.onSelect(t,e)),this.onSelect(t,e)},this.onMouseDown=t=>{t.preventDefault(),t.stopPropagation()},this.callbacks={onClick:this.onClickSelect,onMouseDown:this.onMouseDown},this.catchTabPanelHost=t=>{this.tabPanelHost=t},this.selectNextNotDisabledTab=(t,e,n=!0,o)=>{if(t>e.length-1&&(t=e.length-1),t<0&&(t=0),Array.isArray(e)&&e[t]&&e[t]._disabled){if(!0===n){if(t<e.length-1)return this.selectNextNotDisabledTab(t+1,e,!0,o||t);t=o||t,n=!1}if(!1===n){if(t>0)return this.selectNextNotDisabledTab(t-1,e,!1,o||t);l("[KolTabs] All tabs are disabled, and therefore no tab can be displayed.")}}return t},this.syncSelectedAndTabs=(t,e,n,o)=>{let a,i;a="_selected"===o?t:this.state._selected,i="_tabs"===o?t:this.state._tabs,i.length>0&&e.set("_selected",this.selectNextNotDisabledTab(a,i))},this.handleTabPanels=()=>{var t,e,n;if(this.tabPanelHost instanceof HTMLDivElement)for(let o=this.tabPanelHost.children.length;o<this.state._tabs.length;o++){const a=document.createElement("div");a.setAttribute("aria-labelledby",`${this.state._label.replace(/\s/g,"-")}-tab-${o}`),a.setAttribute("id",`tabpanel-${o}`),a.setAttribute("role","tabpanel"),a.setAttribute("hidden","");const i=document.createElement("slot");i.setAttribute("name",`tabpanel-slot-${o}`),a.appendChild(i),this.tabPanelHost.appendChild(a),(null===(t=this.host)||void 0===t?void 0:t.children)instanceof HTMLCollection&&(null===(e=this.host)||void 0===e?void 0:e.children[o])&&(null===(n=this.host)||void 0===n||n.children[o].setAttribute("slot",`tabpanel-slot-${o}`))}},this.onCreate=t=>{var e,n;t.preventDefault(),t.stopPropagation(),"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e.onCreate)&&(null===(n=this.state._on)||void 0===n||n.onCreate(t))},this._align="top",this._label=void 0,this._on=void 0,this._selected=0,this._tabs=void 0,this.state={_align:"top",_label:"",_selected:0,_tabs:[]}}renderButtonGroup(){return t(a,{class:"tabs-button-group",role:"tablist","aria-label":this.state._label,onKeyDown:this.onKeyDown},this.state._tabs.map(((e,n)=>t(s,{_disabled:e._disabled,_icons:e._icons,_hideLabel:e._hideLabel,_label:e._label,_on:this.callbacks,_tabIndex:this.state._selected===n?0:-1,_tooltipAlign:e._tooltipAlign,_variant:this.state._selected===n?"custom":void 0,_customClass:this.state._selected===n?"selected":void 0,_ariaControls:`tabpanel-${n}`,_ariaSelected:this.state._selected===n,_id:`${this.state._label.replace(/\s/g,"-")}-tab-${n}`,_role:"tab",_value:n}))),this.showCreateTab&&t(s,{class:"create-button",_label:this.onCreateLabel,_on:{onClick:this.onCreate}}))}render(){return t(i,{key:"1092ece9e1623621dcd253ff8d32eb1470471993",class:"kol-tabs"},t("div",{key:"42c75328542b14057998aaa615c692e15870e5ce",ref:t=>{this.tabPanelsElement=t},class:{[`tabs-align-${this.state._align}`]:!0}},this.renderButtonGroup(),t("div",{key:"89eb64ffefa3234cb2ba93532a775cc2e1cf0968",class:"tabs-content",ref:this.catchTabPanelHost})))}validateAlign(t){p(this,t)}validateLabel(t){f(this,t,{required:!0})}validateOn(t){if("object"==typeof t&&null!==t){r("[KolTabs] Prüfen, wie man auch einen EventCallback einzeln ändern kann.");const e={};"function"!=typeof t.onCreate&&"object"!=typeof t.onCreate||("object"==typeof t.onCreate?("string"==typeof t.onCreate.label&&t.onCreate.label.length>0?this.onCreateLabel=t.onCreate.label:g.debug("[KolTabs] The label text for New in {\n onCreate: {\n label: string (!),\n callback: Function\n }\n} is not set correctly."),"function"==typeof t.onCreate.callback?e.onCreate=t.onCreate.callback:g.debug("[KolTabs] The onCreate callback function for New in {\n onCreate: {\n label: string,\n callback: Function (!)\n }\n} is not set correctly.")):e.onCreate=t.onCreate,this.showCreateTab="function"==typeof e.onCreate),"function"==typeof t.onSelect&&(e.onSelect=t.onSelect),d(this,"_on",e)}}validateSelected(t){h(this,"_selected",t,{hooks:{beforePatch:this.syncSelectedAndTabs}})}validateTabs(t){c(this,"_tabs",(t=>"object"==typeof t&&null!==t&&"string"==typeof t._label&&t._label.length>0),t,void 0,{hooks:{beforePatch:this.syncSelectedAndTabs}}),b("KolTabs",this.state._tabs.length)}componentWillLoad(){this.validateAlign(this._align),this.validateLabel(this._label),this.validateOn(this._on),this.validateSelected(this._selected),this.validateTabs(this._tabs)}componentDidRender(){if(this.handleTabPanels(),this.tabPanelHost instanceof HTMLDivElement)for(let t=0;t<this.tabPanelHost.children.length;t++)t!==this.state._selected?this.tabPanelHost.children[t].setAttribute("hidden",""):this.tabPanelHost.children[t].removeAttribute("hidden")}onSelect(t,e){var n,o;if(this._selected=e,"function"==typeof(null===(n=this._on)||void 0===n?void 0:n.onSelect)&&(null===(o=this._on)||void 0===o||o.onSelect(t,e)),this.tabPanelsElement){const t=u(`button#${this.state._label.replace(/\s/g,"-")}-tab-${e}`,this.tabPanelsElement);null==t||t.focus()}}get host(){return e(this)}static get watchers(){return{_align:["validateAlign"],_label:["validateLabel"],_on:["validateOn"],_selected:["validateSelected"],_tabs:["validateTabs"]}}};w.style={default:v};export{w as kol_tabs};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{h as e,F as t,H as n,r as i,g as a}from"./index-b2c61df0.js";import{n as s}from"./dev.utils-a14ff412.js";import{g as o}from"./controller-fd9ca791.js";import{I as l}from"./InternalUnderlinedAccessKey-fd8927df.js";import{I as r}from"./controller-icon-b6046f95.js";import{b as h,k as d,i as c,w as p,s as u,l as f}from"./prop.validators-db70e3c4.js";import{v as m}from"./rows-62e776e0.js";import{l as b}from"./component-names-068dc2ae.js";import{s as v,a as y}from"./reuse-b66836de.js";import"./dev.utils-1ca991a2.js";import"./events-29e84d75.js";import"./associated.controller-ebcb5051.js";import"./hide-label-e6a77887.js";import"./label-20475610.js";import"./tab-index-48c227c3.js";import"./tooltip-align-6e87b293.js";import"./align-6c0a2935.js";import"./icons-e32ba753.js";import"./index-db4aa6e4.js";const g=["both","horizontal","vertical","none"];class _ extends r{constructor(e,t,n){super(e,t,n),this.afterSyncCharCounter=()=>{"string"==typeof this.component._value&&this.component._value.length>0&&(this.component.state._currentLength=this.component._value.length)},this.component=e}validateHasCounter(e){h(this.component,"_hasCounter",e,{hooks:{afterPatch:this.afterSyncCharCounter}})}validateMaxLength(e){d(this.component,"_maxLength",e,{hooks:{afterPatch:this.afterSyncCharCounter},min:0})}validatePlaceholder(e){c(this.component,"_placeholder",e)}validateReadOnly(e){h(this.component,"_readOnly",e)}validateResize(e){p(this.component,"_resize",(e=>"string"==typeof e&&g.includes(e)),new Set(`String {${g.join(", ")}`),e)}validateRequired(e){h(this.component,"_required",e)}validateRows(e){m(this.component,e)}validateValue(e){c(this.component,"_value",e,{hooks:{afterPatch:this.afterSyncCharCounter}}),this.setFormAssociatedValue(this.component._value)}componentWillLoad(){super.componentWillLoad(),this.validateHasCounter(this.component._hasCounter),this.validateMaxLength(this.component._maxLength),this.validatePlaceholder(this.component._placeholder),this.validateReadOnly(this.component._readOnly),this.validateResize(this.component._resize),this.validateRequired(this.component._required),this.validateRows(this.component._rows),this.validateValue(this.component._value)}}const w="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: 44px;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of 44px.\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n .required label > span::after,\n .required legend > span::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n input,\n textarea {\n cursor: text;\n }\n input[type=checkbox],\n input[type=color],\n input[type=file],\n input[type=radio],\n input[type=range],\n label,\n option,\n select {\n cursor: pointer;\n }\n /* input[type='checkbox'], */\n /* input[type='radio'], */\n /* input[type='range'], */\n input[type=color],\n input[type=date],\n input[type=datetime-local],\n input[type=email],\n input[type=file],\n input[type=month],\n input[type=number],\n input[type=password],\n input[type=search],\n input[type=tel],\n input[type=text],\n input[type=time],\n input[type=url],\n input[type=week],\n select,\n select[multiple] option,\n textarea {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n width: 100%;\n }\n /* needed hack for vertical alignment */\n input[type=file] {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 10) 0.5em;\n }\n /* needed hack for vertical alignment */\n select[multiple] option {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 2) 0.5em;\n }\n}\n@layer kol-component {\n .kol-input {\n display: grid;\n }\n .kol-input .input-slot {\n flex-grow: 1;\n }\n input:not([type=checkbox], [type=radio]),\n select:not([multiple], [size]) {\n height: 2.75em;\n }\n input:focus,\n option:focus,\n select:focus,\n textarea:focus {\n outline: 0;\n }\n .input {\n display: flex;\n align-items: center;\n }\n .input > .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-input.required .input-tooltip .span-label::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n}",k=w,x=e=>{e.style.overflow="hidden";const t=e.rows,n=e.clientHeight/t;e.rows=1;const i=Math.round(e.scrollHeight/n);return e.rows=t,i},z=class{async getValue(){var e;return null===(e=this.ref)||void 0===e?void 0:e.value}render(){const{ariaDescribedBy:i}=o(this.state),a=v(this.state._label);return e(n,{key:"24a6029ebb52ba8812c6a991809ef3cb08eb1aa2",class:{"kol-textarea":!0,"has-value":this.state._hasValue}},e(b,{key:"d86ab8845597fa1475b633433b5583b16a3c40de",class:{textarea:!0,"hide-label":!!this.state._hideLabel,"has-counter":!!this.state._hasCounter},_accessKey:this.state._accessKey,_alert:this.state._alert,_currentLength:this.state._currentLength,_disabled:this.state._disabled,_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,_maxLength:this.state._maxLength,_msg:this.state._msg,_readOnly:this.state._readOnly,_required:this.state._required,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched,onClick:()=>{var e;return null===(e=this.ref)||void 0===e?void 0:e.focus()},role:"presentation"},e("span",{key:"2d172fbf3d65b23d21f9c854f6773b2cc8881f06",slot:"label"},a?e("slot",{name:"expert"}):"string"==typeof this.state._accessKey?e(t,null,e(l,{accessKey:this.state._accessKey,label:this.state._label})," ",e("span",{class:"access-key-hint","aria-hidden":"true"},this.state._accessKey)):e("span",null,this.state._label)),e("div",{key:"9b94ac51bca6e7e16423728fd4ad9c57c4f3f556",slot:"input"},e("textarea",Object.assign({key:"3f1255f181f1dc35cd875aede0985de3aaec78f1",ref:this.catchRef,title:"",accessKey:this.state._accessKey,"aria-describedby":i.length>0?i.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,autoCapitalize:"off",autoCorrect:"off",disabled:this.state._disabled,id:this.state._id,maxlength:this.state._maxLength,name:this.state._name,readOnly:this.state._readOnly,required:this.state._required,rows:this.state._rows,placeholder:this.state._placeholder,spellcheck:"false"},this.controller.onFacade,{onInput:this.onInput,style:{resize:this.state._resize},value:this.state._value})))))}constructor(e){i(this,e),this.catchRef=e=>{this.ref=e,y(this.host,this.ref)},this.onInput=e=>{this.ref instanceof HTMLTextAreaElement&&(u(this,"_currentLength",this.ref.value.length),this.state._adjustHeight&&(this._rows=x(this.ref)),this.controller.onFacade.onInput(e))},this._accessKey=void 0,this._adjustHeight=!1,this._alert=!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._msg=void 0,this._name=void 0,this._on=void 0,this._placeholder=void 0,this._readOnly=!1,this._resize="vertical",this._required=!1,this._rows=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_adjustHeight:!1,_currentLength:0,_hasValue:!1,_hideError:!1,_id:`id-${s()}`,_label:"",_resize:"vertical"},this.controller=new _(this,"textarea",this.host)}validateAccessKey(e){this.controller.validateAccessKey(e)}validateAdjustHeight(e){this.controller.validateAdjustHeight(e)}validateAlert(e){this.controller.validateAlert(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateError(e){this.controller.validateError(e)}validateHasCounter(e){this.controller.validateHasCounter(e)}validateHideError(e){this.controller.validateHideError(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMaxLength(e){this.controller.validateMaxLength(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validatePlaceholder(e){this.controller.validatePlaceholder(e)}validateReadOnly(e){this.controller.validateReadOnly(e)}validateResize(e){"both"!==e&&"horizontal"!==e||f("In version 3 (v3), horizontal resizing is abolished. The corresponding property is then reduced to the properties `none` (default) and `vertical`."),this.controller.validateResize(e)}validateRequired(e){this.controller.validateRequired(e)}validateRows(e){this.controller.validateRows(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTabIndex(e){this.controller.validateTabIndex(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e)}componentDidLoad(){setTimeout((()=>{var e;!0===this._adjustHeight&&this.ref?this._rows=(null===(e=this.state)||void 0===e?void 0:e._rows)&&this.state._rows>x(this.ref)?this.state._rows:x(this.ref):this._rows||(this._rows=1)}),0)}componentWillLoad(){this._alert=!0===this._alert,this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener((e=>this.state._hasValue=!!e))}get host(){return a(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_adjustHeight:["validateAdjustHeight"],_alert:["validateAlert"],_disabled:["validateDisabled"],_error:["validateError"],_hasCounter:["validateHasCounter"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_maxLength:["validateMaxLength"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_resize:["validateResize"],_required:["validateRequired"],_rows:["validateRows"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}};z.style={default:k};export{z as kol_textarea};
4
+ import{h as e,F as t,H as n,r as i,g as a}from"./index-b5e5a1b4.js";import{n as s}from"./dev.utils-d751d0cd.js";import{g as o}from"./controller-fd9ca791.js";import{I as l}from"./InternalUnderlinedAccessKey-4607eee7.js";import{I as r}from"./controller-icon-1fda7e70.js";import{b as d,k as h,i as c,w as p,s as u,l as f}from"./prop.validators-db70e3c4.js";import{v as m}from"./rows-62e776e0.js";import{l as b}from"./component-names-068dc2ae.js";import{s as v}from"./reuse-108ee8f5.js";import"./dev.utils-1ca991a2.js";import"./events-29e84d75.js";import"./associated.controller-ebcb5051.js";import"./hide-label-e6a77887.js";import"./label-20475610.js";import"./tab-index-48c227c3.js";import"./tooltip-align-6e87b293.js";import"./align-6c0a2935.js";import"./icons-05788852.js";import"./index-db4aa6e4.js";const y=["both","horizontal","vertical","none"];class g extends r{constructor(e,t,n){super(e,t,n),this.afterSyncCharCounter=()=>{"string"==typeof this.component._value&&this.component._value.length>0&&(this.component.state._currentLength=this.component._value.length)},this.component=e}validateHasCounter(e){d(this.component,"_hasCounter",e,{hooks:{afterPatch:this.afterSyncCharCounter}})}validateMaxLength(e){h(this.component,"_maxLength",e,{hooks:{afterPatch:this.afterSyncCharCounter},min:0})}validatePlaceholder(e){c(this.component,"_placeholder",e)}validateReadOnly(e){d(this.component,"_readOnly",e)}validateResize(e){p(this.component,"_resize",(e=>"string"==typeof e&&y.includes(e)),new Set(`String {${y.join(", ")}`),e)}validateRequired(e){d(this.component,"_required",e)}validateRows(e){m(this.component,e)}validateValue(e){c(this.component,"_value",e,{hooks:{afterPatch:this.afterSyncCharCounter}}),this.setFormAssociatedValue(this.component._value)}componentWillLoad(){super.componentWillLoad(),this.validateHasCounter(this.component._hasCounter),this.validateMaxLength(this.component._maxLength),this.validatePlaceholder(this.component._placeholder),this.validateReadOnly(this.component._readOnly),this.validateResize(this.component._resize),this.validateRequired(this.component._required),this.validateRows(this.component._rows),this.validateValue(this.component._value)}}const _="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: 44px;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of 44px.\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n .required label > span::after,\n .required legend > span::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n input,\n textarea {\n cursor: text;\n }\n input[type=checkbox],\n input[type=color],\n input[type=file],\n input[type=radio],\n input[type=range],\n label,\n option,\n select {\n cursor: pointer;\n }\n /* input[type='checkbox'], */\n /* input[type='radio'], */\n /* input[type='range'], */\n input[type=color],\n input[type=date],\n input[type=datetime-local],\n input[type=email],\n input[type=file],\n input[type=month],\n input[type=number],\n input[type=password],\n input[type=search],\n input[type=tel],\n input[type=text],\n input[type=time],\n input[type=url],\n input[type=week],\n select,\n select[multiple] option,\n textarea {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n width: 100%;\n }\n /* needed hack for vertical alignment */\n input[type=file] {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 10) 0.5em;\n }\n /* needed hack for vertical alignment */\n select[multiple] option {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 2) 0.5em;\n }\n}\n@layer kol-component {\n .kol-input {\n display: grid;\n }\n .kol-input .input-slot {\n flex-grow: 1;\n }\n input:not([type=checkbox], [type=radio]),\n select:not([multiple], [size]) {\n height: 2.75em;\n }\n input:focus,\n option:focus,\n select:focus,\n textarea:focus {\n outline: 0;\n }\n .input {\n display: flex;\n align-items: center;\n }\n .input > .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-input.required .input-tooltip .span-label::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n}",w=_,k=e=>{e.style.overflow="hidden";const t=e.rows,n=e.clientHeight/t;e.rows=1;const a=Math.round(e.scrollHeight/n);return e.rows=t,a},x=class{async getValue(){var e;return null===(e=this.textareaRef)||void 0===e?void 0:e.value}async focus(){await this.kolFocus()}async kolFocus(){var e;null===(e=this.textareaRef)||void 0===e||e.focus()}render(){const{ariaDescribedBy:a}=o(this.state),i=v(this.state._label);return e(n,{key:"db199ad3fd9fae0a23f3de8b54b15a20c04a3c95",class:{"kol-textarea":!0,"has-value":this.state._hasValue}},e(b,{key:"2ef6815d8e956d0ff94b19e40bc754cb19223152",class:{textarea:!0,"hide-label":!!this.state._hideLabel,"has-counter":!!this.state._hasCounter},_accessKey:this.state._accessKey,_alert:this.state._alert,_currentLength:this.state._currentLength,_disabled:this.state._disabled,_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,_maxLength:this.state._maxLength,_msg:this.state._msg,_readOnly:this.state._readOnly,_required:this.state._required,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched,onClick:()=>{var e;return null===(e=this.textareaRef)||void 0===e?void 0:e.focus()},role:"presentation"},e("span",{key:"cdcb791763a07b2c04bd152cb02d0a3750a19420",slot:"label"},i?e("slot",{name:"expert"}):"string"==typeof this.state._accessKey?e(t,null,e(l,{accessKey:this.state._accessKey,label:this.state._label})," ",e("span",{class:"access-key-hint","aria-hidden":"true"},this.state._accessKey)):e("span",null,this.state._label)),e("div",{key:"04e8f1b97df661b5fd0b7c20f48e1ae165995223",slot:"input"},e("textarea",Object.assign({key:"0ad4e21fe58c68fb9a5007738ecc0f378cfbd08c",ref:this.catchRef,title:"",accessKey:this.state._accessKey,"aria-describedby":a.length>0?a.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,autoCapitalize:"off",autoCorrect:"off",disabled:this.state._disabled,id:this.state._id,maxlength:this.state._maxLength,name:this.state._name,readOnly:this.state._readOnly,required:this.state._required,rows:this.state._rows,placeholder:this.state._placeholder,spellcheck:"false"},this.controller.onFacade,{onInput:this.onInput,style:{resize:this.state._resize},value:this.state._value})))))}constructor(e){i(this,e),this.catchRef=e=>{this.textareaRef=e},this.onInput=e=>{this.textareaRef instanceof HTMLTextAreaElement&&(u(this,"_currentLength",this.textareaRef.value.length),this.state._adjustHeight&&(this._rows=k(this.textareaRef)),this.controller.onFacade.onInput(e))},this._accessKey=void 0,this._adjustHeight=!1,this._alert=!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._msg=void 0,this._name=void 0,this._on=void 0,this._placeholder=void 0,this._readOnly=!1,this._resize="vertical",this._required=!1,this._rows=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_adjustHeight:!1,_currentLength:0,_hasValue:!1,_hideError:!1,_id:`id-${s()}`,_label:"",_resize:"vertical"},this.controller=new g(this,"textarea",this.host)}validateAccessKey(e){this.controller.validateAccessKey(e)}validateAdjustHeight(e){this.controller.validateAdjustHeight(e)}validateAlert(e){this.controller.validateAlert(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateError(e){this.controller.validateError(e)}validateHasCounter(e){this.controller.validateHasCounter(e)}validateHideError(e){this.controller.validateHideError(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMaxLength(e){this.controller.validateMaxLength(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validatePlaceholder(e){this.controller.validatePlaceholder(e)}validateReadOnly(e){this.controller.validateReadOnly(e)}validateResize(e){"both"!==e&&"horizontal"!==e||f("In version 3 (v3), horizontal resizing is abolished. The corresponding property is then reduced to the properties `none` (default) and `vertical`."),this.controller.validateResize(e)}validateRequired(e){this.controller.validateRequired(e)}validateRows(e){this.controller.validateRows(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTabIndex(e){this.controller.validateTabIndex(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e)}componentDidLoad(){setTimeout((()=>{var e;!0===this._adjustHeight&&this.textareaRef?this._rows=(null===(e=this.state)||void 0===e?void 0:e._rows)&&this.state._rows>k(this.textareaRef)?this.state._rows:k(this.textareaRef):this._rows||(this._rows=1)}),0)}componentWillLoad(){this._alert=!0===this._alert,this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener((e=>this.state._hasValue=!!e))}get host(){return a(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_adjustHeight:["validateAdjustHeight"],_alert:["validateAlert"],_disabled:["validateDisabled"],_error:["validateError"],_hasCounter:["validateHasCounter"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_maxLength:["validateMaxLength"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_resize:["validateResize"],_required:["validateRequired"],_rows:["validateRows"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}};x.style={default:w};export{x as kol_textarea};