@public-ui/components 1.4.0 → 1.4.1-rc.1

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 (330) hide show
  1. package/cheat-sheet.html +6 -6
  2. package/custom-elements.json +1 -1
  3. package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
  4. package/dist/cjs/kol-abbr.cjs.entry.js.map +1 -1
  5. package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
  6. package/dist/cjs/kol-accordion.cjs.entry.js.map +1 -1
  7. package/dist/cjs/kol-alert.cjs.entry.js +1 -1
  8. package/dist/cjs/kol-alert.cjs.entry.js.map +1 -1
  9. package/dist/cjs/kol-badge.cjs.entry.js +1 -1
  10. package/dist/cjs/kol-badge.cjs.entry.js.map +1 -1
  11. package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
  12. package/dist/cjs/kol-breadcrumb.cjs.entry.js.map +1 -1
  13. package/dist/cjs/kol-button-group.cjs.entry.js +1 -1
  14. package/dist/cjs/kol-button-group.cjs.entry.js.map +1 -1
  15. package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
  16. package/dist/cjs/kol-button-link.cjs.entry.js.map +1 -1
  17. package/dist/cjs/kol-button.cjs.entry.js +1 -1
  18. package/dist/cjs/kol-button.cjs.entry.js.map +1 -1
  19. package/dist/cjs/kol-card.cjs.entry.js +1 -1
  20. package/dist/cjs/kol-card.cjs.entry.js.map +1 -1
  21. package/dist/cjs/kol-details.cjs.entry.js +1 -1
  22. package/dist/cjs/kol-details.cjs.entry.js.map +1 -1
  23. package/dist/cjs/kol-heading.cjs.entry.js +1 -1
  24. package/dist/cjs/kol-heading.cjs.entry.js.map +1 -1
  25. package/dist/cjs/kol-indented-text.cjs.entry.js +1 -1
  26. package/dist/cjs/kol-indented-text.cjs.entry.js.map +1 -1
  27. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  28. package/dist/cjs/kol-input-checkbox.cjs.entry.js.map +1 -1
  29. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  30. package/dist/cjs/kol-input-color.cjs.entry.js.map +1 -1
  31. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  32. package/dist/cjs/kol-input-date.cjs.entry.js.map +1 -1
  33. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  34. package/dist/cjs/kol-input-email.cjs.entry.js.map +1 -1
  35. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  36. package/dist/cjs/kol-input-file.cjs.entry.js.map +1 -1
  37. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  38. package/dist/cjs/kol-input-number.cjs.entry.js.map +1 -1
  39. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  40. package/dist/cjs/kol-input-password.cjs.entry.js.map +1 -1
  41. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  42. package/dist/cjs/kol-input-radio.cjs.entry.js.map +1 -1
  43. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  44. package/dist/cjs/kol-input-range.cjs.entry.js.map +1 -1
  45. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  46. package/dist/cjs/kol-input-text.cjs.entry.js.map +1 -1
  47. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  48. package/dist/cjs/kol-kolibri.cjs.entry.js.map +1 -1
  49. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  50. package/dist/cjs/kol-link-button.cjs.entry.js.map +1 -1
  51. package/dist/cjs/kol-link-group.cjs.entry.js +1 -1
  52. package/dist/cjs/kol-link-group.cjs.entry.js.map +1 -1
  53. package/dist/cjs/kol-link.cjs.entry.js +1 -1
  54. package/dist/cjs/kol-link.cjs.entry.js.map +1 -1
  55. package/dist/cjs/kol-logo.cjs.entry.js +1 -1
  56. package/dist/cjs/kol-logo.cjs.entry.js.map +1 -1
  57. package/dist/cjs/kol-modal.cjs.entry.js +1 -1
  58. package/dist/cjs/kol-modal.cjs.entry.js.map +1 -1
  59. package/dist/cjs/kol-nav.cjs.entry.js +1 -1
  60. package/dist/cjs/kol-nav.cjs.entry.js.map +1 -1
  61. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  62. package/dist/cjs/kol-pagination.cjs.entry.js.map +1 -1
  63. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  64. package/dist/cjs/kol-progress.cjs.entry.js.map +1 -1
  65. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  66. package/dist/cjs/kol-select.cjs.entry.js.map +1 -1
  67. package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
  68. package/dist/cjs/kol-skip-nav.cjs.entry.js.map +1 -1
  69. package/dist/cjs/kol-span.cjs.entry.js +1 -1
  70. package/dist/cjs/kol-span.cjs.entry.js.map +1 -1
  71. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  72. package/dist/cjs/kol-spin.cjs.entry.js.map +1 -1
  73. package/dist/cjs/kol-table.cjs.entry.js +1 -1
  74. package/dist/cjs/kol-table.cjs.entry.js.map +1 -1
  75. package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
  76. package/dist/cjs/kol-tabs.cjs.entry.js.map +1 -1
  77. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  78. package/dist/cjs/kol-textarea.cjs.entry.js.map +1 -1
  79. package/dist/cjs/kol-toast.cjs.entry.js +1 -1
  80. package/dist/cjs/kol-toast.cjs.entry.js.map +1 -1
  81. package/dist/cjs/kol-tooltip.cjs.entry.js +1 -1
  82. package/dist/cjs/kol-tooltip.cjs.entry.js.map +1 -1
  83. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  84. package/dist/cjs/kol-version.cjs.entry.js.map +1 -1
  85. package/dist/components/component.js +1 -1
  86. package/dist/components/component.js.map +1 -1
  87. package/dist/components/component10.js +1 -1
  88. package/dist/components/component10.js.map +1 -1
  89. package/dist/components/component11.js +1 -1
  90. package/dist/components/component11.js.map +1 -1
  91. package/dist/components/component12.js +1 -1
  92. package/dist/components/component12.js.map +1 -1
  93. package/dist/components/component13.js +1 -1
  94. package/dist/components/component13.js.map +1 -1
  95. package/dist/components/component5.js +1 -1
  96. package/dist/components/component5.js.map +1 -1
  97. package/dist/components/component8.js +1 -1
  98. package/dist/components/component8.js.map +1 -1
  99. package/dist/components/kol-abbr.js +1 -1
  100. package/dist/components/kol-abbr.js.map +1 -1
  101. package/dist/components/kol-accordion.js +1 -1
  102. package/dist/components/kol-accordion.js.map +1 -1
  103. package/dist/components/kol-breadcrumb.js +1 -1
  104. package/dist/components/kol-breadcrumb.js.map +1 -1
  105. package/dist/components/kol-button-group.js +1 -1
  106. package/dist/components/kol-button-group.js.map +1 -1
  107. package/dist/components/kol-button-link.js +1 -1
  108. package/dist/components/kol-button-link.js.map +1 -1
  109. package/dist/components/kol-card.js +1 -1
  110. package/dist/components/kol-card.js.map +1 -1
  111. package/dist/components/kol-details.js +1 -1
  112. package/dist/components/kol-details.js.map +1 -1
  113. package/dist/components/kol-heading.js +1 -1
  114. package/dist/components/kol-heading.js.map +1 -1
  115. package/dist/components/kol-input-checkbox.js +1 -1
  116. package/dist/components/kol-input-checkbox.js.map +1 -1
  117. package/dist/components/kol-input-color.js +1 -1
  118. package/dist/components/kol-input-color.js.map +1 -1
  119. package/dist/components/kol-input-date.js +1 -1
  120. package/dist/components/kol-input-date.js.map +1 -1
  121. package/dist/components/kol-input-email.js +1 -1
  122. package/dist/components/kol-input-email.js.map +1 -1
  123. package/dist/components/kol-input-file.js +1 -1
  124. package/dist/components/kol-input-file.js.map +1 -1
  125. package/dist/components/kol-input-password.js +1 -1
  126. package/dist/components/kol-input-password.js.map +1 -1
  127. package/dist/components/kol-input-range.js +1 -1
  128. package/dist/components/kol-input-range.js.map +1 -1
  129. package/dist/components/kol-input-text.js +1 -1
  130. package/dist/components/kol-input-text.js.map +1 -1
  131. package/dist/components/kol-kolibri.js +1 -1
  132. package/dist/components/kol-kolibri.js.map +1 -1
  133. package/dist/components/kol-link-button.js +1 -1
  134. package/dist/components/kol-link-button.js.map +1 -1
  135. package/dist/components/kol-link-group.js +1 -1
  136. package/dist/components/kol-link-group.js.map +1 -1
  137. package/dist/components/kol-logo.js +1 -1
  138. package/dist/components/kol-logo.js.map +1 -1
  139. package/dist/components/kol-modal.js +1 -1
  140. package/dist/components/kol-modal.js.map +1 -1
  141. package/dist/components/kol-nav.js +1 -1
  142. package/dist/components/kol-nav.js.map +1 -1
  143. package/dist/components/kol-progress.js +1 -1
  144. package/dist/components/kol-progress.js.map +1 -1
  145. package/dist/components/kol-skip-nav.js +1 -1
  146. package/dist/components/kol-skip-nav.js.map +1 -1
  147. package/dist/components/kol-span.js +1 -1
  148. package/dist/components/kol-span.js.map +1 -1
  149. package/dist/components/kol-spin.js +1 -1
  150. package/dist/components/kol-spin.js.map +1 -1
  151. package/dist/components/kol-table.js +1 -1
  152. package/dist/components/kol-table.js.map +1 -1
  153. package/dist/components/kol-tabs.js +1 -1
  154. package/dist/components/kol-tabs.js.map +1 -1
  155. package/dist/components/kol-textarea.js +1 -1
  156. package/dist/components/kol-textarea.js.map +1 -1
  157. package/dist/components/kol-toast.js +1 -1
  158. package/dist/components/kol-toast.js.map +1 -1
  159. package/dist/components/kol-version.js +1 -1
  160. package/dist/components/kol-version.js.map +1 -1
  161. package/dist/components/shadow.js +1 -1
  162. package/dist/components/shadow.js.map +1 -1
  163. package/dist/components/shadow2.js +1 -1
  164. package/dist/components/shadow2.js.map +1 -1
  165. package/dist/esm/kol-abbr.entry.js +1 -1
  166. package/dist/esm/kol-abbr.entry.js.map +1 -1
  167. package/dist/esm/kol-accordion.entry.js +1 -1
  168. package/dist/esm/kol-accordion.entry.js.map +1 -1
  169. package/dist/esm/kol-alert.entry.js +1 -1
  170. package/dist/esm/kol-alert.entry.js.map +1 -1
  171. package/dist/esm/kol-badge.entry.js +1 -1
  172. package/dist/esm/kol-badge.entry.js.map +1 -1
  173. package/dist/esm/kol-breadcrumb.entry.js +1 -1
  174. package/dist/esm/kol-breadcrumb.entry.js.map +1 -1
  175. package/dist/esm/kol-button-group.entry.js +1 -1
  176. package/dist/esm/kol-button-group.entry.js.map +1 -1
  177. package/dist/esm/kol-button-link.entry.js +1 -1
  178. package/dist/esm/kol-button-link.entry.js.map +1 -1
  179. package/dist/esm/kol-button.entry.js +1 -1
  180. package/dist/esm/kol-button.entry.js.map +1 -1
  181. package/dist/esm/kol-card.entry.js +1 -1
  182. package/dist/esm/kol-card.entry.js.map +1 -1
  183. package/dist/esm/kol-details.entry.js +1 -1
  184. package/dist/esm/kol-details.entry.js.map +1 -1
  185. package/dist/esm/kol-heading.entry.js +1 -1
  186. package/dist/esm/kol-heading.entry.js.map +1 -1
  187. package/dist/esm/kol-indented-text.entry.js +1 -1
  188. package/dist/esm/kol-indented-text.entry.js.map +1 -1
  189. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  190. package/dist/esm/kol-input-checkbox.entry.js.map +1 -1
  191. package/dist/esm/kol-input-color.entry.js +1 -1
  192. package/dist/esm/kol-input-color.entry.js.map +1 -1
  193. package/dist/esm/kol-input-date.entry.js +1 -1
  194. package/dist/esm/kol-input-date.entry.js.map +1 -1
  195. package/dist/esm/kol-input-email.entry.js +1 -1
  196. package/dist/esm/kol-input-email.entry.js.map +1 -1
  197. package/dist/esm/kol-input-file.entry.js +1 -1
  198. package/dist/esm/kol-input-file.entry.js.map +1 -1
  199. package/dist/esm/kol-input-number.entry.js +1 -1
  200. package/dist/esm/kol-input-number.entry.js.map +1 -1
  201. package/dist/esm/kol-input-password.entry.js +1 -1
  202. package/dist/esm/kol-input-password.entry.js.map +1 -1
  203. package/dist/esm/kol-input-radio.entry.js +1 -1
  204. package/dist/esm/kol-input-radio.entry.js.map +1 -1
  205. package/dist/esm/kol-input-range.entry.js +1 -1
  206. package/dist/esm/kol-input-range.entry.js.map +1 -1
  207. package/dist/esm/kol-input-text.entry.js +1 -1
  208. package/dist/esm/kol-input-text.entry.js.map +1 -1
  209. package/dist/esm/kol-kolibri.entry.js +1 -1
  210. package/dist/esm/kol-kolibri.entry.js.map +1 -1
  211. package/dist/esm/kol-link-button.entry.js +1 -1
  212. package/dist/esm/kol-link-button.entry.js.map +1 -1
  213. package/dist/esm/kol-link-group.entry.js +1 -1
  214. package/dist/esm/kol-link-group.entry.js.map +1 -1
  215. package/dist/esm/kol-link.entry.js +1 -1
  216. package/dist/esm/kol-link.entry.js.map +1 -1
  217. package/dist/esm/kol-logo.entry.js +1 -1
  218. package/dist/esm/kol-logo.entry.js.map +1 -1
  219. package/dist/esm/kol-modal.entry.js +1 -1
  220. package/dist/esm/kol-modal.entry.js.map +1 -1
  221. package/dist/esm/kol-nav.entry.js +1 -1
  222. package/dist/esm/kol-nav.entry.js.map +1 -1
  223. package/dist/esm/kol-pagination.entry.js +1 -1
  224. package/dist/esm/kol-pagination.entry.js.map +1 -1
  225. package/dist/esm/kol-progress.entry.js +1 -1
  226. package/dist/esm/kol-progress.entry.js.map +1 -1
  227. package/dist/esm/kol-select.entry.js +1 -1
  228. package/dist/esm/kol-select.entry.js.map +1 -1
  229. package/dist/esm/kol-skip-nav.entry.js +1 -1
  230. package/dist/esm/kol-skip-nav.entry.js.map +1 -1
  231. package/dist/esm/kol-span.entry.js +1 -1
  232. package/dist/esm/kol-span.entry.js.map +1 -1
  233. package/dist/esm/kol-spin.entry.js +1 -1
  234. package/dist/esm/kol-spin.entry.js.map +1 -1
  235. package/dist/esm/kol-table.entry.js +1 -1
  236. package/dist/esm/kol-table.entry.js.map +1 -1
  237. package/dist/esm/kol-tabs.entry.js +1 -1
  238. package/dist/esm/kol-tabs.entry.js.map +1 -1
  239. package/dist/esm/kol-textarea.entry.js +1 -1
  240. package/dist/esm/kol-textarea.entry.js.map +1 -1
  241. package/dist/esm/kol-toast.entry.js +1 -1
  242. package/dist/esm/kol-toast.entry.js.map +1 -1
  243. package/dist/esm/kol-tooltip.entry.js +1 -1
  244. package/dist/esm/kol-tooltip.entry.js.map +1 -1
  245. package/dist/esm/kol-version.entry.js +1 -1
  246. package/dist/esm/kol-version.entry.js.map +1 -1
  247. package/dist/kolibri/kol-abbr.entry.js +1 -1
  248. package/dist/kolibri/kol-abbr.entry.js.map +1 -1
  249. package/dist/kolibri/kol-accordion.entry.js +1 -1
  250. package/dist/kolibri/kol-accordion.entry.js.map +1 -1
  251. package/dist/kolibri/kol-alert.entry.js +1 -1
  252. package/dist/kolibri/kol-alert.entry.js.map +1 -1
  253. package/dist/kolibri/kol-badge.entry.js +1 -1
  254. package/dist/kolibri/kol-badge.entry.js.map +1 -1
  255. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  256. package/dist/kolibri/kol-breadcrumb.entry.js.map +1 -1
  257. package/dist/kolibri/kol-button-group.entry.js +1 -1
  258. package/dist/kolibri/kol-button-group.entry.js.map +1 -1
  259. package/dist/kolibri/kol-button-link.entry.js +1 -1
  260. package/dist/kolibri/kol-button-link.entry.js.map +1 -1
  261. package/dist/kolibri/kol-button.entry.js +1 -1
  262. package/dist/kolibri/kol-button.entry.js.map +1 -1
  263. package/dist/kolibri/kol-card.entry.js +1 -1
  264. package/dist/kolibri/kol-card.entry.js.map +1 -1
  265. package/dist/kolibri/kol-details.entry.js +1 -1
  266. package/dist/kolibri/kol-details.entry.js.map +1 -1
  267. package/dist/kolibri/kol-heading.entry.js +1 -1
  268. package/dist/kolibri/kol-heading.entry.js.map +1 -1
  269. package/dist/kolibri/kol-indented-text.entry.js +1 -1
  270. package/dist/kolibri/kol-indented-text.entry.js.map +1 -1
  271. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  272. package/dist/kolibri/kol-input-checkbox.entry.js.map +1 -1
  273. package/dist/kolibri/kol-input-color.entry.js +1 -1
  274. package/dist/kolibri/kol-input-color.entry.js.map +1 -1
  275. package/dist/kolibri/kol-input-date.entry.js +1 -1
  276. package/dist/kolibri/kol-input-date.entry.js.map +1 -1
  277. package/dist/kolibri/kol-input-email.entry.js +1 -1
  278. package/dist/kolibri/kol-input-email.entry.js.map +1 -1
  279. package/dist/kolibri/kol-input-file.entry.js +1 -1
  280. package/dist/kolibri/kol-input-file.entry.js.map +1 -1
  281. package/dist/kolibri/kol-input-number.entry.js +1 -1
  282. package/dist/kolibri/kol-input-number.entry.js.map +1 -1
  283. package/dist/kolibri/kol-input-password.entry.js +1 -1
  284. package/dist/kolibri/kol-input-password.entry.js.map +1 -1
  285. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  286. package/dist/kolibri/kol-input-radio.entry.js.map +1 -1
  287. package/dist/kolibri/kol-input-range.entry.js +1 -1
  288. package/dist/kolibri/kol-input-range.entry.js.map +1 -1
  289. package/dist/kolibri/kol-input-text.entry.js +1 -1
  290. package/dist/kolibri/kol-input-text.entry.js.map +1 -1
  291. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  292. package/dist/kolibri/kol-kolibri.entry.js.map +1 -1
  293. package/dist/kolibri/kol-link-button.entry.js +1 -1
  294. package/dist/kolibri/kol-link-button.entry.js.map +1 -1
  295. package/dist/kolibri/kol-link-group.entry.js +1 -1
  296. package/dist/kolibri/kol-link-group.entry.js.map +1 -1
  297. package/dist/kolibri/kol-link.entry.js +1 -1
  298. package/dist/kolibri/kol-link.entry.js.map +1 -1
  299. package/dist/kolibri/kol-logo.entry.js +1 -1
  300. package/dist/kolibri/kol-logo.entry.js.map +1 -1
  301. package/dist/kolibri/kol-modal.entry.js +1 -1
  302. package/dist/kolibri/kol-modal.entry.js.map +1 -1
  303. package/dist/kolibri/kol-nav.entry.js +1 -1
  304. package/dist/kolibri/kol-nav.entry.js.map +1 -1
  305. package/dist/kolibri/kol-pagination.entry.js +1 -1
  306. package/dist/kolibri/kol-pagination.entry.js.map +1 -1
  307. package/dist/kolibri/kol-progress.entry.js +1 -1
  308. package/dist/kolibri/kol-progress.entry.js.map +1 -1
  309. package/dist/kolibri/kol-select.entry.js +1 -1
  310. package/dist/kolibri/kol-select.entry.js.map +1 -1
  311. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  312. package/dist/kolibri/kol-skip-nav.entry.js.map +1 -1
  313. package/dist/kolibri/kol-span.entry.js +1 -1
  314. package/dist/kolibri/kol-span.entry.js.map +1 -1
  315. package/dist/kolibri/kol-spin.entry.js +1 -1
  316. package/dist/kolibri/kol-spin.entry.js.map +1 -1
  317. package/dist/kolibri/kol-table.entry.js +1 -1
  318. package/dist/kolibri/kol-table.entry.js.map +1 -1
  319. package/dist/kolibri/kol-tabs.entry.js +1 -1
  320. package/dist/kolibri/kol-tabs.entry.js.map +1 -1
  321. package/dist/kolibri/kol-textarea.entry.js +1 -1
  322. package/dist/kolibri/kol-textarea.entry.js.map +1 -1
  323. package/dist/kolibri/kol-toast.entry.js +1 -1
  324. package/dist/kolibri/kol-toast.entry.js.map +1 -1
  325. package/dist/kolibri/kol-tooltip.entry.js +1 -1
  326. package/dist/kolibri/kol-tooltip.entry.js.map +1 -1
  327. package/dist/kolibri/kol-version.entry.js +1 -1
  328. package/dist/kolibri/kol-version.entry.js.map +1 -1
  329. package/jest-test-results.json +1 -1
  330. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as registerInstance,h}from"./index-50adf9a0.js";import{b as a11yHintLabelingLandmarks}from"./a11y.tipps-a876ebb7.js";import{w as watchString,a as watchValidator,b as watchBoolean}from"./prop.validators-dd337216.js";import{w as watchHeadingLevel}from"./validation-1165b64b.js";import{w as watchNavLinks}from"./validation-68f4e65e.js";import"./dev.utils-ec1c1b88.js";import"./reuse-9dd1192b.js";import"./index-599f5430.js";const defaultStyleCss=":host{--kolibri-border-color:#e0e0e0;--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;hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}:host{font-family:var(--kolibri-font-family);font-size:inherit}:host *{box-sizing:border-box}:host kol-icon{color:inherit}:host kol-span-wc{display:grid;place-items:center;width:100%}:host kol-span-wc>span{display:flex;gap:var(--kolibri-spacing);place-items:center}:host button{margin:0;min-height:44px;min-width:44px;padding:0}:host a,:host button,:host input,:host select,:host textarea{cursor:pointer}:host a.icon-only>kol-span-wc>span>span,:host button.icon-only>kol-span-wc>span>span{display:none}:host a{display:inline-flex;place-items:baseline}:host button{background-color:transparent;border-width:0}",ListItem=i=>{const t=[];return i.links.map(((e,a)=>{t.push(h("li",{key:a,class:{ident:a>0&&"vertical"===i.orientation,"list-none":0===a&&"horizontal"===i.orientation},style:{listStyleType:i.listStyleType}},h("kol-link",Object.assign({},e))))})),t},KolLinkGroup=class{constructor(i){registerInstance(this,i),this.isUl=!0,this._ariaLabel=void 0,this._listStyleType=void 0,this._heading=void 0,this._level=void 0,this._links=void 0,this._ordered=void 0,this._orientation="vertical",this.state={_ariaLabel:"…",_listStyleType:"disc",_links:[],_orientation:"vertical"}}render(){var i;return h("nav",{"aria-label":this.state._ariaLabel,class:{vertical:"vertical"===this.state._orientation,horizontal:"horizontal"===this.state._orientation}},"string"==typeof this.state._heading&&(null===(i=this.state._heading)||void 0===i?void 0:i.length)>0&&h("kol-heading-wc",{_label:this.state._heading,_level:this.state._level}),!1===this.isUl?h("ol",null,h(ListItem,{links:this.state._links,orientation:this.state._orientation,listStyleType:this.state._listStyleType})):h("ul",null,h(ListItem,{links:this.state._links,orientation:this.state._orientation,listStyleType:this.state._listStyleType})))}validateAriaLabel(i){watchString(this,"_ariaLabel",i,{required:!0}),a11yHintLabelingLandmarks(i)}validateListStyleType(i){watchValidator(this,"_listStyleType",(i=>{switch(i){case"disc":case"circle":case"square":case"none":return this.isUl=!0,!0;case"decimal":case"decimal-leading-zero":case"lower-alpha":case"lower-latin":case"lower-greek":case"lower-roman":case"upper-alpha":case"upper-latin":case"upper-roman":return this.isUl=!1,!0;default:return!1}}),new Set(["https://www.w3schools.com/tags/tag_ol.asp"]),i)}validateHeading(i){watchString(this,"_heading",i)}validateLevel(i){watchHeadingLevel(this,i)}validateLinks(i){watchNavLinks("KolLinkGroup",this,i)}validateOrdered(i){watchBoolean(this,"_ordered",i)}validateOrientation(i){watchValidator(this,"_orientation",(i=>"horizontal"===i||"vertical"===i),new Set(["Orientation {horizontal, vertical}"]),i,{defaultValue:"vertical"})}componentWillLoad(){this.validateAriaLabel(this._ariaLabel),this.validateListStyleType(this._listStyleType),this.validateHeading(this._heading),this.validateLevel(this._level),this.validateLinks(this._links),this.validateOrientation(this._orientation)}static get watchers(){return{_ariaLabel:["validateAriaLabel"],_listStyleType:["validateListStyleType"],_heading:["validateHeading"],_level:["validateLevel"],_links:["validateLinks"],_ordered:["validateOrdered"],_orientation:["validateOrientation"]}}};KolLinkGroup.style={default:defaultStyleCss};export{KolLinkGroup as kol_link_group};
4
+ import{r as registerInstance,h}from"./index-50adf9a0.js";import{b as a11yHintLabelingLandmarks}from"./a11y.tipps-a876ebb7.js";import{w as watchString,a as watchValidator,b as watchBoolean}from"./prop.validators-dd337216.js";import{w as watchHeadingLevel}from"./validation-1165b64b.js";import{w as watchNavLinks}from"./validation-68f4e65e.js";import"./dev.utils-ec1c1b88.js";import"./reuse-9dd1192b.js";import"./index-599f5430.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;hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}:host{font-family:var(--kolibri-font-family);font-size:inherit}*{box-sizing:border-box}kol-icon{color:inherit}kol-span-wc{display:grid;place-items:center;width:100%}kol-span-wc>span{display:flex;gap:var(--kolibri-spacing);place-items:center}a{display:inline-flex;place-items:baseline}button{background-color:transparent;border-width:0;margin:0;min-height:44px;min-width:44px;padding:0}a,button,input,select,textarea{cursor:pointer}a.icon-only>kol-span-wc>span>span,:host button.icon-only>kol-span-wc>span>span{display:none}",ListItem=i=>{const t=[];return i.links.map(((e,a)=>{t.push(h("li",{key:a,class:{ident:a>0&&"vertical"===i.orientation,"list-none":0===a&&"horizontal"===i.orientation},style:{listStyleType:i.listStyleType}},h("kol-link",Object.assign({},e))))})),t},KolLinkGroup=class{constructor(i){registerInstance(this,i),this.isUl=!0,this._ariaLabel=void 0,this._listStyleType=void 0,this._heading=void 0,this._level=void 0,this._links=void 0,this._ordered=void 0,this._orientation="vertical",this.state={_ariaLabel:"…",_listStyleType:"disc",_links:[],_orientation:"vertical"}}render(){var i;return h("nav",{"aria-label":this.state._ariaLabel,class:{vertical:"vertical"===this.state._orientation,horizontal:"horizontal"===this.state._orientation}},"string"==typeof this.state._heading&&(null===(i=this.state._heading)||void 0===i?void 0:i.length)>0&&h("kol-heading-wc",{_label:this.state._heading,_level:this.state._level}),!1===this.isUl?h("ol",null,h(ListItem,{links:this.state._links,orientation:this.state._orientation,listStyleType:this.state._listStyleType})):h("ul",null,h(ListItem,{links:this.state._links,orientation:this.state._orientation,listStyleType:this.state._listStyleType})))}validateAriaLabel(i){watchString(this,"_ariaLabel",i,{required:!0}),a11yHintLabelingLandmarks(i)}validateListStyleType(i){watchValidator(this,"_listStyleType",(i=>{switch(i){case"disc":case"circle":case"square":case"none":return this.isUl=!0,!0;case"decimal":case"decimal-leading-zero":case"lower-alpha":case"lower-latin":case"lower-greek":case"lower-roman":case"upper-alpha":case"upper-latin":case"upper-roman":return this.isUl=!1,!0;default:return!1}}),new Set(["https://www.w3schools.com/tags/tag_ol.asp"]),i)}validateHeading(i){watchString(this,"_heading",i)}validateLevel(i){watchHeadingLevel(this,i)}validateLinks(i){watchNavLinks("KolLinkGroup",this,i)}validateOrdered(i){watchBoolean(this,"_ordered",i)}validateOrientation(i){watchValidator(this,"_orientation",(i=>"horizontal"===i||"vertical"===i),new Set(["Orientation {horizontal, vertical}"]),i,{defaultValue:"vertical"})}componentWillLoad(){this.validateAriaLabel(this._ariaLabel),this.validateListStyleType(this._listStyleType),this.validateHeading(this._heading),this.validateLevel(this._level),this.validateLinks(this._links),this.validateOrientation(this._orientation)}static get watchers(){return{_ariaLabel:["validateAriaLabel"],_listStyleType:["validateListStyleType"],_heading:["validateHeading"],_level:["validateLevel"],_links:["validateLinks"],_ordered:["validateOrdered"],_orientation:["validateOrientation"]}}};KolLinkGroup.style={default:defaultStyleCss};export{KolLinkGroup as kol_link_group};
@@ -1 +1 @@
1
- {"file":"kol-link-group.entry.js","mappings":";;;;;;;;;;;;AAAA,MAAM,eAAe,GAAG,8yCAA8yC;;ACYt0C,MAAM,QAAQ,GAAG,CAAC,KAAwF;EACzG,MAAM,IAAI,GAAkB,EAAE,CAAC;EAC/B,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAa;IACnC,IAAI,CAAC,IAAI,EAEP,UACC,GAAG,EAAE,KAAK,EACV,KAAK,EAAE;QACN,KAAK,EAAE,KAAK,GAAG,CAAC,IAAI,KAAK,CAAC,WAAW,KAAK,UAAU;QACpD,WAAW,EAAE,KAAK,KAAK,CAAC,IAAI,KAAK,CAAC,WAAW,KAAK,YAAY;OAC9D,EACD,KAAK,EAAE;QACN,aAAa,EAA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KAAK,KAAK,UAAU,EAClE,IAAI,GAAG,CAAC,CAAC,oCAAoC,CAAC,CAAC,EAC/C,KAAK,EACL;MACC,YAAY,EAAE,UAAU;KACxB,CACD,CAAC;GACF;EAKM,iBAAiB;IACvB,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACxC,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IAChD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACpC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAChC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAEhC,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;GAC5C;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/link-group/style.css?tag=kol-link-group&mode=default&encapsulation=shadow","./src/components/link-group/component.tsx"],"sourcesContent":["@import '../style.css';\n","import { Component, h, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { Generic } from '@a11y-ui/core';\nimport { Orientation } from '../../types/orientation';\nimport { HeadingLevel } from '../../types/heading-level';\nimport { a11yHintLabelingLandmarks } from '../../utils/a11y.tipps';\nimport { watchBoolean, watchString, watchValidator } from '../../utils/prop.validators';\nimport { watchHeadingLevel } from '../heading/validation';\nimport { NavLinkProps } from '../link/component';\nimport { watchNavLinks } from '../nav/validation';\nimport { Stringified } from '../../types/common';\n\nconst ListItem = (props: { links: NavLinkProps[]; orientation: Orientation; listStyleType: ListStyleType }): JSX.Element => {\n\tconst list: JSX.Element[] = [];\n\tprops.links.map((link, index: number) => {\n\t\tlist.push(\n\t\t\t(\n\t\t\t\t<li\n\t\t\t\t\tkey={index}\n\t\t\t\t\tclass={{\n\t\t\t\t\t\tident: index > 0 && props.orientation === 'vertical',\n\t\t\t\t\t\t'list-none': index === 0 && props.orientation === 'horizontal',\n\t\t\t\t\t}}\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tlistStyleType: props.listStyleType,\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<kol-link {...link}></kol-link>\n\t\t\t\t</li>\n\t\t\t) as JSX.Element\n\t\t);\n\t});\n\treturn list;\n};\n\nexport type ListStyleType =\n\t| 'disc'\n\t| 'circle'\n\t| 'square'\n\t| 'none'\n\t| 'decimal'\n\t| 'decimal-leading-zero'\n\t| 'lower-alpha'\n\t| 'lower-greek'\n\t| 'lower-latin'\n\t| 'lower-roman'\n\t| 'upper-alpha'\n\t| 'upper-latin'\n\t| 'upper-roman';\n\n/**\n * API\n */\ntype RequiredProps = {\n\tariaLabel: string;\n\tlinks: Stringified<NavLinkProps[]>;\n};\ntype OptionalProps = {\n\theading: string;\n\tlevel: HeadingLevel;\n\tlistStyleType: ListStyleType;\n\tordered: boolean;\n\torientation: Orientation;\n};\nexport type Props = Generic.Element.Members<RequiredProps, OptionalProps>;\n\ntype RequiredStates = {\n\tariaLabel: string;\n\tlinks: NavLinkProps[];\n\tlistStyleType: ListStyleType;\n\torientation: Orientation;\n};\ntype OptionalStates = {\n\theading: string;\n\tlevel: HeadingLevel;\n\tordered: boolean;\n};\ntype States = Generic.Element.Members<RequiredStates, OptionalStates>;\n\n@Component({\n\ttag: 'kol-link-group',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolLinkGroup implements Generic.Element.ComponentApi<RequiredProps, OptionalProps, RequiredStates, OptionalStates> {\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<nav\n\t\t\t\taria-label={this.state._ariaLabel}\n\t\t\t\tclass={{\n\t\t\t\t\tvertical: this.state._orientation === 'vertical',\n\t\t\t\t\thorizontal: this.state._orientation === 'horizontal',\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{typeof this.state._heading === 'string' && this.state._heading?.length > 0 && (\n\t\t\t\t\t<kol-heading-wc _label={this.state._heading} _level={this.state._level}></kol-heading-wc>\n\t\t\t\t)}\n\n\t\t\t\t{this.isUl === false ? (\n\t\t\t\t\t<ol>\n\t\t\t\t\t\t<ListItem links={this.state._links} orientation={this.state._orientation} listStyleType={this.state._listStyleType} />\n\t\t\t\t\t</ol>\n\t\t\t\t) : (\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<ListItem links={this.state._links} orientation={this.state._orientation} listStyleType={this.state._listStyleType} />\n\t\t\t\t\t</ul>\n\t\t\t\t)}\n\t\t\t</nav>\n\t\t);\n\t}\n\n\tprivate isUl = true;\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 den List-Style-Typen für ungeordnete Listen aus. Wird bei horizontalen LinkGroups als Trenner verwendet\n\t */\n\t@Prop() public _listStyleType?: ListStyleType;\n\n\t/**\n\t * Gibt die optionale Überschrift zur Link-Gruppe an.\n\t */\n\t@Prop() public _heading?: string;\n\n\t/**\n\t * Gibt die geordnete Liste der Seitenhierarchie in Links an.\n\t */\n\t@Prop() public _level?: HeadingLevel;\n\n\t/**\n\t * Gibt die geordnete Liste der Seitenhierarchie in Links an.\n\t */\n\t@Prop() public _links!: Stringified<NavLinkProps[]>;\n\n\t/**\n\t * @deprecated Wird mittels der Property _list-style-type automatisch gesteuert.\n\t * Gibt an, ob eine Ordered- oder eine Unordered-List verwendet werden soll.\n\t */\n\t@Prop({ reflect: true }) public _ordered?: boolean;\n\n\t/**\n\t * Gibt die Ausrichtung der LinkList an.\n\t */\n\t@Prop() public _orientation?: Orientation = 'vertical';\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_listStyleType: 'disc',\n\t\t_links: [],\n\t\t_orientation: 'vertical',\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('_listStyleType')\n\tpublic validateListStyleType(value?: ListStyleType): void {\n\t\twatchValidator(\n\t\t\tthis,\n\t\t\t'_listStyleType',\n\t\t\t(value) => {\n\t\t\t\tswitch (value) {\n\t\t\t\t\tcase 'disc':\n\t\t\t\t\tcase 'circle':\n\t\t\t\t\tcase 'square':\n\t\t\t\t\tcase 'none':\n\t\t\t\t\t\tthis.isUl = true;\n\t\t\t\t\t\treturn true;\n\t\t\t\t\tcase 'decimal':\n\t\t\t\t\tcase 'decimal-leading-zero':\n\t\t\t\t\tcase 'lower-alpha':\n\t\t\t\t\tcase 'lower-latin':\n\t\t\t\t\tcase 'lower-greek':\n\t\t\t\t\tcase 'lower-roman':\n\t\t\t\t\tcase 'upper-alpha':\n\t\t\t\t\tcase 'upper-latin':\n\t\t\t\t\tcase 'upper-roman':\n\t\t\t\t\t\tthis.isUl = false;\n\t\t\t\t\t\treturn true;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\t\t\tnew Set(['https://www.w3schools.com/tags/tag_ol.asp']),\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('_heading')\n\tpublic validateHeading(value?: string): void {\n\t\twatchString(this, '_heading', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_level')\n\tpublic validateLevel(value?: HeadingLevel): void {\n\t\twatchHeadingLevel(this, 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('KolLinkGroup', this, value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_ordered')\n\tpublic validateOrdered(value?: boolean): void {\n\t\twatchBoolean(this, '_ordered', value);\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 (componentWillLoad)\n\t */\n\tpublic componentWillLoad(): void {\n\t\tthis.validateAriaLabel(this._ariaLabel);\n\t\tthis.validateListStyleType(this._listStyleType);\n\t\tthis.validateHeading(this._heading);\n\t\tthis.validateLevel(this._level);\n\t\tthis.validateLinks(this._links);\n\t\t//this.validateOrdered(this._ordered);\n\t\tthis.validateOrientation(this._orientation);\n\t}\n}\n\n// console.log(\n// stringifyJson([\n// { _label: 'Fehler 1', _id: '#anschrift_anschrift_adresse_strasse', _icon: 'error' },\n// { _label: 'Fehler 2', _id: '#anschrift_anschrift_adresse_hausnummer', _icon: 'error' },\n// ])\n// );\n"],"version":3}
1
+ {"file":"kol-link-group.entry.js","mappings":";;;;;;;;;;;;AAAA,MAAM,eAAe,GAAG,stCAAstC;;ACY9uC,MAAM,QAAQ,GAAG,CAAC,KAAwF;EACzG,MAAM,IAAI,GAAkB,EAAE,CAAC;EAC/B,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAa;IACnC,IAAI,CAAC,IAAI,EAEP,UACC,GAAG,EAAE,KAAK,EACV,KAAK,EAAE;QACN,KAAK,EAAE,KAAK,GAAG,CAAC,IAAI,KAAK,CAAC,WAAW,KAAK,UAAU;QACpD,WAAW,EAAE,KAAK,KAA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IAC7C,cAAc,CACb,IAAI,EACJ,cAAc,EACd,CAAC,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;EAKM,iBAAiB;IACvB,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACxC,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IAChD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACpC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAChC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAEhC,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;GAC5C;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/link-group/style.css?tag=kol-link-group&mode=default&encapsulation=shadow","./src/components/link-group/component.tsx"],"sourcesContent":["@import '../style.css';\n","import { Component, h, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { Generic } from '@a11y-ui/core';\nimport { Orientation } from '../../types/orientation';\nimport { HeadingLevel } from '../../types/heading-level';\nimport { a11yHintLabelingLandmarks } from '../../utils/a11y.tipps';\nimport { watchBoolean, watchString, watchValidator } from '../../utils/prop.validators';\nimport { watchHeadingLevel } from '../heading/validation';\nimport { NavLinkProps } from '../link/component';\nimport { watchNavLinks } from '../nav/validation';\nimport { Stringified } from '../../types/common';\n\nconst ListItem = (props: { links: NavLinkProps[]; orientation: Orientation; listStyleType: ListStyleType }): JSX.Element => {\n\tconst list: JSX.Element[] = [];\n\tprops.links.map((link, index: number) => {\n\t\tlist.push(\n\t\t\t(\n\t\t\t\t<li\n\t\t\t\t\tkey={index}\n\t\t\t\t\tclass={{\n\t\t\t\t\t\tident: index > 0 && props.orientation === 'vertical',\n\t\t\t\t\t\t'list-none': index === 0 && props.orientation === 'horizontal',\n\t\t\t\t\t}}\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tlistStyleType: props.listStyleType,\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<kol-link {...link}></kol-link>\n\t\t\t\t</li>\n\t\t\t) as JSX.Element\n\t\t);\n\t});\n\treturn list;\n};\n\nexport type ListStyleType =\n\t| 'disc'\n\t| 'circle'\n\t| 'square'\n\t| 'none'\n\t| 'decimal'\n\t| 'decimal-leading-zero'\n\t| 'lower-alpha'\n\t| 'lower-greek'\n\t| 'lower-latin'\n\t| 'lower-roman'\n\t| 'upper-alpha'\n\t| 'upper-latin'\n\t| 'upper-roman';\n\n/**\n * API\n */\ntype RequiredProps = {\n\tariaLabel: string;\n\tlinks: Stringified<NavLinkProps[]>;\n};\ntype OptionalProps = {\n\theading: string;\n\tlevel: HeadingLevel;\n\tlistStyleType: ListStyleType;\n\tordered: boolean;\n\torientation: Orientation;\n};\nexport type Props = Generic.Element.Members<RequiredProps, OptionalProps>;\n\ntype RequiredStates = {\n\tariaLabel: string;\n\tlinks: NavLinkProps[];\n\tlistStyleType: ListStyleType;\n\torientation: Orientation;\n};\ntype OptionalStates = {\n\theading: string;\n\tlevel: HeadingLevel;\n\tordered: boolean;\n};\ntype States = Generic.Element.Members<RequiredStates, OptionalStates>;\n\n@Component({\n\ttag: 'kol-link-group',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolLinkGroup implements Generic.Element.ComponentApi<RequiredProps, OptionalProps, RequiredStates, OptionalStates> {\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<nav\n\t\t\t\taria-label={this.state._ariaLabel}\n\t\t\t\tclass={{\n\t\t\t\t\tvertical: this.state._orientation === 'vertical',\n\t\t\t\t\thorizontal: this.state._orientation === 'horizontal',\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{typeof this.state._heading === 'string' && this.state._heading?.length > 0 && (\n\t\t\t\t\t<kol-heading-wc _label={this.state._heading} _level={this.state._level}></kol-heading-wc>\n\t\t\t\t)}\n\n\t\t\t\t{this.isUl === false ? (\n\t\t\t\t\t<ol>\n\t\t\t\t\t\t<ListItem links={this.state._links} orientation={this.state._orientation} listStyleType={this.state._listStyleType} />\n\t\t\t\t\t</ol>\n\t\t\t\t) : (\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<ListItem links={this.state._links} orientation={this.state._orientation} listStyleType={this.state._listStyleType} />\n\t\t\t\t\t</ul>\n\t\t\t\t)}\n\t\t\t</nav>\n\t\t);\n\t}\n\n\tprivate isUl = true;\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 den List-Style-Typen für ungeordnete Listen aus. Wird bei horizontalen LinkGroups als Trenner verwendet\n\t */\n\t@Prop() public _listStyleType?: ListStyleType;\n\n\t/**\n\t * Gibt die optionale Überschrift zur Link-Gruppe an.\n\t */\n\t@Prop() public _heading?: string;\n\n\t/**\n\t * Gibt die geordnete Liste der Seitenhierarchie in Links an.\n\t */\n\t@Prop() public _level?: HeadingLevel;\n\n\t/**\n\t * Gibt die geordnete Liste der Seitenhierarchie in Links an.\n\t */\n\t@Prop() public _links!: Stringified<NavLinkProps[]>;\n\n\t/**\n\t * @deprecated Wird mittels der Property _list-style-type automatisch gesteuert.\n\t * Gibt an, ob eine Ordered- oder eine Unordered-List verwendet werden soll.\n\t */\n\t@Prop({ reflect: true }) public _ordered?: boolean;\n\n\t/**\n\t * Gibt die Ausrichtung der LinkList an.\n\t */\n\t@Prop() public _orientation?: Orientation = 'vertical';\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_listStyleType: 'disc',\n\t\t_links: [],\n\t\t_orientation: 'vertical',\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('_listStyleType')\n\tpublic validateListStyleType(value?: ListStyleType): void {\n\t\twatchValidator(\n\t\t\tthis,\n\t\t\t'_listStyleType',\n\t\t\t(value) => {\n\t\t\t\tswitch (value) {\n\t\t\t\t\tcase 'disc':\n\t\t\t\t\tcase 'circle':\n\t\t\t\t\tcase 'square':\n\t\t\t\t\tcase 'none':\n\t\t\t\t\t\tthis.isUl = true;\n\t\t\t\t\t\treturn true;\n\t\t\t\t\tcase 'decimal':\n\t\t\t\t\tcase 'decimal-leading-zero':\n\t\t\t\t\tcase 'lower-alpha':\n\t\t\t\t\tcase 'lower-latin':\n\t\t\t\t\tcase 'lower-greek':\n\t\t\t\t\tcase 'lower-roman':\n\t\t\t\t\tcase 'upper-alpha':\n\t\t\t\t\tcase 'upper-latin':\n\t\t\t\t\tcase 'upper-roman':\n\t\t\t\t\t\tthis.isUl = false;\n\t\t\t\t\t\treturn true;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\t\t\tnew Set(['https://www.w3schools.com/tags/tag_ol.asp']),\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('_heading')\n\tpublic validateHeading(value?: string): void {\n\t\twatchString(this, '_heading', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_level')\n\tpublic validateLevel(value?: HeadingLevel): void {\n\t\twatchHeadingLevel(this, 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('KolLinkGroup', this, value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_ordered')\n\tpublic validateOrdered(value?: boolean): void {\n\t\twatchBoolean(this, '_ordered', value);\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 (componentWillLoad)\n\t */\n\tpublic componentWillLoad(): void {\n\t\tthis.validateAriaLabel(this._ariaLabel);\n\t\tthis.validateListStyleType(this._listStyleType);\n\t\tthis.validateHeading(this._heading);\n\t\tthis.validateLevel(this._level);\n\t\tthis.validateLinks(this._links);\n\t\t//this.validateOrdered(this._ordered);\n\t\tthis.validateOrientation(this._orientation);\n\t}\n}\n\n// console.log(\n// stringifyJson([\n// { _label: 'Fehler 1', _id: '#anschrift_anschrift_adresse_strasse', _icon: 'error' },\n// { _label: 'Fehler 2', _id: '#anschrift_anschrift_adresse_hausnummer', _icon: 'error' },\n// ])\n// );\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as registerInstance,h,H as Host,g as getElement}from"./index-50adf9a0.js";import{a as propergateFocus}from"./reuse-9dd1192b.js";const defaultStyleCss=":host{--kolibri-border-color:#e0e0e0;--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;hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}:host{font-family:var(--kolibri-font-family);font-size:inherit}:host *{box-sizing:border-box}:host kol-icon{color:inherit}:host kol-span-wc{display:grid;place-items:center;width:100%}:host kol-span-wc>span{display:flex;gap:var(--kolibri-spacing);place-items:center}:host button{margin:0;min-height:44px;min-width:44px;padding:0}:host a,:host button,:host input,:host select,:host textarea{cursor:pointer}:host a.icon-only>kol-span-wc>span>span,:host button.icon-only>kol-span-wc>span>span{display:none}:host a{display:inline-flex;place-items:baseline}:host button{background-color:transparent;border-width:0}:host kol-link-wc,:host kol-link-button-wc{display:inline-block}:host kol-link-wc a,:host kol-button-wc button{background-color:transparent;display:inline-flex;font-size:inherit;gap:var(--kolibri-spacing);place-items:center;text-decoration-line:underline}:host a:focus,:host a:hover,:host button:focus,:host button:hover{text-decoration-thickness:0.2em}:host kol-icon{padding:0 var(--kolibri-spacing);display:inline-block}:host .hidden{display:none;visibility:hidden}:host .skip{left:-99999px;overflow:hidden;position:absolute;z-index:9999999;line-height:1em}:host .skip:focus{background-color:white;box-shadow:0 0 calc(2 * var(--kolibri-spacing)) calc(2 * var(--kolibri-spacing)) white;left:unset;position:unset}",KolLink=class{constructor(i){registerInstance(this,i),this.catchRef=i=>{this.ref=i,propergateFocus(this.host,this.ref)},this._ariaControls=void 0,this._ariaCurrent=void 0,this._ariaExpanded=void 0,this._ariaLabel="",this._ariaSelected=void 0,this._disabled=!1,this._href=void 0,this._icon=void 0,this._iconAlign="left",this._iconOnly=!1,this._label=void 0,this._on=void 0,this._role=void 0,this._selector=void 0,this._stealth=!1,this._tabIndex=void 0,this._target=void 0,this._targetDescription="Der Link wird in einem neuen Tab geöffnet.",this._tooltipAlign="right",this._useCase="text"}render(){return h(Host,null,h("kol-link-wc",{ref:this.catchRef,_ariaControls:this._ariaControls,_ariaCurrent:this._ariaCurrent,_ariaExpanded:this._ariaExpanded,_ariaLabel:this._ariaLabel,_ariaSelected:this._ariaSelected,_disabled:this._disabled,_href:this._href,_icon:this._icon,_iconAlign:this._iconAlign,_iconOnly:this._iconOnly,_label:this._label,_on:this._on,_role:this._role,_selector:this._selector,_stealth:this._stealth,_tabIndex:this._tabIndex,_target:this._target,_targetDescription:this._targetDescription,_tooltipAlign:this._tooltipAlign,_useCase:this._useCase},h("slot",{name:"expert",slot:"expert"}),h("slot",{slot:"expert"})))}get host(){return getElement(this)}};KolLink.style={default:defaultStyleCss};export{KolLink as kol_link};
4
+ import{r as registerInstance,h,H as Host,g as getElement}from"./index-50adf9a0.js";import{a as propergateFocus}from"./reuse-9dd1192b.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;hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}:host{font-family:var(--kolibri-font-family);font-size:inherit}*{box-sizing:border-box}kol-icon{color:inherit}kol-span-wc{display:grid;place-items:center;width:100%}kol-span-wc>span{display:flex;gap:var(--kolibri-spacing);place-items:center}a{display:inline-flex;place-items:baseline}button{background-color:transparent;border-width:0;margin:0;min-height:44px;min-width:44px;padding:0}a,button,input,select,textarea{cursor:pointer}a.icon-only>kol-span-wc>span>span,:host button.icon-only>kol-span-wc>span>span{display:none}kol-link-wc,kol-link-button-wc{display:inline-block}kol-link-wc a,kol-button-wc button{background-color:transparent;display:inline-flex;font-size:inherit;gap:var(--kolibri-spacing);place-items:center;text-decoration-line:underline}a:focus,a:hover,button:focus,button:hover{text-decoration-thickness:0.2em}kol-icon{padding:0 var(--kolibri-spacing);display:inline-block}.hidden{display:none;visibility:hidden}.skip{left:-99999px;overflow:hidden;position:absolute;z-index:9999999;line-height:1em}.skip:focus{background-color:white;box-shadow:0 0 calc(2 * var(--kolibri-spacing)) calc(2 * var(--kolibri-spacing)) white;left:unset;position:unset}",KolLink=class{constructor(i){registerInstance(this,i),this.catchRef=i=>{this.ref=i,propergateFocus(this.host,this.ref)},this._ariaControls=void 0,this._ariaCurrent=void 0,this._ariaExpanded=void 0,this._ariaLabel="",this._ariaSelected=void 0,this._disabled=!1,this._href=void 0,this._icon=void 0,this._iconAlign="left",this._iconOnly=!1,this._label=void 0,this._on=void 0,this._role=void 0,this._selector=void 0,this._stealth=!1,this._tabIndex=void 0,this._target=void 0,this._targetDescription="Der Link wird in einem neuen Tab geöffnet.",this._tooltipAlign="right",this._useCase="text"}render(){return h(Host,null,h("kol-link-wc",{ref:this.catchRef,_ariaControls:this._ariaControls,_ariaCurrent:this._ariaCurrent,_ariaExpanded:this._ariaExpanded,_ariaLabel:this._ariaLabel,_ariaSelected:this._ariaSelected,_disabled:this._disabled,_href:this._href,_icon:this._icon,_iconAlign:this._iconAlign,_iconOnly:this._iconOnly,_label:this._label,_on:this._on,_role:this._role,_selector:this._selector,_stealth:this._stealth,_tabIndex:this._tabIndex,_target:this._target,_targetDescription:this._targetDescription,_tooltipAlign:this._tooltipAlign,_useCase:this._useCase},h("slot",{name:"expert",slot:"expert"}),h("slot",{slot:"expert"})))}get host(){return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AE,IAAI,CAAC,QAAQ,IAMvB,YAAM,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ,GAAG,EAEpC,YAAM,IAAI,EAAC,QAAQ,GAAG,CACT,CACR,EACN;GACF;;;;;;;;;","names":[],"sources":["./src/components/link/style.css?tag=kol-link&mode=default&encapsulation=shadow","./src/components/link/shadow.tsx"],"sourcesContent":["@import '../link.css';\n","import { Generic } from '@a11y-ui/core';\nimport { Component, Element, h, Host, JSX, Prop } from '@stencil/core';\nimport { AlternativButtonLinkRole, AriaCurrent, LinkOnCallbacks, LinkTarget, LinkUseCase, OptionalLinkProps, RequiredLinkProps } from '../../types/button-link';\nimport { Stringified } from '../../types/common';\nimport { KoliBriIconProp } from '../../types/icon';\nimport { Alignment } from '../../types/props/alignment';\nimport { propergateFocus } from '../../utils/reuse';\n\n/**\n * @part link - Ermöglicht das Stylen des Links.\n * @part span - Ermöglicht das Stylen des Linktextes.\n * @part hidden - Ermöglicht das Ausblenden des Linktextes.\n */\n@Component({\n\ttag: 'kol-link',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolLink implements Generic.Element.Members<RequiredLinkProps, OptionalLinkProps> {\n\t@Element() private readonly host?: HTMLKolLinkElement;\n\tprivate ref?: HTMLKolLinkWcElement;\n\n\tprivate readonly catchRef = (ref?: HTMLKolLinkWcElement) => {\n\t\tthis.ref = ref;\n\t\tpropergateFocus(this.host, this.ref);\n\t};\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<kol-link-wc\n\t\t\t\t\tref={this.catchRef}\n\t\t\t\t\t_ariaControls={this._ariaControls}\n\t\t\t\t\t_ariaCurrent={this._ariaCurrent}\n\t\t\t\t\t_ariaExpanded={this._ariaExpanded}\n\t\t\t\t\t_ariaLabel={this._ariaLabel}\n\t\t\t\t\t_ariaSelected={this._ariaSelected}\n\t\t\t\t\t_disabled={this._disabled}\n\t\t\t\t\t_href={this._href}\n\t\t\t\t\t_icon={this._icon}\n\t\t\t\t\t_iconAlign={this._iconAlign}\n\t\t\t\t\t_iconOnly={this._iconOnly}\n\t\t\t\t\t_label={this._label}\n\t\t\t\t\t_on={this._on}\n\t\t\t\t\t_role={this._role}\n\t\t\t\t\t_selector={this._selector}\n\t\t\t\t\t_stealth={this._stealth}\n\t\t\t\t\t_tabIndex={this._tabIndex}\n\t\t\t\t\t_target={this._target}\n\t\t\t\t\t_targetDescription={this._targetDescription}\n\t\t\t\t\t_tooltipAlign={this._tooltipAlign}\n\t\t\t\t\t_useCase={this._useCase}\n\t\t\t\t>\n\t\t\t\t\t{/*\n\t\t\t\t\t\tEs ist keine gute Idee hier einen Slot einzufügen, da dadurch ermöglicht wird,\n\t\t\t\t\t\tdie Unterstützung hinsichtlich der Barrierefreiheit der Komponente zu umgehen.\n\t\t\t\t\t*/}\n\t\t\t\t\t<slot name=\"expert\" slot=\"expert\" />\n\t\t\t\t\t{/* TODO: der folgende Slot ohne Name muss später entfernt werden */}\n\t\t\t\t\t<slot slot=\"expert\" />\n\t\t\t\t</kol-link-wc>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Gibt an, welche Elemente kontrolliert werden. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-controls)\n\t */\n\t@Prop() public _ariaControls?: string;\n\n\t/**\n\t * Gibt an, welchen aktuellen Auswahlstatus der Link hat. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current)\n\t */\n\t@Prop() public _ariaCurrent?: AriaCurrent;\n\n\t/**\n\t * Gibt an, ob durch den Link etwas aufgeklappt wurde. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded)\n\t */\n\t@Prop({ reflect: true }) public _ariaExpanded?: boolean;\n\n\t/**\n\t * Gibt einen beschreibenden Text des Links an. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label)\n\t */\n\t@Prop() public _ariaLabel?: string = '';\n\n\t/**\n\t * Gibt an, ob der Link gerade ausgewählt ist. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected)\n\t */\n\t@Prop({ reflect: true }) public _ariaSelected?: boolean;\n\n\t/**\n\t * Gibt an, ob der Link deaktiviert ist.\n\t */\n\t@Prop({ reflect: true }) public _disabled?: boolean = false;\n\n\t/**\n\t * Gibt die Ziel-Url des Links an.\n\t */\n\t@Prop() public _href!: string;\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 das Icon entweder links oder rechts dargestellt werden soll.\n\t *\n\t * @deprecated Wird durch das neue flexibleren Icon-Typ abgedeckt.\n\t */\n\t@Prop() public _iconAlign?: Alignment = 'left';\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 den Label für die Beschriftung der Schaltfläche an.\n\t */\n\t@Prop() public _label!: string;\n\n\t/**\n\t * Gibt die EventCallback-Funktionen für den Link an.\n\t */\n\t@Prop() public _on?: LinkOnCallbacks;\n\n\t/**\n\t * Gibt an, welche Role der Schalter hat.\n\t */\n\t@Prop() public _role?: AlternativButtonLinkRole;\n\n\t/**\n\t * Gibt die ID eines DOM-Elements, zu dem gesprungen werden soll, aus.\n\t *\n\t * @deprecated Das Styling sollte stets über CSS erfolgen.\n\t */\n\t@Prop() public _selector?: string;\n\n\t/**\n\t * Gibt an, ob der Link nur beim Fokus sichtbar ist.\n\t *\n\t * @deprecated Das Styling sollte stets über CSS erfolgen.\n\t */\n\t@Prop({ reflect: true }) public _stealth?: boolean = false;\n\n\t/**\n\t * Gibt an, welchen Tab-Index der Button hat. (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex)\n\t */\n\t@Prop() public _tabIndex?: number;\n\n\t/**\n\t * Definiert das Verhalten, bei dem der Link geöffnet werden soll.\n\t */\n\t@Prop() public _target?: LinkTarget;\n\n\t/**\n\t * Gibt die Beschreibung an, wenn der Link in einem anderen Programm geöffnet wird.\n\t */\n\t@Prop() public _targetDescription?: string = 'Der Link wird in einem neuen Tab geöffnet.';\n\n\t/**\n\t * Gibt an, ob der Tooltip entweder oben, rechts, unten oder links angezeigt werden soll.\n\t */\n\t@Prop() public _tooltipAlign?: Alignment = 'right';\n\n\t/**\n\t * Gibt den Verwendungsfall des Links an.\n\t *\n\t * @deprecated Das Styling sollte stets über CSS erfolgen.\n\t */\n\t@Prop() public _useCase?: LinkUseCase = 'text';\n}\n"],"version":3}
1
+ {"file":"kol-link.entry.js","mappings":";;;;;;AAAA,MAAM,eAAe,GAAG,u1DAAu1D;;MCoBl2D,OAAO;;;IAIF,aAAQ,GAAG,CAAC,GAA0B;MACtD,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;MACf,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;KACrC,CAAC;;;;sBA0DmC,EAAE;;qBAUe,KAAK;;;sBAiBnB,MAAM;qBAIQ,KAAK;;;;;oBA6BN,KAAK;;;8BAeb,4CAA4C;yBAK9C,OAAO;oBAOV,MAAM;;EA/IvC,MAAM;IACZ,QACC,EAAC,IAAI,QACJ,mBACC,GAAG,EAAE,IAAI,CAAC,QAAQ,EAClB,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,kBAAkB,EAAE,IAAI,CAAC,kBAAkB,EAC3C,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAMvB,YAAM,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ,GAAG,EAEpC,YAAM,IAAI,EAAC,QAAQ,GAAG,CACT,CACR,EACN;GACF;;;;;;;;;","names":[],"sources":["./src/components/link/style.css?tag=kol-link&mode=default&encapsulation=shadow","./src/components/link/shadow.tsx"],"sourcesContent":["@import '../link.css';\n","import { Generic } from '@a11y-ui/core';\nimport { Component, Element, h, Host, JSX, Prop } from '@stencil/core';\nimport { AlternativButtonLinkRole, AriaCurrent, LinkOnCallbacks, LinkTarget, LinkUseCase, OptionalLinkProps, RequiredLinkProps } from '../../types/button-link';\nimport { Stringified } from '../../types/common';\nimport { KoliBriIconProp } from '../../types/icon';\nimport { Alignment } from '../../types/props/alignment';\nimport { propergateFocus } from '../../utils/reuse';\n\n/**\n * @part link - Ermöglicht das Stylen des Links.\n * @part span - Ermöglicht das Stylen des Linktextes.\n * @part hidden - Ermöglicht das Ausblenden des Linktextes.\n */\n@Component({\n\ttag: 'kol-link',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolLink implements Generic.Element.Members<RequiredLinkProps, OptionalLinkProps> {\n\t@Element() private readonly host?: HTMLKolLinkElement;\n\tprivate ref?: HTMLKolLinkWcElement;\n\n\tprivate readonly catchRef = (ref?: HTMLKolLinkWcElement) => {\n\t\tthis.ref = ref;\n\t\tpropergateFocus(this.host, this.ref);\n\t};\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<kol-link-wc\n\t\t\t\t\tref={this.catchRef}\n\t\t\t\t\t_ariaControls={this._ariaControls}\n\t\t\t\t\t_ariaCurrent={this._ariaCurrent}\n\t\t\t\t\t_ariaExpanded={this._ariaExpanded}\n\t\t\t\t\t_ariaLabel={this._ariaLabel}\n\t\t\t\t\t_ariaSelected={this._ariaSelected}\n\t\t\t\t\t_disabled={this._disabled}\n\t\t\t\t\t_href={this._href}\n\t\t\t\t\t_icon={this._icon}\n\t\t\t\t\t_iconAlign={this._iconAlign}\n\t\t\t\t\t_iconOnly={this._iconOnly}\n\t\t\t\t\t_label={this._label}\n\t\t\t\t\t_on={this._on}\n\t\t\t\t\t_role={this._role}\n\t\t\t\t\t_selector={this._selector}\n\t\t\t\t\t_stealth={this._stealth}\n\t\t\t\t\t_tabIndex={this._tabIndex}\n\t\t\t\t\t_target={this._target}\n\t\t\t\t\t_targetDescription={this._targetDescription}\n\t\t\t\t\t_tooltipAlign={this._tooltipAlign}\n\t\t\t\t\t_useCase={this._useCase}\n\t\t\t\t>\n\t\t\t\t\t{/*\n\t\t\t\t\t\tEs ist keine gute Idee hier einen Slot einzufügen, da dadurch ermöglicht wird,\n\t\t\t\t\t\tdie Unterstützung hinsichtlich der Barrierefreiheit der Komponente zu umgehen.\n\t\t\t\t\t*/}\n\t\t\t\t\t<slot name=\"expert\" slot=\"expert\" />\n\t\t\t\t\t{/* TODO: der folgende Slot ohne Name muss später entfernt werden */}\n\t\t\t\t\t<slot slot=\"expert\" />\n\t\t\t\t</kol-link-wc>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Gibt an, welche Elemente kontrolliert werden. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-controls)\n\t */\n\t@Prop() public _ariaControls?: string;\n\n\t/**\n\t * Gibt an, welchen aktuellen Auswahlstatus der Link hat. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current)\n\t */\n\t@Prop() public _ariaCurrent?: AriaCurrent;\n\n\t/**\n\t * Gibt an, ob durch den Link etwas aufgeklappt wurde. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded)\n\t */\n\t@Prop({ reflect: true }) public _ariaExpanded?: boolean;\n\n\t/**\n\t * Gibt einen beschreibenden Text des Links an. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label)\n\t */\n\t@Prop() public _ariaLabel?: string = '';\n\n\t/**\n\t * Gibt an, ob der Link gerade ausgewählt ist. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected)\n\t */\n\t@Prop({ reflect: true }) public _ariaSelected?: boolean;\n\n\t/**\n\t * Gibt an, ob der Link deaktiviert ist.\n\t */\n\t@Prop({ reflect: true }) public _disabled?: boolean = false;\n\n\t/**\n\t * Gibt die Ziel-Url des Links an.\n\t */\n\t@Prop() public _href!: string;\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 das Icon entweder links oder rechts dargestellt werden soll.\n\t *\n\t * @deprecated Wird durch das neue flexibleren Icon-Typ abgedeckt.\n\t */\n\t@Prop() public _iconAlign?: Alignment = 'left';\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 den Label für die Beschriftung der Schaltfläche an.\n\t */\n\t@Prop() public _label!: string;\n\n\t/**\n\t * Gibt die EventCallback-Funktionen für den Link an.\n\t */\n\t@Prop() public _on?: LinkOnCallbacks;\n\n\t/**\n\t * Gibt an, welche Role der Schalter hat.\n\t */\n\t@Prop() public _role?: AlternativButtonLinkRole;\n\n\t/**\n\t * Gibt die ID eines DOM-Elements, zu dem gesprungen werden soll, aus.\n\t *\n\t * @deprecated Das Styling sollte stets über CSS erfolgen.\n\t */\n\t@Prop() public _selector?: string;\n\n\t/**\n\t * Gibt an, ob der Link nur beim Fokus sichtbar ist.\n\t *\n\t * @deprecated Das Styling sollte stets über CSS erfolgen.\n\t */\n\t@Prop({ reflect: true }) public _stealth?: boolean = false;\n\n\t/**\n\t * Gibt an, welchen Tab-Index der Button hat. (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex)\n\t */\n\t@Prop() public _tabIndex?: number;\n\n\t/**\n\t * Definiert das Verhalten, bei dem der Link geöffnet werden soll.\n\t */\n\t@Prop() public _target?: LinkTarget;\n\n\t/**\n\t * Gibt die Beschreibung an, wenn der Link in einem anderen Programm geöffnet wird.\n\t */\n\t@Prop() public _targetDescription?: string = 'Der Link wird in einem neuen Tab geöffnet.';\n\n\t/**\n\t * Gibt an, ob der Tooltip entweder oben, rechts, unten oder links angezeigt werden soll.\n\t */\n\t@Prop() public _tooltipAlign?: Alignment = 'right';\n\n\t/**\n\t * Gibt den Verwendungsfall des Links an.\n\t *\n\t * @deprecated Das Styling sollte stets über CSS erfolgen.\n\t */\n\t@Prop() public _useCase?: LinkUseCase = 'text';\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as registerInstance,h}from"./index-50adf9a0.js";import{d as Bundesanstalt,B as Bundesministerium,b as Bundesamt,f as BUND_LOGO_TEXT_MAP}from"./bund-7a6ffb62.js";import{d as devHint}from"./a11y.tipps-a876ebb7.js";import{s as setState}from"./prop.validators-dd337216.js";import{a as translate}from"./i18n-e297566c.js";import"./dev.utils-ec1c1b88.js";import"./reuse-9dd1192b.js";import"./index-599f5430.js";const defaultStyleCss=":host{--kolibri-border-color:#e0e0e0;--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;hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}:host{font-family:var(--kolibri-font-family);font-size:inherit}:host *{box-sizing:border-box}:host kol-icon{color:inherit}:host kol-span-wc{display:grid;place-items:center;width:100%}:host kol-span-wc>span{display:flex;gap:var(--kolibri-spacing);place-items:center}:host button{margin:0;min-height:44px;min-width:44px;padding:0}:host a,:host button,:host input,:host select,:host textarea{cursor:pointer}:host a.icon-only>kol-span-wc>span>span,:host button.icon-only>kol-span-wc>span>span{display:none}:host a{display:inline-flex;place-items:baseline}:host button{background-color:transparent;border-width:0}:host text{font-size:16px;letter-spacing:normal !important;word-spacing:normal !important}";function enumToArray(c,t=new Map){return Object.keys(c).map((o=>{t.set(c[o],o)})),t}const ENUM_AS_MAP=enumToArray(Bundesamt,enumToArray(Bundesanstalt,enumToArray(Bundesministerium)));function getAriaLabel(c){return ENUM_AS_MAP.has(c)?ENUM_AS_MAP.get(c):""}const Adler=()=>h("path",{d:"M21.72,12.77c0.04-0.33,0.06-0.67,0.06-1c0-0.2,0-0.43,0-0.69c3.06,0,5.74-2.25,5.74-4.78\nc-0.09-1.07-0.56-2.08-1.32-2.84l0.32-0.07c1,0.89,1.61,2.14,1.7,3.48c0,3-3,5.85-6.5,5.92 M18.64,2.21\nc-0.05-0.33-0.19-0.64-0.39-0.91c0-0.31,0.14-0.61,0.64-0.36c-0.27,0.27-0.06,0.76-0.06,0.76s0.55-0.26,0.44-0.62\nC20.09,1.28,19.5,2.38,18.64,2.21 M17.93,3.77c-0.12-0.47-0.34-0.9-0.64-1.27c-0.3-0.42-0.77-0.69-1.29-0.73\nc-0.34,0.03-0.68,0.12-1,0.25c-0.16-0.28-0.27-0.58-0.32-0.9c0-0.22,0.38-0.44,1.1-0.44c1.58,0,2.52,0.71,2.52,1.91\nC18.26,3.01,18.14,3.41,17.93,3.77 M22,24.16c0.13,0,0.26,0.02,0.38,0.07c0.64,1.3,1.4,2.53,2.29,3.68l0,0l0,0\nc0.81-0.14,1.63-0.22,2.45-0.24l0,0c0.1-0.01,0.2,0.01,0.28,0.07c0.07,0.09,0.1,0.2,0.09,0.31c-0.01,0.28-0.08,0.55-0.21,0.79\nc-0.46-0.4-1.07-0.59-1.68-0.51c-0.24,0.01-0.48,0.05-0.71,0.12h-0.07h-0.07l0.48,0.49c0.77,0.83,1.44,1.43,1.44,1.83\nc-0.04,0.31-0.22,0.58-0.48,0.74c-0.22-0.98-0.8-1.84-1.62-2.42h-0.06v0.27c0,0.19,0,0.47,0,0.77c0,1.49-0.15,1.72-0.67,1.72\nc-0.09,0.01-0.19,0.01-0.28,0c0.33-0.49,0.48-1.08,0.41-1.67v-0.7c0-0.27,0.03-0.53,0.06-0.8v-0.11h-0.08\nc-0.33-0.05-0.67-0.09-1-0.1c-0.57-0.07-1.14,0.07-1.6,0.41c-0.24-0.18-0.41-0.44-0.48-0.73c0-0.32,0.19-0.34,0.45-0.34\nc0.14-0.01,0.27-0.01,0.41,0c0.59,0.09,1.18,0.13,1.78,0.12h0.06v-0.06c-0.5-1.13-1.18-2.17-2-3.09c0.1-0.35,0.2-0.59,0.54-0.59\nM12.64,27.87v0.06h0.06c0.55-0.01,1.1-0.06,1.64-0.16c0.14-0.01,0.27-0.01,0.41,0c0.26,0,0.45,0,0.45,0.34\nc-0.07,0.29-0.24,0.55-0.48,0.73c-0.46-0.34-1.03-0.49-1.6-0.41c-0.33,0.01-0.67,0.05-1,0.1H12v0.11\nc0.03,0.27,0.06,0.53,0.06,0.8v0.7c-0.05,0.58,0.1,1.15,0.42,1.63c-0.09,0.01-0.19,0.01-0.28,0c-0.52,0-0.67-0.23-0.67-1.72\nc0-0.3,0-0.58,0-0.77V29l-0.06,0.05c-0.82,0.58-1.39,1.44-1.61,2.42c-0.28-0.14-0.47-0.4-0.53-0.7c0-0.43,0.65-1.07,1.39-1.81\nl0.43-0.43v-0.06h-0.14c-0.23-0.07-0.47-0.11-0.71-0.12c-0.61-0.08-1.22,0.11-1.68,0.51c-0.13-0.24-0.2-0.51-0.21-0.79\nc0.01-0.11,0.06-0.22,0.14-0.3c0.08-0.06,0.18-0.08,0.28-0.07l0,0c0.82,0.02,1.64,0.1,2.45,0.24l0,0l0,0\nc0.88-1.15,1.64-2.38,2.28-3.68c0.12-0.05,0.25-0.07,0.38-0.07c0.35,0,0.44,0.24,0.54,0.59c-0.82,0.92-1.5,1.96-2,3.09\nM7.78,6.87c0.08-1.36,0.7-2.62,1.72-3.52l0.32,0.07C9.06,4.19,8.6,5.19,8.51,6.26c0,2.56,2.73,4.78,5.82,4.78\nc0,0.22,0,0.45,0,0.69c-0.01,0.35,0,0.69,0.03,1.04c-3.5,0-6.58-2.86-6.58-5.92 M31.25,12.23c1.57,2.49,2.8,2.45,4.66,2.45\nc-1.19-0.97-2.21-2.14-3-3.46L30,6.65c-0.29-1.44-1.03-2.75-2.12-3.73c0.31-0.1,0.6-0.24,0.87-0.42c-1.88,0-3.73-1-4.75-1\nc-0.55-0.05-1.03,0.36-1.08,0.91c0,0.58,0.63,1.16,1.73,1.16c0.31,0,0.62-0.04,0.92-0.09c0.65,0.74,1.03,1.67,1.08,2.65\nc0,2-2.41,3.58-4.83,3.58h-0.41c-0.5-0.67-0.84-1.45-1-2.28c0-1.6,1.05-2.9,1.05-4.48c0-0.68-0.24-1.33-0.67-1.85\nc0.29-0.23,0.53-0.52,0.7-0.85c-0.22,0.08-0.45,0.11-0.68,0.09c-1.16,0-2.11-0.3-3-0.3c-0.53,0-0.67,0.16-0.67,0.31\nc-0.01,0.05-0.01,0.1,0,0.15c-0.19-0.08-0.39-0.13-0.59-0.17c-0.29-0.05-0.58-0.08-0.88-0.08c-1.13,0-1.52,0.47-1.52,0.87\nc0.07,0.52,0.27,1.01,0.57,1.44c0.4-0.2,0.84-0.31,1.28-0.34c0.6,0,1.13,0.57,1.41,1.24c-0.29,0.05-0.59,0.07-0.88,0.07\nc-0.68-0.03-1.36-0.16-2-0.39l0,0c0,0,0.31,0.56,0.92,0.78c0.72,0.22,1.46,0.37,2.21,0.45c-0.08,0.21-0.23,0.38-0.43,0.49\nc-0.05,0.02-0.09,0.02-0.14,0c-0.74-0.14-1.45-0.35-2.14-0.65H14.9c0,0.42,1.09,1.35,2.07,1.71c-1.06,1.1-1.87,2.41-2.39,3.85\nh-0.41c-2.42,0-4.82-1.57-4.82-3.58c0.05-0.98,0.43-1.91,1.07-2.65c0.3,0.05,0.61,0.09,0.92,0.09c1.1,0,1.69-0.58,1.74-1.16\nc-0.04-0.55-0.52-0.96-1.07-0.92c0,0,0,0-0.01,0c-1,0-2.88,1-4.76,1C7.51,2.73,7.8,2.87,8.11,2.97C7.03,3.94,6.29,5.23,6,6.65\nl-2.87,4.59c-0.79,1.32-1.81,2.49-3,3.46c1.86,0,3.09,0,4.66-2.45L6.26,9.9c0.11,0.31,0.24,0.61,0.4,0.9l-2.97,4.67\nc-0.79,1.32-1.8,2.49-3,3.46c1.85,0,3.08,0,4.65-2.44l2.52-4c0.19,0.2,0.39,0.4,0.6,0.58l-3.59,5.7c-0.79,1.32-1.8,2.49-3,3.45\nc1.85,0,3.08,0.05,4.65-2.44L10,14.2c0.22,0.14,0.46,0.28,0.7,0.41l-4.27,6.77c-0.79,1.31-1.81,2.48-3,3.45\nc1.85,0,3.08,0,4.65-2.44l4.36-7c0.25,0.1,0.51,0.2,0.78,0.28l-4.95,7.9c-0.79,1.31-1.81,2.48-3,3.45c1.85,0,3.08,0.05,4.65-2.43\nl5.24-8.39h0.16c0.14,0.42,0.22,0.86,0.24,1.3c0,2.64-1.73,5-3.8,6.76c0.19,0.06,0.38,0.09,0.58,0.08c0.3,0.01,0.6-0.01,0.9-0.05\nc-0.57,1.13-1.24,2.21-2,3.23c-0.77-0.13-1.54-0.2-2.32-0.22c-0.67,0-0.75,0.4-0.75,0.75c-0.01,0.53,0.22,1.03,0.62,1.38\nc0.13-0.31,0.38-0.73,1.63-0.73h0.13C10.11,29.13,9,30.06,9,30.77c0.06,0.66,0.59,1.18,1.25,1.24c-0.02-0.14-0.02-0.28,0-0.42\nc0.13-0.69,0.48-1.33,1-1.8c-0.01,0.1-0.01,0.2,0,0.3c0,1.43,0.13,2.08,1,2.08c0.31-0.01,0.61-0.12,0.86-0.31\nc-0.5-0.44-0.73-1.11-0.62-1.77c0-0.21,0-0.41,0-0.69c0.02-0.2,0.02-0.41,0-0.61c0.24-0.02,0.47-0.02,0.71,0\nc0,0,1.29-0.1,1.6,0.57c0.35-0.32,0.86-0.78,0.86-1.27c0-0.33-0.16-0.71-0.83-0.71c-0.25,0-1,0.16-1.7,0.16\nc0.48-0.84,1.04-1.64,1.66-2.39c0.1,0.39,0.31,0.74,0.62,1c0.12-1.17,0.54-2.28,1.21-3.24c0.16,0.93,0.24,1.87,0.23,2.82\nc0,3.55-0.85,6.17-2.66,6.67c0.26,0.46,0.73,0.75,1.25,0.78c0.66,0,1-0.75,1.39-1.46c0.19,0.53,0.72,1.8,1.25,1.8\ns1.06-1.27,1.25-1.8c0.37,0.71,0.73,1.46,1.39,1.46c0.52-0.03,1-0.33,1.26-0.78c-1.82-0.5-2.67-3.12-2.67-6.67\nc-0.01-0.95,0.07-1.89,0.23-2.82c0.68,0.96,1.1,2.07,1.21,3.24c0.31-0.26,0.53-0.61,0.63-1c0.61,0.75,1.15,1.54,1.62,2.38\nc-0.66,0-1.45-0.16-1.7-0.16c-0.67,0-0.82,0.38-0.82,0.71c0,0.49,0.51,1,0.86,1.27c0.3-0.67,1.59-0.57,1.59-0.57\nc0.24-0.02,0.47-0.02,0.71,0c-0.02,0.2-0.02,0.41,0,0.61v0.69c0.11,0.66-0.12,1.33-0.62,1.77c0.25,0.19,0.55,0.3,0.86,0.31\nc0.91,0,1-0.65,1-2.08c0.01-0.1,0.01-0.2,0-0.3c0.52,0.47,0.87,1.11,1,1.8c0.02,0.14,0.02,0.28,0,0.42\nc0.61-0.11,1.06-0.62,1.12-1.23c0-0.74-1.15-1.67-1.52-2.08h0.13c1.25,0,1.5,0.42,1.63,0.73c0.4-0.35,0.63-0.85,0.62-1.38\nc0-0.35-0.07-0.75-0.75-0.75c-0.78,0.02-1.55,0.09-2.32,0.22c-0.76-1.02-1.43-2.1-2-3.23c0.3,0.04,0.6,0.06,0.9,0.05\nc0.19,0.01,0.39-0.02,0.57-0.08c-2.07-1.79-3.8-4.12-3.8-6.76c0.02-0.44,0.1-0.88,0.24-1.3h0.16l5.24,8.39\nc1.57,2.48,2.8,2.43,4.65,2.43c-1.19-0.97-2.21-2.14-3-3.45l-4.92-7.87c0.27-0.08,0.53-0.18,0.79-0.28l4.35,7\nc1.57,2.48,2.8,2.44,4.65,2.44c-1.19-0.97-2.21-2.14-3-3.45l-4.23-6.77c0.24-0.13,0.48-0.27,0.7-0.41l3.42,5.55\nc1.57,2.49,2.8,2.44,4.65,2.44c-1.19-0.97-2.21-2.13-3-3.45l-3.55-5.69c0.2-0.18,0.4-0.38,0.59-0.58l2.52,4\nc1.57,2.48,2.8,2.44,4.65,2.44c-1.2-0.97-2.21-2.14-3-3.46l-2.99-4.7c0.16-0.29,0.29-0.59,0.4-0.9L31.25,12.23z"}),KolLogo=class{constructor(c){registerInstance(this,c),this._abbr=void 0,this._org=void 0,this.state={_org:Bundesanstalt["Informationstechnikzentrum Bund"]}}validateAbbr(c){this.validateOrg(c)}validateOrg(c){"string"==typeof c&&ENUM_AS_MAP.has(c)?setState(this,"_org",c):devHint(`Die verwendete Abkürzung (${c}) ist nicht definiert!`)}componentWillLoad(){this.validateOrg(this._org||this._abbr)}render(){var c;return h("svg",{"aria-label":translate("kol-logo-description",{placeholders:{orgShort:this.state._org,orgLong:getAriaLabel(this.state._org)}}),role:"img",viewBox:"0 0 225 100"},h("rect",{width:"100%",height:"100%",fill:"white"}),h("svg",{x:"0",y:"4",height:"75"},h(Adler,null)),h("svg",{x:"40.5",y:"3.5",height:"100"},h("rect",{width:"5",height:"30"}),h("rect",{y:"30",width:"5",height:"30",fill:"red"}),h("rect",{y:"60",width:"5",height:"30",fill:"#fc0"})),h("svg",{x:"50",y:"0"},h("text",{x:"0",y:"-0.05em","font-family":"BundesSans Web",style:{backgroundColor:"white",color:"black"}},BUND_LOGO_TEXT_MAP.has(this.state._org)?h("tspan",null,null===(c=BUND_LOGO_TEXT_MAP.get(this.state._org))||void 0===c?void 0:c.map(((c,t)=>h("tspan",{x:"0",dy:"1.1em",key:`kol-logo-text-${t}`},c)))):h("tspan",{fill:"red"},h("tspan",{x:"0",dy:"1.1em"},"Der Schlüsselwert"),h("tspan",{x:"0",dy:"1.1em","font-weight":"bold"},"'",this.state._org,"'"),h("tspan",{x:"0",dy:"1.1em"},"ist nicht definiert."),h("tspan",{x:"0",dy:"1.1em"},"oder freigegeben.")))))}static get watchers(){return{_abbr:["validateAbbr"],_org:["validateOrg"]}}};KolLogo.style={default:defaultStyleCss};export{KolLogo as kol_logo};
4
+ import{r as registerInstance,h}from"./index-50adf9a0.js";import{d as Bundesanstalt,B as Bundesministerium,b as Bundesamt,f as BUND_LOGO_TEXT_MAP}from"./bund-7a6ffb62.js";import{d as devHint}from"./a11y.tipps-a876ebb7.js";import{s as setState}from"./prop.validators-dd337216.js";import{a as translate}from"./i18n-e297566c.js";import"./dev.utils-ec1c1b88.js";import"./reuse-9dd1192b.js";import"./index-599f5430.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;hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}:host{font-family:var(--kolibri-font-family);font-size:inherit}*{box-sizing:border-box}kol-icon{color:inherit}kol-span-wc{display:grid;place-items:center;width:100%}kol-span-wc>span{display:flex;gap:var(--kolibri-spacing);place-items:center}a{display:inline-flex;place-items:baseline}button{background-color:transparent;border-width:0;margin:0;min-height:44px;min-width:44px;padding:0}a,button,input,select,textarea{cursor:pointer}a.icon-only>kol-span-wc>span>span,:host button.icon-only>kol-span-wc>span>span{display:none}text{font-size:16px;letter-spacing:normal !important;word-spacing:normal !important}";function enumToArray(c,t=new Map){return Object.keys(c).map((i=>{t.set(c[i],i)})),t}const ENUM_AS_MAP=enumToArray(Bundesamt,enumToArray(Bundesanstalt,enumToArray(Bundesministerium)));function getAriaLabel(c){return ENUM_AS_MAP.has(c)?ENUM_AS_MAP.get(c):""}const Adler=()=>h("path",{d:"M21.72,12.77c0.04-0.33,0.06-0.67,0.06-1c0-0.2,0-0.43,0-0.69c3.06,0,5.74-2.25,5.74-4.78\nc-0.09-1.07-0.56-2.08-1.32-2.84l0.32-0.07c1,0.89,1.61,2.14,1.7,3.48c0,3-3,5.85-6.5,5.92 M18.64,2.21\nc-0.05-0.33-0.19-0.64-0.39-0.91c0-0.31,0.14-0.61,0.64-0.36c-0.27,0.27-0.06,0.76-0.06,0.76s0.55-0.26,0.44-0.62\nC20.09,1.28,19.5,2.38,18.64,2.21 M17.93,3.77c-0.12-0.47-0.34-0.9-0.64-1.27c-0.3-0.42-0.77-0.69-1.29-0.73\nc-0.34,0.03-0.68,0.12-1,0.25c-0.16-0.28-0.27-0.58-0.32-0.9c0-0.22,0.38-0.44,1.1-0.44c1.58,0,2.52,0.71,2.52,1.91\nC18.26,3.01,18.14,3.41,17.93,3.77 M22,24.16c0.13,0,0.26,0.02,0.38,0.07c0.64,1.3,1.4,2.53,2.29,3.68l0,0l0,0\nc0.81-0.14,1.63-0.22,2.45-0.24l0,0c0.1-0.01,0.2,0.01,0.28,0.07c0.07,0.09,0.1,0.2,0.09,0.31c-0.01,0.28-0.08,0.55-0.21,0.79\nc-0.46-0.4-1.07-0.59-1.68-0.51c-0.24,0.01-0.48,0.05-0.71,0.12h-0.07h-0.07l0.48,0.49c0.77,0.83,1.44,1.43,1.44,1.83\nc-0.04,0.31-0.22,0.58-0.48,0.74c-0.22-0.98-0.8-1.84-1.62-2.42h-0.06v0.27c0,0.19,0,0.47,0,0.77c0,1.49-0.15,1.72-0.67,1.72\nc-0.09,0.01-0.19,0.01-0.28,0c0.33-0.49,0.48-1.08,0.41-1.67v-0.7c0-0.27,0.03-0.53,0.06-0.8v-0.11h-0.08\nc-0.33-0.05-0.67-0.09-1-0.1c-0.57-0.07-1.14,0.07-1.6,0.41c-0.24-0.18-0.41-0.44-0.48-0.73c0-0.32,0.19-0.34,0.45-0.34\nc0.14-0.01,0.27-0.01,0.41,0c0.59,0.09,1.18,0.13,1.78,0.12h0.06v-0.06c-0.5-1.13-1.18-2.17-2-3.09c0.1-0.35,0.2-0.59,0.54-0.59\nM12.64,27.87v0.06h0.06c0.55-0.01,1.1-0.06,1.64-0.16c0.14-0.01,0.27-0.01,0.41,0c0.26,0,0.45,0,0.45,0.34\nc-0.07,0.29-0.24,0.55-0.48,0.73c-0.46-0.34-1.03-0.49-1.6-0.41c-0.33,0.01-0.67,0.05-1,0.1H12v0.11\nc0.03,0.27,0.06,0.53,0.06,0.8v0.7c-0.05,0.58,0.1,1.15,0.42,1.63c-0.09,0.01-0.19,0.01-0.28,0c-0.52,0-0.67-0.23-0.67-1.72\nc0-0.3,0-0.58,0-0.77V29l-0.06,0.05c-0.82,0.58-1.39,1.44-1.61,2.42c-0.28-0.14-0.47-0.4-0.53-0.7c0-0.43,0.65-1.07,1.39-1.81\nl0.43-0.43v-0.06h-0.14c-0.23-0.07-0.47-0.11-0.71-0.12c-0.61-0.08-1.22,0.11-1.68,0.51c-0.13-0.24-0.2-0.51-0.21-0.79\nc0.01-0.11,0.06-0.22,0.14-0.3c0.08-0.06,0.18-0.08,0.28-0.07l0,0c0.82,0.02,1.64,0.1,2.45,0.24l0,0l0,0\nc0.88-1.15,1.64-2.38,2.28-3.68c0.12-0.05,0.25-0.07,0.38-0.07c0.35,0,0.44,0.24,0.54,0.59c-0.82,0.92-1.5,1.96-2,3.09\nM7.78,6.87c0.08-1.36,0.7-2.62,1.72-3.52l0.32,0.07C9.06,4.19,8.6,5.19,8.51,6.26c0,2.56,2.73,4.78,5.82,4.78\nc0,0.22,0,0.45,0,0.69c-0.01,0.35,0,0.69,0.03,1.04c-3.5,0-6.58-2.86-6.58-5.92 M31.25,12.23c1.57,2.49,2.8,2.45,4.66,2.45\nc-1.19-0.97-2.21-2.14-3-3.46L30,6.65c-0.29-1.44-1.03-2.75-2.12-3.73c0.31-0.1,0.6-0.24,0.87-0.42c-1.88,0-3.73-1-4.75-1\nc-0.55-0.05-1.03,0.36-1.08,0.91c0,0.58,0.63,1.16,1.73,1.16c0.31,0,0.62-0.04,0.92-0.09c0.65,0.74,1.03,1.67,1.08,2.65\nc0,2-2.41,3.58-4.83,3.58h-0.41c-0.5-0.67-0.84-1.45-1-2.28c0-1.6,1.05-2.9,1.05-4.48c0-0.68-0.24-1.33-0.67-1.85\nc0.29-0.23,0.53-0.52,0.7-0.85c-0.22,0.08-0.45,0.11-0.68,0.09c-1.16,0-2.11-0.3-3-0.3c-0.53,0-0.67,0.16-0.67,0.31\nc-0.01,0.05-0.01,0.1,0,0.15c-0.19-0.08-0.39-0.13-0.59-0.17c-0.29-0.05-0.58-0.08-0.88-0.08c-1.13,0-1.52,0.47-1.52,0.87\nc0.07,0.52,0.27,1.01,0.57,1.44c0.4-0.2,0.84-0.31,1.28-0.34c0.6,0,1.13,0.57,1.41,1.24c-0.29,0.05-0.59,0.07-0.88,0.07\nc-0.68-0.03-1.36-0.16-2-0.39l0,0c0,0,0.31,0.56,0.92,0.78c0.72,0.22,1.46,0.37,2.21,0.45c-0.08,0.21-0.23,0.38-0.43,0.49\nc-0.05,0.02-0.09,0.02-0.14,0c-0.74-0.14-1.45-0.35-2.14-0.65H14.9c0,0.42,1.09,1.35,2.07,1.71c-1.06,1.1-1.87,2.41-2.39,3.85\nh-0.41c-2.42,0-4.82-1.57-4.82-3.58c0.05-0.98,0.43-1.91,1.07-2.65c0.3,0.05,0.61,0.09,0.92,0.09c1.1,0,1.69-0.58,1.74-1.16\nc-0.04-0.55-0.52-0.96-1.07-0.92c0,0,0,0-0.01,0c-1,0-2.88,1-4.76,1C7.51,2.73,7.8,2.87,8.11,2.97C7.03,3.94,6.29,5.23,6,6.65\nl-2.87,4.59c-0.79,1.32-1.81,2.49-3,3.46c1.86,0,3.09,0,4.66-2.45L6.26,9.9c0.11,0.31,0.24,0.61,0.4,0.9l-2.97,4.67\nc-0.79,1.32-1.8,2.49-3,3.46c1.85,0,3.08,0,4.65-2.44l2.52-4c0.19,0.2,0.39,0.4,0.6,0.58l-3.59,5.7c-0.79,1.32-1.8,2.49-3,3.45\nc1.85,0,3.08,0.05,4.65-2.44L10,14.2c0.22,0.14,0.46,0.28,0.7,0.41l-4.27,6.77c-0.79,1.31-1.81,2.48-3,3.45\nc1.85,0,3.08,0,4.65-2.44l4.36-7c0.25,0.1,0.51,0.2,0.78,0.28l-4.95,7.9c-0.79,1.31-1.81,2.48-3,3.45c1.85,0,3.08,0.05,4.65-2.43\nl5.24-8.39h0.16c0.14,0.42,0.22,0.86,0.24,1.3c0,2.64-1.73,5-3.8,6.76c0.19,0.06,0.38,0.09,0.58,0.08c0.3,0.01,0.6-0.01,0.9-0.05\nc-0.57,1.13-1.24,2.21-2,3.23c-0.77-0.13-1.54-0.2-2.32-0.22c-0.67,0-0.75,0.4-0.75,0.75c-0.01,0.53,0.22,1.03,0.62,1.38\nc0.13-0.31,0.38-0.73,1.63-0.73h0.13C10.11,29.13,9,30.06,9,30.77c0.06,0.66,0.59,1.18,1.25,1.24c-0.02-0.14-0.02-0.28,0-0.42\nc0.13-0.69,0.48-1.33,1-1.8c-0.01,0.1-0.01,0.2,0,0.3c0,1.43,0.13,2.08,1,2.08c0.31-0.01,0.61-0.12,0.86-0.31\nc-0.5-0.44-0.73-1.11-0.62-1.77c0-0.21,0-0.41,0-0.69c0.02-0.2,0.02-0.41,0-0.61c0.24-0.02,0.47-0.02,0.71,0\nc0,0,1.29-0.1,1.6,0.57c0.35-0.32,0.86-0.78,0.86-1.27c0-0.33-0.16-0.71-0.83-0.71c-0.25,0-1,0.16-1.7,0.16\nc0.48-0.84,1.04-1.64,1.66-2.39c0.1,0.39,0.31,0.74,0.62,1c0.12-1.17,0.54-2.28,1.21-3.24c0.16,0.93,0.24,1.87,0.23,2.82\nc0,3.55-0.85,6.17-2.66,6.67c0.26,0.46,0.73,0.75,1.25,0.78c0.66,0,1-0.75,1.39-1.46c0.19,0.53,0.72,1.8,1.25,1.8\ns1.06-1.27,1.25-1.8c0.37,0.71,0.73,1.46,1.39,1.46c0.52-0.03,1-0.33,1.26-0.78c-1.82-0.5-2.67-3.12-2.67-6.67\nc-0.01-0.95,0.07-1.89,0.23-2.82c0.68,0.96,1.1,2.07,1.21,3.24c0.31-0.26,0.53-0.61,0.63-1c0.61,0.75,1.15,1.54,1.62,2.38\nc-0.66,0-1.45-0.16-1.7-0.16c-0.67,0-0.82,0.38-0.82,0.71c0,0.49,0.51,1,0.86,1.27c0.3-0.67,1.59-0.57,1.59-0.57\nc0.24-0.02,0.47-0.02,0.71,0c-0.02,0.2-0.02,0.41,0,0.61v0.69c0.11,0.66-0.12,1.33-0.62,1.77c0.25,0.19,0.55,0.3,0.86,0.31\nc0.91,0,1-0.65,1-2.08c0.01-0.1,0.01-0.2,0-0.3c0.52,0.47,0.87,1.11,1,1.8c0.02,0.14,0.02,0.28,0,0.42\nc0.61-0.11,1.06-0.62,1.12-1.23c0-0.74-1.15-1.67-1.52-2.08h0.13c1.25,0,1.5,0.42,1.63,0.73c0.4-0.35,0.63-0.85,0.62-1.38\nc0-0.35-0.07-0.75-0.75-0.75c-0.78,0.02-1.55,0.09-2.32,0.22c-0.76-1.02-1.43-2.1-2-3.23c0.3,0.04,0.6,0.06,0.9,0.05\nc0.19,0.01,0.39-0.02,0.57-0.08c-2.07-1.79-3.8-4.12-3.8-6.76c0.02-0.44,0.1-0.88,0.24-1.3h0.16l5.24,8.39\nc1.57,2.48,2.8,2.43,4.65,2.43c-1.19-0.97-2.21-2.14-3-3.45l-4.92-7.87c0.27-0.08,0.53-0.18,0.79-0.28l4.35,7\nc1.57,2.48,2.8,2.44,4.65,2.44c-1.19-0.97-2.21-2.14-3-3.45l-4.23-6.77c0.24-0.13,0.48-0.27,0.7-0.41l3.42,5.55\nc1.57,2.49,2.8,2.44,4.65,2.44c-1.19-0.97-2.21-2.13-3-3.45l-3.55-5.69c0.2-0.18,0.4-0.38,0.59-0.58l2.52,4\nc1.57,2.48,2.8,2.44,4.65,2.44c-1.2-0.97-2.21-2.14-3-3.46l-2.99-4.7c0.16-0.29,0.29-0.59,0.4-0.9L31.25,12.23z"}),KolLogo=class{constructor(c){registerInstance(this,c),this._abbr=void 0,this._org=void 0,this.state={_org:Bundesanstalt["Informationstechnikzentrum Bund"]}}validateAbbr(c){this.validateOrg(c)}validateOrg(c){"string"==typeof c&&ENUM_AS_MAP.has(c)?setState(this,"_org",c):devHint(`Die verwendete Abkürzung (${c}) ist nicht definiert!`)}componentWillLoad(){this.validateOrg(this._org||this._abbr)}render(){var c;return h("svg",{"aria-label":translate("kol-logo-description",{placeholders:{orgShort:this.state._org,orgLong:getAriaLabel(this.state._org)}}),role:"img",viewBox:"0 0 225 100"},h("rect",{width:"100%",height:"100%",fill:"white"}),h("svg",{x:"0",y:"4",height:"75"},h(Adler,null)),h("svg",{x:"40.5",y:"3.5",height:"100"},h("rect",{width:"5",height:"30"}),h("rect",{y:"30",width:"5",height:"30",fill:"red"}),h("rect",{y:"60",width:"5",height:"30",fill:"#fc0"})),h("svg",{x:"50",y:"0"},h("text",{x:"0",y:"-0.05em","font-family":"BundesSans Web",style:{backgroundColor:"white",color:"black"}},BUND_LOGO_TEXT_MAP.has(this.state._org)?h("tspan",null,null===(c=BUND_LOGO_TEXT_MAP.get(this.state._org))||void 0===c?void 0:c.map(((c,t)=>h("tspan",{x:"0",dy:"1.1em",key:`kol-logo-text-${t}`},c)))):h("tspan",{fill:"red"},h("tspan",{x:"0",dy:"1.1em"},"Der Schlüsselwert"),h("tspan",{x:"0",dy:"1.1em","font-weight":"bold"},"'",this.state._org,"'"),h("tspan",{x:"0",dy:"1.1em"},"ist nicht definiert."),h("tspan",{x:"0",dy:"1.1em"},"oder freigegeben.")))))}static get watchers(){return{_abbr:["validateAbbr"],_org:["validateOrg"]}}};KolLogo.style={default:defaultStyleCss};export{KolLogo as kol_logo};
@@ -1 +1 @@
1
- {"file":"kol-logo.entry.js","mappings":";;;;;;;;;;;;AAAA,MAAM,eAAe,GAAG,w4CAAw4C;;ACSh6C,SAAS,WAAW,CAAC,WAAgB,EAAE,YAAiC,IAAI,GAAG,EAAE;EAChF,MAAM,CAAC,IAAI,CAAC,WAAsC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG;IAE3D,SAAS,CAAC,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;GACrC,CAAC,CAAC;EACH,OAAO,SAAS,CAAC;AAClB,CAAC;AAED,MAAM,WAAW,GAAG,WAAW,CAAC,SAAS,EAAE,WAAW,CAAC,aAAa,EAAE,WAAW,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC;AAEvG,SAAS,YAAY,CA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ources":["./src/components/logo/style.css?tag=kol-logo&mode=default&encapsulation=shadow","./src/components/logo/component.tsx"],"sourcesContent":["@import '../style.css';\n\n:host text {\n\tfont-size: 16px;\n\tletter-spacing: normal !important;\n\tword-spacing: normal !important;\n}\n","import { Component, JSX, h, Prop, State, Watch } from '@stencil/core';\n\nimport { BUND_LOGO_TEXT_MAP, Bundesamt, Bundesanstalt, Bundesministerium } from '../../enums/bund';\nimport { Generic } from '@a11y-ui/core';\nimport { devHint } from '../../utils/a11y.tipps';\nimport { setState } from '../../utils/prop.validators';\nimport { translate } from '../../i18n';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction enumToArray(enumeration: any, enumAsMap: Map<string, string> = new Map()): Map<string, string> {\n\tObject.keys(enumeration as Record<string, unknown>).map((key) => {\n\t\t// eslint-disable-next-line\n\t\tenumAsMap.set(enumeration[key], key);\n\t});\n\treturn enumAsMap;\n}\n\nconst ENUM_AS_MAP = enumToArray(Bundesamt, enumToArray(Bundesanstalt, enumToArray(Bundesministerium)));\n\nfunction getAriaLabel(organ: string): string {\n\tif (ENUM_AS_MAP.has(organ)) {\n\t\treturn ENUM_AS_MAP.get(organ) as string;\n\t} else {\n\t\treturn '';\n\t}\n}\n\n/**\n * API\n */\ntype RequiredProps = {\n\torg: Bundesministerium | Bundesamt | Bundesanstalt;\n};\ntype OptionalProps = {\n\tabbr: Bundesministerium | Bundesamt | Bundesanstalt;\n};\n// type Props = Generic.Element.Members<RequiredProps, OptionalProps>;\n\ntype RequiredStates = RequiredProps;\ntype OptionalStates = OptionalProps;\ntype States = Generic.Element.Members<RequiredStates, OptionalStates>;\n\nconst Adler = (): JSX.Element => (\n\t<path\n\t\td=\"M21.72,12.77c0.04-0.33,0.06-0.67,0.06-1c0-0.2,0-0.43,0-0.69c3.06,0,5.74-2.25,5.74-4.78\nc-0.09-1.07-0.56-2.08-1.32-2.84l0.32-0.07c1,0.89,1.61,2.14,1.7,3.48c0,3-3,5.85-6.5,5.92 M18.64,2.21\nc-0.05-0.33-0.19-0.64-0.39-0.91c0-0.31,0.14-0.61,0.64-0.36c-0.27,0.27-0.06,0.76-0.06,0.76s0.55-0.26,0.44-0.62\nC20.09,1.28,19.5,2.38,18.64,2.21 M17.93,3.77c-0.12-0.47-0.34-0.9-0.64-1.27c-0.3-0.42-0.77-0.69-1.29-0.73\nc-0.34,0.03-0.68,0.12-1,0.25c-0.16-0.28-0.27-0.58-0.32-0.9c0-0.22,0.38-0.44,1.1-0.44c1.58,0,2.52,0.71,2.52,1.91\nC18.26,3.01,18.14,3.41,17.93,3.77 M22,24.16c0.13,0,0.26,0.02,0.38,0.07c0.64,1.3,1.4,2.53,2.29,3.68l0,0l0,0\nc0.81-0.14,1.63-0.22,2.45-0.24l0,0c0.1-0.01,0.2,0.01,0.28,0.07c0.07,0.09,0.1,0.2,0.09,0.31c-0.01,0.28-0.08,0.55-0.21,0.79\nc-0.46-0.4-1.07-0.59-1.68-0.51c-0.24,0.01-0.48,0.05-0.71,0.12h-0.07h-0.07l0.48,0.49c0.77,0.83,1.44,1.43,1.44,1.83\nc-0.04,0.31-0.22,0.58-0.48,0.74c-0.22-0.98-0.8-1.84-1.62-2.42h-0.06v0.27c0,0.19,0,0.47,0,0.77c0,1.49-0.15,1.72-0.67,1.72\nc-0.09,0.01-0.19,0.01-0.28,0c0.33-0.49,0.48-1.08,0.41-1.67v-0.7c0-0.27,0.03-0.53,0.06-0.8v-0.11h-0.08\nc-0.33-0.05-0.67-0.09-1-0.1c-0.57-0.07-1.14,0.07-1.6,0.41c-0.24-0.18-0.41-0.44-0.48-0.73c0-0.32,0.19-0.34,0.45-0.34\nc0.14-0.01,0.27-0.01,0.41,0c0.59,0.09,1.18,0.13,1.78,0.12h0.06v-0.06c-0.5-1.13-1.18-2.17-2-3.09c0.1-0.35,0.2-0.59,0.54-0.59\nM12.64,27.87v0.06h0.06c0.55-0.01,1.1-0.06,1.64-0.16c0.14-0.01,0.27-0.01,0.41,0c0.26,0,0.45,0,0.45,0.34\nc-0.07,0.29-0.24,0.55-0.48,0.73c-0.46-0.34-1.03-0.49-1.6-0.41c-0.33,0.01-0.67,0.05-1,0.1H12v0.11\nc0.03,0.27,0.06,0.53,0.06,0.8v0.7c-0.05,0.58,0.1,1.15,0.42,1.63c-0.09,0.01-0.19,0.01-0.28,0c-0.52,0-0.67-0.23-0.67-1.72\nc0-0.3,0-0.58,0-0.77V29l-0.06,0.05c-0.82,0.58-1.39,1.44-1.61,2.42c-0.28-0.14-0.47-0.4-0.53-0.7c0-0.43,0.65-1.07,1.39-1.81\nl0.43-0.43v-0.06h-0.14c-0.23-0.07-0.47-0.11-0.71-0.12c-0.61-0.08-1.22,0.11-1.68,0.51c-0.13-0.24-0.2-0.51-0.21-0.79\nc0.01-0.11,0.06-0.22,0.14-0.3c0.08-0.06,0.18-0.08,0.28-0.07l0,0c0.82,0.02,1.64,0.1,2.45,0.24l0,0l0,0\nc0.88-1.15,1.64-2.38,2.28-3.68c0.12-0.05,0.25-0.07,0.38-0.07c0.35,0,0.44,0.24,0.54,0.59c-0.82,0.92-1.5,1.96-2,3.09\nM7.78,6.87c0.08-1.36,0.7-2.62,1.72-3.52l0.32,0.07C9.06,4.19,8.6,5.19,8.51,6.26c0,2.56,2.73,4.78,5.82,4.78\nc0,0.22,0,0.45,0,0.69c-0.01,0.35,0,0.69,0.03,1.04c-3.5,0-6.58-2.86-6.58-5.92 M31.25,12.23c1.57,2.49,2.8,2.45,4.66,2.45\nc-1.19-0.97-2.21-2.14-3-3.46L30,6.65c-0.29-1.44-1.03-2.75-2.12-3.73c0.31-0.1,0.6-0.24,0.87-0.42c-1.88,0-3.73-1-4.75-1\nc-0.55-0.05-1.03,0.36-1.08,0.91c0,0.58,0.63,1.16,1.73,1.16c0.31,0,0.62-0.04,0.92-0.09c0.65,0.74,1.03,1.67,1.08,2.65\nc0,2-2.41,3.58-4.83,3.58h-0.41c-0.5-0.67-0.84-1.45-1-2.28c0-1.6,1.05-2.9,1.05-4.48c0-0.68-0.24-1.33-0.67-1.85\nc0.29-0.23,0.53-0.52,0.7-0.85c-0.22,0.08-0.45,0.11-0.68,0.09c-1.16,0-2.11-0.3-3-0.3c-0.53,0-0.67,0.16-0.67,0.31\nc-0.01,0.05-0.01,0.1,0,0.15c-0.19-0.08-0.39-0.13-0.59-0.17c-0.29-0.05-0.58-0.08-0.88-0.08c-1.13,0-1.52,0.47-1.52,0.87\nc0.07,0.52,0.27,1.01,0.57,1.44c0.4-0.2,0.84-0.31,1.28-0.34c0.6,0,1.13,0.57,1.41,1.24c-0.29,0.05-0.59,0.07-0.88,0.07\nc-0.68-0.03-1.36-0.16-2-0.39l0,0c0,0,0.31,0.56,0.92,0.78c0.72,0.22,1.46,0.37,2.21,0.45c-0.08,0.21-0.23,0.38-0.43,0.49\nc-0.05,0.02-0.09,0.02-0.14,0c-0.74-0.14-1.45-0.35-2.14-0.65H14.9c0,0.42,1.09,1.35,2.07,1.71c-1.06,1.1-1.87,2.41-2.39,3.85\nh-0.41c-2.42,0-4.82-1.57-4.82-3.58c0.05-0.98,0.43-1.91,1.07-2.65c0.3,0.05,0.61,0.09,0.92,0.09c1.1,0,1.69-0.58,1.74-1.16\nc-0.04-0.55-0.52-0.96-1.07-0.92c0,0,0,0-0.01,0c-1,0-2.88,1-4.76,1C7.51,2.73,7.8,2.87,8.11,2.97C7.03,3.94,6.29,5.23,6,6.65\nl-2.87,4.59c-0.79,1.32-1.81,2.49-3,3.46c1.86,0,3.09,0,4.66-2.45L6.26,9.9c0.11,0.31,0.24,0.61,0.4,0.9l-2.97,4.67\nc-0.79,1.32-1.8,2.49-3,3.46c1.85,0,3.08,0,4.65-2.44l2.52-4c0.19,0.2,0.39,0.4,0.6,0.58l-3.59,5.7c-0.79,1.32-1.8,2.49-3,3.45\nc1.85,0,3.08,0.05,4.65-2.44L10,14.2c0.22,0.14,0.46,0.28,0.7,0.41l-4.27,6.77c-0.79,1.31-1.81,2.48-3,3.45\nc1.85,0,3.08,0,4.65-2.44l4.36-7c0.25,0.1,0.51,0.2,0.78,0.28l-4.95,7.9c-0.79,1.31-1.81,2.48-3,3.45c1.85,0,3.08,0.05,4.65-2.43\nl5.24-8.39h0.16c0.14,0.42,0.22,0.86,0.24,1.3c0,2.64-1.73,5-3.8,6.76c0.19,0.06,0.38,0.09,0.58,0.08c0.3,0.01,0.6-0.01,0.9-0.05\nc-0.57,1.13-1.24,2.21-2,3.23c-0.77-0.13-1.54-0.2-2.32-0.22c-0.67,0-0.75,0.4-0.75,0.75c-0.01,0.53,0.22,1.03,0.62,1.38\nc0.13-0.31,0.38-0.73,1.63-0.73h0.13C10.11,29.13,9,30.06,9,30.77c0.06,0.66,0.59,1.18,1.25,1.24c-0.02-0.14-0.02-0.28,0-0.42\nc0.13-0.69,0.48-1.33,1-1.8c-0.01,0.1-0.01,0.2,0,0.3c0,1.43,0.13,2.08,1,2.08c0.31-0.01,0.61-0.12,0.86-0.31\nc-0.5-0.44-0.73-1.11-0.62-1.77c0-0.21,0-0.41,0-0.69c0.02-0.2,0.02-0.41,0-0.61c0.24-0.02,0.47-0.02,0.71,0\nc0,0,1.29-0.1,1.6,0.57c0.35-0.32,0.86-0.78,0.86-1.27c0-0.33-0.16-0.71-0.83-0.71c-0.25,0-1,0.16-1.7,0.16\nc0.48-0.84,1.04-1.64,1.66-2.39c0.1,0.39,0.31,0.74,0.62,1c0.12-1.17,0.54-2.28,1.21-3.24c0.16,0.93,0.24,1.87,0.23,2.82\nc0,3.55-0.85,6.17-2.66,6.67c0.26,0.46,0.73,0.75,1.25,0.78c0.66,0,1-0.75,1.39-1.46c0.19,0.53,0.72,1.8,1.25,1.8\ns1.06-1.27,1.25-1.8c0.37,0.71,0.73,1.46,1.39,1.46c0.52-0.03,1-0.33,1.26-0.78c-1.82-0.5-2.67-3.12-2.67-6.67\nc-0.01-0.95,0.07-1.89,0.23-2.82c0.68,0.96,1.1,2.07,1.21,3.24c0.31-0.26,0.53-0.61,0.63-1c0.61,0.75,1.15,1.54,1.62,2.38\nc-0.66,0-1.45-0.16-1.7-0.16c-0.67,0-0.82,0.38-0.82,0.71c0,0.49,0.51,1,0.86,1.27c0.3-0.67,1.59-0.57,1.59-0.57\nc0.24-0.02,0.47-0.02,0.71,0c-0.02,0.2-0.02,0.41,0,0.61v0.69c0.11,0.66-0.12,1.33-0.62,1.77c0.25,0.19,0.55,0.3,0.86,0.31\nc0.91,0,1-0.65,1-2.08c0.01-0.1,0.01-0.2,0-0.3c0.52,0.47,0.87,1.11,1,1.8c0.02,0.14,0.02,0.28,0,0.42\nc0.61-0.11,1.06-0.62,1.12-1.23c0-0.74-1.15-1.67-1.52-2.08h0.13c1.25,0,1.5,0.42,1.63,0.73c0.4-0.35,0.63-0.85,0.62-1.38\nc0-0.35-0.07-0.75-0.75-0.75c-0.78,0.02-1.55,0.09-2.32,0.22c-0.76-1.02-1.43-2.1-2-3.23c0.3,0.04,0.6,0.06,0.9,0.05\nc0.19,0.01,0.39-0.02,0.57-0.08c-2.07-1.79-3.8-4.12-3.8-6.76c0.02-0.44,0.1-0.88,0.24-1.3h0.16l5.24,8.39\nc1.57,2.48,2.8,2.43,4.65,2.43c-1.19-0.97-2.21-2.14-3-3.45l-4.92-7.87c0.27-0.08,0.53-0.18,0.79-0.28l4.35,7\nc1.57,2.48,2.8,2.44,4.65,2.44c-1.19-0.97-2.21-2.14-3-3.45l-4.23-6.77c0.24-0.13,0.48-0.27,0.7-0.41l3.42,5.55\nc1.57,2.49,2.8,2.44,4.65,2.44c-1.19-0.97-2.21-2.13-3-3.45l-3.55-5.69c0.2-0.18,0.4-0.38,0.59-0.58l2.52,4\nc1.57,2.48,2.8,2.44,4.65,2.44c-1.2-0.97-2.21-2.14-3-3.46l-2.99-4.7c0.16-0.29,0.29-0.59,0.4-0.9L31.25,12.23z\"\n\t></path>\n);\n\n@Component({\n\ttag: 'kol-logo',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolLogo implements Generic.Element.ComponentApi<RequiredProps, OptionalProps, RequiredStates, OptionalStates> {\n\t/**\n\t * Gibt die Abkürzung eines Ministeriums, eines Amts oder einer Bundesanstalt an.\n\t *\n\t * @deprecated Verwende stattdessen das Property _org.\n\t */\n\t@Prop() public _abbr?: Bundesministerium | Bundesamt | Bundesanstalt;\n\n\t/**\n\t * Gibt die Abkürzung eines Ministeriums, eines Amts oder einer Bundesanstalt an.\n\t */\n\t@Prop() public _org!: Bundesministerium | Bundesamt | Bundesanstalt;\n\n\t/**\n\t * @see: components/abbr/component.tsx (@State)\n\t */\n\t@State() public state: States = {\n\t\t_org: Bundesanstalt['Informationstechnikzentrum Bund'],\n\t};\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_abbr')\n\tpublic validateAbbr(value?: Bundesministerium | Bundesamt | Bundesanstalt): void {\n\t\tthis.validateOrg(value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_org')\n\tpublic validateOrg(value?: Bundesministerium | Bundesamt | Bundesanstalt): void {\n\t\tif (typeof value === 'string' && ENUM_AS_MAP.has(value)) {\n\t\t\tsetState(this, '_org', value);\n\t\t} else {\n\t\t\tdevHint(`Die verwendete Abkürzung (${value as string}) ist nicht definiert!`);\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.validateOrg(this._org || this._abbr);\n\t}\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<svg\n\t\t\t\taria-label={translate('kol-logo-description', { placeholders: { orgShort: this.state._org, orgLong: getAriaLabel(this.state._org) } })}\n\t\t\t\trole=\"img\"\n\t\t\t\tviewBox=\"0 0 225 100\"\n\t\t\t>\n\t\t\t\t<rect width=\"100%\" height=\"100%\" fill=\"white\"></rect>\n\t\t\t\t<svg x=\"0\" y=\"4\" height=\"75\">\n\t\t\t\t\t<Adler />\n\t\t\t\t</svg>\n\t\t\t\t<svg x=\"40.5\" y=\"3.5\" height=\"100\">\n\t\t\t\t\t<rect width=\"5\" height=\"30\"></rect>\n\t\t\t\t\t<rect y=\"30\" width=\"5\" height=\"30\" fill=\"red\"></rect>\n\t\t\t\t\t<rect y=\"60\" width=\"5\" height=\"30\" fill=\"#fc0\"></rect>\n\t\t\t\t</svg>\n\t\t\t\t<svg x=\"50\" y=\"0\">\n\t\t\t\t\t<text x=\"0\" y=\"-0.05em\" font-family=\"BundesSans Web\" style={{ backgroundColor: 'white', color: 'black' }}>\n\t\t\t\t\t\t{BUND_LOGO_TEXT_MAP.has(this.state._org) ? (\n\t\t\t\t\t\t\t<tspan>\n\t\t\t\t\t\t\t\t{BUND_LOGO_TEXT_MAP.get(this.state._org)?.map((text: string, index: number) => {\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<tspan x=\"0\" dy=\"1.1em\" key={`kol-logo-text-${index}`}>\n\t\t\t\t\t\t\t\t\t\t\t{text}\n\t\t\t\t\t\t\t\t\t\t</tspan>\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</tspan>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<tspan fill=\"red\">\n\t\t\t\t\t\t\t\t<tspan x=\"0\" dy=\"1.1em\">\n\t\t\t\t\t\t\t\t\tDer Schlüsselwert\n\t\t\t\t\t\t\t\t</tspan>\n\t\t\t\t\t\t\t\t<tspan x=\"0\" dy=\"1.1em\" font-weight=\"bold\">\n\t\t\t\t\t\t\t\t\t'{this.state._org}'\n\t\t\t\t\t\t\t\t</tspan>\n\t\t\t\t\t\t\t\t<tspan x=\"0\" dy=\"1.1em\">\n\t\t\t\t\t\t\t\t\tist nicht definiert.\n\t\t\t\t\t\t\t\t</tspan>\n\t\t\t\t\t\t\t\t<tspan x=\"0\" dy=\"1.1em\">\n\t\t\t\t\t\t\t\t\toder freigegeben.\n\t\t\t\t\t\t\t\t</tspan>\n\t\t\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AC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,0CAAE,GAAG,CAAC,CAAC,IAAY,EAAE,KAAa;MACzE,QACC,aAAO,CAAC,EAAC,GAAG,EAAC,EAAE,EAAC,OAAO,EAAC,GAAG,EAAE,iBAAiB,KAAK,EAAE,IACnD,IAAI,CACE,EACP;KACF,CAAC,CACK,KAER,aAAO,IAAI,EAAC,KAAK,IAChB,aAAO,CAAC,EAAC,GAAG,EAAC,EAAE,EAAC,OAAO,6BAEf,EACR,aAAO,CAAC,EAAC,GAAG,EAAC,EAAE,EAAC,OAAO,iBAAa,MAAM,SACvC,IAAI,CAAC,KAAK,CAAC,IAAI,MACV,EACR,aAAO,CAAC,EAAC,GAAG,EAAC,EAAE,EAAC,OAAO,2BAEf,EACR,aAAO,CAAC,EAAC,GAAG,EAAC,EAAE,EAAC,OAAO,wBAEf,CACD,CACR,CACK,CACF,CACD,EACL;GACF;;;;;;;;;;;;","names":[],"sources":["./src/components/logo/style.css?tag=kol-logo&mode=default&encapsulation=shadow","./src/components/logo/component.tsx"],"sourcesContent":["@import '../style.css';\n\ntext {\n\tfont-size: 16px;\n\tletter-spacing: normal !important;\n\tword-spacing: normal !important;\n}\n","import { Component, JSX, h, Prop, State, Watch } from '@stencil/core';\n\nimport { BUND_LOGO_TEXT_MAP, Bundesamt, Bundesanstalt, Bundesministerium } from '../../enums/bund';\nimport { Generic } from '@a11y-ui/core';\nimport { devHint } from '../../utils/a11y.tipps';\nimport { setState } from '../../utils/prop.validators';\nimport { translate } from '../../i18n';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction enumToArray(enumeration: any, enumAsMap: Map<string, string> = new Map()): Map<string, string> {\n\tObject.keys(enumeration as Record<string, unknown>).map((key) => {\n\t\t// eslint-disable-next-line\n\t\tenumAsMap.set(enumeration[key], key);\n\t});\n\treturn enumAsMap;\n}\n\nconst ENUM_AS_MAP = enumToArray(Bundesamt, enumToArray(Bundesanstalt, enumToArray(Bundesministerium)));\n\nfunction getAriaLabel(organ: string): string {\n\tif (ENUM_AS_MAP.has(organ)) {\n\t\treturn ENUM_AS_MAP.get(organ) as string;\n\t} else {\n\t\treturn '';\n\t}\n}\n\n/**\n * API\n */\ntype RequiredProps = {\n\torg: Bundesministerium | Bundesamt | Bundesanstalt;\n};\ntype OptionalProps = {\n\tabbr: Bundesministerium | Bundesamt | Bundesanstalt;\n};\n// type Props = Generic.Element.Members<RequiredProps, OptionalProps>;\n\ntype RequiredStates = RequiredProps;\ntype OptionalStates = OptionalProps;\ntype States = Generic.Element.Members<RequiredStates, OptionalStates>;\n\nconst Adler = (): JSX.Element => (\n\t<path\n\t\td=\"M21.72,12.77c0.04-0.33,0.06-0.67,0.06-1c0-0.2,0-0.43,0-0.69c3.06,0,5.74-2.25,5.74-4.78\nc-0.09-1.07-0.56-2.08-1.32-2.84l0.32-0.07c1,0.89,1.61,2.14,1.7,3.48c0,3-3,5.85-6.5,5.92 M18.64,2.21\nc-0.05-0.33-0.19-0.64-0.39-0.91c0-0.31,0.14-0.61,0.64-0.36c-0.27,0.27-0.06,0.76-0.06,0.76s0.55-0.26,0.44-0.62\nC20.09,1.28,19.5,2.38,18.64,2.21 M17.93,3.77c-0.12-0.47-0.34-0.9-0.64-1.27c-0.3-0.42-0.77-0.69-1.29-0.73\nc-0.34,0.03-0.68,0.12-1,0.25c-0.16-0.28-0.27-0.58-0.32-0.9c0-0.22,0.38-0.44,1.1-0.44c1.58,0,2.52,0.71,2.52,1.91\nC18.26,3.01,18.14,3.41,17.93,3.77 M22,24.16c0.13,0,0.26,0.02,0.38,0.07c0.64,1.3,1.4,2.53,2.29,3.68l0,0l0,0\nc0.81-0.14,1.63-0.22,2.45-0.24l0,0c0.1-0.01,0.2,0.01,0.28,0.07c0.07,0.09,0.1,0.2,0.09,0.31c-0.01,0.28-0.08,0.55-0.21,0.79\nc-0.46-0.4-1.07-0.59-1.68-0.51c-0.24,0.01-0.48,0.05-0.71,0.12h-0.07h-0.07l0.48,0.49c0.77,0.83,1.44,1.43,1.44,1.83\nc-0.04,0.31-0.22,0.58-0.48,0.74c-0.22-0.98-0.8-1.84-1.62-2.42h-0.06v0.27c0,0.19,0,0.47,0,0.77c0,1.49-0.15,1.72-0.67,1.72\nc-0.09,0.01-0.19,0.01-0.28,0c0.33-0.49,0.48-1.08,0.41-1.67v-0.7c0-0.27,0.03-0.53,0.06-0.8v-0.11h-0.08\nc-0.33-0.05-0.67-0.09-1-0.1c-0.57-0.07-1.14,0.07-1.6,0.41c-0.24-0.18-0.41-0.44-0.48-0.73c0-0.32,0.19-0.34,0.45-0.34\nc0.14-0.01,0.27-0.01,0.41,0c0.59,0.09,1.18,0.13,1.78,0.12h0.06v-0.06c-0.5-1.13-1.18-2.17-2-3.09c0.1-0.35,0.2-0.59,0.54-0.59\nM12.64,27.87v0.06h0.06c0.55-0.01,1.1-0.06,1.64-0.16c0.14-0.01,0.27-0.01,0.41,0c0.26,0,0.45,0,0.45,0.34\nc-0.07,0.29-0.24,0.55-0.48,0.73c-0.46-0.34-1.03-0.49-1.6-0.41c-0.33,0.01-0.67,0.05-1,0.1H12v0.11\nc0.03,0.27,0.06,0.53,0.06,0.8v0.7c-0.05,0.58,0.1,1.15,0.42,1.63c-0.09,0.01-0.19,0.01-0.28,0c-0.52,0-0.67-0.23-0.67-1.72\nc0-0.3,0-0.58,0-0.77V29l-0.06,0.05c-0.82,0.58-1.39,1.44-1.61,2.42c-0.28-0.14-0.47-0.4-0.53-0.7c0-0.43,0.65-1.07,1.39-1.81\nl0.43-0.43v-0.06h-0.14c-0.23-0.07-0.47-0.11-0.71-0.12c-0.61-0.08-1.22,0.11-1.68,0.51c-0.13-0.24-0.2-0.51-0.21-0.79\nc0.01-0.11,0.06-0.22,0.14-0.3c0.08-0.06,0.18-0.08,0.28-0.07l0,0c0.82,0.02,1.64,0.1,2.45,0.24l0,0l0,0\nc0.88-1.15,1.64-2.38,2.28-3.68c0.12-0.05,0.25-0.07,0.38-0.07c0.35,0,0.44,0.24,0.54,0.59c-0.82,0.92-1.5,1.96-2,3.09\nM7.78,6.87c0.08-1.36,0.7-2.62,1.72-3.52l0.32,0.07C9.06,4.19,8.6,5.19,8.51,6.26c0,2.56,2.73,4.78,5.82,4.78\nc0,0.22,0,0.45,0,0.69c-0.01,0.35,0,0.69,0.03,1.04c-3.5,0-6.58-2.86-6.58-5.92 M31.25,12.23c1.57,2.49,2.8,2.45,4.66,2.45\nc-1.19-0.97-2.21-2.14-3-3.46L30,6.65c-0.29-1.44-1.03-2.75-2.12-3.73c0.31-0.1,0.6-0.24,0.87-0.42c-1.88,0-3.73-1-4.75-1\nc-0.55-0.05-1.03,0.36-1.08,0.91c0,0.58,0.63,1.16,1.73,1.16c0.31,0,0.62-0.04,0.92-0.09c0.65,0.74,1.03,1.67,1.08,2.65\nc0,2-2.41,3.58-4.83,3.58h-0.41c-0.5-0.67-0.84-1.45-1-2.28c0-1.6,1.05-2.9,1.05-4.48c0-0.68-0.24-1.33-0.67-1.85\nc0.29-0.23,0.53-0.52,0.7-0.85c-0.22,0.08-0.45,0.11-0.68,0.09c-1.16,0-2.11-0.3-3-0.3c-0.53,0-0.67,0.16-0.67,0.31\nc-0.01,0.05-0.01,0.1,0,0.15c-0.19-0.08-0.39-0.13-0.59-0.17c-0.29-0.05-0.58-0.08-0.88-0.08c-1.13,0-1.52,0.47-1.52,0.87\nc0.07,0.52,0.27,1.01,0.57,1.44c0.4-0.2,0.84-0.31,1.28-0.34c0.6,0,1.13,0.57,1.41,1.24c-0.29,0.05-0.59,0.07-0.88,0.07\nc-0.68-0.03-1.36-0.16-2-0.39l0,0c0,0,0.31,0.56,0.92,0.78c0.72,0.22,1.46,0.37,2.21,0.45c-0.08,0.21-0.23,0.38-0.43,0.49\nc-0.05,0.02-0.09,0.02-0.14,0c-0.74-0.14-1.45-0.35-2.14-0.65H14.9c0,0.42,1.09,1.35,2.07,1.71c-1.06,1.1-1.87,2.41-2.39,3.85\nh-0.41c-2.42,0-4.82-1.57-4.82-3.58c0.05-0.98,0.43-1.91,1.07-2.65c0.3,0.05,0.61,0.09,0.92,0.09c1.1,0,1.69-0.58,1.74-1.16\nc-0.04-0.55-0.52-0.96-1.07-0.92c0,0,0,0-0.01,0c-1,0-2.88,1-4.76,1C7.51,2.73,7.8,2.87,8.11,2.97C7.03,3.94,6.29,5.23,6,6.65\nl-2.87,4.59c-0.79,1.32-1.81,2.49-3,3.46c1.86,0,3.09,0,4.66-2.45L6.26,9.9c0.11,0.31,0.24,0.61,0.4,0.9l-2.97,4.67\nc-0.79,1.32-1.8,2.49-3,3.46c1.85,0,3.08,0,4.65-2.44l2.52-4c0.19,0.2,0.39,0.4,0.6,0.58l-3.59,5.7c-0.79,1.32-1.8,2.49-3,3.45\nc1.85,0,3.08,0.05,4.65-2.44L10,14.2c0.22,0.14,0.46,0.28,0.7,0.41l-4.27,6.77c-0.79,1.31-1.81,2.48-3,3.45\nc1.85,0,3.08,0,4.65-2.44l4.36-7c0.25,0.1,0.51,0.2,0.78,0.28l-4.95,7.9c-0.79,1.31-1.81,2.48-3,3.45c1.85,0,3.08,0.05,4.65-2.43\nl5.24-8.39h0.16c0.14,0.42,0.22,0.86,0.24,1.3c0,2.64-1.73,5-3.8,6.76c0.19,0.06,0.38,0.09,0.58,0.08c0.3,0.01,0.6-0.01,0.9-0.05\nc-0.57,1.13-1.24,2.21-2,3.23c-0.77-0.13-1.54-0.2-2.32-0.22c-0.67,0-0.75,0.4-0.75,0.75c-0.01,0.53,0.22,1.03,0.62,1.38\nc0.13-0.31,0.38-0.73,1.63-0.73h0.13C10.11,29.13,9,30.06,9,30.77c0.06,0.66,0.59,1.18,1.25,1.24c-0.02-0.14-0.02-0.28,0-0.42\nc0.13-0.69,0.48-1.33,1-1.8c-0.01,0.1-0.01,0.2,0,0.3c0,1.43,0.13,2.08,1,2.08c0.31-0.01,0.61-0.12,0.86-0.31\nc-0.5-0.44-0.73-1.11-0.62-1.77c0-0.21,0-0.41,0-0.69c0.02-0.2,0.02-0.41,0-0.61c0.24-0.02,0.47-0.02,0.71,0\nc0,0,1.29-0.1,1.6,0.57c0.35-0.32,0.86-0.78,0.86-1.27c0-0.33-0.16-0.71-0.83-0.71c-0.25,0-1,0.16-1.7,0.16\nc0.48-0.84,1.04-1.64,1.66-2.39c0.1,0.39,0.31,0.74,0.62,1c0.12-1.17,0.54-2.28,1.21-3.24c0.16,0.93,0.24,1.87,0.23,2.82\nc0,3.55-0.85,6.17-2.66,6.67c0.26,0.46,0.73,0.75,1.25,0.78c0.66,0,1-0.75,1.39-1.46c0.19,0.53,0.72,1.8,1.25,1.8\ns1.06-1.27,1.25-1.8c0.37,0.71,0.73,1.46,1.39,1.46c0.52-0.03,1-0.33,1.26-0.78c-1.82-0.5-2.67-3.12-2.67-6.67\nc-0.01-0.95,0.07-1.89,0.23-2.82c0.68,0.96,1.1,2.07,1.21,3.24c0.31-0.26,0.53-0.61,0.63-1c0.61,0.75,1.15,1.54,1.62,2.38\nc-0.66,0-1.45-0.16-1.7-0.16c-0.67,0-0.82,0.38-0.82,0.71c0,0.49,0.51,1,0.86,1.27c0.3-0.67,1.59-0.57,1.59-0.57\nc0.24-0.02,0.47-0.02,0.71,0c-0.02,0.2-0.02,0.41,0,0.61v0.69c0.11,0.66-0.12,1.33-0.62,1.77c0.25,0.19,0.55,0.3,0.86,0.31\nc0.91,0,1-0.65,1-2.08c0.01-0.1,0.01-0.2,0-0.3c0.52,0.47,0.87,1.11,1,1.8c0.02,0.14,0.02,0.28,0,0.42\nc0.61-0.11,1.06-0.62,1.12-1.23c0-0.74-1.15-1.67-1.52-2.08h0.13c1.25,0,1.5,0.42,1.63,0.73c0.4-0.35,0.63-0.85,0.62-1.38\nc0-0.35-0.07-0.75-0.75-0.75c-0.78,0.02-1.55,0.09-2.32,0.22c-0.76-1.02-1.43-2.1-2-3.23c0.3,0.04,0.6,0.06,0.9,0.05\nc0.19,0.01,0.39-0.02,0.57-0.08c-2.07-1.79-3.8-4.12-3.8-6.76c0.02-0.44,0.1-0.88,0.24-1.3h0.16l5.24,8.39\nc1.57,2.48,2.8,2.43,4.65,2.43c-1.19-0.97-2.21-2.14-3-3.45l-4.92-7.87c0.27-0.08,0.53-0.18,0.79-0.28l4.35,7\nc1.57,2.48,2.8,2.44,4.65,2.44c-1.19-0.97-2.21-2.14-3-3.45l-4.23-6.77c0.24-0.13,0.48-0.27,0.7-0.41l3.42,5.55\nc1.57,2.49,2.8,2.44,4.65,2.44c-1.19-0.97-2.21-2.13-3-3.45l-3.55-5.69c0.2-0.18,0.4-0.38,0.59-0.58l2.52,4\nc1.57,2.48,2.8,2.44,4.65,2.44c-1.2-0.97-2.21-2.14-3-3.46l-2.99-4.7c0.16-0.29,0.29-0.59,0.4-0.9L31.25,12.23z\"\n\t></path>\n);\n\n@Component({\n\ttag: 'kol-logo',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolLogo implements Generic.Element.ComponentApi<RequiredProps, OptionalProps, RequiredStates, OptionalStates> {\n\t/**\n\t * Gibt die Abkürzung eines Ministeriums, eines Amts oder einer Bundesanstalt an.\n\t *\n\t * @deprecated Verwende stattdessen das Property _org.\n\t */\n\t@Prop() public _abbr?: Bundesministerium | Bundesamt | Bundesanstalt;\n\n\t/**\n\t * Gibt die Abkürzung eines Ministeriums, eines Amts oder einer Bundesanstalt an.\n\t */\n\t@Prop() public _org!: Bundesministerium | Bundesamt | Bundesanstalt;\n\n\t/**\n\t * @see: components/abbr/component.tsx (@State)\n\t */\n\t@State() public state: States = {\n\t\t_org: Bundesanstalt['Informationstechnikzentrum Bund'],\n\t};\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_abbr')\n\tpublic validateAbbr(value?: Bundesministerium | Bundesamt | Bundesanstalt): void {\n\t\tthis.validateOrg(value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_org')\n\tpublic validateOrg(value?: Bundesministerium | Bundesamt | Bundesanstalt): void {\n\t\tif (typeof value === 'string' && ENUM_AS_MAP.has(value)) {\n\t\t\tsetState(this, '_org', value);\n\t\t} else {\n\t\t\tdevHint(`Die verwendete Abkürzung (${value as string}) ist nicht definiert!`);\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.validateOrg(this._org || this._abbr);\n\t}\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<svg\n\t\t\t\taria-label={translate('kol-logo-description', { placeholders: { orgShort: this.state._org, orgLong: getAriaLabel(this.state._org) } })}\n\t\t\t\trole=\"img\"\n\t\t\t\tviewBox=\"0 0 225 100\"\n\t\t\t>\n\t\t\t\t<rect width=\"100%\" height=\"100%\" fill=\"white\"></rect>\n\t\t\t\t<svg x=\"0\" y=\"4\" height=\"75\">\n\t\t\t\t\t<Adler />\n\t\t\t\t</svg>\n\t\t\t\t<svg x=\"40.5\" y=\"3.5\" height=\"100\">\n\t\t\t\t\t<rect width=\"5\" height=\"30\"></rect>\n\t\t\t\t\t<rect y=\"30\" width=\"5\" height=\"30\" fill=\"red\"></rect>\n\t\t\t\t\t<rect y=\"60\" width=\"5\" height=\"30\" fill=\"#fc0\"></rect>\n\t\t\t\t</svg>\n\t\t\t\t<svg x=\"50\" y=\"0\">\n\t\t\t\t\t<text x=\"0\" y=\"-0.05em\" font-family=\"BundesSans Web\" style={{ backgroundColor: 'white', color: 'black' }}>\n\t\t\t\t\t\t{BUND_LOGO_TEXT_MAP.has(this.state._org) ? (\n\t\t\t\t\t\t\t<tspan>\n\t\t\t\t\t\t\t\t{BUND_LOGO_TEXT_MAP.get(this.state._org)?.map((text: string, index: number) => {\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<tspan x=\"0\" dy=\"1.1em\" key={`kol-logo-text-${index}`}>\n\t\t\t\t\t\t\t\t\t\t\t{text}\n\t\t\t\t\t\t\t\t\t\t</tspan>\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</tspan>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<tspan fill=\"red\">\n\t\t\t\t\t\t\t\t<tspan x=\"0\" dy=\"1.1em\">\n\t\t\t\t\t\t\t\t\tDer Schlüsselwert\n\t\t\t\t\t\t\t\t</tspan>\n\t\t\t\t\t\t\t\t<tspan x=\"0\" dy=\"1.1em\" font-weight=\"bold\">\n\t\t\t\t\t\t\t\t\t'{this.state._org}'\n\t\t\t\t\t\t\t\t</tspan>\n\t\t\t\t\t\t\t\t<tspan x=\"0\" dy=\"1.1em\">\n\t\t\t\t\t\t\t\t\tist nicht definiert.\n\t\t\t\t\t\t\t\t</tspan>\n\t\t\t\t\t\t\t\t<tspan x=\"0\" dy=\"1.1em\">\n\t\t\t\t\t\t\t\t\toder freigegeben.\n\t\t\t\t\t\t\t\t</tspan>\n\t\t\t\t\t\t\t</tspan>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</text>\n\t\t\t\t</svg>\n\t\t\t</svg>\n\t\t);\n\t}\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as registerInstance,h,H as Host}from"./index-50adf9a0.js";import{f as featureHint}from"./a11y.tipps-a876ebb7.js";import{d as getKoliBri}from"./dev.utils-ec1c1b88.js";import{a as watchValidator,w as watchString,s as setState,b as watchBoolean}from"./prop.validators-dd337216.js";import"./reuse-9dd1192b.js";import"./index-599f5430.js";const defaultStyleCss=":host{--kolibri-border-color:#e0e0e0;--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;hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}:host{font-family:var(--kolibri-font-family);font-size:inherit}:host *{box-sizing:border-box}:host kol-icon{color:inherit}:host kol-span-wc{display:grid;place-items:center;width:100%}:host kol-span-wc>span{display:flex;gap:var(--kolibri-spacing);place-items:center}:host button{margin:0;min-height:44px;min-width:44px;padding:0}:host a,:host button,:host input,:host select,:host textarea{cursor:pointer}:host a.icon-only>kol-span-wc>span>span,:host button.icon-only>kol-span-wc>span>span{display:none}:host a{display:inline-flex;place-items:baseline}:host button{background-color:transparent;border-width:0}:host>div{width:100%;height:100%;z-index:100;position:fixed;left:0;top:0;background-color:rgba(0, 0, 0, 0.33)}:host>div>div{height:100%;padding:calc(4 * var(--kolibri-spacing));position:absolute;width:100%}:host>div>div>div{position:relative;max-height:100%;max-width:100%;overflow-x:hidden;overflow-y:auto;left:50%;top:50%;transform:translate(-50%, -50%)}",KolModal=class{constructor(t){registerInstance(this,t),this.onKeyDown=t=>{t&&"Escape"===t.code&&(this._activeElement=null)},this._activeElement=void 0,this._ariaLabel=void 0,this._width="100%",this._on=void 0,this._show=!1,this.state={_activeElement:null,_ariaLabel:"…",_show:!1,_width:"100%"}}componentDidRender(){this.hostElement&&(this.state._activeElement?getKoliBri().Modal.openModal(this.hostElement,this.state._activeElement):getKoliBri().Modal.closeModal(this.hostElement))}disconnectedCallback(){this.hostElement&&getKoliBri().Modal.closeModal(this.hostElement)}render(){return h(Host,{ref:t=>{this.hostElement=t}},this.state._activeElement&&h("div",null,h("div",null,h("div",{style:{width:this.state._width},"aria-label":this.state._ariaLabel,"aria-modal":"true",role:"dialog",onKeyDown:this.onKeyDown,ref:t=>{t&&(t.setAttribute("tabindex","0"),setTimeout((()=>t.focus()),250))}},h("slot",null)))))}validateActiveElement(t){watchValidator(this,"_activeElement",(t=>"object"==typeof t||null===t),new Set(["HTMLElement","null"]),t,{defaultValue:null})}validateAriaLabel(t){watchString(this,"_ariaLabel",t,{required:!0})}validateOn(t){if("object"==typeof t&&null!==t){featureHint("[KolTabs] Prüfen, wie man auch einen EventCallback einzeln ändern kann.");const i={};"function"!=typeof t.onClose&&!0!==t.onClose||(i.onClose=t.onClose),setState(this,"_on",i)}}validateShow(t){watchBoolean(this,"_show",t,{defaultValue:!1,hooks:{afterPatch:()=>{!1===this.state._show&&(this._activeElement=null)}}})}validateWidth(t){watchString(this,"_width",t,{defaultValue:"100%"})}componentWillLoad(){this.validateActiveElement(this._activeElement),this.validateAriaLabel(this._ariaLabel),this.validateOn(this._on),this.validateShow(this._show),this.validateWidth(this._width)}static get watchers(){return{_activeElement:["validateActiveElement"],_ariaLabel:["validateAriaLabel"],_on:["validateOn"],_show:["validateShow"],_width:["validateWidth"]}}};KolModal.style={default:defaultStyleCss};export{KolModal as kol_modal};
4
+ import{r as registerInstance,h,H as Host}from"./index-50adf9a0.js";import{f as featureHint}from"./a11y.tipps-a876ebb7.js";import{d as getKoliBri}from"./dev.utils-ec1c1b88.js";import{a as watchValidator,w as watchString,s as setState,b as watchBoolean}from"./prop.validators-dd337216.js";import"./reuse-9dd1192b.js";import"./index-599f5430.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;hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}:host{font-family:var(--kolibri-font-family);font-size:inherit}*{box-sizing:border-box}kol-icon{color:inherit}kol-span-wc{display:grid;place-items:center;width:100%}kol-span-wc>span{display:flex;gap:var(--kolibri-spacing);place-items:center}a{display:inline-flex;place-items:baseline}button{background-color:transparent;border-width:0;margin:0;min-height:44px;min-width:44px;padding:0}a,button,input,select,textarea{cursor:pointer}a.icon-only>kol-span-wc>span>span,:host button.icon-only>kol-span-wc>span>span{display:none}:host>div{width:100%;height:100%;z-index:100;position:fixed;left:0;top:0;background-color:rgba(0, 0, 0, 0.33)}:host>div>div{height:100%;padding:calc(4 * var(--kolibri-spacing));position:absolute;width:100%}:host>div>div>div{position:relative;max-height:100%;max-width:100%;overflow-x:hidden;overflow-y:auto;left:50%;top:50%;transform:translate(-50%, -50%)}",KolModal=class{constructor(t){registerInstance(this,t),this.onKeyDown=t=>{t&&"Escape"===t.code&&(this._activeElement=null)},this._activeElement=void 0,this._ariaLabel=void 0,this._width="100%",this._on=void 0,this._show=!1,this.state={_activeElement:null,_ariaLabel:"…",_show:!1,_width:"100%"}}componentDidRender(){this.hostElement&&(this.state._activeElement?getKoliBri().Modal.openModal(this.hostElement,this.state._activeElement):getKoliBri().Modal.closeModal(this.hostElement))}disconnectedCallback(){this.hostElement&&getKoliBri().Modal.closeModal(this.hostElement)}render(){return h(Host,{ref:t=>{this.hostElement=t}},this.state._activeElement&&h("div",null,h("div",null,h("div",{style:{width:this.state._width},"aria-label":this.state._ariaLabel,"aria-modal":"true",role:"dialog",onKeyDown:this.onKeyDown,ref:t=>{t&&(t.setAttribute("tabindex","0"),setTimeout((()=>t.focus()),250))}},h("slot",null)))))}validateActiveElement(t){watchValidator(this,"_activeElement",(t=>"object"==typeof t||null===t),new Set(["HTMLElement","null"]),t,{defaultValue:null})}validateAriaLabel(t){watchString(this,"_ariaLabel",t,{required:!0})}validateOn(t){if("object"==typeof t&&null!==t){featureHint("[KolTabs] Prüfen, wie man auch einen EventCallback einzeln ändern kann.");const i={};"function"!=typeof t.onClose&&!0!==t.onClose||(i.onClose=t.onClose),setState(this,"_on",i)}}validateShow(t){watchBoolean(this,"_show",t,{defaultValue:!1,hooks:{afterPatch:()=>{!1===this.state._show&&(this._activeElement=null)}}})}validateWidth(t){watchString(this,"_width",t,{defaultValue:"100%"})}componentWillLoad(){this.validateActiveElement(this._activeElement),this.validateAriaLabel(this._ariaLabel),this.validateOn(this._on),this.validateShow(this._show),this.validateWidth(this._width)}static get watchers(){return{_activeElement:["validateActiveElement"],_ariaLabel:["validateAriaLabel"],_on:["validateOn"],_show:["validateShow"],_width:["validateWidth"]}}};KolModal.style={default:defaultStyleCss};export{KolModal as kol_modal};
@@ -1 +1 @@
1
- {"file":"kol-modal.entry.js","mappings":";;;;;;;;;;AAAA,MAAM,eAAe,GAAG,kpDAAkpD;;MC4C7pD,QAAQ;;;IAmBH,cAAS,GAAG,CAAC,KAAoB;MACjD,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE;QACrC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;OAC3B;KACD,CAAC;;;kBAiD+B,MAAM;;iBAUW,KAAK;iBAKvB;MAC/B,cAAc,EAAE,IAAI;MACpB,UAAU,EAAE,GAAG;MACf,KAAK,EAAE,KAAK;MACZ,MAAM,EAAE,MAAM;KACd;;EAzFM,kBAAkB;IACxB,IAAI,IAAI,CAAC,WAAW,EAAmC;MACtD,IAAI,IAAI,CAAC,KAAK,CAAC,cAAc,EAAmC;QAC9D,UAAU,EAAE,CAAC,KAAsB,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;OAC5F;WAAM;QACL,UAAU,EAAE,CAAC,KAAsB,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;OA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AChD,WAAW,CAAC,yEAAyE,CAAC,CAAC;MACvF,MAAM,SAAS,GAA+B,EAAE,CAAC;MACjD,IAAI,OAAO,KAAK,CAAC,OAAO,KAAK,UAAU,IAAI,KAAK,CAAC,OAAO,KAAK,IAAI,EAAE;QAClE,SAAS,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;OAClC;MACD,QAAQ,CAA6B,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;KAC7D;GACD;EAMM,YAAY,CAAC,KAAe;IAClC,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE;MAClC,YAAY,EAAE,KAAK;MACnB,KAAK,EAAE;QACN,UAAU,EAAE;UACX,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,KAAK,EAAE;YAC/B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;WAC3B;SACD;OACD;KACD,CAAC,CAAC;GACH;EAMM,aAAa,CAAC,KAAc;IAClC,WAAW,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE;MAClC,YAAY,EAAE,MAAM;KACpB,CAAC,CAAC;GACH;EAKM,iBAAiB;IACvB,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IAChD,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACxC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC1B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9B,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;GAChC;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/modal/style.css?tag=kol-modal&mode=default&encapsulation=shadow","./src/components/modal/component.tsx"],"sourcesContent":["@import '../style.css';\n\n:host > div {\n\twidth: 100%;\n\theight: 100%;\n\tz-index: 100;\n\tposition: fixed;\n\tleft: 0;\n\ttop: 0;\n\tbackground-color: rgba(0, 0, 0, 0.33);\n}\n:host > div > div {\n\theight: 100%;\n\tpadding: calc(4 * var(--kolibri-spacing));\n\tposition: absolute;\n\twidth: 100%;\n}\n:host > div > div > div {\n\tposition: relative;\n\tmax-height: 100%;\n\tmax-width: 100%;\n\toverflow-x: hidden;\n\toverflow-y: auto;\n\tleft: 50%;\n\ttop: 50%;\n\ttransform: translate(-50%, -50%);\n}\n","/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */\nimport { Component, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { Generic } from '@a11y-ui/core';\nimport { AriaLabel } from '../../types/aria-label';\nimport { KoliBriModalEventCallbacks } from '../../types/modal';\nimport { featureHint } from '../../utils/a11y.tipps';\nimport { getKoliBri } from '../../utils/dev.utils';\nimport { setState, watchBoolean, watchString, watchValidator } from '../../utils/prop.validators';\nimport { ModalService } from './service';\n\n/**\n * https://en.wikipedia.org/wiki/Modal_window\n */\n\n/**\n * API\n */\ntype RequiredProps = AriaLabel;\ntype OptionalProps = {\n\tactiveElement: HTMLElement | null;\n\ton: KoliBriModalEventCallbacks;\n\twidth: string;\n\tshow: boolean;\n};\n// type Props = Generic.Element.Members<RequiredProps, OptionalProps>;\n\ntype RequiredStates = AriaLabel & {\n\tactiveElement: HTMLElement | null;\n\twidth: string;\n};\ntype OptionalStates = {\n\ton: KoliBriModalEventCallbacks;\n\tshow: boolean;\n};\ntype States = Generic.Element.Members<RequiredStates, OptionalStates>;\n\n@Component({\n\ttag: 'kol-modal',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolModal implements Generic.Element.ComponentApi<RequiredProps, OptionalProps, RequiredStates, OptionalStates> {\n\tprivate hostElement?: HTMLElement;\n\n\tpublic componentDidRender(): void {\n\t\tif (this.hostElement /* SSR instanceof HTMLElement */) {\n\t\t\tif (this.state._activeElement /* SSR instanceof HTMLElement */) {\n\t\t\t\t(getKoliBri().Modal as ModalService).openModal(this.hostElement, this.state._activeElement);\n\t\t\t} else {\n\t\t\t\t(getKoliBri().Modal as ModalService).closeModal(this.hostElement);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic disconnectedCallback(): void {\n\t\tif (this.hostElement /* SSR instanceof HTMLElement */) {\n\t\t\t(getKoliBri().Modal as ModalService).closeModal(this.hostElement);\n\t\t}\n\t}\n\n\tprivate readonly onKeyDown = (event: KeyboardEvent) => {\n\t\tif (event && event.code === 'Escape') {\n\t\t\tthis._activeElement = null;\n\t\t}\n\t};\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tref={(el) => {\n\t\t\t\t\tthis.hostElement = el as HTMLElement;\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{this.state._activeElement /* SSR instanceof HTMLElement */ && (\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\twidth: this.state._width,\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\taria-label={this.state._ariaLabel}\n\t\t\t\t\t\t\t\taria-modal=\"true\"\n\t\t\t\t\t\t\t\trole=\"dialog\"\n\t\t\t\t\t\t\t\tonKeyDown={this.onKeyDown}\n\t\t\t\t\t\t\t\tref={(el) => {\n\t\t\t\t\t\t\t\t\tif (el /* SSR instanceof HTMLElement */) {\n\t\t\t\t\t\t\t\t\t\tel.setAttribute('tabindex', '0');\n\t\t\t\t\t\t\t\t\t\tsetTimeout(() => el.focus(), 250);\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>\n\t\t\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Gibt die Referenz auf das auslösende HTML-Element an, wodurch das Modal geöffnet wurde.\n\t */\n\t@Prop({ mutable: true }) public _activeElement?: HTMLElement | null;\n\n\t/**\n\t * 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, wie breit der Anzeigebereich sein soll (<= max-width: 100%).\n\t */\n\t@Prop() public _width?: string = '100%';\n\n\t/**\n\t * Gibt die EventCallback-Function für das Schließen des Modals an.\n\t */\n\t@Prop() public _on?: KoliBriModalEventCallbacks;\n\n\t/**\n\t * Gibt an, ob das Modal angezeigt wird.\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\t\t_activeElement: null,\n\t\t_ariaLabel: '…',\n\t\t_show: false,\n\t\t_width: '100%',\n\t};\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_activeElement')\n\tpublic validateActiveElement(value?: HTMLElement | null): void {\n\t\twatchValidator(this, '_activeElement', (value): boolean => typeof value === 'object' || value === null, new Set(['HTMLElement', 'null']), value, {\n\t\t\tdefaultValue: null,\n\t\t});\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('_on')\n\tpublic validateOn(value?: KoliBriModalEventCallbacks): void {\n\t\tif (typeof value === 'object' && value !== null) {\n\t\t\tfeatureHint('[KolTabs] Prüfen, wie man auch einen EventCallback einzeln ändern kann.');\n\t\t\tconst callbacks: KoliBriModalEventCallbacks = {};\n\t\t\tif (typeof value.onClose === 'function' || value.onClose === true) {\n\t\t\t\tcallbacks.onClose = value.onClose;\n\t\t\t}\n\t\t\tsetState<KoliBriModalEventCallbacks>(this, '_on', callbacks);\n\t\t}\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_show')\n\tpublic validateShow(value?: boolean): void {\n\t\twatchBoolean(this, '_show', value, {\n\t\t\tdefaultValue: false,\n\t\t\thooks: {\n\t\t\t\tafterPatch: () => {\n\t\t\t\t\tif (this.state._show === false) {\n\t\t\t\t\t\tthis._activeElement = null;\n\t\t\t\t\t}\n\t\t\t\t},\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('_width')\n\tpublic validateWidth(value?: string): void {\n\t\twatchString(this, '_width', value, {\n\t\t\tdefaultValue: '100%',\n\t\t});\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (componentWillLoad)\n\t */\n\tpublic componentWillLoad(): void {\n\t\tthis.validateActiveElement(this._activeElement);\n\t\tthis.validateAriaLabel(this._ariaLabel);\n\t\tthis.validateOn(this._on);\n\t\tthis.validateShow(this._show);\n\t\tthis.validateWidth(this._width);\n\t}\n}\n"],"version":3}
1
+ {"file":"kol-modal.entry.js","mappings":";;;;;;;;;;AAAA,MAAM,eAAe,GAAG,0jDAA0jD;;MC4CrkD,QAAQ;;;IAmBH,cAAS,GAAG,CAAC,KAAoB;MACjD,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE;QACrC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;OAC3B;KACD,CAAC;;;kBAiD+B,MAAM;;iBAUW,KAAK;iBAKvB;MAC/B,cAAc,EAAE,IAAI;MACpB,UAAU,EAAE,GAAG;MACf,KAAK,EAAE,KAAK;MACZ,MAAM,EAAE,MAAM;KACd;;EAzFM,kBAAkB;IACxB,IAAI,IAAI,CAAC,WAAW,EAAmC;MACtD,IAAI,IAAI,CAAC,KAAK,CAAC,cAAc,EAAmC;QAC9D,UAAU,EAAE,CAAC,KAAsB,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI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ow","./src/components/modal/component.tsx"],"sourcesContent":["@import '../style.css';\n\n:host > div {\n\twidth: 100%;\n\theight: 100%;\n\tz-index: 100;\n\tposition: fixed;\n\tleft: 0;\n\ttop: 0;\n\tbackground-color: rgba(0, 0, 0, 0.33);\n}\n:host > div > div {\n\theight: 100%;\n\tpadding: calc(4 * var(--kolibri-spacing));\n\tposition: absolute;\n\twidth: 100%;\n}\n:host > div > div > div {\n\tposition: relative;\n\tmax-height: 100%;\n\tmax-width: 100%;\n\toverflow-x: hidden;\n\toverflow-y: auto;\n\tleft: 50%;\n\ttop: 50%;\n\ttransform: translate(-50%, -50%);\n}\n","/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */\nimport { Component, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { Generic } from '@a11y-ui/core';\nimport { AriaLabel } from '../../types/aria-label';\nimport { KoliBriModalEventCallbacks } from '../../types/modal';\nimport { featureHint } from '../../utils/a11y.tipps';\nimport { getKoliBri } from '../../utils/dev.utils';\nimport { setState, watchBoolean, watchString, watchValidator } from '../../utils/prop.validators';\nimport { ModalService } from './service';\n\n/**\n * https://en.wikipedia.org/wiki/Modal_window\n */\n\n/**\n * API\n */\ntype RequiredProps = AriaLabel;\ntype OptionalProps = {\n\tactiveElement: HTMLElement | null;\n\ton: KoliBriModalEventCallbacks;\n\twidth: string;\n\tshow: boolean;\n};\n// type Props = Generic.Element.Members<RequiredProps, OptionalProps>;\n\ntype RequiredStates = AriaLabel & {\n\tactiveElement: HTMLElement | null;\n\twidth: string;\n};\ntype OptionalStates = {\n\ton: KoliBriModalEventCallbacks;\n\tshow: boolean;\n};\ntype States = Generic.Element.Members<RequiredStates, OptionalStates>;\n\n@Component({\n\ttag: 'kol-modal',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolModal implements Generic.Element.ComponentApi<RequiredProps, OptionalProps, RequiredStates, OptionalStates> {\n\tprivate hostElement?: HTMLElement;\n\n\tpublic componentDidRender(): void {\n\t\tif (this.hostElement /* SSR instanceof HTMLElement */) {\n\t\t\tif (this.state._activeElement /* SSR instanceof HTMLElement */) {\n\t\t\t\t(getKoliBri().Modal as ModalService).openModal(this.hostElement, this.state._activeElement);\n\t\t\t} else {\n\t\t\t\t(getKoliBri().Modal as ModalService).closeModal(this.hostElement);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic disconnectedCallback(): void {\n\t\tif (this.hostElement /* SSR instanceof HTMLElement */) {\n\t\t\t(getKoliBri().Modal as ModalService).closeModal(this.hostElement);\n\t\t}\n\t}\n\n\tprivate readonly onKeyDown = (event: KeyboardEvent) => {\n\t\tif (event && event.code === 'Escape') {\n\t\t\tthis._activeElement = null;\n\t\t}\n\t};\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tref={(el) => {\n\t\t\t\t\tthis.hostElement = el as HTMLElement;\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{this.state._activeElement /* SSR instanceof HTMLElement */ && (\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\twidth: this.state._width,\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\taria-label={this.state._ariaLabel}\n\t\t\t\t\t\t\t\taria-modal=\"true\"\n\t\t\t\t\t\t\t\trole=\"dialog\"\n\t\t\t\t\t\t\t\tonKeyDown={this.onKeyDown}\n\t\t\t\t\t\t\t\tref={(el) => {\n\t\t\t\t\t\t\t\t\tif (el /* SSR instanceof HTMLElement */) {\n\t\t\t\t\t\t\t\t\t\tel.setAttribute('tabindex', '0');\n\t\t\t\t\t\t\t\t\t\tsetTimeout(() => el.focus(), 250);\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>\n\t\t\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Gibt die Referenz auf das auslösende HTML-Element an, wodurch das Modal geöffnet wurde.\n\t */\n\t@Prop({ mutable: true }) public _activeElement?: HTMLElement | null;\n\n\t/**\n\t * 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, wie breit der Anzeigebereich sein soll (<= max-width: 100%).\n\t */\n\t@Prop() public _width?: string = '100%';\n\n\t/**\n\t * Gibt die EventCallback-Function für das Schließen des Modals an.\n\t */\n\t@Prop() public _on?: KoliBriModalEventCallbacks;\n\n\t/**\n\t * Gibt an, ob das Modal angezeigt wird.\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\t\t_activeElement: null,\n\t\t_ariaLabel: '…',\n\t\t_show: false,\n\t\t_width: '100%',\n\t};\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_activeElement')\n\tpublic validateActiveElement(value?: HTMLElement | null): void {\n\t\twatchValidator(this, '_activeElement', (value): boolean => typeof value === 'object' || value === null, new Set(['HTMLElement', 'null']), value, {\n\t\t\tdefaultValue: null,\n\t\t});\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('_on')\n\tpublic validateOn(value?: KoliBriModalEventCallbacks): void {\n\t\tif (typeof value === 'object' && value !== null) {\n\t\t\tfeatureHint('[KolTabs] Prüfen, wie man auch einen EventCallback einzeln ändern kann.');\n\t\t\tconst callbacks: KoliBriModalEventCallbacks = {};\n\t\t\tif (typeof value.onClose === 'function' || value.onClose === true) {\n\t\t\t\tcallbacks.onClose = value.onClose;\n\t\t\t}\n\t\t\tsetState<KoliBriModalEventCallbacks>(this, '_on', callbacks);\n\t\t}\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_show')\n\tpublic validateShow(value?: boolean): void {\n\t\twatchBoolean(this, '_show', value, {\n\t\t\tdefaultValue: false,\n\t\t\thooks: {\n\t\t\t\tafterPatch: () => {\n\t\t\t\t\tif (this.state._show === false) {\n\t\t\t\t\t\tthis._activeElement = null;\n\t\t\t\t\t}\n\t\t\t\t},\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('_width')\n\tpublic validateWidth(value?: string): void {\n\t\twatchString(this, '_width', value, {\n\t\t\tdefaultValue: '100%',\n\t\t});\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (componentWillLoad)\n\t */\n\tpublic componentWillLoad(): void {\n\t\tthis.validateActiveElement(this._activeElement);\n\t\tthis.validateAriaLabel(this._ariaLabel);\n\t\tthis.validateOn(this._on);\n\t\tthis.validateShow(this._show);\n\t\tthis.validateWidth(this._width);\n\t}\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as registerInstance,h,H as Host}from"./index-50adf9a0.js";import{d as devHint,b as a11yHintLabelingLandmarks}from"./a11y.tipps-a876ebb7.js";import{a as watchValidator,w as watchString,b as watchBoolean}from"./prop.validators-dd337216.js";import{w as watchNavLinks}from"./validation-68f4e65e.js";import{a as translate}from"./i18n-e297566c.js";import"./dev.utils-ec1c1b88.js";import"./reuse-9dd1192b.js";import"./index-599f5430.js";const defaultStyleCss=":host{--kolibri-border-color:#e0e0e0;--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;hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}:host{font-family:var(--kolibri-font-family);font-size:inherit}:host *{box-sizing:border-box}:host kol-icon{color:inherit}:host kol-span-wc{display:grid;place-items:center;width:100%}:host kol-span-wc>span{display:flex;gap:var(--kolibri-spacing);place-items:center}:host button{margin:0;min-height:44px;min-width:44px;padding:0}:host a,:host button,:host input,:host select,:host textarea{cursor:pointer}:host a.icon-only>kol-span-wc>span>span,:host button.icon-only>kol-span-wc>span>span{display:none}:host a{display:inline-flex;place-items:baseline}:host button{background-color:transparent;border-width:0}:host>div{display:inline-block}",UNIQUE_ARIA_LABEL=[],removeAriaLabel=a=>{const t=UNIQUE_ARIA_LABEL.indexOf(a);t>=0&&UNIQUE_ARIA_LABEL.splice(t,1)},KolNav=class{constructor(a){registerInstance(this,a),this.onClick=a=>{a._active=!1===a._active,this.state=Object.assign({},this.state)},this.hasActiveChild=a=>!!(Array.isArray(a._children)&&a._children.length>0)&&a._children.some(this.hasActiveChild),this.linkList=a=>h("ul",{class:{flex:0===a.deep&&"horizontal"===this.state._orientation},part:`nav ${this.state._orientation}`},a.links.map(((t,i)=>h("li",{key:i,part:`li ${0===a.deep?this.state._orientation:"vertical"}${t._active?" selected":""}${i<a.links.length-1?"":" last"}`},Array.isArray(t._children)&&t._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===t._active?",selected":""),_ariaLabel:!0===this.state._compact||!0===t._iconOnly?t._label:void 0,_ariaExpanded:!0===t._active,_disabled:t._disabled,_href:"javascript:void(0)",_icon:!0===this.state._collapsible?!0===t._active?"fa-solid fa-minus":"fa-solid fa-plus":"string"==typeof t._icon?t._icon:"fa-solid fa-link-slash",_iconOnly:!0===this.state._compact||!0===t._iconOnly,_label:t._label,onClick:()=>this.onClick(t)})),!0===t._active&&h("div",{class:{expanded:!0,active:!0===t._active,"active-child":this.hasActiveChild(t),"absolute ":0===a.deep&&"horizontal"===this.state._orientation}},h(this.linkList,{links:t._children,deep:a.deep+1}))):h("div",{class:{"h-full":!0,"text-center":!0===this.state._compact||!0===t._iconOnly}},h("kol-link-wc",{class:{"block w-full h-full":!0,active:!0===t._active},exportparts:"icon,link,span"+(!0===t._active?",selected":""),_ariaCurrent:!0===t._active&&this.state._ariaCurrentValue,_ariaLabel:!0===this.state._compact||!0===t._iconOnly?t._label:void 0,_href:t._href,_icon:"string"==typeof t._icon?t._icon:"fa-solid fa-link-slash","_icon-only":!0===this.state._compact||!0===t._iconOnly,_label:t._label,_on:t._on,_selector:t._selector,_tooltipAlign:t._tooltipAlign,_target:t._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 a=this.state._hasCompactButton;return"horizontal"===this.state._orientation&&!0===this.state._hasCompactButton&&(a=!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})),a&&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(a){watchValidator(this,"_ariaCurrentValue",(a=>!0===a||"date"===a||"location"===a||"page"===a||"step"===a||"time"===a),new Set(["boolean","String {data, location, page, step, time}"]),a)}validateAriaLabel(a){watchString(this,"_ariaLabel",a,{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(a)}validateCollapsible(a){watchBoolean(this,"_collapsible",a)}validateCompact(a){watchBoolean(this,"_compact",a)}validateHasCompactButton(a){watchBoolean(this,"_hasCompactButton",a)}validateLinks(a){watchNavLinks("KolNav",this,a),devHint("[KolNav] Die Navigationsstruktur wird noch nicht rekursiv validiert.")}validateOrientation(a){watchValidator(this,"_orientation",(a=>"horizontal"===a||"vertical"===a),new Set(["Orientation {horizontal, vertical}"]),a,{defaultValue:"vertical"})}validateVariant(a){watchValidator(this,"_variant",(a=>"primary"===a||"secondary"===a),new Set(["KoliBriNavVariant {primary, secondary}"]),a,{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"]}}};KolNav.style={default:defaultStyleCss};export{KolNav as kol_nav};
4
+ import{r as registerInstance,h,H as Host}from"./index-50adf9a0.js";import{d as devHint,b as a11yHintLabelingLandmarks}from"./a11y.tipps-a876ebb7.js";import{a as watchValidator,w as watchString,b as watchBoolean}from"./prop.validators-dd337216.js";import{w as watchNavLinks}from"./validation-68f4e65e.js";import{a as translate}from"./i18n-e297566c.js";import"./dev.utils-ec1c1b88.js";import"./reuse-9dd1192b.js";import"./index-599f5430.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;hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}:host{font-family:var(--kolibri-font-family);font-size:inherit}*{box-sizing:border-box}kol-icon{color:inherit}kol-span-wc{display:grid;place-items:center;width:100%}kol-span-wc>span{display:flex;gap:var(--kolibri-spacing);place-items:center}a{display:inline-flex;place-items:baseline}button{background-color:transparent;border-width:0;margin:0;min-height:44px;min-width:44px;padding:0}a,button,input,select,textarea{cursor:pointer}a.icon-only>kol-span-wc>span>span,:host button.icon-only>kol-span-wc>span>span{display:none}:host>div{display:inline-block}",UNIQUE_ARIA_LABEL=[],removeAriaLabel=a=>{const t=UNIQUE_ARIA_LABEL.indexOf(a);t>=0&&UNIQUE_ARIA_LABEL.splice(t,1)},KolNav=class{constructor(a){registerInstance(this,a),this.onClick=a=>{a._active=!1===a._active,this.state=Object.assign({},this.state)},this.hasActiveChild=a=>!!(Array.isArray(a._children)&&a._children.length>0)&&a._children.some(this.hasActiveChild),this.linkList=a=>h("ul",{class:{flex:0===a.deep&&"horizontal"===this.state._orientation},part:`nav ${this.state._orientation}`},a.links.map(((t,i)=>h("li",{key:i,part:`li ${0===a.deep?this.state._orientation:"vertical"}${t._active?" selected":""}${i<a.links.length-1?"":" last"}`},Array.isArray(t._children)&&t._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===t._active?",selected":""),_ariaLabel:!0===this.state._compact||!0===t._iconOnly?t._label:void 0,_ariaExpanded:!0===t._active,_disabled:t._disabled,_href:"javascript:void(0)",_icon:!0===this.state._collapsible?!0===t._active?"fa-solid fa-minus":"fa-solid fa-plus":"string"==typeof t._icon?t._icon:"fa-solid fa-link-slash",_iconOnly:!0===this.state._compact||!0===t._iconOnly,_label:t._label,onClick:()=>this.onClick(t)})),!0===t._active&&h("div",{class:{expanded:!0,active:!0===t._active,"active-child":this.hasActiveChild(t),"absolute ":0===a.deep&&"horizontal"===this.state._orientation}},h(this.linkList,{links:t._children,deep:a.deep+1}))):h("div",{class:{"h-full":!0,"text-center":!0===this.state._compact||!0===t._iconOnly}},h("kol-link-wc",{class:{"block w-full h-full":!0,active:!0===t._active},exportparts:"icon,link,span"+(!0===t._active?",selected":""),_ariaCurrent:!0===t._active&&this.state._ariaCurrentValue,_ariaLabel:!0===this.state._compact||!0===t._iconOnly?t._label:void 0,_href:t._href,_icon:"string"==typeof t._icon?t._icon:"fa-solid fa-link-slash","_icon-only":!0===this.state._compact||!0===t._iconOnly,_label:t._label,_on:t._on,_selector:t._selector,_tooltipAlign:t._tooltipAlign,_target:t._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 a=this.state._hasCompactButton;return"horizontal"===this.state._orientation&&!0===this.state._hasCompactButton&&(a=!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})),a&&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(a){watchValidator(this,"_ariaCurrentValue",(a=>!0===a||"date"===a||"location"===a||"page"===a||"step"===a||"time"===a),new Set(["boolean","String {data, location, page, step, time}"]),a)}validateAriaLabel(a){watchString(this,"_ariaLabel",a,{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(a)}validateCollapsible(a){watchBoolean(this,"_collapsible",a)}validateCompact(a){watchBoolean(this,"_compact",a)}validateHasCompactButton(a){watchBoolean(this,"_hasCompactButton",a)}validateLinks(a){watchNavLinks("KolNav",this,a),devHint("[KolNav] Die Navigationsstruktur wird noch nicht rekursiv validiert.")}validateOrientation(a){watchValidator(this,"_orientation",(a=>"horizontal"===a||"vertical"===a),new Set(["Orientation {horizontal, vertical}"]),a,{defaultValue:"vertical"})}validateVariant(a){watchValidator(this,"_variant",(a=>"primary"===a||"secondary"===a),new Set(["KoliBriNavVariant {primary, secondary}"]),a,{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"]}}};KolNav.style={default:defaultStyleCss};export{KolNav as kol_nav};
@@ -1 +1 @@
1
- {"file":"kol-nav.entry.js","mappings":";;;;;;;;;;;;AAAA,MAAM,eAAe,GAAG,60CAA60C;;ACiBr2C,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;MA4DW,MAAM;;;IACD,YAAO,GAAG,CAAC,IAA8B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AAC,CAAC;GACvC;;;;;;;;;;;;;;;;;;","names":[],"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.entry.js","mappings":";;;;;;;;;;;;AAAA,MAAM,eAAe,GAAG,qvCAAqvC;;ACiB7wC,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;MA4DW,MAAM;;;IACD,YAAO,GAAG,CAAC,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AAU,CAAC,CAAC;GACvC;;;;;;;;;;;;;;;;;;","names":[],"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,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as registerInstance,h,H as Host}from"./index-50adf9a0.js";import{w as watchTooltipAlignment}from"./button-link-c6783bbf.js";import{n as nonce}from"./dev.utils-ec1c1b88.js";import{e as watchNumber,w as watchString,a as watchValidator,d as watchJsonArrayString,p as parseJson}from"./prop.validators-dd337216.js";import{w as watchButtonVariant}from"./controller-b4263f6b.js";import{S as STATE_CHANGE_EVENT}from"./reuse-9dd1192b.js";import{a as translate}from"./i18n-e297566c.js";import"./index-599f5430.js";import"./a11y.tipps-a876ebb7.js";const defaultStyleCss=":host{--kolibri-border-color:#e0e0e0;--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;hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}:host{font-family:var(--kolibri-font-family);font-size:inherit}:host *{box-sizing:border-box}:host kol-icon{color:inherit}:host kol-span-wc{display:grid;place-items:center;width:100%}:host kol-span-wc>span{display:flex;gap:var(--kolibri-spacing);place-items:center}:host button{margin:0;min-height:44px;min-width:44px;padding:0}:host a,:host button,:host input,:host select,:host textarea{cursor:pointer}:host a.icon-only>kol-span-wc>span>span,:host button.icon-only>kol-span-wc>span>span{display:none}:host a{display:inline-flex;place-items:baseline}:host button{background-color:transparent;border-width:0}",leftDoubleArrowIcon={left:"fa-solid fa-angles-left"},leftSingleArrow={left:"fa-solid fa-angle-left"},rightSingleArrowIcon={right:"fa-solid fa-angle-right"},rightDoubleArrowIcon={right:"fa-solid fa-angles-right"},KolPagination=class{constructor(t){registerInstance(this,t),this.nonce=nonce(),this.calcCount=(t,a=1)=>Math.ceil(t/a),this.getCount=()=>this.calcCount(this.state._total,this.state._pageSize),this.onClick=(t,a)=>{"function"==typeof this.state._on.onClick&&this.state._on.onClick(t,a),this.onChangePage(t,a)},this.onChangePage=(t,a)=>{const e=setTimeout((()=>{clearTimeout(e),"function"==typeof this.state._on.onChangePage&&this.state._on.onChangePage(t,a)}))},this.onChangePageSize=(t,a)=>{if("number"==typeof(a=parseInt(a[0]))&&a>0&&this._pageSize!==a){this._pageSize=a;const e=setTimeout((()=>{clearTimeout(e),"function"==typeof this.state._on.onChangePageSize&&this.state._on.onChangePageSize(t,this._pageSize)}))}},this.onGoToFirst={onClick:t=>{this.onClick(t,1)}},this.onGoToEnd={onClick:t=>{this.onClick(t,this.getCount())}},this.onGoBackward={onClick:t=>{this.onClick(t,this.state._page-1)}},this.onGoForward={onClick:t=>{this.onClick(t,this.state._page+1)}},this.beforePageSize=(t,a)=>{let e=a.has("_pageSize")?a.get("_pageSize"):this.state._pageSize;const i=a.has("_pageSizeOptions")?a.get("_pageSizeOptions"):this.state._pageSizeOptions;if(Array.isArray(i)&&i.length>0){const t=i.find((t=>t.value===e));e=void 0===t?i[0].value:t.value,a.set("_pageSize",e)}const s=a.has("_page")?a.get("_page"):this.state._page,o=a.has("_total")?a.get("_total"):this.state._total;this.syncPage(a,s,a.get("_pageSize"),o)},this.syncPage=(t,a,e,i)=>{if(i>0){const s=this.calcCount(i,e);s>0&&(a>s?(t.set("_page",s),this.onChangePage(STATE_CHANGE_EVENT,s)):a<1&&(t.set("_page",1),this.onChangePage(STATE_CHANGE_EVENT,1)))}},this.beforePageSizeOptions=(t,a)=>{const e=[];if(Array.isArray(t))for(const a of t)"number"==typeof a&&e.push({label:translate("kol-page-per-site",{placeholders:{entries:`${a}`}}),value:a});a.set("_pageSizeOptions",e),this.beforePageSize(e,a)},this._boundaryCount=1,this._customClass=void 0,this._hasButtons=void 0,this._page=void 0,this._pageSize=1,this._pageSizeOptions=[],this._on=void 0,this._siblingCount=1,this._tooltipAlign="top",this._total=void 0,this._variant="normal",this.state={_boundaryCount:1,_hasButtons:{first:!0,last:!0,next:!0,previous:!0},_on:{onClick:()=>null},_page:0,_pageSize:1,_pageSizeOptions:[],_siblingCount:1,_total:0,_variant:"normal"}}render(){var t;let a=!1;const e=this.getCount(),i=Array.from(Array(e).keys()).map((t=>t+1)).map((t=>t<=this.state._boundaryCount||t>e-this.state._boundaryCount||t>=this.state._page-this.state._siblingCount&&t<=this.state._page+this.state._siblingCount?(a=!0,this.state._page===t?this.getSelectedPageButton(t):this.getUnselectedPageButton(t)):!0===a?(a=!1,h("span",{key:`${this.nonce}-el-${t}`},"•••")):null));return h(Host,null,h("div",null,this.state._hasButtons.first&&h("kol-button",{_customClass:this.state._customClass,_disabled:this.state._page<=1,_icon:leftDoubleArrowIcon,_iconOnly:!0,_label:translate("kol-page-first"),_on:this.onGoToFirst,_variant:this.state._variant,_tooltipAlign:this.state._tooltipAlign}),this.state._hasButtons.previous&&h("kol-button",{_customClass:this.state._customClass,_disabled:this.state._page<=1,_icon:leftSingleArrow,_iconOnly:!0,_label:translate("kol-page-back"),_on:this.onGoBackward,_variant:this.state._variant,_tooltipAlign:this.state._tooltipAlign}),i,this.state._hasButtons.next&&h("kol-button",{_customClass:this.state._customClass,_disabled:e<=this.state._page,_icon:rightSingleArrowIcon,_iconOnly:!0,_label:translate("kol-page-next"),_on:this.onGoForward,_variant:this.state._variant,_tooltipAlign:this.state._tooltipAlign}),this.state._hasButtons.last&&h("kol-button",{_customClass:this.state._customClass,_disabled:e<=this.state._page,_icon:rightDoubleArrowIcon,_iconOnly:!0,_label:translate("kol-page-last"),_on:this.onGoToEnd,_variant:this.state._variant,_tooltipAlign:this.state._tooltipAlign})),(null===(t=this.state._pageSizeOptions)||void 0===t?void 0:t.length)>0&&h("kol-select",{_hideLabel:!0,_id:"pagination-size",_list:this.state._pageSizeOptions,_on:{onChange:this.onChangePageSize},_value:[this.state._pageSize]},translate("kol-entries-per-site")))}getUnselectedPageButton(t){return h("kol-button",{key:`${this.nonce}-${t}`,_customClass:this.state._customClass,_ariaLabel:translate("kol-page-current",{placeholders:{page:t.toFixed(0)}}),_label:`${t}`,_on:{onClick:a=>{this.onClick(a,t)}},_variant:this.state._variant})}getSelectedPageButton(t){return h("kol-button-wc",{class:"selected",key:`${this.nonce}-selected`,_customClass:this.state._customClass,_disabled:!0,_ariaCurrent:!0,_ariaLabel:translate("kol-page-selected",{placeholders:{page:t.toFixed(0)}}),_label:`${t}`,_variant:this.state._variant})}validateBoundaryCount(t){watchNumber(this,"_boundaryCount",Math.max(0,null!=t?t:1))}validateCustomClass(t){watchString(this,"_customClass",t,{defaultValue:void 0})}validateHasButtons(t){watchValidator(this,"_hasButtons",(t=>"boolean"==typeof t||"string"==typeof t||"object"==typeof t&&null!==t),new Set(["Boolean","PaginationHasButton"]),t,{hooks:{beforePatch:(t,a)=>{if("boolean"==typeof t)a.set("_hasButtons",{first:t,last:t,next:t,previous:t});else{if("string"==typeof t)try{t=parseJson(t)}catch(t){a.delete("_hasButtons")}"object"==typeof t&&null!==t&&a.set("_hasButtons",Object.assign(Object.assign({},this.state._hasButtons),{first:"boolean"==typeof t.first?!0===t.first:this.state._hasButtons.first,last:"boolean"==typeof t.last?!0===t.last:this.state._hasButtons.last,next:"boolean"==typeof t.next?!0===t.next:this.state._hasButtons.next,previous:"boolean"==typeof t.previous?!0===t.previous:this.state._hasButtons.previous}))}}}})}validateOn(t){"object"==typeof t&&null!==t&&(this.state=Object.assign(Object.assign({},this.state),{_on:t}))}validatePage(t){watchNumber(this,"_page",t,{hooks:{beforePatch:(t,a)=>{const e=a.has("_pageSize")?a.get("_pageSize"):this.state._pageSize,i=a.has("_total")?a.get("_total"):this.state._total;this.syncPage(a,t,e,i)}}})}validatePageSize(t){watchNumber(this,"_pageSize",t,{hooks:{beforePatch:this.beforePageSize}})}validatePageSizeOptions(t){watchJsonArrayString(this,"_pageSizeOptions",(t=>"number"==typeof t),t,void 0,{hooks:{beforePatch:this.beforePageSizeOptions}})}validateSiblingCount(t){watchNumber(this,"_siblingCount",Math.max(0,null!=t?t:1))}validateTotal(t){watchNumber(this,"_total",t,{hooks:{beforePatch:(t,a)=>{const e=a.has("_page")?a.get("_page"):this.state._page,i=a.has("_pageSize")?a.get("_pageSize"):this.state._pageSize;this.syncPage(a,e,i,t)}}})}validateTooltipAlign(t){watchTooltipAlignment(this,"_tooltipAlign",t)}validateVariant(t){watchButtonVariant(this,"_variant",t)}componentWillLoad(){this.validateBoundaryCount(this._boundaryCount),this.validateCustomClass(this._customClass),this.validateHasButtons(this._hasButtons),this.validateOn(this._on),this.validatePage(this._page),this.validatePageSize(this._pageSize),this.validatePageSizeOptions(this._pageSizeOptions),this.validateSiblingCount(this._siblingCount),this.validateTooltipAlign(this._tooltipAlign),this.validateTotal(this._total),this.validateVariant(this._variant),this.validatePage(this._page)}static get watchers(){return{_boundaryCount:["validateBoundaryCount"],_customClass:["validateCustomClass"],_hasButtons:["validateHasButtons"],_on:["validateOn"],_page:["validatePage"],_pageSize:["validatePageSize"],_pageSizeOptions:["validatePageSizeOptions"],_siblingCount:["validateSiblingCount"],_total:["validateTotal"],_tooltipAlign:["validateTooltipAlign"],_variant:["validateVariant"]}}};KolPagination.style={default:defaultStyleCss};export{KolPagination as kol_pagination};
4
+ import{r as registerInstance,h,H as Host}from"./index-50adf9a0.js";import{w as watchTooltipAlignment}from"./button-link-c6783bbf.js";import{n as nonce}from"./dev.utils-ec1c1b88.js";import{e as watchNumber,w as watchString,a as watchValidator,d as watchJsonArrayString,p as parseJson}from"./prop.validators-dd337216.js";import{w as watchButtonVariant}from"./controller-b4263f6b.js";import{S as STATE_CHANGE_EVENT}from"./reuse-9dd1192b.js";import{a as translate}from"./i18n-e297566c.js";import"./index-599f5430.js";import"./a11y.tipps-a876ebb7.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;hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}:host{font-family:var(--kolibri-font-family);font-size:inherit}*{box-sizing:border-box}kol-icon{color:inherit}kol-span-wc{display:grid;place-items:center;width:100%}kol-span-wc>span{display:flex;gap:var(--kolibri-spacing);place-items:center}a{display:inline-flex;place-items:baseline}button{background-color:transparent;border-width:0;margin:0;min-height:44px;min-width:44px;padding:0}a,button,input,select,textarea{cursor:pointer}a.icon-only>kol-span-wc>span>span,:host button.icon-only>kol-span-wc>span>span{display:none}",leftDoubleArrowIcon={left:"fa-solid fa-angles-left"},leftSingleArrow={left:"fa-solid fa-angle-left"},rightSingleArrowIcon={right:"fa-solid fa-angle-right"},rightDoubleArrowIcon={right:"fa-solid fa-angles-right"},KolPagination=class{constructor(t){registerInstance(this,t),this.nonce=nonce(),this.calcCount=(t,a=1)=>Math.ceil(t/a),this.getCount=()=>this.calcCount(this.state._total,this.state._pageSize),this.onClick=(t,a)=>{"function"==typeof this.state._on.onClick&&this.state._on.onClick(t,a),this.onChangePage(t,a)},this.onChangePage=(t,a)=>{const i=setTimeout((()=>{clearTimeout(i),"function"==typeof this.state._on.onChangePage&&this.state._on.onChangePage(t,a)}))},this.onChangePageSize=(t,a)=>{if("number"==typeof(a=parseInt(a[0]))&&a>0&&this._pageSize!==a){this._pageSize=a;const i=setTimeout((()=>{clearTimeout(i),"function"==typeof this.state._on.onChangePageSize&&this.state._on.onChangePageSize(t,this._pageSize)}))}},this.onGoToFirst={onClick:t=>{this.onClick(t,1)}},this.onGoToEnd={onClick:t=>{this.onClick(t,this.getCount())}},this.onGoBackward={onClick:t=>{this.onClick(t,this.state._page-1)}},this.onGoForward={onClick:t=>{this.onClick(t,this.state._page+1)}},this.beforePageSize=(t,a)=>{let i=a.has("_pageSize")?a.get("_pageSize"):this.state._pageSize;const e=a.has("_pageSizeOptions")?a.get("_pageSizeOptions"):this.state._pageSizeOptions;if(Array.isArray(e)&&e.length>0){const t=e.find((t=>t.value===i));i=void 0===t?e[0].value:t.value,a.set("_pageSize",i)}const s=a.has("_page")?a.get("_page"):this.state._page,o=a.has("_total")?a.get("_total"):this.state._total;this.syncPage(a,s,a.get("_pageSize"),o)},this.syncPage=(t,a,i,e)=>{if(e>0){const s=this.calcCount(e,i);s>0&&(a>s?(t.set("_page",s),this.onChangePage(STATE_CHANGE_EVENT,s)):a<1&&(t.set("_page",1),this.onChangePage(STATE_CHANGE_EVENT,1)))}},this.beforePageSizeOptions=(t,a)=>{const i=[];if(Array.isArray(t))for(const a of t)"number"==typeof a&&i.push({label:translate("kol-page-per-site",{placeholders:{entries:`${a}`}}),value:a});a.set("_pageSizeOptions",i),this.beforePageSize(i,a)},this._boundaryCount=1,this._customClass=void 0,this._hasButtons=void 0,this._page=void 0,this._pageSize=1,this._pageSizeOptions=[],this._on=void 0,this._siblingCount=1,this._tooltipAlign="top",this._total=void 0,this._variant="normal",this.state={_boundaryCount:1,_hasButtons:{first:!0,last:!0,next:!0,previous:!0},_on:{onClick:()=>null},_page:0,_pageSize:1,_pageSizeOptions:[],_siblingCount:1,_total:0,_variant:"normal"}}render(){var t;let a=!1;const i=this.getCount(),e=Array.from(Array(i).keys()).map((t=>t+1)).map((t=>t<=this.state._boundaryCount||t>i-this.state._boundaryCount||t>=this.state._page-this.state._siblingCount&&t<=this.state._page+this.state._siblingCount?(a=!0,this.state._page===t?this.getSelectedPageButton(t):this.getUnselectedPageButton(t)):!0===a?(a=!1,h("span",{key:`${this.nonce}-el-${t}`},"•••")):null));return h(Host,null,h("div",null,this.state._hasButtons.first&&h("kol-button",{_customClass:this.state._customClass,_disabled:this.state._page<=1,_icon:leftDoubleArrowIcon,_iconOnly:!0,_label:translate("kol-page-first"),_on:this.onGoToFirst,_variant:this.state._variant,_tooltipAlign:this.state._tooltipAlign}),this.state._hasButtons.previous&&h("kol-button",{_customClass:this.state._customClass,_disabled:this.state._page<=1,_icon:leftSingleArrow,_iconOnly:!0,_label:translate("kol-page-back"),_on:this.onGoBackward,_variant:this.state._variant,_tooltipAlign:this.state._tooltipAlign}),e,this.state._hasButtons.next&&h("kol-button",{_customClass:this.state._customClass,_disabled:i<=this.state._page,_icon:rightSingleArrowIcon,_iconOnly:!0,_label:translate("kol-page-next"),_on:this.onGoForward,_variant:this.state._variant,_tooltipAlign:this.state._tooltipAlign}),this.state._hasButtons.last&&h("kol-button",{_customClass:this.state._customClass,_disabled:i<=this.state._page,_icon:rightDoubleArrowIcon,_iconOnly:!0,_label:translate("kol-page-last"),_on:this.onGoToEnd,_variant:this.state._variant,_tooltipAlign:this.state._tooltipAlign})),(null===(t=this.state._pageSizeOptions)||void 0===t?void 0:t.length)>0&&h("kol-select",{_hideLabel:!0,_id:"pagination-size",_list:this.state._pageSizeOptions,_on:{onChange:this.onChangePageSize},_value:[this.state._pageSize]},translate("kol-entries-per-site")))}getUnselectedPageButton(t){return h("kol-button",{key:`${this.nonce}-${t}`,_customClass:this.state._customClass,_ariaLabel:translate("kol-page-current",{placeholders:{page:t.toFixed(0)}}),_label:`${t}`,_on:{onClick:a=>{this.onClick(a,t)}},_variant:this.state._variant})}getSelectedPageButton(t){return h("kol-button-wc",{class:"selected",key:`${this.nonce}-selected`,_customClass:this.state._customClass,_disabled:!0,_ariaCurrent:!0,_ariaLabel:translate("kol-page-selected",{placeholders:{page:t.toFixed(0)}}),_label:`${t}`,_variant:this.state._variant})}validateBoundaryCount(t){watchNumber(this,"_boundaryCount",Math.max(0,null!=t?t:1))}validateCustomClass(t){watchString(this,"_customClass",t,{defaultValue:void 0})}validateHasButtons(t){watchValidator(this,"_hasButtons",(t=>"boolean"==typeof t||"string"==typeof t||"object"==typeof t&&null!==t),new Set(["Boolean","PaginationHasButton"]),t,{hooks:{beforePatch:(t,a)=>{if("boolean"==typeof t)a.set("_hasButtons",{first:t,last:t,next:t,previous:t});else{if("string"==typeof t)try{t=parseJson(t)}catch(t){a.delete("_hasButtons")}"object"==typeof t&&null!==t&&a.set("_hasButtons",Object.assign(Object.assign({},this.state._hasButtons),{first:"boolean"==typeof t.first?!0===t.first:this.state._hasButtons.first,last:"boolean"==typeof t.last?!0===t.last:this.state._hasButtons.last,next:"boolean"==typeof t.next?!0===t.next:this.state._hasButtons.next,previous:"boolean"==typeof t.previous?!0===t.previous:this.state._hasButtons.previous}))}}}})}validateOn(t){"object"==typeof t&&null!==t&&(this.state=Object.assign(Object.assign({},this.state),{_on:t}))}validatePage(t){watchNumber(this,"_page",t,{hooks:{beforePatch:(t,a)=>{const i=a.has("_pageSize")?a.get("_pageSize"):this.state._pageSize,e=a.has("_total")?a.get("_total"):this.state._total;this.syncPage(a,t,i,e)}}})}validatePageSize(t){watchNumber(this,"_pageSize",t,{hooks:{beforePatch:this.beforePageSize}})}validatePageSizeOptions(t){watchJsonArrayString(this,"_pageSizeOptions",(t=>"number"==typeof t),t,void 0,{hooks:{beforePatch:this.beforePageSizeOptions}})}validateSiblingCount(t){watchNumber(this,"_siblingCount",Math.max(0,null!=t?t:1))}validateTotal(t){watchNumber(this,"_total",t,{hooks:{beforePatch:(t,a)=>{const i=a.has("_page")?a.get("_page"):this.state._page,e=a.has("_pageSize")?a.get("_pageSize"):this.state._pageSize;this.syncPage(a,i,e,t)}}})}validateTooltipAlign(t){watchTooltipAlignment(this,"_tooltipAlign",t)}validateVariant(t){watchButtonVariant(this,"_variant",t)}componentWillLoad(){this.validateBoundaryCount(this._boundaryCount),this.validateCustomClass(this._customClass),this.validateHasButtons(this._hasButtons),this.validateOn(this._on),this.validatePage(this._page),this.validatePageSize(this._pageSize),this.validatePageSizeOptions(this._pageSizeOptions),this.validateSiblingCount(this._siblingCount),this.validateTooltipAlign(this._tooltipAlign),this.validateTotal(this._total),this.validateVariant(this._variant),this.validatePage(this._page)}static get watchers(){return{_boundaryCount:["validateBoundaryCount"],_customClass:["validateCustomClass"],_hasButtons:["validateHasButtons"],_on:["validateOn"],_page:["validatePage"],_pageSize:["validatePageSize"],_pageSizeOptions:["validatePageSizeOptions"],_siblingCount:["validateSiblingCount"],_total:["validateTotal"],_tooltipAlign:["validateTooltipAlign"],_variant:["validateVariant"]}}};KolPagination.style={default:defaultStyleCss};export{KolPagination as kol_pagination};