@public-ui/components 2.0.0-rc.5 → 2.0.0-rc.6

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 (567) hide show
  1. package/custom-elements.json +9 -9
  2. package/dist/cjs/InternalUnderlinedAccessKey-2c4875d5.js +4 -0
  3. package/dist/cjs/InternalUnderlinedAccessKey-2c4875d5.js.map +1 -0
  4. package/dist/cjs/{a11y.tipps-77b0a8d4.js → a11y.tipps-91e6a303.js} +1 -1
  5. package/dist/cjs/{a11y.tipps-77b0a8d4.js.map → a11y.tipps-91e6a303.js.map} +1 -1
  6. package/dist/cjs/access-key-5fe7eedb.js +4 -0
  7. package/dist/cjs/{access-key-2ceab9f7.js.map → access-key-5fe7eedb.js.map} +1 -1
  8. package/dist/cjs/alignment-86e87aca.js +4 -0
  9. package/dist/cjs/alignment-86e87aca.js.map +1 -0
  10. package/dist/cjs/alternative-button-link-role-d99da0f8.js +4 -0
  11. package/dist/cjs/{alternative-button-link-role-c58c7827.js.map → alternative-button-link-role-d99da0f8.js.map} +1 -1
  12. package/dist/cjs/{app-globals-ca64d372.js → app-globals-ac58ae8f.js} +1 -1
  13. package/dist/cjs/{app-globals-ca64d372.js.map → app-globals-ac58ae8f.js.map} +1 -1
  14. package/dist/cjs/{associated.controller-85751e83.js → associated.controller-2d107864.js} +1 -1
  15. package/dist/cjs/{associated.controller-85751e83.js.map → associated.controller-2d107864.js.map} +1 -1
  16. package/dist/cjs/{color-e02665e5.js → color-03e36edf.js} +1 -1
  17. package/dist/cjs/{color-e02665e5.js.map → color-03e36edf.js.map} +1 -1
  18. package/dist/cjs/controller-120e1333.js +4 -0
  19. package/dist/cjs/controller-120e1333.js.map +1 -0
  20. package/dist/cjs/{controller-6d68afbb.js → controller-19b94b08.js} +1 -1
  21. package/dist/cjs/{controller-6d68afbb.js.map → controller-19b94b08.js.map} +1 -1
  22. package/dist/cjs/{controller-9741c9b8.js → controller-56885ef0.js} +1 -1
  23. package/dist/cjs/{controller-9741c9b8.js.map → controller-56885ef0.js.map} +1 -1
  24. package/dist/cjs/controller-c15b473b.js +4 -0
  25. package/dist/cjs/controller-c15b473b.js.map +1 -0
  26. package/dist/cjs/{controller-9200ad99.js → controller-ee271465.js} +1 -1
  27. package/dist/cjs/{controller-9200ad99.js.map → controller-ee271465.js.map} +1 -1
  28. package/dist/cjs/{controller-icon-0d2e0d52.js → controller-icon-f7b60716.js} +1 -1
  29. package/dist/cjs/{controller-icon-0d2e0d52.js.map → controller-icon-f7b60716.js.map} +1 -1
  30. package/dist/cjs/custom-class-ed101b87.js +4 -0
  31. package/dist/cjs/{custom-class-f9abd989.js.map → custom-class-ed101b87.js.map} +1 -1
  32. package/dist/cjs/{dev.utils-a85de35e.js → dev.utils-5f0c3b7d.js} +1 -1
  33. package/dist/cjs/{dev.utils-a85de35e.js.map → dev.utils-5f0c3b7d.js.map} +1 -1
  34. package/dist/cjs/{devtools-64a64a83.js → devtools-26e86ead.js} +1 -1
  35. package/dist/cjs/{devtools-64a64a83.js.map → devtools-26e86ead.js.map} +1 -1
  36. package/dist/cjs/has-closer-0140b049.js +4 -0
  37. package/dist/cjs/{has-closer-2fabbe8f.js.map → has-closer-0140b049.js.map} +1 -1
  38. package/dist/cjs/hide-label-72171d2b.js +4 -0
  39. package/dist/cjs/{hide-label-e41f7adc.js.map → hide-label-72171d2b.js.map} +1 -1
  40. package/dist/cjs/{i18n-150d7426.js → i18n-42767646.js} +1 -1
  41. package/dist/cjs/{i18n-150d7426.js.map → i18n-42767646.js.map} +1 -1
  42. package/dist/cjs/{icons-2820d463.js → icons-6be116f2.js} +1 -1
  43. package/dist/cjs/{icons-2820d463.js.map → icons-6be116f2.js.map} +1 -1
  44. package/dist/cjs/image-source-f283f0ea.js +4 -0
  45. package/dist/cjs/{image-source-b26f9674.js.map → image-source-f283f0ea.js.map} +1 -1
  46. package/dist/cjs/{index-272b32ae.js → index-d12ab3a8.js} +1 -1
  47. package/dist/cjs/{index-272b32ae.js.map → index-d12ab3a8.js.map} +1 -1
  48. package/dist/cjs/index.cjs.js +1 -1
  49. package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
  50. package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
  51. package/dist/cjs/kol-alert-wc_2.cjs.entry.js +1 -1
  52. package/dist/cjs/kol-alert-wc_2.cjs.entry.js.map +1 -1
  53. package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
  54. package/dist/cjs/kol-badge.cjs.entry.js +1 -1
  55. package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
  56. package/dist/cjs/kol-breadcrumb.cjs.entry.js.map +1 -1
  57. package/dist/cjs/kol-button-wc_2.cjs.entry.js +1 -1
  58. package/dist/cjs/kol-button-wc_2.cjs.entry.js.map +1 -1
  59. package/dist/cjs/kol-button.cjs.entry.js +1 -1
  60. package/dist/cjs/kol-button.cjs.entry.js.map +1 -1
  61. package/dist/cjs/kol-card.cjs.entry.js +1 -1
  62. package/dist/cjs/kol-details.cjs.entry.js +1 -1
  63. package/dist/cjs/kol-form.cjs.entry.js +1 -1
  64. package/dist/cjs/kol-icon.cjs.entry.js +1 -1
  65. package/dist/cjs/kol-image.cjs.entry.js +1 -1
  66. package/dist/cjs/kol-image.cjs.entry.js.map +1 -1
  67. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  68. package/dist/cjs/kol-input-checkbox.cjs.entry.js.map +1 -1
  69. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  70. package/dist/cjs/kol-input-color.cjs.entry.js.map +1 -1
  71. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  72. package/dist/cjs/kol-input-date.cjs.entry.js.map +1 -1
  73. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  74. package/dist/cjs/kol-input-email.cjs.entry.js.map +1 -1
  75. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  76. package/dist/cjs/kol-input-file.cjs.entry.js.map +1 -1
  77. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  78. package/dist/cjs/kol-input-number.cjs.entry.js.map +1 -1
  79. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  80. package/dist/cjs/kol-input-password.cjs.entry.js.map +1 -1
  81. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  82. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  83. package/dist/cjs/kol-input-range.cjs.entry.js.map +1 -1
  84. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  85. package/dist/cjs/kol-input-text.cjs.entry.js.map +1 -1
  86. package/dist/cjs/kol-input.cjs.entry.js +1 -1
  87. package/dist/cjs/kol-input.cjs.entry.js.map +1 -1
  88. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  89. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  90. package/dist/cjs/kol-link-button.cjs.entry.js.map +1 -1
  91. package/dist/cjs/kol-link-group.cjs.entry.js +1 -1
  92. package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
  93. package/dist/cjs/kol-link-wc.cjs.entry.js.map +1 -1
  94. package/dist/cjs/kol-logo.cjs.entry.js +1 -1
  95. package/dist/cjs/kol-modal.cjs.entry.js +1 -1
  96. package/dist/cjs/kol-nav.cjs.entry.js +1 -1
  97. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  98. package/dist/cjs/kol-popover.cjs.entry.js +1 -1
  99. package/dist/cjs/kol-popover.cjs.entry.js.map +1 -1
  100. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  101. package/dist/cjs/kol-quote.cjs.entry.js +1 -1
  102. package/dist/cjs/kol-quote.cjs.entry.js.map +1 -1
  103. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  104. package/dist/cjs/kol-select.cjs.entry.js.map +1 -1
  105. package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
  106. package/dist/cjs/kol-span-wc.cjs.entry.js +1 -1
  107. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  108. package/dist/cjs/kol-spin.cjs.entry.js.map +1 -1
  109. package/dist/cjs/kol-symbol.cjs.entry.js +1 -1
  110. package/dist/cjs/kol-table.cjs.entry.js +1 -1
  111. package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
  112. package/dist/cjs/kol-tabs.cjs.entry.js.map +1 -1
  113. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  114. package/dist/cjs/kol-textarea.cjs.entry.js.map +1 -1
  115. package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
  116. package/dist/cjs/kol-toast-container.cjs.entry.js.map +1 -1
  117. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  118. package/dist/cjs/kolibri.cjs.js +1 -1
  119. package/dist/cjs/{label-315ec543.js → label-f1bb026a.js} +1 -1
  120. package/dist/cjs/{label-315ec543.js.map → label-f1bb026a.js.map} +1 -1
  121. package/dist/cjs/loader.cjs.js +1 -1
  122. package/dist/cjs/open-b82318b2.js +4 -0
  123. package/dist/cjs/{open-7e8c43ab.js.map → open-b82318b2.js.map} +1 -1
  124. package/dist/cjs/{prop.validators-c86b27ff.js → prop.validators-d0c36c3f.js} +1 -1
  125. package/dist/cjs/{prop.validators-c86b27ff.js.map → prop.validators-d0c36c3f.js.map} +1 -1
  126. package/dist/cjs/rows-3afa56f3.js +4 -0
  127. package/dist/cjs/{rows-301f03c8.js.map → rows-3afa56f3.js.map} +1 -1
  128. package/dist/cjs/show-9104c9b1.js +4 -0
  129. package/dist/cjs/{show-fbb0fc54.js.map → show-9104c9b1.js.map} +1 -1
  130. package/dist/cjs/{suggestions-d77f8620.js → suggestions-f2df9189.js} +1 -1
  131. package/dist/cjs/{suggestions-d77f8620.js.map → suggestions-f2df9189.js.map} +1 -1
  132. package/dist/cjs/{tab-index-e35454b7.js → tab-index-bcdca21e.js} +1 -1
  133. package/dist/cjs/{tab-index-e35454b7.js.map → tab-index-bcdca21e.js.map} +1 -1
  134. package/dist/cjs/{tooltip-align-b8dcb0c3.js → tooltip-align-0e5ab85b.js} +1 -1
  135. package/dist/cjs/{tooltip-align-b8dcb0c3.js.map → tooltip-align-0e5ab85b.js.map} +1 -1
  136. package/dist/cjs/{validation-e42178df.js → validation-5e914a29.js} +1 -1
  137. package/dist/cjs/{validation-e42178df.js.map → validation-5e914a29.js.map} +1 -1
  138. package/dist/cjs/validation-c699f0e1.js +4 -0
  139. package/dist/cjs/validation-c699f0e1.js.map +1 -0
  140. package/dist/components/component13.js.map +1 -1
  141. package/dist/components/component15.js +1 -1
  142. package/dist/components/component15.js.map +1 -1
  143. package/dist/components/component2.js +1 -1
  144. package/dist/components/component2.js.map +1 -1
  145. package/dist/components/component3.js +1 -1
  146. package/dist/components/component4.js +1 -1
  147. package/dist/components/component4.js.map +1 -1
  148. package/dist/components/component5.js +1 -1
  149. package/dist/components/component5.js.map +1 -1
  150. package/dist/components/component6.js +1 -1
  151. package/dist/components/component6.js.map +1 -1
  152. package/dist/components/component9.js +1 -1
  153. package/dist/components/component9.js.map +1 -1
  154. package/dist/components/controller2.js +1 -1
  155. package/dist/components/controller2.js.map +1 -1
  156. package/dist/components/controller3.js +1 -1
  157. package/dist/components/controller3.js.map +1 -1
  158. package/dist/components/floating-ui.dom.esm.js +4 -0
  159. package/dist/components/floating-ui.dom.esm.js.map +1 -0
  160. package/dist/components/kol-breadcrumb.js.map +1 -1
  161. package/dist/components/kol-image.js +1 -1
  162. package/dist/components/kol-image.js.map +1 -1
  163. package/dist/components/kol-input-checkbox.js +1 -1
  164. package/dist/components/kol-input-checkbox.js.map +1 -1
  165. package/dist/components/kol-input-color.js +1 -1
  166. package/dist/components/kol-input-color.js.map +1 -1
  167. package/dist/components/kol-input-date.js +1 -1
  168. package/dist/components/kol-input-date.js.map +1 -1
  169. package/dist/components/kol-input-email.js +1 -1
  170. package/dist/components/kol-input-email.js.map +1 -1
  171. package/dist/components/kol-input-file.js +1 -1
  172. package/dist/components/kol-input-file.js.map +1 -1
  173. package/dist/components/kol-input-number.js +1 -1
  174. package/dist/components/kol-input-number.js.map +1 -1
  175. package/dist/components/kol-input-password.js +1 -1
  176. package/dist/components/kol-input-password.js.map +1 -1
  177. package/dist/components/kol-input-range.js +1 -1
  178. package/dist/components/kol-input-range.js.map +1 -1
  179. package/dist/components/kol-input-text.js +1 -1
  180. package/dist/components/kol-input-text.js.map +1 -1
  181. package/dist/components/kol-link-button.js +1 -1
  182. package/dist/components/kol-link-button.js.map +1 -1
  183. package/dist/components/kol-popover.js +1 -1
  184. package/dist/components/kol-quote.js +1 -1
  185. package/dist/components/kol-quote.js.map +1 -1
  186. package/dist/components/kol-spin.js +1 -1
  187. package/dist/components/kol-spin.js.map +1 -1
  188. package/dist/components/kol-tabs.js +1 -1
  189. package/dist/components/kol-textarea.js +1 -1
  190. package/dist/components/kol-textarea.js.map +1 -1
  191. package/dist/components/kol-toast-container.js.map +1 -1
  192. package/dist/components/prop.validators.js +1 -1
  193. package/dist/components/prop.validators.js.map +1 -1
  194. package/dist/components/shadow3.js +1 -1
  195. package/dist/components/shadow3.js.map +1 -1
  196. package/dist/components/tooltip-align.js +1 -1
  197. package/dist/esm/InternalUnderlinedAccessKey-f593c389.js +4 -0
  198. package/dist/esm/InternalUnderlinedAccessKey-f593c389.js.map +1 -0
  199. package/dist/esm/{a11y.tipps-ba8ae150.js → a11y.tipps-06cd7c77.js} +1 -1
  200. package/dist/esm/{a11y.tipps-ba8ae150.js.map → a11y.tipps-06cd7c77.js.map} +1 -1
  201. package/dist/esm/access-key-d58c03d6.js +4 -0
  202. package/dist/esm/{access-key-292dd663.js.map → access-key-d58c03d6.js.map} +1 -1
  203. package/dist/esm/alignment-de1c6559.js +4 -0
  204. package/dist/esm/alignment-de1c6559.js.map +1 -0
  205. package/dist/esm/alternative-button-link-role-8db83e93.js +4 -0
  206. package/dist/esm/{alternative-button-link-role-b421e482.js.map → alternative-button-link-role-8db83e93.js.map} +1 -1
  207. package/dist/esm/{app-globals-68db9e00.js → app-globals-77b2422c.js} +1 -1
  208. package/dist/esm/{app-globals-68db9e00.js.map → app-globals-77b2422c.js.map} +1 -1
  209. package/dist/esm/{associated.controller-687b47db.js → associated.controller-1124284d.js} +1 -1
  210. package/dist/esm/{associated.controller-687b47db.js.map → associated.controller-1124284d.js.map} +1 -1
  211. package/dist/esm/{color-8ca70766.js → color-84b42735.js} +1 -1
  212. package/dist/esm/{color-8ca70766.js.map → color-84b42735.js.map} +1 -1
  213. package/dist/esm/{controller-f653144a.js → controller-5a0cb886.js} +1 -1
  214. package/dist/esm/{controller-f653144a.js.map → controller-5a0cb886.js.map} +1 -1
  215. package/dist/esm/{controller-873fca4f.js → controller-6a175634.js} +1 -1
  216. package/dist/esm/{controller-873fca4f.js.map → controller-6a175634.js.map} +1 -1
  217. package/dist/esm/{controller-a0c1c4ea.js → controller-7e5c82c1.js} +1 -1
  218. package/dist/esm/{controller-a0c1c4ea.js.map → controller-7e5c82c1.js.map} +1 -1
  219. package/dist/esm/controller-98501396.js +4 -0
  220. package/dist/esm/controller-98501396.js.map +1 -0
  221. package/dist/esm/controller-f38fc4fc.js +4 -0
  222. package/dist/esm/controller-f38fc4fc.js.map +1 -0
  223. package/dist/esm/{controller-icon-92fc87b9.js → controller-icon-ffe0af69.js} +1 -1
  224. package/dist/esm/{controller-icon-92fc87b9.js.map → controller-icon-ffe0af69.js.map} +1 -1
  225. package/dist/esm/custom-class-6ba43df0.js +4 -0
  226. package/dist/esm/{custom-class-ea9a981b.js.map → custom-class-6ba43df0.js.map} +1 -1
  227. package/dist/esm/{dev.utils-a31cf0e4.js → dev.utils-075f4e7b.js} +1 -1
  228. package/dist/esm/{dev.utils-a31cf0e4.js.map → dev.utils-075f4e7b.js.map} +1 -1
  229. package/dist/esm/{devtools-f3838564.js → devtools-d3472315.js} +1 -1
  230. package/dist/esm/{devtools-f3838564.js.map → devtools-d3472315.js.map} +1 -1
  231. package/dist/esm/{has-closer-f31506e6.js → has-closer-d28fec0f.js} +1 -1
  232. package/dist/esm/{has-closer-f31506e6.js.map → has-closer-d28fec0f.js.map} +1 -1
  233. package/dist/esm/{hide-label-eb1f7b60.js → hide-label-3381f0cc.js} +1 -1
  234. package/dist/esm/{hide-label-eb1f7b60.js.map → hide-label-3381f0cc.js.map} +1 -1
  235. package/dist/esm/{i18n-9f9f551f.js → i18n-8ec5b30e.js} +1 -1
  236. package/dist/esm/{i18n-9f9f551f.js.map → i18n-8ec5b30e.js.map} +1 -1
  237. package/dist/esm/{icons-4c438164.js → icons-062ba29d.js} +1 -1
  238. package/dist/esm/{icons-4c438164.js.map → icons-062ba29d.js.map} +1 -1
  239. package/dist/esm/{image-source-d36f06a0.js → image-source-ceb96521.js} +1 -1
  240. package/dist/esm/{image-source-d36f06a0.js.map → image-source-ceb96521.js.map} +1 -1
  241. package/dist/esm/{index-f8836493.js → index-b79e4012.js} +1 -1
  242. package/dist/esm/{index-f8836493.js.map → index-b79e4012.js.map} +1 -1
  243. package/dist/esm/index.js +1 -1
  244. package/dist/esm/kol-abbr.entry.js +1 -1
  245. package/dist/esm/kol-accordion.entry.js +1 -1
  246. package/dist/esm/kol-alert-wc_2.entry.js +1 -1
  247. package/dist/esm/kol-alert-wc_2.entry.js.map +1 -1
  248. package/dist/esm/kol-avatar-wc.entry.js +1 -1
  249. package/dist/esm/kol-badge.entry.js +1 -1
  250. package/dist/esm/kol-breadcrumb.entry.js +1 -1
  251. package/dist/esm/kol-breadcrumb.entry.js.map +1 -1
  252. package/dist/esm/kol-button-wc_2.entry.js +1 -1
  253. package/dist/esm/kol-button-wc_2.entry.js.map +1 -1
  254. package/dist/esm/kol-button.entry.js +1 -1
  255. package/dist/esm/kol-button.entry.js.map +1 -1
  256. package/dist/esm/kol-card.entry.js +1 -1
  257. package/dist/esm/kol-details.entry.js +1 -1
  258. package/dist/esm/kol-form.entry.js +1 -1
  259. package/dist/esm/kol-icon.entry.js +1 -1
  260. package/dist/esm/kol-image.entry.js +1 -1
  261. package/dist/esm/kol-image.entry.js.map +1 -1
  262. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  263. package/dist/esm/kol-input-checkbox.entry.js.map +1 -1
  264. package/dist/esm/kol-input-color.entry.js +1 -1
  265. package/dist/esm/kol-input-color.entry.js.map +1 -1
  266. package/dist/esm/kol-input-date.entry.js +1 -1
  267. package/dist/esm/kol-input-date.entry.js.map +1 -1
  268. package/dist/esm/kol-input-email.entry.js +1 -1
  269. package/dist/esm/kol-input-email.entry.js.map +1 -1
  270. package/dist/esm/kol-input-file.entry.js +1 -1
  271. package/dist/esm/kol-input-file.entry.js.map +1 -1
  272. package/dist/esm/kol-input-number.entry.js +1 -1
  273. package/dist/esm/kol-input-number.entry.js.map +1 -1
  274. package/dist/esm/kol-input-password.entry.js +1 -1
  275. package/dist/esm/kol-input-password.entry.js.map +1 -1
  276. package/dist/esm/kol-input-radio.entry.js +1 -1
  277. package/dist/esm/kol-input-range.entry.js +1 -1
  278. package/dist/esm/kol-input-range.entry.js.map +1 -1
  279. package/dist/esm/kol-input-text.entry.js +1 -1
  280. package/dist/esm/kol-input-text.entry.js.map +1 -1
  281. package/dist/esm/kol-input.entry.js +1 -1
  282. package/dist/esm/kol-input.entry.js.map +1 -1
  283. package/dist/esm/kol-kolibri.entry.js +1 -1
  284. package/dist/esm/kol-link-button.entry.js +1 -1
  285. package/dist/esm/kol-link-button.entry.js.map +1 -1
  286. package/dist/esm/kol-link-group.entry.js +1 -1
  287. package/dist/esm/kol-link-wc.entry.js +1 -1
  288. package/dist/esm/kol-link-wc.entry.js.map +1 -1
  289. package/dist/esm/kol-logo.entry.js +1 -1
  290. package/dist/esm/kol-modal.entry.js +1 -1
  291. package/dist/esm/kol-nav.entry.js +1 -1
  292. package/dist/esm/kol-pagination.entry.js +1 -1
  293. package/dist/esm/kol-popover.entry.js +1 -1
  294. package/dist/esm/kol-popover.entry.js.map +1 -1
  295. package/dist/esm/kol-progress.entry.js +1 -1
  296. package/dist/esm/kol-quote.entry.js +1 -1
  297. package/dist/esm/kol-quote.entry.js.map +1 -1
  298. package/dist/esm/kol-select.entry.js +1 -1
  299. package/dist/esm/kol-select.entry.js.map +1 -1
  300. package/dist/esm/kol-skip-nav.entry.js +1 -1
  301. package/dist/esm/kol-span-wc.entry.js +1 -1
  302. package/dist/esm/kol-spin.entry.js +1 -1
  303. package/dist/esm/kol-spin.entry.js.map +1 -1
  304. package/dist/esm/kol-symbol.entry.js +1 -1
  305. package/dist/esm/kol-table.entry.js +1 -1
  306. package/dist/esm/kol-tabs.entry.js +1 -1
  307. package/dist/esm/kol-tabs.entry.js.map +1 -1
  308. package/dist/esm/kol-textarea.entry.js +1 -1
  309. package/dist/esm/kol-textarea.entry.js.map +1 -1
  310. package/dist/esm/kol-toast-container.entry.js +1 -1
  311. package/dist/esm/kol-toast-container.entry.js.map +1 -1
  312. package/dist/esm/kol-version.entry.js +1 -1
  313. package/dist/esm/kolibri.js +1 -1
  314. package/dist/esm/{label-3e545772.js → label-5c173d60.js} +1 -1
  315. package/dist/esm/{label-3e545772.js.map → label-5c173d60.js.map} +1 -1
  316. package/dist/esm/loader.js +1 -1
  317. package/dist/esm/{open-1e2010f2.js → open-47384c18.js} +1 -1
  318. package/dist/esm/{open-1e2010f2.js.map → open-47384c18.js.map} +1 -1
  319. package/dist/esm/{prop.validators-6cc65427.js → prop.validators-3d53ddab.js} +1 -1
  320. package/dist/esm/{prop.validators-6cc65427.js.map → prop.validators-3d53ddab.js.map} +1 -1
  321. package/dist/esm/{rows-7108779c.js → rows-1eebe49e.js} +1 -1
  322. package/dist/esm/{rows-7108779c.js.map → rows-1eebe49e.js.map} +1 -1
  323. package/dist/esm/{show-469f0d1b.js → show-3e682c46.js} +1 -1
  324. package/dist/esm/{show-469f0d1b.js.map → show-3e682c46.js.map} +1 -1
  325. package/dist/esm/{suggestions-25890d93.js → suggestions-04f64716.js} +1 -1
  326. package/dist/esm/{suggestions-25890d93.js.map → suggestions-04f64716.js.map} +1 -1
  327. package/dist/esm/{tab-index-8864ef5e.js → tab-index-d2d0d9db.js} +1 -1
  328. package/dist/esm/{tab-index-8864ef5e.js.map → tab-index-d2d0d9db.js.map} +1 -1
  329. package/dist/esm/{tooltip-align-82ca015a.js → tooltip-align-c09e55cd.js} +1 -1
  330. package/dist/esm/{tooltip-align-82ca015a.js.map → tooltip-align-c09e55cd.js.map} +1 -1
  331. package/dist/esm/validation-68e14b6f.js +4 -0
  332. package/dist/esm/{validation-a3a1a09e.js.map → validation-68e14b6f.js.map} +1 -1
  333. package/dist/esm/validation-c57e7be5.js +4 -0
  334. package/dist/esm/validation-c57e7be5.js.map +1 -0
  335. package/dist/kolibri/InternalUnderlinedAccessKey-f593c389.js +4 -0
  336. package/dist/kolibri/InternalUnderlinedAccessKey-f593c389.js.map +1 -0
  337. package/dist/kolibri/{a11y.tipps-ba8ae150.js → a11y.tipps-06cd7c77.js} +1 -1
  338. package/dist/kolibri/access-key-d58c03d6.js +4 -0
  339. package/dist/kolibri/alignment-de1c6559.js +4 -0
  340. package/dist/kolibri/alignment-de1c6559.js.map +1 -0
  341. package/dist/kolibri/alternative-button-link-role-8db83e93.js +4 -0
  342. package/dist/kolibri/app-globals-77b2422c.js +4 -0
  343. package/dist/kolibri/{associated.controller-687b47db.js → associated.controller-1124284d.js} +1 -1
  344. package/dist/kolibri/{color-8ca70766.js → color-84b42735.js} +1 -1
  345. package/dist/kolibri/{controller-f653144a.js → controller-5a0cb886.js} +1 -1
  346. package/dist/kolibri/controller-6a175634.js +4 -0
  347. package/dist/kolibri/{controller-a0c1c4ea.js → controller-7e5c82c1.js} +1 -1
  348. package/dist/kolibri/controller-98501396.js +4 -0
  349. package/dist/kolibri/controller-98501396.js.map +1 -0
  350. package/dist/kolibri/controller-f38fc4fc.js +4 -0
  351. package/dist/kolibri/controller-f38fc4fc.js.map +1 -0
  352. package/dist/kolibri/controller-icon-ffe0af69.js +4 -0
  353. package/dist/kolibri/custom-class-6ba43df0.js +4 -0
  354. package/dist/kolibri/{dev.utils-a31cf0e4.js → dev.utils-075f4e7b.js} +1 -1
  355. package/dist/kolibri/{dev.utils-a31cf0e4.js.map → dev.utils-075f4e7b.js.map} +1 -1
  356. package/dist/kolibri/{devtools-f3838564.js → devtools-d3472315.js} +1 -1
  357. package/dist/kolibri/has-closer-d28fec0f.js +4 -0
  358. package/dist/kolibri/{has-closer-f31506e6.js.map → has-closer-d28fec0f.js.map} +1 -1
  359. package/dist/kolibri/hide-label-3381f0cc.js +4 -0
  360. package/dist/kolibri/{i18n-9f9f551f.js → i18n-8ec5b30e.js} +1 -1
  361. package/dist/kolibri/icons-062ba29d.js +4 -0
  362. package/dist/kolibri/image-source-ceb96521.js +4 -0
  363. package/dist/kolibri/{index-f8836493.js → index-b79e4012.js} +1 -1
  364. package/dist/kolibri/index.esm.js +1 -1
  365. package/dist/kolibri/kol-abbr.entry.js +1 -1
  366. package/dist/kolibri/kol-accordion.entry.js +1 -1
  367. package/dist/kolibri/kol-alert-wc_2.entry.js +1 -1
  368. package/dist/kolibri/kol-alert-wc_2.entry.js.map +1 -1
  369. package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
  370. package/dist/kolibri/kol-badge.entry.js +1 -1
  371. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  372. package/dist/kolibri/kol-breadcrumb.entry.js.map +1 -1
  373. package/dist/kolibri/kol-button-wc_2.entry.js +1 -1
  374. package/dist/kolibri/kol-button-wc_2.entry.js.map +1 -1
  375. package/dist/kolibri/kol-button.entry.js +1 -1
  376. package/dist/kolibri/kol-button.entry.js.map +1 -1
  377. package/dist/kolibri/kol-card.entry.js +1 -1
  378. package/dist/kolibri/kol-details.entry.js +1 -1
  379. package/dist/kolibri/kol-form.entry.js +1 -1
  380. package/dist/kolibri/kol-icon.entry.js +1 -1
  381. package/dist/kolibri/kol-image.entry.js +1 -1
  382. package/dist/kolibri/kol-image.entry.js.map +1 -1
  383. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  384. package/dist/kolibri/kol-input-checkbox.entry.js.map +1 -1
  385. package/dist/kolibri/kol-input-color.entry.js +1 -1
  386. package/dist/kolibri/kol-input-color.entry.js.map +1 -1
  387. package/dist/kolibri/kol-input-date.entry.js +1 -1
  388. package/dist/kolibri/kol-input-date.entry.js.map +1 -1
  389. package/dist/kolibri/kol-input-email.entry.js +1 -1
  390. package/dist/kolibri/kol-input-email.entry.js.map +1 -1
  391. package/dist/kolibri/kol-input-file.entry.js +1 -1
  392. package/dist/kolibri/kol-input-file.entry.js.map +1 -1
  393. package/dist/kolibri/kol-input-number.entry.js +1 -1
  394. package/dist/kolibri/kol-input-number.entry.js.map +1 -1
  395. package/dist/kolibri/kol-input-password.entry.js +1 -1
  396. package/dist/kolibri/kol-input-password.entry.js.map +1 -1
  397. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  398. package/dist/kolibri/kol-input-range.entry.js +1 -1
  399. package/dist/kolibri/kol-input-range.entry.js.map +1 -1
  400. package/dist/kolibri/kol-input-text.entry.js +1 -1
  401. package/dist/kolibri/kol-input-text.entry.js.map +1 -1
  402. package/dist/kolibri/kol-input.entry.js +1 -1
  403. package/dist/kolibri/kol-input.entry.js.map +1 -1
  404. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  405. package/dist/kolibri/kol-link-button.entry.js +1 -1
  406. package/dist/kolibri/kol-link-button.entry.js.map +1 -1
  407. package/dist/kolibri/kol-link-group.entry.js +1 -1
  408. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  409. package/dist/kolibri/kol-link-wc.entry.js.map +1 -1
  410. package/dist/kolibri/kol-logo.entry.js +1 -1
  411. package/dist/kolibri/kol-modal.entry.js +1 -1
  412. package/dist/kolibri/kol-nav.entry.js +1 -1
  413. package/dist/kolibri/kol-pagination.entry.js +1 -1
  414. package/dist/kolibri/kol-pagination.entry.js.map +1 -1
  415. package/dist/kolibri/kol-popover.entry.js +1 -1
  416. package/dist/kolibri/kol-popover.entry.js.map +1 -1
  417. package/dist/kolibri/kol-progress.entry.js +1 -1
  418. package/dist/kolibri/kol-quote.entry.js +1 -1
  419. package/dist/kolibri/kol-quote.entry.js.map +1 -1
  420. package/dist/kolibri/kol-select.entry.js +1 -1
  421. package/dist/kolibri/kol-select.entry.js.map +1 -1
  422. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  423. package/dist/kolibri/kol-skip-nav.entry.js.map +1 -1
  424. package/dist/kolibri/kol-span-wc.entry.js +1 -1
  425. package/dist/kolibri/kol-spin.entry.js +1 -1
  426. package/dist/kolibri/kol-spin.entry.js.map +1 -1
  427. package/dist/kolibri/kol-symbol.entry.js +1 -1
  428. package/dist/kolibri/kol-table.entry.js +1 -1
  429. package/dist/kolibri/kol-tabs.entry.js +1 -1
  430. package/dist/kolibri/kol-tabs.entry.js.map +1 -1
  431. package/dist/kolibri/kol-textarea.entry.js +1 -1
  432. package/dist/kolibri/kol-textarea.entry.js.map +1 -1
  433. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  434. package/dist/kolibri/kol-toast-container.entry.js.map +1 -1
  435. package/dist/kolibri/kol-version.entry.js +1 -1
  436. package/dist/kolibri/kolibri.esm.js +1 -1
  437. package/dist/kolibri/{label-3e545772.js → label-5c173d60.js} +1 -1
  438. package/dist/kolibri/open-47384c18.js +4 -0
  439. package/dist/kolibri/{prop.validators-6cc65427.js → prop.validators-3d53ddab.js} +1 -1
  440. package/dist/kolibri/rows-1eebe49e.js +4 -0
  441. package/dist/kolibri/show-3e682c46.js +4 -0
  442. package/dist/kolibri/{suggestions-25890d93.js → suggestions-04f64716.js} +1 -1
  443. package/dist/kolibri/tab-index-d2d0d9db.js +4 -0
  444. package/dist/kolibri/{tab-index-8864ef5e.js.map → tab-index-d2d0d9db.js.map} +1 -1
  445. package/dist/kolibri/tooltip-align-c09e55cd.js +4 -0
  446. package/dist/kolibri/validation-68e14b6f.js +4 -0
  447. package/dist/kolibri/validation-c57e7be5.js +4 -0
  448. package/dist/kolibri/validation-c57e7be5.js.map +1 -0
  449. package/dist/types/components/alert/types.d.ts +4 -2
  450. package/dist/types/components/heading/validation.d.ts +2 -1
  451. package/dist/types/components/input-checkbox/types.d.ts +2 -1
  452. package/dist/types/components/input-date/controller.d.ts +2 -2
  453. package/dist/types/components/quote/types.d.ts +2 -1
  454. package/dist/types/components/textarea/types.d.ts +2 -1
  455. package/dist/types/types/heading-level.d.ts +2 -1
  456. package/dist/types/types/input/control/number.d.ts +2 -2
  457. package/dist/types/types/input/control/text.d.ts +2 -1
  458. package/dist/types/types/input/types.d.ts +2 -1
  459. package/dist/types/types/orientation.d.ts +2 -1
  460. package/dist/types/types/props/align.d.ts +5 -2
  461. package/dist/types/types/props/aria-current.d.ts +3 -1
  462. package/dist/types/types/props/button-type.d.ts +3 -1
  463. package/dist/types/types/props/button-variant.d.ts +3 -1
  464. package/dist/types/types/props/variant/spin.d.ts +3 -1
  465. package/dist/types/utils/validators/loading.d.ts +3 -1
  466. package/doc/badge.md +6 -6
  467. package/doc/input-color.md +21 -21
  468. package/doc/input-date.md +27 -27
  469. package/doc/input-email.md +28 -28
  470. package/doc/input-file.md +22 -22
  471. package/doc/input-number.md +27 -27
  472. package/doc/input-password.md +26 -26
  473. package/doc/input-text.md +28 -28
  474. package/package.json +1 -1
  475. package/vscode-custom-data.json +216 -8
  476. package/dist/cjs/InternalUnderlinedAccessKey-a8e55e80.js +0 -4
  477. package/dist/cjs/InternalUnderlinedAccessKey-a8e55e80.js.map +0 -1
  478. package/dist/cjs/access-key-2ceab9f7.js +0 -4
  479. package/dist/cjs/align-c72f5bb5.js +0 -4
  480. package/dist/cjs/align-c72f5bb5.js.map +0 -1
  481. package/dist/cjs/alignment-c3d11ef0.js +0 -4
  482. package/dist/cjs/alignment-c3d11ef0.js.map +0 -1
  483. package/dist/cjs/alternative-button-link-role-c58c7827.js +0 -4
  484. package/dist/cjs/controller-d31f4e8f.js +0 -4
  485. package/dist/cjs/controller-d31f4e8f.js.map +0 -1
  486. package/dist/cjs/controller-d8470b88.js +0 -4
  487. package/dist/cjs/controller-d8470b88.js.map +0 -1
  488. package/dist/cjs/custom-class-f9abd989.js +0 -4
  489. package/dist/cjs/has-closer-2fabbe8f.js +0 -4
  490. package/dist/cjs/hide-label-e41f7adc.js +0 -4
  491. package/dist/cjs/image-source-b26f9674.js +0 -4
  492. package/dist/cjs/open-7e8c43ab.js +0 -4
  493. package/dist/cjs/rows-301f03c8.js +0 -4
  494. package/dist/cjs/show-fbb0fc54.js +0 -4
  495. package/dist/cjs/validation-47df0e0a.js +0 -4
  496. package/dist/cjs/validation-47df0e0a.js.map +0 -1
  497. package/dist/components/align.js +0 -4
  498. package/dist/components/align.js.map +0 -1
  499. package/dist/esm/InternalUnderlinedAccessKey-c3bc8e32.js +0 -4
  500. package/dist/esm/InternalUnderlinedAccessKey-c3bc8e32.js.map +0 -1
  501. package/dist/esm/access-key-292dd663.js +0 -4
  502. package/dist/esm/align-1b092d1b.js +0 -4
  503. package/dist/esm/align-1b092d1b.js.map +0 -1
  504. package/dist/esm/alignment-529db740.js +0 -4
  505. package/dist/esm/alignment-529db740.js.map +0 -1
  506. package/dist/esm/alternative-button-link-role-b421e482.js +0 -4
  507. package/dist/esm/controller-3ea61e88.js +0 -4
  508. package/dist/esm/controller-3ea61e88.js.map +0 -1
  509. package/dist/esm/controller-43306562.js +0 -4
  510. package/dist/esm/controller-43306562.js.map +0 -1
  511. package/dist/esm/custom-class-ea9a981b.js +0 -4
  512. package/dist/esm/validation-3eb722ca.js +0 -4
  513. package/dist/esm/validation-3eb722ca.js.map +0 -1
  514. package/dist/esm/validation-a3a1a09e.js +0 -4
  515. package/dist/kolibri/InternalUnderlinedAccessKey-c3bc8e32.js +0 -4
  516. package/dist/kolibri/InternalUnderlinedAccessKey-c3bc8e32.js.map +0 -1
  517. package/dist/kolibri/access-key-292dd663.js +0 -4
  518. package/dist/kolibri/align-1b092d1b.js +0 -4
  519. package/dist/kolibri/align-1b092d1b.js.map +0 -1
  520. package/dist/kolibri/alignment-529db740.js +0 -4
  521. package/dist/kolibri/alignment-529db740.js.map +0 -1
  522. package/dist/kolibri/alternative-button-link-role-b421e482.js +0 -4
  523. package/dist/kolibri/app-globals-68db9e00.js +0 -4
  524. package/dist/kolibri/controller-3ea61e88.js +0 -4
  525. package/dist/kolibri/controller-3ea61e88.js.map +0 -1
  526. package/dist/kolibri/controller-43306562.js +0 -4
  527. package/dist/kolibri/controller-43306562.js.map +0 -1
  528. package/dist/kolibri/controller-873fca4f.js +0 -4
  529. package/dist/kolibri/controller-icon-92fc87b9.js +0 -4
  530. package/dist/kolibri/custom-class-ea9a981b.js +0 -4
  531. package/dist/kolibri/has-closer-f31506e6.js +0 -4
  532. package/dist/kolibri/hide-label-eb1f7b60.js +0 -4
  533. package/dist/kolibri/icons-4c438164.js +0 -4
  534. package/dist/kolibri/image-source-d36f06a0.js +0 -4
  535. package/dist/kolibri/open-1e2010f2.js +0 -4
  536. package/dist/kolibri/rows-7108779c.js +0 -4
  537. package/dist/kolibri/show-469f0d1b.js +0 -4
  538. package/dist/kolibri/tab-index-8864ef5e.js +0 -4
  539. package/dist/kolibri/tooltip-align-82ca015a.js +0 -4
  540. package/dist/kolibri/validation-3eb722ca.js +0 -4
  541. package/dist/kolibri/validation-3eb722ca.js.map +0 -1
  542. package/dist/kolibri/validation-a3a1a09e.js +0 -4
  543. /package/dist/kolibri/{a11y.tipps-ba8ae150.js.map → a11y.tipps-06cd7c77.js.map} +0 -0
  544. /package/dist/kolibri/{access-key-292dd663.js.map → access-key-d58c03d6.js.map} +0 -0
  545. /package/dist/kolibri/{alternative-button-link-role-b421e482.js.map → alternative-button-link-role-8db83e93.js.map} +0 -0
  546. /package/dist/kolibri/{app-globals-68db9e00.js.map → app-globals-77b2422c.js.map} +0 -0
  547. /package/dist/kolibri/{associated.controller-687b47db.js.map → associated.controller-1124284d.js.map} +0 -0
  548. /package/dist/kolibri/{color-8ca70766.js.map → color-84b42735.js.map} +0 -0
  549. /package/dist/kolibri/{controller-f653144a.js.map → controller-5a0cb886.js.map} +0 -0
  550. /package/dist/kolibri/{controller-873fca4f.js.map → controller-6a175634.js.map} +0 -0
  551. /package/dist/kolibri/{controller-a0c1c4ea.js.map → controller-7e5c82c1.js.map} +0 -0
  552. /package/dist/kolibri/{controller-icon-92fc87b9.js.map → controller-icon-ffe0af69.js.map} +0 -0
  553. /package/dist/kolibri/{custom-class-ea9a981b.js.map → custom-class-6ba43df0.js.map} +0 -0
  554. /package/dist/kolibri/{devtools-f3838564.js.map → devtools-d3472315.js.map} +0 -0
  555. /package/dist/kolibri/{hide-label-eb1f7b60.js.map → hide-label-3381f0cc.js.map} +0 -0
  556. /package/dist/kolibri/{i18n-9f9f551f.js.map → i18n-8ec5b30e.js.map} +0 -0
  557. /package/dist/kolibri/{icons-4c438164.js.map → icons-062ba29d.js.map} +0 -0
  558. /package/dist/kolibri/{image-source-d36f06a0.js.map → image-source-ceb96521.js.map} +0 -0
  559. /package/dist/kolibri/{index-f8836493.js.map → index-b79e4012.js.map} +0 -0
  560. /package/dist/kolibri/{label-3e545772.js.map → label-5c173d60.js.map} +0 -0
  561. /package/dist/kolibri/{open-1e2010f2.js.map → open-47384c18.js.map} +0 -0
  562. /package/dist/kolibri/{prop.validators-6cc65427.js.map → prop.validators-3d53ddab.js.map} +0 -0
  563. /package/dist/kolibri/{rows-7108779c.js.map → rows-1eebe49e.js.map} +0 -0
  564. /package/dist/kolibri/{show-469f0d1b.js.map → show-3e682c46.js.map} +0 -0
  565. /package/dist/kolibri/{suggestions-25890d93.js.map → suggestions-04f64716.js.map} +0 -0
  566. /package/dist/kolibri/{tooltip-align-82ca015a.js.map → tooltip-align-c09e55cd.js.map} +0 -0
  567. /package/dist/kolibri/{validation-a3a1a09e.js.map → validation-68e14b6f.js.map} +0 -0
@@ -1 +1 @@
1
- {"file":"kol-quote.js","mappings":";;;;;;;;;;;;AAAA,MAAM,eAAe,GAAG,0yGAA0yG;;MCerzGA,UAAQ;;;;;;;;oBAmB4B,QAAQ;iBAExB;MAC/B,KAAK,EAAE,GAAG;MACV,MAAM,EAAE,GAAG;MACX,QAAQ,EAAE,QAAQ;KAClB;;EAGM,aAAa,CAAC,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,IAAI,EAAC,QAAQ,GAAG,CAChB,CACK,KAEb,SAAG,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,IACvB,IAAI,CAAC,KAAK,CAAC,MAAM,EAClB,2BAAmB,CAAC,aAAa,GAAG,MAAM,GAAG,SAAS,EAAE,MAAM,EAAE,CAAC,aAAa,IAC7E,YAAM,IAAI,EAAC,QAAQ,GAAG,CAChB,CACJ,CACJ,EACA,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,QAAQ,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,KACrE,sBACC,gBACC,gBAAU,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,EAAC,QAAQ,GAAG,CAC3E,CACK,CACb,CACO,CACH,EACN;GACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolQuote"],"sources":["src/components/quote/style.css?tag=kol-quote&mode=default&encapsulation=shadow","src/components/quote/shadow.tsx"],"sourcesContent":["@import url(../style.css);\n@layer kol-component {\n\tcite,\n\tfigure,\n\tq + figcaption {\n\t\tdisplay: inline;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t}\n\n\tblockquote:before {\n\t\tcontent: open-quote;\n\t}\n\n\tblockquote::after {\n\t\tcontent: close-quote;\n\t}\n\n\tcite:before {\n\t\tcontent: '—';\n\t}\n\n\t.block cite:before {\n\t\tpadding-right: 0.5em;\n\t}\n\n\t.inline cite:before {\n\t\tpadding: 0.5em;\n\t}\n}\n","import { Component, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { HrefPropType } from '../../types/props/href';\nimport { LabelPropType, validateLabel } from '../../types/props/label';\nimport { watchString, watchValidator } from '../../utils/prop.validators';\nimport { showExpertSlot } from '../../utils/reuse';\nimport { API, KoliBriQuoteVariant, States } from './types';\n\n@Component({\n\ttag: 'kol-quote',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolQuote implements API {\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 * Sets the target URI of the link or citation source.\n\t */\n\t@Prop() public _href!: HrefPropType;\n\n\t/**\n\t * Defines the text of the quote.\n\t */\n\t@Prop() public _quote!: string;\n\n\t/**\n\t * Defines which variant should be used for presentation.\n\t */\n\t@Prop() public _variant?: KoliBriQuoteVariant = 'inline';\n\n\t@State() public state: States = {\n\t\t_href: '…', // ⚠ required\n\t\t_quote: '…', // ⚠ required\n\t\t_variant: 'inline',\n\t};\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelPropType): void {\n\t\tvalidateLabel(this, value);\n\t}\n\n\t@Watch('_href')\n\tpublic validateHref(value?: HrefPropType): void {\n\t\twatchString(this, '_href', value, {\n\t\t\trequired: true,\n\t\t});\n\t}\n\n\t@Watch('_quote')\n\tpublic validateQuote(value?: string): void {\n\t\twatchString(this, '_quote', value, {\n\t\t\trequired: true,\n\t\t});\n\t}\n\n\t@Watch('_variant')\n\tpublic validateVariant(value?: KoliBriQuoteVariant): void {\n\t\twatchValidator(this, '_variant', (value) => value === 'block' || value === 'inline', new Set(['block', 'inline']), value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateHref(this._href);\n\t\tthis.validateLabel(this._label);\n\t\tthis.validateQuote(this._quote);\n\t\tthis.validateVariant(this._variant);\n\t}\n\n\tpublic render(): JSX.Element {\n\t\tconst hasExpertSlot = showExpertSlot(this.state._quote); // _quote instead of _caption as _label\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<figure\n\t\t\t\t\tclass={{\n\t\t\t\t\t\t[this.state._variant]: true,\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{this.state._variant === 'block' ? (\n\t\t\t\t\t\t<blockquote cite={this.state._href}>\n\t\t\t\t\t\t\t{this.state._quote}\n\t\t\t\t\t\t\t<span aria-hidden={!hasExpertSlot ? 'true' : undefined} hidden={!hasExpertSlot}>\n\t\t\t\t\t\t\t\t<slot name=\"expert\" />\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</blockquote>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<q cite={this.state._href}>\n\t\t\t\t\t\t\t{this.state._quote}\n\t\t\t\t\t\t\t<span aria-hidden={!hasExpertSlot ? 'true' : undefined} hidden={!hasExpertSlot}>\n\t\t\t\t\t\t\t\t<slot name=\"expert\" />\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</q>\n\t\t\t\t\t)}\n\t\t\t\t\t{typeof this.state._label === 'string' && this.state._label.length > 0 && (\n\t\t\t\t\t\t<figcaption>\n\t\t\t\t\t\t\t<cite>\n\t\t\t\t\t\t\t\t<kol-link _href={this.state._href} _label={this.state._label} _target=\"_blank\" />\n\t\t\t\t\t\t\t</cite>\n\t\t\t\t\t\t</figcaption>\n\t\t\t\t\t)}\n\t\t\t\t</figure>\n\t\t\t</Host>\n\t\t);\n\t}\n}\n"],"version":3}
1
+ {"file":"kol-quote.js","mappings":";;;;;;;;;;;;AAKO,MAAM,0BAA0B,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAU;;ACLtE,MAAM,eAAe,GAAG,0yGAA0yG;;MCerzGA,UAAQ;;;;;;;;oBAmB4B,QAAQ;iBAExB;MAC/B,KAAK,EAAE,GAAG;MACV,MAAM,EAAE,GAAG;MACX,QAAQ,EAAE,QAAQ;KAClB;;EAGM,aAAa,CAAC,KAAqB;IACzC,aAAa,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;GAC3B;EAGM,YAAY,CAAC,KAAoB;IACvC,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE;MACjC,QAAQ,EAAE,IAAI;KACd,CAAC,CAAC;GACH;EAGM,aAAa,CA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Aa,IAC7E,YAAM,IAAI,EAAC,QAAQ,GAAG,CAChB,CACJ,CACJ,EACA,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,QAAQ,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,KACrE,sBACC,gBACC,gBAAU,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,EAAC,QAAQ,GAAG,CAC3E,CACK,CACb,CACO,CACH,EACN;GACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolQuote"],"sources":["src/components/quote/types.ts","src/components/quote/style.css?tag=kol-quote&mode=default&encapsulation=shadow","src/components/quote/shadow.tsx"],"sourcesContent":["import { Generic } from '@a11y-ui/core';\n\nimport { PropHref } from '../../types/props/href';\nimport { PropLabel } from '../../types/props/label';\n\nexport const koliBriQuoteVariantOptions = ['block', 'inline'] as const;\nexport type KoliBriQuoteVariant = (typeof koliBriQuoteVariantOptions)[number];\n\ntype RequiredProps = {\n\tquote: string;\n} & PropHref; // URL to the source of the quote (cite)\ntype OptionalProps = {\n\tvariant: KoliBriQuoteVariant;\n} & PropLabel;\nexport type Props = Generic.Element.Members<RequiredProps, OptionalProps>;\n\ntype RequiredStates = {\n\tquote: string;\n\tvariant: KoliBriQuoteVariant;\n} & PropHref; // URL to the source of the quote (cite)\ntype OptionalStates = PropLabel;\nexport type States = Generic.Element.Members<RequiredStates, OptionalStates>;\n\nexport type API = Generic.Element.ComponentApi<RequiredProps, OptionalProps, RequiredStates, OptionalStates>;\n","@import url(../style.css);\n@layer kol-component {\n\tcite,\n\tfigure,\n\tq + figcaption {\n\t\tdisplay: inline;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t}\n\n\tblockquote:before {\n\t\tcontent: open-quote;\n\t}\n\n\tblockquote::after {\n\t\tcontent: close-quote;\n\t}\n\n\tcite:before {\n\t\tcontent: '—';\n\t}\n\n\t.block cite:before {\n\t\tpadding-right: 0.5em;\n\t}\n\n\t.inline cite:before {\n\t\tpadding: 0.5em;\n\t}\n}\n","import { Component, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { HrefPropType } from '../../types/props/href';\nimport { LabelPropType, validateLabel } from '../../types/props/label';\nimport { watchString, watchValidator } from '../../utils/prop.validators';\nimport { showExpertSlot } from '../../utils/reuse';\nimport { API, KoliBriQuoteVariant, koliBriQuoteVariantOptions, States } from './types';\n\n@Component({\n\ttag: 'kol-quote',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolQuote implements API {\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 * Sets the target URI of the link or citation source.\n\t */\n\t@Prop() public _href!: HrefPropType;\n\n\t/**\n\t * Defines the text of the quote.\n\t */\n\t@Prop() public _quote!: string;\n\n\t/**\n\t * Defines which variant should be used for presentation.\n\t */\n\t@Prop() public _variant?: KoliBriQuoteVariant = 'inline';\n\n\t@State() public state: States = {\n\t\t_href: '…', // ⚠ required\n\t\t_quote: '…', // ⚠ required\n\t\t_variant: 'inline',\n\t};\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelPropType): void {\n\t\tvalidateLabel(this, value);\n\t}\n\n\t@Watch('_href')\n\tpublic validateHref(value?: HrefPropType): void {\n\t\twatchString(this, '_href', value, {\n\t\t\trequired: true,\n\t\t});\n\t}\n\n\t@Watch('_quote')\n\tpublic validateQuote(value?: string): void {\n\t\twatchString(this, '_quote', value, {\n\t\t\trequired: true,\n\t\t});\n\t}\n\n\t@Watch('_variant')\n\tpublic validateVariant(value?: KoliBriQuoteVariant): void {\n\t\twatchValidator(\n\t\t\tthis,\n\t\t\t'_variant',\n\t\t\t(value) => typeof value === 'string' && koliBriQuoteVariantOptions.includes(value),\n\t\t\tnew Set(koliBriQuoteVariantOptions),\n\t\t\tvalue\n\t\t);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateHref(this._href);\n\t\tthis.validateLabel(this._label);\n\t\tthis.validateQuote(this._quote);\n\t\tthis.validateVariant(this._variant);\n\t}\n\n\tpublic render(): JSX.Element {\n\t\tconst hasExpertSlot = showExpertSlot(this.state._quote); // _quote instead of _caption as _label\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<figure\n\t\t\t\t\tclass={{\n\t\t\t\t\t\t[this.state._variant]: true,\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{this.state._variant === 'block' ? (\n\t\t\t\t\t\t<blockquote cite={this.state._href}>\n\t\t\t\t\t\t\t{this.state._quote}\n\t\t\t\t\t\t\t<span aria-hidden={!hasExpertSlot ? 'true' : undefined} hidden={!hasExpertSlot}>\n\t\t\t\t\t\t\t\t<slot name=\"expert\" />\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</blockquote>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<q cite={this.state._href}>\n\t\t\t\t\t\t\t{this.state._quote}\n\t\t\t\t\t\t\t<span aria-hidden={!hasExpertSlot ? 'true' : undefined} hidden={!hasExpertSlot}>\n\t\t\t\t\t\t\t\t<slot name=\"expert\" />\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</q>\n\t\t\t\t\t)}\n\t\t\t\t\t{typeof this.state._label === 'string' && this.state._label.length > 0 && (\n\t\t\t\t\t\t<figcaption>\n\t\t\t\t\t\t\t<cite>\n\t\t\t\t\t\t\t\t<kol-link _href={this.state._href} _label={this.state._label} _target=\"_blank\" />\n\t\t\t\t\t\t\t</cite>\n\t\t\t\t\t\t</figcaption>\n\t\t\t\t\t)}\n\t\t\t\t</figure>\n\t\t\t</Host>\n\t\t);\n\t}\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h,Host,Fragment}from"@stencil/core/internal/client";import{a as translate}from"./i18n.js";import{v as validateShow}from"./show.js";import{w as watchValidator}from"./prop.validators.js";const validateSpinVariant=(t,n)=>{watchValidator(t,"_variant",(t=>"cycle"===t||"dot"===t||"none"===t),new Set(["cycle","dot","none"]),n)},defaultStyleCss="@layer kol-global {\n\t/*\n\t * This file contains all rules for accessibility.\n\t */\n\t:host {\n\t\t/*\n\t\t * Minimum size of interactive elements.\n\t\t */\n\t\t--a11y-min-size: 44px;\n\t\tfont-size: inherit;\n\t}\n\n\t* {\n\t\t/*\n\t\t * Verdana is an accessible font that can be used without requiring additional loading time.\n\t\t */\n\t\tfont-family: Verdana;\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\thyphens: auto;\n\t\t/*\n\t\t * Letter spacing is required for all texts.\n\t\t */\n\t\tletter-spacing: inherit;\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\tword-break: break-word;\n\t\t/*\n\t\t * Word spacing is required for all texts.\n\t\t */\n\t\tword-spacing: inherit;\n\t}\n\n\t/*\n\t * All interactive elements should have a minimum size of 44px.\n\t */\n\t/* input:not([type='checkbox'], [type='radio'], [type='range']), */\n\t/* option, */\n\t/* select, */\n\t/* textarea, */\n\t[role='button'],\n\tbutton:not([role='link']),\n\tkol-input .input {\n\t\tmin-height: var(--a11y-min-size);\n\t\tmin-width: var(--a11y-min-size);\n\t}\n\n\t/*\n\t * Some interactive elements should not inherit the font-family and font-size.\n\t */\n\ta,\n\tbutton,\n\th1,\n\th2,\n\th3,\n\th4,\n\th5,\n\th6,\n\tinput,\n\toption,\n\tselect,\n\ttextarea {\n\t\t/*\n\t\t * All elements should inherit the font family from his parent element.\n\t\t */\n\t\tfont-family: inherit;\n\t\t/*\n\t\t * All elements should inherit the font size from his parent element.\n\t\t */\n\t\tfont-size: inherit;\n\t}\n}\n\n@layer kol-global {\n\t/*\n\t * Dieses CSS stellt sicher, dass der Standard-Style\n\t * von A und Button resettet werden.\n\t */\n\t:is(a, button) {\n\t\tbackground-color: transparent;\n\t\tborder: none;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\twidth: 100%; /* 100% needed for custom width from outside */\n\t}\n}\n\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * The max-width is needed to prevent the table from overflowing the\n\t\t * parent node, if the table is wider than the parent node.\n\t\t */\n\t\tmax-width: 100%;\n\t}\n\n\t* {\n\t\t/*\n\t\t * We prefer to box-sizing: border-box for all elements.\n\t\t */\n\t\tbox-sizing: border-box;\n\t}\n\n\t/* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n\tkol-span-wc {\n\t\tdisplay: grid;\n\t\tplace-items: center;\n\t}\n\n\t/* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n\tkol-span-wc > span {\n\t\tdisplay: flex;\n\t\tplace-items: center;\n\t}\n\n\ta,\n\tbutton {\n\t\tcursor: pointer;\n\t}\n\n\t/* font-family is NOT inherited all HTML elements. */\n\tbutton,\n\tinput,\n\toption,\n\tselect,\n\ttextarea {\n\t\tfont-family: inherit;\n\t}\n\n\t/* This is the text label. */\n\t.icon-only > kol-span-wc > span > span {\n\t\tdisplay: none;\n\t}\n}\n\n@layer kol-component {\n\t.spin.cycle {\n\t\twidth: 3rem;\n\t\theight: 3rem;\n\t}\n\n\t.spin.cycle > .loader {\n\t\tdisplay: block;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tborder-radius: 50%;\n\t\tposition: relative;\n\t\tanimation: 2s linear infinite rotate;\n\t}\n\n\t.spin.cycle > .loader::before {\n\t\tcontent: '';\n\t\tbox-sizing: border-box;\n\t\tposition: absolute;\n\t\tinset: 0px;\n\t\tborder-radius: 50%;\n\t\tborder: 5px solid #333;\n\t\tanimation: 3s linear infinite prixClipFix;\n\t}\n\n\t@keyframes rotate {\n\t\t100% {\n\t\t\ttransform: rotate(360deg);\n\t\t}\n\t}\n\t@keyframes prixClipFix {\n\t\t0% {\n\t\t\tborder-color: #fff;\n\t\t\tclip-path: polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0);\n\t\t}\n\t\t25% {\n\t\t\tborder-color: #666;\n\t\t\tclip-path: polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0);\n\t\t}\n\t\t50% {\n\t\t\tborder-color: #fc0;\n\t\t\tclip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 100% 100%, 100% 100%);\n\t\t}\n\t\t75% {\n\t\t\tborder-color: red;\n\t\t\tclip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%);\n\t\t}\n\t\t100% {\n\t\t\tborder-color: #000;\n\t\t\tclip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0);\n\t\t}\n\t} /* https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion#toning_down_the_animation_scaling */\n\t@media (prefers-reduced-motion) {\n\t\t.spin.cycle > .loader {\n\t\t\tanimation-duration: 4s;\n\t\t}\n\n\t\t.spin.cycle > .loader::before {\n\t\t\tanimation-duration: 6s;\n\t\t}\n\t}\n}\n\n@layer kol-component {\n\t.spin.dot {\n\t\theight: 1rem;\n\t\twidth: 3rem;\n\t}\n\n\t.spin.dot > span {\n\t\tanimation-timing-function: cubic-bezier(0, 1, 1, 0);\n\t\tborder-radius: 50%;\n\t\tborder: 0.1rem solid #fff;\n\t\theight: 0.8rem;\n\t\tposition: absolute;\n\t\ttop: 0.1rem;\n\t\twidth: 0.8rem;\n\t}\n\n\t.spin.dot > span:first-child {\n\t\tbackground-color: #fc0;\n\t\tz-index: 0;\n\t\tanimation: 1s infinite spin1;\n\t\tleft: 0.1rem;\n\t}\n\n\t.spin.dot > span:nth-child(2) {\n\t\tbackground-color: red;\n\t\tz-index: 1;\n\t\tanimation: 1s infinite spin2;\n\t\tleft: 0.1rem;\n\t}\n\n\t.spin.dot > span:nth-child(3) {\n\t\tbackground-color: #000;\n\t\tz-index: 1;\n\t\tanimation: 1s infinite spin2;\n\t\tleft: 1.1rem;\n\t}\n\n\t.spin.dot > span:nth-child(4) {\n\t\tbackground-color: #666;\n\t\tz-index: 0;\n\t\tanimation: 1s infinite spin3;\n\t\tleft: 2.1rem;\n\t}\n\n\t@keyframes spin1 {\n\t\t0% {\n\t\t\ttransform: scale(0);\n\t\t}\n\t\t100% {\n\t\t\ttransform: scale(1);\n\t\t}\n\t}\n\t@keyframes spin2 {\n\t\t0% {\n\t\t\ttransform: translate(0, 0);\n\t\t}\n\t\t100% {\n\t\t\ttransform: translate(1rem, 0);\n\t\t}\n\t}\n\t@keyframes spin3 {\n\t\t0% {\n\t\t\ttransform: scale(1);\n\t\t}\n\t\t100% {\n\t\t\ttransform: scale(0);\n\t\t}\n\t} /* https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion#toning_down_the_animation_scaling */\n\t@media (prefers-reduced-motion) {\n\t\t.spin.dot > span:first-child,\n\t\t.spin.dot > span:nth-child(2),\n\t\t.spin.dot > span:nth-child(3),\n\t\t.spin.dot > span:nth-child(4) {\n\t\t\tanimation-duration: 2s;\n\t\t}\n\t}\n}\n\n@layer kol-component {\n\t.spin {\n\t\tdisplay: block;\n\t\tpadding: 0.125rem;\n\t\tposition: relative;\n\t}\n}\n";function renderSpin(t){switch(t){case"cycle":return h("span",{class:"loader"});case"none":return h("slot",{name:"expert"});default:return h(Fragment,null,h("span",{class:"bg-spin-1"}),h("span",{class:"bg-spin-2"}),h("span",{class:"bg-spin-3"}),h("span",{class:"bg-neutral"}))}}const KolSpin$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.showToggled=!1,this._show=!1,this._variant="dot",this.state={_variant:"dot"}}render(){return h(Host,null,this.state._show?h("span",{"aria-busy":"true","aria-label":translate("kol-action-running"),"aria-live":"polite",class:{spin:!0,[this.state._variant]:!0},role:"alert"},renderSpin(this.state._variant)):this.showToggled&&h("span",{"aria-label":translate("kol-action-done"),"aria-busy":"false","aria-live":"polite",role:"alert"}))}validateShow(t){this.showToggled=!0===this.state._show&&!1===this._show,validateShow(this,t)}validateVariant(t){validateSpinVariant(this,t)}componentWillLoad(){this.validateShow(this._show),this.validateVariant(this._variant)}static get watchers(){return{_show:["validateShow"],_variant:["validateVariant"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-spin",{_show:[1540],_variant:[1],state:[32]},void 0,{_show:["validateShow"],_variant:["validateVariant"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-spin"].forEach((t=>{if("kol-spin"===t)customElements.get(t)||customElements.define(t,KolSpin$1)}))}const KolSpin=KolSpin$1,defineCustomElement=defineCustomElement$1;export{KolSpin,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host,Fragment}from"@stencil/core/internal/client";import{a as translate}from"./i18n.js";import{v as validateShow}from"./show.js";import{w as watchValidator}from"./prop.validators.js";const spinVariantPropTypeOptions=["cycle","dot","none"],validateSpinVariant=(t,n)=>{watchValidator(t,"_variant",(t=>"string"==typeof t&&spinVariantPropTypeOptions.includes(t)),new Set(spinVariantPropTypeOptions),n)},defaultStyleCss="@layer kol-global {\n\t/*\n\t * This file contains all rules for accessibility.\n\t */\n\t:host {\n\t\t/*\n\t\t * Minimum size of interactive elements.\n\t\t */\n\t\t--a11y-min-size: 44px;\n\t\tfont-size: inherit;\n\t}\n\n\t* {\n\t\t/*\n\t\t * Verdana is an accessible font that can be used without requiring additional loading time.\n\t\t */\n\t\tfont-family: Verdana;\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\thyphens: auto;\n\t\t/*\n\t\t * Letter spacing is required for all texts.\n\t\t */\n\t\tletter-spacing: inherit;\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\tword-break: break-word;\n\t\t/*\n\t\t * Word spacing is required for all texts.\n\t\t */\n\t\tword-spacing: inherit;\n\t}\n\n\t/*\n\t * All interactive elements should have a minimum size of 44px.\n\t */\n\t/* input:not([type='checkbox'], [type='radio'], [type='range']), */\n\t/* option, */\n\t/* select, */\n\t/* textarea, */\n\t[role='button'],\n\tbutton:not([role='link']),\n\tkol-input .input {\n\t\tmin-height: var(--a11y-min-size);\n\t\tmin-width: var(--a11y-min-size);\n\t}\n\n\t/*\n\t * Some interactive elements should not inherit the font-family and font-size.\n\t */\n\ta,\n\tbutton,\n\th1,\n\th2,\n\th3,\n\th4,\n\th5,\n\th6,\n\tinput,\n\toption,\n\tselect,\n\ttextarea {\n\t\t/*\n\t\t * All elements should inherit the font family from his parent element.\n\t\t */\n\t\tfont-family: inherit;\n\t\t/*\n\t\t * All elements should inherit the font size from his parent element.\n\t\t */\n\t\tfont-size: inherit;\n\t}\n}\n\n@layer kol-global {\n\t/*\n\t * Dieses CSS stellt sicher, dass der Standard-Style\n\t * von A und Button resettet werden.\n\t */\n\t:is(a, button) {\n\t\tbackground-color: transparent;\n\t\tborder: none;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\twidth: 100%; /* 100% needed for custom width from outside */\n\t}\n}\n\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * The max-width is needed to prevent the table from overflowing the\n\t\t * parent node, if the table is wider than the parent node.\n\t\t */\n\t\tmax-width: 100%;\n\t}\n\n\t* {\n\t\t/*\n\t\t * We prefer to box-sizing: border-box for all elements.\n\t\t */\n\t\tbox-sizing: border-box;\n\t}\n\n\t/* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n\tkol-span-wc {\n\t\tdisplay: grid;\n\t\tplace-items: center;\n\t}\n\n\t/* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n\tkol-span-wc > span {\n\t\tdisplay: flex;\n\t\tplace-items: center;\n\t}\n\n\ta,\n\tbutton {\n\t\tcursor: pointer;\n\t}\n\n\t/* font-family is NOT inherited all HTML elements. */\n\tbutton,\n\tinput,\n\toption,\n\tselect,\n\ttextarea {\n\t\tfont-family: inherit;\n\t}\n\n\t/* This is the text label. */\n\t.icon-only > kol-span-wc > span > span {\n\t\tdisplay: none;\n\t}\n}\n\n@layer kol-component {\n\t.spin.cycle {\n\t\twidth: 3rem;\n\t\theight: 3rem;\n\t}\n\n\t.spin.cycle > .loader {\n\t\tdisplay: block;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tborder-radius: 50%;\n\t\tposition: relative;\n\t\tanimation: 2s linear infinite rotate;\n\t}\n\n\t.spin.cycle > .loader::before {\n\t\tcontent: '';\n\t\tbox-sizing: border-box;\n\t\tposition: absolute;\n\t\tinset: 0px;\n\t\tborder-radius: 50%;\n\t\tborder: 5px solid #333;\n\t\tanimation: 3s linear infinite prixClipFix;\n\t}\n\n\t@keyframes rotate {\n\t\t100% {\n\t\t\ttransform: rotate(360deg);\n\t\t}\n\t}\n\t@keyframes prixClipFix {\n\t\t0% {\n\t\t\tborder-color: #fff;\n\t\t\tclip-path: polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0);\n\t\t}\n\t\t25% {\n\t\t\tborder-color: #666;\n\t\t\tclip-path: polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0);\n\t\t}\n\t\t50% {\n\t\t\tborder-color: #fc0;\n\t\t\tclip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 100% 100%, 100% 100%);\n\t\t}\n\t\t75% {\n\t\t\tborder-color: red;\n\t\t\tclip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%);\n\t\t}\n\t\t100% {\n\t\t\tborder-color: #000;\n\t\t\tclip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0);\n\t\t}\n\t} /* https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion#toning_down_the_animation_scaling */\n\t@media (prefers-reduced-motion) {\n\t\t.spin.cycle > .loader {\n\t\t\tanimation-duration: 4s;\n\t\t}\n\n\t\t.spin.cycle > .loader::before {\n\t\t\tanimation-duration: 6s;\n\t\t}\n\t}\n}\n\n@layer kol-component {\n\t.spin.dot {\n\t\theight: 1rem;\n\t\twidth: 3rem;\n\t}\n\n\t.spin.dot > span {\n\t\tanimation-timing-function: cubic-bezier(0, 1, 1, 0);\n\t\tborder-radius: 50%;\n\t\tborder: 0.1rem solid #fff;\n\t\theight: 0.8rem;\n\t\tposition: absolute;\n\t\ttop: 0.1rem;\n\t\twidth: 0.8rem;\n\t}\n\n\t.spin.dot > span:first-child {\n\t\tbackground-color: #fc0;\n\t\tz-index: 0;\n\t\tanimation: 1s infinite spin1;\n\t\tleft: 0.1rem;\n\t}\n\n\t.spin.dot > span:nth-child(2) {\n\t\tbackground-color: red;\n\t\tz-index: 1;\n\t\tanimation: 1s infinite spin2;\n\t\tleft: 0.1rem;\n\t}\n\n\t.spin.dot > span:nth-child(3) {\n\t\tbackground-color: #000;\n\t\tz-index: 1;\n\t\tanimation: 1s infinite spin2;\n\t\tleft: 1.1rem;\n\t}\n\n\t.spin.dot > span:nth-child(4) {\n\t\tbackground-color: #666;\n\t\tz-index: 0;\n\t\tanimation: 1s infinite spin3;\n\t\tleft: 2.1rem;\n\t}\n\n\t@keyframes spin1 {\n\t\t0% {\n\t\t\ttransform: scale(0);\n\t\t}\n\t\t100% {\n\t\t\ttransform: scale(1);\n\t\t}\n\t}\n\t@keyframes spin2 {\n\t\t0% {\n\t\t\ttransform: translate(0, 0);\n\t\t}\n\t\t100% {\n\t\t\ttransform: translate(1rem, 0);\n\t\t}\n\t}\n\t@keyframes spin3 {\n\t\t0% {\n\t\t\ttransform: scale(1);\n\t\t}\n\t\t100% {\n\t\t\ttransform: scale(0);\n\t\t}\n\t} /* https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion#toning_down_the_animation_scaling */\n\t@media (prefers-reduced-motion) {\n\t\t.spin.dot > span:first-child,\n\t\t.spin.dot > span:nth-child(2),\n\t\t.spin.dot > span:nth-child(3),\n\t\t.spin.dot > span:nth-child(4) {\n\t\t\tanimation-duration: 2s;\n\t\t}\n\t}\n}\n\n@layer kol-component {\n\t.spin {\n\t\tdisplay: block;\n\t\tpadding: 0.125rem;\n\t\tposition: relative;\n\t}\n}\n";function renderSpin(t){switch(t){case"cycle":return h("span",{class:"loader"});case"none":return h("slot",{name:"expert"});default:return h(Fragment,null,h("span",{class:"bg-spin-1"}),h("span",{class:"bg-spin-2"}),h("span",{class:"bg-spin-3"}),h("span",{class:"bg-neutral"}))}}const KolSpin$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.showToggled=!1,this._show=!1,this._variant="dot",this.state={_variant:"dot"}}render(){return h(Host,null,this.state._show?h("span",{"aria-busy":"true","aria-label":translate("kol-action-running"),"aria-live":"polite",class:{spin:!0,[this.state._variant]:!0},role:"alert"},renderSpin(this.state._variant)):this.showToggled&&h("span",{"aria-label":translate("kol-action-done"),"aria-busy":"false","aria-live":"polite",role:"alert"}))}validateShow(t){this.showToggled=!0===this.state._show&&!1===this._show,validateShow(this,t)}validateVariant(t){validateSpinVariant(this,t)}componentWillLoad(){this.validateShow(this._show),this.validateVariant(this._variant)}static get watchers(){return{_show:["validateShow"],_variant:["validateVariant"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-spin",{_show:[1540],_variant:[1],state:[32]},void 0,{_show:["validateShow"],_variant:["validateVariant"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-spin"].forEach((t=>{if("kol-spin"===t)customElements.get(t)||customElements.define(t,KolSpin$1)}))}const KolSpin=KolSpin$1,defineCustomElement=defineCustomElement$1;export{KolSpin,defineCustomElement};
@@ -1 +1 @@
1
- {"file":"kol-spin.js","mappings":";;;;;;;;AAmBO,MAAM,mBAAmB,GAAG,CAAC,SAAoC,EAAE,KAA2B;EACpG,cAAc,CAAC,SAAS,EAAE,UAAU,EAAE,CAAC,KAAK,KAAK,KAAK,KAAK,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G,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC;IACrE,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;GAC1B;EAGM,eAAe,CAAC,KAA2B;IACjD,mBAAmB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;GACjC;EAEM,iBAAiB;IACvB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9B,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;GACpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolSpin"],"sources":["src/types/props/variant/spin.ts","src/components/spin/style.css?tag=kol-spin&mode=default&encapsulation=shadow","src/components/spin/component.tsx"],"sourcesContent":["import { Generic } from '@a11y-ui/core';\n\nimport { watchValidator } from '../../../utils/prop.validators';\n\n/* types */\n/**\n * Loading-spinner\n * - https://github.com/vineethtrv/css-loader\n */\nexport type SpinVariantPropType = 'cycle' | 'dot' | 'none';\n\n/**\n * Defines the variant of spin navigation.\n */\nexport type PropSpinVariant = {\n\tvariant: SpinVariantPropType;\n};\n\n/* validator */\nexport const validateSpinVariant = (component: Generic.Element.Component, value?: SpinVariantPropType): void => {\n\twatchValidator(component, '_variant', (value) => value === 'cycle' || value === 'dot' || value === 'none', new Set(['cycle', 'dot', 'none']), value);\n};\n","@import url(../style.css);\n@import url(cycle.css);\n@import url(dot.css);\n@layer kol-component {\n\t.spin {\n\t\tdisplay: block;\n\t\tpadding: 0.125rem;\n\t\tposition: relative;\n\t}\n}\n","import { Component, Fragment, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { translate } from '../../i18n';\nimport { ShowPropType, validateShow } from '../../types/props/show';\nimport { SpinVariantPropType, validateSpinVariant } from '../../types/props/variant/spin';\nimport { API, States } from './types';\n\nfunction renderSpin(variant: SpinVariantPropType): JSX.Element {\n\tswitch (variant) {\n\t\tcase 'cycle':\n\t\t\treturn <span class=\"loader\"></span>;\n\t\tcase 'none':\n\t\t\treturn <slot name=\"expert\"></slot>;\n\t\tdefault:\n\t\t\treturn (\n\t\t\t\t<Fragment>\n\t\t\t\t\t<span class=\"bg-spin-1\"></span>\n\t\t\t\t\t<span class=\"bg-spin-2\"></span>\n\t\t\t\t\t<span class=\"bg-spin-3\"></span>\n\t\t\t\t\t<span class=\"bg-neutral\"></span>\n\t\t\t\t</Fragment>\n\t\t\t);\n\t}\n}\n\n@Component({\n\ttag: 'kol-spin',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolSpin implements API {\n\tprivate showToggled = false;\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t{this.state._show ? (\n\t\t\t\t\t<span\n\t\t\t\t\t\taria-busy=\"true\"\n\t\t\t\t\t\taria-label={translate('kol-action-running')}\n\t\t\t\t\t\taria-live=\"polite\"\n\t\t\t\t\t\tclass={{\n\t\t\t\t\t\t\tspin: true,\n\t\t\t\t\t\t\t[this.state._variant]: true,\n\t\t\t\t\t\t\t/* [`spin--${this.state._variant}`]: true, witch benefit have this notation? */\n\t\t\t\t\t\t}}\n\t\t\t\t\t\trole=\"alert\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{renderSpin(this.state._variant)}\n\t\t\t\t\t</span>\n\t\t\t\t) : (\n\t\t\t\t\tthis.showToggled && <span aria-label={translate('kol-action-done')} aria-busy=\"false\" aria-live=\"polite\" role=\"alert\"></span>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Makes the element show up.\n\t * @TODO: Change type back to `ShowPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _show?: boolean = false;\n\n\t/**\n\t * Defines which variant should be used for presentation.\n\t */\n\t@Prop() public _variant?: SpinVariantPropType = 'dot';\n\n\t@State() public state: States = {\n\t\t_variant: 'dot',\n\t};\n\n\t@Watch('_show')\n\tpublic validateShow(value?: ShowPropType): void {\n\t\tthis.showToggled = this.state._show === true && this._show === false;\n\t\tvalidateShow(this, value);\n\t}\n\n\t@Watch('_variant')\n\tpublic validateVariant(value?: SpinVariantPropType): void {\n\t\tvalidateSpinVariant(this, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateShow(this._show);\n\t\tthis.validateVariant(this._variant);\n\t}\n}\n"],"version":3}
1
+ {"file":"kol-spin.js","mappings":";;;;;;;;AASA,MAAM,0BAA0B,GAAG,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,CAAU,CAAC;AAW9D,MAAM,mBAAmB,GAAG,CAAC,SAAoC,EAAE,KAA2B;EACpG,cAAc,CACb,SAAS,EACT,UAAU,EACV,CAAC,KAAK,KAAK,OAAO,KAAK,KAAK,QAAQ,IAAI,0BAA0B,CAAC,QAAQ,CAAC,KAAK,CAAC,EAClF,IAAI,GAAG,CAAC,0BAA0B,CAAC,EACnC,KAAK,CACL,CAAC;AACH,CAAC;;AC5BD,MAAM,eAAe,GAAG,4jMAA4jM;;ACOplM,SAAS,UAAU,CAAC,OAA4B;EAC/C,QAAQ,OAAO;IACd,KAAK,OAAO;MACX,OAAO,YAAM,KAAK,EAAC,QAAQ,GAAQ,CAAC;IACrC,KAAK,MAAM;MACV,OAAO,YAAM,IAAI,EAAC,QAAQ,GAAQ,CAAC;IACpC;MACC,QACC,kBACC,YAAM,KAAK,EAAC,WAAW,GAAQ,EAC/B,YAAM,KAAK,EAAC,WAAW,GAAQ,EAC/B,YAAM,KAAK,EAAC,WAAW,GAAQ,EAC/B,YAAM,KAAK,EAAC,YAAY,GAAQ,CAC9B,EACF;GACH;AACF,CAAC;MASYA,SAAO;;;;;IACX,gBAAW,GAAG,KAAK,CAAC;iBA8BqC,KAAK;oBAKtB,KAAK;iBAErB;MAC/B,QAAQ,EAAE,KAAK;KACf;;EArCM,MAAM;IACZ,QACC,EAAC,IAAI,QACH,IAAI,CAAC,KAAK,CAAC,KAAK,IAChB,yBACW,MAAM,gBACJ,SAAS,CAAC,oBAAoB,CAAC,eACjC,QAAQ,EAClB,KAAK,EAAE;QACN,IAAI,EAAE,IAAI;QACV,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,IAAI;OAE3B,EACD,IAAI,EAAC,OAAO,IAEX,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAC1B,KAEP,IAAI,CAAC,WAAW,IAAI,0BAAkB,SAAS,CAAC,iBAAiB,CAAC,eAAY,OAAO,eAAW,QAAQ,EAAC,IAAI,EAAC,OAAO,GAAQ,CAC7H,CACK,EACN;GACF;EAkBM,YAAY,CAAC,KAAoB;IACvC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC;IACrE,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;GAC1B;EAGM,eAAe,CAAC,KAA2B;IACjD,mBAAmB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;GACjC;EAEM,iBAAiB;IACvB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9B,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;GACpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolSpin"],"sources":["src/types/props/variant/spin.ts","src/components/spin/style.css?tag=kol-spin&mode=default&encapsulation=shadow","src/components/spin/component.tsx"],"sourcesContent":["import { Generic } from '@a11y-ui/core';\n\nimport { watchValidator } from '../../../utils/prop.validators';\n\n/* types */\n/**\n * Loading-spinner\n * - https://github.com/vineethtrv/css-loader\n */\nconst spinVariantPropTypeOptions = ['cycle', 'dot', 'none'] as const;\nexport type SpinVariantPropType = (typeof spinVariantPropTypeOptions)[number];\n\n/**\n * Defines the variant of spin navigation.\n */\nexport type PropSpinVariant = {\n\tvariant: SpinVariantPropType;\n};\n\n/* validator */\nexport const validateSpinVariant = (component: Generic.Element.Component, value?: SpinVariantPropType): void => {\n\twatchValidator(\n\t\tcomponent,\n\t\t'_variant',\n\t\t(value) => typeof value === 'string' && spinVariantPropTypeOptions.includes(value),\n\t\tnew Set(spinVariantPropTypeOptions),\n\t\tvalue\n\t);\n};\n","@import url(../style.css);\n@import url(cycle.css);\n@import url(dot.css);\n@layer kol-component {\n\t.spin {\n\t\tdisplay: block;\n\t\tpadding: 0.125rem;\n\t\tposition: relative;\n\t}\n}\n","import { Component, Fragment, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { translate } from '../../i18n';\nimport { ShowPropType, validateShow } from '../../types/props/show';\nimport { SpinVariantPropType, validateSpinVariant } from '../../types/props/variant/spin';\nimport { API, States } from './types';\n\nfunction renderSpin(variant: SpinVariantPropType): JSX.Element {\n\tswitch (variant) {\n\t\tcase 'cycle':\n\t\t\treturn <span class=\"loader\"></span>;\n\t\tcase 'none':\n\t\t\treturn <slot name=\"expert\"></slot>;\n\t\tdefault:\n\t\t\treturn (\n\t\t\t\t<>\n\t\t\t\t\t<span class=\"bg-spin-1\"></span>\n\t\t\t\t\t<span class=\"bg-spin-2\"></span>\n\t\t\t\t\t<span class=\"bg-spin-3\"></span>\n\t\t\t\t\t<span class=\"bg-neutral\"></span>\n\t\t\t\t</>\n\t\t\t);\n\t}\n}\n\n@Component({\n\ttag: 'kol-spin',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolSpin implements API {\n\tprivate showToggled = false;\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t{this.state._show ? (\n\t\t\t\t\t<span\n\t\t\t\t\t\taria-busy=\"true\"\n\t\t\t\t\t\taria-label={translate('kol-action-running')}\n\t\t\t\t\t\taria-live=\"polite\"\n\t\t\t\t\t\tclass={{\n\t\t\t\t\t\t\tspin: true,\n\t\t\t\t\t\t\t[this.state._variant]: true,\n\t\t\t\t\t\t\t/* [`spin--${this.state._variant}`]: true, witch benefit have this notation? */\n\t\t\t\t\t\t}}\n\t\t\t\t\t\trole=\"alert\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{renderSpin(this.state._variant)}\n\t\t\t\t\t</span>\n\t\t\t\t) : (\n\t\t\t\t\tthis.showToggled && <span aria-label={translate('kol-action-done')} aria-busy=\"false\" aria-live=\"polite\" role=\"alert\"></span>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Makes the element show up.\n\t * @TODO: Change type back to `ShowPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _show?: boolean = false;\n\n\t/**\n\t * Defines which variant should be used for presentation.\n\t */\n\t@Prop() public _variant?: SpinVariantPropType = 'dot';\n\n\t@State() public state: States = {\n\t\t_variant: 'dot',\n\t};\n\n\t@Watch('_show')\n\tpublic validateShow(value?: ShowPropType): void {\n\t\tthis.showToggled = this.state._show === true && this._show === false;\n\t\tvalidateShow(this, value);\n\t}\n\n\t@Watch('_variant')\n\tpublic validateVariant(value?: SpinVariantPropType): void {\n\t\tvalidateSpinVariant(this, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateShow(this._show);\n\t\tthis.validateVariant(this._variant);\n\t}\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{a as translate}from"./i18n.js";import{b as validateAlign}from"./align.js";import{v as validateLabel}from"./label.js";import{d as devHint,q as featureHint,L as Log,t as setState,D as watchNumber,H as watchJsonArrayString,I as uiUxHintMillerscheZahl,R as koliBriQuerySelector}from"./prop.validators.js";import{d as defineCustomElement$6}from"./component10.js";import{d as defineCustomElement$5}from"./component5.js";import{d as defineCustomElement$4}from"./component.js";import{d as defineCustomElement$3}from"./component2.js";import{d as defineCustomElement$2}from"./component3.js";const defaultStyleCss="@layer kol-global {\n\t/*\n\t * This file contains all rules for accessibility.\n\t */\n\t:host {\n\t\t/*\n\t\t * Minimum size of interactive elements.\n\t\t */\n\t\t--a11y-min-size: 44px;\n\t\tfont-size: inherit;\n\t}\n\n\t* {\n\t\t/*\n\t\t * Verdana is an accessible font that can be used without requiring additional loading time.\n\t\t */\n\t\tfont-family: Verdana;\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\thyphens: auto;\n\t\t/*\n\t\t * Letter spacing is required for all texts.\n\t\t */\n\t\tletter-spacing: inherit;\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\tword-break: break-word;\n\t\t/*\n\t\t * Word spacing is required for all texts.\n\t\t */\n\t\tword-spacing: inherit;\n\t}\n\n\t/*\n\t * All interactive elements should have a minimum size of 44px.\n\t */\n\t/* input:not([type='checkbox'], [type='radio'], [type='range']), */\n\t/* option, */\n\t/* select, */\n\t/* textarea, */\n\t[role='button'],\n\tbutton:not([role='link']),\n\tkol-input .input {\n\t\tmin-height: var(--a11y-min-size);\n\t\tmin-width: var(--a11y-min-size);\n\t}\n\n\t/*\n\t * Some interactive elements should not inherit the font-family and font-size.\n\t */\n\ta,\n\tbutton,\n\th1,\n\th2,\n\th3,\n\th4,\n\th5,\n\th6,\n\tinput,\n\toption,\n\tselect,\n\ttextarea {\n\t\t/*\n\t\t * All elements should inherit the font family from his parent element.\n\t\t */\n\t\tfont-family: inherit;\n\t\t/*\n\t\t * All elements should inherit the font size from his parent element.\n\t\t */\n\t\tfont-size: inherit;\n\t}\n}\n\n@layer kol-global {\n\t/*\n\t * Dieses CSS stellt sicher, dass der Standard-Style\n\t * von A und Button resettet werden.\n\t */\n\t:is(a, button) {\n\t\tbackground-color: transparent;\n\t\tborder: none;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\twidth: 100%; /* 100% needed for custom width from outside */\n\t}\n}\n\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * The max-width is needed to prevent the table from overflowing the\n\t\t * parent node, if the table is wider than the parent node.\n\t\t */\n\t\tmax-width: 100%;\n\t}\n\n\t* {\n\t\t/*\n\t\t * We prefer to box-sizing: border-box for all elements.\n\t\t */\n\t\tbox-sizing: border-box;\n\t}\n\n\t/* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n\tkol-span-wc {\n\t\tdisplay: grid;\n\t\tplace-items: center;\n\t}\n\n\t/* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n\tkol-span-wc > span {\n\t\tdisplay: flex;\n\t\tplace-items: center;\n\t}\n\n\ta,\n\tbutton {\n\t\tcursor: pointer;\n\t}\n\n\t/* font-family is NOT inherited all HTML elements. */\n\tbutton,\n\tinput,\n\toption,\n\tselect,\n\ttextarea {\n\t\tfont-family: inherit;\n\t}\n\n\t/* This is the text label. */\n\t.icon-only > kol-span-wc > span > span {\n\t\tdisplay: none;\n\t}\n}\n\n@layer kol-component {\n\t:host {\n\t\tdisplay: block;\n\t}\n}\n\n@layer kol-component {\n\tkol-button-group-wc {\n\t\tdisplay: inline-flex;\n\t\tflex-wrap: wrap;\n\t}\n\n\tkol-button-group-wc button {\n\t\tborder-bottom-color: transparent;\n\t\tborder-bottom-style: solid;\n\t\tdisplay: block;\n\t}\n\n\tdiv.grid,\n\tdiv[role='tabpanel'] {\n\t\theight: 100%;\n\t}\n\n\t:host > .tabs-align-right {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: 1fr auto;\n\t}\n\n\t:host > .tabs-align-right kol-button-group-wc {\n\t\tdisplay: grid;\n\t\torder: 2;\n\t}\n\n\t:host > .tabs-align-left {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: auto 1fr;\n\t}\n\n\t:host > .tabs-align-left kol-button-group-wc {\n\t\tdisplay: grid;\n\t\torder: 0;\n\t}\n\n\t:host > .tabs-align-bottom {\n\t\tdisplay: grid;\n\t\tgrid-template-rows: 1fr auto;\n\t}\n\n\t:host > .tabs-align-bottom kol-button-group-wc {\n\t\torder: 2;\n\t}\n\n\t:host > .tabs-align-bottom kol-button-group-wc > div {\n\t\tdisplay: flex;\n\t}\n\n\t:host > .tabs-align-bottom > kol-button-group-wc > div > div:first-child {\n\t\tmargin: 0 1em 0 0;\n\t}\n\n\t:host > .tabs-align-bottom > kol-button-group-wc > div > div {\n\t\tmargin: 0 1em;\n\t}\n\n\t:host > .tabs-align-top {\n\t\tdisplay: grid;\n\t\tgrid-template-rows: auto 1fr;\n\t}\n\n\t:host > .tabs-align-top kol-button-group-wc {\n\t\torder: 0;\n\t}\n\n\t:host > .tabs-align-top kol-button-group-wc > div {\n\t\tdisplay: flex;\n\t}\n\n\t:host > .tabs-align-top > kol-button-group-wc > div > div:first-child {\n\t\tmargin: 0 1em 0 0;\n\t}\n\n\t:host > .tabs-align-top > kol-button-group-wc > div > div {\n\t\tmargin: 0 1em;\n\t}\n\n\t:host > div {\n\t\tdisplay: grid;\n\t}\n\n\t:host > .tabs-align-left kol-button-group-wc,\n\t:host > .tabs-align-top kol-button-group-wc {\n\t\torder: 0;\n\t}\n\n\t:host > .tabs-align-bottom kol-button-group-wc,\n\t:host > .tabs-align-right kol-button-group-wc {\n\t\torder: 1;\n\t}\n\n\t:host > div.tabs-align-left kol-button-group-wc > div,\n\t:host > div.tabs-align-left kol-button-group-wc > div > div,\n\t:host > div.tabs-align-right kol-button-group-wc > div,\n\t:host > div.tabs-align-right kol-button-group-wc > div > div {\n\t\tdisplay: grid;\n\t}\n\n\t:host > div.tabs-align-left kol-button-group-wc > div > div kol-button-wc,\n\t:host > div.tabs-align-right kol-button-group-wc > div > div kol-button-wc {\n\t\twidth: 100%;\n\t}\n\n\t:host > div.tabs-align-bottom kol-button-group-wc div,\n\t:host > div.tabs-align-top kol-button-group-wc div {\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t}\n}\n",KolTabs$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.onCreateLabel=`${translate("kol-new")} …`,this.showCreateTab=!1,this.nextPossibleTabIndex=(t,e,n)=>{if(n>0){if(e+n<t.length)return t[e+n]._disabled?this.nextPossibleTabIndex(t,e,n+1):e+n}else if(n<0&&e+n>=0)return t[e+n]._disabled?this.nextPossibleTabIndex(t,e,n-1):e+n;return e},this.onKeyDown=t=>{const e=setTimeout((()=>{clearTimeout(e);let n=null;switch(t.key){case"ArrowRight":n=this.nextPossibleTabIndex(this.state._tabs,this.state._selected,1);break;case"ArrowLeft":n=this.nextPossibleTabIndex(this.state._tabs,this.state._selected,-1)}null!==n&&this.onSelect(t,n,!0)}),250)},this.onClickSelect=(t,e)=>{this.onSelect(t,e,!0)},this.onMouseDown=t=>{t.preventDefault(),t.stopPropagation()},this.callbacks={onClick:this.onClickSelect,onMouseDown:this.onMouseDown},this.catchTabPanelHost=t=>{this.tabPanelHost=t},this.selectNextNotDisabledTab=(t,e,n=!0,o)=>{if(t>e.length-1&&(t=e.length-1),t<0&&(t=0),Array.isArray(e)&&e[t]&&e[t]._disabled){if(!0===n){if(t<e.length-1)return this.selectNextNotDisabledTab(t+1,e,!0,o||t);t=o||t,n=!1}if(!1===n){if(t>0)return this.selectNextNotDisabledTab(t-1,e,!1,o||t);devHint("[KolTabs] Alle Tabs sind deaktiviert und somit kann kein Tab angezeigt werden.")}}return t},this.syncSelectedAndTabs=(t,e,n,o)=>{let i,a;i="_selected"===o?t:this.state._selected,a="_tabs"===o?t:this.state._tabs,a.length>0&&e.set("_selected",this.selectNextNotDisabledTab(i,a))},this.handleTabPanels=()=>{var t,e,n;if(this.tabPanelHost instanceof HTMLDivElement)for(let o=this.tabPanelHost.children.length;o<this.state._tabs.length;o++){const i=document.createElement("div");i.setAttribute("aria-labelledby",`${this.state._label.replace(/\s/g,"-")}-tab-${o}`),i.setAttribute("id",`tabpanel-${o}`),i.setAttribute("role","tabpanel"),i.setAttribute("hidden","");const a=document.createElement("slot");a.setAttribute("name",`tabpanel-slot-${o}`),i.appendChild(a),this.tabPanelHost.appendChild(i),(null===(t=this.host)||void 0===t?void 0:t.children)instanceof HTMLCollection&&(null===(e=this.host)||void 0===e?void 0:e.children[o])&&(null===(n=this.host)||void 0===n||n.children[o].setAttribute("slot",`tabpanel-slot-${o}`))}},this.onCreate=t=>{var e,n;t.preventDefault(),t.stopPropagation(),"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e.onCreate)&&(null===(n=this.state._on)||void 0===n||n.onCreate(t))},this._align="top",this._label=void 0,this._on=void 0,this._selected=0,this._tabs=void 0,this.state={_align:"top",_label:"…",_selected:0,_tabs:[]}}renderButtonGroup(){return h("kol-button-group-wc",{role:"tablist","aria-label":this.state._label,onKeyDown:this.onKeyDown},this.state._tabs.map(((t,e)=>h("kol-button-wc",{_disabled:t._disabled,_icons:t._icons,_hideLabel:t._hideLabel,_label:t._label,_on:this.callbacks,_tabIndex:this.state._selected===e?0:-1,_tooltipAlign:t._tooltipAlign,_variant:this.state._selected===e?"custom":void 0,_customClass:this.state._selected===e?"selected":void 0,_ariaControls:`tabpanel-${e}`,_ariaSelected:this.state._selected===e,_id:`${this.state._label.replace(/\s/g,"-")}-tab-${e}`,_role:"tab",_value:e}))),this.showCreateTab&&h("kol-button-wc",{class:"create-button",_label:this.onCreateLabel,_on:{onClick:this.onCreate}}))}render(){return h(Host,null,h("div",{ref:t=>{this.tabPanelsElement=t},class:{[`tabs-align-${this.state._align}`]:!0}},this.renderButtonGroup(),h("div",{ref:this.catchTabPanelHost})))}validateAlign(t){validateAlign(this,t)}validateLabel(t){validateLabel(this,t)}validateOn(t){if("object"==typeof t&&null!==t){featureHint("[KolTabs] Prüfen, wie man auch einen EventCallback einzeln ändern kann.");const e={};"function"!=typeof t.onCreate&&"object"!=typeof t.onCreate||("object"==typeof t.onCreate?("string"==typeof t.onCreate.label&&t.onCreate.label.length>0?this.onCreateLabel=t.onCreate.label:Log.debug("[KolTabs] Der Label-Text für Neu in {\n onCreate: {\n label: string (!),\n callback: Function\n }\n} ist nicht korrekt gesetzt."),"function"==typeof t.onCreate.callback?e.onCreate=t.onCreate.callback:Log.debug("[KolTabs] Die onCreate-Callback-Funktion für Neu in {\n onCreate: {\n label: string,\n callback: Function (!)\n }\n} ist nicht korrekt gesetzt.")):e.onCreate=t.onCreate,this.showCreateTab="function"==typeof e.onCreate),"function"==typeof t.onSelect&&(e.onSelect=t.onSelect),setState(this,"_on",e)}}validateSelected(t){watchNumber(this,"_selected",t,{hooks:{beforePatch:this.syncSelectedAndTabs}})}validateTabs(t){watchJsonArrayString(this,"_tabs",(t=>"object"==typeof t&&null!==t&&"string"==typeof t._label&&t._label.length>0),t,void 0,{hooks:{beforePatch:this.syncSelectedAndTabs}}),uiUxHintMillerscheZahl("KolTabs",this.state._tabs.length)}componentWillLoad(){this.validateAlign(this._align),this.validateLabel(this._label),this.validateOn(this._on),this.validateSelected(this._selected),this.validateTabs(this._tabs)}componentDidRender(){if(this.handleTabPanels(),this.tabPanelHost instanceof HTMLDivElement)for(let t=0;t<this.tabPanelHost.children.length;t++)t!==this.state._selected?this.tabPanelHost.children[t].setAttribute("hidden",""):this.tabPanelHost.children[t].removeAttribute("hidden")}onSelect(t,e,n=!1){var o,i;this._selected=e,"function"==typeof(null===(o=this._on)||void 0===o?void 0:o.onSelect)&&(null===(i=this._on)||void 0===i||i.onSelect(t,e)),!0===n&&(this.selectedTimeout=setTimeout((()=>{if(clearTimeout(this.selectedTimeout),this.tabPanelsElement){const t=koliBriQuerySelector(`button#${this.state._label.replace(/\s/g,"-")}-tab-${e}`,this.tabPanelsElement);null==t||t.focus()}}),250))}get host(){return this}static get watchers(){return{_align:["validateAlign"],_label:["validateLabel"],_on:["validateOn"],_selected:["validateSelected"],_tabs:["validateTabs"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-tabs",{_align:[1],_label:[1],_on:[16],_selected:[1538],_tabs:[1],state:[32]},void 0,{_align:["validateAlign"],_label:["validateLabel"],_on:["validateOn"],_selected:["validateSelected"],_tabs:["validateTabs"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-tabs","kol-button-group-wc","kol-button-wc","kol-icon","kol-span-wc","kol-tooltip-wc"].forEach((t=>{switch(t){case"kol-tabs":customElements.get(t)||customElements.define(t,KolTabs$1);break;case"kol-button-group-wc":customElements.get(t)||defineCustomElement$6();break;case"kol-button-wc":customElements.get(t)||defineCustomElement$5();break;case"kol-icon":customElements.get(t)||defineCustomElement$4();break;case"kol-span-wc":customElements.get(t)||defineCustomElement$3();break;case"kol-tooltip-wc":customElements.get(t)||defineCustomElement$2()}}))}const KolTabs=KolTabs$1,defineCustomElement=defineCustomElement$1;export{KolTabs,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{a as translate}from"./i18n.js";import{b as validateAlign}from"./floating-ui.dom.esm.js";import{v as validateLabel}from"./label.js";import{d as devHint,q as featureHint,L as Log,t as setState,D as watchNumber,H as watchJsonArrayString,I as uiUxHintMillerscheZahl,R as koliBriQuerySelector}from"./prop.validators.js";import{d as defineCustomElement$6}from"./component10.js";import{d as defineCustomElement$5}from"./component5.js";import{d as defineCustomElement$4}from"./component.js";import{d as defineCustomElement$3}from"./component2.js";import{d as defineCustomElement$2}from"./component3.js";const defaultStyleCss="@layer kol-global {\n\t/*\n\t * This file contains all rules for accessibility.\n\t */\n\t:host {\n\t\t/*\n\t\t * Minimum size of interactive elements.\n\t\t */\n\t\t--a11y-min-size: 44px;\n\t\tfont-size: inherit;\n\t}\n\n\t* {\n\t\t/*\n\t\t * Verdana is an accessible font that can be used without requiring additional loading time.\n\t\t */\n\t\tfont-family: Verdana;\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\thyphens: auto;\n\t\t/*\n\t\t * Letter spacing is required for all texts.\n\t\t */\n\t\tletter-spacing: inherit;\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\tword-break: break-word;\n\t\t/*\n\t\t * Word spacing is required for all texts.\n\t\t */\n\t\tword-spacing: inherit;\n\t}\n\n\t/*\n\t * All interactive elements should have a minimum size of 44px.\n\t */\n\t/* input:not([type='checkbox'], [type='radio'], [type='range']), */\n\t/* option, */\n\t/* select, */\n\t/* textarea, */\n\t[role='button'],\n\tbutton:not([role='link']),\n\tkol-input .input {\n\t\tmin-height: var(--a11y-min-size);\n\t\tmin-width: var(--a11y-min-size);\n\t}\n\n\t/*\n\t * Some interactive elements should not inherit the font-family and font-size.\n\t */\n\ta,\n\tbutton,\n\th1,\n\th2,\n\th3,\n\th4,\n\th5,\n\th6,\n\tinput,\n\toption,\n\tselect,\n\ttextarea {\n\t\t/*\n\t\t * All elements should inherit the font family from his parent element.\n\t\t */\n\t\tfont-family: inherit;\n\t\t/*\n\t\t * All elements should inherit the font size from his parent element.\n\t\t */\n\t\tfont-size: inherit;\n\t}\n}\n\n@layer kol-global {\n\t/*\n\t * Dieses CSS stellt sicher, dass der Standard-Style\n\t * von A und Button resettet werden.\n\t */\n\t:is(a, button) {\n\t\tbackground-color: transparent;\n\t\tborder: none;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\twidth: 100%; /* 100% needed for custom width from outside */\n\t}\n}\n\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * The max-width is needed to prevent the table from overflowing the\n\t\t * parent node, if the table is wider than the parent node.\n\t\t */\n\t\tmax-width: 100%;\n\t}\n\n\t* {\n\t\t/*\n\t\t * We prefer to box-sizing: border-box for all elements.\n\t\t */\n\t\tbox-sizing: border-box;\n\t}\n\n\t/* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n\tkol-span-wc {\n\t\tdisplay: grid;\n\t\tplace-items: center;\n\t}\n\n\t/* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n\tkol-span-wc > span {\n\t\tdisplay: flex;\n\t\tplace-items: center;\n\t}\n\n\ta,\n\tbutton {\n\t\tcursor: pointer;\n\t}\n\n\t/* font-family is NOT inherited all HTML elements. */\n\tbutton,\n\tinput,\n\toption,\n\tselect,\n\ttextarea {\n\t\tfont-family: inherit;\n\t}\n\n\t/* This is the text label. */\n\t.icon-only > kol-span-wc > span > span {\n\t\tdisplay: none;\n\t}\n}\n\n@layer kol-component {\n\t:host {\n\t\tdisplay: block;\n\t}\n}\n\n@layer kol-component {\n\tkol-button-group-wc {\n\t\tdisplay: inline-flex;\n\t\tflex-wrap: wrap;\n\t}\n\n\tkol-button-group-wc button {\n\t\tborder-bottom-color: transparent;\n\t\tborder-bottom-style: solid;\n\t\tdisplay: block;\n\t}\n\n\tdiv.grid,\n\tdiv[role='tabpanel'] {\n\t\theight: 100%;\n\t}\n\n\t:host > .tabs-align-right {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: 1fr auto;\n\t}\n\n\t:host > .tabs-align-right kol-button-group-wc {\n\t\tdisplay: grid;\n\t\torder: 2;\n\t}\n\n\t:host > .tabs-align-left {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: auto 1fr;\n\t}\n\n\t:host > .tabs-align-left kol-button-group-wc {\n\t\tdisplay: grid;\n\t\torder: 0;\n\t}\n\n\t:host > .tabs-align-bottom {\n\t\tdisplay: grid;\n\t\tgrid-template-rows: 1fr auto;\n\t}\n\n\t:host > .tabs-align-bottom kol-button-group-wc {\n\t\torder: 2;\n\t}\n\n\t:host > .tabs-align-bottom kol-button-group-wc > div {\n\t\tdisplay: flex;\n\t}\n\n\t:host > .tabs-align-bottom > kol-button-group-wc > div > div:first-child {\n\t\tmargin: 0 1em 0 0;\n\t}\n\n\t:host > .tabs-align-bottom > kol-button-group-wc > div > div {\n\t\tmargin: 0 1em;\n\t}\n\n\t:host > .tabs-align-top {\n\t\tdisplay: grid;\n\t\tgrid-template-rows: auto 1fr;\n\t}\n\n\t:host > .tabs-align-top kol-button-group-wc {\n\t\torder: 0;\n\t}\n\n\t:host > .tabs-align-top kol-button-group-wc > div {\n\t\tdisplay: flex;\n\t}\n\n\t:host > .tabs-align-top > kol-button-group-wc > div > div:first-child {\n\t\tmargin: 0 1em 0 0;\n\t}\n\n\t:host > .tabs-align-top > kol-button-group-wc > div > div {\n\t\tmargin: 0 1em;\n\t}\n\n\t:host > div {\n\t\tdisplay: grid;\n\t}\n\n\t:host > .tabs-align-left kol-button-group-wc,\n\t:host > .tabs-align-top kol-button-group-wc {\n\t\torder: 0;\n\t}\n\n\t:host > .tabs-align-bottom kol-button-group-wc,\n\t:host > .tabs-align-right kol-button-group-wc {\n\t\torder: 1;\n\t}\n\n\t:host > div.tabs-align-left kol-button-group-wc > div,\n\t:host > div.tabs-align-left kol-button-group-wc > div > div,\n\t:host > div.tabs-align-right kol-button-group-wc > div,\n\t:host > div.tabs-align-right kol-button-group-wc > div > div {\n\t\tdisplay: grid;\n\t}\n\n\t:host > div.tabs-align-left kol-button-group-wc > div > div kol-button-wc,\n\t:host > div.tabs-align-right kol-button-group-wc > div > div kol-button-wc {\n\t\twidth: 100%;\n\t}\n\n\t:host > div.tabs-align-bottom kol-button-group-wc div,\n\t:host > div.tabs-align-top kol-button-group-wc div {\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t}\n}\n",KolTabs$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.onCreateLabel=`${translate("kol-new")} …`,this.showCreateTab=!1,this.nextPossibleTabIndex=(t,e,n)=>{if(n>0){if(e+n<t.length)return t[e+n]._disabled?this.nextPossibleTabIndex(t,e,n+1):e+n}else if(n<0&&e+n>=0)return t[e+n]._disabled?this.nextPossibleTabIndex(t,e,n-1):e+n;return e},this.onKeyDown=t=>{const e=setTimeout((()=>{clearTimeout(e);let n=null;switch(t.key){case"ArrowRight":n=this.nextPossibleTabIndex(this.state._tabs,this.state._selected,1);break;case"ArrowLeft":n=this.nextPossibleTabIndex(this.state._tabs,this.state._selected,-1)}null!==n&&this.onSelect(t,n,!0)}),250)},this.onClickSelect=(t,e)=>{this.onSelect(t,e,!0)},this.onMouseDown=t=>{t.preventDefault(),t.stopPropagation()},this.callbacks={onClick:this.onClickSelect,onMouseDown:this.onMouseDown},this.catchTabPanelHost=t=>{this.tabPanelHost=t},this.selectNextNotDisabledTab=(t,e,n=!0,o)=>{if(t>e.length-1&&(t=e.length-1),t<0&&(t=0),Array.isArray(e)&&e[t]&&e[t]._disabled){if(!0===n){if(t<e.length-1)return this.selectNextNotDisabledTab(t+1,e,!0,o||t);t=o||t,n=!1}if(!1===n){if(t>0)return this.selectNextNotDisabledTab(t-1,e,!1,o||t);devHint("[KolTabs] Alle Tabs sind deaktiviert und somit kann kein Tab angezeigt werden.")}}return t},this.syncSelectedAndTabs=(t,e,n,o)=>{let i,a;i="_selected"===o?t:this.state._selected,a="_tabs"===o?t:this.state._tabs,a.length>0&&e.set("_selected",this.selectNextNotDisabledTab(i,a))},this.handleTabPanels=()=>{var t,e,n;if(this.tabPanelHost instanceof HTMLDivElement)for(let o=this.tabPanelHost.children.length;o<this.state._tabs.length;o++){const i=document.createElement("div");i.setAttribute("aria-labelledby",`${this.state._label.replace(/\s/g,"-")}-tab-${o}`),i.setAttribute("id",`tabpanel-${o}`),i.setAttribute("role","tabpanel"),i.setAttribute("hidden","");const a=document.createElement("slot");a.setAttribute("name",`tabpanel-slot-${o}`),i.appendChild(a),this.tabPanelHost.appendChild(i),(null===(t=this.host)||void 0===t?void 0:t.children)instanceof HTMLCollection&&(null===(e=this.host)||void 0===e?void 0:e.children[o])&&(null===(n=this.host)||void 0===n||n.children[o].setAttribute("slot",`tabpanel-slot-${o}`))}},this.onCreate=t=>{var e,n;t.preventDefault(),t.stopPropagation(),"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e.onCreate)&&(null===(n=this.state._on)||void 0===n||n.onCreate(t))},this._align="top",this._label=void 0,this._on=void 0,this._selected=0,this._tabs=void 0,this.state={_align:"top",_label:"…",_selected:0,_tabs:[]}}renderButtonGroup(){return h("kol-button-group-wc",{role:"tablist","aria-label":this.state._label,onKeyDown:this.onKeyDown},this.state._tabs.map(((t,e)=>h("kol-button-wc",{_disabled:t._disabled,_icons:t._icons,_hideLabel:t._hideLabel,_label:t._label,_on:this.callbacks,_tabIndex:this.state._selected===e?0:-1,_tooltipAlign:t._tooltipAlign,_variant:this.state._selected===e?"custom":void 0,_customClass:this.state._selected===e?"selected":void 0,_ariaControls:`tabpanel-${e}`,_ariaSelected:this.state._selected===e,_id:`${this.state._label.replace(/\s/g,"-")}-tab-${e}`,_role:"tab",_value:e}))),this.showCreateTab&&h("kol-button-wc",{class:"create-button",_label:this.onCreateLabel,_on:{onClick:this.onCreate}}))}render(){return h(Host,null,h("div",{ref:t=>{this.tabPanelsElement=t},class:{[`tabs-align-${this.state._align}`]:!0}},this.renderButtonGroup(),h("div",{ref:this.catchTabPanelHost})))}validateAlign(t){validateAlign(this,t)}validateLabel(t){validateLabel(this,t)}validateOn(t){if("object"==typeof t&&null!==t){featureHint("[KolTabs] Prüfen, wie man auch einen EventCallback einzeln ändern kann.");const e={};"function"!=typeof t.onCreate&&"object"!=typeof t.onCreate||("object"==typeof t.onCreate?("string"==typeof t.onCreate.label&&t.onCreate.label.length>0?this.onCreateLabel=t.onCreate.label:Log.debug("[KolTabs] Der Label-Text für Neu in {\n onCreate: {\n label: string (!),\n callback: Function\n }\n} ist nicht korrekt gesetzt."),"function"==typeof t.onCreate.callback?e.onCreate=t.onCreate.callback:Log.debug("[KolTabs] Die onCreate-Callback-Funktion für Neu in {\n onCreate: {\n label: string,\n callback: Function (!)\n }\n} ist nicht korrekt gesetzt.")):e.onCreate=t.onCreate,this.showCreateTab="function"==typeof e.onCreate),"function"==typeof t.onSelect&&(e.onSelect=t.onSelect),setState(this,"_on",e)}}validateSelected(t){watchNumber(this,"_selected",t,{hooks:{beforePatch:this.syncSelectedAndTabs}})}validateTabs(t){watchJsonArrayString(this,"_tabs",(t=>"object"==typeof t&&null!==t&&"string"==typeof t._label&&t._label.length>0),t,void 0,{hooks:{beforePatch:this.syncSelectedAndTabs}}),uiUxHintMillerscheZahl("KolTabs",this.state._tabs.length)}componentWillLoad(){this.validateAlign(this._align),this.validateLabel(this._label),this.validateOn(this._on),this.validateSelected(this._selected),this.validateTabs(this._tabs)}componentDidRender(){if(this.handleTabPanels(),this.tabPanelHost instanceof HTMLDivElement)for(let t=0;t<this.tabPanelHost.children.length;t++)t!==this.state._selected?this.tabPanelHost.children[t].setAttribute("hidden",""):this.tabPanelHost.children[t].removeAttribute("hidden")}onSelect(t,e,n=!1){var o,i;this._selected=e,"function"==typeof(null===(o=this._on)||void 0===o?void 0:o.onSelect)&&(null===(i=this._on)||void 0===i||i.onSelect(t,e)),!0===n&&(this.selectedTimeout=setTimeout((()=>{if(clearTimeout(this.selectedTimeout),this.tabPanelsElement){const t=koliBriQuerySelector(`button#${this.state._label.replace(/\s/g,"-")}-tab-${e}`,this.tabPanelsElement);null==t||t.focus()}}),250))}get host(){return this}static get watchers(){return{_align:["validateAlign"],_label:["validateLabel"],_on:["validateOn"],_selected:["validateSelected"],_tabs:["validateTabs"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-tabs",{_align:[1],_label:[1],_on:[16],_selected:[1538],_tabs:[1],state:[32]},void 0,{_align:["validateAlign"],_label:["validateLabel"],_on:["validateOn"],_selected:["validateSelected"],_tabs:["validateTabs"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-tabs","kol-button-group-wc","kol-button-wc","kol-icon","kol-span-wc","kol-tooltip-wc"].forEach((t=>{switch(t){case"kol-tabs":customElements.get(t)||customElements.define(t,KolTabs$1);break;case"kol-button-group-wc":customElements.get(t)||defineCustomElement$6();break;case"kol-button-wc":customElements.get(t)||defineCustomElement$5();break;case"kol-icon":customElements.get(t)||defineCustomElement$4();break;case"kol-span-wc":customElements.get(t)||defineCustomElement$3();break;case"kol-tooltip-wc":customElements.get(t)||defineCustomElement$2()}}))}const KolTabs=KolTabs$1,defineCustomElement=defineCustomElement$1;export{KolTabs,defineCustomElement};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{e as watchBoolean,D as watchNumber,b as watchString,w as watchValidator,a as a11yHint,B as propagateFocus,t as setState,n as nonce,l as showExpertSlot}from"./prop.validators.js";import{I as InputController,v as validateHideError,g as getRenderStates}from"./controller.js";import{I as InternalUnderlinedAccessKey,d as defineCustomElement$3}from"./component2.js";import{v as validateRows}from"./rows.js";import{d as defineCustomElement$9}from"./shadow.js";import{d as defineCustomElement$8}from"./component6.js";import{d as defineCustomElement$7}from"./component5.js";import{d as defineCustomElement$6}from"./component4.js";import{d as defineCustomElement$5}from"./component.js";import{d as defineCustomElement$4}from"./component13.js";import{d as defineCustomElement$2}from"./component3.js";class TextareaController extends InputController{constructor(t,e,n){super(t,e,n),this.afterSyncCharCounter=()=>{"string"==typeof this.component._value&&this.component._value.length>0&&(this.component.state._currentLength=this.component._value.length)},this.component=t}validateHasCounter(t){watchBoolean(this.component,"_hasCounter",t,{hooks:{afterPatch:this.afterSyncCharCounter}})}validateHideError(t){validateHideError(this.component,t,{hooks:{afterPatch:()=>{this.component.state._hideError&&a11yHint("Property hide-error for inputs: Only use when the error message is shown outside of the input component.")}}})}validateMaxLength(t){watchNumber(this.component,"_maxLength",t,{hooks:{afterPatch:this.afterSyncCharCounter},min:0})}validatePlaceholder(t){watchString(this.component,"_placeholder",t)}validateReadOnly(t){watchBoolean(this.component,"_readOnly",t)}validateResize(t){watchValidator(this.component,"_resize",(t=>"string"==typeof t&&("both"===t||"horizontal"===t||"none"===t||"vertical"===t)),new Set("String {both, horizontal, vertical, none}"),t)}validateRequired(t){watchBoolean(this.component,"_required",t)}validateRows(t){validateRows(this.component,t)}validateValue(t){watchString(this.component,"_value",t,{hooks:{afterPatch:this.afterSyncCharCounter}}),this.setFormAssociatedValue(this.component._value)}componentWillLoad(){super.componentWillLoad(),this.validateHasCounter(this.component._hasCounter),this.validateHideError(this.component._hideError),this.validateMaxLength(this.component._maxLength),this.validatePlaceholder(this.component._placeholder),this.validateReadOnly(this.component._readOnly),this.validateResize(this.component._resize),this.validateRequired(this.component._required),this.validateRows(this.component._rows),this.validateValue(this.component._value)}}const defaultStyleCss="@layer kol-global {\n\t/*\n\t * This file contains all rules for accessibility.\n\t */\n\t:host {\n\t\t/*\n\t\t * Minimum size of interactive elements.\n\t\t */\n\t\t--a11y-min-size: 44px;\n\t\tfont-size: inherit;\n\t}\n\n\t* {\n\t\t/*\n\t\t * Verdana is an accessible font that can be used without requiring additional loading time.\n\t\t */\n\t\tfont-family: Verdana;\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\thyphens: auto;\n\t\t/*\n\t\t * Letter spacing is required for all texts.\n\t\t */\n\t\tletter-spacing: inherit;\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\tword-break: break-word;\n\t\t/*\n\t\t * Word spacing is required for all texts.\n\t\t */\n\t\tword-spacing: inherit;\n\t}\n\n\t/*\n\t * All interactive elements should have a minimum size of 44px.\n\t */\n\t/* input:not([type='checkbox'], [type='radio'], [type='range']), */\n\t/* option, */\n\t/* select, */\n\t/* textarea, */\n\t[role='button'],\n\tbutton:not([role='link']),\n\tkol-input .input {\n\t\tmin-height: var(--a11y-min-size);\n\t\tmin-width: var(--a11y-min-size);\n\t}\n\n\t/*\n\t * Some interactive elements should not inherit the font-family and font-size.\n\t */\n\ta,\n\tbutton,\n\th1,\n\th2,\n\th3,\n\th4,\n\th5,\n\th6,\n\tinput,\n\toption,\n\tselect,\n\ttextarea {\n\t\t/*\n\t\t * All elements should inherit the font family from his parent element.\n\t\t */\n\t\tfont-family: inherit;\n\t\t/*\n\t\t * All elements should inherit the font size from his parent element.\n\t\t */\n\t\tfont-size: inherit;\n\t}\n}\n\n@layer kol-global {\n\t/*\n\t * Dieses CSS stellt sicher, dass der Standard-Style\n\t * von A und Button resettet werden.\n\t */\n\t:is(a, button) {\n\t\tbackground-color: transparent;\n\t\tborder: none;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\twidth: 100%; /* 100% needed for custom width from outside */\n\t}\n}\n\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * The max-width is needed to prevent the table from overflowing the\n\t\t * parent node, if the table is wider than the parent node.\n\t\t */\n\t\tmax-width: 100%;\n\t}\n\n\t* {\n\t\t/*\n\t\t * We prefer to box-sizing: border-box for all elements.\n\t\t */\n\t\tbox-sizing: border-box;\n\t}\n\n\t/* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n\tkol-span-wc {\n\t\tdisplay: grid;\n\t\tplace-items: center;\n\t}\n\n\t/* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n\tkol-span-wc > span {\n\t\tdisplay: flex;\n\t\tplace-items: center;\n\t}\n\n\ta,\n\tbutton {\n\t\tcursor: pointer;\n\t}\n\n\t/* font-family is NOT inherited all HTML elements. */\n\tbutton,\n\tinput,\n\toption,\n\tselect,\n\ttextarea {\n\t\tfont-family: inherit;\n\t}\n\n\t/* This is the text label. */\n\t.icon-only > kol-span-wc > span > span {\n\t\tdisplay: none;\n\t}\n}\n\n@layer kol-component {\n\t.required label > span::after,\n\t.required legend > span::after {\n\t\tcontent: '*';\n\t}\n}\n\n@layer kol-component {\n\t:host {\n\t\tdisplay: block;\n\t}\n}\n\n@layer kol-component {\n\tinput,\n\ttextarea {\n\t\tcursor: text;\n\t}\n\n\tinput[type='checkbox'],\n\tinput[type='color'],\n\tinput[type='file'],\n\tinput[type='radio'],\n\tinput[type='range'],\n\tlabel,\n\toption,\n\tselect {\n\t\tcursor: pointer;\n\t}\n\n\t/* input[type='checkbox'], */\n\t/* input[type='radio'], */\n\t/* input[type='range'], */\n\tinput[type='color'],\n\tinput[type='date'],\n\tinput[type='datetime-local'],\n\tinput[type='email'],\n\tinput[type='file'],\n\tinput[type='month'],\n\tinput[type='number'],\n\tinput[type='password'],\n\tinput[type='search'],\n\tinput[type='tel'],\n\tinput[type='text'],\n\tinput[type='time'],\n\tinput[type='url'],\n\tinput[type='week'],\n\tselect,\n\tselect[multiple] option,\n\ttextarea {\n\t\tfont-size: 1rem;\n\t\twidth: 100%;\n\t}\n\n\t/* needed hack for vertical alignment */\n\tinput[type='file'] {\n\t\tpadding: calc((var(--a11y-min-size) - 1rem) / 10) 0.5em;\n\t}\n\n\t/* needed hack for vertical alignment */\n\tselect[multiple] option {\n\t\tpadding: calc((var(--a11y-min-size) - 1rem) / 2) 0.5em;\n\t}\n\n\tkol-input.disabled :is(button, input, label, option, select, textarea) {\n\t\tcursor: not-allowed;\n\t\topacity: 0.5;\n\t}\n}\n\n@layer kol-component {\n\tkol-input {\n\t\tdisplay: grid;\n\t}\n\n\tkol-input .input-slot {\n\t\tflex-grow: 1;\n\t}\n\n\tinput:not([type='checkbox'], [type='radio']),\n\tselect:not([multiple], [size]) {\n\t\theight: 2.75em;\n\t}\n\n\tinput:focus,\n\toption:focus,\n\tselect:focus,\n\ttextarea:focus {\n\t\toutline: 0;\n\t}\n\n\t.input {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\n\t.input > kol-icon {\n\t\tdisplay: grid;\n\t\theight: var(--a11y-min-size);\n\t\tplace-items: center;\n\t}\n\n\tkol-input.required .input-tooltip .span-label::after {\n\t\tcontent: '*';\n\t}\n}\n\n@layer kol-component {\n\t.error.hidden {\n\t\tdisplay: none;\n\t}\n}\n",increaseTextareaHeight=t=>{t.style.overflow="hidden";const e=t.rows,n=t.clientHeight/e;t.rows=1;const a=Math.round(t.scrollHeight/n);return t.rows=e,a},KolTextarea$1=proxyCustomElement(class extends HTMLElement{render(){const{ariaDescribedBy:t}=getRenderStates(this.state),e=showExpertSlot(this.state._label);return h(Host,{class:{"has-value":this.state._hasValue}},h("kol-input",{class:{textarea:!0,"hide-label":!!this.state._hideLabel,"has-counter":!!this.state._hasCounter},_accessKey:this.state._accessKey,_alert:this.state._alert,_currentLength:this.state._currentLength,_disabled:this.state._disabled,_error:this.state._error,_hideError:this.state._hideError,_hasCounter:this.state._hasCounter,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_id:this.state._id,_label:this.state._label,_maxLength:this.state._maxLength,_readOnly:this.state._readOnly,_required:this.state._required,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched,onClick:()=>{var t;return null===(t=this.ref)||void 0===t?void 0:t.focus()}},h("span",{slot:"label"},e?h("slot",{name:"expert"}):"string"==typeof this.state._accessKey?h("span",null,h(InternalUnderlinedAccessKey,{accessKey:this.state._accessKey,label:this.state._label}),h("span",{class:"access-key-hint","aria-hidden":"true"},this.state._accessKey)):h("span",null,this.state._label)),h("div",{slot:"input"},h("textarea",Object.assign({ref:this.catchRef,title:"",accessKey:this.state._accessKey,"aria-describedby":t.length>0?t.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,autoCapitalize:"off",autoCorrect:"off",disabled:this.state._disabled,id:this.state._id,maxlength:this.state._maxLength,name:this.state._name,readOnly:this.state._readOnly,required:this.state._required,rows:this.state._rows,placeholder:this.state._placeholder,spellcheck:"false"},this.controller.onFacade,{onKeyUp:this.onKeyUp,style:{resize:this.state._resize},value:this.state._value})))))}constructor(){super(),this.__registerHost(),this.__attachShadow(),this.catchRef=t=>{this.ref=t,propagateFocus(this.host,this.ref)},this.onKeyUp=()=>{this.ref instanceof HTMLTextAreaElement&&(setState(this,"_currentLength",this.ref.value.length),this.state._adjustHeight&&(this._rows=increaseTextareaHeight(this.ref)))},this._accessKey=void 0,this._adjustHeight=!1,this._alert=!0,this._disabled=!1,this._error=void 0,this._hasCounter=!1,this._hideError=!1,this._hideLabel=!1,this._hint="",this._id=void 0,this._label=void 0,this._maxLength=void 0,this._name=void 0,this._on=void 0,this._placeholder=void 0,this._readOnly=!1,this._resize="vertical",this._required=!1,this._rows=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_adjustHeight:!1,_currentLength:0,_hasValue:!1,_hideError:!1,_id:`id-${nonce()}`,_label:"",_resize:"vertical"},this.controller=new TextareaController(this,"textarea",this.host)}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAdjustHeight(t){this.controller.validateAdjustHeight(t)}validateAlert(t){this.controller.validateAlert(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateError(t){this.controller.validateError(t)}validateHasCounter(t){this.controller.validateHasCounter(t)}validateHideError(t){this.controller.validateHideError(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateMaxLength(t){this.controller.validateMaxLength(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validatePlaceholder(t){this.controller.validatePlaceholder(t)}validateReadOnly(t){this.controller.validateReadOnly(t)}validateResize(t){this.controller.validateResize(t)}validateRequired(t){this.controller.validateRequired(t)}validateRows(t){this.controller.validateRows(t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTabIndex(t){this.controller.validateTabIndex(t)}validateTouched(t){this.controller.validateTouched(t)}validateValue(t){this.controller.validateValue(t)}componentWillLoad(){this._alert=!0===this._alert,this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener((t=>this.state._hasValue=!!t))}get host(){return this}static get watchers(){return{_accessKey:["validateAccessKey"],_adjustHeight:["validateAdjustHeight"],_alert:["validateAlert"],_disabled:["validateDisabled"],_error:["validateError"],_hasCounter:["validateHasCounter"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_id:["validateId"],_label:["validateLabel"],_maxLength:["validateMaxLength"],_name:["validateName"],_on:["validateOn"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_resize:["validateResize"],_required:["validateRequired"],_rows:["validateRows"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-textarea",{_accessKey:[1,"_access-key"],_adjustHeight:[4,"_adjust-height"],_alert:[1540],_disabled:[4],_error:[1],_hasCounter:[4,"_has-counter"],_hideError:[1540,"_hide-error"],_hideLabel:[4,"_hide-label"],_hint:[1],_id:[1],_label:[1],_maxLength:[2,"_max-length"],_name:[1],_on:[16],_placeholder:[1],_readOnly:[4,"_read-only"],_resize:[1],_required:[4],_rows:[1026],_syncValueBySelector:[1,"_sync-value-by-selector"],_tabIndex:[2,"_tab-index"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_value:[1],state:[32]},void 0,{_accessKey:["validateAccessKey"],_adjustHeight:["validateAdjustHeight"],_alert:["validateAlert"],_disabled:["validateDisabled"],_error:["validateError"],_hasCounter:["validateHasCounter"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_id:["validateId"],_label:["validateLabel"],_maxLength:["validateMaxLength"],_name:["validateName"],_on:["validateOn"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_resize:["validateResize"],_required:["validateRequired"],_rows:["validateRows"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-textarea","kol-alert","kol-alert-wc","kol-button-wc","kol-heading-wc","kol-icon","kol-input","kol-span-wc","kol-tooltip-wc"].forEach((t=>{switch(t){case"kol-textarea":customElements.get(t)||customElements.define(t,KolTextarea$1);break;case"kol-alert":customElements.get(t)||defineCustomElement$9();break;case"kol-alert-wc":customElements.get(t)||defineCustomElement$8();break;case"kol-button-wc":customElements.get(t)||defineCustomElement$7();break;case"kol-heading-wc":customElements.get(t)||defineCustomElement$6();break;case"kol-icon":customElements.get(t)||defineCustomElement$5();break;case"kol-input":customElements.get(t)||defineCustomElement$4();break;case"kol-span-wc":customElements.get(t)||defineCustomElement$3();break;case"kol-tooltip-wc":customElements.get(t)||defineCustomElement$2()}}))}const KolTextarea=KolTextarea$1,defineCustomElement=defineCustomElement$1;export{KolTextarea,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host,Fragment}from"@stencil/core/internal/client";import{e as watchBoolean,D as watchNumber,b as watchString,w as watchValidator,a as a11yHint,B as propagateFocus,t as setState,n as nonce,l as showExpertSlot}from"./prop.validators.js";import{I as InputController,v as validateHideError,g as getRenderStates}from"./controller.js";import{I as InternalUnderlinedAccessKey,d as defineCustomElement$3}from"./component2.js";import{v as validateRows}from"./rows.js";import{d as defineCustomElement$9}from"./shadow.js";import{d as defineCustomElement$8}from"./component6.js";import{d as defineCustomElement$7}from"./component5.js";import{d as defineCustomElement$6}from"./component4.js";import{d as defineCustomElement$5}from"./component.js";import{d as defineCustomElement$4}from"./component13.js";import{d as defineCustomElement$2}from"./component3.js";const cssResizeOptions=["both","horizontal","vertical","none"];class TextareaController extends InputController{constructor(t,e,n){super(t,e,n),this.afterSyncCharCounter=()=>{"string"==typeof this.component._value&&this.component._value.length>0&&(this.component.state._currentLength=this.component._value.length)},this.component=t}validateHasCounter(t){watchBoolean(this.component,"_hasCounter",t,{hooks:{afterPatch:this.afterSyncCharCounter}})}validateHideError(t){validateHideError(this.component,t,{hooks:{afterPatch:()=>{this.component.state._hideError&&a11yHint("Property hide-error for inputs: Only use when the error message is shown outside of the input component.")}}})}validateMaxLength(t){watchNumber(this.component,"_maxLength",t,{hooks:{afterPatch:this.afterSyncCharCounter},min:0})}validatePlaceholder(t){watchString(this.component,"_placeholder",t)}validateReadOnly(t){watchBoolean(this.component,"_readOnly",t)}validateResize(t){watchValidator(this.component,"_resize",(t=>"string"==typeof t&&cssResizeOptions.includes(t)),new Set(`String {${cssResizeOptions.join(", ")}`),t)}validateRequired(t){watchBoolean(this.component,"_required",t)}validateRows(t){validateRows(this.component,t)}validateValue(t){watchString(this.component,"_value",t,{hooks:{afterPatch:this.afterSyncCharCounter}}),this.setFormAssociatedValue(this.component._value)}componentWillLoad(){super.componentWillLoad(),this.validateHasCounter(this.component._hasCounter),this.validateHideError(this.component._hideError),this.validateMaxLength(this.component._maxLength),this.validatePlaceholder(this.component._placeholder),this.validateReadOnly(this.component._readOnly),this.validateResize(this.component._resize),this.validateRequired(this.component._required),this.validateRows(this.component._rows),this.validateValue(this.component._value)}}const defaultStyleCss="@layer kol-global {\n\t/*\n\t * This file contains all rules for accessibility.\n\t */\n\t:host {\n\t\t/*\n\t\t * Minimum size of interactive elements.\n\t\t */\n\t\t--a11y-min-size: 44px;\n\t\tfont-size: inherit;\n\t}\n\n\t* {\n\t\t/*\n\t\t * Verdana is an accessible font that can be used without requiring additional loading time.\n\t\t */\n\t\tfont-family: Verdana;\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\thyphens: auto;\n\t\t/*\n\t\t * Letter spacing is required for all texts.\n\t\t */\n\t\tletter-spacing: inherit;\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\tword-break: break-word;\n\t\t/*\n\t\t * Word spacing is required for all texts.\n\t\t */\n\t\tword-spacing: inherit;\n\t}\n\n\t/*\n\t * All interactive elements should have a minimum size of 44px.\n\t */\n\t/* input:not([type='checkbox'], [type='radio'], [type='range']), */\n\t/* option, */\n\t/* select, */\n\t/* textarea, */\n\t[role='button'],\n\tbutton:not([role='link']),\n\tkol-input .input {\n\t\tmin-height: var(--a11y-min-size);\n\t\tmin-width: var(--a11y-min-size);\n\t}\n\n\t/*\n\t * Some interactive elements should not inherit the font-family and font-size.\n\t */\n\ta,\n\tbutton,\n\th1,\n\th2,\n\th3,\n\th4,\n\th5,\n\th6,\n\tinput,\n\toption,\n\tselect,\n\ttextarea {\n\t\t/*\n\t\t * All elements should inherit the font family from his parent element.\n\t\t */\n\t\tfont-family: inherit;\n\t\t/*\n\t\t * All elements should inherit the font size from his parent element.\n\t\t */\n\t\tfont-size: inherit;\n\t}\n}\n\n@layer kol-global {\n\t/*\n\t * Dieses CSS stellt sicher, dass der Standard-Style\n\t * von A und Button resettet werden.\n\t */\n\t:is(a, button) {\n\t\tbackground-color: transparent;\n\t\tborder: none;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\twidth: 100%; /* 100% needed for custom width from outside */\n\t}\n}\n\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * The max-width is needed to prevent the table from overflowing the\n\t\t * parent node, if the table is wider than the parent node.\n\t\t */\n\t\tmax-width: 100%;\n\t}\n\n\t* {\n\t\t/*\n\t\t * We prefer to box-sizing: border-box for all elements.\n\t\t */\n\t\tbox-sizing: border-box;\n\t}\n\n\t/* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n\tkol-span-wc {\n\t\tdisplay: grid;\n\t\tplace-items: center;\n\t}\n\n\t/* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n\tkol-span-wc > span {\n\t\tdisplay: flex;\n\t\tplace-items: center;\n\t}\n\n\ta,\n\tbutton {\n\t\tcursor: pointer;\n\t}\n\n\t/* font-family is NOT inherited all HTML elements. */\n\tbutton,\n\tinput,\n\toption,\n\tselect,\n\ttextarea {\n\t\tfont-family: inherit;\n\t}\n\n\t/* This is the text label. */\n\t.icon-only > kol-span-wc > span > span {\n\t\tdisplay: none;\n\t}\n}\n\n@layer kol-component {\n\t.required label > span::after,\n\t.required legend > span::after {\n\t\tcontent: '*';\n\t}\n}\n\n@layer kol-component {\n\t:host {\n\t\tdisplay: block;\n\t}\n}\n\n@layer kol-component {\n\tinput,\n\ttextarea {\n\t\tcursor: text;\n\t}\n\n\tinput[type='checkbox'],\n\tinput[type='color'],\n\tinput[type='file'],\n\tinput[type='radio'],\n\tinput[type='range'],\n\tlabel,\n\toption,\n\tselect {\n\t\tcursor: pointer;\n\t}\n\n\t/* input[type='checkbox'], */\n\t/* input[type='radio'], */\n\t/* input[type='range'], */\n\tinput[type='color'],\n\tinput[type='date'],\n\tinput[type='datetime-local'],\n\tinput[type='email'],\n\tinput[type='file'],\n\tinput[type='month'],\n\tinput[type='number'],\n\tinput[type='password'],\n\tinput[type='search'],\n\tinput[type='tel'],\n\tinput[type='text'],\n\tinput[type='time'],\n\tinput[type='url'],\n\tinput[type='week'],\n\tselect,\n\tselect[multiple] option,\n\ttextarea {\n\t\tfont-size: 1rem;\n\t\twidth: 100%;\n\t}\n\n\t/* needed hack for vertical alignment */\n\tinput[type='file'] {\n\t\tpadding: calc((var(--a11y-min-size) - 1rem) / 10) 0.5em;\n\t}\n\n\t/* needed hack for vertical alignment */\n\tselect[multiple] option {\n\t\tpadding: calc((var(--a11y-min-size) - 1rem) / 2) 0.5em;\n\t}\n\n\tkol-input.disabled :is(button, input, label, option, select, textarea) {\n\t\tcursor: not-allowed;\n\t\topacity: 0.5;\n\t}\n}\n\n@layer kol-component {\n\tkol-input {\n\t\tdisplay: grid;\n\t}\n\n\tkol-input .input-slot {\n\t\tflex-grow: 1;\n\t}\n\n\tinput:not([type='checkbox'], [type='radio']),\n\tselect:not([multiple], [size]) {\n\t\theight: 2.75em;\n\t}\n\n\tinput:focus,\n\toption:focus,\n\tselect:focus,\n\ttextarea:focus {\n\t\toutline: 0;\n\t}\n\n\t.input {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\n\t.input > kol-icon {\n\t\tdisplay: grid;\n\t\theight: var(--a11y-min-size);\n\t\tplace-items: center;\n\t}\n\n\tkol-input.required .input-tooltip .span-label::after {\n\t\tcontent: '*';\n\t}\n}\n\n@layer kol-component {\n\t.error.hidden {\n\t\tdisplay: none;\n\t}\n}\n",increaseTextareaHeight=t=>{t.style.overflow="hidden";const e=t.rows,n=t.clientHeight/e;t.rows=1;const a=Math.round(t.scrollHeight/n);return t.rows=e,a},KolTextarea$1=proxyCustomElement(class extends HTMLElement{render(){const{ariaDescribedBy:t}=getRenderStates(this.state),e=showExpertSlot(this.state._label);return h(Host,{class:{"has-value":this.state._hasValue}},h("kol-input",{class:{textarea:!0,"hide-label":!!this.state._hideLabel,"has-counter":!!this.state._hasCounter},_accessKey:this.state._accessKey,_alert:this.state._alert,_currentLength:this.state._currentLength,_disabled:this.state._disabled,_error:this.state._error,_hideError:this.state._hideError,_hasCounter:this.state._hasCounter,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_id:this.state._id,_label:this.state._label,_maxLength:this.state._maxLength,_readOnly:this.state._readOnly,_required:this.state._required,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched,onClick:()=>{var t;return null===(t=this.ref)||void 0===t?void 0:t.focus()}},h("span",{slot:"label"},e?h("slot",{name:"expert"}):"string"==typeof this.state._accessKey?h(Fragment,null,h(InternalUnderlinedAccessKey,{accessKey:this.state._accessKey,label:this.state._label})," ",h("span",{class:"access-key-hint","aria-hidden":"true"},this.state._accessKey)):h("span",null,this.state._label)),h("div",{slot:"input"},h("textarea",Object.assign({ref:this.catchRef,title:"",accessKey:this.state._accessKey,"aria-describedby":t.length>0?t.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,autoCapitalize:"off",autoCorrect:"off",disabled:this.state._disabled,id:this.state._id,maxlength:this.state._maxLength,name:this.state._name,readOnly:this.state._readOnly,required:this.state._required,rows:this.state._rows,placeholder:this.state._placeholder,spellcheck:"false"},this.controller.onFacade,{onKeyUp:this.onKeyUp,style:{resize:this.state._resize},value:this.state._value})))))}constructor(){super(),this.__registerHost(),this.__attachShadow(),this.catchRef=t=>{this.ref=t,propagateFocus(this.host,this.ref)},this.onKeyUp=()=>{this.ref instanceof HTMLTextAreaElement&&(setState(this,"_currentLength",this.ref.value.length),this.state._adjustHeight&&(this._rows=increaseTextareaHeight(this.ref)))},this._accessKey=void 0,this._adjustHeight=!1,this._alert=!0,this._disabled=!1,this._error=void 0,this._hasCounter=!1,this._hideError=!1,this._hideLabel=!1,this._hint="",this._id=void 0,this._label=void 0,this._maxLength=void 0,this._name=void 0,this._on=void 0,this._placeholder=void 0,this._readOnly=!1,this._resize="vertical",this._required=!1,this._rows=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_adjustHeight:!1,_currentLength:0,_hasValue:!1,_hideError:!1,_id:`id-${nonce()}`,_label:"",_resize:"vertical"},this.controller=new TextareaController(this,"textarea",this.host)}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAdjustHeight(t){this.controller.validateAdjustHeight(t)}validateAlert(t){this.controller.validateAlert(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateError(t){this.controller.validateError(t)}validateHasCounter(t){this.controller.validateHasCounter(t)}validateHideError(t){this.controller.validateHideError(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateMaxLength(t){this.controller.validateMaxLength(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validatePlaceholder(t){this.controller.validatePlaceholder(t)}validateReadOnly(t){this.controller.validateReadOnly(t)}validateResize(t){this.controller.validateResize(t)}validateRequired(t){this.controller.validateRequired(t)}validateRows(t){this.controller.validateRows(t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTabIndex(t){this.controller.validateTabIndex(t)}validateTouched(t){this.controller.validateTouched(t)}validateValue(t){this.controller.validateValue(t)}componentWillLoad(){this._alert=!0===this._alert,this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener((t=>this.state._hasValue=!!t))}get host(){return this}static get watchers(){return{_accessKey:["validateAccessKey"],_adjustHeight:["validateAdjustHeight"],_alert:["validateAlert"],_disabled:["validateDisabled"],_error:["validateError"],_hasCounter:["validateHasCounter"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_id:["validateId"],_label:["validateLabel"],_maxLength:["validateMaxLength"],_name:["validateName"],_on:["validateOn"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_resize:["validateResize"],_required:["validateRequired"],_rows:["validateRows"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-textarea",{_accessKey:[1,"_access-key"],_adjustHeight:[4,"_adjust-height"],_alert:[1540],_disabled:[4],_error:[1],_hasCounter:[4,"_has-counter"],_hideError:[1540,"_hide-error"],_hideLabel:[4,"_hide-label"],_hint:[1],_id:[1],_label:[1],_maxLength:[2,"_max-length"],_name:[1],_on:[16],_placeholder:[1],_readOnly:[4,"_read-only"],_resize:[1],_required:[4],_rows:[1026],_syncValueBySelector:[1,"_sync-value-by-selector"],_tabIndex:[2,"_tab-index"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_value:[1],state:[32]},void 0,{_accessKey:["validateAccessKey"],_adjustHeight:["validateAdjustHeight"],_alert:["validateAlert"],_disabled:["validateDisabled"],_error:["validateError"],_hasCounter:["validateHasCounter"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_id:["validateId"],_label:["validateLabel"],_maxLength:["validateMaxLength"],_name:["validateName"],_on:["validateOn"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_resize:["validateResize"],_required:["validateRequired"],_rows:["validateRows"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-textarea","kol-alert","kol-alert-wc","kol-button-wc","kol-heading-wc","kol-icon","kol-input","kol-span-wc","kol-tooltip-wc"].forEach((t=>{switch(t){case"kol-textarea":customElements.get(t)||customElements.define(t,KolTextarea$1);break;case"kol-alert":customElements.get(t)||defineCustomElement$9();break;case"kol-alert-wc":customElements.get(t)||defineCustomElement$8();break;case"kol-button-wc":customElements.get(t)||defineCustomElement$7();break;case"kol-heading-wc":customElements.get(t)||defineCustomElement$6();break;case"kol-icon":customElements.get(t)||defineCustomElement$5();break;case"kol-input":customElements.get(t)||defineCustomElement$4();break;case"kol-span-wc":customElements.get(t)||defineCustomElement$3();break;case"kol-tooltip-wc":customElements.get(t)||defineCustomElement$2()}}))}const KolTextarea=KolTextarea$1,defineCustomElement=defineCustomElement$1;export{KolTextarea,defineCustomElement};
@@ -1 +1 @@
1
- {"file":"kol-textarea.js","mappings":";;;;;;;;;;;;;;;;MAUa,kBAAmB,SAAQ,eAAe;EAGtD,YAAmB,SAA4C,EAAE,IAAY,EAAE,IAAkB;IAChG,KAAK,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAItB,yBAAoB,GAAG;MAC9B,IAAI,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,KAAK,QAAQ,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;QAClF,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,cAAc,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC;OACnE;KACD,CAAC;IAPD,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;GAC3B;EAQM,kBAAkB,CAAC,KAA0B;IACnD,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE,aAAa,EAAE,KAAK,EAAE;MAClD,KAAK,EAAE;QACN,UAAU,EAAE,IAAI,CAAC,oBAAoB;OACrC;KACD,CAAC,CAAC;GACH;EAEM,iBAAiB,CAAC,KAAyB;IACjD,iBAAiB,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE;MACxC,KAAK,EAAE;QACN,UAAU,EAAE;UACX,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,UAAU,EAAE;YACpC,QAAQ,CAAC,0GAA0G,CAAC,CAAC;WACrH;SACD;OACD;KACD,CAAC,CAAC;GACH;EAEM,iBAAiB,CAAC,KAAc;IACtC,WAAW,CAAC,IAAI,CAAC,SAA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AC;GAC5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolTextarea"],"sources":["src/components/textarea/controller.ts","src/components/textarea/style.css?tag=kol-textarea&mode=default&encapsulation=shadow","src/components/textarea/component.tsx"],"sourcesContent":["import { Generic } from '@a11y-ui/core';\n\nimport { HasCounterPropType } from '../../types/props/has-counter';\nimport { HideErrorPropType, validateHideError } from '../../types/props/hide-error';\nimport { RowsPropType, validateRows } from '../../types/props/rows';\nimport { a11yHint } from '../../utils/a11y.tipps';\nimport { watchBoolean, watchNumber, watchString, watchValidator } from '../../utils/prop.validators';\nimport { InputController } from '../@deprecated/input/controller';\nimport { CSSResize, Props, Watches } from './types';\n\nexport class TextareaController extends InputController implements Watches {\n\tprotected readonly component: Generic.Element.Component & Props;\n\n\tpublic constructor(component: Generic.Element.Component & Props, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tprivate afterSyncCharCounter = () => {\n\t\tif (typeof this.component._value === 'string' && this.component._value.length > 0) {\n\t\t\tthis.component.state._currentLength = this.component._value.length;\n\t\t}\n\t};\n\n\tpublic validateHasCounter(value?: HasCounterPropType): void {\n\t\twatchBoolean(this.component, '_hasCounter', value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: this.afterSyncCharCounter,\n\t\t\t},\n\t\t});\n\t}\n\n\tpublic validateHideError(value?: HideErrorPropType): void {\n\t\tvalidateHideError(this.component, value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: () => {\n\t\t\t\t\tif (this.component.state._hideError) {\n\t\t\t\t\t\ta11yHint('Property hide-error for inputs: Only use when the error message is shown outside of the input component.');\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\t}\n\n\tpublic validateMaxLength(value?: number): void {\n\t\twatchNumber(this.component, '_maxLength', value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: this.afterSyncCharCounter,\n\t\t\t},\n\t\t\tmin: 0,\n\t\t});\n\t}\n\n\tpublic validatePlaceholder(value?: string): void {\n\t\twatchString(this.component, '_placeholder', value);\n\t}\n\n\tpublic validateReadOnly(value?: boolean): void {\n\t\twatchBoolean(this.component, '_readOnly', value);\n\t}\n\n\tpublic validateResize(value?: CSSResize): void {\n\t\twatchValidator(\n\t\t\tthis.component,\n\t\t\t'_resize',\n\t\t\t(value) => typeof value === 'string' && (value === 'both' || value === 'horizontal' || value === 'none' || value === 'vertical'),\n\t\t\tnew Set('String {both, horizontal, vertical, none}'),\n\t\t\tvalue\n\t\t);\n\t}\n\n\tpublic validateRequired(value?: boolean): void {\n\t\twatchBoolean(this.component, '_required', value);\n\t}\n\n\tpublic validateRows(value?: RowsPropType): void {\n\t\tvalidateRows(this.component, value);\n\t}\n\n\tpublic validateValue(value?: string): void {\n\t\twatchString(this.component, '_value', value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: this.afterSyncCharCounter,\n\t\t\t},\n\t\t});\n\t\tthis.setFormAssociatedValue(this.component._value as string);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateHasCounter(this.component._hasCounter);\n\t\tthis.validateHideError(this.component._hideError);\n\t\tthis.validateMaxLength(this.component._maxLength);\n\t\tthis.validatePlaceholder(this.component._placeholder);\n\t\tthis.validateReadOnly(this.component._readOnly);\n\t\tthis.validateResize(this.component._resize);\n\t\tthis.validateRequired(this.component._required);\n\t\tthis.validateRows(this.component._rows);\n\t\tthis.validateValue(this.component._value);\n\t}\n}\n","@import url(../input-line.css);\n@layer kol-component {\n\t.error.hidden {\n\t\tdisplay: none;\n\t}\n}\n","import { Component, Element, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { InputTypeOnDefault } from '../../types/input/types';\nimport { AdjustHeightPropType } from '../../types/props/adjust-height';\nimport { HasCounterPropType } from '../../types/props/has-counter';\nimport { HideErrorPropType } from '../../types/props/hide-error';\nimport { IdPropType } from '../../types/props/id';\nimport { LabelWithExpertSlotPropType } from '../../types/props/label';\nimport { NamePropType } from '../../types/props/name';\nimport { RowsPropType } from '../../types/props/rows';\nimport { SyncValueBySelectorPropType } from '../../types/props/sync-value-by-selector';\nimport { TooltipAlignPropType } from '../../types/props/tooltip-align';\nimport { nonce } from '../../utils/dev.utils';\nimport { setState } from '../../utils/prop.validators';\nimport { propagateFocus, showExpertSlot } from '../../utils/reuse';\nimport { getRenderStates } from '../input/controller';\nimport { InternalUnderlinedAccessKey } from '../span/InternalUnderlinedAccessKey';\nimport { TextareaController } from './controller';\nimport { API, CSSResize, States } from './types';\n\n/**\n * https://stackoverflow.com/questions/17772260/textarea-auto-height\n */\nconst increaseTextareaHeight = (el: HTMLTextAreaElement): number => {\n\tel.style.overflow = 'hidden'; // verhindert, dass ein Scrollbalken kurz angezeigt wird\n\tconst currentRows = el.rows;\n\tconst rowHeight = el.clientHeight / currentRows;\n\tel.rows = 1;\n\tconst nextRows = Math.round(el.scrollHeight / rowHeight);\n\tel.rows = currentRows;\n\treturn nextRows;\n};\n\n/**\n * @slot - Die Beschriftung des Eingabefeldes.\n */\n@Component({\n\ttag: 'kol-textarea',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolTextarea implements API {\n\t@Element() private readonly host?: HTMLKolTextareaElement;\n\tprivate ref?: HTMLTextAreaElement;\n\n\tprivate readonly catchRef = (ref?: HTMLTextAreaElement) => {\n\t\tthis.ref = ref;\n\t\tpropagateFocus(this.host, this.ref);\n\t};\n\n\tpublic render(): JSX.Element {\n\t\tconst { ariaDescribedBy } = getRenderStates(this.state);\n\t\tconst hasExpertSlot = showExpertSlot(this.state._label);\n\n\t\treturn (\n\t\t\t<Host class={{ 'has-value': this.state._hasValue }}>\n\t\t\t\t<kol-input\n\t\t\t\t\tclass={{ textarea: true, 'hide-label': !!this.state._hideLabel, 'has-counter': !!this.state._hasCounter }}\n\t\t\t\t\t_accessKey={this.state._accessKey}\n\t\t\t\t\t_alert={this.state._alert}\n\t\t\t\t\t_currentLength={this.state._currentLength}\n\t\t\t\t\t_disabled={this.state._disabled}\n\t\t\t\t\t_error={this.state._error}\n\t\t\t\t\t_hideError={this.state._hideError}\n\t\t\t\t\t_hasCounter={this.state._hasCounter}\n\t\t\t\t\t_hideLabel={this.state._hideLabel}\n\t\t\t\t\t_hint={this.state._hint}\n\t\t\t\t\t_id={this.state._id}\n\t\t\t\t\t_label={this.state._label}\n\t\t\t\t\t_maxLength={this.state._maxLength}\n\t\t\t\t\t_readOnly={this.state._readOnly}\n\t\t\t\t\t_required={this.state._required}\n\t\t\t\t\t_tooltipAlign={this._tooltipAlign}\n\t\t\t\t\t_touched={this.state._touched}\n\t\t\t\t\tonClick={() => this.ref?.focus()}\n\t\t\t\t>\n\t\t\t\t\t<span slot=\"label\">\n\t\t\t\t\t\t{hasExpertSlot ? (\n\t\t\t\t\t\t\t<slot name=\"expert\"></slot>\n\t\t\t\t\t\t) : typeof this.state._accessKey === 'string' ? (\n\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t<InternalUnderlinedAccessKey accessKey={this.state._accessKey} label={this.state._label} />\n\t\t\t\t\t\t\t\t<span class=\"access-key-hint\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t\t\t{this.state._accessKey}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<span>{this.state._label}</span>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</span>\n\t\t\t\t\t<div slot=\"input\">\n\t\t\t\t\t\t<textarea\n\t\t\t\t\t\t\tref={this.catchRef}\n\t\t\t\t\t\t\ttitle=\"\"\n\t\t\t\t\t\t\taccessKey={this.state._accessKey}\n\t\t\t\t\t\t\taria-describedby={ariaDescribedBy.length > 0 ? ariaDescribedBy.join(' ') : undefined}\n\t\t\t\t\t\t\taria-label={this.state._hideLabel && typeof this.state._label === 'string' ? this.state._label : undefined}\n\t\t\t\t\t\t\tautoCapitalize=\"off\"\n\t\t\t\t\t\t\tautoCorrect=\"off\"\n\t\t\t\t\t\t\tdisabled={this.state._disabled}\n\t\t\t\t\t\t\tid={this.state._id}\n\t\t\t\t\t\t\tmaxlength={this.state._maxLength}\n\t\t\t\t\t\t\tname={this.state._name}\n\t\t\t\t\t\t\treadOnly={this.state._readOnly}\n\t\t\t\t\t\t\trequired={this.state._required}\n\t\t\t\t\t\t\trows={this.state._rows}\n\t\t\t\t\t\t\tplaceholder={this.state._placeholder}\n\t\t\t\t\t\t\tspellcheck=\"false\"\n\t\t\t\t\t\t\t{...this.controller.onFacade}\n\t\t\t\t\t\t\tonKeyUp={this.onKeyUp}\n\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\tresize: this.state._resize,\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tvalue={this.state._value}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</kol-input>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate readonly controller: TextareaController;\n\n\t/**\n\t * Defines which key combination can be used to trigger or focus the interactive element of the component.\n\t */\n\t@Prop() public _accessKey?: string;\n\n\t/**\n\t * Adjusts the height of the element to its content.\n\t * @TODO: change back to AdjustHeightPropType after stencil #4663 has been resolved\n\t */\n\t@Prop() public _adjustHeight?: boolean = false;\n\n\t/**\n\t * Defines whether the screen-readers should read out the notification.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _alert?: boolean = true;\n\n\t/**\n\t * Makes the element not focusable and ignore all events.\n\t * @TODO: Change type back to `DisabledPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _disabled?: boolean = false;\n\n\t/**\n\t * Defines the error message text.\n\t */\n\t@Prop() public _error?: string;\n\n\t/**\n\t * Shows the character count on the lower border of the input.\n\t * @TODO: Change type back to `HasCounterPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hasCounter?: boolean = false;\n\n\t/**\n\t * Hides the error message but leaves it in the DOM for the input's aria-describedby.\n\t * @TODO: Change type back to `HideErrorPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _hideError?: boolean = false;\n\n\t/**\n\t * Hides the caption by default and displays the caption text with a tooltip when the\n\t * interactive element is focused or the mouse is over it.\n\t * @TODO: Change type back to `HideLabelPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hideLabel?: boolean = false;\n\n\t/**\n\t * Defines the hint text.\n\t */\n\t@Prop() public _hint?: string = '';\n\n\t/**\n\t * Defines the internal ID of the primary component element.\n\t */\n\t@Prop() public _id?: IdPropType;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.). Set to `false` to enable the expert slot.\n\t */\n\t@Prop() public _label!: LabelWithExpertSlotPropType;\n\n\t/**\n\t * Defines the maximum number of input characters.\n\t */\n\t@Prop() public _maxLength?: number;\n\n\t/**\n\t * Defines the technical name of an input field.\n\t */\n\t@Prop() public _name?: NamePropType;\n\n\t/**\n\t * Gibt die EventCallback-Funktionen für das Input-Event an.\n\t */\n\t@Prop() public _on?: InputTypeOnDefault;\n\n\t/**\n\t * Defines the placeholder for input field. To be shown when there's no value.\n\t */\n\t@Prop() public _placeholder?: string;\n\n\t/**\n\t * Makes the input element read only.\n\t * @TODO: Change type back to `ReadOnlyPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _readOnly?: boolean = false;\n\n\t/**\n\t * Defines whether and in which direction the size of the input can be changed by the user. (https://developer.mozilla.org/de/docs/Web/CSS/resize)\n\t */\n\t@Prop() public _resize?: CSSResize = 'vertical';\n\n\t/**\n\t * Makes the input element required.\n\t * @TODO: Change type back to `RequiredPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _required?: boolean = false;\n\n\t/**\n\t * Defines how many rows of text should be visible at the same time.\n\t */\n\t@Prop({ mutable: true, reflect: false }) public _rows?: RowsPropType;\n\n\t/**\n\t * Selector for synchronizing the value with another input element.\n\t * @internal\n\t */\n\t@Prop() public _syncValueBySelector?: SyncValueBySelectorPropType;\n\n\t/**\n\t * Defines which tab-index the primary element of the component has. (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex)\n\t */\n\t@Prop() public _tabIndex?: number;\n\n\t/**\n\t * Defines where to show the Tooltip preferably: top, right, bottom or left.\n\t */\n\t@Prop() public _tooltipAlign?: TooltipAlignPropType = 'top';\n\n\t/**\n\t * Shows if the input was touched by a user.\n\t * @TODO: Change type back to `TouchedPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _touched?: boolean = false;\n\n\t/**\n\t * Defines the value of the input.\n\t */\n\t@Prop() public _value?: string;\n\n\t@State() public state: States = {\n\t\t_adjustHeight: false,\n\t\t_currentLength: 0,\n\t\t_hasValue: false,\n\t\t_hideError: false,\n\t\t_id: `id-${nonce()}`, // ⚠ required\n\t\t_label: '', // ⚠ required\n\t\t_resize: 'vertical',\n\t};\n\n\tpublic constructor() {\n\t\tthis.controller = new TextareaController(this, 'textarea', this.host);\n\t}\n\n\t@Watch('_accessKey')\n\tpublic validateAccessKey(value?: string): void {\n\t\tthis.controller.validateAccessKey(value);\n\t}\n\n\t@Watch('_adjustHeight')\n\tpublic validateAdjustHeight(value?: AdjustHeightPropType): void {\n\t\tthis.controller.validateAdjustHeight(value);\n\t}\n\n\t@Watch('_alert')\n\tpublic validateAlert(value?: boolean): void {\n\t\tthis.controller.validateAlert(value);\n\t}\n\n\t@Watch('_disabled')\n\tpublic validateDisabled(value?: boolean): void {\n\t\tthis.controller.validateDisabled(value);\n\t}\n\n\t@Watch('_error')\n\tpublic validateError(value?: string): void {\n\t\tthis.controller.validateError(value);\n\t}\n\n\t@Watch('_hasCounter')\n\tpublic validateHasCounter(value?: HasCounterPropType): void {\n\t\tthis.controller.validateHasCounter(value);\n\t}\n\n\t@Watch('_hideError')\n\tpublic validateHideError(value?: HideErrorPropType): void {\n\t\tthis.controller.validateHideError(value);\n\t}\n\n\t@Watch('_hideLabel')\n\tpublic validateHideLabel(value?: boolean): void {\n\t\tthis.controller.validateHideLabel(value);\n\t}\n\n\t@Watch('_hint')\n\tpublic validateHint(value?: string): void {\n\t\tthis.controller.validateHint(value);\n\t}\n\n\t@Watch('_id')\n\tpublic validateId(value?: string): void {\n\t\tthis.controller.validateId(value);\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelWithExpertSlotPropType): void {\n\t\tthis.controller.validateLabel(value);\n\t}\n\n\t@Watch('_maxLength')\n\tpublic validateMaxLength(value?: number): void {\n\t\tthis.controller.validateMaxLength(value);\n\t}\n\n\t@Watch('_name')\n\tpublic validateName(value?: string): void {\n\t\tthis.controller.validateName(value);\n\t}\n\n\t@Watch('_on')\n\tpublic validateOn(value?: InputTypeOnDefault): void {\n\t\tthis.controller.validateOn(value);\n\t}\n\n\t@Watch('_placeholder')\n\tpublic validatePlaceholder(value?: string): void {\n\t\tthis.controller.validatePlaceholder(value);\n\t}\n\n\t@Watch('_readOnly')\n\tpublic validateReadOnly(value?: boolean): void {\n\t\tthis.controller.validateReadOnly(value);\n\t}\n\n\t@Watch('_resize')\n\tpublic validateResize(value?: CSSResize): void {\n\t\tthis.controller.validateResize(value);\n\t}\n\n\t@Watch('_required')\n\tpublic validateRequired(value?: boolean): void {\n\t\tthis.controller.validateRequired(value);\n\t}\n\n\t@Watch('_rows')\n\tpublic validateRows(value?: RowsPropType): void {\n\t\tthis.controller.validateRows(value);\n\t}\n\n\t@Watch('_syncValueBySelector')\n\tpublic validateSyncValueBySelector(value?: SyncValueBySelectorPropType): void {\n\t\tthis.controller.validateSyncValueBySelector(value);\n\t}\n\n\t@Watch('_tabIndex')\n\tpublic validateTabIndex(value?: number): void {\n\t\tthis.controller.validateTabIndex(value);\n\t}\n\n\t@Watch('_touched')\n\tpublic validateTouched(value?: boolean): void {\n\t\tthis.controller.validateTouched(value);\n\t}\n\n\t@Watch('_value')\n\tpublic validateValue(value?: string): void {\n\t\tthis.controller.validateValue(value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis._alert = this._alert === true;\n\t\tthis._touched = this._touched === true;\n\t\tthis.controller.componentWillLoad();\n\n\t\tthis.state._hasValue = !!this.state._value;\n\t\tthis.controller.addValueChangeListener((v) => (this.state._hasValue = !!v));\n\t}\n\n\tprivate readonly onKeyUp = () => {\n\t\tif (this.ref instanceof HTMLTextAreaElement) {\n\t\t\tsetState(this, '_currentLength', this.ref.value.length);\n\t\t\tif (this.state._adjustHeight) {\n\t\t\t\tthis._rows = increaseTextareaHeight(this.ref);\n\t\t\t}\n\t\t}\n\t};\n}\n"],"version":3}
1
+ {"file":"kol-textarea.js","mappings":";;;;;;;;;;;;;;;;AAiBO,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,CAAU;;MCPtE,kBAAmB,SAAQ,eAAe;EAGtD,YAAmB,SAA4C,EAAE,IAAY,EAAE,IAAkB;IAChG,KAAK,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAItB,yBAAoB,GAAG;MAC9B,IAAI,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,KAAK,QAAQ,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;QAClF,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,cAAc,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC;OACnE;KACD,CAAC;IAPD,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;GAC3B;EAQM,kBAAkB,CAAC,KAA0B;IACnD,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE,aAAa,EAAE,KAAK,EAAE;MAClD,KAAK,EAAE;QACN,UAAU,EAAE,IAAI,CAAC,oBAAo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IACnC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC;IACvC,IAAI,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAC;IAEpC,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;IAC3C,IAAI,CAAC,UAAU,CAAC,sBAAsB,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;GAC5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolTextarea"],"sources":["src/components/textarea/types.ts","src/components/textarea/controller.ts","src/components/textarea/style.css?tag=kol-textarea&mode=default&encapsulation=shadow","src/components/textarea/component.tsx"],"sourcesContent":["import { Generic } from '@a11y-ui/core';\n\nimport { InputTypeOnDefault } from '../../types/input/types';\nimport { PropAdjustHeight } from '../../types/props/adjust-height';\nimport { PropDisabled } from '../../types/props/disabled';\nimport { PropHasCounter } from '../../types/props/has-counter';\nimport { PropHideError } from '../../types/props/hide-error';\nimport { PropHideLabel } from '../../types/props/hide-label';\nimport { PropId } from '../../types/props/id';\nimport { PropLabelWithExpertSlot } from '../../types/props/label';\nimport { PropName } from '../../types/props/name';\nimport { PropReadOnly } from '../../types/props/read-only';\nimport { PropRequired } from '../../types/props/required';\nimport { PropRows } from '../../types/props/rows';\nimport { PropSyncValueBySelector } from '../../types/props/sync-value-by-selector';\nimport { PropTouched } from '../../types/props/touched';\n\nexport const cssResizeOptions = ['both', 'horizontal', 'vertical', 'none'] as const;\nexport type CSSResize = (typeof cssResizeOptions)[number];\n\ntype RequiredProps = NonNullable<unknown>;\ntype OptionalProps = {\n\taccessKey: string;\n\talert: boolean;\n\terror: string;\n\thint: string;\n\tmaxLength: number;\n\ton: InputTypeOnDefault;\n\tplaceholder: string;\n\tresize: CSSResize;\n\ttabIndex: number;\n\tvalue: string;\n} & PropAdjustHeight &\n\tPropDisabled &\n\tPropHasCounter &\n\tPropHideError &\n\tPropHideLabel &\n\tPropLabelWithExpertSlot &\n\tPropName &\n\tPropReadOnly &\n\tPropRequired &\n\tPropRows &\n\tPropSyncValueBySelector &\n\tPropTouched;\nexport type Props = Generic.Element.Members<RequiredProps, OptionalProps>;\n\ntype RequiredStates = {\n\tadjustHeight: boolean;\n\tcurrentLength: number;\n\thasValue: boolean;\n\tresize: CSSResize;\n} & PropId &\n\tPropAdjustHeight &\n\tPropHideError &\n\tPropLabelWithExpertSlot;\ntype OptionalStates = {\n\taccessKey: string;\n\talert: boolean;\n\terror: string;\n\thint: string;\n\tmaxLength: number;\n\ton: InputTypeOnDefault;\n\tplaceholder: string;\n\ttabIndex: number;\n\tvalue: string;\n} & PropDisabled &\n\tPropHasCounter &\n\tPropHideLabel &\n\tPropName &\n\tPropReadOnly &\n\tPropRequired &\n\tPropRows &\n\tPropTouched;\n\nexport type States = Generic.Element.Members<RequiredStates, OptionalStates>;\n\nexport type Watches = Generic.Element.Watchers<RequiredProps, OptionalProps>;\n\nexport type API = Generic.Element.ComponentApi<RequiredProps, OptionalProps, RequiredStates, OptionalStates>;\n","import { Generic } from '@a11y-ui/core';\n\nimport { HasCounterPropType } from '../../types/props/has-counter';\nimport { HideErrorPropType, validateHideError } from '../../types/props/hide-error';\nimport { RowsPropType, validateRows } from '../../types/props/rows';\nimport { a11yHint } from '../../utils/a11y.tipps';\nimport { watchBoolean, watchNumber, watchString, watchValidator } from '../../utils/prop.validators';\nimport { InputController } from '../@deprecated/input/controller';\nimport { CSSResize, cssResizeOptions, Props, Watches } from './types';\n\nexport class TextareaController extends InputController implements Watches {\n\tprotected readonly component: Generic.Element.Component & Props;\n\n\tpublic constructor(component: Generic.Element.Component & Props, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tprivate afterSyncCharCounter = () => {\n\t\tif (typeof this.component._value === 'string' && this.component._value.length > 0) {\n\t\t\tthis.component.state._currentLength = this.component._value.length;\n\t\t}\n\t};\n\n\tpublic validateHasCounter(value?: HasCounterPropType): void {\n\t\twatchBoolean(this.component, '_hasCounter', value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: this.afterSyncCharCounter,\n\t\t\t},\n\t\t});\n\t}\n\n\tpublic validateHideError(value?: HideErrorPropType): void {\n\t\tvalidateHideError(this.component, value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: () => {\n\t\t\t\t\tif (this.component.state._hideError) {\n\t\t\t\t\t\ta11yHint('Property hide-error for inputs: Only use when the error message is shown outside of the input component.');\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\t}\n\n\tpublic validateMaxLength(value?: number): void {\n\t\twatchNumber(this.component, '_maxLength', value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: this.afterSyncCharCounter,\n\t\t\t},\n\t\t\tmin: 0,\n\t\t});\n\t}\n\n\tpublic validatePlaceholder(value?: string): void {\n\t\twatchString(this.component, '_placeholder', value);\n\t}\n\n\tpublic validateReadOnly(value?: boolean): void {\n\t\twatchBoolean(this.component, '_readOnly', value);\n\t}\n\n\tpublic validateResize(value?: CSSResize): void {\n\t\twatchValidator(\n\t\t\tthis.component,\n\t\t\t'_resize',\n\t\t\t(value) => typeof value === 'string' && cssResizeOptions.includes(value),\n\t\t\tnew Set(`String {${cssResizeOptions.join(', ')}`),\n\t\t\tvalue\n\t\t);\n\t}\n\n\tpublic validateRequired(value?: boolean): void {\n\t\twatchBoolean(this.component, '_required', value);\n\t}\n\n\tpublic validateRows(value?: RowsPropType): void {\n\t\tvalidateRows(this.component, value);\n\t}\n\n\tpublic validateValue(value?: string): void {\n\t\twatchString(this.component, '_value', value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: this.afterSyncCharCounter,\n\t\t\t},\n\t\t});\n\t\tthis.setFormAssociatedValue(this.component._value as string);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateHasCounter(this.component._hasCounter);\n\t\tthis.validateHideError(this.component._hideError);\n\t\tthis.validateMaxLength(this.component._maxLength);\n\t\tthis.validatePlaceholder(this.component._placeholder);\n\t\tthis.validateReadOnly(this.component._readOnly);\n\t\tthis.validateResize(this.component._resize);\n\t\tthis.validateRequired(this.component._required);\n\t\tthis.validateRows(this.component._rows);\n\t\tthis.validateValue(this.component._value);\n\t}\n}\n","@import url(../input-line.css);\n@layer kol-component {\n\t.error.hidden {\n\t\tdisplay: none;\n\t}\n}\n","import { Component, Element, Fragment, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { InputTypeOnDefault } from '../../types/input/types';\nimport { AdjustHeightPropType } from '../../types/props/adjust-height';\nimport { HasCounterPropType } from '../../types/props/has-counter';\nimport { HideErrorPropType } from '../../types/props/hide-error';\nimport { IdPropType } from '../../types/props/id';\nimport { LabelWithExpertSlotPropType } from '../../types/props/label';\nimport { NamePropType } from '../../types/props/name';\nimport { RowsPropType } from '../../types/props/rows';\nimport { SyncValueBySelectorPropType } from '../../types/props/sync-value-by-selector';\nimport { TooltipAlignPropType } from '../../types/props/tooltip-align';\nimport { nonce } from '../../utils/dev.utils';\nimport { setState } from '../../utils/prop.validators';\nimport { propagateFocus, showExpertSlot } from '../../utils/reuse';\nimport { getRenderStates } from '../input/controller';\nimport { InternalUnderlinedAccessKey } from '../span/InternalUnderlinedAccessKey';\nimport { TextareaController } from './controller';\nimport { API, CSSResize, States } from './types';\n\n/**\n * https://stackoverflow.com/questions/17772260/textarea-auto-height\n */\nconst increaseTextareaHeight = (el: HTMLTextAreaElement): number => {\n\tel.style.overflow = 'hidden'; // verhindert, dass ein Scrollbalken kurz angezeigt wird\n\tconst currentRows = el.rows;\n\tconst rowHeight = el.clientHeight / currentRows;\n\tel.rows = 1;\n\tconst nextRows = Math.round(el.scrollHeight / rowHeight);\n\tel.rows = currentRows;\n\treturn nextRows;\n};\n\n/**\n * @slot - Die Beschriftung des Eingabefeldes.\n */\n@Component({\n\ttag: 'kol-textarea',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolTextarea implements API {\n\t@Element() private readonly host?: HTMLKolTextareaElement;\n\tprivate ref?: HTMLTextAreaElement;\n\n\tprivate readonly catchRef = (ref?: HTMLTextAreaElement) => {\n\t\tthis.ref = ref;\n\t\tpropagateFocus(this.host, this.ref);\n\t};\n\n\tpublic render(): JSX.Element {\n\t\tconst { ariaDescribedBy } = getRenderStates(this.state);\n\t\tconst hasExpertSlot = showExpertSlot(this.state._label);\n\n\t\treturn (\n\t\t\t<Host class={{ 'has-value': this.state._hasValue }}>\n\t\t\t\t<kol-input\n\t\t\t\t\tclass={{ textarea: true, 'hide-label': !!this.state._hideLabel, 'has-counter': !!this.state._hasCounter }}\n\t\t\t\t\t_accessKey={this.state._accessKey}\n\t\t\t\t\t_alert={this.state._alert}\n\t\t\t\t\t_currentLength={this.state._currentLength}\n\t\t\t\t\t_disabled={this.state._disabled}\n\t\t\t\t\t_error={this.state._error}\n\t\t\t\t\t_hideError={this.state._hideError}\n\t\t\t\t\t_hasCounter={this.state._hasCounter}\n\t\t\t\t\t_hideLabel={this.state._hideLabel}\n\t\t\t\t\t_hint={this.state._hint}\n\t\t\t\t\t_id={this.state._id}\n\t\t\t\t\t_label={this.state._label}\n\t\t\t\t\t_maxLength={this.state._maxLength}\n\t\t\t\t\t_readOnly={this.state._readOnly}\n\t\t\t\t\t_required={this.state._required}\n\t\t\t\t\t_tooltipAlign={this._tooltipAlign}\n\t\t\t\t\t_touched={this.state._touched}\n\t\t\t\t\tonClick={() => this.ref?.focus()}\n\t\t\t\t>\n\t\t\t\t\t<span slot=\"label\">\n\t\t\t\t\t\t{hasExpertSlot ? (\n\t\t\t\t\t\t\t<slot name=\"expert\"></slot>\n\t\t\t\t\t\t) : typeof this.state._accessKey === 'string' ? (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<InternalUnderlinedAccessKey accessKey={this.state._accessKey} label={this.state._label} />{' '}\n\t\t\t\t\t\t\t\t<span class=\"access-key-hint\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t\t\t{this.state._accessKey}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<span>{this.state._label}</span>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</span>\n\t\t\t\t\t<div slot=\"input\">\n\t\t\t\t\t\t<textarea\n\t\t\t\t\t\t\tref={this.catchRef}\n\t\t\t\t\t\t\ttitle=\"\"\n\t\t\t\t\t\t\taccessKey={this.state._accessKey}\n\t\t\t\t\t\t\taria-describedby={ariaDescribedBy.length > 0 ? ariaDescribedBy.join(' ') : undefined}\n\t\t\t\t\t\t\taria-label={this.state._hideLabel && typeof this.state._label === 'string' ? this.state._label : undefined}\n\t\t\t\t\t\t\tautoCapitalize=\"off\"\n\t\t\t\t\t\t\tautoCorrect=\"off\"\n\t\t\t\t\t\t\tdisabled={this.state._disabled}\n\t\t\t\t\t\t\tid={this.state._id}\n\t\t\t\t\t\t\tmaxlength={this.state._maxLength}\n\t\t\t\t\t\t\tname={this.state._name}\n\t\t\t\t\t\t\treadOnly={this.state._readOnly}\n\t\t\t\t\t\t\trequired={this.state._required}\n\t\t\t\t\t\t\trows={this.state._rows}\n\t\t\t\t\t\t\tplaceholder={this.state._placeholder}\n\t\t\t\t\t\t\tspellcheck=\"false\"\n\t\t\t\t\t\t\t{...this.controller.onFacade}\n\t\t\t\t\t\t\tonKeyUp={this.onKeyUp}\n\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\tresize: this.state._resize,\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tvalue={this.state._value}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</kol-input>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate readonly controller: TextareaController;\n\n\t/**\n\t * Defines which key combination can be used to trigger or focus the interactive element of the component.\n\t */\n\t@Prop() public _accessKey?: string;\n\n\t/**\n\t * Adjusts the height of the element to its content.\n\t * @TODO: change back to AdjustHeightPropType after stencil #4663 has been resolved\n\t */\n\t@Prop() public _adjustHeight?: boolean = false;\n\n\t/**\n\t * Defines whether the screen-readers should read out the notification.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _alert?: boolean = true;\n\n\t/**\n\t * Makes the element not focusable and ignore all events.\n\t * @TODO: Change type back to `DisabledPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _disabled?: boolean = false;\n\n\t/**\n\t * Defines the error message text.\n\t */\n\t@Prop() public _error?: string;\n\n\t/**\n\t * Shows the character count on the lower border of the input.\n\t * @TODO: Change type back to `HasCounterPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hasCounter?: boolean = false;\n\n\t/**\n\t * Hides the error message but leaves it in the DOM for the input's aria-describedby.\n\t * @TODO: Change type back to `HideErrorPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _hideError?: boolean = false;\n\n\t/**\n\t * Hides the caption by default and displays the caption text with a tooltip when the\n\t * interactive element is focused or the mouse is over it.\n\t * @TODO: Change type back to `HideLabelPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hideLabel?: boolean = false;\n\n\t/**\n\t * Defines the hint text.\n\t */\n\t@Prop() public _hint?: string = '';\n\n\t/**\n\t * Defines the internal ID of the primary component element.\n\t */\n\t@Prop() public _id?: IdPropType;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.). Set to `false` to enable the expert slot.\n\t */\n\t@Prop() public _label!: LabelWithExpertSlotPropType;\n\n\t/**\n\t * Defines the maximum number of input characters.\n\t */\n\t@Prop() public _maxLength?: number;\n\n\t/**\n\t * Defines the technical name of an input field.\n\t */\n\t@Prop() public _name?: NamePropType;\n\n\t/**\n\t * Gibt die EventCallback-Funktionen für das Input-Event an.\n\t */\n\t@Prop() public _on?: InputTypeOnDefault;\n\n\t/**\n\t * Defines the placeholder for input field. To be shown when there's no value.\n\t */\n\t@Prop() public _placeholder?: string;\n\n\t/**\n\t * Makes the input element read only.\n\t * @TODO: Change type back to `ReadOnlyPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _readOnly?: boolean = false;\n\n\t/**\n\t * Defines whether and in which direction the size of the input can be changed by the user. (https://developer.mozilla.org/de/docs/Web/CSS/resize)\n\t */\n\t@Prop() public _resize?: CSSResize = 'vertical';\n\n\t/**\n\t * Makes the input element required.\n\t * @TODO: Change type back to `RequiredPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _required?: boolean = false;\n\n\t/**\n\t * Defines how many rows of text should be visible at the same time.\n\t */\n\t@Prop({ mutable: true, reflect: false }) public _rows?: RowsPropType;\n\n\t/**\n\t * Selector for synchronizing the value with another input element.\n\t * @internal\n\t */\n\t@Prop() public _syncValueBySelector?: SyncValueBySelectorPropType;\n\n\t/**\n\t * Defines which tab-index the primary element of the component has. (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex)\n\t */\n\t@Prop() public _tabIndex?: number;\n\n\t/**\n\t * Defines where to show the Tooltip preferably: top, right, bottom or left.\n\t */\n\t@Prop() public _tooltipAlign?: TooltipAlignPropType = 'top';\n\n\t/**\n\t * Shows if the input was touched by a user.\n\t * @TODO: Change type back to `TouchedPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _touched?: boolean = false;\n\n\t/**\n\t * Defines the value of the input.\n\t */\n\t@Prop() public _value?: string;\n\n\t@State() public state: States = {\n\t\t_adjustHeight: false,\n\t\t_currentLength: 0,\n\t\t_hasValue: false,\n\t\t_hideError: false,\n\t\t_id: `id-${nonce()}`, // ⚠ required\n\t\t_label: '', // ⚠ required\n\t\t_resize: 'vertical',\n\t};\n\n\tpublic constructor() {\n\t\tthis.controller = new TextareaController(this, 'textarea', this.host);\n\t}\n\n\t@Watch('_accessKey')\n\tpublic validateAccessKey(value?: string): void {\n\t\tthis.controller.validateAccessKey(value);\n\t}\n\n\t@Watch('_adjustHeight')\n\tpublic validateAdjustHeight(value?: AdjustHeightPropType): void {\n\t\tthis.controller.validateAdjustHeight(value);\n\t}\n\n\t@Watch('_alert')\n\tpublic validateAlert(value?: boolean): void {\n\t\tthis.controller.validateAlert(value);\n\t}\n\n\t@Watch('_disabled')\n\tpublic validateDisabled(value?: boolean): void {\n\t\tthis.controller.validateDisabled(value);\n\t}\n\n\t@Watch('_error')\n\tpublic validateError(value?: string): void {\n\t\tthis.controller.validateError(value);\n\t}\n\n\t@Watch('_hasCounter')\n\tpublic validateHasCounter(value?: HasCounterPropType): void {\n\t\tthis.controller.validateHasCounter(value);\n\t}\n\n\t@Watch('_hideError')\n\tpublic validateHideError(value?: HideErrorPropType): void {\n\t\tthis.controller.validateHideError(value);\n\t}\n\n\t@Watch('_hideLabel')\n\tpublic validateHideLabel(value?: boolean): void {\n\t\tthis.controller.validateHideLabel(value);\n\t}\n\n\t@Watch('_hint')\n\tpublic validateHint(value?: string): void {\n\t\tthis.controller.validateHint(value);\n\t}\n\n\t@Watch('_id')\n\tpublic validateId(value?: string): void {\n\t\tthis.controller.validateId(value);\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelWithExpertSlotPropType): void {\n\t\tthis.controller.validateLabel(value);\n\t}\n\n\t@Watch('_maxLength')\n\tpublic validateMaxLength(value?: number): void {\n\t\tthis.controller.validateMaxLength(value);\n\t}\n\n\t@Watch('_name')\n\tpublic validateName(value?: string): void {\n\t\tthis.controller.validateName(value);\n\t}\n\n\t@Watch('_on')\n\tpublic validateOn(value?: InputTypeOnDefault): void {\n\t\tthis.controller.validateOn(value);\n\t}\n\n\t@Watch('_placeholder')\n\tpublic validatePlaceholder(value?: string): void {\n\t\tthis.controller.validatePlaceholder(value);\n\t}\n\n\t@Watch('_readOnly')\n\tpublic validateReadOnly(value?: boolean): void {\n\t\tthis.controller.validateReadOnly(value);\n\t}\n\n\t@Watch('_resize')\n\tpublic validateResize(value?: CSSResize): void {\n\t\tthis.controller.validateResize(value);\n\t}\n\n\t@Watch('_required')\n\tpublic validateRequired(value?: boolean): void {\n\t\tthis.controller.validateRequired(value);\n\t}\n\n\t@Watch('_rows')\n\tpublic validateRows(value?: RowsPropType): void {\n\t\tthis.controller.validateRows(value);\n\t}\n\n\t@Watch('_syncValueBySelector')\n\tpublic validateSyncValueBySelector(value?: SyncValueBySelectorPropType): void {\n\t\tthis.controller.validateSyncValueBySelector(value);\n\t}\n\n\t@Watch('_tabIndex')\n\tpublic validateTabIndex(value?: number): void {\n\t\tthis.controller.validateTabIndex(value);\n\t}\n\n\t@Watch('_touched')\n\tpublic validateTouched(value?: boolean): void {\n\t\tthis.controller.validateTouched(value);\n\t}\n\n\t@Watch('_value')\n\tpublic validateValue(value?: string): void {\n\t\tthis.controller.validateValue(value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis._alert = this._alert === true;\n\t\tthis._touched = this._touched === true;\n\t\tthis.controller.componentWillLoad();\n\n\t\tthis.state._hasValue = !!this.state._value;\n\t\tthis.controller.addValueChangeListener((v) => (this.state._hasValue = !!v));\n\t}\n\n\tprivate readonly onKeyUp = () => {\n\t\tif (this.ref instanceof HTMLTextAreaElement) {\n\t\t\tsetState(this, '_currentLength', this.ref.value.length);\n\t\t\tif (this.state._adjustHeight) {\n\t\t\t\tthis._rows = increaseTextareaHeight(this.ref);\n\t\t\t}\n\t\t}\n\t};\n}\n"],"version":3}
@@ -1 +1 @@
1
- {"file":"kol-toast-container.js","mappings":";;;;;;;;;;;;;;;AAQO,MAAM,aAAa,GAAG,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAS;EAChE,MAAM,SAAS,GAAG,CAAC,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AAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,GAAe,CAC5I,EACA,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,UAAU,MACvC,EAAC,aAAa,IAAC,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,GAAG,EAAE,UAAU,CAAC,EAAE,GAAI,CAC1G,CAAC,CACQ,EACV;GACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolToastContainer"],"sources":["src/components/toaster/InternalToast.tsx","src/components/toaster/style.css?tag=kol-toast-container&mode=default&encapsulation=shadow","src/components/toaster/component.tsx"],"sourcesContent":["import { h } from '@stencil/core';\nimport { ToastState } from './types';\n\ntype Props = {\n\ttoastState: ToastState;\n\tonClose: () => void;\n\tkey: string;\n};\nexport const InternalToast = ({ toastState, onClose, key }: Props) => {\n\tconst handleRef = (element?: HTMLDivElement) => {\n\t\tif (typeof toastState.toast.render === 'function' && element) {\n\t\t\ttoastState.toast.render(element, { close: () => onClose() });\n\t\t}\n\t};\n\n\treturn (\n\t\t<div class={`toast ${toastState.status}`} key={key}>\n\t\t\t<kol-alert\n\t\t\t\tclass=\"alert\"\n\t\t\t\t_alert={true}\n\t\t\t\t_label={toastState.toast.label}\n\t\t\t\t_level={0}\n\t\t\t\t_hasCloser={true}\n\t\t\t\t_type={toastState.toast.type}\n\t\t\t\t_variant=\"card\"\n\t\t\t\t_on={{ onClose }}\n\t\t\t>\n\t\t\t\t<div ref={handleRef}>{typeof toastState.toast.description === 'string' ? toastState.toast.description : null}</div>\n\t\t\t</kol-alert>\n\t\t</div>\n\t);\n};\n","@layer kol-component {\n\t:host {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tposition: fixed;\n\t\tz-index: 200;\n\t}\n\n\t.close-all {\n\t\talign-self: flex-end;\n\t}\n}\n","import { Component, Fragment, h, JSX, Method, State } from '@stencil/core';\n\nimport { translate } from '../../i18n';\nimport { nonce } from '../../utils/dev.utils';\nimport { API, States, Toast, ToastState } from './types';\nimport { InternalToast } from './InternalToast';\n\nconst TRANSITION_TIMEOUT = 300;\n\n@Component({\n\ttag: 'kol-toast-container',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolToastContainer implements API {\n\t@State() public state: States = {\n\t\t_toastStates: [],\n\t};\n\n\t// Stencil requires async function:\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\t@Method()\n\tasync enqueue(toast: Toast) {\n\t\tconst newToastState: ToastState = {\n\t\t\ttoast,\n\t\t\tstatus: 'adding',\n\t\t\tid: `toast-${nonce()}`,\n\t\t};\n\t\tthis.state = {\n\t\t\t...this.state,\n\t\t\t_toastStates: [newToastState, ...this.state._toastStates],\n\t\t};\n\n\t\tsetTimeout(() => {\n\t\t\tthis.state = {\n\t\t\t\t...this.state,\n\t\t\t\t_toastStates: this.state._toastStates.map((localToastState) =>\n\t\t\t\t\tlocalToastState === newToastState\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t...localToastState,\n\t\t\t\t\t\t\t\tstatus: 'settled',\n\t\t\t\t\t\t }\n\t\t\t\t\t\t: localToastState\n\t\t\t\t),\n\t\t\t};\n\t\t}, TRANSITION_TIMEOUT);\n\t}\n\n\tprivate handleClose(toastState: ToastState) {\n\t\tthis.state = {\n\t\t\t...this.state,\n\t\t\t_toastStates: this.state._toastStates.map((localToastState) => {\n\t\t\t\tif (localToastState === toastState) {\n\t\t\t\t\tlocalToastState.status = 'removing';\n\t\t\t\t}\n\t\t\t\treturn localToastState;\n\t\t\t}),\n\t\t};\n\n\t\tsetTimeout(() => {\n\t\t\tthis.state = {\n\t\t\t\t...this.state,\n\t\t\t\t_toastStates: this.state._toastStates.filter((localToastState) => localToastState !== toastState),\n\t\t\t};\n\t\t}, TRANSITION_TIMEOUT);\n\t}\n\n\tprivate handleCloseAllClick() {\n\t\tthis.state = {\n\t\t\t...this.state,\n\t\t\t_toastStates: this.state._toastStates.map((localToastState) => ({\n\t\t\t\t...localToastState,\n\t\t\t\tstatus: 'removing',\n\t\t\t})),\n\t\t};\n\n\t\tsetTimeout(() => {\n\t\t\tthis.state = {\n\t\t\t\t...this.state,\n\t\t\t\t_toastStates: [],\n\t\t\t};\n\t\t}, TRANSITION_TIMEOUT);\n\t}\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Fragment>\n\t\t\t\t{this.state._toastStates.length > 1 && (\n\t\t\t\t\t<kol-button _label={translate('kol-toast-close-all')} class=\"close-all\" _on={{ onClick: this.handleCloseAllClick.bind(this) }}></kol-button>\n\t\t\t\t)}\n\t\t\t\t{this.state._toastStates.map((toastState) => (\n\t\t\t\t\t<InternalToast toastState={toastState} onClose={() => this.handleClose(toastState)} key={toastState.id} />\n\t\t\t\t))}\n\t\t\t</Fragment>\n\t\t);\n\t}\n}\n"],"version":3}
1
+ {"file":"kol-toast-container.js","mappings":";;;;;;;;;;;;;;;AAQO,MAAM,aAAa,GAAG,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAS;EAChE,MAAM,SAAS,GAAG,CAAC,OAAwB;IAC1C,IAAI,OAAO,UAAU,CAAC,KAAK,CAAC,MAAM,KAAK,UAAU,IAAI,OAAO,EAAE;MAC7D,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,MAAM,OAAO,EAAE,EAAE,CAAC,CAAC;KAC7D;GACD,CAAC;EAEF,QACC,WAAK,KAAK,EAAE,SAAS,UAAU,CAAC,MAAM,EAAE,EAAE,GAAG,EAAE,GAAG;IACjD,iBACC,KAAK,EAAC,OAAO,EACb,MAAM,EAAE,IAAI,EACZ,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,KAAK,EAC9B,MAAM,EAAE,CAAC,EACT,UAAU,EAAE,IAAI,EAChB,KAAK,E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AEF,UAAU,CAAC;MACV,IAAI,CAAC,KAAK,mCACN,IAAI,CAAC,KAAK,KACb,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,eAAe,KAAK,eAAe,KAAK,UAAU,CAAC,GACjG,CAAC;KACF,EAAE,kBAAkB,CAAC,CAAC;GACvB;EAEO,mBAAmB;IAC1B,IAAI,CAAC,KAAK,mCACN,IAAI,CAAC,KAAK,KACb,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,eAAe,sCACtD,eAAe,KAClB,MAAM,EAAE,UAAU,IACjB,CAAC,GACH,CAAC;IAEF,UAAU,CAAC;MACV,IAAI,CAAC,KAAK,mCACN,IAAI,CAAC,KAAK,KACb,YAAY,EAAE,EAAE,GAChB,CAAC;KACF,EAAE,kBAAkB,CAAC,CAAC;GACvB;EAEM,MAAM;IACZ,QACC,kBACE,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,KAClC,kBAAY,MAAM,EAAE,SAAS,CAAC,qBAAqB,CAAC,EAAE,KAAK,EAAC,WAAW,EAAC,GAAG,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,GAAe,CAC5I,EACA,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,UAAU,MACvC,EAAC,aAAa,IAAC,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,GAAG,EAAE,UAAU,CAAC,EAAE,GAAI,CAC1G,CAAC,CACA,EACF;GACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolToastContainer"],"sources":["src/components/toaster/InternalToast.tsx","src/components/toaster/style.css?tag=kol-toast-container&mode=default&encapsulation=shadow","src/components/toaster/component.tsx"],"sourcesContent":["import { h } from '@stencil/core';\nimport { ToastState } from './types';\n\ntype Props = {\n\ttoastState: ToastState;\n\tonClose: () => void;\n\tkey: string;\n};\nexport const InternalToast = ({ toastState, onClose, key }: Props) => {\n\tconst handleRef = (element?: HTMLDivElement) => {\n\t\tif (typeof toastState.toast.render === 'function' && element) {\n\t\t\ttoastState.toast.render(element, { close: () => onClose() });\n\t\t}\n\t};\n\n\treturn (\n\t\t<div class={`toast ${toastState.status}`} key={key}>\n\t\t\t<kol-alert\n\t\t\t\tclass=\"alert\"\n\t\t\t\t_alert={true}\n\t\t\t\t_label={toastState.toast.label}\n\t\t\t\t_level={0}\n\t\t\t\t_hasCloser={true}\n\t\t\t\t_type={toastState.toast.type}\n\t\t\t\t_variant=\"card\"\n\t\t\t\t_on={{ onClose }}\n\t\t\t>\n\t\t\t\t<div ref={handleRef}>{typeof toastState.toast.description === 'string' ? toastState.toast.description : null}</div>\n\t\t\t</kol-alert>\n\t\t</div>\n\t);\n};\n","@layer kol-component {\n\t:host {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tposition: fixed;\n\t\tz-index: 200;\n\t}\n\n\t.close-all {\n\t\talign-self: flex-end;\n\t}\n}\n","import { Component, Fragment, h, JSX, Method, State } from '@stencil/core';\n\nimport { translate } from '../../i18n';\nimport { nonce } from '../../utils/dev.utils';\nimport { API, States, Toast, ToastState } from './types';\nimport { InternalToast } from './InternalToast';\n\nconst TRANSITION_TIMEOUT = 300;\n\n@Component({\n\ttag: 'kol-toast-container',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolToastContainer implements API {\n\t@State() public state: States = {\n\t\t_toastStates: [],\n\t};\n\n\t// Stencil requires async function:\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\t@Method()\n\tasync enqueue(toast: Toast) {\n\t\tconst newToastState: ToastState = {\n\t\t\ttoast,\n\t\t\tstatus: 'adding',\n\t\t\tid: `toast-${nonce()}`,\n\t\t};\n\t\tthis.state = {\n\t\t\t...this.state,\n\t\t\t_toastStates: [newToastState, ...this.state._toastStates],\n\t\t};\n\n\t\tsetTimeout(() => {\n\t\t\tthis.state = {\n\t\t\t\t...this.state,\n\t\t\t\t_toastStates: this.state._toastStates.map((localToastState) =>\n\t\t\t\t\tlocalToastState === newToastState\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t...localToastState,\n\t\t\t\t\t\t\t\tstatus: 'settled',\n\t\t\t\t\t\t }\n\t\t\t\t\t\t: localToastState\n\t\t\t\t),\n\t\t\t};\n\t\t}, TRANSITION_TIMEOUT);\n\t}\n\n\tprivate handleClose(toastState: ToastState) {\n\t\tthis.state = {\n\t\t\t...this.state,\n\t\t\t_toastStates: this.state._toastStates.map((localToastState) => {\n\t\t\t\tif (localToastState === toastState) {\n\t\t\t\t\tlocalToastState.status = 'removing';\n\t\t\t\t}\n\t\t\t\treturn localToastState;\n\t\t\t}),\n\t\t};\n\n\t\tsetTimeout(() => {\n\t\t\tthis.state = {\n\t\t\t\t...this.state,\n\t\t\t\t_toastStates: this.state._toastStates.filter((localToastState) => localToastState !== toastState),\n\t\t\t};\n\t\t}, TRANSITION_TIMEOUT);\n\t}\n\n\tprivate handleCloseAllClick() {\n\t\tthis.state = {\n\t\t\t...this.state,\n\t\t\t_toastStates: this.state._toastStates.map((localToastState) => ({\n\t\t\t\t...localToastState,\n\t\t\t\tstatus: 'removing',\n\t\t\t})),\n\t\t};\n\n\t\tsetTimeout(() => {\n\t\t\tthis.state = {\n\t\t\t\t...this.state,\n\t\t\t\t_toastStates: [],\n\t\t\t};\n\t\t}, TRANSITION_TIMEOUT);\n\t}\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{this.state._toastStates.length > 1 && (\n\t\t\t\t\t<kol-button _label={translate('kol-toast-close-all')} class=\"close-all\" _on={{ onClick: this.handleCloseAllClick.bind(this) }}></kol-button>\n\t\t\t\t)}\n\t\t\t\t{this.state._toastStates.map((toastState) => (\n\t\t\t\t\t<InternalToast toastState={toastState} onClose={() => this.handleClose(toastState)} key={toastState.id} />\n\t\t\t\t))}\n\t\t\t</>\n\t\t);\n\t}\n}\n"],"version":3}