@public-ui/components 3.0.7-rc.0 → 4.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (494) hide show
  1. package/custom-elements.json +1 -1
  2. package/dist/cjs/{Alert-pYM9xL1B.js → Alert-DDA66DVu.js} +1 -1
  3. package/dist/cjs/Alert-DDA66DVu.js.map +1 -0
  4. package/dist/cjs/{Collapsible-CEcUGOI1.js → Collapsible-IhYdCplx.js} +1 -1
  5. package/dist/cjs/{Collapsible-CEcUGOI1.js.map → Collapsible-IhYdCplx.js.map} +1 -1
  6. package/dist/cjs/{CustomSuggestionsToggle-CPk5IOdw.js → CustomSuggestionsToggle-CeGKydyw.js} +1 -1
  7. package/dist/cjs/{CustomSuggestionsToggle-CPk5IOdw.js.map → CustomSuggestionsToggle-CeGKydyw.js.map} +1 -1
  8. package/dist/cjs/FieldControlStateWrapper-DPxapC_D.js +4 -0
  9. package/dist/cjs/FieldControlStateWrapper-DPxapC_D.js.map +1 -0
  10. package/dist/cjs/FormFieldStateWrapper-C2VTSu-i.js +4 -0
  11. package/dist/cjs/FormFieldStateWrapper-C2VTSu-i.js.map +1 -0
  12. package/dist/cjs/{Heading-CPcp0Wr1.js → Heading-DJ48CpuI.js} +1 -1
  13. package/dist/cjs/{Heading-CPcp0Wr1.js.map → Heading-DJ48CpuI.js.map} +1 -1
  14. package/dist/cjs/{Icon-B8rPDYT-.js → Icon-D6G0_09j.js} +1 -1
  15. package/dist/cjs/{Icon-B8rPDYT-.js.map → Icon-D6G0_09j.js.map} +1 -1
  16. package/dist/cjs/Input-BRmqCQyF.js +4 -0
  17. package/dist/cjs/{Input-CMtYrIiX.js.map → Input-BRmqCQyF.js.map} +1 -1
  18. package/dist/cjs/{InputStateWrapper-CyxEYc7X.js → InputStateWrapper-BBi90S8D.js} +1 -1
  19. package/dist/cjs/{InputStateWrapper-CyxEYc7X.js.map → InputStateWrapper-BBi90S8D.js.map} +1 -1
  20. package/dist/cjs/{InternalUnderlinedBadgeText-6WeC6ukm.js → InternalUnderlinedBadgeText-D0tClEJo.js} +1 -1
  21. package/dist/cjs/{InternalUnderlinedBadgeText-6WeC6ukm.js.map → InternalUnderlinedBadgeText-D0tClEJo.js.map} +1 -1
  22. package/dist/cjs/{Span-CSTnGgMo.js → Span-BZT0Xgoj.js} +1 -1
  23. package/dist/cjs/{Span-CSTnGgMo.js.map → Span-BZT0Xgoj.js.map} +1 -1
  24. package/dist/cjs/{app-globals-EBS1Rxmp.js → app-globals-CprMO-cF.js} +1 -1
  25. package/dist/cjs/{app-globals-EBS1Rxmp.js.map → app-globals-CprMO-cF.js.map} +1 -1
  26. package/dist/cjs/{controller-p8a-m8p9.js → controller-BY1lNpWb.js} +1 -1
  27. package/dist/cjs/{controller-p8a-m8p9.js.map → controller-BY1lNpWb.js.map} +1 -1
  28. package/dist/cjs/{controller-h186ZoKi.js → controller-C36y36pM.js} +1 -1
  29. package/dist/cjs/{controller-h186ZoKi.js.map → controller-C36y36pM.js.map} +1 -1
  30. package/dist/cjs/{controller-dziW0eTQ.js → controller-CygpdBUj.js} +1 -1
  31. package/dist/cjs/{controller-dziW0eTQ.js.map → controller-CygpdBUj.js.map} +1 -1
  32. package/dist/cjs/{controller-icon-flui-j3P.js → controller-icon-CdU193q2.js} +1 -1
  33. package/dist/cjs/{controller-icon-flui-j3P.js.map → controller-icon-CdU193q2.js.map} +1 -1
  34. package/dist/cjs/{dev.utils-NQv4Or1w.js → dev.utils-BMH6oSjV.js} +1 -1
  35. package/dist/cjs/{dev.utils-NQv4Or1w.js.map → dev.utils-BMH6oSjV.js.map} +1 -1
  36. package/dist/cjs/{devtools-DJ5Gsvbm.js → devtools-BI89G7wy.js} +1 -1
  37. package/dist/cjs/{devtools-DJ5Gsvbm.js.map → devtools-BI89G7wy.js.map} +1 -1
  38. package/dist/cjs/index-DBmXlvaP.js +4 -0
  39. package/dist/cjs/index-DBmXlvaP.js.map +1 -0
  40. package/dist/cjs/index.cjs.js +1 -1
  41. package/dist/cjs/index.cjs.js.map +1 -1
  42. package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
  43. package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
  44. package/dist/cjs/kol-alert-wc.cjs.entry.js +1 -1
  45. package/dist/cjs/kol-alert.cjs.entry.js +1 -1
  46. package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
  47. package/dist/cjs/kol-avatar.cjs.entry.js +1 -1
  48. package/dist/cjs/kol-badge.cjs.entry.js +1 -1
  49. package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
  50. package/dist/cjs/kol-breadcrumb.entry.cjs.js.map +1 -1
  51. package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
  52. package/dist/cjs/kol-button-link.entry.cjs.js.map +1 -1
  53. package/dist/cjs/kol-button-wc.cjs.entry.js +1 -1
  54. package/dist/cjs/kol-button-wc.entry.cjs.js.map +1 -1
  55. package/dist/cjs/kol-button.cjs.entry.js +1 -1
  56. package/dist/cjs/kol-card-wc.cjs.entry.js +1 -1
  57. package/dist/cjs/kol-card.cjs.entry.js +1 -1
  58. package/dist/cjs/kol-combobox.cjs.entry.js +1 -1
  59. package/dist/cjs/kol-details.cjs.entry.js +1 -1
  60. package/dist/cjs/kol-drawer.cjs.entry.js +1 -1
  61. package/dist/cjs/kol-drawer.entry.cjs.js.map +1 -1
  62. package/dist/cjs/kol-form.cjs.entry.js +1 -1
  63. package/dist/cjs/kol-form.entry.cjs.js.map +1 -1
  64. package/dist/cjs/kol-heading.cjs.entry.js +1 -1
  65. package/dist/cjs/kol-icon.cjs.entry.js +1 -1
  66. package/dist/cjs/kol-icon.entry.cjs.js.map +1 -1
  67. package/dist/cjs/kol-image.cjs.entry.js +1 -1
  68. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  69. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  70. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  71. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  72. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  73. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  74. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  75. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  76. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  77. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  78. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  79. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  80. package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
  81. package/dist/cjs/kol-link-wc.entry.cjs.js.map +1 -1
  82. package/dist/cjs/kol-link.cjs.entry.js +1 -1
  83. package/dist/cjs/kol-link.entry.cjs.js.map +1 -1
  84. package/dist/cjs/kol-modal.cjs.entry.js +1 -1
  85. package/dist/cjs/kol-modal.entry.cjs.js.map +1 -1
  86. package/dist/cjs/kol-nav.cjs.entry.js +1 -1
  87. package/dist/cjs/kol-nav.entry.cjs.js.map +1 -1
  88. package/dist/cjs/kol-pagination-wc.cjs.entry.js +1 -1
  89. package/dist/cjs/kol-pagination-wc.entry.cjs.js.map +1 -1
  90. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  91. package/dist/cjs/kol-popover-button-wc.cjs.entry.js +1 -1
  92. package/dist/cjs/kol-popover-button.cjs.entry.js +1 -1
  93. package/dist/cjs/kol-popover-wc.cjs.entry.js +1 -1
  94. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  95. package/dist/cjs/kol-quote.cjs.entry.js +1 -1
  96. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  97. package/dist/cjs/kol-single-select.cjs.entry.js +1 -1
  98. package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
  99. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  100. package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
  101. package/dist/cjs/kol-table-settings-wc.cjs.entry.js +1 -1
  102. package/dist/cjs/kol-table-stateful.cjs.entry.js +1 -1
  103. package/dist/cjs/kol-table-stateless-wc.cjs.entry.js +1 -1
  104. package/dist/cjs/kol-table-stateless.cjs.entry.js +1 -1
  105. package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
  106. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  107. package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
  108. package/dist/cjs/kol-toast-container.entry.cjs.js.map +1 -1
  109. package/dist/cjs/kol-toolbar.cjs.entry.js +1 -1
  110. package/dist/cjs/kol-tooltip-wc.cjs.entry.js +1 -1
  111. package/dist/cjs/kol-tooltip-wc.entry.cjs.js.map +1 -1
  112. package/dist/cjs/kol-tree-item-wc.cjs.entry.js +1 -1
  113. package/dist/cjs/kol-tree-item.cjs.entry.js +1 -1
  114. package/dist/cjs/kol-tree-wc.cjs.entry.js +1 -1
  115. package/dist/cjs/kol-tree.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/loader.cjs.js +1 -1
  119. package/dist/cjs/test-component.cjs.entry.js +1 -1
  120. package/dist/cjs/tooltip-open-tracking-Ba0udJRU.js +4 -0
  121. package/dist/cjs/tooltip-open-tracking-Ba0udJRU.js.map +1 -0
  122. package/dist/components/Alert.js +1 -1
  123. package/dist/components/Alert.js.map +1 -1
  124. package/dist/components/FieldControlStateWrapper.js +1 -1
  125. package/dist/components/FieldControlStateWrapper.js.map +1 -1
  126. package/dist/components/controller2.js +1 -1
  127. package/dist/components/controller2.js.map +1 -1
  128. package/dist/components/index.js +1 -1
  129. package/dist/components/index.js.map +1 -1
  130. package/dist/components/kol-accordion.js +1 -1
  131. package/dist/components/kol-breadcrumb.js +1 -1
  132. package/dist/components/kol-breadcrumb.js.map +1 -1
  133. package/dist/components/kol-button-link.js +1 -1
  134. package/dist/components/kol-button-link.js.map +1 -1
  135. package/dist/components/kol-button-wc.js +1 -1
  136. package/dist/components/kol-button-wc.js.map +1 -1
  137. package/dist/components/kol-card-wc.js +1 -1
  138. package/dist/components/kol-card.js +1 -1
  139. package/dist/components/kol-combobox.js +1 -1
  140. package/dist/components/kol-details.js +1 -1
  141. package/dist/components/kol-drawer.js +1 -1
  142. package/dist/components/kol-drawer.js.map +1 -1
  143. package/dist/components/kol-form.js +1 -1
  144. package/dist/components/kol-form.js.map +1 -1
  145. package/dist/components/kol-heading.js +1 -1
  146. package/dist/components/kol-icon.js +1 -1
  147. package/dist/components/kol-icon.js.map +1 -1
  148. package/dist/components/kol-image.js +1 -1
  149. package/dist/components/kol-input-checkbox.js +1 -1
  150. package/dist/components/kol-input-color.js +1 -1
  151. package/dist/components/kol-input-date.js +1 -1
  152. package/dist/components/kol-input-email.js +1 -1
  153. package/dist/components/kol-input-file.js +1 -1
  154. package/dist/components/kol-input-number.js +1 -1
  155. package/dist/components/kol-input-password.js +1 -1
  156. package/dist/components/kol-input-radio.js +1 -1
  157. package/dist/components/kol-input-range.js +1 -1
  158. package/dist/components/kol-input-text.js +1 -1
  159. package/dist/components/kol-kolibri.js +1 -1
  160. package/dist/components/kol-link-button.js +1 -1
  161. package/dist/components/kol-link-wc.js +1 -1
  162. package/dist/components/kol-link-wc.js.map +1 -1
  163. package/dist/components/kol-link.js +1 -1
  164. package/dist/components/kol-link.js.map +1 -1
  165. package/dist/components/kol-modal.js +1 -1
  166. package/dist/components/kol-modal.js.map +1 -1
  167. package/dist/components/kol-nav.js +1 -1
  168. package/dist/components/kol-nav.js.map +1 -1
  169. package/dist/components/kol-pagination-wc.js +1 -1
  170. package/dist/components/kol-pagination-wc.js.map +1 -1
  171. package/dist/components/kol-pagination.js +1 -1
  172. package/dist/components/kol-popover-button-wc.js +1 -1
  173. package/dist/components/kol-popover-button.js +1 -1
  174. package/dist/components/kol-popover-wc.js +1 -1
  175. package/dist/components/kol-progress.js +1 -1
  176. package/dist/components/kol-quote.js +1 -1
  177. package/dist/components/kol-select.js +1 -1
  178. package/dist/components/kol-single-select.js +1 -1
  179. package/dist/components/kol-skip-nav.js +1 -1
  180. package/dist/components/kol-spin.js +1 -1
  181. package/dist/components/kol-split-button.js +1 -1
  182. package/dist/components/kol-table-settings-wc.js +1 -1
  183. package/dist/components/kol-table-stateful.js +1 -1
  184. package/dist/components/kol-table-stateless-wc.js +1 -1
  185. package/dist/components/kol-table-stateless.js +1 -1
  186. package/dist/components/kol-tabs.js +1 -1
  187. package/dist/components/kol-textarea.js +1 -1
  188. package/dist/components/kol-toast-container.js +1 -1
  189. package/dist/components/kol-toast-container.js.map +1 -1
  190. package/dist/components/kol-toolbar.js +1 -1
  191. package/dist/components/kol-tooltip-wc.js +1 -1
  192. package/dist/components/kol-tooltip-wc.js.map +1 -1
  193. package/dist/components/kol-tree-item-wc.js +1 -1
  194. package/dist/components/kol-tree-item.js +1 -1
  195. package/dist/components/kol-tree-wc.js +1 -1
  196. package/dist/components/kol-tree.js +1 -1
  197. package/dist/components/kol-version.js +1 -1
  198. package/dist/components/tooltip-open-tracking.js +4 -0
  199. package/dist/components/tooltip-open-tracking.js.map +1 -0
  200. package/dist/esm/{Alert-qJPuIv8b.js → Alert-yh8R3coC.js} +1 -1
  201. package/dist/esm/Alert-yh8R3coC.js.map +1 -0
  202. package/dist/esm/{Collapsible-VwOBRTg-.js → Collapsible-DMNJjdc3.js} +1 -1
  203. package/dist/esm/{Collapsible-VwOBRTg-.js.map → Collapsible-DMNJjdc3.js.map} +1 -1
  204. package/dist/esm/{CustomSuggestionsToggle-BtYSYCn5.js → CustomSuggestionsToggle-_i-9Z6oo.js} +1 -1
  205. package/dist/{kolibri/CustomSuggestionsToggle-BtYSYCn5.js.map → esm/CustomSuggestionsToggle-_i-9Z6oo.js.map} +1 -1
  206. package/dist/esm/FieldControlStateWrapper-DxTxYvO0.js +4 -0
  207. package/dist/esm/FieldControlStateWrapper-DxTxYvO0.js.map +1 -0
  208. package/dist/esm/FormFieldStateWrapper-DRcnPo2o.js +4 -0
  209. package/dist/esm/FormFieldStateWrapper-DRcnPo2o.js.map +1 -0
  210. package/dist/esm/{Heading-CMd-jtC1.js → Heading-KhwFHPZb.js} +1 -1
  211. package/dist/{kolibri/Heading-CMd-jtC1.js.map → esm/Heading-KhwFHPZb.js.map} +1 -1
  212. package/dist/esm/Icon-BsRmEtCa.js +4 -0
  213. package/dist/esm/{Icon-BQRZwXjg.js.map → Icon-BsRmEtCa.js.map} +1 -1
  214. package/dist/esm/Input-BxElrU0N.js +4 -0
  215. package/dist/esm/{Input-BQNyXbdV.js.map → Input-BxElrU0N.js.map} +1 -1
  216. package/dist/esm/{InputStateWrapper-5DGko7Ry.js → InputStateWrapper-GJbSTDc8.js} +1 -1
  217. package/dist/esm/{InputStateWrapper-5DGko7Ry.js.map → InputStateWrapper-GJbSTDc8.js.map} +1 -1
  218. package/dist/esm/InternalUnderlinedBadgeText-BnPUgbKl.js +4 -0
  219. package/dist/esm/{InternalUnderlinedBadgeText-DeV9AANw.js.map → InternalUnderlinedBadgeText-BnPUgbKl.js.map} +1 -1
  220. package/dist/esm/{Span-9Jbefwfo.js → Span-5ZR0JDnP.js} +1 -1
  221. package/dist/esm/{Span-9Jbefwfo.js.map → Span-5ZR0JDnP.js.map} +1 -1
  222. package/dist/esm/{app-globals-BV7c4MN_.js → app-globals-COkPg4hl.js} +1 -1
  223. package/dist/esm/{app-globals-BV7c4MN_.js.map → app-globals-COkPg4hl.js.map} +1 -1
  224. package/dist/esm/{controller-BMZRH6Si.js → controller-BiC2tpL8.js} +1 -1
  225. package/dist/esm/{controller-BMZRH6Si.js.map → controller-BiC2tpL8.js.map} +1 -1
  226. package/dist/esm/{controller-C7skty3T.js → controller-CeGWU1Au.js} +1 -1
  227. package/dist/{kolibri/controller-C7skty3T.js.map → esm/controller-CeGWU1Au.js.map} +1 -1
  228. package/dist/esm/{controller-B_Bwl5E9.js → controller-HR9pimff.js} +1 -1
  229. package/dist/esm/{controller-B_Bwl5E9.js.map → controller-HR9pimff.js.map} +1 -1
  230. package/dist/esm/{controller-icon-DcftMfhw.js → controller-icon-DN63N3Rm.js} +1 -1
  231. package/dist/esm/{controller-icon-DcftMfhw.js.map → controller-icon-DN63N3Rm.js.map} +1 -1
  232. package/dist/esm/{dev.utils-D2H-D7vZ.js → dev.utils-0SH3ep_K.js} +1 -1
  233. package/dist/esm/{dev.utils-D2H-D7vZ.js.map → dev.utils-0SH3ep_K.js.map} +1 -1
  234. package/dist/esm/{devtools-Bv4R5yuw.js → devtools-Cg1RmbyV.js} +1 -1
  235. package/dist/esm/{devtools-Bv4R5yuw.js.map → devtools-Cg1RmbyV.js.map} +1 -1
  236. package/dist/esm/index-Dina3aff.js +4 -0
  237. package/dist/esm/index-Dina3aff.js.map +1 -0
  238. package/dist/esm/index.js +1 -1
  239. package/dist/esm/index.js.map +1 -1
  240. package/dist/esm/kol-abbr.entry.js +1 -1
  241. package/dist/esm/kol-accordion.entry.js +1 -1
  242. package/dist/esm/kol-alert-wc.entry.js +1 -1
  243. package/dist/esm/kol-alert.entry.js +1 -1
  244. package/dist/esm/kol-avatar-wc.entry.js +1 -1
  245. package/dist/esm/kol-avatar.entry.js +1 -1
  246. package/dist/esm/kol-badge.entry.js +1 -1
  247. package/dist/esm/kol-breadcrumb.entry.js +1 -1
  248. package/dist/esm/kol-breadcrumb.entry.js.map +1 -1
  249. package/dist/esm/kol-button-link.entry.js +1 -1
  250. package/dist/esm/kol-button-link.entry.js.map +1 -1
  251. package/dist/esm/kol-button-wc.entry.js +1 -1
  252. package/dist/esm/kol-button-wc.entry.js.map +1 -1
  253. package/dist/esm/kol-button.entry.js +1 -1
  254. package/dist/esm/kol-card-wc.entry.js +1 -1
  255. package/dist/esm/kol-card.entry.js +1 -1
  256. package/dist/esm/kol-combobox.entry.js +1 -1
  257. package/dist/esm/kol-details.entry.js +1 -1
  258. package/dist/esm/kol-drawer.entry.js +1 -1
  259. package/dist/esm/kol-drawer.entry.js.map +1 -1
  260. package/dist/esm/kol-form.entry.js +1 -1
  261. package/dist/esm/kol-form.entry.js.map +1 -1
  262. package/dist/esm/kol-heading.entry.js +1 -1
  263. package/dist/esm/kol-icon.entry.js +1 -1
  264. package/dist/esm/kol-icon.entry.js.map +1 -1
  265. package/dist/esm/kol-image.entry.js +1 -1
  266. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  267. package/dist/esm/kol-input-color.entry.js +1 -1
  268. package/dist/esm/kol-input-date.entry.js +1 -1
  269. package/dist/esm/kol-input-email.entry.js +1 -1
  270. package/dist/esm/kol-input-file.entry.js +1 -1
  271. package/dist/esm/kol-input-number.entry.js +1 -1
  272. package/dist/esm/kol-input-password.entry.js +1 -1
  273. package/dist/esm/kol-input-radio.entry.js +1 -1
  274. package/dist/esm/kol-input-range.entry.js +1 -1
  275. package/dist/esm/kol-input-text.entry.js +1 -1
  276. package/dist/esm/kol-kolibri.entry.js +1 -1
  277. package/dist/esm/kol-link-button.entry.js +1 -1
  278. package/dist/esm/kol-link-wc.entry.js +1 -1
  279. package/dist/esm/kol-link-wc.entry.js.map +1 -1
  280. package/dist/esm/kol-link.entry.js +1 -1
  281. package/dist/esm/kol-link.entry.js.map +1 -1
  282. package/dist/esm/kol-modal.entry.js +1 -1
  283. package/dist/esm/kol-modal.entry.js.map +1 -1
  284. package/dist/esm/kol-nav.entry.js +1 -1
  285. package/dist/esm/kol-nav.entry.js.map +1 -1
  286. package/dist/esm/kol-pagination-wc.entry.js +1 -1
  287. package/dist/esm/kol-pagination-wc.entry.js.map +1 -1
  288. package/dist/esm/kol-pagination.entry.js +1 -1
  289. package/dist/esm/kol-popover-button-wc.entry.js +1 -1
  290. package/dist/esm/kol-popover-button.entry.js +1 -1
  291. package/dist/esm/kol-popover-wc.entry.js +1 -1
  292. package/dist/esm/kol-progress.entry.js +1 -1
  293. package/dist/esm/kol-quote.entry.js +1 -1
  294. package/dist/esm/kol-select.entry.js +1 -1
  295. package/dist/esm/kol-single-select.entry.js +1 -1
  296. package/dist/esm/kol-skip-nav.entry.js +1 -1
  297. package/dist/esm/kol-spin.entry.js +1 -1
  298. package/dist/esm/kol-split-button.entry.js +1 -1
  299. package/dist/esm/kol-table-settings-wc.entry.js +1 -1
  300. package/dist/esm/kol-table-stateful.entry.js +1 -1
  301. package/dist/esm/kol-table-stateless-wc.entry.js +1 -1
  302. package/dist/esm/kol-table-stateless.entry.js +1 -1
  303. package/dist/esm/kol-tabs.entry.js +1 -1
  304. package/dist/esm/kol-textarea.entry.js +1 -1
  305. package/dist/esm/kol-toast-container.entry.js +1 -1
  306. package/dist/esm/kol-toast-container.entry.js.map +1 -1
  307. package/dist/esm/kol-toolbar.entry.js +1 -1
  308. package/dist/esm/kol-tooltip-wc.entry.js +1 -1
  309. package/dist/esm/kol-tooltip-wc.entry.js.map +1 -1
  310. package/dist/esm/kol-tree-item-wc.entry.js +1 -1
  311. package/dist/esm/kol-tree-item.entry.js +1 -1
  312. package/dist/esm/kol-tree-wc.entry.js +1 -1
  313. package/dist/esm/kol-tree.entry.js +1 -1
  314. package/dist/esm/kol-version.entry.js +1 -1
  315. package/dist/esm/kolibri.js +1 -1
  316. package/dist/esm/loader.js +1 -1
  317. package/dist/esm/test-component.entry.js +1 -1
  318. package/dist/esm/tooltip-open-tracking-rBbBgPWP.js +4 -0
  319. package/dist/esm/tooltip-open-tracking-rBbBgPWP.js.map +1 -0
  320. package/dist/kolibri/Alert-yh8R3coC.js +4 -0
  321. package/dist/kolibri/Alert-yh8R3coC.js.map +1 -0
  322. package/dist/kolibri/{Collapsible-VwOBRTg-.js → Collapsible-DMNJjdc3.js} +1 -1
  323. package/dist/kolibri/{Collapsible-VwOBRTg-.js.map → Collapsible-DMNJjdc3.js.map} +1 -1
  324. package/dist/kolibri/{CustomSuggestionsToggle-BtYSYCn5.js → CustomSuggestionsToggle-_i-9Z6oo.js} +1 -1
  325. package/dist/{esm/CustomSuggestionsToggle-BtYSYCn5.js.map → kolibri/CustomSuggestionsToggle-_i-9Z6oo.js.map} +1 -1
  326. package/dist/kolibri/FieldControlStateWrapper-DxTxYvO0.js +4 -0
  327. package/dist/kolibri/FieldControlStateWrapper-DxTxYvO0.js.map +1 -0
  328. package/dist/kolibri/FormFieldStateWrapper-DRcnPo2o.js +4 -0
  329. package/dist/kolibri/FormFieldStateWrapper-DRcnPo2o.js.map +1 -0
  330. package/dist/kolibri/Heading-KhwFHPZb.js +4 -0
  331. package/dist/{esm/Heading-CMd-jtC1.js.map → kolibri/Heading-KhwFHPZb.js.map} +1 -1
  332. package/dist/kolibri/Icon-BsRmEtCa.js +4 -0
  333. package/dist/kolibri/{Icon-BQRZwXjg.js.map → Icon-BsRmEtCa.js.map} +1 -1
  334. package/dist/kolibri/Input-BxElrU0N.js +4 -0
  335. package/dist/kolibri/{Input-BQNyXbdV.js.map → Input-BxElrU0N.js.map} +1 -1
  336. package/dist/kolibri/InputStateWrapper-GJbSTDc8.js +4 -0
  337. package/dist/kolibri/{InputStateWrapper-5DGko7Ry.js.map → InputStateWrapper-GJbSTDc8.js.map} +1 -1
  338. package/dist/kolibri/InternalUnderlinedBadgeText-BnPUgbKl.js +4 -0
  339. package/dist/kolibri/{InternalUnderlinedBadgeText-DeV9AANw.js.map → InternalUnderlinedBadgeText-BnPUgbKl.js.map} +1 -1
  340. package/dist/kolibri/Span-5ZR0JDnP.js +4 -0
  341. package/dist/kolibri/{Span-9Jbefwfo.js.map → Span-5ZR0JDnP.js.map} +1 -1
  342. package/dist/kolibri/app-globals-COkPg4hl.js +4 -0
  343. package/dist/kolibri/{app-globals-BV7c4MN_.js.map → app-globals-COkPg4hl.js.map} +1 -1
  344. package/dist/kolibri/{controller-BMZRH6Si.js → controller-BiC2tpL8.js} +1 -1
  345. package/dist/kolibri/{controller-BMZRH6Si.js.map → controller-BiC2tpL8.js.map} +1 -1
  346. package/dist/kolibri/{controller-C7skty3T.js → controller-CeGWU1Au.js} +1 -1
  347. package/dist/{esm/controller-C7skty3T.js.map → kolibri/controller-CeGWU1Au.js.map} +1 -1
  348. package/dist/kolibri/{controller-B_Bwl5E9.js → controller-HR9pimff.js} +1 -1
  349. package/dist/kolibri/{controller-B_Bwl5E9.js.map → controller-HR9pimff.js.map} +1 -1
  350. package/dist/kolibri/{controller-icon-DcftMfhw.js → controller-icon-DN63N3Rm.js} +1 -1
  351. package/dist/kolibri/{controller-icon-DcftMfhw.js.map → controller-icon-DN63N3Rm.js.map} +1 -1
  352. package/dist/kolibri/{dev.utils-D2H-D7vZ.js → dev.utils-0SH3ep_K.js} +1 -1
  353. package/dist/kolibri/{dev.utils-D2H-D7vZ.js.map → dev.utils-0SH3ep_K.js.map} +1 -1
  354. package/dist/kolibri/{devtools-Bv4R5yuw.js → devtools-Cg1RmbyV.js} +1 -1
  355. package/dist/kolibri/{devtools-Bv4R5yuw.js.map → devtools-Cg1RmbyV.js.map} +1 -1
  356. package/dist/kolibri/{index-DKFHNf-G.js → index-Dina3aff.js} +1 -1
  357. package/dist/kolibri/index-Dina3aff.js.map +1 -0
  358. package/dist/kolibri/index.esm.js +1 -1
  359. package/dist/kolibri/index.esm.js.map +1 -1
  360. package/dist/kolibri/kol-abbr.entry.js +1 -1
  361. package/dist/kolibri/kol-accordion.entry.js +1 -1
  362. package/dist/kolibri/kol-alert-wc.entry.js +1 -1
  363. package/dist/kolibri/kol-alert.entry.js +1 -1
  364. package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
  365. package/dist/kolibri/kol-avatar.entry.js +1 -1
  366. package/dist/kolibri/kol-badge.entry.js +1 -1
  367. package/dist/kolibri/kol-breadcrumb.entry.esm.js.map +1 -1
  368. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  369. package/dist/kolibri/kol-breadcrumb.entry.js.map +1 -1
  370. package/dist/kolibri/kol-button-link.entry.esm.js.map +1 -1
  371. package/dist/kolibri/kol-button-link.entry.js +1 -1
  372. package/dist/kolibri/kol-button-link.entry.js.map +1 -1
  373. package/dist/kolibri/kol-button-wc.entry.esm.js.map +1 -1
  374. package/dist/kolibri/kol-button-wc.entry.js +1 -1
  375. package/dist/kolibri/kol-button-wc.entry.js.map +1 -1
  376. package/dist/kolibri/kol-button.entry.js +1 -1
  377. package/dist/kolibri/kol-card-wc.entry.js +1 -1
  378. package/dist/kolibri/kol-card.entry.js +1 -1
  379. package/dist/kolibri/kol-combobox.entry.js +1 -1
  380. package/dist/kolibri/kol-details.entry.js +1 -1
  381. package/dist/kolibri/kol-drawer.entry.esm.js.map +1 -1
  382. package/dist/kolibri/kol-drawer.entry.js +1 -1
  383. package/dist/kolibri/kol-drawer.entry.js.map +1 -1
  384. package/dist/kolibri/kol-form.entry.esm.js.map +1 -1
  385. package/dist/kolibri/kol-form.entry.js +1 -1
  386. package/dist/kolibri/kol-form.entry.js.map +1 -1
  387. package/dist/kolibri/kol-heading.entry.js +1 -1
  388. package/dist/kolibri/kol-icon.entry.esm.js.map +1 -1
  389. package/dist/kolibri/kol-icon.entry.js +1 -1
  390. package/dist/kolibri/kol-icon.entry.js.map +1 -1
  391. package/dist/kolibri/kol-image.entry.js +1 -1
  392. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  393. package/dist/kolibri/kol-input-color.entry.js +1 -1
  394. package/dist/kolibri/kol-input-date.entry.js +1 -1
  395. package/dist/kolibri/kol-input-date.entry.js.map +1 -1
  396. package/dist/kolibri/kol-input-email.entry.js +1 -1
  397. package/dist/kolibri/kol-input-file.entry.js +1 -1
  398. package/dist/kolibri/kol-input-number.entry.js +1 -1
  399. package/dist/kolibri/kol-input-password.entry.js +1 -1
  400. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  401. package/dist/kolibri/kol-input-range.entry.js +1 -1
  402. package/dist/kolibri/kol-input-text.entry.js +1 -1
  403. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  404. package/dist/kolibri/kol-link-button.entry.js +1 -1
  405. package/dist/kolibri/kol-link-wc.entry.esm.js.map +1 -1
  406. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  407. package/dist/kolibri/kol-link-wc.entry.js.map +1 -1
  408. package/dist/kolibri/kol-link.entry.esm.js.map +1 -1
  409. package/dist/kolibri/kol-link.entry.js +1 -1
  410. package/dist/kolibri/kol-link.entry.js.map +1 -1
  411. package/dist/kolibri/kol-modal.entry.esm.js.map +1 -1
  412. package/dist/kolibri/kol-modal.entry.js +1 -1
  413. package/dist/kolibri/kol-modal.entry.js.map +1 -1
  414. package/dist/kolibri/kol-nav.entry.esm.js.map +1 -1
  415. package/dist/kolibri/kol-nav.entry.js +1 -1
  416. package/dist/kolibri/kol-nav.entry.js.map +1 -1
  417. package/dist/kolibri/kol-pagination-wc.entry.esm.js.map +1 -1
  418. package/dist/kolibri/kol-pagination-wc.entry.js +1 -1
  419. package/dist/kolibri/kol-pagination-wc.entry.js.map +1 -1
  420. package/dist/kolibri/kol-pagination.entry.js +1 -1
  421. package/dist/kolibri/kol-popover-button-wc.entry.js +1 -1
  422. package/dist/kolibri/kol-popover-button.entry.js +1 -1
  423. package/dist/kolibri/kol-popover-wc.entry.js +1 -1
  424. package/dist/kolibri/kol-progress.entry.js +1 -1
  425. package/dist/kolibri/kol-quote.entry.js +1 -1
  426. package/dist/kolibri/kol-select.entry.js +1 -1
  427. package/dist/kolibri/kol-single-select.entry.js +1 -1
  428. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  429. package/dist/kolibri/kol-spin.entry.js +1 -1
  430. package/dist/kolibri/kol-split-button.entry.js +1 -1
  431. package/dist/kolibri/kol-table-settings-wc.entry.js +1 -1
  432. package/dist/kolibri/kol-table-stateful.entry.js +1 -1
  433. package/dist/kolibri/kol-table-stateless-wc.entry.js +1 -1
  434. package/dist/kolibri/kol-table-stateless.entry.js +1 -1
  435. package/dist/kolibri/kol-tabs.entry.js +1 -1
  436. package/dist/kolibri/kol-textarea.entry.js +1 -1
  437. package/dist/kolibri/kol-toast-container.entry.esm.js.map +1 -1
  438. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  439. package/dist/kolibri/kol-toast-container.entry.js.map +1 -1
  440. package/dist/kolibri/kol-toolbar.entry.js +1 -1
  441. package/dist/kolibri/kol-tooltip-wc.entry.esm.js.map +1 -1
  442. package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
  443. package/dist/kolibri/kol-tooltip-wc.entry.js.map +1 -1
  444. package/dist/kolibri/kol-tree-item-wc.entry.js +1 -1
  445. package/dist/kolibri/kol-tree-item.entry.js +1 -1
  446. package/dist/kolibri/kol-tree-wc.entry.js +1 -1
  447. package/dist/kolibri/kol-tree.entry.js +1 -1
  448. package/dist/kolibri/kol-version.entry.js +1 -1
  449. package/dist/kolibri/kolibri.esm.js +1 -1
  450. package/dist/kolibri/test-component.entry.js +1 -1
  451. package/dist/kolibri/tooltip-open-tracking-rBbBgPWP.js +4 -0
  452. package/dist/kolibri/tooltip-open-tracking-rBbBgPWP.js.map +1 -0
  453. package/dist/types/components/button/component.d.ts +0 -1
  454. package/dist/types/components/drawer/shadow.d.ts +1 -1
  455. package/dist/types/components/link/component.d.ts +0 -1
  456. package/dist/types/components/nav/shadow.d.ts +3 -1
  457. package/dist/types/functional-components/FormFieldTooltip/FormFieldTooltip.d.ts +0 -1
  458. package/dist/types/index.d.ts +1 -0
  459. package/dist/types/schema/components/toaster.d.ts +3 -3
  460. package/dist/types/utils/tooltip-open-tracking.d.ts +4 -0
  461. package/doc/toaster.md +3 -3
  462. package/package.json +1 -1
  463. package/dist/cjs/Alert-pYM9xL1B.js.map +0 -1
  464. package/dist/cjs/FieldControlStateWrapper-CxSfV7UW.js +0 -4
  465. package/dist/cjs/FieldControlStateWrapper-CxSfV7UW.js.map +0 -1
  466. package/dist/cjs/FormFieldStateWrapper-CujxRl8G.js +0 -4
  467. package/dist/cjs/FormFieldStateWrapper-CujxRl8G.js.map +0 -1
  468. package/dist/cjs/Input-CMtYrIiX.js +0 -4
  469. package/dist/cjs/index-DHm-aTX3.js +0 -4
  470. package/dist/cjs/index-DHm-aTX3.js.map +0 -1
  471. package/dist/esm/Alert-qJPuIv8b.js.map +0 -1
  472. package/dist/esm/FieldControlStateWrapper-CIWPKSbC.js +0 -4
  473. package/dist/esm/FieldControlStateWrapper-CIWPKSbC.js.map +0 -1
  474. package/dist/esm/FormFieldStateWrapper-CKwM-DIl.js +0 -4
  475. package/dist/esm/FormFieldStateWrapper-CKwM-DIl.js.map +0 -1
  476. package/dist/esm/Icon-BQRZwXjg.js +0 -4
  477. package/dist/esm/Input-BQNyXbdV.js +0 -4
  478. package/dist/esm/InternalUnderlinedBadgeText-DeV9AANw.js +0 -4
  479. package/dist/esm/index-DKFHNf-G.js +0 -4
  480. package/dist/esm/index-DKFHNf-G.js.map +0 -1
  481. package/dist/kolibri/Alert-qJPuIv8b.js +0 -4
  482. package/dist/kolibri/Alert-qJPuIv8b.js.map +0 -1
  483. package/dist/kolibri/FieldControlStateWrapper-CIWPKSbC.js +0 -4
  484. package/dist/kolibri/FieldControlStateWrapper-CIWPKSbC.js.map +0 -1
  485. package/dist/kolibri/FormFieldStateWrapper-CKwM-DIl.js +0 -4
  486. package/dist/kolibri/FormFieldStateWrapper-CKwM-DIl.js.map +0 -1
  487. package/dist/kolibri/Heading-CMd-jtC1.js +0 -4
  488. package/dist/kolibri/Icon-BQRZwXjg.js +0 -4
  489. package/dist/kolibri/Input-BQNyXbdV.js +0 -4
  490. package/dist/kolibri/InputStateWrapper-5DGko7Ry.js +0 -4
  491. package/dist/kolibri/InternalUnderlinedBadgeText-DeV9AANw.js +0 -4
  492. package/dist/kolibri/Span-9Jbefwfo.js +0 -4
  493. package/dist/kolibri/app-globals-BV7c4MN_.js +0 -4
  494. package/dist/kolibri/index-DKFHNf-G.js.map +0 -1
@@ -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{c as clsx}from"./clsx.js";import{w as watchValidator,s as setState,k as deprecatedHint}from"./common.js";import{F as FormFieldStateWrapper}from"./controller2.js";import{I as InputIconController,a as InputContainerStateWrapperFc}from"./controller-icon.js";import{I as InputStateWrapper}from"./InputStateWrapper.js";import{n as nonce}from"./dev.utils.js";import{p as propagateSubmitEventToForm}from"./controller.js";import{v as validateAutoComplete}from"./auto-complete.js";import{v as validateReadOnly}from"./read-only.js";import{v as validateRequired}from"./required.js";import{v as validateSuggestions}from"./suggestions.js";const inputDateTypeOptions=["date","datetime-local","month","time","week"],isInputDateTypePropType=e=>"string"==typeof e&&inputDateTypeOptions.includes(e),validateTypeInputDate=(e,t)=>{watchValidator(e,"_type",isInputDateTypePropType,new Set(inputDateTypeOptions),t)};class InputDateController extends InputIconController{constructor(e,t,n){super(e,t,n),this.validateIso8601=(e,t,n)=>watchValidator(this.component,e,e=>null==e||""===e||this.validateDateString(e),new Set(["Date","string{ISO-8601}"]),InputDateController.tryParseToString(t,this.component._type,this.component._step),{hooks:{afterPatch:e=>{"string"==typeof e&&n&&n(e)}}}),this.component=e}validateAutoComplete(e){validateAutoComplete(this.component,e)}validateSuggestions(e){validateSuggestions(this.component,e)}static tryParseToString(e,t,n){if("string"==typeof e||null===e)return e;if("object"==typeof e&&e instanceof Date){const a=e.getFullYear(),i=String(e.getMonth()+1).padStart(2,"0"),o=String(e.getDate()).padStart(2,"0"),l=String(e.getHours()).padStart(2,"0"),s=String(e.getMinutes()).padStart(2,"0"),r=String(e.getSeconds()).padStart(2,"0"),d=[a,i,o].join("-"),c=[l,s,r].join(":");switch(t){case"date":return d;case"datetime-local":return`${d}T${c}`;case"month":return`${a}-${i}`;case"time":return void 0===n||"60"===String(n)?`${l}:${s}`:c;case"week":return`${a}-W${this.getWeekNumberOfDate(e)}`}}}static getWeekNumberOfDate(e){const t=new Date(e),n=(t.getDay()+6)%7;t.setDate(t.getDate()-n+3);const a=t.valueOf();t.setMonth(0,1),4!==t.getDay()&&t.setMonth(0,1+(4-t.getDay()+7)%7);return(1+Math.ceil((a-t.valueOf())/6048e5)).toString().padStart(2,"0")}validateDateString(e){switch(this.component._type){case"date":return InputDateController.isoDateRegex.test(e);case"datetime-local":return InputDateController.isoLocalDateTimeRegex.test(e);case"month":return InputDateController.isoMonthRegex.test(e);case"time":return InputDateController.isoTimeRegex.test(e);case"week":return InputDateController.isoWeekRegex.test(e);default:return!1}}onBlur(e){super.onBlur(e),!!e.target.value!=!!this.component._value&&(this.component._value=e.target.value)}validateMax(e){const t=null!=e||"date"!==this.component._type&&"month"!==this.component._type&&"datetime-local"!==this.component._type?e:InputDateController.DEFAULT_MAX_DATE;this.validateIso8601("_max",t)}validateMin(e){this.validateIso8601("_min",e)}validateOn(e){setState(this.component,"_on",Object.assign(Object.assign({},e),{onChange:(t,n)=>{!!n!=!!this.component._value&&(this.component._value=n),(null==e?void 0:e.onChange)&&e.onChange(t,n)}}))}validateReadOnly(e){validateReadOnly(this.component,e)}validateRequired(e){validateRequired(this.component,e)}validateStep(e){this.validateNumber("_step",e)}validateType(e){validateTypeInputDate(this.component,e)}validateValue(e){this.validateValueEx(e)}validateValueEx(e,t){this.validateIso8601("_value",e,t),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 defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\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 position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field {\n display: grid;\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text::after {\n content: \"*\";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: \"*\";\n }\n .kol-input-container {\n background-color: white;\n display: grid;\n width: 100%;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n grid-template-columns: 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--end) {\n grid-template-columns: 1fr auto;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start):has(> .kol-input-container__adornment--end) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-input {\n width: 100%;\n min-width: var(--a11y-min-size);\n }\n .kol-input:focus {\n outline: none;\n }\n}",KolInputDate$1=proxyCustomElement(class extends HTMLElement{async getValue(){var e;return this.inputRef&&this.remapValue(null===(e=this.inputRef)||void 0===e?void 0:e.value)}async kolFocus(){var e;null===(e=this.inputRef)||void 0===e||e.focus()}async reset(){this.state=Object.assign(Object.assign({},this.state),{_value:null}),this.controller.setFormAssociatedValue(""),this.inputRef&&(this.inputRef.value="")}setInitialValueType(e){e instanceof Date?this._initialValueType="Date":this._initialValueType="string"==typeof e?"String":null}remapValue(e){return""===e?null:"Date"===this._initialValueType?new Date(e):e}getFormFieldProps(){return{state:this.state,class:clsx("kol-input-date",this.state._type,{"has-value":this.state._hasValue}),tooltipAlign:this._tooltipAlign,onClick:()=>{var e;return null===(e=this.inputRef)||void 0===e?void 0:e.focus()},alert:this.showAsAlert()}}getInputProps(){return Object.assign(Object.assign({ref:this.catchRef,state:this.state},this.controller.onFacade),{onBlur:this.onBlur,onFocus:this.onFocus,onKeyDown:this.onKeyDown,onChange:this.onChange,onInput:this.onInput})}render(){return h(FormFieldStateWrapper,Object.assign({key:"a37cad860460cee4d7eeaf1487a1f2e4a0a47fc2"},this.getFormFieldProps()),h(InputContainerStateWrapperFc,{key:"9a23e22012258a2430abc8fb39180a71f4c35a77",state:this.state},h(InputStateWrapper,Object.assign({key:"9c8329c721150fa21fa86ce9ed3f35e9caa954d5"},this.getInputProps()))))}constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this._initialValueType=null,this.catchRef=e=>{this.inputRef=e},this.onBlur=e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1},this.onFocus=e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},this.onChange=e=>{const t=e.target.value,n=this.remapValue(t);this.controller.onFacade.onChange(e,n)},this.onInput=e=>{const t=e.target.value,n=this.remapValue(t);this._value=n,this.controller.onFacade.onInput(e,!0,n)},this.onKeyDown=e=>{"Enter"!==e.code&&"NumpadEnter"!==e.code||propagateSubmitEventToForm({form:this.host})},this._autoComplete="off",this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._readOnly=!1,this._required=!1,this._tooltipAlign="top",this._touched=!1,this._type="date",this.state={_hasValue:!1,_hideMsg:!1,_id:`id-${nonce()}`,_label:"",_suggestions:[],_type:"datetime-local"},this.inputHasFocus=!1,this.controller=new InputDateController(this,"date",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(e){this.controller.validateAccessKey(e)}validateAutoComplete(e){this.controller.validateAutoComplete(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHideMsg(e){this.controller.validateHideMsg(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMax(e){this.controller.validateMax(e)}validateMin(e){this.controller.validateMin(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validateReadOnly(e){this.controller.validateReadOnly(e)}validateRequired(e){this.controller.validateRequired(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSmartButton(e){this.controller.validateSmartButton(e)}validateSuggestions(e){this.controller.validateSuggestions(e)}validateStep(e){this.controller.validateStep(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTouched(e){this.controller.validateTouched(e)}validateType(e){this.controller.validateType(e)}validateValue(e){e instanceof Date&&deprecatedHint("Date type will be removed in v3. Use `Iso8601` instead."),this.controller.validateValueEx(e),null!=e&&this.setInitialValueType(e)}componentWillLoad(){void 0!==this._value&&this.setInitialValueType(this._value),this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener(e=>this.state._hasValue=!!e)}static get delegatesFocus(){return!0}get host(){return this}static get watchers(){return{_accessKey:["validateAccessKey"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_max:["validateMax"],_min:["validateMin"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_shortKey:["validateShortKey"],_smartButton:["validateSmartButton"],_suggestions:["validateSuggestions"],_step:["validateStep"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_type:["validateType"],_value:["validateValue"]}}static get style(){return{default:defaultStyleCss}}},[305,"kol-input-date",{_accessKey:[1,"_access-key"],_autoComplete:[1,"_auto-complete"],_disabled:[4],_hideMsg:[4,"_hide-msg"],_hideLabel:[4,"_hide-label"],_hint:[1],_icons:[1],_id:[1],_label:[1],_max:[1],_min:[1],_msg:[1],_name:[1],_on:[16],_readOnly:[4,"_read-only"],_required:[4],_shortKey:[1,"_short-key"],_smartButton:[1,"_smart-button"],_suggestions:[1],_syncValueBySelector:[1,"_sync-value-by-selector"],_step:[8],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_type:[1],_value:[1537],_initialValueType:[32],state:[32],inputHasFocus:[32],getValue:[64],kolFocus:[64],reset:[64]},void 0,{_accessKey:["validateAccessKey"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_max:["validateMax"],_min:["validateMin"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_shortKey:["validateShortKey"],_smartButton:["validateSmartButton"],_suggestions:["validateSuggestions"],_step:["validateStep"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_type:["validateType"],_value:["validateValue"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-input-date"].forEach(e=>{if("kol-input-date"===e)customElements.get(e)||customElements.define(e,KolInputDate$1)})}const KolInputDate=KolInputDate$1,defineCustomElement=defineCustomElement$1;export{KolInputDate,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{c as clsx}from"./clsx.js";import{w as watchValidator,s as setState,k as deprecatedHint}from"./common.js";import{F as FormFieldStateWrapper}from"./controller2.js";import{I as InputIconController,a as InputContainerStateWrapperFc}from"./controller-icon.js";import{I as InputStateWrapper}from"./InputStateWrapper.js";import{n as nonce}from"./dev.utils.js";import{p as propagateSubmitEventToForm}from"./controller.js";import{v as validateAutoComplete}from"./auto-complete.js";import{v as validateReadOnly}from"./read-only.js";import{v as validateRequired}from"./required.js";import{v as validateSuggestions}from"./suggestions.js";const inputDateTypeOptions=["date","datetime-local","month","time","week"],isInputDateTypePropType=e=>"string"==typeof e&&inputDateTypeOptions.includes(e),validateTypeInputDate=(e,t)=>{watchValidator(e,"_type",isInputDateTypePropType,new Set(inputDateTypeOptions),t)};class InputDateController extends InputIconController{constructor(e,t,n){super(e,t,n),this.validateIso8601=(e,t,n)=>watchValidator(this.component,e,e=>null==e||""===e||this.validateDateString(e),new Set(["Date","string{ISO-8601}"]),InputDateController.tryParseToString(t,this.component._type,this.component._step),{hooks:{afterPatch:e=>{"string"==typeof e&&n&&n(e)}}}),this.component=e}validateAutoComplete(e){validateAutoComplete(this.component,e)}validateSuggestions(e){validateSuggestions(this.component,e)}static tryParseToString(e,t,n){if("string"==typeof e||null===e)return e;if("object"==typeof e&&e instanceof Date){const a=e.getFullYear(),i=String(e.getMonth()+1).padStart(2,"0"),o=String(e.getDate()).padStart(2,"0"),l=String(e.getHours()).padStart(2,"0"),s=String(e.getMinutes()).padStart(2,"0"),r=String(e.getSeconds()).padStart(2,"0"),d=[a,i,o].join("-"),c=[l,s,r].join(":");switch(t){case"date":return d;case"datetime-local":return`${d}T${c}`;case"month":return`${a}-${i}`;case"time":return void 0===n||"60"===String(n)?`${l}:${s}`:c;case"week":return`${a}-W${this.getWeekNumberOfDate(e)}`}}}static getWeekNumberOfDate(e){const t=new Date(e),n=(t.getDay()+6)%7;t.setDate(t.getDate()-n+3);const a=t.valueOf();t.setMonth(0,1),4!==t.getDay()&&t.setMonth(0,1+(4-t.getDay()+7)%7);return(1+Math.ceil((a-t.valueOf())/6048e5)).toString().padStart(2,"0")}validateDateString(e){switch(this.component._type){case"date":return InputDateController.isoDateRegex.test(e);case"datetime-local":return InputDateController.isoLocalDateTimeRegex.test(e);case"month":return InputDateController.isoMonthRegex.test(e);case"time":return InputDateController.isoTimeRegex.test(e);case"week":return InputDateController.isoWeekRegex.test(e);default:return!1}}onBlur(e){super.onBlur(e),!!e.target.value!=!!this.component._value&&(this.component._value=e.target.value)}validateMax(e){const t=null!=e||"date"!==this.component._type&&"month"!==this.component._type&&"datetime-local"!==this.component._type?e:InputDateController.DEFAULT_MAX_DATE;this.validateIso8601("_max",t)}validateMin(e){this.validateIso8601("_min",e)}validateOn(e){setState(this.component,"_on",Object.assign(Object.assign({},e),{onChange:(t,n)=>{!!n!=!!this.component._value&&(this.component._value=n),(null==e?void 0:e.onChange)&&e.onChange(t,n)}}))}validateReadOnly(e){validateReadOnly(this.component,e)}validateRequired(e){validateRequired(this.component,e)}validateStep(e){this.validateNumber("_step",e)}validateType(e){validateTypeInputDate(this.component,e)}validateValue(e){this.validateValueEx(e)}validateValueEx(e,t){this.validateIso8601("_value",e,t),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 defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\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 position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field {\n display: grid;\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text::after {\n content: \"*\";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: \"*\";\n }\n .kol-input-container {\n background-color: white;\n display: grid;\n width: 100%;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n grid-template-columns: 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--end) {\n grid-template-columns: 1fr auto;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start):has(> .kol-input-container__adornment--end) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-input {\n width: 100%;\n min-width: var(--a11y-min-size);\n }\n .kol-input:focus {\n outline: none;\n }\n}",KolInputDate$1=proxyCustomElement(class extends HTMLElement{async getValue(){var e;return this.inputRef&&this.remapValue(null===(e=this.inputRef)||void 0===e?void 0:e.value)}async kolFocus(){var e;null===(e=this.inputRef)||void 0===e||e.focus()}async reset(){this.state=Object.assign(Object.assign({},this.state),{_value:null}),this.controller.setFormAssociatedValue(""),this.inputRef&&(this.inputRef.value="")}setInitialValueType(e){e instanceof Date?this._initialValueType="Date":this._initialValueType="string"==typeof e?"String":null}remapValue(e){return""===e?null:"Date"===this._initialValueType?new Date(e):e}getFormFieldProps(){return{state:this.state,class:clsx("kol-input-date",this.state._type,{"has-value":this.state._hasValue}),tooltipAlign:this._tooltipAlign,onClick:()=>{var e;return null===(e=this.inputRef)||void 0===e?void 0:e.focus()},alert:this.showAsAlert()}}getInputProps(){return Object.assign(Object.assign({ref:this.catchRef,state:this.state},this.controller.onFacade),{onBlur:this.onBlur,onFocus:this.onFocus,onKeyDown:this.onKeyDown,onChange:this.onChange,onInput:this.onInput})}render(){return h(FormFieldStateWrapper,Object.assign({key:"7d72e54985c31ecbd89e7a395e7d0a56f746e768"},this.getFormFieldProps()),h(InputContainerStateWrapperFc,{key:"44d6e0d4a5cd6f787654182459d6782d55ef4d5c",state:this.state},h(InputStateWrapper,Object.assign({key:"bf6ac0de69717f5f2a820133154cc88d3d8a9c20"},this.getInputProps()))))}constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this._initialValueType=null,this.catchRef=e=>{this.inputRef=e},this.onBlur=e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1},this.onFocus=e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},this.onChange=e=>{const t=e.target.value,n=this.remapValue(t);this.controller.onFacade.onChange(e,n)},this.onInput=e=>{const t=e.target.value,n=this.remapValue(t);this._value=n,this.controller.onFacade.onInput(e,!0,n)},this.onKeyDown=e=>{"Enter"!==e.code&&"NumpadEnter"!==e.code||propagateSubmitEventToForm({form:this.host})},this._autoComplete="off",this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._readOnly=!1,this._required=!1,this._tooltipAlign="top",this._touched=!1,this._type="date",this.state={_hasValue:!1,_hideMsg:!1,_id:`id-${nonce()}`,_label:"",_suggestions:[],_type:"datetime-local"},this.inputHasFocus=!1,this.controller=new InputDateController(this,"date",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(e){this.controller.validateAccessKey(e)}validateAutoComplete(e){this.controller.validateAutoComplete(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHideMsg(e){this.controller.validateHideMsg(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMax(e){this.controller.validateMax(e)}validateMin(e){this.controller.validateMin(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validateReadOnly(e){this.controller.validateReadOnly(e)}validateRequired(e){this.controller.validateRequired(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSmartButton(e){this.controller.validateSmartButton(e)}validateSuggestions(e){this.controller.validateSuggestions(e)}validateStep(e){this.controller.validateStep(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTouched(e){this.controller.validateTouched(e)}validateType(e){this.controller.validateType(e)}validateValue(e){e instanceof Date&&deprecatedHint("Date type will be removed in v3. Use `Iso8601` instead."),this.controller.validateValueEx(e),null!=e&&this.setInitialValueType(e)}componentWillLoad(){void 0!==this._value&&this.setInitialValueType(this._value),this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener(e=>this.state._hasValue=!!e)}static get delegatesFocus(){return!0}get host(){return this}static get watchers(){return{_accessKey:["validateAccessKey"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_max:["validateMax"],_min:["validateMin"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_shortKey:["validateShortKey"],_smartButton:["validateSmartButton"],_suggestions:["validateSuggestions"],_step:["validateStep"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_type:["validateType"],_value:["validateValue"]}}static get style(){return{default:defaultStyleCss}}},[305,"kol-input-date",{_accessKey:[1,"_access-key"],_autoComplete:[1,"_auto-complete"],_disabled:[4],_hideMsg:[4,"_hide-msg"],_hideLabel:[4,"_hide-label"],_hint:[1],_icons:[1],_id:[1],_label:[1],_max:[1],_min:[1],_msg:[1],_name:[1],_on:[16],_readOnly:[4,"_read-only"],_required:[4],_shortKey:[1,"_short-key"],_smartButton:[1,"_smart-button"],_suggestions:[1],_syncValueBySelector:[1,"_sync-value-by-selector"],_step:[8],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_type:[1],_value:[1537],_initialValueType:[32],state:[32],inputHasFocus:[32],getValue:[64],kolFocus:[64],reset:[64]},void 0,{_accessKey:["validateAccessKey"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_max:["validateMax"],_min:["validateMin"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_shortKey:["validateShortKey"],_smartButton:["validateSmartButton"],_suggestions:["validateSuggestions"],_step:["validateStep"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_type:["validateType"],_value:["validateValue"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-input-date"].forEach(e=>{if("kol-input-date"===e)customElements.get(e)||customElements.define(e,KolInputDate$1)})}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}from"@stencil/core/internal/client";import{c as clsx}from"./clsx.js";import{F as FormFieldStateWrapper}from"./controller2.js";import{a as InputContainerStateWrapperFc}from"./controller-icon.js";import{I as InputStateWrapper}from"./InputStateWrapper.js";import{n as nonce}from"./dev.utils.js";import{p as propagateSubmitEventToForm}from"./controller.js";import"./common.js";import{v as validateMaxLengthBehavior}from"./max-length-behavior.js";import{v as validateMultiple}from"./multiple.js";import{I as InputTextEmailController}from"./controller4.js";class InputEmailController extends InputTextEmailController{constructor(e,t,n){super(e,t,n),this.component=e}validateMultiple(e){validateMultiple(this.component,e)}validateMaxLengthBehavior(e){validateMaxLengthBehavior(this.component,e)}componentWillLoad(){super.componentWillLoad(),this.validateMaxLengthBehavior(this.component._maxLengthBehavior),this.validateMultiple(this.component._multiple)}}const defaultStyleCss="/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\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 position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field {\n display: grid;\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text::after {\n content: \"*\";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: \"*\";\n }\n .kol-input-container {\n background-color: white;\n display: grid;\n width: 100%;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n grid-template-columns: 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--end) {\n grid-template-columns: 1fr auto;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start):has(> .kol-input-container__adornment--end) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-input {\n width: 100%;\n min-width: var(--a11y-min-size);\n }\n .kol-input:focus {\n outline: none;\n }\n}",KolInputEmail$1=proxyCustomElement(class extends HTMLElement{async getValue(){var e;return null===(e=this.inputRef)||void 0===e?void 0:e.value}async kolFocus(){var e;null===(e=this.inputRef)||void 0===e||e.focus()}getFormFieldProps(){return{state:this.state,class:clsx("kol-input-email","email",{"has-value":this.state._hasValue,"kol-form-field--has-counter":this.controller.hasSoftCharacterLimit()||this.controller.hasCounter()}),tooltipAlign:this._tooltipAlign,onClick:()=>{var e;return null===(e=this.inputRef)||void 0===e?void 0:e.focus()},alert:this.showAsAlert()}}getInputProps(){const e="number"==typeof this.state._maxLength?[`${this.state._id}-character-limit-hint`]:void 0;return Object.assign(Object.assign({ref:this.catchRef,state:this.state,type:"email",ariaDescribedBy:e},this.controller.onFacade),{onInput:this.onInput,onKeyDown:this.onKeyDown,onFocus:e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},onBlur:e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1}})}render(){return h(FormFieldStateWrapper,Object.assign({key:"f19a32b8c7a913d1e67715b00163722b4533e977"},this.getFormFieldProps()),h(InputContainerStateWrapperFc,{key:"ca0b98dcd5c215e220a8eabc98a3ca1675d3bf9d",state:this.state},h(InputStateWrapper,Object.assign({key:"a3fb4a6498c19e5e3997a960c4c3fa6728125781"},this.getInputProps()))))}constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.catchRef=e=>{this.inputRef=e},this.onKeyDown=e=>{"Enter"!==e.code&&"NumpadEnter"!==e.code||propagateSubmitEventToForm({form:this.host})},this.onInput=e=>{this._value=e.target.value,this.controller.onFacade.onInput(e)},this._autoComplete="off",this._hasCounter=!1,this._maxLengthBehavior="hard",this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._multiple=!1,this._readOnly=!1,this._required=!1,this._tooltipAlign="top",this._touched=!1,this.state={_currentLength:0,_currentLengthDebounced:0,_hasValue:!1,_hideMsg:!1,_id:`id-${nonce()}`,_label:"",_suggestions:[]},this.inputHasFocus=!1,this.controller=new InputEmailController(this,"email",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(e){this.controller.validateAccessKey(e)}validateAutoComplete(e){this.controller.validateAutoComplete(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHideMsg(e){this.controller.validateHideMsg(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHasCounter(e){this.controller.validateHasCounter(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMaxLength(e){this.controller.validateMaxLength(e)}validateMsg(e){this.controller.validateMsg(e)}validateMultiple(e){this.controller.validateMultiple(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validatePattern(e){this.controller.validatePattern(e)}validatePlaceholder(e){this.controller.validatePlaceholder(e)}validateReadOnly(e){this.controller.validateReadOnly(e)}validateRequired(e){this.controller.validateRequired(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSuggestions(e){this.controller.validateSuggestions(e)}validateSmartButton(e){this.controller.validateSmartButton(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e)}validateMaxLengthBehavior(e){this.controller.validateMaxLengthBehavior(e)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener(e=>this.state._hasValue=!!e)}static get delegatesFocus(){return!0}get host(){return this}static get watchers(){return{_accessKey:["validateAccessKey"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hasCounter:["validateHasCounter"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_maxLength:["validateMaxLength"],_msg:["validateMsg"],_multiple:["validateMultiple"],_name:["validateName"],_on:["validateOn"],_pattern:["validatePattern"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_shortKey:["validateShortKey"],_suggestions:["validateSuggestions"],_smartButton:["validateSmartButton"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"],_maxLengthBehavior:["validateMaxLengthBehavior"]}}static get style(){return{default:defaultStyleCss}}},[305,"kol-input-email",{_accessKey:[1,"_access-key"],_autoComplete:[1,"_auto-complete"],_hasCounter:[4,"_has-counter"],_maxLengthBehavior:[1,"_max-length-behavior"],_disabled:[4],_hideMsg:[4,"_hide-msg"],_hideLabel:[4,"_hide-label"],_hint:[1],_icons:[1],_id:[1],_label:[1],_maxLength:[2,"_max-length"],_msg:[1],_multiple:[4],_name:[1],_on:[16],_pattern:[1],_placeholder:[1],_readOnly:[4,"_read-only"],_required:[4],_shortKey:[1,"_short-key"],_smartButton:[1,"_smart-button"],_suggestions:[1],_syncValueBySelector:[1,"_sync-value-by-selector"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_value:[1537],state:[32],inputHasFocus:[32],getValue:[64],kolFocus:[64]},void 0,{_accessKey:["validateAccessKey"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hasCounter:["validateHasCounter"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_maxLength:["validateMaxLength"],_msg:["validateMsg"],_multiple:["validateMultiple"],_name:["validateName"],_on:["validateOn"],_pattern:["validatePattern"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_shortKey:["validateShortKey"],_suggestions:["validateSuggestions"],_smartButton:["validateSmartButton"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"],_maxLengthBehavior:["validateMaxLengthBehavior"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-input-email"].forEach(e=>{if("kol-input-email"===e)customElements.get(e)||customElements.define(e,KolInputEmail$1)})}const KolInputEmail=KolInputEmail$1,defineCustomElement=defineCustomElement$1;export{KolInputEmail,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{c as clsx}from"./clsx.js";import{F as FormFieldStateWrapper}from"./controller2.js";import{a as InputContainerStateWrapperFc}from"./controller-icon.js";import{I as InputStateWrapper}from"./InputStateWrapper.js";import{n as nonce}from"./dev.utils.js";import{p as propagateSubmitEventToForm}from"./controller.js";import"./common.js";import{v as validateMaxLengthBehavior}from"./max-length-behavior.js";import{v as validateMultiple}from"./multiple.js";import{I as InputTextEmailController}from"./controller4.js";class InputEmailController extends InputTextEmailController{constructor(e,t,n){super(e,t,n),this.component=e}validateMultiple(e){validateMultiple(this.component,e)}validateMaxLengthBehavior(e){validateMaxLengthBehavior(this.component,e)}componentWillLoad(){super.componentWillLoad(),this.validateMaxLengthBehavior(this.component._maxLengthBehavior),this.validateMultiple(this.component._multiple)}}const defaultStyleCss="/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\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 position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field {\n display: grid;\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text::after {\n content: \"*\";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: \"*\";\n }\n .kol-input-container {\n background-color: white;\n display: grid;\n width: 100%;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n grid-template-columns: 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--end) {\n grid-template-columns: 1fr auto;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start):has(> .kol-input-container__adornment--end) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-input {\n width: 100%;\n min-width: var(--a11y-min-size);\n }\n .kol-input:focus {\n outline: none;\n }\n}",KolInputEmail$1=proxyCustomElement(class extends HTMLElement{async getValue(){var e;return null===(e=this.inputRef)||void 0===e?void 0:e.value}async kolFocus(){var e;null===(e=this.inputRef)||void 0===e||e.focus()}getFormFieldProps(){return{state:this.state,class:clsx("kol-input-email","email",{"has-value":this.state._hasValue,"kol-form-field--has-counter":this.controller.hasSoftCharacterLimit()||this.controller.hasCounter()}),tooltipAlign:this._tooltipAlign,onClick:()=>{var e;return null===(e=this.inputRef)||void 0===e?void 0:e.focus()},alert:this.showAsAlert()}}getInputProps(){const e="number"==typeof this.state._maxLength?[`${this.state._id}-character-limit-hint`]:void 0;return Object.assign(Object.assign({ref:this.catchRef,state:this.state,type:"email",ariaDescribedBy:e},this.controller.onFacade),{onInput:this.onInput,onKeyDown:this.onKeyDown,onFocus:e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},onBlur:e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1}})}render(){return h(FormFieldStateWrapper,Object.assign({key:"baffe19d589e95460cfc7a667c8d37ec7f28b869"},this.getFormFieldProps()),h(InputContainerStateWrapperFc,{key:"f67d993a844ea5345b50ee73f8cfc67a05d37822",state:this.state},h(InputStateWrapper,Object.assign({key:"368af02c7118f848925007bcc3ec298fdad708f0"},this.getInputProps()))))}constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.catchRef=e=>{this.inputRef=e},this.onKeyDown=e=>{"Enter"!==e.code&&"NumpadEnter"!==e.code||propagateSubmitEventToForm({form:this.host})},this.onInput=e=>{this._value=e.target.value,this.controller.onFacade.onInput(e)},this._autoComplete="off",this._hasCounter=!1,this._maxLengthBehavior="hard",this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._multiple=!1,this._readOnly=!1,this._required=!1,this._tooltipAlign="top",this._touched=!1,this.state={_currentLength:0,_currentLengthDebounced:0,_hasValue:!1,_hideMsg:!1,_id:`id-${nonce()}`,_label:"",_suggestions:[]},this.inputHasFocus=!1,this.controller=new InputEmailController(this,"email",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(e){this.controller.validateAccessKey(e)}validateAutoComplete(e){this.controller.validateAutoComplete(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHideMsg(e){this.controller.validateHideMsg(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHasCounter(e){this.controller.validateHasCounter(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMaxLength(e){this.controller.validateMaxLength(e)}validateMsg(e){this.controller.validateMsg(e)}validateMultiple(e){this.controller.validateMultiple(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validatePattern(e){this.controller.validatePattern(e)}validatePlaceholder(e){this.controller.validatePlaceholder(e)}validateReadOnly(e){this.controller.validateReadOnly(e)}validateRequired(e){this.controller.validateRequired(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSuggestions(e){this.controller.validateSuggestions(e)}validateSmartButton(e){this.controller.validateSmartButton(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e)}validateMaxLengthBehavior(e){this.controller.validateMaxLengthBehavior(e)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener(e=>this.state._hasValue=!!e)}static get delegatesFocus(){return!0}get host(){return this}static get watchers(){return{_accessKey:["validateAccessKey"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hasCounter:["validateHasCounter"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_maxLength:["validateMaxLength"],_msg:["validateMsg"],_multiple:["validateMultiple"],_name:["validateName"],_on:["validateOn"],_pattern:["validatePattern"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_shortKey:["validateShortKey"],_suggestions:["validateSuggestions"],_smartButton:["validateSmartButton"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"],_maxLengthBehavior:["validateMaxLengthBehavior"]}}static get style(){return{default:defaultStyleCss}}},[305,"kol-input-email",{_accessKey:[1,"_access-key"],_autoComplete:[1,"_auto-complete"],_hasCounter:[4,"_has-counter"],_maxLengthBehavior:[1,"_max-length-behavior"],_disabled:[4],_hideMsg:[4,"_hide-msg"],_hideLabel:[4,"_hide-label"],_hint:[1],_icons:[1],_id:[1],_label:[1],_maxLength:[2,"_max-length"],_msg:[1],_multiple:[4],_name:[1],_on:[16],_pattern:[1],_placeholder:[1],_readOnly:[4,"_read-only"],_required:[4],_shortKey:[1,"_short-key"],_smartButton:[1,"_smart-button"],_suggestions:[1],_syncValueBySelector:[1,"_sync-value-by-selector"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_value:[1537],state:[32],inputHasFocus:[32],getValue:[64],kolFocus:[64]},void 0,{_accessKey:["validateAccessKey"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hasCounter:["validateHasCounter"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_maxLength:["validateMaxLength"],_msg:["validateMsg"],_multiple:["validateMultiple"],_name:["validateName"],_on:["validateOn"],_pattern:["validatePattern"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_shortKey:["validateShortKey"],_suggestions:["validateSuggestions"],_smartButton:["validateSmartButton"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"],_maxLengthBehavior:["validateMaxLengthBehavior"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-input-email"].forEach(e=>{if("kol-input-email"===e)customElements.get(e)||customElements.define(e,KolInputEmail$1)})}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}from"@stencil/core/internal/client";import{c as clsx}from"./clsx.js";import{d as KolButtonWcTag}from"./component-names.js";import{F as FormFieldStateWrapper}from"./controller2.js";import{I as InputIconController,a as InputContainerStateWrapperFc}from"./controller-icon.js";import{I as InputStateWrapper}from"./InputStateWrapper.js";import{t as translate}from"./i18n.js";import{n as nonce}from"./dev.utils.js";import{h as watchString}from"./common.js";import{v as validateMultiple}from"./multiple.js";import{v as validateRequired}from"./required.js";const validateAccept=(e,t,n={})=>{watchString(e,"_accept",t,n)};class InputFileController extends InputIconController{constructor(e,t,n){super(e,t,n),this.component=e}validateAccept(e){validateAccept(this.component,e)}validateMultiple(e){validateMultiple(this.component,e)}validateRequired(e){validateRequired(this.component,e)}componentWillLoad(){super.componentWillLoad(),this.validateAccept(this.component._accept),this.validateMultiple(this.component._multiple),this.validateRequired(this.component._required)}}const defaultStyleCss="/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\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 position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field {\n display: grid;\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text::after {\n content: \"*\";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: \"*\";\n }\n .kol-input-container {\n background-color: white;\n display: grid;\n width: 100%;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n grid-template-columns: 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--end) {\n grid-template-columns: 1fr auto;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start):has(> .kol-input-container__adornment--end) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-input {\n width: 100%;\n min-width: var(--a11y-min-size);\n }\n .kol-input:focus {\n outline: none;\n }\n .kol-input {\n opacity: 0;\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n padding: calc((var(--a11y-min-size) - 16 * 1rem / var(--kolibri-root-font-size, 16)) / 10) 0.5em;\n cursor: pointer;\n }\n .kol-input::-webkit-file-upload-button, .kol-input::file-selector-button {\n cursor: pointer;\n }\n .kol-input:disabled, .kol-input:disabled::-webkit-file-upload-button, .kol-input:disabled::file-selector-button {\n cursor: not-allowed;\n pointer-events: none;\n }\n .kol-input-container__container {\n display: flex;\n height: var(--a11y-min-size);\n overflow: hidden;\n align-items: center;\n }\n .kol-input-container__filename {\n margin-left: calc(4 * 1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n flex-grow: 1;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start):has(> .kol-input-container__adornment--end) {\n grid-template-columns: auto 1fr;\n }\n}",KolInputFile$1=proxyCustomElement(class extends HTMLElement{async getValue(){var e;return null===(e=this.inputRef)||void 0===e?void 0:e.files}async kolFocus(){var e;null===(e=this.inputRef)||void 0===e||e.focus()}async reset(){this.controller.setFormAssociatedValue(""),this.filename=this.translateFilenameText,this.hasFileSelected=!1,this.inputRef&&(this.inputRef.value="")}getFormFieldProps(){return{state:this.state,class:clsx("kol-input-file","file"),tooltipAlign:this._tooltipAlign,onClick:()=>{var e;return null===(e=this.inputRef)||void 0===e?void 0:e.focus()},alert:this.showAsAlert()}}getInputProps(){return Object.assign(Object.assign({ref:this.catchRef,state:this.state,type:"file",accept:this.state._accept,multiple:this.state._multiple},this.controller.onFacade),{onChange:this.onChange,onInput:this.onInput,onFocus:e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},onBlur:e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1}})}render(){return h(FormFieldStateWrapper,Object.assign({key:"b5fbe23fc35a129f338743af03faa91d389ba9fb"},this.getFormFieldProps()),h(InputContainerStateWrapperFc,{key:"3422d0b39f417afb43a555e7c3444ea7e93c860d",state:this.state},h("span",{key:"69e817a0f0ba2214e6fa99aeb06122210a2864aa",class:clsx("kol-input-container__filename",{"kol-input-container__filename--has-file":this.hasFileSelected})},this.filename),h(InputStateWrapper,Object.assign({key:"de648f8a6d19671b45c7a53a1c814d2a9a3ae2df"},this.getInputProps())),h(KolButtonWcTag,{key:"e324b2cf76507edfa9a6f266dfb827fe0a3133d0",class:"kol-input-container__button",_label:this.translateDataBrowseText,_buttonVariant:"primary",_disabled:this._disabled})))}constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.translateDataBrowseText=translate("kol-data-browse-text"),this.translateFilenameText=translate("kol-filename-text"),this.catchRef=e=>{this.inputRef=e},this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._multiple=!1,this._required=!1,this._tooltipAlign="top",this._touched=!1,this.filename=this.translateFilenameText,this.hasFileSelected=!1,this.state={_hideMsg:!1,_id:`id-${nonce()}`,_label:""},this.inputHasFocus=!1,this.onDragOver=e=>{var t,n,i;e.preventDefault(),null===(i=null===(n=null===(t=this.inputRef)||void 0===t?void 0:t.parentElement)||void 0===n?void 0:n.parentElement)||void 0===i||i.classList.add("kol-input-container--is-dragover")},this.onDragLeave=()=>{var e,t,n;null===(n=null===(t=null===(e=this.inputRef)||void 0===e?void 0:e.parentElement)||void 0===t?void 0:t.parentElement)||void 0===n||n.classList.remove("kol-input-container--is-dragover")},this.onDrop=e=>{var t,n,i,o;if(e.preventDefault(),null===(i=null===(n=null===(t=this.inputRef)||void 0===t?void 0:t.parentElement)||void 0===n?void 0:n.parentElement)||void 0===i||i.classList.remove("kol-input-container--is-dragover"),null===(o=e.dataTransfer)||void 0===o?void 0:o.files.length){const t=e.dataTransfer.files;this.filename=Array.from(t).map(e=>e.name).join(", "),this.controller.setFormAssociatedValue(t)}},this.onChange=e=>{if(this.inputRef instanceof HTMLInputElement&&"file"===this.inputRef.type){const t=this.inputRef.files;this.hasFileSelected=!!(null==t?void 0:t.length),this.filename=(null==t?void 0:t.length)?Array.from(t).map(e=>e.name).join(", "):this.translateFilenameText,this.controller.onFacade.onChange(e,t),this.controller.setFormAssociatedValue(t)}},this.onInput=e=>{if(this.inputRef instanceof HTMLInputElement&&"file"===this.inputRef.type){const t=this.inputRef.files;this.controller.onFacade.onInput(e,!1,t)}},this.controller=new InputFileController(this,"file",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccept(e){this.controller.validateAccept(e)}validateAccessKey(e){this.controller.validateAccessKey(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHideMsg(e){this.controller.validateHideMsg(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMsg(e){this.controller.validateMsg(e)}validateMultiple(e){this.controller.validateMultiple(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validateRequired(e){this.controller.validateRequired(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSmartButton(e){this.controller.validateSmartButton(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTouched(e){this.controller.validateTouched(e)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad()}componentDidLoad(){var e,t;const n=null===(t=null===(e=this.inputRef)||void 0===e?void 0:e.parentElement)||void 0===t?void 0:t.parentElement;null==n||n.addEventListener("dragover",this.onDragOver),null==n||n.addEventListener("dragleave",this.onDragLeave),null==n||n.addEventListener("drop",this.onDrop)}static get delegatesFocus(){return!0}get host(){return this}static get watchers(){return{_accept:["validateAccept"],_accessKey:["validateAccessKey"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_msg:["validateMsg"],_multiple:["validateMultiple"],_name:["validateName"],_on:["validateOn"],_required:["validateRequired"],_shortKey:["validateShortKey"],_smartButton:["validateSmartButton"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"]}}static get style(){return{default:defaultStyleCss}}},[305,"kol-input-file",{_accept:[1],_accessKey:[1,"_access-key"],_disabled:[4],_hideMsg:[4,"_hide-msg"],_hideLabel:[4,"_hide-label"],_hint:[1],_icons:[1],_id:[1],_label:[1],_msg:[1],_multiple:[4],_name:[1],_on:[16],_required:[4],_shortKey:[1,"_short-key"],_smartButton:[1,"_smart-button"],_syncValueBySelector:[1,"_sync-value-by-selector"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],filename:[32],hasFileSelected:[32],state:[32],inputHasFocus:[32],getValue:[64],kolFocus:[64],reset:[64]},void 0,{_accept:["validateAccept"],_accessKey:["validateAccessKey"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_msg:["validateMsg"],_multiple:["validateMultiple"],_name:["validateName"],_on:["validateOn"],_required:["validateRequired"],_shortKey:["validateShortKey"],_smartButton:["validateSmartButton"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-input-file"].forEach(e=>{if("kol-input-file"===e)customElements.get(e)||customElements.define(e,KolInputFile$1)})}const KolInputFile=KolInputFile$1,defineCustomElement=defineCustomElement$1;export{KolInputFile,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{c as clsx}from"./clsx.js";import{d as KolButtonWcTag}from"./component-names.js";import{F as FormFieldStateWrapper}from"./controller2.js";import{I as InputIconController,a as InputContainerStateWrapperFc}from"./controller-icon.js";import{I as InputStateWrapper}from"./InputStateWrapper.js";import{t as translate}from"./i18n.js";import{n as nonce}from"./dev.utils.js";import{h as watchString}from"./common.js";import{v as validateMultiple}from"./multiple.js";import{v as validateRequired}from"./required.js";const validateAccept=(e,t,n={})=>{watchString(e,"_accept",t,n)};class InputFileController extends InputIconController{constructor(e,t,n){super(e,t,n),this.component=e}validateAccept(e){validateAccept(this.component,e)}validateMultiple(e){validateMultiple(this.component,e)}validateRequired(e){validateRequired(this.component,e)}componentWillLoad(){super.componentWillLoad(),this.validateAccept(this.component._accept),this.validateMultiple(this.component._multiple),this.validateRequired(this.component._required)}}const defaultStyleCss="/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\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 position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field {\n display: grid;\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text::after {\n content: \"*\";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: \"*\";\n }\n .kol-input-container {\n background-color: white;\n display: grid;\n width: 100%;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n grid-template-columns: 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--end) {\n grid-template-columns: 1fr auto;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start):has(> .kol-input-container__adornment--end) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-input {\n width: 100%;\n min-width: var(--a11y-min-size);\n }\n .kol-input:focus {\n outline: none;\n }\n .kol-input {\n opacity: 0;\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n padding: calc((var(--a11y-min-size) - 16 * 1rem / var(--kolibri-root-font-size, 16)) / 10) 0.5em;\n cursor: pointer;\n }\n .kol-input::-webkit-file-upload-button, .kol-input::file-selector-button {\n cursor: pointer;\n }\n .kol-input:disabled, .kol-input:disabled::-webkit-file-upload-button, .kol-input:disabled::file-selector-button {\n cursor: not-allowed;\n pointer-events: none;\n }\n .kol-input-container__container {\n display: flex;\n height: var(--a11y-min-size);\n overflow: hidden;\n align-items: center;\n }\n .kol-input-container__filename {\n margin-left: calc(4 * 1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n flex-grow: 1;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start):has(> .kol-input-container__adornment--end) {\n grid-template-columns: auto 1fr;\n }\n}",KolInputFile$1=proxyCustomElement(class extends HTMLElement{async getValue(){var e;return null===(e=this.inputRef)||void 0===e?void 0:e.files}async kolFocus(){var e;null===(e=this.inputRef)||void 0===e||e.focus()}async reset(){this.controller.setFormAssociatedValue(""),this.filename=this.translateFilenameText,this.hasFileSelected=!1,this.inputRef&&(this.inputRef.value="")}getFormFieldProps(){return{state:this.state,class:clsx("kol-input-file","file"),tooltipAlign:this._tooltipAlign,onClick:()=>{var e;return null===(e=this.inputRef)||void 0===e?void 0:e.focus()},alert:this.showAsAlert()}}getInputProps(){return Object.assign(Object.assign({ref:this.catchRef,state:this.state,type:"file",accept:this.state._accept,multiple:this.state._multiple},this.controller.onFacade),{onChange:this.onChange,onInput:this.onInput,onFocus:e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},onBlur:e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1}})}render(){return h(FormFieldStateWrapper,Object.assign({key:"8738e92f0b999d05038113c7caa046fa90102c18"},this.getFormFieldProps()),h(InputContainerStateWrapperFc,{key:"1b064e2ef677917fde8cdebd955dfee4bd2f6158",state:this.state},h("span",{key:"fd08fd75d9247a2518306cb9cf8dc45554603e37",class:clsx("kol-input-container__filename",{"kol-input-container__filename--has-file":this.hasFileSelected})},this.filename),h(InputStateWrapper,Object.assign({key:"ddc43b11433cd252103555d049841b2c1a8156d1"},this.getInputProps())),h(KolButtonWcTag,{key:"87a541cdc62877c4225dfdda7ad8d7b4c8648ff8",class:"kol-input-container__button",_label:this.translateDataBrowseText,_buttonVariant:"primary",_disabled:this._disabled})))}constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.translateDataBrowseText=translate("kol-data-browse-text"),this.translateFilenameText=translate("kol-filename-text"),this.catchRef=e=>{this.inputRef=e},this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._multiple=!1,this._required=!1,this._tooltipAlign="top",this._touched=!1,this.filename=this.translateFilenameText,this.hasFileSelected=!1,this.state={_hideMsg:!1,_id:`id-${nonce()}`,_label:""},this.inputHasFocus=!1,this.onDragOver=e=>{var t,n,i;e.preventDefault(),null===(i=null===(n=null===(t=this.inputRef)||void 0===t?void 0:t.parentElement)||void 0===n?void 0:n.parentElement)||void 0===i||i.classList.add("kol-input-container--is-dragover")},this.onDragLeave=()=>{var e,t,n;null===(n=null===(t=null===(e=this.inputRef)||void 0===e?void 0:e.parentElement)||void 0===t?void 0:t.parentElement)||void 0===n||n.classList.remove("kol-input-container--is-dragover")},this.onDrop=e=>{var t,n,i,o;if(e.preventDefault(),null===(i=null===(n=null===(t=this.inputRef)||void 0===t?void 0:t.parentElement)||void 0===n?void 0:n.parentElement)||void 0===i||i.classList.remove("kol-input-container--is-dragover"),null===(o=e.dataTransfer)||void 0===o?void 0:o.files.length){const t=e.dataTransfer.files;this.filename=Array.from(t).map(e=>e.name).join(", "),this.controller.setFormAssociatedValue(t)}},this.onChange=e=>{if(this.inputRef instanceof HTMLInputElement&&"file"===this.inputRef.type){const t=this.inputRef.files;this.hasFileSelected=!!(null==t?void 0:t.length),this.filename=(null==t?void 0:t.length)?Array.from(t).map(e=>e.name).join(", "):this.translateFilenameText,this.controller.onFacade.onChange(e,t),this.controller.setFormAssociatedValue(t)}},this.onInput=e=>{if(this.inputRef instanceof HTMLInputElement&&"file"===this.inputRef.type){const t=this.inputRef.files;this.controller.onFacade.onInput(e,!1,t)}},this.controller=new InputFileController(this,"file",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccept(e){this.controller.validateAccept(e)}validateAccessKey(e){this.controller.validateAccessKey(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHideMsg(e){this.controller.validateHideMsg(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMsg(e){this.controller.validateMsg(e)}validateMultiple(e){this.controller.validateMultiple(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validateRequired(e){this.controller.validateRequired(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSmartButton(e){this.controller.validateSmartButton(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTouched(e){this.controller.validateTouched(e)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad()}componentDidLoad(){var e,t;const n=null===(t=null===(e=this.inputRef)||void 0===e?void 0:e.parentElement)||void 0===t?void 0:t.parentElement;null==n||n.addEventListener("dragover",this.onDragOver),null==n||n.addEventListener("dragleave",this.onDragLeave),null==n||n.addEventListener("drop",this.onDrop)}static get delegatesFocus(){return!0}get host(){return this}static get watchers(){return{_accept:["validateAccept"],_accessKey:["validateAccessKey"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_msg:["validateMsg"],_multiple:["validateMultiple"],_name:["validateName"],_on:["validateOn"],_required:["validateRequired"],_shortKey:["validateShortKey"],_smartButton:["validateSmartButton"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"]}}static get style(){return{default:defaultStyleCss}}},[305,"kol-input-file",{_accept:[1],_accessKey:[1,"_access-key"],_disabled:[4],_hideMsg:[4,"_hide-msg"],_hideLabel:[4,"_hide-label"],_hint:[1],_icons:[1],_id:[1],_label:[1],_msg:[1],_multiple:[4],_name:[1],_on:[16],_required:[4],_shortKey:[1,"_short-key"],_smartButton:[1,"_smart-button"],_syncValueBySelector:[1,"_sync-value-by-selector"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],filename:[32],hasFileSelected:[32],state:[32],inputHasFocus:[32],getValue:[64],kolFocus:[64],reset:[64]},void 0,{_accept:["validateAccept"],_accessKey:["validateAccessKey"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_msg:["validateMsg"],_multiple:["validateMultiple"],_name:["validateName"],_on:["validateOn"],_required:["validateRequired"],_shortKey:["validateShortKey"],_smartButton:["validateSmartButton"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-input-file"].forEach(e=>{if("kol-input-file"===e)customElements.get(e)||customElements.define(e,KolInputFile$1)})}const KolInputFile=KolInputFile$1,defineCustomElement=defineCustomElement$1;export{KolInputFile,defineCustomElement};
@@ -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{c as clsx}from"./clsx.js";import{F as FormFieldStateWrapper}from"./controller2.js";import{I as InputIconController,a as InputContainerStateWrapperFc}from"./controller-icon.js";import{I as InputStateWrapper}from"./InputStateWrapper.js";import{n as nonce}from"./dev.utils.js";import{p as propagateSubmitEventToForm}from"./controller.js";import"./common.js";import{v as validateAutoComplete}from"./auto-complete.js";import{v as validatePlaceholder}from"./placeholder.js";import{v as validateReadOnly}from"./read-only.js";import{v as validateRequired}from"./required.js";import{v as validateSuggestions}from"./suggestions.js";class InputNumberController extends InputIconController{constructor(e,t,n){super(e,t,n),this.component=e}validateAutoComplete(e){validateAutoComplete(this.component,e)}validateSuggestions(e){validateSuggestions(this.component,e)}validateMax(e){this.validateNumber("_max",e)}validateMin(e){this.validateNumber("_min",e)}validatePlaceholder(e){validatePlaceholder(this.component,e)}validateReadOnly(e){validateReadOnly(this.component,e)}validateRequired(e){validateRequired(this.component,e)}validateStep(e){this.validateNumber("_step",e)}validateValue(e){this.validateNumber("_value",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.validateSuggestions(this.component._suggestions),this.validatePlaceholder(this.component._placeholder),this.validateReadOnly(this.component._readOnly),this.validateRequired(this.component._required),this.validateStep(this.component._step),this.validateValue(this.component._value)}}const defaultStyleCss="/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\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 position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field {\n display: grid;\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text::after {\n content: \"*\";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: \"*\";\n }\n .kol-input-container {\n background-color: white;\n display: grid;\n width: 100%;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n grid-template-columns: 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--end) {\n grid-template-columns: 1fr auto;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start):has(> .kol-input-container__adornment--end) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-input {\n width: 100%;\n min-width: var(--a11y-min-size);\n }\n .kol-input:focus {\n outline: none;\n }\n}",KolInputNumber$1=proxyCustomElement(class extends HTMLElement{async getValue(){return this.remapValue(this.state._value)}async kolFocus(){var e;null===(e=this.inputRef)||void 0===e||e.focus()}setInitialValueType(e){this.controller.isNumberString(e)?this._initialValueType="NumberString":"number"!=typeof e||isNaN(e)?this._initialValueType="null":this._initialValueType="number"}remapValue(e){return null==e?null:"NumberString"===this._initialValueType?String(e):e}getFormFieldProps(){return{state:this.state,class:clsx("kol-input-number","number",{"has-value":this.state._hasValue}),tooltipAlign:this._tooltipAlign,onClick:()=>{var e;return null===(e=this.inputRef)||void 0===e?void 0:e.focus()},alert:this.showAsAlert()}}getInputProps(){return Object.assign(Object.assign({ref:this.catchRef,state:this.state,type:"number"},this.controller.onFacade),{onInput:this.onInput,onChange:this.onChange,onKeyDown:this.onKeyDown,onFocus:e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},onBlur:e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1}})}render(){return h(FormFieldStateWrapper,Object.assign({key:"4032102190ecfc2ca60bd96e9afeec6eaa9d3434"},this.getFormFieldProps()),h(InputContainerStateWrapperFc,{key:"e4b1ef3cb5a6f6b2d04f144477e10a7e324b832d",state:this.state},h(InputStateWrapper,Object.assign({key:"12be44bce8484f547242fc852b5fd5af14b2f0df"},this.getInputProps()))))}constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.catchRef=e=>{this.inputRef=e},this.onInput=e=>{var t;const n=null===(t=this.inputRef)||void 0===t?void 0:t.value;this._value=this.remapValue(""===n?null:Number(n)),this.controller.onFacade.onInput(e,!0,this._value)},this.onChange=e=>{var t;const n=null===(t=this.inputRef)||void 0===t?void 0:t.value,i=this.remapValue(""===n?null:Number(n));this.controller.onFacade.onChange(e,i)},this.onKeyDown=e=>{"Enter"!==e.code&&"NumpadEnter"!==e.code||propagateSubmitEventToForm({form:this.host})},this._autoComplete="off",this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._readOnly=!1,this._required=!1,this._tooltipAlign="top",this._touched=!1,this.state={_hasValue:!1,_hideMsg:!1,_id:`id-${nonce()}`,_label:"",_suggestions:[]},this._initialValueType="null",this.inputHasFocus=!1,this.controller=new InputNumberController(this,"number",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(e){this.controller.validateAccessKey(e)}validateAutoComplete(e){this.controller.validateAutoComplete(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHideMsg(e){this.controller.validateHideMsg(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMax(e){this.controller.validateMax(e)}validateMin(e){this.controller.validateMin(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validatePlaceholder(e){this.controller.validatePlaceholder(e)}validateReadOnly(e){this.controller.validateReadOnly(e)}validateRequired(e){this.controller.validateRequired(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSmartButton(e){this.controller.validateSmartButton(e)}validateSuggestions(e){this.controller.validateSuggestions(e)}validateStep(e){this.controller.validateStep(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e),null!=e&&this.setInitialValueType(e)}componentWillLoad(){void 0!==this._value&&this.setInitialValueType(this._value),this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener(e=>this.state._hasValue=!!e)}static get delegatesFocus(){return!0}get host(){return this}static get watchers(){return{_accessKey:["validateAccessKey"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_max:["validateMax"],_min:["validateMin"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_shortKey:["validateShortKey"],_smartButton:["validateSmartButton"],_suggestions:["validateSuggestions"],_step:["validateStep"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"]}}static get style(){return{default:defaultStyleCss}}},[305,"kol-input-number",{_accessKey:[1,"_access-key"],_autoComplete:[1,"_auto-complete"],_disabled:[4],_hideMsg:[4,"_hide-msg"],_hideLabel:[4,"_hide-label"],_hint:[1],_icons:[1],_id:[1],_label:[1],_max:[8],_min:[8],_msg:[1],_name:[1],_on:[16],_placeholder:[1],_readOnly:[4,"_read-only"],_required:[4],_shortKey:[1,"_short-key"],_smartButton:[1,"_smart-button"],_suggestions:[1],_step:[8],_syncValueBySelector:[1,"_sync-value-by-selector"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_value:[1544],state:[32],_initialValueType:[32],inputHasFocus:[32],getValue:[64],kolFocus:[64]},void 0,{_accessKey:["validateAccessKey"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_max:["validateMax"],_min:["validateMin"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_shortKey:["validateShortKey"],_smartButton:["validateSmartButton"],_suggestions:["validateSuggestions"],_step:["validateStep"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-input-number"].forEach(e=>{if("kol-input-number"===e)customElements.get(e)||customElements.define(e,KolInputNumber$1)})}const KolInputNumber=KolInputNumber$1,defineCustomElement=defineCustomElement$1;export{KolInputNumber,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{c as clsx}from"./clsx.js";import{F as FormFieldStateWrapper}from"./controller2.js";import{I as InputIconController,a as InputContainerStateWrapperFc}from"./controller-icon.js";import{I as InputStateWrapper}from"./InputStateWrapper.js";import{n as nonce}from"./dev.utils.js";import{p as propagateSubmitEventToForm}from"./controller.js";import"./common.js";import{v as validateAutoComplete}from"./auto-complete.js";import{v as validatePlaceholder}from"./placeholder.js";import{v as validateReadOnly}from"./read-only.js";import{v as validateRequired}from"./required.js";import{v as validateSuggestions}from"./suggestions.js";class InputNumberController extends InputIconController{constructor(e,t,n){super(e,t,n),this.component=e}validateAutoComplete(e){validateAutoComplete(this.component,e)}validateSuggestions(e){validateSuggestions(this.component,e)}validateMax(e){this.validateNumber("_max",e)}validateMin(e){this.validateNumber("_min",e)}validatePlaceholder(e){validatePlaceholder(this.component,e)}validateReadOnly(e){validateReadOnly(this.component,e)}validateRequired(e){validateRequired(this.component,e)}validateStep(e){this.validateNumber("_step",e)}validateValue(e){this.validateNumber("_value",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.validateSuggestions(this.component._suggestions),this.validatePlaceholder(this.component._placeholder),this.validateReadOnly(this.component._readOnly),this.validateRequired(this.component._required),this.validateStep(this.component._step),this.validateValue(this.component._value)}}const defaultStyleCss="/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\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 position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field {\n display: grid;\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text::after {\n content: \"*\";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: \"*\";\n }\n .kol-input-container {\n background-color: white;\n display: grid;\n width: 100%;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n grid-template-columns: 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--end) {\n grid-template-columns: 1fr auto;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start):has(> .kol-input-container__adornment--end) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-input {\n width: 100%;\n min-width: var(--a11y-min-size);\n }\n .kol-input:focus {\n outline: none;\n }\n}",KolInputNumber$1=proxyCustomElement(class extends HTMLElement{async getValue(){return this.remapValue(this.state._value)}async kolFocus(){var e;null===(e=this.inputRef)||void 0===e||e.focus()}setInitialValueType(e){this.controller.isNumberString(e)?this._initialValueType="NumberString":"number"!=typeof e||isNaN(e)?this._initialValueType="null":this._initialValueType="number"}remapValue(e){return null==e?null:"NumberString"===this._initialValueType?String(e):e}getFormFieldProps(){return{state:this.state,class:clsx("kol-input-number","number",{"has-value":this.state._hasValue}),tooltipAlign:this._tooltipAlign,onClick:()=>{var e;return null===(e=this.inputRef)||void 0===e?void 0:e.focus()},alert:this.showAsAlert()}}getInputProps(){return Object.assign(Object.assign({ref:this.catchRef,state:this.state,type:"number"},this.controller.onFacade),{onInput:this.onInput,onChange:this.onChange,onKeyDown:this.onKeyDown,onFocus:e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},onBlur:e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1}})}render(){return h(FormFieldStateWrapper,Object.assign({key:"57c9721438188322c18a747aaa3bd507f2b9c7df"},this.getFormFieldProps()),h(InputContainerStateWrapperFc,{key:"ab59888ffb499fc6b0b26e26c2cf114369563c65",state:this.state},h(InputStateWrapper,Object.assign({key:"b73262d350a2725c32ef00386c910633c4dec284"},this.getInputProps()))))}constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.catchRef=e=>{this.inputRef=e},this.onInput=e=>{var t;const n=null===(t=this.inputRef)||void 0===t?void 0:t.value;this._value=this.remapValue(""===n?null:Number(n)),this.controller.onFacade.onInput(e,!0,this._value)},this.onChange=e=>{var t;const n=null===(t=this.inputRef)||void 0===t?void 0:t.value,i=this.remapValue(""===n?null:Number(n));this.controller.onFacade.onChange(e,i)},this.onKeyDown=e=>{"Enter"!==e.code&&"NumpadEnter"!==e.code||propagateSubmitEventToForm({form:this.host})},this._autoComplete="off",this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._readOnly=!1,this._required=!1,this._tooltipAlign="top",this._touched=!1,this.state={_hasValue:!1,_hideMsg:!1,_id:`id-${nonce()}`,_label:"",_suggestions:[]},this._initialValueType="null",this.inputHasFocus=!1,this.controller=new InputNumberController(this,"number",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(e){this.controller.validateAccessKey(e)}validateAutoComplete(e){this.controller.validateAutoComplete(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHideMsg(e){this.controller.validateHideMsg(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMax(e){this.controller.validateMax(e)}validateMin(e){this.controller.validateMin(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validatePlaceholder(e){this.controller.validatePlaceholder(e)}validateReadOnly(e){this.controller.validateReadOnly(e)}validateRequired(e){this.controller.validateRequired(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSmartButton(e){this.controller.validateSmartButton(e)}validateSuggestions(e){this.controller.validateSuggestions(e)}validateStep(e){this.controller.validateStep(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e),null!=e&&this.setInitialValueType(e)}componentWillLoad(){void 0!==this._value&&this.setInitialValueType(this._value),this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener(e=>this.state._hasValue=!!e)}static get delegatesFocus(){return!0}get host(){return this}static get watchers(){return{_accessKey:["validateAccessKey"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_max:["validateMax"],_min:["validateMin"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_shortKey:["validateShortKey"],_smartButton:["validateSmartButton"],_suggestions:["validateSuggestions"],_step:["validateStep"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"]}}static get style(){return{default:defaultStyleCss}}},[305,"kol-input-number",{_accessKey:[1,"_access-key"],_autoComplete:[1,"_auto-complete"],_disabled:[4],_hideMsg:[4,"_hide-msg"],_hideLabel:[4,"_hide-label"],_hint:[1],_icons:[1],_id:[1],_label:[1],_max:[8],_min:[8],_msg:[1],_name:[1],_on:[16],_placeholder:[1],_readOnly:[4,"_read-only"],_required:[4],_shortKey:[1,"_short-key"],_smartButton:[1,"_smart-button"],_suggestions:[1],_step:[8],_syncValueBySelector:[1,"_sync-value-by-selector"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_value:[1544],state:[32],_initialValueType:[32],inputHasFocus:[32],getValue:[64],kolFocus:[64]},void 0,{_accessKey:["validateAccessKey"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_max:["validateMax"],_min:["validateMin"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_shortKey:["validateShortKey"],_smartButton:["validateSmartButton"],_suggestions:["validateSuggestions"],_step:["validateStep"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-input-number"].forEach(e=>{if("kol-input-number"===e)customElements.get(e)||customElements.define(e,KolInputNumber$1)})}const KolInputNumber=KolInputNumber$1,defineCustomElement=defineCustomElement$1;export{KolInputNumber,defineCustomElement};
@@ -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{c as clsx}from"./clsx.js";import{l as devHint}from"./common.js";import{F as FormFieldStateWrapper}from"./controller2.js";import{K as KolIconButtonFc,a as InputContainerStateWrapperFc}from"./controller-icon.js";import{I as InputStateWrapper}from"./InputStateWrapper.js";import{t as translate}from"./i18n.js";import{n as nonce}from"./dev.utils.js";import{p as propagateSubmitEventToForm}from"./controller.js";import{I as InputPasswordController}from"./controller5.js";const defaultStyleCss="/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\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 position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field {\n display: grid;\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text::after {\n content: \"*\";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: \"*\";\n }\n .kol-input-container {\n background-color: white;\n display: grid;\n width: 100%;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n grid-template-columns: 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--end) {\n grid-template-columns: 1fr auto;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start):has(> .kol-input-container__adornment--end) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-input {\n width: 100%;\n min-width: var(--a11y-min-size);\n }\n .kol-input:focus {\n outline: none;\n }\n .kol-input-password {\n --kol-tooltip-width: calc(160 * 1rem / var(--kolibri-root-font-size, 16));\n }\n}",KolInputPassword$1=proxyCustomElement(class extends HTMLElement{async getValue(){var e;return null===(e=this.inputRef)||void 0===e?void 0:e.value}async kolFocus(){var e;null===(e=this.inputRef)||void 0===e||e.focus()}getFormFieldProps(){return{state:this.state,class:clsx("kol-input-password","password",{"has-value":this.state._hasValue,"kol-form-field--has-counter":this.controller.hasSoftCharacterLimit()||this.controller.hasCounter()}),tooltipAlign:this._tooltipAlign,onClick:()=>{var e;return null===(e=this.inputRef)||void 0===e?void 0:e.focus()},alert:this.showAsAlert()}}getInputProps(){const e="number"==typeof this.state._maxLength?[`${this.state._id}-character-limit-hint`]:void 0;return Object.assign(Object.assign({ref:this.catchRef,type:this._passwordVisible?"text":"password",state:this.state,ariaDescribedBy:e},this.controller.onFacade),{onInput:this.onInput,onKeyDown:this.onKeyDown,onFocus:e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},onBlur:e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1}})}getShowPasswordButton(){return"visibility-toggle"!==this._variant?null:h(KolIconButtonFc,{componentName:"button",class:"kol-input-password__password-toggle-button","data-testid":"kol-input-password-toggle-button",label:this._passwordVisible?this.translateHidePassword:this.translateShowPassword,buttonVariant:"ghost",onClick:()=>{var e;this._passwordVisible=!this._passwordVisible,null===(e=this.inputRef)||void 0===e||e.focus()},icon:"codicon codicon-eye-"+(this._passwordVisible?"closed":"watch"),disabled:this._disabled})}render(){return h(FormFieldStateWrapper,Object.assign({key:"844d0d658946f85e58c537dc3049ea34abeabe60"},this.getFormFieldProps()),h(InputContainerStateWrapperFc,{key:"2b390c722de4b9e6f2c7c89ea469cd2970e52f54",state:this.state,endAdornment:this.getShowPasswordButton()},h(InputStateWrapper,Object.assign({key:"e12ca7840b5e0d9589cce15fd4f8ddf676cf0434"},this.getInputProps()))))}constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.translateHidePassword=translate("kol-hide-password"),this.translateShowPassword=translate("kol-show-password"),this.catchRef=e=>{this.inputRef=e},this.onKeyDown=e=>{"Enter"!==e.code&&"NumpadEnter"!==e.code||propagateSubmitEventToForm({form:this.host})},this.onInput=e=>{this._value=e.target.value,this.controller.onFacade.onInput(e)},this._autoComplete="off",this._hasCounter=!1,this._maxLengthBehavior="hard",this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._readOnly=!1,this._required=!1,this._tooltipAlign="top",this._touched=!1,this._variant="default",this.state={_currentLength:0,_currentLengthDebounced:0,_hasValue:!1,_hideMsg:!1,_id:`id-${nonce()}`,_label:"",_variant:"default"},this._passwordVisible=!1,this.inputHasFocus=!1,this.controller=new InputPasswordController(this,"password",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(e){this.controller.validateAccessKey(e)}validateAutoComplete(e){this.controller.validateAutoComplete(e),"on"===e&&devHint("[KolInputPassword] The 'autocomplete' option should not be set to \"on\" for a password input field")}validateMaxLengthBehavior(e){this.controller.validateMaxLengthBehavior(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateVariant(e){this.controller.validateVariant(e)}validateHideMsg(e){this.controller.validateHideMsg(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHasCounter(e){this.controller.validateHasCounter(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMaxLength(e){this.controller.validateMaxLength(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validatePattern(e){this.controller.validatePattern(e)}validatePlaceholder(e){this.controller.validatePlaceholder(e)}validateReadOnly(e){this.controller.validateReadOnly(e)}validateRequired(e){this.controller.validateRequired(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSmartButton(e){this.controller.validateSmartButton(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener(e=>this.state._hasValue=!!e)}static get delegatesFocus(){return!0}get host(){return this}static get watchers(){return{_accessKey:["validateAccessKey"],_autoComplete:["validateAutoComplete"],_maxLengthBehavior:["validateMaxLengthBehavior"],_disabled:["validateDisabled"],_variant:["validateVariant"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hasCounter:["validateHasCounter"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_maxLength:["validateMaxLength"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_pattern:["validatePattern"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_shortKey:["validateShortKey"],_smartButton:["validateSmartButton"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"]}}static get style(){return{default:defaultStyleCss}}},[305,"kol-input-password",{_accessKey:[1,"_access-key"],_autoComplete:[1,"_auto-complete"],_hasCounter:[4,"_has-counter"],_maxLengthBehavior:[1,"_max-length-behavior"],_disabled:[4],_hideMsg:[4,"_hide-msg"],_hideLabel:[4,"_hide-label"],_hint:[1],_icons:[1],_id:[1],_label:[1],_maxLength:[2,"_max-length"],_msg:[1],_name:[1],_on:[16],_pattern:[1],_placeholder:[1],_readOnly:[4,"_read-only"],_required:[4],_shortKey:[1,"_short-key"],_smartButton:[1,"_smart-button"],_syncValueBySelector:[1,"_sync-value-by-selector"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_value:[1537],_variant:[1],state:[32],_passwordVisible:[32],inputHasFocus:[32],getValue:[64],kolFocus:[64]},void 0,{_accessKey:["validateAccessKey"],_autoComplete:["validateAutoComplete"],_maxLengthBehavior:["validateMaxLengthBehavior"],_disabled:["validateDisabled"],_variant:["validateVariant"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hasCounter:["validateHasCounter"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_maxLength:["validateMaxLength"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_pattern:["validatePattern"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_shortKey:["validateShortKey"],_smartButton:["validateSmartButton"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-input-password"].forEach(e=>{if("kol-input-password"===e)customElements.get(e)||customElements.define(e,KolInputPassword$1)})}const KolInputPassword=KolInputPassword$1,defineCustomElement=defineCustomElement$1;export{KolInputPassword,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{c as clsx}from"./clsx.js";import{l as devHint}from"./common.js";import{F as FormFieldStateWrapper}from"./controller2.js";import{K as KolIconButtonFc,a as InputContainerStateWrapperFc}from"./controller-icon.js";import{I as InputStateWrapper}from"./InputStateWrapper.js";import{t as translate}from"./i18n.js";import{n as nonce}from"./dev.utils.js";import{p as propagateSubmitEventToForm}from"./controller.js";import{I as InputPasswordController}from"./controller5.js";const defaultStyleCss="/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\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 position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field {\n display: grid;\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text::after {\n content: \"*\";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: \"*\";\n }\n .kol-input-container {\n background-color: white;\n display: grid;\n width: 100%;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n grid-template-columns: 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--end) {\n grid-template-columns: 1fr auto;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start):has(> .kol-input-container__adornment--end) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-input {\n width: 100%;\n min-width: var(--a11y-min-size);\n }\n .kol-input:focus {\n outline: none;\n }\n .kol-input-password {\n --kol-tooltip-width: calc(160 * 1rem / var(--kolibri-root-font-size, 16));\n }\n}",KolInputPassword$1=proxyCustomElement(class extends HTMLElement{async getValue(){var e;return null===(e=this.inputRef)||void 0===e?void 0:e.value}async kolFocus(){var e;null===(e=this.inputRef)||void 0===e||e.focus()}getFormFieldProps(){return{state:this.state,class:clsx("kol-input-password","password",{"has-value":this.state._hasValue,"kol-form-field--has-counter":this.controller.hasSoftCharacterLimit()||this.controller.hasCounter()}),tooltipAlign:this._tooltipAlign,onClick:()=>{var e;return null===(e=this.inputRef)||void 0===e?void 0:e.focus()},alert:this.showAsAlert()}}getInputProps(){const e="number"==typeof this.state._maxLength?[`${this.state._id}-character-limit-hint`]:void 0;return Object.assign(Object.assign({ref:this.catchRef,type:this._passwordVisible?"text":"password",state:this.state,ariaDescribedBy:e},this.controller.onFacade),{onInput:this.onInput,onKeyDown:this.onKeyDown,onFocus:e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},onBlur:e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1}})}getShowPasswordButton(){return"visibility-toggle"!==this._variant?null:h(KolIconButtonFc,{componentName:"button",class:"kol-input-password__password-toggle-button","data-testid":"kol-input-password-toggle-button",label:this._passwordVisible?this.translateHidePassword:this.translateShowPassword,buttonVariant:"ghost",onClick:()=>{var e;this._passwordVisible=!this._passwordVisible,null===(e=this.inputRef)||void 0===e||e.focus()},icon:"codicon codicon-eye-"+(this._passwordVisible?"closed":"watch"),disabled:this._disabled})}render(){return h(FormFieldStateWrapper,Object.assign({key:"997f60c667db700fc52520aa61a8cb9503e7279e"},this.getFormFieldProps()),h(InputContainerStateWrapperFc,{key:"4e114f5b187b9699eb30e7a8f8b7744c2b629a0e",state:this.state,endAdornment:this.getShowPasswordButton()},h(InputStateWrapper,Object.assign({key:"43b24bb89b526e4bf7b3c70ec8228fbe9d3cd3ad"},this.getInputProps()))))}constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.translateHidePassword=translate("kol-hide-password"),this.translateShowPassword=translate("kol-show-password"),this.catchRef=e=>{this.inputRef=e},this.onKeyDown=e=>{"Enter"!==e.code&&"NumpadEnter"!==e.code||propagateSubmitEventToForm({form:this.host})},this.onInput=e=>{this._value=e.target.value,this.controller.onFacade.onInput(e)},this._autoComplete="off",this._hasCounter=!1,this._maxLengthBehavior="hard",this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._readOnly=!1,this._required=!1,this._tooltipAlign="top",this._touched=!1,this._variant="default",this.state={_currentLength:0,_currentLengthDebounced:0,_hasValue:!1,_hideMsg:!1,_id:`id-${nonce()}`,_label:"",_variant:"default"},this._passwordVisible=!1,this.inputHasFocus=!1,this.controller=new InputPasswordController(this,"password",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(e){this.controller.validateAccessKey(e)}validateAutoComplete(e){this.controller.validateAutoComplete(e),"on"===e&&devHint("[KolInputPassword] The 'autocomplete' option should not be set to \"on\" for a password input field")}validateMaxLengthBehavior(e){this.controller.validateMaxLengthBehavior(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateVariant(e){this.controller.validateVariant(e)}validateHideMsg(e){this.controller.validateHideMsg(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHasCounter(e){this.controller.validateHasCounter(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMaxLength(e){this.controller.validateMaxLength(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validatePattern(e){this.controller.validatePattern(e)}validatePlaceholder(e){this.controller.validatePlaceholder(e)}validateReadOnly(e){this.controller.validateReadOnly(e)}validateRequired(e){this.controller.validateRequired(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSmartButton(e){this.controller.validateSmartButton(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener(e=>this.state._hasValue=!!e)}static get delegatesFocus(){return!0}get host(){return this}static get watchers(){return{_accessKey:["validateAccessKey"],_autoComplete:["validateAutoComplete"],_maxLengthBehavior:["validateMaxLengthBehavior"],_disabled:["validateDisabled"],_variant:["validateVariant"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hasCounter:["validateHasCounter"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_maxLength:["validateMaxLength"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_pattern:["validatePattern"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_shortKey:["validateShortKey"],_smartButton:["validateSmartButton"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"]}}static get style(){return{default:defaultStyleCss}}},[305,"kol-input-password",{_accessKey:[1,"_access-key"],_autoComplete:[1,"_auto-complete"],_hasCounter:[4,"_has-counter"],_maxLengthBehavior:[1,"_max-length-behavior"],_disabled:[4],_hideMsg:[4,"_hide-msg"],_hideLabel:[4,"_hide-label"],_hint:[1],_icons:[1],_id:[1],_label:[1],_maxLength:[2,"_max-length"],_msg:[1],_name:[1],_on:[16],_pattern:[1],_placeholder:[1],_readOnly:[4,"_read-only"],_required:[4],_shortKey:[1,"_short-key"],_smartButton:[1,"_smart-button"],_syncValueBySelector:[1,"_sync-value-by-selector"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_value:[1537],_variant:[1],state:[32],_passwordVisible:[32],inputHasFocus:[32],getValue:[64],kolFocus:[64]},void 0,{_accessKey:["validateAccessKey"],_autoComplete:["validateAutoComplete"],_maxLengthBehavior:["validateMaxLengthBehavior"],_disabled:["validateDisabled"],_variant:["validateVariant"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hasCounter:["validateHasCounter"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_maxLength:["validateMaxLength"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_pattern:["validatePattern"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_shortKey:["validateShortKey"],_smartButton:["validateSmartButton"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-input-password"].forEach(e=>{if("kol-input-password"===e)customElements.get(e)||customElements.define(e,KolInputPassword$1)})}const KolInputPassword=KolInputPassword$1,defineCustomElement=defineCustomElement$1;export{KolInputPassword,defineCustomElement};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{h,proxyCustomElement,HTMLElement}from"@stencil/core/internal/client";import{c as clsx}from"./clsx.js";import{n as nonce}from"./dev.utils.js";import{p as propagateSubmitEventToForm}from"./controller.js";import{a as InputRadioController}from"./controller3.js";import{F as FieldControlStateWrapper}from"./FieldControlStateWrapper.js";import{c as checkHasMsg,g as getRenderStates,F as FormFieldStateWrapper}from"./controller2.js";import{_ as __rest}from"./tslib.es6.js";import{I as InputFc}from"./Input.js";import"./common.js";const InputWrapperFc=e=>{var{class:n}=e,t=__rest(e,["class"]);return h(InputFc,Object.assign({class:clsx("kol-input-radio__input",n)},t,{type:"radio"}))},RadioFc=e=>{var n,{class:t,inputProps:i}=e,o=__rest(e,["class","inputProps"]);const l=checkHasMsg(null==i?void 0:i.msg,null==i?void 0:i.touched),a="string"==typeof(null==i?void 0:i.msg)?"error":null===(n=null==i?void 0:i.msg)||void 0===n?void 0:n._type,r={"kol-input-radio--checked":null==i?void 0:i.checked,"kol-input-radio--disabled":Boolean(null==i?void 0:i.disabled),"kol-input-radio--required":Boolean(null==i?void 0:i.required),"kol-input-radio--touched":Boolean(null==i?void 0:i.touched),[`kol-input-radio--${a||"error"}`]:Boolean(l)};return h("label",Object.assign({class:clsx("kol-input-radio",r,t)},o),h(InputWrapperFc,Object.assign({},i)))};function getRadioProps(e,n={}){const{ariaDescribedBy:t}=getRenderStates(e),i={id:e._id,hideLabel:e._hideLabel,label:e._label,value:e._value,disabled:e._disabled,name:e._name,ariaDescribedBy:t};return"_required"in e&&(i.required=e._required),"_touched"in e&&(i.touched=e._touched),"_msg"in e&&(i.msg=e._msg),Object.assign(Object.assign({},i),n)}const RadioStateWrapper=e=>{var{state:n,inputProps:t}=e,i=__rest(e,["state","inputProps"]);return h(RadioFc,Object.assign({inputProps:getRadioProps(n,t)},i))},defaultStyleCss='/* forward the rem function */\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type=\'checkbox\'], [type=\'radio\'], [type=\'range\']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\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 position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-field-control {\n display: grid;\n min-height: var(--a11y-min-size);\n align-items: center;\n justify-content: left;\n grid-template-areas: "input label";\n grid-template-columns: auto 1fr;\n grid-template-rows: auto;\n }\n .kol-field-control:has(.kol-field-control__hint) {\n grid-template-areas: "input label" "hint hint";\n grid-template-columns: auto 1fr;\n grid-template-rows: auto auto;\n }\n .kol-field-control--label-align-left:not(.kol-field-control--hide-label) {\n grid-template-areas: "label input";\n grid-template-columns: 1fr auto;\n grid-template-rows: auto;\n }\n .kol-field-control--label-align-left:not(.kol-field-control--hide-label):has(.kol-field-control__hint) {\n grid-template-areas: "label input" "hint hint";\n grid-template-columns: 1fr auto;\n grid-template-rows: auto auto;\n }\n .kol-field-control__input {\n display: flex;\n min-height: var(--a11y-min-size);\n align-items: center;\n grid-area: input;\n }\n .kol-field-control__label {\n display: flex;\n min-height: var(--a11y-min-size);\n flex-grow: 1;\n align-items: center;\n cursor: pointer;\n grid-area: label;\n }\n .kol-field-control__label--visually-hidden {\n height: 0;\n margin: 0;\n padding: 0;\n visibility: hidden;\n }\n .kol-field-control__label-text::after {\n content: "";\n }\n .kol-field-control__tooltip .span-label::after {\n content: "";\n }\n .kol-field-control__hint {\n grid-area: hint;\n }\n .kol-field-control--disabled .kol-field-control__label {\n opacity: 0.5;\n cursor: not-allowed;\n }\n .kol-field-control--required .kol-field-control__label-text::after {\n content: "*";\n }\n .kol-field-control--required .kol-field-control__tooltip .span-label::after {\n content: "*";\n }\n .kol-form-field {\n display: grid;\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text::after {\n content: "*";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: "*";\n }\n .kol-input-container {\n background-color: white;\n display: grid;\n width: 100%;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n grid-template-columns: 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--end) {\n grid-template-columns: 1fr auto;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start):has(> .kol-input-container__adornment--end) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-form-field {\n --border-width: 2px;\n --input-size: 1.5em;\n }\n .kol-form-field__label {\n display: contents;\n }\n .kol-form-field__input {\n display: flex;\n flex-direction: column;\n }\n .kol-form-field__input--orientation-horizontal {\n flex-direction: row;\n flex-wrap: wrap;\n align-items: flex-start;\n }\n .kol-form-field--disabled {\n opacity: unset;\n }\n .kol-input-radio {\n display: flex;\n position: relative;\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n align-items: center;\n justify-content: center;\n cursor: pointer;\n }\n .kol-input-radio__input {\n border-style: solid;\n border-radius: 100%;\n display: flex;\n width: var(--input-size);\n min-width: var(--input-size);\n height: var(--input-size);\n min-height: var(--input-size);\n margin: 0;\n padding: 0;\n border-width: var(--border-width);\n appearance: none;\n cursor: pointer;\n }\n .kol-input-radio__input:before {\n border-radius: 100%;\n width: calc(var(--input-size) / 2);\n height: calc(var(--input-size) / 2);\n margin: auto;\n content: "";\n }\n .kol-input-radio__input:checked:before {\n background-color: #000;\n }\n @media (forced-colors: active) {\n .kol-input-radio__input:checked:before {\n /* Give it a visible background in forced colors mode */\n background-color: selectedItem !important;\n }\n }\n .kol-input-radio__input:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n .kol-input-radio--disabled {\n cursor: not-allowed;\n }\n}',KolInputRadio$1=proxyCustomElement(class extends HTMLElement{async getValue(){return this._value}async kolFocus(){var e;null===(e=this.inputRef)||void 0===e||e.focus()}getFormFieldProps(){return{state:this.state,component:"fieldset",disabled:Boolean(this.state._disabled),class:clsx("kol-form-field--radio"),formFieldLabelProps:{component:"legend",class:"kol-form-field__label--legend"},formFieldInputProps:{class:`kol-form-field__input--orientation-${this.state._orientation}`},tooltipAlign:this._tooltipAlign,alert:this.showAsAlert(),hideLabel:!1}}render(){return h(FormFieldStateWrapper,Object.assign({key:"91ce97ca53a9c7c195bcd7108992ecf4a74940a0"},this.getFormFieldProps()),this.state._options.map((e,n)=>this.renderOption(e,n)))}calculateDisabled(e){return Boolean(this.state._disabled)||Boolean(e.disabled)}getOptionProps(e,n){return{state:this.state,id:n,hint:e.hint,label:e.label,required:!1,fieldControlLabelProps:{showBadge:!1},disabled:this.calculateDisabled(e)}}getInputProps(e,n,t,i){return{state:this.state,inputProps:Object.assign(Object.assign({id:n,ref:this.state._value===e.value?this.catchRef:void 0,"aria-label":this.state._hideLabel&&"string"==typeof e.label?e.label:void 0,type:"radio",name:this.state._name||this.state._id,value:`-${t}`,checked:i,disabled:this.calculateDisabled(e)},this.controller.onFacade),{onChange:this.onChange,onClick:void 0,onInput:this.onInput,onKeyDown:this.onKeyDown.bind(this),onFocus:e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},onBlur:e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1}})}}renderOption(e,n){const t=`${this.state._id}-${n}`,i=this.state._value===e.value;return h(FieldControlStateWrapper,Object.assign({key:t},this.getOptionProps(e,t)),h(RadioStateWrapper,Object.assign({},this.getInputProps(e,t,n,i))))}constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.catchRef=e=>{this.inputRef=e},this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._orientation="vertical",this._required=!1,this._tooltipAlign="top",this._touched=!1,this._value=null,this.state={_hideMsg:!1,_id:`id-${nonce()}`,_label:"",_options:[],_orientation:"vertical"},this.inputHasFocus=!1,this.onInput=e=>{if(e.target instanceof HTMLInputElement){const n=this.controller.getOptionByKey(e.target.value);void 0!==n&&this.controller.onFacade.onInput(e,!0,n.value)}},this.onChange=e=>{if(e.target instanceof HTMLInputElement){const n=this.controller.getOptionByKey(e.target.value);void 0!==n&&(this.controller.onFacade.onChange(e,n.value),this._value=n.value)}},this.onKeyDown=e=>{"Enter"!==e.code&&"NumpadEnter"!==e.code||propagateSubmitEventToForm({form:this.host})},this.controller=new InputRadioController(this,"radio",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateTooltipAlign(e){this.controller.validateTooltipAlign(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHideMsg(e){this.controller.validateHideMsg(e)}validateHint(e){this.controller.validateHint(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validateOptions(e){this.controller.validateOptions(e)}validateOrientation(e){this.controller.validateOrientation(e)}validateRequired(e){this.controller.validateRequired(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad()}static get delegatesFocus(){return!0}get host(){return this}static get watchers(){return{_tooltipAlign:["validateTooltipAlign"],_disabled:["validateDisabled"],_hideLabel:["validateHideLabel"],_hideMsg:["validateHideMsg"],_hint:["validateHint"],_id:["validateId"],_label:["validateLabel"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_options:["validateOptions"],_orientation:["validateOrientation"],_required:["validateRequired"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"]}}static get style(){return{default:defaultStyleCss}}},[305,"kol-input-radio",{_disabled:[4],_hideMsg:[4,"_hide-msg"],_hideLabel:[4,"_hide-label"],_hint:[1],_id:[1],_label:[1],_msg:[1],_name:[1],_on:[16],_options:[1],_orientation:[1],_required:[4],_syncValueBySelector:[1,"_sync-value-by-selector"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_value:[1544],state:[32],inputHasFocus:[32],getValue:[64],kolFocus:[64]},void 0,{_tooltipAlign:["validateTooltipAlign"],_disabled:["validateDisabled"],_hideLabel:["validateHideLabel"],_hideMsg:["validateHideMsg"],_hint:["validateHint"],_id:["validateId"],_label:["validateLabel"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_options:["validateOptions"],_orientation:["validateOrientation"],_required:["validateRequired"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-input-radio"].forEach(e=>{if("kol-input-radio"===e)customElements.get(e)||customElements.define(e,KolInputRadio$1)})}const KolInputRadio=KolInputRadio$1,defineCustomElement=defineCustomElement$1;export{KolInputRadio,defineCustomElement};
4
+ import{h,proxyCustomElement,HTMLElement}from"@stencil/core/internal/client";import{c as clsx}from"./clsx.js";import{n as nonce}from"./dev.utils.js";import{p as propagateSubmitEventToForm}from"./controller.js";import{a as InputRadioController}from"./controller3.js";import{F as FieldControlStateWrapper}from"./FieldControlStateWrapper.js";import{c as checkHasMsg,g as getRenderStates,F as FormFieldStateWrapper}from"./controller2.js";import{_ as __rest}from"./tslib.es6.js";import{I as InputFc}from"./Input.js";import"./common.js";const InputWrapperFc=e=>{var{class:n}=e,t=__rest(e,["class"]);return h(InputFc,Object.assign({class:clsx("kol-input-radio__input",n)},t,{type:"radio"}))},RadioFc=e=>{var n,{class:t,inputProps:i}=e,o=__rest(e,["class","inputProps"]);const l=checkHasMsg(null==i?void 0:i.msg,null==i?void 0:i.touched),a="string"==typeof(null==i?void 0:i.msg)?"error":null===(n=null==i?void 0:i.msg)||void 0===n?void 0:n._type,r={"kol-input-radio--checked":null==i?void 0:i.checked,"kol-input-radio--disabled":Boolean(null==i?void 0:i.disabled),"kol-input-radio--required":Boolean(null==i?void 0:i.required),"kol-input-radio--touched":Boolean(null==i?void 0:i.touched),[`kol-input-radio--${a||"error"}`]:Boolean(l)};return h("label",Object.assign({class:clsx("kol-input-radio",r,t)},o),h(InputWrapperFc,Object.assign({},i)))};function getRadioProps(e,n={}){const{ariaDescribedBy:t}=getRenderStates(e),i={id:e._id,hideLabel:e._hideLabel,label:e._label,value:e._value,disabled:e._disabled,name:e._name,ariaDescribedBy:t};return"_required"in e&&(i.required=e._required),"_touched"in e&&(i.touched=e._touched),"_msg"in e&&(i.msg=e._msg),Object.assign(Object.assign({},i),n)}const RadioStateWrapper=e=>{var{state:n,inputProps:t}=e,i=__rest(e,["state","inputProps"]);return h(RadioFc,Object.assign({inputProps:getRadioProps(n,t)},i))},defaultStyleCss='/* forward the rem function */\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type=\'checkbox\'], [type=\'radio\'], [type=\'range\']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\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 position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-field-control {\n display: grid;\n min-height: var(--a11y-min-size);\n align-items: center;\n justify-content: left;\n grid-template-areas: "input label";\n grid-template-columns: auto 1fr;\n grid-template-rows: auto;\n }\n .kol-field-control:has(.kol-field-control__hint) {\n grid-template-areas: "input label" "hint hint";\n grid-template-columns: auto 1fr;\n grid-template-rows: auto auto;\n }\n .kol-field-control--label-align-left:not(.kol-field-control--hide-label) {\n grid-template-areas: "label input";\n grid-template-columns: 1fr auto;\n grid-template-rows: auto;\n }\n .kol-field-control--label-align-left:not(.kol-field-control--hide-label):has(.kol-field-control__hint) {\n grid-template-areas: "label input" "hint hint";\n grid-template-columns: 1fr auto;\n grid-template-rows: auto auto;\n }\n .kol-field-control__input {\n display: flex;\n min-height: var(--a11y-min-size);\n align-items: center;\n grid-area: input;\n }\n .kol-field-control__label {\n display: flex;\n min-height: var(--a11y-min-size);\n flex-grow: 1;\n align-items: center;\n cursor: pointer;\n grid-area: label;\n }\n .kol-field-control__label--visually-hidden {\n height: 0;\n margin: 0;\n padding: 0;\n visibility: hidden;\n }\n .kol-field-control__label-text::after {\n content: "";\n }\n .kol-field-control__tooltip .span-label::after {\n content: "";\n }\n .kol-field-control__hint {\n grid-area: hint;\n }\n .kol-field-control--disabled .kol-field-control__label {\n opacity: 0.5;\n cursor: not-allowed;\n }\n .kol-field-control--required .kol-field-control__label-text::after {\n content: "*";\n }\n .kol-field-control--required .kol-field-control__tooltip .span-label::after {\n content: "*";\n }\n .kol-form-field {\n display: grid;\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text::after {\n content: "*";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: "*";\n }\n .kol-input-container {\n background-color: white;\n display: grid;\n width: 100%;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n grid-template-columns: 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--end) {\n grid-template-columns: 1fr auto;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start):has(> .kol-input-container__adornment--end) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-form-field {\n --border-width: 2px;\n --input-size: 1.5em;\n }\n .kol-form-field__label {\n display: contents;\n }\n .kol-form-field__input {\n display: flex;\n flex-direction: column;\n }\n .kol-form-field__input--orientation-horizontal {\n flex-direction: row;\n flex-wrap: wrap;\n align-items: flex-start;\n }\n .kol-form-field--disabled {\n opacity: unset;\n }\n .kol-input-radio {\n display: flex;\n position: relative;\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n align-items: center;\n justify-content: center;\n cursor: pointer;\n }\n .kol-input-radio__input {\n border-style: solid;\n border-radius: 100%;\n display: flex;\n width: var(--input-size);\n min-width: var(--input-size);\n height: var(--input-size);\n min-height: var(--input-size);\n margin: 0;\n padding: 0;\n border-width: var(--border-width);\n appearance: none;\n cursor: pointer;\n }\n .kol-input-radio__input:before {\n border-radius: 100%;\n width: calc(var(--input-size) / 2);\n height: calc(var(--input-size) / 2);\n margin: auto;\n content: "";\n }\n .kol-input-radio__input:checked:before {\n background-color: #000;\n }\n @media (forced-colors: active) {\n .kol-input-radio__input:checked:before {\n /* Give it a visible background in forced colors mode */\n background-color: selectedItem !important;\n }\n }\n .kol-input-radio__input:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n .kol-input-radio--disabled {\n cursor: not-allowed;\n }\n}',KolInputRadio$1=proxyCustomElement(class extends HTMLElement{async getValue(){return this._value}async kolFocus(){var e;null===(e=this.inputRef)||void 0===e||e.focus()}getFormFieldProps(){return{state:this.state,component:"fieldset",disabled:Boolean(this.state._disabled),class:clsx("kol-form-field--radio"),formFieldLabelProps:{component:"legend",class:"kol-form-field__label--legend"},formFieldInputProps:{class:`kol-form-field__input--orientation-${this.state._orientation}`},tooltipAlign:this._tooltipAlign,alert:this.showAsAlert(),hideLabel:!1}}render(){return h(FormFieldStateWrapper,Object.assign({key:"d6a448927779793795b7df75b11f6845005230cd"},this.getFormFieldProps()),this.state._options.map((e,n)=>this.renderOption(e,n)))}calculateDisabled(e){return Boolean(this.state._disabled)||Boolean(e.disabled)}getOptionProps(e,n){return{state:this.state,id:n,hint:e.hint,label:e.label,required:!1,fieldControlLabelProps:{showBadge:!1},disabled:this.calculateDisabled(e)}}getInputProps(e,n,t,i){return{state:this.state,inputProps:Object.assign(Object.assign({id:n,ref:this.state._value===e.value?this.catchRef:void 0,"aria-label":this.state._hideLabel&&"string"==typeof e.label?e.label:void 0,type:"radio",name:this.state._name||this.state._id,value:`-${t}`,checked:i,disabled:this.calculateDisabled(e)},this.controller.onFacade),{onChange:this.onChange,onClick:void 0,onInput:this.onInput,onKeyDown:this.onKeyDown.bind(this),onFocus:e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},onBlur:e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1}})}}renderOption(e,n){const t=`${this.state._id}-${n}`,i=this.state._value===e.value;return h(FieldControlStateWrapper,Object.assign({key:t},this.getOptionProps(e,t)),h(RadioStateWrapper,Object.assign({},this.getInputProps(e,t,n,i))))}constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.catchRef=e=>{this.inputRef=e},this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._orientation="vertical",this._required=!1,this._tooltipAlign="top",this._touched=!1,this._value=null,this.state={_hideMsg:!1,_id:`id-${nonce()}`,_label:"",_options:[],_orientation:"vertical"},this.inputHasFocus=!1,this.onInput=e=>{if(e.target instanceof HTMLInputElement){const n=this.controller.getOptionByKey(e.target.value);void 0!==n&&this.controller.onFacade.onInput(e,!0,n.value)}},this.onChange=e=>{if(e.target instanceof HTMLInputElement){const n=this.controller.getOptionByKey(e.target.value);void 0!==n&&(this.controller.onFacade.onChange(e,n.value),this._value=n.value)}},this.onKeyDown=e=>{"Enter"!==e.code&&"NumpadEnter"!==e.code||propagateSubmitEventToForm({form:this.host})},this.controller=new InputRadioController(this,"radio",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateTooltipAlign(e){this.controller.validateTooltipAlign(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHideMsg(e){this.controller.validateHideMsg(e)}validateHint(e){this.controller.validateHint(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validateOptions(e){this.controller.validateOptions(e)}validateOrientation(e){this.controller.validateOrientation(e)}validateRequired(e){this.controller.validateRequired(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad()}static get delegatesFocus(){return!0}get host(){return this}static get watchers(){return{_tooltipAlign:["validateTooltipAlign"],_disabled:["validateDisabled"],_hideLabel:["validateHideLabel"],_hideMsg:["validateHideMsg"],_hint:["validateHint"],_id:["validateId"],_label:["validateLabel"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_options:["validateOptions"],_orientation:["validateOrientation"],_required:["validateRequired"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"]}}static get style(){return{default:defaultStyleCss}}},[305,"kol-input-radio",{_disabled:[4],_hideMsg:[4,"_hide-msg"],_hideLabel:[4,"_hide-label"],_hint:[1],_id:[1],_label:[1],_msg:[1],_name:[1],_on:[16],_options:[1],_orientation:[1],_required:[4],_syncValueBySelector:[1,"_sync-value-by-selector"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_value:[1544],state:[32],inputHasFocus:[32],getValue:[64],kolFocus:[64]},void 0,{_tooltipAlign:["validateTooltipAlign"],_disabled:["validateDisabled"],_hideLabel:["validateHideLabel"],_hideMsg:["validateHideMsg"],_hint:["validateHint"],_id:["validateId"],_label:["validateLabel"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_options:["validateOptions"],_orientation:["validateOrientation"],_required:["validateRequired"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-input-radio"].forEach(e=>{if("kol-input-radio"===e)customElements.get(e)||customElements.define(e,KolInputRadio$1)})}const KolInputRadio=KolInputRadio$1,defineCustomElement=defineCustomElement$1;export{KolInputRadio,defineCustomElement};