@prolibu-suite/cobalt-core 0.5.0 → 0.7.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 (533) hide show
  1. package/custom-elements.json +1090 -41
  2. package/dist/cjs/co-accordion.cjs.entry.js +1 -1
  3. package/dist/cjs/co-app-shell.cjs.entry.js +1 -1
  4. package/dist/cjs/co-autocomplete.cjs.entry.js +3 -3
  5. package/dist/cjs/co-avatar-group.cjs.entry.js +3 -3
  6. package/dist/cjs/{co-tooltip.cjs.entry.js → co-avatar_2.cjs.entry.js} +95 -3
  7. package/dist/cjs/co-badge.cjs.entry.js +2 -2
  8. package/dist/cjs/co-bottom-sheet.cjs.entry.js +4 -4
  9. package/dist/cjs/co-breadcrumb-item.cjs.entry.js +3 -3
  10. package/dist/cjs/co-breadcrumb.cjs.entry.js +2 -2
  11. package/dist/cjs/co-button-group.cjs.entry.js +3 -3
  12. package/dist/cjs/co-button.cjs.entry.js +4 -4
  13. package/dist/cjs/co-calendar-month.cjs.entry.js +2 -2
  14. package/dist/cjs/co-calendar_3.cjs.entry.js +8 -8
  15. package/dist/cjs/co-card.cjs.entry.js +3 -3
  16. package/dist/cjs/co-carousel-item.cjs.entry.js +17 -0
  17. package/dist/cjs/co-carousel.cjs.entry.js +368 -0
  18. package/dist/cjs/co-checkbox-group.cjs.entry.js +1 -1
  19. package/dist/cjs/co-checkbox.cjs.entry.js +4 -4
  20. package/dist/cjs/co-chip_2.cjs.entry.js +5 -5
  21. package/dist/cjs/co-color-picker.cjs.entry.js +5 -5
  22. package/dist/cjs/co-column-picker.cjs.entry.js +3 -3
  23. package/dist/cjs/co-combobox.cjs.entry.js +3 -3
  24. package/dist/cjs/co-command-search.cjs.entry.js +1 -1
  25. package/dist/cjs/co-data-table-pagination.cjs.entry.js +5 -5
  26. package/dist/cjs/co-data-table.cjs.entry.js +2 -2
  27. package/dist/cjs/co-date-picker.cjs.entry.js +11 -4
  28. package/dist/cjs/co-date-range-picker.cjs.entry.js +9 -3
  29. package/dist/cjs/co-date-range.cjs.entry.js +2 -2
  30. package/dist/cjs/co-drive-card.cjs.entry.js +2 -2
  31. package/dist/cjs/co-drop-zone.cjs.entry.js +2 -2
  32. package/dist/cjs/co-empty-state.cjs.entry.js +3 -3
  33. package/dist/cjs/co-event-calendar.cjs.entry.js +3 -3
  34. package/dist/cjs/co-fab.cjs.entry.js +21 -6
  35. package/dist/cjs/co-file-field.cjs.entry.js +8 -8
  36. package/dist/cjs/co-file-type-tile.cjs.entry.js +3 -3
  37. package/dist/cjs/co-helper-text.cjs.entry.js +3 -3
  38. package/dist/cjs/co-icon-button.cjs.entry.js +2 -2
  39. package/dist/cjs/co-icon.cjs.entry.js +3 -3
  40. package/dist/cjs/co-input.cjs.entry.js +25 -3
  41. package/dist/cjs/co-json-field.cjs.entry.js +6 -6
  42. package/dist/cjs/co-lightbox.cjs.entry.js +33 -6
  43. package/dist/cjs/co-list-footer.cjs.entry.js +2 -2
  44. package/dist/cjs/co-list-item.cjs.entry.js +5 -5
  45. package/dist/cjs/co-loader.cjs.entry.js +1 -1
  46. package/dist/cjs/co-media-thumb.cjs.entry.js +3 -3
  47. package/dist/cjs/co-menu-divider.cjs.entry.js +2 -2
  48. package/dist/cjs/co-menu-item.cjs.entry.js +1 -1
  49. package/dist/cjs/co-menu.cjs.entry.js +2 -2
  50. package/dist/cjs/co-modal.cjs.entry.js +3 -3
  51. package/dist/cjs/co-navbar.cjs.entry.js +3 -3
  52. package/dist/cjs/co-number-field.cjs.entry.js +5 -5
  53. package/dist/cjs/co-overlay.cjs.entry.js +2 -2
  54. package/dist/cjs/co-page-header.cjs.entry.js +2 -2
  55. package/dist/cjs/co-phone-field.cjs.entry.js +4 -4
  56. package/dist/cjs/co-popover.cjs.entry.js +1 -1
  57. package/dist/cjs/co-progress-bar.cjs.entry.js +3 -3
  58. package/dist/cjs/co-progress-circle.cjs.entry.js +3 -3
  59. package/dist/cjs/co-radio-group.cjs.entry.js +1 -1
  60. package/dist/cjs/co-radio.cjs.entry.js +4 -4
  61. package/dist/cjs/co-rating.cjs.entry.js +4 -4
  62. package/dist/cjs/co-ref-field.cjs.entry.js +11 -5
  63. package/dist/cjs/co-rich-text-editor.cjs.entry.js +22 -7
  64. package/dist/cjs/co-rich-text-toolbar.cjs.entry.js +36 -4
  65. package/dist/cjs/co-rich-text-viewer.cjs.entry.js +36 -6
  66. package/dist/cjs/co-row.cjs.entry.js +3 -3
  67. package/dist/cjs/co-segmented-bar.cjs.entry.js +1 -1
  68. package/dist/cjs/co-select.cjs.entry.js +13 -7
  69. package/dist/cjs/co-separator.cjs.entry.js +2 -2
  70. package/dist/cjs/co-sidebar-nav.cjs.entry.js +1 -1
  71. package/dist/cjs/co-sidebar.cjs.entry.js +3 -3
  72. package/dist/cjs/co-skeleton.cjs.entry.js +2 -2
  73. package/dist/cjs/co-slider.cjs.entry.js +3 -3
  74. package/dist/cjs/co-switch.cjs.entry.js +5 -5
  75. package/dist/cjs/co-tab-group.cjs.entry.js +4 -4
  76. package/dist/cjs/co-tab.cjs.entry.js +3 -3
  77. package/dist/cjs/co-tags-field.cjs.entry.js +9 -9
  78. package/dist/cjs/co-textarea.cjs.entry.js +13 -7
  79. package/dist/cjs/co-toast.cjs.entry.js +1 -1
  80. package/dist/cjs/co-toggle-button-group.cjs.entry.js +3 -3
  81. package/dist/cjs/co-toggle-button.cjs.entry.js +3 -3
  82. package/dist/cjs/co-transfer-list.cjs.entry.js +1 -1
  83. package/dist/cjs/co-video.cjs.entry.js +3 -3
  84. package/dist/cjs/cobalt.cjs.js +2 -2
  85. package/dist/cjs/{fieldChip-D8YJCyQF.js → fieldChip-B_npd9rL.js} +1 -1
  86. package/dist/cjs/{index-4y1Dm145.js → index-DFZ5YhIT.js} +171 -11
  87. package/dist/cjs/{index-DxEFsH_t.js → index-kBiXCEE7.js} +13 -9
  88. package/dist/cjs/loader.cjs.js +2 -2
  89. package/dist/cjs/{requiredMark-B3pKyqYI.js → requiredMark-DuMIcKtt.js} +1 -1
  90. package/dist/cjs/{richTextI18n-B7ktXg3M.js → richTextI18n-B28uAhh4.js} +3 -0
  91. package/dist/cjs/{toolbar-config-3PlT-3zm.js → toolbar-config-BQfWTW6P.js} +2 -0
  92. package/dist/cobalt/cobalt.css +1 -1
  93. package/dist/cobalt/cobalt.esm.js +1 -1
  94. package/dist/cobalt/{p-86e60cfa.entry.js → p-0110108f.entry.js} +1 -1
  95. package/dist/cobalt/p-037cc571.entry.js +1 -0
  96. package/dist/cobalt/{p-47a2dd67.entry.js → p-080f62e4.entry.js} +1 -1
  97. package/dist/cobalt/{p-8128e84a.entry.js → p-0a294205.entry.js} +1 -1
  98. package/dist/cobalt/{p-a9afbaa6.entry.js → p-0b7359bb.entry.js} +1 -1
  99. package/dist/cobalt/p-0b92167a.entry.js +1 -0
  100. package/dist/cobalt/p-0bc5a962.entry.js +1 -0
  101. package/dist/cobalt/{p-02c5a9a9.entry.js → p-202eadfc.entry.js} +1 -1
  102. package/dist/cobalt/{p-1681ce1d.entry.js → p-264508ae.entry.js} +1 -1
  103. package/dist/cobalt/{p-b8ec0cc1.entry.js → p-2661557c.entry.js} +1 -1
  104. package/dist/cobalt/{p-771bc8fe.entry.js → p-27dce0ac.entry.js} +1 -1
  105. package/dist/cobalt/{p-c3462def.entry.js → p-28ab9cef.entry.js} +1 -1
  106. package/dist/cobalt/{p-d9608046.entry.js → p-2da09948.entry.js} +1 -1
  107. package/dist/cobalt/p-2f6c7eb5.entry.js +1 -0
  108. package/dist/cobalt/{p-002e5beb.entry.js → p-30c80e3a.entry.js} +1 -1
  109. package/dist/cobalt/p-331a0108.entry.js +1 -0
  110. package/dist/cobalt/{p-c0f39ddd.entry.js → p-36ad3a96.entry.js} +1 -1
  111. package/dist/cobalt/{p-8dfb6886.entry.js → p-3af74ab8.entry.js} +1 -1
  112. package/dist/cobalt/{p-c6fedc59.entry.js → p-3b9be8a8.entry.js} +1 -1
  113. package/dist/cobalt/p-3c681e3a.entry.js +1 -0
  114. package/dist/cobalt/{p-14d4c5c7.entry.js → p-3ecbbe93.entry.js} +1 -1
  115. package/dist/cobalt/{p-9c873a6a.entry.js → p-3f1030fb.entry.js} +1 -1
  116. package/dist/cobalt/p-3f7215e7.entry.js +1 -0
  117. package/dist/cobalt/p-431cec34.entry.js +1 -0
  118. package/dist/cobalt/p-48fbf051.entry.js +1 -0
  119. package/dist/cobalt/{p-e420d5c9.entry.js → p-4f615cbd.entry.js} +1 -1
  120. package/dist/cobalt/{p-81cfd951.entry.js → p-5319ac3f.entry.js} +1 -1
  121. package/dist/cobalt/p-532baca4.entry.js +1 -0
  122. package/dist/cobalt/{p-ba66584f.entry.js → p-53a276a8.entry.js} +1 -1
  123. package/dist/cobalt/{p-f0de4415.entry.js → p-543cc00d.entry.js} +1 -1
  124. package/dist/cobalt/{p-f073b467.entry.js → p-54857f78.entry.js} +1 -1
  125. package/dist/cobalt/{p-85eed52c.entry.js → p-54f8c68c.entry.js} +1 -1
  126. package/dist/cobalt/{p-9c6ca902.entry.js → p-585c132d.entry.js} +1 -1
  127. package/dist/cobalt/p-59b114ab.entry.js +1 -0
  128. package/dist/cobalt/{p-2d1cbd7f.entry.js → p-5b84cf37.entry.js} +1 -1
  129. package/dist/cobalt/{p-0d7536a8.entry.js → p-5c250889.entry.js} +1 -1
  130. package/dist/cobalt/{p-e33853fa.entry.js → p-5d0510a5.entry.js} +1 -1
  131. package/dist/cobalt/{p-f86ccb38.entry.js → p-5e246304.entry.js} +1 -1
  132. package/dist/cobalt/{p-075eed3d.entry.js → p-616e4286.entry.js} +1 -1
  133. package/dist/cobalt/{p-8e823c15.entry.js → p-64115d66.entry.js} +1 -1
  134. package/dist/cobalt/{p-495c9b99.entry.js → p-69723cc1.entry.js} +1 -1
  135. package/dist/cobalt/{p-6ad1625a.entry.js → p-69ce2269.entry.js} +1 -1
  136. package/dist/cobalt/{p-b1197c08.entry.js → p-6b38e8fb.entry.js} +1 -1
  137. package/dist/cobalt/{p-5c43d30e.entry.js → p-7178113f.entry.js} +1 -1
  138. package/dist/cobalt/p-741cf623.entry.js +1 -0
  139. package/dist/cobalt/{p-1726ce07.entry.js → p-75515a8e.entry.js} +1 -1
  140. package/dist/cobalt/{p-fd27c2bd.entry.js → p-7f78e45c.entry.js} +1 -1
  141. package/dist/cobalt/{p-3f06d373.entry.js → p-8155d781.entry.js} +1 -1
  142. package/dist/cobalt/{p-e710b9ea.entry.js → p-8fe5b07e.entry.js} +1 -1
  143. package/dist/cobalt/{p-9a587867.entry.js → p-9211e794.entry.js} +1 -1
  144. package/dist/cobalt/p-97875bde.entry.js +1 -0
  145. package/dist/cobalt/p-9824c478.entry.js +1 -0
  146. package/dist/cobalt/{p-cc0a4617.entry.js → p-9994fcd8.entry.js} +1 -1
  147. package/dist/cobalt/p-9bf42bf4.entry.js +1 -0
  148. package/dist/cobalt/{p-f6ac5301.entry.js → p-9fab9c1f.entry.js} +1 -1
  149. package/dist/cobalt/p-BCEz3S-z.js +2 -0
  150. package/dist/cobalt/{p-Bgxofdfb.js → p-BL0sCfMH.js} +1 -1
  151. package/dist/cobalt/p-BYKAgwq3.js +1 -0
  152. package/dist/cobalt/p-C-d15gih.js +1 -0
  153. package/dist/cobalt/p-D5gr2ent.js +1 -0
  154. package/dist/cobalt/p-WeuPA9Rw.js +1 -0
  155. package/dist/cobalt/{p-77d01b39.entry.js → p-a252f8c5.entry.js} +1 -1
  156. package/dist/cobalt/{p-809015dd.entry.js → p-b06af5c6.entry.js} +1 -1
  157. package/dist/cobalt/p-b87a2e7a.entry.js +1 -0
  158. package/dist/cobalt/{p-fb251497.entry.js → p-ba5c6aa7.entry.js} +1 -1
  159. package/dist/cobalt/{p-373cd08e.entry.js → p-bb00ae4a.entry.js} +1 -1
  160. package/dist/cobalt/{p-5edd0d3f.entry.js → p-bcd38114.entry.js} +1 -1
  161. package/dist/cobalt/{p-bb534985.entry.js → p-c237add6.entry.js} +1 -1
  162. package/dist/cobalt/{p-c750b2d2.entry.js → p-c3004e1c.entry.js} +1 -1
  163. package/dist/cobalt/p-c589ae25.entry.js +1 -0
  164. package/dist/cobalt/p-c635417b.entry.js +1 -0
  165. package/dist/cobalt/p-c7d9ff39.entry.js +1 -0
  166. package/dist/cobalt/{p-c1e53e4c.entry.js → p-c9528a5f.entry.js} +1 -1
  167. package/dist/cobalt/{p-20ba59a2.entry.js → p-cbac0a11.entry.js} +1 -1
  168. package/dist/cobalt/p-cd28aa6d.entry.js +1 -0
  169. package/dist/cobalt/{p-5c3101b5.entry.js → p-cdedaa82.entry.js} +1 -1
  170. package/dist/cobalt/{p-627d2d1a.entry.js → p-ceb85838.entry.js} +1 -1
  171. package/dist/cobalt/{p-5e9a9caf.entry.js → p-d3a1a604.entry.js} +1 -1
  172. package/dist/cobalt/{p-a6900010.entry.js → p-d71b800a.entry.js} +1 -1
  173. package/dist/cobalt/p-df752f6e.entry.js +1 -0
  174. package/dist/cobalt/{p-b4bed98b.entry.js → p-e1b468c1.entry.js} +1 -1
  175. package/dist/cobalt/{p-0d6a562d.entry.js → p-e4555fda.entry.js} +1 -1
  176. package/dist/cobalt/p-ec9dd3a3.entry.js +1 -0
  177. package/dist/cobalt/p-eec1c44c.entry.js +1 -0
  178. package/dist/cobalt/p-eeed80ac.entry.js +1 -0
  179. package/dist/cobalt/p-f0a98453.entry.js +1 -0
  180. package/dist/cobalt/{p-af4cb263.entry.js → p-ff581807.entry.js} +1 -1
  181. package/dist/cobalt/p-fffeb610.entry.js +1 -0
  182. package/dist/collection/collection-manifest.json +2 -0
  183. package/dist/collection/components/co-autocomplete/co-autocomplete.css +1 -1
  184. package/dist/collection/components/co-avatar/co-avatar.css +23 -0
  185. package/dist/collection/components/co-avatar/co-avatar.js +24 -1
  186. package/dist/collection/components/co-avatar-group/co-avatar-group.css +9 -5
  187. package/dist/collection/components/co-avatar-group/co-avatar-group.js +2 -2
  188. package/dist/collection/components/co-badge/co-badge.js +1 -1
  189. package/dist/collection/components/co-bottom-sheet/co-bottom-sheet.js +3 -3
  190. package/dist/collection/components/co-breadcrumb/co-breadcrumb.js +1 -1
  191. package/dist/collection/components/co-breadcrumb-item/co-breadcrumb-item.js +2 -2
  192. package/dist/collection/components/co-button/co-button.css +5 -1
  193. package/dist/collection/components/co-button/co-button.js +2 -2
  194. package/dist/collection/components/co-button-group/co-button-group.js +2 -2
  195. package/dist/collection/components/co-calendar/co-calendar.js +1 -1
  196. package/dist/collection/components/co-calendar-month/co-calendar-month.js +1 -1
  197. package/dist/collection/components/co-card/co-card.js +2 -2
  198. package/dist/collection/components/co-carousel/co-carousel.css +152 -0
  199. package/dist/collection/components/co-carousel/co-carousel.js +633 -0
  200. package/dist/collection/components/co-carousel-item/co-carousel-item.css +6 -0
  201. package/dist/collection/components/co-carousel-item/co-carousel-item.js +25 -0
  202. package/dist/collection/components/co-checkbox/co-checkbox.js +3 -3
  203. package/dist/collection/components/co-chip/co-chip.js +2 -2
  204. package/dist/collection/components/co-color-picker/co-color-picker.css +11 -10
  205. package/dist/collection/components/co-color-picker/co-color-picker.js +2 -2
  206. package/dist/collection/components/co-column-picker/co-column-picker.js +2 -2
  207. package/dist/collection/components/co-combobox/co-combobox.css +6 -8
  208. package/dist/collection/components/co-data-table/co-data-table.css +19 -4
  209. package/dist/collection/components/co-data-table-pagination/co-data-table-pagination.js +4 -4
  210. package/dist/collection/components/co-date-field/co-date-field.css +6 -7
  211. package/dist/collection/components/co-date-field/co-date-field.js +4 -4
  212. package/dist/collection/components/co-date-picker/co-date-picker.css +16 -0
  213. package/dist/collection/components/co-date-picker/co-date-picker.js +28 -1
  214. package/dist/collection/components/co-date-range/co-date-range.js +1 -1
  215. package/dist/collection/components/co-date-range-picker/co-date-range-picker.css +13 -1
  216. package/dist/collection/components/co-date-range-picker/co-date-range-picker.js +26 -0
  217. package/dist/collection/components/co-drive-card/co-drive-card.js +1 -1
  218. package/dist/collection/components/co-drop-zone/co-drop-zone.js +1 -1
  219. package/dist/collection/components/co-empty-state/co-empty-state.js +2 -2
  220. package/dist/collection/components/co-event-calendar/co-event-calendar.js +2 -2
  221. package/dist/collection/components/co-fab/co-fab.css +70 -10
  222. package/dist/collection/components/co-fab/co-fab.js +39 -4
  223. package/dist/collection/components/co-file-field/co-file-field.css +2 -2
  224. package/dist/collection/components/co-file-field/co-file-field.js +5 -5
  225. package/dist/collection/components/co-file-type-tile/co-file-type-tile.js +2 -2
  226. package/dist/collection/components/co-helper-text/co-helper-text.js +2 -2
  227. package/dist/collection/components/co-icon/co-icon.js +2 -2
  228. package/dist/collection/components/co-icon-button/co-icon-button.js +1 -1
  229. package/dist/collection/components/co-input/co-input.css +13 -1
  230. package/dist/collection/components/co-input/co-input.js +83 -0
  231. package/dist/collection/components/co-json-field/co-json-field.css +4 -8
  232. package/dist/collection/components/co-json-field/co-json-field.js +3 -3
  233. package/dist/collection/components/co-lightbox/co-lightbox.css +12 -1
  234. package/dist/collection/components/co-lightbox/co-lightbox.js +31 -4
  235. package/dist/collection/components/co-list-footer/co-list-footer.js +1 -1
  236. package/dist/collection/components/co-list-item/co-list-item.js +4 -4
  237. package/dist/collection/components/co-media-thumb/co-media-thumb.js +2 -2
  238. package/dist/collection/components/co-menu/co-menu.js +1 -1
  239. package/dist/collection/components/co-menu-divider/co-menu-divider.js +1 -1
  240. package/dist/collection/components/co-modal/co-modal.js +2 -2
  241. package/dist/collection/components/co-navbar/co-navbar.js +2 -2
  242. package/dist/collection/components/co-number-field/co-number-field.css +1 -1
  243. package/dist/collection/components/co-number-field/co-number-field.js +2 -2
  244. package/dist/collection/components/co-option-list/co-option-list.js +2 -2
  245. package/dist/collection/components/co-overlay/co-overlay.js +1 -1
  246. package/dist/collection/components/co-page-header/co-page-header.js +1 -1
  247. package/dist/collection/components/co-phone-field/co-phone-field.css +2 -2
  248. package/dist/collection/components/co-phone-field/co-phone-field.js +1 -1
  249. package/dist/collection/components/co-progress-bar/co-progress-bar.js +2 -2
  250. package/dist/collection/components/co-progress-circle/co-progress-circle.js +2 -2
  251. package/dist/collection/components/co-radio/co-radio.js +3 -3
  252. package/dist/collection/components/co-rating/co-rating.js +3 -3
  253. package/dist/collection/components/co-ref-field/co-ref-field.css +17 -1
  254. package/dist/collection/components/co-ref-field/co-ref-field.js +27 -1
  255. package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.css +21 -3
  256. package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.js +97 -4
  257. package/dist/collection/components/co-rich-text-toolbar/co-rich-text-toolbar.js +93 -3
  258. package/dist/collection/components/co-rich-text-viewer/co-rich-text-viewer.css +19 -0
  259. package/dist/collection/components/co-rich-text-viewer/co-rich-text-viewer.js +53 -4
  260. package/dist/collection/components/co-row/co-row.js +2 -2
  261. package/dist/collection/components/co-select/co-select.css +12 -1
  262. package/dist/collection/components/co-select/co-select.js +30 -4
  263. package/dist/collection/components/co-separator/co-separator.js +1 -1
  264. package/dist/collection/components/co-sidebar/co-sidebar.js +2 -2
  265. package/dist/collection/components/co-skeleton/co-skeleton.js +1 -1
  266. package/dist/collection/components/co-slider/co-slider.js +2 -2
  267. package/dist/collection/components/co-switch/co-switch.js +3 -3
  268. package/dist/collection/components/co-tab/co-tab.js +2 -2
  269. package/dist/collection/components/co-tab-group/co-tab-group.css +7 -4
  270. package/dist/collection/components/co-tab-group/co-tab-group.js +2 -2
  271. package/dist/collection/components/co-tags-field/co-tags-field.css +12 -21
  272. package/dist/collection/components/co-tags-field/co-tags-field.js +5 -5
  273. package/dist/collection/components/co-textarea/co-textarea.css +18 -8
  274. package/dist/collection/components/co-textarea/co-textarea.js +30 -4
  275. package/dist/collection/components/co-toggle-button/co-toggle-button.js +2 -2
  276. package/dist/collection/components/co-toggle-button-group/co-toggle-button-group.js +2 -2
  277. package/dist/collection/components/co-tooltip/co-tooltip.js +2 -2
  278. package/dist/collection/components/co-video/co-video.js +2 -2
  279. package/dist/collection/utils/carouselI18n.js +36 -0
  280. package/dist/collection/utils/richTextI18n.js +3 -0
  281. package/dist/components/co-accordion.js +1 -1
  282. package/dist/components/co-autocomplete.js +1 -1
  283. package/dist/components/co-avatar-group.js +1 -1
  284. package/dist/components/co-avatar.js +1 -1
  285. package/dist/components/co-badge.js +1 -1
  286. package/dist/components/co-bottom-sheet.js +1 -1
  287. package/dist/components/co-breadcrumb-item.js +1 -1
  288. package/dist/components/co-breadcrumb.js +1 -1
  289. package/dist/components/co-button-group.js +1 -1
  290. package/dist/components/co-button.js +1 -1
  291. package/dist/components/co-calendar-month.js +1 -1
  292. package/dist/components/co-calendar.js +1 -1
  293. package/dist/components/co-card.js +1 -1
  294. package/dist/components/co-carousel-item.d.ts +11 -0
  295. package/dist/components/co-carousel-item.js +1 -0
  296. package/dist/components/co-carousel.d.ts +11 -0
  297. package/dist/components/co-carousel.js +1 -0
  298. package/dist/components/co-checkbox-group.js +1 -1
  299. package/dist/components/co-checkbox.js +1 -1
  300. package/dist/components/co-chip.js +1 -1
  301. package/dist/components/co-color-picker.js +1 -1
  302. package/dist/components/co-column-picker.js +1 -1
  303. package/dist/components/co-combobox.js +1 -1
  304. package/dist/components/co-command-search.js +1 -1
  305. package/dist/components/co-data-table-pagination.js +1 -1
  306. package/dist/components/co-data-table.js +1 -1
  307. package/dist/components/co-date-field.js +1 -1
  308. package/dist/components/co-date-picker.js +1 -1
  309. package/dist/components/co-date-range-picker.js +1 -1
  310. package/dist/components/co-date-range.js +1 -1
  311. package/dist/components/co-drawer.js +1 -1
  312. package/dist/components/co-drive-card.js +1 -1
  313. package/dist/components/co-drop-zone.js +1 -1
  314. package/dist/components/co-empty-state.js +1 -1
  315. package/dist/components/co-event-calendar.js +1 -1
  316. package/dist/components/co-fab.js +1 -1
  317. package/dist/components/co-file-field.js +1 -1
  318. package/dist/components/co-file-type-tile.js +1 -1
  319. package/dist/components/co-helper-text.js +1 -1
  320. package/dist/components/co-icon-button.js +1 -1
  321. package/dist/components/co-icon.js +1 -1
  322. package/dist/components/co-input.js +1 -1
  323. package/dist/components/co-json-field.js +1 -1
  324. package/dist/components/co-lightbox.js +1 -1
  325. package/dist/components/co-list-footer.js +1 -1
  326. package/dist/components/co-list-item.js +1 -1
  327. package/dist/components/co-media-thumb.js +1 -1
  328. package/dist/components/co-menu-divider.js +1 -1
  329. package/dist/components/co-menu-item.js +1 -1
  330. package/dist/components/co-menu.js +1 -1
  331. package/dist/components/co-modal.js +1 -1
  332. package/dist/components/co-navbar.js +1 -1
  333. package/dist/components/co-number-field.js +1 -1
  334. package/dist/components/co-option-list.js +1 -1
  335. package/dist/components/co-overlay.js +1 -1
  336. package/dist/components/co-page-header.js +1 -1
  337. package/dist/components/co-phone-field.js +1 -1
  338. package/dist/components/co-progress-bar.js +1 -1
  339. package/dist/components/co-progress-circle.js +1 -1
  340. package/dist/components/co-radio-group.js +1 -1
  341. package/dist/components/co-radio.js +1 -1
  342. package/dist/components/co-rating.js +1 -1
  343. package/dist/components/co-ref-field.js +1 -1
  344. package/dist/components/co-rich-text-editor.js +1 -1
  345. package/dist/components/co-rich-text-toolbar.js +1 -1
  346. package/dist/components/co-rich-text-viewer.js +1 -1
  347. package/dist/components/co-row.js +1 -1
  348. package/dist/components/co-select.js +1 -1
  349. package/dist/components/co-separator.js +1 -1
  350. package/dist/components/co-sidebar-nav.js +1 -1
  351. package/dist/components/co-sidebar.js +1 -1
  352. package/dist/components/co-skeleton.js +1 -1
  353. package/dist/components/co-slider.js +1 -1
  354. package/dist/components/co-switch.js +1 -1
  355. package/dist/components/co-tab-group.js +1 -1
  356. package/dist/components/co-tab.js +1 -1
  357. package/dist/components/co-tags-field.js +1 -1
  358. package/dist/components/co-textarea.js +1 -1
  359. package/dist/components/co-toast.js +1 -1
  360. package/dist/components/co-toggle-button-group.js +1 -1
  361. package/dist/components/co-toggle-button.js +1 -1
  362. package/dist/components/co-tooltip.js +1 -1
  363. package/dist/components/co-transfer-list.js +1 -1
  364. package/dist/components/co-video.js +1 -1
  365. package/dist/components/index.js +1 -1
  366. package/dist/components/{p-CNIs9j-h.js → p-9aNhJfTT.js} +1 -1
  367. package/dist/components/{p-QWi9AmnD.js → p-B0b9Etx4.js} +1 -1
  368. package/dist/components/{p-D4SOCy8I.js → p-B3U63yZw.js} +1 -1
  369. package/dist/components/p-B7Yv00g9.js +1 -0
  370. package/dist/components/{p-Bgxofdfb.js → p-BL0sCfMH.js} +1 -1
  371. package/dist/components/{p-DrQh1Cb8.js → p-BTa6ss5i.js} +1 -1
  372. package/dist/components/p-BtpRnpaF.js +1 -0
  373. package/dist/components/{p-lus32JrB.js → p-Bul6EdDX.js} +1 -1
  374. package/dist/components/{p-COb8X_fE.js → p-Bzg5FPSA.js} +1 -1
  375. package/dist/components/{p-Cam92sWP.js → p-CQ-8domm.js} +1 -1
  376. package/dist/components/p-CVeEoHr7.js +1 -0
  377. package/dist/components/p-CYi6V_Ss.js +1 -0
  378. package/dist/components/{p-DvL2TcDG.js → p-Cd3inFSL.js} +1 -1
  379. package/dist/components/{p-OKwHt2i9.js → p-CuQjKAf5.js} +1 -1
  380. package/dist/components/{p-Ba5lW0pA.js → p-DKvTqEaf.js} +1 -1
  381. package/dist/components/p-DfpOEXHC.js +1 -0
  382. package/dist/components/p-DwwxS5bY.js +1 -0
  383. package/dist/components/p-T0UfY6rA.js +1 -0
  384. package/dist/components/p-WeuPA9Rw.js +1 -0
  385. package/dist/components/{p-_k-j03K-.js → p-oV_1MoAN.js} +1 -1
  386. package/dist/esm/co-accordion.entry.js +1 -1
  387. package/dist/esm/co-app-shell.entry.js +1 -1
  388. package/dist/esm/co-autocomplete.entry.js +3 -3
  389. package/dist/esm/co-avatar-group.entry.js +3 -3
  390. package/dist/esm/{co-tooltip.entry.js → co-avatar_2.entry.js} +95 -4
  391. package/dist/esm/co-badge.entry.js +2 -2
  392. package/dist/esm/co-bottom-sheet.entry.js +4 -4
  393. package/dist/esm/co-breadcrumb-item.entry.js +3 -3
  394. package/dist/esm/co-breadcrumb.entry.js +2 -2
  395. package/dist/esm/co-button-group.entry.js +3 -3
  396. package/dist/esm/co-button.entry.js +4 -4
  397. package/dist/esm/co-calendar-month.entry.js +2 -2
  398. package/dist/esm/co-calendar_3.entry.js +8 -8
  399. package/dist/esm/co-card.entry.js +3 -3
  400. package/dist/esm/co-carousel-item.entry.js +15 -0
  401. package/dist/esm/co-carousel.entry.js +366 -0
  402. package/dist/esm/co-checkbox-group.entry.js +1 -1
  403. package/dist/esm/co-checkbox.entry.js +4 -4
  404. package/dist/esm/co-chip_2.entry.js +5 -5
  405. package/dist/esm/co-color-picker.entry.js +5 -5
  406. package/dist/esm/co-column-picker.entry.js +3 -3
  407. package/dist/esm/co-combobox.entry.js +3 -3
  408. package/dist/esm/co-command-search.entry.js +1 -1
  409. package/dist/esm/co-data-table-pagination.entry.js +5 -5
  410. package/dist/esm/co-data-table.entry.js +2 -2
  411. package/dist/esm/co-date-picker.entry.js +11 -4
  412. package/dist/esm/co-date-range-picker.entry.js +9 -3
  413. package/dist/esm/co-date-range.entry.js +2 -2
  414. package/dist/esm/co-drive-card.entry.js +2 -2
  415. package/dist/esm/co-drop-zone.entry.js +2 -2
  416. package/dist/esm/co-empty-state.entry.js +3 -3
  417. package/dist/esm/co-event-calendar.entry.js +3 -3
  418. package/dist/esm/co-fab.entry.js +21 -6
  419. package/dist/esm/co-file-field.entry.js +8 -8
  420. package/dist/esm/co-file-type-tile.entry.js +3 -3
  421. package/dist/esm/co-helper-text.entry.js +3 -3
  422. package/dist/esm/co-icon-button.entry.js +2 -2
  423. package/dist/esm/co-icon.entry.js +3 -3
  424. package/dist/esm/co-input.entry.js +25 -3
  425. package/dist/esm/co-json-field.entry.js +6 -6
  426. package/dist/esm/co-lightbox.entry.js +33 -6
  427. package/dist/esm/co-list-footer.entry.js +2 -2
  428. package/dist/esm/co-list-item.entry.js +5 -5
  429. package/dist/esm/co-loader.entry.js +1 -1
  430. package/dist/esm/co-media-thumb.entry.js +3 -3
  431. package/dist/esm/co-menu-divider.entry.js +2 -2
  432. package/dist/esm/co-menu-item.entry.js +1 -1
  433. package/dist/esm/co-menu.entry.js +2 -2
  434. package/dist/esm/co-modal.entry.js +3 -3
  435. package/dist/esm/co-navbar.entry.js +3 -3
  436. package/dist/esm/co-number-field.entry.js +5 -5
  437. package/dist/esm/co-overlay.entry.js +2 -2
  438. package/dist/esm/co-page-header.entry.js +2 -2
  439. package/dist/esm/co-phone-field.entry.js +4 -4
  440. package/dist/esm/co-popover.entry.js +1 -1
  441. package/dist/esm/co-progress-bar.entry.js +3 -3
  442. package/dist/esm/co-progress-circle.entry.js +3 -3
  443. package/dist/esm/co-radio-group.entry.js +1 -1
  444. package/dist/esm/co-radio.entry.js +4 -4
  445. package/dist/esm/co-rating.entry.js +4 -4
  446. package/dist/esm/co-ref-field.entry.js +11 -5
  447. package/dist/esm/co-rich-text-editor.entry.js +22 -7
  448. package/dist/esm/co-rich-text-toolbar.entry.js +36 -4
  449. package/dist/esm/co-rich-text-viewer.entry.js +36 -6
  450. package/dist/esm/co-row.entry.js +3 -3
  451. package/dist/esm/co-segmented-bar.entry.js +1 -1
  452. package/dist/esm/co-select.entry.js +13 -7
  453. package/dist/esm/co-separator.entry.js +2 -2
  454. package/dist/esm/co-sidebar-nav.entry.js +1 -1
  455. package/dist/esm/co-sidebar.entry.js +3 -3
  456. package/dist/esm/co-skeleton.entry.js +2 -2
  457. package/dist/esm/co-slider.entry.js +3 -3
  458. package/dist/esm/co-switch.entry.js +5 -5
  459. package/dist/esm/co-tab-group.entry.js +4 -4
  460. package/dist/esm/co-tab.entry.js +3 -3
  461. package/dist/esm/co-tags-field.entry.js +9 -9
  462. package/dist/esm/co-textarea.entry.js +13 -7
  463. package/dist/esm/co-toast.entry.js +1 -1
  464. package/dist/esm/co-toggle-button-group.entry.js +3 -3
  465. package/dist/esm/co-toggle-button.entry.js +3 -3
  466. package/dist/esm/co-transfer-list.entry.js +1 -1
  467. package/dist/esm/co-video.entry.js +3 -3
  468. package/dist/esm/cobalt.js +3 -3
  469. package/dist/esm/{fieldChip-ChXW__C5.js → fieldChip-Bb8YIN0J.js} +1 -1
  470. package/dist/esm/{index-tT-aZV0-.js → index-BCEz3S-z.js} +13 -9
  471. package/dist/esm/{index-Cyrxk8Qq.js → index-RuXxdKzC.js} +171 -11
  472. package/dist/esm/loader.js +3 -3
  473. package/dist/esm/{requiredMark-C7-_2UhB.js → requiredMark-D7kAMXHM.js} +1 -1
  474. package/dist/esm/{richTextI18n-B-ckjCUA.js → richTextI18n-BYKAgwq3.js} +3 -0
  475. package/dist/esm/{toolbar-config-ChibIpZv.js → toolbar-config-WeuPA9Rw.js} +2 -0
  476. package/dist/types/components/co-avatar/co-avatar.d.ts +5 -0
  477. package/dist/types/components/co-carousel/co-carousel.d.ts +85 -0
  478. package/dist/types/components/co-carousel-item/co-carousel-item.d.ts +10 -0
  479. package/dist/types/components/co-date-picker/co-date-picker.d.ts +7 -0
  480. package/dist/types/components/co-date-range-picker/co-date-range-picker.d.ts +5 -0
  481. package/dist/types/components/co-fab/co-fab.d.ts +6 -0
  482. package/dist/types/components/co-input/co-input.d.ts +14 -0
  483. package/dist/types/components/co-lightbox/co-lightbox.d.ts +7 -0
  484. package/dist/types/components/co-ref-field/co-ref-field.d.ts +5 -0
  485. package/dist/types/components/co-rich-text-editor/co-rich-text-editor.d.ts +17 -0
  486. package/dist/types/components/co-rich-text-toolbar/co-rich-text-toolbar.d.ts +12 -1
  487. package/dist/types/components/co-rich-text-viewer/co-rich-text-viewer.d.ts +10 -0
  488. package/dist/types/components/co-select/co-select.d.ts +5 -0
  489. package/dist/types/components/co-textarea/co-textarea.d.ts +5 -0
  490. package/dist/types/components.d.ts +378 -3
  491. package/dist/types/utils/carouselI18n.d.ts +10 -0
  492. package/dist/types/utils/richTextI18n.d.ts +1 -0
  493. package/package.json +2 -2
  494. package/dist/cjs/co-avatar.cjs.entry.js +0 -92
  495. package/dist/cobalt/p-0c0621a7.entry.js +0 -1
  496. package/dist/cobalt/p-13fc9c8a.entry.js +0 -1
  497. package/dist/cobalt/p-3f68fd2e.entry.js +0 -1
  498. package/dist/cobalt/p-4a075257.entry.js +0 -1
  499. package/dist/cobalt/p-5647ca9d.entry.js +0 -1
  500. package/dist/cobalt/p-5b31d45b.entry.js +0 -1
  501. package/dist/cobalt/p-6911a034.entry.js +0 -1
  502. package/dist/cobalt/p-70f70e02.entry.js +0 -1
  503. package/dist/cobalt/p-73b30ebb.entry.js +0 -1
  504. package/dist/cobalt/p-7780ddb5.entry.js +0 -1
  505. package/dist/cobalt/p-7FZXeBK4.js +0 -1
  506. package/dist/cobalt/p-7a3fb93b.entry.js +0 -1
  507. package/dist/cobalt/p-82ce1178.entry.js +0 -1
  508. package/dist/cobalt/p-86d4e016.entry.js +0 -1
  509. package/dist/cobalt/p-8a9ed2da.entry.js +0 -1
  510. package/dist/cobalt/p-B-ckjCUA.js +0 -1
  511. package/dist/cobalt/p-BAA4ln31.js +0 -1
  512. package/dist/cobalt/p-ChibIpZv.js +0 -1
  513. package/dist/cobalt/p-aa20ffca.entry.js +0 -1
  514. package/dist/cobalt/p-ac5df270.entry.js +0 -1
  515. package/dist/cobalt/p-c2e2eee9.entry.js +0 -1
  516. package/dist/cobalt/p-cc8e2f16.entry.js +0 -1
  517. package/dist/cobalt/p-e1957078.entry.js +0 -1
  518. package/dist/cobalt/p-e2762263.entry.js +0 -1
  519. package/dist/cobalt/p-e4a539da.entry.js +0 -1
  520. package/dist/cobalt/p-e7085f08.entry.js +0 -1
  521. package/dist/cobalt/p-e9aaeaf7.entry.js +0 -1
  522. package/dist/cobalt/p-f36e461f.entry.js +0 -1
  523. package/dist/cobalt/p-f6b0c4a0.entry.js +0 -1
  524. package/dist/cobalt/p-tT-aZV0-.js +0 -2
  525. package/dist/components/p-BHqdcGDh.js +0 -1
  526. package/dist/components/p-BJTMFYax.js +0 -1
  527. package/dist/components/p-ChibIpZv.js +0 -1
  528. package/dist/components/p-D3ts7oo9.js +0 -1
  529. package/dist/components/p-Dh-h40mY.js +0 -1
  530. package/dist/components/p-Xwo2HQmt.js +0 -1
  531. package/dist/components/p-eSq2ze8W.js +0 -1
  532. package/dist/components/p-ivjj-BP8.js +0 -1
  533. package/dist/esm/co-avatar.entry.js +0 -90
@@ -1 +1 @@
1
- import{r,c as e,h as a,H as o}from"./p-tT-aZV0-.js";const t=class{constructor(a){r(this,a),this.coSidebarModeChange=e(this,"coSidebarModeChange",7),this.sidebarMode="min",this.contentCard=!0}render(){return a(o,{key:"eba2c0de5107ee99f46dd0f58e93c7957b635fc6"},a("aside",{key:"d70fd877fb8b0341f1a93d0c96f7e94ccc67a5bc",class:"sidebar",part:"sidebar"},a("div",{key:"712d562d0137d49073264464a4656efa13505080",class:"sidebar__header",part:"sidebar-header"},a("slot",{key:"3414826e8939d2cd01f1fcdca7dadf1ec6c6921e",name:"sidebar-header"})),a("div",{key:"2f9ec77ce51b77048130c042a7c275b8f1169b68",class:"sidebar__body",part:"sidebar-body"},a("slot",{key:"6291e33cce9afcfb59fac200629f899206d667eb",name:"sidebar"})),a("div",{key:"e3314bda8652362d2570960a0ee65fb843d6e07f",class:"sidebar__footer",part:"sidebar-footer"},a("slot",{key:"e2b09d7a7435e0c29f3ac43b9a4200763964d52e",name:"sidebar-footer"}))),a("div",{key:"73081c14cf2f04ad4b0062007287edea09bb3a88",class:"main",part:"main"},a("div",{key:"5e3dbe0b27716f815972ea39dda4479b2072872c",class:"main__card",part:"card"},a("header",{key:"3df713d4c3a015ba14366433770cfba66e9b8bbc",class:"main__header",part:"header"},a("slot",{key:"8e36000c6195f22fb7abe54d1adfb026374d9248",name:"navbar"})),a("main",{key:"63cda7e07239d551fb950e12cce998e2fe9271c7",class:{main__content:!0,"main__content--card":this.contentCard},part:"content"},a("slot",{key:"7ccab85592e8e9efdc2802f0147ad8b5ad749899"})))))}};t.style=':host{display:flex;height:100vh;overflow:hidden;background:var(--co-app-shell-bg, linear-gradient( 180deg, var(--co-color-base-off-white) 0%, var(--co-color-neutral-100) 50%, var(--co-color-neutral-100) 100% ));font-family:var(--co-font-family-primary)}.sidebar{display:flex;flex-direction:column;width:256px;height:100%;flex-shrink:0;overflow:hidden;transition:width 0.2s ease;padding:var(--co-spacing-sm);padding-right:0;box-sizing:border-box}:host([sidebar-mode="min"]) .sidebar{--co-sidebar-min-width:64px;width:var(--co-sidebar-min-width);align-items:flex-start;padding:var(--co-spacing-sm) 0}.sidebar__header{flex-shrink:0}.sidebar__body{flex:1;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:transparent transparent}.sidebar__body:hover{scrollbar-color:var(--co-color-opacity-blanco-16) transparent}.sidebar__body::-webkit-scrollbar{width:6px}.sidebar__body::-webkit-scrollbar-track{background:transparent}.sidebar__body::-webkit-scrollbar-thumb{background:transparent;border-radius:9999px}.sidebar__body:hover::-webkit-scrollbar-thumb{background:var(--co-color-opacity-blanco-16)}.sidebar__body:hover::-webkit-scrollbar-thumb:hover{background:var(--co-color-opacity-blanco-25)}.sidebar__body:hover::-webkit-scrollbar-thumb:active{background:var(--co-color-opacity-blanco-50)}.sidebar__footer{flex-shrink:0}:host([sidebar-mode="min"]) .sidebar__header,:host([sidebar-mode="min"]) .sidebar__body,:host([sidebar-mode="min"]) .sidebar__footer{display:flex;flex-direction:column;align-items:center;width:var(--co-sidebar-min-width, 64px)}:host([sidebar-mode="min"]) .sidebar__header{gap:var(--co-spacing-sm);padding-bottom:var(--co-spacing-md)}:host([sidebar-mode="min"]) .sidebar__body{scrollbar-width:none}:host([sidebar-mode="min"]) .sidebar__body::-webkit-scrollbar{width:0}.main{display:flex;flex-direction:column;flex:1;min-width:0;padding:0;margin:var(--co-spacing-sm);margin-left:0;min-height:0;filter:drop-shadow(0 1px 2px rgba(31, 28, 27, 0.06)) drop-shadow(0 10px 28px rgba(31, 28, 27, 0.12));--co-shell-r:var(--co-border-radius-md);--co-sq-tl:url("data:image/svg+xml,<svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 100 100%27 preserveAspectRatio=%27none%27><path d=%27M100 0L97.5 0L95 0L92.5 0L90 0L87.5 0.01L85 0.01L82.5 0.02L80 0.04L77.5 0.06L75 0.1L72.5 0.14L70 0.2L67.5 0.28L65 0.38L62.5 0.5L60 0.65L57.5 0.83L55 1.04L52.5 1.3L50 1.6L47.5 1.96L45 2.37L42.5 2.85L40 3.41L37.5 4.05L35 4.8L32.5 5.65L30 6.63L27.5 7.77L25 9.07L22.5 10.58L20 12.34L17.5 14.41L15 16.85L12.5 19.79L10 23.42L7.5 28.06L5 34.37L2.5 44.29L0 100L100 100Z%27 fill=%27%23fff%27/></svg>");--co-sq-tr:url("data:image/svg+xml,<svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 100 100%27 preserveAspectRatio=%27none%27><path d=%27M0 0L2.5 0L5 0L7.5 0L10 0L12.5 0.01L15 0.01L17.5 0.02L20 0.04L22.5 0.06L25 0.1L27.5 0.14L30 0.2L32.5 0.28L35 0.38L37.5 0.5L40 0.65L42.5 0.83L45 1.04L47.5 1.3L50 1.6L52.5 1.96L55 2.37L57.5 2.85L60 3.41L62.5 4.05L65 4.8L67.5 5.65L70 6.63L72.5 7.77L75 9.07L77.5 10.58L80 12.34L82.5 14.41L85 16.85L87.5 19.79L90 23.42L92.5 28.06L95 34.37L97.5 44.29L100 100L0 100Z%27 fill=%27%23fff%27/></svg>");--co-sq-bl:url("data:image/svg+xml,<svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 100 100%27 preserveAspectRatio=%27none%27><path d=%27M0 0L2.5 55.71L5 65.63L7.5 71.94L10 76.58L12.5 80.21L15 83.15L17.5 85.59L20 87.66L22.5 89.42L25 90.93L27.5 92.23L30 93.37L32.5 94.35L35 95.2L37.5 95.95L40 96.59L42.5 97.15L45 97.63L47.5 98.04L50 98.4L52.5 98.7L55 98.96L57.5 99.17L60 99.35L62.5 99.5L65 99.62L67.5 99.72L70 99.8L72.5 99.86L75 99.9L77.5 99.94L80 99.96L82.5 99.98L85 99.99L87.5 99.99L90 100L92.5 100L95 100L97.5 100L100 100L100 0Z%27 fill=%27%23fff%27/></svg>");--co-sq-br:url("data:image/svg+xml,<svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 100 100%27 preserveAspectRatio=%27none%27><path d=%27M100 0L97.5 55.71L95 65.63L92.5 71.94L90 76.58L87.5 80.21L85 83.15L82.5 85.59L80 87.66L77.5 89.42L75 90.93L72.5 92.23L70 93.37L67.5 94.35L65 95.2L62.5 95.95L60 96.59L57.5 97.15L55 97.63L52.5 98.04L50 98.4L47.5 98.7L45 98.96L42.5 99.17L40 99.35L37.5 99.5L35 99.62L32.5 99.72L30 99.8L27.5 99.86L25 99.9L22.5 99.94L20 99.96L17.5 99.98L15 99.99L12.5 99.99L10 100L7.5 100L5 100L2.5 100L0 100L0 0Z%27 fill=%27%23fff%27/></svg>")}.main__card{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden;border-radius:0;-webkit-mask:var(--co-sq-tl) top left / var(--co-shell-r) var(--co-shell-r) no-repeat, var(--co-sq-tr) top right / var(--co-shell-r) var(--co-shell-r) no-repeat, var(--co-sq-bl) bottom left / var(--co-shell-r) var(--co-shell-r) no-repeat, var(--co-sq-br) bottom right / var(--co-shell-r) var(--co-shell-r) no-repeat, linear-gradient(#fff 0 0) center / 100% calc(100% - 2 * var(--co-shell-r) + 2px) no-repeat, linear-gradient(#fff 0 0) center / calc(100% - 2 * var(--co-shell-r) + 2px) 100% no-repeat;mask:var(--co-sq-tl) top left / var(--co-shell-r) var(--co-shell-r) no-repeat, var(--co-sq-tr) top right / var(--co-shell-r) var(--co-shell-r) no-repeat, var(--co-sq-bl) bottom left / var(--co-shell-r) var(--co-shell-r) no-repeat, var(--co-sq-br) bottom right / var(--co-shell-r) var(--co-shell-r) no-repeat, linear-gradient(#fff 0 0) center / 100% calc(100% - 2 * var(--co-shell-r) + 2px) no-repeat, linear-gradient(#fff 0 0) center / calc(100% - 2 * var(--co-shell-r) + 2px) 100% no-repeat}.main__header{flex-shrink:0}.main__content{flex:1;min-height:0;overflow:hidden;scrollbar-width:thin;scrollbar-color:transparent transparent}.main__content:hover{scrollbar-color:var(--co-color-opacity-negro-16) transparent}.main__content::-webkit-scrollbar{width:6px;height:6px}.main__content::-webkit-scrollbar-track{background:transparent}.main__content::-webkit-scrollbar-thumb{background:transparent;border-radius:9999px}.main__content:hover::-webkit-scrollbar-thumb{background:var(--co-color-opacity-negro-16)}.main__content:hover::-webkit-scrollbar-thumb:hover{background:var(--co-color-opacity-negro-25)}.main__content:hover::-webkit-scrollbar-thumb:active{background:var(--co-color-opacity-negro-50)}.main__content--card{background:var(--co-semantic-surface-secondary)}';export{t as co_app_shell}
1
+ import{r,c as e,h as a,H as o}from"./p-BCEz3S-z.js";const t=class{constructor(a){r(this,a),this.coSidebarModeChange=e(this,"coSidebarModeChange",7),this.sidebarMode="min",this.contentCard=!0}render(){return a(o,{key:"eba2c0de5107ee99f46dd0f58e93c7957b635fc6"},a("aside",{key:"d70fd877fb8b0341f1a93d0c96f7e94ccc67a5bc",class:"sidebar",part:"sidebar"},a("div",{key:"712d562d0137d49073264464a4656efa13505080",class:"sidebar__header",part:"sidebar-header"},a("slot",{key:"3414826e8939d2cd01f1fcdca7dadf1ec6c6921e",name:"sidebar-header"})),a("div",{key:"2f9ec77ce51b77048130c042a7c275b8f1169b68",class:"sidebar__body",part:"sidebar-body"},a("slot",{key:"6291e33cce9afcfb59fac200629f899206d667eb",name:"sidebar"})),a("div",{key:"e3314bda8652362d2570960a0ee65fb843d6e07f",class:"sidebar__footer",part:"sidebar-footer"},a("slot",{key:"e2b09d7a7435e0c29f3ac43b9a4200763964d52e",name:"sidebar-footer"}))),a("div",{key:"73081c14cf2f04ad4b0062007287edea09bb3a88",class:"main",part:"main"},a("div",{key:"5e3dbe0b27716f815972ea39dda4479b2072872c",class:"main__card",part:"card"},a("header",{key:"3df713d4c3a015ba14366433770cfba66e9b8bbc",class:"main__header",part:"header"},a("slot",{key:"8e36000c6195f22fb7abe54d1adfb026374d9248",name:"navbar"})),a("main",{key:"63cda7e07239d551fb950e12cce998e2fe9271c7",class:{main__content:!0,"main__content--card":this.contentCard},part:"content"},a("slot",{key:"7ccab85592e8e9efdc2802f0147ad8b5ad749899"})))))}};t.style=':host{display:flex;height:100vh;overflow:hidden;background:var(--co-app-shell-bg, linear-gradient( 180deg, var(--co-color-base-off-white) 0%, var(--co-color-neutral-100) 50%, var(--co-color-neutral-100) 100% ));font-family:var(--co-font-family-primary)}.sidebar{display:flex;flex-direction:column;width:256px;height:100%;flex-shrink:0;overflow:hidden;transition:width 0.2s ease;padding:var(--co-spacing-sm);padding-right:0;box-sizing:border-box}:host([sidebar-mode="min"]) .sidebar{--co-sidebar-min-width:64px;width:var(--co-sidebar-min-width);align-items:flex-start;padding:var(--co-spacing-sm) 0}.sidebar__header{flex-shrink:0}.sidebar__body{flex:1;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:transparent transparent}.sidebar__body:hover{scrollbar-color:var(--co-color-opacity-blanco-16) transparent}.sidebar__body::-webkit-scrollbar{width:6px}.sidebar__body::-webkit-scrollbar-track{background:transparent}.sidebar__body::-webkit-scrollbar-thumb{background:transparent;border-radius:9999px}.sidebar__body:hover::-webkit-scrollbar-thumb{background:var(--co-color-opacity-blanco-16)}.sidebar__body:hover::-webkit-scrollbar-thumb:hover{background:var(--co-color-opacity-blanco-25)}.sidebar__body:hover::-webkit-scrollbar-thumb:active{background:var(--co-color-opacity-blanco-50)}.sidebar__footer{flex-shrink:0}:host([sidebar-mode="min"]) .sidebar__header,:host([sidebar-mode="min"]) .sidebar__body,:host([sidebar-mode="min"]) .sidebar__footer{display:flex;flex-direction:column;align-items:center;width:var(--co-sidebar-min-width, 64px)}:host([sidebar-mode="min"]) .sidebar__header{gap:var(--co-spacing-sm);padding-bottom:var(--co-spacing-md)}:host([sidebar-mode="min"]) .sidebar__body{scrollbar-width:none}:host([sidebar-mode="min"]) .sidebar__body::-webkit-scrollbar{width:0}.main{display:flex;flex-direction:column;flex:1;min-width:0;padding:0;margin:var(--co-spacing-sm);margin-left:0;min-height:0;filter:drop-shadow(0 1px 2px rgba(31, 28, 27, 0.06)) drop-shadow(0 10px 28px rgba(31, 28, 27, 0.12));--co-shell-r:var(--co-border-radius-md);--co-sq-tl:url("data:image/svg+xml,<svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 100 100%27 preserveAspectRatio=%27none%27><path d=%27M100 0L97.5 0L95 0L92.5 0L90 0L87.5 0.01L85 0.01L82.5 0.02L80 0.04L77.5 0.06L75 0.1L72.5 0.14L70 0.2L67.5 0.28L65 0.38L62.5 0.5L60 0.65L57.5 0.83L55 1.04L52.5 1.3L50 1.6L47.5 1.96L45 2.37L42.5 2.85L40 3.41L37.5 4.05L35 4.8L32.5 5.65L30 6.63L27.5 7.77L25 9.07L22.5 10.58L20 12.34L17.5 14.41L15 16.85L12.5 19.79L10 23.42L7.5 28.06L5 34.37L2.5 44.29L0 100L100 100Z%27 fill=%27%23fff%27/></svg>");--co-sq-tr:url("data:image/svg+xml,<svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 100 100%27 preserveAspectRatio=%27none%27><path d=%27M0 0L2.5 0L5 0L7.5 0L10 0L12.5 0.01L15 0.01L17.5 0.02L20 0.04L22.5 0.06L25 0.1L27.5 0.14L30 0.2L32.5 0.28L35 0.38L37.5 0.5L40 0.65L42.5 0.83L45 1.04L47.5 1.3L50 1.6L52.5 1.96L55 2.37L57.5 2.85L60 3.41L62.5 4.05L65 4.8L67.5 5.65L70 6.63L72.5 7.77L75 9.07L77.5 10.58L80 12.34L82.5 14.41L85 16.85L87.5 19.79L90 23.42L92.5 28.06L95 34.37L97.5 44.29L100 100L0 100Z%27 fill=%27%23fff%27/></svg>");--co-sq-bl:url("data:image/svg+xml,<svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 100 100%27 preserveAspectRatio=%27none%27><path d=%27M0 0L2.5 55.71L5 65.63L7.5 71.94L10 76.58L12.5 80.21L15 83.15L17.5 85.59L20 87.66L22.5 89.42L25 90.93L27.5 92.23L30 93.37L32.5 94.35L35 95.2L37.5 95.95L40 96.59L42.5 97.15L45 97.63L47.5 98.04L50 98.4L52.5 98.7L55 98.96L57.5 99.17L60 99.35L62.5 99.5L65 99.62L67.5 99.72L70 99.8L72.5 99.86L75 99.9L77.5 99.94L80 99.96L82.5 99.98L85 99.99L87.5 99.99L90 100L92.5 100L95 100L97.5 100L100 100L100 0Z%27 fill=%27%23fff%27/></svg>");--co-sq-br:url("data:image/svg+xml,<svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 100 100%27 preserveAspectRatio=%27none%27><path d=%27M100 0L97.5 55.71L95 65.63L92.5 71.94L90 76.58L87.5 80.21L85 83.15L82.5 85.59L80 87.66L77.5 89.42L75 90.93L72.5 92.23L70 93.37L67.5 94.35L65 95.2L62.5 95.95L60 96.59L57.5 97.15L55 97.63L52.5 98.04L50 98.4L47.5 98.7L45 98.96L42.5 99.17L40 99.35L37.5 99.5L35 99.62L32.5 99.72L30 99.8L27.5 99.86L25 99.9L22.5 99.94L20 99.96L17.5 99.98L15 99.99L12.5 99.99L10 100L7.5 100L5 100L2.5 100L0 100L0 0Z%27 fill=%27%23fff%27/></svg>")}.main__card{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden;border-radius:0;-webkit-mask:var(--co-sq-tl) top left / var(--co-shell-r) var(--co-shell-r) no-repeat, var(--co-sq-tr) top right / var(--co-shell-r) var(--co-shell-r) no-repeat, var(--co-sq-bl) bottom left / var(--co-shell-r) var(--co-shell-r) no-repeat, var(--co-sq-br) bottom right / var(--co-shell-r) var(--co-shell-r) no-repeat, linear-gradient(#fff 0 0) center / 100% calc(100% - 2 * var(--co-shell-r) + 2px) no-repeat, linear-gradient(#fff 0 0) center / calc(100% - 2 * var(--co-shell-r) + 2px) 100% no-repeat;mask:var(--co-sq-tl) top left / var(--co-shell-r) var(--co-shell-r) no-repeat, var(--co-sq-tr) top right / var(--co-shell-r) var(--co-shell-r) no-repeat, var(--co-sq-bl) bottom left / var(--co-shell-r) var(--co-shell-r) no-repeat, var(--co-sq-br) bottom right / var(--co-shell-r) var(--co-shell-r) no-repeat, linear-gradient(#fff 0 0) center / 100% calc(100% - 2 * var(--co-shell-r) + 2px) no-repeat, linear-gradient(#fff 0 0) center / calc(100% - 2 * var(--co-shell-r) + 2px) 100% no-repeat}.main__header{flex-shrink:0}.main__content{flex:1;min-height:0;overflow:hidden;scrollbar-width:thin;scrollbar-color:transparent transparent}.main__content:hover{scrollbar-color:var(--co-color-opacity-negro-16) transparent}.main__content::-webkit-scrollbar{width:6px;height:6px}.main__content::-webkit-scrollbar-track{background:transparent}.main__content::-webkit-scrollbar-thumb{background:transparent;border-radius:9999px}.main__content:hover::-webkit-scrollbar-thumb{background:var(--co-color-opacity-negro-16)}.main__content:hover::-webkit-scrollbar-thumb:hover{background:var(--co-color-opacity-negro-25)}.main__content:hover::-webkit-scrollbar-thumb:active{background:var(--co-color-opacity-negro-50)}.main__content--card{background:var(--co-semantic-surface-secondary)}';export{t as co_app_shell}
@@ -1 +1 @@
1
- import{r as t,c as e,h as i}from"./p-tT-aZV0-.js";import{g as a}from"./p-C1DCLOEl.js";import{a as s,d as o,p as n,g as c,b as r,e as l}from"./p-tPYikBRJ.js";import{t as d,a as h,g as u}from"./p-B6JZk8fL.js";const f=/^\d{4}-\d{2}-\d{2}$/,b=864e5;function p(t){if(!f.exec(t))return null;const[e,i,a]=t.split("-").map(Number);return i<1||i>12||a<1||a>31?null:Date.UTC(e,i-1,a)}function v(t){return h(t).slice(0,10)}function m(t,e={}){if(!t||!t.id||!t.start)return null;const i=e.defaultDurationMinutes??60,a=!0===t.allDay;let s,o,n,c;if(a){const e=p(t.start.slice(0,10));if(null===e)return null;if(s=e,n=v(e),t.end){const i=p(t.end.slice(0,10));o=null!==i&&i>e?i:e+b}else o=e+b;c=v(o)}else{let e;try{e=d(t.start)}catch{return null}if(s=e,n=t.start,t.end){let a;try{a=d(t.end)}catch{return null}o=a>e?a:e+6e4*i}else o=e+6e4*i;c=h(o)}const r=t.status?e.statusColors?.[t.status]:void 0,l=t.editable??!0;return{id:t.id,title:t.title??"",allDay:a,start:n,end:c,startMs:s,endMs:o,status:t.status,backgroundColor:t.backgroundColor??t.color??r?.backgroundColor,borderColor:t.borderColor??r?.borderColor,className:t.className,editable:l,startEditable:t.startEditable??l,durationEditable:t.durationEditable??l,display:t.display??"block",extendedProps:t.extendedProps??{}}}const g=class{constructor(i){t(this,i),this.coEventClick=e(this,"coEventClick",3),this.coDateSelect=e(this,"coDateSelect",3),this.coEventDrop=e(this,"coEventDrop",3),this.coDatesSet=e(this,"coDatesSet",3),this.coViewChange=e(this,"coViewChange",3),this.coMoreClick=e(this,"coMoreClick",3),this.view="month",this.events=[],this.locale="es-CO",this.editable=!0,this.selectable=!0,this.dayMaxEvents=3,this.firstDayOfWeek=1,this.availableViews=["month"],this.defaultDurationMinutes=60,this.goToday=()=>this.setAnchor(s()),this.goPrev=()=>this.step(-1),this.goNext=()=>this.step(1),this.handleDaySelect=t=>{const e=t.detail.date;this.coDateSelect.emit({start:e,end:o(e,1),allDay:!0})},this.handleEventClick=t=>{const e=this.normalized.find((e=>e.id===t.detail.id));e&&this.coEventClick.emit({event:e})},this.handleEventDrop=t=>{const e=this.normalized.find((e=>e.id===t.detail.id));e&&this.coEventDrop.emit({event:e,start:t.detail.start,end:t.detail.end,oldStart:t.detail.oldStart,oldEnd:t.detail.oldEnd,allDay:t.detail.allDay,revert:()=>{}})},this.handleMoreClick=t=>{const e=t.detail.date,i=this.tz,a=this.normalized.filter((t=>{var a;return(t.allDay?t.start.slice(0,10):(a=t.startMs,new Intl.DateTimeFormat("en-CA",{timeZone:i,year:"numeric",month:"2-digit",day:"2-digit"}).format(new Date(a))))===e}));this.coMoreClick.emit({date:e,events:a})}}componentWillLoad(){this.anchor=this.date&&n(this.date)?this.date:s()}componentDidLoad(){this.emitDatesSet()}onDateChange(t){t&&n(t)&&t!==this.anchor&&(this.anchor=t,this.emitDatesSet())}get tz(){return this.timeZone||u()}get normalized(){return function(t,e={}){if(!Array.isArray(t))return[];const i=[];for(const a of t){const t=m(a,e);t&&i.push(t)}return i}(function(t){if(Array.isArray(t))return t;if("string"==typeof t&&t.trim())try{const e=JSON.parse(t);return Array.isArray(e)?e:[]}catch(t){return[]}return[]}(this.events),{defaultDurationMinutes:this.defaultDurationMinutes,statusColors:_(this.statusColors)})}get viewsList(){return Array.isArray(this.availableViews)?this.availableViews:String(this.availableViews).split(",").map((t=>t.trim())).filter(Boolean)}visibleRange(){const t=n(this.anchor),e=c(t.year,t.month,this.firstDayOfWeek);return{start:e[0][0].value,end:o(e[e.length-1][6].value,1)}}emitDatesSet(){const{start:t,end:e}=this.visibleRange();this.coDatesSet.emit({view:this.view,start:t,end:e,activeDate:this.anchor})}setAnchor(t){this.anchor=t,this.date=t,this.emitDatesSet()}step(t){this.setAnchor("month"===this.view?r(this.anchor,t):o(this.anchor,7*t))}switchView(t){t!==this.view&&(this.view=t,this.coViewChange.emit({view:t}),this.emitDatesSet())}title(){const t=n(this.anchor);return l(t.year,t.month,this.locale,"long")}render(){var t;const e=a(this.locale),s=this.viewsList,o=n(this.anchor);return i("div",{key:"dce81390ee349de59285e31506ec397aead8c1c5",class:"cal"},i("div",{key:"58f3acb8a74558505aab88e95fbea15bc65cce2f",class:"cal__toolbar",part:"toolbar"},i("div",{key:"9249edf79de99180871667f813aa40e288f130b7",class:"cal__nav-group"},i("button",{key:"2cb250065f64860466b141b6dcaffeef60158dcc",type:"button",class:"cal__btn",onClick:this.goToday},null!==(t=e.today)&&void 0!==t?t:"Today"),i("button",{key:"15ebc01c5be71b48042735ee6247ad16a957493b",type:"button",class:"cal__icon-btn","aria-label":e.prevMonth,onClick:this.goPrev},i("co-icon",{key:"dc74fc8780144c952c7012cf0e984998650e96a7",name:"caret-left",size:16})),i("button",{key:"e4d2ee75a2c8fa818d327a9d82fa23051ec8a24c",type:"button",class:"cal__icon-btn","aria-label":e.nextMonth,onClick:this.goNext},i("co-icon",{key:"d489365423552d000655898ac267fdbfddd216c0",name:"caret-right",size:16}))),i("h2",{key:"370e61c61a12860d36b4a04cdbc5dee447fdfe46",class:"cal__title","aria-live":"polite"},this.title()),s.length>1?i("div",{class:"cal__views",role:"tablist"},s.map((t=>{var a;return i("button",{type:"button",role:"tab","aria-selected":this.view===t?"true":"false",class:{"cal__view-btn":!0,"cal__view-btn--active":this.view===t},onClick:()=>this.switchView(t)},null!==(a=e[t])&&void 0!==a?a:t)}))):i("span",{class:"cal__views-spacer"})),i("div",{key:"26677d79d63d957315c09df9b18597009c9681cc",class:"cal__body",part:"body"},"month"===this.view?i("co-calendar-month",{events:this.normalized,year:o.year,month:o.month,locale:this.locale,firstDayOfWeek:this.firstDayOfWeek,timeZone:this.tz,minDate:this.minDate,maxDate:this.maxDate,editable:this.editable,selectable:this.selectable,maxLanes:this.dayMaxEvents,onCoDaySelect:this.handleDaySelect,onCoEventClick:this.handleEventClick,onCoEventDrop:this.handleEventDrop,onCoMoreClick:this.handleMoreClick}):i("div",{class:"cal__placeholder"},i("co-icon",{name:"calendar-dots",size:32}),i("p",null,`${this.view} view — coming soon`))))}static get watchers(){return{date:[{onDateChange:0}]}}};function _(t){if(t){if("string"==typeof t)try{return JSON.parse(t)}catch(t){return}return t}}g.style=":host{display:flex;flex-direction:column;gap:var(--co-spacing-md);font-family:var(--co-font-family-primary);color:var(--co-semantic-text-default);block-size:100%;min-block-size:0}.cal{display:flex;flex-direction:column;gap:var(--co-spacing-md);block-size:100%;min-block-size:0}.cal__toolbar{display:flex;align-items:center;gap:var(--co-spacing-md)}.cal__nav-group{display:inline-flex;align-items:center;gap:var(--co-spacing-xs)}.cal__title{flex:1 1 auto;margin:0;text-align:center;font-size:var(--co-font-size-16, 16px);font-weight:600;text-transform:capitalize;color:var(--co-semantic-text-default)}.cal__views-spacer{flex:0 0 auto;inline-size:1px}.cal__btn{height:32px;padding:0 var(--co-spacing-md);background:none;border:1px solid var(--co-semantic-border-default);border-radius:var(--co-border-radius-xs);font-family:inherit;font-size:var(--co-font-size-14, 14px);color:var(--co-semantic-text-default);cursor:pointer;transition:background 0.1s ease}.cal__btn:hover{background:var(--co-semantic-surface-hover)}.cal__btn:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:1px}.cal__icon-btn{height:32px;width:32px;display:inline-flex;align-items:center;justify-content:center;background:none;border:0;border-radius:var(--co-border-radius-xs);color:var(--co-semantic-text-default);cursor:pointer;transition:background 0.1s ease}.cal__icon-btn:hover{background:var(--co-semantic-surface-hover)}.cal__icon-btn:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:1px}.cal__views{display:inline-flex;gap:2px;padding:2px;background:var(--co-semantic-surface-hover);border-radius:var(--co-border-radius-xs)}.cal__view-btn{height:28px;padding:0 var(--co-spacing-md);background:none;border:0;border-radius:var(--co-border-radius-xxs);font-family:inherit;font-size:var(--co-font-size-14, 14px);color:var(--co-semantic-text-secondary);cursor:pointer;text-transform:capitalize}.cal__view-btn--active{background:var(--co-semantic-surface-page);color:var(--co-semantic-text-default);font-weight:600;box-shadow:0 1px 2px rgba(0, 0, 0, 0.08)}.cal__view-btn:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:1px}.cal__body{flex:1 1 auto;min-block-size:0;display:flex;flex-direction:column}.cal__body co-calendar-month{flex:1 1 auto;min-block-size:0}.cal__placeholder{flex:1 1 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--co-spacing-sm);color:var(--co-semantic-text-muted);text-transform:capitalize}";export{g as co_event_calendar}
1
+ import{r as t,c as e,h as i}from"./p-BCEz3S-z.js";import{g as a}from"./p-C1DCLOEl.js";import{a as s,d as o,p as n,g as c,b as r,e as l}from"./p-tPYikBRJ.js";import{t as d,a as h,g as u}from"./p-B6JZk8fL.js";const f=/^\d{4}-\d{2}-\d{2}$/,b=864e5;function p(t){if(!f.exec(t))return null;const[e,i,a]=t.split("-").map(Number);return i<1||i>12||a<1||a>31?null:Date.UTC(e,i-1,a)}function v(t){return h(t).slice(0,10)}function m(t,e={}){if(!t||!t.id||!t.start)return null;const i=e.defaultDurationMinutes??60,a=!0===t.allDay;let s,o,n,c;if(a){const e=p(t.start.slice(0,10));if(null===e)return null;if(s=e,n=v(e),t.end){const i=p(t.end.slice(0,10));o=null!==i&&i>e?i:e+b}else o=e+b;c=v(o)}else{let e;try{e=d(t.start)}catch{return null}if(s=e,n=t.start,t.end){let a;try{a=d(t.end)}catch{return null}o=a>e?a:e+6e4*i}else o=e+6e4*i;c=h(o)}const r=t.status?e.statusColors?.[t.status]:void 0,l=t.editable??!0;return{id:t.id,title:t.title??"",allDay:a,start:n,end:c,startMs:s,endMs:o,status:t.status,backgroundColor:t.backgroundColor??t.color??r?.backgroundColor,borderColor:t.borderColor??r?.borderColor,className:t.className,editable:l,startEditable:t.startEditable??l,durationEditable:t.durationEditable??l,display:t.display??"block",extendedProps:t.extendedProps??{}}}const g=class{constructor(i){t(this,i),this.coEventClick=e(this,"coEventClick",3),this.coDateSelect=e(this,"coDateSelect",3),this.coEventDrop=e(this,"coEventDrop",3),this.coDatesSet=e(this,"coDatesSet",3),this.coViewChange=e(this,"coViewChange",3),this.coMoreClick=e(this,"coMoreClick",3),this.view="month",this.events=[],this.locale="es-CO",this.editable=!0,this.selectable=!0,this.dayMaxEvents=3,this.firstDayOfWeek=1,this.availableViews=["month"],this.defaultDurationMinutes=60,this.goToday=()=>this.setAnchor(s()),this.goPrev=()=>this.step(-1),this.goNext=()=>this.step(1),this.handleDaySelect=t=>{const e=t.detail.date;this.coDateSelect.emit({start:e,end:o(e,1),allDay:!0})},this.handleEventClick=t=>{const e=this.normalized.find((e=>e.id===t.detail.id));e&&this.coEventClick.emit({event:e})},this.handleEventDrop=t=>{const e=this.normalized.find((e=>e.id===t.detail.id));e&&this.coEventDrop.emit({event:e,start:t.detail.start,end:t.detail.end,oldStart:t.detail.oldStart,oldEnd:t.detail.oldEnd,allDay:t.detail.allDay,revert:()=>{}})},this.handleMoreClick=t=>{const e=t.detail.date,i=this.tz,a=this.normalized.filter((t=>{var a;return(t.allDay?t.start.slice(0,10):(a=t.startMs,new Intl.DateTimeFormat("en-CA",{timeZone:i,year:"numeric",month:"2-digit",day:"2-digit"}).format(new Date(a))))===e}));this.coMoreClick.emit({date:e,events:a})}}componentWillLoad(){this.anchor=this.date&&n(this.date)?this.date:s()}componentDidLoad(){this.emitDatesSet()}onDateChange(t){t&&n(t)&&t!==this.anchor&&(this.anchor=t,this.emitDatesSet())}get tz(){return this.timeZone||u()}get normalized(){return function(t,e={}){if(!Array.isArray(t))return[];const i=[];for(const a of t){const t=m(a,e);t&&i.push(t)}return i}(function(t){if(Array.isArray(t))return t;if("string"==typeof t&&t.trim())try{const e=JSON.parse(t);return Array.isArray(e)?e:[]}catch(t){return[]}return[]}(this.events),{defaultDurationMinutes:this.defaultDurationMinutes,statusColors:_(this.statusColors)})}get viewsList(){return Array.isArray(this.availableViews)?this.availableViews:String(this.availableViews).split(",").map((t=>t.trim())).filter(Boolean)}visibleRange(){const t=n(this.anchor),e=c(t.year,t.month,this.firstDayOfWeek);return{start:e[0][0].value,end:o(e[e.length-1][6].value,1)}}emitDatesSet(){const{start:t,end:e}=this.visibleRange();this.coDatesSet.emit({view:this.view,start:t,end:e,activeDate:this.anchor})}setAnchor(t){this.anchor=t,this.date=t,this.emitDatesSet()}step(t){this.setAnchor("month"===this.view?r(this.anchor,t):o(this.anchor,7*t))}switchView(t){t!==this.view&&(this.view=t,this.coViewChange.emit({view:t}),this.emitDatesSet())}title(){const t=n(this.anchor);return l(t.year,t.month,this.locale,"long")}render(){var t;const e=a(this.locale),s=this.viewsList,o=n(this.anchor);return i("div",{key:"4820180047be56115d2b350343c50cd73e3c275c",class:"cal"},i("div",{key:"d623a44932b94bef980f35459247b743ee63b656",class:"cal__toolbar",part:"toolbar"},i("div",{key:"bd3019ee327752aeef1f8f5c8bcd738adf966861",class:"cal__nav-group"},i("button",{key:"7e57307890143d11c1d18599025c9204c88c75fa",type:"button",class:"cal__btn",onClick:this.goToday},null!==(t=e.today)&&void 0!==t?t:"Today"),i("button",{key:"97270e2db26f1d014b4c92f01f68a38881cf9dc5",type:"button",class:"cal__icon-btn","aria-label":e.prevMonth,onClick:this.goPrev},i("co-icon",{key:"64ef0715a090303ca38c039b456ead6e30ec79c9",name:"caret-left",size:16})),i("button",{key:"4c0e5eb70d51c8c7d74c4f49662395cc63d14c8a",type:"button",class:"cal__icon-btn","aria-label":e.nextMonth,onClick:this.goNext},i("co-icon",{key:"e83a4ea954f6be95369b7af5c07fb8b3541761ea",name:"caret-right",size:16}))),i("h2",{key:"465e8b8aa199bb897d81226da06ad899d3c3467e",class:"cal__title","aria-live":"polite"},this.title()),s.length>1?i("div",{class:"cal__views",role:"tablist"},s.map((t=>{var a;return i("button",{type:"button",role:"tab","aria-selected":this.view===t?"true":"false",class:{"cal__view-btn":!0,"cal__view-btn--active":this.view===t},onClick:()=>this.switchView(t)},null!==(a=e[t])&&void 0!==a?a:t)}))):i("span",{class:"cal__views-spacer"})),i("div",{key:"4997eb7d83efa22dab101463c3550e0cee373b89",class:"cal__body",part:"body"},"month"===this.view?i("co-calendar-month",{events:this.normalized,year:o.year,month:o.month,locale:this.locale,firstDayOfWeek:this.firstDayOfWeek,timeZone:this.tz,minDate:this.minDate,maxDate:this.maxDate,editable:this.editable,selectable:this.selectable,maxLanes:this.dayMaxEvents,onCoDaySelect:this.handleDaySelect,onCoEventClick:this.handleEventClick,onCoEventDrop:this.handleEventDrop,onCoMoreClick:this.handleMoreClick}):i("div",{class:"cal__placeholder"},i("co-icon",{name:"calendar-dots",size:32}),i("p",null,`${this.view} view — coming soon`))))}static get watchers(){return{date:[{onDateChange:0}]}}};function _(t){if(t){if("string"==typeof t)try{return JSON.parse(t)}catch(t){return}return t}}g.style=":host{display:flex;flex-direction:column;gap:var(--co-spacing-md);font-family:var(--co-font-family-primary);color:var(--co-semantic-text-default);block-size:100%;min-block-size:0}.cal{display:flex;flex-direction:column;gap:var(--co-spacing-md);block-size:100%;min-block-size:0}.cal__toolbar{display:flex;align-items:center;gap:var(--co-spacing-md)}.cal__nav-group{display:inline-flex;align-items:center;gap:var(--co-spacing-xs)}.cal__title{flex:1 1 auto;margin:0;text-align:center;font-size:var(--co-font-size-16, 16px);font-weight:600;text-transform:capitalize;color:var(--co-semantic-text-default)}.cal__views-spacer{flex:0 0 auto;inline-size:1px}.cal__btn{height:32px;padding:0 var(--co-spacing-md);background:none;border:1px solid var(--co-semantic-border-default);border-radius:var(--co-border-radius-xs);font-family:inherit;font-size:var(--co-font-size-14, 14px);color:var(--co-semantic-text-default);cursor:pointer;transition:background 0.1s ease}.cal__btn:hover{background:var(--co-semantic-surface-hover)}.cal__btn:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:1px}.cal__icon-btn{height:32px;width:32px;display:inline-flex;align-items:center;justify-content:center;background:none;border:0;border-radius:var(--co-border-radius-xs);color:var(--co-semantic-text-default);cursor:pointer;transition:background 0.1s ease}.cal__icon-btn:hover{background:var(--co-semantic-surface-hover)}.cal__icon-btn:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:1px}.cal__views{display:inline-flex;gap:2px;padding:2px;background:var(--co-semantic-surface-hover);border-radius:var(--co-border-radius-xs)}.cal__view-btn{height:28px;padding:0 var(--co-spacing-md);background:none;border:0;border-radius:var(--co-border-radius-xxs);font-family:inherit;font-size:var(--co-font-size-14, 14px);color:var(--co-semantic-text-secondary);cursor:pointer;text-transform:capitalize}.cal__view-btn--active{background:var(--co-semantic-surface-page);color:var(--co-semantic-text-default);font-weight:600;box-shadow:0 1px 2px rgba(0, 0, 0, 0.08)}.cal__view-btn:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:1px}.cal__body{flex:1 1 auto;min-block-size:0;display:flex;flex-direction:column}.cal__body co-calendar-month{flex:1 1 auto;min-block-size:0}.cal__placeholder{flex:1 1 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--co-spacing-sm);color:var(--co-semantic-text-muted);text-transform:capitalize}";export{g as co_event_calendar}
@@ -0,0 +1 @@
1
+ import{r,h as e}from"./p-BCEz3S-z.js";const o=class{constructor(e){r(this,e)}render(){return e("hr",{key:"e47780a9d8f80cf8a9b1b4585e71bb20b2bebf5d",class:"co-menu-divider",role:"separator"})}};o.style=":host{display:block}.co-menu-divider{border:0;border-top:1px solid var(--co-semantic-border-subtle, rgba(31, 28, 27, 0.08));margin:var(--co-spacing-xs, 4px) 0}";export{o as co_menu_divider}
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as o,a as e}from"./p-BCEz3S-z.js";import{l as a}from"./p-C1DCLOEl.js";const s={es:{close:"Cerrar visor",prevImage:"Imagen anterior",nextImage:"Imagen siguiente",zoomIn:"Acercar",zoomOut:"Alejar",zoomReset:"Restablecer zoom",openOriginal:"Abrir original",counter:"{i} de {n}"},en:{close:"Close viewer",prevImage:"Previous image",nextImage:"Next image",zoomIn:"Zoom in",zoomOut:"Zoom out",zoomReset:"Reset zoom",openOriginal:"Open original",counter:"{i} of {n}"},pt:{close:"Fechar visualizador",prevImage:"Imagem anterior",nextImage:"Próxima imagem",zoomIn:"Aproximar",zoomOut:"Afastar",zoomReset:"Redefinir zoom",openOriginal:"Abrir original",counter:"{i} de {n}"}},n=1.15,c=class{constructor(o){t(this,o),this.coClose=i(this,"coClose",3),this.coChange=i(this,"coChange",3),this.images="[]",this.startIndex=0,this.open=!1,this.index=0,this.scale=1,this.tx=0,this.ty=0,this.dragging=!1,this.lastImagesStr="",this.lastParsed=[],this.dragStart={x:0,y:0,tx:0,ty:0},this.pendingFocus=!1,this.syncTopLayer=t=>{t&&(this.rootEl=t);const i=this.rootEl;if(i&&"function"==typeof i.showPopover)if(this.open){clearTimeout(this.demoteTimer);try{i.matches(":popover-open")||i.showPopover()}catch(t){}}else i.matches(":popover-open")&&(clearTimeout(this.demoteTimer),this.demoteTimer=setTimeout((()=>{try{i.hidePopover()}catch(t){}}),220))},this.handleKey=t=>{if(this.open){switch(t.key){case"Escape":this.requestClose();break;case"ArrowLeft":this.goTo(-1);break;case"ArrowRight":this.goTo(1);break;case"+":case"=":this.zoomAt(this.scale*n,0,0);break;case"-":this.zoomAt(this.scale/n,0,0);break;case"0":this.resetView();break;case"Tab":return void this.trapTab(t);default:return}t.preventDefault(),t.stopPropagation()}},this.requestClose=()=>{this.coClose.emit()},this.handleWheel=t=>{t.preventDefault();const[i,o]=this.stagePoint(t);this.zoomAt(this.scale*(t.deltaY<0?n:1/n),i,o)},this.handleDblClick=t=>{const[i,o]=this.stagePoint(t);this.zoomAt(this.scale>1?1:2.5,i,o)},this.handlePointerDown=t=>{var i;this.scale<=1||(t.preventDefault(),this.dragging=!0,this.dragStart={x:t.clientX,y:t.clientY,tx:this.tx,ty:this.ty},null===(i=this.imgEl)||void 0===i||i.setPointerCapture(t.pointerId))},this.handlePointerMove=t=>{if(!this.dragging)return;const i=this.dragStart.tx+(t.clientX-this.dragStart.x),o=this.dragStart.ty+(t.clientY-this.dragStart.y);[this.tx,this.ty]=this.clampPan(i,o,this.scale)},this.handlePointerUp=t=>{var i;this.dragging&&(this.dragging=!1,null===(i=this.imgEl)||void 0===i||i.releasePointerCapture(t.pointerId))},this.openOriginal=()=>{const t=this.parsedImages[this.index];(null==t?void 0:t.src)&&window.open(t.src,"_blank","noopener")},this.stop=t=>t.stopPropagation()}get parsedImages(){const t=this.images;if("string"!=typeof t||!t.trim())return[];if(t===this.lastImagesStr)return this.lastParsed;let i=[];try{const o=JSON.parse(t);Array.isArray(o)&&(i=o.filter((t=>t&&t.src)))}catch(t){}return this.lastImagesStr=t,this.lastParsed=i,i}componentWillLoad(){this.index=this.clampIndex(this.startIndex)}connectedCallback(){this.open&&this.attachKeyListener()}disconnectedCallback(){this.detachKeyListener(),clearTimeout(this.demoteTimer)}componentDidRender(){var t;this.pendingFocus&&(this.pendingFocus=!1,null===(t=this.closeBtnEl)||void 0===t||t.focus())}onOpenChange(t){var i,o,e;this.syncTopLayer(),t?(this.index=this.clampIndex(this.startIndex),this.resetView(),this.preloadNeighbors(),this.attachKeyListener(),this.previouslyFocused=null!==(i=document.activeElement)&&void 0!==i?i:void 0,this.pendingFocus=!0):(this.detachKeyListener(),null===(e=null===(o=this.previouslyFocused)||void 0===o?void 0:o.focus)||void 0===e||e.call(o),this.previouslyFocused=void 0)}onStartIndexChange(t){this.open&&(this.index=this.clampIndex(t),this.resetView())}onImagesChange(){this.index=this.clampIndex(this.index)}attachKeyListener(){window.addEventListener("keydown",this.handleKey,{capture:!0})}detachKeyListener(){window.removeEventListener("keydown",this.handleKey,{capture:!0})}trapTab(t){var i,o,e;const a=Array.from(null!==(o=null===(i=this.el.shadowRoot)||void 0===i?void 0:i.querySelectorAll("button"))&&void 0!==o?o:[]);if(0===a.length)return;t.preventDefault(),t.stopPropagation();const s=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.activeElement,n=a.indexOf(s);a[(n+(t.shiftKey?-1:1)+a.length)%a.length].focus()}clampIndex(t){const i=this.parsedImages.length;return 0===i?0:Math.min(Math.max(0,t),i-1)}resetView(){this.scale=1,this.tx=0,this.ty=0,this.dragging=!1}goTo(t){const i=this.parsedImages.length;i<2||(this.index=(this.index+t+i)%i,this.resetView(),this.coChange.emit(this.index),this.preloadNeighbors())}preloadNeighbors(){const t=this.parsedImages;if(!(t.length<2))for(const i of[1,-1]){const o=t[(this.index+i+t.length)%t.length];(null==o?void 0:o.src)&&((new Image).src=o.src)}}clampPan(t,i,o){const e=this.stageEl,a=this.imgEl;if(!e||!a)return[t,i];const s=Math.max(0,(a.offsetWidth*o-e.clientWidth)/2),n=Math.max(0,(a.offsetHeight*o-e.clientHeight)/2);return[Math.min(Math.max(t,-s),s),Math.min(Math.max(i,-n),n)]}zoomAt(t,i,o){const e=this.scale,a=Math.min(Math.max(t,1),8);if(a===e)return;const s=a/e;let n=i-(i-this.tx)*s,c=o-(o-this.ty)*s;1===a?(n=0,c=0):[n,c]=this.clampPan(n,c,a),this.scale=a,this.tx=n,this.ty=c}stagePoint(t){var i;const o=null===(i=this.stageEl)||void 0===i?void 0:i.getBoundingClientRect();return o?[t.clientX-o.left-o.width/2,t.clientY-o.top-o.height/2]:[0,0]}render(){const t=s[a(this.locale)],i=this.parsedImages,e=i[this.index],c=i.length>1,r=t.counter.replace("{i}",String(this.index+1)).replace("{n}",String(i.length));return o("div",{key:"f29ff8f043b148f1f47fd477e3a12628e292f780",class:{"co-lightbox":!0,"co-lightbox--open":this.open},part:"overlay",role:"dialog","aria-modal":"true","aria-label":null==e?void 0:e.alt,popover:"manual",ref:this.syncTopLayer,onClick:this.requestClose},e&&o("div",{key:"8d258c9fb5f5c7ac7cd17b7195f3f5589030e5fe",class:"co-lightbox__toolbar",part:"toolbar",onClick:this.stop},o("span",{key:"fa246addb464b12803399c22fd7ecc7d47fdf424",class:"co-lightbox__caption",title:e.alt},e.alt),o("div",{key:"05e9748c4b561c8f7169c87ab897192427531ac4",class:"co-lightbox__zoom"},o("button",{key:"c87d84e63161ff23f1b514f992781ff3ccc9d375",class:"co-lightbox__btn",type:"button","aria-label":t.zoomOut,title:t.zoomOut,onClick:()=>this.zoomAt(this.scale/n,0,0)},o("co-icon",{key:"80e9bf45f296b0c5ac16d265c19e88969511ccc6",name:"minus",size:16})),o("button",{key:"aaecee75b60643d885376dee92a8773faf989a3a",class:"co-lightbox__btn co-lightbox__zoom-value",type:"button","aria-label":t.zoomReset,title:t.zoomReset,onClick:()=>this.resetView()},Math.round(100*this.scale),"%"),o("button",{key:"4ad7e8d83c933f0563304911facc8ef32ec88556",class:"co-lightbox__btn",type:"button","aria-label":t.zoomIn,title:t.zoomIn,onClick:()=>this.zoomAt(this.scale*n,0,0)},o("co-icon",{key:"7f5d57def9d10437913bb25f577a475eccf41851",name:"plus",size:16}))),o("button",{key:"32d00a606ccdc9b2694d8da797064e4f07b997a6",class:"co-lightbox__btn",type:"button","aria-label":t.openOriginal,title:t.openOriginal,onClick:this.openOriginal},o("co-icon",{key:"492f83405006a9642c9f6dd22e02c04a9b871909",name:"arrow-square-out",size:16})),o("button",{key:"14241c12b7f3cb4a07c2c22af2f8316c360c1541",class:"co-lightbox__btn",part:"close",type:"button","aria-label":t.close,title:t.close,ref:t=>this.closeBtnEl=t,onClick:this.requestClose},o("co-icon",{key:"44a2cdbfd7d79274f06f54663840776c05a95581",name:"x",size:16}))),e&&o("div",{key:"20bd42e8d80e481fec492b1cfdcd3fc54ea1e10f",class:"co-lightbox__stage",ref:t=>this.stageEl=t,onWheel:this.handleWheel},o("img",{key:"1ba1c0942f2cd13f7f302777f28d961660c07fa8",class:{"co-lightbox__img":!0,"co-lightbox__img--zoomed":this.scale>1,"co-lightbox__img--dragging":this.dragging},part:"image",ref:t=>this.imgEl=t,src:e.src,alt:e.alt||"",draggable:!1,style:{transform:`translate(${this.tx}px, ${this.ty}px) scale(${this.scale})`},onClick:this.stop,onDblClick:this.handleDblClick,onPointerDown:this.handlePointerDown,onPointerMove:this.handlePointerMove,onPointerUp:this.handlePointerUp,onPointerCancel:this.handlePointerUp})),e&&c&&o("button",{key:"61decb40ac1ee12a1d81d8a4da397860fe7ee116",class:"co-lightbox__nav co-lightbox__nav--prev",part:"prev",type:"button","aria-label":t.prevImage,title:t.prevImage,onClick:t=>{t.stopPropagation(),this.goTo(-1)}},o("co-icon",{key:"340f39ae3b741560bc3dc0eb6296dfa701699438",name:"caret-left",size:24})),e&&c&&o("button",{key:"04cec8b520c3416ce5e38aefda815a18247b79fa",class:"co-lightbox__nav co-lightbox__nav--next",part:"next",type:"button","aria-label":t.nextImage,title:t.nextImage,onClick:t=>{t.stopPropagation(),this.goTo(1)}},o("co-icon",{key:"1bb15d7437610cfad3003af07849edd8618b04c2",name:"caret-right",size:24})),e&&c&&o("div",{key:"786357f804681f37cc1603e926b33ec3b8b7a76c",class:"co-lightbox__counter",part:"counter",onClick:this.stop},r))}get el(){return e(this)}static get watchers(){return{open:[{onOpenChange:0}],startIndex:[{onStartIndexChange:0}],images:[{onImagesChange:0}]}}};c.style=":host{display:contents;font-family:var(--co-font-family-primary)}.co-lightbox{position:fixed;inset:0;margin:0;border:0;padding:0;width:auto;height:auto;overflow:visible;color:inherit;z-index:1100;display:flex;align-items:center;justify-content:center;background:var(--co-color-opacity-negro-80);opacity:0;pointer-events:none;transition:opacity 0.2s ease}.co-lightbox--open{opacity:1;pointer-events:auto}.co-lightbox__toolbar{position:absolute;top:0;left:0;right:0;z-index:2;display:flex;align-items:center;gap:var(--co-spacing-sm2);padding:var(--co-spacing-md) var(--co-spacing-lg);background:linear-gradient(var(--co-color-opacity-negro-50), transparent)}.co-lightbox__caption{flex:1;min-width:0;color:var(--co-color-base-blanco);font-size:var(--co-font-size-14);line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.co-lightbox__zoom{display:flex;align-items:center;gap:var(--co-spacing-xxs);padding:0 var(--co-spacing-xs);border-radius:var(--co-border-radius-full);background:var(--co-color-opacity-blanco-8)}.co-lightbox__btn{display:flex;align-items:center;justify-content:center;min-width:32px;height:32px;padding:0 var(--co-spacing-xs);border:none;border-radius:var(--co-border-radius-full);background:transparent;color:var(--co-color-base-blanco);font-family:inherit;font-size:var(--co-font-size-13, 13px);cursor:pointer;transition:background 0.15s ease}.co-lightbox__btn:hover{background:var(--co-color-opacity-blanco-16)}.co-lightbox__zoom-value{min-width:48px;font-variant-numeric:tabular-nums}.co-lightbox__stage{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;overflow:hidden;touch-action:none}.co-lightbox__img{max-width:calc(100vw - var(--co-spacing-5xl) * 2);max-height:calc(100vh - var(--co-spacing-5xl) * 2);border-radius:var(--co-border-radius-xs);user-select:none;transition:transform 0.18s ease}.co-lightbox__img--zoomed{cursor:grab}.co-lightbox__img--dragging{cursor:grabbing;transition:none}.co-lightbox__nav{position:absolute;top:50%;transform:translateY(-50%);z-index:2;display:flex;align-items:center;justify-content:center;width:44px;height:44px;border:none;border-radius:var(--co-border-radius-full);background:var(--co-color-opacity-blanco-8);color:var(--co-color-base-blanco);cursor:pointer;transition:background 0.15s ease}.co-lightbox__nav:hover{background:var(--co-color-opacity-blanco-25)}.co-lightbox__nav--prev{left:var(--co-spacing-lg)}.co-lightbox__nav--next{right:var(--co-spacing-lg)}.co-lightbox__counter{position:absolute;bottom:var(--co-spacing-lg);left:50%;transform:translateX(-50%);z-index:2;padding:var(--co-spacing-xs) var(--co-spacing-md);border-radius:var(--co-border-radius-full);background:var(--co-color-opacity-blanco-8);color:var(--co-color-base-blanco);font-size:var(--co-font-size-13, 13px);font-variant-numeric:tabular-nums}";export{c as co_lightbox}
@@ -0,0 +1 @@
1
+ import{r as a,c as o,h as r}from"./p-BCEz3S-z.js";const t={xl:80,lg:64,md:56,sm:48,xs:32,xxs:24},e={xl:"var(--co-font-size-26)",lg:"var(--co-font-size-22)",md:"var(--co-font-size-18)",sm:"var(--co-font-size-16)",xs:"var(--co-font-size-12)",xxs:"var(--co-font-size-10)"},i=class{constructor(r){a(this,r),this.coClick=o(this,"coClick",3),this.items=[],this.max=4,this.size="xs",this.shape="circle",this.interactive=!1,this.activate=()=>{this.coClick.emit()}}accessibleLabel(a){return this.label?this.label:a.map((a=>a.name||a.text)).filter(Boolean).join(", ")}render(){var a,o;const i=Array.isArray(this.items)?this.items:[],c=this.max>0?this.max:i.length,s=i.slice(0,c),n=Math.max(0,i.length-c),l=null!==(a=t[this.size])&&void 0!==a?a:t.xs,v=null!==(o=e[this.size])&&void 0!==o?o:e.xs,p=i.slice(c).map((a=>a.name||a.text)).filter(Boolean).join(", "),d=this.interactive?"button":"div",u=this.interactive?{type:"button","aria-label":this.accessibleLabel(i),onClick:this.activate}:{role:"group"};return r(d,Object.assign({key:"efe3aa5c3a13c33d220caf93f8ce7dfc929f9833",class:{"co-avatar-group":!0,"co-avatar-group--interactive":this.interactive}},u),s.map(((a,o)=>{var t,e,i;return r("co-avatar",{key:o,class:"co-avatar-group__avatar",type:null!==(t=a.type)&&void 0!==t?t:a.src?"image":a.icon?"icon":"text",size:this.size,shape:null!==(e=a.shape)&&void 0!==e?e:this.shape,text:a.text,src:a.src,icon:null!==(i=a.icon)&&void 0!==i?i:"user",color:a.color,"ring-color":a.ringColor,name:a.name||a.text||""})})),n>0&&r("co-tooltip",{key:"b6dffe856f5984d2e2731e84d9d4a46cfcfa0c7b",class:"co-avatar-group__slot",content:p,placement:"bottom"},r("div",{key:"b7fe90ee1800ede2bdc3b8674d6ab0dcdfa4ac48",class:"co-avatar-group__overflow",style:{width:`${l}px`,height:`${l}px`,fontSize:v},role:"img","aria-label":`+${n}`},"+",n)))}};i.style=":host{display:inline-flex}.co-avatar-group{display:inline-flex;align-items:center}.co-avatar-group--interactive{appearance:none;-webkit-appearance:none;background:none;border:0;margin:0;padding:0;font:inherit;color:inherit;cursor:pointer;border-radius:var(--co-border-radius-full);outline:none;transition:opacity 0.12s ease}.co-avatar-group--interactive:hover{opacity:0.88}.co-avatar-group--interactive:focus-visible{box-shadow:0 0 0 2px var(--co-semantic-surface-page), 0 0 0 4px var(--co-semantic-border-focus)}.co-avatar-group__slot{display:inline-flex;align-items:center;line-height:0}.co-avatar-group>*:not(:first-child){margin-left:calc(-1 * var(--co-avatar-group-overlap, var(--co-spacing-sm)))}.co-avatar-group__avatar::part(avatar),.co-avatar-group__overflow{box-shadow:0 0 0 var(--co-avatar-group-ring-width, 2px) var(--co-semantic-surface-page)}.co-avatar-group__avatar,.co-avatar-group__overflow{vertical-align:middle}.co-avatar-group__overflow{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;border-radius:var(--co-border-radius-full);background:var(--co-semantic-surface-muted);color:var(--co-semantic-text-secondary);font-family:var(--co-font-family-primary);font-weight:600;line-height:1;letter-spacing:var(--co-font-letter-spacing-body);flex-shrink:0;user-select:none;-webkit-font-smoothing:antialiased}";export{i as co_avatar_group}
@@ -1 +1 @@
1
- import{r as i,c as t,h as s,a as e}from"./p-tT-aZV0-.js";import{c as o,g as h,f as n}from"./p-C2mZ7x_Y.js";const a=class{constructor(s){i(this,s),this.coOpen=t(this,"coOpen",3),this.coClose=t(this,"coClose",3),this.open=!1,this.placement="bottom-start",this.matchWidth=!1,this.offset=4,this.closeOnClickOutside=!0,this.closeOnEscape=!0,this.flip=!0,this.scrollParents=[],this.cachedOffsetAncestor=null,this.offsetAncestorComputed=!1,this.docListenersBound=!1,this.handleDocumentClickManual=i=>{this.open&&this.closeOnClickOutside&&(i.composedPath().includes(this.el)||(this.open=!1))},this.handleDocumentKeydownManual=i=>{this.open&&this.closeOnEscape&&"Escape"===i.key&&(i.stopPropagation(),this.open=!1)},this.updatePosition=()=>{if(!this.open||!this.triggerEl||!this.panelEl)return;const i=this.triggerEl.getBoundingClientRect(),t=this.panelEl.getBoundingClientRect(),{top:s,left:e}=o(i,t,{placement:this.placement,offset:this.offset,flip:this.flip});let n=s,a=e;if(!this.panelEl.matches(":popover-open")&&(this.offsetAncestorComputed||(this.cachedOffsetAncestor=h(this.panelEl),this.offsetAncestorComputed=!0),this.cachedOffsetAncestor)){const i=this.cachedOffsetAncestor.getBoundingClientRect();n-=i.top,a-=i.left}const c={top:`${n}px`,left:`${a}px`};this.matchWidth&&(c.width=`${i.width}px`),this.panelEl&&(Object.assign(this.panelEl.style,c),this.panelEl.classList.add("co-popover__panel--positioned"))},this.scheduleUpdate=()=>{this.rafId&&cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame(this.updatePosition)},this.handleTriggerClick=()=>{this.open=!this.open}}componentDidLoad(){this.open&&this.onOpenChange(!0)}disconnectedCallback(){this.unbindDocListeners(),this.cleanupListeners()}onOpenChange(i){i?(this.coOpen.emit(),this.bindDocListeners(),this.scheduleUpdate(),requestAnimationFrame((()=>{requestAnimationFrame((()=>{this.updatePosition()}))})),this.addScrollListeners()):(this.coClose.emit(),this.cleanupListeners(),this.unbindDocListeners(),this.cachedOffsetAncestor=null,this.offsetAncestorComputed=!1,this.panelEl=void 0)}bindDocListeners(){this.docListenersBound||(document.addEventListener("click",this.handleDocumentClickManual,!0),document.addEventListener("keydown",this.handleDocumentKeydownManual,!0),this.docListenersBound=!0)}unbindDocListeners(){this.docListenersBound&&(document.removeEventListener("click",this.handleDocumentClickManual,!0),document.removeEventListener("keydown",this.handleDocumentKeydownManual,!0),this.docListenersBound=!1)}async toggle(){this.open=!this.open}async show(){this.open=!0}async hide(){this.open=!1}promotePanel(){const i=this.panelEl;if(i&&"function"==typeof i.showPopover)try{i.matches(":popover-open")||i.showPopover()}catch(i){}}addScrollListeners(){window.addEventListener("resize",this.scheduleUpdate,{passive:!0}),window.addEventListener("scroll",this.scheduleUpdate,{passive:!0,capture:!0}),this.scrollParents=[];const i=n(this.el);i&&(i.addEventListener("scroll",this.scheduleUpdate,{passive:!0}),this.scrollParents.push(i))}cleanupListeners(){this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=void 0),window.removeEventListener("resize",this.scheduleUpdate),window.removeEventListener("scroll",this.scheduleUpdate,{capture:!0});for(const i of this.scrollParents)i.removeEventListener("scroll",this.scheduleUpdate);this.scrollParents=[]}render(){return s("div",{key:"b39b9ec82457b91b62a5a82e400d598a45c99f95",class:"co-popover"},s("div",{key:"925ffcd374f6f92ddc6991ed658eb7053f7fad44",class:"co-popover__trigger",ref:i=>this.triggerEl=i,onClick:this.handleTriggerClick},s("slot",{key:"15cc3984fe8792738912406fb5479984f6de814e",name:"trigger"})),this.open&&s("div",{key:"61beaefd72b8b86e2deb8d8a4ba4e85a57cb4757",class:"co-popover__panel",popover:"manual",ref:i=>{i&&i!==this.panelEl&&(this.panelEl=i,this.promotePanel(),this.scheduleUpdate())}},s("slot",{key:"3ceb088ee3bbb1cc0e721502e81a72aee13de267"})))}get el(){return e(this)}static get watchers(){return{open:[{onOpenChange:0}]}}};a.style=":host{display:inline-block;position:relative}:host([match-width]){display:block;width:100%}.co-popover{display:block;width:100%}.co-popover__trigger{display:block;width:100%;cursor:pointer}.co-popover__panel{position:fixed;inset:auto;top:0;left:0;margin:0;padding:0;width:auto;height:auto;max-width:none;max-height:none;z-index:10000;visibility:hidden;background:var(--co-semantic-surface-page, #fff);border:1px solid var(--co-semantic-border-subtle);border-radius:var(--co-border-radius-sm, 12px);box-shadow:0 4px 16px rgba(31, 28, 27, 0.08);overflow:visible}.co-popover__panel--positioned{visibility:visible}";export{a as co_popover}
1
+ import{r as i,c as t,h as s,a as e}from"./p-BCEz3S-z.js";import{c as o,g as h,f as n}from"./p-C2mZ7x_Y.js";const a=class{constructor(s){i(this,s),this.coOpen=t(this,"coOpen",3),this.coClose=t(this,"coClose",3),this.open=!1,this.placement="bottom-start",this.matchWidth=!1,this.offset=4,this.closeOnClickOutside=!0,this.closeOnEscape=!0,this.flip=!0,this.scrollParents=[],this.cachedOffsetAncestor=null,this.offsetAncestorComputed=!1,this.docListenersBound=!1,this.handleDocumentClickManual=i=>{this.open&&this.closeOnClickOutside&&(i.composedPath().includes(this.el)||(this.open=!1))},this.handleDocumentKeydownManual=i=>{this.open&&this.closeOnEscape&&"Escape"===i.key&&(i.stopPropagation(),this.open=!1)},this.updatePosition=()=>{if(!this.open||!this.triggerEl||!this.panelEl)return;const i=this.triggerEl.getBoundingClientRect(),t=this.panelEl.getBoundingClientRect(),{top:s,left:e}=o(i,t,{placement:this.placement,offset:this.offset,flip:this.flip});let n=s,a=e;if(!this.panelEl.matches(":popover-open")&&(this.offsetAncestorComputed||(this.cachedOffsetAncestor=h(this.panelEl),this.offsetAncestorComputed=!0),this.cachedOffsetAncestor)){const i=this.cachedOffsetAncestor.getBoundingClientRect();n-=i.top,a-=i.left}const c={top:`${n}px`,left:`${a}px`};this.matchWidth&&(c.width=`${i.width}px`),this.panelEl&&(Object.assign(this.panelEl.style,c),this.panelEl.classList.add("co-popover__panel--positioned"))},this.scheduleUpdate=()=>{this.rafId&&cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame(this.updatePosition)},this.handleTriggerClick=()=>{this.open=!this.open}}componentDidLoad(){this.open&&this.onOpenChange(!0)}disconnectedCallback(){this.unbindDocListeners(),this.cleanupListeners()}onOpenChange(i){i?(this.coOpen.emit(),this.bindDocListeners(),this.scheduleUpdate(),requestAnimationFrame((()=>{requestAnimationFrame((()=>{this.updatePosition()}))})),this.addScrollListeners()):(this.coClose.emit(),this.cleanupListeners(),this.unbindDocListeners(),this.cachedOffsetAncestor=null,this.offsetAncestorComputed=!1,this.panelEl=void 0)}bindDocListeners(){this.docListenersBound||(document.addEventListener("click",this.handleDocumentClickManual,!0),document.addEventListener("keydown",this.handleDocumentKeydownManual,!0),this.docListenersBound=!0)}unbindDocListeners(){this.docListenersBound&&(document.removeEventListener("click",this.handleDocumentClickManual,!0),document.removeEventListener("keydown",this.handleDocumentKeydownManual,!0),this.docListenersBound=!1)}async toggle(){this.open=!this.open}async show(){this.open=!0}async hide(){this.open=!1}promotePanel(){const i=this.panelEl;if(i&&"function"==typeof i.showPopover)try{i.matches(":popover-open")||i.showPopover()}catch(i){}}addScrollListeners(){window.addEventListener("resize",this.scheduleUpdate,{passive:!0}),window.addEventListener("scroll",this.scheduleUpdate,{passive:!0,capture:!0}),this.scrollParents=[];const i=n(this.el);i&&(i.addEventListener("scroll",this.scheduleUpdate,{passive:!0}),this.scrollParents.push(i))}cleanupListeners(){this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=void 0),window.removeEventListener("resize",this.scheduleUpdate),window.removeEventListener("scroll",this.scheduleUpdate,{capture:!0});for(const i of this.scrollParents)i.removeEventListener("scroll",this.scheduleUpdate);this.scrollParents=[]}render(){return s("div",{key:"b39b9ec82457b91b62a5a82e400d598a45c99f95",class:"co-popover"},s("div",{key:"925ffcd374f6f92ddc6991ed658eb7053f7fad44",class:"co-popover__trigger",ref:i=>this.triggerEl=i,onClick:this.handleTriggerClick},s("slot",{key:"15cc3984fe8792738912406fb5479984f6de814e",name:"trigger"})),this.open&&s("div",{key:"61beaefd72b8b86e2deb8d8a4ba4e85a57cb4757",class:"co-popover__panel",popover:"manual",ref:i=>{i&&i!==this.panelEl&&(this.panelEl=i,this.promotePanel(),this.scheduleUpdate())}},s("slot",{key:"3ceb088ee3bbb1cc0e721502e81a72aee13de267"})))}get el(){return e(this)}static get watchers(){return{open:[{onOpenChange:0}]}}};a.style=":host{display:inline-block;position:relative}:host([match-width]){display:block;width:100%}.co-popover{display:block;width:100%}.co-popover__trigger{display:block;width:100%;cursor:pointer}.co-popover__panel{position:fixed;inset:auto;top:0;left:0;margin:0;padding:0;width:auto;height:auto;max-width:none;max-height:none;z-index:10000;visibility:hidden;background:var(--co-semantic-surface-page, #fff);border:1px solid var(--co-semantic-border-subtle);border-radius:var(--co-border-radius-sm, 12px);box-shadow:0 4px 16px rgba(31, 28, 27, 0.08);overflow:visible}.co-popover__panel--positioned{visibility:visible}";export{a as co_popover}
@@ -1 +1 @@
1
- import{r as e,c as t,h as o,a as c}from"./p-tT-aZV0-.js";import{R as a}from"./p-7FZXeBK4.js";const i=class{constructor(o){e(this,o),this.coSearch=t(this,"coSearch",7),this.coChange=t(this,"coChange",7),this.coClear=t(this,"coClear",7),this.required=!1,this.placeholder="Search…",this.disabled=!1,this.clearable=!0,this.layout="vertical",this.size="md",this.status="default",this.options="[]",this.value="",this.multiple=!1,this.loading=!1,this.minChars=1,this.searchDebounce=300,this.emptyMessage="No results",this.isOpen=!1,this.query="",this.focused=!1,this.handleInput=e=>{const t=e.target.value;this.query=t,this.debounceTimer&&clearTimeout(this.debounceTimer),t.length>=this.minChars?(this.debounceTimer=setTimeout((()=>this.coSearch.emit(t)),this.searchDebounce),this.isOpen=!0):this.isOpen=!1},this.handleFocus=()=>{this.focused=!0,this.query.length>=this.minChars&&this.parsedOptions.length>0&&(this.isOpen=!0)},this.handleClear=e=>{var t;e.stopPropagation(),this.query="",this.value=this.multiple?"[]":"",this.isOpen=!1,this.coClear.emit(),this.coChange.emit({value:this.multiple?[]:"",item:null}),null===(t=this.inputEl)||void 0===t||t.focus()},this.handleChipRemove=e=>{const t=this.selectedValues.filter((t=>t!==e));this.value=JSON.stringify(t),this.coChange.emit({value:t,item:{_id:e,label:e}})},this.handleListChange=e=>{this.multiple?(this.value=JSON.stringify(e.value),this.coChange.emit({value:e.value,item:e.item})):(this.value=e.value,this.query=e.item.label,this.isOpen=!1,this.coChange.emit({value:e.value,item:e.item}))},this.handleInputKeyDown=async e=>{"Escape"!==e.key?this.isOpen&&this.optionListEl&&("ArrowDown"!==e.key&&"ArrowUp"!==e.key&&"Enter"!==e.key||(e.preventDefault(),await this.optionListEl.handleKey(e))):this.isOpen=!1}}get parsedOptions(){let e=this.options;if("string"==typeof e)try{e=JSON.parse(e)}catch(e){return[]}return Array.isArray(e)?e.map((e=>"string"==typeof e?{label:e,value:e}:e)):[]}get selectedValues(){if(this.multiple){if("string"==typeof this.value)try{return JSON.parse(this.value)}catch(e){return this.value?[this.value]:[]}return this.value}return"string"==typeof this.value&&this.value?[this.value]:[]}get hasValue(){return this.selectedValues.length>0}get statusIcon(){return{error:"warning-circle",success:"check-circle",warning:"warning",info:"info"}[this.status]||null}componentWillLoad(){this.syncQueryFromValue()}onOptionsChange(){this.query.length>=this.minChars&&(this.isOpen=!0),this.focused||this.syncQueryFromValue()}onValueChange(){this.syncQueryFromValue()}syncQueryFromValue(){if(!this.multiple&&"string"==typeof this.value&&this.value){const e=this.parsedOptions.find((e=>e.value===this.value));this.query=e?e.label:this.value}else this.multiple||this.value||(this.query="")}handleDocumentClick(e){this.el.contains(e.target)||(this.isOpen=!1,this.focused=!1)}render(){const e=this.parsedOptions,t=this.selectedValues;return o("div",{key:"a152ee025b4c76813f8783ba1cd0e6791a7372ee",class:{"co-autocomplete":!0,"co-autocomplete--disabled":this.disabled,"co-autocomplete--focused":this.focused,[`co-autocomplete--${this.size}`]:!0,[`co-autocomplete--${this.status}`]:"default"!==this.status}},(this.label||this.secondaryLabel)&&o("div",{key:"484443890da0c01c028716095ef2215f56b64e93",class:"co-autocomplete__labels"},this.label&&o("label",{key:"24fc760c0fa0322e1952d948e8daf463a4999226",class:"co-autocomplete__label"},this.label,o(a,{key:"250f449b8d860d5476652dd906b5405e76cba1d1",required:this.required})),this.secondaryLabel&&o("span",{key:"5f7b6c3b0308cc031336d945ce629aa06495404d",class:"co-autocomplete__secondary-label"},this.secondaryLabel)),o("div",{key:"632abdc8eb131cf8f5c482487d377d9297c11ad6",class:"co-autocomplete__field"},this.iconLeft&&o("co-icon",{key:"7c1f1af01c2a9b9686de933a38d4da0302f40cbc",name:this.iconLeft,size:16,class:"co-autocomplete__icon"}),this.multiple&&t.length>0&&o("div",{key:"bfe9c9fbce1c7050f928128fb77f8bf5018903d1",class:"co-autocomplete__chips"},t.map((e=>{const t=this.parsedOptions.find((t=>t.value===e));return o("co-chip",{label:t?t.label:e,size:"small",removable:!0,onCoRemove:()=>this.handleChipRemove(e)})}))),o("input",{key:"fc621839dde68853a1b28231551e6cb0a6f415e7",ref:e=>this.inputEl=e,class:"co-autocomplete__input",type:"text",value:this.query,placeholder:this.placeholder,disabled:this.disabled,onInput:this.handleInput,onFocus:this.handleFocus,onKeyDown:this.handleInputKeyDown}),this.loading&&o("div",{key:"fbe41e89ca6202a4de04a09437f1f11f756f25eb",class:"co-autocomplete__spinner"}),this.clearable&&(this.hasValue||this.query)&&!this.disabled&&o("button",{key:"e3096cd897d7a98fa7cd203d21eb57dc6ce961a5",class:"co-autocomplete__clear",type:"button",tabIndex:-1,onClick:this.handleClear,"aria-label":"Clear"},o("co-icon",{key:"3211cf54fcdae0a73afb62e2b6cb25081486f3a7",name:"x-circle",size:16,weight:"fill"}))),this.isOpen&&o("div",{key:"9c5e500a17c9486b6834c46be9e95c0e0fea6beb",class:"co-autocomplete__dropdown"},o("co-option-list",{key:"b44c39253a07c470dc5e059223fce58548e8d02d",ref:e=>this.optionListEl=e,items:JSON.stringify(e.map((e=>({_id:e.value,label:e.label,icon:e.icon,disabled:e.disabled})))),value:this.multiple?JSON.stringify(this.selectedValues):this.selectedValues[0]||"",multiple:this.multiple,selectedAffordance:"check",virtual:!0,loading:this.loading,emptyMessage:this.emptyMessage,onCoChange:e=>this.handleListChange(e.detail)})),this.helperText&&o("div",{key:"30ac040bfef45e66d1b18bfdda9b5b07b8f2c3d5",class:`co-autocomplete__helper co-autocomplete__helper--${this.status}`},this.statusIcon&&o("co-icon",{key:"a4fc8c4c9695c13cd515d9b7562986a62bf07110",name:this.statusIcon,size:14,weight:"fill",class:"co-autocomplete__helper-icon"}),o("span",{key:"4a7f3031b62c451e0561024d232331b1c7679a07",class:"co-autocomplete__helper-text"},this.helperText)))}get el(){return c(this)}static get watchers(){return{options:[{onOptionsChange:0}],value:[{onValueChange:0}]}}};i.style=":host{display:block;font-family:var(--co-font-family-primary);font-size:var(--co-font-size-14);letter-spacing:var(--co-font-letter-spacing-body);line-height:1;position:relative}.co-autocomplete{display:flex;flex-direction:column;gap:var(--co-spacing-sm2);position:relative}.co-autocomplete__labels{display:flex;align-items:center;justify-content:space-between;padding:0 var(--co-spacing-xs);gap:var(--co-spacing-sm2)}.co-autocomplete__label{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);font-weight:400;line-height:1;white-space:nowrap;cursor:default}.co-autocomplete__secondary-label{color:var(--co-semantic-text-muted);font-size:var(--co-font-size-14);font-weight:400;line-height:1;white-space:nowrap;text-align:right}.co-autocomplete--disabled .co-autocomplete__label,.co-autocomplete--disabled .co-autocomplete__secondary-label{color:var(--co-semantic-text-disabled)}.co-autocomplete__field{display:flex;align-items:center;flex-wrap:wrap;gap:var(--co-spacing-xs);padding:var(--co-spacing-sm2) var(--co-spacing-md);background:var(--co-semantic-surface-page);border:1px solid var(--co-color-opacity-negro-25, rgba(31, 28, 27, 0.25));border-radius:var(--co-border-radius-xs);min-height:40px;box-sizing:border-box;transition:border-color 0.15s ease, box-shadow 0.15s ease}.co-autocomplete--s .co-autocomplete__field{min-height:28px;padding:var(--co-spacing-xxs) var(--co-spacing-sm);font-size:var(--co-font-size-12)}.co-autocomplete--sm .co-autocomplete__field{min-height:32px;padding:var(--co-spacing-xs) var(--co-spacing-sm);font-size:var(--co-font-size-14)}.co-autocomplete--lg .co-autocomplete__field{min-height:48px;padding:var(--co-spacing-sm) var(--co-spacing-lg);font-size:var(--co-font-size-16)}.co-autocomplete--focused .co-autocomplete__field{border-color:var(--co-semantic-border-focus);box-shadow:0 0 0 2px var(--co-semantic-border-focus-ring)}.co-autocomplete--disabled .co-autocomplete__field{background:var(--co-semantic-surface-disabled);border-color:transparent;cursor:not-allowed}.co-autocomplete--error .co-autocomplete__field{border-color:var(--co-semantic-status-error)}.co-autocomplete--success .co-autocomplete__field{border-color:var(--co-semantic-status-success)}.co-autocomplete--warning .co-autocomplete__field{border-color:var(--co-color-status-review)}.co-autocomplete--info .co-autocomplete__field{border-color:var(--co-semantic-status-info)}.co-autocomplete__icon{flex-shrink:0;color:var(--co-semantic-text-muted);display:flex;align-items:center}.co-autocomplete__chips{display:flex;flex-wrap:wrap;gap:var(--co-spacing-xs)}.co-autocomplete__input{flex:1;min-width:80px;border:none;background:transparent;color:var(--co-semantic-text-default);font-family:inherit;font-size:inherit;font-weight:400;line-height:1;padding:0;outline:none}.co-autocomplete__input::placeholder{color:var(--co-semantic-text-muted)}.co-autocomplete--disabled .co-autocomplete__input{color:var(--co-semantic-text-disabled);cursor:not-allowed}.co-autocomplete__clear{flex-shrink:0;display:flex;align-items:center;padding:0;margin:0;border:none;background:transparent;cursor:pointer;color:var(--co-semantic-text-muted);transition:color 0.15s ease}.co-autocomplete__clear:hover{color:var(--co-semantic-text-default)}.co-autocomplete__spinner{width:16px;height:16px;border:2px solid var(--co-semantic-border-subtle);border-top-color:var(--co-semantic-text-default);border-radius:var(--co-border-radius-full);animation:co-spin 0.6s linear infinite;flex-shrink:0}@keyframes co-spin{to{transform:rotate(360deg)}}.co-autocomplete__dropdown{position:absolute;top:100%;left:0;right:0;z-index:100;margin-top:var(--co-spacing-xs);background:var(--co-semantic-surface-secondary);border:1px solid var(--co-semantic-border-subtle);border-radius:var(--co-border-radius-sm, 12px);box-shadow:0 4px 16px rgba(31, 28, 27, 0.08);overflow:hidden;padding:var(--co-spacing-sm2)}.co-autocomplete__helper{display:flex;align-items:center;gap:var(--co-spacing-xs);padding:0 var(--co-spacing-xs)}.co-autocomplete__helper-icon{flex-shrink:0;display:flex;align-items:center}.co-autocomplete__helper-text{color:var(--co-semantic-text-muted);font-size:var(--co-font-size-14);font-weight:400;line-height:1}.co-autocomplete__helper--error .co-autocomplete__helper-icon,.co-autocomplete__helper--error .co-autocomplete__helper-text{color:var(--co-semantic-status-error)}.co-autocomplete__helper--success .co-autocomplete__helper-icon,.co-autocomplete__helper--success .co-autocomplete__helper-text{color:var(--co-semantic-status-success)}.co-autocomplete__helper--warning .co-autocomplete__helper-icon,.co-autocomplete__helper--warning .co-autocomplete__helper-text{color:var(--co-color-status-review)}.co-autocomplete__helper--info .co-autocomplete__helper-icon,.co-autocomplete__helper--info .co-autocomplete__helper-text{color:var(--co-semantic-status-info)}:host([layout='horizontal']) .co-autocomplete{display:grid;grid-template-columns:var(--co-field-label-width, max-content) 1fr;align-items:start;column-gap:var(--co-spacing-md);row-gap:var(--co-spacing-sm2)}:host([layout='horizontal']) .co-autocomplete__labels{grid-column:1;grid-row:1;padding-top:var(--co-spacing-sm2);min-width:0}:host([layout='horizontal']) .co-autocomplete__label{white-space:normal}:host([layout='horizontal']) .co-autocomplete>:not(.co-autocomplete__labels){grid-column:2;min-width:0}.co-field-required{margin-left:2px;color:var(--co-color-status-error)}.co-field-required__caption{margin-left:4px;color:var(--co-semantic-text-muted);font-size:var(--co-font-size-12);font-weight:400}.co-field-required__caption::before{content:var(--co-field-required-text, ' (required)')}";export{i as co_autocomplete}
1
+ import{r as e,c as t,h as o,a as c}from"./p-BCEz3S-z.js";import{R as i}from"./p-C-d15gih.js";const a=class{constructor(o){e(this,o),this.coSearch=t(this,"coSearch",7),this.coChange=t(this,"coChange",7),this.coClear=t(this,"coClear",7),this.required=!1,this.placeholder="Search…",this.disabled=!1,this.clearable=!0,this.layout="vertical",this.size="md",this.status="default",this.options="[]",this.value="",this.multiple=!1,this.loading=!1,this.minChars=1,this.searchDebounce=300,this.emptyMessage="No results",this.isOpen=!1,this.query="",this.focused=!1,this.handleInput=e=>{const t=e.target.value;this.query=t,this.debounceTimer&&clearTimeout(this.debounceTimer),t.length>=this.minChars?(this.debounceTimer=setTimeout((()=>this.coSearch.emit(t)),this.searchDebounce),this.isOpen=!0):this.isOpen=!1},this.handleFocus=()=>{this.focused=!0,this.query.length>=this.minChars&&this.parsedOptions.length>0&&(this.isOpen=!0)},this.handleClear=e=>{var t;e.stopPropagation(),this.query="",this.value=this.multiple?"[]":"",this.isOpen=!1,this.coClear.emit(),this.coChange.emit({value:this.multiple?[]:"",item:null}),null===(t=this.inputEl)||void 0===t||t.focus()},this.handleChipRemove=e=>{const t=this.selectedValues.filter((t=>t!==e));this.value=JSON.stringify(t),this.coChange.emit({value:t,item:{_id:e,label:e}})},this.handleListChange=e=>{this.multiple?(this.value=JSON.stringify(e.value),this.coChange.emit({value:e.value,item:e.item})):(this.value=e.value,this.query=e.item.label,this.isOpen=!1,this.coChange.emit({value:e.value,item:e.item}))},this.handleInputKeyDown=async e=>{"Escape"!==e.key?this.isOpen&&this.optionListEl&&("ArrowDown"!==e.key&&"ArrowUp"!==e.key&&"Enter"!==e.key||(e.preventDefault(),await this.optionListEl.handleKey(e))):this.isOpen=!1}}get parsedOptions(){let e=this.options;if("string"==typeof e)try{e=JSON.parse(e)}catch(e){return[]}return Array.isArray(e)?e.map((e=>"string"==typeof e?{label:e,value:e}:e)):[]}get selectedValues(){if(this.multiple){if("string"==typeof this.value)try{return JSON.parse(this.value)}catch(e){return this.value?[this.value]:[]}return this.value}return"string"==typeof this.value&&this.value?[this.value]:[]}get hasValue(){return this.selectedValues.length>0}get statusIcon(){return{error:"warning-circle",success:"check-circle",warning:"warning",info:"info"}[this.status]||null}componentWillLoad(){this.syncQueryFromValue()}onOptionsChange(){this.query.length>=this.minChars&&(this.isOpen=!0),this.focused||this.syncQueryFromValue()}onValueChange(){this.syncQueryFromValue()}syncQueryFromValue(){if(!this.multiple&&"string"==typeof this.value&&this.value){const e=this.parsedOptions.find((e=>e.value===this.value));this.query=e?e.label:this.value}else this.multiple||this.value||(this.query="")}handleDocumentClick(e){this.el.contains(e.target)||(this.isOpen=!1,this.focused=!1)}render(){const e=this.parsedOptions,t=this.selectedValues;return o("div",{key:"a152ee025b4c76813f8783ba1cd0e6791a7372ee",class:{"co-autocomplete":!0,"co-autocomplete--disabled":this.disabled,"co-autocomplete--focused":this.focused,[`co-autocomplete--${this.size}`]:!0,[`co-autocomplete--${this.status}`]:"default"!==this.status}},(this.label||this.secondaryLabel)&&o("div",{key:"484443890da0c01c028716095ef2215f56b64e93",class:"co-autocomplete__labels"},this.label&&o("label",{key:"24fc760c0fa0322e1952d948e8daf463a4999226",class:"co-autocomplete__label"},this.label,o(i,{key:"250f449b8d860d5476652dd906b5405e76cba1d1",required:this.required})),this.secondaryLabel&&o("span",{key:"5f7b6c3b0308cc031336d945ce629aa06495404d",class:"co-autocomplete__secondary-label"},this.secondaryLabel)),o("div",{key:"632abdc8eb131cf8f5c482487d377d9297c11ad6",class:"co-autocomplete__field"},this.iconLeft&&o("co-icon",{key:"7c1f1af01c2a9b9686de933a38d4da0302f40cbc",name:this.iconLeft,size:16,class:"co-autocomplete__icon"}),this.multiple&&t.length>0&&o("div",{key:"bfe9c9fbce1c7050f928128fb77f8bf5018903d1",class:"co-autocomplete__chips"},t.map((e=>{const t=this.parsedOptions.find((t=>t.value===e));return o("co-chip",{label:t?t.label:e,size:"small",removable:!0,onCoRemove:()=>this.handleChipRemove(e)})}))),o("input",{key:"fc621839dde68853a1b28231551e6cb0a6f415e7",ref:e=>this.inputEl=e,class:"co-autocomplete__input",type:"text",value:this.query,placeholder:this.placeholder,disabled:this.disabled,onInput:this.handleInput,onFocus:this.handleFocus,onKeyDown:this.handleInputKeyDown}),this.loading&&o("div",{key:"fbe41e89ca6202a4de04a09437f1f11f756f25eb",class:"co-autocomplete__spinner"}),this.clearable&&(this.hasValue||this.query)&&!this.disabled&&o("button",{key:"e3096cd897d7a98fa7cd203d21eb57dc6ce961a5",class:"co-autocomplete__clear",type:"button",tabIndex:-1,onClick:this.handleClear,"aria-label":"Clear"},o("co-icon",{key:"3211cf54fcdae0a73afb62e2b6cb25081486f3a7",name:"x-circle",size:16,weight:"fill"}))),this.isOpen&&o("div",{key:"9c5e500a17c9486b6834c46be9e95c0e0fea6beb",class:"co-autocomplete__dropdown"},o("co-option-list",{key:"b44c39253a07c470dc5e059223fce58548e8d02d",ref:e=>this.optionListEl=e,items:JSON.stringify(e.map((e=>({_id:e.value,label:e.label,icon:e.icon,disabled:e.disabled})))),value:this.multiple?JSON.stringify(this.selectedValues):this.selectedValues[0]||"",multiple:this.multiple,selectedAffordance:"check",virtual:!0,loading:this.loading,emptyMessage:this.emptyMessage,onCoChange:e=>this.handleListChange(e.detail)})),this.helperText&&o("div",{key:"30ac040bfef45e66d1b18bfdda9b5b07b8f2c3d5",class:`co-autocomplete__helper co-autocomplete__helper--${this.status}`},this.statusIcon&&o("co-icon",{key:"a4fc8c4c9695c13cd515d9b7562986a62bf07110",name:this.statusIcon,size:14,weight:"fill",class:"co-autocomplete__helper-icon"}),o("span",{key:"4a7f3031b62c451e0561024d232331b1c7679a07",class:"co-autocomplete__helper-text"},this.helperText)))}get el(){return c(this)}static get watchers(){return{options:[{onOptionsChange:0}],value:[{onValueChange:0}]}}};a.style=":host{display:block;font-family:var(--co-font-family-primary);font-size:var(--co-font-size-14);letter-spacing:var(--co-font-letter-spacing-body);line-height:1;position:relative}.co-autocomplete{display:flex;flex-direction:column;gap:var(--co-spacing-sm2);position:relative}.co-autocomplete__labels{display:flex;align-items:center;justify-content:space-between;padding:0 var(--co-spacing-xs);gap:var(--co-spacing-sm2)}.co-autocomplete__label{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);font-weight:400;line-height:1;white-space:nowrap;cursor:default}.co-autocomplete__secondary-label{color:var(--co-semantic-text-muted);font-size:var(--co-font-size-14);font-weight:400;line-height:1;white-space:nowrap;text-align:right}.co-autocomplete--disabled .co-autocomplete__label,.co-autocomplete--disabled .co-autocomplete__secondary-label{color:var(--co-semantic-text-disabled)}.co-autocomplete__field{display:flex;align-items:center;flex-wrap:wrap;gap:var(--co-spacing-xs);padding:var(--co-spacing-sm2) var(--co-spacing-md);background:var(--co-semantic-surface-page);border:1px solid var(--co-semantic-border-field);border-radius:var(--co-border-radius-xs);min-height:40px;box-sizing:border-box;transition:border-color 0.15s ease, box-shadow 0.15s ease}.co-autocomplete--s .co-autocomplete__field{min-height:28px;padding:var(--co-spacing-xxs) var(--co-spacing-sm);font-size:var(--co-font-size-12)}.co-autocomplete--sm .co-autocomplete__field{min-height:32px;padding:var(--co-spacing-xs) var(--co-spacing-sm);font-size:var(--co-font-size-14)}.co-autocomplete--lg .co-autocomplete__field{min-height:48px;padding:var(--co-spacing-sm) var(--co-spacing-lg);font-size:var(--co-font-size-16)}.co-autocomplete--focused .co-autocomplete__field{border-color:var(--co-semantic-border-focus);box-shadow:0 0 0 2px var(--co-semantic-border-focus-ring)}.co-autocomplete--disabled .co-autocomplete__field{background:var(--co-semantic-surface-disabled);border-color:transparent;cursor:not-allowed}.co-autocomplete--error .co-autocomplete__field{border-color:var(--co-semantic-status-error)}.co-autocomplete--success .co-autocomplete__field{border-color:var(--co-semantic-status-success)}.co-autocomplete--warning .co-autocomplete__field{border-color:var(--co-color-status-review)}.co-autocomplete--info .co-autocomplete__field{border-color:var(--co-semantic-status-info)}.co-autocomplete__icon{flex-shrink:0;color:var(--co-semantic-text-muted);display:flex;align-items:center}.co-autocomplete__chips{display:flex;flex-wrap:wrap;gap:var(--co-spacing-xs)}.co-autocomplete__input{flex:1;min-width:80px;border:none;background:transparent;color:var(--co-semantic-text-default);font-family:inherit;font-size:inherit;font-weight:400;line-height:1;padding:0;outline:none}.co-autocomplete__input::placeholder{color:var(--co-semantic-text-muted)}.co-autocomplete--disabled .co-autocomplete__input{color:var(--co-semantic-text-disabled);cursor:not-allowed}.co-autocomplete__clear{flex-shrink:0;display:flex;align-items:center;padding:0;margin:0;border:none;background:transparent;cursor:pointer;color:var(--co-semantic-text-muted);transition:color 0.15s ease}.co-autocomplete__clear:hover{color:var(--co-semantic-text-default)}.co-autocomplete__spinner{width:16px;height:16px;border:2px solid var(--co-semantic-border-subtle);border-top-color:var(--co-semantic-text-default);border-radius:var(--co-border-radius-full);animation:co-spin 0.6s linear infinite;flex-shrink:0}@keyframes co-spin{to{transform:rotate(360deg)}}.co-autocomplete__dropdown{position:absolute;top:100%;left:0;right:0;z-index:100;margin-top:var(--co-spacing-xs);background:var(--co-semantic-surface-secondary);border:1px solid var(--co-semantic-border-subtle);border-radius:var(--co-border-radius-sm, 12px);box-shadow:0 4px 16px rgba(31, 28, 27, 0.08);overflow:hidden;padding:var(--co-spacing-sm2)}.co-autocomplete__helper{display:flex;align-items:center;gap:var(--co-spacing-xs);padding:0 var(--co-spacing-xs)}.co-autocomplete__helper-icon{flex-shrink:0;display:flex;align-items:center}.co-autocomplete__helper-text{color:var(--co-semantic-text-muted);font-size:var(--co-font-size-14);font-weight:400;line-height:1}.co-autocomplete__helper--error .co-autocomplete__helper-icon,.co-autocomplete__helper--error .co-autocomplete__helper-text{color:var(--co-semantic-status-error)}.co-autocomplete__helper--success .co-autocomplete__helper-icon,.co-autocomplete__helper--success .co-autocomplete__helper-text{color:var(--co-semantic-status-success)}.co-autocomplete__helper--warning .co-autocomplete__helper-icon,.co-autocomplete__helper--warning .co-autocomplete__helper-text{color:var(--co-color-status-review)}.co-autocomplete__helper--info .co-autocomplete__helper-icon,.co-autocomplete__helper--info .co-autocomplete__helper-text{color:var(--co-semantic-status-info)}:host([layout='horizontal']) .co-autocomplete{display:grid;grid-template-columns:var(--co-field-label-width, max-content) 1fr;align-items:start;column-gap:var(--co-spacing-md);row-gap:var(--co-spacing-sm2)}:host([layout='horizontal']) .co-autocomplete__labels{grid-column:1;grid-row:1;padding-top:var(--co-spacing-sm2);min-width:0}:host([layout='horizontal']) .co-autocomplete__label{white-space:normal}:host([layout='horizontal']) .co-autocomplete>:not(.co-autocomplete__labels){grid-column:2;min-width:0}.co-field-required{margin-left:2px;color:var(--co-color-status-error)}.co-field-required__caption{margin-left:4px;color:var(--co-semantic-text-muted);font-size:var(--co-font-size-12);font-weight:400}.co-field-required__caption::before{content:var(--co-field-required-text, ' (required)')}";export{a as co_autocomplete}
@@ -0,0 +1 @@
1
+ import{r as t,h as o,a as i}from"./p-BCEz3S-z.js";import{c as a,g as s,f as e}from"./p-C2mZ7x_Y.js";function r(t){const o=function(t){if(!t||"string"!=typeof t)return null;const o=t.replace("#","");return 3===o.length?{r:parseInt(o[0]+o[0],16),g:parseInt(o[1]+o[1],16),b:parseInt(o[2]+o[2],16)}:6===o.length?{r:parseInt(o.slice(0,2),16),g:parseInt(o.slice(2,4),16),b:parseInt(o.slice(4,6),16)}:null}(t);if(!o)return 0;const[i,a,s]=[o.r/255,o.g/255,o.b/255].map((t=>t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)));return.2126*i+.7152*a+.0722*s}const n={xl:80,lg:64,md:56,sm:48,xs:32,xxs:24},c={xl:32,lg:28,md:24,sm:20,xs:16,xxs:12},l={xl:"var(--co-font-size-26)",lg:"var(--co-font-size-22)",md:"var(--co-font-size-18)",sm:"var(--co-font-size-16)",xs:"var(--co-font-size-12)",xxs:"var(--co-font-size-10)"},h=class{constructor(o){t(this,o),this.type="text",this.size="md",this.icon="user",this.iconWeight="regular",this.shape="circle",this.imgFailed=!1,this.handleImgError=()=>{this.imgFailed=!0}}render(){var t,i,a,s,e,h,p;const d=null!==(t=n[this.size])&&void 0!==t?t:56,v=null!==(i=c[this.size])&&void 0!==i?i:24,b=null!==(a=l[this.size])&&void 0!==a?a:"var(--co-font-size-18)",f="image"===this.type&&this.src&&!this.imgFailed,m="text"===this.type?this.text:"image"===this.type&&null!==(e=null!==(s=this.alt)&&void 0!==s?s:this.text)&&void 0!==e?e:this.icon,L=o("div",{class:{"co-avatar":!0,[`co-avatar--${this.size}`]:!0,[`co-avatar--${this.type}`]:!0,"co-avatar--square":"square"===this.shape,"co-avatar--light":!!this.color&&(u=this.color,r(u)>.4)},style:Object.assign(Object.assign({width:`var(--co-avatar-size, ${d}px)`,height:`var(--co-avatar-size, ${d}px)`,fontSize:b},this.color?{background:this.color}:{}),this.ringColor?{"--co-avatar-border-color":this.ringColor,"--co-avatar-border-width":"2px"}:{}),part:"avatar",role:"img","aria-label":m},f?o("img",{class:"co-avatar__img",src:this.src,alt:null!==(p=null!==(h=this.alt)&&void 0!==h?h:this.text)&&void 0!==p?p:"",onError:this.handleImgError}):"icon"===this.type?o("co-icon",{name:this.icon,weight:this.iconWeight,size:v}):o("span",{class:"co-avatar__text"},this.text));var u;return this.name?o("co-tooltip",{content:this.name},L):L}};h.style=":host{display:inline-flex;--co-avatar-squircle:url(\"data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'><path d='M100 50L99.94 68.06L99.75 73.81L99.44 77.94L99.01 81.26L98.44 84.05L97.74 86.46L96.91 88.57L95.94 90.43L94.81 92.07L93.53 93.53L92.07 94.81L90.43 95.94L88.57 96.91L86.46 97.74L84.05 98.44L81.26 99.01L77.94 99.44L73.81 99.75L68.06 99.94L50 100L31.94 99.94L26.19 99.75L22.06 99.44L18.74 99.01L15.95 98.44L13.54 97.74L11.43 96.91L9.57 95.94L7.93 94.81L6.47 93.53L5.19 92.07L4.06 90.43L3.09 88.57L2.26 86.46L1.56 84.05L0.99 81.26L0.56 77.94L0.25 73.81L0.06 68.06L0 50L0.06 31.94L0.25 26.19L0.56 22.06L0.99 18.74L1.56 15.95L2.26 13.54L3.09 11.43L4.06 9.57L5.19 7.93L6.47 6.47L7.93 5.19L9.57 4.06L11.43 3.09L13.54 2.26L15.95 1.56L18.74 0.99L22.06 0.56L26.19 0.25L31.94 0.06L50 0L68.06 0.06L73.81 0.25L77.94 0.56L81.26 0.99L84.05 1.56L86.46 2.26L88.57 3.09L90.43 4.06L92.07 5.19L93.53 6.47L94.81 7.93L95.94 9.57L96.91 11.43L97.74 13.54L98.44 15.95L99.01 18.74L99.44 22.06L99.75 26.19L99.94 31.94Z' fill='%23fff'/></svg>\")}.co-avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--co-border-radius-full);background:var(--co-semantic-surface-primary);color:var(--co-semantic-on-primary);font-family:var(--co-font-family-primary);font-weight:600;line-height:1;letter-spacing:var(--co-font-letter-spacing-body);overflow:hidden;flex-shrink:0;user-select:none;-webkit-font-smoothing:antialiased}.co-avatar::after{content:'';position:absolute;inset:0;pointer-events:none;border-radius:inherit;box-shadow:inset 0 0 0 var(--co-avatar-border-width, 1px) var(--co-avatar-border-color, transparent)}.co-avatar__text{text-transform:uppercase}.co-avatar__img{width:100%;height:100%;object-fit:cover;display:block}.co-avatar--square{border-radius:0;-webkit-mask:var(--co-avatar-squircle) center / 100% 100% no-repeat;mask:var(--co-avatar-squircle) center / 100% 100% no-repeat}.co-avatar--square::after{--co-avatar-bw:var(--co-avatar-border-width, 1px);box-shadow:none;background:var(--co-avatar-border-color, transparent);-webkit-mask:var(--co-avatar-squircle) center / 100% 100% no-repeat, var(--co-avatar-squircle) center / calc(100% - 2 * var(--co-avatar-bw)) calc(100% - 2 * var(--co-avatar-bw)) no-repeat;-webkit-mask-composite:xor;mask:var(--co-avatar-squircle) center / 100% 100% no-repeat, var(--co-avatar-squircle) center / calc(100% - 2 * var(--co-avatar-bw)) calc(100% - 2 * var(--co-avatar-bw)) no-repeat;mask-composite:exclude}.co-avatar--light{color:rgba(0, 0, 0, 0.87)}co-tooltip{display:inline-flex;align-items:center;line-height:0}";const p=class{constructor(o){t(this,o),this.content="",this.placement="top",this.offset=8,this.showDelay=300,this.hideDelay=100,this.disabled=!1,this.arrow=!0,this.flip=!0,this.maxWidth="280px",this.block=!1,this.visible=!1,this.actualPlacement="top",this.scrollParents=[],this.cachedOffsetAncestor=null,this.offsetAncestorComputed=!1,this.scheduleShow=()=>{!this.disabled&&this.content&&(this.clearHideTimeout(),this.visible||(this.showTimeout=setTimeout((()=>{this.visible=!0}),this.showDelay)))},this.scheduleHide=()=>{this.clearShowTimeout(),this.visible&&(this.hideTimeout=setTimeout((()=>{this.visible=!1}),this.hideDelay))},this.hideImmediate=()=>{this.clearTimers(),this.visible=!1},this.handleMouseEnter=()=>{this.scheduleShow()},this.handleMouseLeave=()=>{this.scheduleHide()},this.handleFocusIn=()=>{this.scheduleShow()},this.handleFocusOut=()=>{this.scheduleHide()},this.handleKeyDown=t=>{"Escape"===t.key&&this.visible&&this.hideImmediate()},this.updatePosition=()=>{if(!this.visible||!this.triggerEl||!this.panelEl)return;const t=this.triggerEl.getBoundingClientRect(),o=this.panelEl.getBoundingClientRect();if(0===o.width&&0===o.height)return;const{top:i,left:e,actualPlacement:r}=a(t,o,{placement:this.placement,offset:this.offset,flip:this.flip});this.actualPlacement=r;let n=i,c=e;if(!this.panelEl.matches(":popover-open")&&(this.offsetAncestorComputed||(this.cachedOffsetAncestor=s(this.panelEl),(this.cachedOffsetAncestor||this.panelEl.isConnected)&&(this.offsetAncestorComputed=!0)),this.cachedOffsetAncestor)){const t=this.cachedOffsetAncestor.getBoundingClientRect();n-=t.top,c-=t.left}this.panelEl&&(this.panelEl.style.top=`${n}px`,this.panelEl.style.left=`${c}px`,this.panelEl.classList.add("co-tooltip__panel--positioned"))},this.scheduleUpdate=()=>{this.rafId&&cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame(this.updatePosition)}}disconnectedCallback(){this.clearTimers(),this.cleanupListeners()}onVisibleChange(t){t?(this.scheduleUpdate(),requestAnimationFrame((()=>{requestAnimationFrame((()=>{this.updatePosition()}))})),this.addScrollListeners()):(this.cleanupListeners(),this.cachedOffsetAncestor=null,this.offsetAncestorComputed=!1,this.panelEl=void 0)}onDisabledChange(t){t&&this.visible&&(this.visible=!1,this.clearTimers())}clearShowTimeout(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=void 0)}clearHideTimeout(){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=void 0)}clearTimers(){this.clearShowTimeout(),this.clearHideTimeout()}promotePanel(){const t=this.panelEl;if(t&&"function"==typeof t.showPopover)try{t.matches(":popover-open")||t.showPopover()}catch(t){}}addScrollListeners(){window.addEventListener("resize",this.scheduleUpdate,{passive:!0}),window.addEventListener("scroll",this.scheduleUpdate,{passive:!0,capture:!0}),this.scrollParents=[];const t=e(this.el);t&&(t.addEventListener("scroll",this.scheduleUpdate,{passive:!0}),this.scrollParents.push(t))}cleanupListeners(){this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=void 0),window.removeEventListener("resize",this.scheduleUpdate),window.removeEventListener("scroll",this.scheduleUpdate,{capture:!0});for(const t of this.scrollParents)t.removeEventListener("scroll",this.scheduleUpdate);this.scrollParents=[]}render(){const t=this.actualPlacement.split("-")[0];return o("div",{key:"e51e866b88dc6b36ef797c4ea8694bd5ba1ca352",class:"co-tooltip"},o("div",{key:"711f7b0804b4fe283b2ce8eb45846d00c9d51022",class:"co-tooltip__trigger",ref:t=>this.triggerEl=t,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onFocusin:this.handleFocusIn,onFocusout:this.handleFocusOut,onKeyDown:this.handleKeyDown,"aria-describedby":this.visible?"tooltip-panel":void 0},o("slot",{key:"655c2ccfbab1ab99ed91e93bae26782ead9b2e17"})),this.visible&&this.content&&o("div",{key:"7ce0ad2c565285aaf25810151ecfea1f74657c5a",id:"tooltip-panel",class:{"co-tooltip__panel":!0,[`co-tooltip__panel--${t}`]:!0},role:"tooltip",popover:"manual",ref:t=>{t&&t!==this.panelEl&&(this.panelEl=t,this.promotePanel(),this.scheduleUpdate())},style:{maxWidth:this.maxWidth}},this.arrow&&o("div",{key:"d752ed1a61541a006b24142219b9e296a9c8b062",class:`co-tooltip__arrow co-tooltip__arrow--${t}`}),o("span",{key:"b073b093fae892708c9d5a1dfb84cf9071b3cc5c",class:"co-tooltip__content"},this.content)))}get el(){return i(this)}static get watchers(){return{visible:[{onVisibleChange:0}],disabled:[{onDisabledChange:0}]}}};p.style=":host{display:inline-block;position:relative}.co-tooltip{display:inline-block}.co-tooltip__trigger{display:inline-block}:host([block]){display:block;width:100%;min-width:0}:host([block]) .co-tooltip,:host([block]) .co-tooltip__trigger{display:block;width:100%;min-width:0}.co-tooltip__panel{position:fixed;inset:auto;top:0;left:0;margin:0;border:0;max-height:none;overflow:visible;z-index:10000;visibility:hidden;opacity:0;pointer-events:none;background:var(--co-color-base-negro, #1f1c1b);color:var(--co-color-base-blanco, #fff);font-family:var(--co-font-family-primary, 'Geist', sans-serif);font-size:var(--co-font-size-12, 12px);line-height:1.4;font-weight:400;padding:var(--co-spacing-xs, 4px) var(--co-spacing-sm, 8px);border-radius:var(--co-border-radius-xxs, 4px);box-shadow:0 4px 12px rgba(31, 28, 27, 0.12);white-space:normal;word-wrap:break-word;transition:opacity 0.15s ease, transform 0.15s ease}.co-tooltip__panel--positioned{visibility:visible;opacity:1}.co-tooltip__panel--top{transform:translateY(4px)}.co-tooltip__panel--top.co-tooltip__panel--positioned{transform:translateY(0)}.co-tooltip__panel--bottom{transform:translateY(-4px)}.co-tooltip__panel--bottom.co-tooltip__panel--positioned{transform:translateY(0)}.co-tooltip__panel--left{transform:translateX(4px)}.co-tooltip__panel--left.co-tooltip__panel--positioned{transform:translateX(0)}.co-tooltip__panel--right{transform:translateX(-4px)}.co-tooltip__panel--right.co-tooltip__panel--positioned{transform:translateX(0)}.co-tooltip__arrow{position:absolute;width:0;height:0;border:5px solid transparent}.co-tooltip__arrow--top{bottom:-10px;left:50%;transform:translateX(-50%);border-top-color:var(--co-color-base-negro, #1f1c1b);border-bottom:none}.co-tooltip__arrow--bottom{top:-5px;left:50%;transform:translateX(-50%);border-bottom-color:var(--co-color-base-negro, #1f1c1b);border-top:none}.co-tooltip__arrow--left{right:-10px;top:50%;transform:translateY(-50%);border-left-color:var(--co-color-base-negro, #1f1c1b);border-right:none}.co-tooltip__arrow--right{left:-5px;top:50%;transform:translateY(-50%);border-right-color:var(--co-color-base-negro, #1f1c1b);border-left:none}.co-tooltip__content{display:block}";export{h as co_avatar,p as co_tooltip}
@@ -1 +1 @@
1
- import{r as o,c as e,h as c}from"./p-tT-aZV0-.js";const r=class{constructor(c){o(this,c),this.coChange=e(this,"coChange",7),this.layout="vertical",this.status="default",this.value="[]",this.options=[],this.direction="column",this.size="small",this.disabled=!1,this.handleToggle=o=>{if(this.disabled)return;const e=[...this.selectedValues],c=e.indexOf(o);c>=0?e.splice(c,1):e.push(o),this.value=JSON.stringify(e),this.coChange.emit(e)}}onValueChange(){}get parsedOptions(){let o=this.options;if("string"==typeof o)try{o=JSON.parse(o)}catch(o){return[]}return Array.isArray(o)?o.map((o=>"string"==typeof o?{label:o,value:o}:o)):[]}get selectedValues(){if("string"==typeof this.value)try{return JSON.parse(this.value)}catch(o){return[]}return this.value}get statusIcon(){return{error:"warning-circle",success:"check-circle",warning:"warning",info:"info"}[this.status]||null}render(){const o=this.label||this.secondaryLabel,e=this.parsedOptions,r=this.selectedValues;return c("div",{key:"d3f34e7ee59ebcc1494ee6aabef1e4c476044dbd",class:{"co-checkbox-group":!0,"co-checkbox-group--disabled":this.disabled,[`co-checkbox-group--${this.status}`]:"default"!==this.status},role:"group","aria-label":this.label||""},o&&c("div",{key:"a47de05988ae37497154fc80e8cbf5f6f62bb1d4",class:"co-checkbox-group__labels"},this.label&&c("span",{key:"fc39ff62eeea3136584a0667e71d816958a1ed57",class:"co-checkbox-group__label"},this.label),this.secondaryLabel&&c("span",{key:"205c1cbdbfcba6d882c7f4c27bfd633e55acea0f",class:"co-checkbox-group__secondary-label"},this.secondaryLabel)),c("div",{key:"33d6b03de2f2ba30afe1d1865a43ade7b8344f96",class:{"co-checkbox-group__options":!0,[`co-checkbox-group__options--${this.direction}`]:!0}},e.map((o=>{const e=this.disabled||!!o.disabled,t=r.includes(o.value);return c("div",{class:{"co-checkbox-group__item":!0,"co-checkbox-group__item--disabled":e},onClick:()=>!e&&this.handleToggle(o.value)},c("span",{class:{"co-checkbox-group__box":!0,[`co-checkbox-group__box--${this.size}`]:!0,"co-checkbox-group__box--checked":t,"co-checkbox-group__box--disabled":e},role:"checkbox","aria-checked":String(t),"aria-label":o.label}),c("span",{class:"co-checkbox-group__option-label"},o.label))}))),this.helperText&&c("div",{key:"7ac076bf100f66eb851d7e76e0b052d42fef69f8",class:`co-checkbox-group__helper co-checkbox-group__helper--${this.status}`},this.statusIcon&&c("co-icon",{key:"7a13362e9a77a13ebb1e127ee57c10e7f64110fb",name:this.statusIcon,size:14,weight:"fill",class:"co-checkbox-group__helper-icon"}),c("span",{key:"44e9f68fd19c5a50affde1eb743c3fc8e5eef8e4",class:"co-checkbox-group__helper-text"},this.helperText)))}static get watchers(){return{value:[{onValueChange:0}]}}};r.style=":host{display:block;font-family:var(--co-font-family-primary);font-size:var(--co-font-size-14);letter-spacing:var(--co-font-letter-spacing-body);line-height:1}.co-checkbox-group{display:flex;flex-direction:column;gap:var(--co-spacing-sm2)}.co-checkbox-group__labels{display:flex;align-items:center;justify-content:space-between;padding:0 var(--co-spacing-xs);gap:var(--co-spacing-sm2)}.co-checkbox-group__label{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);font-weight:400;line-height:1;white-space:nowrap;cursor:default}.co-checkbox-group__secondary-label{color:var(--co-semantic-text-muted);font-size:var(--co-font-size-14);font-weight:400;line-height:1;white-space:nowrap;text-align:right}.co-checkbox-group--disabled .co-checkbox-group__label,.co-checkbox-group--disabled .co-checkbox-group__secondary-label{color:var(--co-semantic-text-disabled)}.co-checkbox-group__options{display:flex;gap:var(--co-spacing-md)}.co-checkbox-group__options--column{flex-direction:column;gap:var(--co-spacing-sm2)}.co-checkbox-group__options--row{flex-direction:row;flex-wrap:wrap;gap:var(--co-spacing-md)}.co-checkbox-group__item{display:flex;align-items:center;gap:var(--co-spacing-sm2);cursor:pointer;user-select:none}.co-checkbox-group__item--disabled{cursor:not-allowed}.co-checkbox-group__option-label{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);font-weight:400;line-height:1;white-space:nowrap}.co-checkbox-group__item--disabled .co-checkbox-group__option-label{color:var(--co-semantic-text-disabled)}.co-checkbox-group__box{position:relative;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;box-sizing:border-box;transition:background 0.15s ease, border-color 0.15s ease;overflow:hidden}.co-checkbox-group__box--small{width:16px;height:16px;border-radius:var(--co-border-radius-xxs)}.co-checkbox-group__box--large{width:24px;height:24px;border-radius:var(--co-spacing-sm)}.co-checkbox-group__box:not(.co-checkbox-group__box--checked){background:color-mix(in srgb, var(--co-semantic-surface-secondary) 35%, transparent);-webkit-backdrop-filter:blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate));backdrop-filter:blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate));border:1px solid var(--co-semantic-border-subtle)}.co-checkbox-group__box--checked{background:var(--co-semantic-surface-primary);border:none}.co-checkbox-group__box--checked::after{content:'';display:block;box-sizing:border-box;border-style:solid;border-color:var(--co-semantic-on-primary);border-width:0 0 1.5px 1.5px;transform:rotate(-45deg) translateY(-15%)}.co-checkbox-group__box--small.co-checkbox-group__box--checked::after{width:7px;height:4px}.co-checkbox-group__box--large.co-checkbox-group__box--checked::after{width:10px;height:6px}.co-checkbox-group__box--disabled{opacity:0.4;cursor:not-allowed;pointer-events:none}.co-checkbox-group--error .co-checkbox-group__box:not(.co-checkbox-group__box--checked){border-color:var(--co-semantic-status-error)}.co-checkbox-group__helper{display:flex;align-items:center;gap:var(--co-spacing-xs);padding:0 var(--co-spacing-xs)}.co-checkbox-group__helper-icon{flex-shrink:0;display:flex;align-items:center}.co-checkbox-group__helper-text{color:var(--co-semantic-text-muted);font-size:var(--co-font-size-14);font-weight:400;line-height:1}.co-checkbox-group__helper--error .co-checkbox-group__helper-icon,.co-checkbox-group__helper--error .co-checkbox-group__helper-text{color:var(--co-semantic-status-error)}.co-checkbox-group__helper--success .co-checkbox-group__helper-icon,.co-checkbox-group__helper--success .co-checkbox-group__helper-text{color:var(--co-semantic-status-success)}.co-checkbox-group__helper--warning .co-checkbox-group__helper-icon,.co-checkbox-group__helper--warning .co-checkbox-group__helper-text{color:var(--co-color-status-review)}.co-checkbox-group__helper--info .co-checkbox-group__helper-icon,.co-checkbox-group__helper--info .co-checkbox-group__helper-text{color:var(--co-semantic-status-info)}:host([layout='horizontal']) .co-checkbox-group{display:grid;grid-template-columns:var(--co-field-label-width, max-content) 1fr;align-items:start;column-gap:var(--co-spacing-md);row-gap:var(--co-spacing-sm2)}:host([layout='horizontal']) .co-checkbox-group__labels{grid-column:1;grid-row:1;padding-top:0;min-width:0}:host([layout='horizontal']) .co-checkbox-group__label{white-space:normal}:host([layout='horizontal']) .co-checkbox-group>:not(.co-checkbox-group__labels){grid-column:2;min-width:0}@supports not (background: color-mix(in srgb, red, transparent)){.co-checkbox-group__box:not(.co-checkbox-group__box--checked){background:transparent}}";export{r as co_checkbox_group}
1
+ import{r as o,c as e,h as c}from"./p-BCEz3S-z.js";const r=class{constructor(c){o(this,c),this.coChange=e(this,"coChange",7),this.layout="vertical",this.status="default",this.value="[]",this.options=[],this.direction="column",this.size="small",this.disabled=!1,this.handleToggle=o=>{if(this.disabled)return;const e=[...this.selectedValues],c=e.indexOf(o);c>=0?e.splice(c,1):e.push(o),this.value=JSON.stringify(e),this.coChange.emit(e)}}onValueChange(){}get parsedOptions(){let o=this.options;if("string"==typeof o)try{o=JSON.parse(o)}catch(o){return[]}return Array.isArray(o)?o.map((o=>"string"==typeof o?{label:o,value:o}:o)):[]}get selectedValues(){if("string"==typeof this.value)try{return JSON.parse(this.value)}catch(o){return[]}return this.value}get statusIcon(){return{error:"warning-circle",success:"check-circle",warning:"warning",info:"info"}[this.status]||null}render(){const o=this.label||this.secondaryLabel,e=this.parsedOptions,r=this.selectedValues;return c("div",{key:"d3f34e7ee59ebcc1494ee6aabef1e4c476044dbd",class:{"co-checkbox-group":!0,"co-checkbox-group--disabled":this.disabled,[`co-checkbox-group--${this.status}`]:"default"!==this.status},role:"group","aria-label":this.label||""},o&&c("div",{key:"a47de05988ae37497154fc80e8cbf5f6f62bb1d4",class:"co-checkbox-group__labels"},this.label&&c("span",{key:"fc39ff62eeea3136584a0667e71d816958a1ed57",class:"co-checkbox-group__label"},this.label),this.secondaryLabel&&c("span",{key:"205c1cbdbfcba6d882c7f4c27bfd633e55acea0f",class:"co-checkbox-group__secondary-label"},this.secondaryLabel)),c("div",{key:"33d6b03de2f2ba30afe1d1865a43ade7b8344f96",class:{"co-checkbox-group__options":!0,[`co-checkbox-group__options--${this.direction}`]:!0}},e.map((o=>{const e=this.disabled||!!o.disabled,t=r.includes(o.value);return c("div",{class:{"co-checkbox-group__item":!0,"co-checkbox-group__item--disabled":e},onClick:()=>!e&&this.handleToggle(o.value)},c("span",{class:{"co-checkbox-group__box":!0,[`co-checkbox-group__box--${this.size}`]:!0,"co-checkbox-group__box--checked":t,"co-checkbox-group__box--disabled":e},role:"checkbox","aria-checked":String(t),"aria-label":o.label}),c("span",{class:"co-checkbox-group__option-label"},o.label))}))),this.helperText&&c("div",{key:"7ac076bf100f66eb851d7e76e0b052d42fef69f8",class:`co-checkbox-group__helper co-checkbox-group__helper--${this.status}`},this.statusIcon&&c("co-icon",{key:"7a13362e9a77a13ebb1e127ee57c10e7f64110fb",name:this.statusIcon,size:14,weight:"fill",class:"co-checkbox-group__helper-icon"}),c("span",{key:"44e9f68fd19c5a50affde1eb743c3fc8e5eef8e4",class:"co-checkbox-group__helper-text"},this.helperText)))}static get watchers(){return{value:[{onValueChange:0}]}}};r.style=":host{display:block;font-family:var(--co-font-family-primary);font-size:var(--co-font-size-14);letter-spacing:var(--co-font-letter-spacing-body);line-height:1}.co-checkbox-group{display:flex;flex-direction:column;gap:var(--co-spacing-sm2)}.co-checkbox-group__labels{display:flex;align-items:center;justify-content:space-between;padding:0 var(--co-spacing-xs);gap:var(--co-spacing-sm2)}.co-checkbox-group__label{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);font-weight:400;line-height:1;white-space:nowrap;cursor:default}.co-checkbox-group__secondary-label{color:var(--co-semantic-text-muted);font-size:var(--co-font-size-14);font-weight:400;line-height:1;white-space:nowrap;text-align:right}.co-checkbox-group--disabled .co-checkbox-group__label,.co-checkbox-group--disabled .co-checkbox-group__secondary-label{color:var(--co-semantic-text-disabled)}.co-checkbox-group__options{display:flex;gap:var(--co-spacing-md)}.co-checkbox-group__options--column{flex-direction:column;gap:var(--co-spacing-sm2)}.co-checkbox-group__options--row{flex-direction:row;flex-wrap:wrap;gap:var(--co-spacing-md)}.co-checkbox-group__item{display:flex;align-items:center;gap:var(--co-spacing-sm2);cursor:pointer;user-select:none}.co-checkbox-group__item--disabled{cursor:not-allowed}.co-checkbox-group__option-label{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);font-weight:400;line-height:1;white-space:nowrap}.co-checkbox-group__item--disabled .co-checkbox-group__option-label{color:var(--co-semantic-text-disabled)}.co-checkbox-group__box{position:relative;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;box-sizing:border-box;transition:background 0.15s ease, border-color 0.15s ease;overflow:hidden}.co-checkbox-group__box--small{width:16px;height:16px;border-radius:var(--co-border-radius-xxs)}.co-checkbox-group__box--large{width:24px;height:24px;border-radius:var(--co-spacing-sm)}.co-checkbox-group__box:not(.co-checkbox-group__box--checked){background:color-mix(in srgb, var(--co-semantic-surface-secondary) 35%, transparent);-webkit-backdrop-filter:blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate));backdrop-filter:blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate));border:1px solid var(--co-semantic-border-subtle)}.co-checkbox-group__box--checked{background:var(--co-semantic-surface-primary);border:none}.co-checkbox-group__box--checked::after{content:'';display:block;box-sizing:border-box;border-style:solid;border-color:var(--co-semantic-on-primary);border-width:0 0 1.5px 1.5px;transform:rotate(-45deg) translateY(-15%)}.co-checkbox-group__box--small.co-checkbox-group__box--checked::after{width:7px;height:4px}.co-checkbox-group__box--large.co-checkbox-group__box--checked::after{width:10px;height:6px}.co-checkbox-group__box--disabled{opacity:0.4;cursor:not-allowed;pointer-events:none}.co-checkbox-group--error .co-checkbox-group__box:not(.co-checkbox-group__box--checked){border-color:var(--co-semantic-status-error)}.co-checkbox-group__helper{display:flex;align-items:center;gap:var(--co-spacing-xs);padding:0 var(--co-spacing-xs)}.co-checkbox-group__helper-icon{flex-shrink:0;display:flex;align-items:center}.co-checkbox-group__helper-text{color:var(--co-semantic-text-muted);font-size:var(--co-font-size-14);font-weight:400;line-height:1}.co-checkbox-group__helper--error .co-checkbox-group__helper-icon,.co-checkbox-group__helper--error .co-checkbox-group__helper-text{color:var(--co-semantic-status-error)}.co-checkbox-group__helper--success .co-checkbox-group__helper-icon,.co-checkbox-group__helper--success .co-checkbox-group__helper-text{color:var(--co-semantic-status-success)}.co-checkbox-group__helper--warning .co-checkbox-group__helper-icon,.co-checkbox-group__helper--warning .co-checkbox-group__helper-text{color:var(--co-color-status-review)}.co-checkbox-group__helper--info .co-checkbox-group__helper-icon,.co-checkbox-group__helper--info .co-checkbox-group__helper-text{color:var(--co-semantic-status-info)}:host([layout='horizontal']) .co-checkbox-group{display:grid;grid-template-columns:var(--co-field-label-width, max-content) 1fr;align-items:start;column-gap:var(--co-spacing-md);row-gap:var(--co-spacing-sm2)}:host([layout='horizontal']) .co-checkbox-group__labels{grid-column:1;grid-row:1;padding-top:0;min-width:0}:host([layout='horizontal']) .co-checkbox-group__label{white-space:normal}:host([layout='horizontal']) .co-checkbox-group>:not(.co-checkbox-group__labels){grid-column:2;min-width:0}@supports not (background: color-mix(in srgb, red, transparent)){.co-checkbox-group__box:not(.co-checkbox-group__box--checked){background:transparent}}";export{r as co_checkbox_group}
@@ -1 +1 @@
1
- import{r as a,c as e,h as c,a as o}from"./p-tT-aZV0-.js";import{r as t}from"./p-CQY6Ul7q.js";const s=class{constructor(c){a(this,c),this.coSelect=e(this,"coSelect",7),this.coClose=e(this,"coClose",7),this.coSearch=e(this,"coSearch",7),this.coScopeChange=e(this,"coScopeChange",1),this.coBackspaceEmpty=e(this,"coBackspaceEmpty",1),this.coChipRemove=e(this,"coChipRemove",1),this.coTabSelect=e(this,"coTabSelect",1),this.coMoreTabs=e(this,"coMoreTabs",1),this.open=!1,this.placeholder="Search...",this.items=[],this.emptyMessage="No results found",this.async=!1,this.loading=!1,this.chips="[]",this.tabs="[]",this.activeTab="",this.hasMore=!1,this.moreLabel="More",this.favorites="[]",this.query="",this.handleInput=a=>{this.query=a.target.value,this.coSearch.emit(this.query)},this.handleKeyDown=a=>{var e,c;if("Backspace"===a.key&&""===this.query)return a.preventDefault(),void this.coBackspaceEmpty.emit(this.query);switch(a.key){case"ArrowDown":case"ArrowUp":case"Enter":a.preventDefault(),null===(e=this.optionListEl)||void 0===e||e.handleKey(a);break;case"Escape":a.preventDefault(),this.close();break;case"Tab":a.preventDefault(),null===(c=this.optionListEl)||void 0===c||c.handleKey(new KeyboardEvent("keydown",{key:a.shiftKey?"ArrowUp":"ArrowDown"}))}},this.handleListPick=a=>{const e=this.filteredItems.find((e=>e.value===a));e&&this.selectItem(e)},this.handleOverlayClick=()=>{this.close()},this.handlePanelClick=a=>{a.stopPropagation()},this.handleTriggerClick=()=>{this.open=!0}}get parsedItems(){if("string"==typeof this.items)try{return JSON.parse(this.items)}catch(a){return[]}return this.items}get filteredItems(){return a=this.parsedItems,e=this.query,this.async?a:e?t(a,e,(a=>[a.label,a.value])):a;var a,e}get parsedChips(){try{const a="string"==typeof this.chips?JSON.parse(this.chips):this.chips;return Array.isArray(a)?a:[]}catch(a){return[]}}get parsedTabs(){try{const a="string"==typeof this.tabs?JSON.parse(this.tabs):this.tabs;return Array.isArray(a)?a:[]}catch(a){return[]}}get parsedFavorites(){try{const a="string"==typeof this.favorites?JSON.parse(this.favorites):this.favorites;return Array.isArray(a)?a:[]}catch(a){return[]}}onActiveTabChange(a){a&&(this.query=""),requestAnimationFrame((()=>{var a;const e=null===(a=this.el.shadowRoot)||void 0===a?void 0:a.querySelector('.co-command-search__tab[aria-selected="true"]');null==e||e.scrollIntoView({inline:"nearest",block:"nearest"})}))}onOpenChange(a){a&&(this.query="",requestAnimationFrame((()=>{var a;return null===(a=this.inputEl)||void 0===a?void 0:a.focus()})))}selectItem(a){!function(a){return!0===a.keepOpen}(a)?(this.coSelect.emit(a.value),this.close()):this.coScopeChange.emit(a.value)}close(){this.open=!1,this.coClose.emit()}render(){const a=this.filteredItems;return[c("div",{key:"6e45f5a53f39f516cc8a3eb43180b4c6f6c413fd",class:"co-command-search__trigger",onClick:this.handleTriggerClick},c("slot",{key:"0dbbb33bf84b9a0fcf94d71802b87a2d0d240522",name:"trigger"})),c("co-overlay",{key:"b7f46dde81f6f3462b550c3ccde29388604f9404",open:this.open,onCoClose:this.handleOverlayClick},c("div",{key:"745f5b7e2a31897b88303deb6b49ba3787b7c7b8",class:{"co-command-search":!0,"co-command-search--open":this.open},part:"panel",role:"dialog","aria-modal":"true","aria-label":"Command palette",onClick:this.handlePanelClick},c("div",{key:"90f367e679c3e971cbe7823e766152cb02b2a018",class:"co-command-search__input-row",part:"input-row"},c("co-icon",{key:"f084dde02745550de0ebe92840f4a3f62e7eb543",name:"magnifying-glass",size:20}),this.parsedChips.map(((a,e)=>c("span",{class:"co-command-search__facet-chip"},a.icon&&c("co-icon",{name:a.icon,size:12}),c("span",{class:"co-command-search__facet-chip-label"},a.label),c("button",{class:"co-command-search__facet-chip-remove",type:"button","aria-label":`Remove filter ${a.label}`,onClick:a=>{a.stopPropagation(),this.coChipRemove.emit(e)}},c("co-icon",{name:"x",size:10,weight:"bold"}))))),c("input",{key:"d00091dd6ba08d3924a00965b769eec12bade9da",class:"co-command-search__input",type:"text",placeholder:this.placeholder,value:this.query,onInput:this.handleInput,onKeyDown:this.handleKeyDown,ref:a=>this.inputEl=a,part:"input",role:"combobox","aria-expanded":this.open?"true":"false","aria-autocomplete":"list"}),this.loading&&c("co-loader",{key:"b7c60019d203f7575535a0d12525c55441ba9f69",class:"co-command-search__loading",part:"loading",size:"sm"}),c("span",{key:"6bb4a4c2745b060f5fc118ce42eeb233709e6cde",class:"co-command-search__shortcut"},"ESC")),(this.parsedTabs.length>0||this.hasMore)&&c("div",{key:"bc77af8a7d44a3156af87c1e0fb16392acca7aa8",class:"co-command-search__tabs",part:"tabs",role:"tablist"},this.parsedTabs.map((a=>{const e=a.value===this.activeTab;return c("co-chip",{class:"co-command-search__tab",role:"tab","aria-selected":e?"true":"false",clickable:!0,selected:e,variant:e?"filled":"outlined",color:e?"primary":"default",iconLeft:a.icon,label:a.label,onCoClick:()=>this.coTabSelect.emit(e?"":a.value)})})),this.hasMore&&c("co-chip",{key:"ac6931618eacc84c32006f53c8e0c5bbfec3d929",class:"co-command-search__tab co-command-search__tab--more",clickable:!0,variant:"outlined",label:this.moreLabel,iconRight:"caret-down",onCoClick:()=>this.coMoreTabs.emit()})),c("div",{key:"cd70456639c4e41268ddfff11f921c7a1dbede7e",class:"co-command-search__results",part:"results"},this.parsedFavorites.length>0&&!this.query&&c("div",{key:"024125d66406fb564e972f207f10972e7bbd944f",class:"co-command-search__fav",part:"favorites"},c("div",{key:"9b165c53215a7818efe9ca3ee7d601df25f03e7e",class:"co-command-search__fav-grid"},this.parsedFavorites.map((a=>c("button",{class:"co-command-search__fav-card",type:"button",onClick:()=>this.coSelect.emit(a.value)},c("span",{class:"co-command-search__fav-icon",style:{background:a.color||"var(--co-semantic-surface-muted)"}},c("co-icon",{name:a.icon||"circle",size:26,weight:"fill"})),c("span",{class:"co-command-search__fav-label"},a.label)))))),c("co-option-list",{key:"f1f97b1606aaafab94cc8f9d2ab66ce4948cae0b",ref:a=>this.optionListEl=a,items:JSON.stringify(a.map((a=>({_id:a.value,label:a.label,icon:a.icon,description:a.subtitle,group:a.section,disabled:a.disabled})))),autoHighlight:!0,highlightMatches:!0,highlightTerm:this.query,loading:this.loading,emptyMessage:this.emptyMessage,onCoChange:a=>this.handleListPick(a.detail.item._id)}))))]}get el(){return o(this)}static get watchers(){return{activeTab:[{onActiveTabChange:0}],open:[{onOpenChange:0}]}}};s.style=":host{display:contents}co-overlay{--co-overlay-bg:rgba(0, 0, 0, 0.16)}.co-command-search__trigger{display:contents}.co-command-search{display:flex;flex-direction:column;width:90vw;max-width:560px;max-height:420px;background:var(--co-semantic-surface-page);border-radius:var(--co-border-radius-lg);box-shadow:0 8px 32px rgba(0, 0, 0, 0.12);overflow:hidden;font-family:var(--co-font-family-primary);transform:translateY(8px) scale(0.98);opacity:0;transition:transform 0.15s ease, opacity 0.15s ease;margin-top:-15vh}.co-command-search--open{transform:translateY(0) scale(1);opacity:1}.co-command-search__input-row{display:flex;align-items:center;gap:var(--co-spacing-sm);padding:var(--co-spacing-md) var(--co-spacing-lg);border-bottom:1px solid var(--co-semantic-border-default);color:var(--co-semantic-text-muted)}.co-command-search__input{flex:1;border:none;outline:none;background:transparent;font-size:var(--co-font-size-16);font-family:var(--co-font-family-primary);color:var(--co-semantic-text-default);min-width:0}.co-command-search__input::placeholder{color:var(--co-semantic-text-muted)}.co-command-search__shortcut{font-size:var(--co-font-size-10);color:var(--co-semantic-text-muted);background:var(--co-semantic-surface-muted);padding:2px var(--co-spacing-xs);border-radius:var(--co-border-radius-xxs);font-weight:500;line-height:1.4;flex-shrink:0}.co-command-search__results{flex:1;overflow-y:auto;padding:var(--co-spacing-xs) 0}.co-command-search__loading{flex-shrink:0;display:flex;align-items:center}.co-command-search__facet-chip{display:inline-flex;align-items:center;gap:2px;padding:2px var(--co-spacing-xs);background:var(--co-color-primary-azul);color:var(--co-color-base-blanco, #fff);border-radius:var(--co-border-radius-full);font-size:var(--co-font-size-12);font-weight:500;white-space:nowrap;flex-shrink:0}.co-command-search__facet-chip-label{max-width:110px;overflow:hidden;text-overflow:ellipsis}.co-command-search__facet-chip-remove{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;border:none;border-radius:var(--co-border-radius-full);background:rgba(255, 255, 255, 0.25);color:inherit;cursor:pointer;padding:0;line-height:1;transition:background 0.1s ease}.co-command-search__facet-chip-remove:hover{background:rgba(255, 255, 255, 0.4)}.co-command-search__tabs{display:flex;align-items:center;gap:var(--co-spacing-sm);padding:var(--co-spacing-md);overflow-x:auto;border-bottom:1px solid var(--co-semantic-border-default);scroll-padding-right:104px}.co-command-search__tab{flex:0 0 auto}.co-command-search__tab--more{position:sticky;right:0;padding-left:var(--co-spacing-sm);background:var(--co-semantic-surface-page);box-shadow:-12px 0 10px -4px var(--co-semantic-surface-page)}.co-command-search__fav{padding:var(--co-spacing-sm) var(--co-spacing-lg) var(--co-spacing-md);border-bottom:1px solid var(--co-semantic-border-default)}.co-command-search__fav-grid{display:grid;grid-template-columns:repeat(auto-fill, minmax(88px, 1fr));gap:var(--co-spacing-xs)}.co-command-search__fav-card{display:flex;flex-direction:column;align-items:center;gap:var(--co-spacing-sm);padding:var(--co-spacing-sm) var(--co-spacing-xs);background:transparent;border:none;border-radius:var(--co-border-radius-sm);cursor:pointer;font-family:inherit;text-align:center;min-width:0;transition:background 0.12s ease}.co-command-search__fav-card:hover{background:var(--co-semantic-surface-hover)}.co-command-search__fav-card:focus-visible{outline:none;box-shadow:0 0 0 2px var(--co-semantic-border-focus-ring)}.co-command-search__fav-icon{flex:none;width:50px;height:50px;border-radius:var(--co-border-radius-sm);display:flex;align-items:center;justify-content:center;color:var(--co-color-base-blanco, #fff);box-shadow:0 2px 6px rgba(0, 0, 0, 0.14)}.co-command-search__fav-label{font-size:var(--co-font-size-12);font-weight:500;line-height:1.2;color:var(--co-semantic-text-default);max-width:100%;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}";export{s as co_command_search}
1
+ import{r as a,c as e,h as c,a as o}from"./p-BCEz3S-z.js";import{r as t}from"./p-CQY6Ul7q.js";const s=class{constructor(c){a(this,c),this.coSelect=e(this,"coSelect",7),this.coClose=e(this,"coClose",7),this.coSearch=e(this,"coSearch",7),this.coScopeChange=e(this,"coScopeChange",1),this.coBackspaceEmpty=e(this,"coBackspaceEmpty",1),this.coChipRemove=e(this,"coChipRemove",1),this.coTabSelect=e(this,"coTabSelect",1),this.coMoreTabs=e(this,"coMoreTabs",1),this.open=!1,this.placeholder="Search...",this.items=[],this.emptyMessage="No results found",this.async=!1,this.loading=!1,this.chips="[]",this.tabs="[]",this.activeTab="",this.hasMore=!1,this.moreLabel="More",this.favorites="[]",this.query="",this.handleInput=a=>{this.query=a.target.value,this.coSearch.emit(this.query)},this.handleKeyDown=a=>{var e,c;if("Backspace"===a.key&&""===this.query)return a.preventDefault(),void this.coBackspaceEmpty.emit(this.query);switch(a.key){case"ArrowDown":case"ArrowUp":case"Enter":a.preventDefault(),null===(e=this.optionListEl)||void 0===e||e.handleKey(a);break;case"Escape":a.preventDefault(),this.close();break;case"Tab":a.preventDefault(),null===(c=this.optionListEl)||void 0===c||c.handleKey(new KeyboardEvent("keydown",{key:a.shiftKey?"ArrowUp":"ArrowDown"}))}},this.handleListPick=a=>{const e=this.filteredItems.find((e=>e.value===a));e&&this.selectItem(e)},this.handleOverlayClick=()=>{this.close()},this.handlePanelClick=a=>{a.stopPropagation()},this.handleTriggerClick=()=>{this.open=!0}}get parsedItems(){if("string"==typeof this.items)try{return JSON.parse(this.items)}catch(a){return[]}return this.items}get filteredItems(){return a=this.parsedItems,e=this.query,this.async?a:e?t(a,e,(a=>[a.label,a.value])):a;var a,e}get parsedChips(){try{const a="string"==typeof this.chips?JSON.parse(this.chips):this.chips;return Array.isArray(a)?a:[]}catch(a){return[]}}get parsedTabs(){try{const a="string"==typeof this.tabs?JSON.parse(this.tabs):this.tabs;return Array.isArray(a)?a:[]}catch(a){return[]}}get parsedFavorites(){try{const a="string"==typeof this.favorites?JSON.parse(this.favorites):this.favorites;return Array.isArray(a)?a:[]}catch(a){return[]}}onActiveTabChange(a){a&&(this.query=""),requestAnimationFrame((()=>{var a;const e=null===(a=this.el.shadowRoot)||void 0===a?void 0:a.querySelector('.co-command-search__tab[aria-selected="true"]');null==e||e.scrollIntoView({inline:"nearest",block:"nearest"})}))}onOpenChange(a){a&&(this.query="",requestAnimationFrame((()=>{var a;return null===(a=this.inputEl)||void 0===a?void 0:a.focus()})))}selectItem(a){!function(a){return!0===a.keepOpen}(a)?(this.coSelect.emit(a.value),this.close()):this.coScopeChange.emit(a.value)}close(){this.open=!1,this.coClose.emit()}render(){const a=this.filteredItems;return[c("div",{key:"6e45f5a53f39f516cc8a3eb43180b4c6f6c413fd",class:"co-command-search__trigger",onClick:this.handleTriggerClick},c("slot",{key:"0dbbb33bf84b9a0fcf94d71802b87a2d0d240522",name:"trigger"})),c("co-overlay",{key:"b7f46dde81f6f3462b550c3ccde29388604f9404",open:this.open,onCoClose:this.handleOverlayClick},c("div",{key:"745f5b7e2a31897b88303deb6b49ba3787b7c7b8",class:{"co-command-search":!0,"co-command-search--open":this.open},part:"panel",role:"dialog","aria-modal":"true","aria-label":"Command palette",onClick:this.handlePanelClick},c("div",{key:"90f367e679c3e971cbe7823e766152cb02b2a018",class:"co-command-search__input-row",part:"input-row"},c("co-icon",{key:"f084dde02745550de0ebe92840f4a3f62e7eb543",name:"magnifying-glass",size:20}),this.parsedChips.map(((a,e)=>c("span",{class:"co-command-search__facet-chip"},a.icon&&c("co-icon",{name:a.icon,size:12}),c("span",{class:"co-command-search__facet-chip-label"},a.label),c("button",{class:"co-command-search__facet-chip-remove",type:"button","aria-label":`Remove filter ${a.label}`,onClick:a=>{a.stopPropagation(),this.coChipRemove.emit(e)}},c("co-icon",{name:"x",size:10,weight:"bold"}))))),c("input",{key:"d00091dd6ba08d3924a00965b769eec12bade9da",class:"co-command-search__input",type:"text",placeholder:this.placeholder,value:this.query,onInput:this.handleInput,onKeyDown:this.handleKeyDown,ref:a=>this.inputEl=a,part:"input",role:"combobox","aria-expanded":this.open?"true":"false","aria-autocomplete":"list"}),this.loading&&c("co-loader",{key:"b7c60019d203f7575535a0d12525c55441ba9f69",class:"co-command-search__loading",part:"loading",size:"sm"}),c("span",{key:"6bb4a4c2745b060f5fc118ce42eeb233709e6cde",class:"co-command-search__shortcut"},"ESC")),(this.parsedTabs.length>0||this.hasMore)&&c("div",{key:"bc77af8a7d44a3156af87c1e0fb16392acca7aa8",class:"co-command-search__tabs",part:"tabs",role:"tablist"},this.parsedTabs.map((a=>{const e=a.value===this.activeTab;return c("co-chip",{class:"co-command-search__tab",role:"tab","aria-selected":e?"true":"false",clickable:!0,selected:e,variant:e?"filled":"outlined",color:e?"primary":"default",iconLeft:a.icon,label:a.label,onCoClick:()=>this.coTabSelect.emit(e?"":a.value)})})),this.hasMore&&c("co-chip",{key:"ac6931618eacc84c32006f53c8e0c5bbfec3d929",class:"co-command-search__tab co-command-search__tab--more",clickable:!0,variant:"outlined",label:this.moreLabel,iconRight:"caret-down",onCoClick:()=>this.coMoreTabs.emit()})),c("div",{key:"cd70456639c4e41268ddfff11f921c7a1dbede7e",class:"co-command-search__results",part:"results"},this.parsedFavorites.length>0&&!this.query&&c("div",{key:"024125d66406fb564e972f207f10972e7bbd944f",class:"co-command-search__fav",part:"favorites"},c("div",{key:"9b165c53215a7818efe9ca3ee7d601df25f03e7e",class:"co-command-search__fav-grid"},this.parsedFavorites.map((a=>c("button",{class:"co-command-search__fav-card",type:"button",onClick:()=>this.coSelect.emit(a.value)},c("span",{class:"co-command-search__fav-icon",style:{background:a.color||"var(--co-semantic-surface-muted)"}},c("co-icon",{name:a.icon||"circle",size:26,weight:"fill"})),c("span",{class:"co-command-search__fav-label"},a.label)))))),c("co-option-list",{key:"f1f97b1606aaafab94cc8f9d2ab66ce4948cae0b",ref:a=>this.optionListEl=a,items:JSON.stringify(a.map((a=>({_id:a.value,label:a.label,icon:a.icon,description:a.subtitle,group:a.section,disabled:a.disabled})))),autoHighlight:!0,highlightMatches:!0,highlightTerm:this.query,loading:this.loading,emptyMessage:this.emptyMessage,onCoChange:a=>this.handleListPick(a.detail.item._id)}))))]}get el(){return o(this)}static get watchers(){return{activeTab:[{onActiveTabChange:0}],open:[{onOpenChange:0}]}}};s.style=":host{display:contents}co-overlay{--co-overlay-bg:rgba(0, 0, 0, 0.16)}.co-command-search__trigger{display:contents}.co-command-search{display:flex;flex-direction:column;width:90vw;max-width:560px;max-height:420px;background:var(--co-semantic-surface-page);border-radius:var(--co-border-radius-lg);box-shadow:0 8px 32px rgba(0, 0, 0, 0.12);overflow:hidden;font-family:var(--co-font-family-primary);transform:translateY(8px) scale(0.98);opacity:0;transition:transform 0.15s ease, opacity 0.15s ease;margin-top:-15vh}.co-command-search--open{transform:translateY(0) scale(1);opacity:1}.co-command-search__input-row{display:flex;align-items:center;gap:var(--co-spacing-sm);padding:var(--co-spacing-md) var(--co-spacing-lg);border-bottom:1px solid var(--co-semantic-border-default);color:var(--co-semantic-text-muted)}.co-command-search__input{flex:1;border:none;outline:none;background:transparent;font-size:var(--co-font-size-16);font-family:var(--co-font-family-primary);color:var(--co-semantic-text-default);min-width:0}.co-command-search__input::placeholder{color:var(--co-semantic-text-muted)}.co-command-search__shortcut{font-size:var(--co-font-size-10);color:var(--co-semantic-text-muted);background:var(--co-semantic-surface-muted);padding:2px var(--co-spacing-xs);border-radius:var(--co-border-radius-xxs);font-weight:500;line-height:1.4;flex-shrink:0}.co-command-search__results{flex:1;overflow-y:auto;padding:var(--co-spacing-xs) 0}.co-command-search__loading{flex-shrink:0;display:flex;align-items:center}.co-command-search__facet-chip{display:inline-flex;align-items:center;gap:2px;padding:2px var(--co-spacing-xs);background:var(--co-color-primary-azul);color:var(--co-color-base-blanco, #fff);border-radius:var(--co-border-radius-full);font-size:var(--co-font-size-12);font-weight:500;white-space:nowrap;flex-shrink:0}.co-command-search__facet-chip-label{max-width:110px;overflow:hidden;text-overflow:ellipsis}.co-command-search__facet-chip-remove{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;border:none;border-radius:var(--co-border-radius-full);background:rgba(255, 255, 255, 0.25);color:inherit;cursor:pointer;padding:0;line-height:1;transition:background 0.1s ease}.co-command-search__facet-chip-remove:hover{background:rgba(255, 255, 255, 0.4)}.co-command-search__tabs{display:flex;align-items:center;gap:var(--co-spacing-sm);padding:var(--co-spacing-md);overflow-x:auto;border-bottom:1px solid var(--co-semantic-border-default);scroll-padding-right:104px}.co-command-search__tab{flex:0 0 auto}.co-command-search__tab--more{position:sticky;right:0;padding-left:var(--co-spacing-sm);background:var(--co-semantic-surface-page);box-shadow:-12px 0 10px -4px var(--co-semantic-surface-page)}.co-command-search__fav{padding:var(--co-spacing-sm) var(--co-spacing-lg) var(--co-spacing-md);border-bottom:1px solid var(--co-semantic-border-default)}.co-command-search__fav-grid{display:grid;grid-template-columns:repeat(auto-fill, minmax(88px, 1fr));gap:var(--co-spacing-xs)}.co-command-search__fav-card{display:flex;flex-direction:column;align-items:center;gap:var(--co-spacing-sm);padding:var(--co-spacing-sm) var(--co-spacing-xs);background:transparent;border:none;border-radius:var(--co-border-radius-sm);cursor:pointer;font-family:inherit;text-align:center;min-width:0;transition:background 0.12s ease}.co-command-search__fav-card:hover{background:var(--co-semantic-surface-hover)}.co-command-search__fav-card:focus-visible{outline:none;box-shadow:0 0 0 2px var(--co-semantic-border-focus-ring)}.co-command-search__fav-icon{flex:none;width:50px;height:50px;border-radius:var(--co-border-radius-sm);display:flex;align-items:center;justify-content:center;color:var(--co-color-base-blanco, #fff);box-shadow:0 2px 6px rgba(0, 0, 0, 0.14)}.co-command-search__fav-label{font-size:var(--co-font-size-12);font-weight:500;line-height:1.2;color:var(--co-semantic-text-default);max-width:100%;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}";export{s as co_command_search}
@@ -1 +1 @@
1
- import{r as t,c as a,h as o,a as e}from"./p-tT-aZV0-.js";import{c as r,d as c,a as i,p as n,g as s,h as l,j as d}from"./p-tPYikBRJ.js";import{z as h,b as u,a as p,c as v,w as f}from"./p-B6JZk8fL.js";const m=class{constructor(o){t(this,o),this.coDaySelect=a(this,"coDaySelect",3),this.coEventClick=a(this,"coEventClick",3),this.coEventDrop=a(this,"coEventDrop",3),this.coMoreClick=a(this,"coMoreClick",3),this.events=[],this.locale="es-CO",this.firstDayOfWeek=1,this.editable=!0,this.selectable=!0,this.maxLanes=3,this.dragOverDate=null,this.dragId=null,this.onPointerUp=()=>this.finishDrag(),this.handleKeyDown=t=>{const a=this.focused;let o=!0;switch(t.key){case"ArrowLeft":this.moveFocus(c(a,-1));break;case"ArrowRight":this.moveFocus(c(a,1));break;case"ArrowUp":this.moveFocus(c(a,-7));break;case"ArrowDown":this.moveFocus(c(a,7));break;case"Enter":case" ":this.selectDay(a);break;default:o=!1}o&&(t.preventDefault(),t.stopPropagation())}}componentWillLoad(){this.focused=this.defaultFocus()}connectedCallback(){window.addEventListener("pointerup",this.onPointerUp)}disconnectedCallback(){window.removeEventListener("pointerup",this.onPointerUp)}defaultFocus(){const t=`${g(this.year)}-${b(this.month)}-01`,a=i(),o=n(a);return o.year===this.year&&o.month===this.month?a:t}get matrix(){return s(this.year,this.month,this.firstDayOfWeek).map((t=>t.map((t=>t.value))))}eventById(t){return this.events.find((a=>a.id===t))}isDayInteractable(t){return!l(t,{min:this.minDate,max:this.maxDate})}selectDay(t){this.selectable&&this.isDayInteractable(t)&&this.coDaySelect.emit({date:t})}activateEvent(t){this.coEventClick.emit({id:t})}moveFocus(t){this.focused=t,requestAnimationFrame((()=>this.focusCell()))}focusCell(){var t,a;null===(a=null===(t=this.el.shadowRoot)||void 0===t?void 0:t.querySelector(`[data-date="${this.focused}"]`))||void 0===a||a.focus()}startDrag(t,a){const o=this.eventById(a);o&&this.editable&&!1!==o.editable&&!1!==o.startEditable&&(t.preventDefault(),t.stopPropagation(),this.dragId=a,this.dragOverDate=null)}finishDrag(){const t=this.dragId,a=this.dragOverDate;if(this.dragId=null,this.dragOverDate=null,!t||!a)return;const o=this.eventById(t);if(!o)return;const e=function(t,a){const[o,e,r]=t.split("-").map(Number),[c,i,n]=a.split("-").map(Number);return Math.round((Date.UTC(c,i-1,n)-Date.UTC(o,e-1,r))/864e5)}(o.allDay?o.start.slice(0,10):h(o.startMs,this.timeZone),a);if(0===e)return;if(!this.isDayInteractable(a))return;const r=function(t,a,o){return t.allDay?{start:c(t.start.slice(0,10),a),end:c(t.end.slice(0,10),a)}:{start:p(_(t.startMs,a,o)),end:p(_(t.endMs,a,o))}}(o,e,this.timeZone);this.coEventDrop.emit({id:t,start:r.start,end:r.end,oldStart:o.start,oldEnd:o.end,allDay:o.allDay})}renderChip(t,a){var e;const r=this.eventById(t.eventId);if(!r)return null;const c=a.length,i=t.startCol/c*100,n=(t.endCol-t.startCol+1)/c*100,s=r.endMs<=Date.now(),l=!0===(null===(e=r.extendedProps)||void 0===e?void 0:e.isExternal),d=!this.editable||!1===r.editable,h=r.allDay||!t.isStart?"":function(t,a){const o=Math.floor(t/60),e=t%60;return new Intl.DateTimeFormat(a,{hour:"numeric",minute:"2-digit"}).format(new Date(2e3,0,1,o,e))}(u(r.startMs,this.timeZone),this.locale),p={left:`${i}%`,width:`${n}%`,top:`calc(var(--co-cal-daynum-h) + ${t.lane} * var(--co-cal-lane-h))`};return r.backgroundColor&&(p["--co-cal-event-bg"]=r.backgroundColor,p["--co-cal-event-text"]=function(t){const a=t.replace("#","").trim();if(3!==a.length&&6!==a.length)return"var(--co-cal-event-text)";const o=3===a.length?a.split("").map((t=>t+t)).join(""):a;return(299*parseInt(o.slice(0,2),16)+587*parseInt(o.slice(2,4),16)+114*parseInt(o.slice(4,6),16))/1e3>=150?"var(--co-cal-event-text-dark)":"var(--co-cal-event-text-light)"}(r.backgroundColor)),r.borderColor&&(p["--co-cal-event-border"]=r.borderColor),o("button",{type:"button",key:`${t.eventId}-${t.weekIndex}`,class:{"cal-chip":!0,"cal-chip--all-day":r.allDay,"cal-chip--past":s,"cal-chip--external":l,"cal-chip--locked":d,"cal-chip--dragging":this.dragId===r.id,"cal-chip--continues-before":t.continuesBefore,"cal-chip--continues-after":t.continuesAfter},style:p,title:r.title,"aria-label":r.title,onClick:t=>{t.stopPropagation(),this.activateEvent(r.id)},onPointerDown:t=>this.startDrag(t,r.id)},!r.allDay&&o("span",{class:"cal-chip__dot","aria-hidden":"true"}),h&&o("span",{class:"cal-chip__time"},h),o("span",{class:"cal-chip__title"},r.title||"—"),l&&o("co-icon",{name:"link",size:11,class:"cal-chip__ext"}))}render(){var t;const a=this.matrix,e=function(t,a,o={}){const e=o.maxLanes??1/0,i=[],n={};let s=0;const l=t.map((t=>function(t,a){if(t.allDay){const a=t.start.slice(0,10),o=c(t.end.slice(0,10),-1);return r(o,a)<0?{event:t,firstDay:a,lastDay:a}:{event:t,firstDay:a,lastDay:o}}const o=a?h(t.startMs,a):t.start.slice(0,10);return{event:t,firstDay:o,lastDay:o}}(t,o.timeZone))).filter((t=>null!==t));if(a.forEach(((t,a)=>{if(!t.length)return;const o=t[0],e=t[t.length-1],c=new Map(t.map(((t,a)=>[t,a]))),n=l.filter((t=>r(t.firstDay,e)<=0&&r(o,t.lastDay)<=0)).map((a=>{const i=r(a.firstDay,o)>=0?a.firstDay:o,n=r(a.lastDay,e)<=0?a.lastDay:e;return{span:a,startCol:c.get(i)??0,endCol:c.get(n)??t.length-1}})).sort(((t,a)=>t.startCol-a.startCol||a.endCol-a.startCol-(t.endCol-t.startCol)||t.span.event.startMs-a.span.event.startMs||(t.span.event.id<a.span.event.id?-1:1))),d=[];for(const t of n){let c=0;for(;d.some((a=>a.lane===c&&!(t.endCol<a.startCol||t.startCol>a.endCol)));)c++;d.push({lane:c,startCol:t.startCol,endCol:t.endCol}),s=Math.max(s,c+1),i.push({eventId:t.span.event.id,weekIndex:a,lane:c,startCol:t.startCol,endCol:t.endCol,isStart:r(t.span.firstDay,o)>=0,isEnd:r(t.span.lastDay,e)<=0,continuesBefore:r(t.span.firstDay,o)<0,continuesAfter:r(t.span.lastDay,e)>0})}})),Number.isFinite(e))for(const t of i)if(t.lane>=e)for(let o=t.startCol;o<=t.endCol;o++){const e=a[t.weekIndex][o];n[e]=(n[e]??0)+1}return{segments:i,overflow:n,laneCount:s}}(this.events,a,{maxLanes:this.maxLanes,timeZone:this.timeZone}),s=new Map;for(const a of e.segments){if(a.lane>=this.maxLanes)continue;const o=null!==(t=s.get(a.weekIndex))&&void 0!==t?t:[];o.push(a),s.set(a.weekIndex,o)}const l=d(this.locale,this.firstDayOfWeek,"short"),u=d(this.locale,this.firstDayOfWeek,"long"),p=i();return o("div",{key:"94afb2cd963e8292d09dda372b7f115e235c8cd3",class:"cal-month",part:"grid",role:"grid",onKeyDown:this.handleKeyDown},o("div",{key:"381021f254ac5f36d3d59e108cbe64f7f4fb1b91",class:"cal-month__dow",role:"row"},l.map(((t,a)=>o("span",{class:"cal-month__dow-cell",role:"columnheader","aria-label":u[a]},t)))),a.map(((t,a)=>{var c;return o("div",{class:"cal-month__week",role:"row"},o("div",{class:"cal-month__days"},t.map((t=>{const a=n(t),e=a.month===this.month,c=0===r(t,p),i=0===r(t,this.focused),s=this.isDayInteractable(t);return o("div",{role:"gridcell","data-date":t,tabIndex:i?0:-1,"aria-current":c?"date":void 0,"aria-disabled":s?void 0:"true",class:{"cal-month__day":!0,"cal-month__day--outside":!e,"cal-month__day--today":c,"cal-month__day--disabled":!s,"cal-month__day--drag-over":null!==this.dragId&&this.dragOverDate===t},onClick:()=>this.selectDay(t),onPointerEnter:()=>{this.dragId&&(this.dragOverDate=t)}},o("span",{class:"cal-month__daynum"},a.day))}))),o("div",{class:"cal-month__events"},(null!==(c=s.get(a))&&void 0!==c?c:[]).map((a=>this.renderChip(a,t))),t.map(((a,r)=>{var c;const i=null!==(c=e.overflow[a])&&void 0!==c?c:0;return i<=0?null:o("button",{type:"button",class:"cal-month__more",style:{left:r/t.length*100+"%",width:1/t.length*100+"%",top:`calc(var(--co-cal-daynum-h) + ${this.maxLanes} * var(--co-cal-lane-h))`},onClick:t=>{t.stopPropagation(),this.coMoreClick.emit({date:a})}},"+",i)}))))})))}get el(){return e(this)}};function b(t){return String(t).padStart(2,"0")}function g(t){return String(t).padStart(4,"0")}function _(t,a,o){const e=v(t,o),r=c(`${g(e.year)}-${b(e.month)}-${b(e.day)}`,a),[i,n,s]=r.split("-").map(Number);return f({year:i,month:n,day:s,hour:e.hour,minute:e.minute,second:e.second},o)}m.style=":host{display:block;font-family:var(--co-font-family-primary);--co-cal-daynum-h:24px;--co-cal-lane-h:22px;--co-cal-min-week-h:92px;--co-cal-gap:2px;--co-cal-surface:var(--co-semantic-surface-page);--co-cal-border:var(--co-semantic-border-default);--co-cal-text:var(--co-semantic-text-default);--co-cal-text-muted:var(--co-semantic-text-muted);--co-cal-hover:var(--co-semantic-surface-hover);--co-cal-today-ring:var(--co-color-primary-azul);--co-cal-event-bg:var(--co-color-primary-azul);--co-cal-event-border:transparent;--co-cal-event-text:var(--co-color-base-blanco, #fff);--co-cal-event-text-light:var(--co-color-base-blanco, #fff);--co-cal-event-text-dark:var(--co-semantic-text-default)}.cal-month{display:flex;flex-direction:column;border:1px solid var(--co-cal-border);border-radius:var(--co-border-radius-xs);overflow:hidden;background:var(--co-cal-surface)}.cal-month__dow{display:grid;grid-template-columns:repeat(7, 1fr);border-bottom:1px solid var(--co-cal-border)}.cal-month__dow-cell{padding:var(--co-spacing-xs) var(--co-spacing-sm);font-size:var(--co-font-size-10, 10px);font-weight:600;text-transform:uppercase;letter-spacing:0.04em;color:var(--co-cal-text-muted);text-align:right}.cal-month__week{position:relative;min-height:var(--co-cal-min-week-h)}.cal-month__week:not(:last-child){border-bottom:1px solid var(--co-cal-border)}.cal-month__days{display:grid;grid-template-columns:repeat(7, 1fr);height:100%;position:absolute;inset:0}.cal-month__day{border-right:1px solid var(--co-cal-border);padding:var(--co-spacing-xxs);cursor:pointer;transition:background 0.1s ease}.cal-month__day:last-child{border-right:0}.cal-month__day:hover{background:var(--co-cal-hover)}.cal-month__day:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:-2px}.cal-month__day--outside .cal-month__daynum{color:var(--co-cal-text-muted)}.cal-month__day--disabled{cursor:not-allowed;background:color-mix(in srgb, var(--co-cal-border) 20%, transparent)}.cal-month__day--drag-over{background:color-mix(in srgb, var(--co-cal-today-ring) 14%, transparent);box-shadow:inset 0 0 0 2px var(--co-cal-today-ring)}.cal-month__daynum{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;margin-left:auto;float:right;font-size:var(--co-font-size-12, 12px);color:var(--co-cal-text);border-radius:var(--co-border-radius-full)}.cal-month__day--today .cal-month__daynum{background:var(--co-cal-today-ring);color:var(--co-color-base-blanco, #fff);font-weight:600}.cal-month__events{position:absolute;inset:0;pointer-events:none;}.cal-chip,.cal-month__more{position:absolute;height:calc(var(--co-cal-lane-h) - 3px);box-sizing:border-box;pointer-events:auto;display:flex;align-items:center;gap:var(--co-spacing-xxs);margin:0 3px;padding:0 var(--co-spacing-xs);border:1px solid var(--co-cal-event-border);border-radius:var(--co-border-radius-xxs);font-family:inherit;font-size:var(--co-font-size-12, 12px);line-height:1;text-align:left;cursor:pointer;overflow:hidden;white-space:nowrap}.cal-chip{background:var(--co-cal-event-bg);color:var(--co-cal-event-text)}.cal-chip:hover{filter:brightness(0.95)}.cal-chip:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:1px}.cal-chip--all-day{font-weight:500}.cal-chip__dot{flex:0 0 auto;width:7px;height:7px;border-radius:var(--co-border-radius-full);background:var(--co-cal-event-bg)}.cal-chip:not(.cal-chip--all-day){background:transparent;color:var(--co-cal-text);border-color:transparent}.cal-chip:not(.cal-chip--all-day):hover{background:var(--co-cal-hover);filter:none}.cal-chip__time{flex:0 0 auto;color:var(--co-cal-text-muted);font-variant-numeric:tabular-nums}.cal-chip__title{overflow:hidden;text-overflow:ellipsis}.cal-chip__ext{flex:0 0 auto;opacity:0.8}.cal-chip--past{opacity:0.55}.cal-chip--locked{cursor:default}.cal-chip--external{border-style:dashed}.cal-chip--dragging{opacity:0.4}.cal-chip--continues-before{border-top-left-radius:0;border-bottom-left-radius:0;margin-left:0}.cal-chip--continues-after{border-top-right-radius:0;border-bottom-right-radius:0;margin-right:0}.cal-month__more{background:transparent;color:var(--co-cal-text-muted);border-color:transparent;font-weight:600;font-size:var(--co-font-size-11, 11px)}.cal-month__more:hover{background:var(--co-cal-hover);color:var(--co-cal-text)}";export{m as co_calendar_month}
1
+ import{r as t,c as a,h as o,a as e}from"./p-BCEz3S-z.js";import{c as r,d as c,a as i,p as n,g as s,h as l,j as h}from"./p-tPYikBRJ.js";import{z as d,b as u,a as p,c as v,w as f}from"./p-B6JZk8fL.js";const m=class{constructor(o){t(this,o),this.coDaySelect=a(this,"coDaySelect",3),this.coEventClick=a(this,"coEventClick",3),this.coEventDrop=a(this,"coEventDrop",3),this.coMoreClick=a(this,"coMoreClick",3),this.events=[],this.locale="es-CO",this.firstDayOfWeek=1,this.editable=!0,this.selectable=!0,this.maxLanes=3,this.dragOverDate=null,this.dragId=null,this.onPointerUp=()=>this.finishDrag(),this.handleKeyDown=t=>{const a=this.focused;let o=!0;switch(t.key){case"ArrowLeft":this.moveFocus(c(a,-1));break;case"ArrowRight":this.moveFocus(c(a,1));break;case"ArrowUp":this.moveFocus(c(a,-7));break;case"ArrowDown":this.moveFocus(c(a,7));break;case"Enter":case" ":this.selectDay(a);break;default:o=!1}o&&(t.preventDefault(),t.stopPropagation())}}componentWillLoad(){this.focused=this.defaultFocus()}connectedCallback(){window.addEventListener("pointerup",this.onPointerUp)}disconnectedCallback(){window.removeEventListener("pointerup",this.onPointerUp)}defaultFocus(){const t=`${g(this.year)}-${b(this.month)}-01`,a=i(),o=n(a);return o.year===this.year&&o.month===this.month?a:t}get matrix(){return s(this.year,this.month,this.firstDayOfWeek).map((t=>t.map((t=>t.value))))}eventById(t){return this.events.find((a=>a.id===t))}isDayInteractable(t){return!l(t,{min:this.minDate,max:this.maxDate})}selectDay(t){this.selectable&&this.isDayInteractable(t)&&this.coDaySelect.emit({date:t})}activateEvent(t){this.coEventClick.emit({id:t})}moveFocus(t){this.focused=t,requestAnimationFrame((()=>this.focusCell()))}focusCell(){var t,a;null===(a=null===(t=this.el.shadowRoot)||void 0===t?void 0:t.querySelector(`[data-date="${this.focused}"]`))||void 0===a||a.focus()}startDrag(t,a){const o=this.eventById(a);o&&this.editable&&!1!==o.editable&&!1!==o.startEditable&&(t.preventDefault(),t.stopPropagation(),this.dragId=a,this.dragOverDate=null)}finishDrag(){const t=this.dragId,a=this.dragOverDate;if(this.dragId=null,this.dragOverDate=null,!t||!a)return;const o=this.eventById(t);if(!o)return;const e=function(t,a){const[o,e,r]=t.split("-").map(Number),[c,i,n]=a.split("-").map(Number);return Math.round((Date.UTC(c,i-1,n)-Date.UTC(o,e-1,r))/864e5)}(o.allDay?o.start.slice(0,10):d(o.startMs,this.timeZone),a);if(0===e)return;if(!this.isDayInteractable(a))return;const r=function(t,a,o){return t.allDay?{start:c(t.start.slice(0,10),a),end:c(t.end.slice(0,10),a)}:{start:p(_(t.startMs,a,o)),end:p(_(t.endMs,a,o))}}(o,e,this.timeZone);this.coEventDrop.emit({id:t,start:r.start,end:r.end,oldStart:o.start,oldEnd:o.end,allDay:o.allDay})}renderChip(t,a){var e;const r=this.eventById(t.eventId);if(!r)return null;const c=a.length,i=t.startCol/c*100,n=(t.endCol-t.startCol+1)/c*100,s=r.endMs<=Date.now(),l=!0===(null===(e=r.extendedProps)||void 0===e?void 0:e.isExternal),h=!this.editable||!1===r.editable,d=r.allDay||!t.isStart?"":function(t,a){const o=Math.floor(t/60),e=t%60;return new Intl.DateTimeFormat(a,{hour:"numeric",minute:"2-digit"}).format(new Date(2e3,0,1,o,e))}(u(r.startMs,this.timeZone),this.locale),p={left:`${i}%`,width:`${n}%`,top:`calc(var(--co-cal-daynum-h) + ${t.lane} * var(--co-cal-lane-h))`};return r.backgroundColor&&(p["--co-cal-event-bg"]=r.backgroundColor,p["--co-cal-event-text"]=function(t){const a=t.replace("#","").trim();if(3!==a.length&&6!==a.length)return"var(--co-cal-event-text)";const o=3===a.length?a.split("").map((t=>t+t)).join(""):a;return(299*parseInt(o.slice(0,2),16)+587*parseInt(o.slice(2,4),16)+114*parseInt(o.slice(4,6),16))/1e3>=150?"var(--co-cal-event-text-dark)":"var(--co-cal-event-text-light)"}(r.backgroundColor)),r.borderColor&&(p["--co-cal-event-border"]=r.borderColor),o("button",{type:"button",key:`${t.eventId}-${t.weekIndex}`,class:{"cal-chip":!0,"cal-chip--all-day":r.allDay,"cal-chip--past":s,"cal-chip--external":l,"cal-chip--locked":h,"cal-chip--dragging":this.dragId===r.id,"cal-chip--continues-before":t.continuesBefore,"cal-chip--continues-after":t.continuesAfter},style:p,title:r.title,"aria-label":r.title,onClick:t=>{t.stopPropagation(),this.activateEvent(r.id)},onPointerDown:t=>this.startDrag(t,r.id)},!r.allDay&&o("span",{class:"cal-chip__dot","aria-hidden":"true"}),d&&o("span",{class:"cal-chip__time"},d),o("span",{class:"cal-chip__title"},r.title||"—"),l&&o("co-icon",{name:"link",size:11,class:"cal-chip__ext"}))}render(){var t;const a=this.matrix,e=function(t,a,o={}){const e=o.maxLanes??1/0,i=[],n={};let s=0;const l=t.map((t=>function(t,a){if(t.allDay){const a=t.start.slice(0,10),o=c(t.end.slice(0,10),-1);return r(o,a)<0?{event:t,firstDay:a,lastDay:a}:{event:t,firstDay:a,lastDay:o}}const o=a?d(t.startMs,a):t.start.slice(0,10);return{event:t,firstDay:o,lastDay:o}}(t,o.timeZone))).filter((t=>null!==t));if(a.forEach(((t,a)=>{if(!t.length)return;const o=t[0],e=t[t.length-1],c=new Map(t.map(((t,a)=>[t,a]))),n=l.filter((t=>r(t.firstDay,e)<=0&&r(o,t.lastDay)<=0)).map((a=>{const i=r(a.firstDay,o)>=0?a.firstDay:o,n=r(a.lastDay,e)<=0?a.lastDay:e;return{span:a,startCol:c.get(i)??0,endCol:c.get(n)??t.length-1}})).sort(((t,a)=>t.startCol-a.startCol||a.endCol-a.startCol-(t.endCol-t.startCol)||t.span.event.startMs-a.span.event.startMs||(t.span.event.id<a.span.event.id?-1:1))),h=[];for(const t of n){let c=0;for(;h.some((a=>a.lane===c&&!(t.endCol<a.startCol||t.startCol>a.endCol)));)c++;h.push({lane:c,startCol:t.startCol,endCol:t.endCol}),s=Math.max(s,c+1),i.push({eventId:t.span.event.id,weekIndex:a,lane:c,startCol:t.startCol,endCol:t.endCol,isStart:r(t.span.firstDay,o)>=0,isEnd:r(t.span.lastDay,e)<=0,continuesBefore:r(t.span.firstDay,o)<0,continuesAfter:r(t.span.lastDay,e)>0})}})),Number.isFinite(e))for(const t of i)if(t.lane>=e)for(let o=t.startCol;o<=t.endCol;o++){const e=a[t.weekIndex][o];n[e]=(n[e]??0)+1}return{segments:i,overflow:n,laneCount:s}}(this.events,a,{maxLanes:this.maxLanes,timeZone:this.timeZone}),s=new Map;for(const a of e.segments){if(a.lane>=this.maxLanes)continue;const o=null!==(t=s.get(a.weekIndex))&&void 0!==t?t:[];o.push(a),s.set(a.weekIndex,o)}const l=h(this.locale,this.firstDayOfWeek,"short"),u=h(this.locale,this.firstDayOfWeek,"long"),p=i();return o("div",{key:"51781013cbfce9f2e8d07de9a46766c3a9326cbe",class:"cal-month",part:"grid",role:"grid",onKeyDown:this.handleKeyDown},o("div",{key:"ee3545fbd982390cd233cb54b33060b7cb9b08e1",class:"cal-month__dow",role:"row"},l.map(((t,a)=>o("span",{class:"cal-month__dow-cell",role:"columnheader","aria-label":u[a]},t)))),a.map(((t,a)=>{var c;return o("div",{class:"cal-month__week",role:"row"},o("div",{class:"cal-month__days"},t.map((t=>{const a=n(t),e=a.month===this.month,c=0===r(t,p),i=0===r(t,this.focused),s=this.isDayInteractable(t);return o("div",{role:"gridcell","data-date":t,tabIndex:i?0:-1,"aria-current":c?"date":void 0,"aria-disabled":s?void 0:"true",class:{"cal-month__day":!0,"cal-month__day--outside":!e,"cal-month__day--today":c,"cal-month__day--disabled":!s,"cal-month__day--drag-over":null!==this.dragId&&this.dragOverDate===t},onClick:()=>this.selectDay(t),onPointerEnter:()=>{this.dragId&&(this.dragOverDate=t)}},o("span",{class:"cal-month__daynum"},a.day))}))),o("div",{class:"cal-month__events"},(null!==(c=s.get(a))&&void 0!==c?c:[]).map((a=>this.renderChip(a,t))),t.map(((a,r)=>{var c;const i=null!==(c=e.overflow[a])&&void 0!==c?c:0;return i<=0?null:o("button",{type:"button",class:"cal-month__more",style:{left:r/t.length*100+"%",width:1/t.length*100+"%",top:`calc(var(--co-cal-daynum-h) + ${this.maxLanes} * var(--co-cal-lane-h))`},onClick:t=>{t.stopPropagation(),this.coMoreClick.emit({date:a})}},"+",i)}))))})))}get el(){return e(this)}};function b(t){return String(t).padStart(2,"0")}function g(t){return String(t).padStart(4,"0")}function _(t,a,o){const e=v(t,o),r=c(`${g(e.year)}-${b(e.month)}-${b(e.day)}`,a),[i,n,s]=r.split("-").map(Number);return f({year:i,month:n,day:s,hour:e.hour,minute:e.minute,second:e.second},o)}m.style=":host{display:block;font-family:var(--co-font-family-primary);--co-cal-daynum-h:24px;--co-cal-lane-h:22px;--co-cal-min-week-h:92px;--co-cal-gap:2px;--co-cal-surface:var(--co-semantic-surface-page);--co-cal-border:var(--co-semantic-border-default);--co-cal-text:var(--co-semantic-text-default);--co-cal-text-muted:var(--co-semantic-text-muted);--co-cal-hover:var(--co-semantic-surface-hover);--co-cal-today-ring:var(--co-color-primary-azul);--co-cal-event-bg:var(--co-color-primary-azul);--co-cal-event-border:transparent;--co-cal-event-text:var(--co-color-base-blanco, #fff);--co-cal-event-text-light:var(--co-color-base-blanco, #fff);--co-cal-event-text-dark:var(--co-semantic-text-default)}.cal-month{display:flex;flex-direction:column;border:1px solid var(--co-cal-border);border-radius:var(--co-border-radius-xs);overflow:hidden;background:var(--co-cal-surface)}.cal-month__dow{display:grid;grid-template-columns:repeat(7, 1fr);border-bottom:1px solid var(--co-cal-border)}.cal-month__dow-cell{padding:var(--co-spacing-xs) var(--co-spacing-sm);font-size:var(--co-font-size-10, 10px);font-weight:600;text-transform:uppercase;letter-spacing:0.04em;color:var(--co-cal-text-muted);text-align:right}.cal-month__week{position:relative;min-height:var(--co-cal-min-week-h)}.cal-month__week:not(:last-child){border-bottom:1px solid var(--co-cal-border)}.cal-month__days{display:grid;grid-template-columns:repeat(7, 1fr);height:100%;position:absolute;inset:0}.cal-month__day{border-right:1px solid var(--co-cal-border);padding:var(--co-spacing-xxs);cursor:pointer;transition:background 0.1s ease}.cal-month__day:last-child{border-right:0}.cal-month__day:hover{background:var(--co-cal-hover)}.cal-month__day:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:-2px}.cal-month__day--outside .cal-month__daynum{color:var(--co-cal-text-muted)}.cal-month__day--disabled{cursor:not-allowed;background:color-mix(in srgb, var(--co-cal-border) 20%, transparent)}.cal-month__day--drag-over{background:color-mix(in srgb, var(--co-cal-today-ring) 14%, transparent);box-shadow:inset 0 0 0 2px var(--co-cal-today-ring)}.cal-month__daynum{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;margin-left:auto;float:right;font-size:var(--co-font-size-12, 12px);color:var(--co-cal-text);border-radius:var(--co-border-radius-full)}.cal-month__day--today .cal-month__daynum{background:var(--co-cal-today-ring);color:var(--co-color-base-blanco, #fff);font-weight:600}.cal-month__events{position:absolute;inset:0;pointer-events:none;}.cal-chip,.cal-month__more{position:absolute;height:calc(var(--co-cal-lane-h) - 3px);box-sizing:border-box;pointer-events:auto;display:flex;align-items:center;gap:var(--co-spacing-xxs);margin:0 3px;padding:0 var(--co-spacing-xs);border:1px solid var(--co-cal-event-border);border-radius:var(--co-border-radius-xxs);font-family:inherit;font-size:var(--co-font-size-12, 12px);line-height:1;text-align:left;cursor:pointer;overflow:hidden;white-space:nowrap}.cal-chip{background:var(--co-cal-event-bg);color:var(--co-cal-event-text)}.cal-chip:hover{filter:brightness(0.95)}.cal-chip:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:1px}.cal-chip--all-day{font-weight:500}.cal-chip__dot{flex:0 0 auto;width:7px;height:7px;border-radius:var(--co-border-radius-full);background:var(--co-cal-event-bg)}.cal-chip:not(.cal-chip--all-day){background:transparent;color:var(--co-cal-text);border-color:transparent}.cal-chip:not(.cal-chip--all-day):hover{background:var(--co-cal-hover);filter:none}.cal-chip__time{flex:0 0 auto;color:var(--co-cal-text-muted);font-variant-numeric:tabular-nums}.cal-chip__title{overflow:hidden;text-overflow:ellipsis}.cal-chip__ext{flex:0 0 auto;opacity:0.8}.cal-chip--past{opacity:0.55}.cal-chip--locked{cursor:default}.cal-chip--external{border-style:dashed}.cal-chip--dragging{opacity:0.4}.cal-chip--continues-before{border-top-left-radius:0;border-bottom-left-radius:0;margin-left:0}.cal-chip--continues-after{border-top-right-radius:0;border-bottom-right-radius:0;margin-right:0}.cal-month__more{background:transparent;color:var(--co-cal-text-muted);border-color:transparent;font-weight:600;font-size:var(--co-font-size-11, 11px)}.cal-month__more:hover{background:var(--co-cal-hover);color:var(--co-cal-text)}";export{m as co_calendar_month}
@@ -1 +1 @@
1
- import{r as t,c as o,h as g,a as r}from"./p-tT-aZV0-.js";const e=class{constructor(g){t(this,g),this.coChange=o(this,"coChange",7),this.value="",this.multiple=!1,this.size="m",this.disabled=!1,this.direction="row",this.fullWidth=!1,this.variant="connected"}get selectedValues(){if(this.multiple){if("string"==typeof this.value)try{return JSON.parse(this.value)}catch(t){return this.value?[this.value]:[]}return this.value}return"string"==typeof this.value&&this.value?[this.value]:[]}syncChildren(){this.updateChildStates()}syncVariant(){this.updateChildStates()}componentDidLoad(){this.updateChildStates()}handleToggle(t){t.stopPropagation();const{value:o}=t.detail;if(this.multiple){const t=[...this.selectedValues],g=t.indexOf(o);g>=0?t.splice(g,1):t.push(o),this.value=JSON.stringify(t),this.coChange.emit(t)}else this.value=o,this.coChange.emit(o);this.updateChildStates()}updateChildStates(){const t=this.selectedValues;this.el.querySelectorAll("co-toggle-button").forEach((o=>{o.selected=t.includes(o.value),o.variant=this.variant}))}render(){return g("div",{key:"e1d84ee3741f5f10700b7e99d90081a92de7b2c5",class:{"co-toggle-button-group":!0,[`co-toggle-button-group--${this.direction}`]:!0,[`co-toggle-button-group--${this.variant}`]:!0,"co-toggle-button-group--disabled":this.disabled,"co-toggle-button-group--full":this.fullWidth},role:"group"},g("slot",{key:"4f6f8e56d637ffccab5b1efff3df0f0314a75615"}))}get el(){return r(this)}static get watchers(){return{value:[{syncChildren:0}],variant:[{syncVariant:0}]}}};e.style=":host{display:inline-flex}.co-toggle-button-group{display:inline-flex;gap:0}.co-toggle-button-group--row{flex-direction:row}.co-toggle-button-group--column{flex-direction:column}:host([full-width]){display:flex;width:100%}.co-toggle-button-group--full{display:flex;width:100%}.co-toggle-button-group--full.co-toggle-button-group--row ::slotted(co-toggle-button){flex:1 1 0;--co-toggle-button-width:100%}.co-toggle-button-group--row ::slotted(co-toggle-button){--co-tbr-tl:0;--co-tbr-tr:0;--co-tbr-br:0;--co-tbr-bl:0}.co-toggle-button-group--row ::slotted(co-toggle-button:first-child){--co-tbr-tl:var(--co-toggle-button-radius);--co-tbr-bl:var(--co-toggle-button-radius)}.co-toggle-button-group--row ::slotted(co-toggle-button:last-child){--co-tbr-tr:var(--co-toggle-button-radius);--co-tbr-br:var(--co-toggle-button-radius)}.co-toggle-button-group--column ::slotted(co-toggle-button){--co-tbr-tl:0;--co-tbr-tr:0;--co-tbr-br:0;--co-tbr-bl:0;width:100%}.co-toggle-button-group--column ::slotted(co-toggle-button:first-child){--co-tbr-tl:var(--co-toggle-button-radius);--co-tbr-tr:var(--co-toggle-button-radius)}.co-toggle-button-group--column ::slotted(co-toggle-button:last-child){--co-tbr-bl:var(--co-toggle-button-radius);--co-tbr-br:var(--co-toggle-button-radius)}.co-toggle-button-group--row ::slotted(co-toggle-button:not(:first-child)){margin-left:-1px}.co-toggle-button-group--column ::slotted(co-toggle-button:not(:first-child)){margin-top:-1px}.co-toggle-button-group--disabled{opacity:0.4;pointer-events:none}.co-toggle-button-group--track{display:inline-flex;gap:2px;padding:3px;border-radius:10px;background:var(--co-color-gray-100, #f6f6f6)}.co-toggle-button-group--track ::slotted(co-toggle-button){margin:0 !important}";export{e as co_toggle_button_group}
1
+ import{r as t,c as o,h as g,a as r}from"./p-BCEz3S-z.js";const e=class{constructor(g){t(this,g),this.coChange=o(this,"coChange",7),this.value="",this.multiple=!1,this.size="m",this.disabled=!1,this.direction="row",this.fullWidth=!1,this.variant="connected"}get selectedValues(){if(this.multiple){if("string"==typeof this.value)try{return JSON.parse(this.value)}catch(t){return this.value?[this.value]:[]}return this.value}return"string"==typeof this.value&&this.value?[this.value]:[]}syncChildren(){this.updateChildStates()}syncVariant(){this.updateChildStates()}componentDidLoad(){this.updateChildStates()}handleToggle(t){t.stopPropagation();const{value:o}=t.detail;if(this.multiple){const t=[...this.selectedValues],g=t.indexOf(o);g>=0?t.splice(g,1):t.push(o),this.value=JSON.stringify(t),this.coChange.emit(t)}else this.value=o,this.coChange.emit(o);this.updateChildStates()}updateChildStates(){const t=this.selectedValues;this.el.querySelectorAll("co-toggle-button").forEach((o=>{o.selected=t.includes(o.value),o.variant=this.variant}))}render(){return g("div",{key:"a8a5bbe308411e3ac397f021f1777d08a3861b37",class:{"co-toggle-button-group":!0,[`co-toggle-button-group--${this.direction}`]:!0,[`co-toggle-button-group--${this.variant}`]:!0,"co-toggle-button-group--disabled":this.disabled,"co-toggle-button-group--full":this.fullWidth},role:"group"},g("slot",{key:"76ecf6133ee14b6c2fcdedf61511e044ff57a3e9"}))}get el(){return r(this)}static get watchers(){return{value:[{syncChildren:0}],variant:[{syncVariant:0}]}}};e.style=":host{display:inline-flex}.co-toggle-button-group{display:inline-flex;gap:0}.co-toggle-button-group--row{flex-direction:row}.co-toggle-button-group--column{flex-direction:column}:host([full-width]){display:flex;width:100%}.co-toggle-button-group--full{display:flex;width:100%}.co-toggle-button-group--full.co-toggle-button-group--row ::slotted(co-toggle-button){flex:1 1 0;--co-toggle-button-width:100%}.co-toggle-button-group--row ::slotted(co-toggle-button){--co-tbr-tl:0;--co-tbr-tr:0;--co-tbr-br:0;--co-tbr-bl:0}.co-toggle-button-group--row ::slotted(co-toggle-button:first-child){--co-tbr-tl:var(--co-toggle-button-radius);--co-tbr-bl:var(--co-toggle-button-radius)}.co-toggle-button-group--row ::slotted(co-toggle-button:last-child){--co-tbr-tr:var(--co-toggle-button-radius);--co-tbr-br:var(--co-toggle-button-radius)}.co-toggle-button-group--column ::slotted(co-toggle-button){--co-tbr-tl:0;--co-tbr-tr:0;--co-tbr-br:0;--co-tbr-bl:0;width:100%}.co-toggle-button-group--column ::slotted(co-toggle-button:first-child){--co-tbr-tl:var(--co-toggle-button-radius);--co-tbr-tr:var(--co-toggle-button-radius)}.co-toggle-button-group--column ::slotted(co-toggle-button:last-child){--co-tbr-bl:var(--co-toggle-button-radius);--co-tbr-br:var(--co-toggle-button-radius)}.co-toggle-button-group--row ::slotted(co-toggle-button:not(:first-child)){margin-left:-1px}.co-toggle-button-group--column ::slotted(co-toggle-button:not(:first-child)){margin-top:-1px}.co-toggle-button-group--disabled{opacity:0.4;pointer-events:none}.co-toggle-button-group--track{display:inline-flex;gap:2px;padding:3px;border-radius:10px;background:var(--co-color-gray-100, #f6f6f6)}.co-toggle-button-group--track ::slotted(co-toggle-button){margin:0 !important}";export{e as co_toggle_button_group}
@@ -1 +1 @@
1
- import{r as t,h as s,H as e}from"./p-tT-aZV0-.js";const i=new Map;const n=class{constructor(s){t(this,s),this.name="",this.weight="regular",this.size=16,this.svgContent=""}async componentWillLoad(){await this.fetch()}async onPropsChange(){await this.fetch()}async fetch(){this.svgContent=this.name?await function(t,s){const e=`${s}/${t}`,n=i.get(e);if(n)return n;const r=globalThis.__cobaltIconVersion,a=`${globalThis.__cobaltIconBasePath||"https://cdn.jsdelivr.net/npm/@phosphor-icons/core@2.1.1/assets"}/${s}/${function(t,s){return"regular"===s?`${t}.svg`:`${t}-${s}.svg`}(t,s)}`,h=fetch(r?`${a}?v=${r}`:a,{priority:"low"}).then((t=>t.ok?t.text():"")).catch((()=>(i.delete(e),"")));return i.set(e,h),h}(this.name,this.weight):""}render(){return s(e,{key:"abc90edf4c13e2de7d28f88f99b694dd8aecbdc9","aria-hidden":"true",style:{display:"inline-flex",width:`${this.size}px`,height:`${this.size}px`,flexShrink:"0"}},s("span",{key:"c0248eb38058439bbd5213df838ced7d7cc62bc0",part:"svg",innerHTML:this.svgContent}))}static get watchers(){return{name:[{onPropsChange:0}],weight:[{onPropsChange:0}]}}};n.style=":host{display:inline-flex;align-items:center;justify-content:center;color:inherit;line-height:1;flex-shrink:0}span{display:contents}svg{display:block;width:100%;height:100%;fill:currentColor}";export{n as co_icon}
1
+ import{r as t,h as s,H as i}from"./p-BCEz3S-z.js";const n=new Map;const e=class{constructor(s){t(this,s),this.name="",this.weight="regular",this.size=16,this.svgContent=""}async componentWillLoad(){await this.fetch()}async onPropsChange(){await this.fetch()}async fetch(){this.svgContent=this.name?await function(t,s){const i=`${s}/${t}`,e=n.get(i);if(e)return e;const r=globalThis.__cobaltIconVersion,a=`${globalThis.__cobaltIconBasePath||"https://cdn.jsdelivr.net/npm/@phosphor-icons/core@2.1.1/assets"}/${s}/${function(t,s){return"regular"===s?`${t}.svg`:`${t}-${s}.svg`}(t,s)}`,h=fetch(r?`${a}?v=${r}`:a,{priority:"low"}).then((t=>t.ok?t.text():"")).catch((()=>(n.delete(i),"")));return n.set(i,h),h}(this.name,this.weight):""}render(){return s(i,{key:"d4dcafabbc956f3b5e8099fa30092d0d535c5d06","aria-hidden":"true",style:{display:"inline-flex",width:`${this.size}px`,height:`${this.size}px`,flexShrink:"0"}},s("span",{key:"cd9008987f65922b0c770e1f080dc0a0764d62dd",part:"svg",innerHTML:this.svgContent}))}static get watchers(){return{name:[{onPropsChange:0}],weight:[{onPropsChange:0}]}}};e.style=":host{display:inline-flex;align-items:center;justify-content:center;color:inherit;line-height:1;flex-shrink:0}span{display:contents}svg{display:block;width:100%;height:100%;fill:currentColor}";export{e as co_icon}
@@ -0,0 +1 @@
1
+ import{r as o,h as r,a as t}from"./p-BCEz3S-z.js";const a={l:20,m:18,s:16,xs:14},s=class{constructor(r){o(this,r),this.variant="primary",this.shape="rounded",this.size="m",this.elevated=!1,this.surface="light",this.disabled=!1,this.iconWeight="regular",this.type="button",this.handleClick=()=>{if(!this.disabled){if("submit"===this.type){const o=this.el.closest("form");if(o)return void o.requestSubmit()}if("reset"===this.type){const o=this.el.closest("form");o&&o.reset()}}}}render(){var o,t;const s=null!==(t=null!==(o=this.iconSize)&&void 0!==o?o:a[this.size])&&void 0!==t?t:18,c={};return this.color&&(c.background=this.color),this.textColor&&(c.color=this.textColor),r("button",{key:"97c11bee8f9bb11bb6585439c3c12698b0d95ecb",class:{"co-button":!0,[`co-button--${this.variant}`]:!0,[`co-button--${this.shape}`]:!0,[`co-button--${this.size}`]:!0,[`co-button--surface-${this.surface}`]:!0,"co-button--elevated":this.elevated,"co-button--disabled":this.disabled},style:Object.keys(c).length?c:void 0,type:this.type,disabled:this.disabled,onClick:this.handleClick,part:"button"},this.iconLeft?r("co-icon",{name:this.iconLeft,weight:this.iconWeight,size:s}):null,r("slot",{key:"092f58acb6dfa810ce4f5bcdc19ab15dff69104a"},this.label),this.iconRight?r("co-icon",{name:this.iconRight,weight:this.iconWeight,size:s}):null)}get el(){return t(this)}};s.style=':host{display:inline-flex}.co-button{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;border:1px solid transparent;outline:none;font-family:var(--co-font-family-primary);font-weight:400;line-height:1;letter-spacing:var(--co-font-letter-spacing-body);white-space:nowrap;-webkit-font-smoothing:antialiased;transition:opacity 0.15s ease, background 0.15s ease;box-sizing:border-box;-webkit-backdrop-filter:blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate));backdrop-filter:blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate))}.co-button--primary{background:var(--co-semantic-surface-primary);color:var(--co-semantic-on-primary);border-color:color-mix(in srgb, var(--co-semantic-on-primary) 28%, transparent)}.co-button--secondary{background:color-mix(in srgb, var(--co-semantic-surface-secondary) 55%, transparent);color:var(--co-semantic-on-secondary);border-color:var(--co-semantic-border-subtle)}.co-button--stroke{background:color-mix(in srgb, var(--co-semantic-surface-secondary) 25%, transparent);color:var(--co-semantic-text-default);border-color:var(--co-semantic-border-default)}.co-button--ghost{background:transparent;color:var(--co-semantic-text-default);border-color:transparent;-webkit-backdrop-filter:none;backdrop-filter:none}.co-button--danger{background:var(--co-semantic-status-error);color:var(--co-color-base-blanco);border-color:transparent}.co-button--success{background:var(--co-semantic-status-success);color:var(--co-color-base-blanco);border-color:transparent}.co-button--rounded.co-button--l{padding:var(--co-spacing-xl) var(--co-spacing-2xl);gap:var(--co-spacing-md);font-size:var(--co-font-size-18);border-radius:var(--co-button-radius, var(--co-border-radius-full))}.co-button--rounded.co-button--m{padding:var(--co-spacing-lg) var(--co-spacing-xl);gap:var(--co-spacing-md);font-size:var(--co-font-size-16);border-radius:var(--co-button-radius, var(--co-border-radius-full))}.co-button--rounded.co-button--s{padding:var(--co-spacing-md) var(--co-spacing-lg);gap:var(--co-spacing-sm2);font-size:var(--co-font-size-14);border-radius:var(--co-button-radius, var(--co-border-radius-full))}.co-button--rounded.co-button--xs{padding:var(--co-spacing-md) var(--co-spacing-lg);gap:var(--co-spacing-sm2);font-size:var(--co-font-size-12);border-radius:var(--co-button-radius, var(--co-border-radius-full))}.co-button--square.co-button--l{padding:var(--co-spacing-lg) var(--co-spacing-xl);gap:var(--co-spacing-md);font-size:var(--co-font-size-18);border-radius:var(--co-border-radius-lg)}.co-button--square.co-button--m{padding:var(--co-spacing-md) var(--co-spacing-lg);gap:var(--co-spacing-sm2);font-size:var(--co-font-size-16);border-radius:var(--co-border-radius-sm)}.co-button--square.co-button--s{padding:var(--co-spacing-sm2) var(--co-spacing-md);gap:var(--co-spacing-sm);font-size:var(--co-font-size-14);border-radius:var(--co-border-radius-xs)}.co-button--square.co-button--xs{padding:var(--co-spacing-sm) var(--co-spacing-sm2);gap:var(--co-spacing-xs);font-size:var(--co-font-size-12);border-radius:var(--co-spacing-sm)}.co-button--disabled,.co-button:disabled{opacity:0.4;cursor:not-allowed;pointer-events:none}.co-button--primary:hover:not(:disabled){opacity:0.88}.co-button--secondary:hover:not(:disabled),.co-button--stroke:hover:not(:disabled){background:var(--co-semantic-surface-hover)}.co-button--ghost:hover:not(:disabled){background:color-mix(in srgb, var(--co-semantic-surface-hover) 60%, transparent);-webkit-backdrop-filter:blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate));backdrop-filter:blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate))}.co-button--danger:hover:not(:disabled),.co-button--success:hover:not(:disabled){opacity:0.88}.co-button--secondary.co-button--elevated{box-shadow:var(--co-shadow-sm, 0 1px 2px 0 rgba(26, 26, 26, 0.04)), inset 0 0 0 1px var(--co-color-opacity-negro-8)}.co-button--ghost.co-button--surface-dark,.co-button--stroke.co-button--surface-dark{color:var(--co-color-base-blanco, #fff)}.co-button--ghost.co-button--surface-dark:hover:not(:disabled),.co-button--stroke.co-button--surface-dark:hover:not(:disabled){background:var(--co-color-opacity-blanco-16);-webkit-backdrop-filter:none;backdrop-filter:none}::slotted([slot="icon-left"]),::slotted([slot="icon-right"]){display:inline-flex;flex-shrink:0}@supports not (background: color-mix(in srgb, red, transparent)){.co-button--primary{background:var(--co-semantic-surface-primary)}.co-button--secondary{background:var(--co-semantic-surface-secondary)}.co-button--stroke{background:transparent}}';export{s as co_button}
@@ -1 +1 @@
1
- import{r as o,c as e,h as a,H as r}from"./p-tT-aZV0-.js";const t=class{constructor(a){o(this,a),this.coDrop=e(this,"coDrop",7),this.coDragStateChange=e(this,"coDragStateChange",7),this.active=!1,this.accent="var(--co-color-primary-azul)",this.label="Suelta para subir",this.icon="upload-simple",this.dragDepth=0,this.handleDragEnter=o=>{o.preventDefault(),this.dragDepth++,this.setActive(!0)},this.handleDragOver=o=>{o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect="copy")},this.handleDragLeave=o=>{o.preventDefault(),this.dragDepth=Math.max(0,this.dragDepth-1),0===this.dragDepth&&this.setActive(!1)},this.handleDrop=o=>{o.preventDefault(),this.dragDepth=0;const e=o.dataTransfer?Array.from(o.dataTransfer.files):[];this.setActive(!1),this.coDrop.emit(e)}}setActive(o){this.active!==o&&(this.active=o,this.coDragStateChange.emit(o))}render(){return a(r,{key:"015443db8a6c29e05a99dfd947c9dbc258a244a2",class:{"co-drop-zone":!0,"co-drop-zone--active":this.active},part:"host",style:{"--co-drop-zone-accent":this.accent},onDragEnter:this.handleDragEnter,onDragOver:this.handleDragOver,onDragLeave:this.handleDragLeave,onDrop:this.handleDrop},a("slot",{key:"5d1756f75bf122e538842f146635ed7d6181b376"}),this.active&&a("div",{key:"1f52982512900c61cfbfa38f2fcf05db785c656e",class:"co-drop-zone__overlay",part:"overlay"},a("div",{key:"32a754269cb02d8010403545ab351eaa870e42e7",class:"co-drop-zone__badge",part:"badge"},a("co-icon",{key:"fa72d2e3802970233742faf1ce48b16594fd1d25",name:this.icon,size:34})),a("span",{key:"92d2d4b8daa9d1cb3eb1d79c1fe0a59ac290c9aa",class:"co-drop-zone__label",part:"label"},this.label)))}};t.style=":host{position:relative;display:block}.co-drop-zone__overlay{position:absolute;inset:12px;z-index:70;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;border-radius:16px;border:2px dashed var(--co-drop-zone-accent, var(--co-color-primary-azul, #2563eb));background:color-mix( in srgb, var(--co-drop-zone-accent, var(--co-color-primary-azul, #2563eb)) 8%, rgba(255, 255, 255, 0.85) );-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);pointer-events:none}.co-drop-zone__badge{display:inline-flex;align-items:center;justify-content:center;width:72px;height:72px;border-radius:20px;background:var(--co-color-base-blanco, #fff);color:var(--co-drop-zone-accent, var(--co-color-primary-azul, #2563eb));box-shadow:var(--co-shadow-sm, 0 1px 2px 0 rgba(26, 26, 26, 0.04))}.co-drop-zone__label{font-family:var(--co-font-family-primary);letter-spacing:var(--co-font-letter-spacing-body, -0.03em);font-size:18px;font-weight:500;color:var(--co-color-base-negro, #1f1c1b)}";export{t as co_drop_zone}
1
+ import{r as o,c as e,h as a,H as r}from"./p-BCEz3S-z.js";const t=class{constructor(a){o(this,a),this.coDrop=e(this,"coDrop",7),this.coDragStateChange=e(this,"coDragStateChange",7),this.active=!1,this.accent="var(--co-color-primary-azul)",this.label="Suelta para subir",this.icon="upload-simple",this.dragDepth=0,this.handleDragEnter=o=>{o.preventDefault(),this.dragDepth++,this.setActive(!0)},this.handleDragOver=o=>{o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect="copy")},this.handleDragLeave=o=>{o.preventDefault(),this.dragDepth=Math.max(0,this.dragDepth-1),0===this.dragDepth&&this.setActive(!1)},this.handleDrop=o=>{o.preventDefault(),this.dragDepth=0;const e=o.dataTransfer?Array.from(o.dataTransfer.files):[];this.setActive(!1),this.coDrop.emit(e)}}setActive(o){this.active!==o&&(this.active=o,this.coDragStateChange.emit(o))}render(){return a(r,{key:"3358f8a880d1105209b5047fe14b49c5c2d67033",class:{"co-drop-zone":!0,"co-drop-zone--active":this.active},part:"host",style:{"--co-drop-zone-accent":this.accent},onDragEnter:this.handleDragEnter,onDragOver:this.handleDragOver,onDragLeave:this.handleDragLeave,onDrop:this.handleDrop},a("slot",{key:"d1fb8f1e918d1ca7d26b40d60903e743855d70e7"}),this.active&&a("div",{key:"72a2df7b78205ffa6da676c850fec495ea6e3e68",class:"co-drop-zone__overlay",part:"overlay"},a("div",{key:"a25910837ccb5d20b16870272780578d2e3229a2",class:"co-drop-zone__badge",part:"badge"},a("co-icon",{key:"5066e11590b64c48d2397be0af1a85d1a353a952",name:this.icon,size:34})),a("span",{key:"53237cbb8ec4c607ac7c7846419d65e63a8cfef6",class:"co-drop-zone__label",part:"label"},this.label)))}};t.style=":host{position:relative;display:block}.co-drop-zone__overlay{position:absolute;inset:12px;z-index:70;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;border-radius:16px;border:2px dashed var(--co-drop-zone-accent, var(--co-color-primary-azul, #2563eb));background:color-mix( in srgb, var(--co-drop-zone-accent, var(--co-color-primary-azul, #2563eb)) 8%, rgba(255, 255, 255, 0.85) );-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);pointer-events:none}.co-drop-zone__badge{display:inline-flex;align-items:center;justify-content:center;width:72px;height:72px;border-radius:20px;background:var(--co-color-base-blanco, #fff);color:var(--co-drop-zone-accent, var(--co-color-primary-azul, #2563eb));box-shadow:var(--co-shadow-sm, 0 1px 2px 0 rgba(26, 26, 26, 0.04))}.co-drop-zone__label{font-family:var(--co-font-family-primary);letter-spacing:var(--co-font-letter-spacing-body, -0.03em);font-size:18px;font-weight:500;color:var(--co-color-base-negro, #1f1c1b)}";export{t as co_drop_zone}
@@ -1 +1 @@
1
- import{r as o,c as e,h as t,a as c}from"./p-tT-aZV0-.js";import{R as i}from"./p-7FZXeBK4.js";import{r as s}from"./p-CQY6Ul7q.js";const a=class{constructor(t){o(this,t),this.coChange=e(this,"coChange",7),this.coOpen=e(this,"coOpen",3),this.coClose=e(this,"coClose",3),this.coClear=e(this,"coClear",7),this.coFooterPrimary=e(this,"coFooterPrimary",7),this.coFooterSecondary=e(this,"coFooterSecondary",7),this.required=!1,this.placeholder="",this.disabled=!1,this.clearable=!0,this.searchable=!1,this.searchPlaceholder="Search",this.showFooter=!1,this.footerPrimaryLabel="Ok",this.footerSecondaryLabel="New Tags",this.options="[]",this.emptyMessage="No results found",this.value="[]",this.multiple=!0,this.size="md",this.status="default",this.layout="vertical",this.isOpen=!1,this.searchQuery="",this.overflowCount=0,this.pendingFocus=!1,this.handleTriggerClick=o=>{this.disabled&&o.stopPropagation()},this.handlePopoverOpen=()=>{console.log("[co-combobox] handlePopoverOpen called"),this.isOpen=!0},this.handlePopoverClose=()=>{console.log("[co-combobox] handlePopoverClose called"),this.isOpen=!1},this.handleClear=o=>{o.stopPropagation(),this.value="[]",this.coClear.emit(),this.coChange.emit({value:this.multiple?[]:"",item:null})},this.handleListChange=o=>{if(this.multiple){const e=o.value;this.value=JSON.stringify(e),this.coChange.emit({value:e,item:o.item})}else{const e=o.value;this.value=JSON.stringify([e]),this.isOpen=!1,this.coChange.emit({value:e,item:o.item})}},this.handleListRemove=o=>{const e=this.selectedValues.filter((e=>e!==o));this.value=JSON.stringify(e),this.coChange.emit({value:e,item:{_id:o,label:o}})},this.handleFooterPrimary=()=>{this.coFooterPrimary.emit(),this.isOpen=!1},this.handleFooterSecondary=()=>{this.coFooterSecondary.emit()}}normalizeOptions(o){return o.map((o=>"string"==typeof o?{label:o,value:o}:o))}get parsedOptions(){if("string"==typeof this.options)try{return this.normalizeOptions(JSON.parse(this.options))}catch(o){return[]}return this.normalizeOptions(this.options)}get selectedValues(){if("string"==typeof this.value)try{return JSON.parse(this.value)}catch(o){return[]}return this.value}get filteredOptions(){return this.searchQuery?s(this.parsedOptions,this.searchQuery,(o=>o.label)):this.parsedOptions}get listItemsJson(){return JSON.stringify(this.filteredOptions.map((o=>({_id:o.value,label:o.label,icon:o.icon}))))}get displayText(){const o=this.selectedValues;if(0===o.length)return"";const e=this.parsedOptions.find((e=>e.value===o[0]));return e?e.label:o[0]}get selectedOptions(){return this.selectedValues.map((o=>this.parsedOptions.find((e=>e.value===o)))).filter((o=>!!o))}get hasValue(){return this.selectedValues.length>0}get statusIcon(){return{error:"warning-circle",success:"check-circle",warning:"warning",info:"info"}[this.status]||null}onOpenChange(o){o?(this.searchQuery="",this.pendingFocus=!0,this.coOpen.emit()):this.coClose.emit()}onValueChange(){}connectedCallback(){this.resizeObserver=new ResizeObserver((()=>{this.calcOverflow()}))}disconnectedCallback(){var o;null===(o=this.resizeObserver)||void 0===o||o.disconnect()}componentDidRender(){var o,e,t;this.chipContainerEl&&(null===(o=this.resizeObserver)||void 0===o||o.disconnect(),null===(e=this.resizeObserver)||void 0===e||e.observe(this.chipContainerEl)),this.calcOverflow(),this.pendingFocus&&(null===(t=this.optionListEl)||void 0===t?void 0:t.isConnected)&&(this.pendingFocus=!1,this.optionListEl.focusSearch())}calcOverflow(){if(!this.multiple||!this.chipContainerEl)return;const o=this.chipContainerEl,e=Array.from(o.querySelectorAll("co-chip"));if(0===e.length)return void(0!==this.overflowCount&&(this.overflowCount=0));const t=o.getBoundingClientRect().right;let c=0;for(let o=e.length-1;o>=0&&e[o].getBoundingClientRect().right>t+1;o--)c++;c!==this.overflowCount&&(this.overflowCount=c)}render(){return t("div",{key:"49723329c7a66fc87bac2280c36993aa7488e723",class:{"co-combobox":!0,"co-combobox--open":this.isOpen,"co-combobox--disabled":this.disabled,[`co-combobox--${this.size}`]:!0},part:"wrapper"},(this.label||this.secondaryLabel)&&t("div",{key:"a32ea355689787cf5e4175964284512bd10041f7",class:"co-combobox__labels"},this.label&&t("label",{key:"2ec23463de4b263fbbf3669fe7c6930719b97572",class:"co-combobox__label",part:"label"},this.label,t(i,{key:"0fab4c10366d9f773eeef6912904a43e376685b5",required:this.required})),this.secondaryLabel&&t("span",{key:"3117d08e3d61799b840b6e12fd9bce7ed0eb74e8",class:"co-combobox__secondary-label",part:"secondary-label"},this.secondaryLabel)),t("co-popover",{key:"28d93c37ef62f757ae27f25621036aac8bb3e752",open:this.isOpen,placement:"bottom-start",matchWidth:!0,offset:4,onCoOpen:this.handlePopoverOpen,onCoClose:this.handlePopoverClose},t("div",{key:"6e390e5d89d6e26abf75d3d8619bacb3e479388f",slot:"trigger",class:"co-combobox__trigger",part:"trigger",onClick:this.handleTriggerClick},this.iconLeft&&t("co-icon",{key:"f0df056dcd2a6b6990e920efb88daadde3e1fee1",name:this.iconLeft,size:16,class:"co-combobox__icon"}),t("div",{key:"b25c9da054983f6d572f7d63ac063a9735871753",class:"co-combobox__input-wrapper",ref:o=>this.chipContainerEl=o},this.multiple&&this.hasValue?this.selectedOptions.map((o=>t("co-chip",{size:"small","icon-mode":"both",label:o.label},t("co-icon",{slot:"icon-left",name:o.icon||"circle",size:10}),t("co-icon",{slot:"icon-right",name:"x-circle",size:10,weight:"fill",onClick:e=>{e.stopPropagation(),this.handleListRemove(o.value)}})))):t("span",{class:{"co-combobox__text":!0,"co-combobox__text--placeholder":!this.hasValue}},this.hasValue?this.displayText:this.placeholder)),this.multiple&&this.overflowCount>0&&t("span",{key:"ac7ff27f3d4149260f441b3b81fba8b92d49bedf",class:"co-combobox__overflow-badge"},this.overflowCount),this.clearable&&this.hasValue&&!this.disabled&&t("button",{key:"ad11ddb7806a2b1cfe044f6d1773ac9e19c5afb9",class:"co-combobox__clear",type:"button",tabIndex:-1,onClick:this.handleClear,"aria-label":"Clear selection",part:"clear"},t("co-icon",{key:"634a149b26996d648cb88095e80531314d0c13dd",name:"x-circle",size:16,weight:"fill"})),t("co-icon",{key:"8ac8d146143869b39c6f3908a3580220dab41642",name:this.isOpen?"caret-up":"caret-down",size:16,class:"co-combobox__caret"})),t("div",{key:"82f61579e15806878fa2b0e3797e20b77a8d5465",class:"co-combobox__dropdown",part:"dropdown"},this.isOpen&&t("co-option-list",{key:"b697324b29132b95d7c9d593f36452052933f22e",ref:o=>this.optionListEl=o,items:this.listItemsJson,value:this.multiple?JSON.stringify(this.selectedValues):this.selectedValues[0]||"",multiple:this.multiple,selectedAffordance:"check",removableItems:this.multiple,virtual:!0,searchable:this.searchable,searchPlaceholder:this.searchPlaceholder,searchDebounce:0,highlightMatches:!0,emptyMessage:this.emptyMessage,onCoSearch:o=>{this.searchQuery=o.detail},onCoChange:o=>this.handleListChange(o.detail),onCoRemoveItem:o=>this.handleListRemove(o.detail)},this.showFooter&&t("co-list-footer",{key:"151517f62b1188dd7ea3a3c53f69be9260e2cbd8",slot:"footer",secondaryLabel:this.footerSecondaryLabel,primaryLabel:this.footerPrimaryLabel,onCoSecondary:this.handleFooterSecondary,onCoPrimary:this.handleFooterPrimary})))),this.helperText&&t("div",{key:"d6b65a3aa77340142038818d43cce73c39914897",class:`co-combobox__helper co-combobox__helper--${this.status}`,part:"helper"},this.statusIcon&&t("co-icon",{key:"e77f399023eab01cb6de4dd356a9dc897da58755",name:this.statusIcon,size:14,weight:"fill",class:"co-combobox__helper-icon"}),t("span",{key:"cad08054732494180772c881622362e9d592df26",class:"co-combobox__helper-text"},this.helperText)))}get el(){return c(this)}static get watchers(){return{isOpen:[{onOpenChange:0}],value:[{onValueChange:0}]}}};a.style=":host{display:block;font-family:var(--co-font-family-primary);font-size:var(--co-font-size-14);letter-spacing:var(--co-font-letter-spacing-body);line-height:1;position:relative}.co-combobox{display:flex;flex-direction:column;gap:var(--co-spacing-sm2);position:relative}.co-combobox__labels{display:flex;align-items:center;justify-content:space-between;padding:0 var(--co-spacing-xs);gap:var(--co-spacing-sm2)}.co-combobox__label{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);font-weight:400;letter-spacing:var(--co-font-letter-spacing-body);line-height:1;white-space:nowrap;cursor:default}.co-combobox__secondary-label{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);font-weight:400;letter-spacing:var(--co-font-letter-spacing-body);line-height:1;white-space:nowrap;text-align:right}.co-combobox__trigger{display:flex;align-items:center;gap:var(--co-spacing-sm2);padding:var(--co-spacing-sm2) var(--co-spacing-md);background:var(--co-semantic-surface-page);border:1px solid var(--co-color-opacity-negro-25, rgba(31, 28, 27, 0.25));border-radius:var(--co-border-radius-xs);min-height:40px;box-sizing:border-box;cursor:pointer;transition:border-color 0.15s ease, box-shadow 0.15s ease;overflow:hidden}.co-combobox--s .co-combobox__trigger{min-height:28px;padding:var(--co-spacing-xxs) var(--co-spacing-sm);font-size:var(--co-font-size-12)}.co-combobox--sm .co-combobox__trigger{min-height:32px;padding:var(--co-spacing-xs) var(--co-spacing-sm);font-size:var(--co-font-size-14)}.co-combobox--lg .co-combobox__trigger{min-height:48px;padding:var(--co-spacing-sm) var(--co-spacing-lg);font-size:var(--co-font-size-16)}.co-combobox--s .co-combobox__input-wrapper,.co-combobox--sm .co-combobox__input-wrapper{min-height:0;padding:0}.co-combobox--open .co-combobox__trigger{border-color:var(--co-semantic-border-focus);box-shadow:0 0 0 2px var(--co-semantic-border-focus-ring)}.co-combobox--disabled .co-combobox__trigger{background:var(--co-semantic-surface-disabled);border-color:transparent;cursor:not-allowed}.co-combobox__icon{flex-shrink:0;color:var(--co-semantic-text-muted);display:flex;align-items:center}.co-combobox--disabled .co-combobox__icon{color:var(--co-semantic-text-disabled)}.co-combobox__input-wrapper{flex:1;display:flex;align-items:center;flex-wrap:nowrap;gap:4px;min-width:0;min-height:24px;padding:var(--co-spacing-xxs) 0;overflow:hidden}.co-combobox__input-wrapper co-chip{--co-chip-max-width:120px;--co-chip-bg:var(--co-semantic-surface-muted);--co-chip-color:var(--co-semantic-text-default);--co-chip-border:1px solid var(--co-semantic-border-subtle);flex-shrink:0}.co-combobox__overflow-badge{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 4px;border-radius:var(--co-border-radius-full);background:var(--co-semantic-status-info, #2d6cc5);color:var(--co-color-base-blanco, #fff);font-family:var(--co-font-family-primary);font-size:var(--co-font-size-10);font-weight:600;line-height:1;white-space:nowrap}.co-combobox__text{color:var(--co-semantic-text-default);font-family:inherit;font-size:inherit;font-weight:400;letter-spacing:inherit;line-height:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.co-combobox__text--placeholder{color:var(--co-semantic-text-muted)}.co-combobox--disabled .co-combobox__text{color:var(--co-semantic-text-disabled)}.co-combobox__clear{flex-shrink:0;display:flex;align-items:center;justify-content:center;padding:0;margin:0;border:none;background:transparent;cursor:pointer;color:var(--co-semantic-text-muted);transition:color 0.15s ease}.co-combobox__clear:hover{color:var(--co-semantic-text-default)}.co-combobox__caret{flex-shrink:0;color:var(--co-semantic-text-muted);display:flex;align-items:center}.co-combobox--disabled .co-combobox__caret{color:var(--co-semantic-text-disabled)}.co-combobox__dropdown{padding:var(--co-spacing-md);display:flex;flex-direction:column;gap:var(--co-spacing-sm2)}.co-combobox__helper{display:flex;align-items:center;gap:var(--co-spacing-xs);padding:0 var(--co-spacing-xs)}.co-combobox__helper-icon{flex-shrink:0;display:flex;align-items:center}.co-combobox__helper-text{color:var(--co-semantic-text-muted);font-size:var(--co-font-size-14);font-weight:400;line-height:1}.co-combobox__helper--error .co-combobox__helper-icon,.co-combobox__helper--error .co-combobox__helper-text{color:var(--co-semantic-status-error)}.co-combobox__helper--success .co-combobox__helper-icon,.co-combobox__helper--success .co-combobox__helper-text{color:var(--co-semantic-status-success)}.co-combobox__helper--warning .co-combobox__helper-icon,.co-combobox__helper--warning .co-combobox__helper-text{color:var(--co-color-status-review)}.co-combobox__helper--info .co-combobox__helper-icon,.co-combobox__helper--info .co-combobox__helper-text{color:var(--co-semantic-status-info)}:host([layout='horizontal']) .co-combobox{display:grid;grid-template-columns:var(--co-field-label-width, max-content) 1fr;align-items:start;column-gap:var(--co-spacing-md);row-gap:var(--co-spacing-sm2)}:host([layout='horizontal']) .co-combobox__labels{grid-column:1;grid-row:1;padding-top:var(--co-spacing-sm2);min-width:0}:host([layout='horizontal']) .co-combobox__label{white-space:normal}:host([layout='horizontal']) .co-combobox>:not(.co-combobox__labels){grid-column:2;min-width:0}.co-field-required{margin-left:2px;color:var(--co-color-status-error)}.co-field-required__caption{margin-left:4px;color:var(--co-semantic-text-muted);font-size:var(--co-font-size-12);font-weight:400}.co-field-required__caption::before{content:var(--co-field-required-text, ' (required)')}";export{a as co_combobox}
1
+ import{r as o,c as e,h as t,a as i}from"./p-BCEz3S-z.js";import{R as c}from"./p-C-d15gih.js";import{r as s}from"./p-CQY6Ul7q.js";const a=class{constructor(t){o(this,t),this.coChange=e(this,"coChange",7),this.coOpen=e(this,"coOpen",3),this.coClose=e(this,"coClose",3),this.coClear=e(this,"coClear",7),this.coFooterPrimary=e(this,"coFooterPrimary",7),this.coFooterSecondary=e(this,"coFooterSecondary",7),this.required=!1,this.placeholder="",this.disabled=!1,this.clearable=!0,this.searchable=!1,this.searchPlaceholder="Search",this.showFooter=!1,this.footerPrimaryLabel="Ok",this.footerSecondaryLabel="New Tags",this.options="[]",this.emptyMessage="No results found",this.value="[]",this.multiple=!0,this.size="md",this.status="default",this.layout="vertical",this.isOpen=!1,this.searchQuery="",this.overflowCount=0,this.pendingFocus=!1,this.handleTriggerClick=o=>{this.disabled&&o.stopPropagation()},this.handlePopoverOpen=()=>{console.log("[co-combobox] handlePopoverOpen called"),this.isOpen=!0},this.handlePopoverClose=()=>{console.log("[co-combobox] handlePopoverClose called"),this.isOpen=!1},this.handleClear=o=>{o.stopPropagation(),this.value="[]",this.coClear.emit(),this.coChange.emit({value:this.multiple?[]:"",item:null})},this.handleListChange=o=>{if(this.multiple){const e=o.value;this.value=JSON.stringify(e),this.coChange.emit({value:e,item:o.item})}else{const e=o.value;this.value=JSON.stringify([e]),this.isOpen=!1,this.coChange.emit({value:e,item:o.item})}},this.handleListRemove=o=>{const e=this.selectedValues.filter((e=>e!==o));this.value=JSON.stringify(e),this.coChange.emit({value:e,item:{_id:o,label:o}})},this.handleFooterPrimary=()=>{this.coFooterPrimary.emit(),this.isOpen=!1},this.handleFooterSecondary=()=>{this.coFooterSecondary.emit()}}normalizeOptions(o){return o.map((o=>"string"==typeof o?{label:o,value:o}:o))}get parsedOptions(){if("string"==typeof this.options)try{return this.normalizeOptions(JSON.parse(this.options))}catch(o){return[]}return this.normalizeOptions(this.options)}get selectedValues(){if("string"==typeof this.value)try{return JSON.parse(this.value)}catch(o){return[]}return this.value}get filteredOptions(){return this.searchQuery?s(this.parsedOptions,this.searchQuery,(o=>o.label)):this.parsedOptions}get listItemsJson(){return JSON.stringify(this.filteredOptions.map((o=>({_id:o.value,label:o.label,icon:o.icon}))))}get displayText(){const o=this.selectedValues;if(0===o.length)return"";const e=this.parsedOptions.find((e=>e.value===o[0]));return e?e.label:o[0]}get selectedOptions(){return this.selectedValues.map((o=>this.parsedOptions.find((e=>e.value===o)))).filter((o=>!!o))}get hasValue(){return this.selectedValues.length>0}get statusIcon(){return{error:"warning-circle",success:"check-circle",warning:"warning",info:"info"}[this.status]||null}onOpenChange(o){o?(this.searchQuery="",this.pendingFocus=!0,this.coOpen.emit()):this.coClose.emit()}onValueChange(){}connectedCallback(){this.resizeObserver=new ResizeObserver((()=>{this.calcOverflow()}))}disconnectedCallback(){var o;null===(o=this.resizeObserver)||void 0===o||o.disconnect()}componentDidRender(){var o,e,t;this.chipContainerEl&&(null===(o=this.resizeObserver)||void 0===o||o.disconnect(),null===(e=this.resizeObserver)||void 0===e||e.observe(this.chipContainerEl)),this.calcOverflow(),this.pendingFocus&&(null===(t=this.optionListEl)||void 0===t?void 0:t.isConnected)&&(this.pendingFocus=!1,this.optionListEl.focusSearch())}calcOverflow(){if(!this.multiple||!this.chipContainerEl)return;const o=this.chipContainerEl,e=Array.from(o.querySelectorAll("co-chip"));if(0===e.length)return void(0!==this.overflowCount&&(this.overflowCount=0));const t=o.getBoundingClientRect().right;let i=0;for(let o=e.length-1;o>=0&&e[o].getBoundingClientRect().right>t+1;o--)i++;i!==this.overflowCount&&(this.overflowCount=i)}render(){return t("div",{key:"49723329c7a66fc87bac2280c36993aa7488e723",class:{"co-combobox":!0,"co-combobox--open":this.isOpen,"co-combobox--disabled":this.disabled,[`co-combobox--${this.size}`]:!0},part:"wrapper"},(this.label||this.secondaryLabel)&&t("div",{key:"a32ea355689787cf5e4175964284512bd10041f7",class:"co-combobox__labels"},this.label&&t("label",{key:"2ec23463de4b263fbbf3669fe7c6930719b97572",class:"co-combobox__label",part:"label"},this.label,t(c,{key:"0fab4c10366d9f773eeef6912904a43e376685b5",required:this.required})),this.secondaryLabel&&t("span",{key:"3117d08e3d61799b840b6e12fd9bce7ed0eb74e8",class:"co-combobox__secondary-label",part:"secondary-label"},this.secondaryLabel)),t("co-popover",{key:"28d93c37ef62f757ae27f25621036aac8bb3e752",open:this.isOpen,placement:"bottom-start",matchWidth:!0,offset:4,onCoOpen:this.handlePopoverOpen,onCoClose:this.handlePopoverClose},t("div",{key:"6e390e5d89d6e26abf75d3d8619bacb3e479388f",slot:"trigger",class:"co-combobox__trigger",part:"trigger",onClick:this.handleTriggerClick},this.iconLeft&&t("co-icon",{key:"f0df056dcd2a6b6990e920efb88daadde3e1fee1",name:this.iconLeft,size:16,class:"co-combobox__icon"}),t("div",{key:"b25c9da054983f6d572f7d63ac063a9735871753",class:"co-combobox__input-wrapper",ref:o=>this.chipContainerEl=o},this.multiple&&this.hasValue?this.selectedOptions.map((o=>t("co-chip",{size:"small","icon-mode":"both",label:o.label},t("co-icon",{slot:"icon-left",name:o.icon||"circle",size:10}),t("co-icon",{slot:"icon-right",name:"x-circle",size:10,weight:"fill",onClick:e=>{e.stopPropagation(),this.handleListRemove(o.value)}})))):t("span",{class:{"co-combobox__text":!0,"co-combobox__text--placeholder":!this.hasValue}},this.hasValue?this.displayText:this.placeholder)),this.multiple&&this.overflowCount>0&&t("span",{key:"ac7ff27f3d4149260f441b3b81fba8b92d49bedf",class:"co-combobox__overflow-badge"},this.overflowCount),this.clearable&&this.hasValue&&!this.disabled&&t("button",{key:"ad11ddb7806a2b1cfe044f6d1773ac9e19c5afb9",class:"co-combobox__clear",type:"button",tabIndex:-1,onClick:this.handleClear,"aria-label":"Clear selection",part:"clear"},t("co-icon",{key:"634a149b26996d648cb88095e80531314d0c13dd",name:"x-circle",size:16,weight:"fill"})),t("co-icon",{key:"8ac8d146143869b39c6f3908a3580220dab41642",name:this.isOpen?"caret-up":"caret-down",size:16,class:"co-combobox__caret"})),t("div",{key:"82f61579e15806878fa2b0e3797e20b77a8d5465",class:"co-combobox__dropdown",part:"dropdown"},this.isOpen&&t("co-option-list",{key:"b697324b29132b95d7c9d593f36452052933f22e",ref:o=>this.optionListEl=o,items:this.listItemsJson,value:this.multiple?JSON.stringify(this.selectedValues):this.selectedValues[0]||"",multiple:this.multiple,selectedAffordance:"check",removableItems:this.multiple,virtual:!0,searchable:this.searchable,searchPlaceholder:this.searchPlaceholder,searchDebounce:0,highlightMatches:!0,emptyMessage:this.emptyMessage,onCoSearch:o=>{this.searchQuery=o.detail},onCoChange:o=>this.handleListChange(o.detail),onCoRemoveItem:o=>this.handleListRemove(o.detail)},this.showFooter&&t("co-list-footer",{key:"151517f62b1188dd7ea3a3c53f69be9260e2cbd8",slot:"footer",secondaryLabel:this.footerSecondaryLabel,primaryLabel:this.footerPrimaryLabel,onCoSecondary:this.handleFooterSecondary,onCoPrimary:this.handleFooterPrimary})))),this.helperText&&t("div",{key:"d6b65a3aa77340142038818d43cce73c39914897",class:`co-combobox__helper co-combobox__helper--${this.status}`,part:"helper"},this.statusIcon&&t("co-icon",{key:"e77f399023eab01cb6de4dd356a9dc897da58755",name:this.statusIcon,size:14,weight:"fill",class:"co-combobox__helper-icon"}),t("span",{key:"cad08054732494180772c881622362e9d592df26",class:"co-combobox__helper-text"},this.helperText)))}get el(){return i(this)}static get watchers(){return{isOpen:[{onOpenChange:0}],value:[{onValueChange:0}]}}};a.style=":host{display:block;font-family:var(--co-font-family-primary);font-size:var(--co-font-size-14);letter-spacing:var(--co-font-letter-spacing-body);line-height:1;position:relative}.co-combobox{display:flex;flex-direction:column;gap:var(--co-spacing-sm2);position:relative}.co-combobox__labels{display:flex;align-items:center;justify-content:space-between;padding:0 var(--co-spacing-xs);gap:var(--co-spacing-sm2)}.co-combobox__label{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);font-weight:400;letter-spacing:var(--co-font-letter-spacing-body);line-height:1;white-space:nowrap;cursor:default}.co-combobox__secondary-label{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);font-weight:400;letter-spacing:var(--co-font-letter-spacing-body);line-height:1;white-space:nowrap;text-align:right}.co-combobox__trigger{display:flex;align-items:center;gap:var(--co-spacing-sm2);padding:var(--co-spacing-sm2) var(--co-spacing-md);background:var(--co-semantic-surface-page);border:1px solid var(--co-semantic-border-field);border-radius:var(--co-border-radius-xs);min-height:40px;box-sizing:border-box;cursor:pointer;transition:border-color 0.15s ease, box-shadow 0.15s ease;overflow:hidden}.co-combobox--s .co-combobox__trigger{min-height:28px;padding:var(--co-spacing-xxs) var(--co-spacing-sm);font-size:var(--co-font-size-12)}.co-combobox--sm .co-combobox__trigger{min-height:32px;padding:var(--co-spacing-xs) var(--co-spacing-sm);font-size:var(--co-font-size-14)}.co-combobox--lg .co-combobox__trigger{min-height:48px;padding:var(--co-spacing-sm) var(--co-spacing-lg);font-size:var(--co-font-size-16)}.co-combobox--open .co-combobox__trigger{border-color:var(--co-semantic-border-focus);box-shadow:0 0 0 2px var(--co-semantic-border-focus-ring)}.co-combobox--disabled .co-combobox__trigger{background:var(--co-semantic-surface-disabled);border-color:transparent;cursor:not-allowed}.co-combobox__icon{flex-shrink:0;color:var(--co-semantic-text-muted);display:flex;align-items:center}.co-combobox--disabled .co-combobox__icon{color:var(--co-semantic-text-disabled)}.co-combobox__input-wrapper{flex:1;display:flex;align-items:center;flex-wrap:nowrap;gap:4px;min-width:0;min-height:22px;padding:0;overflow:hidden}.co-combobox__input-wrapper co-chip{--co-chip-max-width:120px;--co-chip-bg:var(--co-semantic-surface-muted);--co-chip-color:var(--co-semantic-text-default);--co-chip-border:1px solid var(--co-semantic-border-subtle);flex-shrink:0}.co-combobox__overflow-badge{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 4px;border-radius:var(--co-border-radius-full);background:var(--co-semantic-status-info, #2d6cc5);color:var(--co-color-base-blanco, #fff);font-family:var(--co-font-family-primary);font-size:var(--co-font-size-10);font-weight:600;line-height:1;white-space:nowrap}.co-combobox__text{color:var(--co-semantic-text-default);font-family:inherit;font-size:inherit;font-weight:400;letter-spacing:inherit;line-height:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.co-combobox__text--placeholder{color:var(--co-semantic-text-muted)}.co-combobox--disabled .co-combobox__text{color:var(--co-semantic-text-disabled)}.co-combobox__clear{flex-shrink:0;display:flex;align-items:center;justify-content:center;padding:0;margin:0;border:none;background:transparent;cursor:pointer;color:var(--co-semantic-text-muted);transition:color 0.15s ease}.co-combobox__clear:hover{color:var(--co-semantic-text-default)}.co-combobox__caret{flex-shrink:0;color:var(--co-semantic-text-muted);display:flex;align-items:center}.co-combobox--disabled .co-combobox__caret{color:var(--co-semantic-text-disabled)}.co-combobox__dropdown{padding:var(--co-spacing-md);display:flex;flex-direction:column;gap:var(--co-spacing-sm2)}.co-combobox__helper{display:flex;align-items:center;gap:var(--co-spacing-xs);padding:0 var(--co-spacing-xs)}.co-combobox__helper-icon{flex-shrink:0;display:flex;align-items:center}.co-combobox__helper-text{color:var(--co-semantic-text-muted);font-size:var(--co-font-size-14);font-weight:400;line-height:1}.co-combobox__helper--error .co-combobox__helper-icon,.co-combobox__helper--error .co-combobox__helper-text{color:var(--co-semantic-status-error)}.co-combobox__helper--success .co-combobox__helper-icon,.co-combobox__helper--success .co-combobox__helper-text{color:var(--co-semantic-status-success)}.co-combobox__helper--warning .co-combobox__helper-icon,.co-combobox__helper--warning .co-combobox__helper-text{color:var(--co-color-status-review)}.co-combobox__helper--info .co-combobox__helper-icon,.co-combobox__helper--info .co-combobox__helper-text{color:var(--co-semantic-status-info)}:host([layout='horizontal']) .co-combobox{display:grid;grid-template-columns:var(--co-field-label-width, max-content) 1fr;align-items:start;column-gap:var(--co-spacing-md);row-gap:var(--co-spacing-sm2)}:host([layout='horizontal']) .co-combobox__labels{grid-column:1;grid-row:1;padding-top:var(--co-spacing-sm2);min-width:0}:host([layout='horizontal']) .co-combobox__label{white-space:normal}:host([layout='horizontal']) .co-combobox>:not(.co-combobox__labels){grid-column:2;min-width:0}.co-field-required{margin-left:2px;color:var(--co-color-status-error)}.co-field-required__caption{margin-left:4px;color:var(--co-semantic-text-muted);font-size:var(--co-font-size-12);font-weight:400}.co-field-required__caption::before{content:var(--co-field-required-text, ' (required)')}";export{a as co_combobox}