@public-ui/components 3.0.2-rc.0 → 3.0.2-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (517) hide show
  1. package/custom-elements.json +106 -1
  2. package/dist/cjs/{Alert-9fdb7776.js → Alert-e828f697.js} +1 -1
  3. package/dist/cjs/Alert-e828f697.js.map +1 -0
  4. package/dist/cjs/{Collapsible-27f768b6.js → Collapsible-d152ffe9.js} +1 -1
  5. package/dist/cjs/{Collapsible-27f768b6.js.map → Collapsible-d152ffe9.js.map} +1 -1
  6. package/dist/cjs/CustomSuggestionsOptionsGroup-bccb0c85.js +4 -0
  7. package/dist/cjs/CustomSuggestionsOptionsGroup-bccb0c85.js.map +1 -0
  8. package/dist/cjs/{FieldControlStateWrapper-c24e99c5.js → FieldControlStateWrapper-e48740a1.js} +1 -1
  9. package/dist/cjs/{FieldControlStateWrapper-c24e99c5.js.map → FieldControlStateWrapper-e48740a1.js.map} +1 -1
  10. package/dist/cjs/Heading-22a4eaf4.js +4 -0
  11. package/dist/cjs/Heading-22a4eaf4.js.map +1 -0
  12. package/dist/cjs/Icon-54f6fbd9.js +4 -0
  13. package/dist/cjs/{Icon-537bb332.js.map → Icon-54f6fbd9.js.map} +1 -1
  14. package/dist/cjs/{Input-b3df5b7d.js → Input-8d9e04a9.js} +1 -1
  15. package/dist/cjs/{Input-b3df5b7d.js.map → Input-8d9e04a9.js.map} +1 -1
  16. package/dist/cjs/{InputStateWrapper-4734d8d1.js → InputStateWrapper-f59de6b8.js} +1 -1
  17. package/dist/cjs/{InputStateWrapper-4734d8d1.js.map → InputStateWrapper-f59de6b8.js.map} +1 -1
  18. package/dist/cjs/{InternalUnderlinedBadgeText-0ea7ba87.js → InternalUnderlinedBadgeText-7387a5ef.js} +1 -1
  19. package/dist/cjs/{InternalUnderlinedBadgeText-0ea7ba87.js.map → InternalUnderlinedBadgeText-7387a5ef.js.map} +1 -1
  20. package/dist/cjs/{Span-0e05b374.js → Span-8bce0670.js} +1 -1
  21. package/dist/cjs/{Span-0e05b374.js.map → Span-8bce0670.js.map} +1 -1
  22. package/dist/cjs/align-floating-elements-8ddb8593.js +4 -0
  23. package/dist/cjs/align-floating-elements-8ddb8593.js.map +1 -0
  24. package/dist/cjs/{app-globals-cd9bce81.js → app-globals-02065fac.js} +1 -1
  25. package/dist/cjs/{app-globals-cd9bce81.js.map → app-globals-02065fac.js.map} +1 -1
  26. package/dist/cjs/{associated.controller-103272e2.js → associated.controller-7b651bde.js} +1 -1
  27. package/dist/cjs/{associated.controller-103272e2.js.map → associated.controller-7b651bde.js.map} +1 -1
  28. package/dist/cjs/{bootstrap-a35cdb5f.js → bootstrap-0ea93cf5.js} +1 -1
  29. package/dist/cjs/{bootstrap-a35cdb5f.js.map → bootstrap-0ea93cf5.js.map} +1 -1
  30. package/dist/cjs/component-names-1cb5b7ce.js +4 -0
  31. package/dist/cjs/component-names-1cb5b7ce.js.map +1 -0
  32. package/dist/cjs/{controller-4a3740d3.js → controller-33d9efe1.js} +1 -1
  33. package/dist/cjs/{controller-4a3740d3.js.map → controller-33d9efe1.js.map} +1 -1
  34. package/dist/cjs/{controller-e3f2bc2d.js → controller-6a9e56c9.js} +1 -1
  35. package/dist/cjs/{controller-e3f2bc2d.js.map → controller-6a9e56c9.js.map} +1 -1
  36. package/dist/cjs/{controller-872e38fa.js → controller-6b4e91b3.js} +1 -1
  37. package/dist/cjs/{controller-872e38fa.js.map → controller-6b4e91b3.js.map} +1 -1
  38. package/dist/cjs/{controller-b85b16a2.js → controller-75a14bc0.js} +1 -1
  39. package/dist/cjs/{controller-b85b16a2.js.map → controller-75a14bc0.js.map} +1 -1
  40. package/dist/cjs/{controller-icon-01e6fff3.js → controller-icon-4e94157b.js} +1 -1
  41. package/dist/cjs/{controller-icon-01e6fff3.js.map → controller-icon-4e94157b.js.map} +1 -1
  42. package/dist/cjs/{dev.utils-c3903802.js → dev.utils-d67f4f5e.js} +1 -1
  43. package/dist/cjs/{dev.utils-c3903802.js.map → dev.utils-d67f4f5e.js.map} +1 -1
  44. package/dist/cjs/{devtools-c9352fa2.js → devtools-00b028a3.js} +1 -1
  45. package/dist/cjs/{devtools-c9352fa2.js.map → devtools-00b028a3.js.map} +1 -1
  46. package/dist/cjs/getRenderStates-7523a890.js +4 -0
  47. package/dist/cjs/getRenderStates-7523a890.js.map +1 -0
  48. package/dist/cjs/index-f23172b0.js +4 -0
  49. package/dist/cjs/{index-c0d419b5.js.map → index-f23172b0.js.map} +1 -1
  50. package/dist/cjs/index.cjs.js +1 -1
  51. package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
  52. package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
  53. package/dist/cjs/kol-alert-wc.cjs.entry.js +1 -1
  54. package/dist/cjs/kol-alert.cjs.entry.js +1 -1
  55. package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
  56. package/dist/cjs/kol-avatar.cjs.entry.js +1 -1
  57. package/dist/cjs/kol-badge.cjs.entry.js +1 -1
  58. package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
  59. package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
  60. package/dist/cjs/kol-button-wc.cjs.entry.js +1 -1
  61. package/dist/cjs/kol-button-wc.cjs.entry.js.map +1 -1
  62. package/dist/cjs/kol-button.cjs.entry.js +1 -1
  63. package/dist/cjs/kol-card-wc.cjs.entry.js +1 -1
  64. package/dist/cjs/kol-card.cjs.entry.js +1 -1
  65. package/dist/cjs/kol-combobox.cjs.entry.js +1 -1
  66. package/dist/cjs/kol-combobox.cjs.entry.js.map +1 -1
  67. package/dist/cjs/kol-details.cjs.entry.js +1 -1
  68. package/dist/cjs/kol-drawer.cjs.entry.js +1 -1
  69. package/dist/cjs/kol-form.cjs.entry.js +1 -1
  70. package/dist/cjs/kol-heading.cjs.entry.js +1 -1
  71. package/dist/cjs/kol-heading.cjs.entry.js.map +1 -1
  72. package/dist/cjs/kol-icon.cjs.entry.js +1 -1
  73. package/dist/cjs/kol-image.cjs.entry.js +1 -1
  74. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  75. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  76. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  77. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  78. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  79. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  80. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  81. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  82. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  83. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  84. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  85. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  86. package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
  87. package/dist/cjs/kol-link.cjs.entry.js +1 -1
  88. package/dist/cjs/kol-modal.cjs.entry.js +1 -1
  89. package/dist/cjs/kol-nav.cjs.entry.js +1 -1
  90. package/dist/cjs/kol-nav.cjs.entry.js.map +1 -1
  91. package/dist/cjs/kol-pagination-wc.cjs.entry.js +4 -0
  92. package/dist/cjs/kol-pagination-wc.cjs.entry.js.map +1 -0
  93. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  94. package/dist/cjs/kol-pagination.cjs.entry.js.map +1 -1
  95. package/dist/cjs/kol-popover-button-wc.cjs.entry.js +1 -1
  96. package/dist/cjs/kol-popover-button-wc.cjs.entry.js.map +1 -1
  97. package/dist/cjs/kol-popover-button.cjs.entry.js +1 -1
  98. package/dist/cjs/kol-popover-button.cjs.entry.js.map +1 -1
  99. package/dist/cjs/kol-popover-wc.cjs.entry.js +1 -1
  100. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  101. package/dist/cjs/kol-progress.cjs.entry.js.map +1 -1
  102. package/dist/cjs/kol-quote.cjs.entry.js +1 -1
  103. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  104. package/dist/cjs/kol-single-select.cjs.entry.js +1 -1
  105. package/dist/cjs/kol-single-select.cjs.entry.js.map +1 -1
  106. package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
  107. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  108. package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
  109. package/dist/cjs/kol-split-button.cjs.entry.js.map +1 -1
  110. package/dist/cjs/kol-table-settings-wc.cjs.entry.js +1 -1
  111. package/dist/cjs/kol-table-stateful.cjs.entry.js +1 -1
  112. package/dist/cjs/kol-table-stateful.cjs.entry.js.map +1 -1
  113. package/dist/cjs/kol-table-stateless-wc.cjs.entry.js +1 -1
  114. package/dist/cjs/kol-table-stateless-wc.cjs.entry.js.map +1 -1
  115. package/dist/cjs/kol-table-stateless.cjs.entry.js +1 -1
  116. package/dist/cjs/kol-table-stateless.cjs.entry.js.map +1 -1
  117. package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
  118. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  119. package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
  120. package/dist/cjs/kol-toast-container.cjs.entry.js.map +1 -1
  121. package/dist/cjs/kol-toolbar.cjs.entry.js +1 -1
  122. package/dist/cjs/kol-tooltip-wc.cjs.entry.js +1 -1
  123. package/dist/cjs/kol-tooltip-wc.cjs.entry.js.map +1 -1
  124. package/dist/cjs/kol-tree-item-wc.cjs.entry.js +1 -1
  125. package/dist/cjs/kol-tree-item.cjs.entry.js +1 -1
  126. package/dist/cjs/kol-tree-wc.cjs.entry.js +1 -1
  127. package/dist/cjs/kol-tree.cjs.entry.js +1 -1
  128. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  129. package/dist/cjs/kolibri.cjs.js +1 -1
  130. package/dist/cjs/loader.cjs.js +1 -1
  131. package/dist/cjs/test-component.cjs.entry.js +1 -1
  132. package/dist/components/Alert.js +1 -1
  133. package/dist/components/Alert.js.map +1 -1
  134. package/dist/components/CustomSuggestionsOptionsGroup.js +1 -1
  135. package/dist/components/CustomSuggestionsOptionsGroup.js.map +1 -1
  136. package/dist/components/Heading.js +1 -1
  137. package/dist/components/Heading.js.map +1 -1
  138. package/dist/components/InputStateWrapper.js +1 -1
  139. package/dist/components/align-floating-elements.js +1 -1
  140. package/dist/components/align-floating-elements.js.map +1 -1
  141. package/dist/components/component-names.js +1 -1
  142. package/dist/components/component-names.js.map +1 -1
  143. package/dist/components/getRenderStates.js +1 -1
  144. package/dist/components/getRenderStates.js.map +1 -1
  145. package/dist/components/kol-button-wc.js +1 -1
  146. package/dist/components/kol-button-wc.js.map +1 -1
  147. package/dist/components/kol-card-wc.js +1 -1
  148. package/dist/components/kol-combobox.js +1 -1
  149. package/dist/components/kol-combobox.js.map +1 -1
  150. package/dist/components/kol-heading.js +1 -1
  151. package/dist/components/kol-heading.js.map +1 -1
  152. package/dist/components/kol-nav.js +1 -1
  153. package/dist/components/kol-nav.js.map +1 -1
  154. package/dist/components/kol-pagination-wc.d.ts +11 -0
  155. package/dist/components/kol-pagination-wc.js +4 -0
  156. package/dist/components/kol-pagination-wc.js.map +1 -0
  157. package/dist/components/kol-pagination.js +1 -1
  158. package/dist/components/kol-pagination.js.map +1 -1
  159. package/dist/components/kol-popover-button-wc.js +1 -1
  160. package/dist/components/kol-popover-button-wc.js.map +1 -1
  161. package/dist/components/kol-popover-button.js +1 -1
  162. package/dist/components/kol-popover-button.js.map +1 -1
  163. package/dist/components/kol-popover-wc.js +1 -1
  164. package/dist/components/kol-progress.js +1 -1
  165. package/dist/components/kol-progress.js.map +1 -1
  166. package/dist/components/kol-quote.js +1 -1
  167. package/dist/components/kol-select.js +1 -1
  168. package/dist/components/kol-single-select.js +1 -1
  169. package/dist/components/kol-single-select.js.map +1 -1
  170. package/dist/components/kol-skip-nav.js +1 -1
  171. package/dist/components/kol-spin.js +1 -1
  172. package/dist/components/kol-split-button.js +1 -1
  173. package/dist/components/kol-split-button.js.map +1 -1
  174. package/dist/components/kol-table-settings-wc.js +1 -1
  175. package/dist/components/kol-table-stateful.js +1 -1
  176. package/dist/components/kol-table-stateful.js.map +1 -1
  177. package/dist/components/kol-table-stateless-wc.js +1 -1
  178. package/dist/components/kol-table-stateless-wc.js.map +1 -1
  179. package/dist/components/kol-table-stateless.js +1 -1
  180. package/dist/components/kol-table-stateless.js.map +1 -1
  181. package/dist/components/kol-tabs.js +1 -1
  182. package/dist/components/kol-textarea.js +1 -1
  183. package/dist/components/kol-toast-container.js +1 -1
  184. package/dist/components/kol-toast-container.js.map +1 -1
  185. package/dist/components/kol-toolbar.js +1 -1
  186. package/dist/components/kol-tooltip-wc.js +1 -1
  187. package/dist/components/kol-tooltip-wc.js.map +1 -1
  188. package/dist/components/kol-tree-item-wc.js +1 -1
  189. package/dist/components/kol-tree-item.js +1 -1
  190. package/dist/components/kol-tree-wc.js +1 -1
  191. package/dist/components/kol-tree.js +1 -1
  192. package/dist/components/kol-version.js +1 -1
  193. package/dist/esm/{Alert-4f2f7115.js → Alert-a96714a0.js} +1 -1
  194. package/dist/esm/Alert-a96714a0.js.map +1 -0
  195. package/dist/esm/{Collapsible-7cb22ab1.js → Collapsible-29bb352a.js} +1 -1
  196. package/dist/esm/{Collapsible-7cb22ab1.js.map → Collapsible-29bb352a.js.map} +1 -1
  197. package/dist/esm/CustomSuggestionsOptionsGroup-4d57f72c.js +4 -0
  198. package/dist/esm/CustomSuggestionsOptionsGroup-4d57f72c.js.map +1 -0
  199. package/dist/esm/{FieldControlStateWrapper-602a7af3.js → FieldControlStateWrapper-adc38f2f.js} +1 -1
  200. package/dist/esm/{FieldControlStateWrapper-602a7af3.js.map → FieldControlStateWrapper-adc38f2f.js.map} +1 -1
  201. package/dist/esm/Heading-4990ec84.js +4 -0
  202. package/dist/esm/Heading-4990ec84.js.map +1 -0
  203. package/dist/esm/Icon-d694fbfe.js +4 -0
  204. package/dist/esm/{Icon-a2f91629.js.map → Icon-d694fbfe.js.map} +1 -1
  205. package/dist/esm/{Input-324f4b1d.js → Input-529b3f6c.js} +1 -1
  206. package/dist/esm/{Input-324f4b1d.js.map → Input-529b3f6c.js.map} +1 -1
  207. package/dist/esm/{InputStateWrapper-e0c888e4.js → InputStateWrapper-16c56aee.js} +1 -1
  208. package/dist/esm/{InputStateWrapper-e0c888e4.js.map → InputStateWrapper-16c56aee.js.map} +1 -1
  209. package/dist/esm/{InternalUnderlinedBadgeText-2d939629.js → InternalUnderlinedBadgeText-e15d02d5.js} +1 -1
  210. package/dist/esm/{InternalUnderlinedBadgeText-2d939629.js.map → InternalUnderlinedBadgeText-e15d02d5.js.map} +1 -1
  211. package/dist/esm/{Span-78135d4f.js → Span-3cb1ff76.js} +1 -1
  212. package/dist/esm/{Span-78135d4f.js.map → Span-3cb1ff76.js.map} +1 -1
  213. package/dist/esm/align-floating-elements-9459ccc3.js +4 -0
  214. package/dist/esm/align-floating-elements-9459ccc3.js.map +1 -0
  215. package/dist/esm/{app-globals-f57fb61d.js → app-globals-42ba66a8.js} +1 -1
  216. package/dist/esm/{app-globals-f57fb61d.js.map → app-globals-42ba66a8.js.map} +1 -1
  217. package/dist/esm/{associated.controller-22684481.js → associated.controller-4237c28d.js} +1 -1
  218. package/dist/esm/{associated.controller-22684481.js.map → associated.controller-4237c28d.js.map} +1 -1
  219. package/dist/esm/{bootstrap-dcdb1765.js → bootstrap-53ed580c.js} +1 -1
  220. package/dist/esm/{bootstrap-dcdb1765.js.map → bootstrap-53ed580c.js.map} +1 -1
  221. package/dist/esm/component-names-0657b355.js +4 -0
  222. package/dist/esm/component-names-0657b355.js.map +1 -0
  223. package/dist/esm/{controller-cf01f031.js → controller-235b6c3b.js} +1 -1
  224. package/dist/esm/{controller-cf01f031.js.map → controller-235b6c3b.js.map} +1 -1
  225. package/dist/esm/{controller-75622398.js → controller-2a5d8667.js} +1 -1
  226. package/dist/esm/{controller-75622398.js.map → controller-2a5d8667.js.map} +1 -1
  227. package/dist/esm/{controller-2152c5b3.js → controller-6253c3cd.js} +1 -1
  228. package/dist/esm/{controller-2152c5b3.js.map → controller-6253c3cd.js.map} +1 -1
  229. package/dist/esm/{controller-c6883e74.js → controller-a10288c6.js} +1 -1
  230. package/dist/esm/{controller-c6883e74.js.map → controller-a10288c6.js.map} +1 -1
  231. package/dist/esm/{controller-icon-6d59bc84.js → controller-icon-8f0ee809.js} +1 -1
  232. package/dist/esm/{controller-icon-6d59bc84.js.map → controller-icon-8f0ee809.js.map} +1 -1
  233. package/dist/esm/{dev.utils-ca3cce4b.js → dev.utils-98923b37.js} +1 -1
  234. package/dist/esm/{dev.utils-ca3cce4b.js.map → dev.utils-98923b37.js.map} +1 -1
  235. package/dist/esm/{devtools-fa819249.js → devtools-2b1bb963.js} +1 -1
  236. package/dist/esm/{devtools-fa819249.js.map → devtools-2b1bb963.js.map} +1 -1
  237. package/dist/esm/getRenderStates-6c8f7e98.js +4 -0
  238. package/dist/esm/getRenderStates-6c8f7e98.js.map +1 -0
  239. package/dist/esm/index-d47f6be5.js +4 -0
  240. package/dist/esm/{index-2f6c3929.js.map → index-d47f6be5.js.map} +1 -1
  241. package/dist/esm/index.js +1 -1
  242. package/dist/esm/kol-abbr.entry.js +1 -1
  243. package/dist/esm/kol-accordion.entry.js +1 -1
  244. package/dist/esm/kol-alert-wc.entry.js +1 -1
  245. package/dist/esm/kol-alert.entry.js +1 -1
  246. package/dist/esm/kol-avatar-wc.entry.js +1 -1
  247. package/dist/esm/kol-avatar.entry.js +1 -1
  248. package/dist/esm/kol-badge.entry.js +1 -1
  249. package/dist/esm/kol-breadcrumb.entry.js +1 -1
  250. package/dist/esm/kol-button-link.entry.js +1 -1
  251. package/dist/esm/kol-button-wc.entry.js +1 -1
  252. package/dist/esm/kol-button-wc.entry.js.map +1 -1
  253. package/dist/esm/kol-button.entry.js +1 -1
  254. package/dist/esm/kol-card-wc.entry.js +1 -1
  255. package/dist/esm/kol-card.entry.js +1 -1
  256. package/dist/esm/kol-combobox.entry.js +1 -1
  257. package/dist/esm/kol-combobox.entry.js.map +1 -1
  258. package/dist/esm/kol-details.entry.js +1 -1
  259. package/dist/esm/kol-drawer.entry.js +1 -1
  260. package/dist/esm/kol-form.entry.js +1 -1
  261. package/dist/esm/kol-heading.entry.js +1 -1
  262. package/dist/esm/kol-heading.entry.js.map +1 -1
  263. package/dist/esm/kol-icon.entry.js +1 -1
  264. package/dist/esm/kol-image.entry.js +1 -1
  265. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  266. package/dist/esm/kol-input-color.entry.js +1 -1
  267. package/dist/esm/kol-input-date.entry.js +1 -1
  268. package/dist/esm/kol-input-email.entry.js +1 -1
  269. package/dist/esm/kol-input-file.entry.js +1 -1
  270. package/dist/esm/kol-input-number.entry.js +1 -1
  271. package/dist/esm/kol-input-password.entry.js +1 -1
  272. package/dist/esm/kol-input-radio.entry.js +1 -1
  273. package/dist/esm/kol-input-range.entry.js +1 -1
  274. package/dist/esm/kol-input-text.entry.js +1 -1
  275. package/dist/esm/kol-kolibri.entry.js +1 -1
  276. package/dist/esm/kol-link-button.entry.js +1 -1
  277. package/dist/esm/kol-link-wc.entry.js +1 -1
  278. package/dist/esm/kol-link.entry.js +1 -1
  279. package/dist/esm/kol-modal.entry.js +1 -1
  280. package/dist/esm/kol-nav.entry.js +1 -1
  281. package/dist/esm/kol-nav.entry.js.map +1 -1
  282. package/dist/esm/kol-pagination-wc.entry.js +4 -0
  283. package/dist/esm/kol-pagination-wc.entry.js.map +1 -0
  284. package/dist/esm/kol-pagination.entry.js +1 -1
  285. package/dist/esm/kol-pagination.entry.js.map +1 -1
  286. package/dist/esm/kol-popover-button-wc.entry.js +1 -1
  287. package/dist/esm/kol-popover-button-wc.entry.js.map +1 -1
  288. package/dist/esm/kol-popover-button.entry.js +1 -1
  289. package/dist/esm/kol-popover-button.entry.js.map +1 -1
  290. package/dist/esm/kol-popover-wc.entry.js +1 -1
  291. package/dist/esm/kol-progress.entry.js +1 -1
  292. package/dist/esm/kol-progress.entry.js.map +1 -1
  293. package/dist/esm/kol-quote.entry.js +1 -1
  294. package/dist/esm/kol-select.entry.js +1 -1
  295. package/dist/esm/kol-single-select.entry.js +1 -1
  296. package/dist/esm/kol-single-select.entry.js.map +1 -1
  297. package/dist/esm/kol-skip-nav.entry.js +1 -1
  298. package/dist/esm/kol-spin.entry.js +1 -1
  299. package/dist/esm/kol-split-button.entry.js +1 -1
  300. package/dist/esm/kol-split-button.entry.js.map +1 -1
  301. package/dist/esm/kol-table-settings-wc.entry.js +1 -1
  302. package/dist/esm/kol-table-stateful.entry.js +1 -1
  303. package/dist/esm/kol-table-stateful.entry.js.map +1 -1
  304. package/dist/esm/kol-table-stateless-wc.entry.js +1 -1
  305. package/dist/esm/kol-table-stateless-wc.entry.js.map +1 -1
  306. package/dist/esm/kol-table-stateless.entry.js +1 -1
  307. package/dist/esm/kol-table-stateless.entry.js.map +1 -1
  308. package/dist/esm/kol-tabs.entry.js +1 -1
  309. package/dist/esm/kol-textarea.entry.js +1 -1
  310. package/dist/esm/kol-toast-container.entry.js +1 -1
  311. package/dist/esm/kol-toast-container.entry.js.map +1 -1
  312. package/dist/esm/kol-toolbar.entry.js +1 -1
  313. package/dist/esm/kol-tooltip-wc.entry.js +1 -1
  314. package/dist/esm/kol-tooltip-wc.entry.js.map +1 -1
  315. package/dist/esm/kol-tree-item-wc.entry.js +1 -1
  316. package/dist/esm/kol-tree-item.entry.js +1 -1
  317. package/dist/esm/kol-tree-wc.entry.js +1 -1
  318. package/dist/esm/kol-tree.entry.js +1 -1
  319. package/dist/esm/kol-version.entry.js +1 -1
  320. package/dist/esm/kolibri.js +1 -1
  321. package/dist/esm/loader.js +1 -1
  322. package/dist/esm/test-component.entry.js +1 -1
  323. package/dist/kolibri/Alert-a96714a0.js +4 -0
  324. package/dist/kolibri/{Alert-4f2f7115.js.map → Alert-a96714a0.js.map} +1 -1
  325. package/dist/kolibri/{Collapsible-7cb22ab1.js → Collapsible-29bb352a.js} +1 -1
  326. package/dist/kolibri/CustomSuggestionsOptionsGroup-4d57f72c.js +4 -0
  327. package/dist/kolibri/CustomSuggestionsOptionsGroup-4d57f72c.js.map +1 -0
  328. package/dist/kolibri/{FieldControlStateWrapper-602a7af3.js → FieldControlStateWrapper-adc38f2f.js} +1 -1
  329. package/dist/kolibri/Heading-4990ec84.js +4 -0
  330. package/dist/kolibri/Heading-4990ec84.js.map +1 -0
  331. package/dist/kolibri/Icon-d694fbfe.js +4 -0
  332. package/dist/kolibri/Input-529b3f6c.js +4 -0
  333. package/dist/kolibri/{InputStateWrapper-e0c888e4.js → InputStateWrapper-16c56aee.js} +1 -1
  334. package/dist/kolibri/InternalUnderlinedBadgeText-e15d02d5.js +4 -0
  335. package/dist/kolibri/Span-3cb1ff76.js +4 -0
  336. package/dist/kolibri/align-floating-elements-9459ccc3.js +4 -0
  337. package/dist/kolibri/align-floating-elements-9459ccc3.js.map +1 -0
  338. package/dist/kolibri/app-globals-42ba66a8.js +4 -0
  339. package/dist/kolibri/{app-globals-f57fb61d.js.map → app-globals-42ba66a8.js.map} +1 -1
  340. package/dist/kolibri/{associated.controller-22684481.js → associated.controller-4237c28d.js} +1 -1
  341. package/dist/kolibri/{bootstrap-dcdb1765.js → bootstrap-53ed580c.js} +1 -1
  342. package/dist/kolibri/component-names-0657b355.js +4 -0
  343. package/dist/kolibri/component-names-0657b355.js.map +1 -0
  344. package/dist/kolibri/{controller-cf01f031.js → controller-235b6c3b.js} +1 -1
  345. package/dist/kolibri/{controller-75622398.js → controller-2a5d8667.js} +1 -1
  346. package/dist/kolibri/{controller-2152c5b3.js → controller-6253c3cd.js} +1 -1
  347. package/dist/kolibri/{controller-c6883e74.js → controller-a10288c6.js} +1 -1
  348. package/dist/kolibri/{controller-icon-6d59bc84.js → controller-icon-8f0ee809.js} +1 -1
  349. package/dist/kolibri/{dev.utils-ca3cce4b.js → dev.utils-98923b37.js} +1 -1
  350. package/dist/kolibri/{devtools-fa819249.js → devtools-2b1bb963.js} +1 -1
  351. package/dist/kolibri/getRenderStates-6c8f7e98.js +4 -0
  352. package/dist/kolibri/getRenderStates-6c8f7e98.js.map +1 -0
  353. package/dist/kolibri/{index-2f6c3929.js → index-d47f6be5.js} +1 -1
  354. package/dist/kolibri/{index-2f6c3929.js.map → index-d47f6be5.js.map} +1 -1
  355. package/dist/kolibri/index.esm.js +1 -1
  356. package/dist/kolibri/kol-abbr.entry.js +1 -1
  357. package/dist/kolibri/kol-accordion.entry.js +1 -1
  358. package/dist/kolibri/kol-alert-wc.entry.js +1 -1
  359. package/dist/kolibri/kol-alert.entry.js +1 -1
  360. package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
  361. package/dist/kolibri/kol-avatar.entry.js +1 -1
  362. package/dist/kolibri/kol-badge.entry.js +1 -1
  363. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  364. package/dist/kolibri/kol-button-link.entry.js +1 -1
  365. package/dist/kolibri/kol-button-wc.entry.js +1 -1
  366. package/dist/kolibri/kol-button-wc.entry.js.map +1 -1
  367. package/dist/kolibri/kol-button.entry.js +1 -1
  368. package/dist/kolibri/kol-card-wc.entry.js +1 -1
  369. package/dist/kolibri/kol-card-wc.entry.js.map +1 -1
  370. package/dist/kolibri/kol-card.entry.js +1 -1
  371. package/dist/kolibri/kol-combobox.entry.js +1 -1
  372. package/dist/kolibri/kol-combobox.entry.js.map +1 -1
  373. package/dist/kolibri/kol-details.entry.js +1 -1
  374. package/dist/kolibri/kol-drawer.entry.js +1 -1
  375. package/dist/kolibri/kol-form.entry.js +1 -1
  376. package/dist/kolibri/kol-heading.entry.js +1 -1
  377. package/dist/kolibri/kol-heading.entry.js.map +1 -1
  378. package/dist/kolibri/kol-icon.entry.js +1 -1
  379. package/dist/kolibri/kol-image.entry.js +1 -1
  380. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  381. package/dist/kolibri/kol-input-color.entry.js +1 -1
  382. package/dist/kolibri/kol-input-date.entry.js +1 -1
  383. package/dist/kolibri/kol-input-email.entry.js +1 -1
  384. package/dist/kolibri/kol-input-file.entry.js +1 -1
  385. package/dist/kolibri/kol-input-number.entry.js +1 -1
  386. package/dist/kolibri/kol-input-password.entry.js +1 -1
  387. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  388. package/dist/kolibri/kol-input-range.entry.js +1 -1
  389. package/dist/kolibri/kol-input-text.entry.js +1 -1
  390. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  391. package/dist/kolibri/kol-link-button.entry.js +1 -1
  392. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  393. package/dist/kolibri/kol-link.entry.js +1 -1
  394. package/dist/kolibri/kol-modal.entry.js +1 -1
  395. package/dist/kolibri/kol-nav.entry.js +1 -1
  396. package/dist/kolibri/kol-nav.entry.js.map +1 -1
  397. package/dist/kolibri/kol-pagination-wc.entry.js +4 -0
  398. package/dist/kolibri/kol-pagination-wc.entry.js.map +1 -0
  399. package/dist/kolibri/kol-pagination.entry.js +1 -1
  400. package/dist/kolibri/kol-pagination.entry.js.map +1 -1
  401. package/dist/kolibri/kol-popover-button-wc.entry.js +1 -1
  402. package/dist/kolibri/kol-popover-button-wc.entry.js.map +1 -1
  403. package/dist/kolibri/kol-popover-button.entry.js +1 -1
  404. package/dist/kolibri/kol-popover-button.entry.js.map +1 -1
  405. package/dist/kolibri/kol-popover-wc.entry.js +1 -1
  406. package/dist/kolibri/kol-progress.entry.js +1 -1
  407. package/dist/kolibri/kol-progress.entry.js.map +1 -1
  408. package/dist/kolibri/kol-quote.entry.js +1 -1
  409. package/dist/kolibri/kol-select.entry.js +1 -1
  410. package/dist/kolibri/kol-single-select.entry.js +1 -1
  411. package/dist/kolibri/kol-single-select.entry.js.map +1 -1
  412. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  413. package/dist/kolibri/kol-spin.entry.js +1 -1
  414. package/dist/kolibri/kol-split-button.entry.js +1 -1
  415. package/dist/kolibri/kol-split-button.entry.js.map +1 -1
  416. package/dist/kolibri/kol-table-settings-wc.entry.js +1 -1
  417. package/dist/kolibri/kol-table-stateful.entry.js +1 -1
  418. package/dist/kolibri/kol-table-stateful.entry.js.map +1 -1
  419. package/dist/kolibri/kol-table-stateless-wc.entry.js +1 -1
  420. package/dist/kolibri/kol-table-stateless-wc.entry.js.map +1 -1
  421. package/dist/kolibri/kol-table-stateless.entry.js +1 -1
  422. package/dist/kolibri/kol-table-stateless.entry.js.map +1 -1
  423. package/dist/kolibri/kol-tabs.entry.js +1 -1
  424. package/dist/kolibri/kol-textarea.entry.js +1 -1
  425. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  426. package/dist/kolibri/kol-toast-container.entry.js.map +1 -1
  427. package/dist/kolibri/kol-toolbar.entry.js +1 -1
  428. package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
  429. package/dist/kolibri/kol-tooltip-wc.entry.js.map +1 -1
  430. package/dist/kolibri/kol-tree-item-wc.entry.js +1 -1
  431. package/dist/kolibri/kol-tree-item.entry.js +1 -1
  432. package/dist/kolibri/kol-tree-wc.entry.js +1 -1
  433. package/dist/kolibri/kol-tree.entry.js +1 -1
  434. package/dist/kolibri/kol-version.entry.js +1 -1
  435. package/dist/kolibri/kolibri.esm.js +1 -1
  436. package/dist/kolibri/kolibri.esm.js.map +1 -1
  437. package/dist/kolibri/test-component.entry.js +1 -1
  438. package/dist/types/components/button/component.d.ts +2 -1
  439. package/dist/types/components/pagination/component.d.ts +46 -0
  440. package/dist/types/components/pagination/shadow.d.ts +2 -32
  441. package/dist/types/components/split-button/shadow.d.ts +11 -4
  442. package/dist/types/components/table-stateless/component.d.ts +1 -1
  443. package/dist/types/components/tooltip/component.d.ts +5 -5
  444. package/dist/types/components.d.ts +135 -6
  445. package/dist/types/core/component-names.d.ts +1 -0
  446. package/dist/types/e2e/input-msg.d.ts +5 -0
  447. package/dist/types/functional-components/CustomSuggestionsOption/CustomSuggestionsOption.d.ts +1 -0
  448. package/dist/types/functional-components/Heading/Heading.d.ts +0 -2
  449. package/dist/types/schema/components/toaster.d.ts +1 -0
  450. package/dist/types/schema/props/msg.d.ts +2 -2
  451. package/dist/types/schema/types/aria.d.ts +4 -0
  452. package/dist/types/schema/types/index.d.ts +1 -1
  453. package/doc/pagination.md +1 -1
  454. package/doc/split-button.md +41 -18
  455. package/doc/toaster.md +3 -3
  456. package/package.json +5 -1
  457. package/postinstall.js +38 -0
  458. package/vscode-custom-data.json +75 -0
  459. package/dist/cjs/Alert-9fdb7776.js.map +0 -1
  460. package/dist/cjs/CustomSuggestionsOptionsGroup-5aa8cb59.js +0 -4
  461. package/dist/cjs/CustomSuggestionsOptionsGroup-5aa8cb59.js.map +0 -1
  462. package/dist/cjs/Heading-37af6473.js +0 -4
  463. package/dist/cjs/Heading-37af6473.js.map +0 -1
  464. package/dist/cjs/Icon-537bb332.js +0 -4
  465. package/dist/cjs/align-floating-elements-7e50809a.js +0 -4
  466. package/dist/cjs/align-floating-elements-7e50809a.js.map +0 -1
  467. package/dist/cjs/component-names-f5f2ca3a.js +0 -4
  468. package/dist/cjs/component-names-f5f2ca3a.js.map +0 -1
  469. package/dist/cjs/getRenderStates-0f8144fb.js +0 -4
  470. package/dist/cjs/getRenderStates-0f8144fb.js.map +0 -1
  471. package/dist/cjs/index-c0d419b5.js +0 -4
  472. package/dist/esm/Alert-4f2f7115.js.map +0 -1
  473. package/dist/esm/CustomSuggestionsOptionsGroup-06278bda.js +0 -4
  474. package/dist/esm/CustomSuggestionsOptionsGroup-06278bda.js.map +0 -1
  475. package/dist/esm/Heading-7b90eeb4.js +0 -4
  476. package/dist/esm/Heading-7b90eeb4.js.map +0 -1
  477. package/dist/esm/Icon-a2f91629.js +0 -4
  478. package/dist/esm/align-floating-elements-526ce555.js +0 -4
  479. package/dist/esm/align-floating-elements-526ce555.js.map +0 -1
  480. package/dist/esm/component-names-553d8bfa.js +0 -4
  481. package/dist/esm/component-names-553d8bfa.js.map +0 -1
  482. package/dist/esm/getRenderStates-1a7401a2.js +0 -4
  483. package/dist/esm/getRenderStates-1a7401a2.js.map +0 -1
  484. package/dist/esm/index-2f6c3929.js +0 -4
  485. package/dist/kolibri/Alert-4f2f7115.js +0 -4
  486. package/dist/kolibri/CustomSuggestionsOptionsGroup-06278bda.js +0 -4
  487. package/dist/kolibri/CustomSuggestionsOptionsGroup-06278bda.js.map +0 -1
  488. package/dist/kolibri/Heading-7b90eeb4.js +0 -4
  489. package/dist/kolibri/Heading-7b90eeb4.js.map +0 -1
  490. package/dist/kolibri/Icon-a2f91629.js +0 -4
  491. package/dist/kolibri/Input-324f4b1d.js +0 -4
  492. package/dist/kolibri/InternalUnderlinedBadgeText-2d939629.js +0 -4
  493. package/dist/kolibri/Span-78135d4f.js +0 -4
  494. package/dist/kolibri/align-floating-elements-526ce555.js +0 -4
  495. package/dist/kolibri/align-floating-elements-526ce555.js.map +0 -1
  496. package/dist/kolibri/app-globals-f57fb61d.js +0 -4
  497. package/dist/kolibri/component-names-553d8bfa.js +0 -4
  498. package/dist/kolibri/component-names-553d8bfa.js.map +0 -1
  499. package/dist/kolibri/getRenderStates-1a7401a2.js +0 -4
  500. package/dist/kolibri/getRenderStates-1a7401a2.js.map +0 -1
  501. package/dist/types/components/input/controller.d.ts +0 -11
  502. /package/dist/kolibri/{Collapsible-7cb22ab1.js.map → Collapsible-29bb352a.js.map} +0 -0
  503. /package/dist/kolibri/{FieldControlStateWrapper-602a7af3.js.map → FieldControlStateWrapper-adc38f2f.js.map} +0 -0
  504. /package/dist/kolibri/{Icon-a2f91629.js.map → Icon-d694fbfe.js.map} +0 -0
  505. /package/dist/kolibri/{Input-324f4b1d.js.map → Input-529b3f6c.js.map} +0 -0
  506. /package/dist/kolibri/{InputStateWrapper-e0c888e4.js.map → InputStateWrapper-16c56aee.js.map} +0 -0
  507. /package/dist/kolibri/{InternalUnderlinedBadgeText-2d939629.js.map → InternalUnderlinedBadgeText-e15d02d5.js.map} +0 -0
  508. /package/dist/kolibri/{Span-78135d4f.js.map → Span-3cb1ff76.js.map} +0 -0
  509. /package/dist/kolibri/{associated.controller-22684481.js.map → associated.controller-4237c28d.js.map} +0 -0
  510. /package/dist/kolibri/{bootstrap-dcdb1765.js.map → bootstrap-53ed580c.js.map} +0 -0
  511. /package/dist/kolibri/{controller-cf01f031.js.map → controller-235b6c3b.js.map} +0 -0
  512. /package/dist/kolibri/{controller-75622398.js.map → controller-2a5d8667.js.map} +0 -0
  513. /package/dist/kolibri/{controller-2152c5b3.js.map → controller-6253c3cd.js.map} +0 -0
  514. /package/dist/kolibri/{controller-c6883e74.js.map → controller-a10288c6.js.map} +0 -0
  515. /package/dist/kolibri/{controller-icon-6d59bc84.js.map → controller-icon-8f0ee809.js.map} +0 -0
  516. /package/dist/kolibri/{dev.utils-ca3cce4b.js.map → dev.utils-98923b37.js.map} +0 -0
  517. /package/dist/kolibri/{devtools-fa819249.js.map → devtools-2b1bb963.js.map} +0 -0
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{h as n,r as e,g as t}from"./index-2f6c3929.js";import{c as i}from"./clsx-09a06a12.js";import{i as a,l as o}from"./index-ebe5a881.js";import{n as l}from"./dev.utils-ca3cce4b.js";import{p as s}from"./controller-cf01f031.js";import{F as r}from"./getRenderStates-1a7401a2.js";import{I as d}from"./InputStateWrapper-e0c888e4.js";import{a as h}from"./controller-icon-6d59bc84.js";import{I as c}from"./controller-75622398.js";import"./component-names-553d8bfa.js";import"./events-bad0a075.js";import"./associated.controller-22684481.js";import"./bootstrap-dcdb1765.js";import"./i18n-45224cc3.js";import"./access-and-short-key-f743a5c4.js";import"./tooltip-align-465a8590.js";import"./align-d2572387.js";import"./hide-label-8b3a8709.js";import"./label-bf9966d0.js";import"./tslib.es6-1173d062.js";import"./Alert-4f2f7115.js";import"./i18n-260f0fe9.js";import"./bem-e4c3a2e6.js";import"./browser-f629a56a.js";import"./Heading-7b90eeb4.js";import"./InternalUnderlinedBadgeText-2d939629.js";import"./isArray-7a60fa7f.js";import"./Input-324f4b1d.js";import"./Icon-a2f91629.js";import"./isObject-ffcbbb76.js";import"./icons-a9c52ed8.js";import"./controller-2152c5b3.js";import"./has-counter-3fc44829.js";import"./spell-check-5559a801.js";import"./suggestions-198125b7.js";const p=(t,e)=>{a(t,"_multiple",e)};class m extends c{constructor(t,e,n){super(t,e,n),this.component=t}validateMultiple(t){p(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateMultiple(this.component._multiple)}}const u="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\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 * 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 * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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 border: none;\n margin: 0;\n padding: 0;\n width: 100%;\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 background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n font-size: rem(16);\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 }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\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 animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip__content {\n background-color: #fff;\n color: #000;\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\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 place-items: center;\n display: flex;\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(1rem / var(--kolibri-root-font-size, 16));\n }\n}\n@layer kol-component {\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}\n@layer kol-component {\n .kol-input-container {\n align-items: center;\n background-color: white;\n display: grid;\n grid-template-columns: 1fr;\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n width: 100%;\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}\n@layer kol-component {\n .kol-input {\n min-width: var(--a11y-min-size);\n width: 100%;\n }\n .kol-input:focus {\n outline: none;\n }\n}",f=u,b=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:i("kol-input-email","email",{"has-value":this.state._hasValue}),tooltipAlign:this._tooltipAlign,onClick:()=>{var t;return null===(t=this.inputRef)||void 0===t?void 0:t.focus()},alert:this.showAsAlert()}}getInputProps(){return Object.assign(Object.assign({ref:this.catchRef,state:this.state,type:"email"},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 n(r,Object.assign({key:"62d2b1a21c177e4291a1e3dd085cc62dacfedc89"},this.getFormFieldProps()),n(h,{key:"b3173f28bda0736c7a836bc69d0d49c5719d839c",state:this.state},n(d,Object.assign({key:"a1b8c5004238ef40999f17c4326daf1600a9c2eb"},this.getInputProps()))))}constructor(t){e(this,t),this.catchRef=t=>{this.inputRef=t},this.onKeyDown=t=>{"Enter"!==t.code&&"NumpadEnter"!==t.code||s({form:this.host,ref:this.inputRef})},this.onInput=t=>{const e=t.target.value;o(this,"_currentLength",e.length),this._value=e,this.controller.onFacade.onInput(t)},this._accessKey=void 0,this._autoComplete=void 0,this._disabled=!1,this._hasCounter=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._maxLength=void 0,this._msg=void 0,this._multiple=!1,this._name=void 0,this._on=void 0,this._pattern=void 0,this._placeholder=void 0,this._readOnly=!1,this._required=!1,this._shortKey=void 0,this._smartButton=void 0,this._suggestions=void 0,this._syncValueBySelector=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_autoComplete:"off",_currentLength:0,_hasValue:!1,_hideMsg:!1,_id:`id-${l()}`,_label:"",_suggestions:[]},this.inputHasFocus=!1,this.controller=new m(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)}validateHasCounter(t){this.controller.validateHasCounter(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)}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)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener((t=>this.state._hasValue=!!t))}static get delegatesFocus(){return!0}get host(){return t(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_hasCounter:["validateHasCounter"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_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"]}}};b.style={default:f};export{b as kol_input_email};
4
+ import{h as n,r as e,g as t}from"./index-d47f6be5.js";import{c as i}from"./clsx-09a06a12.js";import{i as a,l as o}from"./index-ebe5a881.js";import{n as l}from"./dev.utils-98923b37.js";import{p as s}from"./controller-235b6c3b.js";import{F as r}from"./getRenderStates-6c8f7e98.js";import{I as d}from"./InputStateWrapper-16c56aee.js";import{a as h}from"./controller-icon-8f0ee809.js";import{I as c}from"./controller-2a5d8667.js";import"./component-names-0657b355.js";import"./events-bad0a075.js";import"./associated.controller-4237c28d.js";import"./bootstrap-53ed580c.js";import"./i18n-45224cc3.js";import"./access-and-short-key-f743a5c4.js";import"./tooltip-align-465a8590.js";import"./align-d2572387.js";import"./hide-label-8b3a8709.js";import"./label-bf9966d0.js";import"./tslib.es6-1173d062.js";import"./Alert-a96714a0.js";import"./i18n-260f0fe9.js";import"./bem-e4c3a2e6.js";import"./browser-f629a56a.js";import"./Heading-4990ec84.js";import"./InternalUnderlinedBadgeText-e15d02d5.js";import"./isArray-7a60fa7f.js";import"./Input-529b3f6c.js";import"./Icon-d694fbfe.js";import"./isObject-ffcbbb76.js";import"./icons-a9c52ed8.js";import"./controller-6253c3cd.js";import"./has-counter-3fc44829.js";import"./spell-check-5559a801.js";import"./suggestions-198125b7.js";const p=(t,e)=>{a(t,"_multiple",e)};class m extends c{constructor(t,e,n){super(t,e,n),this.component=t}validateMultiple(t){p(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateMultiple(this.component._multiple)}}const u="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\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 * 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 * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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 border: none;\n margin: 0;\n padding: 0;\n width: 100%;\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 background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n font-size: rem(16);\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 }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\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 animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip__content {\n background-color: #fff;\n color: #000;\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\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 place-items: center;\n display: flex;\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(1rem / var(--kolibri-root-font-size, 16));\n }\n}\n@layer kol-component {\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}\n@layer kol-component {\n .kol-input-container {\n align-items: center;\n background-color: white;\n display: grid;\n grid-template-columns: 1fr;\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n width: 100%;\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}\n@layer kol-component {\n .kol-input {\n min-width: var(--a11y-min-size);\n width: 100%;\n }\n .kol-input:focus {\n outline: none;\n }\n}",f=u,b=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:i("kol-input-email","email",{"has-value":this.state._hasValue}),tooltipAlign:this._tooltipAlign,onClick:()=>{var t;return null===(t=this.inputRef)||void 0===t?void 0:t.focus()},alert:this.showAsAlert()}}getInputProps(){return Object.assign(Object.assign({ref:this.catchRef,state:this.state,type:"email"},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 n(r,Object.assign({key:"62d2b1a21c177e4291a1e3dd085cc62dacfedc89"},this.getFormFieldProps()),n(h,{key:"b3173f28bda0736c7a836bc69d0d49c5719d839c",state:this.state},n(d,Object.assign({key:"a1b8c5004238ef40999f17c4326daf1600a9c2eb"},this.getInputProps()))))}constructor(t){e(this,t),this.catchRef=t=>{this.inputRef=t},this.onKeyDown=t=>{"Enter"!==t.code&&"NumpadEnter"!==t.code||s({form:this.host,ref:this.inputRef})},this.onInput=t=>{const e=t.target.value;o(this,"_currentLength",e.length),this._value=e,this.controller.onFacade.onInput(t)},this._accessKey=void 0,this._autoComplete=void 0,this._disabled=!1,this._hasCounter=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._maxLength=void 0,this._msg=void 0,this._multiple=!1,this._name=void 0,this._on=void 0,this._pattern=void 0,this._placeholder=void 0,this._readOnly=!1,this._required=!1,this._shortKey=void 0,this._smartButton=void 0,this._suggestions=void 0,this._syncValueBySelector=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_autoComplete:"off",_currentLength:0,_hasValue:!1,_hideMsg:!1,_id:`id-${l()}`,_label:"",_suggestions:[]},this.inputHasFocus=!1,this.controller=new m(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)}validateHasCounter(t){this.controller.validateHasCounter(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)}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)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener((t=>this.state._hasValue=!!t))}static get delegatesFocus(){return!0}get host(){return t(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_hasCounter:["validateHasCounter"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_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"]}}};b.style={default:f};export{b as kol_input_email};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{h as n,r as t,g as e}from"./index-2f6c3929.js";import{c as i}from"./clsx-09a06a12.js";import{n as o}from"./dev.utils-ca3cce4b.js";import{F as a}from"./getRenderStates-1a7401a2.js";import{I as l}from"./InputStateWrapper-e0c888e4.js";import{I as s,a as r}from"./controller-icon-6d59bc84.js";import{B as d,i as c}from"./index-ebe5a881.js";import{t as h}from"./i18n-260f0fe9.js";import{b as p}from"./component-names-553d8bfa.js";import"./events-bad0a075.js";import"./associated.controller-22684481.js";import"./bootstrap-dcdb1765.js";import"./i18n-45224cc3.js";import"./access-and-short-key-f743a5c4.js";import"./tooltip-align-465a8590.js";import"./align-d2572387.js";import"./hide-label-8b3a8709.js";import"./label-bf9966d0.js";import"./tslib.es6-1173d062.js";import"./Alert-4f2f7115.js";import"./bem-e4c3a2e6.js";import"./browser-f629a56a.js";import"./Heading-7b90eeb4.js";import"./InternalUnderlinedBadgeText-2d939629.js";import"./isArray-7a60fa7f.js";import"./Input-324f4b1d.js";import"./Icon-a2f91629.js";import"./isObject-ffcbbb76.js";import"./icons-a9c52ed8.js";class u extends s{constructor(n,e,t){super(n,e,t),this.component=n}validateAccept(n){d(this.component,"_accept",n)}validateMultiple(n){c(this.component,"_multiple",n)}validateRequired(n){c(this.component,"_required",n)}componentWillLoad(){super.componentWillLoad(),this.validateAccept(this.component._accept),this.validateMultiple(this.component._multiple),this.validateRequired(this.component._required)}}const f="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\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 * 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 * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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 border: none;\n margin: 0;\n padding: 0;\n width: 100%;\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 background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n font-size: rem(16);\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 }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\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 animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip__content {\n background-color: #fff;\n color: #000;\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\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 place-items: center;\n display: flex;\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(1rem / var(--kolibri-root-font-size, 16));\n }\n}\n@layer kol-component {\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}\n@layer kol-component {\n .kol-input-container {\n align-items: center;\n background-color: white;\n display: grid;\n grid-template-columns: 1fr;\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n width: 100%;\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}\n@layer kol-component {\n .kol-input {\n min-width: var(--a11y-min-size);\n width: 100%;\n }\n .kol-input:focus {\n outline: none;\n }\n}\n@layer kol-component {\n .kol-input {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 10) 0.5em;\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n opacity: 0;\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 align-items: center;\n overflow: hidden;\n height: var(--a11y-min-size);\n }\n .kol-input-container__filename {\n flex-grow: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n margin-left: calc(4rem / var(--kolibri-root-font-size, 16));\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}",m=f,b=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()}getFormFieldProps(){return{state:this.state,class:i("kol-input-file","file"),tooltipAlign:this._tooltipAlign,onClick:()=>{var n;return null===(n=this.inputRef)||void 0===n?void 0:n.focus()},alert:this.showAsAlert()}}getInputProps(){return Object.assign(Object.assign({ref:this.catchRef,state:this.state,type:"file",accept:this.state._accept,multiple:this.state._multiple},this.controller.onFacade),{onChange:this.onChange,onInput:this.onInput,onFocus:n=>{this.controller.onFacade.onFocus(n),this.inputHasFocus=!0},onBlur:n=>{this.controller.onFacade.onBlur(n),this.inputHasFocus=!1}})}render(){return n(a,Object.assign({key:"571eeade5da1a2c7c33c6e9536fff73ab6b7c856"},this.getFormFieldProps()),n(r,{key:"a05eadc8193d5952f60e240baeed36b6d3880c2b",state:this.state},n("span",{key:"6b8aed4223e78be6f2f1cd2d063ea3fdcf1a06b4",class:i("kol-input-container__filename",{"kol-input-container__filename--has-file":this.hasFileSelected})},this.filename),n(l,Object.assign({key:"c70e67ec14e42414e5878ba02db8223807f6821e"},this.getInputProps())),n(p,{key:"54a7770ad286224155c4b5990239e195254d1e0c",class:"kol-input-container__button",_label:h("kol-data-browse-text"),_buttonVariant:"primary",_disabled:this._disabled})))}constructor(n){t(this,n),this.catchRef=n=>{this.inputRef=n},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(", "):h("kol-filename-text"),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._accept=void 0,this._accessKey=void 0,this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._msg=void 0,this._multiple=!1,this._name=void 0,this._on=void 0,this._required=!1,this._shortKey=void 0,this._smartButton=void 0,this._syncValueBySelector=void 0,this._tooltipAlign="top",this._touched=!1,this.filename=h("kol-filename-text"),this.hasFileSelected=!1,this.state={_hideMsg:!1,_id:`id-${o()}`,_label:""},this.inputHasFocus=!1,this.controller=new u(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)}static get delegatesFocus(){return!0}get host(){return e(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"]}}};b.style={default:m};export{b as kol_input_file};
4
+ import{h as n,r as t,g as e}from"./index-d47f6be5.js";import{c as i}from"./clsx-09a06a12.js";import{n as o}from"./dev.utils-98923b37.js";import{F as a}from"./getRenderStates-6c8f7e98.js";import{I as l}from"./InputStateWrapper-16c56aee.js";import{I as s,a as r}from"./controller-icon-8f0ee809.js";import{B as d,i as c}from"./index-ebe5a881.js";import{t as h}from"./i18n-260f0fe9.js";import{b as p}from"./component-names-0657b355.js";import"./events-bad0a075.js";import"./associated.controller-4237c28d.js";import"./bootstrap-53ed580c.js";import"./i18n-45224cc3.js";import"./access-and-short-key-f743a5c4.js";import"./tooltip-align-465a8590.js";import"./align-d2572387.js";import"./hide-label-8b3a8709.js";import"./label-bf9966d0.js";import"./tslib.es6-1173d062.js";import"./Alert-a96714a0.js";import"./bem-e4c3a2e6.js";import"./browser-f629a56a.js";import"./Heading-4990ec84.js";import"./InternalUnderlinedBadgeText-e15d02d5.js";import"./isArray-7a60fa7f.js";import"./Input-529b3f6c.js";import"./Icon-d694fbfe.js";import"./isObject-ffcbbb76.js";import"./icons-a9c52ed8.js";class u extends s{constructor(n,e,t){super(n,e,t),this.component=n}validateAccept(n){d(this.component,"_accept",n)}validateMultiple(n){c(this.component,"_multiple",n)}validateRequired(n){c(this.component,"_required",n)}componentWillLoad(){super.componentWillLoad(),this.validateAccept(this.component._accept),this.validateMultiple(this.component._multiple),this.validateRequired(this.component._required)}}const f="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\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 * 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 * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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 border: none;\n margin: 0;\n padding: 0;\n width: 100%;\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 background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n font-size: rem(16);\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 }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\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 animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip__content {\n background-color: #fff;\n color: #000;\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\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 place-items: center;\n display: flex;\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(1rem / var(--kolibri-root-font-size, 16));\n }\n}\n@layer kol-component {\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}\n@layer kol-component {\n .kol-input-container {\n align-items: center;\n background-color: white;\n display: grid;\n grid-template-columns: 1fr;\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n width: 100%;\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}\n@layer kol-component {\n .kol-input {\n min-width: var(--a11y-min-size);\n width: 100%;\n }\n .kol-input:focus {\n outline: none;\n }\n}\n@layer kol-component {\n .kol-input {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 10) 0.5em;\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n opacity: 0;\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 align-items: center;\n overflow: hidden;\n height: var(--a11y-min-size);\n }\n .kol-input-container__filename {\n flex-grow: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n margin-left: calc(4rem / var(--kolibri-root-font-size, 16));\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}",m=f,b=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()}getFormFieldProps(){return{state:this.state,class:i("kol-input-file","file"),tooltipAlign:this._tooltipAlign,onClick:()=>{var n;return null===(n=this.inputRef)||void 0===n?void 0:n.focus()},alert:this.showAsAlert()}}getInputProps(){return Object.assign(Object.assign({ref:this.catchRef,state:this.state,type:"file",accept:this.state._accept,multiple:this.state._multiple},this.controller.onFacade),{onChange:this.onChange,onInput:this.onInput,onFocus:n=>{this.controller.onFacade.onFocus(n),this.inputHasFocus=!0},onBlur:n=>{this.controller.onFacade.onBlur(n),this.inputHasFocus=!1}})}render(){return n(a,Object.assign({key:"571eeade5da1a2c7c33c6e9536fff73ab6b7c856"},this.getFormFieldProps()),n(r,{key:"a05eadc8193d5952f60e240baeed36b6d3880c2b",state:this.state},n("span",{key:"6b8aed4223e78be6f2f1cd2d063ea3fdcf1a06b4",class:i("kol-input-container__filename",{"kol-input-container__filename--has-file":this.hasFileSelected})},this.filename),n(l,Object.assign({key:"c70e67ec14e42414e5878ba02db8223807f6821e"},this.getInputProps())),n(p,{key:"54a7770ad286224155c4b5990239e195254d1e0c",class:"kol-input-container__button",_label:h("kol-data-browse-text"),_buttonVariant:"primary",_disabled:this._disabled})))}constructor(n){t(this,n),this.catchRef=n=>{this.inputRef=n},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(", "):h("kol-filename-text"),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._accept=void 0,this._accessKey=void 0,this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._msg=void 0,this._multiple=!1,this._name=void 0,this._on=void 0,this._required=!1,this._shortKey=void 0,this._smartButton=void 0,this._syncValueBySelector=void 0,this._tooltipAlign="top",this._touched=!1,this.filename=h("kol-filename-text"),this.hasFileSelected=!1,this.state={_hideMsg:!1,_id:`id-${o()}`,_label:""},this.inputHasFocus=!1,this.controller=new u(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)}static get delegatesFocus(){return!0}get host(){return e(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"]}}};b.style={default:m};export{b as kol_input_file};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{h as n,r as t,g as e}from"./index-2f6c3929.js";import{c as i}from"./clsx-09a06a12.js";import{n as a}from"./dev.utils-ca3cce4b.js";import{p as o}from"./controller-cf01f031.js";import{F as s}from"./getRenderStates-1a7401a2.js";import{I as l}from"./InputStateWrapper-e0c888e4.js";import{I as r,a as d}from"./controller-icon-6d59bc84.js";import{w as h,B as c,i as u}from"./index-ebe5a881.js";import{v as m}from"./suggestions-198125b7.js";import"./component-names-553d8bfa.js";import"./events-bad0a075.js";import"./associated.controller-22684481.js";import"./bootstrap-dcdb1765.js";import"./i18n-45224cc3.js";import"./access-and-short-key-f743a5c4.js";import"./tooltip-align-465a8590.js";import"./align-d2572387.js";import"./hide-label-8b3a8709.js";import"./label-bf9966d0.js";import"./tslib.es6-1173d062.js";import"./Alert-4f2f7115.js";import"./i18n-260f0fe9.js";import"./bem-e4c3a2e6.js";import"./browser-f629a56a.js";import"./Heading-7b90eeb4.js";import"./InternalUnderlinedBadgeText-2d939629.js";import"./isArray-7a60fa7f.js";import"./Input-324f4b1d.js";import"./Icon-a2f91629.js";import"./isObject-ffcbbb76.js";import"./icons-a9c52ed8.js";class p extends r{constructor(e,t,n){super(e,t,n),this.component=e}validateAutoComplete(e){h(this.component,"_autoComplete",(e=>"string"==typeof e&&("on"===e||"off"===e)),new Set(["on | off"]),e)}validateSuggestions(e){m(this.component,e)}validateMax(e){this.validateNumber("_max",e)}validateMin(e){this.validateNumber("_min",e)}validatePlaceholder(e){c(this.component,"_placeholder",e)}validateReadOnly(e){u(this.component,"_readOnly",e)}validateRequired(e){u(this.component,"_required",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 f="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\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 * 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 * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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 border: none;\n margin: 0;\n padding: 0;\n width: 100%;\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 background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n font-size: rem(16);\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 }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\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 animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip__content {\n background-color: #fff;\n color: #000;\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\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 place-items: center;\n display: flex;\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(1rem / var(--kolibri-root-font-size, 16));\n }\n}\n@layer kol-component {\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}\n@layer kol-component {\n .kol-input-container {\n align-items: center;\n background-color: white;\n display: grid;\n grid-template-columns: 1fr;\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n width: 100%;\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}\n@layer kol-component {\n .kol-input {\n min-width: var(--a11y-min-size);\n width: 100%;\n }\n .kol-input:focus {\n outline: none;\n }\n}",b=f,v=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:i("kol-input-number","number",{"has-value":this.state._hasValue}),tooltipAlign:this._tooltipAlign,onClick:()=>{var e;return null===(e=this.inputRef)||void 0===e?void 0:e.focus()},alert:this.showAsAlert()}}getInputProps(){return Object.assign(Object.assign({ref:this.catchRef,state:this.state,type:"number"},this.controller.onFacade),{onInput:this.onInput,onChange:this.onChange,onKeyDown:this.onKeyDown,onFocus:e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},onBlur:e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1}})}render(){return n(s,Object.assign({key:"0f80a75583c63b7ca5df58006a765a47749ca15a"},this.getFormFieldProps()),n(d,{key:"737a2e9a830d830e78e698828de9e6b6c0a89fa1",state:this.state},n(l,Object.assign({key:"dd94e2b01de6df603fc092a56723cb7cb10d9b72"},this.getInputProps()))))}constructor(e){t(this,e),this.catchRef=e=>{this.inputRef=e},this.onInput=e=>{var t;const n=null===(t=this.inputRef)||void 0===t?void 0:t.value;this._value=this.remapValue(""===n?null:Number(n)),this.controller.onFacade.onInput(e,!0,this._value)},this.onChange=e=>{var t;const n=null===(t=this.inputRef)||void 0===t?void 0:t.value,i=this.remapValue(""===n?null:Number(n));this.controller.onFacade.onChange(e,i)},this.onKeyDown=e=>{"Enter"!==e.code&&"NumpadEnter"!==e.code||o({form:this.host,ref:this.inputRef})},this._accessKey=void 0,this._autoComplete=void 0,this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._max=void 0,this._min=void 0,this._msg=void 0,this._name=void 0,this._on=void 0,this._placeholder=void 0,this._readOnly=!1,this._required=!1,this._shortKey=void 0,this._smartButton=void 0,this._suggestions=void 0,this._step=void 0,this._syncValueBySelector=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_autoComplete:"off",_hasValue:!1,_hideMsg:!1,_id:`id-${a()}`,_label:"",_suggestions:[]},this._initialValueType="null",this.inputHasFocus=!1,this.controller=new p(this,"number",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(e){this.controller.validateAccessKey(e)}validateAutoComplete(e){this.controller.validateAutoComplete(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHideMsg(e){this.controller.validateHideMsg(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMax(e){this.controller.validateMax(e)}validateMin(e){this.controller.validateMin(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validatePlaceholder(e){this.controller.validatePlaceholder(e)}validateReadOnly(e){this.controller.validateReadOnly(e)}validateRequired(e){this.controller.validateRequired(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSmartButton(e){this.controller.validateSmartButton(e)}validateSuggestions(e){this.controller.validateSuggestions(e)}validateStep(e){this.controller.validateStep(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e),null!=e&&this.setInitialValueType(e)}componentWillLoad(){void 0!==this._value&&this.setInitialValueType(this._value),this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener((e=>this.state._hasValue=!!e))}static get delegatesFocus(){return!0}get host(){return e(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"]}}};v.style={default:b};export{v as kol_input_number};
4
+ import{h as n,r as e,g as t}from"./index-d47f6be5.js";import{c as i}from"./clsx-09a06a12.js";import{n as a}from"./dev.utils-98923b37.js";import{p as o}from"./controller-235b6c3b.js";import{F as s}from"./getRenderStates-6c8f7e98.js";import{I as l}from"./InputStateWrapper-16c56aee.js";import{I as r,a as d}from"./controller-icon-8f0ee809.js";import{w as h,B as c,i as u}from"./index-ebe5a881.js";import{v as m}from"./suggestions-198125b7.js";import"./component-names-0657b355.js";import"./events-bad0a075.js";import"./associated.controller-4237c28d.js";import"./bootstrap-53ed580c.js";import"./i18n-45224cc3.js";import"./access-and-short-key-f743a5c4.js";import"./tooltip-align-465a8590.js";import"./align-d2572387.js";import"./hide-label-8b3a8709.js";import"./label-bf9966d0.js";import"./tslib.es6-1173d062.js";import"./Alert-a96714a0.js";import"./i18n-260f0fe9.js";import"./bem-e4c3a2e6.js";import"./browser-f629a56a.js";import"./Heading-4990ec84.js";import"./InternalUnderlinedBadgeText-e15d02d5.js";import"./isArray-7a60fa7f.js";import"./Input-529b3f6c.js";import"./Icon-d694fbfe.js";import"./isObject-ffcbbb76.js";import"./icons-a9c52ed8.js";class p extends r{constructor(e,t,n){super(e,t,n),this.component=e}validateAutoComplete(e){h(this.component,"_autoComplete",(e=>"string"==typeof e&&("on"===e||"off"===e)),new Set(["on | off"]),e)}validateSuggestions(e){m(this.component,e)}validateMax(e){this.validateNumber("_max",e)}validateMin(e){this.validateNumber("_min",e)}validatePlaceholder(e){c(this.component,"_placeholder",e)}validateReadOnly(e){u(this.component,"_readOnly",e)}validateRequired(e){u(this.component,"_required",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 f="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\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 * 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 * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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 border: none;\n margin: 0;\n padding: 0;\n width: 100%;\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 background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n font-size: rem(16);\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 }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\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 animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip__content {\n background-color: #fff;\n color: #000;\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\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 place-items: center;\n display: flex;\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(1rem / var(--kolibri-root-font-size, 16));\n }\n}\n@layer kol-component {\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}\n@layer kol-component {\n .kol-input-container {\n align-items: center;\n background-color: white;\n display: grid;\n grid-template-columns: 1fr;\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n width: 100%;\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}\n@layer kol-component {\n .kol-input {\n min-width: var(--a11y-min-size);\n width: 100%;\n }\n .kol-input:focus {\n outline: none;\n }\n}",b=f,v=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:i("kol-input-number","number",{"has-value":this.state._hasValue}),tooltipAlign:this._tooltipAlign,onClick:()=>{var e;return null===(e=this.inputRef)||void 0===e?void 0:e.focus()},alert:this.showAsAlert()}}getInputProps(){return Object.assign(Object.assign({ref:this.catchRef,state:this.state,type:"number"},this.controller.onFacade),{onInput:this.onInput,onChange:this.onChange,onKeyDown:this.onKeyDown,onFocus:e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},onBlur:e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1}})}render(){return n(s,Object.assign({key:"0f80a75583c63b7ca5df58006a765a47749ca15a"},this.getFormFieldProps()),n(d,{key:"737a2e9a830d830e78e698828de9e6b6c0a89fa1",state:this.state},n(l,Object.assign({key:"dd94e2b01de6df603fc092a56723cb7cb10d9b72"},this.getInputProps()))))}constructor(t){e(this,t),this.catchRef=e=>{this.inputRef=e},this.onInput=e=>{var t;const n=null===(t=this.inputRef)||void 0===t?void 0:t.value;this._value=this.remapValue(""===n?null:Number(n)),this.controller.onFacade.onInput(e,!0,this._value)},this.onChange=e=>{var t;const n=null===(t=this.inputRef)||void 0===t?void 0:t.value,i=this.remapValue(""===n?null:Number(n));this.controller.onFacade.onChange(e,i)},this.onKeyDown=e=>{"Enter"!==e.code&&"NumpadEnter"!==e.code||o({form:this.host,ref:this.inputRef})},this._accessKey=void 0,this._autoComplete=void 0,this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._max=void 0,this._min=void 0,this._msg=void 0,this._name=void 0,this._on=void 0,this._placeholder=void 0,this._readOnly=!1,this._required=!1,this._shortKey=void 0,this._smartButton=void 0,this._suggestions=void 0,this._step=void 0,this._syncValueBySelector=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_autoComplete:"off",_hasValue:!1,_hideMsg:!1,_id:`id-${a()}`,_label:"",_suggestions:[]},this._initialValueType="null",this.inputHasFocus=!1,this.controller=new p(this,"number",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(e){this.controller.validateAccessKey(e)}validateAutoComplete(e){this.controller.validateAutoComplete(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHideMsg(e){this.controller.validateHideMsg(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMax(e){this.controller.validateMax(e)}validateMin(e){this.controller.validateMin(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validatePlaceholder(e){this.controller.validatePlaceholder(e)}validateReadOnly(e){this.controller.validateReadOnly(e)}validateRequired(e){this.controller.validateRequired(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSmartButton(e){this.controller.validateSmartButton(e)}validateSuggestions(e){this.controller.validateSuggestions(e)}validateStep(e){this.controller.validateStep(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e),null!=e&&this.setInitialValueType(e)}componentWillLoad(){void 0!==this._value&&this.setInitialValueType(this._value),this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener((e=>this.state._hasValue=!!e))}static get delegatesFocus(){return!0}get host(){return t(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"]}}};v.style={default:b};export{v as kol_input_number};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{h as n,r as t,g as e}from"./index-2f6c3929.js";import{c as i}from"./clsx-09a06a12.js";import{l as o,D as a}from"./index-ebe5a881.js";import{n as s}from"./dev.utils-ca3cce4b.js";import{p as l}from"./controller-cf01f031.js";import{F as r}from"./getRenderStates-1a7401a2.js";import{I as d}from"./InputStateWrapper-e0c888e4.js";import{K as h,a as c}from"./controller-icon-6d59bc84.js";import{I as p}from"./controller-2152c5b3.js";import{t as u}from"./i18n-260f0fe9.js";import"./component-names-553d8bfa.js";import"./events-bad0a075.js";import"./associated.controller-22684481.js";import"./bootstrap-dcdb1765.js";import"./i18n-45224cc3.js";import"./access-and-short-key-f743a5c4.js";import"./tooltip-align-465a8590.js";import"./align-d2572387.js";import"./hide-label-8b3a8709.js";import"./label-bf9966d0.js";import"./tslib.es6-1173d062.js";import"./Alert-4f2f7115.js";import"./bem-e4c3a2e6.js";import"./browser-f629a56a.js";import"./Heading-7b90eeb4.js";import"./InternalUnderlinedBadgeText-2d939629.js";import"./isArray-7a60fa7f.js";import"./Input-324f4b1d.js";import"./Icon-a2f91629.js";import"./isObject-ffcbbb76.js";import"./icons-a9c52ed8.js";import"./has-counter-3fc44829.js";const m="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\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 * 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 * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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 border: none;\n margin: 0;\n padding: 0;\n width: 100%;\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 background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n font-size: rem(16);\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 }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\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 animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip__content {\n background-color: #fff;\n color: #000;\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\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 place-items: center;\n display: flex;\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(1rem / var(--kolibri-root-font-size, 16));\n }\n}\n@layer kol-component {\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}\n@layer kol-component {\n .kol-input-container {\n align-items: center;\n background-color: white;\n display: grid;\n grid-template-columns: 1fr;\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n width: 100%;\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}\n@layer kol-component {\n .kol-input {\n min-width: var(--a11y-min-size);\n width: 100%;\n }\n .kol-input:focus {\n outline: none;\n }\n}\n@layer kol-component {\n .kol-input-password {\n --kol-tooltip-width: calc(160rem / var(--kolibri-root-font-size, 16));\n }\n}",f=m,b=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:i("kol-input-password","password",{"has-value":this.state._hasValue}),tooltipAlign:this._tooltipAlign,onClick:()=>{var t;return null===(t=this.inputRef)||void 0===t?void 0:t.focus()},alert:this.showAsAlert()}}getInputProps(){return Object.assign(Object.assign({ref:this.catchRef,type:this._passwordVisible?"text":"password",state:this.state},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:n(h,{componentName:"button",class:"kol-input-password__password-toggle-button","data-testid":"kol-input-password-toggle-button",label:this._passwordVisible?u("kol-hide-password"):u("kol-show-password"),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 n(r,Object.assign({key:"e9ead4d96e4257182ca0d308afe292deccf89108"},this.getFormFieldProps()),n(c,{key:"d5e99e1805500ee6c57d7500c11a99d7fd0add98",state:this.state,endAdornment:this.getShowPasswordButton()},n(d,Object.assign({key:"3dc6efeb4978d2c3de7644039407c6eae2b3162b"},this.getInputProps()))))}constructor(n){t(this,n),this.catchRef=t=>{this.inputRef=t},this.onKeyDown=t=>{"Enter"!==t.code&&"NumpadEnter"!==t.code||l({form:this.host,ref:this.inputRef})},this.onInput=t=>{const n=t.target.value;o(this,"_currentLength",n.length),this._value=n,this.controller.onFacade.onInput(t)},this._accessKey=void 0,this._autoComplete=void 0,this._disabled=!1,this._hasCounter=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._maxLength=void 0,this._msg=void 0,this._name=void 0,this._on=void 0,this._pattern=void 0,this._placeholder=void 0,this._readOnly=!1,this._required=!1,this._shortKey=void 0,this._smartButton=void 0,this._syncValueBySelector=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this._variant="default",this.state={_autoComplete:"off",_currentLength:0,_hasValue:!1,_hideMsg:!1,_id:`id-${s()}`,_label:"",_variant:"default"},this._passwordVisible=!1,this.inputHasFocus=!1,this.controller=new p(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&&a("[KolInputPassword] The 'autocomplete' option should not be set to \"on\" for a password input field")}validateDisabled(t){this.controller.validateDisabled(t)}validateVariant(t){this.controller.validateVariant(t)}validateHasCounter(t){this.controller.validateHasCounter(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)}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))}static get delegatesFocus(){return!0}get host(){return e(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_variant:["validateVariant"],_hasCounter:["validateHasCounter"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_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"]}}};b.style={default:f};export{b as kol_input_password};
4
+ import{h as n,r as t,g as e}from"./index-d47f6be5.js";import{c as i}from"./clsx-09a06a12.js";import{l as o,D as a}from"./index-ebe5a881.js";import{n as s}from"./dev.utils-98923b37.js";import{p as l}from"./controller-235b6c3b.js";import{F as r}from"./getRenderStates-6c8f7e98.js";import{I as d}from"./InputStateWrapper-16c56aee.js";import{K as h,a as c}from"./controller-icon-8f0ee809.js";import{I as p}from"./controller-6253c3cd.js";import{t as u}from"./i18n-260f0fe9.js";import"./component-names-0657b355.js";import"./events-bad0a075.js";import"./associated.controller-4237c28d.js";import"./bootstrap-53ed580c.js";import"./i18n-45224cc3.js";import"./access-and-short-key-f743a5c4.js";import"./tooltip-align-465a8590.js";import"./align-d2572387.js";import"./hide-label-8b3a8709.js";import"./label-bf9966d0.js";import"./tslib.es6-1173d062.js";import"./Alert-a96714a0.js";import"./bem-e4c3a2e6.js";import"./browser-f629a56a.js";import"./Heading-4990ec84.js";import"./InternalUnderlinedBadgeText-e15d02d5.js";import"./isArray-7a60fa7f.js";import"./Input-529b3f6c.js";import"./Icon-d694fbfe.js";import"./isObject-ffcbbb76.js";import"./icons-a9c52ed8.js";import"./has-counter-3fc44829.js";const m="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\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 * 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 * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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 border: none;\n margin: 0;\n padding: 0;\n width: 100%;\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 background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n font-size: rem(16);\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 }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\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 animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip__content {\n background-color: #fff;\n color: #000;\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\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 place-items: center;\n display: flex;\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(1rem / var(--kolibri-root-font-size, 16));\n }\n}\n@layer kol-component {\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}\n@layer kol-component {\n .kol-input-container {\n align-items: center;\n background-color: white;\n display: grid;\n grid-template-columns: 1fr;\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n width: 100%;\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}\n@layer kol-component {\n .kol-input {\n min-width: var(--a11y-min-size);\n width: 100%;\n }\n .kol-input:focus {\n outline: none;\n }\n}\n@layer kol-component {\n .kol-input-password {\n --kol-tooltip-width: calc(160rem / var(--kolibri-root-font-size, 16));\n }\n}",f=m,b=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:i("kol-input-password","password",{"has-value":this.state._hasValue}),tooltipAlign:this._tooltipAlign,onClick:()=>{var t;return null===(t=this.inputRef)||void 0===t?void 0:t.focus()},alert:this.showAsAlert()}}getInputProps(){return Object.assign(Object.assign({ref:this.catchRef,type:this._passwordVisible?"text":"password",state:this.state},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:n(h,{componentName:"button",class:"kol-input-password__password-toggle-button","data-testid":"kol-input-password-toggle-button",label:this._passwordVisible?u("kol-hide-password"):u("kol-show-password"),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 n(r,Object.assign({key:"e9ead4d96e4257182ca0d308afe292deccf89108"},this.getFormFieldProps()),n(c,{key:"d5e99e1805500ee6c57d7500c11a99d7fd0add98",state:this.state,endAdornment:this.getShowPasswordButton()},n(d,Object.assign({key:"3dc6efeb4978d2c3de7644039407c6eae2b3162b"},this.getInputProps()))))}constructor(e){t(this,e),this.catchRef=t=>{this.inputRef=t},this.onKeyDown=t=>{"Enter"!==t.code&&"NumpadEnter"!==t.code||l({form:this.host,ref:this.inputRef})},this.onInput=t=>{const e=t.target.value;o(this,"_currentLength",e.length),this._value=e,this.controller.onFacade.onInput(t)},this._accessKey=void 0,this._autoComplete=void 0,this._disabled=!1,this._hasCounter=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._maxLength=void 0,this._msg=void 0,this._name=void 0,this._on=void 0,this._pattern=void 0,this._placeholder=void 0,this._readOnly=!1,this._required=!1,this._shortKey=void 0,this._smartButton=void 0,this._syncValueBySelector=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this._variant="default",this.state={_autoComplete:"off",_currentLength:0,_hasValue:!1,_hideMsg:!1,_id:`id-${s()}`,_label:"",_variant:"default"},this._passwordVisible=!1,this.inputHasFocus=!1,this.controller=new p(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&&a("[KolInputPassword] The 'autocomplete' option should not be set to \"on\" for a password input field")}validateDisabled(t){this.controller.validateDisabled(t)}validateVariant(t){this.controller.validateVariant(t)}validateHasCounter(t){this.controller.validateHasCounter(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)}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))}static get delegatesFocus(){return!0}get host(){return e(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_variant:["validateVariant"],_hasCounter:["validateHasCounter"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_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"]}}};b.style={default:f};export{b as kol_input_password};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{h as n,r as e,g as t}from"./index-2f6c3929.js";import{c as i}from"./clsx-09a06a12.js";import{n as o}from"./dev.utils-ca3cce4b.js";import{a}from"./controller-c6883e74.js";import{p as l}from"./controller-cf01f031.js";import{c as r,g as s,a as d,F as c}from"./getRenderStates-1a7401a2.js";import{F as h}from"./FieldControlStateWrapper-602a7af3.js";import{_ as p}from"./tslib.es6-1173d062.js";import{I as u}from"./Input-324f4b1d.js";import"./index-ebe5a881.js";import"./orientation-409d844a.js";import"./label-bf9966d0.js";import"./component-names-553d8bfa.js";import"./events-bad0a075.js";import"./associated.controller-22684481.js";import"./bootstrap-dcdb1765.js";import"./i18n-45224cc3.js";import"./access-and-short-key-f743a5c4.js";import"./tooltip-align-465a8590.js";import"./align-d2572387.js";import"./hide-label-8b3a8709.js";import"./Alert-4f2f7115.js";import"./i18n-260f0fe9.js";import"./bem-e4c3a2e6.js";import"./browser-f629a56a.js";import"./Heading-7b90eeb4.js";import"./InternalUnderlinedBadgeText-2d939629.js";import"./isArray-7a60fa7f.js";const f=e=>{var{class:t}=e,o=p(e,["class"]);return n(u,Object.assign({class:i("kol-input-radio__input",t)},o,{type:"radio"}))},m=e=>{var t,{class:o,inputProps:a}=e,l=p(e,["class","inputProps"]);const s=r(null==a?void 0:a.msg,null==a?void 0:a.touched),d={"kol-input-radio--checked":null==a?void 0:a.checked,"kol-input-radio--disabled":Boolean(null==a?void 0:a.disabled),"kol-input-radio--required":Boolean(null==a?void 0:a.required),"kol-input-radio--touched":Boolean(null==a?void 0:a.touched),[`kol-input-radio--${(null===(t=null==a?void 0:a.msg)||void 0===t?void 0:t.type)||"error"}`]:Boolean(s)};return n("label",Object.assign({class:i("kol-input-radio",d,o)},l),n(f,Object.assign({},a)))};function b(n,e={}){const{ariaDescribedBy:t}=s(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=d(n._msg)),Object.assign(Object.assign({},i),e)}const k=e=>{var{state:t,inputProps:i}=e,o=p(e,["state","inputProps"]);return n(m,Object.assign({inputProps:b(t,i)},o))},g='/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\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 * 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 * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type=\'checkbox\'], [type=\'radio\'], [type=\'range\']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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 border: none;\n margin: 0;\n padding: 0;\n width: 100%;\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 background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n font-size: rem(16);\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 }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\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 animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip__content {\n background-color: #fff;\n color: #000;\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\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 place-items: center;\n display: flex;\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(1rem / var(--kolibri-root-font-size, 16));\n }\n}\n@layer kol-component {\n .kol-field-control {\n min-height: var(--a11y-min-size);\n display: grid;\n grid-template-columns: auto 1fr;\n grid-template-areas: "input label";\n grid-template-rows: auto;\n align-items: center;\n justify-content: left;\n }\n .kol-field-control:has(.kol-field-control__hint) {\n grid-template-columns: auto 1fr;\n grid-template-areas: "input label" "hint hint";\n grid-template-rows: auto auto;\n }\n .kol-field-control--label-align-left:not(.kol-field-control--hide-label) {\n grid-template-columns: 1fr auto;\n grid-template-areas: "label input";\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-columns: 1fr auto;\n grid-template-areas: "label input" "hint hint";\n grid-template-rows: auto auto;\n }\n .kol-field-control__input {\n grid-area: input;\n display: flex;\n min-height: var(--a11y-min-size);\n align-items: center;\n }\n .kol-field-control__label {\n align-items: center;\n cursor: pointer;\n display: flex;\n flex-grow: 1;\n grid-area: label;\n min-height: var(--a11y-min-size);\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 cursor: not-allowed;\n opacity: 0.5;\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}\n@layer kol-component {\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}\n@layer kol-component {\n .kol-input-container {\n align-items: center;\n background-color: white;\n display: grid;\n grid-template-columns: 1fr;\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n width: 100%;\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}\n@layer kol-component {\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 cursor: pointer;\n justify-content: center;\n align-items: center;\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n }\n .kol-input-radio__input {\n appearance: none;\n border-width: var(--border-width);\n border-style: solid;\n border-radius: 100%;\n cursor: pointer;\n display: flex;\n height: var(--input-size);\n margin: 0;\n min-height: var(--input-size);\n min-width: var(--input-size);\n padding: 0;\n width: var(--input-size);\n }\n .kol-input-radio__input:before {\n border-radius: 100%;\n content: "";\n margin: auto;\n height: calc(var(--input-size) / 2);\n width: calc(var(--input-size) / 2);\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}',_=g,v=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",class:i("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 n(c,Object.assign({key:"3f0e5e53e5145d7e6cf07ab9674897319dad9517"},this.getFormFieldProps()),this.state._options.map(((n,e)=>this.renderOption(n,e))))}getOptionProps(n,e){const t={state:this.state,id:e,hint:n.hint,label:n.label,required:!1,fieldControlLabelProps:{showBadge:!1}};return n.disabled&&(t.disabled=!0),t}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:n.disabled},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(e,t){const i=`${this.state._id}-${t}`,o=this.state._value===e.value;return n(h,Object.assign({key:i},this.getOptionProps(e,i)),n(k,Object.assign({},this.getInputProps(e,i,t,o))))}constructor(n){e(this,n),this.catchRef=n=>{this.inputRef=n},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=>{"Enter"!==n.code&&"NumpadEnter"!==n.code||l({form:this.host,ref:this.inputRef})},this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._id=void 0,this._label=void 0,this._msg=void 0,this._name=void 0,this._on=void 0,this._options=void 0,this._orientation="vertical",this._required=!1,this._syncValueBySelector=void 0,this._tooltipAlign="top",this._touched=!1,this._value=null,this.state={_hideMsg:!1,_id:`id-${o()}`,_label:"",_options:[],_orientation:"vertical"},this.inputHasFocus=!1,this.controller=new a(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()}static get delegatesFocus(){return!0}get host(){return t(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"]}}};v.style={default:_};export{v as kol_input_radio};
4
+ import{h as n,r as e,g as t}from"./index-d47f6be5.js";import{c as i}from"./clsx-09a06a12.js";import{n as o}from"./dev.utils-98923b37.js";import{a}from"./controller-a10288c6.js";import{p as l}from"./controller-235b6c3b.js";import{c as r,g as s,a as d,F as c}from"./getRenderStates-6c8f7e98.js";import{F as h}from"./FieldControlStateWrapper-adc38f2f.js";import{_ as p}from"./tslib.es6-1173d062.js";import{I as u}from"./Input-529b3f6c.js";import"./index-ebe5a881.js";import"./orientation-409d844a.js";import"./label-bf9966d0.js";import"./component-names-0657b355.js";import"./events-bad0a075.js";import"./associated.controller-4237c28d.js";import"./bootstrap-53ed580c.js";import"./i18n-45224cc3.js";import"./access-and-short-key-f743a5c4.js";import"./tooltip-align-465a8590.js";import"./align-d2572387.js";import"./hide-label-8b3a8709.js";import"./Alert-a96714a0.js";import"./i18n-260f0fe9.js";import"./bem-e4c3a2e6.js";import"./browser-f629a56a.js";import"./Heading-4990ec84.js";import"./InternalUnderlinedBadgeText-e15d02d5.js";import"./isArray-7a60fa7f.js";const f=e=>{var{class:t}=e,o=p(e,["class"]);return n(u,Object.assign({class:i("kol-input-radio__input",t)},o,{type:"radio"}))},m=e=>{var t,{class:o,inputProps:a}=e,l=p(e,["class","inputProps"]);const s=r(null==a?void 0:a.msg,null==a?void 0:a.touched),d={"kol-input-radio--checked":null==a?void 0:a.checked,"kol-input-radio--disabled":Boolean(null==a?void 0:a.disabled),"kol-input-radio--required":Boolean(null==a?void 0:a.required),"kol-input-radio--touched":Boolean(null==a?void 0:a.touched),[`kol-input-radio--${(null===(t=null==a?void 0:a.msg)||void 0===t?void 0:t.type)||"error"}`]:Boolean(s)};return n("label",Object.assign({class:i("kol-input-radio",d,o)},l),n(f,Object.assign({},a)))};function b(n,e={}){const{ariaDescribedBy:t}=s(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=d(n._msg)),Object.assign(Object.assign({},i),e)}const k=e=>{var{state:t,inputProps:i}=e,o=p(e,["state","inputProps"]);return n(m,Object.assign({inputProps:b(t,i)},o))},g='/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\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 * 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 * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type=\'checkbox\'], [type=\'radio\'], [type=\'range\']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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 border: none;\n margin: 0;\n padding: 0;\n width: 100%;\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 background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n font-size: rem(16);\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 }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\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 animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip__content {\n background-color: #fff;\n color: #000;\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\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 place-items: center;\n display: flex;\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(1rem / var(--kolibri-root-font-size, 16));\n }\n}\n@layer kol-component {\n .kol-field-control {\n min-height: var(--a11y-min-size);\n display: grid;\n grid-template-columns: auto 1fr;\n grid-template-areas: "input label";\n grid-template-rows: auto;\n align-items: center;\n justify-content: left;\n }\n .kol-field-control:has(.kol-field-control__hint) {\n grid-template-columns: auto 1fr;\n grid-template-areas: "input label" "hint hint";\n grid-template-rows: auto auto;\n }\n .kol-field-control--label-align-left:not(.kol-field-control--hide-label) {\n grid-template-columns: 1fr auto;\n grid-template-areas: "label input";\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-columns: 1fr auto;\n grid-template-areas: "label input" "hint hint";\n grid-template-rows: auto auto;\n }\n .kol-field-control__input {\n grid-area: input;\n display: flex;\n min-height: var(--a11y-min-size);\n align-items: center;\n }\n .kol-field-control__label {\n align-items: center;\n cursor: pointer;\n display: flex;\n flex-grow: 1;\n grid-area: label;\n min-height: var(--a11y-min-size);\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 cursor: not-allowed;\n opacity: 0.5;\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}\n@layer kol-component {\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}\n@layer kol-component {\n .kol-input-container {\n align-items: center;\n background-color: white;\n display: grid;\n grid-template-columns: 1fr;\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n width: 100%;\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}\n@layer kol-component {\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 cursor: pointer;\n justify-content: center;\n align-items: center;\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n }\n .kol-input-radio__input {\n appearance: none;\n border-width: var(--border-width);\n border-style: solid;\n border-radius: 100%;\n cursor: pointer;\n display: flex;\n height: var(--input-size);\n margin: 0;\n min-height: var(--input-size);\n min-width: var(--input-size);\n padding: 0;\n width: var(--input-size);\n }\n .kol-input-radio__input:before {\n border-radius: 100%;\n content: "";\n margin: auto;\n height: calc(var(--input-size) / 2);\n width: calc(var(--input-size) / 2);\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}',_=g,v=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",class:i("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 n(c,Object.assign({key:"3f0e5e53e5145d7e6cf07ab9674897319dad9517"},this.getFormFieldProps()),this.state._options.map(((n,e)=>this.renderOption(n,e))))}getOptionProps(n,e){const t={state:this.state,id:e,hint:n.hint,label:n.label,required:!1,fieldControlLabelProps:{showBadge:!1}};return n.disabled&&(t.disabled=!0),t}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:n.disabled},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(e,t){const i=`${this.state._id}-${t}`,o=this.state._value===e.value;return n(h,Object.assign({key:i},this.getOptionProps(e,i)),n(k,Object.assign({},this.getInputProps(e,i,t,o))))}constructor(n){e(this,n),this.catchRef=n=>{this.inputRef=n},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=>{"Enter"!==n.code&&"NumpadEnter"!==n.code||l({form:this.host,ref:this.inputRef})},this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._id=void 0,this._label=void 0,this._msg=void 0,this._name=void 0,this._on=void 0,this._options=void 0,this._orientation="vertical",this._required=!1,this._syncValueBySelector=void 0,this._tooltipAlign="top",this._touched=!1,this._value=null,this.state={_hideMsg:!1,_id:`id-${o()}`,_label:"",_options:[],_orientation:"vertical"},this.inputHasFocus=!1,this.controller=new a(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()}static get delegatesFocus(){return!0}get host(){return t(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"]}}};v.style={default:_};export{v as kol_input_radio};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{h as n,r as t,g as e}from"./index-2f6c3929.js";import{_ as i}from"./tslib.es6-1173d062.js";import{c as o}from"./clsx-09a06a12.js";import{n as a}from"./dev.utils-ca3cce4b.js";import{p as s}from"./controller-cf01f031.js";import{F as r}from"./getRenderStates-1a7401a2.js";import{I as l,S as d}from"./InputStateWrapper-e0c888e4.js";import{I as h,a as c}from"./controller-icon-6d59bc84.js";import{w as u}from"./index-ebe5a881.js";import{v as p}from"./suggestions-198125b7.js";import"./component-names-553d8bfa.js";import"./events-bad0a075.js";import"./associated.controller-22684481.js";import"./bootstrap-dcdb1765.js";import"./i18n-45224cc3.js";import"./access-and-short-key-f743a5c4.js";import"./tooltip-align-465a8590.js";import"./align-d2572387.js";import"./hide-label-8b3a8709.js";import"./label-bf9966d0.js";import"./Alert-4f2f7115.js";import"./i18n-260f0fe9.js";import"./bem-e4c3a2e6.js";import"./browser-f629a56a.js";import"./Heading-7b90eeb4.js";import"./InternalUnderlinedBadgeText-2d939629.js";import"./isArray-7a60fa7f.js";import"./Input-324f4b1d.js";import"./Icon-a2f91629.js";import"./isObject-ffcbbb76.js";import"./icons-a9c52ed8.js";class m extends h{constructor(t,e,n){super(t,e,n),this.component=t}validateAutoComplete(t){u(this.component,"_autoComplete",(t=>"string"==typeof t&&("on"===t||"off"===t)),new Set(["on | off"]),t)}validateMax(t){this.validateNumber("_max",t)}validateMin(t){this.validateNumber("_min",t)}validateStep(t){this.validateNumber("_step",t)}validateSuggestions(t){p(this.component,t)}validateValue(t){this.validateNumber("_value",t),this.component._value=t,this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateMax(this.component._max),this.validateMin(this.component._min),this.validateStep(this.component._step),this.validateSuggestions(this.component._suggestions),this.validateValue(this.component._value)}}const f="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\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 * 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 * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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 border: none;\n margin: 0;\n padding: 0;\n width: 100%;\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 background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n font-size: rem(16);\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 }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\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 animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip__content {\n background-color: #fff;\n color: #000;\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\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 place-items: center;\n display: flex;\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(1rem / var(--kolibri-root-font-size, 16));\n }\n}\n@layer kol-component {\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}\n@layer kol-component {\n .kol-input-container {\n align-items: center;\n background-color: white;\n display: grid;\n grid-template-columns: 1fr;\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n width: 100%;\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}\n@layer kol-component {\n .kol-input {\n min-width: var(--a11y-min-size);\n width: 100%;\n }\n .kol-input:focus {\n outline: none;\n }\n}\n@layer kol-component {\n .kol-input-range__inputs-wrapper {\n align-items: center;\n display: flex;\n flex-direction: row;\n flex-grow: 1;\n }\n .kol-input-range__input--number {\n width: var(--kolibri-input-range--input-number--width);\n }\n .kol-input-range__input--range {\n appearance: none;\n background-color: #d3d3d3;\n border: 1px solid #000;\n display: inline-block;\n flex-grow: 1;\n height: calc(8rem / var(--kolibri-root-font-size, 16));\n line-height: 1.5;\n padding: 0;\n margin: 0;\n /* Design-Hack - related with flex-grow */\n width: 0;\n }\n .kol-input-range__input--range::-webkit-slider-thumb {\n background-color: #000;\n height: calc(20rem / var(--kolibri-root-font-size, 16));\n width: calc(20rem / var(--kolibri-root-font-size, 16));\n border-radius: 20px;\n -webkit-appearance: none;\n }\n .kol-input-range__input:not(:disabled).kol-input-range__input--range::-webkit-slider-thumb {\n cursor: pointer;\n }\n @media (prefers-contrast: more) or (forced-colors: active) {\n .kol-input-range__input--range::-webkit-slider-thumb {\n outline: 1px solid currentColor;\n }\n }\n .kol-input-range__input--range::-moz-range-thumb {\n background-color: #000;\n height: calc(20rem / var(--kolibri-root-font-size, 16));\n width: calc(20rem / var(--kolibri-root-font-size, 16));\n border-radius: 20px;\n -moz-appearance: none;\n }\n .kol-input-range__input:not(:disabled).kol-input-range__input--range::-moz-range-thumb {\n cursor: pointer;\n }\n}",b=f,g=class{async kolFocus(){var t;null===(t=this.refInputNumber)||void 0===t||t.focus()}getSanitizedFloatValue(t){const e=parseFloat(t);return this.state._max&&e>this.state._max?this.state._max:this.state._min&&e<this.state._min?this.state._min:e}remapValue(t){return"NumberString"===this._initialValueType?String(t):t}async getValue(){if(void 0!==this.refInputNumber){const t=this.refInputNumber.value,e=this.getSanitizedFloatValue(t);return this.remapValue(e)}}componentDidLoad(){var t;!this._value&&(null===(t=this.refInputRange)||void 0===t?void 0:t.value)&&this.validateValue(parseFloat(this.refInputRange.value))}getFormFieldProps(){return{state:this.state,class:o("kol-input-range","range"),tooltipAlign:this._tooltipAlign,onClick:()=>{var t;return null===(t=this.refInputRange)||void 0===t?void 0:t.focus()},alert:this.showAsAlert()}}getGenericInputProps(){const t=this.state,e=i(t,["_suggestions"]);return Object.assign(Object.assign({state:Object.assign(Object.assign({},e),{_suggestions:[]})},this.controller.onFacade),{onChange:this.onChange,onInput:this.onInput,onFocus:t=>{this.controller.onFacade.onFocus(t),this.inputHasFocus=!0},onBlur:t=>{this.controller.onFacade.onBlur(t),this.inputHasFocus=!1}})}get hasSuggestions(){return Array.isArray(this.state._suggestions)&&this.state._suggestions.length>0}getInputRangeProps(){return Object.assign(Object.assign({},this.getGenericInputProps()),{name:this.state._name?`${this.state._name}-range`:void 0,list:this.hasSuggestions?`${this.state._id}-list`:void 0,type:"range",tabIndex:-1,id:void 0,"aria-hidden":"true",ref:this.catchInputRangeRef})}getInputNumberProps(){return Object.assign(Object.assign({},this.getGenericInputProps()),{name:this.state._name?`${this.state._name}-number`:void 0,list:this.hasSuggestions?`${this.state._id}-list`:void 0,type:"number",ref:this.catchInputNumberRef,onKeyDown:this.onKeyDown})}setInitialValueType(t){this.controller.isNumberString(t)?this._initialValueType="NumberString":this._initialValueType="number"}render(){var t;const e={"--kolibri-input-range--input-number--width":`calc(${String(null!==(t=this.state._max)&&void 0!==t?t:1e3).length}ch + 1.5em)`};return n(r,Object.assign({key:"8d438c5dff8f05f99138e4bc8a462cb8d6ac4528"},this.getFormFieldProps()),n(c,{key:"388ed516536c78a7a71d62c16fbc4e7a9f94082a",state:this.state},n("div",{key:"beb70e9701121d84fe1350f8ed011893fffd8175",class:"kol-input-range__inputs-wrapper",style:e},n(l,Object.assign({key:"6edb48a90fc5d5495d1b4659b57a4e134ccf9c00",class:"kol-input-range__input kol-input-range__input--range"},this.getInputRangeProps())),n(l,Object.assign({key:"eb10eee938ac3e32c693804fe18c5db3aae51441",class:"kol-input-range__input kol-input-range__input--number"},this.getInputNumberProps()))),this.hasSuggestions&&n(d,{key:"d8e4bb882db04f3a8150461055327afd2606c29a",id:this.state._id,suggestions:this.state._suggestions})))}constructor(e){t(this,e),this.catchInputNumberRef=t=>{var e;t&&(this.refInputNumber=t,!this._value&&(null===(e=this.refInputNumber)||void 0===e?void 0:e.value)&&this.validateValue(parseFloat(this.refInputNumber.value)))},this.catchInputRangeRef=t=>{t&&(this.refInputRange=t)},this.onInput=t=>{const e=t.target.value,n=this.getSanitizedFloatValue(e);this.controller.onFacade.onInput(t,!0,this.remapValue(n))},this.onChange=t=>{const e=t.target.value,n=this.getSanitizedFloatValue(e),i=this.remapValue(n);this.validateValue(i),this.controller.onFacade.onChange(t,i)},this.onKeyDown=t=>{"Enter"!==t.code&&"NumpadEnter"!==t.code||s({form:this.host,ref:this.refInputNumber})},this._accessKey=void 0,this._autoComplete=void 0,this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._max=void 0,this._min=void 0,this._msg=void 0,this._name=void 0,this._on=void 0,this._shortKey=void 0,this._step=void 0,this._suggestions=void 0,this._syncValueBySelector=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_autoComplete:"off",_hideMsg:!1,_id:`id-${a()}`,_label:"",_suggestions:[]},this._initialValueType="number",this.inputHasFocus=!1,this.controller=new m(this,"range",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)}validateShortKey(t){this.controller.validateShortKey(t)}validateStep(t){this.controller.validateStep(t)}validateSuggestions(t){this.controller.validateSuggestions(t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTouched(t){this.controller.validateTouched(t)}validateValue(t){this.controller.validateValue(t),void 0!==t&&this.setInitialValueType(t)}componentWillLoad(){void 0!==this._value&&this.setInitialValueType(this._value),this._touched=!0===this._touched,this.controller.componentWillLoad()}static get delegatesFocus(){return!0}get host(){return e(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_max:["validateMax"],_min:["validateMin"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_shortKey:["validateShortKey"],_step:["validateStep"],_suggestions:["validateSuggestions"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"]}}};g.style={default:b};export{g as kol_input_range};
4
+ import{h as n,r as t,g as e}from"./index-d47f6be5.js";import{_ as i}from"./tslib.es6-1173d062.js";import{c as o}from"./clsx-09a06a12.js";import{n as a}from"./dev.utils-98923b37.js";import{p as s}from"./controller-235b6c3b.js";import{F as r}from"./getRenderStates-6c8f7e98.js";import{I as l,S as d}from"./InputStateWrapper-16c56aee.js";import{I as h,a as c}from"./controller-icon-8f0ee809.js";import{w as u}from"./index-ebe5a881.js";import{v as p}from"./suggestions-198125b7.js";import"./component-names-0657b355.js";import"./events-bad0a075.js";import"./associated.controller-4237c28d.js";import"./bootstrap-53ed580c.js";import"./i18n-45224cc3.js";import"./access-and-short-key-f743a5c4.js";import"./tooltip-align-465a8590.js";import"./align-d2572387.js";import"./hide-label-8b3a8709.js";import"./label-bf9966d0.js";import"./Alert-a96714a0.js";import"./i18n-260f0fe9.js";import"./bem-e4c3a2e6.js";import"./browser-f629a56a.js";import"./Heading-4990ec84.js";import"./InternalUnderlinedBadgeText-e15d02d5.js";import"./isArray-7a60fa7f.js";import"./Input-529b3f6c.js";import"./Icon-d694fbfe.js";import"./isObject-ffcbbb76.js";import"./icons-a9c52ed8.js";class m extends h{constructor(t,e,n){super(t,e,n),this.component=t}validateAutoComplete(t){u(this.component,"_autoComplete",(t=>"string"==typeof t&&("on"===t||"off"===t)),new Set(["on | off"]),t)}validateMax(t){this.validateNumber("_max",t)}validateMin(t){this.validateNumber("_min",t)}validateStep(t){this.validateNumber("_step",t)}validateSuggestions(t){p(this.component,t)}validateValue(t){this.validateNumber("_value",t),this.component._value=t,this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateMax(this.component._max),this.validateMin(this.component._min),this.validateStep(this.component._step),this.validateSuggestions(this.component._suggestions),this.validateValue(this.component._value)}}const f="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\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 * 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 * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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 border: none;\n margin: 0;\n padding: 0;\n width: 100%;\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 background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n font-size: rem(16);\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 }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\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 animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip__content {\n background-color: #fff;\n color: #000;\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\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 place-items: center;\n display: flex;\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(1rem / var(--kolibri-root-font-size, 16));\n }\n}\n@layer kol-component {\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}\n@layer kol-component {\n .kol-input-container {\n align-items: center;\n background-color: white;\n display: grid;\n grid-template-columns: 1fr;\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n width: 100%;\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}\n@layer kol-component {\n .kol-input {\n min-width: var(--a11y-min-size);\n width: 100%;\n }\n .kol-input:focus {\n outline: none;\n }\n}\n@layer kol-component {\n .kol-input-range__inputs-wrapper {\n align-items: center;\n display: flex;\n flex-direction: row;\n flex-grow: 1;\n }\n .kol-input-range__input--number {\n width: var(--kolibri-input-range--input-number--width);\n }\n .kol-input-range__input--range {\n appearance: none;\n background-color: #d3d3d3;\n border: 1px solid #000;\n display: inline-block;\n flex-grow: 1;\n height: calc(8rem / var(--kolibri-root-font-size, 16));\n line-height: 1.5;\n padding: 0;\n margin: 0;\n /* Design-Hack - related with flex-grow */\n width: 0;\n }\n .kol-input-range__input--range::-webkit-slider-thumb {\n background-color: #000;\n height: calc(20rem / var(--kolibri-root-font-size, 16));\n width: calc(20rem / var(--kolibri-root-font-size, 16));\n border-radius: 20px;\n -webkit-appearance: none;\n }\n .kol-input-range__input:not(:disabled).kol-input-range__input--range::-webkit-slider-thumb {\n cursor: pointer;\n }\n @media (prefers-contrast: more) or (forced-colors: active) {\n .kol-input-range__input--range::-webkit-slider-thumb {\n outline: 1px solid currentColor;\n }\n }\n .kol-input-range__input--range::-moz-range-thumb {\n background-color: #000;\n height: calc(20rem / var(--kolibri-root-font-size, 16));\n width: calc(20rem / var(--kolibri-root-font-size, 16));\n border-radius: 20px;\n -moz-appearance: none;\n }\n .kol-input-range__input:not(:disabled).kol-input-range__input--range::-moz-range-thumb {\n cursor: pointer;\n }\n}",b=f,g=class{async kolFocus(){var t;null===(t=this.refInputNumber)||void 0===t||t.focus()}getSanitizedFloatValue(t){const e=parseFloat(t);return this.state._max&&e>this.state._max?this.state._max:this.state._min&&e<this.state._min?this.state._min:e}remapValue(t){return"NumberString"===this._initialValueType?String(t):t}async getValue(){if(void 0!==this.refInputNumber){const t=this.refInputNumber.value,e=this.getSanitizedFloatValue(t);return this.remapValue(e)}}componentDidLoad(){var t;!this._value&&(null===(t=this.refInputRange)||void 0===t?void 0:t.value)&&this.validateValue(parseFloat(this.refInputRange.value))}getFormFieldProps(){return{state:this.state,class:o("kol-input-range","range"),tooltipAlign:this._tooltipAlign,onClick:()=>{var t;return null===(t=this.refInputRange)||void 0===t?void 0:t.focus()},alert:this.showAsAlert()}}getGenericInputProps(){const t=this.state,e=i(t,["_suggestions"]);return Object.assign(Object.assign({state:Object.assign(Object.assign({},e),{_suggestions:[]})},this.controller.onFacade),{onChange:this.onChange,onInput:this.onInput,onFocus:t=>{this.controller.onFacade.onFocus(t),this.inputHasFocus=!0},onBlur:t=>{this.controller.onFacade.onBlur(t),this.inputHasFocus=!1}})}get hasSuggestions(){return Array.isArray(this.state._suggestions)&&this.state._suggestions.length>0}getInputRangeProps(){return Object.assign(Object.assign({},this.getGenericInputProps()),{name:this.state._name?`${this.state._name}-range`:void 0,list:this.hasSuggestions?`${this.state._id}-list`:void 0,type:"range",tabIndex:-1,id:void 0,"aria-hidden":"true",ref:this.catchInputRangeRef})}getInputNumberProps(){return Object.assign(Object.assign({},this.getGenericInputProps()),{name:this.state._name?`${this.state._name}-number`:void 0,list:this.hasSuggestions?`${this.state._id}-list`:void 0,type:"number",ref:this.catchInputNumberRef,onKeyDown:this.onKeyDown})}setInitialValueType(t){this.controller.isNumberString(t)?this._initialValueType="NumberString":this._initialValueType="number"}render(){var t;const e={"--kolibri-input-range--input-number--width":`calc(${String(null!==(t=this.state._max)&&void 0!==t?t:1e3).length}ch + 1.5em)`};return n(r,Object.assign({key:"8d438c5dff8f05f99138e4bc8a462cb8d6ac4528"},this.getFormFieldProps()),n(c,{key:"388ed516536c78a7a71d62c16fbc4e7a9f94082a",state:this.state},n("div",{key:"beb70e9701121d84fe1350f8ed011893fffd8175",class:"kol-input-range__inputs-wrapper",style:e},n(l,Object.assign({key:"6edb48a90fc5d5495d1b4659b57a4e134ccf9c00",class:"kol-input-range__input kol-input-range__input--range"},this.getInputRangeProps())),n(l,Object.assign({key:"eb10eee938ac3e32c693804fe18c5db3aae51441",class:"kol-input-range__input kol-input-range__input--number"},this.getInputNumberProps()))),this.hasSuggestions&&n(d,{key:"d8e4bb882db04f3a8150461055327afd2606c29a",id:this.state._id,suggestions:this.state._suggestions})))}constructor(e){t(this,e),this.catchInputNumberRef=t=>{var e;t&&(this.refInputNumber=t,!this._value&&(null===(e=this.refInputNumber)||void 0===e?void 0:e.value)&&this.validateValue(parseFloat(this.refInputNumber.value)))},this.catchInputRangeRef=t=>{t&&(this.refInputRange=t)},this.onInput=t=>{const e=t.target.value,n=this.getSanitizedFloatValue(e);this.controller.onFacade.onInput(t,!0,this.remapValue(n))},this.onChange=t=>{const e=t.target.value,n=this.getSanitizedFloatValue(e),i=this.remapValue(n);this.validateValue(i),this.controller.onFacade.onChange(t,i)},this.onKeyDown=t=>{"Enter"!==t.code&&"NumpadEnter"!==t.code||s({form:this.host,ref:this.refInputNumber})},this._accessKey=void 0,this._autoComplete=void 0,this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._max=void 0,this._min=void 0,this._msg=void 0,this._name=void 0,this._on=void 0,this._shortKey=void 0,this._step=void 0,this._suggestions=void 0,this._syncValueBySelector=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_autoComplete:"off",_hideMsg:!1,_id:`id-${a()}`,_label:"",_suggestions:[]},this._initialValueType="number",this.inputHasFocus=!1,this.controller=new m(this,"range",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)}validateShortKey(t){this.controller.validateShortKey(t)}validateStep(t){this.controller.validateStep(t)}validateSuggestions(t){this.controller.validateSuggestions(t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTouched(t){this.controller.validateTouched(t)}validateValue(t){this.controller.validateValue(t),void 0!==t&&this.setInitialValueType(t)}componentWillLoad(){void 0!==this._value&&this.setInitialValueType(this._value),this._touched=!0===this._touched,this.controller.componentWillLoad()}static get delegatesFocus(){return!0}get host(){return e(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_max:["validateMax"],_min:["validateMin"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_shortKey:["validateShortKey"],_step:["validateStep"],_suggestions:["validateSuggestions"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"]}}};g.style={default:b};export{g as kol_input_range};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{h as n,r as t,g as e}from"./index-2f6c3929.js";import{c as i}from"./clsx-09a06a12.js";import{l as o}from"./index-ebe5a881.js";import{n as a}from"./dev.utils-ca3cce4b.js";import{p as s}from"./controller-cf01f031.js";import{F as l}from"./getRenderStates-1a7401a2.js";import{I as r}from"./InputStateWrapper-e0c888e4.js";import{a as d}from"./controller-icon-6d59bc84.js";import{a as h}from"./controller-75622398.js";import"./component-names-553d8bfa.js";import"./events-bad0a075.js";import"./associated.controller-22684481.js";import"./bootstrap-dcdb1765.js";import"./i18n-45224cc3.js";import"./access-and-short-key-f743a5c4.js";import"./tooltip-align-465a8590.js";import"./align-d2572387.js";import"./hide-label-8b3a8709.js";import"./label-bf9966d0.js";import"./tslib.es6-1173d062.js";import"./Alert-4f2f7115.js";import"./i18n-260f0fe9.js";import"./bem-e4c3a2e6.js";import"./browser-f629a56a.js";import"./Heading-7b90eeb4.js";import"./InternalUnderlinedBadgeText-2d939629.js";import"./isArray-7a60fa7f.js";import"./Input-324f4b1d.js";import"./Icon-a2f91629.js";import"./isObject-ffcbbb76.js";import"./icons-a9c52ed8.js";import"./controller-2152c5b3.js";import"./has-counter-3fc44829.js";import"./spell-check-5559a801.js";import"./suggestions-198125b7.js";const c="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\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 * 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 * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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 border: none;\n margin: 0;\n padding: 0;\n width: 100%;\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 background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n font-size: rem(16);\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 }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\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 animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip__content {\n background-color: #fff;\n color: #000;\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\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 place-items: center;\n display: flex;\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(1rem / var(--kolibri-root-font-size, 16));\n }\n}\n@layer kol-component {\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}\n@layer kol-component {\n .kol-input-container {\n align-items: center;\n background-color: white;\n display: grid;\n grid-template-columns: 1fr;\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n width: 100%;\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}\n@layer kol-component {\n .kol-input {\n min-width: var(--a11y-min-size);\n width: 100%;\n }\n .kol-input:focus {\n outline: none;\n }\n}",p=c,u=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:i("kol-input-text",this.state._type,{"has-value":this.state._hasValue}),tooltipAlign:this._tooltipAlign,onClick:()=>{var t;return null===(t=this.inputRef)||void 0===t?void 0:t.focus()},alert:this.showAsAlert()}}getInputProps(){return Object.assign(Object.assign({ref:this.catchRef,state:this.state},this.controller.onFacade),{onBlur:this.onBlur,onChange:this.onChange,onFocus:this.onFocus,onInput:this.onInput,onKeyDown:this.onKeyDown})}render(){return n(l,Object.assign({key:"07428ffab7472429381e21d4826f6fc3a7e462ba"},this.getFormFieldProps()),n(d,{key:"283eb7cf54bef34c361c946aabedfb3f875f6898",state:this.state},n(r,Object.assign({key:"1691927cde0c7b08bf7c82628a91ec36beb9e776"},this.getInputProps()))))}constructor(e){t(this,e),this.catchRef=t=>{this.inputRef=t},this.onBlur=t=>{this.controller.onFacade.onBlur(t),this.inputHasFocus=!1},this.onChange=t=>{var e;const n=null===(e=this.inputRef)||void 0===e?void 0:e.value;this.oldValue!==n&&(this.oldValue=n),this.controller.onFacade.onChange(t)},this.onFocus=t=>{this.controller.onFacade.onFocus(t),this.inputHasFocus=!0},this.onInput=t=>{var e,n;const i=null!==(n=null===(e=this.inputRef)||void 0===e?void 0:e.value)&&void 0!==n?n:"";o(this,"_currentLength",i.length),this._value=i,this.controller.onFacade.onInput(t)},this.onKeyDown=t=>{"Enter"!==t.code&&"NumpadEnter"!==t.code||s({form:this.host,ref:this.inputRef})},this._accessKey=void 0,this._autoComplete=void 0,this._disabled=!1,this._hasCounter=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._maxLength=void 0,this._msg=void 0,this._name=void 0,this._on=void 0,this._pattern=void 0,this._placeholder=void 0,this._readOnly=!1,this._required=!1,this._shortKey=void 0,this._spellCheck=void 0,this._suggestions=void 0,this._smartButton=void 0,this._syncValueBySelector=void 0,this._tooltipAlign="top",this._touched=!1,this._type="text",this._value=void 0,this.state={_autoComplete:"off",_currentLength:0,_hasValue:!1,_hideMsg:!1,_id:`id-${a()}`,_label:"",_suggestions:[],_type:"text"},this.inputHasFocus=!1,this.controller=new h(this,"text",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)}validateHasCounter(t){this.controller.validateHasCounter(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)}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)}validateSpellCheck(t){this.controller.validateSpellCheck(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)}validateType(t){this.controller.validateType(t)}validateValue(t){this.controller.validateValue(t),this.oldValue=t}componentWillLoad(){this._touched=!0===this._touched,this.oldValue=this._value,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener((t=>this.state._hasValue=!!t))}static get delegatesFocus(){return!0}get host(){return e(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_hasCounter:["validateHasCounter"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_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"],_spellCheck:["validateSpellCheck"],_suggestions:["validateSuggestions"],_smartButton:["validateSmartButton"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_type:["validateType"],_value:["validateValue"]}}};u.style={default:p};export{u as kol_input_text};
4
+ import{h as n,r as t,g as e}from"./index-d47f6be5.js";import{c as i}from"./clsx-09a06a12.js";import{l as o}from"./index-ebe5a881.js";import{n as a}from"./dev.utils-98923b37.js";import{p as s}from"./controller-235b6c3b.js";import{F as l}from"./getRenderStates-6c8f7e98.js";import{I as r}from"./InputStateWrapper-16c56aee.js";import{a as d}from"./controller-icon-8f0ee809.js";import{a as h}from"./controller-2a5d8667.js";import"./component-names-0657b355.js";import"./events-bad0a075.js";import"./associated.controller-4237c28d.js";import"./bootstrap-53ed580c.js";import"./i18n-45224cc3.js";import"./access-and-short-key-f743a5c4.js";import"./tooltip-align-465a8590.js";import"./align-d2572387.js";import"./hide-label-8b3a8709.js";import"./label-bf9966d0.js";import"./tslib.es6-1173d062.js";import"./Alert-a96714a0.js";import"./i18n-260f0fe9.js";import"./bem-e4c3a2e6.js";import"./browser-f629a56a.js";import"./Heading-4990ec84.js";import"./InternalUnderlinedBadgeText-e15d02d5.js";import"./isArray-7a60fa7f.js";import"./Input-529b3f6c.js";import"./Icon-d694fbfe.js";import"./isObject-ffcbbb76.js";import"./icons-a9c52ed8.js";import"./controller-6253c3cd.js";import"./has-counter-3fc44829.js";import"./spell-check-5559a801.js";import"./suggestions-198125b7.js";const c="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\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 * 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 * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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 border: none;\n margin: 0;\n padding: 0;\n width: 100%;\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 background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n font-size: rem(16);\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 }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\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 animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip__content {\n background-color: #fff;\n color: #000;\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\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 place-items: center;\n display: flex;\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(1rem / var(--kolibri-root-font-size, 16));\n }\n}\n@layer kol-component {\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}\n@layer kol-component {\n .kol-input-container {\n align-items: center;\n background-color: white;\n display: grid;\n grid-template-columns: 1fr;\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n width: 100%;\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}\n@layer kol-component {\n .kol-input {\n min-width: var(--a11y-min-size);\n width: 100%;\n }\n .kol-input:focus {\n outline: none;\n }\n}",p=c,u=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:i("kol-input-text",this.state._type,{"has-value":this.state._hasValue}),tooltipAlign:this._tooltipAlign,onClick:()=>{var t;return null===(t=this.inputRef)||void 0===t?void 0:t.focus()},alert:this.showAsAlert()}}getInputProps(){return Object.assign(Object.assign({ref:this.catchRef,state:this.state},this.controller.onFacade),{onBlur:this.onBlur,onChange:this.onChange,onFocus:this.onFocus,onInput:this.onInput,onKeyDown:this.onKeyDown})}render(){return n(l,Object.assign({key:"07428ffab7472429381e21d4826f6fc3a7e462ba"},this.getFormFieldProps()),n(d,{key:"283eb7cf54bef34c361c946aabedfb3f875f6898",state:this.state},n(r,Object.assign({key:"1691927cde0c7b08bf7c82628a91ec36beb9e776"},this.getInputProps()))))}constructor(e){t(this,e),this.catchRef=t=>{this.inputRef=t},this.onBlur=t=>{this.controller.onFacade.onBlur(t),this.inputHasFocus=!1},this.onChange=t=>{var e;const n=null===(e=this.inputRef)||void 0===e?void 0:e.value;this.oldValue!==n&&(this.oldValue=n),this.controller.onFacade.onChange(t)},this.onFocus=t=>{this.controller.onFacade.onFocus(t),this.inputHasFocus=!0},this.onInput=t=>{var e,n;const i=null!==(n=null===(e=this.inputRef)||void 0===e?void 0:e.value)&&void 0!==n?n:"";o(this,"_currentLength",i.length),this._value=i,this.controller.onFacade.onInput(t)},this.onKeyDown=t=>{"Enter"!==t.code&&"NumpadEnter"!==t.code||s({form:this.host,ref:this.inputRef})},this._accessKey=void 0,this._autoComplete=void 0,this._disabled=!1,this._hasCounter=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._maxLength=void 0,this._msg=void 0,this._name=void 0,this._on=void 0,this._pattern=void 0,this._placeholder=void 0,this._readOnly=!1,this._required=!1,this._shortKey=void 0,this._spellCheck=void 0,this._suggestions=void 0,this._smartButton=void 0,this._syncValueBySelector=void 0,this._tooltipAlign="top",this._touched=!1,this._type="text",this._value=void 0,this.state={_autoComplete:"off",_currentLength:0,_hasValue:!1,_hideMsg:!1,_id:`id-${a()}`,_label:"",_suggestions:[],_type:"text"},this.inputHasFocus=!1,this.controller=new h(this,"text",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)}validateHasCounter(t){this.controller.validateHasCounter(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)}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)}validateSpellCheck(t){this.controller.validateSpellCheck(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)}validateType(t){this.controller.validateType(t)}validateValue(t){this.controller.validateValue(t),this.oldValue=t}componentWillLoad(){this._touched=!0===this._touched,this.oldValue=this._value,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener((t=>this.state._hasValue=!!t))}static get delegatesFocus(){return!0}get host(){return e(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_hasCounter:["validateHasCounter"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_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"],_spellCheck:["validateSpellCheck"],_suggestions:["validateSuggestions"],_smartButton:["validateSmartButton"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_type:["validateType"],_value:["validateValue"]}}};u.style={default:p};export{u as kol_input_text};