@public-ui/components 3.0.4 → 3.0.5-rc.0

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 (350) hide show
  1. package/custom-elements.json +1 -1
  2. package/dist/cjs/{Alert-cn2Kv0FC.js → Alert-C3vof8gc.js} +1 -1
  3. package/dist/cjs/{Alert-cn2Kv0FC.js.map → Alert-C3vof8gc.js.map} +1 -1
  4. package/dist/cjs/{Collapsible-D6Rx6EuQ.js → Collapsible-BwQQh0mz.js} +1 -1
  5. package/dist/cjs/{Collapsible-D6Rx6EuQ.js.map → Collapsible-BwQQh0mz.js.map} +1 -1
  6. package/dist/cjs/{CustomSuggestionsToggle-c31ciioQ.js → CustomSuggestionsToggle-B-bTmnBQ.js} +1 -1
  7. package/dist/cjs/{CustomSuggestionsToggle-c31ciioQ.js.map → CustomSuggestionsToggle-B-bTmnBQ.js.map} +1 -1
  8. package/dist/cjs/{FieldControlStateWrapper-Dvxn9pqq.js → FieldControlStateWrapper-Cmlj42uN.js} +1 -1
  9. package/dist/cjs/{FieldControlStateWrapper-Dvxn9pqq.js.map → FieldControlStateWrapper-Cmlj42uN.js.map} +1 -1
  10. package/dist/cjs/{FormFieldStateWrapper-BpKPX_8A.js → FormFieldStateWrapper-B3KooWZ3.js} +1 -1
  11. package/dist/cjs/{FormFieldStateWrapper-BpKPX_8A.js.map → FormFieldStateWrapper-B3KooWZ3.js.map} +1 -1
  12. package/dist/cjs/{Heading-CtmpC6WX.js → Heading-BXbctWBt.js} +1 -1
  13. package/dist/{esm/Heading-K34kz2yJ.js.map → cjs/Heading-BXbctWBt.js.map} +1 -1
  14. package/dist/cjs/{Icon-D3jAAEmG.js → Icon-ttrOpSx4.js} +1 -1
  15. package/dist/cjs/{Icon-D3jAAEmG.js.map → Icon-ttrOpSx4.js.map} +1 -1
  16. package/dist/cjs/{Input-CGtUCWlW.js → Input-jk9vBtZy.js} +1 -1
  17. package/dist/cjs/{Input-CGtUCWlW.js.map → Input-jk9vBtZy.js.map} +1 -1
  18. package/dist/cjs/{InputStateWrapper-GOIpzL9H.js → InputStateWrapper-BUpZkpZ4.js} +1 -1
  19. package/dist/cjs/{InputStateWrapper-GOIpzL9H.js.map → InputStateWrapper-BUpZkpZ4.js.map} +1 -1
  20. package/dist/cjs/{InternalUnderlinedBadgeText-CXiVmsfF.js → InternalUnderlinedBadgeText-B9JCUpQ0.js} +1 -1
  21. package/dist/cjs/{InternalUnderlinedBadgeText-CXiVmsfF.js.map → InternalUnderlinedBadgeText-B9JCUpQ0.js.map} +1 -1
  22. package/dist/cjs/{Span-SEBNg7Ys.js → Span-B82DoaCk.js} +1 -1
  23. package/dist/cjs/{Span-SEBNg7Ys.js.map → Span-B82DoaCk.js.map} +1 -1
  24. package/dist/cjs/{app-globals-pBuoPDZL.js → app-globals-BBL5j1Pg.js} +1 -1
  25. package/dist/cjs/{app-globals-pBuoPDZL.js.map → app-globals-BBL5j1Pg.js.map} +1 -1
  26. package/dist/cjs/{associated.controller-DliVZLxU.js → associated.controller-DCjDhSZx.js} +1 -1
  27. package/dist/cjs/{associated.controller-DliVZLxU.js.map → associated.controller-DCjDhSZx.js.map} +1 -1
  28. package/dist/cjs/bootstrap-CtGLo8kW.js +4 -0
  29. package/dist/cjs/bootstrap-CtGLo8kW.js.map +1 -0
  30. package/dist/cjs/{controller-CWp-nBmW.js → controller-Ck-2hdGT.js} +1 -1
  31. package/dist/cjs/{controller-CWp-nBmW.js.map → controller-Ck-2hdGT.js.map} +1 -1
  32. package/dist/cjs/{controller-V4SgR2qi.js → controller-CspoQhj4.js} +1 -1
  33. package/dist/cjs/{controller-V4SgR2qi.js.map → controller-CspoQhj4.js.map} +1 -1
  34. package/dist/cjs/{controller-onlXPSoa.js → controller-VVml6XNp.js} +1 -1
  35. package/dist/cjs/{controller-onlXPSoa.js.map → controller-VVml6XNp.js.map} +1 -1
  36. package/dist/cjs/{controller-icon-DLwh9hYY.js → controller-icon-5A-2C49Q.js} +1 -1
  37. package/dist/cjs/{controller-icon-DLwh9hYY.js.map → controller-icon-5A-2C49Q.js.map} +1 -1
  38. package/dist/cjs/{dev.utils-DXEgSGmp.js → dev.utils-BmcUr5ps.js} +1 -1
  39. package/dist/cjs/{dev.utils-DXEgSGmp.js.map → dev.utils-BmcUr5ps.js.map} +1 -1
  40. package/dist/cjs/{devtools-z-oG8s9h.js → devtools-D1oXS0lZ.js} +1 -1
  41. package/dist/cjs/{devtools-z-oG8s9h.js.map → devtools-D1oXS0lZ.js.map} +1 -1
  42. package/dist/cjs/index-DZ4EBybr.js +4 -0
  43. package/dist/cjs/index-DZ4EBybr.js.map +1 -0
  44. package/dist/cjs/index.cjs.js +1 -1
  45. package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
  46. package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
  47. package/dist/cjs/kol-alert-wc.cjs.entry.js +1 -1
  48. package/dist/cjs/kol-alert.cjs.entry.js +1 -1
  49. package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
  50. package/dist/cjs/kol-avatar.cjs.entry.js +1 -1
  51. package/dist/cjs/kol-badge.cjs.entry.js +1 -1
  52. package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
  53. package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
  54. package/dist/cjs/kol-button-wc.cjs.entry.js +1 -1
  55. package/dist/cjs/kol-button.cjs.entry.js +1 -1
  56. package/dist/cjs/kol-card-wc.cjs.entry.js +1 -1
  57. package/dist/cjs/kol-card.cjs.entry.js +1 -1
  58. package/dist/cjs/kol-combobox.cjs.entry.js +1 -1
  59. package/dist/cjs/kol-details.cjs.entry.js +1 -1
  60. package/dist/cjs/kol-drawer.cjs.entry.js +1 -1
  61. package/dist/cjs/kol-form.cjs.entry.js +1 -1
  62. package/dist/cjs/kol-heading.cjs.entry.js +1 -1
  63. package/dist/cjs/kol-icon.cjs.entry.js +1 -1
  64. package/dist/cjs/kol-image.cjs.entry.js +1 -1
  65. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  66. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  67. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  68. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  69. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  70. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  71. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  72. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  73. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  74. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  75. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  76. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  77. package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
  78. package/dist/cjs/kol-link.cjs.entry.js +1 -1
  79. package/dist/cjs/kol-modal.cjs.entry.js +1 -1
  80. package/dist/cjs/kol-nav.cjs.entry.js +1 -1
  81. package/dist/cjs/kol-pagination-wc.cjs.entry.js +1 -1
  82. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  83. package/dist/cjs/kol-popover-button-wc.cjs.entry.js +1 -1
  84. package/dist/cjs/kol-popover-button.cjs.entry.js +1 -1
  85. package/dist/cjs/kol-popover-wc.cjs.entry.js +1 -1
  86. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  87. package/dist/cjs/kol-quote.cjs.entry.js +1 -1
  88. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  89. package/dist/cjs/kol-single-select.cjs.entry.js +1 -1
  90. package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
  91. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  92. package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
  93. package/dist/cjs/kol-table-settings-wc.cjs.entry.js +1 -1
  94. package/dist/cjs/kol-table-stateful.cjs.entry.js +1 -1
  95. package/dist/cjs/kol-table-stateless-wc.cjs.entry.js +1 -1
  96. package/dist/cjs/kol-table-stateless.cjs.entry.js +1 -1
  97. package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
  98. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  99. package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
  100. package/dist/cjs/kol-toolbar.cjs.entry.js +1 -1
  101. package/dist/cjs/kol-tooltip-wc.cjs.entry.js +1 -1
  102. package/dist/cjs/kol-tree-item-wc.cjs.entry.js +1 -1
  103. package/dist/cjs/kol-tree-item.cjs.entry.js +1 -1
  104. package/dist/cjs/kol-tree-wc.cjs.entry.js +1 -1
  105. package/dist/cjs/kol-tree.cjs.entry.js +1 -1
  106. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  107. package/dist/cjs/kolibri.cjs.js +1 -1
  108. package/dist/cjs/loader.cjs.js +1 -1
  109. package/dist/cjs/test-component.cjs.entry.js +1 -1
  110. package/dist/components/Heading.js.map +1 -1
  111. package/dist/components/bootstrap.js +1 -1
  112. package/dist/components/bootstrap.js.map +1 -1
  113. package/dist/esm/{Alert-BD7M6uRz.js → Alert-C9KodDn-.js} +1 -1
  114. package/dist/{kolibri/Alert-BD7M6uRz.js.map → esm/Alert-C9KodDn-.js.map} +1 -1
  115. package/dist/esm/{Collapsible-Cm151Fs4.js → Collapsible-DFegUHMu.js} +1 -1
  116. package/dist/esm/{Collapsible-Cm151Fs4.js.map → Collapsible-DFegUHMu.js.map} +1 -1
  117. package/dist/esm/{CustomSuggestionsToggle-C-nYEmvT.js → CustomSuggestionsToggle-YLF12END.js} +1 -1
  118. package/dist/{kolibri/CustomSuggestionsToggle-C-nYEmvT.js.map → esm/CustomSuggestionsToggle-YLF12END.js.map} +1 -1
  119. package/dist/esm/{FieldControlStateWrapper-C1_urHeO.js → FieldControlStateWrapper-DlhKEQYv.js} +1 -1
  120. package/dist/{kolibri/FieldControlStateWrapper-C1_urHeO.js.map → esm/FieldControlStateWrapper-DlhKEQYv.js.map} +1 -1
  121. package/dist/esm/{FormFieldStateWrapper-C90koSDb.js → FormFieldStateWrapper-CGvaBC47.js} +1 -1
  122. package/dist/{kolibri/FormFieldStateWrapper-C90koSDb.js.map → esm/FormFieldStateWrapper-CGvaBC47.js.map} +1 -1
  123. package/dist/esm/{Heading-K34kz2yJ.js → Heading-BPYmDTUk.js} +1 -1
  124. package/dist/{cjs/Heading-CtmpC6WX.js.map → esm/Heading-BPYmDTUk.js.map} +1 -1
  125. package/dist/esm/Icon-CPJLro7v.js +4 -0
  126. package/dist/esm/{Icon-FjmG-C5E.js.map → Icon-CPJLro7v.js.map} +1 -1
  127. package/dist/esm/Input-DjC4bpJ5.js +4 -0
  128. package/dist/{kolibri/Input-B3EAo7Zn.js.map → esm/Input-DjC4bpJ5.js.map} +1 -1
  129. package/dist/esm/{InputStateWrapper-C5Wdo05z.js → InputStateWrapper-C2VyGe6a.js} +1 -1
  130. package/dist/esm/{InputStateWrapper-C5Wdo05z.js.map → InputStateWrapper-C2VyGe6a.js.map} +1 -1
  131. package/dist/esm/InternalUnderlinedBadgeText-Cx9AyLre.js +4 -0
  132. package/dist/esm/{InternalUnderlinedBadgeText-9Tu8seHa.js.map → InternalUnderlinedBadgeText-Cx9AyLre.js.map} +1 -1
  133. package/dist/esm/{Span-BlZWELRP.js → Span-BebyS5Q1.js} +1 -1
  134. package/dist/esm/{Span-BlZWELRP.js.map → Span-BebyS5Q1.js.map} +1 -1
  135. package/dist/esm/{app-globals-h0jVpMUb.js → app-globals-CESfn_CS.js} +1 -1
  136. package/dist/esm/{app-globals-h0jVpMUb.js.map → app-globals-CESfn_CS.js.map} +1 -1
  137. package/dist/esm/{associated.controller-BBBKf7S0.js → associated.controller-BVXWSO2G.js} +1 -1
  138. package/dist/esm/{associated.controller-BBBKf7S0.js.map → associated.controller-BVXWSO2G.js.map} +1 -1
  139. package/dist/esm/bootstrap-YDZ8Qb_h.js +4 -0
  140. package/dist/esm/bootstrap-YDZ8Qb_h.js.map +1 -0
  141. package/dist/esm/{controller-BshDxmnY.js → controller-BhAbvioO.js} +1 -1
  142. package/dist/esm/{controller-BshDxmnY.js.map → controller-BhAbvioO.js.map} +1 -1
  143. package/dist/esm/{controller-czapbbAQ.js → controller-DOh6Y7if.js} +1 -1
  144. package/dist/esm/{controller-czapbbAQ.js.map → controller-DOh6Y7if.js.map} +1 -1
  145. package/dist/esm/{controller-vMa681y9.js → controller-DR6tEetQ.js} +1 -1
  146. package/dist/esm/{controller-vMa681y9.js.map → controller-DR6tEetQ.js.map} +1 -1
  147. package/dist/esm/{controller-icon-DB58M2Dn.js → controller-icon-Dak8u7ck.js} +1 -1
  148. package/dist/{kolibri/controller-icon-DB58M2Dn.js.map → esm/controller-icon-Dak8u7ck.js.map} +1 -1
  149. package/dist/esm/{dev.utils-B8InC9wC.js → dev.utils-CMSYtmAz.js} +1 -1
  150. package/dist/esm/{dev.utils-B8InC9wC.js.map → dev.utils-CMSYtmAz.js.map} +1 -1
  151. package/dist/esm/{devtools-D2tZX5IH.js → devtools-CDwLKwYR.js} +1 -1
  152. package/dist/esm/{devtools-D2tZX5IH.js.map → devtools-CDwLKwYR.js.map} +1 -1
  153. package/dist/esm/index-BRWth_lT.js +4 -0
  154. package/dist/esm/index-BRWth_lT.js.map +1 -0
  155. package/dist/esm/index.js +1 -1
  156. package/dist/esm/kol-abbr.entry.js +1 -1
  157. package/dist/esm/kol-accordion.entry.js +1 -1
  158. package/dist/esm/kol-alert-wc.entry.js +1 -1
  159. package/dist/esm/kol-alert.entry.js +1 -1
  160. package/dist/esm/kol-avatar-wc.entry.js +1 -1
  161. package/dist/esm/kol-avatar.entry.js +1 -1
  162. package/dist/esm/kol-badge.entry.js +1 -1
  163. package/dist/esm/kol-breadcrumb.entry.js +1 -1
  164. package/dist/esm/kol-button-link.entry.js +1 -1
  165. package/dist/esm/kol-button-wc.entry.js +1 -1
  166. package/dist/esm/kol-button.entry.js +1 -1
  167. package/dist/esm/kol-card-wc.entry.js +1 -1
  168. package/dist/esm/kol-card.entry.js +1 -1
  169. package/dist/esm/kol-combobox.entry.js +1 -1
  170. package/dist/esm/kol-details.entry.js +1 -1
  171. package/dist/esm/kol-drawer.entry.js +1 -1
  172. package/dist/esm/kol-form.entry.js +1 -1
  173. package/dist/esm/kol-heading.entry.js +1 -1
  174. package/dist/esm/kol-icon.entry.js +1 -1
  175. package/dist/esm/kol-image.entry.js +1 -1
  176. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  177. package/dist/esm/kol-input-color.entry.js +1 -1
  178. package/dist/esm/kol-input-date.entry.js +1 -1
  179. package/dist/esm/kol-input-email.entry.js +1 -1
  180. package/dist/esm/kol-input-file.entry.js +1 -1
  181. package/dist/esm/kol-input-number.entry.js +1 -1
  182. package/dist/esm/kol-input-password.entry.js +1 -1
  183. package/dist/esm/kol-input-radio.entry.js +1 -1
  184. package/dist/esm/kol-input-range.entry.js +1 -1
  185. package/dist/esm/kol-input-text.entry.js +1 -1
  186. package/dist/esm/kol-kolibri.entry.js +1 -1
  187. package/dist/esm/kol-link-button.entry.js +1 -1
  188. package/dist/esm/kol-link-wc.entry.js +1 -1
  189. package/dist/esm/kol-link.entry.js +1 -1
  190. package/dist/esm/kol-modal.entry.js +1 -1
  191. package/dist/esm/kol-nav.entry.js +1 -1
  192. package/dist/esm/kol-pagination-wc.entry.js +1 -1
  193. package/dist/esm/kol-pagination.entry.js +1 -1
  194. package/dist/esm/kol-popover-button-wc.entry.js +1 -1
  195. package/dist/esm/kol-popover-button.entry.js +1 -1
  196. package/dist/esm/kol-popover-wc.entry.js +1 -1
  197. package/dist/esm/kol-progress.entry.js +1 -1
  198. package/dist/esm/kol-quote.entry.js +1 -1
  199. package/dist/esm/kol-select.entry.js +1 -1
  200. package/dist/esm/kol-single-select.entry.js +1 -1
  201. package/dist/esm/kol-skip-nav.entry.js +1 -1
  202. package/dist/esm/kol-spin.entry.js +1 -1
  203. package/dist/esm/kol-split-button.entry.js +1 -1
  204. package/dist/esm/kol-table-settings-wc.entry.js +1 -1
  205. package/dist/esm/kol-table-stateful.entry.js +1 -1
  206. package/dist/esm/kol-table-stateless-wc.entry.js +1 -1
  207. package/dist/esm/kol-table-stateless.entry.js +1 -1
  208. package/dist/esm/kol-tabs.entry.js +1 -1
  209. package/dist/esm/kol-textarea.entry.js +1 -1
  210. package/dist/esm/kol-toast-container.entry.js +1 -1
  211. package/dist/esm/kol-toolbar.entry.js +1 -1
  212. package/dist/esm/kol-tooltip-wc.entry.js +1 -1
  213. package/dist/esm/kol-tree-item-wc.entry.js +1 -1
  214. package/dist/esm/kol-tree-item.entry.js +1 -1
  215. package/dist/esm/kol-tree-wc.entry.js +1 -1
  216. package/dist/esm/kol-tree.entry.js +1 -1
  217. package/dist/esm/kol-version.entry.js +1 -1
  218. package/dist/esm/kolibri.js +1 -1
  219. package/dist/esm/loader.js +1 -1
  220. package/dist/esm/test-component.entry.js +1 -1
  221. package/dist/kolibri/{Alert-BD7M6uRz.js → Alert-C9KodDn-.js} +1 -1
  222. package/dist/{esm/Alert-BD7M6uRz.js.map → kolibri/Alert-C9KodDn-.js.map} +1 -1
  223. package/dist/kolibri/Collapsible-DFegUHMu.js +4 -0
  224. package/dist/kolibri/{Collapsible-Cm151Fs4.js.map → Collapsible-DFegUHMu.js.map} +1 -1
  225. package/dist/kolibri/{CustomSuggestionsToggle-C-nYEmvT.js → CustomSuggestionsToggle-YLF12END.js} +1 -1
  226. package/dist/{esm/CustomSuggestionsToggle-C-nYEmvT.js.map → kolibri/CustomSuggestionsToggle-YLF12END.js.map} +1 -1
  227. package/dist/kolibri/FieldControlStateWrapper-DlhKEQYv.js +4 -0
  228. package/dist/{esm/FieldControlStateWrapper-C1_urHeO.js.map → kolibri/FieldControlStateWrapper-DlhKEQYv.js.map} +1 -1
  229. package/dist/kolibri/{FormFieldStateWrapper-C90koSDb.js → FormFieldStateWrapper-CGvaBC47.js} +1 -1
  230. package/dist/{esm/FormFieldStateWrapper-C90koSDb.js.map → kolibri/FormFieldStateWrapper-CGvaBC47.js.map} +1 -1
  231. package/dist/kolibri/{Heading-K34kz2yJ.js → Heading-BPYmDTUk.js} +1 -1
  232. package/dist/kolibri/{Heading-K34kz2yJ.js.map → Heading-BPYmDTUk.js.map} +1 -1
  233. package/dist/kolibri/Icon-CPJLro7v.js +4 -0
  234. package/dist/kolibri/{Icon-FjmG-C5E.js.map → Icon-CPJLro7v.js.map} +1 -1
  235. package/dist/kolibri/Input-DjC4bpJ5.js +4 -0
  236. package/dist/{esm/Input-B3EAo7Zn.js.map → kolibri/Input-DjC4bpJ5.js.map} +1 -1
  237. package/dist/kolibri/{InputStateWrapper-C5Wdo05z.js → InputStateWrapper-C2VyGe6a.js} +1 -1
  238. package/dist/kolibri/{InputStateWrapper-C5Wdo05z.js.map → InputStateWrapper-C2VyGe6a.js.map} +1 -1
  239. package/dist/kolibri/InternalUnderlinedBadgeText-Cx9AyLre.js +4 -0
  240. package/dist/kolibri/{InternalUnderlinedBadgeText-9Tu8seHa.js.map → InternalUnderlinedBadgeText-Cx9AyLre.js.map} +1 -1
  241. package/dist/kolibri/Span-BebyS5Q1.js +4 -0
  242. package/dist/kolibri/{Span-BlZWELRP.js.map → Span-BebyS5Q1.js.map} +1 -1
  243. package/dist/kolibri/{app-globals-h0jVpMUb.js → app-globals-CESfn_CS.js} +1 -1
  244. package/dist/kolibri/{app-globals-h0jVpMUb.js.map → app-globals-CESfn_CS.js.map} +1 -1
  245. package/dist/kolibri/{associated.controller-BBBKf7S0.js → associated.controller-BVXWSO2G.js} +1 -1
  246. package/dist/kolibri/{associated.controller-BBBKf7S0.js.map → associated.controller-BVXWSO2G.js.map} +1 -1
  247. package/dist/kolibri/bootstrap-YDZ8Qb_h.js +4 -0
  248. package/dist/kolibri/bootstrap-YDZ8Qb_h.js.map +1 -0
  249. package/dist/kolibri/{controller-BshDxmnY.js → controller-BhAbvioO.js} +1 -1
  250. package/dist/kolibri/{controller-BshDxmnY.js.map → controller-BhAbvioO.js.map} +1 -1
  251. package/dist/kolibri/{controller-czapbbAQ.js → controller-DOh6Y7if.js} +1 -1
  252. package/dist/kolibri/{controller-czapbbAQ.js.map → controller-DOh6Y7if.js.map} +1 -1
  253. package/dist/kolibri/{controller-vMa681y9.js → controller-DR6tEetQ.js} +1 -1
  254. package/dist/kolibri/{controller-vMa681y9.js.map → controller-DR6tEetQ.js.map} +1 -1
  255. package/dist/kolibri/{controller-icon-DB58M2Dn.js → controller-icon-Dak8u7ck.js} +1 -1
  256. package/dist/{esm/controller-icon-DB58M2Dn.js.map → kolibri/controller-icon-Dak8u7ck.js.map} +1 -1
  257. package/dist/kolibri/{dev.utils-B8InC9wC.js → dev.utils-CMSYtmAz.js} +1 -1
  258. package/dist/kolibri/{dev.utils-B8InC9wC.js.map → dev.utils-CMSYtmAz.js.map} +1 -1
  259. package/dist/kolibri/{devtools-D2tZX5IH.js → devtools-CDwLKwYR.js} +1 -1
  260. package/dist/kolibri/{devtools-D2tZX5IH.js.map → devtools-CDwLKwYR.js.map} +1 -1
  261. package/dist/kolibri/{index-2YbJq5J3.js → index-BRWth_lT.js} +2 -2
  262. package/dist/kolibri/index-BRWth_lT.js.map +1 -0
  263. package/dist/kolibri/index.esm.js +1 -1
  264. package/dist/kolibri/kol-abbr.entry.js +1 -1
  265. package/dist/kolibri/kol-accordion.entry.js +1 -1
  266. package/dist/kolibri/kol-alert-wc.entry.js +1 -1
  267. package/dist/kolibri/kol-alert.entry.js +1 -1
  268. package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
  269. package/dist/kolibri/kol-avatar.entry.js +1 -1
  270. package/dist/kolibri/kol-badge.entry.js +1 -1
  271. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  272. package/dist/kolibri/kol-button-link.entry.js +1 -1
  273. package/dist/kolibri/kol-button-wc.entry.js +1 -1
  274. package/dist/kolibri/kol-button.entry.js +1 -1
  275. package/dist/kolibri/kol-card-wc.entry.js +1 -1
  276. package/dist/kolibri/kol-card.entry.js +1 -1
  277. package/dist/kolibri/kol-combobox.entry.js +1 -1
  278. package/dist/kolibri/kol-details.entry.js +1 -1
  279. package/dist/kolibri/kol-drawer.entry.js +1 -1
  280. package/dist/kolibri/kol-form.entry.js +1 -1
  281. package/dist/kolibri/kol-heading.entry.js +1 -1
  282. package/dist/kolibri/kol-icon.entry.js +1 -1
  283. package/dist/kolibri/kol-image.entry.js +1 -1
  284. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  285. package/dist/kolibri/kol-input-color.entry.js +1 -1
  286. package/dist/kolibri/kol-input-date.entry.js +1 -1
  287. package/dist/kolibri/kol-input-email.entry.js +1 -1
  288. package/dist/kolibri/kol-input-file.entry.js +1 -1
  289. package/dist/kolibri/kol-input-number.entry.js +1 -1
  290. package/dist/kolibri/kol-input-password.entry.js +1 -1
  291. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  292. package/dist/kolibri/kol-input-range.entry.js +1 -1
  293. package/dist/kolibri/kol-input-text.entry.js +1 -1
  294. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  295. package/dist/kolibri/kol-link-button.entry.js +1 -1
  296. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  297. package/dist/kolibri/kol-link-wc.entry.js.map +1 -1
  298. package/dist/kolibri/kol-link.entry.js +1 -1
  299. package/dist/kolibri/kol-modal.entry.js +1 -1
  300. package/dist/kolibri/kol-nav.entry.js +1 -1
  301. package/dist/kolibri/kol-pagination-wc.entry.js +1 -1
  302. package/dist/kolibri/kol-pagination.entry.js +1 -1
  303. package/dist/kolibri/kol-popover-button-wc.entry.js +1 -1
  304. package/dist/kolibri/kol-popover-button.entry.js +1 -1
  305. package/dist/kolibri/kol-popover-wc.entry.js +1 -1
  306. package/dist/kolibri/kol-progress.entry.js +1 -1
  307. package/dist/kolibri/kol-quote.entry.js +1 -1
  308. package/dist/kolibri/kol-select.entry.js +1 -1
  309. package/dist/kolibri/kol-single-select.entry.js +1 -1
  310. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  311. package/dist/kolibri/kol-spin.entry.js +1 -1
  312. package/dist/kolibri/kol-split-button.entry.js +1 -1
  313. package/dist/kolibri/kol-table-settings-wc.entry.js +1 -1
  314. package/dist/kolibri/kol-table-stateful.entry.js +1 -1
  315. package/dist/kolibri/kol-table-stateless-wc.entry.js +1 -1
  316. package/dist/kolibri/kol-table-stateless.entry.js +1 -1
  317. package/dist/kolibri/kol-tabs.entry.js +1 -1
  318. package/dist/kolibri/kol-textarea.entry.js +1 -1
  319. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  320. package/dist/kolibri/kol-toolbar.entry.js +1 -1
  321. package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
  322. package/dist/kolibri/kol-tree-item-wc.entry.js +1 -1
  323. package/dist/kolibri/kol-tree-item.entry.js +1 -1
  324. package/dist/kolibri/kol-tree-wc.entry.js +1 -1
  325. package/dist/kolibri/kol-tree.entry.js +1 -1
  326. package/dist/kolibri/kol-version.entry.js +1 -1
  327. package/dist/kolibri/kolibri.esm.js +1 -1
  328. package/dist/kolibri/test-component.entry.js +1 -1
  329. package/dist/types/functional-components/Heading/Heading.d.ts +2 -1
  330. package/package.json +1 -1
  331. package/dist/cjs/bootstrap-CKtJWjuP.js +0 -4
  332. package/dist/cjs/bootstrap-CKtJWjuP.js.map +0 -1
  333. package/dist/cjs/index-Dv9GHNjE.js +0 -4
  334. package/dist/cjs/index-Dv9GHNjE.js.map +0 -1
  335. package/dist/esm/Icon-FjmG-C5E.js +0 -4
  336. package/dist/esm/Input-B3EAo7Zn.js +0 -4
  337. package/dist/esm/InternalUnderlinedBadgeText-9Tu8seHa.js +0 -4
  338. package/dist/esm/bootstrap-B_0ftOOI.js +0 -4
  339. package/dist/esm/bootstrap-B_0ftOOI.js.map +0 -1
  340. package/dist/esm/index-2YbJq5J3.js +0 -4
  341. package/dist/esm/index-2YbJq5J3.js.map +0 -1
  342. package/dist/kolibri/Collapsible-Cm151Fs4.js +0 -4
  343. package/dist/kolibri/FieldControlStateWrapper-C1_urHeO.js +0 -4
  344. package/dist/kolibri/Icon-FjmG-C5E.js +0 -4
  345. package/dist/kolibri/Input-B3EAo7Zn.js +0 -4
  346. package/dist/kolibri/InternalUnderlinedBadgeText-9Tu8seHa.js +0 -4
  347. package/dist/kolibri/Span-BlZWELRP.js +0 -4
  348. package/dist/kolibri/bootstrap-B_0ftOOI.js +0 -4
  349. package/dist/kolibri/bootstrap-B_0ftOOI.js.map +0 -1
  350. package/dist/kolibri/index-2YbJq5J3.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Heading-CtmpC6WX.js","sources":["../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs","src/functional-components/Heading/Heading.tsx"],"sourcesContent":["/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n","import { type FunctionalComponent as FC, h } from '@stencil/core';\nimport clsx from 'clsx';\nimport type { JSXBase } from '@stencil/core/internal';\nimport type { HeadingLevel } from '../../schema';\n\ntype HGroupProps = JSXBase.HTMLAttributes<HTMLElement>;\n\n// Define a base type for common props\ntype BaseProps = JSXBase.HTMLAttributes<HTMLHeadingElement | HTMLElement> & {\n\tlevel?: HeadingLevel;\n};\n\n// Define a type for the main headline props\ntype HeadlineProps = BaseProps;\n\n// Define a type for the secondary headline props\ntype SecondaryHeadlineProps = BaseProps;\n\n// Define a type for the main Heading component props\nexport type HeadingProps = HeadlineProps & {\n\tsecondaryHeadline?: string;\n\tHeadingGroupProps?: HGroupProps;\n\tSecondaryHeadlineProps?: JSXBase.HTMLAttributes<HTMLHeadingElement | HTMLElement>;\n};\n\nconst MIN_HEADING_LEVEL = 1;\nconst MAX_HEADING_LEVEL = 6;\n\n// Define a union type for valid headline tags\ntype HeadlineTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'strong';\n\n/**\n * Checks if the given level is a valid heading level.\n * @param level - The heading level to check.\n * @returns True if the level is valid, false otherwise.\n */\nfunction isValidHeadingLevel(level: number): boolean {\n\treturn level >= MIN_HEADING_LEVEL && level <= MAX_HEADING_LEVEL;\n}\n\n/**\n * Returns the appropriate headline tag based on the level.\n * If the level is invalid, returns 'strong'.\n * @param level - The heading level.\n * @returns The corresponding headline tag.\n */\nexport function getHeadlineTag(level: HeadingLevel | number): HeadlineTag {\n\treturn isValidHeadingLevel(level) ? (`h${level}` as HeadlineTag) : 'strong';\n}\n\n/**\n * Functional component for rendering a headline.\n * @param props - The properties for the headline component.\n * @param children - The children to render inside the headline.\n * @returns A VNode representing the headline.\n */\nconst KolHeadlineFc: FC<HeadlineProps> = ({ class: classNames, level = MIN_HEADING_LEVEL, ...other }, children) => {\n\tconst HeadlineTag = getHeadlineTag(level);\n\n\treturn (\n\t\t<HeadlineTag class={clsx('kol-headline', `kol-headline--${HeadlineTag}`, classNames)} {...other}>\n\t\t\t{children}\n\t\t</HeadlineTag>\n\t);\n};\n\n/**\n * Functional component for rendering a secondary headline.\n * @param props - The properties for the secondary headline component.\n * @param children - The children to render inside the secondary headline.\n * @returns A VNode representing the secondary headline.\n */\nconst KolSecondaryHeadlineFc: FC<SecondaryHeadlineProps> = ({ class: classNames, ...other }, children) => {\n\treturn (\n\t\t<p class={clsx('kol-headline kol-headline--group kol-headline--secondary', classNames)} {...other}>\n\t\t\t{children}\n\t\t</p>\n\t);\n};\n\n/**\n * Functional component for rendering a heading with an optional secondary headline.\n * @param props - The properties for the heading component.\n * @param children - The children to render inside the heading.\n * @returns A VNode representing the heading.\n */\nconst KolHeadingFc: FC<HeadingProps> = (\n\t{ secondaryHeadline, level = MIN_HEADING_LEVEL, class: classNames, HeadingGroupProps = {}, SecondaryHeadlineProps = {}, ...other },\n\tchildren,\n) => {\n\tconst headlineProps: HeadlineProps = {\n\t\tlevel,\n\t\t...other,\n\t};\n\n\tif (!secondaryHeadline) {\n\t\treturn (\n\t\t\t<KolHeadlineFc class={clsx(classNames, 'kol-headline--single')} {...headlineProps}>\n\t\t\t\t{children}\n\t\t\t</KolHeadlineFc>\n\t\t);\n\t}\n\n\tconst { class: groupClassNames, ...groupOthers } = HeadingGroupProps;\n\tconst headlineGroupProps: HGroupProps = {\n\t\tclass: clsx('kol-heading-group', groupClassNames),\n\t\t...groupOthers,\n\t};\n\n\treturn (\n\t\t<hgroup {...headlineGroupProps}>\n\t\t\t<KolHeadlineFc class={clsx(classNames, 'kol-headline--group', 'kol-headline--primary')} {...headlineProps}>\n\t\t\t\t{children}\n\t\t\t</KolHeadlineFc>\n\t\t\t<KolSecondaryHeadlineFc {...SecondaryHeadlineProps}>{secondaryHeadline}</KolSecondaryHeadlineFc>\n\t\t</hgroup>\n\t);\n};\n\nexport default KolHeadingFc;\n"],"names":["h","clsx"],"mappings":";;;;;;;;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AA4BO,SAAS,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE;AAC7B,EAAE,IAAI,CAAC,GAAG,EAAE;AACZ,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;AACrF,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACjB,EAAE,IAAI,CAAC,IAAI,IAAI,IAAI,OAAO,MAAM,CAAC,qBAAqB,KAAK,UAAU;AACrE,MAAM,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAC9E,UAAU,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AACxF,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/B;AACA,EAAE,OAAO,CAAC;AACV;;AAmRuB,OAAO,eAAe,KAAK,UAAU,GAAG,eAAe,GAAG,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A,sBAAsB,oBAAK,sBAAsB,CAAA,EAAG,iBAAiB,CAA0B,CACxF;AAEX;;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"Heading-BPYmDTUk.js","sources":["../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs","src/functional-components/Heading/Heading.tsx"],"sourcesContent":["/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n","import { type FunctionalComponent as FC, h } from '@stencil/core';\nimport clsx from 'clsx';\nimport type { JSXBase } from '@stencil/core/internal';\nimport type { HeadingLevel } from '../../schema';\n\ntype HGroupProps = JSXBase.HTMLAttributes<HTMLElement>;\n\n// Define a base type for common props\ntype BaseProps = JSXBase.HTMLAttributes<HTMLHeadingElement | HTMLElement> & {\n\tlevel?: HeadingLevel;\n};\n\n// Define a type for the main headline props\ntype HeadlineProps = BaseProps;\n\n// Define a type for the secondary headline props\ntype SecondaryHeadlineProps = JSXBase.HTMLAttributes<HTMLParagraphElement>;\n\n// Define a type for the main Heading component props\nexport type HeadingProps = HeadlineProps & {\n\tsecondaryHeadline?: string;\n\tHeadingGroupProps?: HGroupProps;\n\tSecondaryHeadlineProps?: SecondaryHeadlineProps;\n};\n\nconst MIN_HEADING_LEVEL = 1;\nconst MAX_HEADING_LEVEL = 6;\n\n// Define a union type for valid headline tags\ntype HeadlineTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'strong';\n\n/**\n * Checks if the given level is a valid heading level.\n * @param level - The heading level to check.\n * @returns True if the level is valid, false otherwise.\n */\nfunction isValidHeadingLevel(level: number): boolean {\n\treturn level >= MIN_HEADING_LEVEL && level <= MAX_HEADING_LEVEL;\n}\n\n/**\n * Returns the appropriate headline tag based on the level.\n * If the level is invalid, returns 'strong'.\n * @param level - The heading level.\n * @returns The corresponding headline tag.\n */\nexport function getHeadlineTag(level: HeadingLevel | number): HeadlineTag {\n\treturn isValidHeadingLevel(level) ? (`h${level}` as HeadlineTag) : 'strong';\n}\n\n/**\n * Functional component for rendering a headline.\n * @param props - The properties for the headline component.\n * @param children - The children to render inside the headline.\n * @returns A VNode representing the headline.\n */\nconst KolHeadlineFc: FC<HeadlineProps> = ({ class: classNames, level = MIN_HEADING_LEVEL, ...other }, children) => {\n\tconst HeadlineTag = getHeadlineTag(level);\n\n\treturn (\n\t\t<HeadlineTag class={clsx('kol-headline', `kol-headline--${HeadlineTag}`, classNames)} {...other}>\n\t\t\t{children}\n\t\t</HeadlineTag>\n\t);\n};\n\n/**\n * Functional component for rendering a secondary headline.\n * The secondary text is rendered as a `<p>` because according to the HTML `hgroup`\n * specification the subheading does not create its own outline level.\n * @param props - The properties for the secondary headline component.\n * @param children - The children to render inside the secondary headline.\n * @returns A VNode representing the secondary headline.\n */\nconst KolSecondaryHeadlineFc: FC<SecondaryHeadlineProps> = ({ class: classNames, ...other }, children) => {\n\treturn (\n\t\t<p class={clsx('kol-headline kol-headline--group kol-headline--secondary', classNames)} {...other}>\n\t\t\t{children}\n\t\t</p>\n\t);\n};\n\n/**\n * Functional component for rendering a heading with an optional secondary headline.\n * @param props - The properties for the heading component.\n * @param children - The children to render inside the heading.\n * @returns A VNode representing the heading.\n */\nconst KolHeadingFc: FC<HeadingProps> = (\n\t{ secondaryHeadline, level = MIN_HEADING_LEVEL, class: classNames, HeadingGroupProps = {}, SecondaryHeadlineProps = {}, ...other },\n\tchildren,\n) => {\n\tconst headlineProps: HeadlineProps = {\n\t\tlevel,\n\t\t...other,\n\t};\n\n\tif (!secondaryHeadline) {\n\t\treturn (\n\t\t\t<KolHeadlineFc class={clsx(classNames, 'kol-headline--single')} {...headlineProps}>\n\t\t\t\t{children}\n\t\t\t</KolHeadlineFc>\n\t\t);\n\t}\n\n\tconst { class: groupClassNames, ...groupOthers } = HeadingGroupProps;\n\tconst headlineGroupProps: HGroupProps = {\n\t\tclass: clsx('kol-heading-group', groupClassNames),\n\t\t...groupOthers,\n\t};\n\n\treturn (\n\t\t<hgroup {...headlineGroupProps}>\n\t\t\t<KolHeadlineFc class={clsx(classNames, 'kol-headline--group', 'kol-headline--primary')} {...headlineProps}>\n\t\t\t\t{children}\n\t\t\t</KolHeadlineFc>\n\t\t\t<KolSecondaryHeadlineFc {...SecondaryHeadlineProps}>{secondaryHeadline}</KolSecondaryHeadlineFc>\n\t\t</hgro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_lT.js";import{e as KolIconTag}from"./component-names-CkE54Ym7.js";const KolIconFc=o=>{const{class:c,style:l,icons:n,label:s,onClick:e}=o;return h(KolIconTag,{class:c,style:l,onClick:e,_icons:n,_label:s})};export{KolIconFc as K};
@@ -1 +1 @@
1
- {"version":3,"file":"Icon-FjmG-C5E.js","sources":["src/functional-components/Icon/Icon.tsx"],"sourcesContent":["import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport { KolIconTag } from '../../core/component-names';\nimport type { InternalIconProps } from '../../schema';\n\nexport type IconProps = InternalIconProps & {\n\tclass?: string;\n\tstyle?: { [key: string]: string };\n\tonClick?: (event: MouseEvent) => void;\n};\n\nconst KolIconFc: FC<IconProps> = (props) => {\n\tconst { class: classNames, style, icons, label, onClick } = props;\n\n\treturn <KolIconTag class={classNames} style={style} onClick={onClick} _icons={icons} _label={label} />;\n};\n\nexport default KolIconFc;\n"],"names":[],"mappings":";;;;;;AAUA,MAAM,SAAS,GAAkB,CAAC,KAAK,KAAI;AAC1C,IAAA,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,KAAK;IAEjE,OAAO,CAAA,CAAC,UAAU,EAAC,EAAA,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAA,CAAI;AACvG;;;;"}
1
+ {"version":3,"file":"Icon-CPJLro7v.js","sources":["src/functional-components/Icon/Icon.tsx"],"sourcesContent":["import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport { KolIconTag } from '../../core/component-names';\nimport type { InternalIconProps } from '../../schema';\n\nexport type IconProps = InternalIconProps & {\n\tclass?: string;\n\tstyle?: { [key: string]: string };\n\tonClick?: (event: MouseEvent) => void;\n};\n\nconst KolIconFc: FC<IconProps> = (props) => {\n\tconst { class: classNames, style, icons, label, onClick } = props;\n\n\treturn <KolIconTag class={classNames} style={style} onClick={onClick} _icons={icons} _label={label} />;\n};\n\nexport default KolIconFc;\n"],"names":[],"mappings":";;;;;;AAUA,MAAM,SAAS,GAAkB,CAAC,KAAK,KAAI;AAC1C,IAAA,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,KAAK;IAEjE,OAAO,CAAA,CAAC,UAAU,EAAC,EAAA,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAA,CAAI;AACvG;;;;"}
@@ -0,0 +1,4 @@
1
+ /*!
2
+ * KoliBri - The accessible HTML-Standard
3
+ */
4
+ import{_ as __rest}from"./Heading-BPYmDTUk.js";import{h,F as Fragment}from"./index-BRWth_lT.js";import{c as clsx}from"./clsx-eK3rPvPS.js";import"./common-zXZUsQ7l.js";import{e as getDefaultProps,c as checkHasMsg}from"./FormFieldStateWrapper-CGvaBC47.js";const InputFc=e=>{const{class:s,msg:a,required:l,disabled:o,touched:r,readonly:t,ariaDescribedBy:i,hideLabel:n,label:d,suggestions:c,value:u}=e,p=__rest(e,["class","msg","required","disabled","touched","readonly","ariaDescribedBy","hideLabel","label","suggestions","value"]),m=checkHasMsg(a,r),b={"kol-input--disabled":Boolean(o),"kol-input--required":Boolean(l),"kol-input--touched":Boolean(r),"kol-input--readonly":Boolean(t),[`kol-input--${(null==a?void 0:a.type)||"error"}`]:m},g=Object.assign(Object.assign({class:clsx("kol-input",b,s),required:l,disabled:o,readonly:t,type:"text",list:c?`${p.id}-list`:void 0},getDefaultProps({ariaDescribedBy:i,hideLabel:n,label:d})),p);return h(Fragment,null,h("input",Object.assign({},g,{value:u})),c)};export{InputFc as I};
@@ -1 +1 @@
1
- {"version":3,"file":"Input-B3EAo7Zn.js","sources":["src/functional-components/inputs/Input/Input.tsx"],"sourcesContent":["import { h, Fragment, type FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase, VNode } from '@stencil/core/internal';\nimport clsx from 'clsx';\nimport { checkHasMsg, type InternMsgPropType } from '../../../schema';\nimport { getDefaultProps } from '../_helpers/getDefaultProps';\nimport type { DefaultInputProps } from '../_types';\n\nexport type InputProps = DefaultInputProps<JSXBase.InputHTMLAttributes<HTMLInputElement>> & {\n\tmsg?: InternMsgPropType;\n\ttouched?: boolean;\n\tspellcheck?: boolean;\n\tsuggestions?: VNode;\n\tvalue?: string | number | string[];\n} & {\n\t[key: `aria-${string}`]: unknown;\n\t[key: `data-${string}`]: unknown;\n};\n\nconst InputFc: FC<InputProps> = (props) => {\n\tconst { class: classNames, msg, required, disabled, touched, readonly, ariaDescribedBy, hideLabel, label, suggestions, value, ...other } = props;\n\n\tconst showMsg = checkHasMsg(msg, touched);\n\n\tconst stateCssClasses = {\n\t\t['kol-input--disabled']: Boolean(disabled),\n\t\t['kol-input--required']: Boolean(required),\n\t\t['kol-input--touched']: Boolean(touched),\n\t\t['kol-input--readonly']: Boolean(readonly),\n\t\t[`kol-input--${msg?.type || 'error'}`]: showMsg,\n\t};\n\n\tconst inputProps: JSXBase.InputHTMLAttributes<HTMLInputElement> = {\n\t\tclass: clsx('kol-input', stateCssClasses, classNames),\n\t\trequired: required,\n\t\tdisabled: disabled,\n\t\treadonly: readonly,\n\t\ttype: 'text',\n\t\tlist: suggestions ? `${other.id}-list` : undefined,\n\t\t...getDefaultProps({ ariaDescribedBy, hideLabel, label }),\n\t\t...other,\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<input {...inputProps} value={value} />\n\t\t\t{suggestions}\n\t\t</>\n\t);\n};\n\nexport default InputFc;\n"],"names":[],"mappings":";;;;;;;;;AAkBA,MAAM,OAAO,GAAmB,CAAC,KAAK,KAAI;AACzC,IAAA,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,E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ACC,QAAA,CAAA,CAAA,OAAA,EAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAW,UAAU,EAAA,EAAE,KAAK,EAAE,KAAK,EAAI,CAAA,CAAA;QACtC,WAAW,CACV;AAEL;;;;"}
1
+ {"version":3,"file":"Input-DjC4bpJ5.js","sources":["src/functional-components/inputs/Input/Input.tsx"],"sourcesContent":["import { h, Fragment, type FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase, VNode } from '@stencil/core/internal';\nimport clsx from 'clsx';\nimport { checkHasMsg, type InternMsgPropType } from '../../../schema';\nimport { getDefaultProps } from '../_helpers/getDefaultProps';\nimport type { DefaultInputProps } from '../_types';\n\nexport type InputProps = DefaultInputProps<JSXBase.InputHTMLAttributes<HTMLInputElement>> & {\n\tmsg?: InternMsgPropType;\n\ttouched?: boolean;\n\tspellcheck?: boolean;\n\tsuggestions?: VNode;\n\tvalue?: string | number | string[];\n} & {\n\t[key: `aria-${string}`]: unknown;\n\t[key: `data-${string}`]: unknown;\n};\n\nconst InputFc: FC<InputProps> = (props) => {\n\tconst { class: classNames, msg, required, disabled, touched, readonly, ariaDescribedBy, hideLabel, label, suggestions, value, ...other } = props;\n\n\tconst showMsg = checkHasMsg(msg, touched);\n\n\tconst stateCssClasses = {\n\t\t['kol-input--disabled']: Boolean(disabled),\n\t\t['kol-input--required']: Boolean(required),\n\t\t['kol-input--touched']: Boolean(touched),\n\t\t['kol-input--readonly']: Boolean(readonly),\n\t\t[`kol-input--${msg?.type || 'error'}`]: showMsg,\n\t};\n\n\tconst inputProps: JSXBase.InputHTMLAttributes<HTMLInputElement> = {\n\t\tclass: clsx('kol-input', stateCssClasses, classNames),\n\t\trequired: required,\n\t\tdisabled: disabled,\n\t\treadonly: readonly,\n\t\ttype: 'text',\n\t\tlist: suggestions ? `${other.id}-list` : undefined,\n\t\t...getDefaultProps({ ariaDescribedBy, hideLabel, label }),\n\t\t...other,\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<input {...inputProps}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M,EACZ,IAAI,EAAE,WAAW,GAAG,CAAA,EAAG,KAAK,CAAC,EAAE,CAAA,KAAA,CAAO,GAAG,SAAS,EAC/C,EAAA,eAAe,CAAC,EAAE,eAAe,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAA,EACtD,KAAK,CACR;AAED,IAAA,QACC,CAAA,CAAA,QAAA,EAAA,IAAA;AACC,QAAA,CAAA,CAAA,OAAA,EAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAW,UAAU,EAAA,EAAE,KAAK,EAAE,KAAK,EAAI,CAAA,CAAA;QACtC,WAAW,CACV;AAEL;;;;"}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{_ as __rest}from"./Heading-K34kz2yJ.js";import{h}from"./index-2YbJq5J3.js";import{I as InputFc}from"./Input-B3EAo7Zn.js";import"./common-zXZUsQ7l.js";import{g as getRenderStates,a as convertMsgToInternMsg}from"./FormFieldStateWrapper-C90koSDb.js";const SuggestionsFc=e=>{var{id:t,suggestions:s}=e,n=__rest(e,["id","suggestions"]);return s?h("datalist",Object.assign({id:`${t}-list`},n),s.map(e=>h("option",{value:e}))):null};function getInputProps(e,t,s){var n;const i=[...getRenderStates(e).ariaDescribedBy,...null!==(n=t.ariaDescribedBy)&&void 0!==n?n:[]],a={id:e._id,hideLabel:e._hideLabel,label:e._label,disabled:e._disabled,name:e._name};if("_accessKey"in e&&(a.accessKey=e._accessKey),"_type"in e&&(a.type=e._type),"_value"in e&&(a.value=e._value),"_required"in e&&(a.required=e._required),"_maxLength"in e&&"_maxLengthBehavior"in e&&"hard"===e._maxLengthBehavior&&(a.maxlength=e._maxLength),"_placeholder"in e&&(a.placeholder=e._placeholder),"_autoComplete"in e&&(a.autoComplete=e._autoComplete),"_spellCheck"in e&&(a.spellcheck=e._spellCheck),"_pattern"in e&&(a.pattern=e._pattern),"_readOnly"in e&&(a.readonly=e._readOnly),"_min"in e&&(a.min=e._min),"_max"in e&&(a.max=e._max),"_step"in e&&(a.step=e._step),"_multiple"in e&&(a.multiple=e._multiple),"_checked"in e&&(a.checked=e._checked),"_indeterminate"in e&&(a.indeterminate=e._indeterminate),"_touched"in e&&(a.touched=e._touched),"_msg"in e&&(a.msg=convertMsgToInternMsg(e._msg)),"_suggestions"in e&&!s){Array.isArray(e._suggestions)&&e._suggestions.length>0&&(a.suggestions=h(SuggestionsFc,{id:e._id,suggestions:e._suggestions}))}return Object.assign(Object.assign(Object.assign({},a),t),{ariaDescribedBy:i})}const InputStateWrapper=e=>{var{state:t,customSuggestions:s}=e,n=__rest(e,["state","customSuggestions"]);return h(InputFc,Object.assign({},getInputProps(t,n,s)))};export{InputStateWrapper as I,SuggestionsFc as S};
4
+ import{_ as __rest}from"./Heading-BPYmDTUk.js";import{h}from"./index-BRWth_lT.js";import{I as InputFc}from"./Input-DjC4bpJ5.js";import"./common-zXZUsQ7l.js";import{g as getRenderStates,a as convertMsgToInternMsg}from"./FormFieldStateWrapper-CGvaBC47.js";const SuggestionsFc=e=>{var{id:t,suggestions:s}=e,n=__rest(e,["id","suggestions"]);return s?h("datalist",Object.assign({id:`${t}-list`},n),s.map(e=>h("option",{value:e}))):null};function getInputProps(e,t,s){var n;const i=[...getRenderStates(e).ariaDescribedBy,...null!==(n=t.ariaDescribedBy)&&void 0!==n?n:[]],a={id:e._id,hideLabel:e._hideLabel,label:e._label,disabled:e._disabled,name:e._name};if("_accessKey"in e&&(a.accessKey=e._accessKey),"_type"in e&&(a.type=e._type),"_value"in e&&(a.value=e._value),"_required"in e&&(a.required=e._required),"_maxLength"in e&&"_maxLengthBehavior"in e&&"hard"===e._maxLengthBehavior&&(a.maxlength=e._maxLength),"_placeholder"in e&&(a.placeholder=e._placeholder),"_autoComplete"in e&&(a.autoComplete=e._autoComplete),"_spellCheck"in e&&(a.spellcheck=e._spellCheck),"_pattern"in e&&(a.pattern=e._pattern),"_readOnly"in e&&(a.readonly=e._readOnly),"_min"in e&&(a.min=e._min),"_max"in e&&(a.max=e._max),"_step"in e&&(a.step=e._step),"_multiple"in e&&(a.multiple=e._multiple),"_checked"in e&&(a.checked=e._checked),"_indeterminate"in e&&(a.indeterminate=e._indeterminate),"_touched"in e&&(a.touched=e._touched),"_msg"in e&&(a.msg=convertMsgToInternMsg(e._msg)),"_suggestions"in e&&!s){Array.isArray(e._suggestions)&&e._suggestions.length>0&&(a.suggestions=h(SuggestionsFc,{id:e._id,suggestions:e._suggestions}))}return Object.assign(Object.assign(Object.assign({},a),t),{ariaDescribedBy:i})}const InputStateWrapper=e=>{var{state:t,customSuggestions:s}=e,n=__rest(e,["state","customSuggestions"]);return h(InputFc,Object.assign({},getInputProps(t,n,s)))};export{InputStateWrapper as I,SuggestionsFc as S};
@@ -1 +1 @@
1
- {"version":3,"file":"InputStateWrapper-C5Wdo05z.js","sources":["src/functional-components/Suggestions/Suggestions.tsx","src/functional-component-wrappers/InputStateWrapper/InputStateWrapper.tsx"],"sourcesContent":["import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport type { W3CInputValue } from '../../schema';\n\nexport type SuggestionsProps = JSXBase.HTMLAttributes<HTMLDataListElement> & {\n\tid: string;\n\tsuggestions: W3CInputValue[];\n};\n\nconst SuggestionsFc: FC<SuggestionsProps> = ({ id, suggestions, ...other }) => {\n\tif (!suggestions) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<datalist id={`${id}-list`} {...other}>\n\t\t\t{suggestions.map((option: W3CInputValue) => (\n\t\t\t\t<option value={option} />\n\t\t\t))}\n\t\t</datalist>\n\t);\n};\nexport default SuggestionsFc;\n","import type { VNode } from '@stencil/core';\nimport { h, type FunctionalComponent as FC } from '@stencil/core';\nimport KolInputFc, { type InputProps } from '../../functional-components/inputs/Input';\n\nimport {\n\ttype InputColorStates,\n\ttype InputEmailStates,\n\ttype InputFileStates,\n\ttype InputNumberStates,\n\ttype InputPasswordStates,\n\ttype InputRangeStates,\n\ttype InputTextStates,\n\ttype InputCheckboxStates,\n\ttype InputRadioStates,\n\tconvertMsgToInternMsg,\n} from '../../schema';\nimport { getRenderStates } from '../_helpers/getRenderStates';\nimport SuggestionsFc from '../../functional-components/Suggestions';\n\ntype InputState =\n\t| InputTextStates\n\t| InputEmailStates\n\t| InputPasswordStates\n\t| InputNumberStates\n\t| InputColorStates\n\t| InputFileStates\n\t| InputRangeStates\n\t| InputCheckboxStates\n\t| InputRadioStates;\n\nexport type InputStateWrapperProps = Partial<InputProps> & {\n\tstate: InputState;\n\tcustomSuggestions?: boolean;\n};\n\n/**\n * @param state\n * @param other\n * @param customSuggestions - Set to true when a custom implementation for _suggestions is provided. Omits the native datalist.\n */\nfunction getInputProps(state: InputState, other: Partial<InputProps>, customSuggestions?: boolean): InputProps {\n\tconst renderStates = getRenderStates(state);\n\tconst ariaDescribedBy = [...renderStates.ariaDescribedBy, ...(other.ariaDescribedBy ?? [])];\n\n\tconst props: InputProps = {\n\t\tid: state._id,\n\t\thideLabel: state._hideLabel,\n\t\tlabel: state._label,\n\t\tdisabled: state._disabled,\n\t\tname: state._name,\n\t};\n\n\tif ('_accessKey' in state) props.accessKey = state._accessKey;\n\tif ('_type' in state) props.type = state._type;\n\tif ('_value' in state) props.value = state._value as string | number | string[];\n\tif ('_required' in state) props.required = state._required;\n\tif ('_maxLength' in state && '_maxLengthBehavior' in state && state._maxLengthBehavior === 'hard') props.maxlength = state._maxLength;\n\tif ('_placeholder' in state) props.placeholder = state._placeholder;\n\tif ('_autoComplete' in state) props.autoComplete = state._autoComplete;\n\tif ('_spellCheck' in state) props.spellcheck = state._spellCheck;\n\tif ('_pattern' in state) props.pattern = state._pattern;\n\tif ('_readOnly' in state) props.readonly = state._readOnly;\n\tif ('_min' in state) props.min = state._min;\n\tif ('_max' in state) props.max = state._max;\n\tif ('_step' in state) props.step = state._step;\n\tif ('_multiple' in state) props.multiple = state._multiple;\n\tif ('_checked' in state) props.checked = state._checked;\n\tif ('_indeterminate' in state) props.indeterminate = state._indeterminate;\n\tif ('_touched' in state) props.touched = state._touched;\n\tif ('_msg' in state) props.msg = convertMsgToInternMsg(state._msg);\n\n\tif ('_suggestions' in state && !customSuggestions) {\n\t\tconst hasSuggestions = Array.isArray(state._suggestions) && state._suggestions.length > 0;\n\t\tif (hasSuggestions) {\n\t\t\tprops.suggestions = (<SuggestionsFc id={state._id} suggestions={state._suggestions} />) as VNode;\n\t\t}\n\t}\n\n\treturn {\n\t\t...props,\n\t\t...other,\n\t\tariaDescribedBy,\n\t};\n}\n\nconst InputStateWrapper: FC<InputStateWrapperProps> = ({ state, customSuggestions, ...other }) => {\n\treturn <KolInputFc {...getInputProps(state, other, customSuggestions)} />;\n};\n\nexport default InputStateWrapper;\n"],"names":["KolInputFc"],"mappings":";;;;;;;;;AASA,MAAM,aAAa,GAAyB,CAAC,EAA6B,KAAI;QAAjC,EAAE,EAAE,EAAE,WAAW,EAAA,GAAA,EAAY,EAAP,KAAK,GAAA,MAAA,CAAA,EAAA,EAA3B,qBAA6B,CAAF;IACvE,IAAI,CAAC,WAAW,EAAE;AACjB,QAAA,OAAO,IAAI;;AAGZ,IAAA,QACC,CAAA,CAAA,UAAA,EAAA,MAAA,CAAA,MAAA,CAAA,EAAU,EAAE,EAAE,CAAG,EAAA,EAAE,CAAO,KAAA,CAAA,EAAA,EAAM,KAAK,CAAA,EACnC,WAAW,CAAC,GAAG,CAAC,CAAC,MAAqB,MACtC,CAAQ,CAAA,QAAA,EAAA,EAAA,KAAK,EAAE,MAAM,EAAI,CAAA,CACzB,CAAC,CACQ;AAEb;;ACmBA,SAAS,aAAa,CAAC,KAAiB,EAAE,KAA0B,EAAE,iBAA2B,EAAA;;AAChG,IAAA,MAAM,YAAY,GAAG,eAAe,CAAC,KAAK,CAAC;AAC3C,IAAA,MAAM,eAAe,GAAG,CAAC,GAAG,YAAY,CAAC,eAAe,EAAE,IAAI,CAAA,EAAA,GAAA,KAAK,CAAC,eAAe,mCAAI,EAAE,CAAC,CAAC;AAE3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,GAAA,MAAA,CAAA,EAAA,EAApC,8BAAsC,CAAF;AAC1F,IAAA,OAAO,CAAC,CAAAA,OAAU,EAAK,MAAA,CAAA,MAAA,CAAA,EAAA,EAAA,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,iBAAiB,CAAC,CAAA,CAAI;AAC1E;;;;"}
1
+ {"version":3,"file":"InputStateWrapper-C2VyGe6a.js","sources":["src/functional-components/Suggestions/Suggestions.tsx","src/functional-component-wrappers/InputStateWrapper/InputStateWrapper.tsx"],"sourcesContent":["import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport type { W3CInputValue } from '../../schema';\n\nexport type SuggestionsProps = JSXBase.HTMLAttributes<HTMLDataListElement> & {\n\tid: string;\n\tsuggestions: W3CInputValue[];\n};\n\nconst SuggestionsFc: FC<SuggestionsProps> = ({ id, suggestions, ...other }) => {\n\tif (!suggestions) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<datalist id={`${id}-list`} {...other}>\n\t\t\t{suggestions.map((option: W3CInputValue) => (\n\t\t\t\t<option value={option} />\n\t\t\t))}\n\t\t</datalist>\n\t);\n};\nexport default SuggestionsFc;\n","import type { VNode } from '@stencil/core';\nimport { h, type FunctionalComponent as FC } from '@stencil/core';\nimport KolInputFc, { type InputProps } from '../../functional-components/inputs/Input';\n\nimport {\n\ttype InputColorStates,\n\ttype InputEmailStates,\n\ttype InputFileStates,\n\ttype InputNumberStates,\n\ttype InputPasswordStates,\n\ttype InputRangeStates,\n\ttype InputTextStates,\n\ttype InputCheckboxStates,\n\ttype InputRadioStates,\n\tconvertMsgToInternMsg,\n} from '../../schema';\nimport { getRenderStates } from '../_helpers/getRenderStates';\nimport SuggestionsFc from '../../functional-components/Suggestions';\n\ntype InputState =\n\t| InputTextStates\n\t| InputEmailStates\n\t| InputPasswordStates\n\t| InputNumberStates\n\t| InputColorStates\n\t| InputFileStates\n\t| InputRangeStates\n\t| InputCheckboxStates\n\t| InputRadioStates;\n\nexport type InputStateWrapperProps = Partial<InputProps> & {\n\tstate: InputState;\n\tcustomSuggestions?: boolean;\n};\n\n/**\n * @param state\n * @param other\n * @param customSuggestions - Set to true when a custom implementation for _suggestions is provided. Omits the native datalist.\n */\nfunction getInputProps(state: InputState, other: Partial<InputProps>, customSuggestions?: boolean): InputProps {\n\tconst renderStates = getRenderStates(state);\n\tconst ariaDescribedBy = [...renderStates.ariaDescribedBy, ...(other.ariaDescribedBy ?? [])];\n\n\tconst props: InputProps = {\n\t\tid: state._id,\n\t\thideLabel: state._hideLabel,\n\t\tlabel: state._label,\n\t\tdisabled: state._disabled,\n\t\tname: state._name,\n\t};\n\n\tif ('_accessKey' in state) props.accessKey = state._accessKey;\n\tif ('_type' in state) props.type = state._type;\n\tif ('_value' in state) props.value = state._value as string | number | string[];\n\tif ('_required' in state) props.required = state._required;\n\tif ('_maxLength' in state && '_maxLengthBehavior' in state && state._maxLengthBehavior === 'hard') props.maxlength = state._maxLength;\n\tif ('_placeholder' in state) props.placeholder = state._placeholder;\n\tif ('_autoComplete' in state) props.autoComplete = state._autoComplete;\n\tif ('_spellCheck' in state) props.spellcheck = state._spellCheck;\n\tif ('_pattern' in state) props.pattern = state._pattern;\n\tif ('_readOnly' in state) props.readonly = state._readOnly;\n\tif ('_min' in state) props.min = state._min;\n\tif ('_max' in state) props.max = state._max;\n\tif ('_step' in state) props.step = state._step;\n\tif ('_multiple' in state) props.multiple = state._multiple;\n\tif ('_checked' in state) props.checked = state._checked;\n\tif ('_indeterminate' in state) props.indeterminate = state._indeterminate;\n\tif ('_touched' in state) props.touched = state._touched;\n\tif ('_msg' in state) props.msg = convertMsgToInternMsg(state._msg);\n\n\tif ('_suggestions' in state && !customSuggestions) {\n\t\tconst hasSuggestions = Array.isArray(state._suggestions) && state._suggestions.length > 0;\n\t\tif (hasSuggestions) {\n\t\t\tprops.suggestions = (<SuggestionsFc id={state._id} suggestions={state._suggestions} />) as VNode;\n\t\t}\n\t}\n\n\treturn {\n\t\t...props,\n\t\t...other,\n\t\tariaDescribedBy,\n\t};\n}\n\nconst InputStateWrapper: FC<InputStateWrapperProps> = ({ state, customSuggestions, ...other }) => {\n\treturn <KolInputFc {...getInputProps(state, other, customSuggestions)} />;\n};\n\nexport default InputStateWrapper;\n"],"names":["KolInputFc"],"mappings":";;;;;;;;;AASA,MAAM,aAAa,GAAyB,CAAC,EAA6B,KAAI;QAAjC,EAAE,EAAE,EAAE,WAAW,EAAA,GAAA,EAAY,EAAP,KAAK,GAAA,MAAA,CAAA,EAAA,EAA3B,qBAA6B,CAAF;IACvE,IAAI,CAAC,WAAW,EAAE;AACjB,QAAA,OAAO,IAAI;;AAGZ,IAAA,QACC,CAAA,CAAA,UAAA,EAAA,MAAA,CAAA,MAAA,CAAA,EAAU,EAAE,EAAE,CAAG,EAAA,EAAE,CAAO,KAAA,CAAA,EAAA,EAAM,KAAK,CAAA,EACnC,WAAW,CAAC,GAAG,CAAC,CAAC,MAAqB,MACtC,CAAQ,CAAA,QAAA,EAAA,EAAA,KAAK,EAAE,MAAM,EAAI,CAAA,CACzB,CAAC,CACQ;AAEb;;ACmBA,SAAS,aAAa,CAAC,KAAiB,EAAE,KAA0B,EAAE,iBAA2B,EAAA;;AAChG,IAAA,MAAM,YAAY,GAAG,eAAe,CAAC,KAAK,CAAC;AAC3C,IAAA,MAAM,eAAe,GAAG,CAAC,GAAG,YAAY,CAAC,eAAe,EAAE,IAAI,CAAA,EAAA,GAAA,KAAK,CAAC,eAAe,mCAAI,EAAE,CAAC,CAAC;AAE3F,IAAA,MAAM,KAAK,GAAe;QACzB,EAAE,EAAE,KAAK,CAAC,GAAG;QACb,SAAS,EAAE,KAAK,CAAC,UAAU;QAC3B,KAAK,EAAE,KAAK,CAAC,MAAM;QACnB,QAAQ,EAAE,KAAK,CAAC,SAAS;QACzB,IAAI,EAAE,KAAK,CAAC,KAAK;KACjB;IAED,IAAI,YAAY,IAAI,KAAK;AAAE,QAAA,KAAK,CAAC,SAAS,GA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as isObjectLike,b as isArray,c as baseGetTag}from"./isObject-DvSELytj.js";import{h,F as Fragment}from"./index-BRWth_lT.js";var stringTag="[object String]";function isString(t){return"string"==typeof t||!isArray(t)&&isObjectLike(t)&&baseGetTag(t)==stringTag}const KolInternalUnderlinedBadgeTextFc=({badgeText:t,label:e})=>{const n=t;let[r,...a]=e.split(n);return 0===a.length&&(t=n.toUpperCase(),[r,...a]=e.split(n)),0===a.length&&(t=n.toLowerCase(),[r,...a]=e.split(n)),h(Fragment,null,r,a.length?h(Fragment,null,h("u",null,t),a.join(n)):null)};export{KolInternalUnderlinedBadgeTextFc as K,isString as i};
@@ -1 +1 @@
1
- {"version":3,"file":"InternalUnderlinedBadgeText-9Tu8seHa.js","sources":["../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isString.js","src/functional-components/InternalUnderlinedBadgeText/InternalUnderlinedBadgeText.tsx"],"sourcesContent":["import baseGetTag from './_baseGetTag.js';\nimport isArray from './isArray.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar stringTag = '[object String]';\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\nfunction isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n}\n\nexport default isString;\n","import { Fragment, h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { BadgeTextPropType } from '../../schema';\n\ntype InternalUnderlinedBadgeTextProps = {\n\tbadgeText: BadgeTextPropType;\n\tlabel: string;\n};\n\nconst KolInternalUnderlinedBadgeTextFc: FC<InternalUnderlinedBadgeTextProps> = ({ badgeText, label }) => {\n\t/* Prefer capitalization as defined in the badge Text, try uppercase/lowercase when there's no match. */\n\tconst badgeTextAsString: string = badgeText;\n\tlet [first, ...rest] = label.split(badgeTextAsString);\n\tif (rest.length === 0) {\n\t\tbadgeText = badgeTextAsString.toUpperCase();\n\t\t[first, ...rest] = label.split(badgeTextAsString);\n\t}\n\tif (rest.length === 0) {\n\t\tbadgeText = badgeTextAsString.toLowerCase();\n\t\t[first, ...rest] = label.split(badgeTextAsString);\n\t}\n\treturn (\n\t\t<>\n\t\t\t{first}\n\t\t\t{rest.length ? (\n\t\t\t\t<>\n\t\t\t\t\t<u>{badgeText}</u>\n\t\t\t\t\t{rest.join(badgeTextAsString)}\n\t\t\t\t</>\n\t\t\t) : null}\n\t\t</>\n\t);\n};\n\nexport default KolInternalUnderlinedBadgeTextFc;\n"],"names":[],"mappings":";;;;;;AAIA;AACA,IAAI,SAAS,GAAG,iBAAiB;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,QAAQ,CAAC,KAAK,EAAE;AACzB,EAAE,OAAO,OAAO,KAAK,IAAI,QAAQ;AACjC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,YAAY,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,IAAI,SAAS,CAAC;AAC9E;;ACnBM,MAAA,gCAAgC,GAAyC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,KAAI;IAEvG,MAAM,iBAAiB,GAAW,SAAS;AAC3C,IAAA,IAAI,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,iBAAiB,CAAC;AACrD,IAAA,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;AACtB,QAAA,SAAS,GAAG,iBAAiB,CAAC,WAAW,EAAE;AAC3C,QAAA,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,iBAAiB,CAAC;;AAElD,IAAA,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;AACtB,QAAA,SAAS,GAAG,iBAAiB,CAAC,WAAW,EAAE;AAC3C,QAAA,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,iBAAiB,CAAC;;AAElD,IAAA,QACC,CAAA,CAAA,QAAA,EAAA,IAAA;QACE,KAAK;AACL,QAAA,IAAI,CAAC,MAAM,IACX,CAAA,CAAA,QAAA,EAAA,IAAA;AACC,YAAA,CAAA,CAAA,GAAA,EAAA,IAAA,EAAI,SAAS,CAAK;AACjB,YAAA,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAC3B,IACA,IAAI,CACN;AAEL;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"InternalUnderlinedBadgeText-Cx9AyLre.js","sources":["../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isString.js","src/functional-components/InternalUnderlinedBadgeText/InternalUnderlinedBadgeText.tsx"],"sourcesContent":["import baseGetTag from './_baseGetTag.js';\nimport isArray from './isArray.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar stringTag = '[object String]';\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\nfunction isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n}\n\nexport default isString;\n","import { Fragment, h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { BadgeTextPropType } from '../../schema';\n\ntype InternalUnderlinedBadgeTextProps = {\n\tbadgeText: BadgeTextPropType;\n\tlabel: string;\n};\n\nconst KolInternalUnderlinedBadgeTextFc: FC<InternalUnderlinedBadgeTextProps> = ({ badgeText, label }) => {\n\t/* Prefer capitalization as defined in the badge Text, try uppercase/lowercase when there's no match. */\n\tconst badgeTextAsString: string = badgeText;\n\tlet [first, ...rest] = label.split(badgeTextAsString);\n\tif (rest.length === 0) {\n\t\tbadgeText = badgeTextAsString.toUpperCase();\n\t\t[first, ...rest] = label.split(badgeTextAsString);\n\t}\n\tif (rest.length === 0) {\n\t\tbadgeText = badgeTextAsString.toLowerCase();\n\t\t[first, ...rest] = label.split(badgeTextAsString);\n\t}\n\treturn (\n\t\t<>\n\t\t\t{first}\n\t\t\t{rest.length ? (\n\t\t\t\t<>\n\t\t\t\t\t<u>{badgeText}</u>\n\t\t\t\t\t{rest.join(badgeTextAsString)}\n\t\t\t\t</>\n\t\t\t) : null}\n\t\t</>\n\t);\n};\n\nexport default KolInternalUnderlinedBadgeTextFc;\n"],"names":[],"mappings":";;;;;;AAIA;AACA,IAAI,SAAS,GAAG,iBAAiB;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,QAAQ,CAAC,KAAK,EAAE;AACzB,EAAE,OAAO,OAAO,KAAK,IAAI,QAAQ;AACjC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,YAAY,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,IAAI,SAAS,CAAC;AAC9E;;ACnBM,MAAA,gCAAgC,GAAyC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,KAAI;IAEvG,MAAM,iBAAiB,GAAW,SAAS;AAC3C,IAAA,IAAI,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,iBAAiB,CAAC;AACrD,IAAA,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;AACtB,QAAA,SAAS,GAAG,iBAAiB,CAAC,WAAW,EAAE;AAC3C,QAAA,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,iBAAiB,CAAC;;AAElD,IAAA,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;AACtB,QAAA,SAAS,GAAG,iBAAiB,CAAC,WAAW,EAAE;AAC3C,QAAA,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,iBAAiB,CAAC;;AAElD,IAAA,QACC,CAAA,CAAA,QAAA,EAAA,IAAA;QACE,KAAK;AACL,QAAA,IAAI,CAAC,MAAM,IACX,CAAA,CAAA,QAAA,EAAA,IAAA;AACC,YAAA,CAAA,CAAA,GAAA,EAAA,IAAA,EAAI,SAAS,CAAK;AACjB,YAAA,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAC3B,IACA,IAAI,CACN;AAEL;;;;","x_google_ignoreList":[0]}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{_ as __rest}from"./Heading-K34kz2yJ.js";import{h,F as Fragment}from"./index-2YbJq5J3.js";import{c as clsx}from"./clsx-eK3rPvPS.js";import{K as KolIconFc}from"./Icon-FjmG-C5E.js";import"./common-zXZUsQ7l.js";import{s as showExpertSlot}from"./reuse-CX4AQDkS.js";import{m as md}from"./markdown-BJ3cxn6B.js";import{i as isString,K as KolInternalUnderlinedBadgeTextFc}from"./InternalUnderlinedBadgeText-9Tu8seHa.js";import{i as isObject}from"./isObject-DvSELytj.js";const IconHelper=e=>{const{class:l,style:s,label:a,icon:n}=e;return h(KolIconFc,{class:clsx("icon",l),style:s,label:a||"",icons:n})},LabelHelper=({label:e,hideLabel:l,allowMarkdown:s,badgeText:a})=>{if(l||!isString(e))return null;const n="kol-span__label";return s?h("span",{class:clsx(n,"md"),innerHTML:md(e)}):h("span",{class:clsx(n)},a?h(KolInternalUnderlinedBadgeTextFc,{label:e,badgeText:a}):e)},KolSpanCoreHelperFc=({hideLabel:e,label:l,badgeText:s,allowMarkdown:a},n)=>{const o=!showExpertSlot(l);return h(Fragment,null,o&&h(LabelHelper,{label:l,hideLabel:e,badgeText:s,allowMarkdown:a}),h("span",{"aria-hidden":o?"true":void 0,class:"kol-span__label",hidden:o},n),isString(s)&&s.length>0&&h("kbd",{class:"badge-text-hint","aria-hidden":"true"},s))},KolSpanFc=(e,l)=>{const{class:s,label:a,hideLabel:n=!1,badgeText:o,allowMarkdown:t,icons:r}=e,c=__rest(e,["class","label","hideLabel","badgeText","allowMarkdown","icons"]);let i=null,b=null,d=null,p=null;return isObject(r)?(i=r.top,b=r.left,d=r.right,p=r.bottom):isString(r)&&(b={icon:r}),h("span",Object.assign({class:clsx("kol-span",{"kol-span--hide-label":n},s)},c),isObject(i)&&h(IconHelper,Object.assign({class:"top"},i)),h("span",{class:"kol-span__container"},isObject(b)&&h(IconHelper,Object.assign({class:"left"},b)),h(KolSpanCoreHelperFc,{label:a,hideLabel:n,allowMarkdown:t,badgeText:o},l),isObject(d)&&h(IconHelper,Object.assign({class:"right"},d))),isObject(p)&&h(IconHelper,Object.assign({class:"bottom"},p)))};export{KolSpanFc as K};
4
+ import{_ as __rest}from"./Heading-BPYmDTUk.js";import{h,F as Fragment}from"./index-BRWth_lT.js";import{c as clsx}from"./clsx-eK3rPvPS.js";import{K as KolIconFc}from"./Icon-CPJLro7v.js";import"./common-zXZUsQ7l.js";import{s as showExpertSlot}from"./reuse-CX4AQDkS.js";import{m as md}from"./markdown-BJ3cxn6B.js";import{i as isString,K as KolInternalUnderlinedBadgeTextFc}from"./InternalUnderlinedBadgeText-Cx9AyLre.js";import{i as isObject}from"./isObject-DvSELytj.js";const IconHelper=e=>{const{class:l,style:s,label:a,icon:n}=e;return h(KolIconFc,{class:clsx("icon",l),style:s,label:a||"",icons:n})},LabelHelper=({label:e,hideLabel:l,allowMarkdown:s,badgeText:a})=>{if(l||!isString(e))return null;const n="kol-span__label";return s?h("span",{class:clsx(n,"md"),innerHTML:md(e)}):h("span",{class:clsx(n)},a?h(KolInternalUnderlinedBadgeTextFc,{label:e,badgeText:a}):e)},KolSpanCoreHelperFc=({hideLabel:e,label:l,badgeText:s,allowMarkdown:a},n)=>{const o=!showExpertSlot(l);return h(Fragment,null,o&&h(LabelHelper,{label:l,hideLabel:e,badgeText:s,allowMarkdown:a}),h("span",{"aria-hidden":o?"true":void 0,class:"kol-span__label",hidden:o},n),isString(s)&&s.length>0&&h("kbd",{class:"badge-text-hint","aria-hidden":"true"},s))},KolSpanFc=(e,l)=>{const{class:s,label:a,hideLabel:n=!1,badgeText:o,allowMarkdown:t,icons:r}=e,c=__rest(e,["class","label","hideLabel","badgeText","allowMarkdown","icons"]);let i=null,d=null,b=null,p=null;return isObject(r)?(i=r.top,d=r.left,b=r.right,p=r.bottom):isString(r)&&(d={icon:r}),h("span",Object.assign({class:clsx("kol-span",{"kol-span--hide-label":n},s)},c),isObject(i)&&h(IconHelper,Object.assign({class:"top"},i)),h("span",{class:"kol-span__container"},isObject(d)&&h(IconHelper,Object.assign({class:"left"},d)),h(KolSpanCoreHelperFc,{label:a,hideLabel:n,allowMarkdown:t,badgeText:o},l),isObject(b)&&h(IconHelper,Object.assign({class:"right"},b))),isObject(p)&&h(IconHelper,Object.assign({class:"bottom"},p)))};export{KolSpanFc as K};
@@ -1 +1 @@
1
- {"version":3,"file":"Span-BlZWELRP.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 { isString, isObject } 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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AM;;AACxB,SAAA,IAAI,QAAQ,CAAC,KAAK,CAAC,EAAE;AAC3B,QAAA,aAAa,GAAG;AACf,YAAA,IAAI,EAAE,KAAK;SACX;;AAGF,IAAA,QACC,CAAM,CAAA,MAAA,EAAA,MAAA,CAAA,MAAA,CAAA,EAAA,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,sBAAsB,EAAE,SAAS,EAAE,EAAE,UAAU,CAAC,IAAM,KAAK,CAAA;AACzF,QAAA,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,CAAA,UAAU,EAAC,MAAA,CAAA,MAAA,CAAA,EAAA,KAAK,EAAC,KAAK,EAAK,EAAA,YAAY,CAAI,CAAA;QACvE,CAAM,CAAA,MAAA,EAAA,EAAA,KAAK,EAAC,qBAAqB,EAAA;AAC/B,YAAA,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA,UAAU,EAAC,MAAA,CAAA,MAAA,CAAA,EAAA,KAAK,EAAC,MAAM,EAAK,EAAA,aAAa,CAAI,CAAA;AAC1E,YAAA,CAAA,CAACA,mBAAc,EAAC,EAAA,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS,EAAA,EACpG,QAAQ,CACO;AAChB,YAAA,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,CAAA,UAAU,EAAC,MAAA,CAAA,MAAA,CAAA,EAAA,KAAK,EAAC,OAAO,EAAK,EAAA,cAAc,EAAI,CACvE;AACN,QAAA,QAAQ,CAAC,eAAe,CAAC,IAAI,EAAC,UAAU,EAAA,MAAA,CAAA,MAAA,CAAA,EAAC,KAAK,EAAC,QAAQ,EAAK,EAAA,eAAe,CAAI,CAAA,CAC1E;AAET;;;;"}
1
+ {"version":3,"file":"Span-BebyS5Q1.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 { isString, isObject } 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":["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;IAEvD,OAAO,CAAA,CAAC,SAAS,EAAA,EAAC,KAAK,EAAE,IAAI,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,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;AAClC,QAAA,OAAO,IAAI;;IAGZ,MAAM,cAAc,GAAG,iBAAiB;IAExC,IAAI,aAAa,EAAE;AAClB,QAAA,OAAO,YAAM,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,EAAE,SAAS,EAAE,EAAE,CAAC,KAAK,CAAC,GAAI;;IAGzE,IAAI,SAAS,EAAE;AACd,QAAA,QACC,CAAM,CAAA,MAAA,EAAA,EAAA,KAAK,E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,UAAU,EAAC,MAAA,CAAA,MAAA,CAAA,EAAA,KAAK,EAAC,OAAO,EAAK,EAAA,cAAc,EAAI,CACvE;AACN,QAAA,QAAQ,CAAC,eAAe,CAAC,IAAI,EAAC,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
- import{L as Log,n as ne,b}from"./common-zXZUsQ7l.js";import{a as setMode}from"./index-2YbJq5J3.js";var appGlobalScript=()=>{setMode(o=>{try{o.shadowRoot instanceof ShadowRoot&&ne(o,b(o))}catch(o){}return"default"}),import("./devtools-D2tZX5IH.js").then(o=>{"object"==typeof o&&null!==o&&"function"==typeof o.initialize&&o.initialize()}).catch(o=>{Log.error(o)})};const globalScripts=appGlobalScript;export{globalScripts as g};
4
+ import{L as Log,n as ne,b}from"./common-zXZUsQ7l.js";import{a as setMode}from"./index-BRWth_lT.js";var appGlobalScript=()=>{setMode(o=>{try{o.shadowRoot instanceof ShadowRoot&&ne(o,b(o))}catch(o){}return"default"}),import("./devtools-CDwLKwYR.js").then(o=>{"object"==typeof o&&null!==o&&"function"==typeof o.initialize&&o.initialize()}).catch(o=>{Log.error(o)})};const globalScripts=appGlobalScript;export{globalScripts as g};
@@ -1 +1 @@
1
- {"version":3,"file":"app-globals-h0jVpMUb.js","sources":["src/global/script.ts","@stencil/core/internal/app-globals"],"sourcesContent":["import { getThemeDetails, setThemeStyle } from 'adopted-style-sheets';\n\nimport { Log } from '../schema';\nimport { setMode } from '@stencil/core';\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":["setThemeStyle","getThemeDetails"],"mappings":";;;;;;AAKA,sBAAe,MAAK;AACnB,IAAA,OAAO,CAAC,CAAC,GAAG,KAAI;AACf,QAAA,IAAI;AACH,YAAA,IAAI,GAAG,CAAC,UAAU,YAAY,UAAU,EAAE;gBACzCA,EAAa,CAAC,GAAG,EAAEC,CAAe,CAAC,GAAG,CAAC,CAAC;;;QAExC,OAAO,KAAK,EAAE;;AAOhB,QAAA,OAAO,SAAS;AACjB,KAAC,CAAC;IAEF,OAAO,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,QAAA,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC;AACjB,KAAC,CAAC;AACJ,CAAC;;AC7BW,MAAC,aAAa,GAAG;;;;"}
1
+ {"version":3,"file":"app-globals-CESfn_CS.js","sources":["src/global/script.ts","@stencil/core/internal/app-globals"],"sourcesContent":["import { getThemeDetails, setThemeStyle } from 'adopted-style-sheets';\n\nimport { Log } from '../schema';\nimport { setMode } from '@stencil/core';\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":["setThemeStyle","getThemeDetails"],"mappings":";;;;;;AAKA,sBAAe,MAAK;AACnB,IAAA,OAAO,CAAC,CAAC,GAAG,KAAI;AACf,QAAA,IAAI;AACH,YAAA,IAAI,GAAG,CAAC,UAAU,YAAY,UAAU,EAAE;gBACzCA,EAAa,CAAC,GAAG,EAAEC,CAAe,CAAC,GAAG,CAAC,CAAC;;;QAExC,OAAO,KAAK,EAAE;;AAOhB,QAAA,OAAO,SAAS;AACjB,KAAC,CAAC;IAEF,OAAO,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,QAAA,GAAG,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
- import{e as watchString,J as getExperimentalMode,j as devHint,u as devWarning}from"./common-zXZUsQ7l.js";import{g as getOptions}from"./bootstrap-B_0ftOOI.js";const validateName=(t,e,i)=>{watchString(t,"_name",e,i)},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,i){var s,o,a,r;if(this.experimentalMode=getExperimentalMode(),this.setFormAssociatedValue=t=>{var e;const i=null===(e=this.formAssociated)||void 0===e?void 0:e.getAttribute("name");null!==i&&""!==i||devHint(` The form field (${this.type}) must have a name attribute to be form-associated. Please define the _name attribute.`);const s=this.tryToStringifyValue(t);this.syncValue(t,s,this.formAssociated),this.syncValue(t,s,this.syncToOwnInput)},this.component=t,this.host=this.findHostWithShadowRoot(i),this.type=e,(null===(s=getOptions())||void 0===s?void 0:s.reflectInputValues)&&isAssociatedTagName(null===(o=this.host)||void 0===o?void 0:o.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,i){if(this.experimentalMode)try{if("boolean"!=typeof(i="object"==typeof i&&null!==i?JSON.stringify(i):i)&&"number"!=typeof i&&"string"!=typeof i)throw new Error("Invalid value type: "+typeof i);null==e||e.setAttribute(t,`${i}`)}catch(i){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 devWarning(`The form field raw value is not able to stringify! ${t}`),""}}syncValue(t,e,i){if(i)switch(this.type){case"file":i.files=t;break;case"select":i.querySelectorAll("option").forEach(t=>{i.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",""),i.appendChild(t)}});break;case"radio":"string"==typeof e&&(i.setAttribute("value",e),i.setAttribute("checked",""),i.value=e);break;default:"string"==typeof e?(i.setAttribute("value",e),i.value=e):(i.removeAttribute("value"),i.value="")}}validateName(t){validateName(this.component,t,{hooks:{afterPatch:()=>{this.setAttribute("name",this.formAssociated,this.component.state._name)}}}),void 0===t&&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)}}export{AssociatedInputController as A};
4
+ import{e as watchString,J as getExperimentalMode,j as devHint,u as devWarning}from"./common-zXZUsQ7l.js";import{g as getOptions}from"./bootstrap-YDZ8Qb_h.js";const validateName=(t,e,i)=>{watchString(t,"_name",e,i)},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,i){var s,o,a,r;if(this.experimentalMode=getExperimentalMode(),this.setFormAssociatedValue=t=>{var e;const i=null===(e=this.formAssociated)||void 0===e?void 0:e.getAttribute("name");null!==i&&""!==i||devHint(` The form field (${this.type}) must have a name attribute to be form-associated. Please define the _name attribute.`);const s=this.tryToStringifyValue(t);this.syncValue(t,s,this.formAssociated),this.syncValue(t,s,this.syncToOwnInput)},this.component=t,this.host=this.findHostWithShadowRoot(i),this.type=e,(null===(s=getOptions())||void 0===s?void 0:s.reflectInputValues)&&isAssociatedTagName(null===(o=this.host)||void 0===o?void 0:o.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,i){if(this.experimentalMode)try{if("boolean"!=typeof(i="object"==typeof i&&null!==i?JSON.stringify(i):i)&&"number"!=typeof i&&"string"!=typeof i)throw new Error("Invalid value type: "+typeof i);null==e||e.setAttribute(t,`${i}`)}catch(i){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 devWarning(`The form field raw value is not able to stringify! ${t}`),""}}syncValue(t,e,i){if(i)switch(this.type){case"file":i.files=t;break;case"select":i.querySelectorAll("option").forEach(t=>{i.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",""),i.appendChild(t)}});break;case"radio":"string"==typeof e&&(i.setAttribute("value",e),i.setAttribute("checked",""),i.value=e);break;default:"string"==typeof e?(i.setAttribute("value",e),i.value=e):(i.removeAttribute("value"),i.value="")}}validateName(t){validateName(this.component,t,{hooks:{afterPatch:()=>{this.setAttribute("name",this.formAssociated,this.component.state._name)}}}),void 0===t&&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)}}export{AssociatedInputController as A};
@@ -1 +1 @@
1
- {"version":3,"file":"associated.controller-BBBKf7S0.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":[],"mappings":";;;;;;AAgBO,MAAM,YAAY,GAAG,CAAC,SAAoC,EAAE,KAAoB,EAAE,OAA4B,KAAU;IAC9H,WAAW,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;AAC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D,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-BVXWSO2G.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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BAAiB,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;YACjC,OAAO,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
+ import{v as setRuntimeMode,V,L as Log}from"./common-zXZUsQ7l.js";import{s as setCustomTagNames}from"./component-names-CkE54Ym7.js";import{i as initializeI18n}from"./i18n-ZF6JbdVP.js";let options,initialized=!1;const bootstrap=async(i,o,t)=>{var n,e;const s="undefined"!=typeof process&&process.env?"production":void 0;setRuntimeMode((null==t?void 0:t.environment)||s||"production"),initializeI18n(null!==(e=null===(n=null==t?void 0:t.translation)||void 0===n?void 0:n.name)&&void 0!==e?e:"de",null==t?void 0:t.translations),(null==t?void 0:t.transformTagName)&&setCustomTagNames(null==t?void 0:t.transformTagName);const a=await V(i,o,t);return initialized=!0,options=t,Log.info("Development mode active - Enhanced debugging features available"),a},register=bootstrap,isInitialized=()=>initialized,getOptions=()=>options;export{bootstrap as b,getOptions as g,isInitialized as i,register as r};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bootstrap-YDZ8Qb_h.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":["coreRegister"],"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;AAC1G,IAAA,cAAc,CAAC,CAAA,cAAc,KAAA,IAAA,IAAd,cAAc,KAAd,MAAA,GAAA,MAAA,GAAA,cAAc,CAAE,WAAW,KAAI,OAAO,IAAI,YAAY,CAAC;IAEtE,cAAc,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;QACrC,iBAAiB,CAAC,cAAc,KAAd,IAAA,IAAA,cAAc,uBAAd,cAAc,CAAE,gBAAgB,CAAC;;IAEpD,MAAM,uBAAuB,GAAG,MAAMA,CAAY,CAAC,MAAM,EAAE,OAAO,EAAE,cAAc,CAAC;IACnF,WAAW,GAAG,IAAI;IAClB,OAAO,GAAG,cAAc;AAGxB,IAAA,GAAG,CAAC,IAAI,CAAC,iEAAiE,CAAC;AAE3E,IAAA,OAAO,uBAAuB;AAC/B;AAEO,MAAM,QAAQ,GAAG;MACX,aAAa,GAAG,MAAM;MACtB,UAAU,GAAG,MAAM;;;;"}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{e as watchString,w as watchValidator}from"./common-zXZUsQ7l.js";import{v as validateAutoComplete}from"./auto-complete-QkT4jBSK.js";import{a as validateHasCounter,v as validateMaxLengthBehavior,b as validateMaxLength}from"./max-length-behavior-DCUK2Rvw.js";import{v as validatePlaceholder}from"./placeholder-CKKvVrmb.js";import{v as validateReadOnly}from"./read-only-D2aPahKx.js";import{v as validateRequired}from"./required-DZ-b_DWV.js";import{I as InputIconController}from"./controller-icon-DB58M2Dn.js";const validatePattern=(t,a,e={})=>{watchString(t,"_pattern",a,e)},PasswordVariantPropTypeOptions=["default","visibility-toggle"],validatePasswordVariant=(t,a)=>{watchValidator(t,"_variant",t=>"string"==typeof t&&PasswordVariantPropTypeOptions.includes(t),new Set(PasswordVariantPropTypeOptions),a)};class InputPasswordController extends InputIconController{constructor(t,a,e){super(t,a,e),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){validateAutoComplete(this.component,t)}validateHasCounter(t){validateHasCounter(this.component,t)}validateMaxLengthBehavior(t){validateMaxLengthBehavior(this.component,t)}validateVariant(t){validatePasswordVariant(this.component,t)}validateMaxLength(t){validateMaxLength(this.component,t,{hooks:{afterPatch:this.afterSyncCharCounter}})}validatePattern(t){validatePattern(this.component,t)}validatePlaceholder(t){validatePlaceholder(this.component,t)}validateReadOnly(t){validateReadOnly(this.component,t)}validateRequired(t){validateRequired(this.component,t)}validateValue(t){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)}}export{InputPasswordController as I};
4
+ import{e as watchString,w as watchValidator}from"./common-zXZUsQ7l.js";import{v as validateAutoComplete}from"./auto-complete-QkT4jBSK.js";import{a as validateHasCounter,v as validateMaxLengthBehavior,b as validateMaxLength}from"./max-length-behavior-DCUK2Rvw.js";import{v as validatePlaceholder}from"./placeholder-CKKvVrmb.js";import{v as validateReadOnly}from"./read-only-D2aPahKx.js";import{v as validateRequired}from"./required-DZ-b_DWV.js";import{I as InputIconController}from"./controller-icon-Dak8u7ck.js";const validatePattern=(t,a,e={})=>{watchString(t,"_pattern",a,e)},PasswordVariantPropTypeOptions=["default","visibility-toggle"],validatePasswordVariant=(t,a)=>{watchValidator(t,"_variant",t=>"string"==typeof t&&PasswordVariantPropTypeOptions.includes(t),new Set(PasswordVariantPropTypeOptions),a)};class InputPasswordController extends InputIconController{constructor(t,a,e){super(t,a,e),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){validateAutoComplete(this.component,t)}validateHasCounter(t){validateHasCounter(this.component,t)}validateMaxLengthBehavior(t){validateMaxLengthBehavior(this.component,t)}validateVariant(t){validatePasswordVariant(this.component,t)}validateMaxLength(t){validateMaxLength(this.component,t,{hooks:{afterPatch:this.afterSyncCharCounter}})}validatePattern(t){validatePattern(this.component,t)}validatePlaceholder(t){validatePlaceholder(this.component,t)}validateReadOnly(t){validateReadOnly(this.component,t)}validateRequired(t){validateRequired(this.component,t)}validateValue(t){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)}}export{InputPasswordController as I};
@@ -1 +1 @@
1
- {"version":3,"file":"controller-BshDxmnY.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, validatePlaceholder, validateReadOnly, validateRequired, validatePattern, 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":[],"mappings":";;;;;;;;;;;AAaO,MAAM,eAAe,GAAG,CAAC,SAAoC,EAAE,KAAuB,EAAE,OAAA,GAA8B,EAAE,KAAU;IACxI,WAAW,CAAC,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,CAAC;AACnD,CAAC;;ACXD,MAAM,8BAA8B,GAAG,CAAC,SAAS,EAAE,mBAAmB,CAAU;AAWzE,MAAM,uBAAuB,GAAG,CAAC,SAAoC,EAAE,KAA+B,KAAU;AACtH,IAAA,cAAc,CACb,SAAS,EACT,UAAU,EACV,CAAC,KAAK,KAAK,OAAO,KAAK,KAAK,QAAQ,IAAI,8BAA8B,CAAC,QAAQ,CAAC,KAAK,CAAC,EACtF,IAAI,GAAG,CAAC,8BAA8B,CAAC,EACvC,KAAK,CACL;AACF,CAAC;;ACHK,MAAO,uBAAwB,SAAQ,mBAAmB,CAAA;AAG/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AAe,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC;;AAE9C;;;;"}
1
+ {"version":3,"file":"controller-BhAbvioO.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, validatePlaceholder, validateReadOnly, validateRequired, validatePattern, 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":[],"mappings":";;;;;;;;;;;AAaO,MAAM,eAAe,GAAG,CAAC,SAAoC,EAAE,KAAuB,EAAE,OAAA,GAA8B,EAAE,KAAU;IACxI,WAAW,CAAC,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,CAAC;AACnD,CAAC;;ACXD,MAAM,8BAA8B,GAAG,CAAC,SAAS,EAAE,mBAAmB,CAAU;AAWzE,MAAM,uBAAuB,GAAG,CAAC,SAAoC,EAAE,KAA+B,KAAU;AACtH,IAAA,cAAc,CACb,SAAS,EACT,UAAU,EACV,CAAC,KAAK,KAAK,OAAO,KAAK,KAAK,QAAQ,IAAI,8BAA8B,CAAC,QAAQ,CAAC,KAAK,CAAC,EACtF,IAAI,GAAG,CAAC,8BAA8B,CAAC,EACvC,KAAK,CACL;AACF,CAAC;;ACHK,MAAO,uBAAwB,SAAQ,mBAAmB,CAAA;AAG/D,IAAA,WAAA,CAAmB,SAAyD,EAAE,IAAY,EAAE,IAAkB,EAAA;AAC7G,QAAA,KAAK,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC;QAInB,IAAoB,CAAA,oBAAA,GAAG,MAAK;YACrC,IAAI,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,KAAK,QAAQ,EAAE;AAC9C,gBAAA,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,cAAc,GAAG,IAAI,CAAC,SAAS,C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AAC,IAAI,CAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE;AAC5C,YAAA,KAAK,EAAE;gBACN,UAAU,EAAE,IAAI,CAAC,oBAAoB;AACrC,aAAA;AACD,SAAA,CAAC;QAEF,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,MAAgB,CAAC;;IAG5D,iBAAiB,GAAA;QACvB,KAAK,CAAC,iBAAiB,EAAE;QACzB,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC;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,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{t as a11yHint,H as watchJsonArrayString,s as setState}from"./common-zXZUsQ7l.js";import{b as hasEnoughReadableChars,c as containsOnlyNumbers}from"./label-DGzuU0HV.js";import{v as validateRequired}from"./required-DZ-b_DWV.js";import{I as InputController}from"./FormFieldStateWrapper-C90koSDb.js";import{v as validateOrientation}from"./orientation-DdsLYtB3.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===hasEnoughReadableChars(t.label,3)&&!1===containsOnlyNumbers(t.label)&&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,a={})=>{watchJsonArrayString(t,"_options",t=>"object"==typeof t&&null!==t&&"string"==typeof t.label&&t.label.length>0,e,void 0,a)},validateOptionsWithOptgroup=(t,e,a={})=>{watchJsonArrayString(t,"_options",validateInputSelectOptions,e,void 0,a)},fillKeyOptionMap=(t,e,a="")=>{e.forEach((e,o)=>{const i=`${a}-${o}`;"object"==typeof e&&null!==e&&"string"==typeof e.label&&e.label.length>0&&(Array.isArray(e.options)?fillKeyOptionMap(t,e.options,i):t.set(i,e))})};class InputCheckboxRadioController extends InputController{constructor(t,e,a){super(t,e,a),this.component=t}validateRequired(t){validateRequired(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateRequired(this.component._required)}}class InputRadioController extends InputCheckboxRadioController{constructor(t,e,a){super(t,e,a),this.keyOptionMap=new Map,this.getOptionByKey=t=>this.keyOptionMap.get(t),this.afterPatchOptions=(t,e,a,o)=>{"_value"===o&&this.setFormAssociatedValue(t)},this.beforePatchOptions=(t,e)=>{const a=e.has("_options")?e.get("_options"):this.component.state._options;if(Array.isArray(a)&&a.length>0){this.keyOptionMap.clear();const t=a.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){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,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)}}export{InputCheckboxRadioController as I,InputRadioController as a,validateOptions as b,fillKeyOptionMap as f,validateOptionsWithOptgroup as v};
4
+ import{t as a11yHint,H as watchJsonArrayString,s as setState}from"./common-zXZUsQ7l.js";import{b as hasEnoughReadableChars,c as containsOnlyNumbers}from"./label-DGzuU0HV.js";import{v as validateRequired}from"./required-DZ-b_DWV.js";import{I as InputController}from"./FormFieldStateWrapper-CGvaBC47.js";import{v as validateOrientation}from"./orientation-DdsLYtB3.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===hasEnoughReadableChars(t.label,3)&&!1===containsOnlyNumbers(t.label)&&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,a={})=>{watchJsonArrayString(t,"_options",t=>"object"==typeof t&&null!==t&&"string"==typeof t.label&&t.label.length>0,e,void 0,a)},validateOptionsWithOptgroup=(t,e,a={})=>{watchJsonArrayString(t,"_options",validateInputSelectOptions,e,void 0,a)},fillKeyOptionMap=(t,e,a="")=>{e.forEach((e,o)=>{const i=`${a}-${o}`;"object"==typeof e&&null!==e&&"string"==typeof e.label&&e.label.length>0&&(Array.isArray(e.options)?fillKeyOptionMap(t,e.options,i):t.set(i,e))})};class InputCheckboxRadioController extends InputController{constructor(t,e,a){super(t,e,a),this.component=t}validateRequired(t){validateRequired(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateRequired(this.component._required)}}class InputRadioController extends InputCheckboxRadioController{constructor(t,e,a){super(t,e,a),this.keyOptionMap=new Map,this.getOptionByKey=t=>this.keyOptionMap.get(t),this.afterPatchOptions=(t,e,a,o)=>{"_value"===o&&this.setFormAssociatedValue(t)},this.beforePatchOptions=(t,e)=>{const a=e.has("_options")?e.get("_options"):this.component.state._options;if(Array.isArray(a)&&a.length>0){this.keyOptionMap.clear();const t=a.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){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,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)}}export{InputCheckboxRadioController as I,InputRadioController as a,validateOptions as b,fillKeyOptionMap as f,validateOptionsWithOptgroup as v};