@public-ui/components 3.0.8-rc.1 → 3.0.8-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (418) hide show
  1. package/custom-elements.json +1 -1
  2. package/dist/cjs/{Alert-DV-4s1Xb.js → Alert-JX8-hc0V.js} +1 -1
  3. package/dist/cjs/{Alert-DV-4s1Xb.js.map → Alert-JX8-hc0V.js.map} +1 -1
  4. package/dist/cjs/{Collapsible-Dc2UP6Fq.js → Collapsible-usRciGG7.js} +1 -1
  5. package/dist/cjs/{Collapsible-Dc2UP6Fq.js.map → Collapsible-usRciGG7.js.map} +1 -1
  6. package/dist/cjs/{CustomSuggestionsOptionsGroup-BBkNAS1H.js → CustomSuggestionsOptionsGroup-ChMiUadq.js} +1 -1
  7. package/dist/cjs/{CustomSuggestionsOptionsGroup-BBkNAS1H.js.map → CustomSuggestionsOptionsGroup-ChMiUadq.js.map} +1 -1
  8. package/dist/cjs/{FieldControlStateWrapper-CLQjSzCV.js → FieldControlStateWrapper-fdSseV_4.js} +1 -1
  9. package/dist/cjs/{FieldControlStateWrapper-CLQjSzCV.js.map → FieldControlStateWrapper-fdSseV_4.js.map} +1 -1
  10. package/dist/cjs/{FormFieldStateWrapper-Dc4wsP5R.js → FormFieldStateWrapper-8H_mz97x.js} +1 -1
  11. package/dist/cjs/{FormFieldStateWrapper-Dc4wsP5R.js.map → FormFieldStateWrapper-8H_mz97x.js.map} +1 -1
  12. package/dist/cjs/{Heading-DxQNJzeS.js → Heading-BbySLyvy.js} +1 -1
  13. package/dist/cjs/{Heading-DxQNJzeS.js.map → Heading-BbySLyvy.js.map} +1 -1
  14. package/dist/cjs/Icon-ljpnXnIy.js +4 -0
  15. package/dist/cjs/{Icon-rMLb2zeC.js.map → Icon-ljpnXnIy.js.map} +1 -1
  16. package/dist/cjs/{Input-GSpNdBwc.js → Input-DNnRCJRY.js} +1 -1
  17. package/dist/cjs/{Input-GSpNdBwc.js.map → Input-DNnRCJRY.js.map} +1 -1
  18. package/dist/cjs/{InputStateWrapper-q1xpVuqJ.js → InputStateWrapper-EveAjLyV.js} +1 -1
  19. package/dist/cjs/{InputStateWrapper-q1xpVuqJ.js.map → InputStateWrapper-EveAjLyV.js.map} +1 -1
  20. package/dist/cjs/{InternalUnderlinedBadgeText-BCjxHsIf.js → InternalUnderlinedBadgeText-DKHlp1B_.js} +1 -1
  21. package/dist/cjs/{InternalUnderlinedBadgeText-BCjxHsIf.js.map → InternalUnderlinedBadgeText-DKHlp1B_.js.map} +1 -1
  22. package/dist/cjs/{Span-5wAoBjAv.js → Span-D54T5Fa8.js} +1 -1
  23. package/dist/cjs/{Span-5wAoBjAv.js.map → Span-D54T5Fa8.js.map} +1 -1
  24. package/dist/cjs/{app-globals-Bvdv6BV6.js → app-globals-B4gWI_Z1.js} +1 -1
  25. package/dist/cjs/{app-globals-Bvdv6BV6.js.map → app-globals-B4gWI_Z1.js.map} +1 -1
  26. package/dist/cjs/{controller-BG68H9_f.js → controller-CTmL4E6J.js} +1 -1
  27. package/dist/cjs/{controller-BG68H9_f.js.map → controller-CTmL4E6J.js.map} +1 -1
  28. package/dist/cjs/{controller-icon-JVj5EC2t.js → controller-icon-D0aCitD_.js} +1 -1
  29. package/dist/cjs/{controller-icon-JVj5EC2t.js.map → controller-icon-D0aCitD_.js.map} +1 -1
  30. package/dist/cjs/{controller-C7ONLqfz.js → controller-kUTMMyt0.js} +1 -1
  31. package/dist/cjs/{controller-C7ONLqfz.js.map → controller-kUTMMyt0.js.map} +1 -1
  32. package/dist/cjs/{controller-q6EnLJOP.js → controller-yhCf6UIE.js} +1 -1
  33. package/dist/cjs/{controller-q6EnLJOP.js.map → controller-yhCf6UIE.js.map} +1 -1
  34. package/dist/cjs/{dev.utils-Cz8uPtt2.js → dev.utils-Bid0DCHW.js} +1 -1
  35. package/dist/cjs/{dev.utils-Cz8uPtt2.js.map → dev.utils-Bid0DCHW.js.map} +1 -1
  36. package/dist/cjs/{devtools-WX2qN2B0.js → devtools-DF7qSis6.js} +1 -1
  37. package/dist/cjs/{devtools-WX2qN2B0.js.map → devtools-DF7qSis6.js.map} +1 -1
  38. package/dist/cjs/index-BcgPd1xa.js +4 -0
  39. package/dist/cjs/index-BcgPd1xa.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-accordion.entry.cjs.js.map +1 -1
  43. package/dist/cjs/kol-alert-wc.cjs.entry.js +1 -1
  44. package/dist/cjs/kol-alert.cjs.entry.js +1 -1
  45. package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
  46. package/dist/cjs/kol-avatar.cjs.entry.js +1 -1
  47. package/dist/cjs/kol-badge.cjs.entry.js +1 -1
  48. package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
  49. package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
  50. package/dist/cjs/kol-button-wc.cjs.entry.js +1 -1
  51. package/dist/cjs/kol-button-wc.entry.cjs.js.map +1 -1
  52. package/dist/cjs/kol-button.cjs.entry.js +1 -1
  53. package/dist/cjs/kol-card-wc.cjs.entry.js +1 -1
  54. package/dist/cjs/kol-card.cjs.entry.js +1 -1
  55. package/dist/cjs/kol-combobox.cjs.entry.js +1 -1
  56. package/dist/cjs/kol-details.cjs.entry.js +1 -1
  57. package/dist/cjs/kol-details.entry.cjs.js.map +1 -1
  58. package/dist/cjs/kol-drawer.cjs.entry.js +1 -1
  59. package/dist/cjs/kol-form.cjs.entry.js +1 -1
  60. package/dist/cjs/kol-heading.cjs.entry.js +1 -1
  61. package/dist/cjs/kol-icon.cjs.entry.js +1 -1
  62. package/dist/cjs/kol-image.cjs.entry.js +1 -1
  63. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  64. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  65. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  66. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  67. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  68. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  69. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  70. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  71. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  72. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  73. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  74. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  75. package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
  76. package/dist/cjs/kol-link-wc.entry.cjs.js.map +1 -1
  77. package/dist/cjs/kol-link.cjs.entry.js +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-pagination-wc.cjs.entry.js +1 -1
  81. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  82. package/dist/cjs/kol-popover-button-wc.cjs.entry.js +1 -1
  83. package/dist/cjs/kol-popover-button-wc.entry.cjs.js.map +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-popover-wc.entry.cjs.js.map +1 -1
  87. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  88. package/dist/cjs/kol-quote.cjs.entry.js +1 -1
  89. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  90. package/dist/cjs/kol-select.entry.cjs.js.map +1 -1
  91. package/dist/cjs/kol-single-select.cjs.entry.js +1 -1
  92. package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
  93. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  94. package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
  95. package/dist/cjs/kol-table-settings-wc.cjs.entry.js +1 -1
  96. package/dist/cjs/kol-table-settings-wc.entry.cjs.js.map +1 -1
  97. package/dist/cjs/kol-table-stateful.cjs.entry.js +1 -1
  98. package/dist/cjs/kol-table-stateful.entry.cjs.js.map +1 -1
  99. package/dist/cjs/kol-table-stateless-wc.cjs.entry.js +1 -1
  100. package/dist/cjs/kol-table-stateless-wc.entry.cjs.js.map +1 -1
  101. package/dist/cjs/kol-table-stateless.cjs.entry.js +1 -1
  102. package/dist/cjs/kol-table-stateless.entry.cjs.js.map +1 -1
  103. package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
  104. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  105. package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
  106. package/dist/cjs/kol-toolbar.cjs.entry.js +1 -1
  107. package/dist/cjs/kol-tooltip-wc.cjs.entry.js +1 -1
  108. package/dist/cjs/kol-tooltip-wc.entry.cjs.js.map +1 -1
  109. package/dist/cjs/kol-tree-item-wc.cjs.entry.js +1 -1
  110. package/dist/cjs/kol-tree-item.cjs.entry.js +1 -1
  111. package/dist/cjs/kol-tree-wc.cjs.entry.js +1 -1
  112. package/dist/cjs/kol-tree.cjs.entry.js +1 -1
  113. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  114. package/dist/cjs/kolibri.cjs.js +1 -1
  115. package/dist/cjs/kolibri.cjs.js.map +1 -1
  116. package/dist/cjs/loader.cjs.js +1 -1
  117. package/dist/cjs/test-component.cjs.entry.js +1 -1
  118. package/dist/components/kol-accordion.js +1 -1
  119. package/dist/components/kol-accordion.js.map +1 -1
  120. package/dist/components/kol-breadcrumb.js +1 -1
  121. package/dist/components/kol-button-link.js +1 -1
  122. package/dist/components/kol-button-wc.js +1 -1
  123. package/dist/components/kol-button-wc.js.map +1 -1
  124. package/dist/components/kol-details.js +1 -1
  125. package/dist/components/kol-details.js.map +1 -1
  126. package/dist/components/kol-form.js +1 -1
  127. package/dist/components/kol-input-range.js +1 -1
  128. package/dist/components/kol-link-wc.js +1 -1
  129. package/dist/components/kol-link-wc.js.map +1 -1
  130. package/dist/components/kol-link.js +1 -1
  131. package/dist/components/kol-popover-button-wc.js +1 -1
  132. package/dist/components/kol-popover-button-wc.js.map +1 -1
  133. package/dist/components/kol-popover-wc.js +1 -1
  134. package/dist/components/kol-popover-wc.js.map +1 -1
  135. package/dist/components/kol-quote.js +1 -1
  136. package/dist/components/kol-select.js +1 -1
  137. package/dist/components/kol-select.js.map +1 -1
  138. package/dist/components/kol-table-settings-wc.js +1 -1
  139. package/dist/components/kol-table-settings-wc.js.map +1 -1
  140. package/dist/components/kol-table-stateful.js +1 -1
  141. package/dist/components/kol-table-stateful.js.map +1 -1
  142. package/dist/components/kol-table-stateless-wc.js +1 -1
  143. package/dist/components/kol-table-stateless-wc.js.map +1 -1
  144. package/dist/components/kol-table-stateless.js +1 -1
  145. package/dist/components/kol-table-stateless.js.map +1 -1
  146. package/dist/components/kol-tooltip-wc.js +1 -1
  147. package/dist/components/kol-tooltip-wc.js.map +1 -1
  148. package/dist/esm/{Alert-B3jx2jlL.js → Alert-DtvOOMUX.js} +1 -1
  149. package/dist/{kolibri/Alert-B3jx2jlL.js.map → esm/Alert-DtvOOMUX.js.map} +1 -1
  150. package/dist/esm/{Collapsible-DOnIFY33.js → Collapsible-BF3IrE6t.js} +1 -1
  151. package/dist/esm/{Collapsible-DOnIFY33.js.map → Collapsible-BF3IrE6t.js.map} +1 -1
  152. package/dist/esm/{CustomSuggestionsOptionsGroup-BiywiWxx.js → CustomSuggestionsOptionsGroup-BXcv2wXg.js} +1 -1
  153. package/dist/esm/{CustomSuggestionsOptionsGroup-BiywiWxx.js.map → CustomSuggestionsOptionsGroup-BXcv2wXg.js.map} +1 -1
  154. package/dist/esm/{FieldControlStateWrapper-oMcmUdOF.js → FieldControlStateWrapper-vSHoKkZu.js} +1 -1
  155. package/dist/{kolibri/FieldControlStateWrapper-oMcmUdOF.js.map → esm/FieldControlStateWrapper-vSHoKkZu.js.map} +1 -1
  156. package/dist/esm/{FormFieldStateWrapper-BBrHIwy9.js → FormFieldStateWrapper--mfN3zxB.js} +1 -1
  157. package/dist/{kolibri/FormFieldStateWrapper-BBrHIwy9.js.map → esm/FormFieldStateWrapper--mfN3zxB.js.map} +1 -1
  158. package/dist/esm/{Heading-DqUSmJEO.js → Heading-CtNjSZvy.js} +1 -1
  159. package/dist/{kolibri/Heading-DqUSmJEO.js.map → esm/Heading-CtNjSZvy.js.map} +1 -1
  160. package/dist/esm/Icon-C0YAvZYM.js +4 -0
  161. package/dist/esm/{Icon-B-YLFbev.js.map → Icon-C0YAvZYM.js.map} +1 -1
  162. package/dist/esm/Input-uDwRZfTu.js +4 -0
  163. package/dist/esm/{Input-D-UExd4D.js.map → Input-uDwRZfTu.js.map} +1 -1
  164. package/dist/esm/{InputStateWrapper-WDItQP2r.js → InputStateWrapper-DPKOPHLb.js} +1 -1
  165. package/dist/esm/{InputStateWrapper-WDItQP2r.js.map → InputStateWrapper-DPKOPHLb.js.map} +1 -1
  166. package/dist/esm/{InternalUnderlinedBadgeText-CodJXcQG.js → InternalUnderlinedBadgeText-B_K9YhEU.js} +1 -1
  167. package/dist/esm/{InternalUnderlinedBadgeText-CodJXcQG.js.map → InternalUnderlinedBadgeText-B_K9YhEU.js.map} +1 -1
  168. package/dist/esm/{Span-BUH9xZLf.js → Span-BDnbWXOy.js} +1 -1
  169. package/dist/esm/{Span-BUH9xZLf.js.map → Span-BDnbWXOy.js.map} +1 -1
  170. package/dist/esm/{app-globals-C4Hgadub.js → app-globals-EjgzIaKw.js} +1 -1
  171. package/dist/esm/{app-globals-C4Hgadub.js.map → app-globals-EjgzIaKw.js.map} +1 -1
  172. package/dist/esm/{controller-CzLzXDtQ.js → controller-CzA8VVx0.js} +1 -1
  173. package/dist/esm/{controller-CzLzXDtQ.js.map → controller-CzA8VVx0.js.map} +1 -1
  174. package/dist/esm/{controller-BPnEmeBr.js → controller-DZi-VgTc.js} +1 -1
  175. package/dist/esm/{controller-BPnEmeBr.js.map → controller-DZi-VgTc.js.map} +1 -1
  176. package/dist/esm/{controller-CBNM6BpO.js → controller-GoVirgjr.js} +1 -1
  177. package/dist/esm/{controller-CBNM6BpO.js.map → controller-GoVirgjr.js.map} +1 -1
  178. package/dist/esm/{controller-icon-DNLRSXZr.js → controller-icon-Os52h8zb.js} +1 -1
  179. package/dist/esm/{controller-icon-DNLRSXZr.js.map → controller-icon-Os52h8zb.js.map} +1 -1
  180. package/dist/esm/{dev.utils-BB49mRnl.js → dev.utils-CMwuN6qh.js} +1 -1
  181. package/dist/esm/{dev.utils-BB49mRnl.js.map → dev.utils-CMwuN6qh.js.map} +1 -1
  182. package/dist/esm/{devtools-6yxauOZx.js → devtools-B5bExzS0.js} +1 -1
  183. package/dist/esm/{devtools-6yxauOZx.js.map → devtools-B5bExzS0.js.map} +1 -1
  184. package/dist/esm/index-BIF3a06U.js +4 -0
  185. package/dist/esm/index-BIF3a06U.js.map +1 -0
  186. package/dist/esm/kol-abbr.entry.js +1 -1
  187. package/dist/esm/kol-accordion.entry.js +1 -1
  188. package/dist/esm/kol-accordion.entry.js.map +1 -1
  189. package/dist/esm/kol-alert-wc.entry.js +1 -1
  190. package/dist/esm/kol-alert.entry.js +1 -1
  191. package/dist/esm/kol-avatar-wc.entry.js +1 -1
  192. package/dist/esm/kol-avatar.entry.js +1 -1
  193. package/dist/esm/kol-badge.entry.js +1 -1
  194. package/dist/esm/kol-breadcrumb.entry.js +1 -1
  195. package/dist/esm/kol-button-link.entry.js +1 -1
  196. package/dist/esm/kol-button-wc.entry.js +1 -1
  197. package/dist/esm/kol-button-wc.entry.js.map +1 -1
  198. package/dist/esm/kol-button.entry.js +1 -1
  199. package/dist/esm/kol-card-wc.entry.js +1 -1
  200. package/dist/esm/kol-card.entry.js +1 -1
  201. package/dist/esm/kol-combobox.entry.js +1 -1
  202. package/dist/esm/kol-details.entry.js +1 -1
  203. package/dist/esm/kol-details.entry.js.map +1 -1
  204. package/dist/esm/kol-drawer.entry.js +1 -1
  205. package/dist/esm/kol-form.entry.js +1 -1
  206. package/dist/esm/kol-heading.entry.js +1 -1
  207. package/dist/esm/kol-icon.entry.js +1 -1
  208. package/dist/esm/kol-image.entry.js +1 -1
  209. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  210. package/dist/esm/kol-input-color.entry.js +1 -1
  211. package/dist/esm/kol-input-date.entry.js +1 -1
  212. package/dist/esm/kol-input-email.entry.js +1 -1
  213. package/dist/esm/kol-input-file.entry.js +1 -1
  214. package/dist/esm/kol-input-number.entry.js +1 -1
  215. package/dist/esm/kol-input-password.entry.js +1 -1
  216. package/dist/esm/kol-input-radio.entry.js +1 -1
  217. package/dist/esm/kol-input-range.entry.js +1 -1
  218. package/dist/esm/kol-input-text.entry.js +1 -1
  219. package/dist/esm/kol-kolibri.entry.js +1 -1
  220. package/dist/esm/kol-link-button.entry.js +1 -1
  221. package/dist/esm/kol-link-wc.entry.js +1 -1
  222. package/dist/esm/kol-link-wc.entry.js.map +1 -1
  223. package/dist/esm/kol-link.entry.js +1 -1
  224. package/dist/esm/kol-modal.entry.js +1 -1
  225. package/dist/esm/kol-nav.entry.js +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-wc.entry.js.map +1 -1
  230. package/dist/esm/kol-popover-button.entry.js +1 -1
  231. package/dist/esm/kol-popover-wc.entry.js +1 -1
  232. package/dist/esm/kol-popover-wc.entry.js.map +1 -1
  233. package/dist/esm/kol-progress.entry.js +1 -1
  234. package/dist/esm/kol-quote.entry.js +1 -1
  235. package/dist/esm/kol-select.entry.js +1 -1
  236. package/dist/esm/kol-select.entry.js.map +1 -1
  237. package/dist/esm/kol-single-select.entry.js +1 -1
  238. package/dist/esm/kol-skip-nav.entry.js +1 -1
  239. package/dist/esm/kol-spin.entry.js +1 -1
  240. package/dist/esm/kol-split-button.entry.js +1 -1
  241. package/dist/esm/kol-table-settings-wc.entry.js +1 -1
  242. package/dist/esm/kol-table-settings-wc.entry.js.map +1 -1
  243. package/dist/esm/kol-table-stateful.entry.js +1 -1
  244. package/dist/esm/kol-table-stateful.entry.js.map +1 -1
  245. package/dist/esm/kol-table-stateless-wc.entry.js +1 -1
  246. package/dist/esm/kol-table-stateless-wc.entry.js.map +1 -1
  247. package/dist/esm/kol-table-stateless.entry.js +1 -1
  248. package/dist/esm/kol-table-stateless.entry.js.map +1 -1
  249. package/dist/esm/kol-tabs.entry.js +1 -1
  250. package/dist/esm/kol-textarea.entry.js +1 -1
  251. package/dist/esm/kol-toast-container.entry.js +1 -1
  252. package/dist/esm/kol-toolbar.entry.js +1 -1
  253. package/dist/esm/kol-tooltip-wc.entry.js +1 -1
  254. package/dist/esm/kol-tooltip-wc.entry.js.map +1 -1
  255. package/dist/esm/kol-tree-item-wc.entry.js +1 -1
  256. package/dist/esm/kol-tree-item.entry.js +1 -1
  257. package/dist/esm/kol-tree-wc.entry.js +1 -1
  258. package/dist/esm/kol-tree.entry.js +1 -1
  259. package/dist/esm/kol-version.entry.js +1 -1
  260. package/dist/esm/kolibri.js +1 -1
  261. package/dist/esm/kolibri.js.map +1 -1
  262. package/dist/esm/loader.js +1 -1
  263. package/dist/esm/test-component.entry.js +1 -1
  264. package/dist/kolibri/{Alert-B3jx2jlL.js → Alert-DtvOOMUX.js} +1 -1
  265. package/dist/{esm/Alert-B3jx2jlL.js.map → kolibri/Alert-DtvOOMUX.js.map} +1 -1
  266. package/dist/kolibri/{Collapsible-DOnIFY33.js → Collapsible-BF3IrE6t.js} +1 -1
  267. package/dist/kolibri/{Collapsible-DOnIFY33.js.map → Collapsible-BF3IrE6t.js.map} +1 -1
  268. package/dist/kolibri/{CustomSuggestionsOptionsGroup-BiywiWxx.js → CustomSuggestionsOptionsGroup-BXcv2wXg.js} +1 -1
  269. package/dist/kolibri/{CustomSuggestionsOptionsGroup-BiywiWxx.js.map → CustomSuggestionsOptionsGroup-BXcv2wXg.js.map} +1 -1
  270. package/dist/kolibri/{FieldControlStateWrapper-oMcmUdOF.js → FieldControlStateWrapper-vSHoKkZu.js} +1 -1
  271. package/dist/{esm/FieldControlStateWrapper-oMcmUdOF.js.map → kolibri/FieldControlStateWrapper-vSHoKkZu.js.map} +1 -1
  272. package/dist/kolibri/{FormFieldStateWrapper-BBrHIwy9.js → FormFieldStateWrapper--mfN3zxB.js} +1 -1
  273. package/dist/{esm/FormFieldStateWrapper-BBrHIwy9.js.map → kolibri/FormFieldStateWrapper--mfN3zxB.js.map} +1 -1
  274. package/dist/kolibri/{Heading-DqUSmJEO.js → Heading-CtNjSZvy.js} +1 -1
  275. package/dist/{esm/Heading-DqUSmJEO.js.map → kolibri/Heading-CtNjSZvy.js.map} +1 -1
  276. package/dist/kolibri/Icon-C0YAvZYM.js +4 -0
  277. package/dist/kolibri/{Icon-B-YLFbev.js.map → Icon-C0YAvZYM.js.map} +1 -1
  278. package/dist/kolibri/Input-uDwRZfTu.js +4 -0
  279. package/dist/kolibri/{Input-D-UExd4D.js.map → Input-uDwRZfTu.js.map} +1 -1
  280. package/dist/kolibri/{InputStateWrapper-WDItQP2r.js → InputStateWrapper-DPKOPHLb.js} +1 -1
  281. package/dist/kolibri/{InputStateWrapper-WDItQP2r.js.map → InputStateWrapper-DPKOPHLb.js.map} +1 -1
  282. package/dist/kolibri/InternalUnderlinedBadgeText-B_K9YhEU.js +4 -0
  283. package/dist/kolibri/{InternalUnderlinedBadgeText-CodJXcQG.js.map → InternalUnderlinedBadgeText-B_K9YhEU.js.map} +1 -1
  284. package/dist/kolibri/Span-BDnbWXOy.js +4 -0
  285. package/dist/kolibri/{Span-BUH9xZLf.js.map → Span-BDnbWXOy.js.map} +1 -1
  286. package/dist/kolibri/{app-globals-C4Hgadub.js → app-globals-EjgzIaKw.js} +1 -1
  287. package/dist/kolibri/{app-globals-C4Hgadub.js.map → app-globals-EjgzIaKw.js.map} +1 -1
  288. package/dist/kolibri/{controller-CzLzXDtQ.js → controller-CzA8VVx0.js} +1 -1
  289. package/dist/kolibri/{controller-CzLzXDtQ.js.map → controller-CzA8VVx0.js.map} +1 -1
  290. package/dist/kolibri/{controller-BPnEmeBr.js → controller-DZi-VgTc.js} +1 -1
  291. package/dist/kolibri/{controller-BPnEmeBr.js.map → controller-DZi-VgTc.js.map} +1 -1
  292. package/dist/kolibri/{controller-CBNM6BpO.js → controller-GoVirgjr.js} +1 -1
  293. package/dist/kolibri/{controller-CBNM6BpO.js.map → controller-GoVirgjr.js.map} +1 -1
  294. package/dist/kolibri/{controller-icon-DNLRSXZr.js → controller-icon-Os52h8zb.js} +1 -1
  295. package/dist/kolibri/{controller-icon-DNLRSXZr.js.map → controller-icon-Os52h8zb.js.map} +1 -1
  296. package/dist/kolibri/{dev.utils-BB49mRnl.js → dev.utils-CMwuN6qh.js} +1 -1
  297. package/dist/kolibri/{dev.utils-BB49mRnl.js.map → dev.utils-CMwuN6qh.js.map} +1 -1
  298. package/dist/kolibri/{devtools-6yxauOZx.js → devtools-B5bExzS0.js} +1 -1
  299. package/dist/kolibri/{devtools-6yxauOZx.js.map → devtools-B5bExzS0.js.map} +1 -1
  300. package/dist/kolibri/index-BIF3a06U.js +5 -0
  301. package/dist/kolibri/index-BIF3a06U.js.map +1 -0
  302. package/dist/kolibri/kol-abbr.entry.js +1 -1
  303. package/dist/kolibri/kol-accordion.entry.esm.js.map +1 -1
  304. package/dist/kolibri/kol-accordion.entry.js +1 -1
  305. package/dist/kolibri/kol-accordion.entry.js.map +1 -1
  306. package/dist/kolibri/kol-alert-wc.entry.js +1 -1
  307. package/dist/kolibri/kol-alert.entry.js +1 -1
  308. package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
  309. package/dist/kolibri/kol-avatar.entry.js +1 -1
  310. package/dist/kolibri/kol-badge.entry.js +1 -1
  311. package/dist/kolibri/kol-badge.entry.js.map +1 -1
  312. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  313. package/dist/kolibri/kol-button-link.entry.js +1 -1
  314. package/dist/kolibri/kol-button-wc.entry.esm.js.map +1 -1
  315. package/dist/kolibri/kol-button-wc.entry.js +1 -1
  316. package/dist/kolibri/kol-button-wc.entry.js.map +1 -1
  317. package/dist/kolibri/kol-button.entry.js +1 -1
  318. package/dist/kolibri/kol-card-wc.entry.js +1 -1
  319. package/dist/kolibri/kol-card.entry.js +1 -1
  320. package/dist/kolibri/kol-combobox.entry.js +1 -1
  321. package/dist/kolibri/kol-details.entry.esm.js.map +1 -1
  322. package/dist/kolibri/kol-details.entry.js +1 -1
  323. package/dist/kolibri/kol-details.entry.js.map +1 -1
  324. package/dist/kolibri/kol-drawer.entry.js +1 -1
  325. package/dist/kolibri/kol-form.entry.js +1 -1
  326. package/dist/kolibri/kol-heading.entry.js +1 -1
  327. package/dist/kolibri/kol-icon.entry.js +1 -1
  328. package/dist/kolibri/kol-image.entry.js +1 -1
  329. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  330. package/dist/kolibri/kol-input-color.entry.js +1 -1
  331. package/dist/kolibri/kol-input-date.entry.js +1 -1
  332. package/dist/kolibri/kol-input-email.entry.js +1 -1
  333. package/dist/kolibri/kol-input-file.entry.js +1 -1
  334. package/dist/kolibri/kol-input-number.entry.js +1 -1
  335. package/dist/kolibri/kol-input-password.entry.js +1 -1
  336. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  337. package/dist/kolibri/kol-input-range.entry.js +1 -1
  338. package/dist/kolibri/kol-input-text.entry.js +1 -1
  339. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  340. package/dist/kolibri/kol-link-button.entry.js +1 -1
  341. package/dist/kolibri/kol-link-wc.entry.esm.js.map +1 -1
  342. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  343. package/dist/kolibri/kol-link-wc.entry.js.map +1 -1
  344. package/dist/kolibri/kol-link.entry.js +1 -1
  345. package/dist/kolibri/kol-modal.entry.js +1 -1
  346. package/dist/kolibri/kol-nav.entry.js +1 -1
  347. package/dist/kolibri/kol-pagination-wc.entry.js +1 -1
  348. package/dist/kolibri/kol-pagination.entry.js +1 -1
  349. package/dist/kolibri/kol-popover-button-wc.entry.esm.js.map +1 -1
  350. package/dist/kolibri/kol-popover-button-wc.entry.js +1 -1
  351. package/dist/kolibri/kol-popover-button-wc.entry.js.map +1 -1
  352. package/dist/kolibri/kol-popover-button.entry.js +1 -1
  353. package/dist/kolibri/kol-popover-wc.entry.esm.js.map +1 -1
  354. package/dist/kolibri/kol-popover-wc.entry.js +1 -1
  355. package/dist/kolibri/kol-popover-wc.entry.js.map +1 -1
  356. package/dist/kolibri/kol-progress.entry.js +1 -1
  357. package/dist/kolibri/kol-quote.entry.js +1 -1
  358. package/dist/kolibri/kol-select.entry.esm.js.map +1 -1
  359. package/dist/kolibri/kol-select.entry.js +1 -1
  360. package/dist/kolibri/kol-select.entry.js.map +1 -1
  361. package/dist/kolibri/kol-single-select.entry.js +1 -1
  362. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  363. package/dist/kolibri/kol-spin.entry.js +1 -1
  364. package/dist/kolibri/kol-split-button.entry.js +1 -1
  365. package/dist/kolibri/kol-table-settings-wc.entry.esm.js.map +1 -1
  366. package/dist/kolibri/kol-table-settings-wc.entry.js +1 -1
  367. package/dist/kolibri/kol-table-settings-wc.entry.js.map +1 -1
  368. package/dist/kolibri/kol-table-stateful.entry.esm.js.map +1 -1
  369. package/dist/kolibri/kol-table-stateful.entry.js +1 -1
  370. package/dist/kolibri/kol-table-stateful.entry.js.map +1 -1
  371. package/dist/kolibri/kol-table-stateless-wc.entry.esm.js.map +1 -1
  372. package/dist/kolibri/kol-table-stateless-wc.entry.js +1 -1
  373. package/dist/kolibri/kol-table-stateless-wc.entry.js.map +1 -1
  374. package/dist/kolibri/kol-table-stateless.entry.esm.js.map +1 -1
  375. package/dist/kolibri/kol-table-stateless.entry.js +1 -1
  376. package/dist/kolibri/kol-table-stateless.entry.js.map +1 -1
  377. package/dist/kolibri/kol-tabs.entry.js +1 -1
  378. package/dist/kolibri/kol-textarea.entry.js +1 -1
  379. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  380. package/dist/kolibri/kol-toolbar.entry.js +1 -1
  381. package/dist/kolibri/kol-tooltip-wc.entry.esm.js.map +1 -1
  382. package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
  383. package/dist/kolibri/kol-tooltip-wc.entry.js.map +1 -1
  384. package/dist/kolibri/kol-tree-item-wc.entry.js +1 -1
  385. package/dist/kolibri/kol-tree-item.entry.js +1 -1
  386. package/dist/kolibri/kol-tree-wc.entry.js +1 -1
  387. package/dist/kolibri/kol-tree.entry.js +1 -1
  388. package/dist/kolibri/kol-version.entry.js +1 -1
  389. package/dist/kolibri/kolibri.esm.js +1 -1
  390. package/dist/kolibri/kolibri.esm.js.map +1 -1
  391. package/dist/kolibri/test-component.entry.js +1 -1
  392. package/dist/types/components/button/component.d.ts +1 -1
  393. package/dist/types/components/icon/bem.d.ts +5 -5
  394. package/dist/types/components/link/component.d.ts +2 -0
  395. package/dist/types/components/popover/component.d.ts +13 -6
  396. package/dist/types/components/table-stateless/component.d.ts +1 -0
  397. package/dist/types/components/table-stateless/table-settings.d.ts +1 -1
  398. package/dist/types/components/tooltip/component.d.ts +3 -0
  399. package/dist/types/components.d.ts +0 -4
  400. package/dist/types/functional-components/Alert/bem.d.ts +5 -5
  401. package/dist/types/schema/props/popover-callbacks.d.ts +2 -1
  402. package/dist/types/schema/types/table-settings.d.ts +2 -1
  403. package/dist/types/schema/types/table.d.ts +2 -0
  404. package/dist/types/stencil-public-runtime.d.ts +19 -9
  405. package/package.json +3 -3
  406. package/dist/cjs/Icon-rMLb2zeC.js +0 -4
  407. package/dist/cjs/index-D8K3Ng5k.js +0 -4
  408. package/dist/cjs/index-D8K3Ng5k.js.map +0 -1
  409. package/dist/esm/Icon-B-YLFbev.js +0 -4
  410. package/dist/esm/Input-D-UExd4D.js +0 -4
  411. package/dist/esm/index-BG8JuXph.js +0 -4
  412. package/dist/esm/index-BG8JuXph.js.map +0 -1
  413. package/dist/kolibri/Icon-B-YLFbev.js +0 -4
  414. package/dist/kolibri/Input-D-UExd4D.js +0 -4
  415. package/dist/kolibri/InternalUnderlinedBadgeText-CodJXcQG.js +0 -4
  416. package/dist/kolibri/Span-BUH9xZLf.js +0 -4
  417. package/dist/kolibri/index-BG8JuXph.js +0 -5
  418. package/dist/kolibri/index-BG8JuXph.js.map +0 -1
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{h,r as registerInstance,g as getElement}from"./index-BG8JuXph.js";import{c as clsx}from"./clsx-eK3rPvPS.js";import{w as watchValidator,s as setState,h as deprecatedHint}from"./common-Dd0zJQbD.js";import{F as FormFieldStateWrapper}from"./FormFieldStateWrapper-BBrHIwy9.js";import{I as InputIconController,a as InputContainerStateWrapperFc}from"./controller-icon-DNLRSXZr.js";import{I as InputStateWrapper}from"./InputStateWrapper-WDItQP2r.js";import{n as nonce}from"./dev.utils-BB49mRnl.js";import{p as propagateSubmitEventToForm}from"./controller-C5Ill7ej.js";import{v as validateAutoComplete}from"./auto-complete-mCkUnxg2.js";import{v as validateReadOnly}from"./read-only-BetTuumR.js";import{v as validateRequired}from"./required-CnTTpFCN.js";import{v as validateSuggestions}from"./suggestions-B-jLvT4L.js";import"./access-and-short-key-B37XLwy2.js";import"./disabled-BhpAFgSp.js";import"./hide-label-B9FhGrWP.js";import"./label-Dnmzb2S_.js";import"./tooltip-align-Cnin7S26.js";import"./align-D-ifSKu8.js";import"./events-9-skLO0f.js";import"./associated.controller-ByY2WiIp.js";import"./bootstrap-CMXwSSvb.js";import"./component-names-CkE54Ym7.js";import"./i18n-ZF6JbdVP.js";import"./isObject-DvSELytj.js";import"./tslib.es6-CxX45GIN.js";import"./reuse-CX4AQDkS.js";import"./i18n-C5ifExT3.js";import"./InternalUnderlinedBadgeText-CodJXcQG.js";import"./Alert-B3jx2jlL.js";import"./bem-C27SfH6w.js";import"./browser-DiRe0qUf.js";import"./Heading-DqUSmJEO.js";import"./Icon-B-YLFbev.js";import"./icons-B5i9zwjJ.js";import"./Input-D-UExd4D.js";const inputDateTypeOptions=["date","datetime-local","month","time","week"],isInputDateTypePropType=t=>"string"==typeof t&&inputDateTypeOptions.includes(t),validateTypeInputDate=(t,e)=>{watchValidator(t,"_type",isInputDateTypePropType,new Set(inputDateTypeOptions),e)};class InputDateController extends InputIconController{constructor(t,e,n){super(t,e,n),this.validateIso8601=(t,e,n)=>watchValidator(this.component,t,t=>null==t||""===t||this.validateDateString(t),new Set(["Date","string{ISO-8601}"]),InputDateController.tryParseToString(e,this.component._type,this.component._step),{hooks:{afterPatch:t=>{"string"==typeof t&&n&&n(t)}}}),this.component=t}validateAutoComplete(t){validateAutoComplete(this.component,t)}validateSuggestions(t){validateSuggestions(this.component,t)}static tryParseToString(t,e,n){if("string"==typeof t||null===t)return t;if("object"==typeof t&&t instanceof Date){const i=t.getFullYear(),o=String(t.getMonth()+1).padStart(2,"0"),a=String(t.getDate()).padStart(2,"0"),l=String(t.getHours()).padStart(2,"0"),s=String(t.getMinutes()).padStart(2,"0"),r=String(t.getSeconds()).padStart(2,"0"),d=[i,o,a].join("-"),c=[l,s,r].join(":");switch(e){case"date":return d;case"datetime-local":return`${d}T${c}`;case"month":return`${i}-${o}`;case"time":return void 0===n||"60"===String(n)?`${l}:${s}`:c;case"week":return`${i}-W${this.getWeekNumberOfDate(t)}`}}}static getWeekNumberOfDate(t){const e=new Date(t),n=(e.getDay()+6)%7;e.setDate(e.getDate()-n+3);const i=e.valueOf();e.setMonth(0,1),4!==e.getDay()&&e.setMonth(0,1+(4-e.getDay()+7)%7);return(1+Math.ceil((i-e.valueOf())/6048e5)).toString().padStart(2,"0")}validateDateString(t){switch(this.component._type){case"date":return InputDateController.isoDateRegex.test(t);case"datetime-local":return InputDateController.isoLocalDateTimeRegex.test(t);case"month":return InputDateController.isoMonthRegex.test(t);case"time":return InputDateController.isoTimeRegex.test(t);case"week":return InputDateController.isoWeekRegex.test(t);default:return!1}}onBlur(t){super.onBlur(t),!!t.target.value!=!!this.component._value&&(this.component._value=t.target.value)}validateMax(t){const e=null!=t||"date"!==this.component._type&&"month"!==this.component._type&&"datetime-local"!==this.component._type?t:InputDateController.DEFAULT_MAX_DATE;this.validateIso8601("_max",e)}validateMin(t){this.validateIso8601("_min",t)}validateOn(t){setState(this.component,"_on",Object.assign(Object.assign({},t),{onChange:(e,n)=>{!!n!=!!this.component._value&&(this.component._value=n),(null==t?void 0:t.onChange)&&t.onChange(e,n)}}))}validateReadOnly(t){validateReadOnly(this.component,t)}validateRequired(t){validateRequired(this.component,t)}validateStep(t){this.validateNumber("_step",t)}validateType(t){validateTypeInputDate(this.component,t)}validateValue(t){this.validateValueEx(t)}validateValueEx(t,e){this.validateIso8601("_value",t,e),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateMax(this.component._max),this.validateMin(this.component._min),this.validateLabel(this.component._label),this.validateSuggestions(this.component._suggestions),this.validateOn(this.component._on),this.validateReadOnly(this.component._readOnly),this.validateRequired(this.component._required),this.validateStep(this.component._step),this.validateType(this.component._type),this.validateValue(this.component._value)}}InputDateController.isoDateRegex=/^\d{4}-([0]\d|1[0-2])-([0-2]\d|3[01])/,InputDateController.isoLocalDateTimeRegex=/^\d{4}-([0]\d|1[0-2])-([0-2]\d|3[01])[T ][0-2]\d:[0-5]\d(:[0-5]\d(?:\.\d+)?)?/,InputDateController.isoMonthRegex=/^\d{4}-([0]\d|1[0-2])/,InputDateController.isoTimeRegex=/^[0-2]\d:[0-5]\d(:[0-5]\d(?:\.\d+)?)?/,InputDateController.isoWeekRegex=/^\d{4}-W(?:[0-4]\d|5[0-3])$/,InputDateController.DEFAULT_MAX_DATE=new Date(9999,11,31,23,59,59);const defaultStyleCss="/*\n* This file 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 * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\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 text color from his parent element.\n */\n color: inherit;\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: flex;\n flex-flow: column;\n align-items: center;\n justify-content: 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 align-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 .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\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 @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\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: transparent;\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 background-color: transparent;\n width: 100%;\n min-width: var(--a11y-min-size);\n }\n .kol-input:focus {\n outline: none;\n }\n /**\n * Workaround for detecting focus state of the native date input's calendar icon.\n * The `:focus-visible` pseudo class does not work on the icon itself, but only on the input element.\n * By using the `content` property we can detect whether the icon is focused by inspecting the computed style in JS.\n * This should be replaced once native focus detection for the icon is available.\n */\n :host input[type=date],\n :host input[type=datetime-local],\n :host input[type=month],\n :host input[type=time],\n :host input[type=week] {\n content: \"native-icon-focused\";\n }\n :host input[type=date]:focus-visible,\n :host input[type=datetime-local]:focus-visible,\n :host input[type=month]:focus-visible,\n :host input[type=time]:focus-visible,\n :host input[type=week]:focus-visible {\n content: \"native-icon-not-focused\";\n }\n}",KolInputDate=class{async getValue(){var t;return this.inputRef&&this.remapValue(null===(t=this.inputRef)||void 0===t?void 0:t.value)}async kolFocus(){var t;null===(t=this.inputRef)||void 0===t||t.focus()}async reset(){this.state=Object.assign(Object.assign({},this.state),{_value:null}),this.controller.setFormAssociatedValue(""),this.inputRef&&(this.inputRef.value="")}setInitialValueType(t){t instanceof Date?this._initialValueType="Date":this._initialValueType="string"==typeof t?"String":null}remapValue(t){return""===t?null:"Date"===this._initialValueType?new Date(t):t}getFormFieldProps(){return{state:this.state,class:clsx("kol-input-date",this.state._type,{"has-value":this.state._hasValue}),tooltipAlign:this._tooltipAlign,alert:this.showAsAlert()}}getInputProps(){return Object.assign(Object.assign({ref:this.catchRef,state:this.state},this.controller.onFacade),{onBlur:this.onBlur,onFocus:this.onFocus,onKeyDown:this.onKeyDown,onChange:this.onChange,onInput:this.onInput})}render(){return h(FormFieldStateWrapper,Object.assign({key:"948a0677c26b943797ca51d4152dd9bf39ef4e17"},this.getFormFieldProps()),h(InputContainerStateWrapperFc,{key:"1a192d4a5044def41d8e4bcb14f721a2a233ad60",state:this.state},h(InputStateWrapper,Object.assign({key:"eeddd14ae717e39a8f4c6693ddd80ab14125dc47"},this.getInputProps()))))}constructor(t){registerInstance(this,t),this._initialValueType=null,this.catchRef=t=>{this.inputRef=t},this.onBlur=t=>{this.controller.onFacade.onBlur(t),this.inputHasFocus=!1},this.onFocus=t=>{this.controller.onFacade.onFocus(t),this.inputHasFocus=!0},this.onChange=t=>{const e=t.target.value,n=this.remapValue(e);this.controller.onFacade.onChange(t,n)},this.onInput=t=>{const e=t.target.value,n=this.remapValue(e);this._value=n,this.controller.onFacade.onInput(t,!0,n)},this.isNativeCalendarIconFocused=()=>{if(!this.inputRef||"undefined"==typeof window||"function"!=typeof window.getComputedStyle)return!1;return window.getComputedStyle(this.inputRef).content.includes("native-icon-focused")},this.onKeyDown=t=>{this.controller.onFacade.onKeyDown(t),"Enter"!==t.code&&"NumpadEnter"!==t.code||this.isNativeCalendarIconFocused()||propagateSubmitEventToForm({form:this.host}),this.state._readOnly&&"Space"===t.code&&t.preventDefault()},this._autoComplete="off",this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._readOnly=!1,this._required=!1,this._tooltipAlign="top",this._touched=!1,this._type="date",this.state={_hasValue:!1,_hideMsg:!1,_id:`id-${nonce()}`,_label:"",_suggestions:[],_type:"datetime-local"},this.inputHasFocus=!1,this.controller=new InputDateController(this,"date",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAutoComplete(t){this.controller.validateAutoComplete(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateHideMsg(t){this.controller.validateHideMsg(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateMax(t){this.controller.validateMax(t)}validateMin(t){this.controller.validateMin(t)}validateMsg(t){this.controller.validateMsg(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validateReadOnly(t){this.controller.validateReadOnly(t)}validateRequired(t){this.controller.validateRequired(t)}validateShortKey(t){this.controller.validateShortKey(t)}validateSmartButton(t){this.controller.validateSmartButton(t)}validateSuggestions(t){this.controller.validateSuggestions(t)}validateStep(t){this.controller.validateStep(t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTouched(t){this.controller.validateTouched(t)}validateType(t){this.controller.validateType(t)}validateValue(t){t instanceof Date&&deprecatedHint("Date type will be removed in v3. Use `Iso8601` instead."),this.controller.validateValueEx(t),null!=t&&this.setInitialValueType(t)}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(t=>this.state._hasValue=!!t)}get host(){return 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"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_shortKey:["validateShortKey"],_smartButton:["validateSmartButton"],_suggestions:["validateSuggestions"],_step:["validateStep"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_type:["validateType"],_value:["validateValue"]}}};KolInputDate.style={default:defaultStyleCss};export{KolInputDate as kol_input_date};
4
+ import{h,r as registerInstance,g as getElement}from"./index-BIF3a06U.js";import{c as clsx}from"./clsx-eK3rPvPS.js";import{w as watchValidator,s as setState,h as deprecatedHint}from"./common-Dd0zJQbD.js";import{F as FormFieldStateWrapper}from"./FormFieldStateWrapper--mfN3zxB.js";import{I as InputIconController,a as InputContainerStateWrapperFc}from"./controller-icon-Os52h8zb.js";import{I as InputStateWrapper}from"./InputStateWrapper-DPKOPHLb.js";import{n as nonce}from"./dev.utils-CMwuN6qh.js";import{p as propagateSubmitEventToForm}from"./controller-C5Ill7ej.js";import{v as validateAutoComplete}from"./auto-complete-mCkUnxg2.js";import{v as validateReadOnly}from"./read-only-BetTuumR.js";import{v as validateRequired}from"./required-CnTTpFCN.js";import{v as validateSuggestions}from"./suggestions-B-jLvT4L.js";import"./access-and-short-key-B37XLwy2.js";import"./disabled-BhpAFgSp.js";import"./hide-label-B9FhGrWP.js";import"./label-Dnmzb2S_.js";import"./tooltip-align-Cnin7S26.js";import"./align-D-ifSKu8.js";import"./events-9-skLO0f.js";import"./associated.controller-ByY2WiIp.js";import"./bootstrap-CMXwSSvb.js";import"./component-names-CkE54Ym7.js";import"./i18n-ZF6JbdVP.js";import"./isObject-DvSELytj.js";import"./tslib.es6-CxX45GIN.js";import"./reuse-CX4AQDkS.js";import"./i18n-C5ifExT3.js";import"./InternalUnderlinedBadgeText-B_K9YhEU.js";import"./Alert-DtvOOMUX.js";import"./bem-C27SfH6w.js";import"./browser-DiRe0qUf.js";import"./Heading-CtNjSZvy.js";import"./Icon-C0YAvZYM.js";import"./icons-B5i9zwjJ.js";import"./Input-uDwRZfTu.js";const inputDateTypeOptions=["date","datetime-local","month","time","week"],isInputDateTypePropType=t=>"string"==typeof t&&inputDateTypeOptions.includes(t),validateTypeInputDate=(t,e)=>{watchValidator(t,"_type",isInputDateTypePropType,new Set(inputDateTypeOptions),e)};class InputDateController extends InputIconController{constructor(t,e,n){super(t,e,n),this.validateIso8601=(t,e,n)=>watchValidator(this.component,t,t=>null==t||""===t||this.validateDateString(t),new Set(["Date","string{ISO-8601}"]),InputDateController.tryParseToString(e,this.component._type,this.component._step),{hooks:{afterPatch:t=>{"string"==typeof t&&n&&n(t)}}}),this.component=t}validateAutoComplete(t){validateAutoComplete(this.component,t)}validateSuggestions(t){validateSuggestions(this.component,t)}static tryParseToString(t,e,n){if("string"==typeof t||null===t)return t;if("object"==typeof t&&t instanceof Date){const i=t.getFullYear(),o=String(t.getMonth()+1).padStart(2,"0"),a=String(t.getDate()).padStart(2,"0"),l=String(t.getHours()).padStart(2,"0"),s=String(t.getMinutes()).padStart(2,"0"),r=String(t.getSeconds()).padStart(2,"0"),d=[i,o,a].join("-"),c=[l,s,r].join(":");switch(e){case"date":return d;case"datetime-local":return`${d}T${c}`;case"month":return`${i}-${o}`;case"time":return void 0===n||"60"===String(n)?`${l}:${s}`:c;case"week":return`${i}-W${this.getWeekNumberOfDate(t)}`}}}static getWeekNumberOfDate(t){const e=new Date(t),n=(e.getDay()+6)%7;e.setDate(e.getDate()-n+3);const i=e.valueOf();e.setMonth(0,1),4!==e.getDay()&&e.setMonth(0,1+(4-e.getDay()+7)%7);return(1+Math.ceil((i-e.valueOf())/6048e5)).toString().padStart(2,"0")}validateDateString(t){switch(this.component._type){case"date":return InputDateController.isoDateRegex.test(t);case"datetime-local":return InputDateController.isoLocalDateTimeRegex.test(t);case"month":return InputDateController.isoMonthRegex.test(t);case"time":return InputDateController.isoTimeRegex.test(t);case"week":return InputDateController.isoWeekRegex.test(t);default:return!1}}onBlur(t){super.onBlur(t),!!t.target.value!=!!this.component._value&&(this.component._value=t.target.value)}validateMax(t){const e=null!=t||"date"!==this.component._type&&"month"!==this.component._type&&"datetime-local"!==this.component._type?t:InputDateController.DEFAULT_MAX_DATE;this.validateIso8601("_max",e)}validateMin(t){this.validateIso8601("_min",t)}validateOn(t){setState(this.component,"_on",Object.assign(Object.assign({},t),{onChange:(e,n)=>{!!n!=!!this.component._value&&(this.component._value=n),(null==t?void 0:t.onChange)&&t.onChange(e,n)}}))}validateReadOnly(t){validateReadOnly(this.component,t)}validateRequired(t){validateRequired(this.component,t)}validateStep(t){this.validateNumber("_step",t)}validateType(t){validateTypeInputDate(this.component,t)}validateValue(t){this.validateValueEx(t)}validateValueEx(t,e){this.validateIso8601("_value",t,e),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateMax(this.component._max),this.validateMin(this.component._min),this.validateLabel(this.component._label),this.validateSuggestions(this.component._suggestions),this.validateOn(this.component._on),this.validateReadOnly(this.component._readOnly),this.validateRequired(this.component._required),this.validateStep(this.component._step),this.validateType(this.component._type),this.validateValue(this.component._value)}}InputDateController.isoDateRegex=/^\d{4}-([0]\d|1[0-2])-([0-2]\d|3[01])/,InputDateController.isoLocalDateTimeRegex=/^\d{4}-([0]\d|1[0-2])-([0-2]\d|3[01])[T ][0-2]\d:[0-5]\d(:[0-5]\d(?:\.\d+)?)?/,InputDateController.isoMonthRegex=/^\d{4}-([0]\d|1[0-2])/,InputDateController.isoTimeRegex=/^[0-2]\d:[0-5]\d(:[0-5]\d(?:\.\d+)?)?/,InputDateController.isoWeekRegex=/^\d{4}-W(?:[0-4]\d|5[0-3])$/,InputDateController.DEFAULT_MAX_DATE=new Date(9999,11,31,23,59,59);const defaultStyleCss="/*\n* This file 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 * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\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 text color from his parent element.\n */\n color: inherit;\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: flex;\n flex-flow: column;\n align-items: center;\n justify-content: 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 align-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 .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\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 @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\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: transparent;\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 background-color: transparent;\n width: 100%;\n min-width: var(--a11y-min-size);\n }\n .kol-input:focus {\n outline: none;\n }\n /**\n * Workaround for detecting focus state of the native date input's calendar icon.\n * The `:focus-visible` pseudo class does not work on the icon itself, but only on the input element.\n * By using the `content` property we can detect whether the icon is focused by inspecting the computed style in JS.\n * This should be replaced once native focus detection for the icon is available.\n */\n :host input[type=date],\n :host input[type=datetime-local],\n :host input[type=month],\n :host input[type=time],\n :host input[type=week] {\n content: \"native-icon-focused\";\n }\n :host input[type=date]:focus-visible,\n :host input[type=datetime-local]:focus-visible,\n :host input[type=month]:focus-visible,\n :host input[type=time]:focus-visible,\n :host input[type=week]:focus-visible {\n content: \"native-icon-not-focused\";\n }\n}",KolInputDate=class{async getValue(){var t;return this.inputRef&&this.remapValue(null===(t=this.inputRef)||void 0===t?void 0:t.value)}async kolFocus(){var t;null===(t=this.inputRef)||void 0===t||t.focus()}async reset(){this.state=Object.assign(Object.assign({},this.state),{_value:null}),this.controller.setFormAssociatedValue(""),this.inputRef&&(this.inputRef.value="")}setInitialValueType(t){t instanceof Date?this._initialValueType="Date":this._initialValueType="string"==typeof t?"String":null}remapValue(t){return""===t?null:"Date"===this._initialValueType?new Date(t):t}getFormFieldProps(){return{state:this.state,class:clsx("kol-input-date",this.state._type,{"has-value":this.state._hasValue}),tooltipAlign:this._tooltipAlign,alert:this.showAsAlert()}}getInputProps(){return Object.assign(Object.assign({ref:this.catchRef,state:this.state},this.controller.onFacade),{onBlur:this.onBlur,onFocus:this.onFocus,onKeyDown:this.onKeyDown,onChange:this.onChange,onInput:this.onInput})}render(){return h(FormFieldStateWrapper,Object.assign({key:"948a0677c26b943797ca51d4152dd9bf39ef4e17"},this.getFormFieldProps()),h(InputContainerStateWrapperFc,{key:"1a192d4a5044def41d8e4bcb14f721a2a233ad60",state:this.state},h(InputStateWrapper,Object.assign({key:"eeddd14ae717e39a8f4c6693ddd80ab14125dc47"},this.getInputProps()))))}constructor(t){registerInstance(this,t),this._initialValueType=null,this.catchRef=t=>{this.inputRef=t},this.onBlur=t=>{this.controller.onFacade.onBlur(t),this.inputHasFocus=!1},this.onFocus=t=>{this.controller.onFacade.onFocus(t),this.inputHasFocus=!0},this.onChange=t=>{const e=t.target.value,n=this.remapValue(e);this.controller.onFacade.onChange(t,n)},this.onInput=t=>{const e=t.target.value,n=this.remapValue(e);this._value=n,this.controller.onFacade.onInput(t,!0,n)},this.isNativeCalendarIconFocused=()=>{if(!this.inputRef||"undefined"==typeof window||"function"!=typeof window.getComputedStyle)return!1;return window.getComputedStyle(this.inputRef).content.includes("native-icon-focused")},this.onKeyDown=t=>{this.controller.onFacade.onKeyDown(t),"Enter"!==t.code&&"NumpadEnter"!==t.code||this.isNativeCalendarIconFocused()||propagateSubmitEventToForm({form:this.host}),this.state._readOnly&&"Space"===t.code&&t.preventDefault()},this._autoComplete="off",this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._readOnly=!1,this._required=!1,this._tooltipAlign="top",this._touched=!1,this._type="date",this.state={_hasValue:!1,_hideMsg:!1,_id:`id-${nonce()}`,_label:"",_suggestions:[],_type:"datetime-local"},this.inputHasFocus=!1,this.controller=new InputDateController(this,"date",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAutoComplete(t){this.controller.validateAutoComplete(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateHideMsg(t){this.controller.validateHideMsg(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateMax(t){this.controller.validateMax(t)}validateMin(t){this.controller.validateMin(t)}validateMsg(t){this.controller.validateMsg(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validateReadOnly(t){this.controller.validateReadOnly(t)}validateRequired(t){this.controller.validateRequired(t)}validateShortKey(t){this.controller.validateShortKey(t)}validateSmartButton(t){this.controller.validateSmartButton(t)}validateSuggestions(t){this.controller.validateSuggestions(t)}validateStep(t){this.controller.validateStep(t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTouched(t){this.controller.validateTouched(t)}validateType(t){this.controller.validateType(t)}validateValue(t){t instanceof Date&&deprecatedHint("Date type will be removed in v3. Use `Iso8601` instead."),this.controller.validateValueEx(t),null!=t&&this.setInitialValueType(t)}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(t=>this.state._hasValue=!!t)}get host(){return 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"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_shortKey:["validateShortKey"],_smartButton:["validateSmartButton"],_suggestions:["validateSuggestions"],_step:["validateStep"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_type:["validateType"],_value:["validateValue"]}}};KolInputDate.style={default:defaultStyleCss};export{KolInputDate as kol_input_date};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{h,r as registerInstance,g as getElement}from"./index-BG8JuXph.js";import{c as clsx}from"./clsx-eK3rPvPS.js";import{F as FormFieldStateWrapper}from"./FormFieldStateWrapper-BBrHIwy9.js";import{a as InputContainerStateWrapperFc}from"./controller-icon-DNLRSXZr.js";import{I as InputStateWrapper}from"./InputStateWrapper-WDItQP2r.js";import{n as nonce}from"./dev.utils-BB49mRnl.js";import{p as propagateSubmitEventToForm}from"./controller-C5Ill7ej.js";import"./common-Dd0zJQbD.js";import{v as validateMaxLengthBehavior}from"./max-length-behavior-nTw1Zuyf.js";import{v as validateMultiple}from"./multiple-Cj3JQafH.js";import{I as InputTextEmailController}from"./controller-CBNM6BpO.js";import"./access-and-short-key-B37XLwy2.js";import"./disabled-BhpAFgSp.js";import"./hide-label-B9FhGrWP.js";import"./label-Dnmzb2S_.js";import"./tooltip-align-Cnin7S26.js";import"./align-D-ifSKu8.js";import"./events-9-skLO0f.js";import"./associated.controller-ByY2WiIp.js";import"./bootstrap-CMXwSSvb.js";import"./component-names-CkE54Ym7.js";import"./i18n-ZF6JbdVP.js";import"./isObject-DvSELytj.js";import"./tslib.es6-CxX45GIN.js";import"./reuse-CX4AQDkS.js";import"./i18n-C5ifExT3.js";import"./InternalUnderlinedBadgeText-CodJXcQG.js";import"./Alert-B3jx2jlL.js";import"./bem-C27SfH6w.js";import"./browser-DiRe0qUf.js";import"./Heading-DqUSmJEO.js";import"./Icon-B-YLFbev.js";import"./icons-B5i9zwjJ.js";import"./Input-D-UExd4D.js";import"./spell-check-B9ot-4t-.js";import"./suggestions-B-jLvT4L.js";import"./controller-CzLzXDtQ.js";import"./auto-complete-mCkUnxg2.js";import"./placeholder-BVhy3BzI.js";import"./read-only-BetTuumR.js";import"./required-CnTTpFCN.js";class InputEmailController extends InputTextEmailController{constructor(t,e,n){super(t,e,n),this.component=t}validateMultiple(t){validateMultiple(this.component,t)}validateMaxLengthBehavior(t){validateMaxLengthBehavior(this.component,t)}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 * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\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 text color from his parent element.\n */\n color: inherit;\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: flex;\n flex-flow: column;\n align-items: center;\n justify-content: 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 align-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 .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\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 @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\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: transparent;\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 background-color: transparent;\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 t;return null===(t=this.inputRef)||void 0===t?void 0:t.value}async kolFocus(){var t;null===(t=this.inputRef)||void 0===t||t.focus()}getFormFieldProps(){return{state:this.state,class:clsx("kol-input-email","email",{"has-value":this.state._hasValue,"kol-form-field--has-counter":this.controller.hasSoftCharacterLimit()||this.controller.hasCounter()}),tooltipAlign:this._tooltipAlign,alert:this.showAsAlert()}}getInputProps(){const t="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:t},this.controller.onFacade),{onInput:this.onInput,onKeyDown:this.onKeyDown,onFocus:t=>{this.controller.onFacade.onFocus(t),this.inputHasFocus=!0},onBlur:t=>{this.controller.onFacade.onBlur(t),this.inputHasFocus=!1}})}render(){return h(FormFieldStateWrapper,Object.assign({key:"f6847f7adcceccc5156ca7108293e863ace8fb1f"},this.getFormFieldProps()),h(InputContainerStateWrapperFc,{key:"dc180e9fc68c63016dedde5680ce2ee2c1118519",state:this.state},h(InputStateWrapper,Object.assign({key:"73735b308bd8c3ecdb4261bed785dc0686ead067"},this.getInputProps()))))}constructor(t){registerInstance(this,t),this.catchRef=t=>{this.inputRef=t},this.onKeyDown=t=>{this.controller.onFacade.onKeyDown(t),"Enter"!==t.code&&"NumpadEnter"!==t.code||propagateSubmitEventToForm({form:this.host})},this.onInput=t=>{this._value=t.target.value,this.controller.onFacade.onInput(t)},this._autoComplete="off",this._hasCounter=!1,this._maxLengthBehavior="hard",this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._multiple=!1,this._readOnly=!1,this._required=!1,this._tooltipAlign="top",this._touched=!1,this.state={_currentLength:0,_currentLengthDebounced:0,_hasValue:!1,_hideMsg:!1,_id:`id-${nonce()}`,_label:"",_suggestions:[]},this.inputHasFocus=!1,this.controller=new InputEmailController(this,"email",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAutoComplete(t){this.controller.validateAutoComplete(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateHideMsg(t){this.controller.validateHideMsg(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHasCounter(t){this.controller.validateHasCounter(t)}validateHint(t){this.controller.validateHint(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateMaxLength(t){this.controller.validateMaxLength(t)}validateMsg(t){this.controller.validateMsg(t)}validateMultiple(t){this.controller.validateMultiple(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validatePattern(t){this.controller.validatePattern(t)}validatePlaceholder(t){this.controller.validatePlaceholder(t)}validateReadOnly(t){this.controller.validateReadOnly(t)}validateRequired(t){this.controller.validateRequired(t)}validateShortKey(t){this.controller.validateShortKey(t)}validateSuggestions(t){this.controller.validateSuggestions(t)}validateSmartButton(t){this.controller.validateSmartButton(t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTouched(t){this.controller.validateTouched(t)}validateValue(t){this.controller.validateValue(t)}validateMaxLengthBehavior(t){this.controller.validateMaxLengthBehavior(t)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener(t=>this.state._hasValue=!!t)}get host(){return 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};export{KolInputEmail as kol_input_email};
4
+ import{h,r as registerInstance,g as getElement}from"./index-BIF3a06U.js";import{c as clsx}from"./clsx-eK3rPvPS.js";import{F as FormFieldStateWrapper}from"./FormFieldStateWrapper--mfN3zxB.js";import{a as InputContainerStateWrapperFc}from"./controller-icon-Os52h8zb.js";import{I as InputStateWrapper}from"./InputStateWrapper-DPKOPHLb.js";import{n as nonce}from"./dev.utils-CMwuN6qh.js";import{p as propagateSubmitEventToForm}from"./controller-C5Ill7ej.js";import"./common-Dd0zJQbD.js";import{v as validateMaxLengthBehavior}from"./max-length-behavior-nTw1Zuyf.js";import{v as validateMultiple}from"./multiple-Cj3JQafH.js";import{I as InputTextEmailController}from"./controller-GoVirgjr.js";import"./access-and-short-key-B37XLwy2.js";import"./disabled-BhpAFgSp.js";import"./hide-label-B9FhGrWP.js";import"./label-Dnmzb2S_.js";import"./tooltip-align-Cnin7S26.js";import"./align-D-ifSKu8.js";import"./events-9-skLO0f.js";import"./associated.controller-ByY2WiIp.js";import"./bootstrap-CMXwSSvb.js";import"./component-names-CkE54Ym7.js";import"./i18n-ZF6JbdVP.js";import"./isObject-DvSELytj.js";import"./tslib.es6-CxX45GIN.js";import"./reuse-CX4AQDkS.js";import"./i18n-C5ifExT3.js";import"./InternalUnderlinedBadgeText-B_K9YhEU.js";import"./Alert-DtvOOMUX.js";import"./bem-C27SfH6w.js";import"./browser-DiRe0qUf.js";import"./Heading-CtNjSZvy.js";import"./Icon-C0YAvZYM.js";import"./icons-B5i9zwjJ.js";import"./Input-uDwRZfTu.js";import"./spell-check-B9ot-4t-.js";import"./suggestions-B-jLvT4L.js";import"./controller-CzA8VVx0.js";import"./auto-complete-mCkUnxg2.js";import"./placeholder-BVhy3BzI.js";import"./read-only-BetTuumR.js";import"./required-CnTTpFCN.js";class InputEmailController extends InputTextEmailController{constructor(t,e,n){super(t,e,n),this.component=t}validateMultiple(t){validateMultiple(this.component,t)}validateMaxLengthBehavior(t){validateMaxLengthBehavior(this.component,t)}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 * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\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 text color from his parent element.\n */\n color: inherit;\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: flex;\n flex-flow: column;\n align-items: center;\n justify-content: 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 align-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 .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\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 @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\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: transparent;\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 background-color: transparent;\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 t;return null===(t=this.inputRef)||void 0===t?void 0:t.value}async kolFocus(){var t;null===(t=this.inputRef)||void 0===t||t.focus()}getFormFieldProps(){return{state:this.state,class:clsx("kol-input-email","email",{"has-value":this.state._hasValue,"kol-form-field--has-counter":this.controller.hasSoftCharacterLimit()||this.controller.hasCounter()}),tooltipAlign:this._tooltipAlign,alert:this.showAsAlert()}}getInputProps(){const t="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:t},this.controller.onFacade),{onInput:this.onInput,onKeyDown:this.onKeyDown,onFocus:t=>{this.controller.onFacade.onFocus(t),this.inputHasFocus=!0},onBlur:t=>{this.controller.onFacade.onBlur(t),this.inputHasFocus=!1}})}render(){return h(FormFieldStateWrapper,Object.assign({key:"f6847f7adcceccc5156ca7108293e863ace8fb1f"},this.getFormFieldProps()),h(InputContainerStateWrapperFc,{key:"dc180e9fc68c63016dedde5680ce2ee2c1118519",state:this.state},h(InputStateWrapper,Object.assign({key:"73735b308bd8c3ecdb4261bed785dc0686ead067"},this.getInputProps()))))}constructor(t){registerInstance(this,t),this.catchRef=t=>{this.inputRef=t},this.onKeyDown=t=>{this.controller.onFacade.onKeyDown(t),"Enter"!==t.code&&"NumpadEnter"!==t.code||propagateSubmitEventToForm({form:this.host})},this.onInput=t=>{this._value=t.target.value,this.controller.onFacade.onInput(t)},this._autoComplete="off",this._hasCounter=!1,this._maxLengthBehavior="hard",this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._multiple=!1,this._readOnly=!1,this._required=!1,this._tooltipAlign="top",this._touched=!1,this.state={_currentLength:0,_currentLengthDebounced:0,_hasValue:!1,_hideMsg:!1,_id:`id-${nonce()}`,_label:"",_suggestions:[]},this.inputHasFocus=!1,this.controller=new InputEmailController(this,"email",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAutoComplete(t){this.controller.validateAutoComplete(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateHideMsg(t){this.controller.validateHideMsg(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHasCounter(t){this.controller.validateHasCounter(t)}validateHint(t){this.controller.validateHint(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateMaxLength(t){this.controller.validateMaxLength(t)}validateMsg(t){this.controller.validateMsg(t)}validateMultiple(t){this.controller.validateMultiple(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validatePattern(t){this.controller.validatePattern(t)}validatePlaceholder(t){this.controller.validatePlaceholder(t)}validateReadOnly(t){this.controller.validateReadOnly(t)}validateRequired(t){this.controller.validateRequired(t)}validateShortKey(t){this.controller.validateShortKey(t)}validateSuggestions(t){this.controller.validateSuggestions(t)}validateSmartButton(t){this.controller.validateSmartButton(t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTouched(t){this.controller.validateTouched(t)}validateValue(t){this.controller.validateValue(t)}validateMaxLengthBehavior(t){this.controller.validateMaxLengthBehavior(t)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener(t=>this.state._hasValue=!!t)}get host(){return 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};export{KolInputEmail as kol_input_email};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{h,r as registerInstance,g as getElement}from"./index-BG8JuXph.js";import{c as clsx}from"./clsx-eK3rPvPS.js";import{d as KolButtonWcTag}from"./component-names-CkE54Ym7.js";import{F as FormFieldStateWrapper}from"./FormFieldStateWrapper-BBrHIwy9.js";import{I as InputIconController,a as InputContainerStateWrapperFc}from"./controller-icon-DNLRSXZr.js";import{I as InputStateWrapper}from"./InputStateWrapper-WDItQP2r.js";import{t as translate}from"./i18n-C5ifExT3.js";import{n as nonce}from"./dev.utils-BB49mRnl.js";import{e as watchString}from"./common-Dd0zJQbD.js";import{v as validateMultiple}from"./multiple-Cj3JQafH.js";import{v as validateRequired}from"./required-CnTTpFCN.js";import"./access-and-short-key-B37XLwy2.js";import"./disabled-BhpAFgSp.js";import"./hide-label-B9FhGrWP.js";import"./label-Dnmzb2S_.js";import"./tooltip-align-Cnin7S26.js";import"./align-D-ifSKu8.js";import"./events-9-skLO0f.js";import"./associated.controller-ByY2WiIp.js";import"./bootstrap-CMXwSSvb.js";import"./i18n-ZF6JbdVP.js";import"./isObject-DvSELytj.js";import"./tslib.es6-CxX45GIN.js";import"./reuse-CX4AQDkS.js";import"./InternalUnderlinedBadgeText-CodJXcQG.js";import"./Alert-B3jx2jlL.js";import"./bem-C27SfH6w.js";import"./browser-DiRe0qUf.js";import"./Heading-DqUSmJEO.js";import"./Icon-B-YLFbev.js";import"./icons-B5i9zwjJ.js";import"./Input-D-UExd4D.js";const validateAccept=(n,e,t={})=>{watchString(n,"_accept",e,t)};class InputFileController extends InputIconController{constructor(n,e,t){super(n,e,t),this.component=n}validateAccept(n){validateAccept(this.component,n)}validateMultiple(n){validateMultiple(this.component,n)}validateRequired(n){validateRequired(this.component,n)}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 * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\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 text color from his parent element.\n */\n color: inherit;\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: flex;\n flex-flow: column;\n align-items: center;\n justify-content: 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 align-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 .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\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 @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\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: transparent;\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 background-color: transparent;\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 n;return null===(n=this.inputRef)||void 0===n?void 0:n.files}async kolFocus(){var n;null===(n=this.inputRef)||void 0===n||n.focus()}async reset(){this.controller.setFormAssociatedValue(""),this.filename=this.translateFilenameText,this.hasFileSelected=!1,this.inputRef&&(this.inputRef.value="")}getFormFieldProps(){return{state:this.state,class:clsx("kol-input-file","file"),tooltipAlign:this._tooltipAlign,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:n=>{this.controller.onFacade.onFocus(n),this.inputHasFocus=!0},onBlur:n=>{this.controller.onFacade.onBlur(n),this.inputHasFocus=!1}})}render(){return h(FormFieldStateWrapper,Object.assign({key:"558fc9257273a3587a1b6a02025c14513c02d191"},this.getFormFieldProps()),h(InputContainerStateWrapperFc,{key:"81d0a3762e019cb406b92598e270bd5949cc5fae",state:this.state},h("span",{key:"4efe43a4882d3b3b179ae25065f83e962e3df615",class:clsx("kol-input-container__filename",{"kol-input-container__filename--has-file":this.hasFileSelected})},this.filename),h(InputStateWrapper,Object.assign({key:"49ba7e1659a3d0390f3de9be34a50618fdcf2252"},this.getInputProps())),h(KolButtonWcTag,{key:"fb7260d1a845f5c65b3a6f9856e1b44634280108",class:"kol-input-container__button",_label:this.translateDataBrowseText,_buttonVariant:"primary",_disabled:this._disabled})))}constructor(n){registerInstance(this,n),this.translateDataBrowseText=translate("kol-data-browse-text"),this.translateFilenameText=translate("kol-filename-text"),this.catchRef=n=>{this.inputRef=n},this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._multiple=!1,this._required=!1,this._tooltipAlign="top",this._touched=!1,this.filename=this.translateFilenameText,this.hasFileSelected=!1,this.state={_hideMsg:!1,_id:`id-${nonce()}`,_label:""},this.inputHasFocus=!1,this.onDragOver=n=>{var e,t,i;n.preventDefault(),null===(i=null===(t=null===(e=this.inputRef)||void 0===e?void 0:e.parentElement)||void 0===t?void 0:t.parentElement)||void 0===i||i.classList.add("kol-input-container--is-dragover")},this.onDragLeave=()=>{var n,e,t;null===(t=null===(e=null===(n=this.inputRef)||void 0===n?void 0:n.parentElement)||void 0===e?void 0:e.parentElement)||void 0===t||t.classList.remove("kol-input-container--is-dragover")},this.onDrop=n=>{var e,t,i,o;if(n.preventDefault(),null===(i=null===(t=null===(e=this.inputRef)||void 0===e?void 0:e.parentElement)||void 0===t?void 0:t.parentElement)||void 0===i||i.classList.remove("kol-input-container--is-dragover"),null===(o=n.dataTransfer)||void 0===o?void 0:o.files.length){const e=n.dataTransfer.files;this.filename=Array.from(e).map(n=>n.name).join(", "),this.controller.setFormAssociatedValue(e)}},this.onChange=n=>{if(this.inputRef instanceof HTMLInputElement&&"file"===this.inputRef.type){const e=this.inputRef.files;this.hasFileSelected=!!(null==e?void 0:e.length),this.filename=(null==e?void 0:e.length)?Array.from(e).map(n=>n.name).join(", "):this.translateFilenameText,this.controller.onFacade.onChange(n,e),this.controller.setFormAssociatedValue(e)}},this.onInput=n=>{if(this.inputRef instanceof HTMLInputElement&&"file"===this.inputRef.type){const e=this.inputRef.files;this.controller.onFacade.onInput(n,!1,e)}},this.controller=new InputFileController(this,"file",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccept(n){this.controller.validateAccept(n)}validateAccessKey(n){this.controller.validateAccessKey(n)}validateDisabled(n){this.controller.validateDisabled(n)}validateHideMsg(n){this.controller.validateHideMsg(n)}validateHideLabel(n){this.controller.validateHideLabel(n)}validateHint(n){this.controller.validateHint(n)}validateIcons(n){this.controller.validateIcons(n)}validateId(n){this.controller.validateId(n)}validateLabel(n){this.controller.validateLabel(n)}validateMsg(n){this.controller.validateMsg(n)}validateMultiple(n){this.controller.validateMultiple(n)}validateName(n){this.controller.validateName(n)}validateOn(n){this.controller.validateOn(n)}validateRequired(n){this.controller.validateRequired(n)}validateShortKey(n){this.controller.validateShortKey(n)}validateSmartButton(n){this.controller.validateSmartButton(n)}validateSyncValueBySelector(n){this.controller.validateSyncValueBySelector(n)}validateTouched(n){this.controller.validateTouched(n)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad()}componentDidLoad(){var n,e;const t=null===(e=null===(n=this.inputRef)||void 0===n?void 0:n.parentElement)||void 0===e?void 0:e.parentElement;null==t||t.addEventListener("dragover",this.onDragOver),null==t||t.addEventListener("dragleave",this.onDragLeave),null==t||t.addEventListener("drop",this.onDrop)}get host(){return 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};export{KolInputFile as kol_input_file};
4
+ import{h,r as registerInstance,g as getElement}from"./index-BIF3a06U.js";import{c as clsx}from"./clsx-eK3rPvPS.js";import{d as KolButtonWcTag}from"./component-names-CkE54Ym7.js";import{F as FormFieldStateWrapper}from"./FormFieldStateWrapper--mfN3zxB.js";import{I as InputIconController,a as InputContainerStateWrapperFc}from"./controller-icon-Os52h8zb.js";import{I as InputStateWrapper}from"./InputStateWrapper-DPKOPHLb.js";import{t as translate}from"./i18n-C5ifExT3.js";import{n as nonce}from"./dev.utils-CMwuN6qh.js";import{e as watchString}from"./common-Dd0zJQbD.js";import{v as validateMultiple}from"./multiple-Cj3JQafH.js";import{v as validateRequired}from"./required-CnTTpFCN.js";import"./access-and-short-key-B37XLwy2.js";import"./disabled-BhpAFgSp.js";import"./hide-label-B9FhGrWP.js";import"./label-Dnmzb2S_.js";import"./tooltip-align-Cnin7S26.js";import"./align-D-ifSKu8.js";import"./events-9-skLO0f.js";import"./associated.controller-ByY2WiIp.js";import"./bootstrap-CMXwSSvb.js";import"./i18n-ZF6JbdVP.js";import"./isObject-DvSELytj.js";import"./tslib.es6-CxX45GIN.js";import"./reuse-CX4AQDkS.js";import"./InternalUnderlinedBadgeText-B_K9YhEU.js";import"./Alert-DtvOOMUX.js";import"./bem-C27SfH6w.js";import"./browser-DiRe0qUf.js";import"./Heading-CtNjSZvy.js";import"./Icon-C0YAvZYM.js";import"./icons-B5i9zwjJ.js";import"./Input-uDwRZfTu.js";const validateAccept=(n,e,t={})=>{watchString(n,"_accept",e,t)};class InputFileController extends InputIconController{constructor(n,e,t){super(n,e,t),this.component=n}validateAccept(n){validateAccept(this.component,n)}validateMultiple(n){validateMultiple(this.component,n)}validateRequired(n){validateRequired(this.component,n)}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 * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\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 text color from his parent element.\n */\n color: inherit;\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: flex;\n flex-flow: column;\n align-items: center;\n justify-content: 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 align-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 .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\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 @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\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: transparent;\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 background-color: transparent;\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 n;return null===(n=this.inputRef)||void 0===n?void 0:n.files}async kolFocus(){var n;null===(n=this.inputRef)||void 0===n||n.focus()}async reset(){this.controller.setFormAssociatedValue(""),this.filename=this.translateFilenameText,this.hasFileSelected=!1,this.inputRef&&(this.inputRef.value="")}getFormFieldProps(){return{state:this.state,class:clsx("kol-input-file","file"),tooltipAlign:this._tooltipAlign,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:n=>{this.controller.onFacade.onFocus(n),this.inputHasFocus=!0},onBlur:n=>{this.controller.onFacade.onBlur(n),this.inputHasFocus=!1}})}render(){return h(FormFieldStateWrapper,Object.assign({key:"558fc9257273a3587a1b6a02025c14513c02d191"},this.getFormFieldProps()),h(InputContainerStateWrapperFc,{key:"81d0a3762e019cb406b92598e270bd5949cc5fae",state:this.state},h("span",{key:"4efe43a4882d3b3b179ae25065f83e962e3df615",class:clsx("kol-input-container__filename",{"kol-input-container__filename--has-file":this.hasFileSelected})},this.filename),h(InputStateWrapper,Object.assign({key:"49ba7e1659a3d0390f3de9be34a50618fdcf2252"},this.getInputProps())),h(KolButtonWcTag,{key:"fb7260d1a845f5c65b3a6f9856e1b44634280108",class:"kol-input-container__button",_label:this.translateDataBrowseText,_buttonVariant:"primary",_disabled:this._disabled})))}constructor(n){registerInstance(this,n),this.translateDataBrowseText=translate("kol-data-browse-text"),this.translateFilenameText=translate("kol-filename-text"),this.catchRef=n=>{this.inputRef=n},this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._multiple=!1,this._required=!1,this._tooltipAlign="top",this._touched=!1,this.filename=this.translateFilenameText,this.hasFileSelected=!1,this.state={_hideMsg:!1,_id:`id-${nonce()}`,_label:""},this.inputHasFocus=!1,this.onDragOver=n=>{var e,t,i;n.preventDefault(),null===(i=null===(t=null===(e=this.inputRef)||void 0===e?void 0:e.parentElement)||void 0===t?void 0:t.parentElement)||void 0===i||i.classList.add("kol-input-container--is-dragover")},this.onDragLeave=()=>{var n,e,t;null===(t=null===(e=null===(n=this.inputRef)||void 0===n?void 0:n.parentElement)||void 0===e?void 0:e.parentElement)||void 0===t||t.classList.remove("kol-input-container--is-dragover")},this.onDrop=n=>{var e,t,i,o;if(n.preventDefault(),null===(i=null===(t=null===(e=this.inputRef)||void 0===e?void 0:e.parentElement)||void 0===t?void 0:t.parentElement)||void 0===i||i.classList.remove("kol-input-container--is-dragover"),null===(o=n.dataTransfer)||void 0===o?void 0:o.files.length){const e=n.dataTransfer.files;this.filename=Array.from(e).map(n=>n.name).join(", "),this.controller.setFormAssociatedValue(e)}},this.onChange=n=>{if(this.inputRef instanceof HTMLInputElement&&"file"===this.inputRef.type){const e=this.inputRef.files;this.hasFileSelected=!!(null==e?void 0:e.length),this.filename=(null==e?void 0:e.length)?Array.from(e).map(n=>n.name).join(", "):this.translateFilenameText,this.controller.onFacade.onChange(n,e),this.controller.setFormAssociatedValue(e)}},this.onInput=n=>{if(this.inputRef instanceof HTMLInputElement&&"file"===this.inputRef.type){const e=this.inputRef.files;this.controller.onFacade.onInput(n,!1,e)}},this.controller=new InputFileController(this,"file",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccept(n){this.controller.validateAccept(n)}validateAccessKey(n){this.controller.validateAccessKey(n)}validateDisabled(n){this.controller.validateDisabled(n)}validateHideMsg(n){this.controller.validateHideMsg(n)}validateHideLabel(n){this.controller.validateHideLabel(n)}validateHint(n){this.controller.validateHint(n)}validateIcons(n){this.controller.validateIcons(n)}validateId(n){this.controller.validateId(n)}validateLabel(n){this.controller.validateLabel(n)}validateMsg(n){this.controller.validateMsg(n)}validateMultiple(n){this.controller.validateMultiple(n)}validateName(n){this.controller.validateName(n)}validateOn(n){this.controller.validateOn(n)}validateRequired(n){this.controller.validateRequired(n)}validateShortKey(n){this.controller.validateShortKey(n)}validateSmartButton(n){this.controller.validateSmartButton(n)}validateSyncValueBySelector(n){this.controller.validateSyncValueBySelector(n)}validateTouched(n){this.controller.validateTouched(n)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad()}componentDidLoad(){var n,e;const t=null===(e=null===(n=this.inputRef)||void 0===n?void 0:n.parentElement)||void 0===e?void 0:e.parentElement;null==t||t.addEventListener("dragover",this.onDragOver),null==t||t.addEventListener("dragleave",this.onDragLeave),null==t||t.addEventListener("drop",this.onDrop)}get host(){return 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};export{KolInputFile as kol_input_file};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{h,r as registerInstance,g as getElement}from"./index-BG8JuXph.js";import{c as clsx}from"./clsx-eK3rPvPS.js";import{F as FormFieldStateWrapper}from"./FormFieldStateWrapper-BBrHIwy9.js";import{I as InputIconController,a as InputContainerStateWrapperFc}from"./controller-icon-DNLRSXZr.js";import{I as InputStateWrapper}from"./InputStateWrapper-WDItQP2r.js";import{n as nonce}from"./dev.utils-BB49mRnl.js";import{p as propagateSubmitEventToForm}from"./controller-C5Ill7ej.js";import"./common-Dd0zJQbD.js";import{v as validateAutoComplete}from"./auto-complete-mCkUnxg2.js";import{v as validatePlaceholder}from"./placeholder-BVhy3BzI.js";import{v as validateReadOnly}from"./read-only-BetTuumR.js";import{v as validateRequired}from"./required-CnTTpFCN.js";import{v as validateSuggestions}from"./suggestions-B-jLvT4L.js";import"./access-and-short-key-B37XLwy2.js";import"./disabled-BhpAFgSp.js";import"./hide-label-B9FhGrWP.js";import"./label-Dnmzb2S_.js";import"./tooltip-align-Cnin7S26.js";import"./align-D-ifSKu8.js";import"./events-9-skLO0f.js";import"./associated.controller-ByY2WiIp.js";import"./bootstrap-CMXwSSvb.js";import"./component-names-CkE54Ym7.js";import"./i18n-ZF6JbdVP.js";import"./isObject-DvSELytj.js";import"./tslib.es6-CxX45GIN.js";import"./reuse-CX4AQDkS.js";import"./i18n-C5ifExT3.js";import"./InternalUnderlinedBadgeText-CodJXcQG.js";import"./Alert-B3jx2jlL.js";import"./bem-C27SfH6w.js";import"./browser-DiRe0qUf.js";import"./Heading-DqUSmJEO.js";import"./Icon-B-YLFbev.js";import"./icons-B5i9zwjJ.js";import"./Input-D-UExd4D.js";class InputNumberController extends InputIconController{constructor(e,t,n){super(e,t,n),this.component=e}validateAutoComplete(e){validateAutoComplete(this.component,e)}validateSuggestions(e){validateSuggestions(this.component,e)}validateMax(e){this.validateNumber("_max",e)}validateMin(e){this.validateNumber("_min",e)}validatePlaceholder(e){validatePlaceholder(this.component,e)}validateReadOnly(e){validateReadOnly(this.component,e)}validateRequired(e){validateRequired(this.component,e)}validateStep(e){this.validateNumber("_step",e)}validateValue(e){this.validateNumber("_value",e),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateMax(this.component._max),this.validateMin(this.component._min),this.validateSuggestions(this.component._suggestions),this.validatePlaceholder(this.component._placeholder),this.validateReadOnly(this.component._readOnly),this.validateRequired(this.component._required),this.validateStep(this.component._step),this.validateValue(this.component._value)}}const defaultStyleCss="/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\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 text color from his parent element.\n */\n color: inherit;\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: flex;\n flex-flow: column;\n align-items: center;\n justify-content: 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 align-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 .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\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 @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\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: transparent;\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 background-color: transparent;\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("kol-input-number","number",{"has-value":this.state._hasValue}),tooltipAlign:this._tooltipAlign,alert:this.showAsAlert()}}getInputProps(){return Object.assign(Object.assign({ref:this.catchRef,state:this.state,type:"number"},this.controller.onFacade),{onInput:this.onInput,onChange:this.onChange,onKeyDown:this.onKeyDown,onFocus:e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},onBlur:e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1}})}render(){return h(FormFieldStateWrapper,Object.assign({key:"5e33361f11d47a3a5dc39797a291258ab5e27c54"},this.getFormFieldProps()),h(InputContainerStateWrapperFc,{key:"2035ec896170fdb2cf473d15ca87f32242c0e500",state:this.state},h(InputStateWrapper,Object.assign({key:"6d9b49fc92337ef6078c1ff3d32fb02fb21bf860"},this.getInputProps()))))}constructor(e){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=>{this.controller.onFacade.onKeyDown(e),"Enter"!==e.code&&"NumpadEnter"!==e.code||propagateSubmitEventToForm({form:this.host})},this._autoComplete="off",this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._readOnly=!1,this._required=!1,this._tooltipAlign="top",this._touched=!1,this.state={_hasValue:!1,_hideMsg:!1,_id:`id-${nonce()}`,_label:"",_suggestions:[]},this._initialValueType="null",this.inputHasFocus=!1,this.controller=new InputNumberController(this,"number",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(e){this.controller.validateAccessKey(e)}validateAutoComplete(e){this.controller.validateAutoComplete(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHideMsg(e){this.controller.validateHideMsg(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMax(e){this.controller.validateMax(e)}validateMin(e){this.controller.validateMin(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validatePlaceholder(e){this.controller.validatePlaceholder(e)}validateReadOnly(e){this.controller.validateReadOnly(e)}validateRequired(e){this.controller.validateRequired(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSmartButton(e){this.controller.validateSmartButton(e)}validateSuggestions(e){this.controller.validateSuggestions(e)}validateStep(e){this.controller.validateStep(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e),null!=e&&this.setInitialValueType(e)}componentWillLoad(){void 0!==this._value&&this.setInitialValueType(this._value),this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener(e=>this.state._hasValue=!!e)}get host(){return 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};export{KolInputNumber as kol_input_number};
4
+ import{h,r as registerInstance,g as getElement}from"./index-BIF3a06U.js";import{c as clsx}from"./clsx-eK3rPvPS.js";import{F as FormFieldStateWrapper}from"./FormFieldStateWrapper--mfN3zxB.js";import{I as InputIconController,a as InputContainerStateWrapperFc}from"./controller-icon-Os52h8zb.js";import{I as InputStateWrapper}from"./InputStateWrapper-DPKOPHLb.js";import{n as nonce}from"./dev.utils-CMwuN6qh.js";import{p as propagateSubmitEventToForm}from"./controller-C5Ill7ej.js";import"./common-Dd0zJQbD.js";import{v as validateAutoComplete}from"./auto-complete-mCkUnxg2.js";import{v as validatePlaceholder}from"./placeholder-BVhy3BzI.js";import{v as validateReadOnly}from"./read-only-BetTuumR.js";import{v as validateRequired}from"./required-CnTTpFCN.js";import{v as validateSuggestions}from"./suggestions-B-jLvT4L.js";import"./access-and-short-key-B37XLwy2.js";import"./disabled-BhpAFgSp.js";import"./hide-label-B9FhGrWP.js";import"./label-Dnmzb2S_.js";import"./tooltip-align-Cnin7S26.js";import"./align-D-ifSKu8.js";import"./events-9-skLO0f.js";import"./associated.controller-ByY2WiIp.js";import"./bootstrap-CMXwSSvb.js";import"./component-names-CkE54Ym7.js";import"./i18n-ZF6JbdVP.js";import"./isObject-DvSELytj.js";import"./tslib.es6-CxX45GIN.js";import"./reuse-CX4AQDkS.js";import"./i18n-C5ifExT3.js";import"./InternalUnderlinedBadgeText-B_K9YhEU.js";import"./Alert-DtvOOMUX.js";import"./bem-C27SfH6w.js";import"./browser-DiRe0qUf.js";import"./Heading-CtNjSZvy.js";import"./Icon-C0YAvZYM.js";import"./icons-B5i9zwjJ.js";import"./Input-uDwRZfTu.js";class InputNumberController extends InputIconController{constructor(e,t,n){super(e,t,n),this.component=e}validateAutoComplete(e){validateAutoComplete(this.component,e)}validateSuggestions(e){validateSuggestions(this.component,e)}validateMax(e){this.validateNumber("_max",e)}validateMin(e){this.validateNumber("_min",e)}validatePlaceholder(e){validatePlaceholder(this.component,e)}validateReadOnly(e){validateReadOnly(this.component,e)}validateRequired(e){validateRequired(this.component,e)}validateStep(e){this.validateNumber("_step",e)}validateValue(e){this.validateNumber("_value",e),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateMax(this.component._max),this.validateMin(this.component._min),this.validateSuggestions(this.component._suggestions),this.validatePlaceholder(this.component._placeholder),this.validateReadOnly(this.component._readOnly),this.validateRequired(this.component._required),this.validateStep(this.component._step),this.validateValue(this.component._value)}}const defaultStyleCss="/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\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 text color from his parent element.\n */\n color: inherit;\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: flex;\n flex-flow: column;\n align-items: center;\n justify-content: 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 align-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 .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\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 @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\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: transparent;\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 background-color: transparent;\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("kol-input-number","number",{"has-value":this.state._hasValue}),tooltipAlign:this._tooltipAlign,alert:this.showAsAlert()}}getInputProps(){return Object.assign(Object.assign({ref:this.catchRef,state:this.state,type:"number"},this.controller.onFacade),{onInput:this.onInput,onChange:this.onChange,onKeyDown:this.onKeyDown,onFocus:e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},onBlur:e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1}})}render(){return h(FormFieldStateWrapper,Object.assign({key:"5e33361f11d47a3a5dc39797a291258ab5e27c54"},this.getFormFieldProps()),h(InputContainerStateWrapperFc,{key:"2035ec896170fdb2cf473d15ca87f32242c0e500",state:this.state},h(InputStateWrapper,Object.assign({key:"6d9b49fc92337ef6078c1ff3d32fb02fb21bf860"},this.getInputProps()))))}constructor(e){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=>{this.controller.onFacade.onKeyDown(e),"Enter"!==e.code&&"NumpadEnter"!==e.code||propagateSubmitEventToForm({form:this.host})},this._autoComplete="off",this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._readOnly=!1,this._required=!1,this._tooltipAlign="top",this._touched=!1,this.state={_hasValue:!1,_hideMsg:!1,_id:`id-${nonce()}`,_label:"",_suggestions:[]},this._initialValueType="null",this.inputHasFocus=!1,this.controller=new InputNumberController(this,"number",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(e){this.controller.validateAccessKey(e)}validateAutoComplete(e){this.controller.validateAutoComplete(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHideMsg(e){this.controller.validateHideMsg(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMax(e){this.controller.validateMax(e)}validateMin(e){this.controller.validateMin(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validatePlaceholder(e){this.controller.validatePlaceholder(e)}validateReadOnly(e){this.controller.validateReadOnly(e)}validateRequired(e){this.controller.validateRequired(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSmartButton(e){this.controller.validateSmartButton(e)}validateSuggestions(e){this.controller.validateSuggestions(e)}validateStep(e){this.controller.validateStep(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e),null!=e&&this.setInitialValueType(e)}componentWillLoad(){void 0!==this._value&&this.setInitialValueType(this._value),this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener(e=>this.state._hasValue=!!e)}get host(){return 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};export{KolInputNumber as kol_input_number};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{h,r as registerInstance,g as getElement}from"./index-BG8JuXph.js";import{c as clsx}from"./clsx-eK3rPvPS.js";import{j as devHint}from"./common-Dd0zJQbD.js";import{F as FormFieldStateWrapper}from"./FormFieldStateWrapper-BBrHIwy9.js";import{K as KolIconButtonFc,a as InputContainerStateWrapperFc}from"./controller-icon-DNLRSXZr.js";import{I as InputStateWrapper}from"./InputStateWrapper-WDItQP2r.js";import{t as translate}from"./i18n-C5ifExT3.js";import{n as nonce}from"./dev.utils-BB49mRnl.js";import{p as propagateSubmitEventToForm}from"./controller-C5Ill7ej.js";import{I as InputPasswordController}from"./controller-CzLzXDtQ.js";import"./access-and-short-key-B37XLwy2.js";import"./disabled-BhpAFgSp.js";import"./hide-label-B9FhGrWP.js";import"./label-Dnmzb2S_.js";import"./tooltip-align-Cnin7S26.js";import"./align-D-ifSKu8.js";import"./events-9-skLO0f.js";import"./associated.controller-ByY2WiIp.js";import"./bootstrap-CMXwSSvb.js";import"./component-names-CkE54Ym7.js";import"./i18n-ZF6JbdVP.js";import"./isObject-DvSELytj.js";import"./tslib.es6-CxX45GIN.js";import"./reuse-CX4AQDkS.js";import"./InternalUnderlinedBadgeText-CodJXcQG.js";import"./Alert-B3jx2jlL.js";import"./bem-C27SfH6w.js";import"./browser-DiRe0qUf.js";import"./Heading-DqUSmJEO.js";import"./Icon-B-YLFbev.js";import"./icons-B5i9zwjJ.js";import"./Input-D-UExd4D.js";import"./auto-complete-mCkUnxg2.js";import"./max-length-behavior-nTw1Zuyf.js";import"./placeholder-BVhy3BzI.js";import"./read-only-BetTuumR.js";import"./required-CnTTpFCN.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 * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\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 text color from his parent element.\n */\n color: inherit;\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: flex;\n flex-flow: column;\n align-items: center;\n justify-content: 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 align-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 .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\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 @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\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: transparent;\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 background-color: transparent;\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 t;return null===(t=this.inputRef)||void 0===t?void 0:t.value}async kolFocus(){var t;null===(t=this.inputRef)||void 0===t||t.focus()}getFormFieldProps(){return{state:this.state,class:clsx("kol-input-password","password",{"has-value":this.state._hasValue,"kol-form-field--has-counter":this.controller.hasSoftCharacterLimit()||this.controller.hasCounter()}),tooltipAlign:this._tooltipAlign,alert:this.showAsAlert()}}getInputProps(){const t="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:t},this.controller.onFacade),{onInput:this.onInput,onKeyDown:this.onKeyDown,onFocus:t=>{this.controller.onFacade.onFocus(t),this.inputHasFocus=!0},onBlur:t=>{this.controller.onFacade.onBlur(t),this.inputHasFocus=!1}})}getShowPasswordButton(){return"visibility-toggle"!==this._variant?null:h(KolIconButtonFc,{componentName:"button",class:"kol-input-password__password-toggle-button kol-input-container__smart-button","data-testid":"kol-input-password-toggle-button",label:this._passwordVisible?this.translateHidePassword:this.translateShowPassword,buttonVariant:"ghost",onClick:()=>{var t;this._passwordVisible=!this._passwordVisible,null===(t=this.inputRef)||void 0===t||t.focus()},icon:"codicon codicon-eye-"+(this._passwordVisible?"closed":"watch"),disabled:this._disabled})}render(){return h(FormFieldStateWrapper,Object.assign({key:"20803f39ce7c575e6f4fe341e8be9cf7cce43288"},this.getFormFieldProps()),h(InputContainerStateWrapperFc,{key:"a74adf9d03c50218965183a42ebf38a92b451e1f",state:this.state,endAdornment:this.getShowPasswordButton()},h(InputStateWrapper,Object.assign({key:"b364562f0b6834c37643a567ecdfc3a66aee3f48"},this.getInputProps()))))}constructor(t){registerInstance(this,t),this.translateHidePassword=translate("kol-hide-password"),this.translateShowPassword=translate("kol-show-password"),this.catchRef=t=>{this.inputRef=t},this.onKeyDown=t=>{this.controller.onFacade.onKeyDown(t),"Enter"!==t.code&&"NumpadEnter"!==t.code||propagateSubmitEventToForm({form:this.host})},this.onInput=t=>{this._value=t.target.value,this.controller.onFacade.onInput(t)},this._autoComplete="off",this._hasCounter=!1,this._maxLengthBehavior="hard",this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._readOnly=!1,this._required=!1,this._tooltipAlign="top",this._touched=!1,this._variant="default",this.state={_currentLength:0,_currentLengthDebounced:0,_hasValue:!1,_hideMsg:!1,_id:`id-${nonce()}`,_label:"",_variant:"default"},this._passwordVisible=!1,this.inputHasFocus=!1,this.controller=new InputPasswordController(this,"password",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAutoComplete(t){this.controller.validateAutoComplete(t),"on"===t&&devHint("[KolInputPassword] The 'autocomplete' option should not be set to \"on\" for a password input field")}validateMaxLengthBehavior(t){this.controller.validateMaxLengthBehavior(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateVariant(t){this.controller.validateVariant(t)}validateHideMsg(t){this.controller.validateHideMsg(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHasCounter(t){this.controller.validateHasCounter(t)}validateHint(t){this.controller.validateHint(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateMaxLength(t){this.controller.validateMaxLength(t)}validateMsg(t){this.controller.validateMsg(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validatePattern(t){this.controller.validatePattern(t)}validatePlaceholder(t){this.controller.validatePlaceholder(t)}validateReadOnly(t){this.controller.validateReadOnly(t)}validateRequired(t){this.controller.validateRequired(t)}validateShortKey(t){this.controller.validateShortKey(t)}validateSmartButton(t){this.controller.validateSmartButton(t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTouched(t){this.controller.validateTouched(t)}validateValue(t){this.controller.validateValue(t)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener(t=>this.state._hasValue=!!t)}get host(){return 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};export{KolInputPassword as kol_input_password};
4
+ import{h,r as registerInstance,g as getElement}from"./index-BIF3a06U.js";import{c as clsx}from"./clsx-eK3rPvPS.js";import{j as devHint}from"./common-Dd0zJQbD.js";import{F as FormFieldStateWrapper}from"./FormFieldStateWrapper--mfN3zxB.js";import{K as KolIconButtonFc,a as InputContainerStateWrapperFc}from"./controller-icon-Os52h8zb.js";import{I as InputStateWrapper}from"./InputStateWrapper-DPKOPHLb.js";import{t as translate}from"./i18n-C5ifExT3.js";import{n as nonce}from"./dev.utils-CMwuN6qh.js";import{p as propagateSubmitEventToForm}from"./controller-C5Ill7ej.js";import{I as InputPasswordController}from"./controller-CzA8VVx0.js";import"./access-and-short-key-B37XLwy2.js";import"./disabled-BhpAFgSp.js";import"./hide-label-B9FhGrWP.js";import"./label-Dnmzb2S_.js";import"./tooltip-align-Cnin7S26.js";import"./align-D-ifSKu8.js";import"./events-9-skLO0f.js";import"./associated.controller-ByY2WiIp.js";import"./bootstrap-CMXwSSvb.js";import"./component-names-CkE54Ym7.js";import"./i18n-ZF6JbdVP.js";import"./isObject-DvSELytj.js";import"./tslib.es6-CxX45GIN.js";import"./reuse-CX4AQDkS.js";import"./InternalUnderlinedBadgeText-B_K9YhEU.js";import"./Alert-DtvOOMUX.js";import"./bem-C27SfH6w.js";import"./browser-DiRe0qUf.js";import"./Heading-CtNjSZvy.js";import"./Icon-C0YAvZYM.js";import"./icons-B5i9zwjJ.js";import"./Input-uDwRZfTu.js";import"./auto-complete-mCkUnxg2.js";import"./max-length-behavior-nTw1Zuyf.js";import"./placeholder-BVhy3BzI.js";import"./read-only-BetTuumR.js";import"./required-CnTTpFCN.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 * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\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 text color from his parent element.\n */\n color: inherit;\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: flex;\n flex-flow: column;\n align-items: center;\n justify-content: 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 align-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 .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\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 @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\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: transparent;\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 background-color: transparent;\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 t;return null===(t=this.inputRef)||void 0===t?void 0:t.value}async kolFocus(){var t;null===(t=this.inputRef)||void 0===t||t.focus()}getFormFieldProps(){return{state:this.state,class:clsx("kol-input-password","password",{"has-value":this.state._hasValue,"kol-form-field--has-counter":this.controller.hasSoftCharacterLimit()||this.controller.hasCounter()}),tooltipAlign:this._tooltipAlign,alert:this.showAsAlert()}}getInputProps(){const t="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:t},this.controller.onFacade),{onInput:this.onInput,onKeyDown:this.onKeyDown,onFocus:t=>{this.controller.onFacade.onFocus(t),this.inputHasFocus=!0},onBlur:t=>{this.controller.onFacade.onBlur(t),this.inputHasFocus=!1}})}getShowPasswordButton(){return"visibility-toggle"!==this._variant?null:h(KolIconButtonFc,{componentName:"button",class:"kol-input-password__password-toggle-button kol-input-container__smart-button","data-testid":"kol-input-password-toggle-button",label:this._passwordVisible?this.translateHidePassword:this.translateShowPassword,buttonVariant:"ghost",onClick:()=>{var t;this._passwordVisible=!this._passwordVisible,null===(t=this.inputRef)||void 0===t||t.focus()},icon:"codicon codicon-eye-"+(this._passwordVisible?"closed":"watch"),disabled:this._disabled})}render(){return h(FormFieldStateWrapper,Object.assign({key:"20803f39ce7c575e6f4fe341e8be9cf7cce43288"},this.getFormFieldProps()),h(InputContainerStateWrapperFc,{key:"a74adf9d03c50218965183a42ebf38a92b451e1f",state:this.state,endAdornment:this.getShowPasswordButton()},h(InputStateWrapper,Object.assign({key:"b364562f0b6834c37643a567ecdfc3a66aee3f48"},this.getInputProps()))))}constructor(t){registerInstance(this,t),this.translateHidePassword=translate("kol-hide-password"),this.translateShowPassword=translate("kol-show-password"),this.catchRef=t=>{this.inputRef=t},this.onKeyDown=t=>{this.controller.onFacade.onKeyDown(t),"Enter"!==t.code&&"NumpadEnter"!==t.code||propagateSubmitEventToForm({form:this.host})},this.onInput=t=>{this._value=t.target.value,this.controller.onFacade.onInput(t)},this._autoComplete="off",this._hasCounter=!1,this._maxLengthBehavior="hard",this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._readOnly=!1,this._required=!1,this._tooltipAlign="top",this._touched=!1,this._variant="default",this.state={_currentLength:0,_currentLengthDebounced:0,_hasValue:!1,_hideMsg:!1,_id:`id-${nonce()}`,_label:"",_variant:"default"},this._passwordVisible=!1,this.inputHasFocus=!1,this.controller=new InputPasswordController(this,"password",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAutoComplete(t){this.controller.validateAutoComplete(t),"on"===t&&devHint("[KolInputPassword] The 'autocomplete' option should not be set to \"on\" for a password input field")}validateMaxLengthBehavior(t){this.controller.validateMaxLengthBehavior(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateVariant(t){this.controller.validateVariant(t)}validateHideMsg(t){this.controller.validateHideMsg(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHasCounter(t){this.controller.validateHasCounter(t)}validateHint(t){this.controller.validateHint(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateMaxLength(t){this.controller.validateMaxLength(t)}validateMsg(t){this.controller.validateMsg(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validatePattern(t){this.controller.validatePattern(t)}validatePlaceholder(t){this.controller.validatePlaceholder(t)}validateReadOnly(t){this.controller.validateReadOnly(t)}validateRequired(t){this.controller.validateRequired(t)}validateShortKey(t){this.controller.validateShortKey(t)}validateSmartButton(t){this.controller.validateSmartButton(t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTouched(t){this.controller.validateTouched(t)}validateValue(t){this.controller.validateValue(t)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener(t=>this.state._hasValue=!!t)}get host(){return 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};export{KolInputPassword as kol_input_password};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{h,r as registerInstance,g as getElement}from"./index-BG8JuXph.js";import{c as clsx}from"./clsx-eK3rPvPS.js";import{n as nonce}from"./dev.utils-BB49mRnl.js";import{p as propagateSubmitEventToForm}from"./controller-C5Ill7ej.js";import{a as InputRadioController}from"./controller-BPnEmeBr.js";import{F as FieldControlStateWrapper}from"./FieldControlStateWrapper-oMcmUdOF.js";import{c as checkHasMsg,g as getRenderStates,F as FormFieldStateWrapper}from"./FormFieldStateWrapper-BBrHIwy9.js";import{_ as __rest}from"./tslib.es6-CxX45GIN.js";import"./common-Dd0zJQbD.js";import{I as InputFc}from"./Input-D-UExd4D.js";import"./component-names-CkE54Ym7.js";import"./label-Dnmzb2S_.js";import"./required-CnTTpFCN.js";import"./orientation-eCMt8CD1.js";import"./reuse-CX4AQDkS.js";import"./access-and-short-key-B37XLwy2.js";import"./disabled-BhpAFgSp.js";import"./hide-label-B9FhGrWP.js";import"./tooltip-align-Cnin7S26.js";import"./align-D-ifSKu8.js";import"./events-9-skLO0f.js";import"./associated.controller-ByY2WiIp.js";import"./bootstrap-CMXwSSvb.js";import"./i18n-ZF6JbdVP.js";import"./isObject-DvSELytj.js";import"./i18n-C5ifExT3.js";import"./InternalUnderlinedBadgeText-CodJXcQG.js";import"./Alert-B3jx2jlL.js";import"./bem-C27SfH6w.js";import"./browser-DiRe0qUf.js";import"./Heading-DqUSmJEO.js";const InputWrapperFc=n=>{var{class:e}=n,t=__rest(n,["class"]);return h(InputFc,Object.assign({class:clsx("kol-input-radio__input",e)},t,{type:"radio"}))},RadioFc=n=>{var e,{class:t,inputProps:i}=n,o=__rest(n,["class","inputProps"]);const l=checkHasMsg(null==i?void 0:i.msg,null==i?void 0:i.touched),a="string"==typeof(null==i?void 0:i.msg)?"error":null===(e=null==i?void 0:i.msg)||void 0===e?void 0:e._type,r={"kol-input-radio--checked":null==i?void 0:i.checked,"kol-input-radio--disabled":Boolean(null==i?void 0:i.disabled),"kol-input-radio--required":Boolean(null==i?void 0:i.required),"kol-input-radio--touched":Boolean(null==i?void 0:i.touched),[`kol-input-radio--${a||"error"}`]:Boolean(l)};return h("label",Object.assign({class:clsx("kol-input-radio",r,t)},o),h(InputWrapperFc,Object.assign({},i)))};function getRadioProps(n,e={}){const{ariaDescribedBy:t}=getRenderStates(n),i={id:n._id,hideLabel:n._hideLabel,label:n._label,value:n._value,disabled:n._disabled,name:n._name,ariaDescribedBy:t};return"_required"in n&&(i.required=n._required),"_touched"in n&&(i.touched=n._touched),"_msg"in n&&(i.msg=n._msg),Object.assign(Object.assign({},i),e)}const RadioStateWrapper=n=>{var{state:e,inputProps:t}=n,i=__rest(n,["state","inputProps"]);return h(RadioFc,Object.assign({inputProps:getRadioProps(e,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 * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\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 text color from his parent element.\n */\n color: inherit;\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: flex;\n flex-flow: column;\n align-items: center;\n justify-content: 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 align-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 .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\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 @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\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: transparent;\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 n;null===(n=this.inputRef)||void 0===n||n.focus()}getFormFieldProps(){return{state:this.state,component:"fieldset",disabled:Boolean(this.state._disabled),class:clsx("kol-form-field--radio"),formFieldLabelProps:{component:"legend",class:"kol-form-field__label--legend"},formFieldInputProps:{class:`kol-form-field__input--orientation-${this.state._orientation}`},tooltipAlign:this._tooltipAlign,alert:this.showAsAlert(),hideLabel:!1}}render(){return h(FormFieldStateWrapper,Object.assign({key:"9dc7e4569627db33b82ae9ec448e30087d87ab6f"},this.getFormFieldProps()),this.state._options.map((n,e)=>this.renderOption(n,e)))}calculateDisabled(n){return Boolean(this.state._disabled)||Boolean(n.disabled)}getOptionProps(n,e){return{state:this.state,id:e,hint:n.hint,label:n.label,required:!1,fieldControlLabelProps:{showBadge:!1},disabled:this.calculateDisabled(n)}}getInputProps(n,e,t,i){return{state:this.state,inputProps:Object.assign(Object.assign({id:e,ref:this.state._value===n.value?this.catchRef:void 0,"aria-label":this.state._hideLabel&&"string"==typeof n.label?n.label:void 0,type:"radio",name:this.state._name||this.state._id,value:`-${t}`,checked:i,disabled:this.calculateDisabled(n)},this.controller.onFacade),{onChange:this.onChange,onClick:void 0,onInput:this.onInput,onKeyDown:this.onKeyDown.bind(this),onFocus:n=>{this.controller.onFacade.onFocus(n),this.inputHasFocus=!0},onBlur:n=>{this.controller.onFacade.onBlur(n),this.inputHasFocus=!1}})}}renderOption(n,e){const t=`${this.state._id}-${e}`,i=this.state._value===n.value;return h(FieldControlStateWrapper,Object.assign({key:t},this.getOptionProps(n,t)),h(RadioStateWrapper,Object.assign({},this.getInputProps(n,t,e,i))))}constructor(n){registerInstance(this,n),this.catchRef=n=>{this.inputRef=n},this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._orientation="vertical",this._required=!1,this._tooltipAlign="top",this._touched=!1,this._value=null,this.state={_hideMsg:!1,_id:`id-${nonce()}`,_label:"",_options:[],_orientation:"vertical"},this.inputHasFocus=!1,this.onInput=n=>{if(n.target instanceof HTMLInputElement){const e=this.controller.getOptionByKey(n.target.value);void 0!==e&&this.controller.onFacade.onInput(n,!0,e.value)}},this.onChange=n=>{if(n.target instanceof HTMLInputElement){const e=this.controller.getOptionByKey(n.target.value);void 0!==e&&(this.controller.onFacade.onChange(n,e.value),this._value=e.value)}},this.onKeyDown=n=>{this.controller.onFacade.onKeyDown(n),"Enter"!==n.code&&"NumpadEnter"!==n.code||propagateSubmitEventToForm({form:this.host})},this.controller=new InputRadioController(this,"radio",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateTooltipAlign(n){this.controller.validateTooltipAlign(n)}validateDisabled(n){this.controller.validateDisabled(n)}validateHideLabel(n){this.controller.validateHideLabel(n)}validateHideMsg(n){this.controller.validateHideMsg(n)}validateHint(n){this.controller.validateHint(n)}validateId(n){this.controller.validateId(n)}validateLabel(n){this.controller.validateLabel(n)}validateMsg(n){this.controller.validateMsg(n)}validateName(n){this.controller.validateName(n)}validateOn(n){this.controller.validateOn(n)}validateOptions(n){this.controller.validateOptions(n)}validateOrientation(n){this.controller.validateOrientation(n)}validateRequired(n){this.controller.validateRequired(n)}validateSyncValueBySelector(n){this.controller.validateSyncValueBySelector(n)}validateTouched(n){this.controller.validateTouched(n)}validateValue(n){this.controller.validateValue(n)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad()}get host(){return 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};export{KolInputRadio as kol_input_radio};
4
+ import{h,r as registerInstance,g as getElement}from"./index-BIF3a06U.js";import{c as clsx}from"./clsx-eK3rPvPS.js";import{n as nonce}from"./dev.utils-CMwuN6qh.js";import{p as propagateSubmitEventToForm}from"./controller-C5Ill7ej.js";import{a as InputRadioController}from"./controller-DZi-VgTc.js";import{F as FieldControlStateWrapper}from"./FieldControlStateWrapper-vSHoKkZu.js";import{c as checkHasMsg,g as getRenderStates,F as FormFieldStateWrapper}from"./FormFieldStateWrapper--mfN3zxB.js";import{_ as __rest}from"./tslib.es6-CxX45GIN.js";import"./common-Dd0zJQbD.js";import{I as InputFc}from"./Input-uDwRZfTu.js";import"./component-names-CkE54Ym7.js";import"./label-Dnmzb2S_.js";import"./required-CnTTpFCN.js";import"./orientation-eCMt8CD1.js";import"./reuse-CX4AQDkS.js";import"./access-and-short-key-B37XLwy2.js";import"./disabled-BhpAFgSp.js";import"./hide-label-B9FhGrWP.js";import"./tooltip-align-Cnin7S26.js";import"./align-D-ifSKu8.js";import"./events-9-skLO0f.js";import"./associated.controller-ByY2WiIp.js";import"./bootstrap-CMXwSSvb.js";import"./i18n-ZF6JbdVP.js";import"./isObject-DvSELytj.js";import"./i18n-C5ifExT3.js";import"./InternalUnderlinedBadgeText-B_K9YhEU.js";import"./Alert-DtvOOMUX.js";import"./bem-C27SfH6w.js";import"./browser-DiRe0qUf.js";import"./Heading-CtNjSZvy.js";const InputWrapperFc=n=>{var{class:e}=n,t=__rest(n,["class"]);return h(InputFc,Object.assign({class:clsx("kol-input-radio__input",e)},t,{type:"radio"}))},RadioFc=n=>{var e,{class:t,inputProps:i}=n,o=__rest(n,["class","inputProps"]);const l=checkHasMsg(null==i?void 0:i.msg,null==i?void 0:i.touched),a="string"==typeof(null==i?void 0:i.msg)?"error":null===(e=null==i?void 0:i.msg)||void 0===e?void 0:e._type,r={"kol-input-radio--checked":null==i?void 0:i.checked,"kol-input-radio--disabled":Boolean(null==i?void 0:i.disabled),"kol-input-radio--required":Boolean(null==i?void 0:i.required),"kol-input-radio--touched":Boolean(null==i?void 0:i.touched),[`kol-input-radio--${a||"error"}`]:Boolean(l)};return h("label",Object.assign({class:clsx("kol-input-radio",r,t)},o),h(InputWrapperFc,Object.assign({},i)))};function getRadioProps(n,e={}){const{ariaDescribedBy:t}=getRenderStates(n),i={id:n._id,hideLabel:n._hideLabel,label:n._label,value:n._value,disabled:n._disabled,name:n._name,ariaDescribedBy:t};return"_required"in n&&(i.required=n._required),"_touched"in n&&(i.touched=n._touched),"_msg"in n&&(i.msg=n._msg),Object.assign(Object.assign({},i),e)}const RadioStateWrapper=n=>{var{state:e,inputProps:t}=n,i=__rest(n,["state","inputProps"]);return h(RadioFc,Object.assign({inputProps:getRadioProps(e,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 * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\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 text color from his parent element.\n */\n color: inherit;\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: flex;\n flex-flow: column;\n align-items: center;\n justify-content: 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 align-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 .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\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 @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\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: transparent;\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 n;null===(n=this.inputRef)||void 0===n||n.focus()}getFormFieldProps(){return{state:this.state,component:"fieldset",disabled:Boolean(this.state._disabled),class:clsx("kol-form-field--radio"),formFieldLabelProps:{component:"legend",class:"kol-form-field__label--legend"},formFieldInputProps:{class:`kol-form-field__input--orientation-${this.state._orientation}`},tooltipAlign:this._tooltipAlign,alert:this.showAsAlert(),hideLabel:!1}}render(){return h(FormFieldStateWrapper,Object.assign({key:"9dc7e4569627db33b82ae9ec448e30087d87ab6f"},this.getFormFieldProps()),this.state._options.map((n,e)=>this.renderOption(n,e)))}calculateDisabled(n){return Boolean(this.state._disabled)||Boolean(n.disabled)}getOptionProps(n,e){return{state:this.state,id:e,hint:n.hint,label:n.label,required:!1,fieldControlLabelProps:{showBadge:!1},disabled:this.calculateDisabled(n)}}getInputProps(n,e,t,i){return{state:this.state,inputProps:Object.assign(Object.assign({id:e,ref:this.state._value===n.value?this.catchRef:void 0,"aria-label":this.state._hideLabel&&"string"==typeof n.label?n.label:void 0,type:"radio",name:this.state._name||this.state._id,value:`-${t}`,checked:i,disabled:this.calculateDisabled(n)},this.controller.onFacade),{onChange:this.onChange,onClick:void 0,onInput:this.onInput,onKeyDown:this.onKeyDown.bind(this),onFocus:n=>{this.controller.onFacade.onFocus(n),this.inputHasFocus=!0},onBlur:n=>{this.controller.onFacade.onBlur(n),this.inputHasFocus=!1}})}}renderOption(n,e){const t=`${this.state._id}-${e}`,i=this.state._value===n.value;return h(FieldControlStateWrapper,Object.assign({key:t},this.getOptionProps(n,t)),h(RadioStateWrapper,Object.assign({},this.getInputProps(n,t,e,i))))}constructor(n){registerInstance(this,n),this.catchRef=n=>{this.inputRef=n},this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._orientation="vertical",this._required=!1,this._tooltipAlign="top",this._touched=!1,this._value=null,this.state={_hideMsg:!1,_id:`id-${nonce()}`,_label:"",_options:[],_orientation:"vertical"},this.inputHasFocus=!1,this.onInput=n=>{if(n.target instanceof HTMLInputElement){const e=this.controller.getOptionByKey(n.target.value);void 0!==e&&this.controller.onFacade.onInput(n,!0,e.value)}},this.onChange=n=>{if(n.target instanceof HTMLInputElement){const e=this.controller.getOptionByKey(n.target.value);void 0!==e&&(this.controller.onFacade.onChange(n,e.value),this._value=e.value)}},this.onKeyDown=n=>{this.controller.onFacade.onKeyDown(n),"Enter"!==n.code&&"NumpadEnter"!==n.code||propagateSubmitEventToForm({form:this.host})},this.controller=new InputRadioController(this,"radio",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateTooltipAlign(n){this.controller.validateTooltipAlign(n)}validateDisabled(n){this.controller.validateDisabled(n)}validateHideLabel(n){this.controller.validateHideLabel(n)}validateHideMsg(n){this.controller.validateHideMsg(n)}validateHint(n){this.controller.validateHint(n)}validateId(n){this.controller.validateId(n)}validateLabel(n){this.controller.validateLabel(n)}validateMsg(n){this.controller.validateMsg(n)}validateName(n){this.controller.validateName(n)}validateOn(n){this.controller.validateOn(n)}validateOptions(n){this.controller.validateOptions(n)}validateOrientation(n){this.controller.validateOrientation(n)}validateRequired(n){this.controller.validateRequired(n)}validateSyncValueBySelector(n){this.controller.validateSyncValueBySelector(n)}validateTouched(n){this.controller.validateTouched(n)}validateValue(n){this.controller.validateValue(n)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad()}get host(){return 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};export{KolInputRadio as kol_input_radio};