@public-ui/components 2.1.2 → 2.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (391) hide show
  1. package/custom-elements.json +9 -38
  2. package/dist/cjs/align-floating-elements-615a9802.js +4 -0
  3. package/dist/cjs/align-floating-elements-615a9802.js.map +1 -0
  4. package/dist/cjs/app-globals-87fb9784.js +4 -0
  5. package/dist/cjs/app-globals-87fb9784.js.map +1 -0
  6. package/dist/cjs/color-55efaf6b.js +4 -0
  7. package/dist/cjs/color-55efaf6b.js.map +1 -0
  8. package/dist/cjs/controller-815d3790.js +4 -0
  9. package/dist/cjs/controller-815d3790.js.map +1 -0
  10. package/dist/cjs/controller-e04cbd17.js +4 -0
  11. package/dist/cjs/controller-e04cbd17.js.map +1 -0
  12. package/dist/cjs/{controller-e9bd89d3.js → controller-f787d978.js} +1 -1
  13. package/dist/cjs/{controller-e9bd89d3.js.map → controller-f787d978.js.map} +1 -1
  14. package/dist/cjs/{dev.utils-6269fd5e.js → dev.utils-15a6b064.js} +1 -1
  15. package/dist/cjs/{dev.utils-6269fd5e.js.map → dev.utils-15a6b064.js.map} +1 -1
  16. package/dist/cjs/dev.utils-3e595d38.js.map +1 -1
  17. package/dist/cjs/{devtools-cfd80347.js → devtools-2e58d67d.js} +1 -1
  18. package/dist/cjs/{devtools-cfd80347.js.map → devtools-2e58d67d.js.map} +1 -1
  19. package/dist/cjs/{i18n-7734d6cc.js → i18n-86815e80.js} +1 -1
  20. package/dist/cjs/{i18n-7734d6cc.js.map → i18n-86815e80.js.map} +1 -1
  21. package/dist/cjs/i18n-bbd0642f.js +4 -0
  22. package/dist/cjs/i18n-bbd0642f.js.map +1 -0
  23. package/dist/cjs/index-b404dbee.js +1 -1
  24. package/dist/cjs/index.cjs.js +1 -1
  25. package/dist/cjs/index.cjs.js.map +1 -1
  26. package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
  27. package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
  28. package/dist/cjs/kol-alert-wc.cjs.entry.js +1 -1
  29. package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
  30. package/dist/cjs/kol-badge.cjs.entry.js +1 -1
  31. package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
  32. package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
  33. package/dist/cjs/kol-button-link.cjs.entry.js.map +1 -1
  34. package/dist/cjs/kol-button-wc.cjs.entry.js +1 -1
  35. package/dist/cjs/kol-card.cjs.entry.js +1 -1
  36. package/dist/cjs/kol-combobox.cjs.entry.js +1 -1
  37. package/dist/cjs/kol-combobox.cjs.entry.js.map +1 -1
  38. package/dist/cjs/kol-form.cjs.entry.js +1 -1
  39. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  40. package/dist/cjs/kol-input-checkbox.cjs.entry.js.map +1 -1
  41. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  42. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  43. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  44. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  45. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  46. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  47. package/dist/cjs/kol-input-password.cjs.entry.js.map +1 -1
  48. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  49. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  50. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  51. package/dist/cjs/kol-input.cjs.entry.js +1 -1
  52. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  53. package/dist/cjs/kol-link-group.cjs.entry.js +1 -1
  54. package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
  55. package/dist/cjs/kol-link.cjs.entry.js +1 -1
  56. package/dist/cjs/kol-link.cjs.entry.js.map +1 -1
  57. package/dist/cjs/kol-logo.cjs.entry.js +1 -1
  58. package/dist/cjs/kol-nav.cjs.entry.js +1 -1
  59. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  60. package/dist/cjs/kol-popover-wc.cjs.entry.js +1 -1
  61. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  62. package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
  63. package/dist/cjs/kol-span-wc.cjs.entry.js +1 -1
  64. package/dist/cjs/kol-span-wc.cjs.entry.js.map +1 -1
  65. package/dist/cjs/kol-span.cjs.entry.js +1 -1
  66. package/dist/cjs/kol-span.cjs.entry.js.map +1 -1
  67. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  68. package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
  69. package/dist/cjs/kol-symbol.cjs.entry.js +1 -1
  70. package/dist/cjs/kol-table-stateful.cjs.entry.js +1 -1
  71. package/dist/cjs/kol-table-stateless-wc.cjs.entry.js +1 -1
  72. package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
  73. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  74. package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
  75. package/dist/cjs/kol-tooltip-wc.cjs.entry.js +1 -1
  76. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  77. package/dist/cjs/kolibri.cjs.js +1 -1
  78. package/dist/cjs/kolibri.cjs.js.map +1 -1
  79. package/dist/cjs/loader.cjs.js +1 -1
  80. package/dist/cjs/loader.cjs.js.map +1 -1
  81. package/dist/cjs/unique-nav-labels-e8b42978.js +4 -0
  82. package/dist/cjs/unique-nav-labels-e8b42978.js.map +1 -0
  83. package/dist/components/align-floating-elements.js +1 -1
  84. package/dist/components/align-floating-elements.js.map +1 -1
  85. package/dist/components/color.js +1 -1
  86. package/dist/components/color.js.map +1 -1
  87. package/dist/components/controller.js +1 -1
  88. package/dist/components/controller.js.map +1 -1
  89. package/dist/components/controller5.js +1 -1
  90. package/dist/components/controller5.js.map +1 -1
  91. package/dist/components/dev.utils.js.map +1 -1
  92. package/dist/components/dev.utils2.js +1 -1
  93. package/dist/components/dev.utils2.js.map +1 -1
  94. package/dist/components/i18n.js +1 -1
  95. package/dist/components/i18n.js.map +1 -1
  96. package/dist/components/index.js +1 -1
  97. package/dist/components/index.js.map +1 -1
  98. package/dist/components/kol-button-link.js +1 -1
  99. package/dist/components/kol-button-link.js.map +1 -1
  100. package/dist/components/kol-combobox.js +1 -1
  101. package/dist/components/kol-combobox.js.map +1 -1
  102. package/dist/components/kol-input-checkbox.js +1 -1
  103. package/dist/components/kol-input-checkbox.js.map +1 -1
  104. package/dist/components/kol-input-password.js +1 -1
  105. package/dist/components/kol-input-password.js.map +1 -1
  106. package/dist/components/kol-link.js +1 -1
  107. package/dist/components/kol-link.js.map +1 -1
  108. package/dist/components/kol-span-wc.js +1 -1
  109. package/dist/components/kol-span-wc.js.map +1 -1
  110. package/dist/components/kol-span.js +1 -1
  111. package/dist/components/kol-span.js.map +1 -1
  112. package/dist/components/unique-nav-labels.js +1 -1
  113. package/dist/components/unique-nav-labels.js.map +1 -1
  114. package/dist/esm/align-floating-elements-a2bc42d2.js +4 -0
  115. package/dist/esm/align-floating-elements-a2bc42d2.js.map +1 -0
  116. package/dist/esm/app-globals-60d73ce0.js +4 -0
  117. package/dist/esm/app-globals-60d73ce0.js.map +1 -0
  118. package/dist/{cjs/color-db334198.js → esm/color-1d05d57c.js} +1 -1
  119. package/dist/esm/color-1d05d57c.js.map +1 -0
  120. package/dist/esm/{controller-c1cc25c9.js → controller-65e00bdd.js} +1 -1
  121. package/dist/esm/{controller-c1cc25c9.js.map → controller-65e00bdd.js.map} +1 -1
  122. package/dist/esm/controller-a3ede655.js +4 -0
  123. package/dist/esm/controller-a3ede655.js.map +1 -0
  124. package/dist/esm/controller-b76f9bb2.js +4 -0
  125. package/dist/esm/controller-b76f9bb2.js.map +1 -0
  126. package/dist/esm/dev.utils-1ca991a2.js.map +1 -1
  127. package/dist/esm/{dev.utils-eeeb0158.js → dev.utils-698b2d79.js} +1 -1
  128. package/dist/esm/{dev.utils-eeeb0158.js.map → dev.utils-698b2d79.js.map} +1 -1
  129. package/dist/esm/{devtools-a014b26f.js → devtools-8e11b70a.js} +1 -1
  130. package/dist/esm/{devtools-a014b26f.js.map → devtools-8e11b70a.js.map} +1 -1
  131. package/dist/esm/i18n-112381e9.js +4 -0
  132. package/dist/esm/{i18n-342bc196.js.map → i18n-112381e9.js.map} +1 -1
  133. package/dist/esm/i18n-66b52d13.js +4 -0
  134. package/dist/esm/i18n-66b52d13.js.map +1 -0
  135. package/dist/esm/index-360ad69b.js +1 -1
  136. package/dist/esm/index.js +1 -1
  137. package/dist/esm/index.js.map +1 -1
  138. package/dist/esm/kol-abbr.entry.js +1 -1
  139. package/dist/esm/kol-accordion.entry.js +1 -1
  140. package/dist/esm/kol-alert-wc.entry.js +1 -1
  141. package/dist/esm/kol-avatar-wc.entry.js +1 -1
  142. package/dist/esm/kol-badge.entry.js +1 -1
  143. package/dist/esm/kol-breadcrumb.entry.js +1 -1
  144. package/dist/esm/kol-button-link.entry.js +1 -1
  145. package/dist/esm/kol-button-link.entry.js.map +1 -1
  146. package/dist/esm/kol-button-wc.entry.js +1 -1
  147. package/dist/esm/kol-card.entry.js +1 -1
  148. package/dist/esm/kol-combobox.entry.js +1 -1
  149. package/dist/esm/kol-combobox.entry.js.map +1 -1
  150. package/dist/esm/kol-form.entry.js +1 -1
  151. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  152. package/dist/esm/kol-input-checkbox.entry.js.map +1 -1
  153. package/dist/esm/kol-input-color.entry.js +1 -1
  154. package/dist/esm/kol-input-date.entry.js +1 -1
  155. package/dist/esm/kol-input-email.entry.js +1 -1
  156. package/dist/esm/kol-input-file.entry.js +1 -1
  157. package/dist/esm/kol-input-number.entry.js +1 -1
  158. package/dist/esm/kol-input-password.entry.js +1 -1
  159. package/dist/esm/kol-input-password.entry.js.map +1 -1
  160. package/dist/esm/kol-input-radio.entry.js +1 -1
  161. package/dist/esm/kol-input-range.entry.js +1 -1
  162. package/dist/esm/kol-input-text.entry.js +1 -1
  163. package/dist/esm/kol-input.entry.js +1 -1
  164. package/dist/esm/kol-kolibri.entry.js +1 -1
  165. package/dist/esm/kol-link-group.entry.js +1 -1
  166. package/dist/esm/kol-link-wc.entry.js +1 -1
  167. package/dist/esm/kol-link.entry.js +1 -1
  168. package/dist/esm/kol-link.entry.js.map +1 -1
  169. package/dist/esm/kol-logo.entry.js +1 -1
  170. package/dist/esm/kol-nav.entry.js +1 -1
  171. package/dist/esm/kol-pagination.entry.js +1 -1
  172. package/dist/esm/kol-popover-wc.entry.js +1 -1
  173. package/dist/esm/kol-select.entry.js +1 -1
  174. package/dist/esm/kol-skip-nav.entry.js +1 -1
  175. package/dist/esm/kol-span-wc.entry.js +1 -1
  176. package/dist/esm/kol-span-wc.entry.js.map +1 -1
  177. package/dist/esm/kol-span.entry.js +1 -1
  178. package/dist/esm/kol-span.entry.js.map +1 -1
  179. package/dist/esm/kol-spin.entry.js +1 -1
  180. package/dist/esm/kol-split-button.entry.js +1 -1
  181. package/dist/esm/kol-symbol.entry.js +1 -1
  182. package/dist/esm/kol-table-stateful.entry.js +1 -1
  183. package/dist/esm/kol-table-stateless-wc.entry.js +1 -1
  184. package/dist/esm/kol-tabs.entry.js +1 -1
  185. package/dist/esm/kol-textarea.entry.js +1 -1
  186. package/dist/esm/kol-toast-container.entry.js +1 -1
  187. package/dist/esm/kol-tooltip-wc.entry.js +1 -1
  188. package/dist/esm/kol-version.entry.js +1 -1
  189. package/dist/esm/kolibri.js +1 -1
  190. package/dist/esm/kolibri.js.map +1 -1
  191. package/dist/esm/loader.js +1 -1
  192. package/dist/esm/loader.js.map +1 -1
  193. package/dist/esm/unique-nav-labels-29aef441.js +4 -0
  194. package/dist/esm/unique-nav-labels-29aef441.js.map +1 -0
  195. package/dist/kolibri/align-floating-elements-a2bc42d2.js +4 -0
  196. package/dist/kolibri/align-floating-elements-a2bc42d2.js.map +1 -0
  197. package/dist/kolibri/app-globals-60d73ce0.js +4 -0
  198. package/dist/kolibri/app-globals-60d73ce0.js.map +1 -0
  199. package/dist/kolibri/color-1d05d57c.js +4 -0
  200. package/dist/kolibri/color-1d05d57c.js.map +1 -0
  201. package/dist/kolibri/{controller-c1cc25c9.js → controller-65e00bdd.js} +1 -1
  202. package/dist/kolibri/controller-a3ede655.js +4 -0
  203. package/dist/kolibri/controller-a3ede655.js.map +1 -0
  204. package/dist/kolibri/controller-b76f9bb2.js +4 -0
  205. package/dist/kolibri/controller-b76f9bb2.js.map +1 -0
  206. package/dist/kolibri/dev.utils-1ca991a2.js.map +1 -1
  207. package/dist/kolibri/dev.utils-698b2d79.js +4 -0
  208. package/dist/kolibri/{dev.utils-eeeb0158.js.map → dev.utils-698b2d79.js.map} +1 -1
  209. package/dist/kolibri/{devtools-a014b26f.js → devtools-8e11b70a.js} +1 -1
  210. package/dist/kolibri/i18n-112381e9.js +4 -0
  211. package/dist/kolibri/i18n-66b52d13.js +4 -0
  212. package/dist/kolibri/i18n-66b52d13.js.map +1 -0
  213. package/dist/kolibri/index.esm.js +1 -1
  214. package/dist/kolibri/index.esm.js.map +1 -1
  215. package/dist/kolibri/kol-abbr.entry.js +1 -1
  216. package/dist/kolibri/kol-accordion.entry.js +1 -1
  217. package/dist/kolibri/kol-alert-wc.entry.js +1 -1
  218. package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
  219. package/dist/kolibri/kol-badge.entry.js +1 -1
  220. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  221. package/dist/kolibri/kol-button-link.entry.js +1 -1
  222. package/dist/kolibri/kol-button-link.entry.js.map +1 -1
  223. package/dist/kolibri/kol-button-wc.entry.js +1 -1
  224. package/dist/kolibri/kol-card.entry.js +1 -1
  225. package/dist/kolibri/kol-combobox.entry.js +1 -1
  226. package/dist/kolibri/kol-combobox.entry.js.map +1 -1
  227. package/dist/kolibri/kol-form.entry.js +1 -1
  228. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  229. package/dist/kolibri/kol-input-checkbox.entry.js.map +1 -1
  230. package/dist/kolibri/kol-input-color.entry.js +1 -1
  231. package/dist/kolibri/kol-input-date.entry.js +1 -1
  232. package/dist/kolibri/kol-input-email.entry.js +1 -1
  233. package/dist/kolibri/kol-input-file.entry.js +1 -1
  234. package/dist/kolibri/kol-input-number.entry.js +1 -1
  235. package/dist/kolibri/kol-input-password.entry.js +1 -1
  236. package/dist/kolibri/kol-input-password.entry.js.map +1 -1
  237. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  238. package/dist/kolibri/kol-input-range.entry.js +1 -1
  239. package/dist/kolibri/kol-input-text.entry.js +1 -1
  240. package/dist/kolibri/kol-input.entry.js +1 -1
  241. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  242. package/dist/kolibri/kol-link-group.entry.js +1 -1
  243. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  244. package/dist/kolibri/kol-link.entry.js +1 -1
  245. package/dist/kolibri/kol-link.entry.js.map +1 -1
  246. package/dist/kolibri/kol-logo.entry.js +1 -1
  247. package/dist/kolibri/kol-nav.entry.js +1 -1
  248. package/dist/kolibri/kol-pagination.entry.js +1 -1
  249. package/dist/kolibri/kol-popover-wc.entry.js +1 -1
  250. package/dist/kolibri/kol-select.entry.js +1 -1
  251. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  252. package/dist/kolibri/kol-span-wc.entry.js +1 -1
  253. package/dist/kolibri/kol-span-wc.entry.js.map +1 -1
  254. package/dist/kolibri/kol-span.entry.js +1 -1
  255. package/dist/kolibri/kol-span.entry.js.map +1 -1
  256. package/dist/kolibri/kol-spin.entry.js +1 -1
  257. package/dist/kolibri/kol-split-button.entry.js +1 -1
  258. package/dist/kolibri/kol-symbol.entry.js +1 -1
  259. package/dist/kolibri/kol-table-stateful.entry.js +1 -1
  260. package/dist/kolibri/kol-table-stateless-wc.entry.js +1 -1
  261. package/dist/kolibri/kol-tabs.entry.js +1 -1
  262. package/dist/kolibri/kol-textarea.entry.js +1 -1
  263. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  264. package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
  265. package/dist/kolibri/kol-version.entry.js +1 -1
  266. package/dist/kolibri/kolibri.esm.js +1 -1
  267. package/dist/kolibri/kolibri.esm.js.map +1 -1
  268. package/dist/kolibri/unique-nav-labels-29aef441.js +4 -0
  269. package/dist/kolibri/unique-nav-labels-29aef441.js.map +1 -0
  270. package/dist/types/components/input-checkbox/shadow.d.ts +2 -2
  271. package/dist/types/components/input-password/controller.d.ts +2 -0
  272. package/dist/types/components/input-password/shadow.d.ts +4 -0
  273. package/dist/types/components.d.ts +11 -1
  274. package/dist/types/locales/de.d.ts +2 -0
  275. package/dist/types/locales/en.d.ts +2 -0
  276. package/dist/types/schema/components/input-password.d.ts +3 -2
  277. package/dist/types/schema/props/variant/password-variant.d.ts +8 -0
  278. package/doc/input-checkbox.md +2 -2
  279. package/doc/input-date.md +7 -7
  280. package/doc/input-password.md +1 -0
  281. package/doc/span.md +1 -5
  282. package/package.json +1 -1
  283. package/vscode-custom-data.json +12 -25
  284. package/dist/cjs/align-floating-elements-915d7026.js +0 -4
  285. package/dist/cjs/align-floating-elements-915d7026.js.map +0 -1
  286. package/dist/cjs/app-globals-d8811028.js +0 -4
  287. package/dist/cjs/app-globals-d8811028.js.map +0 -1
  288. package/dist/cjs/color-db334198.js.map +0 -1
  289. package/dist/cjs/controller-0bd89e13.js +0 -4
  290. package/dist/cjs/controller-0bd89e13.js.map +0 -1
  291. package/dist/cjs/controller-586919c6.js +0 -4
  292. package/dist/cjs/controller-586919c6.js.map +0 -1
  293. package/dist/cjs/details-synced-open-state-e88811c7.js +0 -4
  294. package/dist/cjs/details-synced-open-state-e88811c7.js.map +0 -1
  295. package/dist/cjs/i18n-b542daad.js +0 -4
  296. package/dist/cjs/i18n-b542daad.js.map +0 -1
  297. package/dist/cjs/index-ba8af7c0.js +0 -4
  298. package/dist/cjs/index-ba8af7c0.js.map +0 -1
  299. package/dist/cjs/input-error-ac3a12f5.js +0 -4
  300. package/dist/cjs/input-error-ac3a12f5.js.map +0 -1
  301. package/dist/cjs/reprod-accordion-does-not-toggle-with-open-092e559d.js +0 -4
  302. package/dist/cjs/reprod-accordion-does-not-toggle-with-open-092e559d.js.map +0 -1
  303. package/dist/cjs/table-render-function-7d9ebadc.js +0 -4
  304. package/dist/cjs/table-render-function-7d9ebadc.js.map +0 -1
  305. package/dist/cjs/toaster-4691f9e0.js +0 -4
  306. package/dist/cjs/toaster-4691f9e0.js.map +0 -1
  307. package/dist/cjs/toaster-b20f853f.js +0 -4
  308. package/dist/cjs/toaster-b20f853f.js.map +0 -1
  309. package/dist/cjs/unique-nav-labels-363e1d71.js +0 -4
  310. package/dist/cjs/unique-nav-labels-363e1d71.js.map +0 -1
  311. package/dist/components/details-synced-open-state.js +0 -4
  312. package/dist/components/details-synced-open-state.js.map +0 -1
  313. package/dist/components/index2.js +0 -4
  314. package/dist/components/index2.js.map +0 -1
  315. package/dist/components/input-error.js +0 -4
  316. package/dist/components/input-error.js.map +0 -1
  317. package/dist/components/reprod-accordion-does-not-toggle-with-open.js +0 -4
  318. package/dist/components/reprod-accordion-does-not-toggle-with-open.js.map +0 -1
  319. package/dist/components/table-render-function.js +0 -4
  320. package/dist/components/table-render-function.js.map +0 -1
  321. package/dist/components/toaster.js +0 -4
  322. package/dist/components/toaster.js.map +0 -1
  323. package/dist/esm/align-floating-elements-1c3e002c.js +0 -4
  324. package/dist/esm/align-floating-elements-1c3e002c.js.map +0 -1
  325. package/dist/esm/app-globals-c0120fb2.js +0 -4
  326. package/dist/esm/app-globals-c0120fb2.js.map +0 -1
  327. package/dist/esm/color-e0b3e0c8.js +0 -4
  328. package/dist/esm/color-e0b3e0c8.js.map +0 -1
  329. package/dist/esm/controller-279935b0.js +0 -4
  330. package/dist/esm/controller-279935b0.js.map +0 -1
  331. package/dist/esm/controller-f204bd94.js +0 -4
  332. package/dist/esm/controller-f204bd94.js.map +0 -1
  333. package/dist/esm/details-synced-open-state-45ecc035.js +0 -4
  334. package/dist/esm/details-synced-open-state-45ecc035.js.map +0 -1
  335. package/dist/esm/i18n-342bc196.js +0 -4
  336. package/dist/esm/i18n-ebe0c4cb.js +0 -4
  337. package/dist/esm/i18n-ebe0c4cb.js.map +0 -1
  338. package/dist/esm/index-fc91b59f.js +0 -4
  339. package/dist/esm/index-fc91b59f.js.map +0 -1
  340. package/dist/esm/input-error-bc5a177b.js +0 -4
  341. package/dist/esm/input-error-bc5a177b.js.map +0 -1
  342. package/dist/esm/reprod-accordion-does-not-toggle-with-open-930fccf8.js +0 -4
  343. package/dist/esm/reprod-accordion-does-not-toggle-with-open-930fccf8.js.map +0 -1
  344. package/dist/esm/table-render-function-835a18a0.js +0 -4
  345. package/dist/esm/table-render-function-835a18a0.js.map +0 -1
  346. package/dist/esm/toaster-2a2c09ae.js +0 -4
  347. package/dist/esm/toaster-2a2c09ae.js.map +0 -1
  348. package/dist/esm/toaster-3755abc8.js +0 -4
  349. package/dist/esm/toaster-3755abc8.js.map +0 -1
  350. package/dist/esm/unique-nav-labels-62d9802d.js +0 -4
  351. package/dist/esm/unique-nav-labels-62d9802d.js.map +0 -1
  352. package/dist/kolibri/align-floating-elements-1c3e002c.js +0 -4
  353. package/dist/kolibri/align-floating-elements-1c3e002c.js.map +0 -1
  354. package/dist/kolibri/app-globals-c0120fb2.js +0 -4
  355. package/dist/kolibri/app-globals-c0120fb2.js.map +0 -1
  356. package/dist/kolibri/color-e0b3e0c8.js +0 -4
  357. package/dist/kolibri/color-e0b3e0c8.js.map +0 -1
  358. package/dist/kolibri/controller-279935b0.js +0 -4
  359. package/dist/kolibri/controller-279935b0.js.map +0 -1
  360. package/dist/kolibri/controller-f204bd94.js +0 -4
  361. package/dist/kolibri/controller-f204bd94.js.map +0 -1
  362. package/dist/kolibri/details-synced-open-state-45ecc035.js +0 -4
  363. package/dist/kolibri/details-synced-open-state-45ecc035.js.map +0 -1
  364. package/dist/kolibri/dev.utils-eeeb0158.js +0 -4
  365. package/dist/kolibri/i18n-342bc196.js +0 -4
  366. package/dist/kolibri/i18n-ebe0c4cb.js +0 -4
  367. package/dist/kolibri/i18n-ebe0c4cb.js.map +0 -1
  368. package/dist/kolibri/index-fc91b59f.js +0 -4
  369. package/dist/kolibri/index-fc91b59f.js.map +0 -1
  370. package/dist/kolibri/input-error-bc5a177b.js +0 -4
  371. package/dist/kolibri/input-error-bc5a177b.js.map +0 -1
  372. package/dist/kolibri/reprod-accordion-does-not-toggle-with-open-930fccf8.js +0 -4
  373. package/dist/kolibri/reprod-accordion-does-not-toggle-with-open-930fccf8.js.map +0 -1
  374. package/dist/kolibri/table-render-function-835a18a0.js +0 -4
  375. package/dist/kolibri/table-render-function-835a18a0.js.map +0 -1
  376. package/dist/kolibri/toaster-2a2c09ae.js +0 -4
  377. package/dist/kolibri/toaster-2a2c09ae.js.map +0 -1
  378. package/dist/kolibri/toaster-3755abc8.js +0 -4
  379. package/dist/kolibri/toaster-3755abc8.js.map +0 -1
  380. package/dist/kolibri/unique-nav-labels-62d9802d.js +0 -4
  381. package/dist/kolibri/unique-nav-labels-62d9802d.js.map +0 -1
  382. package/dist/types/dev/details-synced-open-state.d.ts +0 -2
  383. package/dist/types/dev/index.d.ts +0 -1
  384. package/dist/types/dev/input-error.d.ts +0 -2
  385. package/dist/types/dev/reprod-accordion-does-not-toggle-with-open.d.ts +0 -2
  386. package/dist/types/dev/table-render-function.d.ts +0 -1
  387. package/dist/types/dev/theme-registration.d.ts +0 -1
  388. package/dist/types/dev/toaster.d.ts +0 -1
  389. /package/dist/kolibri/{controller-c1cc25c9.js.map → controller-65e00bdd.js.map} +0 -0
  390. /package/dist/kolibri/{devtools-a014b26f.js.map → devtools-8e11b70a.js.map} +0 -0
  391. /package/dist/kolibri/{i18n-342bc196.js.map → i18n-112381e9.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}from"./index-360ad69b.js";import{f as t}from"./component-names-e522484e.js";const i="/*\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 font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n}",o=i,a=class{constructor(e){n(this,e),this._accessKey=void 0,this._hideLabel=!1,this._icons=void 0,this._label=void 0}render(){return e(t,{key:"cf6430c21810815728c580cda86f135c612f4c16",_icons:this._icons,_hideLabel:this._hideLabel,_label:this._label,_accessKey:this._accessKey,class:"kol-span"},e("slot",{key:"a1f203c73055c186ef7fb2d1bf6b6da09f6b5024",name:"expert",slot:"expert"}))}};a.style={default:o};export{a as kol_span};
4
+ import{r as n,h as e}from"./index-360ad69b.js";import{f as t}from"./component-names-e522484e.js";const i="/*\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 font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n}",o=i,a=class{constructor(e){n(this,e),this._accessKey=void 0,this._hideLabel=!1,this._icons=void 0,this._label=void 0}render(){return e(t,{key:"aa8c68dc9fc5c921ea83934e3345b9aa93c9dab9",_icons:this._icons,_hideLabel:this._hideLabel,_label:this._label,_accessKey:this._accessKey,class:"kol-span"},e("slot",{key:"623ac84ad57ea1f411ea530e40957a36f29f7125",name:"expert",slot:"expert"}))}};a.style={default:o};export{a as kol_span};
@@ -1 +1 @@
1
- {"version":3,"names":["defaultStyleCss","KolSpanDefaultStyle0","KolSpan","render","h","KolSpanWcTag","key","_icons","this","_hideLabel","_label","_accessKey","class","name","slot"],"sources":["src/components/span/style.scss?tag=kol-span&mode=default&encapsulation=shadow","src/components/span/shadow.tsx"],"sourcesContent":["@import '../style';\n@import '../@shared/mixins';\n\n@layer kol-component {\n\t:host {\n\t\tfont-size: rem(16);\n\t}\n}\n","import type { AccessKeyPropType, KoliBriIconsProp, LabelWithExpertSlotPropType, SpanProps, Stringified } from '../../schema';\nimport type { JSX } from '@stencil/core';\nimport { Component, h, Prop } from '@stencil/core';\nimport { KolSpanWcTag } from '../../core/component-names';\n\n@Component({\n\ttag: 'kol-span',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: true,\n})\nexport class KolSpan implements SpanProps {\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<KolSpanWcTag _icons={this._icons} _hideLabel={this._hideLabel} _label={this._label} _accessKey={this._accessKey} class=\"kol-span\">\n\t\t\t\t<slot name=\"expert\" slot=\"expert\"></slot>\n\t\t\t</KolSpanWcTag>\n\t\t);\n\t}\n\n\t/**\n\t * Defines the elements access key.\n\t */\n\t@Prop() public _accessKey?: AccessKeyPropType;\n\n\t/**\n\t * Hides the caption by default and displays the caption text with a tooltip when the\n\t * interactive element is focused or the mouse is over it.\n\t * @TODO: Change type back to `HideLabelPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hideLabel?: boolean = false;\n\n\t/**\n\t * Defines the g classnames (e.g. `_icons=\"fa-solid fa-user\"`).\n\t */\n\t@Prop() public _icons?: Stringified<KoliBriIconsProp>;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.). Set to `false` to enable the expert slot.\n\t */\n\t@Prop() public _label!: LabelWithExpertSlotPropType;\n}\n"],"mappings":";;;iGAAA,MAAMA,EAAkB,4kIACxB,MAAAC,EAAeD,E,MCWFE,EAAO,M,mEAmBmB,M,4CAlB/B,MAAAC,GACN,OACCC,EAACC,EAAY,CAAAC,IAAA,2CAACC,OAAQC,KAAKD,OAAQE,WAAYD,KAAKC,WAAYC,OAAQF,KAAKE,OAAQC,WAAYH,KAAKG,WAAYC,MAAM,YACvHR,EAAA,QAAAE,IAAA,2CAAMO,KAAK,SAASC,KAAK,W","ignoreList":[]}
1
+ {"version":3,"names":["defaultStyleCss","KolSpanDefaultStyle0","KolSpan","render","h","KolSpanWcTag","key","_icons","this","_hideLabel","_label","_accessKey","class","name","slot"],"sources":["src/components/span/style.scss?tag=kol-span&mode=default&encapsulation=shadow","src/components/span/shadow.tsx"],"sourcesContent":["@import '../style';\n@import '../@shared/mixins';\n\n@layer kol-component {\n\t:host {\n\t\tfont-size: rem(16);\n\t}\n}\n","import type { AccessKeyPropType, KoliBriIconsProp, LabelWithExpertSlotPropType, SpanProps, Stringified } from '../../schema';\nimport type { JSX } from '@stencil/core';\nimport { Component, h, Prop } from '@stencil/core';\nimport { KolSpanWcTag } from '../../core/component-names';\n\n/**\n * @internal\n */\n@Component({\n\ttag: 'kol-span',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: true,\n})\nexport class KolSpan implements SpanProps {\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<KolSpanWcTag _icons={this._icons} _hideLabel={this._hideLabel} _label={this._label} _accessKey={this._accessKey} class=\"kol-span\">\n\t\t\t\t<slot name=\"expert\" slot=\"expert\"></slot>\n\t\t\t</KolSpanWcTag>\n\t\t);\n\t}\n\n\t/**\n\t * Defines the elements access key.\n\t */\n\t@Prop() public _accessKey?: AccessKeyPropType;\n\n\t/**\n\t * Hides the caption by default and displays the caption text with a tooltip when the\n\t * interactive element is focused or the mouse is over it.\n\t * @TODO: Change type back to `HideLabelPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hideLabel?: boolean = false;\n\n\t/**\n\t * Defines the g classnames (e.g. `_icons=\"fa-solid fa-user\"`).\n\t */\n\t@Prop() public _icons?: Stringified<KoliBriIconsProp>;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.). Set to `false` to enable the expert slot.\n\t */\n\t@Prop() public _label!: LabelWithExpertSlotPropType;\n}\n"],"mappings":";;;iGAAA,MAAMA,EAAkB,4kIACxB,MAAAC,EAAeD,E,MCcFE,EAAO,M,mEAmBmB,M,4CAlB/B,MAAAC,GACN,OACCC,EAACC,EAAY,CAAAC,IAAA,2CAACC,OAAQC,KAAKD,OAAQE,WAAYD,KAAKC,WAAYC,OAAQF,KAAKE,OAAQC,WAAYH,KAAKG,WAAYC,MAAM,YACvHR,EAAA,QAAAE,IAAA,2CAAMO,KAAK,SAASC,KAAK,W","ignoreList":[]}
@@ -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-360ad69b.js";import{t as o}from"./i18n-342bc196.js";import{v as a}from"./show-6b87e4e7.js";import{w as r}from"./prop.validators-f2b9a155.js";import"./i18n-ebe0c4cb.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:"6974287d918166c7f954447289a132cd48605222",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-360ad69b.js";import{t as o}from"./i18n-112381e9.js";import{v as a}from"./show-6b87e4e7.js";import{w as r}from"./prop.validators-f2b9a155.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:"6974287d918166c7f954447289a132cd48605222",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-360ad69b.js";import{t as i}from"./i18n-342bc196.js";import{c as s}from"./component-names-e522484e.js";import"./i18n-ebe0c4cb.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:"5a64a4a751b51c8852063bc917c1bbf986bca867",class:"kol-split-button"},e(s,{key:"ab8baa7f5a5f4de4d0bf79c8d8d5376640cdb516",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:"246e21fea2320d7a1c6e53ed54d17515a53ba8c8",class:"horizontal-line"}),e(s,{key:"ca5f0ba735ac3638cc7256c7a7cd8fc7ab9d3fc6",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:"9855493347ef418b84ba215bcb7f32170a09f140",class:"popover",ref:this.catchDropdownElements},e("div",{key:"f476df593c9956b8262510944c57c99f1bead60d",class:"popover-content"},e("slot",{key:"7021bef08ce563c515e416b35f8f84b6a7acd05c"}))))}};l.style={default:a};export{l as kol_split_button};
4
+ import{r as n,h as e,H as t}from"./index-360ad69b.js";import{t as i}from"./i18n-112381e9.js";import{c as s}from"./component-names-e522484e.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:"5a64a4a751b51c8852063bc917c1bbf986bca867",class:"kol-split-button"},e(s,{key:"ab8baa7f5a5f4de4d0bf79c8d8d5376640cdb516",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:"246e21fea2320d7a1c6e53ed54d17515a53ba8c8",class:"horizontal-line"}),e(s,{key:"ca5f0ba735ac3638cc7256c7a7cd8fc7ab9d3fc6",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:"9855493347ef418b84ba215bcb7f32170a09f140",class:"popover",ref:this.catchDropdownElements},e("div",{key:"f476df593c9956b8262510944c57c99f1bead60d",class:"popover-content"},e("slot",{key:"7021bef08ce563c515e416b35f8f84b6a7acd05c"}))))}};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 a,H as s}from"./index-360ad69b.js";import{t}from"./i18n-342bc196.js";import{v as i}from"./label-452f8c01.js";import{i as r}from"./prop.validators-f2b9a155.js";import"./i18n-ebe0c4cb.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 a(s,{key:"34b75c8f44124c57103e84e6f4f33ed6df1fe998",class:"kol-symbol"},a("span",{key:"57a61aba5a3b316f0ef65a4685ac2e7eed690c28","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-360ad69b.js";import{t}from"./i18n-112381e9.js";import{v as i}from"./label-452f8c01.js";import{i as r}from"./prop.validators-f2b9a155.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 a(s,{key:"34b75c8f44124c57103e84e6f4f33ed6df1fe998",class:"kol-symbol"},a("span",{key:"57a61aba5a3b316f0ef65a4685ac2e7eed690c28","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-360ad69b.js";import{t as o}from"./i18n-342bc196.js";import{t as s,r as a}from"./component-names-e522484e.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-591d4fd4.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-f2b9a155.js";import{v as w}from"./label-452f8c01.js";import"./i18n-ebe0c4cb.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:"1b708cf8d4e845cbd3da29af7168797551384fb9",class:"kol-table-stateful"},this.pageEndSlice>0&&this.showPagination&&r,n(a,{key:"d637bc683f7424ee753d43fe37dd557706fccf53",_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-360ad69b.js";import{t as o}from"./i18n-112381e9.js";import{t as s,r as a}from"./component-names-e522484e.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-591d4fd4.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-f2b9a155.js";import{v as w}from"./label-452f8c01.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:"1b708cf8d4e845cbd3da29af7168797551384fb9",class:"kol-table-stateful"},this.pageEndSlice>0&&this.showPagination&&r,n(a,{key:"d637bc683f7424ee753d43fe37dd557706fccf53",_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-360ad69b.js";import{x as n,c as o}from"./component-names-e522484e.js";import{t as a}from"./i18n-342bc196.js";import{t as l}from"./events-29e84d75.js";import{n as r}from"./dev.utils-eeeb0158.js";import{t as d,o as c,p as h,w as f,i as u}from"./prop.validators-f2b9a155.js";import{v as p,a as v,d as b,b as y,E as m}from"./events-591d4fd4.js";import{v as g}from"./label-452f8c01.js";import"./i18n-ebe0c4cb.js";import"./reuse-b66836de.js";import"./dev.utils-1ca991a2.js";import"./index-db4aa6e4.js";const j=(e,t)=>{d(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){p(this,e,{beforePatch:e=>{this.updateDataToKeyMap(e)}})}validateDataFoot(e){v(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){b(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,r())})),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:"33fc600ca5f34f725c8a8ac2317f05439340af2b",class:"kol-table-stateless-wc"},e("div",{key:"1d5dd8a0550ff4f8f5866993b93b76e4e924f701",ref:e=>this.tableDivElement=e,class:"table",tabindex:this.tableDivElementHasScrollbar?"-1":void 0},e("table",{key:"97a3816305dd524228c9c28643304d5e917fb534",style:{minWidth:this.state._minWidth}},e("div",{key:"522d0e75341549acd73f030214c11414de84a503",class:"focus-element",tabindex:this.tableDivElementHasScrollbar?"0":void 0,"aria-describedby":"caption"}," "),e("caption",{key:"f347a07003b51573ba371bc0c2f3263bcf100ed9",id:"caption"},this.state._label),Array.isArray(this.state._headerCells.horizontal)&&e("thead",{key:"883c146a5a9125831c017b2c379d4ee48d468028"},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:"8a377a47f856dc735014473c4f321873a40a6d5c"},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-360ad69b.js";import{x as n,c as o}from"./component-names-e522484e.js";import{t as a}from"./i18n-112381e9.js";import{t as l}from"./events-29e84d75.js";import{n as d}from"./dev.utils-698b2d79.js";import{t as r,o as c,p as h,w as f,i as u}from"./prop.validators-f2b9a155.js";import{v as p,a as v,d as b,b as y,E as m}from"./events-591d4fd4.js";import{v as g}from"./label-452f8c01.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){p(this,e,{beforePatch:e=>{this.updateDataToKeyMap(e)}})}validateDataFoot(e){v(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){b(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:"33fc600ca5f34f725c8a8ac2317f05439340af2b",class:"kol-table-stateless-wc"},e("div",{key:"1d5dd8a0550ff4f8f5866993b93b76e4e924f701",ref:e=>this.tableDivElement=e,class:"table",tabindex:this.tableDivElementHasScrollbar?"-1":void 0},e("table",{key:"97a3816305dd524228c9c28643304d5e917fb534",style:{minWidth:this.state._minWidth}},e("div",{key:"522d0e75341549acd73f030214c11414de84a503",class:"focus-element",tabindex:this.tableDivElementHasScrollbar?"0":void 0,"aria-describedby":"caption"}," "),e("caption",{key:"f347a07003b51573ba371bc0c2f3263bcf100ed9",id:"caption"},this.state._label),Array.isArray(this.state._headerCells.horizontal)&&e("thead",{key:"883c146a5a9125831c017b2c379d4ee48d468028"},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:"8a377a47f856dc735014473c4f321873a40a6d5c"},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 t,H as i,g as e}from"./index-360ad69b.js";import{t as o}from"./i18n-342bc196.js";import{c as s,i as a}from"./component-names-e522484e.js";import{a as l}from"./align-6595a6d6.js";import{j as r,f as d,s as h,k as b,g as c,h as u,v as f}from"./prop.validators-f2b9a155.js";import{v as p}from"./label-452f8c01.js";import{L as g}from"./dev.utils-1ca991a2.js";import"./i18n-ebe0c4cb.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 a=null;switch(t.key){case"ArrowRight":a=this.nextPossibleTabIndex(this.state._tabs,this.state._selected,1);break;case"ArrowLeft":a=this.nextPossibleTabIndex(this.state._tabs,this.state._selected,-1)}if(null!==a){const i=this.state._tabs[a];(null===(e=i._on)||void 0===e?void 0:e.onSelect)&&(null===(n=i._on)||void 0===n||n.onSelect(t,a)),this.onSelect(t,a)}},this.onClickSelect=(t,e)=>{var n,a;const i=this.state._tabs[e];(null===(n=i._on)||void 0===n?void 0:n.onSelect)&&(null===(a=i._on)||void 0===a||a.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,a)=>{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,a||t);t=a||t,n=!1}if(!1===n){if(t>0)return this.selectNextNotDisabledTab(t-1,e,!1,a||t);r("[KolTabs] Alle Tabs sind deaktiviert und somit kann kein Tab angezeigt werden.")}}return t},this.syncSelectedAndTabs=(t,e,n,a)=>{let i,o;i="_selected"===a?t:this.state._selected,o="_tabs"===a?t:this.state._tabs,o.length>0&&e.set("_selected",this.selectNextNotDisabledTab(i,o))},this.handleTabPanels=()=>{var t,e,n;if(this.tabPanelHost instanceof HTMLDivElement)for(let a=this.tabPanelHost.children.length;a<this.state._tabs.length;a++){const i=document.createElement("div");i.setAttribute("aria-labelledby",`${this.state._label.replace(/\s/g,"-")}-tab-${a}`),i.setAttribute("id",`tabpanel-${a}`),i.setAttribute("role","tabpanel"),i.setAttribute("hidden","");const o=document.createElement("slot");o.setAttribute("name",`tabpanel-slot-${a}`),i.appendChild(o),this.tabPanelHost.appendChild(i),(null===(t=this.host)||void 0===t?void 0:t.children)instanceof HTMLCollection&&(null===(e=this.host)||void 0===e?void 0:e.children[a])&&(null===(n=this.host)||void 0===n||n.children[a].setAttribute("slot",`tabpanel-slot-${a}`))}},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:"668b8fe78f5053ce356e685104518338aa9f73b9",class:"kol-tabs"},t("div",{key:"5845ac11d2ebf8abe1e515aea9f9c68c56ee9a57",ref:t=>{this.tabPanelsElement=t},class:{[`tabs-align-${this.state._align}`]:!0}},this.renderButtonGroup(),t("div",{key:"67ef993b870a8ff374c2cc4f750de970d578edea",class:"tabs-content",ref:this.catchTabPanelHost})))}validateAlign(t){l(this,t)}validateLabel(t){p(this,t,{required:!0})}validateOn(t){if("object"==typeof t&&null!==t){d("[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] Der Label-Text für Neu in {\n onCreate: {\n label: string (!),\n callback: Function\n }\n} ist nicht korrekt gesetzt."),"function"==typeof t.onCreate.callback?e.onCreate=t.onCreate.callback:g.debug("[KolTabs] Die onCreate-Callback-Funktion für Neu in {\n onCreate: {\n label: string,\n callback: Function (!)\n }\n} ist nicht korrekt gesetzt.")):e.onCreate=t.onCreate,this.showCreateTab="function"==typeof e.onCreate),"function"==typeof t.onSelect&&(e.onSelect=t.onSelect),h(this,"_on",e)}}validateSelected(t){b(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}}),u("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,a;if(this._selected=e,"function"==typeof(null===(n=this._on)||void 0===n?void 0:n.onSelect)&&(null===(a=this._on)||void 0===a||a.onSelect(t,e)),this.tabPanelsElement){const t=f(`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-360ad69b.js";import{t as o}from"./i18n-112381e9.js";import{c as s,i as a}from"./component-names-e522484e.js";import{a as l}from"./align-6595a6d6.js";import{j as r,f as d,s as h,k as b,g as c,h as u,v as f}from"./prop.validators-f2b9a155.js";import{v as p}from"./label-452f8c01.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 a=null;switch(t.key){case"ArrowRight":a=this.nextPossibleTabIndex(this.state._tabs,this.state._selected,1);break;case"ArrowLeft":a=this.nextPossibleTabIndex(this.state._tabs,this.state._selected,-1)}if(null!==a){const i=this.state._tabs[a];(null===(e=i._on)||void 0===e?void 0:e.onSelect)&&(null===(n=i._on)||void 0===n||n.onSelect(t,a)),this.onSelect(t,a)}},this.onClickSelect=(t,e)=>{var n,a;const i=this.state._tabs[e];(null===(n=i._on)||void 0===n?void 0:n.onSelect)&&(null===(a=i._on)||void 0===a||a.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,a)=>{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,a||t);t=a||t,n=!1}if(!1===n){if(t>0)return this.selectNextNotDisabledTab(t-1,e,!1,a||t);r("[KolTabs] Alle Tabs sind deaktiviert und somit kann kein Tab angezeigt werden.")}}return t},this.syncSelectedAndTabs=(t,e,n,a)=>{let i,o;i="_selected"===a?t:this.state._selected,o="_tabs"===a?t:this.state._tabs,o.length>0&&e.set("_selected",this.selectNextNotDisabledTab(i,o))},this.handleTabPanels=()=>{var t,e,n;if(this.tabPanelHost instanceof HTMLDivElement)for(let a=this.tabPanelHost.children.length;a<this.state._tabs.length;a++){const i=document.createElement("div");i.setAttribute("aria-labelledby",`${this.state._label.replace(/\s/g,"-")}-tab-${a}`),i.setAttribute("id",`tabpanel-${a}`),i.setAttribute("role","tabpanel"),i.setAttribute("hidden","");const o=document.createElement("slot");o.setAttribute("name",`tabpanel-slot-${a}`),i.appendChild(o),this.tabPanelHost.appendChild(i),(null===(t=this.host)||void 0===t?void 0:t.children)instanceof HTMLCollection&&(null===(e=this.host)||void 0===e?void 0:e.children[a])&&(null===(n=this.host)||void 0===n||n.children[a].setAttribute("slot",`tabpanel-slot-${a}`))}},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:"668b8fe78f5053ce356e685104518338aa9f73b9",class:"kol-tabs"},t("div",{key:"5845ac11d2ebf8abe1e515aea9f9c68c56ee9a57",ref:t=>{this.tabPanelsElement=t},class:{[`tabs-align-${this.state._align}`]:!0}},this.renderButtonGroup(),t("div",{key:"67ef993b870a8ff374c2cc4f750de970d578edea",class:"tabs-content",ref:this.catchTabPanelHost})))}validateAlign(t){l(this,t)}validateLabel(t){p(this,t,{required:!0})}validateOn(t){if("object"==typeof t&&null!==t){d("[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] Der Label-Text für Neu in {\n onCreate: {\n label: string (!),\n callback: Function\n }\n} ist nicht korrekt gesetzt."),"function"==typeof t.onCreate.callback?e.onCreate=t.onCreate.callback:g.debug("[KolTabs] Die onCreate-Callback-Funktion für Neu in {\n onCreate: {\n label: string,\n callback: Function (!)\n }\n} ist nicht korrekt gesetzt.")):e.onCreate=t.onCreate,this.showCreateTab="function"==typeof e.onCreate),"function"==typeof t.onSelect&&(e.onSelect=t.onSelect),h(this,"_on",e)}}validateSelected(t){b(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}}),u("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,a;if(this._selected=e,"function"==typeof(null===(n=this._on)||void 0===n?void 0:n.onSelect)&&(null===(a=this._on)||void 0===a||a.onSelect(t,e)),this.tabPanelsElement){const t=f(`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-360ad69b.js";import{n as s}from"./dev.utils-eeeb0158.js";import{g as o}from"./controller-a8e66789.js";import{I as l}from"./InternalUnderlinedAccessKey-d35d1ac0.js";import{I as r}from"./controller-icon-a494ea46.js";import{b as h,k as d,i as c,w as p,s as u,l as f}from"./prop.validators-f2b9a155.js";import{v as m}from"./rows-d4a3be15.js";import{l as b}from"./component-names-e522484e.js";import{s as v,a as y}from"./reuse-b66836de.js";import"./dev.utils-1ca991a2.js";import"./events-29e84d75.js";import"./associated.controller-ad89c814.js";import"./hide-label-f5e03637.js";import"./label-452f8c01.js";import"./tab-index-bffbd9f3.js";import"./tooltip-align-676fe651.js";import"./align-6595a6d6.js";import"./icons-9784d978.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:"7cb15c2d57dc4eebfc0313970df31c77591b3330",class:{"kol-textarea":!0,"has-value":this.state._hasValue}},e(b,{key:"50f876f99fadc4f519b09508ce3448d6ec1220d2",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:"da39fb9ef3b2a001c98574681acb31b82f015463",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:"ec1e3ec583281b6ff59e964a57ab405defbf97e1",slot:"input"},e("textarea",Object.assign({key:"ffe328cbb651a1018012eeded0f30995f0f23e34",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-360ad69b.js";import{n as s}from"./dev.utils-698b2d79.js";import{g as o}from"./controller-a8e66789.js";import{I as l}from"./InternalUnderlinedAccessKey-d35d1ac0.js";import{I as r}from"./controller-icon-a494ea46.js";import{b as h,k as d,i as c,w as p,s as u,l as f}from"./prop.validators-f2b9a155.js";import{v as m}from"./rows-d4a3be15.js";import{l as b}from"./component-names-e522484e.js";import{s as v,a as y}from"./reuse-b66836de.js";import"./dev.utils-1ca991a2.js";import"./events-29e84d75.js";import"./associated.controller-ad89c814.js";import"./hide-label-f5e03637.js";import"./label-452f8c01.js";import"./tab-index-bffbd9f3.js";import"./tooltip-align-676fe651.js";import"./align-6595a6d6.js";import"./icons-9784d978.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:"7cb15c2d57dc4eebfc0313970df31c77591b3330",class:{"kol-textarea":!0,"has-value":this.state._hasValue}},e(b,{key:"50f876f99fadc4f519b09508ce3448d6ec1220d2",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:"da39fb9ef3b2a001c98574681acb31b82f015463",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:"ec1e3ec583281b6ff59e964a57ab405defbf97e1",slot:"input"},e("textarea",Object.assign({key:"ffe328cbb651a1018012eeded0f30995f0f23e34",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};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{h as t,r as s,H as e}from"./index-360ad69b.js";import{t as o}from"./i18n-342bc196.js";import{n as i}from"./dev.utils-eeeb0158.js";import{k as a,o as n}from"./component-names-e522484e.js";import"./i18n-ebe0c4cb.js";import"./reuse-b66836de.js";import"./dev.utils-1ca991a2.js";const c=({key:s,onClose:e,onRef:o,toastState:i})=>t("div",{class:`toast ${i.status}`,key:s},t(a,{class:"alert",_alert:!0,_label:i.toast.label,_level:0,_hasCloser:!0,_type:i.toast.type,_variant:i.toast.alertVariant||"card",_on:{onClose:e}},t("div",{ref:o},"string"==typeof i.toast.description?i.toast.description:null))),l="@layer kol-component {\n :host {\n display: flex;\n flex-direction: column;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n position: fixed;\n z-index: 200;\n }\n .close-all {\n align-self: flex-end;\n }\n}",r=l,h=300,b=class{constructor(t){s(this,t),this.knownRenderFunctions=new Set,this.state={_toastStates:[]}}async enqueue(t){const s={toast:t,status:"adding",id:`toast-${i()}`};return this.state=Object.assign(Object.assign({},this.state),{_toastStates:[s,...this.state._toastStates]}),setTimeout((()=>{this.state=Object.assign(Object.assign({},this.state),{_toastStates:this.state._toastStates.map((t=>t.id===s.id&&"removing"!==t.status?Object.assign(Object.assign({},t),{status:"settled"}):t))})}),h),()=>{this.handleClose(s)}}handleClose(t){this.state=Object.assign(Object.assign({},this.state),{_toastStates:this.state._toastStates.map((s=>(s.id===t.id&&(s.status="removing"),s)))}),setTimeout((()=>{this.state=Object.assign(Object.assign({},this.state),{_toastStates:this.state._toastStates.filter((s=>s.id!==t.id))})}),h)}async closeAll(t=!1){if(t)this.state=Object.assign(Object.assign({},this.state),{_toastStates:[]});else{const t=[...this.state._toastStates];this.state=Object.assign(Object.assign({},this.state),{_toastStates:t.map((t=>Object.assign(Object.assign({},t),{status:"removing"})))}),setTimeout((()=>{this.state=Object.assign(Object.assign({},this.state),{_toastStates:this.state._toastStates.filter((s=>t.every((t=>t.id!==s.id))))})}),h)}}handleToastRef(t,s){s&&"function"==typeof t.toast.render&&!this.knownRenderFunctions.has(t.toast.render)&&(this.knownRenderFunctions.add(t.toast.render),t.toast.render(s,{close:()=>this.handleClose(t)}))}render(){return t(e,{key:"4d7752f9c0213f4f307f79934a7c36ed0dc62087",class:"kol-toast-container"},this.state._toastStates.length>1&&t(n,{key:"8837aeb34d2d0185e7c69997da07eeb95119177a",_label:o("kol-toast-close-all"),class:"close-all",_on:{onClick:()=>{this.closeAll()}}}),this.state._toastStates.map((s=>t(c,{key:s.id,onClose:()=>this.handleClose(s),onRef:t=>this.handleToastRef(s,t),toastState:s}))))}};b.style={default:r};export{b as kol_toast_container};
4
+ import{h as t,r as s,H as e}from"./index-360ad69b.js";import{t as o}from"./i18n-112381e9.js";import{n as i}from"./dev.utils-698b2d79.js";import{k as a,o as n}from"./component-names-e522484e.js";import"./i18n-66b52d13.js";import"./reuse-b66836de.js";import"./dev.utils-1ca991a2.js";const l=({key:s,onClose:e,onRef:o,toastState:i})=>t("div",{class:`toast ${i.status}`,key:s},t(a,{class:"alert",_alert:!0,_label:i.toast.label,_level:0,_hasCloser:!0,_type:i.toast.type,_variant:i.toast.alertVariant||"card",_on:{onClose:e}},t("div",{ref:o},"string"==typeof i.toast.description?i.toast.description:null))),c="@layer kol-component {\n :host {\n display: flex;\n flex-direction: column;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n position: fixed;\n z-index: 200;\n }\n .close-all {\n align-self: flex-end;\n }\n}",r=c,h=300,d=class{constructor(t){s(this,t),this.knownRenderFunctions=new Set,this.state={_toastStates:[]}}async enqueue(t){const s={toast:t,status:"adding",id:`toast-${i()}`};return this.state=Object.assign(Object.assign({},this.state),{_toastStates:[s,...this.state._toastStates]}),setTimeout((()=>{this.state=Object.assign(Object.assign({},this.state),{_toastStates:this.state._toastStates.map((t=>t.id===s.id&&"removing"!==t.status?Object.assign(Object.assign({},t),{status:"settled"}):t))})}),h),()=>{this.handleClose(s)}}handleClose(t){this.state=Object.assign(Object.assign({},this.state),{_toastStates:this.state._toastStates.map((s=>(s.id===t.id&&(s.status="removing"),s)))}),setTimeout((()=>{this.state=Object.assign(Object.assign({},this.state),{_toastStates:this.state._toastStates.filter((s=>s.id!==t.id))})}),h)}async closeAll(t=!1){if(t)this.state=Object.assign(Object.assign({},this.state),{_toastStates:[]});else{const t=[...this.state._toastStates];this.state=Object.assign(Object.assign({},this.state),{_toastStates:t.map((t=>Object.assign(Object.assign({},t),{status:"removing"})))}),setTimeout((()=>{this.state=Object.assign(Object.assign({},this.state),{_toastStates:this.state._toastStates.filter((s=>t.every((t=>t.id!==s.id))))})}),h)}}handleToastRef(t,s){s&&"function"==typeof t.toast.render&&!this.knownRenderFunctions.has(t.toast.render)&&(this.knownRenderFunctions.add(t.toast.render),t.toast.render(s,{close:()=>this.handleClose(t)}))}render(){return t(e,{key:"4d7752f9c0213f4f307f79934a7c36ed0dc62087",class:"kol-toast-container"},this.state._toastStates.length>1&&t(n,{key:"8837aeb34d2d0185e7c69997da07eeb95119177a",_label:o("kol-toast-close-all"),class:"close-all",_on:{onClick:()=>{this.closeAll()}}}),this.state._toastStates.map((s=>t(l,{key:s.id,onClose:()=>this.handleClose(s),onRef:t=>this.handleToastRef(s,t),toastState:s}))))}};d.style={default:r};export{d as kol_toast_container};
@@ -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-360ad69b.js";import{b as s,a as o}from"./align-floating-elements-1c3e002c.js";import{f as a}from"./component-names-e522484e.js";import{i as l}from"./prop.validators-f2b9a155.js";import{g as h}from"./dev.utils-1ca991a2.js";import{v as r}from"./access-key-e22ec35a.js";import{a as d}from"./align-6595a6d6.js";import{v as c}from"./label-452f8c01.js";import"./reuse-b66836de.js";import"./index-db4aa6e4.js";const p=(e,t)=>{l(e,"_id",t)},f=new Set;function u(e){f.forEach((e=>{e.style.setProperty("z-index","999")})),f.add(e),e.style.setProperty("z-index","1000")}function m(e){if(f.delete(e),f.size>0){const e=Array.from(f).pop();e&&e.style.setProperty("z-index","1000")}}const b="/*\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 font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip-wc {\n display: contents;\n }\n .kol-tooltip-wc .tooltip-floating {\n animation-duration: 0.5s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n box-sizing: border-box;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n /* Shared between content and arrow */\n .kol-tooltip-wc .tooltip-area {\n background-color: #fff;\n color: #000;\n }\n .kol-tooltip-wc .tooltip-arrow {\n height: 10px;\n position: absolute;\n transform: rotate(45deg);\n width: 10px;\n z-index: 999;\n }\n .kol-tooltip-wc .tooltip-content {\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}",w=b,y=class{constructor(e){n(this,e),this.hasFocusIn=!1,this.hasMouseIn=!1,this.showTooltip=()=>{if(this.previousSibling&&this.tooltipElement){u(this.tooltipElement),this.tooltipElement.style.setProperty("display","block"),h().addEventListener("keyup",this.hideTooltipByEscape);const e=this.previousSibling,t=this.tooltipElement;this.cleanupAutoPositioning=s(e,t,(()=>{this.alignTooltip()}))}},this.hideTooltip=()=>{this.tooltipElement&&(m(this.tooltipElement),this.tooltipElement.style.setProperty("display","none"),this.tooltipElement.style.setProperty("visibility","hidden"),this.cleanupAutoPositioning&&(this.cleanupAutoPositioning(),this.cleanupAutoPositioning=void 0)),h().removeEventListener("keyup",this.hideTooltipByEscape)},this.hideTooltipByEscape=e=>{"Escape"===e.key&&this.hideTooltip()},this.addListeners=e=>{e.addEventListener("mouseenter",this.handleMouseEnter.bind(this)),e.addEventListener("mouseleave",this.handleMouseleave.bind(this)),e.addEventListener("focusin",this.handleFocusIn.bind(this)),e.addEventListener("focusout",this.handleFocusout.bind(this))},this.removeListeners=e=>{e.removeEventListener("mouseenter",this.handleMouseEnter.bind(this)),e.removeEventListener("mouseleave",this.handleMouseleave.bind(this)),e.removeEventListener("focusin",this.handleFocusIn.bind(this)),e.removeEventListener("focusout",this.handleFocusout.bind(this))},this.resyncListeners=(e,t,n=!1)=>{e&&this.removeListeners(e),t&&(n&&(this.previousSibling=t),this.addListeners(t))},this.catchTooltipElement=e=>{this.tooltipElement=e},this.catchArrowElement=e=>{this.arrowElement=e},this.showOrHideTooltip=()=>{clearTimeout(this.overFocusTimeout),this.overFocusTimeout=setTimeout((()=>{this.hasMouseIn||this.hasFocusIn?this.showTooltip():this.hideTooltip()}),300)},this._accessKey=void 0,this._align="top",this._id=void 0,this._label=void 0,this.state={_align:"top",_label:""}}async alignTooltip(){this.tooltipElement&&this.previousSibling&&await o({align:this._align,referenceElement:this.previousSibling,arrowElement:this.arrowElement,floatingElement:this.tooltipElement})}handleMouseEnter(){this.hasMouseIn=!0,this.showOrHideTooltip()}handleMouseleave(){this.hasMouseIn=!1,this.showOrHideTooltip()}handleFocusIn(){this.hasFocusIn=!0,this.showOrHideTooltip()}handleFocusout(){this.hasFocusIn=!1,this.showOrHideTooltip()}render(){return t(i,{key:"7ca9fb689361a6f851c60354e6b95fe3cff62024",class:"kol-tooltip-wc"},""!==this.state._label&&t("div",{key:"3a3e7ff629cbcb27527a59e56d69eea8e3820c6b",class:"tooltip-floating",ref:this.catchTooltipElement},t("div",{key:"f76d6505b8e5355079f70c4ab78c13b8d028d0fb",class:"tooltip-area tooltip-arrow",ref:this.catchArrowElement}),t(a,{key:"2ad56a436ed23f2b07a2c277b1de2d58794b897e",class:"tooltip-area tooltip-content",id:this.state._id,_accessKey:this._accessKey,_label:this.state._label})))}validateAccessKey(e){r(this,e)}validateAlign(e){d(this,e)}validateId(e){p(this,e)}validateLabel(e){c(this,e,{required:!0})}componentWillLoad(){this.validateAccessKey(this._accessKey),this.validateAlign(this._align),this.validateId(this._id),this.validateLabel(this._label)}handleEventListeners(){var e;this.resyncListeners(this.previousSibling,null===(e=this.host)||void 0===e?void 0:e.previousElementSibling,!0),this.resyncListeners(this.tooltipElement,this.tooltipElement)}connectedCallback(){var e;this.previousSibling=null===(e=this.host)||void 0===e?void 0:e.previousElementSibling}componentDidRender(){this.handleEventListeners()}disconnectedCallback(){this.previousSibling&&(this.removeListeners(this.previousSibling),this.previousSibling=void 0),this.tooltipElement&&this.removeListeners(this.tooltipElement),this.cleanupAutoPositioning&&this.cleanupAutoPositioning()}get host(){return e(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_align:["validateAlign"],_id:["validateId"],_label:["validateLabel"]}}};y.style=w;export{y as kol_tooltip_wc};
4
+ import{r as n,h as t,H as i,g as e}from"./index-360ad69b.js";import{b as s,a as o}from"./align-floating-elements-a2bc42d2.js";import{f as a}from"./component-names-e522484e.js";import{i as l}from"./prop.validators-f2b9a155.js";import{g as h}from"./dev.utils-1ca991a2.js";import{v as r}from"./access-key-e22ec35a.js";import{a as d}from"./align-6595a6d6.js";import{v as c}from"./label-452f8c01.js";import"./reuse-b66836de.js";import"./index-db4aa6e4.js";const p=(e,t)=>{l(e,"_id",t)},f=new Set;function u(e){f.forEach((e=>{e.style.setProperty("z-index","999")})),f.add(e),e.style.setProperty("z-index","1000")}function m(e){if(f.delete(e),f.size>0){const e=Array.from(f).pop();e&&e.style.setProperty("z-index","1000")}}const b="/*\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 font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip-wc {\n display: contents;\n }\n .kol-tooltip-wc .tooltip-floating {\n animation-duration: 0.5s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n box-sizing: border-box;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n /* Shared between content and arrow */\n .kol-tooltip-wc .tooltip-area {\n background-color: #fff;\n color: #000;\n }\n .kol-tooltip-wc .tooltip-arrow {\n height: 10px;\n position: absolute;\n transform: rotate(45deg);\n width: 10px;\n z-index: 999;\n }\n .kol-tooltip-wc .tooltip-content {\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}",w=b,y=class{constructor(e){n(this,e),this.hasFocusIn=!1,this.hasMouseIn=!1,this.showTooltip=()=>{if(this.previousSibling&&this.tooltipElement){u(this.tooltipElement),this.tooltipElement.style.setProperty("display","block"),h().addEventListener("keyup",this.hideTooltipByEscape);const e=this.previousSibling,t=this.tooltipElement;this.cleanupAutoPositioning=s(e,t,(()=>{this.alignTooltip()}))}},this.hideTooltip=()=>{this.tooltipElement&&(m(this.tooltipElement),this.tooltipElement.style.setProperty("display","none"),this.tooltipElement.style.setProperty("visibility","hidden"),this.cleanupAutoPositioning&&(this.cleanupAutoPositioning(),this.cleanupAutoPositioning=void 0)),h().removeEventListener("keyup",this.hideTooltipByEscape)},this.hideTooltipByEscape=e=>{"Escape"===e.key&&this.hideTooltip()},this.addListeners=e=>{e.addEventListener("mouseenter",this.handleMouseEnter.bind(this)),e.addEventListener("mouseleave",this.handleMouseleave.bind(this)),e.addEventListener("focusin",this.handleFocusIn.bind(this)),e.addEventListener("focusout",this.handleFocusout.bind(this))},this.removeListeners=e=>{e.removeEventListener("mouseenter",this.handleMouseEnter.bind(this)),e.removeEventListener("mouseleave",this.handleMouseleave.bind(this)),e.removeEventListener("focusin",this.handleFocusIn.bind(this)),e.removeEventListener("focusout",this.handleFocusout.bind(this))},this.resyncListeners=(e,t,n=!1)=>{e&&this.removeListeners(e),t&&(n&&(this.previousSibling=t),this.addListeners(t))},this.catchTooltipElement=e=>{this.tooltipElement=e},this.catchArrowElement=e=>{this.arrowElement=e},this.showOrHideTooltip=()=>{clearTimeout(this.overFocusTimeout),this.overFocusTimeout=setTimeout((()=>{this.hasMouseIn||this.hasFocusIn?this.showTooltip():this.hideTooltip()}),300)},this._accessKey=void 0,this._align="top",this._id=void 0,this._label=void 0,this.state={_align:"top",_label:""}}async alignTooltip(){this.tooltipElement&&this.previousSibling&&await o({align:this._align,referenceElement:this.previousSibling,arrowElement:this.arrowElement,floatingElement:this.tooltipElement})}handleMouseEnter(){this.hasMouseIn=!0,this.showOrHideTooltip()}handleMouseleave(){this.hasMouseIn=!1,this.showOrHideTooltip()}handleFocusIn(){this.hasFocusIn=!0,this.showOrHideTooltip()}handleFocusout(){this.hasFocusIn=!1,this.showOrHideTooltip()}render(){return t(i,{key:"7ca9fb689361a6f851c60354e6b95fe3cff62024",class:"kol-tooltip-wc"},""!==this.state._label&&t("div",{key:"3a3e7ff629cbcb27527a59e56d69eea8e3820c6b",class:"tooltip-floating",ref:this.catchTooltipElement},t("div",{key:"f76d6505b8e5355079f70c4ab78c13b8d028d0fb",class:"tooltip-area tooltip-arrow",ref:this.catchArrowElement}),t(a,{key:"2ad56a436ed23f2b07a2c277b1de2d58794b897e",class:"tooltip-area tooltip-content",id:this.state._id,_accessKey:this._accessKey,_label:this.state._label})))}validateAccessKey(e){r(this,e)}validateAlign(e){d(this,e)}validateId(e){p(this,e)}validateLabel(e){c(this,e,{required:!0})}componentWillLoad(){this.validateAccessKey(this._accessKey),this.validateAlign(this._align),this.validateId(this._id),this.validateLabel(this._label)}handleEventListeners(){var e;this.resyncListeners(this.previousSibling,null===(e=this.host)||void 0===e?void 0:e.previousElementSibling,!0),this.resyncListeners(this.tooltipElement,this.tooltipElement)}connectedCallback(){var e;this.previousSibling=null===(e=this.host)||void 0===e?void 0:e.previousElementSibling}componentDidRender(){this.handleEventListeners()}disconnectedCallback(){this.previousSibling&&(this.removeListeners(this.previousSibling),this.previousSibling=void 0),this.tooltipElement&&this.removeListeners(this.tooltipElement),this.cleanupAutoPositioning&&this.cleanupAutoPositioning()}get host(){return e(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_align:["validateAlign"],_id:["validateId"],_label:["validateLabel"]}}};y.style=w;export{y as kol_tooltip_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-360ad69b.js";import{t as i}from"./i18n-342bc196.js";import{w as o}from"./component-names-e522484e.js";import{v as a}from"./label-452f8c01.js";import"./i18n-ebe0c4cb.js";import"./reuse-b66836de.js";import"./prop.validators-f2b9a155.js";import"./index-db4aa6e4.js";import"./dev.utils-1ca991a2.js";const 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 font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n}",l=s,r=class{constructor(e){n(this,e),this._label=void 0,this.state={_label:"0.0.0-alpha.0"}}render(){return e(t,{key:"a4c3e7f9b27e9839b0d55418532cdbf2eebed285",class:"kol-version"},e(o,{key:"b22098b308a2b0513068a25ff758368c116efdde",_color:"#bec5c9",_icons:{left:{icon:"codicon codicon-versions",label:i("kol-version")}},_label:this.state._label}))}validateLabel(n){a(this,n,{required:!0})}componentWillLoad(){this.validateLabel(this._label)}static get watchers(){return{_label:["validateLabel"]}}};r.style={default:l};export{r as kol_version};
4
+ import{r as n,h as e,H as t}from"./index-360ad69b.js";import{t as i}from"./i18n-112381e9.js";import{w as o}from"./component-names-e522484e.js";import{v as a}from"./label-452f8c01.js";import"./i18n-66b52d13.js";import"./reuse-b66836de.js";import"./prop.validators-f2b9a155.js";import"./index-db4aa6e4.js";import"./dev.utils-1ca991a2.js";const 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 font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n}",l=s,r=class{constructor(e){n(this,e),this._label=void 0,this.state={_label:"0.0.0-alpha.0"}}render(){return e(t,{key:"a4c3e7f9b27e9839b0d55418532cdbf2eebed285",class:"kol-version"},e(o,{key:"b22098b308a2b0513068a25ff758368c116efdde",_color:"#bec5c9",_icons:{left:{icon:"codicon codicon-versions",label:i("kol-version")}},_label:this.state._label}))}validateLabel(n){a(this,n,{required:!0})}componentWillLoad(){this.validateLabel(this._label)}static get watchers(){return{_label:["validateLabel"]}}};r.style={default:l};export{r as kol_version};