@public-ui/components 4.1.1-rc.2 → 4.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (442) hide show
  1. package/assets/kolicons/kolicons.eot +0 -0
  2. package/assets/kolicons/kolicons.ttf +0 -0
  3. package/assets/kolicons/kolicons.woff +0 -0
  4. package/assets/kolicons/kolicons.woff2 +0 -0
  5. package/assets/kolicons/style.css +6 -6
  6. package/custom-elements.json +1 -7
  7. package/dist/cjs/{Alert-C3hMI3oh.js → Alert-DUKI4F6t.js} +1 -1
  8. package/dist/cjs/{Alert-C3hMI3oh.js.map → Alert-DUKI4F6t.js.map} +1 -1
  9. package/dist/cjs/{Collapsible-BuDTPOMO.js → Collapsible-C1TrB3xP.js} +1 -1
  10. package/dist/cjs/{Collapsible-BuDTPOMO.js.map → Collapsible-C1TrB3xP.js.map} +1 -1
  11. package/dist/cjs/{CustomSuggestionsOptionsGroup-DBavM4MR.js → CustomSuggestionsOptionsGroup-DjEJ7D2u.js} +1 -1
  12. package/dist/cjs/{CustomSuggestionsOptionsGroup-DBavM4MR.js.map → CustomSuggestionsOptionsGroup-DjEJ7D2u.js.map} +1 -1
  13. package/dist/cjs/{FieldControlStateWrapper-DUh-vPos.js → FieldControlStateWrapper-2yGvk_YF.js} +1 -1
  14. package/dist/cjs/{FieldControlStateWrapper-DUh-vPos.js.map → FieldControlStateWrapper-2yGvk_YF.js.map} +1 -1
  15. package/dist/cjs/{FormFieldStateWrapper-DiKfF9vY.js → FormFieldStateWrapper-QklB-18_.js} +1 -1
  16. package/dist/cjs/{FormFieldStateWrapper-DiKfF9vY.js.map → FormFieldStateWrapper-QklB-18_.js.map} +1 -1
  17. package/dist/cjs/{Heading-g4x-f4VX.js → Heading-BaoT3MhF.js} +1 -1
  18. package/dist/cjs/{Heading-g4x-f4VX.js.map → Heading-BaoT3MhF.js.map} +1 -1
  19. package/dist/cjs/Icon-Cjo0FQnO.js +4 -0
  20. package/dist/cjs/{Icon-xQM_BPGN.js.map → Icon-Cjo0FQnO.js.map} +1 -1
  21. package/dist/cjs/{Input-PNxPL0-E.js → Input-gpYaP5oW.js} +1 -1
  22. package/dist/cjs/{Input-PNxPL0-E.js.map → Input-gpYaP5oW.js.map} +1 -1
  23. package/dist/cjs/{InputStateWrapper-DVaoUrs_.js → InputStateWrapper-C1FQ_lUw.js} +1 -1
  24. package/dist/cjs/{InputStateWrapper-DVaoUrs_.js.map → InputStateWrapper-C1FQ_lUw.js.map} +1 -1
  25. package/dist/cjs/{InternalUnderlinedBadgeText-C63kz_7k.js → InternalUnderlinedBadgeText-BR019eHx.js} +1 -1
  26. package/dist/cjs/{InternalUnderlinedBadgeText-C63kz_7k.js.map → InternalUnderlinedBadgeText-BR019eHx.js.map} +1 -1
  27. package/dist/cjs/{Span-DbRr6xgU.js → Span-C0FLp1D0.js} +1 -1
  28. package/dist/cjs/{Span-DbRr6xgU.js.map → Span-C0FLp1D0.js.map} +1 -1
  29. package/dist/cjs/{app-globals-DBFGa66N.js → app-globals-XxcUX9f4.js} +1 -1
  30. package/dist/cjs/{app-globals-DBFGa66N.js.map → app-globals-XxcUX9f4.js.map} +1 -1
  31. package/dist/cjs/base-controller-p-KkQpDk.js +4 -0
  32. package/dist/cjs/base-controller-p-KkQpDk.js.map +1 -0
  33. package/dist/cjs/controller-BbvzgdxH.js +4 -0
  34. package/dist/cjs/{controller-B7FTgo5S.js.map → controller-BbvzgdxH.js.map} +1 -1
  35. package/dist/cjs/{controller-BUoe5mSY.js → controller-DcGa3hI1.js} +1 -1
  36. package/dist/cjs/{controller-BUoe5mSY.js.map → controller-DcGa3hI1.js.map} +1 -1
  37. package/dist/cjs/controller-FnKBpfim.js +4 -0
  38. package/dist/cjs/controller-FnKBpfim.js.map +1 -0
  39. package/dist/cjs/{controller-B2k6zItW.js → controller-Qxz2zfsf.js} +1 -1
  40. package/dist/cjs/{controller-B2k6zItW.js.map → controller-Qxz2zfsf.js.map} +1 -1
  41. package/dist/cjs/{controller-icon-Bye_-lO8.js → controller-icon-Bp_gYQ45.js} +1 -1
  42. package/dist/cjs/{controller-icon-Bye_-lO8.js.map → controller-icon-Bp_gYQ45.js.map} +1 -1
  43. package/dist/cjs/{dev.utils-JTxdbgzS.js → dev.utils-MxjJBX5i.js} +1 -1
  44. package/dist/cjs/{dev.utils-JTxdbgzS.js.map → dev.utils-MxjJBX5i.js.map} +1 -1
  45. package/dist/cjs/{devtools-vHnumVA-.js → devtools-CCJeclGe.js} +1 -1
  46. package/dist/cjs/{devtools-vHnumVA-.js.map → devtools-CCJeclGe.js.map} +1 -1
  47. package/dist/cjs/index-Do5QHQux.js +4 -0
  48. package/dist/cjs/index-Do5QHQux.js.map +1 -0
  49. package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
  50. package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
  51. package/dist/cjs/kol-alert-wc.cjs.entry.js +1 -1
  52. package/dist/cjs/kol-alert.cjs.entry.js +1 -1
  53. package/dist/cjs/kol-avatar.cjs.entry.js +1 -1
  54. package/dist/cjs/kol-avatar.entry.cjs.js.map +1 -1
  55. package/dist/cjs/kol-badge.cjs.entry.js +1 -1
  56. package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
  57. package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
  58. package/dist/cjs/kol-button-wc.cjs.entry.js +1 -1
  59. package/dist/cjs/kol-button.cjs.entry.js +1 -1
  60. package/dist/cjs/kol-card-wc.cjs.entry.js +1 -1
  61. package/dist/cjs/kol-card.cjs.entry.js +1 -1
  62. package/dist/cjs/kol-click-button.cjs.entry.js +1 -1
  63. package/dist/cjs/kol-combobox.cjs.entry.js +1 -1
  64. package/dist/cjs/kol-details.cjs.entry.js +1 -1
  65. package/dist/cjs/kol-dialog-wc.cjs.entry.js +1 -1
  66. package/dist/cjs/kol-dialog.cjs.entry.js +1 -1
  67. package/dist/cjs/kol-drawer.cjs.entry.js +1 -1
  68. package/dist/cjs/kol-form.cjs.entry.js +1 -1
  69. package/dist/cjs/kol-heading.cjs.entry.js +1 -1
  70. package/dist/cjs/kol-icon.cjs.entry.js +1 -1
  71. package/dist/cjs/kol-image.cjs.entry.js +1 -1
  72. package/dist/cjs/kol-image.entry.cjs.js.map +1 -1
  73. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  74. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  75. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  76. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  77. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  78. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  79. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  80. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  81. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  82. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  83. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  84. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  85. package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
  86. package/dist/cjs/kol-link.cjs.entry.js +1 -1
  87. package/dist/cjs/kol-modal.cjs.entry.js +1 -1
  88. package/dist/cjs/kol-nav.cjs.entry.js +1 -1
  89. package/dist/cjs/kol-pagination-wc.cjs.entry.js +1 -1
  90. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  91. package/dist/cjs/kol-popover-button-wc.cjs.entry.js +1 -1
  92. package/dist/cjs/kol-popover-button.cjs.entry.js +1 -1
  93. package/dist/cjs/kol-popover-wc.cjs.entry.js +1 -1
  94. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  95. package/dist/cjs/kol-progress.entry.cjs.js.map +1 -1
  96. package/dist/cjs/kol-quote.cjs.entry.js +1 -1
  97. package/dist/cjs/kol-quote.entry.cjs.js.map +1 -1
  98. package/dist/cjs/kol-select-wc.cjs.entry.js +1 -1
  99. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  100. package/dist/cjs/kol-single-select.cjs.entry.js +1 -1
  101. package/dist/cjs/kol-skeleton.cjs.entry.js +1 -1
  102. package/dist/cjs/kol-skeleton.entry.cjs.js.map +1 -1
  103. package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
  104. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  105. package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
  106. package/dist/cjs/kol-table-settings-wc.cjs.entry.js +1 -1
  107. package/dist/cjs/kol-table-stateful.cjs.entry.js +1 -1
  108. package/dist/cjs/kol-table-stateless-wc.cjs.entry.js +1 -1
  109. package/dist/cjs/kol-table-stateless-wc.entry.cjs.js.map +1 -1
  110. package/dist/cjs/kol-table-stateless.cjs.entry.js +1 -1
  111. package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
  112. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  113. package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
  114. package/dist/cjs/kol-toolbar.cjs.entry.js +1 -1
  115. package/dist/cjs/kol-tooltip-wc.cjs.entry.js +1 -1
  116. package/dist/cjs/kol-tree-item-wc.cjs.entry.js +1 -1
  117. package/dist/cjs/kol-tree-item.cjs.entry.js +1 -1
  118. package/dist/cjs/kol-tree-wc.cjs.entry.js +1 -1
  119. package/dist/cjs/kol-tree.cjs.entry.js +1 -1
  120. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  121. package/dist/cjs/kolibri.cjs.js +1 -1
  122. package/dist/cjs/label-CuEScldc.js +4 -0
  123. package/dist/cjs/{label-paexHNB6.js.map → label-CuEScldc.js.map} +1 -1
  124. package/dist/cjs/loader.cjs.js +1 -1
  125. package/dist/cjs/src-B6RsOTtm.js +4 -0
  126. package/dist/cjs/{src-BTSBdFm2.js.map → src-B6RsOTtm.js.map} +1 -1
  127. package/dist/cjs/test-component.cjs.entry.js +1 -1
  128. package/dist/components/base-controller.js +1 -1
  129. package/dist/components/base-controller.js.map +1 -1
  130. package/dist/components/controller2.js +1 -1
  131. package/dist/components/controller2.js.map +1 -1
  132. package/dist/components/kol-avatar.js +1 -1
  133. package/dist/components/kol-avatar.js.map +1 -1
  134. package/dist/components/kol-icon.js +1 -1
  135. package/dist/components/kol-image.js +1 -1
  136. package/dist/components/kol-image.js.map +1 -1
  137. package/dist/components/kol-progress.js +1 -1
  138. package/dist/components/kol-progress.js.map +1 -1
  139. package/dist/components/kol-quote.js +1 -1
  140. package/dist/components/kol-quote.js.map +1 -1
  141. package/dist/components/kol-skeleton.js +1 -1
  142. package/dist/components/kol-skeleton.js.map +1 -1
  143. package/dist/components/kol-table-stateless-wc.js +1 -1
  144. package/dist/components/kol-table-stateless-wc.js.map +1 -1
  145. package/dist/esm/{Alert-DJWeD9Xz.js → Alert-w2MT71aB.js} +1 -1
  146. package/dist/{kolibri/Alert-DJWeD9Xz.js.map → esm/Alert-w2MT71aB.js.map} +1 -1
  147. package/dist/esm/{Collapsible-C6YbGDhK.js → Collapsible-rF3-jm6_.js} +1 -1
  148. package/dist/esm/{Collapsible-C6YbGDhK.js.map → Collapsible-rF3-jm6_.js.map} +1 -1
  149. package/dist/esm/{CustomSuggestionsOptionsGroup-BBiujBa7.js → CustomSuggestionsOptionsGroup-BiV1SLtM.js} +1 -1
  150. package/dist/{kolibri/CustomSuggestionsOptionsGroup-BBiujBa7.js.map → esm/CustomSuggestionsOptionsGroup-BiV1SLtM.js.map} +1 -1
  151. package/dist/esm/{FieldControlStateWrapper-D0fzj9Oy.js → FieldControlStateWrapper-Il3HD6ji.js} +1 -1
  152. package/dist/esm/{FieldControlStateWrapper-D0fzj9Oy.js.map → FieldControlStateWrapper-Il3HD6ji.js.map} +1 -1
  153. package/dist/esm/{FormFieldStateWrapper-BFyiN9EY.js → FormFieldStateWrapper--EBKaIYU.js} +1 -1
  154. package/dist/{kolibri/FormFieldStateWrapper-BFyiN9EY.js.map → esm/FormFieldStateWrapper--EBKaIYU.js.map} +1 -1
  155. package/dist/esm/{Heading-Cp72eQOw.js → Heading-B9rTijzp.js} +1 -1
  156. package/dist/esm/{Heading-Cp72eQOw.js.map → Heading-B9rTijzp.js.map} +1 -1
  157. package/dist/esm/{Icon-BI9iw7pD.js → Icon-BYiB0b6v.js} +1 -1
  158. package/dist/esm/{Icon-BI9iw7pD.js.map → Icon-BYiB0b6v.js.map} +1 -1
  159. package/dist/esm/{Input-DXQUCRHF.js → Input-N-fWHtGJ.js} +1 -1
  160. package/dist/esm/{Input-DXQUCRHF.js.map → Input-N-fWHtGJ.js.map} +1 -1
  161. package/dist/esm/{InputStateWrapper-D7DYAs_8.js → InputStateWrapper-CCJNqzRI.js} +1 -1
  162. package/dist/{kolibri/InputStateWrapper-D7DYAs_8.js.map → esm/InputStateWrapper-CCJNqzRI.js.map} +1 -1
  163. package/dist/esm/{InternalUnderlinedBadgeText-DLXbDpmD.js → InternalUnderlinedBadgeText-t86A5_XQ.js} +1 -1
  164. package/dist/{kolibri/InternalUnderlinedBadgeText-DLXbDpmD.js.map → esm/InternalUnderlinedBadgeText-t86A5_XQ.js.map} +1 -1
  165. package/dist/esm/{Span-BXTwASbu.js → Span-ePfPZY-7.js} +1 -1
  166. package/dist/{kolibri/Span-BXTwASbu.js.map → esm/Span-ePfPZY-7.js.map} +1 -1
  167. package/dist/esm/{app-globals-BOEnxU7e.js → app-globals-BQmkJtVQ.js} +1 -1
  168. package/dist/esm/{app-globals-BOEnxU7e.js.map → app-globals-BQmkJtVQ.js.map} +1 -1
  169. package/dist/esm/base-controller-Bkp0Z9l1.js +4 -0
  170. package/dist/esm/base-controller-Bkp0Z9l1.js.map +1 -0
  171. package/dist/esm/controller-BbvDlOS4.js +4 -0
  172. package/dist/esm/controller-BbvDlOS4.js.map +1 -0
  173. package/dist/esm/{controller-vTikIczD.js → controller-INr--hn-.js} +1 -1
  174. package/dist/esm/{controller-vTikIczD.js.map → controller-INr--hn-.js.map} +1 -1
  175. package/dist/esm/controller-icon-By1Ikt1k.js +4 -0
  176. package/dist/esm/{controller-icon-DKRqmDU2.js.map → controller-icon-By1Ikt1k.js.map} +1 -1
  177. package/dist/esm/{controller-D61Uz9xi.js → controller-llnTh4a9.js} +1 -1
  178. package/dist/esm/{controller-D61Uz9xi.js.map → controller-llnTh4a9.js.map} +1 -1
  179. package/dist/esm/{controller-BaXjr15p.js → controller-nyINduH8.js} +1 -1
  180. package/dist/esm/{controller-BaXjr15p.js.map → controller-nyINduH8.js.map} +1 -1
  181. package/dist/esm/{dev.utils-DEjbEXtH.js → dev.utils-DEA-azs5.js} +1 -1
  182. package/dist/esm/{dev.utils-DEjbEXtH.js.map → dev.utils-DEA-azs5.js.map} +1 -1
  183. package/dist/esm/{devtools-CeSDfGe0.js → devtools-CAaKKqia.js} +1 -1
  184. package/dist/{kolibri/devtools-CeSDfGe0.js.map → esm/devtools-CAaKKqia.js.map} +1 -1
  185. package/dist/esm/index-CkrSoIPD.js +4 -0
  186. package/dist/esm/index-CkrSoIPD.js.map +1 -0
  187. package/dist/esm/kol-abbr.entry.js +1 -1
  188. package/dist/esm/kol-accordion.entry.js +1 -1
  189. package/dist/esm/kol-alert-wc.entry.js +1 -1
  190. package/dist/esm/kol-alert.entry.js +1 -1
  191. package/dist/esm/kol-avatar.entry.js +1 -1
  192. package/dist/esm/kol-avatar.entry.js.map +1 -1
  193. package/dist/esm/kol-badge.entry.js +1 -1
  194. package/dist/esm/kol-breadcrumb.entry.js +1 -1
  195. package/dist/esm/kol-button-link.entry.js +1 -1
  196. package/dist/esm/kol-button-wc.entry.js +1 -1
  197. package/dist/esm/kol-button.entry.js +1 -1
  198. package/dist/esm/kol-card-wc.entry.js +1 -1
  199. package/dist/esm/kol-card.entry.js +1 -1
  200. package/dist/esm/kol-click-button.entry.js +1 -1
  201. package/dist/esm/kol-combobox.entry.js +1 -1
  202. package/dist/esm/kol-details.entry.js +1 -1
  203. package/dist/esm/kol-dialog-wc.entry.js +1 -1
  204. package/dist/esm/kol-dialog.entry.js +1 -1
  205. package/dist/esm/kol-drawer.entry.js +1 -1
  206. package/dist/esm/kol-form.entry.js +1 -1
  207. package/dist/esm/kol-heading.entry.js +1 -1
  208. package/dist/esm/kol-icon.entry.js +1 -1
  209. package/dist/esm/kol-image.entry.js +1 -1
  210. package/dist/esm/kol-image.entry.js.map +1 -1
  211. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  212. package/dist/esm/kol-input-color.entry.js +1 -1
  213. package/dist/esm/kol-input-date.entry.js +1 -1
  214. package/dist/esm/kol-input-email.entry.js +1 -1
  215. package/dist/esm/kol-input-file.entry.js +1 -1
  216. package/dist/esm/kol-input-number.entry.js +1 -1
  217. package/dist/esm/kol-input-password.entry.js +1 -1
  218. package/dist/esm/kol-input-radio.entry.js +1 -1
  219. package/dist/esm/kol-input-range.entry.js +1 -1
  220. package/dist/esm/kol-input-text.entry.js +1 -1
  221. package/dist/esm/kol-kolibri.entry.js +1 -1
  222. package/dist/esm/kol-link-button.entry.js +1 -1
  223. package/dist/esm/kol-link-wc.entry.js +1 -1
  224. package/dist/esm/kol-link.entry.js +1 -1
  225. package/dist/esm/kol-modal.entry.js +1 -1
  226. package/dist/esm/kol-nav.entry.js +1 -1
  227. package/dist/esm/kol-pagination-wc.entry.js +1 -1
  228. package/dist/esm/kol-pagination.entry.js +1 -1
  229. package/dist/esm/kol-popover-button-wc.entry.js +1 -1
  230. package/dist/esm/kol-popover-button.entry.js +1 -1
  231. package/dist/esm/kol-popover-wc.entry.js +1 -1
  232. package/dist/esm/kol-progress.entry.js +1 -1
  233. package/dist/esm/kol-progress.entry.js.map +1 -1
  234. package/dist/esm/kol-quote.entry.js +1 -1
  235. package/dist/esm/kol-quote.entry.js.map +1 -1
  236. package/dist/esm/kol-select-wc.entry.js +1 -1
  237. package/dist/esm/kol-select.entry.js +1 -1
  238. package/dist/esm/kol-single-select.entry.js +1 -1
  239. package/dist/esm/kol-skeleton.entry.js +1 -1
  240. package/dist/esm/kol-skeleton.entry.js.map +1 -1
  241. package/dist/esm/kol-skip-nav.entry.js +1 -1
  242. package/dist/esm/kol-spin.entry.js +1 -1
  243. package/dist/esm/kol-split-button.entry.js +1 -1
  244. package/dist/esm/kol-table-settings-wc.entry.js +1 -1
  245. package/dist/esm/kol-table-stateful.entry.js +1 -1
  246. package/dist/esm/kol-table-stateless-wc.entry.js +1 -1
  247. package/dist/esm/kol-table-stateless-wc.entry.js.map +1 -1
  248. package/dist/esm/kol-table-stateless.entry.js +1 -1
  249. package/dist/esm/kol-tabs.entry.js +1 -1
  250. package/dist/esm/kol-textarea.entry.js +1 -1
  251. package/dist/esm/kol-toast-container.entry.js +1 -1
  252. package/dist/esm/kol-toolbar.entry.js +1 -1
  253. package/dist/esm/kol-tooltip-wc.entry.js +1 -1
  254. package/dist/esm/kol-tree-item-wc.entry.js +1 -1
  255. package/dist/esm/kol-tree-item.entry.js +1 -1
  256. package/dist/esm/kol-tree-wc.entry.js +1 -1
  257. package/dist/esm/kol-tree.entry.js +1 -1
  258. package/dist/esm/kol-version.entry.js +1 -1
  259. package/dist/esm/kolibri.js +1 -1
  260. package/dist/esm/label-BWcVeIOr.js +4 -0
  261. package/dist/esm/{label-DVazFQSR.js.map → label-BWcVeIOr.js.map} +1 -1
  262. package/dist/esm/loader.js +1 -1
  263. package/dist/esm/{src-CcGoBQSj.js → src-9cntFd6X.js} +1 -1
  264. package/dist/esm/{src-CcGoBQSj.js.map → src-9cntFd6X.js.map} +1 -1
  265. package/dist/esm/test-component.entry.js +1 -1
  266. package/dist/kolibri/{Alert-DJWeD9Xz.js → Alert-w2MT71aB.js} +1 -1
  267. package/dist/{esm/Alert-DJWeD9Xz.js.map → kolibri/Alert-w2MT71aB.js.map} +1 -1
  268. package/dist/kolibri/{Collapsible-C6YbGDhK.js → Collapsible-rF3-jm6_.js} +1 -1
  269. package/dist/kolibri/{Collapsible-C6YbGDhK.js.map → Collapsible-rF3-jm6_.js.map} +1 -1
  270. package/dist/kolibri/{CustomSuggestionsOptionsGroup-BBiujBa7.js → CustomSuggestionsOptionsGroup-BiV1SLtM.js} +1 -1
  271. package/dist/{esm/CustomSuggestionsOptionsGroup-BBiujBa7.js.map → kolibri/CustomSuggestionsOptionsGroup-BiV1SLtM.js.map} +1 -1
  272. package/dist/kolibri/FieldControlStateWrapper-Il3HD6ji.js +4 -0
  273. package/dist/kolibri/{FieldControlStateWrapper-D0fzj9Oy.js.map → FieldControlStateWrapper-Il3HD6ji.js.map} +1 -1
  274. package/dist/kolibri/FormFieldStateWrapper--EBKaIYU.js +4 -0
  275. package/dist/{esm/FormFieldStateWrapper-BFyiN9EY.js.map → kolibri/FormFieldStateWrapper--EBKaIYU.js.map} +1 -1
  276. package/dist/kolibri/Heading-B9rTijzp.js +4 -0
  277. package/dist/kolibri/{Heading-Cp72eQOw.js.map → Heading-B9rTijzp.js.map} +1 -1
  278. package/dist/kolibri/{Icon-BI9iw7pD.js → Icon-BYiB0b6v.js} +1 -1
  279. package/dist/kolibri/{Icon-BI9iw7pD.js.map → Icon-BYiB0b6v.js.map} +1 -1
  280. package/dist/kolibri/Input-N-fWHtGJ.js +4 -0
  281. package/dist/kolibri/{Input-DXQUCRHF.js.map → Input-N-fWHtGJ.js.map} +1 -1
  282. package/dist/kolibri/{InputStateWrapper-D7DYAs_8.js → InputStateWrapper-CCJNqzRI.js} +1 -1
  283. package/dist/{esm/InputStateWrapper-D7DYAs_8.js.map → kolibri/InputStateWrapper-CCJNqzRI.js.map} +1 -1
  284. package/dist/kolibri/{InternalUnderlinedBadgeText-DLXbDpmD.js → InternalUnderlinedBadgeText-t86A5_XQ.js} +1 -1
  285. package/dist/{esm/InternalUnderlinedBadgeText-DLXbDpmD.js.map → kolibri/InternalUnderlinedBadgeText-t86A5_XQ.js.map} +1 -1
  286. package/dist/kolibri/{Span-BXTwASbu.js → Span-ePfPZY-7.js} +1 -1
  287. package/dist/{esm/Span-BXTwASbu.js.map → kolibri/Span-ePfPZY-7.js.map} +1 -1
  288. package/dist/kolibri/app-globals-BQmkJtVQ.js +4 -0
  289. package/dist/kolibri/{app-globals-BOEnxU7e.js.map → app-globals-BQmkJtVQ.js.map} +1 -1
  290. package/dist/kolibri/base-controller-Bkp0Z9l1.js +4 -0
  291. package/dist/kolibri/base-controller-Bkp0Z9l1.js.map +1 -0
  292. package/dist/kolibri/controller-BbvDlOS4.js +4 -0
  293. package/dist/kolibri/controller-BbvDlOS4.js.map +1 -0
  294. package/dist/kolibri/{controller-vTikIczD.js → controller-INr--hn-.js} +1 -1
  295. package/dist/kolibri/{controller-vTikIczD.js.map → controller-INr--hn-.js.map} +1 -1
  296. package/dist/kolibri/controller-icon-By1Ikt1k.js +4 -0
  297. package/dist/kolibri/{controller-icon-DKRqmDU2.js.map → controller-icon-By1Ikt1k.js.map} +1 -1
  298. package/dist/kolibri/{controller-D61Uz9xi.js → controller-llnTh4a9.js} +1 -1
  299. package/dist/kolibri/{controller-D61Uz9xi.js.map → controller-llnTh4a9.js.map} +1 -1
  300. package/dist/kolibri/{controller-BaXjr15p.js → controller-nyINduH8.js} +1 -1
  301. package/dist/kolibri/{controller-BaXjr15p.js.map → controller-nyINduH8.js.map} +1 -1
  302. package/dist/kolibri/{dev.utils-DEjbEXtH.js → dev.utils-DEA-azs5.js} +1 -1
  303. package/dist/kolibri/{dev.utils-DEjbEXtH.js.map → dev.utils-DEA-azs5.js.map} +1 -1
  304. package/dist/kolibri/{devtools-CeSDfGe0.js → devtools-CAaKKqia.js} +1 -1
  305. package/dist/{esm/devtools-CeSDfGe0.js.map → kolibri/devtools-CAaKKqia.js.map} +1 -1
  306. package/dist/kolibri/{index-CHdBQ7XR.js → index-CkrSoIPD.js} +1 -1
  307. package/dist/kolibri/index-CkrSoIPD.js.map +1 -0
  308. package/dist/kolibri/kol-abbr.entry.js +1 -1
  309. package/dist/kolibri/kol-accordion.entry.js +1 -1
  310. package/dist/kolibri/kol-alert-wc.entry.js +1 -1
  311. package/dist/kolibri/kol-alert.entry.js +1 -1
  312. package/dist/kolibri/kol-avatar.entry.esm.js.map +1 -1
  313. package/dist/kolibri/kol-avatar.entry.js +1 -1
  314. package/dist/kolibri/kol-avatar.entry.js.map +1 -1
  315. package/dist/kolibri/kol-badge.entry.js +1 -1
  316. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  317. package/dist/kolibri/kol-button-link.entry.js +1 -1
  318. package/dist/kolibri/kol-button-wc.entry.js +1 -1
  319. package/dist/kolibri/kol-button.entry.js +1 -1
  320. package/dist/kolibri/kol-card-wc.entry.js +1 -1
  321. package/dist/kolibri/kol-card.entry.js +1 -1
  322. package/dist/kolibri/kol-click-button.entry.js +1 -1
  323. package/dist/kolibri/kol-combobox.entry.js +1 -1
  324. package/dist/kolibri/kol-details.entry.js +1 -1
  325. package/dist/kolibri/kol-dialog-wc.entry.js +1 -1
  326. package/dist/kolibri/kol-dialog.entry.js +1 -1
  327. package/dist/kolibri/kol-drawer.entry.js +1 -1
  328. package/dist/kolibri/kol-form.entry.js +1 -1
  329. package/dist/kolibri/kol-heading.entry.js +1 -1
  330. package/dist/kolibri/kol-icon.entry.js +1 -1
  331. package/dist/kolibri/kol-image.entry.esm.js.map +1 -1
  332. package/dist/kolibri/kol-image.entry.js +1 -1
  333. package/dist/kolibri/kol-image.entry.js.map +1 -1
  334. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  335. package/dist/kolibri/kol-input-color.entry.js +1 -1
  336. package/dist/kolibri/kol-input-date.entry.js +1 -1
  337. package/dist/kolibri/kol-input-email.entry.js +1 -1
  338. package/dist/kolibri/kol-input-file.entry.js +1 -1
  339. package/dist/kolibri/kol-input-number.entry.js +1 -1
  340. package/dist/kolibri/kol-input-password.entry.js +1 -1
  341. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  342. package/dist/kolibri/kol-input-range.entry.js +1 -1
  343. package/dist/kolibri/kol-input-text.entry.js +1 -1
  344. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  345. package/dist/kolibri/kol-link-button.entry.js +1 -1
  346. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  347. package/dist/kolibri/kol-link.entry.js +1 -1
  348. package/dist/kolibri/kol-modal.entry.js +1 -1
  349. package/dist/kolibri/kol-nav.entry.js +1 -1
  350. package/dist/kolibri/kol-pagination-wc.entry.js +1 -1
  351. package/dist/kolibri/kol-pagination.entry.js +1 -1
  352. package/dist/kolibri/kol-popover-button-wc.entry.js +1 -1
  353. package/dist/kolibri/kol-popover-button.entry.js +1 -1
  354. package/dist/kolibri/kol-popover-wc.entry.js +1 -1
  355. package/dist/kolibri/kol-progress.entry.esm.js.map +1 -1
  356. package/dist/kolibri/kol-progress.entry.js +1 -1
  357. package/dist/kolibri/kol-progress.entry.js.map +1 -1
  358. package/dist/kolibri/kol-quote.entry.esm.js.map +1 -1
  359. package/dist/kolibri/kol-quote.entry.js +1 -1
  360. package/dist/kolibri/kol-quote.entry.js.map +1 -1
  361. package/dist/kolibri/kol-select-wc.entry.js +1 -1
  362. package/dist/kolibri/kol-select.entry.js +1 -1
  363. package/dist/kolibri/kol-single-select.entry.js +1 -1
  364. package/dist/kolibri/kol-skeleton.entry.esm.js.map +1 -1
  365. package/dist/kolibri/kol-skeleton.entry.js +1 -1
  366. package/dist/kolibri/kol-skeleton.entry.js.map +1 -1
  367. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  368. package/dist/kolibri/kol-spin.entry.js +1 -1
  369. package/dist/kolibri/kol-split-button.entry.js +1 -1
  370. package/dist/kolibri/kol-table-settings-wc.entry.js +1 -1
  371. package/dist/kolibri/kol-table-stateful.entry.js +1 -1
  372. package/dist/kolibri/kol-table-stateless-wc.entry.esm.js.map +1 -1
  373. package/dist/kolibri/kol-table-stateless-wc.entry.js +1 -1
  374. package/dist/kolibri/kol-table-stateless-wc.entry.js.map +1 -1
  375. package/dist/kolibri/kol-table-stateless.entry.js +1 -1
  376. package/dist/kolibri/kol-tabs.entry.js +1 -1
  377. package/dist/kolibri/kol-textarea.entry.js +1 -1
  378. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  379. package/dist/kolibri/kol-toolbar.entry.js +1 -1
  380. package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
  381. package/dist/kolibri/kol-tree-item-wc.entry.js +1 -1
  382. package/dist/kolibri/kol-tree-item.entry.js +1 -1
  383. package/dist/kolibri/kol-tree-wc.entry.js +1 -1
  384. package/dist/kolibri/kol-tree.entry.js +1 -1
  385. package/dist/kolibri/kol-version.entry.js +1 -1
  386. package/dist/kolibri/kolibri.esm.js +1 -1
  387. package/dist/kolibri/label-BWcVeIOr.js +4 -0
  388. package/dist/kolibri/{label-DVazFQSR.js.map → label-BWcVeIOr.js.map} +1 -1
  389. package/dist/kolibri/src-9cntFd6X.js +4 -0
  390. package/dist/kolibri/{src-CcGoBQSj.js.map → src-9cntFd6X.js.map} +1 -1
  391. package/dist/kolibri/test-component.entry.js +1 -1
  392. package/dist/types/components/_skeleton/web-components/skeleton/component.d.ts +1 -3
  393. package/dist/types/components/progress/component.d.ts +0 -3
  394. package/dist/types/components/table-stateless/component.d.ts +5 -0
  395. package/dist/types/components.d.ts +0 -8
  396. package/dist/types/internal/functional-components/avatar/api.d.ts +4 -2
  397. package/dist/types/internal/functional-components/avatar/controller.d.ts +0 -1
  398. package/dist/types/internal/functional-components/base-controller.d.ts +5 -2
  399. package/dist/types/internal/functional-components/click-button/controller.d.ts +0 -1
  400. package/dist/types/internal/functional-components/image/controller.d.ts +0 -1
  401. package/dist/types/internal/functional-components/progress/api.d.ts +2 -3
  402. package/dist/types/internal/functional-components/progress/controller.d.ts +0 -1
  403. package/dist/types/internal/functional-components/quote/controller.d.ts +0 -1
  404. package/dist/types/internal/functional-components/skeleton/api.d.ts +7 -4
  405. package/dist/types/internal/functional-components/skeleton/controller.d.ts +0 -2
  406. package/dist/types/internal/props/helpers/factory.d.ts +2 -2
  407. package/dist/types/internal/props/index.d.ts +1 -1
  408. package/doc/skeleton.md +3 -4
  409. package/package.json +5 -5
  410. package/vscode-custom-data.json +0 -4
  411. package/dist/cjs/Icon-xQM_BPGN.js +0 -4
  412. package/dist/cjs/base-controller-DH3vQNQ9.js +0 -4
  413. package/dist/cjs/base-controller-DH3vQNQ9.js.map +0 -1
  414. package/dist/cjs/controller-B7FTgo5S.js +0 -4
  415. package/dist/cjs/controller-DbjuLf_n.js +0 -4
  416. package/dist/cjs/controller-DbjuLf_n.js.map +0 -1
  417. package/dist/cjs/index-0zHTL6Wf.js +0 -4
  418. package/dist/cjs/index-0zHTL6Wf.js.map +0 -1
  419. package/dist/cjs/label-paexHNB6.js +0 -4
  420. package/dist/cjs/src-BTSBdFm2.js +0 -4
  421. package/dist/esm/base-controller-DXBNrrLx.js +0 -4
  422. package/dist/esm/base-controller-DXBNrrLx.js.map +0 -1
  423. package/dist/esm/controller-CseHvmhJ.js +0 -4
  424. package/dist/esm/controller-CseHvmhJ.js.map +0 -1
  425. package/dist/esm/controller-icon-DKRqmDU2.js +0 -4
  426. package/dist/esm/index-CHdBQ7XR.js +0 -4
  427. package/dist/esm/index-CHdBQ7XR.js.map +0 -1
  428. package/dist/esm/label-DVazFQSR.js +0 -4
  429. package/dist/kolibri/FieldControlStateWrapper-D0fzj9Oy.js +0 -4
  430. package/dist/kolibri/FormFieldStateWrapper-BFyiN9EY.js +0 -4
  431. package/dist/kolibri/Heading-Cp72eQOw.js +0 -4
  432. package/dist/kolibri/Input-DXQUCRHF.js +0 -4
  433. package/dist/kolibri/app-globals-BOEnxU7e.js +0 -4
  434. package/dist/kolibri/base-controller-DXBNrrLx.js +0 -4
  435. package/dist/kolibri/base-controller-DXBNrrLx.js.map +0 -1
  436. package/dist/kolibri/controller-CseHvmhJ.js +0 -4
  437. package/dist/kolibri/controller-CseHvmhJ.js.map +0 -1
  438. package/dist/kolibri/controller-icon-DKRqmDU2.js +0 -4
  439. package/dist/kolibri/index-CHdBQ7XR.js.map +0 -1
  440. package/dist/kolibri/label-DVazFQSR.js +0 -4
  441. package/dist/kolibri/src-CcGoBQSj.js +0 -4
  442. package/dist/types/internal/props/initials.d.ts +0 -3
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{h as e,r as n,H as t}from"./index-CHdBQ7XR.js";import"./common-BIkdAxr0.js";import{l as r}from"./label-DVazFQSR.js";import{c as o,a as s,n as i,b as l,B as a}from"./base-controller-DXBNrrLx.js";const c=o(s,e=>e>0),h=o(i,e=>e.length>0),d=l((e,n)=>{const t=s(e);return t<n.min?n.min:t>n.max?n.max:t},e=>e>=0),u=["bar","cycle"],p=o(e=>{const n=i(e);if(u.includes(n))return n;throw new Error(`Invalid progress variant: ${n}`)},()=>!0),m=342,g=({max:n,value:t})=>e("svg",{width:"100",viewBox:"0 0 120 120",xmlns:"http://www.w3.org/2000/svg"},e("circle",{class:"kol-progress__cycle-background",cx:"60",cy:"60",r:"54.5",fill:"currentColor",stroke:"currentColor","stroke-width":"8"}),e("circle",{class:"kol-progress__cycle-whitespace",cx:"60",cy:"60",r:"59",fill:"currentColor",stroke:"currentColor","stroke-width":"3"}),e("circle",{class:"kol-progress__cycle-border",cx:"60",cy:"60",r:"59",fill:"currentColor",stroke:"currentColor","stroke-width":"1"}),e("circle",{class:"kol-progress__cycle-whitespace",cx:"60",cy:"60",r:"51",fill:"currentColor",stroke:"currentColor","stroke-width":"1"}),e("circle",{class:"kol-progress__cycle-border",cx:"60",cy:"60",r:"50",fill:"currentColor",stroke:"currentColor","stroke-width":"1"}),e("circle",{class:"kol-progress__cycle-progress",fill:"currentColor",stroke:"currentColor","stroke-linecap":"round","stroke-dasharray":`${Math.round(t/n*m)}px 342px`,"stroke-width":"6",cx:"60",cy:"60",r:"54.5"})),b=({max:n,value:t})=>{const r=t/n*100;return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"12",overflow:"visible"},e("rect",{class:"kol-progress__bar-background",x:"1",y:"1",height:"11",rx:"5",fill:"currentColor",stroke:"currentColor","stroke-width":"3",width:"100%"}),e("rect",{class:"kol-progress__bar-border",x:"1",y:"1",height:"11",rx:"5",fill:"currentColor",stroke:"currentColor","stroke-width":"1",width:"100%"}),e("rect",{class:"kol-progress__bar-progress",x:"3",y:"3",height:"7",rx:"3.5",fill:"currentColor",stroke:"currentColor","stroke-width":"3",style:{width:`calc(${r}% - 4px)`}}))},f=(n,t,r)=>{switch(n){case"cycle":return e(g,{max:t,value:r});case"bar":return e(b,{max:t,value:r});default:throw new Error(`Progress variant ${n} not implemented.`)}},k=n=>{const{label:t,max:r,unit:a,value:l,variant:o,liveValue:s}=n,i="%"===a,c=i?`${Math.round(s/r*100)}`:s,h=i?Math.round(l/r*100):l,d=`${`${(i?100:r)+1}`.length}ch`;return e("div",{class:"kol-progress"},e("div",{"aria-hidden":"true",class:{"kol-progress__cycle":"cycle"===o,"kol-progress__bar":"bar"===o}},"bar"===o&&t&&e("div",{class:"kol-progress__bar-label"},t),f(o,r,l),"cycle"===o&&e("div",{class:"kol-progress__cycle-text"},t&&e("div",{class:"kol-progress__cycle-label"},t),e("div",{class:"kol-progress__cycle-value"},`${h} ${a}`)),"bar"===o&&e("div",{class:"kol-progress__bar-value",style:{width:d}},h),"bar"===o&&e("div",{class:"kol-progress__bar-unit"},a)),e("progress",{class:"visually-hidden","aria-busy":l<r?"true":"false",max:r,value:l}),e("span",{"aria-live":"polite","aria-relevant":"removals text",class:"visually-hidden"},i?`${c} %`:`${c} von ${r} ${a}`))};class y extends a{constructor(e){super(e,{label:"",max:100,unit:"%",value:0,variant:"bar"})}componentWillLoad(e){const{label:n,max:t,unit:r,value:a,variant:l}=e;this.watchLabel(n),this.watchMax(t),this.watchUnit(r),this.watchValue(a),this.watchVariant(l),this.setState("liveValue",this.getProps().value),this.setState("max",this.getProps().max),this.startLiveValueInterval()}watchLabel(e){r.apply(e,e=>{this.setProp("label",e)})}watchMax(e){c.apply(e,e=>{this.setProp("max",e),this.setState("max",e)}),this.watchValue(this.getProps().value)}watchUnit(e){h.apply(e,e=>{this.setProp("unit",e),this.setState("unit",e)})}watchValue(e){d.apply(e,e=>{this.setProp("value",e)},{min:0,max:this.getProps().max})}watchVariant(e){p.apply(e,e=>{this.setProp("variant",e),this.setState("variant",e)})}startLiveValueInterval(){this.interval=setInterval(()=>{const{value:e}=this.getProps();this.component.liveValue!==e&&this.setState("liveValue",e)},5e3)}destroy(){this.interval&&(clearInterval(this.interval),this.interval=void 0)}}const w="/* forward the rem function */\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n .hastooltip {\n z-index: 900 !important;\n }\n}\n@layer kol-component {\n .kol-progress__bar {\n display: grid;\n column-gap: 0.05rem;\n align-items: center;\n grid-template-areas: \"LABEL LABEL LABEL\" \"BAR VALUE UNIT\";\n grid-template-columns: 1fr auto;\n }\n .kol-progress__bar-label {\n grid-column-end: 2;\n grid-area: LABEL;\n }\n .kol-progress__bar svg {\n grid-area: BAR;\n }\n .kol-progress__bar-value {\n grid-area: VALUE;\n text-align: right;\n }\n .kol-progress__bar-unit {\n grid-area: UNIT;\n }\n .kol-progress__bar-border {\n fill: transparent;\n stroke: black;\n }\n .kol-progress__bar-background {\n fill: lightgray;\n stroke: white;\n }\n .kol-progress__bar-progress {\n fill: #0075ff;\n stroke: transparent;\n }\n @media (prefers-reduced-motion: no-preference) {\n .kol-progress__bar-progress {\n transition: 250ms ease-in-out 50ms;\n }\n }\n .kol-progress__cycle {\n display: grid;\n align-content: center;\n justify-items: center;\n grid-template-areas: \"ALL\";\n grid-template-columns: auto;\n }\n .kol-progress__cycle > * {\n grid-area: ALL;\n }\n .kol-progress__cycle-text {\n display: flex;\n flex-direction: column;\n justify-content: center;\n font-size: x-small;\n text-align: center;\n }\n .kol-progress__cycle-text * {\n background-color: white;\n }\n .kol-progress__cycle-background {\n fill: transparent;\n stroke: lightgray;\n }\n .kol-progress__cycle-border {\n fill: transparent;\n stroke: black;\n }\n .kol-progress__cycle-whitespace {\n fill: transparent;\n stroke: white;\n }\n .kol-progress__cycle-progress {\n transform: rotate(-90deg);\n transform-origin: 50% 50%;\n fill: transparent;\n stroke: #0075ff;\n }\n @media (prefers-reduced-motion: no-preference) {\n .kol-progress__cycle-progress {\n transition: 250ms ease-in-out 50ms;\n }\n }\n}",_=class{constructor(e){n(this,e),this.ctrl=new y(this),this.unit="%",this.variant="bar",this.liveValue=0,this.max=this._max}watchLabel(e){this.ctrl.watchLabel(e)}watchMax(e){this.ctrl.watchMax(e)}watchUnit(e){this.ctrl.watchUnit(e)}watchValue(e){this.ctrl.watchValue(e)}watchVariant(e){this.ctrl.watchVariant(e)}componentWillLoad(){this.ctrl.componentWillLoad({label:this._label,max:this._max,unit:this._unit,value:this._value,variant:this._variant})}disconnectedCallback(){this.ctrl.destroy()}render(){const{label:n,max:r,unit:a,value:l,variant:o}=this.ctrl.getProps(),{liveValue:s}=this;return e(t,{key:"c101389f829d2be6f356a198fff8a557d6bcac46"},e(k,{key:"805ea44845b7fb33b5e993b9dd4f5b2848933d7b",label:n,max:r,unit:a,value:l,variant:o,liveValue:s}))}static get watchers(){return{_label:["watchLabel"],_max:["watchMax"],_unit:["watchUnit"],_value:["watchValue"],_variant:["watchVariant"]}}};_.style={default:w};export{_ as kol_progress};
4
+ import{h as e,r as n,H as t}from"./index-CkrSoIPD.js";import"./common-BIkdAxr0.js";import{l as r}from"./label-BWcVeIOr.js";import{c as o,a as s,n as l,b as a,B as i}from"./base-controller-Bkp0Z9l1.js";const c=o(s,e=>e>0),h=o(l,e=>e.length>0),d=a((e,n)=>{const t=s(e);return t<n.min?n.min:t>n.max?n.max:t},e=>e>=0),p=["bar","cycle"],u=o(e=>{const n=l(e);if(p.includes(n))return n;throw new Error(`Invalid progress variant: ${n}`)},()=>!0),g=342,m=({max:n,value:t})=>e("svg",{width:"100",viewBox:"0 0 120 120",xmlns:"http://www.w3.org/2000/svg"},e("circle",{class:"kol-progress__cycle-background",cx:"60",cy:"60",r:"54.5",fill:"currentColor",stroke:"currentColor","stroke-width":"8"}),e("circle",{class:"kol-progress__cycle-whitespace",cx:"60",cy:"60",r:"59",fill:"currentColor",stroke:"currentColor","stroke-width":"3"}),e("circle",{class:"kol-progress__cycle-border",cx:"60",cy:"60",r:"59",fill:"currentColor",stroke:"currentColor","stroke-width":"1"}),e("circle",{class:"kol-progress__cycle-whitespace",cx:"60",cy:"60",r:"51",fill:"currentColor",stroke:"currentColor","stroke-width":"1"}),e("circle",{class:"kol-progress__cycle-border",cx:"60",cy:"60",r:"50",fill:"currentColor",stroke:"currentColor","stroke-width":"1"}),e("circle",{class:"kol-progress__cycle-progress",fill:"currentColor",stroke:"currentColor","stroke-linecap":"round","stroke-dasharray":`${Math.round(t/n*g)}px 342px`,"stroke-width":"6",cx:"60",cy:"60",r:"54.5"})),b=({max:n,value:t})=>{const r=t/n*100;return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"12",overflow:"visible"},e("rect",{class:"kol-progress__bar-background",x:"1",y:"1",height:"11",rx:"5",fill:"currentColor",stroke:"currentColor","stroke-width":"3",width:"100%"}),e("rect",{class:"kol-progress__bar-border",x:"1",y:"1",height:"11",rx:"5",fill:"currentColor",stroke:"currentColor","stroke-width":"1",width:"100%"}),e("rect",{class:"kol-progress__bar-progress",x:"3",y:"3",height:"7",rx:"3.5",fill:"currentColor",stroke:"currentColor","stroke-width":"3",style:{width:`calc(${r}% - 4px)`}}))},f=(n,t,r)=>{switch(n){case"cycle":return e(m,{max:t,value:r});case"bar":return e(b,{max:t,value:r});default:throw new Error(`Progress variant ${n} not implemented.`)}},k=n=>{const{label:t,max:r,unit:a,value:l,variant:o,liveValue:s}=n,i="%"===a,c=i?`${Math.round(s/r*100)}`:s,h=i?Math.round(l/r*100):l,d=`${`${(i?100:r)+1}`.length}ch`;return e("div",{class:"kol-progress"},e("div",{"aria-hidden":"true",class:{"kol-progress__cycle":"cycle"===o,"kol-progress__bar":"bar"===o}},"bar"===o&&t&&e("div",{class:"kol-progress__bar-label"},t),f(o,r,l),"cycle"===o&&e("div",{class:"kol-progress__cycle-text"},t&&e("div",{class:"kol-progress__cycle-label"},t),e("div",{class:"kol-progress__cycle-value"},`${h} ${a}`)),"bar"===o&&e("div",{class:"kol-progress__bar-value",style:{width:d}},h),"bar"===o&&e("div",{class:"kol-progress__bar-unit"},a)),e("progress",{class:"visually-hidden","aria-busy":l<r?"true":"false",max:r,value:l}),e("span",{"aria-live":"polite","aria-relevant":"removals text",class:"visually-hidden"},i?`${c} %`:`${c} von ${r} ${a}`))};class y extends i{componentWillLoad(e){const{label:n,max:t,unit:r,value:a,variant:l}=e;this.watchLabel(n),this.watchMax(t),this.watchUnit(r),this.watchValue(a),this.watchVariant(l),this.setState("liveValue",this.getProps().value),this.startLiveValueInterval()}watchLabel(e){r.apply(e,e=>{this.setProp("label",e)},"")}watchMax(e){c.apply(e,e=>{this.setProp("max",e),this.watchValue(this.getRawProps().value)},100)}watchUnit(e){h.apply(e,e=>{this.setProp("unit",e)},"%")}watchValue(e){this.setRawProp("value",e),d.apply(e,e=>{this.setProp("value",e)},{min:0,max:this.getProps().max},0)}watchVariant(e){u.apply(e,e=>{this.setProp("variant",e)},"bar")}startLiveValueInterval(){this.interval=setInterval(()=>{const{value:e}=this.getProps();this.component.liveValue!==e&&this.setState("liveValue",e)},5e3)}destroy(){this.interval&&(clearInterval(this.interval),this.interval=void 0)}}const w="/* forward the rem function */\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n .hastooltip {\n z-index: 900 !important;\n }\n}\n@layer kol-component {\n .kol-progress__bar {\n display: grid;\n column-gap: 0.05rem;\n align-items: center;\n grid-template-areas: \"LABEL LABEL LABEL\" \"BAR VALUE UNIT\";\n grid-template-columns: 1fr auto;\n }\n .kol-progress__bar-label {\n grid-column-end: 2;\n grid-area: LABEL;\n }\n .kol-progress__bar svg {\n grid-area: BAR;\n }\n .kol-progress__bar-value {\n grid-area: VALUE;\n text-align: right;\n }\n .kol-progress__bar-unit {\n grid-area: UNIT;\n }\n .kol-progress__bar-border {\n fill: transparent;\n stroke: black;\n }\n .kol-progress__bar-background {\n fill: lightgray;\n stroke: white;\n }\n .kol-progress__bar-progress {\n fill: #0075ff;\n stroke: transparent;\n }\n @media (prefers-reduced-motion: no-preference) {\n .kol-progress__bar-progress {\n transition: 250ms ease-in-out 50ms;\n }\n }\n .kol-progress__cycle {\n display: grid;\n align-content: center;\n justify-items: center;\n grid-template-areas: \"ALL\";\n grid-template-columns: auto;\n }\n .kol-progress__cycle > * {\n grid-area: ALL;\n }\n .kol-progress__cycle-text {\n display: flex;\n flex-direction: column;\n justify-content: center;\n font-size: x-small;\n text-align: center;\n }\n .kol-progress__cycle-text * {\n background-color: white;\n }\n .kol-progress__cycle-background {\n fill: transparent;\n stroke: lightgray;\n }\n .kol-progress__cycle-border {\n fill: transparent;\n stroke: black;\n }\n .kol-progress__cycle-whitespace {\n fill: transparent;\n stroke: white;\n }\n .kol-progress__cycle-progress {\n transform: rotate(-90deg);\n transform-origin: 50% 50%;\n fill: transparent;\n stroke: #0075ff;\n }\n @media (prefers-reduced-motion: no-preference) {\n .kol-progress__cycle-progress {\n transition: 250ms ease-in-out 50ms;\n }\n }\n}",_=class{constructor(e){n(this,e),this.ctrl=new y(this),this.liveValue=0}watchLabel(e){this.ctrl.watchLabel(e)}watchMax(e){this.ctrl.watchMax(e)}watchUnit(e){this.ctrl.watchUnit(e)}watchValue(e){this.ctrl.watchValue(e)}watchVariant(e){this.ctrl.watchVariant(e)}componentWillLoad(){this.ctrl.componentWillLoad({label:this._label,max:this._max,unit:this._unit,value:this._value,variant:this._variant})}disconnectedCallback(){this.ctrl.destroy()}render(){const{label:n,max:r,unit:a,value:l,variant:o}=this.ctrl.getProps(),{liveValue:s}=this;return e(t,{key:"3e780e20fdf0435675aa4139a34784d335b8ca0d"},e(k,{key:"7c57e3c56ada9b13315f48565c9de2efa580b196",label:n,max:r,unit:a,value:l,variant:o,liveValue:s}))}static get watchers(){return{_label:["watchLabel"],_max:["watchMax"],_unit:["watchUnit"],_value:["watchValue"],_variant:["watchVariant"]}}};_.style={default:w};export{_ as kol_progress};
@@ -1 +1 @@
1
- {"version":3,"names":["h","registerInstance","Host","labelProp","createPropDefinition","normalizeNumber","normalizeString","createDependentPropDefinition","BaseController","maxProp","v","unitProp","length","clampedNumberValueProp","value","deps","normalized","min","max","progressVariantOptions","variantProgressProp","str","includes","Error","FULL_CIRCLE","CycleSvg","width","viewBox","xmlns","class","cx","cy","r","fill","stroke","Math","round","BarSvg","percentage","height","overflow","x","y","rx","style","createProgressSVG","variant","ProgressFC","props","label","unit","liveValue","isPercentage","liveProgressValue","displayValue","valueColumnWidth","ProgressController","constructor","states","super","componentWillLoad","this","watchLabel","watchMax","watchUnit","watchValue","watchVariant","setState","getProps","startLiveValueInterval","apply","setProp","interval","setInterval","component","destroy","clearInterval","undefined","defaultStyleCss","KolProgress","hostRef","ctrl","_max","_label","_unit","_value","_variant","disconnectedCallback","render","key","watchers","default"],"sources":["0"],"mappings":";;;YAGSA,OAAQC,OAAuBC,MAAY,4BAC7C,mCACOC,MAAiB,kCACjBC,OAA2BC,OAAsBC,OAAsBC,OAAoCC,MAAsB,gCAE/I,MAAMC,EAAUL,EAAqBC,GAAkBK,GAAMA,EAAI,IAEjE,MAAMC,EAAWP,EAAqBE,GAAkBI,GAAMA,EAAEE,OAAS,IAEzE,MAAMC,EAAyBN,GAA8B,CAACO,EAAOC,KACjE,MAAMC,EAAaX,EAAgBS,GACnC,GAAIE,EAAaD,EAAKE,IAAK,CACvB,OAAOF,EAAKE,GAChB,MACK,GAAID,EAAaD,EAAKG,IAAK,CAC5B,OAAOH,EAAKG,GAChB,CACA,OAAOF,CAAU,IACjBN,GAAMA,GAAK,IAEf,MAAMS,EAAyB,CAAC,MAAO,SACvC,MAAMC,EAAsBhB,GAAsBU,IAC9C,MAAMO,EAAMf,EAAgBQ,GAC5B,GAAIK,EAAuBG,SAASD,GAAM,CACtC,OAAOA,CACX,CACA,MAAM,IAAIE,MAAM,6BAA6BF,IAAM,IACpD,IAAM,OAET,MAAMG,EAAc,IACpB,MAAMC,EAAW,EAAGP,MAAKJ,WAAad,EAAE,MAAO,CAAE0B,MAAO,MAAOC,QAAS,cAAeC,MAAO,8BAAgC5B,EAAE,SAAU,CAAE6B,MAAO,iCAAkCC,GAAI,KAAMC,GAAI,KAAMC,EAAG,OAAQC,KAAM,eAAgBC,OAAQ,eAAgB,eAAgB,MAAQlC,EAAE,SAAU,CAA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MjB,UAAEA,GAAcU,KACtB,OAAQ7D,EAAEE,EAAM,CAAEuF,IAAK,4CAA8CzF,EAAE+C,EAAY,CAAE0C,IAAK,2CAA4CxC,MAAOA,EAAO/B,IAAKA,EAAKgC,KAAMA,EAAMpC,MAAOA,EAAOgC,QAASA,EAASK,UAAWA,IACzN,CACA,mBAAWuC,GAAa,MAAO,CAC3BP,OAAU,CAAC,cACXD,KAAQ,CAAC,YACTE,MAAS,CAAC,aACVC,OAAU,CAAC,cACXC,SAAY,CAAC,gBACd,GAEPP,EAAYnC,MAAQ,CAChB+C,QAASb,UAGJC","ignoreList":[]}
1
+ {"version":3,"names":["h","registerInstance","Host","labelProp","createPropDefinition","normalizeNumber","normalizeString","createDependentPropDefinition","BaseController","maxProp","v","unitProp","length","clampedNumberValueProp","value","deps","normalized","min","max","progressVariantOptions","variantProgressProp","str","includes","Error","FULL_CIRCLE","CycleSvg","width","viewBox","xmlns","class","cx","cy","r","fill","stroke","Math","round","BarSvg","percentage","height","overflow","x","y","rx","style","createProgressSVG","variant","ProgressFC","props","label","unit","liveValue","isPercentage","liveProgressValue","displayValue","valueColumnWidth","ProgressController","componentWillLoad","this","watchLabel","watchMax","watchUnit","watchValue","watchVariant","setState","getProps","startLiveValueInterval","apply","setProp","getRawProps","setRawProp","interval","setInterval","component","destroy","clearInterval","undefined","defaultStyleCss","KolProgress","constructor","hostRef","ctrl","_label","_max","_unit","_value","_variant","disconnectedCallback","render","key","watchers","default"],"sources":["0"],"mappings":";;;YAGSA,OAAQC,OAAuBC,MAAY,4BAC7C,mCACOC,MAAiB,kCACjBC,OAA2BC,OAAsBC,OAAsBC,OAAoCC,MAAsB,gCAE/I,MAAMC,EAAUL,EAAqBC,GAAkBK,GAAMA,EAAI,IAEjE,MAAMC,EAAWP,EAAqBE,GAAkBI,GAAMA,EAAEE,OAAS,IAEzE,MAAMC,EAAyBN,GAA8B,CAACO,EAAOC,KACjE,MAAMC,EAAaX,EAAgBS,GACnC,GAAIE,EAAaD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,CACA,iBAAA2C,GACIC,KAAKuB,KAAKxB,kBAAkB,CACxBR,MAAOS,KAAKwB,OACZhE,IAAKwC,KAAKyB,KACVjC,KAAMQ,KAAK0B,MACXtE,MAAO4C,KAAK2B,OACZvC,QAASY,KAAK4B,UAEtB,CACA,oBAAAC,GACI7B,KAAKuB,KAAKP,SACd,CACA,MAAAc,GACI,MAAMvC,MAAEA,EAAK/B,IAAEA,EAAGgC,KAAEA,EAAIpC,MAAEA,EAAKgC,QAAEA,GAAYY,KAAKuB,KAAKhB,WACvD,MAAMd,UAAEA,GAAcO,KACtB,OAAQ1D,EAAEE,EAAM,CAAEuF,IAAK,4CAA8CzF,EAAE+C,EAAY,CAAE0C,IAAK,2CAA4CxC,MAAOA,EAAO/B,IAAKA,EAAKgC,KAAMA,EAAMpC,MAAOA,EAAOgC,QAASA,EAASK,UAAWA,IACzN,CACA,mBAAWuC,GAAa,MAAO,CAC3BR,OAAU,CAAC,cACXC,KAAQ,CAAC,YACTC,MAAS,CAAC,aACVC,OAAU,CAAC,cACXC,SAAY,CAAC,gBACd,GAEPR,EAAYlC,MAAQ,CAChB+C,QAASd,UAGJC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"kol-quote.entry.esm.js","sources":["src/internal/props/href.ts","src/internal/props/quote.ts","src/internal/functional-components/quote/component.tsx","src/internal/functional-components/quote/controller.ts","src/components/quote/style.scss?tag=kol-quote&mode=default&encapsulation=shadow","src/components/quote/component.tsx"],"sourcesContent":["import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeString } from './helpers/normalizers';\n\nexport type HrefProp = SimpleProp<'href', string>;\nexport const hrefProp = createPropDefinition<HrefProp>(normalizeString, (v) => v.length > 0);\n","import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeString } from './helpers/normalizers';\n\nexport type QuoteProp = SimpleProp<'quote', string>;\nexport const quoteProp = createPropDefinition<QuoteProp>(normalizeString, () => true);\n","import type { FunctionalComponent as FC } from '@stencil/core';\nimport { h } from '@stencil/core';\n\nimport { KolLinkTag } from '../../../core/component-names';\nimport { bem } from '../../../schema/bem-registry';\nimport type { FunctionalComponentProps } from '../generic-types';\nimport type { QuoteApi } from './api';\n\nconst quoteBem = bem.forBlock('kol-quote');\nconst BEM_CLASS_QUOTE__BLOCKQUOTE = quoteBem('blockquote');\nconst BEM_CLASS_QUOTE__CITE = quoteBem('cite');\nconst BEM_CLASS_QUOTE__FIGCAPTION = quoteBem('figcaption');\nconst BEM_CLASS_QUOTE__QUOTE = quoteBem('quote');\n\nexport const QuoteFC: FC<FunctionalComponentProps<QuoteApi>> = (props) => {\n\tconst { href, label, quote, variant } = props;\n\tconst hasExpertSlot = quote === '';\n\tconst BEM_CLASS_ROOT = quoteBem({ [variant]: true });\n\treturn (\n\t\t<figure class={BEM_CLASS_ROOT}>\n\t\t\t{variant === 'block' ? (\n\t\t\t\t<blockquote class={BEM_CLASS_QUOTE__BLOCKQUOTE} cite={href}>\n\t\t\t\t\t{quote}\n\t\t\t\t\t<span aria-hidden={!hasExpertSlot ? 'true' : undefined} hidden={!hasExpertSlot}>\n\t\t\t\t\t\t<slot name=\"expert\" />\n\t\t\t\t\t</span>\n\t\t\t\t</blockquote>\n\t\t\t) : (\n\t\t\t\t<q class={BEM_CLASS_QUOTE__QUOTE} cite={href}>\n\t\t\t\t\t{quote}\n\t\t\t\t\t<span aria-hidden={!hasExpertSlot ? 'true' : undefined} hidden={!hasExpertSlot}>\n\t\t\t\t\t\t<slot name=\"expert\" />\n\t\t\t\t\t</span>\n\t\t\t\t</q>\n\t\t\t)}\n\t\t\t{typeof label === 'string' && label.length > 0 && (\n\t\t\t\t<figcaption class={BEM_CLASS_QUOTE__FIGCAPTION}>\n\t\t\t\t\t<cite class={BEM_CLASS_QUOTE__CITE}>\n\t\t\t\t\t\t<KolLinkTag _href={href} _label={label} _target=\"_blank\" />\n\t\t\t\t\t</cite>\n\t\t\t\t</figcaption>\n\t\t\t)}\n\t\t</figure>\n\t);\n};\n","import { hrefProp, labelProp, quoteProp, variantQuoteProp } from '../../props';\nimport { BaseController } from '../base-controller';\nimport type { ControllerInterface, ResolvedInputProps } from '../generic-types';\nimport type { QuoteApi } from './api';\n\nexport class QuoteController extends BaseController<QuoteApi> implements ControllerInterface<QuoteApi> {\n\tpublic constructor() {\n\t\tsuper(\n\t\t\t{},\n\t\t\t{\n\t\t\t\thref: '',\n\t\t\t\tlabel: '',\n\t\t\t\tquote: '',\n\t\t\t\tvariant: 'inline',\n\t\t\t},\n\t\t);\n\t}\n\n\tpublic componentWillLoad(props: ResolvedInputProps<QuoteApi>): void {\n\t\tconst { href, label, quote, variant } = props;\n\t\tthis.watchHref(href);\n\t\tthis.watchLabel(label);\n\t\tthis.watchQuote(quote);\n\t\tthis.watchVariant(variant);\n\t}\n\n\tpublic watchHref(value?: string): void {\n\t\threfProp.apply(value, (v) => {\n\t\t\tthis.setProp('href', v);\n\t\t});\n\t}\n\n\tpublic watchLabel(value?: string): void {\n\t\tlabelProp.apply(value, (v) => {\n\t\t\tthis.setProp('label', v);\n\t\t});\n\t}\n\n\tpublic watchQuote(value?: string): void {\n\t\tquoteProp.apply(value, (v) => {\n\t\t\tthis.setProp('quote', v);\n\t\t});\n\t}\n\n\tpublic watchVariant(value?: string): void {\n\t\tvariantQuoteProp.apply(value, (v) => {\n\t\t\tthis.setProp('variant', v);\n\t\t});\n\t}\n}\n","@use '../@shared/mixins' as *;\n@use '../../styles/global' as *;\n\n@layer kol-component {\n\t.kol-quote {\n\t\tdisplay: inline;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t}\n\n\t.kol-quote__cite {\n\t\t&::before {\n\t\t\tcontent: '—';\n\n\t\t\t.kol-quote--block & {\n\t\t\t\tpadding-right: 0.5em;\n\t\t\t}\n\n\t\t\t.kol-quote--inline & {\n\t\t\t\tpadding: 0.5em;\n\t\t\t}\n\t\t}\n\t}\n\n\t.kol-quote__figcaption {\n\t\t.kol-quote--block & {\n\t\t\tdisplay: inline;\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t}\n\t}\n\n\t.kol-quote__blockquote {\n\t\t&::before {\n\t\t\tcontent: open-quote;\n\t\t}\n\n\t\t&::after {\n\t\t\tcontent: close-quote;\n\t\t}\n\t}\n}\n","import type { JSX } from '@stencil/core';\nimport { Component, h, Host, Prop, Watch } from '@stencil/core';\nimport type { WebComponentInterface } from '../../internal/functional-components/generic-types';\nimport type { QuoteApi } from '../../internal/functional-components/quote/api';\nimport { QuoteFC } from '../../internal/functional-components/quote/component';\nimport { QuoteController } from '../../internal/functional-components/quote/controller';\nimport type { QuoteVariantType } from '../../internal/props/variant-quote';\n\n@Component({\n\ttag: 'kol-quote',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: true,\n})\nexport class KolQuote implements WebComponentInterface<QuoteApi> {\n\tprivate readonly ctrl = new QuoteController();\n\n\t/**\n\t * Sets the target URI of the link or citation source.\n\t */\n\t@Prop()\n\tpublic _href!: string;\n\n\t@Watch('_href')\n\tpublic watchHref(value?: string): void {\n\t\tthis.ctrl.watchHref(value);\n\t}\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop()\n\tpublic _label?: string;\n\n\t@Watch('_label')\n\tpublic watchLabel(value?: string): void {\n\t\tthis.ctrl.watchLabel(value);\n\t}\n\n\t/**\n\t * Defines the text of the quote.\n\t */\n\t@Prop()\n\tpublic _quote!: string;\n\n\t@Watch('_quote')\n\tpublic watchQuote(value?: string): void {\n\t\tthis.ctrl.watchQuote(value);\n\t}\n\n\t/**\n\t * Defines which variant should be used for presentation.\n\t */\n\t@Prop()\n\tpublic _variant?: QuoteVariantType = 'inline';\n\n\t@Watch('_variant')\n\tpublic watchVariant(value?: QuoteVariantType): void {\n\t\tthis.ctrl.watchVariant(value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.ctrl.componentWillLoad({\n\t\t\thref: this._href,\n\t\t\tlabel: this._label,\n\t\t\tquote: this._quote,\n\t\t\tvariant: this._variant,\n\t\t});\n\t}\n\n\tpublic render(): JSX.Element {\n\t\tconst { href, label, quote, variant } = this.ctrl.getProps();\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<QuoteFC href={href} label={label} quote={quote} variant={variant} />\n\t\t\t</Host>\n\t\t);\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAKO,MAAM,QAAQ,GAAG,oBAAoB,CAAW,eAAe,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;;ACArF,MAAM,SAAS,GAAG,oBAAoB,CAAY,eAAe,EAAE,MAAM,IAAI,CAAC;;ACGrF,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC,WAAW,CAAC;AAC1C,MAAM,2BAA2B,GAAG,QAAQ,CAAC,YAAY,CAAC;AAC1D,MAAM,qBAAqB,GAAG,QAAQ,CAAC,MAAM,CAAC;AAC9C,MAAM,2BAA2B,GAAG,QAAQ,CAAC,YAAY,CAAC;AAC1D,MAAM,sBAAsB,GAAG,QAAQ,CAAC,OAAO,CAAC;AAEzC,MAAM,OAAO,GAA2C,CAAC,KAAK,KAAI;IACxE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,KAAK;AAC7C,IAAA,MAAM,aAAa,GAAG,KAAK,KAAK,EAAE;AAClC,IAAA,MAAM,cAAc,GAAG,QAAQ,CAAC,EAAE,CAAC,OAAO,GAAG,IAAI,EAAE,CAAC;AACpD,IAAA,QACC,CAAA,CAAA,QAAA,EAAA,EAAQ,KAAK,EAAE,cAAc,EAAA,EAC3B,OAAO,KAAK,OAAO,IACnB,CAAY,CAAA,YAAA,EAAA,EAAA,KAAK,EAAE,2BAA2B,EAAE,IAAI,EAAE,IAAI,EAAA,EACxD,KAAK,EACN,CAAA,CAAA,MAAA,EAAA,EAAA,aA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UrB,IAAA,UAAU,CAAC,KAAc,EAAA;AAC/B,QAAA,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;;AAUrB,IAAA,YAAY,CAAC,KAAwB,EAAA;AAC3C,QAAA,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC;;IAGvB,iBAAiB,GAAA;AACvB,QAAA,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC;YAC3B,IAAI,EAAE,IAAI,CAAC,KAAK;YAChB,KAAK,EAAE,IAAI,CAAC,MAAM;YAClB,KAAK,EAAE,IAAI,CAAC,MAAM;YAClB,OAAO,EAAE,IAAI,CAAC,QAAQ;AACtB,SAAA,CAAC;;IAGI,MAAM,GAAA;AACZ,QAAA,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;AAC5D,QAAA,QACC,EAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACJ,CAAC,CAAA,OAAO,qDAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAI,CAAA,CAC/D;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"kol-quote.entry.esm.js","sources":["src/internal/props/href.ts","src/internal/props/quote.ts","src/internal/functional-components/quote/component.tsx","src/internal/functional-components/quote/controller.ts","src/components/quote/style.scss?tag=kol-quote&mode=default&encapsulation=shadow","src/components/quote/component.tsx"],"sourcesContent":["import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeString } from './helpers/normalizers';\n\nexport type HrefProp = SimpleProp<'href', string>;\nexport const hrefProp = createPropDefinition<HrefProp>(normalizeString, (v) => v.length > 0);\n","import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeString } from './helpers/normalizers';\n\nexport type QuoteProp = SimpleProp<'quote', string>;\nexport const quoteProp = createPropDefinition<QuoteProp>(normalizeString, () => true);\n","import type { FunctionalComponent as FC } from '@stencil/core';\nimport { h } from '@stencil/core';\n\nimport { KolLinkTag } from '../../../core/component-names';\nimport { bem } from '../../../schema/bem-registry';\nimport type { FunctionalComponentProps } from '../generic-types';\nimport type { QuoteApi } from './api';\n\nconst quoteBem = bem.forBlock('kol-quote');\nconst BEM_CLASS_QUOTE__BLOCKQUOTE = quoteBem('blockquote');\nconst BEM_CLASS_QUOTE__CITE = quoteBem('cite');\nconst BEM_CLASS_QUOTE__FIGCAPTION = quoteBem('figcaption');\nconst BEM_CLASS_QUOTE__QUOTE = quoteBem('quote');\n\nexport const QuoteFC: FC<FunctionalComponentProps<QuoteApi>> = (props) => {\n\tconst { href, label, quote, variant } = props;\n\tconst hasExpertSlot = quote === '';\n\tconst BEM_CLASS_ROOT = quoteBem({ [variant]: true });\n\treturn (\n\t\t<figure class={BEM_CLASS_ROOT}>\n\t\t\t{variant === 'block' ? (\n\t\t\t\t<blockquote class={BEM_CLASS_QUOTE__BLOCKQUOTE} cite={href}>\n\t\t\t\t\t{quote}\n\t\t\t\t\t<span aria-hidden={!hasExpertSlot ? 'true' : undefined} hidden={!hasExpertSlot}>\n\t\t\t\t\t\t<slot name=\"expert\" />\n\t\t\t\t\t</span>\n\t\t\t\t</blockquote>\n\t\t\t) : (\n\t\t\t\t<q class={BEM_CLASS_QUOTE__QUOTE} cite={href}>\n\t\t\t\t\t{quote}\n\t\t\t\t\t<span aria-hidden={!hasExpertSlot ? 'true' : undefined} hidden={!hasExpertSlot}>\n\t\t\t\t\t\t<slot name=\"expert\" />\n\t\t\t\t\t</span>\n\t\t\t\t</q>\n\t\t\t)}\n\t\t\t{typeof label === 'string' && label.length > 0 && (\n\t\t\t\t<figcaption class={BEM_CLASS_QUOTE__FIGCAPTION}>\n\t\t\t\t\t<cite class={BEM_CLASS_QUOTE__CITE}>\n\t\t\t\t\t\t<KolLinkTag _href={href} _label={label} _target=\"_blank\" />\n\t\t\t\t\t</cite>\n\t\t\t\t</figcaption>\n\t\t\t)}\n\t\t</figure>\n\t);\n};\n","import { hrefProp, labelProp, quoteProp, variantQuoteProp } from '../../props';\nimport { BaseController } from '../base-controller';\nimport type { ControllerInterface, ResolvedInputProps } from '../generic-types';\nimport type { QuoteApi } from './api';\n\nexport class QuoteController extends BaseController<QuoteApi> implements ControllerInterface<QuoteApi> {\n\tpublic componentWillLoad(props: ResolvedInputProps<QuoteApi>): void {\n\t\tconst { href, label, quote, variant } = props;\n\t\tthis.watchHref(href);\n\t\tthis.watchLabel(label);\n\t\tthis.watchQuote(quote);\n\t\tthis.watchVariant(variant);\n\t}\n\n\tpublic watchHref(value?: string): void {\n\t\threfProp.apply(\n\t\t\tvalue,\n\t\t\t(v) => {\n\t\t\t\tthis.setProp('href', v);\n\t\t\t},\n\t\t\t'',\n\t\t);\n\t}\n\n\tpublic watchLabel(value?: string): void {\n\t\tlabelProp.apply(\n\t\t\tvalue,\n\t\t\t(v) => {\n\t\t\t\tthis.setProp('label', v);\n\t\t\t},\n\t\t\t'',\n\t\t);\n\t}\n\n\tpublic watchQuote(value?: string): void {\n\t\tquoteProp.apply(\n\t\t\tvalue,\n\t\t\t(v) => {\n\t\t\t\tthis.setProp('quote', v);\n\t\t\t},\n\t\t\t'',\n\t\t);\n\t}\n\n\tpublic watchVariant(value?: string): void {\n\t\tvariantQuoteProp.apply(\n\t\t\tvalue,\n\t\t\t(v) => {\n\t\t\t\tthis.setProp('variant', v);\n\t\t\t},\n\t\t\t'inline',\n\t\t);\n\t}\n}\n","@use '../@shared/mixins' as *;\n@use '../../styles/global' as *;\n\n@layer kol-component {\n\t.kol-quote {\n\t\tdisplay: inline;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t}\n\n\t.kol-quote__cite {\n\t\t&::before {\n\t\t\tcontent: '—';\n\n\t\t\t.kol-quote--block & {\n\t\t\t\tpadding-right: 0.5em;\n\t\t\t}\n\n\t\t\t.kol-quote--inline & {\n\t\t\t\tpadding: 0.5em;\n\t\t\t}\n\t\t}\n\t}\n\n\t.kol-quote__figcaption {\n\t\t.kol-quote--block & {\n\t\t\tdisplay: inline;\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t}\n\t}\n\n\t.kol-quote__blockquote {\n\t\t&::before {\n\t\t\tcontent: open-quote;\n\t\t}\n\n\t\t&::after {\n\t\t\tcontent: close-quote;\n\t\t}\n\t}\n}\n","import type { JSX } from '@stencil/core';\nimport { Component, h, Host, Prop, Watch } from '@stencil/core';\nimport type { WebComponentInterface } from '../../internal/functional-components/generic-types';\nimport type { QuoteApi } from '../../internal/functional-components/quote/api';\nimport { QuoteFC } from '../../internal/functional-components/quote/component';\nimport { QuoteController } from '../../internal/functional-components/quote/controller';\nimport type { QuoteVariantType } from '../../internal/props/variant-quote';\n\n@Component({\n\ttag: 'kol-quote',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: true,\n})\nexport class KolQuote implements WebComponentInterface<QuoteApi> {\n\tprivate readonly ctrl = new QuoteController();\n\n\t/**\n\t * Sets the target URI of the link or citation source.\n\t */\n\t@Prop()\n\tpublic _href!: string;\n\n\t@Watch('_href')\n\tpublic watchHref(value?: string): void {\n\t\tthis.ctrl.watchHref(value);\n\t}\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop()\n\tpublic _label?: string;\n\n\t@Watch('_label')\n\tpublic watchLabel(value?: string): void {\n\t\tthis.ctrl.watchLabel(value);\n\t}\n\n\t/**\n\t * Defines the text of the quote.\n\t */\n\t@Prop()\n\tpublic _quote!: string;\n\n\t@Watch('_quote')\n\tpublic watchQuote(value?: string): void {\n\t\tthis.ctrl.watchQuote(value);\n\t}\n\n\t/**\n\t * Defines which variant should be used for presentation.\n\t */\n\t@Prop()\n\tpublic _variant?: QuoteVariantType = 'inline';\n\n\t@Watch('_variant')\n\tpublic watchVariant(value?: QuoteVariantType): void {\n\t\tthis.ctrl.watchVariant(value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.ctrl.componentWillLoad({\n\t\t\thref: this._href,\n\t\t\tlabel: this._label,\n\t\t\tquote: this._quote,\n\t\t\tvariant: this._variant,\n\t\t});\n\t}\n\n\tpublic render(): JSX.Element {\n\t\tconst { href, label, quote, variant } = this.ctrl.getProps();\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<QuoteFC href={href} label={label} quote={quote} variant={variant} />\n\t\t\t</Host>\n\t\t);\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAKO,MAAM,QAAQ,GAAG,oBAAoB,CAAW,eAAe,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;;ACArF,MAAM,SAAS,GAAG,oBAAoB,CAAY,eAAe,EAAE,MAAM,IAAI,CAAC;;ACGrF,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC,WAAW,CAAC;AAC1C,MAAM,2BAA2B,GAAG,QAAQ,CAAC,YAAY,CAAC;AAC1D,MAAM,qBAAqB,GAAG,QAAQ,CAAC,MAAM,CAAC;AAC9C,MAAM,2BAA2B,GAAG,QAAQ,CAAC,YAAY,CAAC;AAC1D,MAAM,sBAAsB,GAAG,QAAQ,CAAC,OAAO,CAAC;AAEzC,MAAM,OAAO,GAA2C,CAAC,KAAK,KAAI;IACxE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,KAAK;AAC7C,IAAA,MAAM,aAAa,GAAG,KAAK,KAAK,EAAE;AAClC,IAAA,MAAM,cAAc,GAAG,QAAQ,CAAC,EAAE,CAAC,OAAO,GAAG,IAAI,EAAE,CAAC;AACpD,IAAA,QACC,CAAA,CAAA,QAAA,EAAA,EAAQ,KAAK,EAAE,cAAc,EAAA,EAC3B,OAAO,KAAK,OAAO,IACnB,CAAY,CAAA,YAAA,EAAA,EAAA,K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CAAC;;AAUrB,IAAA,YAAY,CAAC,KAAwB,EAAA;AAC3C,QAAA,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC;;IAGvB,iBAAiB,GAAA;AACvB,QAAA,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC;YAC3B,IAAI,EAAE,IAAI,CAAC,KAAK;YAChB,KAAK,EAAE,IAAI,CAAC,MAAM;YAClB,KAAK,EAAE,IAAI,CAAC,MAAM;YAClB,OAAO,EAAE,IAAI,CAAC,QAAQ;AACtB,SAAA,CAAC;;IAGI,MAAM,GAAA;AACZ,QAAA,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;AAC5D,QAAA,QACC,EAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACJ,CAAC,CAAA,OAAO,qDAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAI,CAAA,CAC/D;;;;;;;;;;;;;;;"}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{h as n,r as e,H as t}from"./index-CHdBQ7XR.js";import{k as o}from"./component-names-CqTpXVIM.js";import{b as i}from"./bem-registry-DRYZs7IX.js";import"./common-BIkdAxr0.js";import{c as a,n as l,B as s,v as r}from"./base-controller-DXBNrrLx.js";import{l as c}from"./label-DVazFQSR.js";import"./browser-KcXKIKON.js";const d=a(l,n=>n.length>0),h=a(l,()=>!0),u=i.forBlock("kol-quote"),p=u("blockquote"),f=u("cite"),m=u("figcaption"),b=u("quote"),g=e=>{const{href:t,label:i,quote:a,variant:l}=e,r=""===a,s=u({[l]:!0});return n("figure",{class:s},"block"===l?n("blockquote",{class:p,cite:t},a,n("span",{"aria-hidden":r?void 0:"true",hidden:!r},n("slot",{name:"expert"}))):n("q",{class:b,cite:t},a,n("span",{"aria-hidden":r?void 0:"true",hidden:!r},n("slot",{name:"expert"}))),"string"==typeof i&&i.length>0&&n("figcaption",{class:m},n("cite",{class:f},n(o,{_href:t,_label:i,_target:"_blank"}))))};class k extends s{constructor(){super({},{href:"",label:"",quote:"",variant:"inline"})}componentWillLoad(n){const{href:e,label:t,quote:o,variant:i}=n;this.watchHref(e),this.watchLabel(t),this.watchQuote(o),this.watchVariant(i)}watchHref(n){d.apply(n,n=>{this.setProp("href",n)})}watchLabel(n){c.apply(n,n=>{this.setProp("label",n)})}watchQuote(n){h.apply(n,n=>{this.setProp("quote",n)})}watchVariant(n){r.apply(n,n=>{this.setProp("variant",n)})}}const w="@charset \"UTF-8\";\n/* forward the rem function */\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n .hastooltip {\n z-index: 900 !important;\n }\n}\n@layer kol-component {\n .kol-quote {\n display: inline;\n margin: 0;\n padding: 0;\n }\n .kol-quote__cite::before {\n content: \"—\";\n }\n .kol-quote--block .kol-quote__cite::before {\n padding-right: 0.5em;\n }\n .kol-quote--inline .kol-quote__cite::before {\n padding: 0.5em;\n }\n .kol-quote--block .kol-quote__figcaption {\n display: inline;\n margin: 0;\n padding: 0;\n }\n .kol-quote__blockquote::before {\n content: open-quote;\n }\n .kol-quote__blockquote::after {\n content: close-quote;\n }\n}",y=class{constructor(n){e(this,n),this.ctrl=new k,this._variant="inline"}watchHref(n){this.ctrl.watchHref(n)}watchLabel(n){this.ctrl.watchLabel(n)}watchQuote(n){this.ctrl.watchQuote(n)}watchVariant(n){this.ctrl.watchVariant(n)}componentWillLoad(){this.ctrl.componentWillLoad({href:this._href,label:this._label,quote:this._quote,variant:this._variant})}render(){const{href:e,label:o,quote:i,variant:a}=this.ctrl.getProps();return n(t,{key:"d00028f8f46d69f8af987135505eb7ce06adb2fc"},n(g,{key:"06a839262e565e7cbc6e19baff0d1869ca9fda78",href:e,label:o,quote:i,variant:a}))}static get watchers(){return{_href:["watchHref"],_label:["watchLabel"],_quote:["watchQuote"],_variant:["watchVariant"]}}};y.style={default:w};export{y as kol_quote};
4
+ import{h as n,r as e,H as t}from"./index-CkrSoIPD.js";import{k as o}from"./component-names-CqTpXVIM.js";import{b as i}from"./bem-registry-DRYZs7IX.js";import"./common-BIkdAxr0.js";import{c as a,n as l,B as s,v as r}from"./base-controller-Bkp0Z9l1.js";import{l as c}from"./label-BWcVeIOr.js";import"./browser-KcXKIKON.js";const d=a(l,n=>n.length>0),h=a(l,()=>!0),u=i.forBlock("kol-quote"),p=u("blockquote"),f=u("cite"),m=u("figcaption"),b=u("quote"),g=e=>{const{href:t,label:i,quote:a,variant:l}=e,r=""===a,s=u({[l]:!0});return n("figure",{class:s},"block"===l?n("blockquote",{class:p,cite:t},a,n("span",{"aria-hidden":r?void 0:"true",hidden:!r},n("slot",{name:"expert"}))):n("q",{class:b,cite:t},a,n("span",{"aria-hidden":r?void 0:"true",hidden:!r},n("slot",{name:"expert"}))),"string"==typeof i&&i.length>0&&n("figcaption",{class:m},n("cite",{class:f},n(o,{_href:t,_label:i,_target:"_blank"}))))};class k extends s{componentWillLoad(n){const{href:e,label:t,quote:o,variant:i}=n;this.watchHref(e),this.watchLabel(t),this.watchQuote(o),this.watchVariant(i)}watchHref(n){d.apply(n,n=>{this.setProp("href",n)},"")}watchLabel(n){c.apply(n,n=>{this.setProp("label",n)},"")}watchQuote(n){h.apply(n,n=>{this.setProp("quote",n)},"")}watchVariant(n){r.apply(n,n=>{this.setProp("variant",n)},"inline")}}const w="@charset \"UTF-8\";\n/* forward the rem function */\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n .hastooltip {\n z-index: 900 !important;\n }\n}\n@layer kol-component {\n .kol-quote {\n display: inline;\n margin: 0;\n padding: 0;\n }\n .kol-quote__cite::before {\n content: \"—\";\n }\n .kol-quote--block .kol-quote__cite::before {\n padding-right: 0.5em;\n }\n .kol-quote--inline .kol-quote__cite::before {\n padding: 0.5em;\n }\n .kol-quote--block .kol-quote__figcaption {\n display: inline;\n margin: 0;\n padding: 0;\n }\n .kol-quote__blockquote::before {\n content: open-quote;\n }\n .kol-quote__blockquote::after {\n content: close-quote;\n }\n}",y=class{constructor(n){e(this,n),this.ctrl=new k,this._variant="inline"}watchHref(n){this.ctrl.watchHref(n)}watchLabel(n){this.ctrl.watchLabel(n)}watchQuote(n){this.ctrl.watchQuote(n)}watchVariant(n){this.ctrl.watchVariant(n)}componentWillLoad(){this.ctrl.componentWillLoad({href:this._href,label:this._label,quote:this._quote,variant:this._variant})}render(){const{href:e,label:o,quote:i,variant:a}=this.ctrl.getProps();return n(t,{key:"d00028f8f46d69f8af987135505eb7ce06adb2fc"},n(g,{key:"06a839262e565e7cbc6e19baff0d1869ca9fda78",href:e,label:o,quote:i,variant:a}))}static get watchers(){return{_href:["watchHref"],_label:["watchLabel"],_quote:["watchQuote"],_variant:["watchVariant"]}}};y.style={default:w};export{y as kol_quote};
@@ -1 +1 @@
1
- {"version":3,"names":["h","registerInstance","Host","KolLinkTag","bem","createPropDefinition","normalizeString","BaseController","variantQuoteProp","labelProp","hrefProp","v","length","quoteProp","quoteBem","forBlock","BEM_CLASS_QUOTE__BLOCKQUOTE","BEM_CLASS_QUOTE__CITE","BEM_CLASS_QUOTE__FIGCAPTION","BEM_CLASS_QUOTE__QUOTE","QuoteFC","props","href","label","quote","variant","hasExpertSlot","BEM_CLASS_ROOT","class","cite","undefined","hidden","name","_href","_label","_target","QuoteController","constructor","super","componentWillLoad","this","watchHref","watchLabel","watchQuote","watchVariant","value","apply","setProp","defaultStyleCss","KolQuote","hostRef","ctrl","_variant","_quote","render","getProps","key","watchers","style","default"],"sources":["0"],"mappings":";;;YAGSA,OAAQC,OAAuBC,MAAY,kCACtCC,MAAkB,4CAClBC,MAAW,mCAClB,mCACOC,OAA2BC,OAAsBC,OAAqBC,MAAwB,4CAC9FC,MAAiB,4BACxB,wBAEP,MAAMC,EAAWL,EAAqBC,GAAkBK,GAAMA,EAAEC,OAAS,IAEzE,MAAMC,EAAYR,EAAqBC,GAAiB,IAAM,OAE9D,MAAMQ,EAAWV,EAAIW,SAAS,aAC9B,MAAMC,EAA8BF,EAAS,cAC7C,MAAMG,EAAwBH,EAAS,QACvC,MAAMI,EAA8BJ,EAAS,cAC7C,MAA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,QAASpC,EAAE,GAEhC,CACA,UAAAgC,CAAWE,GACPhC,EAAUiC,MAAMD,GAAQlC,IACpB6B,KAAKO,QAAQ,QAASpC,EAAE,GAEhC,CACA,YAAAiC,CAAaC,GACTrC,EAAiBsC,MAAMD,GAAQlC,IAC3B6B,KAAKO,QAAQ,UAAWpC,EAAE,GAElC,EAGJ,MAAMqC,EAAkB,8zLAExB,MAAMC,EAAW,MACb,WAAAZ,CAAYa,GACRjD,EAAiBuC,KAAMU,GACvBV,KAAKW,KAAO,IAAIf,EAChBI,KAAKY,SAAW,QACpB,CACA,SAAAX,CAAUI,GACNL,KAAKW,KAAKV,UAAUI,EACxB,CACA,UAAAH,CAAWG,GACPL,KAAKW,KAAKT,WAAWG,EACzB,CACA,UAAAF,CAAWE,GACPL,KAAKW,KAAKR,WAAWE,EACzB,CACA,YAAAD,CAAaC,GACTL,KAAKW,KAAKP,aAAaC,EAC3B,CACA,iBAAAN,GACIC,KAAKW,KAAKZ,kBAAkB,CACxBjB,KAAMkB,KAAKP,MACXV,MAAOiB,KAAKN,OACZV,MAAOgB,KAAKa,OACZ5B,QAASe,KAAKY,UAEtB,CACA,MAAAE,GACI,MAAMhC,KAAEA,EAAIC,MAAEA,EAAKC,MAAEA,EAAKC,QAAEA,GAAYe,KAAKW,KAAKI,WAClD,OAAQvD,EAAEE,EAAM,CAAEsD,IAAK,4CAA8CxD,EAAEoB,EAAS,CAAEoC,IAAK,2CAA4ClC,KAAMA,EAAMC,MAAOA,EAAOC,MAAOA,EAAOC,QAASA,IACxL,CACA,mBAAWgC,GAAa,MAAO,CAC3BxB,MAAS,CAAC,aACVC,OAAU,CAAC,cACXmB,OAAU,CAAC,cACXD,SAAY,CAAC,gBACd,GAEPH,EAASS,MAAQ,CACbC,QAASX,UAGJC","ignoreList":[]}
1
+ {"version":3,"names":["h","registerInstance","Host","KolLinkTag","bem","createPropDefinition","normalizeString","BaseController","variantQuoteProp","labelProp","hrefProp","v","length","quoteProp","quoteBem","forBlock","BEM_CLASS_QUOTE__BLOCKQUOTE","BEM_CLASS_QUOTE__CITE","BEM_CLASS_QUOTE__FIGCAPTION","BEM_CLASS_QUOTE__QUOTE","QuoteFC","props","href","label","quote","variant","hasExpertSlot","BEM_CLASS_ROOT","class","cite","undefined","hidden","name","_href","_label","_target","QuoteController","componentWillLoad","this","watchHref","watchLabel","watchQuote","watchVariant","value","apply","setProp","defaultStyleCss","KolQuote","constructor","hostRef","ctrl","_variant","_quote","render","getProps","key","watchers","style","default"],"sources":["0"],"mappings":";;;YAGSA,OAAQC,OAAuBC,MAAY,kCACtCC,MAAkB,4CAClBC,MAAW,mCAClB,mCACOC,OAA2BC,OAAsBC,OAAqBC,MAAwB,4CAC9FC,MAAiB,4BACxB,wBAEP,MAAMC,EAAWL,EAAqBC,GAAkBK,GAAMA,EAAEC,OAAS,IAEzE,MAAMC,EAAYR,EAAqBC,GAAiB,IAAM,OAE9D,MAAMQ,EAAWV,EAAIW,SAAS,aAC9B,MAAMC,EAA8BF,EAAS,cAC7C,MAAMG,EAAwBH,EAAS,QACvC,MAAMI,EAA8BJ,EAAS,cAC7C,MAAMK,EAAyBL,EAAS,SACxC,MAAMM,EAAWC,IACb,MAAMC,KAAEA,EAAIC,MAAEA,EAAKC,MAAEA,EAAKC,QAAEA,GAAYJ,EACxC,MAAMK,EAAgBF,IAAU,GAChC,MAAMG,EAAiBb,EAAS,CAAEW,CAACA,GAAU,OAC7C,OAAQzB,EAAE,SAAU,CAAE4B,MAAOD,GAAkBF,IAAY,QAAWzB,EAAE,aAAc,CAAE4B,MAAOZ,EAA6Ba,KAAMP,GAAQE,EAAOxB,EAAE,OAAQ,CAAE,eAAgB0B,EAAgB,OAASI,UAAWC,QAASL,GAAiB1B,EAAE,OAAQ,CAAEgC,KAAM,aAAkBhC,EAAE,IAAK,CAAE4B,MAAOT,EAAwBU,KAAMP,GAAQE,EAAOxB,EAAE,OAAQ,CAAE,eAAgB0B,EAAgB,OAASI,UAAWC,QAASL,GAAiB1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xBf,KAAMgB,KAAKL,MACXV,MAAOe,KAAKJ,OACZV,MAAOc,KAAKc,OACZ3B,QAASa,KAAKa,UAEtB,CACA,MAAAE,GACI,MAAM/B,KAAEA,EAAIC,MAAEA,EAAKC,MAAEA,EAAKC,QAAEA,GAAYa,KAAKY,KAAKI,WAClD,OAAQtD,EAAEE,EAAM,CAAEqD,IAAK,4CAA8CvD,EAAEoB,EAAS,CAAEmC,IAAK,2CAA4CjC,KAAMA,EAAMC,MAAOA,EAAOC,MAAOA,EAAOC,QAASA,IACxL,CACA,mBAAW+B,GAAa,MAAO,CAC3BvB,MAAS,CAAC,aACVC,OAAU,CAAC,cACXkB,OAAU,CAAC,cACXD,SAAY,CAAC,gBACd,GAEPJ,EAASU,MAAQ,CACbC,QAASZ,UAGJC","ignoreList":[]}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{h as e,F as t,r as s,g as i}from"./index-CHdBQ7XR.js";import{c as a}from"./clsx-COFh-Vc8.js";import{i as l,d as o,g as r,a as n,F as d}from"./FormFieldStateWrapper-BFyiN9EY.js";import{I as h,a as c}from"./controller-icon-DKRqmDU2.js";import{_ as u}from"./tslib.es6-CxX45GIN.js";import{G as p}from"./common-BIkdAxr0.js";import{n as v}from"./dev.utils-DEjbEXtH.js";import{p as f}from"./controller-zA71XEOV.js";import{v as m}from"./multiple-BgWWOenK.js";import{f as b,v as y}from"./controller-vTikIczD.js";import{v as _}from"./required-Dt9l4wUg.js";import{v as j}from"./rows-CN7sG0G_.js";import"./access-and-short-key-CPX70LXd.js";import"./disabled-BdPI9eda.js";import"./hide-label-ByItyHgV.js";import"./label-C18ud7Yt.js";import"./tooltip-align-DodV1tEH.js";import"./align-DDUsWnWP.js";import"./events-DHTi_wtD.js";import"./associated.controller-CdEaJGVD.js";import"./bootstrap-DcH8Lr28.js";import"./component-names-CqTpXVIM.js";import"./i18n-B0tfVPMa.js";import"./isObject-DvSELytj.js";import"./InternalUnderlinedBadgeText-DLXbDpmD.js";import"./i18n-DvMeCREp.js";import"./Alert-DJWeD9Xz.js";import"./bem-registry-DRYZs7IX.js";import"./browser-KcXKIKON.js";import"./Heading-Cp72eQOw.js";import"./Icon-BI9iw7pD.js";import"./icons-CmA8Oww0.js";import"./orientation-pWOiDBRo.js";const g=t=>{var{baseClassName:s="kol-select",class:i,index:o,selectedValue:l,selected:r,value:n,label:c,disabled:d}=t,h=u(t,["baseClassName","class","index","selectedValue","selected","value","label","disabled"]);void 0===l?l=[]:Array.isArray(l)||(l=[l]);const p=r||l.includes(n);return e("option",Object.assign({class:a(`${s}__option`,{[`${s}__option--selected`]:p,[`${s}__option--disabled`]:d},i),selected:p,disabled:d,value:o},h),c)},O=({baseClassName:s,preKey:i,options:o,disabled:l,value:r,OptionProps:n={},OptionGroupProps:c={}})=>(null==o?void 0:o.length)?e(t,null,o.map((t,d)=>{const h=[i,`-${d}`].join("");if("options"in t){if(!o.length)return null;const{label:i}=t,d=u(t,["label"]);return e("optgroup",Object.assign({class:a(`${s}__optgroup`,{[`${s}__optgroup--disabled`]:l}),key:h},c,{label:null==i?void 0:i.toString(),disabled:l}),e(O,Object.assign({baseClassName:s,OptionGroupProps:c,OptionProps:n,value:r,preKey:h},d)))}return"value"in t?e(g,Object.assign({key:h,baseClassName:s},n,{index:h,selectedValue:r},t)):null})):null,w=t=>{const{class:s,msg:i,touched:n,disabled:c,required:d,options:h,value:p,OptionProps:v,OptionGroupProps:m,ariaDescribedBy:b,hideLabel:_,label:f}=t,y=u(t,["class","msg","touched","disabled","required","options","value","OptionProps","OptionGroupProps","ariaDescribedBy","hideLabel","label"]),g={"kol-select--disabled":Boolean(c),"kol-select--required":Boolean(d),"kol-select--touched":Boolean(n),[`kol-select--${r(i)}`]:l(i,n)},j=Object.assign(Object.assign({class:a("kol-select",g,s),required:d,disabled:c},o({ariaDescribedBy:b,hideLabel:_,label:f})),y);return e("select",Object.assign({},j),e(O,{baseClassName:"kol-select",options:h,value:p,OptionGroupProps:m,OptionProps:v}))};function D(e){const{ariaDescribedBy:t}=n(e),s={id:e._id,hideLabel:e._hideLabel,label:e._label,value:e._value,options:e._options,accessKey:e._accessKey,disabled:e._disabled,name:e._name,ariaDescribedBy:t,size:e._rows,multiple:e._multiple,required:e._required,touched:e._touched,msg:e._msg};return"_shortKey"in e&&(s["aria-keyshortcuts"]=e._shortKey),s}const k=t=>{var{state:s}=t,i=u(t,["state"]);return e(w,Object.assign({},D(s),i))};class B extends h{constructor(e,t,s){super(e,t,s),this.keyOptionMap=new Map,this.getOptionByKey=e=>this.keyOptionMap.get(e),this.isValueInOptions=(e,t)=>void 0!==t.find(t=>"string"==typeof t.value?t.value===e:!!Array.isArray(t.options)&&this.isValueInOptions(e,t.options)),this.filterValuesInOptions=(e,t)=>e.filter(e=>void 0!==this.isValueInOptions(e,t)),this.afterPatchOptions=(e,t,s,i)=>{"_value"===i&&this.setFormAssociatedValue(e)},this.beforePatchOptions=(e,t)=>{const s=t.get("_value");void 0===s||Array.isArray(s)||t.set("_value",[s]);const i=t.has("_options")?t.get("_options"):this.component.state._options;if(Array.isArray(i)&&i.length>0){this.keyOptionMap.clear(),b(this.keyOptionMap,i);const e=t.has("_value")?t.get("_value"):this.component.state._value,s=this.filterValuesInOptions(Array.isArray(e)&&e.length>0?e:[],i);!1===this.component._multiple&&0===s.length?t.set("_value",[i[0].value]):Array.isArray(e)&&s.length<e.length&&t.set("_value",s)}},this.component=e}validateOptions(e){y(this.component,e,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}validateMultiple(e){this.assertComponentValueMatchesMultiplicity(!0===e),m(this.component,e,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}validateRequired(e){_(this.component,e)}validateRows(e){j(this.component,e)}validateValue(e){this.assertValueMatchesMultiplicity(e),p(this.component,"_value",()=>!0,void 0===e?[]:Array.isArray(e)?e:[e],void 0,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}componentWillLoad(){super.componentWillLoad(),this.validateOptions(this.component._options),this.validateMultiple(this.component._multiple),this.validateRequired(this.component._required),this.validateRows(this.component._rows),this.validateValue(this.component._value)}assertValueMatchesMultiplicity(e){const t=Array.isArray(e);if(!0===this.component._multiple){if(void 0!==e&&!t)throw new Error(`↑ The schema for the property (_value) is not valid for multiple mode. Expected an array. The value will not be changed. (received = ${JSON.stringify(e)})`)}else if(t)throw new Error(`↑ The schema for the property (_value) is not valid for single mode. Expected a single value. The value will not be changed. (received = ${JSON.stringify(e)})`)}assertComponentValueMatchesMultiplicity(e){const t=this.component._value;if(e){if(void 0!==t&&!Array.isArray(t))throw new Error(`↑ The schema for the property (_value) is not valid for multiple mode. Expected an array. The value will not be changed. (current = ${JSON.stringify(t)})`)}else if(Array.isArray(t))throw new Error(`↑ The schema for the property (_value) is not valid for single mode. Expected a single value. The value will not be changed. (current = ${JSON.stringify(t)})`)}}const P=class{async getValue(){return this._multiple?this.state._value:Array.isArray(this.state._value)&&this.state._value.length>0?this.state._value[0]:this.state._value}async focus(){return new Promise(e=>{requestAnimationFrame(()=>{var t;null===(t=this.selectRef)||void 0===t||t.focus(),e()})})}getFormFieldProps(){return{state:this.state,class:a("kol-form-field-select",{"kol-form-field--has-value":this.state._hasValue}),tooltipAlign:this._tooltipAlign,onClick:()=>{var e;return null===(e=this.selectRef)||void 0===e?void 0:e.focus()},alert:this.showAsAlert()}}getSelectProps(){return Object.assign(Object.assign({ref:this.catchRef,state:this.state},this.controller.onFacade),{onInput:this.onInput.bind(this),onChange:this.onChange.bind(this),onFocus:e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},onBlur:e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1}})}render(){return e(d,Object.assign({key:"5f0a307074c04096c87c8562bb4b32cd7a68fe33"},this.getFormFieldProps()),e(c,{key:"1c4df443d35659907835ce2a72d16fb2a23be340",state:this.state},e("form",{key:"78f8b37700ac271ebcfb92529e0fefbd79fffedd",onSubmit:e=>{e.preventDefault(),f({form:this.host})}},e("input",{key:"73ccb43eee0a4e71e9fa907d4e6a40bdf903fb33",type:"submit",hidden:!0}),e(k,Object.assign({key:"4cb054a8550a6c58eac0fdc23e751152c141c592"},this.getSelectProps())))))}constructor(e){s(this,e),this.catchRef=e=>{this.selectRef=e},this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._multiple=!1,this._required=!1,this._tooltipAlign="top",this._touched=!1,this.state={_hasValue:!1,_hideMsg:!1,_id:`id-${v()}`,_label:"",_multiple:!1,_options:[],_value:[]},this.inputHasFocus=!1,this.controller=new B(this,"select",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(e){this.controller.validateAccessKey(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHideMsg(e){this.controller.validateHideMsg(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateLabel(e){this.controller.validateLabel(e)}validateMsg(e){this.controller.validateMsg(e)}validateMultiple(e){this.controller.validateMultiple(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validateOptions(e){this.controller.validateOptions(e)}validateRequired(e){this.controller.validateRequired(e)}validateRows(e){this.controller.validateRows(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTabIndex(e){this.controller.validateTabIndex(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener(e=>this.state._hasValue=!!e)}onInput(e){var t;const s=Array.from((null===(t=this.selectRef)||void 0===t?void 0:t.options)||[]).filter(e=>e.selected).map(e=>{var t;return null===(t=this.controller.getOptionByKey(e.value))||void 0===t?void 0:t.value});if(this._multiple)this._value=s,this.controller.onFacade.onInput(e,!0,s);else{const t=s.length>0?s[0]:void 0;this._value=t,this.controller.onFacade.onInput(e,!0,t)}}onChange(e){this._multiple,this.controller.onFacade.onChange(e,this._value)}get host(){return i(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_label:["validateLabel"],_msg:["validateMsg"],_multiple:["validateMultiple"],_name:["validateName"],_on:["validateOn"],_options:["validateOptions"],_required:["validateRequired"],_rows:["validateRows"],_shortKey:["validateShortKey"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}};export{P as kol_select_wc};
4
+ import{h as e,F as t,r as s,g as i}from"./index-CkrSoIPD.js";import{c as a}from"./clsx-COFh-Vc8.js";import{i as l,d as o,g as r,a as n,F as d}from"./FormFieldStateWrapper--EBKaIYU.js";import{I as h,a as c}from"./controller-icon-By1Ikt1k.js";import{_ as u}from"./tslib.es6-CxX45GIN.js";import{G as p}from"./common-BIkdAxr0.js";import{n as v}from"./dev.utils-DEA-azs5.js";import{p as f}from"./controller-zA71XEOV.js";import{v as m}from"./multiple-BgWWOenK.js";import{f as b,v as y}from"./controller-INr--hn-.js";import{v as _}from"./required-Dt9l4wUg.js";import{v as j}from"./rows-CN7sG0G_.js";import"./access-and-short-key-CPX70LXd.js";import"./disabled-BdPI9eda.js";import"./hide-label-ByItyHgV.js";import"./label-C18ud7Yt.js";import"./tooltip-align-DodV1tEH.js";import"./align-DDUsWnWP.js";import"./events-DHTi_wtD.js";import"./associated.controller-CdEaJGVD.js";import"./bootstrap-DcH8Lr28.js";import"./component-names-CqTpXVIM.js";import"./i18n-B0tfVPMa.js";import"./isObject-DvSELytj.js";import"./InternalUnderlinedBadgeText-t86A5_XQ.js";import"./i18n-DvMeCREp.js";import"./Alert-w2MT71aB.js";import"./bem-registry-DRYZs7IX.js";import"./browser-KcXKIKON.js";import"./Heading-B9rTijzp.js";import"./Icon-BYiB0b6v.js";import"./icons-CmA8Oww0.js";import"./orientation-pWOiDBRo.js";const g=t=>{var{baseClassName:s="kol-select",class:i,index:o,selectedValue:l,selected:r,value:n,label:c,disabled:d}=t,h=u(t,["baseClassName","class","index","selectedValue","selected","value","label","disabled"]);void 0===l?l=[]:Array.isArray(l)||(l=[l]);const p=r||l.includes(n);return e("option",Object.assign({class:a(`${s}__option`,{[`${s}__option--selected`]:p,[`${s}__option--disabled`]:d},i),selected:p,disabled:d,value:o},h),c)},O=({baseClassName:s,preKey:i,options:o,disabled:l,value:r,OptionProps:n={},OptionGroupProps:c={}})=>(null==o?void 0:o.length)?e(t,null,o.map((t,d)=>{const h=[i,`-${d}`].join("");if("options"in t){if(!o.length)return null;const{label:i}=t,d=u(t,["label"]);return e("optgroup",Object.assign({class:a(`${s}__optgroup`,{[`${s}__optgroup--disabled`]:l}),key:h},c,{label:null==i?void 0:i.toString(),disabled:l}),e(O,Object.assign({baseClassName:s,OptionGroupProps:c,OptionProps:n,value:r,preKey:h},d)))}return"value"in t?e(g,Object.assign({key:h,baseClassName:s},n,{index:h,selectedValue:r},t)):null})):null,w=t=>{const{class:s,msg:i,touched:n,disabled:c,required:d,options:h,value:p,OptionProps:v,OptionGroupProps:m,ariaDescribedBy:_,hideLabel:b,label:f}=t,y=u(t,["class","msg","touched","disabled","required","options","value","OptionProps","OptionGroupProps","ariaDescribedBy","hideLabel","label"]),g={"kol-select--disabled":Boolean(c),"kol-select--required":Boolean(d),"kol-select--touched":Boolean(n),[`kol-select--${r(i)}`]:l(i,n)},j=Object.assign(Object.assign({class:a("kol-select",g,s),required:d,disabled:c},o({ariaDescribedBy:_,hideLabel:b,label:f})),y);return e("select",Object.assign({},j),e(O,{baseClassName:"kol-select",options:h,value:p,OptionGroupProps:m,OptionProps:v}))};function k(e){const{ariaDescribedBy:t}=n(e),s={id:e._id,hideLabel:e._hideLabel,label:e._label,value:e._value,options:e._options,accessKey:e._accessKey,disabled:e._disabled,name:e._name,ariaDescribedBy:t,size:e._rows,multiple:e._multiple,required:e._required,touched:e._touched,msg:e._msg};return"_shortKey"in e&&(s["aria-keyshortcuts"]=e._shortKey),s}const B=t=>{var{state:s}=t,a=u(t,["state"]);return e(w,Object.assign({},k(s),a))};class A extends h{constructor(e,t,s){super(e,t,s),this.keyOptionMap=new Map,this.getOptionByKey=e=>this.keyOptionMap.get(e),this.isValueInOptions=(e,t)=>void 0!==t.find(t=>"string"==typeof t.value?t.value===e:!!Array.isArray(t.options)&&this.isValueInOptions(e,t.options)),this.filterValuesInOptions=(e,t)=>e.filter(e=>void 0!==this.isValueInOptions(e,t)),this.afterPatchOptions=(e,t,s,a)=>{"_value"===a&&this.setFormAssociatedValue(e)},this.beforePatchOptions=(e,t)=>{const s=t.get("_value");void 0===s||Array.isArray(s)||t.set("_value",[s]);const a=t.has("_options")?t.get("_options"):this.component.state._options;if(Array.isArray(a)&&a.length>0){this.keyOptionMap.clear(),b(this.keyOptionMap,a);const e=t.has("_value")?t.get("_value"):this.component.state._value,s=this.filterValuesInOptions(Array.isArray(e)&&e.length>0?e:[],a);!1===this.component._multiple&&0===s.length?t.set("_value",[a[0].value]):Array.isArray(e)&&s.length<e.length&&t.set("_value",s)}},this.component=e}validateOptions(e){y(this.component,e,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}validateMultiple(e){this.assertComponentValueMatchesMultiplicity(!0===e),m(this.component,e,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}validateRequired(e){_(this.component,e)}validateRows(e){j(this.component,e)}validateValue(e){this.assertValueMatchesMultiplicity(e),p(this.component,"_value",()=>!0,void 0===e?[]:Array.isArray(e)?e:[e],void 0,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}componentWillLoad(){super.componentWillLoad(),this.validateOptions(this.component._options),this.validateMultiple(this.component._multiple),this.validateRequired(this.component._required),this.validateRows(this.component._rows),this.validateValue(this.component._value)}assertValueMatchesMultiplicity(e){const t=Array.isArray(e);if(!0===this.component._multiple){if(void 0!==e&&!t)throw new Error(`↑ The schema for the property (_value) is not valid for multiple mode. Expected an array. The value will not be changed. (received = ${JSON.stringify(e)})`)}else if(t)throw new Error(`↑ The schema for the property (_value) is not valid for single mode. Expected a single value. The value will not be changed. (received = ${JSON.stringify(e)})`)}assertComponentValueMatchesMultiplicity(e){const t=this.component._value;if(e){if(void 0!==t&&!Array.isArray(t))throw new Error(`↑ The schema for the property (_value) is not valid for multiple mode. Expected an array. The value will not be changed. (current = ${JSON.stringify(t)})`)}else if(Array.isArray(t))throw new Error(`↑ The schema for the property (_value) is not valid for single mode. Expected a single value. The value will not be changed. (current = ${JSON.stringify(t)})`)}}const P=class{async getValue(){return this._multiple?this.state._value:Array.isArray(this.state._value)&&this.state._value.length>0?this.state._value[0]:this.state._value}async focus(){return new Promise(e=>{requestAnimationFrame(()=>{var t;null===(t=this.selectRef)||void 0===t||t.focus(),e()})})}getFormFieldProps(){return{state:this.state,class:a("kol-form-field-select",{"kol-form-field--has-value":this.state._hasValue}),tooltipAlign:this._tooltipAlign,onClick:()=>{var e;return null===(e=this.selectRef)||void 0===e?void 0:e.focus()},alert:this.showAsAlert()}}getSelectProps(){return Object.assign(Object.assign({ref:this.catchRef,state:this.state},this.controller.onFacade),{onInput:this.onInput.bind(this),onChange:this.onChange.bind(this),onFocus:e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},onBlur:e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1}})}render(){return e(d,Object.assign({key:"5f0a307074c04096c87c8562bb4b32cd7a68fe33"},this.getFormFieldProps()),e(c,{key:"1c4df443d35659907835ce2a72d16fb2a23be340",state:this.state},e("form",{key:"78f8b37700ac271ebcfb92529e0fefbd79fffedd",onSubmit:e=>{e.preventDefault(),f({form:this.host})}},e("input",{key:"73ccb43eee0a4e71e9fa907d4e6a40bdf903fb33",type:"submit",hidden:!0}),e(B,Object.assign({key:"4cb054a8550a6c58eac0fdc23e751152c141c592"},this.getSelectProps())))))}constructor(e){s(this,e),this.catchRef=e=>{this.selectRef=e},this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._multiple=!1,this._required=!1,this._tooltipAlign="top",this._touched=!1,this.state={_hasValue:!1,_hideMsg:!1,_id:`id-${v()}`,_label:"",_multiple:!1,_options:[],_value:[]},this.inputHasFocus=!1,this.controller=new A(this,"select",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(e){this.controller.validateAccessKey(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHideMsg(e){this.controller.validateHideMsg(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateLabel(e){this.controller.validateLabel(e)}validateMsg(e){this.controller.validateMsg(e)}validateMultiple(e){this.controller.validateMultiple(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validateOptions(e){this.controller.validateOptions(e)}validateRequired(e){this.controller.validateRequired(e)}validateRows(e){this.controller.validateRows(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTabIndex(e){this.controller.validateTabIndex(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener(e=>this.state._hasValue=!!e)}onInput(e){var t;const s=Array.from((null===(t=this.selectRef)||void 0===t?void 0:t.options)||[]).filter(e=>e.selected).map(e=>{var t;return null===(t=this.controller.getOptionByKey(e.value))||void 0===t?void 0:t.value});if(this._multiple)this._value=s,this.controller.onFacade.onInput(e,!0,s);else{const t=s.length>0?s[0]:void 0;this._value=t,this.controller.onFacade.onInput(e,!0,t)}}onChange(e){this._multiple,this.controller.onFacade.onChange(e,this._value)}get host(){return i(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_label:["validateLabel"],_msg:["validateMsg"],_multiple:["validateMultiple"],_name:["validateName"],_on:["validateOn"],_options:["validateOptions"],_required:["validateRequired"],_rows:["validateRows"],_shortKey:["validateShortKey"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}};export{P as kol_select_wc};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as n,h as e,H as t}from"./index-CHdBQ7XR.js";import{l as o}from"./component-names-CqTpXVIM.js";import"./common-BIkdAxr0.js";const i='@charset "UTF-8";\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type=\'checkbox\'], [type=\'radio\'], [type=\'range\']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don\'t want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n .hastooltip {\n z-index: 900 !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert :host {\n display: inline-block;\n }\n .kol-alert .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-alert .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "​";\n }\n .kol-alert .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field {\n display: grid;\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text:not(:has(> [name]))::after,\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: "*"/"";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-input-container {\n background-color: transparent;\n display: grid;\n width: 100%;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n grid-template-columns: 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n min-height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-select {\n background-color: transparent;\n width: 100%;\n }\n .kol-select:not(:disabled) {\n cursor: pointer;\n }\n .kol-select:not([multiple], [size]) {\n height: 2.75em;\n }\n .kol-select:focus {\n outline: none;\n }\n .kol-select__option:checked::before {\n content: "✓ ";\n }\n .kol-select {\n /* needed hack for vertical alignment */\n }\n .kol-select[multiple] option {\n padding: calc((var(--a11y-min-size) - 16 * 1rem / var(--kolibri-root-font-size, 16)) / 2) 0.5em;\n }\n}',l=class{constructor(e){n(this,e),this.catchRef=n=>{this.selectWcRef=n},this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._multiple=!1,this._required=!1,this._tooltipAlign="top",this._touched=!1}async getValue(){var n;return null===(n=this.selectWcRef)||void 0===n?void 0:n.getValue()}async focus(){var n;return Promise.resolve(null===(n=this.selectWcRef)||void 0===n?void 0:n.focus())}render(){return e(t,{key:"1e92431ea58a4bfc3f0de2bdf454f6a9e027fe98",class:"kol-select"},e(o,{key:"57a74fe2dae64061fe7ca517db9b4ebd93c89a73",ref:this.catchRef,_accessKey:this._accessKey,_disabled:this._disabled,_hideLabel:this._hideLabel,_hideMsg:this._hideMsg,_hint:this._hint,_icons:this._icons,_label:this._label,_msg:this._msg,_multiple:this._multiple,_name:this._name,_on:this._on,_options:this._options,_required:this._required,_rows:this._rows,_shortKey:this._shortKey,_syncValueBySelector:this._syncValueBySelector,_tabIndex:this._tabIndex,_tooltipAlign:this._tooltipAlign,_touched:this._touched,_value:this._value},e("slot",{key:"409f1436592a63649350d56f3dc6d4a7901aad9f",name:"expert",slot:"expert"})))}};l.style={default:i};export{l as kol_select};
4
+ import{r as n,h as e,H as t}from"./index-CkrSoIPD.js";import{l as o}from"./component-names-CqTpXVIM.js";import"./common-BIkdAxr0.js";const i='@charset "UTF-8";\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type=\'checkbox\'], [type=\'radio\'], [type=\'range\']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don\'t want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n .hastooltip {\n z-index: 900 !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert :host {\n display: inline-block;\n }\n .kol-alert .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-alert .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "​";\n }\n .kol-alert .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field {\n display: grid;\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text:not(:has(> [name]))::after,\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: "*"/"";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-input-container {\n background-color: transparent;\n display: grid;\n width: 100%;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n grid-template-columns: 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n min-height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-select {\n background-color: transparent;\n width: 100%;\n }\n .kol-select:not(:disabled) {\n cursor: pointer;\n }\n .kol-select:not([multiple], [size]) {\n height: 2.75em;\n }\n .kol-select:focus {\n outline: none;\n }\n .kol-select__option:checked::before {\n content: "✓ ";\n }\n .kol-select {\n /* needed hack for vertical alignment */\n }\n .kol-select[multiple] option {\n padding: calc((var(--a11y-min-size) - 16 * 1rem / var(--kolibri-root-font-size, 16)) / 2) 0.5em;\n }\n}',l=class{constructor(e){n(this,e),this.catchRef=n=>{this.selectWcRef=n},this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._multiple=!1,this._required=!1,this._tooltipAlign="top",this._touched=!1}async getValue(){var n;return null===(n=this.selectWcRef)||void 0===n?void 0:n.getValue()}async focus(){var n;return Promise.resolve(null===(n=this.selectWcRef)||void 0===n?void 0:n.focus())}render(){return e(t,{key:"1e92431ea58a4bfc3f0de2bdf454f6a9e027fe98",class:"kol-select"},e(o,{key:"57a74fe2dae64061fe7ca517db9b4ebd93c89a73",ref:this.catchRef,_accessKey:this._accessKey,_disabled:this._disabled,_hideLabel:this._hideLabel,_hideMsg:this._hideMsg,_hint:this._hint,_icons:this._icons,_label:this._label,_msg:this._msg,_multiple:this._multiple,_name:this._name,_on:this._on,_options:this._options,_required:this._required,_rows:this._rows,_shortKey:this._shortKey,_syncValueBySelector:this._syncValueBySelector,_tabIndex:this._tabIndex,_tooltipAlign:this._tooltipAlign,_touched:this._touched,_value:this._value},e("slot",{key:"409f1436592a63649350d56f3dc6d4a7901aad9f",name:"expert",slot:"expert"})))}};l.style={default:i};export{l as kol_select};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{h as t,r as e,g as i}from"./index-CHdBQ7XR.js";import{c as n,d as s}from"./component-names-CqTpXVIM.js";import{a as o,F as l}from"./FormFieldStateWrapper-BFyiN9EY.js";import{I as a,a as r}from"./controller-icon-DKRqmDU2.js";import{I as h}from"./InputStateWrapper-D7DYAs_8.js";import{C as d,a as c}from"./CustomSuggestionsOptionsGroup-BBiujBa7.js";import{t as u}from"./i18n-DvMeCREp.js";import{c as f}from"./clsx-COFh-Vc8.js";import{n as m}from"./dev.utils-DEjbEXtH.js";import{b as p,e as b,N as g}from"./common-BIkdAxr0.js";import{f as v,b as k}from"./controller-vTikIczD.js";import{v as y}from"./placeholder-D8vH7TM6.js";import{v as w}from"./required-Dt9l4wUg.js";import"./access-and-short-key-CPX70LXd.js";import"./disabled-BdPI9eda.js";import"./hide-label-ByItyHgV.js";import"./label-C18ud7Yt.js";import"./tooltip-align-DodV1tEH.js";import"./align-DDUsWnWP.js";import"./events-DHTi_wtD.js";import"./associated.controller-CdEaJGVD.js";import"./bootstrap-DcH8Lr28.js";import"./i18n-B0tfVPMa.js";import"./isObject-DvSELytj.js";import"./tslib.es6-CxX45GIN.js";import"./InternalUnderlinedBadgeText-DLXbDpmD.js";import"./Alert-DJWeD9Xz.js";import"./bem-registry-DRYZs7IX.js";import"./browser-KcXKIKON.js";import"./Heading-Cp72eQOw.js";import"./Icon-BI9iw7pD.js";import"./icons-CmA8Oww0.js";import"./Input-DXQUCRHF.js";import"./orientation-pWOiDBRo.js";class _ extends a{constructor(t,e,n){super(t,e,n),this.keyOptionMap=new Map,this.afterPatchOptions=(t,e,n,i)=>{"_value"===i&&this.setFormAssociatedValue(t)},this.beforePatchOptions=(t,e)=>{const n=e.has("_options")?e.get("_options"):this.component.state._options;Array.isArray(n)&&n.length>0&&(this.keyOptionMap.clear(),v(this.keyOptionMap,n))},this.component=t}validateOptions(t){k(this.component,t,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}validateRequired(t){w(this.component,t)}validateValue(t){p(this.component,"_value",t=>void 0!==t,new Set(["KoliBriUnknown"]),t)}validatePlaceholder(t){y(this.component,t)}validateHasClearButton(t){b(this.component,"_hasClearButton",t)}validateRows(t){g(this.component,"_rows",t)}componentWillLoad(){super.componentWillLoad(),this.validateOptions(this.component._options),this.validateRequired(this.component._required),this.validateValue(this.component._value),this.validatePlaceholder(this.component._placeholder),this.validateHasClearButton(this.component._hasClearButton),this.validateRows(this.component._rows)}}const x='@charset "UTF-8";\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type=\'checkbox\'], [type=\'radio\'], [type=\'range\']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don\'t want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n .hastooltip {\n z-index: 900 !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert :host {\n display: inline-block;\n }\n .kol-alert .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-alert .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "​";\n }\n .kol-alert .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-custom-suggestions-option {\n line-height: 1.5;\n white-space: normal;\n cursor: pointer;\n overflow-wrap: break-word;\n }\n .kol-custom-suggestions-options-group--cursor-hidden .kol-custom-suggestions-option {\n cursor: none !important;\n }\n .kol-custom-suggestions-option--disabled:focus, .kol-custom-suggestions-option--disabled:focus * {\n cursor: not-allowed;\n }\n .kol-custom-suggestions-options-group {\n background-color: white;\n display: block;\n position: absolute;\n z-index: 2;\n max-height: calc(250 * 1rem / var(--kolibri-root-font-size, 16));\n margin: 0;\n padding: 0;\n overflow-x: hidden;\n overflow-y: auto;\n list-style-type: none;\n }\n .kol-input-container:has(.kol-custom-suggestions-options-group--open) {\n z-index: 10;\n }\n .kol-custom-suggestions-toggle {\n display: flex;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n justify-content: center;\n cursor: default;\n }\n .kol-custom-suggestions-toggle.kol-custom-suggestions-toggle--disabled {\n cursor: not-allowed;\n }\n .kol-form-field {\n display: grid;\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text:not(:has(> [name]))::after,\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: "*"/"";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-input-container {\n background-color: transparent;\n display: grid;\n width: 100%;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n grid-template-columns: 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n min-height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-input {\n background-color: transparent;\n width: 100%;\n min-width: var(--a11y-min-size);\n }\n .kol-input:focus {\n outline: none;\n }\n .kol-single-select__delete :host {\n display: inline-block;\n }\n .kol-single-select__delete .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-single-select__delete .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "​";\n }\n .kol-single-select__delete .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-single-select__delete .kol-button {\n margin-top: -2px;\n margin-bottom: -2px;\n }\n .kol-single-select__no-results-message {\n display: flex;\n min-height: calc(50 * 1rem / var(--kolibri-root-font-size, 16));\n align-items: center;\n justify-content: center;\n cursor: default;\n }\n .kol-single-select .kol-custom-suggestions-options-group {\n max-height: calc(40 * 1rem / var(--kolibri-root-font-size, 16) * var(--visible-options, 5) + 2 * 1rem / var(--kolibri-root-font-size, 16)) !important;\n }\n .kol-custom-suggestions-toggle:not(.kol-custom-suggestions-toggle--disabled) {\n cursor: pointer;\n }\n .kol-custom-suggestions-toggle--disabled {\n opacity: 0.5;\n }\n}',j=class{async getValue(){return this._value}async focus(){return new Promise(t=>{requestAnimationFrame(()=>{var e;null===(e=this.refInput)||void 0===e||e.focus(),t()})})}onBlur(t){var e,n,i;const o=null===(e=this.state._options)||void 0===e?void 0:e.find(t=>{var e,n;return(null===(e=t.label)||void 0===e?void 0:e.toLowerCase())===(null===(n=this._inputValue)||void 0===n?void 0:n.toLowerCase())});o?this.selectOption(o):!this._isOpen&&this._value&&(this._inputValue=null===(i=null===(n=this.state._options)||void 0===n?void 0:n.find(t=>t.value===this._value))||void 0===i?void 0:i.label,this._filteredOptions=[...this.state._options]),t instanceof FocusEvent&&t.view===window&&!this.isClearing&&(this._isOpen=!1)}createEventWithTarget(t,e){const n=new CustomEvent(t,{bubbles:!0,detail:e});return this.refInput&&(Object.defineProperty(n,"target",{value:this.refInput}),Object.defineProperty(n,"currentTarget",{value:this.refInput})),n}clearSelection(){if(this.isClearing=!0,this.state._disabled)return;const t=null;this._focusedOptionIndex=-1,this._value=t,this._inputValue="",this._filteredOptions=[...this.state._options];const e=this.createEventWithTarget("input",{name:this.state._name,value:t}),n=this.createEventWithTarget("change",{name:this.state._name,value:t});this.controller.onFacade.onInput(e,!0,{value:t}),this.controller.onFacade.onChange(n,{value:t}),this.isClearing=!1}selectOption(t){var e,n;if(t.value===this._value)return this._inputValue=t.label,void(this._filteredOptions=[...this.state._options]);this._value=t.value,this._inputValue=t.label;const i=this.createEventWithTarget("input",{name:null!==(e=this.state._name)&&void 0!==e?e:"",value:t.value}),o=this.createEventWithTarget("change",{name:null!==(n=this.state._name)&&void 0!==n?n:"",value:t.value});this.controller.onFacade.onInput(i,!1,t.value),this.controller.onFacade.onChange(o,t.value),this._filteredOptions=[...this.state._options],this.controller.setFormAssociatedValue(this._value)}onInput(t){const e=t.target;this._inputValue=e.value,this._isOpen=!0,this.setFilteredOptionsByQuery(e.value),this._focusedOptionIndex=-1}handleKeyDownDropdown(t){1===t.key.length&&/[a-z0-9]/i.test(t.key)&&(t.preventDefault(),this._isOpen=!0,this.focusSuggestionStartingWith(t.key))}setFilteredOptionsByQuery(t){""===(null==t?void 0:t.trim())?this._filteredOptions=[...this.state._options]:Array.isArray(this.state._options)&&this.state._options.length>0&&t.length>0&&(this._filteredOptions=this.state._options.filter(e=>{var n,i;return null===(i=null===(n=e.label)||void 0===n?void 0:n.toLowerCase())||void 0===i?void 0:i.includes(null==t?void 0:t.toLowerCase())}))}moveFocus(t){if(!this._filteredOptions)return;let e=this._focusedOptionIndex+t,n=0,i=!1;const o=this._filteredOptions.length;for(;n<o;){e>=this._filteredOptions.length&&(e=0),e<0&&(e=this._filteredOptions.length-1);if(!this._filteredOptions[e].disabled){i=!0;break}e+=t,n++}i&&(this._focusedOptionIndex=e,this.focusOption(this._focusedOptionIndex))}focusOption(t){if(this.refOptions){const e=this.refOptions[t];null==e||e.focus()}}selectFocusedOption(){return!!(Array.isArray(this._filteredOptions)&&this._filteredOptions.length>0&&this._focusedOptionIndex>=0)&&(this.selectOption(this._filteredOptions[this._focusedOptionIndex]),!0)}focusSuggestionStartingWith(t){const e=t.toLowerCase(),n=Array.isArray(this._filteredOptions)&&this._filteredOptions.findIndex(t=>t.label.toLowerCase().startsWith(e)&&!t.disabled);"number"==typeof n&&n>=0&&(this._focusedOptionIndex=n,this.focusOption(n))}getFormFieldProps(){return{state:this.state,class:"kol-single-select",tooltipAlign:this._tooltipAlign,alert:this.showAsAlert()}}getInputProps(){const{ariaDescribedBy:t}=o(this.state),e=!0===this.state._disabled;return Object.assign(Object.assign({"aria-activedescendant":this._isOpen&&this._focusedOptionIndex>=0?`option-${this._focusedOptionIndex}`:void 0,"aria-autocomplete":"both","aria-controls":"listbox","aria-describedby":t.length>0?t.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,"aria-keyshortcuts":this.state._shortKey,accessKey:this.state._accessKey,autocapitalize:"off",autocorrect:"off",class:"kol-single-select__input",disabled:e,name:this.state._name,placeholder:this.state._placeholder,ref:this.catchRef,required:this.state._required,role:"combobox",state:this.state,type:"text",value:this._inputValue},this.controller.onFacade),{onChange:this.onChange.bind(this),onClick:this.onClick.bind(this),onInput:this.onInput.bind(this),onFocus:t=>{this.controller.onFacade.onFocus(t),this.inputHasFocus=!0},onBlur:t=>{this.controller.onFacade.onBlur(t),this.inputHasFocus=!1}})}render(){var e;const i=!0===this.state._disabled;return t(l,Object.assign({key:"ad9a38a46479da356b1907afd906c0af53d0207e"},this.getFormFieldProps()),t(r,{key:"43954af770afef0dd073dc250071d43022553c20",state:this.state},t("div",{key:"d169f4b094570987aa89e37845df5c32dbb59e14",class:"kol-single-select__group"},t(h,Object.assign({key:"05c882735fb65b1d38415cbdf18bf0965ac3d879"},this.getInputProps())),this._inputValue&&this.state._hasClearButton&&t(n,{key:"573c57f90fed05f2a37c01176c6b6400c6776d6c",_icons:"kolicon-cross",_label:this.translateDeleteSelection,_hideLabel:!0,_variant:"ghost",_disabled:i,"data-testid":"single-select-delete",class:"kol-single-select__delete",hidden:i,_on:{onClick:()=>{var t;this.clearSelection(),null===(t=this.refInput)||void 0===t||t.focus()}}}),t(s,{key:"1c7113d7a3b0f2f7880565019f8564e6158bd739",_icons:"kolicon-chevron-down",_label:"",class:f("kol-custom-suggestions-toggle",{"kol-custom-suggestions-toggle--disabled":i}),onClick:this.toggleListbox.bind(this)})),t(d,{key:"62384a52d06f722bf25cbec7172dcf8f45a811ea",blockSuggestionMouseOver:this.blockSuggestionMouseOver,onKeyDown:this.handleKeyDownDropdown.bind(this),style:{"--visible-options":`${null!==(e=this._rows)&&void 0!==e?e:5}`},hidden:!this._isOpen||i},Array.isArray(this._filteredOptions)&&this._filteredOptions.length>0?this._filteredOptions.map((e,n)=>t(c,{index:n,option:e.label,searchTerm:this._inputValue,ref:t=>{t&&(this.refOptions[n]=t)},selected:this._value===e.value,disabled:!!e.disabled,onClick:t=>{var n;e.disabled||(this.selectOption(e),null===(n=this.refInput)||void 0===n||n.focus(),this.toggleListbox(t),this._isOpen=!1)},onMouseOver:()=>{this.blockSuggestionMouseOver||(this._focusedOptionIndex=n,this.focusOption(n))},onFocus:()=>{e.disabled||(this._focusedOptionIndex=n,this.focusOption(n))},onKeyDown:t=>{var n;e.disabled||"Enter"!==t.key&&"NumpadEnter"!==t.key||(this.selectOption(e),null===(n=this.refInput)||void 0===n||n.focus(),this.toggleListbox(t),t.preventDefault())}})):t("li",{class:"kol-single-select__no-results-message",role:"alert"},this.translateNoResultsMessage," "))))}handleFocusOut(t){setTimeout(()=>{var e;(null===(e=this.host)||void 0===e?void 0:e.contains(document.activeElement))||this.onBlur(t)})}handleWindowBlur(t){this.onBlur(t)}handleKeyDown(t){var e,n;const i=(e,n)=>{var i;t.preventDefault(),void 0!==e&&(this._isOpen=e,e||null===(i=this.refInput)||void 0===i||i.focus()),null==n||n()};switch(t.key){case"Down":case"ArrowDown":this.blockSuggestionMouseOver=!0,i(!0,()=>this.moveFocus(1));break;case"Up":case"ArrowUp":this.blockSuggestionMouseOver=!0,i(!0,()=>this.moveFocus(-1));break;case"Tab":this._isOpen&&(this._isOpen=!this._isOpen,null===(e=this.refInput)||void 0===e||e.focus());break;case"Esc":case"Escape":this._isOpen=!1,i(!1);break;case" ":case"Enter":case"NumpadEnter":this._isOpen?this.selectFocusedOption()&&(null===(n=this.refInput)||void 0===n||n.focus(),i(!1)):this.toggleListbox(t);break;case"Home":this.blockSuggestionMouseOver=!0,i(void 0,()=>{this._isOpen&&(this._focusedOptionIndex=0,this.focusOption(this._focusedOptionIndex))});break;case"End":this.blockSuggestionMouseOver=!0,i(void 0,()=>{this._isOpen&&(this._focusedOptionIndex=this._filteredOptions?this._filteredOptions.length-1:0,this.focusOption(this._focusedOptionIndex))});break;case"PageUp":this.blockSuggestionMouseOver=!0,i(void 0,()=>this._isOpen&&this.moveFocus(-10));break;case"PageDown":this.blockSuggestionMouseOver=!0,i(void 0,()=>this._isOpen&&this.moveFocus(10))}}constructor(t){e(this,t),this.refOptions=[],this.translateDeleteSelection=u("kol-delete-selection"),this.translateNoResultsMessage=u("kol-no-results-message"),this.isClearing=!1,this.catchRef=t=>{this.refInput=t},this.toggleListbox=t=>{var e;null==t||t.preventDefault();if(!(!0===this.state._disabled))if(null===(e=this.refInput)||void 0===e||e.focus(),this._isOpen)this._isOpen=!1;else{this._isOpen=!0;const t=Array.isArray(this._filteredOptions)?this._filteredOptions.findIndex(t=>t.label===this._inputValue):-1;this._focusedOptionIndex=t>=0?t:-1,this.focusOption(this._focusedOptionIndex)}},this._focusedOptionIndex=-1,this._isOpen=!1,this._filteredOptions=[],this._inputValue="",this.blockSuggestionMouseOver=!1,this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._required=!1,this._tooltipAlign="top",this._touched=!1,this._value=null,this._hasClearButton=!0,this.state={_hideMsg:!1,_id:`id-${m()}`,_label:"",_options:[],_hasClearButton:!0},this.inputHasFocus=!1,this.controller=new _(this,"single-select",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validatePlaceholder(t){this.controller.validatePlaceholder(t)}validateAccessKey(t){this.controller.validateAccessKey(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateHideMsg(t){this.controller.validateHideMsg(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateIcons(t){this.controller.validateIcons(t)}validateLabel(t){this.controller.validateLabel(t)}validateMsg(t){this.controller.validateMsg(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validateOptions(t){this.controller.validateOptions(t),this._filteredOptions=t,this.updateInputValue(this._value)}validateRequired(t){this.controller.validateRequired(t)}validateShortKey(t){this.controller.validateShortKey(t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTouched(t){this.controller.validateTouched(t)}validateValue(t){this.controller.validateValue(t),this.oldValue=t,this.updateInputValue(t)}validateHasClearButton(t){this.controller.validateHasClearButton(t)}validateRows(t){this.controller.validateRows(t)}handleMouseEvent(){this.blockSuggestionMouseOver=!1}updateInputValue(t){if(Array.isArray(this._options)){const e=this._options.find(e=>e.value===t);this._inputValue=e?String(e.label):""}}componentWillLoad(){this.refOptions=[],this._touched=!0===this._touched,this.controller.componentWillLoad(),this.oldValue=this._value,this._filteredOptions=this.state._options,this.updateInputValue(this._value)}onChange(t){var e,n;this.oldValue!==(null===(e=this.refInput)||void 0===e?void 0:e.value)&&(this.oldValue=null===(n=this.refInput)||void 0===n?void 0:n.value),this._isOpen||this.controller.onFacade.onChange(t,this._value)}onClick(t){var e;this.toggleListbox(t),null===(e=this.refInput)||void 0===e||e.focus(),this.controller.onFacade.onClick(t)}get host(){return i(this)}static get watchers(){return{_placeholder:["validatePlaceholder"],_accessKey:["validateAccessKey"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_label:["validateLabel"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_options:["validateOptions"],_required:["validateRequired"],_shortKey:["validateShortKey"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"],_hasClearButton:["validateHasClearButton"],_rows:["validateRows"]}}};j.style={default:x};export{j as kol_single_select};
4
+ import{h as t,r as e,g as i}from"./index-CkrSoIPD.js";import{c as n,d as s}from"./component-names-CqTpXVIM.js";import{a as o,F as l}from"./FormFieldStateWrapper--EBKaIYU.js";import{I as a,a as r}from"./controller-icon-By1Ikt1k.js";import{I as h}from"./InputStateWrapper-CCJNqzRI.js";import{C as d,a as c}from"./CustomSuggestionsOptionsGroup-BiV1SLtM.js";import{t as u}from"./i18n-DvMeCREp.js";import{c as f}from"./clsx-COFh-Vc8.js";import{n as m}from"./dev.utils-DEA-azs5.js";import{b as p,e as b,N as g}from"./common-BIkdAxr0.js";import{f as v,b as k}from"./controller-INr--hn-.js";import{v as y}from"./placeholder-D8vH7TM6.js";import{v as _}from"./required-Dt9l4wUg.js";import"./access-and-short-key-CPX70LXd.js";import"./disabled-BdPI9eda.js";import"./hide-label-ByItyHgV.js";import"./label-C18ud7Yt.js";import"./tooltip-align-DodV1tEH.js";import"./align-DDUsWnWP.js";import"./events-DHTi_wtD.js";import"./associated.controller-CdEaJGVD.js";import"./bootstrap-DcH8Lr28.js";import"./i18n-B0tfVPMa.js";import"./isObject-DvSELytj.js";import"./tslib.es6-CxX45GIN.js";import"./InternalUnderlinedBadgeText-t86A5_XQ.js";import"./Alert-w2MT71aB.js";import"./bem-registry-DRYZs7IX.js";import"./browser-KcXKIKON.js";import"./Heading-B9rTijzp.js";import"./Icon-BYiB0b6v.js";import"./icons-CmA8Oww0.js";import"./Input-N-fWHtGJ.js";import"./orientation-pWOiDBRo.js";class w extends a{constructor(t,e,n){super(t,e,n),this.keyOptionMap=new Map,this.afterPatchOptions=(t,e,n,i)=>{"_value"===i&&this.setFormAssociatedValue(t)},this.beforePatchOptions=(t,e)=>{const n=e.has("_options")?e.get("_options"):this.component.state._options;Array.isArray(n)&&n.length>0&&(this.keyOptionMap.clear(),v(this.keyOptionMap,n))},this.component=t}validateOptions(t){k(this.component,t,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}validateRequired(t){_(this.component,t)}validateValue(t){p(this.component,"_value",t=>void 0!==t,new Set(["KoliBriUnknown"]),t)}validatePlaceholder(t){y(this.component,t)}validateHasClearButton(t){b(this.component,"_hasClearButton",t)}validateRows(t){g(this.component,"_rows",t)}componentWillLoad(){super.componentWillLoad(),this.validateOptions(this.component._options),this.validateRequired(this.component._required),this.validateValue(this.component._value),this.validatePlaceholder(this.component._placeholder),this.validateHasClearButton(this.component._hasClearButton),this.validateRows(this.component._rows)}}const x='@charset "UTF-8";\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type=\'checkbox\'], [type=\'radio\'], [type=\'range\']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don\'t want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n .hastooltip {\n z-index: 900 !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert :host {\n display: inline-block;\n }\n .kol-alert .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-alert .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "​";\n }\n .kol-alert .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-custom-suggestions-option {\n line-height: 1.5;\n white-space: normal;\n cursor: pointer;\n overflow-wrap: break-word;\n }\n .kol-custom-suggestions-options-group--cursor-hidden .kol-custom-suggestions-option {\n cursor: none !important;\n }\n .kol-custom-suggestions-option--disabled:focus, .kol-custom-suggestions-option--disabled:focus * {\n cursor: not-allowed;\n }\n .kol-custom-suggestions-options-group {\n background-color: white;\n display: block;\n position: absolute;\n z-index: 2;\n max-height: calc(250 * 1rem / var(--kolibri-root-font-size, 16));\n margin: 0;\n padding: 0;\n overflow-x: hidden;\n overflow-y: auto;\n list-style-type: none;\n }\n .kol-input-container:has(.kol-custom-suggestions-options-group--open) {\n z-index: 10;\n }\n .kol-custom-suggestions-toggle {\n display: flex;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n justify-content: center;\n cursor: default;\n }\n .kol-custom-suggestions-toggle.kol-custom-suggestions-toggle--disabled {\n cursor: not-allowed;\n }\n .kol-form-field {\n display: grid;\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text:not(:has(> [name]))::after,\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: "*"/"";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-input-container {\n background-color: transparent;\n display: grid;\n width: 100%;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n grid-template-columns: 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n min-height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-input {\n background-color: transparent;\n width: 100%;\n min-width: var(--a11y-min-size);\n }\n .kol-input:focus {\n outline: none;\n }\n .kol-single-select__delete :host {\n display: inline-block;\n }\n .kol-single-select__delete .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-single-select__delete .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "​";\n }\n .kol-single-select__delete .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-single-select__delete .kol-button {\n margin-top: -2px;\n margin-bottom: -2px;\n }\n .kol-single-select__no-results-message {\n display: flex;\n min-height: calc(50 * 1rem / var(--kolibri-root-font-size, 16));\n align-items: center;\n justify-content: center;\n cursor: default;\n }\n .kol-single-select .kol-custom-suggestions-options-group {\n max-height: calc(40 * 1rem / var(--kolibri-root-font-size, 16) * var(--visible-options, 5) + 2 * 1rem / var(--kolibri-root-font-size, 16)) !important;\n }\n .kol-custom-suggestions-toggle:not(.kol-custom-suggestions-toggle--disabled) {\n cursor: pointer;\n }\n .kol-custom-suggestions-toggle--disabled {\n opacity: 0.5;\n }\n}',j=class{async getValue(){return this._value}async focus(){return new Promise(t=>{requestAnimationFrame(()=>{var e;null===(e=this.refInput)||void 0===e||e.focus(),t()})})}onBlur(t){var e,n,i;const o=null===(e=this.state._options)||void 0===e?void 0:e.find(t=>{var e,n;return(null===(e=t.label)||void 0===e?void 0:e.toLowerCase())===(null===(n=this._inputValue)||void 0===n?void 0:n.toLowerCase())});o?this.selectOption(o):!this._isOpen&&this._value&&(this._inputValue=null===(i=null===(n=this.state._options)||void 0===n?void 0:n.find(t=>t.value===this._value))||void 0===i?void 0:i.label,this._filteredOptions=[...this.state._options]),t instanceof FocusEvent&&t.view===window&&!this.isClearing&&(this._isOpen=!1)}createEventWithTarget(t,e){const n=new CustomEvent(t,{bubbles:!0,detail:e});return this.refInput&&(Object.defineProperty(n,"target",{value:this.refInput}),Object.defineProperty(n,"currentTarget",{value:this.refInput})),n}clearSelection(){if(this.isClearing=!0,this.state._disabled)return;const t=null;this._focusedOptionIndex=-1,this._value=t,this._inputValue="",this._filteredOptions=[...this.state._options];const e=this.createEventWithTarget("input",{name:this.state._name,value:t}),n=this.createEventWithTarget("change",{name:this.state._name,value:t});this.controller.onFacade.onInput(e,!0,{value:t}),this.controller.onFacade.onChange(n,{value:t}),this.isClearing=!1}selectOption(t){var e,n;if(t.value===this._value)return this._inputValue=t.label,void(this._filteredOptions=[...this.state._options]);this._value=t.value,this._inputValue=t.label;const i=this.createEventWithTarget("input",{name:null!==(e=this.state._name)&&void 0!==e?e:"",value:t.value}),o=this.createEventWithTarget("change",{name:null!==(n=this.state._name)&&void 0!==n?n:"",value:t.value});this.controller.onFacade.onInput(i,!1,t.value),this.controller.onFacade.onChange(o,t.value),this._filteredOptions=[...this.state._options],this.controller.setFormAssociatedValue(this._value)}onInput(t){const e=t.target;this._inputValue=e.value,this._isOpen=!0,this.setFilteredOptionsByQuery(e.value),this._focusedOptionIndex=-1}handleKeyDownDropdown(t){1===t.key.length&&/[a-z0-9]/i.test(t.key)&&(t.preventDefault(),this._isOpen=!0,this.focusSuggestionStartingWith(t.key))}setFilteredOptionsByQuery(t){""===(null==t?void 0:t.trim())?this._filteredOptions=[...this.state._options]:Array.isArray(this.state._options)&&this.state._options.length>0&&t.length>0&&(this._filteredOptions=this.state._options.filter(e=>{var n,i;return null===(i=null===(n=e.label)||void 0===n?void 0:n.toLowerCase())||void 0===i?void 0:i.includes(null==t?void 0:t.toLowerCase())}))}moveFocus(t){if(!this._filteredOptions)return;let e=this._focusedOptionIndex+t,n=0,i=!1;const o=this._filteredOptions.length;for(;n<o;){e>=this._filteredOptions.length&&(e=0),e<0&&(e=this._filteredOptions.length-1);if(!this._filteredOptions[e].disabled){i=!0;break}e+=t,n++}i&&(this._focusedOptionIndex=e,this.focusOption(this._focusedOptionIndex))}focusOption(t){if(this.refOptions){const e=this.refOptions[t];null==e||e.focus()}}selectFocusedOption(){return!!(Array.isArray(this._filteredOptions)&&this._filteredOptions.length>0&&this._focusedOptionIndex>=0)&&(this.selectOption(this._filteredOptions[this._focusedOptionIndex]),!0)}focusSuggestionStartingWith(t){const e=t.toLowerCase(),n=Array.isArray(this._filteredOptions)&&this._filteredOptions.findIndex(t=>t.label.toLowerCase().startsWith(e)&&!t.disabled);"number"==typeof n&&n>=0&&(this._focusedOptionIndex=n,this.focusOption(n))}getFormFieldProps(){return{state:this.state,class:"kol-single-select",tooltipAlign:this._tooltipAlign,alert:this.showAsAlert()}}getInputProps(){const{ariaDescribedBy:t}=o(this.state),e=!0===this.state._disabled;return Object.assign(Object.assign({"aria-activedescendant":this._isOpen&&this._focusedOptionIndex>=0?`option-${this._focusedOptionIndex}`:void 0,"aria-autocomplete":"both","aria-controls":"listbox","aria-describedby":t.length>0?t.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,"aria-keyshortcuts":this.state._shortKey,accessKey:this.state._accessKey,autocapitalize:"off",autocorrect:"off",class:"kol-single-select__input",disabled:e,name:this.state._name,placeholder:this.state._placeholder,ref:this.catchRef,required:this.state._required,role:"combobox",state:this.state,type:"text",value:this._inputValue},this.controller.onFacade),{onChange:this.onChange.bind(this),onClick:this.onClick.bind(this),onInput:this.onInput.bind(this),onFocus:t=>{this.controller.onFacade.onFocus(t),this.inputHasFocus=!0},onBlur:t=>{this.controller.onFacade.onBlur(t),this.inputHasFocus=!1}})}render(){var e;const i=!0===this.state._disabled;return t(l,Object.assign({key:"ad9a38a46479da356b1907afd906c0af53d0207e"},this.getFormFieldProps()),t(r,{key:"43954af770afef0dd073dc250071d43022553c20",state:this.state},t("div",{key:"d169f4b094570987aa89e37845df5c32dbb59e14",class:"kol-single-select__group"},t(h,Object.assign({key:"05c882735fb65b1d38415cbdf18bf0965ac3d879"},this.getInputProps())),this._inputValue&&this.state._hasClearButton&&t(n,{key:"573c57f90fed05f2a37c01176c6b6400c6776d6c",_icons:"kolicon-cross",_label:this.translateDeleteSelection,_hideLabel:!0,_variant:"ghost",_disabled:i,"data-testid":"single-select-delete",class:"kol-single-select__delete",hidden:i,_on:{onClick:()=>{var t;this.clearSelection(),null===(t=this.refInput)||void 0===t||t.focus()}}}),t(s,{key:"1c7113d7a3b0f2f7880565019f8564e6158bd739",_icons:"kolicon-chevron-down",_label:"",class:f("kol-custom-suggestions-toggle",{"kol-custom-suggestions-toggle--disabled":i}),onClick:this.toggleListbox.bind(this)})),t(d,{key:"62384a52d06f722bf25cbec7172dcf8f45a811ea",blockSuggestionMouseOver:this.blockSuggestionMouseOver,onKeyDown:this.handleKeyDownDropdown.bind(this),style:{"--visible-options":`${null!==(e=this._rows)&&void 0!==e?e:5}`},hidden:!this._isOpen||i},Array.isArray(this._filteredOptions)&&this._filteredOptions.length>0?this._filteredOptions.map((e,n)=>t(c,{index:n,option:e.label,searchTerm:this._inputValue,ref:t=>{t&&(this.refOptions[n]=t)},selected:this._value===e.value,disabled:!!e.disabled,onClick:t=>{var n;e.disabled||(this.selectOption(e),null===(n=this.refInput)||void 0===n||n.focus(),this.toggleListbox(t),this._isOpen=!1)},onMouseOver:()=>{this.blockSuggestionMouseOver||(this._focusedOptionIndex=n,this.focusOption(n))},onFocus:()=>{e.disabled||(this._focusedOptionIndex=n,this.focusOption(n))},onKeyDown:t=>{var n;e.disabled||"Enter"!==t.key&&"NumpadEnter"!==t.key||(this.selectOption(e),null===(n=this.refInput)||void 0===n||n.focus(),this.toggleListbox(t),t.preventDefault())}})):t("li",{class:"kol-single-select__no-results-message",role:"alert"},this.translateNoResultsMessage," "))))}handleFocusOut(t){setTimeout(()=>{var e;(null===(e=this.host)||void 0===e?void 0:e.contains(document.activeElement))||this.onBlur(t)})}handleWindowBlur(t){this.onBlur(t)}handleKeyDown(t){var e,n;const i=(e,n)=>{var i;t.preventDefault(),void 0!==e&&(this._isOpen=e,e||null===(i=this.refInput)||void 0===i||i.focus()),null==n||n()};switch(t.key){case"Down":case"ArrowDown":this.blockSuggestionMouseOver=!0,i(!0,()=>this.moveFocus(1));break;case"Up":case"ArrowUp":this.blockSuggestionMouseOver=!0,i(!0,()=>this.moveFocus(-1));break;case"Tab":this._isOpen&&(this._isOpen=!this._isOpen,null===(e=this.refInput)||void 0===e||e.focus());break;case"Esc":case"Escape":this._isOpen=!1,i(!1);break;case" ":case"Enter":case"NumpadEnter":this._isOpen?this.selectFocusedOption()&&(null===(n=this.refInput)||void 0===n||n.focus(),i(!1)):this.toggleListbox(t);break;case"Home":this.blockSuggestionMouseOver=!0,i(void 0,()=>{this._isOpen&&(this._focusedOptionIndex=0,this.focusOption(this._focusedOptionIndex))});break;case"End":this.blockSuggestionMouseOver=!0,i(void 0,()=>{this._isOpen&&(this._focusedOptionIndex=this._filteredOptions?this._filteredOptions.length-1:0,this.focusOption(this._focusedOptionIndex))});break;case"PageUp":this.blockSuggestionMouseOver=!0,i(void 0,()=>this._isOpen&&this.moveFocus(-10));break;case"PageDown":this.blockSuggestionMouseOver=!0,i(void 0,()=>this._isOpen&&this.moveFocus(10))}}constructor(t){e(this,t),this.refOptions=[],this.translateDeleteSelection=u("kol-delete-selection"),this.translateNoResultsMessage=u("kol-no-results-message"),this.isClearing=!1,this.catchRef=t=>{this.refInput=t},this.toggleListbox=t=>{var e;null==t||t.preventDefault();if(!(!0===this.state._disabled))if(null===(e=this.refInput)||void 0===e||e.focus(),this._isOpen)this._isOpen=!1;else{this._isOpen=!0;const t=Array.isArray(this._filteredOptions)?this._filteredOptions.findIndex(t=>t.label===this._inputValue):-1;this._focusedOptionIndex=t>=0?t:-1,this.focusOption(this._focusedOptionIndex)}},this._focusedOptionIndex=-1,this._isOpen=!1,this._filteredOptions=[],this._inputValue="",this.blockSuggestionMouseOver=!1,this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._required=!1,this._tooltipAlign="top",this._touched=!1,this._value=null,this._hasClearButton=!0,this.state={_hideMsg:!1,_id:`id-${m()}`,_label:"",_options:[],_hasClearButton:!0},this.inputHasFocus=!1,this.controller=new w(this,"single-select",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validatePlaceholder(t){this.controller.validatePlaceholder(t)}validateAccessKey(t){this.controller.validateAccessKey(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateHideMsg(t){this.controller.validateHideMsg(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateIcons(t){this.controller.validateIcons(t)}validateLabel(t){this.controller.validateLabel(t)}validateMsg(t){this.controller.validateMsg(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validateOptions(t){this.controller.validateOptions(t),this._filteredOptions=t,this.updateInputValue(this._value)}validateRequired(t){this.controller.validateRequired(t)}validateShortKey(t){this.controller.validateShortKey(t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTouched(t){this.controller.validateTouched(t)}validateValue(t){this.controller.validateValue(t),this.oldValue=t,this.updateInputValue(t)}validateHasClearButton(t){this.controller.validateHasClearButton(t)}validateRows(t){this.controller.validateRows(t)}handleMouseEvent(){this.blockSuggestionMouseOver=!1}updateInputValue(t){if(Array.isArray(this._options)){const e=this._options.find(e=>e.value===t);this._inputValue=e?String(e.label):""}}componentWillLoad(){this.refOptions=[],this._touched=!0===this._touched,this.controller.componentWillLoad(),this.oldValue=this._value,this._filteredOptions=this.state._options,this.updateInputValue(this._value)}onChange(t){var e,n;this.oldValue!==(null===(e=this.refInput)||void 0===e?void 0:e.value)&&(this.oldValue=null===(n=this.refInput)||void 0===n?void 0:n.value),this._isOpen||this.controller.onFacade.onChange(t,this._value)}onClick(t){var e;this.toggleListbox(t),null===(e=this.refInput)||void 0===e||e.focus(),this.controller.onFacade.onClick(t)}get host(){return i(this)}static get watchers(){return{_placeholder:["validatePlaceholder"],_accessKey:["validateAccessKey"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_label:["validateLabel"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_options:["validateOptions"],_required:["validateRequired"],_shortKey:["validateShortKey"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"],_hasClearButton:["validateHasClearButton"],_rows:["validateRows"]}}};j.style={default:x};export{j as kol_single_select};
@@ -1 +1 @@
1
- {"version":3,"file":"kol-skeleton.entry.esm.js","sources":["src/internal/props/count.ts","src/internal/props/name.ts","src/internal/functional-components/skeleton/component.tsx","src/internal/functional-components/skeleton/controller.ts","src/components/_skeleton/web-components/skeleton/component.tsx"],"sourcesContent":["import { createPropDefinition, type Prop } from './helpers/factory';\nimport { normalizeInteger } from './helpers/normalizers';\n\nexport type CountProp = Prop<'count', number | string, number>;\nexport const countProp = createPropDefinition<CountProp>(normalizeInteger, (v) => v >= 0);\n","import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeString } from './helpers/normalizers';\n\nexport type NameProp = SimpleProp<'name', string>;\nexport const nameProp = createPropDefinition<NameProp>(normalizeString, () => true);\n","import type { FunctionalComponent as FC } from '@stencil/core';\nimport { h } from '@stencil/core';\n\nimport { bem } from '../../../schema/bem-registry';\nimport { ClickButtonFC } from '../click-button/component';\nimport type { FunctionalComponentProps } from '../generic-types';\nimport type { SkeletonApi } from './api';\n\nconst skeletonBem = bem.forBlock('kol-skeleton');\nconst BEM_CLASS_SKELETON__ACTIONS = skeletonBem('actions');\nconst BEM_CLASS_SKELETON__CONTAINER = skeletonBem('container');\nconst BEM_CLASS_SKELETON__COUNTER = skeletonBem('counter');\nconst BEM_CLASS_SKELETON__NAME = skeletonBem('name');\n\nexport const SkeletonFC: FC<FunctionalComponentProps<SkeletonApi>> = (props) => {\n\tconst { count, label, name, show, handleClick, refButton } = props;\n\tconst hasName = !!(show && name?.trim());\n\tconst BEM_CLASS_ROOT = skeletonBem({\n\t\t'has-name': hasName,\n\t\t'is-hidden': !show,\n\t});\n\treturn (\n\t\t<div class={BEM_CLASS_ROOT}>\n\t\t\t<div class={BEM_CLASS_SKELETON__CONTAINER}>\n\t\t\t\t{hasName && <span class={BEM_CLASS_SKELETON__NAME}>{name}</span>}\n\t\t\t\t<div class={BEM_CLASS_SKELETON__COUNTER}>Count: {count}</div>\n\t\t\t</div>\n\t\t\t<div class={BEM_CLASS_SKELETON__ACTIONS}>\n\t\t\t\t<ClickButtonFC label={label} handleClick={handleClick} refButton={refButton} />\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n","import { Log } from '../../../schema';\nimport { countProp, labelProp, nameProp } from '../../props';\nimport { BaseController } from '../base-controller';\nimport { ClickButtonController } from '../click-button/controller';\nimport type { ControllerInterface, ResolvedInputProps } from '../generic-types';\nimport type { SkeletonApi } from './api';\n\nexport class SkeletonController extends BaseController<SkeletonApi> implements ControllerInterface<SkeletonApi> {\n\tprivate readonly clickButtonCtrl: ClickButtonController;\n\tprivate intervalId?: ReturnType<typeof setTimeout>;\n\n\tpublic constructor(states: SkeletonApi['States']) {\n\t\tsuper(states, {\n\t\t\tcount: 0,\n\t\t\tname: '',\n\t\t});\n\n\t\tthis.clickButtonCtrl = new ClickButtonController({});\n\t\tthis.startLoadedEventInterval();\n\t}\n\n\tpublic componentWillLoad(props: ResolvedInputProps<SkeletonApi>): void {\n\t\tconst { count, name } = props;\n\t\tthis.watchCount(count);\n\t\tthis.watchName(name);\n\t\tthis.watchLabel(this.component.label);\n\t\tthis.clickButtonCtrl.componentWillLoad({\n\t\t\tlabel: this.component.label,\n\t\t});\n\t}\n\n\tpublic watchCount(value?: number | string): void {\n\t\tcountProp.apply(value, (v) => {\n\t\t\tthis.setProp('count', v);\n\t\t\tthis.setState('count', v);\n\t\t});\n\t}\n\n\tpublic watchName(value?: string): void {\n\t\tnameProp.apply(value, (v) => {\n\t\t\tthis.setProp('name', v);\n\t\t});\n\t}\n\n\tpublic watchLabel(value?: string): void {\n\t\tlabelProp.apply(value, (v) => {\n\t\t\tthis.setState('label', v);\n\t\t\tthis.clickButtonCtrl.watchLabel(v);\n\t\t});\n\t}\n\n\tpublic toggle(): void {\n\t\tthis.setState('show', !this.component.show);\n\t}\n\n\tpublic onKeydown = (event: KeyboardEvent): void => {\n\t\tif (event.key === 'Escape') {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.log('Show should be toggled');\n\t\t\tvoid this.toggle();\n\t\t}\n\t};\n\n\tpublic handleClick = (): void => {\n\t\tLog.debug('Button clicked, count should be increased');\n\t\tconst { count } = this.getProps();\n\t\tconst nextCount = count + 1;\n\t\tthis.setProp('count', nextCount);\n\t\tthis.setState('count', nextCount);\n\t};\n\n\tpublic focus(): void {\n\t\treturn this.clickButtonCtrl.focus();\n\t}\n\n\tpublic setButtonRef = (element?: HTMLButtonElement): void => {\n\t\tthis.clickButtonCtrl.setButtonRef(element);\n\t};\n\n\tprivate startLoadedEventInterval(): void {\n\t\t// Emit loaded event every 2 seconds with current count value\n\t\tthis.intervalId = setInterval(() => {\n\t\t\tconst { count } = this.getProps();\n\t\t\tthis.emitLoaded(count);\n\t\t}, 2000);\n\t}\n\n\tprivate emitLoaded(count: number): void {\n\t\t// This method will be used by the web component to emit the loaded event\n\t\t// The web component needs to call this method to actually emit the event\n\t\t// We use a callback approach to let the web component handle the emission\n\t\tif (this.onLoadedCallback) {\n\t\t\tthis.onLoadedCallback(count);\n\t\t}\n\t}\n\n\tprivate onLoadedCallback?: (count: number) => void;\n\n\tpublic setOnLoadedCallback(callback: (count: number) => void): void {\n\t\tthis.onLoadedCallback = callback;\n\t}\n\n\tpublic destroy(): void {\n\t\tif (this.intervalId) {\n\t\t\tclearInterval(this.intervalId);\n\t\t\tthis.intervalId = undefined;\n\t\t}\n\t}\n}\n","import type { EventEmitter, JSX } from '@stencil/core';\nimport { Component, Event, h, Host, Listen, Method, Prop, State, Watch } from '@stencil/core';\nimport type { WebComponentInterface } from '../../../../internal/functional-components/generic-types';\nimport type { SkeletonApi } from '../../../../internal/functional-components/skeleton/api';\nimport { SkeletonFC } from '../../../../internal/functional-components/skeleton/component';\nimport { SkeletonController } from '../../../../internal/functional-components/skeleton/controller';\nimport { Log } from '../../../../schema';\n\n@Component({\n\ttag: 'kol-skeleton',\n\tshadow: true,\n})\nexport class KolSkeleton implements WebComponentInterface<SkeletonApi> {\n\tprivate readonly ctrl = new SkeletonController(this);\n\n\t/**\n\t * Focuses the interactive element of the component.\n\t */\n\t@Method()\n\tpublic async focus(): Promise<void> {\n\t\treturn Promise.resolve(this.ctrl.focus());\n\t}\n\n\t/**\n\t * Toggles the visibility of the skeleton component.\n\t */\n\t@Method()\n\tpublic async toggle(): Promise<void> {\n\t\treturn Promise.resolve(this.ctrl.toggle());\n\t}\n\n\t/**\n\t * Sets the count of the skeleton component.\n\t */\n\t@Prop()\n\tpublic _count?: number | string;\n\n\t@Watch('_count')\n\tpublic watchCount(value?: number | string): void {\n\t\tthis.ctrl.watchCount(value);\n\t}\n\n\t/**\n\t * Sets the name of the skeleton component.\n\t */\n\t@Prop()\n\tpublic _name!: string;\n\n\t@Watch('_name')\n\tpublic watchName(value?: string): void {\n\t\tthis.ctrl.watchName(value);\n\t}\n\n\t@State()\n\tpublic label: string = 'Label';\n\n\t@State()\n\tpublic show: boolean = true;\n\n\t@State()\n\tpublic count: number = 0;\n\n\t@Listen('keydown')\n\tpublic handleKeyDown(event: KeyboardEvent): void {\n\t\tif (event.key === 'Enter' || event.key === ' ') {\n\t\t\tLog.debug('button pressed');\n\t\t\tthis.ctrl.handleClick();\n\t\t}\n\t}\n\n\t/**\n\t * Emitted when the skeleton has finished loading.\n\t */\n\t@Event() public loaded!: EventEmitter<number>;\n\n\t/**\n\t * Emitted when the skeleton has been rendered for the first time.\n\t */\n\t@Event() public rendered!: EventEmitter<void>;\n\n\t@Listen('keydown', { target: 'window' })\n\tpublic onKeydown(event: KeyboardEvent): void {\n\t\tthis.ctrl.onKeydown(event);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.ctrl.componentWillLoad({\n\t\t\tcount: this._count,\n\t\t\tname: this._name,\n\t\t});\n\n\t\t// Set up the callback for emitting loaded events\n\t\tthis.ctrl.setOnLoadedCallback((count: number) => {\n\t\t\tthis.loaded.emit(count);\n\t\t});\n\t}\n\n\tpublic componentDidLoad(): void {\n\t\trequestAnimationFrame(() => {\n\t\t\tthis.rendered.emit();\n\t\t});\n\t}\n\n\tpublic disconnectedCallback(): void {\n\t\tthis.ctrl.destroy();\n\t}\n\n\tpublic render(): JSX.Element {\n\t\tconst { count, name } = this.ctrl.getProps();\n\t\tconst { label, show } = this;\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<SkeletonFC\n\t\t\t\t\tcount={count}\n\t\t\t\t\tlabel={label}\n\t\t\t\t\tname={name}\n\t\t\t\t\thandleClick={() => this.ctrl.handleClick()}\n\t\t\t\t\tonLoaded={this.loaded}\n\t\t\t\t\tonRendered={this.rendered}\n\t\t\t\t\tshow={show}\n\t\t\t\t\trefButton={(element) => this.ctrl.setButtonRef(element)}\n\t\t\t\t/>\n\t\t\t</Host>\n\t\t);\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAIO,MAAM,SAAS,GAAG,oBAAoB,CAAY,gBAAgB,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;;ACClF,MAAM,QAAQ,GAAG,oBAAoB,CAAW,eAAe,EAAE,MAAM,IAAI,CAAC;;ACGnF,MAAM,WAAW,GAAG,GAAG,CAAC,QAAQ,CAAC,cAAc,CAAC;AAChD,MAAM,2BAA2B,GAAG,WAAW,CAAC,SAAS,CAAC;AAC1D,MAAM,6BAA6B,GAAG,WAAW,CAAC,WAAW,CAAC;AAC9D,MAAM,2BAA2B,GAAG,WAAW,CAAC,SAAS,CAAC;AAC1D,MAAM,wBAAwB,GAAG,WAAW,CAAC,MAAM,CAAC;AAE7C,MAAM,UAAU,GAA8C,CAAC,KAAK,KAAI;AAC9E,IAAA,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,KAAK;AAClE,IAAA,MAAM,OAAO,GAAG,CAAC,EAAE,IAAI,KAAI,IAAI,KAAJ,IAAA,IAAA,I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oBAAoB,GAAA;AAC1B,QAAA,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;;IAGb,MAAM,GAAA;AACZ,QAAA,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;AAC5C,QAAA,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI;AAC5B,QAAA,QACC,EAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACJ,CAAA,CAAC,UAAU,EAAA,EAAA,GAAA,EAAA,0CAAA,EACV,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,MAAM,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,EAC1C,QAAQ,EAAE,IAAI,CAAC,MAAM,EACrB,UAAU,EAAE,IAAI,CAAC,QAAQ,EACzB,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,CAAC,OAAO,KAAK,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,EAAA,CACtD,CACI;;;;;;;;;;"}
1
+ {"version":3,"file":"kol-skeleton.entry.esm.js","sources":["src/internal/props/name.ts","src/internal/functional-components/skeleton/component.tsx","src/internal/functional-components/skeleton/controller.ts","src/components/_skeleton/web-components/skeleton/component.tsx"],"sourcesContent":["import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeString } from './helpers/normalizers';\n\nexport type NameProp = SimpleProp<'name', string>;\nexport const nameProp = createPropDefinition<NameProp>(normalizeString, () => true);\n","import type { FunctionalComponent as FC } from '@stencil/core';\nimport { h } from '@stencil/core';\n\nimport { bem } from '../../../schema/bem-registry';\nimport { ClickButtonFC } from '../click-button/component';\nimport type { FunctionalComponentProps } from '../generic-types';\nimport type { SkeletonApi } from './api';\n\nconst skeletonBem = bem.forBlock('kol-skeleton');\nconst BEM_CLASS_SKELETON__ACTIONS = skeletonBem('actions');\nconst BEM_CLASS_SKELETON__CONTAINER = skeletonBem('container');\nconst BEM_CLASS_SKELETON__COUNTER = skeletonBem('counter');\nconst BEM_CLASS_SKELETON__NAME = skeletonBem('name');\n\nexport const SkeletonFC: FC<FunctionalComponentProps<SkeletonApi>> = (props) => {\n\tconst { count, label, name, show, handleClick, refButton } = props;\n\tconst hasName = !!(show && name?.trim());\n\tconst BEM_CLASS_ROOT = skeletonBem({\n\t\t'has-name': hasName,\n\t\t'is-hidden': !show,\n\t});\n\treturn (\n\t\t<div class={BEM_CLASS_ROOT}>\n\t\t\t<div class={BEM_CLASS_SKELETON__CONTAINER}>\n\t\t\t\t{hasName && <span class={BEM_CLASS_SKELETON__NAME}>{name}</span>}\n\t\t\t\t<div class={BEM_CLASS_SKELETON__COUNTER}>Count: {count}</div>\n\t\t\t</div>\n\t\t\t<div class={BEM_CLASS_SKELETON__ACTIONS}>\n\t\t\t\t<ClickButtonFC label={label} handleClick={handleClick} refButton={refButton} />\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n","import { Log } from '../../../schema';\nimport { nameProp } from '../../props';\nimport { BaseController } from '../base-controller';\nimport { ClickButtonController } from '../click-button/controller';\nimport type { ControllerInterface, ResolvedInputProps } from '../generic-types';\nimport type { SkeletonApi } from './api';\n\nexport class SkeletonController extends BaseController<SkeletonApi> implements ControllerInterface<SkeletonApi> {\n\tprivate readonly clickButtonCtrl: ClickButtonController;\n\tprivate intervalId?: ReturnType<typeof setTimeout>;\n\n\tpublic constructor(states: SkeletonApi['States']) {\n\t\tsuper(states);\n\n\t\tthis.clickButtonCtrl = new ClickButtonController({});\n\t\tthis.startLoadedEventInterval();\n\t}\n\n\tpublic componentWillLoad(props: ResolvedInputProps<SkeletonApi>): void {\n\t\tconst { name } = props;\n\t\tthis.watchName(name);\n\t\tthis.clickButtonCtrl.componentWillLoad({\n\t\t\tlabel: this.component.label,\n\t\t});\n\t}\n\n\tpublic watchName(value?: string): void {\n\t\tnameProp.apply(\n\t\t\tvalue,\n\t\t\t(v) => {\n\t\t\t\tthis.setProp('name', v);\n\t\t\t},\n\t\t\t'',\n\t\t);\n\t}\n\n\tpublic toggle(): void {\n\t\tthis.setState('show', !this.component.show);\n\t}\n\n\tpublic onKeydown = (event: KeyboardEvent): void => {\n\t\tif (event.key === 'Escape') {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.log('Show should be toggled');\n\t\t\tvoid this.toggle();\n\t\t}\n\t};\n\n\tpublic handleClick = (): void => {\n\t\tLog.debug('Button clicked, count should be increased');\n\t\tconst { count } = this.component;\n\t\tconst nextCount = count + 1;\n\t\tthis.setState('count', nextCount);\n\t};\n\n\tpublic focus(): void {\n\t\treturn this.clickButtonCtrl.focus();\n\t}\n\n\tpublic setButtonRef = (element?: HTMLButtonElement): void => {\n\t\tthis.clickButtonCtrl.setButtonRef(element);\n\t};\n\n\tprivate startLoadedEventInterval(): void {\n\t\t// Emit loaded event every 2 seconds with current count value\n\t\tthis.intervalId = setInterval(() => {\n\t\t\tconst { count } = this.component;\n\t\t\tthis.emitLoaded(count);\n\t\t}, 2000);\n\t}\n\n\tprivate emitLoaded(count: number): void {\n\t\t// This method will be used by the web component to emit the loaded event\n\t\t// The web component needs to call this method to actually emit the event\n\t\t// We use a callback approach to let the web component handle the emission\n\t\tif (this.onLoadedCallback) {\n\t\t\tthis.onLoadedCallback(count);\n\t\t}\n\t}\n\n\tprivate onLoadedCallback?: (count: number) => void;\n\n\tpublic setOnLoadedCallback(callback: (count: number) => void): void {\n\t\tthis.onLoadedCallback = callback;\n\t}\n\n\tpublic destroy(): void {\n\t\tif (this.intervalId) {\n\t\t\tclearInterval(this.intervalId);\n\t\t\tthis.intervalId = undefined;\n\t\t}\n\t}\n}\n","import type { EventEmitter, JSX } from '@stencil/core';\nimport { Component, Event, h, Host, Listen, Method, Prop, State, Watch } from '@stencil/core';\nimport type { WebComponentInterface } from '../../../../internal/functional-components/generic-types';\nimport type { SkeletonApi } from '../../../../internal/functional-components/skeleton/api';\nimport { SkeletonFC } from '../../../../internal/functional-components/skeleton/component';\nimport { SkeletonController } from '../../../../internal/functional-components/skeleton/controller';\nimport { Log } from '../../../../schema';\n\n@Component({\n\ttag: 'kol-skeleton',\n\tshadow: true,\n})\nexport class KolSkeleton implements WebComponentInterface<SkeletonApi> {\n\tprivate readonly ctrl = new SkeletonController(this);\n\n\t/**\n\t * Focuses the interactive element of the component.\n\t */\n\t@Method()\n\tpublic async focus(): Promise<void> {\n\t\treturn Promise.resolve(this.ctrl.focus());\n\t}\n\n\t/**\n\t * Toggles the visibility of the skeleton component.\n\t */\n\t@Method()\n\tpublic async toggle(): Promise<void> {\n\t\treturn Promise.resolve(this.ctrl.toggle());\n\t}\n\n\t/**\n\t * Sets the name of the skeleton component.\n\t */\n\t@Prop()\n\tpublic _name!: string;\n\n\t@Watch('_name')\n\tpublic watchName(value?: string): void {\n\t\tthis.ctrl.watchName(value);\n\t}\n\n\t@State()\n\tpublic count: number = 0;\n\n\t@State()\n\tpublic label: string = 'Label';\n\n\t@State()\n\tpublic show: boolean = true;\n\n\t@Listen('keydown')\n\tpublic handleKeyDown(event: KeyboardEvent): void {\n\t\tif (event.key === 'Enter' || event.key === ' ') {\n\t\t\tLog.debug('button pressed');\n\t\t\tthis.ctrl.handleClick();\n\t\t}\n\t}\n\n\t/**\n\t * Emitted when the skeleton has finished loading.\n\t */\n\t@Event() public loaded!: EventEmitter<number>;\n\n\t/**\n\t * Emitted when the skeleton has been rendered for the first time.\n\t */\n\t@Event() public rendered!: EventEmitter<void>;\n\n\t@Listen('keydown', { target: 'window' })\n\tpublic onKeydown(event: KeyboardEvent): void {\n\t\tthis.ctrl.onKeydown(event);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.ctrl.componentWillLoad({\n\t\t\tname: this._name,\n\t\t});\n\n\t\t// Set up the callback for emitting loaded events\n\t\tthis.ctrl.setOnLoadedCallback((count: number) => {\n\t\t\tthis.loaded.emit(count);\n\t\t});\n\t}\n\n\tpublic componentDidLoad(): void {\n\t\trequestAnimationFrame(() => {\n\t\t\tthis.rendered.emit();\n\t\t});\n\t}\n\n\tpublic disconnectedCallback(): void {\n\t\tthis.ctrl.destroy();\n\t}\n\n\tpublic render(): JSX.Element {\n\t\tconst { name } = this.ctrl.getProps();\n\t\tconst { count, label, show } = this;\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<SkeletonFC\n\t\t\t\t\tcount={count}\n\t\t\t\t\tlabel={label}\n\t\t\t\t\tname={name}\n\t\t\t\t\thandleClick={() => this.ctrl.handleClick()}\n\t\t\t\t\tonLoaded={this.loaded}\n\t\t\t\t\tonRendered={this.rendered}\n\t\t\t\t\tshow={show}\n\t\t\t\t\trefButton={(element) => this.ctrl.setButtonRef(element)}\n\t\t\t\t/>\n\t\t\t</Host>\n\t\t);\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAKO,MAAM,QAAQ,GAAG,oBAAoB,CAAW,eAAe,EAAE,MAAM,IAAI,CAAC;;ACGnF,MAAM,WAAW,GAAG,GAAG,CAAC,QAAQ,CAAC,cAAc,CAAC;AAChD,MAAM,2BAA2B,GAAG,WAAW,CAAC,SAAS,CAAC;AAC1D,MAAM,6BAA6B,GAAG,WAAW,CAAC,WAAW,CAAC;AAC9D,MAAM,2BAA2B,GAAG,WAAW,CAAC,SAAS,CAAC;AAC1D,MAAM,wBAAwB,GAAG,WAAW,CAAC,MAAM,CAAC;AAE7C,MAAM,UAAU,GAA8C,CAAC,KAAK,KAAI;AAC9E,IAAA,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,KAAK;AAClE,IAAA,MAAM,OAAO,GAAG,CAAC,EAAE,IAAI,KAAI,IAAI,KAAJ,IAAA,IAAA,IAAI,uBAAJ,IAAI,CAAE,IAAI,EAAE,CAAA,CAAC;IACxC,MAAM,cAAc,GAAG,WAAW,CAAC;AAClC,QAAA,UAAU,EAAE,OAAO;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