@public-ui/components 3.0.6 → 3.0.7-d0e38f2b24188b03316351f07d939c4524a2fd81.0

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 (399) hide show
  1. package/custom-elements.json +19 -1
  2. package/dist/cjs/{Alert-CMxvMn30.js → Alert-DvfeipJE.js} +1 -1
  3. package/dist/cjs/{Alert-CMxvMn30.js.map → Alert-DvfeipJE.js.map} +1 -1
  4. package/dist/cjs/{Collapsible-20txBr-0.js → Collapsible-E0eWmXn2.js} +1 -1
  5. package/dist/cjs/{Collapsible-20txBr-0.js.map → Collapsible-E0eWmXn2.js.map} +1 -1
  6. package/dist/cjs/{CustomSuggestionsToggle-CZ98Iejd.js → CustomSuggestionsToggle-DbGV2ZkI.js} +1 -1
  7. package/dist/cjs/{CustomSuggestionsToggle-CZ98Iejd.js.map → CustomSuggestionsToggle-DbGV2ZkI.js.map} +1 -1
  8. package/dist/cjs/{FieldControlStateWrapper-CP0G8ZHy.js → FieldControlStateWrapper-D6fvsL8U.js} +1 -1
  9. package/dist/cjs/{FieldControlStateWrapper-CP0G8ZHy.js.map → FieldControlStateWrapper-D6fvsL8U.js.map} +1 -1
  10. package/dist/cjs/{FormFieldStateWrapper-Di-pdZzN.js → FormFieldStateWrapper-jfw6Co4e.js} +1 -1
  11. package/dist/cjs/{FormFieldStateWrapper-Di-pdZzN.js.map → FormFieldStateWrapper-jfw6Co4e.js.map} +1 -1
  12. package/dist/cjs/{Heading-D5CosFd4.js → Heading-BG41fGAb.js} +1 -1
  13. package/dist/cjs/{Heading-D5CosFd4.js.map → Heading-BG41fGAb.js.map} +1 -1
  14. package/dist/cjs/Icon-Io_PDRaI.js +4 -0
  15. package/dist/cjs/{Icon-BFqgSgW-.js.map → Icon-Io_PDRaI.js.map} +1 -1
  16. package/dist/cjs/{Input-BOsVmJrz.js → Input-Corn2DzL.js} +1 -1
  17. package/dist/cjs/{Input-BOsVmJrz.js.map → Input-Corn2DzL.js.map} +1 -1
  18. package/dist/cjs/{InputStateWrapper-BreITcAq.js → InputStateWrapper-CTLKkLjX.js} +1 -1
  19. package/dist/cjs/{InputStateWrapper-BreITcAq.js.map → InputStateWrapper-CTLKkLjX.js.map} +1 -1
  20. package/dist/cjs/{InternalUnderlinedBadgeText-zzLmgJIU.js → InternalUnderlinedBadgeText-WlYX4I5I.js} +1 -1
  21. package/dist/cjs/{InternalUnderlinedBadgeText-zzLmgJIU.js.map → InternalUnderlinedBadgeText-WlYX4I5I.js.map} +1 -1
  22. package/dist/cjs/{Span-REN_AO7y.js → Span-BblS5Ovj.js} +1 -1
  23. package/dist/cjs/{Span-REN_AO7y.js.map → Span-BblS5Ovj.js.map} +1 -1
  24. package/dist/cjs/{app-globals-DwaQEtoD.js → app-globals-Xn6g2lnN.js} +1 -1
  25. package/dist/cjs/{app-globals-DwaQEtoD.js.map → app-globals-Xn6g2lnN.js.map} +1 -1
  26. package/dist/cjs/{controller-BHC29CMZ.js → controller-BacGsRWV.js} +1 -1
  27. package/dist/cjs/{controller-BHC29CMZ.js.map → controller-BacGsRWV.js.map} +1 -1
  28. package/dist/cjs/{controller-BA5x9imI.js → controller-BfELhnD6.js} +1 -1
  29. package/dist/cjs/{controller-BA5x9imI.js.map → controller-BfELhnD6.js.map} +1 -1
  30. package/dist/cjs/{controller-BGGeczWr.js → controller-DlyID1S-.js} +1 -1
  31. package/dist/cjs/{controller-BGGeczWr.js.map → controller-DlyID1S-.js.map} +1 -1
  32. package/dist/cjs/{controller-icon-BLy-Cg6m.js → controller-icon-CsyY2Y7g.js} +1 -1
  33. package/dist/cjs/{controller-icon-BLy-Cg6m.js.map → controller-icon-CsyY2Y7g.js.map} +1 -1
  34. package/dist/cjs/{dev.utils-DtiQsS5q.js → dev.utils-DMUEnh4U.js} +1 -1
  35. package/dist/cjs/{dev.utils-DtiQsS5q.js.map → dev.utils-DMUEnh4U.js.map} +1 -1
  36. package/dist/cjs/{devtools-D0veQHgg.js → devtools-NqWtZkR6.js} +1 -1
  37. package/dist/cjs/{devtools-D0veQHgg.js.map → devtools-NqWtZkR6.js.map} +1 -1
  38. package/dist/cjs/index-B45suXZe.js +4 -0
  39. package/dist/cjs/index-B45suXZe.js.map +1 -0
  40. package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
  41. package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
  42. package/dist/cjs/kol-alert-wc.cjs.entry.js +1 -1
  43. package/dist/cjs/kol-alert.cjs.entry.js +1 -1
  44. package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
  45. package/dist/cjs/kol-avatar.cjs.entry.js +1 -1
  46. package/dist/cjs/kol-badge.cjs.entry.js +1 -1
  47. package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
  48. package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
  49. package/dist/cjs/kol-button-wc.cjs.entry.js +1 -1
  50. package/dist/cjs/kol-button-wc.entry.cjs.js.map +1 -1
  51. package/dist/cjs/kol-button.cjs.entry.js +1 -1
  52. package/dist/cjs/kol-card-wc.cjs.entry.js +1 -1
  53. package/dist/cjs/kol-card.cjs.entry.js +1 -1
  54. package/dist/cjs/kol-combobox.cjs.entry.js +1 -1
  55. package/dist/cjs/kol-details.cjs.entry.js +1 -1
  56. package/dist/cjs/kol-drawer.cjs.entry.js +1 -1
  57. package/dist/cjs/kol-form.cjs.entry.js +1 -1
  58. package/dist/cjs/kol-heading.cjs.entry.js +1 -1
  59. package/dist/cjs/kol-icon.cjs.entry.js +1 -1
  60. package/dist/cjs/kol-image.cjs.entry.js +1 -1
  61. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  62. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  63. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  64. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  65. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  66. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  67. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  68. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  69. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  70. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  71. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  72. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  73. package/dist/cjs/kol-link-button.entry.cjs.js.map +1 -1
  74. package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
  75. package/dist/cjs/kol-link-wc.entry.cjs.js.map +1 -1
  76. package/dist/cjs/kol-link.cjs.entry.js +1 -1
  77. package/dist/cjs/kol-link.entry.cjs.js.map +1 -1
  78. package/dist/cjs/kol-modal.cjs.entry.js +1 -1
  79. package/dist/cjs/kol-nav.cjs.entry.js +1 -1
  80. package/dist/cjs/kol-nav.entry.cjs.js.map +1 -1
  81. package/dist/cjs/kol-pagination-wc.cjs.entry.js +1 -1
  82. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  83. package/dist/cjs/kol-popover-button-wc.cjs.entry.js +1 -1
  84. package/dist/cjs/kol-popover-button.cjs.entry.js +1 -1
  85. package/dist/cjs/kol-popover-wc.cjs.entry.js +1 -1
  86. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  87. package/dist/cjs/kol-quote.cjs.entry.js +1 -1
  88. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  89. package/dist/cjs/kol-single-select.cjs.entry.js +1 -1
  90. package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
  91. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  92. package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
  93. package/dist/cjs/kol-table-settings-wc.cjs.entry.js +1 -1
  94. package/dist/cjs/kol-table-stateful.cjs.entry.js +1 -1
  95. package/dist/cjs/kol-table-stateless-wc.cjs.entry.js +1 -1
  96. package/dist/cjs/kol-table-stateless.cjs.entry.js +1 -1
  97. package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
  98. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  99. package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
  100. package/dist/cjs/kol-toolbar.cjs.entry.js +1 -1
  101. package/dist/cjs/kol-tooltip-wc.cjs.entry.js +1 -1
  102. package/dist/cjs/kol-tree-item-wc.cjs.entry.js +1 -1
  103. package/dist/cjs/kol-tree-item.cjs.entry.js +1 -1
  104. package/dist/cjs/kol-tree-wc.cjs.entry.js +1 -1
  105. package/dist/cjs/kol-tree.cjs.entry.js +1 -1
  106. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  107. package/dist/cjs/kolibri.cjs.js +1 -1
  108. package/dist/cjs/link-variant-gYtaoJ43.js +4 -0
  109. package/dist/cjs/link-variant-gYtaoJ43.js.map +1 -0
  110. package/dist/cjs/loader.cjs.js +1 -1
  111. package/dist/cjs/test-component.cjs.entry.js +1 -1
  112. package/dist/components/access-and-short-key.js +1 -1
  113. package/dist/components/associated.controller.js +1 -1
  114. package/dist/components/common.js +1 -1
  115. package/dist/components/controller.js +1 -1
  116. package/dist/components/controller2.js +1 -1
  117. package/dist/components/controller5.js +1 -1
  118. package/dist/components/custom-class.js +1 -1
  119. package/dist/components/href.js +1 -1
  120. package/dist/components/image-source.js +1 -1
  121. package/dist/components/kol-button-wc.js +1 -1
  122. package/dist/components/kol-button-wc.js.map +1 -1
  123. package/dist/components/kol-combobox.js +1 -1
  124. package/dist/components/kol-form.js +1 -1
  125. package/dist/components/kol-heading.js +1 -1
  126. package/dist/components/kol-icon.js +1 -1
  127. package/dist/components/kol-image.js +1 -1
  128. package/dist/components/kol-input-color.js +1 -1
  129. package/dist/components/kol-input-file.js +1 -1
  130. package/dist/components/kol-link-button.js +1 -1
  131. package/dist/components/kol-link-button.js.map +1 -1
  132. package/dist/components/kol-link-wc.js +1 -1
  133. package/dist/components/kol-link-wc.js.map +1 -1
  134. package/dist/components/kol-link.js +1 -1
  135. package/dist/components/kol-link.js.map +1 -1
  136. package/dist/components/kol-modal.js +1 -1
  137. package/dist/components/kol-nav.js +1 -1
  138. package/dist/components/kol-nav.js.map +1 -1
  139. package/dist/components/kol-progress.js +1 -1
  140. package/dist/components/kol-quote.js +1 -1
  141. package/dist/components/kol-table-stateful.js +1 -1
  142. package/dist/components/kol-textarea.js +1 -1
  143. package/dist/components/kol-tooltip-wc.js +1 -1
  144. package/dist/components/link-variant.js +1 -1
  145. package/dist/components/link-variant.js.map +1 -1
  146. package/dist/components/placeholder.js +1 -1
  147. package/dist/esm/{Alert-R2nEqfd2.js → Alert-C3ktyZF6.js} +1 -1
  148. package/dist/esm/{Alert-R2nEqfd2.js.map → Alert-C3ktyZF6.js.map} +1 -1
  149. package/dist/esm/{Collapsible-B4WnEb_T.js → Collapsible-DuN5vPyq.js} +1 -1
  150. package/dist/esm/{Collapsible-B4WnEb_T.js.map → Collapsible-DuN5vPyq.js.map} +1 -1
  151. package/dist/esm/{CustomSuggestionsToggle-Dez_Y4wT.js → CustomSuggestionsToggle-Dy5sBs-i.js} +1 -1
  152. package/dist/esm/{CustomSuggestionsToggle-Dez_Y4wT.js.map → CustomSuggestionsToggle-Dy5sBs-i.js.map} +1 -1
  153. package/dist/esm/{FieldControlStateWrapper-CwL8LaZs.js → FieldControlStateWrapper-DC5e0v-Z.js} +1 -1
  154. package/dist/{kolibri/FieldControlStateWrapper-CwL8LaZs.js.map → esm/FieldControlStateWrapper-DC5e0v-Z.js.map} +1 -1
  155. package/dist/esm/{FormFieldStateWrapper-B7PqxuTo.js → FormFieldStateWrapper-CA5QfRbl.js} +1 -1
  156. package/dist/{kolibri/FormFieldStateWrapper-B7PqxuTo.js.map → esm/FormFieldStateWrapper-CA5QfRbl.js.map} +1 -1
  157. package/dist/esm/{Heading-DT8fK42U.js → Heading-CF5mGt3A.js} +1 -1
  158. package/dist/esm/{Heading-DT8fK42U.js.map → Heading-CF5mGt3A.js.map} +1 -1
  159. package/dist/esm/Icon-CZlCqmbX.js +4 -0
  160. package/dist/esm/{Icon-oHNRs_Az.js.map → Icon-CZlCqmbX.js.map} +1 -1
  161. package/dist/esm/{Input-Dfunc1i_.js → Input-mBmTM8GQ.js} +1 -1
  162. package/dist/esm/{Input-Dfunc1i_.js.map → Input-mBmTM8GQ.js.map} +1 -1
  163. package/dist/esm/{InputStateWrapper--oSOR1R1.js → InputStateWrapper-vabMC5ny.js} +1 -1
  164. package/dist/{kolibri/InputStateWrapper--oSOR1R1.js.map → esm/InputStateWrapper-vabMC5ny.js.map} +1 -1
  165. package/dist/esm/{InternalUnderlinedBadgeText-dfa2g8TL.js → InternalUnderlinedBadgeText-BzZpJszE.js} +1 -1
  166. package/dist/esm/{InternalUnderlinedBadgeText-dfa2g8TL.js.map → InternalUnderlinedBadgeText-BzZpJszE.js.map} +1 -1
  167. package/dist/esm/{Span-43sGxXr7.js → Span-DNVnBGCS.js} +1 -1
  168. package/dist/esm/{Span-43sGxXr7.js.map → Span-DNVnBGCS.js.map} +1 -1
  169. package/dist/esm/{app-globals-BGFjV0_b.js → app-globals-BQlSCt2m.js} +1 -1
  170. package/dist/esm/{app-globals-BGFjV0_b.js.map → app-globals-BQlSCt2m.js.map} +1 -1
  171. package/dist/esm/{controller-DspJt0fi.js → controller-BBBqpY6I.js} +1 -1
  172. package/dist/esm/{controller-DspJt0fi.js.map → controller-BBBqpY6I.js.map} +1 -1
  173. package/dist/esm/{controller-CBa44cbK.js → controller-C3khCPNt.js} +1 -1
  174. package/dist/{kolibri/controller-CBa44cbK.js.map → esm/controller-C3khCPNt.js.map} +1 -1
  175. package/dist/esm/{controller-BdRR-y_g.js → controller-Kdma2hex.js} +1 -1
  176. package/dist/esm/{controller-BdRR-y_g.js.map → controller-Kdma2hex.js.map} +1 -1
  177. package/dist/esm/{controller-icon-aakQFHso.js → controller-icon-By46q2Iq.js} +1 -1
  178. package/dist/{kolibri/controller-icon-aakQFHso.js.map → esm/controller-icon-By46q2Iq.js.map} +1 -1
  179. package/dist/esm/{dev.utils-Bbi3sn8s.js → dev.utils-CQdBj8YZ.js} +1 -1
  180. package/dist/esm/{dev.utils-Bbi3sn8s.js.map → dev.utils-CQdBj8YZ.js.map} +1 -1
  181. package/dist/esm/{devtools-D10LWpor.js → devtools-DyBftFpK.js} +1 -1
  182. package/dist/esm/{devtools-D10LWpor.js.map → devtools-DyBftFpK.js.map} +1 -1
  183. package/dist/esm/index-BEYG-0cN.js +4 -0
  184. package/dist/esm/index-BEYG-0cN.js.map +1 -0
  185. package/dist/esm/kol-abbr.entry.js +1 -1
  186. package/dist/esm/kol-accordion.entry.js +1 -1
  187. package/dist/esm/kol-alert-wc.entry.js +1 -1
  188. package/dist/esm/kol-alert.entry.js +1 -1
  189. package/dist/esm/kol-avatar-wc.entry.js +1 -1
  190. package/dist/esm/kol-avatar.entry.js +1 -1
  191. package/dist/esm/kol-badge.entry.js +1 -1
  192. package/dist/esm/kol-breadcrumb.entry.js +1 -1
  193. package/dist/esm/kol-button-link.entry.js +1 -1
  194. package/dist/esm/kol-button-wc.entry.js +1 -1
  195. package/dist/esm/kol-button-wc.entry.js.map +1 -1
  196. package/dist/esm/kol-button.entry.js +1 -1
  197. package/dist/esm/kol-card-wc.entry.js +1 -1
  198. package/dist/esm/kol-card.entry.js +1 -1
  199. package/dist/esm/kol-combobox.entry.js +1 -1
  200. package/dist/esm/kol-details.entry.js +1 -1
  201. package/dist/esm/kol-drawer.entry.js +1 -1
  202. package/dist/esm/kol-form.entry.js +1 -1
  203. package/dist/esm/kol-heading.entry.js +1 -1
  204. package/dist/esm/kol-icon.entry.js +1 -1
  205. package/dist/esm/kol-image.entry.js +1 -1
  206. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  207. package/dist/esm/kol-input-color.entry.js +1 -1
  208. package/dist/esm/kol-input-date.entry.js +1 -1
  209. package/dist/esm/kol-input-email.entry.js +1 -1
  210. package/dist/esm/kol-input-file.entry.js +1 -1
  211. package/dist/esm/kol-input-number.entry.js +1 -1
  212. package/dist/esm/kol-input-password.entry.js +1 -1
  213. package/dist/esm/kol-input-radio.entry.js +1 -1
  214. package/dist/esm/kol-input-range.entry.js +1 -1
  215. package/dist/esm/kol-input-text.entry.js +1 -1
  216. package/dist/esm/kol-kolibri.entry.js +1 -1
  217. package/dist/esm/kol-link-button.entry.js +1 -1
  218. package/dist/esm/kol-link-button.entry.js.map +1 -1
  219. package/dist/esm/kol-link-wc.entry.js +1 -1
  220. package/dist/esm/kol-link-wc.entry.js.map +1 -1
  221. package/dist/esm/kol-link.entry.js +1 -1
  222. package/dist/esm/kol-link.entry.js.map +1 -1
  223. package/dist/esm/kol-modal.entry.js +1 -1
  224. package/dist/esm/kol-nav.entry.js +1 -1
  225. package/dist/esm/kol-nav.entry.js.map +1 -1
  226. package/dist/esm/kol-pagination-wc.entry.js +1 -1
  227. package/dist/esm/kol-pagination.entry.js +1 -1
  228. package/dist/esm/kol-popover-button-wc.entry.js +1 -1
  229. package/dist/esm/kol-popover-button.entry.js +1 -1
  230. package/dist/esm/kol-popover-wc.entry.js +1 -1
  231. package/dist/esm/kol-progress.entry.js +1 -1
  232. package/dist/esm/kol-quote.entry.js +1 -1
  233. package/dist/esm/kol-select.entry.js +1 -1
  234. package/dist/esm/kol-single-select.entry.js +1 -1
  235. package/dist/esm/kol-skip-nav.entry.js +1 -1
  236. package/dist/esm/kol-spin.entry.js +1 -1
  237. package/dist/esm/kol-split-button.entry.js +1 -1
  238. package/dist/esm/kol-table-settings-wc.entry.js +1 -1
  239. package/dist/esm/kol-table-stateful.entry.js +1 -1
  240. package/dist/esm/kol-table-stateless-wc.entry.js +1 -1
  241. package/dist/esm/kol-table-stateless.entry.js +1 -1
  242. package/dist/esm/kol-tabs.entry.js +1 -1
  243. package/dist/esm/kol-textarea.entry.js +1 -1
  244. package/dist/esm/kol-toast-container.entry.js +1 -1
  245. package/dist/esm/kol-toolbar.entry.js +1 -1
  246. package/dist/esm/kol-tooltip-wc.entry.js +1 -1
  247. package/dist/esm/kol-tree-item-wc.entry.js +1 -1
  248. package/dist/esm/kol-tree-item.entry.js +1 -1
  249. package/dist/esm/kol-tree-wc.entry.js +1 -1
  250. package/dist/esm/kol-tree.entry.js +1 -1
  251. package/dist/esm/kol-version.entry.js +1 -1
  252. package/dist/esm/kolibri.js +1 -1
  253. package/dist/esm/link-variant-H9yefO89.js +4 -0
  254. package/dist/esm/link-variant-H9yefO89.js.map +1 -0
  255. package/dist/esm/loader.js +1 -1
  256. package/dist/esm/test-component.entry.js +1 -1
  257. package/dist/kolibri/{Alert-R2nEqfd2.js → Alert-C3ktyZF6.js} +1 -1
  258. package/dist/kolibri/{Alert-R2nEqfd2.js.map → Alert-C3ktyZF6.js.map} +1 -1
  259. package/dist/kolibri/{Collapsible-B4WnEb_T.js → Collapsible-DuN5vPyq.js} +1 -1
  260. package/dist/kolibri/{Collapsible-B4WnEb_T.js.map → Collapsible-DuN5vPyq.js.map} +1 -1
  261. package/dist/kolibri/{CustomSuggestionsToggle-Dez_Y4wT.js → CustomSuggestionsToggle-Dy5sBs-i.js} +1 -1
  262. package/dist/kolibri/{CustomSuggestionsToggle-Dez_Y4wT.js.map → CustomSuggestionsToggle-Dy5sBs-i.js.map} +1 -1
  263. package/dist/kolibri/FieldControlStateWrapper-DC5e0v-Z.js +4 -0
  264. package/dist/{esm/FieldControlStateWrapper-CwL8LaZs.js.map → kolibri/FieldControlStateWrapper-DC5e0v-Z.js.map} +1 -1
  265. package/dist/kolibri/{FormFieldStateWrapper-B7PqxuTo.js → FormFieldStateWrapper-CA5QfRbl.js} +1 -1
  266. package/dist/{esm/FormFieldStateWrapper-B7PqxuTo.js.map → kolibri/FormFieldStateWrapper-CA5QfRbl.js.map} +1 -1
  267. package/dist/kolibri/{Heading-DT8fK42U.js → Heading-CF5mGt3A.js} +1 -1
  268. package/dist/kolibri/{Heading-DT8fK42U.js.map → Heading-CF5mGt3A.js.map} +1 -1
  269. package/dist/kolibri/Icon-CZlCqmbX.js +4 -0
  270. package/dist/kolibri/{Icon-oHNRs_Az.js.map → Icon-CZlCqmbX.js.map} +1 -1
  271. package/dist/kolibri/{Input-Dfunc1i_.js → Input-mBmTM8GQ.js} +1 -1
  272. package/dist/kolibri/{Input-Dfunc1i_.js.map → Input-mBmTM8GQ.js.map} +1 -1
  273. package/dist/kolibri/{InputStateWrapper--oSOR1R1.js → InputStateWrapper-vabMC5ny.js} +1 -1
  274. package/dist/{esm/InputStateWrapper--oSOR1R1.js.map → kolibri/InputStateWrapper-vabMC5ny.js.map} +1 -1
  275. package/dist/kolibri/InternalUnderlinedBadgeText-BzZpJszE.js +4 -0
  276. package/dist/kolibri/{InternalUnderlinedBadgeText-dfa2g8TL.js.map → InternalUnderlinedBadgeText-BzZpJszE.js.map} +1 -1
  277. package/dist/kolibri/Span-DNVnBGCS.js +4 -0
  278. package/dist/kolibri/{Span-43sGxXr7.js.map → Span-DNVnBGCS.js.map} +1 -1
  279. package/dist/kolibri/app-globals-BQlSCt2m.js +4 -0
  280. package/dist/kolibri/{app-globals-BGFjV0_b.js.map → app-globals-BQlSCt2m.js.map} +1 -1
  281. package/dist/kolibri/{controller-DspJt0fi.js → controller-BBBqpY6I.js} +1 -1
  282. package/dist/kolibri/{controller-DspJt0fi.js.map → controller-BBBqpY6I.js.map} +1 -1
  283. package/dist/kolibri/{controller-CBa44cbK.js → controller-C3khCPNt.js} +1 -1
  284. package/dist/{esm/controller-CBa44cbK.js.map → kolibri/controller-C3khCPNt.js.map} +1 -1
  285. package/dist/kolibri/{controller-BdRR-y_g.js → controller-Kdma2hex.js} +1 -1
  286. package/dist/kolibri/{controller-BdRR-y_g.js.map → controller-Kdma2hex.js.map} +1 -1
  287. package/dist/kolibri/{controller-icon-aakQFHso.js → controller-icon-By46q2Iq.js} +1 -1
  288. package/dist/{esm/controller-icon-aakQFHso.js.map → kolibri/controller-icon-By46q2Iq.js.map} +1 -1
  289. package/dist/kolibri/{dev.utils-Bbi3sn8s.js → dev.utils-CQdBj8YZ.js} +1 -1
  290. package/dist/kolibri/{dev.utils-Bbi3sn8s.js.map → dev.utils-CQdBj8YZ.js.map} +1 -1
  291. package/dist/kolibri/{devtools-D10LWpor.js → devtools-DyBftFpK.js} +1 -1
  292. package/dist/kolibri/{devtools-D10LWpor.js.map → devtools-DyBftFpK.js.map} +1 -1
  293. package/dist/kolibri/{index-44UAWlcO.js → index-BEYG-0cN.js} +2 -2
  294. package/dist/kolibri/index-BEYG-0cN.js.map +1 -0
  295. package/dist/kolibri/kol-abbr.entry.js +1 -1
  296. package/dist/kolibri/kol-accordion.entry.js +1 -1
  297. package/dist/kolibri/kol-alert-wc.entry.js +1 -1
  298. package/dist/kolibri/kol-alert-wc.entry.js.map +1 -1
  299. package/dist/kolibri/kol-alert.entry.js +1 -1
  300. package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
  301. package/dist/kolibri/kol-avatar.entry.js +1 -1
  302. package/dist/kolibri/kol-badge.entry.js +1 -1
  303. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  304. package/dist/kolibri/kol-button-link.entry.js +1 -1
  305. package/dist/kolibri/kol-button-wc.entry.esm.js.map +1 -1
  306. package/dist/kolibri/kol-button-wc.entry.js +1 -1
  307. package/dist/kolibri/kol-button-wc.entry.js.map +1 -1
  308. package/dist/kolibri/kol-button.entry.js +1 -1
  309. package/dist/kolibri/kol-card-wc.entry.js +1 -1
  310. package/dist/kolibri/kol-card.entry.js +1 -1
  311. package/dist/kolibri/kol-combobox.entry.js +1 -1
  312. package/dist/kolibri/kol-details.entry.js +1 -1
  313. package/dist/kolibri/kol-drawer.entry.js +1 -1
  314. package/dist/kolibri/kol-form.entry.js +1 -1
  315. package/dist/kolibri/kol-heading.entry.js +1 -1
  316. package/dist/kolibri/kol-icon.entry.js +1 -1
  317. package/dist/kolibri/kol-image.entry.js +1 -1
  318. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  319. package/dist/kolibri/kol-input-checkbox.entry.js.map +1 -1
  320. package/dist/kolibri/kol-input-color.entry.js +1 -1
  321. package/dist/kolibri/kol-input-date.entry.js +1 -1
  322. package/dist/kolibri/kol-input-email.entry.js +1 -1
  323. package/dist/kolibri/kol-input-file.entry.js +1 -1
  324. package/dist/kolibri/kol-input-number.entry.js +1 -1
  325. package/dist/kolibri/kol-input-password.entry.js +1 -1
  326. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  327. package/dist/kolibri/kol-input-range.entry.js +1 -1
  328. package/dist/kolibri/kol-input-text.entry.js +1 -1
  329. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  330. package/dist/kolibri/kol-link-button.entry.esm.js.map +1 -1
  331. package/dist/kolibri/kol-link-button.entry.js +1 -1
  332. package/dist/kolibri/kol-link-button.entry.js.map +1 -1
  333. package/dist/kolibri/kol-link-wc.entry.esm.js.map +1 -1
  334. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  335. package/dist/kolibri/kol-link-wc.entry.js.map +1 -1
  336. package/dist/kolibri/kol-link.entry.esm.js.map +1 -1
  337. package/dist/kolibri/kol-link.entry.js +1 -1
  338. package/dist/kolibri/kol-link.entry.js.map +1 -1
  339. package/dist/kolibri/kol-modal.entry.js +1 -1
  340. package/dist/kolibri/kol-nav.entry.esm.js.map +1 -1
  341. package/dist/kolibri/kol-nav.entry.js +1 -1
  342. package/dist/kolibri/kol-nav.entry.js.map +1 -1
  343. package/dist/kolibri/kol-pagination-wc.entry.js +1 -1
  344. package/dist/kolibri/kol-pagination.entry.js +1 -1
  345. package/dist/kolibri/kol-popover-button-wc.entry.js +1 -1
  346. package/dist/kolibri/kol-popover-button.entry.js +1 -1
  347. package/dist/kolibri/kol-popover-wc.entry.js +1 -1
  348. package/dist/kolibri/kol-progress.entry.js +1 -1
  349. package/dist/kolibri/kol-quote.entry.js +1 -1
  350. package/dist/kolibri/kol-select.entry.js +1 -1
  351. package/dist/kolibri/kol-single-select.entry.js +1 -1
  352. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  353. package/dist/kolibri/kol-spin.entry.js +1 -1
  354. package/dist/kolibri/kol-split-button.entry.js +1 -1
  355. package/dist/kolibri/kol-table-settings-wc.entry.js +1 -1
  356. package/dist/kolibri/kol-table-stateful.entry.js +1 -1
  357. package/dist/kolibri/kol-table-stateless-wc.entry.js +1 -1
  358. package/dist/kolibri/kol-table-stateless.entry.js +1 -1
  359. package/dist/kolibri/kol-tabs.entry.js +1 -1
  360. package/dist/kolibri/kol-textarea.entry.js +1 -1
  361. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  362. package/dist/kolibri/kol-toolbar.entry.js +1 -1
  363. package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
  364. package/dist/kolibri/kol-tree-item-wc.entry.js +1 -1
  365. package/dist/kolibri/kol-tree-item.entry.js +1 -1
  366. package/dist/kolibri/kol-tree-wc.entry.js +1 -1
  367. package/dist/kolibri/kol-tree.entry.js +1 -1
  368. package/dist/kolibri/kol-version.entry.js +1 -1
  369. package/dist/kolibri/kolibri.esm.js +1 -1
  370. package/dist/kolibri/link-variant-H9yefO89.js +4 -0
  371. package/dist/kolibri/link-variant-H9yefO89.js.map +1 -0
  372. package/dist/kolibri/test-component.entry.js +1 -1
  373. package/dist/types/components/link/component.d.ts +2 -0
  374. package/dist/types/components/link/shadow.d.ts +2 -0
  375. package/dist/types/components/link-button/shadow.d.ts +1 -0
  376. package/dist/types/components.d.ts +34 -0
  377. package/dist/types/schema/components/link.d.ts +2 -2
  378. package/doc/link-button.md +1 -0
  379. package/doc/link.md +2 -0
  380. package/package.json +2 -2
  381. package/vscode-custom-data.json +12 -0
  382. package/dist/cjs/Icon-BFqgSgW-.js +0 -4
  383. package/dist/cjs/index-ZYMPgIaJ.js +0 -4
  384. package/dist/cjs/index-ZYMPgIaJ.js.map +0 -1
  385. package/dist/cjs/link-variant-CIRPEZeP.js +0 -4
  386. package/dist/cjs/link-variant-CIRPEZeP.js.map +0 -1
  387. package/dist/esm/Icon-oHNRs_Az.js +0 -4
  388. package/dist/esm/index-44UAWlcO.js +0 -4
  389. package/dist/esm/index-44UAWlcO.js.map +0 -1
  390. package/dist/esm/link-variant-B9BZOLu-.js +0 -4
  391. package/dist/esm/link-variant-B9BZOLu-.js.map +0 -1
  392. package/dist/kolibri/FieldControlStateWrapper-CwL8LaZs.js +0 -4
  393. package/dist/kolibri/Icon-oHNRs_Az.js +0 -4
  394. package/dist/kolibri/InternalUnderlinedBadgeText-dfa2g8TL.js +0 -4
  395. package/dist/kolibri/Span-43sGxXr7.js +0 -4
  396. package/dist/kolibri/app-globals-BGFjV0_b.js +0 -4
  397. package/dist/kolibri/index-44UAWlcO.js.map +0 -1
  398. package/dist/kolibri/link-variant-B9BZOLu-.js +0 -4
  399. package/dist/kolibri/link-variant-B9BZOLu-.js.map +0 -1
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- "use strict";var index=require("./index-ZYMPgIaJ.js"),clsx=require("./clsx-CkZlkaek.js"),FormFieldStateWrapper=require("./FormFieldStateWrapper-Di-pdZzN.js"),controllerIcon=require("./controller-icon-BLy-Cg6m.js"),InputStateWrapper=require("./InputStateWrapper-BreITcAq.js"),dev_utils=require("./dev.utils-DtiQsS5q.js"),controller$1=require("./controller-BF3IbQCZ.js");require("./common-Cd2qH809.js");var maxLengthBehavior=require("./max-length-behavior-Bvbwhaxv.js"),multiple=require("./multiple-DRhU5nKU.js"),controller=require("./controller-BGGeczWr.js");require("./access-and-short-key-BExF929g.js"),require("./disabled-DT-7CUov.js"),require("./hide-label-DdGk9NfD.js"),require("./label-Nicf9N_T.js"),require("./tooltip-align-WJPFINTL.js"),require("./align-CGG5V8xM.js"),require("./events-DDhO-Ns8.js"),require("./associated.controller-Dpp0zVIP.js"),require("./bootstrap-B3uKTmEF.js"),require("./component-names-D7MwtuB7.js"),require("./i18n-Drgbs46L.js"),require("./isObject-DMA85Fq4.js"),require("./Heading-D5CosFd4.js"),require("./Alert-CMxvMn30.js"),require("./i18n-NiDr3RbD.js"),require("./bem-DnR3ZJW_.js"),require("./browser-CUgMyC7t.js"),require("./InternalUnderlinedBadgeText-zzLmgJIU.js"),require("./reuse-Cs36Ddzu.js"),require("./Icon-BFqgSgW-.js"),require("./icons-CvKgcv20.js"),require("./Input-BOsVmJrz.js"),require("./spell-check-Bkq4G9L7.js"),require("./suggestions-BjiW0xio.js"),require("./controller-BHC29CMZ.js"),require("./auto-complete-DQ9TPAgi.js"),require("./placeholder-BncK-3gZ.js"),require("./read-only-dIvCm73W.js"),require("./required-CXU7vdyH.js");class InputEmailController extends controller.InputTextEmailController{constructor(e,t,n){super(e,t,n),this.component=e}validateMultiple(e){multiple.validateMultiple(this.component,e)}validateMaxLengthBehavior(e){maxLengthBehavior.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);\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=class{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.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 index.h(FormFieldStateWrapper.FormFieldStateWrapper,Object.assign({key:"f19a32b8c7a913d1e67715b00163722b4533e977"},this.getFormFieldProps()),index.h(controllerIcon.InputContainerStateWrapperFc,{key:"ca0b98dcd5c215e220a8eabc98a3ca1675d3bf9d",state:this.state},index.h(InputStateWrapper.InputStateWrapper,Object.assign({key:"a3fb4a6498c19e5e3997a960c4c3fa6728125781"},this.getInputProps()))))}constructor(e){index.registerInstance(this,e),this.catchRef=e=>{this.inputRef=e},this.onKeyDown=e=>{"Enter"!==e.code&&"NumpadEnter"!==e.code||controller$1.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-${dev_utils.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 index.getElement(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"]}}};KolInputEmail.style={default:defaultStyleCss},exports.kol_input_email=KolInputEmail;
4
+ "use strict";var index=require("./index-B45suXZe.js"),clsx=require("./clsx-CkZlkaek.js"),FormFieldStateWrapper=require("./FormFieldStateWrapper-jfw6Co4e.js"),controllerIcon=require("./controller-icon-CsyY2Y7g.js"),InputStateWrapper=require("./InputStateWrapper-CTLKkLjX.js"),dev_utils=require("./dev.utils-DMUEnh4U.js"),controller$1=require("./controller-BF3IbQCZ.js");require("./common-Cd2qH809.js");var maxLengthBehavior=require("./max-length-behavior-Bvbwhaxv.js"),multiple=require("./multiple-DRhU5nKU.js"),controller=require("./controller-DlyID1S-.js");require("./access-and-short-key-BExF929g.js"),require("./disabled-DT-7CUov.js"),require("./hide-label-DdGk9NfD.js"),require("./label-Nicf9N_T.js"),require("./tooltip-align-WJPFINTL.js"),require("./align-CGG5V8xM.js"),require("./events-DDhO-Ns8.js"),require("./associated.controller-Dpp0zVIP.js"),require("./bootstrap-B3uKTmEF.js"),require("./component-names-D7MwtuB7.js"),require("./i18n-Drgbs46L.js"),require("./isObject-DMA85Fq4.js"),require("./Heading-BG41fGAb.js"),require("./Alert-DvfeipJE.js"),require("./i18n-NiDr3RbD.js"),require("./bem-DnR3ZJW_.js"),require("./browser-CUgMyC7t.js"),require("./InternalUnderlinedBadgeText-WlYX4I5I.js"),require("./reuse-Cs36Ddzu.js"),require("./Icon-Io_PDRaI.js"),require("./icons-CvKgcv20.js"),require("./Input-Corn2DzL.js"),require("./spell-check-Bkq4G9L7.js"),require("./suggestions-BjiW0xio.js"),require("./controller-BacGsRWV.js"),require("./auto-complete-DQ9TPAgi.js"),require("./placeholder-BncK-3gZ.js"),require("./read-only-dIvCm73W.js"),require("./required-CXU7vdyH.js");class InputEmailController extends controller.InputTextEmailController{constructor(e,t,n){super(e,t,n),this.component=e}validateMultiple(e){multiple.validateMultiple(this.component,e)}validateMaxLengthBehavior(e){maxLengthBehavior.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);\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=class{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.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 index.h(FormFieldStateWrapper.FormFieldStateWrapper,Object.assign({key:"f19a32b8c7a913d1e67715b00163722b4533e977"},this.getFormFieldProps()),index.h(controllerIcon.InputContainerStateWrapperFc,{key:"ca0b98dcd5c215e220a8eabc98a3ca1675d3bf9d",state:this.state},index.h(InputStateWrapper.InputStateWrapper,Object.assign({key:"a3fb4a6498c19e5e3997a960c4c3fa6728125781"},this.getInputProps()))))}constructor(e){index.registerInstance(this,e),this.catchRef=e=>{this.inputRef=e},this.onKeyDown=e=>{"Enter"!==e.code&&"NumpadEnter"!==e.code||controller$1.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-${dev_utils.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 index.getElement(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"]}}};KolInputEmail.style={default:defaultStyleCss},exports.kol_input_email=KolInputEmail;
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- "use strict";var index=require("./index-ZYMPgIaJ.js"),clsx=require("./clsx-CkZlkaek.js"),componentNames=require("./component-names-D7MwtuB7.js"),FormFieldStateWrapper=require("./FormFieldStateWrapper-Di-pdZzN.js"),controllerIcon=require("./controller-icon-BLy-Cg6m.js"),InputStateWrapper=require("./InputStateWrapper-BreITcAq.js"),i18n=require("./i18n-NiDr3RbD.js"),dev_utils=require("./dev.utils-DtiQsS5q.js"),common=require("./common-Cd2qH809.js"),multiple=require("./multiple-DRhU5nKU.js"),required=require("./required-CXU7vdyH.js");require("./access-and-short-key-BExF929g.js"),require("./disabled-DT-7CUov.js"),require("./hide-label-DdGk9NfD.js"),require("./label-Nicf9N_T.js"),require("./tooltip-align-WJPFINTL.js"),require("./align-CGG5V8xM.js"),require("./events-DDhO-Ns8.js"),require("./associated.controller-Dpp0zVIP.js"),require("./bootstrap-B3uKTmEF.js"),require("./i18n-Drgbs46L.js"),require("./isObject-DMA85Fq4.js"),require("./Heading-D5CosFd4.js"),require("./Alert-CMxvMn30.js"),require("./bem-DnR3ZJW_.js"),require("./browser-CUgMyC7t.js"),require("./InternalUnderlinedBadgeText-zzLmgJIU.js"),require("./reuse-Cs36Ddzu.js"),require("./Icon-BFqgSgW-.js"),require("./icons-CvKgcv20.js"),require("./Input-BOsVmJrz.js");const validateAccept=(e,n,t={})=>{common.watchString(e,"_accept",n,t)};class InputFileController extends controllerIcon.InputIconController{constructor(e,n,t){super(e,n,t),this.component=e}validateAccept(e){validateAccept(this.component,e)}validateMultiple(e){multiple.validateMultiple(this.component,e)}validateRequired(e){required.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);\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=class{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.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 index.h(FormFieldStateWrapper.FormFieldStateWrapper,Object.assign({key:"b5fbe23fc35a129f338743af03faa91d389ba9fb"},this.getFormFieldProps()),index.h(controllerIcon.InputContainerStateWrapperFc,{key:"3422d0b39f417afb43a555e7c3444ea7e93c860d",state:this.state},index.h("span",{key:"69e817a0f0ba2214e6fa99aeb06122210a2864aa",class:clsx.clsx("kol-input-container__filename",{"kol-input-container__filename--has-file":this.hasFileSelected})},this.filename),index.h(InputStateWrapper.InputStateWrapper,Object.assign({key:"de648f8a6d19671b45c7a53a1c814d2a9a3ae2df"},this.getInputProps())),index.h(componentNames.KolButtonWcTag,{key:"e324b2cf76507edfa9a6f266dfb827fe0a3133d0",class:"kol-input-container__button",_label:this.translateDataBrowseText,_buttonVariant:"primary",_disabled:this._disabled})))}constructor(e){index.registerInstance(this,e),this.translateDataBrowseText=i18n.translate("kol-data-browse-text"),this.translateFilenameText=i18n.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-${dev_utils.nonce()}`,_label:""},this.inputHasFocus=!1,this.onDragOver=e=>{var n,t,i;e.preventDefault(),null===(i=null===(t=null===(n=this.inputRef)||void 0===n?void 0:n.parentElement)||void 0===t?void 0:t.parentElement)||void 0===i||i.classList.add("kol-input-container--is-dragover")},this.onDragLeave=()=>{var e,n,t;null===(t=null===(n=null===(e=this.inputRef)||void 0===e?void 0:e.parentElement)||void 0===n?void 0:n.parentElement)||void 0===t||t.classList.remove("kol-input-container--is-dragover")},this.onDrop=e=>{var n,t,i,o;if(e.preventDefault(),null===(i=null===(t=null===(n=this.inputRef)||void 0===n?void 0:n.parentElement)||void 0===t?void 0:t.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 n=e.dataTransfer.files;this.filename=Array.from(n).map(e=>e.name).join(", "),this.controller.setFormAssociatedValue(n)}},this.onChange=e=>{if(this.inputRef instanceof HTMLInputElement&&"file"===this.inputRef.type){const n=this.inputRef.files;this.hasFileSelected=!!(null==n?void 0:n.length),this.filename=(null==n?void 0:n.length)?Array.from(n).map(e=>e.name).join(", "):this.translateFilenameText,this.controller.onFacade.onChange(e,n),this.controller.setFormAssociatedValue(n)}},this.onInput=e=>{if(this.inputRef instanceof HTMLInputElement&&"file"===this.inputRef.type){const n=this.inputRef.files;this.controller.onFacade.onInput(e,!1,n)}},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,n;const t=null===(n=null===(e=this.inputRef)||void 0===e?void 0:e.parentElement)||void 0===n?void 0:n.parentElement;null==t||t.addEventListener("dragover",this.onDragOver),null==t||t.addEventListener("dragleave",this.onDragLeave),null==t||t.addEventListener("drop",this.onDrop)}static get delegatesFocus(){return!0}get host(){return index.getElement(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"]}}};KolInputFile.style={default:defaultStyleCss},exports.kol_input_file=KolInputFile;
4
+ "use strict";var index=require("./index-B45suXZe.js"),clsx=require("./clsx-CkZlkaek.js"),componentNames=require("./component-names-D7MwtuB7.js"),FormFieldStateWrapper=require("./FormFieldStateWrapper-jfw6Co4e.js"),controllerIcon=require("./controller-icon-CsyY2Y7g.js"),InputStateWrapper=require("./InputStateWrapper-CTLKkLjX.js"),i18n=require("./i18n-NiDr3RbD.js"),dev_utils=require("./dev.utils-DMUEnh4U.js"),common=require("./common-Cd2qH809.js"),multiple=require("./multiple-DRhU5nKU.js"),required=require("./required-CXU7vdyH.js");require("./access-and-short-key-BExF929g.js"),require("./disabled-DT-7CUov.js"),require("./hide-label-DdGk9NfD.js"),require("./label-Nicf9N_T.js"),require("./tooltip-align-WJPFINTL.js"),require("./align-CGG5V8xM.js"),require("./events-DDhO-Ns8.js"),require("./associated.controller-Dpp0zVIP.js"),require("./bootstrap-B3uKTmEF.js"),require("./i18n-Drgbs46L.js"),require("./isObject-DMA85Fq4.js"),require("./Heading-BG41fGAb.js"),require("./Alert-DvfeipJE.js"),require("./bem-DnR3ZJW_.js"),require("./browser-CUgMyC7t.js"),require("./InternalUnderlinedBadgeText-WlYX4I5I.js"),require("./reuse-Cs36Ddzu.js"),require("./Icon-Io_PDRaI.js"),require("./icons-CvKgcv20.js"),require("./Input-Corn2DzL.js");const validateAccept=(e,n,t={})=>{common.watchString(e,"_accept",n,t)};class InputFileController extends controllerIcon.InputIconController{constructor(e,n,t){super(e,n,t),this.component=e}validateAccept(e){validateAccept(this.component,e)}validateMultiple(e){multiple.validateMultiple(this.component,e)}validateRequired(e){required.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);\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=class{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.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 index.h(FormFieldStateWrapper.FormFieldStateWrapper,Object.assign({key:"b5fbe23fc35a129f338743af03faa91d389ba9fb"},this.getFormFieldProps()),index.h(controllerIcon.InputContainerStateWrapperFc,{key:"3422d0b39f417afb43a555e7c3444ea7e93c860d",state:this.state},index.h("span",{key:"69e817a0f0ba2214e6fa99aeb06122210a2864aa",class:clsx.clsx("kol-input-container__filename",{"kol-input-container__filename--has-file":this.hasFileSelected})},this.filename),index.h(InputStateWrapper.InputStateWrapper,Object.assign({key:"de648f8a6d19671b45c7a53a1c814d2a9a3ae2df"},this.getInputProps())),index.h(componentNames.KolButtonWcTag,{key:"e324b2cf76507edfa9a6f266dfb827fe0a3133d0",class:"kol-input-container__button",_label:this.translateDataBrowseText,_buttonVariant:"primary",_disabled:this._disabled})))}constructor(e){index.registerInstance(this,e),this.translateDataBrowseText=i18n.translate("kol-data-browse-text"),this.translateFilenameText=i18n.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-${dev_utils.nonce()}`,_label:""},this.inputHasFocus=!1,this.onDragOver=e=>{var n,t,i;e.preventDefault(),null===(i=null===(t=null===(n=this.inputRef)||void 0===n?void 0:n.parentElement)||void 0===t?void 0:t.parentElement)||void 0===i||i.classList.add("kol-input-container--is-dragover")},this.onDragLeave=()=>{var e,n,t;null===(t=null===(n=null===(e=this.inputRef)||void 0===e?void 0:e.parentElement)||void 0===n?void 0:n.parentElement)||void 0===t||t.classList.remove("kol-input-container--is-dragover")},this.onDrop=e=>{var n,t,i,o;if(e.preventDefault(),null===(i=null===(t=null===(n=this.inputRef)||void 0===n?void 0:n.parentElement)||void 0===t?void 0:t.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 n=e.dataTransfer.files;this.filename=Array.from(n).map(e=>e.name).join(", "),this.controller.setFormAssociatedValue(n)}},this.onChange=e=>{if(this.inputRef instanceof HTMLInputElement&&"file"===this.inputRef.type){const n=this.inputRef.files;this.hasFileSelected=!!(null==n?void 0:n.length),this.filename=(null==n?void 0:n.length)?Array.from(n).map(e=>e.name).join(", "):this.translateFilenameText,this.controller.onFacade.onChange(e,n),this.controller.setFormAssociatedValue(n)}},this.onInput=e=>{if(this.inputRef instanceof HTMLInputElement&&"file"===this.inputRef.type){const n=this.inputRef.files;this.controller.onFacade.onInput(e,!1,n)}},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,n;const t=null===(n=null===(e=this.inputRef)||void 0===e?void 0:e.parentElement)||void 0===n?void 0:n.parentElement;null==t||t.addEventListener("dragover",this.onDragOver),null==t||t.addEventListener("dragleave",this.onDragLeave),null==t||t.addEventListener("drop",this.onDrop)}static get delegatesFocus(){return!0}get host(){return index.getElement(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"]}}};KolInputFile.style={default:defaultStyleCss},exports.kol_input_file=KolInputFile;
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- "use strict";var index=require("./index-ZYMPgIaJ.js"),clsx=require("./clsx-CkZlkaek.js"),FormFieldStateWrapper=require("./FormFieldStateWrapper-Di-pdZzN.js"),controllerIcon=require("./controller-icon-BLy-Cg6m.js"),InputStateWrapper=require("./InputStateWrapper-BreITcAq.js"),dev_utils=require("./dev.utils-DtiQsS5q.js"),controller=require("./controller-BF3IbQCZ.js");require("./common-Cd2qH809.js");var autoComplete=require("./auto-complete-DQ9TPAgi.js"),placeholder=require("./placeholder-BncK-3gZ.js"),readOnly=require("./read-only-dIvCm73W.js"),required=require("./required-CXU7vdyH.js"),suggestions=require("./suggestions-BjiW0xio.js");require("./access-and-short-key-BExF929g.js"),require("./disabled-DT-7CUov.js"),require("./hide-label-DdGk9NfD.js"),require("./label-Nicf9N_T.js"),require("./tooltip-align-WJPFINTL.js"),require("./align-CGG5V8xM.js"),require("./events-DDhO-Ns8.js"),require("./associated.controller-Dpp0zVIP.js"),require("./bootstrap-B3uKTmEF.js"),require("./component-names-D7MwtuB7.js"),require("./i18n-Drgbs46L.js"),require("./isObject-DMA85Fq4.js"),require("./Heading-D5CosFd4.js"),require("./Alert-CMxvMn30.js"),require("./i18n-NiDr3RbD.js"),require("./bem-DnR3ZJW_.js"),require("./browser-CUgMyC7t.js"),require("./InternalUnderlinedBadgeText-zzLmgJIU.js"),require("./reuse-Cs36Ddzu.js"),require("./Icon-BFqgSgW-.js"),require("./icons-CvKgcv20.js"),require("./Input-BOsVmJrz.js");class InputNumberController extends controllerIcon.InputIconController{constructor(e,t,n){super(e,t,n),this.component=e}validateAutoComplete(e){autoComplete.validateAutoComplete(this.component,e)}validateSuggestions(e){suggestions.validateSuggestions(this.component,e)}validateMax(e){this.validateNumber("_max",e)}validateMin(e){this.validateNumber("_min",e)}validatePlaceholder(e){placeholder.validatePlaceholder(this.component,e)}validateReadOnly(e){readOnly.validateReadOnly(this.component,e)}validateRequired(e){required.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);\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=class{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.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 index.h(FormFieldStateWrapper.FormFieldStateWrapper,Object.assign({key:"4032102190ecfc2ca60bd96e9afeec6eaa9d3434"},this.getFormFieldProps()),index.h(controllerIcon.InputContainerStateWrapperFc,{key:"e4b1ef3cb5a6f6b2d04f144477e10a7e324b832d",state:this.state},index.h(InputStateWrapper.InputStateWrapper,Object.assign({key:"12be44bce8484f547242fc852b5fd5af14b2f0df"},this.getInputProps()))))}constructor(e){index.registerInstance(this,e),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||controller.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-${dev_utils.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 index.getElement(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"]}}};KolInputNumber.style={default:defaultStyleCss},exports.kol_input_number=KolInputNumber;
4
+ "use strict";var index=require("./index-B45suXZe.js"),clsx=require("./clsx-CkZlkaek.js"),FormFieldStateWrapper=require("./FormFieldStateWrapper-jfw6Co4e.js"),controllerIcon=require("./controller-icon-CsyY2Y7g.js"),InputStateWrapper=require("./InputStateWrapper-CTLKkLjX.js"),dev_utils=require("./dev.utils-DMUEnh4U.js"),controller=require("./controller-BF3IbQCZ.js");require("./common-Cd2qH809.js");var autoComplete=require("./auto-complete-DQ9TPAgi.js"),placeholder=require("./placeholder-BncK-3gZ.js"),readOnly=require("./read-only-dIvCm73W.js"),required=require("./required-CXU7vdyH.js"),suggestions=require("./suggestions-BjiW0xio.js");require("./access-and-short-key-BExF929g.js"),require("./disabled-DT-7CUov.js"),require("./hide-label-DdGk9NfD.js"),require("./label-Nicf9N_T.js"),require("./tooltip-align-WJPFINTL.js"),require("./align-CGG5V8xM.js"),require("./events-DDhO-Ns8.js"),require("./associated.controller-Dpp0zVIP.js"),require("./bootstrap-B3uKTmEF.js"),require("./component-names-D7MwtuB7.js"),require("./i18n-Drgbs46L.js"),require("./isObject-DMA85Fq4.js"),require("./Heading-BG41fGAb.js"),require("./Alert-DvfeipJE.js"),require("./i18n-NiDr3RbD.js"),require("./bem-DnR3ZJW_.js"),require("./browser-CUgMyC7t.js"),require("./InternalUnderlinedBadgeText-WlYX4I5I.js"),require("./reuse-Cs36Ddzu.js"),require("./Icon-Io_PDRaI.js"),require("./icons-CvKgcv20.js"),require("./Input-Corn2DzL.js");class InputNumberController extends controllerIcon.InputIconController{constructor(e,t,n){super(e,t,n),this.component=e}validateAutoComplete(e){autoComplete.validateAutoComplete(this.component,e)}validateSuggestions(e){suggestions.validateSuggestions(this.component,e)}validateMax(e){this.validateNumber("_max",e)}validateMin(e){this.validateNumber("_min",e)}validatePlaceholder(e){placeholder.validatePlaceholder(this.component,e)}validateReadOnly(e){readOnly.validateReadOnly(this.component,e)}validateRequired(e){required.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);\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=class{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.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 index.h(FormFieldStateWrapper.FormFieldStateWrapper,Object.assign({key:"4032102190ecfc2ca60bd96e9afeec6eaa9d3434"},this.getFormFieldProps()),index.h(controllerIcon.InputContainerStateWrapperFc,{key:"e4b1ef3cb5a6f6b2d04f144477e10a7e324b832d",state:this.state},index.h(InputStateWrapper.InputStateWrapper,Object.assign({key:"12be44bce8484f547242fc852b5fd5af14b2f0df"},this.getInputProps()))))}constructor(e){index.registerInstance(this,e),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||controller.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-${dev_utils.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 index.getElement(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"]}}};KolInputNumber.style={default:defaultStyleCss},exports.kol_input_number=KolInputNumber;
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- "use strict";var index=require("./index-ZYMPgIaJ.js"),clsx=require("./clsx-CkZlkaek.js"),common=require("./common-Cd2qH809.js"),FormFieldStateWrapper=require("./FormFieldStateWrapper-Di-pdZzN.js"),controllerIcon=require("./controller-icon-BLy-Cg6m.js"),InputStateWrapper=require("./InputStateWrapper-BreITcAq.js"),i18n=require("./i18n-NiDr3RbD.js"),dev_utils=require("./dev.utils-DtiQsS5q.js"),controller=require("./controller-BF3IbQCZ.js"),controller$1=require("./controller-BHC29CMZ.js");require("./access-and-short-key-BExF929g.js"),require("./disabled-DT-7CUov.js"),require("./hide-label-DdGk9NfD.js"),require("./label-Nicf9N_T.js"),require("./tooltip-align-WJPFINTL.js"),require("./align-CGG5V8xM.js"),require("./events-DDhO-Ns8.js"),require("./associated.controller-Dpp0zVIP.js"),require("./bootstrap-B3uKTmEF.js"),require("./component-names-D7MwtuB7.js"),require("./i18n-Drgbs46L.js"),require("./isObject-DMA85Fq4.js"),require("./Heading-D5CosFd4.js"),require("./Alert-CMxvMn30.js"),require("./bem-DnR3ZJW_.js"),require("./browser-CUgMyC7t.js"),require("./InternalUnderlinedBadgeText-zzLmgJIU.js"),require("./reuse-Cs36Ddzu.js"),require("./Icon-BFqgSgW-.js"),require("./icons-CvKgcv20.js"),require("./Input-BOsVmJrz.js"),require("./auto-complete-DQ9TPAgi.js"),require("./max-length-behavior-Bvbwhaxv.js"),require("./placeholder-BncK-3gZ.js"),require("./read-only-dIvCm73W.js"),require("./required-CXU7vdyH.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);\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=class{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.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:index.h(controllerIcon.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 index.h(FormFieldStateWrapper.FormFieldStateWrapper,Object.assign({key:"844d0d658946f85e58c537dc3049ea34abeabe60"},this.getFormFieldProps()),index.h(controllerIcon.InputContainerStateWrapperFc,{key:"2b390c722de4b9e6f2c7c89ea469cd2970e52f54",state:this.state,endAdornment:this.getShowPasswordButton()},index.h(InputStateWrapper.InputStateWrapper,Object.assign({key:"e12ca7840b5e0d9589cce15fd4f8ddf676cf0434"},this.getInputProps()))))}constructor(e){index.registerInstance(this,e),this.translateHidePassword=i18n.translate("kol-hide-password"),this.translateShowPassword=i18n.translate("kol-show-password"),this.catchRef=e=>{this.inputRef=e},this.onKeyDown=e=>{"Enter"!==e.code&&"NumpadEnter"!==e.code||controller.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-${dev_utils.nonce()}`,_label:"",_variant:"default"},this._passwordVisible=!1,this.inputHasFocus=!1,this.controller=new controller$1.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&&common.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 index.getElement(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"]}}};KolInputPassword.style={default:defaultStyleCss},exports.kol_input_password=KolInputPassword;
4
+ "use strict";var index=require("./index-B45suXZe.js"),clsx=require("./clsx-CkZlkaek.js"),common=require("./common-Cd2qH809.js"),FormFieldStateWrapper=require("./FormFieldStateWrapper-jfw6Co4e.js"),controllerIcon=require("./controller-icon-CsyY2Y7g.js"),InputStateWrapper=require("./InputStateWrapper-CTLKkLjX.js"),i18n=require("./i18n-NiDr3RbD.js"),dev_utils=require("./dev.utils-DMUEnh4U.js"),controller=require("./controller-BF3IbQCZ.js"),controller$1=require("./controller-BacGsRWV.js");require("./access-and-short-key-BExF929g.js"),require("./disabled-DT-7CUov.js"),require("./hide-label-DdGk9NfD.js"),require("./label-Nicf9N_T.js"),require("./tooltip-align-WJPFINTL.js"),require("./align-CGG5V8xM.js"),require("./events-DDhO-Ns8.js"),require("./associated.controller-Dpp0zVIP.js"),require("./bootstrap-B3uKTmEF.js"),require("./component-names-D7MwtuB7.js"),require("./i18n-Drgbs46L.js"),require("./isObject-DMA85Fq4.js"),require("./Heading-BG41fGAb.js"),require("./Alert-DvfeipJE.js"),require("./bem-DnR3ZJW_.js"),require("./browser-CUgMyC7t.js"),require("./InternalUnderlinedBadgeText-WlYX4I5I.js"),require("./reuse-Cs36Ddzu.js"),require("./Icon-Io_PDRaI.js"),require("./icons-CvKgcv20.js"),require("./Input-Corn2DzL.js"),require("./auto-complete-DQ9TPAgi.js"),require("./max-length-behavior-Bvbwhaxv.js"),require("./placeholder-BncK-3gZ.js"),require("./read-only-dIvCm73W.js"),require("./required-CXU7vdyH.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);\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=class{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.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:index.h(controllerIcon.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 index.h(FormFieldStateWrapper.FormFieldStateWrapper,Object.assign({key:"844d0d658946f85e58c537dc3049ea34abeabe60"},this.getFormFieldProps()),index.h(controllerIcon.InputContainerStateWrapperFc,{key:"2b390c722de4b9e6f2c7c89ea469cd2970e52f54",state:this.state,endAdornment:this.getShowPasswordButton()},index.h(InputStateWrapper.InputStateWrapper,Object.assign({key:"e12ca7840b5e0d9589cce15fd4f8ddf676cf0434"},this.getInputProps()))))}constructor(e){index.registerInstance(this,e),this.translateHidePassword=i18n.translate("kol-hide-password"),this.translateShowPassword=i18n.translate("kol-show-password"),this.catchRef=e=>{this.inputRef=e},this.onKeyDown=e=>{"Enter"!==e.code&&"NumpadEnter"!==e.code||controller.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-${dev_utils.nonce()}`,_label:"",_variant:"default"},this._passwordVisible=!1,this.inputHasFocus=!1,this.controller=new controller$1.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&&common.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 index.getElement(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"]}}};KolInputPassword.style={default:defaultStyleCss},exports.kol_input_password=KolInputPassword;
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- "use strict";var index=require("./index-ZYMPgIaJ.js"),clsx=require("./clsx-CkZlkaek.js"),dev_utils=require("./dev.utils-DtiQsS5q.js"),controller=require("./controller-BF3IbQCZ.js"),controller$1=require("./controller-BA5x9imI.js"),FieldControlStateWrapper=require("./FieldControlStateWrapper-CP0G8ZHy.js"),FormFieldStateWrapper=require("./FormFieldStateWrapper-Di-pdZzN.js"),Heading=require("./Heading-D5CosFd4.js"),Input=require("./Input-BOsVmJrz.js");require("./common-Cd2qH809.js"),require("./component-names-D7MwtuB7.js"),require("./label-Nicf9N_T.js"),require("./required-CXU7vdyH.js"),require("./orientation-BGODo_Ua.js"),require("./reuse-Cs36Ddzu.js"),require("./access-and-short-key-BExF929g.js"),require("./disabled-DT-7CUov.js"),require("./hide-label-DdGk9NfD.js"),require("./tooltip-align-WJPFINTL.js"),require("./align-CGG5V8xM.js"),require("./events-DDhO-Ns8.js"),require("./associated.controller-Dpp0zVIP.js"),require("./bootstrap-B3uKTmEF.js"),require("./i18n-Drgbs46L.js"),require("./isObject-DMA85Fq4.js"),require("./Alert-CMxvMn30.js"),require("./i18n-NiDr3RbD.js"),require("./bem-DnR3ZJW_.js"),require("./browser-CUgMyC7t.js"),require("./InternalUnderlinedBadgeText-zzLmgJIU.js");const InputWrapperFc=e=>{var{class:n}=e,t=Heading.__rest(e,["class"]);return index.h(Input.InputFc,Object.assign({class:clsx.clsx("kol-input-radio__input",n)},t,{type:"radio"}))},RadioFc=e=>{var n,{class:t,inputProps:i}=e,o=Heading.__rest(e,["class","inputProps"]);const l=FormFieldStateWrapper.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 index.h("label",Object.assign({class:clsx.clsx("kol-input-radio",r,t)},o),index.h(InputWrapperFc,Object.assign({},i)))};function getRadioProps(e,n={}){const{ariaDescribedBy:t}=FormFieldStateWrapper.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=Heading.__rest(e,["state","inputProps"]);return index.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);\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=class{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.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 index.h(FormFieldStateWrapper.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 index.h(FieldControlStateWrapper.FieldControlStateWrapper,Object.assign({key:t},this.getOptionProps(e,t)),index.h(RadioStateWrapper,Object.assign({},this.getInputProps(e,t,n,i))))}constructor(e){index.registerInstance(this,e),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-${dev_utils.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||controller.propagateSubmitEventToForm({form:this.host})},this.controller=new controller$1.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 index.getElement(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"]}}};KolInputRadio.style={default:defaultStyleCss},exports.kol_input_radio=KolInputRadio;
4
+ "use strict";var index=require("./index-B45suXZe.js"),clsx=require("./clsx-CkZlkaek.js"),dev_utils=require("./dev.utils-DMUEnh4U.js"),controller=require("./controller-BF3IbQCZ.js"),controller$1=require("./controller-BfELhnD6.js"),FieldControlStateWrapper=require("./FieldControlStateWrapper-D6fvsL8U.js"),FormFieldStateWrapper=require("./FormFieldStateWrapper-jfw6Co4e.js"),Heading=require("./Heading-BG41fGAb.js"),Input=require("./Input-Corn2DzL.js");require("./common-Cd2qH809.js"),require("./component-names-D7MwtuB7.js"),require("./label-Nicf9N_T.js"),require("./required-CXU7vdyH.js"),require("./orientation-BGODo_Ua.js"),require("./reuse-Cs36Ddzu.js"),require("./access-and-short-key-BExF929g.js"),require("./disabled-DT-7CUov.js"),require("./hide-label-DdGk9NfD.js"),require("./tooltip-align-WJPFINTL.js"),require("./align-CGG5V8xM.js"),require("./events-DDhO-Ns8.js"),require("./associated.controller-Dpp0zVIP.js"),require("./bootstrap-B3uKTmEF.js"),require("./i18n-Drgbs46L.js"),require("./isObject-DMA85Fq4.js"),require("./Alert-DvfeipJE.js"),require("./i18n-NiDr3RbD.js"),require("./bem-DnR3ZJW_.js"),require("./browser-CUgMyC7t.js"),require("./InternalUnderlinedBadgeText-WlYX4I5I.js");const InputWrapperFc=e=>{var{class:n}=e,t=Heading.__rest(e,["class"]);return index.h(Input.InputFc,Object.assign({class:clsx.clsx("kol-input-radio__input",n)},t,{type:"radio"}))},RadioFc=e=>{var n,{class:t,inputProps:i}=e,o=Heading.__rest(e,["class","inputProps"]);const l=FormFieldStateWrapper.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 index.h("label",Object.assign({class:clsx.clsx("kol-input-radio",r,t)},o),index.h(InputWrapperFc,Object.assign({},i)))};function getRadioProps(e,n={}){const{ariaDescribedBy:t}=FormFieldStateWrapper.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=Heading.__rest(e,["state","inputProps"]);return index.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);\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=class{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.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 index.h(FormFieldStateWrapper.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 index.h(FieldControlStateWrapper.FieldControlStateWrapper,Object.assign({key:t},this.getOptionProps(e,t)),index.h(RadioStateWrapper,Object.assign({},this.getInputProps(e,t,n,i))))}constructor(e){index.registerInstance(this,e),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-${dev_utils.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||controller.propagateSubmitEventToForm({form:this.host})},this.controller=new controller$1.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 index.getElement(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"]}}};KolInputRadio.style={default:defaultStyleCss},exports.kol_input_radio=KolInputRadio;
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- "use strict";var index=require("./index-ZYMPgIaJ.js"),Heading=require("./Heading-D5CosFd4.js"),clsx=require("./clsx-CkZlkaek.js"),dev_utils=require("./dev.utils-DtiQsS5q.js"),controller=require("./controller-BF3IbQCZ.js"),FormFieldStateWrapper=require("./FormFieldStateWrapper-Di-pdZzN.js"),InputStateWrapper=require("./InputStateWrapper-BreITcAq.js"),controllerIcon=require("./controller-icon-BLy-Cg6m.js");require("./common-Cd2qH809.js");var autoComplete=require("./auto-complete-DQ9TPAgi.js"),suggestions=require("./suggestions-BjiW0xio.js");require("./component-names-D7MwtuB7.js"),require("./access-and-short-key-BExF929g.js"),require("./disabled-DT-7CUov.js"),require("./hide-label-DdGk9NfD.js"),require("./label-Nicf9N_T.js"),require("./tooltip-align-WJPFINTL.js"),require("./align-CGG5V8xM.js"),require("./events-DDhO-Ns8.js"),require("./associated.controller-Dpp0zVIP.js"),require("./bootstrap-B3uKTmEF.js"),require("./i18n-Drgbs46L.js"),require("./isObject-DMA85Fq4.js"),require("./Alert-CMxvMn30.js"),require("./i18n-NiDr3RbD.js"),require("./bem-DnR3ZJW_.js"),require("./browser-CUgMyC7t.js"),require("./InternalUnderlinedBadgeText-zzLmgJIU.js"),require("./reuse-Cs36Ddzu.js"),require("./Input-BOsVmJrz.js"),require("./Icon-BFqgSgW-.js"),require("./icons-CvKgcv20.js");class InputRangeController extends controllerIcon.InputIconController{constructor(e,t,n){super(e,t,n),this.component=e}validateAutoComplete(e){autoComplete.validateAutoComplete(this.component,e)}validateMax(e){this.validateNumber("_max",e)}validateMin(e){this.validateNumber("_min",e)}validateStep(e){this.validateNumber("_step",e)}validateSuggestions(e){suggestions.validateSuggestions(this.component,e)}validateValue(e){this.validateNumber("_value",e),this.component._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.validateStep(this.component._step),this.validateSuggestions(this.component._suggestions),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);\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-range__inputs-wrapper {\n display: flex;\n flex-grow: 1;\n flex-direction: row;\n align-items: center;\n }\n .kol-input-range__input--number {\n width: var(--kolibri-input-range--input-number--width);\n }\n .kol-input-range__input--range {\n background-color: #d3d3d3;\n display: inline-block;\n /* Design-Hack - related with flex-grow */\n width: 0;\n height: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n margin: 0;\n padding: 0;\n flex-grow: 1;\n line-height: 1.5;\n appearance: none;\n border: 1px solid #000;\n }\n .kol-input-range__input--range::-webkit-slider-thumb {\n background-color: #000;\n border-radius: 20px;\n width: calc(20 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(20 * 1rem / var(--kolibri-root-font-size, 16));\n -webkit-appearance: none;\n }\n .kol-input-range__input:not(:disabled).kol-input-range__input--range::-webkit-slider-thumb {\n cursor: pointer;\n }\n @media (prefers-contrast: more) or (forced-colors: active) {\n .kol-input-range__input--range::-webkit-slider-thumb {\n outline: 1px solid currentColor;\n }\n }\n .kol-input-range__input--range::-moz-range-thumb {\n background-color: #000;\n border-radius: 20px;\n width: calc(20 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(20 * 1rem / var(--kolibri-root-font-size, 16));\n -moz-appearance: none;\n }\n .kol-input-range__input:not(:disabled).kol-input-range__input--range::-moz-range-thumb {\n cursor: pointer;\n }\n}",KolInputRange=class{async kolFocus(){var e;null===(e=this.refInputNumber)||void 0===e||e.focus()}getSanitizedFloatValue(e){const t=parseFloat(e);return this.state._max&&t>this.state._max?this.state._max:this.state._min&&t<this.state._min?this.state._min:t}remapValue(e){return"NumberString"===this._initialValueType?String(e):e}async getValue(){if(void 0!==this.refInputNumber){const e=this.refInputNumber.value,t=this.getSanitizedFloatValue(e);return this.remapValue(t)}}componentDidLoad(){var e;!this._value&&(null===(e=this.refInputRange)||void 0===e?void 0:e.value)&&this.validateValue(parseFloat(this.refInputRange.value))}getFormFieldProps(){return{state:this.state,class:clsx.clsx("kol-input-range","range"),tooltipAlign:this._tooltipAlign,onClick:()=>{var e;return null===(e=this.refInputRange)||void 0===e?void 0:e.focus()},alert:this.showAsAlert()}}getGenericInputProps(){const e=this.state,t=Heading.__rest(e,["_suggestions"]);return Object.assign(Object.assign({state:Object.assign(Object.assign({},t),{_suggestions:[]})},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}})}get hasSuggestions(){return Array.isArray(this.state._suggestions)&&this.state._suggestions.length>0}getInputRangeProps(){return Object.assign(Object.assign({},this.getGenericInputProps()),{name:this.state._name?`${this.state._name}-range`:void 0,list:this.hasSuggestions?`${this.state._id}-list`:void 0,type:"range",tabIndex:-1,id:void 0,"aria-hidden":"true",ref:this.catchInputRangeRef})}getInputNumberProps(){return Object.assign(Object.assign({},this.getGenericInputProps()),{name:this.state._name?`${this.state._name}-number`:void 0,list:this.hasSuggestions?`${this.state._id}-list`:void 0,type:"number",ref:this.catchInputNumberRef,onKeyDown:this.onKeyDown})}setInitialValueType(e){this.controller.isNumberString(e)?this._initialValueType="NumberString":this._initialValueType="number"}render(){const e={"--kolibri-input-range--input-number--width":`calc(${String(this.state._max).length}ch + 2em)`};return index.h(FormFieldStateWrapper.FormFieldStateWrapper,Object.assign({key:"e3e9fb11ff4d39fa7ff026f44a7b1c5f641ce5bb"},this.getFormFieldProps()),index.h(controllerIcon.InputContainerStateWrapperFc,{key:"b417e5958d7bb3c47d33da8f6ee40e608763d017",state:this.state},index.h("div",{key:"1aa36e21a2ae4506e5f3a88591c415aaca97a3a4",class:"kol-input-range__inputs-wrapper",style:e},index.h(InputStateWrapper.InputStateWrapper,Object.assign({key:"437e6c12290b4720d7af01e4d8b425fdb64b2ed4",class:"kol-input-range__input kol-input-range__input--range"},this.getInputRangeProps())),index.h(InputStateWrapper.InputStateWrapper,Object.assign({key:"7122c0a209c3a6b44ab4646531d5a7cc41b992b4",class:"kol-input-range__input kol-input-range__input--number"},this.getInputNumberProps()))),this.hasSuggestions&&index.h(InputStateWrapper.SuggestionsFc,{key:"f96a8d6c596b28a40f9bc5a5c72738e9a588a45e",id:this.state._id,suggestions:this.state._suggestions})))}constructor(e){index.registerInstance(this,e),this.catchInputNumberRef=e=>{var t;e&&(this.refInputNumber=e,!this._value&&(null===(t=this.refInputNumber)||void 0===t?void 0:t.value)&&this.validateValue(parseFloat(this.refInputNumber.value)))},this.catchInputRangeRef=e=>{e&&(this.refInputRange=e)},this.onInput=e=>{const t=e.target.value,n=this.getSanitizedFloatValue(t);this.controller.onFacade.onInput(e,!0,this.remapValue(n))},this.onChange=e=>{const t=e.target.value,n=this.getSanitizedFloatValue(t),i=this.remapValue(n);this.validateValue(i),this.controller.onFacade.onChange(e,i)},this.onKeyDown=e=>{"Enter"!==e.code&&"NumpadEnter"!==e.code||controller.propagateSubmitEventToForm({form:this.host})},this._autoComplete="off",this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._max=100,this._min=0,this._tooltipAlign="top",this._touched=!1,this.state={_hideMsg:!1,_id:`id-${dev_utils.nonce()}`,_label:"",_suggestions:[],_min:0,_max:100},this._initialValueType="number",this.inputHasFocus=!1,this.controller=new InputRangeController(this,"range",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)}validateShortKey(e){this.controller.validateShortKey(e)}validateStep(e){this.controller.validateStep(e)}validateSuggestions(e){this.controller.validateSuggestions(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e),void 0!==e&&this.setInitialValueType(e)}componentWillLoad(){void 0!==this._value&&this.setInitialValueType(this._value),this._touched=!0===this._touched,this.controller.componentWillLoad()}static get delegatesFocus(){return!0}get host(){return index.getElement(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"],_shortKey:["validateShortKey"],_step:["validateStep"],_suggestions:["validateSuggestions"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"]}}};KolInputRange.style={default:defaultStyleCss},exports.kol_input_range=KolInputRange;
4
+ "use strict";var index=require("./index-B45suXZe.js"),Heading=require("./Heading-BG41fGAb.js"),clsx=require("./clsx-CkZlkaek.js"),dev_utils=require("./dev.utils-DMUEnh4U.js"),controller=require("./controller-BF3IbQCZ.js"),FormFieldStateWrapper=require("./FormFieldStateWrapper-jfw6Co4e.js"),InputStateWrapper=require("./InputStateWrapper-CTLKkLjX.js"),controllerIcon=require("./controller-icon-CsyY2Y7g.js");require("./common-Cd2qH809.js");var autoComplete=require("./auto-complete-DQ9TPAgi.js"),suggestions=require("./suggestions-BjiW0xio.js");require("./component-names-D7MwtuB7.js"),require("./access-and-short-key-BExF929g.js"),require("./disabled-DT-7CUov.js"),require("./hide-label-DdGk9NfD.js"),require("./label-Nicf9N_T.js"),require("./tooltip-align-WJPFINTL.js"),require("./align-CGG5V8xM.js"),require("./events-DDhO-Ns8.js"),require("./associated.controller-Dpp0zVIP.js"),require("./bootstrap-B3uKTmEF.js"),require("./i18n-Drgbs46L.js"),require("./isObject-DMA85Fq4.js"),require("./Alert-DvfeipJE.js"),require("./i18n-NiDr3RbD.js"),require("./bem-DnR3ZJW_.js"),require("./browser-CUgMyC7t.js"),require("./InternalUnderlinedBadgeText-WlYX4I5I.js"),require("./reuse-Cs36Ddzu.js"),require("./Input-Corn2DzL.js"),require("./Icon-Io_PDRaI.js"),require("./icons-CvKgcv20.js");class InputRangeController extends controllerIcon.InputIconController{constructor(e,t,n){super(e,t,n),this.component=e}validateAutoComplete(e){autoComplete.validateAutoComplete(this.component,e)}validateMax(e){this.validateNumber("_max",e)}validateMin(e){this.validateNumber("_min",e)}validateStep(e){this.validateNumber("_step",e)}validateSuggestions(e){suggestions.validateSuggestions(this.component,e)}validateValue(e){this.validateNumber("_value",e),this.component._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.validateStep(this.component._step),this.validateSuggestions(this.component._suggestions),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);\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-range__inputs-wrapper {\n display: flex;\n flex-grow: 1;\n flex-direction: row;\n align-items: center;\n }\n .kol-input-range__input--number {\n width: var(--kolibri-input-range--input-number--width);\n }\n .kol-input-range__input--range {\n background-color: #d3d3d3;\n display: inline-block;\n /* Design-Hack - related with flex-grow */\n width: 0;\n height: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n margin: 0;\n padding: 0;\n flex-grow: 1;\n line-height: 1.5;\n appearance: none;\n border: 1px solid #000;\n }\n .kol-input-range__input--range::-webkit-slider-thumb {\n background-color: #000;\n border-radius: 20px;\n width: calc(20 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(20 * 1rem / var(--kolibri-root-font-size, 16));\n -webkit-appearance: none;\n }\n .kol-input-range__input:not(:disabled).kol-input-range__input--range::-webkit-slider-thumb {\n cursor: pointer;\n }\n @media (prefers-contrast: more) or (forced-colors: active) {\n .kol-input-range__input--range::-webkit-slider-thumb {\n outline: 1px solid currentColor;\n }\n }\n .kol-input-range__input--range::-moz-range-thumb {\n background-color: #000;\n border-radius: 20px;\n width: calc(20 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(20 * 1rem / var(--kolibri-root-font-size, 16));\n -moz-appearance: none;\n }\n .kol-input-range__input:not(:disabled).kol-input-range__input--range::-moz-range-thumb {\n cursor: pointer;\n }\n}",KolInputRange=class{async kolFocus(){var e;null===(e=this.refInputNumber)||void 0===e||e.focus()}getSanitizedFloatValue(e){const t=parseFloat(e);return this.state._max&&t>this.state._max?this.state._max:this.state._min&&t<this.state._min?this.state._min:t}remapValue(e){return"NumberString"===this._initialValueType?String(e):e}async getValue(){if(void 0!==this.refInputNumber){const e=this.refInputNumber.value,t=this.getSanitizedFloatValue(e);return this.remapValue(t)}}componentDidLoad(){var e;!this._value&&(null===(e=this.refInputRange)||void 0===e?void 0:e.value)&&this.validateValue(parseFloat(this.refInputRange.value))}getFormFieldProps(){return{state:this.state,class:clsx.clsx("kol-input-range","range"),tooltipAlign:this._tooltipAlign,onClick:()=>{var e;return null===(e=this.refInputRange)||void 0===e?void 0:e.focus()},alert:this.showAsAlert()}}getGenericInputProps(){const e=this.state,t=Heading.__rest(e,["_suggestions"]);return Object.assign(Object.assign({state:Object.assign(Object.assign({},t),{_suggestions:[]})},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}})}get hasSuggestions(){return Array.isArray(this.state._suggestions)&&this.state._suggestions.length>0}getInputRangeProps(){return Object.assign(Object.assign({},this.getGenericInputProps()),{name:this.state._name?`${this.state._name}-range`:void 0,list:this.hasSuggestions?`${this.state._id}-list`:void 0,type:"range",tabIndex:-1,id:void 0,"aria-hidden":"true",ref:this.catchInputRangeRef})}getInputNumberProps(){return Object.assign(Object.assign({},this.getGenericInputProps()),{name:this.state._name?`${this.state._name}-number`:void 0,list:this.hasSuggestions?`${this.state._id}-list`:void 0,type:"number",ref:this.catchInputNumberRef,onKeyDown:this.onKeyDown})}setInitialValueType(e){this.controller.isNumberString(e)?this._initialValueType="NumberString":this._initialValueType="number"}render(){const e={"--kolibri-input-range--input-number--width":`calc(${String(this.state._max).length}ch + 2em)`};return index.h(FormFieldStateWrapper.FormFieldStateWrapper,Object.assign({key:"e3e9fb11ff4d39fa7ff026f44a7b1c5f641ce5bb"},this.getFormFieldProps()),index.h(controllerIcon.InputContainerStateWrapperFc,{key:"b417e5958d7bb3c47d33da8f6ee40e608763d017",state:this.state},index.h("div",{key:"1aa36e21a2ae4506e5f3a88591c415aaca97a3a4",class:"kol-input-range__inputs-wrapper",style:e},index.h(InputStateWrapper.InputStateWrapper,Object.assign({key:"437e6c12290b4720d7af01e4d8b425fdb64b2ed4",class:"kol-input-range__input kol-input-range__input--range"},this.getInputRangeProps())),index.h(InputStateWrapper.InputStateWrapper,Object.assign({key:"7122c0a209c3a6b44ab4646531d5a7cc41b992b4",class:"kol-input-range__input kol-input-range__input--number"},this.getInputNumberProps()))),this.hasSuggestions&&index.h(InputStateWrapper.SuggestionsFc,{key:"f96a8d6c596b28a40f9bc5a5c72738e9a588a45e",id:this.state._id,suggestions:this.state._suggestions})))}constructor(e){index.registerInstance(this,e),this.catchInputNumberRef=e=>{var t;e&&(this.refInputNumber=e,!this._value&&(null===(t=this.refInputNumber)||void 0===t?void 0:t.value)&&this.validateValue(parseFloat(this.refInputNumber.value)))},this.catchInputRangeRef=e=>{e&&(this.refInputRange=e)},this.onInput=e=>{const t=e.target.value,n=this.getSanitizedFloatValue(t);this.controller.onFacade.onInput(e,!0,this.remapValue(n))},this.onChange=e=>{const t=e.target.value,n=this.getSanitizedFloatValue(t),i=this.remapValue(n);this.validateValue(i),this.controller.onFacade.onChange(e,i)},this.onKeyDown=e=>{"Enter"!==e.code&&"NumpadEnter"!==e.code||controller.propagateSubmitEventToForm({form:this.host})},this._autoComplete="off",this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._max=100,this._min=0,this._tooltipAlign="top",this._touched=!1,this.state={_hideMsg:!1,_id:`id-${dev_utils.nonce()}`,_label:"",_suggestions:[],_min:0,_max:100},this._initialValueType="number",this.inputHasFocus=!1,this.controller=new InputRangeController(this,"range",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)}validateShortKey(e){this.controller.validateShortKey(e)}validateStep(e){this.controller.validateStep(e)}validateSuggestions(e){this.controller.validateSuggestions(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e),void 0!==e&&this.setInitialValueType(e)}componentWillLoad(){void 0!==this._value&&this.setInitialValueType(this._value),this._touched=!0===this._touched,this.controller.componentWillLoad()}static get delegatesFocus(){return!0}get host(){return index.getElement(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"],_shortKey:["validateShortKey"],_step:["validateStep"],_suggestions:["validateSuggestions"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"]}}};KolInputRange.style={default:defaultStyleCss},exports.kol_input_range=KolInputRange;