@cscfi/csc-ui 1.2.3 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (587) hide show
  1. package/dist/cjs/c-accordion-item.cjs.entry.js +1 -1
  2. package/dist/cjs/c-accordion-item.cjs.entry.js.map +1 -1
  3. package/dist/cjs/c-accordion.cjs.entry.js +1 -1
  4. package/dist/cjs/c-accordion.cjs.entry.js.map +1 -1
  5. package/dist/cjs/c-alert.cjs.entry.js +1 -1
  6. package/dist/cjs/c-alert.cjs.entry.js.map +1 -1
  7. package/dist/cjs/c-autocomplete_34.cjs.entry.js +2593 -0
  8. package/dist/cjs/c-autocomplete_34.cjs.entry.js.map +1 -0
  9. package/dist/cjs/c-data-table.cjs.entry.js +1 -1
  10. package/dist/cjs/c-data-table.cjs.entry.js.map +1 -1
  11. package/dist/cjs/c-link.cjs.entry.js +1 -1
  12. package/dist/cjs/c-link.cjs.entry.js.map +1 -1
  13. package/dist/cjs/c-list-item-title.cjs.entry.js +1 -1
  14. package/dist/cjs/c-list-item-title.cjs.entry.js.map +1 -1
  15. package/dist/cjs/c-list-item.cjs.entry.js +1 -1
  16. package/dist/cjs/c-list-item.cjs.entry.js.map +1 -1
  17. package/dist/cjs/c-list.cjs.entry.js +1 -1
  18. package/dist/cjs/c-list.cjs.entry.js.map +1 -1
  19. package/dist/cjs/c-login-button.cjs.entry.js +1 -1
  20. package/dist/cjs/c-login-button.cjs.entry.js.map +1 -1
  21. package/dist/cjs/c-login-buttons.cjs.entry.js +1 -1
  22. package/dist/cjs/c-login-buttons.cjs.entry.js.map +1 -1
  23. package/dist/cjs/c-login-card-content.cjs.entry.js +1 -1
  24. package/dist/cjs/c-login-card-content.cjs.entry.js.map +1 -1
  25. package/dist/cjs/c-login-card-title.cjs.entry.js +1 -1
  26. package/dist/cjs/c-login-card-title.cjs.entry.js.map +1 -1
  27. package/dist/cjs/c-login-card.cjs.entry.js +1 -1
  28. package/dist/cjs/c-login-card.cjs.entry.js.map +1 -1
  29. package/dist/cjs/c-menu_2.cjs.entry.js +2 -2
  30. package/dist/cjs/c-menu_2.cjs.entry.js.map +1 -1
  31. package/dist/cjs/c-modal.cjs.entry.js +1 -1
  32. package/dist/cjs/c-modal.cjs.entry.js.map +1 -1
  33. package/dist/cjs/c-option-value.cjs.entry.js +1 -1
  34. package/dist/cjs/c-option-value.cjs.entry.js.map +1 -1
  35. package/dist/cjs/c-pagination.cjs.entry.js +227 -0
  36. package/dist/cjs/c-pagination.cjs.entry.js.map +1 -0
  37. package/dist/cjs/c-progress-bar.cjs.entry.js +1 -1
  38. package/dist/cjs/c-progress-bar.cjs.entry.js.map +1 -1
  39. package/dist/cjs/c-row.cjs.entry.js +1 -1
  40. package/dist/cjs/c-row.cjs.entry.js.map +1 -1
  41. package/dist/cjs/c-slider.cjs.entry.js +1 -1
  42. package/dist/cjs/c-slider.cjs.entry.js.map +1 -1
  43. package/dist/cjs/c-status.cjs.entry.js +1 -1
  44. package/dist/cjs/c-status.cjs.entry.js.map +1 -1
  45. package/dist/cjs/c-step.cjs.entry.js +1 -1
  46. package/dist/cjs/c-step.cjs.entry.js.map +1 -1
  47. package/dist/cjs/c-steps.cjs.entry.js +1 -1
  48. package/dist/cjs/c-steps.cjs.entry.js.map +1 -1
  49. package/dist/cjs/c-swiper-tab.cjs.entry.js +1 -1
  50. package/dist/cjs/c-swiper-tab.cjs.entry.js.map +1 -1
  51. package/dist/cjs/c-swiper.cjs.entry.js +1 -1
  52. package/dist/cjs/c-swiper.cjs.entry.js.map +1 -1
  53. package/dist/cjs/c-tab-buttons.cjs.entry.js +1 -1
  54. package/dist/cjs/c-tab-buttons.cjs.entry.js.map +1 -1
  55. package/dist/cjs/c-tab-item.cjs.entry.js +1 -1
  56. package/dist/cjs/c-tab-item.cjs.entry.js.map +1 -1
  57. package/dist/cjs/c-tab-items.cjs.entry.js +1 -1
  58. package/dist/cjs/c-tab-items.cjs.entry.js.map +1 -1
  59. package/dist/cjs/c-tab.cjs.entry.js +1 -1
  60. package/dist/cjs/c-tab.cjs.entry.js.map +1 -1
  61. package/dist/cjs/c-tabs.cjs.entry.js +1 -1
  62. package/dist/cjs/c-tabs.cjs.entry.js.map +1 -1
  63. package/dist/cjs/c-tag.cjs.entry.js +1 -1
  64. package/dist/cjs/c-tag.cjs.entry.js.map +1 -1
  65. package/dist/cjs/c-tags.cjs.entry.js +1 -1
  66. package/dist/cjs/c-tags.cjs.entry.js.map +1 -1
  67. package/dist/cjs/c-toast.cjs.entry.js +1 -1
  68. package/dist/cjs/c-toast.cjs.entry.js.map +1 -1
  69. package/dist/cjs/c-toasts.cjs.entry.js +1 -1
  70. package/dist/cjs/c-toasts.cjs.entry.js.map +1 -1
  71. package/dist/cjs/csc-ui.cjs.js +1 -1
  72. package/dist/cjs/index-91ba22ab.js +4 -68
  73. package/dist/cjs/loader.cjs.js +1 -1
  74. package/dist/collection/components/c-accordion/c-accordion.css +4 -0
  75. package/dist/collection/components/c-accordion-item/c-accordion-item.css +4 -0
  76. package/dist/collection/components/c-alert/c-alert.css +4 -0
  77. package/dist/collection/components/c-autocomplete/c-autocomplete.css +4 -0
  78. package/dist/collection/components/c-badge/c-badge.css +4 -0
  79. package/dist/collection/components/c-button/c-button.css +4 -0
  80. package/dist/collection/components/c-card/c-card.css +4 -0
  81. package/dist/collection/components/c-card-actions/c-card-actions.css +4 -0
  82. package/dist/collection/components/c-card-content/c-card-content.css +4 -0
  83. package/dist/collection/components/c-card-title/c-card-title.css +4 -0
  84. package/dist/collection/components/c-checkbox/c-checkbox.css +4 -0
  85. package/dist/collection/components/c-checkbox/c-checkbox.js +3 -11
  86. package/dist/collection/components/c-checkbox/c-checkbox.js.map +1 -1
  87. package/dist/collection/components/c-csc-logo/c-csc-logo.css +4 -0
  88. package/dist/collection/components/c-data-table/c-data-table.css +4 -0
  89. package/dist/collection/components/c-dropdown/c-dropdown.css +4 -0
  90. package/dist/collection/components/c-icon/c-icon.css +4 -0
  91. package/dist/collection/components/c-icon-button/c-icon-button.css +4 -0
  92. package/dist/collection/components/c-input/c-input.css +4 -0
  93. package/dist/collection/components/c-link/c-link.css +4 -0
  94. package/dist/collection/components/c-list/c-list.css +4 -0
  95. package/dist/collection/components/c-list-item/c-list-item.css +4 -0
  96. package/dist/collection/components/c-list-item-title/c-list-item-title.css +4 -0
  97. package/dist/collection/components/c-loader/c-loader.css +4 -0
  98. package/dist/collection/components/c-login-button/c-login-button.css +4 -0
  99. package/dist/collection/components/c-login-buttons/c-login-buttons.css +4 -0
  100. package/dist/collection/components/c-login-card/c-login-card.css +4 -0
  101. package/dist/collection/components/c-login-card-content/c-login-card-content.css +4 -0
  102. package/dist/collection/components/c-login-card-title/c-login-card-title.css +4 -0
  103. package/dist/collection/components/c-main/c-main.css +28 -2
  104. package/dist/collection/components/c-main/c-main.js +26 -1
  105. package/dist/collection/components/c-main/c-main.js.map +1 -1
  106. package/dist/collection/components/c-menu/c-menu.css +4 -0
  107. package/dist/collection/components/c-menu-items/c-menu-items.css +4 -0
  108. package/dist/collection/components/c-message/c-message.css +4 -0
  109. package/dist/collection/components/c-modal/c-modal.css +4 -0
  110. package/dist/collection/components/c-navigation-button/c-navigation-button.css +4 -0
  111. package/dist/collection/components/c-option/c-option.css +4 -0
  112. package/dist/collection/components/c-option-value/c-option-value.css +4 -0
  113. package/dist/collection/components/c-otp-input/c-otp-input.css +4 -0
  114. package/dist/collection/components/c-page/c-page.css +20 -14
  115. package/dist/collection/components/c-page/c-page.js +1 -1
  116. package/dist/collection/components/c-page/c-page.js.map +1 -1
  117. package/dist/collection/components/c-pagination/c-pagination.css +4 -0
  118. package/dist/collection/components/c-progress-bar/c-progress-bar.css +4 -0
  119. package/dist/collection/components/c-radio/c-radio.css +4 -0
  120. package/dist/collection/components/c-radio-group/c-radio-group.css +4 -0
  121. package/dist/collection/components/c-radio-group/c-radio-group.js +7 -1
  122. package/dist/collection/components/c-radio-group/c-radio-group.js.map +1 -1
  123. package/dist/collection/components/c-ripple/c-ripple.css +4 -0
  124. package/dist/collection/components/c-row/c-row.css +4 -0
  125. package/dist/collection/components/c-select/c-select.css +4 -0
  126. package/dist/collection/components/c-side-navigation/c-side-navigation.css +4 -0
  127. package/dist/collection/components/c-side-navigation/c-side-navigation.js.map +1 -1
  128. package/dist/collection/components/c-side-navigation-item/c-side-navigation-item.css +4 -0
  129. package/dist/collection/components/c-side-navigation-title/c-side-navigation-title.css +4 -0
  130. package/dist/collection/components/c-slider/c-slider.css +4 -0
  131. package/dist/collection/components/c-spacer/c-spacer.css +4 -0
  132. package/dist/collection/components/c-spinner/c-spinner.css +4 -0
  133. package/dist/collection/components/c-status/c-status.css +4 -0
  134. package/dist/collection/components/c-step/c-step.css +4 -0
  135. package/dist/collection/components/c-steps/c-steps.css +4 -0
  136. package/dist/collection/components/c-sub-navigation-item/c-sub-navigation-item.css +4 -0
  137. package/dist/collection/components/c-swiper/c-swiper.css +4 -0
  138. package/dist/collection/components/c-swiper-tab/c-swiper-tab.css +4 -0
  139. package/dist/collection/components/c-switch/c-switch.css +4 -0
  140. package/dist/collection/components/c-switch/c-switch.js +3 -11
  141. package/dist/collection/components/c-switch/c-switch.js.map +1 -1
  142. package/dist/collection/components/c-tab/c-tab.css +4 -0
  143. package/dist/collection/components/c-tab-buttons/c-tab-buttons.css +4 -0
  144. package/dist/collection/components/c-tab-item/c-tab-item.css +4 -0
  145. package/dist/collection/components/c-tab-items/c-tab-items.css +4 -0
  146. package/dist/collection/components/c-table/c-table.css +7 -0
  147. package/dist/collection/components/c-table/c-table.js +4 -1
  148. package/dist/collection/components/c-table/c-table.js.map +1 -1
  149. package/dist/collection/components/c-tabs/c-tabs.css +4 -0
  150. package/dist/collection/components/c-tag/c-tag.css +4 -0
  151. package/dist/collection/components/c-tags/c-tags.css +4 -0
  152. package/dist/collection/components/c-text-field/c-text-field.css +4 -0
  153. package/dist/collection/components/c-toast/c-toast.css +4 -0
  154. package/dist/collection/components/c-toasts/c-toasts.css +4 -0
  155. package/dist/collection/components/c-toolbar/c-toolbar.css +4 -0
  156. package/dist/components/c-accordion-item.js +1 -1
  157. package/dist/components/c-accordion-item.js.map +1 -1
  158. package/dist/components/c-accordion.js +1 -1
  159. package/dist/components/c-accordion.js.map +1 -1
  160. package/dist/components/c-alert.js +1 -1
  161. package/dist/components/c-alert.js.map +1 -1
  162. package/dist/components/c-autocomplete.js +1 -1
  163. package/dist/components/c-autocomplete.js.map +1 -1
  164. package/dist/components/c-badge2.js +1 -1
  165. package/dist/components/c-badge2.js.map +1 -1
  166. package/dist/components/c-button.js +1 -1
  167. package/dist/components/c-button.js.map +1 -1
  168. package/dist/components/c-card-actions2.js +1 -1
  169. package/dist/components/c-card-actions2.js.map +1 -1
  170. package/dist/components/c-card-content.js +1 -1
  171. package/dist/components/c-card-content.js.map +1 -1
  172. package/dist/components/c-card-title.js +1 -1
  173. package/dist/components/c-card-title.js.map +1 -1
  174. package/dist/components/c-card.js +1 -1
  175. package/dist/components/c-card.js.map +1 -1
  176. package/dist/components/c-checkbox2.js +4 -12
  177. package/dist/components/c-checkbox2.js.map +1 -1
  178. package/dist/components/c-csc-logo.js +1 -1
  179. package/dist/components/c-csc-logo.js.map +1 -1
  180. package/dist/components/c-data-table.js +1 -1
  181. package/dist/components/c-data-table.js.map +1 -1
  182. package/dist/components/c-dropdown2.js +1 -1
  183. package/dist/components/c-dropdown2.js.map +1 -1
  184. package/dist/components/c-icon-button2.js +1 -1
  185. package/dist/components/c-icon-button2.js.map +1 -1
  186. package/dist/components/c-icon2.js +1 -1
  187. package/dist/components/c-icon2.js.map +1 -1
  188. package/dist/components/c-input2.js +1 -1
  189. package/dist/components/c-input2.js.map +1 -1
  190. package/dist/components/c-link.js +1 -1
  191. package/dist/components/c-link.js.map +1 -1
  192. package/dist/components/c-list-item-title.js +1 -1
  193. package/dist/components/c-list-item-title.js.map +1 -1
  194. package/dist/components/c-list-item.js +1 -1
  195. package/dist/components/c-list-item.js.map +1 -1
  196. package/dist/components/c-list.js +1 -1
  197. package/dist/components/c-list.js.map +1 -1
  198. package/dist/components/c-loader2.js +1 -1
  199. package/dist/components/c-loader2.js.map +1 -1
  200. package/dist/components/c-login-button.js +1 -1
  201. package/dist/components/c-login-button.js.map +1 -1
  202. package/dist/components/c-login-buttons.js +1 -1
  203. package/dist/components/c-login-buttons.js.map +1 -1
  204. package/dist/components/c-login-card-content.js +1 -1
  205. package/dist/components/c-login-card-content.js.map +1 -1
  206. package/dist/components/c-login-card-title.js +1 -1
  207. package/dist/components/c-login-card-title.js.map +1 -1
  208. package/dist/components/c-login-card.js +1 -1
  209. package/dist/components/c-login-card.js.map +1 -1
  210. package/dist/components/c-main.js +6 -3
  211. package/dist/components/c-main.js.map +1 -1
  212. package/dist/components/c-menu-items2.js +1 -1
  213. package/dist/components/c-menu-items2.js.map +1 -1
  214. package/dist/components/c-menu2.js +1 -1
  215. package/dist/components/c-menu2.js.map +1 -1
  216. package/dist/components/c-message2.js +1 -1
  217. package/dist/components/c-message2.js.map +1 -1
  218. package/dist/components/c-modal.js +1 -1
  219. package/dist/components/c-modal.js.map +1 -1
  220. package/dist/components/c-navigation-button.js +1 -1
  221. package/dist/components/c-navigation-button.js.map +1 -1
  222. package/dist/components/c-option-value.js +1 -1
  223. package/dist/components/c-option-value.js.map +1 -1
  224. package/dist/components/c-option.js +1 -1
  225. package/dist/components/c-option.js.map +1 -1
  226. package/dist/components/c-otp-input.js +1 -1
  227. package/dist/components/c-otp-input.js.map +1 -1
  228. package/dist/components/c-page.js +2 -2
  229. package/dist/components/c-page.js.map +1 -1
  230. package/dist/components/c-pagination2.js +1 -1
  231. package/dist/components/c-pagination2.js.map +1 -1
  232. package/dist/components/c-progress-bar.js +1 -1
  233. package/dist/components/c-progress-bar.js.map +1 -1
  234. package/dist/components/c-radio-group.js +8 -2
  235. package/dist/components/c-radio-group.js.map +1 -1
  236. package/dist/components/c-radio.js +1 -1
  237. package/dist/components/c-radio.js.map +1 -1
  238. package/dist/components/c-ripple2.js +1 -1
  239. package/dist/components/c-ripple2.js.map +1 -1
  240. package/dist/components/c-row.js +1 -1
  241. package/dist/components/c-row.js.map +1 -1
  242. package/dist/components/c-select.js +1 -1
  243. package/dist/components/c-select.js.map +1 -1
  244. package/dist/components/c-side-navigation-item.js +1 -1
  245. package/dist/components/c-side-navigation-item.js.map +1 -1
  246. package/dist/components/c-side-navigation-title.js +1 -1
  247. package/dist/components/c-side-navigation-title.js.map +1 -1
  248. package/dist/components/c-side-navigation.js +1 -1
  249. package/dist/components/c-side-navigation.js.map +1 -1
  250. package/dist/components/c-slider.js +1 -1
  251. package/dist/components/c-slider.js.map +1 -1
  252. package/dist/components/c-spacer2.js +1 -1
  253. package/dist/components/c-spacer2.js.map +1 -1
  254. package/dist/components/c-spinner2.js +1 -1
  255. package/dist/components/c-spinner2.js.map +1 -1
  256. package/dist/components/c-status.js +1 -1
  257. package/dist/components/c-status.js.map +1 -1
  258. package/dist/components/c-step.js +1 -1
  259. package/dist/components/c-step.js.map +1 -1
  260. package/dist/components/c-steps.js +1 -1
  261. package/dist/components/c-steps.js.map +1 -1
  262. package/dist/components/c-sub-navigation-item.js +1 -1
  263. package/dist/components/c-sub-navigation-item.js.map +1 -1
  264. package/dist/components/c-swiper-tab.js +1 -1
  265. package/dist/components/c-swiper-tab.js.map +1 -1
  266. package/dist/components/c-swiper.js +1 -1
  267. package/dist/components/c-swiper.js.map +1 -1
  268. package/dist/components/c-switch.js +4 -12
  269. package/dist/components/c-switch.js.map +1 -1
  270. package/dist/components/c-tab-buttons.js +1 -1
  271. package/dist/components/c-tab-buttons.js.map +1 -1
  272. package/dist/components/c-tab-item.js +1 -1
  273. package/dist/components/c-tab-item.js.map +1 -1
  274. package/dist/components/c-tab-items.js +1 -1
  275. package/dist/components/c-tab-items.js.map +1 -1
  276. package/dist/components/c-tab.js +1 -1
  277. package/dist/components/c-tab.js.map +1 -1
  278. package/dist/components/c-table.js +5 -2
  279. package/dist/components/c-table.js.map +1 -1
  280. package/dist/components/c-tabs.js +1 -1
  281. package/dist/components/c-tabs.js.map +1 -1
  282. package/dist/components/c-tag.js +1 -1
  283. package/dist/components/c-tag.js.map +1 -1
  284. package/dist/components/c-tags.js +1 -1
  285. package/dist/components/c-tags.js.map +1 -1
  286. package/dist/components/c-text-field.js +1 -1
  287. package/dist/components/c-text-field.js.map +1 -1
  288. package/dist/components/c-toast2.js +1 -1
  289. package/dist/components/c-toast2.js.map +1 -1
  290. package/dist/components/c-toasts.js +1 -1
  291. package/dist/components/c-toasts.js.map +1 -1
  292. package/dist/components/c-toolbar.js +1 -1
  293. package/dist/components/c-toolbar.js.map +1 -1
  294. package/dist/csc-ui/csc-ui.esm.js +1 -1
  295. package/dist/csc-ui/csc-ui.esm.js.map +1 -1
  296. package/dist/csc-ui/p-0394ebc7.entry.js +2 -0
  297. package/dist/csc-ui/{p-98faa11d.entry.js.map → p-0394ebc7.entry.js.map} +1 -1
  298. package/dist/csc-ui/p-0471fd59.entry.js +2 -0
  299. package/dist/csc-ui/{p-fb098c2b.entry.js.map → p-0471fd59.entry.js.map} +1 -1
  300. package/dist/csc-ui/p-0b41f178.entry.js +2 -0
  301. package/dist/csc-ui/{p-d8899493.entry.js.map → p-0b41f178.entry.js.map} +1 -1
  302. package/dist/csc-ui/p-0e3cf775.entry.js +2 -0
  303. package/dist/csc-ui/{p-e6fb98a7.entry.js.map → p-0e3cf775.entry.js.map} +1 -1
  304. package/dist/csc-ui/p-18a7f4e9.entry.js +2 -0
  305. package/dist/csc-ui/{p-fa83a615.entry.js.map → p-18a7f4e9.entry.js.map} +1 -1
  306. package/dist/csc-ui/p-1aeab024.entry.js +2 -0
  307. package/dist/csc-ui/{p-075a7c96.entry.js.map → p-1aeab024.entry.js.map} +1 -1
  308. package/dist/csc-ui/p-231bc97b.entry.js +2 -0
  309. package/dist/csc-ui/{p-d26167bc.entry.js.map → p-231bc97b.entry.js.map} +1 -1
  310. package/dist/csc-ui/p-29b07261.entry.js +2 -0
  311. package/dist/csc-ui/{p-0db503fb.entry.js.map → p-29b07261.entry.js.map} +1 -1
  312. package/dist/csc-ui/p-30bf678d.entry.js +2 -0
  313. package/dist/csc-ui/{p-3bb67f38.entry.js.map → p-30bf678d.entry.js.map} +1 -1
  314. package/dist/csc-ui/p-30edfff8.entry.js +2 -0
  315. package/dist/csc-ui/{p-ab62f9b5.entry.js.map → p-30edfff8.entry.js.map} +1 -1
  316. package/dist/csc-ui/p-48a5469a.entry.js +2 -0
  317. package/dist/csc-ui/p-48a5469a.entry.js.map +1 -0
  318. package/dist/csc-ui/p-4dbc9e96.entry.js +2 -0
  319. package/dist/csc-ui/{p-d76079eb.entry.js.map → p-4dbc9e96.entry.js.map} +1 -1
  320. package/dist/csc-ui/p-4f568e1f.entry.js +2 -0
  321. package/dist/csc-ui/{p-88c60ba3.entry.js.map → p-4f568e1f.entry.js.map} +1 -1
  322. package/dist/csc-ui/p-52a3f4f8.entry.js +2 -0
  323. package/dist/csc-ui/{p-ba475561.entry.js.map → p-52a3f4f8.entry.js.map} +1 -1
  324. package/dist/csc-ui/p-54d44ab9.entry.js +2 -0
  325. package/dist/csc-ui/{p-baea3193.entry.js.map → p-54d44ab9.entry.js.map} +1 -1
  326. package/dist/csc-ui/p-61e0e61f.entry.js +2 -0
  327. package/dist/csc-ui/{p-ff51bae3.entry.js.map → p-61e0e61f.entry.js.map} +1 -1
  328. package/dist/csc-ui/{p-c8a7a751.entry.js → p-6733b506.entry.js} +2 -2
  329. package/dist/csc-ui/{p-c8a7a751.entry.js.map → p-6733b506.entry.js.map} +1 -1
  330. package/dist/csc-ui/p-6a54587f.entry.js +2 -0
  331. package/dist/csc-ui/{p-468d9583.entry.js.map → p-6a54587f.entry.js.map} +1 -1
  332. package/dist/csc-ui/p-765ae162.entry.js +2 -0
  333. package/dist/csc-ui/p-765ae162.entry.js.map +1 -0
  334. package/dist/csc-ui/p-7ca9b5ff.entry.js +2 -0
  335. package/dist/csc-ui/{p-9c80f35e.entry.js.map → p-7ca9b5ff.entry.js.map} +1 -1
  336. package/dist/csc-ui/p-9bf601bb.entry.js +2 -0
  337. package/dist/csc-ui/{p-1d6c84df.entry.js.map → p-9bf601bb.entry.js.map} +1 -1
  338. package/dist/csc-ui/p-9dc5b5ac.entry.js +2 -0
  339. package/dist/csc-ui/{p-cc31d9b2.entry.js.map → p-9dc5b5ac.entry.js.map} +1 -1
  340. package/dist/csc-ui/p-a33ca657.entry.js +2 -0
  341. package/dist/csc-ui/{p-82a711fb.entry.js.map → p-a33ca657.entry.js.map} +1 -1
  342. package/dist/csc-ui/p-aa6b6960.entry.js +2 -0
  343. package/dist/csc-ui/{p-f616d1c4.entry.js.map → p-aa6b6960.entry.js.map} +1 -1
  344. package/dist/csc-ui/p-b8fd106b.entry.js +2 -0
  345. package/dist/csc-ui/{p-da6a2275.entry.js.map → p-b8fd106b.entry.js.map} +1 -1
  346. package/dist/csc-ui/p-bae44625.entry.js +2 -0
  347. package/dist/csc-ui/{p-55cbda54.entry.js.map → p-bae44625.entry.js.map} +1 -1
  348. package/dist/csc-ui/p-c28fe9f0.entry.js +2 -0
  349. package/dist/csc-ui/{p-8d5fe14f.entry.js.map → p-c28fe9f0.entry.js.map} +1 -1
  350. package/dist/csc-ui/p-cb4bce81.entry.js +2 -0
  351. package/dist/csc-ui/{p-ea99cd0e.entry.js.map → p-cb4bce81.entry.js.map} +1 -1
  352. package/dist/csc-ui/{p-f24b9d97.js → p-d72364b9.js} +2 -2
  353. package/dist/csc-ui/p-da7c0754.entry.js +2 -0
  354. package/dist/csc-ui/{p-4f9c92e4.entry.js.map → p-da7c0754.entry.js.map} +1 -1
  355. package/dist/csc-ui/p-dfe321ae.entry.js +2 -0
  356. package/dist/csc-ui/{p-ae16b1f4.entry.js.map → p-dfe321ae.entry.js.map} +1 -1
  357. package/dist/csc-ui/p-e90ac550.entry.js +2 -0
  358. package/dist/csc-ui/{p-682782b1.entry.js.map → p-e90ac550.entry.js.map} +1 -1
  359. package/dist/csc-ui/p-e922c869.entry.js +2 -0
  360. package/dist/csc-ui/{p-1a1e8b4b.entry.js.map → p-e922c869.entry.js.map} +1 -1
  361. package/dist/csc-ui/p-ed7b2d6b.entry.js +2 -0
  362. package/dist/csc-ui/{p-75798257.entry.js.map → p-ed7b2d6b.entry.js.map} +1 -1
  363. package/dist/csc-ui/p-f71fcb7a.entry.js +2 -0
  364. package/dist/csc-ui/{p-8d34efbc.entry.js.map → p-f71fcb7a.entry.js.map} +1 -1
  365. package/dist/csc-ui/p-fadae1ab.entry.js +2 -0
  366. package/dist/csc-ui/{p-aa930d89.entry.js.map → p-fadae1ab.entry.js.map} +1 -1
  367. package/dist/esm/c-accordion-item.entry.js +2 -2
  368. package/dist/esm/c-accordion-item.entry.js.map +1 -1
  369. package/dist/esm/c-accordion.entry.js +1 -1
  370. package/dist/esm/c-accordion.entry.js.map +1 -1
  371. package/dist/esm/c-alert.entry.js +2 -2
  372. package/dist/esm/c-alert.entry.js.map +1 -1
  373. package/dist/esm/c-autocomplete_34.entry.js +2556 -0
  374. package/dist/esm/c-autocomplete_34.entry.js.map +1 -0
  375. package/dist/esm/c-data-table.entry.js +2 -2
  376. package/dist/esm/c-data-table.entry.js.map +1 -1
  377. package/dist/esm/c-link.entry.js +1 -1
  378. package/dist/esm/c-link.entry.js.map +1 -1
  379. package/dist/esm/c-list-item-title.entry.js +1 -1
  380. package/dist/esm/c-list-item-title.entry.js.map +1 -1
  381. package/dist/esm/c-list-item.entry.js +1 -1
  382. package/dist/esm/c-list-item.entry.js.map +1 -1
  383. package/dist/esm/c-list.entry.js +1 -1
  384. package/dist/esm/c-list.entry.js.map +1 -1
  385. package/dist/esm/c-login-button.entry.js +1 -1
  386. package/dist/esm/c-login-button.entry.js.map +1 -1
  387. package/dist/esm/c-login-buttons.entry.js +1 -1
  388. package/dist/esm/c-login-buttons.entry.js.map +1 -1
  389. package/dist/esm/c-login-card-content.entry.js +1 -1
  390. package/dist/esm/c-login-card-content.entry.js.map +1 -1
  391. package/dist/esm/c-login-card-title.entry.js +1 -1
  392. package/dist/esm/c-login-card-title.entry.js.map +1 -1
  393. package/dist/esm/c-login-card.entry.js +1 -1
  394. package/dist/esm/c-login-card.entry.js.map +1 -1
  395. package/dist/esm/c-menu_2.entry.js +3 -3
  396. package/dist/esm/c-menu_2.entry.js.map +1 -1
  397. package/dist/esm/c-modal.entry.js +1 -1
  398. package/dist/esm/c-modal.entry.js.map +1 -1
  399. package/dist/esm/c-option-value.entry.js +1 -1
  400. package/dist/esm/c-option-value.entry.js.map +1 -1
  401. package/dist/esm/c-pagination.entry.js +223 -0
  402. package/dist/esm/c-pagination.entry.js.map +1 -0
  403. package/dist/esm/c-progress-bar.entry.js +1 -1
  404. package/dist/esm/c-progress-bar.entry.js.map +1 -1
  405. package/dist/esm/c-row.entry.js +1 -1
  406. package/dist/esm/c-row.entry.js.map +1 -1
  407. package/dist/esm/c-slider.entry.js +1 -1
  408. package/dist/esm/c-slider.entry.js.map +1 -1
  409. package/dist/esm/c-status.entry.js +1 -1
  410. package/dist/esm/c-status.entry.js.map +1 -1
  411. package/dist/esm/c-step.entry.js +1 -1
  412. package/dist/esm/c-step.entry.js.map +1 -1
  413. package/dist/esm/c-steps.entry.js +1 -1
  414. package/dist/esm/c-steps.entry.js.map +1 -1
  415. package/dist/esm/c-swiper-tab.entry.js +1 -1
  416. package/dist/esm/c-swiper-tab.entry.js.map +1 -1
  417. package/dist/esm/c-swiper.entry.js +2 -2
  418. package/dist/esm/c-swiper.entry.js.map +1 -1
  419. package/dist/esm/c-tab-buttons.entry.js +1 -1
  420. package/dist/esm/c-tab-buttons.entry.js.map +1 -1
  421. package/dist/esm/c-tab-item.entry.js +1 -1
  422. package/dist/esm/c-tab-item.entry.js.map +1 -1
  423. package/dist/esm/c-tab-items.entry.js +1 -1
  424. package/dist/esm/c-tab-items.entry.js.map +1 -1
  425. package/dist/esm/c-tab.entry.js +1 -1
  426. package/dist/esm/c-tab.entry.js.map +1 -1
  427. package/dist/esm/c-tabs.entry.js +2 -2
  428. package/dist/esm/c-tabs.entry.js.map +1 -1
  429. package/dist/esm/c-tag.entry.js +2 -2
  430. package/dist/esm/c-tag.entry.js.map +1 -1
  431. package/dist/esm/c-tags.entry.js +1 -1
  432. package/dist/esm/c-tags.entry.js.map +1 -1
  433. package/dist/esm/c-toast.entry.js +2 -2
  434. package/dist/esm/c-toast.entry.js.map +1 -1
  435. package/dist/esm/c-toasts.entry.js +1 -1
  436. package/dist/esm/c-toasts.entry.js.map +1 -1
  437. package/dist/esm/csc-ui.js +1 -1
  438. package/dist/esm/index-47956d53.js +4 -68
  439. package/dist/esm/loader.js +1 -1
  440. package/dist/esm/{mdi-8656e74a.js → mdi-d1289d08.js} +2 -2
  441. package/dist/esm/{mdi-8656e74a.js.map → mdi-d1289d08.js.map} +1 -1
  442. package/dist/types/components/c-main/c-main.d.ts +1 -0
  443. package/dist/types/components/c-table/c-table.d.ts +1 -0
  444. package/dist/types/components.d.ts +8 -0
  445. package/package.json +1 -1
  446. package/vscode-data.json +6 -1
  447. package/dist/cjs/c-autocomplete_16.cjs.entry.js +0 -1563
  448. package/dist/cjs/c-autocomplete_16.cjs.entry.js.map +0 -1
  449. package/dist/cjs/c-checkbox_3.cjs.entry.js +0 -354
  450. package/dist/cjs/c-checkbox_3.cjs.entry.js.map +0 -1
  451. package/dist/cjs/c-csc-logo.cjs.entry.js +0 -23
  452. package/dist/cjs/c-csc-logo.cjs.entry.js.map +0 -1
  453. package/dist/cjs/c-loader.cjs.entry.js +0 -39
  454. package/dist/cjs/c-loader.cjs.entry.js.map +0 -1
  455. package/dist/cjs/c-main.cjs.entry.js +0 -21
  456. package/dist/cjs/c-main.cjs.entry.js.map +0 -1
  457. package/dist/cjs/c-navigation-button.cjs.entry.js +0 -22
  458. package/dist/cjs/c-navigation-button.cjs.entry.js.map +0 -1
  459. package/dist/cjs/c-otp-input.cjs.entry.js +0 -154
  460. package/dist/cjs/c-otp-input.cjs.entry.js.map +0 -1
  461. package/dist/cjs/c-page.cjs.entry.js +0 -34
  462. package/dist/cjs/c-page.cjs.entry.js.map +0 -1
  463. package/dist/cjs/c-radio-group.cjs.entry.js +0 -154
  464. package/dist/cjs/c-radio-group.cjs.entry.js.map +0 -1
  465. package/dist/cjs/c-radio.cjs.entry.js +0 -24
  466. package/dist/cjs/c-radio.cjs.entry.js.map +0 -1
  467. package/dist/cjs/c-side-navigation-item.cjs.entry.js +0 -129
  468. package/dist/cjs/c-side-navigation-item.cjs.entry.js.map +0 -1
  469. package/dist/cjs/c-side-navigation-title.cjs.entry.js +0 -21
  470. package/dist/cjs/c-side-navigation-title.cjs.entry.js.map +0 -1
  471. package/dist/cjs/c-side-navigation.cjs.entry.js +0 -80
  472. package/dist/cjs/c-side-navigation.cjs.entry.js.map +0 -1
  473. package/dist/cjs/c-sub-navigation-item.cjs.entry.js +0 -51
  474. package/dist/cjs/c-sub-navigation-item.cjs.entry.js.map +0 -1
  475. package/dist/cjs/c-switch.cjs.entry.js +0 -71
  476. package/dist/cjs/c-switch.cjs.entry.js.map +0 -1
  477. package/dist/cjs/c-table.cjs.entry.js +0 -47
  478. package/dist/cjs/c-table.cjs.entry.js.map +0 -1
  479. package/dist/cjs/c-text-field.cjs.entry.js +0 -151
  480. package/dist/cjs/c-text-field.cjs.entry.js.map +0 -1
  481. package/dist/cjs/c-toolbar.cjs.entry.js +0 -21
  482. package/dist/cjs/c-toolbar.cjs.entry.js.map +0 -1
  483. package/dist/csc-ui/p-040ed3e2.entry.js +0 -2
  484. package/dist/csc-ui/p-040ed3e2.entry.js.map +0 -1
  485. package/dist/csc-ui/p-075a7c96.entry.js +0 -2
  486. package/dist/csc-ui/p-0db503fb.entry.js +0 -2
  487. package/dist/csc-ui/p-1a1e8b4b.entry.js +0 -2
  488. package/dist/csc-ui/p-1d6c84df.entry.js +0 -2
  489. package/dist/csc-ui/p-2b5cd791.entry.js +0 -2
  490. package/dist/csc-ui/p-2b5cd791.entry.js.map +0 -1
  491. package/dist/csc-ui/p-39df362b.entry.js +0 -2
  492. package/dist/csc-ui/p-39df362b.entry.js.map +0 -1
  493. package/dist/csc-ui/p-3bb67f38.entry.js +0 -2
  494. package/dist/csc-ui/p-468d9583.entry.js +0 -2
  495. package/dist/csc-ui/p-494a4f19.entry.js +0 -2
  496. package/dist/csc-ui/p-494a4f19.entry.js.map +0 -1
  497. package/dist/csc-ui/p-4cf4ffff.entry.js +0 -2
  498. package/dist/csc-ui/p-4cf4ffff.entry.js.map +0 -1
  499. package/dist/csc-ui/p-4f9c92e4.entry.js +0 -2
  500. package/dist/csc-ui/p-55cbda54.entry.js +0 -2
  501. package/dist/csc-ui/p-56b1e1ea.entry.js +0 -2
  502. package/dist/csc-ui/p-56b1e1ea.entry.js.map +0 -1
  503. package/dist/csc-ui/p-6062aaff.entry.js +0 -2
  504. package/dist/csc-ui/p-6062aaff.entry.js.map +0 -1
  505. package/dist/csc-ui/p-682782b1.entry.js +0 -2
  506. package/dist/csc-ui/p-6e046723.entry.js +0 -2
  507. package/dist/csc-ui/p-6e046723.entry.js.map +0 -1
  508. package/dist/csc-ui/p-75798257.entry.js +0 -2
  509. package/dist/csc-ui/p-7ea05669.entry.js +0 -2
  510. package/dist/csc-ui/p-7ea05669.entry.js.map +0 -1
  511. package/dist/csc-ui/p-82a711fb.entry.js +0 -2
  512. package/dist/csc-ui/p-88c60ba3.entry.js +0 -2
  513. package/dist/csc-ui/p-8d34efbc.entry.js +0 -2
  514. package/dist/csc-ui/p-8d5fe14f.entry.js +0 -2
  515. package/dist/csc-ui/p-98faa11d.entry.js +0 -2
  516. package/dist/csc-ui/p-9c5488fc.entry.js +0 -2
  517. package/dist/csc-ui/p-9c5488fc.entry.js.map +0 -1
  518. package/dist/csc-ui/p-9c80f35e.entry.js +0 -2
  519. package/dist/csc-ui/p-aa930d89.entry.js +0 -2
  520. package/dist/csc-ui/p-ab62f9b5.entry.js +0 -2
  521. package/dist/csc-ui/p-ae16b1f4.entry.js +0 -2
  522. package/dist/csc-ui/p-afd4cc03.entry.js +0 -2
  523. package/dist/csc-ui/p-afd4cc03.entry.js.map +0 -1
  524. package/dist/csc-ui/p-b0fa27b6.entry.js +0 -2
  525. package/dist/csc-ui/p-b0fa27b6.entry.js.map +0 -1
  526. package/dist/csc-ui/p-b83651f8.entry.js +0 -2
  527. package/dist/csc-ui/p-b83651f8.entry.js.map +0 -1
  528. package/dist/csc-ui/p-ba475561.entry.js +0 -2
  529. package/dist/csc-ui/p-baea3193.entry.js +0 -2
  530. package/dist/csc-ui/p-bda722d5.entry.js +0 -2
  531. package/dist/csc-ui/p-bda722d5.entry.js.map +0 -1
  532. package/dist/csc-ui/p-caa58a64.entry.js +0 -2
  533. package/dist/csc-ui/p-caa58a64.entry.js.map +0 -1
  534. package/dist/csc-ui/p-cc31d9b2.entry.js +0 -2
  535. package/dist/csc-ui/p-ccef8a49.entry.js +0 -2
  536. package/dist/csc-ui/p-ccef8a49.entry.js.map +0 -1
  537. package/dist/csc-ui/p-d26167bc.entry.js +0 -2
  538. package/dist/csc-ui/p-d76079eb.entry.js +0 -2
  539. package/dist/csc-ui/p-d7ca1f65.entry.js +0 -2
  540. package/dist/csc-ui/p-d7ca1f65.entry.js.map +0 -1
  541. package/dist/csc-ui/p-d8899493.entry.js +0 -2
  542. package/dist/csc-ui/p-da6a2275.entry.js +0 -2
  543. package/dist/csc-ui/p-e3bd1f42.entry.js +0 -2
  544. package/dist/csc-ui/p-e3bd1f42.entry.js.map +0 -1
  545. package/dist/csc-ui/p-e6fb98a7.entry.js +0 -2
  546. package/dist/csc-ui/p-ea99cd0e.entry.js +0 -2
  547. package/dist/csc-ui/p-f616d1c4.entry.js +0 -2
  548. package/dist/csc-ui/p-fa83a615.entry.js +0 -2
  549. package/dist/csc-ui/p-fb098c2b.entry.js +0 -2
  550. package/dist/csc-ui/p-ff51bae3.entry.js +0 -2
  551. package/dist/esm/c-autocomplete_16.entry.js +0 -1544
  552. package/dist/esm/c-autocomplete_16.entry.js.map +0 -1
  553. package/dist/esm/c-checkbox_3.entry.js +0 -348
  554. package/dist/esm/c-checkbox_3.entry.js.map +0 -1
  555. package/dist/esm/c-csc-logo.entry.js +0 -19
  556. package/dist/esm/c-csc-logo.entry.js.map +0 -1
  557. package/dist/esm/c-loader.entry.js +0 -35
  558. package/dist/esm/c-loader.entry.js.map +0 -1
  559. package/dist/esm/c-main.entry.js +0 -17
  560. package/dist/esm/c-main.entry.js.map +0 -1
  561. package/dist/esm/c-navigation-button.entry.js +0 -18
  562. package/dist/esm/c-navigation-button.entry.js.map +0 -1
  563. package/dist/esm/c-otp-input.entry.js +0 -150
  564. package/dist/esm/c-otp-input.entry.js.map +0 -1
  565. package/dist/esm/c-page.entry.js +0 -30
  566. package/dist/esm/c-page.entry.js.map +0 -1
  567. package/dist/esm/c-radio-group.entry.js +0 -150
  568. package/dist/esm/c-radio-group.entry.js.map +0 -1
  569. package/dist/esm/c-radio.entry.js +0 -20
  570. package/dist/esm/c-radio.entry.js.map +0 -1
  571. package/dist/esm/c-side-navigation-item.entry.js +0 -125
  572. package/dist/esm/c-side-navigation-item.entry.js.map +0 -1
  573. package/dist/esm/c-side-navigation-title.entry.js +0 -17
  574. package/dist/esm/c-side-navigation-title.entry.js.map +0 -1
  575. package/dist/esm/c-side-navigation.entry.js +0 -76
  576. package/dist/esm/c-side-navigation.entry.js.map +0 -1
  577. package/dist/esm/c-sub-navigation-item.entry.js +0 -47
  578. package/dist/esm/c-sub-navigation-item.entry.js.map +0 -1
  579. package/dist/esm/c-switch.entry.js +0 -67
  580. package/dist/esm/c-switch.entry.js.map +0 -1
  581. package/dist/esm/c-table.entry.js +0 -43
  582. package/dist/esm/c-table.entry.js.map +0 -1
  583. package/dist/esm/c-text-field.entry.js +0 -147
  584. package/dist/esm/c-text-field.entry.js.map +0 -1
  585. package/dist/esm/c-toolbar.entry.js +0 -17
  586. package/dist/esm/c-toolbar.entry.js.map +0 -1
  587. /package/dist/csc-ui/{p-f24b9d97.js.map → p-d72364b9.js.map} +0 -0
@@ -1,1544 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-47956d53.js';
2
- import { m as mdiChevronDown, a as mdiClose, b as mdiFullscreenExit, c as mdiFullscreen, d as mdiAlert, e as mdiCloseCircle } from './mdi-8656e74a.js';
3
- import { g as getScrollParent } from './getScrollParent-f876ad1b.js';
4
-
5
- const cAutocompleteCss = "html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit;-webkit-tap-highlight-color:transparent}:host{font-family:var(--c-font-family)}::-ms-reveal{display:none}:host(c-autocomplete){--_c-autocomplete-option-background-color:var(\n --c-autocomplete-option-background-color,\n var(--c-white)\n );--_c-autocomplete-option-background-hover-color:var(\n --c-autocomplete-option-background-hover-color,\n var(--c-primary-100)\n );--_c-autocomplete-active-color:var(\n --c-autocomplete-active-color,\n var(--c-primary-600)\n );--_c-autocomplete-inactive-color:var(\n --c-autocomplete-inactive-color,\n var(--c-tertiary-600)\n );--_c-autocomplete-background-color:var(\n --c-autocomplete-background-color,\n var(--c-transparent)\n );--_c-autocomplete-text-color:var(\n --c-autocomplete-text-color,\n var(--c-text-body)\n );--_c-autocomplete-option-text-color:var(\n --c-autocomplete-option-text-color,\n var(--c-text-body)\n );--_c-autocomplete-placeholder-color:var(\n --c-autocomplete-placeholder-color,\n var(--c-tertiary-500)\n );--c-select-option-background-color:var(\n --_c-autocomplete-option-background-color\n );--c-select-option-background-color-hover:var(\n --_c-autocomplete-option-background-hover-color\n );--c-select-option-text-color:var(--_c-autocomplete-option-text-color);--_c-input-active-color:var(--_c-autocomplete-active-color);--_c-input-inactive-color:var(--_c-autocomplete-inactive-color);--_c-input-background-color:var(--_c-autocomplete-background-color);--_c-input-text-color:var(--_c-autocomplete-text-color);--_c-input-placeholder-color:var(--_c-autocomplete-placeholder-color)}:host{display:block;cursor:text}.c-input-menu__chevron{fill:currentColor;transform:rotate(0deg);transition:transform 0.3s ease-in-out}.c-input-menu__chevron--active{transform:rotate(180deg)}.c-input-menu__input{width:100%;display:flex;justify-items:stretch}.c-input-menu__selection{display:none;pointer-events:none}.c-input-menu__selection--show{align-items:center;display:flex;width:100%;color:var(--_c-select-active-color)}.c-input-menu__item-wrapper{position:absolute;width:100%;top:44px;z-index:10;margin-left:calc(var(--_c-input-label-position) * -1)}.c-input-menu__item-wrapper--shadow{top:47px}.c-input-menu__items{position:absolute;background-color:var(--_c-select-option-background-color);min-width:calc(100% + 24px);box-shadow:0 8px 16px 0 rgba(0, 0, 0, 0.2);z-index:10;user-select:none;border-radius:4px;margin:0 -12px;overflow-y:scroll;list-style:none;padding:0}.c-input-menu__items--hidden{display:none}.c-input-menu__items li{cursor:pointer;display:flex;min-height:48px;padding:0 12px;transition:background-color 0.3s;font-size:14px;align-items:center;justify-content:flex-start;color:var(--_c-select-option-text-color)}.c-input-menu__items li.disabled{background-color:var(--c-tertiary-100);filter:grayscale(1) opacity(0.6);cursor:default}.c-input-menu__items li.disabled:hover{background-color:var(--c-tertiary-100)}.c-input-menu__items li.dense{padding:10px 14px}.c-input-menu__items li:hover{background-color:var(--_c-select-option-background-color-hover)}.c-input-menu__items li[aria-selected=true]{background-color:var(--_c-select-option-background-color-hover);box-shadow:inset 0 0 0 1px var(--_c-select-active-color);border-radius:4px;backface-visibility:hidden;transform:translate3d(0, 0, 0)}.c-input-menu__items li.none{color:rgba(0, 0, 0, 0.5)}.c-input-menu__items--empty li{color:var(--c-text-system);cursor:default;gap:8px;pointer-events:none}.c-input-menu__items--empty li svg{fill:var(--c-warning-600);height:18px;width:18px}input{max-height:32px;padding:8px 0;background-color:transparent;border:none;color:var(--c-text-body);flex:1 1 auto;font-family:var(--c-font-family);font-size:16px;line-height:20px;max-width:100%;min-width:0;width:100%;pointer-events:none}input:focus,input:active{outline:none}input::-ms-reveal{display:none}svg{fill:currentColor;height:22px;width:22px}.c-input--disabled{color:var(--c-tertiary-400)}.c-input:focus-within{color:var(--c-primary-600)}.c-input--error{color:var(--c-error-600)}.c-input--error:focus-within{color:var(--c-error-600)}.visuallyhidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}";
6
-
7
- const CAutocomplete = class {
8
- constructor(hostRef) {
9
- registerInstance(this, hostRef);
10
- this.changeQuery = createEvent(this, "changeQuery", 7);
11
- this.changeValue = createEvent(this, "changeValue", 3);
12
- if (hostRef.$hostElement$["s-ei"]) {
13
- this.internals = hostRef.$hostElement$["s-ei"];
14
- }
15
- else {
16
- this.internals = hostRef.$hostElement$.attachInternals();
17
- hostRef.$hostElement$["s-ei"] = this.internals;
18
- }
19
- this._preventDialogOpen = false;
20
- this._debounce = null;
21
- this._handleSlotChange = () => {
22
- this.optionElements = this.el.querySelectorAll('c-option');
23
- const selection = Array.from(this.optionElements).find((option) => option.selected);
24
- if (selection) {
25
- this.value = this.returnObject
26
- ? { name: selection.name, value: selection.value }
27
- : selection.value;
28
- this.changeValue.emit(this.value);
29
- this.changeQuery.emit(this.query);
30
- this.internals.setFormValue(selection.value.toString());
31
- }
32
- if (this.optionElements.length && !this.optionElementsExist) {
33
- this.optionElementsExist = true;
34
- }
35
- };
36
- this._toggleDropdown = (event) => {
37
- event.stopPropagation();
38
- if (this.dropdownVisible) {
39
- this._dropdownElement.close();
40
- return;
41
- }
42
- this._dropdownElement.open();
43
- };
44
- this._onButtonKeyDown = (src, event) => {
45
- event.stopPropagation();
46
- if (event.key !== 'Tab')
47
- event.preventDefault();
48
- if (['Enter', ' '].includes(event.key)) {
49
- if (src === 'chevron') {
50
- this._toggleDropdown(event);
51
- return;
52
- }
53
- this._reset(event);
54
- this._preventDialogOpen = true;
55
- this._inputElement.focus();
56
- }
57
- };
58
- this._reset = (event) => {
59
- event.stopPropagation();
60
- this.query = '';
61
- this.value = null;
62
- this.changeValue.emit(null);
63
- this.internals.setFormValue(null);
64
- this.changeQuery.emit('');
65
- this._preventDialogOpen = true;
66
- this._cInputElement.reset();
67
- this._inputElement.focus();
68
- this._dropdownElement.updateList();
69
- };
70
- this._onInputFocus = () => {
71
- if (!this._preventDialogOpen) {
72
- this._dropdownElement.open();
73
- }
74
- this._updateStatusText();
75
- this._preventDialogOpen = false;
76
- };
77
- this.items = [];
78
- this.value = null;
79
- this.query = null;
80
- this.hostId = undefined;
81
- this.disabled = false;
82
- this.label = undefined;
83
- this.name = undefined;
84
- this.placeholder = '';
85
- this.hideDetails = false;
86
- this.hint = '';
87
- this.loading = false;
88
- this.required = false;
89
- this.valid = true;
90
- this.validate = false;
91
- this.validateOnBlur = false;
92
- this.validation = 'Required field';
93
- this.shadow = false;
94
- this.returnObject = false;
95
- this.itemsPerPage = 6;
96
- this.optionElements = undefined;
97
- this.currentIndex = null;
98
- this.dropdownVisible = false;
99
- this.statusText = '';
100
- this.optionElementsExist = false;
101
- }
102
- get _id() {
103
- return this.hostId || `autocomplete_${CAutocomplete._uniqueId}`;
104
- }
105
- async reset() {
106
- this.query = '';
107
- this.changeValue.emit(null);
108
- this.internals.setFormValue(null);
109
- this.changeQuery.emit('');
110
- this._dropdownElement.updateList();
111
- }
112
- _handleKeyDown(event) {
113
- const alphanumeric = /^[0-9a-zA-Z ]+$/;
114
- if (event.key.match(alphanumeric) && event.key.length === 1) {
115
- if (!this.dropdownVisible) {
116
- this._dropdownElement.open();
117
- return;
118
- }
119
- this._inputElement.focus();
120
- return;
121
- }
122
- if (event.key === 'Escape') {
123
- event.preventDefault();
124
- this._preventDialogOpen = true;
125
- this._dropdownElement.close();
126
- requestAnimationFrame(() => {
127
- this._inputElement.focus();
128
- });
129
- return;
130
- }
131
- if (event.key === 'Tab') {
132
- this._inputElement.focus();
133
- requestAnimationFrame(() => {
134
- this._dropdownElement.close();
135
- });
136
- return;
137
- }
138
- if (event.key === 'ArrowDown') {
139
- event.preventDefault();
140
- if (!this._items.length)
141
- return;
142
- if (!this.dropdownVisible || this.currentIndex === null) {
143
- this.currentIndex = 0;
144
- this._dropdownElement.open();
145
- this._dropdownElement.focusItem(this.currentIndex);
146
- return;
147
- }
148
- this.currentIndex = Math.min(this.currentIndex + 1, this._items.length - 1);
149
- this._dropdownElement.focusItem(this.currentIndex);
150
- return;
151
- }
152
- if (event.key === 'ArrowUp') {
153
- event.preventDefault();
154
- if (this.currentIndex === 0) {
155
- this._dropdownElement.close();
156
- this._inputElement.focus();
157
- }
158
- if (!this.dropdownVisible || this.currentIndex === null) {
159
- this.currentIndex = this._items.length - 1;
160
- this._dropdownElement.open();
161
- this._dropdownElement.focusItem(this.currentIndex);
162
- return;
163
- }
164
- this.currentIndex = Math.max(this.currentIndex - 1, 0);
165
- this._dropdownElement.focusItem(this.currentIndex);
166
- }
167
- if (event.key === 'Enter') {
168
- event.preventDefault();
169
- if (this.currentIndex === null)
170
- return;
171
- this._dropdownElement.selectItem(this.currentIndex);
172
- }
173
- if (event.key === 'Home' && this.dropdownVisible) {
174
- this.currentIndex = 0;
175
- }
176
- if (event.key === 'End' && this.dropdownVisible) {
177
- this.currentIndex = this._items.length - 1;
178
- }
179
- }
180
- onDropdownStateChange(event) {
181
- const isOpen = event.detail;
182
- this.dropdownVisible = isOpen;
183
- if (!isOpen) {
184
- requestAnimationFrame(() => {
185
- this.currentIndex = null;
186
- });
187
- }
188
- }
189
- onSelectOption(event) {
190
- this._dropdownElement.close();
191
- const { name, value } = event.detail;
192
- this.value = this.returnObject ? event.detail : value;
193
- this.changeValue.emit(this.value);
194
- this.internals.setFormValue(value);
195
- this.query = name;
196
- this.changeQuery.emit(name);
197
- this._preventDialogOpen = true;
198
- if (this.optionElementsExist) {
199
- Array.from(this.optionElements).forEach((item) => {
200
- item.selected = item.value === value && item.name === name;
201
- });
202
- this._dropdownElement.updateList();
203
- }
204
- this._inputElement.focus();
205
- }
206
- handleQueryChange() {
207
- this._updateStatusText();
208
- }
209
- _updateInput() {
210
- this._dropdownElement.open();
211
- this.query = this._inputElement.value;
212
- this.changeQuery.emit(this.query);
213
- this._dropdownElement.updateList();
214
- }
215
- _renderLoader() {
216
- return h("c-spinner", { color: "var(--_c-autocomplete-active-color)", size: 20 });
217
- }
218
- _renderChevron() {
219
- const classes = {
220
- 'c-input-menu__chevron': true,
221
- 'c-input-menu__chevron--active': this.dropdownVisible,
222
- };
223
- return (h("c-icon-button", { size: "x-small", class: classes, text: true, onClick: (event) => this._toggleDropdown(event), onKeyDown: (event) => this._onButtonKeyDown('chevron', event) }, h("c-icon", { path: mdiChevronDown, size: 24 })));
224
- }
225
- _renderReset() {
226
- return (h("c-icon-button", { "aria-label": "", size: "x-small", text: true, onClick: (event) => this._reset(event), onKeyDown: (event) => this._onButtonKeyDown('reset', event) }, h("c-icon", { path: mdiClose, size: 20 })));
227
- }
228
- _renderInputElement() {
229
- var _a;
230
- return (h("div", { class: "c-input-menu__input" }, h("input", { type: "text", ref: (el) => (this._inputElement = el), "aria-expanded": this.dropdownVisible.toString(), "aria-owns": this._inputId + '-items', "aria-autocomplete": "list", autocomplete: "off", class: "c-input__input", role: "combobox", value: this.query, name: (_a = this.name) !== null && _a !== void 0 ? _a : null, onInput: () => this._updateInput(), onFocus: () => this._onInputFocus() })));
231
- }
232
- componentWillLoad() {
233
- CAutocomplete._uniqueId += 1;
234
- this._inputId =
235
- 'input_' +
236
- (this.hostId || this.label || this.placeholder).replace(/[^a-zA-Z0-9-_]/g, '');
237
- }
238
- get _items() {
239
- return this.optionElementsExist ? this.optionElements : this.items;
240
- }
241
- _updateStatusText() {
242
- if (this._debounce !== null) {
243
- clearTimeout(this._debounce);
244
- this._debounce = null;
245
- }
246
- this._debounce = window.setTimeout(() => {
247
- const ending = !!this._items.length
248
- ? ' or navigate using the up and down arrows'
249
- : '';
250
- if (this.currentIndex === null) {
251
- this.statusText = this._items.length
252
- ? `${this._items.length} result${this._items.length !== 1 ? 's' : ''} available`
253
- : 'No search results available';
254
- }
255
- if (this.query !== null && this._items.length) {
256
- this.statusText += ', input a search query to filter the results';
257
- }
258
- this._dropdownElement.setStatusText(this.statusText + ending);
259
- this._debounce = null;
260
- }, 1400);
261
- }
262
- render() {
263
- const itemType = this.optionElementsExist ? 'option' : 'item';
264
- return (h(Host, null, h("c-dropdown", { ref: (el) => (this._dropdownElement = el), id: `${this._id}-dropdown`, index: this.currentIndex, "items-per-page": this.itemsPerPage, "item-type": itemType, items: this._items, parent: this.el, type: "autocomplete", onKeyDown: (event) => this._handleKeyDown(event) }, h("c-input", { slot: "default", ref: (el) => (this._cInputElement = el), active: this.dropdownVisible, disabled: this.disabled, "hide-details": this.hideDetails, hint: this.hint, id: this.hostId, "input-id": this._inputId, label: this.label, name: this.name, placeholder: this.placeholder, required: this.required, shadow: this.shadow, valid: this.valid, validate: this.validate, "validate-on-blur": this.validateOnBlur, validation: this.validation, value: this.query, variant: "select" }, h("slot", { name: "pre", slot: "pre" }), h("div", { class: "c-input__content" }, this._renderInputElement(), this.loading && this._renderLoader(), !this.loading && this.value && this._renderReset(), !this.loading && !this.value && this._renderChevron(), h("slot", { onSlotchange: () => this._handleSlotChange() })), h("slot", { name: "post", slot: "post" })))));
265
- }
266
- static get formAssociated() { return true; }
267
- get el() { return getElement(this); }
268
- static get watchers() { return {
269
- "query": ["handleQueryChange"]
270
- }; }
271
- };
272
- CAutocomplete._uniqueId = 0;
273
- CAutocomplete.style = cAutocompleteCss;
274
-
275
- const cBadgeCss = "html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit;-webkit-tap-highlight-color:transparent}:host{font-family:var(--c-font-family)}::-ms-reveal{display:none}:host{--_c-badge-background-color:var(--c-badge-background-color, var(--c-warning-600));--_c-badge-text-color:var(--c-badge-text-color, var(--c-white));--_c-badge-border-color:var(--c-badge-border-color, var(--c-white));align-items:center;background-color:var(--_c-badge-background-color);border-radius:16px;box-shadow:0 0 0 2px var(--_c-badge-border-color);color:var(--_c-badge-text-color);display:flex;font-size:12px;height:16px;justify-content:center;justify-items:center;line-height:1;min-width:16px;padding:0 4px;pointer-events:none;position:absolute;right:-6px;top:-6px;z-index:2}";
276
-
277
- const CBadge = class {
278
- constructor(hostRef) {
279
- registerInstance(this, hostRef);
280
- }
281
- render() {
282
- return (h(Host, { class: "c-badge" }, h("slot", null)));
283
- }
284
- };
285
- CBadge.style = cBadgeCss;
286
-
287
- const cButtonCss = "html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit;-webkit-tap-highlight-color:transparent}:host{font-family:var(--c-font-family)}::-ms-reveal{display:none}:host{--_c-button-border-radius:var(--c-button-border-radius, 4px);--_c-button-height:44px;--_c-button-min-width:88px;--_c-button-padding:0 16px;--_c-button-font-size:16px;--_c-button-icon-size:24px;--_c-button-outline-offset:2px;border-radius:var(--_c-button-border-radius);display:inline-flex;transform:translateZ(0);transition:background-color 0.3s ease-in-out;--_c-button-background-color:var(--c-button-background-color, var(--c-primary-600));--_c-button-text-color:var(--c-button-text-color, var(--c-white));--_c-button-loader-color:var(--c-button-loader-color, var(--_c-button-text-color));--_c-button-outline-color:var(--c-button-outline-color, var(--_c-button-background-color));background-color:var(--_c-button-background-color);color:var(--_c-button-text-color)}:host ::slotted(svg){fill:var(--_c-button-loader-color)}:host(.c-button--no-radius){--_c-button-border-radius:0}:host(:host:not(.c-button--description)){height:var(--_c-button-height)}:host(.c-button--description){height:\"auto\"}:host(:host:hover){--_c-button-background-color-hover:var(--c-button-background-color-hover, var(--c-primary-400));background-color:var(--_c-button-background-color-hover)}:host(.c-button--inverted){--_c-button-inverted-background-color:var(--c-button-inverted-background-color, var(--c-white));--_c-button-inverted-text-color:var(--c-button-inverted-text-color, var(--c-primary-600));--_c-button-outline-color:var(--_c-button-inverted-background-color);background-color:var(--_c-button-inverted-background-color);color:var(--_c-button-inverted-text-color)}:host(.c-button--inverted:hover){--_c-button-inverted-background-color-hover:var(--c-button-inverted-background-color-hover, var(--c-primary-200));background-color:var(--_c-button-inverted-background-color-hover)}:host(.c-button--inverted.c-button--disabled){--_c-button-inverted-disabled-background-color:var(--c-button-inverted-disabled-background-color, var(--_c-button-disabled-background-color));--_c-button-inverted-disabled-text-color:var(--c-button-inverted-disabled-text-color, var(--c-tertiary-500));background-color:var(--_c-button-inverted-disabled-background-color);color:var(--_c-button-inverted-disabled-text-color)}:host(.c-button--danger){--_c-button-danger-background-color:var(--c-button-danger-background-color, var(--c-error-600));--_c-button-danger-text-color:var(--c-button-danger-text-color, var(--c-white));--_c-button-danger-loader-color:var(--c-button-danger-loader-color, var(--_c-button-danger-text-color));--_c-button-loader-color:var(--_c-button-danger-loader-color);--_c-button-outline-color:var(--_c-button-danger-background-color);background-color:var(--_c-button-danger-background-color);color:var(--_c-button-danger-text-color)}:host(.c-button--danger:hover){--_c-button-danger-background-color-hover:var(--c-button-danger-background-color-hover, var(--c-error-400));background-color:var(--_c-button-danger-background-color-hover)}:host(.c-button--danger.c-button--disabled){--_c-button-danger-disabled-background-color:var(--c-button-danger-disabled-background-color, var(--_c-button-disabled-background-color));--_c-button-danger-disabled-text-color:var(--c-button-danger-disabled-text-color, var(--_c-button-disabled-text-color));background-color:var(--_c-button-danger-disabled-background-color);color:var(--_c-button-danger-disabled-text-color)}:host(.c-button--danger.c-button--inverted){--_c-button-danger-inverted-text-color:var(--c-button-danger-inverted-text-color, var(--c-error-600));--_c-button-danger-inverted-background-color:var(--c-button-danger-inverted-background-color, var(--c-white));--_c-button-outline-color:var(--_c-button-danger-inverted-background-color);background-color:var(--_c-button-danger-inverted-background-color);color:var(--_c-button-danger-inverted-text-color)}:host(.c-button--danger.c-button--inverted:hover){--_c-button-danger-inverted-background-color-hover:var(--c-button-danger-inverted-background-color-hover, var(--c-error-100));background-color:var(--_c-button-danger-inverted-background-color-hover)}:host(.c-button--danger.c-button--inverted.c-button--disabled){--_c-button-danger-inverted-disabled-background-color:var(--c-button-danger-inverted-disabled-background-color, var(--_c-button-disabled-background-color));--_c-button-danger-inverted-disabled-text-color:var(--c-button-danger-inverted-disabled-text-color, var(--_c-button-disabled-text-color));background-color:var(--_c-button-danger-inverted-disabled-background-color);color:var(--_c-button-danger-inverted-disabled-text-color)}:host(.c-button--ghost){--_c-button-ghost-background-color:var(--c-button-ghost-background-color, var(--c-primary-200));--_c-button-ghost-text-color:var(--c-button-ghost-text-color, var(--c-primary-600));--_c-button-ghost-loader-color:var(--c-button-ghost-loader-color, var(--_c-button-ghost-text-color));--_c-button-loader-color:var(--_c-button-ghost-loader-color);--_c-button-outline-color:var(--_c-button-ghost-text-color);background-color:var(--_c-button-ghost-background-color);color:var(--_c-button-ghost-text-color)}:host(.c-button--ghost:hover){--_c-button-ghost-background-color-hover:var(--c-button-ghost-background-color-hover, var(--c-primary-100));background-color:var(--_c-button-ghost-background-color-hover)}:host(.c-button--ghost.c-button--disabled){--_c-button-ghost-disabled-background-color:var(--c-button-ghost-disabled-background-color, var(--_c-button-disabled-background-color));--_c-button-ghost-disabled-text-color:var(--c-button-ghost-disabled-text-color, var(--_c-button-disabled-text-color));background-color:var(--_c-button-ghost-disabled-background-color);color:var(--_c-button-ghost-disabled-text-color)}:host(.c-button--ghost.c-button--inverted){--_c-button-ghost-inverted-background-color:var(--c-button-ghost-inverted-background-color, rgba(var(--c-white-rgb), 0.2));--_c-button-ghost-inverted-text-color:var(--c-button-ghost-inverted-text-color, var(--c-white));--_c-button-outline-color:var(--_c-button-ghost-inverted-text-color);background-color:var(--_c-button-ghost-inverted-background-color);color:var(--_c-button-ghost-inverted-text-color)}:host(.c-button--ghost.c-button--inverted:hover){--_c-button-ghost-inverted-background-color-hover:var(--c-button-ghost-inverted-background-color-hover, rgba(var(--c-white-rgb), 0.3));background-color:var(--_c-button-ghost-inverted-background-color-hover)}:host(.c-button--ghost.c-button--inverted.c-button--disabled){--_c-button-ghost-inverted-disabled-background-color:var(--c-button-ghost-inverted-disabled-background-color, rgba(var(--c-white-rgb), 0.05));--_c-button-ghost-inverted-disabled-text-color:var(--c-button-ghost-inverted-disabled-text-color, var(--c-tertiary-400));background-color:var(--_c-button-ghost-inverted-disabled-background-color);color:var(--_c-button-ghost-inverted-disabled-text-color)}:host(.c-button--text){--_c-button-text-background-color:var(--c-button-text-background-color, var(--c-transparent));--_c-button-text-text-color:var(--c-button-text-text-color, var(--c-primary-600));--_c-button-text-loader-color:var(--c-button-text-loader-color, var(--_c-button-text-text-color));--_c-button-loader-color:var(--_c-button-text-loader-color);--_c-button-outline-color:var(--_c-button-text-text-color);background-color:var(--_c-button-text-background-color);color:var(--_c-button-text-text-color)}:host(.c-button--text:hover){--_c-button-text-background-color-hover:var(--c-button-text-background-color-hover, var(--c-primary-100));background-color:var(--_c-button-text-background-color-hover)}:host(.c-button--text.c-button--disabled){--_c-button-text-disabled-background-color:var(--c-button-text-disabled-background-color, var(--c-transparent));--_c-button-text-disabled-text-color:var(--c-button-text-disabled-text-color, var(--c-tertiary-500));background-color:var(--_c-button-text-disabled-background-color);color:var(--_c-button-text-disabled-text-color)}:host(.c-button--text.c-button--inverted){--_c-button-text-inverted-background-color:var(--c-button-text-inverted-background-color, var(--c-transparent));--_c-button-text-inverted-text-color:var(--c-button-text-inverted-text-color, var(--c-white));--_c-button-outline-color:var(--_c-button-text-inverted-text-color);background-color:var(--_c-button-text-inverted-background-color);color:var(--_c-button-text-inverted-text-color)}:host(.c-button--text.c-button--inverted:hover){--_c-button-text-inverted-background-color-hover:var(--c-button-text-inverted-background-color-hover, rgba(var(--c-white-rgb), 0.3));background-color:var(--_c-button-text-inverted-background-color-hover)}:host(.c-button--text.c-button--inverted.c-button--disabled){--_c-button-text-inverted-disabled-background-color:var(--c-button-text-inverted-disabled-background-color, var(--c-transparent));--_c-button-text-inverted-disabled-text-color:var(--c-button-text-inverted-disabled-text-color, var(--c-tertiary-400));background-color:var(--_c-button-text-inverted-disabled-background-color);color:var(--_c-button-text-inverted-disabled-text-color)}:host(.c-button--outlined){--_c-button-outlined-text-color:var(--c-button-outlined-text-color, var(--c-primary-600));--_c-button-outlined-border-color:var(--c-button-outlined-border-color, var(--_c-button-outlined-text-color));--_c-button-outlined-background-color:var(--c-button-outlined-background-color, var(--c-transparent));--_c-button-outlined-loader-color:var(--c-button-outlined-loader-color, var(--_c-button-outlined-text-color));--_c-button-loader-color:var(--_c-button-outlined-loader-color);--_c-outline-color:var(--_c-button-outlined-border-color);--_c-button-outline-color:var(--_c-button-outlined-border-color);background-color:var(--_c-button-outlined-background-color);color:var(--_c-button-outlined-text-color);box-shadow:inset 0 0 0 2px var(--_c-outline-color)}:host(.c-button--outlined:hover){--_c-button-outlined-background-color-hover:var(--c-button-outlined-background-color-hover, var(--c-primary-200));background-color:var(--_c-button-outlined-background-color-hover)}:host(.c-button--outlined.c-button--disabled){--_c-button-outlined-disabled-text-color:var(--c-button-outlined-disabled-text-color, var(--c-tertiary-500));--_c-button-outlined-disabled-background-color:var(--c-button-outlined-disabled-background-color, var(--_c-button-outlined-background-color));--_c-button-outlined-disabled-border-color:var(--c-button-outlined-disabled-border-color, var(--c-tertiary-400));--_c-outline-color:var(--_c-button-outlined-disabled-border-color);background-color:var(--_c-button-outlined-disabled-background-color);color:var(--_c-button-outlined-disabled-text-color)}:host(.c-button--outlined.c-button--inverted){--_c-button-outlined-inverted-text-color:var(--c-button-outlined-inverted-text-color, var(--c-white));--_c-button-outlined-inverted-border-color:var(--c-button-outlined-inverted-border-color, var(--_c-button-outlined-inverted-text-color));--_c-button-outlined-inverted-background-color:var(--c-button-outlined-inverted-background-color, var(--_c-button-outlined-background-color));--_c-outline-color:var(--_c-button-outlined-inverted-border-color);--_c-button-outline-color:var(--_c-button-outlined-inverted-border-color);background-color:var(--_c-button-outlined-inverted-background-color);color:var(--_c-button-outlined-inverted-text-color)}:host(.c-button--outlined.c-button--inverted:hover){--_c-button-outlined-inverted-background-color-hover:var(--c-button-outlined-inverted-background-color-hover, rgba(var(--c-white-rgb), 0.3));background-color:var(--_c-button-outlined-inverted-background-color-hover)}:host(.c-button--outlined.c-button--inverted.c-button--disabled){--_c-button-outlined-inverted-disabled-border-color:var(--c-button-outlined-inverted-disabled-border-color, var(--c-tertiary-400));--_c-button-outlined-inverted-disabled-text-color:var(--c-button-outlined-inverted-disabled-text-color, var(--c-tertiary-400));--_c-button-outlined-inverted-disabled-background-color:var(--c-button-outlined-inverted-disabled-background-color, var(--_c-button-outlined-background-color));--_c-outline-color:var(--_c-button-outlined-inverted-disabled-border-color);background-color:var(--_c-button-outlined-inverted-disabled-background-color);color:var(--_c-button-outlined-inverted-disabled-text-color)}:host(.c-button--disabled){--_c-button-disabled-background-color:var(--c-button-disabled-background-color, var(--c-tertiary-100));--_c-button-disabled-text-color:var(--c-button-disabled-text-color, var(--c-tertiary-600));--_c-button-loader-color:var(--_c-button-disabled-text-color);background-color:var(--_c-button-disabled-background-color);color:var(--_c-button-disabled-text-color);pointer-events:none}:host(.c-button:focus){z-index:2}:host(.c-button) a:focus,:host(.c-button) button:focus{outline:none}:host(.c-button) a:focus-visible,:host(.c-button) button:focus-visible{outline:2px var(--_c-button-outline-color) solid;outline-offset:var(--_c-button-outline-offset);z-index:1}:host(.c-button--fit){width:100%}:host(.c-button--small){--_c-button-height:28px}:host(.c-button--large){--_c-button-height:52px}:host(.c-button--fitted){width:100%}::slotted([slot=icon]){font-size:var(--_c-button-icon-size)}::slotted(svg){fill:var(--_c-button-loader-color)}a{text-decoration:none}button,a{background-color:transparent;border-radius:var(--_c-button-border-radius);color:currentColor;font-family:var(--c-font-family);display:inline-grid;place-items:center;border:none;padding:0;position:relative;margin:0;width:100%;cursor:pointer;transition:background-color 0.3s cubic-bezier(0.25, 0.8, 0.5, 1), color 0.3s cubic-bezier(0.25, 0.8, 0.5, 1)}button:disabled,a:disabled{cursor:default}@media (max-width: 767px){.full-width-mobile{max-width:100% !important;width:100% !important;margin:0 !important}.full-width-mobile .c-button-padding{padding:24px 38px}.full-width{flex-grow:1 !important}}.c-button__content{border-radius:var(--_c-button-border-radius);position:relative;box-shadow:none;outline:none;backface-visibility:hidden;transform:translate3d(0, 0, 0);transition:background-color 0.3s;color:currentColor;margin:0;text-decoration:none;display:flex;text-align:center;font-size:var(--_c-button-font-size);font-weight:700;line-height:18px;user-select:none;min-width:var(--_c-button-min-width);white-space:nowrap;height:100%;width:100%;align-items:center;justify-content:center}.c-button__content *{pointer-events:none}.c-button__content svg{fill:var(--_c-button-loader-color);height:var(--_c-button-icon-size);width:var(--_c-button-icon-size)}.c-button__content svg.icon-by-path{margin-right:8px}.c-button__content svg.button-icon{margin-right:16px;font-size:10px;margin-left:-8px;margin-bottom:-2px}.c-button__content--small{--_c-button-padding:0 12px;--_c-button-font-size:14px;--_c-button-icon-size:20px}.c-button__content--large{--_c-button-padding:0 24px;--_c-button-font-size:18px}.c-button__content--no-radius{--_c-button-border-radius:0}.c-button__content--fitted{width:100%}.c-button__content--description{display:grid;grid-template-columns:1fr;gap:0}.c-button__content__inner{display:flex;gap:8px;height:var(--_c-button-height);align-items:center;justify-content:center;padding:var(--_c-button-padding)}.c-button__content__description{font-weight:400;font-size:12px;padding:0 12px 12px}.c-button__content__description--loading{opacity:0.8}.hide-text{color:transparent !important}.hide-text ::slotted([slot=icon]){opacity:0}.hide-text svg{fill:transparent !important}.hide-text .outlined.c-button svg{fill:transparent !important}.c-button__loader{width:100%;position:absolute;height:var(--_c-button-height);display:grid;place-content:center}.c-button__loader.dense_spinner{padding-top:7px}";
288
-
289
- const CButton = class {
290
- constructor(hostRef) {
291
- registerInstance(this, hostRef);
292
- this.tabChange = createEvent(this, "tabChange", 7);
293
- this.tabFocus = createEvent(this, "tabFocus", 7);
294
- this._onClick = (event, center = false) => {
295
- var _a;
296
- if (this.disabled) {
297
- event.preventDefault();
298
- return;
299
- }
300
- this._rippleElement.createRipple(event, this._container, center);
301
- if (this.tabs) {
302
- this.tabChange.emit({
303
- value: (_a = this.value) !== null && _a !== void 0 ? _a : this.hostElement.dataset.index,
304
- element: this.hostElement,
305
- });
306
- }
307
- if (this.type === 'submit') {
308
- const submitButton = this._createHiddenSubmitButton();
309
- submitButton.click();
310
- submitButton.remove();
311
- }
312
- };
313
- this._createHiddenSubmitButton = () => {
314
- const form = this._closestElementComposed('form', this._container);
315
- const submitButton = document.createElement('button');
316
- submitButton.type = this.type;
317
- submitButton.style.display = 'none';
318
- submitButton.disabled = this.disabled;
319
- form.appendChild(submitButton);
320
- return submitButton;
321
- };
322
- this._onKeyDown = (event) => {
323
- if (['Space', 'Enter'].includes(event.code)) {
324
- if (!!this.href) {
325
- window.open(this.href, this.target);
326
- }
327
- event.preventDefault();
328
- this._onClick(event, true);
329
- }
330
- };
331
- this.inverted = false;
332
- this.outlined = false;
333
- this.ghost = false;
334
- this.danger = false;
335
- this.grouped = false;
336
- this.text = false;
337
- this.loading = false;
338
- this.fit = false;
339
- this.noRadius = false;
340
- this.type = 'button';
341
- this.disabled = false;
342
- this.value = undefined;
343
- this.hostId = undefined;
344
- this.size = 'default';
345
- this.href = undefined;
346
- this.target = '_blank';
347
- this.tabs = false;
348
- }
349
- onTabFocus() {
350
- var _a;
351
- this.tabFocus.emit((_a = this.value) !== null && _a !== void 0 ? _a : this.hostElement.dataset.index);
352
- }
353
- _closestElementComposed(selector, base) {
354
- function __closestFrom(el) {
355
- const found = el.closest(selector);
356
- return found ? found : __closestFrom(el.getRootNode().host);
357
- }
358
- return __closestFrom(base);
359
- }
360
- componentWillLoad() {
361
- this._containerhasDescriptionSlot = !!this.hostElement.querySelector('[slot="description"]');
362
- }
363
- render() {
364
- const contentClasses = {
365
- 'c-button__content': true,
366
- 'c-button__content--description': this._containerhasDescriptionSlot,
367
- 'c-button__content--fitted': !!this.fit,
368
- 'c-button__content--large': this.size === 'large',
369
- 'c-button__content--no-radius': !!this.noRadius,
370
- 'c-button__content--small': this.size === 'small',
371
- };
372
- const innerClasses = {
373
- 'c-button__content__inner': true,
374
- 'hide-text': this.loading,
375
- };
376
- const buttonClasses = {
377
- fit: !!this.fit,
378
- grouped: this.grouped,
379
- outlined: this.outlined,
380
- };
381
- const hostClasses = {
382
- 'c-button': true,
383
- 'c-button--ghost': this.ghost,
384
- 'c-button--outlined': this.outlined,
385
- 'c-button--danger': this.danger,
386
- 'c-button--disabled': this.disabled,
387
- 'c-button--inverted': this.inverted,
388
- 'c-button--text': this.text,
389
- 'c-button--fitted': !!this.fit,
390
- 'c-button--description': !!this._containerhasDescriptionSlot,
391
- 'c-button--active': this.grouped && !this.outlined,
392
- 'c-button--no-radius': !!this.noRadius,
393
- [`c-button--${this.size}`]: true,
394
- };
395
- const descriptionSlotClasses = {
396
- 'c-button__content__description': this._containerhasDescriptionSlot,
397
- 'c-button__content__description--loading': this.loading,
398
- };
399
- const Tag = !!this.href ? 'a' : 'button';
400
- const hostAttributes = {
401
- onKeyDown: this._onKeyDown,
402
- };
403
- const attributes = {
404
- id: this.hostId,
405
- class: buttonClasses,
406
- disabled: this.disabled,
407
- onClick: this._onClick,
408
- type: this.type,
409
- };
410
- let linkAttributes = {};
411
- if (!!this.href) {
412
- linkAttributes = { href: this.href, target: this.target };
413
- }
414
- const spinnerSizes = {
415
- small: 20,
416
- default: 24,
417
- large: 28,
418
- };
419
- return (h(Host, Object.assign({ class: hostClasses }, hostAttributes), h(Tag, Object.assign({}, attributes, linkAttributes), h("div", { class: contentClasses, ref: (el) => (this._container = el) }, h("div", { class: innerClasses }, this.loading && (h("div", { class: "c-button__loader" }, h("c-spinner", { color: "var(--_c-button-loader-color)", size: spinnerSizes[this.size] }))), h("slot", null)), this._containerhasDescriptionSlot && (h("div", { class: descriptionSlotClasses }, h("slot", { name: "description" })))), h("c-ripple", { ref: (el) => (this._rippleElement = el) }))));
420
- }
421
- get hostElement() { return getElement(this); }
422
- };
423
- CButton.style = cButtonCss;
424
-
425
- const cCardCss = "html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit;-webkit-tap-highlight-color:transparent}:host{font-family:var(--c-font-family)}::-ms-reveal{display:none}:host(c-card){--_c-card-gap:var(--c-card-gap, clamp(1rem, 2vw, 1.5rem));--_c-card-background-color:var(--c-card-background-color, var(--c-white));display:flex;border-radius:6px;box-shadow:rgba(0, 0, 0, 0.15) 0 10px 20px, rgba(0, 0, 0, 0.2) 0 5px 5px;padding-block:var(--_c-card-gap);position:relative;background-color:var(--_c-card-background-color)}:host(c-card) article{display:flex;flex-direction:column;flex:1;gap:var(--_c-card-gap);max-width:100%}:host(.c-card--fullscreen){--c-icon-button-text-background-color:var(--c-white);overflow:auto}:host(.c-card--fullscreen) .c-card__fullscreen-toggle{position:fixed}@-moz-document url-prefix(){:host(.c-card--fullscreen) .c-card__fullscreen-toggle{position:absolute}}::slotted(c-loader){border-radius:6px}.c-card__fullscreen-toggle{position:absolute;right:calc(var(--_c-card-gap) - 8px);top:calc(var(--_c-card-gap) - 8px)}";
426
-
427
- const CCard = class {
428
- constructor(hostRef) {
429
- registerInstance(this, hostRef);
430
- this.fullscreen = false;
431
- this.isFullscreen = false;
432
- }
433
- _toggleFullscreen() {
434
- this.isFullscreen = !this.isFullscreen;
435
- }
436
- _onFullscreen() {
437
- var _a, _b;
438
- if (document.fullscreenElement) {
439
- this.exitFullscreen();
440
- return;
441
- }
442
- this.host.requestFullscreen();
443
- const modalWrapper = (_b = (_a = this.host.parentElement) === null || _a === void 0 ? void 0 : _a.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('.modal-wrapper');
444
- if (modalWrapper) {
445
- modalWrapper.style.display = this.isFullscreen
446
- ? 'block'
447
- : 'flex';
448
- }
449
- }
450
- componentDidLoad() {
451
- const title = this.host.querySelector('c-card-title');
452
- if (!!title && this.fullscreen) {
453
- title.style.marginRight = '40px';
454
- }
455
- this.host.addEventListener('fullscreenchange', this._toggleFullscreen.bind(this));
456
- }
457
- disconnectedCallback() {
458
- this.host.removeEventListener('fullscreenchange', this._toggleFullscreen.bind(this));
459
- }
460
- async exitFullscreen() {
461
- var _a, _b;
462
- if (!document.fullscreenElement)
463
- return;
464
- document.exitFullscreen();
465
- const modalWrapper = (_b = (_a = this.host.parentElement) === null || _a === void 0 ? void 0 : _a.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('.modal-wrapper');
466
- if (modalWrapper) {
467
- modalWrapper.style.display = 'flex';
468
- }
469
- }
470
- async enterFullscreen() {
471
- this.isFullscreen = true;
472
- }
473
- render() {
474
- const hostClasses = {
475
- 'c-card': true,
476
- 'c-card--fullscreen': this.isFullscreen,
477
- };
478
- return (h(Host, { class: hostClasses }, h("article", null, this.fullscreen && (h("c-icon-button", { "aria-hidden": "true", class: "c-card__fullscreen-toggle", title: this.isFullscreen ? 'Exit fullscreen' : 'Enter fullscreen', text: true, onClick: () => this._onFullscreen() }, h("c-icon", { path: this.isFullscreen ? mdiFullscreenExit : mdiFullscreen }))), h("slot", null))));
479
- }
480
- static get assetsDirs() { return ["assets"]; }
481
- get host() { return getElement(this); }
482
- };
483
- CCard.style = cCardCss;
484
-
485
- const cCardActionsCss = "html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit;-webkit-tap-highlight-color:transparent}:host{font-family:var(--c-font-family)}::-ms-reveal{display:none}:host{padding:0 var(--_c-card-gap, 24px);display:block}:host menu{margin:0;padding:0}.c-card-actions{align-items:center;display:flex;gap:8px}.c-card-actions ::slotted(c-button[fit]){flex:1}.c-card-actions--align-center{align-items:center}.c-card-actions--align-start{align-items:flex-start}.c-card-actions--align-end{align-items:flex-end}.c-card-actions--justify-center{justify-content:center}.c-card-actions--justify-end{justify-content:flex-end}.c-card-actions--justify-start{justify-content:flex-start}.c-card-actions--justify-stretch{justify-content:stretch}.c-card-actions--justify-stretch ::slotted(*){flex:1}.c-card-actions--justify-space-between{justify-content:space-between}.c-card-actions--justify-space-around{justify-content:space-around}";
486
-
487
- const CCardActions = class {
488
- constructor(hostRef) {
489
- registerInstance(this, hostRef);
490
- this.align = 'center';
491
- this.justify = 'start';
492
- }
493
- render() {
494
- const classes = {
495
- 'c-card-actions': true,
496
- [`c-card-actions--align-${this.align}`]: true,
497
- [`c-card-actions--justify-${this.justify}`]: true,
498
- };
499
- return (h("footer", null, h("menu", { class: classes }, h("slot", null))));
500
- }
501
- };
502
- CCardActions.style = cCardActionsCss;
503
-
504
- const cCardContentCss = "html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit;-webkit-tap-highlight-color:transparent}:host{font-family:var(--c-font-family)}::-ms-reveal{display:none}:host{display:block;padding:0 var(--_c-card-gap, 24px)}.c-card-content{display:flex;flex-direction:column;gap:var(--_c-card-gap)}.c-card-content ::slotted(*){max-width:100%}";
505
-
506
- const CCardContent = class {
507
- constructor(hostRef) {
508
- registerInstance(this, hostRef);
509
- }
510
- render() {
511
- return (h("article", { class: "c-card-content" }, h("slot", null)));
512
- }
513
- };
514
- CCardContent.style = cCardContentCss;
515
-
516
- const cCardTitleCss = "html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit;-webkit-tap-highlight-color:transparent}:host{font-family:var(--c-font-family)}::-ms-reveal{display:none}:host{--_c-card-title-color:var(--c-card-title-color, var(--c-text-system));--_c-card-title-underline-color:var(--c-card-title-underline-color, var(--c-primary-600));color:var(--_c-card-title-color);padding-inline:var(--_c-card-gap, 24px);display:block;font-family:var(--c-font-family);font-size:1rem;font-weight:500;text-transform:uppercase}.c-card-title__underline{background-color:var(--_c-card-title-underline-color);border-radius:4px;height:4px;margin-top:10px;width:44px}";
517
-
518
- const CCardTitle = class {
519
- constructor(hostRef) {
520
- registerInstance(this, hostRef);
521
- }
522
- render() {
523
- return (h("header", { class: "c-card-title" }, h("slot", null), h("div", { class: "c-card-title__underline" })));
524
- }
525
- };
526
- CCardTitle.style = cCardTitleCss;
527
-
528
- const cDropdownCss = "html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit;-webkit-tap-highlight-color:transparent}:host{font-family:var(--c-font-family)}::-ms-reveal{display:none}:host(c-dropdown){--_c-dropdown-background-color:var(\n --c-dropdown-background-color,\n var(--c-white)\n );--_c-dropdown-background-color-hover:var(\n --c-dropdown-background-color-hover,\n var(--c-primary-200)\n );--_c-dropdown-text-color:var(--c-dropdown-text-color, var(--c-text-body));--_c-dropdown-text-color-active:var(\n --c-dropdown-text-color-active,\n var(--c-primary-600)\n );--_c-dropdown-font-size:14px;--_c-dropdown-height:42px;display:block;position:relative}:host(c-dropdown) mark{background-color:transparent;box-shadow:0 2px 0 0 var(--_c-dropdown-text-color-active);color:inherit}:host(c-dropdown) dialog{border-radius:4px;background-color:transparent;border:none;margin:-4px 0 0;overflow:visible;padding:4px 0 0;position:fixed}:host(c-dropdown) dialog::backdrop{display:none}:host(c-dropdown) dialog[open].mobile{background-color:var(--_c-dropdown-background-color);width:100vw;max-width:100vw;height:100vh;max-height:100svh;inset:0}:host(c-dropdown) dialog[open].mobile .input-top-wrapper{padding:8px}:host(c-dropdown) dialog .input-bottom-wrapper.active{padding-top:8px}:host(c-dropdown) .dummy{display:none}:host(c-dropdown) ul{background-color:var(--_c-dropdown-background-color);box-shadow:2px 4px 10px rgba(0, 0, 0, 0.1607843137);border-radius:4px;list-style:none;margin:0;outline:none;padding:0;pointer-events:auto;visibility:hidden;width:100%;height:max-content;overflow-y:scroll}:host(c-dropdown) ul.active{visibility:visible;animation:0.2s 1 fade-in cubic-bezier(0.25, 0.8, 0.5, 1)}:host(c-dropdown) ul.active.mobile{width:100vw;max-width:100vw;height:100vh;max-height:calc(100svh - 60px)}:host(c-dropdown) li{align-items:center;column-gap:12px;cursor:pointer;display:flex;flex-wrap:nowrap;font-size:var(--_c-dropdown-font-size);min-height:var(--_c-dropdown-height);outline:none;padding-left:10px;padding-right:10px;pointer-events:auto;white-space:nowrap;width:100%;border-radius:4px}:host(c-dropdown) li span,:host(c-dropdown) li c-option-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}:host(c-dropdown) li:hover,:host(c-dropdown) li:focus,:host(c-dropdown) li.active{background:var(--_c-dropdown-background-color-hover);color:var(--_c-dropdown-text-color-active);box-shadow:inset 0 0 0 1px var(--_c-dropdown-text-color-active)}:host(c-dropdown) li:not(.disabled,:hover,:focus)[aria-selected=true]{background:var(--_c-dropdown-background-color-hover);color:var(--_c-dropdown-text-color-active);border-radius:0}:host(c-dropdown) li.disabled{background-color:rgba(var(--c-tertiary-rgb), 0.05);cursor:default;filter:grayscale(1) opacity(0.75)}:host(c-dropdown) .visuallyhidden{border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}@keyframes fade-in{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}";
529
-
530
- const CDropdown = class {
531
- constructor(hostRef) {
532
- registerInstance(this, hostRef);
533
- this.selectOption = createEvent(this, "selectOption", 7);
534
- this.dropdownStateChange = createEvent(this, "dropdownStateChange", 7);
535
- this._debounce = null;
536
- this._isMobile = false;
537
- this._listItems = [];
538
- this._inputSize = {
539
- height: 0,
540
- width: 0,
541
- };
542
- this._openedOnTop = false;
543
- this._hideDetails = false;
544
- this.itemsPerPage = undefined;
545
- this.parent = undefined;
546
- this.items = undefined;
547
- this.index = undefined;
548
- this.hostId = undefined;
549
- this.type = undefined;
550
- this.itemType = undefined;
551
- this.renderedList = null;
552
- this.isOpen = false;
553
- this.statusText = '';
554
- }
555
- optionsWatcher() {
556
- requestAnimationFrame(() => {
557
- this.renderedList = this._renderList();
558
- });
559
- }
560
- async stateWatcher(isOpen) {
561
- this.dropdownStateChange.emit(isOpen);
562
- this._scrollParent = this._scrollParent || (await getScrollParent(this.el));
563
- this._scrollParent.style.overflow = isOpen ? 'hidden' : null;
564
- }
565
- handleIndexChange(index) {
566
- requestAnimationFrame(() => {
567
- var _a;
568
- this._updateStatusText();
569
- (_a = this._listItems[index]) === null || _a === void 0 ? void 0 : _a.focus();
570
- });
571
- }
572
- async setStatusText(text) {
573
- requestAnimationFrame(() => {
574
- this.statusText = text;
575
- });
576
- }
577
- async focusItem(index) {
578
- requestAnimationFrame(() => {
579
- var _a;
580
- (_a = this._listItems[index]) === null || _a === void 0 ? void 0 : _a.focus();
581
- });
582
- }
583
- async open() {
584
- if (this._dialog.open)
585
- return;
586
- this._outsideClickFn = this._handleOutsideClick.bind(this);
587
- window.addEventListener('click', this._outsideClickFn);
588
- requestAnimationFrame(() => {
589
- this.isOpen = true;
590
- this._positionMenu();
591
- });
592
- }
593
- async close() {
594
- this._dialog.close();
595
- this.isOpen = false;
596
- this._inputElement.slot = 'default';
597
- this._inputElement.hideDetails = this._hideDetails;
598
- this._dummyElement.style.width = '0';
599
- this._dummyElement.style.display = 'none';
600
- this._dialog.style.width = '0';
601
- window.removeEventListener('click', this._outsideClickFn);
602
- }
603
- _setIsMobile() {
604
- this._isMobile = window.matchMedia('only screen and (max-width: 760px)').matches;
605
- }
606
- componentDidLoad() {
607
- this._setIsMobile();
608
- this._hideDetails = this.parent.hideDetails;
609
- this._inputElement = this.el.querySelector('c-input');
610
- this._resizeObserver = new ResizeObserver((entries) => {
611
- if (!this._dialog.open)
612
- return;
613
- requestAnimationFrame(() => {
614
- if (!Array.isArray(entries) || !entries.length)
615
- return;
616
- this._setIsMobile();
617
- this.close();
618
- });
619
- });
620
- this._resizeObserver.observe(window.document.body);
621
- requestAnimationFrame(() => {
622
- this.renderedList = this._renderList();
623
- });
624
- }
625
- async selectItem(index) {
626
- const item = this._listItems[index];
627
- if (item.classList.contains('disabled')) {
628
- return true;
629
- }
630
- this._listItems[index].click();
631
- return false;
632
- }
633
- async updateList() {
634
- requestAnimationFrame(() => {
635
- this.renderedList = this._renderList();
636
- });
637
- }
638
- _handleOutsideClick(event) {
639
- if (!this.isOpen)
640
- return;
641
- if (!event.composedPath().includes(this._dialog)) {
642
- this.close();
643
- }
644
- }
645
- _highlightMatchingText(value) {
646
- const { query } = this.parent;
647
- if (this.parent.tagName === 'C-SELECT' || query === '')
648
- return value;
649
- const regex = new RegExp(query, 'gi');
650
- const highlighted = value
651
- .replace(/(<([^>]+)>)/gi, '')
652
- .replace(regex, (match) => `<mark>${match}</mark>`);
653
- return highlighted;
654
- }
655
- _getParentPosition() {
656
- return this.parent.shadowRoot
657
- .querySelector('.c-input__slot')
658
- .getBoundingClientRect();
659
- }
660
- _positionMenu() {
661
- const { innerWidth, innerHeight } = window;
662
- this._dialog.style.width = 'auto';
663
- this._dialog.style.opacity = '0';
664
- this._dialog.showModal();
665
- requestAnimationFrame(() => {
666
- let inputSlot = 'input-top';
667
- const { top: parentTop, width } = this._getParentPosition();
668
- const inputSize = this.el.getBoundingClientRect();
669
- this._inputSize = {
670
- height: inputSize.height,
671
- width: inputSize.width,
672
- };
673
- if (!this._isMobile) {
674
- this._dialog.style.width = `${width}px`;
675
- this._dialog.style.top = `${inputSize.top}px`;
676
- this._dialog.style.bottom = 'auto';
677
- this._dialog.style.left = `${inputSize.left}px`;
678
- const { bottom, right, height } = this._dialog.getBoundingClientRect();
679
- const isInView = {
680
- x: right < innerWidth,
681
- y: bottom < innerHeight,
682
- };
683
- const fitsOnTop = parentTop - height > 0;
684
- if (!fitsOnTop && !isInView.y) {
685
- this._dialog.style.maxHeight = `${parentTop}px`;
686
- }
687
- if (!isInView.y || this._openedOnTop) {
688
- this._openedOnTop = true;
689
- this._inputElement.hideDetails = true;
690
- inputSlot = 'input-bottom';
691
- this._dialog.style.top = 'auto';
692
- this._dialog.style.bottom = `${innerHeight - inputSize.top - 44}px`;
693
- }
694
- }
695
- this._dummyElement.style.width = `${this._getParentPosition().width}px`;
696
- this._dummyElement.style.height = `${this._inputSize.height}px`;
697
- this._dummyElement.style.display = 'block';
698
- this._dummyElement.slot = 'default';
699
- this._inputElement.slot = inputSlot;
700
- this._inputElement.hideDetails = true;
701
- this._dialog.style.opacity = '1';
702
- const input = this.parent.shadowRoot.querySelector('input');
703
- input.focus();
704
- });
705
- }
706
- _emptyItem() {
707
- const { query, loading } = this.parent;
708
- if (!query || loading)
709
- return;
710
- return (h("li", null, h("c-icon", { path: mdiAlert, size: 18, color: "var(--c-warning-600)" }), "No suggestions found"));
711
- }
712
- _renderList() {
713
- return this.itemType === 'option'
714
- ? this._renderOptionsList()
715
- : this._renderItemsList();
716
- }
717
- _renderOptionsList() {
718
- if (!this.items.length)
719
- return this._emptyItem();
720
- const options = Array.from(this.items);
721
- this._listItems.length = 0;
722
- return options.map((option, index) => {
723
- const optionValue = option.querySelector('c-option-value');
724
- if (optionValue) {
725
- optionValue.innerHTML = this._highlightMatchingText(optionValue.textContent);
726
- }
727
- return (h("li", { ref: (el) => this._listItems.push(el), id: `${this.hostId}-option-${option.value}`, tabindex: "-1", role: "option", "aria-set-size": this.items.length.toString(), "aria-pos-in-set": (index + 1).toString(), "aria-selected": (!!option.selected).toString(), class: { disabled: !!option.disabled }, "data-name": option.name, onClick: (event) => {
728
- if (option.disabled) {
729
- event.preventDefault();
730
- return;
731
- }
732
- this.selectOption.emit({ name: option.name, value: option.value });
733
- }, innerHTML: option.outerHTML }));
734
- });
735
- }
736
- _renderItemsList() {
737
- if (!this.items.length)
738
- return this._emptyItem();
739
- this._listItems.length = 0;
740
- return this.items.map((item, index) => {
741
- return (h("li", { ref: (el) => this._listItems.push(el), id: `${this.hostId}-option-${item.value}`, tabindex: "-1", role: "option", "aria-set-size": this.items.length.toString(), "aria-pos-in-set": (index + 1).toString(), "aria-selected": (this.index === index).toString(), class: { disabled: !!item.disabled }, "data-name": item.name, onClick: (event) => {
742
- if (item.disabled) {
743
- event.preventDefault();
744
- return;
745
- }
746
- this.selectOption.emit({ name: item.name, value: item.value });
747
- } }, h("span", { innerHTML: this._highlightMatchingText(item.name) })));
748
- });
749
- }
750
- _updateStatusText() {
751
- if (this._debounce !== null) {
752
- clearTimeout(this._debounce);
753
- this._debounce = null;
754
- }
755
- this._debounce = window.setTimeout(() => {
756
- var _a;
757
- const selection = this._listItems[this.index];
758
- const ending = !!this.items.length
759
- ? ', to navigate use up and down arrows'
760
- : '';
761
- const total = this._listItems.length;
762
- const position = this.index + 1;
763
- const isDisabled = !!((_a = selection === null || selection === void 0 ? void 0 : selection.classList) === null || _a === void 0 ? void 0 : _a.contains('disabled'));
764
- const beginning = isDisabled ? 'Disabled option - ' : '';
765
- let selectionText = !!selection
766
- ? `${beginning}${selection.dataset.name} - ${position} of ${total} is highlighted`
767
- : null;
768
- if (this.index === null && this.type === 'autocomplete') {
769
- selectionText = this.items.length
770
- ? `${this.items.length} result${this.items.length !== 1 ? 's' : ''} available`
771
- : 'No search results available';
772
- }
773
- this.statusText = `${selectionText || ending}`;
774
- this._debounce = null;
775
- }, 1400);
776
- }
777
- render() {
778
- if (!this._isMobile &&
779
- this._dialog &&
780
- this.itemsPerPage &&
781
- this.itemsPerPage > 0 &&
782
- this.items.length > this.itemsPerPage) {
783
- this._dialog.style.maxHeight = 42 * (this.itemsPerPage + 0.5) + 60 + 'px';
784
- this._list.style.maxHeight = 42 * (this.itemsPerPage + 0.5) + 'px';
785
- }
786
- return (h(Host, null, h("slot", { name: "default" }), h("div", { class: "dummy", ref: (el) => (this._dummyElement = el) }), h("dialog", { tabindex: "-1", ref: (el) => (this._dialog = el), class: { mobile: this._isMobile }, onCancel: () => this.close() }, h("div", { id: 'announce-' + this.hostId, class: "visuallyhidden", "aria-live": "polite", "aria-atomic": "true" }, this.statusText), h("div", { class: "input-top-wrapper" }, h("slot", { name: "input-top" })), h("ul", { ref: (el) => (this._list = el), id: `${this.hostId}--results`, role: "listbox", "aria-expanded": this.isOpen.toString(), class: { active: this.isOpen, mobile: this._isMobile }, tabindex: "-1" }, this.renderedList), h("div", { class: { active: this._openedOnTop, 'input-bottom-wrapper': true } }, h("slot", { name: "input-bottom" })))));
787
- }
788
- get el() { return getElement(this); }
789
- static get watchers() { return {
790
- "items": ["optionsWatcher"],
791
- "isOpen": ["stateWatcher"],
792
- "index": ["handleIndexChange"]
793
- }; }
794
- };
795
- CDropdown.style = cDropdownCss;
796
-
797
- const cIconCss = "html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit;-webkit-tap-highlight-color:transparent}:host{font-family:var(--c-font-family)}::-ms-reveal{display:none}:host(c-icon){--_c-icon-color:var(\n --c-icon-color,\n var(--_c-icon-default-color, curentColor)\n );--_c-icon-size:var(--c-icon-size, 24px);display:inline-flex;align-items:center;height:var(--_c-icon-size);width:var(--_c-icon-size)}:host(c-icon) svg{height:var(--_c-icon-size);width:var(--_c-icon-size)}:host(c-icon) svg path{fill:var(--_c-icon-color)}";
798
-
799
- const CIcon = class {
800
- constructor(hostRef) {
801
- registerInstance(this, hostRef);
802
- this.path = undefined;
803
- this.size = 24;
804
- this.color = 'currentColor';
805
- }
806
- render() {
807
- return (h(Host, { style: {
808
- '--_c-icon-size': `${this.size}px`,
809
- '--_c-icon-default-color': this.color,
810
- } }, h("svg", { viewBox: "0 0 24 24" }, h("path", { d: this.path }))));
811
- }
812
- get host() { return getElement(this); }
813
- };
814
- CIcon.style = cIconCss;
815
-
816
- const cIconButtonCss = "html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit;-webkit-tap-highlight-color:transparent}:host{font-family:var(--c-font-family)}::-ms-reveal{display:none}:host{--_c-icon-button-background-color:var(--c-icon-button-background-color, var(--c-primary-600));--_c-icon-button-background-color-hover:var(--c-icon-button-background-color-hover, var(--c-primary-400));--_c-icon-button-badge-background-color:var(--c-icon-button-badge-background-color, var(--c-warning-600));--_c-icon-button-badge-border-color:var(--c-icon-button-badge-border-color, var(--c-white));--_c-icon-button-badge-text-color:var(--c-icon-button-badge-text-color, var(--c-white));--_c-icon-button-border-radius:var(--c-icon-button-border-radius, 50%);--_c-icon-button-outline-color:var(--c-icon-button-outline-color, var(--c-primary-600));--_c-icon-button-text-color:var(--c-icon-button-text-color, var(--c-white));--_c-icon-button-loader-color:var(--_c-icon-button-text-color);--_c-icon-button-height:40px;--_c-icon-button-width:40px;display:block;position:relative;border-radius:var(--_c-icon-button-border-radius)}:host button{background-color:transparent;color:currentColor;display:inline-grid;place-items:center;border:none;padding:0;position:relative;margin:0;width:100%;height:100%;cursor:pointer;transition:background-color 0.3s cubic-bezier(0.25, 0.8, 0.5, 1), color 0.3s cubic-bezier(0.25, 0.8, 0.5, 1);outline:none;border-radius:var(--_c-icon-button-border-radius)}:host button:disabled{cursor:default}:host c-badge{--_c-badge-background-color:var(--c-badge-background-color, var(--_c-icon-button-badge-background-color));--_c-badge-text-color:var(--c-badge-text-color, var(--_c-icon-button-badge-border-color));--_c-badge-border-color:var(--c-badge-border-color, var(--_c-icon-button-badge-text-color))}:host(.c-icon-button) button{appearance:none}:host(.c-icon-button){font-family:var(--c-font-family);display:flex;border:none;padding:0;width:var(--_c-icon-button-width);height:var(--_c-icon-button-height);background-color:var(--_c-icon-button-background-color);color:var(--_c-icon-button-text-color);transition:background-color 0.3s ease;cursor:pointer;position:relative;align-items:center;justify-content:center;backface-visibility:hidden;transform:translate3d(0, 0, 0);line-height:normal}:host(.c-icon-button) ::slotted(c-icon){--_c-icon-size:24px}:host(.c-icon-button) ::slotted(svg),:host(.c-icon-button) ::slotted(i),:host(.c-icon-button) ::slotted(span){width:24px;height:24px;font-size:24px}:host(.c-icon-button) ::slotted(*),:host(.c-icon-button) svg{display:flex;align-items:center;justify-content:center}:host(:host:hover){background-color:var(--_c-icon-button-background-color-hover)}:host(.c-icon-button--small){--_c-icon-button-height:32px;--_c-icon-button-width:32px}:host(.c-icon-button--small) ::slotted(c-icon){--_c-icon-size:20px}:host(.c-icon-button--small) ::slotted(svg),:host(.c-icon-button--small) ::slotted(i),:host(.c-icon-button--small) ::slotted(span){width:22px !important;height:22px !important;font-size:16px !important}:host(.c-icon-button--x-small){--_c-icon-button-height:28px;--_c-icon-button-width:28px}:host(.c-icon-button--x-small) ::slotted(c-icon){--_c-icon-size:14px}:host(.c-icon-button--x-small) ::slotted(svg),:host(.c-icon-button--x-small) ::slotted(i),:host(.c-icon-button--x-small) ::slotted(span){width:18px !important;height:18px !important;font-size:14px !important}:host(.c-icon-button) button:focus{outline:none}:host(.c-icon-button) button:focus-visible{outline:2px var(--_c-icon-button-outline-color) solid;outline-offset:2px}:host(.c-icon-button--inverted){--_c-icon-button-inverted-background-color:var(--c-icon-button-inverted-background-color, var(--c-white));--_c-icon-button-inverted-text-color:var(--c-icon-button-inverted-text-color, var(--c-primary-600));--_c-icon-button-inverted-background-color-hover:var(--c-icon-button-inverted-background-color-hover, var(--c-primary-200));--_c-icon-button-inverted-badge-background-color:var(--c-icon-button-inverted-badge-background-color, var(--_c-icon-button-badge-background-color));--_c-icon-button-inverted-badge-border-color:var(--c-icon-button-inverted-badge-border-color, var(--c-transparent));--_c-icon-button-inverted-badge-text-color:var(--c-icon-button-inverted-badge-text-color, var(--_c-icon-button-badge-text-color));--_c-icon-button-loader-color:var(--_c-icon-button-inverted-text-color);background-color:var(--_c-icon-button-inverted-background-color);color:var(--_c-icon-button-inverted-text-color)}:host(.c-icon-button--inverted) c-badge{--_c-badge-text-color:var(--c-badge-text-color, var(--_c-icon-button-inverted-badge-border-color));--_c-badge-background-color:var(--c-badge-background-color, var(--_c-icon-button-inverted-badge-background-color));--_c-badge-border-color:var(--c-badge-border-color, var(--_c-icon-button-inverted-badge-text-color))}:host(.c-icon-button--inverted:hover){background-color:var(--_c-icon-button-inverted-background-color-hover)}:host(.c-icon-button--inverted.c-icon-button--disabled){--_c-icon-button-inverted-background-color-disabled:var(--c-icon-button-inverted-background-color-disabled, var(--_c-icon-button-background-color-disabled));--_c-icon-button-inverted-text-color-disabled:var(--c-icon-button-inverted-text-color-disabled, var(--_c-icon-button-text-color-disabled));--_c-icon-button-inverted-outline-color-disabled:var(--c-icon-button-inverted-outline-color-disabled, var(--_c-icon-button-outline-color-disabled));--_c-icon-button-inverted-badge-background-color-disabled:var(--c-icon-button-inverted-badge-background-color-disabled, var(--c-tertiary-200));--_c-icon-button-inverted-badge-border-color-disabled:var(--c-icon-button-inverted-badge-border-color-disabled, var(--c-transparent));--_c-icon-button-inverted-badge-text-color-disabled:var(--c-icon-button-inverted-badge-text-color-disabled, var(--c-tertiary-700));--_c-icon-button-loader-color:var(--_c-icon-button-inverted-text-color-disabled);background-color:var(--_c-icon-button-inverted-background-color-disabled);color:var(--_c-icon-button-inverted-text-color-disabled);pointer-events:none}:host(.c-icon-button--inverted.c-icon-button--disabled) c-badge{--_c-badge-background-color:var(--c-badge-background-color, var(--_c-icon-button-inverted-badge-background-color-disabled));--_c-badge-text-color:var(--c-badge-text-color, var(--_c-icon-button-inverted-badge-border-color-disabled));--_c-badge-border-color:var(--c-badge-border-color, var(--_c-icon-button-inverted-badge-text-color-disabled))}:host(.c-icon-button--inverted.c-icon-button--disabled) .icon-button-badge{background:#acacac}:host(.c-icon-button--disabled){--_c-icon-button-background-color-disabled:var(--c-icon-button-background-color-disabled, var(--c-tertiary-100));--_c-icon-button-background-color-disabled-hover:var(--c-icon-button-background-color-disabled-hover, var(--c-tertiary-100));--_c-icon-button-text-color-disabled:var(--c-icon-button-text-color-disabled, var(--c-tertiary-600));--_c-icon-button-outline-color-disabled:var(--c-icon-button-outline-color-disabled, var(--c-tertiary-600));--_c-icon-button-badge-background-color-disabled:var(--c-icon-button-badge-background-color-disabled, var(--c-tertiary-600));--_c-icon-button-badge-border-color-disabled:var(--c-icon-button-badge-border-color-disabled, var(--_c-icon-button-badge-border-color));--_c-icon-button-badge-text-color-disabled:var(--c-icon-button-badge-text-color-disabled, var(--_c-icon-button-badge-text-color));--_c-icon-button-loader-color:var(--_c-icon-button-text-color-disabled);background-color:var(--_c-icon-button-background-color-disabled);color:var(--_c-icon-button-text-color-disabled);pointer-events:none}:host(.c-icon-button--disabled) c-badge{--_c-badge-background-color:var(--c-badge-background-color, var(--_c-icon-button-badge-background-color-disabled));--_c-badge-text-color:var(--c-badge-text-color, var(--_c-icon-button-badge-border-color-disabled));--_c-badge-border-color:var(--c-badge-border-color, var(--_c-icon-button-badge-text-color-disabled))}:host(.c-icon-button--danger){--_c-icon-button-danger-background-color:var(--c-icon-button-danger-background-color, var(--c-error-600));--_c-icon-button-danger-text-color:var(--c-icon-button-danger-text-color, var(--c-white));--_c-icon-button-danger-background-color-hover:var(--c-icon-button-danger-background-color-hover, var(--c-error-400));--_c-icon-button-danger-badge-background-color:var(--c-icon-button-danger-badge-background-color, var(--_c-icon-button-badge-background-color));--_c-icon-button-danger-badge-border-color:var(--c-icon-button-danger-badge-border-color, var(--_c-icon-button-badge-border-color));--_c-icon-button-danger-badge-text-color:var(--c-icon-button-danger-badge-text-color, var(--_c-icon-button-badge-text-color));--_c-icon-button-loader-color:var(--_c-icon-button-danger-text-color);background-color:var(--_c-icon-button-danger-background-color);color:var(--_c-icon-button-danger-text-color)}:host(.c-icon-button--danger) c-badge{--_c-badge-background-color:var(--c-badge-background-color, var(--_c-icon-button-danger-badge-background-color));--_c-badge-text-color:var(--c-badge-text-color, var(--_c-icon-button-danger-badge-border-color));--_c-badge-border-color:var(--c-badge-border-color, var(--_c-icon-button-danger-badge-text-color))}:host(.c-icon-button--danger:hover){background-color:var(--_c-icon-button-danger-background-color-hover)}:host(.c-icon-button--danger.c-icon-button--disabled){--_c-icon-button-danger-background-color-disabled:var(--c-icon-button-danger-background-color-disabled, var(--_c-icon-button-background-color-disabled));--_c-icon-button-danger-text-color-disabled:var(--c-icon-button-danger-text-color-disabled, var(--_c-icon-button-text-color-disabled));--_c-icon-button-danger-badge-background-color-disabled:var(--c-icon-button-danger-badge-background-color-disabled, var(--_c-icon-button-badge-background-color-disabled));--_c-icon-button-danger-badge-border-color-disabled:var(--c-icon-button-danger-badge-border-color-disabled, var(--_c-icon-button-badge-border-color-disabled));--_c-icon-button-danger-badge-text-color-disabled:var(--c-icon-button-danger-badge-text-color-disabled, var(--_c-icon-button-badge-text-color-disabled));--_c-icon-button-loader-color:var(--_c-icon-button-danger-text-color-disabled);background-color:var(--_c-icon-button-danger-background-color-disabled);color:var(--_c-icon-button-danger-text-color-disabled)}:host(.c-icon-button--danger.c-icon-button--disabled) c-badge{--_c-badge-background-color:var(--c-badge-background-color, var(--_c-icon-button-danger-badge-background-color-disabled));--_c-badge-text-color:var(--c-badge-text-color, var(--_c-icon-button-danger-badge-border-color-disabled));--_c-badge-border-color:var(--c-badge-border-color, var(--_c-icon-button-danger-badge-text-color-disabled))}:host(.c-icon-button--danger.c-icon-button--inverted){--_c-icon-button-danger-inverted-background-color:var(--_c-icon-button-inverted-background-color);--_c-icon-button-danger-inverted-text-color:var(--_c-icon-button-danger-background-color);--_c-icon-button-danger-inverted-badge-background-color:var(--_c-icon-button-inverted-badge-background-color);--_c-icon-button-danger-inverted-badge-border-color:var(--_c-icon-button-inverted-badge-border-color);--_c-icon-button-danger-inverted-badge-text-color:var(--_c-icon-button-inverted-badge-text-color);--_c-icon-button-loader-color:var(--_c-icon-button-danger-inverted-text-color);background-color:var(--_c-icon-button-danger-inverted-background-color);color:var(--_c-icon-button-danger-inverted-text-color)}:host(.c-icon-button--danger.c-icon-button--inverted) c-badge{--_c-badge-background-color:var(--c-badge-background-color, var(--_c-icon-button-danger-inverted-badge-background-color));--_c-badge-text-color:var(--c-badge-text-color, var(--_c-icon-button-danger-inverted-badge-border-color));--_c-badge-border-color:var(--c-badge-border-color, var(--_c-icon-button-danger-inverted-badge-text-color))}:host(.c-icon-button--danger.c-icon-button--inverted.c-icon-button--disabled){--_c-icon-button-danger-inverted-disabled-background-color:var(--_c-icon-button-background-color-disabled);--_c-icon-button-danger-inverted-disabled-text-color:var(--_c-icon-button-text-color-disabled);--_c-icon-button-danger-inverted-disabled-badge-background-color:var(--_c-icon-button-inverted-badge-background-color-disabled);--_c-icon-button-danger-inverted-disabled-badge-border-color:var(--_c-icon-button-inverted-badge-border-color);--_c-icon-button-danger-inverted-disabled-badge-text-color:var(--_c-icon-button-inverted-badge-text-color-disabled);--_c-icon-button-loader-color:var(--_c-icon-button-danger-inverted-disabled-text-color);background-color:var(--_c-icon-button-danger-inverted-disabled-background-color);color:var(--_c-icon-button-danger-inverted-disabled-text-color)}:host(.c-icon-button--danger.c-icon-button--inverted.c-icon-button--disabled) c-badge{--_c-badge-background-color:var(--c-badge-background-color, var(--_c-icon-button-danger-inverted-disabled-badge-background-color));--_c-badge-text-color:var(--c-badge-text-color, var(--_c-icon-button-danger-inverted-disabled-badge-border-color));--_c-badge-border-color:var(--c-badge-border-color, var(--_c-icon-button-danger-inverted-disabled-badge-text-color))}:host(.c-icon-button--ghost){--_c-icon-button-ghost-background-color:var(--c-icon-button-ghost-background-color, rgba(var(--c-primary-rgb), 0.2));--_c-icon-button-ghost-text-color:var(--c-icon-button-ghost-text-color, var(--c-primary-600));--_c-icon-button-ghost-background-color-hover:var(--c-icon-button-ghost-background-color-hover, rgba(var(--c-primary-rgb), 0.3));--_c-icon-button-ghost-badge-background-color:var(--c-icon-button-ghost-badge-background-color, var(--_c-icon-button-badge-background-color));--_c-icon-button-ghost-badge-border-color:var(--c-icon-button-ghost-badge-border-color, var(--_c-icon-button-badge-border-color));--_c-icon-button-ghost-badge-text-color:var(--c-icon-button-ghost-badge-text-color, var(--_c-icon-button-badge-text-color));--_c-icon-button-loader-color:var(--_c-icon-button-ghost-text-color);background-color:var(--_c-icon-button-ghost-background-color);color:var(--_c-icon-button-ghost-text-color)}:host(.c-icon-button--ghost) c-badge{--_c-badge-background-color:var(--c-badge-background-color, var(--_c-icon-button-badge-background-color));--_c-badge-text-color:var(--c-badge-text-color, var(--_c-icon-button-badge-border-color));--_c-badge-border-color:var(--c-badge-border-color, var(--_c-icon-button-badge-text-color))}:host(.c-icon-button--ghost:hover){background-color:var(--_c-icon-button-ghost-background-color-hover)}:host(.c-icon-button--ghost.c-icon-button--inverted){--_c-icon-button-ghost-inverted-background-color:var(--c-icon-button-ghost-inverted-background-color, rgba(var(--c-white-rgb), 0.2));--_c-icon-button-ghost-inverted-background-color-hover:var(--c-icon-button-ghost-inverted-background-color-hover, rgba(var(--c-white-rgb), 0.3));--_c-icon-button-ghost-inverted-text-color:var(--c-icon-button-ghost-inverted-text-color, var(--c-white));--_c-icon-button-ghost-inverted-badge-background-color:var(--c-icon-button-ghost-inverted-badge-background-color, var(--_c-icon-button-inverted-badge-background-color));--_c-icon-button-ghost-inverted-badge-border-color:var(--c-icon-button-ghost-inverted-badge-border-color, var(--_c-icon-button-inverted-badge-border-color));--_c-icon-button-ghost-inverted-badge-text-color:var(--c-icon-button-ghost-inverted-badge-text-color, var(--_c-icon-button-inverted-badge-text-color));--_c-icon-button-loader-color:var(--_c-icon-button-ghost-inverted-text-color);background-color:var(--_c-icon-button-ghost-inverted-background-color);color:var(--_c-icon-button-ghost-inverted-text-color)}:host(.c-icon-button--ghost.c-icon-button--inverted) c-badge{--_c-badge-background-color:var(--c-badge-background-color, var(--_c-icon-button-ghost-inverted-badge-background-color));--_c-badge-text-color:var(--c-badge-text-color, var(--_c-icon-button-ghost-inverted-badge-border-color));--_c-badge-border-color:var(--c-badge-border-color, var(--_c-icon-button-ghost-inverted-badge-text-color))}:host(.c-icon-button--ghost.c-icon-button--inverted:hover){background-color:var(--_c-icon-button-ghost-inverted-background-color-hover)}:host(.c-icon-button--ghost.c-icon-button--disabled){--_c-icon-button-ghost-disabled-background-color:var(--c-icon-button-ghost-disabled-background-color, var(--c-tertiary-200));--_c-icon-button-ghost-disabled-text-color:var(--c-icon-button-ghost-disabled-text-color, var(--c-tertiary-500));--_c-icon-button-ghost-disabled-background-color-hover:var(--c-icon-button-ghost-disabled-background-color-hover, var(--c-tertiary-100));--_c-icon-button-ghost-disabled-badge-background-color:var(--c-icon-button-ghost-disabled-badge-background-color, var(--_c-icon-button-badge-background-color-disabled));--_c-icon-button-ghost-disabled-badge-border-color:var(--c-icon-button-ghost-disabled-badge-border-color, var(--_c-icon-button-badge-border-color-disabled));--_c-icon-button-ghost-disabled-badge-text-color:var(--c-icon-button-ghost-disabled-badge-text-color, var(--_c-icon-button-badge-text-color-disabled));--_c-icon-button-loader-color:var(--_c-icon-button-ghost-disabled-text-color);background-color:var(--_c-icon-button-ghost-disabled-background-color);color:var(--_c-icon-button-ghost-disabled-text-color)}:host(.c-icon-button--ghost.c-icon-button--disabled) c-badge{--_c-badge-background-color:var(--c-badge-background-color, var(--_c-icon-button-ghost-disabled-badge-background-color));--_c-badge-text-color:var(--c-badge-text-color, var(--_c-icon-button-ghost-disabled-badge-border-color));--_c-badge-border-color:var(--c-badge-border-color, var(--_c-icon-button-ghost-disabled-badge-text-color))}:host(.c-icon-button--ghost.c-icon-button--disabled:hover){background-color:var(--_c-icon-button-ghost-disabled-background-color-hover)}:host(.c-icon-button--ghost.c-icon-button--inverted.c-icon-button--disabled){--_c-icon-button-ghost-inverted-disabled-background-color:var(--c-icon-button-ghost-inverted-disabled-background-color, rgba(var(--c-white-rgb), 0.05));--_c-icon-button-ghost-inverted-disabled-text-color:var(--c-icon-button-ghost-inverted-disabled-text-color, var(--c-tertiary-400));--_c-icon-button-ghost-inverted-disabled-badge-background-color:var(--c-icon-button-ghost-inverted-disabled-badge-background-color, var(--_c-icon-button-inverted-badge-background-color-disabled));--_c-icon-button-ghost-inverted-disabled-badge-border-color:var(--c-icon-button-ghost-inverted-disabled-badge-border-color, var(--_c-icon-button-inverted-badge-border-color));--_c-icon-button-ghost-inverted-disabled-badge-text-color:var(--c-icon-button-ghost-inverted-disabled-badge-text-color, var(--_c-icon-button-inverted-badge-text-color-disabled));--_c-icon-button-loader-color:var(--_c-icon-button-ghost-inverted-disabled-text-color);background-color:var(--_c-icon-button-ghost-inverted-disabled-background-color);color:var(--_c-icon-button-ghost-inverted-disabled-text-color)}:host(.c-icon-button--ghost.c-icon-button--inverted.c-icon-button--disabled) c-badge{--_c-badge-background-color:var(--c-badge-background-color, var(--_c-icon-button-ghost-inverted-disabled-badge-background-color));--_c-badge-text-color:var(--c-badge-text-color, var(--_c-icon-button-ghost-inverted-disabled-badge-border-color));--_c-badge-border-color:var(--c-badge-border-color, var(--_c-icon-button-ghost-inverted-disabled-badge-text-color))}:host(.c-icon-button--text){--_c-icon-button-text-text-color:var(--c-icon-button-text-text-color, var(--c-primary-600));--_c-icon-button-text-background-color:var(--c-icon-button-text-background-color, var(--c-transparent));--_c-icon-button-text-background-color-hover:var(--c-icon-button-text-background-color-hover, var(--c-primary-100));--_c-icon-button-text-badge-background-color:var(--c-icon-button-text-badge-background-color, var(--_c-icon-button-badge-background-color));--_c-icon-button-text-badge-border-color:var(--c-icon-button-text-badge-border-color, var(--_c-icon-button-badge-border-color));--_c-icon-button-text-badge-text-color:var(--c-icon-button-text-badge-text-color, var(--_c-icon-button-badge-text-color));--_c-icon-button-loader-color:var(--_c-icon-button-text-text-color);background-color:var(--_c-icon-button-text-background-color);color:var(--_c-icon-button-text-text-color)}:host(.c-icon-button--text) c-badge{--_c-badge-background-color:var(--c-badge-background-color, var(--_c-icon-button-text-badge-background-color));--_c-badge-text-color:var(--c-badge-text-color, var(--_c-icon-button-text-badge-border-color));--_c-badge-border-color:var(--c-badge-border-color, var(--_c-icon-button-text-badge-text-color))}:host(.c-icon-button--text:hover){background-color:var(--_c-icon-button-text-background-color-hover)}:host(.c-icon-button--text.c-icon-button--inverted){--_c-icon-button-text-inverted-text-color:var(--c-icon-button-text-inverted-text-color, var(--c-white));--_c-icon-button-text-inverted-background-color:var(--c-icon-button-text-inverted-background-color, var(--c-transparent));--_c-icon-button-text-inverted-background-color-hover:var(--c-icon-button-text-inverted-background-color-hover, rgba(var(--c-white-rgb), 0.2));--_c-icon-button-text-inverted-badge-background-color:var(--c-icon-button-text-inverted-badge-background-color, var(--_c-icon-button-badge-background-color));--_c-icon-button-text-inverted-badge-border-color:var(--c-icon-button-text-inverted-badge-border-color, var(--_c-icon-button-inverted-badge-border-color));--_c-icon-button-text-inverted-badge-text-color:var(--c-icon-button-text-inverted-badge-text-color, var(--_c-icon-button-badge-text-color));--_c-icon-button-loader-color:var(--_c-icon-button-text-inverted-text-color);background-color:var(--_c-icon-button-text-inverted-background-color);color:var(--_c-icon-button-text-inverted-text-color)}:host(.c-icon-button--text.c-icon-button--inverted) c-badge{--_c-badge-background-color:var(--c-badge-background-color, var(--_c-icon-button-text-inverted-badge-background-color));--_c-badge-text-color:var(--c-badge-text-color, var(--_c-icon-button-text-inverted-badge-border-color));--_c-badge-border-color:var(--c-badge-border-color, var(--_c-icon-button-text-inverted-badge-text-color))}:host(.c-icon-button--text.c-icon-button--inverted:hover){background-color:var(--_c-icon-button-text-inverted-background-color-hover)}:host(.c-icon-button--text.c-icon-button--disabled){--_c-icon-button-text-disabled-text-color:var(--c-icon-button-text-disabled-text-color, var(--c-tertiary-400));--_c-icon-button-text-disabled-background-color:var(--c-icon-button-text-disabled-background-color, var(--c-transparent));--_c-icon-button-text-disabled-badge-background-color:var(--c-icon-button-text-disabled-badge-background-color, var(--_c-icon-button-badge-background-color-disabled));--_c-icon-button-text-disabled-badge-border-color:var(--c-icon-button-text-disabled-badge-border-color, var(--_c-icon-button-badge-border-color-disabled));--_c-icon-button-text-disabled-badge-text-color:var(--c-icon-button-text-disabled-badge-text-color, var(--_c-icon-button-badge-text-color-disabled));--_c-icon-button-loader-color:var(--_c-icon-button-text-disabled-text-color);background-color:var(--_c-icon-button-text-disabled-background-color);color:var(--_c-icon-button-text-disabled-text-color)}:host(.c-icon-button--text.c-icon-button--disabled) c-badge{--_c-badge-background-color:var(--c-badge-background-color, var(--_c-icon-button-text-disabled-badge-background-color));--_c-badge-text-color:var(--c-badge-text-color, var(--_c-icon-button-text-disabled-badge-border-color));--_c-badge-border-color:var(--c-badge-border-color, var(--_c-icon-button-text-disabled-badge-text-color))}:host(.c-icon-button--text.c-icon-button--inverted.c-icon-button--disabled){--_c-icon-button-text-inverted-disabled-text-color:var(--c-icon-button-text-inverted-disabled-text-color, var(--c-tertiary-400));--_c-icon-button-text-inverted-disabled-background-color:var(--c-icon-button-text-inverted-disabled-background-color, var(--c-transparent));--_c-icon-button-text-inverted-disabled-badge-background-color:var(--c-icon-button-text-inverted-disabled-badge-background-color, var(--_c-icon-button-inverted-badge-background-color-disabled));--_c-icon-button-text-inverted-disabled-badge-border-color:var(--c-icon-button-text-inverted-disabled-badge-border-color, var(--_c-icon-button-inverted-badge-border-color-disabled));--_c-icon-button-text-inverted-disabled-badge-text-color:var(--c-icon-button-text-inverted-disabled-badge-text-color, var(--_c-icon-button-inverted-badge-text-color-disabled));--_c-icon-button-loader-color:var(--_c-icon-button-text-inverted-disabled-text-color);background-color:var(--_c-icon-button-text-inverted-disabled-background-color);color:var(--_c-icon-button-text-inverted-disabled-text-color)}:host(.c-icon-button--text.c-icon-button--inverted.c-icon-button--disabled) c-badge{--_c-badge-background-color:var(--c-badge-background-color, var(--_c-icon-button-text-inverted-disabled-badge-background-color));--_c-badge-text-color:var(--c-badge-text-color, var(--_c-icon-button-text-inverted-disabled-badge-border-color));--_c-badge-border-color:var(--c-badge-border-color, var(--_c-icon-button-text-inverted-disabled-badge-text-color))}:host(.c-icon-button--outlined){--_c-icon-button-outlined-text-color:var(--c-icon-button-outlined-text-color, var(--c-primary-600));--_c-icon-button-outlined-background-color:var(--c-icon-button-outlined-background-color, var(--c-transparent));--_c-icon-button-outlined-background-color-hover:var(--c-icon-button-outlined-background-color-hover, rgba(var(--c-primary-rgb), 0.1));--_c-icon-button-outlined-border-color:var(--c-icon-button-outlined-border-color, var(--_c-icon-button-outlined-text-color));--_c-icon-button-outlined-badge-background-color:var(--c-icon-button-outlined-badge-background-color, var(--_c-icon-button-badge-background-color));--_c-icon-button-outlined-badge-border-color:var(--c-icon-button-outlined-badge-border-color, var(--_c-icon-button-badge-border-color));--_c-icon-button-outlined-badge-text-color:var(--c-icon-button-outlined-badge-text-color, var(--_c-icon-button-badge-text-color));--_c-icon-button-loader-color:var(--_c-icon-button-outlined-text-color);background-color:var(--_c-icon-button-outlined-background-color);box-shadow:inset 0 0 0 2px var(--_c-icon-button-outlined-border-color);color:var(--_c-icon-button-outlined-text-color)}:host(.c-icon-button--outlined) c-badge{--_c-badge-background-color:var(--c-badge-background-color, var(--_c-icon-button-outlined-badge-background-color));--_c-badge-text-color:var(--c-badge-text-color, var(--_c-icon-button-outlined-badge-border-color));--_c-badge-border-color:var(--c-badge-border-color, var(--_c-icon-button-outlined-badge-text-color))}:host(.c-icon-button--outlined:hover){background-color:var(--_c-icon-button-outlined-background-color-hover)}:host(.c-icon-button--outlined.c-icon-button--disabled){--_c-icon-button-outlined-disabled-text-color:var(--c-icon-button-outlined-disabled-text-color, var(--c-tertiary-500));--_c-icon-button-outlined-disabled-background-color:var(--c-icon-button-outlined-disabled-background-color, var(--c-transparent));--_c-icon-button-outlined-disabled-border-color:var(--c-icon-button-outlined-disabled-border-color, var(--c-tertiary-400));--_c-icon-button-outlined-disabled-badge-background-color:var(--c-icon-button-outlined-disabled-badge-background-color, var(--_c-icon-button-badge-background-color-disabled));--_c-icon-button-outlined-disabled-badge-border-color:var(--c-icon-button-outlined-disabled-badge-border-color, var(--_c-icon-button-badge-border-color-disabled));--_c-icon-button-outlined-disabled-badge-text-color:var(--c-icon-button-outlined-disabled-badge-text-color, var(--_c-icon-button-badge-text-color-disabled));--_c-icon-button-loader-color:var(--_c-icon-button-outlined-disabled-text-color);background-color:var(--_c-icon-button-outlined-disabled-background-color);box-shadow:inset 0 0 0 2px var(--_c-icon-button-outlined-disabled-border-color);color:var(--_c-icon-button-outlined-disabled-text-color)}:host(.c-icon-button--outlined.c-icon-button--disabled) c-badge{--_c-badge-background-color:var(--c-badge-background-color, var(--_c-icon-button-outlined-disabled-badge-background-color));--_c-badge-text-color:var(--c-badge-text-color, var(--_c-icon-button-outlined-disabled-badge-border-color));--_c-badge-border-color:var(--c-badge-border-color, var(--_c-icon-button-outlined-disabled-badge-text-color))}:host(.c-icon-button--outlined.c-icon-button--inverted){--_c-icon-button-outlined-inverted-text-color:var(--c-icon-button-outlined-inverted-text-color, var(--c-white));--_c-icon-button-outlined-inverted-background-color:var(--c-icon-button-outlined-inverted-background-color, var(--c-transparent));--_c-icon-button-outlined-inverted-background-color-hover:var(--c-icon-button-outlined-inverted-background-color-hover, rgba(var(--c-white-rgb), 0.2));--_c-icon-button-outlined-inverted-border-color:var(--c-icon-button-outlined-inverted-border-color, var(--_c-icon-button-outlined-inverted-text-color));--_c-icon-button-outlined-inverted-badge-background-color:var(--c-icon-button-outlined-inverted-badge-background-color, var(--_c-icon-button-inverted-badge-background-color));--_c-icon-button-outlined-inverted-badge-border-color:var(--c-icon-button-outlined-inverted-badge-border-color, var(--_c-icon-button-inverted-badge-border-color));--_c-icon-button-outlined-inverted-badge-text-color:var(--c-icon-button-outlined-inverted-badge-text-color, var(--_c-icon-button-inverted-badge-text-color));--_c-icon-button-loader-color:var(--_c-icon-button-outlined-inverted-text-color);background-color:var(--_c-icon-button-outlined-inverted-background-color);box-shadow:inset 0 0 0 2px var(--_c-icon-button-outlined-inverted-border-color);color:var(--_c-icon-button-outlined-inverted-text-color)}:host(.c-icon-button--outlined.c-icon-button--inverted) c-badge{--_c-badge-background-color:var(--c-badge-background-color, var(--_c-icon-button-outlined-inverted-badge-background-color));--_c-badge-text-color:var(--c-badge-text-color, var(--_c-icon-button-outlined-inverted-badge-border-color));--_c-badge-border-color:var(--c-badge-border-color, var(--_c-icon-button-outlined-inverted-badge-text-color))}:host(.c-icon-button--outlined.c-icon-button--inverted:hover){background-color:var(--_c-icon-button-outlined-inverted-background-color-hover)}:host(.c-icon-button--outlined.c-icon-button--inverted.c-icon-button--disabled){--_c-icon-button-outlined-inverted-disabled-text-color:var(--c-icon-button-outlined-inverted-disabled-text-color, var(--c-tertiary-400));--_c-icon-button-outlined-inverted-disabled-background-color:var(--c-icon-button-outlined-inverted-disabled-background-color, var(--c-transparent));--_c-icon-button-outlined-inverted-disabled-border-color:var(--c-icon-button-outlined-inverted-disabled-border-color, var(--c-tertiary-500));--_c-icon-button-outlined-inverted-disabled-badge-background-color:var(--c-icon-button-outlined-inverted-disabled-badge-background-color, var(--_c-icon-button-inverted-badge-background-color-disabled));--_c-icon-button-outlined-inverted-disabled-badge-border-color:var(--c-icon-button-outlined-inverted-disabled-badge-border-color, var(--_c-icon-button-inverted-badge-border-color-disabled));--_c-icon-button-outlined-inverted-disabled-badge-text-color:var(--c-icon-button-outlined-inverted-disabled-badge-text-color, var(--_c-icon-button-inverted-badge-text-color-disabled));--_c-icon-button-loader-color:var(--_c-icon-button-outlined-iverted-disabled-text-color);background-color:var(--_c-icon-button-outlined-inverted-disabled-background-color);box-shadow:inset 0 0 0 2px var(--_c-icon-button-outlined-inverted-disabled-border-color);color:var(--_c-icon-button-outlined-inverted-disabled-text-color)}:host(.c-icon-button--outlined.c-icon-button--inverted.c-icon-button--disabled) c-badge{--_c-badge-background-color:var(--c-badge-background-color, var(--_c-icon-button-outlined-inverted-disabled-badge-background-color));--_c-badge-text-color:var(--c-badge-text-color, var(--_c-icon-button-outlined-inverted-disabled-badge-border-color));--_c-badge-border-color:var(--c-badge-border-color, var(--_c-icon-button-outlined-inverted-disabled-badge-text-color))}::slotted(*),svg{pointer-events:none}.inner-container{align-items:center;display:flex;height:100%;inset:0;justify-content:center;overflow:hidden;position:relative;transform:translateZ(0);width:100%}";
817
-
818
- const CIconButton = class {
819
- constructor(hostRef) {
820
- registerInstance(this, hostRef);
821
- this._onClick = (event) => {
822
- this._rippleElement.createRipple(event, this._container);
823
- };
824
- this.badge = undefined;
825
- this.danger = false;
826
- this.loading = false;
827
- this.text = false;
828
- this.inverted = false;
829
- this.outlined = false;
830
- this.path = null;
831
- this.ghost = false;
832
- this.disabled = false;
833
- this.size = 'default';
834
- }
835
- _renderBadge() {
836
- return h("c-badge", null, this.badge);
837
- }
838
- _hostClasses() {
839
- return {
840
- 'c-icon-button': true,
841
- 'c-icon-button--disabled': !!this.disabled,
842
- 'c-icon-button--danger': !!this.danger,
843
- 'c-icon-button--text': !!this.text,
844
- 'c-icon-button--ghost': !!this.ghost,
845
- 'c-icon-button--outlined': !!this.outlined,
846
- 'c-icon-button--inverted': !!this.inverted,
847
- 'c-icon-button--small': this.size === 'small',
848
- 'c-icon-button--x-small': this.size === 'x-small',
849
- };
850
- }
851
- render() {
852
- const spinnerSizes = {
853
- 'x-small': 18,
854
- small: 20,
855
- default: 24,
856
- };
857
- return (h(Host, { class: this._hostClasses() }, h("button", { disabled: this.disabled, onClick: this._onClick }, h("div", { class: "inner-container", ref: (el) => (this._container = el) }, this.loading && (h("c-spinner", { color: "var(--_c-icon-button-loader-color)", size: spinnerSizes[this.size] })), !this.loading && (h("slot", null, this.path && (h("svg", { width: "24", height: "24", viewBox: "0 0 24 24" }, h("path", { d: this.path })))))), this.badge && this._renderBadge(), h("c-ripple", { ref: (el) => (this._rippleElement = el) }))));
858
- }
859
- };
860
- CIconButton.style = cIconButtonCss;
861
-
862
- const cInputCss = "html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit;-webkit-tap-highlight-color:transparent}:host{font-family:var(--c-font-family)}::-ms-reveal{display:none}:host(c-input){--_c-input-inactive-color:var(--c-tertiary-600);--_c-input-active-color:var(--c-primary-600);--_c-input-background-color:var(--c-transparent);--_c-input-text-color:var(--c-text-body);--_c-input-placeholder-color:var(--c-tertiary-500);--_c-input-shadow-active-color:var(--_c-input-active-color);--_c-input-shadow-background-color:var(--c-white);--_c-input-shadow-text-color:var(--_c-input-text-color);--_c-input-shadow-placeholder-color:var(--_c-input-placeholder-color);--_c-input-error-color:var(--c-error-600)}.visuallyhidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.c-input{--_c-input-border-width:1px;align-items:flex-start;border-radius:4px;display:flex;flex:1 1 auto;font-family:var(--c-font-family);font-size:16px;letter-spacing:normal;max-width:100%;text-align:left}.c-input input,.c-input select,.c-input textarea{background:none;border:0;display:inline-block;font-family:var(--c-font-family);font-size:16px;line-height:1;margin:0;padding:0;vertical-align:middle;white-space:normal}.c-input input,.c-input textarea{box-sizing:content-box;background-color:transparent;border:none;color:var(--_c-input-text-color);flex:1 1 auto;font-family:var(--c-font-family);font-size:16px;line-height:20px;max-width:100%;min-width:0;width:100%}.c-input input[type=checkbox],.c-input input[type=radio],.c-input select{box-sizing:border-box}.c-input input[type=search]{appearance:textfield;box-sizing:content-box}.c-input ::-webkit-search-decoration{display:none}.c-input textarea{margin-top:4px;min-height:44px;overflow:auto;padding:8px 12px 8px 0;resize:vertical;vertical-align:top}.c-input input{max-height:32px;padding:8px 0}.c-input input:focus,.c-input input:active,.c-input input[aria-expanded=true],.c-input textarea:focus,.c-input textarea:active{outline:none}.c-input .c-input__content{align-items:center;display:flex;width:100%}.c-input .c-input__content slot{display:none}.c-input .c-input__content c-icon-button{aspect-ratio:1;margin-right:-6px}.c-input__control{border-radius:inherit;color:currentColor;display:flex;flex-flow:column wrap;flex-grow:1;gap:8px;height:auto;min-width:0;width:100%;position:relative}.c-input__slot{align-items:stretch;background:transparent;border-radius:inherit;color:inherit;cursor:text;display:flex;min-height:44px;padding:0 12px;position:relative;transition:0.3s cubic-bezier(0.25, 0.8, 0.5, 1);width:100%}.c-input__field{align-items:center;display:flex;flex:1 1 auto;gap:8px;position:relative}.c-input__field input,.c-input__field textarea{flex:1;outline:0}.c-input__field label{font-size:16px;height:20px;left:0;letter-spacing:normal;line-height:20px;max-width:90%;min-height:8px;overflow:hidden;pointer-events:none;position:absolute;right:auto;text-overflow:ellipsis;top:12px;transform-origin:top left;transform:translateX(var(--_c-input-label-position)) translateY(0) scale(1);transition:0.3s cubic-bezier(0.25, 0.8, 0.5, 1) 0.08s;white-space:nowrap}.c-input__field label.active{transform:translateY(-18px) scale(0.75)}.c-input__field label span{color:var(--c-error-600)}.c-input--select input{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.c-input--select .c-input__slot{cursor:pointer}.c-input fieldset{background-color:var(--_c-input-background-color);border-collapse:collapse;border-color:var(--_c-input-inactive-color);border-radius:inherit;border-style:solid;border-width:var(--_c-input-border-width);inset:0;margin:0;padding:0 0 0 8px;pointer-events:none;position:absolute;transition-duration:0.15s;transition-property:color;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1)}.c-input fieldset legend{float:none;line-height:11px;margin-left:-1px;padding:0;text-align:left;transition:width 0.3s cubic-bezier(0.25, 0.8, 0.5, 1);width:0}.c-input fieldset legend.active{width:var(--_c-input-legend-width)}.c-input--shadow .c-input__slot{background-color:var(--_c-input-shadow-background-color);box-shadow:rgba(0, 0, 0, 0.15) 0 5px 15px 0}.c-input--shadow .c-input__slot input,.c-input--shadow .c-input__slot textarea{color:var(--_c-input-shadow-text-color)}.c-input--shadow .c-input__slot:focus-within{outline:2px var(--_c-input-active-color) solid}.c-input--shadow .c-input__slot:focus-within c-icon{--c-icon-color:var(--_c-input-shadow-active-color) !important}.c-input--shadow input::placeholder,.c-input--shadow textarea::placeholder{color:var(--_c-input-shadow-placeholder-color);opacity:1}.c-input--disabled input,.c-input--disabled textarea,.c-input--disabled fieldset,.c-input--disabled label{--_c-input-error-color:var(--c-tertiary-500);color:var(--c-tertiary-500)}.c-input--textarea .c-input__field{margin-right:-12px}.c-input ::placeholder{color:var(--_c-input-placeholder-color);opacity:1}.c-input:focus-within,.c-input--active,.c-input:not(.c-input--disabled):active{--_c-input-border-width:2px;color:var(--_c-input-active-color)}.c-input:focus-within fieldset,.c-input--active fieldset,.c-input:not(.c-input--disabled):active fieldset{border-color:var(--_c-input-active-color)}.c-input:focus-within label,.c-input--active label,.c-input:not(.c-input--disabled):active label{color:var(--_c-input-active-color);transform:translateX(0) translateY(-18px) scale(0.75)}.c-input:focus-within legend,.c-input--active legend,.c-input:not(.c-input--disabled):active legend{width:var(--_c-input-legend-width)}.c-input.active:not(.filled) .c-input-menu__input{position:relative}.c-input.active:not(.filled) .c-input-menu__input::after{display:flex;align-items:center;position:absolute;inset:0;content:attr(data-placeholder);pointer-events:none;color:var(--_c-input-placeholder-color)}.c-input--error{color:var(--c-error-600)}.c-input--error fieldset{border-color:var(--c-error-600) !important}.c-input--error label{color:var(--c-error-600) !important}.c-input--error:focus-within{color:var(--c-error-600)}";
863
-
864
- const CInput = class {
865
- constructor(hostRef) {
866
- registerInstance(this, hostRef);
867
- this.changeValue = createEvent(this, "changeValue", 3);
868
- this.itemClick = createEvent(this, "itemClick", 3);
869
- this.dropdownClose = createEvent(this, "dropdownClose", 3);
870
- this._hasBlurred = false;
871
- this._debounce = null;
872
- this._observer = new IntersectionObserver((entries, observer) => {
873
- entries.forEach((entry) => {
874
- if (entry.isIntersecting) {
875
- this._calculateElementWidths();
876
- observer.unobserve(entry.target);
877
- }
878
- });
879
- }, { threshold: 1 });
880
- this._onBlur = () => {
881
- setTimeout(() => {
882
- if (!this.active) {
883
- this.isFocused = false;
884
- this._hasBlurred = true;
885
- }
886
- this._onReset();
887
- }, 100);
888
- };
889
- this._onFocus = (click = true) => {
890
- var _a, _b;
891
- if (this.disabled)
892
- return;
893
- this.isFocused = true;
894
- (_a = this.inputField) === null || _a === void 0 ? void 0 : _a.focus();
895
- if (click) {
896
- (_b = this.inputField) === null || _b === void 0 ? void 0 : _b.click();
897
- if (this.variant === 'select') {
898
- this.itemClick.emit();
899
- }
900
- }
901
- if (this.inputField) {
902
- this.inputField.placeholder =
903
- !!this.value || !this.placeholder ? '' : this.placeholder;
904
- }
905
- };
906
- this.active = false;
907
- this.autofocus = false;
908
- this.disabled = false;
909
- this.form = false;
910
- this.hideDetails = false;
911
- this.hint = '';
912
- this.hostId = undefined;
913
- this.inputId = undefined;
914
- this.items = undefined;
915
- this.itemsPerPage = 6;
916
- this.label = undefined;
917
- this.max = null;
918
- this.min = null;
919
- this.name = undefined;
920
- this.placeholder = undefined;
921
- this.readonly = false;
922
- this.required = false;
923
- this.rows = 1;
924
- this.shadow = false;
925
- this.step = null;
926
- this.type = undefined;
927
- this.valid = true;
928
- this.validate = false;
929
- this.validateOnBlur = false;
930
- this.validation = 'Required field';
931
- this.value = undefined;
932
- this.variant = 'text';
933
- this.isFocused = false;
934
- this.labelWidth = 0;
935
- this.preSlotWidth = 0;
936
- this.statusText = '';
937
- this.currentIndex = null;
938
- }
939
- onValidChange() {
940
- if (this.validateOnBlur && !this._hasBlurred)
941
- return;
942
- this._setAriaDescriptionId();
943
- }
944
- onValidationMessageChange() {
945
- this._updateStatusText();
946
- }
947
- onValueChange(value) {
948
- if (!value) {
949
- this._onReset();
950
- }
951
- }
952
- onPlaceholderChange(placeholder) {
953
- if (placeholder)
954
- this._onReset();
955
- }
956
- async reset() {
957
- this._onReset();
958
- }
959
- componentDidLoad() {
960
- var _a, _b, _c, _d;
961
- if (this.autofocus) {
962
- setTimeout(() => {
963
- this._onFocus(false);
964
- }, 500);
965
- }
966
- this._calculateElementWidths();
967
- this._setAriaDescriptionId();
968
- if (this.label) {
969
- this._observer.observe(this._labelRef);
970
- }
971
- (_a = this.inputField) === null || _a === void 0 ? void 0 : _a.addEventListener('focus', () => this._onFocus(false));
972
- (_b = this.inputField) === null || _b === void 0 ? void 0 : _b.addEventListener('blur', () => this._onBlur());
973
- (_c = this.inputField) === null || _c === void 0 ? void 0 : _c.addEventListener('keypress', this._preventNonNumericalInput);
974
- if (this.inputField) {
975
- this.inputField.placeholder =
976
- !!this.label || !this.placeholder ? '' : this.placeholder;
977
- this.inputField.title = (_d = this.label) !== null && _d !== void 0 ? _d : this.placeholder;
978
- requestAnimationFrame(() => {
979
- const container = this.inputField.closest('.c-input-menu__input');
980
- if (!container)
981
- return;
982
- container.dataset.placeholder = this.placeholder;
983
- });
984
- }
985
- }
986
- disconnectedCallback() {
987
- var _a, _b, _c, _d;
988
- (_a = this.inputField) === null || _a === void 0 ? void 0 : _a.removeEventListener('focus', () => this._onFocus(false));
989
- (_b = this.inputField) === null || _b === void 0 ? void 0 : _b.removeEventListener('blur', () => this._onBlur());
990
- (_c = this.inputField) === null || _c === void 0 ? void 0 : _c.removeEventListener('keypress', this._preventNonNumericalInput);
991
- this._observer.disconnect();
992
- (_d = this._dropdownElement) === null || _d === void 0 ? void 0 : _d.remove();
993
- }
994
- get isActive() {
995
- return !!this.value || typeof this.value === 'boolean' || this.isFocused;
996
- }
997
- _setAriaDescriptionId() {
998
- this.inputField.removeAttribute('aria-describedby');
999
- let type = null;
1000
- if (this.valid && !this.value && this.hint) {
1001
- type = 'hint';
1002
- }
1003
- if (!this.valid) {
1004
- type = 'error';
1005
- }
1006
- if (type) {
1007
- this.inputField.setAttribute('aria-describedby', `${type}-${this.inputId}`);
1008
- }
1009
- }
1010
- _calculateElementWidths() {
1011
- this.labelWidth = !!this.label ? this._labelRef.scrollWidth * 0.75 + 6 : 0;
1012
- this.preSlotWidth = this.inputField.offsetLeft;
1013
- }
1014
- _onReset() {
1015
- if (this.inputField) {
1016
- if (!!this.placeholder &&
1017
- !this.value &&
1018
- (this.active || this.isFocused)) {
1019
- this.inputField.placeholder = this.placeholder;
1020
- return;
1021
- }
1022
- this.inputField.placeholder =
1023
- !this.label && !this.value && !!this.placeholder
1024
- ? this.placeholder
1025
- : '';
1026
- }
1027
- }
1028
- _preventNonNumericalInput(event) {
1029
- if (this.type !== 'number')
1030
- return;
1031
- if (!event.key.match(/^[0-9,\.]+$/))
1032
- event.preventDefault();
1033
- }
1034
- _renderBorders() {
1035
- if (this.shadow)
1036
- return;
1037
- const classes = {
1038
- active: this.isActive || this.active,
1039
- };
1040
- return (h("fieldset", { "aria-hidden": "true" }, h("legend", { class: classes, style: {
1041
- '--_c-input-legend-width': this.labelWidth + 'px',
1042
- } }, h("span", { class: "notranslate" }))));
1043
- }
1044
- _renderLabel() {
1045
- if (!this.label)
1046
- return;
1047
- const classes = {
1048
- active: this.isActive,
1049
- };
1050
- return (h("label", { htmlFor: this.inputId, ref: (el) => (this._labelRef = el), class: classes }, this.label, this.required && h("span", null, "\u00A0*")));
1051
- }
1052
- get inputField() {
1053
- var _a;
1054
- return (_a = this.el) === null || _a === void 0 ? void 0 : _a.querySelector('.c-input__input');
1055
- }
1056
- _updateStatusText() {
1057
- if (this._debounce !== null) {
1058
- clearTimeout(this._debounce);
1059
- this._debounce = null;
1060
- }
1061
- this._debounce = window.setTimeout(() => {
1062
- this.statusText = this.valid ? '' : `Error: ${this.validation}`;
1063
- this._debounce = null;
1064
- }, 1400);
1065
- }
1066
- render() {
1067
- const containerClasses = {
1068
- 'c-input': true,
1069
- 'c-input--disabled': this.disabled,
1070
- 'c-input--shadow': this.shadow,
1071
- 'c-input--textarea': this.rows > 1,
1072
- 'c-input--error': !this.valid,
1073
- 'c-input--active': this.isFocused || this.active,
1074
- filled: !!this.value,
1075
- [`c-input--${this.variant}`]: true,
1076
- };
1077
- return (h(Host, { disabled: this.disabled }, h("div", { id: 'announce-' + this.inputId, class: "visuallyhidden", "aria-live": "polite", "aria-atomic": "true" }, this.statusText), h("div", { class: containerClasses }, h("div", { class: "c-input__control" }, h("div", { class: "c-input__slot", onClick: () => this._onFocus() }, this._renderBorders(), h("div", { class: "c-input__field", style: {
1078
- '--_c-input-label-position': this.preSlotWidth + 'px',
1079
- } }, h("slot", { name: "pre" }), this._renderLabel(), h("slot", null))), this.variant === 'select' && h("slot", { name: "dropdown" }), !this.hideDetails && (h("c-message", { hint: this.hint, inputId: this.inputId, valid: this.valid, validation: this.validation }))))));
1080
- }
1081
- get el() { return getElement(this); }
1082
- static get watchers() { return {
1083
- "valid": ["onValidChange"],
1084
- "validation": ["onValidationMessageChange"],
1085
- "value": ["onValueChange"],
1086
- "placeholder": ["onPlaceholderChange"]
1087
- }; }
1088
- };
1089
- CInput.style = cInputCss;
1090
-
1091
- const cMessageCss = "html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit;-webkit-tap-highlight-color:transparent}:host{font-family:var(--c-font-family)}::-ms-reveal{display:none}:host{--_c-message-error-color:var(--c-error-600);--_c-message-hint-color:var(--c-text-system);display:block;line-height:1;padding:0 12px}.c-message--active .c-message-item{opacity:1;transform:translateY(0)}.c-message-item{font-size:12px;min-height:16px;opacity:0;transform:translateY(-4px);transition:all 0.2s cubic-bezier(0.25, 0.8, 0.5, 1)}.c-message-item--hint{color:var(--_c-message-hint-color)}.c-message-item--error{color:var(--_c-message-error-color)}.c-message-item span{align-items:flex-start;color:currentColor;display:flex;gap:4px;min-height:16px}.c-message-item svg{fill:currentColor;height:16px;width:16px;position:relative;top:-2px}.c-message .visuallyhidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}";
1092
-
1093
- const CMessage = class {
1094
- constructor(hostRef) {
1095
- registerInstance(this, hostRef);
1096
- this._validationIcon = (h("svg", { height: "16px", width: "16px", viewBox: "0 0 24 24" }, h("path", { d: mdiCloseCircle })));
1097
- this.hint = '';
1098
- this.inputId = undefined;
1099
- this.valid = true;
1100
- this.validation = 'Required field';
1101
- this.messageOptions = {
1102
- show: true,
1103
- type: 'hint',
1104
- content: '',
1105
- };
1106
- }
1107
- onValidChange(valid) {
1108
- this._handleValidation(valid);
1109
- }
1110
- onValidationMessageChange(message) {
1111
- if (this.valid || !message)
1112
- return;
1113
- this.messageOptions = Object.assign(Object.assign({}, this.messageOptions), { content: (h("span", null, h("span", { class: "visuallyhidden" }, "Error: "), this._validationIcon, " ", message)) });
1114
- }
1115
- onHintMessageChange(message) {
1116
- if (!this.valid || !message)
1117
- return;
1118
- this.messageOptions = Object.assign(Object.assign({}, this.messageOptions), { content: (h("span", null, h("span", { class: "visuallyhidden" }, "Hint: "), message)) });
1119
- }
1120
- _handleValidation(valid, timeout = 200) {
1121
- this.messageOptions = Object.assign(Object.assign({}, this.messageOptions), { show: false });
1122
- setTimeout(() => {
1123
- this.messageOptions = Object.assign(Object.assign({}, this.messageOptions), { type: valid ? 'hint' : 'error', show: true, content: valid ? (h("span", { id: `hint-${this.inputId}` }, h("span", { class: "visuallyhidden" }, "Hint: "), this.hint)) : (h("span", { id: `error-${this.inputId}` }, this._validationIcon, h("span", { class: "visuallyhidden" }, "Error: "), this.validation)) });
1124
- }, timeout);
1125
- }
1126
- componentDidLoad() {
1127
- this._handleValidation(this.valid, 0);
1128
- }
1129
- render() {
1130
- const classes = {
1131
- 'c-message': true,
1132
- 'c-message--active': this.messageOptions.show,
1133
- };
1134
- const messageClasses = {
1135
- 'c-message-item': true,
1136
- [`c-message-item--${this.messageOptions.type}`]: true,
1137
- };
1138
- return (h(Host, null, h("div", { class: classes }, h("div", { class: messageClasses }, this.messageOptions.content))));
1139
- }
1140
- static get watchers() { return {
1141
- "valid": ["onValidChange"],
1142
- "validation": ["onValidationMessageChange"],
1143
- "hint": ["onHintMessageChange"]
1144
- }; }
1145
- };
1146
- CMessage.style = cMessageCss;
1147
-
1148
- const cOptionCss = "html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit;-webkit-tap-highlight-color:transparent}:host{font-family:var(--c-font-family)}::-ms-reveal{display:none}:host{display:block;width:100%;padding:8px 0}";
1149
-
1150
- const COption = class {
1151
- constructor(hostRef) {
1152
- registerInstance(this, hostRef);
1153
- this.selected = false;
1154
- this.disabled = false;
1155
- this.name = undefined;
1156
- this.value = undefined;
1157
- }
1158
- render() {
1159
- return (h(Host, { tabindex: "-1" }, h("slot", null)));
1160
- }
1161
- };
1162
- COption.style = cOptionCss;
1163
-
1164
- const cRippleCss = "html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit;-webkit-tap-highlight-color:transparent}:host{font-family:var(--c-font-family)}::-ms-reveal{display:none}:host{pointer-events:none;user-select:none;display:block;overflow:hidden;position:absolute;top:0;left:0;border-radius:inherit;z-index:1}.c-ripple{position:absolute;pointer-events:none;border-radius:50%;transform:scale(0);background:currentColor;opacity:0}.c-ripple.animate{animation:ripple 0.5s backwards linear;opacity:0.3}@keyframes ripple{100%{opacity:0;transform:scale(5)}}";
1165
-
1166
- const CRipple = class {
1167
- constructor(hostRef) {
1168
- registerInstance(this, hostRef);
1169
- }
1170
- async createRipple(event, parent, center = false) {
1171
- this._rippleElement.classList.remove('animate');
1172
- const width = parent.offsetWidth;
1173
- const height = parent.offsetHeight;
1174
- const rect = event.target.getBoundingClientRect();
1175
- const maxDimension = this._calculateHeight(Math.max(parent.offsetWidth, parent.offsetHeight));
1176
- const x = event.clientX - rect.left;
1177
- const y = event.clientY - rect.top;
1178
- const top = y - maxDimension / 2 + 'px';
1179
- const left = x - maxDimension / 2 + 'px';
1180
- const centerPosition = {
1181
- top: maxDimension === height
1182
- ? '0px'
1183
- : ((maxDimension - height) / 2) * -1 + 'px',
1184
- left: maxDimension === width
1185
- ? '0px'
1186
- : ((maxDimension - width) / 2) * -1 + 'px',
1187
- };
1188
- this.el.style.width = width + 'px';
1189
- this.el.style.height = height + 'px';
1190
- this._rippleElement.style.width = maxDimension + 'px';
1191
- this._rippleElement.style.height = maxDimension + 'px';
1192
- this._rippleElement.style.top = center ? centerPosition.top : top;
1193
- this._rippleElement.style.left = center ? centerPosition.left : left;
1194
- this._rippleElement.classList.add('animate');
1195
- setTimeout(() => {
1196
- this._rippleElement.classList.remove('animate');
1197
- }, 500);
1198
- }
1199
- _calculateHeight(height) {
1200
- const radius = (height / 2) * Math.sqrt(2);
1201
- return radius * 2;
1202
- }
1203
- render() {
1204
- return (h(Host, { "aria-hidden": "true" }, h("div", { ref: (el) => (this._rippleElement = el), class: "c-ripple" })));
1205
- }
1206
- get el() { return getElement(this); }
1207
- };
1208
- CRipple.style = cRippleCss;
1209
-
1210
- const cSelectCss = "html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit;-webkit-tap-highlight-color:transparent}:host{font-family:var(--c-font-family)}::-ms-reveal{display:none}:host{--_c-select-active-color:var(--c-select-active-color, var(--c-primary-600));--_c-select-inactive-color:var(--c-select-inactive-color, var(--c-tertiary-600));--_c-select-background-color:var(--c-select-background-color, var(--c-transparent));--_c-select-text-color:var(--c-select-text-color, var(--c-text-body));--_c-select-placeholder-color:var(--c-select-placeholder-color, var(--c-tertiary-500));--_c-select-option-background-color:var(--c-select-option-background-color, var(--c-white));--_c-select-option-background-color-hover:var(--c-select-option-background-color-hover, var(--c-primary-100));--_c-select-option-text-color:var(--c-select-option-text-color, var(--c-text-body));--_c-select-shadow-active-color:var(--c-select-shadow-active-color, var(--_c-select-active-color));--_c-select-shadow-background-color:var(--c-select-shadow-background-color, var(--c-white));--_c-select-shadow-text-color:var(--c-select-shadow-text-color, var(--_c-select-text-color));--_c-select-shadow-placeholder-color:var(--c-select-shadow-placeholder-color, var(--_c-select-placeholder-color));--_c-input-active-color:var(--_c-select-active-color);--_c-input-inactive-color:var(--_c-select-inactive-color);--_c-input-background-color:var(--_c-select-background-color);--_c-input-text-color:var(--_c-select-text-color);--_c-input-placeholder-color:var(--_c-select-placeholder-color);--_c-input-shadow-active-color:var(--_c-select-shadow-active-color);--_c-input-shadow-background-color:var(--_c-select-shadow-background-color);--_c-input-shadow-text-color:var(--_c-select-shadow-text-color);--_c-input-shadow-placeholder-color:var(--_c-select-shadow-placeholder-color)}:host{display:block;cursor:text}.c-input-menu__chevron{fill:currentColor;transform:rotate(0deg);transition:transform 0.3s ease-in-out}.c-input-menu__chevron--active{transform:rotate(180deg)}.c-input-menu__input{width:100%;display:flex;justify-items:stretch}.c-input-menu__selection{display:none;pointer-events:none}.c-input-menu__selection--show{align-items:center;display:flex;width:100%;color:var(--_c-select-active-color)}.c-input-menu__item-wrapper{position:absolute;width:100%;top:44px;z-index:10;margin-left:calc(var(--_c-input-label-position) * -1)}.c-input-menu__item-wrapper--shadow{top:47px}.c-input-menu__items{position:absolute;background-color:var(--_c-select-option-background-color);min-width:calc(100% + 24px);box-shadow:0 8px 16px 0 rgba(0, 0, 0, 0.2);z-index:10;user-select:none;border-radius:4px;margin:0 -12px;overflow-y:scroll;list-style:none;padding:0}.c-input-menu__items--hidden{display:none}.c-input-menu__items li{cursor:pointer;display:flex;min-height:48px;padding:0 12px;transition:background-color 0.3s;font-size:14px;align-items:center;justify-content:flex-start;color:var(--_c-select-option-text-color)}.c-input-menu__items li.disabled{background-color:var(--c-tertiary-100);filter:grayscale(1) opacity(0.6);cursor:default}.c-input-menu__items li.disabled:hover{background-color:var(--c-tertiary-100)}.c-input-menu__items li.dense{padding:10px 14px}.c-input-menu__items li:hover{background-color:var(--_c-select-option-background-color-hover)}.c-input-menu__items li[aria-selected=true]{background-color:var(--_c-select-option-background-color-hover);box-shadow:inset 0 0 0 1px var(--_c-select-active-color);border-radius:4px;backface-visibility:hidden;transform:translate3d(0, 0, 0)}.c-input-menu__items li.none{color:rgba(0, 0, 0, 0.5)}.c-input-menu__items--empty li{color:var(--c-text-system);cursor:default;gap:8px;pointer-events:none}.c-input-menu__items--empty li svg{fill:var(--c-warning-600);height:18px;width:18px}input{max-height:32px;padding:8px 0;background-color:transparent;border:none;color:var(--c-text-body);flex:1 1 auto;font-family:var(--c-font-family);font-size:16px;line-height:20px;max-width:100%;min-width:0;width:100%;pointer-events:none}input:focus,input:active{outline:none}input::-ms-reveal{display:none}svg{fill:currentColor;height:22px;width:22px}.c-input--disabled{color:var(--c-tertiary-400)}.c-input:focus-within{color:var(--c-primary-600)}.c-input--error{color:var(--c-error-600)}.c-input--error:focus-within{color:var(--c-error-600)}.visuallyhidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}";
1211
-
1212
- const CSelect = class {
1213
- constructor(hostRef) {
1214
- registerInstance(this, hostRef);
1215
- this.changeValue = createEvent(this, "changeValue", 3);
1216
- if (hostRef.$hostElement$["s-ei"]) {
1217
- this.internals = hostRef.$hostElement$["s-ei"];
1218
- }
1219
- else {
1220
- this.internals = hostRef.$hostElement$.attachInternals();
1221
- hostRef.$hostElement$["s-ei"] = this.internals;
1222
- }
1223
- this._preventDialogOpen = false;
1224
- this._debounce = null;
1225
- this._lastKeyPressTime = null;
1226
- this._searchString = '';
1227
- this._toggleDropdown = (event) => {
1228
- event.stopPropagation();
1229
- if (this.dropdownVisible) {
1230
- this._dropdownElement.close();
1231
- return;
1232
- }
1233
- this._dropdownElement.open();
1234
- };
1235
- this._onButtonKeyDown = (src, event) => {
1236
- event.stopPropagation();
1237
- if (event.key !== 'Tab')
1238
- event.preventDefault();
1239
- if (['Enter', ' '].includes(event.key)) {
1240
- if (src === 'chevron') {
1241
- this._toggleDropdown(event);
1242
- return;
1243
- }
1244
- this._onReset(event);
1245
- this._preventDialogOpen = true;
1246
- requestAnimationFrame(() => {
1247
- this._inputElement.focus();
1248
- });
1249
- }
1250
- };
1251
- this._onSlotChange = () => {
1252
- this.optionElements = this.el.querySelectorAll('c-option');
1253
- if (this.optionElements.length && !this.optionElementsExist) {
1254
- this.optionElementsExist = true;
1255
- }
1256
- const selection = Array.from(this.optionElements).find((option) => option.selected);
1257
- if (selection) {
1258
- this.value = this.returnObject
1259
- ? { name: selection.name, value: selection.value }
1260
- : selection.value;
1261
- this.changeValue.emit(this.value);
1262
- this.internals.setFormValue(selection.value.toString());
1263
- }
1264
- };
1265
- this._onReset = (event) => {
1266
- event.stopPropagation();
1267
- this.changeValue.emit(null);
1268
- this.internals.setFormValue(null);
1269
- this._selectionElement.classList.remove('c-input-menu__selection--show');
1270
- this._selectionElement.replaceChildren(null);
1271
- this._preventDialogOpen = true;
1272
- this._cInputElement.reset();
1273
- this._inputElement.focus();
1274
- this._dropdownElement.updateList();
1275
- };
1276
- this._onInputFocus = () => {
1277
- if (!this._preventDialogOpen) {
1278
- this._dropdownElement.open();
1279
- }
1280
- this._updateStatusText();
1281
- this._preventDialogOpen = false;
1282
- };
1283
- this.items = [];
1284
- this.value = null;
1285
- this.hostId = undefined;
1286
- this.clearable = false;
1287
- this.disabled = false;
1288
- this.label = undefined;
1289
- this.name = undefined;
1290
- this.placeholder = '';
1291
- this.hideDetails = false;
1292
- this.hint = '';
1293
- this.loading = false;
1294
- this.required = false;
1295
- this.valid = true;
1296
- this.validate = false;
1297
- this.validateOnBlur = false;
1298
- this.validation = 'Required field';
1299
- this.shadow = false;
1300
- this.returnObject = false;
1301
- this.itemsPerPage = 6;
1302
- this.optionAsSelection = undefined;
1303
- this.optionElements = undefined;
1304
- this.currentIndex = null;
1305
- this.dropdownVisible = false;
1306
- this.statusText = '';
1307
- this.optionElementsExist = false;
1308
- }
1309
- get _id() {
1310
- return this.hostId || `select_${CSelect._uniqueId}`;
1311
- }
1312
- get _items() {
1313
- return this.optionElementsExist ? this.optionElements : this.items;
1314
- }
1315
- get _value() {
1316
- var _a, _b, _c, _d;
1317
- if (!this.value)
1318
- return '';
1319
- if (!this.returnObject &&
1320
- !['number', 'string'].includes(typeof this.value)) {
1321
- console.warn(`[C-SELECT] The value should be of type 'number' or 'string' when return-object is not used.`);
1322
- return '';
1323
- }
1324
- if (!this.returnObject &&
1325
- ['number', 'string'].includes(typeof this.value)) {
1326
- return (_b = (_a = Array.from(this._items)) === null || _a === void 0 ? void 0 : _a.find((item) => item.value === this.value)) === null || _b === void 0 ? void 0 : _b.name;
1327
- }
1328
- return (_d = (_c = Array.from(this._items)) === null || _c === void 0 ? void 0 : _c.find((item) => item.value === this.value.value)) === null || _d === void 0 ? void 0 : _d.name;
1329
- }
1330
- async reset() {
1331
- this.changeValue.emit(null);
1332
- this.internals.setFormValue(null);
1333
- this._dropdownElement.updateList();
1334
- }
1335
- handleKeyDown(event) {
1336
- const alphanumeric = /^[0-9a-zA-Z ]+$/;
1337
- if (event.key.match(alphanumeric) && event.key.length === 1) {
1338
- if (this.dropdownVisible)
1339
- return;
1340
- if (Date.now() - this._lastKeyPressTime > 3000) {
1341
- this._searchString = event.key;
1342
- }
1343
- else {
1344
- this._searchString += event.key;
1345
- }
1346
- this._lastKeyPressTime = Date.now();
1347
- const selectionIndex = Array.from(this._items).findIndex((i) => i.name.toLowerCase().startsWith(this._searchString));
1348
- this.currentIndex = selectionIndex >= 0 ? selectionIndex : null;
1349
- if (this.currentIndex !== null) {
1350
- this._dropdownElement.selectItem(this.currentIndex);
1351
- }
1352
- return;
1353
- }
1354
- if (event.key === 'Escape') {
1355
- this._preventDialogOpen = true;
1356
- this._dropdownElement.close();
1357
- this._inputElement.focus();
1358
- return;
1359
- }
1360
- if (event.key === 'Tab') {
1361
- this._dropdownElement.close();
1362
- }
1363
- if (event.key === 'ArrowDown') {
1364
- event.preventDefault();
1365
- if (!this._items.length)
1366
- return;
1367
- if (!this.dropdownVisible) {
1368
- this._dropdownElement.open();
1369
- }
1370
- this.currentIndex =
1371
- this.currentIndex === null
1372
- ? 0
1373
- : Math.min(this.currentIndex + 1, this._items.length - 1);
1374
- this._dropdownElement.focusItem(this.currentIndex);
1375
- }
1376
- if (event.key === 'ArrowUp') {
1377
- event.preventDefault();
1378
- if (this.currentIndex === 0) {
1379
- this._dropdownElement.close();
1380
- this._inputElement.focus();
1381
- }
1382
- if (!this.dropdownVisible) {
1383
- this._dropdownElement.open();
1384
- }
1385
- this.currentIndex =
1386
- this.currentIndex === null
1387
- ? this._items.length - 1
1388
- : Math.max(this.currentIndex - 1, 0);
1389
- this._dropdownElement.focusItem(this.currentIndex);
1390
- }
1391
- if (event.key === ' ') {
1392
- event.preventDefault();
1393
- }
1394
- if (event.key === 'Enter') {
1395
- event.preventDefault();
1396
- if (this.currentIndex === null)
1397
- return;
1398
- this._dropdownElement.selectItem(this.currentIndex);
1399
- }
1400
- if (event.key === 'Home' && this.dropdownVisible) {
1401
- this.currentIndex = 0;
1402
- }
1403
- if (event.key === 'End' && this.dropdownVisible) {
1404
- this.currentIndex = this._items.length - 1;
1405
- }
1406
- }
1407
- onDropdownStateChange(event) {
1408
- const isOpen = event.detail;
1409
- this.dropdownVisible = isOpen;
1410
- }
1411
- onSelectOption(event) {
1412
- this._dropdownElement.close();
1413
- const { name, value } = event.detail;
1414
- const selection = this._setCurrentIndex({ name, value });
1415
- if (this.optionElementsExist && this.optionAsSelection && selection) {
1416
- const clone = selection.cloneNode(true);
1417
- this._selectionElement.classList.add('c-input-menu__selection--show');
1418
- this._selectionElement.replaceChildren(clone);
1419
- }
1420
- this._dropdownElement.updateList();
1421
- this.value = this.returnObject ? event.detail : value;
1422
- this.changeValue.emit(this.value);
1423
- this.internals.setFormValue(value);
1424
- this._preventDialogOpen = true;
1425
- this._inputElement.focus();
1426
- }
1427
- _setCurrentIndex({ value, name }) {
1428
- let selection = null;
1429
- Array.from(this._items).forEach((item, index) => {
1430
- const selected = item.value === value && item.name === name;
1431
- if (this.optionElementsExist) {
1432
- item.selected = selected;
1433
- }
1434
- if (selected) {
1435
- this.currentIndex = index;
1436
- selection = item;
1437
- }
1438
- });
1439
- return selection;
1440
- }
1441
- _updateInput() {
1442
- this._dropdownElement.open();
1443
- this._dropdownElement.updateList();
1444
- }
1445
- _updateStatusText() {
1446
- if (this._debounce !== null) {
1447
- clearTimeout(this._debounce);
1448
- this._debounce = null;
1449
- }
1450
- this._debounce = window.setTimeout(() => {
1451
- this.statusText = '';
1452
- if (this.currentIndex === null) {
1453
- this.statusText = this._items.length
1454
- ? `${this._items.length} option${this._items.length !== 1 ? 's' : ''} available`
1455
- : 'No options available';
1456
- }
1457
- const ending = !!this._items.length
1458
- ? ', navigate using the up and down arrows'
1459
- : '';
1460
- this._dropdownElement.setStatusText(this.statusText + ending);
1461
- this._debounce = null;
1462
- }, 1400);
1463
- }
1464
- componentWillLoad() {
1465
- CSelect._uniqueId += 1;
1466
- this._inputId =
1467
- 'input_' +
1468
- (this.hostId || this.label || this.placeholder).replace(/[^a-zA-Z0-9-_]/g, '');
1469
- }
1470
- componentDidLoad() {
1471
- if (!this.value)
1472
- return;
1473
- const selection = Array.from(this._items).find((item) => {
1474
- if (this.returnObject) {
1475
- return (item.name === this.value.name &&
1476
- item.value === this.value.value);
1477
- }
1478
- return item.value === this.value;
1479
- });
1480
- this._setCurrentIndex({
1481
- name: selection.name,
1482
- value: selection.value.toString(),
1483
- });
1484
- }
1485
- _renderLoader() {
1486
- return h("c-spinner", { color: "var(--_c-autocomplete-active-color)", size: 20 });
1487
- }
1488
- _renderChevron() {
1489
- const classes = {
1490
- 'c-input-menu__chevron': true,
1491
- 'c-input-menu__chevron--active': this.dropdownVisible,
1492
- };
1493
- return (h("c-icon-button", { size: "x-small", class: classes, text: true, onClick: (event) => this._toggleDropdown(event), onKeyDown: (event) => this._onButtonKeyDown('chevron', event) }, h("c-icon", { path: mdiChevronDown, size: 24 })));
1494
- }
1495
- _renderInputElement() {
1496
- var _a;
1497
- return (h("div", { class: "c-input-menu__input" }, h("input", { type: "text", readonly: true, ref: (el) => (this._inputElement = el), "aria-expanded": this.dropdownVisible.toString(), "aria-owns": this._inputId + '-items', "aria-autocomplete": "list", autocomplete: "off", class: "c-input__input", role: "combobox", value: this._value, name: (_a = this.name) !== null && _a !== void 0 ? _a : null, onInput: () => this._updateInput(), onFocus: () => this._onInputFocus() }), h("div", { ref: (el) => (this._selectionElement = el), class: "c-input-menu__selection" })));
1498
- }
1499
- _renderReset() {
1500
- return (h("c-icon-button", { "aria-label": "", size: "x-small", text: true, onClick: (event) => this._onReset(event), onKeyDown: (event) => this._onButtonKeyDown('reset', event) }, h("c-icon", { path: mdiClose, size: 20 })));
1501
- }
1502
- render() {
1503
- const itemType = this.optionElementsExist ? 'option' : 'item';
1504
- return (h(Host, null, h("c-dropdown", { ref: (el) => (this._dropdownElement = el), id: `${this._id}-dropdown`, index: this.currentIndex, "items-per-page": this.itemsPerPage, "item-type": itemType, items: this._items, parent: this.el, type: "select" }, h("c-input", { slot: "default", ref: (el) => (this._cInputElement = el), active: this.dropdownVisible, disabled: this.disabled, "hide-details": this.hideDetails, hint: this.hint, id: this.hostId, "input-id": this._inputId, label: this.label, name: this.name, placeholder: this.placeholder, required: this.required, shadow: this.shadow, valid: this.valid, validate: this.validate, "validate-on-blur": this.validateOnBlur, validation: this.validation, value: this.value, variant: "select", onClick: () => this._dropdownElement.open() }, h("slot", { name: "pre", slot: "pre" }), h("div", { class: "c-input__content" }, this._renderInputElement(), this.loading && this._renderLoader(), !this.loading &&
1505
- this.value &&
1506
- this.clearable &&
1507
- this._renderReset(), !this.loading &&
1508
- (!this.value || !this.clearable) &&
1509
- this._renderChevron(), h("slot", { onSlotchange: () => this._onSlotChange() })), h("slot", { name: "post", slot: "post" })))));
1510
- }
1511
- static get formAssociated() { return true; }
1512
- get el() { return getElement(this); }
1513
- };
1514
- CSelect._uniqueId = 0;
1515
- CSelect.style = cSelectCss;
1516
-
1517
- const cSpinnerCss = "html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit;-webkit-tap-highlight-color:transparent}:host{font-family:var(--c-font-family)}::-ms-reveal{display:none}:host{--_c-spinner-color:var(--c-spinner-color, var(--c-color));--_c-spinner-size:var(--c-size);--_c-spinner-width:var(--c-width);display:block;height:var(--_c-spinner-size);width:var(--_c-spinner-size)}:host(.c-spinner) svg{fill:var(--_c-spinner-color);height:var(--_c-spinner-size);overflow:visible;width:var(--_c-spinner-size)}:host(.c-spinner) svg circle{animation:spinner 2.5s linear infinite;fill:transparent;stroke-dasharray:calc(3.14 * var(--_c-spinner-size));stroke-linecap:round;stroke-width:var(--_c-spinner-width);stroke:var(--_c-spinner-color);transform-origin:calc(0.5px * var(--_c-spinner-size)) calc(0.5px * var(--_c-spinner-size)) 0}@keyframes spinner{0%{transform:rotate(0deg);stroke-dashoffset:calc(0.66 * var(--_c-spinner-size))}50%{transform:rotate(720deg);stroke-dashoffset:calc(3.14 * var(--_c-spinner-size))}100%{transform:rotate(1080deg);stroke-dashoffset:calc(0.66 * var(--_c-spinner-size))}}";
1518
-
1519
- const CSpinner = class {
1520
- constructor(hostRef) {
1521
- registerInstance(this, hostRef);
1522
- this.color = 'var(--c-primary-600)';
1523
- this.size = 24;
1524
- this.width = 2;
1525
- }
1526
- render() {
1527
- const iconParams = {
1528
- cx: this.size / 2,
1529
- cy: this.size / 2,
1530
- r: this.size / 2 - 2,
1531
- };
1532
- const style = {
1533
- '--c-size': `${this.size}px`,
1534
- '--c-width': `${this.width}px`,
1535
- '--c-color': this.color,
1536
- };
1537
- return (h(Host, { class: "c-spinner", style: style }, h("svg", null, h("circle", Object.assign({}, iconParams)))));
1538
- }
1539
- };
1540
- CSpinner.style = cSpinnerCss;
1541
-
1542
- export { CAutocomplete as c_autocomplete, CBadge as c_badge, CButton as c_button, CCard as c_card, CCardActions as c_card_actions, CCardContent as c_card_content, CCardTitle as c_card_title, CDropdown as c_dropdown, CIcon as c_icon, CIconButton as c_icon_button, CInput as c_input, CMessage as c_message, COption as c_option, CRipple as c_ripple, CSelect as c_select, CSpinner as c_spinner };
1543
-
1544
- //# sourceMappingURL=c-autocomplete_16.entry.js.map