@public-ui/components 2.0.1 → 2.0.3

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 (581) hide show
  1. package/custom-elements.json +1 -15
  2. package/dist/cjs/{InternalUnderlinedAccessKey-db20fe4c.js → InternalUnderlinedAccessKey-6642b2c7.js} +1 -1
  3. package/dist/cjs/{InternalUnderlinedAccessKey-db20fe4c.js.map → InternalUnderlinedAccessKey-6642b2c7.js.map} +1 -1
  4. package/dist/cjs/{a11y.tipps-5093e030.js → a11y.tipps-a9c5bee3.js} +1 -1
  5. package/dist/cjs/{a11y.tipps-5093e030.js.map → a11y.tipps-a9c5bee3.js.map} +1 -1
  6. package/dist/cjs/access-key-41cf20c4.js +4 -0
  7. package/dist/cjs/{access-key-08e22c70.js.map → access-key-41cf20c4.js.map} +1 -1
  8. package/dist/cjs/{align-floating-elements-dca98687.js → align-floating-elements-656b8edb.js} +1 -1
  9. package/dist/cjs/align-floating-elements-656b8edb.js.map +1 -0
  10. package/dist/cjs/{alignment-da95c567.js → alignment-33970e77.js} +1 -1
  11. package/dist/cjs/{alignment-da95c567.js.map → alignment-33970e77.js.map} +1 -1
  12. package/dist/cjs/alternative-button-link-role-85dd7d3a.js +4 -0
  13. package/dist/cjs/{alternative-button-link-role-46c7e9ff.js.map → alternative-button-link-role-85dd7d3a.js.map} +1 -1
  14. package/dist/cjs/{app-globals-dbba0fd7.js → app-globals-99df1ec2.js} +1 -1
  15. package/dist/cjs/{app-globals-dbba0fd7.js.map → app-globals-99df1ec2.js.map} +1 -1
  16. package/dist/cjs/{associated.controller-665c978d.js → associated.controller-476bc975.js} +1 -1
  17. package/dist/cjs/{associated.controller-665c978d.js.map → associated.controller-476bc975.js.map} +1 -1
  18. package/dist/cjs/{color-f3eb202a.js → color-9547694e.js} +1 -1
  19. package/dist/cjs/{color-f3eb202a.js.map → color-9547694e.js.map} +1 -1
  20. package/dist/cjs/{controller-318aaac7.js → controller-aad33907.js} +1 -1
  21. package/dist/cjs/{controller-318aaac7.js.map → controller-aad33907.js.map} +1 -1
  22. package/dist/cjs/{controller-8f3bdef3.js → controller-b2299d8a.js} +1 -1
  23. package/dist/cjs/{controller-8f3bdef3.js.map → controller-b2299d8a.js.map} +1 -1
  24. package/dist/cjs/{controller-644ec366.js → controller-cbff0599.js} +1 -1
  25. package/dist/cjs/{controller-644ec366.js.map → controller-cbff0599.js.map} +1 -1
  26. package/dist/cjs/{controller-3a053b42.js → controller-d0ce6c05.js} +1 -1
  27. package/dist/cjs/{controller-3a053b42.js.map → controller-d0ce6c05.js.map} +1 -1
  28. package/dist/cjs/{controller-5a5b8671.js → controller-fe8411e5.js} +1 -1
  29. package/dist/cjs/{controller-5a5b8671.js.map → controller-fe8411e5.js.map} +1 -1
  30. package/dist/cjs/{controller-icon-870a91fe.js → controller-icon-ecb716a5.js} +1 -1
  31. package/dist/cjs/{controller-icon-870a91fe.js.map → controller-icon-ecb716a5.js.map} +1 -1
  32. package/dist/cjs/custom-class-80a19309.js +4 -0
  33. package/dist/cjs/{custom-class-fe018ec9.js.map → custom-class-80a19309.js.map} +1 -1
  34. package/dist/cjs/{dev.utils-dd133f0a.js → dev.utils-4be23d2e.js} +1 -1
  35. package/dist/cjs/dev.utils-4be23d2e.js.map +1 -0
  36. package/dist/cjs/devtools-f550a928.js +4 -0
  37. package/dist/cjs/devtools-f550a928.js.map +1 -0
  38. package/dist/cjs/has-closer-fcae7da6.js +4 -0
  39. package/dist/cjs/{has-closer-e0792c7f.js.map → has-closer-fcae7da6.js.map} +1 -1
  40. package/dist/cjs/hide-label-b7ee1c01.js +4 -0
  41. package/dist/cjs/{hide-label-69a12ef6.js.map → hide-label-b7ee1c01.js.map} +1 -1
  42. package/dist/cjs/i18n-8fb14ebf.js +4 -0
  43. package/dist/cjs/i18n-8fb14ebf.js.map +1 -0
  44. package/dist/cjs/{icons-7d782feb.js → icons-5cf7c0e6.js} +1 -1
  45. package/dist/cjs/{icons-7d782feb.js.map → icons-5cf7c0e6.js.map} +1 -1
  46. package/dist/cjs/image-source-8aa35f38.js +4 -0
  47. package/dist/cjs/{image-source-9b7df5ba.js.map → image-source-8aa35f38.js.map} +1 -1
  48. package/dist/cjs/{index-814a048a.js → index-2f27254e.js} +1 -1
  49. package/dist/cjs/index-2f27254e.js.map +1 -0
  50. package/dist/cjs/index-3145a30d.js +4 -0
  51. package/dist/cjs/index-3145a30d.js.map +1 -0
  52. package/dist/cjs/index.cjs.js +1 -1
  53. package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
  54. package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
  55. package/dist/cjs/kol-alert-wc_2.cjs.entry.js +1 -1
  56. package/dist/cjs/kol-alert.cjs.entry.js +1 -1
  57. package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
  58. package/dist/cjs/kol-avatar.cjs.entry.js +1 -1
  59. package/dist/cjs/kol-badge.cjs.entry.js +1 -1
  60. package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
  61. package/dist/cjs/kol-button-group-wc.cjs.entry.js +1 -1
  62. package/dist/cjs/kol-button-group.cjs.entry.js +1 -1
  63. package/dist/cjs/kol-button-link-text-switch.cjs.entry.js +1 -1
  64. package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
  65. package/dist/cjs/kol-button-wc_2.cjs.entry.js +1 -1
  66. package/dist/cjs/kol-button-wc_2.cjs.entry.js.map +1 -1
  67. package/dist/cjs/kol-button.cjs.entry.js +1 -1
  68. package/dist/cjs/kol-card.cjs.entry.js +1 -1
  69. package/dist/cjs/kol-details.cjs.entry.js +1 -1
  70. package/dist/cjs/kol-form.cjs.entry.js +1 -1
  71. package/dist/cjs/kol-form.cjs.entry.js.map +1 -1
  72. package/dist/cjs/kol-heading.cjs.entry.js +1 -1
  73. package/dist/cjs/kol-icon.cjs.entry.js +1 -1
  74. package/dist/cjs/kol-image.cjs.entry.js +1 -1
  75. package/dist/cjs/kol-indented-text.cjs.entry.js +1 -1
  76. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  77. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  78. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  79. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  80. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  81. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  82. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  83. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  84. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  85. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  86. package/dist/cjs/kol-input.cjs.entry.js +1 -1
  87. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  88. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  89. package/dist/cjs/kol-link-button.cjs.entry.js.map +1 -1
  90. package/dist/cjs/kol-link-group.cjs.entry.js +1 -1
  91. package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
  92. package/dist/cjs/kol-link-wc.cjs.entry.js.map +1 -1
  93. package/dist/cjs/kol-link.cjs.entry.js +1 -1
  94. package/dist/cjs/kol-link.cjs.entry.js.map +1 -1
  95. package/dist/cjs/kol-logo.cjs.entry.js +1 -1
  96. package/dist/cjs/kol-modal.cjs.entry.js +1 -1
  97. package/dist/cjs/kol-modal.cjs.entry.js.map +1 -1
  98. package/dist/cjs/kol-nav.cjs.entry.js +1 -1
  99. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  100. package/dist/cjs/kol-popover-wc.cjs.entry.js +1 -1
  101. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  102. package/dist/cjs/kol-progress.cjs.entry.js.map +1 -1
  103. package/dist/cjs/kol-quote.cjs.entry.js +1 -1
  104. package/dist/cjs/kol-select.cjs.entry.js +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-span.cjs.entry.js +1 -1
  108. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  109. package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
  110. package/dist/cjs/kol-symbol.cjs.entry.js +1 -1
  111. package/dist/cjs/kol-table.cjs.entry.js +1 -1
  112. package/dist/cjs/kol-table.cjs.entry.js.map +1 -1
  113. package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
  114. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  115. package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
  116. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  117. package/dist/cjs/kolibri.cjs.js +1 -1
  118. package/dist/cjs/kolibri.cjs.js.map +1 -1
  119. package/dist/cjs/{label-1ffb616a.js → label-945b341f.js} +1 -1
  120. package/dist/cjs/{label-1ffb616a.js.map → label-945b341f.js.map} +1 -1
  121. package/dist/cjs/loader.cjs.js +1 -1
  122. package/dist/cjs/open-882be22c.js +4 -0
  123. package/dist/cjs/{open-4fe1ba4b.js.map → open-882be22c.js.map} +1 -1
  124. package/dist/cjs/{prop.validators-85dcd797.js → prop.validators-461024d1.js} +1 -1
  125. package/dist/cjs/{prop.validators-85dcd797.js.map → prop.validators-461024d1.js.map} +1 -1
  126. package/dist/cjs/rows-ad9a160c.js +4 -0
  127. package/dist/cjs/{rows-e1b2cbc4.js.map → rows-ad9a160c.js.map} +1 -1
  128. package/dist/cjs/show-9f618ffc.js +4 -0
  129. package/dist/cjs/{show-5514164d.js.map → show-9f618ffc.js.map} +1 -1
  130. package/dist/cjs/{suggestions-c6f511ef.js → suggestions-9885b2f9.js} +1 -1
  131. package/dist/cjs/{suggestions-c6f511ef.js.map → suggestions-9885b2f9.js.map} +1 -1
  132. package/dist/cjs/{tab-index-9a2f9acd.js → tab-index-5ab3d038.js} +1 -1
  133. package/dist/cjs/{tab-index-9a2f9acd.js.map → tab-index-5ab3d038.js.map} +1 -1
  134. package/dist/cjs/{tooltip-align-231659b9.js → tooltip-align-a996d985.js} +1 -1
  135. package/dist/cjs/{tooltip-align-231659b9.js.map → tooltip-align-a996d985.js.map} +1 -1
  136. package/dist/cjs/{validation-fb5cac9f.js → validation-045dfb7f.js} +1 -1
  137. package/dist/cjs/{validation-fb5cac9f.js.map → validation-045dfb7f.js.map} +1 -1
  138. package/dist/cjs/{validation-ffe8a5ab.js → validation-91e840dd.js} +1 -1
  139. package/dist/cjs/{validation-ffe8a5ab.js.map → validation-91e840dd.js.map} +1 -1
  140. package/dist/components/align-floating-elements.js +1 -1
  141. package/dist/components/align-floating-elements.js.map +1 -1
  142. package/dist/components/color.js +1 -1
  143. package/dist/components/component.js +1 -1
  144. package/dist/components/component15.js +1 -1
  145. package/dist/components/component2.js +1 -1
  146. package/dist/components/component3.js +1 -1
  147. package/dist/components/component3.js.map +1 -1
  148. package/dist/components/component4.js +1 -1
  149. package/dist/components/component5.js +1 -1
  150. package/dist/components/component6.js +1 -1
  151. package/dist/components/component9.js +1 -1
  152. package/dist/components/component9.js.map +1 -1
  153. package/dist/components/controller.js +1 -1
  154. package/dist/components/controller2.js +1 -1
  155. package/dist/components/controller4.js +1 -1
  156. package/dist/components/devtools.js +1 -1
  157. package/dist/components/devtools.js.map +1 -1
  158. package/dist/components/has-closer.js +1 -1
  159. package/dist/components/i18n.js +1 -1
  160. package/dist/components/i18n.js.map +1 -1
  161. package/dist/components/image-source.js +1 -1
  162. package/dist/components/kol-form.js +1 -1
  163. package/dist/components/kol-form.js.map +1 -1
  164. package/dist/components/kol-image.js +1 -1
  165. package/dist/components/kol-input-checkbox.js +1 -1
  166. package/dist/components/kol-input-color.js +1 -1
  167. package/dist/components/kol-input-date.js +1 -1
  168. package/dist/components/kol-input-email.js +1 -1
  169. package/dist/components/kol-input-file.js +1 -1
  170. package/dist/components/kol-input-number.js +1 -1
  171. package/dist/components/kol-input-text.js +1 -1
  172. package/dist/components/kol-kolibri.js +1 -1
  173. package/dist/components/kol-link-button.js +1 -1
  174. package/dist/components/kol-link-button.js.map +1 -1
  175. package/dist/components/kol-modal.js +1 -1
  176. package/dist/components/kol-modal.js.map +1 -1
  177. package/dist/components/kol-nav.js +1 -1
  178. package/dist/components/kol-progress.js +1 -1
  179. package/dist/components/kol-progress.js.map +1 -1
  180. package/dist/components/kol-quote.js +1 -1
  181. package/dist/components/kol-symbol.js +1 -1
  182. package/dist/components/kol-table.js +1 -1
  183. package/dist/components/kol-table.js.map +1 -1
  184. package/dist/components/kol-textarea.js +1 -1
  185. package/dist/components/label.js +1 -1
  186. package/dist/components/open.js +1 -1
  187. package/dist/components/prop.validators.js +1 -1
  188. package/dist/components/prop.validators.js.map +1 -1
  189. package/dist/components/shadow2.js +1 -1
  190. package/dist/components/shadow2.js.map +1 -1
  191. package/dist/components/show.js +1 -1
  192. package/dist/components/suggestions.js +1 -1
  193. package/dist/components/tab-index.js +1 -1
  194. package/dist/esm/{InternalUnderlinedAccessKey-e3698cee.js → InternalUnderlinedAccessKey-3d146073.js} +1 -1
  195. package/dist/esm/{InternalUnderlinedAccessKey-e3698cee.js.map → InternalUnderlinedAccessKey-3d146073.js.map} +1 -1
  196. package/dist/esm/{a11y.tipps-f367a979.js → a11y.tipps-2a54fd3e.js} +1 -1
  197. package/dist/esm/{a11y.tipps-f367a979.js.map → a11y.tipps-2a54fd3e.js.map} +1 -1
  198. package/dist/esm/{access-key-d70aa275.js → access-key-65ff36eb.js} +1 -1
  199. package/dist/esm/{access-key-d70aa275.js.map → access-key-65ff36eb.js.map} +1 -1
  200. package/dist/esm/{align-floating-elements-cadb5c5b.js → align-floating-elements-e1edfaae.js} +1 -1
  201. package/dist/esm/align-floating-elements-e1edfaae.js.map +1 -0
  202. package/dist/esm/{alignment-493b6c84.js → alignment-3ca6c7b4.js} +1 -1
  203. package/dist/esm/{alignment-493b6c84.js.map → alignment-3ca6c7b4.js.map} +1 -1
  204. package/dist/esm/alternative-button-link-role-03c7dc90.js +4 -0
  205. package/dist/esm/{alternative-button-link-role-0fc029bf.js.map → alternative-button-link-role-03c7dc90.js.map} +1 -1
  206. package/dist/esm/{app-globals-f7f4352c.js → app-globals-b4b6e633.js} +1 -1
  207. package/dist/esm/{app-globals-f7f4352c.js.map → app-globals-b4b6e633.js.map} +1 -1
  208. package/dist/esm/{associated.controller-700d5133.js → associated.controller-4abb0353.js} +1 -1
  209. package/dist/esm/{associated.controller-700d5133.js.map → associated.controller-4abb0353.js.map} +1 -1
  210. package/dist/esm/{color-afc2e34f.js → color-2aa7218a.js} +1 -1
  211. package/dist/esm/{color-afc2e34f.js.map → color-2aa7218a.js.map} +1 -1
  212. package/dist/esm/{controller-6e772d91.js → controller-34abd025.js} +1 -1
  213. package/dist/esm/{controller-6e772d91.js.map → controller-34abd025.js.map} +1 -1
  214. package/dist/esm/{controller-ae07d1c7.js → controller-7cdc3635.js} +1 -1
  215. package/dist/esm/{controller-ae07d1c7.js.map → controller-7cdc3635.js.map} +1 -1
  216. package/dist/esm/{controller-17eb7878.js → controller-b209b2d8.js} +1 -1
  217. package/dist/esm/{controller-17eb7878.js.map → controller-b209b2d8.js.map} +1 -1
  218. package/dist/esm/{controller-60b830eb.js → controller-d02635bf.js} +1 -1
  219. package/dist/esm/{controller-60b830eb.js.map → controller-d02635bf.js.map} +1 -1
  220. package/dist/esm/{controller-e23535f2.js → controller-fe294c60.js} +1 -1
  221. package/dist/esm/{controller-e23535f2.js.map → controller-fe294c60.js.map} +1 -1
  222. package/dist/esm/{controller-icon-01cabd99.js → controller-icon-5be90e84.js} +1 -1
  223. package/dist/esm/{controller-icon-01cabd99.js.map → controller-icon-5be90e84.js.map} +1 -1
  224. package/dist/esm/custom-class-c7f11511.js +4 -0
  225. package/dist/esm/{custom-class-603a7fda.js.map → custom-class-c7f11511.js.map} +1 -1
  226. package/dist/esm/{dev.utils-da51d5d8.js → dev.utils-a1ddacb2.js} +1 -1
  227. package/dist/esm/dev.utils-a1ddacb2.js.map +1 -0
  228. package/dist/esm/devtools-f30e7098.js +4 -0
  229. package/dist/esm/devtools-f30e7098.js.map +1 -0
  230. package/dist/esm/{has-closer-091d5cc7.js → has-closer-213e1f60.js} +1 -1
  231. package/dist/esm/{has-closer-091d5cc7.js.map → has-closer-213e1f60.js.map} +1 -1
  232. package/dist/esm/{hide-label-e711f812.js → hide-label-12ff810a.js} +1 -1
  233. package/dist/esm/{hide-label-e711f812.js.map → hide-label-12ff810a.js.map} +1 -1
  234. package/dist/esm/i18n-565c326b.js +4 -0
  235. package/dist/esm/i18n-565c326b.js.map +1 -0
  236. package/dist/esm/{icons-1ad89985.js → icons-5c4d2e57.js} +1 -1
  237. package/dist/esm/{icons-1ad89985.js.map → icons-5c4d2e57.js.map} +1 -1
  238. package/dist/esm/{image-source-f76f6ad4.js → image-source-fc1918e2.js} +1 -1
  239. package/dist/esm/{image-source-f76f6ad4.js.map → image-source-fc1918e2.js.map} +1 -1
  240. package/dist/esm/index-5dfe6d77.js +4 -0
  241. package/dist/esm/index-5dfe6d77.js.map +1 -0
  242. package/dist/esm/index-b99a7aa5.js +4 -0
  243. package/dist/esm/index-b99a7aa5.js.map +1 -0
  244. package/dist/esm/index.js +1 -1
  245. package/dist/esm/kol-abbr.entry.js +1 -1
  246. package/dist/esm/kol-accordion.entry.js +1 -1
  247. package/dist/esm/kol-alert-wc_2.entry.js +1 -1
  248. package/dist/esm/kol-alert.entry.js +1 -1
  249. package/dist/esm/kol-avatar-wc.entry.js +1 -1
  250. package/dist/esm/kol-avatar.entry.js +1 -1
  251. package/dist/esm/kol-badge.entry.js +1 -1
  252. package/dist/esm/kol-breadcrumb.entry.js +1 -1
  253. package/dist/esm/kol-button-group-wc.entry.js +1 -1
  254. package/dist/esm/kol-button-group.entry.js +1 -1
  255. package/dist/esm/kol-button-link-text-switch.entry.js +1 -1
  256. package/dist/esm/kol-button-link.entry.js +1 -1
  257. package/dist/esm/kol-button-wc_2.entry.js +1 -1
  258. package/dist/esm/kol-button-wc_2.entry.js.map +1 -1
  259. package/dist/esm/kol-button.entry.js +1 -1
  260. package/dist/esm/kol-card.entry.js +1 -1
  261. package/dist/esm/kol-details.entry.js +1 -1
  262. package/dist/esm/kol-form.entry.js +1 -1
  263. package/dist/esm/kol-form.entry.js.map +1 -1
  264. package/dist/esm/kol-heading.entry.js +1 -1
  265. package/dist/esm/kol-icon.entry.js +1 -1
  266. package/dist/esm/kol-image.entry.js +1 -1
  267. package/dist/esm/kol-indented-text.entry.js +1 -1
  268. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  269. package/dist/esm/kol-input-color.entry.js +1 -1
  270. package/dist/esm/kol-input-date.entry.js +1 -1
  271. package/dist/esm/kol-input-email.entry.js +1 -1
  272. package/dist/esm/kol-input-file.entry.js +1 -1
  273. package/dist/esm/kol-input-number.entry.js +1 -1
  274. package/dist/esm/kol-input-password.entry.js +1 -1
  275. package/dist/esm/kol-input-radio.entry.js +1 -1
  276. package/dist/esm/kol-input-range.entry.js +1 -1
  277. package/dist/esm/kol-input-text.entry.js +1 -1
  278. package/dist/esm/kol-input.entry.js +1 -1
  279. package/dist/esm/kol-kolibri.entry.js +1 -1
  280. package/dist/esm/kol-link-button.entry.js +1 -1
  281. package/dist/esm/kol-link-button.entry.js.map +1 -1
  282. package/dist/esm/kol-link-group.entry.js +1 -1
  283. package/dist/esm/kol-link-wc.entry.js +1 -1
  284. package/dist/esm/kol-link-wc.entry.js.map +1 -1
  285. package/dist/esm/kol-link.entry.js +1 -1
  286. package/dist/esm/kol-link.entry.js.map +1 -1
  287. package/dist/esm/kol-logo.entry.js +1 -1
  288. package/dist/esm/kol-modal.entry.js +1 -1
  289. package/dist/esm/kol-modal.entry.js.map +1 -1
  290. package/dist/esm/kol-nav.entry.js +1 -1
  291. package/dist/esm/kol-pagination.entry.js +1 -1
  292. package/dist/esm/kol-popover-wc.entry.js +1 -1
  293. package/dist/esm/kol-progress.entry.js +1 -1
  294. package/dist/esm/kol-progress.entry.js.map +1 -1
  295. package/dist/esm/kol-quote.entry.js +1 -1
  296. package/dist/esm/kol-select.entry.js +1 -1
  297. package/dist/esm/kol-skip-nav.entry.js +1 -1
  298. package/dist/esm/kol-span-wc.entry.js +1 -1
  299. package/dist/esm/kol-span.entry.js +1 -1
  300. package/dist/esm/kol-spin.entry.js +1 -1
  301. package/dist/esm/kol-split-button.entry.js +1 -1
  302. package/dist/esm/kol-symbol.entry.js +1 -1
  303. package/dist/esm/kol-table.entry.js +1 -1
  304. package/dist/esm/kol-table.entry.js.map +1 -1
  305. package/dist/esm/kol-tabs.entry.js +1 -1
  306. package/dist/esm/kol-textarea.entry.js +1 -1
  307. package/dist/esm/kol-toast-container.entry.js +1 -1
  308. package/dist/esm/kol-version.entry.js +1 -1
  309. package/dist/esm/kolibri.js +1 -1
  310. package/dist/esm/kolibri.js.map +1 -1
  311. package/dist/esm/{label-8ddb917e.js → label-5f92bb62.js} +1 -1
  312. package/dist/esm/{label-8ddb917e.js.map → label-5f92bb62.js.map} +1 -1
  313. package/dist/esm/loader.js +1 -1
  314. package/dist/esm/{open-0bdcff02.js → open-215a7ce8.js} +1 -1
  315. package/dist/esm/{open-0bdcff02.js.map → open-215a7ce8.js.map} +1 -1
  316. package/dist/esm/{prop.validators-f887ad3b.js → prop.validators-c9100bb0.js} +1 -1
  317. package/dist/esm/{prop.validators-f887ad3b.js.map → prop.validators-c9100bb0.js.map} +1 -1
  318. package/dist/esm/{rows-77cd583c.js → rows-5e4dff0c.js} +1 -1
  319. package/dist/esm/{rows-77cd583c.js.map → rows-5e4dff0c.js.map} +1 -1
  320. package/dist/esm/{show-8341c904.js → show-509c0941.js} +1 -1
  321. package/dist/esm/{show-8341c904.js.map → show-509c0941.js.map} +1 -1
  322. package/dist/esm/{suggestions-40d68773.js → suggestions-9923bbe2.js} +1 -1
  323. package/dist/esm/{suggestions-40d68773.js.map → suggestions-9923bbe2.js.map} +1 -1
  324. package/dist/esm/{tab-index-2206620f.js → tab-index-4eba9292.js} +1 -1
  325. package/dist/esm/{tab-index-2206620f.js.map → tab-index-4eba9292.js.map} +1 -1
  326. package/dist/esm/{tooltip-align-00398d75.js → tooltip-align-36b445e5.js} +1 -1
  327. package/dist/esm/{tooltip-align-00398d75.js.map → tooltip-align-36b445e5.js.map} +1 -1
  328. package/dist/esm/{validation-503191a4.js → validation-406b3d9a.js} +1 -1
  329. package/dist/esm/{validation-503191a4.js.map → validation-406b3d9a.js.map} +1 -1
  330. package/dist/esm/validation-7eedde02.js +4 -0
  331. package/dist/esm/{validation-34db9bcf.js.map → validation-7eedde02.js.map} +1 -1
  332. package/dist/kolibri/InternalUnderlinedAccessKey-3d146073.js +4 -0
  333. package/dist/kolibri/{a11y.tipps-f367a979.js → a11y.tipps-2a54fd3e.js} +1 -1
  334. package/dist/kolibri/access-key-65ff36eb.js +4 -0
  335. package/dist/kolibri/{align-floating-elements-cadb5c5b.js → align-floating-elements-e1edfaae.js} +1 -1
  336. package/dist/kolibri/{align-floating-elements-cadb5c5b.js.map → align-floating-elements-e1edfaae.js.map} +1 -1
  337. package/dist/kolibri/alignment-3ca6c7b4.js +4 -0
  338. package/dist/kolibri/alternative-button-link-role-03c7dc90.js +4 -0
  339. package/dist/kolibri/app-globals-b4b6e633.js +4 -0
  340. package/dist/kolibri/{associated.controller-700d5133.js → associated.controller-4abb0353.js} +1 -1
  341. package/dist/kolibri/{color-afc2e34f.js → color-2aa7218a.js} +1 -1
  342. package/dist/kolibri/{controller-6e772d91.js → controller-34abd025.js} +1 -1
  343. package/dist/kolibri/{controller-ae07d1c7.js → controller-7cdc3635.js} +1 -1
  344. package/dist/kolibri/{controller-17eb7878.js → controller-b209b2d8.js} +1 -1
  345. package/dist/kolibri/{controller-60b830eb.js → controller-d02635bf.js} +1 -1
  346. package/dist/kolibri/{controller-e23535f2.js → controller-fe294c60.js} +1 -1
  347. package/dist/kolibri/{controller-icon-01cabd99.js → controller-icon-5be90e84.js} +1 -1
  348. package/dist/kolibri/custom-class-c7f11511.js +4 -0
  349. package/dist/kolibri/{dev.utils-da51d5d8.js → dev.utils-a1ddacb2.js} +1 -1
  350. package/dist/kolibri/dev.utils-a1ddacb2.js.map +1 -0
  351. package/dist/kolibri/devtools-f30e7098.js +4 -0
  352. package/dist/kolibri/devtools-f30e7098.js.map +1 -0
  353. package/dist/kolibri/has-closer-213e1f60.js +4 -0
  354. package/dist/kolibri/{has-closer-091d5cc7.js.map → has-closer-213e1f60.js.map} +1 -1
  355. package/dist/kolibri/hide-label-12ff810a.js +4 -0
  356. package/dist/kolibri/i18n-565c326b.js +4 -0
  357. package/dist/kolibri/i18n-565c326b.js.map +1 -0
  358. package/dist/kolibri/{icons-1ad89985.js → icons-5c4d2e57.js} +1 -1
  359. package/dist/kolibri/image-source-fc1918e2.js +4 -0
  360. package/dist/kolibri/index-5dfe6d77.js +5 -0
  361. package/dist/kolibri/index-5dfe6d77.js.map +1 -0
  362. package/dist/kolibri/{index-9fc5c44a.js → index-b99a7aa5.js} +1 -1
  363. package/dist/kolibri/index-b99a7aa5.js.map +1 -0
  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.entry.js +1 -1
  369. package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
  370. package/dist/kolibri/kol-avatar.entry.js +1 -1
  371. package/dist/kolibri/kol-badge.entry.js +1 -1
  372. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  373. package/dist/kolibri/kol-button-group-wc.entry.js +1 -1
  374. package/dist/kolibri/kol-button-group.entry.js +1 -1
  375. package/dist/kolibri/kol-button-link-text-switch.entry.js +1 -1
  376. package/dist/kolibri/kol-button-link.entry.js +1 -1
  377. package/dist/kolibri/kol-button-wc_2.entry.js +1 -1
  378. package/dist/kolibri/kol-button-wc_2.entry.js.map +1 -1
  379. package/dist/kolibri/kol-button.entry.js +1 -1
  380. package/dist/kolibri/kol-card.entry.js +1 -1
  381. package/dist/kolibri/kol-details.entry.js +1 -1
  382. package/dist/kolibri/kol-form.entry.js +1 -1
  383. package/dist/kolibri/kol-form.entry.js.map +1 -1
  384. package/dist/kolibri/kol-heading.entry.js +1 -1
  385. package/dist/kolibri/kol-icon.entry.js +1 -1
  386. package/dist/kolibri/kol-image.entry.js +1 -1
  387. package/dist/kolibri/kol-indented-text.entry.js +1 -1
  388. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  389. package/dist/kolibri/kol-input-color.entry.js +1 -1
  390. package/dist/kolibri/kol-input-date.entry.js +1 -1
  391. package/dist/kolibri/kol-input-email.entry.js +1 -1
  392. package/dist/kolibri/kol-input-file.entry.js +1 -1
  393. package/dist/kolibri/kol-input-number.entry.js +1 -1
  394. package/dist/kolibri/kol-input-password.entry.js +1 -1
  395. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  396. package/dist/kolibri/kol-input-range.entry.js +1 -1
  397. package/dist/kolibri/kol-input-text.entry.js +1 -1
  398. package/dist/kolibri/kol-input.entry.js +1 -1
  399. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  400. package/dist/kolibri/kol-link-button.entry.js +1 -1
  401. package/dist/kolibri/kol-link-button.entry.js.map +1 -1
  402. package/dist/kolibri/kol-link-group.entry.js +1 -1
  403. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  404. package/dist/kolibri/kol-link-wc.entry.js.map +1 -1
  405. package/dist/kolibri/kol-link.entry.js +1 -1
  406. package/dist/kolibri/kol-link.entry.js.map +1 -1
  407. package/dist/kolibri/kol-logo.entry.js +1 -1
  408. package/dist/kolibri/kol-modal.entry.js +1 -1
  409. package/dist/kolibri/kol-modal.entry.js.map +1 -1
  410. package/dist/kolibri/kol-nav.entry.js +1 -1
  411. package/dist/kolibri/kol-nav.entry.js.map +1 -1
  412. package/dist/kolibri/kol-pagination.entry.js +1 -1
  413. package/dist/kolibri/kol-popover-wc.entry.js +1 -1
  414. package/dist/kolibri/kol-progress.entry.js +1 -1
  415. package/dist/kolibri/kol-progress.entry.js.map +1 -1
  416. package/dist/kolibri/kol-quote.entry.js +1 -1
  417. package/dist/kolibri/kol-select.entry.js +1 -1
  418. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  419. package/dist/kolibri/kol-span-wc.entry.js +1 -1
  420. package/dist/kolibri/kol-span.entry.js +1 -1
  421. package/dist/kolibri/kol-spin.entry.js +1 -1
  422. package/dist/kolibri/kol-split-button.entry.js +1 -1
  423. package/dist/kolibri/kol-symbol.entry.js +1 -1
  424. package/dist/kolibri/kol-table.entry.js +1 -1
  425. package/dist/kolibri/kol-table.entry.js.map +1 -1
  426. package/dist/kolibri/kol-tabs.entry.js +1 -1
  427. package/dist/kolibri/kol-tabs.entry.js.map +1 -1
  428. package/dist/kolibri/kol-textarea.entry.js +1 -1
  429. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  430. package/dist/kolibri/kol-version.entry.js +1 -1
  431. package/dist/kolibri/kolibri.esm.js +1 -1
  432. package/dist/kolibri/kolibri.esm.js.map +1 -1
  433. package/dist/kolibri/{label-8ddb917e.js → label-5f92bb62.js} +1 -1
  434. package/dist/kolibri/open-215a7ce8.js +4 -0
  435. package/dist/kolibri/{prop.validators-f887ad3b.js → prop.validators-c9100bb0.js} +1 -1
  436. package/dist/kolibri/rows-5e4dff0c.js +4 -0
  437. package/dist/kolibri/show-509c0941.js +4 -0
  438. package/dist/kolibri/{suggestions-40d68773.js → suggestions-9923bbe2.js} +1 -1
  439. package/dist/kolibri/tab-index-4eba9292.js +4 -0
  440. package/dist/kolibri/{tab-index-2206620f.js.map → tab-index-4eba9292.js.map} +1 -1
  441. package/dist/kolibri/tooltip-align-36b445e5.js +4 -0
  442. package/dist/kolibri/{validation-503191a4.js → validation-406b3d9a.js} +1 -1
  443. package/dist/kolibri/validation-7eedde02.js +4 -0
  444. package/dist/types/components/form/component.d.ts +4 -0
  445. package/dist/types/components/form/types.d.ts +2 -1
  446. package/dist/types/components/link/component.d.ts +0 -2
  447. package/dist/types/components/link/shadow.d.ts +0 -1
  448. package/dist/types/components/link/types.d.ts +0 -1
  449. package/dist/types/components/link-button/component.d.ts +0 -1
  450. package/dist/types/components/table/component.d.ts +0 -1
  451. package/dist/types/components.d.ts +10 -24
  452. package/dist/types/i18n.d.ts +1 -1
  453. package/dist/types/locales/de.d.ts +2 -8
  454. package/dist/types/locales/en.d.ts +2 -8
  455. package/dist/types/types/button-link-text.d.ts +0 -1
  456. package/dist/types/types/props/error-list.d.ts +9 -0
  457. package/dist/types/utils/dev.utils.d.ts +2 -2
  458. package/doc/abbr.md +1 -1
  459. package/doc/accordion.md +1 -1
  460. package/doc/alert.md +1 -1
  461. package/doc/avatar.md +1 -1
  462. package/doc/badge.md +1 -1
  463. package/doc/breadcrumb.md +1 -1
  464. package/doc/button-group.md +1 -1
  465. package/doc/button-link.md +1 -1
  466. package/doc/button.md +1 -1
  467. package/doc/card.md +1 -1
  468. package/doc/details.md +1 -1
  469. package/doc/form.md +22 -5
  470. package/doc/heading.md +1 -1
  471. package/doc/icon.md +1 -1
  472. package/doc/indented-text.md +1 -1
  473. package/doc/input-checkbox.md +1 -1
  474. package/doc/input-color.md +1 -1
  475. package/doc/input-date.md +1 -1
  476. package/doc/input-email.md +1 -1
  477. package/doc/input-file.md +1 -1
  478. package/doc/input-number.md +1 -1
  479. package/doc/input-password.md +1 -1
  480. package/doc/input-radio.md +1 -1
  481. package/doc/input-range.md +1 -1
  482. package/doc/input-text.md +1 -1
  483. package/doc/link-button.md +17 -18
  484. package/doc/link-group.md +1 -1
  485. package/doc/link.md +17 -16
  486. package/doc/nav.md +1 -1
  487. package/doc/pagination.md +1 -1
  488. package/doc/quote.md +1 -1
  489. package/doc/select.md +1 -1
  490. package/doc/skip-nav.md +1 -1
  491. package/doc/span.md +1 -1
  492. package/doc/split-button.md +1 -1
  493. package/doc/table.md +3 -1
  494. package/doc/tabs.md +1 -1
  495. package/doc/textarea.md +1 -1
  496. package/doc/toaster.md +7 -1
  497. package/doc/tooltip.md +1 -1
  498. package/doc/version.md +1 -1
  499. package/package.json +1 -1
  500. package/vscode-custom-data.json +0 -8
  501. package/dist/cjs/access-key-08e22c70.js +0 -4
  502. package/dist/cjs/align-floating-elements-dca98687.js.map +0 -1
  503. package/dist/cjs/alternative-button-link-role-46c7e9ff.js +0 -4
  504. package/dist/cjs/custom-class-fe018ec9.js +0 -4
  505. package/dist/cjs/dev.utils-dd133f0a.js.map +0 -1
  506. package/dist/cjs/devtools-59e9f930.js +0 -4
  507. package/dist/cjs/devtools-59e9f930.js.map +0 -1
  508. package/dist/cjs/has-closer-e0792c7f.js +0 -4
  509. package/dist/cjs/hide-label-69a12ef6.js +0 -4
  510. package/dist/cjs/i18n-9b1797b5.js +0 -4
  511. package/dist/cjs/i18n-9b1797b5.js.map +0 -1
  512. package/dist/cjs/image-source-9b7df5ba.js +0 -4
  513. package/dist/cjs/index-814a048a.js.map +0 -1
  514. package/dist/cjs/index-de77e597.js +0 -5
  515. package/dist/cjs/index-de77e597.js.map +0 -1
  516. package/dist/cjs/open-4fe1ba4b.js +0 -4
  517. package/dist/cjs/rows-e1b2cbc4.js +0 -4
  518. package/dist/cjs/show-5514164d.js +0 -4
  519. package/dist/esm/align-floating-elements-cadb5c5b.js.map +0 -1
  520. package/dist/esm/alternative-button-link-role-0fc029bf.js +0 -4
  521. package/dist/esm/custom-class-603a7fda.js +0 -4
  522. package/dist/esm/dev.utils-da51d5d8.js.map +0 -1
  523. package/dist/esm/devtools-308d0386.js +0 -4
  524. package/dist/esm/devtools-308d0386.js.map +0 -1
  525. package/dist/esm/i18n-d92de40a.js +0 -4
  526. package/dist/esm/i18n-d92de40a.js.map +0 -1
  527. package/dist/esm/index-6ea18cec.js +0 -5
  528. package/dist/esm/index-6ea18cec.js.map +0 -1
  529. package/dist/esm/index-9fc5c44a.js +0 -4
  530. package/dist/esm/index-9fc5c44a.js.map +0 -1
  531. package/dist/esm/validation-34db9bcf.js +0 -4
  532. package/dist/kolibri/InternalUnderlinedAccessKey-e3698cee.js +0 -4
  533. package/dist/kolibri/access-key-d70aa275.js +0 -4
  534. package/dist/kolibri/alignment-493b6c84.js +0 -4
  535. package/dist/kolibri/alternative-button-link-role-0fc029bf.js +0 -4
  536. package/dist/kolibri/app-globals-f7f4352c.js +0 -4
  537. package/dist/kolibri/custom-class-603a7fda.js +0 -4
  538. package/dist/kolibri/dev.utils-da51d5d8.js.map +0 -1
  539. package/dist/kolibri/devtools-308d0386.js +0 -4
  540. package/dist/kolibri/devtools-308d0386.js.map +0 -1
  541. package/dist/kolibri/has-closer-091d5cc7.js +0 -4
  542. package/dist/kolibri/hide-label-e711f812.js +0 -4
  543. package/dist/kolibri/i18n-d92de40a.js +0 -4
  544. package/dist/kolibri/i18n-d92de40a.js.map +0 -1
  545. package/dist/kolibri/image-source-f76f6ad4.js +0 -4
  546. package/dist/kolibri/index-6ea18cec.js +0 -5
  547. package/dist/kolibri/index-6ea18cec.js.map +0 -1
  548. package/dist/kolibri/index-9fc5c44a.js.map +0 -1
  549. package/dist/kolibri/open-0bdcff02.js +0 -4
  550. package/dist/kolibri/rows-77cd583c.js +0 -4
  551. package/dist/kolibri/show-8341c904.js +0 -4
  552. package/dist/kolibri/tab-index-2206620f.js +0 -4
  553. package/dist/kolibri/tooltip-align-00398d75.js +0 -4
  554. package/dist/kolibri/validation-34db9bcf.js +0 -4
  555. /package/dist/kolibri/{InternalUnderlinedAccessKey-e3698cee.js.map → InternalUnderlinedAccessKey-3d146073.js.map} +0 -0
  556. /package/dist/kolibri/{a11y.tipps-f367a979.js.map → a11y.tipps-2a54fd3e.js.map} +0 -0
  557. /package/dist/kolibri/{access-key-d70aa275.js.map → access-key-65ff36eb.js.map} +0 -0
  558. /package/dist/kolibri/{alignment-493b6c84.js.map → alignment-3ca6c7b4.js.map} +0 -0
  559. /package/dist/kolibri/{alternative-button-link-role-0fc029bf.js.map → alternative-button-link-role-03c7dc90.js.map} +0 -0
  560. /package/dist/kolibri/{app-globals-f7f4352c.js.map → app-globals-b4b6e633.js.map} +0 -0
  561. /package/dist/kolibri/{associated.controller-700d5133.js.map → associated.controller-4abb0353.js.map} +0 -0
  562. /package/dist/kolibri/{color-afc2e34f.js.map → color-2aa7218a.js.map} +0 -0
  563. /package/dist/kolibri/{controller-6e772d91.js.map → controller-34abd025.js.map} +0 -0
  564. /package/dist/kolibri/{controller-ae07d1c7.js.map → controller-7cdc3635.js.map} +0 -0
  565. /package/dist/kolibri/{controller-17eb7878.js.map → controller-b209b2d8.js.map} +0 -0
  566. /package/dist/kolibri/{controller-60b830eb.js.map → controller-d02635bf.js.map} +0 -0
  567. /package/dist/kolibri/{controller-e23535f2.js.map → controller-fe294c60.js.map} +0 -0
  568. /package/dist/kolibri/{controller-icon-01cabd99.js.map → controller-icon-5be90e84.js.map} +0 -0
  569. /package/dist/kolibri/{custom-class-603a7fda.js.map → custom-class-c7f11511.js.map} +0 -0
  570. /package/dist/kolibri/{hide-label-e711f812.js.map → hide-label-12ff810a.js.map} +0 -0
  571. /package/dist/kolibri/{icons-1ad89985.js.map → icons-5c4d2e57.js.map} +0 -0
  572. /package/dist/kolibri/{image-source-f76f6ad4.js.map → image-source-fc1918e2.js.map} +0 -0
  573. /package/dist/kolibri/{label-8ddb917e.js.map → label-5f92bb62.js.map} +0 -0
  574. /package/dist/kolibri/{open-0bdcff02.js.map → open-215a7ce8.js.map} +0 -0
  575. /package/dist/kolibri/{prop.validators-f887ad3b.js.map → prop.validators-c9100bb0.js.map} +0 -0
  576. /package/dist/kolibri/{rows-77cd583c.js.map → rows-5e4dff0c.js.map} +0 -0
  577. /package/dist/kolibri/{show-8341c904.js.map → show-509c0941.js.map} +0 -0
  578. /package/dist/kolibri/{suggestions-40d68773.js.map → suggestions-9923bbe2.js.map} +0 -0
  579. /package/dist/kolibri/{tooltip-align-00398d75.js.map → tooltip-align-36b445e5.js.map} +0 -0
  580. /package/dist/kolibri/{validation-503191a4.js.map → validation-406b3d9a.js.map} +0 -0
  581. /package/dist/kolibri/{validation-34db9bcf.js.map → validation-7eedde02.js.map} +0 -0
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{f as watchString}from"./prop.validators.js";const validateImageSource=(a,r,t)=>{watchString(a,"_src",r,t)};export{validateImageSource as v};
4
+ import{b as watchString}from"./prop.validators.js";const validateImageSource=(a,r,t)=>{watchString(a,"_src",r,t)};export{validateImageSource as v};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{a as translate}from"./i18n.js";import{g as watchBoolean,f as watchString}from"./prop.validators.js";import{d as defineCustomElement$2}from"./component12.js";const KolForm$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.onSubmit=t=>{var e,o;t.preventDefault(),t.stopPropagation(),"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e.onSubmit)&&(null===(o=this.state._on)||void 0===o||o.onSubmit(t))},this.onReset=t=>{var e,o;t.preventDefault(),t.stopPropagation(),"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e.onReset)&&(null===(o=this.state._on)||void 0===o||o.onReset(t))},this._on=void 0,this._requiredText=!0,this.state={}}render(){return h("form",{method:"post",onSubmit:this.onSubmit,onReset:this.onReset,autoComplete:"off",noValidate:!0},!0===this.state._requiredText?h("p",null,h("kol-indented-text",null,translate("kol-form-description"))):"string"==typeof this.state._requiredText&&this.state._requiredText.length>0?h("p",null,h("kol-indented-text",null,this.state._requiredText)):null,h("slot",null))}validateOn(t){"object"==typeof t&&null!==t&&(this.state=Object.assign(Object.assign({},this.state),{_on:t}))}validateRequiredText(t){"boolean"==typeof t?watchBoolean(this,"_requiredText",t):watchString(this,"_requiredText",t)}componentWillLoad(){this.validateOn(this._on),this.validateRequiredText(this._requiredText)}static get watchers(){return{_on:["validateOn"],_requiredText:["validateRequiredText"]}}},[1,"kol-form",{_on:[16],_requiredText:[8,"_required-text"],state:[32]},void 0,{_on:["validateOn"],_requiredText:["validateRequiredText"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-form","kol-indented-text"].forEach((t=>{switch(t){case"kol-form":customElements.get(t)||customElements.define(t,KolForm$1);break;case"kol-indented-text":customElements.get(t)||defineCustomElement$2()}}))}const KolForm=KolForm$1,defineCustomElement=defineCustomElement$1;export{KolForm,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{a as translate}from"./i18n.js";import{w as watchValidator,f as watchBoolean,b as watchString}from"./prop.validators.js";import{d as defineCustomElement$b}from"./shadow.js";import{d as defineCustomElement$a}from"./component6.js";import{d as defineCustomElement$9}from"./component5.js";import{d as defineCustomElement$8}from"./component4.js";import{d as defineCustomElement$7}from"./component.js";import{d as defineCustomElement$6}from"./component12.js";import{d as defineCustomElement$5}from"./shadow2.js";import{d as defineCustomElement$4}from"./component9.js";import{d as defineCustomElement$3}from"./component2.js";import{d as defineCustomElement$2}from"./component3.js";const validateErrorList=(e,t)=>{watchValidator(e,"errorList",(e=>"object"==typeof e),new Set(["Object"]),t)},KolForm$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.onSubmit=e=>{var t,o;e.preventDefault(),e.stopPropagation(),"function"==typeof(null===(t=this.state._on)||void 0===t?void 0:t.onSubmit)&&(null===(o=this.state._on)||void 0===o||o.onSubmit(e))},this.onReset=e=>{var t,o;e.preventDefault(),e.stopPropagation(),"function"==typeof(null===(t=this.state._on)||void 0===t?void 0:t.onReset)&&(null===(o=this.state._on)||void 0===o||o.onReset(e))},this.handleLinkClick=e=>{var t;const o=null===(t=e.target)||void 0===t?void 0:t.href;if(o){const e=new URL(o),t=document.querySelector(e.hash);t&&"function"==typeof t.focus&&(t.scrollIntoView({behavior:"smooth"}),t.focus())}},this._on=void 0,this._requiredText=!0,this._errorList=void 0,this.state={}}render(){return h("form",{method:"post",onSubmit:this.onSubmit,onReset:this.onReset,autoComplete:"off",noValidate:!0},this._errorList&&this._errorList.length>0&&h("kol-alert",{_type:"error"},translate("kol-error-list-message"),h("nav",{"aria-label":translate("kol-error-list")},h("ul",null,this._errorList.map(((e,t)=>h("li",{key:t},h("kol-link",{_href:e.selector,_label:e.message,_on:{onClick:this.handleLinkClick}}))))))),!0===this.state._requiredText?h("p",null,h("kol-indented-text",null,translate("kol-form-description"))):"string"==typeof this.state._requiredText&&this.state._requiredText.length>0?h("p",null,h("kol-indented-text",null,this.state._requiredText)):null,h("slot",null))}validateOn(e){"object"==typeof e&&null!==e&&(this.state=Object.assign(Object.assign({},this.state),{_on:e}))}validateRequiredText(e){"boolean"==typeof e?watchBoolean(this,"_requiredText",e):watchString(this,"_requiredText",e)}validateErrorList(e){validateErrorList(this,e)}componentWillLoad(){this.validateOn(this._on),this.validateRequiredText(this._requiredText),this.validateErrorList(this._errorList)}static get watchers(){return{_on:["validateOn"],_requiredText:["validateRequiredText"],_errorList:["validateErrorList"]}}},[1,"kol-form",{_on:[16],_requiredText:[8,"_required-text"],_errorList:[16],state:[32]},void 0,{_on:["validateOn"],_requiredText:["validateRequiredText"],_errorList:["validateErrorList"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-form","kol-alert","kol-alert-wc","kol-button-wc","kol-heading-wc","kol-icon","kol-indented-text","kol-link","kol-link-wc","kol-span-wc","kol-tooltip-wc"].forEach((e=>{switch(e){case"kol-form":customElements.get(e)||customElements.define(e,KolForm$1);break;case"kol-alert":customElements.get(e)||defineCustomElement$b();break;case"kol-alert-wc":customElements.get(e)||defineCustomElement$a();break;case"kol-button-wc":customElements.get(e)||defineCustomElement$9();break;case"kol-heading-wc":customElements.get(e)||defineCustomElement$8();break;case"kol-icon":customElements.get(e)||defineCustomElement$7();break;case"kol-indented-text":customElements.get(e)||defineCustomElement$6();break;case"kol-link":customElements.get(e)||defineCustomElement$5();break;case"kol-link-wc":customElements.get(e)||defineCustomElement$4();break;case"kol-span-wc":customElements.get(e)||defineCustomElement$3();break;case"kol-tooltip-wc":customElements.get(e)||defineCustomElement$2()}}))}const KolForm=KolForm$1,defineCustomElement=defineCustomElement$1;export{KolForm,defineCustomElement};
@@ -1 +1 @@
1
- {"file":"kol-form.js","mappings":";;;;;;;;MAcaA,SAAO;;;;;QACF,aAAQ,GAAG,CAAC,KAAY;;YACxC,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,KAAK,CAAC,eAAe,EAAE,CAAC;YACxB,IAAI,QAAO,MAAA,IAAI,CAAC,KAAK,CAAC,GAAG,0CAAE,QAAQ,CAAA,KAAK,UAAU,EAAE;gBACnD,MAAA,IAAI,CAAC,KAAK,CAAC,GAAG,0CAAE,QAAQ,CAAC,KAAoB,CAAC,CAAC;aAC/C;SACD,CAAC;QACe,YAAO,GAAG,CAAC,KAAY;;YACvC,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,KAAK,CAAC,eAAe,EAAE,CAAC;YACxB,IAAI,QAAO,MAAA,IAAI,CAAC,KAAK,CAAC,GAAG,0CAAE,OAAO,CAAA,KAAK,UAAU,EAAE;gBAClD,MAAA,IAAI,CAAC,KAAK,CAAC,GAAG,0CAAE,OAAO,CAAC,KAAK,CAAC,CAAC;aAC/B;SACD,CAAC;;6BA2BoD,IAAI;qBAE1B,EAAE;;IA3B3B,MAAM;QACZ,QACC,YAAM,MAAM,EAAC,MAAM,EAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,YAAY,EAAC,KAAK,EAAC,UAAU,UAC/F,IAAI,CAAC,KAAK,CAAC,aAAa,KAAK,IAAI,IACjC,aACC,6BAAoB,SAAS,CAAC,sBAAsB,CAAC,CAAqB,CACvE,IACD,OAAO,IAAI,CAAC,KAAK,CAAC,aAAa,KAAK,QAAQ,IAAI,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,IACtF,aACC,6BAAoB,IAAI,CAAC,KAAK,CAAC,aAAa,CAAqB,CAC9D,IACD,IAAI,EACR,eAAQ,CACF,EACN;KACF;IAeM,UAAU,CAAC,KAA4B;QAC7C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE;YAChD,IAAI,CAAC,KAAK,mCACN,IAAI,CAAC,KAAK,KACb,GAAG,EAAE,KAAK,GACV,CAAC;SACF;KACD;IAGM,oBAAoB,CAAC,KAA4B;QACvD,IAAI,OAAO,KAAK,KAAK,SAAS,EAAE;YAC/B,YAAY,CAAC,IAAI,EAAE,eAAe,EAAE,KAAK,CAAC,CAAC;SAC3C;aAAM;YACN,WAAW,CAAC,IAAI,EAAE,eAAe,EAAE,KAAK,CAAC,CAAC;SAC1C;KACD;IAEM,iBAAiB;QACvB,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC1B,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;KAC9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolForm"],"sources":["src/components/form/component.tsx"],"sourcesContent":["import { Component, h, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { translate } from '../../i18n';\nimport { Stringified } from '../../types/common';\nimport { watchBoolean, watchString } from '../../utils/prop.validators';\nimport { API, KoliBriFormCallbacks, States } from './types';\n\n/**\n * @slot - Inhalt der Form.\n */\n@Component({\n\ttag: 'kol-form',\n\tshadow: true,\n})\nexport class KolForm implements API {\n\tprivate readonly onSubmit = (event: Event) => {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\tif (typeof this.state._on?.onSubmit === 'function') {\n\t\t\tthis.state._on?.onSubmit(event as SubmitEvent);\n\t\t}\n\t};\n\tprivate readonly onReset = (event: Event) => {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\tif (typeof this.state._on?.onReset === 'function') {\n\t\t\tthis.state._on?.onReset(event);\n\t\t}\n\t};\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<form method=\"post\" onSubmit={this.onSubmit} onReset={this.onReset} autoComplete=\"off\" noValidate>\n\t\t\t\t{this.state._requiredText === true ? (\n\t\t\t\t\t<p>\n\t\t\t\t\t\t<kol-indented-text>{translate('kol-form-description')}</kol-indented-text>\n\t\t\t\t\t</p>\n\t\t\t\t) : typeof this.state._requiredText === 'string' && this.state._requiredText.length > 0 ? (\n\t\t\t\t\t<p>\n\t\t\t\t\t\t<kol-indented-text>{this.state._requiredText}</kol-indented-text>\n\t\t\t\t\t</p>\n\t\t\t\t) : null}\n\t\t\t\t<slot />\n\t\t\t</form>\n\t\t);\n\t}\n\n\t/**\n\t * Gibt die EventCallback-Funktionen für die Form-Events an.\n\t */\n\t@Prop() public _on?: KoliBriFormCallbacks;\n\n\t/**\n\t * Defines whether the mandatory-fields-hint should be shown. A string overrides the default text.\n\t */\n\t@Prop() public _requiredText?: Stringified<boolean> = true;\n\n\t@State() public state: States = {};\n\n\t@Watch('_on')\n\tpublic validateOn(value?: KoliBriFormCallbacks): void {\n\t\tif (typeof value === 'object' && value !== null) {\n\t\t\tthis.state = {\n\t\t\t\t...this.state,\n\t\t\t\t_on: value,\n\t\t\t};\n\t\t}\n\t}\n\n\t@Watch('_requiredText')\n\tpublic validateRequiredText(value?: Stringified<boolean>): void {\n\t\tif (typeof value === 'boolean') {\n\t\t\twatchBoolean(this, '_requiredText', value);\n\t\t} else {\n\t\t\twatchString(this, '_requiredText', value);\n\t\t}\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateOn(this._on);\n\t\tthis.validateRequiredText(this._requiredText);\n\t}\n}\n"],"version":3}
1
+ {"file":"kol-form.js","mappings":";;;;;;;;;;;;;;;;;AAcO,MAAM,iBAAiB,GAAG,CAAC,SAAoC,EAAE,KAA2B;IAClG,cAAc,CAAC,SAAS,EAAE,WAAW,EAAE,CAAC,KAAK,KAAc,OAAO,KAAK,KAAK,QAAQ,EAAE,IAAI,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;AACnH,CAAC;;MCDYA,SAAO;;;;;QACF,aAAQ,GAAG,CAAC,KAAY;;YACxC,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,KAAK,CAAC,eAAe,EAAE,CAAC;YACxB,IAAI,QAAO,MAAA,IAAI,CAAC,KAAK,CAAC,GAAG,0CAAE,QAAQ,CAAA,KAAK,UAAU,EAAE;gBACnD,MAAA,IAAI,CAAC,KAAK,CAAC,GAAG,0CAAE,QAAQ,CAAC,KAAoB,CAAC,CAAC;aAC/C;SACD,CAAC;QACe,YAAO,GAAG,CAAC,KAAY;;YACvC,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,KAAK,CAAC,eAAe,EAAE,CAAC;YACxB,IAAI,QAAO,MAAA,IAAI,CAAC,KAAK,CAAC,GAAG,0CAAE,OAAO,CAAA,KAAK,UAAU,EAAE;gBAClD,MAAA,IAAI,CAAC,KAAK,CAAC,GAAG,0CAAE,OAAO,CAAC,KAAK,CAAC,CAAC;aAC/B;SACD,CAAC;QAEe,oBAAe,GAAG,CAAC,KAAY;;YAC/C,MAAM,IAAI,GAAG,MAAC,KAAK,CAAC,MAAwC,0CAAE,IAAI,CAAC;YACnE,IAAI,IAAI,EAAE;gBACT,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC;gBAE9B,MAAM,aAAa,GAAG,QAAQ,CAAC,aAAa,CAAc,OAAO,CAAC,IAAI,CAAC,CAAC;gBACxE,IAAI,aAAa,IAAI,OAAO,aAAa,CAAC,KAAK,KAAK,UAAU,EAAE;oBAC/D,aAAa,CAAC,cAAc,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC;oBACrD,aAAa,CAAC,KAAK,EAAE,CAAC;iBACtB;aACD;SACD,CAAC;;6BAyCoD,IAAI;;qBAO1B,EAAE;;IA9C3B,MAAM;QACZ,QACC,YAAM,MAAM,EAAC,MAAM,EAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,YAAY,EAAC,KAAK,EAAC,UAAU,UAC/F,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,KAC7C,iBAAW,KAAK,EAAC,OAAO,IACtB,SAAS,CAAC,wBAAwB,CAAC,EACpC,yBAAiB,SAAS,CAAC,gBAAgB,CAAC,IAC3C,cACE,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,MACjC,UAAI,GAAG,EAAE,KAAK,IACb,gBAAU,KAAK,EAAE,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,eAAe,EAAE,GAAI,CAC9F,CACL,CAAC,CACE,CACA,CACK,CACZ,EACA,IAAI,CAAC,KAAK,CAAC,aAAa,KAAK,IAAI,IACjC,aACC,6BAAoB,SAAS,CAAC,sBAAsB,CAAC,CAAqB,CACvE,IACD,OAAO,IAAI,CAAC,KAAK,CAAC,aAAa,KAAK,QAAQ,IAAI,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,IACtF,aACC,6BAAoB,IAAI,CAAC,KAAK,CAAC,aAAa,CAAqB,CAC9D,IACD,IAAI,EACR,eAAQ,CACF,EACN;KACF;IAoBM,UAAU,CAAC,KAA4B;QAC7C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE;YAChD,IAAI,CAAC,KAAK,mCACN,IAAI,CAAC,KAAK,KACb,GAAG,EAAE,KAAK,GACV,CAAC;SACF;KACD;IAGM,oBAAoB,CAAC,KAA4B;QACvD,IAAI,OAAO,KAAK,KAAK,SAAS,EAAE;YAC/B,YAAY,CAAC,IAAI,EAAE,eAAe,EAAE,KAAK,CAAC,CAAC;SAC3C;aAAM;YACN,WAAW,CAAC,IAAI,EAAE,eAAe,EAAE,KAAK,CAAC,CAAC;SAC1C;KACD;IAGM,iBAAiB,CAAC,KAA2B;QACnD,iBAAiB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;KAC/B;IAEM,iBAAiB;QACvB,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC1B,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC9C,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;KACxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolForm"],"sources":["src/types/props/error-list.ts","src/components/form/component.tsx"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\nimport { watchValidator } from '../../utils/prop.validators';\n\n/* types */\nexport type ErrorListPropType = {\n\tmessage: string;\n\tselector: string;\n};\n\nexport type PropErrorList = {\n\terrorList: ErrorListPropType[];\n};\n\n/* validator */\nexport const validateErrorList = (component: Generic.Element.Component, value?: ErrorListPropType[]): void => {\n\twatchValidator(component, 'errorList', (value): boolean => typeof value === 'object', new Set(['Object']), value);\n};\n","import { Component, h, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { translate } from '../../i18n';\nimport { Stringified } from '../../types/common';\nimport { watchBoolean, watchString } from '../../utils/prop.validators';\nimport { API, KoliBriFormCallbacks, States } from './types';\nimport { ErrorListPropType, validateErrorList } from '../../types/props/error-list';\n\n/**\n * @slot - Inhalt der Form.\n */\n@Component({\n\ttag: 'kol-form',\n\tshadow: true,\n})\nexport class KolForm implements API {\n\tprivate readonly onSubmit = (event: Event) => {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\tif (typeof this.state._on?.onSubmit === 'function') {\n\t\t\tthis.state._on?.onSubmit(event as SubmitEvent);\n\t\t}\n\t};\n\tprivate readonly onReset = (event: Event) => {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\tif (typeof this.state._on?.onReset === 'function') {\n\t\t\tthis.state._on?.onReset(event);\n\t\t}\n\t};\n\n\tprivate readonly handleLinkClick = (event: Event) => {\n\t\tconst href = (event.target as HTMLAnchorElement | undefined)?.href;\n\t\tif (href) {\n\t\t\tconst hrefUrl = new URL(href);\n\n\t\t\tconst targetElement = document.querySelector<HTMLElement>(hrefUrl.hash);\n\t\t\tif (targetElement && typeof targetElement.focus === 'function') {\n\t\t\t\ttargetElement.scrollIntoView({ behavior: 'smooth' });\n\t\t\t\ttargetElement.focus();\n\t\t\t}\n\t\t}\n\t};\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<form method=\"post\" onSubmit={this.onSubmit} onReset={this.onReset} autoComplete=\"off\" noValidate>\n\t\t\t\t{this._errorList && this._errorList.length > 0 && (\n\t\t\t\t\t<kol-alert _type=\"error\">\n\t\t\t\t\t\t{translate('kol-error-list-message')}\n\t\t\t\t\t\t<nav aria-label={translate('kol-error-list')}>\n\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t{this._errorList.map((error, index) => (\n\t\t\t\t\t\t\t\t\t<li key={index}>\n\t\t\t\t\t\t\t\t\t\t<kol-link _href={error.selector} _label={error.message} _on={{ onClick: this.handleLinkClick }} />\n\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t</nav>\n\t\t\t\t\t</kol-alert>\n\t\t\t\t)}\n\t\t\t\t{this.state._requiredText === true ? (\n\t\t\t\t\t<p>\n\t\t\t\t\t\t<kol-indented-text>{translate('kol-form-description')}</kol-indented-text>\n\t\t\t\t\t</p>\n\t\t\t\t) : typeof this.state._requiredText === 'string' && this.state._requiredText.length > 0 ? (\n\t\t\t\t\t<p>\n\t\t\t\t\t\t<kol-indented-text>{this.state._requiredText}</kol-indented-text>\n\t\t\t\t\t</p>\n\t\t\t\t) : null}\n\t\t\t\t<slot />\n\t\t\t</form>\n\t\t);\n\t}\n\n\t/**\n\t * Gibt die EventCallback-Funktionen für die Form-Events an.\n\t */\n\t@Prop() public _on?: KoliBriFormCallbacks;\n\n\t/**\n\t * Defines whether the mandatory-fields-hint should be shown. A string overrides the default text.\n\t */\n\t@Prop() public _requiredText?: Stringified<boolean> = true;\n\t/**\n\t * A list of error objects that each describe an issue encountered in the form.\n\t * Each error object contains a message and a selector for identifying the form element related to the error.\n\t */\n\t@Prop() public _errorList?: ErrorListPropType[];\n\n\t@State() public state: States = {};\n\n\t@Watch('_on')\n\tpublic validateOn(value?: KoliBriFormCallbacks): void {\n\t\tif (typeof value === 'object' && value !== null) {\n\t\t\tthis.state = {\n\t\t\t\t...this.state,\n\t\t\t\t_on: value,\n\t\t\t};\n\t\t}\n\t}\n\n\t@Watch('_requiredText')\n\tpublic validateRequiredText(value?: Stringified<boolean>): void {\n\t\tif (typeof value === 'boolean') {\n\t\t\twatchBoolean(this, '_requiredText', value);\n\t\t} else {\n\t\t\twatchString(this, '_requiredText', value);\n\t\t}\n\t}\n\n\t@Watch('_errorList')\n\tpublic validateErrorList(value?: ErrorListPropType[]): void {\n\t\tvalidateErrorList(this, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateOn(this._on);\n\t\tthis.validateRequiredText(this._requiredText);\n\t\tthis.validateErrorList(this._errorList);\n\t}\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{v as validateImageSource}from"./image-source.js";import{w as watchValidator,f as watchString}from"./prop.validators.js";const loadingOptions=["eager","lazy"];function validateLoading(t,e){watchValidator(t,"_loading",(t=>"string"==typeof t&&loadingOptions.includes(t)),new Set(loadingOptions),e)}const defaultStyleCss="@layer kol-component {\n\t:host {\n\t\tdisplay: inline-block;\n\t}\n\timg {\n\t\tmax-height: 100%;\n\t\tmax-width: 100%;\n\t}\n}\n",KolImage$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this._alt=void 0,this._loading="lazy",this._sizes=void 0,this._src=void 0,this._srcset=void 0,this.state={_alt:"…",_loading:"lazy",_src:"…"}}validateAlt(t){watchString(this,"_alt",t,{required:!0})}validateLoading(t){validateLoading(this,t)}validateSizes(t){watchString(this,"_sizes",t)}validateSrc(t){validateImageSource(this,t,{required:!0})}validateSrcset(t){watchString(this,"_srcset",t)}componentWillLoad(){this.validateAlt(this._alt),this.validateLoading(this._loading),this.validateSizes(this._sizes),this.validateSrc(this._src),this.validateSrcset(this._srcset)}render(){return h(Host,null,h("img",{alt:this.state._alt,loading:this.state._loading,sizes:this.state._sizes,src:this.state._src,srcset:this.state._srcset}))}static get watchers(){return{_alt:["validateAlt"],_loading:["validateLoading"],_sizes:["validateSizes"],_src:["validateSrc"],_srcset:["validateSrcset"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-image",{_alt:[1],_loading:[1],_sizes:[1],_src:[1],_srcset:[1],state:[32]},void 0,{_alt:["validateAlt"],_loading:["validateLoading"],_sizes:["validateSizes"],_src:["validateSrc"],_srcset:["validateSrcset"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-image"].forEach((t=>{if("kol-image"===t)customElements.get(t)||customElements.define(t,KolImage$1)}))}const KolImage=KolImage$1,defineCustomElement=defineCustomElement$1;export{KolImage,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{v as validateImageSource}from"./image-source.js";import{w as watchValidator,b as watchString}from"./prop.validators.js";const loadingOptions=["eager","lazy"];function validateLoading(t,e){watchValidator(t,"_loading",(t=>"string"==typeof t&&loadingOptions.includes(t)),new Set(loadingOptions),e)}const defaultStyleCss="@layer kol-component {\n\t:host {\n\t\tdisplay: inline-block;\n\t}\n\timg {\n\t\tmax-height: 100%;\n\t\tmax-width: 100%;\n\t}\n}\n",KolImage$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this._alt=void 0,this._loading="lazy",this._sizes=void 0,this._src=void 0,this._srcset=void 0,this.state={_alt:"…",_loading:"lazy",_src:"…"}}validateAlt(t){watchString(this,"_alt",t,{required:!0})}validateLoading(t){validateLoading(this,t)}validateSizes(t){watchString(this,"_sizes",t)}validateSrc(t){validateImageSource(this,t,{required:!0})}validateSrcset(t){watchString(this,"_srcset",t)}componentWillLoad(){this.validateAlt(this._alt),this.validateLoading(this._loading),this.validateSizes(this._sizes),this.validateSrc(this._src),this.validateSrcset(this._srcset)}render(){return h(Host,null,h("img",{alt:this.state._alt,loading:this.state._loading,sizes:this.state._sizes,src:this.state._src,srcset:this.state._srcset}))}static get watchers(){return{_alt:["validateAlt"],_loading:["validateLoading"],_sizes:["validateSizes"],_src:["validateSrc"],_srcset:["validateSrcset"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-image",{_alt:[1],_loading:[1],_sizes:[1],_src:[1],_srcset:[1],state:[32]},void 0,{_alt:["validateAlt"],_loading:["validateLoading"],_sizes:["validateSizes"],_src:["validateSrc"],_srcset:["validateSrcset"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-image"].forEach((t=>{if("kol-image"===t)customElements.get(t)||customElements.define(t,KolImage$1)}))}const KolImage=KolImage$1,defineCustomElement=defineCustomElement$1;export{KolImage,defineCustomElement};
@@ -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{g as watchBoolean,w as watchValidator,i as isString,t as setState,r as propagateFocus,n as nonce,s as showExpertSlot}from"./prop.validators.js";import{s as stopPropagation,t as tryToDispatchKoliBriEvent}from"./events.js";import{g as getRenderStates}from"./controller.js";import{I as InputCheckboxRadioController}from"./controller2.js";import{I as InternalUnderlinedAccessKey,d as defineCustomElement$3}from"./component2.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 validateChecked=(t,e)=>{watchBoolean(t,"_checked",e)},validateIndeterminate=(t,e)=>{watchBoolean(t,"_indeterminate",e)},inputCheckboxVariantOptions=["button","default","switch"];class InputCheckboxController extends InputCheckboxRadioController{constructor(t,e,n){super(t,e,n),this.setFormAssociatedCheckboxValue=t=>{this.component._checked?this.setFormAssociatedValue(t):this.setFormAssociatedValue(null)},this.component=t}validateChecked(t){validateChecked(this.component,t),this.setFormAssociatedCheckboxValue(this.component.state._value)}validateIcons(t){watchValidator(this.component,"_icons",(t=>"object"==typeof t&&null!==t&&(isString(t.checked,1)||isString(t.indeterminate,1)||isString(t.unchecked,1))),new Set(["InputCheckboxIcons"]),t,{hooks:{beforePatch:(t,e,n)=>{e.set("_icons",Object.assign(Object.assign({},n.state._icons),t))}}})}validateIndeterminate(t){validateIndeterminate(this.component,t)}validateValue(t){setState(this.component,"_value",t),this.setFormAssociatedCheckboxValue(this.component.state._value)}validateVariant(t){watchValidator(this.component,"_variant",(t=>"string"==typeof t&&inputCheckboxVariantOptions.includes(t)),new Set([`String {${inputCheckboxVariantOptions.join(", ")}`]),t)}componentWillLoad(){super.componentWillLoad(),this.validateChecked(this.component._checked),this.validateIcons(this.component._icons),this.validateIndeterminate(this.component._indeterminate),this.validateValue(this.component._value),this.validateVariant(this.component._variant)}}const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\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\t/*\n\t\t * No element should be used without a background and font color whose contrast ratio has\n\t\t * not been checked. By initially setting the background color to white and the font color\n\t\t * to black, the contrast ratio is ensured and explicit adjustment is forced.\n\t\t */\n\t\tbackground-color: white;\n\t\tcolor: black;\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}\n\n\t* {\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/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n\tclip: rect(0 0 0 0);\n\tclip-path: inset(50%);\n\theight: 1px;\n\toverflow: hidden;\n\tposition: absolute;\n\twhite-space: nowrap;\n\twidth: 1px;\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\t/*\n\t * Ensure elements with hidden attribute to be actually not visible\n\t * @see https://meowni.ca/hidden.is.a.lie.html\n\t */\n\t[hidden] {\n\t\tdisplay: none !important;\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/* 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, option, select, textarea, .input-label) {\n\t\tcursor: not-allowed;\n\t\topacity: 0.5;\n\t}\n}\n\n@layer kol-component {\n\tlabel {\n\t\tcursor: pointer;\n\t}\n\n\tkol-input {\n\t\talign-items: center;\n\t\tdisplay: grid;\n\t\tjustify-items: left;\n\t}\n\n\tkol-input.default,\n\tkol-input.switch {\n\t\tgrid-template-columns: auto 1fr;\n\t}\n\n\tkol-input .input {\n\t\talign-items: center;\n\t\tdisplay: grid;\n\t\torder: 1;\n\t}\n\n\tkol-input .input div {\n\t\tdisplay: inline-flex;\n\t}\n\n\tkol-input .input input {\n\t\tmargin: 0;\n\t}\n\n\tkol-input label {\n\t\torder: 2;\n\t}\n\n\tkol-input .hint,\n\tkol-input.error > kol-alert {\n\t\tgrid-column: span 2;\n\t}\n\n\tkol-input kol-alert.error {\n\t\torder: 3;\n\t}\n\n\tkol-input .hint {\n\t\torder: 4;\n\t}\n\n\t.error.hidden {\n\t\tdisplay: none;\n\t}\n\n\tinput {\n\t\tborder-style: solid;\n\t\tborder-width: 2px;\n\t\tline-height: 24px;\n\t}\n\n\tinput[type='checkbox'] {\n\t\tappearance: none;\n\t\tbackground-color: #fff;\n\t\tcursor: pointer;\n\t\ttransition: 0.5s;\n\t}\n\n\tinput[type='checkbox']:before {\n\t\tcontent: '';\n\t\tcursor: pointer;\n\t}\n\n\tinput[type='checkbox']:disabled:before {\n\t\tcursor: not-allowed;\n\t}\n\n\tkol-input.required .tooltip-content .span-label::after {\n\t\tcontent: '*';\n\t}\n}\n\n@layer kol-component {\n\t.button {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: var(--a11y-min-size) auto;\n\t\tgrid-template-areas: 'error error' 'input label' 'hint hint';\n\t}\n\t.button:focus-within {\n\t\t/* override global `[tabindex]:focus` style */\n\t\tcursor: inherit;\n\t\toutline-color: black;\n\t\toutline-style: solid;\n\t}\n\n\t.button > .error {\n\t\tgrid-area: error;\n\t}\n\n\t.button > label {\n\t\tgrid-area: label;\n\t}\n\n\t.button > .input {\n\t\tgrid-area: input;\n\t}\n\n\t.button > .hint {\n\t\tgrid-area: hint;\n\t}\n\n\t.button .icon {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\twidth: var(--a11y-min-size);\n\t\theight: var(--a11y-min-size);\n\t}\n}\n\n@layer kol-component {\n\t.default {\n\t\t& .checkbox-container {\n\t\t\talign-items: center;\n\t\t\tdisplay: flex;\n\t\t\theight: var(--a11y-min-size);\n\t\t\tjustify-content: center;\n\t\t\tposition: relative;\n\t\t\twidth: var(--a11y-min-size);\n\t\t}\n\n\t\t& .icon {\n\t\t\tdisplay: block;\n\t\t\tinset: auto;\n\t\t\tposition: absolute;\n\t\t\tz-index: 1;\n\t\t}\n\t\t&:not(.checked):not(.indeterminate) .icon::part(icon) {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\t& .checkbox-input-element {\n\t\t\twidth: 22px;\n\t\t\theight: 22px;\n\t\t}\n\t}\n}\n\n@layer kol-component {\n\t.switch .input {\n\t\tposition: relative;\n\t}\n\n\t.switch input[type='checkbox'] {\n\t\tdisplay: inline-block;\n\t\theight: 1.7em;\n\t\tmin-width: 3.2em;\n\t\tposition: relative;\n\t\twidth: 3.2em;\n\t}\n\n\t.switch input[type='checkbox']::before {\n\t\tbackground-color: #000;\n\t\theight: 1.2em;\n\t\tleft: calc(0.25em - 2px);\n\t\ttop: calc(0.25em - 2px);\n\t\tposition: absolute;\n\t\ttransition: 0.5s;\n\t\twidth: 1.2em;\n\t}\n\n\t.switch input[type='checkbox']:checked::before {\n\t\ttransform: translateX(1.5em);\n\t}\n\n\t.switch input[type='checkbox']:indeterminate::before {\n\t\ttransform: translateX(0.75em);\n\t}\n\n\t.switch .icon {\n\t\tcursor: pointer;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\twidth: 1.2em;\n\t\theight: 1.2em;\n\t\tposition: absolute;\n\t\tz-index: 1;\n\t\ttop: 50%;\n\t\tleft: 4px;\n\t\ttransform: translate(0, -50%);\n\t\ttransition: 0.5s;\n\t\tcolor: #000;\n\t}\n\n\t.switch.checked .icon {\n\t\ttransform: translate(1.5em, -50%);\n\t}\n\n\t.switch.indeterminate .icon {\n\t\ttransform: translate(0.75em, -50%);\n\t}\n}\n\n",KolInputCheckbox$1=proxyCustomElement(class extends HTMLElement{async getValue(){var t;return null===(t=this.ref)||void 0===t?void 0:t.checked}render(){const{ariaDescribedBy:t}=getRenderStates(this.state),e=showExpertSlot(this.state._label);return h(Host,null,h("kol-input",{class:{checkbox:!0,[this.state._variant]:!0,"hide-label":!!this.state._hideLabel,checked:this.state._checked,indeterminate:this.state._indeterminate},"data-role":"button"===this.state._variant?"button":void 0,onKeyPress:"button"===this.state._variant?this.onChange:void 0,_accessKey:this.state._accessKey,_alert:this.state._alert,_disabled:this.state._disabled,_error:this.state._error,_hideError:this.state._hideError,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_id:this.state._id,_label:this.state._label,_required:this.state._required,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched},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("label",{slot:"input",class:"checkbox-container"},h("kol-icon",{class:"icon",_icons:this.state._indeterminate?this.state._icons.indeterminate:this.state._checked?this.state._icons.checked:this.state._icons.unchecked,_label:""}),h("input",Object.assign({class:"checkbox-input-element"+("button"===this.state._variant?" visually-hidden":""),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,checked:this.state._checked,disabled:this.state._disabled,id:this.state._id,indeterminate:this.state._indeterminate,name:this.state._name,required:this.state._required,tabIndex:this.state._tabIndex,type:"checkbox"},this.controller.onFacade,{onChange:this.onChange,onClick:void 0})))))}constructor(){super(),this.__registerHost(),this.__attachShadow(),this.catchRef=t=>{this.ref=t,propagateFocus(this.host,t)},this.onChange=t=>{var e;this._checked=!this._checked,this._indeterminate=!1;const n=this._checked?this.state._value:null;stopPropagation(t),tryToDispatchKoliBriEvent("change",this.host,n),this.controller.setFormAssociatedValue(n),"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e.onChange)&&this.state._on.onChange(t,n)},this._accessKey=void 0,this._alert=!0,this._checked=!1,this._hideError=!1,this._disabled=!1,this._error=void 0,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._indeterminate=void 0,this._label=void 0,this._name=void 0,this._on=void 0,this._required=!1,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=!0,this._variant="default",this.state={_checked:!1,_hideError:!1,_icons:{checked:"codicon codicon-check",indeterminate:"codicon codicon-remove",unchecked:"codicon codicon-add"},_id:`id-${nonce()}`,_indeterminate:!1,_label:"",_value:!0,_variant:"default"},this.controller=new InputCheckboxController(this,"input-checkbox",this.host)}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAlert(t){this.controller.validateAlert(t)}validateChecked(t){this.controller.validateChecked(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateError(t){this.controller.validateError(t)}validateHideError(t){this.controller.validateHideError(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateIndeterminate(t){this.controller.validateIndeterminate(t)}validateLabel(t){this.controller.validateLabel(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validateRequired(t){this.controller.validateRequired(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)}validateVariant(t){this.controller.validateVariant(t)}componentWillLoad(){this._alert=!0===this._alert,this._touched=!0===this._touched,this.controller.componentWillLoad()}get host(){return this}static get watchers(){return{_accessKey:["validateAccessKey"],_alert:["validateAlert"],_checked:["validateChecked"],_disabled:["validateDisabled"],_error:["validateError"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_indeterminate:["validateIndeterminate"],_label:["validateLabel"],_name:["validateName"],_on:["validateOn"],_required:["validateRequired"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"],_variant:["validateVariant"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-input-checkbox",{_accessKey:[1,"_access-key"],_alert:[1540],_checked:[1540],_hideError:[1540,"_hide-error"],_disabled:[4],_error:[1],_hideLabel:[4,"_hide-label"],_hint:[1],_icons:[1],_id:[1],_indeterminate:[1540],_label:[1],_name:[1],_on:[16],_required:[4],_syncValueBySelector:[1,"_sync-value-by-selector"],_tabIndex:[2,"_tab-index"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_value:[8],_variant:[1],state:[32],getValue:[64]},void 0,{_accessKey:["validateAccessKey"],_alert:["validateAlert"],_checked:["validateChecked"],_disabled:["validateDisabled"],_error:["validateError"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_indeterminate:["validateIndeterminate"],_label:["validateLabel"],_name:["validateName"],_on:["validateOn"],_required:["validateRequired"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"],_variant:["validateVariant"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-input-checkbox","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-input-checkbox":customElements.get(t)||customElements.define(t,KolInputCheckbox$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 KolInputCheckbox=KolInputCheckbox$1,defineCustomElement=defineCustomElement$1;export{KolInputCheckbox,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host,Fragment}from"@stencil/core/internal/client";import{f as watchBoolean,w as watchValidator,i as isString,t as setState,r as propagateFocus,n as nonce,s as showExpertSlot}from"./prop.validators.js";import{s as stopPropagation,t as tryToDispatchKoliBriEvent}from"./events.js";import{g as getRenderStates}from"./controller.js";import{I as InputCheckboxRadioController}from"./controller2.js";import{I as InternalUnderlinedAccessKey,d as defineCustomElement$3}from"./component2.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 validateChecked=(t,e)=>{watchBoolean(t,"_checked",e)},validateIndeterminate=(t,e)=>{watchBoolean(t,"_indeterminate",e)},inputCheckboxVariantOptions=["button","default","switch"];class InputCheckboxController extends InputCheckboxRadioController{constructor(t,e,n){super(t,e,n),this.setFormAssociatedCheckboxValue=t=>{this.component._checked?this.setFormAssociatedValue(t):this.setFormAssociatedValue(null)},this.component=t}validateChecked(t){validateChecked(this.component,t),this.setFormAssociatedCheckboxValue(this.component.state._value)}validateIcons(t){watchValidator(this.component,"_icons",(t=>"object"==typeof t&&null!==t&&(isString(t.checked,1)||isString(t.indeterminate,1)||isString(t.unchecked,1))),new Set(["InputCheckboxIcons"]),t,{hooks:{beforePatch:(t,e,n)=>{e.set("_icons",Object.assign(Object.assign({},n.state._icons),t))}}})}validateIndeterminate(t){validateIndeterminate(this.component,t)}validateValue(t){setState(this.component,"_value",t),this.setFormAssociatedCheckboxValue(this.component.state._value)}validateVariant(t){watchValidator(this.component,"_variant",(t=>"string"==typeof t&&inputCheckboxVariantOptions.includes(t)),new Set([`String {${inputCheckboxVariantOptions.join(", ")}`]),t)}componentWillLoad(){super.componentWillLoad(),this.validateChecked(this.component._checked),this.validateIcons(this.component._icons),this.validateIndeterminate(this.component._indeterminate),this.validateValue(this.component._value),this.validateVariant(this.component._variant)}}const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\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\t/*\n\t\t * No element should be used without a background and font color whose contrast ratio has\n\t\t * not been checked. By initially setting the background color to white and the font color\n\t\t * to black, the contrast ratio is ensured and explicit adjustment is forced.\n\t\t */\n\t\tbackground-color: white;\n\t\tcolor: black;\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}\n\n\t* {\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/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n\tclip: rect(0 0 0 0);\n\tclip-path: inset(50%);\n\theight: 1px;\n\toverflow: hidden;\n\tposition: absolute;\n\twhite-space: nowrap;\n\twidth: 1px;\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\t/*\n\t * Ensure elements with hidden attribute to be actually not visible\n\t * @see https://meowni.ca/hidden.is.a.lie.html\n\t */\n\t[hidden] {\n\t\tdisplay: none !important;\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/* 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, option, select, textarea, .input-label) {\n\t\tcursor: not-allowed;\n\t\topacity: 0.5;\n\t}\n}\n\n@layer kol-component {\n\tlabel {\n\t\tcursor: pointer;\n\t}\n\n\tkol-input {\n\t\talign-items: center;\n\t\tdisplay: grid;\n\t\tjustify-items: left;\n\t}\n\n\tkol-input.default,\n\tkol-input.switch {\n\t\tgrid-template-columns: auto 1fr;\n\t}\n\n\tkol-input .input {\n\t\talign-items: center;\n\t\tdisplay: grid;\n\t\torder: 1;\n\t}\n\n\tkol-input .input div {\n\t\tdisplay: inline-flex;\n\t}\n\n\tkol-input .input input {\n\t\tmargin: 0;\n\t}\n\n\tkol-input label {\n\t\torder: 2;\n\t}\n\n\tkol-input .hint,\n\tkol-input.error > kol-alert {\n\t\tgrid-column: span 2;\n\t}\n\n\tkol-input kol-alert.error {\n\t\torder: 3;\n\t}\n\n\tkol-input .hint {\n\t\torder: 4;\n\t}\n\n\t.error.hidden {\n\t\tdisplay: none;\n\t}\n\n\tinput {\n\t\tborder-style: solid;\n\t\tborder-width: 2px;\n\t\tline-height: 24px;\n\t}\n\n\tinput[type='checkbox'] {\n\t\tappearance: none;\n\t\tbackground-color: #fff;\n\t\tcursor: pointer;\n\t\ttransition: 0.5s;\n\t}\n\n\tinput[type='checkbox']:before {\n\t\tcontent: '';\n\t\tcursor: pointer;\n\t}\n\n\tinput[type='checkbox']:disabled:before {\n\t\tcursor: not-allowed;\n\t}\n\n\tkol-input.required .tooltip-content .span-label::after {\n\t\tcontent: '*';\n\t}\n}\n\n@layer kol-component {\n\t.button {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: var(--a11y-min-size) auto;\n\t\tgrid-template-areas: 'error error' 'input label' 'hint hint';\n\t}\n\t.button:focus-within {\n\t\t/* override global `[tabindex]:focus` style */\n\t\tcursor: inherit;\n\t\toutline-color: black;\n\t\toutline-style: solid;\n\t}\n\n\t.button > .error {\n\t\tgrid-area: error;\n\t}\n\n\t.button > label {\n\t\tgrid-area: label;\n\t}\n\n\t.button > .input {\n\t\tgrid-area: input;\n\t}\n\n\t.button > .hint {\n\t\tgrid-area: hint;\n\t}\n\n\t.button .icon {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\twidth: var(--a11y-min-size);\n\t\theight: var(--a11y-min-size);\n\t}\n}\n\n@layer kol-component {\n\t.default {\n\t\t& .checkbox-container {\n\t\t\talign-items: center;\n\t\t\tdisplay: flex;\n\t\t\theight: var(--a11y-min-size);\n\t\t\tjustify-content: center;\n\t\t\tposition: relative;\n\t\t\twidth: var(--a11y-min-size);\n\t\t}\n\n\t\t& .icon {\n\t\t\tdisplay: block;\n\t\t\tinset: auto;\n\t\t\tposition: absolute;\n\t\t\tz-index: 1;\n\t\t}\n\t\t&:not(.checked):not(.indeterminate) .icon::part(icon) {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\t& .checkbox-input-element {\n\t\t\twidth: 22px;\n\t\t\theight: 22px;\n\t\t}\n\t}\n}\n\n@layer kol-component {\n\t.switch .input {\n\t\tposition: relative;\n\t}\n\n\t.switch input[type='checkbox'] {\n\t\tdisplay: inline-block;\n\t\theight: 1.7em;\n\t\tmin-width: 3.2em;\n\t\tposition: relative;\n\t\twidth: 3.2em;\n\t}\n\n\t.switch input[type='checkbox']::before {\n\t\tbackground-color: #000;\n\t\theight: 1.2em;\n\t\tleft: calc(0.25em - 2px);\n\t\ttop: calc(0.25em - 2px);\n\t\tposition: absolute;\n\t\ttransition: 0.5s;\n\t\twidth: 1.2em;\n\t}\n\n\t.switch input[type='checkbox']:checked::before {\n\t\ttransform: translateX(1.5em);\n\t}\n\n\t.switch input[type='checkbox']:indeterminate::before {\n\t\ttransform: translateX(0.75em);\n\t}\n\n\t.switch .icon {\n\t\tcursor: pointer;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\twidth: 1.2em;\n\t\theight: 1.2em;\n\t\tposition: absolute;\n\t\tz-index: 1;\n\t\ttop: 50%;\n\t\tleft: 4px;\n\t\ttransform: translate(0, -50%);\n\t\ttransition: 0.5s;\n\t\tcolor: #000;\n\t}\n\n\t.switch.checked .icon {\n\t\ttransform: translate(1.5em, -50%);\n\t}\n\n\t.switch.indeterminate .icon {\n\t\ttransform: translate(0.75em, -50%);\n\t}\n}\n\n",KolInputCheckbox$1=proxyCustomElement(class extends HTMLElement{async getValue(){var t;return null===(t=this.ref)||void 0===t?void 0:t.checked}render(){const{ariaDescribedBy:t}=getRenderStates(this.state),e=showExpertSlot(this.state._label);return h(Host,null,h("kol-input",{class:{checkbox:!0,[this.state._variant]:!0,"hide-label":!!this.state._hideLabel,checked:this.state._checked,indeterminate:this.state._indeterminate},"data-role":"button"===this.state._variant?"button":void 0,onKeyPress:"button"===this.state._variant?this.onChange:void 0,_accessKey:this.state._accessKey,_alert:this.state._alert,_disabled:this.state._disabled,_error:this.state._error,_hideError:this.state._hideError,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_id:this.state._id,_label:this.state._label,_required:this.state._required,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched},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("label",{slot:"input",class:"checkbox-container"},h("kol-icon",{class:"icon",_icons:this.state._indeterminate?this.state._icons.indeterminate:this.state._checked?this.state._icons.checked:this.state._icons.unchecked,_label:""}),h("input",Object.assign({class:"checkbox-input-element"+("button"===this.state._variant?" visually-hidden":""),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,checked:this.state._checked,disabled:this.state._disabled,id:this.state._id,indeterminate:this.state._indeterminate,name:this.state._name,required:this.state._required,tabIndex:this.state._tabIndex,type:"checkbox"},this.controller.onFacade,{onChange:this.onChange,onClick:void 0})))))}constructor(){super(),this.__registerHost(),this.__attachShadow(),this.catchRef=t=>{this.ref=t,propagateFocus(this.host,t)},this.onChange=t=>{var e;this._checked=!this._checked,this._indeterminate=!1;const n=this._checked?this.state._value:null;stopPropagation(t),tryToDispatchKoliBriEvent("change",this.host,n),this.controller.setFormAssociatedValue(n),"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e.onChange)&&this.state._on.onChange(t,n)},this._accessKey=void 0,this._alert=!0,this._checked=!1,this._hideError=!1,this._disabled=!1,this._error=void 0,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._indeterminate=void 0,this._label=void 0,this._name=void 0,this._on=void 0,this._required=!1,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=!0,this._variant="default",this.state={_checked:!1,_hideError:!1,_icons:{checked:"codicon codicon-check",indeterminate:"codicon codicon-remove",unchecked:"codicon codicon-add"},_id:`id-${nonce()}`,_indeterminate:!1,_label:"",_value:!0,_variant:"default"},this.controller=new InputCheckboxController(this,"input-checkbox",this.host)}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAlert(t){this.controller.validateAlert(t)}validateChecked(t){this.controller.validateChecked(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateError(t){this.controller.validateError(t)}validateHideError(t){this.controller.validateHideError(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateIndeterminate(t){this.controller.validateIndeterminate(t)}validateLabel(t){this.controller.validateLabel(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validateRequired(t){this.controller.validateRequired(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)}validateVariant(t){this.controller.validateVariant(t)}componentWillLoad(){this._alert=!0===this._alert,this._touched=!0===this._touched,this.controller.componentWillLoad()}get host(){return this}static get watchers(){return{_accessKey:["validateAccessKey"],_alert:["validateAlert"],_checked:["validateChecked"],_disabled:["validateDisabled"],_error:["validateError"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_indeterminate:["validateIndeterminate"],_label:["validateLabel"],_name:["validateName"],_on:["validateOn"],_required:["validateRequired"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"],_variant:["validateVariant"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-input-checkbox",{_accessKey:[1,"_access-key"],_alert:[1540],_checked:[1540],_hideError:[1540,"_hide-error"],_disabled:[4],_error:[1],_hideLabel:[4,"_hide-label"],_hint:[1],_icons:[1],_id:[1],_indeterminate:[1540],_label:[1],_name:[1],_on:[16],_required:[4],_syncValueBySelector:[1,"_sync-value-by-selector"],_tabIndex:[2,"_tab-index"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_value:[8],_variant:[1],state:[32],getValue:[64]},void 0,{_accessKey:["validateAccessKey"],_alert:["validateAlert"],_checked:["validateChecked"],_disabled:["validateDisabled"],_error:["validateError"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_indeterminate:["validateIndeterminate"],_label:["validateLabel"],_name:["validateName"],_on:["validateOn"],_required:["validateRequired"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"],_variant:["validateVariant"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-input-checkbox","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-input-checkbox":customElements.get(t)||customElements.define(t,KolInputCheckbox$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 KolInputCheckbox=KolInputCheckbox$1,defineCustomElement=defineCustomElement$1;export{KolInputCheckbox,defineCustomElement};
@@ -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{w as watchValidator,f as watchString,r as propagateFocus,n as nonce,s as showExpertSlot}from"./prop.validators.js";import{g as getRenderStates}from"./controller.js";import{v as validateSuggestions}from"./suggestions.js";import{I as InputIconController}from"./controller-icon.js";import{I as InternalUnderlinedAccessKey,d as defineCustomElement$3}from"./component2.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 inputTypeOnOffOptions=["on","off"];class InputColorController extends InputIconController{constructor(t,e,n){super(t,e,n),this.component=t}validateAutoComplete(t){watchValidator(this.component,"_autoComplete",(t=>"string"==typeof t&&inputTypeOnOffOptions.includes(t)),new Set(inputTypeOnOffOptions),t)}validateSuggestions(t){validateSuggestions(this.component,t)}validateValue(t){watchString(this.component,"_value",t),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateSuggestions(this.component._suggestions),this.validateValue(this.component._value)}}const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\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\t/*\n\t\t * No element should be used without a background and font color whose contrast ratio has\n\t\t * not been checked. By initially setting the background color to white and the font color\n\t\t * to black, the contrast ratio is ensured and explicit adjustment is forced.\n\t\t */\n\t\tbackground-color: white;\n\t\tcolor: black;\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}\n\n\t* {\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/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n\tclip: rect(0 0 0 0);\n\tclip-path: inset(50%);\n\theight: 1px;\n\toverflow: hidden;\n\tposition: absolute;\n\twhite-space: nowrap;\n\twidth: 1px;\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\t/*\n\t * Ensure elements with hidden attribute to be actually not visible\n\t * @see https://meowni.ca/hidden.is.a.lie.html\n\t */\n\t[hidden] {\n\t\tdisplay: none !important;\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/* 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, option, select, textarea, .input-label) {\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\tdiv.input {\n\t\tcursor: pointer;\n\t}\n\n\t.error.hidden {\n\t\tdisplay: none;\n\t}\n}\n",KolInputColor$1=proxyCustomElement(class extends HTMLElement{async getValue(){var t;return null===(t=this.ref)||void 0===t?void 0:t.value}render(){const{ariaDescribedBy:t}=getRenderStates(this.state),e=Array.isArray(this.state._suggestions)&&this.state._suggestions.length>0,n=showExpertSlot(this.state._label);return h(Host,null,h("kol-input",{class:{color:!0,"hide-label":!!this.state._hideLabel},_accessKey:this.state._accessKey,_disabled:this.state._disabled,_error:this.state._error,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_icons:this.state._icons,_hideError:this.state._hideError,_id:this.state._id,_label:this.state._label,_suggestions:this.state._suggestions,_smartButton:this.state._smartButton,_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"},n?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("input",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",autoComplete:this.state._autoComplete,autoCorrect:"off",disabled:this.state._disabled,id:this.state._id,list:e?`${this.state._id}-list`:void 0,name:this.state._name,slot:"input",spellcheck:"false",type:"color",value:this.state._value},this.controller.onFacade)))))}constructor(){super(),this.__registerHost(),this.__attachShadow(),this.catchRef=t=>{this.ref=t,propagateFocus(this.host,this.ref)},this._accessKey=void 0,this._alert=!0,this._autoComplete=void 0,this._disabled=!1,this._error=void 0,this._hideError=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._name=void 0,this._on=void 0,this._smartButton=void 0,this._suggestions=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_autoComplete:"off",_hideError:!1,_id:`id-${nonce()}`,_label:"",_suggestions:[]},this.controller=new InputColorController(this,"input-color",this.host)}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAlert(t){this.controller.validateAlert(t)}validateAutoComplete(t){this.controller.validateAutoComplete(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateError(t){this.controller.validateError(t)}validateHideError(t){this.controller.validateHideError(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validateSmartButton(t){this.controller.validateSmartButton(t)}validateSuggestions(t){this.controller.validateSuggestions(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()}get host(){return this}static get watchers(){return{_accessKey:["validateAccessKey"],_alert:["validateAlert"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_error:["validateError"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_name:["validateName"],_on:["validateOn"],_smartButton:["validateSmartButton"],_suggestions:["validateSuggestions"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-input-color",{_accessKey:[1,"_access-key"],_alert:[1540],_autoComplete:[1,"_auto-complete"],_disabled:[4],_error:[1],_hideError:[1540,"_hide-error"],_hideLabel:[4,"_hide-label"],_hint:[1],_icons:[1],_id:[1],_label:[1],_name:[1],_on:[16],_smartButton:[1,"_smart-button"],_suggestions:[1],_syncValueBySelector:[1,"_sync-value-by-selector"],_tabIndex:[2,"_tab-index"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_value:[1],state:[32],getValue:[64]},void 0,{_accessKey:["validateAccessKey"],_alert:["validateAlert"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_error:["validateError"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_name:["validateName"],_on:["validateOn"],_smartButton:["validateSmartButton"],_suggestions:["validateSuggestions"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-input-color","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-input-color":customElements.get(t)||customElements.define(t,KolInputColor$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 KolInputColor=KolInputColor$1,defineCustomElement=defineCustomElement$1;export{KolInputColor,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host,Fragment}from"@stencil/core/internal/client";import{w as watchValidator,b as watchString,r as propagateFocus,n as nonce,s as showExpertSlot}from"./prop.validators.js";import{g as getRenderStates}from"./controller.js";import{v as validateSuggestions}from"./suggestions.js";import{I as InputIconController}from"./controller-icon.js";import{I as InternalUnderlinedAccessKey,d as defineCustomElement$3}from"./component2.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 inputTypeOnOffOptions=["on","off"];class InputColorController extends InputIconController{constructor(t,e,n){super(t,e,n),this.component=t}validateAutoComplete(t){watchValidator(this.component,"_autoComplete",(t=>"string"==typeof t&&inputTypeOnOffOptions.includes(t)),new Set(inputTypeOnOffOptions),t)}validateSuggestions(t){validateSuggestions(this.component,t)}validateValue(t){watchString(this.component,"_value",t),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateSuggestions(this.component._suggestions),this.validateValue(this.component._value)}}const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\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\t/*\n\t\t * No element should be used without a background and font color whose contrast ratio has\n\t\t * not been checked. By initially setting the background color to white and the font color\n\t\t * to black, the contrast ratio is ensured and explicit adjustment is forced.\n\t\t */\n\t\tbackground-color: white;\n\t\tcolor: black;\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}\n\n\t* {\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/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n\tclip: rect(0 0 0 0);\n\tclip-path: inset(50%);\n\theight: 1px;\n\toverflow: hidden;\n\tposition: absolute;\n\twhite-space: nowrap;\n\twidth: 1px;\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\t/*\n\t * Ensure elements with hidden attribute to be actually not visible\n\t * @see https://meowni.ca/hidden.is.a.lie.html\n\t */\n\t[hidden] {\n\t\tdisplay: none !important;\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/* 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, option, select, textarea, .input-label) {\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\tdiv.input {\n\t\tcursor: pointer;\n\t}\n\n\t.error.hidden {\n\t\tdisplay: none;\n\t}\n}\n",KolInputColor$1=proxyCustomElement(class extends HTMLElement{async getValue(){var t;return null===(t=this.ref)||void 0===t?void 0:t.value}render(){const{ariaDescribedBy:t}=getRenderStates(this.state),e=Array.isArray(this.state._suggestions)&&this.state._suggestions.length>0,n=showExpertSlot(this.state._label);return h(Host,null,h("kol-input",{class:{color:!0,"hide-label":!!this.state._hideLabel},_accessKey:this.state._accessKey,_disabled:this.state._disabled,_error:this.state._error,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_icons:this.state._icons,_hideError:this.state._hideError,_id:this.state._id,_label:this.state._label,_suggestions:this.state._suggestions,_smartButton:this.state._smartButton,_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"},n?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("input",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",autoComplete:this.state._autoComplete,autoCorrect:"off",disabled:this.state._disabled,id:this.state._id,list:e?`${this.state._id}-list`:void 0,name:this.state._name,slot:"input",spellcheck:"false",type:"color",value:this.state._value},this.controller.onFacade)))))}constructor(){super(),this.__registerHost(),this.__attachShadow(),this.catchRef=t=>{this.ref=t,propagateFocus(this.host,this.ref)},this._accessKey=void 0,this._alert=!0,this._autoComplete=void 0,this._disabled=!1,this._error=void 0,this._hideError=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._name=void 0,this._on=void 0,this._smartButton=void 0,this._suggestions=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_autoComplete:"off",_hideError:!1,_id:`id-${nonce()}`,_label:"",_suggestions:[]},this.controller=new InputColorController(this,"input-color",this.host)}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAlert(t){this.controller.validateAlert(t)}validateAutoComplete(t){this.controller.validateAutoComplete(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateError(t){this.controller.validateError(t)}validateHideError(t){this.controller.validateHideError(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validateSmartButton(t){this.controller.validateSmartButton(t)}validateSuggestions(t){this.controller.validateSuggestions(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()}get host(){return this}static get watchers(){return{_accessKey:["validateAccessKey"],_alert:["validateAlert"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_error:["validateError"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_name:["validateName"],_on:["validateOn"],_smartButton:["validateSmartButton"],_suggestions:["validateSuggestions"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-input-color",{_accessKey:[1,"_access-key"],_alert:[1540],_autoComplete:[1,"_auto-complete"],_disabled:[4],_error:[1],_hideError:[1540,"_hide-error"],_hideLabel:[4,"_hide-label"],_hint:[1],_icons:[1],_id:[1],_label:[1],_name:[1],_on:[16],_smartButton:[1,"_smart-button"],_suggestions:[1],_syncValueBySelector:[1,"_sync-value-by-selector"],_tabIndex:[2,"_tab-index"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_value:[1],state:[32],getValue:[64]},void 0,{_accessKey:["validateAccessKey"],_alert:["validateAlert"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_error:["validateError"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_name:["validateName"],_on:["validateOn"],_smartButton:["validateSmartButton"],_suggestions:["validateSuggestions"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-input-color","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-input-color":customElements.get(t)||customElements.define(t,KolInputColor$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 KolInputColor=KolInputColor$1,defineCustomElement=defineCustomElement$1;export{KolInputColor,defineCustomElement};
@@ -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{g as watchBoolean,w as watchValidator,t as setState,C as watchNumber,r as propagateFocus,n as nonce,s as showExpertSlot}from"./prop.validators.js";import{p as propagateSubmitEventToForm,d as defineCustomElement$7}from"./component5.js";import{g as getRenderStates}from"./controller.js";import{v as validateSuggestions}from"./suggestions.js";import{I as InputIconController}from"./controller-icon.js";import{I as InternalUnderlinedAccessKey,d as defineCustomElement$3}from"./component2.js";import{d as defineCustomElement$9}from"./shadow.js";import{d as defineCustomElement$8}from"./component6.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 inputDateTypeOptions=["date","datetime-local","month","time","week"],validateReadOnly=(t,e)=>{watchBoolean(t,"_readOnly",e)};class InputDateController extends InputIconController{constructor(t,e,n){super(t,e,n),this.validateIso8601=(t,e,n)=>watchValidator(this.component,t,(t=>void 0===t||null==t||""===t||this.validateDateString(t)),new Set(["Date","string{ISO-8601}"]),this.tryParseToString(e),{hooks:{afterPatch:t=>{"string"==typeof t&&n&&n(t)}}}),this.component=t}validateAutoComplete(t){watchValidator(this.component,"_autoComplete",(t=>"string"==typeof t&&("on"===t||"off"===t)),new Set(["on | off"]),t)}validateSuggestions(t){validateSuggestions(this.component,t)}tryParseToString(t,e){const n=null!=t?t:e;if("string"==typeof n)return n;if("object"==typeof n&&n instanceof Date)switch(this.component._type){case"date":return`${n.getFullYear()}-${n.getMonth()+1}-${n.getDate()}`;case"datetime-local":return`${n.getFullYear()}-${n.getMonth()+1}-${n.getDate()}T${n.getHours()}:${n.getMinutes()}:${n.getSeconds()}`;case"month":return`${n.getFullYear()}-${n.getMonth()+1}`;case"time":return void 0===this.component._step||"string"==typeof this.component._step&&"60"===this.component._step||"number"==typeof this.component._step&&60===this.component._step?`${n.getHours()}:${n.getMinutes()}`:`${n.getHours()}:${n.getMinutes()}:${n.getSeconds()}`;case"week":throw new Error("Auto convert to week is not supported!")}return null===t?null:void 0}validateDateString(t){switch(this.component._type){case"date":return InputDateController.isoDateRegex.test(t);case"datetime-local":return InputDateController.isoLocalDateTimeRegex.test(t);case"month":return InputDateController.isoMonthRegex.test(t);case"time":return InputDateController.isoTimeRegex.test(t);case"week":return InputDateController.isoWeekRegex.test(t);default:return!1}}onChange(t){super.onChange(t),!!t.target.value!=!!this.component._value&&(this.component._value=t.target.value)}validateMax(t){watchValidator(this.component,"_max",(t=>void 0===t||null!==t&&this.validateDateString(t)),new Set(["Iso8601","Date"]),this.tryParseToString(t,"date"===this.component._type||"month"===this.component._type||"datetime-local"===this.component._type?InputDateController.DEFAULT_MAX_DATE:void 0))}validateMin(t){watchValidator(this.component,"_min",(t=>void 0===t||null!==t&&this.validateDateString(t)),new Set(["Iso8601","Date"]),this.tryParseToString(t))}validateOn(t){setState(this.component,"_on",Object.assign(Object.assign({},t),{onChange:(e,n)=>{!!n!=!!this.component._value&&(this.component._value=n),(null==t?void 0:t.onChange)&&t.onChange(e,n)}}))}validateReadOnly(t){validateReadOnly(this.component,t)}validateRequired(t){watchBoolean(this.component,"_required",t)}validateStep(t){watchNumber(this.component,"_step",t)}validateType(t){watchValidator(this.component,"_type",(t=>"string"==typeof t&&inputDateTypeOptions.includes(t)),new Set([`String {${inputDateTypeOptions.join(", ")}`]),t)}validateValue(t){this.validateValueEx(t)}validateValueEx(t,e){this.validateIso8601("_value",t,e),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateMax(this.component._max),this.validateMin(this.component._min),this.validateLabel(this.component._label),this.validateSuggestions(this.component._suggestions),this.validateOn(this.component._on),this.validateReadOnly(this.component._readOnly),this.validateRequired(this.component._required),this.validateStep(this.component._step),this.validateType(this.component._type),this.validateValue(this.component._value)}}InputDateController.isoDateRegex=/^\d{4}-([0]\d|1[0-2])-([0-2]\d|3[01])/,InputDateController.isoLocalDateTimeRegex=/^\d{4}-([0]\d|1[0-2])-([0-2]\d|3[01])[T ][0-2]\d:[0-5]\d(:[0-5]\d(?:\.\d+)?)?/,InputDateController.isoMonthRegex=/^\d{4}-([0]\d|1[0-2])/,InputDateController.isoTimeRegex=/^[0-2]\d:[0-5]\d(:[0-5]\d(?:\.\d+)?)?/,InputDateController.isoWeekRegex=/^\d{4}-W(?:[0-4]\d|5[0-3])$/,InputDateController.DEFAULT_MAX_DATE=new Date(9999,11,31,23,59,59);const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\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\t/*\n\t\t * No element should be used without a background and font color whose contrast ratio has\n\t\t * not been checked. By initially setting the background color to white and the font color\n\t\t * to black, the contrast ratio is ensured and explicit adjustment is forced.\n\t\t */\n\t\tbackground-color: white;\n\t\tcolor: black;\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}\n\n\t* {\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/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n\tclip: rect(0 0 0 0);\n\tclip-path: inset(50%);\n\theight: 1px;\n\toverflow: hidden;\n\tposition: absolute;\n\twhite-space: nowrap;\n\twidth: 1px;\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\t/*\n\t * Ensure elements with hidden attribute to be actually not visible\n\t * @see https://meowni.ca/hidden.is.a.lie.html\n\t */\n\t[hidden] {\n\t\tdisplay: none !important;\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/* 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, option, select, textarea, .input-label) {\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\tkol-input-number {\n\t\tdisplay: block;\n\t}\n\n\t.error.hidden {\n\t\tdisplay: none;\n\t}\n}\n",KolInputDate$1=proxyCustomElement(class extends HTMLElement{async getValue(){var t;return null===(t=this.ref)||void 0===t?void 0:t.value}render(){const{ariaDescribedBy:t}=getRenderStates(this.state),e=Array.isArray(this.state._suggestions)&&this.state._suggestions.length>0,n=showExpertSlot(this.state._label);return h(Host,{class:{"has-value":this.state._hasValue}},h("kol-input",{class:{[this.state._type]:!0,"hide-label":!!this.state._hideLabel},_accessKey:this.state._accessKey,_disabled:this.state._disabled,_error:this.state._error,_hideError:this.state._hideError,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_icons:this.state._icons,_id:this.state._id,_label:this.state._label,_suggestions:this.state._suggestions,_readOnly:this.state._readOnly,_required:this.state._required,_smartButton:this.state._smartButton,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched},h("span",{slot:"label"},n?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("input",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",autoComplete:this.state._autoComplete,autoCorrect:"off",disabled:this.state._disabled,id:this.state._id,list:e?`${this.state._id}-list`:void 0,max:this.state._max,min:this.state._min,name:this.state._name,readOnly:this.state._readOnly,required:this.state._required,step:this.state._step,spellcheck:"false",type:this.state._type,value:this.state._value},this.controller.onFacade,{onKeyUp:this.onKeyUp})))))}constructor(){super(),this.__registerHost(),this.__attachShadow(),this.catchRef=t=>{this.ref=t,propagateFocus(this.host,this.ref)},this.onKeyUp=t=>{"Enter"===t.code?propagateSubmitEventToForm({form:this.host,ref:this.ref}):this.controller.onFacade.onChange(t)},this._accessKey=void 0,this._alert=!0,this._autoComplete=void 0,this._disabled=!1,this._error=void 0,this._hideError=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._max=void 0,this._min=void 0,this._name=void 0,this._on=void 0,this._readOnly=!1,this._required=!1,this._smartButton=void 0,this._suggestions=void 0,this._syncValueBySelector=void 0,this._step=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._type="date",this._value=void 0,this.state={_autoComplete:"off",_hasValue:!1,_hideError:!1,_id:`id-${nonce()}`,_label:"",_suggestions:[],_type:"datetime-local"},this.controller=new InputDateController(this,"input-date",this.host)}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAlert(t){this.controller.validateAlert(t)}validateAutoComplete(t){this.controller.validateAutoComplete(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateError(t){this.controller.validateError(t)}validateHideError(t){this.controller.validateHideError(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateMax(t){this.controller.validateMax(t)}validateMin(t){this.controller.validateMin(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validateReadOnly(t){this.controller.validateReadOnly(t)}validateRequired(t){this.controller.validateRequired(t)}validateSmartButton(t){this.controller.validateSmartButton(t)}validateSuggestions(t){this.controller.validateSuggestions(t)}validateStep(t){this.controller.validateStep(t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTabIndex(t){this.controller.validateTabIndex(t)}validateTouched(t){this.controller.validateTouched(t)}validateType(t){this.controller.validateType(t)}validateValue(t){this.controller.validateValueEx(t,(t=>{""===t&&this.ref&&(this.ref.value="")}))}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"],_alert:["validateAlert"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_error:["validateError"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_max:["validateMax"],_min:["validateMin"],_name:["validateName"],_on:["validateOn"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_smartButton:["validateSmartButton"],_suggestions:["validateSuggestions"],_step:["validateStep"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_type:["validateType"],_value:["validateValue"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-input-date",{_accessKey:[1,"_access-key"],_alert:[1540],_autoComplete:[1,"_auto-complete"],_disabled:[4],_error:[1],_hideError:[1540,"_hide-error"],_hideLabel:[4,"_hide-label"],_hint:[1],_icons:[1],_id:[1],_label:[1],_max:[1],_min:[1],_name:[1],_on:[16],_readOnly:[4,"_read-only"],_required:[4],_smartButton:[1,"_smart-button"],_suggestions:[1],_syncValueBySelector:[1,"_sync-value-by-selector"],_step:[2],_tabIndex:[2,"_tab-index"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_type:[1],_value:[1025],state:[32],getValue:[64]},void 0,{_accessKey:["validateAccessKey"],_alert:["validateAlert"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_error:["validateError"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_max:["validateMax"],_min:["validateMin"],_name:["validateName"],_on:["validateOn"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_smartButton:["validateSmartButton"],_suggestions:["validateSuggestions"],_step:["validateStep"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_type:["validateType"],_value:["validateValue"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-input-date","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-input-date":customElements.get(t)||customElements.define(t,KolInputDate$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 KolInputDate=KolInputDate$1,defineCustomElement=defineCustomElement$1;export{KolInputDate,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host,Fragment}from"@stencil/core/internal/client";import{f as watchBoolean,w as watchValidator,t as setState,C as watchNumber,r as propagateFocus,n as nonce,s as showExpertSlot}from"./prop.validators.js";import{p as propagateSubmitEventToForm,d as defineCustomElement$7}from"./component5.js";import{g as getRenderStates}from"./controller.js";import{v as validateSuggestions}from"./suggestions.js";import{I as InputIconController}from"./controller-icon.js";import{I as InternalUnderlinedAccessKey,d as defineCustomElement$3}from"./component2.js";import{d as defineCustomElement$9}from"./shadow.js";import{d as defineCustomElement$8}from"./component6.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 inputDateTypeOptions=["date","datetime-local","month","time","week"],validateReadOnly=(t,e)=>{watchBoolean(t,"_readOnly",e)};class InputDateController extends InputIconController{constructor(t,e,n){super(t,e,n),this.validateIso8601=(t,e,n)=>watchValidator(this.component,t,(t=>void 0===t||null==t||""===t||this.validateDateString(t)),new Set(["Date","string{ISO-8601}"]),this.tryParseToString(e),{hooks:{afterPatch:t=>{"string"==typeof t&&n&&n(t)}}}),this.component=t}validateAutoComplete(t){watchValidator(this.component,"_autoComplete",(t=>"string"==typeof t&&("on"===t||"off"===t)),new Set(["on | off"]),t)}validateSuggestions(t){validateSuggestions(this.component,t)}tryParseToString(t,e){const n=null!=t?t:e;if("string"==typeof n)return n;if("object"==typeof n&&n instanceof Date)switch(this.component._type){case"date":return`${n.getFullYear()}-${n.getMonth()+1}-${n.getDate()}`;case"datetime-local":return`${n.getFullYear()}-${n.getMonth()+1}-${n.getDate()}T${n.getHours()}:${n.getMinutes()}:${n.getSeconds()}`;case"month":return`${n.getFullYear()}-${n.getMonth()+1}`;case"time":return void 0===this.component._step||"string"==typeof this.component._step&&"60"===this.component._step||"number"==typeof this.component._step&&60===this.component._step?`${n.getHours()}:${n.getMinutes()}`:`${n.getHours()}:${n.getMinutes()}:${n.getSeconds()}`;case"week":throw new Error("Auto convert to week is not supported!")}return null===t?null:void 0}validateDateString(t){switch(this.component._type){case"date":return InputDateController.isoDateRegex.test(t);case"datetime-local":return InputDateController.isoLocalDateTimeRegex.test(t);case"month":return InputDateController.isoMonthRegex.test(t);case"time":return InputDateController.isoTimeRegex.test(t);case"week":return InputDateController.isoWeekRegex.test(t);default:return!1}}onChange(t){super.onChange(t),!!t.target.value!=!!this.component._value&&(this.component._value=t.target.value)}validateMax(t){watchValidator(this.component,"_max",(t=>void 0===t||null!==t&&this.validateDateString(t)),new Set(["Iso8601","Date"]),this.tryParseToString(t,"date"===this.component._type||"month"===this.component._type||"datetime-local"===this.component._type?InputDateController.DEFAULT_MAX_DATE:void 0))}validateMin(t){watchValidator(this.component,"_min",(t=>void 0===t||null!==t&&this.validateDateString(t)),new Set(["Iso8601","Date"]),this.tryParseToString(t))}validateOn(t){setState(this.component,"_on",Object.assign(Object.assign({},t),{onChange:(e,n)=>{!!n!=!!this.component._value&&(this.component._value=n),(null==t?void 0:t.onChange)&&t.onChange(e,n)}}))}validateReadOnly(t){validateReadOnly(this.component,t)}validateRequired(t){watchBoolean(this.component,"_required",t)}validateStep(t){watchNumber(this.component,"_step",t)}validateType(t){watchValidator(this.component,"_type",(t=>"string"==typeof t&&inputDateTypeOptions.includes(t)),new Set([`String {${inputDateTypeOptions.join(", ")}`]),t)}validateValue(t){this.validateValueEx(t)}validateValueEx(t,e){this.validateIso8601("_value",t,e),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateMax(this.component._max),this.validateMin(this.component._min),this.validateLabel(this.component._label),this.validateSuggestions(this.component._suggestions),this.validateOn(this.component._on),this.validateReadOnly(this.component._readOnly),this.validateRequired(this.component._required),this.validateStep(this.component._step),this.validateType(this.component._type),this.validateValue(this.component._value)}}InputDateController.isoDateRegex=/^\d{4}-([0]\d|1[0-2])-([0-2]\d|3[01])/,InputDateController.isoLocalDateTimeRegex=/^\d{4}-([0]\d|1[0-2])-([0-2]\d|3[01])[T ][0-2]\d:[0-5]\d(:[0-5]\d(?:\.\d+)?)?/,InputDateController.isoMonthRegex=/^\d{4}-([0]\d|1[0-2])/,InputDateController.isoTimeRegex=/^[0-2]\d:[0-5]\d(:[0-5]\d(?:\.\d+)?)?/,InputDateController.isoWeekRegex=/^\d{4}-W(?:[0-4]\d|5[0-3])$/,InputDateController.DEFAULT_MAX_DATE=new Date(9999,11,31,23,59,59);const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\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\t/*\n\t\t * No element should be used without a background and font color whose contrast ratio has\n\t\t * not been checked. By initially setting the background color to white and the font color\n\t\t * to black, the contrast ratio is ensured and explicit adjustment is forced.\n\t\t */\n\t\tbackground-color: white;\n\t\tcolor: black;\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}\n\n\t* {\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/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n\tclip: rect(0 0 0 0);\n\tclip-path: inset(50%);\n\theight: 1px;\n\toverflow: hidden;\n\tposition: absolute;\n\twhite-space: nowrap;\n\twidth: 1px;\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\t/*\n\t * Ensure elements with hidden attribute to be actually not visible\n\t * @see https://meowni.ca/hidden.is.a.lie.html\n\t */\n\t[hidden] {\n\t\tdisplay: none !important;\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/* 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, option, select, textarea, .input-label) {\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\tkol-input-number {\n\t\tdisplay: block;\n\t}\n\n\t.error.hidden {\n\t\tdisplay: none;\n\t}\n}\n",KolInputDate$1=proxyCustomElement(class extends HTMLElement{async getValue(){var t;return null===(t=this.ref)||void 0===t?void 0:t.value}render(){const{ariaDescribedBy:t}=getRenderStates(this.state),e=Array.isArray(this.state._suggestions)&&this.state._suggestions.length>0,n=showExpertSlot(this.state._label);return h(Host,{class:{"has-value":this.state._hasValue}},h("kol-input",{class:{[this.state._type]:!0,"hide-label":!!this.state._hideLabel},_accessKey:this.state._accessKey,_disabled:this.state._disabled,_error:this.state._error,_hideError:this.state._hideError,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_icons:this.state._icons,_id:this.state._id,_label:this.state._label,_suggestions:this.state._suggestions,_readOnly:this.state._readOnly,_required:this.state._required,_smartButton:this.state._smartButton,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched},h("span",{slot:"label"},n?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("input",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",autoComplete:this.state._autoComplete,autoCorrect:"off",disabled:this.state._disabled,id:this.state._id,list:e?`${this.state._id}-list`:void 0,max:this.state._max,min:this.state._min,name:this.state._name,readOnly:this.state._readOnly,required:this.state._required,step:this.state._step,spellcheck:"false",type:this.state._type,value:this.state._value},this.controller.onFacade,{onKeyUp:this.onKeyUp})))))}constructor(){super(),this.__registerHost(),this.__attachShadow(),this.catchRef=t=>{this.ref=t,propagateFocus(this.host,this.ref)},this.onKeyUp=t=>{"Enter"===t.code?propagateSubmitEventToForm({form:this.host,ref:this.ref}):this.controller.onFacade.onChange(t)},this._accessKey=void 0,this._alert=!0,this._autoComplete=void 0,this._disabled=!1,this._error=void 0,this._hideError=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._max=void 0,this._min=void 0,this._name=void 0,this._on=void 0,this._readOnly=!1,this._required=!1,this._smartButton=void 0,this._suggestions=void 0,this._syncValueBySelector=void 0,this._step=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._type="date",this._value=void 0,this.state={_autoComplete:"off",_hasValue:!1,_hideError:!1,_id:`id-${nonce()}`,_label:"",_suggestions:[],_type:"datetime-local"},this.controller=new InputDateController(this,"input-date",this.host)}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAlert(t){this.controller.validateAlert(t)}validateAutoComplete(t){this.controller.validateAutoComplete(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateError(t){this.controller.validateError(t)}validateHideError(t){this.controller.validateHideError(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateMax(t){this.controller.validateMax(t)}validateMin(t){this.controller.validateMin(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validateReadOnly(t){this.controller.validateReadOnly(t)}validateRequired(t){this.controller.validateRequired(t)}validateSmartButton(t){this.controller.validateSmartButton(t)}validateSuggestions(t){this.controller.validateSuggestions(t)}validateStep(t){this.controller.validateStep(t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTabIndex(t){this.controller.validateTabIndex(t)}validateTouched(t){this.controller.validateTouched(t)}validateType(t){this.controller.validateType(t)}validateValue(t){this.controller.validateValueEx(t,(t=>{""===t&&this.ref&&(this.ref.value="")}))}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"],_alert:["validateAlert"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_error:["validateError"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_max:["validateMax"],_min:["validateMin"],_name:["validateName"],_on:["validateOn"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_smartButton:["validateSmartButton"],_suggestions:["validateSuggestions"],_step:["validateStep"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_type:["validateType"],_value:["validateValue"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-input-date",{_accessKey:[1,"_access-key"],_alert:[1540],_autoComplete:[1,"_auto-complete"],_disabled:[4],_error:[1],_hideError:[1540,"_hide-error"],_hideLabel:[4,"_hide-label"],_hint:[1],_icons:[1],_id:[1],_label:[1],_max:[1],_min:[1],_name:[1],_on:[16],_readOnly:[4,"_read-only"],_required:[4],_smartButton:[1,"_smart-button"],_suggestions:[1],_syncValueBySelector:[1,"_sync-value-by-selector"],_step:[2],_tabIndex:[2,"_tab-index"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_type:[1],_value:[1025],state:[32],getValue:[64]},void 0,{_accessKey:["validateAccessKey"],_alert:["validateAlert"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_error:["validateError"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_max:["validateMax"],_min:["validateMin"],_name:["validateName"],_on:["validateOn"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_smartButton:["validateSmartButton"],_suggestions:["validateSuggestions"],_step:["validateStep"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_type:["validateType"],_value:["validateValue"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-input-date","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-input-date":customElements.get(t)||customElements.define(t,KolInputDate$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 KolInputDate=KolInputDate$1,defineCustomElement=defineCustomElement$1;export{KolInputDate,defineCustomElement};
@@ -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{g as watchBoolean,r as propagateFocus,t as setState,n as nonce,s as showExpertSlot}from"./prop.validators.js";import{p as propagateSubmitEventToForm,d as defineCustomElement$7}from"./component5.js";import{g as getRenderStates}from"./controller.js";import{I as InputTextEmailController}from"./controller3.js";import{I as InternalUnderlinedAccessKey,d as defineCustomElement$3}from"./component2.js";import{d as defineCustomElement$9}from"./shadow.js";import{d as defineCustomElement$8}from"./component6.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 validateMultiple=(t,e)=>{watchBoolean(t,"_multiple",e)};class InputEmailController extends InputTextEmailController{constructor(t,e,n){super(t,e,n),this.component=t}validateMultiple(t){validateMultiple(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateMultiple(this.component._multiple)}}const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\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\t/*\n\t\t * No element should be used without a background and font color whose contrast ratio has\n\t\t * not been checked. By initially setting the background color to white and the font color\n\t\t * to black, the contrast ratio is ensured and explicit adjustment is forced.\n\t\t */\n\t\tbackground-color: white;\n\t\tcolor: black;\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}\n\n\t* {\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/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n\tclip: rect(0 0 0 0);\n\tclip-path: inset(50%);\n\theight: 1px;\n\toverflow: hidden;\n\tposition: absolute;\n\twhite-space: nowrap;\n\twidth: 1px;\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\t/*\n\t * Ensure elements with hidden attribute to be actually not visible\n\t * @see https://meowni.ca/hidden.is.a.lie.html\n\t */\n\t[hidden] {\n\t\tdisplay: none !important;\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/* 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, option, select, textarea, .input-label) {\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",KolInputEmail$1=proxyCustomElement(class extends HTMLElement{async getValue(){var t;return null===(t=this.ref)||void 0===t?void 0:t.value}render(){const{ariaDescribedBy:t}=getRenderStates(this.state),e=Array.isArray(this.state._suggestions)&&this.state._suggestions.length>0,n=showExpertSlot(this.state._label);return h(Host,{class:{"has-value":this.state._hasValue}},h("kol-input",{class:{email:!0,"hide-label":!!this.state._hideLabel},_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,_icons:this.state._icons,_id:this.state._id,_label:this.state._label,_suggestions:this.state._suggestions,_maxLength:this.state._maxLength,_readOnly:this.state._readOnly,_required:this.state._required,_smartButton:this.state._smartButton,_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"},n?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("input",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",autoComplete:this.state._autoComplete,autoCorrect:"off",disabled:this.state._disabled,multiple:this.state._multiple,id:this.state._id,list:e?`${this.state._id}-list`:void 0,maxlength:this.state._maxLength,name:this.state._name,pattern:this.state._pattern,placeholder:this.state._placeholder,readOnly:this.state._readOnly,required:this.state._required,spellcheck:"false",type:"email",value:this.state._value},this.controller.onFacade,{onKeyUp:this.onKeyUp})))))}constructor(){super(),this.__registerHost(),this.__attachShadow(),this.catchRef=t=>{this.ref=t,propagateFocus(this.host,this.ref)},this.onKeyUp=t=>{setState(this,"_currentLength",t.target.value.length),"Enter"===t.code?propagateSubmitEventToForm({form:this.host,ref:this.ref}):this.controller.onFacade.onChange(t)},this._accessKey=void 0,this._alert=!0,this._autoComplete=void 0,this._disabled=!1,this._error=void 0,this._hasCounter=!1,this._hideError=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._maxLength=void 0,this._multiple=!1,this._name=void 0,this._on=void 0,this._pattern=void 0,this._placeholder=void 0,this._readOnly=!1,this._required=!1,this._smartButton=void 0,this._suggestions=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_autoComplete:"off",_currentLength:0,_hasValue:!1,_hideError:!1,_id:`id-${nonce()}`,_label:"",_suggestions:[]},this.controller=new InputEmailController(this,"input-email",this.host)}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAlert(t){this.controller.validateAlert(t)}validateAutoComplete(t){this.controller.validateAutoComplete(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateError(t){this.controller.validateError(t)}validateHasCounter(t){this.controller.validateHasCounter(t)}validateHideError(t){this.controller.validateHideError(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateMaxLength(t){this.controller.validateMaxLength(t)}validateMultiple(t){this.controller.validateMultiple(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validatePattern(t){this.controller.validatePattern(t)}validatePlaceholder(t){this.controller.validatePlaceholder(t)}validateReadOnly(t){this.controller.validateReadOnly(t)}validateRequired(t){this.controller.validateRequired(t)}validateSuggestions(t){this.controller.validateSuggestions(t)}validateSmartButton(t){this.controller.validateSmartButton(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"],_alert:["validateAlert"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_error:["validateError"],_hasCounter:["validateHasCounter"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_maxLength:["validateMaxLength"],_multiple:["validateMultiple"],_name:["validateName"],_on:["validateOn"],_pattern:["validatePattern"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_suggestions:["validateSuggestions"],_smartButton:["validateSmartButton"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-input-email",{_accessKey:[1,"_access-key"],_alert:[1540],_autoComplete:[1,"_auto-complete"],_disabled:[4],_error:[1],_hasCounter:[4,"_has-counter"],_hideError:[1540,"_hide-error"],_hideLabel:[4,"_hide-label"],_hint:[1],_icons:[1],_id:[1],_label:[1],_maxLength:[2,"_max-length"],_multiple:[4],_name:[1],_on:[16],_pattern:[1],_placeholder:[1],_readOnly:[4,"_read-only"],_required:[4],_smartButton:[1,"_smart-button"],_suggestions:[1],_syncValueBySelector:[1,"_sync-value-by-selector"],_tabIndex:[2,"_tab-index"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_value:[1],state:[32],getValue:[64]},void 0,{_accessKey:["validateAccessKey"],_alert:["validateAlert"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_error:["validateError"],_hasCounter:["validateHasCounter"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_maxLength:["validateMaxLength"],_multiple:["validateMultiple"],_name:["validateName"],_on:["validateOn"],_pattern:["validatePattern"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_suggestions:["validateSuggestions"],_smartButton:["validateSmartButton"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-input-email","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-input-email":customElements.get(t)||customElements.define(t,KolInputEmail$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 KolInputEmail=KolInputEmail$1,defineCustomElement=defineCustomElement$1;export{KolInputEmail,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host,Fragment}from"@stencil/core/internal/client";import{f as watchBoolean,r as propagateFocus,t as setState,n as nonce,s as showExpertSlot}from"./prop.validators.js";import{p as propagateSubmitEventToForm,d as defineCustomElement$7}from"./component5.js";import{g as getRenderStates}from"./controller.js";import{I as InputTextEmailController}from"./controller3.js";import{I as InternalUnderlinedAccessKey,d as defineCustomElement$3}from"./component2.js";import{d as defineCustomElement$9}from"./shadow.js";import{d as defineCustomElement$8}from"./component6.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 validateMultiple=(t,e)=>{watchBoolean(t,"_multiple",e)};class InputEmailController extends InputTextEmailController{constructor(t,e,n){super(t,e,n),this.component=t}validateMultiple(t){validateMultiple(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateMultiple(this.component._multiple)}}const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\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\t/*\n\t\t * No element should be used without a background and font color whose contrast ratio has\n\t\t * not been checked. By initially setting the background color to white and the font color\n\t\t * to black, the contrast ratio is ensured and explicit adjustment is forced.\n\t\t */\n\t\tbackground-color: white;\n\t\tcolor: black;\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}\n\n\t* {\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/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n\tclip: rect(0 0 0 0);\n\tclip-path: inset(50%);\n\theight: 1px;\n\toverflow: hidden;\n\tposition: absolute;\n\twhite-space: nowrap;\n\twidth: 1px;\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\t/*\n\t * Ensure elements with hidden attribute to be actually not visible\n\t * @see https://meowni.ca/hidden.is.a.lie.html\n\t */\n\t[hidden] {\n\t\tdisplay: none !important;\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/* 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, option, select, textarea, .input-label) {\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",KolInputEmail$1=proxyCustomElement(class extends HTMLElement{async getValue(){var t;return null===(t=this.ref)||void 0===t?void 0:t.value}render(){const{ariaDescribedBy:t}=getRenderStates(this.state),e=Array.isArray(this.state._suggestions)&&this.state._suggestions.length>0,n=showExpertSlot(this.state._label);return h(Host,{class:{"has-value":this.state._hasValue}},h("kol-input",{class:{email:!0,"hide-label":!!this.state._hideLabel},_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,_icons:this.state._icons,_id:this.state._id,_label:this.state._label,_suggestions:this.state._suggestions,_maxLength:this.state._maxLength,_readOnly:this.state._readOnly,_required:this.state._required,_smartButton:this.state._smartButton,_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"},n?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("input",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",autoComplete:this.state._autoComplete,autoCorrect:"off",disabled:this.state._disabled,multiple:this.state._multiple,id:this.state._id,list:e?`${this.state._id}-list`:void 0,maxlength:this.state._maxLength,name:this.state._name,pattern:this.state._pattern,placeholder:this.state._placeholder,readOnly:this.state._readOnly,required:this.state._required,spellcheck:"false",type:"email",value:this.state._value},this.controller.onFacade,{onKeyUp:this.onKeyUp})))))}constructor(){super(),this.__registerHost(),this.__attachShadow(),this.catchRef=t=>{this.ref=t,propagateFocus(this.host,this.ref)},this.onKeyUp=t=>{setState(this,"_currentLength",t.target.value.length),"Enter"===t.code?propagateSubmitEventToForm({form:this.host,ref:this.ref}):this.controller.onFacade.onChange(t)},this._accessKey=void 0,this._alert=!0,this._autoComplete=void 0,this._disabled=!1,this._error=void 0,this._hasCounter=!1,this._hideError=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._maxLength=void 0,this._multiple=!1,this._name=void 0,this._on=void 0,this._pattern=void 0,this._placeholder=void 0,this._readOnly=!1,this._required=!1,this._smartButton=void 0,this._suggestions=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_autoComplete:"off",_currentLength:0,_hasValue:!1,_hideError:!1,_id:`id-${nonce()}`,_label:"",_suggestions:[]},this.controller=new InputEmailController(this,"input-email",this.host)}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAlert(t){this.controller.validateAlert(t)}validateAutoComplete(t){this.controller.validateAutoComplete(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateError(t){this.controller.validateError(t)}validateHasCounter(t){this.controller.validateHasCounter(t)}validateHideError(t){this.controller.validateHideError(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateMaxLength(t){this.controller.validateMaxLength(t)}validateMultiple(t){this.controller.validateMultiple(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validatePattern(t){this.controller.validatePattern(t)}validatePlaceholder(t){this.controller.validatePlaceholder(t)}validateReadOnly(t){this.controller.validateReadOnly(t)}validateRequired(t){this.controller.validateRequired(t)}validateSuggestions(t){this.controller.validateSuggestions(t)}validateSmartButton(t){this.controller.validateSmartButton(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"],_alert:["validateAlert"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_error:["validateError"],_hasCounter:["validateHasCounter"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_maxLength:["validateMaxLength"],_multiple:["validateMultiple"],_name:["validateName"],_on:["validateOn"],_pattern:["validatePattern"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_suggestions:["validateSuggestions"],_smartButton:["validateSmartButton"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-input-email",{_accessKey:[1,"_access-key"],_alert:[1540],_autoComplete:[1,"_auto-complete"],_disabled:[4],_error:[1],_hasCounter:[4,"_has-counter"],_hideError:[1540,"_hide-error"],_hideLabel:[4,"_hide-label"],_hint:[1],_icons:[1],_id:[1],_label:[1],_maxLength:[2,"_max-length"],_multiple:[4],_name:[1],_on:[16],_pattern:[1],_placeholder:[1],_readOnly:[4,"_read-only"],_required:[4],_smartButton:[1,"_smart-button"],_suggestions:[1],_syncValueBySelector:[1,"_sync-value-by-selector"],_tabIndex:[2,"_tab-index"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_value:[1],state:[32],getValue:[64]},void 0,{_accessKey:["validateAccessKey"],_alert:["validateAlert"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_error:["validateError"],_hasCounter:["validateHasCounter"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_maxLength:["validateMaxLength"],_multiple:["validateMultiple"],_name:["validateName"],_on:["validateOn"],_pattern:["validatePattern"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_suggestions:["validateSuggestions"],_smartButton:["validateSmartButton"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-input-email","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-input-email":customElements.get(t)||customElements.define(t,KolInputEmail$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 KolInputEmail=KolInputEmail$1,defineCustomElement=defineCustomElement$1;export{KolInputEmail,defineCustomElement};
@@ -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{f as watchString,g as watchBoolean,r as propagateFocus,n as nonce,s as showExpertSlot}from"./prop.validators.js";import{s as stopPropagation,t as tryToDispatchKoliBriEvent}from"./events.js";import{g as getRenderStates}from"./controller.js";import{I as InputIconController}from"./controller-icon.js";import{I as InternalUnderlinedAccessKey,d as defineCustomElement$3}from"./component2.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 InputFileController extends InputIconController{constructor(t,e,n){super(t,e,n),this.component=t}validateAccept(t){watchString(this.component,"_accept",t)}validateMultiple(t){watchBoolean(this.component,"_multiple",t)}validateRequired(t){watchBoolean(this.component,"_required",t)}validateValue(t){watchString(this.component,"_value",t),this.setFormAssociatedValue(this.component._value)}componentWillLoad(){super.componentWillLoad(),this.validateAccept(this.component._accept),this.validateMultiple(this.component._multiple),this.validateRequired(this.component._required),this.validateValue(this.component._value)}}const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\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\t/*\n\t\t * No element should be used without a background and font color whose contrast ratio has\n\t\t * not been checked. By initially setting the background color to white and the font color\n\t\t * to black, the contrast ratio is ensured and explicit adjustment is forced.\n\t\t */\n\t\tbackground-color: white;\n\t\tcolor: black;\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}\n\n\t* {\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/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n\tclip: rect(0 0 0 0);\n\tclip-path: inset(50%);\n\theight: 1px;\n\toverflow: hidden;\n\tposition: absolute;\n\twhite-space: nowrap;\n\twidth: 1px;\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\t/*\n\t * Ensure elements with hidden attribute to be actually not visible\n\t * @see https://meowni.ca/hidden.is.a.lie.html\n\t */\n\t[hidden] {\n\t\tdisplay: none !important;\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/* 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, option, select, textarea, .input-label) {\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\tlabel input[type='file']::-webkit-file-upload-button {\n\t\tdisplay: none;\n\t}\n\n\tlabel input[type='file']:before {\n\t\tcontent: 'Datei auswählen';\n\t}\n\n\tlabel input[multiple]:before {\n\t\tcontent: 'Dateien auswählen';\n\t}\n\n\tdiv.input {\n\t\tcursor: pointer;\n\t}\n\n\t.error.hidden {\n\t\tdisplay: none;\n\t}\n}\n",KolInputFile$1=proxyCustomElement(class extends HTMLElement{async getValue(){var t;return null===(t=this.ref)||void 0===t?void 0:t.files}render(){const{ariaDescribedBy:t}=getRenderStates(this.state),e=showExpertSlot(this.state._label);return h(Host,null,h("kol-input",{class:{file:!0,"hide-label":!!this.state._hideLabel},_accessKey:this.state._accessKey,_disabled:this.state._disabled,_error:this.state._error,_hideError:this.state._hideError,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_icons:this.state._icons,_id:this.state._id,_label:this.state._label,_required:this.state._required,_smartButton:this.state._smartButton,_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("input",Object.assign({ref:this.catchRef,title:"",accept:this.state._accept,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,multiple:this.state._multiple,name:this.state._name,required:this.state._required,spellcheck:"false",type:"file",value:this.state._value},this.controller.onFacade,{onChange:this.onChange})))))}constructor(){super(),this.__registerHost(),this.__attachShadow(),this.catchRef=t=>{this.ref=t,propagateFocus(this.host,this.ref)},this.onChange=t=>{var e;if(this.ref instanceof HTMLInputElement&&"file"===this.ref.type){const n=this.ref.files;stopPropagation(t),tryToDispatchKoliBriEvent("change",this.host,n),this.controller.setFormAssociatedValue(n),"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e.onChange)&&this.state._on.onChange(t,n)}},this._accept=void 0,this._accessKey=void 0,this._alert=!0,this._disabled=!1,this._error=void 0,this._hideError=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._multiple=!1,this._name=void 0,this._on=void 0,this._required=!1,this._smartButton=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_hideError:!1,_id:`id-${nonce()}`,_label:""},this.controller=new InputFileController(this,"input-file",this.host)}validateAccept(t){this.controller.validateAccept(t)}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAlert(t){this.controller.validateAlert(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateError(t){this.controller.validateError(t)}validateHideError(t){this.controller.validateHideError(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateMultiple(t){this.controller.validateMultiple(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validateRequired(t){this.controller.validateRequired(t)}validateSmartButton(t){this.controller.validateSmartButton(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()}get host(){return this}static get watchers(){return{_accept:["validateAccept"],_accessKey:["validateAccessKey"],_alert:["validateAlert"],_disabled:["validateDisabled"],_error:["validateError"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_multiple:["validateMultiple"],_name:["validateName"],_on:["validateOn"],_required:["validateRequired"],_smartButton:["validateSmartButton"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-input-file",{_accept:[1],_accessKey:[1,"_access-key"],_alert:[1540],_disabled:[4],_error:[1],_hideError:[1540,"_hide-error"],_hideLabel:[4,"_hide-label"],_hint:[1],_icons:[1],_id:[1],_label:[1],_multiple:[4],_name:[1],_on:[16],_required:[4],_smartButton:[1,"_smart-button"],_syncValueBySelector:[1,"_sync-value-by-selector"],_tabIndex:[2,"_tab-index"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_value:[1],state:[32],getValue:[64]},void 0,{_accept:["validateAccept"],_accessKey:["validateAccessKey"],_alert:["validateAlert"],_disabled:["validateDisabled"],_error:["validateError"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_multiple:["validateMultiple"],_name:["validateName"],_on:["validateOn"],_required:["validateRequired"],_smartButton:["validateSmartButton"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-input-file","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-input-file":customElements.get(t)||customElements.define(t,KolInputFile$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 KolInputFile=KolInputFile$1,defineCustomElement=defineCustomElement$1;export{KolInputFile,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host,Fragment}from"@stencil/core/internal/client";import{b as watchString,f as watchBoolean,r as propagateFocus,n as nonce,s as showExpertSlot}from"./prop.validators.js";import{s as stopPropagation,t as tryToDispatchKoliBriEvent}from"./events.js";import{g as getRenderStates}from"./controller.js";import{I as InputIconController}from"./controller-icon.js";import{I as InternalUnderlinedAccessKey,d as defineCustomElement$3}from"./component2.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 InputFileController extends InputIconController{constructor(t,e,n){super(t,e,n),this.component=t}validateAccept(t){watchString(this.component,"_accept",t)}validateMultiple(t){watchBoolean(this.component,"_multiple",t)}validateRequired(t){watchBoolean(this.component,"_required",t)}validateValue(t){watchString(this.component,"_value",t),this.setFormAssociatedValue(this.component._value)}componentWillLoad(){super.componentWillLoad(),this.validateAccept(this.component._accept),this.validateMultiple(this.component._multiple),this.validateRequired(this.component._required),this.validateValue(this.component._value)}}const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\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\t/*\n\t\t * No element should be used without a background and font color whose contrast ratio has\n\t\t * not been checked. By initially setting the background color to white and the font color\n\t\t * to black, the contrast ratio is ensured and explicit adjustment is forced.\n\t\t */\n\t\tbackground-color: white;\n\t\tcolor: black;\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}\n\n\t* {\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/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n\tclip: rect(0 0 0 0);\n\tclip-path: inset(50%);\n\theight: 1px;\n\toverflow: hidden;\n\tposition: absolute;\n\twhite-space: nowrap;\n\twidth: 1px;\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\t/*\n\t * Ensure elements with hidden attribute to be actually not visible\n\t * @see https://meowni.ca/hidden.is.a.lie.html\n\t */\n\t[hidden] {\n\t\tdisplay: none !important;\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/* 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, option, select, textarea, .input-label) {\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\tlabel input[type='file']::-webkit-file-upload-button {\n\t\tdisplay: none;\n\t}\n\n\tlabel input[type='file']:before {\n\t\tcontent: 'Datei auswählen';\n\t}\n\n\tlabel input[multiple]:before {\n\t\tcontent: 'Dateien auswählen';\n\t}\n\n\tdiv.input {\n\t\tcursor: pointer;\n\t}\n\n\t.error.hidden {\n\t\tdisplay: none;\n\t}\n}\n",KolInputFile$1=proxyCustomElement(class extends HTMLElement{async getValue(){var t;return null===(t=this.ref)||void 0===t?void 0:t.files}render(){const{ariaDescribedBy:t}=getRenderStates(this.state),e=showExpertSlot(this.state._label);return h(Host,null,h("kol-input",{class:{file:!0,"hide-label":!!this.state._hideLabel},_accessKey:this.state._accessKey,_disabled:this.state._disabled,_error:this.state._error,_hideError:this.state._hideError,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_icons:this.state._icons,_id:this.state._id,_label:this.state._label,_required:this.state._required,_smartButton:this.state._smartButton,_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("input",Object.assign({ref:this.catchRef,title:"",accept:this.state._accept,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,multiple:this.state._multiple,name:this.state._name,required:this.state._required,spellcheck:"false",type:"file",value:this.state._value},this.controller.onFacade,{onChange:this.onChange})))))}constructor(){super(),this.__registerHost(),this.__attachShadow(),this.catchRef=t=>{this.ref=t,propagateFocus(this.host,this.ref)},this.onChange=t=>{var e;if(this.ref instanceof HTMLInputElement&&"file"===this.ref.type){const n=this.ref.files;stopPropagation(t),tryToDispatchKoliBriEvent("change",this.host,n),this.controller.setFormAssociatedValue(n),"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e.onChange)&&this.state._on.onChange(t,n)}},this._accept=void 0,this._accessKey=void 0,this._alert=!0,this._disabled=!1,this._error=void 0,this._hideError=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._multiple=!1,this._name=void 0,this._on=void 0,this._required=!1,this._smartButton=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_hideError:!1,_id:`id-${nonce()}`,_label:""},this.controller=new InputFileController(this,"input-file",this.host)}validateAccept(t){this.controller.validateAccept(t)}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAlert(t){this.controller.validateAlert(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateError(t){this.controller.validateError(t)}validateHideError(t){this.controller.validateHideError(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateMultiple(t){this.controller.validateMultiple(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validateRequired(t){this.controller.validateRequired(t)}validateSmartButton(t){this.controller.validateSmartButton(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()}get host(){return this}static get watchers(){return{_accept:["validateAccept"],_accessKey:["validateAccessKey"],_alert:["validateAlert"],_disabled:["validateDisabled"],_error:["validateError"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_multiple:["validateMultiple"],_name:["validateName"],_on:["validateOn"],_required:["validateRequired"],_smartButton:["validateSmartButton"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-input-file",{_accept:[1],_accessKey:[1,"_access-key"],_alert:[1540],_disabled:[4],_error:[1],_hideError:[1540,"_hide-error"],_hideLabel:[4,"_hide-label"],_hint:[1],_icons:[1],_id:[1],_label:[1],_multiple:[4],_name:[1],_on:[16],_required:[4],_smartButton:[1,"_smart-button"],_syncValueBySelector:[1,"_sync-value-by-selector"],_tabIndex:[2,"_tab-index"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_value:[1],state:[32],getValue:[64]},void 0,{_accept:["validateAccept"],_accessKey:["validateAccessKey"],_alert:["validateAlert"],_disabled:["validateDisabled"],_error:["validateError"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_multiple:["validateMultiple"],_name:["validateName"],_on:["validateOn"],_required:["validateRequired"],_smartButton:["validateSmartButton"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-input-file","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-input-file":customElements.get(t)||customElements.define(t,KolInputFile$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 KolInputFile=KolInputFile$1,defineCustomElement=defineCustomElement$1;export{KolInputFile,defineCustomElement};