@public-ui/components 1.5.0-rc.0 → 1.5.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (643) hide show
  1. package/README.md +7 -0
  2. package/cheat-sheet.html +54 -25
  3. package/custom-elements.json +378 -15
  4. package/dist/cjs/app-globals-c6303780.js +4 -0
  5. package/dist/cjs/app-globals-c6303780.js.map +1 -0
  6. package/dist/cjs/{button-link-d6b0f982.js → button-link-89ed5382.js} +1 -1
  7. package/dist/cjs/button-link-89ed5382.js.map +1 -0
  8. package/dist/cjs/{controller-29a631b7.js → controller-2405dd04.js} +1 -1
  9. package/dist/cjs/{controller-29a631b7.js.map → controller-2405dd04.js.map} +1 -1
  10. package/dist/cjs/{controller-af048c8c.js → controller-8e2cebc1.js} +1 -1
  11. package/dist/cjs/{controller-af048c8c.js.map → controller-8e2cebc1.js.map} +1 -1
  12. package/dist/cjs/{controller-56acda6c.js → controller-94b357a3.js} +1 -1
  13. package/dist/cjs/{controller-56acda6c.js.map → controller-94b357a3.js.map} +1 -1
  14. package/dist/cjs/{controller-12cc1062.js → controller-ce13f0a2.js} +1 -1
  15. package/dist/cjs/{controller-12cc1062.js.map → controller-ce13f0a2.js.map} +1 -1
  16. package/dist/cjs/{controller-f59ad664.js → controller-d0743a95.js} +1 -1
  17. package/dist/cjs/{controller-f59ad664.js.map → controller-d0743a95.js.map} +1 -1
  18. package/dist/cjs/{controller-0779bf0b.js → controller-dbbddbe7.js} +1 -1
  19. package/dist/cjs/{controller-0779bf0b.js.map → controller-dbbddbe7.js.map} +1 -1
  20. package/dist/cjs/{controller-icon-a83b2341.js → controller-icon-b87565c4.js} +1 -1
  21. package/dist/cjs/{controller-icon-a83b2341.js.map → controller-icon-b87565c4.js.map} +1 -1
  22. package/dist/cjs/{devtools-5d189f65.js → devtools-a9a95b0a.js} +1 -1
  23. package/dist/cjs/{devtools-5d189f65.js.map → devtools-a9a95b0a.js.map} +1 -1
  24. package/dist/cjs/i18n-5d946612.js +4 -0
  25. package/dist/cjs/i18n-5d946612.js.map +1 -0
  26. package/dist/cjs/icon-ccf4ad42.js +4 -0
  27. package/dist/cjs/icon-ccf4ad42.js.map +1 -0
  28. package/dist/cjs/index-29c5d3c6.js.map +1 -1
  29. package/dist/cjs/index-ecda65e0.js +4 -0
  30. package/dist/cjs/{i18n-f0da17e4.js.map → index-ecda65e0.js.map} +1 -1
  31. package/dist/cjs/index.cjs.js +1 -1
  32. package/dist/cjs/index.cjs.js.map +1 -1
  33. package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
  34. package/dist/cjs/kol-abbr.cjs.entry.js.map +1 -1
  35. package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
  36. package/dist/cjs/kol-accordion.cjs.entry.js.map +1 -1
  37. package/dist/cjs/kol-alert.cjs.entry.js +1 -1
  38. package/dist/cjs/kol-alert.cjs.entry.js.map +1 -1
  39. package/dist/cjs/kol-badge.cjs.entry.js +1 -1
  40. package/dist/cjs/kol-badge.cjs.entry.js.map +1 -1
  41. package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
  42. package/dist/cjs/kol-breadcrumb.cjs.entry.js.map +1 -1
  43. package/dist/cjs/kol-button-group.cjs.entry.js +1 -1
  44. package/dist/cjs/kol-button-group.cjs.entry.js.map +1 -1
  45. package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
  46. package/dist/cjs/kol-button-link.cjs.entry.js.map +1 -1
  47. package/dist/cjs/kol-button-wc_2.cjs.entry.js +1 -1
  48. package/dist/cjs/kol-button-wc_2.cjs.entry.js.map +1 -1
  49. package/dist/cjs/kol-button.cjs.entry.js +1 -1
  50. package/dist/cjs/kol-button.cjs.entry.js.map +1 -1
  51. package/dist/cjs/kol-card.cjs.entry.js +1 -1
  52. package/dist/cjs/kol-card.cjs.entry.js.map +1 -1
  53. package/dist/cjs/kol-details.cjs.entry.js +1 -1
  54. package/dist/cjs/kol-details.cjs.entry.js.map +1 -1
  55. package/dist/cjs/kol-form.cjs.entry.js +1 -1
  56. package/dist/cjs/kol-form.cjs.entry.js.map +1 -1
  57. package/dist/cjs/kol-heading-wc_2.cjs.entry.js +1 -1
  58. package/dist/cjs/kol-heading-wc_2.cjs.entry.js.map +1 -1
  59. package/dist/cjs/kol-heading.cjs.entry.js +1 -1
  60. package/dist/cjs/kol-heading.cjs.entry.js.map +1 -1
  61. package/dist/cjs/kol-icon-icofont.cjs.entry.js.map +1 -1
  62. package/dist/cjs/kol-icon.cjs.entry.js +1 -1
  63. package/dist/cjs/kol-icon.cjs.entry.js.map +1 -1
  64. package/dist/cjs/kol-image.cjs.entry.js +4 -0
  65. package/dist/cjs/kol-image.cjs.entry.js.map +1 -0
  66. package/dist/cjs/kol-indented-text.cjs.entry.js +1 -1
  67. package/dist/cjs/kol-indented-text.cjs.entry.js.map +1 -1
  68. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  69. package/dist/cjs/kol-input-checkbox.cjs.entry.js.map +1 -1
  70. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  71. package/dist/cjs/kol-input-color.cjs.entry.js.map +1 -1
  72. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  73. package/dist/cjs/kol-input-date.cjs.entry.js.map +1 -1
  74. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  75. package/dist/cjs/kol-input-email.cjs.entry.js.map +1 -1
  76. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  77. package/dist/cjs/kol-input-file.cjs.entry.js.map +1 -1
  78. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  79. package/dist/cjs/kol-input-number.cjs.entry.js.map +1 -1
  80. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  81. package/dist/cjs/kol-input-password.cjs.entry.js.map +1 -1
  82. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  83. package/dist/cjs/kol-input-radio.cjs.entry.js.map +1 -1
  84. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  85. package/dist/cjs/kol-input-range.cjs.entry.js.map +1 -1
  86. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  87. package/dist/cjs/kol-input-text.cjs.entry.js.map +1 -1
  88. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  89. package/dist/cjs/kol-kolibri.cjs.entry.js.map +1 -1
  90. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  91. package/dist/cjs/kol-link-button.cjs.entry.js.map +1 -1
  92. package/dist/cjs/kol-link-group.cjs.entry.js +1 -1
  93. package/dist/cjs/kol-link-group.cjs.entry.js.map +1 -1
  94. package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
  95. package/dist/cjs/kol-link-wc.cjs.entry.js.map +1 -1
  96. package/dist/cjs/kol-link.cjs.entry.js +1 -1
  97. package/dist/cjs/kol-link.cjs.entry.js.map +1 -1
  98. package/dist/cjs/kol-logo.cjs.entry.js +1 -1
  99. package/dist/cjs/kol-logo.cjs.entry.js.map +1 -1
  100. package/dist/cjs/kol-modal.cjs.entry.js +1 -1
  101. package/dist/cjs/kol-modal.cjs.entry.js.map +1 -1
  102. package/dist/cjs/kol-nav.cjs.entry.js +1 -1
  103. package/dist/cjs/kol-nav.cjs.entry.js.map +1 -1
  104. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  105. package/dist/cjs/kol-pagination.cjs.entry.js.map +1 -1
  106. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  107. package/dist/cjs/kol-progress.cjs.entry.js.map +1 -1
  108. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  109. package/dist/cjs/kol-select.cjs.entry.js.map +1 -1
  110. package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
  111. package/dist/cjs/kol-skip-nav.cjs.entry.js.map +1 -1
  112. package/dist/cjs/kol-span.cjs.entry.js +1 -1
  113. package/dist/cjs/kol-span.cjs.entry.js.map +1 -1
  114. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  115. package/dist/cjs/kol-spin.cjs.entry.js.map +1 -1
  116. package/dist/cjs/kol-symbol.cjs.entry.js +1 -1
  117. package/dist/cjs/kol-symbol.cjs.entry.js.map +1 -1
  118. package/dist/cjs/kol-table.cjs.entry.js +1 -1
  119. package/dist/cjs/kol-table.cjs.entry.js.map +1 -1
  120. package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
  121. package/dist/cjs/kol-tabs.cjs.entry.js.map +1 -1
  122. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  123. package/dist/cjs/kol-textarea.cjs.entry.js.map +1 -1
  124. package/dist/cjs/kol-toast.cjs.entry.js +1 -1
  125. package/dist/cjs/kol-toast.cjs.entry.js.map +1 -1
  126. package/dist/cjs/kol-tooltip.cjs.entry.js +1 -1
  127. package/dist/cjs/kol-tooltip.cjs.entry.js.map +1 -1
  128. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  129. package/dist/cjs/kol-version.cjs.entry.js.map +1 -1
  130. package/dist/cjs/kolibri.cjs.js +1 -1
  131. package/dist/cjs/kolibri.cjs.js.map +1 -1
  132. package/dist/cjs/label-ce9fe285.js +4 -0
  133. package/dist/cjs/{label-f0e269fe.js.map → label-ce9fe285.js.map} +1 -1
  134. package/dist/cjs/loader.cjs.js +1 -1
  135. package/dist/cjs/loader.cjs.js.map +1 -1
  136. package/dist/cjs/prop.validators-69d5cf89.js +4 -0
  137. package/dist/cjs/prop.validators-69d5cf89.js.map +1 -0
  138. package/dist/cjs/{tab-index-4fa42b34.js → tab-index-1d448ede.js} +1 -1
  139. package/dist/cjs/{tab-index-4fa42b34.js.map → tab-index-1d448ede.js.map} +1 -1
  140. package/dist/cjs/{validation-c45379a1.js → validation-1e8663e2.js} +1 -1
  141. package/dist/cjs/{validation-c45379a1.js.map → validation-1e8663e2.js.map} +1 -1
  142. package/dist/cjs/{validation-1d6b9712.js → validation-2b3c81d9.js} +1 -1
  143. package/dist/cjs/{validation-1d6b9712.js.map → validation-2b3c81d9.js.map} +1 -1
  144. package/dist/components/component.js +1 -1
  145. package/dist/components/component.js.map +1 -1
  146. package/dist/components/component10.js +1 -1
  147. package/dist/components/component10.js.map +1 -1
  148. package/dist/components/component11.js +1 -1
  149. package/dist/components/component11.js.map +1 -1
  150. package/dist/components/component12.js +1 -1
  151. package/dist/components/component12.js.map +1 -1
  152. package/dist/components/component13.js +1 -1
  153. package/dist/components/component13.js.map +1 -1
  154. package/dist/components/component2.js +1 -1
  155. package/dist/components/component2.js.map +1 -1
  156. package/dist/components/component3.js +1 -1
  157. package/dist/components/component3.js.map +1 -1
  158. package/dist/components/component4.js +1 -1
  159. package/dist/components/component4.js.map +1 -1
  160. package/dist/components/component5.js +1 -1
  161. package/dist/components/component5.js.map +1 -1
  162. package/dist/components/component6.js +1 -1
  163. package/dist/components/component6.js.map +1 -1
  164. package/dist/components/component8.js +1 -1
  165. package/dist/components/component8.js.map +1 -1
  166. package/dist/components/controller2.js +1 -1
  167. package/dist/components/controller3.js +1 -1
  168. package/dist/components/i18n.js.map +1 -1
  169. package/dist/components/index.js +1 -1
  170. package/dist/components/index.js.map +1 -1
  171. package/dist/components/kol-abbr.js +1 -1
  172. package/dist/components/kol-abbr.js.map +1 -1
  173. package/dist/components/kol-accordion.js +1 -1
  174. package/dist/components/kol-accordion.js.map +1 -1
  175. package/dist/components/kol-breadcrumb.js +1 -1
  176. package/dist/components/kol-breadcrumb.js.map +1 -1
  177. package/dist/components/kol-button-group.js +1 -1
  178. package/dist/components/kol-button-group.js.map +1 -1
  179. package/dist/components/kol-button-link.js +1 -1
  180. package/dist/components/kol-button-link.js.map +1 -1
  181. package/dist/components/kol-card.js +1 -1
  182. package/dist/components/kol-card.js.map +1 -1
  183. package/dist/components/kol-details.js +1 -1
  184. package/dist/components/kol-details.js.map +1 -1
  185. package/dist/components/kol-heading.js +1 -1
  186. package/dist/components/kol-heading.js.map +1 -1
  187. package/dist/components/kol-icon-icofont.js.map +1 -1
  188. package/dist/components/kol-image.d.ts +11 -0
  189. package/dist/components/kol-image.js +4 -0
  190. package/dist/components/kol-image.js.map +1 -0
  191. package/dist/components/kol-input-adapter-leanup.js +1 -1
  192. package/dist/components/kol-input-checkbox.js +1 -1
  193. package/dist/components/kol-input-checkbox.js.map +1 -1
  194. package/dist/components/kol-input-color.js +1 -1
  195. package/dist/components/kol-input-color.js.map +1 -1
  196. package/dist/components/kol-input-date.js +1 -1
  197. package/dist/components/kol-input-date.js.map +1 -1
  198. package/dist/components/kol-input-email.js +1 -1
  199. package/dist/components/kol-input-email.js.map +1 -1
  200. package/dist/components/kol-input-file.js +1 -1
  201. package/dist/components/kol-input-file.js.map +1 -1
  202. package/dist/components/kol-input-password.js +1 -1
  203. package/dist/components/kol-input-password.js.map +1 -1
  204. package/dist/components/kol-input-radio-group.js +1 -1
  205. package/dist/components/kol-input-range.js +1 -1
  206. package/dist/components/kol-input-range.js.map +1 -1
  207. package/dist/components/kol-input-text.js +1 -1
  208. package/dist/components/kol-input-text.js.map +1 -1
  209. package/dist/components/kol-kolibri.js +1 -1
  210. package/dist/components/kol-kolibri.js.map +1 -1
  211. package/dist/components/kol-link-button.js +1 -1
  212. package/dist/components/kol-link-button.js.map +1 -1
  213. package/dist/components/kol-link-group.js +1 -1
  214. package/dist/components/kol-link-group.js.map +1 -1
  215. package/dist/components/kol-logo.js +1 -1
  216. package/dist/components/kol-logo.js.map +1 -1
  217. package/dist/components/kol-modal.js +1 -1
  218. package/dist/components/kol-modal.js.map +1 -1
  219. package/dist/components/kol-nav.js +1 -1
  220. package/dist/components/kol-nav.js.map +1 -1
  221. package/dist/components/kol-progress.js +1 -1
  222. package/dist/components/kol-progress.js.map +1 -1
  223. package/dist/components/kol-skip-nav.js +1 -1
  224. package/dist/components/kol-skip-nav.js.map +1 -1
  225. package/dist/components/kol-span.js +1 -1
  226. package/dist/components/kol-span.js.map +1 -1
  227. package/dist/components/kol-spin.js +1 -1
  228. package/dist/components/kol-spin.js.map +1 -1
  229. package/dist/components/kol-symbol.js +1 -1
  230. package/dist/components/kol-symbol.js.map +1 -1
  231. package/dist/components/kol-table.js +1 -1
  232. package/dist/components/kol-table.js.map +1 -1
  233. package/dist/components/kol-tabs.js +1 -1
  234. package/dist/components/kol-tabs.js.map +1 -1
  235. package/dist/components/kol-textarea.js +1 -1
  236. package/dist/components/kol-textarea.js.map +1 -1
  237. package/dist/components/kol-toast.js +1 -1
  238. package/dist/components/kol-toast.js.map +1 -1
  239. package/dist/components/kol-version.js +1 -1
  240. package/dist/components/kol-version.js.map +1 -1
  241. package/dist/components/prop.validators.js +1 -1
  242. package/dist/components/prop.validators.js.map +1 -1
  243. package/dist/components/shadow.js +1 -1
  244. package/dist/components/shadow.js.map +1 -1
  245. package/dist/components/shadow2.js +1 -1
  246. package/dist/components/shadow2.js.map +1 -1
  247. package/dist/components/validation.js +1 -1
  248. package/dist/esm/app-globals-81f5e91d.js +4 -0
  249. package/dist/esm/app-globals-81f5e91d.js.map +1 -0
  250. package/dist/esm/{button-link-b0ebacde.js → button-link-3d1888e3.js} +1 -1
  251. package/dist/esm/button-link-3d1888e3.js.map +1 -0
  252. package/dist/esm/{controller-78f90d62.js → controller-04bee517.js} +1 -1
  253. package/dist/esm/{controller-78f90d62.js.map → controller-04bee517.js.map} +1 -1
  254. package/dist/esm/{controller-e3c820af.js → controller-32fdeebb.js} +1 -1
  255. package/dist/esm/{controller-e3c820af.js.map → controller-32fdeebb.js.map} +1 -1
  256. package/dist/esm/{controller-8f60f862.js → controller-5bd06546.js} +1 -1
  257. package/dist/esm/{controller-8f60f862.js.map → controller-5bd06546.js.map} +1 -1
  258. package/dist/esm/{controller-967a4af4.js → controller-944c3e03.js} +1 -1
  259. package/dist/esm/{controller-967a4af4.js.map → controller-944c3e03.js.map} +1 -1
  260. package/dist/esm/{controller-7cf89ed4.js → controller-9926eaee.js} +1 -1
  261. package/dist/esm/{controller-7cf89ed4.js.map → controller-9926eaee.js.map} +1 -1
  262. package/dist/esm/{controller-3489e5a5.js → controller-ea28fcf8.js} +1 -1
  263. package/dist/esm/{controller-3489e5a5.js.map → controller-ea28fcf8.js.map} +1 -1
  264. package/dist/esm/{controller-icon-4875e055.js → controller-icon-2a9f5c13.js} +1 -1
  265. package/dist/esm/{controller-icon-4875e055.js.map → controller-icon-2a9f5c13.js.map} +1 -1
  266. package/dist/esm/{devtools-86cb24d9.js → devtools-640ace8d.js} +1 -1
  267. package/dist/esm/{devtools-86cb24d9.js.map → devtools-640ace8d.js.map} +1 -1
  268. package/dist/esm/i18n-8e14d822.js +4 -0
  269. package/dist/esm/i18n-8e14d822.js.map +1 -0
  270. package/dist/esm/icon-cab2d129.js +4 -0
  271. package/dist/esm/icon-cab2d129.js.map +1 -0
  272. package/dist/esm/index-4f2a12cc.js +4 -0
  273. package/dist/esm/{i18n-67083aee.js.map → index-4f2a12cc.js.map} +1 -1
  274. package/dist/esm/index-50adf9a0.js.map +1 -1
  275. package/dist/esm/index.js +1 -1
  276. package/dist/esm/index.js.map +1 -1
  277. package/dist/esm/kol-abbr.entry.js +1 -1
  278. package/dist/esm/kol-abbr.entry.js.map +1 -1
  279. package/dist/esm/kol-accordion.entry.js +1 -1
  280. package/dist/esm/kol-accordion.entry.js.map +1 -1
  281. package/dist/esm/kol-alert.entry.js +1 -1
  282. package/dist/esm/kol-alert.entry.js.map +1 -1
  283. package/dist/esm/kol-badge.entry.js +1 -1
  284. package/dist/esm/kol-badge.entry.js.map +1 -1
  285. package/dist/esm/kol-breadcrumb.entry.js +1 -1
  286. package/dist/esm/kol-breadcrumb.entry.js.map +1 -1
  287. package/dist/esm/kol-button-group.entry.js +1 -1
  288. package/dist/esm/kol-button-group.entry.js.map +1 -1
  289. package/dist/esm/kol-button-link.entry.js +1 -1
  290. package/dist/esm/kol-button-link.entry.js.map +1 -1
  291. package/dist/esm/kol-button-wc_2.entry.js +1 -1
  292. package/dist/esm/kol-button-wc_2.entry.js.map +1 -1
  293. package/dist/esm/kol-button.entry.js +1 -1
  294. package/dist/esm/kol-button.entry.js.map +1 -1
  295. package/dist/esm/kol-card.entry.js +1 -1
  296. package/dist/esm/kol-card.entry.js.map +1 -1
  297. package/dist/esm/kol-details.entry.js +1 -1
  298. package/dist/esm/kol-details.entry.js.map +1 -1
  299. package/dist/esm/kol-form.entry.js +1 -1
  300. package/dist/esm/kol-form.entry.js.map +1 -1
  301. package/dist/esm/kol-heading-wc_2.entry.js +1 -1
  302. package/dist/esm/kol-heading-wc_2.entry.js.map +1 -1
  303. package/dist/esm/kol-heading.entry.js +1 -1
  304. package/dist/esm/kol-heading.entry.js.map +1 -1
  305. package/dist/esm/kol-icon-icofont.entry.js.map +1 -1
  306. package/dist/esm/kol-icon.entry.js +1 -1
  307. package/dist/esm/kol-icon.entry.js.map +1 -1
  308. package/dist/esm/kol-image.entry.js +4 -0
  309. package/dist/esm/kol-image.entry.js.map +1 -0
  310. package/dist/esm/kol-indented-text.entry.js +1 -1
  311. package/dist/esm/kol-indented-text.entry.js.map +1 -1
  312. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  313. package/dist/esm/kol-input-checkbox.entry.js.map +1 -1
  314. package/dist/esm/kol-input-color.entry.js +1 -1
  315. package/dist/esm/kol-input-color.entry.js.map +1 -1
  316. package/dist/esm/kol-input-date.entry.js +1 -1
  317. package/dist/esm/kol-input-date.entry.js.map +1 -1
  318. package/dist/esm/kol-input-email.entry.js +1 -1
  319. package/dist/esm/kol-input-email.entry.js.map +1 -1
  320. package/dist/esm/kol-input-file.entry.js +1 -1
  321. package/dist/esm/kol-input-file.entry.js.map +1 -1
  322. package/dist/esm/kol-input-number.entry.js +1 -1
  323. package/dist/esm/kol-input-number.entry.js.map +1 -1
  324. package/dist/esm/kol-input-password.entry.js +1 -1
  325. package/dist/esm/kol-input-password.entry.js.map +1 -1
  326. package/dist/esm/kol-input-radio.entry.js +1 -1
  327. package/dist/esm/kol-input-radio.entry.js.map +1 -1
  328. package/dist/esm/kol-input-range.entry.js +1 -1
  329. package/dist/esm/kol-input-range.entry.js.map +1 -1
  330. package/dist/esm/kol-input-text.entry.js +1 -1
  331. package/dist/esm/kol-input-text.entry.js.map +1 -1
  332. package/dist/esm/kol-kolibri.entry.js +1 -1
  333. package/dist/esm/kol-kolibri.entry.js.map +1 -1
  334. package/dist/esm/kol-link-button.entry.js +1 -1
  335. package/dist/esm/kol-link-button.entry.js.map +1 -1
  336. package/dist/esm/kol-link-group.entry.js +1 -1
  337. package/dist/esm/kol-link-group.entry.js.map +1 -1
  338. package/dist/esm/kol-link-wc.entry.js +1 -1
  339. package/dist/esm/kol-link-wc.entry.js.map +1 -1
  340. package/dist/esm/kol-link.entry.js +1 -1
  341. package/dist/esm/kol-link.entry.js.map +1 -1
  342. package/dist/esm/kol-logo.entry.js +1 -1
  343. package/dist/esm/kol-logo.entry.js.map +1 -1
  344. package/dist/esm/kol-modal.entry.js +1 -1
  345. package/dist/esm/kol-modal.entry.js.map +1 -1
  346. package/dist/esm/kol-nav.entry.js +1 -1
  347. package/dist/esm/kol-nav.entry.js.map +1 -1
  348. package/dist/esm/kol-pagination.entry.js +1 -1
  349. package/dist/esm/kol-pagination.entry.js.map +1 -1
  350. package/dist/esm/kol-progress.entry.js +1 -1
  351. package/dist/esm/kol-progress.entry.js.map +1 -1
  352. package/dist/esm/kol-select.entry.js +1 -1
  353. package/dist/esm/kol-select.entry.js.map +1 -1
  354. package/dist/esm/kol-skip-nav.entry.js +1 -1
  355. package/dist/esm/kol-skip-nav.entry.js.map +1 -1
  356. package/dist/esm/kol-span.entry.js +1 -1
  357. package/dist/esm/kol-span.entry.js.map +1 -1
  358. package/dist/esm/kol-spin.entry.js +1 -1
  359. package/dist/esm/kol-spin.entry.js.map +1 -1
  360. package/dist/esm/kol-symbol.entry.js +1 -1
  361. package/dist/esm/kol-symbol.entry.js.map +1 -1
  362. package/dist/esm/kol-table.entry.js +1 -1
  363. package/dist/esm/kol-table.entry.js.map +1 -1
  364. package/dist/esm/kol-tabs.entry.js +1 -1
  365. package/dist/esm/kol-tabs.entry.js.map +1 -1
  366. package/dist/esm/kol-textarea.entry.js +1 -1
  367. package/dist/esm/kol-textarea.entry.js.map +1 -1
  368. package/dist/esm/kol-toast.entry.js +1 -1
  369. package/dist/esm/kol-toast.entry.js.map +1 -1
  370. package/dist/esm/kol-tooltip.entry.js +1 -1
  371. package/dist/esm/kol-tooltip.entry.js.map +1 -1
  372. package/dist/esm/kol-version.entry.js +1 -1
  373. package/dist/esm/kol-version.entry.js.map +1 -1
  374. package/dist/esm/kolibri.js +1 -1
  375. package/dist/esm/kolibri.js.map +1 -1
  376. package/dist/esm/label-ea9f2a1a.js +4 -0
  377. package/dist/esm/{label-467917df.js.map → label-ea9f2a1a.js.map} +1 -1
  378. package/dist/esm/loader.js +1 -1
  379. package/dist/esm/loader.js.map +1 -1
  380. package/dist/esm/prop.validators-769a843a.js +4 -0
  381. package/dist/esm/prop.validators-769a843a.js.map +1 -0
  382. package/dist/esm/{tab-index-068270b7.js → tab-index-22c62334.js} +1 -1
  383. package/dist/esm/{tab-index-068270b7.js.map → tab-index-22c62334.js.map} +1 -1
  384. package/dist/esm/validation-d9821b54.js +4 -0
  385. package/dist/esm/{validation-fdaf7554.js.map → validation-d9821b54.js.map} +1 -1
  386. package/dist/esm/{validation-3ea5cbb3.js → validation-f13f1eed.js} +1 -1
  387. package/dist/esm/{validation-3ea5cbb3.js.map → validation-f13f1eed.js.map} +1 -1
  388. package/dist/kolibri/app-globals-81f5e91d.js +4 -0
  389. package/dist/kolibri/app-globals-81f5e91d.js.map +1 -0
  390. package/dist/kolibri/assets/bpa-icons/bpa-icons.eot +0 -0
  391. package/dist/kolibri/assets/bpa-icons/bpa-icons.json +1115 -0
  392. package/dist/kolibri/assets/bpa-icons/bpa-icons.svg +432 -0
  393. package/dist/kolibri/assets/bpa-icons/bpa-icons.symbol.svg +1449 -0
  394. package/dist/kolibri/assets/bpa-icons/bpa-icons.ttf +0 -0
  395. package/dist/kolibri/assets/bpa-icons/bpa-icons.woff +0 -0
  396. package/dist/kolibri/assets/bpa-icons/bpa-icons.woff2 +0 -0
  397. package/dist/kolibri/assets/bpa-icons/style.css +159 -0
  398. package/dist/kolibri/assets/bpa-icons/style.less +157 -0
  399. package/dist/kolibri/assets/bpa-icons/style.module.less +160 -0
  400. package/dist/kolibri/assets/bpa-icons/style.scss +299 -0
  401. package/dist/kolibri/assets/bpa-icons/style.styl +157 -0
  402. package/dist/kolibri/assets/codicons/LICENSE +395 -0
  403. package/dist/kolibri/assets/codicons/LICENSE-CODE +21 -0
  404. package/dist/kolibri/assets/codicons/codicon.css +19 -1
  405. package/dist/kolibri/assets/codicons/codicon.csv +14 -1
  406. package/dist/kolibri/assets/codicons/codicon.html +112 -8
  407. package/dist/kolibri/assets/codicons/codicon.svg +1 -1
  408. package/dist/kolibri/assets/codicons/codicon.ttf +0 -0
  409. package/dist/kolibri/assets/images/abgrenzung.jpg +0 -0
  410. package/dist/kolibri/button-link-3d1888e3.js +4 -0
  411. package/dist/kolibri/button-link-3d1888e3.js.map +1 -0
  412. package/dist/kolibri/{controller-78f90d62.js → controller-04bee517.js} +1 -1
  413. package/dist/kolibri/{controller-e3c820af.js → controller-32fdeebb.js} +1 -1
  414. package/dist/kolibri/controller-5bd06546.js +4 -0
  415. package/dist/kolibri/{controller-967a4af4.js → controller-944c3e03.js} +1 -1
  416. package/dist/kolibri/controller-9926eaee.js +4 -0
  417. package/dist/kolibri/{controller-3489e5a5.js → controller-ea28fcf8.js} +1 -1
  418. package/dist/kolibri/{controller-icon-4875e055.js → controller-icon-2a9f5c13.js} +1 -1
  419. package/dist/kolibri/{devtools-86cb24d9.js → devtools-640ace8d.js} +1 -1
  420. package/dist/kolibri/i18n-8e14d822.js +4 -0
  421. package/dist/kolibri/i18n-8e14d822.js.map +1 -0
  422. package/dist/kolibri/icon-cab2d129.js +4 -0
  423. package/dist/kolibri/icon-cab2d129.js.map +1 -0
  424. package/dist/kolibri/index-4f2a12cc.js +4 -0
  425. package/dist/kolibri/index-4f2a12cc.js.map +1 -0
  426. package/dist/kolibri/index-50adf9a0.js.map +1 -1
  427. package/dist/kolibri/index.esm.js +1 -1
  428. package/dist/kolibri/index.esm.js.map +1 -1
  429. package/dist/kolibri/kol-abbr.entry.js +1 -1
  430. package/dist/kolibri/kol-abbr.entry.js.map +1 -1
  431. package/dist/kolibri/kol-accordion.entry.js +1 -1
  432. package/dist/kolibri/kol-accordion.entry.js.map +1 -1
  433. package/dist/kolibri/kol-alert.entry.js +1 -1
  434. package/dist/kolibri/kol-alert.entry.js.map +1 -1
  435. package/dist/kolibri/kol-badge.entry.js +1 -1
  436. package/dist/kolibri/kol-badge.entry.js.map +1 -1
  437. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  438. package/dist/kolibri/kol-breadcrumb.entry.js.map +1 -1
  439. package/dist/kolibri/kol-button-group.entry.js +1 -1
  440. package/dist/kolibri/kol-button-group.entry.js.map +1 -1
  441. package/dist/kolibri/kol-button-link.entry.js +1 -1
  442. package/dist/kolibri/kol-button-link.entry.js.map +1 -1
  443. package/dist/kolibri/kol-button-wc_2.entry.js +1 -1
  444. package/dist/kolibri/kol-button-wc_2.entry.js.map +1 -1
  445. package/dist/kolibri/kol-button.entry.js +1 -1
  446. package/dist/kolibri/kol-button.entry.js.map +1 -1
  447. package/dist/kolibri/kol-card.entry.js +1 -1
  448. package/dist/kolibri/kol-card.entry.js.map +1 -1
  449. package/dist/kolibri/kol-details.entry.js +1 -1
  450. package/dist/kolibri/kol-details.entry.js.map +1 -1
  451. package/dist/kolibri/kol-form.entry.js +1 -1
  452. package/dist/kolibri/kol-form.entry.js.map +1 -1
  453. package/dist/kolibri/kol-heading-wc_2.entry.js +1 -1
  454. package/dist/kolibri/kol-heading-wc_2.entry.js.map +1 -1
  455. package/dist/kolibri/kol-heading.entry.js +1 -1
  456. package/dist/kolibri/kol-heading.entry.js.map +1 -1
  457. package/dist/kolibri/kol-icon-icofont.entry.js.map +1 -1
  458. package/dist/kolibri/kol-icon.entry.js +1 -1
  459. package/dist/kolibri/kol-icon.entry.js.map +1 -1
  460. package/dist/kolibri/kol-image.entry.js +4 -0
  461. package/dist/kolibri/kol-image.entry.js.map +1 -0
  462. package/dist/kolibri/kol-indented-text.entry.js +1 -1
  463. package/dist/kolibri/kol-indented-text.entry.js.map +1 -1
  464. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  465. package/dist/kolibri/kol-input-checkbox.entry.js.map +1 -1
  466. package/dist/kolibri/kol-input-color.entry.js +1 -1
  467. package/dist/kolibri/kol-input-color.entry.js.map +1 -1
  468. package/dist/kolibri/kol-input-date.entry.js +1 -1
  469. package/dist/kolibri/kol-input-date.entry.js.map +1 -1
  470. package/dist/kolibri/kol-input-email.entry.js +1 -1
  471. package/dist/kolibri/kol-input-email.entry.js.map +1 -1
  472. package/dist/kolibri/kol-input-file.entry.js +1 -1
  473. package/dist/kolibri/kol-input-file.entry.js.map +1 -1
  474. package/dist/kolibri/kol-input-number.entry.js +1 -1
  475. package/dist/kolibri/kol-input-number.entry.js.map +1 -1
  476. package/dist/kolibri/kol-input-password.entry.js +1 -1
  477. package/dist/kolibri/kol-input-password.entry.js.map +1 -1
  478. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  479. package/dist/kolibri/kol-input-radio.entry.js.map +1 -1
  480. package/dist/kolibri/kol-input-range.entry.js +1 -1
  481. package/dist/kolibri/kol-input-range.entry.js.map +1 -1
  482. package/dist/kolibri/kol-input-text.entry.js +1 -1
  483. package/dist/kolibri/kol-input-text.entry.js.map +1 -1
  484. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  485. package/dist/kolibri/kol-kolibri.entry.js.map +1 -1
  486. package/dist/kolibri/kol-link-button.entry.js +1 -1
  487. package/dist/kolibri/kol-link-button.entry.js.map +1 -1
  488. package/dist/kolibri/kol-link-group.entry.js +1 -1
  489. package/dist/kolibri/kol-link-group.entry.js.map +1 -1
  490. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  491. package/dist/kolibri/kol-link-wc.entry.js.map +1 -1
  492. package/dist/kolibri/kol-link.entry.js +1 -1
  493. package/dist/kolibri/kol-link.entry.js.map +1 -1
  494. package/dist/kolibri/kol-logo.entry.js +1 -1
  495. package/dist/kolibri/kol-logo.entry.js.map +1 -1
  496. package/dist/kolibri/kol-modal.entry.js +1 -1
  497. package/dist/kolibri/kol-modal.entry.js.map +1 -1
  498. package/dist/kolibri/kol-nav.entry.js +1 -1
  499. package/dist/kolibri/kol-nav.entry.js.map +1 -1
  500. package/dist/kolibri/kol-pagination.entry.js +1 -1
  501. package/dist/kolibri/kol-pagination.entry.js.map +1 -1
  502. package/dist/kolibri/kol-progress.entry.js +1 -1
  503. package/dist/kolibri/kol-progress.entry.js.map +1 -1
  504. package/dist/kolibri/kol-select.entry.js +1 -1
  505. package/dist/kolibri/kol-select.entry.js.map +1 -1
  506. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  507. package/dist/kolibri/kol-skip-nav.entry.js.map +1 -1
  508. package/dist/kolibri/kol-span.entry.js +1 -1
  509. package/dist/kolibri/kol-span.entry.js.map +1 -1
  510. package/dist/kolibri/kol-spin.entry.js +1 -1
  511. package/dist/kolibri/kol-spin.entry.js.map +1 -1
  512. package/dist/kolibri/kol-symbol.entry.js +1 -1
  513. package/dist/kolibri/kol-symbol.entry.js.map +1 -1
  514. package/dist/kolibri/kol-table.entry.js +1 -1
  515. package/dist/kolibri/kol-table.entry.js.map +1 -1
  516. package/dist/kolibri/kol-tabs.entry.js +1 -1
  517. package/dist/kolibri/kol-tabs.entry.js.map +1 -1
  518. package/dist/kolibri/kol-textarea.entry.js +1 -1
  519. package/dist/kolibri/kol-textarea.entry.js.map +1 -1
  520. package/dist/kolibri/kol-toast.entry.js +1 -1
  521. package/dist/kolibri/kol-toast.entry.js.map +1 -1
  522. package/dist/kolibri/kol-tooltip.entry.js +1 -1
  523. package/dist/kolibri/kol-tooltip.entry.js.map +1 -1
  524. package/dist/kolibri/kol-version.entry.js +1 -1
  525. package/dist/kolibri/kol-version.entry.js.map +1 -1
  526. package/dist/kolibri/kolibri.esm.js +1 -1
  527. package/dist/kolibri/kolibri.esm.js.map +1 -1
  528. package/dist/kolibri/label-ea9f2a1a.js +4 -0
  529. package/dist/kolibri/label-ea9f2a1a.js.map +1 -0
  530. package/dist/kolibri/prop.validators-769a843a.js +4 -0
  531. package/dist/kolibri/prop.validators-769a843a.js.map +1 -0
  532. package/dist/kolibri/tab-index-22c62334.js +4 -0
  533. package/dist/kolibri/{tab-index-068270b7.js.map → tab-index-22c62334.js.map} +1 -1
  534. package/dist/kolibri/{validation-fdaf7554.js → validation-d9821b54.js} +1 -1
  535. package/dist/kolibri/validation-f13f1eed.js +4 -0
  536. package/dist/types/components/accordion/component.d.ts +0 -3
  537. package/dist/types/components/button/test/html.mock.d.ts +7 -0
  538. package/dist/types/components/heading/component.d.ts +15 -9
  539. package/dist/types/components/heading/shadow.d.ts +2 -2
  540. package/dist/types/components/icon-icofont/component.d.ts +0 -1
  541. package/dist/types/components/image/shadow.d.ts +18 -0
  542. package/dist/types/components/image/types.d.ts +21 -0
  543. package/dist/types/components/link-group/component.d.ts +0 -1
  544. package/dist/types/components/pagination/component.d.ts +4 -4
  545. package/dist/types/components.d.ts +67 -12
  546. package/dist/types/core/index.d.ts +0 -1
  547. package/dist/types/global/script.d.ts +1 -1
  548. package/dist/types/schema/index.d.ts +1 -1
  549. package/dist/types/types/button-link.d.ts +14 -12
  550. package/dist/types/utils/prop.validators.d.ts +1 -1
  551. package/dist/types/utils/validators/loading.d.ts +3 -0
  552. package/doc/abbr.md +2 -0
  553. package/doc/accordion.md +10 -2
  554. package/doc/alert.md +2 -0
  555. package/doc/badge.md +3 -1
  556. package/doc/breadcrumb.md +2 -0
  557. package/doc/button-link.md +3 -1
  558. package/doc/button.md +8 -6
  559. package/doc/card.md +2 -0
  560. package/doc/details.md +2 -0
  561. package/doc/heading.md +5 -5
  562. package/doc/icon.md +2 -4
  563. package/doc/image.md +60 -0
  564. package/doc/indented-text.md +2 -0
  565. package/doc/input-checkbox.md +2 -0
  566. package/doc/input-color.md +3 -1
  567. package/doc/input-date.md +3 -1
  568. package/doc/input-email.md +3 -1
  569. package/doc/input-file.md +3 -1
  570. package/doc/input-number.md +3 -1
  571. package/doc/input-password.md +3 -1
  572. package/doc/input-radio.md +2 -0
  573. package/doc/input-range.md +2 -0
  574. package/doc/input-text.md +3 -1
  575. package/doc/kolibri.md +2 -0
  576. package/doc/link-button.md +2 -0
  577. package/doc/link-group.md +2 -0
  578. package/doc/link.md +4 -2
  579. package/doc/logo.md +3 -1
  580. package/doc/modal.md +2 -0
  581. package/doc/nav.md +2 -0
  582. package/doc/pagination.md +2 -0
  583. package/doc/progress.md +2 -0
  584. package/doc/select.md +2 -0
  585. package/doc/skip-nav.md +2 -0
  586. package/doc/span.md +4 -2
  587. package/doc/spin.md +2 -0
  588. package/doc/table.md +2 -0
  589. package/doc/tabs.md +2 -0
  590. package/doc/textarea.md +2 -0
  591. package/doc/toast.md +2 -0
  592. package/doc/tooltip.md +2 -0
  593. package/doc/version.md +2 -0
  594. package/jest-test-results.json +1 -1
  595. package/package.json +1 -1
  596. package/vscode-custom-data.json +43 -6
  597. package/dist/cjs/app-globals-161cafee.js +0 -4
  598. package/dist/cjs/app-globals-161cafee.js.map +0 -1
  599. package/dist/cjs/button-link-d6b0f982.js.map +0 -1
  600. package/dist/cjs/i18n-f0da17e4.js +0 -4
  601. package/dist/cjs/icon-a4cf95a3.js +0 -4
  602. package/dist/cjs/icon-a4cf95a3.js.map +0 -1
  603. package/dist/cjs/label-f0e269fe.js +0 -4
  604. package/dist/cjs/prop.validators-ffb87630.js +0 -4
  605. package/dist/cjs/prop.validators-ffb87630.js.map +0 -1
  606. package/dist/esm/app-globals-841cf59f.js +0 -4
  607. package/dist/esm/app-globals-841cf59f.js.map +0 -1
  608. package/dist/esm/button-link-b0ebacde.js.map +0 -1
  609. package/dist/esm/i18n-67083aee.js +0 -4
  610. package/dist/esm/icon-2c0634d7.js +0 -4
  611. package/dist/esm/icon-2c0634d7.js.map +0 -1
  612. package/dist/esm/label-467917df.js +0 -4
  613. package/dist/esm/prop.validators-8365f685.js +0 -4
  614. package/dist/esm/prop.validators-8365f685.js.map +0 -1
  615. package/dist/esm/validation-fdaf7554.js +0 -4
  616. package/dist/kolibri/app-globals-841cf59f.js +0 -4
  617. package/dist/kolibri/app-globals-841cf59f.js.map +0 -1
  618. package/dist/kolibri/button-link-b0ebacde.js +0 -4
  619. package/dist/kolibri/button-link-b0ebacde.js.map +0 -1
  620. package/dist/kolibri/controller-7cf89ed4.js +0 -4
  621. package/dist/kolibri/controller-8f60f862.js +0 -4
  622. package/dist/kolibri/i18n-67083aee.js +0 -4
  623. package/dist/kolibri/i18n-67083aee.js.map +0 -1
  624. package/dist/kolibri/icon-2c0634d7.js +0 -4
  625. package/dist/kolibri/icon-2c0634d7.js.map +0 -1
  626. package/dist/kolibri/label-467917df.js +0 -4
  627. package/dist/kolibri/label-467917df.js.map +0 -1
  628. package/dist/kolibri/prop.validators-8365f685.js +0 -4
  629. package/dist/kolibri/prop.validators-8365f685.js.map +0 -1
  630. package/dist/kolibri/tab-index-068270b7.js +0 -4
  631. package/dist/kolibri/validation-3ea5cbb3.js +0 -4
  632. package/dist/types/components/icon-icofont/test/html.mock.d.ts +0 -2
  633. package/dist/types/components/link-group/test/html.mock.d.ts +0 -2
  634. /package/dist/kolibri/{controller-78f90d62.js.map → controller-04bee517.js.map} +0 -0
  635. /package/dist/kolibri/{controller-e3c820af.js.map → controller-32fdeebb.js.map} +0 -0
  636. /package/dist/kolibri/{controller-8f60f862.js.map → controller-5bd06546.js.map} +0 -0
  637. /package/dist/kolibri/{controller-967a4af4.js.map → controller-944c3e03.js.map} +0 -0
  638. /package/dist/kolibri/{controller-7cf89ed4.js.map → controller-9926eaee.js.map} +0 -0
  639. /package/dist/kolibri/{controller-3489e5a5.js.map → controller-ea28fcf8.js.map} +0 -0
  640. /package/dist/kolibri/{controller-icon-4875e055.js.map → controller-icon-2a9f5c13.js.map} +0 -0
  641. /package/dist/kolibri/{devtools-86cb24d9.js.map → devtools-640ace8d.js.map} +0 -0
  642. /package/dist/kolibri/{validation-fdaf7554.js.map → validation-d9821b54.js.map} +0 -0
  643. /package/dist/kolibri/{validation-3ea5cbb3.js.map → validation-f13f1eed.js.map} +0 -0
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{d as devHint,b as watchValidator,w as watchString,F as a11yHintLabelingLandmarks,t as watchBoolean}from"./prop.validators.js";import{w as watchNavLinks}from"./validation.js";import{a as translate}from"./i18n.js";import{d as defineCustomElement$2,a as defineCustomElement$6,b as defineCustomElement$8}from"./component.js";import{d as defineCustomElement$7}from"./shadow2.js";import{d as defineCustomElement$5}from"./component2.js";import{d as defineCustomElement$4}from"./component6.js";import{d as defineCustomElement$3}from"./component3.js";const defaultStyleCss=":host{--kolibri-border-color:#666;--kolibri-border-radius:0.125rem;--kolibri-border-width:1px;--kolibri-color-error:#f44336;--kolibri-color-info:#2196f3;--kolibri-color-success:#4caf50;--kolibri-color-warning:#ff9800;--kolibri-color-primary:#3f51b5;--kolibri-color-secondary:#ff4081;--kolibri-color-normal:#9e9e9e;--kolibri-color-danger:#f44336;--kolibri-color-ghost:#f5f5f5;--kolibri-color-disabled:#bdbdbd;--kolibri-color-text:#222222;--kolibri-color-visited:#9c27b0;--kolibri-font-family:Verdana, Arial, Tahoma, Helvetica, sans-serif;--kolibri-font-size:16px;--kolibri-spacing:0.25rem}:host{font-family:inherit;font-size:inherit}:host *{hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}:host{display:inline-block}a,button{background-color:transparent;border:none;font-size:inherit;margin:0;padding:0;transition-duration:0.5s;transition-property:background-color, color, border-color}:host{font-family:var(--kolibri-font-family);font-size:inherit}*{box-sizing:border-box}kol-icon{color:inherit}kol-span-wc{display:grid;gap:var(--kolibri-spacing);place-items:center}kol-span-wc>span{display:flex;gap:var(--kolibri-spacing);place-items:center}kol-span-wc>kol-icon,kol-span-wc>span>kol-icon{display:inline-grid;place-items:center;width:1em;height:1em}a,button,input,select,textarea{appearance:none;cursor:pointer}a.icon-only>kol-span-wc>span>span,button.icon-only>kol-span-wc>span>span{display:none}h1,h2,h3,h4,h5,h6{font-family:var(--kolibri-font-family);font-size:var(--kolibri-font-size);margin:0;padding:0}:host>div{display:inline-block}",UNIQUE_ARIA_LABEL=[],removeAriaLabel=t=>{const a=UNIQUE_ARIA_LABEL.indexOf(t);a>=0&&UNIQUE_ARIA_LABEL.splice(a,1)},KolNav$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.onClick=t=>{t._active=!1===t._active,this.state=Object.assign({},this.state)},this.hasActiveChild=t=>!!(Array.isArray(t._children)&&t._children.length>0)&&t._children.some(this.hasActiveChild),this.linkList=t=>h("ul",{class:{flex:0===t.deep&&"horizontal"===this.state._orientation},part:`nav ${this.state._orientation}`},t.links.map(((a,i)=>h("li",{key:i,part:`li ${0===t.deep?this.state._orientation:"vertical"}${a._active?" selected":""}${i<t.links.length-1?"":" last"}`},Array.isArray(a._children)&&a._children.length>0?h("div",{class:"h-full"},h("div",{class:{"h-full":!0}},h("kol-link-wc",{class:"block w-full h-full",exportparts:"icon,link,span"+(!0===a._active?",selected":""),_ariaLabel:!0===this.state._compact||!0===a._iconOnly?a._label:void 0,_ariaExpanded:!0===a._active,_disabled:a._disabled,_href:"javascript:void(0)",_icon:!0===this.state._collapsible?!0===a._active?"fa-solid fa-minus":"fa-solid fa-plus":"string"==typeof a._icon?a._icon:"fa-solid fa-link-slash",_iconOnly:!0===this.state._compact||!0===a._iconOnly,_label:a._label,onClick:()=>this.onClick(a)})),!0===a._active&&h("div",{class:{expanded:!0,active:!0===a._active,"active-child":this.hasActiveChild(a),"absolute ":0===t.deep&&"horizontal"===this.state._orientation}},h(this.linkList,{links:a._children,deep:t.deep+1}))):h("div",{class:{"h-full":!0,"text-center":!0===this.state._compact||!0===a._iconOnly}},h("kol-link-wc",{class:{"block w-full h-full":!0,active:!0===a._active},exportparts:"icon,link,span"+(!0===a._active?",selected":""),_ariaCurrent:!0===a._active&&this.state._ariaCurrentValue,_ariaLabel:!0===this.state._compact||!0===a._iconOnly?a._label:void 0,_href:a._href,_icon:"string"==typeof a._icon?a._icon:"fa-solid fa-link-slash","_icon-only":!0===this.state._compact||!0===a._iconOnly,_label:a._label,_on:a._on,_selector:a._selector,_tooltipAlign:a._tooltipAlign,_target:a._target})))))),this._ariaCurrentValue=!1,this._ariaLabel=void 0,this._collapsible=!1,this._compact=!1,this._hasCompactButton=!1,this._orientation="vertical",this._links=void 0,this._variant="primary",this.state={_ariaCurrentValue:!1,_ariaLabel:"…",_collapsible:!0,_hasCompactButton:!1,_links:[],_orientation:"vertical",_variant:"primary"}}render(){let t=this.state._hasCompactButton;return"horizontal"===this.state._orientation&&!0===this.state._hasCompactButton&&(t=!1,devHint("[KolNav] Wenn eine horizontale Navigation verwendet wird, kann die Option _hasCompactButton nicht aktiviert werden.")),h(Host,null,h("div",{class:{[this.state._orientation]:!0,"inline-block":!0===this.state._compact,[this.state._variant]:!0}},h("nav",{"aria-label":this.state._ariaLabel,id:"nav",part:"nav"},h(this.linkList,{links:this.state._links,deep:0})),t&&h("div",{class:"mt-2 w-full text-center"},h("kol-button",{exportparts:"button,ghost",_ariaControls:"nav",_ariaExpanded:!0===this.state._compact,_ariaLabel:translate(this.state._compact?"kol-nav-maximize":"kol-nav-minimize"),_icon:this.state._compact?"fa-solid fa-angles-right":"fa-solid fa-angles-left",_iconOnly:!0,_label:translate(this.state._compact?"kol-nav-maximize":"kol-nav-minimize"),_on:{onClick:()=>{this.state=Object.assign(Object.assign({},this.state),{_compact:!1===this.state._compact})}},_tooltipAlign:"right",_variant:"ghost"}))))}validateAriaCurrentValue(t){watchValidator(this,"_ariaCurrentValue",(t=>!0===t||"date"===t||"location"===t||"page"===t||"step"===t||"time"===t),new Set(["boolean","String {data, location, page, step, time}"]),t)}validateAriaLabel(t){watchString(this,"_ariaLabel",t,{hooks:{afterPatch:()=>{UNIQUE_ARIA_LABEL.includes(this.state._ariaLabel)&&devHint(`[KolNav] Das Aria-Label "${this.state._ariaLabel}" wurde für die Rolle Navigation mehrfach verwendet!`),UNIQUE_ARIA_LABEL.push(this.state._ariaLabel)},beforePatch:()=>{removeAriaLabel(this.state._ariaLabel)}},required:!0}),a11yHintLabelingLandmarks(t)}validateCollapsible(t){watchBoolean(this,"_collapsible",t)}validateCompact(t){watchBoolean(this,"_compact",t)}validateHasCompactButton(t){watchBoolean(this,"_hasCompactButton",t)}validateLinks(t){watchNavLinks("KolNav",this,t),devHint("[KolNav] Die Navigationsstruktur wird noch nicht rekursiv validiert.")}validateOrientation(t){watchValidator(this,"_orientation",(t=>"horizontal"===t||"vertical"===t),new Set(["Orientation {horizontal, vertical}"]),t,{defaultValue:"vertical"})}validateVariant(t){watchValidator(this,"_variant",(t=>"primary"===t||"secondary"===t),new Set(["KoliBriNavVariant {primary, secondary}"]),t,{defaultValue:"primary"})}componentWillLoad(){this.validateAriaCurrentValue(this._ariaCurrentValue),this.validateAriaLabel(this._ariaLabel),this.validateCollapsible(this._collapsible),this.validateCompact(this._compact),this.validateHasCompactButton(this._hasCompactButton),this.validateLinks(this._links),this.validateOrientation(this._orientation),this.validateVariant(this._variant)}disconnectedCallback(){removeAriaLabel(this.state._ariaLabel)}static get watchers(){return{_ariaCurrentValue:["validateAriaCurrentValue"],_ariaLabel:["validateAriaLabel"],_collapsible:["validateCollapsible"],_compact:["validateCompact"],_hasCompactButton:["validateHasCompactButton"],_links:["validateLinks"],_orientation:["validateOrientation"],_variant:["validateVariant"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-nav",{_ariaCurrentValue:[8,"_aria-current-value"],_ariaLabel:[1,"_aria-label"],_collapsible:[516],_compact:[516],_hasCompactButton:[516,"_has-compact-button"],_orientation:[1],_links:[1],_variant:[1],state:[32]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-nav","kol-badge","kol-button","kol-button-wc","kol-icon","kol-link-wc","kol-span-wc","kol-tooltip"].forEach((t=>{switch(t){case"kol-nav":customElements.get(t)||customElements.define(t,KolNav$1);break;case"kol-badge":customElements.get(t)||defineCustomElement$8();break;case"kol-button":customElements.get(t)||defineCustomElement$7();break;case"kol-button-wc":customElements.get(t)||defineCustomElement$6();break;case"kol-icon":customElements.get(t)||defineCustomElement$5();break;case"kol-link-wc":customElements.get(t)||defineCustomElement$4();break;case"kol-span-wc":customElements.get(t)||defineCustomElement$3();break;case"kol-tooltip":customElements.get(t)||defineCustomElement$2()}}))}const KolNav=KolNav$1,defineCustomElement=defineCustomElement$1;export{KolNav,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{d as devHint,b as watchValidator,w as watchString,E as a11yHintLabelingLandmarks,t as watchBoolean}from"./prop.validators.js";import{w as watchNavLinks}from"./validation.js";import{a as translate}from"./i18n.js";import{d as defineCustomElement$2,a as defineCustomElement$6,b as defineCustomElement$8}from"./component.js";import{d as defineCustomElement$7}from"./shadow2.js";import{d as defineCustomElement$5}from"./component2.js";import{d as defineCustomElement$4}from"./component6.js";import{d as defineCustomElement$3}from"./component3.js";const defaultStyleCss=":host{--kolibri-border-color:#666;--kolibri-border-radius:0.125rem;--kolibri-border-width:1px;--kolibri-color-black:#000;--kolibri-color-white:#fff;--kolibri-color-error:#f44336;--kolibri-color-info:#2196f3;--kolibri-color-success:#4caf50;--kolibri-color-warning:#ff9800;--kolibri-color-primary:#3f51b5;--kolibri-color-secondary:#ff4081;--kolibri-color-normal:#9e9e9e;--kolibri-color-danger:#f44336;--kolibri-color-ghost:#f5f5f5;--kolibri-color-disabled:#bdbdbd;--kolibri-color-text:#222222;--kolibri-color-visited:#9c27b0;--kolibri-font-family:Verdana, Arial, Tahoma, Helvetica, sans-serif;--kolibri-font-size:16px;--kolibri-spacing:0.25rem}:host *{hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}:host{display:inline-flex}a,button{background-color:transparent;border:none;font-size:inherit;margin:0;padding:0;transition-duration:0.5s;transition-property:background-color, color, border-color;width:100%}kol-icon.external-link-icon{display:inline-flex}:host{font-family:var(--kolibri-font-family);font-size:var(--kolibri-font-size)}*{box-sizing:border-box}kol-span-wc{display:grid;gap:var(--kolibri-spacing);place-items:center}kol-span-wc>span{display:flex;gap:var(--kolibri-spacing);place-items:center}kol-span-wc kol-icon{display:contents;padding:0 var(--kolibri-spacing)}a,button,input,select,textarea{appearance:none;cursor:pointer;font-family:var(--kolibri-font-family)}.icon-only>kol-span-wc>span>span{display:none}:host>div{display:inline-block}",UNIQUE_ARIA_LABEL=[],removeAriaLabel=t=>{const a=UNIQUE_ARIA_LABEL.indexOf(t);a>=0&&UNIQUE_ARIA_LABEL.splice(a,1)},KolNav$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.onClick=t=>{t._active=!1===t._active,this.state=Object.assign({},this.state)},this.hasActiveChild=t=>!!(Array.isArray(t._children)&&t._children.length>0)&&t._children.some(this.hasActiveChild),this.linkList=t=>h("ul",{class:{flex:0===t.deep&&"horizontal"===this.state._orientation},part:`nav ${this.state._orientation}`},t.links.map(((a,i)=>h("li",{key:i,part:`li ${0===t.deep?this.state._orientation:"vertical"}${a._active?" selected":""}${i<t.links.length-1?"":" last"}`},Array.isArray(a._children)&&a._children.length>0?h("div",{class:"h-full"},h("div",{class:{"h-full":!0}},h("kol-link-wc",{class:"block w-full h-full",exportparts:"icon,link,span"+(!0===a._active?",selected":""),_ariaLabel:!0===this.state._compact||!0===a._iconOnly?a._label:void 0,_ariaExpanded:!0===a._active,_disabled:a._disabled,_href:"javascript:void(0)",_icon:!0===this.state._collapsible?!0===a._active?"codicon codicon-remove":"codicon codicon-add":"string"==typeof a._icon?a._icon:"codicon codicon-symbol-event",_iconOnly:!0===this.state._compact||!0===a._iconOnly,_label:a._label,onClick:()=>this.onClick(a)})),!0===a._active&&h("div",{class:{expanded:!0,active:!0===a._active,"active-child":this.hasActiveChild(a),"absolute ":0===t.deep&&"horizontal"===this.state._orientation}},h(this.linkList,{links:a._children,deep:t.deep+1}))):h("div",{class:{"h-full":!0,"text-center":!0===this.state._compact||!0===a._iconOnly}},h("kol-link-wc",{class:{"block w-full h-full":!0,active:!0===a._active},exportparts:"icon,link,span"+(!0===a._active?",selected":""),_ariaCurrent:!0===a._active&&this.state._ariaCurrentValue,_ariaLabel:!0===this.state._compact||!0===a._iconOnly?a._label:void 0,_href:a._href,_icon:"string"==typeof a._icon?a._icon:"codicon codicon-symbol-event","_icon-only":!0===this.state._compact||!0===a._iconOnly,_label:a._label,_on:a._on,_selector:a._selector,_tooltipAlign:a._tooltipAlign,_target:a._target})))))),this._ariaCurrentValue=!1,this._ariaLabel=void 0,this._collapsible=!1,this._compact=!1,this._hasCompactButton=!1,this._orientation="vertical",this._links=void 0,this._variant="primary",this.state={_ariaCurrentValue:!1,_ariaLabel:"…",_collapsible:!0,_hasCompactButton:!1,_links:[],_orientation:"vertical",_variant:"primary"}}render(){let t=this.state._hasCompactButton;return"horizontal"===this.state._orientation&&!0===this.state._hasCompactButton&&(t=!1,devHint("[KolNav] Wenn eine horizontale Navigation verwendet wird, kann die Option _hasCompactButton nicht aktiviert werden.")),h(Host,null,h("div",{class:{[this.state._orientation]:!0,"inline-block":!0===this.state._compact,[this.state._variant]:!0}},h("nav",{"aria-label":this.state._ariaLabel,id:"nav",part:"nav"},h(this.linkList,{links:this.state._links,deep:0})),t&&h("div",{class:"mt-2 w-full text-center"},h("kol-button",{exportparts:"button,ghost",_ariaControls:"nav",_ariaExpanded:!0===this.state._compact,_ariaLabel:translate(this.state._compact?"kol-nav-maximize":"kol-nav-minimize"),_icon:this.state._compact?"codicon codicon-chevron-right":"codicon codicon-chevron-left",_iconOnly:!0,_label:translate(this.state._compact?"kol-nav-maximize":"kol-nav-minimize"),_on:{onClick:()=>{this.state=Object.assign(Object.assign({},this.state),{_compact:!1===this.state._compact})}},_tooltipAlign:"right",_variant:"ghost"}))))}validateAriaCurrentValue(t){watchValidator(this,"_ariaCurrentValue",(t=>!0===t||"date"===t||"location"===t||"page"===t||"step"===t||"time"===t),new Set(["boolean","String {data, location, page, step, time}"]),t)}validateAriaLabel(t){watchString(this,"_ariaLabel",t,{hooks:{afterPatch:()=>{UNIQUE_ARIA_LABEL.includes(this.state._ariaLabel)&&devHint(`[KolNav] Das Aria-Label "${this.state._ariaLabel}" wurde für die Rolle Navigation mehrfach verwendet!`),UNIQUE_ARIA_LABEL.push(this.state._ariaLabel)},beforePatch:()=>{removeAriaLabel(this.state._ariaLabel)}},required:!0}),a11yHintLabelingLandmarks(t)}validateCollapsible(t){watchBoolean(this,"_collapsible",t)}validateCompact(t){watchBoolean(this,"_compact",t)}validateHasCompactButton(t){watchBoolean(this,"_hasCompactButton",t)}validateLinks(t){watchNavLinks("KolNav",this,t),devHint("[KolNav] Die Navigationsstruktur wird noch nicht rekursiv validiert.")}validateOrientation(t){watchValidator(this,"_orientation",(t=>"horizontal"===t||"vertical"===t),new Set(["Orientation {horizontal, vertical}"]),t,{defaultValue:"vertical"})}validateVariant(t){watchValidator(this,"_variant",(t=>"primary"===t||"secondary"===t),new Set(["KoliBriNavVariant {primary, secondary}"]),t,{defaultValue:"primary"})}componentWillLoad(){this.validateAriaCurrentValue(this._ariaCurrentValue),this.validateAriaLabel(this._ariaLabel),this.validateCollapsible(this._collapsible),this.validateCompact(this._compact),this.validateHasCompactButton(this._hasCompactButton),this.validateLinks(this._links),this.validateOrientation(this._orientation),this.validateVariant(this._variant)}disconnectedCallback(){removeAriaLabel(this.state._ariaLabel)}static get watchers(){return{_ariaCurrentValue:["validateAriaCurrentValue"],_ariaLabel:["validateAriaLabel"],_collapsible:["validateCollapsible"],_compact:["validateCompact"],_hasCompactButton:["validateHasCompactButton"],_links:["validateLinks"],_orientation:["validateOrientation"],_variant:["validateVariant"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-nav",{_ariaCurrentValue:[8,"_aria-current-value"],_ariaLabel:[1,"_aria-label"],_collapsible:[516],_compact:[516],_hasCompactButton:[516,"_has-compact-button"],_orientation:[1],_links:[1],_variant:[1],state:[32]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-nav","kol-badge","kol-button","kol-button-wc","kol-icon","kol-link-wc","kol-span-wc","kol-tooltip"].forEach((t=>{switch(t){case"kol-nav":customElements.get(t)||customElements.define(t,KolNav$1);break;case"kol-badge":customElements.get(t)||defineCustomElement$8();break;case"kol-button":customElements.get(t)||defineCustomElement$7();break;case"kol-button-wc":customElements.get(t)||defineCustomElement$6();break;case"kol-icon":customElements.get(t)||defineCustomElement$5();break;case"kol-link-wc":customElements.get(t)||defineCustomElement$4();break;case"kol-span-wc":customElements.get(t)||defineCustomElement$3();break;case"kol-tooltip":customElements.get(t)||defineCustomElement$2()}}))}const KolNav=KolNav$1,defineCustomElement=defineCustomElement$1;export{KolNav,defineCustomElement};
@@ -1 +1 @@
1
- {"file":"kol-nav.js","mappings":";;;;;;;;;;;;;AAAA,MAAM,eAAe,GAAG,oiDAAoiD;;ACiB5jD,MAAM,iBAAiB,GAAa,EAAE,CAAC;AACvC,MAAM,eAAe,GAAG,CAAC,SAAiB;EACzC,MAAM,KAAK,GAAG,iBAAiB,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;EACnD,IAAI,KAAK,IAAI,CAAC,EAAE;IACf,iBAAiB,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;GACnC;AACF,CAAC,CAAC;MA4DWA,QAAM;;;;;IACD,YAAO,GAAG,CAAC,IAA8B;MACzD,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,KAAK,KAAK,CAAC;MACtC,IAAI,CAAC,KAAK,qBACN,IAAI,CAAC,KAAK,CACb,CAAC;KACF,CAAC;IAEe,mBAAc,GAAG,CAAC,IAA8B;MAChE,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,I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KAAK,KAAc,KAAK,KAAK,YAAY,IAAI,KAAK,KAAK,UAAU,EAClE,IAAI,GAAG,CAAC,CAAC,oCAAoC,CAAC,CAAC,EAC/C,KAAK,EACL;MACC,YAAY,EAAE,UAAU;KACxB,CACD,CAAC;GACF;EAMM,eAAe,CAAC,KAAyB;IAC/C,cAAc,CAAC,IAAI,EAAE,UAAU,EAAE,CAAC,KAAK,KAAK,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,WAAW,EAAE,IAAI,GAAG,CAAC,CAAC,wCAAwC,CAAC,CAAC,EAAE,KAAK,EAAE;MACrJ,YAAY,EAAE,SAAS;KACvB,CAAC,CAAC;GACH;EAKM,iBAAiB;IACvB,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;IACtD,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACxC,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAC5C,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACpC,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;IACtD,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAChC,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAC5C,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;GACpC;EAEM,oBAAoB;IAC1B,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;GACvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolNav"],"sources":["./src/components/nav/style.css?tag=kol-nav&mode=default&encapsulation=shadow","./src/components/nav/component.tsx"],"sourcesContent":["@import '../style.css';\n\n:host > div {\n\tdisplay: inline-block;\n}\n","import { Component, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\nimport { Generic } from '@a11y-ui/core';\nimport { Orientation } from '../../types/orientation';\nimport { a11yHintLabelingLandmarks, devHint } from '../../utils/a11y.tipps';\nimport { watchBoolean, watchString, watchValidator } from '../../utils/prop.validators';\nimport { NavLinkProps } from '../link/component';\nimport { watchNavLinks } from './validation';\nimport { Stringified } from '../../types/common';\nimport { AriaCurrent } from '../../types/button-link';\nimport { translate } from '../../i18n';\n\nexport type NavLinkWithChildrenProps = NavLinkProps & {\n\t_children?: NavLinkWithChildrenProps[];\n};\n\nexport type KoliBriNavVariant = 'primary' | 'secondary';\n\nconst UNIQUE_ARIA_LABEL: string[] = [];\nconst removeAriaLabel = (ariaLabel: string) => {\n\tconst index = UNIQUE_ARIA_LABEL.indexOf(ariaLabel);\n\tif (index >= 0) {\n\t\tUNIQUE_ARIA_LABEL.splice(index, 1);\n\t}\n};\n\nconst linkValidator = (link: NavLinkWithChildrenProps): boolean => {\n\tif (typeof link === 'object' && typeof link._label === 'string' /* && typeof newLink._href === 'string' */) {\n\t\tif (Array.isArray(link._children)) {\n\t\t\treturn linksValidator(link._children);\n\t\t}\n\t\treturn false;\n\t}\n\treturn true;\n};\n\nconst linksValidator = (links: NavLinkWithChildrenProps[]): boolean => {\n\tif (Array.isArray(links)) {\n\t\treturn links.find(linkValidator) !== undefined;\n\t}\n\treturn true;\n};\n\n/**\n * API\n */\ntype RequiredProps = {\n\tariaLabel: string;\n\tlinks: Stringified<NavLinkWithChildrenProps[]>;\n};\ntype OptionalProps = {\n\tariaCurrentValue: AriaCurrent;\n\tcollapsible: boolean;\n\tcompact: boolean;\n\thasCompactButton: boolean;\n\torientation: Orientation;\n\tvariant: KoliBriNavVariant;\n};\n// type Props = Generic.Element.Members<RequiredProps, OptionalProps>;\n\ntype RequiredStates = {\n\tariaCurrentValue: AriaCurrent;\n\tariaLabel: string;\n\tcollapsible: boolean;\n\thasCompactButton: boolean;\n\tlinks: NavLinkWithChildrenProps[];\n\torientation: Orientation;\n\tvariant: KoliBriNavVariant;\n};\ntype OptionalStates = {\n\tcompact: boolean;\n};\ntype States = Generic.Element.Members<RequiredStates, OptionalStates>;\n\n/**\n * @part nav - TBD\n */\n@Component({\n\ttag: 'kol-nav',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolNav implements Generic.Element.ComponentApi<RequiredProps, OptionalProps, RequiredStates, OptionalStates> {\n\tprivate readonly onClick = (link: NavLinkWithChildrenProps): void => {\n\t\tlink._active = link._active === false;\n\t\tthis.state = {\n\t\t\t...this.state,\n\t\t};\n\t};\n\n\tprivate readonly hasActiveChild = (link: NavLinkWithChildrenProps): boolean => {\n\t\tif (Array.isArray(link._children) && link._children.length > 0) {\n\t\t\treturn link._children.some(this.hasActiveChild);\n\t\t}\n\n\t\treturn false;\n\t};\n\n\tprivate linkList = (props: { links: NavLinkWithChildrenProps[]; deep: number }): JSX.Element => {\n\t\treturn (\n\t\t\t<ul\n\t\t\t\tclass={{\n\t\t\t\t\tflex: props.deep === 0 && this.state._orientation === 'horizontal',\n\t\t\t\t}}\n\t\t\t\tpart={`nav ${this.state._orientation}`}\n\t\t\t>\n\t\t\t\t{props.links.map((link, index: number) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<li\n\t\t\t\t\t\t\tkey={index}\n\t\t\t\t\t\t\tpart={`li ${props.deep === 0 ? this.state._orientation : 'vertical'}${link._active ? ' selected' : ''}${\n\t\t\t\t\t\t\t\tindex < props.links.length - 1 ? '' : ' last'\n\t\t\t\t\t\t\t}`}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{Array.isArray(link._children) && link._children.length > 0 ? (\n\t\t\t\t\t\t\t\t<div class=\"h-full\">\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tclass={{\n\t\t\t\t\t\t\t\t\t\t\t'h-full': true,\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<kol-link-wc\n\t\t\t\t\t\t\t\t\t\t\tclass=\"block w-full h-full\"\n\t\t\t\t\t\t\t\t\t\t\texportparts={`icon,link,span${link._active === true ? ',selected' : ''}`}\n\t\t\t\t\t\t\t\t\t\t\t// _ariaCurrent will not be set here, since it will be set on a child of this item.\n\t\t\t\t\t\t\t\t\t\t\t_ariaLabel={this.state._compact === true || link._iconOnly === true ? link._label : undefined}\n\t\t\t\t\t\t\t\t\t\t\t_ariaExpanded={link._active === true}\n\t\t\t\t\t\t\t\t\t\t\t_disabled={link._disabled}\n\t\t\t\t\t\t\t\t\t\t\t_href=\"javascript:void(0)\"\n\t\t\t\t\t\t\t\t\t\t\t_icon={\n\t\t\t\t\t\t\t\t\t\t\t\tthis.state._collapsible === true\n\t\t\t\t\t\t\t\t\t\t\t\t\t? link._active === true\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'fa-solid fa-minus'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: 'fa-solid fa-plus'\n\t\t\t\t\t\t\t\t\t\t\t\t\t: typeof link._icon === 'string'\n\t\t\t\t\t\t\t\t\t\t\t\t\t? link._icon\n\t\t\t\t\t\t\t\t\t\t\t\t\t: 'fa-solid fa-link-slash'\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t_iconOnly={this.state._compact === true || link._iconOnly === true}\n\t\t\t\t\t\t\t\t\t\t\t_label={link._label}\n\t\t\t\t\t\t\t\t\t\t\tonClick={() => this.onClick(link)}\n\t\t\t\t\t\t\t\t\t\t></kol-link-wc>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t{link._active === true && (\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tclass={{\n\t\t\t\t\t\t\t\t\t\t\t\texpanded: true,\n\t\t\t\t\t\t\t\t\t\t\t\tactive: link._active === true,\n\t\t\t\t\t\t\t\t\t\t\t\t'active-child': this.hasActiveChild(link),\n\t\t\t\t\t\t\t\t\t\t\t\t'absolute ': props.deep === 0 && this.state._orientation === 'horizontal',\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<this.linkList links={link._children} deep={props.deep + 1} />\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tclass={{\n\t\t\t\t\t\t\t\t\t\t'h-full': true,\n\t\t\t\t\t\t\t\t\t\t'text-center': this.state._compact === true || link._iconOnly === true,\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<kol-link-wc\n\t\t\t\t\t\t\t\t\t\tclass={{\n\t\t\t\t\t\t\t\t\t\t\t'block w-full h-full': true,\n\t\t\t\t\t\t\t\t\t\t\tactive: link._active === true,\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\texportparts={`icon,link,span${link._active === true ? ',selected' : ''}`}\n\t\t\t\t\t\t\t\t\t\t_ariaCurrent={link._active === true ? this.state._ariaCurrentValue : false}\n\t\t\t\t\t\t\t\t\t\t_ariaLabel={this.state._compact === true || link._iconOnly === true ? link._label : undefined}\n\t\t\t\t\t\t\t\t\t\t_href={link._href}\n\t\t\t\t\t\t\t\t\t\t_icon={typeof link._icon === 'string' ? link._icon : 'fa-solid fa-link-slash'}\n\t\t\t\t\t\t\t\t\t\t_icon-only={this.state._compact === true || link._iconOnly === true}\n\t\t\t\t\t\t\t\t\t\t_label={link._label}\n\t\t\t\t\t\t\t\t\t\t_on={link._on}\n\t\t\t\t\t\t\t\t\t\t_selector={link._selector}\n\t\t\t\t\t\t\t\t\t\t_tooltipAlign={link._tooltipAlign}\n\t\t\t\t\t\t\t\t\t\t_target={link._target}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</li>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</ul>\n\t\t);\n\t};\n\n\tpublic render(): JSX.Element {\n\t\tlet hasCompactButton = this.state._hasCompactButton;\n\t\tif (this.state._orientation === 'horizontal' && this.state._hasCompactButton === true) {\n\t\t\thasCompactButton = false;\n\t\t\tdevHint(`[KolNav] Wenn eine horizontale Navigation verwendet wird, kann die Option _hasCompactButton nicht aktiviert werden.`);\n\t\t}\n\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<div\n\t\t\t\t\tclass={{\n\t\t\t\t\t\t[this.state._orientation]: true,\n\t\t\t\t\t\t'inline-block': this.state._compact === true,\n\t\t\t\t\t\t[this.state._variant]: true,\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<nav aria-label={this.state._ariaLabel} id=\"nav\" part=\"nav\">\n\t\t\t\t\t\t<this.linkList links={this.state._links} deep={0}></this.linkList>\n\t\t\t\t\t</nav>\n\t\t\t\t\t{hasCompactButton && (\n\t\t\t\t\t\t<div class=\"mt-2 w-full text-center\">\n\t\t\t\t\t\t\t<kol-button\n\t\t\t\t\t\t\t\texportparts=\"button,ghost\"\n\t\t\t\t\t\t\t\t_ariaControls=\"nav\"\n\t\t\t\t\t\t\t\t_ariaExpanded={this.state._compact === true}\n\t\t\t\t\t\t\t\t_ariaLabel={translate(this.state._compact ? 'kol-nav-maximize' : 'kol-nav-minimize')}\n\t\t\t\t\t\t\t\t_icon={this.state._compact ? 'fa-solid fa-angles-right' : 'fa-solid fa-angles-left'}\n\t\t\t\t\t\t\t\t_iconOnly\n\t\t\t\t\t\t\t\t_label={translate(this.state._compact ? 'kol-nav-maximize' : 'kol-nav-minimize')}\n\t\t\t\t\t\t\t\t_on={{\n\t\t\t\t\t\t\t\t\tonClick: (): void => {\n\t\t\t\t\t\t\t\t\t\tthis.state = {\n\t\t\t\t\t\t\t\t\t\t\t...this.state,\n\t\t\t\t\t\t\t\t\t\t\t_compact: this.state._compact === false,\n\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t_tooltipAlign=\"right\"\n\t\t\t\t\t\t\t\t_variant=\"ghost\"\n\t\t\t\t\t\t\t></kol-button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Gibt den Wert von aria-current an, der bei dem aktuellen Kontext innerhalb der Navigation verwendet werden soll.\n\t */\n\t@Prop() public _ariaCurrentValue: AriaCurrent = false;\n\n\t/**\n\t * Gibt den Text an, der die Navigation von anderen Navigationen differenziert.\n\t */\n\t@Prop() public _ariaLabel!: string;\n\n\t/**\n\t * Gibt an, ob Knoten in der Navigation zusammengeklappt werden können. Ist standardmäßig aktiv.\n\t */\n\t@Prop({ reflect: true }) public _collapsible?: boolean = false;\n\n\t/**\n\t * Gibt an, ob die Navigation kompakt angezeigt wird.\n\t */\n\t@Prop({ reflect: true }) public _compact?: boolean = false;\n\n\t/**\n\t * Gibt an, ob die Navigation eine zusätzliche Schaltfläche zum Aus- und Einklappen der Navigation anzeigen soll.\n\t */\n\t@Prop({ reflect: true }) public _hasCompactButton?: boolean = false;\n\n\t/**\n\t * Gibt die Ausrichtung der Navigation an.\n\t */\n\t@Prop() public _orientation?: Orientation = 'vertical';\n\n\t/**\n\t * Gibt die geordnete Liste der Seitenhierarchie an.\n\t */\n\t@Prop() public _links!: Stringified<NavLinkWithChildrenProps[]>;\n\n\t/**\n\t * Gibt an, welche Ausprägung der Button hat.\n\t */\n\t@Prop() public _variant?: KoliBriNavVariant = 'primary';\n\n\t/**\n\t * @see: components/abbr/component.tsx (@State)\n\t */\n\t@State() public state: States = {\n\t\t_ariaCurrentValue: false,\n\t\t_ariaLabel: '…', // '⚠'\n\t\t_collapsible: true,\n\t\t_hasCompactButton: false,\n\t\t_links: [],\n\t\t_orientation: 'vertical',\n\t\t_variant: 'primary',\n\t};\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_ariaCurrentValue')\n\tpublic validateAriaCurrentValue(value?: AriaCurrent): void {\n\t\twatchValidator(\n\t\t\tthis,\n\t\t\t'_ariaCurrentValue',\n\t\t\t(value) => value === true || value === 'date' || value === 'location' || value === 'page' || value === 'step' || value === 'time',\n\t\t\tnew Set(['boolean', 'String {data, location, page, step, time}']),\n\t\t\tvalue\n\t\t);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_ariaLabel')\n\tpublic validateAriaLabel(value?: string): void {\n\t\twatchString(this, '_ariaLabel', value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: () => {\n\t\t\t\t\tif (UNIQUE_ARIA_LABEL.includes(this.state._ariaLabel)) {\n\t\t\t\t\t\tdevHint(`[KolNav] Das Aria-Label \"${this.state._ariaLabel}\" wurde für die Rolle Navigation mehrfach verwendet!`);\n\t\t\t\t\t}\n\t\t\t\t\tUNIQUE_ARIA_LABEL.push(this.state._ariaLabel);\n\t\t\t\t},\n\t\t\t\tbeforePatch: () => {\n\t\t\t\t\tremoveAriaLabel(this.state._ariaLabel);\n\t\t\t\t},\n\t\t\t},\n\t\t\trequired: true,\n\t\t});\n\t\ta11yHintLabelingLandmarks(value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_collapsible')\n\tpublic validateCollapsible(value?: boolean): void {\n\t\twatchBoolean(this, '_collapsible', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_compact')\n\tpublic validateCompact(value?: boolean): void {\n\t\twatchBoolean(this, '_compact', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_hasCompactButton')\n\tpublic validateHasCompactButton(value?: boolean): void {\n\t\twatchBoolean(this, '_hasCompactButton', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_links')\n\tpublic validateLinks(value?: Stringified<NavLinkWithChildrenProps[]>): void {\n\t\twatchNavLinks('KolNav', this, value);\n\t\tdevHint(`[KolNav] Die Navigationsstruktur wird noch nicht rekursiv validiert.`);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_orientation')\n\tpublic validateOrientation(value?: Orientation): void {\n\t\twatchValidator(\n\t\t\tthis,\n\t\t\t'_orientation',\n\t\t\t(value): boolean => value === 'horizontal' || value === 'vertical',\n\t\t\tnew Set(['Orientation {horizontal, vertical}']),\n\t\t\tvalue,\n\t\t\t{\n\t\t\t\tdefaultValue: 'vertical',\n\t\t\t}\n\t\t);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_variant')\n\tpublic validateVariant(value?: KoliBriNavVariant): void {\n\t\twatchValidator(this, '_variant', (value) => value === 'primary' || value === 'secondary', new Set(['KoliBriNavVariant {primary, secondary}']), value, {\n\t\t\tdefaultValue: 'primary',\n\t\t});\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (componentWillLoad)\n\t */\n\tpublic componentWillLoad(): void {\n\t\tthis.validateAriaCurrentValue(this._ariaCurrentValue);\n\t\tthis.validateAriaLabel(this._ariaLabel);\n\t\tthis.validateCollapsible(this._collapsible);\n\t\tthis.validateCompact(this._compact);\n\t\tthis.validateHasCompactButton(this._hasCompactButton);\n\t\tthis.validateLinks(this._links);\n\t\tthis.validateOrientation(this._orientation);\n\t\tthis.validateVariant(this._variant);\n\t}\n\n\tpublic disconnectedCallback(): void {\n\t\tremoveAriaLabel(this.state._ariaLabel);\n\t}\n}\n\n// console.log(\n// stringifyJson([\n// { _label: '1 Navigationspunkt', _href: '#abc', _icon: 'fa-solid fa-folder-closed', _target: 'asdasd' },\n// { _label: '2 Navigationspunkt', _href: '#abc', _icon: 'fa-solid fa-folder-closed' },\n// {\n// _active: true,\n// _label: '3 Navigationspunkt',\n// _href: '#abc',\n// _icon: 'fa-solid fa-folder-closed',\n// _children: [\n// { _label: '3.1 Navigationspunkt', _href: '#abc', _icon: 'fa-solid fa-folder-closed' },\n// { _label: '3.2 Navigationspunkt', _href: '#abc', _icon: 'fa-solid fa-folder-closed', _target: 'asdasd' },\n// {\n// _active: true,\n// _label: '3.3 Navigationspunkt',\n// _href: '#abc',\n// _children: [\n// { _active: true, _label: '3.3.1 Navigationspunkt (aktiv)', _href: '#abc' },\n// { _label: '3.3.2 Navigationspunkt', _href: '#abc' },\n// ],\n// },\n// {\n// _label: '3.4 Navigationspunkt',\n// _href: '#abc',\n// _children: [\n// { _label: '3.4.1 Navigationspunkt', _href: '#abc' },\n// { _label: '3.4.2 Navigationspunkt', _href: '#abc' },\n// ],\n// },\n// { _label: '3.5 Navigationspunkt', _href: '#abc' },\n// ],\n// },\n// { _label: '4 Navigationspunkt', _href: '#abc' },\n// ])\n// );\n"],"version":3}
1
+ {"file":"kol-nav.js","mappings":";;;;;;;;;;;;;AAAA,MAAM,eAAe,GAAG,88CAA88C;;ACiBt+C,MAAM,iBAAiB,GAAa,EAAE,CAAC;AACvC,MAAM,eAAe,GAAG,CAAC,SAAiB;EACzC,MAAM,KAAK,GAAG,iBAAiB,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;EACnD,IAAI,KAAK,IAAI,CAAC,EAAE;IACf,iBAAiB,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;GACnC;AACF,CAAC,CAAC;MA4DWA,QAAM;;;;;IACD,YAAO,GAAG,CAAC,IAA8B;MACzD,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,KAAK,KAAK,CAAC;MACtC,IAAI,CAAC,KAAK,qBACN,IAAI,CAAC,KAAK,CACb,CAAC;KACF,CAAC;IAEe,mBA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kol-nav&mode=default&encapsulation=shadow","./src/components/nav/component.tsx"],"sourcesContent":["@import '../style.css';\n\n:host > div {\n\tdisplay: inline-block;\n}\n","import { Component, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\nimport { Generic } from '@a11y-ui/core';\nimport { Orientation } from '../../types/orientation';\nimport { a11yHintLabelingLandmarks, devHint } from '../../utils/a11y.tipps';\nimport { watchBoolean, watchString, watchValidator } from '../../utils/prop.validators';\nimport { NavLinkProps } from '../link/component';\nimport { watchNavLinks } from './validation';\nimport { Stringified } from '../../types/common';\nimport { AriaCurrent } from '../../types/button-link';\nimport { translate } from '../../i18n';\n\nexport type NavLinkWithChildrenProps = NavLinkProps & {\n\t_children?: NavLinkWithChildrenProps[];\n};\n\nexport type KoliBriNavVariant = 'primary' | 'secondary';\n\nconst UNIQUE_ARIA_LABEL: string[] = [];\nconst removeAriaLabel = (ariaLabel: string) => {\n\tconst index = UNIQUE_ARIA_LABEL.indexOf(ariaLabel);\n\tif (index >= 0) {\n\t\tUNIQUE_ARIA_LABEL.splice(index, 1);\n\t}\n};\n\nconst linkValidator = (link: NavLinkWithChildrenProps): boolean => {\n\tif (typeof link === 'object' && typeof link._label === 'string' /* && typeof newLink._href === 'string' */) {\n\t\tif (Array.isArray(link._children)) {\n\t\t\treturn linksValidator(link._children);\n\t\t}\n\t\treturn false;\n\t}\n\treturn true;\n};\n\nconst linksValidator = (links: NavLinkWithChildrenProps[]): boolean => {\n\tif (Array.isArray(links)) {\n\t\treturn links.find(linkValidator) !== undefined;\n\t}\n\treturn true;\n};\n\n/**\n * API\n */\ntype RequiredProps = {\n\tariaLabel: string;\n\tlinks: Stringified<NavLinkWithChildrenProps[]>;\n};\ntype OptionalProps = {\n\tariaCurrentValue: AriaCurrent;\n\tcollapsible: boolean;\n\tcompact: boolean;\n\thasCompactButton: boolean;\n\torientation: Orientation;\n\tvariant: KoliBriNavVariant;\n};\n// type Props = Generic.Element.Members<RequiredProps, OptionalProps>;\n\ntype RequiredStates = {\n\tariaCurrentValue: AriaCurrent;\n\tariaLabel: string;\n\tcollapsible: boolean;\n\thasCompactButton: boolean;\n\tlinks: NavLinkWithChildrenProps[];\n\torientation: Orientation;\n\tvariant: KoliBriNavVariant;\n};\ntype OptionalStates = {\n\tcompact: boolean;\n};\ntype States = Generic.Element.Members<RequiredStates, OptionalStates>;\n\n/**\n * @part nav - TBD\n */\n@Component({\n\ttag: 'kol-nav',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolNav implements Generic.Element.ComponentApi<RequiredProps, OptionalProps, RequiredStates, OptionalStates> {\n\tprivate readonly onClick = (link: NavLinkWithChildrenProps): void => {\n\t\tlink._active = link._active === false;\n\t\tthis.state = {\n\t\t\t...this.state,\n\t\t};\n\t};\n\n\tprivate readonly hasActiveChild = (link: NavLinkWithChildrenProps): boolean => {\n\t\tif (Array.isArray(link._children) && link._children.length > 0) {\n\t\t\treturn link._children.some(this.hasActiveChild);\n\t\t}\n\n\t\treturn false;\n\t};\n\n\tprivate linkList = (props: { links: NavLinkWithChildrenProps[]; deep: number }): JSX.Element => {\n\t\treturn (\n\t\t\t<ul\n\t\t\t\tclass={{\n\t\t\t\t\tflex: props.deep === 0 && this.state._orientation === 'horizontal',\n\t\t\t\t}}\n\t\t\t\tpart={`nav ${this.state._orientation}`}\n\t\t\t>\n\t\t\t\t{props.links.map((link, index: number) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<li\n\t\t\t\t\t\t\tkey={index}\n\t\t\t\t\t\t\tpart={`li ${props.deep === 0 ? this.state._orientation : 'vertical'}${link._active ? ' selected' : ''}${\n\t\t\t\t\t\t\t\tindex < props.links.length - 1 ? '' : ' last'\n\t\t\t\t\t\t\t}`}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{Array.isArray(link._children) && link._children.length > 0 ? (\n\t\t\t\t\t\t\t\t<div class=\"h-full\">\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tclass={{\n\t\t\t\t\t\t\t\t\t\t\t'h-full': true,\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<kol-link-wc\n\t\t\t\t\t\t\t\t\t\t\tclass=\"block w-full h-full\"\n\t\t\t\t\t\t\t\t\t\t\texportparts={`icon,link,span${link._active === true ? ',selected' : ''}`}\n\t\t\t\t\t\t\t\t\t\t\t// _ariaCurrent will not be set here, since it will be set on a child of this item.\n\t\t\t\t\t\t\t\t\t\t\t_ariaLabel={this.state._compact === true || link._iconOnly === true ? link._label : undefined}\n\t\t\t\t\t\t\t\t\t\t\t_ariaExpanded={link._active === true}\n\t\t\t\t\t\t\t\t\t\t\t_disabled={link._disabled}\n\t\t\t\t\t\t\t\t\t\t\t_href=\"javascript:void(0)\"\n\t\t\t\t\t\t\t\t\t\t\t_icon={\n\t\t\t\t\t\t\t\t\t\t\t\tthis.state._collapsible === true\n\t\t\t\t\t\t\t\t\t\t\t\t\t? link._active === true\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'codicon codicon-remove'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: 'codicon codicon-add'\n\t\t\t\t\t\t\t\t\t\t\t\t\t: typeof link._icon === 'string'\n\t\t\t\t\t\t\t\t\t\t\t\t\t? link._icon\n\t\t\t\t\t\t\t\t\t\t\t\t\t: 'codicon codicon-symbol-event'\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t_iconOnly={this.state._compact === true || link._iconOnly === true}\n\t\t\t\t\t\t\t\t\t\t\t_label={link._label}\n\t\t\t\t\t\t\t\t\t\t\tonClick={() => this.onClick(link)}\n\t\t\t\t\t\t\t\t\t\t></kol-link-wc>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t{link._active === true && (\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tclass={{\n\t\t\t\t\t\t\t\t\t\t\t\texpanded: true,\n\t\t\t\t\t\t\t\t\t\t\t\tactive: link._active === true,\n\t\t\t\t\t\t\t\t\t\t\t\t'active-child': this.hasActiveChild(link),\n\t\t\t\t\t\t\t\t\t\t\t\t'absolute ': props.deep === 0 && this.state._orientation === 'horizontal',\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<this.linkList links={link._children} deep={props.deep + 1} />\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tclass={{\n\t\t\t\t\t\t\t\t\t\t'h-full': true,\n\t\t\t\t\t\t\t\t\t\t'text-center': this.state._compact === true || link._iconOnly === true,\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<kol-link-wc\n\t\t\t\t\t\t\t\t\t\tclass={{\n\t\t\t\t\t\t\t\t\t\t\t'block w-full h-full': true,\n\t\t\t\t\t\t\t\t\t\t\tactive: link._active === true,\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\texportparts={`icon,link,span${link._active === true ? ',selected' : ''}`}\n\t\t\t\t\t\t\t\t\t\t_ariaCurrent={link._active === true ? this.state._ariaCurrentValue : false}\n\t\t\t\t\t\t\t\t\t\t_ariaLabel={this.state._compact === true || link._iconOnly === true ? link._label : undefined}\n\t\t\t\t\t\t\t\t\t\t_href={link._href}\n\t\t\t\t\t\t\t\t\t\t_icon={typeof link._icon === 'string' ? link._icon : 'codicon codicon-symbol-event'}\n\t\t\t\t\t\t\t\t\t\t_icon-only={this.state._compact === true || link._iconOnly === true}\n\t\t\t\t\t\t\t\t\t\t_label={link._label}\n\t\t\t\t\t\t\t\t\t\t_on={link._on}\n\t\t\t\t\t\t\t\t\t\t_selector={link._selector}\n\t\t\t\t\t\t\t\t\t\t_tooltipAlign={link._tooltipAlign}\n\t\t\t\t\t\t\t\t\t\t_target={link._target}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</li>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</ul>\n\t\t);\n\t};\n\n\tpublic render(): JSX.Element {\n\t\tlet hasCompactButton = this.state._hasCompactButton;\n\t\tif (this.state._orientation === 'horizontal' && this.state._hasCompactButton === true) {\n\t\t\thasCompactButton = false;\n\t\t\tdevHint(`[KolNav] Wenn eine horizontale Navigation verwendet wird, kann die Option _hasCompactButton nicht aktiviert werden.`);\n\t\t}\n\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<div\n\t\t\t\t\tclass={{\n\t\t\t\t\t\t[this.state._orientation]: true,\n\t\t\t\t\t\t'inline-block': this.state._compact === true,\n\t\t\t\t\t\t[this.state._variant]: true,\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<nav aria-label={this.state._ariaLabel} id=\"nav\" part=\"nav\">\n\t\t\t\t\t\t<this.linkList links={this.state._links} deep={0}></this.linkList>\n\t\t\t\t\t</nav>\n\t\t\t\t\t{hasCompactButton && (\n\t\t\t\t\t\t<div class=\"mt-2 w-full text-center\">\n\t\t\t\t\t\t\t<kol-button\n\t\t\t\t\t\t\t\texportparts=\"button,ghost\"\n\t\t\t\t\t\t\t\t_ariaControls=\"nav\"\n\t\t\t\t\t\t\t\t_ariaExpanded={this.state._compact === true}\n\t\t\t\t\t\t\t\t_ariaLabel={translate(this.state._compact ? 'kol-nav-maximize' : 'kol-nav-minimize')}\n\t\t\t\t\t\t\t\t_icon={this.state._compact ? 'codicon codicon-chevron-right' : 'codicon codicon-chevron-left'}\n\t\t\t\t\t\t\t\t_iconOnly\n\t\t\t\t\t\t\t\t_label={translate(this.state._compact ? 'kol-nav-maximize' : 'kol-nav-minimize')}\n\t\t\t\t\t\t\t\t_on={{\n\t\t\t\t\t\t\t\t\tonClick: (): void => {\n\t\t\t\t\t\t\t\t\t\tthis.state = {\n\t\t\t\t\t\t\t\t\t\t\t...this.state,\n\t\t\t\t\t\t\t\t\t\t\t_compact: this.state._compact === false,\n\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t_tooltipAlign=\"right\"\n\t\t\t\t\t\t\t\t_variant=\"ghost\"\n\t\t\t\t\t\t\t></kol-button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Gibt den Wert von aria-current an, der bei dem aktuellen Kontext innerhalb der Navigation verwendet werden soll.\n\t */\n\t@Prop() public _ariaCurrentValue: AriaCurrent = false;\n\n\t/**\n\t * Gibt den Text an, der die Navigation von anderen Navigationen differenziert.\n\t */\n\t@Prop() public _ariaLabel!: string;\n\n\t/**\n\t * Gibt an, ob Knoten in der Navigation zusammengeklappt werden können. Ist standardmäßig aktiv.\n\t */\n\t@Prop({ reflect: true }) public _collapsible?: boolean = false;\n\n\t/**\n\t * Gibt an, ob die Navigation kompakt angezeigt wird.\n\t */\n\t@Prop({ reflect: true }) public _compact?: boolean = false;\n\n\t/**\n\t * Gibt an, ob die Navigation eine zusätzliche Schaltfläche zum Aus- und Einklappen der Navigation anzeigen soll.\n\t */\n\t@Prop({ reflect: true }) public _hasCompactButton?: boolean = false;\n\n\t/**\n\t * Gibt die Ausrichtung der Navigation an.\n\t */\n\t@Prop() public _orientation?: Orientation = 'vertical';\n\n\t/**\n\t * Gibt die geordnete Liste der Seitenhierarchie an.\n\t */\n\t@Prop() public _links!: Stringified<NavLinkWithChildrenProps[]>;\n\n\t/**\n\t * Gibt an, welche Ausprägung der Button hat.\n\t */\n\t@Prop() public _variant?: KoliBriNavVariant = 'primary';\n\n\t/**\n\t * @see: components/abbr/component.tsx (@State)\n\t */\n\t@State() public state: States = {\n\t\t_ariaCurrentValue: false,\n\t\t_ariaLabel: '…', // '⚠'\n\t\t_collapsible: true,\n\t\t_hasCompactButton: false,\n\t\t_links: [],\n\t\t_orientation: 'vertical',\n\t\t_variant: 'primary',\n\t};\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_ariaCurrentValue')\n\tpublic validateAriaCurrentValue(value?: AriaCurrent): void {\n\t\twatchValidator(\n\t\t\tthis,\n\t\t\t'_ariaCurrentValue',\n\t\t\t(value) => value === true || value === 'date' || value === 'location' || value === 'page' || value === 'step' || value === 'time',\n\t\t\tnew Set(['boolean', 'String {data, location, page, step, time}']),\n\t\t\tvalue\n\t\t);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_ariaLabel')\n\tpublic validateAriaLabel(value?: string): void {\n\t\twatchString(this, '_ariaLabel', value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: () => {\n\t\t\t\t\tif (UNIQUE_ARIA_LABEL.includes(this.state._ariaLabel)) {\n\t\t\t\t\t\tdevHint(`[KolNav] Das Aria-Label \"${this.state._ariaLabel}\" wurde für die Rolle Navigation mehrfach verwendet!`);\n\t\t\t\t\t}\n\t\t\t\t\tUNIQUE_ARIA_LABEL.push(this.state._ariaLabel);\n\t\t\t\t},\n\t\t\t\tbeforePatch: () => {\n\t\t\t\t\tremoveAriaLabel(this.state._ariaLabel);\n\t\t\t\t},\n\t\t\t},\n\t\t\trequired: true,\n\t\t});\n\t\ta11yHintLabelingLandmarks(value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_collapsible')\n\tpublic validateCollapsible(value?: boolean): void {\n\t\twatchBoolean(this, '_collapsible', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_compact')\n\tpublic validateCompact(value?: boolean): void {\n\t\twatchBoolean(this, '_compact', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_hasCompactButton')\n\tpublic validateHasCompactButton(value?: boolean): void {\n\t\twatchBoolean(this, '_hasCompactButton', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_links')\n\tpublic validateLinks(value?: Stringified<NavLinkWithChildrenProps[]>): void {\n\t\twatchNavLinks('KolNav', this, value);\n\t\tdevHint(`[KolNav] Die Navigationsstruktur wird noch nicht rekursiv validiert.`);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_orientation')\n\tpublic validateOrientation(value?: Orientation): void {\n\t\twatchValidator(\n\t\t\tthis,\n\t\t\t'_orientation',\n\t\t\t(value): boolean => value === 'horizontal' || value === 'vertical',\n\t\t\tnew Set(['Orientation {horizontal, vertical}']),\n\t\t\tvalue,\n\t\t\t{\n\t\t\t\tdefaultValue: 'vertical',\n\t\t\t}\n\t\t);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_variant')\n\tpublic validateVariant(value?: KoliBriNavVariant): void {\n\t\twatchValidator(this, '_variant', (value) => value === 'primary' || value === 'secondary', new Set(['KoliBriNavVariant {primary, secondary}']), value, {\n\t\t\tdefaultValue: 'primary',\n\t\t});\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (componentWillLoad)\n\t */\n\tpublic componentWillLoad(): void {\n\t\tthis.validateAriaCurrentValue(this._ariaCurrentValue);\n\t\tthis.validateAriaLabel(this._ariaLabel);\n\t\tthis.validateCollapsible(this._collapsible);\n\t\tthis.validateCompact(this._compact);\n\t\tthis.validateHasCompactButton(this._hasCompactButton);\n\t\tthis.validateLinks(this._links);\n\t\tthis.validateOrientation(this._orientation);\n\t\tthis.validateVariant(this._variant);\n\t}\n\n\tpublic disconnectedCallback(): void {\n\t\tremoveAriaLabel(this.state._ariaLabel);\n\t}\n}\n\n// console.log(\n// stringifyJson([\n// { _label: '1 Navigationspunkt', _href: '#abc', _icon: 'codicon codicon-folder-closed', _target: 'asdasd' },\n// { _label: '2 Navigationspunkt', _href: '#abc', _icon: 'codicon codicon-folder-closed' },\n// {\n// _active: true,\n// _label: '3 Navigationspunkt',\n// _href: '#abc',\n// _icon: 'codicon codicon-folder-closed',\n// _children: [\n// { _label: '3.1 Navigationspunkt', _href: '#abc', _icon: 'codicon codicon-folder-closed' },\n// { _label: '3.2 Navigationspunkt', _href: '#abc', _icon: 'codicon codicon-folder-closed', _target: 'asdasd' },\n// {\n// _active: true,\n// _label: '3.3 Navigationspunkt',\n// _href: '#abc',\n// _children: [\n// { _active: true, _label: '3.3.1 Navigationspunkt (aktiv)', _href: '#abc' },\n// { _label: '3.3.2 Navigationspunkt', _href: '#abc' },\n// ],\n// },\n// {\n// _label: '3.4 Navigationspunkt',\n// _href: '#abc',\n// _children: [\n// { _label: '3.4.1 Navigationspunkt', _href: '#abc' },\n// { _label: '3.4.2 Navigationspunkt', _href: '#abc' },\n// ],\n// },\n// { _label: '3.5 Navigationspunkt', _href: '#abc' },\n// ],\n// },\n// { _label: '4 Navigationspunkt', _href: '#abc' },\n// ])\n// );\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{h as watchNumber,w as watchString}from"./prop.validators.js";const defaultStyleCss=":host{--kolibri-border-color:#666;--kolibri-border-radius:0.125rem;--kolibri-border-width:1px;--kolibri-color-error:#f44336;--kolibri-color-info:#2196f3;--kolibri-color-success:#4caf50;--kolibri-color-warning:#ff9800;--kolibri-color-primary:#3f51b5;--kolibri-color-secondary:#ff4081;--kolibri-color-normal:#9e9e9e;--kolibri-color-danger:#f44336;--kolibri-color-ghost:#f5f5f5;--kolibri-color-disabled:#bdbdbd;--kolibri-color-text:#222222;--kolibri-color-visited:#9c27b0;--kolibri-font-family:Verdana, Arial, Tahoma, Helvetica, sans-serif;--kolibri-font-size:16px;--kolibri-spacing:0.25rem}:host{font-family:inherit;font-size:inherit}:host *{hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}:host{display:inline-block}a,button{background-color:transparent;border:none;font-size:inherit;margin:0;padding:0;transition-duration:0.5s;transition-property:background-color, color, border-color}:host{font-family:var(--kolibri-font-family);font-size:inherit}*{box-sizing:border-box}kol-icon{color:inherit}kol-span-wc{display:grid;gap:var(--kolibri-spacing);place-items:center}kol-span-wc>span{display:flex;gap:var(--kolibri-spacing);place-items:center}kol-span-wc>kol-icon,kol-span-wc>span>kol-icon{display:inline-grid;place-items:center;width:1em;height:1em}a,button,input,select,textarea{appearance:none;cursor:pointer}a.icon-only>kol-span-wc>span>span,button.icon-only>kol-span-wc>span>span{display:none}h1,h2,h3,h4,h5,h6{font-family:var(--kolibri-font-family);font-size:var(--kolibri-font-size);margin:0;padding:0}progress,span{display:block;height:0px;overflow:hidden;width:0px}.bar,.cycle{transition:all 0.5s ease-in-out 0s;transition-property:all;transition-duration:0.5s;transition-timing-function:ease-in-out;transition-delay:0.25s}.cycle{transform-origin:50% 50%;transform:rotate(-90deg)}",createProgressSVG=e=>"cycle"===e._type?h("svg",{width:"100",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg"},h("circle",{fill:"none",stroke:"#efefef",cx:"6px",cy:"6px",r:"5px"}),h("circle",{class:"cycle","stroke-linecap":"round","stroke-dasharray":`${Math.round(e._value/e._max*32)}px 32px`,fill:"none",stroke:"#0075ff",cx:"6px",cy:"6px",r:"5px"})):h("svg",{width:"100",viewBox:"0 0 24 2",xmlns:"http://www.w3.org/2000/svg"},h("line",{"stroke-width":"2",x1:"1","stroke-linecap":"round",y1:"1",x2:"23",y2:"1",fill:"#efefef",stroke:"#efefef"}),h("line",{class:"bar","stroke-width":"2",x1:"1","stroke-linecap":"round",y1:"1",x2:`${1+Math.round(e._value/e._max*22)}`,y2:"1",fill:"#0075ff",stroke:"#0075ff"})),KolProcess=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this._max=void 0,this._type=void 0,this._unit="%",this._value=void 0,this.state={_max:100,_type:"bar",_unit:"%",_value:0,_liveValue:0}}render(){return h(Host,null,"cycle"===(e=this.state)._type?h("svg",{width:"100",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg"},h("circle",{fill:"none",stroke:"#efefef",cx:"6px",cy:"6px",r:"5px"}),h("circle",{class:"cycle","stroke-linecap":"round","stroke-dasharray":`${Math.round(e._value/e._max*32)}px 32px`,fill:"none",stroke:"#0075ff",cx:"6px",cy:"6px",r:"5px"})):h("svg",{width:"100",viewBox:"0 0 24 2",xmlns:"http://www.w3.org/2000/svg"},h("line",{"stroke-width":"2",x1:"1","stroke-linecap":"round",y1:"1",x2:"23",y2:"1",fill:"#efefef",stroke:"#efefef"}),h("line",{class:"bar","stroke-width":"2",x1:"1","stroke-linecap":"round",y1:"1",x2:`${1+Math.round(e._value/e._max*22)}`,y2:"1",fill:"#0075ff",stroke:"#0075ff"})),h("progress",{"aria-busy":this.state._value<this.state._max?"true":"false",max:this.state._max,value:this.state._value}),h("span",{"aria-live":"polite","aria-relevant":"removals text"},this.state._liveValue," von ",this.state._max," ",this.state._unit));var e}validateMax(e){"number"!=typeof e&&(e=100),watchNumber(this,"_max",e,{required:!0})}validateType(e){if("cycle"===e);else e="bar";this.state=Object.assign(Object.assign({},this.state),{_type:e})}validateUnit(e){watchString(this,"_unit",e)}validateValue(e){"number"!=typeof e&&(e=0),watchNumber(this,"_value",e,{required:!0})}componentWillLoad(){this.validateMax(this._max),this.validateType(this._type),this.validateUnit(this._unit),this.validateValue(this._value),this.interval=setInterval((()=>{this.state._liveValue!==this.state._value&&(this.state=Object.assign(Object.assign({},this.state),{_liveValue:this.state._value}))}),5e3)}disconnectedCallback(){clearInterval(this.interval)}static get watchers(){return{_max:["validateMax"],_type:["validateType"],_unit:["validateUnit"],_value:["validateValue"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-progress",{_max:[2],_type:[1],_unit:[1],_value:[2],state:[32]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-progress"].forEach((e=>{if("kol-progress"===e)customElements.get(e)||customElements.define(e,KolProcess)}))}const KolProgress=KolProcess,defineCustomElement=defineCustomElement$1;export{KolProgress,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{h as watchNumber,w as watchString}from"./prop.validators.js";const defaultStyleCss=":host{--kolibri-border-color:#666;--kolibri-border-radius:0.125rem;--kolibri-border-width:1px;--kolibri-color-black:#000;--kolibri-color-white:#fff;--kolibri-color-error:#f44336;--kolibri-color-info:#2196f3;--kolibri-color-success:#4caf50;--kolibri-color-warning:#ff9800;--kolibri-color-primary:#3f51b5;--kolibri-color-secondary:#ff4081;--kolibri-color-normal:#9e9e9e;--kolibri-color-danger:#f44336;--kolibri-color-ghost:#f5f5f5;--kolibri-color-disabled:#bdbdbd;--kolibri-color-text:#222222;--kolibri-color-visited:#9c27b0;--kolibri-font-family:Verdana, Arial, Tahoma, Helvetica, sans-serif;--kolibri-font-size:16px;--kolibri-spacing:0.25rem}:host *{hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}:host{display:inline-flex}a,button{background-color:transparent;border:none;font-size:inherit;margin:0;padding:0;transition-duration:0.5s;transition-property:background-color, color, border-color;width:100%}kol-icon.external-link-icon{display:inline-flex}:host{font-family:var(--kolibri-font-family);font-size:var(--kolibri-font-size)}*{box-sizing:border-box}kol-span-wc{display:grid;gap:var(--kolibri-spacing);place-items:center}kol-span-wc>span{display:flex;gap:var(--kolibri-spacing);place-items:center}kol-span-wc kol-icon{display:contents;padding:0 var(--kolibri-spacing)}a,button,input,select,textarea{appearance:none;cursor:pointer;font-family:var(--kolibri-font-family)}.icon-only>kol-span-wc>span>span{display:none}progress,span{display:block;height:0px;overflow:hidden;width:0px}.bar,.cycle{transition:all 0.5s ease-in-out 0s;transition-property:all;transition-duration:0.5s;transition-timing-function:ease-in-out;transition-delay:0.25s}.cycle{transform-origin:50% 50%;transform:rotate(-90deg)}",createProgressSVG=e=>"cycle"===e._type?h("svg",{width:"100",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg"},h("circle",{fill:"none",stroke:"#efefef",cx:"6px",cy:"6px",r:"5px"}),h("circle",{class:"cycle","stroke-linecap":"round","stroke-dasharray":`${Math.round(e._value/e._max*32)}px 32px`,fill:"none",stroke:"#0075ff",cx:"6px",cy:"6px",r:"5px"})):h("svg",{width:"100",viewBox:"0 0 24 2",xmlns:"http://www.w3.org/2000/svg"},h("line",{"stroke-width":"2",x1:"1","stroke-linecap":"round",y1:"1",x2:"23",y2:"1",fill:"#efefef",stroke:"#efefef"}),h("line",{class:"bar","stroke-width":"2",x1:"1","stroke-linecap":"round",y1:"1",x2:`${1+Math.round(e._value/e._max*22)}`,y2:"1",fill:"#0075ff",stroke:"#0075ff"})),KolProcess=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this._max=void 0,this._type=void 0,this._unit="%",this._value=void 0,this.state={_max:100,_type:"bar",_unit:"%",_value:0,_liveValue:0}}render(){return h(Host,null,"cycle"===(e=this.state)._type?h("svg",{width:"100",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg"},h("circle",{fill:"none",stroke:"#efefef",cx:"6px",cy:"6px",r:"5px"}),h("circle",{class:"cycle","stroke-linecap":"round","stroke-dasharray":`${Math.round(e._value/e._max*32)}px 32px`,fill:"none",stroke:"#0075ff",cx:"6px",cy:"6px",r:"5px"})):h("svg",{width:"100",viewBox:"0 0 24 2",xmlns:"http://www.w3.org/2000/svg"},h("line",{"stroke-width":"2",x1:"1","stroke-linecap":"round",y1:"1",x2:"23",y2:"1",fill:"#efefef",stroke:"#efefef"}),h("line",{class:"bar","stroke-width":"2",x1:"1","stroke-linecap":"round",y1:"1",x2:`${1+Math.round(e._value/e._max*22)}`,y2:"1",fill:"#0075ff",stroke:"#0075ff"})),h("progress",{"aria-busy":this.state._value<this.state._max?"true":"false",max:this.state._max,value:this.state._value}),h("span",{"aria-live":"polite","aria-relevant":"removals text"},this.state._liveValue," von ",this.state._max," ",this.state._unit));var e}validateMax(e){"number"!=typeof e&&(e=100),watchNumber(this,"_max",e,{required:!0})}validateType(e){if("cycle"===e);else e="bar";this.state=Object.assign(Object.assign({},this.state),{_type:e})}validateUnit(e){watchString(this,"_unit",e)}validateValue(e){"number"!=typeof e&&(e=0),watchNumber(this,"_value",e,{required:!0})}componentWillLoad(){this.validateMax(this._max),this.validateType(this._type),this.validateUnit(this._unit),this.validateValue(this._value),this.interval=setInterval((()=>{this.state._liveValue!==this.state._value&&(this.state=Object.assign(Object.assign({},this.state),{_liveValue:this.state._value}))}),5e3)}disconnectedCallback(){clearInterval(this.interval)}static get watchers(){return{_max:["validateMax"],_type:["validateType"],_unit:["validateUnit"],_value:["validateValue"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-progress",{_max:[2],_type:[1],_unit:[1],_value:[2],state:[32]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-progress"].forEach((e=>{if("kol-progress"===e)customElements.get(e)||customElements.define(e,KolProcess)}))}const KolProgress=KolProcess,defineCustomElement=defineCustomElement$1;export{KolProgress,defineCustomElement};
@@ -1 +1 @@
1
- {"file":"kol-progress.js","mappings":";;;;;;AAAA,MAAM,eAAe,GAAG,6xDAA6xD;;AC0BrzD,MAAM,iBAAiB,GAAG,CAAC,KAAa;EACvC,QAAQ,KAAK,CAAC,KAAK;IAClB,KAAK,OAAO;MACX,QACC,WAAK,KAAK,EAAC,KAAK,EAAC,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,4BAA4B,IACtE,cAAQ,IAAI,EAAC,MAAM,EAAC,MAAM,EAAC,SAAS,EAAC,EAAE,EAAC,KAAK,EAAC,EAAE,EAAC,KAAK,EAAC,CAAC,EAAC,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,MAAM,CAAC,CAAC;IAEhC,IAAI,CAAC,QAAQ,GAAG,WAAW,CAAC;MAC3B,IAAI,IAAI,CAAC,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;QAChD,IAAI,CAAC,KAAK,mCACN,IAAI,CAAC,KAAK,KACb,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,GAC7B,CAAC;OACF;KACD,EAAE,IAAI,CAAC,CAAC;GACT;EAEM,oBAAoB;IAC1B,aAAa,CAAC,IAAI,CAAC,QAA6B,CAAC,CAAC;GAClD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/progress/style.css?tag=kol-progress&mode=default&encapsulation=shadow","./src/components/progress/component.tsx"],"sourcesContent":["@import '../style.css';\n\nprogress,\nspan {\n\tdisplay: block;\n\theight: 0px;\n\toverflow: hidden;\n\twidth: 0px;\n}\n\n.bar,\n.cycle {\n\ttransition: all 0.5s ease-in-out 0s;\n\ttransition-property: all;\n\ttransition-duration: 0.5s;\n\ttransition-timing-function: ease-in-out;\n\ttransition-delay: 0.25s;\n}\n\n.cycle {\n\ttransform-origin: 50% 50%;\n\ttransform: rotate(-90deg);\n}\n","import { Component, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { Generic } from '@a11y-ui/core';\nimport { KoliBriProgressType } from '../../types/progress';\nimport { watchNumber, watchString } from '../../utils/prop.validators';\n\n/**\n * API\n */\ntype RequiredProps = {\n\tmax: number;\n\tvalue: number;\n};\ntype OptionalProps = {\n\ttype: KoliBriProgressType;\n\tunit: string;\n};\n// type Props = Generic.Element.Members<RequiredProps, OptionalProps>;\n\ntype RequiredStates = RequiredProps & {\n\tliveValue: number;\n};\ntype OptionalStates = OptionalProps;\ntype States = Generic.Element.Members<RequiredStates, OptionalStates>;\n\n// https://css-tricks.com/html5-progress-element/\nconst createProgressSVG = (state: States): JSX.Element => {\n\tswitch (state._type) {\n\t\tcase 'cycle':\n\t\t\treturn (\n\t\t\t\t<svg width=\"100\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t\t\t\t<circle fill=\"none\" stroke=\"#efefef\" cx=\"6px\" cy=\"6px\" r=\"5px\"></circle>\n\t\t\t\t\t<circle\n\t\t\t\t\t\tclass=\"cycle\"\n\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\tstroke-dasharray={`${Math.round((state._value / state._max) * 32)}px 32px`}\n\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\tstroke=\"#0075ff\"\n\t\t\t\t\t\tcx=\"6px\"\n\t\t\t\t\t\tcy=\"6px\"\n\t\t\t\t\t\tr=\"5px\"\n\t\t\t\t\t></circle>\n\t\t\t\t</svg>\n\t\t\t);\n\t\tdefault:\n\t\t\treturn (\n\t\t\t\t<svg width=\"100\" viewBox=\"0 0 24 2\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t\t\t\t<line stroke-width=\"2\" x1=\"1\" stroke-linecap=\"round\" y1=\"1\" x2=\"23\" y2=\"1\" fill=\"#efefef\" stroke=\"#efefef\"></line>\n\t\t\t\t\t<line\n\t\t\t\t\t\tclass=\"bar\"\n\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\tx1=\"1\"\n\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\ty1=\"1\"\n\t\t\t\t\t\tx2={`${1 + Math.round((state._value / state._max) * 22)}`}\n\t\t\t\t\t\ty2=\"1\"\n\t\t\t\t\t\tfill=\"#0075ff\"\n\t\t\t\t\t\tstroke=\"#0075ff\"\n\t\t\t\t\t></line>\n\t\t\t\t</svg>\n\t\t\t);\n\t}\n};\n\n@Component({\n\ttag: 'kol-progress',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolProcess implements Generic.Element.ComponentApi<RequiredProps, OptionalProps, RequiredStates, OptionalStates> {\n\tprivate interval?: NodeJS.Timer;\n\n\t// https://dequeuniversity.com/library/aria/progress-bar-bounded\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t{createProgressSVG(this.state)}\n\t\t\t\t<progress aria-busy={this.state._value < this.state._max ? 'true' : 'false'} max={this.state._max} value={this.state._value}></progress>\n\t\t\t\t<span aria-live=\"polite\" aria-relevant=\"removals text\">\n\t\t\t\t\t{this.state._liveValue} von {this.state._max} {this.state._unit}\n\t\t\t\t</span>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Gibt an, bei welchem Wert die Fortschrittsanzeige abgeschlossen ist.\n\t */\n\t@Prop() public _max!: number;\n\n\t/**\n\t * Gibt an, ob der Prozess als Balken oder Kreis dargestellt wird.\n\t */\n\t@Prop() public _type?: KoliBriProgressType;\n\n\t/**\n\t * Gibt die Einheit der Fortschrittswerte an.\n\t */\n\t@Prop() public _unit?: string = '%';\n\n\t/**\n\t * Gibt an, wie weit die Anzeige fortgeschritten ist.\n\t */\n\t@Prop() public _value!: number;\n\n\t/**\n\t * @see: components/abbr/component.tsx (@State)\n\t */\n\t@State() public state: States = {\n\t\t_max: 100,\n\t\t_type: 'bar',\n\t\t_unit: '%',\n\t\t_value: 0,\n\t\t_liveValue: 0,\n\t};\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_max')\n\tpublic validateMax(value?: number): void {\n\t\tif (typeof value !== 'number') {\n\t\t\tvalue = 100;\n\t\t}\n\t\twatchNumber(this, '_max', value, {\n\t\t\trequired: true,\n\t\t});\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_type')\n\tpublic validateType(value?: KoliBriProgressType): void {\n\t\tswitch (value) {\n\t\t\tcase 'cycle':\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tvalue = 'bar';\n\t\t}\n\t\tthis.state = {\n\t\t\t...this.state,\n\t\t\t_type: value,\n\t\t};\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_unit')\n\tpublic validateUnit(value?: string): void {\n\t\twatchString(this, '_unit', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_value')\n\tpublic validateValue(value?: number): void {\n\t\tif (typeof value !== 'number') {\n\t\t\tvalue = 0;\n\t\t}\n\t\twatchNumber(this, '_value', value, {\n\t\t\t// max: this._max, TODO as Function\n\t\t\trequired: true,\n\t\t});\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (componentWillLoad)\n\t */\n\tpublic componentWillLoad(): void {\n\t\tthis.validateMax(this._max);\n\t\tthis.validateType(this._type);\n\t\tthis.validateUnit(this._unit);\n\t\tthis.validateValue(this._value);\n\n\t\tthis.interval = setInterval(() => {\n\t\t\tif (this.state._liveValue !== this.state._value) {\n\t\t\t\tthis.state = {\n\t\t\t\t\t...this.state,\n\t\t\t\t\t_liveValue: this.state._value,\n\t\t\t\t};\n\t\t\t}\n\t\t}, 5000);\n\t}\n\n\tpublic disconnectedCallback(): void {\n\t\tclearInterval(this.interval as unknown as number);\n\t}\n}\n"],"version":3}
1
+ {"file":"kol-progress.js","mappings":";;;;;;AAAA,MAAM,eAAe,GAAG,usDAAusD;;AC0B/tD,MAAM,iBAAiB,GAAG,CAAC,KAAa;EACvC,QAAQ,KAAK,CAAC,KAAK;IAClB,KAAK,OAAO;MACX,QACC,WAAK,KAAK,EAAC,KAAK,EAAC,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,4BAA4B,IACtE,cAAQ,IAAI,EAAC,MAAM,EAAC,MAAM,EAAC,SAAS,EAAC,EAAE,EAAC,KAAK,EAAC,EAAE,EAAC,KAAK,EAAC,CAAC,EAAC,KAAK,GAAU,EACxE,cACC,KAAK,EAAC,OAAO,oBACE,OAAO,sBACJ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,IAAI,IAAI,EAAE,C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ChD,IAAI,CAAC,KAAK,mCACN,IAAI,CAAC,KAAK,KACb,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,GAC7B,CAAC;OACF;KACD,EAAE,IAAI,CAAC,CAAC;GACT;EAEM,oBAAoB;IAC1B,aAAa,CAAC,IAAI,CAAC,QAA6B,CAAC,CAAC;GAClD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/progress/style.css?tag=kol-progress&mode=default&encapsulation=shadow","./src/components/progress/component.tsx"],"sourcesContent":["@import '../style.css';\n\nprogress,\nspan {\n\tdisplay: block;\n\theight: 0px;\n\toverflow: hidden;\n\twidth: 0px;\n}\n\n.bar,\n.cycle {\n\ttransition: all 0.5s ease-in-out 0s;\n\ttransition-property: all;\n\ttransition-duration: 0.5s;\n\ttransition-timing-function: ease-in-out;\n\ttransition-delay: 0.25s;\n}\n\n.cycle {\n\ttransform-origin: 50% 50%;\n\ttransform: rotate(-90deg);\n}\n","import { Component, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { Generic } from '@a11y-ui/core';\nimport { KoliBriProgressType } from '../../types/progress';\nimport { watchNumber, watchString } from '../../utils/prop.validators';\n\n/**\n * API\n */\ntype RequiredProps = {\n\tmax: number;\n\tvalue: number;\n};\ntype OptionalProps = {\n\ttype: KoliBriProgressType;\n\tunit: string;\n};\n// type Props = Generic.Element.Members<RequiredProps, OptionalProps>;\n\ntype RequiredStates = RequiredProps & {\n\tliveValue: number;\n};\ntype OptionalStates = OptionalProps;\ntype States = Generic.Element.Members<RequiredStates, OptionalStates>;\n\n// https://css-tricks.com/html5-progress-element/\nconst createProgressSVG = (state: States): JSX.Element => {\n\tswitch (state._type) {\n\t\tcase 'cycle':\n\t\t\treturn (\n\t\t\t\t<svg width=\"100\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t\t\t\t<circle fill=\"none\" stroke=\"#efefef\" cx=\"6px\" cy=\"6px\" r=\"5px\"></circle>\n\t\t\t\t\t<circle\n\t\t\t\t\t\tclass=\"cycle\"\n\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\tstroke-dasharray={`${Math.round((state._value / state._max) * 32)}px 32px`}\n\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\tstroke=\"#0075ff\"\n\t\t\t\t\t\tcx=\"6px\"\n\t\t\t\t\t\tcy=\"6px\"\n\t\t\t\t\t\tr=\"5px\"\n\t\t\t\t\t></circle>\n\t\t\t\t</svg>\n\t\t\t);\n\t\tdefault:\n\t\t\treturn (\n\t\t\t\t<svg width=\"100\" viewBox=\"0 0 24 2\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t\t\t\t<line stroke-width=\"2\" x1=\"1\" stroke-linecap=\"round\" y1=\"1\" x2=\"23\" y2=\"1\" fill=\"#efefef\" stroke=\"#efefef\"></line>\n\t\t\t\t\t<line\n\t\t\t\t\t\tclass=\"bar\"\n\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\tx1=\"1\"\n\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\ty1=\"1\"\n\t\t\t\t\t\tx2={`${1 + Math.round((state._value / state._max) * 22)}`}\n\t\t\t\t\t\ty2=\"1\"\n\t\t\t\t\t\tfill=\"#0075ff\"\n\t\t\t\t\t\tstroke=\"#0075ff\"\n\t\t\t\t\t></line>\n\t\t\t\t</svg>\n\t\t\t);\n\t}\n};\n\n@Component({\n\ttag: 'kol-progress',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolProcess implements Generic.Element.ComponentApi<RequiredProps, OptionalProps, RequiredStates, OptionalStates> {\n\tprivate interval?: NodeJS.Timer;\n\n\t// https://dequeuniversity.com/library/aria/progress-bar-bounded\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t{createProgressSVG(this.state)}\n\t\t\t\t<progress aria-busy={this.state._value < this.state._max ? 'true' : 'false'} max={this.state._max} value={this.state._value}></progress>\n\t\t\t\t<span aria-live=\"polite\" aria-relevant=\"removals text\">\n\t\t\t\t\t{this.state._liveValue} von {this.state._max} {this.state._unit}\n\t\t\t\t</span>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Gibt an, bei welchem Wert die Fortschrittsanzeige abgeschlossen ist.\n\t */\n\t@Prop() public _max!: number;\n\n\t/**\n\t * Gibt an, ob der Prozess als Balken oder Kreis dargestellt wird.\n\t */\n\t@Prop() public _type?: KoliBriProgressType;\n\n\t/**\n\t * Gibt die Einheit der Fortschrittswerte an.\n\t */\n\t@Prop() public _unit?: string = '%';\n\n\t/**\n\t * Gibt an, wie weit die Anzeige fortgeschritten ist.\n\t */\n\t@Prop() public _value!: number;\n\n\t/**\n\t * @see: components/abbr/component.tsx (@State)\n\t */\n\t@State() public state: States = {\n\t\t_max: 100,\n\t\t_type: 'bar',\n\t\t_unit: '%',\n\t\t_value: 0,\n\t\t_liveValue: 0,\n\t};\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_max')\n\tpublic validateMax(value?: number): void {\n\t\tif (typeof value !== 'number') {\n\t\t\tvalue = 100;\n\t\t}\n\t\twatchNumber(this, '_max', value, {\n\t\t\trequired: true,\n\t\t});\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_type')\n\tpublic validateType(value?: KoliBriProgressType): void {\n\t\tswitch (value) {\n\t\t\tcase 'cycle':\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tvalue = 'bar';\n\t\t}\n\t\tthis.state = {\n\t\t\t...this.state,\n\t\t\t_type: value,\n\t\t};\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_unit')\n\tpublic validateUnit(value?: string): void {\n\t\twatchString(this, '_unit', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_value')\n\tpublic validateValue(value?: number): void {\n\t\tif (typeof value !== 'number') {\n\t\t\tvalue = 0;\n\t\t}\n\t\twatchNumber(this, '_value', value, {\n\t\t\t// max: this._max, TODO as Function\n\t\t\trequired: true,\n\t\t});\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (componentWillLoad)\n\t */\n\tpublic componentWillLoad(): void {\n\t\tthis.validateMax(this._max);\n\t\tthis.validateType(this._type);\n\t\tthis.validateUnit(this._unit);\n\t\tthis.validateValue(this._value);\n\n\t\tthis.interval = setInterval(() => {\n\t\t\tif (this.state._liveValue !== this.state._value) {\n\t\t\t\tthis.state = {\n\t\t\t\t\t...this.state,\n\t\t\t\t\t_liveValue: this.state._value,\n\t\t\t\t};\n\t\t\t}\n\t\t}, 5000);\n\t}\n\n\tpublic disconnectedCallback(): void {\n\t\tclearInterval(this.interval as unknown as number);\n\t}\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{w as watchString,F as a11yHintLabelingLandmarks}from"./prop.validators.js";import{w as watchNavLinks}from"./validation.js";import{d as defineCustomElement$2,a as defineCustomElement$7,b as defineCustomElement$8}from"./component.js";import{d as defineCustomElement$6}from"./component2.js";import{d as defineCustomElement$5}from"./shadow.js";import{d as defineCustomElement$4}from"./component6.js";import{d as defineCustomElement$3}from"./component3.js";const defaultStyleCss=":host{--kolibri-border-color:#666;--kolibri-border-radius:0.125rem;--kolibri-border-width:1px;--kolibri-color-error:#f44336;--kolibri-color-info:#2196f3;--kolibri-color-success:#4caf50;--kolibri-color-warning:#ff9800;--kolibri-color-primary:#3f51b5;--kolibri-color-secondary:#ff4081;--kolibri-color-normal:#9e9e9e;--kolibri-color-danger:#f44336;--kolibri-color-ghost:#f5f5f5;--kolibri-color-disabled:#bdbdbd;--kolibri-color-text:#222222;--kolibri-color-visited:#9c27b0;--kolibri-font-family:Verdana, Arial, Tahoma, Helvetica, sans-serif;--kolibri-font-size:16px;--kolibri-spacing:0.25rem}:host{font-family:inherit;font-size:inherit}:host *{hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}:host{display:inline-block}a,button{background-color:transparent;border:none;font-size:inherit;margin:0;padding:0;transition-duration:0.5s;transition-property:background-color, color, border-color}:host{font-family:var(--kolibri-font-family);font-size:inherit}*{box-sizing:border-box}kol-icon{color:inherit}kol-span-wc{display:grid;gap:var(--kolibri-spacing);place-items:center}kol-span-wc>span{display:flex;gap:var(--kolibri-spacing);place-items:center}kol-span-wc>kol-icon,kol-span-wc>span>kol-icon{display:inline-grid;place-items:center;width:1em;height:1em}a,button,input,select,textarea{appearance:none;cursor:pointer}a.icon-only>kol-span-wc>span>span,button.icon-only>kol-span-wc>span>span{display:none}h1,h2,h3,h4,h5,h6{font-family:var(--kolibri-font-family);font-size:var(--kolibri-font-size);margin:0;padding:0}ul{display:grid;list-style:none;place-items:center}ul li{height:0}",KolSkipNav$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this._ariaLabel=void 0,this._links=void 0,this.state={_ariaLabel:"…",_links:[]}}render(){return h("nav",{"aria-label":this.state._ariaLabel},h("ul",null,this.state._links.map(((e,i)=>h("li",{key:i},h("kol-link",Object.assign({},e,{_stealth:!0})))))))}validateAriaLabel(e){watchString(this,"_ariaLabel",e,{required:!0}),a11yHintLabelingLandmarks(e)}validateLinks(e){watchNavLinks("KolSkipNav",this,e)}componentWillLoad(){this.validateAriaLabel(this._ariaLabel),this.validateLinks(this._links)}static get watchers(){return{_ariaLabel:["validateAriaLabel"],_links:["validateLinks"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-skip-nav",{_ariaLabel:[1,"_aria-label"],_links:[1],state:[32]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-skip-nav","kol-badge","kol-button-wc","kol-icon","kol-link","kol-link-wc","kol-span-wc","kol-tooltip"].forEach((e=>{switch(e){case"kol-skip-nav":customElements.get(e)||customElements.define(e,KolSkipNav$1);break;case"kol-badge":customElements.get(e)||defineCustomElement$8();break;case"kol-button-wc":customElements.get(e)||defineCustomElement$7();break;case"kol-icon":customElements.get(e)||defineCustomElement$6();break;case"kol-link":customElements.get(e)||defineCustomElement$5();break;case"kol-link-wc":customElements.get(e)||defineCustomElement$4();break;case"kol-span-wc":customElements.get(e)||defineCustomElement$3();break;case"kol-tooltip":customElements.get(e)||defineCustomElement$2()}}))}const KolSkipNav=KolSkipNav$1,defineCustomElement=defineCustomElement$1;export{KolSkipNav,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{w as watchString,E as a11yHintLabelingLandmarks}from"./prop.validators.js";import{w as watchNavLinks}from"./validation.js";import{d as defineCustomElement$2,a as defineCustomElement$7,b as defineCustomElement$8}from"./component.js";import{d as defineCustomElement$6}from"./component2.js";import{d as defineCustomElement$5}from"./shadow.js";import{d as defineCustomElement$4}from"./component6.js";import{d as defineCustomElement$3}from"./component3.js";const defaultStyleCss=":host{--kolibri-border-color:#666;--kolibri-border-radius:0.125rem;--kolibri-border-width:1px;--kolibri-color-black:#000;--kolibri-color-white:#fff;--kolibri-color-error:#f44336;--kolibri-color-info:#2196f3;--kolibri-color-success:#4caf50;--kolibri-color-warning:#ff9800;--kolibri-color-primary:#3f51b5;--kolibri-color-secondary:#ff4081;--kolibri-color-normal:#9e9e9e;--kolibri-color-danger:#f44336;--kolibri-color-ghost:#f5f5f5;--kolibri-color-disabled:#bdbdbd;--kolibri-color-text:#222222;--kolibri-color-visited:#9c27b0;--kolibri-font-family:Verdana, Arial, Tahoma, Helvetica, sans-serif;--kolibri-font-size:16px;--kolibri-spacing:0.25rem}:host *{hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}:host{display:inline-flex}a,button{background-color:transparent;border:none;font-size:inherit;margin:0;padding:0;transition-duration:0.5s;transition-property:background-color, color, border-color;width:100%}kol-icon.external-link-icon{display:inline-flex}:host{font-family:var(--kolibri-font-family);font-size:var(--kolibri-font-size)}*{box-sizing:border-box}kol-span-wc{display:grid;gap:var(--kolibri-spacing);place-items:center}kol-span-wc>span{display:flex;gap:var(--kolibri-spacing);place-items:center}kol-span-wc kol-icon{display:contents;padding:0 var(--kolibri-spacing)}a,button,input,select,textarea{appearance:none;cursor:pointer;font-family:var(--kolibri-font-family)}.icon-only>kol-span-wc>span>span{display:none}ul{display:grid;list-style:none;place-items:center}ul li{height:0}",KolSkipNav$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this._ariaLabel=void 0,this._links=void 0,this.state={_ariaLabel:"…",_links:[]}}render(){return h("nav",{"aria-label":this.state._ariaLabel},h("ul",null,this.state._links.map(((e,i)=>h("li",{key:i},h("kol-link",Object.assign({},e,{_stealth:!0})))))))}validateAriaLabel(e){watchString(this,"_ariaLabel",e,{required:!0}),a11yHintLabelingLandmarks(e)}validateLinks(e){watchNavLinks("KolSkipNav",this,e)}componentWillLoad(){this.validateAriaLabel(this._ariaLabel),this.validateLinks(this._links)}static get watchers(){return{_ariaLabel:["validateAriaLabel"],_links:["validateLinks"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-skip-nav",{_ariaLabel:[1,"_aria-label"],_links:[1],state:[32]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-skip-nav","kol-badge","kol-button-wc","kol-icon","kol-link","kol-link-wc","kol-span-wc","kol-tooltip"].forEach((e=>{switch(e){case"kol-skip-nav":customElements.get(e)||customElements.define(e,KolSkipNav$1);break;case"kol-badge":customElements.get(e)||defineCustomElement$8();break;case"kol-button-wc":customElements.get(e)||defineCustomElement$7();break;case"kol-icon":customElements.get(e)||defineCustomElement$6();break;case"kol-link":customElements.get(e)||defineCustomElement$5();break;case"kol-link-wc":customElements.get(e)||defineCustomElement$4();break;case"kol-span-wc":customElements.get(e)||defineCustomElement$3();break;case"kol-tooltip":customElements.get(e)||defineCustomElement$2()}}))}const KolSkipNav=KolSkipNav$1,defineCustomElement=defineCustomElement$1;export{KolSkipNav,defineCustomElement};
@@ -1 +1 @@
1
- {"file":"kol-skip-nav.js","mappings":";;;;;;;;;;;;AAAA,MAAM,eAAe,GAAG,ukDAAukD;;MCoCllDA,YAAU;;;;;;;iBA8BU;MAC/B,UAAU,EAAE,GAAG;MACf,MAAM,EAAE,EAAE;KACV;;EAhCM,MAAM;IACZ,QACC,yBAAiB,IAAI,CAAC,KAAK,CAAC,UAAU,IACrC,cACE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAkB,EAAE,KAAa;MACxD,QACC,UAAI,GAAG,EAAE,KAAK,IACb,gCAAc,IAAI,IAAE,QAAQ,EAAE,IAAI,IAAa,CAC3C,EACJ;KACF,CAAC,CACE,CACA,EACL;GACF;EAwBM,iBAAiB,CAAC,KAAc;IACtC,WAAW,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE;MACtC,QAAQ,EAAE,IAAI;KACd,CAAC,CAAC;IACH,yBAAyB,CAAC,KAAK,CAAC,CAAC;GACjC;EAMM,aAAa,CAAC,KAAmC;IACvD,aAAa,CAAC,YAAY,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;GACzC;EAKM,iBAAiB;IACvB,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACxC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;GAChC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolSkipNav"],"sources":["./src/components/skip-nav/style.css?tag=kol-skip-nav&mode=default&encapsulation=shadow","./src/components/skip-nav/component.tsx"],"sourcesContent":["@import '../style.css';\n\nul {\n\tdisplay: grid;\n\tlist-style: none;\n\tplace-items: center;\n}\nul li {\n\theight: 0;\n}\n","import { Component, h, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { Generic } from '@a11y-ui/core';\nimport { a11yHintLabelingLandmarks } from '../../utils/a11y.tipps';\nimport { watchString } from '../../utils/prop.validators';\nimport { NavLinkProps } from '../link/component';\nimport { watchNavLinks } from '../nav/validation';\nimport { Stringified } from '../../types/common';\n\n/**\n * API\n */\ntype RequiredProps = {\n\tariaLabel: string;\n\tlinks: Stringified<NavLinkProps[]>;\n};\ntype OptionalProps = unknown;\n// type Props = Generic.Element.Members<RequiredProps, OptionalProps>;\n\ntype RequiredStates = {\n\tariaLabel: string;\n\tlinks: NavLinkProps[];\n};\ntype OptionalStates = OptionalProps;\ntype States = Generic.Element.Members<RequiredStates, OptionalStates>;\n\n/**\n * @part link - Ermöglicht das Stylen der Links.\n */\n@Component({\n\ttag: 'kol-skip-nav',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolSkipNav implements Generic.Element.ComponentApi<RequiredProps, OptionalProps, RequiredStates, OptionalStates> {\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<nav aria-label={this.state._ariaLabel}>\n\t\t\t\t<ul>\n\t\t\t\t\t{this.state._links.map((link: NavLinkProps, index: number) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<li key={index}>\n\t\t\t\t\t\t\t\t<kol-link {...link} _stealth={true}></kol-link>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</ul>\n\t\t\t</nav>\n\t\t);\n\t}\n\n\t/**\n\t * Gibt den Text an, der die Navigation von anderen Navigationen differenziert.\n\t */\n\t@Prop() public _ariaLabel!: string;\n\n\t/**\n\t * Ist die Liste der unsichtbaren Links.\n\t */\n\t@Prop() public _links!: Stringified<NavLinkProps[]>;\n\n\t/**\n\t * @see: components/abbr/component.tsx (@State)\n\t */\n\t@State() public state: States = {\n\t\t_ariaLabel: '…', // '⚠'\n\t\t_links: [],\n\t};\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_ariaLabel')\n\tpublic validateAriaLabel(value?: string): void {\n\t\twatchString(this, '_ariaLabel', value, {\n\t\t\trequired: true,\n\t\t});\n\t\ta11yHintLabelingLandmarks(value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_links')\n\tpublic validateLinks(value?: Stringified<NavLinkProps[]>): void {\n\t\twatchNavLinks('KolSkipNav', this, value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (componentWillLoad)\n\t */\n\tpublic componentWillLoad(): void {\n\t\tthis.validateAriaLabel(this._ariaLabel);\n\t\tthis.validateLinks(this._links);\n\t}\n}\n"],"version":3}
1
+ {"file":"kol-skip-nav.js","mappings":";;;;;;;;;;;;AAAA,MAAM,eAAe,GAAG,i/CAAi/C;;MCoC5/CA,YAAU;;;;;;;iBA8BU;MAC/B,UAAU,EAAE,GAAG;MACf,MAAM,EAAE,EAAE;KACV;;EAhCM,MAAM;IACZ,QACC,yBAAiB,IAAI,CAAC,KAAK,CAAC,UAAU,IACrC,cACE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAkB,EAAE,KAAa;MACxD,QACC,UAAI,GAAG,EAAE,KAAK,IACb,gCAAc,IAAI,IAAE,QAAQ,EAAE,IAAI,IAAa,CAC3C,EACJ;KACF,CAAC,CACE,CACA,EACL;GACF;EAwBM,iBAAiB,CAAC,KAAc;IACtC,WAAW,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE;MACtC,QAAQ,EAAE,IAAI;KACd,CAAC,CAAC;IACH,yBAAyB,CAAC,KAAK,CAAC,CAAC;GACjC;EAMM,aAAa,CAAC,KAAmC;IACvD,aAAa,CAAC,YAAY,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;GACzC;EAKM,iBAAiB;IACvB,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACxC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;GAChC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolSkipNav"],"sources":["./src/components/skip-nav/style.css?tag=kol-skip-nav&mode=default&encapsulation=shadow","./src/components/skip-nav/component.tsx"],"sourcesContent":["@import '../style.css';\n\nul {\n\tdisplay: grid;\n\tlist-style: none;\n\tplace-items: center;\n}\nul li {\n\theight: 0;\n}\n","import { Component, h, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { Generic } from '@a11y-ui/core';\nimport { a11yHintLabelingLandmarks } from '../../utils/a11y.tipps';\nimport { watchString } from '../../utils/prop.validators';\nimport { NavLinkProps } from '../link/component';\nimport { watchNavLinks } from '../nav/validation';\nimport { Stringified } from '../../types/common';\n\n/**\n * API\n */\ntype RequiredProps = {\n\tariaLabel: string;\n\tlinks: Stringified<NavLinkProps[]>;\n};\ntype OptionalProps = unknown;\n// type Props = Generic.Element.Members<RequiredProps, OptionalProps>;\n\ntype RequiredStates = {\n\tariaLabel: string;\n\tlinks: NavLinkProps[];\n};\ntype OptionalStates = OptionalProps;\ntype States = Generic.Element.Members<RequiredStates, OptionalStates>;\n\n/**\n * @part link - Ermöglicht das Stylen der Links.\n */\n@Component({\n\ttag: 'kol-skip-nav',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolSkipNav implements Generic.Element.ComponentApi<RequiredProps, OptionalProps, RequiredStates, OptionalStates> {\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<nav aria-label={this.state._ariaLabel}>\n\t\t\t\t<ul>\n\t\t\t\t\t{this.state._links.map((link: NavLinkProps, index: number) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<li key={index}>\n\t\t\t\t\t\t\t\t<kol-link {...link} _stealth={true}></kol-link>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</ul>\n\t\t\t</nav>\n\t\t);\n\t}\n\n\t/**\n\t * Gibt den Text an, der die Navigation von anderen Navigationen differenziert.\n\t */\n\t@Prop() public _ariaLabel!: string;\n\n\t/**\n\t * Ist die Liste der unsichtbaren Links.\n\t */\n\t@Prop() public _links!: Stringified<NavLinkProps[]>;\n\n\t/**\n\t * @see: components/abbr/component.tsx (@State)\n\t */\n\t@State() public state: States = {\n\t\t_ariaLabel: '…', // '⚠'\n\t\t_links: [],\n\t};\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_ariaLabel')\n\tpublic validateAriaLabel(value?: string): void {\n\t\twatchString(this, '_ariaLabel', value, {\n\t\t\trequired: true,\n\t\t});\n\t\ta11yHintLabelingLandmarks(value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_links')\n\tpublic validateLinks(value?: Stringified<NavLinkProps[]>): void {\n\t\twatchNavLinks('KolSkipNav', this, value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (componentWillLoad)\n\t */\n\tpublic componentWillLoad(): void {\n\t\tthis.validateAriaLabel(this._ariaLabel);\n\t\tthis.validateLinks(this._links);\n\t}\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{d as defineCustomElement$3}from"./component2.js";import{d as defineCustomElement$2}from"./component3.js";const defaultStyleCss=":host{--kolibri-border-color:#666;--kolibri-border-radius:0.125rem;--kolibri-border-width:1px;--kolibri-color-error:#f44336;--kolibri-color-info:#2196f3;--kolibri-color-success:#4caf50;--kolibri-color-warning:#ff9800;--kolibri-color-primary:#3f51b5;--kolibri-color-secondary:#ff4081;--kolibri-color-normal:#9e9e9e;--kolibri-color-danger:#f44336;--kolibri-color-ghost:#f5f5f5;--kolibri-color-disabled:#bdbdbd;--kolibri-color-text:#222222;--kolibri-color-visited:#9c27b0;--kolibri-font-family:Verdana, Arial, Tahoma, Helvetica, sans-serif;--kolibri-font-size:16px;--kolibri-spacing:0.25rem}:host{font-family:inherit;font-size:inherit}:host *{hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}:host{display:inline-block}a,button{background-color:transparent;border:none;font-size:inherit;margin:0;padding:0;transition-duration:0.5s;transition-property:background-color, color, border-color}:host{font-family:var(--kolibri-font-family);font-size:inherit}*{box-sizing:border-box}kol-icon{color:inherit}kol-span-wc{display:grid;gap:var(--kolibri-spacing);place-items:center}kol-span-wc>span{display:flex;gap:var(--kolibri-spacing);place-items:center}kol-span-wc>kol-icon,kol-span-wc>span>kol-icon{display:inline-grid;place-items:center;width:1em;height:1em}a,button,input,select,textarea{appearance:none;cursor:pointer}a.icon-only>kol-span-wc>span>span,button.icon-only>kol-span-wc>span>span{display:none}h1,h2,h3,h4,h5,h6{font-family:var(--kolibri-font-family);font-size:var(--kolibri-font-size);margin:0;padding:0}",KolSpan$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this._icon=void 0,this._iconOnly=!1,this._label=void 0}render(){return h("kol-span-wc",{_icon:this._icon,_iconOnly:this._iconOnly,_label:this._label},h("slot",{name:"expert",slot:"expert"}))}static get style(){return{default:defaultStyleCss}}},[33,"kol-span",{_icon:[1],_iconOnly:[516,"_icon-only"],_label:[1]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-span","kol-icon","kol-span-wc"].forEach((o=>{switch(o){case"kol-span":customElements.get(o)||customElements.define(o,KolSpan$1);break;case"kol-icon":customElements.get(o)||defineCustomElement$3();break;case"kol-span-wc":customElements.get(o)||defineCustomElement$2()}}))}const KolSpan=KolSpan$1,defineCustomElement=defineCustomElement$1;export{KolSpan,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{d as defineCustomElement$3}from"./component2.js";import{d as defineCustomElement$2}from"./component3.js";const defaultStyleCss=":host{--kolibri-border-color:#666;--kolibri-border-radius:0.125rem;--kolibri-border-width:1px;--kolibri-color-black:#000;--kolibri-color-white:#fff;--kolibri-color-error:#f44336;--kolibri-color-info:#2196f3;--kolibri-color-success:#4caf50;--kolibri-color-warning:#ff9800;--kolibri-color-primary:#3f51b5;--kolibri-color-secondary:#ff4081;--kolibri-color-normal:#9e9e9e;--kolibri-color-danger:#f44336;--kolibri-color-ghost:#f5f5f5;--kolibri-color-disabled:#bdbdbd;--kolibri-color-text:#222222;--kolibri-color-visited:#9c27b0;--kolibri-font-family:Verdana, Arial, Tahoma, Helvetica, sans-serif;--kolibri-font-size:16px;--kolibri-spacing:0.25rem}:host *{hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}:host{display:inline-flex}a,button{background-color:transparent;border:none;font-size:inherit;margin:0;padding:0;transition-duration:0.5s;transition-property:background-color, color, border-color;width:100%}kol-icon.external-link-icon{display:inline-flex}:host{font-family:var(--kolibri-font-family);font-size:var(--kolibri-font-size)}*{box-sizing:border-box}kol-span-wc{display:grid;gap:var(--kolibri-spacing);place-items:center}kol-span-wc>span{display:flex;gap:var(--kolibri-spacing);place-items:center}kol-span-wc kol-icon{display:contents;padding:0 var(--kolibri-spacing)}a,button,input,select,textarea{appearance:none;cursor:pointer;font-family:var(--kolibri-font-family)}.icon-only>kol-span-wc>span>span{display:none}",KolSpan$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this._icon=void 0,this._iconOnly=!1,this._label=void 0}render(){return h("kol-span-wc",{_icon:this._icon,_iconOnly:this._iconOnly,_label:this._label},h("slot",{name:"expert",slot:"expert"}))}static get style(){return{default:defaultStyleCss}}},[33,"kol-span",{_icon:[1],_iconOnly:[516,"_icon-only"],_label:[1]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-span","kol-icon","kol-span-wc"].forEach((o=>{switch(o){case"kol-span":customElements.get(o)||customElements.define(o,KolSpan$1);break;case"kol-icon":customElements.get(o)||defineCustomElement$3();break;case"kol-span-wc":customElements.get(o)||defineCustomElement$2()}}))}const KolSpan=KolSpan$1,defineCustomElement=defineCustomElement$1;export{KolSpan,defineCustomElement};
@@ -1 +1 @@
1
- {"file":"kol-span.js","mappings":";;;;;;;AAAA,MAAM,eAAe,GAAG,qgDAAqgD;;MCahhDA,SAAO;;;;;;qBAqBmC,KAAK;;;EApBpD,MAAM;IACZ,QACC,mBAAa,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,IAK7E,YAAM,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ,GAAG,CACvB,EACb;GACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolSpan"],"sources":["./src/components/span/style.css?tag=kol-span&mode=default&encapsulation=shadow","./src/components/span/shadow.tsx"],"sourcesContent":["@import '../style.css';\n","import { Component, h, JSX, Prop } from '@stencil/core';\nimport { Stringified } from '../../types/common';\n\nimport { KoliBriIconProp } from '../../types/icon';\nimport { Props } from './component';\n\n@Component({\n\ttag: 'kol-span',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolSpan implements Props {\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<kol-span-wc _icon={this._icon} _iconOnly={this._iconOnly} _label={this._label}>\n\t\t\t\t{/*\n\t\t\t\t\tEs ist keine gute Idee hier einen Slot einzufügen, da dadurch ermöglicht wird,\n\t\t\t\t\tdie Unterstützung hinsichtlich der Barrierefreiheit der Komponente zu umgehen.\n\t\t\t\t*/}\n\t\t\t\t<slot name=\"expert\" slot=\"expert\" />\n\t\t\t</kol-span-wc>\n\t\t);\n\t}\n\n\t/**\n\t * Gibt den Class-Identifier eines Icons eine eingebunden Icofont an. (z.B. https://icofont.com/)\n\t */\n\t@Prop() public _icon?: Stringified<KoliBriIconProp>;\n\n\t/**\n\t * Gibt an, ob nur das Icon angezeigt wird.\n\t */\n\t@Prop({ reflect: true }) public _iconOnly?: boolean = false;\n\n\t/**\n\t * Gibt einen beschreibenden Text für das Text-Element an.\n\t */\n\t@Prop() public _label!: string;\n}\n"],"version":3}
1
+ {"file":"kol-span.js","mappings":";;;;;;;AAAA,MAAM,eAAe,GAAG,+6CAA+6C;;MCa17CA,SAAO;;;;;;qBAiBmC,KAAK;;;EAhBpD,MAAM;IACZ,QACC,mBAAa,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,IAC7E,YAAM,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ,GAAG,CACvB,EACb;GACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolSpan"],"sources":["./src/components/span/style.css?tag=kol-span&mode=default&encapsulation=shadow","./src/components/span/shadow.tsx"],"sourcesContent":["@import '../style.css';\n","import { Component, h, JSX, Prop } from '@stencil/core';\nimport { Stringified } from '../../types/common';\n\nimport { KoliBriIconProp } from '../../types/icon';\nimport { Props } from './component';\n\n@Component({\n\ttag: 'kol-span',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolSpan implements Props {\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<kol-span-wc _icon={this._icon} _iconOnly={this._iconOnly} _label={this._label}>\n\t\t\t\t<slot name=\"expert\" slot=\"expert\" />\n\t\t\t</kol-span-wc>\n\t\t);\n\t}\n\n\t/**\n\t * Gibt den Class-Identifier eines Icons eine eingebunden Icofont an. (z.B. https://icofont.com/)\n\t */\n\t@Prop() public _icon?: Stringified<KoliBriIconProp>;\n\n\t/**\n\t * Gibt an, ob nur das Icon angezeigt wird.\n\t */\n\t@Prop({ reflect: true }) public _iconOnly?: boolean = false;\n\n\t/**\n\t * Gibt einen beschreibenden Text für das Text-Element an.\n\t */\n\t@Prop() public _label!: string;\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{t as watchBoolean}from"./prop.validators.js";import{a as translate}from"./i18n.js";const defaultStyleCss=":host{--kolibri-border-color:#666;--kolibri-border-radius:0.125rem;--kolibri-border-width:1px;--kolibri-color-error:#f44336;--kolibri-color-info:#2196f3;--kolibri-color-success:#4caf50;--kolibri-color-warning:#ff9800;--kolibri-color-primary:#3f51b5;--kolibri-color-secondary:#ff4081;--kolibri-color-normal:#9e9e9e;--kolibri-color-danger:#f44336;--kolibri-color-ghost:#f5f5f5;--kolibri-color-disabled:#bdbdbd;--kolibri-color-text:#222222;--kolibri-color-visited:#9c27b0;--kolibri-font-family:Verdana, Arial, Tahoma, Helvetica, sans-serif;--kolibri-font-size:16px;--kolibri-spacing:0.25rem}:host{font-family:inherit;font-size:inherit}:host *{hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}:host{display:inline-block}a,button{background-color:transparent;border:none;font-size:inherit;margin:0;padding:0;transition-duration:0.5s;transition-property:background-color, color, border-color}:host{font-family:var(--kolibri-font-family);font-size:inherit}*{box-sizing:border-box}kol-icon{color:inherit}kol-span-wc{display:grid;gap:var(--kolibri-spacing);place-items:center}kol-span-wc>span{display:flex;gap:var(--kolibri-spacing);place-items:center}kol-span-wc>kol-icon,kol-span-wc>span>kol-icon{display:inline-grid;place-items:center;width:1em;height:1em}a,button,input,select,textarea{appearance:none;cursor:pointer}a.icon-only>kol-span-wc>span>span,button.icon-only>kol-span-wc>span>span{display:none}h1,h2,h3,h4,h5,h6{font-family:var(--kolibri-font-family);font-size:var(--kolibri-font-size);margin:0;padding:0}.spin{display:inline-block;height:1rem;position:relative;width:3rem}.spin span{animation-timing-function:cubic-bezier(0, 1, 1, 0);border-color:#fff;border-radius:50%;border-style:solid;border-width:0.1rem;height:0.8rem;position:absolute;top:0.1rem;width:0.8rem}.spin span:nth-child(1){background-color:#fc0;z-index:0;animation:spin1 2s infinite;left:0.1rem}.spin span:nth-child(2){background-color:#f00;z-index:1;animation:spin2 2s infinite;left:0.1rem}.spin span:nth-child(3){background-color:#000;z-index:1;animation:spin2 2s infinite;left:1.1rem}.spin span:nth-child(4){background-color:#666;z-index:0;animation:spin3 2s infinite;left:2.1rem}@keyframes spin1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes spin2{0%{transform:translate(0, 0)}100%{transform:translate(1rem, 0)}}@keyframes spin3{0%{transform:scale(1)}100%{transform:scale(0)}}",KolSpin$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.showToggled=!1,this._show=!1,this.state={}}render(){return h(Host,null,this.state._show?h("span",{"aria-busy":"true","aria-label":translate("kol-action-running"),"aria-live":"polite",class:"spin",role:"alert"},h("span",{class:"bg-spin-1"}),h("span",{class:"bg-spin-2"}),h("span",{class:"bg-spin-3"}),h("span",{class:"bg-neutral"})):this.showToggled&&h("span",{"aria-label":translate("kol-action-done"),"aria-busy":"false","aria-live":"polite",role:"alert"}))}validateShow(i){this.showToggled=!0===this.state._show&&!1===this._show,watchBoolean(this,"_show",i)}componentWillLoad(){this.validateShow(this._show)}static get watchers(){return{_show:["validateShow"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-spin",{_show:[516],state:[32]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-spin"].forEach((i=>{if("kol-spin"===i)customElements.get(i)||customElements.define(i,KolSpin$1)}))}const KolSpin=KolSpin$1,defineCustomElement=defineCustomElement$1;export{KolSpin,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{t as watchBoolean}from"./prop.validators.js";import{a as translate}from"./i18n.js";const defaultStyleCss=":host{--kolibri-border-color:#666;--kolibri-border-radius:0.125rem;--kolibri-border-width:1px;--kolibri-color-black:#000;--kolibri-color-white:#fff;--kolibri-color-error:#f44336;--kolibri-color-info:#2196f3;--kolibri-color-success:#4caf50;--kolibri-color-warning:#ff9800;--kolibri-color-primary:#3f51b5;--kolibri-color-secondary:#ff4081;--kolibri-color-normal:#9e9e9e;--kolibri-color-danger:#f44336;--kolibri-color-ghost:#f5f5f5;--kolibri-color-disabled:#bdbdbd;--kolibri-color-text:#222222;--kolibri-color-visited:#9c27b0;--kolibri-font-family:Verdana, Arial, Tahoma, Helvetica, sans-serif;--kolibri-font-size:16px;--kolibri-spacing:0.25rem}:host *{hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}:host{display:inline-flex}a,button{background-color:transparent;border:none;font-size:inherit;margin:0;padding:0;transition-duration:0.5s;transition-property:background-color, color, border-color;width:100%}kol-icon.external-link-icon{display:inline-flex}:host{font-family:var(--kolibri-font-family);font-size:var(--kolibri-font-size)}*{box-sizing:border-box}kol-span-wc{display:grid;gap:var(--kolibri-spacing);place-items:center}kol-span-wc>span{display:flex;gap:var(--kolibri-spacing);place-items:center}kol-span-wc kol-icon{display:contents;padding:0 var(--kolibri-spacing)}a,button,input,select,textarea{appearance:none;cursor:pointer;font-family:var(--kolibri-font-family)}.icon-only>kol-span-wc>span>span{display:none}.spin{display:inline-block;height:1rem;position:relative;width:3rem}.spin span{animation-timing-function:cubic-bezier(0, 1, 1, 0);border-color:#fff;border-radius:50%;border-style:solid;border-width:0.1rem;height:0.8rem;position:absolute;top:0.1rem;width:0.8rem}.spin span:nth-child(1){background-color:#fc0;z-index:0;animation:spin1 2s infinite;left:0.1rem}.spin span:nth-child(2){background-color:#f00;z-index:1;animation:spin2 2s infinite;left:0.1rem}.spin span:nth-child(3){background-color:#000;z-index:1;animation:spin2 2s infinite;left:1.1rem}.spin span:nth-child(4){background-color:#666;z-index:0;animation:spin3 2s infinite;left:2.1rem}@keyframes spin1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes spin2{0%{transform:translate(0, 0)}100%{transform:translate(1rem, 0)}}@keyframes spin3{0%{transform:scale(1)}100%{transform:scale(0)}}",KolSpin$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.showToggled=!1,this._show=!1,this.state={}}render(){return h(Host,null,this.state._show?h("span",{"aria-busy":"true","aria-label":translate("kol-action-running"),"aria-live":"polite",class:"spin",role:"alert"},h("span",{class:"bg-spin-1"}),h("span",{class:"bg-spin-2"}),h("span",{class:"bg-spin-3"}),h("span",{class:"bg-neutral"})):this.showToggled&&h("span",{"aria-label":translate("kol-action-done"),"aria-busy":"false","aria-live":"polite",role:"alert"}))}validateShow(i){this.showToggled=!0===this.state._show&&!1===this._show,watchBoolean(this,"_show",i)}componentWillLoad(){this.validateShow(this._show)}static get watchers(){return{_show:["validateShow"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-spin",{_show:[516],state:[32]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-spin"].forEach((i=>{if("kol-spin"===i)customElements.get(i)||customElements.define(i,KolSpin$1)}))}const KolSpin=KolSpin$1,defineCustomElement=defineCustomElement$1;export{KolSpin,defineCustomElement};
@@ -1 +1 @@
1
- {"file":"kol-spin.js","mappings":";;;;;;;AAAA,MAAM,eAAe,GAAG,21EAA21E;;MC0Bt2EA,SAAO;;;;;IA4BX,gBAAW,GAAG,KAAK,CAAC;iBAPsB,KAAK;iBAKvB,EAAE;;EAzB3B,MAAM;IACZ,QACC,EAAC,IAAI,QACH,IAAI,CAAC,KAAK,CAAC,KAAK,IAChB,yBAAgB,MAAM,gBAAa,SAAS,CAAC,oBAAoB,CAAC,eAAY,QAAQ,EAAC,KAAK,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,IAC/G,YAAM,KAAK,EAAC,WAAW,GAAQ,EAC/B,YAAM,KAAK,EAAC,WAAW,GAAQ,EAC/B,YAAM,KAAK,EAAC,WAAW,GAAQ,EAC/B,YAAM,KAAK,EAAC,YAAY,GAAQ,CAC1B,KAEP,IAAI,CAAC,WAAW,IAAI,0BAAkB,SAAS,CAAC,iBAAiB,CAAC,eAAY,OAAO,eAAW,QAAQ,EAAC,IAAI,EAAC,OAAO,GAAQ,CAC7H,CACK,EACN;GACF;EAkBM,YAAY,CAAC,KAAe;IAClC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC;IACrE,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;GACnC;EAKM,iBAAiB;IACvB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;GAC9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolSpin"],"sources":["./src/components/spin/style.css?tag=kol-spin&mode=default&encapsulation=shadow","./src/components/spin/component.tsx"],"sourcesContent":["@import '../style.css';\n\n.spin {\n\tdisplay: inline-block;\n\theight: 1rem;\n\tposition: relative;\n\twidth: 3rem;\n}\n.spin span {\n\tanimation-timing-function: cubic-bezier(0, 1, 1, 0);\n\tborder-color: #fff;\n\tborder-radius: 50%;\n\tborder-style: solid;\n\tborder-width: 0.1rem;\n\theight: 0.8rem;\n\tposition: absolute;\n\ttop: 0.1rem;\n\twidth: 0.8rem;\n}\n.spin span:nth-child(1) {\n\tbackground-color: #fc0;\n\tz-index: 0;\n\tanimation: spin1 2s infinite;\n\tleft: 0.1rem;\n}\n.spin span:nth-child(2) {\n\tbackground-color: #f00;\n\tz-index: 1;\n\tanimation: spin2 2s infinite;\n\tleft: 0.1rem;\n}\n.spin span:nth-child(3) {\n\tbackground-color: #000;\n\tz-index: 1;\n\tanimation: spin2 2s infinite;\n\tleft: 1.1rem;\n}\n.spin span:nth-child(4) {\n\tbackground-color: #666;\n\tz-index: 0;\n\tanimation: spin3 2s infinite;\n\tleft: 2.1rem;\n}\n\n@keyframes spin1 {\n\t0% {\n\t\ttransform: scale(0);\n\t}\n\t100% {\n\t\ttransform: scale(1);\n\t}\n}\n\n@keyframes spin2 {\n\t0% {\n\t\ttransform: translate(0, 0);\n\t}\n\t100% {\n\t\ttransform: translate(1rem, 0);\n\t}\n}\n\n@keyframes spin3 {\n\t0% {\n\t\ttransform: scale(1);\n\t}\n\t100% {\n\t\ttransform: scale(0);\n\t}\n}\n","import { Component, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { Generic } from '@a11y-ui/core';\nimport { watchBoolean } from '../../utils/prop.validators';\nimport { translate } from '../../i18n';\n\n/**\n * API\n */\ntype RequiredProps = unknown;\ntype OptionalProps = {\n\tshow: boolean;\n};\nexport type Props = Generic.Element.Members<RequiredProps, OptionalProps>;\n\ntype RequiredStates = RequiredProps;\ntype OptionalStates = OptionalProps;\ntype States = Generic.Element.Members<RequiredStates, OptionalStates>;\n\n@Component({\n\ttag: 'kol-spin',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolSpin implements Generic.Element.ComponentApi<RequiredProps, OptionalProps, RequiredStates, OptionalStates> {\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t{this.state._show ? (\n\t\t\t\t\t<span aria-busy=\"true\" aria-label={translate('kol-action-running')} aria-live=\"polite\" class=\"spin\" role=\"alert\">\n\t\t\t\t\t\t<span class=\"bg-spin-1\"></span>\n\t\t\t\t\t\t<span class=\"bg-spin-2\"></span>\n\t\t\t\t\t\t<span class=\"bg-spin-3\"></span>\n\t\t\t\t\t\t<span class=\"bg-neutral\"></span>\n\t\t\t\t\t</span>\n\t\t\t\t) : (\n\t\t\t\t\tthis.showToggled && <span aria-label={translate('kol-action-done')} aria-busy=\"false\" aria-live=\"polite\" role=\"alert\"></span>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Gibt an, ob die Ladeanzeige eingeblendet wird oder nicht.\n\t */\n\t@Prop({ reflect: true }) public _show?: boolean = false;\n\n\t/**\n\t * @see: components/abbr/component.tsx (@State)\n\t */\n\t@State() public state: States = {};\n\n\tprivate showToggled = false;\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_show')\n\tpublic validateShow(value?: boolean): void {\n\t\tthis.showToggled = this.state._show === true && this._show === false;\n\t\twatchBoolean(this, '_show', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (componentWillLoad)\n\t */\n\tpublic componentWillLoad(): void {\n\t\tthis.validateShow(this._show);\n\t}\n}\n"],"version":3}
1
+ {"file":"kol-spin.js","mappings":";;;;;;;AAAA,MAAM,eAAe,GAAG,qwEAAqwE;;MC0BhxEA,SAAO;;;;;IA4BX,gBAAW,GAAG,KAAK,CAAC;iBAPsB,KAAK;iBAKvB,EAAE;;EAzB3B,MAAM;IACZ,QACC,EAAC,IAAI,QACH,IAAI,CAAC,KAAK,CAAC,KAAK,IAChB,yBAAgB,MAAM,gBAAa,SAAS,CAAC,oBAAoB,CAAC,eAAY,QAAQ,EAAC,KAAK,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,IAC/G,YAAM,KAAK,EAAC,WAAW,GAAQ,EAC/B,YAAM,KAAK,EAAC,WAAW,GAAQ,EAC/B,YAAM,KAAK,EAAC,WAAW,GAAQ,EAC/B,YAAM,KAAK,EAAC,YAAY,GAAQ,CAC1B,KAEP,IAAI,CAAC,WAAW,IAAI,0BAAkB,SAAS,CAAC,iBAAiB,CAAC,eAAY,OAAO,eAAW,QAAQ,EAAC,IAAI,EAAC,OAAO,GAAQ,CAC7H,CACK,EACN;GACF;EAkBM,YAAY,CAAC,KAAe;IAClC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC;IACrE,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;GACnC;EAKM,iBAAiB;IACvB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;GAC9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolSpin"],"sources":["./src/components/spin/style.css?tag=kol-spin&mode=default&encapsulation=shadow","./src/components/spin/component.tsx"],"sourcesContent":["@import '../style.css';\n\n.spin {\n\tdisplay: inline-block;\n\theight: 1rem;\n\tposition: relative;\n\twidth: 3rem;\n}\n.spin span {\n\tanimation-timing-function: cubic-bezier(0, 1, 1, 0);\n\tborder-color: #fff;\n\tborder-radius: 50%;\n\tborder-style: solid;\n\tborder-width: 0.1rem;\n\theight: 0.8rem;\n\tposition: absolute;\n\ttop: 0.1rem;\n\twidth: 0.8rem;\n}\n.spin span:nth-child(1) {\n\tbackground-color: #fc0;\n\tz-index: 0;\n\tanimation: spin1 2s infinite;\n\tleft: 0.1rem;\n}\n.spin span:nth-child(2) {\n\tbackground-color: #f00;\n\tz-index: 1;\n\tanimation: spin2 2s infinite;\n\tleft: 0.1rem;\n}\n.spin span:nth-child(3) {\n\tbackground-color: #000;\n\tz-index: 1;\n\tanimation: spin2 2s infinite;\n\tleft: 1.1rem;\n}\n.spin span:nth-child(4) {\n\tbackground-color: #666;\n\tz-index: 0;\n\tanimation: spin3 2s infinite;\n\tleft: 2.1rem;\n}\n\n@keyframes spin1 {\n\t0% {\n\t\ttransform: scale(0);\n\t}\n\t100% {\n\t\ttransform: scale(1);\n\t}\n}\n\n@keyframes spin2 {\n\t0% {\n\t\ttransform: translate(0, 0);\n\t}\n\t100% {\n\t\ttransform: translate(1rem, 0);\n\t}\n}\n\n@keyframes spin3 {\n\t0% {\n\t\ttransform: scale(1);\n\t}\n\t100% {\n\t\ttransform: scale(0);\n\t}\n}\n","import { Component, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { Generic } from '@a11y-ui/core';\nimport { watchBoolean } from '../../utils/prop.validators';\nimport { translate } from '../../i18n';\n\n/**\n * API\n */\ntype RequiredProps = unknown;\ntype OptionalProps = {\n\tshow: boolean;\n};\nexport type Props = Generic.Element.Members<RequiredProps, OptionalProps>;\n\ntype RequiredStates = RequiredProps;\ntype OptionalStates = OptionalProps;\ntype States = Generic.Element.Members<RequiredStates, OptionalStates>;\n\n@Component({\n\ttag: 'kol-spin',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolSpin implements Generic.Element.ComponentApi<RequiredProps, OptionalProps, RequiredStates, OptionalStates> {\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t{this.state._show ? (\n\t\t\t\t\t<span aria-busy=\"true\" aria-label={translate('kol-action-running')} aria-live=\"polite\" class=\"spin\" role=\"alert\">\n\t\t\t\t\t\t<span class=\"bg-spin-1\"></span>\n\t\t\t\t\t\t<span class=\"bg-spin-2\"></span>\n\t\t\t\t\t\t<span class=\"bg-spin-3\"></span>\n\t\t\t\t\t\t<span class=\"bg-neutral\"></span>\n\t\t\t\t\t</span>\n\t\t\t\t) : (\n\t\t\t\t\tthis.showToggled && <span aria-label={translate('kol-action-done')} aria-busy=\"false\" aria-live=\"polite\" role=\"alert\"></span>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Gibt an, ob die Ladeanzeige eingeblendet wird oder nicht.\n\t */\n\t@Prop({ reflect: true }) public _show?: boolean = false;\n\n\t/**\n\t * @see: components/abbr/component.tsx (@State)\n\t */\n\t@State() public state: States = {};\n\n\tprivate showToggled = false;\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_show')\n\tpublic validateShow(value?: boolean): void {\n\t\tthis.showToggled = this.state._show === true && this._show === false;\n\t\twatchBoolean(this, '_show', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (componentWillLoad)\n\t */\n\tpublic componentWillLoad(): void {\n\t\tthis.validateShow(this._show);\n\t}\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{w as watchString}from"./prop.validators.js";import{a as translate}from"./i18n.js";const KolSymbol$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this._ariaLabel=void 0,this._symbol=void 0,this.state={_ariaLabel:translate("kol-warning"),_symbol:""}}render(){return h(Host,null,h("span",{"aria-label":this.state._ariaLabel,role:"term"},this.state._symbol))}validateAriaLabel(t){watchString(this,"_ariaLabel",t,{required:!0})}validateSymbol(t){watchString(this,"_symbol",t,{required:!0})}componentWillLoad(){this.validateAriaLabel(this._ariaLabel),this.validateSymbol(this._symbol)}static get watchers(){return{_ariaLabel:["validateAriaLabel"],_symbol:["validateSymbol"]}}},[0,"kol-symbol",{_ariaLabel:[1,"_aria-label"],_symbol:[1],state:[32]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-symbol"].forEach((t=>{if("kol-symbol"===t)customElements.get(t)||customElements.define(t,KolSymbol$1)}))}const KolSymbol=KolSymbol$1,defineCustomElement=defineCustomElement$1;export{KolSymbol,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{w as watchString}from"./prop.validators.js";import{a as translate}from"./i18n.js";const KolSymbol$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this._ariaLabel=void 0,this._symbol=void 0,this.state={_ariaLabel:translate("kol-warning"),_symbol:""}}render(){return h(Host,null,h("span",{"aria-label":this.state._ariaLabel,role:"term"},this.state._symbol))}validateAriaLabel(t){watchString(this,"_ariaLabel",t,{required:!0})}validateSymbol(t){watchString(this,"_symbol",t,{required:!0})}componentWillLoad(){this.validateAriaLabel(this._ariaLabel),this.validateSymbol(this._symbol)}static get watchers(){return{_ariaLabel:["validateAriaLabel"],_symbol:["validateSymbol"]}}},[0,"kol-symbol",{_ariaLabel:[1,"_aria-label"],_symbol:[1],state:[32]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-symbol"].forEach((t=>{if("kol-symbol"===t)customElements.get(t)||customElements.define(t,KolSymbol$1)}))}const KolSymbol=KolSymbol$1,defineCustomElement=defineCustomElement$1;export{KolSymbol,defineCustomElement};
@@ -1 +1 @@
1
- {"file":"kol-symbol.js","mappings":";;;;;;;MAwBaA,WAAS;;;;;;iBAwBW;MAC/B,UAAU,EAAE,SAAS,CAAC,aAAa,CAAC;MACpC,OAAO,EAAE,GAAG;KACZ;;EA1BM,MAAM;IACZ,QACC,EAAC,IAAI,QACJ,0BAAkB,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,IAAI,EAAC,MAAM,IAClD,IAAI,CAAC,KAAK,CAAC,OAAO,CACb,CACD,EACN;GACF;EAwBM,iBAAiB,CAAC,KAAc;IACtC,WAAW,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE;MACtC,QAAQ,EAAE,IAAI;KACd,CAAC,CAAC;GACH;EAMM,cAAc,CAAC,KAAc;IACnC,WAAW,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE;MACnC,QAAQ,EAAE,IAAI;KACd,CAAC,CAAC;GACH;EAKM,iBAAiB;IACvB,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACxC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;GAClC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolSymbol"],"sources":["./src/components/symbol/component.tsx"],"sourcesContent":["import { Component, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { Generic } from '@a11y-ui/core';\nimport { watchString } from '../../utils/prop.validators';\nimport { translate } from '../../i18n';\n\n/**\n * API\n */\ntype RequiredProps = {\n\tariaLabel: string;\n\tsymbol: string;\n};\ntype OptionalProps = unknown;\nexport type Props = Generic.Element.Members<RequiredProps, OptionalProps>;\n\ntype RequiredStates = RequiredProps;\ntype OptionalStates = OptionalProps;\ntype States = Generic.Element.Members<RequiredStates, OptionalStates>;\n\n@Component({\n\ttag: 'kol-symbol',\n\tshadow: false,\n})\nexport class KolSymbol implements Generic.Element.ComponentApi<RequiredProps, OptionalProps, RequiredStates, OptionalStates> {\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<span aria-label={this.state._ariaLabel} role=\"term\">\n\t\t\t\t\t{this.state._symbol}\n\t\t\t\t</span>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Gibt an, was der Screenreader ausgeben soll\n\t */\n\t@Prop() public _ariaLabel!: string;\n\n\t/**\n\t * Dieses Property gibt den String an der angezeigt werden soll.\n\t */\n\t@Prop() public _symbol!: string;\n\n\t/**\n\t * @see: components/abbr/component.tsx (@State)\n\t */\n\t@State() public state: States = {\n\t\t_ariaLabel: translate('kol-warning'),\n\t\t_symbol: '⚠',\n\t};\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_ariaLabel')\n\tpublic validateAriaLabel(value?: string): void {\n\t\twatchString(this, '_ariaLabel', value, {\n\t\t\trequired: true,\n\t\t});\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_symbol')\n\tpublic validateSymbol(value?: string): void {\n\t\twatchString(this, '_symbol', value, {\n\t\t\trequired: true,\n\t\t});\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (componentWillLoad)\n\t */\n\tpublic componentWillLoad(): void {\n\t\tthis.validateAriaLabel(this._ariaLabel);\n\t\tthis.validateSymbol(this._symbol);\n\t}\n}\n"],"version":3}
1
+ {"file":"kol-symbol.js","mappings":";;;;;;;MAwBaA,WAAS;;;;;;iBAwBW;MAC/B,UAAU,EAAE,SAAS,CAAC,aAAa,CAAC;MACpC,OAAO,EAAE,GAAG;KACZ;;EA1BM,MAAM;IACZ,QACC,EAAC,IAAI,QACJ,0BAAkB,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,IAAI,EAAC,MAAM,IAClD,IAAI,CAAC,KAAK,CAAC,OAAO,CACb,CACD,EACN;GACF;EAwBM,iBAAiB,CAAC,KAAc;IACtC,WAAW,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE;MACtC,QAAQ,EAAE,IAAI;KACd,CAAC,CAAC;GACH;EAMM,cAAc,CAAC,KAAc;IACnC,WAAW,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE;MACnC,QAAQ,EAAE,IAAI;KACd,CAAC,CAAC;GACH;EAKM,iBAAiB;IACvB,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACxC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;GAClC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolSymbol"],"sources":["./src/components/symbol/component.tsx"],"sourcesContent":["import { Component, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { Generic } from '@a11y-ui/core';\nimport { watchString } from '../../utils/prop.validators';\nimport { translate } from '../../i18n';\n\n/**\n * API\n */\ntype RequiredProps = {\n\tariaLabel: string;\n\tsymbol: string;\n};\ntype OptionalProps = unknown;\nexport type Props = Generic.Element.Members<RequiredProps, OptionalProps>;\n\ntype RequiredStates = RequiredProps;\ntype OptionalStates = OptionalProps;\ntype States = Generic.Element.Members<RequiredStates, OptionalStates>;\n\n@Component({\n\ttag: 'kol-symbol',\n\tshadow: false,\n})\nexport class KolSymbol implements Generic.Element.ComponentApi<RequiredProps, OptionalProps, RequiredStates, OptionalStates> {\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<span aria-label={this.state._ariaLabel} role=\"term\">\n\t\t\t\t\t{this.state._symbol}\n\t\t\t\t</span>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Gibt an, was der Screenreader ausgeben soll\n\t */\n\t@Prop() public _ariaLabel!: string;\n\n\t/**\n\t * Dieses Property gibt den String an der angezeigt werden soll.\n\t */\n\t@Prop() public _symbol!: string;\n\n\t/**\n\t * @see: components/abbr/component.tsx (@State)\n\t */\n\t@State() public state: States = {\n\t\t_ariaLabel: translate('kol-warning'),\n\t\t_symbol: '…', // required\n\t};\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_ariaLabel')\n\tpublic validateAriaLabel(value?: string): void {\n\t\twatchString(this, '_ariaLabel', value, {\n\t\t\trequired: true,\n\t\t});\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_symbol')\n\tpublic validateSymbol(value?: string): void {\n\t\twatchString(this, '_symbol', value, {\n\t\t\trequired: true,\n\t\t});\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (componentWillLoad)\n\t */\n\tpublic componentWillLoad(): void {\n\t\tthis.validateAriaLabel(this._ariaLabel);\n\t\tthis.validateSymbol(this._symbol);\n\t}\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{v as setState,w as watchString,O as emptyStringByArrayHandler,z as parseJson,b as watchValidator,y as objectObjectHandler}from"./prop.validators.js";import{a as translate}from"./i18n.js";import{d as defineCustomElement$c}from"./component5.js";import{d as defineCustomElement$2,a as defineCustomElement$9,b as defineCustomElement$b}from"./component.js";import{d as defineCustomElement$a}from"./shadow2.js";import{d as defineCustomElement$8}from"./component4.js";import{d as defineCustomElement$7}from"./component2.js";import{d as defineCustomElement$6}from"./component9.js";import{d as defineCustomElement$5}from"./component12.js";import{d as defineCustomElement$4}from"./component13.js";import{d as defineCustomElement$3}from"./component3.js";const defaultStyleCss=":host{--kolibri-border-color:#666;--kolibri-border-radius:0.125rem;--kolibri-border-width:1px;--kolibri-color-error:#f44336;--kolibri-color-info:#2196f3;--kolibri-color-success:#4caf50;--kolibri-color-warning:#ff9800;--kolibri-color-primary:#3f51b5;--kolibri-color-secondary:#ff4081;--kolibri-color-normal:#9e9e9e;--kolibri-color-danger:#f44336;--kolibri-color-ghost:#f5f5f5;--kolibri-color-disabled:#bdbdbd;--kolibri-color-text:#222222;--kolibri-color-visited:#9c27b0;--kolibri-font-family:Verdana, Arial, Tahoma, Helvetica, sans-serif;--kolibri-font-size:16px;--kolibri-spacing:0.25rem}:host{font-family:inherit;font-size:inherit}:host *{hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}:host{display:inline-block}a,button{background-color:transparent;border:none;font-size:inherit;margin:0;padding:0;transition-duration:0.5s;transition-property:background-color, color, border-color}:host{font-family:var(--kolibri-font-family);font-size:inherit}*{box-sizing:border-box}kol-icon{color:inherit}kol-span-wc{display:grid;gap:var(--kolibri-spacing);place-items:center}kol-span-wc>span{display:flex;gap:var(--kolibri-spacing);place-items:center}kol-span-wc>kol-icon,kol-span-wc>span>kol-icon{display:inline-grid;place-items:center;width:1em;height:1em}a,button,input,select,textarea{appearance:none;cursor:pointer}a.icon-only>kol-span-wc>span>span,button.icon-only>kol-span-wc>span>span{display:none}h1,h2,h3,h4,h5,h6{font-family:var(--kolibri-font-family);font-size:var(--kolibri-font-size);margin:0;padding:0}:host>div{overflow-x:auto;overflow-y:hidden}table{width:100%}th>div{display:grid;grid-template-columns:1fr auto;place-items:center;gap:0.25em}div.pagination{padding:0.5em}div.pagination,div.pagination>div:last-child{display:grid;place-items:center;gap:0.5em}@media (min-width: 1024px){div.pagination,div.pagination>div:last-child{grid-auto-flow:column}div.pagination kol-pagination{display:flex;gap:calc(4 * var(--kolibri-spacing))}}",PAGINATION_OPTIONS=[10,20,50,100],CELL_REFS=new Map,KolTable$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.horizontal=!0,this.sortDirections=new Map,this.showPagination=!1,this.pageStartSlice=0,this.pageEndSlice=10,this.setSortDirection=(t,e)=>{this.sortDirections.clear(),this.sortDirections.set(t,e),this.sortFunction=t},this.handlePagination={onClick:(t,e)=>{var i;"function"==typeof(null===(i=this.state._pagination._on)||void 0===i?void 0:i.onClick)&&this.state._pagination._on.onClick(t,e),setState(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:e}))},onChangePage:(t,e)=>{var i;"function"==typeof(null===(i=this.state._pagination._on)||void 0===i?void 0:i.onChangePage)&&this.state._pagination._on.onChangePage(t,e),setState(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:e}))},onChangePageSize:(t,e)=>{var i;"function"==typeof(null===(i=this.state._pagination._on)||void 0===i?void 0:i.onChangePageSize)&&this.state._pagination._on.onChangePageSize(t,e),setState(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_pageSize:e})),setState(this,"_pageSize",e)}},this.beforePatchPagination=(t,e,i,o)=>{"_pagination"===o&&(this.showPagination=!0===t||""===t||"object"==typeof t&&null!==t)},this.updateSortedData=()=>{let t=this.state._data;if("function"==typeof this.sortFunction)switch(this.sortDirections.get(this.sortFunction)){case"NOS":t=[...this.state._data];break;case"ASC":t=this.sortFunction([...this.state._data]);break;default:t=this.sortFunction([...this.state._data]).reverse()}setState(this,"_sortedData",t)},this._caption=void 0,this._data=void 0,this._headers=void 0,this._minWidth=void 0,this._pagination=void 0,this.state={_caption:"",_data:[],_headers:{horizontal:[],vertical:[]},_pagination:{_page:1,_pageSize:10,_total:0},_sortedData:[]}}validateCaption(t){watchString(this,"_caption",t,{required:!0})}validateData(t){emptyStringByArrayHandler(t,(()=>{objectObjectHandler(t,(()=>{void 0===t&&(t=[]);try{t=parseJson(t)}catch(t){}Array.isArray(t)&&void 0===t.find((t=>!("object"==typeof t&&null!==t)))&&setState(this,"_data",t,{afterPatch:()=>{const t=setTimeout((()=>{clearTimeout(t),this.updateSortedData()}))}})}))}))}validateHeaders(t){emptyStringByArrayHandler(t,(()=>{objectObjectHandler(t,(()=>{try{t=parseJson(t)}catch(t){}watchValidator(this,"_headers",(t=>"object"==typeof t&&null!==t),new Set(["KoliBriTableHeaders"]),t,{hooks:{beforePatch:t=>{var e,i;const o=t;null===(e=o.horizontal)||void 0===e||e.forEach((t=>{t.forEach((t=>{"function"==typeof t.sort&&"string"==typeof t.sortDirection&&this.setSortDirection(t.sort,t.sortDirection)}))})),null===(i=o.vertical)||void 0===i||i.forEach((t=>{t.forEach((t=>{"function"==typeof t.sort&&"string"==typeof t.sortDirection&&this.setSortDirection(t.sort,t.sortDirection)}))}))}}})}))}))}validateMinWidth(t){watchString(this,"_minWidth",t,{defaultValue:void 0})}validatePagination(t){try{t=parseJson(t)}catch(t){}watchValidator(this,"_pagination",(()=>!0),new Set(["boolean","KoliBriTablePagination"]),t,{hooks:{beforePatch:this.beforePatchPagination}})}componentWillLoad(){this.validateCaption(this._caption),this.validateData(this._data),this.validateHeaders(this._headers),this.validateMinWidth(this._minWidth),this.validatePagination(this._pagination)}getNumberOfCols(t,e){let i=0;return t.forEach((t=>{let e=0;t.forEach((t=>{var i;return e+=null!==(i=t.colSpan)&&void 0!==i?i:1})),i<e&&(i=e)})),0===i&&(i=e.length),i}getNumberOfRows(t,e){let i=0;return t.forEach((t=>{let e=0;t.forEach((t=>{var i;return e+=null!==(i=t.rowSpan)&&void 0!==i?i:1})),i<e&&(i=e)})),0===i&&(i=e.length),i}filterHeaderKeys(t){const e=[];return t.forEach((t=>{t.forEach((t=>{"string"==typeof t.key&&e.push(t)}))})),e}getPrimaryHeader(t){var e,i;let o=this.filterHeaderKeys(null!==(e=t.horizontal)&&void 0!==e?e:[]);return this.horizontal=!0,0===o.length&&(o=this.filterHeaderKeys(null!==(i=t.vertical)&&void 0!==i?i:[]),o.length>0&&(this.horizontal=!1)),o}createDataField(t,e){e.horizontal=Array.isArray(null==e?void 0:e.horizontal)?e.horizontal:[],e.vertical=Array.isArray(null==e?void 0:e.vertical)?e.vertical:[];const i=this.getPrimaryHeader(e),o=this.getNumberOfCols(e.horizontal,t),a=this.getNumberOfRows(e.vertical,t),n=[],s=[],r=[];e.vertical.forEach(((t,e)=>{s[e]=0,r[e]=[]}));for(let l=0;l<a;l++){const a=[];e.vertical.forEach(((t,e)=>{let i=0;if(r[e].forEach((t=>i+=t)),i<=l){const o=t[l-i+s[e]];if("object"==typeof o){a.push(Object.assign(Object.assign({},o),{asTd:!1,data:{}}));let t=1;if("number"==typeof o.rowSpan&&o.rowSpan>1&&(t=o.rowSpan),r[e].push(t),"number"==typeof o.colSpan&&o.colSpan>1)for(let i=1;i<o.colSpan;i++)r[e+i].push(t);s[e]++}}}));for(let e=0;e<o;e++)!0===this.horizontal?"object"==typeof i[e]&&null!==i[e]&&"string"==typeof i[e].key&&"object"==typeof t[l]&&null!==t[l]&&a.push(Object.assign(Object.assign({},i[e]),{colSpan:void 0,data:t[l],label:t[l][i[e].key],rowSpan:void 0})):"object"==typeof i[l]&&null!==i[l]&&"string"==typeof i[l].key&&"object"==typeof t[e]&&null!==t[e]&&a.push(Object.assign(Object.assign({},i[l]),{colSpan:void 0,data:t[e],label:t[e][i[l].key],rowSpan:void 0}));n.push(a)}if(0===t.length){let t=0,i=0;Array.isArray(e.horizontal)&&e.horizontal.length>0&&e.horizontal[0].forEach((e=>{t+=e.colSpan||1})),Array.isArray(e.vertical)&&e.vertical.length>0&&(t-=e.vertical.length,e.vertical[0].forEach((t=>{i+=t.rowSpan||1})));const o={colSpan:t,label:translate("kol-no-entries"),render:void 0,rowSpan:Math.max(i,1)};0===n.length?n.push([o]):n[0].push(o)}return n}selectDisplayedData(t,e,i){return"number"==typeof e&&e>0&&"number"==typeof i&&i>0?(this.pageStartSlice=e*(i-1),this.pageEndSlice=e*i>t.length?t.length:e*i,t.slice(this.pageStartSlice,this.pageEndSlice)):(this.pageStartSlice=0,this.pageEndSlice=t.length,t)}cellRender(t,e){e&&(clearTimeout(CELL_REFS.get(e)),CELL_REFS.set(e,setTimeout((()=>{if(clearTimeout(CELL_REFS.get(e)),"function"==typeof t.render){const i=t.render(e,{asTd:t.asTd,label:t.label,textAlign:t.textAlign,width:t.width},t.data,this.state._data);"string"==typeof i&&(e.innerHTML=i)}}))))}render(){var t,e;const i=this.selectDisplayedData(this.state._sortedData,this.showPagination?null!==(e=null===(t=this.state._pagination)||void 0===t?void 0:t._pageSize)&&void 0!==e?e:10:this.state._sortedData.length,this.state._pagination._page||1),o=this.createDataField(i,this.state._headers);return h(Host,null,h("div",{tabindex:"0"},h("table",{style:{minWidth:this.state._minWidth}},h("caption",null,this.state._caption),Array.isArray(this.state._headers.horizontal)&&h("thead",null,this.state._headers.horizontal.map(((t,e)=>h("tr",{key:`thead-${e}`},t.map(((t,i)=>!0===t.asTd?h("td",{key:`thead-${e}-${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,innerHTML:"function"!=typeof t.render?t.label:""}):h("th",{key:`thead-${e}-${i}-${t.label}`,scope:"number"==typeof t.colSpan&&t.colSpan>1?"colgroup":"col",colSpan:t.colSpan,rowSpan:t.rowSpan,style:{textAlign:t.textAlign,width:t.width},"aria-sort":"function"==typeof t.sort?t.sort!==this.sortFunction||"NOS"===this.sortDirections.get(t.sort)||void 0===this.sortDirections.get(t.sort)?"none":"ASC"===this.sortDirections.get(t.sort)?"ascending":"descending":void 0,"data-sort":`sort-${this.sortDirections.get(t.sort)}`},h("div",{class:"w-full flex gap-1 items-center"},h("div",{class:{"w-full":!0,[t.textAlign]:"string"==typeof t.textAlign&&t.textAlign.length>0},innerHTML:t.label,style:{textAlign:t.textAlign}}),"function"==typeof t.sort&&h("kol-button",{exportparts:"button,ghost",_ariaLabel:translate("kol-change-order",{placeholders:{colLabel:t.label}}),_icon:t.sort!==this.sortFunction||"NOS"===this.sortDirections.get(t.sort)||void 0===this.sortDirections.get(t.sort)?"fas fa-sort":"ASC"===this.sortDirections.get(t.sort)?"fas fa-sort-up":"fas fa-sort-down",_iconOnly:!0,_label:translate("kol-change-order",{placeholders:{colLabel:t.label}}),_on:{onClick:()=>{if("function"==typeof t.sort){switch(this.sortFunction=t.sort,this.sortDirections.get(this.sortFunction)){case"ASC":this.setSortDirection(this.sortFunction,"DESC");break;case"DESC":this.setSortDirection(this.sortFunction,"NOS");break;default:this.setSortDirection(this.sortFunction,"ASC")}this.updateSortedData()}}},_variant:"ghost"}))))))))),h("tbody",null,o.map(((t,e)=>h("tr",{key:`tbody-${e}`},t.map(((t,i)=>!1===t.asTd?h("th",{key:`tbody-${e}-${i}-${t.label}`,scope:"number"==typeof t.rowSpan&&t.rowSpan>1?"rowgroup":"row",colSpan:t.colSpan,rowSpan:t.rowSpan,style:{textAlign:t.textAlign,width:t.width},"aria-sort":"function"==typeof t.sort?t.sort!==this.sortFunction||"NOS"===this.sortDirections.get(t.sort)||void 0===this.sortDirections.get(t.sort)?"none":"ASC"===this.sortDirections.get(t.sort)?"ascending":"descending":void 0,"data-sort":`sort-${this.sortDirections.get(t.sort)}`},h("div",{class:"w-full flex gap-1 items-center"},h("div",{class:{"w-full":!0,[t.textAlign]:"string"==typeof t.textAlign&&t.textAlign.length>0},innerHTML:t.label,style:{textAlign:t.textAlign}}),"function"==typeof t.sort&&h("kol-button",{exportparts:"button,ghost",_ariaLabel:translate("kol-change-order",{placeholders:{colLabel:t.label}}),_icon:t.sort!==this.sortFunction||"NOS"===this.sortDirections.get(t.sort)||void 0===this.sortDirections.get(t.sort)?"fas fa-sort":"ASC"===this.sortDirections.get(t.sort)?"fas fa-sort-up":"fas fa-sort-down",_iconOnly:!0,_label:translate("kol-change-order",{placeholders:{colLabel:t.label}}),_on:{onClick:()=>{if("function"==typeof t.sort){switch(this.sortFunction=t.sort,this.sortDirections.get(this.sortFunction)){case"ASC":this.setSortDirection(this.sortFunction,"DESC");break;case"DESC":this.setSortDirection(this.sortFunction,"NOS");break;default:this.setSortDirection(this.sortFunction,"ASC")}this.updateSortedData()}}},_variant:"ghost"}))):h("td",{key:`tbody-${e}-${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,innerHTML:"function"!=typeof t.render?t.label:""}))))))))),this.pageEndSlice>0&&this.showPagination&&h("div",{class:"pagination"},h("span",null,"Einträge ",this.pageEndSlice>0?this.pageStartSlice+1:0," bis ",this.pageEndSlice," von"," ",this.state._pagination._total||(Array.isArray(this.state._data)?this.state._data.length:0)," angezeigt"),h("div",null,h("kol-pagination",{_boundaryCount:this.state._pagination._boundaryCount,_customClass:this.state._pagination._customClass,_on:this.handlePagination,_page:this.state._pagination._page,_pageSize:this.state._pagination._pageSize,_pageSizeOptions:this.state._pagination._pageSizeOptions||PAGINATION_OPTIONS,_siblingCount:this.state._pagination._siblingCount,_tooltipAlign:"bottom",_total:this.state._pagination._total||this.state._data.length}))))}static get watchers(){return{_caption:["validateCaption"],_data:["validateData"],_headers:["validateHeaders"],_minWidth:["validateMinWidth"],_pagination:["validatePagination"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-table",{_caption:[1],_data:[1],_headers:[1],_minWidth:[1,"_min-width"],_pagination:[8],state:[32]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-table","kol-alert","kol-badge","kol-button","kol-button-wc","kol-heading-wc","kol-icon","kol-input","kol-pagination","kol-select","kol-span-wc","kol-tooltip"].forEach((t=>{switch(t){case"kol-table":customElements.get(t)||customElements.define(t,KolTable$1);break;case"kol-alert":customElements.get(t)||defineCustomElement$c();break;case"kol-badge":customElements.get(t)||defineCustomElement$b();break;case"kol-button":customElements.get(t)||defineCustomElement$a();break;case"kol-button-wc":customElements.get(t)||defineCustomElement$9();break;case"kol-heading-wc":customElements.get(t)||defineCustomElement$8();break;case"kol-icon":customElements.get(t)||defineCustomElement$7();break;case"kol-input":customElements.get(t)||defineCustomElement$6();break;case"kol-pagination":customElements.get(t)||defineCustomElement$5();break;case"kol-select":customElements.get(t)||defineCustomElement$4();break;case"kol-span-wc":customElements.get(t)||defineCustomElement$3();break;case"kol-tooltip":customElements.get(t)||defineCustomElement$2()}}))}const KolTable=KolTable$1,defineCustomElement=defineCustomElement$1;export{KolTable,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{v as setState,w as watchString,O as emptyStringByArrayHandler,z as parseJson,b as watchValidator,y as objectObjectHandler}from"./prop.validators.js";import{a as translate}from"./i18n.js";import{d as defineCustomElement$c}from"./component5.js";import{d as defineCustomElement$2,a as defineCustomElement$9,b as defineCustomElement$b}from"./component.js";import{d as defineCustomElement$a}from"./shadow2.js";import{d as defineCustomElement$8}from"./component4.js";import{d as defineCustomElement$7}from"./component2.js";import{d as defineCustomElement$6}from"./component9.js";import{d as defineCustomElement$5}from"./component12.js";import{d as defineCustomElement$4}from"./component13.js";import{d as defineCustomElement$3}from"./component3.js";const defaultStyleCss=":host{--kolibri-border-color:#666;--kolibri-border-radius:0.125rem;--kolibri-border-width:1px;--kolibri-color-black:#000;--kolibri-color-white:#fff;--kolibri-color-error:#f44336;--kolibri-color-info:#2196f3;--kolibri-color-success:#4caf50;--kolibri-color-warning:#ff9800;--kolibri-color-primary:#3f51b5;--kolibri-color-secondary:#ff4081;--kolibri-color-normal:#9e9e9e;--kolibri-color-danger:#f44336;--kolibri-color-ghost:#f5f5f5;--kolibri-color-disabled:#bdbdbd;--kolibri-color-text:#222222;--kolibri-color-visited:#9c27b0;--kolibri-font-family:Verdana, Arial, Tahoma, Helvetica, sans-serif;--kolibri-font-size:16px;--kolibri-spacing:0.25rem}:host *{hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}:host{display:inline-flex}a,button{background-color:transparent;border:none;font-size:inherit;margin:0;padding:0;transition-duration:0.5s;transition-property:background-color, color, border-color;width:100%}kol-icon.external-link-icon{display:inline-flex}:host{font-family:var(--kolibri-font-family);font-size:var(--kolibri-font-size)}*{box-sizing:border-box}kol-span-wc{display:grid;gap:var(--kolibri-spacing);place-items:center}kol-span-wc>span{display:flex;gap:var(--kolibri-spacing);place-items:center}kol-span-wc kol-icon{display:contents;padding:0 var(--kolibri-spacing)}a,button,input,select,textarea{appearance:none;cursor:pointer;font-family:var(--kolibri-font-family)}.icon-only>kol-span-wc>span>span{display:none}:host{max-width:100%}:host>div{overflow-x:auto;overflow-y:hidden}table{width:100%}th>div{display:grid;grid-template-columns:1fr auto;place-items:center;gap:0.25em}div.pagination{padding:0.5em}div.pagination,div.pagination>div:last-child{display:grid;place-items:center;gap:0.5em}@media (min-width: 1024px){div.pagination,div.pagination>div:last-child{grid-auto-flow:column}div.pagination kol-pagination{display:flex;gap:calc(4 * var(--kolibri-spacing))}}",PAGINATION_OPTIONS=[10,20,50,100],CELL_REFS=new Map,KolTable$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.horizontal=!0,this.sortDirections=new Map,this.showPagination=!1,this.pageStartSlice=0,this.pageEndSlice=10,this.setSortDirection=(t,e)=>{this.sortDirections.clear(),this.sortDirections.set(t,e),this.sortFunction=t},this.handlePagination={onClick:(t,e)=>{var i;"function"==typeof(null===(i=this.state._pagination._on)||void 0===i?void 0:i.onClick)&&this.state._pagination._on.onClick(t,e),setState(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:e}))},onChangePage:(t,e)=>{var i;"function"==typeof(null===(i=this.state._pagination._on)||void 0===i?void 0:i.onChangePage)&&this.state._pagination._on.onChangePage(t,e),setState(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:e}))},onChangePageSize:(t,e)=>{var i;"function"==typeof(null===(i=this.state._pagination._on)||void 0===i?void 0:i.onChangePageSize)&&this.state._pagination._on.onChangePageSize(t,e),setState(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_pageSize:e})),setState(this,"_pageSize",e)}},this.beforePatchPagination=(t,e,i,o)=>{"_pagination"===o&&(this.showPagination=!0===t||""===t||"object"==typeof t&&null!==t)},this.updateSortedData=()=>{let t=this.state._data;if("function"==typeof this.sortFunction)switch(this.sortDirections.get(this.sortFunction)){case"NOS":t=[...this.state._data];break;case"ASC":t=this.sortFunction([...this.state._data]);break;default:t=this.sortFunction([...this.state._data]).reverse()}setState(this,"_sortedData",t)},this._caption=void 0,this._data=void 0,this._headers=void 0,this._minWidth=void 0,this._pagination=void 0,this.state={_caption:"…",_data:[],_headers:{horizontal:[],vertical:[]},_pagination:{_page:1,_pageSize:10,_total:0},_sortedData:[]}}validateCaption(t){watchString(this,"_caption",t,{required:!0})}validateData(t){emptyStringByArrayHandler(t,(()=>{objectObjectHandler(t,(()=>{void 0===t&&(t=[]);try{t=parseJson(t)}catch(t){}Array.isArray(t)&&void 0===t.find((t=>!("object"==typeof t&&null!==t)))&&setState(this,"_data",t,{afterPatch:()=>{const t=setTimeout((()=>{clearTimeout(t),this.updateSortedData()}))}})}))}))}validateHeaders(t){emptyStringByArrayHandler(t,(()=>{objectObjectHandler(t,(()=>{try{t=parseJson(t)}catch(t){}watchValidator(this,"_headers",(t=>"object"==typeof t&&null!==t),new Set(["KoliBriTableHeaders"]),t,{hooks:{beforePatch:t=>{var e,i;const o=t;null===(e=o.horizontal)||void 0===e||e.forEach((t=>{t.forEach((t=>{"function"==typeof t.sort&&"string"==typeof t.sortDirection&&this.setSortDirection(t.sort,t.sortDirection)}))})),null===(i=o.vertical)||void 0===i||i.forEach((t=>{t.forEach((t=>{"function"==typeof t.sort&&"string"==typeof t.sortDirection&&this.setSortDirection(t.sort,t.sortDirection)}))}))}}})}))}))}validateMinWidth(t){watchString(this,"_minWidth",t,{defaultValue:void 0})}validatePagination(t){try{t=parseJson(t)}catch(t){}watchValidator(this,"_pagination",(()=>!0),new Set(["boolean","KoliBriTablePagination"]),t,{hooks:{beforePatch:this.beforePatchPagination}})}componentWillLoad(){this.validateCaption(this._caption),this.validateData(this._data),this.validateHeaders(this._headers),this.validateMinWidth(this._minWidth),this.validatePagination(this._pagination)}getNumberOfCols(t,e){let i=0;return t.forEach((t=>{let e=0;t.forEach((t=>{var i;return e+=null!==(i=t.colSpan)&&void 0!==i?i:1})),i<e&&(i=e)})),0===i&&(i=e.length),i}getNumberOfRows(t,e){let i=0;return t.forEach((t=>{let e=0;t.forEach((t=>{var i;return e+=null!==(i=t.rowSpan)&&void 0!==i?i:1})),i<e&&(i=e)})),0===i&&(i=e.length),i}filterHeaderKeys(t){const e=[];return t.forEach((t=>{t.forEach((t=>{"string"==typeof t.key&&e.push(t)}))})),e}getPrimaryHeader(t){var e,i;let o=this.filterHeaderKeys(null!==(e=t.horizontal)&&void 0!==e?e:[]);return this.horizontal=!0,0===o.length&&(o=this.filterHeaderKeys(null!==(i=t.vertical)&&void 0!==i?i:[]),o.length>0&&(this.horizontal=!1)),o}createDataField(t,e){e.horizontal=Array.isArray(null==e?void 0:e.horizontal)?e.horizontal:[],e.vertical=Array.isArray(null==e?void 0:e.vertical)?e.vertical:[];const i=this.getPrimaryHeader(e),o=this.getNumberOfCols(e.horizontal,t),a=this.getNumberOfRows(e.vertical,t),n=[],s=[],r=[];e.vertical.forEach(((t,e)=>{s[e]=0,r[e]=[]}));for(let l=0;l<a;l++){const a=[];e.vertical.forEach(((t,e)=>{let i=0;if(r[e].forEach((t=>i+=t)),i<=l){const o=t[l-i+s[e]];if("object"==typeof o){a.push(Object.assign(Object.assign({},o),{asTd:!1,data:{}}));let t=1;if("number"==typeof o.rowSpan&&o.rowSpan>1&&(t=o.rowSpan),r[e].push(t),"number"==typeof o.colSpan&&o.colSpan>1)for(let i=1;i<o.colSpan;i++)r[e+i].push(t);s[e]++}}}));for(let e=0;e<o;e++)!0===this.horizontal?"object"==typeof i[e]&&null!==i[e]&&"string"==typeof i[e].key&&"object"==typeof t[l]&&null!==t[l]&&a.push(Object.assign(Object.assign({},i[e]),{colSpan:void 0,data:t[l],label:t[l][i[e].key],rowSpan:void 0})):"object"==typeof i[l]&&null!==i[l]&&"string"==typeof i[l].key&&"object"==typeof t[e]&&null!==t[e]&&a.push(Object.assign(Object.assign({},i[l]),{colSpan:void 0,data:t[e],label:t[e][i[l].key],rowSpan:void 0}));n.push(a)}if(0===t.length){let t=0,i=0;Array.isArray(e.horizontal)&&e.horizontal.length>0&&e.horizontal[0].forEach((e=>{t+=e.colSpan||1})),Array.isArray(e.vertical)&&e.vertical.length>0&&(t-=e.vertical.length,e.vertical[0].forEach((t=>{i+=t.rowSpan||1})));const o={colSpan:t,label:translate("kol-no-entries"),render:void 0,rowSpan:Math.max(i,1)};0===n.length?n.push([o]):n[0].push(o)}return n}selectDisplayedData(t,e,i){return"number"==typeof e&&e>0&&"number"==typeof i&&i>0?(this.pageStartSlice=e*(i-1),this.pageEndSlice=e*i>t.length?t.length:e*i,t.slice(this.pageStartSlice,this.pageEndSlice)):(this.pageStartSlice=0,this.pageEndSlice=t.length,t)}cellRender(t,e){e&&(clearTimeout(CELL_REFS.get(e)),CELL_REFS.set(e,setTimeout((()=>{if(clearTimeout(CELL_REFS.get(e)),"function"==typeof t.render){const i=t.render(e,{asTd:t.asTd,label:t.label,textAlign:t.textAlign,width:t.width},t.data,this.state._data);"string"==typeof i&&(e.innerHTML=i)}}))))}render(){var t,e;const i=this.selectDisplayedData(this.state._sortedData,this.showPagination?null!==(e=null===(t=this.state._pagination)||void 0===t?void 0:t._pageSize)&&void 0!==e?e:10:this.state._sortedData.length,this.state._pagination._page||1),o=this.createDataField(i,this.state._headers);return h(Host,null,h("div",{tabindex:"0"},h("table",{style:{minWidth:this.state._minWidth}},h("caption",null,this.state._caption),Array.isArray(this.state._headers.horizontal)&&h("thead",null,this.state._headers.horizontal.map(((t,e)=>h("tr",{key:`thead-${e}`},t.map(((t,i)=>!0===t.asTd?h("td",{key:`thead-${e}-${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,innerHTML:"function"!=typeof t.render?t.label:""}):h("th",{key:`thead-${e}-${i}-${t.label}`,scope:"number"==typeof t.colSpan&&t.colSpan>1?"colgroup":"col",colSpan:t.colSpan,rowSpan:t.rowSpan,style:{textAlign:t.textAlign,width:t.width},"aria-sort":"function"==typeof t.sort?t.sort!==this.sortFunction||"NOS"===this.sortDirections.get(t.sort)||void 0===this.sortDirections.get(t.sort)?"none":"ASC"===this.sortDirections.get(t.sort)?"ascending":"descending":void 0,"data-sort":`sort-${this.sortDirections.get(t.sort)}`},h("div",{class:"w-full flex gap-1 items-center"},h("div",{class:{"w-full":!0,[t.textAlign]:"string"==typeof t.textAlign&&t.textAlign.length>0},innerHTML:t.label,style:{textAlign:t.textAlign}}),"function"==typeof t.sort&&h("kol-button",{exportparts:"button,ghost",_ariaLabel:translate("kol-change-order",{placeholders:{colLabel:t.label}}),_icon:t.sort!==this.sortFunction||"NOS"===this.sortDirections.get(t.sort)||void 0===this.sortDirections.get(t.sort)?"codicon codicon-fold":"ASC"===this.sortDirections.get(t.sort)?"codicon codicon-chevron-up":"codicon codicon-chevron-down",_iconOnly:!0,_label:translate("kol-change-order",{placeholders:{colLabel:t.label}}),_on:{onClick:()=>{if("function"==typeof t.sort){switch(this.sortFunction=t.sort,this.sortDirections.get(this.sortFunction)){case"ASC":this.setSortDirection(this.sortFunction,"DESC");break;case"DESC":this.setSortDirection(this.sortFunction,"NOS");break;default:this.setSortDirection(this.sortFunction,"ASC")}this.updateSortedData()}}},_variant:"ghost"}))))))))),h("tbody",null,o.map(((t,e)=>h("tr",{key:`tbody-${e}`},t.map(((t,i)=>!1===t.asTd?h("th",{key:`tbody-${e}-${i}-${t.label}`,scope:"number"==typeof t.rowSpan&&t.rowSpan>1?"rowgroup":"row",colSpan:t.colSpan,rowSpan:t.rowSpan,style:{textAlign:t.textAlign,width:t.width},"aria-sort":"function"==typeof t.sort?t.sort!==this.sortFunction||"NOS"===this.sortDirections.get(t.sort)||void 0===this.sortDirections.get(t.sort)?"none":"ASC"===this.sortDirections.get(t.sort)?"ascending":"descending":void 0,"data-sort":`sort-${this.sortDirections.get(t.sort)}`},h("div",{class:"w-full flex gap-1 items-center"},h("div",{class:{"w-full":!0,[t.textAlign]:"string"==typeof t.textAlign&&t.textAlign.length>0},innerHTML:t.label,style:{textAlign:t.textAlign}}),"function"==typeof t.sort&&h("kol-button",{exportparts:"button,ghost",_ariaLabel:translate("kol-change-order",{placeholders:{colLabel:t.label}}),_icon:t.sort!==this.sortFunction||"NOS"===this.sortDirections.get(t.sort)||void 0===this.sortDirections.get(t.sort)?"codicon codicon-fold":"ASC"===this.sortDirections.get(t.sort)?"codicon codicon-chevron-up":"codicon codicon-chevron-down",_iconOnly:!0,_label:translate("kol-change-order",{placeholders:{colLabel:t.label}}),_on:{onClick:()=>{if("function"==typeof t.sort){switch(this.sortFunction=t.sort,this.sortDirections.get(this.sortFunction)){case"ASC":this.setSortDirection(this.sortFunction,"DESC");break;case"DESC":this.setSortDirection(this.sortFunction,"NOS");break;default:this.setSortDirection(this.sortFunction,"ASC")}this.updateSortedData()}}},_variant:"ghost"}))):h("td",{key:`tbody-${e}-${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,innerHTML:"function"!=typeof t.render?t.label:""}))))))))),this.pageEndSlice>0&&this.showPagination&&h("div",{class:"pagination"},h("span",null,"Einträge ",this.pageEndSlice>0?this.pageStartSlice+1:0," bis ",this.pageEndSlice," von"," ",this.state._pagination._total||(Array.isArray(this.state._data)?this.state._data.length:0)," angezeigt"),h("div",null,h("kol-pagination",{_boundaryCount:this.state._pagination._boundaryCount,_customClass:this.state._pagination._customClass,_on:this.handlePagination,_page:this.state._pagination._page,_pageSize:this.state._pagination._pageSize,_pageSizeOptions:this.state._pagination._pageSizeOptions||PAGINATION_OPTIONS,_siblingCount:this.state._pagination._siblingCount,_tooltipAlign:"bottom",_total:this.state._pagination._total||this.state._data.length}))))}static get watchers(){return{_caption:["validateCaption"],_data:["validateData"],_headers:["validateHeaders"],_minWidth:["validateMinWidth"],_pagination:["validatePagination"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-table",{_caption:[1],_data:[1],_headers:[1],_minWidth:[1,"_min-width"],_pagination:[8],state:[32]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-table","kol-alert","kol-badge","kol-button","kol-button-wc","kol-heading-wc","kol-icon","kol-input","kol-pagination","kol-select","kol-span-wc","kol-tooltip"].forEach((t=>{switch(t){case"kol-table":customElements.get(t)||customElements.define(t,KolTable$1);break;case"kol-alert":customElements.get(t)||defineCustomElement$c();break;case"kol-badge":customElements.get(t)||defineCustomElement$b();break;case"kol-button":customElements.get(t)||defineCustomElement$a();break;case"kol-button-wc":customElements.get(t)||defineCustomElement$9();break;case"kol-heading-wc":customElements.get(t)||defineCustomElement$8();break;case"kol-icon":customElements.get(t)||defineCustomElement$7();break;case"kol-input":customElements.get(t)||defineCustomElement$6();break;case"kol-pagination":customElements.get(t)||defineCustomElement$5();break;case"kol-select":customElements.get(t)||defineCustomElement$4();break;case"kol-span-wc":customElements.get(t)||defineCustomElement$3();break;case"kol-tooltip":customElements.get(t)||defineCustomElement$2()}}))}const KolTable=KolTable$1,defineCustomElement=defineCustomElement$1;export{KolTable,defineCustomElement};