@public-ui/components 1.7.4 → 1.7.5

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 (453) hide show
  1. package/custom-elements.json +1 -1
  2. package/dist/cjs/{a11y.tipps-fb1b7a5e.js → a11y.tipps-c5387a76.js} +1 -1
  3. package/dist/cjs/{a11y.tipps-fb1b7a5e.js.map → a11y.tipps-c5387a76.js.map} +1 -1
  4. package/dist/cjs/align-82c5c7e6.js +4 -0
  5. package/dist/cjs/{align-d43fb2e6.js.map → align-82c5c7e6.js.map} +1 -1
  6. package/dist/cjs/{alignment-aaabbbdd.js → alignment-1a7ee008.js} +1 -1
  7. package/dist/cjs/{alignment-aaabbbdd.js.map → alignment-1a7ee008.js.map} +1 -1
  8. package/dist/cjs/{app-globals-567cee65.js → app-globals-fb8b4444.js} +1 -1
  9. package/dist/cjs/{app-globals-567cee65.js.map → app-globals-fb8b4444.js.map} +1 -1
  10. package/dist/cjs/aria-current-a6b40d0a.js +4 -0
  11. package/dist/cjs/{aria-current-15ac658e.js.map → aria-current-a6b40d0a.js.map} +1 -1
  12. package/dist/cjs/{associated.controller-48c1c5e7.js → associated.controller-3a3616f9.js} +1 -1
  13. package/dist/cjs/{associated.controller-48c1c5e7.js.map → associated.controller-3a3616f9.js.map} +1 -1
  14. package/dist/cjs/{color-830bebd1.js → color-15d2ce6c.js} +1 -1
  15. package/dist/cjs/{color-830bebd1.js.map → color-15d2ce6c.js.map} +1 -1
  16. package/dist/cjs/{controller-fd982fbd.js → controller-0e5697e2.js} +1 -1
  17. package/dist/cjs/{controller-fd982fbd.js.map → controller-0e5697e2.js.map} +1 -1
  18. package/dist/cjs/controller-2e53480f.js +4 -0
  19. package/dist/cjs/{controller-69fcf8c1.js.map → controller-2e53480f.js.map} +1 -1
  20. package/dist/cjs/{controller-a9d694b3.js → controller-462acf6c.js} +1 -1
  21. package/dist/cjs/{controller-a9d694b3.js.map → controller-462acf6c.js.map} +1 -1
  22. package/dist/cjs/{controller-208b180e.js → controller-bc7d30fb.js} +1 -1
  23. package/dist/cjs/{controller-208b180e.js.map → controller-bc7d30fb.js.map} +1 -1
  24. package/dist/cjs/{controller-16e90d86.js → controller-c1375efb.js} +1 -1
  25. package/dist/cjs/{controller-16e90d86.js.map → controller-c1375efb.js.map} +1 -1
  26. package/dist/cjs/{controller-icon-3d1d50a0.js → controller-icon-b12193a9.js} +1 -1
  27. package/dist/cjs/{controller-icon-3d1d50a0.js.map → controller-icon-b12193a9.js.map} +1 -1
  28. package/dist/cjs/{custom-class-de1d31c6.js → custom-class-3ab4628f.js} +1 -1
  29. package/dist/cjs/{custom-class-de1d31c6.js.map → custom-class-3ab4628f.js.map} +1 -1
  30. package/dist/cjs/{dev.utils-94b44997.js → dev.utils-2073dc09.js} +1 -1
  31. package/dist/cjs/{dev.utils-94b44997.js.map → dev.utils-2073dc09.js.map} +1 -1
  32. package/dist/cjs/{devtools-27937a42.js → devtools-b02532ad.js} +1 -1
  33. package/dist/cjs/{devtools-27937a42.js.map → devtools-b02532ad.js.map} +1 -1
  34. package/dist/cjs/has-closer-5b5049c7.js +4 -0
  35. package/dist/cjs/{has-closer-f38cfe7e.js.map → has-closer-5b5049c7.js.map} +1 -1
  36. package/dist/cjs/hide-label-661c1bad.js +4 -0
  37. package/dist/cjs/{hide-label-0213dc75.js.map → hide-label-661c1bad.js.map} +1 -1
  38. package/dist/cjs/{i18n-e3a3e281.js → i18n-3dd524d2.js} +1 -1
  39. package/dist/cjs/{i18n-e3a3e281.js.map → i18n-3dd524d2.js.map} +1 -1
  40. package/dist/cjs/{icons-351a0e6d.js → icons-c987957e.js} +1 -1
  41. package/dist/cjs/{icons-351a0e6d.js.map → icons-c987957e.js.map} +1 -1
  42. package/dist/cjs/image-source-b5a9c8f9.js +4 -0
  43. package/dist/cjs/{image-source-7d1a9b1b.js.map → image-source-b5a9c8f9.js.map} +1 -1
  44. package/dist/cjs/index.cjs.js +1 -1
  45. package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
  46. package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
  47. package/dist/cjs/kol-accordion.cjs.entry.js.map +1 -1
  48. package/dist/cjs/kol-alert-wc_3.cjs.entry.js +1 -1
  49. package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
  50. package/dist/cjs/kol-badge.cjs.entry.js +1 -1
  51. package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
  52. package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
  53. package/dist/cjs/kol-button-link.cjs.entry.js.map +1 -1
  54. package/dist/cjs/kol-button.cjs.entry.js +1 -1
  55. package/dist/cjs/kol-button.cjs.entry.js.map +1 -1
  56. package/dist/cjs/kol-card.cjs.entry.js +1 -1
  57. package/dist/cjs/kol-details.cjs.entry.js +1 -1
  58. package/dist/cjs/kol-details.cjs.entry.js.map +1 -1
  59. package/dist/cjs/kol-form.cjs.entry.js +1 -1
  60. package/dist/cjs/kol-icon.cjs.entry.js +1 -1
  61. package/dist/cjs/kol-image.cjs.entry.js +1 -1
  62. package/dist/cjs/kol-image.cjs.entry.js.map +1 -1
  63. package/dist/cjs/kol-input-adapter-leanup.cjs.entry.js +1 -1
  64. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  65. package/dist/cjs/kol-input-checkbox.cjs.entry.js.map +1 -1
  66. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  67. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  68. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  69. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  70. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  71. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  72. package/dist/cjs/kol-input-radio-group.cjs.entry.js +1 -1
  73. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  74. package/dist/cjs/kol-input-radio.cjs.entry.js.map +1 -1
  75. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  76. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  77. package/dist/cjs/kol-input.cjs.entry.js +1 -1
  78. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  79. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  80. package/dist/cjs/kol-link-button.cjs.entry.js.map +1 -1
  81. package/dist/cjs/kol-link-group.cjs.entry.js +1 -1
  82. package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
  83. package/dist/cjs/kol-link.cjs.entry.js +1 -1
  84. package/dist/cjs/kol-link.cjs.entry.js.map +1 -1
  85. package/dist/cjs/kol-logo.cjs.entry.js +1 -1
  86. package/dist/cjs/kol-modal.cjs.entry.js +1 -1
  87. package/dist/cjs/kol-nav.cjs.entry.js +1 -1
  88. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  89. package/dist/cjs/kol-popover.cjs.entry.js +1 -1
  90. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  91. package/dist/cjs/kol-quote.cjs.entry.js +1 -1
  92. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  93. package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
  94. package/dist/cjs/kol-span-wc_2.cjs.entry.js +1 -1
  95. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  96. package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
  97. package/dist/cjs/kol-symbol.cjs.entry.js +1 -1
  98. package/dist/cjs/kol-table.cjs.entry.js +1 -1
  99. package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
  100. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  101. package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
  102. package/dist/cjs/kol-toast.cjs.entry.js +1 -1
  103. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  104. package/dist/cjs/kolibri.cjs.js +1 -1
  105. package/dist/cjs/{label-2a477c99.js → label-63f8275b.js} +1 -1
  106. package/dist/cjs/{label-2a477c99.js.map → label-63f8275b.js.map} +1 -1
  107. package/dist/cjs/loader.cjs.js +1 -1
  108. package/dist/cjs/open-bde18e22.js +4 -0
  109. package/dist/cjs/{open-094dce9b.js.map → open-bde18e22.js.map} +1 -1
  110. package/dist/cjs/{prop.validators-db3c44d7.js → prop.validators-aa13f60a.js} +1 -1
  111. package/dist/cjs/{prop.validators-db3c44d7.js.map → prop.validators-aa13f60a.js.map} +1 -1
  112. package/dist/cjs/rows-fc5f60d9.js +4 -0
  113. package/dist/cjs/{rows-8fef3ed1.js.map → rows-fc5f60d9.js.map} +1 -1
  114. package/dist/cjs/show-f026dc23.js +4 -0
  115. package/dist/cjs/{show-24e6ed74.js.map → show-f026dc23.js.map} +1 -1
  116. package/dist/cjs/{suggestions-87a7966a.js → suggestions-d04d1b81.js} +1 -1
  117. package/dist/cjs/{suggestions-87a7966a.js.map → suggestions-d04d1b81.js.map} +1 -1
  118. package/dist/cjs/{tab-index-510637f6.js → tab-index-98bcc858.js} +1 -1
  119. package/dist/cjs/{tab-index-510637f6.js.map → tab-index-98bcc858.js.map} +1 -1
  120. package/dist/cjs/{tooltip-align-75fdd33d.js → tooltip-align-671c6a40.js} +1 -1
  121. package/dist/cjs/{tooltip-align-75fdd33d.js.map → tooltip-align-671c6a40.js.map} +1 -1
  122. package/dist/cjs/validation-43b5bf59.js +4 -0
  123. package/dist/cjs/{validation-c95c5334.js.map → validation-43b5bf59.js.map} +1 -1
  124. package/dist/cjs/{validation-b0506a58.js → validation-e91934ad.js} +1 -1
  125. package/dist/cjs/{validation-b0506a58.js.map → validation-e91934ad.js.map} +1 -1
  126. package/dist/components/component14.js +1 -1
  127. package/dist/components/component14.js.map +1 -1
  128. package/dist/components/component16.js +1 -1
  129. package/dist/components/component5.js +1 -1
  130. package/dist/components/component6.js +1 -1
  131. package/dist/components/component8.js +1 -1
  132. package/dist/components/component9.js +1 -1
  133. package/dist/components/controller.js +1 -1
  134. package/dist/components/controller2.js +1 -1
  135. package/dist/components/devtools.js +1 -1
  136. package/dist/components/kol-accordion.js +1 -1
  137. package/dist/components/kol-accordion.js.map +1 -1
  138. package/dist/components/kol-button-link.js +1 -1
  139. package/dist/components/kol-button-link.js.map +1 -1
  140. package/dist/components/kol-card.js +1 -1
  141. package/dist/components/kol-details.js +1 -1
  142. package/dist/components/kol-details.js.map +1 -1
  143. package/dist/components/kol-image.js +1 -1
  144. package/dist/components/kol-image.js.map +1 -1
  145. package/dist/components/kol-input-checkbox.js +1 -1
  146. package/dist/components/kol-input-checkbox.js.map +1 -1
  147. package/dist/components/kol-input-color.js +1 -1
  148. package/dist/components/kol-input-date.js +1 -1
  149. package/dist/components/kol-input-email.js +1 -1
  150. package/dist/components/kol-input-file.js +1 -1
  151. package/dist/components/kol-input-number.js +1 -1
  152. package/dist/components/kol-input-password.js +1 -1
  153. package/dist/components/kol-input-range.js +1 -1
  154. package/dist/components/kol-input-text.js +1 -1
  155. package/dist/components/kol-link-button.js +1 -1
  156. package/dist/components/kol-link-button.js.map +1 -1
  157. package/dist/components/kol-logo.js +1 -1
  158. package/dist/components/kol-modal.js +1 -1
  159. package/dist/components/kol-nav.js +1 -1
  160. package/dist/components/kol-table.js +1 -1
  161. package/dist/components/kol-tabs.js +1 -1
  162. package/dist/components/kol-textarea.js +1 -1
  163. package/dist/components/kol-toast.js +1 -1
  164. package/dist/components/prop.validators.js +1 -1
  165. package/dist/components/prop.validators.js.map +1 -1
  166. package/dist/components/shadow2.js +1 -1
  167. package/dist/components/shadow2.js.map +1 -1
  168. package/dist/components/shadow3.js +1 -1
  169. package/dist/components/shadow3.js.map +1 -1
  170. package/dist/esm/{a11y.tipps-d4474fb4.js → a11y.tipps-54065212.js} +1 -1
  171. package/dist/esm/{a11y.tipps-d4474fb4.js.map → a11y.tipps-54065212.js.map} +1 -1
  172. package/dist/esm/{align-f80b127b.js → align-a2401a24.js} +1 -1
  173. package/dist/esm/{align-f80b127b.js.map → align-a2401a24.js.map} +1 -1
  174. package/dist/esm/{alignment-f20c3db4.js → alignment-2171a053.js} +1 -1
  175. package/dist/esm/{alignment-f20c3db4.js.map → alignment-2171a053.js.map} +1 -1
  176. package/dist/esm/{app-globals-41dc96d7.js → app-globals-770cf469.js} +1 -1
  177. package/dist/esm/{app-globals-41dc96d7.js.map → app-globals-770cf469.js.map} +1 -1
  178. package/dist/esm/{aria-current-1f41adc0.js → aria-current-87734eb8.js} +1 -1
  179. package/dist/esm/{aria-current-1f41adc0.js.map → aria-current-87734eb8.js.map} +1 -1
  180. package/dist/esm/{associated.controller-b9904b17.js → associated.controller-a1ec4433.js} +1 -1
  181. package/dist/esm/{associated.controller-b9904b17.js.map → associated.controller-a1ec4433.js.map} +1 -1
  182. package/dist/esm/{color-85b10e1d.js → color-9cbf6d52.js} +1 -1
  183. package/dist/esm/{color-85b10e1d.js.map → color-9cbf6d52.js.map} +1 -1
  184. package/dist/esm/{controller-b995efab.js → controller-23b9e0a2.js} +1 -1
  185. package/dist/esm/{controller-b995efab.js.map → controller-23b9e0a2.js.map} +1 -1
  186. package/dist/esm/{controller-da5ff8d9.js → controller-8aaf4af5.js} +1 -1
  187. package/dist/esm/{controller-da5ff8d9.js.map → controller-8aaf4af5.js.map} +1 -1
  188. package/dist/esm/{controller-5e3e32ca.js → controller-b4428245.js} +1 -1
  189. package/dist/esm/{controller-5e3e32ca.js.map → controller-b4428245.js.map} +1 -1
  190. package/dist/esm/{controller-a2596b56.js → controller-b84eace4.js} +1 -1
  191. package/dist/esm/{controller-a2596b56.js.map → controller-b84eace4.js.map} +1 -1
  192. package/dist/esm/{controller-3aa75da4.js → controller-d80a67d0.js} +1 -1
  193. package/dist/esm/{controller-3aa75da4.js.map → controller-d80a67d0.js.map} +1 -1
  194. package/dist/esm/{controller-icon-67650274.js → controller-icon-ef27c916.js} +1 -1
  195. package/dist/esm/{controller-icon-67650274.js.map → controller-icon-ef27c916.js.map} +1 -1
  196. package/dist/esm/{custom-class-1cf5081e.js → custom-class-833c9c0b.js} +1 -1
  197. package/dist/esm/{custom-class-1cf5081e.js.map → custom-class-833c9c0b.js.map} +1 -1
  198. package/dist/esm/{dev.utils-6644fc40.js → dev.utils-ad367f40.js} +1 -1
  199. package/dist/esm/{dev.utils-6644fc40.js.map → dev.utils-ad367f40.js.map} +1 -1
  200. package/dist/esm/{devtools-5c70a1f5.js → devtools-73dc1f39.js} +1 -1
  201. package/dist/esm/{devtools-5c70a1f5.js.map → devtools-73dc1f39.js.map} +1 -1
  202. package/dist/esm/{has-closer-d68572b5.js → has-closer-3f2a115a.js} +1 -1
  203. package/dist/esm/{has-closer-d68572b5.js.map → has-closer-3f2a115a.js.map} +1 -1
  204. package/dist/esm/{hide-label-f8e6542d.js → hide-label-310fe1b8.js} +1 -1
  205. package/dist/esm/{hide-label-f8e6542d.js.map → hide-label-310fe1b8.js.map} +1 -1
  206. package/dist/esm/{i18n-604b0def.js → i18n-ad401ed8.js} +1 -1
  207. package/dist/esm/{i18n-604b0def.js.map → i18n-ad401ed8.js.map} +1 -1
  208. package/dist/esm/{icons-a0f3f5e9.js → icons-c28cff87.js} +1 -1
  209. package/dist/esm/{icons-a0f3f5e9.js.map → icons-c28cff87.js.map} +1 -1
  210. package/dist/esm/{image-source-c214bb84.js → image-source-3f04add1.js} +1 -1
  211. package/dist/esm/{image-source-c214bb84.js.map → image-source-3f04add1.js.map} +1 -1
  212. package/dist/esm/index.js +1 -1
  213. package/dist/esm/kol-abbr.entry.js +1 -1
  214. package/dist/esm/kol-accordion.entry.js +1 -1
  215. package/dist/esm/kol-accordion.entry.js.map +1 -1
  216. package/dist/esm/kol-alert-wc_3.entry.js +1 -1
  217. package/dist/esm/kol-avatar-wc.entry.js +1 -1
  218. package/dist/esm/kol-badge.entry.js +1 -1
  219. package/dist/esm/kol-breadcrumb.entry.js +1 -1
  220. package/dist/esm/kol-button-link.entry.js +1 -1
  221. package/dist/esm/kol-button-link.entry.js.map +1 -1
  222. package/dist/esm/kol-button.entry.js +1 -1
  223. package/dist/esm/kol-button.entry.js.map +1 -1
  224. package/dist/esm/kol-card.entry.js +1 -1
  225. package/dist/esm/kol-details.entry.js +1 -1
  226. package/dist/esm/kol-details.entry.js.map +1 -1
  227. package/dist/esm/kol-form.entry.js +1 -1
  228. package/dist/esm/kol-icon.entry.js +1 -1
  229. package/dist/esm/kol-image.entry.js +1 -1
  230. package/dist/esm/kol-image.entry.js.map +1 -1
  231. package/dist/esm/kol-input-adapter-leanup.entry.js +1 -1
  232. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  233. package/dist/esm/kol-input-checkbox.entry.js.map +1 -1
  234. package/dist/esm/kol-input-color.entry.js +1 -1
  235. package/dist/esm/kol-input-date.entry.js +1 -1
  236. package/dist/esm/kol-input-email.entry.js +1 -1
  237. package/dist/esm/kol-input-file.entry.js +1 -1
  238. package/dist/esm/kol-input-number.entry.js +1 -1
  239. package/dist/esm/kol-input-password.entry.js +1 -1
  240. package/dist/esm/kol-input-radio-group.entry.js +1 -1
  241. package/dist/esm/kol-input-radio.entry.js +1 -1
  242. package/dist/esm/kol-input-radio.entry.js.map +1 -1
  243. package/dist/esm/kol-input-range.entry.js +1 -1
  244. package/dist/esm/kol-input-text.entry.js +1 -1
  245. package/dist/esm/kol-input.entry.js +1 -1
  246. package/dist/esm/kol-kolibri.entry.js +1 -1
  247. package/dist/esm/kol-link-button.entry.js +1 -1
  248. package/dist/esm/kol-link-button.entry.js.map +1 -1
  249. package/dist/esm/kol-link-group.entry.js +1 -1
  250. package/dist/esm/kol-link-wc.entry.js +1 -1
  251. package/dist/esm/kol-link.entry.js +1 -1
  252. package/dist/esm/kol-link.entry.js.map +1 -1
  253. package/dist/esm/kol-logo.entry.js +1 -1
  254. package/dist/esm/kol-modal.entry.js +1 -1
  255. package/dist/esm/kol-nav.entry.js +1 -1
  256. package/dist/esm/kol-pagination.entry.js +1 -1
  257. package/dist/esm/kol-popover.entry.js +1 -1
  258. package/dist/esm/kol-progress.entry.js +1 -1
  259. package/dist/esm/kol-quote.entry.js +1 -1
  260. package/dist/esm/kol-select.entry.js +1 -1
  261. package/dist/esm/kol-skip-nav.entry.js +1 -1
  262. package/dist/esm/kol-span-wc_2.entry.js +1 -1
  263. package/dist/esm/kol-spin.entry.js +1 -1
  264. package/dist/esm/kol-split-button.entry.js +1 -1
  265. package/dist/esm/kol-symbol.entry.js +1 -1
  266. package/dist/esm/kol-table.entry.js +1 -1
  267. package/dist/esm/kol-tabs.entry.js +1 -1
  268. package/dist/esm/kol-textarea.entry.js +1 -1
  269. package/dist/esm/kol-toast-container.entry.js +1 -1
  270. package/dist/esm/kol-toast.entry.js +1 -1
  271. package/dist/esm/kol-version.entry.js +1 -1
  272. package/dist/esm/kolibri.js +1 -1
  273. package/dist/esm/{label-dd0fc95b.js → label-57859a5a.js} +1 -1
  274. package/dist/esm/{label-dd0fc95b.js.map → label-57859a5a.js.map} +1 -1
  275. package/dist/esm/loader.js +1 -1
  276. package/dist/esm/{open-d9d85c3d.js → open-29222e31.js} +1 -1
  277. package/dist/esm/{open-d9d85c3d.js.map → open-29222e31.js.map} +1 -1
  278. package/dist/esm/{prop.validators-a681ba79.js → prop.validators-251589c8.js} +1 -1
  279. package/dist/esm/{prop.validators-a681ba79.js.map → prop.validators-251589c8.js.map} +1 -1
  280. package/dist/esm/{rows-c95ad23c.js → rows-c8fb93ae.js} +1 -1
  281. package/dist/esm/{rows-c95ad23c.js.map → rows-c8fb93ae.js.map} +1 -1
  282. package/dist/esm/{show-f6f9dd70.js → show-6fddf77c.js} +1 -1
  283. package/dist/esm/{show-f6f9dd70.js.map → show-6fddf77c.js.map} +1 -1
  284. package/dist/esm/{suggestions-73dd0819.js → suggestions-1e0fe6e9.js} +1 -1
  285. package/dist/esm/{suggestions-73dd0819.js.map → suggestions-1e0fe6e9.js.map} +1 -1
  286. package/dist/esm/{tab-index-f01a4299.js → tab-index-39708fff.js} +1 -1
  287. package/dist/esm/{tab-index-f01a4299.js.map → tab-index-39708fff.js.map} +1 -1
  288. package/dist/esm/{tooltip-align-db40ed75.js → tooltip-align-d0d73d60.js} +1 -1
  289. package/dist/esm/{tooltip-align-db40ed75.js.map → tooltip-align-d0d73d60.js.map} +1 -1
  290. package/dist/esm/validation-3e123430.js +4 -0
  291. package/dist/esm/{validation-b7903abd.js.map → validation-3e123430.js.map} +1 -1
  292. package/dist/esm/validation-74fe1552.js +4 -0
  293. package/dist/esm/{validation-e4e29b6a.js.map → validation-74fe1552.js.map} +1 -1
  294. package/dist/kolibri/{a11y.tipps-d4474fb4.js → a11y.tipps-54065212.js} +1 -1
  295. package/dist/kolibri/align-a2401a24.js +4 -0
  296. package/dist/kolibri/alignment-2171a053.js +4 -0
  297. package/dist/kolibri/{app-globals-41dc96d7.js → app-globals-770cf469.js} +1 -1
  298. package/dist/kolibri/{aria-current-1f41adc0.js → aria-current-87734eb8.js} +1 -1
  299. package/dist/kolibri/{associated.controller-b9904b17.js → associated.controller-a1ec4433.js} +1 -1
  300. package/dist/kolibri/{color-85b10e1d.js → color-9cbf6d52.js} +1 -1
  301. package/dist/kolibri/{controller-b995efab.js → controller-23b9e0a2.js} +1 -1
  302. package/dist/kolibri/controller-8aaf4af5.js +4 -0
  303. package/dist/kolibri/{controller-da5ff8d9.js.map → controller-8aaf4af5.js.map} +1 -1
  304. package/dist/kolibri/{controller-5e3e32ca.js → controller-b4428245.js} +1 -1
  305. package/dist/kolibri/{controller-a2596b56.js → controller-b84eace4.js} +1 -1
  306. package/dist/kolibri/{controller-3aa75da4.js → controller-d80a67d0.js} +1 -1
  307. package/dist/kolibri/controller-icon-ef27c916.js +4 -0
  308. package/dist/kolibri/{custom-class-1cf5081e.js → custom-class-833c9c0b.js} +1 -1
  309. package/dist/kolibri/{dev.utils-6644fc40.js → dev.utils-ad367f40.js} +1 -1
  310. package/dist/kolibri/{dev.utils-6644fc40.js.map → dev.utils-ad367f40.js.map} +1 -1
  311. package/dist/kolibri/{devtools-5c70a1f5.js → devtools-73dc1f39.js} +1 -1
  312. package/dist/kolibri/has-closer-3f2a115a.js +4 -0
  313. package/dist/kolibri/{has-closer-d68572b5.js.map → has-closer-3f2a115a.js.map} +1 -1
  314. package/dist/kolibri/hide-label-310fe1b8.js +4 -0
  315. package/dist/kolibri/{i18n-604b0def.js → i18n-ad401ed8.js} +1 -1
  316. package/dist/kolibri/{icons-a0f3f5e9.js → icons-c28cff87.js} +1 -1
  317. package/dist/kolibri/image-source-3f04add1.js +4 -0
  318. package/dist/kolibri/index.esm.js +1 -1
  319. package/dist/kolibri/kol-abbr.entry.js +1 -1
  320. package/dist/kolibri/kol-accordion.entry.js +1 -1
  321. package/dist/kolibri/kol-accordion.entry.js.map +1 -1
  322. package/dist/kolibri/kol-alert-wc_3.entry.js +1 -1
  323. package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
  324. package/dist/kolibri/kol-avatar-wc.entry.js.map +1 -1
  325. package/dist/kolibri/kol-badge.entry.js +1 -1
  326. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  327. package/dist/kolibri/kol-button-link.entry.js +1 -1
  328. package/dist/kolibri/kol-button-link.entry.js.map +1 -1
  329. package/dist/kolibri/kol-button.entry.js +1 -1
  330. package/dist/kolibri/kol-button.entry.js.map +1 -1
  331. package/dist/kolibri/kol-card.entry.js +1 -1
  332. package/dist/kolibri/kol-details.entry.js +1 -1
  333. package/dist/kolibri/kol-details.entry.js.map +1 -1
  334. package/dist/kolibri/kol-form.entry.js +1 -1
  335. package/dist/kolibri/kol-icon.entry.js +1 -1
  336. package/dist/kolibri/kol-image.entry.js +1 -1
  337. package/dist/kolibri/kol-image.entry.js.map +1 -1
  338. package/dist/kolibri/kol-input-adapter-leanup.entry.js +1 -1
  339. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  340. package/dist/kolibri/kol-input-checkbox.entry.js.map +1 -1
  341. package/dist/kolibri/kol-input-color.entry.js +1 -1
  342. package/dist/kolibri/kol-input-date.entry.js +1 -1
  343. package/dist/kolibri/kol-input-email.entry.js +1 -1
  344. package/dist/kolibri/kol-input-file.entry.js +1 -1
  345. package/dist/kolibri/kol-input-number.entry.js +1 -1
  346. package/dist/kolibri/kol-input-password.entry.js +1 -1
  347. package/dist/kolibri/kol-input-radio-group.entry.js +1 -1
  348. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  349. package/dist/kolibri/kol-input-radio.entry.js.map +1 -1
  350. package/dist/kolibri/kol-input-range.entry.js +1 -1
  351. package/dist/kolibri/kol-input-text.entry.js +1 -1
  352. package/dist/kolibri/kol-input.entry.js +1 -1
  353. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  354. package/dist/kolibri/kol-link-button.entry.js +1 -1
  355. package/dist/kolibri/kol-link-button.entry.js.map +1 -1
  356. package/dist/kolibri/kol-link-group.entry.js +1 -1
  357. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  358. package/dist/kolibri/kol-link.entry.js +1 -1
  359. package/dist/kolibri/kol-link.entry.js.map +1 -1
  360. package/dist/kolibri/kol-logo.entry.js +1 -1
  361. package/dist/kolibri/kol-modal.entry.js +1 -1
  362. package/dist/kolibri/kol-nav.entry.js +1 -1
  363. package/dist/kolibri/kol-pagination.entry.js +1 -1
  364. package/dist/kolibri/kol-pagination.entry.js.map +1 -1
  365. package/dist/kolibri/kol-popover.entry.js +1 -1
  366. package/dist/kolibri/kol-progress.entry.js +1 -1
  367. package/dist/kolibri/kol-quote.entry.js +1 -1
  368. package/dist/kolibri/kol-select.entry.js +1 -1
  369. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  370. package/dist/kolibri/kol-span-wc_2.entry.js +1 -1
  371. package/dist/kolibri/kol-spin.entry.js +1 -1
  372. package/dist/kolibri/kol-split-button.entry.js +1 -1
  373. package/dist/kolibri/kol-symbol.entry.js +1 -1
  374. package/dist/kolibri/kol-table.entry.js +1 -1
  375. package/dist/kolibri/kol-tabs.entry.js +1 -1
  376. package/dist/kolibri/kol-textarea.entry.js +1 -1
  377. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  378. package/dist/kolibri/kol-toast.entry.js +1 -1
  379. package/dist/kolibri/kol-version.entry.js +1 -1
  380. package/dist/kolibri/kolibri.esm.js +1 -1
  381. package/dist/kolibri/{label-dd0fc95b.js → label-57859a5a.js} +1 -1
  382. package/dist/kolibri/open-29222e31.js +4 -0
  383. package/dist/kolibri/{open-d9d85c3d.js.map → open-29222e31.js.map} +1 -1
  384. package/dist/kolibri/{prop.validators-a681ba79.js → prop.validators-251589c8.js} +1 -1
  385. package/dist/kolibri/rows-c8fb93ae.js +4 -0
  386. package/dist/kolibri/show-6fddf77c.js +4 -0
  387. package/dist/kolibri/{show-f6f9dd70.js.map → show-6fddf77c.js.map} +1 -1
  388. package/dist/kolibri/{suggestions-73dd0819.js → suggestions-1e0fe6e9.js} +1 -1
  389. package/dist/kolibri/tab-index-39708fff.js +4 -0
  390. package/dist/kolibri/{tab-index-f01a4299.js.map → tab-index-39708fff.js.map} +1 -1
  391. package/dist/kolibri/tooltip-align-d0d73d60.js +4 -0
  392. package/dist/kolibri/validation-3e123430.js +4 -0
  393. package/dist/kolibri/validation-74fe1552.js +4 -0
  394. package/dist/types/components/accordion/component.d.ts +2 -0
  395. package/dist/types/components/button/shadow.d.ts +0 -1
  396. package/dist/types/components/button-link/component.d.ts +0 -1
  397. package/dist/types/components/details/component.d.ts +1 -0
  398. package/dist/types/components/input-checkbox/component.d.ts +0 -1
  399. package/dist/types/components/input-radio/component.d.ts +0 -1
  400. package/dist/types/components/link/shadow.d.ts +0 -1
  401. package/dist/types/components/link-button/component.d.ts +0 -1
  402. package/package.json +1 -1
  403. package/dist/cjs/align-d43fb2e6.js +0 -4
  404. package/dist/cjs/aria-current-15ac658e.js +0 -4
  405. package/dist/cjs/controller-69fcf8c1.js +0 -4
  406. package/dist/cjs/has-closer-f38cfe7e.js +0 -4
  407. package/dist/cjs/hide-label-0213dc75.js +0 -4
  408. package/dist/cjs/image-source-7d1a9b1b.js +0 -4
  409. package/dist/cjs/open-094dce9b.js +0 -4
  410. package/dist/cjs/rows-8fef3ed1.js +0 -4
  411. package/dist/cjs/show-24e6ed74.js +0 -4
  412. package/dist/cjs/validation-c95c5334.js +0 -4
  413. package/dist/esm/validation-b7903abd.js +0 -4
  414. package/dist/esm/validation-e4e29b6a.js +0 -4
  415. package/dist/kolibri/align-f80b127b.js +0 -4
  416. package/dist/kolibri/alignment-f20c3db4.js +0 -4
  417. package/dist/kolibri/controller-da5ff8d9.js +0 -4
  418. package/dist/kolibri/controller-icon-67650274.js +0 -4
  419. package/dist/kolibri/has-closer-d68572b5.js +0 -4
  420. package/dist/kolibri/hide-label-f8e6542d.js +0 -4
  421. package/dist/kolibri/image-source-c214bb84.js +0 -4
  422. package/dist/kolibri/open-d9d85c3d.js +0 -4
  423. package/dist/kolibri/rows-c95ad23c.js +0 -4
  424. package/dist/kolibri/show-f6f9dd70.js +0 -4
  425. package/dist/kolibri/tab-index-f01a4299.js +0 -4
  426. package/dist/kolibri/tooltip-align-db40ed75.js +0 -4
  427. package/dist/kolibri/validation-b7903abd.js +0 -4
  428. package/dist/kolibri/validation-e4e29b6a.js +0 -4
  429. /package/dist/kolibri/{a11y.tipps-d4474fb4.js.map → a11y.tipps-54065212.js.map} +0 -0
  430. /package/dist/kolibri/{align-f80b127b.js.map → align-a2401a24.js.map} +0 -0
  431. /package/dist/kolibri/{alignment-f20c3db4.js.map → alignment-2171a053.js.map} +0 -0
  432. /package/dist/kolibri/{app-globals-41dc96d7.js.map → app-globals-770cf469.js.map} +0 -0
  433. /package/dist/kolibri/{aria-current-1f41adc0.js.map → aria-current-87734eb8.js.map} +0 -0
  434. /package/dist/kolibri/{associated.controller-b9904b17.js.map → associated.controller-a1ec4433.js.map} +0 -0
  435. /package/dist/kolibri/{color-85b10e1d.js.map → color-9cbf6d52.js.map} +0 -0
  436. /package/dist/kolibri/{controller-b995efab.js.map → controller-23b9e0a2.js.map} +0 -0
  437. /package/dist/kolibri/{controller-5e3e32ca.js.map → controller-b4428245.js.map} +0 -0
  438. /package/dist/kolibri/{controller-a2596b56.js.map → controller-b84eace4.js.map} +0 -0
  439. /package/dist/kolibri/{controller-3aa75da4.js.map → controller-d80a67d0.js.map} +0 -0
  440. /package/dist/kolibri/{controller-icon-67650274.js.map → controller-icon-ef27c916.js.map} +0 -0
  441. /package/dist/kolibri/{custom-class-1cf5081e.js.map → custom-class-833c9c0b.js.map} +0 -0
  442. /package/dist/kolibri/{devtools-5c70a1f5.js.map → devtools-73dc1f39.js.map} +0 -0
  443. /package/dist/kolibri/{hide-label-f8e6542d.js.map → hide-label-310fe1b8.js.map} +0 -0
  444. /package/dist/kolibri/{i18n-604b0def.js.map → i18n-ad401ed8.js.map} +0 -0
  445. /package/dist/kolibri/{icons-a0f3f5e9.js.map → icons-c28cff87.js.map} +0 -0
  446. /package/dist/kolibri/{image-source-c214bb84.js.map → image-source-3f04add1.js.map} +0 -0
  447. /package/dist/kolibri/{label-dd0fc95b.js.map → label-57859a5a.js.map} +0 -0
  448. /package/dist/kolibri/{prop.validators-a681ba79.js.map → prop.validators-251589c8.js.map} +0 -0
  449. /package/dist/kolibri/{rows-c95ad23c.js.map → rows-c8fb93ae.js.map} +0 -0
  450. /package/dist/kolibri/{suggestions-73dd0819.js.map → suggestions-1e0fe6e9.js.map} +0 -0
  451. /package/dist/kolibri/{tooltip-align-db40ed75.js.map → tooltip-align-d0d73d60.js.map} +0 -0
  452. /package/dist/kolibri/{validation-b7903abd.js.map → validation-3e123430.js.map} +0 -0
  453. /package/dist/kolibri/{validation-e4e29b6a.js.map → validation-74fe1552.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"names":["defaultStyleCss","featureHint","KolAccordion","this","nonce","onClick","event","_open","setTimeout","_a","state","_on","_label","_level","render","h","Host","class","accordion","open","_ariaControls","_ariaExpanded","_icons","name","undefined","id","validateHeading","value","validateLabel","validateLevel","watchHeadingLevel","validateOn","setState","validateOpen","componentWillLoad","_heading"],"sources":["src/components/accordion/style.css?tag=kol-accordion&mode=default&encapsulation=shadow","src/components/accordion/component.tsx"],"sourcesContent":["@import url(../style.css);\n@import url(../host-display-block.css);\n/* For animation technique see https://css-tricks.com/css-grid-can-do-auto-height-transitions/ */\n.wrapper {\n\tdisplay: grid;\n\tgrid-template-rows: 0fr;\n\toverflow: hidden;\n\ttransition: grid-template-rows 0.3s;\n}\n.accordion.open .wrapper {\n\tgrid-template-rows: 1fr;\n}\n.animation-wrapper {\n\tmin-height: 0;\n\ttransition: visibility 0.3s;\n\t/* This property is important to keep in sync with the visual transition (template-rows). Without it interactive elements within the accordion would stay focusable. */\n\tvisibility: hidden;\n}\n.accordion.open .animation-wrapper {\n\tvisibility: visible;\n}\n@media (prefers-reduced-motion) {\n\t.animation-wrapper,\n\t.wrapper {\n\t\ttransition-duration: 0s;\n\t}\n} /*\n * Inside a button, the caption text is always centered.\n * So we have to align the text to the left.\n */\n.accordion kol-heading-wc kol-button-wc button kol-span-wc {\n\tjustify-items: start;\n}\n","// https://codepen.io/mbxtr/pen/OJPOYg?html-preprocessor=haml\n\nimport { Component, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { HeadingLevel } from '../../types/heading-level';\nimport { LabelPropType, validateLabel } from '../../types/props/label';\nimport { OpenPropType, validateOpen } from '../../types/props/open';\nimport { featureHint } from '../../utils/a11y.tipps';\nimport { nonce } from '../../utils/dev.utils';\nimport { setState } from '../../utils/prop.validators';\nimport { watchHeadingLevel } from '../heading/validation';\nimport { API, KoliBriAccordionCallbacks, States } from './types';\n\nfeatureHint(`[KolAccordion] Anfrage nach einer KolAccordionGroup bei dem immer nur ein Accordion geöffnet ist.\n\n- onClick auf der KolAccordion anwenden\n- Click-Event prüft den _open-Status der Accordions\n- Logik Öffnet und Schließt entsprechend`);\nfeatureHint(`[KolAccordion] Tab-Sperre des Inhalts im geschlossenen Zustand.`);\n\n/**\n *\n * @slot - Ermöglicht das Einfügen beliebigen HTML's in den Inhaltsbereich des Accordions.\n * @slot content - Ermöglicht das Einfügen beliebigen HTML's in den Inhaltsbereich des Accordions.\n * @slot header - Deprecated für Version 2: Ermöglicht das Einfügen beliebigen HTML's in den Kopfbereich des Accordions.\n */\n@Component({\n\ttag: 'kol-accordion',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolAccordion implements API {\n\tprivate readonly nonce = nonce();\n\n\tpublic render(): JSX.Element {\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\taccordion: true,\n\t\t\t\t\t\topen: this.state._open === true,\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<kol-heading-wc _label=\"\" _level={this.state._level}>\n\t\t\t\t\t\t<kol-button-wc\n\t\t\t\t\t\t\t// slot=\"expert\"\n\t\t\t\t\t\t\t_ariaControls={this.nonce}\n\t\t\t\t\t\t\t_ariaExpanded={this.state._open}\n\t\t\t\t\t\t\t_icons={this.state._open ? 'codicon codicon-remove' : 'codicon codicon-add'}\n\t\t\t\t\t\t\t_label={this.state._label}\n\t\t\t\t\t\t\t_on={{ onClick: this.onClick }}\n\t\t\t\t\t\t></kol-button-wc>\n\t\t\t\t\t</kol-heading-wc>\n\t\t\t\t\t<div class=\"header\">\n\t\t\t\t\t\t<slot name=\"header\"></slot>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"wrapper\">\n\t\t\t\t\t\t<div class=\"animation-wrapper\">\n\t\t\t\t\t\t\t<div aria-hidden={this.state._open === false ? 'true' : undefined} class=\"content\" id={this.nonce}>\n\t\t\t\t\t\t\t\t<slot name=\"content\"></slot> {/* Deprecated for version 2 */}\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</div>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Deprecated: Gibt die Beschriftung der Komponente an.\n\t * @deprecated Use _label.\n\t */\n\t@Prop() public _heading?: string;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() public _label?: string;\n\n\t/**\n\t * Defines which H-level from 1-6 the heading has. 0 specifies no heading and is shown as bold text.\n\t */\n\t@Prop() public _level?: HeadingLevel = 1;\n\n\t/**\n\t * Gibt die EventCallback-Funktionen an.\n\t */\n\t@Prop() public _on?: KoliBriAccordionCallbacks;\n\n\t/**\n\t * If set (to true) opens/expands the element, closes if not set (or set to false).\n\t * @TODO: Change type back to `OpenPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _open?: boolean = false;\n\n\t@State() public state: States = {\n\t\t_label: '…', // ⚠ required\n\t\t_level: 1,\n\t};\n\n\t@Watch('_heading')\n\tpublic validateHeading(value?: string): void {\n\t\tthis.validateLabel(value);\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelPropType): void {\n\t\tvalidateLabel(this, value);\n\t}\n\n\t@Watch('_level')\n\tpublic validateLevel(value?: HeadingLevel): void {\n\t\twatchHeadingLevel(this, value);\n\t}\n\n\t@Watch('_on')\n\tpublic validateOn(value?: KoliBriAccordionCallbacks): void {\n\t\tif (typeof value === 'object' && value !== null && typeof value.onClick === 'function') {\n\t\t\tsetState(this, '_on', value);\n\t\t}\n\t}\n\n\t@Watch('_open')\n\tpublic validateOpen(value?: OpenPropType): void {\n\t\tvalidateOpen(this, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateLabel(this._label || this._heading);\n\t\tthis.validateLevel(this._level);\n\t\tthis.validateOn(this._on);\n\t\tthis.validateOpen(this._open);\n\t}\n\n\tprivate onClick = (event: Event) => {\n\t\tthis._open = !this._open;\n\n\t\t/**\n\t\t * Der Timeout wird benötigt, damit das Event\n\t\t * vom Button- auf das Accordion-Event wechselt.\n\t\t * So ist es dem Anwendenden möglich das _open-\n\t\t * Attribute abzufragen.\n\t\t */\n\t\tsetTimeout(() => {\n\t\t\tif (typeof this.state._on?.onClick === 'function') {\n\t\t\t\tthis.state._on.onClick(event, this._open === true);\n\t\t\t}\n\t\t});\n\t};\n}\n"],"mappings":";;;qXAAA,MAAMA,EAAkB,qpCCaxBC,EAAY,+OAKZA,EAAY,mE,MAeCC,EAAY,M,yBACPC,KAAAC,MAAQA,IAuGjBD,KAAAE,QAAWC,IAClBH,KAAKI,OAASJ,KAAKI,MAQnBC,YAAW,K,MACV,WAAWC,EAAAN,KAAKO,MAAMC,OAAG,MAAAF,SAAA,SAAAA,EAAEJ,WAAY,WAAY,CAClDF,KAAKO,MAAMC,IAAIN,QAAQC,EAAOH,KAAKI,QAAU,K,IAE7C,E,0DAjEoC,E,8BAW0B,M,WAEjC,CAC/BK,OAAQ,IACRC,OAAQ,E,CAhEF,MAAAC,GACN,OACCC,EAACC,EAAI,KACJD,EAAA,OACCE,MAAO,CACNC,UAAW,KACXC,KAAMhB,KAAKO,MAAMH,QAAU,OAG5BQ,EAAA,kBAAgBH,OAAO,GAAGC,OAAQV,KAAKO,MAAMG,QAC5CE,EAAA,iBAECK,cAAejB,KAAKC,MACpBiB,cAAelB,KAAKO,MAAMH,MAC1Be,OAAQnB,KAAKO,MAAMH,MAAQ,yBAA2B,sBACtDK,OAAQT,KAAKO,MAAME,OACnBD,IAAK,CAAEN,QAASF,KAAKE,YAGvBU,EAAA,OAAKE,MAAM,UACVF,EAAA,QAAMQ,KAAK,YAEZR,EAAA,OAAKE,MAAM,WACVF,EAAA,OAAKE,MAAM,qBACVF,EAAA,qBAAkBZ,KAAKO,MAAMH,QAAU,MAAQ,OAASiB,UAAWP,MAAM,UAAUQ,GAAItB,KAAKC,OAC3FW,EAAA,QAAMQ,KAAK,YAAiB,IAC5BR,EAAA,iB,CA0CA,eAAAW,CAAgBC,GACtBxB,KAAKyB,cAAcD,E,CAIb,aAAAC,CAAcD,GACpBC,EAAczB,KAAMwB,E,CAId,aAAAE,CAAcF,GACpBG,EAAkB3B,KAAMwB,E,CAIlB,UAAAI,CAAWJ,GACjB,UAAWA,IAAU,UAAYA,IAAU,aAAeA,EAAMtB,UAAY,WAAY,CACvF2B,EAAS7B,KAAM,MAAOwB,E,EAKjB,YAAAM,CAAaN,GACnBM,EAAa9B,KAAMwB,E,CAGb,iBAAAO,GACN/B,KAAKyB,cAAczB,KAAKS,QAAUT,KAAKgC,UACvChC,KAAK0B,cAAc1B,KAAKU,QACxBV,KAAK4B,WAAW5B,KAAKQ,KACrBR,KAAK8B,aAAa9B,KAAKI,M"}
1
+ {"version":3,"names":["defaultStyleCss","featureHint","KolAccordion","this","nonce","catchRef","ref","propagateFocus","host","onClick","event","_open","setTimeout","_a","state","_on","_label","_level","render","h","Host","class","accordion","open","slot","_ariaControls","_ariaExpanded","_icons","name","undefined","id","validateHeading","value","validateLabel","validateLevel","watchHeadingLevel","validateOn","setState","validateOpen","componentWillLoad","_heading"],"sources":["src/components/accordion/style.css?tag=kol-accordion&mode=default&encapsulation=shadow","src/components/accordion/component.tsx"],"sourcesContent":["@import url(../style.css);\n@import url(../host-display-block.css);\n/* For animation technique see https://css-tricks.com/css-grid-can-do-auto-height-transitions/ */\n.wrapper {\n\tdisplay: grid;\n\tgrid-template-rows: 0fr;\n\toverflow: hidden;\n\ttransition: grid-template-rows 0.3s;\n}\n.accordion.open .wrapper {\n\tgrid-template-rows: 1fr;\n}\n.animation-wrapper {\n\tmin-height: 0;\n\ttransition: visibility 0.3s;\n\t/* This property is important to keep in sync with the visual transition (template-rows). Without it interactive elements within the accordion would stay focusable. */\n\tvisibility: hidden;\n}\n.accordion.open .animation-wrapper {\n\tvisibility: visible;\n}\n@media (prefers-reduced-motion) {\n\t.animation-wrapper,\n\t.wrapper {\n\t\ttransition-duration: 0s;\n\t}\n} /*\n * Inside a button, the caption text is always centered.\n * So we have to align the text to the left.\n */\n.accordion kol-heading-wc kol-button-wc button kol-span-wc {\n\tjustify-items: start;\n}\n","// https://codepen.io/mbxtr/pen/OJPOYg?html-preprocessor=haml\n\nimport { Component, Element, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { HeadingLevel } from '../../types/heading-level';\nimport { LabelPropType, validateLabel } from '../../types/props/label';\nimport { OpenPropType, validateOpen } from '../../types/props/open';\nimport { featureHint } from '../../utils/a11y.tipps';\nimport { nonce } from '../../utils/dev.utils';\nimport { setState } from '../../utils/prop.validators';\nimport { propagateFocus } from '../../utils/reuse';\nimport { watchHeadingLevel } from '../heading/validation';\nimport { API, KoliBriAccordionCallbacks, States } from './types';\n\nfeatureHint(`[KolAccordion] Anfrage nach einer KolAccordionGroup bei dem immer nur ein Accordion geöffnet ist.\n\n- onClick auf der KolAccordion anwenden\n- Click-Event prüft den _open-Status der Accordions\n- Logik Öffnet und Schließt entsprechend`);\nfeatureHint(`[KolAccordion] Tab-Sperre des Inhalts im geschlossenen Zustand.`);\n\n/**\n *\n * @slot - Ermöglicht das Einfügen beliebigen HTML's in den Inhaltsbereich des Accordions.\n * @slot content - Ermöglicht das Einfügen beliebigen HTML's in den Inhaltsbereich des Accordions.\n * @slot header - Deprecated für Version 2: Ermöglicht das Einfügen beliebigen HTML's in den Kopfbereich des Accordions.\n */\n@Component({\n\ttag: 'kol-accordion',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolAccordion implements API {\n\t@Element() private readonly host?: HTMLKolDetailsElement;\n\tprivate readonly nonce = nonce();\n\n\tprivate readonly catchRef = (ref?: HTMLKolButtonWcElement) => {\n\t\tpropagateFocus(this.host, ref);\n\t};\n\n\tpublic render(): JSX.Element {\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\taccordion: true,\n\t\t\t\t\t\topen: this.state._open === true,\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<kol-heading-wc _label=\"\" _level={this.state._level}>\n\t\t\t\t\t\t<kol-button-wc\n\t\t\t\t\t\t\tref={this.catchRef}\n\t\t\t\t\t\t\tslot=\"expert\"\n\t\t\t\t\t\t\t_ariaControls={this.nonce}\n\t\t\t\t\t\t\t_ariaExpanded={this.state._open}\n\t\t\t\t\t\t\t_icons={this.state._open ? 'codicon codicon-remove' : 'codicon codicon-add'}\n\t\t\t\t\t\t\t_label={this.state._label}\n\t\t\t\t\t\t\t_on={{ onClick: this.onClick }}\n\t\t\t\t\t\t></kol-button-wc>\n\t\t\t\t\t</kol-heading-wc>\n\t\t\t\t\t<div class=\"header\">\n\t\t\t\t\t\t<slot name=\"header\"></slot>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"wrapper\">\n\t\t\t\t\t\t<div class=\"animation-wrapper\">\n\t\t\t\t\t\t\t<div aria-hidden={this.state._open === false ? 'true' : undefined} class=\"content\" id={this.nonce}>\n\t\t\t\t\t\t\t\t<slot name=\"content\"></slot> {/* Deprecated for version 2 */}\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</div>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Deprecated: Gibt die Beschriftung der Komponente an.\n\t * @deprecated Use _label.\n\t */\n\t@Prop() public _heading?: string;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() public _label?: string;\n\n\t/**\n\t * Defines which H-level from 1-6 the heading has. 0 specifies no heading and is shown as bold text.\n\t */\n\t@Prop() public _level?: HeadingLevel = 1;\n\n\t/**\n\t * Gibt die EventCallback-Funktionen an.\n\t */\n\t@Prop() public _on?: KoliBriAccordionCallbacks;\n\n\t/**\n\t * If set (to true) opens/expands the element, closes if not set (or set to false).\n\t * @TODO: Change type back to `OpenPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _open?: boolean = false;\n\n\t@State() public state: States = {\n\t\t_label: '…', // ⚠ required\n\t\t_level: 1,\n\t};\n\n\t@Watch('_heading')\n\tpublic validateHeading(value?: string): void {\n\t\tthis.validateLabel(value);\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelPropType): void {\n\t\tvalidateLabel(this, value);\n\t}\n\n\t@Watch('_level')\n\tpublic validateLevel(value?: HeadingLevel): void {\n\t\twatchHeadingLevel(this, value);\n\t}\n\n\t@Watch('_on')\n\tpublic validateOn(value?: KoliBriAccordionCallbacks): void {\n\t\tif (typeof value === 'object' && value !== null && typeof value.onClick === 'function') {\n\t\t\tsetState(this, '_on', value);\n\t\t}\n\t}\n\n\t@Watch('_open')\n\tpublic validateOpen(value?: OpenPropType): void {\n\t\tvalidateOpen(this, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateLabel(this._label || this._heading);\n\t\tthis.validateLevel(this._level);\n\t\tthis.validateOn(this._on);\n\t\tthis.validateOpen(this._open);\n\t}\n\n\tprivate onClick = (event: Event) => {\n\t\tthis._open = !this._open;\n\n\t\t/**\n\t\t * Der Timeout wird benötigt, damit das Event\n\t\t * vom Button- auf das Accordion-Event wechselt.\n\t\t * So ist es dem Anwendenden möglich das _open-\n\t\t * Attribute abzufragen.\n\t\t */\n\t\tsetTimeout(() => {\n\t\t\tif (typeof this.state._on?.onClick === 'function') {\n\t\t\t\tthis.state._on.onClick(event, this._open === true);\n\t\t\t}\n\t\t});\n\t};\n}\n"],"mappings":";;;wYAAA,MAAMA,EAAkB,qpCCcxBC,EAAY,+OAKZA,EAAY,mE,MAeCC,EAAY,M,yBAEPC,KAAAC,MAAQA,IAERD,KAAAE,SAAYC,IAC5BC,EAAeJ,KAAKK,KAAMF,EAAI,EAyGvBH,KAAAM,QAAWC,IAClBP,KAAKQ,OAASR,KAAKQ,MAQnBC,YAAW,K,MACV,WAAWC,EAAAV,KAAKW,MAAMC,OAAG,MAAAF,SAAA,SAAAA,EAAEJ,WAAY,WAAY,CAClDN,KAAKW,MAAMC,IAAIN,QAAQC,EAAOP,KAAKQ,QAAU,K,IAE7C,E,0DAjEoC,E,8BAW0B,M,WAEjC,CAC/BK,OAAQ,IACRC,OAAQ,E,CAjEF,MAAAC,GACN,OACCC,EAACC,EAAI,KACJD,EAAA,OACCE,MAAO,CACNC,UAAW,KACXC,KAAMpB,KAAKW,MAAMH,QAAU,OAG5BQ,EAAA,kBAAgBH,OAAO,GAAGC,OAAQd,KAAKW,MAAMG,QAC5CE,EAAA,iBACCb,IAAKH,KAAKE,SACVmB,KAAK,SACLC,cAAetB,KAAKC,MACpBsB,cAAevB,KAAKW,MAAMH,MAC1BgB,OAAQxB,KAAKW,MAAMH,MAAQ,yBAA2B,sBACtDK,OAAQb,KAAKW,MAAME,OACnBD,IAAK,CAAEN,QAASN,KAAKM,YAGvBU,EAAA,OAAKE,MAAM,UACVF,EAAA,QAAMS,KAAK,YAEZT,EAAA,OAAKE,MAAM,WACVF,EAAA,OAAKE,MAAM,qBACVF,EAAA,qBAAkBhB,KAAKW,MAAMH,QAAU,MAAQ,OAASkB,UAAWR,MAAM,UAAUS,GAAI3B,KAAKC,OAC3Fe,EAAA,QAAMS,KAAK,YAAiB,IAC5BT,EAAA,iB,CA0CA,eAAAY,CAAgBC,GACtB7B,KAAK8B,cAAcD,E,CAIb,aAAAC,CAAcD,GACpBC,EAAc9B,KAAM6B,E,CAId,aAAAE,CAAcF,GACpBG,EAAkBhC,KAAM6B,E,CAIlB,UAAAI,CAAWJ,GACjB,UAAWA,IAAU,UAAYA,IAAU,aAAeA,EAAMvB,UAAY,WAAY,CACvF4B,EAASlC,KAAM,MAAO6B,E,EAKjB,YAAAM,CAAaN,GACnBM,EAAanC,KAAM6B,E,CAGb,iBAAAO,GACNpC,KAAK8B,cAAc9B,KAAKa,QAAUb,KAAKqC,UACvCrC,KAAK+B,cAAc/B,KAAKc,QACxBd,KAAKiC,WAAWjC,KAAKY,KACrBZ,KAAKmC,aAAanC,KAAKQ,M"}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as t,h as i,H as s,g as e}from"./index-536799d5.js";import{a}from"./i18n-604b0def.js";import{v as l}from"./has-closer-d68572b5.js";import{v as n,a as o}from"./label-dd0fc95b.js";import{L as h}from"./dev.utils-6644fc40.js";import{a as r,s as d,w as c,l as u,i as v,f,d as b}from"./prop.validators-a681ba79.js";import{w as p}from"./validation-b7903abd.js";import{v as _,a as m,c as y}from"./aria-current-1f41adc0.js";import{v as g,a as w}from"./custom-class-1cf5081e.js";import{v as L}from"./hide-label-f8e6542d.js";import{v as j,w as A}from"./icons-a0f3f5e9.js";import{v as C}from"./tooltip-align-db40ed75.js";import{g as k}from"./a11y.tipps-d4474fb4.js";import{s as x,t as S}from"./events-2bb1065b.js";import{a as I,s as T}from"./reuse-b3566e4c.js";import{v as V}from"./tab-index-f01a4299.js";import{p as H,a as O}from"./controller-b995efab.js";import{A as E}from"./associated.controller-b9904b17.js";import"./index-23225963.js";import"./index-3822b0c5.js";import"./alignment-f20c3db4.js";const B=t=>i("kol-icon",{class:"heading-icon",_ariaLabel:"string"==typeof t.label&&t.label.length>0?"":t.ariaLabel,_icons:t.icon}),K=t=>{switch(t.type){case"error":return i(B,{ariaLabel:a("kol-error"),icon:"codicon codicon-error",label:t.label});case"info":return i(B,{ariaLabel:a("kol-info"),icon:"codicon codicon-info",label:t.label});case"warning":return i(B,{ariaLabel:a("kol-warning"),icon:"codicon codicon-warning",label:t.label});case"success":return i(B,{ariaLabel:a("kol-success"),icon:"codicon codicon-pass",label:t.label});default:return i(B,{ariaLabel:a("kol-message"),icon:"codicon codicon-comment",label:t.label})}},N=class{constructor(a){t(this,a),this.close=()=>{var t;void 0!==(null===(t=this._on)||void 0===t?void 0:t.onClose)&&this._on.onClose(new Event("Close"))},this.on={onClick:this.close},this.validateOnValue=t=>"object"==typeof t&&null!==t&&"function"==typeof t.onClose,this._alert=!1,this._hasCloser=!1,this._label=void 0,this._level=1,this._on=void 0,this._type="default",this._variant="msg",this.state={_level:1}}render(){var t;if(this.state._alert){try{h.debug(["Navigator should vibrate ...",navigator.vibrate([100,75,100,75,100])])}catch(t){h.debug("Navigator does not support vibration.")}setTimeout((()=>{this.validateAlert(!1)}),1e4)}return i(s,{class:{[this.state._type]:!0,[this.state._variant]:!0,hasCloser:!!this.state._hasCloser},role:this.state._alert?"alert":void 0},i("div",{class:"heading"},i(K,{label:this.state._label,type:this.state._type}),i("div",null,"string"==typeof this.state._label&&(null===(t=this.state._label)||void 0===t?void 0:t.length)>0&&i("kol-heading-wc",{_label:this.state._label,_level:this.state._level}),"msg"===this._variant&&i("div",{class:"content"},i("slot",null))),this.state._hasCloser&&i("kol-button-wc",{class:"close",_hideLabel:!0,_icons:{left:{icon:"codicon codicon-close"}},_label:a("kol-close"),_on:this.on,_tooltipAlign:"left"})),"card"===this._variant&&i("div",{class:"content"},i("slot",null)))}validateAlert(t){r(this,"_alert",t)}validateHasCloser(t){l(this,t)}validateLabel(t){n(this,t)}validateLevel(t){p(this,t)}validateOn(t){this.validateOnValue(t)&&d(this,"_on",{onClose:t.onClose})}validateType(t){c(this,"_type",(t=>"string"==typeof t&&("default"===t||"error"===t||"info"===t||"success"===t||"warning"===t)),new Set("String {success, info, warning, error}"),t)}validateVariant(t){c(this,"_variant",(t=>"card"===t||"msg"===t),new Set("AlertVariant {card, msg}"),t)}componentWillLoad(){this.validateAlert(this._alert),this.validateHasCloser(this._hasCloser),this.validateLabel(this._label),this.validateLevel(this._level),this.validateOn(this._on),this.validateType(this._type),this.validateVariant(this._variant)}static get watchers(){return{_alert:["validateAlert"],_hasCloser:["validateHasCloser"],_label:["validateLabel"],_level:["validateLevel"],_on:["validateOn"],_type:["validateType"],_variant:["validateVariant"]}}},D=(t,a)=>{r(t,"_ariaExpanded",a)},W=(t,a)=>{c(t,"_on",(t=>"object"==typeof t&&null!==t),new Set(["ButtonCallbacksPropType {Events.onClick, Events.onMouseDown}"]),a)},R=(t,a)=>{c(t,"_type",(t=>"button"===t||"reset"===t||"submit"===t),new Set(["KoliBriButtonType {button, reset, submit}"]),a)},M=(t,a)=>{r(t,"_disabled",a)},P=class{render(){const t=T(this.state._label);return i(s,null,i("button",Object.assign({ref:this.catchRef,accessKey:this.state._accessKey,"aria-controls":this.state._ariaControls,"aria-current":u(this.state._ariaCurrent),"aria-expanded":v(this.state._ariaExpanded),"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,"aria-selected":u(this.state._ariaSelected),class:{[this.state._variant]:"custom"!==this.state._variant,[this.state._customClass]:"custom"===this.state._variant&&"string"==typeof this.state._customClass&&this.state._customClass.length>0,"icon-only":!0===this.state._hideLabel,"hide-label":!0===this.state._hideLabel},disabled:this.state._disabled,id:this.state._id,name:this.state._name},this.state._on,{onClick:this.onClick,role:this.state._role,tabIndex:this.state._tabIndex,type:this.state._type}),i("kol-span-wc",{_icons:this.state._icons,_hideLabel:this.state._hideLabel,_label:t?"":this.state._label},i("slot",{name:"expert",slot:"expert"}))),i("kol-tooltip-wc",{"aria-hidden":"true",hidden:t||!this.state._hideLabel,_align:this.state._tooltipAlign,_label:"string"==typeof this.state._label?this.state._label:""}))}constructor(a){t(this,a),this.catchRef=t=>{this.ref=t,I(this.host,this.ref)},this.onClick=t=>{var a,e;"submit"===this.state._type?H({form:this.host,ref:this.ref}):"reset"===this.state._type?O({form:this.host,ref:this.ref}):(x(t),S("click",this.host,this.state._value),this.controller.setFormAssociatedValue(this.state._value),"function"==typeof(null===(a=this.state._on)||void 0===a?void 0:a.onClick)&&(f(t,this.ref),null===(e=this.state._on)||void 0===e||e.onClick(t,this.state._value)))},this._accessKey=void 0,this._ariaControls=void 0,this._ariaCurrent=void 0,this._ariaExpanded=void 0,this._ariaLabel=void 0,this._ariaSelected=void 0,this._customClass=void 0,this._disabled=!1,this._hideLabel=!1,this._icon=void 0,this._icons=void 0,this._iconAlign=void 0,this._iconOnly=void 0,this._id=void 0,this._label=void 0,this._name=void 0,this._on=void 0,this._role=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._type="button",this._value=void 0,this._variant="normal",this.state={_icons:{},_label:"",_on:{},_type:"button",_variant:"normal"},this.controller=new E(this,"button",this.host)}validateAccessKey(t){b(this,"_accessKey",t)}validateAriaControls(t){_(this,t)}validateAriaCurrent(t){m(this,t)}validateAriaExpanded(t){D(this,t)}validateAriaLabel(t){this.validateLabel(t)}validateAriaSelected(t){r(this,"_ariaSelected",t)}validateCustomClass(t){g(this,t)}validateDisabled(t){M(this,t),!0===t&&k()}validateHideLabel(t){L(this,t)}validateIcon(t){j(this,t)}validateIcons(t){j(this,t)}validateIconAlign(t){A(this,t)}validateIconOnly(t){this.validateHideLabel(t)}validateId(t){b(this,"_id",t)}validateLabel(t){o(this,t)}validateName(t){this.controller.validateName(t)}validateOn(t){W(this,t)}validateRole(t){y(this,t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTabIndex(t){V(this,t)}validateTooltipAlign(t){C(this,t)}validateType(t){R(this,t)}validateValue(t){d(this,"_value",t),this.controller.setFormAssociatedValue(this.state._value)}validateVariant(t){w(this,t)}componentWillLoad(){var t;this.validateAccessKey(this._accessKey),this.validateAriaControls(this._ariaControls),this.validateAriaCurrent(this._ariaCurrent),this.validateAriaExpanded(this._ariaExpanded),this.validateAriaSelected(this._ariaSelected),this.validateCustomClass(this._customClass),this.validateDisabled(this._disabled),this.validateHideLabel(this._hideLabel||this._iconOnly),this.validateIcons(this._icons||this._icon),this.validateIconAlign(this._iconAlign),this.validateId(this._id),this.validateLabel(null!==(t=this._label)&&void 0!==t?t:this._ariaLabel),this.validateName(this._name),this.validateOn(this._on),this.validateRole(this._role),this.validateSyncValueBySelector(this._syncValueBySelector),this.validateTabIndex(this._tabIndex),this.validateTooltipAlign(this._tooltipAlign),this.validateType(this._type),this.validateValue(this._value),this.validateVariant(this._variant)}get host(){return e(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_ariaControls:["validateAriaControls"],_ariaCurrent:["validateAriaCurrent"],_ariaExpanded:["validateAriaExpanded"],_ariaLabel:["validateAriaLabel"],_ariaSelected:["validateAriaSelected"],_customClass:["validateCustomClass"],_disabled:["validateDisabled"],_hideLabel:["validateHideLabel"],_icon:["validateIcon"],_icons:["validateIcons"],_iconAlign:["validateIconAlign"],_iconOnly:["validateIconOnly"],_id:["validateId"],_label:["validateLabel"],_name:["validateName"],_on:["validateOn"],_role:["validateRole"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_tooltipAlign:["validateTooltipAlign"],_type:["validateType"],_value:["validateValue"],_variant:["validateVariant"]}}},q=class{constructor(a){t(this,a),this.renderHeadline=(t,a)=>{switch(a){case 1:return i("h1",{class:"headline"},t,i("slot",null));case 2:return i("h2",{class:"headline"},t,i("slot",null));case 3:return i("h3",{class:"headline"},t,i("slot",null));case 4:return i("h4",{class:"headline"},t,i("slot",null));case 5:return i("h5",{class:"headline"},t,i("slot",null));case 6:return i("h6",{class:"headline"},t,i("slot",null));default:return i("strong",{class:"headline"},t,i("slot",null))}},this.renderSecondaryHeadline=(t,a)=>{switch(a){case 1:return i("span",{class:"secondary-headline"},t);case 2:return i("h2",{class:"secondary-headline"},t);case 3:return i("h3",{class:"secondary-headline"},t);case 4:return i("h4",{class:"secondary-headline"},t);case 5:return i("h5",{class:"secondary-headline"},t);case 6:return i("h6",{class:"secondary-headline"},t);default:return i("strong",{class:"secondary-headline"},t)}},this._label=void 0,this._level=1,this._secondaryHeadline=void 0,this.state={_label:"",_level:1}}validateLabel(t){o(this,t)}validateLevel(t){p(this,t)}validateSecondaryHeadline(t){b(this,"_secondaryHeadline",t)}componentWillLoad(){this.validateLabel(this._label),this.validateLevel(this._level),this.validateSecondaryHeadline(this._secondaryHeadline)}render(){return i(s,null,"string"==typeof this.state._secondaryHeadline&&this.state._secondaryHeadline.length>0?i("hgroup",null,this.renderHeadline(this.state._label,this.state._level),this.state._secondaryHeadline&&this.renderSecondaryHeadline(this.state._secondaryHeadline,this.state._level+1)):this.renderHeadline(this.state._label,this.state._level))}static get watchers(){return{_label:["validateLabel"],_level:["validateLevel"],_secondaryHeadline:["validateSecondaryHeadline"]}}};export{N as kol_alert_wc,P as kol_button_wc,q as kol_heading_wc};
4
+ import{r as t,h as i,H as s,g as e}from"./index-536799d5.js";import{a}from"./i18n-ad401ed8.js";import{v as l}from"./has-closer-3f2a115a.js";import{v as n,a as o}from"./label-57859a5a.js";import{L as h}from"./dev.utils-ad367f40.js";import{a as r,s as d,w as c,l as u,i as v,f,d as b}from"./prop.validators-251589c8.js";import{w as p}from"./validation-3e123430.js";import{v as _,a as m,c as y}from"./aria-current-87734eb8.js";import{v as g,a as w}from"./custom-class-833c9c0b.js";import{v as L}from"./hide-label-310fe1b8.js";import{v as j,w as A}from"./icons-c28cff87.js";import{v as C}from"./tooltip-align-d0d73d60.js";import{g as k}from"./a11y.tipps-54065212.js";import{s as x,t as S}from"./events-2bb1065b.js";import{a as I,s as T}from"./reuse-b3566e4c.js";import{v as V}from"./tab-index-39708fff.js";import{p as H,a as O}from"./controller-23b9e0a2.js";import{A as E}from"./associated.controller-a1ec4433.js";import"./index-23225963.js";import"./index-3822b0c5.js";import"./alignment-2171a053.js";const B=t=>i("kol-icon",{class:"heading-icon",_ariaLabel:"string"==typeof t.label&&t.label.length>0?"":t.ariaLabel,_icons:t.icon}),K=t=>{switch(t.type){case"error":return i(B,{ariaLabel:a("kol-error"),icon:"codicon codicon-error",label:t.label});case"info":return i(B,{ariaLabel:a("kol-info"),icon:"codicon codicon-info",label:t.label});case"warning":return i(B,{ariaLabel:a("kol-warning"),icon:"codicon codicon-warning",label:t.label});case"success":return i(B,{ariaLabel:a("kol-success"),icon:"codicon codicon-pass",label:t.label});default:return i(B,{ariaLabel:a("kol-message"),icon:"codicon codicon-comment",label:t.label})}},N=class{constructor(a){t(this,a),this.close=()=>{var t;void 0!==(null===(t=this._on)||void 0===t?void 0:t.onClose)&&this._on.onClose(new Event("Close"))},this.on={onClick:this.close},this.validateOnValue=t=>"object"==typeof t&&null!==t&&"function"==typeof t.onClose,this._alert=!1,this._hasCloser=!1,this._label=void 0,this._level=1,this._on=void 0,this._type="default",this._variant="msg",this.state={_level:1}}render(){var t;if(this.state._alert){try{h.debug(["Navigator should vibrate ...",navigator.vibrate([100,75,100,75,100])])}catch(t){h.debug("Navigator does not support vibration.")}setTimeout((()=>{this.validateAlert(!1)}),1e4)}return i(s,{class:{[this.state._type]:!0,[this.state._variant]:!0,hasCloser:!!this.state._hasCloser},role:this.state._alert?"alert":void 0},i("div",{class:"heading"},i(K,{label:this.state._label,type:this.state._type}),i("div",null,"string"==typeof this.state._label&&(null===(t=this.state._label)||void 0===t?void 0:t.length)>0&&i("kol-heading-wc",{_label:this.state._label,_level:this.state._level}),"msg"===this._variant&&i("div",{class:"content"},i("slot",null))),this.state._hasCloser&&i("kol-button-wc",{class:"close",_hideLabel:!0,_icons:{left:{icon:"codicon codicon-close"}},_label:a("kol-close"),_on:this.on,_tooltipAlign:"left"})),"card"===this._variant&&i("div",{class:"content"},i("slot",null)))}validateAlert(t){r(this,"_alert",t)}validateHasCloser(t){l(this,t)}validateLabel(t){n(this,t)}validateLevel(t){p(this,t)}validateOn(t){this.validateOnValue(t)&&d(this,"_on",{onClose:t.onClose})}validateType(t){c(this,"_type",(t=>"string"==typeof t&&("default"===t||"error"===t||"info"===t||"success"===t||"warning"===t)),new Set("String {success, info, warning, error}"),t)}validateVariant(t){c(this,"_variant",(t=>"card"===t||"msg"===t),new Set("AlertVariant {card, msg}"),t)}componentWillLoad(){this.validateAlert(this._alert),this.validateHasCloser(this._hasCloser),this.validateLabel(this._label),this.validateLevel(this._level),this.validateOn(this._on),this.validateType(this._type),this.validateVariant(this._variant)}static get watchers(){return{_alert:["validateAlert"],_hasCloser:["validateHasCloser"],_label:["validateLabel"],_level:["validateLevel"],_on:["validateOn"],_type:["validateType"],_variant:["validateVariant"]}}},D=(t,a)=>{r(t,"_ariaExpanded",a)},W=(t,a)=>{c(t,"_on",(t=>"object"==typeof t&&null!==t),new Set(["ButtonCallbacksPropType {Events.onClick, Events.onMouseDown}"]),a)},R=(t,a)=>{c(t,"_type",(t=>"button"===t||"reset"===t||"submit"===t),new Set(["KoliBriButtonType {button, reset, submit}"]),a)},M=(t,a)=>{r(t,"_disabled",a)},P=class{render(){const t=T(this.state._label);return i(s,null,i("button",Object.assign({ref:this.catchRef,accessKey:this.state._accessKey,"aria-controls":this.state._ariaControls,"aria-current":u(this.state._ariaCurrent),"aria-expanded":v(this.state._ariaExpanded),"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,"aria-selected":u(this.state._ariaSelected),class:{[this.state._variant]:"custom"!==this.state._variant,[this.state._customClass]:"custom"===this.state._variant&&"string"==typeof this.state._customClass&&this.state._customClass.length>0,"icon-only":!0===this.state._hideLabel,"hide-label":!0===this.state._hideLabel},disabled:this.state._disabled,id:this.state._id,name:this.state._name},this.state._on,{onClick:this.onClick,role:this.state._role,tabIndex:this.state._tabIndex,type:this.state._type}),i("kol-span-wc",{_icons:this.state._icons,_hideLabel:this.state._hideLabel,_label:t?"":this.state._label},i("slot",{name:"expert",slot:"expert"}))),i("kol-tooltip-wc",{"aria-hidden":"true",hidden:t||!this.state._hideLabel,_align:this.state._tooltipAlign,_label:"string"==typeof this.state._label?this.state._label:""}))}constructor(a){t(this,a),this.catchRef=t=>{this.ref=t,I(this.host,this.ref)},this.onClick=t=>{var a,e;"submit"===this.state._type?H({form:this.host,ref:this.ref}):"reset"===this.state._type?O({form:this.host,ref:this.ref}):(x(t),S("click",this.host,this.state._value),this.controller.setFormAssociatedValue(this.state._value),"function"==typeof(null===(a=this.state._on)||void 0===a?void 0:a.onClick)&&(f(t,this.ref),null===(e=this.state._on)||void 0===e||e.onClick(t,this.state._value)))},this._accessKey=void 0,this._ariaControls=void 0,this._ariaCurrent=void 0,this._ariaExpanded=void 0,this._ariaLabel=void 0,this._ariaSelected=void 0,this._customClass=void 0,this._disabled=!1,this._hideLabel=!1,this._icon=void 0,this._icons=void 0,this._iconAlign=void 0,this._iconOnly=void 0,this._id=void 0,this._label=void 0,this._name=void 0,this._on=void 0,this._role=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._type="button",this._value=void 0,this._variant="normal",this.state={_icons:{},_label:"",_on:{},_type:"button",_variant:"normal"},this.controller=new E(this,"button",this.host)}validateAccessKey(t){b(this,"_accessKey",t)}validateAriaControls(t){_(this,t)}validateAriaCurrent(t){m(this,t)}validateAriaExpanded(t){D(this,t)}validateAriaLabel(t){this.validateLabel(t)}validateAriaSelected(t){r(this,"_ariaSelected",t)}validateCustomClass(t){g(this,t)}validateDisabled(t){M(this,t),!0===t&&k()}validateHideLabel(t){L(this,t)}validateIcon(t){j(this,t)}validateIcons(t){j(this,t)}validateIconAlign(t){A(this,t)}validateIconOnly(t){this.validateHideLabel(t)}validateId(t){b(this,"_id",t)}validateLabel(t){o(this,t)}validateName(t){this.controller.validateName(t)}validateOn(t){W(this,t)}validateRole(t){y(this,t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTabIndex(t){V(this,t)}validateTooltipAlign(t){C(this,t)}validateType(t){R(this,t)}validateValue(t){d(this,"_value",t),this.controller.setFormAssociatedValue(this.state._value)}validateVariant(t){w(this,t)}componentWillLoad(){var t;this.validateAccessKey(this._accessKey),this.validateAriaControls(this._ariaControls),this.validateAriaCurrent(this._ariaCurrent),this.validateAriaExpanded(this._ariaExpanded),this.validateAriaSelected(this._ariaSelected),this.validateCustomClass(this._customClass),this.validateDisabled(this._disabled),this.validateHideLabel(this._hideLabel||this._iconOnly),this.validateIcons(this._icons||this._icon),this.validateIconAlign(this._iconAlign),this.validateId(this._id),this.validateLabel(null!==(t=this._label)&&void 0!==t?t:this._ariaLabel),this.validateName(this._name),this.validateOn(this._on),this.validateRole(this._role),this.validateSyncValueBySelector(this._syncValueBySelector),this.validateTabIndex(this._tabIndex),this.validateTooltipAlign(this._tooltipAlign),this.validateType(this._type),this.validateValue(this._value),this.validateVariant(this._variant)}get host(){return e(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_ariaControls:["validateAriaControls"],_ariaCurrent:["validateAriaCurrent"],_ariaExpanded:["validateAriaExpanded"],_ariaLabel:["validateAriaLabel"],_ariaSelected:["validateAriaSelected"],_customClass:["validateCustomClass"],_disabled:["validateDisabled"],_hideLabel:["validateHideLabel"],_icon:["validateIcon"],_icons:["validateIcons"],_iconAlign:["validateIconAlign"],_iconOnly:["validateIconOnly"],_id:["validateId"],_label:["validateLabel"],_name:["validateName"],_on:["validateOn"],_role:["validateRole"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_tooltipAlign:["validateTooltipAlign"],_type:["validateType"],_value:["validateValue"],_variant:["validateVariant"]}}},q=class{constructor(a){t(this,a),this.renderHeadline=(t,a)=>{switch(a){case 1:return i("h1",{class:"headline"},t,i("slot",null));case 2:return i("h2",{class:"headline"},t,i("slot",null));case 3:return i("h3",{class:"headline"},t,i("slot",null));case 4:return i("h4",{class:"headline"},t,i("slot",null));case 5:return i("h5",{class:"headline"},t,i("slot",null));case 6:return i("h6",{class:"headline"},t,i("slot",null));default:return i("strong",{class:"headline"},t,i("slot",null))}},this.renderSecondaryHeadline=(t,a)=>{switch(a){case 1:return i("span",{class:"secondary-headline"},t);case 2:return i("h2",{class:"secondary-headline"},t);case 3:return i("h3",{class:"secondary-headline"},t);case 4:return i("h4",{class:"secondary-headline"},t);case 5:return i("h5",{class:"secondary-headline"},t);case 6:return i("h6",{class:"secondary-headline"},t);default:return i("strong",{class:"secondary-headline"},t)}},this._label=void 0,this._level=1,this._secondaryHeadline=void 0,this.state={_label:"",_level:1}}validateLabel(t){o(this,t)}validateLevel(t){p(this,t)}validateSecondaryHeadline(t){b(this,"_secondaryHeadline",t)}componentWillLoad(){this.validateLabel(this._label),this.validateLevel(this._level),this.validateSecondaryHeadline(this._secondaryHeadline)}render(){return i(s,null,"string"==typeof this.state._secondaryHeadline&&this.state._secondaryHeadline.length>0?i("hgroup",null,this.renderHeadline(this.state._label,this.state._level),this.state._secondaryHeadline&&this.renderSecondaryHeadline(this.state._secondaryHeadline,this.state._level+1)):this.renderHeadline(this.state._label,this.state._level))}static get watchers(){return{_label:["validateLabel"],_level:["validateLevel"],_secondaryHeadline:["validateSecondaryHeadline"]}}};export{N as kol_alert_wc,P as kol_button_wc,q as kol_heading_wc};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as s,h as t,H as i}from"./index-536799d5.js";import{a}from"./i18n-604b0def.js";import{v as r}from"./image-source-c214bb84.js";import{v as e}from"./label-dd0fc95b.js";import"./index-23225963.js";import"./index-3822b0c5.js";import"./a11y.tipps-d4474fb4.js";import"./dev.utils-6644fc40.js";import"./reuse-b3566e4c.js";import"./prop.validators-a681ba79.js";const o=t=>0===t.length?"":t[0].toUpperCase(),l=t=>{const a=t.split(/\s+/),s=a.at(0),i=a.at(-1);return a.length>=2&&s&&i?`${o(s)}${o(i)}`:o(t)},n=class{constructor(t){s(this,t),this._src=void 0,this._label=void 0,this.state={_src:"",_label:""}}render(){return t(i,null,t("div",{"aria-label":a("kol-avatar-alt",{placeholders:{name:this.state._label}}),class:"container",role:"img"},this.state._src?t("img",{alt:"","aria-hidden":"true",class:"image",src:this.state._src}):t("span",{"aria-hidden":"true",class:"initials"},l(this.state._label))))}validateSrc(t){r(this,t)}validateLabel(t){e(this,t)}componentWillLoad(){this.validateSrc(this._src),this.validateLabel(this._label)}static get watchers(){return{_src:["validateSrc"],_label:["validateLabel"]}}};export{n as kol_avatar_wc};
4
+ import{r as s,h as t,H as a}from"./index-536799d5.js";import{a as i}from"./i18n-ad401ed8.js";import{v as r}from"./image-source-3f04add1.js";import{v as e}from"./label-57859a5a.js";import"./index-23225963.js";import"./index-3822b0c5.js";import"./a11y.tipps-54065212.js";import"./dev.utils-ad367f40.js";import"./reuse-b3566e4c.js";import"./prop.validators-251589c8.js";const o=a=>0===a.length?"":a[0].toUpperCase(),l=a=>{const t=a.split(/\s+/),s=t.at(0),i=t.at(-1);return t.length>=2&&s&&i?`${o(s)}${o(i)}`:o(a)},n=class{constructor(a){s(this,a),this._src=void 0,this._label=void 0,this.state={_src:"",_label:""}}render(){return t(a,null,t("div",{"aria-label":i("kol-avatar-alt",{placeholders:{name:this.state._label}}),class:"container",role:"img"},this.state._src?t("img",{alt:"","aria-hidden":"true",class:"image",src:this.state._src}):t("span",{"aria-hidden":"true",class:"initials"},l(this.state._label))))}validateSrc(a){r(this,a)}validateLabel(a){e(this,a)}componentWillLoad(){this.validateSrc(this._src),this.validateLabel(this._label)}static get watchers(){return{_src:["validateSrc"],_label:["validateLabel"]}}};export{n as kol_avatar_wc};
@@ -1 +1 @@
1
- {"version":3,"names":["formatNameAsInitial","name","length","toUpperCase","formatLabelAsInitials","label","names","split","first","at","last","KolAvatarWc","_src","_label","render","h","Host","translate","placeholders","this","state","class","role","alt","src","validateSrc","value","validateImageSource","validateLabel","componentWillLoad"],"sources":["src/components/avatar/controller.ts","src/components/avatar/component.tsx"],"sourcesContent":["const formatNameAsInitial = (name: string): string => {\n\tif (name.length === 0) {\n\t\treturn '';\n\t}\n\n\treturn name[0].toUpperCase();\n};\n\nexport const formatLabelAsInitials = (label: string): string => {\n\tconst names = label.split(/\\s+/); // split by any whitespace characters\n\tconst first = names.at(0);\n\tconst last = names.at(-1);\n\n\t// names might consist of only one word\n\tif (names.length >= 2 && first && last) {\n\t\treturn `${formatNameAsInitial(first)}${formatNameAsInitial(last)}`;\n\t}\n\n\treturn formatNameAsInitial(label);\n};\n","import { Component, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { translate } from '../../i18n';\nimport { ImageSourcePropType, validateImageSource } from '../../types/props/image-source';\nimport { LabelPropType, validateLabel } from '../../types/props/label';\nimport { formatLabelAsInitials } from './controller';\nimport { API, States } from './types';\n\n@Component({\n\ttag: 'kol-avatar-wc',\n\tshadow: false,\n})\nexport class KolAvatarWc implements API {\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<div aria-label={translate('kol-avatar-alt', { placeholders: { name: this.state._label } })} class=\"container\" role=\"img\">\n\t\t\t\t\t{this.state._src ? (\n\t\t\t\t\t\t<img alt=\"\" aria-hidden=\"true\" class=\"image\" src={this.state._src} />\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<span aria-hidden=\"true\" class=\"initials\">\n\t\t\t\t\t\t\t{formatLabelAsInitials(this.state._label)}\n\t\t\t\t\t\t</span>\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 * Sets the image `src` attribute to the given string.\n\t */\n\t@Prop() public _src?: ImageSourcePropType;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() public _label!: LabelPropType;\n\n\t@State() public state: States = {\n\t\t_src: ``,\n\t\t_label: ``, // ⚠ required\n\t};\n\n\t@Watch('_src')\n\tpublic validateSrc(value?: ImageSourcePropType): void {\n\t\tvalidateImageSource(this, value);\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelPropType): void {\n\t\tvalidateLabel(this, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateSrc(this._src);\n\t\tthis.validateLabel(this._label);\n\t}\n}\n"],"mappings":";;;0WAAA,MAAMA,EAAuBC,IAC5B,GAAIA,EAAKC,SAAW,EAAG,CACtB,MAAO,E,CAGR,OAAOD,EAAK,GAAGE,aAAa,EAGtB,MAAMC,EAAyBC,IACrC,MAAMC,EAAQD,EAAME,MAAM,OAC1B,MAAMC,EAAQF,EAAMG,GAAG,GACvB,MAAMC,EAAOJ,EAAMG,IAAI,GAGvB,GAAIH,EAAMJ,QAAU,GAAKM,GAASE,EAAM,CACvC,MAAO,GAAGV,EAAoBQ,KAASR,EAAoBU,I,CAG5D,OAAOV,EAAoBK,EAAM,E,MCNrBM,EAAW,M,8EA2BS,CAC/BC,KAAM,GACNC,OAAQ,G,CA5BF,MAAAC,GACN,OACCC,EAACC,EAAI,KACJD,EAAA,oBAAiBE,EAAU,iBAAkB,CAAEC,aAAc,CAAEjB,KAAMkB,KAAKC,MAAMP,UAAaQ,MAAM,YAAYC,KAAK,OAClHH,KAAKC,MAAMR,KACXG,EAAA,OAAKQ,IAAI,GAAE,cAAa,OAAOF,MAAM,QAAQG,IAAKL,KAAKC,MAAMR,OAE7DG,EAAA,sBAAkB,OAAOM,MAAM,YAC7BjB,EAAsBe,KAAKC,MAAMP,U,CAwBjC,WAAAY,CAAYC,GAClBC,EAAoBR,KAAMO,E,CAIpB,aAAAE,CAAcF,GACpBE,EAAcT,KAAMO,E,CAGd,iBAAAG,GACNV,KAAKM,YAAYN,KAAKP,MACtBO,KAAKS,cAAcT,KAAKN,O"}
1
+ {"version":3,"names":["formatNameAsInitial","name","length","toUpperCase","formatLabelAsInitials","label","names","split","first","at","last","KolAvatarWc","_src","_label","render","h","Host","translate","placeholders","this","state","class","role","alt","src","validateSrc","value","validateImageSource","validateLabel","componentWillLoad"],"sources":["src/components/avatar/controller.ts","src/components/avatar/component.tsx"],"sourcesContent":["const formatNameAsInitial = (name: string): string => {\n\tif (name.length === 0) {\n\t\treturn '';\n\t}\n\n\treturn name[0].toUpperCase();\n};\n\nexport const formatLabelAsInitials = (label: string): string => {\n\tconst names = label.split(/\\s+/); // split by any whitespace characters\n\tconst first = names.at(0);\n\tconst last = names.at(-1);\n\n\t// names might consist of only one word\n\tif (names.length >= 2 && first && last) {\n\t\treturn `${formatNameAsInitial(first)}${formatNameAsInitial(last)}`;\n\t}\n\n\treturn formatNameAsInitial(label);\n};\n","import { Component, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { translate } from '../../i18n';\nimport { ImageSourcePropType, validateImageSource } from '../../types/props/image-source';\nimport { LabelPropType, validateLabel } from '../../types/props/label';\nimport { formatLabelAsInitials } from './controller';\nimport { API, States } from './types';\n\n@Component({\n\ttag: 'kol-avatar-wc',\n\tshadow: false,\n})\nexport class KolAvatarWc implements API {\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<div aria-label={translate('kol-avatar-alt', { placeholders: { name: this.state._label } })} class=\"container\" role=\"img\">\n\t\t\t\t\t{this.state._src ? (\n\t\t\t\t\t\t<img alt=\"\" aria-hidden=\"true\" class=\"image\" src={this.state._src} />\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<span aria-hidden=\"true\" class=\"initials\">\n\t\t\t\t\t\t\t{formatLabelAsInitials(this.state._label)}\n\t\t\t\t\t\t</span>\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 * Sets the image `src` attribute to the given string.\n\t */\n\t@Prop() public _src?: ImageSourcePropType;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() public _label!: LabelPropType;\n\n\t@State() public state: States = {\n\t\t_src: ``,\n\t\t_label: ``, // ⚠ required\n\t};\n\n\t@Watch('_src')\n\tpublic validateSrc(value?: ImageSourcePropType): void {\n\t\tvalidateImageSource(this, value);\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelPropType): void {\n\t\tvalidateLabel(this, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateSrc(this._src);\n\t\tthis.validateLabel(this._label);\n\t}\n}\n"],"mappings":";;;+WAAA,MAAMA,EAAuBC,IAC5B,GAAIA,EAAKC,SAAW,EAAG,CACtB,MAAO,E,CAGR,OAAOD,EAAK,GAAGE,aAAa,EAGtB,MAAMC,EAAyBC,IACrC,MAAMC,EAAQD,EAAME,MAAM,OAC1B,MAAMC,EAAQF,EAAMG,GAAG,GACvB,MAAMC,EAAOJ,EAAMG,IAAI,GAGvB,GAAIH,EAAMJ,QAAU,GAAKM,GAASE,EAAM,CACvC,MAAO,GAAGV,EAAoBQ,KAASR,EAAoBU,I,CAG5D,OAAOV,EAAoBK,EAAM,E,MCNrBM,EAAW,M,8EA2BS,CAC/BC,KAAM,GACNC,OAAQ,G,CA5BF,MAAAC,GACN,OACCC,EAACC,EAAI,KACJD,EAAA,oBAAiBE,EAAU,iBAAkB,CAAEC,aAAc,CAAEjB,KAAMkB,KAAKC,MAAMP,UAAaQ,MAAM,YAAYC,KAAK,OAClHH,KAAKC,MAAMR,KACXG,EAAA,OAAKQ,IAAI,GAAE,cAAa,OAAOF,MAAM,QAAQG,IAAKL,KAAKC,MAAMR,OAE7DG,EAAA,sBAAkB,OAAOM,MAAM,YAC7BjB,EAAsBe,KAAKC,MAAMP,U,CAwBjC,WAAAY,CAAYC,GAClBC,EAAoBR,KAAMO,E,CAIpB,aAAAE,CAAcF,GACpBE,EAAcT,KAAMO,E,CAGd,iBAAAG,GACNV,KAAKM,YAAYN,KAAKP,MACtBO,KAAKS,cAAcT,KAAKN,O"}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as t,h as i,H as o}from"./index-536799d5.js";import{h as s,v as n}from"./color-85b10e1d.js";import{f as e}from"./a11y.tipps-d4474fb4.js";import{n as a}from"./dev.utils-6644fc40.js";import{o as r,p as l,s as h}from"./prop.validators-a681ba79.js";import"./reuse-b3566e4c.js";import"./index-3822b0c5.js";const d=":host{--a11y-min-size:44px;font-size:inherit}*{font-family:Verdana;hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}[role='button'],button:not([role='link']),kol-input .input{min-height:var(--a11y-min-size);min-width:var(--a11y-min-size)}a,button,h1,h2,h3,h4,h5,h6,input,option,select,textarea{font-family:inherit;font-size:inherit}:is(a,button){background-color:transparent;border:none;margin:0;padding:0;width:100%;}:host{max-width:100%}*{box-sizing:border-box}kol-span-wc{display:grid;place-items:center}kol-span-wc>span{display:flex;place-items:center}a,button{cursor:pointer}button,input,option,select,textarea{font-family:inherit}.icon-only>kol-span-wc>span>span{display:none}:host>span{display:inline-flex;place-items:center}:host>span>kol-button-wc button{color:inherit}";e("[KolBadge] Optimierung des _color-Properties (rgba, rgb, hex usw.).");const c=class{constructor(o){t(this,o),this.bgColorStr="#000",this.colorStr="#fff",this.id=a(),this.handleColorChange=t=>{const o=s(t);this.bgColorStr=o.backgroundColor,this.colorStr=o.foregroundColor},this._color="#000",this._hideLabel=!1,this._icon=void 0,this._icons=void 0,this._iconOnly=void 0,this._label=void 0,this._smartButton=void 0,this.state={_color:{backgroundColor:"#000",foregroundColor:"#fff"}}}renderSmartButton(t){return i("kol-button-wc",{_ariaControls:this.id,_customClass:t._customClass,_disabled:t._disabled,_hideLabel:!0,_icons:t._icons||t._icon,_id:t._id,_label:t._label,_on:t._on,_tooltipAlign:t._tooltipAlign,_variant:t._variant})}render(){const t="object"==typeof this.state._smartButton&&null!==this.state._smartButton;return i(o,null,i("span",{class:{"smart-button":"object"==typeof this.state._smartButton&&null!==this.state._smartButton},style:{backgroundColor:this.bgColorStr,color:this.colorStr}},i("kol-span-wc",{id:t?this.id:void 0,_allowMarkdown:!0,_hideLabel:this._hideLabel||this._iconOnly,_icons:this._icons||this._icon,_label:this._label}),t&&this.renderSmartButton(this.state._smartButton)))}validateColor(t){n(this,t,{defaultValue:"#000",hooks:{beforePatch:this.handleColorChange}})}validateSmartButton(t){r(t,(()=>{try{t=l(t)}catch(t){}h(this,"_smartButton",t)}))}componentWillLoad(){this.validateColor(this._color),this.validateSmartButton(this._smartButton)}static get watchers(){return{_color:["validateColor"],_smartButton:["validateSmartButton"]}}};c.style={default:d};export{c as kol_badge};
4
+ import{r as t,h as i,H as o}from"./index-536799d5.js";import{h as s,v as n}from"./color-9cbf6d52.js";import{f as e}from"./a11y.tipps-54065212.js";import{n as a}from"./dev.utils-ad367f40.js";import{o as r,p as l,s as h}from"./prop.validators-251589c8.js";import"./reuse-b3566e4c.js";import"./index-3822b0c5.js";const d=":host{--a11y-min-size:44px;font-size:inherit}*{font-family:Verdana;hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}[role='button'],button:not([role='link']),kol-input .input{min-height:var(--a11y-min-size);min-width:var(--a11y-min-size)}a,button,h1,h2,h3,h4,h5,h6,input,option,select,textarea{font-family:inherit;font-size:inherit}:is(a,button){background-color:transparent;border:none;margin:0;padding:0;width:100%;}:host{max-width:100%}*{box-sizing:border-box}kol-span-wc{display:grid;place-items:center}kol-span-wc>span{display:flex;place-items:center}a,button{cursor:pointer}button,input,option,select,textarea{font-family:inherit}.icon-only>kol-span-wc>span>span{display:none}:host>span{display:inline-flex;place-items:center}:host>span>kol-button-wc button{color:inherit}";e("[KolBadge] Optimierung des _color-Properties (rgba, rgb, hex usw.).");const c=class{constructor(o){t(this,o),this.bgColorStr="#000",this.colorStr="#fff",this.id=a(),this.handleColorChange=t=>{const o=s(t);this.bgColorStr=o.backgroundColor,this.colorStr=o.foregroundColor},this._color="#000",this._hideLabel=!1,this._icon=void 0,this._icons=void 0,this._iconOnly=void 0,this._label=void 0,this._smartButton=void 0,this.state={_color:{backgroundColor:"#000",foregroundColor:"#fff"}}}renderSmartButton(t){return i("kol-button-wc",{_ariaControls:this.id,_customClass:t._customClass,_disabled:t._disabled,_hideLabel:!0,_icons:t._icons||t._icon,_id:t._id,_label:t._label,_on:t._on,_tooltipAlign:t._tooltipAlign,_variant:t._variant})}render(){const t="object"==typeof this.state._smartButton&&null!==this.state._smartButton;return i(o,null,i("span",{class:{"smart-button":"object"==typeof this.state._smartButton&&null!==this.state._smartButton},style:{backgroundColor:this.bgColorStr,color:this.colorStr}},i("kol-span-wc",{id:t?this.id:void 0,_allowMarkdown:!0,_hideLabel:this._hideLabel||this._iconOnly,_icons:this._icons||this._icon,_label:this._label}),t&&this.renderSmartButton(this.state._smartButton)))}validateColor(t){n(this,t,{defaultValue:"#000",hooks:{beforePatch:this.handleColorChange}})}validateSmartButton(t){r(t,(()=>{try{t=l(t)}catch(t){}h(this,"_smartButton",t)}))}componentWillLoad(){this.validateColor(this._color),this.validateSmartButton(this._smartButton)}static get watchers(){return{_color:["validateColor"],_smartButton:["validateSmartButton"]}}};c.style={default:d};export{c as kol_badge};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as i,h as t,F as e,H as n}from"./index-536799d5.js";import{v as a}from"./label-dd0fc95b.js";import{b as o}from"./a11y.tipps-d4474fb4.js";import{r as s,a as l}from"./unique-nav-labels-c6750f60.js";import{w as r}from"./validation-e4e29b6a.js";import"./prop.validators-a681ba79.js";import"./dev.utils-6644fc40.js";import"./reuse-b3566e4c.js";import"./index-3822b0c5.js";const c=":host{--a11y-min-size:44px;font-size:inherit}*{font-family:Verdana;hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}[role='button'],button:not([role='link']),kol-input .input{min-height:var(--a11y-min-size);min-width:var(--a11y-min-size)}a,button,h1,h2,h3,h4,h5,h6,input,option,select,textarea{font-family:inherit;font-size:inherit}:is(a,button){background-color:transparent;border:none;margin:0;padding:0;width:100%;}:host{max-width:100%}*{box-sizing:border-box}kol-span-wc{display:grid;place-items:center}kol-span-wc>span{display:flex;place-items:center}a,button{cursor:pointer}button,input,option,select,textarea{font-family:inherit}.icon-only>kol-span-wc>span>span{display:none}li,ul{margin:0;padding:0;list-style:none;display:flex;gap:0.5em;flex-wrap:wrap;place-items:center}kol-icon::part(separator){font-weight:900;font-size:0.7em}kol-icon::part(separator):before{content:'\\f054';font-family:'Font Awesome 6 Free'}",d=class{constructor(a){i(this,a),this.renderLink=(i,a)=>{const n=this.state._links.length-1,l=i._iconOnly||i._hideLabel;return t("li",{key:a},0!==a&&t("kol-icon",{_label:"",_icons:"codicon codicon-chevron-right"}),a===n?t("span",null,l?t("kol-icon",{_label:i._label,_icons:"string"==typeof i._icon?i._icon:"codicon codicon-symbol-event"}):t(e,null,i._label)):t("kol-link",Object.assign({},i)))},this._ariaLabel=void 0,this._label=void 0,this._links=void 0,this.state={_label:"…",_links:[]}}render(){return t(n,null,t("nav",{"aria-label":this.state._label},t("ul",null,0===this.state._links.length&&t("li",null,t("kol-icon",{_label:"",_icons:"codicon codicon-home"}),"…"),this.state._links.map(this.renderLink))))}validateAriaLabel(t){this.validateLabel(t)}validateLabel(t,i,e=!1){e||s(this.state._label),a(this,t),o(t),l(this.state._label)}validateLinks(t){r("KolBreadcrumb",this,t)}componentWillLoad(){this.validateLabel(this._label||this._ariaLabel,void 0,!0),this.validateLinks(this._links)}disconnectedCallback(){s(this.state._label)}static get watchers(){return{_ariaLabel:["validateAriaLabel"],_label:["validateLabel"],_links:["validateLinks"]}}};d.style={default:c};export{d as kol_breadcrumb};
4
+ import{r as i,h as t,F as e,H as n}from"./index-536799d5.js";import{v as a}from"./label-57859a5a.js";import{b as o}from"./a11y.tipps-54065212.js";import{r as s,a as l}from"./unique-nav-labels-c6750f60.js";import{w as r}from"./validation-74fe1552.js";import"./prop.validators-251589c8.js";import"./dev.utils-ad367f40.js";import"./reuse-b3566e4c.js";import"./index-3822b0c5.js";const c=":host{--a11y-min-size:44px;font-size:inherit}*{font-family:Verdana;hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}[role='button'],button:not([role='link']),kol-input .input{min-height:var(--a11y-min-size);min-width:var(--a11y-min-size)}a,button,h1,h2,h3,h4,h5,h6,input,option,select,textarea{font-family:inherit;font-size:inherit}:is(a,button){background-color:transparent;border:none;margin:0;padding:0;width:100%;}:host{max-width:100%}*{box-sizing:border-box}kol-span-wc{display:grid;place-items:center}kol-span-wc>span{display:flex;place-items:center}a,button{cursor:pointer}button,input,option,select,textarea{font-family:inherit}.icon-only>kol-span-wc>span>span{display:none}li,ul{margin:0;padding:0;list-style:none;display:flex;gap:0.5em;flex-wrap:wrap;place-items:center}kol-icon::part(separator){font-weight:900;font-size:0.7em}kol-icon::part(separator):before{content:'\\f054';font-family:'Font Awesome 6 Free'}",d=class{constructor(a){i(this,a),this.renderLink=(i,a)=>{const n=this.state._links.length-1,l=i._iconOnly||i._hideLabel;return t("li",{key:a},0!==a&&t("kol-icon",{_label:"",_icons:"codicon codicon-chevron-right"}),a===n?t("span",null,l?t("kol-icon",{_label:i._label,_icons:"string"==typeof i._icon?i._icon:"codicon codicon-symbol-event"}):t(e,null,i._label)):t("kol-link",Object.assign({},i)))},this._ariaLabel=void 0,this._label=void 0,this._links=void 0,this.state={_label:"…",_links:[]}}render(){return t(n,null,t("nav",{"aria-label":this.state._label},t("ul",null,0===this.state._links.length&&t("li",null,t("kol-icon",{_label:"",_icons:"codicon codicon-home"}),"…"),this.state._links.map(this.renderLink))))}validateAriaLabel(t){this.validateLabel(t)}validateLabel(t,i,e=!1){e||s(this.state._label),a(this,t),o(t),l(this.state._label)}validateLinks(t){r("KolBreadcrumb",this,t)}componentWillLoad(){this.validateLabel(this._label||this._ariaLabel,void 0,!0),this.validateLinks(this._links)}disconnectedCallback(){s(this.state._label)}static get watchers(){return{_ariaLabel:["validateAriaLabel"],_label:["validateLabel"],_links:["validateLinks"]}}};d.style={default:c};export{d as kol_breadcrumb};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as i,h as t,H as e,g as n}from"./index-536799d5.js";import{a as s}from"./reuse-b3566e4c.js";const o=":host{--a11y-min-size:44px;font-size:inherit}*{font-family:Verdana;hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}[role='button'],button:not([role='link']),kol-input .input{min-height:var(--a11y-min-size);min-width:var(--a11y-min-size)}a,button,h1,h2,h3,h4,h5,h6,input,option,select,textarea{font-family:inherit;font-size:inherit}:is(a,button){background-color:transparent;border:none;margin:0;padding:0;width:100%;}:host{max-width:100%}*{box-sizing:border-box}kol-span-wc{display:grid;place-items:center}kol-span-wc>span{display:flex;place-items:center}a,button{cursor:pointer}button,input,option,select,textarea{font-family:inherit}.icon-only>kol-span-wc>span>span{display:none}:host{display:inline-block}:is(a,button){align-items:baseline;display:inline-flex;place-items:center;text-align:left;text-decoration-line:underline}:is(a,button):is(:focus,:hover){text-decoration-thickness:0.2em}.hidden{display:none;visibility:hidden}.skip{left:-99999px;overflow:hidden;position:absolute;z-index:9999999;line-height:1em}.skip:focus{background-color:#fff;left:unset;padding:1em;position:unset}kol-icon.external-link-icon{display:inline-flex}",a=class{constructor(t){i(this,t),this.catchRef=i=>{this.ref=i,s(this.host,this.ref)},this._accessKey=void 0,this._ariaControls=void 0,this._ariaCurrent=void 0,this._ariaExpanded=void 0,this._ariaLabel=void 0,this._ariaSelected=void 0,this._disabled=!1,this._hideLabel=!1,this._icon=void 0,this._icons=void 0,this._iconOnly=void 0,this._id=void 0,this._label=void 0,this._name=void 0,this._on=void 0,this._role=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._type="button",this._value=void 0}render(){return t(e,null,t("kol-button-wc",{ref:this.catchRef,_accessKey:this._accessKey,_ariaControls:this._ariaControls,_ariaCurrent:this._ariaCurrent,_ariaExpanded:this._ariaExpanded,_ariaLabel:this._ariaLabel,_ariaSelected:this._ariaSelected,_disabled:this._disabled,_icons:this._icons||this._icon,_hideLabel:this._hideLabel||this._iconOnly,_id:this._id,_label:this._label,_name:this._name,_on:this._on,_role:"link",_syncValueBySelector:this._syncValueBySelector,_tabIndex:this._tabIndex,_tooltipAlign:this._tooltipAlign,_type:this._type,_value:this._value},t("slot",{name:"expert",slot:"expert"})))}get host(){return n(this)}};a.style={default:o};export{a as kol_button_link};
4
+ import{r as i,h as e,H as t,g as n}from"./index-536799d5.js";import{a as s}from"./reuse-b3566e4c.js";const o=":host{--a11y-min-size:44px;font-size:inherit}*{font-family:Verdana;hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}[role='button'],button:not([role='link']),kol-input .input{min-height:var(--a11y-min-size);min-width:var(--a11y-min-size)}a,button,h1,h2,h3,h4,h5,h6,input,option,select,textarea{font-family:inherit;font-size:inherit}:is(a,button){background-color:transparent;border:none;margin:0;padding:0;width:100%;}:host{max-width:100%}*{box-sizing:border-box}kol-span-wc{display:grid;place-items:center}kol-span-wc>span{display:flex;place-items:center}a,button{cursor:pointer}button,input,option,select,textarea{font-family:inherit}.icon-only>kol-span-wc>span>span{display:none}:host{display:inline-block}:is(a,button){align-items:baseline;display:inline-flex;place-items:center;text-align:left;text-decoration-line:underline}:is(a,button):is(:focus,:hover){text-decoration-thickness:0.2em}.hidden{display:none;visibility:hidden}.skip{left:-99999px;overflow:hidden;position:absolute;z-index:9999999;line-height:1em}.skip:focus{background-color:#fff;left:unset;padding:1em;position:unset}kol-icon.external-link-icon{display:inline-flex}",a=class{constructor(t){i(this,t),this.catchRef=i=>{s(this.host,i)},this._accessKey=void 0,this._ariaControls=void 0,this._ariaCurrent=void 0,this._ariaExpanded=void 0,this._ariaLabel=void 0,this._ariaSelected=void 0,this._disabled=!1,this._hideLabel=!1,this._icon=void 0,this._icons=void 0,this._iconOnly=void 0,this._id=void 0,this._label=void 0,this._name=void 0,this._on=void 0,this._role=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._type="button",this._value=void 0}render(){return e(t,null,e("kol-button-wc",{ref:this.catchRef,_accessKey:this._accessKey,_ariaControls:this._ariaControls,_ariaCurrent:this._ariaCurrent,_ariaExpanded:this._ariaExpanded,_ariaLabel:this._ariaLabel,_ariaSelected:this._ariaSelected,_disabled:this._disabled,_icons:this._icons||this._icon,_hideLabel:this._hideLabel||this._iconOnly,_id:this._id,_label:this._label,_name:this._name,_on:this._on,_role:"link",_syncValueBySelector:this._syncValueBySelector,_tabIndex:this._tabIndex,_tooltipAlign:this._tooltipAlign,_type:this._type,_value:this._value},e("slot",{name:"expert",slot:"expert"})))}get host(){return n(this)}};a.style={default:o};export{a as kol_button_link};
@@ -1 +1 @@
1
- {"version":3,"names":["defaultStyleCss","KolButtonLink","this","catchRef","ref","propagateFocus","host","render","h","Host","_accessKey","_ariaControls","_ariaCurrent","_ariaExpanded","_ariaLabel","_ariaSelected","_disabled","_icons","_icon","_hideLabel","_iconOnly","_id","_label","_name","_on","_role","_syncValueBySelector","_tabIndex","_tooltipAlign","_type","_value","name","slot"],"sources":["src/components/button-link/style.css?tag=kol-button-link&mode=default&encapsulation=shadow","src/components/button-link/component.tsx"],"sourcesContent":["@import url(../link.css);\n","import { Component, Element, h, Host, JSX, Prop } from '@stencil/core';\n\nimport { Stringified } from '../../types/common';\nimport { AlternativeButtonLinkRolePropType } from '../../types/props/alternative-button-link-role';\nimport { AriaCurrentPropType } from '../../types/props/aria-current';\nimport { ButtonCallbacksPropType } from '../../types/props/button-callbacks';\nimport { ButtonTypePropType } from '../../types/props/button-type';\nimport { IconsPropType } from '../../types/props/icons';\nimport { IdPropType } from '../../types/props/id';\nimport { LabelWithExpertSlotPropType } from '../../types/props/label';\nimport { NamePropType } from '../../types/props/name';\nimport { SyncValueBySelectorPropType } from '../../types/props/sync-value-by-selector';\nimport { TooltipAlignPropType } from '../../types/props/tooltip-align';\nimport { StencilUnknown } from '../../types/unknown';\nimport { propagateFocus } from '../../utils/reuse';\nimport { Props } from './types';\n\n@Component({\n\ttag: 'kol-button-link',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolButtonLink implements Props {\n\t@Element() private readonly host?: HTMLKolButtonLinkElement;\n\tprivate ref?: HTMLKolButtonWcElement;\n\n\tprivate readonly catchRef = (ref?: HTMLKolButtonWcElement) => {\n\t\tthis.ref = ref;\n\t\tpropagateFocus(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-button-wc\n\t\t\t\t\tref={this.catchRef}\n\t\t\t\t\t_accessKey={this._accessKey}\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_icons={this._icons || this._icon}\n\t\t\t\t\t_hideLabel={this._hideLabel || this._iconOnly}\n\t\t\t\t\t_id={this._id}\n\t\t\t\t\t_label={this._label}\n\t\t\t\t\t_name={this._name}\n\t\t\t\t\t_on={this._on}\n\t\t\t\t\t_role=\"link\"\n\t\t\t\t\t_syncValueBySelector={this._syncValueBySelector}\n\t\t\t\t\t_tabIndex={this._tabIndex}\n\t\t\t\t\t_tooltipAlign={this._tooltipAlign}\n\t\t\t\t\t_type={this._type}\n\t\t\t\t\t_value={this._value}\n\t\t\t\t>\n\t\t\t\t\t<slot name=\"expert\" slot=\"expert\"></slot>\n\t\t\t\t</kol-button-wc>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Defines which key combination can be used to trigger or focus the interactive element of the component.\n\t */\n\t@Prop() public _accessKey?: string;\n\n\t/**\n\t * Defines which elements are controlled by this component. (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 * Deprecated: Marks the element as the selected in a group of related elements. Can be one of the following: `date` | `location` | `page` | `step` | `time` | `true`. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current)\n\t *\n\t * @deprecated aria-current is not necessary for buttons. will be removed in version 2.\n\t */\n\t@Prop() public _ariaCurrent?: AriaCurrentPropType;\n\n\t/**\n\t * Defines whether the interactive element of the component expanded something. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded)\n\t * @TODO: Change type back to `AriaExpandedPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _ariaExpanded?: boolean;\n\n\t/**\n\t * Deprecated: Setzt die semantische Beschriftung der Komponente.\n\t *\n\t * @deprecated use _label instead\n\t */\n\t@Prop({ mutable: true, reflect: false }) public _ariaLabel?: string;\n\n\t/**\n\t * Defines whether the interactive element of the component is selected (e.g. role=tab). (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected)\n\t * @TODO: Change type back to `AriaSelectedPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _ariaSelected?: boolean;\n\n\t/**\n\t * Makes the element not focusable and ignore all events.\n\t * @TODO: Change type back to `DisabledPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _disabled?: boolean = false;\n\n\t/**\n\t * Hides the caption by default and displays the caption text with a tooltip when the\n\t * interactive element is focused or the mouse is over it.\n\t * @TODO: Change type back to `HideLabelPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hideLabel?: boolean = false;\n\n\t/**\n\t * @deprecated Use _icons.\n\t */\n\t@Prop() public _icon?: IconsPropType;\n\n\t/**\n\t * Defines the icon classnames (e.g. `_icons=\"fa-solid fa-user\"`).\n\t */\n\t@Prop() public _icons?: IconsPropType;\n\n\t/**\n\t * Deprecated: Hides the label and shows the description in a Tooltip instead.\n\t * @deprecated use _hide-label\n\t */\n\t@Prop() public _iconOnly?: boolean;\n\n\t/**\n\t * Defines the internal ID of the primary component element.\n\t */\n\t@Prop() public _id?: IdPropType;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.). Set to `false` to enable the expert slot.\n\t */\n\t@Prop() public _label!: LabelWithExpertSlotPropType;\n\n\t/**\n\t * Defines the technical name of an input field.\n\t */\n\t@Prop() public _name?: NamePropType;\n\n\t/**\n\t * Gibt die EventCallback-Funktionen für die Button-Events an.\n\t */\n\t@Prop() public _on?: ButtonCallbacksPropType<StencilUnknown>;\n\n\t/**\n\t * Defines the role of the components primary element.\n\t */\n\t@Prop() public _role?: AlternativeButtonLinkRolePropType;\n\n\t/**\n\t * Selector for synchronizing the value with another input element.\n\t * @internal\n\t */\n\t@Prop() public _syncValueBySelector?: SyncValueBySelectorPropType;\n\n\t/**\n\t * Defines which tab-index the primary element of the component has. (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex)\n\t */\n\t@Prop() public _tabIndex?: number;\n\n\t/**\n\t * Defines where to show the Tooltip preferably: top, right, bottom or left.\n\t */\n\t@Prop() public _tooltipAlign?: TooltipAlignPropType = 'top';\n\n\t/**\n\t * Defines either the type of the component or of the components interactive element.\n\t */\n\t@Prop() public _type?: ButtonTypePropType = 'button';\n\n\t/**\n\t * Defines the value that the button emits on click.\n\t */\n\t@Prop() public _value?: Stringified<StencilUnknown>;\n}\n"],"mappings":";;;qGAAA,MAAMA,EAAkB,opC,MCwBXC,EAAa,M,yBAIRC,KAAAC,SAAYC,IAC5BF,KAAKE,IAAMA,EACXC,EAAeH,KAAKI,KAAMJ,KAAKE,IAAI,E,sLA0EC,M,gBAOC,M,0PAyDgB,M,WAKV,S,sBA5IrC,MAAAG,GACN,OACCC,EAACC,EAAI,KACJD,EAAA,iBACCJ,IAAKF,KAAKC,SACVO,WAAYR,KAAKQ,WACjBC,cAAeT,KAAKS,cACpBC,aAAcV,KAAKU,aACnBC,cAAeX,KAAKW,cACpBC,WAAYZ,KAAKY,WACjBC,cAAeb,KAAKa,cACpBC,UAAWd,KAAKc,UAChBC,OAAQf,KAAKe,QAAUf,KAAKgB,MAC5BC,WAAYjB,KAAKiB,YAAcjB,KAAKkB,UACpCC,IAAKnB,KAAKmB,IACVC,OAAQpB,KAAKoB,OACbC,MAAOrB,KAAKqB,MACZC,IAAKtB,KAAKsB,IACVC,MAAM,OACNC,qBAAsBxB,KAAKwB,qBAC3BC,UAAWzB,KAAKyB,UAChBC,cAAe1B,KAAK0B,cACpBC,MAAO3B,KAAK2B,MACZC,OAAQ5B,KAAK4B,QAEbtB,EAAA,QAAMuB,KAAK,SAASC,KAAK,Y"}
1
+ {"version":3,"names":["defaultStyleCss","KolButtonLink","this","catchRef","ref","propagateFocus","host","render","h","Host","_accessKey","_ariaControls","_ariaCurrent","_ariaExpanded","_ariaLabel","_ariaSelected","_disabled","_icons","_icon","_hideLabel","_iconOnly","_id","_label","_name","_on","_role","_syncValueBySelector","_tabIndex","_tooltipAlign","_type","_value","name","slot"],"sources":["src/components/button-link/style.css?tag=kol-button-link&mode=default&encapsulation=shadow","src/components/button-link/component.tsx"],"sourcesContent":["@import url(../link.css);\n","import { Component, Element, h, Host, JSX, Prop } from '@stencil/core';\n\nimport { Stringified } from '../../types/common';\nimport { AlternativeButtonLinkRolePropType } from '../../types/props/alternative-button-link-role';\nimport { AriaCurrentPropType } from '../../types/props/aria-current';\nimport { ButtonCallbacksPropType } from '../../types/props/button-callbacks';\nimport { ButtonTypePropType } from '../../types/props/button-type';\nimport { IconsPropType } from '../../types/props/icons';\nimport { IdPropType } from '../../types/props/id';\nimport { LabelWithExpertSlotPropType } from '../../types/props/label';\nimport { NamePropType } from '../../types/props/name';\nimport { SyncValueBySelectorPropType } from '../../types/props/sync-value-by-selector';\nimport { TooltipAlignPropType } from '../../types/props/tooltip-align';\nimport { StencilUnknown } from '../../types/unknown';\nimport { propagateFocus } from '../../utils/reuse';\nimport { Props } from './types';\n\n@Component({\n\ttag: 'kol-button-link',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolButtonLink implements Props {\n\t@Element() private readonly host?: HTMLKolButtonLinkElement;\n\n\tprivate readonly catchRef = (ref?: HTMLKolButtonWcElement) => {\n\t\tpropagateFocus(this.host, ref);\n\t};\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<kol-button-wc\n\t\t\t\t\tref={this.catchRef}\n\t\t\t\t\t_accessKey={this._accessKey}\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_icons={this._icons || this._icon}\n\t\t\t\t\t_hideLabel={this._hideLabel || this._iconOnly}\n\t\t\t\t\t_id={this._id}\n\t\t\t\t\t_label={this._label}\n\t\t\t\t\t_name={this._name}\n\t\t\t\t\t_on={this._on}\n\t\t\t\t\t_role=\"link\"\n\t\t\t\t\t_syncValueBySelector={this._syncValueBySelector}\n\t\t\t\t\t_tabIndex={this._tabIndex}\n\t\t\t\t\t_tooltipAlign={this._tooltipAlign}\n\t\t\t\t\t_type={this._type}\n\t\t\t\t\t_value={this._value}\n\t\t\t\t>\n\t\t\t\t\t<slot name=\"expert\" slot=\"expert\"></slot>\n\t\t\t\t</kol-button-wc>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Defines which key combination can be used to trigger or focus the interactive element of the component.\n\t */\n\t@Prop() public _accessKey?: string;\n\n\t/**\n\t * Defines which elements are controlled by this component. (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 * Deprecated: Marks the element as the selected in a group of related elements. Can be one of the following: `date` | `location` | `page` | `step` | `time` | `true`. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current)\n\t *\n\t * @deprecated aria-current is not necessary for buttons. will be removed in version 2.\n\t */\n\t@Prop() public _ariaCurrent?: AriaCurrentPropType;\n\n\t/**\n\t * Defines whether the interactive element of the component expanded something. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded)\n\t * @TODO: Change type back to `AriaExpandedPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _ariaExpanded?: boolean;\n\n\t/**\n\t * Deprecated: Setzt die semantische Beschriftung der Komponente.\n\t *\n\t * @deprecated use _label instead\n\t */\n\t@Prop({ mutable: true, reflect: false }) public _ariaLabel?: string;\n\n\t/**\n\t * Defines whether the interactive element of the component is selected (e.g. role=tab). (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected)\n\t * @TODO: Change type back to `AriaSelectedPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _ariaSelected?: boolean;\n\n\t/**\n\t * Makes the element not focusable and ignore all events.\n\t * @TODO: Change type back to `DisabledPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _disabled?: boolean = false;\n\n\t/**\n\t * Hides the caption by default and displays the caption text with a tooltip when the\n\t * interactive element is focused or the mouse is over it.\n\t * @TODO: Change type back to `HideLabelPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hideLabel?: boolean = false;\n\n\t/**\n\t * @deprecated Use _icons.\n\t */\n\t@Prop() public _icon?: IconsPropType;\n\n\t/**\n\t * Defines the icon classnames (e.g. `_icons=\"fa-solid fa-user\"`).\n\t */\n\t@Prop() public _icons?: IconsPropType;\n\n\t/**\n\t * Deprecated: Hides the label and shows the description in a Tooltip instead.\n\t * @deprecated use _hide-label\n\t */\n\t@Prop() public _iconOnly?: boolean;\n\n\t/**\n\t * Defines the internal ID of the primary component element.\n\t */\n\t@Prop() public _id?: IdPropType;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.). Set to `false` to enable the expert slot.\n\t */\n\t@Prop() public _label!: LabelWithExpertSlotPropType;\n\n\t/**\n\t * Defines the technical name of an input field.\n\t */\n\t@Prop() public _name?: NamePropType;\n\n\t/**\n\t * Gibt die EventCallback-Funktionen für die Button-Events an.\n\t */\n\t@Prop() public _on?: ButtonCallbacksPropType<StencilUnknown>;\n\n\t/**\n\t * Defines the role of the components primary element.\n\t */\n\t@Prop() public _role?: AlternativeButtonLinkRolePropType;\n\n\t/**\n\t * Selector for synchronizing the value with another input element.\n\t * @internal\n\t */\n\t@Prop() public _syncValueBySelector?: SyncValueBySelectorPropType;\n\n\t/**\n\t * Defines which tab-index the primary element of the component has. (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex)\n\t */\n\t@Prop() public _tabIndex?: number;\n\n\t/**\n\t * Defines where to show the Tooltip preferably: top, right, bottom or left.\n\t */\n\t@Prop() public _tooltipAlign?: TooltipAlignPropType = 'top';\n\n\t/**\n\t * Defines either the type of the component or of the components interactive element.\n\t */\n\t@Prop() public _type?: ButtonTypePropType = 'button';\n\n\t/**\n\t * Defines the value that the button emits on click.\n\t */\n\t@Prop() public _value?: Stringified<StencilUnknown>;\n}\n"],"mappings":";;;qGAAA,MAAMA,EAAkB,opC,MCwBXC,EAAa,M,yBAGRC,KAAAC,SAAYC,IAC5BC,EAAeH,KAAKI,KAAMF,EAAI,E,sLA0EM,M,gBAOC,M,0PAyDgB,M,WAKV,S,sBA5IrC,MAAAG,GACN,OACCC,EAACC,EAAI,KACJD,EAAA,iBACCJ,IAAKF,KAAKC,SACVO,WAAYR,KAAKQ,WACjBC,cAAeT,KAAKS,cACpBC,aAAcV,KAAKU,aACnBC,cAAeX,KAAKW,cACpBC,WAAYZ,KAAKY,WACjBC,cAAeb,KAAKa,cACpBC,UAAWd,KAAKc,UAChBC,OAAQf,KAAKe,QAAUf,KAAKgB,MAC5BC,WAAYjB,KAAKiB,YAAcjB,KAAKkB,UACpCC,IAAKnB,KAAKmB,IACVC,OAAQpB,KAAKoB,OACbC,MAAOrB,KAAKqB,MACZC,IAAKtB,KAAKsB,IACVC,MAAM,OACNC,qBAAsBxB,KAAKwB,qBAC3BC,UAAWzB,KAAKyB,UAChBC,cAAe1B,KAAK0B,cACpBC,MAAO3B,KAAK2B,MACZC,OAAQ5B,KAAK4B,QAEbtB,EAAA,QAAMuB,KAAK,SAASC,KAAK,Y"}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as t,h as i,H as e,g as n}from"./index-536799d5.js";import{a as s}from"./reuse-b3566e4c.js";const a=":host{--a11y-min-size:44px;font-size:inherit}*{font-family:Verdana;hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}[role='button'],button:not([role='link']),kol-input .input{min-height:var(--a11y-min-size);min-width:var(--a11y-min-size)}a,button,h1,h2,h3,h4,h5,h6,input,option,select,textarea{font-family:inherit;font-size:inherit}:is(a,button){background-color:transparent;border:none;margin:0;padding:0;width:100%;}:host{max-width:100%}*{box-sizing:border-box}kol-span-wc{display:grid;place-items:center}kol-span-wc>span{display:flex;place-items:center}a,button{cursor:pointer}button,input,option,select,textarea{font-family:inherit}.icon-only>kol-span-wc>span>span{display:none}:host{display:inline-block}:is(a,button){display:inline-flex;place-items:center;text-align:center;text-decoration-line:none}:is(a,button)>kol-span-wc{margin:auto;width:100%}:is(button):disabled{cursor:not-allowed;opacity:0.5}",o=class{constructor(i){t(this,i),this.catchRef=i=>{this.ref=i,s(this.host,this.ref)},this._accessKey=void 0,this._ariaControls=void 0,this._ariaCurrent=void 0,this._ariaExpanded=void 0,this._ariaLabel=void 0,this._ariaSelected=void 0,this._customClass=void 0,this._disabled=!1,this._hideLabel=!1,this._icon=void 0,this._icons=void 0,this._iconAlign=void 0,this._iconOnly=void 0,this._id=void 0,this._label=void 0,this._name=void 0,this._on=void 0,this._role=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._type="button",this._value=void 0,this._variant="normal"}render(){return i(e,null,i("kol-button-wc",{ref:this.catchRef,class:{button:!0,[this._variant]:"custom"!==this._variant,[this._customClass]:"custom"===this._variant&&"string"==typeof this._customClass&&this._customClass.length>0},_accessKey:this._accessKey,_ariaControls:this._ariaControls,_ariaCurrent:this._ariaCurrent,_ariaExpanded:this._ariaExpanded,_ariaLabel:this._ariaLabel,_ariaSelected:this._ariaSelected,_customClass:this._customClass,_disabled:this._disabled,_hideLabel:this._hideLabel||this._iconOnly,_icons:this._icons||this._icon,_iconAlign:this._iconAlign,_id:this._id,_label:this._label,_name:this._name,_on:this._on,_role:this._role,_syncValueBySelector:this._syncValueBySelector,_tabIndex:this._tabIndex,_tooltipAlign:this._tooltipAlign,_type:this._type,_value:this._value,_variant:this._variant},i("slot",{name:"expert",slot:"expert"})))}get host(){return n(this)}};o.style={default:a};export{o as kol_button};
4
+ import{r as t,h as i,H as e,g as n}from"./index-536799d5.js";import{a as s}from"./reuse-b3566e4c.js";const a=":host{--a11y-min-size:44px;font-size:inherit}*{font-family:Verdana;hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}[role='button'],button:not([role='link']),kol-input .input{min-height:var(--a11y-min-size);min-width:var(--a11y-min-size)}a,button,h1,h2,h3,h4,h5,h6,input,option,select,textarea{font-family:inherit;font-size:inherit}:is(a,button){background-color:transparent;border:none;margin:0;padding:0;width:100%;}:host{max-width:100%}*{box-sizing:border-box}kol-span-wc{display:grid;place-items:center}kol-span-wc>span{display:flex;place-items:center}a,button{cursor:pointer}button,input,option,select,textarea{font-family:inherit}.icon-only>kol-span-wc>span>span{display:none}:host{display:inline-block}:is(a,button){display:inline-flex;place-items:center;text-align:center;text-decoration-line:none}:is(a,button)>kol-span-wc{margin:auto;width:100%}:is(button):disabled{cursor:not-allowed;opacity:0.5}",o=class{constructor(i){t(this,i),this.catchRef=i=>{s(this.host,i)},this._accessKey=void 0,this._ariaControls=void 0,this._ariaCurrent=void 0,this._ariaExpanded=void 0,this._ariaLabel=void 0,this._ariaSelected=void 0,this._customClass=void 0,this._disabled=!1,this._hideLabel=!1,this._icon=void 0,this._icons=void 0,this._iconAlign=void 0,this._iconOnly=void 0,this._id=void 0,this._label=void 0,this._name=void 0,this._on=void 0,this._role=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._type="button",this._value=void 0,this._variant="normal"}render(){return i(e,null,i("kol-button-wc",{ref:this.catchRef,class:{button:!0,[this._variant]:"custom"!==this._variant,[this._customClass]:"custom"===this._variant&&"string"==typeof this._customClass&&this._customClass.length>0},_accessKey:this._accessKey,_ariaControls:this._ariaControls,_ariaCurrent:this._ariaCurrent,_ariaExpanded:this._ariaExpanded,_ariaLabel:this._ariaLabel,_ariaSelected:this._ariaSelected,_customClass:this._customClass,_disabled:this._disabled,_hideLabel:this._hideLabel||this._iconOnly,_icons:this._icons||this._icon,_iconAlign:this._iconAlign,_id:this._id,_label:this._label,_name:this._name,_on:this._on,_role:this._role,_syncValueBySelector:this._syncValueBySelector,_tabIndex:this._tabIndex,_tooltipAlign:this._tooltipAlign,_type:this._type,_value:this._value,_variant:this._variant},i("slot",{name:"expert",slot:"expert"})))}get host(){return n(this)}};o.style={default:a};export{o as kol_button};
@@ -1 +1 @@
1
- {"version":3,"names":["defaultStyleCss","KolButton","this","catchRef","ref","propagateFocus","host","render","h","Host","class","button","_variant","_customClass","length","_accessKey","_ariaControls","_ariaCurrent","_ariaExpanded","_ariaLabel","_ariaSelected","_disabled","_hideLabel","_iconOnly","_icons","_icon","_iconAlign","_id","_label","_name","_on","_role","_syncValueBySelector","_tabIndex","_tooltipAlign","_type","_value","name","slot"],"sources":["src/components/button/style.css?tag=kol-button&mode=default&encapsulation=shadow","src/components/button/shadow.tsx"],"sourcesContent":["@import url(../button.css);\n","import { Component, Element, h, Host, JSX, Prop } from '@stencil/core';\n\nimport { Stringified } from '../../types/common';\nimport { AlignPropType } from '../../types/props/align';\nimport { AlternativeButtonLinkRolePropType } from '../../types/props/alternative-button-link-role';\nimport { AriaCurrentPropType } from '../../types/props/aria-current';\nimport { ButtonCallbacksPropType } from '../../types/props/button-callbacks';\nimport { ButtonTypePropType } from '../../types/props/button-type';\nimport { ButtonVariantPropType } from '../../types/props/button-variant';\nimport { CustomClassPropType } from '../../types/props/custom-class';\nimport { IconsPropType } from '../../types/props/icons';\nimport { LabelWithExpertSlotPropType } from '../../types/props/label';\nimport { SyncValueBySelectorPropType } from '../../types/props/sync-value-by-selector';\nimport { TooltipAlignPropType } from '../../types/props/tooltip-align';\nimport { StencilUnknown } from '../../types/unknown';\nimport { propagateFocus } from '../../utils/reuse';\nimport { Props } from './types';\n\n@Component({\n\ttag: 'kol-button',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolButton implements Props {\n\t@Element() private readonly host?: HTMLKolButtonElement;\n\tprivate ref?: HTMLKolButtonWcElement;\n\n\tprivate readonly catchRef = (ref?: HTMLKolButtonWcElement) => {\n\t\tthis.ref = ref;\n\t\tpropagateFocus(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-button-wc\n\t\t\t\t\tref={this.catchRef}\n\t\t\t\t\tclass={{\n\t\t\t\t\t\tbutton: true,\n\t\t\t\t\t\t[this._variant as string]: this._variant !== 'custom',\n\t\t\t\t\t\t[this._customClass as string]: this._variant === 'custom' && typeof this._customClass === 'string' && this._customClass.length > 0,\n\t\t\t\t\t}}\n\t\t\t\t\t_accessKey={this._accessKey}\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_customClass={this._customClass}\n\t\t\t\t\t_disabled={this._disabled}\n\t\t\t\t\t_hideLabel={this._hideLabel || this._iconOnly}\n\t\t\t\t\t_icons={this._icons || this._icon}\n\t\t\t\t\t_iconAlign={this._iconAlign}\n\t\t\t\t\t_id={this._id}\n\t\t\t\t\t_label={this._label}\n\t\t\t\t\t_name={this._name}\n\t\t\t\t\t_on={this._on}\n\t\t\t\t\t_role={this._role}\n\t\t\t\t\t_syncValueBySelector={this._syncValueBySelector}\n\t\t\t\t\t_tabIndex={this._tabIndex}\n\t\t\t\t\t_tooltipAlign={this._tooltipAlign}\n\t\t\t\t\t_type={this._type}\n\t\t\t\t\t_value={this._value}\n\t\t\t\t\t_variant={this._variant}\n\t\t\t\t>\n\t\t\t\t\t<slot name=\"expert\" slot=\"expert\"></slot>\n\t\t\t\t</kol-button-wc>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Defines which key combination can be used to trigger or focus the interactive element of the component.\n\t *\n\t * @deprecated\n\t */\n\t@Prop() public _accessKey?: string;\n\n\t/**\n\t * Defines which elements are controlled by this component. (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 * Deprecated: Marks the element as the selected in a group of related elements. Can be one of the following: `date` | `location` | `page` | `step` | `time` | `true`. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current)\n\t *\n\t * @deprecated aria-current is not necessary for buttons. will be removed in version 2.\n\t */\n\t@Prop() public _ariaCurrent?: AriaCurrentPropType;\n\n\t/**\n\t * Defines whether the interactive element of the component expanded something. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded)\n\t */\n\t@Prop() public _ariaExpanded?: boolean;\n\n\t/**\n\t * Deprecated: Setzt die semantische Beschriftung der Komponente.\n\t *\n\t * @deprecated use _label instead\n\t */\n\t@Prop() public _ariaLabel?: string;\n\n\t/**\n\t * Defines whether the interactive element of the component is selected (e.g. role=tab). (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected)\n\t */\n\t@Prop() public _ariaSelected?: boolean;\n\n\t/**\n\t * Defines the custom class attribute if _variant=\"custom\" is set.\n\t */\n\t@Prop() public _customClass?: CustomClassPropType;\n\n\t/**\n\t * Makes the element not focusable and ignore all events.\n\t */\n\t@Prop() public _disabled?: boolean = false;\n\n\t/**\n\t * Hides the caption by default and displays the caption text with a tooltip when the\n\t * interactive element is focused or the mouse is over it.\n\t * @TODO: Change type back to `HideLabelPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hideLabel?: boolean = false;\n\n\t/**\n\t * @deprecated Use _icons.\n\t */\n\t@Prop() public _icon?: IconsPropType;\n\n\t/**\n\t * Defines the icon classnames (e.g. `_icons=\"fa-solid fa-user\"`).\n\t */\n\t@Prop() public _icons?: IconsPropType;\n\n\t/**\n\t * Deprecated: Defines where to show the Tooltip preferably: top, right, bottom or left.\n\t *\n\t * @deprecated\n\t */\n\t@Prop() public _iconAlign?: AlignPropType;\n\n\t/**\n\t * Deprecated: Hides the label and shows the description in a Tooltip instead.\n\t * @deprecated use _hide-label\n\t */\n\t@Prop() public _iconOnly?: boolean;\n\n\t/**\n\t * Defines the internal ID of the primary component element.\n\t */\n\t@Prop() public _id?: string;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.). Set to `false` to enable the expert slot.\n\t */\n\t@Prop() public _label!: LabelWithExpertSlotPropType;\n\n\t/**\n\t * Defines the technical name of an input field.\n\t */\n\t@Prop() public _name?: string;\n\n\t/**\n\t * Defines the callback functions for button events.\n\t */\n\t@Prop() public _on?: ButtonCallbacksPropType<StencilUnknown>;\n\n\t/**\n\t * Defines the role of the components primary element.\n\t */\n\t@Prop() public _role?: AlternativeButtonLinkRolePropType;\n\n\t/**\n\t * Selector for synchronizing the value with another input element.\n\t * @internal\n\t */\n\t@Prop() public _syncValueBySelector?: SyncValueBySelectorPropType;\n\n\t/**\n\t * Defines which tab-index the primary element of the component has. (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex)\n\t */\n\t@Prop() public _tabIndex?: number;\n\n\t/**\n\t * Defines where to show the Tooltip preferably: top, right, bottom or left.\n\t */\n\t@Prop() public _tooltipAlign?: TooltipAlignPropType = 'top';\n\n\t/**\n\t * Defines either the type of the component or of the components interactive element.\n\t */\n\t@Prop() public _type?: ButtonTypePropType = 'button';\n\n\t/**\n\t * Defines the value that the button emits on click.\n\t */\n\t@Prop() public _value?: Stringified<StencilUnknown>;\n\n\t/**\n\t * Defines which variant should be used for presentation.\n\t */\n\t@Prop() public _variant?: ButtonVariantPropType = 'normal';\n}\n"],"mappings":";;;qGAAA,MAAMA,EAAkB,46B,MCyBXC,EAAS,M,yBAIJC,KAAAC,SAAYC,IAC5BF,KAAKE,IAAMA,EACXC,EAAeH,KAAKI,KAAMJ,KAAKE,IAAI,E,kNAsFC,M,gBAOC,M,oRAgEgB,M,WAKV,S,oCAUM,Q,CAzK3C,MAAAG,GACN,OACCC,EAACC,EAAI,KACJD,EAAA,iBACCJ,IAAKF,KAAKC,SACVO,MAAO,CACNC,OAAQ,KACR,CAACT,KAAKU,UAAqBV,KAAKU,WAAa,SAC7C,CAACV,KAAKW,cAAyBX,KAAKU,WAAa,iBAAmBV,KAAKW,eAAiB,UAAYX,KAAKW,aAAaC,OAAS,GAElIC,WAAYb,KAAKa,WACjBC,cAAed,KAAKc,cACpBC,aAAcf,KAAKe,aACnBC,cAAehB,KAAKgB,cACpBC,WAAYjB,KAAKiB,WACjBC,cAAelB,KAAKkB,cACpBP,aAAcX,KAAKW,aACnBQ,UAAWnB,KAAKmB,UAChBC,WAAYpB,KAAKoB,YAAcpB,KAAKqB,UACpCC,OAAQtB,KAAKsB,QAAUtB,KAAKuB,MAC5BC,WAAYxB,KAAKwB,WACjBC,IAAKzB,KAAKyB,IACVC,OAAQ1B,KAAK0B,OACbC,MAAO3B,KAAK2B,MACZC,IAAK5B,KAAK4B,IACVC,MAAO7B,KAAK6B,MACZC,qBAAsB9B,KAAK8B,qBAC3BC,UAAW/B,KAAK+B,UAChBC,cAAehC,KAAKgC,cACpBC,MAAOjC,KAAKiC,MACZC,OAAQlC,KAAKkC,OACbxB,SAAUV,KAAKU,UAEfJ,EAAA,QAAM6B,KAAK,SAASC,KAAK,Y"}
1
+ {"version":3,"names":["defaultStyleCss","KolButton","this","catchRef","ref","propagateFocus","host","render","h","Host","class","button","_variant","_customClass","length","_accessKey","_ariaControls","_ariaCurrent","_ariaExpanded","_ariaLabel","_ariaSelected","_disabled","_hideLabel","_iconOnly","_icons","_icon","_iconAlign","_id","_label","_name","_on","_role","_syncValueBySelector","_tabIndex","_tooltipAlign","_type","_value","name","slot"],"sources":["src/components/button/style.css?tag=kol-button&mode=default&encapsulation=shadow","src/components/button/shadow.tsx"],"sourcesContent":["@import url(../button.css);\n","import { Component, Element, h, Host, JSX, Prop } from '@stencil/core';\n\nimport { Stringified } from '../../types/common';\nimport { AlignPropType } from '../../types/props/align';\nimport { AlternativeButtonLinkRolePropType } from '../../types/props/alternative-button-link-role';\nimport { AriaCurrentPropType } from '../../types/props/aria-current';\nimport { ButtonCallbacksPropType } from '../../types/props/button-callbacks';\nimport { ButtonTypePropType } from '../../types/props/button-type';\nimport { ButtonVariantPropType } from '../../types/props/button-variant';\nimport { CustomClassPropType } from '../../types/props/custom-class';\nimport { IconsPropType } from '../../types/props/icons';\nimport { LabelWithExpertSlotPropType } from '../../types/props/label';\nimport { SyncValueBySelectorPropType } from '../../types/props/sync-value-by-selector';\nimport { TooltipAlignPropType } from '../../types/props/tooltip-align';\nimport { StencilUnknown } from '../../types/unknown';\nimport { propagateFocus } from '../../utils/reuse';\nimport { Props } from './types';\n\n@Component({\n\ttag: 'kol-button',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolButton implements Props {\n\t@Element() private readonly host?: HTMLKolButtonElement;\n\n\tprivate readonly catchRef = (ref?: HTMLKolButtonWcElement) => {\n\t\tpropagateFocus(this.host, ref);\n\t};\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<kol-button-wc\n\t\t\t\t\tref={this.catchRef}\n\t\t\t\t\tclass={{\n\t\t\t\t\t\tbutton: true,\n\t\t\t\t\t\t[this._variant as string]: this._variant !== 'custom',\n\t\t\t\t\t\t[this._customClass as string]: this._variant === 'custom' && typeof this._customClass === 'string' && this._customClass.length > 0,\n\t\t\t\t\t}}\n\t\t\t\t\t_accessKey={this._accessKey}\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_customClass={this._customClass}\n\t\t\t\t\t_disabled={this._disabled}\n\t\t\t\t\t_hideLabel={this._hideLabel || this._iconOnly}\n\t\t\t\t\t_icons={this._icons || this._icon}\n\t\t\t\t\t_iconAlign={this._iconAlign}\n\t\t\t\t\t_id={this._id}\n\t\t\t\t\t_label={this._label}\n\t\t\t\t\t_name={this._name}\n\t\t\t\t\t_on={this._on}\n\t\t\t\t\t_role={this._role}\n\t\t\t\t\t_syncValueBySelector={this._syncValueBySelector}\n\t\t\t\t\t_tabIndex={this._tabIndex}\n\t\t\t\t\t_tooltipAlign={this._tooltipAlign}\n\t\t\t\t\t_type={this._type}\n\t\t\t\t\t_value={this._value}\n\t\t\t\t\t_variant={this._variant}\n\t\t\t\t>\n\t\t\t\t\t<slot name=\"expert\" slot=\"expert\"></slot>\n\t\t\t\t</kol-button-wc>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Defines which key combination can be used to trigger or focus the interactive element of the component.\n\t *\n\t * @deprecated\n\t */\n\t@Prop() public _accessKey?: string;\n\n\t/**\n\t * Defines which elements are controlled by this component. (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 * Deprecated: Marks the element as the selected in a group of related elements. Can be one of the following: `date` | `location` | `page` | `step` | `time` | `true`. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current)\n\t *\n\t * @deprecated aria-current is not necessary for buttons. will be removed in version 2.\n\t */\n\t@Prop() public _ariaCurrent?: AriaCurrentPropType;\n\n\t/**\n\t * Defines whether the interactive element of the component expanded something. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded)\n\t */\n\t@Prop() public _ariaExpanded?: boolean;\n\n\t/**\n\t * Deprecated: Setzt die semantische Beschriftung der Komponente.\n\t *\n\t * @deprecated use _label instead\n\t */\n\t@Prop() public _ariaLabel?: string;\n\n\t/**\n\t * Defines whether the interactive element of the component is selected (e.g. role=tab). (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected)\n\t */\n\t@Prop() public _ariaSelected?: boolean;\n\n\t/**\n\t * Defines the custom class attribute if _variant=\"custom\" is set.\n\t */\n\t@Prop() public _customClass?: CustomClassPropType;\n\n\t/**\n\t * Makes the element not focusable and ignore all events.\n\t */\n\t@Prop() public _disabled?: boolean = false;\n\n\t/**\n\t * Hides the caption by default and displays the caption text with a tooltip when the\n\t * interactive element is focused or the mouse is over it.\n\t * @TODO: Change type back to `HideLabelPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hideLabel?: boolean = false;\n\n\t/**\n\t * @deprecated Use _icons.\n\t */\n\t@Prop() public _icon?: IconsPropType;\n\n\t/**\n\t * Defines the icon classnames (e.g. `_icons=\"fa-solid fa-user\"`).\n\t */\n\t@Prop() public _icons?: IconsPropType;\n\n\t/**\n\t * Deprecated: Defines where to show the Tooltip preferably: top, right, bottom or left.\n\t *\n\t * @deprecated\n\t */\n\t@Prop() public _iconAlign?: AlignPropType;\n\n\t/**\n\t * Deprecated: Hides the label and shows the description in a Tooltip instead.\n\t * @deprecated use _hide-label\n\t */\n\t@Prop() public _iconOnly?: boolean;\n\n\t/**\n\t * Defines the internal ID of the primary component element.\n\t */\n\t@Prop() public _id?: string;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.). Set to `false` to enable the expert slot.\n\t */\n\t@Prop() public _label!: LabelWithExpertSlotPropType;\n\n\t/**\n\t * Defines the technical name of an input field.\n\t */\n\t@Prop() public _name?: string;\n\n\t/**\n\t * Defines the callback functions for button events.\n\t */\n\t@Prop() public _on?: ButtonCallbacksPropType<StencilUnknown>;\n\n\t/**\n\t * Defines the role of the components primary element.\n\t */\n\t@Prop() public _role?: AlternativeButtonLinkRolePropType;\n\n\t/**\n\t * Selector for synchronizing the value with another input element.\n\t * @internal\n\t */\n\t@Prop() public _syncValueBySelector?: SyncValueBySelectorPropType;\n\n\t/**\n\t * Defines which tab-index the primary element of the component has. (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex)\n\t */\n\t@Prop() public _tabIndex?: number;\n\n\t/**\n\t * Defines where to show the Tooltip preferably: top, right, bottom or left.\n\t */\n\t@Prop() public _tooltipAlign?: TooltipAlignPropType = 'top';\n\n\t/**\n\t * Defines either the type of the component or of the components interactive element.\n\t */\n\t@Prop() public _type?: ButtonTypePropType = 'button';\n\n\t/**\n\t * Defines the value that the button emits on click.\n\t */\n\t@Prop() public _value?: Stringified<StencilUnknown>;\n\n\t/**\n\t * Defines which variant should be used for presentation.\n\t */\n\t@Prop() public _variant?: ButtonVariantPropType = 'normal';\n}\n"],"mappings":";;;qGAAA,MAAMA,EAAkB,46B,MCyBXC,EAAS,M,yBAGJC,KAAAC,SAAYC,IAC5BC,EAAeH,KAAKI,KAAMF,EAAI,E,kNAsFM,M,gBAOC,M,oRAgEgB,M,WAKV,S,oCAUM,Q,CAzK3C,MAAAG,GACN,OACCC,EAACC,EAAI,KACJD,EAAA,iBACCJ,IAAKF,KAAKC,SACVO,MAAO,CACNC,OAAQ,KACR,CAACT,KAAKU,UAAqBV,KAAKU,WAAa,SAC7C,CAACV,KAAKW,cAAyBX,KAAKU,WAAa,iBAAmBV,KAAKW,eAAiB,UAAYX,KAAKW,aAAaC,OAAS,GAElIC,WAAYb,KAAKa,WACjBC,cAAed,KAAKc,cACpBC,aAAcf,KAAKe,aACnBC,cAAehB,KAAKgB,cACpBC,WAAYjB,KAAKiB,WACjBC,cAAelB,KAAKkB,cACpBP,aAAcX,KAAKW,aACnBQ,UAAWnB,KAAKmB,UAChBC,WAAYpB,KAAKoB,YAAcpB,KAAKqB,UACpCC,OAAQtB,KAAKsB,QAAUtB,KAAKuB,MAC5BC,WAAYxB,KAAKwB,WACjBC,IAAKzB,KAAKyB,IACVC,OAAQ1B,KAAK0B,OACbC,MAAO3B,KAAK2B,MACZC,IAAK5B,KAAK4B,IACVC,MAAO7B,KAAK6B,MACZC,qBAAsB9B,KAAK8B,qBAC3BC,UAAW/B,KAAK+B,UAChBC,cAAehC,KAAKgC,cACpBC,MAAOjC,KAAKiC,MACZC,OAAQlC,KAAKkC,OACbxB,SAAUV,KAAKU,UAEfJ,EAAA,QAAM6B,KAAK,SAASC,KAAK,Y"}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as t,h as i,H as e}from"./index-536799d5.js";import{a as s}from"./i18n-604b0def.js";import{v as a}from"./has-closer-d68572b5.js";import{a as o,s as n}from"./prop.validators-a681ba79.js";import{v as l}from"./label-dd0fc95b.js";import{w as r}from"./validation-b7903abd.js";import"./index-23225963.js";import"./index-3822b0c5.js";import"./a11y.tipps-d4474fb4.js";import"./dev.utils-6644fc40.js";import"./reuse-b3566e4c.js";const d=(t,e)=>{o(t,"_hasFooter",e)},h=":host{--a11y-min-size:44px;font-size:inherit}*{font-family:Verdana;hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}[role='button'],button:not([role='link']),kol-input .input{min-height:var(--a11y-min-size);min-width:var(--a11y-min-size)}a,button,h1,h2,h3,h4,h5,h6,input,option,select,textarea{font-family:inherit;font-size:inherit}:is(a,button){background-color:transparent;border:none;margin:0;padding:0;width:100%;}:host{max-width:100%}*{box-sizing:border-box}kol-span-wc{display:grid;place-items:center}kol-span-wc>span{display:flex;place-items:center}a,button{cursor:pointer}button,input,option,select,textarea{font-family:inherit}.icon-only>kol-span-wc>span>span{display:none}:host>div.card{height:100%;position:relative}.close{position:absolute;top:0;right:0}",c=class{constructor(e){t(this,e),this.close=()=>{var t;void 0!==(null===(t=this._on)||void 0===t?void 0:t.onClose)&&this._on.onClose(new Event("Close"))},this.on={onClick:this.close},this.validateOnValue=t=>"object"==typeof t&&null!==t&&"function"==typeof t.onClose,this._on=void 0,this._hasCloser=!1,this._hasFooter=!1,this._heading=void 0,this._headline=void 0,this._label=void 0,this._level=1,this.state={_label:"…"}}render(){return i(e,null,i("div",{class:"card"},i("div",{class:"header"},i("kol-heading-wc",{_label:this.state._label,_level:this.state._level}),i("slot",{name:"header"})),i("div",{class:"content"},i("slot",{name:"content"}),i("slot",null)),this.state._hasFooter&&i("div",{class:"footer"},i("slot",{name:"footer"})),this.state._hasCloser&&i("kol-button-wc",{class:"close",_hideLabel:!0,_icons:{left:{icon:"codicon codicon-close"}},_label:s("kol-close"),_on:this.on,_tooltipAlign:"left"})))}validateOn(t){this.validateOnValue(t)&&n(this,"_on",{onClose:t.onClose})}validateHasCloser(t){a(this,t)}validateHasFooter(t){d(this,t)}validateHeading(t){this.validateLabel(t)}validateHeadline(t){this.validateLabel(t)}validateLabel(t){l(this,t)}validateLevel(t){r(this,t)}componentWillLoad(){this.validateHasCloser(this._hasCloser),this.validateHasFooter(this._hasFooter),this.validateLabel(this._label||this._heading||this._headline),this.validateLevel(this._level),this.validateOn(this._on)}static get watchers(){return{_on:["validateOn"],_hasCloser:["validateHasCloser"],_hasFooter:["validateHasFooter"],_heading:["validateHeading"],_headline:["validateHeadline"],_label:["validateLabel"],_level:["validateLevel"]}}};c.style={default:h};export{c as kol_card};
4
+ import{r as t,h as i,H as e}from"./index-536799d5.js";import{a as s}from"./i18n-ad401ed8.js";import{v as a}from"./has-closer-3f2a115a.js";import{a as o,s as n}from"./prop.validators-251589c8.js";import{v as l}from"./label-57859a5a.js";import{w as r}from"./validation-3e123430.js";import"./index-23225963.js";import"./index-3822b0c5.js";import"./a11y.tipps-54065212.js";import"./dev.utils-ad367f40.js";import"./reuse-b3566e4c.js";const h=(t,e)=>{o(t,"_hasFooter",e)},d=":host{--a11y-min-size:44px;font-size:inherit}*{font-family:Verdana;hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}[role='button'],button:not([role='link']),kol-input .input{min-height:var(--a11y-min-size);min-width:var(--a11y-min-size)}a,button,h1,h2,h3,h4,h5,h6,input,option,select,textarea{font-family:inherit;font-size:inherit}:is(a,button){background-color:transparent;border:none;margin:0;padding:0;width:100%;}:host{max-width:100%}*{box-sizing:border-box}kol-span-wc{display:grid;place-items:center}kol-span-wc>span{display:flex;place-items:center}a,button{cursor:pointer}button,input,option,select,textarea{font-family:inherit}.icon-only>kol-span-wc>span>span{display:none}:host>div.card{height:100%;position:relative}.close{position:absolute;top:0;right:0}",c=class{constructor(e){t(this,e),this.close=()=>{var t;void 0!==(null===(t=this._on)||void 0===t?void 0:t.onClose)&&this._on.onClose(new Event("Close"))},this.on={onClick:this.close},this.validateOnValue=t=>"object"==typeof t&&null!==t&&"function"==typeof t.onClose,this._on=void 0,this._hasCloser=!1,this._hasFooter=!1,this._heading=void 0,this._headline=void 0,this._label=void 0,this._level=1,this.state={_label:"…"}}render(){return i(e,null,i("div",{class:"card"},i("div",{class:"header"},i("kol-heading-wc",{_label:this.state._label,_level:this.state._level}),i("slot",{name:"header"})),i("div",{class:"content"},i("slot",{name:"content"}),i("slot",null)),this.state._hasFooter&&i("div",{class:"footer"},i("slot",{name:"footer"})),this.state._hasCloser&&i("kol-button-wc",{class:"close",_hideLabel:!0,_icons:{left:{icon:"codicon codicon-close"}},_label:s("kol-close"),_on:this.on,_tooltipAlign:"left"})))}validateOn(t){this.validateOnValue(t)&&n(this,"_on",{onClose:t.onClose})}validateHasCloser(t){a(this,t)}validateHasFooter(t){h(this,t)}validateHeading(t){this.validateLabel(t)}validateHeadline(t){this.validateLabel(t)}validateLabel(t){l(this,t)}validateLevel(t){r(this,t)}componentWillLoad(){this.validateHasCloser(this._hasCloser),this.validateHasFooter(this._hasFooter),this.validateLabel(this._label||this._heading||this._headline),this.validateLevel(this._level),this.validateOn(this._on)}static get watchers(){return{_on:["validateOn"],_hasCloser:["validateHasCloser"],_hasFooter:["validateHasFooter"],_heading:["validateHeading"],_headline:["validateHeadline"],_label:["validateLabel"],_level:["validateLevel"]}}};c.style={default:d};export{c as kol_card};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as i,h as t,H as s,g as e}from"./index-536799d5.js";import{v as o}from"./label-dd0fc95b.js";import{v as n}from"./open-d9d85c3d.js";import{t as a}from"./events-2bb1065b.js";import{s as h}from"./prop.validators-a681ba79.js";import"./a11y.tipps-d4474fb4.js";import"./dev.utils-6644fc40.js";import"./reuse-b3566e4c.js";import"./index-3822b0c5.js";class l{constructor(t,e,i){this.detailsElement=t,this.summaryElement=e,this.contentElement=i,this.isClosing=!1,this.isExpanding=!1,this.summaryElement.addEventListener("click",this.handleSummaryClick.bind(this))}handleSummaryClick(t){t.preventDefault(),this.detailsElement.style.overflow="hidden",this.isClosing||!this.detailsElement.open?this.open():(this.isExpanding||this.detailsElement.open)&&this.collapse()}open(){var t;this.detailsElement.style.height=`${null!==(t=this.detailsElement.offsetHeight)&&void 0!==t?t:0}px`,this.detailsElement.open=!0,window.requestAnimationFrame(this.expand.bind(this))}expand(){this.isExpanding=!0,this.animateDetailsHeight(this.summaryElement.offsetHeight+this.contentElement.offsetHeight,"expand")}collapse(){this.isClosing=!0,this.animateDetailsHeight(this.summaryElement.offsetHeight,"collapse")}animateDetailsHeight(t,e){const i=this.detailsElement.offsetHeight;this.animation&&this.animation.cancel(),this.animation=this.detailsElement.animate({height:[`${i}px`,`${t}px`]},{duration:matchMedia("(prefers-reduced-motion)").matches?0:250,easing:"ease-out"}),this.animation.addEventListener("finish",(()=>{this.onAnimationFinish()}),{once:!0}),this.animation.addEventListener("cancel",(()=>{"expand"===e?this.isExpanding=!1:this.isClosing=!1}),{once:!0})}onAnimationFinish(){this.detailsElement.open=this.isExpanding,this.animation=void 0,this.isClosing=!1,this.isExpanding=!1,this.detailsElement.style.removeProperty("height"),this.detailsElement.style.removeProperty("overview")}}const r=":host{--a11y-min-size:44px;font-size:inherit}*{font-family:Verdana;hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}[role='button'],button:not([role='link']),kol-input .input{min-height:var(--a11y-min-size);min-width:var(--a11y-min-size)}a,button,h1,h2,h3,h4,h5,h6,input,option,select,textarea{font-family:inherit;font-size:inherit}:is(a,button){background-color:transparent;border:none;margin:0;padding:0;width:100%;}:host{max-width:100%}*{box-sizing:border-box}kol-span-wc{display:grid;place-items:center}kol-span-wc>span{display:flex;place-items:center}a,button{cursor:pointer}button,input,option,select,textarea{font-family:inherit}.icon-only>kol-span-wc>span>span{display:none}:host{display:block}details{display:grid}details>summary{cursor:pointer;display:flex;place-items:center}details>summary>span{border-bottom-color:grey;border-bottom-style:solid}details>summary:focus>span,details>summary:hover>span,details[open]>summary>span{border-bottom-color:#000}details>kol-indented-text{margin:0.25em 0 0 0.5em}",d=class{constructor(t){i(this,t),this.handleToggle=t=>{clearTimeout(this.toggleTimeout),this.toggleTimeout=setTimeout((()=>{var e,i,s,n;Boolean(null===(e=this.detailsElement)||void 0===e?void 0:e.open)!==this.state._open&&(this._open=Boolean(null===(i=this.detailsElement)||void 0===i?void 0:i.open),a("toggle",this.host,this._open),"function"==typeof(null===(s=this.state._on)||void 0===s?void 0:s.onToggle)&&(null===(n=this.state._on)||void 0===n||n.onToggle(t,this._open)))}),25)},this._label=void 0,this._on=void 0,this._open=!1,this._summary=void 0,this.state={_label:"…",_on:{}}}render(){return t(s,null,t("details",{ref:t=>{this.detailsElement=t},onToggle:this.handleToggle},t("summary",{ref:t=>this.summaryElement=t},this.state._open?t("kol-icon",{_label:"",_icons:"codicon codicon-chevron-down"}):t("kol-icon",{_label:"",_icons:"codicon codicon-chevron-right"}),t("span",null,this.state._label)),t("div",{class:"content",ref:t=>this.contentElement=t},t("kol-indented-text",null,t("slot",null)))))}validateLabel(t){o(this,t)}validateOn(t){"object"==typeof t&&null!==t&&"function"==typeof t.onToggle&&h(this,"_on",t)}validateOpen(t){n(this,t)}validateSummary(t){this.validateLabel(t)}componentWillLoad(){this.validateLabel(this._label||this._summary),this.validateOn(this._on),this.validateOpen(this._open)}componentDidLoad(){if(this.detailsElement&&this.summaryElement&&this.contentElement){const t=new l(this.detailsElement,this.summaryElement,this.contentElement);this.state._open&&t.open()}}get host(){return e(this)}static get watchers(){return{_label:["validateLabel"],_on:["validateOn"],_open:["validateOpen"],_summary:["validateSummary"]}}};d.style={default:r};export{d as kol_details};
4
+ import{r as i,h as t,H as s,g as e}from"./index-536799d5.js";import{v as o}from"./label-57859a5a.js";import{v as n}from"./open-29222e31.js";import{t as a}from"./events-2bb1065b.js";import{s as h}from"./prop.validators-251589c8.js";import{a as l}from"./reuse-b3566e4c.js";import"./a11y.tipps-54065212.js";import"./dev.utils-ad367f40.js";import"./index-3822b0c5.js";class r{constructor(t,e,i){this.detailsElement=t,this.summaryElement=e,this.contentElement=i,this.isClosing=!1,this.isExpanding=!1,this.summaryElement.addEventListener("click",this.handleSummaryClick.bind(this))}handleSummaryClick(t){t.preventDefault(),this.detailsElement.style.overflow="hidden",this.isClosing||!this.detailsElement.open?this.open():(this.isExpanding||this.detailsElement.open)&&this.collapse()}open(){var t;this.detailsElement.style.height=`${null!==(t=this.detailsElement.offsetHeight)&&void 0!==t?t:0}px`,this.detailsElement.open=!0,window.requestAnimationFrame(this.expand.bind(this))}expand(){this.isExpanding=!0,this.animateDetailsHeight(this.summaryElement.offsetHeight+this.contentElement.offsetHeight,"expand")}collapse(){this.isClosing=!0,this.animateDetailsHeight(this.summaryElement.offsetHeight,"collapse")}animateDetailsHeight(t,e){const i=this.detailsElement.offsetHeight;this.animation&&this.animation.cancel(),this.animation=this.detailsElement.animate({height:[`${i}px`,`${t}px`]},{duration:matchMedia("(prefers-reduced-motion)").matches?0:250,easing:"ease-out"}),this.animation.addEventListener("finish",(()=>{this.onAnimationFinish()}),{once:!0}),this.animation.addEventListener("cancel",(()=>{"expand"===e?this.isExpanding=!1:this.isClosing=!1}),{once:!0})}onAnimationFinish(){this.detailsElement.open=this.isExpanding,this.animation=void 0,this.isClosing=!1,this.isExpanding=!1,this.detailsElement.style.removeProperty("height"),this.detailsElement.style.removeProperty("overview")}}const d=":host{--a11y-min-size:44px;font-size:inherit}*{font-family:Verdana;hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}[role='button'],button:not([role='link']),kol-input .input{min-height:var(--a11y-min-size);min-width:var(--a11y-min-size)}a,button,h1,h2,h3,h4,h5,h6,input,option,select,textarea{font-family:inherit;font-size:inherit}:is(a,button){background-color:transparent;border:none;margin:0;padding:0;width:100%;}:host{max-width:100%}*{box-sizing:border-box}kol-span-wc{display:grid;place-items:center}kol-span-wc>span{display:flex;place-items:center}a,button{cursor:pointer}button,input,option,select,textarea{font-family:inherit}.icon-only>kol-span-wc>span>span{display:none}:host{display:block}details{display:grid}details>summary{cursor:pointer;display:flex;place-items:center}details>summary>span{border-bottom-color:grey;border-bottom-style:solid}details>summary:focus>span,details>summary:hover>span,details[open]>summary>span{border-bottom-color:#000}details>kol-indented-text{margin:0.25em 0 0 0.5em}",c=class{constructor(t){i(this,t),this.catchRef=t=>{this.summaryElement=t,l(this.host,this.summaryElement)},this.handleToggle=t=>{clearTimeout(this.toggleTimeout),this.toggleTimeout=setTimeout((()=>{var e,i,s,n;Boolean(null===(e=this.detailsElement)||void 0===e?void 0:e.open)!==this.state._open&&(this._open=Boolean(null===(i=this.detailsElement)||void 0===i?void 0:i.open),a("toggle",this.host,this._open),"function"==typeof(null===(s=this.state._on)||void 0===s?void 0:s.onToggle)&&(null===(n=this.state._on)||void 0===n||n.onToggle(t,this._open)))}),25)},this._label=void 0,this._on=void 0,this._open=!1,this._summary=void 0,this.state={_label:"…",_on:{}}}render(){return t(s,null,t("details",{ref:t=>{this.detailsElement=t},onToggle:this.handleToggle},t("summary",{ref:this.catchRef},this.state._open?t("kol-icon",{_label:"",_icons:"codicon codicon-chevron-down"}):t("kol-icon",{_label:"",_icons:"codicon codicon-chevron-right"}),t("span",null,this.state._label)),t("div",{"aria-hidden":!1===this.state._open?"true":void 0,class:"content",ref:t=>this.contentElement=t},t("kol-indented-text",null,t("slot",null)))))}validateLabel(t){o(this,t)}validateOn(t){"object"==typeof t&&null!==t&&"function"==typeof t.onToggle&&h(this,"_on",t)}validateOpen(t){n(this,t)}validateSummary(t){this.validateLabel(t)}componentWillLoad(){this.validateLabel(this._label||this._summary),this.validateOn(this._on),this.validateOpen(this._open)}componentDidLoad(){if(this.detailsElement&&this.summaryElement&&this.contentElement){const t=new r(this.detailsElement,this.summaryElement,this.contentElement);this.state._open&&t.open()}}get host(){return e(this)}static get watchers(){return{_label:["validateLabel"],_on:["validateOn"],_open:["validateOpen"],_summary:["validateSummary"]}}};c.style={default:d};export{c as kol_details};
@@ -1 +1 @@
1
- {"version":3,"names":["DetailsAnimationController","constructor","detailsElement","summaryElement","contentElement","this","isClosing","isExpanding","addEventListener","handleSummaryClick","bind","event","preventDefault","style","overflow","open","collapse","height","_a","offsetHeight","window","requestAnimationFrame","expand","animateDetailsHeight","endHeight","direction","startHeight","animation","cancel","animate","duration","matchMedia","matches","easing","onAnimationFinish","once","undefined","removeProperty","defaultStyleCss","KolDetails","handleToggle","clearTimeout","toggleTimeout","setTimeout","Boolean","state","_open","_b","tryToDispatchKoliBriEvent","host","_c","_on","onToggle","_d","_label","render","h","Host","ref","el","element","_icons","class","validateLabel","value","validateOn","on","setState","validateOpen","validateSummary","componentWillLoad","_summary","componentDidLoad","animationController"],"sources":["src/components/details/DetailsAnimationController.ts","src/components/details/style.css?tag=kol-details&mode=default&encapsulation=shadow","src/components/details/component.tsx"],"sourcesContent":["/* Heavily inspired by: https://codepen.io/Mamboleoo/pen/QWEpLqm */\n\nexport default class DetailsAnimationController {\n\tprivate animation?: Animation;\n\tprivate isClosing = false;\n\tprivate isExpanding = false;\n\n\tconstructor(private detailsElement: HTMLDetailsElement, private summaryElement: HTMLElement, private contentElement: HTMLElement) {\n\t\tthis.summaryElement.addEventListener('click', this.handleSummaryClick.bind(this));\n\t}\n\n\tprivate handleSummaryClick(event: MouseEvent) {\n\t\tevent.preventDefault();\n\n\t\tthis.detailsElement.style.overflow = 'hidden';\n\t\tif (this.isClosing || !this.detailsElement.open) {\n\t\t\tthis.open();\n\t\t} else if (this.isExpanding || this.detailsElement.open) {\n\t\t\tthis.collapse();\n\t\t}\n\t}\n\n\tpublic open() {\n\t\t/**\n\t\t * The Jest test framework does not support the `offsetHeight` property on the `details` element.\n\t\t * This is a workaround to make the tests pass (?? 0).\n\t\t */\n\t\tthis.detailsElement.style.height = `${this.detailsElement.offsetHeight ?? 0}px`;\n\t\tthis.detailsElement.open = true;\n\t\twindow.requestAnimationFrame(this.expand.bind(this));\n\t}\n\n\tprivate expand() {\n\t\tthis.isExpanding = true;\n\t\tthis.animateDetailsHeight(this.summaryElement.offsetHeight + this.contentElement.offsetHeight, 'expand');\n\t}\n\n\tprivate collapse() {\n\t\tthis.isClosing = true;\n\t\tthis.animateDetailsHeight(this.summaryElement.offsetHeight, 'collapse');\n\t}\n\n\tprivate animateDetailsHeight(endHeight: number, direction: 'expand' | 'collapse') {\n\t\tconst startHeight = this.detailsElement.offsetHeight;\n\n\t\tif (this.animation) {\n\t\t\tthis.animation.cancel();\n\t\t}\n\n\t\tthis.animation = this.detailsElement.animate(\n\t\t\t{\n\t\t\t\theight: [`${startHeight}px`, `${endHeight}px`],\n\t\t\t},\n\t\t\t{\n\t\t\t\tduration: matchMedia('(prefers-reduced-motion)').matches ? 0 : 250,\n\t\t\t\teasing: 'ease-out',\n\t\t\t}\n\t\t);\n\n\t\tthis.animation.addEventListener(\n\t\t\t'finish',\n\t\t\t() => {\n\t\t\t\tthis.onAnimationFinish();\n\t\t\t},\n\t\t\t{ once: true }\n\t\t);\n\t\tthis.animation.addEventListener(\n\t\t\t'cancel',\n\t\t\t() => {\n\t\t\t\tif (direction === 'expand') {\n\t\t\t\t\tthis.isExpanding = false;\n\t\t\t\t} else {\n\t\t\t\t\tthis.isClosing = false;\n\t\t\t\t}\n\t\t\t},\n\t\t\t{ once: true }\n\t\t);\n\t}\n\n\tprivate onAnimationFinish() {\n\t\tthis.detailsElement.open = this.isExpanding;\n\t\tthis.animation = undefined;\n\t\tthis.isClosing = false;\n\t\tthis.isExpanding = false;\n\t\tthis.detailsElement.style.removeProperty('height');\n\t\tthis.detailsElement.style.removeProperty('overview');\n\t}\n}\n","@import url(../style.css);\n@import url(../host-display-block.css);\ndetails {\n\tdisplay: grid;\n}\ndetails > summary {\n\tcursor: pointer;\n\tdisplay: flex;\n\tplace-items: center;\n}\ndetails > summary > span {\n\tborder-bottom-color: grey;\n\tborder-bottom-style: solid;\n}\ndetails > summary:focus > span,\ndetails > summary:hover > span,\ndetails[open] > summary > span {\n\tborder-bottom-color: #000;\n}\ndetails > kol-indented-text {\n\tmargin: 0.25em 0 0 0.5em;\n}\n","import { Component, Element, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { LabelPropType, validateLabel } from '../../types/props/label';\nimport { validateOpen } from '../../types/props/open';\nimport { tryToDispatchKoliBriEvent } from '../../utils/events';\nimport { setState } from '../../utils/prop.validators';\nimport DetailsAnimationController from './DetailsAnimationController';\nimport { API, EventCallbacks, States } from './types';\n\n/**\n * @slot - Der Inhalt, der in der Detailbeschreibung angezeigt wird.\n */\n@Component({\n\ttag: 'kol-details',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolDetails implements API {\n\t@Element() private readonly host?: HTMLKolDetailsElement;\n\tprivate detailsElement?: HTMLDetailsElement;\n\tprivate summaryElement?: HTMLElement;\n\tprivate contentElement?: HTMLElement;\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<details\n\t\t\t\t\tref={(el) => {\n\t\t\t\t\t\tthis.detailsElement = el as HTMLDetailsElement;\n\t\t\t\t\t}}\n\t\t\t\t\tonToggle={this.handleToggle}\n\t\t\t\t>\n\t\t\t\t\t<summary ref={(element) => (this.summaryElement = element)}>\n\t\t\t\t\t\t{this.state._open ? <kol-icon _label=\"\" _icons=\"codicon codicon-chevron-down\" /> : <kol-icon _label=\"\" _icons=\"codicon codicon-chevron-right\" />}\n\t\t\t\t\t\t<span>{this.state._label}</span>\n\t\t\t\t\t</summary>\n\t\t\t\t\t<div class=\"content\" ref={(element) => (this.contentElement = element)}>\n\t\t\t\t\t\t<kol-indented-text>\n\t\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t</kol-indented-text>\n\t\t\t\t\t</div>\n\t\t\t\t</details>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() public _label?: LabelPropType;\n\n\t/**\n\t * Defines the callback functions for details.\n\t */\n\t@Prop() public _on?: EventCallbacks;\n\n\t/**\n\t * If set (to true) opens/expands the element, closes if not set (or set to false).\n\t * @TODO: Change type back to `OpenPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _open?: boolean = false;\n\n\t/**\n\t * Deprecated: Gibt die Zusammenfassung der Detailbeschreibung an.\n\t * @deprecated Use _label.\n\t */\n\t@Prop() public _summary?: string;\n\n\t@State() public state: States = {\n\t\t_label: '…', // '⚠'\n\t\t_on: {},\n\t};\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelPropType): void {\n\t\tvalidateLabel(this, value);\n\t}\n\n\t@Watch('_on')\n\tpublic validateOn(on?: EventCallbacks) {\n\t\tif (typeof on === 'object' && on !== null && typeof on.onToggle === 'function') {\n\t\t\tsetState<EventCallbacks>(this, '_on', on);\n\t\t}\n\t}\n\n\t@Watch('_open')\n\tpublic validateOpen(value?: boolean): void {\n\t\tvalidateOpen(this, value);\n\t}\n\n\t@Watch('_summary')\n\tpublic validateSummary(value?: string): void {\n\t\tthis.validateLabel(value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateLabel(this._label || this._summary);\n\t\tthis.validateOn(this._on);\n\t\tthis.validateOpen(this._open);\n\t}\n\n\tpublic componentDidLoad() {\n\t\tif (this.detailsElement && this.summaryElement && this.contentElement) {\n\t\t\tconst animationController = new DetailsAnimationController(this.detailsElement, this.summaryElement, this.contentElement);\n\t\t\tif (this.state._open) {\n\t\t\t\tanimationController.open();\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate toggleTimeout?: ReturnType<typeof setTimeout>;\n\n\tprivate handleToggle = (event: Event) => {\n\t\tclearTimeout(this.toggleTimeout);\n\t\tthis.toggleTimeout = setTimeout(() => {\n\t\t\tconst open = Boolean(this.detailsElement?.open);\n\t\t\tif (open !== this.state._open) {\n\t\t\t\t// Update state\n\t\t\t\tthis._open = Boolean(this.detailsElement?.open);\n\n\t\t\t\t// Event handling\n\t\t\t\ttryToDispatchKoliBriEvent('toggle', this.host, this._open);\n\n\t\t\t\t// Callback\n\t\t\t\tif (typeof this.state._on?.onToggle === 'function') {\n\t\t\t\t\tthis.state._on?.onToggle(event, this._open);\n\t\t\t\t}\n\t\t\t}\n\t\t}, 25);\n\t};\n}\n"],"mappings":";;;sWAEqBA,EAKpB,WAAAC,CAAoBC,EAA4CC,EAAqCC,GAAjFC,KAAAH,iBAA4CG,KAAAF,iBAAqCE,KAAAD,iBAH7FC,KAAAC,UAAY,MACZD,KAAAE,YAAc,MAGrBF,KAAKF,eAAeK,iBAAiB,QAASH,KAAKI,mBAAmBC,KAAKL,M,CAGpE,kBAAAI,CAAmBE,GAC1BA,EAAMC,iBAENP,KAAKH,eAAeW,MAAMC,SAAW,SACrC,GAAIT,KAAKC,YAAcD,KAAKH,eAAea,KAAM,CAChDV,KAAKU,M,MACC,GAAIV,KAAKE,aAAeF,KAAKH,eAAea,KAAM,CACxDV,KAAKW,U,EAIA,IAAAD,G,MAKNV,KAAKH,eAAeW,MAAMI,OAAS,IAAGC,EAAAb,KAAKH,eAAeiB,gBAAY,MAAAD,SAAA,EAAAA,EAAI,MAC1Eb,KAAKH,eAAea,KAAO,KAC3BK,OAAOC,sBAAsBhB,KAAKiB,OAAOZ,KAAKL,M,CAGvC,MAAAiB,GACPjB,KAAKE,YAAc,KACnBF,KAAKkB,qBAAqBlB,KAAKF,eAAegB,aAAed,KAAKD,eAAee,aAAc,S,CAGxF,QAAAH,GACPX,KAAKC,UAAY,KACjBD,KAAKkB,qBAAqBlB,KAAKF,eAAegB,aAAc,W,CAGrD,oBAAAI,CAAqBC,EAAmBC,GAC/C,MAAMC,EAAcrB,KAAKH,eAAeiB,aAExC,GAAId,KAAKsB,UAAW,CACnBtB,KAAKsB,UAAUC,Q,CAGhBvB,KAAKsB,UAAYtB,KAAKH,eAAe2B,QACpC,CACCZ,OAAQ,CAAC,GAAGS,MAAiB,GAAGF,QAEjC,CACCM,SAAUC,WAAW,4BAA4BC,QAAU,EAAI,IAC/DC,OAAQ,aAIV5B,KAAKsB,UAAUnB,iBACd,UACA,KACCH,KAAK6B,mBAAmB,GAEzB,CAAEC,KAAM,OAET9B,KAAKsB,UAAUnB,iBACd,UACA,KACC,GAAIiB,IAAc,SAAU,CAC3BpB,KAAKE,YAAc,K,KACb,CACNF,KAAKC,UAAY,K,IAGnB,CAAE6B,KAAM,M,CAIF,iBAAAD,GACP7B,KAAKH,eAAea,KAAOV,KAAKE,YAChCF,KAAKsB,UAAYS,UACjB/B,KAAKC,UAAY,MACjBD,KAAKE,YAAc,MACnBF,KAAKH,eAAeW,MAAMwB,eAAe,UACzChC,KAAKH,eAAeW,MAAMwB,eAAe,W,ECrF3C,MAAMC,EAAkB,uhC,MCmBXC,EAAU,M,yBA+FdlC,KAAAmC,aAAgB7B,IACvB8B,aAAapC,KAAKqC,eAClBrC,KAAKqC,cAAgBC,YAAW,K,YAC/B,MAAM5B,EAAO6B,SAAQ1B,EAAAb,KAAKH,kBAAc,MAAAgB,SAAA,SAAAA,EAAEH,MAC1C,GAAIA,IAASV,KAAKwC,MAAMC,MAAO,CAE9BzC,KAAKyC,MAAQF,SAAQG,EAAA1C,KAAKH,kBAAc,MAAA6C,SAAA,SAAAA,EAAEhC,MAG1CiC,EAA0B,SAAU3C,KAAK4C,KAAM5C,KAAKyC,OAGpD,WAAWI,EAAA7C,KAAKwC,MAAMM,OAAG,MAAAD,SAAA,SAAAA,EAAEE,YAAa,WAAY,EACnDC,EAAAhD,KAAKwC,MAAMM,OAAG,MAAAE,SAAA,SAAAA,EAAED,SAASzC,EAAON,KAAKyC,M,KAGrC,GAAG,E,oDApE0D,M,mCAQjC,CAC/BQ,OAAQ,IACRH,IAAK,G,CA/CC,MAAAI,GACN,OACCC,EAACC,EAAI,KACJD,EAAA,WACCE,IAAMC,IACLtD,KAAKH,eAAiByD,CAAwB,EAE/CP,SAAU/C,KAAKmC,cAEfgB,EAAA,WAASE,IAAME,GAAavD,KAAKF,eAAiByD,GAChDvD,KAAKwC,MAAMC,MAAQU,EAAA,YAAUF,OAAO,GAAGO,OAAO,iCAAoCL,EAAA,YAAUF,OAAO,GAAGO,OAAO,kCAC9GL,EAAA,YAAOnD,KAAKwC,MAAMS,SAEnBE,EAAA,OAAKM,MAAM,UAAUJ,IAAME,GAAavD,KAAKD,eAAiBwD,GAC7DJ,EAAA,yBACCA,EAAA,gB,CAoCC,aAAAO,CAAcC,GACpBD,EAAc1D,KAAM2D,E,CAId,UAAAC,CAAWC,GACjB,UAAWA,IAAO,UAAYA,IAAO,aAAeA,EAAGd,WAAa,WAAY,CAC/Ee,EAAyB9D,KAAM,MAAO6D,E,EAKjC,YAAAE,CAAaJ,GACnBI,EAAa/D,KAAM2D,E,CAIb,eAAAK,CAAgBL,GACtB3D,KAAK0D,cAAcC,E,CAGb,iBAAAM,GACNjE,KAAK0D,cAAc1D,KAAKiD,QAAUjD,KAAKkE,UACvClE,KAAK4D,WAAW5D,KAAK8C,KACrB9C,KAAK+D,aAAa/D,KAAKyC,M,CAGjB,gBAAA0B,GACN,GAAInE,KAAKH,gBAAkBG,KAAKF,gBAAkBE,KAAKD,eAAgB,CACtE,MAAMqE,EAAsB,IAAIzE,EAA2BK,KAAKH,eAAgBG,KAAKF,eAAgBE,KAAKD,gBAC1G,GAAIC,KAAKwC,MAAMC,MAAO,CACrB2B,EAAoB1D,M"}
1
+ {"version":3,"names":["DetailsAnimationController","constructor","detailsElement","summaryElement","contentElement","this","isClosing","isExpanding","addEventListener","handleSummaryClick","bind","event","preventDefault","style","overflow","open","collapse","height","_a","offsetHeight","window","requestAnimationFrame","expand","animateDetailsHeight","endHeight","direction","startHeight","animation","cancel","animate","duration","matchMedia","matches","easing","onAnimationFinish","once","undefined","removeProperty","defaultStyleCss","KolDetails","catchRef","ref","propagateFocus","host","handleToggle","clearTimeout","toggleTimeout","setTimeout","Boolean","state","_open","_b","tryToDispatchKoliBriEvent","_c","_on","onToggle","_d","_label","render","h","Host","el","_icons","class","element","validateLabel","value","validateOn","on","setState","validateOpen","validateSummary","componentWillLoad","_summary","componentDidLoad","animationController"],"sources":["src/components/details/DetailsAnimationController.ts","src/components/details/style.css?tag=kol-details&mode=default&encapsulation=shadow","src/components/details/component.tsx"],"sourcesContent":["/* Heavily inspired by: https://codepen.io/Mamboleoo/pen/QWEpLqm */\n\nexport default class DetailsAnimationController {\n\tprivate animation?: Animation;\n\tprivate isClosing = false;\n\tprivate isExpanding = false;\n\n\tconstructor(private detailsElement: HTMLDetailsElement, private summaryElement: HTMLElement, private contentElement: HTMLElement) {\n\t\tthis.summaryElement.addEventListener('click', this.handleSummaryClick.bind(this));\n\t}\n\n\tprivate handleSummaryClick(event: MouseEvent) {\n\t\tevent.preventDefault();\n\n\t\tthis.detailsElement.style.overflow = 'hidden';\n\t\tif (this.isClosing || !this.detailsElement.open) {\n\t\t\tthis.open();\n\t\t} else if (this.isExpanding || this.detailsElement.open) {\n\t\t\tthis.collapse();\n\t\t}\n\t}\n\n\tpublic open() {\n\t\t/**\n\t\t * The Jest test framework does not support the `offsetHeight` property on the `details` element.\n\t\t * This is a workaround to make the tests pass (?? 0).\n\t\t */\n\t\tthis.detailsElement.style.height = `${this.detailsElement.offsetHeight ?? 0}px`;\n\t\tthis.detailsElement.open = true;\n\t\twindow.requestAnimationFrame(this.expand.bind(this));\n\t}\n\n\tprivate expand() {\n\t\tthis.isExpanding = true;\n\t\tthis.animateDetailsHeight(this.summaryElement.offsetHeight + this.contentElement.offsetHeight, 'expand');\n\t}\n\n\tprivate collapse() {\n\t\tthis.isClosing = true;\n\t\tthis.animateDetailsHeight(this.summaryElement.offsetHeight, 'collapse');\n\t}\n\n\tprivate animateDetailsHeight(endHeight: number, direction: 'expand' | 'collapse') {\n\t\tconst startHeight = this.detailsElement.offsetHeight;\n\n\t\tif (this.animation) {\n\t\t\tthis.animation.cancel();\n\t\t}\n\n\t\tthis.animation = this.detailsElement.animate(\n\t\t\t{\n\t\t\t\theight: [`${startHeight}px`, `${endHeight}px`],\n\t\t\t},\n\t\t\t{\n\t\t\t\tduration: matchMedia('(prefers-reduced-motion)').matches ? 0 : 250,\n\t\t\t\teasing: 'ease-out',\n\t\t\t}\n\t\t);\n\n\t\tthis.animation.addEventListener(\n\t\t\t'finish',\n\t\t\t() => {\n\t\t\t\tthis.onAnimationFinish();\n\t\t\t},\n\t\t\t{ once: true }\n\t\t);\n\t\tthis.animation.addEventListener(\n\t\t\t'cancel',\n\t\t\t() => {\n\t\t\t\tif (direction === 'expand') {\n\t\t\t\t\tthis.isExpanding = false;\n\t\t\t\t} else {\n\t\t\t\t\tthis.isClosing = false;\n\t\t\t\t}\n\t\t\t},\n\t\t\t{ once: true }\n\t\t);\n\t}\n\n\tprivate onAnimationFinish() {\n\t\tthis.detailsElement.open = this.isExpanding;\n\t\tthis.animation = undefined;\n\t\tthis.isClosing = false;\n\t\tthis.isExpanding = false;\n\t\tthis.detailsElement.style.removeProperty('height');\n\t\tthis.detailsElement.style.removeProperty('overview');\n\t}\n}\n","@import url(../style.css);\n@import url(../host-display-block.css);\ndetails {\n\tdisplay: grid;\n}\ndetails > summary {\n\tcursor: pointer;\n\tdisplay: flex;\n\tplace-items: center;\n}\ndetails > summary > span {\n\tborder-bottom-color: grey;\n\tborder-bottom-style: solid;\n}\ndetails > summary:focus > span,\ndetails > summary:hover > span,\ndetails[open] > summary > span {\n\tborder-bottom-color: #000;\n}\ndetails > kol-indented-text {\n\tmargin: 0.25em 0 0 0.5em;\n}\n","import { Component, Element, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { LabelPropType, validateLabel } from '../../types/props/label';\nimport { validateOpen } from '../../types/props/open';\nimport { tryToDispatchKoliBriEvent } from '../../utils/events';\nimport { setState } from '../../utils/prop.validators';\nimport DetailsAnimationController from './DetailsAnimationController';\nimport { API, EventCallbacks, States } from './types';\nimport { propagateFocus } from '../../utils/reuse';\n\n/**\n * @slot - Der Inhalt, der in der Detailbeschreibung angezeigt wird.\n */\n@Component({\n\ttag: 'kol-details',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolDetails implements API {\n\t@Element() private readonly host?: HTMLKolDetailsElement;\n\tprivate detailsElement?: HTMLDetailsElement;\n\tprivate summaryElement?: HTMLElement;\n\tprivate contentElement?: HTMLElement;\n\n\tprivate readonly catchRef = (ref?: HTMLElement) => {\n\t\tthis.summaryElement = ref;\n\t\tpropagateFocus(this.host, this.summaryElement);\n\t};\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<details\n\t\t\t\t\tref={(el) => {\n\t\t\t\t\t\tthis.detailsElement = el as HTMLDetailsElement;\n\t\t\t\t\t}}\n\t\t\t\t\tonToggle={this.handleToggle}\n\t\t\t\t>\n\t\t\t\t\t<summary ref={this.catchRef}>\n\t\t\t\t\t\t{this.state._open ? <kol-icon _label=\"\" _icons=\"codicon codicon-chevron-down\" /> : <kol-icon _label=\"\" _icons=\"codicon codicon-chevron-right\" />}\n\t\t\t\t\t\t<span>{this.state._label}</span>\n\t\t\t\t\t</summary>\n\t\t\t\t\t<div aria-hidden={this.state._open === false ? 'true' : undefined} class=\"content\" ref={(element) => (this.contentElement = element)}>\n\t\t\t\t\t\t<kol-indented-text>\n\t\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t</kol-indented-text>\n\t\t\t\t\t</div>\n\t\t\t\t</details>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() public _label?: LabelPropType;\n\n\t/**\n\t * Defines the callback functions for details.\n\t */\n\t@Prop() public _on?: EventCallbacks;\n\n\t/**\n\t * If set (to true) opens/expands the element, closes if not set (or set to false).\n\t * @TODO: Change type back to `OpenPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _open?: boolean = false;\n\n\t/**\n\t * Deprecated: Gibt die Zusammenfassung der Detailbeschreibung an.\n\t * @deprecated Use _label.\n\t */\n\t@Prop() public _summary?: string;\n\n\t@State() public state: States = {\n\t\t_label: '…', // '⚠'\n\t\t_on: {},\n\t};\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelPropType): void {\n\t\tvalidateLabel(this, value);\n\t}\n\n\t@Watch('_on')\n\tpublic validateOn(on?: EventCallbacks) {\n\t\tif (typeof on === 'object' && on !== null && typeof on.onToggle === 'function') {\n\t\t\tsetState<EventCallbacks>(this, '_on', on);\n\t\t}\n\t}\n\n\t@Watch('_open')\n\tpublic validateOpen(value?: boolean): void {\n\t\tvalidateOpen(this, value);\n\t}\n\n\t@Watch('_summary')\n\tpublic validateSummary(value?: string): void {\n\t\tthis.validateLabel(value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateLabel(this._label || this._summary);\n\t\tthis.validateOn(this._on);\n\t\tthis.validateOpen(this._open);\n\t}\n\n\tpublic componentDidLoad() {\n\t\tif (this.detailsElement && this.summaryElement && this.contentElement) {\n\t\t\tconst animationController = new DetailsAnimationController(this.detailsElement, this.summaryElement, this.contentElement);\n\t\t\tif (this.state._open) {\n\t\t\t\tanimationController.open();\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate toggleTimeout?: ReturnType<typeof setTimeout>;\n\n\tprivate handleToggle = (event: Event) => {\n\t\tclearTimeout(this.toggleTimeout);\n\t\tthis.toggleTimeout = setTimeout(() => {\n\t\t\tconst open = Boolean(this.detailsElement?.open);\n\t\t\tif (open !== this.state._open) {\n\t\t\t\t// Update state\n\t\t\t\tthis._open = Boolean(this.detailsElement?.open);\n\n\t\t\t\t// Event handling\n\t\t\t\ttryToDispatchKoliBriEvent('toggle', this.host, this._open);\n\n\t\t\t\t// Callback\n\t\t\t\tif (typeof this.state._on?.onToggle === 'function') {\n\t\t\t\t\tthis.state._on?.onToggle(event, this._open);\n\t\t\t\t}\n\t\t\t}\n\t\t}, 25);\n\t};\n}\n"],"mappings":";;;kXAEqBA,EAKpB,WAAAC,CAAoBC,EAA4CC,EAAqCC,GAAjFC,KAAAH,iBAA4CG,KAAAF,iBAAqCE,KAAAD,iBAH7FC,KAAAC,UAAY,MACZD,KAAAE,YAAc,MAGrBF,KAAKF,eAAeK,iBAAiB,QAASH,KAAKI,mBAAmBC,KAAKL,M,CAGpE,kBAAAI,CAAmBE,GAC1BA,EAAMC,iBAENP,KAAKH,eAAeW,MAAMC,SAAW,SACrC,GAAIT,KAAKC,YAAcD,KAAKH,eAAea,KAAM,CAChDV,KAAKU,M,MACC,GAAIV,KAAKE,aAAeF,KAAKH,eAAea,KAAM,CACxDV,KAAKW,U,EAIA,IAAAD,G,MAKNV,KAAKH,eAAeW,MAAMI,OAAS,IAAGC,EAAAb,KAAKH,eAAeiB,gBAAY,MAAAD,SAAA,EAAAA,EAAI,MAC1Eb,KAAKH,eAAea,KAAO,KAC3BK,OAAOC,sBAAsBhB,KAAKiB,OAAOZ,KAAKL,M,CAGvC,MAAAiB,GACPjB,KAAKE,YAAc,KACnBF,KAAKkB,qBAAqBlB,KAAKF,eAAegB,aAAed,KAAKD,eAAee,aAAc,S,CAGxF,QAAAH,GACPX,KAAKC,UAAY,KACjBD,KAAKkB,qBAAqBlB,KAAKF,eAAegB,aAAc,W,CAGrD,oBAAAI,CAAqBC,EAAmBC,GAC/C,MAAMC,EAAcrB,KAAKH,eAAeiB,aAExC,GAAId,KAAKsB,UAAW,CACnBtB,KAAKsB,UAAUC,Q,CAGhBvB,KAAKsB,UAAYtB,KAAKH,eAAe2B,QACpC,CACCZ,OAAQ,CAAC,GAAGS,MAAiB,GAAGF,QAEjC,CACCM,SAAUC,WAAW,4BAA4BC,QAAU,EAAI,IAC/DC,OAAQ,aAIV5B,KAAKsB,UAAUnB,iBACd,UACA,KACCH,KAAK6B,mBAAmB,GAEzB,CAAEC,KAAM,OAET9B,KAAKsB,UAAUnB,iBACd,UACA,KACC,GAAIiB,IAAc,SAAU,CAC3BpB,KAAKE,YAAc,K,KACb,CACNF,KAAKC,UAAY,K,IAGnB,CAAE6B,KAAM,M,CAIF,iBAAAD,GACP7B,KAAKH,eAAea,KAAOV,KAAKE,YAChCF,KAAKsB,UAAYS,UACjB/B,KAAKC,UAAY,MACjBD,KAAKE,YAAc,MACnBF,KAAKH,eAAeW,MAAMwB,eAAe,UACzChC,KAAKH,eAAeW,MAAMwB,eAAe,W,ECrF3C,MAAMC,EAAkB,uhC,MCoBXC,EAAU,M,yBAMLlC,KAAAmC,SAAYC,IAC5BpC,KAAKF,eAAiBsC,EACtBC,EAAerC,KAAKsC,KAAMtC,KAAKF,eAAe,EA4FvCE,KAAAuC,aAAgBjC,IACvBkC,aAAaxC,KAAKyC,eAClBzC,KAAKyC,cAAgBC,YAAW,K,YAC/B,MAAMhC,EAAOiC,SAAQ9B,EAAAb,KAAKH,kBAAc,MAAAgB,SAAA,SAAAA,EAAEH,MAC1C,GAAIA,IAASV,KAAK4C,MAAMC,MAAO,CAE9B7C,KAAK6C,MAAQF,SAAQG,EAAA9C,KAAKH,kBAAc,MAAAiD,SAAA,SAAAA,EAAEpC,MAG1CqC,EAA0B,SAAU/C,KAAKsC,KAAMtC,KAAK6C,OAGpD,WAAWG,EAAAhD,KAAK4C,MAAMK,OAAG,MAAAD,SAAA,SAAAA,EAAEE,YAAa,WAAY,EACnDC,EAAAnD,KAAK4C,MAAMK,OAAG,MAAAE,SAAA,SAAAA,EAAED,SAAS5C,EAAON,KAAK6C,M,KAGrC,GAAG,E,oDApE0D,M,mCAQjC,CAC/BO,OAAQ,IACRH,IAAK,G,CA/CC,MAAAI,GACN,OACCC,EAACC,EAAI,KACJD,EAAA,WACClB,IAAMoB,IACLxD,KAAKH,eAAiB2D,CAAwB,EAE/CN,SAAUlD,KAAKuC,cAEfe,EAAA,WAASlB,IAAKpC,KAAKmC,UACjBnC,KAAK4C,MAAMC,MAAQS,EAAA,YAAUF,OAAO,GAAGK,OAAO,iCAAoCH,EAAA,YAAUF,OAAO,GAAGK,OAAO,kCAC9GH,EAAA,YAAOtD,KAAK4C,MAAMQ,SAEnBE,EAAA,qBAAkBtD,KAAK4C,MAAMC,QAAU,MAAQ,OAASd,UAAW2B,MAAM,UAAUtB,IAAMuB,GAAa3D,KAAKD,eAAiB4D,GAC3HL,EAAA,yBACCA,EAAA,gB,CAoCC,aAAAM,CAAcC,GACpBD,EAAc5D,KAAM6D,E,CAId,UAAAC,CAAWC,GACjB,UAAWA,IAAO,UAAYA,IAAO,aAAeA,EAAGb,WAAa,WAAY,CAC/Ec,EAAyBhE,KAAM,MAAO+D,E,EAKjC,YAAAE,CAAaJ,GACnBI,EAAajE,KAAM6D,E,CAIb,eAAAK,CAAgBL,GACtB7D,KAAK4D,cAAcC,E,CAGb,iBAAAM,GACNnE,KAAK4D,cAAc5D,KAAKoD,QAAUpD,KAAKoE,UACvCpE,KAAK8D,WAAW9D,KAAKiD,KACrBjD,KAAKiE,aAAajE,KAAK6C,M,CAGjB,gBAAAwB,GACN,GAAIrE,KAAKH,gBAAkBG,KAAKF,gBAAkBE,KAAKD,eAAgB,CACtE,MAAMuE,EAAsB,IAAI3E,EAA2BK,KAAKH,eAAgBG,KAAKF,eAAgBE,KAAKD,gBAC1G,GAAIC,KAAK4C,MAAMC,MAAO,CACrByB,EAAoB5D,M"}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as t,h as i}from"./index-536799d5.js";import{a as e}from"./i18n-604b0def.js";import{a as o,d as s}from"./prop.validators-a681ba79.js";import"./index-23225963.js";import"./index-3822b0c5.js";import"./a11y.tipps-d4474fb4.js";import"./dev.utils-6644fc40.js";import"./reuse-b3566e4c.js";const r=class{constructor(e){t(this,e),this.onSubmit=t=>{var e,i;t.preventDefault(),t.stopPropagation(),"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e.onSubmit)&&(null===(i=this.state._on)||void 0===i||i.onSubmit(t))},this.onReset=t=>{var e,i;t.preventDefault(),t.stopPropagation(),"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e.onReset)&&(null===(i=this.state._on)||void 0===i||i.onReset(t))},this._on=void 0,this._requiredText=!0,this.state={}}render(){return i("form",{method:"post",onSubmit:this.onSubmit,onReset:this.onReset,autoComplete:"off",noValidate:!0},!0===this.state._requiredText?i("p",null,i("kol-indented-text",null,e("kol-form-description"))):"string"==typeof this.state._requiredText&&this.state._requiredText.length>0?i("p",null,i("kol-indented-text",null,this.state._requiredText)):null,i("slot",null))}validateOn(t){"object"==typeof t&&null!==t&&(this.state=Object.assign(Object.assign({},this.state),{_on:t}))}validateRequiredText(t){"boolean"==typeof t?o(this,"_requiredText",t):s(this,"_requiredText",t)}componentWillLoad(){this.validateOn(this._on),this.validateRequiredText(this._requiredText)}static get watchers(){return{_on:["validateOn"],_requiredText:["validateRequiredText"]}}};export{r as kol_form};
4
+ import{r as t,h as i}from"./index-536799d5.js";import{a as e}from"./i18n-ad401ed8.js";import{a as o,d as s}from"./prop.validators-251589c8.js";import"./index-23225963.js";import"./index-3822b0c5.js";import"./a11y.tipps-54065212.js";import"./dev.utils-ad367f40.js";import"./reuse-b3566e4c.js";const r=class{constructor(e){t(this,e),this.onSubmit=t=>{var e,i;t.preventDefault(),t.stopPropagation(),"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e.onSubmit)&&(null===(i=this.state._on)||void 0===i||i.onSubmit(t))},this.onReset=t=>{var e,i;t.preventDefault(),t.stopPropagation(),"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e.onReset)&&(null===(i=this.state._on)||void 0===i||i.onReset(t))},this._on=void 0,this._requiredText=!0,this.state={}}render(){return i("form",{method:"post",onSubmit:this.onSubmit,onReset:this.onReset,autoComplete:"off",noValidate:!0},!0===this.state._requiredText?i("p",null,i("kol-indented-text",null,e("kol-form-description"))):"string"==typeof this.state._requiredText&&this.state._requiredText.length>0?i("p",null,i("kol-indented-text",null,this.state._requiredText)):null,i("slot",null))}validateOn(t){"object"==typeof t&&null!==t&&(this.state=Object.assign(Object.assign({},this.state),{_on:t}))}validateRequiredText(t){"boolean"==typeof t?o(this,"_requiredText",t):s(this,"_requiredText",t)}componentWillLoad(){this.validateOn(this._on),this.validateRequiredText(this._requiredText)}static get watchers(){return{_on:["validateOn"],_requiredText:["validateRequiredText"]}}};export{r as kol_form};