@public-ui/components 3.0.9-rc.2 → 3.0.9-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (445) hide show
  1. package/custom-elements.json +150 -1
  2. package/dist/cjs/{Alert-DUrR5P5Z.js → Alert-DUntnaNU.js} +1 -1
  3. package/dist/cjs/{Alert-DUrR5P5Z.js.map → Alert-DUntnaNU.js.map} +1 -1
  4. package/dist/cjs/Collapsible-BFmt1EPP.js +4 -0
  5. package/dist/cjs/{Collapsible-DvV88yB9.js.map → Collapsible-BFmt1EPP.js.map} +1 -1
  6. package/dist/cjs/{CustomSuggestionsOptionsGroup-BpyNPBot.js → CustomSuggestionsOptionsGroup-DOR4-sBO.js} +1 -1
  7. package/dist/cjs/{CustomSuggestionsOptionsGroup-BpyNPBot.js.map → CustomSuggestionsOptionsGroup-DOR4-sBO.js.map} +1 -1
  8. package/dist/cjs/{FieldControlStateWrapper-DV7h_YY8.js → FieldControlStateWrapper-3Yule897.js} +1 -1
  9. package/dist/cjs/{FieldControlStateWrapper-DV7h_YY8.js.map → FieldControlStateWrapper-3Yule897.js.map} +1 -1
  10. package/dist/cjs/{FormFieldStateWrapper-BqMhvNTP.js → FormFieldStateWrapper-D0S7W-Oq.js} +1 -1
  11. package/dist/cjs/{FormFieldStateWrapper-BqMhvNTP.js.map → FormFieldStateWrapper-D0S7W-Oq.js.map} +1 -1
  12. package/dist/cjs/{Heading-DEfFZYI4.js → Heading-DXJIuluZ.js} +1 -1
  13. package/dist/cjs/{Heading-DEfFZYI4.js.map → Heading-DXJIuluZ.js.map} +1 -1
  14. package/dist/cjs/Icon-DdkyC2xZ.js +4 -0
  15. package/dist/cjs/{Icon-CofCtTH-.js.map → Icon-DdkyC2xZ.js.map} +1 -1
  16. package/dist/cjs/{Input-mdhKmc57.js → Input-POCiDXmn.js} +1 -1
  17. package/dist/cjs/{Input-mdhKmc57.js.map → Input-POCiDXmn.js.map} +1 -1
  18. package/dist/cjs/{InputStateWrapper-CYwjfgl2.js → InputStateWrapper-CaBiGRuo.js} +1 -1
  19. package/dist/cjs/{InputStateWrapper-CYwjfgl2.js.map → InputStateWrapper-CaBiGRuo.js.map} +1 -1
  20. package/dist/cjs/{InternalUnderlinedBadgeText-CgkJS9Re.js → InternalUnderlinedBadgeText-DlabTQ94.js} +1 -1
  21. package/dist/cjs/{InternalUnderlinedBadgeText-CgkJS9Re.js.map → InternalUnderlinedBadgeText-DlabTQ94.js.map} +1 -1
  22. package/dist/cjs/{Span-D8y-zRK6.js → Span-ClCxJpj0.js} +1 -1
  23. package/dist/cjs/{Span-D8y-zRK6.js.map → Span-ClCxJpj0.js.map} +1 -1
  24. package/dist/cjs/{app-globals-DoJXw-nP.js → app-globals-Db0rvqQC.js} +1 -1
  25. package/dist/cjs/{app-globals-DoJXw-nP.js.map → app-globals-Db0rvqQC.js.map} +1 -1
  26. package/dist/cjs/{associated.controller-Cynm_2ua.js → associated.controller-jhz1Ef5Z.js} +1 -1
  27. package/dist/cjs/{associated.controller-Cynm_2ua.js.map → associated.controller-jhz1Ef5Z.js.map} +1 -1
  28. package/dist/cjs/bootstrap-DmmGbpjB.js +4 -0
  29. package/dist/cjs/{bootstrap-LNQK8lTS.js.map → bootstrap-DmmGbpjB.js.map} +1 -1
  30. package/dist/cjs/component-names-CuI-0Pbo.js +4 -0
  31. package/dist/cjs/component-names-CuI-0Pbo.js.map +1 -0
  32. package/dist/cjs/{controller-BnghHJmi.js → controller-B67T81sO.js} +1 -1
  33. package/dist/cjs/{controller-BnghHJmi.js.map → controller-B67T81sO.js.map} +1 -1
  34. package/dist/cjs/{controller-B6s_HZZy.js → controller-BeUjoNWw.js} +1 -1
  35. package/dist/cjs/{controller-B6s_HZZy.js.map → controller-BeUjoNWw.js.map} +1 -1
  36. package/dist/cjs/{controller-DnU2dKag.js → controller-C3rThNHa.js} +1 -1
  37. package/dist/cjs/{controller-DnU2dKag.js.map → controller-C3rThNHa.js.map} +1 -1
  38. package/dist/cjs/{controller-BLXRNmNA.js → controller-Q-LXBPh4.js} +1 -1
  39. package/dist/cjs/{controller-BLXRNmNA.js.map → controller-Q-LXBPh4.js.map} +1 -1
  40. package/dist/cjs/{controller-icon-C6fMqGTq.js → controller-icon-Cdj09I_u.js} +1 -1
  41. package/dist/cjs/{controller-icon-C6fMqGTq.js.map → controller-icon-Cdj09I_u.js.map} +1 -1
  42. package/dist/cjs/{dev.utils-C0DzXaa5.js → dev.utils-7ruJrmlh.js} +1 -1
  43. package/dist/cjs/{dev.utils-C0DzXaa5.js.map → dev.utils-7ruJrmlh.js.map} +1 -1
  44. package/dist/cjs/{devtools-BlrwieX2.js → devtools-DPHUWwqE.js} +1 -1
  45. package/dist/cjs/{devtools-BlrwieX2.js.map → devtools-DPHUWwqE.js.map} +1 -1
  46. package/dist/cjs/i18n-BnIFsVIa.js +4 -0
  47. package/dist/cjs/i18n-BnIFsVIa.js.map +1 -0
  48. package/dist/cjs/i18n-DNWGj4j8.js +4 -0
  49. package/dist/cjs/{i18n-kG_Llc8c.js.map → i18n-DNWGj4j8.js.map} +1 -1
  50. package/dist/cjs/index-ARr4gpIs.js +4 -0
  51. package/dist/cjs/{index-kRyWHjzD.js.map → index-ARr4gpIs.js.map} +1 -1
  52. package/dist/cjs/index.cjs.js +1 -1
  53. package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
  54. package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
  55. package/dist/cjs/kol-alert-wc.cjs.entry.js +1 -1
  56. package/dist/cjs/kol-alert.cjs.entry.js +1 -1
  57. package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
  58. package/dist/cjs/kol-avatar.cjs.entry.js +1 -1
  59. package/dist/cjs/kol-badge.cjs.entry.js +1 -1
  60. package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
  61. package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
  62. package/dist/cjs/kol-button-wc.cjs.entry.js +1 -1
  63. package/dist/cjs/kol-button.cjs.entry.js +1 -1
  64. package/dist/cjs/kol-card-wc.cjs.entry.js +1 -1
  65. package/dist/cjs/kol-card.cjs.entry.js +1 -1
  66. package/dist/cjs/kol-combobox.cjs.entry.js +1 -1
  67. package/dist/cjs/kol-details.cjs.entry.js +1 -1
  68. package/dist/cjs/kol-drawer.cjs.entry.js +1 -1
  69. package/dist/cjs/kol-form.cjs.entry.js +1 -1
  70. package/dist/cjs/kol-heading.cjs.entry.js +1 -1
  71. package/dist/cjs/kol-icon.cjs.entry.js +1 -1
  72. package/dist/cjs/kol-image.cjs.entry.js +1 -1
  73. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  74. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  75. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  76. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  77. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  78. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  79. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  80. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  81. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  82. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  83. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  84. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  85. package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
  86. package/dist/cjs/kol-link.cjs.entry.js +1 -1
  87. package/dist/cjs/kol-modal.cjs.entry.js +1 -1
  88. package/dist/cjs/kol-nav.cjs.entry.js +1 -1
  89. package/dist/cjs/kol-pagination-wc.cjs.entry.js +1 -1
  90. package/dist/cjs/kol-pagination-wc.entry.cjs.js.map +1 -1
  91. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  92. package/dist/cjs/kol-pagination.entry.cjs.js.map +1 -1
  93. package/dist/cjs/kol-popover-button-wc.cjs.entry.js +1 -1
  94. package/dist/cjs/kol-popover-button.cjs.entry.js +1 -1
  95. package/dist/cjs/kol-popover-wc.cjs.entry.js +1 -1
  96. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  97. package/dist/cjs/kol-quote.cjs.entry.js +1 -1
  98. package/dist/cjs/kol-select-wc.cjs.entry.js +4 -0
  99. package/dist/cjs/kol-select-wc.entry.cjs.js.map +1 -0
  100. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  101. package/dist/cjs/kol-select.entry.cjs.js.map +1 -1
  102. package/dist/cjs/kol-single-select.cjs.entry.js +1 -1
  103. package/dist/cjs/kol-single-select.entry.cjs.js.map +1 -1
  104. package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
  105. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  106. package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
  107. package/dist/cjs/kol-table-settings-wc.cjs.entry.js +1 -1
  108. package/dist/cjs/kol-table-stateful.cjs.entry.js +1 -1
  109. package/dist/cjs/kol-table-stateful.entry.cjs.js.map +1 -1
  110. package/dist/cjs/kol-table-stateless-wc.cjs.entry.js +1 -1
  111. package/dist/cjs/kol-table-stateless.cjs.entry.js +1 -1
  112. package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
  113. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  114. package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
  115. package/dist/cjs/kol-toolbar.cjs.entry.js +1 -1
  116. package/dist/cjs/kol-tooltip-wc.cjs.entry.js +1 -1
  117. package/dist/cjs/kol-tree-item-wc.cjs.entry.js +1 -1
  118. package/dist/cjs/kol-tree-item.cjs.entry.js +1 -1
  119. package/dist/cjs/kol-tree-wc.cjs.entry.js +1 -1
  120. package/dist/cjs/kol-tree.cjs.entry.js +1 -1
  121. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  122. package/dist/cjs/kolibri.cjs.js +1 -1
  123. package/dist/cjs/loader.cjs.js +1 -1
  124. package/dist/cjs/test-component.cjs.entry.js +1 -1
  125. package/dist/components/component-names.js +1 -1
  126. package/dist/components/component-names.js.map +1 -1
  127. package/dist/components/i18n2.js +1 -1
  128. package/dist/components/i18n2.js.map +1 -1
  129. package/dist/components/kol-card-wc.js +1 -1
  130. package/dist/components/kol-pagination-wc.js +1 -1
  131. package/dist/components/kol-pagination-wc.js.map +1 -1
  132. package/dist/components/kol-pagination.js +1 -1
  133. package/dist/components/kol-pagination.js.map +1 -1
  134. package/dist/components/kol-popover-button-wc.js +1 -1
  135. package/dist/components/kol-select-wc.d.ts +11 -0
  136. package/dist/components/kol-select-wc.js +4 -0
  137. package/dist/components/kol-select-wc.js.map +1 -0
  138. package/dist/components/kol-select.js +1 -1
  139. package/dist/components/kol-select.js.map +1 -1
  140. package/dist/components/kol-single-select.js +1 -1
  141. package/dist/components/kol-single-select.js.map +1 -1
  142. package/dist/components/kol-skip-nav.js +1 -1
  143. package/dist/components/kol-spin.js +1 -1
  144. package/dist/components/kol-split-button.js +1 -1
  145. package/dist/components/kol-table-settings-wc.js +1 -1
  146. package/dist/components/kol-table-stateful.js +1 -1
  147. package/dist/components/kol-table-stateful.js.map +1 -1
  148. package/dist/components/kol-table-stateless-wc.js +1 -1
  149. package/dist/components/kol-table-stateless.js +1 -1
  150. package/dist/components/kol-tabs.js +1 -1
  151. package/dist/components/kol-textarea.js +1 -1
  152. package/dist/components/kol-toast-container.js +1 -1
  153. package/dist/components/kol-toolbar.js +1 -1
  154. package/dist/components/kol-tooltip-wc.js +1 -1
  155. package/dist/components/kol-tree-item-wc.js +1 -1
  156. package/dist/components/kol-tree-item.js +1 -1
  157. package/dist/components/kol-tree-wc.js +1 -1
  158. package/dist/components/kol-tree.js +1 -1
  159. package/dist/components/kol-version.js +1 -1
  160. package/dist/esm/{Alert-BNJWRMbE.js → Alert-CzHXCWPj.js} +1 -1
  161. package/dist/{kolibri/Alert-BNJWRMbE.js.map → esm/Alert-CzHXCWPj.js.map} +1 -1
  162. package/dist/esm/{Collapsible-Cf43DgHK.js → Collapsible-C2hCB3qF.js} +1 -1
  163. package/dist/esm/{Collapsible-Cf43DgHK.js.map → Collapsible-C2hCB3qF.js.map} +1 -1
  164. package/dist/esm/{CustomSuggestionsOptionsGroup-WeJkiAyu.js → CustomSuggestionsOptionsGroup-Bppt6z1r.js} +1 -1
  165. package/dist/{kolibri/CustomSuggestionsOptionsGroup-WeJkiAyu.js.map → esm/CustomSuggestionsOptionsGroup-Bppt6z1r.js.map} +1 -1
  166. package/dist/esm/{FieldControlStateWrapper-DoFiXwzt.js → FieldControlStateWrapper-AFOCFGOx.js} +1 -1
  167. package/dist/{kolibri/FieldControlStateWrapper-DoFiXwzt.js.map → esm/FieldControlStateWrapper-AFOCFGOx.js.map} +1 -1
  168. package/dist/esm/{FormFieldStateWrapper-Zppb5iDD.js → FormFieldStateWrapper-Av41S4Ck.js} +1 -1
  169. package/dist/esm/{FormFieldStateWrapper-Zppb5iDD.js.map → FormFieldStateWrapper-Av41S4Ck.js.map} +1 -1
  170. package/dist/esm/{Heading-BykFTLCc.js → Heading-CcMrD-x2.js} +1 -1
  171. package/dist/{kolibri/Heading-BykFTLCc.js.map → esm/Heading-CcMrD-x2.js.map} +1 -1
  172. package/dist/esm/{Icon-CL0Y9hOo.js → Icon-B5ucyuMB.js} +1 -1
  173. package/dist/esm/{Icon-CL0Y9hOo.js.map → Icon-B5ucyuMB.js.map} +1 -1
  174. package/dist/esm/{Input-EQiCtRJc.js → Input-BxDV4nFd.js} +1 -1
  175. package/dist/esm/{Input-EQiCtRJc.js.map → Input-BxDV4nFd.js.map} +1 -1
  176. package/dist/esm/{InputStateWrapper-B-Xwp8bC.js → InputStateWrapper-CT2a3oNT.js} +1 -1
  177. package/dist/esm/{InputStateWrapper-B-Xwp8bC.js.map → InputStateWrapper-CT2a3oNT.js.map} +1 -1
  178. package/dist/esm/{InternalUnderlinedBadgeText-DyxUE7-7.js → InternalUnderlinedBadgeText-BseIO29r.js} +1 -1
  179. package/dist/esm/{InternalUnderlinedBadgeText-DyxUE7-7.js.map → InternalUnderlinedBadgeText-BseIO29r.js.map} +1 -1
  180. package/dist/esm/{Span-DcuQkwrB.js → Span-De6cKvS2.js} +1 -1
  181. package/dist/{kolibri/Span-DcuQkwrB.js.map → esm/Span-De6cKvS2.js.map} +1 -1
  182. package/dist/esm/{app-globals-BxCxL8p_.js → app-globals-BgoOd8ia.js} +1 -1
  183. package/dist/esm/{app-globals-BxCxL8p_.js.map → app-globals-BgoOd8ia.js.map} +1 -1
  184. package/dist/esm/{associated.controller-XZkiMy1Z.js → associated.controller-B9GDDaFL.js} +1 -1
  185. package/dist/esm/{associated.controller-XZkiMy1Z.js.map → associated.controller-B9GDDaFL.js.map} +1 -1
  186. package/dist/esm/{bootstrap-CB4ow_3r.js → bootstrap-DcyDkVEo.js} +1 -1
  187. package/dist/esm/{bootstrap-CB4ow_3r.js.map → bootstrap-DcyDkVEo.js.map} +1 -1
  188. package/dist/esm/component-names-C3fyby67.js +4 -0
  189. package/dist/esm/component-names-C3fyby67.js.map +1 -0
  190. package/dist/esm/{controller-C5Ill7ej.js → controller-CM5wW8Ij.js} +1 -1
  191. package/dist/esm/{controller-C5Ill7ej.js.map → controller-CM5wW8Ij.js.map} +1 -1
  192. package/dist/esm/{controller-nCX1phwD.js → controller-CwjVuFLD.js} +1 -1
  193. package/dist/esm/{controller-nCX1phwD.js.map → controller-CwjVuFLD.js.map} +1 -1
  194. package/dist/esm/{controller-v3eEY65U.js → controller-DKYdezvZ.js} +1 -1
  195. package/dist/esm/{controller-v3eEY65U.js.map → controller-DKYdezvZ.js.map} +1 -1
  196. package/dist/esm/{controller-UCBKbl0n.js → controller-DrEFUgPi.js} +1 -1
  197. package/dist/esm/{controller-UCBKbl0n.js.map → controller-DrEFUgPi.js.map} +1 -1
  198. package/dist/esm/{controller-icon-CFUDxtxN.js → controller-icon-Bs9UP3DV.js} +1 -1
  199. package/dist/esm/{controller-icon-CFUDxtxN.js.map → controller-icon-Bs9UP3DV.js.map} +1 -1
  200. package/dist/esm/{dev.utils-DBZ66lUE.js → dev.utils-B9J2H-mD.js} +1 -1
  201. package/dist/{kolibri/dev.utils-DBZ66lUE.js.map → esm/dev.utils-B9J2H-mD.js.map} +1 -1
  202. package/dist/esm/{devtools-DNirTJxf.js → devtools-DfxUvstr.js} +1 -1
  203. package/dist/esm/{devtools-DNirTJxf.js.map → devtools-DfxUvstr.js.map} +1 -1
  204. package/dist/esm/i18n-CfLoIZ8T.js +4 -0
  205. package/dist/esm/i18n-CfLoIZ8T.js.map +1 -0
  206. package/dist/esm/{i18n-BDORFCAj.js → i18n-LBpyQ66X.js} +1 -1
  207. package/dist/esm/{i18n-BDORFCAj.js.map → i18n-LBpyQ66X.js.map} +1 -1
  208. package/dist/esm/index-B_mYKCtV.js +4 -0
  209. package/dist/esm/{index-DUn4wc5t.js.map → index-B_mYKCtV.js.map} +1 -1
  210. package/dist/esm/index.js +1 -1
  211. package/dist/esm/kol-abbr.entry.js +1 -1
  212. package/dist/esm/kol-accordion.entry.js +1 -1
  213. package/dist/esm/kol-alert-wc.entry.js +1 -1
  214. package/dist/esm/kol-alert.entry.js +1 -1
  215. package/dist/esm/kol-avatar-wc.entry.js +1 -1
  216. package/dist/esm/kol-avatar.entry.js +1 -1
  217. package/dist/esm/kol-badge.entry.js +1 -1
  218. package/dist/esm/kol-breadcrumb.entry.js +1 -1
  219. package/dist/esm/kol-button-link.entry.js +1 -1
  220. package/dist/esm/kol-button-wc.entry.js +1 -1
  221. package/dist/esm/kol-button.entry.js +1 -1
  222. package/dist/esm/kol-card-wc.entry.js +1 -1
  223. package/dist/esm/kol-card.entry.js +1 -1
  224. package/dist/esm/kol-combobox.entry.js +1 -1
  225. package/dist/esm/kol-details.entry.js +1 -1
  226. package/dist/esm/kol-drawer.entry.js +1 -1
  227. package/dist/esm/kol-form.entry.js +1 -1
  228. package/dist/esm/kol-heading.entry.js +1 -1
  229. package/dist/esm/kol-icon.entry.js +1 -1
  230. package/dist/esm/kol-image.entry.js +1 -1
  231. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  232. package/dist/esm/kol-input-color.entry.js +1 -1
  233. package/dist/esm/kol-input-date.entry.js +1 -1
  234. package/dist/esm/kol-input-email.entry.js +1 -1
  235. package/dist/esm/kol-input-file.entry.js +1 -1
  236. package/dist/esm/kol-input-number.entry.js +1 -1
  237. package/dist/esm/kol-input-password.entry.js +1 -1
  238. package/dist/esm/kol-input-radio.entry.js +1 -1
  239. package/dist/esm/kol-input-range.entry.js +1 -1
  240. package/dist/esm/kol-input-text.entry.js +1 -1
  241. package/dist/esm/kol-kolibri.entry.js +1 -1
  242. package/dist/esm/kol-link-button.entry.js +1 -1
  243. package/dist/esm/kol-link-wc.entry.js +1 -1
  244. package/dist/esm/kol-link.entry.js +1 -1
  245. package/dist/esm/kol-modal.entry.js +1 -1
  246. package/dist/esm/kol-nav.entry.js +1 -1
  247. package/dist/esm/kol-pagination-wc.entry.js +1 -1
  248. package/dist/esm/kol-pagination-wc.entry.js.map +1 -1
  249. package/dist/esm/kol-pagination.entry.js +1 -1
  250. package/dist/esm/kol-pagination.entry.js.map +1 -1
  251. package/dist/esm/kol-popover-button-wc.entry.js +1 -1
  252. package/dist/esm/kol-popover-button.entry.js +1 -1
  253. package/dist/esm/kol-popover-wc.entry.js +1 -1
  254. package/dist/esm/kol-progress.entry.js +1 -1
  255. package/dist/esm/kol-quote.entry.js +1 -1
  256. package/dist/esm/kol-select-wc.entry.js +4 -0
  257. package/dist/esm/kol-select-wc.entry.js.map +1 -0
  258. package/dist/esm/kol-select.entry.js +1 -1
  259. package/dist/esm/kol-select.entry.js.map +1 -1
  260. package/dist/esm/kol-single-select.entry.js +1 -1
  261. package/dist/esm/kol-single-select.entry.js.map +1 -1
  262. package/dist/esm/kol-skip-nav.entry.js +1 -1
  263. package/dist/esm/kol-spin.entry.js +1 -1
  264. package/dist/esm/kol-split-button.entry.js +1 -1
  265. package/dist/esm/kol-table-settings-wc.entry.js +1 -1
  266. package/dist/esm/kol-table-stateful.entry.js +1 -1
  267. package/dist/esm/kol-table-stateful.entry.js.map +1 -1
  268. package/dist/esm/kol-table-stateless-wc.entry.js +1 -1
  269. package/dist/esm/kol-table-stateless.entry.js +1 -1
  270. package/dist/esm/kol-tabs.entry.js +1 -1
  271. package/dist/esm/kol-textarea.entry.js +1 -1
  272. package/dist/esm/kol-toast-container.entry.js +1 -1
  273. package/dist/esm/kol-toolbar.entry.js +1 -1
  274. package/dist/esm/kol-tooltip-wc.entry.js +1 -1
  275. package/dist/esm/kol-tree-item-wc.entry.js +1 -1
  276. package/dist/esm/kol-tree-item.entry.js +1 -1
  277. package/dist/esm/kol-tree-wc.entry.js +1 -1
  278. package/dist/esm/kol-tree.entry.js +1 -1
  279. package/dist/esm/kol-version.entry.js +1 -1
  280. package/dist/esm/kolibri.js +1 -1
  281. package/dist/esm/loader.js +1 -1
  282. package/dist/esm/test-component.entry.js +1 -1
  283. package/dist/kolibri/{Alert-BNJWRMbE.js → Alert-CzHXCWPj.js} +1 -1
  284. package/dist/{esm/Alert-BNJWRMbE.js.map → kolibri/Alert-CzHXCWPj.js.map} +1 -1
  285. package/dist/kolibri/{Collapsible-Cf43DgHK.js → Collapsible-C2hCB3qF.js} +1 -1
  286. package/dist/kolibri/{Collapsible-Cf43DgHK.js.map → Collapsible-C2hCB3qF.js.map} +1 -1
  287. package/dist/kolibri/{CustomSuggestionsOptionsGroup-WeJkiAyu.js → CustomSuggestionsOptionsGroup-Bppt6z1r.js} +1 -1
  288. package/dist/{esm/CustomSuggestionsOptionsGroup-WeJkiAyu.js.map → kolibri/CustomSuggestionsOptionsGroup-Bppt6z1r.js.map} +1 -1
  289. package/dist/kolibri/FieldControlStateWrapper-AFOCFGOx.js +4 -0
  290. package/dist/{esm/FieldControlStateWrapper-DoFiXwzt.js.map → kolibri/FieldControlStateWrapper-AFOCFGOx.js.map} +1 -1
  291. package/dist/kolibri/{FormFieldStateWrapper-Zppb5iDD.js → FormFieldStateWrapper-Av41S4Ck.js} +1 -1
  292. package/dist/kolibri/{FormFieldStateWrapper-Zppb5iDD.js.map → FormFieldStateWrapper-Av41S4Ck.js.map} +1 -1
  293. package/dist/kolibri/Heading-CcMrD-x2.js +4 -0
  294. package/dist/{esm/Heading-BykFTLCc.js.map → kolibri/Heading-CcMrD-x2.js.map} +1 -1
  295. package/dist/kolibri/Icon-B5ucyuMB.js +4 -0
  296. package/dist/kolibri/{Icon-CL0Y9hOo.js.map → Icon-B5ucyuMB.js.map} +1 -1
  297. package/dist/kolibri/Input-BxDV4nFd.js +4 -0
  298. package/dist/kolibri/{Input-EQiCtRJc.js.map → Input-BxDV4nFd.js.map} +1 -1
  299. package/dist/kolibri/{InputStateWrapper-B-Xwp8bC.js → InputStateWrapper-CT2a3oNT.js} +1 -1
  300. package/dist/kolibri/{InputStateWrapper-B-Xwp8bC.js.map → InputStateWrapper-CT2a3oNT.js.map} +1 -1
  301. package/dist/kolibri/InternalUnderlinedBadgeText-BseIO29r.js +4 -0
  302. package/dist/kolibri/{InternalUnderlinedBadgeText-DyxUE7-7.js.map → InternalUnderlinedBadgeText-BseIO29r.js.map} +1 -1
  303. package/dist/kolibri/Span-De6cKvS2.js +4 -0
  304. package/dist/{esm/Span-DcuQkwrB.js.map → kolibri/Span-De6cKvS2.js.map} +1 -1
  305. package/dist/kolibri/app-globals-BgoOd8ia.js +4 -0
  306. package/dist/kolibri/{app-globals-BxCxL8p_.js.map → app-globals-BgoOd8ia.js.map} +1 -1
  307. package/dist/kolibri/{associated.controller-XZkiMy1Z.js → associated.controller-B9GDDaFL.js} +1 -1
  308. package/dist/kolibri/{associated.controller-XZkiMy1Z.js.map → associated.controller-B9GDDaFL.js.map} +1 -1
  309. package/dist/kolibri/{bootstrap-CB4ow_3r.js → bootstrap-DcyDkVEo.js} +1 -1
  310. package/dist/kolibri/{bootstrap-CB4ow_3r.js.map → bootstrap-DcyDkVEo.js.map} +1 -1
  311. package/dist/kolibri/component-names-C3fyby67.js +4 -0
  312. package/dist/kolibri/component-names-C3fyby67.js.map +1 -0
  313. package/dist/kolibri/controller-CM5wW8Ij.js +4 -0
  314. package/dist/kolibri/{controller-C5Ill7ej.js.map → controller-CM5wW8Ij.js.map} +1 -1
  315. package/dist/kolibri/{controller-nCX1phwD.js → controller-CwjVuFLD.js} +1 -1
  316. package/dist/kolibri/{controller-nCX1phwD.js.map → controller-CwjVuFLD.js.map} +1 -1
  317. package/dist/kolibri/{controller-v3eEY65U.js → controller-DKYdezvZ.js} +1 -1
  318. package/dist/kolibri/{controller-v3eEY65U.js.map → controller-DKYdezvZ.js.map} +1 -1
  319. package/dist/kolibri/{controller-UCBKbl0n.js → controller-DrEFUgPi.js} +1 -1
  320. package/dist/kolibri/{controller-UCBKbl0n.js.map → controller-DrEFUgPi.js.map} +1 -1
  321. package/dist/kolibri/{controller-icon-CFUDxtxN.js → controller-icon-Bs9UP3DV.js} +1 -1
  322. package/dist/kolibri/{controller-icon-CFUDxtxN.js.map → controller-icon-Bs9UP3DV.js.map} +1 -1
  323. package/dist/kolibri/{dev.utils-DBZ66lUE.js → dev.utils-B9J2H-mD.js} +1 -1
  324. package/dist/{esm/dev.utils-DBZ66lUE.js.map → kolibri/dev.utils-B9J2H-mD.js.map} +1 -1
  325. package/dist/kolibri/{devtools-DNirTJxf.js → devtools-DfxUvstr.js} +1 -1
  326. package/dist/kolibri/{devtools-DNirTJxf.js.map → devtools-DfxUvstr.js.map} +1 -1
  327. package/dist/kolibri/i18n-CfLoIZ8T.js +4 -0
  328. package/dist/kolibri/i18n-CfLoIZ8T.js.map +1 -0
  329. package/dist/kolibri/i18n-LBpyQ66X.js +4 -0
  330. package/dist/kolibri/{i18n-BDORFCAj.js.map → i18n-LBpyQ66X.js.map} +1 -1
  331. package/dist/kolibri/{index-DUn4wc5t.js → index-B_mYKCtV.js} +1 -1
  332. package/dist/kolibri/{index-DUn4wc5t.js.map → index-B_mYKCtV.js.map} +1 -1
  333. package/dist/kolibri/index.esm.js +1 -1
  334. package/dist/kolibri/kol-abbr.entry.js +1 -1
  335. package/dist/kolibri/kol-accordion.entry.js +1 -1
  336. package/dist/kolibri/kol-alert-wc.entry.js +1 -1
  337. package/dist/kolibri/kol-alert.entry.js +1 -1
  338. package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
  339. package/dist/kolibri/kol-avatar.entry.js +1 -1
  340. package/dist/kolibri/kol-badge.entry.js +1 -1
  341. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  342. package/dist/kolibri/kol-button-link.entry.js +1 -1
  343. package/dist/kolibri/kol-button-wc.entry.js +1 -1
  344. package/dist/kolibri/kol-button.entry.js +1 -1
  345. package/dist/kolibri/kol-card-wc.entry.js +1 -1
  346. package/dist/kolibri/kol-card.entry.js +1 -1
  347. package/dist/kolibri/kol-combobox.entry.js +1 -1
  348. package/dist/kolibri/kol-details.entry.js +1 -1
  349. package/dist/kolibri/kol-drawer.entry.js +1 -1
  350. package/dist/kolibri/kol-form.entry.js +1 -1
  351. package/dist/kolibri/kol-heading.entry.js +1 -1
  352. package/dist/kolibri/kol-icon.entry.js +1 -1
  353. package/dist/kolibri/kol-image.entry.js +1 -1
  354. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  355. package/dist/kolibri/kol-input-color.entry.js +1 -1
  356. package/dist/kolibri/kol-input-date.entry.js +1 -1
  357. package/dist/kolibri/kol-input-email.entry.js +1 -1
  358. package/dist/kolibri/kol-input-file.entry.js +1 -1
  359. package/dist/kolibri/kol-input-number.entry.js +1 -1
  360. package/dist/kolibri/kol-input-password.entry.js +1 -1
  361. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  362. package/dist/kolibri/kol-input-range.entry.js +1 -1
  363. package/dist/kolibri/kol-input-text.entry.js +1 -1
  364. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  365. package/dist/kolibri/kol-link-button.entry.js +1 -1
  366. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  367. package/dist/kolibri/kol-link-wc.entry.js.map +1 -1
  368. package/dist/kolibri/kol-link.entry.js +1 -1
  369. package/dist/kolibri/kol-modal.entry.js +1 -1
  370. package/dist/kolibri/kol-nav.entry.js +1 -1
  371. package/dist/kolibri/kol-pagination-wc.entry.esm.js.map +1 -1
  372. package/dist/kolibri/kol-pagination-wc.entry.js +1 -1
  373. package/dist/kolibri/kol-pagination-wc.entry.js.map +1 -1
  374. package/dist/kolibri/kol-pagination.entry.esm.js.map +1 -1
  375. package/dist/kolibri/kol-pagination.entry.js +1 -1
  376. package/dist/kolibri/kol-pagination.entry.js.map +1 -1
  377. package/dist/kolibri/kol-popover-button-wc.entry.js +1 -1
  378. package/dist/kolibri/kol-popover-button.entry.js +1 -1
  379. package/dist/kolibri/kol-popover-wc.entry.js +1 -1
  380. package/dist/kolibri/kol-progress.entry.js +1 -1
  381. package/dist/kolibri/kol-quote.entry.js +1 -1
  382. package/dist/kolibri/kol-select-wc.entry.esm.js.map +1 -0
  383. package/dist/kolibri/kol-select-wc.entry.js +4 -0
  384. package/dist/kolibri/kol-select-wc.entry.js.map +1 -0
  385. package/dist/kolibri/kol-select.entry.esm.js.map +1 -1
  386. package/dist/kolibri/kol-select.entry.js +1 -1
  387. package/dist/kolibri/kol-select.entry.js.map +1 -1
  388. package/dist/kolibri/kol-single-select.entry.esm.js.map +1 -1
  389. package/dist/kolibri/kol-single-select.entry.js +1 -1
  390. package/dist/kolibri/kol-single-select.entry.js.map +1 -1
  391. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  392. package/dist/kolibri/kol-spin.entry.js +1 -1
  393. package/dist/kolibri/kol-split-button.entry.js +1 -1
  394. package/dist/kolibri/kol-table-settings-wc.entry.js +1 -1
  395. package/dist/kolibri/kol-table-stateful.entry.esm.js.map +1 -1
  396. package/dist/kolibri/kol-table-stateful.entry.js +1 -1
  397. package/dist/kolibri/kol-table-stateful.entry.js.map +1 -1
  398. package/dist/kolibri/kol-table-stateless-wc.entry.js +1 -1
  399. package/dist/kolibri/kol-table-stateless.entry.js +1 -1
  400. package/dist/kolibri/kol-tabs.entry.js +1 -1
  401. package/dist/kolibri/kol-textarea.entry.js +1 -1
  402. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  403. package/dist/kolibri/kol-toolbar.entry.js +1 -1
  404. package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
  405. package/dist/kolibri/kol-tree-item-wc.entry.js +1 -1
  406. package/dist/kolibri/kol-tree-item.entry.js +1 -1
  407. package/dist/kolibri/kol-tree-wc.entry.js +1 -1
  408. package/dist/kolibri/kol-tree.entry.js +1 -1
  409. package/dist/kolibri/kol-version.entry.js +1 -1
  410. package/dist/kolibri/kolibri.esm.js +1 -1
  411. package/dist/kolibri/test-component.entry.js +1 -1
  412. package/dist/types/components/select/component.d.ts +61 -0
  413. package/dist/types/components/select/shadow.d.ts +3 -34
  414. package/dist/types/components.d.ts +215 -0
  415. package/dist/types/core/component-names.d.ts +1 -0
  416. package/doc/select.md +4 -4
  417. package/package.json +1 -1
  418. package/vscode-custom-data.json +99 -0
  419. package/dist/cjs/Collapsible-DvV88yB9.js +0 -4
  420. package/dist/cjs/Icon-CofCtTH-.js +0 -4
  421. package/dist/cjs/bootstrap-LNQK8lTS.js +0 -4
  422. package/dist/cjs/component-names-D7MwtuB7.js +0 -4
  423. package/dist/cjs/component-names-D7MwtuB7.js.map +0 -1
  424. package/dist/cjs/i18n-DUdQy9mr.js +0 -4
  425. package/dist/cjs/i18n-DUdQy9mr.js.map +0 -1
  426. package/dist/cjs/i18n-kG_Llc8c.js +0 -4
  427. package/dist/cjs/index-kRyWHjzD.js +0 -4
  428. package/dist/esm/component-names-CkE54Ym7.js +0 -4
  429. package/dist/esm/component-names-CkE54Ym7.js.map +0 -1
  430. package/dist/esm/i18n-Bqrkf471.js +0 -4
  431. package/dist/esm/i18n-Bqrkf471.js.map +0 -1
  432. package/dist/esm/index-DUn4wc5t.js +0 -4
  433. package/dist/kolibri/FieldControlStateWrapper-DoFiXwzt.js +0 -4
  434. package/dist/kolibri/Heading-BykFTLCc.js +0 -4
  435. package/dist/kolibri/Icon-CL0Y9hOo.js +0 -4
  436. package/dist/kolibri/Input-EQiCtRJc.js +0 -4
  437. package/dist/kolibri/InternalUnderlinedBadgeText-DyxUE7-7.js +0 -4
  438. package/dist/kolibri/Span-DcuQkwrB.js +0 -4
  439. package/dist/kolibri/app-globals-BxCxL8p_.js +0 -4
  440. package/dist/kolibri/component-names-CkE54Ym7.js +0 -4
  441. package/dist/kolibri/component-names-CkE54Ym7.js.map +0 -1
  442. package/dist/kolibri/controller-C5Ill7ej.js +0 -4
  443. package/dist/kolibri/i18n-BDORFCAj.js +0 -4
  444. package/dist/kolibri/i18n-Bqrkf471.js +0 -4
  445. package/dist/kolibri/i18n-Bqrkf471.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Span-D8y-zRK6.js","sources":["src/functional-components/Span/IconHelper.tsx","src/functional-components/Span/LabelHelper.tsx","src/functional-components/Span/SpanCoreHelper.tsx","src/functional-components/Span/Span.tsx"],"sourcesContent":["import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport clsx from 'clsx';\n\nimport type { KoliBriCustomIcon } from '../../schema';\nimport KolIconFc from '../Icon';\n\nconst IconHelper: FC<KoliBriCustomIcon & { class?: string }> = (props) => {\n\tconst { class: classNames, style, label, icon } = props;\n\n\treturn <KolIconFc class={clsx('icon', classNames)} style={style} label={label || ''} icons={icon} />;\n};\n\nexport default IconHelper;\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport clsx from 'clsx';\nimport { isString } from 'lodash-es';\n\nimport { md } from '../../utils/markdown';\nimport KolInternalUnderlinedBadgeTextFc from '../InternalUnderlinedBadgeText';\n\nconst LabelHelper: FC<{ label: string; hideLabel?: boolean; badgeText?: string; hideExpertSlot?: boolean; allowMarkdown?: boolean }> = ({\n\tlabel,\n\thideLabel,\n\tallowMarkdown,\n\tbadgeText,\n}) => {\n\tif (hideLabel || !isString(label)) {\n\t\treturn null;\n\t}\n\n\tconst defaultClasses = 'kol-span__label';\n\n\tif (allowMarkdown) {\n\t\treturn <span class={clsx(defaultClasses, 'md')} innerHTML={md(label)} />;\n\t}\n\n\tif (badgeText) {\n\t\treturn (\n\t\t\t<span class={clsx(defaultClasses)}>\n\t\t\t\t<KolInternalUnderlinedBadgeTextFc label={label} badgeText={badgeText} />\n\t\t\t</span>\n\t\t);\n\t}\n\n\treturn <span class={clsx(defaultClasses)}>{label}</span>;\n};\n\nexport default LabelHelper;\n","import { Fragment, h, type FunctionalComponent as FC } from '@stencil/core';\nimport { isString } from 'lodash-es';\n\nimport { showExpertSlot } from '../../schema';\nimport LabelHelper from './LabelHelper';\n\nconst KolSpanCoreHelperFc: FC<{ label: string; hideLabel?: boolean; badgeText?: string; hideExpertSlot?: boolean; allowMarkdown?: boolean }> = (\n\t{ hideLabel, label, badgeText, allowMarkdown },\n\tchildren,\n) => {\n\tconst hideExpertSlot = !showExpertSlot(label);\n\n\treturn (\n\t\t<>\n\t\t\t{hideExpertSlot && <LabelHelper label={label} hideLabel={hideLabel} badgeText={badgeText} allowMarkdown={allowMarkdown} />}\n\t\t\t<span aria-hidden={hideExpertSlot ? 'true' : undefined} class=\"kol-span__label\" hidden={hideExpertSlot}>\n\t\t\t\t{children}\n\t\t\t</span>\n\t\t\t{isString(badgeText) && badgeText.length > 0 && (\n\t\t\t\t<kbd class=\"badge-text-hint\" aria-hidden=\"true\">\n\t\t\t\t\t{badgeText}\n\t\t\t\t</kbd>\n\t\t\t)}\n\t\t</>\n\t);\n};\n\nexport default KolSpanCoreHelperFc;\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport clsx from 'clsx';\nimport { isObject, isString } from 'lodash-es';\n\nimport { type BadgeTextPropType, type HideLabelPropType, type IconOrIconClass, type KoliBriIconsProp, type LabelWithExpertSlotPropType } from '../../schema';\n\nimport IconHelper from './IconHelper';\nimport SpanCoreHelper from './SpanCoreHelper';\n\ntype IconType = IconOrIconClass | undefined | null;\n\nexport type SpanProps = JSXBase.HTMLAttributes<HTMLSpanElement> & {\n\tlabel: LabelWithExpertSlotPropType;\n\tbadgeText?: BadgeTextPropType;\n\tallowMarkdown?: boolean;\n\ticons?: KoliBriIconsProp;\n\thideLabel?: HideLabelPropType;\n};\n\nconst KolSpanFc: FC<SpanProps> = (props, children) => {\n\tconst { class: classNames, label, hideLabel = false, badgeText, allowMarkdown, icons, ...other } = props;\n\tlet topIconProps: IconType = null;\n\tlet leftIconProps: IconType = null;\n\tlet rightIconProps: IconType = null;\n\tlet bottomIconProps: IconType = null;\n\n\tif (isObject(icons)) {\n\t\ttopIconProps = icons.top;\n\t\tleftIconProps = icons.left;\n\t\trightIconProps = icons.right;\n\t\tbottomIconProps = icons.bottom;\n\t} else if (isString(icons)) {\n\t\tleftIconProps = {\n\t\t\ticon: icons,\n\t\t};\n\t}\n\n\treturn (\n\t\t<span class={clsx('kol-span', { 'kol-span--hide-label': hideLabel }, classNames)} {...other}>\n\t\t\t{isObject(topIconProps) && <IconHelper class=\"top\" {...topIconProps} />}\n\t\t\t<span class=\"kol-span__container\">\n\t\t\t\t{isObject(leftIconProps) && <IconHelper class=\"left\" {...leftIconProps} />}\n\t\t\t\t<SpanCoreHelper label={label} hideLabel={hideLabel} allowMarkdown={allowMarkdown} badgeText={badgeText}>\n\t\t\t\t\t{children}\n\t\t\t\t</SpanCoreHelper>\n\t\t\t\t{isObject(rightIconProps) && <IconHelper class=\"right\" {...rightIconProps} />}\n\t\t\t</span>\n\t\t\t{isObject(bottomIconProps) && <IconHelper class=\"bottom\" {...bottomIconProps} />}\n\t\t</span>\n\t);\n};\n\nexport default KolSpanFc;\n"],"names":["h","KolIconFc","clsx","isString","md","KolInternalUnderlinedBadgeTextFc","showExpertSlot","Fragment","__rest","isObject","SpanCoreHelper"],"mappings":";;;;;;;;;;;;;;;AAMA,MAAM,UAAU,GAA+C,CAAC,KAAK,KAAI;AACxE,IAAA,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,I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EAAA,KAAK,EAAEE,SAAI,CAAC,UAAU,EAAE,EAAE,sBAAsB,EAAE,SAAS,EAAE,EAAE,UAAU,CAAC,IAAM,KAAK,CAAA,EACzFO,iBAAQ,CAAC,YAAY,CAAC,IAAIT,OAAC,CAAA,UAAU,EAAC,MAAA,CAAA,MAAA,CAAA,EAAA,KAAK,EAAC,KAAK,EAAK,EAAA,YAAY,CAAI,CAAA,EACvEA,OAAM,CAAA,MAAA,EAAA,EAAA,KAAK,EAAC,qBAAqB,EAAA,EAC/BS,iBAAQ,CAAC,aAAa,CAAC,IAAIT,OAAC,CAAA,UAAU,EAAC,MAAA,CAAA,MAAA,CAAA,EAAA,KAAK,EAAC,MAAM,EAAK,EAAA,aAAa,CAAI,CAAA,EAC1EA,OAAA,CAACU,mBAAc,EAAC,EAAA,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS,EAAA,EACpG,QAAQ,CACO,EAChBD,iBAAQ,CAAC,cAAc,CAAC,IAAIT,OAAC,CAAA,UAAU,EAAC,MAAA,CAAA,MAAA,CAAA,EAAA,KAAK,EAAC,OAAO,EAAK,EAAA,cAAc,EAAI,CACvE,EACNS,iBAAQ,CAAC,eAAe,CAAC,IAAIT,QAAC,UAAU,EAAA,MAAA,CAAA,MAAA,CAAA,EAAC,KAAK,EAAC,QAAQ,EAAK,EAAA,eAAe,CAAI,CAAA,CAC1E;AAET;;;;"}
1
+ {"version":3,"file":"Span-ClCxJpj0.js","sources":["src/functional-components/Span/IconHelper.tsx","src/functional-components/Span/LabelHelper.tsx","src/functional-components/Span/SpanCoreHelper.tsx","src/functional-components/Span/Span.tsx"],"sourcesContent":["import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport clsx from 'clsx';\n\nimport type { KoliBriCustomIcon } from '../../schema';\nimport KolIconFc from '../Icon';\n\nconst IconHelper: FC<KoliBriCustomIcon & { class?: string }> = (props) => {\n\tconst { class: classNames, style, label, icon } = props;\n\n\treturn <KolIconFc class={clsx('icon', classNames)} style={style} label={label || ''} icons={icon} />;\n};\n\nexport default IconHelper;\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport clsx from 'clsx';\nimport { isString } from 'lodash-es';\n\nimport { md } from '../../utils/markdown';\nimport KolInternalUnderlinedBadgeTextFc from '../InternalUnderlinedBadgeText';\n\nconst LabelHelper: FC<{ label: string; hideLabel?: boolean; badgeText?: string; hideExpertSlot?: boolean; allowMarkdown?: boolean }> = ({\n\tlabel,\n\thideLabel,\n\tallowMarkdown,\n\tbadgeText,\n}) => {\n\tif (hideLabel || !isString(label)) {\n\t\treturn null;\n\t}\n\n\tconst defaultClasses = 'kol-span__label';\n\n\tif (allowMarkdown) {\n\t\treturn <span class={clsx(defaultClasses, 'md')} innerHTML={md(label)} />;\n\t}\n\n\tif (badgeText) {\n\t\treturn (\n\t\t\t<span class={clsx(defaultClasses)}>\n\t\t\t\t<KolInternalUnderlinedBadgeTextFc label={label} badgeText={badgeText} />\n\t\t\t</span>\n\t\t);\n\t}\n\n\treturn <span class={clsx(defaultClasses)}>{label}</span>;\n};\n\nexport default LabelHelper;\n","import { Fragment, h, type FunctionalComponent as FC } from '@stencil/core';\nimport { isString } from 'lodash-es';\n\nimport { showExpertSlot } from '../../schema';\nimport LabelHelper from './LabelHelper';\n\nconst KolSpanCoreHelperFc: FC<{ label: string; hideLabel?: boolean; badgeText?: string; hideExpertSlot?: boolean; allowMarkdown?: boolean }> = (\n\t{ hideLabel, label, badgeText, allowMarkdown },\n\tchildren,\n) => {\n\tconst hideExpertSlot = !showExpertSlot(label);\n\n\treturn (\n\t\t<>\n\t\t\t{hideExpertSlot && <LabelHelper label={label} hideLabel={hideLabel} badgeText={badgeText} allowMarkdown={allowMarkdown} />}\n\t\t\t<span aria-hidden={hideExpertSlot ? 'true' : undefined} class=\"kol-span__label\" hidden={hideExpertSlot}>\n\t\t\t\t{children}\n\t\t\t</span>\n\t\t\t{isString(badgeText) && badgeText.length > 0 && (\n\t\t\t\t<kbd class=\"badge-text-hint\" aria-hidden=\"true\">\n\t\t\t\t\t{badgeText}\n\t\t\t\t</kbd>\n\t\t\t)}\n\t\t</>\n\t);\n};\n\nexport default KolSpanCoreHelperFc;\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport clsx from 'clsx';\nimport { isObject, isString } from 'lodash-es';\n\nimport { type BadgeTextPropType, type HideLabelPropType, type IconOrIconClass, type KoliBriIconsProp, type LabelWithExpertSlotPropType } from '../../schema';\n\nimport IconHelper from './IconHelper';\nimport SpanCoreHelper from './SpanCoreHelper';\n\ntype IconType = IconOrIconClass | undefined | null;\n\nexport type SpanProps = JSXBase.HTMLAttributes<HTMLSpanElement> & {\n\tlabel: LabelWithExpertSlotPropType;\n\tbadgeText?: BadgeTextPropType;\n\tallowMarkdown?: boolean;\n\ticons?: KoliBriIconsProp;\n\thideLabel?: HideLabelPropType;\n};\n\nconst KolSpanFc: FC<SpanProps> = (props, children) => {\n\tconst { class: classNames, label, hideLabel = false, badgeText, allowMarkdown, icons, ...other } = props;\n\tlet topIconProps: IconType = null;\n\tlet leftIconProps: IconType = null;\n\tlet rightIconProps: IconType = null;\n\tlet bottomIconProps: IconType = null;\n\n\tif (isObject(icons)) {\n\t\ttopIconProps = icons.top;\n\t\tleftIconProps = icons.left;\n\t\trightIconProps = icons.right;\n\t\tbottomIconProps = icons.bottom;\n\t} else if (isString(icons)) {\n\t\tleftIconProps = {\n\t\t\ticon: icons,\n\t\t};\n\t}\n\n\treturn (\n\t\t<span class={clsx('kol-span', { 'kol-span--hide-label': hideLabel }, classNames)} {...other}>\n\t\t\t{isObject(topIconProps) && <IconHelper class=\"top\" {...topIconProps} />}\n\t\t\t<span class=\"kol-span__container\">\n\t\t\t\t{isObject(leftIconProps) && <IconHelper class=\"left\" {...leftIconProps} />}\n\t\t\t\t<SpanCoreHelper label={label} hideLabel={hideLabel} allowMarkdown={allowMarkdown} badgeText={badgeText}>\n\t\t\t\t\t{children}\n\t\t\t\t</SpanCoreHelper>\n\t\t\t\t{isObject(rightIconProps) && <IconHelper class=\"right\" {...rightIconProps} />}\n\t\t\t</span>\n\t\t\t{isObject(bottomIconProps) && <IconHelper class=\"bottom\" {...bottomIconProps} />}\n\t\t</span>\n\t);\n};\n\nexport default KolSpanFc;\n"],"names":["h","KolIconFc","clsx","isString","md","KolInternalUnderlinedBadgeTextFc","showExpertSlot","Fragment","__rest","isObject","SpanCoreHelper"],"mappings":";;;;;;;;;;;;;;;AAMA,MAAM,UAAU,GAA+C,CAAC,KAAK,KAAI;AACxE,IAAA,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,KAAK;AAEvD,IAAA,OAAOA,OAAA,CAACC,cAAS,EAAA,EAAC,KAAK,EAAEC,SAAI,CAAC,MAAM,EAAE,UAAU,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAA,CAAI;AACrG,CAAC;;ACHD,MAAM,WAAW,GAAsH,CAAC,EACvI,KAAK,EACL,SAAS,EACT,aAAa,EACb,SAAS,GACT,KAAI;IACJ,IAAI,SAAS,IAAI,CAACC,oCAAQ,CAAC,KAAK,CAAC,EAAE;AAClC,QAAA,OAAO,IAAI;;IAGZ,MAAM,cAAc,GAAG,iBAAiB;IAExC,IAAI,aAAa,EAAE;QAClB,OAAOH,kBAAM,KAAK,EAAEE,SAAI,CAAC,cAAc,EAAE,IAAI,CAAC,EAAE,SAAS,EAAEE,WAAE,CAAC,KAAK,CAAC,GAAI;;IAGzE,IAAI,SAAS,EAAE;AACd,QAAA,QACCJ,OAAM,CAAA,MAAA,EAAA,EAAA,KAAK,EAAEE,SAAI,CAAC,cAAc,CAAC,EAAA,EAChCF,OAAA,CAACK,4DAAgC,EAAA,EAAC,KAAK,EAAE,KAAK,EAAE,SAAS,E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,CAAC,eAAe,CAAC,IAAIT,QAAC,UAAU,EAAA,MAAA,CAAA,MAAA,CAAA,EAAC,KAAK,EAAC,QAAQ,EAAK,EAAA,eAAe,CAAI,CAAA,CAC1E;AAET;;;;"}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- "use strict";var common=require("./common-Cd2qH809.js"),index=require("./index-kRyWHjzD.js"),appGlobalScript=()=>{index.setMode(o=>{try{o.shadowRoot instanceof ShadowRoot&&common.ne(o,common.b(o))}catch(o){}return"default"}),Promise.resolve().then(function(){return require("./devtools-BlrwieX2.js")}).then(o=>{"object"==typeof o&&null!==o&&"function"==typeof o.initialize&&o.initialize()}).catch(o=>{common.Log.error(o)})};const globalScripts=appGlobalScript;exports.globalScripts=globalScripts;
4
+ "use strict";var common=require("./common-Cd2qH809.js"),index=require("./index-ARr4gpIs.js"),appGlobalScript=()=>{index.setMode(o=>{try{o.shadowRoot instanceof ShadowRoot&&common.ne(o,common.b(o))}catch(o){}return"default"}),Promise.resolve().then(function(){return require("./devtools-DPHUWwqE.js")}).then(o=>{"object"==typeof o&&null!==o&&"function"==typeof o.initialize&&o.initialize()}).catch(o=>{common.Log.error(o)})};const globalScripts=appGlobalScript;exports.globalScripts=globalScripts;
@@ -1 +1 @@
1
- {"version":3,"file":"app-globals-DoJXw-nP.js","sources":["src/global/script.ts","@stencil/core/internal/app-globals"],"sourcesContent":["import { getThemeDetails, setThemeStyle } from 'adopted-style-sheets';\n\nimport { setMode } from '@stencil/core';\nimport { Log } from '../schema';\n\nexport default () => {\n\tsetMode((elm) => {\n\t\ttry {\n\t\t\tif (elm.shadowRoot instanceof ShadowRoot) {\n\t\t\t\tsetThemeStyle(elm, getThemeDetails(elm));\n\t\t\t}\n\t\t} catch (error) {\n\t\t\t/**\n\t\t\t * Try is needed for SSR.\n\t\t\t * - no HTMLElement is available\n\t\t\t * - no ShadowRoot is available\n\t\t\t */\n\t\t}\n\t\treturn 'default';\n\t});\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;\nexport const globalStyles = \"\";\n"],"names":["setMode","setThemeStyle","getThemeDetails","Log"],"mappings":";;;;;;;;AAKA,sBAAe,MAAK;AACnB,IAAAA,aAAO,CAAC,CAAC,GAAG,KAAI;AACf,QAAA,IAAI;AACH,YAAA,IAAI,GAAG,CAAC,UAAU,YAAY,UAAU,EAAE;gBACzCC,SAAa,CAAC,GAAG,EAAEC,QAAe,CAAC,GAAG,CAAC,CAAC;;;QAExC,OAAO,KAAK,EAAE;;AAOhB,QAAA,OAAO,SAAS;AACjB,KAAC,CAAC;IAEF,oDAAO,wBAAY;AACjB,SAAA,IAAI,CAAC,CAAC,QAAQ,KAAI;AAClB,QAAA,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,KAAK,IAAI,IAAI,OAAO,QAAQ,CAAC,UAAU,KAAK,UAAU,EAAE;YACnG,QAAQ,CAAC,UAAU,EAAE;;AAEvB,KAAC;AACA,SAAA,KAAK,CAAC,CAAC,KAAK,KAAI;AAChB,QAAAC,UAAG,CAAC,KAAK,CAAC,KAAK,CAAC;AACjB,KAAC,CAAC;AACJ,CAAC;;AC7BW,MAAC,aAAa,GAAG;;;;"}
1
+ {"version":3,"file":"app-globals-Db0rvqQC.js","sources":["src/global/script.ts","@stencil/core/internal/app-globals"],"sourcesContent":["import { getThemeDetails, setThemeStyle } from 'adopted-style-sheets';\n\nimport { setMode } from '@stencil/core';\nimport { Log } from '../schema';\n\nexport default () => {\n\tsetMode((elm) => {\n\t\ttry {\n\t\t\tif (elm.shadowRoot instanceof ShadowRoot) {\n\t\t\t\tsetThemeStyle(elm, getThemeDetails(elm));\n\t\t\t}\n\t\t} catch (error) {\n\t\t\t/**\n\t\t\t * Try is needed for SSR.\n\t\t\t * - no HTMLElement is available\n\t\t\t * - no ShadowRoot is available\n\t\t\t */\n\t\t}\n\t\treturn 'default';\n\t});\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;\nexport const globalStyles = \"\";\n"],"names":["setMode","setThemeStyle","getThemeDetails","Log"],"mappings":";;;;;;;;AAKA,sBAAe,MAAK;AACnB,IAAAA,aAAO,CAAC,CAAC,GAAG,KAAI;AACf,QAAA,IAAI;AACH,YAAA,IAAI,GAAG,CAAC,UAAU,YAAY,UAAU,EAAE;gBACzCC,SAAa,CAAC,GAAG,EAAEC,QAAe,CAAC,GAAG,CAAC,CAAC;;;QAExC,OAAO,KAAK,EAAE;;AAOhB,QAAA,OAAO,SAAS;AACjB,KAAC,CAAC;IAEF,oDAAO,wBAAY;AACjB,SAAA,IAAI,CAAC,CAAC,QAAQ,KAAI;AAClB,QAAA,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,KAAK,IAAI,IAAI,OAAO,QAAQ,CAAC,UAAU,KAAK,UAAU,EAAE;YACnG,QAAQ,CAAC,UAAU,EAAE;;AAEvB,KAAC;AACA,SAAA,KAAK,CAAC,CAAC,KAAK,KAAI;AAChB,QAAAC,UAAG,CAAC,KAAK,CAAC,KAAK,CAAC;AACjB,KAAC,CAAC;AACJ,CAAC;;AC7BW,MAAC,aAAa,GAAG;;;;"}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- "use strict";var common=require("./common-Cd2qH809.js"),bootstrap=require("./bootstrap-LNQK8lTS.js");const validateName=(t,e,o)=>{common.watchString(t,"_name",e,o)},isAssociatedTagName=t=>"KOL-BUTTON"===t||"KOL-COMBOBOX"===t||"KOL-INPUT-CHECKBOX"===t||"KOL-INPUT-COLOR"===t||"KOL-INPUT-DATE"===t||"KOL-INPUT-EMAIL"===t||"KOL-INPUT-FILE"===t||"KOL-INPUT-NUMBER"===t||"KOL-INPUT-PASSWORD"===t||"KOL-INPUT-RADIO"===t||"KOL-INPUT-RANGE"===t||"KOL-INPUT-TEXT"===t||"KOL-SELECT"===t||"KOL-SINGLE-SELECT"===t||"KOL-TEXTAREA"===t;class AssociatedInputController{constructor(t,e,o){var i,s,a,r;if(this.experimentalMode=common.getExperimentalMode(),this.setFormAssociatedValue=t=>{var e;const o=null===(e=this.formAssociated)||void 0===e?void 0:e.getAttribute("name");null!==o&&""!==o||common.devHint(` The form field (${this.type}) must have a name attribute to be form-associated. Please define the _name attribute.`);const i=this.tryToStringifyValue(t);this.syncValue(t,i,this.formAssociated),this.syncValue(t,i,this.syncToOwnInput)},this.component=t,this.host=this.findHostWithShadowRoot(o),this.type=e,(null===(i=bootstrap.getOptions())||void 0===i?void 0:i.reflectInputValues)&&isAssociatedTagName(null===(s=this.host)||void 0===s?void 0:s.tagName)&&t._name){switch(null===(a=this.host)||void 0===a||a.querySelectorAll("input,select,textarea").forEach(t=>{var e;null===(e=this.host)||void 0===e||e.removeChild(t)}),this.type){case"button":case"color":case"date":case"email":case"file":case"number":case"password":case"radio":case"range":case"text":this.formAssociated=document.createElement("input"),this.formAssociated.setAttribute("type",this.type);break;case"select":this.formAssociated=document.createElement("select"),this.formAssociated.setAttribute("multiple","");break;case"textarea":this.formAssociated=document.createElement("textarea");break;default:this.formAssociated=document.createElement("input"),this.formAssociated.setAttribute("type","hidden")}this.formAssociated.setAttribute("data-form-associated",""),this.formAssociated.setAttribute("hidden",""),null===(r=this.host)||void 0===r||r.appendChild(this.formAssociated)}}findHostWithShadowRoot(t){for(;null===(null==t?void 0:t.shadowRoot)&&t!==document.body;)(t=null==t?void 0:t.parentNode).host&&(t=t.host);return t}setAttribute(t,e,o){if(this.experimentalMode)try{if("boolean"!=typeof(o="object"==typeof o&&null!==o?JSON.stringify(o):o)&&"number"!=typeof o&&"string"!=typeof o)throw new Error("Invalid value type: "+typeof o);null==e||e.setAttribute(t,`${o}`)}catch(o){null==e||e.removeAttribute(t)}}tryToStringifyValue(t){try{return"object"==typeof t&&null!==t?JSON.stringify(t).toString():null==t?null:t.toString()}catch(t){return common.devWarning(`The form field raw value is not able to stringify! ${t}`),""}}syncValue(t,e,o){if(o)switch(this.type){case"file":o.files=t;break;case"select":o.querySelectorAll("option").forEach(t=>{o.removeChild(t)}),Array.isArray(t)&&t.forEach(t=>{const e=this.tryToStringifyValue(t);if("string"==typeof e){const t=document.createElement("option");t.setAttribute("value",e),t.setAttribute("selected",""),o.appendChild(t)}});break;case"radio":"string"==typeof e&&(o.setAttribute("value",e),o.setAttribute("checked",""),o.value=e);break;default:"string"==typeof e?(o.setAttribute("value",e),o.value=e):(o.removeAttribute("value"),o.value="")}}validateName(t){validateName(this.component,t,{hooks:{afterPatch:()=>{this.setAttribute("name",this.formAssociated,this.component.state._name)}}}),void 0===t&&common.devHint("A name on input fields or switches is not strictly required, but it might be relevant for the autocomplete function and for the static submission of the input field.")}validateSyncValueBySelector(t){if(this.experimentalMode&&"string"==typeof t){const e=document.querySelector(t);e&&(this.syncToOwnInput=e)}}componentWillLoad(){this.validateName(this.component._name),this.validateSyncValueBySelector(this.component._syncValueBySelector)}}exports.AssociatedInputController=AssociatedInputController;
4
+ "use strict";var common=require("./common-Cd2qH809.js"),bootstrap=require("./bootstrap-DmmGbpjB.js");const validateName=(t,e,o)=>{common.watchString(t,"_name",e,o)},isAssociatedTagName=t=>"KOL-BUTTON"===t||"KOL-COMBOBOX"===t||"KOL-INPUT-CHECKBOX"===t||"KOL-INPUT-COLOR"===t||"KOL-INPUT-DATE"===t||"KOL-INPUT-EMAIL"===t||"KOL-INPUT-FILE"===t||"KOL-INPUT-NUMBER"===t||"KOL-INPUT-PASSWORD"===t||"KOL-INPUT-RADIO"===t||"KOL-INPUT-RANGE"===t||"KOL-INPUT-TEXT"===t||"KOL-SELECT"===t||"KOL-SINGLE-SELECT"===t||"KOL-TEXTAREA"===t;class AssociatedInputController{constructor(t,e,o){var i,s,a,r;if(this.experimentalMode=common.getExperimentalMode(),this.setFormAssociatedValue=t=>{var e;const o=null===(e=this.formAssociated)||void 0===e?void 0:e.getAttribute("name");null!==o&&""!==o||common.devHint(` The form field (${this.type}) must have a name attribute to be form-associated. Please define the _name attribute.`);const i=this.tryToStringifyValue(t);this.syncValue(t,i,this.formAssociated),this.syncValue(t,i,this.syncToOwnInput)},this.component=t,this.host=this.findHostWithShadowRoot(o),this.type=e,(null===(i=bootstrap.getOptions())||void 0===i?void 0:i.reflectInputValues)&&isAssociatedTagName(null===(s=this.host)||void 0===s?void 0:s.tagName)&&t._name){switch(null===(a=this.host)||void 0===a||a.querySelectorAll("input,select,textarea").forEach(t=>{var e;null===(e=this.host)||void 0===e||e.removeChild(t)}),this.type){case"button":case"color":case"date":case"email":case"file":case"number":case"password":case"radio":case"range":case"text":this.formAssociated=document.createElement("input"),this.formAssociated.setAttribute("type",this.type);break;case"select":this.formAssociated=document.createElement("select"),this.formAssociated.setAttribute("multiple","");break;case"textarea":this.formAssociated=document.createElement("textarea");break;default:this.formAssociated=document.createElement("input"),this.formAssociated.setAttribute("type","hidden")}this.formAssociated.setAttribute("data-form-associated",""),this.formAssociated.setAttribute("hidden",""),null===(r=this.host)||void 0===r||r.appendChild(this.formAssociated)}}findHostWithShadowRoot(t){for(;null===(null==t?void 0:t.shadowRoot)&&t!==document.body;)(t=null==t?void 0:t.parentNode).host&&(t=t.host);return t}setAttribute(t,e,o){if(this.experimentalMode)try{if("boolean"!=typeof(o="object"==typeof o&&null!==o?JSON.stringify(o):o)&&"number"!=typeof o&&"string"!=typeof o)throw new Error("Invalid value type: "+typeof o);null==e||e.setAttribute(t,`${o}`)}catch(o){null==e||e.removeAttribute(t)}}tryToStringifyValue(t){try{return"object"==typeof t&&null!==t?JSON.stringify(t).toString():null==t?null:t.toString()}catch(t){return common.devWarning(`The form field raw value is not able to stringify! ${t}`),""}}syncValue(t,e,o){if(o)switch(this.type){case"file":o.files=t;break;case"select":o.querySelectorAll("option").forEach(t=>{o.removeChild(t)}),Array.isArray(t)&&t.forEach(t=>{const e=this.tryToStringifyValue(t);if("string"==typeof e){const t=document.createElement("option");t.setAttribute("value",e),t.setAttribute("selected",""),o.appendChild(t)}});break;case"radio":"string"==typeof e&&(o.setAttribute("value",e),o.setAttribute("checked",""),o.value=e);break;default:"string"==typeof e?(o.setAttribute("value",e),o.value=e):(o.removeAttribute("value"),o.value="")}}validateName(t){validateName(this.component,t,{hooks:{afterPatch:()=>{this.setAttribute("name",this.formAssociated,this.component.state._name)}}}),void 0===t&&common.devHint("A name on input fields or switches is not strictly required, but it might be relevant for the autocomplete function and for the static submission of the input field.")}validateSyncValueBySelector(t){if(this.experimentalMode&&"string"==typeof t){const e=document.querySelector(t);e&&(this.syncToOwnInput=e)}}componentWillLoad(){this.validateName(this.component._name),this.validateSyncValueBySelector(this.component._syncValueBySelector)}}exports.AssociatedInputController=AssociatedInputController;
@@ -1 +1 @@
1
- {"version":3,"file":"associated.controller-Cynm_2ua.js","sources":["src/schema/props/name.ts","src/components/input-adapter-leanup/associated.controller.ts"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\n\nimport type { WatchStringOptions } from '../utils';\nimport { watchString } from '../utils';\n\n/* types */\nexport type NamePropType = string;\n\n/**\n * Defines the technical name of an input field.\n */\nexport type PropName = {\n\tname: NamePropType;\n};\n\n/* validator */\nexport const validateName = (component: Generic.Element.Component, value?: NamePropType, options?: WatchStringOptions): void => {\n\twatchString(component, '_name', value, options);\n};\n","import type { NamePropType, PropSyncValueBySelector, StencilUnknown, SyncValueBySelectorPropType } from '../../schema';\nimport { devHint, devWarning, getExperimentalMode, validateName } from '../../schema';\n\nimport type { Generic } from 'adopted-style-sheets';\nimport { getOptions } from '../../core/bootstrap';\n\ntype RequiredProps = NonNullable<unknown>;\ntype OptionalProps = {\n\tname: string;\n} & PropSyncValueBySelector;\ntype Props = Generic.Element.Members<RequiredProps, OptionalProps>;\ntype Watches = Generic.Element.Watchers<RequiredProps, OptionalProps>;\n\ntype HTMLInputFileElement = HTMLInputElement & {\n\tfiles: FileList;\n};\n\nconst isAssociatedTagName = (name?: string): boolean =>\n\tname === 'KOL-BUTTON' ||\n\tname === 'KOL-COMBOBOX' ||\n\tname === 'KOL-INPUT-CHECKBOX' ||\n\tname === 'KOL-INPUT-COLOR' ||\n\tname === 'KOL-INPUT-DATE' ||\n\tname === 'KOL-INPUT-EMAIL' ||\n\tname === 'KOL-INPUT-FILE' ||\n\tname === 'KOL-INPUT-NUMBER' ||\n\tname === 'KOL-INPUT-PASSWORD' ||\n\tname === 'KOL-INPUT-RADIO' ||\n\tname === 'KOL-INPUT-RANGE' ||\n\tname === 'KOL-INPUT-TEXT' ||\n\tname === 'KOL-SELECT' ||\n\tname === 'KOL-SINGLE-SELECT' ||\n\tname === 'KOL-TEXTAREA';\n\nexport class AssociatedInputController implements Watches {\n\tprivate readonly experimentalMode = getExperimentalMode();\n\n\tprotected readonly component: Generic.Element.Component & Props;\n\tprotected readonly type: string;\n\tprotected readonly host?: HTMLElement;\n\n\tpublic readonly formAssociated?: HTMLButtonElement | HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;\n\tpublic syncToOwnInput?: HTMLButtonElement | HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;\n\n\tpublic constructor(component: Generic.Element.Component & Props, type: string, host?: HTMLElement) {\n\t\tthis.component = component;\n\t\tthis.host = this.findHostWithShadowRoot(host);\n\t\tthis.type = type;\n\n\t\tif (getOptions()?.reflectInputValues && isAssociatedTagName(this.host?.tagName) && component._name) {\n\t\t\tthis.host?.querySelectorAll('input,select,textarea').forEach((el) => {\n\t\t\t\tthis.host?.removeChild(el);\n\t\t\t});\n\t\t\tswitch (this.type) {\n\t\t\t\tcase 'button':\n\t\t\t\tcase 'color':\n\t\t\t\tcase 'date':\n\t\t\t\tcase 'email':\n\t\t\t\tcase 'file':\n\t\t\t\tcase 'number':\n\t\t\t\tcase 'password':\n\t\t\t\tcase 'radio':\n\t\t\t\tcase 'range':\n\t\t\t\tcase 'text':\n\t\t\t\t\tthis.formAssociated = document.createElement('input');\n\t\t\t\t\tthis.formAssociated.setAttribute('type', this.type);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'select':\n\t\t\t\t\tthis.formAssociated = document.createElement('select');\n\t\t\t\t\tthis.formAssociated.setAttribute('multiple', '');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'textarea':\n\t\t\t\t\tthis.formAssociated = document.createElement('textarea');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'checkbox': // Checkbox uses default case\n\t\t\t\tcase 'single-select': // SingleSelect uses default case\n\t\t\t\tcase 'combobox': // Combobox uses default case\n\t\t\t\tdefault:\n\t\t\t\t\tthis.formAssociated = document.createElement('input');\n\t\t\t\t\tthis.formAssociated.setAttribute('type', 'hidden');\n\t\t\t}\n\t\t\tthis.formAssociated.setAttribute('data-form-associated', '');\n\t\t\tthis.formAssociated.setAttribute('hidden', '');\n\t\t\tthis.host?.appendChild(this.formAssociated);\n\t\t}\n\t}\n\n\t/**\n\t * The associated elements must not reside within the ShadowRoot and must\n\t * reside as children in the host to be recognized by native forms.\n\t */\n\tprivate findHostWithShadowRoot(host?: HTMLElement): HTMLElement | undefined {\n\t\twhile (host?.shadowRoot === null && host !== document.body) {\n\t\t\thost = host?.parentNode as HTMLElement;\n\t\t\tif ((host as unknown as ShadowRoot).host) {\n\t\t\t\thost = (host as unknown as ShadowRoot).host as HTMLElement;\n\t\t\t}\n\t\t}\n\t\treturn host;\n\t}\n\n\tprotected setAttribute(qualifiedName: string, element?: HTMLElement, value?: string | number | boolean) {\n\t\tif (this.experimentalMode) {\n\t\t\ttry {\n\t\t\t\tvalue = typeof value === 'object' && value !== null ? JSON.stringify(value) : value;\n\t\t\t\tif (typeof value === 'boolean' || typeof value === 'number' || typeof value === 'string') {\n\t\t\t\t\telement?.setAttribute(qualifiedName, `${value as string}`);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(`Invalid value type: ${typeof value}`);\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\telement?.removeAttribute(qualifiedName);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * We need to stringify the value, for the setAttribute method.\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/setAttribute\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/attributes\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/attributes#value\n\t *\n\t * TODO: It is possible that the value are a cyclic object value. So we need a custom\n\t * JSON.stringify method from outside to convert it to string.\n\t */\n\tprivate tryToStringifyValue(value: StencilUnknown): string | null {\n\t\ttry {\n\t\t\treturn typeof value === 'object' && value !== null ? JSON.stringify(value).toString() : value === null || value === undefined ? null : value.toString();\n\t\t} catch (e) {\n\t\t\tdevWarning(`The form field raw value is not able to stringify! ${e as string}`);\n\t\t\treturn '';\n\t\t}\n\t}\n\n\t/**\n\t * We try to support native form-associated custom elements.\n\t *\n\t * @see https://github.com/public-ui/kolibri/discussions/2821\n\t */\n\tpublic readonly setFormAssociatedValue = (rawValue: StencilUnknown) => {\n\t\tconst name = this.formAssociated?.getAttribute('name');\n\t\tif (name === null || name === '') {\n\t\t\tdevHint(` The form field (${this.type}) must have a name attribute to be form-associated. Please define the _name attribute.`);\n\t\t}\n\t\tconst strValue = this.tryToStringifyValue(rawValue);\n\t\tthis.syncValue(rawValue, strValue, this.formAssociated);\n\t\tthis.syncValue(rawValue, strValue, this.syncToOwnInput);\n\t};\n\n\tprivate syncValue(\n\t\trawValue: StencilUnknown,\n\t\tstrValue: string | null,\n\t\tassociatedElement?: HTMLButtonElement | HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement,\n\t) {\n\t\tif (associatedElement) {\n\t\t\tswitch (this.type) {\n\t\t\t\tcase 'file':\n\t\t\t\t\t(associatedElement as HTMLInputFileElement).files = rawValue as FileList;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'select':\n\t\t\t\t\t(associatedElement as HTMLSelectElement).querySelectorAll('option').forEach((el) => {\n\t\t\t\t\t\t(associatedElement as HTMLSelectElement).removeChild(el);\n\t\t\t\t\t});\n\t\t\t\t\tif (Array.isArray(rawValue)) {\n\t\t\t\t\t\trawValue.forEach((rawValueItem) => {\n\t\t\t\t\t\t\tconst strValueItem = this.tryToStringifyValue(rawValueItem as string);\n\t\t\t\t\t\t\tif (typeof strValueItem === 'string') {\n\t\t\t\t\t\t\t\tconst option = document.createElement('option');\n\t\t\t\t\t\t\t\toption.setAttribute('value', strValueItem);\n\t\t\t\t\t\t\t\toption.setAttribute('selected', '');\n\t\t\t\t\t\t\t\t(associatedElement as HTMLSelectElement).appendChild(option);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'radio':\n\t\t\t\t\tif (typeof strValue === 'string') {\n\t\t\t\t\t\tassociatedElement.setAttribute('value', strValue);\n\t\t\t\t\t\tassociatedElement.setAttribute('checked', '');\n\t\t\t\t\t\tassociatedElement.value = strValue;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif (typeof strValue === 'string') {\n\t\t\t\t\t\tassociatedElement.setAttribute('value', strValue);\n\t\t\t\t\t\tassociatedElement.value = strValue;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tassociatedElement.removeAttribute('value');\n\t\t\t\t\t\tassociatedElement.value = '';\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic validateName(value?: NamePropType): void {\n\t\tvalidateName(this.component, value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: () => {\n\t\t\t\t\tthis.setAttribute('name', this.formAssociated, this.component.state._name as string);\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\t\tif (typeof value === 'undefined') {\n\t\t\tdevHint(\n\t\t\t\t`A name on input fields or switches is not strictly required, but it might be relevant for the autocomplete function and for the static submission of the input field.`,\n\t\t\t);\n\t\t}\n\t}\n\n\tpublic validateSyncValueBySelector(value?: SyncValueBySelectorPropType): void {\n\t\tif (this.experimentalMode && typeof value === 'string') {\n\t\t\tconst input = document.querySelector(value) as HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;\n\t\t\tif (input /* SSR instanceof HTMLInputElement */) {\n\t\t\t\tthis.syncToOwnInput = input;\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateName(this.component._name);\n\t\tthis.validateSyncValueBySelector(this.component._syncValueBySelector);\n\t}\n}\n"],"names":["watchString","getExperimentalMode","devHint","getOptions","devWarning"],"mappings":";;;;;;;;AAgBO,MAAM,YAAY,GAAG,CAAC,SAAoC,EAAE,KAAoB,EAAE,OAA4B,KAAU;IAC9HA,kBAAW,CAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC;AAChD,CAAC;;ACDD,MAAM,mBAAmB,GAAG,CAAC,IAAa,KACzC,IAAI,KAAK,YAAY;AACrB,IAAA,IAAI,KAAK,cAAc;AACvB,IAAA,IAAI,KAAK,oBAAoB;AAC7B,IAAA,IAAI,KAAK,iBAAiB;AAC1B,IAAA,IAAI,KAAK,gBAAgB;AACzB,IAAA,IAAI,KAAK,iBAAiB;AAC1B,IAAA,IAAI,KAAK,gBAAgB;AACzB,IAAA,IAAI,KAAK,kBAAkB;AAC3B,IAAA,IAAI,KAAK,oBAAoB;AAC7B,IAAA,IAAI,KAAK,iBAAiB;AAC1B,IAAA,IAAI,KAAK,iBAAiB;AAC1B,IAAA,IAAI,KAAK,gBAAgB;AACzB,IAAA,IA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AQ,EAAE;YACvD,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAA+D;YACzG,IAAI,KAAK,EAAwC;AAChD,gBAAA,IAAI,CAAC,cAAc,GAAG,KAAK;;;;IAKvB,iBAAiB,GAAA;QACvB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;QACvC,IAAI,CAAC,2BAA2B,CAAC,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC;;AAEtE;;;;"}
1
+ {"version":3,"file":"associated.controller-jhz1Ef5Z.js","sources":["src/schema/props/name.ts","src/components/input-adapter-leanup/associated.controller.ts"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\n\nimport type { WatchStringOptions } from '../utils';\nimport { watchString } from '../utils';\n\n/* types */\nexport type NamePropType = string;\n\n/**\n * Defines the technical name of an input field.\n */\nexport type PropName = {\n\tname: NamePropType;\n};\n\n/* validator */\nexport const validateName = (component: Generic.Element.Component, value?: NamePropType, options?: WatchStringOptions): void => {\n\twatchString(component, '_name', value, options);\n};\n","import type { NamePropType, PropSyncValueBySelector, StencilUnknown, SyncValueBySelectorPropType } from '../../schema';\nimport { devHint, devWarning, getExperimentalMode, validateName } from '../../schema';\n\nimport type { Generic } from 'adopted-style-sheets';\nimport { getOptions } from '../../core/bootstrap';\n\ntype RequiredProps = NonNullable<unknown>;\ntype OptionalProps = {\n\tname: string;\n} & PropSyncValueBySelector;\ntype Props = Generic.Element.Members<RequiredProps, OptionalProps>;\ntype Watches = Generic.Element.Watchers<RequiredProps, OptionalProps>;\n\ntype HTMLInputFileElement = HTMLInputElement & {\n\tfiles: FileList;\n};\n\nconst isAssociatedTagName = (name?: string): boolean =>\n\tname === 'KOL-BUTTON' ||\n\tname === 'KOL-COMBOBOX' ||\n\tname === 'KOL-INPUT-CHECKBOX' ||\n\tname === 'KOL-INPUT-COLOR' ||\n\tname === 'KOL-INPUT-DATE' ||\n\tname === 'KOL-INPUT-EMAIL' ||\n\tname === 'KOL-INPUT-FILE' ||\n\tname === 'KOL-INPUT-NUMBER' ||\n\tname === 'KOL-INPUT-PASSWORD' ||\n\tname === 'KOL-INPUT-RADIO' ||\n\tname === 'KOL-INPUT-RANGE' ||\n\tname === 'KOL-INPUT-TEXT' ||\n\tname === 'KOL-SELECT' ||\n\tname === 'KOL-SINGLE-SELECT' ||\n\tname === 'KOL-TEXTAREA';\n\nexport class AssociatedInputController implements Watches {\n\tprivate readonly experimentalMode = getExperimentalMode();\n\n\tprotected readonly component: Generic.Element.Component & Props;\n\tprotected readonly type: string;\n\tprotected readonly host?: HTMLElement;\n\n\tpublic readonly formAssociated?: HTMLButtonElement | HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;\n\tpublic syncToOwnInput?: HTMLButtonElement | HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;\n\n\tpublic constructor(component: Generic.Element.Component & Props, type: string, host?: HTMLElement) {\n\t\tthis.component = component;\n\t\tthis.host = this.findHostWithShadowRoot(host);\n\t\tthis.type = type;\n\n\t\tif (getOptions()?.reflectInputValues && isAssociatedTagName(this.host?.tagName) && component._name) {\n\t\t\tthis.host?.querySelectorAll('input,select,textarea').forEach((el) => {\n\t\t\t\tthis.host?.removeChild(el);\n\t\t\t});\n\t\t\tswitch (this.type) {\n\t\t\t\tcase 'button':\n\t\t\t\tcase 'color':\n\t\t\t\tcase 'date':\n\t\t\t\tcase 'email':\n\t\t\t\tcase 'file':\n\t\t\t\tcase 'number':\n\t\t\t\tcase 'password':\n\t\t\t\tcase 'radio':\n\t\t\t\tcase 'range':\n\t\t\t\tcase 'text':\n\t\t\t\t\tthis.formAssociated = document.createElement('input');\n\t\t\t\t\tthis.formAssociated.setAttribute('type', this.type);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'select':\n\t\t\t\t\tthis.formAssociated = document.createElement('select');\n\t\t\t\t\tthis.formAssociated.setAttribute('multiple', '');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'textarea':\n\t\t\t\t\tthis.formAssociated = document.createElement('textarea');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'checkbox': // Checkbox uses default case\n\t\t\t\tcase 'single-select': // SingleSelect uses default case\n\t\t\t\tcase 'combobox': // Combobox uses default case\n\t\t\t\tdefault:\n\t\t\t\t\tthis.formAssociated = document.createElement('input');\n\t\t\t\t\tthis.formAssociated.setAttribute('type', 'hidden');\n\t\t\t}\n\t\t\tthis.formAssociated.setAttribute('data-form-associated', '');\n\t\t\tthis.formAssociated.setAttribute('hidden', '');\n\t\t\tthis.host?.appendChild(this.formAssociated);\n\t\t}\n\t}\n\n\t/**\n\t * The associated elements must not reside within the ShadowRoot and must\n\t * reside as children in the host to be recognized by native forms.\n\t */\n\tprivate findHostWithShadowRoot(host?: HTMLElement): HTMLElement | undefined {\n\t\twhile (host?.shadowRoot === null && host !== document.body) {\n\t\t\thost = host?.parentNode as HTMLElement;\n\t\t\tif ((host as unknown as ShadowRoot).host) {\n\t\t\t\thost = (host as unknown as ShadowRoot).host as HTMLElement;\n\t\t\t}\n\t\t}\n\t\treturn host;\n\t}\n\n\tprotected setAttribute(qualifiedName: string, element?: HTMLElement, value?: string | number | boolean) {\n\t\tif (this.experimentalMode) {\n\t\t\ttry {\n\t\t\t\tvalue = typeof value === 'object' && value !== null ? JSON.stringify(value) : value;\n\t\t\t\tif (typeof value === 'boolean' || typeof value === 'number' || typeof value === 'string') {\n\t\t\t\t\telement?.setAttribute(qualifiedName, `${value as string}`);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(`Invalid value type: ${typeof value}`);\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\telement?.removeAttribute(qualifiedName);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * We need to stringify the value, for the setAttribute method.\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/setAttribute\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/attributes\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/attributes#value\n\t *\n\t * TODO: It is possible that the value are a cyclic object value. So we need a custom\n\t * JSON.stringify method from outside to convert it to string.\n\t */\n\tprivate tryToStringifyValue(value: StencilUnknown): string | null {\n\t\ttry {\n\t\t\treturn typeof value === 'object' && value !== null ? JSON.stringify(value).toString() : value === null || value === undefined ? null : value.toString();\n\t\t} catch (e) {\n\t\t\tdevWarning(`The form field raw value is not able to stringify! ${e as string}`);\n\t\t\treturn '';\n\t\t}\n\t}\n\n\t/**\n\t * We try to support native form-associated custom elements.\n\t *\n\t * @see https://github.com/public-ui/kolibri/discussions/2821\n\t */\n\tpublic readonly setFormAssociatedValue = (rawValue: StencilUnknown) => {\n\t\tconst name = this.formAssociated?.getAttribute('name');\n\t\tif (name === null || name === '') {\n\t\t\tdevHint(` The form field (${this.type}) must have a name attribute to be form-associated. Please define the _name attribute.`);\n\t\t}\n\t\tconst strValue = this.tryToStringifyValue(rawValue);\n\t\tthis.syncValue(rawValue, strValue, this.formAssociated);\n\t\tthis.syncValue(rawValue, strValue, this.syncToOwnInput);\n\t};\n\n\tprivate syncValue(\n\t\trawValue: StencilUnknown,\n\t\tstrValue: string | null,\n\t\tassociatedElement?: HTMLButtonElement | HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement,\n\t) {\n\t\tif (associatedElement) {\n\t\t\tswitch (this.type) {\n\t\t\t\tcase 'file':\n\t\t\t\t\t(associatedElement as HTMLInputFileElement).files = rawValue as FileList;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'select':\n\t\t\t\t\t(associatedElement as HTMLSelectElement).querySelectorAll('option').forEach((el) => {\n\t\t\t\t\t\t(associatedElement as HTMLSelectElement).removeChild(el);\n\t\t\t\t\t});\n\t\t\t\t\tif (Array.isArray(rawValue)) {\n\t\t\t\t\t\trawValue.forEach((rawValueItem) => {\n\t\t\t\t\t\t\tconst strValueItem = this.tryToStringifyValue(rawValueItem as string);\n\t\t\t\t\t\t\tif (typeof strValueItem === 'string') {\n\t\t\t\t\t\t\t\tconst option = document.createElement('option');\n\t\t\t\t\t\t\t\toption.setAttribute('value', strValueItem);\n\t\t\t\t\t\t\t\toption.setAttribute('selected', '');\n\t\t\t\t\t\t\t\t(associatedElement as HTMLSelectElement).appendChild(option);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'radio':\n\t\t\t\t\tif (typeof strValue === 'string') {\n\t\t\t\t\t\tassociatedElement.setAttribute('value', strValue);\n\t\t\t\t\t\tassociatedElement.setAttribute('checked', '');\n\t\t\t\t\t\tassociatedElement.value = strValue;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif (typeof strValue === 'string') {\n\t\t\t\t\t\tassociatedElement.setAttribute('value', strValue);\n\t\t\t\t\t\tassociatedElement.value = strValue;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tassociatedElement.removeAttribute('value');\n\t\t\t\t\t\tassociatedElement.value = '';\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic validateName(value?: NamePropType): void {\n\t\tvalidateName(this.component, value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: () => {\n\t\t\t\t\tthis.setAttribute('name', this.formAssociated, this.component.state._name as string);\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\t\tif (typeof value === 'undefined') {\n\t\t\tdevHint(\n\t\t\t\t`A name on input fields or switches is not strictly required, but it might be relevant for the autocomplete function and for the static submission of the input field.`,\n\t\t\t);\n\t\t}\n\t}\n\n\tpublic validateSyncValueBySelector(value?: SyncValueBySelectorPropType): void {\n\t\tif (this.experimentalMode && typeof value === 'string') {\n\t\t\tconst input = document.querySelector(value) as HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;\n\t\t\tif (input /* SSR instanceof HTMLInputElement */) {\n\t\t\t\tthis.syncToOwnInput = input;\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateName(this.component._name);\n\t\tthis.validateSyncValueBySelector(this.component._syncValueBySelector);\n\t}\n}\n"],"names":["watchString","getExperimentalMode","devHint","getOptions","devWarning"],"mappings":";;;;;;;;AAgBO,MAAM,YAAY,GAAG,CAAC,SAAoC,EAAE,KAAoB,EAAE,OAA4B,KAAU;IAC9HA,kBAAW,CAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC;AAChD,CAAC;;ACDD,MAAM,mBAAmB,GAAG,CAAC,IAAa,KACzC,IAAI,KAAK,YAAY;AACrB,IAAA,IAAI,KAAK,cAAc;AACvB,IAAA,IAAI,KAAK,oBAAoB;AAC7B,IAAA,IAAI,KAAK,iBAAiB;AAC1B,IAAA,IAAI,KAAK,gBAAgB;AACzB,IAAA,IAAI,KAAK,iBAAiB;AAC1B,IAAA,IAAI,KAAK,gBAAgB;AACzB,IAAA,IAAI,KAAK,kBAAkB;AAC3B,IAAA,IAAI,KAAK,oBAAoB;AAC7B,IAAA,IAAI,KAAK,iBAAiB;AAC1B,IAAA,IAAI,KAAK,iBAAiB;AAC1B,IAAA,IAAI,KAAK,gBAAgB;AACzB,IAAA,IAAI,KAAK,YAAY;AACrB,IAAA,IAAI,KAAK,mBAAmB;IAC5B,IAAI,KAAK,cAAc;MAEX,yBAAyB,CAAA;AAUrC,IAAA,WAAA,CAAmB,SAA4C,EAAE,IAAY,EAAE,IAAkB,EAAA;;AAThF,QAAA,IAAgB,CAAA,gBAAA,GAAGC,0BAAmB,EAAE;AAwGzC,QAAA,IAAA,CAAA,sBAAsB,GAAG,CAAC,QAAwB,KAAI;;AACrE,YAAA,MAAM,IAAI,GAAG,CAAA,EAAA,GAAA,IAAI,CAAC,cAAc,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,YAAY,CAAC,MAAM,CAAC;YACtD,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,EAAE,EAAE;AACjC,gBAAAC,cAAO,C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AACjC,wBAAA,iBAAiB,CAAC,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC;AACjD,wBAAA,iBAAiB,CAAC,KAAK,GAAG,QAAQ;;yBAC5B;AACN,wBAAA,iBAAiB,CAAC,eAAe,CAAC,OAAO,CAAC;AAC1C,wBAAA,iBAAiB,CAAC,KAAK,GAAG,EAAE;;;;;AAM1B,IAAA,YAAY,CAAC,KAAoB,EAAA;AACvC,QAAA,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE;AACnC,YAAA,KAAK,EAAE;gBACN,UAAU,EAAE,MAAK;AAChB,oBAAA,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAe,CAAC;iBACpF;AACD,aAAA;AACD,SAAA,CAAC;AACF,QAAA,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE;YACjCF,cAAO,CACN,CAAuK,qKAAA,CAAA,CACvK;;;AAII,IAAA,2BAA2B,CAAC,KAAmC,EAAA;QACrE,IAAI,IAAI,CAAC,gBAAgB,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YACvD,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAA+D;YACzG,IAAI,KAAK,EAAwC;AAChD,gBAAA,IAAI,CAAC,cAAc,GAAG,KAAK;;;;IAKvB,iBAAiB,GAAA;QACvB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;QACvC,IAAI,CAAC,2BAA2B,CAAC,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC;;AAEtE;;;;"}
@@ -0,0 +1,4 @@
1
+ /*!
2
+ * KoliBri - The accessible HTML-Standard
3
+ */
4
+ "use strict";var common=require("./common-Cd2qH809.js"),componentNames=require("./component-names-CuI-0Pbo.js"),i18n=require("./i18n-BnIFsVIa.js");let options,initialized=!1;const bootstrap=async(o,i,n)=>{var e,t;const s="undefined"!=typeof process&&process.env?"production":void 0;common.setRuntimeMode((null==n?void 0:n.environment)||s||"production"),i18n.initializeI18n(null!==(t=null===(e=null==n?void 0:n.translation)||void 0===e?void 0:e.name)&&void 0!==t?t:"de",null==n?void 0:n.translations),(null==n?void 0:n.transformTagName)&&componentNames.setCustomTagNames(null==n?void 0:n.transformTagName);const a=await common.V(o,i,n);return initialized=!0,options=n,common.Log.info("Development mode active - Enhanced debugging features available"),a},register=bootstrap,isInitialized=()=>initialized,getOptions=()=>options;exports.bootstrap=bootstrap,exports.getOptions=getOptions,exports.isInitialized=isInitialized,exports.register=register;
@@ -1 +1 @@
1
- {"version":3,"file":"bootstrap-LNQK8lTS.js","sources":["src/core/bootstrap.ts"],"sourcesContent":["import type { Generic, LoaderCallback, RegisterOptions } from 'adopted-style-sheets';\nimport { register as coreRegister } from 'adopted-style-sheets';\nimport type { Mode } from '../schema';\nimport { Log, setRuntimeMode } from '../schema';\nimport { setCustomTagNames } from './component-names';\nimport { initializeI18n } from './i18n';\n\ntype KoliBriOptions = RegisterOptions & {\n\t/**\n\t * The environment in which the application is running.\n\t */\n\tenvironment?: Mode;\n\t/**\n\t * This option allows you to transform the component tag names.\n\t */\n\ttransformTagName?: (tagName: string) => string;\n\n\t/**\n\t * When enabled, all input fields will reflect their current value to the host element, making it accessible outside the shadow DOM.\n\t */\n\treflectInputValues?: boolean;\n};\n\nlet initialized = false;\nlet options: KoliBriOptions | undefined;\n\nexport const bootstrap = async (\n\tthemes:\n\t\t| Generic.Theming.RegisterPatch<string, string, string>\n\t\t| Generic.Theming.RegisterPatch<string, string, string>[]\n\t\t| Set<Generic.Theming.RegisterPatch<string, string, string>>,\n\tloaders: LoaderCallback | LoaderCallback[] | Set<LoaderCallback>,\n\tkoliBriOptions?: KoliBriOptions,\n): Promise<void[]> => {\n\tconst nodeEnv = typeof process !== 'undefined' && process.env ? (process.env.NODE_ENV as Mode) : undefined;\n\tsetRuntimeMode(koliBriOptions?.environment || nodeEnv || 'production');\n\n\tinitializeI18n(koliBriOptions?.translation?.name ?? 'de', koliBriOptions?.translations);\n\tif (koliBriOptions?.transformTagName) {\n\t\tsetCustomTagNames(koliBriOptions?.transformTagName);\n\t}\n\tconst coreRegisterReturnValue = await coreRegister(themes, loaders, koliBriOptions);\n\tinitialized = true;\n\toptions = koliBriOptions;\n\n\t// Only log development message when actually in development mode\n\tLog.info('Development mode active - Enhanced debugging features available');\n\n\treturn coreRegisterReturnValue;\n};\n\nexport const register = bootstrap;\nexport const isInitialized = () => initialized;\nexport const getOptions = () => options;\n"],"names":["setRuntimeMode","initializeI18n","setCustomTagNames","coreRegister","Log"],"mappings":";;;;;;;;;AAuBA,IAAI,WAAW,GAAG,KAAK;AACvB,IAAI,OAAmC;AAEhC,MAAM,SAAS,GAAG,OACxB,MAG6D,EAC7D,OAAgE,EAChE,cAA+B,KACX;;IACpB,MAAM,OAAO,GAAG,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,GAAG,GAAI,YAA6B,GAAG,SAAS;IAC1GA,qBAAc,CAAC,CAAA,cAAc,KAAA,IAAA,IAAd,cAAc,KAAd,MAAA,GAAA,MAAA,GAAA,cAAc,CAAE,WAAW,KAAI,OAAO,IAAI,YAAY,CAAC;AAEtE,IAAAC,mBAAc,CAAC,MAAA,CAAA,EAAA,GAAA,cAAc,aAAd,cAAc,KAAA,MAAA,GAAA,MAAA,GAAd,cAAc,CAAE,WAAW,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,IAAI,MAAI,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,EAAA,GAAA,IAAI,EAAE,cAAc,KAAd,IAAA,IAAA,cAAc,uBAAd,cAAc,CAAE,YAAY,CAAC;IACvF,IAAI,cAAc,aAAd,cAAc,KAAA,MAAA,GAAA,MAAA,GAAd,cAAc,CAAE,gBAAgB,EAAE;QACrCC,gCAAiB,CAAC,cAAc,KAAd,IAAA,IAAA,cAAc,uBAAd,cAAc,CAAE,gBAAgB,CAAC;;IAEpD,MAAM,uBAAuB,GAAG,MAAMC,QAAY,CAAC,MAAM,EAAE,OAAO,EAAE,cAAc,CAAC;IACnF,WAAW,GAAG,IAAI;IAClB,OAAO,GAAG,cAAc;AAGxB,IAAAC,UAAG,CAAC,IAAI,CAAC,iEAAiE,CAAC;AAE3E,IAAA,OAAO,uBAAuB;AAC/B;AAEO,MAAM,QAAQ,GAAG;MACX,aAAa,GAAG,MAAM;MACtB,UAAU,GAAG,MAAM;;;;;;;"}
1
+ {"version":3,"file":"bootstrap-DmmGbpjB.js","sources":["src/core/bootstrap.ts"],"sourcesContent":["import type { Generic, LoaderCallback, RegisterOptions } from 'adopted-style-sheets';\nimport { register as coreRegister } from 'adopted-style-sheets';\nimport type { Mode } from '../schema';\nimport { Log, setRuntimeMode } from '../schema';\nimport { setCustomTagNames } from './component-names';\nimport { initializeI18n } from './i18n';\n\ntype KoliBriOptions = RegisterOptions & {\n\t/**\n\t * The environment in which the application is running.\n\t */\n\tenvironment?: Mode;\n\t/**\n\t * This option allows you to transform the component tag names.\n\t */\n\ttransformTagName?: (tagName: string) => string;\n\n\t/**\n\t * When enabled, all input fields will reflect their current value to the host element, making it accessible outside the shadow DOM.\n\t */\n\treflectInputValues?: boolean;\n};\n\nlet initialized = false;\nlet options: KoliBriOptions | undefined;\n\nexport const bootstrap = async (\n\tthemes:\n\t\t| Generic.Theming.RegisterPatch<string, string, string>\n\t\t| Generic.Theming.RegisterPatch<string, string, string>[]\n\t\t| Set<Generic.Theming.RegisterPatch<string, string, string>>,\n\tloaders: LoaderCallback | LoaderCallback[] | Set<LoaderCallback>,\n\tkoliBriOptions?: KoliBriOptions,\n): Promise<void[]> => {\n\tconst nodeEnv = typeof process !== 'undefined' && process.env ? (process.env.NODE_ENV as Mode) : undefined;\n\tsetRuntimeMode(koliBriOptions?.environment || nodeEnv || 'production');\n\n\tinitializeI18n(koliBriOptions?.translation?.name ?? 'de', koliBriOptions?.translations);\n\tif (koliBriOptions?.transformTagName) {\n\t\tsetCustomTagNames(koliBriOptions?.transformTagName);\n\t}\n\tconst coreRegisterReturnValue = await coreRegister(themes, loaders, koliBriOptions);\n\tinitialized = true;\n\toptions = koliBriOptions;\n\n\t// Only log development message when actually in development mode\n\tLog.info('Development mode active - Enhanced debugging features available');\n\n\treturn coreRegisterReturnValue;\n};\n\nexport const register = bootstrap;\nexport const isInitialized = () => initialized;\nexport const getOptions = () => options;\n"],"names":["setRuntimeMode","initializeI18n","setCustomTagNames","coreRegister","Log"],"mappings":";;;;;;;;;AAuBA,IAAI,WAAW,GAAG,KAAK;AACvB,IAAI,OAAmC;AAEhC,MAAM,SAAS,GAAG,OACxB,MAG6D,EAC7D,OAAgE,EAChE,cAA+B,KACX;;IACpB,MAAM,OAAO,GAAG,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,GAAG,GAAI,YAA6B,GAAG,SAAS;IAC1GA,qBAAc,CAAC,CAAA,cAAc,KAAA,IAAA,IAAd,cAAc,KAAd,MAAA,GAAA,MAAA,GAAA,cAAc,CAAE,WAAW,KAAI,OAAO,IAAI,YAAY,CAAC;AAEtE,IAAAC,mBAAc,CAAC,MAAA,CAAA,EAAA,GAAA,cAAc,aAAd,cAAc,KAAA,MAAA,GAAA,MAAA,GAAd,cAAc,CAAE,WAAW,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,IAAI,MAAI,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,EAAA,GAAA,IAAI,EAAE,cAAc,KAAd,IAAA,IAAA,cAAc,uBAAd,cAAc,CAAE,YAAY,CAAC;IACvF,IAAI,cAAc,aAAd,cAAc,KAAA,MAAA,GAAA,MAAA,GAAd,cAAc,CAAE,gBAAgB,EAAE;QACrCC,gCAAiB,CAAC,cAAc,KAAd,IAAA,IAAA,cAAc,uBAAd,cAAc,CAAE,gBAAgB,CAAC;;IAEpD,MAAM,uBAAuB,GAAG,MAAMC,QAAY,CAAC,MAAM,EAAE,OAAO,EAAE,cAAc,CAAC;IACnF,WAAW,GAAG,IAAI;IAClB,OAAO,GAAG,cAAc;AAGxB,IAAAC,UAAG,CAAC,IAAI,CAAC,iEAAiE,CAAC;AAE3E,IAAA,OAAO,uBAAuB;AAC/B;AAEO,MAAM,QAAQ,GAAG;MACX,aAAa,GAAG,MAAM;MACtB,UAAU,GAAG,MAAM;;;;;;;"}
@@ -0,0 +1,4 @@
1
+ /*!
2
+ * KoliBri - The accessible HTML-Standard
3
+ */
4
+ "use strict";let KolAbbrTag="kol-abbr",KolAccordionTag="kol-accordion",KolAlertTag="kol-alert";exports.KolAlertWcTag="kol-alert-wc";let KolAvatarTag="kol-avatar";exports.KolAvatarWcTag="kol-avatar-wc",exports.KolBadgeTag="kol-badge";let KolBreadcrumbTag="kol-breadcrumb",KolButtonLinkTag="kol-button-link";exports.KolButtonTag="kol-button",exports.KolButtonWcTag="kol-button-wc";let KolCardTag="kol-card";exports.KolCardWcTag="kol-card-wc";let KolComboboxTag="kol-combobox",KolDetailsTag="kol-details",KolDrawerTag="kol-drawer";exports.KolFormTag="kol-form",exports.KolHeadingTag="kol-heading",exports.KolIconTag="kol-icon";let KolImageTag="kol-image";exports.KolInputCheckboxTag="kol-input-checkbox";let KolInputColorTag="kol-input-color",KolInputDateTag="kol-input-date",KolInputEmailTag="kol-input-email",KolInputFileTag="kol-input-file";exports.KolInputNumberTag="kol-input-number";let KolInputPasswordTag="kol-input-password",KolInputRadioTag="kol-input-radio",KolInputRangeTag="kol-input-range",KolInputTag="kol-input",KolInputTextTag="kol-input-text",KolKolibriTag="kol-kolibri",KolLinkButtonTag="kol-link-button";exports.KolLinkTag="kol-link",exports.KolLinkWcTag="kol-link-wc";let KolModalTag="kol-modal",KolNavTag="kol-nav",KolPaginationTag="kol-pagination";exports.KolPaginationWcTag="kol-pagination-wc",exports.KolPopoverWcTag="kol-popover-wc";let KolPopoverButtonTag="kol-popover-button";exports.KolPopoverButtonWcTag="kol-popover-button-wc";let KolProgressTag="kol-progress",KolQuoteTag="kol-quote",KolSelectTag="kol-select";exports.KolSelectWcTag="kol-select-wc";let KolSingleSelectTag="kol-single-select",KolSkipNavTag="kol-skip-nav",KolSpinTag="kol-spin",KolSplitButtonTag="kol-split-button";exports.KolTableSettingsWcTag="kol-table-settings-wc";let KolTableStatefulTag="kol-table-stateful",KolTableStatelessTag="kol-table-stateless";exports.KolTableStatelessWcTag="kol-table-stateless-wc";let KolTabsTag="kol-tabs",KolTextareaTag="kol-textarea";exports.KolToastContainerTag="kol-toast-container",exports.KolTooltipWcTag="kol-tooltip-wc",exports.KolTreeItemTag="kol-tree-item",exports.KolTreeItemWcTag="kol-tree-item-wc",exports.KolTreeTag="kol-tree",exports.KolTreeWcTag="kol-tree-wc";let KolVersionTag="kol-version";const setCustomTagNames=o=>{KolAbbrTag=o(KolAbbrTag),KolAccordionTag=o(KolAccordionTag),KolAlertTag=o(KolAlertTag),exports.KolAlertWcTag=o(exports.KolAlertWcTag),KolAvatarTag=o(KolAvatarTag),exports.KolAvatarWcTag=o(exports.KolAvatarWcTag),exports.KolBadgeTag=o(exports.KolBadgeTag),KolBreadcrumbTag=o(KolBreadcrumbTag),KolButtonLinkTag=o(KolButtonLinkTag),exports.KolButtonTag=o(exports.KolButtonTag),exports.KolButtonWcTag=o(exports.KolButtonWcTag),KolCardTag=o(KolCardTag),exports.KolCardWcTag=o(exports.KolCardWcTag),KolComboboxTag=o(KolComboboxTag),KolDetailsTag=o(KolDetailsTag),KolDrawerTag=o(KolDrawerTag),exports.KolFormTag=o(exports.KolFormTag),exports.KolHeadingTag=o(exports.KolHeadingTag),exports.KolIconTag=o(exports.KolIconTag),KolImageTag=o(KolImageTag),exports.KolInputCheckboxTag=o(exports.KolInputCheckboxTag),KolInputColorTag=o(KolInputColorTag),KolInputDateTag=o(KolInputDateTag),KolInputEmailTag=o(KolInputEmailTag),KolInputFileTag=o(KolInputFileTag),exports.KolInputNumberTag=o(exports.KolInputNumberTag),KolInputPasswordTag=o(KolInputPasswordTag),KolInputRadioTag=o(KolInputRadioTag),KolInputRangeTag=o(KolInputRangeTag),KolInputTag=o(KolInputTag),KolInputTextTag=o(KolInputTextTag),KolKolibriTag=o(KolKolibriTag),KolLinkButtonTag=o(KolLinkButtonTag),exports.KolLinkTag=o(exports.KolLinkTag),exports.KolLinkWcTag=o(exports.KolLinkWcTag),KolModalTag=o(KolModalTag),KolNavTag=o(KolNavTag),KolPaginationTag=o(KolPaginationTag),exports.KolPaginationWcTag=o(exports.KolPaginationWcTag),exports.KolPopoverWcTag=o(exports.KolPopoverWcTag),KolPopoverButtonTag=o(KolPopoverButtonTag),exports.KolPopoverButtonWcTag=o(exports.KolPopoverButtonWcTag),KolProgressTag=o(KolProgressTag),KolQuoteTag=o(KolQuoteTag),KolSelectTag=o(KolSelectTag),exports.KolSelectWcTag=o(exports.KolSelectWcTag),KolSingleSelectTag=o(KolSingleSelectTag),KolSkipNavTag=o(KolSkipNavTag),KolSpinTag=o(KolSpinTag),KolSplitButtonTag=o(KolSplitButtonTag),exports.KolTableSettingsWcTag=o(exports.KolTableSettingsWcTag),KolTableStatefulTag=o(KolTableStatefulTag),KolTableStatelessTag=o(KolTableStatelessTag),exports.KolTableStatelessWcTag=o(exports.KolTableStatelessWcTag),KolTabsTag=o(KolTabsTag),KolTextareaTag=o(KolTextareaTag),exports.KolToastContainerTag=o(exports.KolToastContainerTag),o(exports.KolTooltipWcTag),exports.KolTooltipWcTag=o(exports.KolTooltipWcTag),exports.KolTreeItemTag=o(exports.KolTreeItemTag),exports.KolTreeItemWcTag=o(exports.KolTreeItemWcTag),exports.KolTreeTag=o(exports.KolTreeTag),exports.KolTreeWcTag=o(exports.KolTreeWcTag),KolVersionTag=o(KolVersionTag)};exports.setCustomTagNames=setCustomTagNames;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component-names-CuI-0Pbo.js","sources":["src/core/component-names.ts"],"sourcesContent":["export let KolAbbrTag = 'kol-abbr' as const;\nexport let KolAccordionTag = 'kol-accordion' as const;\nexport let KolAlertTag = 'kol-alert' as const;\nexport let KolAlertWcTag = 'kol-alert-wc' as const;\nexport let KolAvatarTag = 'kol-avatar' as const;\nexport let KolAvatarWcTag = 'kol-avatar-wc' as const;\nexport let KolBadgeTag = 'kol-badge' as const;\nexport let KolBreadcrumbTag = 'kol-breadcrumb' as const;\nexport let KolButtonLinkTag = 'kol-button-link' as const;\nexport let KolButtonTag = 'kol-button' as const;\nexport let KolButtonWcTag = 'kol-button-wc' as const;\nexport let KolCardTag = 'kol-card' as const;\nexport let KolCardWcTag = 'kol-card-wc' as const;\nexport let KolComboboxTag = 'kol-combobox' as const;\nexport let KolDetailsTag = 'kol-details' as const;\nexport let KolDrawerTag = 'kol-drawer' as const;\nexport let KolFormTag = 'kol-form' as const;\nexport let KolHeadingTag = 'kol-heading' as const;\nexport let KolIconTag = 'kol-icon' as const;\nexport let KolImageTag = 'kol-image' as const;\nexport let KolInputCheckboxTag = 'kol-input-checkbox' as const;\nexport let KolInputColorTag = 'kol-input-color' as const;\nexport let KolInputDateTag = 'kol-input-date' as const;\nexport let KolInputEmailTag = 'kol-input-email' as const;\nexport let KolInputFileTag = 'kol-input-file' as const;\nexport let KolInputNumberTag = 'kol-input-number' as const;\nexport let KolInputPasswordTag = 'kol-input-password' as const;\nexport let KolInputRadioTag = 'kol-input-radio' as const;\nexport let KolInputRangeTag = 'kol-input-range' as const;\nexport let KolInputTag = 'kol-input' as const;\nexport let KolInputTextTag = 'kol-input-text' as const;\nexport let KolKolibriTag = 'kol-kolibri' as const;\nexport let KolLinkButtonTag = 'kol-link-button' as const;\nexport let KolLinkTag = 'kol-link' as const;\nexport let KolLinkWcTag = 'kol-link-wc' as const;\nexport let KolModalTag = 'kol-modal' as const;\nexport let KolNavTag = 'kol-nav' as const;\nexport let KolPaginationTag = 'kol-pagination' as const;\nexport let KolPaginationWcTag = 'kol-pagination-wc' as const;\nexport let KolPopoverWcTag = 'kol-popover-wc' as const;\nexport let KolPopoverButtonTag = 'kol-popover-button' as const;\nexport let KolPopoverButtonWcTag = 'kol-popover-button-wc' as const;\nexport let KolProgressTag = 'kol-progress' as const;\nexport let KolQuoteTag = 'kol-quote' as const;\nexport let KolSelectTag = 'kol-select' as const;\nexport let KolSelectWcTag = 'kol-select-wc' as const;\nexport let KolSingleSelectTag = 'kol-single-select' as const;\nexport let KolSkipNavTag = 'kol-skip-nav' as const;\nexport let KolSpinTag = 'kol-spin' as const;\nexport let KolSplitButtonTag = 'kol-split-button' as const;\nexport let KolTableSettingsWcTag = 'kol-table-settings-wc' as const;\nexport let KolTableStatefulTag = 'kol-table-stateful';\nexport let KolTableStatelessTag = 'kol-table-stateless' as const;\nexport let KolTableStatelessWcTag = 'kol-table-stateless-wc' as const;\nexport let KolTabsTag = 'kol-tabs' as const;\nexport let KolTextareaTag = 'kol-textarea' as const;\nexport let KolToastContainerTag = 'kol-toast-container' as const;\nexport let KolToolbarTag = 'kol-toolbar' as const;\nexport let KolTooltipWcTag = 'kol-tooltip-wc' as const;\nexport let KolTreeItemTag = 'kol-tree-item' as const;\nexport let KolTreeItemWcTag = 'kol-tree-item-wc' as const;\nexport let KolTreeTag = 'kol-tree' as const;\nexport let KolTreeWcTag = 'kol-tree-wc' as const;\nexport let KolVersionTag = 'kol-version' as const;\n\nexport const setCustomTagNames = (transformTagName: (tagName: string) => string) => {\n\tKolAbbrTag = transformTagName(KolAbbrTag as string) as 'kol-abbr';\n\tKolAccordionTag = transformTagName(KolAccordionTag as string) as 'kol-accordion';\n\tKolAlertTag = transformTagName(KolAlertTag as string) as 'kol-alert';\n\tKolAlertWcTag = transformTagName(KolAlertWcTag as string) as 'kol-alert-wc';\n\tKolAvatarTag = transformTagName(KolAvatarTag as string) as 'kol-avatar';\n\tKolAvatarWcTag = transformTagName(KolAvatarWcTag as string) as 'kol-avatar-wc';\n\tKolBadgeTag = transformTagName(KolBadgeTag as string) as 'kol-badge';\n\tKolBreadcrumbTag = transformTagName(KolBreadcrumbTag as string) as 'kol-breadcrumb';\n\tKolButtonLinkTag = transformTagName(KolButtonLinkTag as string) as 'kol-button-link';\n\tKolButtonTag = transformTagName(KolButtonTag as string) as 'kol-button';\n\tKolButtonWcTag = transformTagName(KolButtonWcTag as string) as 'kol-button-wc';\n\tKolCardTag = transformTagName(KolCardTag as string) as 'kol-card';\n\tKolCardWcTag = transformTagName(KolCardWcTag as string) as 'kol-card-wc';\n\tKolComboboxTag = transformTagName(KolComboboxTag as string) as 'kol-combobox';\n\tKolDetailsTag = transformTagName(KolDetailsTag as string) as 'kol-details';\n\tKolDrawerTag = transformTagName(KolDrawerTag as string) as 'kol-drawer';\n\tKolFormTag = transformTagName(KolFormTag as string) as 'kol-form';\n\tKolHeadingTag = transformTagName(KolHeadingTag as string) as 'kol-heading';\n\tKolIconTag = transformTagName(KolIconTag as string) as 'kol-icon';\n\tKolImageTag = transformTagName(KolImageTag as string) as 'kol-image';\n\tKolInputCheckboxTag = transformTagName(KolInputCheckboxTag as string) as 'kol-input-checkbox';\n\tKolInputColorTag = transformTagName(KolInputColorTag as string) as 'kol-input-color';\n\tKolInputDateTag = transformTagName(KolInputDateTag as string) as 'kol-input-date';\n\tKolInputEmailTag = transformTagName(KolInputEmailTag as string) as 'kol-input-email';\n\tKolInputFileTag = transformTagName(KolInputFileTag as string) as 'kol-input-file';\n\tKolInputNumberTag = transformTagName(KolInputNumberTag as string) as 'kol-input-number';\n\tKolInputPasswordTag = transformTagName(KolInputPasswordTag as string) as 'kol-input-password';\n\tKolInputRadioTag = transformTagName(KolInputRadioTag as string) as 'kol-input-radio';\n\tKolInputRangeTag = transformTagName(KolInputRangeTag as string) as 'kol-input-range';\n\tKolInputTag = transformTagName(KolInputTag as string) as 'kol-input';\n\tKolInputTextTag = transformTagName(KolInputTextTag as string) as 'kol-input-text';\n\tKolKolibriTag = transformTagName(KolKolibriTag as string) as 'kol-kolibri';\n\tKolLinkButtonTag = transformTagName(KolLinkButtonTag as string) as 'kol-link-button';\n\tKolLinkTag = transformTagName(KolLinkTag as string) as 'kol-link';\n\tKolLinkWcTag = transformTagName(KolLinkWcTag as string) as 'kol-link-wc';\n\tKolModalTag = transformTagName(KolModalTag as string) as 'kol-modal';\n\tKolNavTag = transformTagName(KolNavTag as string) as 'kol-nav';\n\tKolPaginationTag = transformTagName(KolPaginationTag as string) as 'kol-pagination';\n\tKolPaginationWcTag = transformTagName(KolPaginationWcTag as string) as 'kol-pagination-wc';\n\tKolPopoverWcTag = transformTagName(KolPopoverWcTag as string) as 'kol-popover-wc';\n\tKolPopoverButtonTag = transformTagName(KolPopoverButtonTag as string) as 'kol-popover-button';\n\tKolPopoverButtonWcTag = transformTagName(KolPopoverButtonWcTag as string) as 'kol-popover-button-wc';\n\tKolProgressTag = transformTagName(KolProgressTag as string) as 'kol-progress';\n\tKolQuoteTag = transformTagName(KolQuoteTag as string) as 'kol-quote';\n\tKolSelectTag = transformTagName(KolSelectTag as string) as 'kol-select';\n\tKolSelectWcTag = transformTagName(KolSelectWcTag as string) as 'kol-select-wc';\n\tKolSingleSelectTag = transformTagName(KolSingleSelectTag as string) as 'kol-single-select';\n\tKolSkipNavTag = transformTagName(KolSkipNavTag as string) as 'kol-skip-nav';\n\tKolSpinTag = transformTagName(KolSpinTag as string) as 'kol-spin';\n\tKolSplitButtonTag = transformTagName(KolSplitButtonTag as string) as 'kol-split-button';\n\tKolTableSettingsWcTag = transformTagName(KolTableSettingsWcTag) as 'kol-table-settings-wc';\n\tKolTableStatefulTag = transformTagName(KolTableStatefulTag) as 'kol-table-stateful';\n\tKolTableStatelessTag = transformTagName(KolTableStatelessTag as string) as 'kol-table-stateless';\n\tKolTableStatelessWcTag = transformTagName(KolTableStatelessWcTag as string) as 'kol-table-stateless-wc';\n\tKolTabsTag = transformTagName(KolTabsTag as string) as 'kol-tabs';\n\tKolTextareaTag = transformTagName(KolTextareaTag as string) as 'kol-textarea';\n\tKolToastContainerTag = transformTagName(KolToastContainerTag as string) as 'kol-toast-container';\n\tKolToolbarTag = transformTagName(KolTooltipWcTag as string) as 'kol-toolbar';\n\tKolTooltipWcTag = transformTagName(KolTooltipWcTag as string) as 'kol-tooltip-wc';\n\tKolTreeItemTag = transformTagName(KolTreeItemTag as string) as 'kol-tree-item';\n\tKolTreeItemWcTag = transformTagName(KolTreeItemWcTag as string) as 'kol-tree-item-wc';\n\tKolTreeTag = transformTagName(KolTreeTag as string) as 'kol-tree';\n\tKolTreeWcTag = transformTagName(KolTreeWcTag as string) as 'kol-tree-wc';\n\tKolVersionTag = transformTagName(KolVersionTag as string) as 'kol-version';\n};\n"],"names":["KolAlertWcTag","KolAvatarWcTag","KolBadgeTag","KolButtonTag","KolButtonWcTag","KolCardWcTag","KolFormTag","KolHeadingTag","KolIconTag","KolInputCheckboxTag","KolInputNumberTag","KolLinkTag","KolLinkWcTag","KolPaginationWcTag","KolPopoverWcTag","KolPopoverButtonWcTag","KolSelectWcTag","KolTableSettingsWcTag","KolTableStatelessWcTag","KolToastContainerTag","KolTooltipWcTag","KolTreeItemTag","KolTreeItemWcTag","KolTreeTag","KolTreeWcTag"],"mappings":";;;;;AAAO,IAAI,UAAU,GAAG,UAAmB;AACpC,IAAI,eAAe,GAAG,eAAwB;AAC9C,IAAI,WAAW,GAAG,WAAoB;AAClCA,qBAAa,GAAG;AACpB,IAAI,YAAY,GAAG,YAAqB;AACpCC,sBAAc,GAAG;AACjBC,mBAAW,GAAG;AAClB,IAAI,gBAAgB,GAAG,gBAAyB;AAChD,IAAI,gBAAgB,GAAG,iBAA0B;AAC7CC,oBAAY,GAAG;AACfC,sBAAc,GAAG;AACrB,IAAI,UAAU,GAAG,UAAmB;AAChCC,oBAAY,GAAG;AACnB,IAAI,cAAc,GAAG,cAAuB;AAC5C,IAAI,aAAa,GAAG,aAAsB;AAC1C,IAAI,YAAY,GAAG,YAAqB;AACpCC,kBAAU,GAAG;AACbC,qBAAa,GAAG;AAChBC,kBAAU,GAAG;AACjB,IAAI,WAAW,GAAG,WAAoB;AAClCC,2B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cd2qH809.js"),label=require("./label-Nicf9N_T.js"),required=require("./required-CXU7vdyH.js"),orientation=require("./orientation-BGODo_Ua.js"),FormFieldStateWrapper=require("./FormFieldStateWrapper-BqMhvNTP.js");const validateInputSelectOptions=t=>{if("object"==typeof t&&null!==t){if("string"==typeof t.label&&t.label.length>0)return t.disabled=!0===t.disabled,t.label=`${t.label}`.trim(),!1===label.hasEnoughReadableChars(t.label,3)&&!1===label.containsOnlyNumbers(t.label)&&common.a11yHint(`A differing Aria-Label (${t.label}) is inaccessible. A differing Aria-Label should consist of at least three readable characters.`),!Array.isArray(t.options)||void 0===t.options.find(t=>!1===validateInputSelectOptions(t));if("number"==typeof t.label)return!0}return!1},validateOptions=(t,e,o={})=>{common.watchJsonArrayString(t,"_options",t=>"object"==typeof t&&null!==t&&"string"==typeof t.label&&t.label.length>0,e,void 0,o)},validateOptionsWithOptgroup=(t,e,o={})=>{common.watchJsonArrayString(t,"_options",validateInputSelectOptions,e,void 0,o)},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 FormFieldStateWrapper.InputController{constructor(t,e,o){super(t,e,o),this.component=t}validateRequired(t){required.validateRequired(this.component,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.afterPatchOptions=(t,e,o,i)=>{"_value"===i&&this.setFormAssociatedValue(t)},this.beforePatchOptions=(t,e)=>{const o=e.has("_options")?e.get("_options"):this.component.state._options;if(Array.isArray(o)&&o.length>0){this.keyOptionMap.clear();const t=o.map(t=>{var e;return"object"==typeof t&&null!==t&&"string"==typeof t.label?Object.assign(Object.assign({},t),{value:null!==(e=t.value)&&void 0!==e?e:t.label}):t});fillKeyOptionMap(this.keyOptionMap,t)}},this.component=t}validateOrientation(t){orientation.validateOrientation(this.component,t,"vertical")}validateOptions(t){validateOptions(this.component,t,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}validateValue(t){t=Array.isArray(t)?t[0]:t,common.setState(this.component,"_value",t,{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions})}componentWillLoad(){super.componentWillLoad(),this.validateOrientation(this.component._orientation),this.validateOptions(this.component._options),this.validateValue(this.component._value)}}exports.InputCheckboxRadioController=InputCheckboxRadioController,exports.InputRadioController=InputRadioController,exports.fillKeyOptionMap=fillKeyOptionMap,exports.validateOptions=validateOptions,exports.validateOptionsWithOptgroup=validateOptionsWithOptgroup;
4
+ "use strict";var common=require("./common-Cd2qH809.js"),label=require("./label-Nicf9N_T.js"),required=require("./required-CXU7vdyH.js"),orientation=require("./orientation-BGODo_Ua.js"),FormFieldStateWrapper=require("./FormFieldStateWrapper-D0S7W-Oq.js");const validateInputSelectOptions=t=>{if("object"==typeof t&&null!==t){if("string"==typeof t.label&&t.label.length>0)return t.disabled=!0===t.disabled,t.label=`${t.label}`.trim(),!1===label.hasEnoughReadableChars(t.label,3)&&!1===label.containsOnlyNumbers(t.label)&&common.a11yHint(`A differing Aria-Label (${t.label}) is inaccessible. A differing Aria-Label should consist of at least three readable characters.`),!Array.isArray(t.options)||void 0===t.options.find(t=>!1===validateInputSelectOptions(t));if("number"==typeof t.label)return!0}return!1},validateOptions=(t,e,o={})=>{common.watchJsonArrayString(t,"_options",t=>"object"==typeof t&&null!==t&&"string"==typeof t.label&&t.label.length>0,e,void 0,o)},validateOptionsWithOptgroup=(t,e,o={})=>{common.watchJsonArrayString(t,"_options",validateInputSelectOptions,e,void 0,o)},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 FormFieldStateWrapper.InputController{constructor(t,e,o){super(t,e,o),this.component=t}validateRequired(t){required.validateRequired(this.component,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.afterPatchOptions=(t,e,o,i)=>{"_value"===i&&this.setFormAssociatedValue(t)},this.beforePatchOptions=(t,e)=>{const o=e.has("_options")?e.get("_options"):this.component.state._options;if(Array.isArray(o)&&o.length>0){this.keyOptionMap.clear();const t=o.map(t=>{var e;return"object"==typeof t&&null!==t&&"string"==typeof t.label?Object.assign(Object.assign({},t),{value:null!==(e=t.value)&&void 0!==e?e:t.label}):t});fillKeyOptionMap(this.keyOptionMap,t)}},this.component=t}validateOrientation(t){orientation.validateOrientation(this.component,t,"vertical")}validateOptions(t){validateOptions(this.component,t,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}validateValue(t){t=Array.isArray(t)?t[0]:t,common.setState(this.component,"_value",t,{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions})}componentWillLoad(){super.componentWillLoad(),this.validateOrientation(this.component._orientation),this.validateOptions(this.component._options),this.validateValue(this.component._value)}}exports.InputCheckboxRadioController=InputCheckboxRadioController,exports.InputRadioController=InputRadioController,exports.fillKeyOptionMap=fillKeyOptionMap,exports.validateOptions=validateOptions,exports.validateOptionsWithOptgroup=validateOptionsWithOptgroup;
@@ -1 +1 @@
1
- {"version":3,"file":"controller-BnghHJmi.js","sources":["src/schema/validators/options.ts","src/schema/props/options.ts","src/components/input-radio/controller.ts"],"sourcesContent":["import { containsOnlyNumbers, hasEnoughReadableChars } from '../props';\nimport { a11yHint } from '../utils';\n\nimport type { Optgroup, SelectOption } from '../types';\nexport const validateInputSelectOptions = <T>(option: SelectOption<T>): boolean => {\n\tif (typeof option === 'object' && option !== null) {\n\t\tif (typeof option.label === 'string' && option.label.length > 0) {\n\t\t\toption.disabled = option.disabled === true;\n\t\t\toption.label = `${option.label}`.trim();\n\t\t\tif (hasEnoughReadableChars(option.label, 3) === false && containsOnlyNumbers(option.label) === false) {\n\t\t\t\ta11yHint(`A differing Aria-Label (${option.label}) is inaccessible. A differing Aria-Label should consist of at least three readable characters.`);\n\t\t\t}\n\t\t\tif (Array.isArray((option as Optgroup<T>).options)) {\n\t\t\t\treturn (\n\t\t\t\t\t(option as Optgroup<T>).options.find((item) => {\n\t\t\t\t\t\treturn validateInputSelectOptions(item) === false;\n\t\t\t\t\t}) === undefined\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn true;\n\t\t} else if (typeof option.label === 'number') {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n};\n","import type { Generic } from 'adopted-style-sheets';\n\nimport type { Optgroup, Option, RadioOption, StencilUnknown } from '../types';\nimport type { Stringified } from '../types/common';\nimport type { WatchOptions } from '../utils';\nimport { watchJsonArrayString } from '../utils';\nimport { validateInputSelectOptions } from '../validators';\n\n/* types */\n\nexport type OptionsPropType = Stringified<Option<StencilUnknown>[]>;\nexport type OptionsWithOptgroupPropType = Stringified<(Option<StencilUnknown> | Optgroup<StencilUnknown>)[]>;\nexport type RadioOptionsPropType = Stringified<RadioOption<StencilUnknown>[]>;\n\n/**\n * Options the user can choose from.\n */\nexport type PropOptions = {\n\toptions: OptionsPropType;\n};\n\nexport type PropRadioOptions = {\n\toptions: RadioOptionsPropType;\n};\n\n/**\n * Options the user can choose from, also supporting Optgroup.\n */\nexport type PropOptionsWithOptgroup = {\n\toptions: OptionsWithOptgroupPropType;\n};\n\n/* validators */\n\nexport const validateOptions = (component: Generic.Element.Component, value: OptionsPropType | undefined, options: WatchOptions = {}): void => {\n\twatchJsonArrayString(\n\t\tcomponent,\n\t\t'_options',\n\t\t(item: Option<StencilUnknown>) => typeof item === 'object' && item !== null && typeof item.label === 'string' && item.label.length > 0,\n\t\tvalue,\n\t\tundefined,\n\t\toptions,\n\t);\n};\n\nexport const validateOptionsWithOptgroup = (\n\tcomponent: Generic.Element.Component,\n\tvalue: OptionsWithOptgroupPropType | undefined,\n\toptions: WatchOptions = {},\n) => {\n\twatchJsonArrayString(component, '_options', validateInputSelectOptions, value, undefined, options);\n};\n","import type { Generic } from 'adopted-style-sheets';\n\nimport type {\n\tInputRadioProps,\n\tInputRadioWatches,\n\tOptgroup,\n\tOptionsPropType,\n\tPropLabelWithExpertSlot,\n\tRadioOption,\n\tRequiredPropType,\n\tSelectOption,\n\tStencilUnknown,\n} from '../../schema';\nimport { setState, validateOptions, validateRequired } from '../../schema';\n\nimport type { OrientationPropType } from '../../schema/props/orientation';\nimport { validateOrientation } from '../../schema/props/orientation';\nimport { InputController } from '../@deprecated/input/controller';\n\nexport const fillKeyOptionMap = <T>(keyOptionMap: Map<string, RadioOption<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 RadioOption<T>);\n\t\t\t}\n\t\t}\n\t});\n};\n\ntype RequiredProps = PropLabelWithExpertSlot;\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?: RequiredPropType): void {\n\t\tvalidateRequired(this.component, 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 InputRadioWatches {\n\tprotected readonly component: Generic.Element.Component & InputRadioProps;\n\tprivate readonly keyOptionMap = new Map<string, RadioOption<StencilUnknown>>();\n\n\tpublic constructor(component: Generic.Element.Component & InputRadioProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic readonly getOptionByKey = (key: string): RadioOption<StencilUnknown> | undefined => this.keyOptionMap.get(key);\n\n\tprotected readonly afterPatchOptions = (value: unknown, _state: Record<string, unknown>, _component: Generic.Element.Component, key: string): void => {\n\t\tif (key === '_value') {\n\t\t\tthis.setFormAssociatedValue(value as string);\n\t\t}\n\t};\n\n\tpublic validateOrientation(value?: OrientationPropType): void {\n\t\tvalidateOrientation(this.component, value, 'vertical');\n\t}\n\n\tprotected readonly beforePatchOptions = (_value: unknown, nextState: Map<string, unknown>): void => {\n\t\tconst options = nextState.has('_options') ? nextState.get('_options') : this.component.state._options;\n\t\tif (Array.isArray(options) && options.length > 0) {\n\t\t\tthis.keyOptionMap.clear();\n\n\t\t\tconst normalizedOptions = options.map((option: RadioOption<StencilUnknown> | string) => {\n\t\t\t\tif (typeof option === 'object' && option !== null && typeof option.label === 'string') {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...option,\n\t\t\t\t\t\tvalue: option.value ?? option.label,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\treturn option;\n\t\t\t});\n\n\t\t\tfillKeyOptionMap(this.keyOptionMap, normalizedOptions as SelectOption<StencilUnknown>[]);\n\t\t}\n\t};\n\n\tpublic validateOptions(value?: OptionsPropType): void {\n\t\tvalidateOptions(this.component, value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: this.afterPatchOptions,\n\t\t\t\tbeforePatch: this.beforePatchOptions,\n\t\t\t},\n\t\t});\n\t}\n\n\tpublic validateValue(value?: StencilUnknown): void {\n\t\tvalue = Array.isArray(value) ? (value[0] as StencilUnknown) : value;\n\t\tsetState(this.component, '_value', value, {\n\t\t\tafterPatch: this.afterPatchOptions,\n\t\t\tbeforePatch: this.beforePatchOptions,\n\t\t});\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateOrientation(this.component._orientation);\n\t\tthis.validateOptions(this.component._options);\n\t\tthis.validateValue(this.component._value);\n\t}\n}\n"],"names":["hasEnoughReadableChars","containsOnlyNumbers","a11yHint","watchJsonArrayString","InputController","validateRequired","validateOrientation","setState"],"mappings":";;;;;;;;;;;AAIO,MAAM,0BAA0B,GAAG,CAAI,MAAuB,KAAa;IACjF,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI,EAAE;AAClD,QAAA,IAAI,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;YAChE,MAAM,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,KAAK,IAAI;YAC1C,MAAM,CAAC,KAAK,GAAG,CAAG,EAAA,MAAM,CAAC,KAAK,CAAE,CAAA,CAAC,IAAI,EAAE;YACvC,IAAIA,4BAAsB,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,KAAK,IAAIC,yBAAmB,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,KAAK,EAAE;AACrG,gBAAAC,eAAQ,CAAC,CAA2B,wBAAA,EAAA,MAAM,CAAC,KAAK,CAAA,+FAAA,CAAiG,CAAC;;YAEnJ,IAAI,KAAK,CAAC,OAAO,CAAE,MAAsB,CAAC,OAAO,CAAC,EAAE;gBACnD,QACE,MAAsB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,KAAI;AAC7C,oBAAA,OAA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C1C,QAAA,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAI,KAAK,CAAC,CAAC,CAAoB,GAAG,KAAK;QACnEC,eAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE;YACzC,UAAU,EAAE,IAAI,CAAC,iBAAiB;YAClC,WAAW,EAAE,IAAI,CAAC,kBAAkB;AACpC,SAAA,CAAC;;IAGI,iBAAiB,GAAA;QACvB,KAAK,CAAC,iBAAiB,EAAE;QACzB,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC;QACrD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC;QAC7C,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;;AAE1C;;;;;;;;"}
1
+ {"version":3,"file":"controller-B67T81sO.js","sources":["src/schema/validators/options.ts","src/schema/props/options.ts","src/components/input-radio/controller.ts"],"sourcesContent":["import { containsOnlyNumbers, hasEnoughReadableChars } from '../props';\nimport { a11yHint } from '../utils';\n\nimport type { Optgroup, SelectOption } from '../types';\nexport const validateInputSelectOptions = <T>(option: SelectOption<T>): boolean => {\n\tif (typeof option === 'object' && option !== null) {\n\t\tif (typeof option.label === 'string' && option.label.length > 0) {\n\t\t\toption.disabled = option.disabled === true;\n\t\t\toption.label = `${option.label}`.trim();\n\t\t\tif (hasEnoughReadableChars(option.label, 3) === false && containsOnlyNumbers(option.label) === false) {\n\t\t\t\ta11yHint(`A differing Aria-Label (${option.label}) is inaccessible. A differing Aria-Label should consist of at least three readable characters.`);\n\t\t\t}\n\t\t\tif (Array.isArray((option as Optgroup<T>).options)) {\n\t\t\t\treturn (\n\t\t\t\t\t(option as Optgroup<T>).options.find((item) => {\n\t\t\t\t\t\treturn validateInputSelectOptions(item) === false;\n\t\t\t\t\t}) === undefined\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn true;\n\t\t} else if (typeof option.label === 'number') {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n};\n","import type { Generic } from 'adopted-style-sheets';\n\nimport type { Optgroup, Option, RadioOption, StencilUnknown } from '../types';\nimport type { Stringified } from '../types/common';\nimport type { WatchOptions } from '../utils';\nimport { watchJsonArrayString } from '../utils';\nimport { validateInputSelectOptions } from '../validators';\n\n/* types */\n\nexport type OptionsPropType = Stringified<Option<StencilUnknown>[]>;\nexport type OptionsWithOptgroupPropType = Stringified<(Option<StencilUnknown> | Optgroup<StencilUnknown>)[]>;\nexport type RadioOptionsPropType = Stringified<RadioOption<StencilUnknown>[]>;\n\n/**\n * Options the user can choose from.\n */\nexport type PropOptions = {\n\toptions: OptionsPropType;\n};\n\nexport type PropRadioOptions = {\n\toptions: RadioOptionsPropType;\n};\n\n/**\n * Options the user can choose from, also supporting Optgroup.\n */\nexport type PropOptionsWithOptgroup = {\n\toptions: OptionsWithOptgroupPropType;\n};\n\n/* validators */\n\nexport const validateOptions = (component: Generic.Element.Component, value: OptionsPropType | undefined, options: WatchOptions = {}): void => {\n\twatchJsonArrayString(\n\t\tcomponent,\n\t\t'_options',\n\t\t(item: Option<StencilUnknown>) => typeof item === 'object' && item !== null && typeof item.label === 'string' && item.label.length > 0,\n\t\tvalue,\n\t\tundefined,\n\t\toptions,\n\t);\n};\n\nexport const validateOptionsWithOptgroup = (\n\tcomponent: Generic.Element.Component,\n\tvalue: OptionsWithOptgroupPropType | undefined,\n\toptions: WatchOptions = {},\n) => {\n\twatchJsonArrayString(component, '_options', validateInputSelectOptions, value, undefined, options);\n};\n","import type { Generic } from 'adopted-style-sheets';\n\nimport type {\n\tInputRadioProps,\n\tInputRadioWatches,\n\tOptgroup,\n\tOptionsPropType,\n\tPropLabelWithExpertSlot,\n\tRadioOption,\n\tRequiredPropType,\n\tSelectOption,\n\tStencilUnknown,\n} from '../../schema';\nimport { setState, validateOptions, validateRequired } from '../../schema';\n\nimport type { OrientationPropType } from '../../schema/props/orientation';\nimport { validateOrientation } from '../../schema/props/orientation';\nimport { InputController } from '../@deprecated/input/controller';\n\nexport const fillKeyOptionMap = <T>(keyOptionMap: Map<string, RadioOption<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 RadioOption<T>);\n\t\t\t}\n\t\t}\n\t});\n};\n\ntype RequiredProps = PropLabelWithExpertSlot;\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?: RequiredPropType): void {\n\t\tvalidateRequired(this.component, 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 InputRadioWatches {\n\tprotected readonly component: Generic.Element.Component & InputRadioProps;\n\tprivate readonly keyOptionMap = new Map<string, RadioOption<StencilUnknown>>();\n\n\tpublic constructor(component: Generic.Element.Component & InputRadioProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic readonly getOptionByKey = (key: string): RadioOption<StencilUnknown> | undefined => this.keyOptionMap.get(key);\n\n\tprotected readonly afterPatchOptions = (value: unknown, _state: Record<string, unknown>, _component: Generic.Element.Component, key: string): void => {\n\t\tif (key === '_value') {\n\t\t\tthis.setFormAssociatedValue(value as string);\n\t\t}\n\t};\n\n\tpublic validateOrientation(value?: OrientationPropType): void {\n\t\tvalidateOrientation(this.component, value, 'vertical');\n\t}\n\n\tprotected readonly beforePatchOptions = (_value: unknown, nextState: Map<string, unknown>): void => {\n\t\tconst options = nextState.has('_options') ? nextState.get('_options') : this.component.state._options;\n\t\tif (Array.isArray(options) && options.length > 0) {\n\t\t\tthis.keyOptionMap.clear();\n\n\t\t\tconst normalizedOptions = options.map((option: RadioOption<StencilUnknown> | string) => {\n\t\t\t\tif (typeof option === 'object' && option !== null && typeof option.label === 'string') {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...option,\n\t\t\t\t\t\tvalue: option.value ?? option.label,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\treturn option;\n\t\t\t});\n\n\t\t\tfillKeyOptionMap(this.keyOptionMap, normalizedOptions as SelectOption<StencilUnknown>[]);\n\t\t}\n\t};\n\n\tpublic validateOptions(value?: OptionsPropType): void {\n\t\tvalidateOptions(this.component, value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: this.afterPatchOptions,\n\t\t\t\tbeforePatch: this.beforePatchOptions,\n\t\t\t},\n\t\t});\n\t}\n\n\tpublic validateValue(value?: StencilUnknown): void {\n\t\tvalue = Array.isArray(value) ? (value[0] as StencilUnknown) : value;\n\t\tsetState(this.component, '_value', value, {\n\t\t\tafterPatch: this.afterPatchOptions,\n\t\t\tbeforePatch: this.beforePatchOptions,\n\t\t});\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateOrientation(this.component._orientation);\n\t\tthis.validateOptions(this.component._options);\n\t\tthis.validateValue(this.component._value);\n\t}\n}\n"],"names":["hasEnoughReadableChars","containsOnlyNumbers","a11yHint","watchJsonArrayString","InputController","validateRequired","validateOrientation","setState"],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Q,CAAC;QAC7C,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;;AAE1C;;;;;;;;"}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- "use strict";var common=require("./common-Cd2qH809.js"),spellCheck=require("./spell-check-Bkq4G9L7.js"),suggestions=require("./suggestions-BjiW0xio.js"),controller=require("./controller-DnU2dKag.js");const inputTextTypeOptions=["text","search","url","tel"],isInputTextTypePropType=e=>"string"==typeof e&&inputTextTypeOptions.includes(e),validateTypeInputText=(e,t)=>{common.watchValidator(e,"_type",isInputTextTypePropType,new Set(inputTextTypeOptions),t)};class InputTextEmailController extends controller.InputPasswordController{constructor(e,t,o){super(e,t,o),this.component=e}validateSuggestions(e){suggestions.validateSuggestions(this.component,e)}componentWillLoad(){super.componentWillLoad(),this.validateSuggestions(this.component._suggestions)}}class InputTextController extends InputTextEmailController{constructor(e,t,o){super(e,t,o),this.hasError=!1,this.component=e}validateSpellCheck(e){spellCheck.validateSpellCheck(this.component,e)}validateType(e){validateTypeInputText(this.component,e)}componentWillLoad(){super.componentWillLoad(),this.validateSpellCheck(this.component._spellCheck),this.validateType(this.component._type)}}exports.InputTextController=InputTextController,exports.InputTextEmailController=InputTextEmailController;
4
+ "use strict";var common=require("./common-Cd2qH809.js"),spellCheck=require("./spell-check-Bkq4G9L7.js"),suggestions=require("./suggestions-BjiW0xio.js"),controller=require("./controller-C3rThNHa.js");const inputTextTypeOptions=["text","search","url","tel"],isInputTextTypePropType=e=>"string"==typeof e&&inputTextTypeOptions.includes(e),validateTypeInputText=(e,t)=>{common.watchValidator(e,"_type",isInputTextTypePropType,new Set(inputTextTypeOptions),t)};class InputTextEmailController extends controller.InputPasswordController{constructor(e,t,o){super(e,t,o),this.component=e}validateSuggestions(e){suggestions.validateSuggestions(this.component,e)}componentWillLoad(){super.componentWillLoad(),this.validateSuggestions(this.component._suggestions)}}class InputTextController extends InputTextEmailController{constructor(e,t,o){super(e,t,o),this.hasError=!1,this.component=e}validateSpellCheck(e){spellCheck.validateSpellCheck(this.component,e)}validateType(e){validateTypeInputText(this.component,e)}componentWillLoad(){super.componentWillLoad(),this.validateSpellCheck(this.component._spellCheck),this.validateType(this.component._type)}}exports.InputTextController=InputTextController,exports.InputTextEmailController=InputTextEmailController;
@@ -1 +1 @@
1
- {"version":3,"file":"controller-B6s_HZZy.js","sources":["src/schema/props/type-input-text.ts","src/components/input-text/controller.ts"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\n\nimport { watchValidator } from '../utils';\n\nexport const inputTextTypeOptions = ['text', 'search', 'url', 'tel'] as const;\nexport type InputTextTypePropType = (typeof inputTextTypeOptions)[number];\n\n/**\n * Defines the type of the input-text component.\n */\nexport type PropTypeInputText = {\n\ttype: InputTextTypePropType;\n};\n\nconst isInputTextTypePropType = (value: unknown): value is InputTextTypePropType => {\n\treturn typeof value === 'string' && inputTextTypeOptions.includes(value as InputTextTypePropType);\n};\n\nexport const validateTypeInputText = (component: Generic.Element.Component, value?: InputTextTypePropType): void => {\n\twatchValidator(component, '_type', isInputTextTypePropType, new Set(inputTextTypeOptions), value);\n};\n","import type {\n\tInputTextProps,\n\tInputTextTypePropType,\n\tInputTextWatches,\n\tPropLabelWithExpertSlot,\n\tPropSuggestions,\n\tSpellCheckPropType,\n\tSuggestionsPropType,\n} from '../../schema';\nimport { validateSpellCheck, validateSuggestions, validateTypeInputText } from '../../schema';\n\nimport { InputPasswordController } from '../input-password/controller';\n\nimport type { Generic } from 'adopted-style-sheets';\n\ntype RequiredProps = PropLabelWithExpertSlot;\ntype OptionalProps = {\n\tid: string;\n} & PropSuggestions;\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 validateSuggestions(value?: SuggestionsPropType): void {\n\t\tvalidateSuggestions(this.component, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateSuggestions(this.component._suggestions);\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\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 validateSpellCheck(value?: SpellCheckPropType): void {\n\t\tvalidateSpellCheck(this.component, value);\n\t}\n\n\tpublic validateType(value?: InputTextTypePropType): void {\n\t\tvalidateTypeInputText(this.component, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateSpellCheck(this.component._spellCheck);\n\t\tthis.validateType(this.component._type);\n\t}\n}\n"],"names":["watchValidator","InputPasswordController","validateSuggestions","validateSpellCheck"],"mappings":";;;;;;;;;;AAIO,MAAM,oBAAoB,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,CAAU;AAU7E,MAAM,uBAAuB,GAAG,CAAC,KAAc,KAAoC;IAClF,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,oBAAoB,CAAC,QAAQ,CAAC,KAA8B,CAAC;AAClG,CAAC;AAEM,MAAM,qBAAqB,GAAG,CAAC,SAAoC,EAAE,KAA6B,KAAU;AAClH,IAAAA,qBAAc,CAAC,SAAS,EAAE,OAAO,EAAE,uBAAuB,EAAE,IAAI,GAAG,CAAC,oBAAoB,CAAC,EAAE,KAAK,CAAC;AAClG,CAAC;;ACEK,MAAO,wBAAyB,SAAQC,kCAAuB,CAAA;AAGpE,IAAA,WAAA,CAAmB,SAA0D,EAAE,IAAY,EAAE,IAAkB,EAAA;AAC9G,QAAA,KAAK,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC;AAC5B,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;;AAGpB,IAAA,mBAAmB,CAAC,KAA2B,EAAA;AACrD,QAAAC,+BAAmB,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC;;IAGpC,iBAAiB,GAAA;QACvB,KAAK,CAAC,iBAAiB,EAAE;QACzB,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC;;AAEtD;AAEK,MAAO,mBAAoB,SAAQ,wBAAwB,CAAA;AAKhE,IAAA,WAAA,CAAmB,SAAqD,EAAE,IAAY,EAAE,IAAkB,EAAA;AACzG,QAAA,KAAK,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC;AAHtB,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AAItB,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;;AAGpB,IAAA,kBAAkB,CAAC,KAA0B,EAAA;AACnD,QAAAC,6BAAkB,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC;;AAGnC,IAAA,YAAY,CAAC,KAA6B,EAAA;AAChD,QAAA,qBAAqB,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC;;IAGtC,iBAAiB,GAAA;QACvB,KAAK,CAAC,iBAAiB,EAAE;QACzB,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;QACnD,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;;AAExC;;;;;"}
1
+ {"version":3,"file":"controller-BeUjoNWw.js","sources":["src/schema/props/type-input-text.ts","src/components/input-text/controller.ts"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\n\nimport { watchValidator } from '../utils';\n\nexport const inputTextTypeOptions = ['text', 'search', 'url', 'tel'] as const;\nexport type InputTextTypePropType = (typeof inputTextTypeOptions)[number];\n\n/**\n * Defines the type of the input-text component.\n */\nexport type PropTypeInputText = {\n\ttype: InputTextTypePropType;\n};\n\nconst isInputTextTypePropType = (value: unknown): value is InputTextTypePropType => {\n\treturn typeof value === 'string' && inputTextTypeOptions.includes(value as InputTextTypePropType);\n};\n\nexport const validateTypeInputText = (component: Generic.Element.Component, value?: InputTextTypePropType): void => {\n\twatchValidator(component, '_type', isInputTextTypePropType, new Set(inputTextTypeOptions), value);\n};\n","import type {\n\tInputTextProps,\n\tInputTextTypePropType,\n\tInputTextWatches,\n\tPropLabelWithExpertSlot,\n\tPropSuggestions,\n\tSpellCheckPropType,\n\tSuggestionsPropType,\n} from '../../schema';\nimport { validateSpellCheck, validateSuggestions, validateTypeInputText } from '../../schema';\n\nimport { InputPasswordController } from '../input-password/controller';\n\nimport type { Generic } from 'adopted-style-sheets';\n\ntype RequiredProps = PropLabelWithExpertSlot;\ntype OptionalProps = {\n\tid: string;\n} & PropSuggestions;\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 validateSuggestions(value?: SuggestionsPropType): void {\n\t\tvalidateSuggestions(this.component, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateSuggestions(this.component._suggestions);\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\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 validateSpellCheck(value?: SpellCheckPropType): void {\n\t\tvalidateSpellCheck(this.component, value);\n\t}\n\n\tpublic validateType(value?: InputTextTypePropType): void {\n\t\tvalidateTypeInputText(this.component, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateSpellCheck(this.component._spellCheck);\n\t\tthis.validateType(this.component._type);\n\t}\n}\n"],"names":["watchValidator","InputPasswordController","validateSuggestions","validateSpellCheck"],"mappings":";;;;;;;;;;AAIO,MAAM,oBAAoB,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,CAAU;AAU7E,MAAM,uBAAuB,GAAG,CAAC,KAAc,KAAoC;IAClF,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,oBAAoB,CAAC,QAAQ,CAAC,KAA8B,CAAC;AAClG,CAAC;AAEM,MAAM,qBAAqB,GAAG,CAAC,SAAoC,EAAE,KAA6B,KAAU;AAClH,IAAAA,qBAAc,CAAC,SAAS,EAAE,OAAO,EAAE,uBAAuB,EAAE,IAAI,GAAG,CAAC,oBAAoB,CAAC,EAAE,KAAK,CAAC;AAClG,CAAC;;ACEK,MAAO,wBAAyB,SAAQC,kCAAuB,CAAA;AAGpE,IAAA,WAAA,CAAmB,SAA0D,EAAE,IAAY,EAAE,IAAkB,EAAA;AAC9G,QAAA,KAAK,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC;AAC5B,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;;AAGpB,IAAA,mBAAmB,CAAC,KAA2B,EAAA;AACrD,QAAAC,+BAAmB,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC;;IAGpC,iBAAiB,GAAA;QACvB,KAAK,CAAC,iBAAiB,EAAE;QACzB,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC;;AAEtD;AAEK,MAAO,mBAAoB,SAAQ,wBAAwB,CAAA;AAKhE,IAAA,WAAA,CAAmB,SAAqD,EAAE,IAAY,EAAE,IAAkB,EAAA;AACzG,QAAA,KAAK,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC;AAHtB,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AAItB,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;;AAGpB,IAAA,kBAAkB,CAAC,KAA0B,EAAA;AACnD,QAAAC,6BAAkB,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC;;AAGnC,IAAA,YAAY,CAAC,KAA6B,EAAA;AAChD,QAAA,qBAAqB,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC;;IAGtC,iBAAiB,GAAA;QACvB,KAAK,CAAC,iBAAiB,EAAE;QACzB,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;QACnD,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;;AAExC;;;;;"}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- "use strict";var common=require("./common-Cd2qH809.js"),autoComplete=require("./auto-complete-DQ9TPAgi.js"),maxLengthBehavior=require("./max-length-behavior-Bvbwhaxv.js"),placeholder=require("./placeholder-BncK-3gZ.js"),readOnly=require("./read-only-dIvCm73W.js"),required=require("./required-CXU7vdyH.js"),controllerIcon=require("./controller-icon-C6fMqGTq.js");const validatePattern=(t,e,a={})=>{common.watchString(t,"_pattern",e,a)},PasswordVariantPropTypeOptions=["default","visibility-toggle"],validatePasswordVariant=(t,e)=>{common.watchValidator(t,"_variant",t=>"string"==typeof t&&PasswordVariantPropTypeOptions.includes(t),new Set(PasswordVariantPropTypeOptions),e)};class InputPasswordController extends controllerIcon.InputIconController{constructor(t,e,a){super(t,e,a),this.afterSyncCharCounter=()=>{"string"==typeof this.component._value&&(this.component.state._currentLength=this.component._value.length,this.updateCurrentLengthDebounced(this.component._value.length))},this.component=t}validateAutoComplete(t){autoComplete.validateAutoComplete(this.component,t)}validateHasCounter(t){maxLengthBehavior.validateHasCounter(this.component,t)}validateMaxLengthBehavior(t){maxLengthBehavior.validateMaxLengthBehavior(this.component,t)}validateVariant(t){validatePasswordVariant(this.component,t)}validateMaxLength(t){maxLengthBehavior.validateMaxLength(this.component,t,{hooks:{afterPatch:this.afterSyncCharCounter}})}validatePattern(t){validatePattern(this.component,t)}validatePlaceholder(t){placeholder.validatePlaceholder(this.component,t)}validateReadOnly(t){readOnly.validateReadOnly(this.component,t)}validateRequired(t){required.validateRequired(this.component,t)}validateValue(t){common.watchString(this.component,"_value",t,{hooks:{afterPatch:this.afterSyncCharCounter}}),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateHasCounter(this.component._hasCounter),this.validateMaxLengthBehavior(this.component._maxLengthBehavior),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.validateValue(this.component._value),this.validateVariant(this.component._variant)}}exports.InputPasswordController=InputPasswordController;
4
+ "use strict";var common=require("./common-Cd2qH809.js"),autoComplete=require("./auto-complete-DQ9TPAgi.js"),maxLengthBehavior=require("./max-length-behavior-Bvbwhaxv.js"),placeholder=require("./placeholder-BncK-3gZ.js"),readOnly=require("./read-only-dIvCm73W.js"),required=require("./required-CXU7vdyH.js"),controllerIcon=require("./controller-icon-Cdj09I_u.js");const validatePattern=(t,e,a={})=>{common.watchString(t,"_pattern",e,a)},PasswordVariantPropTypeOptions=["default","visibility-toggle"],validatePasswordVariant=(t,e)=>{common.watchValidator(t,"_variant",t=>"string"==typeof t&&PasswordVariantPropTypeOptions.includes(t),new Set(PasswordVariantPropTypeOptions),e)};class InputPasswordController extends controllerIcon.InputIconController{constructor(t,e,a){super(t,e,a),this.afterSyncCharCounter=()=>{"string"==typeof this.component._value&&(this.component.state._currentLength=this.component._value.length,this.updateCurrentLengthDebounced(this.component._value.length))},this.component=t}validateAutoComplete(t){autoComplete.validateAutoComplete(this.component,t)}validateHasCounter(t){maxLengthBehavior.validateHasCounter(this.component,t)}validateMaxLengthBehavior(t){maxLengthBehavior.validateMaxLengthBehavior(this.component,t)}validateVariant(t){validatePasswordVariant(this.component,t)}validateMaxLength(t){maxLengthBehavior.validateMaxLength(this.component,t,{hooks:{afterPatch:this.afterSyncCharCounter}})}validatePattern(t){validatePattern(this.component,t)}validatePlaceholder(t){placeholder.validatePlaceholder(this.component,t)}validateReadOnly(t){readOnly.validateReadOnly(this.component,t)}validateRequired(t){required.validateRequired(this.component,t)}validateValue(t){common.watchString(this.component,"_value",t,{hooks:{afterPatch:this.afterSyncCharCounter}}),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateHasCounter(this.component._hasCounter),this.validateMaxLengthBehavior(this.component._maxLengthBehavior),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.validateValue(this.component._value),this.validateVariant(this.component._variant)}}exports.InputPasswordController=InputPasswordController;
@@ -1 +1 @@
1
- {"version":3,"file":"controller-DnU2dKag.js","sources":["src/schema/props/pattern.ts","src/schema/props/variant/password-variant.ts","src/components/input-password/controller.ts"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\nimport type { WatchStringOptions } from '../utils';\nimport { watchString } from '../utils';\n\nexport type PatternPropType = string;\n\n/**\n * Defines a validation pattern for the input field.\n */\nexport type PropPattern = {\n\tpattern: PatternPropType;\n};\n\nexport const validatePattern = (component: Generic.Element.Component, value?: PatternPropType, options: WatchStringOptions = {}): void => {\n\twatchString(component, '_pattern', value, options);\n};\n","import type { Generic } from 'adopted-style-sheets';\n\nimport { watchValidator } from '../../utils/prop.validators';\n\nconst PasswordVariantPropTypeOptions = ['default', 'visibility-toggle'] as const;\nexport type PasswordVariantPropType = (typeof PasswordVariantPropTypeOptions)[number];\n\n/**\n * Defines the different variants for displaying the password input.\n */\nexport type PropPasswordVariant = {\n\tvariant: PasswordVariantPropType;\n};\n\n/* validator */\nexport const validatePasswordVariant = (component: Generic.Element.Component, value?: PasswordVariantPropType): void => {\n\twatchValidator(\n\t\tcomponent,\n\t\t'_variant',\n\t\t(value) => typeof value === 'string' && PasswordVariantPropTypeOptions.includes(value),\n\t\tnew Set(PasswordVariantPropTypeOptions),\n\t\tvalue,\n\t);\n};\n","import type {\n\tAutoCompletePropType,\n\tHasCounterPropType,\n\tInputPasswordProps,\n\tInputPasswordWatches,\n\tMaxLengthBehaviorPropType,\n\tPlaceholderPropType,\n\tReadOnlyPropType,\n\tRequiredPropType,\n} from '../../schema';\nimport { validateHasCounter, validateMaxLength, validatePattern, validatePlaceholder, validateReadOnly, validateRequired, watchString } from '../../schema';\nimport { validateAutoComplete } from '../../schema/props/auto-complete';\nimport { validateMaxLengthBehavior } from '../../schema/props/max-length-behavior';\nimport type { PasswordVariantPropType } from '../../schema/props/variant/password-variant';\nimport { validatePasswordVariant } from '../../schema/props/variant/password-variant';\n\nimport { InputIconController } from '../@deprecated/input/controller-icon';\n\nimport type { Generic } from 'adopted-style-sheets';\n\nexport class InputPasswordController extends InputIconController implements InputPasswordWatches {\n\tprotected readonly component: Generic.Element.Component & InputPasswordProps;\n\n\tpublic constructor(component: Generic.Element.Component & InputPasswordProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tprotected afterSyncCharCounter = () => {\n\t\tif (typeof this.component._value === 'string') {\n\t\t\tthis.component.state._currentLength = this.component._value.length;\n\t\t\tthis.updateCurrentLengthDebounced(this.component._value.length);\n\t\t}\n\t};\n\n\tpublic validateAutoComplete(value?: AutoCompletePropType): void {\n\t\tvalidateAutoComplete(this.component, value);\n\t}\n\n\tpublic validateHasCounter(value?: HasCounterPropType): void {\n\t\tvalidateHasCounter(this.component, value);\n\t}\n\n\tpublic validateMaxLengthBehavior(value?: MaxLengthBehaviorPropType): void {\n\t\tvalidateMaxLengthBehavior(this.component, value);\n\t}\n\n\tpublic validateVariant(value?: PasswordVariantPropType): void {\n\t\tvalidatePasswordVariant(this.component, value);\n\t}\n\n\tpublic validateMaxLength(value?: number): void {\n\t\tvalidateMaxLength(this.component, value, {\n\t\t\thooks: { afterPatch: this.afterSyncCharCounter },\n\t\t});\n\t}\n\n\tpublic validatePattern(value?: string): void {\n\t\tvalidatePattern(this.component, value);\n\t}\n\n\tpublic validatePlaceholder(value?: PlaceholderPropType): void {\n\t\tvalidatePlaceholder(this.component, value);\n\t}\n\n\tpublic validateReadOnly(value?: ReadOnlyPropType): void {\n\t\tvalidateReadOnly(this.component, value);\n\t}\n\n\tpublic validateRequired(value?: RequiredPropType): void {\n\t\tvalidateRequired(this.component, value);\n\t}\n\n\tpublic validateValue(value?: string): void {\n\t\twatchString(this.component, '_value', value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: this.afterSyncCharCounter,\n\t\t\t},\n\t\t});\n\n\t\tthis.setFormAssociatedValue(this.component.state._value as string);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateAutoComplete(this.component._autoComplete);\n\t\tthis.validateHasCounter(this.component._hasCounter);\n\t\tthis.validateMaxLengthBehavior(this.component._maxLengthBehavior);\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.validateValue(this.component._value);\n\t\tthis.validateVariant(this.component._variant);\n\t}\n}\n"],"names":["watchString","watchValidator","InputIconController","validateAutoComplete","validateHasCounter","validateMaxLengthBehavior","validateMaxLength","validatePlaceholder","validateReadOnly","validateRequ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AAC;QACvD,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;QACnD,IAAI,CAAC,yBAAyB,CAAC,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAC;QACjE,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC;QACjD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC;QAC7C,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC;QACrD,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC;QAC/C,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC;QAC/C,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;QACzC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC;;AAE9C;;;;"}
1
+ {"version":3,"file":"controller-C3rThNHa.js","sources":["src/schema/props/pattern.ts","src/schema/props/variant/password-variant.ts","src/components/input-password/controller.ts"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\nimport type { WatchStringOptions } from '../utils';\nimport { watchString } from '../utils';\n\nexport type PatternPropType = string;\n\n/**\n * Defines a validation pattern for the input field.\n */\nexport type PropPattern = {\n\tpattern: PatternPropType;\n};\n\nexport const validatePattern = (component: Generic.Element.Component, value?: PatternPropType, options: WatchStringOptions = {}): void => {\n\twatchString(component, '_pattern', value, options);\n};\n","import type { Generic } from 'adopted-style-sheets';\n\nimport { watchValidator } from '../../utils/prop.validators';\n\nconst PasswordVariantPropTypeOptions = ['default', 'visibility-toggle'] as const;\nexport type PasswordVariantPropType = (typeof PasswordVariantPropTypeOptions)[number];\n\n/**\n * Defines the different variants for displaying the password input.\n */\nexport type PropPasswordVariant = {\n\tvariant: PasswordVariantPropType;\n};\n\n/* validator */\nexport const validatePasswordVariant = (component: Generic.Element.Component, value?: PasswordVariantPropType): void => {\n\twatchValidator(\n\t\tcomponent,\n\t\t'_variant',\n\t\t(value) => typeof value === 'string' && PasswordVariantPropTypeOptions.includes(value),\n\t\tnew Set(PasswordVariantPropTypeOptions),\n\t\tvalue,\n\t);\n};\n","import type {\n\tAutoCompletePropType,\n\tHasCounterPropType,\n\tInputPasswordProps,\n\tInputPasswordWatches,\n\tMaxLengthBehaviorPropType,\n\tPlaceholderPropType,\n\tReadOnlyPropType,\n\tRequiredPropType,\n} from '../../schema';\nimport { validateHasCounter, validateMaxLength, validatePattern, validatePlaceholder, validateReadOnly, validateRequired, watchString } from '../../schema';\nimport { validateAutoComplete } from '../../schema/props/auto-complete';\nimport { validateMaxLengthBehavior } from '../../schema/props/max-length-behavior';\nimport type { PasswordVariantPropType } from '../../schema/props/variant/password-variant';\nimport { validatePasswordVariant } from '../../schema/props/variant/password-variant';\n\nimport { InputIconController } from '../@deprecated/input/controller-icon';\n\nimport type { Generic } from 'adopted-style-sheets';\n\nexport class InputPasswordController extends InputIconController implements InputPasswordWatches {\n\tprotected readonly component: Generic.Element.Component & InputPasswordProps;\n\n\tpublic constructor(component: Generic.Element.Component & InputPasswordProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tprotected afterSyncCharCounter = () => {\n\t\tif (typeof this.component._value === 'string') {\n\t\t\tthis.component.state._currentLength = this.component._value.length;\n\t\t\tthis.updateCurrentLengthDebounced(this.component._value.length);\n\t\t}\n\t};\n\n\tpublic validateAutoComplete(value?: AutoCompletePropType): void {\n\t\tvalidateAutoComplete(this.component, value);\n\t}\n\n\tpublic validateHasCounter(value?: HasCounterPropType): void {\n\t\tvalidateHasCounter(this.component, value);\n\t}\n\n\tpublic validateMaxLengthBehavior(value?: MaxLengthBehaviorPropType): void {\n\t\tvalidateMaxLengthBehavior(this.component, value);\n\t}\n\n\tpublic validateVariant(value?: PasswordVariantPropType): void {\n\t\tvalidatePasswordVariant(this.component, value);\n\t}\n\n\tpublic validateMaxLength(value?: number): void {\n\t\tvalidateMaxLength(this.component, value, {\n\t\t\thooks: { afterPatch: this.afterSyncCharCounter },\n\t\t});\n\t}\n\n\tpublic validatePattern(value?: string): void {\n\t\tvalidatePattern(this.component, value);\n\t}\n\n\tpublic validatePlaceholder(value?: PlaceholderPropType): void {\n\t\tvalidatePlaceholder(this.component, value);\n\t}\n\n\tpublic validateReadOnly(value?: ReadOnlyPropType): void {\n\t\tvalidateReadOnly(this.component, value);\n\t}\n\n\tpublic validateRequired(value?: RequiredPropType): void {\n\t\tvalidateRequired(this.component, value);\n\t}\n\n\tpublic validateValue(value?: string): void {\n\t\twatchString(this.component, '_value', value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: this.afterSyncCharCounter,\n\t\t\t},\n\t\t});\n\n\t\tthis.setFormAssociatedValue(this.component.state._value as string);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateAutoComplete(this.component._autoComplete);\n\t\tthis.validateHasCounter(this.component._hasCounter);\n\t\tthis.validateMaxLengthBehavior(this.component._maxLengthBehavior);\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.validateValue(this.component._value);\n\t\tthis.validateVariant(this.component._variant);\n\t}\n}\n"],"names":["watchString","watchValidator","InputIconController","validateAutoComplete","validateHasCounter","validateMaxLengthBehavior","validateMaxLength","validatePlaceholder","validateReadOnly","validateRequired"],"mappings":";;;;;;;;;;;;;AAaO,MAAM,eAAe,GAAG,CAAC,SAAoC,EAAE,KAAuB,EAAE,OAAA,GAA8B,EAAE,KAAU;IACxIA,kBAAW,CAAC,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,CAAC;AACnD,CAAC;;ACX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S,CAAC,UAAU,CAAC;QACjD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC;QAC7C,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC;QACrD,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC;QAC/C,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC;QAC/C,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;QACzC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC;;AAE9C;;;;"}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- "use strict";var componentNames=require("./component-names-D7MwtuB7.js"),common=require("./common-Cd2qH809.js");const searchFormElement=e=>{for(common.getExperimentalMode()&&(common.devHint("↓ Search form element start."),common.Log.debug(e));e instanceof HTMLElement&&"FORM"!==e.tagName&&e.tagName!==componentNames.KolFormTag.toUpperCase();){try{e=e.parentElement instanceof HTMLElement?e.parentElement:e.parentNode instanceof ShadowRoot?e.parentNode.host:null}catch(e){}common.getExperimentalMode()&&(common.Log.debug(e),common.devHint("↑ Search form element finished."))}return e},propagateResetEventToForm=(e={})=>{var o,t;const n=searchFormElement(e.form);if(n instanceof HTMLElement){const e=new Event("reset",{bubbles:!0,cancelable:!0});if("FORM"===n.tagName)common.setEventTarget(e,n),n.dispatchEvent(e);else if(n.tagName===componentNames.KolFormTag.toUpperCase()){common.setEventTarget(e,common.KoliBriDevHelper.querySelector("form",n));const m=n;"function"==typeof(null===(o=m._on)||void 0===o?void 0:o.onReset)&&(null===(t=m._on)||void 0===t||t.onReset(e))}}},propagateSubmitEventToForm=(e={})=>{const o=searchFormElement(e.form);if(o instanceof HTMLElement){const e=new SubmitEvent("submit",{bubbles:!0,cancelable:!0,submitter:o});if("FORM"===o.tagName)common.getExperimentalMode()&&!1===o.noValidate&&common.devHint("If you have not focusable or hidden form fields in your form, you should enable noValidate for your form.",{force:!0}),setTimeout(()=>{"function"==typeof o.requestSubmit?o.requestSubmit():(common.setEventTarget(e,o),o.dispatchEvent(e))});else if(o.tagName===componentNames.KolFormTag.toUpperCase()){common.setEventTarget(e,common.KoliBriDevHelper.querySelector("form",o));const t=o;setTimeout(()=>{var o,n;"function"==typeof(null===(o=t._on)||void 0===o?void 0:o.onSubmit)&&(null===(n=t._on)||void 0===n||n.onSubmit(e))})}}};exports.propagateResetEventToForm=propagateResetEventToForm,exports.propagateSubmitEventToForm=propagateSubmitEventToForm;
4
+ "use strict";var componentNames=require("./component-names-CuI-0Pbo.js"),common=require("./common-Cd2qH809.js");const searchFormElement=e=>{for(common.getExperimentalMode()&&(common.devHint("↓ Search form element start."),common.Log.debug(e));e instanceof HTMLElement&&"FORM"!==e.tagName&&e.tagName!==componentNames.KolFormTag.toUpperCase();){try{e=e.parentElement instanceof HTMLElement?e.parentElement:e.parentNode instanceof ShadowRoot?e.parentNode.host:null}catch(e){}common.getExperimentalMode()&&(common.Log.debug(e),common.devHint("↑ Search form element finished."))}return e},propagateResetEventToForm=(e={})=>{var o,t;const n=searchFormElement(e.form);if(n instanceof HTMLElement){const e=new Event("reset",{bubbles:!0,cancelable:!0});if("FORM"===n.tagName)common.setEventTarget(e,n),n.dispatchEvent(e);else if(n.tagName===componentNames.KolFormTag.toUpperCase()){common.setEventTarget(e,common.KoliBriDevHelper.querySelector("form",n));const m=n;"function"==typeof(null===(o=m._on)||void 0===o?void 0:o.onReset)&&(null===(t=m._on)||void 0===t||t.onReset(e))}}},propagateSubmitEventToForm=(e={})=>{const o=searchFormElement(e.form);if(o instanceof HTMLElement){const e=new SubmitEvent("submit",{bubbles:!0,cancelable:!0,submitter:o});if("FORM"===o.tagName)common.getExperimentalMode()&&!1===o.noValidate&&common.devHint("If you have not focusable or hidden form fields in your form, you should enable noValidate for your form.",{force:!0}),setTimeout(()=>{"function"==typeof o.requestSubmit?o.requestSubmit():(common.setEventTarget(e,o),o.dispatchEvent(e))});else if(o.tagName===componentNames.KolFormTag.toUpperCase()){common.setEventTarget(e,common.KoliBriDevHelper.querySelector("form",o));const t=o;setTimeout(()=>{var o,n;"function"==typeof(null===(o=t._on)||void 0===o?void 0:o.onSubmit)&&(null===(n=t._on)||void 0===n||n.onSubmit(e))})}}};exports.propagateResetEventToForm=propagateResetEventToForm,exports.propagateSubmitEventToForm=propagateSubmitEventToForm;
@@ -1 +1 @@
1
- {"version":3,"file":"controller-BLXRNmNA.js","sources":["src/components/form/controller.ts"],"sourcesContent":["import { KolFormTag } from '../../core/component-names';\nimport type { FormProps } from '../../schema';\nimport { devHint, getExperimentalMode, KoliBriDevHelper, Log, setEventTarget } from '../../schema';\n\nconst searchFormElement = (el?: HTMLElement | ParentNode | null): HTMLElement | ParentNode | null | undefined => {\n\tif (getExperimentalMode()) {\n\t\tdevHint(`↓ Search form element start.`);\n\t\tLog.debug(el);\n\t}\n\twhile (el instanceof HTMLElement && el.tagName !== 'FORM' && el.tagName !== KolFormTag.toUpperCase()) {\n\t\ttry {\n\t\t\tif (el.parentElement instanceof HTMLElement) {\n\t\t\t\tel = el.parentElement;\n\t\t\t} else if (el.parentNode instanceof ShadowRoot) {\n\t\t\t\tel = el.parentNode.host;\n\t\t\t} else {\n\t\t\t\tel = null;\n\t\t\t}\n\t\t} catch (error) {\n\t\t\t/**\n\t\t\t * Try is needed for SSR.\n\t\t\t * - no HTMLElement is available\n\t\t\t * - no ShadowRoot is available\n\t\t\t */\n\t\t}\n\t\tif (getExperimentalMode()) {\n\t\t\tLog.debug(el);\n\t\t\tdevHint(`↑ Search form element finished.`);\n\t\t}\n\t}\n\treturn el;\n};\n\nexport const propagateResetEventToForm = (\n\toptions: {\n\t\tform?: HTMLElement | ParentNode | null;\n\t\tref?: HTMLElement;\n\t} = {},\n): void => {\n\tconst form = searchFormElement(options.form);\n\tif (form instanceof HTMLElement) {\n\t\tconst event = new Event('reset', {\n\t\t\tbubbles: true,\n\t\t\tcancelable: true,\n\t\t});\n\t\tif (form.tagName === 'FORM') {\n\t\t\tsetEventTarget(event, form);\n\t\t\tform.dispatchEvent(event);\n\t\t} else if (form.tagName === KolFormTag.toUpperCase()) {\n\t\t\tsetEventTarget(event, KoliBriDevHelper.querySelector('form', form) as HTMLFormElement);\n\t\t\tconst kolForm = form as FormProps;\n\t\t\tif (typeof kolForm._on?.onReset === 'function') {\n\t\t\t\ttypeof kolForm._on?.onReset(event);\n\t\t\t}\n\t\t}\n\t}\n};\n\nexport const propagateSubmitEventToForm = (\n\toptions: {\n\t\tform?: HTMLElement | ParentNode | null;\n\t\tref?: HTMLElement;\n\t} = {},\n): void => {\n\tconst form = searchFormElement(options.form);\n\tif (form instanceof HTMLElement) {\n\t\tconst event = new SubmitEvent('submit', {\n\t\t\tbubbles: true,\n\t\t\tcancelable: true,\n\t\t\tsubmitter: form,\n\t\t});\n\t\t/**\n\t\t * TODO: Wenn Formular-Action (nicht Ajax oder JS) verwendet wird,\n\t\t * dann müssen wir das Event an das HTMLFormElement innerhalb\n\t\t * der HTMLKolFormElements propagieren, wenn kein onSubmit\n\t\t * gesetzt wurde.\n\t\t *\n\t\t * TODO: Form-associated custom elements:\n\t\t * - https://web.dev/more-capable-form-controls/\n\t\t * - https://github.com/public-ui/kolibri/issues/946\n\t\t */\n\t\tif (form.tagName === 'FORM') {\n\t\t\tif (getExperimentalMode() && (form as HTMLFormElement).noValidate === false) {\n\t\t\t\tdevHint(`If you have not focusable or hidden form fields in your form, you should enable noValidate for your form.`, {\n\t\t\t\t\tforce: true,\n\t\t\t\t});\n\t\t\t\t// (form as HTMLFormElement).noValidate = true; do not make this implicit\n\t\t\t}\n\t\t\t// Use setTimeout to ensure onChange has been called first\n\t\t\tsetTimeout(() => {\n\t\t\t\t// See https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/requestSubmit\n\t\t\t\tif (typeof (form as HTMLFormElement).requestSubmit === 'function') {\n\t\t\t\t\t(form as HTMLFormElement).requestSubmit();\n\t\t\t\t} else {\n\t\t\t\t\tsetEventTarget(event, form);\n\t\t\t\t\tform.dispatchEvent(event);\n\t\t\t\t}\n\t\t\t});\n\t\t} else if (form.tagName === KolFormTag.toUpperCase()) {\n\t\t\tsetEventTarget(event, KoliBriDevHelper.querySelector('form', form) as HTMLFormElement);\n\t\t\tconst kolForm = form as FormProps;\n\t\t\t// Use setTimeout to ensure onChange has been called first\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (typeof kolForm._on?.onSubmit === 'function') {\n\t\t\t\t\tkolForm._on?.onSubmit(event);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n};\n"],"names":["getExperimentalMode","devHint","Log","KolFormTag","setEventTarget","KoliBriDevHelper"],"mappings":";;;;;;;;AAIA,MAAM,iBAAiB,GAAG,CAAC,EAAoC,KAAiD;IAC/G,IAAIA,0BAAmB,EAAE,EAAE;QAC1BC,cAAO,CAAC,CAA8B,4BAAA,CAAA,CAAC;AACvC,QAAAC,UAAG,CAAC,KAAK,CAAC,EAAE,CAAC;;AAEd,IAAA,OAAO,EAAE,YAAY,WAAW,IAAI,EAAE,CAAC,OAAO,KAAK,MAAM,IAAI,EAAE,CAAC,OAAO,KAAKC,yBAAU,CAAC,WAAW,EAAE,EAAE;AACrG,QAAA,IAAI;AACH,YAAA,IAAI,EAAE,CAAC,aAAa,YAAY,WAAW,EAAE;AAC5C,gBAAA,EAAE,GAAG,EAAE,CAAC,aAAa;;AACf,iBAAA,IAAI,EAAE,CAAC,UAAU,YAAY,UAAU,EAAE;AAC/C,gBAAA,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI;;iBACjB;gBACN,EAAE,GAAG,IAAI;;;QAET,OAAO,KAAK,EAAE;;QAOhB,IAAIH,0BAAmB,EAAE,EAAE;AAC1B,YAAAE,UAAG,CAAC,KAAK,CAAC,EAAE,CAAC;YACbD,cAAO,CAAC,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AAQ,EAAE;AACvC,YAAA,OAAO,EAAE,IAAI;AACb,YAAA,UAAU,EAAE,IAAI;AAChB,YAAA,SAAS,EAAE,IAAI;AACf,SAAA,CAAC;AAWF,QAAA,IAAI,IAAI,CAAC,OAAO,KAAK,MAAM,EAAE;YAC5B,IAAIL,0BAAmB,EAAE,IAAK,IAAwB,CAAC,UAAU,KAAK,KAAK,EAAE;gBAC5EC,cAAO,CAAC,2GAA2G,EAAE;AACpH,oBAAA,KAAK,EAAE,IAAI;AACX,iBAAA,CAAC;;YAIH,UAAU,CAAC,MAAK;AAEf,gBAAA,IAAI,OAAQ,IAAwB,CAAC,aAAa,KAAK,UAAU,EAAE;oBACjE,IAAwB,CAAC,aAAa,EAAE;;qBACnC;AACN,oBAAAG,qBAAc,CAAC,KAAK,EAAE,IAAI,CAAC;AAC3B,oBAAA,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC;;AAE3B,aAAC,CAAC;;aACI,IAAI,IAAI,CAAC,OAAO,KAAKD,yBAAU,CAAC,WAAW,EAAE,EAAE;AACrD,YAAAC,qBAAc,CAAC,KAAK,EAAEC,uBAAgB,CAAC,aAAa,CAAC,MAAM,EAAE,IAAI,CAAoB,CAAC;YACtF,MAAM,OAAO,GAAG,IAAiB;YAEjC,UAAU,CAAC,MAAK;;AACf,gBAAA,IAAI,QAAO,CAAA,EAAA,GAAA,OAAO,CAAC,GAAG,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,QAAQ,CAAA,KAAK,UAAU,EAAE;oBAChD,CAAA,EAAA,GAAA,OAAO,CAAC,GAAG,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,QAAQ,CAAC,KAAK,CAAC;;AAE9B,aAAC,CAAC;;;AAGL;;;;;"}
1
+ {"version":3,"file":"controller-Q-LXBPh4.js","sources":["src/components/form/controller.ts"],"sourcesContent":["import { KolFormTag } from '../../core/component-names';\nimport type { FormProps } from '../../schema';\nimport { devHint, getExperimentalMode, KoliBriDevHelper, Log, setEventTarget } from '../../schema';\n\nconst searchFormElement = (el?: HTMLElement | ParentNode | null): HTMLElement | ParentNode | null | undefined => {\n\tif (getExperimentalMode()) {\n\t\tdevHint(`↓ Search form element start.`);\n\t\tLog.debug(el);\n\t}\n\twhile (el instanceof HTMLElement && el.tagName !== 'FORM' && el.tagName !== KolFormTag.toUpperCase()) {\n\t\ttry {\n\t\t\tif (el.parentElement instanceof HTMLElement) {\n\t\t\t\tel = el.parentElement;\n\t\t\t} else if (el.parentNode instanceof ShadowRoot) {\n\t\t\t\tel = el.parentNode.host;\n\t\t\t} else {\n\t\t\t\tel = null;\n\t\t\t}\n\t\t} catch (error) {\n\t\t\t/**\n\t\t\t * Try is needed for SSR.\n\t\t\t * - no HTMLElement is available\n\t\t\t * - no ShadowRoot is available\n\t\t\t */\n\t\t}\n\t\tif (getExperimentalMode()) {\n\t\t\tLog.debug(el);\n\t\t\tdevHint(`↑ Search form element finished.`);\n\t\t}\n\t}\n\treturn el;\n};\n\nexport const propagateResetEventToForm = (\n\toptions: {\n\t\tform?: HTMLElement | ParentNode | null;\n\t\tref?: HTMLElement;\n\t} = {},\n): void => {\n\tconst form = searchFormElement(options.form);\n\tif (form instanceof HTMLElement) {\n\t\tconst event = new Event('reset', {\n\t\t\tbubbles: true,\n\t\t\tcancelable: true,\n\t\t});\n\t\tif (form.tagName === 'FORM') {\n\t\t\tsetEventTarget(event, form);\n\t\t\tform.dispatchEvent(event);\n\t\t} else if (form.tagName === KolFormTag.toUpperCase()) {\n\t\t\tsetEventTarget(event, KoliBriDevHelper.querySelector('form', form) as HTMLFormElement);\n\t\t\tconst kolForm = form as FormProps;\n\t\t\tif (typeof kolForm._on?.onReset === 'function') {\n\t\t\t\ttypeof kolForm._on?.onReset(event);\n\t\t\t}\n\t\t}\n\t}\n};\n\nexport const propagateSubmitEventToForm = (\n\toptions: {\n\t\tform?: HTMLElement | ParentNode | null;\n\t\tref?: HTMLElement;\n\t} = {},\n): void => {\n\tconst form = searchFormElement(options.form);\n\tif (form instanceof HTMLElement) {\n\t\tconst event = new SubmitEvent('submit', {\n\t\t\tbubbles: true,\n\t\t\tcancelable: true,\n\t\t\tsubmitter: form,\n\t\t});\n\t\t/**\n\t\t * TODO: Wenn Formular-Action (nicht Ajax oder JS) verwendet wird,\n\t\t * dann müssen wir das Event an das HTMLFormElement innerhalb\n\t\t * der HTMLKolFormElements propagieren, wenn kein onSubmit\n\t\t * gesetzt wurde.\n\t\t *\n\t\t * TODO: Form-associated custom elements:\n\t\t * - https://web.dev/more-capable-form-controls/\n\t\t * - https://github.com/public-ui/kolibri/issues/946\n\t\t */\n\t\tif (form.tagName === 'FORM') {\n\t\t\tif (getExperimentalMode() && (form as HTMLFormElement).noValidate === false) {\n\t\t\t\tdevHint(`If you have not focusable or hidden form fields in your form, you should enable noValidate for your form.`, {\n\t\t\t\t\tforce: true,\n\t\t\t\t});\n\t\t\t\t// (form as HTMLFormElement).noValidate = true; do not make this implicit\n\t\t\t}\n\t\t\t// Use setTimeout to ensure onChange has been called first\n\t\t\tsetTimeout(() => {\n\t\t\t\t// See https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/requestSubmit\n\t\t\t\tif (typeof (form as HTMLFormElement).requestSubmit === 'function') {\n\t\t\t\t\t(form as HTMLFormElement).requestSubmit();\n\t\t\t\t} else {\n\t\t\t\t\tsetEventTarget(event, form);\n\t\t\t\t\tform.dispatchEvent(event);\n\t\t\t\t}\n\t\t\t});\n\t\t} else if (form.tagName === KolFormTag.toUpperCase()) {\n\t\t\tsetEventTarget(event, KoliBriDevHelper.querySelector('form', form) as HTMLFormElement);\n\t\t\tconst kolForm = form as FormProps;\n\t\t\t// Use setTimeout to ensure onChange has been called first\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (typeof kolForm._on?.onSubmit === 'function') {\n\t\t\t\t\tkolForm._on?.onSubmit(event);\n\t\t\t\t}\n\t\t\t});\n\t\t}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a,EAAE;;qBACnC;AACN,oBAAAG,qBAAc,CAAC,KAAK,EAAE,IAAI,CAAC;AAC3B,oBAAA,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC;;AAE3B,aAAC,CAAC;;aACI,IAAI,IAAI,CAAC,OAAO,KAAKD,yBAAU,CAAC,WAAW,EAAE,EAAE;AACrD,YAAAC,qBAAc,CAAC,KAAK,EAAEC,uBAAgB,CAAC,aAAa,CAAC,MAAM,EAAE,IAAI,CAAoB,CAAC;YACtF,MAAM,OAAO,GAAG,IAAiB;YAEjC,UAAU,CAAC,MAAK;;AACf,gBAAA,IAAI,QAAO,CAAA,EAAA,GAAA,OAAO,CAAC,GAAG,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,QAAQ,CAAA,KAAK,UAAU,EAAE;oBAChD,CAAA,EAAA,GAAA,OAAO,CAAC,GAAG,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,QAAQ,CAAC,KAAK,CAAC;;AAE9B,aAAC,CAAC;;;AAGL;;;;;"}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- "use strict";var index=require("./index-kRyWHjzD.js"),tslib_es6=require("./tslib.es6-7DbU_BSw.js"),componentNames=require("./component-names-D7MwtuB7.js"),Icon=require("./Icon-CofCtTH-.js"),clsx=require("./clsx-CkZlkaek.js"),common=require("./common-Cd2qH809.js"),FormFieldStateWrapper=require("./FormFieldStateWrapper-BqMhvNTP.js"),InternalUnderlinedBadgeText=require("./InternalUnderlinedBadgeText-CgkJS9Re.js"),isObject=require("./isObject-DMA85Fq4.js"),icons=require("./icons-D_PtPRwb.js");const InputAdornment=(n,e)=>{var{position:t="start",class:o}=n,s=tslib_es6.__rest(n,["position","class"]);const i="kol-input-container__adornment",r=`${i}--${t}`;return index.h("div",Object.assign({class:clsx.clsx(i,r,o)},s),e)};function hasItems(n){return!!n&&(Array.isArray(n)?n.length>0:Boolean(n))}const Container=(n,e)=>{var{class:t}=n,o=tslib_es6.__rest(n,["class"]);return index.h("div",Object.assign({class:clsx.clsx("kol-input-container__container",t)},o),e)},KolInputContainerFc=(n,e)=>{const{class:t,startAdornment:o,endAdornment:s,disabled:i,msg:r,touched:c,containerProps:a,startAdornmentProps:l,endAdornmentProps:d}=n,u=tslib_es6.__rest(n,["class","startAdornment","endAdornment","disabled","msg","touched","containerProps","startAdornmentProps","endAdornmentProps"]),p=FormFieldStateWrapper.checkHasMsg(r,c),m="string"==typeof r?"error":null==r?void 0:r._type,b={"kol-input-container--disabled":i,[`kol-input-container--${m||"error"}`]:p},h=Object.assign({class:clsx.clsx("kol-input-container",b,t)},u);return hasItems(o)||hasItems(s)?index.h("div",Object.assign({},h),index.h(InputAdornment,Object.assign({},l,{position:"start"}),o),index.h(Container,Object.assign({},a),e),index.h(InputAdornment,Object.assign({},d,{position:"end"}),s)):index.h("div",Object.assign({},h),index.h(Container,Object.assign({},a),e))},KolButtonFc=n=>{const{label:e,icons:t,hideLabel:o,disabled:s,onClick:i}=n,r=tslib_es6.__rest(n,["label","icons","hideLabel","disabled","onClick"]);return index.h(componentNames.KolButtonWcTag,Object.assign({_label:e,_disabled:s,_icons:t,_hideLabel:o,_on:{onClick:i}},r))},KolIconButtonFc=n=>{const{componentName:e="button",label:t,icon:o,onClick:s}=n,i=tslib_es6.__rest(n,["componentName","label","icon","onClick"]),r="button"===e?KolButtonFc:Icon.KolIconFc;return index.h(r,Object.assign({label:t||"",hideLabel:!0,icons:`${o}`,onClick:s},i))};function getInputContainerProps(n){let e,t;return"_icons"in n&&(e=n._icons),"_smartButton"in n&&(t=n._smartButton),{icons:e,smartButton:t,disabled:n._disabled,msg:n._msg,touched:n._touched}}const InputContainerStateWrapperFc=({state:n,endAdornment:e},t)=>{const{icons:o,smartButton:s,disabled:i,msg:r,touched:c}=getInputContainerProps(n);let a=null==o?void 0:o.left;InternalUnderlinedBadgeText.isString(a)&&(a={icon:a});let l=null==o?void 0:o.right;InternalUnderlinedBadgeText.isString(l)&&(l={icon:l});const d=[],u=[];return e&&(Array.isArray(e)?u.push(...e):u.push(e)),a&&d.push(index.h(KolIconButtonFc,Object.assign({componentName:"icon",class:"kol-input-container__icon"},isObject.isObject(a)?a:{}))),isObject.isObject(s)&&u.push(index.h(KolIconButtonFc,Object.assign({componentName:"button",class:"kol-input-container__smart-button"},s,{hideLabel:!0,disabled:i}))),l&&u.push(index.h(KolIconButtonFc,Object.assign({componentName:"icon",class:"kol-input-container__icon"},isObject.isObject(l)?l:{}))),index.h(KolInputContainerFc,{disabled:i,msg:r,touched:c,startAdornment:d,endAdornment:u},t)};class InputIconController extends FormFieldStateWrapper.InputController{constructor(n,e,t){super(n,e,t),this.numberStringRegex=/^\d+(\.\d+)?$/,this.parseToNumber=n=>"number"==typeof n?isNaN(n)?null:n:this.isNumberString(n)?parseFloat(n):null,this.validateNumber=(n,e)=>common.watchValidator(this.component,n,n=>null==n||"number"==typeof n||"string"==typeof n&&this.numberStringRegex.test(n),new Set(["number","NumberString"]),e,{hooks:{beforePatch:(e,t)=>{(null==t?void 0:t.has(n))&&(null==t||t.set(n,this.parseToNumber(e)))}}}),this.component=n}validateIcons(n){icons.validateIcons(this.component,n)}isNumberString(n){return"string"==typeof n&&this.numberStringRegex.test(n)}componentWillLoad(){super.componentWillLoad(),this.validateIcons(this.component._icons)}}exports.InputContainerStateWrapperFc=InputContainerStateWrapperFc,exports.InputIconController=InputIconController,exports.KolIconButtonFc=KolIconButtonFc;
4
+ "use strict";var index=require("./index-ARr4gpIs.js"),tslib_es6=require("./tslib.es6-7DbU_BSw.js"),componentNames=require("./component-names-CuI-0Pbo.js"),Icon=require("./Icon-DdkyC2xZ.js"),clsx=require("./clsx-CkZlkaek.js"),common=require("./common-Cd2qH809.js"),FormFieldStateWrapper=require("./FormFieldStateWrapper-D0S7W-Oq.js"),InternalUnderlinedBadgeText=require("./InternalUnderlinedBadgeText-DlabTQ94.js"),isObject=require("./isObject-DMA85Fq4.js"),icons=require("./icons-D_PtPRwb.js");const InputAdornment=(n,e)=>{var{position:t="start",class:o}=n,s=tslib_es6.__rest(n,["position","class"]);const i="kol-input-container__adornment",r=`${i}--${t}`;return index.h("div",Object.assign({class:clsx.clsx(i,r,o)},s),e)};function hasItems(n){return!!n&&(Array.isArray(n)?n.length>0:Boolean(n))}const Container=(n,e)=>{var{class:t}=n,o=tslib_es6.__rest(n,["class"]);return index.h("div",Object.assign({class:clsx.clsx("kol-input-container__container",t)},o),e)},KolInputContainerFc=(n,e)=>{const{class:t,startAdornment:o,endAdornment:s,disabled:i,msg:r,touched:c,containerProps:a,startAdornmentProps:l,endAdornmentProps:d}=n,u=tslib_es6.__rest(n,["class","startAdornment","endAdornment","disabled","msg","touched","containerProps","startAdornmentProps","endAdornmentProps"]),p=FormFieldStateWrapper.checkHasMsg(r,c),m="string"==typeof r?"error":null==r?void 0:r._type,b={"kol-input-container--disabled":i,[`kol-input-container--${m||"error"}`]:p},h=Object.assign({class:clsx.clsx("kol-input-container",b,t)},u);return hasItems(o)||hasItems(s)?index.h("div",Object.assign({},h),index.h(InputAdornment,Object.assign({},l,{position:"start"}),o),index.h(Container,Object.assign({},a),e),index.h(InputAdornment,Object.assign({},d,{position:"end"}),s)):index.h("div",Object.assign({},h),index.h(Container,Object.assign({},a),e))},KolButtonFc=n=>{const{label:e,icons:t,hideLabel:o,disabled:s,onClick:i}=n,r=tslib_es6.__rest(n,["label","icons","hideLabel","disabled","onClick"]);return index.h(componentNames.KolButtonWcTag,Object.assign({_label:e,_disabled:s,_icons:t,_hideLabel:o,_on:{onClick:i}},r))},KolIconButtonFc=n=>{const{componentName:e="button",label:t,icon:o,onClick:s}=n,i=tslib_es6.__rest(n,["componentName","label","icon","onClick"]),r="button"===e?KolButtonFc:Icon.KolIconFc;return index.h(r,Object.assign({label:t||"",hideLabel:!0,icons:`${o}`,onClick:s},i))};function getInputContainerProps(n){let e,t;return"_icons"in n&&(e=n._icons),"_smartButton"in n&&(t=n._smartButton),{icons:e,smartButton:t,disabled:n._disabled,msg:n._msg,touched:n._touched}}const InputContainerStateWrapperFc=({state:n,endAdornment:e},t)=>{const{icons:o,smartButton:s,disabled:i,msg:r,touched:c}=getInputContainerProps(n);let a=null==o?void 0:o.left;InternalUnderlinedBadgeText.isString(a)&&(a={icon:a});let l=null==o?void 0:o.right;InternalUnderlinedBadgeText.isString(l)&&(l={icon:l});const d=[],u=[];return e&&(Array.isArray(e)?u.push(...e):u.push(e)),a&&d.push(index.h(KolIconButtonFc,Object.assign({componentName:"icon",class:"kol-input-container__icon"},isObject.isObject(a)?a:{}))),isObject.isObject(s)&&u.push(index.h(KolIconButtonFc,Object.assign({componentName:"button",class:"kol-input-container__smart-button"},s,{hideLabel:!0,disabled:i}))),l&&u.push(index.h(KolIconButtonFc,Object.assign({componentName:"icon",class:"kol-input-container__icon"},isObject.isObject(l)?l:{}))),index.h(KolInputContainerFc,{disabled:i,msg:r,touched:c,startAdornment:d,endAdornment:u},t)};class InputIconController extends FormFieldStateWrapper.InputController{constructor(n,e,t){super(n,e,t),this.numberStringRegex=/^\d+(\.\d+)?$/,this.parseToNumber=n=>"number"==typeof n?isNaN(n)?null:n:this.isNumberString(n)?parseFloat(n):null,this.validateNumber=(n,e)=>common.watchValidator(this.component,n,n=>null==n||"number"==typeof n||"string"==typeof n&&this.numberStringRegex.test(n),new Set(["number","NumberString"]),e,{hooks:{beforePatch:(e,t)=>{(null==t?void 0:t.has(n))&&(null==t||t.set(n,this.parseToNumber(e)))}}}),this.component=n}validateIcons(n){icons.validateIcons(this.component,n)}isNumberString(n){return"string"==typeof n&&this.numberStringRegex.test(n)}componentWillLoad(){super.componentWillLoad(),this.validateIcons(this.component._icons)}}exports.InputContainerStateWrapperFc=InputContainerStateWrapperFc,exports.InputIconController=InputIconController,exports.KolIconButtonFc=KolIconButtonFc;