@public-ui/components 2.2.0 → 3.0.0-alpha.0

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 (857) hide show
  1. package/custom-elements.json +58 -64
  2. package/dist/cjs/Alert-574bed11.js +4 -0
  3. package/dist/cjs/Alert-574bed11.js.map +1 -0
  4. package/dist/cjs/Collapsible-4a383ac2.js +4 -0
  5. package/dist/cjs/Collapsible-4a383ac2.js.map +1 -0
  6. package/dist/cjs/FormFieldMsg-912c2346.js +4 -0
  7. package/dist/cjs/{FormFieldMsg-d80dcd4f.js.map → FormFieldMsg-912c2346.js.map} +1 -1
  8. package/dist/cjs/Heading-7a5bdb54.js +4 -0
  9. package/dist/cjs/Heading-7a5bdb54.js.map +1 -0
  10. package/dist/cjs/InternalUnderlinedBadgeText-e0fa44aa.js +4 -0
  11. package/dist/cjs/InternalUnderlinedBadgeText-e0fa44aa.js.map +1 -0
  12. package/dist/cjs/Span-e07e098e.js +4 -0
  13. package/dist/cjs/Span-e07e098e.js.map +1 -0
  14. package/dist/cjs/{access-and-short-key-59c52d82.js → access-and-short-key-4b185f62.js} +1 -1
  15. package/dist/cjs/{access-and-short-key-59c52d82.js.map → access-and-short-key-4b185f62.js.map} +1 -1
  16. package/dist/cjs/{align-7f1af9f0.js → align-f4f3dfb6.js} +1 -1
  17. package/dist/cjs/{align-7f1af9f0.js.map → align-f4f3dfb6.js.map} +1 -1
  18. package/dist/cjs/{align-floating-elements-3de0ad8d.js → align-floating-elements-fdc6eb39.js} +1 -1
  19. package/dist/cjs/align-floating-elements-fdc6eb39.js.map +1 -0
  20. package/dist/cjs/app-globals-9acf2253.js +4 -0
  21. package/dist/cjs/{app-globals-26d718f3.js.map → app-globals-9acf2253.js.map} +1 -1
  22. package/dist/cjs/{aria-expanded-10006a18.js → aria-expanded-6f9152b4.js} +1 -1
  23. package/dist/cjs/{aria-expanded-10006a18.js.map → aria-expanded-6f9152b4.js.map} +1 -1
  24. package/dist/cjs/{associated.controller-77de53f0.js → associated.controller-e7a1e9af.js} +1 -1
  25. package/dist/cjs/{associated.controller-77de53f0.js.map → associated.controller-e7a1e9af.js.map} +1 -1
  26. package/dist/cjs/{color-9b802560.js → color-5ddd375e.js} +1 -1
  27. package/dist/cjs/{color-9b802560.js.map → color-5ddd375e.js.map} +1 -1
  28. package/dist/cjs/component-names-7808fb62.js +4 -0
  29. package/dist/cjs/component-names-7808fb62.js.map +1 -0
  30. package/dist/cjs/{controller-2dc232aa.js → controller-59d57d18.js} +1 -1
  31. package/dist/cjs/{controller-2dc232aa.js.map → controller-59d57d18.js.map} +1 -1
  32. package/dist/cjs/{controller-27c421f2.js → controller-dce66822.js} +1 -1
  33. package/dist/cjs/{controller-27c421f2.js.map → controller-dce66822.js.map} +1 -1
  34. package/dist/cjs/{controller-8eca1130.js → controller-ed762c3d.js} +1 -1
  35. package/dist/cjs/{controller-8eca1130.js.map → controller-ed762c3d.js.map} +1 -1
  36. package/dist/cjs/{controller-ed980c36.js → controller-ef1a645a.js} +1 -1
  37. package/dist/cjs/{controller-ed980c36.js.map → controller-ef1a645a.js.map} +1 -1
  38. package/dist/cjs/{controller-c000e7ba.js → controller-fab45b3b.js} +1 -1
  39. package/dist/cjs/{controller-c000e7ba.js.map → controller-fab45b3b.js.map} +1 -1
  40. package/dist/cjs/{controller-icon-abaa43da.js → controller-icon-5cbf5833.js} +1 -1
  41. package/dist/cjs/{controller-icon-abaa43da.js.map → controller-icon-5cbf5833.js.map} +1 -1
  42. package/dist/cjs/custom-class-d8a5e95d.js +4 -0
  43. package/dist/cjs/{custom-class-c76ab076.js.map → custom-class-d8a5e95d.js.map} +1 -1
  44. package/dist/cjs/{dev.utils-af89ffeb.js → dev.utils-cad0c4bb.js} +1 -1
  45. package/dist/cjs/{dev.utils-af89ffeb.js.map → dev.utils-cad0c4bb.js.map} +1 -1
  46. package/dist/cjs/{devtools-461138b4.js → devtools-1224292d.js} +1 -1
  47. package/dist/cjs/{devtools-461138b4.js.map → devtools-1224292d.js.map} +1 -1
  48. package/dist/cjs/disabled-5eb4fde5.js +4 -0
  49. package/dist/cjs/{disabled-622c5d44.js.map → disabled-5eb4fde5.js.map} +1 -1
  50. package/dist/cjs/{events-8dfd45ee.js → events-4981f0c3.js} +1 -1
  51. package/dist/cjs/{events-8dfd45ee.js.map → events-4981f0c3.js.map} +1 -1
  52. package/dist/cjs/has-closer-9e124723.js +4 -0
  53. package/dist/cjs/{has-closer-3fd3eec9.js.map → has-closer-9e124723.js.map} +1 -1
  54. package/dist/cjs/has-counter-576de43f.js +4 -0
  55. package/dist/cjs/{has-counter-087c240e.js.map → has-counter-576de43f.js.map} +1 -1
  56. package/dist/cjs/hide-label-1783d2a4.js +4 -0
  57. package/dist/cjs/{hide-label-79400d3a.js.map → hide-label-1783d2a4.js.map} +1 -1
  58. package/dist/cjs/href-50c41695.js +4 -0
  59. package/dist/cjs/{href-b13ee308.js.map → href-50c41695.js.map} +1 -1
  60. package/dist/cjs/{icons-6c7438a8.js → icons-3917f9e0.js} +1 -1
  61. package/dist/cjs/{icons-6c7438a8.js.map → icons-3917f9e0.js.map} +1 -1
  62. package/dist/cjs/image-source-546dd85b.js +4 -0
  63. package/dist/cjs/{image-source-c99a7661.js.map → image-source-546dd85b.js.map} +1 -1
  64. package/dist/cjs/index-4e35d174.js +4 -0
  65. package/dist/cjs/index-4e35d174.js.map +1 -0
  66. package/dist/cjs/index-bf4a6924.js +4 -0
  67. package/dist/cjs/index-bf4a6924.js.map +1 -0
  68. package/dist/cjs/index.cjs.js +1 -1
  69. package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
  70. package/dist/cjs/kol-abbr.cjs.entry.js.map +1 -1
  71. package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
  72. package/dist/cjs/kol-accordion.cjs.entry.js.map +1 -1
  73. package/dist/cjs/kol-alert-wc.cjs.entry.js +1 -1
  74. package/dist/cjs/kol-alert-wc.cjs.entry.js.map +1 -1
  75. package/dist/cjs/kol-alert.cjs.entry.js +1 -1
  76. package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
  77. package/dist/cjs/kol-avatar.cjs.entry.js +1 -1
  78. package/dist/cjs/kol-badge.cjs.entry.js +1 -1
  79. package/dist/cjs/kol-badge.cjs.entry.js.map +1 -1
  80. package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
  81. package/dist/cjs/kol-button-group-wc.cjs.entry.js +1 -1
  82. package/dist/cjs/kol-button-group.cjs.entry.js +1 -1
  83. package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
  84. package/dist/cjs/kol-button-wc.cjs.entry.js +1 -1
  85. package/dist/cjs/kol-button-wc.cjs.entry.js.map +1 -1
  86. package/dist/cjs/kol-button.cjs.entry.js +1 -1
  87. package/dist/cjs/kol-card.cjs.entry.js +1 -1
  88. package/dist/cjs/kol-card.cjs.entry.js.map +1 -1
  89. package/dist/cjs/kol-combobox.cjs.entry.js +1 -1
  90. package/dist/cjs/kol-combobox.cjs.entry.js.map +1 -1
  91. package/dist/cjs/kol-details.cjs.entry.js +1 -1
  92. package/dist/cjs/kol-details.cjs.entry.js.map +1 -1
  93. package/dist/cjs/kol-drawer.cjs.entry.js +1 -1
  94. package/dist/cjs/kol-form.cjs.entry.js +1 -1
  95. package/dist/cjs/kol-form.cjs.entry.js.map +1 -1
  96. package/dist/cjs/kol-heading.cjs.entry.js +1 -1
  97. package/dist/cjs/kol-heading.cjs.entry.js.map +1 -1
  98. package/dist/cjs/kol-icon.cjs.entry.js +1 -1
  99. package/dist/cjs/kol-image.cjs.entry.js +1 -1
  100. package/dist/cjs/kol-indented-text-wc.cjs.entry.js +1 -1
  101. package/dist/cjs/kol-indented-text.cjs.entry.js +1 -1
  102. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  103. package/dist/cjs/kol-input-checkbox.cjs.entry.js.map +1 -1
  104. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  105. package/dist/cjs/kol-input-color.cjs.entry.js.map +1 -1
  106. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  107. package/dist/cjs/kol-input-date.cjs.entry.js.map +1 -1
  108. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  109. package/dist/cjs/kol-input-email.cjs.entry.js.map +1 -1
  110. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  111. package/dist/cjs/kol-input-file.cjs.entry.js.map +1 -1
  112. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  113. package/dist/cjs/kol-input-number.cjs.entry.js.map +1 -1
  114. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  115. package/dist/cjs/kol-input-password.cjs.entry.js.map +1 -1
  116. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  117. package/dist/cjs/kol-input-radio.cjs.entry.js.map +1 -1
  118. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  119. package/dist/cjs/kol-input-range.cjs.entry.js.map +1 -1
  120. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  121. package/dist/cjs/kol-input-text.cjs.entry.js.map +1 -1
  122. package/dist/cjs/kol-input.cjs.entry.js +1 -1
  123. package/dist/cjs/kol-input.cjs.entry.js.map +1 -1
  124. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  125. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  126. package/dist/cjs/kol-link-group.cjs.entry.js +1 -1
  127. package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
  128. package/dist/cjs/kol-link-wc.cjs.entry.js.map +1 -1
  129. package/dist/cjs/kol-link.cjs.entry.js +1 -1
  130. package/dist/cjs/kol-logo.cjs.entry.js +1 -1
  131. package/dist/cjs/kol-modal.cjs.entry.js +1 -1
  132. package/dist/cjs/kol-nav.cjs.entry.js +1 -1
  133. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  134. package/dist/cjs/kol-popover-wc.cjs.entry.js +1 -1
  135. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  136. package/dist/cjs/kol-quote.cjs.entry.js +1 -1
  137. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  138. package/dist/cjs/kol-select.cjs.entry.js.map +1 -1
  139. package/dist/cjs/kol-single-select.cjs.entry.js +1 -1
  140. package/dist/cjs/kol-single-select.cjs.entry.js.map +1 -1
  141. package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
  142. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  143. package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
  144. package/dist/cjs/kol-symbol.cjs.entry.js +1 -1
  145. package/dist/cjs/kol-table-stateful.cjs.entry.js +1 -1
  146. package/dist/cjs/kol-table-stateless-wc.cjs.entry.js +1 -1
  147. package/dist/cjs/kol-table-stateless.cjs.entry.js +1 -1
  148. package/dist/cjs/kol-table.cjs.entry.js +1 -1
  149. package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
  150. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  151. package/dist/cjs/kol-textarea.cjs.entry.js.map +1 -1
  152. package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
  153. package/dist/cjs/kol-toast-container.cjs.entry.js.map +1 -1
  154. package/dist/cjs/kol-toolbar.cjs.entry.js +1 -1
  155. package/dist/cjs/kol-tooltip-wc.cjs.entry.js +1 -1
  156. package/dist/cjs/kol-tooltip-wc.cjs.entry.js.map +1 -1
  157. package/dist/cjs/kol-tree-item-wc.cjs.entry.js +1 -1
  158. package/dist/cjs/kol-tree-item.cjs.entry.js +1 -1
  159. package/dist/cjs/kol-tree-wc.cjs.entry.js +1 -1
  160. package/dist/cjs/kol-tree.cjs.entry.js +1 -1
  161. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  162. package/dist/cjs/kolibri.cjs.js +1 -1
  163. package/dist/cjs/{label-fe6579d9.js → label-d84e4f92.js} +1 -1
  164. package/dist/cjs/{label-fe6579d9.js.map → label-d84e4f92.js.map} +1 -1
  165. package/dist/cjs/loader.cjs.js +1 -1
  166. package/dist/cjs/open-19fa99c9.js +4 -0
  167. package/dist/cjs/{open-a86a97fa.js.map → open-19fa99c9.js.map} +1 -1
  168. package/dist/cjs/{prop.validators-976c1ac1.js → prop.validators-37d21dea.js} +1 -1
  169. package/dist/cjs/{prop.validators-976c1ac1.js.map → prop.validators-37d21dea.js.map} +1 -1
  170. package/dist/cjs/rows-fd18fa20.js +4 -0
  171. package/dist/cjs/{rows-b7a0c507.js.map → rows-fd18fa20.js.map} +1 -1
  172. package/dist/cjs/show-f204ce41.js +4 -0
  173. package/dist/cjs/{show-bf69e208.js.map → show-f204ce41.js.map} +1 -1
  174. package/dist/cjs/{suggestions-15c6bd6b.js → suggestions-38ae7a17.js} +1 -1
  175. package/dist/cjs/{suggestions-15c6bd6b.js.map → suggestions-38ae7a17.js.map} +1 -1
  176. package/dist/cjs/test-component.cjs.entry.js +1 -1
  177. package/dist/cjs/tooltip-align-70093437.js +4 -0
  178. package/dist/cjs/{tooltip-align-c4050c7a.js.map → tooltip-align-70093437.js.map} +1 -1
  179. package/dist/cjs/{validation-3f6b17d0.js → validation-6f90f7a8.js} +1 -1
  180. package/dist/cjs/{validation-3f6b17d0.js.map → validation-6f90f7a8.js.map} +1 -1
  181. package/dist/cjs/{validation-06b09cb5.js → validation-7592f880.js} +1 -1
  182. package/dist/cjs/{validation-06b09cb5.js.map → validation-7592f880.js.map} +1 -1
  183. package/dist/components/Alert.js +1 -1
  184. package/dist/components/Alert.js.map +1 -1
  185. package/dist/components/Collapsible.js +1 -1
  186. package/dist/components/Collapsible.js.map +1 -1
  187. package/dist/components/Heading.js +4 -0
  188. package/dist/components/Heading.js.map +1 -0
  189. package/dist/components/InternalUnderlinedBadgeText.js +1 -1
  190. package/dist/components/InternalUnderlinedBadgeText.js.map +1 -1
  191. package/dist/components/Span.js +4 -0
  192. package/dist/components/Span.js.map +1 -0
  193. package/dist/components/access-and-short-key.js +1 -1
  194. package/dist/components/align-floating-elements.js +1 -1
  195. package/dist/components/align-floating-elements.js.map +1 -1
  196. package/dist/components/associated.controller.js +1 -1
  197. package/dist/components/color.js +1 -1
  198. package/dist/components/component-names.js +1 -1
  199. package/dist/components/component-names.js.map +1 -1
  200. package/dist/components/controller.js +1 -1
  201. package/dist/components/controller2.js +1 -1
  202. package/dist/components/controller3.js +1 -1
  203. package/dist/components/controller5.js +1 -1
  204. package/dist/components/devtools.js +1 -1
  205. package/dist/components/events2.js +1 -1
  206. package/dist/components/index.js +1 -1
  207. package/dist/components/kol-abbr.js +1 -1
  208. package/dist/components/kol-abbr.js.map +1 -1
  209. package/dist/components/kol-accordion.js +1 -1
  210. package/dist/components/kol-alert-wc.js +1 -1
  211. package/dist/components/kol-alert.js +1 -1
  212. package/dist/components/kol-avatar-wc.js +1 -1
  213. package/dist/components/kol-avatar.js +1 -1
  214. package/dist/components/kol-badge.js +1 -1
  215. package/dist/components/kol-badge.js.map +1 -1
  216. package/dist/components/kol-breadcrumb.js +1 -1
  217. package/dist/components/kol-button-group-wc.js +1 -1
  218. package/dist/components/kol-button-group.js +1 -1
  219. package/dist/components/kol-button-link.js +1 -1
  220. package/dist/components/kol-button-wc.js +1 -1
  221. package/dist/components/kol-button-wc.js.map +1 -1
  222. package/dist/components/kol-button.js +1 -1
  223. package/dist/components/kol-card.js +1 -1
  224. package/dist/components/kol-card.js.map +1 -1
  225. package/dist/components/kol-combobox.js +1 -1
  226. package/dist/components/kol-combobox.js.map +1 -1
  227. package/dist/components/kol-details.js +1 -1
  228. package/dist/components/kol-drawer.js +1 -1
  229. package/dist/components/kol-form.js +1 -1
  230. package/dist/components/kol-heading.js +1 -1
  231. package/dist/components/kol-heading.js.map +1 -1
  232. package/dist/components/kol-icon.js +1 -1
  233. package/dist/components/kol-image.js +1 -1
  234. package/dist/components/kol-indented-text-wc.js +1 -1
  235. package/dist/components/kol-indented-text.js +1 -1
  236. package/dist/components/kol-input-checkbox.js +1 -1
  237. package/dist/components/kol-input-checkbox.js.map +1 -1
  238. package/dist/components/kol-input-color.js +1 -1
  239. package/dist/components/kol-input-color.js.map +1 -1
  240. package/dist/components/kol-input-date.js +1 -1
  241. package/dist/components/kol-input-date.js.map +1 -1
  242. package/dist/components/kol-input-email.js +1 -1
  243. package/dist/components/kol-input-email.js.map +1 -1
  244. package/dist/components/kol-input-file.js +1 -1
  245. package/dist/components/kol-input-file.js.map +1 -1
  246. package/dist/components/kol-input-number.js +1 -1
  247. package/dist/components/kol-input-number.js.map +1 -1
  248. package/dist/components/kol-input-password.js +1 -1
  249. package/dist/components/kol-input-password.js.map +1 -1
  250. package/dist/components/kol-input-radio.js +1 -1
  251. package/dist/components/kol-input-radio.js.map +1 -1
  252. package/dist/components/kol-input-range.js +1 -1
  253. package/dist/components/kol-input-range.js.map +1 -1
  254. package/dist/components/kol-input-text.js +1 -1
  255. package/dist/components/kol-input-text.js.map +1 -1
  256. package/dist/components/kol-input.js +1 -1
  257. package/dist/components/kol-kolibri.js +1 -1
  258. package/dist/components/kol-link-button.js +1 -1
  259. package/dist/components/kol-link-group.js +1 -1
  260. package/dist/components/kol-link-wc.js +1 -1
  261. package/dist/components/kol-link-wc.js.map +1 -1
  262. package/dist/components/kol-link.js +1 -1
  263. package/dist/components/kol-logo.js +1 -1
  264. package/dist/components/kol-modal.js +1 -1
  265. package/dist/components/kol-nav.js +1 -1
  266. package/dist/components/kol-pagination.js +1 -1
  267. package/dist/components/kol-popover-wc.js +1 -1
  268. package/dist/components/kol-progress.js +1 -1
  269. package/dist/components/kol-quote.js +1 -1
  270. package/dist/components/kol-select.js +1 -1
  271. package/dist/components/kol-select.js.map +1 -1
  272. package/dist/components/kol-single-select.js +1 -1
  273. package/dist/components/kol-single-select.js.map +1 -1
  274. package/dist/components/kol-skip-nav.js +1 -1
  275. package/dist/components/kol-spin.js +1 -1
  276. package/dist/components/kol-split-button.js +1 -1
  277. package/dist/components/kol-symbol.js +1 -1
  278. package/dist/components/kol-table-stateful.js +1 -1
  279. package/dist/components/kol-table-stateless-wc.js +1 -1
  280. package/dist/components/kol-table-stateless.js +1 -1
  281. package/dist/components/kol-table.js +1 -1
  282. package/dist/components/kol-tabs.js +1 -1
  283. package/dist/components/kol-textarea.js +1 -1
  284. package/dist/components/kol-textarea.js.map +1 -1
  285. package/dist/components/kol-toast-container.js +1 -1
  286. package/dist/components/kol-toast-container.js.map +1 -1
  287. package/dist/components/kol-toolbar.js +1 -1
  288. package/dist/components/kol-tooltip-wc.js +1 -1
  289. package/dist/components/kol-tooltip-wc.js.map +1 -1
  290. package/dist/components/kol-tree-item-wc.js +1 -1
  291. package/dist/components/kol-tree-item.js +1 -1
  292. package/dist/components/kol-tree-wc.js +1 -1
  293. package/dist/components/kol-tree.js +1 -1
  294. package/dist/components/kol-version.js +1 -1
  295. package/dist/components/label.js +1 -1
  296. package/dist/components/prop.validators.js +1 -1
  297. package/dist/components/prop.validators.js.map +1 -1
  298. package/dist/components/rows.js +1 -1
  299. package/dist/components/suggestions.js +1 -1
  300. package/dist/components/validation2.js +1 -1
  301. package/dist/esm/Alert-a0cdc528.js +4 -0
  302. package/dist/esm/Alert-a0cdc528.js.map +1 -0
  303. package/dist/esm/Collapsible-0f95c96e.js +4 -0
  304. package/dist/esm/Collapsible-0f95c96e.js.map +1 -0
  305. package/dist/esm/{FormFieldMsg-3f74273a.js → FormFieldMsg-de303cbe.js} +1 -1
  306. package/dist/esm/{FormFieldMsg-3f74273a.js.map → FormFieldMsg-de303cbe.js.map} +1 -1
  307. package/dist/esm/Heading-781aa65b.js +4 -0
  308. package/dist/esm/Heading-781aa65b.js.map +1 -0
  309. package/dist/esm/InternalUnderlinedBadgeText-3e2de35c.js +4 -0
  310. package/dist/esm/InternalUnderlinedBadgeText-3e2de35c.js.map +1 -0
  311. package/dist/esm/Span-bb5a31a5.js +4 -0
  312. package/dist/esm/Span-bb5a31a5.js.map +1 -0
  313. package/dist/esm/{access-and-short-key-152ce1ef.js → access-and-short-key-864aafba.js} +1 -1
  314. package/dist/esm/{access-and-short-key-152ce1ef.js.map → access-and-short-key-864aafba.js.map} +1 -1
  315. package/dist/esm/{align-9ab97987.js → align-3f029493.js} +1 -1
  316. package/dist/esm/{align-9ab97987.js.map → align-3f029493.js.map} +1 -1
  317. package/dist/esm/align-floating-elements-a8debc3a.js +4 -0
  318. package/dist/esm/align-floating-elements-a8debc3a.js.map +1 -0
  319. package/dist/esm/app-globals-38c128f4.js +4 -0
  320. package/dist/esm/{app-globals-d228e5bf.js.map → app-globals-38c128f4.js.map} +1 -1
  321. package/dist/esm/{aria-expanded-8e67b300.js → aria-expanded-1b7c2c54.js} +1 -1
  322. package/dist/esm/{aria-expanded-8e67b300.js.map → aria-expanded-1b7c2c54.js.map} +1 -1
  323. package/dist/esm/{associated.controller-1037cac7.js → associated.controller-bce3d721.js} +1 -1
  324. package/dist/esm/{associated.controller-1037cac7.js.map → associated.controller-bce3d721.js.map} +1 -1
  325. package/dist/esm/{color-1f72e388.js → color-cce3e447.js} +1 -1
  326. package/dist/esm/{color-1f72e388.js.map → color-cce3e447.js.map} +1 -1
  327. package/dist/esm/component-names-aa3cbc3c.js +4 -0
  328. package/dist/esm/component-names-aa3cbc3c.js.map +1 -0
  329. package/dist/esm/{controller-f13259ef.js → controller-6c2714a5.js} +1 -1
  330. package/dist/esm/{controller-f13259ef.js.map → controller-6c2714a5.js.map} +1 -1
  331. package/dist/esm/{controller-bd9a7a74.js → controller-82199ba0.js} +1 -1
  332. package/dist/esm/{controller-bd9a7a74.js.map → controller-82199ba0.js.map} +1 -1
  333. package/dist/esm/{controller-d9e11e4b.js → controller-ae3a41a0.js} +1 -1
  334. package/dist/esm/{controller-d9e11e4b.js.map → controller-ae3a41a0.js.map} +1 -1
  335. package/dist/esm/{controller-4e654fd8.js → controller-b379ae04.js} +1 -1
  336. package/dist/esm/{controller-4e654fd8.js.map → controller-b379ae04.js.map} +1 -1
  337. package/dist/esm/{controller-49695b25.js → controller-d2533e17.js} +1 -1
  338. package/dist/esm/{controller-49695b25.js.map → controller-d2533e17.js.map} +1 -1
  339. package/dist/esm/{controller-icon-ce179ccc.js → controller-icon-30817124.js} +1 -1
  340. package/dist/esm/{controller-icon-ce179ccc.js.map → controller-icon-30817124.js.map} +1 -1
  341. package/dist/esm/custom-class-9311655e.js +4 -0
  342. package/dist/esm/{custom-class-b0ea92e7.js.map → custom-class-9311655e.js.map} +1 -1
  343. package/dist/esm/{dev.utils-a25f785b.js → dev.utils-5d039f3c.js} +1 -1
  344. package/dist/esm/{dev.utils-a25f785b.js.map → dev.utils-5d039f3c.js.map} +1 -1
  345. package/dist/esm/{devtools-dfd69ac6.js → devtools-26a65dd7.js} +1 -1
  346. package/dist/esm/{devtools-dfd69ac6.js.map → devtools-26a65dd7.js.map} +1 -1
  347. package/dist/esm/disabled-5fc4b444.js +4 -0
  348. package/dist/esm/{disabled-f3f40b67.js.map → disabled-5fc4b444.js.map} +1 -1
  349. package/dist/esm/{events-8fd2302d.js → events-3111c1e8.js} +1 -1
  350. package/dist/esm/{events-8fd2302d.js.map → events-3111c1e8.js.map} +1 -1
  351. package/dist/esm/{has-closer-935eb7bd.js → has-closer-aa8f6369.js} +1 -1
  352. package/dist/esm/{has-closer-935eb7bd.js.map → has-closer-aa8f6369.js.map} +1 -1
  353. package/dist/esm/{has-counter-157bd536.js → has-counter-a9dacd37.js} +1 -1
  354. package/dist/esm/{has-counter-157bd536.js.map → has-counter-a9dacd37.js.map} +1 -1
  355. package/dist/esm/{hide-label-b2ccddd2.js → hide-label-db0db59c.js} +1 -1
  356. package/dist/esm/{hide-label-b2ccddd2.js.map → hide-label-db0db59c.js.map} +1 -1
  357. package/dist/esm/{href-271410a7.js → href-31b01f08.js} +1 -1
  358. package/dist/esm/{href-271410a7.js.map → href-31b01f08.js.map} +1 -1
  359. package/dist/esm/{icons-d0a00e6e.js → icons-f3b7aabd.js} +1 -1
  360. package/dist/esm/{icons-d0a00e6e.js.map → icons-f3b7aabd.js.map} +1 -1
  361. package/dist/esm/{image-source-0d09b7c3.js → image-source-a6af4847.js} +1 -1
  362. package/dist/esm/{image-source-0d09b7c3.js.map → image-source-a6af4847.js.map} +1 -1
  363. package/dist/esm/index-541b643a.js +4 -0
  364. package/dist/esm/index-541b643a.js.map +1 -0
  365. package/dist/esm/index-a0b4dca2.js +4 -0
  366. package/dist/esm/index-a0b4dca2.js.map +1 -0
  367. package/dist/esm/index.js +1 -1
  368. package/dist/esm/kol-abbr.entry.js +1 -1
  369. package/dist/esm/kol-abbr.entry.js.map +1 -1
  370. package/dist/esm/kol-accordion.entry.js +1 -1
  371. package/dist/esm/kol-accordion.entry.js.map +1 -1
  372. package/dist/esm/kol-alert-wc.entry.js +1 -1
  373. package/dist/esm/kol-alert-wc.entry.js.map +1 -1
  374. package/dist/esm/kol-alert.entry.js +1 -1
  375. package/dist/esm/kol-avatar-wc.entry.js +1 -1
  376. package/dist/esm/kol-avatar.entry.js +1 -1
  377. package/dist/esm/kol-badge.entry.js +1 -1
  378. package/dist/esm/kol-badge.entry.js.map +1 -1
  379. package/dist/esm/kol-breadcrumb.entry.js +1 -1
  380. package/dist/esm/kol-button-group-wc.entry.js +1 -1
  381. package/dist/esm/kol-button-group.entry.js +1 -1
  382. package/dist/esm/kol-button-link.entry.js +1 -1
  383. package/dist/esm/kol-button-wc.entry.js +1 -1
  384. package/dist/esm/kol-button-wc.entry.js.map +1 -1
  385. package/dist/esm/kol-button.entry.js +1 -1
  386. package/dist/esm/kol-card.entry.js +1 -1
  387. package/dist/esm/kol-card.entry.js.map +1 -1
  388. package/dist/esm/kol-combobox.entry.js +1 -1
  389. package/dist/esm/kol-combobox.entry.js.map +1 -1
  390. package/dist/esm/kol-details.entry.js +1 -1
  391. package/dist/esm/kol-details.entry.js.map +1 -1
  392. package/dist/esm/kol-drawer.entry.js +1 -1
  393. package/dist/esm/kol-form.entry.js +1 -1
  394. package/dist/esm/kol-form.entry.js.map +1 -1
  395. package/dist/esm/kol-heading.entry.js +1 -1
  396. package/dist/esm/kol-heading.entry.js.map +1 -1
  397. package/dist/esm/kol-icon.entry.js +1 -1
  398. package/dist/esm/kol-image.entry.js +1 -1
  399. package/dist/esm/kol-indented-text-wc.entry.js +1 -1
  400. package/dist/esm/kol-indented-text.entry.js +1 -1
  401. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  402. package/dist/esm/kol-input-checkbox.entry.js.map +1 -1
  403. package/dist/esm/kol-input-color.entry.js +1 -1
  404. package/dist/esm/kol-input-color.entry.js.map +1 -1
  405. package/dist/esm/kol-input-date.entry.js +1 -1
  406. package/dist/esm/kol-input-date.entry.js.map +1 -1
  407. package/dist/esm/kol-input-email.entry.js +1 -1
  408. package/dist/esm/kol-input-email.entry.js.map +1 -1
  409. package/dist/esm/kol-input-file.entry.js +1 -1
  410. package/dist/esm/kol-input-file.entry.js.map +1 -1
  411. package/dist/esm/kol-input-number.entry.js +1 -1
  412. package/dist/esm/kol-input-number.entry.js.map +1 -1
  413. package/dist/esm/kol-input-password.entry.js +1 -1
  414. package/dist/esm/kol-input-password.entry.js.map +1 -1
  415. package/dist/esm/kol-input-radio.entry.js +1 -1
  416. package/dist/esm/kol-input-radio.entry.js.map +1 -1
  417. package/dist/esm/kol-input-range.entry.js +1 -1
  418. package/dist/esm/kol-input-range.entry.js.map +1 -1
  419. package/dist/esm/kol-input-text.entry.js +1 -1
  420. package/dist/esm/kol-input-text.entry.js.map +1 -1
  421. package/dist/esm/kol-input.entry.js +1 -1
  422. package/dist/esm/kol-input.entry.js.map +1 -1
  423. package/dist/esm/kol-kolibri.entry.js +1 -1
  424. package/dist/esm/kol-link-button.entry.js +1 -1
  425. package/dist/esm/kol-link-group.entry.js +1 -1
  426. package/dist/esm/kol-link-wc.entry.js +1 -1
  427. package/dist/esm/kol-link-wc.entry.js.map +1 -1
  428. package/dist/esm/kol-link.entry.js +1 -1
  429. package/dist/esm/kol-logo.entry.js +1 -1
  430. package/dist/esm/kol-modal.entry.js +1 -1
  431. package/dist/esm/kol-nav.entry.js +1 -1
  432. package/dist/esm/kol-pagination.entry.js +1 -1
  433. package/dist/esm/kol-popover-wc.entry.js +1 -1
  434. package/dist/esm/kol-progress.entry.js +1 -1
  435. package/dist/esm/kol-quote.entry.js +1 -1
  436. package/dist/esm/kol-select.entry.js +1 -1
  437. package/dist/esm/kol-select.entry.js.map +1 -1
  438. package/dist/esm/kol-single-select.entry.js +1 -1
  439. package/dist/esm/kol-single-select.entry.js.map +1 -1
  440. package/dist/esm/kol-skip-nav.entry.js +1 -1
  441. package/dist/esm/kol-spin.entry.js +1 -1
  442. package/dist/esm/kol-split-button.entry.js +1 -1
  443. package/dist/esm/kol-symbol.entry.js +1 -1
  444. package/dist/esm/kol-table-stateful.entry.js +1 -1
  445. package/dist/esm/kol-table-stateless-wc.entry.js +1 -1
  446. package/dist/esm/kol-table-stateless.entry.js +1 -1
  447. package/dist/esm/kol-table.entry.js +1 -1
  448. package/dist/esm/kol-tabs.entry.js +1 -1
  449. package/dist/esm/kol-textarea.entry.js +1 -1
  450. package/dist/esm/kol-textarea.entry.js.map +1 -1
  451. package/dist/esm/kol-toast-container.entry.js +1 -1
  452. package/dist/esm/kol-toast-container.entry.js.map +1 -1
  453. package/dist/esm/kol-toolbar.entry.js +1 -1
  454. package/dist/esm/kol-tooltip-wc.entry.js +1 -1
  455. package/dist/esm/kol-tooltip-wc.entry.js.map +1 -1
  456. package/dist/esm/kol-tree-item-wc.entry.js +1 -1
  457. package/dist/esm/kol-tree-item.entry.js +1 -1
  458. package/dist/esm/kol-tree-wc.entry.js +1 -1
  459. package/dist/esm/kol-tree.entry.js +1 -1
  460. package/dist/esm/kol-version.entry.js +1 -1
  461. package/dist/esm/kolibri.js +1 -1
  462. package/dist/esm/{label-ec7596fe.js → label-d70e7c34.js} +1 -1
  463. package/dist/esm/{label-ec7596fe.js.map → label-d70e7c34.js.map} +1 -1
  464. package/dist/esm/loader.js +1 -1
  465. package/dist/esm/{open-9bcc0f8e.js → open-f7031548.js} +1 -1
  466. package/dist/esm/{open-9bcc0f8e.js.map → open-f7031548.js.map} +1 -1
  467. package/dist/esm/{prop.validators-447b6d6f.js → prop.validators-c5e6ad2d.js} +1 -1
  468. package/dist/esm/{prop.validators-447b6d6f.js.map → prop.validators-c5e6ad2d.js.map} +1 -1
  469. package/dist/esm/{rows-aef46735.js → rows-64f9b5cb.js} +1 -1
  470. package/dist/esm/{rows-aef46735.js.map → rows-64f9b5cb.js.map} +1 -1
  471. package/dist/esm/show-5d826542.js +4 -0
  472. package/dist/esm/{show-13b0f17e.js.map → show-5d826542.js.map} +1 -1
  473. package/dist/esm/{suggestions-7c4f1360.js → suggestions-33f55ec2.js} +1 -1
  474. package/dist/esm/{suggestions-7c4f1360.js.map → suggestions-33f55ec2.js.map} +1 -1
  475. package/dist/esm/test-component.entry.js +1 -1
  476. package/dist/esm/{tooltip-align-0e8c7391.js → tooltip-align-c001aae2.js} +1 -1
  477. package/dist/esm/{tooltip-align-0e8c7391.js.map → tooltip-align-c001aae2.js.map} +1 -1
  478. package/dist/esm/{validation-f3f82897.js → validation-1a210179.js} +1 -1
  479. package/dist/esm/{validation-f3f82897.js.map → validation-1a210179.js.map} +1 -1
  480. package/dist/esm/{validation-e42ea805.js → validation-e83461ea.js} +1 -1
  481. package/dist/esm/{validation-e42ea805.js.map → validation-e83461ea.js.map} +1 -1
  482. package/dist/kolibri/Alert-a0cdc528.js +4 -0
  483. package/dist/kolibri/Alert-a0cdc528.js.map +1 -0
  484. package/dist/kolibri/Collapsible-0f95c96e.js +4 -0
  485. package/dist/kolibri/Collapsible-0f95c96e.js.map +1 -0
  486. package/dist/kolibri/FormFieldMsg-de303cbe.js +4 -0
  487. package/dist/kolibri/Heading-781aa65b.js +4 -0
  488. package/dist/kolibri/Heading-781aa65b.js.map +1 -0
  489. package/dist/kolibri/InternalUnderlinedBadgeText-3e2de35c.js +4 -0
  490. package/dist/kolibri/InternalUnderlinedBadgeText-3e2de35c.js.map +1 -0
  491. package/dist/kolibri/Span-bb5a31a5.js +4 -0
  492. package/dist/kolibri/Span-bb5a31a5.js.map +1 -0
  493. package/dist/kolibri/access-and-short-key-864aafba.js +4 -0
  494. package/dist/kolibri/align-3f029493.js +4 -0
  495. package/dist/kolibri/{align-floating-elements-8e48c550.js → align-floating-elements-a8debc3a.js} +1 -1
  496. package/dist/kolibri/align-floating-elements-a8debc3a.js.map +1 -0
  497. package/dist/kolibri/app-globals-38c128f4.js +4 -0
  498. package/dist/kolibri/{app-globals-d228e5bf.js.map → app-globals-38c128f4.js.map} +1 -1
  499. package/dist/kolibri/aria-expanded-1b7c2c54.js +4 -0
  500. package/dist/kolibri/{associated.controller-1037cac7.js → associated.controller-bce3d721.js} +1 -1
  501. package/dist/kolibri/{color-1f72e388.js → color-cce3e447.js} +1 -1
  502. package/dist/kolibri/component-names-aa3cbc3c.js +4 -0
  503. package/dist/kolibri/component-names-aa3cbc3c.js.map +1 -0
  504. package/dist/kolibri/controller-6c2714a5.js +4 -0
  505. package/dist/kolibri/{controller-bd9a7a74.js → controller-82199ba0.js} +1 -1
  506. package/dist/kolibri/{controller-d9e11e4b.js → controller-ae3a41a0.js} +1 -1
  507. package/dist/kolibri/{controller-4e654fd8.js → controller-b379ae04.js} +1 -1
  508. package/dist/kolibri/{controller-49695b25.js → controller-d2533e17.js} +1 -1
  509. package/dist/kolibri/controller-icon-30817124.js +4 -0
  510. package/dist/kolibri/custom-class-9311655e.js +4 -0
  511. package/dist/kolibri/{dev.utils-a25f785b.js → dev.utils-5d039f3c.js} +1 -1
  512. package/dist/kolibri/devtools-26a65dd7.js +4 -0
  513. package/dist/kolibri/{disabled-f3f40b67.js → disabled-5fc4b444.js} +1 -1
  514. package/dist/kolibri/{events-8fd2302d.js → events-3111c1e8.js} +1 -1
  515. package/dist/kolibri/has-closer-aa8f6369.js +4 -0
  516. package/dist/kolibri/has-counter-a9dacd37.js +4 -0
  517. package/dist/kolibri/hide-label-db0db59c.js +4 -0
  518. package/dist/kolibri/href-31b01f08.js +4 -0
  519. package/dist/kolibri/{icons-d0a00e6e.js → icons-f3b7aabd.js} +1 -1
  520. package/dist/kolibri/image-source-a6af4847.js +4 -0
  521. package/dist/kolibri/{index-b8f228e7.js → index-541b643a.js} +1 -1
  522. package/dist/kolibri/index-541b643a.js.map +1 -0
  523. package/dist/kolibri/{index-4e3a1dc7.js → index-a0b4dca2.js} +1 -1
  524. package/dist/kolibri/index-a0b4dca2.js.map +1 -0
  525. package/dist/kolibri/index.esm.js +1 -1
  526. package/dist/kolibri/kol-abbr.entry.js +1 -1
  527. package/dist/kolibri/kol-abbr.entry.js.map +1 -1
  528. package/dist/kolibri/kol-accordion.entry.js +1 -1
  529. package/dist/kolibri/kol-accordion.entry.js.map +1 -1
  530. package/dist/kolibri/kol-alert-wc.entry.js +1 -1
  531. package/dist/kolibri/kol-alert-wc.entry.js.map +1 -1
  532. package/dist/kolibri/kol-alert.entry.js +1 -1
  533. package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
  534. package/dist/kolibri/kol-avatar.entry.js +1 -1
  535. package/dist/kolibri/kol-badge.entry.js +1 -1
  536. package/dist/kolibri/kol-badge.entry.js.map +1 -1
  537. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  538. package/dist/kolibri/kol-button-group-wc.entry.js +1 -1
  539. package/dist/kolibri/kol-button-group.entry.js +1 -1
  540. package/dist/kolibri/kol-button-link.entry.js +1 -1
  541. package/dist/kolibri/kol-button-wc.entry.js +1 -1
  542. package/dist/kolibri/kol-button-wc.entry.js.map +1 -1
  543. package/dist/kolibri/kol-button.entry.js +1 -1
  544. package/dist/kolibri/kol-card.entry.js +1 -1
  545. package/dist/kolibri/kol-card.entry.js.map +1 -1
  546. package/dist/kolibri/kol-combobox.entry.js +1 -1
  547. package/dist/kolibri/kol-combobox.entry.js.map +1 -1
  548. package/dist/kolibri/kol-details.entry.js +1 -1
  549. package/dist/kolibri/kol-details.entry.js.map +1 -1
  550. package/dist/kolibri/kol-drawer.entry.js +1 -1
  551. package/dist/kolibri/kol-form.entry.js +1 -1
  552. package/dist/kolibri/kol-form.entry.js.map +1 -1
  553. package/dist/kolibri/kol-heading.entry.js +1 -1
  554. package/dist/kolibri/kol-heading.entry.js.map +1 -1
  555. package/dist/kolibri/kol-icon.entry.js +1 -1
  556. package/dist/kolibri/kol-image.entry.js +1 -1
  557. package/dist/kolibri/kol-indented-text-wc.entry.js +1 -1
  558. package/dist/kolibri/kol-indented-text.entry.js +1 -1
  559. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  560. package/dist/kolibri/kol-input-checkbox.entry.js.map +1 -1
  561. package/dist/kolibri/kol-input-color.entry.js +1 -1
  562. package/dist/kolibri/kol-input-color.entry.js.map +1 -1
  563. package/dist/kolibri/kol-input-date.entry.js +1 -1
  564. package/dist/kolibri/kol-input-date.entry.js.map +1 -1
  565. package/dist/kolibri/kol-input-email.entry.js +1 -1
  566. package/dist/kolibri/kol-input-email.entry.js.map +1 -1
  567. package/dist/kolibri/kol-input-file.entry.js +1 -1
  568. package/dist/kolibri/kol-input-file.entry.js.map +1 -1
  569. package/dist/kolibri/kol-input-number.entry.js +1 -1
  570. package/dist/kolibri/kol-input-number.entry.js.map +1 -1
  571. package/dist/kolibri/kol-input-password.entry.js +1 -1
  572. package/dist/kolibri/kol-input-password.entry.js.map +1 -1
  573. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  574. package/dist/kolibri/kol-input-radio.entry.js.map +1 -1
  575. package/dist/kolibri/kol-input-range.entry.js +1 -1
  576. package/dist/kolibri/kol-input-range.entry.js.map +1 -1
  577. package/dist/kolibri/kol-input-text.entry.js +1 -1
  578. package/dist/kolibri/kol-input-text.entry.js.map +1 -1
  579. package/dist/kolibri/kol-input.entry.js +1 -1
  580. package/dist/kolibri/kol-input.entry.js.map +1 -1
  581. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  582. package/dist/kolibri/kol-link-button.entry.js +1 -1
  583. package/dist/kolibri/kol-link-group.entry.js +1 -1
  584. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  585. package/dist/kolibri/kol-link-wc.entry.js.map +1 -1
  586. package/dist/kolibri/kol-link.entry.js +1 -1
  587. package/dist/kolibri/kol-logo.entry.js +1 -1
  588. package/dist/kolibri/kol-modal.entry.js +1 -1
  589. package/dist/kolibri/kol-nav.entry.js +1 -1
  590. package/dist/kolibri/kol-nav.entry.js.map +1 -1
  591. package/dist/kolibri/kol-pagination.entry.js +1 -1
  592. package/dist/kolibri/kol-pagination.entry.js.map +1 -1
  593. package/dist/kolibri/kol-popover-wc.entry.js +1 -1
  594. package/dist/kolibri/kol-progress.entry.js +1 -1
  595. package/dist/kolibri/kol-quote.entry.js +1 -1
  596. package/dist/kolibri/kol-select.entry.js +1 -1
  597. package/dist/kolibri/kol-select.entry.js.map +1 -1
  598. package/dist/kolibri/kol-single-select.entry.js +1 -1
  599. package/dist/kolibri/kol-single-select.entry.js.map +1 -1
  600. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  601. package/dist/kolibri/kol-spin.entry.js +1 -1
  602. package/dist/kolibri/kol-split-button.entry.js +1 -1
  603. package/dist/kolibri/kol-split-button.entry.js.map +1 -1
  604. package/dist/kolibri/kol-symbol.entry.js +1 -1
  605. package/dist/kolibri/kol-table-stateful.entry.js +1 -1
  606. package/dist/kolibri/kol-table-stateless-wc.entry.js +1 -1
  607. package/dist/kolibri/kol-table-stateless.entry.js +1 -1
  608. package/dist/kolibri/kol-table.entry.js +1 -1
  609. package/dist/kolibri/kol-tabs.entry.js +1 -1
  610. package/dist/kolibri/kol-textarea.entry.js +1 -1
  611. package/dist/kolibri/kol-textarea.entry.js.map +1 -1
  612. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  613. package/dist/kolibri/kol-toast-container.entry.js.map +1 -1
  614. package/dist/kolibri/kol-toolbar.entry.js +1 -1
  615. package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
  616. package/dist/kolibri/kol-tooltip-wc.entry.js.map +1 -1
  617. package/dist/kolibri/kol-tree-item-wc.entry.js +1 -1
  618. package/dist/kolibri/kol-tree-item.entry.js +1 -1
  619. package/dist/kolibri/kol-tree-wc.entry.js +1 -1
  620. package/dist/kolibri/kol-tree.entry.js +1 -1
  621. package/dist/kolibri/kol-version.entry.js +1 -1
  622. package/dist/kolibri/kolibri.esm.js +1 -1
  623. package/dist/kolibri/kolibri.esm.js.map +1 -1
  624. package/dist/kolibri/{label-ec7596fe.js → label-d70e7c34.js} +1 -1
  625. package/dist/kolibri/open-f7031548.js +4 -0
  626. package/dist/kolibri/{prop.validators-447b6d6f.js → prop.validators-c5e6ad2d.js} +1 -1
  627. package/dist/kolibri/rows-64f9b5cb.js +4 -0
  628. package/dist/kolibri/show-5d826542.js +4 -0
  629. package/dist/kolibri/{suggestions-7c4f1360.js → suggestions-33f55ec2.js} +1 -1
  630. package/dist/kolibri/test-component.entry.js +1 -1
  631. package/dist/kolibri/tooltip-align-c001aae2.js +4 -0
  632. package/dist/kolibri/validation-1a210179.js +4 -0
  633. package/dist/kolibri/validation-e83461ea.js +4 -0
  634. package/dist/types/components/abbr/shadow.d.ts +2 -5
  635. package/dist/types/components/badge/shadow.d.ts +1 -0
  636. package/dist/types/components/card/shadow.d.ts +1 -1
  637. package/dist/types/components/heading/shadow.d.ts +9 -3
  638. package/dist/types/components.d.ts +2 -110
  639. package/dist/types/core/component-names.d.ts +0 -2
  640. package/dist/types/functional-components/Alert/Alert.d.ts +1 -1
  641. package/dist/types/functional-components/Collapsible/Collapsible.d.ts +1 -1
  642. package/dist/types/functional-components/Heading/Heading.d.ts +21 -0
  643. package/dist/types/functional-components/Heading/index.d.ts +1 -0
  644. package/dist/types/functional-components/Heading/test/Heading.test.d.ts +1 -0
  645. package/dist/types/functional-components/Heading/test/snapshot.test.d.ts +1 -0
  646. package/dist/types/functional-components/Icon/Icon.d.ts +11 -0
  647. package/dist/types/functional-components/Icon/index.d.ts +1 -0
  648. package/dist/types/functional-components/InternalUnderlinedBadgeText/InternalUnderlinedBadgeText.d.ts +8 -0
  649. package/dist/types/functional-components/InternalUnderlinedBadgeText/index.d.ts +1 -0
  650. package/dist/types/functional-components/Span/IconHelper.d.ts +6 -0
  651. package/dist/types/functional-components/Span/LabelHelper.d.ts +9 -0
  652. package/dist/types/functional-components/Span/Span.d.ts +12 -0
  653. package/dist/types/functional-components/Span/SpanCoreHelper.d.ts +9 -0
  654. package/dist/types/functional-components/Span/index.d.ts +1 -0
  655. package/dist/types/functional-components/Span/test/snapshot.test.d.ts +1 -0
  656. package/dist/types/functional-components/ToastItem/ToastItem.d.ts +10 -0
  657. package/dist/types/functional-components/ToastItem/index.d.ts +1 -0
  658. package/dist/types/functional-components/ToastItem/tests/snapshot.test.d.ts +1 -0
  659. package/dist/types/functional-components/index.d.ts +1 -1
  660. package/dist/types/schema/components/abbr.d.ts +3 -3
  661. package/dist/types/schema/components/badge.d.ts +5 -3
  662. package/dist/types/schema/components/icon.d.ts +1 -0
  663. package/dist/types/schema/types/icons.d.ts +1 -1
  664. package/doc/abbr.md +7 -48
  665. package/doc/accordion.md +1 -108
  666. package/doc/alert.md +1 -85
  667. package/doc/avatar.md +1 -45
  668. package/doc/badge.md +1 -96
  669. package/doc/breadcrumb.md +1 -84
  670. package/doc/button-group.md +1 -89
  671. package/doc/button-link.md +1 -48
  672. package/doc/button.md +1 -117
  673. package/doc/card.md +1 -65
  674. package/doc/combobox.md +1 -50
  675. package/doc/details.md +1 -89
  676. package/doc/drawer.md +1 -126
  677. package/doc/form.md +1 -21
  678. package/doc/heading.md +5 -38
  679. package/doc/icon.md +1 -43
  680. package/doc/image.md +1 -51
  681. package/doc/indented-text.md +1 -36
  682. package/doc/input-checkbox.md +1 -78
  683. package/doc/input-color.md +1 -44
  684. package/doc/input-date.md +1 -99
  685. package/doc/input-email.md +1 -65
  686. package/doc/input-file.md +1 -64
  687. package/doc/input-number.md +1 -56
  688. package/doc/input-password.md +1 -57
  689. package/doc/input-radio.md +1 -97
  690. package/doc/input-range.md +1 -75
  691. package/doc/input-text.md +1 -80
  692. package/doc/kolibri.md +1 -18
  693. package/doc/link-button.md +1 -26
  694. package/doc/link-group.md +1 -81
  695. package/doc/link.md +1 -71
  696. package/doc/modal.md +1 -91
  697. package/doc/nav.md +1 -110
  698. package/doc/pagination.md +1 -42
  699. package/doc/progress.md +1 -41
  700. package/doc/quote.md +1 -63
  701. package/doc/select.md +1 -112
  702. package/doc/single-select.md +0 -28
  703. package/doc/skip-nav.md +1 -50
  704. package/doc/spin.md +1 -113
  705. package/doc/split-button.md +1 -24
  706. package/doc/table-stateful.md +1 -184
  707. package/doc/table-stateless.md +1 -72
  708. package/doc/table.md +1 -176
  709. package/doc/tabs.md +1 -89
  710. package/doc/textarea.md +1 -73
  711. package/doc/toaster.md +1 -71
  712. package/doc/toolbar.md +1 -46
  713. package/doc/tree-item.md +1 -3
  714. package/doc/tree.md +1 -70
  715. package/doc/version.md +1 -23
  716. package/package.json +2 -2
  717. package/vscode-custom-data.json +52 -70
  718. package/dist/cjs/Alert-1c1aa0a2.js +0 -4
  719. package/dist/cjs/Alert-1c1aa0a2.js.map +0 -1
  720. package/dist/cjs/Collapsible-92c49ec7.js +0 -4
  721. package/dist/cjs/Collapsible-92c49ec7.js.map +0 -1
  722. package/dist/cjs/FormFieldMsg-d80dcd4f.js +0 -4
  723. package/dist/cjs/InternalUnderlinedBadgeText-c0b22e2d.js +0 -4
  724. package/dist/cjs/InternalUnderlinedBadgeText-c0b22e2d.js.map +0 -1
  725. package/dist/cjs/align-floating-elements-3de0ad8d.js.map +0 -1
  726. package/dist/cjs/app-globals-26d718f3.js +0 -4
  727. package/dist/cjs/badge-text-57022467.js +0 -4
  728. package/dist/cjs/badge-text-57022467.js.map +0 -1
  729. package/dist/cjs/component-names-72b76dc7.js +0 -4
  730. package/dist/cjs/component-names-72b76dc7.js.map +0 -1
  731. package/dist/cjs/custom-class-c76ab076.js +0 -4
  732. package/dist/cjs/disabled-622c5d44.js +0 -4
  733. package/dist/cjs/has-closer-3fd3eec9.js +0 -4
  734. package/dist/cjs/has-counter-087c240e.js +0 -4
  735. package/dist/cjs/hide-label-79400d3a.js +0 -4
  736. package/dist/cjs/href-b13ee308.js +0 -4
  737. package/dist/cjs/image-source-c99a7661.js +0 -4
  738. package/dist/cjs/index-42c7434d.js +0 -4
  739. package/dist/cjs/index-42c7434d.js.map +0 -1
  740. package/dist/cjs/index-431b4ae3.js +0 -4
  741. package/dist/cjs/index-431b4ae3.js.map +0 -1
  742. package/dist/cjs/kol-heading-wc.cjs.entry.js +0 -4
  743. package/dist/cjs/kol-heading-wc.cjs.entry.js.map +0 -1
  744. package/dist/cjs/kol-span-wc.cjs.entry.js +0 -4
  745. package/dist/cjs/kol-span-wc.cjs.entry.js.map +0 -1
  746. package/dist/cjs/open-a86a97fa.js +0 -4
  747. package/dist/cjs/rows-b7a0c507.js +0 -4
  748. package/dist/cjs/show-bf69e208.js +0 -4
  749. package/dist/cjs/tooltip-align-c4050c7a.js +0 -4
  750. package/dist/components/badge-text.js +0 -4
  751. package/dist/components/badge-text.js.map +0 -1
  752. package/dist/components/kol-heading-wc.d.ts +0 -11
  753. package/dist/components/kol-heading-wc.js +0 -4
  754. package/dist/components/kol-heading-wc.js.map +0 -1
  755. package/dist/components/kol-span-wc.d.ts +0 -11
  756. package/dist/components/kol-span-wc.js +0 -4
  757. package/dist/components/kol-span-wc.js.map +0 -1
  758. package/dist/esm/Alert-5662dc3c.js +0 -4
  759. package/dist/esm/Alert-5662dc3c.js.map +0 -1
  760. package/dist/esm/Collapsible-e08d6f52.js +0 -4
  761. package/dist/esm/Collapsible-e08d6f52.js.map +0 -1
  762. package/dist/esm/InternalUnderlinedBadgeText-bccc22ee.js +0 -4
  763. package/dist/esm/InternalUnderlinedBadgeText-bccc22ee.js.map +0 -1
  764. package/dist/esm/align-floating-elements-8e48c550.js +0 -4
  765. package/dist/esm/align-floating-elements-8e48c550.js.map +0 -1
  766. package/dist/esm/app-globals-d228e5bf.js +0 -4
  767. package/dist/esm/badge-text-96a139c4.js +0 -4
  768. package/dist/esm/badge-text-96a139c4.js.map +0 -1
  769. package/dist/esm/component-names-d278f819.js +0 -4
  770. package/dist/esm/component-names-d278f819.js.map +0 -1
  771. package/dist/esm/custom-class-b0ea92e7.js +0 -4
  772. package/dist/esm/disabled-f3f40b67.js +0 -4
  773. package/dist/esm/index-4e3a1dc7.js +0 -4
  774. package/dist/esm/index-4e3a1dc7.js.map +0 -1
  775. package/dist/esm/index-b8f228e7.js +0 -4
  776. package/dist/esm/index-b8f228e7.js.map +0 -1
  777. package/dist/esm/kol-heading-wc.entry.js +0 -4
  778. package/dist/esm/kol-heading-wc.entry.js.map +0 -1
  779. package/dist/esm/kol-span-wc.entry.js +0 -4
  780. package/dist/esm/kol-span-wc.entry.js.map +0 -1
  781. package/dist/esm/show-13b0f17e.js +0 -4
  782. package/dist/kolibri/Alert-5662dc3c.js +0 -4
  783. package/dist/kolibri/Alert-5662dc3c.js.map +0 -1
  784. package/dist/kolibri/Collapsible-e08d6f52.js +0 -4
  785. package/dist/kolibri/Collapsible-e08d6f52.js.map +0 -1
  786. package/dist/kolibri/FormFieldMsg-3f74273a.js +0 -4
  787. package/dist/kolibri/InternalUnderlinedBadgeText-bccc22ee.js +0 -4
  788. package/dist/kolibri/InternalUnderlinedBadgeText-bccc22ee.js.map +0 -1
  789. package/dist/kolibri/access-and-short-key-152ce1ef.js +0 -4
  790. package/dist/kolibri/align-9ab97987.js +0 -4
  791. package/dist/kolibri/align-floating-elements-8e48c550.js.map +0 -1
  792. package/dist/kolibri/app-globals-d228e5bf.js +0 -4
  793. package/dist/kolibri/aria-expanded-8e67b300.js +0 -4
  794. package/dist/kolibri/badge-text-96a139c4.js +0 -4
  795. package/dist/kolibri/badge-text-96a139c4.js.map +0 -1
  796. package/dist/kolibri/component-names-d278f819.js +0 -4
  797. package/dist/kolibri/component-names-d278f819.js.map +0 -1
  798. package/dist/kolibri/controller-f13259ef.js +0 -4
  799. package/dist/kolibri/controller-icon-ce179ccc.js +0 -4
  800. package/dist/kolibri/custom-class-b0ea92e7.js +0 -4
  801. package/dist/kolibri/devtools-dfd69ac6.js +0 -4
  802. package/dist/kolibri/has-closer-935eb7bd.js +0 -4
  803. package/dist/kolibri/has-counter-157bd536.js +0 -4
  804. package/dist/kolibri/hide-label-b2ccddd2.js +0 -4
  805. package/dist/kolibri/href-271410a7.js +0 -4
  806. package/dist/kolibri/image-source-0d09b7c3.js +0 -4
  807. package/dist/kolibri/index-4e3a1dc7.js.map +0 -1
  808. package/dist/kolibri/index-b8f228e7.js.map +0 -1
  809. package/dist/kolibri/kol-heading-wc.entry.js +0 -4
  810. package/dist/kolibri/kol-heading-wc.entry.js.map +0 -1
  811. package/dist/kolibri/kol-span-wc.entry.js +0 -4
  812. package/dist/kolibri/kol-span-wc.entry.js.map +0 -1
  813. package/dist/kolibri/open-9bcc0f8e.js +0 -4
  814. package/dist/kolibri/rows-aef46735.js +0 -4
  815. package/dist/kolibri/show-13b0f17e.js +0 -4
  816. package/dist/kolibri/tooltip-align-0e8c7391.js +0 -4
  817. package/dist/kolibri/validation-e42ea805.js +0 -4
  818. package/dist/kolibri/validation-f3f82897.js +0 -4
  819. package/dist/types/components/heading/component.d.ts +0 -17
  820. package/dist/types/components/span/InternalUnderlinedBadgeText.d.ts +0 -7
  821. package/dist/types/components/span/component.d.ts +0 -17
  822. package/dist/types/components/toaster/InternalToast.d.ts +0 -9
  823. package/doc/popover.md +0 -26
  824. package/doc/span.md +0 -32
  825. package/doc/tooltip.md +0 -47
  826. /package/dist/kolibri/{FormFieldMsg-3f74273a.js.map → FormFieldMsg-de303cbe.js.map} +0 -0
  827. /package/dist/kolibri/{access-and-short-key-152ce1ef.js.map → access-and-short-key-864aafba.js.map} +0 -0
  828. /package/dist/kolibri/{align-9ab97987.js.map → align-3f029493.js.map} +0 -0
  829. /package/dist/kolibri/{aria-expanded-8e67b300.js.map → aria-expanded-1b7c2c54.js.map} +0 -0
  830. /package/dist/kolibri/{associated.controller-1037cac7.js.map → associated.controller-bce3d721.js.map} +0 -0
  831. /package/dist/kolibri/{color-1f72e388.js.map → color-cce3e447.js.map} +0 -0
  832. /package/dist/kolibri/{controller-f13259ef.js.map → controller-6c2714a5.js.map} +0 -0
  833. /package/dist/kolibri/{controller-bd9a7a74.js.map → controller-82199ba0.js.map} +0 -0
  834. /package/dist/kolibri/{controller-d9e11e4b.js.map → controller-ae3a41a0.js.map} +0 -0
  835. /package/dist/kolibri/{controller-4e654fd8.js.map → controller-b379ae04.js.map} +0 -0
  836. /package/dist/kolibri/{controller-49695b25.js.map → controller-d2533e17.js.map} +0 -0
  837. /package/dist/kolibri/{controller-icon-ce179ccc.js.map → controller-icon-30817124.js.map} +0 -0
  838. /package/dist/kolibri/{custom-class-b0ea92e7.js.map → custom-class-9311655e.js.map} +0 -0
  839. /package/dist/kolibri/{dev.utils-a25f785b.js.map → dev.utils-5d039f3c.js.map} +0 -0
  840. /package/dist/kolibri/{devtools-dfd69ac6.js.map → devtools-26a65dd7.js.map} +0 -0
  841. /package/dist/kolibri/{disabled-f3f40b67.js.map → disabled-5fc4b444.js.map} +0 -0
  842. /package/dist/kolibri/{events-8fd2302d.js.map → events-3111c1e8.js.map} +0 -0
  843. /package/dist/kolibri/{has-closer-935eb7bd.js.map → has-closer-aa8f6369.js.map} +0 -0
  844. /package/dist/kolibri/{has-counter-157bd536.js.map → has-counter-a9dacd37.js.map} +0 -0
  845. /package/dist/kolibri/{hide-label-b2ccddd2.js.map → hide-label-db0db59c.js.map} +0 -0
  846. /package/dist/kolibri/{href-271410a7.js.map → href-31b01f08.js.map} +0 -0
  847. /package/dist/kolibri/{icons-d0a00e6e.js.map → icons-f3b7aabd.js.map} +0 -0
  848. /package/dist/kolibri/{image-source-0d09b7c3.js.map → image-source-a6af4847.js.map} +0 -0
  849. /package/dist/kolibri/{label-ec7596fe.js.map → label-d70e7c34.js.map} +0 -0
  850. /package/dist/kolibri/{open-9bcc0f8e.js.map → open-f7031548.js.map} +0 -0
  851. /package/dist/kolibri/{prop.validators-447b6d6f.js.map → prop.validators-c5e6ad2d.js.map} +0 -0
  852. /package/dist/kolibri/{rows-aef46735.js.map → rows-64f9b5cb.js.map} +0 -0
  853. /package/dist/kolibri/{show-13b0f17e.js.map → show-5d826542.js.map} +0 -0
  854. /package/dist/kolibri/{suggestions-7c4f1360.js.map → suggestions-33f55ec2.js.map} +0 -0
  855. /package/dist/kolibri/{tooltip-align-0e8c7391.js.map → tooltip-align-c001aae2.js.map} +0 -0
  856. /package/dist/kolibri/{validation-f3f82897.js.map → validation-1a210179.js.map} +0 -0
  857. /package/dist/kolibri/{validation-e42ea805.js.map → validation-e83461ea.js.map} +0 -0
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as e,h as t,H as i,g as s}from"./index-4e3a1dc7.js";import{g as n,a as o,c as l}from"./component-names-d278f819.js";import{t as a}from"./i18n-5fe08f1c.js";import{t as d}from"./events-29e84d75.js";import{n as r}from"./dev.utils-a25f785b.js";import{t as c,o as h,p as f,w as u,i as v}from"./prop.validators-447b6d6f.js";import{v as p,a as b,d as y,b as m,E as k}from"./events-8fd2302d.js";import{v as g}from"./label-ec7596fe.js";import"./i18n-7ea9f137.js";import"./reuse-32931294.js";import"./dev.utils-fab45cbc.js";import"./index-b8f228e7.js";import"./common-54bf85ba.js";const w=(e,t)=>{c(t,(()=>{h(t,(()=>{try{t=f(t)}catch(e){}u(e,"_headerCells",(e=>"object"==typeof e&&null!==e),new Set(["TableHeaderCellsPropType"]),t)}))}))},_=class{constructor(a){e(this,a),this.horizontal=!0,this.cellsToRenderTimeouts=new Map,this.dataToKeyMap=new Map,this.checkboxRefs=[],this.renderTableRow=(e,a,i)=>{var l,o;let n=String(a);return this.horizontal&&(null===(l=e[0])||void 0===l?void 0:l.data)&&(n=null!==(o=this.getDataKey(e[0].data))&&void 0!==o?o:n),t("tr",{key:`row-${n}`},this.renderSelectionCell(e,a),e.map(((e,t)=>this.renderTableCell(e,a,t,i))))},this.renderTableCell=(e,a,i,l)=>{let o=`${a}-${i}-${e.label}`;if(e.data){const t=this.getDataKey(e.data);o=t?`${t}-${this.horizontal?i:a}`:o}return!1===e.asTd?this.renderHeadingCell(e,a,i,l):t("td",{key:`cell-${o}`,class:{[e.textAlign]:"string"==typeof e.textAlign&&e.textAlign.length>0},colSpan:e.colSpan,rowSpan:e.rowSpan,style:{textAlign:e.textAlign,width:e.width},ref:"function"==typeof e.render?t=>{this.cellRender(e,t)}:void 0},"function"!=typeof e.render?e.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){b(this,e)}validateHeaderCells(e){w(this,e)}validateLabel(e){g(this,e,{required:!0})}validateMinWidth(e){v(this,"_minWidth",e,{defaultValue:void 0})}validateOn(e){y(this,e)}validateSelection(e){m(this,e)}handleKeyDown(e){var t;if("ArrowUp"===e.key||"ArrowDown"===e.key){const a=null===(t=this.tableDivElement)||void 0===t?void 0:t.querySelector(":focus");let i=this.checkboxRefs.indexOf(a);i>-1&&(e.preventDefault(),"ArrowDown"===e.key?(i=(i+1)%this.checkboxRefs.length,this.checkboxRefs[i].focus()):"ArrowUp"===e.key&&(e.preventDefault(),i=(i+this.checkboxRefs.length-1)%this.checkboxRefs.length,this.checkboxRefs[i].focus()))}}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),n=this.getNumberOfCols(t.horizontal,e);let s=this.getNumberOfRows(t.vertical,e),r=0;i&&(r=s,s+=(null===(l=this.state._dataFoot)||void 0===l?void 0:l.length)||0);const c=[],d=[],h=[];t.vertical.forEach(((e,t)=>{d[t]=0,h[t]=[]}));for(let a=r;a<s;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+d[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);d[t]++}}}));for(let t=0;t<n;t++)if(!0===this.horizontal){const n=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 n&&null!==n&&l.push(Object.assign(Object.assign({},o[t]),{colSpan:void 0,data:n,label:n[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}));c.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===c.length?c.push([l]):c[0].push(l)}return c}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(e,a){var i,l,s;const r=this.state._selection;if(!r)return"";const c=null!==(i=r.keyPropertyName)&&void 0!==i?i:"id",h=null===(l=e[0])||void 0===l?void 0:l.data;if(!h)return"";const v=h[c],p=r.multiple||void 0===r.multiple,b=null===(s=null==r?void 0:r.selectedKeys)||void 0===s?void 0:s.includes(v),f=r.label(h),u={name:"selection",checked:b,id:v,"aria-label":f};return t("td",{key:`tbody-${a}-selection`,class:"selection-cell"},t("div",{class:"input "+(b?"checked":"")},p?t("label",{class:"checkbox-container"},t(n,{class:"icon",_icons:"codicon "+(b?"codicon-check":""),_label:""}),t("input",Object.assign({ref:e=>e&&this.checkboxRefs.push(e)},u,{type:"checkbox",onInput:e=>{var t,a,i;const l=b?null===(a=null==r?void 0:r.selectedKeys)||void 0===a?void 0:a.filter((e=>e!==v)):[...null!==(t=null==r?void 0:r.selectedKeys)&&void 0!==t?t:[],v];d("selection-change",this.host,l),"function"==typeof(null===(i=this.state._on)||void 0===i?void 0:i[k.onSelectionChange])&&this.state._on[k.onSelectionChange](e,null!=l?l:[])}}))):t("label",{class:"radio-container"},t("input",Object.assign({},u,{type:"radio",onInput:e=>{var t;d("selection-change",this.host,v),"function"==typeof(null===(t=this.state._on)||void 0===t?void 0:t[k.onSelectionChange])&&this.state._on[k.onSelectionChange](e,v)}}))),t(o,{"aria-hidden":"true",class:"input-tooltip",_align:"right",_id:`${v}-label`,_label:f})))}renderHeadingSelectionCell(){var e,i;const l=this.state._selection;if(!l||!l.multiple&&void 0!==l.multiple)return t("th",{key:"thead-0"});const s=null!==(e=l.keyPropertyName)&&void 0!==e?e:"id",r=null===(i=l.selectedKeys)||void 0===i?void 0:i.length,c=r===this.state._data.length,h=0!==r&&!c;let v="kol-table-selection-indeterminate";c&&!h&&(v="kol-table-selection-none"),0===r&&(v="kol-table-selection-all");const p=a(v);return t("th",{key:"thead-0-selection",class:"selection-cell selection-control"},t("div",{class:"input "+(h?"indeterminate":c?"checked":"")},t("label",{class:"checkbox-container"},t(n,{class:"icon",_icons:"codicon "+(h?"codicon-remove":c?"codicon-check":""),_label:""}),t("input",{ref:e=>e&&this.checkboxRefs.push(e),name:"selection",checked:c&&!h,"aria-label":p,type:"checkbox",onInput:e=>{var t;const a=c?[]:this.state._data.map((e=>null==e?void 0:e[s]));d("selection-change",this.host,a),"function"==typeof(null===(t=this.state._on)||void 0===t?void 0:t[k.onSelectionChange])&&this.state._on[k.onSelectionChange](e,a)}})),t(o,{"aria-hidden":"true",class:"input-tooltip",_align:"right",_id:`${v}-label`,_label:p})))}renderHeadingCell(e,a,i,o){let n,s="codicon codicon-fold";if(e.sortDirection)switch(e.sortDirection){case"ASC":s="codicon codicon-chevron-up",n="ascending";break;case"DESC":s="codicon codicon-chevron-down",n="descending"}const r=o?"row":"number"==typeof e.colSpan&&e.colSpan>1?"colgroup":"col";return t("th",{key:`${a}-${i}-${e.label}`,class:e.textAlign?`align-${e.textAlign}`:void 0,scope:r,colSpan:e.colSpan,rowSpan:e.rowSpan,style:{width:e.width},"aria-sort":n,"data-sort":`sort-${e.sortDirection}`},e.sortDirection?t(l,{class:"table-sort-button",exportparts:"icon",_icons:{right:s},_label:e.label,_on:{onClick:t=>{var a;"function"==typeof(null===(a=this.state._on)||void 0===a?void 0:a.onSort)&&e.key&&e.sortDirection&&this.state._on.onSort(t,{key:e.key,currentSortDirection:e.sortDirection})}}}):e.label)}renderSpacer(e,a){var i;const l=null===(i=null==a?void 0:a[0])||void 0===i?void 0:i.reduce(((e,t)=>e+(t.colSpan||1)),0);return t("tr",{class:`${e}-spacer`,"aria-hidden":"true"},t("td",{colSpan:l}))}renderFoot(){if(!this.state._dataFoot||0===this.state._dataFoot.length)return null;const e=this.createDataField(this.state._dataFoot,this.state._headerCells,!0);return t("tfoot",null,[this.renderSpacer("foot",e),e.map(((e,t)=>this.renderTableRow(e,t,!0)))])}render(){const e=this.createDataField(this.state._data,this.state._headerCells);return this.checkboxRefs=[],t(i,{key:"215026e1368f66194ebd3269337f796c061fc374",class:"kol-table-stateless-wc"},t("div",{key:"1a63ff928babc2d906287f2e8fbaca897c0a043a",ref:e=>this.tableDivElement=e,class:"table",tabindex:this.tableDivElementHasScrollbar?"-1":void 0},t("table",{key:"6e5e32b75489ef481ba3ea47c548bf2ca7533423",style:{minWidth:this.state._minWidth}},t("div",{key:"578f5e88ece3b1e966c4de611203d5498df3b88a",class:"focus-element",tabindex:this.tableDivElementHasScrollbar?"0":void 0,"aria-describedby":"caption"}," "),t("caption",{key:"6ee0f0ad7781a77cf9a82ebe8375c088c100888a",id:"caption"},this.state._label),Array.isArray(this.state._headerCells.horizontal)&&t("thead",{key:"4dc023f72802e7fa3c1662fbf7b8a2e31879c4dd"},[this.state._headerCells.horizontal.map(((e,a)=>t("tr",{key:`thead-${a}`},this.state._selection&&this.renderHeadingSelectionCell(),e.map(((e,i)=>!0===e.asTd?t("td",{key:`thead-${a}-${i}-${e.label}`,class:{[e.textAlign]:"string"==typeof e.textAlign&&e.textAlign.length>0},colSpan:e.colSpan,rowSpan:e.rowSpan,style:{textAlign:e.textAlign,width:e.width},ref:"function"==typeof e.render?t=>{this.cellRender(e,t)}:void 0},"function"!=typeof e.render?e.label:""):this.renderHeadingCell(e,a,i,!1)))))),this.renderSpacer("head",this.state._headerCells.horizontal)]),t("tbody",{key:"eda54c00f2e690d59a3883f6d470b225d8bdd99a"},e.map(((e,t)=>this.renderTableRow(e,t,!0)))),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{_ as kol_table_stateless_wc};
4
+ import{r as t,h as e,H as i,g as s}from"./index-a0b4dca2.js";import{d as n,u as o,a as l}from"./component-names-aa3cbc3c.js";import{t as a}from"./i18n-5fe08f1c.js";import{t as d}from"./events-29e84d75.js";import{n as r}from"./dev.utils-5d039f3c.js";import{t as c,o as h,p as f,w as u,i as v}from"./prop.validators-c5e6ad2d.js";import{v as p,a as b,d as y,b as m,E as k}from"./events-3111c1e8.js";import{v as g}from"./label-d70e7c34.js";import"./i18n-7ea9f137.js";import"./reuse-32931294.js";import"./dev.utils-fab45cbc.js";import"./index-541b643a.js";import"./common-54bf85ba.js";const w=(e,t)=>{c(t,(()=>{h(t,(()=>{try{t=f(t)}catch(e){}u(e,"_headerCells",(e=>"object"==typeof e&&null!==e),new Set(["TableHeaderCellsPropType"]),t)}))}))},_=class{constructor(a){t(this,a),this.horizontal=!0,this.cellsToRenderTimeouts=new Map,this.dataToKeyMap=new Map,this.checkboxRefs=[],this.renderTableRow=(t,a,i)=>{var l,o;let n=String(a);return this.horizontal&&(null===(l=t[0])||void 0===l?void 0:l.data)&&(n=null!==(o=this.getDataKey(t[0].data))&&void 0!==o?o:n),e("tr",{key:`row-${n}`},this.renderSelectionCell(t,a),t.map(((e,t)=>this.renderTableCell(e,a,t,i))))},this.renderTableCell=(t,a,i,l)=>{let o=`${a}-${i}-${t.label}`;if(t.data){const e=this.getDataKey(t.data);o=e?`${e}-${this.horizontal?i:a}`:o}return!1===t.asTd?this.renderHeadingCell(t,a,i,l):e("td",{key:`cell-${o}`,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){b(this,e)}validateHeaderCells(e){w(this,e)}validateLabel(e){g(this,e,{required:!0})}validateMinWidth(e){v(this,"_minWidth",e,{defaultValue:void 0})}validateOn(e){y(this,e)}validateSelection(e){m(this,e)}handleKeyDown(e){var t;if("ArrowUp"===e.key||"ArrowDown"===e.key){const a=null===(t=this.tableDivElement)||void 0===t?void 0:t.querySelector(":focus");let i=this.checkboxRefs.indexOf(a);i>-1&&(e.preventDefault(),"ArrowDown"===e.key?(i=(i+1)%this.checkboxRefs.length,this.checkboxRefs[i].focus()):"ArrowUp"===e.key&&(e.preventDefault(),i=(i+this.checkboxRefs.length-1)%this.checkboxRefs.length,this.checkboxRefs[i].focus()))}}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),n=this.getNumberOfCols(t.horizontal,e);let s=this.getNumberOfRows(t.vertical,e),r=0;i&&(r=s,s+=(null===(l=this.state._dataFoot)||void 0===l?void 0:l.length)||0);const c=[],d=[],h=[];t.vertical.forEach(((e,t)=>{d[t]=0,h[t]=[]}));for(let a=r;a<s;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+d[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);d[t]++}}}));for(let t=0;t<n;t++)if(!0===this.horizontal){const n=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 n&&null!==n&&l.push(Object.assign(Object.assign({},o[t]),{colSpan:void 0,data:n,label:n[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}));c.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===c.length?c.push([l]):c[0].push(l)}return c}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,l,s;const r=this.state._selection;if(!r)return"";const c=null!==(i=r.keyPropertyName)&&void 0!==i?i:"id",h=null===(l=t[0])||void 0===l?void 0:l.data;if(!h)return"";const v=h[c],p=r.multiple||void 0===r.multiple,b=null===(s=null==r?void 0:r.selectedKeys)||void 0===s?void 0:s.includes(v),f=r.label(h),u={name:"selection",checked:b,id:v,"aria-label":f};return e("td",{key:`tbody-${a}-selection`,class:"selection-cell"},e("div",{class:"input "+(b?"checked":"")},p?e("label",{class:"checkbox-container"},e(n,{class:"icon",_icons:"codicon "+(b?"codicon-check":""),_label:""}),e("input",Object.assign({ref:e=>e&&this.checkboxRefs.push(e)},u,{type:"checkbox",onInput:e=>{var t,a,i;const l=b?null===(a=null==r?void 0:r.selectedKeys)||void 0===a?void 0:a.filter((e=>e!==v)):[...null!==(t=null==r?void 0:r.selectedKeys)&&void 0!==t?t:[],v];d("selection-change",this.host,l),"function"==typeof(null===(i=this.state._on)||void 0===i?void 0:i[k.onSelectionChange])&&this.state._on[k.onSelectionChange](e,null!=l?l:[])}}))):e("label",{class:"radio-container"},e("input",Object.assign({},u,{type:"radio",onInput:e=>{var t;d("selection-change",this.host,v),"function"==typeof(null===(t=this.state._on)||void 0===t?void 0:t[k.onSelectionChange])&&this.state._on[k.onSelectionChange](e,v)}}))),e(o,{"aria-hidden":"true",class:"input-tooltip",_align:"right",_id:`${v}-label`,_label:f})))}renderHeadingSelectionCell(){var t,i;const l=this.state._selection;if(!l||!l.multiple&&void 0!==l.multiple)return e("th",{key:"thead-0"});const s=null!==(t=l.keyPropertyName)&&void 0!==t?t:"id",r=null===(i=l.selectedKeys)||void 0===i?void 0:i.length,c=r===this.state._data.length,h=0!==r&&!c;let v="kol-table-selection-indeterminate";c&&!h&&(v="kol-table-selection-none"),0===r&&(v="kol-table-selection-all");const p=a(v);return e("th",{key:"thead-0-selection",class:"selection-cell selection-control"},e("div",{class:"input "+(h?"indeterminate":c?"checked":"")},e("label",{class:"checkbox-container"},e(n,{class:"icon",_icons:"codicon "+(h?"codicon-remove":c?"codicon-check":""),_label:""}),e("input",{ref:e=>e&&this.checkboxRefs.push(e),name:"selection",checked:c&&!h,"aria-label":p,type:"checkbox",onInput:e=>{var t;const a=c?[]:this.state._data.map((e=>null==e?void 0:e[s]));d("selection-change",this.host,a),"function"==typeof(null===(t=this.state._on)||void 0===t?void 0:t[k.onSelectionChange])&&this.state._on[k.onSelectionChange](e,a)}})),e(o,{"aria-hidden":"true",class:"input-tooltip",_align:"right",_id:`${v}-label`,_label:p})))}renderHeadingCell(t,a,i,o){let n,s="codicon codicon-fold";if(t.sortDirection)switch(t.sortDirection){case"ASC":s="codicon codicon-chevron-up",n="ascending";break;case"DESC":s="codicon codicon-chevron-down",n="descending"}const r=o?"row":"number"==typeof t.colSpan&&t.colSpan>1?"colgroup":"col";return e("th",{key:`${a}-${i}-${t.label}`,class:t.textAlign?`align-${t.textAlign}`:void 0,scope:r,colSpan:t.colSpan,rowSpan:t.rowSpan,style:{width:t.width},"aria-sort":n,"data-sort":`sort-${t.sortDirection}`},t.sortDirection?e(l,{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)}renderSpacer(t,a){var i;const l=null===(i=null==a?void 0:a[0])||void 0===i?void 0:i.reduce(((e,t)=>e+(t.colSpan||1)),0);return e("tr",{class:`${t}-spacer`,"aria-hidden":"true"},e("td",{colSpan:l}))}renderFoot(){if(!this.state._dataFoot||0===this.state._dataFoot.length)return null;const t=this.createDataField(this.state._dataFoot,this.state._headerCells,!0);return e("tfoot",null,[this.renderSpacer("foot",t),t.map(((e,t)=>this.renderTableRow(e,t,!0)))])}render(){const t=this.createDataField(this.state._data,this.state._headerCells);return this.checkboxRefs=[],e(i,{key:"6f41723609fd16851183723f520e1666a868c555",class:"kol-table-stateless-wc"},e("div",{key:"1f33c8399f614f5439270c1d4685a85d58737799",ref:e=>this.tableDivElement=e,class:"table",tabindex:this.tableDivElementHasScrollbar?"-1":void 0},e("table",{key:"a2951c1fccdb56a7c4d2f083352cd31740773c0f",style:{minWidth:this.state._minWidth}},e("div",{key:"6412112eee29e4a383b86de354f1060f014d7553",class:"focus-element",tabindex:this.tableDivElementHasScrollbar?"0":void 0,"aria-describedby":"caption"}," "),e("caption",{key:"108a3406f3290e73cf68121c19deefa317b4ffd2",id:"caption"},this.state._label),Array.isArray(this.state._headerCells.horizontal)&&e("thead",{key:"63bf023ea1b1a30b6f64f43dca50bbe96d6b4c81"},[this.state._headerCells.horizontal.map(((t,a)=>e("tr",{key:`thead-${a}`},this.state._selection&&this.renderHeadingSelectionCell(),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,!1)))))),this.renderSpacer("head",this.state._headerCells.horizontal)]),e("tbody",{key:"b25f4e3524413d9d9766146c9a14a6ada67d95fb"},t.map(((e,t)=>this.renderTableRow(e,t,!0)))),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{_ 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 e}from"./index-4e3a1dc7.js";import{r as i}from"./component-names-d278f819.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: calc(44rem / var(--kolibri-root-font-size, 16));\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 rem(44).\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: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\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-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: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\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}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n :host,\n .kol-table-stateless-wc {\n display: block;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .table {\n max-width: 100%;\n overflow-x: auto;\n overflow-y: hidden;\n }\n table {\n width: 100%;\n }\n caption {\n text-align: start;\n }\n .focus-element {\n font-size: 0;\n }\n .focus-element:focus {\n outline: 0 !important;\n }\n .table:has(.focus-element:focus) {\n /* @see https://remysharp.com/til/css/focus-ring-default-styles */\n outline: calc(5rem / var(--kolibri-root-font-size, 16)) auto Highlight;\n outline: calc(5rem / var(--kolibri-root-font-size, 16)) auto -webkit-focus-ring-color;\n outline-offset: calc(2rem / var(--kolibri-root-font-size, 16));\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 tr.foot-spacer,\n tr.head-spacer {\n display: none;\n }\n .selection-header-cell {\n width: 0;\n }\n .selection-cell {\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n white-space: nowrap;\n }\n .input label {\n align-items: center;\n cursor: pointer;\n display: flex;\n height: var(--a11y-min-size);\n justify-content: center;\n position: relative;\n width: var(--a11y-min-size);\n }\n .input .icon {\n display: block;\n inset: auto;\n position: absolute;\n z-index: 1;\n }\n .input input {\n appearance: none;\n border-style: solid;\n cursor: pointer;\n margin: 0;\n }\n .input input:before {\n content: \"\";\n }\n .input input[type=checkbox] {\n position: relative;\n display: flex;\n height: calc(var(--a11y-min-size) / 2);\n width: calc(var(--a11y-min-size) / 2);\n align-items: center;\n justify-content: center;\n background-color: rgb(255, 255, 255);\n border-width: calc(2rem / var(--kolibri-root-font-size, 16));\n line-height: 1.5;\n transition: all 0.5s ease 0s;\n }\n .input input[type=radio] {\n display: flex;\n border-width: calc(2rem / var(--kolibri-root-font-size, 16));\n border-radius: 100%;\n height: 1.5em;\n min-height: 1.5em;\n min-width: 1.5em;\n padding: 0;\n width: 1.5em;\n }\n .input input[type=radio]:before {\n border-radius: 100%;\n margin: auto;\n height: 0.75em;\n width: 0.75em;\n }\n .input input[type=radio]:checked:before {\n background-color: #000;\n }\n @media (forced-colors: active) {\n .input input[type=radio]:checked:before {\n /* Give it a visible background in forced colors mode */\n background-color: selectedItem !important;\n }\n }\n}",a=o,l=class{constructor(t){n(this,t),this._data=void 0,this._dataFoot=void 0,this._headerCells=void 0,this._label=void 0,this._minWidth=void 0,this._on=void 0,this._selection=void 0}render(){return t(e,{key:"b2811bdfce1d51f659bbcb931639ba1fc3f65bb1",class:"kol-table-stateless"},t(i,{key:"a6affae87b6b8768b566ed611976a998b74fef5c",_data:this._data,_dataFoot:this._dataFoot,_headerCells:this._headerCells,_label:this._label,_minWidth:this._minWidth,_on:this._on,_selection:this._selection}))}};l.style={default:a};export{l as kol_table_stateless};
4
+ import{r as n,h as t,H as e}from"./index-a0b4dca2.js";import{o as i}from"./component-names-aa3cbc3c.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: calc(44rem / var(--kolibri-root-font-size, 16));\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 rem(44).\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: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\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-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: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\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}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n :host,\n .kol-table-stateless-wc {\n display: block;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .table {\n max-width: 100%;\n overflow-x: auto;\n overflow-y: hidden;\n }\n table {\n width: 100%;\n }\n caption {\n text-align: start;\n }\n .focus-element {\n font-size: 0;\n }\n .focus-element:focus {\n outline: 0 !important;\n }\n .table:has(.focus-element:focus) {\n /* @see https://remysharp.com/til/css/focus-ring-default-styles */\n outline: calc(5rem / var(--kolibri-root-font-size, 16)) auto Highlight;\n outline: calc(5rem / var(--kolibri-root-font-size, 16)) auto -webkit-focus-ring-color;\n outline-offset: calc(2rem / var(--kolibri-root-font-size, 16));\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 tr.foot-spacer,\n tr.head-spacer {\n display: none;\n }\n .selection-header-cell {\n width: 0;\n }\n .selection-cell {\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n white-space: nowrap;\n }\n .input label {\n align-items: center;\n cursor: pointer;\n display: flex;\n height: var(--a11y-min-size);\n justify-content: center;\n position: relative;\n width: var(--a11y-min-size);\n }\n .input .icon {\n display: block;\n inset: auto;\n position: absolute;\n z-index: 1;\n }\n .input input {\n appearance: none;\n border-style: solid;\n cursor: pointer;\n margin: 0;\n }\n .input input:before {\n content: \"\";\n }\n .input input[type=checkbox] {\n position: relative;\n display: flex;\n height: calc(var(--a11y-min-size) / 2);\n width: calc(var(--a11y-min-size) / 2);\n align-items: center;\n justify-content: center;\n background-color: rgb(255, 255, 255);\n border-width: calc(2rem / var(--kolibri-root-font-size, 16));\n line-height: 1.5;\n transition: all 0.5s ease 0s;\n }\n .input input[type=radio] {\n display: flex;\n border-width: calc(2rem / var(--kolibri-root-font-size, 16));\n border-radius: 100%;\n height: 1.5em;\n min-height: 1.5em;\n min-width: 1.5em;\n padding: 0;\n width: 1.5em;\n }\n .input input[type=radio]:before {\n border-radius: 100%;\n margin: auto;\n height: 0.75em;\n width: 0.75em;\n }\n .input input[type=radio]:checked:before {\n background-color: #000;\n }\n @media (forced-colors: active) {\n .input input[type=radio]:checked:before {\n /* Give it a visible background in forced colors mode */\n background-color: selectedItem !important;\n }\n }\n}",a=o,l=class{constructor(t){n(this,t),this._data=void 0,this._dataFoot=void 0,this._headerCells=void 0,this._label=void 0,this._minWidth=void 0,this._on=void 0,this._selection=void 0}render(){return t(e,{key:"603d3fd8fcff2e5bb7e325d3a4d99fe317a06666",class:"kol-table-stateless"},t(i,{key:"eb7f040026d5dbfb544902986f4808b32f4d50de",_data:this._data,_dataFoot:this._dataFoot,_headerCells:this._headerCells,_label:this._label,_minWidth:this._minWidth,_on:this._on,_selection:this._selection}))}};l.style={default:a};export{l as kol_table_stateless};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as i,h as t}from"./index-4e3a1dc7.js";import{q as e}from"./component-names-d278f819.js";const n=class{constructor(t){i(this,t),this._allowMultiSort=void 0,this._data=void 0,this._dataFoot=void 0,this._headers=void 0,this._label=void 0,this._minWidth=void 0,this._pagination=void 0,this._paginationPosition="bottom",this._selection=void 0,this._on=void 0}render(){return t(e,{key:"78e54fb25d9d1f36e5360a6c8bb8e9cbc21912f2",_allowMultiSort:this._allowMultiSort,_data:this._data,_dataFoot:this._dataFoot,_headers:this._headers,_label:this._label,_minWidth:this._minWidth,_pagination:this._pagination,_paginationPosition:this._paginationPosition,_selection:this._selection,_on:this._on})}};export{n as kol_table};
4
+ import{r as i,h as t}from"./index-a0b4dca2.js";import{n as e}from"./component-names-aa3cbc3c.js";const n=class{constructor(t){i(this,t),this._allowMultiSort=void 0,this._data=void 0,this._dataFoot=void 0,this._headers=void 0,this._label=void 0,this._minWidth=void 0,this._pagination=void 0,this._paginationPosition="bottom",this._selection=void 0,this._on=void 0}render(){return t(e,{key:"4be61e777ccc49ea977bd0fe505c256de06f1bd6",_allowMultiSort:this._allowMultiSort,_data:this._data,_dataFoot:this._dataFoot,_headers:this._headers,_label:this._label,_minWidth:this._minWidth,_pagination:this._pagination,_paginationPosition:this._paginationPosition,_selection:this._selection,_on:this._on})}};export{n as kol_table};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as t,h as n,H as e,g as i}from"./index-4e3a1dc7.js";import{t as o}from"./i18n-5fe08f1c.js";import{c as s}from"./component-names-d278f819.js";import{w as a,j as l,f as r,s as d,k as h,g as c,h as b,v as u}from"./prop.validators-447b6d6f.js";import{a as f}from"./align-9ab97987.js";import{v as p}from"./label-ec7596fe.js";import{L as m}from"./dev.utils-fab45cbc.js";import"./i18n-7ea9f137.js";import"./reuse-32931294.js";import"./index-b8f228e7.js";const g=["select-automatic","select-manual"],v=(t,e)=>{a(t,"_behavior",(t=>"string"==typeof t&&g.includes(t)),new Set([`KoliBriTabBehavior {${g.join(", ")}`]),e)};var y;!function(t){t.ArrowDown="ArrowDown",t.ArrowLeft="ArrowLeft",t.ArrowRight="ArrowRight",t.ArrowUp="ArrowUp",t.Enter="Enter",t.Space=" "}(y||(y={}));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: calc(44rem / var(--kolibri-root-font-size, 16));\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 rem(44).\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: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\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-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: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\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}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n :host > div {\n display: grid;\n }\n .tabs-content {\n overflow: auto;\n }\n .tabs-button-group {\n display: flex;\n flex-wrap: wrap;\n }\n .tabs-button-group 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 .tabs-button-group {\n flex-direction: column;\n order: 2;\n }\n :host > .tabs-align-right .tabs-button-group .kol-button-wc {\n width: 100%;\n }\n :host > .tabs-align-left {\n display: grid;\n grid-template-columns: auto 1fr;\n }\n :host > .tabs-align-left .tabs-button-group {\n flex-direction: column;\n order: 0;\n }\n :host > .tabs-align-left .tabs-button-group .kol-button-wc {\n width: 100%;\n }\n :host > .tabs-align-bottom {\n display: grid;\n grid-template-rows: 1fr auto;\n }\n :host > .tabs-align-bottom .tabs-button-group {\n order: 2;\n }\n :host > .tabs-align-bottom .tabs-button-group > div {\n display: flex;\n margin: 0 1em;\n }\n :host > .tabs-align-bottom .tabs-button-group > div > div:first-child {\n margin: 0 1em 0 0;\n }\n :host > .tabs-align-top {\n display: grid;\n grid-template-rows: auto 1fr;\n }\n :host > .tabs-align-top .tabs-button-group {\n order: 0;\n }\n :host > .tabs-align-top .tabs-button-group > div {\n display: flex;\n }\n :host > .tabs-align-top .tabs-button-group > div > div {\n margin: 0 1em;\n }\n :host > .tabs-align-top .tabs-button-group > div > div:first-child {\n margin: 0 1em 0 0;\n }\n}",k=w,x=class{constructor(e){t(this,e),this.onCreateLabel=`${o("kol-new")} …`,this.showCreateTab=!1,this.nextPossibleTabIndex=(t,e,n=1)=>{const o=e+n;return o<t.length?t[o]._disabled?this.nextPossibleTabIndex(t,e,n+1):o:e},this.prevPossibleTabIndex=(t,e,n=1)=>{const o=e-n;return o>=0?t[o]._disabled?this.prevPossibleTabIndex(t,e,n+1):o:e},this.onKeyDown=t=>{switch(t.key){case y.ArrowRight:this.goToNextTab(t);break;case y.ArrowLeft:this.goToPreviousTab(t);break;case y.Space:case y.Enter:this.activateFocusedTab(t)}},this.onClickSelect=(t,e)=>{this.selectNextTabEvent(t,e)},this.onMouseDown=t=>{t.preventDefault(),t.stopPropagation()},this.callbacks={onClick:this.onClickSelect,onMouseDown:this.onMouseDown},this.catchTabPanelHost=t=>{this.tabPanelHost=t},this.selectNextNotDisabledTab=(t,e,n=!0,o)=>{if(t>e.length-1&&(t=e.length-1),t<0&&(t=0),Array.isArray(e)&&e[t]&&e[t]._disabled){if(!0===n){if(t<e.length-1)return this.selectNextNotDisabledTab(t+1,e,!0,o||t);t=o||t,n=!1}if(!1===n){if(t>0)return this.selectNextNotDisabledTab(t-1,e,!1,o||t);l("[KolTabs] All tabs are disabled, and therefore no tab can be displayed.")}}return t},this.syncSelectedAndTabs=(t,e,n,o)=>{let a,i;a="_selected"===o?t:this.state._selected,i="_tabs"===o?t:this.state._tabs,i.length>0&&e.set("_selected",this.selectNextNotDisabledTab(a,i))},this.handleTabPanels=()=>{var t,e,n;if(this.tabPanelHost instanceof HTMLDivElement)for(let o=this.tabPanelHost.children.length;o<this.state._tabs.length;o++){const a=document.createElement("div");a.setAttribute("aria-labelledby",`${this.state._label.replace(/\s/g,"-")}-tab-${o}`),a.setAttribute("id",`tabpanel-${o}`),a.setAttribute("role","tabpanel"),a.setAttribute("hidden","");const i=document.createElement("slot");i.setAttribute("name",`tabpanel-slot-${o}`),a.appendChild(i),this.tabPanelHost.appendChild(a),(null===(t=this.host)||void 0===t?void 0:t.children)instanceof HTMLCollection&&(null===(e=this.host)||void 0===e?void 0:e.children[o])&&(null===(n=this.host)||void 0===n||n.children[o].setAttribute("slot",`tabpanel-slot-${o}`))}},this.onCreate=t=>{var e,n;t.preventDefault(),t.stopPropagation(),"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e.onCreate)&&(null===(n=this.state._on)||void 0===n||n.onCreate(t))},this.onBlur=()=>{this.currentFocusIndex=void 0},this._align="top",this._behavior=void 0,this._label=void 0,this._on=void 0,this._selected=0,this._tabs=void 0,this.state={_align:"top",_label:"",_selected:0,_tabs:[]}}getCurrentFocusIndex(){return"number"==typeof this.currentFocusIndex?this.currentFocusIndex:this.state._selected}getKeyboardTabChangeMode(){return"select-manual"===this._behavior?"selectFocusOnly":"activateCompletely"}goToNextTab(t){const e=this.nextPossibleTabIndex(this.state._tabs,this.getCurrentFocusIndex());this.selectNextTabEvent(t,e,this.getKeyboardTabChangeMode())}goToPreviousTab(t){const e=this.prevPossibleTabIndex(this.state._tabs,this.getCurrentFocusIndex());this.selectNextTabEvent(t,e,this.getKeyboardTabChangeMode())}activateFocusedTab(t){"number"==typeof this.currentFocusIndex&&this.onSelect(t,this.currentFocusIndex)}selectNextTabEvent(t,e,n="activateCompletely"){var o,a;if(this.currentFocusIndex=e,this.focusTabById(e),"activateCompletely"===n){this._selected=e;null===(a=null===(o=this.state._tabs[e]._on)||void 0===o?void 0:o.onSelect)||void 0===a||a.call(o,t,e),this.onSelect(t,e)}}renderButtonGroup(){return n("div",{"aria-label":this.state._label,class:"tabs-button-group kol-button-group-wc",role:"tablist",onKeyDown:this.onKeyDown,onBlur:this.onBlur},this.state._tabs.map(((t,e)=>n(s,{_disabled:t._disabled,_icons:t._icons,_hideLabel:t._hideLabel,_label:t._label,_on:this.callbacks,_tabIndex:this.state._selected===e?0:-1,_tooltipAlign:t._tooltipAlign,_variant:this.state._selected===e?"custom":void 0,_customClass:this.state._selected===e?"selected":void 0,_ariaControls:`tabpanel-${e}`,_ariaSelected:this.state._selected===e,_id:`${this.state._label.replace(/\s/g,"-")}-tab-${e}`,_role:"tab",_value:e}))),this.showCreateTab&&n(s,{class:"create-button",_label:this.onCreateLabel,_on:{onClick:this.onCreate}}))}render(){return n(e,{key:"0d535b55a612656edc499daa7ded4edfde600fe5",class:"kol-tabs"},n("div",{key:"1233a6c4d1d90a1fb4944e01bcd6032d69c36346",ref:t=>{this.tabPanelsElement=t},class:{[`tabs-align-${this.state._align}`]:!0}},this.renderButtonGroup(),n("div",{key:"f1b9332c5245e5bf01297be11139ef5cbe7a9782",class:"tabs-content",ref:this.catchTabPanelHost})))}validateAlign(t){f(this,t)}validateBehavior(t){v(this,t)}validateLabel(t){p(this,t,{required:!0})}validateOn(t){if("object"==typeof t&&null!==t){r("[KolTabs] Prüfen, wie man auch einen EventCallback einzeln ändern kann.");const e={};"function"!=typeof t.onCreate&&"object"!=typeof t.onCreate||("object"==typeof t.onCreate?("string"==typeof t.onCreate.label&&t.onCreate.label.length>0?this.onCreateLabel=t.onCreate.label:m.debug("[KolTabs] The label text for New in {\n onCreate: {\n label: string (!),\n callback: Function\n }\n} is not set correctly."),"function"==typeof t.onCreate.callback?e.onCreate=t.onCreate.callback:m.debug("[KolTabs] The onCreate callback function for New in {\n onCreate: {\n label: string,\n callback: Function (!)\n }\n} is not set correctly.")):e.onCreate=t.onCreate,this.showCreateTab="function"==typeof e.onCreate),"function"==typeof t.onSelect&&(e.onSelect=t.onSelect),d(this,"_on",e)}}validateSelected(t){h(this,"_selected",t,{hooks:{beforePatch:this.syncSelectedAndTabs}})}validateTabs(t){c(this,"_tabs",(t=>"object"==typeof t&&null!==t&&"string"==typeof t._label&&t._label.length>0),t,void 0,{hooks:{beforePatch:this.syncSelectedAndTabs}}),b("KolTabs",this.state._tabs.length)}componentWillLoad(){this.validateAlign(this._align),this.validateLabel(this._label),this.validateOn(this._on),this.validateSelected(this._selected),this.validateTabs(this._tabs),this.validateBehavior(this._behavior)}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")}focusTabById(t){if(this.tabPanelsElement){const e=u(`button#${this.state._label.replace(/\s/g,"-")}-tab-${t}`,this.tabPanelsElement);null==e||e.focus()}}onSelect(t,e){var n,o;null===(o=null===(n=this._on)||void 0===n?void 0:n.onSelect)||void 0===o||o.call(n,t,e),this.focusTabById(e)}get host(){return i(this)}static get watchers(){return{_align:["validateAlign"],_behavior:["validateBehavior"],_label:["validateLabel"],_on:["validateOn"],_selected:["validateSelected"],_tabs:["validateTabs"]}}};x.style={default:k};export{x as kol_tabs};
4
+ import{r as t,h as n,H as e,g as i}from"./index-a0b4dca2.js";import{t as o}from"./i18n-5fe08f1c.js";import{a as s}from"./component-names-aa3cbc3c.js";import{w as a,j as l,f as r,s as d,k as h,g as c,h as b,v as u}from"./prop.validators-c5e6ad2d.js";import{v as f}from"./align-3f029493.js";import{v as p}from"./label-d70e7c34.js";import{L as m}from"./dev.utils-fab45cbc.js";import"./i18n-7ea9f137.js";import"./reuse-32931294.js";import"./index-541b643a.js";const g=["select-automatic","select-manual"],v=(t,e)=>{a(t,"_behavior",(t=>"string"==typeof t&&g.includes(t)),new Set([`KoliBriTabBehavior {${g.join(", ")}`]),e)};var y;!function(t){t.ArrowDown="ArrowDown",t.ArrowLeft="ArrowLeft",t.ArrowRight="ArrowRight",t.ArrowUp="ArrowUp",t.Enter="Enter",t.Space=" "}(y||(y={}));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: calc(44rem / var(--kolibri-root-font-size, 16));\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 rem(44).\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: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\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-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: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\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}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n :host > div {\n display: grid;\n }\n .tabs-content {\n overflow: auto;\n }\n .tabs-button-group {\n display: flex;\n flex-wrap: wrap;\n }\n .tabs-button-group 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 .tabs-button-group {\n flex-direction: column;\n order: 2;\n }\n :host > .tabs-align-right .tabs-button-group .kol-button-wc {\n width: 100%;\n }\n :host > .tabs-align-left {\n display: grid;\n grid-template-columns: auto 1fr;\n }\n :host > .tabs-align-left .tabs-button-group {\n flex-direction: column;\n order: 0;\n }\n :host > .tabs-align-left .tabs-button-group .kol-button-wc {\n width: 100%;\n }\n :host > .tabs-align-bottom {\n display: grid;\n grid-template-rows: 1fr auto;\n }\n :host > .tabs-align-bottom .tabs-button-group {\n order: 2;\n }\n :host > .tabs-align-bottom .tabs-button-group > div {\n display: flex;\n margin: 0 1em;\n }\n :host > .tabs-align-bottom .tabs-button-group > div > div:first-child {\n margin: 0 1em 0 0;\n }\n :host > .tabs-align-top {\n display: grid;\n grid-template-rows: auto 1fr;\n }\n :host > .tabs-align-top .tabs-button-group {\n order: 0;\n }\n :host > .tabs-align-top .tabs-button-group > div {\n display: flex;\n }\n :host > .tabs-align-top .tabs-button-group > div > div {\n margin: 0 1em;\n }\n :host > .tabs-align-top .tabs-button-group > div > div:first-child {\n margin: 0 1em 0 0;\n }\n}",k=w,x=class{constructor(e){t(this,e),this.onCreateLabel=`${o("kol-new")} …`,this.showCreateTab=!1,this.nextPossibleTabIndex=(t,e,n=1)=>{const o=e+n;return o<t.length?t[o]._disabled?this.nextPossibleTabIndex(t,e,n+1):o:e},this.prevPossibleTabIndex=(t,e,n=1)=>{const o=e-n;return o>=0?t[o]._disabled?this.prevPossibleTabIndex(t,e,n+1):o:e},this.onKeyDown=t=>{switch(t.key){case y.ArrowRight:this.goToNextTab(t);break;case y.ArrowLeft:this.goToPreviousTab(t);break;case y.Space:case y.Enter:this.activateFocusedTab(t)}},this.onClickSelect=(t,e)=>{this.selectNextTabEvent(t,e)},this.onMouseDown=t=>{t.preventDefault(),t.stopPropagation()},this.callbacks={onClick:this.onClickSelect,onMouseDown:this.onMouseDown},this.catchTabPanelHost=t=>{this.tabPanelHost=t},this.selectNextNotDisabledTab=(t,e,n=!0,o)=>{if(t>e.length-1&&(t=e.length-1),t<0&&(t=0),Array.isArray(e)&&e[t]&&e[t]._disabled){if(!0===n){if(t<e.length-1)return this.selectNextNotDisabledTab(t+1,e,!0,o||t);t=o||t,n=!1}if(!1===n){if(t>0)return this.selectNextNotDisabledTab(t-1,e,!1,o||t);l("[KolTabs] All tabs are disabled, and therefore no tab can be displayed.")}}return t},this.syncSelectedAndTabs=(t,e,n,o)=>{let a,i;a="_selected"===o?t:this.state._selected,i="_tabs"===o?t:this.state._tabs,i.length>0&&e.set("_selected",this.selectNextNotDisabledTab(a,i))},this.handleTabPanels=()=>{var t,e,n;if(this.tabPanelHost instanceof HTMLDivElement)for(let o=this.tabPanelHost.children.length;o<this.state._tabs.length;o++){const a=document.createElement("div");a.setAttribute("aria-labelledby",`${this.state._label.replace(/\s/g,"-")}-tab-${o}`),a.setAttribute("id",`tabpanel-${o}`),a.setAttribute("role","tabpanel"),a.setAttribute("hidden","");const i=document.createElement("slot");i.setAttribute("name",`tabpanel-slot-${o}`),a.appendChild(i),this.tabPanelHost.appendChild(a),(null===(t=this.host)||void 0===t?void 0:t.children)instanceof HTMLCollection&&(null===(e=this.host)||void 0===e?void 0:e.children[o])&&(null===(n=this.host)||void 0===n||n.children[o].setAttribute("slot",`tabpanel-slot-${o}`))}},this.onCreate=t=>{var e,n;t.preventDefault(),t.stopPropagation(),"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e.onCreate)&&(null===(n=this.state._on)||void 0===n||n.onCreate(t))},this.onBlur=()=>{this.currentFocusIndex=void 0},this._align="top",this._behavior=void 0,this._label=void 0,this._on=void 0,this._selected=0,this._tabs=void 0,this.state={_align:"top",_label:"",_selected:0,_tabs:[]}}getCurrentFocusIndex(){return"number"==typeof this.currentFocusIndex?this.currentFocusIndex:this.state._selected}getKeyboardTabChangeMode(){return"select-manual"===this._behavior?"selectFocusOnly":"activateCompletely"}goToNextTab(t){const e=this.nextPossibleTabIndex(this.state._tabs,this.getCurrentFocusIndex());this.selectNextTabEvent(t,e,this.getKeyboardTabChangeMode())}goToPreviousTab(t){const e=this.prevPossibleTabIndex(this.state._tabs,this.getCurrentFocusIndex());this.selectNextTabEvent(t,e,this.getKeyboardTabChangeMode())}activateFocusedTab(t){"number"==typeof this.currentFocusIndex&&this.onSelect(t,this.currentFocusIndex)}selectNextTabEvent(t,e,n="activateCompletely"){var o,a;if(this.currentFocusIndex=e,this.focusTabById(e),"activateCompletely"===n){this._selected=e;null===(a=null===(o=this.state._tabs[e]._on)||void 0===o?void 0:o.onSelect)||void 0===a||a.call(o,t,e),this.onSelect(t,e)}}renderButtonGroup(){return n("div",{"aria-label":this.state._label,class:"tabs-button-group kol-button-group-wc",role:"tablist",onKeyDown:this.onKeyDown,onBlur:this.onBlur},this.state._tabs.map(((t,e)=>n(s,{_disabled:t._disabled,_icons:t._icons,_hideLabel:t._hideLabel,_label:t._label,_on:this.callbacks,_tabIndex:this.state._selected===e?0:-1,_tooltipAlign:t._tooltipAlign,_variant:this.state._selected===e?"custom":void 0,_customClass:this.state._selected===e?"selected":void 0,_ariaControls:`tabpanel-${e}`,_ariaSelected:this.state._selected===e,_id:`${this.state._label.replace(/\s/g,"-")}-tab-${e}`,_role:"tab",_value:e}))),this.showCreateTab&&n(s,{class:"create-button",_label:this.onCreateLabel,_on:{onClick:this.onCreate}}))}render(){return n(e,{key:"8aff41e14407dae766c5952a39045ff0402cc336",class:"kol-tabs"},n("div",{key:"13a1f46f004a709d26bfc0a73d2161a7ded3a035",ref:t=>{this.tabPanelsElement=t},class:{[`tabs-align-${this.state._align}`]:!0}},this.renderButtonGroup(),n("div",{key:"4611503283e9419aabd03efb4bdd66beffe4e81a",class:"tabs-content",ref:this.catchTabPanelHost})))}validateAlign(t){f(this,t)}validateBehavior(t){v(this,t)}validateLabel(t){p(this,t,{required:!0})}validateOn(t){if("object"==typeof t&&null!==t){r("[KolTabs] Prüfen, wie man auch einen EventCallback einzeln ändern kann.");const e={};"function"!=typeof t.onCreate&&"object"!=typeof t.onCreate||("object"==typeof t.onCreate?("string"==typeof t.onCreate.label&&t.onCreate.label.length>0?this.onCreateLabel=t.onCreate.label:m.debug("[KolTabs] The label text for New in {\n onCreate: {\n label: string (!),\n callback: Function\n }\n} is not set correctly."),"function"==typeof t.onCreate.callback?e.onCreate=t.onCreate.callback:m.debug("[KolTabs] The onCreate callback function for New in {\n onCreate: {\n label: string,\n callback: Function (!)\n }\n} is not set correctly.")):e.onCreate=t.onCreate,this.showCreateTab="function"==typeof e.onCreate),"function"==typeof t.onSelect&&(e.onSelect=t.onSelect),d(this,"_on",e)}}validateSelected(t){h(this,"_selected",t,{hooks:{beforePatch:this.syncSelectedAndTabs}})}validateTabs(t){c(this,"_tabs",(t=>"object"==typeof t&&null!==t&&"string"==typeof t._label&&t._label.length>0),t,void 0,{hooks:{beforePatch:this.syncSelectedAndTabs}}),b("KolTabs",this.state._tabs.length)}componentWillLoad(){this.validateAlign(this._align),this.validateLabel(this._label),this.validateOn(this._on),this.validateSelected(this._selected),this.validateTabs(this._tabs),this.validateBehavior(this._behavior)}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")}focusTabById(t){if(this.tabPanelsElement){const e=u(`button#${this.state._label.replace(/\s/g,"-")}-tab-${t}`,this.tabPanelsElement);null==e||e.focus()}}onSelect(t,e){var n,o;null===(o=null===(n=this._on)||void 0===n?void 0:n.onSelect)||void 0===o||o.call(n,t,e),this.focusTabById(e)}get host(){return i(this)}static get watchers(){return{_align:["validateAlign"],_behavior:["validateBehavior"],_label:["validateLabel"],_on:["validateOn"],_selected:["validateSelected"],_tabs:["validateTabs"]}}};x.style={default:k};export{x 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-4e3a1dc7.js";import{n as s}from"./dev.utils-a25f785b.js";import{g as o}from"./controller-d9e11e4b.js";import{I as l}from"./InternalUnderlinedBadgeText-bccc22ee.js";import{I as r}from"./controller-icon-ce179ccc.js";import{v as d}from"./has-counter-157bd536.js";import{k as h,i as c,b as p,w as u,s as f,l as m}from"./prop.validators-447b6d6f.js";import{v as b}from"./rows-aef46735.js";import{l as v}from"./component-names-d278f819.js";import{s as y,b as g}from"./reuse-32931294.js";import"./dev.utils-fab45cbc.js";import"./events-29e84d75.js";import"./associated.controller-1037cac7.js";import"./access-and-short-key-152ce1ef.js";import"./hide-label-b2ccddd2.js";import"./label-ec7596fe.js";import"./tooltip-align-0e8c7391.js";import"./align-9ab97987.js";import"./icons-d0a00e6e.js";import"./common-54bf85ba.js";import"./index-b8f228e7.js";const k=["both","horizontal","vertical","none"];class w extends r{constructor(e,t,n){super(e,t,n),this.afterSyncCharCounter=()=>{"string"==typeof this.component._value&&this.component._value.length>0&&(this.component.state._currentLength=this.component._value.length)},this.component=e}validateHasCounter(e){d(this.component,e,{hooks:{afterPatch:this.afterSyncCharCounter}})}validateMaxLength(e){h(this.component,"_maxLength",e,{hooks:{afterPatch:this.afterSyncCharCounter},min:0})}validatePlaceholder(e){c(this.component,"_placeholder",e)}validateReadOnly(e){p(this.component,"_readOnly",e)}validateResize(e){u(this.component,"_resize",(e=>"string"==typeof e&&k.includes(e)),new Set(`String {${k.join(", ")}`),e)}validateRequired(e){p(this.component,"_required",e)}validateRows(e){b(this.component,e)}validateValue(e){c(this.component,"_value",e,{hooks:{afterPatch:this.afterSyncCharCounter}}),this.setFormAssociatedValue(this.component._value)}componentWillLoad(){super.componentWillLoad(),this.validateHasCounter(this.component._hasCounter),this.validateMaxLength(this.component._maxLength),this.validatePlaceholder(this.component._placeholder),this.validateReadOnly(this.component._readOnly),this.validateResize(this.component._resize),this.validateRequired(this.component._required),this.validateRows(this.component._rows),this.validateValue(this.component._value)}}const _="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\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 rem(44).\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: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\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-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: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\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}\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 .input {\n background-color: white;\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}",x=_,z=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},j=class{async getValue(){var e;return null===(e=this.textareaRef)||void 0===e?void 0:e.value}async focus(){await this.kolFocus()}async kolFocus(){var e;null===(e=this.textareaRef)||void 0===e||e.focus()}render(){const{ariaDescribedBy:i}=o(this.state),a=y(this.state._label);return e(n,{key:"beda70f93be9d5c2026295e7a7977753464f5cf7",class:{"kol-textarea":!0,"has-value":this.state._hasValue}},e(v,{key:"a9e2d11ce5a143e8a8acdbfe3bbaa8179d71ed58",class:{textarea:!0,"hide-label":!!this.state._hideLabel,"has-counter":!!this.state._hasCounter},_accessKey:this.state._accessKey,_alert:this.showAsAlert(),_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,_shortKey:this.state._shortKey,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched,onClick:()=>{var e;return null===(e=this.textareaRef)||void 0===e?void 0:e.focus()},role:"presentation"},e("span",{key:"8b341f3119b180295d53bf05c88b5c313c673702",slot:"label"},a?e("slot",{name:"expert"}):"string"==typeof this.state._accessKey||"string"==typeof this.state._shortKey?e(t,null,e(l,{badgeText:g(this.state._accessKey||this.state._shortKey),label:this.state._label})," ",e("span",{class:"access-key-hint","aria-hidden":"true"},g(this.state._accessKey||this.state._shortKey))):e("span",null,this.state._label)),e("div",{key:"ed2ff6fea8c88e7ab7bc4583c68bd92eae45be54",slot:"input"},e("textarea",Object.assign({key:"21d45b6e999db7a0e90d62a5276df4a946395bb0",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,onFocus:e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},onBlur:e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1},style:{resize:this.state._resize},value:this.state._value})))))}constructor(e){i(this,e),this.catchRef=e=>{this.textareaRef=e},this.onInput=e=>{this.textareaRef instanceof HTMLTextAreaElement&&(f(this,"_currentLength",this.textareaRef.value.length),this.state._adjustHeight&&(this._rows=z(this.textareaRef)),this.controller.onFacade.onInput(e))},this._accessKey=void 0,this._adjustHeight=!1,this._alert=void 0,this._disabled=!1,this._error=void 0,this._hasCounter=!1,this._hideError=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._maxLength=void 0,this._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._shortKey=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.inputHasFocus=!1,this.controller=new w(this,"textarea",this.host)}showAsAlert(){return void 0===this.state._alert?Boolean(this.state._touched)&&!this.inputHasFocus:this.state._alert}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||m("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)}validateShortKey(e){this.controller.validateShortKey(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTabIndex(e){this.controller.validateTabIndex(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e)}componentDidLoad(){setTimeout((()=>{var e;!0===this._adjustHeight&&this.textareaRef?this._rows=(null===(e=this.state)||void 0===e?void 0:e._rows)&&this.state._rows>z(this.textareaRef)?this.state._rows:z(this.textareaRef):this._rows||(this._rows=1)}),0)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener((e=>this.state._hasValue=!!e))}static get delegatesFocus(){return!0}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"],_shortKey:["validateShortKey"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}};j.style={default:x};export{j as kol_textarea};
4
+ import{h as t,F as e,H as n,r as i,g as a}from"./index-a0b4dca2.js";import{n as s}from"./dev.utils-5d039f3c.js";import{g as o}from"./controller-ae3a41a0.js";import{I as l}from"./controller-icon-30817124.js";import{v as r}from"./has-counter-a9dacd37.js";import{k as d,i as h,b as c,w as p,s as u,l as f}from"./prop.validators-c5e6ad2d.js";import{v as m}from"./rows-64f9b5cb.js";import{i as b}from"./component-names-aa3cbc3c.js";import{I as v}from"./InternalUnderlinedBadgeText-3e2de35c.js";import{s as y,b as g}from"./reuse-32931294.js";import"./dev.utils-fab45cbc.js";import"./events-29e84d75.js";import"./associated.controller-bce3d721.js";import"./access-and-short-key-864aafba.js";import"./tooltip-align-c001aae2.js";import"./align-3f029493.js";import"./hide-label-db0db59c.js";import"./label-d70e7c34.js";import"./icons-f3b7aabd.js";import"./common-54bf85ba.js";import"./index-541b643a.js";const k=["both","horizontal","vertical","none"];class w extends l{constructor(t,e,n){super(t,e,n),this.afterSyncCharCounter=()=>{"string"==typeof this.component._value&&this.component._value.length>0&&(this.component.state._currentLength=this.component._value.length)},this.component=t}validateHasCounter(t){r(this.component,t,{hooks:{afterPatch:this.afterSyncCharCounter}})}validateMaxLength(t){d(this.component,"_maxLength",t,{hooks:{afterPatch:this.afterSyncCharCounter},min:0})}validatePlaceholder(t){h(this.component,"_placeholder",t)}validateReadOnly(t){c(this.component,"_readOnly",t)}validateResize(t){p(this.component,"_resize",(t=>"string"==typeof t&&k.includes(t)),new Set(`String {${k.join(", ")}`),t)}validateRequired(t){c(this.component,"_required",t)}validateRows(t){m(this.component,t)}validateValue(t){h(this.component,"_value",t,{hooks:{afterPatch:this.afterSyncCharCounter}}),this.setFormAssociatedValue(this.component._value)}componentWillLoad(){super.componentWillLoad(),this.validateHasCounter(this.component._hasCounter),this.validateMaxLength(this.component._maxLength),this.validatePlaceholder(this.component._placeholder),this.validateReadOnly(this.component._readOnly),this.validateResize(this.component._resize),this.validateRequired(this.component._required),this.validateRows(this.component._rows),this.validateValue(this.component._value)}}const _="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\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 rem(44).\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: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\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-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: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\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}\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 .input {\n background-color: white;\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}",x=_,z=t=>{t.style.overflow="hidden";const e=t.rows,n=t.clientHeight/e;t.rows=1;const i=Math.round(t.scrollHeight/n);return t.rows=e,i},j=class{async getValue(){var t;return null===(t=this.textareaRef)||void 0===t?void 0:t.value}async focus(){await this.kolFocus()}async kolFocus(){var t;null===(t=this.textareaRef)||void 0===t||t.focus()}render(){const{ariaDescribedBy:i}=o(this.state),a=y(this.state._label);return t(n,{key:"4135602a13b0a5716f24bbb3ad6aa85918848f2f",class:{"kol-textarea":!0,"has-value":this.state._hasValue}},t(b,{key:"9ba58bdf0ca893ce31b95cfae7d56edf4acd71f7",class:{textarea:!0,"hide-label":!!this.state._hideLabel,"has-counter":!!this.state._hasCounter},_accessKey:this.state._accessKey,_alert:this.showAsAlert(),_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,_shortKey:this.state._shortKey,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched,onClick:()=>{var t;return null===(t=this.textareaRef)||void 0===t?void 0:t.focus()},role:"presentation"},t("span",{key:"6908d9280af4c12ff49e8a4928f7d8cec62d4212",slot:"label"},a?t("slot",{name:"expert"}):"string"==typeof this.state._accessKey||"string"==typeof this.state._shortKey?t(e,null,t(v,{badgeText:g(this.state._accessKey||this.state._shortKey),label:this.state._label})," ",t("span",{class:"access-key-hint","aria-hidden":"true"},g(this.state._accessKey||this.state._shortKey))):t("span",null,this.state._label)),t("div",{key:"b6d57fdd9921cfb7d69388c8519225855e496034",slot:"input"},t("textarea",Object.assign({key:"7294aeff04c51d9b62c61f7e76eeac8de7e8d2e0",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,onFocus:t=>{this.controller.onFacade.onFocus(t),this.inputHasFocus=!0},onBlur:t=>{this.controller.onFacade.onBlur(t),this.inputHasFocus=!1},style:{resize:this.state._resize},value:this.state._value})))))}constructor(t){i(this,t),this.catchRef=t=>{this.textareaRef=t},this.onInput=t=>{this.textareaRef instanceof HTMLTextAreaElement&&(u(this,"_currentLength",this.textareaRef.value.length),this.state._adjustHeight&&(this._rows=z(this.textareaRef)),this.controller.onFacade.onInput(t))},this._accessKey=void 0,this._adjustHeight=!1,this._alert=void 0,this._disabled=!1,this._error=void 0,this._hasCounter=!1,this._hideError=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._maxLength=void 0,this._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._shortKey=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.inputHasFocus=!1,this.controller=new w(this,"textarea",this.host)}showAsAlert(){return void 0===this.state._alert?Boolean(this.state._touched)&&!this.inputHasFocus:this.state._alert}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAdjustHeight(t){this.controller.validateAdjustHeight(t)}validateAlert(t){this.controller.validateAlert(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateError(t){this.controller.validateError(t)}validateHasCounter(t){this.controller.validateHasCounter(t)}validateHideError(t){this.controller.validateHideError(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateMaxLength(t){this.controller.validateMaxLength(t)}validateMsg(t){this.controller.validateMsg(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validatePlaceholder(t){this.controller.validatePlaceholder(t)}validateReadOnly(t){this.controller.validateReadOnly(t)}validateResize(t){"both"!==t&&"horizontal"!==t||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(t)}validateRequired(t){this.controller.validateRequired(t)}validateRows(t){this.controller.validateRows(t)}validateShortKey(t){this.controller.validateShortKey(t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTabIndex(t){this.controller.validateTabIndex(t)}validateTouched(t){this.controller.validateTouched(t)}validateValue(t){this.controller.validateValue(t)}componentDidLoad(){setTimeout((()=>{var t;!0===this._adjustHeight&&this.textareaRef?this._rows=(null===(t=this.state)||void 0===t?void 0:t._rows)&&this.state._rows>z(this.textareaRef)?this.state._rows:z(this.textareaRef):this._rows||(this._rows=1)}),0)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener((t=>this.state._hasValue=!!t))}static get delegatesFocus(){return!0}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"],_shortKey:["validateShortKey"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}};j.style={default:x};export{j as kol_textarea};
@@ -1 +1 @@
1
- {"version":3,"names":["cssResizeOptions","TextareaController","InputIconController","constructor","component","name","host","super","this","afterSyncCharCounter","_value","length","state","_currentLength","validateHasCounter","value","hooks","afterPatch","validateMaxLength","watchNumber","min","validatePlaceholder","watchString","validateReadOnly","watchBoolean","validateResize","watchValidator","includes","Set","join","validateRequired","validateRows","validateValue","setFormAssociatedValue","componentWillLoad","_hasCounter","_maxLength","_placeholder","_readOnly","_resize","_required","_rows","defaultStyleCss","KolTextareaDefaultStyle0","increaseTextareaHeight","el","style","overflow","currentRows","rows","rowHeight","clientHeight","nextRows","Math","round","scrollHeight","KolTextarea","getValue","_a","textareaRef","focus","kolFocus","render","ariaDescribedBy","getRenderStates","hasExpertSlot","showExpertSlot","_label","h","Host","key","class","_hasValue","KolInputTag","textarea","_hideLabel","_accessKey","_alert","showAsAlert","_disabled","_hideError","_hint","_icons","_id","_msg","_shortKey","_tooltipAlign","_touched","onClick","role","slot","Fragment","InternalUnderlinedBadgeText","badgeText","buildBadgeTextString","label","Object","assign","ref","catchRef","title","accessKey","undefined","autoCapitalize","autoCorrect","disabled","id","maxlength","_name","readOnly","required","placeholder","spellcheck","controller","onFacade","onInput","onFocus","event","inputHasFocus","onBlur","resize","hostRef","HTMLTextAreaElement","setState","_adjustHeight","nonce","Boolean","validateAccessKey","validateAdjustHeight","validateAlert","validateDisabled","validateError","validateHideError","validateHideLabel","validateHint","validateIcons","validateId","validateLabel","validateMsg","validateName","validateOn","devWarning","validateShortKey","validateSyncValueBySelector","validateTabIndex","validateTouched","componentDidLoad","setTimeout","addValueChangeListener","v"],"sources":["src/schema/components/textarea.ts","src/components/textarea/controller.ts","src/components/textarea/style.scss?tag=kol-textarea&mode=default&encapsulation=shadow","src/components/textarea/shadow.tsx"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\n\nimport type {\n\tMsgPropType,\n\tPropAccessKey,\n\tPropAdjustHeight,\n\tPropDisabled,\n\tPropHasCounter,\n\tPropHideError,\n\tPropHideLabel,\n\tPropId,\n\tPropLabelWithExpertSlot,\n\tPropMsg,\n\tPropName,\n\tPropReadOnly,\n\tPropRequired,\n\tPropRows,\n\tPropShortKey,\n\tPropSyncValueBySelector,\n\tPropTouched,\n} from '../props';\nimport type { InputTypeOnDefault, KoliBriHorizontalIcons, Stringified } from '../types';\n\n/**\n * TODO: In version 3 (v3), horizontal resizing is abolished. The corresponding property is then reduced to the properties `none` (default) and `vertical`.\n */\nexport const cssResizeOptions = ['both', 'horizontal', 'vertical', 'none'] as const;\nexport type CSSResize = (typeof cssResizeOptions)[number];\n\ntype RequiredProps = PropLabelWithExpertSlot;\ntype OptionalProps = {\n\talert: boolean;\n\t/**\n\t * @deprecated Will be removed in v3. Use `msg` instead.\n\t */\n\terror: string;\n\thint: string;\n\ticons: KoliBriHorizontalIcons;\n\tmaxLength: number;\n\tmsg: Stringified<MsgPropType>;\n\ton: InputTypeOnDefault;\n\tplaceholder: string;\n\tresize: CSSResize;\n\ttabIndex: number;\n\tvalue: string;\n} & PropAccessKey &\n\tPropAdjustHeight &\n\tPropDisabled &\n\tPropHasCounter &\n\tPropHideError &\n\tPropHideLabel &\n\tPropName &\n\tPropReadOnly &\n\tPropRequired &\n\tPropRows &\n\tPropSyncValueBySelector &\n\tPropShortKey &\n\tPropTouched;\n\ntype RequiredStates = {\n\tadjustHeight: boolean;\n\tcurrentLength: number;\n\thasValue: boolean;\n\tresize: CSSResize;\n} & PropId &\n\tPropAdjustHeight &\n\tPropHideError &\n\tPropLabelWithExpertSlot;\ntype OptionalStates = {\n\talert: boolean;\n\terror: string;\n\thint: string;\n\ticons: KoliBriHorizontalIcons;\n\tmaxLength: number;\n\ton: InputTypeOnDefault;\n\tplaceholder: string;\n\ttabIndex: number;\n\tvalue: string;\n} & PropAccessKey &\n\tPropDisabled &\n\tPropHasCounter &\n\tPropHideLabel &\n\tPropMsg &\n\tPropName &\n\tPropReadOnly &\n\tPropRequired &\n\tPropRows &\n\tPropShortKey &\n\tPropTouched;\n\nexport type TextareaProps = Generic.Element.Members<RequiredProps, OptionalProps>;\nexport type TextareaStates = Generic.Element.Members<RequiredStates, OptionalStates>;\nexport type TextareaWatches = Generic.Element.Watchers<RequiredProps, OptionalProps>;\nexport type TextareaAPI = Generic.Element.ComponentApi<RequiredProps, OptionalProps, RequiredStates, OptionalStates>;\n","import type { CSSResize, HasCounterPropType, RowsPropType, TextareaProps, TextareaWatches } from '../../schema';\nimport { validateHasCounter } from '../../schema';\nimport { cssResizeOptions, validateRows, watchBoolean, watchNumber, watchString, watchValidator } from '../../schema';\n\nimport { InputIconController } from '../@deprecated/input/controller-icon';\n\nimport type { Generic } from 'adopted-style-sheets';\nexport class TextareaController extends InputIconController implements TextareaWatches {\n\tprotected readonly component: Generic.Element.Component & TextareaProps;\n\n\tpublic constructor(component: Generic.Element.Component & TextareaProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tprivate afterSyncCharCounter = () => {\n\t\tif (typeof this.component._value === 'string' && this.component._value.length > 0) {\n\t\t\tthis.component.state._currentLength = this.component._value.length;\n\t\t}\n\t};\n\n\tpublic validateHasCounter(value?: HasCounterPropType): void {\n\t\tvalidateHasCounter(this.component, value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: this.afterSyncCharCounter,\n\t\t\t},\n\t\t});\n\t}\n\n\tpublic validateMaxLength(value?: number): void {\n\t\twatchNumber(this.component, '_maxLength', value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: this.afterSyncCharCounter,\n\t\t\t},\n\t\t\tmin: 0,\n\t\t});\n\t}\n\n\tpublic validatePlaceholder(value?: string): void {\n\t\twatchString(this.component, '_placeholder', value);\n\t}\n\n\tpublic validateReadOnly(value?: boolean): void {\n\t\twatchBoolean(this.component, '_readOnly', value);\n\t}\n\n\tpublic validateResize(value?: CSSResize): void {\n\t\twatchValidator(\n\t\t\tthis.component,\n\t\t\t'_resize',\n\t\t\t(value) => typeof value === 'string' && cssResizeOptions.includes(value),\n\t\t\tnew Set(`String {${cssResizeOptions.join(', ')}`),\n\t\t\tvalue,\n\t\t);\n\t}\n\n\tpublic validateRequired(value?: boolean): void {\n\t\twatchBoolean(this.component, '_required', value);\n\t}\n\n\tpublic validateRows(value?: RowsPropType): void {\n\t\tvalidateRows(this.component, value);\n\t}\n\n\tpublic validateValue(value?: string): void {\n\t\twatchString(this.component, '_value', value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: this.afterSyncCharCounter,\n\t\t\t},\n\t\t});\n\t\tthis.setFormAssociatedValue(this.component._value as string);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateHasCounter(this.component._hasCounter);\n\t\tthis.validateMaxLength(this.component._maxLength);\n\t\tthis.validatePlaceholder(this.component._placeholder);\n\t\tthis.validateReadOnly(this.component._readOnly);\n\t\tthis.validateResize(this.component._resize);\n\t\tthis.validateRequired(this.component._required);\n\t\tthis.validateRows(this.component._rows);\n\t\tthis.validateValue(this.component._value);\n\t}\n}\n","@import '../@shared/mixins';\n@import '../style';\n@import '../input-line';\n\n@layer kol-component {\n\t:host {\n\t\tfont-size: rem(16);\n\t}\n}\n","import type {\n\tAdjustHeightPropType,\n\tCSSResize,\n\tFocusableElement,\n\tHasCounterPropType,\n\tHideErrorPropType,\n\tIdPropType,\n\tInputTypeOnDefault,\n\tKoliBriHorizontalIcons,\n\tLabelWithExpertSlotPropType,\n\tMsgPropType,\n\tNamePropType,\n\tRowsPropType,\n\tShortKeyPropType,\n\tStringified,\n\tSyncValueBySelectorPropType,\n\tTextareaAPI,\n\tTextareaStates,\n\tTooltipAlignPropType,\n} from '../../schema';\nimport { buildBadgeTextString, devWarning, setState, showExpertSlot } from '../../schema';\nimport type { JSX } from '@stencil/core';\nimport { Component, Element, Fragment, h, Host, Method, Prop, State, Watch } from '@stencil/core';\n\nimport { nonce } from '../../utils/dev.utils';\nimport { getRenderStates } from '../input/controller';\nimport { InternalUnderlinedBadgeText } from '../span/InternalUnderlinedBadgeText';\nimport { TextareaController } from './controller';\nimport { KolInputTag } from '../../core/component-names';\n\n/**\n * https://stackoverflow.com/questions/17772260/textarea-auto-height\n */\nconst increaseTextareaHeight = (el: HTMLTextAreaElement): number => {\n\tel.style.overflow = 'hidden'; // verhindert, dass ein Scrollbalken kurz angezeigt wird\n\tconst currentRows = el.rows;\n\tconst rowHeight = el.clientHeight / currentRows;\n\tel.rows = 1;\n\tconst nextRows = Math.round(el.scrollHeight / rowHeight);\n\tel.rows = currentRows;\n\treturn nextRows;\n};\n\n/**\n * @slot - Die Beschriftung des Eingabefeldes.\n */\n@Component({\n\ttag: 'kol-textarea',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: {\n\t\tdelegatesFocus: true,\n\t},\n})\nexport class KolTextarea implements TextareaAPI, FocusableElement {\n\t@Element() private readonly host?: HTMLKolTextareaElement;\n\tprivate textareaRef?: HTMLTextAreaElement;\n\n\tprivate readonly catchRef = (ref?: HTMLTextAreaElement) => {\n\t\tthis.textareaRef = ref;\n\t};\n\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tpublic async getValue(): Promise<string | undefined> {\n\t\treturn this.textareaRef?.value;\n\t}\n\n\t/**\n\t * @deprecated Use kolFocus instead.\n\t */\n\t@Method()\n\tpublic async focus() {\n\t\tawait this.kolFocus();\n\t}\n\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tpublic async kolFocus() {\n\t\tthis.textareaRef?.focus();\n\t}\n\n\tpublic render(): JSX.Element {\n\t\tconst { ariaDescribedBy } = getRenderStates(this.state);\n\t\tconst hasExpertSlot = showExpertSlot(this.state._label);\n\n\t\treturn (\n\t\t\t<Host class={{ 'kol-textarea': true, 'has-value': this.state._hasValue }}>\n\t\t\t\t<KolInputTag\n\t\t\t\t\tclass={{ textarea: true, 'hide-label': !!this.state._hideLabel, 'has-counter': !!this.state._hasCounter }}\n\t\t\t\t\t_accessKey={this.state._accessKey}\n\t\t\t\t\t_alert={this.showAsAlert()}\n\t\t\t\t\t_currentLength={this.state._currentLength}\n\t\t\t\t\t_disabled={this.state._disabled}\n\t\t\t\t\t_hideError={this.state._hideError}\n\t\t\t\t\t_hasCounter={this.state._hasCounter}\n\t\t\t\t\t_hideLabel={this.state._hideLabel}\n\t\t\t\t\t_hint={this.state._hint}\n\t\t\t\t\t_icons={this.state._icons}\n\t\t\t\t\t_id={this.state._id}\n\t\t\t\t\t_label={this.state._label}\n\t\t\t\t\t_maxLength={this.state._maxLength}\n\t\t\t\t\t_msg={this.state._msg}\n\t\t\t\t\t_readOnly={this.state._readOnly}\n\t\t\t\t\t_required={this.state._required}\n\t\t\t\t\t_shortKey={this.state._shortKey}\n\t\t\t\t\t_tooltipAlign={this._tooltipAlign}\n\t\t\t\t\t_touched={this.state._touched}\n\t\t\t\t\tonClick={() => this.textareaRef?.focus()}\n\t\t\t\t\trole={`presentation` /* Avoid element being read as 'clickable' in NVDA */}\n\t\t\t\t>\n\t\t\t\t\t<span slot=\"label\">\n\t\t\t\t\t\t{hasExpertSlot ? (\n\t\t\t\t\t\t\t<slot name=\"expert\"></slot>\n\t\t\t\t\t\t) : typeof this.state._accessKey === 'string' || typeof this.state._shortKey === 'string' ? (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<InternalUnderlinedBadgeText badgeText={buildBadgeTextString(this.state._accessKey || this.state._shortKey)} label={this.state._label} />{' '}\n\t\t\t\t\t\t\t\t<span class=\"access-key-hint\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t\t\t{buildBadgeTextString(this.state._accessKey || this.state._shortKey)}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<span>{this.state._label}</span>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</span>\n\t\t\t\t\t<div slot=\"input\">\n\t\t\t\t\t\t<textarea\n\t\t\t\t\t\t\tref={this.catchRef}\n\t\t\t\t\t\t\ttitle=\"\"\n\t\t\t\t\t\t\taccessKey={this.state._accessKey}\n\t\t\t\t\t\t\taria-describedby={ariaDescribedBy.length > 0 ? ariaDescribedBy.join(' ') : undefined}\n\t\t\t\t\t\t\taria-label={this.state._hideLabel && typeof this.state._label === 'string' ? this.state._label : undefined}\n\t\t\t\t\t\t\tautoCapitalize=\"off\"\n\t\t\t\t\t\t\tautoCorrect=\"off\"\n\t\t\t\t\t\t\tdisabled={this.state._disabled}\n\t\t\t\t\t\t\tid={this.state._id}\n\t\t\t\t\t\t\tmaxlength={this.state._maxLength}\n\t\t\t\t\t\t\tname={this.state._name}\n\t\t\t\t\t\t\treadOnly={this.state._readOnly}\n\t\t\t\t\t\t\trequired={this.state._required}\n\t\t\t\t\t\t\trows={this.state._rows}\n\t\t\t\t\t\t\tplaceholder={this.state._placeholder}\n\t\t\t\t\t\t\tspellcheck=\"false\"\n\t\t\t\t\t\t\t{...this.controller.onFacade}\n\t\t\t\t\t\t\tonInput={this.onInput}\n\t\t\t\t\t\t\tonFocus={(event) => {\n\t\t\t\t\t\t\t\tthis.controller.onFacade.onFocus(event);\n\t\t\t\t\t\t\t\tthis.inputHasFocus = true;\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tonBlur={(event) => {\n\t\t\t\t\t\t\t\tthis.controller.onFacade.onBlur(event);\n\t\t\t\t\t\t\t\tthis.inputHasFocus = false;\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\tresize: this.state._resize,\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tvalue={this.state._value}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</KolInputTag>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate readonly controller: TextareaController;\n\n\t/**\n\t * Defines which key combination can be used to trigger or focus the interactive element of the component.\n\t */\n\t@Prop() public _accessKey?: string;\n\n\t/**\n\t * Adjusts the height of the element to its content.\n\t * @TODO: change back to AdjustHeightPropType after stencil #4663 has been resolved\n\t */\n\t@Prop() public _adjustHeight?: boolean = false;\n\n\t/**\n\t * Defines whether the screen-readers should read out the notification.\n\t * @deprecated Will be removed in v3. Use automatic behaviour instead.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _alert?: boolean;\n\n\t/**\n\t * Makes the element not focusable and ignore all events.\n\t * @TODO: Change type back to `DisabledPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _disabled?: boolean = false;\n\n\t/**\n\t * Defines the error message text.\n\t * @deprecated Will be removed in v3. Use `msg` instead.\n\t */\n\t@Prop() public _error?: string;\n\n\t/**\n\t * Shows the character count on the lower border of the input.\n\t * @TODO: Change type back to `HasCounterPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hasCounter?: boolean = false;\n\n\t/**\n\t * Hides the error message but leaves it in the DOM for the input's aria-describedby.\n\t * @TODO: Change type back to `HideErrorPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _hideError?: boolean = false;\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 hint text.\n\t */\n\t@Prop() public _hint?: string = '';\n\n\t/**\n\t * Defines the icon classnames (e.g. `_icons=\"fa-solid fa-user\"`).\n\t */\n\t@Prop() public _icons?: KoliBriHorizontalIcons;\n\n\t/**\n\t * Defines the internal ID of the primary component element.\n\t */\n\t@Prop() public _id?: IdPropType;\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\t/**\n\t * Defines the maximum number of input characters.\n\t */\n\t@Prop() public _maxLength?: number;\n\n\t/**\n\t * Defines the properties for a message rendered as Alert component.\n\t */\n\t@Prop() public _msg?: Stringified<MsgPropType>;\n\n\t/**\n\t * Defines the technical name of an input field.\n\t */\n\t@Prop() public _name?: NamePropType;\n\n\t/**\n\t * Gibt die EventCallback-Funktionen für das Input-Event an.\n\t */\n\t@Prop() public _on?: InputTypeOnDefault;\n\n\t/**\n\t * Defines the placeholder for input field. To be shown when there's no value.\n\t */\n\t@Prop() public _placeholder?: string;\n\n\t/**\n\t * Makes the input element read only.\n\t * @TODO: Change type back to `ReadOnlyPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _readOnly?: boolean = false;\n\n\t/**\n\t * Defines whether and in which direction the size of the input can be changed by the user. (https://developer.mozilla.org/de/docs/Web/CSS/resize)\n\t * In version 3 (v3), horizontal resizing is abolished. The corresponding property is then reduced to the properties `vertical` (default) and `none`.\n\t */\n\t@Prop() public _resize?: CSSResize = 'vertical';\n\n\t/**\n\t * Makes the input element required.\n\t * @TODO: Change type back to `RequiredPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _required?: boolean = false;\n\n\t/**\n\t * Defines how many rows of text should be visible at the same time.\n\t */\n\t@Prop({ mutable: true, reflect: false }) public _rows?: RowsPropType;\n\n\t/**\n\t * Adds a visual short key hint to the component.\n\t */\n\t@Prop() public _shortKey?: ShortKeyPropType;\n\n\t/**\n\t * Selector for synchronizing the value with another input element.\n\t * @internal\n\t */\n\t@Prop() public _syncValueBySelector?: SyncValueBySelectorPropType;\n\n\t/**\n\t * Defines which tab-index the primary element of the component has. (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex)\n\t */\n\t@Prop() public _tabIndex?: number;\n\n\t/**\n\t * Defines where to show the Tooltip preferably: top, right, bottom or left.\n\t */\n\t@Prop() public _tooltipAlign?: TooltipAlignPropType = 'top';\n\n\t/**\n\t * Shows if the input was touched by a user.\n\t * @TODO: Change type back to `TouchedPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _touched?: boolean = false;\n\n\t/**\n\t * Defines the value of the input.\n\t */\n\t@Prop() public _value?: string;\n\n\t@State() public state: TextareaStates = {\n\t\t_adjustHeight: false,\n\t\t_currentLength: 0,\n\t\t_hasValue: false,\n\t\t_hideError: false,\n\t\t_id: `id-${nonce()}`,\n\t\t_label: '', // ⚠ required\n\t\t_resize: 'vertical',\n\t};\n\n\t@State() private inputHasFocus = false;\n\n\tpublic constructor() {\n\t\tthis.controller = new TextareaController(this, 'textarea', this.host);\n\t}\n\n\tprivate showAsAlert(): boolean {\n\t\tif (this.state._alert === undefined) {\n\t\t\treturn Boolean(this.state._touched) && !this.inputHasFocus;\n\t\t}\n\t\treturn this.state._alert;\n\t}\n\n\t@Watch('_accessKey')\n\tpublic validateAccessKey(value?: string): void {\n\t\tthis.controller.validateAccessKey(value);\n\t}\n\n\t@Watch('_adjustHeight')\n\tpublic validateAdjustHeight(value?: AdjustHeightPropType): void {\n\t\tthis.controller.validateAdjustHeight(value);\n\t}\n\n\t@Watch('_alert')\n\tpublic validateAlert(value?: boolean): void {\n\t\tthis.controller.validateAlert(value);\n\t}\n\n\t@Watch('_disabled')\n\tpublic validateDisabled(value?: boolean): void {\n\t\tthis.controller.validateDisabled(value);\n\t}\n\n\t@Watch('_error')\n\tpublic validateError(value?: string): void {\n\t\tthis.controller.validateError(value);\n\t}\n\n\t@Watch('_hasCounter')\n\tpublic validateHasCounter(value?: HasCounterPropType): void {\n\t\tthis.controller.validateHasCounter(value);\n\t}\n\n\t@Watch('_hideError')\n\tpublic validateHideError(value?: HideErrorPropType): void {\n\t\tthis.controller.validateHideError(value);\n\t}\n\n\t@Watch('_hideLabel')\n\tpublic validateHideLabel(value?: boolean): void {\n\t\tthis.controller.validateHideLabel(value);\n\t}\n\n\t@Watch('_hint')\n\tpublic validateHint(value?: string): void {\n\t\tthis.controller.validateHint(value);\n\t}\n\n\t@Watch('_icons')\n\tpublic validateIcons(value?: Stringified<KoliBriHorizontalIcons>): void {\n\t\tthis.controller.validateIcons(value);\n\t}\n\n\t@Watch('_id')\n\tpublic validateId(value?: string): void {\n\t\tthis.controller.validateId(value);\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelWithExpertSlotPropType): void {\n\t\tthis.controller.validateLabel(value);\n\t}\n\n\t@Watch('_maxLength')\n\tpublic validateMaxLength(value?: number): void {\n\t\tthis.controller.validateMaxLength(value);\n\t}\n\n\t@Watch('_msg')\n\tpublic validateMsg(value?: Stringified<MsgPropType>): void {\n\t\tthis.controller.validateMsg(value);\n\t}\n\n\t@Watch('_name')\n\tpublic validateName(value?: string): void {\n\t\tthis.controller.validateName(value);\n\t}\n\n\t@Watch('_on')\n\tpublic validateOn(value?: InputTypeOnDefault): void {\n\t\tthis.controller.validateOn(value);\n\t}\n\n\t@Watch('_placeholder')\n\tpublic validatePlaceholder(value?: string): void {\n\t\tthis.controller.validatePlaceholder(value);\n\t}\n\n\t@Watch('_readOnly')\n\tpublic validateReadOnly(value?: boolean): void {\n\t\tthis.controller.validateReadOnly(value);\n\t}\n\n\t@Watch('_resize')\n\tpublic validateResize(value?: CSSResize): void {\n\t\tif (value === 'both' || value === 'horizontal') {\n\t\t\tdevWarning(\n\t\t\t\t'In version 3 (v3), horizontal resizing is abolished. The corresponding property is then reduced to the properties `none` (default) and `vertical`.',\n\t\t\t);\n\t\t}\n\t\tthis.controller.validateResize(value);\n\t}\n\n\t@Watch('_required')\n\tpublic validateRequired(value?: boolean): void {\n\t\tthis.controller.validateRequired(value);\n\t}\n\n\t@Watch('_rows')\n\tpublic validateRows(value?: RowsPropType): void {\n\t\tthis.controller.validateRows(value);\n\t}\n\n\t@Watch('_shortKey')\n\tpublic validateShortKey(value?: ShortKeyPropType): void {\n\t\tthis.controller.validateShortKey(value);\n\t}\n\n\t@Watch('_syncValueBySelector')\n\tpublic validateSyncValueBySelector(value?: SyncValueBySelectorPropType): void {\n\t\tthis.controller.validateSyncValueBySelector(value);\n\t}\n\n\t@Watch('_tabIndex')\n\tpublic validateTabIndex(value?: number): void {\n\t\tthis.controller.validateTabIndex(value);\n\t}\n\n\t@Watch('_touched')\n\tpublic validateTouched(value?: boolean): void {\n\t\tthis.controller.validateTouched(value);\n\t}\n\n\t@Watch('_value')\n\tpublic validateValue(value?: string): void {\n\t\tthis.controller.validateValue(value);\n\t}\n\n\tpublic componentDidLoad(): void {\n\t\tsetTimeout(() => {\n\t\t\tif (this._adjustHeight === true && this.textareaRef /* SSR instanceof HTMLTextAreaElement */) {\n\t\t\t\tthis._rows =\n\t\t\t\t\tthis.state?._rows && this.state._rows > increaseTextareaHeight(this.textareaRef) ? this.state._rows : increaseTextareaHeight(this.textareaRef);\n\t\t\t} else if (!this._rows) {\n\t\t\t\tthis._rows = 1;\n\t\t\t}\n\t\t}, 0);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis._touched = this._touched === true;\n\t\tthis.controller.componentWillLoad();\n\t\tthis.state._hasValue = !!this.state._value;\n\t\tthis.controller.addValueChangeListener((v) => (this.state._hasValue = !!v));\n\t}\n\n\tprivate readonly onInput = (event: InputEvent) => {\n\t\tif (this.textareaRef instanceof HTMLTextAreaElement) {\n\t\t\tsetState(this, '_currentLength', this.textareaRef.value.length);\n\t\t\tif (this.state._adjustHeight) {\n\t\t\t\tthis._rows = increaseTextareaHeight(this.textareaRef);\n\t\t\t}\n\t\t\tthis.controller.onFacade.onInput(event);\n\t\t}\n\t};\n}\n"],"mappings":";;;83BA0BO,MAAMA,EAAmB,CAAC,OAAQ,aAAc,WAAY,Q,MCnBtDC,UAA2BC,EAGvC,WAAAC,CAAmBC,EAAsDC,EAAcC,GACtFC,MAAMH,EAAWC,EAAMC,GAIhBE,KAAAC,qBAAuB,KAC9B,UAAWD,KAAKJ,UAAUM,SAAW,UAAYF,KAAKJ,UAAUM,OAAOC,OAAS,EAAG,CAClFH,KAAKJ,UAAUQ,MAAMC,eAAiBL,KAAKJ,UAAUM,OAAOC,M,GAL7DH,KAAKJ,UAAYA,C,CASX,kBAAAU,CAAmBC,GACzBD,EAAmBN,KAAKJ,UAAWW,EAAO,CACzCC,MAAO,CACNC,WAAYT,KAAKC,uB,CAKb,iBAAAS,CAAkBH,GACxBI,EAAYX,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pBP,KAAKyG,WAAWjF,cAAcjB,E,CAGxB,gBAAAmI,GACNC,YAAW,K,MACV,GAAI3I,KAAKoH,gBAAkB,MAAQpH,KAAKmD,YAAsD,CAC7FnD,KAAKiC,QACJiB,EAAAlD,KAAKI,SAAK,MAAA8C,SAAA,SAAAA,EAAEjB,QAASjC,KAAKI,MAAM6B,MAAQG,EAAuBpC,KAAKmD,aAAenD,KAAKI,MAAM6B,MAAQG,EAAuBpC,KAAKmD,Y,MAC7H,IAAKnD,KAAKiC,MAAO,CACvBjC,KAAKiC,MAAQ,C,IAEZ,E,CAGG,iBAAAP,GACN1B,KAAK+E,SAAW/E,KAAK+E,WAAa,KAClC/E,KAAKyG,WAAW/E,oBAChB1B,KAAKI,MAAM4D,YAAchE,KAAKI,MAAMF,OACpCF,KAAKyG,WAAWmC,wBAAwBC,GAAO7I,KAAKI,MAAM4D,YAAc6E,G","ignoreList":[]}
1
+ {"version":3,"names":["cssResizeOptions","TextareaController","InputIconController","constructor","component","name","host","super","this","afterSyncCharCounter","_value","length","state","_currentLength","validateHasCounter","value","hooks","afterPatch","validateMaxLength","watchNumber","min","validatePlaceholder","watchString","validateReadOnly","watchBoolean","validateResize","watchValidator","includes","Set","join","validateRequired","validateRows","validateValue","setFormAssociatedValue","componentWillLoad","_hasCounter","_maxLength","_placeholder","_readOnly","_resize","_required","_rows","defaultStyleCss","KolTextareaDefaultStyle0","increaseTextareaHeight","el","style","overflow","currentRows","rows","rowHeight","clientHeight","nextRows","Math","round","scrollHeight","KolTextarea","getValue","_a","textareaRef","focus","kolFocus","render","ariaDescribedBy","getRenderStates","hasExpertSlot","showExpertSlot","_label","h","Host","key","class","_hasValue","KolInputTag","textarea","_hideLabel","_accessKey","_alert","showAsAlert","_disabled","_hideError","_hint","_icons","_id","_msg","_shortKey","_tooltipAlign","_touched","onClick","role","slot","Fragment","InternalUnderlinedBadgeText","badgeText","buildBadgeTextString","label","Object","assign","ref","catchRef","title","accessKey","undefined","autoCapitalize","autoCorrect","disabled","id","maxlength","_name","readOnly","required","placeholder","spellcheck","controller","onFacade","onInput","onFocus","event","inputHasFocus","onBlur","resize","hostRef","HTMLTextAreaElement","setState","_adjustHeight","nonce","Boolean","validateAccessKey","validateAdjustHeight","validateAlert","validateDisabled","validateError","validateHideError","validateHideLabel","validateHint","validateIcons","validateId","validateLabel","validateMsg","validateName","validateOn","devWarning","validateShortKey","validateSyncValueBySelector","validateTabIndex","validateTouched","componentDidLoad","setTimeout","addValueChangeListener","v"],"sources":["src/schema/components/textarea.ts","src/components/textarea/controller.ts","src/components/textarea/style.scss?tag=kol-textarea&mode=default&encapsulation=shadow","src/components/textarea/shadow.tsx"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\n\nimport type {\n\tMsgPropType,\n\tPropAccessKey,\n\tPropAdjustHeight,\n\tPropDisabled,\n\tPropHasCounter,\n\tPropHideError,\n\tPropHideLabel,\n\tPropId,\n\tPropLabelWithExpertSlot,\n\tPropMsg,\n\tPropName,\n\tPropReadOnly,\n\tPropRequired,\n\tPropRows,\n\tPropShortKey,\n\tPropSyncValueBySelector,\n\tPropTouched,\n} from '../props';\nimport type { InputTypeOnDefault, KoliBriHorizontalIcons, Stringified } from '../types';\n\n/**\n * TODO: In version 3 (v3), horizontal resizing is abolished. The corresponding property is then reduced to the properties `none` (default) and `vertical`.\n */\nexport const cssResizeOptions = ['both', 'horizontal', 'vertical', 'none'] as const;\nexport type CSSResize = (typeof cssResizeOptions)[number];\n\ntype RequiredProps = PropLabelWithExpertSlot;\ntype OptionalProps = {\n\talert: boolean;\n\t/**\n\t * @deprecated Will be removed in v3. Use `msg` instead.\n\t */\n\terror: string;\n\thint: string;\n\ticons: KoliBriHorizontalIcons;\n\tmaxLength: number;\n\tmsg: Stringified<MsgPropType>;\n\ton: InputTypeOnDefault;\n\tplaceholder: string;\n\tresize: CSSResize;\n\ttabIndex: number;\n\tvalue: string;\n} & PropAccessKey &\n\tPropAdjustHeight &\n\tPropDisabled &\n\tPropHasCounter &\n\tPropHideError &\n\tPropHideLabel &\n\tPropName &\n\tPropReadOnly &\n\tPropRequired &\n\tPropRows &\n\tPropSyncValueBySelector &\n\tPropShortKey &\n\tPropTouched;\n\ntype RequiredStates = {\n\tadjustHeight: boolean;\n\tcurrentLength: number;\n\thasValue: boolean;\n\tresize: CSSResize;\n} & PropId &\n\tPropAdjustHeight &\n\tPropHideError &\n\tPropLabelWithExpertSlot;\ntype OptionalStates = {\n\talert: boolean;\n\terror: string;\n\thint: string;\n\ticons: KoliBriHorizontalIcons;\n\tmaxLength: number;\n\ton: InputTypeOnDefault;\n\tplaceholder: string;\n\ttabIndex: number;\n\tvalue: string;\n} & PropAccessKey &\n\tPropDisabled &\n\tPropHasCounter &\n\tPropHideLabel &\n\tPropMsg &\n\tPropName &\n\tPropReadOnly &\n\tPropRequired &\n\tPropRows &\n\tPropShortKey &\n\tPropTouched;\n\nexport type TextareaProps = Generic.Element.Members<RequiredProps, OptionalProps>;\nexport type TextareaStates = Generic.Element.Members<RequiredStates, OptionalStates>;\nexport type TextareaWatches = Generic.Element.Watchers<RequiredProps, OptionalProps>;\nexport type TextareaAPI = Generic.Element.ComponentApi<RequiredProps, OptionalProps, RequiredStates, OptionalStates>;\n","import type { CSSResize, HasCounterPropType, RowsPropType, TextareaProps, TextareaWatches } from '../../schema';\nimport { validateHasCounter } from '../../schema';\nimport { cssResizeOptions, validateRows, watchBoolean, watchNumber, watchString, watchValidator } from '../../schema';\n\nimport { InputIconController } from '../@deprecated/input/controller-icon';\n\nimport type { Generic } from 'adopted-style-sheets';\nexport class TextareaController extends InputIconController implements TextareaWatches {\n\tprotected readonly component: Generic.Element.Component & TextareaProps;\n\n\tpublic constructor(component: Generic.Element.Component & TextareaProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tprivate afterSyncCharCounter = () => {\n\t\tif (typeof this.component._value === 'string' && this.component._value.length > 0) {\n\t\t\tthis.component.state._currentLength = this.component._value.length;\n\t\t}\n\t};\n\n\tpublic validateHasCounter(value?: HasCounterPropType): void {\n\t\tvalidateHasCounter(this.component, value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: this.afterSyncCharCounter,\n\t\t\t},\n\t\t});\n\t}\n\n\tpublic validateMaxLength(value?: number): void {\n\t\twatchNumber(this.component, '_maxLength', value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: this.afterSyncCharCounter,\n\t\t\t},\n\t\t\tmin: 0,\n\t\t});\n\t}\n\n\tpublic validatePlaceholder(value?: string): void {\n\t\twatchString(this.component, '_placeholder', value);\n\t}\n\n\tpublic validateReadOnly(value?: boolean): void {\n\t\twatchBoolean(this.component, '_readOnly', value);\n\t}\n\n\tpublic validateResize(value?: CSSResize): void {\n\t\twatchValidator(\n\t\t\tthis.component,\n\t\t\t'_resize',\n\t\t\t(value) => typeof value === 'string' && cssResizeOptions.includes(value),\n\t\t\tnew Set(`String {${cssResizeOptions.join(', ')}`),\n\t\t\tvalue,\n\t\t);\n\t}\n\n\tpublic validateRequired(value?: boolean): void {\n\t\twatchBoolean(this.component, '_required', value);\n\t}\n\n\tpublic validateRows(value?: RowsPropType): void {\n\t\tvalidateRows(this.component, value);\n\t}\n\n\tpublic validateValue(value?: string): void {\n\t\twatchString(this.component, '_value', value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: this.afterSyncCharCounter,\n\t\t\t},\n\t\t});\n\t\tthis.setFormAssociatedValue(this.component._value as string);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateHasCounter(this.component._hasCounter);\n\t\tthis.validateMaxLength(this.component._maxLength);\n\t\tthis.validatePlaceholder(this.component._placeholder);\n\t\tthis.validateReadOnly(this.component._readOnly);\n\t\tthis.validateResize(this.component._resize);\n\t\tthis.validateRequired(this.component._required);\n\t\tthis.validateRows(this.component._rows);\n\t\tthis.validateValue(this.component._value);\n\t}\n}\n","@import '../@shared/mixins';\n@import '../style';\n@import '../input-line';\n\n@layer kol-component {\n\t:host {\n\t\tfont-size: rem(16);\n\t}\n}\n","import type {\n\tAdjustHeightPropType,\n\tCSSResize,\n\tFocusableElement,\n\tHasCounterPropType,\n\tHideErrorPropType,\n\tIdPropType,\n\tInputTypeOnDefault,\n\tKoliBriHorizontalIcons,\n\tLabelWithExpertSlotPropType,\n\tMsgPropType,\n\tNamePropType,\n\tRowsPropType,\n\tShortKeyPropType,\n\tStringified,\n\tSyncValueBySelectorPropType,\n\tTextareaAPI,\n\tTextareaStates,\n\tTooltipAlignPropType,\n} from '../../schema';\nimport { buildBadgeTextString, devWarning, setState, showExpertSlot } from '../../schema';\nimport type { JSX } from '@stencil/core';\nimport { Component, Element, Fragment, h, Host, Method, Prop, State, Watch } from '@stencil/core';\n\nimport { nonce } from '../../utils/dev.utils';\nimport { getRenderStates } from '../input/controller';\nimport { InternalUnderlinedBadgeText } from '../../functional-components';\nimport { TextareaController } from './controller';\nimport { KolInputTag } from '../../core/component-names';\n\n/**\n * https://stackoverflow.com/questions/17772260/textarea-auto-height\n */\nconst increaseTextareaHeight = (el: HTMLTextAreaElement): number => {\n\tel.style.overflow = 'hidden'; // verhindert, dass ein Scrollbalken kurz angezeigt wird\n\tconst currentRows = el.rows;\n\tconst rowHeight = el.clientHeight / currentRows;\n\tel.rows = 1;\n\tconst nextRows = Math.round(el.scrollHeight / rowHeight);\n\tel.rows = currentRows;\n\treturn nextRows;\n};\n\n/**\n * @slot - Die Beschriftung des Eingabefeldes.\n */\n@Component({\n\ttag: 'kol-textarea',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: {\n\t\tdelegatesFocus: true,\n\t},\n})\nexport class KolTextarea implements TextareaAPI, FocusableElement {\n\t@Element() private readonly host?: HTMLKolTextareaElement;\n\tprivate textareaRef?: HTMLTextAreaElement;\n\n\tprivate readonly catchRef = (ref?: HTMLTextAreaElement) => {\n\t\tthis.textareaRef = ref;\n\t};\n\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tpublic async getValue(): Promise<string | undefined> {\n\t\treturn this.textareaRef?.value;\n\t}\n\n\t/**\n\t * @deprecated Use kolFocus instead.\n\t */\n\t@Method()\n\tpublic async focus() {\n\t\tawait this.kolFocus();\n\t}\n\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tpublic async kolFocus() {\n\t\tthis.textareaRef?.focus();\n\t}\n\n\tpublic render(): JSX.Element {\n\t\tconst { ariaDescribedBy } = getRenderStates(this.state);\n\t\tconst hasExpertSlot = showExpertSlot(this.state._label);\n\n\t\treturn (\n\t\t\t<Host class={{ 'kol-textarea': true, 'has-value': this.state._hasValue }}>\n\t\t\t\t<KolInputTag\n\t\t\t\t\tclass={{ textarea: true, 'hide-label': !!this.state._hideLabel, 'has-counter': !!this.state._hasCounter }}\n\t\t\t\t\t_accessKey={this.state._accessKey}\n\t\t\t\t\t_alert={this.showAsAlert()}\n\t\t\t\t\t_currentLength={this.state._currentLength}\n\t\t\t\t\t_disabled={this.state._disabled}\n\t\t\t\t\t_hideError={this.state._hideError}\n\t\t\t\t\t_hasCounter={this.state._hasCounter}\n\t\t\t\t\t_hideLabel={this.state._hideLabel}\n\t\t\t\t\t_hint={this.state._hint}\n\t\t\t\t\t_icons={this.state._icons}\n\t\t\t\t\t_id={this.state._id}\n\t\t\t\t\t_label={this.state._label}\n\t\t\t\t\t_maxLength={this.state._maxLength}\n\t\t\t\t\t_msg={this.state._msg}\n\t\t\t\t\t_readOnly={this.state._readOnly}\n\t\t\t\t\t_required={this.state._required}\n\t\t\t\t\t_shortKey={this.state._shortKey}\n\t\t\t\t\t_tooltipAlign={this._tooltipAlign}\n\t\t\t\t\t_touched={this.state._touched}\n\t\t\t\t\tonClick={() => this.textareaRef?.focus()}\n\t\t\t\t\trole={`presentation` /* Avoid element being read as 'clickable' in NVDA */}\n\t\t\t\t>\n\t\t\t\t\t<span slot=\"label\">\n\t\t\t\t\t\t{hasExpertSlot ? (\n\t\t\t\t\t\t\t<slot name=\"expert\"></slot>\n\t\t\t\t\t\t) : typeof this.state._accessKey === 'string' || typeof this.state._shortKey === 'string' ? (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<InternalUnderlinedBadgeText badgeText={buildBadgeTextString(this.state._accessKey || this.state._shortKey)} label={this.state._label} />{' '}\n\t\t\t\t\t\t\t\t<span class=\"access-key-hint\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t\t\t{buildBadgeTextString(this.state._accessKey || this.state._shortKey)}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<span>{this.state._label}</span>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</span>\n\t\t\t\t\t<div slot=\"input\">\n\t\t\t\t\t\t<textarea\n\t\t\t\t\t\t\tref={this.catchRef}\n\t\t\t\t\t\t\ttitle=\"\"\n\t\t\t\t\t\t\taccessKey={this.state._accessKey}\n\t\t\t\t\t\t\taria-describedby={ariaDescribedBy.length > 0 ? ariaDescribedBy.join(' ') : undefined}\n\t\t\t\t\t\t\taria-label={this.state._hideLabel && typeof this.state._label === 'string' ? this.state._label : undefined}\n\t\t\t\t\t\t\tautoCapitalize=\"off\"\n\t\t\t\t\t\t\tautoCorrect=\"off\"\n\t\t\t\t\t\t\tdisabled={this.state._disabled}\n\t\t\t\t\t\t\tid={this.state._id}\n\t\t\t\t\t\t\tmaxlength={this.state._maxLength}\n\t\t\t\t\t\t\tname={this.state._name}\n\t\t\t\t\t\t\treadOnly={this.state._readOnly}\n\t\t\t\t\t\t\trequired={this.state._required}\n\t\t\t\t\t\t\trows={this.state._rows}\n\t\t\t\t\t\t\tplaceholder={this.state._placeholder}\n\t\t\t\t\t\t\tspellcheck=\"false\"\n\t\t\t\t\t\t\t{...this.controller.onFacade}\n\t\t\t\t\t\t\tonInput={this.onInput}\n\t\t\t\t\t\t\tonFocus={(event) => {\n\t\t\t\t\t\t\t\tthis.controller.onFacade.onFocus(event);\n\t\t\t\t\t\t\t\tthis.inputHasFocus = true;\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tonBlur={(event) => {\n\t\t\t\t\t\t\t\tthis.controller.onFacade.onBlur(event);\n\t\t\t\t\t\t\t\tthis.inputHasFocus = false;\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\tresize: this.state._resize,\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tvalue={this.state._value}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</KolInputTag>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate readonly controller: TextareaController;\n\n\t/**\n\t * Defines which key combination can be used to trigger or focus the interactive element of the component.\n\t */\n\t@Prop() public _accessKey?: string;\n\n\t/**\n\t * Adjusts the height of the element to its content.\n\t * @TODO: change back to AdjustHeightPropType after stencil #4663 has been resolved\n\t */\n\t@Prop() public _adjustHeight?: boolean = false;\n\n\t/**\n\t * Defines whether the screen-readers should read out the notification.\n\t * @deprecated Will be removed in v3. Use automatic behaviour instead.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _alert?: boolean;\n\n\t/**\n\t * Makes the element not focusable and ignore all events.\n\t * @TODO: Change type back to `DisabledPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _disabled?: boolean = false;\n\n\t/**\n\t * Defines the error message text.\n\t * @deprecated Will be removed in v3. Use `msg` instead.\n\t */\n\t@Prop() public _error?: string;\n\n\t/**\n\t * Shows the character count on the lower border of the input.\n\t * @TODO: Change type back to `HasCounterPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hasCounter?: boolean = false;\n\n\t/**\n\t * Hides the error message but leaves it in the DOM for the input's aria-describedby.\n\t * @TODO: Change type back to `HideErrorPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _hideError?: boolean = false;\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 hint text.\n\t */\n\t@Prop() public _hint?: string = '';\n\n\t/**\n\t * Defines the icon classnames (e.g. `_icons=\"fa-solid fa-user\"`).\n\t */\n\t@Prop() public _icons?: KoliBriHorizontalIcons;\n\n\t/**\n\t * Defines the internal ID of the primary component element.\n\t */\n\t@Prop() public _id?: IdPropType;\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\t/**\n\t * Defines the maximum number of input characters.\n\t */\n\t@Prop() public _maxLength?: number;\n\n\t/**\n\t * Defines the properties for a message rendered as Alert component.\n\t */\n\t@Prop() public _msg?: Stringified<MsgPropType>;\n\n\t/**\n\t * Defines the technical name of an input field.\n\t */\n\t@Prop() public _name?: NamePropType;\n\n\t/**\n\t * Gibt die EventCallback-Funktionen für das Input-Event an.\n\t */\n\t@Prop() public _on?: InputTypeOnDefault;\n\n\t/**\n\t * Defines the placeholder for input field. To be shown when there's no value.\n\t */\n\t@Prop() public _placeholder?: string;\n\n\t/**\n\t * Makes the input element read only.\n\t * @TODO: Change type back to `ReadOnlyPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _readOnly?: boolean = false;\n\n\t/**\n\t * Defines whether and in which direction the size of the input can be changed by the user. (https://developer.mozilla.org/de/docs/Web/CSS/resize)\n\t * In version 3 (v3), horizontal resizing is abolished. The corresponding property is then reduced to the properties `vertical` (default) and `none`.\n\t */\n\t@Prop() public _resize?: CSSResize = 'vertical';\n\n\t/**\n\t * Makes the input element required.\n\t * @TODO: Change type back to `RequiredPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _required?: boolean = false;\n\n\t/**\n\t * Defines how many rows of text should be visible at the same time.\n\t */\n\t@Prop({ mutable: true, reflect: false }) public _rows?: RowsPropType;\n\n\t/**\n\t * Adds a visual short key hint to the component.\n\t */\n\t@Prop() public _shortKey?: ShortKeyPropType;\n\n\t/**\n\t * Selector for synchronizing the value with another input element.\n\t * @internal\n\t */\n\t@Prop() public _syncValueBySelector?: SyncValueBySelectorPropType;\n\n\t/**\n\t * Defines which tab-index the primary element of the component has. (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex)\n\t */\n\t@Prop() public _tabIndex?: number;\n\n\t/**\n\t * Defines where to show the Tooltip preferably: top, right, bottom or left.\n\t */\n\t@Prop() public _tooltipAlign?: TooltipAlignPropType = 'top';\n\n\t/**\n\t * Shows if the input was touched by a user.\n\t * @TODO: Change type back to `TouchedPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _touched?: boolean = false;\n\n\t/**\n\t * Defines the value of the input.\n\t */\n\t@Prop() public _value?: string;\n\n\t@State() public state: TextareaStates = {\n\t\t_adjustHeight: false,\n\t\t_currentLength: 0,\n\t\t_hasValue: false,\n\t\t_hideError: false,\n\t\t_id: `id-${nonce()}`,\n\t\t_label: '', // ⚠ required\n\t\t_resize: 'vertical',\n\t};\n\n\t@State() private inputHasFocus = false;\n\n\tpublic constructor() {\n\t\tthis.controller = new TextareaController(this, 'textarea', this.host);\n\t}\n\n\tprivate showAsAlert(): boolean {\n\t\tif (this.state._alert === undefined) {\n\t\t\treturn Boolean(this.state._touched) && !this.inputHasFocus;\n\t\t}\n\t\treturn this.state._alert;\n\t}\n\n\t@Watch('_accessKey')\n\tpublic validateAccessKey(value?: string): void {\n\t\tthis.controller.validateAccessKey(value);\n\t}\n\n\t@Watch('_adjustHeight')\n\tpublic validateAdjustHeight(value?: AdjustHeightPropType): void {\n\t\tthis.controller.validateAdjustHeight(value);\n\t}\n\n\t@Watch('_alert')\n\tpublic validateAlert(value?: boolean): void {\n\t\tthis.controller.validateAlert(value);\n\t}\n\n\t@Watch('_disabled')\n\tpublic validateDisabled(value?: boolean): void {\n\t\tthis.controller.validateDisabled(value);\n\t}\n\n\t@Watch('_error')\n\tpublic validateError(value?: string): void {\n\t\tthis.controller.validateError(value);\n\t}\n\n\t@Watch('_hasCounter')\n\tpublic validateHasCounter(value?: HasCounterPropType): void {\n\t\tthis.controller.validateHasCounter(value);\n\t}\n\n\t@Watch('_hideError')\n\tpublic validateHideError(value?: HideErrorPropType): void {\n\t\tthis.controller.validateHideError(value);\n\t}\n\n\t@Watch('_hideLabel')\n\tpublic validateHideLabel(value?: boolean): void {\n\t\tthis.controller.validateHideLabel(value);\n\t}\n\n\t@Watch('_hint')\n\tpublic validateHint(value?: string): void {\n\t\tthis.controller.validateHint(value);\n\t}\n\n\t@Watch('_icons')\n\tpublic validateIcons(value?: Stringified<KoliBriHorizontalIcons>): void {\n\t\tthis.controller.validateIcons(value);\n\t}\n\n\t@Watch('_id')\n\tpublic validateId(value?: string): void {\n\t\tthis.controller.validateId(value);\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelWithExpertSlotPropType): void {\n\t\tthis.controller.validateLabel(value);\n\t}\n\n\t@Watch('_maxLength')\n\tpublic validateMaxLength(value?: number): void {\n\t\tthis.controller.validateMaxLength(value);\n\t}\n\n\t@Watch('_msg')\n\tpublic validateMsg(value?: Stringified<MsgPropType>): void {\n\t\tthis.controller.validateMsg(value);\n\t}\n\n\t@Watch('_name')\n\tpublic validateName(value?: string): void {\n\t\tthis.controller.validateName(value);\n\t}\n\n\t@Watch('_on')\n\tpublic validateOn(value?: InputTypeOnDefault): void {\n\t\tthis.controller.validateOn(value);\n\t}\n\n\t@Watch('_placeholder')\n\tpublic validatePlaceholder(value?: string): void {\n\t\tthis.controller.validatePlaceholder(value);\n\t}\n\n\t@Watch('_readOnly')\n\tpublic validateReadOnly(value?: boolean): void {\n\t\tthis.controller.validateReadOnly(value);\n\t}\n\n\t@Watch('_resize')\n\tpublic validateResize(value?: CSSResize): void {\n\t\tif (value === 'both' || value === 'horizontal') {\n\t\t\tdevWarning(\n\t\t\t\t'In version 3 (v3), horizontal resizing is abolished. The corresponding property is then reduced to the properties `none` (default) and `vertical`.',\n\t\t\t);\n\t\t}\n\t\tthis.controller.validateResize(value);\n\t}\n\n\t@Watch('_required')\n\tpublic validateRequired(value?: boolean): void {\n\t\tthis.controller.validateRequired(value);\n\t}\n\n\t@Watch('_rows')\n\tpublic validateRows(value?: RowsPropType): void {\n\t\tthis.controller.validateRows(value);\n\t}\n\n\t@Watch('_shortKey')\n\tpublic validateShortKey(value?: ShortKeyPropType): void {\n\t\tthis.controller.validateShortKey(value);\n\t}\n\n\t@Watch('_syncValueBySelector')\n\tpublic validateSyncValueBySelector(value?: SyncValueBySelectorPropType): void {\n\t\tthis.controller.validateSyncValueBySelector(value);\n\t}\n\n\t@Watch('_tabIndex')\n\tpublic validateTabIndex(value?: number): void {\n\t\tthis.controller.validateTabIndex(value);\n\t}\n\n\t@Watch('_touched')\n\tpublic validateTouched(value?: boolean): void {\n\t\tthis.controller.validateTouched(value);\n\t}\n\n\t@Watch('_value')\n\tpublic validateValue(value?: string): void {\n\t\tthis.controller.validateValue(value);\n\t}\n\n\tpublic componentDidLoad(): void {\n\t\tsetTimeout(() => {\n\t\t\tif (this._adjustHeight === true && this.textareaRef /* SSR instanceof HTMLTextAreaElement */) {\n\t\t\t\tthis._rows =\n\t\t\t\t\tthis.state?._rows && this.state._rows > increaseTextareaHeight(this.textareaRef) ? this.state._rows : increaseTextareaHeight(this.textareaRef);\n\t\t\t} else if (!this._rows) {\n\t\t\t\tthis._rows = 1;\n\t\t\t}\n\t\t}, 0);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis._touched = this._touched === true;\n\t\tthis.controller.componentWillLoad();\n\t\tthis.state._hasValue = !!this.state._value;\n\t\tthis.controller.addValueChangeListener((v) => (this.state._hasValue = !!v));\n\t}\n\n\tprivate readonly onInput = (event: InputEvent) => {\n\t\tif (this.textareaRef instanceof HTMLTextAreaElement) {\n\t\t\tsetState(this, '_currentLength', this.textareaRef.value.length);\n\t\t\tif (this.state._adjustHeight) {\n\t\t\t\tthis._rows = increaseTextareaHeight(this.textareaRef);\n\t\t\t}\n\t\t\tthis.controller.onFacade.onInput(event);\n\t\t}\n\t};\n}\n"],"mappings":";;;83BA0BO,MAAMA,EAAmB,CAAC,OAAQ,aAAc,WAAY,Q,MCnBtDC,UAA2BC,EAGvC,WAAAC,CAAmBC,EAAsDC,EAAcC,GACtFC,MAAMH,EAAWC,EAAMC,GAIhBE,KAAAC,qBAAuB,KAC9B,UAAWD,KAAKJ,UAAUM,SAAW,UAAYF,KAAKJ,UAAUM,OAAOC,OAAS,EAAG,CAClFH,KAAKJ,UAAUQ,MAAMC,eAAiBL,KAAKJ,UAAUM,OAAOC,M,GAL7DH,KAAKJ,UAAYA,C,CASX,kBAAAU,CAAmBC,GACzBD,EAAmBN,KAAKJ,UAAWW,EAAO,CACzCC,MAAO,CACNC,WAAYT,KAAKC,uB,CAKb,iBAAAS,CAAkBH,GACxBI,EAAYX,KAAKJ,UAAW,aAAcW,EAAO,CAChDC,MAAO,CACNC,WAAYT,KAAKC,sBAElBW,IAAK,G,CAIA,mBAAAC,CAAoBN,GAC1BO,EAAYd,KAAKJ,UAAW,eAAgBW,E,CAGtC,gBAAAQ,CAAiBR,GACvBS,EAAahB,KAAKJ,UAAW,YAAaW,E,CAGpC,cAAAU,CAAeV,GACrBW,EACClB,KAAKJ,UACL,WACCW,UAAiBA,IAAU,UAAYf,EAAiB2B,SAASZ,IAClE,IAAIa,IAAI,WAAW5B,EAAiB6B,KAAK,SACzCd,E,CAIK,gBAAAe,CAAiBf,GACvBS,EAAahB,KAAKJ,UAAW,YAAaW,E,CAGpC,YAAAgB,CAAahB,GACnBgB,EAAavB,KAAKJ,UAAWW,E,CAGvB,aAAAiB,CAAcjB,GACpBO,EAAYd,KAAKJ,UAAW,SAAUW,EAAO,CAC5CC,MAAO,CACNC,WAAYT,KAAKC,wBAGnBD,KAA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@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{h as n,r as t,H as e}from"./index-4e3a1dc7.js";import{t as o}from"./i18n-5fe08f1c.js";import{n as i}from"./dev.utils-a25f785b.js";import{K as s}from"./Alert-5662dc3c.js";import{n as a}from"./component-names-d278f819.js";import"./i18n-7ea9f137.js";import"./reuse-32931294.js";import"./dev.utils-fab45cbc.js";import"./tslib.es6-2e5096f8.js";import"./clsx-09a06a12.js";const l=({key:t,onClose:e,onRef:o,toastState:i})=>n("div",{class:`toast ${i.status}`,key:t},n(s,{class:"alert",alert:!0,label:i.toast.label,level:0,hasCloser:!0,type:i.toast.type,variant:i.toast.alertVariant||i.toast.variant||"card",onCloserClick:e},n("div",{ref:o},"string"==typeof i.toast.description?i.toast.description:null))),r="/*\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: calc(44rem / var(--kolibri-root-font-size, 16));\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 rem(44).\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: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\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-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: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\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}\n@layer kol-component {\n .kol-alert-wc {\n display: grid;\n }\n .kol-alert-wc .heading {\n display: flex;\n place-items: center;\n }\n .kol-alert-wc .heading > div {\n flex-grow: 1;\n }\n .close {\n /* Visible with forced colors */\n outline: transparent solid calc(1rem / var(--kolibri-root-font-size, 16));\n }\n}\n@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}",c=r,d=300,h=class{constructor(n){t(this,n),this.knownRenderFunctions=new Set,this.state={_toastStates:[]}}async enqueue(t){const n={toast:t,status:"adding",id:`toast-${i()}`};return this.state=Object.assign(Object.assign({},this.state),{_toastStates:[n,...this.state._toastStates]}),setTimeout((()=>{this.state=Object.assign(Object.assign({},this.state),{_toastStates:this.state._toastStates.map((t=>t.id===n.id&&"removing"!==t.status?Object.assign(Object.assign({},t),{status:"settled"}):t))})}),d),()=>{this.handleClose(n)}}handleClose(t){this.state=Object.assign(Object.assign({},this.state),{_toastStates:this.state._toastStates.map((n=>(n.id===t.id&&(n.status="removing"),n)))}),setTimeout((()=>{this.state=Object.assign(Object.assign({},this.state),{_toastStates:this.state._toastStates.filter((n=>n.id!==t.id))})}),d)}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((n=>t.every((t=>t.id!==n.id))))})}),d)}}handleToastRef(t,n){n&&"function"==typeof t.toast.render&&!this.knownRenderFunctions.has(t.toast.render)&&(this.knownRenderFunctions.add(t.toast.render),t.toast.render(n,{close:()=>this.handleClose(t)}))}render(){return n(e,{key:"99b7a07dd89afb6d51e062798033bcc1dc22d4e7",class:"kol-toast-container"},this.state._toastStates.length>1&&n(a,{key:"4dd7091e559979af4f698eb76f508e7b3069ea3a",_label:o("kol-toast-close-all"),class:"close-all",_on:{onClick:()=>{this.closeAll()}}}),this.state._toastStates.map((t=>n(l,{key:t.id,onClose:()=>this.handleClose(t),onRef:n=>this.handleToastRef(t,n),toastState:t}))))}};h.style={default:c};export{h as kol_toast_container};
4
+ import{h as n,r as t,H as e}from"./index-a0b4dca2.js";import{t as o}from"./i18n-5fe08f1c.js";import{n as i}from"./dev.utils-5d039f3c.js";import{k as a}from"./component-names-aa3cbc3c.js";import{_ as s}from"./tslib.es6-2e5096f8.js";import{c as l}from"./clsx-09a06a12.js";import{K as r}from"./Alert-a0cdc528.js";import"./i18n-7ea9f137.js";import"./reuse-32931294.js";import"./dev.utils-fab45cbc.js";import"./Heading-781aa65b.js";const c=t=>{var{status:e,toast:o,onClose:i}=t,a=s(t,["status","toast","onClose"]);const{type:d,label:c,description:h,variant:p,alertVariant:m}=o;return n("div",{class:l("toast",e)},n(r,{class:"alert",alert:!0,label:c,level:0,hasCloser:!0,type:d,variant:m||p||"card",onCloserClick:i},n("div",Object.assign({},a),h)))},d=c,h="/*\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: calc(44rem / var(--kolibri-root-font-size, 16));\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 rem(44).\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: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\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-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: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\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}\n@layer kol-component {\n .kol-alert-wc {\n display: grid;\n }\n .kol-alert-wc .heading {\n display: flex;\n place-items: center;\n }\n .kol-alert-wc .heading > div {\n flex-grow: 1;\n }\n .close {\n /* Visible with forced colors */\n outline: transparent solid calc(1rem / var(--kolibri-root-font-size, 16));\n }\n}\n@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}",p=h,b=300,m=class{constructor(n){t(this,n),this.knownRenderFunctions=new Set,this.state={_toastStates:[]}}async enqueue(t){const n={toast:t,status:"adding",id:`toast-${i()}`};return this.state=Object.assign(Object.assign({},this.state),{_toastStates:[n,...this.state._toastStates]}),setTimeout((()=>{this.state=Object.assign(Object.assign({},this.state),{_toastStates:this.state._toastStates.map((t=>t.id===n.id&&"removing"!==t.status?Object.assign(Object.assign({},t),{status:"settled"}):t))})}),b),()=>{this.handleClose(n)}}handleClose(t){this.state=Object.assign(Object.assign({},this.state),{_toastStates:this.state._toastStates.map((n=>(n.id===t.id&&(n.status="removing"),n)))}),setTimeout((()=>{this.state=Object.assign(Object.assign({},this.state),{_toastStates:this.state._toastStates.filter((n=>n.id!==t.id))})}),b)}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((n=>t.every((t=>t.id!==n.id))))})}),b)}}handleToastRef(t,n){n&&"function"==typeof t.toast.render&&!this.knownRenderFunctions.has(t.toast.render)&&(this.knownRenderFunctions.add(t.toast.render),t.toast.render(n,{close:()=>this.handleClose(t)}))}render(){return n(e,{key:"f66e71e939df21caaedf6b2384a78694239238a3",class:"kol-toast-container"},this.state._toastStates.length>1&&n(a,{key:"3659978e379a0ea75f8ff54eb13d4db599048ad5",_label:o("kol-toast-close-all"),class:"close-all",_on:{onClick:()=>{this.closeAll()}}}),this.state._toastStates.map((t=>n(d,{key:t.id,onClose:()=>this.handleClose(t),ref:n=>this.handleToastRef(t,n),toast:t.toast,status:t.status}))))}};m.style={default:p};export{m as kol_toast_container};
@@ -1 +1 @@
1
- {"version":3,"names":["InternalToast","key","onClose","onRef","toastState","h","class","status","KolAlertFc","alert","label","toast","level","hasCloser","type","variant","alertVariant","onCloserClick","ref","description","defaultStyleCss","KolToastContainerDefaultStyle0","TRANSITION_TIMEOUT","KolToastContainer","this","knownRenderFunctions","Set","_toastStates","enqueue","newToastState","id","nonce","state","Object","assign","setTimeout","map","localToastState","handleClose","filter","closeAll","immediate","toastsToClose","every","toastToClose","handleToastRef","element","render","has","add","close","Host","length","KolButtonTag","_label","translate","_on","onClick"],"sources":["src/components/toaster/InternalToast.tsx","src/components/toaster/style.scss?tag=kol-toast-container&mode=default&encapsulation=shadow","src/components/toaster/shadow.tsx"],"sourcesContent":["import { h } from '@stencil/core';\nimport KolAlertFc from '../../functional-components/Alert';\nimport type { ToastState } from '../../schema';\n\ntype Props = {\n\tkey: string;\n\tonClose: () => void;\n\tonRef: (element?: HTMLDivElement) => void;\n\ttoastState: ToastState;\n};\n\nexport const InternalToast = ({ key, onClose, onRef, toastState }: Props) => {\n\treturn (\n\t\t<div class={`toast ${toastState.status}`} key={key}>\n\t\t\t<KolAlertFc\n\t\t\t\tclass=\"alert\"\n\t\t\t\talert={true}\n\t\t\t\tlabel={toastState.toast.label}\n\t\t\t\tlevel={0}\n\t\t\t\thasCloser={true}\n\t\t\t\ttype={toastState.toast.type}\n\t\t\t\tvariant={toastState.toast.alertVariant || toastState.toast.variant || 'card'}\n\t\t\t\tonCloserClick={onClose}\n\t\t\t>\n\t\t\t\t<div ref={onRef}>{typeof toastState.toast.description === 'string' ? toastState.toast.description : null}</div>\n\t\t\t</KolAlertFc>\n\t\t</div>\n\t);\n};\n","@import '../@shared/mixins';\n@import '../style';\n@import '../@shared/kol-alert-mixin';\n\n@include kol-alert-styles;\n\n@layer kol-component {\n\t:host {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tfont-size: rem(16);\n\t\tposition: fixed;\n\t\tz-index: 200;\n\t}\n\n\t.close-all {\n\t\talign-self: flex-end;\n\t}\n}\n","import type { JSX } from '@stencil/core';\nimport { Component, h, Host, Method, State } from '@stencil/core';\n\nimport { translate } from '../../i18n';\nimport { nonce } from '../../utils/dev.utils';\nimport { InternalToast } from './InternalToast';\n\nimport type { Toast, ToasterAPI, ToasterStates, ToastRenderFunction, ToastState } from '../../schema';\nimport { KolButtonTag } from '../../core/component-names';\n\nconst TRANSITION_TIMEOUT = 300;\n\n@Component({\n\ttag: 'kol-toast-container',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: true,\n})\nexport class KolToastContainer implements ToasterAPI {\n\t@State() public state: ToasterStates = {\n\t\t_toastStates: [],\n\t};\n\n\t/* Keep track of render functions, so we call each only once. */\n\tprivate knownRenderFunctions = new Set<ToastRenderFunction>();\n\n\t// Stencil requires async function:\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tpublic async enqueue(toast: Toast) {\n\t\tconst newToastState: ToastState = {\n\t\t\ttoast,\n\t\t\tstatus: 'adding',\n\t\t\tid: `toast-${nonce()}`,\n\t\t};\n\t\tthis.state = {\n\t\t\t...this.state,\n\t\t\t_toastStates: [newToastState, ...this.state._toastStates],\n\t\t};\n\n\t\tsetTimeout(() => {\n\t\t\tthis.state = {\n\t\t\t\t...this.state,\n\t\t\t\t_toastStates: this.state._toastStates.map((localToastState) =>\n\t\t\t\t\tlocalToastState.id === newToastState.id && localToastState.status !== 'removing'\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t...localToastState,\n\t\t\t\t\t\t\t\tstatus: 'settled',\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t: localToastState,\n\t\t\t\t),\n\t\t\t};\n\t\t}, TRANSITION_TIMEOUT);\n\n\t\treturn () => {\n\t\t\tthis.handleClose(newToastState);\n\t\t};\n\t}\n\n\tprivate handleClose(toastState: ToastState) {\n\t\tthis.state = {\n\t\t\t...this.state,\n\t\t\t_toastStates: this.state._toastStates.map((localToastState) => {\n\t\t\t\tif (localToastState.id === toastState.id) {\n\t\t\t\t\tlocalToastState.status = 'removing';\n\t\t\t\t}\n\t\t\t\treturn localToastState;\n\t\t\t}),\n\t\t};\n\n\t\tsetTimeout(() => {\n\t\t\tthis.state = {\n\t\t\t\t...this.state,\n\t\t\t\t_toastStates: this.state._toastStates.filter((localToastState) => localToastState.id !== toastState.id),\n\t\t\t};\n\t\t}, TRANSITION_TIMEOUT);\n\t}\n\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tpublic async closeAll(immediate: boolean = false) {\n\t\tif (immediate) {\n\t\t\tthis.state = {\n\t\t\t\t...this.state,\n\t\t\t\t_toastStates: [],\n\t\t\t};\n\t\t} else {\n\t\t\tconst toastsToClose = [...this.state._toastStates]; // Create a snapshot of the open toasts at the time closeAll has been called\n\n\t\t\tthis.state = {\n\t\t\t\t...this.state,\n\t\t\t\t_toastStates: toastsToClose.map((localToastState) => ({\n\t\t\t\t\t...localToastState,\n\t\t\t\t\tstatus: 'removing',\n\t\t\t\t})),\n\t\t\t};\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.state = {\n\t\t\t\t\t...this.state,\n\t\t\t\t\t_toastStates: this.state._toastStates.filter((toastState) => toastsToClose.every((toastToClose) => toastToClose.id !== toastState.id)),\n\t\t\t\t};\n\t\t\t}, TRANSITION_TIMEOUT);\n\t\t}\n\t}\n\n\tprivate handleToastRef(toastState: ToastState, element?: HTMLDivElement) {\n\t\tif (element && typeof toastState.toast.render === 'function' && !this.knownRenderFunctions.has(toastState.toast.render)) {\n\t\t\tthis.knownRenderFunctions.add(toastState.toast.render);\n\t\t\ttoastState.toast.render(element, { close: () => this.handleClose(toastState) });\n\t\t}\n\t}\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host class=\"kol-toast-container\">\n\t\t\t\t{this.state._toastStates.length > 1 && (\n\t\t\t\t\t<KolButtonTag\n\t\t\t\t\t\t_label={translate('kol-toast-close-all')}\n\t\t\t\t\t\tclass=\"close-all\"\n\t\t\t\t\t\t_on={{\n\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\tvoid this.closeAll();\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}}\n\t\t\t\t\t></KolButtonTag>\n\t\t\t\t)}\n\t\t\t\t{this.state._toastStates.map((toastState) => (\n\t\t\t\t\t<InternalToast\n\t\t\t\t\t\tkey={toastState.id}\n\t\t\t\t\t\tonClose={() => this.handleClose(toastState)}\n\t\t\t\t\t\tonRef={(element) => this.handleToastRef(toastState, element)}\n\t\t\t\t\t\ttoastState={toastState}\n\t\t\t\t\t/>\n\t\t\t\t))}\n\t\t\t</Host>\n\t\t);\n\t}\n}\n"],"mappings":";;;qXAWO,MAAMA,EAAgB,EAAGC,MAAKC,UAASC,QAAOC,gBAEnDC,EAAA,OAAKC,MAAO,SAASF,EAAWG,SAAUN,IAAKA,GAC9CI,EAACG,EAAU,CACVF,MAAM,QACNG,MAAO,KACPC,MAAON,EAAWO,MAAMD,MACxBE,MAAO,EACPC,UAAW,K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Close","other","__rest","type","label","description","variant","alertVariant","h","class","clsx","KolAlertFc","alert","level","hasCloser","onCloserClick","Object","assign","KolToastItemFc","defaultStyleCss","KolToastContainerDefaultStyle0","TRANSITION_TIMEOUT","KolToastContainer","this","knownRenderFunctions","Set","_toastStates","enqueue","newToastState","id","nonce","state","setTimeout","map","localToastState","handleClose","toastState","filter","closeAll","immediate","toastsToClose","every","toastToClose","handleToastRef","element","render","has","add","close","Host","key","length","KolButtonTag","_label","translate","_on","onClick","ref"],"sources":["src/functional-components/ToastItem/ToastItem.tsx","src/components/toaster/style.scss?tag=kol-toast-container&mode=default&encapsulation=shadow","src/components/toaster/shadow.tsx"],"sourcesContent":["import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport { type Toast } from '../../schema';\n\nimport KolAlertFc from '../Alert';\nimport clsx from 'clsx';\n\ntype ToastItemProps = JSXBase.HTMLAttributes<HTMLDivElement> & {\n\tstatus: 'adding' | 'settled' | 'removing';\n\ttoast: Toast;\n\tonClose: () => void;\n};\n\nconst ToastItemFc: FC<ToastItemProps> = ({ status, toast, onClose, ...other }) => {\n\tconst { type, label, description, variant, alertVariant } = toast;\n\n\treturn (\n\t\t<div class={clsx('toast', status)}>\n\t\t\t<KolAlertFc\n\t\t\t\tclass=\"alert\"\n\t\t\t\talert={true}\n\t\t\t\tlabel={label}\n\t\t\t\tlevel={0}\n\t\t\t\thasCloser={true}\n\t\t\t\ttype={type}\n\t\t\t\tvariant={alertVariant || variant || 'card'}\n\t\t\t\tonCloserClick={onClose}\n\t\t\t>\n\t\t\t\t<div {...other}>{description}</div>\n\t\t\t</KolAlertFc>\n\t\t</div>\n\t);\n};\n\nexport default ToastItemFc;\n","@import '../@shared/mixins';\n@import '../style';\n@import '../@shared/kol-alert-mixin';\n\n@include kol-alert-styles;\n\n@layer kol-component {\n\t:host {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tfont-size: rem(16);\n\t\tposition: fixed;\n\t\tz-index: 200;\n\t}\n\n\t.close-all {\n\t\talign-self: flex-end;\n\t}\n}\n","import type { JSX } from '@stencil/core';\nimport { Component, h, Host, Method, State } from '@stencil/core';\n\nimport { translate } from '../../i18n';\nimport { nonce } from '../../utils/dev.utils';\n\nimport type { Toast, ToasterAPI, ToasterStates, ToastRenderFunction, ToastState } from '../../schema';\nimport { KolButtonTag } from '../../core/component-names';\nimport { KolToastItemFc } from '../../functional-components';\n\nconst TRANSITION_TIMEOUT = 300;\n\n@Component({\n\ttag: 'kol-toast-container',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: true,\n})\nexport class KolToastContainer implements ToasterAPI {\n\t@State() public state: ToasterStates = {\n\t\t_toastStates: [],\n\t};\n\n\t/* Keep track of render functions, so we call each only once. */\n\tprivate knownRenderFunctions = new Set<ToastRenderFunction>();\n\n\t// Stencil requires async function:\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tpublic async enqueue(toast: Toast) {\n\t\tconst newToastState: ToastState = {\n\t\t\ttoast,\n\t\t\tstatus: 'adding',\n\t\t\tid: `toast-${nonce()}`,\n\t\t};\n\t\tthis.state = {\n\t\t\t...this.state,\n\t\t\t_toastStates: [newToastState, ...this.state._toastStates],\n\t\t};\n\n\t\tsetTimeout(() => {\n\t\t\tthis.state = {\n\t\t\t\t...this.state,\n\t\t\t\t_toastStates: this.state._toastStates.map((localToastState) =>\n\t\t\t\t\tlocalToastState.id === newToastState.id && localToastState.status !== 'removing'\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t...localToastState,\n\t\t\t\t\t\t\t\tstatus: 'settled',\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t: localToastState,\n\t\t\t\t),\n\t\t\t};\n\t\t}, TRANSITION_TIMEOUT);\n\n\t\treturn () => {\n\t\t\tthis.handleClose(newToastState);\n\t\t};\n\t}\n\n\tprivate handleClose(toastState: ToastState) {\n\t\tthis.state = {\n\t\t\t...this.state,\n\t\t\t_toastStates: this.state._toastStates.map((localToastState) => {\n\t\t\t\tif (localToastState.id === toastState.id) {\n\t\t\t\t\tlocalToastState.status = 'removing';\n\t\t\t\t}\n\t\t\t\treturn localToastState;\n\t\t\t}),\n\t\t};\n\n\t\tsetTimeout(() => {\n\t\t\tthis.state = {\n\t\t\t\t...this.state,\n\t\t\t\t_toastStates: this.state._toastStates.filter((localToastState) => localToastState.id !== toastState.id),\n\t\t\t};\n\t\t}, TRANSITION_TIMEOUT);\n\t}\n\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tpublic async closeAll(immediate: boolean = false) {\n\t\tif (immediate) {\n\t\t\tthis.state = {\n\t\t\t\t...this.state,\n\t\t\t\t_toastStates: [],\n\t\t\t};\n\t\t} else {\n\t\t\tconst toastsToClose = [...this.state._toastStates]; // Create a snapshot of the open toasts at the time closeAll has been called\n\n\t\t\tthis.state = {\n\t\t\t\t...this.state,\n\t\t\t\t_toastStates: toastsToClose.map((localToastState) => ({\n\t\t\t\t\t...localToastState,\n\t\t\t\t\tstatus: 'removing',\n\t\t\t\t})),\n\t\t\t};\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.state = {\n\t\t\t\t\t...this.state,\n\t\t\t\t\t_toastStates: this.state._toastStates.filter((toastState) => toastsToClose.every((toastToClose) => toastToClose.id !== toastState.id)),\n\t\t\t\t};\n\t\t\t}, TRANSITION_TIMEOUT);\n\t\t}\n\t}\n\n\tprivate handleToastRef(toastState: ToastState, element?: HTMLDivElement) {\n\t\tif (element && typeof toastState.toast.render === 'function' && !this.knownRenderFunctions.has(toastState.toast.render)) {\n\t\t\tthis.knownRenderFunctions.add(toastState.toast.render);\n\t\t\ttoastState.toast.render(element, { close: () => this.handleClose(toastState) });\n\t\t}\n\t}\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host class=\"kol-toast-container\">\n\t\t\t\t{this.state._toastStates.length > 1 && (\n\t\t\t\t\t<KolButtonTag\n\t\t\t\t\t\t_label={translate('kol-toast-close-all')}\n\t\t\t\t\t\tclass=\"close-all\"\n\t\t\t\t\t\t_on={{\n\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\tvoid this.closeAll();\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}}\n\t\t\t\t\t></KolButtonTag>\n\t\t\t\t)}\n\t\t\t\t{this.state._toastStates.map((toastState) => (\n\t\t\t\t\t<KolToastItemFc\n\t\t\t\t\t\tkey={toastState.id}\n\t\t\t\t\t\tonClose={() => this.handleClose(toastState)}\n\t\t\t\t\t\tref={(element?: HTMLDivElement) => this.handleToastRef(toastState, element)}\n\t\t\t\t\t\ttoast={toastState.toast}\n\t\t\t\t\t\tstatus={toastState.status}\n\t\t\t\t\t/>\n\t\t\t\t))}\n\t\t\t</Host>\n\t\t);\n\t}\n}\n"],"mappings":";;;2aAaA,MAAMA,EAAmCC,I,IAAAC,OAAEA,EAAMC,MAAEA,EAAKC,QAAEA,GAAOH,EAAKI,EAAKC,EAAAL,EAAlC,8BACxC,MAAMM,KAAEA,EAAIC,MAAEA,EAAKC,YAAEA,EAAWC,QAAEA,EAAOC,aAAEA,GAAiBR,EAE5D,OACCS,EAAA,OAAKC,MAAOC,EAAK,QAASZ,IACzBU,EAACG,EAAU,CACVF,MAAM,QACNG,MAAO,KACPR,MAAOA,EACPS,MAAO,EACPC,UAAW,KACXX,KAAMA,EACNG,QAASC,GAAgBD,GAAW,OACpCS,cAAef,GAEfQ,EAAA,MAAAQ,OAAAC,OAAA,GAAShB,GAAQI,IAEb,EAIR,MAAAa,EAAetB,EClCf,MAAMuB,EAAkB,8/LACxB,MAAAC,EAAeD,ECSf,MAAME,EAAqB,I,MASdC,EAAiB,M,yBAMrBC,KAAAC,qBAAuB,IAAIC,I,WALI,CACtCC,aAAc,G,CASR,aAAMC,CAAQ5B,GACpB,MAAM6B,EAA4B,CACjC7B,QACAD,OAAQ,SACR+B,GAAI,SAASC,OAEdP,KAAKQ,MAAKf,OAAAC,O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