@prolibu-suite/cobalt-core 0.9.6 → 0.10.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 (611) hide show
  1. package/custom-elements.json +750 -80
  2. package/dist/cjs/co-accordion.cjs.entry.js +1 -1
  3. package/dist/cjs/co-action-bar.cjs.entry.js +1 -1
  4. package/dist/cjs/co-app-shell.cjs.entry.js +4 -4
  5. package/dist/cjs/co-audio-player.cjs.entry.js +1 -1
  6. package/dist/cjs/co-autocomplete.cjs.entry.js +2 -2
  7. package/dist/cjs/co-avatar-group.cjs.entry.js +1 -1
  8. package/dist/cjs/co-avatar_2.cjs.entry.js +49 -17
  9. package/dist/cjs/co-badge.cjs.entry.js +11 -3
  10. package/dist/cjs/co-bottom-sheet.cjs.entry.js +1 -1
  11. package/dist/cjs/co-breadcrumb-item.cjs.entry.js +1 -1
  12. package/dist/cjs/co-breadcrumb.cjs.entry.js +1 -1
  13. package/dist/cjs/co-button-group.cjs.entry.js +1 -1
  14. package/dist/cjs/co-button.cjs.entry.js +2 -2
  15. package/dist/cjs/co-calendar-month_2.cjs.entry.js +55 -20
  16. package/dist/cjs/co-calendar_3.cjs.entry.js +27 -15
  17. package/dist/cjs/co-card.cjs.entry.js +1 -1
  18. package/dist/cjs/co-carousel-item.cjs.entry.js +1 -1
  19. package/dist/cjs/co-carousel.cjs.entry.js +2 -2
  20. package/dist/cjs/co-checkbox-group.cjs.entry.js +2 -2
  21. package/dist/cjs/co-checkbox.cjs.entry.js +6 -6
  22. package/dist/cjs/co-chip_2.cjs.entry.js +8 -5
  23. package/dist/cjs/co-color-picker.cjs.entry.js +1048 -27
  24. package/dist/cjs/co-column-picker.cjs.entry.js +3 -3
  25. package/dist/cjs/co-combobox.cjs.entry.js +2 -2
  26. package/dist/cjs/co-command-search.cjs.entry.js +1 -1
  27. package/dist/cjs/co-data-table-pagination.cjs.entry.js +5 -5
  28. package/dist/cjs/co-data-table.cjs.entry.js +1 -1
  29. package/dist/cjs/co-date-picker.cjs.entry.js +3 -3
  30. package/dist/cjs/co-date-range-picker.cjs.entry.js +3 -3
  31. package/dist/cjs/co-date-range.cjs.entry.js +2 -2
  32. package/dist/cjs/co-date-time-picker.cjs.entry.js +101 -130
  33. package/dist/cjs/co-drive-card.cjs.entry.js +2 -2
  34. package/dist/cjs/co-drop-zone.cjs.entry.js +2 -2
  35. package/dist/cjs/co-emoji-picker.cjs.entry.js +4 -4
  36. package/dist/cjs/co-empty-state.cjs.entry.js +4 -4
  37. package/dist/cjs/co-event-calendar.cjs.entry.js +4 -4
  38. package/dist/cjs/co-event-popover.cjs.entry.js +3 -3
  39. package/dist/cjs/co-fab.cjs.entry.js +3 -3
  40. package/dist/cjs/co-file-field.cjs.entry.js +102 -106
  41. package/dist/cjs/co-file-type-tile.cjs.entry.js +3 -3
  42. package/dist/cjs/co-helper-text.cjs.entry.js +3 -3
  43. package/dist/cjs/co-icon-button.cjs.entry.js +6 -6
  44. package/dist/cjs/co-icon.cjs.entry.js +3 -3
  45. package/dist/cjs/co-input.cjs.entry.js +26 -4
  46. package/dist/cjs/co-json-field.cjs.entry.js +5 -5
  47. package/dist/cjs/co-lightbox.cjs.entry.js +204 -21
  48. package/dist/cjs/co-list-footer.cjs.entry.js +2 -2
  49. package/dist/cjs/co-list-item.cjs.entry.js +5 -5
  50. package/dist/cjs/co-loader.cjs.entry.js +1 -1
  51. package/dist/cjs/co-media-thumb.cjs.entry.js +3 -3
  52. package/dist/cjs/co-menu-divider.cjs.entry.js +2 -2
  53. package/dist/cjs/co-menu-item.cjs.entry.js +84 -3
  54. package/dist/cjs/co-menu.cjs.entry.js +2 -2
  55. package/dist/cjs/co-modal.cjs.entry.js +6 -4
  56. package/dist/cjs/co-navbar.cjs.entry.js +4 -4
  57. package/dist/cjs/co-number-field.cjs.entry.js +272 -9
  58. package/dist/cjs/co-overlay.cjs.entry.js +6 -4
  59. package/dist/cjs/co-page-header.cjs.entry.js +2 -2
  60. package/dist/cjs/co-phone-field.cjs.entry.js +3 -3
  61. package/dist/cjs/co-popover.cjs.entry.js +58 -21
  62. package/dist/cjs/co-progress-bar.cjs.entry.js +3 -3
  63. package/dist/cjs/co-progress-circle.cjs.entry.js +3 -3
  64. package/dist/cjs/co-provider-logo_2.cjs.entry.js +47 -3
  65. package/dist/cjs/co-radio-group.cjs.entry.js +1 -1
  66. package/dist/cjs/co-radio.cjs.entry.js +4 -4
  67. package/dist/cjs/co-rating.cjs.entry.js +4 -4
  68. package/dist/cjs/co-ref-field.cjs.entry.js +4 -4
  69. package/dist/cjs/co-rich-text-editor.cjs.entry.js +11 -8
  70. package/dist/cjs/co-rich-text-toolbar.cjs.entry.js +7 -3
  71. package/dist/cjs/co-rich-text-viewer.cjs.entry.js +4 -3
  72. package/dist/cjs/co-row.cjs.entry.js +3 -3
  73. package/dist/cjs/co-segmented-bar.cjs.entry.js +1 -1
  74. package/dist/cjs/co-select.cjs.entry.js +2 -2
  75. package/dist/cjs/co-separator.cjs.entry.js +2 -2
  76. package/dist/cjs/co-sidebar-nav.cjs.entry.js +2 -2
  77. package/dist/cjs/co-sidebar.cjs.entry.js +3 -3
  78. package/dist/cjs/co-slider.cjs.entry.js +3 -3
  79. package/dist/cjs/co-switch.cjs.entry.js +6 -6
  80. package/dist/cjs/co-tab-group.cjs.entry.js +3 -3
  81. package/dist/cjs/co-tab.cjs.entry.js +3 -3
  82. package/dist/cjs/co-tags-field.cjs.entry.js +8 -8
  83. package/dist/cjs/co-textarea.cjs.entry.js +6 -6
  84. package/dist/cjs/co-time-field.cjs.entry.js +325 -0
  85. package/dist/cjs/co-toast.cjs.entry.js +2 -2
  86. package/dist/cjs/co-toggle-button-group.cjs.entry.js +4 -4
  87. package/dist/cjs/co-toggle-button.cjs.entry.js +4 -4
  88. package/dist/cjs/co-transfer-list.cjs.entry.js +1 -1
  89. package/dist/cjs/co-video.cjs.entry.js +32 -7
  90. package/dist/cjs/cobalt.cjs.js +2 -2
  91. package/dist/cjs/color-CML2Cfdh.js +142 -0
  92. package/dist/cjs/{dateI18n-wblvKRq_.js → dateI18n-BK2qHqoC.js} +36 -0
  93. package/dist/cjs/{fieldChip-BLzo9MEV.js → fieldChip-B6YIGU1V.js} +1 -1
  94. package/dist/cjs/fileI18n-6sdbKvo6.js +88 -0
  95. package/dist/cjs/{index-DFZ5YhIT.js → index-BYwrR87Z.js} +28 -10
  96. package/dist/cjs/{index-DK-2Lzmf.js → index-MDAnKsze.js} +25 -21
  97. package/dist/cjs/loader.cjs.js +2 -2
  98. package/dist/cjs/{positioning-DCj_AJ2T.js → positioning-CyatXeT_.js} +32 -13
  99. package/dist/cjs/{requiredMark-C1xcrzSZ.js → requiredMark-D-t-IPN0.js} +1 -1
  100. package/dist/cjs/{toolbar-config-BQfWTW6P.js → toolbar-config-BSGas-Wl.js} +10 -0
  101. package/dist/cobalt/cobalt.css +1 -1
  102. package/dist/cobalt/cobalt.esm.js +1 -1
  103. package/dist/cobalt/{p-f83b48fd.entry.js → p-011dc80b.entry.js} +1 -1
  104. package/dist/cobalt/{p-316c62c0.entry.js → p-0678c797.entry.js} +1 -1
  105. package/dist/cobalt/{p-43bd298d.entry.js → p-08e42e00.entry.js} +1 -1
  106. package/dist/cobalt/{p-1c68bc41.entry.js → p-10b82207.entry.js} +1 -1
  107. package/dist/cobalt/{p-a8c64cc3.entry.js → p-15d59169.entry.js} +1 -1
  108. package/dist/cobalt/{p-07d570a6.entry.js → p-16954cea.entry.js} +1 -1
  109. package/dist/cobalt/{p-85a61e28.entry.js → p-17244412.entry.js} +1 -1
  110. package/dist/cobalt/p-1788aab5.entry.js +1 -0
  111. package/dist/cobalt/p-1a589c8e.entry.js +1 -0
  112. package/dist/cobalt/{p-da546d08.entry.js → p-1dc55e43.entry.js} +1 -1
  113. package/dist/cobalt/p-20a39218.entry.js +1 -0
  114. package/dist/cobalt/{p-4c7e3984.entry.js → p-23ab0cc5.entry.js} +1 -1
  115. package/dist/cobalt/{p-fabe5fb2.entry.js → p-2636b7eb.entry.js} +1 -1
  116. package/dist/cobalt/{p-88a0659f.entry.js → p-27a7e549.entry.js} +1 -1
  117. package/dist/cobalt/{p-18d34b01.entry.js → p-290066ef.entry.js} +1 -1
  118. package/dist/cobalt/{p-89e38c5e.entry.js → p-2f9cbbd5.entry.js} +1 -1
  119. package/dist/cobalt/{p-ef5e1167.entry.js → p-325b91b6.entry.js} +1 -1
  120. package/dist/cobalt/{p-60cb66f5.entry.js → p-37f5036b.entry.js} +1 -1
  121. package/dist/cobalt/p-3cc3ff93.entry.js +1 -0
  122. package/dist/cobalt/p-410bee4d.entry.js +1 -0
  123. package/dist/cobalt/{p-6795a258.entry.js → p-44c4e4a3.entry.js} +1 -1
  124. package/dist/cobalt/{p-4b083da4.entry.js → p-44ea675f.entry.js} +1 -1
  125. package/dist/cobalt/{p-2828ecf6.entry.js → p-4592ca00.entry.js} +1 -1
  126. package/dist/cobalt/p-4908f33f.entry.js +1 -0
  127. package/dist/cobalt/{p-342e1da4.entry.js → p-4d65e713.entry.js} +1 -1
  128. package/dist/cobalt/{p-dca4cd5f.entry.js → p-4d897896.entry.js} +1 -1
  129. package/dist/cobalt/{p-33ea4a90.entry.js → p-50bcc76f.entry.js} +1 -1
  130. package/dist/cobalt/{p-ac91259e.entry.js → p-5298c030.entry.js} +1 -1
  131. package/dist/cobalt/p-54c987d7.entry.js +1 -0
  132. package/dist/cobalt/p-56551580.entry.js +1 -0
  133. package/dist/cobalt/p-58137c9e.entry.js +1 -0
  134. package/dist/cobalt/{p-4f754c9a.entry.js → p-58d9b650.entry.js} +1 -1
  135. package/dist/cobalt/p-59963937.entry.js +1 -0
  136. package/dist/cobalt/{p-2d329ac8.entry.js → p-623cc195.entry.js} +1 -1
  137. package/dist/cobalt/p-63825d7f.entry.js +1 -0
  138. package/dist/cobalt/{p-8e667eb6.entry.js → p-66b11b38.entry.js} +1 -1
  139. package/dist/cobalt/{p-fb3a095b.entry.js → p-6bf6bc3e.entry.js} +1 -1
  140. package/dist/cobalt/p-6f700f0d.entry.js +1 -0
  141. package/dist/cobalt/p-73c6d735.entry.js +1 -0
  142. package/dist/cobalt/{p-a6357340.entry.js → p-76249983.entry.js} +1 -1
  143. package/dist/cobalt/{p-bfc2a849.entry.js → p-82266f11.entry.js} +1 -1
  144. package/dist/cobalt/{p-a9b29cc2.entry.js → p-826ee074.entry.js} +1 -1
  145. package/dist/cobalt/{p-23b3ff3f.entry.js → p-83a9a05a.entry.js} +1 -1
  146. package/dist/cobalt/{p-568cfe8d.entry.js → p-83ea631d.entry.js} +1 -1
  147. package/dist/cobalt/p-85501c6a.entry.js +1 -0
  148. package/dist/cobalt/{p-dfd25f1d.entry.js → p-88195a63.entry.js} +1 -1
  149. package/dist/cobalt/p-8fa5dc4a.entry.js +1 -0
  150. package/dist/cobalt/{p-c8dba82f.entry.js → p-91e73a92.entry.js} +1 -1
  151. package/dist/cobalt/{p-ac466658.entry.js → p-92b092db.entry.js} +1 -1
  152. package/dist/cobalt/{p-36197363.entry.js → p-996f4e38.entry.js} +1 -1
  153. package/dist/cobalt/p-BRbgGqLw.js +1 -0
  154. package/dist/cobalt/{p-BL0sCfMH.js → p-Bryf3-Js.js} +1 -1
  155. package/dist/cobalt/p-DFHRS9cJ.js +1 -0
  156. package/dist/cobalt/{p-CrtiywTB.js → p-DH5lfRNj.js} +1 -1
  157. package/dist/{components/p-WeuPA9Rw.js → cobalt/p-DOL2zACE.js} +1 -1
  158. package/dist/cobalt/p-D_zA1Pv4.js +1 -0
  159. package/dist/cobalt/{p-fef5db54.entry.js → p-a32b20eb.entry.js} +1 -1
  160. package/dist/cobalt/p-aa9400bf.entry.js +1 -0
  161. package/dist/cobalt/{p-8eb485c8.entry.js → p-aaca6dab.entry.js} +1 -1
  162. package/dist/cobalt/{p-e5495539.entry.js → p-aae86f96.entry.js} +1 -1
  163. package/dist/cobalt/{p-8f38e24d.entry.js → p-ad33c40e.entry.js} +1 -1
  164. package/dist/cobalt/p-b0c4fc71.entry.js +1 -0
  165. package/dist/cobalt/{p-da18b5f4.entry.js → p-b1e8d69e.entry.js} +1 -1
  166. package/dist/cobalt/p-b48917c9.entry.js +1 -0
  167. package/dist/cobalt/{p-7e53e9c8.entry.js → p-b565104d.entry.js} +1 -1
  168. package/dist/cobalt/{p-b0319a2d.entry.js → p-b90d41e4.entry.js} +1 -1
  169. package/dist/cobalt/{p-c5684c79.entry.js → p-bd683db3.entry.js} +1 -1
  170. package/dist/cobalt/{p-1ddbc48b.entry.js → p-c124e82b.entry.js} +1 -1
  171. package/dist/cobalt/{p-95efe661.entry.js → p-c2ebf0ec.entry.js} +1 -1
  172. package/dist/cobalt/{p-76420ac1.entry.js → p-c32c176a.entry.js} +1 -1
  173. package/dist/cobalt/{p-54ae807d.entry.js → p-c465d619.entry.js} +1 -1
  174. package/dist/cobalt/{p-ab45d9bd.entry.js → p-c91d4fc6.entry.js} +1 -1
  175. package/dist/cobalt/{p-ce35c898.entry.js → p-d29bb0fa.entry.js} +1 -1
  176. package/dist/cobalt/{p-7c5e846a.entry.js → p-db805569.entry.js} +1 -1
  177. package/dist/cobalt/p-e01f9b9a.entry.js +1 -0
  178. package/dist/cobalt/p-e3aae282.entry.js +1 -0
  179. package/dist/cobalt/{p-d15d3a97.entry.js → p-e4264532.entry.js} +1 -1
  180. package/dist/cobalt/{p-93c68029.entry.js → p-e48f4e45.entry.js} +1 -1
  181. package/dist/cobalt/{p-3f0eed59.entry.js → p-e49a564c.entry.js} +1 -1
  182. package/dist/cobalt/p-e8a2f993.entry.js +1 -0
  183. package/dist/cobalt/p-e8a4e6b0.entry.js +1 -0
  184. package/dist/cobalt/p-ea20f048.entry.js +1 -0
  185. package/dist/cobalt/{p-c1e7fb32.entry.js → p-eb063cc0.entry.js} +1 -1
  186. package/dist/cobalt/p-eb82358d.entry.js +1 -0
  187. package/dist/cobalt/{p-2114c036.entry.js → p-eb8691f2.entry.js} +1 -1
  188. package/dist/cobalt/{p-e8878cf9.entry.js → p-ee2023da.entry.js} +1 -1
  189. package/dist/cobalt/p-ee9a623d.entry.js +1 -0
  190. package/dist/cobalt/p-ef5ca521.entry.js +1 -0
  191. package/dist/cobalt/p-f4e1c3c3.entry.js +1 -0
  192. package/dist/cobalt/{p-e364b8a5.entry.js → p-f57dffca.entry.js} +1 -1
  193. package/dist/cobalt/p-f6691108.entry.js +1 -0
  194. package/dist/cobalt/p-f68dd124.entry.js +1 -0
  195. package/dist/cobalt/p-fMqVDypp.js +1 -0
  196. package/dist/cobalt/{p-0c463d9a.entry.js → p-fd150cc6.entry.js} +1 -1
  197. package/dist/cobalt/{p-0e91e5c4.entry.js → p-fe7e8813.entry.js} +1 -1
  198. package/dist/cobalt/p-gKnOhsd2.js +1 -0
  199. package/dist/cobalt/p-jYd9gu_c.js +1 -0
  200. package/dist/collection/collection-manifest.json +1 -0
  201. package/dist/collection/components/co-app-shell/co-app-shell.css +107 -41
  202. package/dist/collection/components/co-app-shell/co-app-shell.js +2 -2
  203. package/dist/collection/components/co-autocomplete/co-autocomplete.js +1 -1
  204. package/dist/collection/components/co-avatar-group/co-avatar-group.js +1 -1
  205. package/dist/collection/components/co-badge/co-badge.css +18 -0
  206. package/dist/collection/components/co-badge/co-badge.js +29 -1
  207. package/dist/collection/components/co-button/co-button.css +4 -4
  208. package/dist/collection/components/co-checkbox/co-checkbox.css +12 -3
  209. package/dist/collection/components/co-checkbox/co-checkbox.js +6 -6
  210. package/dist/collection/components/co-checkbox-group/co-checkbox-group.css +1 -3
  211. package/dist/collection/components/co-checkbox-group/co-checkbox-group.js +1 -1
  212. package/dist/collection/components/co-color-picker/co-color-picker.css +252 -5
  213. package/dist/collection/components/co-color-picker/co-color-picker.js +932 -15
  214. package/dist/collection/components/co-color-picker/presets.js +113 -15
  215. package/dist/collection/components/co-column-picker/co-column-picker.js +2 -2
  216. package/dist/collection/components/co-combobox/co-combobox.js +1 -1
  217. package/dist/collection/components/co-command-search/co-command-search.js +1 -1
  218. package/dist/collection/components/co-data-table/co-data-table.js +1 -1
  219. package/dist/collection/components/co-data-table-pagination/co-data-table-pagination.js +4 -4
  220. package/dist/collection/components/co-date-field/co-date-field.js +4 -4
  221. package/dist/collection/components/co-date-range/co-date-range.js +1 -1
  222. package/dist/collection/components/co-date-range-picker/co-date-range-picker.js +2 -2
  223. package/dist/collection/components/co-date-time-picker/co-date-time-picker.css +128 -32
  224. package/dist/collection/components/co-date-time-picker/co-date-time-picker.js +142 -138
  225. package/dist/collection/components/co-drawer/co-drawer.css +99 -36
  226. package/dist/collection/components/co-drawer/co-drawer.js +19 -7
  227. package/dist/collection/components/co-drive-card/co-drive-card.js +1 -1
  228. package/dist/collection/components/co-drop-zone/co-drop-zone.js +1 -1
  229. package/dist/collection/components/co-emoji-picker/co-emoji-picker.js +2 -2
  230. package/dist/collection/components/co-empty-state/co-empty-state.css +28 -0
  231. package/dist/collection/components/co-empty-state/co-empty-state.js +2 -2
  232. package/dist/collection/components/co-event-calendar/co-event-calendar.js +2 -2
  233. package/dist/collection/components/co-event-popover/co-event-popover.js +1 -1
  234. package/dist/collection/components/co-fab/co-fab.js +2 -2
  235. package/dist/collection/components/co-file-field/co-file-field.css +55 -2
  236. package/dist/collection/components/co-file-field/co-file-field.js +41 -13
  237. package/dist/collection/components/co-file-field/co-file-field.utils.js +51 -4
  238. package/dist/collection/components/co-file-type-tile/co-file-type-tile.js +2 -2
  239. package/dist/collection/components/co-helper-text/co-helper-text.js +2 -2
  240. package/dist/collection/components/co-icon/co-icon.js +2 -2
  241. package/dist/collection/components/co-icon-button/co-icon-button.css +40 -2
  242. package/dist/collection/components/co-icon-button/co-icon-button.js +43 -4
  243. package/dist/collection/components/co-input/co-input.css +33 -0
  244. package/dist/collection/components/co-input/co-input.js +25 -2
  245. package/dist/collection/components/co-json-field/co-json-field.js +3 -3
  246. package/dist/collection/components/co-lightbox/co-lightbox.css +23 -0
  247. package/dist/collection/components/co-lightbox/co-lightbox.js +209 -20
  248. package/dist/collection/components/co-list-footer/co-list-footer.js +1 -1
  249. package/dist/collection/components/co-list-item/co-list-item.js +4 -4
  250. package/dist/collection/components/co-media-thumb/co-media-thumb.js +2 -2
  251. package/dist/collection/components/co-menu/co-menu.js +1 -1
  252. package/dist/collection/components/co-menu-divider/co-menu-divider.js +1 -1
  253. package/dist/collection/components/co-menu-item/co-menu-item.js +67 -3
  254. package/dist/collection/components/co-modal/co-modal.css +106 -37
  255. package/dist/collection/components/co-modal/co-modal.js +4 -2
  256. package/dist/collection/components/co-navbar/co-navbar.css +4 -2
  257. package/dist/collection/components/co-navbar/co-navbar.js +2 -2
  258. package/dist/collection/components/co-number-field/co-number-field.css +22 -0
  259. package/dist/collection/components/co-number-field/co-number-field.js +216 -9
  260. package/dist/collection/components/co-option-list/co-option-list.css +25 -4
  261. package/dist/collection/components/co-option-list/co-option-list.js +26 -3
  262. package/dist/collection/components/co-overlay/co-overlay.js +5 -3
  263. package/dist/collection/components/co-page-header/co-page-header.js +1 -1
  264. package/dist/collection/components/co-phone-field/co-phone-field.js +1 -1
  265. package/dist/collection/components/co-popover/co-popover.css +18 -3
  266. package/dist/collection/components/co-popover/co-popover.js +83 -20
  267. package/dist/collection/components/co-progress-bar/co-progress-bar.js +2 -2
  268. package/dist/collection/components/co-progress-circle/co-progress-circle.js +2 -2
  269. package/dist/collection/components/co-radio/co-radio.js +3 -3
  270. package/dist/collection/components/co-radio-group/co-radio-group.js +1 -1
  271. package/dist/collection/components/co-rating/co-rating.js +3 -3
  272. package/dist/collection/components/co-ref-field/co-ref-field.js +3 -3
  273. package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.css +14 -1
  274. package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.js +9 -6
  275. package/dist/collection/components/co-rich-text-toolbar/co-rich-text-toolbar.js +7 -3
  276. package/dist/collection/components/co-rich-text-viewer/co-rich-text-viewer.js +3 -2
  277. package/dist/collection/components/co-row/co-row.js +2 -2
  278. package/dist/collection/components/co-segmented-bar/co-segmented-bar.js +1 -1
  279. package/dist/collection/components/co-select/co-select.js +1 -1
  280. package/dist/collection/components/co-separator/co-separator.js +1 -1
  281. package/dist/collection/components/co-sidebar/co-sidebar.js +2 -2
  282. package/dist/collection/components/co-sidebar-nav/co-sidebar-nav.css +2 -2
  283. package/dist/collection/components/co-sidebar-nav/co-sidebar-nav.js +1 -1
  284. package/dist/collection/components/co-skeleton/co-skeleton.css +18 -0
  285. package/dist/collection/components/co-skeleton/co-skeleton.js +83 -1
  286. package/dist/collection/components/co-slider/co-slider.js +2 -2
  287. package/dist/collection/components/co-switch/co-switch.css +3 -3
  288. package/dist/collection/components/co-switch/co-switch.js +3 -3
  289. package/dist/collection/components/co-tab/co-tab.js +2 -2
  290. package/dist/collection/components/co-tab-group/co-tab-group.js +2 -2
  291. package/dist/collection/components/co-tags-field/co-tags-field.js +5 -5
  292. package/dist/collection/components/co-textarea/co-textarea.js +4 -4
  293. package/dist/collection/components/co-time-field/co-time-field.css +111 -0
  294. package/dist/collection/components/co-time-field/co-time-field.js +536 -0
  295. package/dist/collection/components/co-toast/co-toast.css +13 -7
  296. package/dist/collection/components/co-toast/co-toast.js +2 -2
  297. package/dist/collection/components/co-toggle-button/co-toggle-button.css +16 -11
  298. package/dist/collection/components/co-toggle-button/co-toggle-button.js +2 -2
  299. package/dist/collection/components/co-toggle-button-group/co-toggle-button-group.css +7 -1
  300. package/dist/collection/components/co-toggle-button-group/co-toggle-button-group.js +2 -2
  301. package/dist/collection/components/co-tooltip/co-tooltip.css +12 -1
  302. package/dist/collection/components/co-tooltip/co-tooltip.js +49 -16
  303. package/dist/collection/components/co-transfer-list/co-transfer-list.js +1 -1
  304. package/dist/collection/components/co-video/co-video.js +34 -9
  305. package/dist/collection/utils/amountText.js +95 -0
  306. package/dist/collection/utils/color.js +109 -3
  307. package/dist/collection/utils/colorPickerI18n.js +55 -0
  308. package/dist/collection/utils/dateI18n.js +36 -0
  309. package/dist/collection/utils/fileI18n.js +3 -0
  310. package/dist/collection/utils/positioning.js +37 -4
  311. package/dist/collection/utils/submenu.js +35 -0
  312. package/dist/components/co-accordion.js +1 -1
  313. package/dist/components/co-action-bar.js +1 -1
  314. package/dist/components/co-app-shell.js +1 -1
  315. package/dist/components/co-audio-player.js +1 -1
  316. package/dist/components/co-autocomplete.js +1 -1
  317. package/dist/components/co-avatar-group.js +1 -1
  318. package/dist/components/co-avatar.js +1 -1
  319. package/dist/components/co-badge.js +1 -1
  320. package/dist/components/co-breadcrumb-item.js +1 -1
  321. package/dist/components/co-breadcrumb.js +1 -1
  322. package/dist/components/co-button.js +1 -1
  323. package/dist/components/co-calendar-month.js +1 -1
  324. package/dist/components/co-calendar-timegrid.js +1 -1
  325. package/dist/components/co-calendar.js +1 -1
  326. package/dist/components/co-carousel.js +1 -1
  327. package/dist/components/co-checkbox-group.js +1 -1
  328. package/dist/components/co-checkbox.js +1 -1
  329. package/dist/components/co-chip.js +1 -1
  330. package/dist/components/co-color-picker.js +1 -1
  331. package/dist/components/co-column-picker.js +1 -1
  332. package/dist/components/co-combobox.js +1 -1
  333. package/dist/components/co-command-search.js +1 -1
  334. package/dist/components/co-data-table-pagination.js +1 -1
  335. package/dist/components/co-data-table.js +1 -1
  336. package/dist/components/co-date-field.js +1 -1
  337. package/dist/components/co-date-picker.js +1 -1
  338. package/dist/components/co-date-range-picker.js +1 -1
  339. package/dist/components/co-date-range.js +1 -1
  340. package/dist/components/co-date-time-picker.js +1 -1
  341. package/dist/components/co-drawer.js +1 -1
  342. package/dist/components/co-drive-card.js +1 -1
  343. package/dist/components/co-drop-zone.js +1 -1
  344. package/dist/components/co-emoji-picker.js +1 -1
  345. package/dist/components/co-empty-state.js +1 -1
  346. package/dist/components/co-event-calendar.js +1 -1
  347. package/dist/components/co-event-popover.js +1 -1
  348. package/dist/components/co-fab.js +1 -1
  349. package/dist/components/co-file-field.js +1 -1
  350. package/dist/components/co-file-type-tile.js +1 -1
  351. package/dist/components/co-helper-text.js +1 -1
  352. package/dist/components/co-icon-button.js +1 -1
  353. package/dist/components/co-icon.js +1 -1
  354. package/dist/components/co-input.js +1 -1
  355. package/dist/components/co-json-field.js +1 -1
  356. package/dist/components/co-lightbox.js +1 -1
  357. package/dist/components/co-list-footer.js +1 -1
  358. package/dist/components/co-list-item.js +1 -1
  359. package/dist/components/co-media-thumb.js +1 -1
  360. package/dist/components/co-menu-divider.js +1 -1
  361. package/dist/components/co-menu-item.js +1 -1
  362. package/dist/components/co-menu.js +1 -1
  363. package/dist/components/co-modal.js +1 -1
  364. package/dist/components/co-navbar.js +1 -1
  365. package/dist/components/co-number-field.js +1 -1
  366. package/dist/components/co-option-list.js +1 -1
  367. package/dist/components/co-overlay.js +1 -1
  368. package/dist/components/co-page-header.js +1 -1
  369. package/dist/components/co-phone-field.js +1 -1
  370. package/dist/components/co-popover.js +1 -1
  371. package/dist/components/co-progress-bar.js +1 -1
  372. package/dist/components/co-progress-circle.js +1 -1
  373. package/dist/components/co-radio-group.js +1 -1
  374. package/dist/components/co-radio.js +1 -1
  375. package/dist/components/co-rating.js +1 -1
  376. package/dist/components/co-ref-field.js +1 -1
  377. package/dist/components/co-rich-text-editor.js +1 -1
  378. package/dist/components/co-rich-text-toolbar.js +1 -1
  379. package/dist/components/co-rich-text-viewer.js +1 -1
  380. package/dist/components/co-row.js +1 -1
  381. package/dist/components/co-select.js +1 -1
  382. package/dist/components/co-separator.js +1 -1
  383. package/dist/components/co-sidebar-nav.js +1 -1
  384. package/dist/components/co-sidebar.js +1 -1
  385. package/dist/components/co-skeleton.js +1 -1
  386. package/dist/components/co-slider.js +1 -1
  387. package/dist/components/co-switch.js +1 -1
  388. package/dist/components/co-tab-group.js +1 -1
  389. package/dist/components/co-tab.js +1 -1
  390. package/dist/components/co-tags-field.js +1 -1
  391. package/dist/components/co-textarea.js +1 -1
  392. package/dist/components/co-time-field.d.ts +11 -0
  393. package/dist/components/co-time-field.js +1 -0
  394. package/dist/components/co-toast.js +1 -1
  395. package/dist/components/co-toggle-button-group.js +1 -1
  396. package/dist/components/co-toggle-button.js +1 -1
  397. package/dist/components/co-tooltip.js +1 -1
  398. package/dist/components/co-transfer-list.js +1 -1
  399. package/dist/components/co-video.js +1 -1
  400. package/dist/components/index.js +1 -1
  401. package/dist/components/p-9ceBPSd1.js +1 -0
  402. package/dist/components/p-B1QFLcY9.js +1 -0
  403. package/dist/components/p-B2IsXte7.js +1 -0
  404. package/dist/components/p-B4NCaKrR.js +1 -0
  405. package/dist/components/p-BBP5__CY.js +1 -0
  406. package/dist/components/{p-Dabi98BI.js → p-BGDqldEg.js} +1 -1
  407. package/dist/components/p-BRbgGqLw.js +1 -0
  408. package/dist/components/p-Be_kyNRE.js +1 -0
  409. package/dist/components/{p-BL0sCfMH.js → p-Bryf3-Js.js} +1 -1
  410. package/dist/components/p-BsTO1uUA.js +1 -0
  411. package/dist/components/{p-CuZXTvDM.js → p-Bv6U5y3d.js} +1 -1
  412. package/dist/components/p-BxP8OBw6.js +1 -0
  413. package/dist/components/{p-P8wvwhM2.js → p-CFFDmGPS.js} +1 -1
  414. package/dist/components/{p-CA_JAK9s.js → p-CT2enQ6h.js} +1 -1
  415. package/dist/components/p-CXPRaTuo.js +1 -0
  416. package/dist/components/{p-D5EdMieb.js → p-Cl3AdEQJ.js} +1 -1
  417. package/dist/components/p-CnX3L8aF.js +1 -0
  418. package/dist/components/p-DFHRS9cJ.js +1 -0
  419. package/dist/components/p-DIo66nBr.js +1 -0
  420. package/dist/components/{p-Dj1EZ5qD.js → p-DNJAIVfI.js} +1 -1
  421. package/dist/{cobalt/p-WeuPA9Rw.js → components/p-DOL2zACE.js} +1 -1
  422. package/dist/components/p-DRP8D9ro.js +1 -0
  423. package/dist/components/p-DkDTmHCg.js +1 -0
  424. package/dist/components/{p-Bxk96Zgc.js → p-Du_CgT5E.js} +1 -1
  425. package/dist/components/{p-BHYtxTzM.js → p-HxVRXXXC.js} +1 -1
  426. package/dist/components/{p-B0Dc-I_C.js → p-NNxjElcX.js} +1 -1
  427. package/dist/components/p-gKnOhsd2.js +1 -0
  428. package/dist/components/p-jYd9gu_c.js +1 -0
  429. package/dist/components/{p-D4qzGifz.js → p-vby0ITbe.js} +1 -1
  430. package/dist/components/{p-D6OUW6oW.js → p-x4grh-eZ.js} +1 -1
  431. package/dist/esm/co-accordion.entry.js +1 -1
  432. package/dist/esm/co-action-bar.entry.js +1 -1
  433. package/dist/esm/co-app-shell.entry.js +4 -4
  434. package/dist/esm/co-audio-player.entry.js +1 -1
  435. package/dist/esm/co-autocomplete.entry.js +2 -2
  436. package/dist/esm/co-avatar-group.entry.js +1 -1
  437. package/dist/esm/co-avatar_2.entry.js +49 -17
  438. package/dist/esm/co-badge.entry.js +11 -3
  439. package/dist/esm/co-bottom-sheet.entry.js +1 -1
  440. package/dist/esm/co-breadcrumb-item.entry.js +1 -1
  441. package/dist/esm/co-breadcrumb.entry.js +1 -1
  442. package/dist/esm/co-button-group.entry.js +1 -1
  443. package/dist/esm/co-button.entry.js +2 -2
  444. package/dist/esm/co-calendar-month_2.entry.js +37 -2
  445. package/dist/esm/co-calendar_3.entry.js +27 -15
  446. package/dist/esm/co-card.entry.js +1 -1
  447. package/dist/esm/co-carousel-item.entry.js +1 -1
  448. package/dist/esm/co-carousel.entry.js +2 -2
  449. package/dist/esm/co-checkbox-group.entry.js +2 -2
  450. package/dist/esm/co-checkbox.entry.js +6 -6
  451. package/dist/esm/co-chip_2.entry.js +8 -5
  452. package/dist/esm/co-color-picker.entry.js +1048 -27
  453. package/dist/esm/co-column-picker.entry.js +3 -3
  454. package/dist/esm/co-combobox.entry.js +2 -2
  455. package/dist/esm/co-command-search.entry.js +1 -1
  456. package/dist/esm/co-data-table-pagination.entry.js +5 -5
  457. package/dist/esm/co-data-table.entry.js +1 -1
  458. package/dist/esm/co-date-picker.entry.js +3 -3
  459. package/dist/esm/co-date-range-picker.entry.js +3 -3
  460. package/dist/esm/co-date-range.entry.js +2 -2
  461. package/dist/esm/co-date-time-picker.entry.js +101 -130
  462. package/dist/esm/co-drive-card.entry.js +2 -2
  463. package/dist/esm/co-drop-zone.entry.js +2 -2
  464. package/dist/esm/co-emoji-picker.entry.js +4 -4
  465. package/dist/esm/co-empty-state.entry.js +4 -4
  466. package/dist/esm/co-event-calendar.entry.js +4 -4
  467. package/dist/esm/co-event-popover.entry.js +3 -3
  468. package/dist/esm/co-fab.entry.js +3 -3
  469. package/dist/esm/co-file-field.entry.js +95 -99
  470. package/dist/esm/co-file-type-tile.entry.js +3 -3
  471. package/dist/esm/co-helper-text.entry.js +3 -3
  472. package/dist/esm/co-icon-button.entry.js +6 -6
  473. package/dist/esm/co-icon.entry.js +3 -3
  474. package/dist/esm/co-input.entry.js +26 -4
  475. package/dist/esm/co-json-field.entry.js +5 -5
  476. package/dist/esm/co-lightbox.entry.js +204 -21
  477. package/dist/esm/co-list-footer.entry.js +2 -2
  478. package/dist/esm/co-list-item.entry.js +5 -5
  479. package/dist/esm/co-loader.entry.js +1 -1
  480. package/dist/esm/co-media-thumb.entry.js +3 -3
  481. package/dist/esm/co-menu-divider.entry.js +2 -2
  482. package/dist/esm/co-menu-item.entry.js +84 -3
  483. package/dist/esm/co-menu.entry.js +2 -2
  484. package/dist/esm/co-modal.entry.js +6 -4
  485. package/dist/esm/co-navbar.entry.js +4 -4
  486. package/dist/esm/co-number-field.entry.js +272 -9
  487. package/dist/esm/co-overlay.entry.js +6 -4
  488. package/dist/esm/co-page-header.entry.js +2 -2
  489. package/dist/esm/co-phone-field.entry.js +3 -3
  490. package/dist/esm/co-popover.entry.js +58 -21
  491. package/dist/esm/co-progress-bar.entry.js +3 -3
  492. package/dist/esm/co-progress-circle.entry.js +3 -3
  493. package/dist/esm/co-provider-logo_2.entry.js +47 -3
  494. package/dist/esm/co-radio-group.entry.js +1 -1
  495. package/dist/esm/co-radio.entry.js +4 -4
  496. package/dist/esm/co-rating.entry.js +4 -4
  497. package/dist/esm/co-ref-field.entry.js +4 -4
  498. package/dist/esm/co-rich-text-editor.entry.js +11 -8
  499. package/dist/esm/co-rich-text-toolbar.entry.js +7 -3
  500. package/dist/esm/co-rich-text-viewer.entry.js +4 -3
  501. package/dist/esm/co-row.entry.js +3 -3
  502. package/dist/esm/co-segmented-bar.entry.js +1 -1
  503. package/dist/esm/co-select.entry.js +2 -2
  504. package/dist/esm/co-separator.entry.js +2 -2
  505. package/dist/esm/co-sidebar-nav.entry.js +2 -2
  506. package/dist/esm/co-sidebar.entry.js +3 -3
  507. package/dist/esm/co-slider.entry.js +3 -3
  508. package/dist/esm/co-switch.entry.js +6 -6
  509. package/dist/esm/co-tab-group.entry.js +3 -3
  510. package/dist/esm/co-tab.entry.js +3 -3
  511. package/dist/esm/co-tags-field.entry.js +8 -8
  512. package/dist/esm/co-textarea.entry.js +6 -6
  513. package/dist/esm/co-time-field.entry.js +323 -0
  514. package/dist/esm/co-toast.entry.js +2 -2
  515. package/dist/esm/co-toggle-button-group.entry.js +4 -4
  516. package/dist/esm/co-toggle-button.entry.js +4 -4
  517. package/dist/esm/co-transfer-list.entry.js +1 -1
  518. package/dist/esm/co-video.entry.js +32 -7
  519. package/dist/esm/cobalt.js +3 -3
  520. package/dist/esm/color-BRbgGqLw.js +136 -0
  521. package/dist/esm/{dateI18n-CnNpoKwg.js → dateI18n-jYd9gu_c.js} +36 -0
  522. package/dist/esm/{fieldChip-DsAfq1e0.js → fieldChip-uyggU8VV.js} +1 -1
  523. package/dist/esm/fileI18n-gKnOhsd2.js +84 -0
  524. package/dist/esm/{index-RuXxdKzC.js → index-68iUQp5j.js} +28 -10
  525. package/dist/esm/{index-CrtiywTB.js → index-DH5lfRNj.js} +25 -21
  526. package/dist/esm/loader.js +3 -3
  527. package/dist/esm/{positioning-BMdapAL8.js → positioning-DFHRS9cJ.js} +32 -13
  528. package/dist/esm/{requiredMark-DCD-ZA51.js → requiredMark-BCJUuZvC.js} +1 -1
  529. package/dist/esm/{toolbar-config-WeuPA9Rw.js → toolbar-config-DOL2zACE.js} +10 -0
  530. package/dist/types/components/co-badge/co-badge.d.ts +7 -0
  531. package/dist/types/components/co-checkbox/co-checkbox.d.ts +1 -1
  532. package/dist/types/components/co-color-picker/co-color-picker.d.ts +358 -4
  533. package/dist/types/components/co-color-picker/presets.d.ts +107 -4
  534. package/dist/types/components/co-date-time-picker/co-date-time-picker.d.ts +43 -21
  535. package/dist/types/components/co-drawer/co-drawer.d.ts +4 -3
  536. package/dist/types/components/co-file-field/co-file-field.d.ts +14 -0
  537. package/dist/types/components/co-file-field/co-file-field.utils.d.ts +18 -1
  538. package/dist/types/components/co-icon-button/co-icon-button.d.ts +9 -0
  539. package/dist/types/components/co-input/co-input.d.ts +4 -0
  540. package/dist/types/components/co-lightbox/co-lightbox.d.ts +60 -4
  541. package/dist/types/components/co-menu-item/co-menu-item.d.ts +16 -0
  542. package/dist/types/components/co-number-field/co-number-field.d.ts +42 -1
  543. package/dist/types/components/co-option-list/co-option-list.d.ts +3 -0
  544. package/dist/types/components/co-overlay/co-overlay.d.ts +4 -2
  545. package/dist/types/components/co-popover/co-popover.d.ts +16 -0
  546. package/dist/types/components/co-rich-text-toolbar/co-rich-text-toolbar.d.ts +1 -1
  547. package/dist/types/components/co-skeleton/co-skeleton.d.ts +13 -0
  548. package/dist/types/components/co-time-field/co-time-field.d.ts +60 -0
  549. package/dist/types/components/co-tooltip/co-tooltip.d.ts +5 -0
  550. package/dist/types/components/co-video/co-video.d.ts +4 -0
  551. package/dist/types/components.d.ts +451 -87
  552. package/dist/types/utils/amountText.d.ts +34 -0
  553. package/dist/types/utils/color.d.ts +44 -1
  554. package/dist/types/utils/colorPickerI18n.d.ts +26 -0
  555. package/dist/types/utils/dateI18n.d.ts +12 -0
  556. package/dist/types/utils/fileI18n.d.ts +1 -0
  557. package/dist/types/utils/positioning.d.ts +10 -0
  558. package/dist/types/utils/submenu.d.ts +44 -0
  559. package/package.json +3 -3
  560. package/dist/cjs/color-YhUkm10t.js +0 -32
  561. package/dist/cjs/time-LBHtzLHe.js +0 -42
  562. package/dist/cobalt/p-07904986.entry.js +0 -1
  563. package/dist/cobalt/p-09799193.entry.js +0 -1
  564. package/dist/cobalt/p-17ae943c.entry.js +0 -1
  565. package/dist/cobalt/p-23a103a0.entry.js +0 -1
  566. package/dist/cobalt/p-2f88d151.entry.js +0 -1
  567. package/dist/cobalt/p-3495fda1.entry.js +0 -1
  568. package/dist/cobalt/p-409f28bb.entry.js +0 -1
  569. package/dist/cobalt/p-682b3313.entry.js +0 -1
  570. package/dist/cobalt/p-6bf814f9.entry.js +0 -1
  571. package/dist/cobalt/p-7532c739.entry.js +0 -1
  572. package/dist/cobalt/p-7c88163e.entry.js +0 -1
  573. package/dist/cobalt/p-7cf4b4ae.entry.js +0 -1
  574. package/dist/cobalt/p-7ea87b75.entry.js +0 -1
  575. package/dist/cobalt/p-8183f56f.entry.js +0 -1
  576. package/dist/cobalt/p-8345b25f.entry.js +0 -1
  577. package/dist/cobalt/p-983af614.entry.js +0 -1
  578. package/dist/cobalt/p-BG4WRR22.js +0 -1
  579. package/dist/cobalt/p-BMdapAL8.js +0 -1
  580. package/dist/cobalt/p-CF8OB_TM.js +0 -1
  581. package/dist/cobalt/p-CnNpoKwg.js +0 -1
  582. package/dist/cobalt/p-T4la7ly_.js +0 -1
  583. package/dist/cobalt/p-a2d31248.entry.js +0 -1
  584. package/dist/cobalt/p-a6b5cadd.entry.js +0 -1
  585. package/dist/cobalt/p-b8581787.entry.js +0 -1
  586. package/dist/cobalt/p-bcedbd73.entry.js +0 -1
  587. package/dist/cobalt/p-d40a465f.entry.js +0 -1
  588. package/dist/cobalt/p-dea43204.entry.js +0 -1
  589. package/dist/cobalt/p-dfcf667d.entry.js +0 -1
  590. package/dist/cobalt/p-e6882ddd.entry.js +0 -1
  591. package/dist/cobalt/p-e84eda2e.entry.js +0 -1
  592. package/dist/cobalt/p-f25967fb.entry.js +0 -1
  593. package/dist/cobalt/p-f5f1b463.entry.js +0 -1
  594. package/dist/cobalt/p-fd39f410.entry.js +0 -1
  595. package/dist/cobalt/p-mAGnZXRn.js +0 -1
  596. package/dist/components/p-BMdapAL8.js +0 -1
  597. package/dist/components/p-BTQEg3UO.js +0 -1
  598. package/dist/components/p-Bbny3WUc.js +0 -1
  599. package/dist/components/p-Bz0QZqnB.js +0 -1
  600. package/dist/components/p-CF8OB_TM.js +0 -1
  601. package/dist/components/p-CR0izsJC.js +0 -1
  602. package/dist/components/p-CnNpoKwg.js +0 -1
  603. package/dist/components/p-DI1ek0EB.js +0 -1
  604. package/dist/components/p-DP0bbhfN.js +0 -1
  605. package/dist/components/p-D_9BRkj6.js +0 -1
  606. package/dist/components/p-DbipMAyT.js +0 -1
  607. package/dist/components/p-DgUBcJIS.js +0 -1
  608. package/dist/components/p-DolCkNsL.js +0 -1
  609. package/dist/components/p-hfGFsvaD.js +0 -1
  610. package/dist/esm/color-BG4WRR22.js +0 -30
  611. package/dist/esm/time-CF8OB_TM.js +0 -37
@@ -26,6 +26,8 @@ export class CoIconButton {
26
26
  this.disabled = false;
27
27
  /** Accessible label */
28
28
  this.label = '';
29
+ /** Swap state: false → `icon`, true → `toggleIcon`. */
30
+ this.toggled = false;
29
31
  /** Icon weight */
30
32
  this.iconWeight = 'regular';
31
33
  }
@@ -44,16 +46,14 @@ export class CoIconButton {
44
46
  : 'var(--co-border-radius-full)',
45
47
  }
46
48
  : undefined;
47
- return (h("button", { key: 'f562372b80c9bc181be338a2a8572ea5ba7071a8', class: {
49
+ return (h("button", { key: '0dc2858366d546995a30d0dac2ed6db5d80943c9', class: {
48
50
  'co-icon-button': true,
49
51
  [`co-icon-button--${this.variant}`]: true,
50
52
  [`co-icon-button--${this.shape}`]: true,
51
53
  [`co-icon-button--${this.size}`]: true,
52
54
  'co-icon-button--dark': this.surface === 'dark',
53
55
  'co-icon-button--disabled': this.disabled,
54
- }, style: boxStyle, disabled: this.disabled, "aria-label": this.label || this.icon, part: "button" }, this.icon
55
- ? h("co-icon", { name: this.icon, weight: this.iconWeight, size: resolvedIconSize })
56
- : null));
56
+ }, style: boxStyle, disabled: this.disabled, "aria-label": this.label || (this.toggled && this.toggleIcon ? this.toggleIcon : this.icon), part: "button" }, this.icon && this.toggleIcon ? (h("span", { class: { 'co-icon-button__swap': true, 'co-icon-button__swap--toggled': this.toggled }, "aria-hidden": "true" }, h("co-icon", { name: this.icon, weight: this.iconWeight, size: resolvedIconSize }), h("co-icon", { name: this.toggleIcon, weight: this.iconWeight, size: resolvedIconSize }))) : this.icon ? (h("co-icon", { name: this.icon, weight: this.iconWeight, size: resolvedIconSize })) : null));
57
57
  }
58
58
  static get is() { return "co-icon-button"; }
59
59
  static get encapsulation() { return "shadow"; }
@@ -246,6 +246,45 @@ export class CoIconButton {
246
246
  "reflect": false,
247
247
  "attribute": "icon"
248
248
  },
249
+ "toggleIcon": {
250
+ "type": "string",
251
+ "mutable": false,
252
+ "complexType": {
253
+ "original": "string",
254
+ "resolved": "string | undefined",
255
+ "references": {}
256
+ },
257
+ "required": false,
258
+ "optional": true,
259
+ "docs": {
260
+ "tags": [],
261
+ "text": "Second icon of the swap (play/pause, hamburger/x). With it set, `toggled`\npicks which one shows. \u26A0\uFE0F The swap's crossfade drops the icon name as the\naccessible name source \u2014 with `toggleIcon` set, the consumer MUST pass\n`label` explicitly (the icon alone no longer describes the state)."
262
+ },
263
+ "getter": false,
264
+ "setter": false,
265
+ "reflect": false,
266
+ "attribute": "toggle-icon"
267
+ },
268
+ "toggled": {
269
+ "type": "boolean",
270
+ "mutable": false,
271
+ "complexType": {
272
+ "original": "boolean",
273
+ "resolved": "boolean",
274
+ "references": {}
275
+ },
276
+ "required": false,
277
+ "optional": false,
278
+ "docs": {
279
+ "tags": [],
280
+ "text": "Swap state: false \u2192 `icon`, true \u2192 `toggleIcon`."
281
+ },
282
+ "getter": false,
283
+ "setter": false,
284
+ "reflect": false,
285
+ "attribute": "toggled",
286
+ "defaultValue": "false"
287
+ },
249
288
  "iconWeight": {
250
289
  "type": "string",
251
290
  "mutable": false,
@@ -365,6 +365,39 @@
365
365
  color: var(--co-semantic-status-error);
366
366
  }
367
367
 
368
+ /* Shake de validación (receta tdev): keyframe multi-segmento con easing POR STOP.
369
+ Stops = duraciones acumuladas de cada tramo (80/80/60/60ms de 280ms totales
370
+ → 28.57/57.14/78.57/100%). La duración va tokenizada (guard); los easings
371
+ por stop usan var(--co-motion-ease-out) (resuelve igual dentro de @keyframes
372
+ en propiedades no-custom) y los px no entran al scanner del guard.
373
+ Reduced-motion: el zeroing global de --co-motion-duration-* la deja en un
374
+ frame, sin guard propio. */
375
+ .co-input--shake .co-input__field {
376
+ animation: co-input-shake calc(var(--co-motion-duration-instant) * 3.5) var(--co-motion-ease-out) both;
377
+ }
378
+
379
+ @keyframes co-input-shake {
380
+ 0% {
381
+ transform: translateX(0);
382
+ animation-timing-function: var(--co-motion-ease-out);
383
+ }
384
+ 28.57% {
385
+ transform: translateX(-6px);
386
+ animation-timing-function: var(--co-motion-ease-out);
387
+ }
388
+ 57.14% {
389
+ transform: translateX(6px);
390
+ animation-timing-function: var(--co-motion-ease-out);
391
+ }
392
+ 78.57% {
393
+ transform: translateX(-4px);
394
+ animation-timing-function: var(--co-motion-ease-out);
395
+ }
396
+ 100% {
397
+ transform: translateX(0);
398
+ }
399
+ }
400
+
368
401
  /* Success */
369
402
  .co-input--success .co-input__field {
370
403
  border-color: var(--co-semantic-status-success);
@@ -52,6 +52,8 @@ export class CoInput {
52
52
  * IDENTICALLY to the standard text field. */
53
53
  this.fill = false;
54
54
  this.hasFocus = false;
55
+ /** Sacudida en curso — se limpia en el animationend del keyframe para poder re-disparar. */
56
+ this.shaking = false;
55
57
  this.handleInput = (e) => {
56
58
  const target = e.target;
57
59
  this.value = target.value;
@@ -85,6 +87,10 @@ export class CoInput {
85
87
  this.handleAction = () => {
86
88
  this.coAction.emit();
87
89
  };
90
+ this.handleShakeEnd = (e) => {
91
+ if (e.animationName === 'co-input-shake')
92
+ this.shaking = false;
93
+ };
88
94
  }
89
95
  /**
90
96
  * Refleja en el <input> los cambios de `value` que vienen de AFUERA (host que
@@ -101,6 +107,18 @@ export class CoInput {
101
107
  if (this.inputEl.value !== v)
102
108
  this.inputEl.value = v;
103
109
  }
110
+ onStatusChange(newVal, oldVal) {
111
+ if (newVal === 'error' && oldVal !== 'error') {
112
+ this.shaking = true;
113
+ }
114
+ else if (newVal !== 'error') {
115
+ // Si el animationend nunca llega (nodo oculto/desmontado a mitad de la
116
+ // sacudida), `shaking` quedaría true para siempre y el input no volvería
117
+ // a sacudir en el próximo error. Salir de 'error' por cualquier otra vía
118
+ // (éxito, limpio) también corta la sacudida en curso.
119
+ this.shaking = false;
120
+ }
121
+ }
104
122
  /** Programmatically focus the inner input (post-hydration safe). */
105
123
  async setFocus() {
106
124
  var _a;
@@ -168,7 +186,8 @@ export class CoInput {
168
186
  [`co-input--${this.status}`]: this.status !== 'default',
169
187
  'co-input--has-action': this.hasAction,
170
188
  'co-input--flat': this.variant === 'flat',
171
- }, part: "wrapper" }, (this.label || this.secondaryLabel) && (h("div", { class: "co-input__labels" }, this.label && h("label", { class: "co-input__label", part: "label" }, this.label, h(RequiredMark, { required: this.required })), this.secondaryLabel && (h("span", { class: "co-input__secondary-label", part: "secondary-label" }, this.secondaryLabel)))), h("div", { class: "co-input__field-row" }, h("div", { class: "co-input__field", part: "field" }, this.iconLeft && (h("co-icon", { name: this.iconLeft, size: 16, class: "co-input__icon co-input__icon--left" })), h("slot", { name: "chips" }), h("div", { class: "co-input__input-wrapper" }, h("input", { ref: (el) => (this.inputEl = el), class: "co-input__native", type: this.type, name: this.name, value: this.value, placeholder: this.placeholder, disabled: this.disabled, readOnly: this.readonly, required: this.required, autoComplete: this.autocomplete, onInput: this.handleInput, onChange: this.handleChange, onFocus: this.handleFocus, onBlur: this.handleBlur, onKeyDown: this.handleKeyDown, part: "input" })), this.clearable && (h("button", { class: {
189
+ 'co-input--shake': this.shaking,
190
+ }, part: "wrapper" }, (this.label || this.secondaryLabel) && (h("div", { class: "co-input__labels" }, this.label && h("label", { class: "co-input__label", part: "label" }, this.label, h(RequiredMark, { required: this.required })), this.secondaryLabel && (h("span", { class: "co-input__secondary-label", part: "secondary-label" }, this.secondaryLabel)))), h("div", { class: "co-input__field-row" }, h("div", { class: "co-input__field", part: "field", onAnimationEnd: this.handleShakeEnd }, this.iconLeft && (h("co-icon", { name: this.iconLeft, size: 16, class: "co-input__icon co-input__icon--left" })), h("slot", { name: "chips" }), h("div", { class: "co-input__input-wrapper" }, h("input", { ref: (el) => (this.inputEl = el), class: "co-input__native", type: this.type, name: this.name, value: this.value, placeholder: this.placeholder, disabled: this.disabled, readOnly: this.readonly, required: this.required, autoComplete: this.autocomplete, onInput: this.handleInput, onChange: this.handleChange, onFocus: this.handleFocus, onBlur: this.handleBlur, onKeyDown: this.handleKeyDown, part: "input" })), this.clearable && (h("button", { class: {
172
191
  'co-input__clear': true,
173
192
  'co-input__clear--hidden': !showClear,
174
193
  }, type: "button", tabIndex: -1, onClick: this.handleClear, "aria-label": "Clear input", part: "clear" }, h("co-icon", { name: "x-circle", size: 16, weight: "fill" }))), this.iconRight && (h("co-icon", { name: this.iconRight, size: 16, class: "co-input__icon co-input__icon--right" })), this.statusFieldIcon && (h("co-icon", { name: this.statusFieldIcon, size: 16, class: "co-input__status-icon" })), h("slot", { name: "suffix" }), h("slot", null), h("slot", { name: "action" })), this.hasAction && (h("button", { class: "co-input__action", type: "button", onClick: this.handleAction, disabled: this.disabled, part: "action" }, this.actionIcon && (h("co-icon", { name: this.actionIcon, size: 16, class: "co-input__action-icon" })), this.actionLabel && (h("span", { class: "co-input__action-label" }, this.actionLabel))))), this.helperText && (h("div", { class: `co-input__helper co-input__helper--${this.status}`, part: "helper" }, this.helperIcon && (h("co-icon", { name: this.helperIcon, size: 14, class: "co-input__helper-icon" })), h("span", { class: "co-input__helper-text" }, this.helperText)))));
@@ -622,7 +641,8 @@ export class CoInput {
622
641
  }
623
642
  static get states() {
624
643
  return {
625
- "hasFocus": {}
644
+ "hasFocus": {},
645
+ "shaking": {}
626
646
  };
627
647
  }
628
648
  static get events() {
@@ -744,6 +764,9 @@ export class CoInput {
744
764
  return [{
745
765
  "propName": "value",
746
766
  "methodName": "onValueChange"
767
+ }, {
768
+ "propName": "status",
769
+ "methodName": "onStatusChange"
747
770
  }];
748
771
  }
749
772
  }
@@ -97,17 +97,17 @@ export class CoJsonField {
97
97
  render() {
98
98
  const helper = this.internalInvalid ? this.invalidMessage : this.helperText;
99
99
  const statusClass = this.status !== 'default' ? `co-json-field--${this.status}` : '';
100
- return (h("div", { key: '5b2311f320820573ac6f7fb501b1a566e1e640fb', class: {
100
+ return (h("div", { key: '6e303939542b1c400432876149a7f7cf94dbfad4', class: {
101
101
  'co-json-field': true,
102
102
  'co-json-field--disabled': this.disabled,
103
103
  'co-json-field--focused': this.hasFocus,
104
104
  'co-json-field--invalid': this.isInvalid,
105
105
  [`co-json-field--${this.size}`]: true,
106
106
  [statusClass]: !!statusClass,
107
- }, part: "wrapper" }, this.label && (h("div", { key: '98b624bc8d99515a83f19df185207ae696dcb943', class: "co-json-field__labels" }, h("label", { key: 'cfdccd9cedd268e5c8074b9f68c06618cf7d222d', class: "co-json-field__label", part: "label" }, this.label, h(RequiredMark, { key: 'eb659605e09458ba403de648c4d499f08e899e90', required: this.required })))), h("div", { key: '25cc5eb6b413f4d2f3e57154849adc2e91d23cea', class: "co-json-field__field", part: "field" }, h("textarea", { key: '5739bc7a9f45853d0c553bc03459028fb9225e1e', class: "co-json-field__native", rows: this.rows, spellcheck: false, autocomplete: "off", value: this.draft, placeholder: this.placeholder, disabled: this.disabled, readOnly: this.readonly, required: this.required, "aria-invalid": this.isInvalid ? 'true' : 'false', "aria-label": !this.label ? 'JSON' : undefined, onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, part: "input" })), this.name && h("input", { key: '2a49f930780920205b51403271c86e2a7d49908f', type: "hidden", name: this.name, value: this.draft }), helper && (h("div", { key: '3ffa24824f850162de4e3dbdf12535f35ccdb864', class: {
107
+ }, part: "wrapper" }, this.label && (h("div", { key: '77c4793e6755c159d70943be68d94dc9a8f6f82c', class: "co-json-field__labels" }, h("label", { key: 'fa060ddb64fea5a78f339cf10ff46b8bbc3f6c9c', class: "co-json-field__label", part: "label" }, this.label, h(RequiredMark, { key: 'fd130517bb57f0b5c012f39e61cd4ef905c34b42', required: this.required })))), h("div", { key: '752bccc5c2193a81ef174415b0e22936d1729914', class: "co-json-field__field", part: "field" }, h("textarea", { key: '397b3e80d4d252c55f55d9e6c444083f8ee2a28a', class: "co-json-field__native", rows: this.rows, spellcheck: false, autocomplete: "off", value: this.draft, placeholder: this.placeholder, disabled: this.disabled, readOnly: this.readonly, required: this.required, "aria-invalid": this.isInvalid ? 'true' : 'false', "aria-label": !this.label ? 'JSON' : undefined, onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, part: "input" })), this.name && h("input", { key: '8d658f97252824dce51a262c19e251b664de9c4e', type: "hidden", name: this.name, value: this.draft }), helper && (h("div", { key: '857a97a47b5a88b0a778680329670b474ff1eac1', class: {
108
108
  'co-json-field__helper': true,
109
109
  'co-json-field__helper--error': this.isInvalid,
110
- }, part: "helper" }, this.isInvalid && (h("co-icon", { key: 'f01083ead8818bdb50e0579f6805ab3c07d5829f', name: "warning-circle", size: 14, class: "co-json-field__helper-icon" })), h("span", { key: '02d8146ec67d84171bb21ce58838e4ef9cc6391c', class: "co-json-field__helper-text" }, helper)))));
110
+ }, part: "helper" }, this.isInvalid && (h("co-icon", { key: 'df90fefaedba9e8340b1fbfd19dd8350ab8e26af', name: "warning-circle", size: 14, class: "co-json-field__helper-icon" })), h("span", { key: '3ba614c007e38009f7cda47be0d705d63397359f', class: "co-json-field__helper-text" }, helper)))));
111
111
  }
112
112
  static get is() { return "co-json-field"; }
113
113
  static get encapsulation() { return "shadow"; }
@@ -119,6 +119,29 @@
119
119
  transition: transform var(--co-motion-duration-base) var(--co-motion-ease-out);
120
120
  }
121
121
 
122
+ /* A video slide is sized like the image: to the media, not to the stage. The
123
+ host stamps `--co-lb-ar` (intrinsic width/height) as soon as co-video reports
124
+ metadata; until then 16/9 stands in. Giving the box a DEFINITE height and
125
+ letting `aspect-ratio` derive the width is what keeps a portrait recording
126
+ from becoming a full-width black slab with the video stranded in the middle
127
+ — and keeps the scrim around it clickable. The three-way min() caps the
128
+ height by the viewport, by the available width, and by the 1200px ceiling.
129
+ co-video's `auto` aspect then stretches its container to this height, and
130
+ its inner <video> is object-fit: contain. */
131
+ .co-lightbox__video {
132
+ --co-lb-ar: 1.7778;
133
+ flex: 0 0 auto;
134
+ width: auto;
135
+ aspect-ratio: var(--co-lb-ar);
136
+ height: min(
137
+ calc(100vh - var(--co-spacing-5xl) * 2),
138
+ calc((100vw - var(--co-spacing-5xl) * 2) / var(--co-lb-ar)),
139
+ calc(1200px / var(--co-lb-ar))
140
+ );
141
+ border-radius: var(--co-border-radius-xs);
142
+ overflow: hidden;
143
+ }
144
+
122
145
  .co-lightbox__img--zoomed {
123
146
  cursor: grab;
124
147
  }
@@ -1,15 +1,20 @@
1
1
  import { h } from "@stencil/core";
2
+ import { langFromLocale } from "../../utils/dateI18n";
2
3
  import { getLightboxStrings } from "../../utils/lightboxI18n";
3
4
  const MIN_SCALE = 1;
4
5
  const MAX_SCALE = 8;
5
6
  const WHEEL_FACTOR = 1.15;
6
7
  const DBLCLICK_SCALE = 2.5;
7
8
  /**
8
- * Fullscreen image viewer — dark scrim, zoom (wheel / buttons / double-click,
9
+ * Fullscreen media viewer — dark scrim, zoom (wheel / buttons / double-click,
9
10
  * anchored at the cursor), drag-to-pan while zoomed, and prev/next carousel
10
- * when more than one image is provided. Keyboard: Escape closes, arrows
11
+ * when more than one item is provided. Keyboard: Escape closes, arrows
11
12
  * navigate, +/- zoom, 0 resets.
12
13
  *
14
+ * An item with `kind: 'video'` mounts a `co-video` instead of an `<img>`:
15
+ * zoom/pan make no sense over a seek bar, so they are disabled (and their
16
+ * toolbar cluster hidden) for as long as that slide is active.
17
+ *
13
18
  * Controlled like co-modal: the host owns `open` and reacts to `coClose`.
14
19
  *
15
20
  * CAVEAT: the root is `position: fixed`, so an ancestor with `transform`,
@@ -21,6 +26,7 @@ const DBLCLICK_SCALE = 2.5;
21
26
  * @part overlay - Fullscreen scrim container
22
27
  * @part toolbar - Top bar (caption + zoom controls + actions)
23
28
  * @part image - The active image element
29
+ * @part video - The co-video player on a video slide
24
30
  * @part prev - Previous-image arrow button
25
31
  * @part next - Next-image arrow button
26
32
  * @part counter - The "i / n" indicator
@@ -72,10 +78,32 @@ export class CoLightbox {
72
78
  this.handleKey = (e) => {
73
79
  if (!this.open)
74
80
  return;
81
+ if (e.key === 'Escape') {
82
+ // This Escape belongs to something else — the browser leaving fullscreen,
83
+ // or the player closing its speed menu. Either way the viewer must NOT
84
+ // close... and must still swallow the event: an ancestor co-drawer also
85
+ // listens for Escape on document, so merely returning here would close
86
+ // THAT instead, tearing down the drawer (and its unsaved edits) under a
87
+ // user who only wanted to leave fullscreen.
88
+ if (this.escapeBelongsToPlayer()) {
89
+ e.stopPropagation();
90
+ return;
91
+ }
92
+ this.requestClose();
93
+ e.preventDefault();
94
+ e.stopPropagation();
95
+ return;
96
+ }
97
+ if (e.key === 'Tab') {
98
+ this.trapTab(e);
99
+ return;
100
+ }
101
+ // While the player holds focus it owns the keyboard — space toggles play,
102
+ // arrows seek. Stealing those would leave the video keyboard-operable
103
+ // everywhere except when the user is actually inside it.
104
+ if (this.isFocusInPlayer())
105
+ return;
75
106
  switch (e.key) {
76
- case 'Escape':
77
- this.requestClose();
78
- break;
79
107
  case 'ArrowLeft':
80
108
  this.goTo(-1);
81
109
  break;
@@ -84,17 +112,20 @@ export class CoLightbox {
84
112
  break;
85
113
  case '+':
86
114
  case '=':
115
+ if (this.isVideoSlide)
116
+ return;
87
117
  this.zoomAt(this.scale * WHEEL_FACTOR, 0, 0);
88
118
  break;
89
119
  case '-':
120
+ if (this.isVideoSlide)
121
+ return;
90
122
  this.zoomAt(this.scale / WHEEL_FACTOR, 0, 0);
91
123
  break;
92
124
  case '0':
125
+ if (this.isVideoSlide)
126
+ return;
93
127
  this.resetView();
94
128
  break;
95
- case 'Tab':
96
- this.trapTab(e);
97
- return;
98
129
  default:
99
130
  return; // unhandled keys pass through untouched
100
131
  }
@@ -104,6 +135,27 @@ export class CoLightbox {
104
135
  this.requestClose = () => {
105
136
  this.coClose.emit();
106
137
  };
138
+ // ── Video slide ───────────────────────────────────────────────────
139
+ this.mountPlayer = (el) => {
140
+ if (!el || el === this.playerEl)
141
+ return;
142
+ this.playerEl = el;
143
+ this.tryAutoplay();
144
+ };
145
+ /**
146
+ * Ajusta la caja del slide al frame real. Sin esto el player es un rectángulo
147
+ * FIJO (ancho tope × alto tope) y el `object-fit: contain` deja franjas negras
148
+ * a los costados: en un vertical — el caso típico, una grabación de pantalla —
149
+ * la losa negra tapa media pantalla y se traga los clicks que el usuario dirige
150
+ * al scrim para cerrar.
151
+ */
152
+ this.handlePlayerReady = (e) => {
153
+ var _a;
154
+ const { width, height } = e.detail || {};
155
+ if (!width || !height)
156
+ return; // el navegador todavía no sabe el tamaño
157
+ (_a = this.playerEl) === null || _a === void 0 ? void 0 : _a.style.setProperty('--co-lb-ar', String(width / height));
158
+ };
107
159
  this.handleWheel = (e) => {
108
160
  e.preventDefault();
109
161
  const [px, py] = this.stagePoint(e);
@@ -144,6 +196,14 @@ export class CoLightbox {
144
196
  };
145
197
  this.stop = (e) => e.stopPropagation();
146
198
  }
199
+ get activeItem() {
200
+ return this.parsedImages[this.index];
201
+ }
202
+ /** Zoom, pan and the toolbar's zoom cluster are all gated on this. */
203
+ get isVideoSlide() {
204
+ var _a;
205
+ return ((_a = this.activeItem) === null || _a === void 0 ? void 0 : _a.kind) === 'video';
206
+ }
147
207
  get parsedImages() {
148
208
  const raw = this.images;
149
209
  if (typeof raw !== 'string' || !raw.trim())
@@ -165,6 +225,12 @@ export class CoLightbox {
165
225
  }
166
226
  componentWillLoad() {
167
227
  this.index = this.clampIndex(this.startIndex);
228
+ // Hosts that create the viewer imperatively flip `open` on the next frame,
229
+ // which lands BEFORE the lazy chunk hydrates — and Stencil skips @Watch
230
+ // callbacks fired before the instance exists, so `onOpenChange` never runs
231
+ // on that path (same reason connectedCallback re-checks `open` below).
232
+ // Seeding here is what makes a viewer opened straight onto a video play.
233
+ this.pendingAutoplay = this.open;
168
234
  }
169
235
  connectedCallback() {
170
236
  if (this.open)
@@ -172,6 +238,7 @@ export class CoLightbox {
172
238
  }
173
239
  disconnectedCallback() {
174
240
  this.detachKeyListener();
241
+ this.pauseVideo();
175
242
  clearTimeout(this.demoteTimer);
176
243
  }
177
244
  componentDidRender() {
@@ -189,12 +256,19 @@ export class CoLightbox {
189
256
  this.resetView();
190
257
  this.preloadNeighbors();
191
258
  this.attachKeyListener();
259
+ this.pendingAutoplay = true;
260
+ this.tryAutoplay();
192
261
  // aria-modal dialog: move focus in on open, restore it on close.
193
262
  this.previouslyFocused = (_a = document.activeElement) !== null && _a !== void 0 ? _a : undefined;
194
263
  this.pendingFocus = true;
195
264
  }
196
265
  else {
197
266
  this.detachKeyListener();
267
+ // The host fades the viewer out before dropping the node; a video left
268
+ // playing keeps its audio going through the whole fade (and beyond, if
269
+ // the node is detached rather than removed).
270
+ this.pauseVideo();
271
+ this.pendingAutoplay = false;
198
272
  (_c = (_b = this.previouslyFocused) === null || _b === void 0 ? void 0 : _b.focus) === null || _c === void 0 ? void 0 : _c.call(_b);
199
273
  this.previouslyFocused = undefined;
200
274
  }
@@ -219,18 +293,66 @@ export class CoLightbox {
219
293
  detachKeyListener() {
220
294
  window.removeEventListener('keydown', this.handleKey, { capture: true });
221
295
  }
222
- /** Minimal focus trap: Tab cycles through the viewer's own buttons. */
223
- trapTab(e) {
296
+ /**
297
+ * Minimal focus trap: Tab cycles through the viewer's own buttons — plus the
298
+ * player's, on a video slide. A shadow root is opaque to `querySelectorAll`,
299
+ * so co-video's controls have to be pulled in explicitly; without this the
300
+ * trap would cycle around the player and its play/seek would be unreachable
301
+ * by keyboard. (Safe because the viewer pins the controls visible: an
302
+ * auto-hidden control bar is `opacity: 0` and would take focus invisibly.)
303
+ */
304
+ focusables() {
305
+ var _a, _b;
306
+ const nodes = Array.from((_b = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('button, co-video')) !== null && _b !== void 0 ? _b : []);
307
+ return nodes.flatMap((el) => {
308
+ var _a, _b;
309
+ return el.tagName === 'CO-VIDEO'
310
+ ? // `button` alone is not enough: the seek bar and the volume slider are
311
+ // `role="slider"` divs, and the player's own keyboard shortcuts live on
312
+ // its `role="region"` container — all three are tabindex 0, and all
313
+ // three would be skipped by a button-only sweep.
314
+ // `:not([tabindex="-1"])` importa: co-video marca así su overlay de
315
+ // play grande, que se DESMONTA al activarse — enfocarlo tira el foco
316
+ // fuera del visor en el mismo gesto.
317
+ Array.from((_b = (_a = el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('button:not([tabindex="-1"]), [tabindex="0"]')) !== null && _b !== void 0 ? _b : [])
318
+ : [el];
319
+ });
320
+ }
321
+ /** Deepest focused element, walking down through nested shadow roots. */
322
+ deepActive() {
224
323
  var _a, _b, _c;
225
- const focusables = Array.from((_b = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('button')) !== null && _b !== void 0 ? _b : []);
324
+ let a = (_b = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.activeElement) !== null && _b !== void 0 ? _b : null;
325
+ while ((_c = a === null || a === void 0 ? void 0 : a.shadowRoot) === null || _c === void 0 ? void 0 : _c.activeElement)
326
+ a = a.shadowRoot.activeElement;
327
+ return a;
328
+ }
329
+ /** True while the player owns this Escape: it is fullscreen (co-video enters
330
+ * through the webkit-prefixed API where that is all Safari has, so both
331
+ * spellings are checked), or its speed menu is open on top of it. */
332
+ escapeBelongsToPlayer() {
333
+ var _a, _b;
334
+ const doc = document;
335
+ if (doc.fullscreenElement || doc.webkitFullscreenElement)
336
+ return true;
337
+ return !!((_b = (_a = this.playerEl) === null || _a === void 0 ? void 0 : _a.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('.co-video__speed-menu'));
338
+ }
339
+ isFocusInPlayer() {
340
+ var _a;
341
+ const player = this.playerEl;
342
+ return !!player && ((_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.activeElement) === player;
343
+ }
344
+ trapTab(e) {
345
+ const focusables = this.focusables();
226
346
  if (focusables.length === 0)
227
347
  return;
228
348
  e.preventDefault();
229
349
  e.stopPropagation();
230
- const active = (_c = this.el.shadowRoot) === null || _c === void 0 ? void 0 : _c.activeElement;
231
- const i = focusables.indexOf(active);
232
350
  const delta = e.shiftKey ? -1 : 1;
233
- const next = focusables[(i + delta + focusables.length) % focusables.length];
351
+ const i = focusables.indexOf(this.deepActive());
352
+ // Sin foco previo (i === -1) el módulo daría el ANTEÚLTIMO con Shift+Tab.
353
+ const next = i < 0
354
+ ? focusables[delta > 0 ? 0 : focusables.length - 1]
355
+ : focusables[(i + delta + focusables.length) % focusables.length];
234
356
  next.focus();
235
357
  }
236
358
  clampIndex(i) {
@@ -249,6 +371,9 @@ export class CoLightbox {
249
371
  const n = this.parsedImages.length;
250
372
  if (n < 2)
251
373
  return;
374
+ this.pauseVideo();
375
+ // From here on the user is driving: nothing plays unless they press play.
376
+ this.pendingAutoplay = false;
252
377
  this.index = (this.index + delta + n) % n;
253
378
  this.resetView();
254
379
  this.coChange.emit(this.index);
@@ -260,8 +385,65 @@ export class CoLightbox {
260
385
  return;
261
386
  for (const d of [1, -1]) {
262
387
  const neighbor = imgs[(this.index + d + imgs.length) % imgs.length];
263
- if (neighbor === null || neighbor === void 0 ? void 0 : neighbor.src)
264
- new Image().src = neighbor.src;
388
+ if (!neighbor)
389
+ continue;
390
+ // A video's `src` is the media: pushing it through `new Image()` would
391
+ // download the whole file only to fail at decode. Its poster is what
392
+ // the slide paints first, so that is what's worth having warm.
393
+ const src = neighbor.kind === 'video' ? neighbor.poster : neighbor.src;
394
+ if (src)
395
+ new Image().src = src;
396
+ }
397
+ }
398
+ /**
399
+ * Autoplay rides the click that opened the viewer instead of co-video's own
400
+ * `autoplay` prop, which only fires when muted — and a silent video reads as
401
+ * a broken one. If the browser refuses the unmuted start (Safari), the
402
+ * rejection is swallowed and the player simply waits on its play button.
403
+ *
404
+ * Called from BOTH sides of a race: the player mounts on the first render,
405
+ * which hosts do while still closed (co-file-field fades the viewer in on
406
+ * the next frame), so `open` usually arrives second — but a host that
407
+ * renders the viewer already open flips the order.
408
+ */
409
+ tryAutoplay() {
410
+ var _a;
411
+ if (!this.pendingAutoplay || !this.open)
412
+ return;
413
+ if (!this.isVideoSlide) {
414
+ // Opened onto an image: the chance is SPENT, not saved. Leaving the flag
415
+ // armed would make the first video the user arrows to start by itself.
416
+ this.pendingAutoplay = false;
417
+ return;
418
+ }
419
+ const player = this.playerEl;
420
+ if (!player)
421
+ return;
422
+ this.pendingAutoplay = false;
423
+ Promise.resolve((_a = player.componentOnReady) === null || _a === void 0 ? void 0 : _a.call(player))
424
+ .then(() => {
425
+ var _a;
426
+ // Revalidar: entre el click y el chunk lazy de co-video puede pasar
427
+ // cualquier cosa — el usuario cierra el visor o flecha a otro slide, y
428
+ // un play() a ciegas deja audio sonando sobre una pantalla que ya no
429
+ // muestra ese video (o que ya no muestra nada).
430
+ if (!this.open || this.playerEl !== player || !this.isVideoSlide)
431
+ return;
432
+ return (_a = player.play) === null || _a === void 0 ? void 0 : _a.call(player);
433
+ })
434
+ .catch(() => {
435
+ /* blocked by the autoplay policy — the play button takes over */
436
+ });
437
+ }
438
+ pauseVideo() {
439
+ var _a, _b;
440
+ try {
441
+ const p = (_b = (_a = this.playerEl) === null || _a === void 0 ? void 0 : _a.pause) === null || _b === void 0 ? void 0 : _b.call(_a);
442
+ if (p && typeof p.catch === 'function')
443
+ p.catch(() => { });
444
+ }
445
+ catch (_c) {
446
+ /* not hydrated yet — nothing is playing either */
265
447
  }
266
448
  }
267
449
  // ── Zoom / pan ────────────────────────────────────────────────
@@ -310,20 +492,27 @@ export class CoLightbox {
310
492
  const imgs = this.parsedImages;
311
493
  const img = imgs[this.index];
312
494
  const multi = imgs.length > 1;
495
+ const video = (img === null || img === void 0 ? void 0 : img.kind) === 'video';
313
496
  const counter = s.counter
314
497
  .replace('{i}', String(this.index + 1))
315
498
  .replace('{n}', String(imgs.length));
316
- return (h("div", { key: 'b3999d685ec6dc1c12bf430eba3bc0982b2fd4d3', class: { 'co-lightbox': true, 'co-lightbox--open': this.open }, part: "overlay", role: "dialog", "aria-modal": "true", "aria-label": img === null || img === void 0 ? void 0 : img.alt, popover: "manual", ref: this.syncTopLayer, onClick: this.requestClose }, img && (h("div", { key: '3c757d34339330ddc8179869771548d2e10eeb86', class: "co-lightbox__toolbar", part: "toolbar", onClick: this.stop }, h("span", { key: 'ea97b286b84225423f46de0241fb7ab5f86a615e', class: "co-lightbox__caption", title: img.alt }, img.alt), h("div", { key: '273f23d1c551f459ed2d2b7d2dbdccf43beba000', class: "co-lightbox__zoom" }, h("button", { key: '7af226c8ea17183f2555e9983627ecf29189ddb3', class: "co-lightbox__btn", type: "button", "aria-label": s.zoomOut, title: s.zoomOut, onClick: () => this.zoomAt(this.scale / WHEEL_FACTOR, 0, 0) }, h("co-icon", { key: '085ed06e6593b99e13cf36009149d9cf90524280', name: "minus", size: 16 })), h("button", { key: 'f4df42781faa209de6b8ebbcfdd58c9c605a7977', class: "co-lightbox__btn co-lightbox__zoom-value", type: "button", "aria-label": s.zoomReset, title: s.zoomReset, onClick: () => this.resetView() }, Math.round(this.scale * 100), "%"), h("button", { key: 'd1cbe7e831ff8b1f76927c87cc5929d5d29aae02', class: "co-lightbox__btn", type: "button", "aria-label": s.zoomIn, title: s.zoomIn, onClick: () => this.zoomAt(this.scale * WHEEL_FACTOR, 0, 0) }, h("co-icon", { key: 'e10fb035385e19dab132fffc4b8d962e720c379e', name: "plus", size: 16 }))), h("button", { key: 'f500ccfea7a04b5f47cf786579cd1d1f138cbbd9', class: "co-lightbox__btn", type: "button", "aria-label": s.openOriginal, title: s.openOriginal, onClick: this.openOriginal }, h("co-icon", { key: 'd9098c2bf45c888681b5982dea6d59b9a5e3d89d', name: "arrow-square-out", size: 16 })), h("button", { key: 'b61f45f9df568c4441cc764a88d74ba31debd16c', class: "co-lightbox__btn", part: "close", type: "button", "aria-label": s.close, title: s.close, ref: (el) => (this.closeBtnEl = el), onClick: this.requestClose }, h("co-icon", { key: '787d1be07f3befb406beddbb7853d1f604fbfa30', name: "x", size: 16 })))), img && (h("div", { key: 'd4e4dcab4f5b34cfade28927cb484eb0fade7c6c', class: "co-lightbox__stage", ref: (el) => (this.stageEl = el), onWheel: this.handleWheel }, h("img", { key: '06ce0ba917e7007da67a5db9372457286d33d84c', class: {
499
+ return (h("div", { key: '1a3c29e98fd491c92b82ba9d9296588609cdd006', class: { 'co-lightbox': true, 'co-lightbox--open': this.open }, part: "overlay", role: "dialog", "aria-modal": "true", "aria-label": img === null || img === void 0 ? void 0 : img.alt, popover: "manual", ref: this.syncTopLayer, onClick: this.requestClose }, img && (h("div", { key: 'cc9e9db83ef082deab744f259c4da63a58eb0c3b', class: "co-lightbox__toolbar", part: "toolbar", onClick: this.stop }, h("span", { key: 'ab3fa42e21008407f2cab377566a1793a96a8a50', class: "co-lightbox__caption", title: img.alt }, img.alt), !video && (h("div", { key: 'af8761111e7c5e0e7a838d8e69971cc2863ee9d4', class: "co-lightbox__zoom" }, h("button", { key: 'e73628b4fd25fa7c3ed9ca947fccd196e6433f84', class: "co-lightbox__btn", type: "button", "aria-label": s.zoomOut, title: s.zoomOut, onClick: () => this.zoomAt(this.scale / WHEEL_FACTOR, 0, 0) }, h("co-icon", { key: '371f4edc5141561b348ce36a8791fb81500248fa', name: "minus", size: 16 })), h("button", { key: 'e07adc772687ef65d97db5669ed235749e43c034', class: "co-lightbox__btn co-lightbox__zoom-value", type: "button", "aria-label": s.zoomReset, title: s.zoomReset, onClick: () => this.resetView() }, Math.round(this.scale * 100), "%"), h("button", { key: '29ed305a4f464e38c4b4ef331dbbfc35aa6fdc95', class: "co-lightbox__btn", type: "button", "aria-label": s.zoomIn, title: s.zoomIn, onClick: () => this.zoomAt(this.scale * WHEEL_FACTOR, 0, 0) }, h("co-icon", { key: '6b56559a4dad36bee62545deb426734450f64f58', name: "plus", size: 16 })))), h("button", { key: '53099c4e3dec82cfc9087e89916154ef4a8845f6', class: "co-lightbox__btn", type: "button", "aria-label": s.openOriginal, title: s.openOriginal, onClick: this.openOriginal }, h("co-icon", { key: 'de160ed313ba0559cd1523f9f73fad7e3b167848', name: "arrow-square-out", size: 16 })), h("button", { key: 'd1658ff7b8d0fc22f1a489c0138a16077304a165', class: "co-lightbox__btn", part: "close", type: "button", "aria-label": s.close, title: s.close, ref: (el) => (this.closeBtnEl = el), onClick: this.requestClose }, h("co-icon", { key: 'fcbcbbf6001e67199b6ec7b99bde5f9f24537ca0', name: "x", size: 16 })))), img && (h("div", { key: '39cef6c2bd1bf3fe9f641778b48b618a62f1b5f8', class: "co-lightbox__stage", ref: (el) => (this.stageEl = el), onWheel: video ? undefined : this.handleWheel }, video ? (h("co-video", { class: "co-lightbox__video", part: "video",
500
+ /* Keyed per slide: a fresh player is the only way to be sure
501
+ poster, error state and playback all start clean. */
502
+ key: `video-${this.index}`, ref: this.mountPlayer, src: img.src, poster: img.poster || '', aspectRatio: "auto", rounded: "none",
503
+ /* Auto-hiding controls go `opacity: 0` while staying
504
+ focusable — invisible focus in a viewer that traps Tab. */
505
+ controlsAutoHide: false, showSpeed: true, showPip: true, locale: langFromLocale(this.locale), onCoReady: this.handlePlayerReady, onClick: this.stop })) : (h("img", { class: {
317
506
  'co-lightbox__img': true,
318
507
  'co-lightbox__img--zoomed': this.scale > MIN_SCALE,
319
508
  'co-lightbox__img--dragging': this.dragging,
320
- }, part: "image", ref: (el) => (this.imgEl = el), src: img.src, alt: img.alt || '', draggable: false, 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 }))), img && multi && (h("button", { key: 'c0af13776f424508ef953c40efe203e8a9f0ffab', class: "co-lightbox__nav co-lightbox__nav--prev", part: "prev", type: "button", "aria-label": s.prevImage, title: s.prevImage, onClick: (e) => {
509
+ }, part: "image", ref: (el) => (this.imgEl = el), src: img.src, alt: img.alt || '', draggable: false, 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 })))), img && multi && (h("button", { key: 'a161402e30021374f608755ea0a5dc6ccee0e99a', class: "co-lightbox__nav co-lightbox__nav--prev", part: "prev", type: "button", "aria-label": s.prevImage, title: s.prevImage, onClick: (e) => {
321
510
  e.stopPropagation();
322
511
  this.goTo(-1);
323
- } }, h("co-icon", { key: '17cb67246511c6a83a06ce594060be52c9f46cd0', name: "caret-left", size: 24 }))), img && multi && (h("button", { key: 'b2e8ab1029b75ef8db09c7141bf035e3aa67d156', class: "co-lightbox__nav co-lightbox__nav--next", part: "next", type: "button", "aria-label": s.nextImage, title: s.nextImage, onClick: (e) => {
512
+ } }, h("co-icon", { key: '649171d5330299b3ccb368bb0b434c643157c3f5', name: "caret-left", size: 24 }))), img && multi && (h("button", { key: '5cc5d07467e1ecf9c27094947ce421c28c35472d', class: "co-lightbox__nav co-lightbox__nav--next", part: "next", type: "button", "aria-label": s.nextImage, title: s.nextImage, onClick: (e) => {
324
513
  e.stopPropagation();
325
514
  this.goTo(1);
326
- } }, h("co-icon", { key: '1ab70f0b03bb640b9df26420df704b041b14a5a4', name: "caret-right", size: 24 }))), img && multi && (h("div", { key: '116097d4c98a45c150033b38dbf1e83f12602449', class: "co-lightbox__counter", part: "counter", onClick: this.stop }, counter))));
515
+ } }, h("co-icon", { key: 'd9d32607a6b4350009db5c1719987aa8afcbb007', name: "caret-right", size: 24 }))), img && multi && (h("div", { key: 'a23f10a2c9d82c4295285feeedfbe0d9016f4db0', class: "co-lightbox__counter", part: "counter", onClick: this.stop }, counter))));
327
516
  }
328
517
  static get is() { return "co-lightbox"; }
329
518
  static get encapsulation() { return "shadow"; }
@@ -17,7 +17,7 @@ export class CoListFooter {
17
17
  this.handleSecondary = () => this.coSecondary.emit();
18
18
  }
19
19
  render() {
20
- return (h("div", { key: 'd522b5d67635a4a7751a7b4760ccca1133f6e8f1', class: "co-list-footer", part: "footer" }, this.secondaryLabel && (h("button", { key: '3e1ba3d6e14b48014dce5c91a1a39baba5a14556', class: "co-list-footer__btn co-list-footer__btn--secondary", type: "button", onClick: this.handleSecondary }, this.secondaryIcon && h("co-icon", { key: '9b31eb5104f0109c93a11ddcef4029517348c9da', name: this.secondaryIcon, size: 16 }), h("span", { key: '1d097b4874f5379a7e6f2f9882ba83b0828d1099' }, this.secondaryLabel))), this.primaryLabel && (h("button", { key: '7ffa258f1778a0ae31b574a3ccb1319162648fb9', class: "co-list-footer__btn co-list-footer__btn--primary", type: "button", onClick: this.handlePrimary }, this.primaryIcon && h("co-icon", { key: 'd75c5a25355c3b65222889b5a1ea75ecb559c05c', name: this.primaryIcon, size: 16 }), h("span", { key: '3a3cb4f049c8d590088182ef486304b291963aa4' }, this.primaryLabel))), h("slot", { key: '8e7579f147928f28f3f119ebb5423efb85922995' })));
20
+ return (h("div", { key: 'fbf4ec72aa2f6814b558d51c44592e784355751e', class: "co-list-footer", part: "footer" }, this.secondaryLabel && (h("button", { key: '78abef0f79117263c7d30e5ce37a876d193ba5e4', class: "co-list-footer__btn co-list-footer__btn--secondary", type: "button", onClick: this.handleSecondary }, this.secondaryIcon && h("co-icon", { key: 'a765ab5be51d7eb5791d3161cf5c7d3688fa0fd7', name: this.secondaryIcon, size: 16 }), h("span", { key: '0f5d57201bcd6ce40439c26916e01f1e37fcd87e' }, this.secondaryLabel))), this.primaryLabel && (h("button", { key: '27aa3b20666c9fe2a6fb7f28a9ca6e2542dd8fd7', class: "co-list-footer__btn co-list-footer__btn--primary", type: "button", onClick: this.handlePrimary }, this.primaryIcon && h("co-icon", { key: 'bafe2ebb9cfb2cc26c682ae9b419b09a512652f8', name: this.primaryIcon, size: 16 }), h("span", { key: 'c3c9baead987beea02ead3a65d3372c5532a67b8' }, this.primaryLabel))), h("slot", { key: '7a1ce48c91cc95c320c4d680053f42555e601187' })));
21
21
  }
22
22
  static get is() { return "co-list-footer"; }
23
23
  static get encapsulation() { return "shadow"; }