@public-ui/components 2.2.16-rc.0 → 2.2.16-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 (271) hide show
  1. package/custom-elements.json +1 -1
  2. package/dist/cjs/{Alert-a366cff6.js → Alert-32a5cc5e.js} +1 -1
  3. package/dist/cjs/{Alert-a366cff6.js.map → Alert-32a5cc5e.js.map} +1 -1
  4. package/dist/cjs/{Collapsible-c1fffcc6.js → Collapsible-c9efc75a.js} +1 -1
  5. package/dist/cjs/{Collapsible-c1fffcc6.js.map → Collapsible-c9efc75a.js.map} +1 -1
  6. package/dist/cjs/{FormFieldMsg-4b472b6d.js → FormFieldMsg-4a4c8878.js} +1 -1
  7. package/dist/cjs/{FormFieldMsg-4b472b6d.js.map → FormFieldMsg-4a4c8878.js.map} +1 -1
  8. package/dist/cjs/{InternalUnderlinedBadgeText-50bb5ced.js → InternalUnderlinedBadgeText-09f44cd7.js} +1 -1
  9. package/dist/cjs/{InternalUnderlinedBadgeText-50bb5ced.js.map → InternalUnderlinedBadgeText-09f44cd7.js.map} +1 -1
  10. package/dist/cjs/{app-globals-e34048fa.js → app-globals-04bdffab.js} +1 -1
  11. package/dist/cjs/{app-globals-e34048fa.js.map → app-globals-04bdffab.js.map} +1 -1
  12. package/dist/cjs/{dev.utils-6fd01f93.js → dev.utils-2628f528.js} +1 -1
  13. package/dist/cjs/{dev.utils-6fd01f93.js.map → dev.utils-2628f528.js.map} +1 -1
  14. package/dist/cjs/{devtools-2c191a1b.js → devtools-5bf6ad87.js} +1 -1
  15. package/dist/cjs/{devtools-2c191a1b.js.map → devtools-5bf6ad87.js.map} +1 -1
  16. package/dist/cjs/{index-331862cf.js → index-c776c56b.js} +1 -1
  17. package/dist/cjs/{index-331862cf.js.map → index-c776c56b.js.map} +1 -1
  18. package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
  19. package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
  20. package/dist/cjs/kol-alert-wc.cjs.entry.js +1 -1
  21. package/dist/cjs/kol-alert.cjs.entry.js +1 -1
  22. package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
  23. package/dist/cjs/kol-avatar.cjs.entry.js +1 -1
  24. package/dist/cjs/kol-badge.cjs.entry.js +1 -1
  25. package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
  26. package/dist/cjs/kol-button-group-wc.cjs.entry.js +1 -1
  27. package/dist/cjs/kol-button-group.cjs.entry.js +1 -1
  28. package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
  29. package/dist/cjs/kol-button-wc.cjs.entry.js +1 -1
  30. package/dist/cjs/kol-button.cjs.entry.js +1 -1
  31. package/dist/cjs/kol-card.cjs.entry.js +1 -1
  32. package/dist/cjs/kol-combobox.cjs.entry.js +1 -1
  33. package/dist/cjs/kol-details.cjs.entry.js +1 -1
  34. package/dist/cjs/kol-drawer.cjs.entry.js +1 -1
  35. package/dist/cjs/kol-form.cjs.entry.js +1 -1
  36. package/dist/cjs/kol-heading-wc.cjs.entry.js +1 -1
  37. package/dist/cjs/kol-heading.cjs.entry.js +1 -1
  38. package/dist/cjs/kol-icon.cjs.entry.js +1 -1
  39. package/dist/cjs/kol-image.cjs.entry.js +1 -1
  40. package/dist/cjs/kol-indented-text-wc.cjs.entry.js +1 -1
  41. package/dist/cjs/kol-indented-text.cjs.entry.js +1 -1
  42. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  43. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  44. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  45. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  46. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  47. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  48. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  49. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  50. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  51. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  52. package/dist/cjs/kol-input.cjs.entry.js +1 -1
  53. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  54. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  55. package/dist/cjs/kol-link-group.cjs.entry.js +1 -1
  56. package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
  57. package/dist/cjs/kol-link.cjs.entry.js +1 -1
  58. package/dist/cjs/kol-logo.cjs.entry.js +1 -1
  59. package/dist/cjs/kol-modal.cjs.entry.js +1 -1
  60. package/dist/cjs/kol-nav.cjs.entry.js +1 -1
  61. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  62. package/dist/cjs/kol-popover-button.cjs.entry.js +1 -1
  63. package/dist/cjs/kol-popover-wc.cjs.entry.js +1 -1
  64. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  65. package/dist/cjs/kol-quote.cjs.entry.js +1 -1
  66. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  67. package/dist/cjs/kol-single-select.cjs.entry.js +1 -1
  68. package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
  69. package/dist/cjs/kol-span-wc.cjs.entry.js +1 -1
  70. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  71. package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
  72. package/dist/cjs/kol-symbol.cjs.entry.js +1 -1
  73. package/dist/cjs/kol-table-stateful.cjs.entry.js +1 -1
  74. package/dist/cjs/kol-table-stateless-wc.cjs.entry.js +1 -1
  75. package/dist/cjs/kol-table-stateless.cjs.entry.js +1 -1
  76. package/dist/cjs/kol-table.cjs.entry.js +1 -1
  77. package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
  78. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  79. package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
  80. package/dist/cjs/kol-toolbar.cjs.entry.js +1 -1
  81. package/dist/cjs/kol-tooltip-wc.cjs.entry.js +1 -1
  82. package/dist/cjs/kol-tree-item-wc.cjs.entry.js +1 -1
  83. package/dist/cjs/kol-tree-item.cjs.entry.js +1 -1
  84. package/dist/cjs/kol-tree-wc.cjs.entry.js +1 -1
  85. package/dist/cjs/kol-tree.cjs.entry.js +1 -1
  86. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  87. package/dist/cjs/kolibri.cjs.js +1 -1
  88. package/dist/cjs/loader.cjs.js +1 -1
  89. package/dist/cjs/test-component.cjs.entry.js +1 -1
  90. package/dist/esm/Alert-9a37a638.js +4 -0
  91. package/dist/esm/{Alert-981ed837.js.map → Alert-9a37a638.js.map} +1 -1
  92. package/dist/esm/{Collapsible-9f1aef6a.js → Collapsible-29766e0c.js} +1 -1
  93. package/dist/esm/{Collapsible-9f1aef6a.js.map → Collapsible-29766e0c.js.map} +1 -1
  94. package/dist/esm/{FormFieldMsg-0da7f228.js → FormFieldMsg-1c17f4ff.js} +1 -1
  95. package/dist/esm/{FormFieldMsg-0da7f228.js.map → FormFieldMsg-1c17f4ff.js.map} +1 -1
  96. package/dist/esm/InternalUnderlinedBadgeText-40aac46d.js +4 -0
  97. package/dist/esm/{InternalUnderlinedBadgeText-c9ba3be5.js.map → InternalUnderlinedBadgeText-40aac46d.js.map} +1 -1
  98. package/dist/esm/{app-globals-c22a6993.js → app-globals-09d02b04.js} +1 -1
  99. package/dist/esm/{app-globals-c22a6993.js.map → app-globals-09d02b04.js.map} +1 -1
  100. package/dist/esm/{dev.utils-73ce9898.js → dev.utils-da85e627.js} +1 -1
  101. package/dist/esm/{dev.utils-73ce9898.js.map → dev.utils-da85e627.js.map} +1 -1
  102. package/dist/esm/{devtools-7368c640.js → devtools-0d36070b.js} +1 -1
  103. package/dist/esm/{devtools-7368c640.js.map → devtools-0d36070b.js.map} +1 -1
  104. package/dist/esm/{index-8a68d70d.js → index-e850ccc2.js} +1 -1
  105. package/dist/esm/{index-8a68d70d.js.map → index-e850ccc2.js.map} +1 -1
  106. package/dist/esm/kol-abbr.entry.js +1 -1
  107. package/dist/esm/kol-accordion.entry.js +1 -1
  108. package/dist/esm/kol-alert-wc.entry.js +1 -1
  109. package/dist/esm/kol-alert.entry.js +1 -1
  110. package/dist/esm/kol-avatar-wc.entry.js +1 -1
  111. package/dist/esm/kol-avatar.entry.js +1 -1
  112. package/dist/esm/kol-badge.entry.js +1 -1
  113. package/dist/esm/kol-breadcrumb.entry.js +1 -1
  114. package/dist/esm/kol-button-group-wc.entry.js +1 -1
  115. package/dist/esm/kol-button-group.entry.js +1 -1
  116. package/dist/esm/kol-button-link.entry.js +1 -1
  117. package/dist/esm/kol-button-wc.entry.js +1 -1
  118. package/dist/esm/kol-button.entry.js +1 -1
  119. package/dist/esm/kol-card.entry.js +1 -1
  120. package/dist/esm/kol-combobox.entry.js +1 -1
  121. package/dist/esm/kol-details.entry.js +1 -1
  122. package/dist/esm/kol-drawer.entry.js +1 -1
  123. package/dist/esm/kol-form.entry.js +1 -1
  124. package/dist/esm/kol-heading-wc.entry.js +1 -1
  125. package/dist/esm/kol-heading.entry.js +1 -1
  126. package/dist/esm/kol-icon.entry.js +1 -1
  127. package/dist/esm/kol-image.entry.js +1 -1
  128. package/dist/esm/kol-indented-text-wc.entry.js +1 -1
  129. package/dist/esm/kol-indented-text.entry.js +1 -1
  130. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  131. package/dist/esm/kol-input-color.entry.js +1 -1
  132. package/dist/esm/kol-input-date.entry.js +1 -1
  133. package/dist/esm/kol-input-email.entry.js +1 -1
  134. package/dist/esm/kol-input-file.entry.js +1 -1
  135. package/dist/esm/kol-input-number.entry.js +1 -1
  136. package/dist/esm/kol-input-password.entry.js +1 -1
  137. package/dist/esm/kol-input-radio.entry.js +1 -1
  138. package/dist/esm/kol-input-range.entry.js +1 -1
  139. package/dist/esm/kol-input-text.entry.js +1 -1
  140. package/dist/esm/kol-input.entry.js +1 -1
  141. package/dist/esm/kol-kolibri.entry.js +1 -1
  142. package/dist/esm/kol-link-button.entry.js +1 -1
  143. package/dist/esm/kol-link-group.entry.js +1 -1
  144. package/dist/esm/kol-link-wc.entry.js +1 -1
  145. package/dist/esm/kol-link.entry.js +1 -1
  146. package/dist/esm/kol-logo.entry.js +1 -1
  147. package/dist/esm/kol-modal.entry.js +1 -1
  148. package/dist/esm/kol-nav.entry.js +1 -1
  149. package/dist/esm/kol-pagination.entry.js +1 -1
  150. package/dist/esm/kol-popover-button.entry.js +1 -1
  151. package/dist/esm/kol-popover-wc.entry.js +1 -1
  152. package/dist/esm/kol-progress.entry.js +1 -1
  153. package/dist/esm/kol-quote.entry.js +1 -1
  154. package/dist/esm/kol-select.entry.js +1 -1
  155. package/dist/esm/kol-single-select.entry.js +1 -1
  156. package/dist/esm/kol-skip-nav.entry.js +1 -1
  157. package/dist/esm/kol-span-wc.entry.js +1 -1
  158. package/dist/esm/kol-spin.entry.js +1 -1
  159. package/dist/esm/kol-split-button.entry.js +1 -1
  160. package/dist/esm/kol-symbol.entry.js +1 -1
  161. package/dist/esm/kol-table-stateful.entry.js +1 -1
  162. package/dist/esm/kol-table-stateless-wc.entry.js +1 -1
  163. package/dist/esm/kol-table-stateless.entry.js +1 -1
  164. package/dist/esm/kol-table.entry.js +1 -1
  165. package/dist/esm/kol-tabs.entry.js +1 -1
  166. package/dist/esm/kol-textarea.entry.js +1 -1
  167. package/dist/esm/kol-toast-container.entry.js +1 -1
  168. package/dist/esm/kol-toolbar.entry.js +1 -1
  169. package/dist/esm/kol-tooltip-wc.entry.js +1 -1
  170. package/dist/esm/kol-tree-item-wc.entry.js +1 -1
  171. package/dist/esm/kol-tree-item.entry.js +1 -1
  172. package/dist/esm/kol-tree-wc.entry.js +1 -1
  173. package/dist/esm/kol-tree.entry.js +1 -1
  174. package/dist/esm/kol-version.entry.js +1 -1
  175. package/dist/esm/kolibri.js +1 -1
  176. package/dist/esm/loader.js +1 -1
  177. package/dist/esm/test-component.entry.js +1 -1
  178. package/dist/kolibri/{Alert-981ed837.js → Alert-9a37a638.js} +1 -1
  179. package/dist/kolibri/{Collapsible-9f1aef6a.js → Collapsible-29766e0c.js} +1 -1
  180. package/dist/kolibri/FormFieldMsg-1c17f4ff.js +4 -0
  181. package/dist/kolibri/InternalUnderlinedBadgeText-40aac46d.js +4 -0
  182. package/dist/kolibri/app-globals-09d02b04.js +4 -0
  183. package/dist/kolibri/{app-globals-c22a6993.js.map → app-globals-09d02b04.js.map} +1 -1
  184. package/dist/kolibri/{dev.utils-73ce9898.js → dev.utils-da85e627.js} +1 -1
  185. package/dist/kolibri/{devtools-7368c640.js → devtools-0d36070b.js} +1 -1
  186. package/dist/kolibri/{index-8a68d70d.js → index-e850ccc2.js} +1 -1
  187. package/dist/kolibri/{index-8a68d70d.js.map → index-e850ccc2.js.map} +1 -1
  188. package/dist/kolibri/kol-abbr.entry.js +1 -1
  189. package/dist/kolibri/kol-accordion.entry.js +1 -1
  190. package/dist/kolibri/kol-alert-wc.entry.js +1 -1
  191. package/dist/kolibri/kol-alert.entry.js +1 -1
  192. package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
  193. package/dist/kolibri/kol-avatar.entry.js +1 -1
  194. package/dist/kolibri/kol-badge.entry.js +1 -1
  195. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  196. package/dist/kolibri/kol-button-group-wc.entry.js +1 -1
  197. package/dist/kolibri/kol-button-group.entry.js +1 -1
  198. package/dist/kolibri/kol-button-link.entry.js +1 -1
  199. package/dist/kolibri/kol-button-wc.entry.js +1 -1
  200. package/dist/kolibri/kol-button.entry.js +1 -1
  201. package/dist/kolibri/kol-card.entry.js +1 -1
  202. package/dist/kolibri/kol-combobox.entry.js +1 -1
  203. package/dist/kolibri/kol-details.entry.js +1 -1
  204. package/dist/kolibri/kol-drawer.entry.js +1 -1
  205. package/dist/kolibri/kol-form.entry.js +1 -1
  206. package/dist/kolibri/kol-heading-wc.entry.js +1 -1
  207. package/dist/kolibri/kol-heading.entry.js +1 -1
  208. package/dist/kolibri/kol-icon.entry.js +1 -1
  209. package/dist/kolibri/kol-image.entry.js +1 -1
  210. package/dist/kolibri/kol-indented-text-wc.entry.js +1 -1
  211. package/dist/kolibri/kol-indented-text.entry.js +1 -1
  212. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  213. package/dist/kolibri/kol-input-color.entry.js +1 -1
  214. package/dist/kolibri/kol-input-date.entry.js +1 -1
  215. package/dist/kolibri/kol-input-email.entry.js +1 -1
  216. package/dist/kolibri/kol-input-file.entry.js +1 -1
  217. package/dist/kolibri/kol-input-number.entry.js +1 -1
  218. package/dist/kolibri/kol-input-password.entry.js +1 -1
  219. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  220. package/dist/kolibri/kol-input-range.entry.js +1 -1
  221. package/dist/kolibri/kol-input-text.entry.js +1 -1
  222. package/dist/kolibri/kol-input.entry.js +1 -1
  223. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  224. package/dist/kolibri/kol-link-button.entry.js +1 -1
  225. package/dist/kolibri/kol-link-group.entry.js +1 -1
  226. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  227. package/dist/kolibri/kol-link.entry.js +1 -1
  228. package/dist/kolibri/kol-logo.entry.js +1 -1
  229. package/dist/kolibri/kol-modal.entry.js +1 -1
  230. package/dist/kolibri/kol-nav.entry.js +1 -1
  231. package/dist/kolibri/kol-pagination.entry.js +1 -1
  232. package/dist/kolibri/kol-popover-button.entry.js +1 -1
  233. package/dist/kolibri/kol-popover-wc.entry.js +1 -1
  234. package/dist/kolibri/kol-progress.entry.js +1 -1
  235. package/dist/kolibri/kol-quote.entry.js +1 -1
  236. package/dist/kolibri/kol-select.entry.js +1 -1
  237. package/dist/kolibri/kol-single-select.entry.js +1 -1
  238. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  239. package/dist/kolibri/kol-skip-nav.entry.js.map +1 -1
  240. package/dist/kolibri/kol-span-wc.entry.js +1 -1
  241. package/dist/kolibri/kol-spin.entry.js +1 -1
  242. package/dist/kolibri/kol-split-button.entry.js +1 -1
  243. package/dist/kolibri/kol-symbol.entry.js +1 -1
  244. package/dist/kolibri/kol-table-stateful.entry.js +1 -1
  245. package/dist/kolibri/kol-table-stateless-wc.entry.js +1 -1
  246. package/dist/kolibri/kol-table-stateless.entry.js +1 -1
  247. package/dist/kolibri/kol-table.entry.js +1 -1
  248. package/dist/kolibri/kol-tabs.entry.js +1 -1
  249. package/dist/kolibri/kol-textarea.entry.js +1 -1
  250. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  251. package/dist/kolibri/kol-toolbar.entry.js +1 -1
  252. package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
  253. package/dist/kolibri/kol-tree-item-wc.entry.js +1 -1
  254. package/dist/kolibri/kol-tree-item.entry.js +1 -1
  255. package/dist/kolibri/kol-tree-wc.entry.js +1 -1
  256. package/dist/kolibri/kol-tree.entry.js +1 -1
  257. package/dist/kolibri/kol-version.entry.js +1 -1
  258. package/dist/kolibri/kolibri.esm.js +1 -1
  259. package/dist/kolibri/test-component.entry.js +1 -1
  260. package/package.json +1 -1
  261. package/dist/esm/Alert-981ed837.js +0 -4
  262. package/dist/esm/InternalUnderlinedBadgeText-c9ba3be5.js +0 -4
  263. package/dist/kolibri/FormFieldMsg-0da7f228.js +0 -4
  264. package/dist/kolibri/InternalUnderlinedBadgeText-c9ba3be5.js +0 -4
  265. package/dist/kolibri/app-globals-c22a6993.js +0 -4
  266. /package/dist/kolibri/{Alert-981ed837.js.map → Alert-9a37a638.js.map} +0 -0
  267. /package/dist/kolibri/{Collapsible-9f1aef6a.js.map → Collapsible-29766e0c.js.map} +0 -0
  268. /package/dist/kolibri/{FormFieldMsg-0da7f228.js.map → FormFieldMsg-1c17f4ff.js.map} +0 -0
  269. /package/dist/kolibri/{InternalUnderlinedBadgeText-c9ba3be5.js.map → InternalUnderlinedBadgeText-40aac46d.js.map} +0 -0
  270. /package/dist/kolibri/{dev.utils-73ce9898.js.map → dev.utils-da85e627.js.map} +0 -0
  271. /package/dist/kolibri/{devtools-7368c640.js.map → devtools-0d36070b.js.map} +0 -0
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as registerInstance,h,H as Host}from"./index-8a68d70d.js";import{k as KolIndentedTextWcTag}from"./component-names-4cb1c62b.js";const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n color: black;\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 /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%; /* 100% needed for custom width from outside */\n margin: 0;\n padding: 0;\n border: none;\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}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n :host > div {\n padding-left: 0.5em;\n border-left-style: solid;\n }\n}",KolIndentedTextDefaultStyle0=defaultStyleCss,KolIndentedText=class{constructor(n){registerInstance(this,n)}render(){return h(Host,{key:"a0365bb15e5fe94f7daebb1decba3624e1837bf5",class:"kol-indented-text"},h(KolIndentedTextWcTag,{key:"f6767e315045f11786e3380e0b3fbec05b6a616e"},h("slot",{key:"089cf599da9538a390d89fa101518644f44c56eb"})))}};KolIndentedText.style={default:KolIndentedTextDefaultStyle0};export{KolIndentedText as kol_indented_text};
4
+ import{r as registerInstance,h,H as Host}from"./index-e850ccc2.js";import{k as KolIndentedTextWcTag}from"./component-names-4cb1c62b.js";const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n color: black;\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 /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%; /* 100% needed for custom width from outside */\n margin: 0;\n padding: 0;\n border: none;\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}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n :host > div {\n padding-left: 0.5em;\n border-left-style: solid;\n }\n}",KolIndentedTextDefaultStyle0=defaultStyleCss,KolIndentedText=class{constructor(n){registerInstance(this,n)}render(){return h(Host,{key:"a0365bb15e5fe94f7daebb1decba3624e1837bf5",class:"kol-indented-text"},h(KolIndentedTextWcTag,{key:"f6767e315045f11786e3380e0b3fbec05b6a616e"},h("slot",{key:"089cf599da9538a390d89fa101518644f44c56eb"})))}};KolIndentedText.style={default:KolIndentedTextDefaultStyle0};export{KolIndentedText as kol_indented_text};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{h,F as Fragment,H as Host,r as registerInstance,g as getElement}from"./index-8a68d70d.js";import{j as watchBoolean,w as watchValidator,z as isString,m as setState,A as buildBadgeTextString,B as showExpertSlot}from"./index-7a63e9eb.js";import{n as nonce}from"./dev.utils-73ce9898.js";import{t as tryToDispatchKoliBriEvent}from"./events-29e84d75.js";import{g as getRenderStates}from"./controller-c87b8bd9.js";import{I as InternalUnderlinedBadgeText}from"./InternalUnderlinedBadgeText-c9ba3be5.js";import{I as InputCheckboxRadioController}from"./controller-06c08e87.js";import{p as propagateSubmitEventToForm}from"./controller-728fbdd1.js";import{l as KolInputTag,g as KolIconTag}from"./component-names-4cb1c62b.js";import"./associated.controller-d302adf7.js";import"./access-and-short-key-914780a7.js";import"./hide-label-0d754c8e.js";import"./label-7d1ce375.js";import"./tooltip-align-6964dd71.js";import"./align-f3101425.js";const inputCheckboxVariantOptions=["button","default","switch"],validateChecked=(e,t)=>{watchBoolean(e,"_checked",t)},validateIndeterminate=(e,t)=>{watchBoolean(e,"_indeterminate",t)},labelAlignPropTypeOptions=["left","right"],validateLabelAlign=(e,t)=>{watchValidator(e,"_labelAlign",e=>"string"==typeof e&&labelAlignPropTypeOptions.includes(e),new Set([`KoliBriLabelAlign {${labelAlignPropTypeOptions.join(", ")}`]),t)};class InputCheckboxController extends InputCheckboxRadioController{constructor(e,t,n){super(e,t,n),this.setFormAssociatedCheckboxValue=e=>{this.component._checked?this.setFormAssociatedValue(e):this.setFormAssociatedValue(null)},this.component=e}validateChecked(e){validateChecked(this.component,e),this.setFormAssociatedCheckboxValue(this.component.state._value)}validateIcons(e){watchValidator(this.component,"_icons",e=>"object"==typeof e&&null!==e&&(isString(e.checked,1)||isString(e.indeterminate,1)||isString(e.unchecked,1)),new Set(["InputCheckboxIcons"]),e,{hooks:{beforePatch:(e,t,n)=>{t.set("_icons",Object.assign(Object.assign({},n.state._icons),e))}}})}validateIndeterminate(e){validateIndeterminate(this.component,e)}validateLabelAlign(e){validateLabelAlign(this.component,e)}validateValue(e){setState(this.component,"_value",e),this.setFormAssociatedCheckboxValue(this.component.state._value)}validateVariant(e){watchValidator(this.component,"_variant",e=>"string"==typeof e&&inputCheckboxVariantOptions.includes(e),new Set([`String {${inputCheckboxVariantOptions.join(", ")}`]),e)}componentWillLoad(){super.componentWillLoad(),this.validateChecked(this.component._checked),this.validateIcons(this.component._icons),this.validateIndeterminate(this.component._indeterminate),this.validateValue(this.component._value),this.validateVariant(this.component._variant),this.validateLabelAlign(this.component._labelAlign)}}const defaultStyleCss='@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-tooltip-wc {\n display: contents;\n contain: layout;\n }\n .kol-tooltip-wc .tooltip-floating {\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n }\n /* Shared between content and arrow */\n .kol-tooltip-wc .tooltip-area {\n color: #000;\n background-color: #fff;\n }\n .kol-tooltip-wc .tooltip-arrow {\n transform: rotate(45deg);\n position: absolute;\n z-index: 999;\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip-wc .tooltip-content {\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/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n color: black;\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 /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type=\'checkbox\'], [type=\'radio\'], [type=\'range\']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don\'t want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%; /* 100% needed for custom width from outside */\n margin: 0;\n padding: 0;\n border: none;\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}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-component {\n .required label > span::after,\n .required legend > span::after {\n content: "*";\n }\n}\n@layer kol-component {\n input,\n textarea {\n cursor: text;\n }\n input[type=checkbox],\n input[type=color],\n input[type=file],\n input[type=radio],\n input[type=range],\n label,\n option,\n select {\n cursor: pointer;\n }\n /* input[type=\'checkbox\'], */\n /* input[type=\'radio\'], */\n /* input[type=\'range\'], */\n input[type=color],\n input[type=date],\n input[type=datetime-local],\n input[type=email],\n input[type=file],\n input[type=month],\n input[type=number],\n input[type=password],\n input[type=search],\n input[type=tel],\n input[type=text],\n input[type=time],\n input[type=url],\n input[type=week],\n option,\n select,\n textarea {\n background-color: transparent;\n width: 100%;\n }\n /* needed hack for vertical alignment */\n input[type=file] {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 10) 0.5em;\n }\n /* needed hack for vertical alignment */\n select[multiple] option {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 2) 0.5em;\n }\n}\n@layer kol-component {\n label {\n cursor: pointer;\n }\n .kol-input {\n display: grid;\n align-items: center;\n justify-items: left;\n }\n .kol-input.default,\n .kol-input.switch {\n grid-template-areas: "input label";\n grid-template-columns: auto 1fr;\n }\n .kol-input.default[data-label-align=left]:not(.hide-label),\n .kol-input.switch[data-label-align=left]:not(.hide-label) {\n grid-template-areas: "label input";\n grid-template-columns: 1fr auto;\n }\n .kol-input .input {\n display: grid;\n align-items: center;\n grid-area: input;\n }\n .kol-input .input div {\n display: inline-flex;\n }\n .kol-input .input input {\n margin: 0;\n }\n .kol-input label {\n grid-area: label;\n }\n .kol-input .hint,\n .kol-input.error > .kol-alert {\n grid-column: span 2;\n }\n .kol-input .kol-alert.error {\n order: 3;\n }\n .kol-input .hint {\n order: 4;\n }\n input {\n border-style: solid;\n border-width: 2px;\n line-height: 1.5;\n }\n input[type=checkbox] {\n background-color: #fff;\n appearance: none;\n cursor: pointer;\n transition: 0.5s;\n }\n input[type=checkbox]:before {\n content: "";\n cursor: pointer;\n }\n input[type=checkbox]:disabled:before {\n cursor: not-allowed;\n }\n .kol-input.required .tooltip-content .span-label::after {\n content: "*";\n }\n}\n@layer kol-component {\n .button {\n display: grid;\n grid-template-areas: "error error" "input label" "hint hint";\n grid-template-columns: var(--a11y-min-size) auto;\n }\n .button[data-label-align=left]:not(.hide-label) {\n grid-template-areas: "error error" "label input" "hint hint";\n grid-template-columns: auto var(--a11y-min-size);\n }\n .button:focus-within {\n outline-color: black;\n outline-style: solid;\n /* override global `[tabindex]:focus` style */\n cursor: inherit;\n }\n .button > .error {\n grid-area: error;\n }\n .button > label {\n grid-area: label;\n }\n .button > .input {\n grid-area: input;\n }\n .button > .hint {\n grid-area: hint;\n }\n .button .icon {\n display: flex;\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n align-items: center;\n justify-content: center;\n }\n}\n@layer kol-component {\n .default .checkbox-container {\n display: flex;\n position: relative;\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n align-items: center;\n justify-content: center;\n }\n .default .icon {\n display: block;\n position: absolute;\n inset: auto;\n z-index: 1;\n }\n .default:not(.checked, .indeterminate) .icon::part(icon) {\n display: none;\n }\n .default .checkbox-input-element {\n width: calc(22rem / var(--kolibri-root-font-size, 16));\n height: calc(22rem / var(--kolibri-root-font-size, 16));\n }\n}\n@layer kol-component {\n .switch .input {\n position: relative;\n }\n .switch input[type=checkbox] {\n display: inline-block;\n position: relative;\n width: 3.2em;\n min-width: 3.2em;\n height: 1.7em;\n }\n .switch input[type=checkbox]::before {\n background-color: #000;\n position: absolute;\n top: calc(0.25em - (2rem / var(--kolibri-root-font-size, 16)));\n left: calc(0.25em - (2rem / var(--kolibri-root-font-size, 16)));\n width: 1.2em;\n height: 1.2em;\n transition: 0.5s;\n }\n .switch input[type=checkbox]:checked::before {\n transform: translateX(1.5em);\n }\n .switch input[type=checkbox]:indeterminate::before {\n transform: translateX(0.75em);\n }\n .switch .icon {\n transform: translate(0, -50%);\n color: #000;\n display: flex;\n position: absolute;\n top: 50%;\n left: calc(4rem / var(--kolibri-root-font-size, 16));\n z-index: 1;\n width: 1.2em;\n height: 1.2em;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n transition: 0.5s;\n }\n .switch.checked .icon {\n transform: translate(1.5em, -50%);\n }\n .switch.indeterminate .icon {\n transform: translate(0.75em, -50%);\n }\n}\n@layer kol-component {\n .kol-alert-wc {\n display: grid;\n }\n .kol-alert-wc .heading {\n display: flex;\n place-items: center;\n }\n .kol-alert-wc .heading > div {\n flex-grow: 1;\n }\n .close {\n /* Visible with forced colors */\n outline: transparent solid calc(1rem / var(--kolibri-root-font-size, 16));\n }\n}',KolInputCheckboxDefaultStyle0=defaultStyleCss,KolInputCheckbox=class{getModelValue(){return this._checked?this.state._value:null}async getValue(){return this.getModelValue()}async focus(){await this.kolFocus()}async kolFocus(){var e;null===(e=this.inputRef)||void 0===e||e.focus()}render(){const{ariaDescribedBy:e}=getRenderStates(this.state),t=showExpertSlot(this.state._label);return h(Host,{key:"9a465a030dc9bb39c496b2a66743ba42bc2079a0",class:"kol-input-checkbox"},h(KolInputTag,{key:"746ec593e6f1acb35bcb4ad475a646d010413827",class:{checkbox:!0,[this.state._variant]:!0,"hide-label":!!this.state._hideLabel,checked:this.state._checked,indeterminate:this.state._indeterminate},"data-label-align":this.state._labelAlign||"right","data-role":"button"===this.state._variant?"button":void 0,_accessKey:this.state._accessKey,_alert:this.showAsAlert(),_disabled:this.state._disabled,_msg:this.state._msg,_hideError:this.state._hideError,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_id:this.state._id,_label:this.state._label,_required:this.state._required,_shortKey:this.state._shortKey,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched},h("span",{key:"bbe43013b8f71788d12b4e8c1505dd5b086748a9",slot:"label"},t?h("slot",{name:"expert"}):"string"==typeof this.state._accessKey||"string"==typeof this.state._shortKey?h(Fragment,null,h(InternalUnderlinedBadgeText,{badgeText:buildBadgeTextString(this.state._accessKey,this.state._shortKey),label:this.state._label})," ",h("kbd",{class:"badge-text-hint","aria-hidden":"true"},buildBadgeTextString(this.state._accessKey||this.state._shortKey))):h("span",null,this.state._label)),h("label",{key:"9cd520c111970d4f0ac428d26e5a30f50cd9d269",slot:"input",class:"checkbox-container"},h(KolIconTag,{key:"1d799224fe7de743f2905a1442dd872d72098338",class:"icon",_icons:this.state._indeterminate?this.state._icons.indeterminate:this.state._checked?this.state._icons.checked:this.state._icons.unchecked,_label:""}),h("input",Object.assign({key:"34244306b752fdbc33d2d0ace377a5d0492f5991",class:"checkbox-input-element"+("button"===this.state._variant?" visually-hidden":""),ref:this.catchRef,title:"",accessKey:this.state._accessKey,"aria-describedby":e.length>0?e.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,checked:this.state._checked,disabled:this.state._disabled,id:this.state._id,indeterminate:this.state._indeterminate,name:this.state._name,required:this.state._required,tabIndex:this.state._tabIndex,type:"checkbox"},this.controller.onFacade,{onInput:this.onInput,onChange:this.onChange,onKeyDown:this.onKeyDown.bind(this),onFocus:e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},onBlur:e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1},onClick:void 0})))))}constructor(e){registerInstance(this,e),this.catchRef=e=>{this.inputRef=e},this.onInput=e=>{var t;this._checked=!this._checked,this._indeterminate=!1;const n=this.getModelValue();tryToDispatchKoliBriEvent("input",this.host,n),"function"==typeof(null===(t=this._on)||void 0===t?void 0:t.onInput)&&this._on.onInput(e,n)},this.onChange=e=>{var t;const n=this.getModelValue();tryToDispatchKoliBriEvent("change",this.host,n),this.controller.setFormAssociatedCheckboxValue(n),"function"==typeof(null===(t=this._on)||void 0===t?void 0:t.onChange)&&this._on.onChange(e,n)},this.onKeyDown=e=>{"Enter"!==e.code&&"NumpadEnter"!==e.code||propagateSubmitEventToForm({form:this.host,ref:this.inputRef})},this._accessKey=void 0,this._alert=void 0,this._checked=!1,this._hideError=!1,this._disabled=!1,this._error=void 0,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._indeterminate=void 0,this._label=void 0,this._labelAlign="right",this._msg=void 0,this._name=void 0,this._on=void 0,this._required=!1,this._shortKey=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=!0,this._variant="default",this.state={_checked:!1,_hideError:!1,_icons:{checked:"codicon codicon-check",indeterminate:"codicon codicon-remove",unchecked:"codicon codicon-close"},_id:`id-${nonce()}`,_indeterminate:!1,_label:"",_value:!0,_variant:"default",_labelAlign:"right"},this.inputHasFocus=!1,this.controller=new InputCheckboxController(this,"checkbox",this.host)}showAsAlert(){return void 0===this.state._alert?Boolean(this.state._touched)&&!this.inputHasFocus:this.state._alert}validateAccessKey(e){this.controller.validateAccessKey(e)}validateAlert(e){this.controller.validateAlert(e)}validateChecked(e){this.controller.validateChecked(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateError(e){this.controller.validateError(e)}validateHideError(e){this.controller.validateHideError(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)}validateIndeterminate(e){this.controller.validateIndeterminate(e)}validateLabel(e){this.controller.validateLabel(e)}validateLabelAlign(e){this.controller.validateLabelAlign(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validateRequired(e){this.controller.validateRequired(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTabIndex(e){this.controller.validateTabIndex(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e)}validateVariant(e){this.controller.validateVariant(e)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad()}static get delegatesFocus(){return!0}get host(){return getElement(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_alert:["validateAlert"],_checked:["validateChecked"],_disabled:["validateDisabled"],_error:["validateError"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_indeterminate:["validateIndeterminate"],_label:["validateLabel"],_labelAlign:["validateLabelAlign"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_required:["validateRequired"],_shortKey:["validateShortKey"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"],_variant:["validateVariant"]}}};KolInputCheckbox.style={default:KolInputCheckboxDefaultStyle0};export{KolInputCheckbox as kol_input_checkbox};
4
+ import{h,F as Fragment,H as Host,r as registerInstance,g as getElement}from"./index-e850ccc2.js";import{j as watchBoolean,w as watchValidator,z as isString,m as setState,A as buildBadgeTextString,B as showExpertSlot}from"./index-7a63e9eb.js";import{n as nonce}from"./dev.utils-da85e627.js";import{t as tryToDispatchKoliBriEvent}from"./events-29e84d75.js";import{g as getRenderStates}from"./controller-c87b8bd9.js";import{I as InternalUnderlinedBadgeText}from"./InternalUnderlinedBadgeText-40aac46d.js";import{I as InputCheckboxRadioController}from"./controller-06c08e87.js";import{p as propagateSubmitEventToForm}from"./controller-728fbdd1.js";import{l as KolInputTag,g as KolIconTag}from"./component-names-4cb1c62b.js";import"./associated.controller-d302adf7.js";import"./access-and-short-key-914780a7.js";import"./hide-label-0d754c8e.js";import"./label-7d1ce375.js";import"./tooltip-align-6964dd71.js";import"./align-f3101425.js";const inputCheckboxVariantOptions=["button","default","switch"],validateChecked=(e,t)=>{watchBoolean(e,"_checked",t)},validateIndeterminate=(e,t)=>{watchBoolean(e,"_indeterminate",t)},labelAlignPropTypeOptions=["left","right"],validateLabelAlign=(e,t)=>{watchValidator(e,"_labelAlign",e=>"string"==typeof e&&labelAlignPropTypeOptions.includes(e),new Set([`KoliBriLabelAlign {${labelAlignPropTypeOptions.join(", ")}`]),t)};class InputCheckboxController extends InputCheckboxRadioController{constructor(e,t,n){super(e,t,n),this.setFormAssociatedCheckboxValue=e=>{this.component._checked?this.setFormAssociatedValue(e):this.setFormAssociatedValue(null)},this.component=e}validateChecked(e){validateChecked(this.component,e),this.setFormAssociatedCheckboxValue(this.component.state._value)}validateIcons(e){watchValidator(this.component,"_icons",e=>"object"==typeof e&&null!==e&&(isString(e.checked,1)||isString(e.indeterminate,1)||isString(e.unchecked,1)),new Set(["InputCheckboxIcons"]),e,{hooks:{beforePatch:(e,t,n)=>{t.set("_icons",Object.assign(Object.assign({},n.state._icons),e))}}})}validateIndeterminate(e){validateIndeterminate(this.component,e)}validateLabelAlign(e){validateLabelAlign(this.component,e)}validateValue(e){setState(this.component,"_value",e),this.setFormAssociatedCheckboxValue(this.component.state._value)}validateVariant(e){watchValidator(this.component,"_variant",e=>"string"==typeof e&&inputCheckboxVariantOptions.includes(e),new Set([`String {${inputCheckboxVariantOptions.join(", ")}`]),e)}componentWillLoad(){super.componentWillLoad(),this.validateChecked(this.component._checked),this.validateIcons(this.component._icons),this.validateIndeterminate(this.component._indeterminate),this.validateValue(this.component._value),this.validateVariant(this.component._variant),this.validateLabelAlign(this.component._labelAlign)}}const defaultStyleCss='@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-tooltip-wc {\n display: contents;\n contain: layout;\n }\n .kol-tooltip-wc .tooltip-floating {\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n }\n /* Shared between content and arrow */\n .kol-tooltip-wc .tooltip-area {\n color: #000;\n background-color: #fff;\n }\n .kol-tooltip-wc .tooltip-arrow {\n transform: rotate(45deg);\n position: absolute;\n z-index: 999;\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip-wc .tooltip-content {\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/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n color: black;\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 /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type=\'checkbox\'], [type=\'radio\'], [type=\'range\']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don\'t want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%; /* 100% needed for custom width from outside */\n margin: 0;\n padding: 0;\n border: none;\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}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-component {\n .required label > span::after,\n .required legend > span::after {\n content: "*";\n }\n}\n@layer kol-component {\n input,\n textarea {\n cursor: text;\n }\n input[type=checkbox],\n input[type=color],\n input[type=file],\n input[type=radio],\n input[type=range],\n label,\n option,\n select {\n cursor: pointer;\n }\n /* input[type=\'checkbox\'], */\n /* input[type=\'radio\'], */\n /* input[type=\'range\'], */\n input[type=color],\n input[type=date],\n input[type=datetime-local],\n input[type=email],\n input[type=file],\n input[type=month],\n input[type=number],\n input[type=password],\n input[type=search],\n input[type=tel],\n input[type=text],\n input[type=time],\n input[type=url],\n input[type=week],\n option,\n select,\n textarea {\n background-color: transparent;\n width: 100%;\n }\n /* needed hack for vertical alignment */\n input[type=file] {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 10) 0.5em;\n }\n /* needed hack for vertical alignment */\n select[multiple] option {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 2) 0.5em;\n }\n}\n@layer kol-component {\n label {\n cursor: pointer;\n }\n .kol-input {\n display: grid;\n align-items: center;\n justify-items: left;\n }\n .kol-input.default,\n .kol-input.switch {\n grid-template-areas: "input label";\n grid-template-columns: auto 1fr;\n }\n .kol-input.default[data-label-align=left]:not(.hide-label),\n .kol-input.switch[data-label-align=left]:not(.hide-label) {\n grid-template-areas: "label input";\n grid-template-columns: 1fr auto;\n }\n .kol-input .input {\n display: grid;\n align-items: center;\n grid-area: input;\n }\n .kol-input .input div {\n display: inline-flex;\n }\n .kol-input .input input {\n margin: 0;\n }\n .kol-input label {\n grid-area: label;\n }\n .kol-input .hint,\n .kol-input.error > .kol-alert {\n grid-column: span 2;\n }\n .kol-input .kol-alert.error {\n order: 3;\n }\n .kol-input .hint {\n order: 4;\n }\n input {\n border-style: solid;\n border-width: 2px;\n line-height: 1.5;\n }\n input[type=checkbox] {\n background-color: #fff;\n appearance: none;\n cursor: pointer;\n transition: 0.5s;\n }\n input[type=checkbox]:before {\n content: "";\n cursor: pointer;\n }\n input[type=checkbox]:disabled:before {\n cursor: not-allowed;\n }\n .kol-input.required .tooltip-content .span-label::after {\n content: "*";\n }\n}\n@layer kol-component {\n .button {\n display: grid;\n grid-template-areas: "error error" "input label" "hint hint";\n grid-template-columns: var(--a11y-min-size) auto;\n }\n .button[data-label-align=left]:not(.hide-label) {\n grid-template-areas: "error error" "label input" "hint hint";\n grid-template-columns: auto var(--a11y-min-size);\n }\n .button:focus-within {\n outline-color: black;\n outline-style: solid;\n /* override global `[tabindex]:focus` style */\n cursor: inherit;\n }\n .button > .error {\n grid-area: error;\n }\n .button > label {\n grid-area: label;\n }\n .button > .input {\n grid-area: input;\n }\n .button > .hint {\n grid-area: hint;\n }\n .button .icon {\n display: flex;\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n align-items: center;\n justify-content: center;\n }\n}\n@layer kol-component {\n .default .checkbox-container {\n display: flex;\n position: relative;\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n align-items: center;\n justify-content: center;\n }\n .default .icon {\n display: block;\n position: absolute;\n inset: auto;\n z-index: 1;\n }\n .default:not(.checked, .indeterminate) .icon::part(icon) {\n display: none;\n }\n .default .checkbox-input-element {\n width: calc(22rem / var(--kolibri-root-font-size, 16));\n height: calc(22rem / var(--kolibri-root-font-size, 16));\n }\n}\n@layer kol-component {\n .switch .input {\n position: relative;\n }\n .switch input[type=checkbox] {\n display: inline-block;\n position: relative;\n width: 3.2em;\n min-width: 3.2em;\n height: 1.7em;\n }\n .switch input[type=checkbox]::before {\n background-color: #000;\n position: absolute;\n top: calc(0.25em - (2rem / var(--kolibri-root-font-size, 16)));\n left: calc(0.25em - (2rem / var(--kolibri-root-font-size, 16)));\n width: 1.2em;\n height: 1.2em;\n transition: 0.5s;\n }\n .switch input[type=checkbox]:checked::before {\n transform: translateX(1.5em);\n }\n .switch input[type=checkbox]:indeterminate::before {\n transform: translateX(0.75em);\n }\n .switch .icon {\n transform: translate(0, -50%);\n color: #000;\n display: flex;\n position: absolute;\n top: 50%;\n left: calc(4rem / var(--kolibri-root-font-size, 16));\n z-index: 1;\n width: 1.2em;\n height: 1.2em;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n transition: 0.5s;\n }\n .switch.checked .icon {\n transform: translate(1.5em, -50%);\n }\n .switch.indeterminate .icon {\n transform: translate(0.75em, -50%);\n }\n}\n@layer kol-component {\n .kol-alert-wc {\n display: grid;\n }\n .kol-alert-wc .heading {\n display: flex;\n place-items: center;\n }\n .kol-alert-wc .heading > div {\n flex-grow: 1;\n }\n .close {\n /* Visible with forced colors */\n outline: transparent solid calc(1rem / var(--kolibri-root-font-size, 16));\n }\n}',KolInputCheckboxDefaultStyle0=defaultStyleCss,KolInputCheckbox=class{getModelValue(){return this._checked?this.state._value:null}async getValue(){return this.getModelValue()}async focus(){await this.kolFocus()}async kolFocus(){var e;null===(e=this.inputRef)||void 0===e||e.focus()}render(){const{ariaDescribedBy:e}=getRenderStates(this.state),t=showExpertSlot(this.state._label);return h(Host,{key:"9a465a030dc9bb39c496b2a66743ba42bc2079a0",class:"kol-input-checkbox"},h(KolInputTag,{key:"746ec593e6f1acb35bcb4ad475a646d010413827",class:{checkbox:!0,[this.state._variant]:!0,"hide-label":!!this.state._hideLabel,checked:this.state._checked,indeterminate:this.state._indeterminate},"data-label-align":this.state._labelAlign||"right","data-role":"button"===this.state._variant?"button":void 0,_accessKey:this.state._accessKey,_alert:this.showAsAlert(),_disabled:this.state._disabled,_msg:this.state._msg,_hideError:this.state._hideError,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_id:this.state._id,_label:this.state._label,_required:this.state._required,_shortKey:this.state._shortKey,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched},h("span",{key:"bbe43013b8f71788d12b4e8c1505dd5b086748a9",slot:"label"},t?h("slot",{name:"expert"}):"string"==typeof this.state._accessKey||"string"==typeof this.state._shortKey?h(Fragment,null,h(InternalUnderlinedBadgeText,{badgeText:buildBadgeTextString(this.state._accessKey,this.state._shortKey),label:this.state._label})," ",h("kbd",{class:"badge-text-hint","aria-hidden":"true"},buildBadgeTextString(this.state._accessKey||this.state._shortKey))):h("span",null,this.state._label)),h("label",{key:"9cd520c111970d4f0ac428d26e5a30f50cd9d269",slot:"input",class:"checkbox-container"},h(KolIconTag,{key:"1d799224fe7de743f2905a1442dd872d72098338",class:"icon",_icons:this.state._indeterminate?this.state._icons.indeterminate:this.state._checked?this.state._icons.checked:this.state._icons.unchecked,_label:""}),h("input",Object.assign({key:"34244306b752fdbc33d2d0ace377a5d0492f5991",class:"checkbox-input-element"+("button"===this.state._variant?" visually-hidden":""),ref:this.catchRef,title:"",accessKey:this.state._accessKey,"aria-describedby":e.length>0?e.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,checked:this.state._checked,disabled:this.state._disabled,id:this.state._id,indeterminate:this.state._indeterminate,name:this.state._name,required:this.state._required,tabIndex:this.state._tabIndex,type:"checkbox"},this.controller.onFacade,{onInput:this.onInput,onChange:this.onChange,onKeyDown:this.onKeyDown.bind(this),onFocus:e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},onBlur:e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1},onClick:void 0})))))}constructor(e){registerInstance(this,e),this.catchRef=e=>{this.inputRef=e},this.onInput=e=>{var t;this._checked=!this._checked,this._indeterminate=!1;const n=this.getModelValue();tryToDispatchKoliBriEvent("input",this.host,n),"function"==typeof(null===(t=this._on)||void 0===t?void 0:t.onInput)&&this._on.onInput(e,n)},this.onChange=e=>{var t;const n=this.getModelValue();tryToDispatchKoliBriEvent("change",this.host,n),this.controller.setFormAssociatedCheckboxValue(n),"function"==typeof(null===(t=this._on)||void 0===t?void 0:t.onChange)&&this._on.onChange(e,n)},this.onKeyDown=e=>{"Enter"!==e.code&&"NumpadEnter"!==e.code||propagateSubmitEventToForm({form:this.host,ref:this.inputRef})},this._accessKey=void 0,this._alert=void 0,this._checked=!1,this._hideError=!1,this._disabled=!1,this._error=void 0,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._indeterminate=void 0,this._label=void 0,this._labelAlign="right",this._msg=void 0,this._name=void 0,this._on=void 0,this._required=!1,this._shortKey=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=!0,this._variant="default",this.state={_checked:!1,_hideError:!1,_icons:{checked:"codicon codicon-check",indeterminate:"codicon codicon-remove",unchecked:"codicon codicon-close"},_id:`id-${nonce()}`,_indeterminate:!1,_label:"",_value:!0,_variant:"default",_labelAlign:"right"},this.inputHasFocus=!1,this.controller=new InputCheckboxController(this,"checkbox",this.host)}showAsAlert(){return void 0===this.state._alert?Boolean(this.state._touched)&&!this.inputHasFocus:this.state._alert}validateAccessKey(e){this.controller.validateAccessKey(e)}validateAlert(e){this.controller.validateAlert(e)}validateChecked(e){this.controller.validateChecked(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateError(e){this.controller.validateError(e)}validateHideError(e){this.controller.validateHideError(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)}validateIndeterminate(e){this.controller.validateIndeterminate(e)}validateLabel(e){this.controller.validateLabel(e)}validateLabelAlign(e){this.controller.validateLabelAlign(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validateRequired(e){this.controller.validateRequired(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTabIndex(e){this.controller.validateTabIndex(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e)}validateVariant(e){this.controller.validateVariant(e)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad()}static get delegatesFocus(){return!0}get host(){return getElement(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_alert:["validateAlert"],_checked:["validateChecked"],_disabled:["validateDisabled"],_error:["validateError"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_indeterminate:["validateIndeterminate"],_label:["validateLabel"],_labelAlign:["validateLabelAlign"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_required:["validateRequired"],_shortKey:["validateShortKey"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"],_variant:["validateVariant"]}}};KolInputCheckbox.style={default:KolInputCheckboxDefaultStyle0};export{KolInputCheckbox as kol_input_checkbox};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{h,F as Fragment,H as Host,r as registerInstance,g as getElement}from"./index-8a68d70d.js";import{w as watchValidator,y as watchString,A as buildBadgeTextString,B as showExpertSlot}from"./index-7a63e9eb.js";import{l as KolInputTag}from"./component-names-4cb1c62b.js";import{n as nonce}from"./dev.utils-73ce9898.js";import{g as getRenderStates}from"./controller-c87b8bd9.js";import{I as InternalUnderlinedBadgeText}from"./InternalUnderlinedBadgeText-c9ba3be5.js";import{I as InputIconController}from"./controller-icon-b3eb5a58.js";import{v as validateSuggestions}from"./suggestions-506c439a.js";import"./events-29e84d75.js";import"./associated.controller-d302adf7.js";import"./access-and-short-key-914780a7.js";import"./hide-label-0d754c8e.js";import"./label-7d1ce375.js";import"./tooltip-align-6964dd71.js";import"./align-f3101425.js";import"./icons-adcda9b0.js";const inputTypeOnOffOptions=["on","off"];class InputColorController extends InputIconController{constructor(t,e,n){super(t,e,n),this.component=t}validateAutoComplete(t){watchValidator(this.component,"_autoComplete",t=>"string"==typeof t&&inputTypeOnOffOptions.includes(t),new Set(inputTypeOnOffOptions),t)}validateSuggestions(t){validateSuggestions(this.component,t)}validateValue(t){watchString(this.component,"_value",t),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateSuggestions(this.component._suggestions),this.validateValue(this.component._value)}}const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n color: black;\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 /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%; /* 100% needed for custom width from outside */\n margin: 0;\n padding: 0;\n border: none;\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}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-tooltip-wc {\n display: contents;\n contain: layout;\n }\n .kol-tooltip-wc .tooltip-floating {\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n }\n /* Shared between content and arrow */\n .kol-tooltip-wc .tooltip-area {\n color: #000;\n background-color: #fff;\n }\n .kol-tooltip-wc .tooltip-arrow {\n transform: rotate(45deg);\n position: absolute;\n z-index: 999;\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip-wc .tooltip-content {\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 .required label > span::after,\n .required legend > span::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n input,\n textarea {\n cursor: text;\n }\n input[type=checkbox],\n input[type=color],\n input[type=file],\n input[type=radio],\n input[type=range],\n label,\n option,\n select {\n cursor: pointer;\n }\n /* input[type='checkbox'], */\n /* input[type='radio'], */\n /* input[type='range'], */\n input[type=color],\n input[type=date],\n input[type=datetime-local],\n input[type=email],\n input[type=file],\n input[type=month],\n input[type=number],\n input[type=password],\n input[type=search],\n input[type=tel],\n input[type=text],\n input[type=time],\n input[type=url],\n input[type=week],\n option,\n select,\n textarea {\n background-color: transparent;\n width: 100%;\n }\n /* needed hack for vertical alignment */\n input[type=file] {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 10) 0.5em;\n }\n /* needed hack for vertical alignment */\n select[multiple] option {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 2) 0.5em;\n }\n}\n@layer kol-component {\n .kol-alert-wc {\n display: grid;\n }\n .kol-alert-wc .heading {\n display: flex;\n place-items: center;\n }\n .kol-alert-wc .heading > div {\n flex-grow: 1;\n }\n .close {\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-input {\n display: grid;\n }\n .kol-input .input-slot {\n flex-grow: 1;\n }\n input:focus,\n option:focus,\n select:focus,\n textarea:focus {\n outline: 0;\n }\n .input {\n background-color: white;\n display: flex;\n align-items: center;\n cursor: pointer;\n }\n button:not([role=link]) {\n min-height: auto;\n }\n .input > .kol-icon {\n display: grid;\n place-items: center;\n }\n .kol-input.required .input-tooltip .span-label::after {\n content: \"*\";\n }\n}",KolInputColorDefaultStyle0=defaultStyleCss,KolInputColor=class{async getValue(){var t;return null===(t=this.inputRef)||void 0===t?void 0:t.value}async focus(){await this.kolFocus()}async kolFocus(){var t;null===(t=this.inputRef)||void 0===t||t.focus()}render(){const{ariaDescribedBy:t}=getRenderStates(this.state),e=Array.isArray(this.state._suggestions)&&this.state._suggestions.length>0,n=showExpertSlot(this.state._label);return h(Host,{key:"eee67867decb854d8b5da3a6664367c539fa9919",class:"kol-input-color"},h(KolInputTag,{key:"0789ee68085bc6d800502f5b568c2efc030516ca",class:{color:!0,"hide-label":!!this.state._hideLabel},_accessKey:this.state._accessKey,_alert:this.showAsAlert(),_disabled:this.state._disabled,_msg:this.state._msg,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_icons:this.state._icons,_hideError:this.state._hideError,_id:this.state._id,_label:this.state._label,_shortKey:this.state._shortKey,_suggestions:this.state._suggestions,_smartButton:this.state._smartButton,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched,onClick:()=>{var t;return null===(t=this.inputRef)||void 0===t?void 0:t.focus()},role:"presentation"},h("span",{key:"869da8afdf66a6a83cdcdc63ade42e1521a44166",slot:"label"},n?h("slot",{name:"expert"}):"string"==typeof this.state._accessKey||"string"==typeof this.state._shortKey?h(Fragment,null,h(InternalUnderlinedBadgeText,{badgeText:buildBadgeTextString(this.state._accessKey,this.state._shortKey),label:this.state._label})," ",h("kbd",{class:"badge-text-hint","aria-hidden":"true"},buildBadgeTextString(this.state._accessKey,this.state._shortKey))):h("span",null,this.state._label)),h("div",{key:"765767282379bec02e2aefdb5f734f88286d8891",slot:"input"},h("input",Object.assign({key:"145ea8e1f97e8e2558d5d5cf5c5f16081bd9b364",ref:this.catchRef,title:"",accessKey:this.state._accessKey,"aria-describedby":t.length>0?t.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,autoCapitalize:"off",autoComplete:this.state._autoComplete,autoCorrect:"off",disabled:this.state._disabled,id:this.state._id,list:e?`${this.state._id}-list`:void 0,name:this.state._name,slot:"input",type:"color",value:this.state._value},this.controller.onFacade,{onFocus:t=>{this.controller.onFacade.onFocus(t),this.inputHasFocus=!0},onBlur:t=>{this.controller.onFacade.onBlur(t),this.inputHasFocus=!1}})))))}constructor(t){registerInstance(this,t),this.catchRef=t=>{this.inputRef=t},this._accessKey=void 0,this._alert=void 0,this._autoComplete=void 0,this._disabled=!1,this._error=void 0,this._hideError=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._msg=void 0,this._name=void 0,this._on=void 0,this._shortKey=void 0,this._smartButton=void 0,this._suggestions=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_autoComplete:"off",_hideError:!1,_id:`id-${nonce()}`,_label:"",_suggestions:[]},this.inputHasFocus=!1,this.controller=new InputColorController(this,"color",this.host)}showAsAlert(){return void 0===this.state._alert?Boolean(this.state._touched)&&!this.inputHasFocus:this.state._alert}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAlert(t){this.controller.validateAlert(t)}validateAutoComplete(t){this.controller.validateAutoComplete(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateError(t){this.controller.validateError(t)}validateHideError(t){this.controller.validateHideError(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateMsg(t){this.controller.validateMsg(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validateShortKey(t){this.controller.validateShortKey(t)}validateSmartButton(t){this.controller.validateSmartButton(t)}validateSuggestions(t){this.controller.validateSuggestions(t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTabIndex(t){this.controller.validateTabIndex(t)}validateTouched(t){this.controller.validateTouched(t)}validateValue(t){this.controller.validateValue(t)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad()}static get delegatesFocus(){return!0}get host(){return getElement(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_alert:["validateAlert"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_error:["validateError"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_shortKey:["validateShortKey"],_smartButton:["validateSmartButton"],_suggestions:["validateSuggestions"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}};KolInputColor.style={default:KolInputColorDefaultStyle0};export{KolInputColor as kol_input_color};
4
+ import{h,F as Fragment,H as Host,r as registerInstance,g as getElement}from"./index-e850ccc2.js";import{w as watchValidator,y as watchString,A as buildBadgeTextString,B as showExpertSlot}from"./index-7a63e9eb.js";import{l as KolInputTag}from"./component-names-4cb1c62b.js";import{n as nonce}from"./dev.utils-da85e627.js";import{g as getRenderStates}from"./controller-c87b8bd9.js";import{I as InternalUnderlinedBadgeText}from"./InternalUnderlinedBadgeText-40aac46d.js";import{I as InputIconController}from"./controller-icon-b3eb5a58.js";import{v as validateSuggestions}from"./suggestions-506c439a.js";import"./events-29e84d75.js";import"./associated.controller-d302adf7.js";import"./access-and-short-key-914780a7.js";import"./hide-label-0d754c8e.js";import"./label-7d1ce375.js";import"./tooltip-align-6964dd71.js";import"./align-f3101425.js";import"./icons-adcda9b0.js";const inputTypeOnOffOptions=["on","off"];class InputColorController extends InputIconController{constructor(t,e,n){super(t,e,n),this.component=t}validateAutoComplete(t){watchValidator(this.component,"_autoComplete",t=>"string"==typeof t&&inputTypeOnOffOptions.includes(t),new Set(inputTypeOnOffOptions),t)}validateSuggestions(t){validateSuggestions(this.component,t)}validateValue(t){watchString(this.component,"_value",t),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateSuggestions(this.component._suggestions),this.validateValue(this.component._value)}}const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n color: black;\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 /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%; /* 100% needed for custom width from outside */\n margin: 0;\n padding: 0;\n border: none;\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}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-tooltip-wc {\n display: contents;\n contain: layout;\n }\n .kol-tooltip-wc .tooltip-floating {\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n }\n /* Shared between content and arrow */\n .kol-tooltip-wc .tooltip-area {\n color: #000;\n background-color: #fff;\n }\n .kol-tooltip-wc .tooltip-arrow {\n transform: rotate(45deg);\n position: absolute;\n z-index: 999;\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip-wc .tooltip-content {\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 .required label > span::after,\n .required legend > span::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n input,\n textarea {\n cursor: text;\n }\n input[type=checkbox],\n input[type=color],\n input[type=file],\n input[type=radio],\n input[type=range],\n label,\n option,\n select {\n cursor: pointer;\n }\n /* input[type='checkbox'], */\n /* input[type='radio'], */\n /* input[type='range'], */\n input[type=color],\n input[type=date],\n input[type=datetime-local],\n input[type=email],\n input[type=file],\n input[type=month],\n input[type=number],\n input[type=password],\n input[type=search],\n input[type=tel],\n input[type=text],\n input[type=time],\n input[type=url],\n input[type=week],\n option,\n select,\n textarea {\n background-color: transparent;\n width: 100%;\n }\n /* needed hack for vertical alignment */\n input[type=file] {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 10) 0.5em;\n }\n /* needed hack for vertical alignment */\n select[multiple] option {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 2) 0.5em;\n }\n}\n@layer kol-component {\n .kol-alert-wc {\n display: grid;\n }\n .kol-alert-wc .heading {\n display: flex;\n place-items: center;\n }\n .kol-alert-wc .heading > div {\n flex-grow: 1;\n }\n .close {\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-input {\n display: grid;\n }\n .kol-input .input-slot {\n flex-grow: 1;\n }\n input:focus,\n option:focus,\n select:focus,\n textarea:focus {\n outline: 0;\n }\n .input {\n background-color: white;\n display: flex;\n align-items: center;\n cursor: pointer;\n }\n button:not([role=link]) {\n min-height: auto;\n }\n .input > .kol-icon {\n display: grid;\n place-items: center;\n }\n .kol-input.required .input-tooltip .span-label::after {\n content: \"*\";\n }\n}",KolInputColorDefaultStyle0=defaultStyleCss,KolInputColor=class{async getValue(){var t;return null===(t=this.inputRef)||void 0===t?void 0:t.value}async focus(){await this.kolFocus()}async kolFocus(){var t;null===(t=this.inputRef)||void 0===t||t.focus()}render(){const{ariaDescribedBy:t}=getRenderStates(this.state),e=Array.isArray(this.state._suggestions)&&this.state._suggestions.length>0,n=showExpertSlot(this.state._label);return h(Host,{key:"eee67867decb854d8b5da3a6664367c539fa9919",class:"kol-input-color"},h(KolInputTag,{key:"0789ee68085bc6d800502f5b568c2efc030516ca",class:{color:!0,"hide-label":!!this.state._hideLabel},_accessKey:this.state._accessKey,_alert:this.showAsAlert(),_disabled:this.state._disabled,_msg:this.state._msg,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_icons:this.state._icons,_hideError:this.state._hideError,_id:this.state._id,_label:this.state._label,_shortKey:this.state._shortKey,_suggestions:this.state._suggestions,_smartButton:this.state._smartButton,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched,onClick:()=>{var t;return null===(t=this.inputRef)||void 0===t?void 0:t.focus()},role:"presentation"},h("span",{key:"869da8afdf66a6a83cdcdc63ade42e1521a44166",slot:"label"},n?h("slot",{name:"expert"}):"string"==typeof this.state._accessKey||"string"==typeof this.state._shortKey?h(Fragment,null,h(InternalUnderlinedBadgeText,{badgeText:buildBadgeTextString(this.state._accessKey,this.state._shortKey),label:this.state._label})," ",h("kbd",{class:"badge-text-hint","aria-hidden":"true"},buildBadgeTextString(this.state._accessKey,this.state._shortKey))):h("span",null,this.state._label)),h("div",{key:"765767282379bec02e2aefdb5f734f88286d8891",slot:"input"},h("input",Object.assign({key:"145ea8e1f97e8e2558d5d5cf5c5f16081bd9b364",ref:this.catchRef,title:"",accessKey:this.state._accessKey,"aria-describedby":t.length>0?t.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,autoCapitalize:"off",autoComplete:this.state._autoComplete,autoCorrect:"off",disabled:this.state._disabled,id:this.state._id,list:e?`${this.state._id}-list`:void 0,name:this.state._name,slot:"input",type:"color",value:this.state._value},this.controller.onFacade,{onFocus:t=>{this.controller.onFacade.onFocus(t),this.inputHasFocus=!0},onBlur:t=>{this.controller.onFacade.onBlur(t),this.inputHasFocus=!1}})))))}constructor(t){registerInstance(this,t),this.catchRef=t=>{this.inputRef=t},this._accessKey=void 0,this._alert=void 0,this._autoComplete=void 0,this._disabled=!1,this._error=void 0,this._hideError=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._msg=void 0,this._name=void 0,this._on=void 0,this._shortKey=void 0,this._smartButton=void 0,this._suggestions=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_autoComplete:"off",_hideError:!1,_id:`id-${nonce()}`,_label:"",_suggestions:[]},this.inputHasFocus=!1,this.controller=new InputColorController(this,"color",this.host)}showAsAlert(){return void 0===this.state._alert?Boolean(this.state._touched)&&!this.inputHasFocus:this.state._alert}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAlert(t){this.controller.validateAlert(t)}validateAutoComplete(t){this.controller.validateAutoComplete(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateError(t){this.controller.validateError(t)}validateHideError(t){this.controller.validateHideError(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateMsg(t){this.controller.validateMsg(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validateShortKey(t){this.controller.validateShortKey(t)}validateSmartButton(t){this.controller.validateSmartButton(t)}validateSuggestions(t){this.controller.validateSuggestions(t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTabIndex(t){this.controller.validateTabIndex(t)}validateTouched(t){this.controller.validateTouched(t)}validateValue(t){this.controller.validateValue(t)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad()}static get delegatesFocus(){return!0}get host(){return getElement(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_alert:["validateAlert"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_error:["validateError"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_shortKey:["validateShortKey"],_smartButton:["validateSmartButton"],_suggestions:["validateSuggestions"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}};KolInputColor.style={default:KolInputColorDefaultStyle0};export{KolInputColor as kol_input_color};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{h,F as Fragment,H as Host,r as registerInstance,g as getElement}from"./index-8a68d70d.js";import{j as watchBoolean,w as watchValidator,m as setState,F as watchNumber,A as buildBadgeTextString,I as deprecatedHint,B as showExpertSlot}from"./index-7a63e9eb.js";import{l as KolInputTag}from"./component-names-4cb1c62b.js";import{n as nonce}from"./dev.utils-73ce9898.js";import{p as propagateSubmitEventToForm}from"./controller-728fbdd1.js";import{g as getRenderStates}from"./controller-c87b8bd9.js";import{I as InternalUnderlinedBadgeText}from"./InternalUnderlinedBadgeText-c9ba3be5.js";import{I as InputIconController}from"./controller-icon-b3eb5a58.js";import{v as validateSuggestions}from"./suggestions-506c439a.js";import"./events-29e84d75.js";import"./associated.controller-d302adf7.js";import"./access-and-short-key-914780a7.js";import"./hide-label-0d754c8e.js";import"./label-7d1ce375.js";import"./tooltip-align-6964dd71.js";import"./align-f3101425.js";import"./icons-adcda9b0.js";const validateReadOnly=(t,e)=>{watchBoolean(t,"_readOnly",e)},inputDateTypeOptions=["date","datetime-local","month","time","week"];class InputDateController extends InputIconController{constructor(t,e,n){super(t,e,n),this.validateIso8601=(t,e,n)=>watchValidator(this.component,t,t=>null==t||""===t||this.validateDateString(t),new Set(["Date","string{ISO-8601}"]),InputDateController.tryParseToString(e,this.component._type,this.component._step),{hooks:{afterPatch:t=>{"string"==typeof t&&n&&n(t)}}}),this.component=t}validateAutoComplete(t){watchValidator(this.component,"_autoComplete",t=>"string"==typeof t&&("on"===t||"off"===t),new Set(["on | off"]),t)}validateSuggestions(t){validateSuggestions(this.component,t)}static tryParseToString(t,e,n){if("string"==typeof t||null===t)return t;if("object"==typeof t&&t instanceof Date){const a=t.getFullYear(),i=String(t.getMonth()+1).padStart(2,"0"),o=String(t.getDate()).padStart(2,"0"),s=String(t.getHours()).padStart(2,"0"),l=String(t.getMinutes()).padStart(2,"0"),r=String(t.getSeconds()).padStart(2,"0"),d=[a,i,o].join("-"),h=[s,l,r].join(":");switch(e){case"date":return d;case"datetime-local":return`${d}T${h}`;case"month":return`${a}-${i}`;case"time":return void 0===n||"60"===String(n)?`${s}:${l}`:h;case"week":return`${a}-W${this.getWeekNumberOfDate(t)}`}}}static getWeekNumberOfDate(t){const e=new Date(t),n=(e.getDay()+6)%7;e.setDate(e.getDate()-n+3);const a=e.valueOf();e.setMonth(0,1),4!==e.getDay()&&e.setMonth(0,1+(4-e.getDay()+7)%7);return(1+Math.ceil((a-e.valueOf())/6048e5)).toString().padStart(2,"0")}validateDateString(t){switch(this.component._type){case"date":return InputDateController.isoDateRegex.test(t);case"datetime-local":return InputDateController.isoLocalDateTimeRegex.test(t);case"month":return InputDateController.isoMonthRegex.test(t);case"time":return InputDateController.isoTimeRegex.test(t);case"week":return InputDateController.isoWeekRegex.test(t);default:return!1}}onBlur(t){super.onBlur(t),!!t.target.value!=!!this.component._value&&(this.component._value=t.target.value)}validateMax(t){const e=null!=t||"date"!==this.component._type&&"month"!==this.component._type&&"datetime-local"!==this.component._type?t:InputDateController.DEFAULT_MAX_DATE;this.validateIso8601("_max",e)}validateMin(t){this.validateIso8601("_min",t)}validateOn(t){setState(this.component,"_on",Object.assign(Object.assign({},t),{onChange:(e,n)=>{!!n!=!!this.component._value&&(this.component._value=n),(null==t?void 0:t.onChange)&&t.onChange(e,n)}}))}validateReadOnly(t){validateReadOnly(this.component,t)}validateRequired(t){watchBoolean(this.component,"_required",t)}validateStep(t){watchNumber(this.component,"_step",t)}validateType(t){watchValidator(this.component,"_type",t=>"string"==typeof t&&inputDateTypeOptions.includes(t),new Set([`String {${inputDateTypeOptions.join(", ")}`]),t)}validateValue(t){this.validateValueEx(t)}validateValueEx(t,e){this.validateIso8601("_value",t,e),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateMax(this.component._max),this.validateMin(this.component._min),this.validateLabel(this.component._label),this.validateSuggestions(this.component._suggestions),this.validateOn(this.component._on),this.validateReadOnly(this.component._readOnly),this.validateRequired(this.component._required),this.validateStep(this.component._step),this.validateType(this.component._type),this.validateValue(this.component._value)}}InputDateController.isoDateRegex=/^\d{4}-([0]\d|1[0-2])-([0-2]\d|3[01])/,InputDateController.isoLocalDateTimeRegex=/^\d{4}-([0]\d|1[0-2])-([0-2]\d|3[01])[T ][0-2]\d:[0-5]\d(:[0-5]\d(?:\.\d+)?)?/,InputDateController.isoMonthRegex=/^\d{4}-([0]\d|1[0-2])/,InputDateController.isoTimeRegex=/^[0-2]\d:[0-5]\d(:[0-5]\d(?:\.\d+)?)?/,InputDateController.isoWeekRegex=/^\d{4}-W(?:[0-4]\d|5[0-3])$/,InputDateController.DEFAULT_MAX_DATE=new Date(9999,11,31,23,59,59);const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n color: black;\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 /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%; /* 100% needed for custom width from outside */\n margin: 0;\n padding: 0;\n border: none;\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}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-tooltip-wc {\n display: contents;\n contain: layout;\n }\n .kol-tooltip-wc .tooltip-floating {\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n }\n /* Shared between content and arrow */\n .kol-tooltip-wc .tooltip-area {\n color: #000;\n background-color: #fff;\n }\n .kol-tooltip-wc .tooltip-arrow {\n transform: rotate(45deg);\n position: absolute;\n z-index: 999;\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip-wc .tooltip-content {\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 .required label > span::after,\n .required legend > span::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n input,\n textarea {\n cursor: text;\n }\n input[type=checkbox],\n input[type=color],\n input[type=file],\n input[type=radio],\n input[type=range],\n label,\n option,\n select {\n cursor: pointer;\n }\n /* input[type='checkbox'], */\n /* input[type='radio'], */\n /* input[type='range'], */\n input[type=color],\n input[type=date],\n input[type=datetime-local],\n input[type=email],\n input[type=file],\n input[type=month],\n input[type=number],\n input[type=password],\n input[type=search],\n input[type=tel],\n input[type=text],\n input[type=time],\n input[type=url],\n input[type=week],\n option,\n select,\n textarea {\n background-color: transparent;\n width: 100%;\n }\n /* needed hack for vertical alignment */\n input[type=file] {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 10) 0.5em;\n }\n /* needed hack for vertical alignment */\n select[multiple] option {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 2) 0.5em;\n }\n}\n@layer kol-component {\n .kol-alert-wc {\n display: grid;\n }\n .kol-alert-wc .heading {\n display: flex;\n place-items: center;\n }\n .kol-alert-wc .heading > div {\n flex-grow: 1;\n }\n .close {\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-input {\n display: grid;\n }\n .kol-input .input-slot {\n flex-grow: 1;\n }\n input:focus,\n option:focus,\n select:focus,\n textarea:focus {\n outline: 0;\n }\n .input {\n background-color: white;\n display: flex;\n align-items: center;\n cursor: pointer;\n }\n button:not([role=link]) {\n min-height: auto;\n }\n .input > .kol-icon {\n display: grid;\n place-items: center;\n }\n .kol-input.required .input-tooltip .span-label::after {\n content: \"*\";\n }\n}",KolInputDateDefaultStyle0=defaultStyleCss,KolInputDate=class{async getValue(){var t;return this.inputRef&&this.remapValue(null===(t=this.inputRef)||void 0===t?void 0:t.value)}async focus(){await this.kolFocus()}async kolFocus(){var t;null===(t=this.inputRef)||void 0===t||t.focus()}async reset(){this.state=Object.assign(Object.assign({},this.state),{_value:null}),this.controller.setFormAssociatedValue(""),this.inputRef&&(this.inputRef.value="")}setInitialValueType(t){t instanceof Date?this._initialValueType="Date":this._initialValueType="string"==typeof t?"String":null}remapValue(t){return"Date"===this._initialValueType?new Date(t):t}render(){const{ariaDescribedBy:t}=getRenderStates(this.state),e=Array.isArray(this.state._suggestions)&&this.state._suggestions.length>0,n=showExpertSlot(this.state._label);return h(Host,{key:"8657af4f219518c6c18d62e3cd7ef7681e143cc3",class:{"kol-input-date":!0,"has-value":this.state._hasValue}},h(KolInputTag,{key:"9ec350cbd69031b99b5412cb6a8a907035e52d1f",class:{[this.state._type]:!0,"hide-label":!!this.state._hideLabel},_accessKey:this.state._accessKey,_alert:this.showAsAlert(),_disabled:this.state._disabled,_msg:this.state._msg,_hideError:this.state._hideError,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_icons:this.state._icons,_id:this.state._id,_label:this.state._label,_suggestions:this.state._suggestions,_readOnly:this.state._readOnly,_required:this.state._required,_shortKey:this.state._shortKey,_smartButton:this.state._smartButton,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched},h("span",{key:"c3ef44f1b628170fb2cfc0cdbdd62fd06c1a8461",slot:"label"},n?h("slot",{name:"expert"}):"string"==typeof this.state._accessKey||"string"==typeof this.state._shortKey?h(Fragment,null,h(InternalUnderlinedBadgeText,{badgeText:buildBadgeTextString(this.state._accessKey,this.state._shortKey),label:this.state._label})," ",h("kbd",{class:"badge-text-hint","aria-hidden":"true"},buildBadgeTextString(this.state._accessKey||this.state._shortKey))):h("span",null,this.state._label)),h("div",{key:"2eb1d8a2385634b7dfb1a455af1e1534d084e33a",slot:"input"},h("input",Object.assign({key:"b6fe5a3a51aea6715a5b8e0330a9875679f426fa",ref:this.catchRef,title:"",accessKey:this.state._accessKey,"aria-describedby":t.length>0?t.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,autoCapitalize:"off",autoComplete:this.state._autoComplete,autoCorrect:"off",disabled:this.state._disabled,id:this.state._id,list:e?`${this.state._id}-list`:void 0,max:this.state._max,min:this.state._min,name:this.state._name,readOnly:this.state._readOnly,required:this.state._required,step:this.state._step,type:this.state._type,value:this.state._value||void 0},this.controller.onFacade,{onKeyDown:this.onKeyDown,onBlur:t=>{this.controller.onFacade.onBlur(t),this.inputHasFocus=!1},onFocus:t=>{this.controller.onFacade.onFocus(t),this.inputHasFocus=!0},onChange:this.onChange,onInput:this.onInput})))))}constructor(t){registerInstance(this,t),this.catchRef=t=>{this.inputRef=t},this.onChange=t=>{const e=t.target.value,n=this.remapValue(e);this.controller.onFacade.onChange(t,n)},this.onInput=t=>{const e=t.target.value,n=this.remapValue(e);this.controller.onFacade.onInput(t,!0,n)},this.onKeyDown=t=>{"Enter"!==t.code&&"NumpadEnter"!==t.code||propagateSubmitEventToForm({form:this.host,ref:this.inputRef})},this._initialValueType=null,this._accessKey=void 0,this._alert=void 0,this._autoComplete=void 0,this._disabled=!1,this._error=void 0,this._hideError=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._max=void 0,this._min=void 0,this._msg=void 0,this._name=void 0,this._on=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._step=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._type="date",this._value=void 0,this.state={_autoComplete:"off",_hasValue:!1,_hideError:!1,_id:`id-${nonce()}`,_label:"",_suggestions:[],_type:"datetime-local"},this.inputHasFocus=!1,this.controller=new InputDateController(this,"date",this.host)}showAsAlert(){return void 0===this.state._alert?Boolean(this.state._touched)&&!this.inputHasFocus:this.state._alert}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAlert(t){this.controller.validateAlert(t)}validateAutoComplete(t){this.controller.validateAutoComplete(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateError(t){this.controller.validateError(t)}validateHideError(t){this.controller.validateHideError(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateMax(t){this.controller.validateMax(t)}validateMin(t){this.controller.validateMin(t)}validateMsg(t){this.controller.validateMsg(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validateReadOnly(t){this.controller.validateReadOnly(t)}validateRequired(t){this.controller.validateRequired(t)}validateShortKey(t){this.controller.validateShortKey(t)}validateSmartButton(t){this.controller.validateSmartButton(t)}validateSuggestions(t){this.controller.validateSuggestions(t)}validateStep(t){this.controller.validateStep(t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTabIndex(t){this.controller.validateTabIndex(t)}validateTouched(t){this.controller.validateTouched(t)}validateType(t){this.controller.validateType(t)}validateValue(t){t instanceof Date&&deprecatedHint("Date type will be removed in v3. Use `Iso8601` instead."),this.controller.validateValueEx(t),void 0!==t&&this.setInitialValueType(t)}componentWillLoad(){void 0!==this._value&&this.setInitialValueType(this._value),this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener(t=>this.state._hasValue=!!t)}static get delegatesFocus(){return!0}get host(){return getElement(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_alert:["validateAlert"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_error:["validateError"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_max:["validateMax"],_min:["validateMin"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_shortKey:["validateShortKey"],_smartButton:["validateSmartButton"],_suggestions:["validateSuggestions"],_step:["validateStep"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_type:["validateType"],_value:["validateValue"]}}};KolInputDate.style={default:KolInputDateDefaultStyle0};export{KolInputDate as kol_input_date};
4
+ import{h,F as Fragment,H as Host,r as registerInstance,g as getElement}from"./index-e850ccc2.js";import{j as watchBoolean,w as watchValidator,m as setState,F as watchNumber,A as buildBadgeTextString,I as deprecatedHint,B as showExpertSlot}from"./index-7a63e9eb.js";import{l as KolInputTag}from"./component-names-4cb1c62b.js";import{n as nonce}from"./dev.utils-da85e627.js";import{p as propagateSubmitEventToForm}from"./controller-728fbdd1.js";import{g as getRenderStates}from"./controller-c87b8bd9.js";import{I as InternalUnderlinedBadgeText}from"./InternalUnderlinedBadgeText-40aac46d.js";import{I as InputIconController}from"./controller-icon-b3eb5a58.js";import{v as validateSuggestions}from"./suggestions-506c439a.js";import"./events-29e84d75.js";import"./associated.controller-d302adf7.js";import"./access-and-short-key-914780a7.js";import"./hide-label-0d754c8e.js";import"./label-7d1ce375.js";import"./tooltip-align-6964dd71.js";import"./align-f3101425.js";import"./icons-adcda9b0.js";const validateReadOnly=(t,e)=>{watchBoolean(t,"_readOnly",e)},inputDateTypeOptions=["date","datetime-local","month","time","week"];class InputDateController extends InputIconController{constructor(t,e,n){super(t,e,n),this.validateIso8601=(t,e,n)=>watchValidator(this.component,t,t=>null==t||""===t||this.validateDateString(t),new Set(["Date","string{ISO-8601}"]),InputDateController.tryParseToString(e,this.component._type,this.component._step),{hooks:{afterPatch:t=>{"string"==typeof t&&n&&n(t)}}}),this.component=t}validateAutoComplete(t){watchValidator(this.component,"_autoComplete",t=>"string"==typeof t&&("on"===t||"off"===t),new Set(["on | off"]),t)}validateSuggestions(t){validateSuggestions(this.component,t)}static tryParseToString(t,e,n){if("string"==typeof t||null===t)return t;if("object"==typeof t&&t instanceof Date){const a=t.getFullYear(),i=String(t.getMonth()+1).padStart(2,"0"),o=String(t.getDate()).padStart(2,"0"),s=String(t.getHours()).padStart(2,"0"),l=String(t.getMinutes()).padStart(2,"0"),r=String(t.getSeconds()).padStart(2,"0"),d=[a,i,o].join("-"),h=[s,l,r].join(":");switch(e){case"date":return d;case"datetime-local":return`${d}T${h}`;case"month":return`${a}-${i}`;case"time":return void 0===n||"60"===String(n)?`${s}:${l}`:h;case"week":return`${a}-W${this.getWeekNumberOfDate(t)}`}}}static getWeekNumberOfDate(t){const e=new Date(t),n=(e.getDay()+6)%7;e.setDate(e.getDate()-n+3);const a=e.valueOf();e.setMonth(0,1),4!==e.getDay()&&e.setMonth(0,1+(4-e.getDay()+7)%7);return(1+Math.ceil((a-e.valueOf())/6048e5)).toString().padStart(2,"0")}validateDateString(t){switch(this.component._type){case"date":return InputDateController.isoDateRegex.test(t);case"datetime-local":return InputDateController.isoLocalDateTimeRegex.test(t);case"month":return InputDateController.isoMonthRegex.test(t);case"time":return InputDateController.isoTimeRegex.test(t);case"week":return InputDateController.isoWeekRegex.test(t);default:return!1}}onBlur(t){super.onBlur(t),!!t.target.value!=!!this.component._value&&(this.component._value=t.target.value)}validateMax(t){const e=null!=t||"date"!==this.component._type&&"month"!==this.component._type&&"datetime-local"!==this.component._type?t:InputDateController.DEFAULT_MAX_DATE;this.validateIso8601("_max",e)}validateMin(t){this.validateIso8601("_min",t)}validateOn(t){setState(this.component,"_on",Object.assign(Object.assign({},t),{onChange:(e,n)=>{!!n!=!!this.component._value&&(this.component._value=n),(null==t?void 0:t.onChange)&&t.onChange(e,n)}}))}validateReadOnly(t){validateReadOnly(this.component,t)}validateRequired(t){watchBoolean(this.component,"_required",t)}validateStep(t){watchNumber(this.component,"_step",t)}validateType(t){watchValidator(this.component,"_type",t=>"string"==typeof t&&inputDateTypeOptions.includes(t),new Set([`String {${inputDateTypeOptions.join(", ")}`]),t)}validateValue(t){this.validateValueEx(t)}validateValueEx(t,e){this.validateIso8601("_value",t,e),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateMax(this.component._max),this.validateMin(this.component._min),this.validateLabel(this.component._label),this.validateSuggestions(this.component._suggestions),this.validateOn(this.component._on),this.validateReadOnly(this.component._readOnly),this.validateRequired(this.component._required),this.validateStep(this.component._step),this.validateType(this.component._type),this.validateValue(this.component._value)}}InputDateController.isoDateRegex=/^\d{4}-([0]\d|1[0-2])-([0-2]\d|3[01])/,InputDateController.isoLocalDateTimeRegex=/^\d{4}-([0]\d|1[0-2])-([0-2]\d|3[01])[T ][0-2]\d:[0-5]\d(:[0-5]\d(?:\.\d+)?)?/,InputDateController.isoMonthRegex=/^\d{4}-([0]\d|1[0-2])/,InputDateController.isoTimeRegex=/^[0-2]\d:[0-5]\d(:[0-5]\d(?:\.\d+)?)?/,InputDateController.isoWeekRegex=/^\d{4}-W(?:[0-4]\d|5[0-3])$/,InputDateController.DEFAULT_MAX_DATE=new Date(9999,11,31,23,59,59);const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n color: black;\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 /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%; /* 100% needed for custom width from outside */\n margin: 0;\n padding: 0;\n border: none;\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}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-tooltip-wc {\n display: contents;\n contain: layout;\n }\n .kol-tooltip-wc .tooltip-floating {\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n }\n /* Shared between content and arrow */\n .kol-tooltip-wc .tooltip-area {\n color: #000;\n background-color: #fff;\n }\n .kol-tooltip-wc .tooltip-arrow {\n transform: rotate(45deg);\n position: absolute;\n z-index: 999;\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip-wc .tooltip-content {\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 .required label > span::after,\n .required legend > span::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n input,\n textarea {\n cursor: text;\n }\n input[type=checkbox],\n input[type=color],\n input[type=file],\n input[type=radio],\n input[type=range],\n label,\n option,\n select {\n cursor: pointer;\n }\n /* input[type='checkbox'], */\n /* input[type='radio'], */\n /* input[type='range'], */\n input[type=color],\n input[type=date],\n input[type=datetime-local],\n input[type=email],\n input[type=file],\n input[type=month],\n input[type=number],\n input[type=password],\n input[type=search],\n input[type=tel],\n input[type=text],\n input[type=time],\n input[type=url],\n input[type=week],\n option,\n select,\n textarea {\n background-color: transparent;\n width: 100%;\n }\n /* needed hack for vertical alignment */\n input[type=file] {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 10) 0.5em;\n }\n /* needed hack for vertical alignment */\n select[multiple] option {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 2) 0.5em;\n }\n}\n@layer kol-component {\n .kol-alert-wc {\n display: grid;\n }\n .kol-alert-wc .heading {\n display: flex;\n place-items: center;\n }\n .kol-alert-wc .heading > div {\n flex-grow: 1;\n }\n .close {\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-input {\n display: grid;\n }\n .kol-input .input-slot {\n flex-grow: 1;\n }\n input:focus,\n option:focus,\n select:focus,\n textarea:focus {\n outline: 0;\n }\n .input {\n background-color: white;\n display: flex;\n align-items: center;\n cursor: pointer;\n }\n button:not([role=link]) {\n min-height: auto;\n }\n .input > .kol-icon {\n display: grid;\n place-items: center;\n }\n .kol-input.required .input-tooltip .span-label::after {\n content: \"*\";\n }\n}",KolInputDateDefaultStyle0=defaultStyleCss,KolInputDate=class{async getValue(){var t;return this.inputRef&&this.remapValue(null===(t=this.inputRef)||void 0===t?void 0:t.value)}async focus(){await this.kolFocus()}async kolFocus(){var t;null===(t=this.inputRef)||void 0===t||t.focus()}async reset(){this.state=Object.assign(Object.assign({},this.state),{_value:null}),this.controller.setFormAssociatedValue(""),this.inputRef&&(this.inputRef.value="")}setInitialValueType(t){t instanceof Date?this._initialValueType="Date":this._initialValueType="string"==typeof t?"String":null}remapValue(t){return"Date"===this._initialValueType?new Date(t):t}render(){const{ariaDescribedBy:t}=getRenderStates(this.state),e=Array.isArray(this.state._suggestions)&&this.state._suggestions.length>0,n=showExpertSlot(this.state._label);return h(Host,{key:"8657af4f219518c6c18d62e3cd7ef7681e143cc3",class:{"kol-input-date":!0,"has-value":this.state._hasValue}},h(KolInputTag,{key:"9ec350cbd69031b99b5412cb6a8a907035e52d1f",class:{[this.state._type]:!0,"hide-label":!!this.state._hideLabel},_accessKey:this.state._accessKey,_alert:this.showAsAlert(),_disabled:this.state._disabled,_msg:this.state._msg,_hideError:this.state._hideError,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_icons:this.state._icons,_id:this.state._id,_label:this.state._label,_suggestions:this.state._suggestions,_readOnly:this.state._readOnly,_required:this.state._required,_shortKey:this.state._shortKey,_smartButton:this.state._smartButton,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched},h("span",{key:"c3ef44f1b628170fb2cfc0cdbdd62fd06c1a8461",slot:"label"},n?h("slot",{name:"expert"}):"string"==typeof this.state._accessKey||"string"==typeof this.state._shortKey?h(Fragment,null,h(InternalUnderlinedBadgeText,{badgeText:buildBadgeTextString(this.state._accessKey,this.state._shortKey),label:this.state._label})," ",h("kbd",{class:"badge-text-hint","aria-hidden":"true"},buildBadgeTextString(this.state._accessKey||this.state._shortKey))):h("span",null,this.state._label)),h("div",{key:"2eb1d8a2385634b7dfb1a455af1e1534d084e33a",slot:"input"},h("input",Object.assign({key:"b6fe5a3a51aea6715a5b8e0330a9875679f426fa",ref:this.catchRef,title:"",accessKey:this.state._accessKey,"aria-describedby":t.length>0?t.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,autoCapitalize:"off",autoComplete:this.state._autoComplete,autoCorrect:"off",disabled:this.state._disabled,id:this.state._id,list:e?`${this.state._id}-list`:void 0,max:this.state._max,min:this.state._min,name:this.state._name,readOnly:this.state._readOnly,required:this.state._required,step:this.state._step,type:this.state._type,value:this.state._value||void 0},this.controller.onFacade,{onKeyDown:this.onKeyDown,onBlur:t=>{this.controller.onFacade.onBlur(t),this.inputHasFocus=!1},onFocus:t=>{this.controller.onFacade.onFocus(t),this.inputHasFocus=!0},onChange:this.onChange,onInput:this.onInput})))))}constructor(t){registerInstance(this,t),this.catchRef=t=>{this.inputRef=t},this.onChange=t=>{const e=t.target.value,n=this.remapValue(e);this.controller.onFacade.onChange(t,n)},this.onInput=t=>{const e=t.target.value,n=this.remapValue(e);this.controller.onFacade.onInput(t,!0,n)},this.onKeyDown=t=>{"Enter"!==t.code&&"NumpadEnter"!==t.code||propagateSubmitEventToForm({form:this.host,ref:this.inputRef})},this._initialValueType=null,this._accessKey=void 0,this._alert=void 0,this._autoComplete=void 0,this._disabled=!1,this._error=void 0,this._hideError=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._max=void 0,this._min=void 0,this._msg=void 0,this._name=void 0,this._on=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._step=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._type="date",this._value=void 0,this.state={_autoComplete:"off",_hasValue:!1,_hideError:!1,_id:`id-${nonce()}`,_label:"",_suggestions:[],_type:"datetime-local"},this.inputHasFocus=!1,this.controller=new InputDateController(this,"date",this.host)}showAsAlert(){return void 0===this.state._alert?Boolean(this.state._touched)&&!this.inputHasFocus:this.state._alert}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAlert(t){this.controller.validateAlert(t)}validateAutoComplete(t){this.controller.validateAutoComplete(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateError(t){this.controller.validateError(t)}validateHideError(t){this.controller.validateHideError(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateMax(t){this.controller.validateMax(t)}validateMin(t){this.controller.validateMin(t)}validateMsg(t){this.controller.validateMsg(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validateReadOnly(t){this.controller.validateReadOnly(t)}validateRequired(t){this.controller.validateRequired(t)}validateShortKey(t){this.controller.validateShortKey(t)}validateSmartButton(t){this.controller.validateSmartButton(t)}validateSuggestions(t){this.controller.validateSuggestions(t)}validateStep(t){this.controller.validateStep(t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTabIndex(t){this.controller.validateTabIndex(t)}validateTouched(t){this.controller.validateTouched(t)}validateType(t){this.controller.validateType(t)}validateValue(t){t instanceof Date&&deprecatedHint("Date type will be removed in v3. Use `Iso8601` instead."),this.controller.validateValueEx(t),void 0!==t&&this.setInitialValueType(t)}componentWillLoad(){void 0!==this._value&&this.setInitialValueType(this._value),this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener(t=>this.state._hasValue=!!t)}static get delegatesFocus(){return!0}get host(){return getElement(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_alert:["validateAlert"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_error:["validateError"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_max:["validateMax"],_min:["validateMin"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_shortKey:["validateShortKey"],_smartButton:["validateSmartButton"],_suggestions:["validateSuggestions"],_step:["validateStep"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_type:["validateType"],_value:["validateValue"]}}};KolInputDate.style={default:KolInputDateDefaultStyle0};export{KolInputDate as kol_input_date};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{h,F as Fragment,H as Host,r as registerInstance,g as getElement}from"./index-8a68d70d.js";import{j as watchBoolean,A as buildBadgeTextString,m as setState,B as showExpertSlot}from"./index-7a63e9eb.js";import{l as KolInputTag}from"./component-names-4cb1c62b.js";import{n as nonce}from"./dev.utils-73ce9898.js";import{p as propagateSubmitEventToForm}from"./controller-728fbdd1.js";import{g as getRenderStates}from"./controller-c87b8bd9.js";import{I as InternalUnderlinedBadgeText}from"./InternalUnderlinedBadgeText-c9ba3be5.js";import{I as InputTextEmailController}from"./controller-b19ef5c0.js";import"./events-29e84d75.js";import"./associated.controller-d302adf7.js";import"./access-and-short-key-914780a7.js";import"./hide-label-0d754c8e.js";import"./label-7d1ce375.js";import"./tooltip-align-6964dd71.js";import"./align-f3101425.js";import"./controller-fa5508b8.js";import"./controller-icon-b3eb5a58.js";import"./icons-adcda9b0.js";import"./debounce-99d34c2d.js";import"./spell-check-82b14d35.js";import"./suggestions-506c439a.js";const validateMultiple=(t,e)=>{watchBoolean(t,"_multiple",e)};class InputEmailController extends InputTextEmailController{constructor(t,e,n){super(t,e,n),this.component=t}validateMultiple(t){validateMultiple(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateMultiple(this.component._multiple)}}const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n color: black;\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 /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%; /* 100% needed for custom width from outside */\n margin: 0;\n padding: 0;\n border: none;\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}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-tooltip-wc {\n display: contents;\n contain: layout;\n }\n .kol-tooltip-wc .tooltip-floating {\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n }\n /* Shared between content and arrow */\n .kol-tooltip-wc .tooltip-area {\n color: #000;\n background-color: #fff;\n }\n .kol-tooltip-wc .tooltip-arrow {\n transform: rotate(45deg);\n position: absolute;\n z-index: 999;\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip-wc .tooltip-content {\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 .required label > span::after,\n .required legend > span::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n input,\n textarea {\n cursor: text;\n }\n input[type=checkbox],\n input[type=color],\n input[type=file],\n input[type=radio],\n input[type=range],\n label,\n option,\n select {\n cursor: pointer;\n }\n /* input[type='checkbox'], */\n /* input[type='radio'], */\n /* input[type='range'], */\n input[type=color],\n input[type=date],\n input[type=datetime-local],\n input[type=email],\n input[type=file],\n input[type=month],\n input[type=number],\n input[type=password],\n input[type=search],\n input[type=tel],\n input[type=text],\n input[type=time],\n input[type=url],\n input[type=week],\n option,\n select,\n textarea {\n background-color: transparent;\n width: 100%;\n }\n /* needed hack for vertical alignment */\n input[type=file] {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 10) 0.5em;\n }\n /* needed hack for vertical alignment */\n select[multiple] option {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 2) 0.5em;\n }\n}\n@layer kol-component {\n .kol-alert-wc {\n display: grid;\n }\n .kol-alert-wc .heading {\n display: flex;\n place-items: center;\n }\n .kol-alert-wc .heading > div {\n flex-grow: 1;\n }\n .close {\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-input {\n display: grid;\n }\n .kol-input .input-slot {\n flex-grow: 1;\n }\n input:focus,\n option:focus,\n select:focus,\n textarea:focus {\n outline: 0;\n }\n .input {\n background-color: white;\n display: flex;\n align-items: center;\n cursor: pointer;\n }\n button:not([role=link]) {\n min-height: auto;\n }\n .input > .kol-icon {\n display: grid;\n place-items: center;\n }\n .kol-input.required .input-tooltip .span-label::after {\n content: \"*\";\n }\n}",KolInputEmailDefaultStyle0=defaultStyleCss,KolInputEmail=class{async getValue(){var t;return null===(t=this.inputRef)||void 0===t?void 0:t.value}async focus(){await this.kolFocus()}async kolFocus(){var t;null===(t=this.inputRef)||void 0===t||t.focus()}render(){const{ariaDescribedBy:t}=getRenderStates(this.state),e=Array.isArray(this.state._suggestions)&&this.state._suggestions.length>0,n=showExpertSlot(this.state._label);return h(Host,{key:"ac60edbcb3ebfe102a939ec5b38a37e8a40dedcf",class:{"kol-input-email":!0,"has-value":this.state._hasValue}},h(KolInputTag,{key:"fbe21fa47f283d683551a2aed89878feb3e183e6",class:{email:!0,"hide-label":!!this.state._hideLabel},_accessKey:this.state._accessKey,_alert:this.showAsAlert(),_currentLength:this.state._currentLength,_currentLengthDebounced:this.state._currentLengthDebounced,_disabled:this.state._disabled,_msg:this.state._msg,_hideError:this.state._hideError,_hasCounter:this.state._hasCounter,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_icons:this.state._icons,_id:this.state._id,_label:this.state._label,_suggestions:this.state._suggestions,_maxLength:this.state._maxLength,_readOnly:this.state._readOnly,_required:this.state._required,_shortKey:this.state._shortKey,_smartButton:this.state._smartButton,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched,onClick:()=>{var t;return null===(t=this.inputRef)||void 0===t?void 0:t.focus()},role:"presentation"},h("span",{key:"4f50f622f5ad6742d7293da85d45db61c6012c37",slot:"label"},n?h("slot",{name:"expert"}):"string"==typeof this.state._accessKey||"string"==typeof this.state._shortKey?h(Fragment,null,h(InternalUnderlinedBadgeText,{badgeText:buildBadgeTextString(this.state._accessKey,this.state._shortKey),label:this.state._label})," ",h("kbd",{class:"badge-text-hint","aria-hidden":"true"},buildBadgeTextString(this.state._accessKey,this.state._shortKey))):h("span",null,this.state._label)),h("div",{key:"8c6a027da0919608da7af05d39e400a62bffd5f0",slot:"input"},h("input",Object.assign({key:"551011d604a272d047a508c8766d5e0528db4475",ref:this.catchRef,title:"",accessKey:this.state._accessKey,"aria-describedby":t.length>0?t.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,autoCapitalize:"off",autoComplete:this.state._autoComplete,autoCorrect:"off",disabled:this.state._disabled,multiple:this.state._multiple,id:this.state._id,list:e?`${this.state._id}-list`:void 0,maxlength:this.state._maxLength,name:this.state._name,pattern:this.state._pattern,placeholder:this.state._placeholder,readOnly:this.state._readOnly,required:this.state._required,type:"email",value:this.state._value},this.controller.onFacade,{onKeyDown:this.onKeyDown,onInput:this.onInput,onFocus:t=>{this.controller.onFacade.onFocus(t),this.inputHasFocus=!0},onBlur:t=>{this.controller.onFacade.onBlur(t),this.inputHasFocus=!1}})))))}constructor(t){registerInstance(this,t),this.catchRef=t=>{this.inputRef=t},this.onKeyDown=t=>{"Enter"!==t.code&&"NumpadEnter"!==t.code||propagateSubmitEventToForm({form:this.host,ref:this.inputRef})},this.onInput=t=>{setState(this,"_currentLength",t.target.value.length),this.controller.updateCurrentLengthDebounced(t.target.value.length),this.controller.onFacade.onInput(t)},this._accessKey=void 0,this._alert=void 0,this._autoComplete=void 0,this._disabled=!1,this._error=void 0,this._hasCounter=!1,this._hideError=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._maxLength=void 0,this._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._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_autoComplete:"off",_currentLength:0,_currentLengthDebounced:0,_hasValue:!1,_hideError:!1,_id:`id-${nonce()}`,_label:"",_suggestions:[]},this.inputHasFocus=!1,this.controller=new InputEmailController(this,"email",this.host)}showAsAlert(){return void 0===this.state._alert?Boolean(this.state._touched)&&!this.inputHasFocus:this.state._alert}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAlert(t){this.controller.validateAlert(t)}validateAutoComplete(t){this.controller.validateAutoComplete(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateError(t){this.controller.validateError(t)}validateHasCounter(t){this.controller.validateHasCounter(t)}validateHideError(t){this.controller.validateHideError(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateMaxLength(t){this.controller.validateMaxLength(t)}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)}validateTabIndex(t){this.controller.validateTabIndex(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 getElement(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_alert:["validateAlert"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_error:["validateError"],_hasCounter:["validateHasCounter"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_maxLength:["validateMaxLength"],_msg:["validateMsg"],_multiple:["validateMultiple"],_name:["validateName"],_on:["validateOn"],_pattern:["validatePattern"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_shortKey:["validateShortKey"],_suggestions:["validateSuggestions"],_smartButton:["validateSmartButton"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}};KolInputEmail.style={default:KolInputEmailDefaultStyle0};export{KolInputEmail as kol_input_email};
4
+ import{h,F as Fragment,H as Host,r as registerInstance,g as getElement}from"./index-e850ccc2.js";import{j as watchBoolean,A as buildBadgeTextString,m as setState,B as showExpertSlot}from"./index-7a63e9eb.js";import{l as KolInputTag}from"./component-names-4cb1c62b.js";import{n as nonce}from"./dev.utils-da85e627.js";import{p as propagateSubmitEventToForm}from"./controller-728fbdd1.js";import{g as getRenderStates}from"./controller-c87b8bd9.js";import{I as InternalUnderlinedBadgeText}from"./InternalUnderlinedBadgeText-40aac46d.js";import{I as InputTextEmailController}from"./controller-b19ef5c0.js";import"./events-29e84d75.js";import"./associated.controller-d302adf7.js";import"./access-and-short-key-914780a7.js";import"./hide-label-0d754c8e.js";import"./label-7d1ce375.js";import"./tooltip-align-6964dd71.js";import"./align-f3101425.js";import"./controller-fa5508b8.js";import"./controller-icon-b3eb5a58.js";import"./icons-adcda9b0.js";import"./debounce-99d34c2d.js";import"./spell-check-82b14d35.js";import"./suggestions-506c439a.js";const validateMultiple=(t,e)=>{watchBoolean(t,"_multiple",e)};class InputEmailController extends InputTextEmailController{constructor(t,e,n){super(t,e,n),this.component=t}validateMultiple(t){validateMultiple(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateMultiple(this.component._multiple)}}const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n color: black;\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 /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%; /* 100% needed for custom width from outside */\n margin: 0;\n padding: 0;\n border: none;\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}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-tooltip-wc {\n display: contents;\n contain: layout;\n }\n .kol-tooltip-wc .tooltip-floating {\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n }\n /* Shared between content and arrow */\n .kol-tooltip-wc .tooltip-area {\n color: #000;\n background-color: #fff;\n }\n .kol-tooltip-wc .tooltip-arrow {\n transform: rotate(45deg);\n position: absolute;\n z-index: 999;\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip-wc .tooltip-content {\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 .required label > span::after,\n .required legend > span::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n input,\n textarea {\n cursor: text;\n }\n input[type=checkbox],\n input[type=color],\n input[type=file],\n input[type=radio],\n input[type=range],\n label,\n option,\n select {\n cursor: pointer;\n }\n /* input[type='checkbox'], */\n /* input[type='radio'], */\n /* input[type='range'], */\n input[type=color],\n input[type=date],\n input[type=datetime-local],\n input[type=email],\n input[type=file],\n input[type=month],\n input[type=number],\n input[type=password],\n input[type=search],\n input[type=tel],\n input[type=text],\n input[type=time],\n input[type=url],\n input[type=week],\n option,\n select,\n textarea {\n background-color: transparent;\n width: 100%;\n }\n /* needed hack for vertical alignment */\n input[type=file] {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 10) 0.5em;\n }\n /* needed hack for vertical alignment */\n select[multiple] option {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 2) 0.5em;\n }\n}\n@layer kol-component {\n .kol-alert-wc {\n display: grid;\n }\n .kol-alert-wc .heading {\n display: flex;\n place-items: center;\n }\n .kol-alert-wc .heading > div {\n flex-grow: 1;\n }\n .close {\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-input {\n display: grid;\n }\n .kol-input .input-slot {\n flex-grow: 1;\n }\n input:focus,\n option:focus,\n select:focus,\n textarea:focus {\n outline: 0;\n }\n .input {\n background-color: white;\n display: flex;\n align-items: center;\n cursor: pointer;\n }\n button:not([role=link]) {\n min-height: auto;\n }\n .input > .kol-icon {\n display: grid;\n place-items: center;\n }\n .kol-input.required .input-tooltip .span-label::after {\n content: \"*\";\n }\n}",KolInputEmailDefaultStyle0=defaultStyleCss,KolInputEmail=class{async getValue(){var t;return null===(t=this.inputRef)||void 0===t?void 0:t.value}async focus(){await this.kolFocus()}async kolFocus(){var t;null===(t=this.inputRef)||void 0===t||t.focus()}render(){const{ariaDescribedBy:t}=getRenderStates(this.state),e=Array.isArray(this.state._suggestions)&&this.state._suggestions.length>0,n=showExpertSlot(this.state._label);return h(Host,{key:"ac60edbcb3ebfe102a939ec5b38a37e8a40dedcf",class:{"kol-input-email":!0,"has-value":this.state._hasValue}},h(KolInputTag,{key:"fbe21fa47f283d683551a2aed89878feb3e183e6",class:{email:!0,"hide-label":!!this.state._hideLabel},_accessKey:this.state._accessKey,_alert:this.showAsAlert(),_currentLength:this.state._currentLength,_currentLengthDebounced:this.state._currentLengthDebounced,_disabled:this.state._disabled,_msg:this.state._msg,_hideError:this.state._hideError,_hasCounter:this.state._hasCounter,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_icons:this.state._icons,_id:this.state._id,_label:this.state._label,_suggestions:this.state._suggestions,_maxLength:this.state._maxLength,_readOnly:this.state._readOnly,_required:this.state._required,_shortKey:this.state._shortKey,_smartButton:this.state._smartButton,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched,onClick:()=>{var t;return null===(t=this.inputRef)||void 0===t?void 0:t.focus()},role:"presentation"},h("span",{key:"4f50f622f5ad6742d7293da85d45db61c6012c37",slot:"label"},n?h("slot",{name:"expert"}):"string"==typeof this.state._accessKey||"string"==typeof this.state._shortKey?h(Fragment,null,h(InternalUnderlinedBadgeText,{badgeText:buildBadgeTextString(this.state._accessKey,this.state._shortKey),label:this.state._label})," ",h("kbd",{class:"badge-text-hint","aria-hidden":"true"},buildBadgeTextString(this.state._accessKey,this.state._shortKey))):h("span",null,this.state._label)),h("div",{key:"8c6a027da0919608da7af05d39e400a62bffd5f0",slot:"input"},h("input",Object.assign({key:"551011d604a272d047a508c8766d5e0528db4475",ref:this.catchRef,title:"",accessKey:this.state._accessKey,"aria-describedby":t.length>0?t.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,autoCapitalize:"off",autoComplete:this.state._autoComplete,autoCorrect:"off",disabled:this.state._disabled,multiple:this.state._multiple,id:this.state._id,list:e?`${this.state._id}-list`:void 0,maxlength:this.state._maxLength,name:this.state._name,pattern:this.state._pattern,placeholder:this.state._placeholder,readOnly:this.state._readOnly,required:this.state._required,type:"email",value:this.state._value},this.controller.onFacade,{onKeyDown:this.onKeyDown,onInput:this.onInput,onFocus:t=>{this.controller.onFacade.onFocus(t),this.inputHasFocus=!0},onBlur:t=>{this.controller.onFacade.onBlur(t),this.inputHasFocus=!1}})))))}constructor(t){registerInstance(this,t),this.catchRef=t=>{this.inputRef=t},this.onKeyDown=t=>{"Enter"!==t.code&&"NumpadEnter"!==t.code||propagateSubmitEventToForm({form:this.host,ref:this.inputRef})},this.onInput=t=>{setState(this,"_currentLength",t.target.value.length),this.controller.updateCurrentLengthDebounced(t.target.value.length),this.controller.onFacade.onInput(t)},this._accessKey=void 0,this._alert=void 0,this._autoComplete=void 0,this._disabled=!1,this._error=void 0,this._hasCounter=!1,this._hideError=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._maxLength=void 0,this._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._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_autoComplete:"off",_currentLength:0,_currentLengthDebounced:0,_hasValue:!1,_hideError:!1,_id:`id-${nonce()}`,_label:"",_suggestions:[]},this.inputHasFocus=!1,this.controller=new InputEmailController(this,"email",this.host)}showAsAlert(){return void 0===this.state._alert?Boolean(this.state._touched)&&!this.inputHasFocus:this.state._alert}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAlert(t){this.controller.validateAlert(t)}validateAutoComplete(t){this.controller.validateAutoComplete(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateError(t){this.controller.validateError(t)}validateHasCounter(t){this.controller.validateHasCounter(t)}validateHideError(t){this.controller.validateHideError(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateMaxLength(t){this.controller.validateMaxLength(t)}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)}validateTabIndex(t){this.controller.validateTabIndex(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 getElement(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_alert:["validateAlert"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_error:["validateError"],_hasCounter:["validateHasCounter"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_maxLength:["validateMaxLength"],_msg:["validateMsg"],_multiple:["validateMultiple"],_name:["validateName"],_on:["validateOn"],_pattern:["validatePattern"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_shortKey:["validateShortKey"],_suggestions:["validateSuggestions"],_smartButton:["validateSmartButton"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}};KolInputEmail.style={default:KolInputEmailDefaultStyle0};export{KolInputEmail as kol_input_email};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{h,F as Fragment,H as Host,r as registerInstance,g as getElement}from"./index-8a68d70d.js";import{y as watchString,j as watchBoolean,A as buildBadgeTextString,B as showExpertSlot}from"./index-7a63e9eb.js";import{l as KolInputTag}from"./component-names-4cb1c62b.js";import{n as nonce}from"./dev.utils-73ce9898.js";import{g as getRenderStates}from"./controller-c87b8bd9.js";import{I as InternalUnderlinedBadgeText}from"./InternalUnderlinedBadgeText-c9ba3be5.js";import{I as InputIconController}from"./controller-icon-b3eb5a58.js";import"./events-29e84d75.js";import"./associated.controller-d302adf7.js";import"./access-and-short-key-914780a7.js";import"./hide-label-0d754c8e.js";import"./label-7d1ce375.js";import"./tooltip-align-6964dd71.js";import"./align-f3101425.js";import"./icons-adcda9b0.js";class InputFileController extends InputIconController{constructor(t,e,n){super(t,e,n),this.component=t}validateAccept(t){watchString(this.component,"_accept",t)}validateMultiple(t){watchBoolean(this.component,"_multiple",t)}validateRequired(t){watchBoolean(this.component,"_required",t)}validateValue(t){watchString(this.component,"_value",t),this.setFormAssociatedValue(this.component._value)}componentWillLoad(){super.componentWillLoad(),this.validateAccept(this.component._accept),this.validateMultiple(this.component._multiple),this.validateRequired(this.component._required),this.validateValue(this.component._value)}}const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n color: black;\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 /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%; /* 100% needed for custom width from outside */\n margin: 0;\n padding: 0;\n border: none;\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}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-tooltip-wc {\n display: contents;\n contain: layout;\n }\n .kol-tooltip-wc .tooltip-floating {\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n }\n /* Shared between content and arrow */\n .kol-tooltip-wc .tooltip-area {\n color: #000;\n background-color: #fff;\n }\n .kol-tooltip-wc .tooltip-arrow {\n transform: rotate(45deg);\n position: absolute;\n z-index: 999;\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip-wc .tooltip-content {\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 .required label > span::after,\n .required legend > span::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n input,\n textarea {\n cursor: text;\n }\n input[type=checkbox],\n input[type=color],\n input[type=file],\n input[type=radio],\n input[type=range],\n label,\n option,\n select {\n cursor: pointer;\n }\n /* input[type='checkbox'], */\n /* input[type='radio'], */\n /* input[type='range'], */\n input[type=color],\n input[type=date],\n input[type=datetime-local],\n input[type=email],\n input[type=file],\n input[type=month],\n input[type=number],\n input[type=password],\n input[type=search],\n input[type=tel],\n input[type=text],\n input[type=time],\n input[type=url],\n input[type=week],\n option,\n select,\n textarea {\n background-color: transparent;\n width: 100%;\n }\n /* needed hack for vertical alignment */\n input[type=file] {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 10) 0.5em;\n }\n /* needed hack for vertical alignment */\n select[multiple] option {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 2) 0.5em;\n }\n}\n@layer kol-component {\n .kol-alert-wc {\n display: grid;\n }\n .kol-alert-wc .heading {\n display: flex;\n place-items: center;\n }\n .kol-alert-wc .heading > div {\n flex-grow: 1;\n }\n .close {\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-input {\n display: grid;\n }\n .kol-input .input-slot {\n flex-grow: 1;\n }\n input:focus,\n option:focus,\n select:focus,\n textarea:focus {\n outline: 0;\n }\n .input {\n background-color: white;\n display: flex;\n align-items: center;\n cursor: pointer;\n }\n button:not([role=link]) {\n min-height: auto;\n }\n .input > .kol-icon {\n display: grid;\n place-items: center;\n }\n .kol-input.required .input-tooltip .span-label::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n .disabled .input-label,\n .disabled .input {\n cursor: not-allowed;\n }\n input::-webkit-file-upload-button, input::file-selector-button {\n cursor: pointer;\n }\n input:disabled, input:disabled::-webkit-file-upload-button, input:disabled::file-selector-button {\n cursor: not-allowed;\n pointer-events: none;\n }\n}",KolInputFileDefaultStyle0=defaultStyleCss,KolInputFile=class{async getValue(){var t;return null===(t=this.inputRef)||void 0===t?void 0:t.files}async focus(){await this.kolFocus()}async kolFocus(){var t;null===(t=this.inputRef)||void 0===t||t.focus()}render(){const{ariaDescribedBy:t}=getRenderStates(this.state),e=showExpertSlot(this.state._label);return h(Host,{key:"2fb1994862e55f5f29d5539ea76611a910602944",class:"kol-input-file"},h(KolInputTag,{key:"bf5b084f28a7167cb04213ddd16617e0dd656d62",class:{file:!0,"hide-label":!!this.state._hideLabel},_accessKey:this.state._accessKey,_alert:this.showAsAlert(),_disabled:this.state._disabled,_msg:this.state._msg,_hideError:this.state._hideError,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_icons:this.state._icons,_id:this.state._id,_label:this.state._label,_required:this.state._required,_shortKey:this.state._shortKey,_smartButton:this.state._smartButton,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched,onClick:()=>{var t;return null===(t=this.inputRef)||void 0===t?void 0:t.focus()},role:"presentation"},h("span",{key:"80930ef080e0a80ba7ec5d83b8d0452d501c659a",slot:"label"},e?h("slot",{name:"expert"}):"string"==typeof this.state._accessKey||"string"==typeof this.state._shortKey?h(Fragment,null,h(InternalUnderlinedBadgeText,{badgeText:buildBadgeTextString(this.state._accessKey,this.state._shortKey),label:this.state._label})," ",h("kbd",{class:"badge-text-hint","aria-hidden":"true"},buildBadgeTextString(this.state._accessKey,this.state._shortKey))):h("span",null,this.state._label)),h("div",{key:"614c84ae9760bc39232515f874154eb9f5b88983",slot:"input"},h("input",Object.assign({key:"5c07891d254d9445f2ae9b296614800cf06d5f06",ref:this.catchRef,title:"",accept:this.state._accept,accessKey:this.state._accessKey,"aria-describedby":t.length>0?t.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,autoCapitalize:"off",autoCorrect:"off",disabled:this.state._disabled,id:this.state._id,multiple:this.state._multiple,name:this.state._name,required:this.state._required,type:"file",value:this.state._value},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}})))))}constructor(t){registerInstance(this,t),this.catchRef=t=>{this.inputRef=t},this.onChange=t=>{if(this.inputRef instanceof HTMLInputElement&&"file"===this.inputRef.type){const e=this.inputRef.files;this.controller.onFacade.onChange(t,e),this.controller.setFormAssociatedValue(e)}},this.onInput=t=>{if(this.inputRef instanceof HTMLInputElement&&"file"===this.inputRef.type){const e=this.inputRef.files;this.controller.onFacade.onInput(t,!1,e)}},this._accept=void 0,this._accessKey=void 0,this._alert=void 0,this._disabled=!1,this._error=void 0,this._hideError=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._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._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_hideError:!1,_id:`id-${nonce()}`,_label:""},this.inputHasFocus=!1,this.controller=new InputFileController(this,"file",this.host)}showAsAlert(){return void 0===this.state._alert?Boolean(this.state._touched)&&!this.inputHasFocus:this.state._alert}validateAccept(t){this.controller.validateAccept(t)}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAlert(t){this.controller.validateAlert(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateError(t){this.controller.validateError(t)}validateHideError(t){this.controller.validateHideError(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateMsg(t){this.controller.validateMsg(t)}validateMultiple(t){this.controller.validateMultiple(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validateRequired(t){this.controller.validateRequired(t)}validateShortKey(t){this.controller.validateShortKey(t)}validateSmartButton(t){this.controller.validateSmartButton(t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTabIndex(t){this.controller.validateTabIndex(t)}validateTouched(t){this.controller.validateTouched(t)}validateValue(t){this.controller.validateValue(t)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad()}static get delegatesFocus(){return!0}get host(){return getElement(this)}static get watchers(){return{_accept:["validateAccept"],_accessKey:["validateAccessKey"],_alert:["validateAlert"],_disabled:["validateDisabled"],_error:["validateError"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_msg:["validateMsg"],_multiple:["validateMultiple"],_name:["validateName"],_on:["validateOn"],_required:["validateRequired"],_shortKey:["validateShortKey"],_smartButton:["validateSmartButton"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}};KolInputFile.style={default:KolInputFileDefaultStyle0};export{KolInputFile as kol_input_file};
4
+ import{h,F as Fragment,H as Host,r as registerInstance,g as getElement}from"./index-e850ccc2.js";import{y as watchString,j as watchBoolean,A as buildBadgeTextString,B as showExpertSlot}from"./index-7a63e9eb.js";import{l as KolInputTag}from"./component-names-4cb1c62b.js";import{n as nonce}from"./dev.utils-da85e627.js";import{g as getRenderStates}from"./controller-c87b8bd9.js";import{I as InternalUnderlinedBadgeText}from"./InternalUnderlinedBadgeText-40aac46d.js";import{I as InputIconController}from"./controller-icon-b3eb5a58.js";import"./events-29e84d75.js";import"./associated.controller-d302adf7.js";import"./access-and-short-key-914780a7.js";import"./hide-label-0d754c8e.js";import"./label-7d1ce375.js";import"./tooltip-align-6964dd71.js";import"./align-f3101425.js";import"./icons-adcda9b0.js";class InputFileController extends InputIconController{constructor(t,e,n){super(t,e,n),this.component=t}validateAccept(t){watchString(this.component,"_accept",t)}validateMultiple(t){watchBoolean(this.component,"_multiple",t)}validateRequired(t){watchBoolean(this.component,"_required",t)}validateValue(t){watchString(this.component,"_value",t),this.setFormAssociatedValue(this.component._value)}componentWillLoad(){super.componentWillLoad(),this.validateAccept(this.component._accept),this.validateMultiple(this.component._multiple),this.validateRequired(this.component._required),this.validateValue(this.component._value)}}const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n color: black;\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 /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%; /* 100% needed for custom width from outside */\n margin: 0;\n padding: 0;\n border: none;\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}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-tooltip-wc {\n display: contents;\n contain: layout;\n }\n .kol-tooltip-wc .tooltip-floating {\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n }\n /* Shared between content and arrow */\n .kol-tooltip-wc .tooltip-area {\n color: #000;\n background-color: #fff;\n }\n .kol-tooltip-wc .tooltip-arrow {\n transform: rotate(45deg);\n position: absolute;\n z-index: 999;\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip-wc .tooltip-content {\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 .required label > span::after,\n .required legend > span::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n input,\n textarea {\n cursor: text;\n }\n input[type=checkbox],\n input[type=color],\n input[type=file],\n input[type=radio],\n input[type=range],\n label,\n option,\n select {\n cursor: pointer;\n }\n /* input[type='checkbox'], */\n /* input[type='radio'], */\n /* input[type='range'], */\n input[type=color],\n input[type=date],\n input[type=datetime-local],\n input[type=email],\n input[type=file],\n input[type=month],\n input[type=number],\n input[type=password],\n input[type=search],\n input[type=tel],\n input[type=text],\n input[type=time],\n input[type=url],\n input[type=week],\n option,\n select,\n textarea {\n background-color: transparent;\n width: 100%;\n }\n /* needed hack for vertical alignment */\n input[type=file] {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 10) 0.5em;\n }\n /* needed hack for vertical alignment */\n select[multiple] option {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 2) 0.5em;\n }\n}\n@layer kol-component {\n .kol-alert-wc {\n display: grid;\n }\n .kol-alert-wc .heading {\n display: flex;\n place-items: center;\n }\n .kol-alert-wc .heading > div {\n flex-grow: 1;\n }\n .close {\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-input {\n display: grid;\n }\n .kol-input .input-slot {\n flex-grow: 1;\n }\n input:focus,\n option:focus,\n select:focus,\n textarea:focus {\n outline: 0;\n }\n .input {\n background-color: white;\n display: flex;\n align-items: center;\n cursor: pointer;\n }\n button:not([role=link]) {\n min-height: auto;\n }\n .input > .kol-icon {\n display: grid;\n place-items: center;\n }\n .kol-input.required .input-tooltip .span-label::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n .disabled .input-label,\n .disabled .input {\n cursor: not-allowed;\n }\n input::-webkit-file-upload-button, input::file-selector-button {\n cursor: pointer;\n }\n input:disabled, input:disabled::-webkit-file-upload-button, input:disabled::file-selector-button {\n cursor: not-allowed;\n pointer-events: none;\n }\n}",KolInputFileDefaultStyle0=defaultStyleCss,KolInputFile=class{async getValue(){var t;return null===(t=this.inputRef)||void 0===t?void 0:t.files}async focus(){await this.kolFocus()}async kolFocus(){var t;null===(t=this.inputRef)||void 0===t||t.focus()}render(){const{ariaDescribedBy:t}=getRenderStates(this.state),e=showExpertSlot(this.state._label);return h(Host,{key:"2fb1994862e55f5f29d5539ea76611a910602944",class:"kol-input-file"},h(KolInputTag,{key:"bf5b084f28a7167cb04213ddd16617e0dd656d62",class:{file:!0,"hide-label":!!this.state._hideLabel},_accessKey:this.state._accessKey,_alert:this.showAsAlert(),_disabled:this.state._disabled,_msg:this.state._msg,_hideError:this.state._hideError,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_icons:this.state._icons,_id:this.state._id,_label:this.state._label,_required:this.state._required,_shortKey:this.state._shortKey,_smartButton:this.state._smartButton,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched,onClick:()=>{var t;return null===(t=this.inputRef)||void 0===t?void 0:t.focus()},role:"presentation"},h("span",{key:"80930ef080e0a80ba7ec5d83b8d0452d501c659a",slot:"label"},e?h("slot",{name:"expert"}):"string"==typeof this.state._accessKey||"string"==typeof this.state._shortKey?h(Fragment,null,h(InternalUnderlinedBadgeText,{badgeText:buildBadgeTextString(this.state._accessKey,this.state._shortKey),label:this.state._label})," ",h("kbd",{class:"badge-text-hint","aria-hidden":"true"},buildBadgeTextString(this.state._accessKey,this.state._shortKey))):h("span",null,this.state._label)),h("div",{key:"614c84ae9760bc39232515f874154eb9f5b88983",slot:"input"},h("input",Object.assign({key:"5c07891d254d9445f2ae9b296614800cf06d5f06",ref:this.catchRef,title:"",accept:this.state._accept,accessKey:this.state._accessKey,"aria-describedby":t.length>0?t.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,autoCapitalize:"off",autoCorrect:"off",disabled:this.state._disabled,id:this.state._id,multiple:this.state._multiple,name:this.state._name,required:this.state._required,type:"file",value:this.state._value},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}})))))}constructor(t){registerInstance(this,t),this.catchRef=t=>{this.inputRef=t},this.onChange=t=>{if(this.inputRef instanceof HTMLInputElement&&"file"===this.inputRef.type){const e=this.inputRef.files;this.controller.onFacade.onChange(t,e),this.controller.setFormAssociatedValue(e)}},this.onInput=t=>{if(this.inputRef instanceof HTMLInputElement&&"file"===this.inputRef.type){const e=this.inputRef.files;this.controller.onFacade.onInput(t,!1,e)}},this._accept=void 0,this._accessKey=void 0,this._alert=void 0,this._disabled=!1,this._error=void 0,this._hideError=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._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._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_hideError:!1,_id:`id-${nonce()}`,_label:""},this.inputHasFocus=!1,this.controller=new InputFileController(this,"file",this.host)}showAsAlert(){return void 0===this.state._alert?Boolean(this.state._touched)&&!this.inputHasFocus:this.state._alert}validateAccept(t){this.controller.validateAccept(t)}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAlert(t){this.controller.validateAlert(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateError(t){this.controller.validateError(t)}validateHideError(t){this.controller.validateHideError(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateMsg(t){this.controller.validateMsg(t)}validateMultiple(t){this.controller.validateMultiple(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validateRequired(t){this.controller.validateRequired(t)}validateShortKey(t){this.controller.validateShortKey(t)}validateSmartButton(t){this.controller.validateSmartButton(t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTabIndex(t){this.controller.validateTabIndex(t)}validateTouched(t){this.controller.validateTouched(t)}validateValue(t){this.controller.validateValue(t)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad()}static get delegatesFocus(){return!0}get host(){return getElement(this)}static get watchers(){return{_accept:["validateAccept"],_accessKey:["validateAccessKey"],_alert:["validateAlert"],_disabled:["validateDisabled"],_error:["validateError"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_msg:["validateMsg"],_multiple:["validateMultiple"],_name:["validateName"],_on:["validateOn"],_required:["validateRequired"],_shortKey:["validateShortKey"],_smartButton:["validateSmartButton"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}};KolInputFile.style={default:KolInputFileDefaultStyle0};export{KolInputFile as kol_input_file};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{h,F as Fragment,H as Host,r as registerInstance,g as getElement}from"./index-8a68d70d.js";import{w as watchValidator,y as watchString,j as watchBoolean,F as watchNumber,A as buildBadgeTextString,B as showExpertSlot}from"./index-7a63e9eb.js";import{l as KolInputTag}from"./component-names-4cb1c62b.js";import{n as nonce}from"./dev.utils-73ce9898.js";import{p as propagateSubmitEventToForm}from"./controller-728fbdd1.js";import{g as getRenderStates}from"./controller-c87b8bd9.js";import{I as InternalUnderlinedBadgeText}from"./InternalUnderlinedBadgeText-c9ba3be5.js";import{I as InputIconController}from"./controller-icon-b3eb5a58.js";import{v as validateSuggestions}from"./suggestions-506c439a.js";import"./events-29e84d75.js";import"./associated.controller-d302adf7.js";import"./access-and-short-key-914780a7.js";import"./hide-label-0d754c8e.js";import"./label-7d1ce375.js";import"./tooltip-align-6964dd71.js";import"./align-f3101425.js";import"./icons-adcda9b0.js";class InputNumberController extends InputIconController{constructor(t,e,n){super(t,e,n),this.numberOrIsoDateRegex=/^\d+$|(^\d{4}-([0]\d|1[0-2])-([0-2]\d|3[01])([T ][0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?([+-][0-2]\d:[0-5]\d|Z)?)?$)|(^[0-2]\d:[0-5]\d(:[0-5]\d)?$)/,this.parseToString=t=>"string"==typeof t?t:"number"==typeof t?`${t}`:"object"==typeof t&&t instanceof Date?t.toISOString():"",this.validateIso8601=(t,e,n)=>{const i=parseFloat(e),a=i===e;return watchValidator(this.component,t,t=>void 0===t||""===t||a&&"number"==typeof i||this.numberOrIsoDateRegex.test(t),new Set(["number","Date","string{ISO-8601}"]),this.parseToString(e),{hooks:{afterPatch:t=>{"string"==typeof t&&n&&n(t)}}})},this.component=t}validateAutoComplete(t){watchValidator(this.component,"_autoComplete",t=>"string"==typeof t&&("on"===t||"off"===t),new Set(["on | off"]),t)}validateSuggestions(t){validateSuggestions(this.component,t)}onChange(t){super.onChange(t),!!t.target.value!=!!this.component._value&&(this.component._value=t.target.value)}validateMax(t){this.validateIso8601("_max",t)}validateMin(t){this.validateIso8601("_min",t)}validatePlaceholder(t){watchString(this.component,"_placeholder",t)}validateReadOnly(t){watchBoolean(this.component,"_readOnly",t)}validateRequired(t){watchBoolean(this.component,"_required",t)}validateStep(t){watchNumber(this.component,"_step",t)}validateValue(t){this.validateValueEx(t)}validateValueEx(t,e){this.validateIso8601("_value",t,e),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateMax(this.component._max),this.validateMin(this.component._min),this.validateSuggestions(this.component._suggestions),this.validatePlaceholder(this.component._placeholder),this.validateReadOnly(this.component._readOnly),this.validateRequired(this.component._required),this.validateStep(this.component._step),this.validateValue(this.component._value)}}const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n color: black;\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 /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%; /* 100% needed for custom width from outside */\n margin: 0;\n padding: 0;\n border: none;\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}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-tooltip-wc {\n display: contents;\n contain: layout;\n }\n .kol-tooltip-wc .tooltip-floating {\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n }\n /* Shared between content and arrow */\n .kol-tooltip-wc .tooltip-area {\n color: #000;\n background-color: #fff;\n }\n .kol-tooltip-wc .tooltip-arrow {\n transform: rotate(45deg);\n position: absolute;\n z-index: 999;\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip-wc .tooltip-content {\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 .required label > span::after,\n .required legend > span::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n input,\n textarea {\n cursor: text;\n }\n input[type=checkbox],\n input[type=color],\n input[type=file],\n input[type=radio],\n input[type=range],\n label,\n option,\n select {\n cursor: pointer;\n }\n /* input[type='checkbox'], */\n /* input[type='radio'], */\n /* input[type='range'], */\n input[type=color],\n input[type=date],\n input[type=datetime-local],\n input[type=email],\n input[type=file],\n input[type=month],\n input[type=number],\n input[type=password],\n input[type=search],\n input[type=tel],\n input[type=text],\n input[type=time],\n input[type=url],\n input[type=week],\n option,\n select,\n textarea {\n background-color: transparent;\n width: 100%;\n }\n /* needed hack for vertical alignment */\n input[type=file] {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 10) 0.5em;\n }\n /* needed hack for vertical alignment */\n select[multiple] option {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 2) 0.5em;\n }\n}\n@layer kol-component {\n .kol-alert-wc {\n display: grid;\n }\n .kol-alert-wc .heading {\n display: flex;\n place-items: center;\n }\n .kol-alert-wc .heading > div {\n flex-grow: 1;\n }\n .close {\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-input {\n display: grid;\n }\n .kol-input .input-slot {\n flex-grow: 1;\n }\n input:focus,\n option:focus,\n select:focus,\n textarea:focus {\n outline: 0;\n }\n .input {\n background-color: white;\n display: flex;\n align-items: center;\n cursor: pointer;\n }\n button:not([role=link]) {\n min-height: auto;\n }\n .input > .kol-icon {\n display: grid;\n place-items: center;\n }\n .kol-input.required .input-tooltip .span-label::after {\n content: \"*\";\n }\n}",KolInputNumberDefaultStyle0=defaultStyleCss,KolInputNumber=class{async getValue(){var t;return null===(t=this.inputRef)||void 0===t?void 0:t.value}async focus(){await this.kolFocus()}async kolFocus(){var t;null===(t=this.inputRef)||void 0===t||t.focus()}render(){const{ariaDescribedBy:t}=getRenderStates(this.state),e=Array.isArray(this.state._suggestions)&&this.state._suggestions.length>0,n=showExpertSlot(this.state._label);return h(Host,{key:"9a2aae0cd225fbfc9485ead318853ed29e412a4e",class:{"kol-input-number":!0,"has-value":this.state._hasValue}},h(KolInputTag,{key:"c14ef81d498de0b55146571ccd48ff133c39c0f9",class:{number:!0,"hide-label":!!this.state._hideLabel},_accessKey:this.state._accessKey,_alert:this.showAsAlert(),_disabled:this.state._disabled,_msg:this.state._msg,_hideError:this.state._hideError,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_icons:this.state._icons,_id:this.state._id,_label:this.state._label,_suggestions:this.state._suggestions,_readOnly:this.state._readOnly,_required:this.state._required,_shortKey:this.state._shortKey,_smartButton:this.state._smartButton,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched},h("span",{key:"8b4b88a454603fa88aa7a46d59d3b5fdf9717bd0",slot:"label"},n?h("slot",{name:"expert"}):"string"==typeof this.state._accessKey||"string"==typeof this.state._shortKey?h(Fragment,null,h(InternalUnderlinedBadgeText,{badgeText:buildBadgeTextString(this.state._accessKey,this.state._shortKey),label:this.state._label})," ",h("kbd",{class:"badge-text-hint","aria-hidden":"true"},buildBadgeTextString(this.state._accessKey,this.state._shortKey))):h("span",null,this.state._label)),h("div",{key:"8934f83d83685b71106f5006a28363f8579c5af1",slot:"input"},h("input",Object.assign({key:"fb15ab090dbe3bba5b5335b706d9358b9f231b04",ref:this.catchRef,title:"",accessKey:this.state._accessKey,"aria-describedby":t.length>0?t.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,autoCapitalize:"off",autoComplete:this.state._autoComplete,autoCorrect:"off",disabled:this.state._disabled,id:this.state._id,list:e?`${this.state._id}-list`:void 0,max:this.state._max,min:this.state._min,name:this.state._name,readOnly:this.state._readOnly,required:this.state._required,placeholder:this.state._placeholder,step:this.state._step,type:"number",value:this.state._value},this.controller.onFacade,{onKeyDown:this.onKeyDown,onFocus:t=>{this.controller.onFacade.onFocus(t),this.inputHasFocus=!0},onBlur:t=>{this.controller.onFacade.onBlur(t),this.inputHasFocus=!1}})))))}constructor(t){registerInstance(this,t),this.catchRef=t=>{this.inputRef=t},this.onKeyDown=t=>{"Enter"!==t.code&&"NumpadEnter"!==t.code||propagateSubmitEventToForm({form:this.host,ref:this.inputRef})},this._accessKey=void 0,this._alert=void 0,this._autoComplete=void 0,this._disabled=!1,this._error=void 0,this._hideError=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._max=void 0,this._min=void 0,this._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._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_autoComplete:"off",_hasValue:!1,_hideError:!1,_id:`id-${nonce()}`,_label:"",_suggestions:[]},this.inputHasFocus=!1,this.controller=new InputNumberController(this,"number",this.host)}showAsAlert(){return void 0===this.state._alert?Boolean(this.state._touched)&&!this.inputHasFocus:this.state._alert}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAlert(t){this.controller.validateAlert(t)}validateAutoComplete(t){this.controller.validateAutoComplete(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateError(t){this.controller.validateError(t)}validateHideError(t){this.controller.validateHideError(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateMax(t){this.controller.validateMax(t)}validateMin(t){this.controller.validateMin(t)}validateMsg(t){this.controller.validateMsg(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(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)}validateSuggestions(t){this.controller.validateSuggestions(t)}validateStep(t){this.controller.validateStep(t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTabIndex(t){this.controller.validateTabIndex(t)}validateTouched(t){this.controller.validateTouched(t)}validateValue(t){this.controller.validateValueEx(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 getElement(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_alert:["validateAlert"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_error:["validateError"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_max:["validateMax"],_min:["validateMin"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_shortKey:["validateShortKey"],_smartButton:["validateSmartButton"],_suggestions:["validateSuggestions"],_step:["validateStep"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}};KolInputNumber.style={default:KolInputNumberDefaultStyle0};export{KolInputNumber as kol_input_number};
4
+ import{h,F as Fragment,H as Host,r as registerInstance,g as getElement}from"./index-e850ccc2.js";import{w as watchValidator,y as watchString,j as watchBoolean,F as watchNumber,A as buildBadgeTextString,B as showExpertSlot}from"./index-7a63e9eb.js";import{l as KolInputTag}from"./component-names-4cb1c62b.js";import{n as nonce}from"./dev.utils-da85e627.js";import{p as propagateSubmitEventToForm}from"./controller-728fbdd1.js";import{g as getRenderStates}from"./controller-c87b8bd9.js";import{I as InternalUnderlinedBadgeText}from"./InternalUnderlinedBadgeText-40aac46d.js";import{I as InputIconController}from"./controller-icon-b3eb5a58.js";import{v as validateSuggestions}from"./suggestions-506c439a.js";import"./events-29e84d75.js";import"./associated.controller-d302adf7.js";import"./access-and-short-key-914780a7.js";import"./hide-label-0d754c8e.js";import"./label-7d1ce375.js";import"./tooltip-align-6964dd71.js";import"./align-f3101425.js";import"./icons-adcda9b0.js";class InputNumberController extends InputIconController{constructor(t,e,n){super(t,e,n),this.numberOrIsoDateRegex=/^\d+$|(^\d{4}-([0]\d|1[0-2])-([0-2]\d|3[01])([T ][0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?([+-][0-2]\d:[0-5]\d|Z)?)?$)|(^[0-2]\d:[0-5]\d(:[0-5]\d)?$)/,this.parseToString=t=>"string"==typeof t?t:"number"==typeof t?`${t}`:"object"==typeof t&&t instanceof Date?t.toISOString():"",this.validateIso8601=(t,e,n)=>{const i=parseFloat(e),a=i===e;return watchValidator(this.component,t,t=>void 0===t||""===t||a&&"number"==typeof i||this.numberOrIsoDateRegex.test(t),new Set(["number","Date","string{ISO-8601}"]),this.parseToString(e),{hooks:{afterPatch:t=>{"string"==typeof t&&n&&n(t)}}})},this.component=t}validateAutoComplete(t){watchValidator(this.component,"_autoComplete",t=>"string"==typeof t&&("on"===t||"off"===t),new Set(["on | off"]),t)}validateSuggestions(t){validateSuggestions(this.component,t)}onChange(t){super.onChange(t),!!t.target.value!=!!this.component._value&&(this.component._value=t.target.value)}validateMax(t){this.validateIso8601("_max",t)}validateMin(t){this.validateIso8601("_min",t)}validatePlaceholder(t){watchString(this.component,"_placeholder",t)}validateReadOnly(t){watchBoolean(this.component,"_readOnly",t)}validateRequired(t){watchBoolean(this.component,"_required",t)}validateStep(t){watchNumber(this.component,"_step",t)}validateValue(t){this.validateValueEx(t)}validateValueEx(t,e){this.validateIso8601("_value",t,e),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateMax(this.component._max),this.validateMin(this.component._min),this.validateSuggestions(this.component._suggestions),this.validatePlaceholder(this.component._placeholder),this.validateReadOnly(this.component._readOnly),this.validateRequired(this.component._required),this.validateStep(this.component._step),this.validateValue(this.component._value)}}const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n color: black;\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 /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%; /* 100% needed for custom width from outside */\n margin: 0;\n padding: 0;\n border: none;\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}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-tooltip-wc {\n display: contents;\n contain: layout;\n }\n .kol-tooltip-wc .tooltip-floating {\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n }\n /* Shared between content and arrow */\n .kol-tooltip-wc .tooltip-area {\n color: #000;\n background-color: #fff;\n }\n .kol-tooltip-wc .tooltip-arrow {\n transform: rotate(45deg);\n position: absolute;\n z-index: 999;\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip-wc .tooltip-content {\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 .required label > span::after,\n .required legend > span::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n input,\n textarea {\n cursor: text;\n }\n input[type=checkbox],\n input[type=color],\n input[type=file],\n input[type=radio],\n input[type=range],\n label,\n option,\n select {\n cursor: pointer;\n }\n /* input[type='checkbox'], */\n /* input[type='radio'], */\n /* input[type='range'], */\n input[type=color],\n input[type=date],\n input[type=datetime-local],\n input[type=email],\n input[type=file],\n input[type=month],\n input[type=number],\n input[type=password],\n input[type=search],\n input[type=tel],\n input[type=text],\n input[type=time],\n input[type=url],\n input[type=week],\n option,\n select,\n textarea {\n background-color: transparent;\n width: 100%;\n }\n /* needed hack for vertical alignment */\n input[type=file] {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 10) 0.5em;\n }\n /* needed hack for vertical alignment */\n select[multiple] option {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 2) 0.5em;\n }\n}\n@layer kol-component {\n .kol-alert-wc {\n display: grid;\n }\n .kol-alert-wc .heading {\n display: flex;\n place-items: center;\n }\n .kol-alert-wc .heading > div {\n flex-grow: 1;\n }\n .close {\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-input {\n display: grid;\n }\n .kol-input .input-slot {\n flex-grow: 1;\n }\n input:focus,\n option:focus,\n select:focus,\n textarea:focus {\n outline: 0;\n }\n .input {\n background-color: white;\n display: flex;\n align-items: center;\n cursor: pointer;\n }\n button:not([role=link]) {\n min-height: auto;\n }\n .input > .kol-icon {\n display: grid;\n place-items: center;\n }\n .kol-input.required .input-tooltip .span-label::after {\n content: \"*\";\n }\n}",KolInputNumberDefaultStyle0=defaultStyleCss,KolInputNumber=class{async getValue(){var t;return null===(t=this.inputRef)||void 0===t?void 0:t.value}async focus(){await this.kolFocus()}async kolFocus(){var t;null===(t=this.inputRef)||void 0===t||t.focus()}render(){const{ariaDescribedBy:t}=getRenderStates(this.state),e=Array.isArray(this.state._suggestions)&&this.state._suggestions.length>0,n=showExpertSlot(this.state._label);return h(Host,{key:"9a2aae0cd225fbfc9485ead318853ed29e412a4e",class:{"kol-input-number":!0,"has-value":this.state._hasValue}},h(KolInputTag,{key:"c14ef81d498de0b55146571ccd48ff133c39c0f9",class:{number:!0,"hide-label":!!this.state._hideLabel},_accessKey:this.state._accessKey,_alert:this.showAsAlert(),_disabled:this.state._disabled,_msg:this.state._msg,_hideError:this.state._hideError,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_icons:this.state._icons,_id:this.state._id,_label:this.state._label,_suggestions:this.state._suggestions,_readOnly:this.state._readOnly,_required:this.state._required,_shortKey:this.state._shortKey,_smartButton:this.state._smartButton,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched},h("span",{key:"8b4b88a454603fa88aa7a46d59d3b5fdf9717bd0",slot:"label"},n?h("slot",{name:"expert"}):"string"==typeof this.state._accessKey||"string"==typeof this.state._shortKey?h(Fragment,null,h(InternalUnderlinedBadgeText,{badgeText:buildBadgeTextString(this.state._accessKey,this.state._shortKey),label:this.state._label})," ",h("kbd",{class:"badge-text-hint","aria-hidden":"true"},buildBadgeTextString(this.state._accessKey,this.state._shortKey))):h("span",null,this.state._label)),h("div",{key:"8934f83d83685b71106f5006a28363f8579c5af1",slot:"input"},h("input",Object.assign({key:"fb15ab090dbe3bba5b5335b706d9358b9f231b04",ref:this.catchRef,title:"",accessKey:this.state._accessKey,"aria-describedby":t.length>0?t.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,autoCapitalize:"off",autoComplete:this.state._autoComplete,autoCorrect:"off",disabled:this.state._disabled,id:this.state._id,list:e?`${this.state._id}-list`:void 0,max:this.state._max,min:this.state._min,name:this.state._name,readOnly:this.state._readOnly,required:this.state._required,placeholder:this.state._placeholder,step:this.state._step,type:"number",value:this.state._value},this.controller.onFacade,{onKeyDown:this.onKeyDown,onFocus:t=>{this.controller.onFacade.onFocus(t),this.inputHasFocus=!0},onBlur:t=>{this.controller.onFacade.onBlur(t),this.inputHasFocus=!1}})))))}constructor(t){registerInstance(this,t),this.catchRef=t=>{this.inputRef=t},this.onKeyDown=t=>{"Enter"!==t.code&&"NumpadEnter"!==t.code||propagateSubmitEventToForm({form:this.host,ref:this.inputRef})},this._accessKey=void 0,this._alert=void 0,this._autoComplete=void 0,this._disabled=!1,this._error=void 0,this._hideError=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._max=void 0,this._min=void 0,this._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._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_autoComplete:"off",_hasValue:!1,_hideError:!1,_id:`id-${nonce()}`,_label:"",_suggestions:[]},this.inputHasFocus=!1,this.controller=new InputNumberController(this,"number",this.host)}showAsAlert(){return void 0===this.state._alert?Boolean(this.state._touched)&&!this.inputHasFocus:this.state._alert}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAlert(t){this.controller.validateAlert(t)}validateAutoComplete(t){this.controller.validateAutoComplete(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateError(t){this.controller.validateError(t)}validateHideError(t){this.controller.validateHideError(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateMax(t){this.controller.validateMax(t)}validateMin(t){this.controller.validateMin(t)}validateMsg(t){this.controller.validateMsg(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(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)}validateSuggestions(t){this.controller.validateSuggestions(t)}validateStep(t){this.controller.validateStep(t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTabIndex(t){this.controller.validateTabIndex(t)}validateTouched(t){this.controller.validateTouched(t)}validateValue(t){this.controller.validateValueEx(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 getElement(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_alert:["validateAlert"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_error:["validateError"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_max:["validateMax"],_min:["validateMin"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_shortKey:["validateShortKey"],_smartButton:["validateSmartButton"],_suggestions:["validateSuggestions"],_step:["validateStep"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}};KolInputNumber.style={default:KolInputNumberDefaultStyle0};export{KolInputNumber as kol_input_number};