@public-ui/components 1.5.0-rc.17 → 1.5.0-rc.18

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 (304) hide show
  1. package/cheat-sheet.html +36 -21
  2. package/custom-elements.json +30 -4
  3. package/dist/cjs/{app-globals-0cf91d90.js → app-globals-33f93589.js} +1 -1
  4. package/dist/cjs/{app-globals-0cf91d90.js.map → app-globals-33f93589.js.map} +1 -1
  5. package/dist/cjs/button-link-19d8a9a8.js.map +1 -1
  6. package/dist/cjs/{controller-073aa3b2.js → controller-43eacc77.js} +1 -1
  7. package/dist/cjs/{controller-073aa3b2.js.map → controller-43eacc77.js.map} +1 -1
  8. package/dist/cjs/{controller-536f457e.js → controller-521c7ae9.js} +1 -1
  9. package/dist/cjs/{controller-536f457e.js.map → controller-521c7ae9.js.map} +1 -1
  10. package/dist/cjs/{controller-46148a56.js → controller-7f4b0caf.js} +1 -1
  11. package/dist/cjs/{controller-46148a56.js.map → controller-7f4b0caf.js.map} +1 -1
  12. package/dist/cjs/{controller-272d14fd.js → controller-87980d4a.js} +1 -1
  13. package/dist/cjs/{controller-272d14fd.js.map → controller-87980d4a.js.map} +1 -1
  14. package/dist/cjs/{controller-icon-f01acf97.js → controller-icon-0a88c097.js} +1 -1
  15. package/dist/cjs/{controller-icon-f01acf97.js.map → controller-icon-0a88c097.js.map} +1 -1
  16. package/dist/cjs/{i18n-32046f50.js → i18n-c10806ae.js} +1 -1
  17. package/dist/cjs/{i18n-32046f50.js.map → i18n-c10806ae.js.map} +1 -1
  18. package/dist/cjs/index-b6484e6a.js +4 -0
  19. package/dist/cjs/index-b6484e6a.js.map +1 -0
  20. package/dist/cjs/index.cjs.js +1 -1
  21. package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
  22. package/dist/cjs/kol-accordion.cjs.entry.js.map +1 -1
  23. package/dist/cjs/kol-alert.cjs.entry.js +1 -1
  24. package/dist/cjs/kol-badge.cjs.entry.js +1 -1
  25. package/dist/cjs/kol-badge.cjs.entry.js.map +1 -1
  26. package/dist/cjs/kol-form.cjs.entry.js +1 -1
  27. package/dist/cjs/kol-icon.cjs.entry.js +1 -1
  28. package/dist/cjs/kol-icon.cjs.entry.js.map +1 -1
  29. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  30. package/dist/cjs/kol-input-checkbox.cjs.entry.js.map +1 -1
  31. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  32. package/dist/cjs/kol-input-color.cjs.entry.js.map +1 -1
  33. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  34. package/dist/cjs/kol-input-email.cjs.entry.js.map +1 -1
  35. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  36. package/dist/cjs/kol-input-file.cjs.entry.js.map +1 -1
  37. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  38. package/dist/cjs/kol-input-number.cjs.entry.js.map +1 -1
  39. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  40. package/dist/cjs/kol-input-password.cjs.entry.js.map +1 -1
  41. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  42. package/dist/cjs/kol-input-radio.cjs.entry.js.map +1 -1
  43. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  44. package/dist/cjs/kol-input-range.cjs.entry.js.map +1 -1
  45. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  46. package/dist/cjs/kol-input-text.cjs.entry.js.map +1 -1
  47. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  48. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  49. package/dist/cjs/kol-link-button.cjs.entry.js.map +1 -1
  50. package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
  51. package/dist/cjs/kol-link-wc.cjs.entry.js.map +1 -1
  52. package/dist/cjs/kol-link.cjs.entry.js +1 -1
  53. package/dist/cjs/kol-link.cjs.entry.js.map +1 -1
  54. package/dist/cjs/kol-logo.cjs.entry.js +1 -1
  55. package/dist/cjs/kol-nav.cjs.entry.js +1 -1
  56. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  57. package/dist/cjs/kol-popover.cjs.entry.js +1 -1
  58. package/dist/cjs/kol-popover.cjs.entry.js.map +1 -1
  59. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  60. package/dist/cjs/kol-progress.cjs.entry.js.map +1 -1
  61. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  62. package/dist/cjs/kol-select.cjs.entry.js.map +1 -1
  63. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  64. package/dist/cjs/kol-symbol.cjs.entry.js +1 -1
  65. package/dist/cjs/kol-table.cjs.entry.js +1 -1
  66. package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
  67. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  68. package/dist/cjs/kol-textarea.cjs.entry.js.map +1 -1
  69. package/dist/cjs/kol-toast.cjs.entry.js +1 -1
  70. package/dist/cjs/kol-toast.cjs.entry.js.map +1 -1
  71. package/dist/cjs/kol-tooltip.cjs.entry.js +1 -1
  72. package/dist/cjs/kol-tooltip.cjs.entry.js.map +1 -1
  73. package/dist/cjs/kolibri.cjs.js +1 -1
  74. package/dist/cjs/loader.cjs.js +1 -1
  75. package/dist/cjs/{open-fd1ca478.js → show-878e36a5.js} +1 -1
  76. package/dist/cjs/show-878e36a5.js.map +1 -0
  77. package/dist/components/component.js +1 -1
  78. package/dist/components/component.js.map +1 -1
  79. package/dist/components/component12.js +1 -1
  80. package/dist/components/component12.js.map +1 -1
  81. package/dist/components/component13.js +1 -1
  82. package/dist/components/component13.js.map +1 -1
  83. package/dist/components/component15.js +1 -1
  84. package/dist/components/component15.js.map +1 -1
  85. package/dist/components/component2.js +1 -1
  86. package/dist/components/component2.js.map +1 -1
  87. package/dist/components/component7.js +1 -1
  88. package/dist/components/component7.js.map +1 -1
  89. package/dist/components/component8.js +1 -1
  90. package/dist/components/component8.js.map +1 -1
  91. package/dist/components/controller.js +1 -1
  92. package/dist/components/controller.js.map +1 -1
  93. package/dist/components/i18n.js +1 -1
  94. package/dist/components/i18n.js.map +1 -1
  95. package/dist/components/kol-accordion.js +1 -1
  96. package/dist/components/kol-accordion.js.map +1 -1
  97. package/dist/components/kol-input-checkbox.js +1 -1
  98. package/dist/components/kol-input-checkbox.js.map +1 -1
  99. package/dist/components/kol-input-color.js +1 -1
  100. package/dist/components/kol-input-color.js.map +1 -1
  101. package/dist/components/kol-input-email.js +1 -1
  102. package/dist/components/kol-input-email.js.map +1 -1
  103. package/dist/components/kol-input-file.js +1 -1
  104. package/dist/components/kol-input-file.js.map +1 -1
  105. package/dist/components/kol-input-password.js +1 -1
  106. package/dist/components/kol-input-password.js.map +1 -1
  107. package/dist/components/kol-input-range.js +1 -1
  108. package/dist/components/kol-input-range.js.map +1 -1
  109. package/dist/components/kol-input-text.js +1 -1
  110. package/dist/components/kol-input-text.js.map +1 -1
  111. package/dist/components/kol-link-button.js +1 -1
  112. package/dist/components/kol-link-button.js.map +1 -1
  113. package/dist/components/kol-popover.js +1 -1
  114. package/dist/components/kol-popover.js.map +1 -1
  115. package/dist/components/kol-progress.js +1 -1
  116. package/dist/components/kol-progress.js.map +1 -1
  117. package/dist/components/kol-textarea.js +1 -1
  118. package/dist/components/kol-textarea.js.map +1 -1
  119. package/dist/components/kol-toast.js +1 -1
  120. package/dist/components/kol-toast.js.map +1 -1
  121. package/dist/components/shadow.js +1 -1
  122. package/dist/components/shadow.js.map +1 -1
  123. package/dist/components/{open.js → show.js} +1 -1
  124. package/dist/components/show.js.map +1 -0
  125. package/dist/esm/{app-globals-84870228.js → app-globals-e0ff5b32.js} +1 -1
  126. package/dist/esm/{app-globals-84870228.js.map → app-globals-e0ff5b32.js.map} +1 -1
  127. package/dist/esm/button-link-0f3cba87.js.map +1 -1
  128. package/dist/esm/{controller-22781e1d.js → controller-29e1bd76.js} +1 -1
  129. package/dist/esm/{controller-22781e1d.js.map → controller-29e1bd76.js.map} +1 -1
  130. package/dist/esm/{controller-cbcb5b86.js → controller-37d0d40b.js} +1 -1
  131. package/dist/esm/{controller-cbcb5b86.js.map → controller-37d0d40b.js.map} +1 -1
  132. package/dist/esm/{controller-a9333e53.js → controller-38789301.js} +1 -1
  133. package/dist/esm/{controller-a9333e53.js.map → controller-38789301.js.map} +1 -1
  134. package/dist/esm/{controller-0f18a72b.js → controller-c5b419c7.js} +1 -1
  135. package/dist/esm/{controller-0f18a72b.js.map → controller-c5b419c7.js.map} +1 -1
  136. package/dist/esm/{controller-icon-8695323b.js → controller-icon-6249a817.js} +1 -1
  137. package/dist/esm/{controller-icon-8695323b.js.map → controller-icon-6249a817.js.map} +1 -1
  138. package/dist/esm/{i18n-c97dc260.js → i18n-cbc21d6e.js} +1 -1
  139. package/dist/esm/{i18n-c97dc260.js.map → i18n-cbc21d6e.js.map} +1 -1
  140. package/dist/esm/index-fef6600b.js +4 -0
  141. package/dist/esm/index-fef6600b.js.map +1 -0
  142. package/dist/esm/index.js +1 -1
  143. package/dist/esm/kol-accordion.entry.js +1 -1
  144. package/dist/esm/kol-accordion.entry.js.map +1 -1
  145. package/dist/esm/kol-alert.entry.js +1 -1
  146. package/dist/esm/kol-badge.entry.js +1 -1
  147. package/dist/esm/kol-badge.entry.js.map +1 -1
  148. package/dist/esm/kol-form.entry.js +1 -1
  149. package/dist/esm/kol-icon.entry.js +1 -1
  150. package/dist/esm/kol-icon.entry.js.map +1 -1
  151. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  152. package/dist/esm/kol-input-checkbox.entry.js.map +1 -1
  153. package/dist/esm/kol-input-color.entry.js +1 -1
  154. package/dist/esm/kol-input-color.entry.js.map +1 -1
  155. package/dist/esm/kol-input-email.entry.js +1 -1
  156. package/dist/esm/kol-input-email.entry.js.map +1 -1
  157. package/dist/esm/kol-input-file.entry.js +1 -1
  158. package/dist/esm/kol-input-file.entry.js.map +1 -1
  159. package/dist/esm/kol-input-number.entry.js +1 -1
  160. package/dist/esm/kol-input-number.entry.js.map +1 -1
  161. package/dist/esm/kol-input-password.entry.js +1 -1
  162. package/dist/esm/kol-input-password.entry.js.map +1 -1
  163. package/dist/esm/kol-input-radio.entry.js +1 -1
  164. package/dist/esm/kol-input-radio.entry.js.map +1 -1
  165. package/dist/esm/kol-input-range.entry.js +1 -1
  166. package/dist/esm/kol-input-range.entry.js.map +1 -1
  167. package/dist/esm/kol-input-text.entry.js +1 -1
  168. package/dist/esm/kol-input-text.entry.js.map +1 -1
  169. package/dist/esm/kol-kolibri.entry.js +1 -1
  170. package/dist/esm/kol-link-button.entry.js +1 -1
  171. package/dist/esm/kol-link-button.entry.js.map +1 -1
  172. package/dist/esm/kol-link-wc.entry.js +1 -1
  173. package/dist/esm/kol-link-wc.entry.js.map +1 -1
  174. package/dist/esm/kol-link.entry.js +1 -1
  175. package/dist/esm/kol-link.entry.js.map +1 -1
  176. package/dist/esm/kol-logo.entry.js +1 -1
  177. package/dist/esm/kol-nav.entry.js +1 -1
  178. package/dist/esm/kol-pagination.entry.js +1 -1
  179. package/dist/esm/kol-popover.entry.js +1 -1
  180. package/dist/esm/kol-popover.entry.js.map +1 -1
  181. package/dist/esm/kol-progress.entry.js +1 -1
  182. package/dist/esm/kol-progress.entry.js.map +1 -1
  183. package/dist/esm/kol-select.entry.js +1 -1
  184. package/dist/esm/kol-select.entry.js.map +1 -1
  185. package/dist/esm/kol-spin.entry.js +1 -1
  186. package/dist/esm/kol-symbol.entry.js +1 -1
  187. package/dist/esm/kol-table.entry.js +1 -1
  188. package/dist/esm/kol-tabs.entry.js +1 -1
  189. package/dist/esm/kol-textarea.entry.js +1 -1
  190. package/dist/esm/kol-textarea.entry.js.map +1 -1
  191. package/dist/esm/kol-toast.entry.js +1 -1
  192. package/dist/esm/kol-toast.entry.js.map +1 -1
  193. package/dist/esm/kol-tooltip.entry.js +1 -1
  194. package/dist/esm/kol-tooltip.entry.js.map +1 -1
  195. package/dist/esm/kolibri.js +1 -1
  196. package/dist/esm/loader.js +1 -1
  197. package/dist/esm/{open-7d64cfaf.js → show-c455f9fd.js} +1 -1
  198. package/dist/esm/show-c455f9fd.js.map +1 -0
  199. package/dist/kolibri/app-globals-e0ff5b32.js +4 -0
  200. package/dist/kolibri/assets/progress-simulation.js +1 -1
  201. package/dist/kolibri/button-link-0f3cba87.js.map +1 -1
  202. package/dist/kolibri/{controller-22781e1d.js → controller-29e1bd76.js} +1 -1
  203. package/dist/kolibri/{controller-cbcb5b86.js → controller-37d0d40b.js} +1 -1
  204. package/dist/kolibri/{controller-cbcb5b86.js.map → controller-37d0d40b.js.map} +1 -1
  205. package/dist/kolibri/{controller-a9333e53.js → controller-38789301.js} +1 -1
  206. package/dist/kolibri/{controller-0f18a72b.js → controller-c5b419c7.js} +1 -1
  207. package/dist/kolibri/{controller-icon-8695323b.js → controller-icon-6249a817.js} +1 -1
  208. package/dist/kolibri/{i18n-c97dc260.js → i18n-cbc21d6e.js} +1 -1
  209. package/dist/kolibri/index-fef6600b.js +4 -0
  210. package/dist/kolibri/index-fef6600b.js.map +1 -0
  211. package/dist/kolibri/index.esm.js +1 -1
  212. package/dist/kolibri/kol-accordion.entry.js +1 -1
  213. package/dist/kolibri/kol-accordion.entry.js.map +1 -1
  214. package/dist/kolibri/kol-alert.entry.js +1 -1
  215. package/dist/kolibri/kol-badge.entry.js +1 -1
  216. package/dist/kolibri/kol-badge.entry.js.map +1 -1
  217. package/dist/kolibri/kol-form.entry.js +1 -1
  218. package/dist/kolibri/kol-icon.entry.js +1 -1
  219. package/dist/kolibri/kol-icon.entry.js.map +1 -1
  220. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  221. package/dist/kolibri/kol-input-checkbox.entry.js.map +1 -1
  222. package/dist/kolibri/kol-input-color.entry.js +1 -1
  223. package/dist/kolibri/kol-input-color.entry.js.map +1 -1
  224. package/dist/kolibri/kol-input-email.entry.js +1 -1
  225. package/dist/kolibri/kol-input-email.entry.js.map +1 -1
  226. package/dist/kolibri/kol-input-file.entry.js +1 -1
  227. package/dist/kolibri/kol-input-file.entry.js.map +1 -1
  228. package/dist/kolibri/kol-input-number.entry.js +1 -1
  229. package/dist/kolibri/kol-input-number.entry.js.map +1 -1
  230. package/dist/kolibri/kol-input-password.entry.js +1 -1
  231. package/dist/kolibri/kol-input-password.entry.js.map +1 -1
  232. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  233. package/dist/kolibri/kol-input-radio.entry.js.map +1 -1
  234. package/dist/kolibri/kol-input-range.entry.js +1 -1
  235. package/dist/kolibri/kol-input-range.entry.js.map +1 -1
  236. package/dist/kolibri/kol-input-text.entry.js +1 -1
  237. package/dist/kolibri/kol-input-text.entry.js.map +1 -1
  238. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  239. package/dist/kolibri/kol-link-button.entry.js +1 -1
  240. package/dist/kolibri/kol-link-button.entry.js.map +1 -1
  241. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  242. package/dist/kolibri/kol-link-wc.entry.js.map +1 -1
  243. package/dist/kolibri/kol-link.entry.js +1 -1
  244. package/dist/kolibri/kol-link.entry.js.map +1 -1
  245. package/dist/kolibri/kol-logo.entry.js +1 -1
  246. package/dist/kolibri/kol-nav.entry.js +1 -1
  247. package/dist/kolibri/kol-pagination.entry.js +1 -1
  248. package/dist/kolibri/kol-popover.entry.js +1 -1
  249. package/dist/kolibri/kol-popover.entry.js.map +1 -1
  250. package/dist/kolibri/kol-progress.entry.js +1 -1
  251. package/dist/kolibri/kol-progress.entry.js.map +1 -1
  252. package/dist/kolibri/kol-select.entry.js +1 -1
  253. package/dist/kolibri/kol-select.entry.js.map +1 -1
  254. package/dist/kolibri/kol-spin.entry.js +1 -1
  255. package/dist/kolibri/kol-symbol.entry.js +1 -1
  256. package/dist/kolibri/kol-table.entry.js +1 -1
  257. package/dist/kolibri/kol-tabs.entry.js +1 -1
  258. package/dist/kolibri/kol-textarea.entry.js +1 -1
  259. package/dist/kolibri/kol-textarea.entry.js.map +1 -1
  260. package/dist/kolibri/kol-toast.entry.js +1 -1
  261. package/dist/kolibri/kol-toast.entry.js.map +1 -1
  262. package/dist/kolibri/kol-tooltip.entry.js +1 -1
  263. package/dist/kolibri/kol-tooltip.entry.js.map +1 -1
  264. package/dist/kolibri/kolibri.esm.js +1 -1
  265. package/dist/kolibri/kolibri.esm.js.map +1 -1
  266. package/dist/kolibri/show-c455f9fd.js +4 -0
  267. package/dist/kolibri/show-c455f9fd.js.map +1 -0
  268. package/dist/types/components/input/controller.d.ts +1 -1
  269. package/dist/types/components/input-checkbox/types.d.ts +1 -1
  270. package/dist/types/components/link/component.d.ts +2 -0
  271. package/dist/types/components/link/shadow.d.ts +1 -0
  272. package/dist/types/components/link-button/component.d.ts +1 -0
  273. package/dist/types/components/popover/shadow.d.ts +7 -5
  274. package/dist/types/components/progress/component.d.ts +6 -0
  275. package/dist/types/components.d.ts +42 -2
  276. package/dist/types/types/button-link.d.ts +3 -4
  277. package/dist/types/types/props/download.d.ts +5 -0
  278. package/dist/types/types/props/index.d.ts +1 -1
  279. package/doc/input-checkbox.md +2 -2
  280. package/doc/link-button.md +1 -0
  281. package/doc/link.md +1 -0
  282. package/doc/popover.md +1 -1
  283. package/doc/progress.md +8 -6
  284. package/jest-test-results.json +1 -1
  285. package/package.json +1 -1
  286. package/vscode-custom-data.json +23 -1
  287. package/dist/cjs/index-a96d7f87.js +0 -4
  288. package/dist/cjs/index-a96d7f87.js.map +0 -1
  289. package/dist/cjs/open-fd1ca478.js.map +0 -1
  290. package/dist/components/open.js.map +0 -1
  291. package/dist/esm/index-a007a589.js +0 -4
  292. package/dist/esm/index-a007a589.js.map +0 -1
  293. package/dist/esm/open-7d64cfaf.js.map +0 -1
  294. package/dist/kolibri/app-globals-84870228.js +0 -4
  295. package/dist/kolibri/index-a007a589.js +0 -4
  296. package/dist/kolibri/index-a007a589.js.map +0 -1
  297. package/dist/kolibri/open-7d64cfaf.js +0 -4
  298. package/dist/kolibri/open-7d64cfaf.js.map +0 -1
  299. /package/dist/kolibri/{app-globals-84870228.js.map → app-globals-e0ff5b32.js.map} +0 -0
  300. /package/dist/kolibri/{controller-22781e1d.js.map → controller-29e1bd76.js.map} +0 -0
  301. /package/dist/kolibri/{controller-a9333e53.js.map → controller-38789301.js.map} +0 -0
  302. /package/dist/kolibri/{controller-0f18a72b.js.map → controller-c5b419c7.js.map} +0 -0
  303. /package/dist/kolibri/{controller-icon-8695323b.js.map → controller-icon-6249a817.js.map} +0 -0
  304. /package/dist/kolibri/{i18n-c97dc260.js.map → i18n-cbc21d6e.js.map} +0 -0
package/cheat-sheet.html CHANGED
@@ -9,9 +9,9 @@
9
9
  <link href="https://fonts.cdnfonts.com/css/roboto" rel="stylesheet" />
10
10
  <link href="https://use.fontawesome.com/releases/v6.2.1/css/all.css" rel="stylesheet" />
11
11
  <script type="module">
12
- import { register } from 'https://esm.sh/@public-ui/components@1.5.0-rc.17';
13
- import { defineCustomElements } from 'https://esm.sh/@public-ui/components@1.5.0-rc.17/dist/loader';
14
- import { ITZBund } from 'https://esm.sh/@public-ui/themes@1.5.0-rc.17';
12
+ import { register } from 'https://esm.sh/@public-ui/components@1.5.0-rc.18';
13
+ import { defineCustomElements } from 'https://esm.sh/@public-ui/components@1.5.0-rc.18/dist/loader';
14
+ import { ITZBund } from 'https://esm.sh/@public-ui/themes@1.5.0-rc.18';
15
15
  register(ITZBund, defineCustomElements)
16
16
  .then(() => {})
17
17
  .catch(console.warn);
@@ -78,9 +78,9 @@
78
78
  <pre>
79
79
  <code class="language-html">&#60;head&#62;
80
80
  &#60;script type="module"&#62;
81
- import { register } from 'https://esm.sh/@public-ui/components@1.5.0-rc.17';
82
- import { defineCustomElements } from 'https://esm.sh/@public-ui/components@1.5.0-rc.17/dist/loader';
83
- import { ITZBund } from 'https://esm.sh/@public-ui/themes@1.5.0-rc.17';
81
+ import { register } from 'https://esm.sh/@public-ui/components@1.5.0-rc.18';
82
+ import { defineCustomElements } from 'https://esm.sh/@public-ui/components@1.5.0-rc.18/dist/loader';
83
+ import { ITZBund } from 'https://esm.sh/@public-ui/themes@1.5.0-rc.18';
84
84
  register([ITZBund], [defineCustomElements])
85
85
  .then(() =&#62; {})
86
86
  .catch(console.warn);
@@ -294,12 +294,12 @@ Aktuell werden die Icons von <kol-link _href="https://microsoft.github.io/vscode
294
294
 
295
295
  Beachten Sie, dass die Komponente automatisch ein Padding links und rechts zum umgebenden Text erzeugt. Sie kann daher im Fließtext ohne
296
296
  Eingabe von Leerzeichen eingefügt werden. Zusätzliche Leerzeichen vergrößern den Abstand zum umgebenden Text.`,
297
- props: `_aria-controls, _aria-current, _aria-expanded, _aria-label, _aria-selected, _disabled, _href, _icon, _icon-align, _icon-only, _label, _role, _selector, _stealth, _tab-index, _target, _target-description, _tooltip-align, _use-case`
297
+ props: `_aria-controls, _aria-current, _aria-expanded, _aria-label, _aria-selected, _disabled, _download, _href, _icon, _icon-align, _icon-only, _label, _role, _selector, _stealth, _tab-index, _target, _target-description, _tooltip-align, _use-case`
298
298
  },{
299
299
  name: `link-button`,
300
300
  desc: `Der LinkButton ist semantisch ein Link und hat das Design eines Buttons. Hierzu werden alle relevanten Properties der Link-Komponente übernommen und um die Design-bestimmenden Properties des Buttons erweitert.
301
301
  Weitere Informationen zum Aussehen finden Sie auf der <kol-link _href="/docs/components/button" _label="Seite des Buttons"></kol-link>.`,
302
- props: `_aria-controls, _aria-current, _aria-expanded, _aria-label, _aria-selected, _custom-class, _disabled, _href, _icon, _icon-only, _label, _role, _tab-index, _target, _target-description, _tooltip-align, _variant`
302
+ props: `_aria-controls, _aria-current, _aria-expanded, _aria-label, _aria-selected, _custom-class, _disabled, _download, _href, _icon, _icon-only, _label, _role, _tab-index, _target, _target-description, _tooltip-align, _variant`
303
303
  },{
304
304
  name: `modal`,
305
305
  desc: `Mit Hilfe der **Modal**-Komponente können zusätzliche Informationen oder auch Eingabeformulare in einem Dialogfenster angezeigt werden. Ein offenes **Modal** kann via **ESC** geschlossen werden.
@@ -325,11 +325,11 @@ noch die Icons ausgegeben.`,
325
325
  name: `popover`,
326
326
  desc: `Die **Popover**-Komponente stellt eine Möglichkeit dar zusätzliche Inhalte in ein temporäres Element zu setzen, das, ähnlich wie <kol-link _href="" _label="Tooltip"></kol-link>, um sein Triggerelement angeordnet ist.
327
327
  Das Triggerelement ist immer das im HTML vorangehende Element (previousSibling).`,
328
- props: `_alignment, _open`
328
+ props: `_alignment, _show`
329
329
  },{
330
330
  name: `progress`,
331
331
  desc: `Die **Progress**-Komponente erzeugt einen Fortschrittsbalken, über den eine optische Rückmeldung gegeben werden kann.`,
332
- props: `_max, _type, _unit, _value`
332
+ props: `_description, _max, _show-unit, _type, _unit, _value`
333
333
  },{
334
334
  name: `quote`,
335
335
  desc: `Die **Quote**-Komponente verfügt über zwei Varianten, eine kurze Fließtext-('inline') und eine eingerückte('block') Variante. Beide Varianten enthalten einen Link auf die Quelle des Zitates.`,
@@ -489,7 +489,7 @@ Ein geöffneter Tooltip lässt sich mit der 'Escape'-Taste schließen, um ggf.
489
489
  },{
490
490
  name: `_type`,
491
491
  desc: `Gibt an, ob der Prozess als Balken oder Kreis dargestellt wird.`,
492
- types: `"bar" | "cycle", "button" | "checkbox" | "switch", "button" | "reset" | "submit", "date" | "datetime-local" | "month" | "number" | "time" | "week", "date" | "datetime-local" | "month" | "time" | "week", "default" | "error" | "info" | "success" | "warning", "search" | "tel" | "text" | "url"`,
492
+ types: `"bar" | "cycle", "button" | "checkbox" | "default" | "switch", "button" | "reset" | "submit", "date" | "datetime-local" | "month" | "number" | "time" | "week", "date" | "datetime-local" | "month" | "time" | "week", "default" | "error" | "info" | "success" | "warning", "search" | "tel" | "text" | "url"`,
493
493
  comps: `alert, button, button-link, input-checkbox, input-date, input-number, input-text, progress, toast`
494
494
  },{
495
495
  name: `_list`,
@@ -499,7 +499,7 @@ Ein geöffneter Tooltip lässt sich mit der 'Escape'-Taste schließen, um ggf.
499
499
  },{
500
500
  name: `_variant`,
501
501
  desc: `Gibt an, welche Ausprägung der Button hat.`,
502
- types: `"block" | "inline", "button" | "checkbox" | "switch", "card" | "msg", "custom" | "danger" | "ghost" | "normal" | "primary" | "secondary", "primary" | "secondary"`,
502
+ types: `"block" | "inline", "button" | "checkbox" | "default" | "switch", "card" | "msg", "custom" | "danger" | "ghost" | "normal" | "primary" | "secondary", "primary" | "secondary"`,
503
503
  comps: `alert, button, input-checkbox, link-button, nav, pagination, quote`
504
504
  },{
505
505
  name: `_label`,
@@ -591,16 +591,16 @@ Ein geöffneter Tooltip lässt sich mit der 'Escape'-Taste schließen, um ggf.
591
591
  desc: `Gibt den Minimalwert des Eingabefeldes an.`,
592
592
  types: `Date | &#96;&#36;{number}-&#36;{number}-&#36;{number}T&#36;{number}:&#36;{number}:&#36;{number}&#96; | &#96;&#36;{number}-&#36;{number}-&#36;{number}T&#36;{number}:&#36;{number}&#96; | &#96;&#36;{number}-&#36;{number}-&#36;{number}&#96; | &#96;&#36;{number}-&#36;{number}&#96; | &#96;&#36;{number}-W&#36;{number}&#96; | &#96;&#36;{number}:&#36;{number}:&#36;{number}&#96; | &#96;&#36;{number}:&#36;{number}&#96;, &#96;&#36;{number}-&#36;{number}-&#36;{number}T&#36;{number}:&#36;{number}:&#36;{number}&#96; | &#96;&#36;{number}-&#36;{number}-&#36;{number}T&#36;{number}:&#36;{number}&#96; | &#96;&#36;{number}-&#36;{number}-&#36;{number}&#96; | &#96;&#36;{number}-&#36;{number}&#96; | &#96;&#36;{number}-W&#36;{number}&#96; | &#96;&#36;{number}:&#36;{number}:&#36;{number}&#96; | &#96;&#36;{number}:&#36;{number}&#96; | number, number`,
593
593
  comps: `input-date, input-number, input-range`
594
+ },{
595
+ name: `_show`,
596
+ desc: `Gibt an, ob der Toast eingeblendet wird.`,
597
+ types: `boolean`,
598
+ comps: `popover, spin, toast`
594
599
  },{
595
600
  name: `_pattern`,
596
601
  desc: `Gibt ein Prüfmuster für das Eingabefeld an.`,
597
602
  types: `string`,
598
603
  comps: `input-email, input-password, input-text`
599
- },{
600
- name: `_open`,
601
- desc: `Gibt an, ob das Accordion geöffnet ist.`,
602
- types: `boolean`,
603
- comps: `accordion, details, popover`
604
604
  },{
605
605
  name: `_multiple`,
606
606
  desc: `Gibt an, ob mehrere Werte eingegeben werden können.`,
@@ -632,15 +632,20 @@ Ein geöffneter Tooltip lässt sich mit der 'Escape'-Taste schließen, um ggf.
632
632
  types: `string`,
633
633
  comps: `link, link-button`
634
634
  },{
635
- name: `_show`,
636
- desc: `Gibt an, ob der Toast eingeblendet wird.`,
637
- types: `boolean`,
638
- comps: `spin, toast`
635
+ name: `_download`,
636
+ desc: `Teilt dem Browser mit, dass sich hinter dem Link eine Datei befindet. Setzt optional den Dateinamen.`,
637
+ types: `boolean | string`,
638
+ comps: `link, link-button`
639
639
  },{
640
640
  name: `_orientation`,
641
641
  desc: `Gibt die Ausrichtung der LinkList an.`,
642
642
  types: `"horizontal" | "vertical"`,
643
643
  comps: `input-radio, nav`
644
+ },{
645
+ name: `_open`,
646
+ desc: `Gibt an, ob das Accordion geöffnet ist.`,
647
+ types: `boolean`,
648
+ comps: `accordion, details`
644
649
  },{
645
650
  name: `_icon-align`,
646
651
  desc: `Gibt an, ob das Icon entweder links oder rechts dargestellt werden soll.`,
@@ -681,6 +686,16 @@ Ein geöffneter Tooltip lässt sich mit der 'Escape'-Taste schließen, um ggf.
681
686
  desc: `Setzt die Einheit der Fortschrittswerte. (wird nicht angezeigt)`,
682
687
  types: `string`,
683
688
  comps: `progress`
689
+ },{
690
+ name: `_show-unit`,
691
+ desc: `Zeigt die Einheit der Fortschrittswerte an.`,
692
+ types: `boolean`,
693
+ comps: `progress`
694
+ },{
695
+ name: `_description`,
696
+ desc: `Setzt die Beschreibung der Fortschrittsanzeige.`,
697
+ types: `string`,
698
+ comps: `progress`
684
699
  },{
685
700
  name: `_total`,
686
701
  desc: `Setzt die Gesamtanzahl der Seiten.`,
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.5.0-rc.17",
2
+ "version": "1.5.0-rc.18",
3
3
  "tags": [
4
4
  {
5
5
  "name": "kol-abbr",
@@ -837,7 +837,7 @@
837
837
  },
838
838
  {
839
839
  "name": "_type",
840
- "type": "\"button\" | \"checkbox\" | \"switch\" | undefined",
840
+ "type": "\"button\" | \"checkbox\" | \"default\" | \"switch\" | undefined",
841
841
  "description": "Gibt an, welchen Type das Input haben soll.",
842
842
  "required": false
843
843
  },
@@ -849,7 +849,7 @@
849
849
  },
850
850
  {
851
851
  "name": "_variant",
852
- "type": "\"button\" | \"checkbox\" | \"switch\" | undefined",
852
+ "type": "\"button\" | \"checkbox\" | \"default\" | \"switch\" | undefined",
853
853
  "description": "Gibt an, welchen Type das Input haben soll.",
854
854
  "required": false
855
855
  }
@@ -2132,6 +2132,13 @@
2132
2132
  "defaultValue": "false",
2133
2133
  "required": false
2134
2134
  },
2135
+ {
2136
+ "name": "_download",
2137
+ "type": "boolean | string | undefined",
2138
+ "description": "Teilt dem Browser mit, dass sich hinter dem Link eine Datei befindet. Setzt optional den Dateinamen.",
2139
+ "defaultValue": "false",
2140
+ "required": false
2141
+ },
2135
2142
  {
2136
2143
  "name": "_href",
2137
2144
  "type": "string",
@@ -2269,6 +2276,13 @@
2269
2276
  "defaultValue": "false",
2270
2277
  "required": false
2271
2278
  },
2279
+ {
2280
+ "name": "_download",
2281
+ "type": "boolean | string | undefined",
2282
+ "description": "Teilt dem Browser mit, dass sich hinter dem Link eine Datei befindet. Setzt optional den Dateinamen.",
2283
+ "defaultValue": "false",
2284
+ "required": false
2285
+ },
2272
2286
  {
2273
2287
  "name": "_href",
2274
2288
  "type": "string",
@@ -2596,7 +2610,7 @@
2596
2610
  "required": false
2597
2611
  },
2598
2612
  {
2599
- "name": "_open",
2613
+ "name": "_show",
2600
2614
  "type": "boolean | undefined",
2601
2615
  "description": "Öffnet/schließt das Popover.",
2602
2616
  "defaultValue": "false",
@@ -2613,12 +2627,24 @@
2613
2627
  "name": "kol-progress",
2614
2628
  "description": "Die **Progress**-Komponente erzeugt einen Fortschrittsbalken, über den eine optische Rückmeldung gegeben werden kann.",
2615
2629
  "attributes": [
2630
+ {
2631
+ "name": "_description",
2632
+ "type": "string | undefined",
2633
+ "description": "Setzt die Beschreibung der Fortschrittsanzeige.",
2634
+ "required": false
2635
+ },
2616
2636
  {
2617
2637
  "name": "_max",
2618
2638
  "type": "number",
2619
2639
  "description": "Gibt an, bei welchem Wert die Fortschrittsanzeige abgeschlossen ist.",
2620
2640
  "required": true
2621
2641
  },
2642
+ {
2643
+ "name": "_show-unit",
2644
+ "type": "boolean | undefined",
2645
+ "description": "Zeigt die Einheit der Fortschrittswerte an.",
2646
+ "required": false
2647
+ },
2622
2648
  {
2623
2649
  "name": "_type",
2624
2650
  "type": "\"bar\" | \"cycle\" | undefined",
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- "use strict";const index$1=require("./index-29c5d3c6.js"),index=require("./index-a96d7f87.js"),dev_utils=require("./dev.utils-d69c0a9f.js"),index$2=require("./index-eb52922f.js"),appGlobalScript=async()=>{index$1.setMode((e=>(e.shadowRoot instanceof ShadowRoot&&index$2.setThemeStyle(e,index$2.getThemeDetails(e)),"default"))),await index.register([],[]),Promise.resolve().then((function(){return require("./devtools-98551855.js")})).then((e=>{"object"==typeof e&&null!==e&&"function"==typeof e.initialize&&e.initialize()})).catch((e=>{dev_utils.Log.error(e)}))},globalScripts=appGlobalScript;exports.globalScripts=globalScripts;
4
+ "use strict";const index$1=require("./index-29c5d3c6.js"),index=require("./index-b6484e6a.js"),dev_utils=require("./dev.utils-d69c0a9f.js"),index$2=require("./index-eb52922f.js"),appGlobalScript=async()=>{index$1.setMode((e=>(e.shadowRoot instanceof ShadowRoot&&index$2.setThemeStyle(e,index$2.getThemeDetails(e)),"default"))),await index.register([],[]),Promise.resolve().then((function(){return require("./devtools-98551855.js")})).then((e=>{"object"==typeof e&&null!==e&&"function"==typeof e.initialize&&e.initialize()})).catch((e=>{dev_utils.Log.error(e)}))},globalScripts=appGlobalScript;exports.globalScripts=globalScripts;
@@ -1 +1 @@
1
- {"file":"app-globals-0cf91d90.js","mappings":";;;;;;;;;;AAMA,wBAAe;EACdA,eAAO,CAAC,CAAC,GAAG;IACX,IAAI,GAAG,CAAC;MACPC,qBAAa,CAAC,GAAG,EAAEC,uBAAe,CAAC,GAAG,CAAC,CAAC,CAAC;KACzC;IACD;GACA,CAAC,CAAC;EAEH;EAEA,oDAAO,wBAAY,KAAC;KAClB,IAAI,CAAC,CAAC,QAAQ;IACd,IAAI,OAAO,QAAQ;MAClB,QAAQ,CAAC,UAAU,EAAE,CAAC;KACtB;GACD,CAAC;;IAEDC,aAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;GACjB,CAAC,CAAC;AACL,CAAC;;ACxBW,MAAC,aAAa,GAAG;;;;","names":["setMode","setThemeStyle","getThemeDetails","Log"],"sources":["./src/global/script.ts","@stencil/core/internal/app-globals"],"sourcesContent":["import { getThemeDetails, setThemeStyle } from '@a11y-ui/core';\nimport { setMode } from '@stencil/core';\nimport { register } from '../core';\nimport { Log } from '../utils/dev.utils';\n\n// ts-prune-ignore-next\nexport default async (): Promise<void> => {\n\tsetMode((elm) => {\n\t\tif (elm.shadowRoot instanceof ShadowRoot) {\n\t\t\tsetThemeStyle(elm, getThemeDetails(elm));\n\t\t}\n\t\treturn 'default';\n\t});\n\n\tawait register([], []);\n\n\timport('./devtools')\n\t\t.then((devTools) => {\n\t\t\tif (typeof devTools === 'object' && devTools !== null && typeof devTools.initialize === 'function') {\n\t\t\t\tdevTools.initialize();\n\t\t\t}\n\t\t})\n\t\t.catch((error) => {\n\t\t\tLog.error(error);\n\t\t});\n};\n","import appGlobalScript from '/home/runner/work/kolibri/kolibri/packages/components/src/global/script.ts';\nexport const globalScripts = appGlobalScript;\n"],"version":3}
1
+ {"file":"app-globals-33f93589.js","mappings":";;;;;;;;;;AAMA,wBAAe;EACdA,eAAO,CAAC,CAAC,GAAG;IACX,IAAI,GAAG,CAAC;MACPC,qBAAa,CAAC,GAAG,EAAEC,uBAAe,CAAC,GAAG,CAAC,CAAC,CAAC;KACzC;IACD;GACA,CAAC,CAAC;EAEH;EAEA,oDAAO,wBAAY,KAAC;KAClB,IAAI,CAAC,CAAC,QAAQ;IACd,IAAI,OAAO,QAAQ;MAClB,QAAQ,CAAC,UAAU,EAAE,CAAC;KACtB;GACD,CAAC;;IAEDC,aAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;GACjB,CAAC,CAAC;AACL,CAAC;;ACxBW,MAAC,aAAa,GAAG;;;;","names":["setMode","setThemeStyle","getThemeDetails","Log"],"sources":["./src/global/script.ts","@stencil/core/internal/app-globals"],"sourcesContent":["import { getThemeDetails, setThemeStyle } from '@a11y-ui/core';\nimport { setMode } from '@stencil/core';\nimport { register } from '../core';\nimport { Log } from '../utils/dev.utils';\n\n// ts-prune-ignore-next\nexport default async (): Promise<void> => {\n\tsetMode((elm) => {\n\t\tif (elm.shadowRoot instanceof ShadowRoot) {\n\t\t\tsetThemeStyle(elm, getThemeDetails(elm));\n\t\t}\n\t\treturn 'default';\n\t});\n\n\tawait register([], []);\n\n\timport('./devtools')\n\t\t.then((devTools) => {\n\t\t\tif (typeof devTools === 'object' && devTools !== null && typeof devTools.initialize === 'function') {\n\t\t\t\tdevTools.initialize();\n\t\t\t}\n\t\t})\n\t\t.catch((error) => {\n\t\t\tLog.error(error);\n\t\t});\n};\n","import appGlobalScript from '/home/runner/work/kolibri/kolibri/packages/components/src/global/script.ts';\nexport const globalScripts = appGlobalScript;\n"],"version":3}
@@ -1 +1 @@
1
- {"file":"button-link-19d8a9a8.js","mappings":";;;;;;;MAuMa,qBAAqB,GAAG,CAAC,SAAoC,EAAE,QAAgB,EAAE,KAAiB;EAC9GA,8BAAc,CACb,SAAS,EACT,QAAQ,EACR,CAAC,KAAK,KAAK,KAAK,KAAK,KAAK,IAAI,KAAK,KAAK,OAAO,IAAI,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,MAAM,EACzF,IAAI,GAAG,CAAC,CAAC,sCAAsC,CAAC,CAAC,EACjD,KAAK,EACL;IACC,YAAY,EAAE,KAAK;GACnB,CACD,CAAC;AACH;;;;","names":["watchValidator"],"sources":["./src/types/button-link.ts"],"sourcesContent":["import { Generic } from '@a11y-ui/core';\nimport { Events } from '../enums/events';\nimport { watchValidator } from '../utils/prop.validators';\nimport { EventCallback, EventValueOrEventCallback } from './callbacks';\nimport { Stringified } from './common';\nimport { KoliBriAllIcon, KoliBriIconProp } from './icon';\nimport { Alignment, PropAriaCurrent, PropAriaExpanded, PropAriaSelected, PropDisabled, PropStealth } from './props';\nimport { PropLabel } from './props/label';\n\nexport type AlternativButtonLinkRole = 'button' | 'link' | 'tab';\n\n/**\n * https://twitter.com/housecor/status/1541037184622403584?t=HoUiOAZEcXFeuDl-VWAEZg\n * https://mui.com/material-ui/react-link/#accessibility\n * https://mui.com/material-ui/react-button/#text-button\n */\ntype RequiredButtonAndLinkProps = PropLabel;\ntype OptionalButtonAndLinkProps = {\n\tariaControls: string;\n\tariaLabel: string;\n\ticon: Stringified<KoliBriIconProp>;\n\t/**\n\t * @deprecated\n\t */\n\ticonAlign: Alignment;\n\ticonOnly: boolean;\n\trole: AlternativButtonLinkRole;\n\ttabIndex: number;\n\ttooltipAlign: Alignment;\n} & PropAriaCurrent &\n\tPropAriaExpanded &\n\tPropAriaSelected &\n\tPropDisabled;\n\ntype RequiredButtonAndLinkStates = {\n\ticon: KoliBriAllIcon;\n\tlabel: string;\n};\ntype OptionalButtonAndLinkStates = {\n\tariaLabel: string;\n\tariaControls: string;\n\t/**\n\t * @deprecated\n\t */\n\ticonAlign: Alignment;\n\ticonOnly: boolean;\n\trole: AlternativButtonLinkRole;\n\ttabIndex: number;\n\ttooltipAlign: Alignment;\n} & PropAriaCurrent &\n\tPropAriaExpanded &\n\tPropAriaSelected &\n\tPropDisabled;\n\n/**\n * Button\n */\nexport type KoliBriButtonType = 'button' | 'reset' | 'submit';\nexport type KoliBriButtonVariant = 'primary' | 'secondary' | 'normal' | 'danger' | 'ghost' | 'custom';\n\nexport type KoliBriButtonCallbacks<T> = {\n\t[Events.onClick]?: EventValueOrEventCallback<MouseEvent, T>;\n\t[Events.onMouseDown]?: EventCallback<MouseEvent>;\n};\n\nexport type KoliBriButtonVariantPropState = {\n\tvariant: KoliBriButtonVariant;\n};\nexport type KoliBriButtonCustomClassPropState = {\n\tcustomClass: string;\n};\n\n/**\n * API ButtonLink\n */\nexport type RequiredButtonLinkProps = RequiredButtonAndLinkProps;\nexport type OptionalButtonLinkProps = OptionalButtonAndLinkProps & {\n\t/**\n\t * @deprecated Zweck?!\n\t */\n\taccessKey: string;\n\tdisabled: boolean;\n\tid: string;\n\ton: KoliBriButtonCallbacks<unknown>;\n\ttype: KoliBriButtonType;\n\tvalue: Stringified<unknown>;\n};\n// type ButtonLinkProps = Generic.Element.Members<RequiredButtonProps, OptionalButtonProps>;\n\ntype RequiredButtonLinkStates = RequiredButtonAndLinkStates &\n\tKoliBriButtonVariantPropState & {\n\t\ttype: KoliBriButtonType;\n\t};\ntype OptionalButtonLinkStates = OptionalButtonAndLinkStates &\n\tKoliBriButtonCustomClassPropState & {\n\t\t/**\n\t\t * @deprecated Zweck?!\n\t\t */\n\t\taccessKey: string;\n\t\tdisabled: boolean;\n\t\tid: string;\n\t\ton: KoliBriButtonCallbacks<unknown>;\n\t\tvalue: unknown;\n\t};\n// type ButtonLinkStates = Generic.Element.Members<RequiredButtonStates, OptionalButtonStates>;\n\n/**\n * API Button\n */\nexport type RequiredButtonProps = RequiredButtonLinkProps;\nexport type OptionalButtonProps = OptionalButtonLinkProps & KoliBriButtonVariantPropState & KoliBriButtonCustomClassPropState;\nexport type ButtonProps = Generic.Element.Members<RequiredButtonProps, OptionalButtonProps>;\n\nexport type RequiredButtonStates = RequiredButtonLinkStates & KoliBriButtonVariantPropState;\nexport type OptionalButtonStates = OptionalButtonLinkStates & KoliBriButtonCustomClassPropState;\nexport type ButtonStates = Generic.Element.Members<RequiredButtonStates, OptionalButtonStates>;\n\n/* LINK */\n\n/**\n * @deprecated Link should not use the on-click event. Use a button instead.\n */\nexport type LinkOnCallbacks = {\n\t[Events.onClick]?: EventValueOrEventCallback<Event, string>;\n};\n\n// https://www.w3schools.com/tags/att_a_target.asp\nexport type LinkTarget = '_blank' | '_parent' | '_self' | '_top' | string;\n\nexport type LinkUseCase = 'text' | 'image' | 'nav';\n\n/**\n * API Link\n */\nexport type RequiredLinkProps = RequiredButtonAndLinkProps & {\n\thref: string;\n};\nexport type OptionalLinkProps = OptionalButtonAndLinkProps & {\n\t/**\n\t * @deprecated A link could never be disabled. Use a button instead.\n\t */\n\tdisabled: boolean;\n\t/**\n\t * @deprecated We use the on-click event only on buttons styled as link.\n\t */\n\ton: LinkOnCallbacks;\n\t/**\n\t * @deprecated Das Styling sollte stets über CSS erfolgen.\n\t */\n\tselector: string;\n\t/**\n\t * @deprecated Das Styling sollte stets über CSS erfolgen.\n\t */\n\ttarget: LinkTarget;\n\ttargetDescription: string;\n\t/**\n\t * @deprecated Das Styling sollte stets über CSS erfolgen.\n\t */\n\tuseCase: LinkUseCase;\n} & PropStealth;\nexport type LinkProps = Generic.Element.Members<RequiredLinkProps, OptionalLinkProps>;\n\nexport type RequiredLinkStates = RequiredButtonAndLinkStates & {\n\thref: string;\n};\nexport type OptionalLinkStates = OptionalButtonAndLinkStates & {\n\tariaSelected: boolean;\n\t/**\n\t * @deprecated We use the on-click event only on buttons styled as link.\n\t */\n\ton: LinkOnCallbacks;\n\t/**\n\t * @deprecated Das Styling sollte stets über CSS erfolgen.\n\t */\n\tselector: string;\n\t/**\n\t * @deprecated Das Styling sollte stets über CSS erfolgen.\n\t */\n\ttarget: LinkTarget;\n\ttargetDescription: string;\n\t/**\n\t * @deprecated Das Styling sollte stets über CSS erfolgen.\n\t */\n\tuseCase: LinkUseCase;\n} & PropAriaSelected &\n\tPropStealth;\nexport type LinkStates = Generic.Element.Members<RequiredLinkStates, OptionalLinkStates>;\n\n/**\n * API LinkButton\n */\nexport type RequiredLinkButtonProps = RequiredLinkProps;\nexport type OptionalLinkButtonProps = OptionalLinkProps & KoliBriButtonVariantPropState & KoliBriButtonCustomClassPropState;\n// type LinkButtonProps = Generic.Element.Members<RequiredLinkButtonProps, OptionalLinkButtonProps>;\n\n// type RequiredLinkButtonStates = KoliBriButtonVariantPropState;\n// type OptionalLinkButtonStates = KoliBriButtonCustomClassPropState;\n// type LinkButtonStates = Generic.Element.Members<RequiredLinkButtonStates, OptionalLinkButtonStates>;\n\nexport const watchTooltipAlignment = (component: Generic.Element.Component, propName: string, value?: Alignment): void => {\n\twatchValidator(\n\t\tcomponent,\n\t\tpropName,\n\t\t(value) => value === 'top' || value === 'right' || value === 'bottom' || value === 'left',\n\t\tnew Set(['Alignment {top, right, buttom, left}']),\n\t\tvalue,\n\t\t{\n\t\t\tdefaultValue: 'top',\n\t\t}\n\t);\n};\n"],"version":3}
1
+ {"file":"button-link-19d8a9a8.js","mappings":";;;;;;;MAwMa,qBAAqB,GAAG,CAAC,SAAoC,EAAE,QAAgB,EAAE,KAAiB;EAC9GA,8BAAc,CACb,SAAS,EACT,QAAQ,EACR,CAAC,KAAK,KAAK,KAAK,KAAK,KAAK,IAAI,KAAK,KAAK,OAAO,IAAI,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,MAAM,EACzF,IAAI,GAAG,CAAC,CAAC,sCAAsC,CAAC,CAAC,EACjD,KAAK,EACL;IACC,YAAY,EAAE,KAAK;GACnB,CACD,CAAC;AACH;;;;","names":["watchValidator"],"sources":["./src/types/button-link.ts"],"sourcesContent":["import { Generic } from '@a11y-ui/core';\nimport { Events } from '../enums/events';\nimport { watchValidator } from '../utils/prop.validators';\nimport { EventCallback, EventValueOrEventCallback } from './callbacks';\nimport { Stringified } from './common';\nimport { KoliBriAllIcon, KoliBriIconProp } from './icon';\nimport { Alignment, PropAriaCurrent, PropAriaExpanded, PropAriaSelected, PropDisabled, PropDownload, PropLabel, PropStealth } from './props';\n\nexport type AlternativButtonLinkRole = 'button' | 'link' | 'tab';\n\n/**\n * https://twitter.com/housecor/status/1541037184622403584?t=HoUiOAZEcXFeuDl-VWAEZg\n * https://mui.com/material-ui/react-link/#accessibility\n * https://mui.com/material-ui/react-button/#text-button\n */\ntype RequiredButtonAndLinkProps = PropLabel;\ntype OptionalButtonAndLinkProps = {\n\tariaControls: string;\n\tariaLabel: string;\n\ticon: Stringified<KoliBriIconProp>;\n\t/**\n\t * @deprecated\n\t */\n\ticonAlign: Alignment;\n\ticonOnly: boolean;\n\trole: AlternativButtonLinkRole;\n\ttabIndex: number;\n\ttooltipAlign: Alignment;\n} & PropAriaCurrent &\n\tPropAriaExpanded &\n\tPropAriaSelected &\n\tPropDisabled;\n\ntype RequiredButtonAndLinkStates = {\n\ticon: KoliBriAllIcon;\n\tlabel: string;\n};\ntype OptionalButtonAndLinkStates = {\n\tariaLabel: string;\n\tariaControls: string;\n\t/**\n\t * @deprecated\n\t */\n\ticonAlign: Alignment;\n\ticonOnly: boolean;\n\trole: AlternativButtonLinkRole;\n\ttabIndex: number;\n\ttooltipAlign: Alignment;\n} & PropAriaCurrent &\n\tPropAriaExpanded &\n\tPropAriaSelected &\n\tPropDisabled;\n\n/**\n * Button\n */\nexport type KoliBriButtonType = 'button' | 'reset' | 'submit';\nexport type KoliBriButtonVariant = 'primary' | 'secondary' | 'normal' | 'danger' | 'ghost' | 'custom';\n\nexport type KoliBriButtonCallbacks<T> = {\n\t[Events.onClick]?: EventValueOrEventCallback<MouseEvent, T>;\n\t[Events.onMouseDown]?: EventCallback<MouseEvent>;\n};\n\nexport type KoliBriButtonVariantPropState = {\n\tvariant: KoliBriButtonVariant;\n};\nexport type KoliBriButtonCustomClassPropState = {\n\tcustomClass: string;\n};\n\n/**\n * API ButtonLink\n */\nexport type RequiredButtonLinkProps = RequiredButtonAndLinkProps;\nexport type OptionalButtonLinkProps = OptionalButtonAndLinkProps & {\n\t/**\n\t * @deprecated Zweck?!\n\t */\n\taccessKey: string;\n\tdisabled: boolean;\n\tid: string;\n\ton: KoliBriButtonCallbacks<unknown>;\n\ttype: KoliBriButtonType;\n\tvalue: Stringified<unknown>;\n};\n// type ButtonLinkProps = Generic.Element.Members<RequiredButtonProps, OptionalButtonProps>;\n\ntype RequiredButtonLinkStates = RequiredButtonAndLinkStates &\n\tKoliBriButtonVariantPropState & {\n\t\ttype: KoliBriButtonType;\n\t};\ntype OptionalButtonLinkStates = OptionalButtonAndLinkStates &\n\tKoliBriButtonCustomClassPropState & {\n\t\t/**\n\t\t * @deprecated Zweck?!\n\t\t */\n\t\taccessKey: string;\n\t\tdisabled: boolean;\n\t\tid: string;\n\t\ton: KoliBriButtonCallbacks<unknown>;\n\t\tvalue: unknown;\n\t};\n// type ButtonLinkStates = Generic.Element.Members<RequiredButtonStates, OptionalButtonStates>;\n\n/**\n * API Button\n */\nexport type RequiredButtonProps = RequiredButtonLinkProps;\nexport type OptionalButtonProps = OptionalButtonLinkProps & KoliBriButtonVariantPropState & KoliBriButtonCustomClassPropState;\nexport type ButtonProps = Generic.Element.Members<RequiredButtonProps, OptionalButtonProps>;\n\nexport type RequiredButtonStates = RequiredButtonLinkStates & KoliBriButtonVariantPropState;\nexport type OptionalButtonStates = OptionalButtonLinkStates & KoliBriButtonCustomClassPropState;\nexport type ButtonStates = Generic.Element.Members<RequiredButtonStates, OptionalButtonStates>;\n\n/* LINK */\n\n/**\n * @deprecated Link should not use the on-click event. Use a button instead.\n */\nexport type LinkOnCallbacks = {\n\t[Events.onClick]?: EventValueOrEventCallback<Event, string>;\n};\n\n// https://www.w3schools.com/tags/att_a_target.asp\nexport type LinkTarget = '_blank' | '_parent' | '_self' | '_top' | string;\n\nexport type LinkUseCase = 'text' | 'image' | 'nav';\n\n/**\n * API Link\n */\nexport type RequiredLinkProps = RequiredButtonAndLinkProps & {\n\thref: string;\n};\nexport type OptionalLinkProps = OptionalButtonAndLinkProps & {\n\t/**\n\t * @deprecated A link could never be disabled. Use a button instead.\n\t */\n\tdisabled: boolean;\n\t/**\n\t * @deprecated We use the on-click event only on buttons styled as link.\n\t */\n\ton: LinkOnCallbacks;\n\t/**\n\t * @deprecated Das Styling sollte stets über CSS erfolgen.\n\t */\n\tselector: string;\n\t/**\n\t * @deprecated Das Styling sollte stets über CSS erfolgen.\n\t */\n\ttarget: LinkTarget;\n\ttargetDescription: string;\n\t/**\n\t * @deprecated Das Styling sollte stets über CSS erfolgen.\n\t */\n\tuseCase: LinkUseCase;\n} & PropDownload &\n\tPropStealth;\nexport type LinkProps = Generic.Element.Members<RequiredLinkProps, OptionalLinkProps>;\n\nexport type RequiredLinkStates = RequiredButtonAndLinkStates & {\n\thref: string;\n};\nexport type OptionalLinkStates = OptionalButtonAndLinkStates & {\n\tariaSelected: boolean;\n\t/**\n\t * @deprecated We use the on-click event only on buttons styled as link.\n\t */\n\ton: LinkOnCallbacks;\n\t/**\n\t * @deprecated Das Styling sollte stets über CSS erfolgen.\n\t */\n\tselector: string;\n\t/**\n\t * @deprecated Das Styling sollte stets über CSS erfolgen.\n\t */\n\ttarget: LinkTarget;\n\ttargetDescription: string;\n\t/**\n\t * @deprecated Das Styling sollte stets über CSS erfolgen.\n\t */\n\tuseCase: LinkUseCase;\n} & PropAriaSelected &\n\tPropDownload &\n\tPropStealth;\nexport type LinkStates = Generic.Element.Members<RequiredLinkStates, OptionalLinkStates>;\n\n/**\n * API LinkButton\n */\nexport type RequiredLinkButtonProps = RequiredLinkProps;\nexport type OptionalLinkButtonProps = OptionalLinkProps & KoliBriButtonVariantPropState & KoliBriButtonCustomClassPropState;\n// type LinkButtonProps = Generic.Element.Members<RequiredLinkButtonProps, OptionalLinkButtonProps>;\n\n// type RequiredLinkButtonStates = KoliBriButtonVariantPropState;\n// type OptionalLinkButtonStates = KoliBriButtonCustomClassPropState;\n// type LinkButtonStates = Generic.Element.Members<RequiredLinkButtonStates, OptionalLinkButtonStates>;\n\nexport const watchTooltipAlignment = (component: Generic.Element.Component, propName: string, value?: Alignment): void => {\n\twatchValidator(\n\t\tcomponent,\n\t\tpropName,\n\t\t(value) => value === 'top' || value === 'right' || value === 'bottom' || value === 'left',\n\t\tnew Set(['Alignment {top, right, buttom, left}']),\n\t\tvalue,\n\t\t{\n\t\t\tdefaultValue: 'top',\n\t\t}\n\t);\n};\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- "use strict";const prop_validators=require("./prop.validators-dd1f7878.js"),controller=require("./controller-272d14fd.js");class InputTextEmailController extends controller.InputPasswordController{constructor(t,o,e){super(t,o,e),this.component=t}validateList(t){prop_validators.watchJsonArrayString(this.component,"_list",(t=>"string"==typeof t),t)}componentWillLoad(){super.componentWillLoad(),this.validateList(this.component._list)}}class InputTextController extends InputTextEmailController{constructor(t,o,e){super(t,o,e),this.hasError=!1,this.hasList=!1,this.component=t}validateType(t){prop_validators.watchValidator(this.component,"_type",(t=>"string"==typeof t&&("text"===t||"search"===t||"url"===t||"tel"===t)),new Set(["String {text, search, url, tel}"]),t)}componentWillLoad(){super.componentWillLoad(),this.validateType(this.component._type)}}exports.InputTextController=InputTextController,exports.InputTextEmailController=InputTextEmailController;
4
+ "use strict";const prop_validators=require("./prop.validators-dd1f7878.js"),controller=require("./controller-87980d4a.js");class InputTextEmailController extends controller.InputPasswordController{constructor(t,o,e){super(t,o,e),this.component=t}validateList(t){prop_validators.watchJsonArrayString(this.component,"_list",(t=>"string"==typeof t),t)}componentWillLoad(){super.componentWillLoad(),this.validateList(this.component._list)}}class InputTextController extends InputTextEmailController{constructor(t,o,e){super(t,o,e),this.hasError=!1,this.hasList=!1,this.component=t}validateType(t){prop_validators.watchValidator(this.component,"_type",(t=>"string"==typeof t&&("text"===t||"search"===t||"url"===t||"tel"===t)),new Set(["String {text, search, url, tel}"]),t)}componentWillLoad(){super.componentWillLoad(),this.validateType(this.component._type)}}exports.InputTextController=InputTextController,exports.InputTextEmailController=InputTextEmailController;
@@ -1 +1 @@
1
- {"file":"controller-073aa3b2.js","mappings":";;;;;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controller.ts"],"sourcesContent":["import { watchJsonArrayString, watchValidator } from '../../utils/prop.validators';\nimport { InputPasswordController } from '../input-password/controller';\nimport { Props as InputTextProps, Watches as InputTextWatches } from './types';\n\nimport { Generic } from '@a11y-ui/core';\nimport { InputTextType } from '../../types/input/control/text';\nimport { Stringified } from '../../types/common';\n\ntype RequiredProps = unknown;\ntype OptionalProps = {\n\tid: string;\n\tlist: Stringified<string[]>;\n};\ntype InputTextEmailProps = Generic.Element.Members<RequiredProps, OptionalProps>;\ntype InputTextEmailWatches = Generic.Element.Watchers<RequiredProps, OptionalProps>;\n\nexport class InputTextEmailController extends InputPasswordController implements InputTextEmailWatches {\n\tprotected readonly component: Generic.Element.Component & InputTextEmailProps;\n\n\tpublic constructor(component: Generic.Element.Component & InputTextEmailProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateList(value?: Stringified<string[]>): void {\n\t\twatchJsonArrayString(this.component, '_list', (item: string) => typeof item === 'string', value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateList(this.component._list);\n\t}\n}\n\nexport class InputTextController extends InputTextEmailController implements InputTextWatches {\n\tprotected readonly component: Generic.Element.Component & InputTextProps;\n\n\tpublic hasError = false;\n\tpublic hasList = false;\n\n\tpublic constructor(component: Generic.Element.Component & InputTextProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateType(value?: InputTextType): void {\n\t\twatchValidator(\n\t\t\tthis.component,\n\t\t\t'_type',\n\t\t\t(value): boolean => typeof value === 'string' && (value === 'text' || value === 'search' || value === 'url' || value === 'tel'),\n\t\t\tnew Set(['String {text, search, url, tel}']),\n\t\t\tvalue\n\t\t);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateType(this.component._type);\n\t}\n}\n"],"version":3}
1
+ {"file":"controller-43eacc77.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":["./src/components/input-text/controller.ts"],"sourcesContent":["import { watchJsonArrayString, watchValidator } from '../../utils/prop.validators';\nimport { InputPasswordController } from '../input-password/controller';\nimport { Props as InputTextProps, Watches as InputTextWatches } from './types';\n\nimport { Generic } from '@a11y-ui/core';\nimport { InputTextType } from '../../types/input/control/text';\nimport { Stringified } from '../../types/common';\n\ntype RequiredProps = unknown;\ntype OptionalProps = {\n\tid: string;\n\tlist: Stringified<string[]>;\n};\ntype InputTextEmailProps = Generic.Element.Members<RequiredProps, OptionalProps>;\ntype InputTextEmailWatches = Generic.Element.Watchers<RequiredProps, OptionalProps>;\n\nexport class InputTextEmailController extends InputPasswordController implements InputTextEmailWatches {\n\tprotected readonly component: Generic.Element.Component & InputTextEmailProps;\n\n\tpublic constructor(component: Generic.Element.Component & InputTextEmailProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateList(value?: Stringified<string[]>): void {\n\t\twatchJsonArrayString(this.component, '_list', (item: string) => typeof item === 'string', value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateList(this.component._list);\n\t}\n}\n\nexport class InputTextController extends InputTextEmailController implements InputTextWatches {\n\tprotected readonly component: Generic.Element.Component & InputTextProps;\n\n\tpublic hasError = false;\n\tpublic hasList = false;\n\n\tpublic constructor(component: Generic.Element.Component & InputTextProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateType(value?: InputTextType): void {\n\t\twatchValidator(\n\t\t\tthis.component,\n\t\t\t'_type',\n\t\t\t(value): boolean => typeof value === 'string' && (value === 'text' || value === 'search' || value === 'url' || value === 'tel'),\n\t\t\tnew Set(['String {text, search, url, tel}']),\n\t\t\tvalue\n\t\t);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateType(this.component._type);\n\t}\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- "use strict";const a11y_tipps=require("./a11y.tipps-6f0ad06e.js"),prop_validators=require("./prop.validators-dd1f7878.js"),tabIndex=require("./tab-index-7bf0cb35.js"),dev_utils=require("./dev.utils-d69c0a9f.js"),getRenderStates=t=>{const e="string"==typeof t._error&&t._error.length>0&&!0===t._touched,o="string"==typeof t._hint&&t._hint.length>0,n=[];return!0===e&&n.push(`${t._id}-error`),!0===o&&n.push(`${t._id}-hint`),{hasError:e,hasHint:o,ariaDiscribedBy:n}},EXPERIMENTAL_MODE=dev_utils.getExperimalMode();class ControlledInputController{constructor(t,e,o){var n,i,a,s,r;if(this.syncFormAssociatedName=()=>{var t;EXPERIMENTAL_MODE&&(null===(t=this.formAssociated)||void 0===t||t.setAttribute("name",this.component.state._name||this.component.state._id))},this.setFormAssociatedValue=(t=null)=>{var e;EXPERIMENTAL_MODE&&(null===(e=this.formAssociated)||void 0===e||e.setAttribute("value",t))},this.component=t,this.name=e,this.host=o,EXPERIMENTAL_MODE){this.formAssociated=document.createElement("input"),this.formAssociated.setAttribute("type","hidden");const t=(null===(n=this.host)||void 0===n?void 0:n.children)||[];for(let e=0;e<t.length;e++)"INPUT"===(null===(i=this.host)||void 0===i?void 0:i.children[e].tagName)&&(null===(a=this.host)||void 0===a||a.removeChild(null===(s=this.host)||void 0===s?void 0:s.children[e]));null===(r=this.host)||void 0===r||r.appendChild(this.formAssociated)}}validateAlert(t){prop_validators.watchBoolean(this.component,"_alert",t)}validateTouched(t){prop_validators.watchBoolean(this.component,"_touched",t)}componentWillLoad(){this.validateAlert(this.component._alert),this.validateTouched(this.component._touched)}}class InputController extends ControlledInputController{constructor(t,e,o){super(t,e,o),this.hideLabel=!1,this.valueChangeListeners=[],this.onFacade={onBlur:this.onBlur.bind(this),onChange:this.onChange.bind(this),onClick:this.onClick.bind(this),onFocus:this.onFocus.bind(this)},this.component=t}validateAccessKey(t){prop_validators.watchString(this.component,"_accessKey",t)}validateAdjustHeight(t){prop_validators.watchBoolean(this.component,"_adjustHeight",t)}validateDisabled(t){prop_validators.watchBoolean(this.component,"_disabled",t),!0===t&&a11y_tipps.a11yHintDisabled()}validateError(t){prop_validators.watchString(this.component,"_error",t)}validateHideLabel(t){prop_validators.watchBoolean(this.component,"_hideLabel",t)}validateHint(t){prop_validators.watchString(this.component,"_hint",t)}validateId(t){prop_validators.watchString(this.component,"_id",t,{hooks:{afterPatch:this.syncFormAssociatedName},minLength:1}),""!==t&&void 0!==t||a11y_tipps.devHint("Eine eindeutige ID an den Eingabefeldern ist nicht zwingend erforderlich, könnte aber für die E2E-Tests relevant sein.")}validateName(t){prop_validators.watchString(this.component,"_name",t,{hooks:{afterPatch:this.syncFormAssociatedName}}),void 0===t&&a11y_tipps.devHint("Ein Name an den Eingabefeldern ist nicht zwingend erforderlich, kann aber für die Autocomplete-Funktion und für das statische Versenden des Eingabefeldes relevant sein.")}validateOn(t){"object"==typeof t&&prop_validators.setState(this.component,"_on",t)}validateSmartButton(t){prop_validators.objectObjectHandler(t,(()=>{try{t=prop_validators.parseJson(t)}catch(t){}prop_validators.setState(this.component,"_smartButton",t)}))}validateTabIndex(t){tabIndex.validateTabIndex(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateAccessKey(this.component._accessKey),this.validateAdjustHeight(this.component._adjustHeight),this.validateError(this.component._error),this.validateDisabled(this.component._disabled),this.validateHideLabel(this.component._hideLabel),this.validateHint(this.component._hint),this.validateId(this.component._id),this.validateName(this.component._name),this.validateSmartButton(this.component._smartButton),this.validateOn(this.component._on),this.validateTabIndex(this.component._tabIndex),this.syncFormAssociatedName()}onBlur(t){var e;this.component._alert=!0,this.component._touched=!0,"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onBlur)&&this.component._on.onBlur(t)}onChange(t){var e;const o=t.target.value;this.setFormAssociatedValue(o),this.valueChangeListeners.forEach((t=>t(o))),"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onChange)&&this.component._on.onChange(t,o)}onClick(t){var e;"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onClick)&&this.component._on.onClick(t)}onFocus(t){var e;this.component._alert=!0,"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onFocus)&&this.component._on.onFocus(t)}setValue(t,e){var o;this.setFormAssociatedValue(e),"function"==typeof(null===(o=this.component._on)||void 0===o?void 0:o.onChange)&&this.component._on.onChange(t,e)}addValueChangeListener(t){this.valueChangeListeners.push(t)}}exports.InputController=InputController,exports.getRenderStates=getRenderStates;
4
+ "use strict";const a11y_tipps=require("./a11y.tipps-6f0ad06e.js"),prop_validators=require("./prop.validators-dd1f7878.js"),tabIndex=require("./tab-index-7bf0cb35.js"),dev_utils=require("./dev.utils-d69c0a9f.js"),getRenderStates=t=>{const e="string"==typeof t._error&&t._error.length>0&&!0===t._touched,o="string"==typeof t._hint&&t._hint.length>0,n=[];return!0===e&&n.push(`${t._id}-error`),!0===o&&n.push(`${t._id}-hint`),{hasError:e,hasHint:o,ariaDescribedBy:n}},EXPERIMENTAL_MODE=dev_utils.getExperimalMode();class ControlledInputController{constructor(t,e,o){var n,i,a,s,r;if(this.syncFormAssociatedName=()=>{var t;EXPERIMENTAL_MODE&&(null===(t=this.formAssociated)||void 0===t||t.setAttribute("name",this.component.state._name||this.component.state._id))},this.setFormAssociatedValue=(t=null)=>{var e;EXPERIMENTAL_MODE&&(null===(e=this.formAssociated)||void 0===e||e.setAttribute("value",t))},this.component=t,this.name=e,this.host=o,EXPERIMENTAL_MODE){this.formAssociated=document.createElement("input"),this.formAssociated.setAttribute("type","hidden");const t=(null===(n=this.host)||void 0===n?void 0:n.children)||[];for(let e=0;e<t.length;e++)"INPUT"===(null===(i=this.host)||void 0===i?void 0:i.children[e].tagName)&&(null===(a=this.host)||void 0===a||a.removeChild(null===(s=this.host)||void 0===s?void 0:s.children[e]));null===(r=this.host)||void 0===r||r.appendChild(this.formAssociated)}}validateAlert(t){prop_validators.watchBoolean(this.component,"_alert",t)}validateTouched(t){prop_validators.watchBoolean(this.component,"_touched",t)}componentWillLoad(){this.validateAlert(this.component._alert),this.validateTouched(this.component._touched)}}class InputController extends ControlledInputController{constructor(t,e,o){super(t,e,o),this.hideLabel=!1,this.valueChangeListeners=[],this.onFacade={onBlur:this.onBlur.bind(this),onChange:this.onChange.bind(this),onClick:this.onClick.bind(this),onFocus:this.onFocus.bind(this)},this.component=t}validateAccessKey(t){prop_validators.watchString(this.component,"_accessKey",t)}validateAdjustHeight(t){prop_validators.watchBoolean(this.component,"_adjustHeight",t)}validateDisabled(t){prop_validators.watchBoolean(this.component,"_disabled",t),!0===t&&a11y_tipps.a11yHintDisabled()}validateError(t){prop_validators.watchString(this.component,"_error",t)}validateHideLabel(t){prop_validators.watchBoolean(this.component,"_hideLabel",t)}validateHint(t){prop_validators.watchString(this.component,"_hint",t)}validateId(t){prop_validators.watchString(this.component,"_id",t,{hooks:{afterPatch:this.syncFormAssociatedName},minLength:1}),""!==t&&void 0!==t||a11y_tipps.devHint("Eine eindeutige ID an den Eingabefeldern ist nicht zwingend erforderlich, könnte aber für die E2E-Tests relevant sein.")}validateName(t){prop_validators.watchString(this.component,"_name",t,{hooks:{afterPatch:this.syncFormAssociatedName}}),void 0===t&&a11y_tipps.devHint("Ein Name an den Eingabefeldern ist nicht zwingend erforderlich, kann aber für die Autocomplete-Funktion und für das statische Versenden des Eingabefeldes relevant sein.")}validateOn(t){"object"==typeof t&&prop_validators.setState(this.component,"_on",t)}validateSmartButton(t){prop_validators.objectObjectHandler(t,(()=>{try{t=prop_validators.parseJson(t)}catch(t){}prop_validators.setState(this.component,"_smartButton",t)}))}validateTabIndex(t){tabIndex.validateTabIndex(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateAccessKey(this.component._accessKey),this.validateAdjustHeight(this.component._adjustHeight),this.validateError(this.component._error),this.validateDisabled(this.component._disabled),this.validateHideLabel(this.component._hideLabel),this.validateHint(this.component._hint),this.validateId(this.component._id),this.validateName(this.component._name),this.validateSmartButton(this.component._smartButton),this.validateOn(this.component._on),this.validateTabIndex(this.component._tabIndex),this.syncFormAssociatedName()}onBlur(t){var e;this.component._alert=!0,this.component._touched=!0,"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onBlur)&&this.component._on.onBlur(t)}onChange(t){var e;const o=t.target.value;this.setFormAssociatedValue(o),this.valueChangeListeners.forEach((t=>t(o))),"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onChange)&&this.component._on.onChange(t,o)}onClick(t){var e;"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onClick)&&this.component._on.onClick(t)}onFocus(t){var e;this.component._alert=!0,"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onFocus)&&this.component._on.onFocus(t)}setValue(t,e){var o;this.setFormAssociatedValue(e),"function"==typeof(null===(o=this.component._on)||void 0===o?void 0:o.onChange)&&this.component._on.onChange(t,e)}addValueChangeListener(t){this.valueChangeListeners.push(t)}}exports.InputController=InputController,exports.getRenderStates=getRenderStates;
@@ -1 +1 @@
1
- {"file":"controller-536f457e.js","mappings":";;;;;;;;;;MAOa,eAAe,GAAG,CAAC,KAK/B;EAKA,MAAM,QAAQ,GAAG,OAAO,KAAK,CAAC,MAAM,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,QAAQ,KAAK,IAAI,CAAC;EACxG,MAAM,OAAO,GAAG,OAAO,KAAK,CAAC,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;EAE1E,MAAM,eAAe,GAAa,EAAE,CAAC;EACrC,IAAI,QAAQ,KAAK,IAAI,EAAE;IACtB,eAAe,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,GAAG,QAAQ,CAAC,CAAC;GAC3C;EACD,IAAI,OAAO,KAAK,IAAI,EAAE;IACrB,eAAe,CAAC,IAAI,CAAC,GAAG,KAA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AAO,CAAA,KAAK,UAAU,EAAE;MACtD,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;KAClC;GACD;EAEM,QAAQ,CAAC,KAAY,EAAE,KAAgC;;IAC7D,IAAI,CAAC,sBAAsB,CAAC,KAAe,CAAC,CAAC;IAC7C,IAAI,QAAO,MAAA,IAAI,CAAC,SAAS,CAAC,GAAG,0CAAE,QAAQ,CAAA,KAAK,UAAU,EAAE;MACvD,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;KAC1C;GACD;EAEM,sBAAsB,CAAC,QAA6B;IAC1D,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;GACzC;;;;;;","names":["getExperimalMode","watchBoolean","watchString","a11yHintDisabled","devHint","setState","objectObjectHandler","parseJson","validateTabIndex"],"sources":["./src/components/input/controller.ts","./src/components/input-adapter-leanup/controller.ts","./src/components/@deprecated/input/controller.ts"],"sourcesContent":["/**\n * Berechnet in Abhängigkeit des Component-State, wie die\n * aria-describedby-Attributs gesetzt werden sollen.\n *\n * @param state State der Component\n * @returns Render-States\n */\nexport const getRenderStates = (state: {\n\t_error?: string;\n\t_hint?: string;\n\t_id: string;\n\t_touched?: boolean;\n}): {\n\thasError: boolean;\n\thasHint: boolean;\n\tariaDiscribedBy: string[];\n} => {\n\tconst hasError = typeof state._error === 'string' && state._error.length > 0 && state._touched === true;\n\tconst hasHint = typeof state._hint === 'string' && state._hint.length > 0;\n\n\tconst ariaDiscribedBy: string[] = [];\n\tif (hasError === true) {\n\t\tariaDiscribedBy.push(`${state._id}-error`);\n\t}\n\tif (hasHint === true) {\n\t\tariaDiscribedBy.push(`${state._id}-hint`);\n\t}\n\treturn { hasError, hasHint, ariaDiscribedBy };\n};\n","import { Generic } from '@a11y-ui/core';\nimport { getExperimalMode } from '../../utils/dev.utils';\nimport { watchBoolean } from '../../utils/prop.validators';\nimport { Props, Watches } from './types';\n\nconst EXPERIMENTAL_MODE = getExperimalMode();\n\nexport class ControlledInputController implements Watches {\n\tprotected readonly component: Generic.Element.Component & Props;\n\tprotected readonly name: string;\n\tprotected readonly host?: HTMLElement;\n\n\tpublic readonly formAssociated?: HTMLInputElement;\n\n\tpublic constructor(component: Generic.Element.Component & Props, name: string, host?: HTMLElement) {\n\t\tthis.component = component;\n\t\tthis.name = name;\n\t\tthis.host = host;\n\t\tif (EXPERIMENTAL_MODE) {\n\t\t\tthis.formAssociated = document.createElement('input');\n\t\t\tthis.formAssociated.setAttribute('type', 'hidden');\n\t\t\tconst children = this.host?.children || [];\n\t\t\tfor (let i = 0; i < children.length; i++) {\n\t\t\t\tif (this.host?.children[i].tagName === 'INPUT') {\n\t\t\t\t\tthis.host?.removeChild(this.host?.children[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.host?.appendChild(this.formAssociated);\n\t\t}\n\t}\n\n\tprotected readonly syncFormAssociatedName = () => {\n\t\tif (EXPERIMENTAL_MODE) {\n\t\t\tthis.formAssociated?.setAttribute('name', (this.component.state._name as string) || (this.component.state._id as string));\n\t\t}\n\t};\n\n\tpublic readonly setFormAssociatedValue = (value: string | null = null) => {\n\t\tif (EXPERIMENTAL_MODE) {\n\t\t\tthis.formAssociated?.setAttribute('value', value as string);\n\t\t}\n\t};\n\n\tpublic validateAlert(value?: boolean): void {\n\t\twatchBoolean(this.component, '_alert', value);\n\t}\n\n\tpublic validateTouched(value?: boolean): void {\n\t\twatchBoolean(this.component, '_touched', value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateAlert(this.component._alert);\n\t\tthis.validateTouched(this.component._touched);\n\t}\n}\n","import { Generic } from '@a11y-ui/core';\nimport { ButtonProps } from '../../../types/button-link';\nimport { InputTypeOnDefault } from '../../../types/input/types';\nimport { a11yHintDisabled, devHint } from '../../../utils/a11y.tipps';\nimport { objectObjectHandler, parseJson, setState, watchBoolean, watchString } from '../../../utils/prop.validators';\nimport { validateTabIndex } from '../../../utils/validators/tab-index';\nimport { ControlledInputController } from '../../input-adapter-leanup/controller';\nimport { Props as AdapterProps } from '../../input-adapter-leanup/types';\nimport { Props, Watches } from './types';\n\ntype ValueChangeListener = (value: string) => void;\n\nexport class InputController extends ControlledInputController implements Watches {\n\tprotected readonly component: Generic.Element.Component & Props & AdapterProps;\n\n\tpublic hideLabel = false;\n\n\tprivate readonly valueChangeListeners: ValueChangeListener[] = [];\n\n\tpublic constructor(component: Generic.Element.Component & Props, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateAccessKey(value?: string): void {\n\t\twatchString(this.component, '_accessKey', value);\n\t}\n\n\tpublic validateAdjustHeight(value?: boolean): void {\n\t\twatchBoolean(this.component, '_adjustHeight', value);\n\t}\n\n\tpublic validateDisabled(value?: boolean): void {\n\t\twatchBoolean(this.component, '_disabled', value);\n\t\tif (value === true) {\n\t\t\ta11yHintDisabled();\n\t\t}\n\t}\n\n\tpublic validateError(value?: string): void {\n\t\twatchString(this.component, '_error', value);\n\t}\n\n\tpublic validateHideLabel(value?: boolean): void {\n\t\twatchBoolean(this.component, '_hideLabel', value);\n\t}\n\n\tpublic validateHint(value?: string): void {\n\t\twatchString(this.component, '_hint', value);\n\t}\n\n\tpublic validateId(value?: string): void {\n\t\twatchString(this.component, '_id', value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: this.syncFormAssociatedName,\n\t\t\t},\n\t\t\tminLength: 1,\n\t\t});\n\t\tif (value === '' || typeof value === 'undefined') {\n\t\t\tdevHint(`Eine eindeutige ID an den Eingabefeldern ist nicht zwingend erforderlich, könnte aber für die E2E-Tests relevant sein.`);\n\t\t}\n\t}\n\n\tpublic validateName(value?: string): void {\n\t\twatchString(this.component, '_name', value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: this.syncFormAssociatedName,\n\t\t\t},\n\t\t});\n\t\tif (typeof value === 'undefined') {\n\t\t\tdevHint(\n\t\t\t\t`Ein Name an den Eingabefeldern ist nicht zwingend erforderlich, kann aber für die Autocomplete-Funktion und für das statische Versenden des Eingabefeldes relevant sein.`\n\t\t\t);\n\t\t}\n\t}\n\n\tpublic validateOn(value?: InputTypeOnDefault): void {\n\t\tif (typeof value === 'object') {\n\t\t\tsetState(this.component, '_on', value);\n\t\t}\n\t}\n\n\tpublic validateSmartButton(value?: ButtonProps | string): void {\n\t\tobjectObjectHandler(value, () => {\n\t\t\ttry {\n\t\t\t\tvalue = parseJson<ButtonProps>(value as string);\n\t\t\t\t// eslint-disable-next-line no-empty\n\t\t\t} catch (e) {\n\t\t\t\t// value behält den ursprünglichen Wert\n\t\t\t}\n\t\t\tsetState(this.component, '_smartButton', value);\n\t\t});\n\t}\n\n\tpublic validateTabIndex(value?: number): void {\n\t\tvalidateTabIndex(this.component, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateAccessKey(this.component._accessKey);\n\t\tthis.validateAdjustHeight(this.component._adjustHeight);\n\t\tthis.validateError(this.component._error);\n\t\tthis.validateDisabled(this.component._disabled);\n\t\tthis.validateHideLabel(this.component._hideLabel);\n\t\tthis.validateHint(this.component._hint);\n\t\tthis.validateId(this.component._id);\n\t\tthis.validateName(this.component._name);\n\t\tthis.validateSmartButton(this.component._smartButton);\n\t\tthis.validateOn(this.component._on);\n\t\tthis.validateTabIndex(this.component._tabIndex);\n\t\tthis.syncFormAssociatedName();\n\t}\n\n\tprotected onBlur(event: Event): void {\n\t\tthis.component._alert = true;\n\t\tthis.component._touched = true;\n\t\tif (typeof this.component._on?.onBlur === 'function') {\n\t\t\tthis.component._on.onBlur(event);\n\t\t}\n\t}\n\n\tprotected onChange(event: Event): void {\n\t\tconst value = (event.target as HTMLInputElement).value;\n\t\tthis.setFormAssociatedValue(value);\n\t\tthis.valueChangeListeners.forEach((listener) => listener(value));\n\t\tif (typeof this.component._on?.onChange === 'function') {\n\t\t\t/**\n\t\t\t * TODO\n\t\t\t * Value-Handling muss für InputDate und InputNumber optimiert werden\n\t\t\t * - value\n\t\t\t * - valueAsNumber\n\t\t\t * - valueAsDate\n\t\t\t */\n\t\t\tthis.component._on.onChange(event, value);\n\t\t}\n\t}\n\n\tprotected onClick(event: Event): void {\n\t\tif (typeof this.component._on?.onClick === 'function') {\n\t\t\tthis.component._on.onClick(event);\n\t\t}\n\t}\n\n\tprotected onFocus(event: Event): void {\n\t\tthis.component._alert = true;\n\t\tif (typeof this.component._on?.onFocus === 'function') {\n\t\t\tthis.component._on.onFocus(event);\n\t\t}\n\t}\n\n\tpublic setValue(event: Event, value: string | number | boolean): void {\n\t\tthis.setFormAssociatedValue(value as string);\n\t\tif (typeof this.component._on?.onChange === 'function') {\n\t\t\tthis.component._on.onChange(event, value);\n\t\t}\n\t}\n\n\tpublic addValueChangeListener(listener: ValueChangeListener) {\n\t\tthis.valueChangeListeners.push(listener);\n\t}\n\n\t/**\n\t * Hinweis: In der Subklasse 'InputPasswordController'\n\t * werden die Methoden onBlur und onFocus\n\t * überschrieben.\n\t * Es werden somit zunächst die Methoden der\n\t * Subklasse ausgeführt und danach die der\n\t * Oberklassen.\n\t */\n\tpublic readonly onFacade = {\n\t\tonBlur: this.onBlur.bind(this),\n\t\tonChange: this.onChange.bind(this),\n\t\tonClick: this.onClick.bind(this),\n\t\tonFocus: this.onFocus.bind(this),\n\t};\n}\n"],"version":3}
1
+ {"file":"controller-521c7ae9.js","mappings":";;;;;;;;;;MAOa,eAAe,GAAG,CAAC,KAK/B;EAKA,MAAM,QAAQ,GAAG,OAAO,KAAK,CAAC,MAAM,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,QAAQ,KAAK,IAAI,CAAC;EACxG,MAAM,OAAO,GAAG,OAAO,KAAK,CAAC,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;EAE1E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tD,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;KAClC;GACD;EAES,OAAO,CAAC,KAAY;;IAC7B,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC;IAC7B,IAAI,QAAO,MAAA,IAAI,CAAC,SAAS,CAAC,GAAG,0CAAE,OAAO,CAAA,KAAK,UAAU,EAAE;MACtD,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;KAClC;GACD;EAEM,QAAQ,CAAC,KAAY,EAAE,KAAgC;;IAC7D,IAAI,CAAC,sBAAsB,CAAC,KAAe,CAAC,CAAC;IAC7C,IAAI,QAAO,MAAA,IAAI,CAAC,SAAS,CAAC,GAAG,0CAAE,QAAQ,CAAA,KAAK,UAAU,EAAE;MACvD,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;KAC1C;GACD;EAEM,sBAAsB,CAAC,QAA6B;IAC1D,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;GACzC;;;;;;","names":["getExperimalMode","watchBoolean","watchString","a11yHintDisabled","devHint","setState","objectObjectHandler","parseJson","validateTabIndex"],"sources":["./src/components/input/controller.ts","./src/components/input-adapter-leanup/controller.ts","./src/components/@deprecated/input/controller.ts"],"sourcesContent":["/**\n * Berechnet in Abhängigkeit des Component-State, wie die\n * aria-describedby-Attributs gesetzt werden sollen.\n *\n * @param state State der Component\n * @returns Render-States\n */\nexport const getRenderStates = (state: {\n\t_error?: string;\n\t_hint?: string;\n\t_id: string;\n\t_touched?: boolean;\n}): {\n\thasError: boolean;\n\thasHint: boolean;\n\tariaDescribedBy: string[];\n} => {\n\tconst hasError = typeof state._error === 'string' && state._error.length > 0 && state._touched === true;\n\tconst hasHint = typeof state._hint === 'string' && state._hint.length > 0;\n\n\tconst ariaDescribedBy: string[] = [];\n\tif (hasError === true) {\n\t\tariaDescribedBy.push(`${state._id}-error`);\n\t}\n\tif (hasHint === true) {\n\t\tariaDescribedBy.push(`${state._id}-hint`);\n\t}\n\treturn { hasError, hasHint, ariaDescribedBy };\n};\n","import { Generic } from '@a11y-ui/core';\nimport { getExperimalMode } from '../../utils/dev.utils';\nimport { watchBoolean } from '../../utils/prop.validators';\nimport { Props, Watches } from './types';\n\nconst EXPERIMENTAL_MODE = getExperimalMode();\n\nexport class ControlledInputController implements Watches {\n\tprotected readonly component: Generic.Element.Component & Props;\n\tprotected readonly name: string;\n\tprotected readonly host?: HTMLElement;\n\n\tpublic readonly formAssociated?: HTMLInputElement;\n\n\tpublic constructor(component: Generic.Element.Component & Props, name: string, host?: HTMLElement) {\n\t\tthis.component = component;\n\t\tthis.name = name;\n\t\tthis.host = host;\n\t\tif (EXPERIMENTAL_MODE) {\n\t\t\tthis.formAssociated = document.createElement('input');\n\t\t\tthis.formAssociated.setAttribute('type', 'hidden');\n\t\t\tconst children = this.host?.children || [];\n\t\t\tfor (let i = 0; i < children.length; i++) {\n\t\t\t\tif (this.host?.children[i].tagName === 'INPUT') {\n\t\t\t\t\tthis.host?.removeChild(this.host?.children[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.host?.appendChild(this.formAssociated);\n\t\t}\n\t}\n\n\tprotected readonly syncFormAssociatedName = () => {\n\t\tif (EXPERIMENTAL_MODE) {\n\t\t\tthis.formAssociated?.setAttribute('name', (this.component.state._name as string) || (this.component.state._id as string));\n\t\t}\n\t};\n\n\tpublic readonly setFormAssociatedValue = (value: string | null = null) => {\n\t\tif (EXPERIMENTAL_MODE) {\n\t\t\tthis.formAssociated?.setAttribute('value', value as string);\n\t\t}\n\t};\n\n\tpublic validateAlert(value?: boolean): void {\n\t\twatchBoolean(this.component, '_alert', value);\n\t}\n\n\tpublic validateTouched(value?: boolean): void {\n\t\twatchBoolean(this.component, '_touched', value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateAlert(this.component._alert);\n\t\tthis.validateTouched(this.component._touched);\n\t}\n}\n","import { Generic } from '@a11y-ui/core';\nimport { ButtonProps } from '../../../types/button-link';\nimport { InputTypeOnDefault } from '../../../types/input/types';\nimport { a11yHintDisabled, devHint } from '../../../utils/a11y.tipps';\nimport { objectObjectHandler, parseJson, setState, watchBoolean, watchString } from '../../../utils/prop.validators';\nimport { validateTabIndex } from '../../../utils/validators/tab-index';\nimport { ControlledInputController } from '../../input-adapter-leanup/controller';\nimport { Props as AdapterProps } from '../../input-adapter-leanup/types';\nimport { Props, Watches } from './types';\n\ntype ValueChangeListener = (value: string) => void;\n\nexport class InputController extends ControlledInputController implements Watches {\n\tprotected readonly component: Generic.Element.Component & Props & AdapterProps;\n\n\tpublic hideLabel = false;\n\n\tprivate readonly valueChangeListeners: ValueChangeListener[] = [];\n\n\tpublic constructor(component: Generic.Element.Component & Props, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateAccessKey(value?: string): void {\n\t\twatchString(this.component, '_accessKey', value);\n\t}\n\n\tpublic validateAdjustHeight(value?: boolean): void {\n\t\twatchBoolean(this.component, '_adjustHeight', value);\n\t}\n\n\tpublic validateDisabled(value?: boolean): void {\n\t\twatchBoolean(this.component, '_disabled', value);\n\t\tif (value === true) {\n\t\t\ta11yHintDisabled();\n\t\t}\n\t}\n\n\tpublic validateError(value?: string): void {\n\t\twatchString(this.component, '_error', value);\n\t}\n\n\tpublic validateHideLabel(value?: boolean): void {\n\t\twatchBoolean(this.component, '_hideLabel', value);\n\t}\n\n\tpublic validateHint(value?: string): void {\n\t\twatchString(this.component, '_hint', value);\n\t}\n\n\tpublic validateId(value?: string): void {\n\t\twatchString(this.component, '_id', value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: this.syncFormAssociatedName,\n\t\t\t},\n\t\t\tminLength: 1,\n\t\t});\n\t\tif (value === '' || typeof value === 'undefined') {\n\t\t\tdevHint(`Eine eindeutige ID an den Eingabefeldern ist nicht zwingend erforderlich, könnte aber für die E2E-Tests relevant sein.`);\n\t\t}\n\t}\n\n\tpublic validateName(value?: string): void {\n\t\twatchString(this.component, '_name', value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: this.syncFormAssociatedName,\n\t\t\t},\n\t\t});\n\t\tif (typeof value === 'undefined') {\n\t\t\tdevHint(\n\t\t\t\t`Ein Name an den Eingabefeldern ist nicht zwingend erforderlich, kann aber für die Autocomplete-Funktion und für das statische Versenden des Eingabefeldes relevant sein.`\n\t\t\t);\n\t\t}\n\t}\n\n\tpublic validateOn(value?: InputTypeOnDefault): void {\n\t\tif (typeof value === 'object') {\n\t\t\tsetState(this.component, '_on', value);\n\t\t}\n\t}\n\n\tpublic validateSmartButton(value?: ButtonProps | string): void {\n\t\tobjectObjectHandler(value, () => {\n\t\t\ttry {\n\t\t\t\tvalue = parseJson<ButtonProps>(value as string);\n\t\t\t\t// eslint-disable-next-line no-empty\n\t\t\t} catch (e) {\n\t\t\t\t// value behält den ursprünglichen Wert\n\t\t\t}\n\t\t\tsetState(this.component, '_smartButton', value);\n\t\t});\n\t}\n\n\tpublic validateTabIndex(value?: number): void {\n\t\tvalidateTabIndex(this.component, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateAccessKey(this.component._accessKey);\n\t\tthis.validateAdjustHeight(this.component._adjustHeight);\n\t\tthis.validateError(this.component._error);\n\t\tthis.validateDisabled(this.component._disabled);\n\t\tthis.validateHideLabel(this.component._hideLabel);\n\t\tthis.validateHint(this.component._hint);\n\t\tthis.validateId(this.component._id);\n\t\tthis.validateName(this.component._name);\n\t\tthis.validateSmartButton(this.component._smartButton);\n\t\tthis.validateOn(this.component._on);\n\t\tthis.validateTabIndex(this.component._tabIndex);\n\t\tthis.syncFormAssociatedName();\n\t}\n\n\tprotected onBlur(event: Event): void {\n\t\tthis.component._alert = true;\n\t\tthis.component._touched = true;\n\t\tif (typeof this.component._on?.onBlur === 'function') {\n\t\t\tthis.component._on.onBlur(event);\n\t\t}\n\t}\n\n\tprotected onChange(event: Event): void {\n\t\tconst value = (event.target as HTMLInputElement).value;\n\t\tthis.setFormAssociatedValue(value);\n\t\tthis.valueChangeListeners.forEach((listener) => listener(value));\n\t\tif (typeof this.component._on?.onChange === 'function') {\n\t\t\t/**\n\t\t\t * TODO\n\t\t\t * Value-Handling muss für InputDate und InputNumber optimiert werden\n\t\t\t * - value\n\t\t\t * - valueAsNumber\n\t\t\t * - valueAsDate\n\t\t\t */\n\t\t\tthis.component._on.onChange(event, value);\n\t\t}\n\t}\n\n\tprotected onClick(event: Event): void {\n\t\tif (typeof this.component._on?.onClick === 'function') {\n\t\t\tthis.component._on.onClick(event);\n\t\t}\n\t}\n\n\tprotected onFocus(event: Event): void {\n\t\tthis.component._alert = true;\n\t\tif (typeof this.component._on?.onFocus === 'function') {\n\t\t\tthis.component._on.onFocus(event);\n\t\t}\n\t}\n\n\tpublic setValue(event: Event, value: string | number | boolean): void {\n\t\tthis.setFormAssociatedValue(value as string);\n\t\tif (typeof this.component._on?.onChange === 'function') {\n\t\t\tthis.component._on.onChange(event, value);\n\t\t}\n\t}\n\n\tpublic addValueChangeListener(listener: ValueChangeListener) {\n\t\tthis.valueChangeListeners.push(listener);\n\t}\n\n\t/**\n\t * Hinweis: In der Subklasse 'InputPasswordController'\n\t * werden die Methoden onBlur und onFocus\n\t * überschrieben.\n\t * Es werden somit zunächst die Methoden der\n\t * Subklasse ausgeführt und danach die der\n\t * Oberklassen.\n\t */\n\tpublic readonly onFacade = {\n\t\tonBlur: this.onBlur.bind(this),\n\t\tonChange: this.onChange.bind(this),\n\t\tonClick: this.onClick.bind(this),\n\t\tonFocus: this.onFocus.bind(this),\n\t};\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- "use strict";const prop_validators=require("./prop.validators-dd1f7878.js"),reuse=require("./reuse-0fe7470f.js"),controller=require("./controller-536f457e.js"),fillKeyOptionMap=(t,e,o="")=>{e.forEach(((e,i)=>{const a=`${o}-${i}`;"object"==typeof e&&null!==e&&"string"==typeof e.label&&e.label.length>0&&(Array.isArray(e.options)?fillKeyOptionMap(t,e.options,a):t.set(a,e))}))};class InputCheckboxRadioController extends controller.InputController{constructor(t,e,o){super(t,e,o),this.component=t}validateRequired(t){prop_validators.watchBoolean(this.component,"_required",t)}componentWillLoad(){super.componentWillLoad(),this.validateRequired(this.component._required)}}class InputRadioController extends InputCheckboxRadioController{constructor(t,e,o){super(t,e,o),this.keyOptionMap=new Map,this.getOptionByKey=t=>this.keyOptionMap.get(t),this.isValueInOptions=(t,e)=>void 0!==e.find((e=>e.value===t)),this.beforePatchListValue=(t,e)=>{const o=e.has("_list")?e.get("_list"):this.component.state._list;if(Array.isArray(o)&&o.length>0){this.keyOptionMap.clear(),fillKeyOptionMap(this.keyOptionMap,o);const t=e.has("_value")?e.get("_value"):this.component.state._value;if(!1===this.isValueInOptions(t,o)){const t=o[0].value;e.set("_value",t),this.onStateChange()}}},this.component=t}validateOrientation(t){prop_validators.watchValidator(this.component,"_orientation",(t=>"horizontal"===t||"vertical"===t),new Set(["Orientation {horizontal, vertical}"]),t,{defaultValue:"vertical"})}validateList(t){prop_validators.watchJsonArrayString(this.component,"_list",(t=>"object"==typeof t&&null!==t&&"string"==typeof t.label&&t.label.length>0),t,void 0,{hooks:{beforePatch:this.beforePatchListValue}})}validateValue(t){t=prop_validators.mapString2Unknown(t),t=Array.isArray(t)?t[0]:t,prop_validators.setState(this.component,"_value",t,{beforePatch:this.beforePatchListValue}),this.setFormAssociatedValue(this.component._value)}componentWillLoad(t){super.componentWillLoad(),this.onStateChange=()=>{if("function"==typeof t){const e=setTimeout((()=>{clearTimeout(e),t(reuse.STATE_CHANGE_EVENT)}))}},this.validateOrientation(this.component._orientation),this.validateList(this.component._list),this.validateValue(this.component._value)}}exports.InputCheckboxRadioController=InputCheckboxRadioController,exports.InputRadioController=InputRadioController,exports.fillKeyOptionMap=fillKeyOptionMap;
4
+ "use strict";const prop_validators=require("./prop.validators-dd1f7878.js"),reuse=require("./reuse-0fe7470f.js"),controller=require("./controller-521c7ae9.js"),fillKeyOptionMap=(t,e,o="")=>{e.forEach(((e,i)=>{const a=`${o}-${i}`;"object"==typeof e&&null!==e&&"string"==typeof e.label&&e.label.length>0&&(Array.isArray(e.options)?fillKeyOptionMap(t,e.options,a):t.set(a,e))}))};class InputCheckboxRadioController extends controller.InputController{constructor(t,e,o){super(t,e,o),this.component=t}validateRequired(t){prop_validators.watchBoolean(this.component,"_required",t)}componentWillLoad(){super.componentWillLoad(),this.validateRequired(this.component._required)}}class InputRadioController extends InputCheckboxRadioController{constructor(t,e,o){super(t,e,o),this.keyOptionMap=new Map,this.getOptionByKey=t=>this.keyOptionMap.get(t),this.isValueInOptions=(t,e)=>void 0!==e.find((e=>e.value===t)),this.beforePatchListValue=(t,e)=>{const o=e.has("_list")?e.get("_list"):this.component.state._list;if(Array.isArray(o)&&o.length>0){this.keyOptionMap.clear(),fillKeyOptionMap(this.keyOptionMap,o);const t=e.has("_value")?e.get("_value"):this.component.state._value;if(!1===this.isValueInOptions(t,o)){const t=o[0].value;e.set("_value",t),this.onStateChange()}}},this.component=t}validateOrientation(t){prop_validators.watchValidator(this.component,"_orientation",(t=>"horizontal"===t||"vertical"===t),new Set(["Orientation {horizontal, vertical}"]),t,{defaultValue:"vertical"})}validateList(t){prop_validators.watchJsonArrayString(this.component,"_list",(t=>"object"==typeof t&&null!==t&&"string"==typeof t.label&&t.label.length>0),t,void 0,{hooks:{beforePatch:this.beforePatchListValue}})}validateValue(t){t=prop_validators.mapString2Unknown(t),t=Array.isArray(t)?t[0]:t,prop_validators.setState(this.component,"_value",t,{beforePatch:this.beforePatchListValue}),this.setFormAssociatedValue(this.component._value)}componentWillLoad(t){super.componentWillLoad(),this.onStateChange=()=>{if("function"==typeof t){const e=setTimeout((()=>{clearTimeout(e),t(reuse.STATE_CHANGE_EVENT)}))}},this.validateOrientation(this.component._orientation),this.validateList(this.component._list),this.validateValue(this.component._value)}}exports.InputCheckboxRadioController=InputCheckboxRadioController,exports.InputRadioController=InputRadioController,exports.fillKeyOptionMap=fillKeyOptionMap;
@@ -1 +1 @@
1
- {"file":"controller-46148a56.js","mappings":";;;;;;;;;MAUa,gBAAgB,GAAG,CAAI,YAAoC,EAAE,OAA0B,EAAE,MAAM,GAAG,EAAE;EAChH,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,KAAK;IAC7B,MAAM,GAAG,GAAG,GAAG,MAAM,IAAI,KAAK,EAAE,CAAC;IACjC,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI,IAAI,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;MACjH,IAAI,KAAK,CAAC,OAAO,CAAE,MAAsB,CAAC,OAAO,CAAC,EAAE;QACnD,gBAAgB,CAAC,YAAY,EAAG,MAAsB,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;OACrE;WAAM;QACN,YAAY,CAAC,GAAG,CAAC,GAAG,EAAE,MAAmB,CAAC,CAAC;OAC3C;KACD;GACD,CAAC,CAAC;AACJ,EAAE;MASW,4BAA6B,SAAQA,0BAAe;EAGhE,YAAmB,SAA8D,EAAE,IAAY,EAAE,IAAkB;IAClH,KAAK,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAC7B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;GAC3B;EAEM,gBAAgB,CAAC,KAAe;IACtCC,4BAAY,CAAC,IAAI,CAAC,SAAS,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;GACjD;EAEM,iBAAiB;IACvB,KAAK,CAAC,iBAAiB,EAAE,CAAC;IAC1B,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;GAChD;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AU,EAAE;QACnC,MAAM,OAAO,GAAG,UAAU,CAAC;UAC1B,YAAY,CAAC,OAAO,CAAC,CAAC;UACtB,QAAQ,CAACC,wBAAkB,CAAC,CAAC;SAC7B,CAAC,CAAC;OACH;KACD,CAAC;IAEF,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;IACtD,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACxC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;GAC1C;;;;;;;","names":["InputController","watchBoolean","watchValidator","watchJsonArrayString","mapString2Unknown","setState","STATE_CHANGE_EVENT"],"sources":["./src/components/input-radio/controller.ts"],"sourcesContent":["import { Generic } from '@a11y-ui/core';\nimport { Stringified } from '../../types/common';\nimport { Optgroup, Option, SelectOption } from '../../types/input/types';\nimport { Orientation } from '../../types/orientation';\nimport { W3CInputValue } from '../../types/w3c';\nimport { mapString2Unknown, setState, watchBoolean, watchJsonArrayString, watchValidator } from '../../utils/prop.validators';\nimport { STATE_CHANGE_EVENT } from '../../utils/validator';\nimport { InputController } from '../@deprecated/input/controller';\nimport { Props, Watches } from './types';\n\nexport const fillKeyOptionMap = <T>(keyOptionMap: Map<string, Option<T>>, options: SelectOption<T>[], preKey = ''): void => {\n\toptions.forEach((option, index) => {\n\t\tconst key = `${preKey}-${index}`;\n\t\tif (typeof option === 'object' && option !== null && typeof option.label === 'string' && option.label.length > 0) {\n\t\t\tif (Array.isArray((option as Optgroup<T>).options)) {\n\t\t\t\tfillKeyOptionMap(keyOptionMap, (option as Optgroup<T>).options, key);\n\t\t\t} else {\n\t\t\t\tkeyOptionMap.set(key, option as Option<T>);\n\t\t\t}\n\t\t}\n\t});\n};\n\ntype RequiredProps = unknown;\ntype OptionalProps = {\n\trequired: boolean;\n};\ntype InputCheckboxRadioProps = Generic.Element.Members<RequiredProps, OptionalProps>;\ntype InputCheckboxRadioWatches = Generic.Element.Watchers<RequiredProps, OptionalProps>;\n\nexport class InputCheckboxRadioController extends InputController implements InputCheckboxRadioWatches {\n\tprotected readonly component: Generic.Element.Component & InputCheckboxRadioProps;\n\n\tpublic constructor(component: Generic.Element.Component & InputCheckboxRadioProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateRequired(value?: boolean): void {\n\t\twatchBoolean(this.component, '_required', value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateRequired(this.component._required);\n\t}\n}\n\nexport class InputRadioController extends InputCheckboxRadioController implements Watches {\n\tprotected readonly component: Generic.Element.Component & Props;\n\tprivate onStateChange!: () => void;\n\tprivate readonly keyOptionMap = new Map<string, Option<W3CInputValue>>();\n\n\tpublic constructor(component: Generic.Element.Component & Props, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic readonly getOptionByKey = (key: string): Option<W3CInputValue> | undefined => this.keyOptionMap.get(key);\n\n\tprivate readonly isValueInOptions = (value: unknown, options: Option<W3CInputValue>[]): boolean => {\n\t\treturn options.find((option) => option.value === value) !== undefined;\n\t};\n\n\tprotected readonly beforePatchListValue = (_value: unknown, nextState: Map<string, unknown>): void => {\n\t\tconst list = nextState.has('_list') ? nextState.get('_list') : this.component.state._list;\n\t\tif (Array.isArray(list) && list.length > 0) {\n\t\t\tthis.keyOptionMap.clear();\n\t\t\tfillKeyOptionMap(this.keyOptionMap, list as SelectOption<W3CInputValue>[]);\n\t\t\tconst value = nextState.has('_value') ? nextState.get('_value') : this.component.state._value;\n\t\t\tif (this.isValueInOptions(value, list as Option<W3CInputValue>[]) === false) {\n\t\t\t\tconst newValue = (\n\t\t\t\t\tlist[0] as {\n\t\t\t\t\t\tvalue: string;\n\t\t\t\t\t}\n\t\t\t\t).value;\n\t\t\t\tnextState.set('_value', newValue);\n\t\t\t\tthis.onStateChange();\n\t\t\t}\n\t\t}\n\t};\n\n\tpublic validateOrientation(value?: Orientation): void {\n\t\twatchValidator(\n\t\t\tthis.component,\n\t\t\t'_orientation',\n\t\t\t(value): boolean => value === 'horizontal' || value === 'vertical',\n\t\t\tnew Set(['Orientation {horizontal, vertical}']),\n\t\t\tvalue,\n\t\t\t{\n\t\t\t\tdefaultValue: 'vertical',\n\t\t\t}\n\t\t);\n\t}\n\n\tpublic validateList(value?: Stringified<Option<W3CInputValue>[]>): void {\n\t\twatchJsonArrayString(\n\t\t\tthis.component,\n\t\t\t'_list',\n\t\t\t(item: Option<W3CInputValue>) => typeof item === 'object' && item !== null && typeof item.label === 'string' && item.label.length > 0,\n\t\t\tvalue,\n\t\t\tundefined,\n\t\t\t{\n\t\t\t\thooks: {\n\t\t\t\t\tbeforePatch: this.beforePatchListValue,\n\t\t\t\t},\n\t\t\t}\n\t\t);\n\t}\n\n\tpublic validateValue(value?: Stringified<unknown>): void {\n\t\tvalue = mapString2Unknown(value);\n\t\tvalue = Array.isArray(value) ? value[0] : value;\n\t\tsetState(this.component, '_value', value, {\n\t\t\tbeforePatch: this.beforePatchListValue,\n\t\t});\n\t\tthis.setFormAssociatedValue(this.component._value as string);\n\t}\n\n\tpublic componentWillLoad(onChange?: (event: Event) => void): void {\n\t\tsuper.componentWillLoad();\n\n\t\tthis.onStateChange = () => {\n\t\t\tif (typeof onChange === 'function') {\n\t\t\t\tconst timeout = setTimeout(() => {\n\t\t\t\t\tclearTimeout(timeout);\n\t\t\t\t\tonChange(STATE_CHANGE_EVENT);\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\n\t\tthis.validateOrientation(this.component._orientation);\n\t\tthis.validateList(this.component._list);\n\t\tthis.validateValue(this.component._value);\n\t}\n}\n"],"version":3}
1
+ {"file":"controller-7f4b0caf.js","mappings":";;;;;;;;;MAUa,gBAAgB,GAAG,CAAI,YAAoC,EAAE,OAA0B,EAAE,MAAM,GAAG,EAAE;EAChH,OAAO,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KAAK,CAAC,CAAC;IACxC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;GAC1C;;;;;;;","names":["InputController","watchBoolean","watchValidator","watchJsonArrayString","mapString2Unknown","setState","STATE_CHANGE_EVENT"],"sources":["./src/components/input-radio/controller.ts"],"sourcesContent":["import { Generic } from '@a11y-ui/core';\nimport { Stringified } from '../../types/common';\nimport { Optgroup, Option, SelectOption } from '../../types/input/types';\nimport { Orientation } from '../../types/orientation';\nimport { W3CInputValue } from '../../types/w3c';\nimport { mapString2Unknown, setState, watchBoolean, watchJsonArrayString, watchValidator } from '../../utils/prop.validators';\nimport { STATE_CHANGE_EVENT } from '../../utils/validator';\nimport { InputController } from '../@deprecated/input/controller';\nimport { Props, Watches } from './types';\n\nexport const fillKeyOptionMap = <T>(keyOptionMap: Map<string, Option<T>>, options: SelectOption<T>[], preKey = ''): void => {\n\toptions.forEach((option, index) => {\n\t\tconst key = `${preKey}-${index}`;\n\t\tif (typeof option === 'object' && option !== null && typeof option.label === 'string' && option.label.length > 0) {\n\t\t\tif (Array.isArray((option as Optgroup<T>).options)) {\n\t\t\t\tfillKeyOptionMap(keyOptionMap, (option as Optgroup<T>).options, key);\n\t\t\t} else {\n\t\t\t\tkeyOptionMap.set(key, option as Option<T>);\n\t\t\t}\n\t\t}\n\t});\n};\n\ntype RequiredProps = unknown;\ntype OptionalProps = {\n\trequired: boolean;\n};\ntype InputCheckboxRadioProps = Generic.Element.Members<RequiredProps, OptionalProps>;\ntype InputCheckboxRadioWatches = Generic.Element.Watchers<RequiredProps, OptionalProps>;\n\nexport class InputCheckboxRadioController extends InputController implements InputCheckboxRadioWatches {\n\tprotected readonly component: Generic.Element.Component & InputCheckboxRadioProps;\n\n\tpublic constructor(component: Generic.Element.Component & InputCheckboxRadioProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateRequired(value?: boolean): void {\n\t\twatchBoolean(this.component, '_required', value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateRequired(this.component._required);\n\t}\n}\n\nexport class InputRadioController extends InputCheckboxRadioController implements Watches {\n\tprotected readonly component: Generic.Element.Component & Props;\n\tprivate onStateChange!: () => void;\n\tprivate readonly keyOptionMap = new Map<string, Option<W3CInputValue>>();\n\n\tpublic constructor(component: Generic.Element.Component & Props, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic readonly getOptionByKey = (key: string): Option<W3CInputValue> | undefined => this.keyOptionMap.get(key);\n\n\tprivate readonly isValueInOptions = (value: unknown, options: Option<W3CInputValue>[]): boolean => {\n\t\treturn options.find((option) => option.value === value) !== undefined;\n\t};\n\n\tprotected readonly beforePatchListValue = (_value: unknown, nextState: Map<string, unknown>): void => {\n\t\tconst list = nextState.has('_list') ? nextState.get('_list') : this.component.state._list;\n\t\tif (Array.isArray(list) && list.length > 0) {\n\t\t\tthis.keyOptionMap.clear();\n\t\t\tfillKeyOptionMap(this.keyOptionMap, list as SelectOption<W3CInputValue>[]);\n\t\t\tconst value = nextState.has('_value') ? nextState.get('_value') : this.component.state._value;\n\t\t\tif (this.isValueInOptions(value, list as Option<W3CInputValue>[]) === false) {\n\t\t\t\tconst newValue = (\n\t\t\t\t\tlist[0] as {\n\t\t\t\t\t\tvalue: string;\n\t\t\t\t\t}\n\t\t\t\t).value;\n\t\t\t\tnextState.set('_value', newValue);\n\t\t\t\tthis.onStateChange();\n\t\t\t}\n\t\t}\n\t};\n\n\tpublic validateOrientation(value?: Orientation): void {\n\t\twatchValidator(\n\t\t\tthis.component,\n\t\t\t'_orientation',\n\t\t\t(value): boolean => value === 'horizontal' || value === 'vertical',\n\t\t\tnew Set(['Orientation {horizontal, vertical}']),\n\t\t\tvalue,\n\t\t\t{\n\t\t\t\tdefaultValue: 'vertical',\n\t\t\t}\n\t\t);\n\t}\n\n\tpublic validateList(value?: Stringified<Option<W3CInputValue>[]>): void {\n\t\twatchJsonArrayString(\n\t\t\tthis.component,\n\t\t\t'_list',\n\t\t\t(item: Option<W3CInputValue>) => typeof item === 'object' && item !== null && typeof item.label === 'string' && item.label.length > 0,\n\t\t\tvalue,\n\t\t\tundefined,\n\t\t\t{\n\t\t\t\thooks: {\n\t\t\t\t\tbeforePatch: this.beforePatchListValue,\n\t\t\t\t},\n\t\t\t}\n\t\t);\n\t}\n\n\tpublic validateValue(value?: Stringified<unknown>): void {\n\t\tvalue = mapString2Unknown(value);\n\t\tvalue = Array.isArray(value) ? value[0] : value;\n\t\tsetState(this.component, '_value', value, {\n\t\t\tbeforePatch: this.beforePatchListValue,\n\t\t});\n\t\tthis.setFormAssociatedValue(this.component._value as string);\n\t}\n\n\tpublic componentWillLoad(onChange?: (event: Event) => void): void {\n\t\tsuper.componentWillLoad();\n\n\t\tthis.onStateChange = () => {\n\t\t\tif (typeof onChange === 'function') {\n\t\t\t\tconst timeout = setTimeout(() => {\n\t\t\t\t\tclearTimeout(timeout);\n\t\t\t\t\tonChange(STATE_CHANGE_EVENT);\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\n\t\tthis.validateOrientation(this.component._orientation);\n\t\tthis.validateList(this.component._list);\n\t\tthis.validateValue(this.component._value);\n\t}\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- "use strict";const a11y_tipps=require("./a11y.tipps-6f0ad06e.js"),prop_validators=require("./prop.validators-dd1f7878.js"),controllerIcon=require("./controller-icon-f01acf97.js");class InputPasswordController extends controllerIcon.InputIconController{constructor(e,t,o){super(e,t,o),this.handleHiddenLabelAndRequired=()=>{!0===this.component.state._hideLabel&&!0===this.component.state._required?(a11y_tipps.devHint("[KolInput*] Wenn man das Label ausblendet, dann kann der sehende Nutzer:in nicht mehr erkennen, ob die Eingabe erforderlich ist."),this.hideLabel=!1):this.hideLabel=!0===this.component.state._hideLabel},this.component=e}validateAutoComplete(e){prop_validators.watchValidator(this.component,"_autoComplete",(e=>"string"==typeof e&&("on"===e||"off"===e)),new Set(["on | off"]),e)}validateHideLabel(e){prop_validators.watchBoolean(this.component,"_hideLabel",e,{hooks:{afterPatch:this.handleHiddenLabelAndRequired}})}validateMaxLength(e){prop_validators.watchNumber(this.component,"_maxLength",e,{min:0})}validatePattern(e){prop_validators.watchString(this.component,"_pattern",e)}validatePlaceholder(e){prop_validators.watchString(this.component,"_placeholder",e)}validateReadOnly(e){prop_validators.watchBoolean(this.component,"_readOnly",e)}validateRequired(e){prop_validators.watchBoolean(this.component,"_required",e,{hooks:{afterPatch:this.handleHiddenLabelAndRequired}})}validateSize(e){prop_validators.watchNumber(this.component,"_size",e,{min:1})}validateValue(e){prop_validators.watchString(this.component,"_value",e)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateMaxLength(this.component._maxLength),this.validatePattern(this.component._pattern),this.validatePlaceholder(this.component._placeholder),this.validateReadOnly(this.component._readOnly),this.validateRequired(this.component._required),this.validateSize(this.component._size),this.validateValue(this.component._value)}onBlur(e){this.component.state=Object.assign(Object.assign({},this.component.state),{_placeholder:this.placeholderCache}),this.placeholderCache=void 0,super.onBlur(e)}onFocus(e){this.placeholderCache=this.component.state._placeholder,this.component.state=Object.assign(Object.assign({},this.component.state),{_placeholder:void 0}),super.onFocus(e)}}exports.InputPasswordController=InputPasswordController;
4
+ "use strict";const a11y_tipps=require("./a11y.tipps-6f0ad06e.js"),prop_validators=require("./prop.validators-dd1f7878.js"),controllerIcon=require("./controller-icon-0a88c097.js");class InputPasswordController extends controllerIcon.InputIconController{constructor(e,t,o){super(e,t,o),this.handleHiddenLabelAndRequired=()=>{!0===this.component.state._hideLabel&&!0===this.component.state._required?(a11y_tipps.devHint("[KolInput*] Wenn man das Label ausblendet, dann kann der sehende Nutzer:in nicht mehr erkennen, ob die Eingabe erforderlich ist."),this.hideLabel=!1):this.hideLabel=!0===this.component.state._hideLabel},this.component=e}validateAutoComplete(e){prop_validators.watchValidator(this.component,"_autoComplete",(e=>"string"==typeof e&&("on"===e||"off"===e)),new Set(["on | off"]),e)}validateHideLabel(e){prop_validators.watchBoolean(this.component,"_hideLabel",e,{hooks:{afterPatch:this.handleHiddenLabelAndRequired}})}validateMaxLength(e){prop_validators.watchNumber(this.component,"_maxLength",e,{min:0})}validatePattern(e){prop_validators.watchString(this.component,"_pattern",e)}validatePlaceholder(e){prop_validators.watchString(this.component,"_placeholder",e)}validateReadOnly(e){prop_validators.watchBoolean(this.component,"_readOnly",e)}validateRequired(e){prop_validators.watchBoolean(this.component,"_required",e,{hooks:{afterPatch:this.handleHiddenLabelAndRequired}})}validateSize(e){prop_validators.watchNumber(this.component,"_size",e,{min:1})}validateValue(e){prop_validators.watchString(this.component,"_value",e)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateMaxLength(this.component._maxLength),this.validatePattern(this.component._pattern),this.validatePlaceholder(this.component._placeholder),this.validateReadOnly(this.component._readOnly),this.validateRequired(this.component._required),this.validateSize(this.component._size),this.validateValue(this.component._value)}onBlur(e){this.component.state=Object.assign(Object.assign({},this.component.state),{_placeholder:this.placeholderCache}),this.placeholderCache=void 0,super.onBlur(e)}onFocus(e){this.placeholderCache=this.component.state._placeholder,this.component.state=Object.assign(Object.assign({},this.component.state),{_placeholder:void 0}),super.onFocus(e)}}exports.InputPasswordController=InputPasswordController;
@@ -1 +1 @@
1
- {"file":"controller-272d14fd.js","mappings":";;;;;;;;;MAOa,uBAAwB,SAAQA,kCAAmB;EAI/D,YAAmB,SAA4C,EAAE,IAAY,EAAE,IAAkB;IAChG,KAAK,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAItB,iCAA4B,GAAG;MACtC,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,UAAU,KAAK,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,SAAS,KAA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AAK,CAAC,CAAC;GACpB;EAES,OAAO,CAAC,KAAY;IAC7B,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,YAAsB,CAAC;IACpE,IAAI,CAAC,SAAS,CAAC,KAAK,mCAChB,IAAI,CAAC,SAAS,CAAC,KAAK,KACvB,YAAY,EAAE,SAAS,GACvB,CAAC;IACF,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;GACrB;;;;;","names":["InputIconController","devHint","watchValidator","watchBoolean","watchNumber","watchString"],"sources":["./src/components/input-password/controller.ts"],"sourcesContent":["import { Generic } from '@a11y-ui/core';\nimport { InputTypeOnOff } from '../../types/input/types';\nimport { devHint } from '../../utils/a11y.tipps';\nimport { watchBoolean, watchNumber, watchString, watchValidator } from '../../utils/prop.validators';\nimport { InputIconController } from '../@deprecated/input/controller-icon';\nimport { Props, Watches } from './types';\n\nexport class InputPasswordController extends InputIconController implements Watches {\n\tprotected readonly component: Generic.Element.Component & Props;\n\tprivate placeholderCache?: string;\n\n\tpublic constructor(component: Generic.Element.Component & Props, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tprivate handleHiddenLabelAndRequired = (): void => {\n\t\tif (this.component.state._hideLabel === true && this.component.state._required === true) {\n\t\t\tdevHint(`[KolInput*] Wenn man das Label ausblendet, dann kann der sehende Nutzer:in nicht mehr erkennen, ob die Eingabe erforderlich ist.`);\n\t\t\tthis.hideLabel = false;\n\t\t} else {\n\t\t\tthis.hideLabel = this.component.state._hideLabel === true;\n\t\t}\n\t};\n\n\tpublic validateAutoComplete(value?: InputTypeOnOff): void {\n\t\twatchValidator(\n\t\t\tthis.component,\n\t\t\t'_autoComplete',\n\t\t\t(value): boolean => typeof value === 'string' && (value === 'on' || value === 'off'),\n\t\t\tnew Set(['on | off']),\n\t\t\tvalue\n\t\t);\n\t}\n\n\tpublic validateHideLabel(value?: boolean): void {\n\t\twatchBoolean(this.component, '_hideLabel', value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: this.handleHiddenLabelAndRequired,\n\t\t\t},\n\t\t});\n\t}\n\n\tpublic validateMaxLength(value?: number): void {\n\t\twatchNumber(this.component, '_maxLength', value, {\n\t\t\tmin: 0,\n\t\t});\n\t}\n\n\tpublic validatePattern(value?: string): void {\n\t\twatchString(this.component, '_pattern', value);\n\t}\n\n\tpublic validatePlaceholder(value?: string): void {\n\t\twatchString(this.component, '_placeholder', value);\n\t}\n\n\tpublic validateReadOnly(value?: boolean): void {\n\t\twatchBoolean(this.component, '_readOnly', value);\n\t}\n\n\tpublic validateRequired(value?: boolean): void {\n\t\twatchBoolean(this.component, '_required', value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: this.handleHiddenLabelAndRequired,\n\t\t\t},\n\t\t});\n\t}\n\n\tpublic validateSize(value?: number): void {\n\t\twatchNumber(this.component, '_size', value, {\n\t\t\tmin: 1,\n\t\t});\n\t}\n\n\tpublic validateValue(value?: string): void {\n\t\twatchString(this.component, '_value', value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateAutoComplete(this.component._autoComplete);\n\t\tthis.validateMaxLength(this.component._maxLength);\n\t\tthis.validatePattern(this.component._pattern);\n\t\tthis.validatePlaceholder(this.component._placeholder);\n\t\tthis.validateReadOnly(this.component._readOnly);\n\t\tthis.validateRequired(this.component._required);\n\t\tthis.validateSize(this.component._size);\n\t\tthis.validateValue(this.component._value);\n\t}\n\n\tprotected onBlur(event: Event): void {\n\t\t/**\n\t\t * Beim Screenreader NVDA wird der Placeholder mit\n\t\t * vorgelesen. Somit kann es vorkommen, dass das\n\t\t * Label und der Placeholder vorgelesen werden.\n\t\t *\n\t\t * Aufgrund dessen, dass das Label immer vorgelesen\n\t\t * werden muss, kann das zusätzliche Vorlesen des\n\t\t * Placeholders störend sein.\n\t\t *\n\t\t * Damit beim Fokussieren das \"doppelte\" vorlesen\n\t\t * vermieden werden kann, wird der Placeholder für\n\t\t * den fokussierten Feldstatus entfernt.\n\t\t *\n\t\t * Hinweis: Für alle Nutzenden müssen die all dar-\n\t\t * gestellten Inhalte, also auch der Place-\n\t\t * holder, gleichermaßen zugänglich sein.\n\t\t * Das oben beschriebene Handling erfüllt\n\t\t * diese Anforderung nicht.\n\t\t */\n\t\tthis.component.state = {\n\t\t\t...this.component.state,\n\t\t\t_placeholder: this.placeholderCache,\n\t\t};\n\t\tthis.placeholderCache = undefined;\n\t\tsuper.onBlur(event);\n\t}\n\n\tprotected onFocus(event: Event): void {\n\t\tthis.placeholderCache = this.component.state._placeholder as string;\n\t\tthis.component.state = {\n\t\t\t...this.component.state,\n\t\t\t_placeholder: undefined,\n\t\t};\n\t\tsuper.onFocus(event);\n\t}\n}\n"],"version":3}
1
+ {"file":"controller-87980d4a.js","mappings":";;;;;;;;;MAOa,uBAAwB,SAAQA,kCAAmB;EAI/D,YAAmB,SAA4C,EAAE,IAAY,EAAE,IAAkB;IAChG,KAAK,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAItB,iCAA4B,GAAG;MACtC,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,UAAU,KAAK,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,SAAS,KAAK,IAAI,EAAE;QACxFC,kBAAO,CAAC,kIAAkI,CAAC,CAAC;QAC5I,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;OACvB;WAAM;QACN,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;OAC1D;KACD,CAAC;IAVD,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;GAC3B;EAWM,oBAAoB,CAAC,KAAsB;IACjDC,8BAAc,CACb,IAAI,CAAC,SAAS,EACd,eAAe,EACf,CAAC,KAAK,KAAc,OAAO,KAAK,KAAK,QAAQ,KAAK,KAAK,KAAK,IAAI,IAAI,KAA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C,oBAAoB,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;IACxD,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAClD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IAC9C,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;IACtD,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IAChD,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IAChD,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACxC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;GAC1C;EAES,MAAM,CAAC,KAAY;IAoB5B,IAAI,CAAC,SAAS,CAAC,KAAK,mCAChB,IAAI,CAAC,SAAS,CAAC,KAAK,KACvB,YAAY,EAAE,IAAI,CAAC,gBAAgB,GACnC,CAAC;IACF,IAAI,CAAC,gBAAgB,GAAG,SAAS,CAAC;IAClC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;GACpB;EAES,OAAO,CAAC,KAAY;IAC7B,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,YAAsB,CAAC;IACpE,IAAI,CAAC,SAAS,CAAC,KAAK,mCAChB,IAAI,CAAC,SAAS,CAAC,KAAK,KACvB,YAAY,EAAE,SAAS,GACvB,CAAC;IACF,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;GACrB;;;;;","names":["InputIconController","devHint","watchValidator","watchBoolean","watchNumber","watchString"],"sources":["./src/components/input-password/controller.ts"],"sourcesContent":["import { Generic } from '@a11y-ui/core';\nimport { InputTypeOnOff } from '../../types/input/types';\nimport { devHint } from '../../utils/a11y.tipps';\nimport { watchBoolean, watchNumber, watchString, watchValidator } from '../../utils/prop.validators';\nimport { InputIconController } from '../@deprecated/input/controller-icon';\nimport { Props, Watches } from './types';\n\nexport class InputPasswordController extends InputIconController implements Watches {\n\tprotected readonly component: Generic.Element.Component & Props;\n\tprivate placeholderCache?: string;\n\n\tpublic constructor(component: Generic.Element.Component & Props, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tprivate handleHiddenLabelAndRequired = (): void => {\n\t\tif (this.component.state._hideLabel === true && this.component.state._required === true) {\n\t\t\tdevHint(`[KolInput*] Wenn man das Label ausblendet, dann kann der sehende Nutzer:in nicht mehr erkennen, ob die Eingabe erforderlich ist.`);\n\t\t\tthis.hideLabel = false;\n\t\t} else {\n\t\t\tthis.hideLabel = this.component.state._hideLabel === true;\n\t\t}\n\t};\n\n\tpublic validateAutoComplete(value?: InputTypeOnOff): void {\n\t\twatchValidator(\n\t\t\tthis.component,\n\t\t\t'_autoComplete',\n\t\t\t(value): boolean => typeof value === 'string' && (value === 'on' || value === 'off'),\n\t\t\tnew Set(['on | off']),\n\t\t\tvalue\n\t\t);\n\t}\n\n\tpublic validateHideLabel(value?: boolean): void {\n\t\twatchBoolean(this.component, '_hideLabel', value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: this.handleHiddenLabelAndRequired,\n\t\t\t},\n\t\t});\n\t}\n\n\tpublic validateMaxLength(value?: number): void {\n\t\twatchNumber(this.component, '_maxLength', value, {\n\t\t\tmin: 0,\n\t\t});\n\t}\n\n\tpublic validatePattern(value?: string): void {\n\t\twatchString(this.component, '_pattern', value);\n\t}\n\n\tpublic validatePlaceholder(value?: string): void {\n\t\twatchString(this.component, '_placeholder', value);\n\t}\n\n\tpublic validateReadOnly(value?: boolean): void {\n\t\twatchBoolean(this.component, '_readOnly', value);\n\t}\n\n\tpublic validateRequired(value?: boolean): void {\n\t\twatchBoolean(this.component, '_required', value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: this.handleHiddenLabelAndRequired,\n\t\t\t},\n\t\t});\n\t}\n\n\tpublic validateSize(value?: number): void {\n\t\twatchNumber(this.component, '_size', value, {\n\t\t\tmin: 1,\n\t\t});\n\t}\n\n\tpublic validateValue(value?: string): void {\n\t\twatchString(this.component, '_value', value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateAutoComplete(this.component._autoComplete);\n\t\tthis.validateMaxLength(this.component._maxLength);\n\t\tthis.validatePattern(this.component._pattern);\n\t\tthis.validatePlaceholder(this.component._placeholder);\n\t\tthis.validateReadOnly(this.component._readOnly);\n\t\tthis.validateRequired(this.component._required);\n\t\tthis.validateSize(this.component._size);\n\t\tthis.validateValue(this.component._value);\n\t}\n\n\tprotected onBlur(event: Event): void {\n\t\t/**\n\t\t * Beim Screenreader NVDA wird der Placeholder mit\n\t\t * vorgelesen. Somit kann es vorkommen, dass das\n\t\t * Label und der Placeholder vorgelesen werden.\n\t\t *\n\t\t * Aufgrund dessen, dass das Label immer vorgelesen\n\t\t * werden muss, kann das zusätzliche Vorlesen des\n\t\t * Placeholders störend sein.\n\t\t *\n\t\t * Damit beim Fokussieren das \"doppelte\" vorlesen\n\t\t * vermieden werden kann, wird der Placeholder für\n\t\t * den fokussierten Feldstatus entfernt.\n\t\t *\n\t\t * Hinweis: Für alle Nutzenden müssen die all dar-\n\t\t * gestellten Inhalte, also auch der Place-\n\t\t * holder, gleichermaßen zugänglich sein.\n\t\t * Das oben beschriebene Handling erfüllt\n\t\t * diese Anforderung nicht.\n\t\t */\n\t\tthis.component.state = {\n\t\t\t...this.component.state,\n\t\t\t_placeholder: this.placeholderCache,\n\t\t};\n\t\tthis.placeholderCache = undefined;\n\t\tsuper.onBlur(event);\n\t}\n\n\tprotected onFocus(event: Event): void {\n\t\tthis.placeholderCache = this.component.state._placeholder as string;\n\t\tthis.component.state = {\n\t\t\t...this.component.state,\n\t\t\t_placeholder: undefined,\n\t\t};\n\t\tsuper.onFocus(event);\n\t}\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- "use strict";const prop_validators=require("./prop.validators-dd1f7878.js"),reuse=require("./reuse-0fe7470f.js"),icon=require("./icon-71b1bd66.js"),controller=require("./controller-536f457e.js"),beforePatchIcon=(o,e)=>{const t=o;"object"==typeof t&&null!==t&&(reuse.isString(t.right,1)&&(t.right={icon:t.right}),reuse.isString(t.left,1)&&(t.left={icon:t.left}),e.set("_icon",t))};class InputIconController extends controller.InputController{constructor(o,e,t){super(o,e,t),this.component=o}validateIcon(o){prop_validators.objectObjectHandler(o,(()=>{try{o=prop_validators.parseJson(o)}catch(o){}prop_validators.watchValidator(this.component,"_icon",(o=>"object"==typeof o&&null!==o&&(reuse.isString(o.left,1)||icon.isIcon(o.left)||reuse.isString(o.right,1)||icon.isIcon(o.right))),new Set(["KoliBriHorizontalIcon"]),o,{hooks:{beforePatch:beforePatchIcon},required:!0})}))}componentWillLoad(){super.componentWillLoad(),this.validateIcon(this.component._icon)}}exports.InputIconController=InputIconController;
4
+ "use strict";const prop_validators=require("./prop.validators-dd1f7878.js"),reuse=require("./reuse-0fe7470f.js"),icon=require("./icon-71b1bd66.js"),controller=require("./controller-521c7ae9.js"),beforePatchIcon=(o,e)=>{const t=o;"object"==typeof t&&null!==t&&(reuse.isString(t.right,1)&&(t.right={icon:t.right}),reuse.isString(t.left,1)&&(t.left={icon:t.left}),e.set("_icon",t))};class InputIconController extends controller.InputController{constructor(o,e,t){super(o,e,t),this.component=o}validateIcon(o){prop_validators.objectObjectHandler(o,(()=>{try{o=prop_validators.parseJson(o)}catch(o){}prop_validators.watchValidator(this.component,"_icon",(o=>"object"==typeof o&&null!==o&&(reuse.isString(o.left,1)||icon.isIcon(o.left)||reuse.isString(o.right,1)||icon.isIcon(o.right))),new Set(["KoliBriHorizontalIcon"]),o,{hooks:{beforePatch:beforePatchIcon},required:!0})}))}componentWillLoad(){super.componentWillLoad(),this.validateIcon(this.component._icon)}}exports.InputIconController=InputIconController;
@@ -1 +1 @@
1
- {"file":"controller-icon-f01acf97.js","mappings":";;;;;;;;;;AASA,MAAM,eAAe,GAAG,CAAC,KAAc,EAAE,SAA+B;EACvE,MAAM,IAAI,GAAG,KAA8B,CAAC;EAC5C,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE;IAC9C,IAAIA,cAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE;MAC5B,IAAI,CAAC,KAAK,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,KAAe,EAAE,CAAC;KAC5C;IACD,IAAIA,cAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE;MAC3B,IAAI,CAAC,IAAI,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,IAAc,EAAE,CAAC;KAC1C;IACD,SAAS,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;GAC7B;AACF,CAAC,CAAC;MAEW,mBAAoB,SAAQC,0BAAe;EAGvD,YAAmB,SAA4C,EAAE,IAAY,EAAE,IAAkB;IAChG,KAAK,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAC7B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;GAC3B;EAEM,YAAY,CAAC,KAA0C;IAC7DC,mCAAmB,CAAC,KAAK,EAAE;MAC1B,IAAI;QACH,KAAK,GAAGC,yBAAS,CAAwB,KAAe,CAAC,CAAC;OAE1D;MAAC,OAAO,CAAC,EAAE;OAEX;MACDC,8BAAc,CACb,IAAI,CAAC,SAAS,EACd,OAAO,EACP,CAAC,KAAK;QACL,QACC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,KAAKJ,cAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,IAAIK,WAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAIL,cAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,IAAIK,WAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAChJ;OACF,EACD,IAAI,GAAG,CAAC,CAAC,uBAAuB,CAAC,CAAC,EAClC,KAAK,EACL;QACC,KAAK,EAAE;UACN,WAAW,EAAE,eAAe;SAC5B;QACD,QAAQ,EAAE,IAAI;OACd,CACD,CAAC;KACF,CAAC,CAAC;GACH;EAEM,iBAAiB;IACvB,KAAK,CAAC,iBAAiB,EAAE,CAAC;IAC1B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;GACxC;;;;;","names":["isString","InputController","objectObjectHandler","parseJson","watchValidator","isIcon"],"sources":["./src/components/@deprecated/input/controller-icon.ts"],"sourcesContent":["import { Generic } from '@a11y-ui/core';\nimport { Stringified } from '../../../types/common';\nimport { KoliBriHorizontalIcon } from '../../../types/icon';\nimport { objectObjectHandler, parseJson, watchValidator } from '../../../utils/prop.validators';\nimport { isString } from '../../../utils/validator';\nimport { isIcon } from '../../../types/props/icon';\nimport { InputController } from './controller';\nimport { Props, Watches } from './types-icon';\n\nconst beforePatchIcon = (value: unknown, nextState: Map<string, unknown>): void => {\n\tconst icon = value as KoliBriHorizontalIcon;\n\tif (typeof icon === 'object' && icon !== null) {\n\t\tif (isString(icon.right, 1)) {\n\t\t\ticon.right = { icon: icon.right as string };\n\t\t}\n\t\tif (isString(icon.left, 1)) {\n\t\t\ticon.left = { icon: icon.left as string };\n\t\t}\n\t\tnextState.set('_icon', icon);\n\t}\n};\n\nexport class InputIconController extends InputController implements Watches {\n\tprotected readonly component: Generic.Element.Component & Props;\n\n\tpublic constructor(component: Generic.Element.Component & Props, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateIcon(value?: Stringified<KoliBriHorizontalIcon>): void {\n\t\tobjectObjectHandler(value, () => {\n\t\t\ttry {\n\t\t\t\tvalue = parseJson<KoliBriHorizontalIcon>(value as string);\n\t\t\t\t// eslint-disable-next-line no-empty\n\t\t\t} catch (e) {\n\t\t\t\t// value behält den ursprünglichen Wert\n\t\t\t}\n\t\t\twatchValidator(\n\t\t\t\tthis.component,\n\t\t\t\t'_icon',\n\t\t\t\t(value): boolean => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\ttypeof value === 'object' && value !== null && (isString(value.left, 1) || isIcon(value.left) || isString(value.right, 1) || isIcon(value.right))\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\tnew Set(['KoliBriHorizontalIcon']),\n\t\t\t\tvalue,\n\t\t\t\t{\n\t\t\t\t\thooks: {\n\t\t\t\t\t\tbeforePatch: beforePatchIcon,\n\t\t\t\t\t},\n\t\t\t\t\trequired: true,\n\t\t\t\t}\n\t\t\t);\n\t\t});\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateIcon(this.component._icon);\n\t}\n}\n"],"version":3}
1
+ {"file":"controller-icon-0a88c097.js","mappings":";;;;;;;;;;AASA,MAAM,eAAe,GAAG,CAAC,KAAc,EAAE,SAA+B;EACvE,MAAM,IAAI,GAAG,KAA8B,CAAC;EAC5C,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE;IAC9C,IAAIA,cAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE;MAC5B,IAAI,CAAC,KAAK,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,KAAe,EAAE,CAAC;KAC5C;IACD,IAAIA,cAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE;MAC3B,IAAI,CAAC,IAAI,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,IAAc,EAAE,CAAC;KAC1C;IACD,SAAS,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;GAC7B;AACF,CAAC,CAAC;MAEW,mBAAoB,SAAQC,0BAAe;EAGvD,YAAmB,SAA4C,EAAE,IAAY,EAAE,IAAkB;IAChG,KAAK,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAC7B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;GAC3B;EAEM,YAAY,CAAC,KAA0C;IAC7DC,mCAAmB,CAAC,KAAK,EAAE;MAC1B,IAAI;QACH,KAAK,GAAGC,yBAAS,CAAwB,KAAe,CAAC,CAAC;OAE1D;MAAC,OAAO,CAAC,EAAE;OAEX;MACDC,8BAAc,CACb,IAAI,CAAC,SAAS,EACd,OAAO,EACP,CAAC,KAAK;QACL,QACC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,KAAKJ,cAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,IAAIK,WAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAIL,cAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,IAAIK,WAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAChJ;OACF,EACD,IAAI,GAAG,CAAC,CAAC,uBAAuB,CAAC,CAAC,EAClC,KAAK,EACL;QACC,KAAK,EAAE;UACN,WAAW,EAAE,eAAe;SAC5B;QACD,QAAQ,EAAE,IAAI;OACd,CACD,CAAC;KACF,CAAC,CAAC;GACH;EAEM,iBAAiB;IACvB,KAAK,CAAC,iBAAiB,EAAE,CAAC;IAC1B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;GACxC;;;;;","names":["isString","InputController","objectObjectHandler","parseJson","watchValidator","isIcon"],"sources":["./src/components/@deprecated/input/controller-icon.ts"],"sourcesContent":["import { Generic } from '@a11y-ui/core';\nimport { Stringified } from '../../../types/common';\nimport { KoliBriHorizontalIcon } from '../../../types/icon';\nimport { objectObjectHandler, parseJson, watchValidator } from '../../../utils/prop.validators';\nimport { isString } from '../../../utils/validator';\nimport { isIcon } from '../../../types/props/icon';\nimport { InputController } from './controller';\nimport { Props, Watches } from './types-icon';\n\nconst beforePatchIcon = (value: unknown, nextState: Map<string, unknown>): void => {\n\tconst icon = value as KoliBriHorizontalIcon;\n\tif (typeof icon === 'object' && icon !== null) {\n\t\tif (isString(icon.right, 1)) {\n\t\t\ticon.right = { icon: icon.right as string };\n\t\t}\n\t\tif (isString(icon.left, 1)) {\n\t\t\ticon.left = { icon: icon.left as string };\n\t\t}\n\t\tnextState.set('_icon', icon);\n\t}\n};\n\nexport class InputIconController extends InputController implements Watches {\n\tprotected readonly component: Generic.Element.Component & Props;\n\n\tpublic constructor(component: Generic.Element.Component & Props, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateIcon(value?: Stringified<KoliBriHorizontalIcon>): void {\n\t\tobjectObjectHandler(value, () => {\n\t\t\ttry {\n\t\t\t\tvalue = parseJson<KoliBriHorizontalIcon>(value as string);\n\t\t\t\t// eslint-disable-next-line no-empty\n\t\t\t} catch (e) {\n\t\t\t\t// value behält den ursprünglichen Wert\n\t\t\t}\n\t\t\twatchValidator(\n\t\t\t\tthis.component,\n\t\t\t\t'_icon',\n\t\t\t\t(value): boolean => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\ttypeof value === 'object' && value !== null && (isString(value.left, 1) || isIcon(value.left) || isString(value.right, 1) || isIcon(value.right))\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\tnew Set(['KoliBriHorizontalIcon']),\n\t\t\t\tvalue,\n\t\t\t\t{\n\t\t\t\t\thooks: {\n\t\t\t\t\t\tbeforePatch: beforePatchIcon,\n\t\t\t\t\t},\n\t\t\t\t\trequired: true,\n\t\t\t\t}\n\t\t\t);\n\t\t});\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateIcon(this.component._icon);\n\t}\n}\n"],"version":3}