@prolibu-suite/cobalt-core 0.11.6 → 0.11.7

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 (632) hide show
  1. package/custom-elements.json +160 -46
  2. package/dist/cjs/co-action-bar.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 +1 -1
  5. package/dist/cjs/co-avatar.cjs.entry.js +6 -3
  6. package/dist/cjs/co-button.cjs.entry.js +14 -6
  7. package/dist/cjs/co-calendar-month_2.cjs.entry.js +9 -5
  8. package/dist/cjs/co-calendar_3.cjs.entry.js +23 -7
  9. package/dist/cjs/co-checkbox-group.cjs.entry.js +1 -1
  10. package/dist/cjs/co-checkbox.cjs.entry.js +1 -1
  11. package/dist/cjs/co-chip_2.cjs.entry.js +4 -4
  12. package/dist/cjs/co-color-picker.cjs.entry.js +24 -5
  13. package/dist/cjs/co-column-picker.cjs.entry.js +3 -3
  14. package/dist/cjs/co-combobox.cjs.entry.js +7 -5
  15. package/dist/cjs/co-command-search.cjs.entry.js +1 -1
  16. package/dist/cjs/co-data-table-pagination.cjs.entry.js +5 -5
  17. package/dist/cjs/co-data-table.cjs.entry.js +1 -1
  18. package/dist/cjs/co-date-picker.cjs.entry.js +1 -1
  19. package/dist/cjs/co-date-range-picker.cjs.entry.js +1 -1
  20. package/dist/cjs/co-date-range.cjs.entry.js +1 -1
  21. package/dist/cjs/co-date-time-picker.cjs.entry.js +3 -3
  22. package/dist/cjs/co-document-editor.cjs.entry.js +108 -7
  23. package/dist/cjs/co-drive-card.cjs.entry.js +2 -2
  24. package/dist/cjs/co-drop-zone.cjs.entry.js +1 -1
  25. package/dist/cjs/co-emoji-picker.cjs.entry.js +2 -2
  26. package/dist/cjs/co-empty-state.cjs.entry.js +3 -3
  27. package/dist/cjs/co-event-calendar.cjs.entry.js +2 -2
  28. package/dist/cjs/co-event-popover.cjs.entry.js +1 -1
  29. package/dist/cjs/co-fab.cjs.entry.js +3 -3
  30. package/dist/cjs/co-file-field.cjs.entry.js +87 -16
  31. package/dist/cjs/co-file-type-tile.cjs.entry.js +2 -2
  32. package/dist/cjs/co-gradient-bar.cjs.entry.js +4 -4
  33. package/dist/cjs/co-helper-text.cjs.entry.js +3 -3
  34. package/dist/cjs/co-icon-button.cjs.entry.js +3 -3
  35. package/dist/cjs/co-icon.cjs.entry.js +2 -2
  36. package/dist/cjs/co-input.cjs.entry.js +1 -1
  37. package/dist/cjs/co-json-field.cjs.entry.js +4 -4
  38. package/dist/cjs/co-kbd_2.cjs.entry.js +3 -3
  39. package/dist/cjs/co-lightbox.cjs.entry.js +71 -7
  40. package/dist/cjs/co-list-footer.cjs.entry.js +1 -1
  41. package/dist/cjs/co-list-item.cjs.entry.js +4 -4
  42. package/dist/cjs/co-media-thumb.cjs.entry.js +2 -2
  43. package/dist/cjs/co-menu-divider.cjs.entry.js +1 -1
  44. package/dist/cjs/co-menu-item.cjs.entry.js +1 -1
  45. package/dist/cjs/co-menu.cjs.entry.js +3 -3
  46. package/dist/cjs/co-modal.cjs.entry.js +23 -3
  47. package/dist/cjs/co-navbar.cjs.entry.js +2 -2
  48. package/dist/cjs/co-number-field.cjs.entry.js +9 -5
  49. package/dist/cjs/co-overlay.cjs.entry.js +2 -2
  50. package/dist/cjs/co-page-header.cjs.entry.js +1 -1
  51. package/dist/cjs/co-phone-field.cjs.entry.js +52 -2
  52. package/dist/cjs/co-popover.cjs.entry.js +33 -4
  53. package/dist/cjs/co-progress-bar.cjs.entry.js +3 -3
  54. package/dist/cjs/co-progress-circle.cjs.entry.js +2 -2
  55. package/dist/cjs/co-provider-logo_2.cjs.entry.js +1 -1
  56. package/dist/cjs/co-radio-group.cjs.entry.js +1 -1
  57. package/dist/cjs/co-radio.cjs.entry.js +3 -3
  58. package/dist/cjs/co-rating.cjs.entry.js +4 -4
  59. package/dist/cjs/co-ref-field.cjs.entry.js +15 -8
  60. package/dist/cjs/co-rich-text-editor.cjs.entry.js +80 -23
  61. package/dist/cjs/co-rich-text-toolbar.cjs.entry.js +105 -2
  62. package/dist/cjs/co-rich-text-viewer.cjs.entry.js +2 -2
  63. package/dist/cjs/co-row.cjs.entry.js +2 -2
  64. package/dist/cjs/co-select.cjs.entry.js +10 -8
  65. package/dist/cjs/co-separator.cjs.entry.js +1 -1
  66. package/dist/cjs/co-sidebar-nav.cjs.entry.js +11 -9
  67. package/dist/cjs/co-sidebar.cjs.entry.js +2 -2
  68. package/dist/cjs/co-slider.cjs.entry.js +3 -3
  69. package/dist/cjs/co-swatch-grid.cjs.entry.js +3 -3
  70. package/dist/cjs/co-switch.cjs.entry.js +4 -4
  71. package/dist/cjs/co-tab-group.cjs.entry.js +110 -12
  72. package/dist/cjs/co-tab.cjs.entry.js +3 -3
  73. package/dist/cjs/co-tags-field.cjs.entry.js +7 -7
  74. package/dist/cjs/co-textarea.cjs.entry.js +5 -5
  75. package/dist/cjs/co-tile.cjs.entry.js +1 -1
  76. package/dist/cjs/co-time-field.cjs.entry.js +1 -1
  77. package/dist/cjs/co-toast.cjs.entry.js +1 -1
  78. package/dist/cjs/co-toggle-button-group.cjs.entry.js +6 -4
  79. package/dist/cjs/co-toggle-button.cjs.entry.js +5 -3
  80. package/dist/cjs/co-transfer-list.cjs.entry.js +1 -1
  81. package/dist/cjs/co-video.cjs.entry.js +2 -2
  82. package/dist/cjs/cobalt.cjs.js +1 -1
  83. package/dist/cjs/{color-DQVrQGi0.js → color-DlKNWtdc.js} +38 -2
  84. package/dist/cjs/escapeLayers-DlCir9Sr.js +22 -0
  85. package/dist/cjs/fieldChip-DbYMfylq.js +7 -0
  86. package/dist/cjs/{gradientStops-CMpH4fB_.js → gradientStops-xZbv7bi6.js} +1 -1
  87. package/dist/cjs/{index-BbSD1Eyw.js → index-CJhgaDE1.js} +1 -1
  88. package/dist/cjs/index-bHoidDwv.js +14 -14
  89. package/dist/cjs/loader.cjs.js +1 -1
  90. package/dist/cjs/{pagination-S2sSAgdl.js → pagination-BPA1UGs-.js} +30 -0
  91. package/dist/cjs/{richTextI18n-DXGIv5w1.js → richTextI18n-B8qb5JKb.js} +12 -0
  92. package/dist/cobalt/cobalt.esm.js +1 -1
  93. package/dist/cobalt/p-01b54d81.entry.js +1 -0
  94. package/dist/cobalt/{p-02ff847e.entry.js → p-02133c95.entry.js} +1 -1
  95. package/dist/cobalt/{p-73313cbe.entry.js → p-0bbaaf4f.entry.js} +1 -1
  96. package/dist/cobalt/p-0f3a3232.entry.js +1 -0
  97. package/dist/cobalt/p-12fc5119.entry.js +1 -0
  98. package/dist/cobalt/p-19f0f534.entry.js +1 -0
  99. package/dist/cobalt/p-1c9253a2.entry.js +1 -0
  100. package/dist/cobalt/{p-63908a8d.entry.js → p-256ca457.entry.js} +1 -1
  101. package/dist/cobalt/{p-71fe35c4.entry.js → p-2ff8f591.entry.js} +1 -1
  102. package/dist/cobalt/p-33840969.entry.js +1 -0
  103. package/dist/cobalt/p-353ff9ed.entry.js +1 -0
  104. package/dist/cobalt/p-37f9ec35.entry.js +1 -0
  105. package/dist/cobalt/p-3878f174.entry.js +1 -0
  106. package/dist/cobalt/{p-a4eb298c.entry.js → p-3890d22f.entry.js} +1 -1
  107. package/dist/cobalt/{p-7fabd8ba.entry.js → p-3b7e90c8.entry.js} +1 -1
  108. package/dist/cobalt/p-3bff827a.entry.js +1 -0
  109. package/dist/cobalt/{p-65c191aa.entry.js → p-3e532a11.entry.js} +1 -1
  110. package/dist/cobalt/{p-4d743628.entry.js → p-3e864e7d.entry.js} +1 -1
  111. package/dist/cobalt/p-454dd8ab.entry.js +1 -0
  112. package/dist/cobalt/{p-cfaaa684.entry.js → p-4ae6fe0e.entry.js} +1 -1
  113. package/dist/cobalt/p-4cdfcd9c.entry.js +1 -0
  114. package/dist/cobalt/p-50ab6b9b.entry.js +1 -0
  115. package/dist/cobalt/{p-713637f2.entry.js → p-59a71695.entry.js} +1 -1
  116. package/dist/cobalt/{p-06689166.entry.js → p-5d41b58b.entry.js} +1 -1
  117. package/dist/cobalt/{p-95f2ebb1.entry.js → p-5e14f676.entry.js} +1 -1
  118. package/dist/cobalt/p-5e39cf70.entry.js +1 -0
  119. package/dist/cobalt/{p-df529110.entry.js → p-600d0cab.entry.js} +1 -1
  120. package/dist/cobalt/{p-38eb2615.entry.js → p-60ea3d33.entry.js} +1 -1
  121. package/dist/cobalt/{p-d5d8fa8b.entry.js → p-63f888a1.entry.js} +1 -1
  122. package/dist/cobalt/{p-d00c3894.entry.js → p-6eca1c7c.entry.js} +1 -1
  123. package/dist/cobalt/p-74804c79.entry.js +1 -0
  124. package/dist/cobalt/{p-f2fa2ac0.entry.js → p-76ea3f34.entry.js} +1 -1
  125. package/dist/cobalt/p-7737354e.entry.js +1 -0
  126. package/dist/cobalt/p-7e444408.entry.js +1 -0
  127. package/dist/cobalt/p-7e72720a.entry.js +1 -0
  128. package/dist/cobalt/p-82bcd062.entry.js +1 -0
  129. package/dist/cobalt/{p-56176aa0.entry.js → p-83691cfb.entry.js} +1 -1
  130. package/dist/cobalt/p-84256bde.entry.js +1 -0
  131. package/dist/cobalt/p-84ad0227.entry.js +1 -0
  132. package/dist/cobalt/{p-b2457431.entry.js → p-89328cd8.entry.js} +1 -1
  133. package/dist/cobalt/p-8a26f3cc.entry.js +1 -0
  134. package/dist/cobalt/p-8c22bf4b.entry.js +1 -0
  135. package/dist/cobalt/p-8e7ad2fe.entry.js +1 -0
  136. package/dist/cobalt/p-947b8e35.entry.js +1 -0
  137. package/dist/cobalt/p-94b871fb.entry.js +1 -0
  138. package/dist/cobalt/p-99781b0b.entry.js +1 -0
  139. package/dist/cobalt/{p-71dc8e4a.entry.js → p-9af26af0.entry.js} +1 -1
  140. package/dist/cobalt/p-9ce57385.entry.js +1 -0
  141. package/dist/cobalt/p-BzxEh7sq.js +1 -0
  142. package/dist/cobalt/{p-DXLeDZvr.js → p-CP7MznKV.js} +1 -1
  143. package/dist/cobalt/p-CSLjZ3WO.js +1 -0
  144. package/dist/cobalt/{p-Ch-Tygdb.js → p-CqQobidl.js} +1 -1
  145. package/dist/cobalt/p-EtYK1iGx.js +1 -0
  146. package/dist/cobalt/p-LnW75kr5.js +1 -0
  147. package/dist/cobalt/{p-cf5b91be.entry.js → p-a18c01eb.entry.js} +1 -1
  148. package/dist/cobalt/{p-65d44da2.entry.js → p-a33a277a.entry.js} +1 -1
  149. package/dist/cobalt/p-a4154bcf.entry.js +1 -0
  150. package/dist/cobalt/{p-aed832d5.entry.js → p-a4264bde.entry.js} +1 -1
  151. package/dist/cobalt/p-a6c9a0c5.entry.js +1 -0
  152. package/dist/cobalt/{p-868d1a18.entry.js → p-b2c49664.entry.js} +1 -1
  153. package/dist/cobalt/{p-f69804a6.entry.js → p-b402665a.entry.js} +1 -1
  154. package/dist/cobalt/{p-903237f9.entry.js → p-bbf3d859.entry.js} +1 -1
  155. package/dist/cobalt/p-bee52042.entry.js +1 -0
  156. package/dist/cobalt/{p-a7cd61ce.entry.js → p-c004fde5.entry.js} +1 -1
  157. package/dist/cobalt/p-c026968c.entry.js +1 -0
  158. package/dist/cobalt/{p-8a2a2b6c.entry.js → p-c23630ab.entry.js} +1 -1
  159. package/dist/cobalt/p-c31b9b51.entry.js +1 -0
  160. package/dist/cobalt/{p-0e4c2234.entry.js → p-c93be2d5.entry.js} +1 -1
  161. package/dist/cobalt/p-cb1013e6.entry.js +1 -0
  162. package/dist/cobalt/p-cd43d372.entry.js +1 -0
  163. package/dist/cobalt/{p-26cbdc33.entry.js → p-cea21e08.entry.js} +1 -1
  164. package/dist/cobalt/p-cf675968.entry.js +1 -0
  165. package/dist/cobalt/{p-ba39a965.entry.js → p-d1595580.entry.js} +1 -1
  166. package/dist/cobalt/{p-99df434b.entry.js → p-d26dc681.entry.js} +1 -1
  167. package/dist/cobalt/{p-8680559b.entry.js → p-d375c84e.entry.js} +1 -1
  168. package/dist/cobalt/{p-bee30373.entry.js → p-d7775109.entry.js} +1 -1
  169. package/dist/cobalt/p-d9b4594b.entry.js +1 -0
  170. package/dist/cobalt/{p-b67fb616.entry.js → p-e4646a0e.entry.js} +1 -1
  171. package/dist/cobalt/{p-7beface1.entry.js → p-e5350eeb.entry.js} +1 -1
  172. package/dist/cobalt/{p-e5f0d560.entry.js → p-f1da1df1.entry.js} +1 -1
  173. package/dist/cobalt/p-f23f52ed.entry.js +1 -0
  174. package/dist/cobalt/{p-13e5b724.entry.js → p-f6f273f7.entry.js} +1 -1
  175. package/dist/cobalt/{p-71ae1551.entry.js → p-fb6671e0.entry.js} +1 -1
  176. package/dist/cobalt/p-fb731600.entry.js +1 -0
  177. package/dist/cobalt/{p-7d1718ed.entry.js → p-feec49a4.entry.js} +1 -1
  178. package/dist/cobalt/p-ff218d09.entry.js +1 -0
  179. package/dist/cobalt/p-hXbDUT3I.js +1 -0
  180. package/dist/collection/components/co-action-bar/co-action-bar.css +6 -2
  181. package/dist/collection/components/co-app-shell/co-app-shell.css +6 -5
  182. package/dist/collection/components/co-autocomplete/co-autocomplete.css +12 -6
  183. package/dist/collection/components/co-autocomplete/co-autocomplete.js +1 -1
  184. package/dist/collection/components/co-avatar/co-avatar.css +11 -1
  185. package/dist/collection/components/co-avatar/co-avatar.js +5 -2
  186. package/dist/collection/components/co-avatar-group/co-avatar-group.js +1 -1
  187. package/dist/collection/components/co-button/co-button.css +38 -7
  188. package/dist/collection/components/co-button/co-button.js +34 -6
  189. package/dist/collection/components/co-calendar/co-calendar.css +4 -1
  190. package/dist/collection/components/co-calendar-month/co-calendar-month.css +3 -1
  191. package/dist/collection/components/co-calendar-timegrid/co-calendar-timegrid.css +3 -1
  192. package/dist/collection/components/co-checkbox/co-checkbox.css +5 -1
  193. package/dist/collection/components/co-checkbox-group/co-checkbox-group.css +10 -5
  194. package/dist/collection/components/co-checkbox-group/co-checkbox-group.js +1 -1
  195. package/dist/collection/components/co-chip/co-chip.css +17 -12
  196. package/dist/collection/components/co-color-area/co-color-area.js +2 -2
  197. package/dist/collection/components/co-color-picker/co-color-picker.css +19 -7
  198. package/dist/collection/components/co-color-picker/co-color-picker.js +42 -3
  199. package/dist/collection/components/co-color-slider/co-color-slider.js +1 -1
  200. package/dist/collection/components/co-column-picker/co-column-picker.css +10 -5
  201. package/dist/collection/components/co-column-picker/co-column-picker.js +2 -2
  202. package/dist/collection/components/co-combobox/co-combobox.css +8 -5
  203. package/dist/collection/components/co-combobox/co-combobox.js +7 -5
  204. package/dist/collection/components/co-command-search/co-command-search.css +5 -2
  205. package/dist/collection/components/co-command-search/co-command-search.js +1 -1
  206. package/dist/collection/components/co-data-table/co-data-table.css +13 -10
  207. package/dist/collection/components/co-data-table/co-data-table.js +1 -1
  208. package/dist/collection/components/co-data-table-pagination/co-data-table-pagination.css +15 -13
  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 +11 -5
  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 +5 -2
  213. package/dist/collection/components/co-date-range/co-date-range.js +1 -1
  214. package/dist/collection/components/co-date-range-picker/co-date-range-picker.css +9 -3
  215. package/dist/collection/components/co-date-range-picker/co-date-range-picker.js +2 -2
  216. package/dist/collection/components/co-date-time-picker/co-date-time-picker.css +11 -5
  217. package/dist/collection/components/co-date-time-picker/co-date-time-picker.js +2 -2
  218. package/dist/collection/components/co-document-editor/co-document-editor.css +112 -1
  219. package/dist/collection/components/co-document-editor/co-document-editor.js +91 -10
  220. package/dist/collection/components/co-document-editor/signature-bar.js +26 -0
  221. package/dist/collection/components/co-drawer/co-drawer.css +12 -4
  222. package/dist/collection/components/co-drawer/co-drawer.js +16 -0
  223. package/dist/collection/components/co-drive-card/co-drive-card.css +18 -12
  224. package/dist/collection/components/co-drive-card/co-drive-card.js +1 -1
  225. package/dist/collection/components/co-drop-zone/co-drop-zone.js +1 -1
  226. package/dist/collection/components/co-emoji-picker/co-emoji-picker.js +2 -2
  227. package/dist/collection/components/co-empty-state/co-empty-state.css +10 -6
  228. package/dist/collection/components/co-empty-state/co-empty-state.js +2 -2
  229. package/dist/collection/components/co-event-calendar/co-event-calendar.js +2 -2
  230. package/dist/collection/components/co-event-popover/co-event-popover.js +1 -1
  231. package/dist/collection/components/co-fab/co-fab.css +5 -3
  232. package/dist/collection/components/co-fab/co-fab.js +2 -2
  233. package/dist/collection/components/co-file-field/co-file-field.css +11 -6
  234. package/dist/collection/components/co-file-field/co-file-field.js +30 -16
  235. package/dist/collection/components/co-file-field/co-file-field.utils.js +57 -0
  236. package/dist/collection/components/co-file-type-tile/co-file-type-tile.js +2 -2
  237. package/dist/collection/components/co-gradient-bar/co-gradient-bar.js +2 -2
  238. package/dist/collection/components/co-helper-text/co-helper-text.css +6 -4
  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 +5 -3
  242. package/dist/collection/components/co-icon-button/co-icon-button.js +2 -2
  243. package/dist/collection/components/co-input/co-input.css +49 -22
  244. package/dist/collection/components/co-json-field/co-json-field.css +10 -5
  245. package/dist/collection/components/co-json-field/co-json-field.js +3 -3
  246. package/dist/collection/components/co-kbd/co-kbd.js +1 -1
  247. package/dist/collection/components/co-lightbox/co-lightbox.js +8 -7
  248. package/dist/collection/components/co-lightbox/openInTab.js +63 -0
  249. package/dist/collection/components/co-list-footer/co-list-footer.js +1 -1
  250. package/dist/collection/components/co-list-item/co-list-item.js +4 -4
  251. package/dist/collection/components/co-media-thumb/co-media-thumb.js +2 -2
  252. package/dist/collection/components/co-menu/co-menu.css +7 -0
  253. package/dist/collection/components/co-menu/co-menu.js +2 -2
  254. package/dist/collection/components/co-menu-divider/co-menu-divider.js +1 -1
  255. package/dist/collection/components/co-menu-item/co-menu-item.css +19 -7
  256. package/dist/collection/components/co-modal/co-modal.css +3 -0
  257. package/dist/collection/components/co-modal/co-modal.js +23 -2
  258. package/dist/collection/components/co-navbar/co-navbar.js +2 -2
  259. package/dist/collection/components/co-number-field/co-number-field.css +12 -6
  260. package/dist/collection/components/co-number-field/co-number-field.js +3 -3
  261. package/dist/collection/components/co-option-list/co-option-list.css +7 -4
  262. package/dist/collection/components/co-option-list/co-option-list.js +2 -2
  263. package/dist/collection/components/co-overlay/co-overlay.css +3 -0
  264. package/dist/collection/components/co-overlay/co-overlay.js +1 -1
  265. package/dist/collection/components/co-overlay/escapeLayers.js +20 -0
  266. package/dist/collection/components/co-page-header/co-page-header.js +1 -1
  267. package/dist/collection/components/co-phone-field/co-phone-field.css +8 -3
  268. package/dist/collection/components/co-phone-field/co-phone-field.js +36 -1
  269. package/dist/collection/components/co-popover/co-popover.css +4 -0
  270. package/dist/collection/components/co-popover/co-popover.js +33 -4
  271. package/dist/collection/components/co-progress-bar/co-progress-bar.css +6 -2
  272. package/dist/collection/components/co-progress-bar/co-progress-bar.js +2 -2
  273. package/dist/collection/components/co-progress-circle/co-progress-circle.js +2 -2
  274. package/dist/collection/components/co-radio/co-radio.js +3 -3
  275. package/dist/collection/components/co-radio-group/co-radio-group.css +10 -5
  276. package/dist/collection/components/co-radio-group/co-radio-group.js +1 -1
  277. package/dist/collection/components/co-rating/co-rating.css +6 -4
  278. package/dist/collection/components/co-rating/co-rating.js +3 -3
  279. package/dist/collection/components/co-ref-field/co-ref-field.css +43 -8
  280. package/dist/collection/components/co-ref-field/co-ref-field.js +17 -10
  281. package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.css +26 -4
  282. package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.js +77 -20
  283. package/dist/collection/components/co-rich-text-toolbar/co-rich-text-toolbar.css +3 -1
  284. package/dist/collection/components/co-rich-text-toolbar/co-rich-text-toolbar.js +40 -0
  285. package/dist/collection/components/co-rich-text-toolbar/panelFit.js +63 -0
  286. package/dist/collection/components/co-rich-text-viewer/co-rich-text-viewer.css +2 -1
  287. package/dist/collection/components/co-row/co-row.js +2 -2
  288. package/dist/collection/components/co-segmented-bar/co-segmented-bar.js +1 -1
  289. package/dist/collection/components/co-select/co-select.css +22 -12
  290. package/dist/collection/components/co-select/co-select.js +10 -8
  291. package/dist/collection/components/co-separator/co-separator.js +1 -1
  292. package/dist/collection/components/co-sidebar/co-sidebar.js +2 -2
  293. package/dist/collection/components/co-sidebar-nav/co-sidebar-nav.css +56 -19
  294. package/dist/collection/components/co-sidebar-nav/co-sidebar-nav.js +11 -9
  295. package/dist/collection/components/co-skeleton/co-skeleton.js +1 -1
  296. package/dist/collection/components/co-slider/co-slider.css +6 -4
  297. package/dist/collection/components/co-slider/co-slider.js +2 -2
  298. package/dist/collection/components/co-swatch-grid/co-swatch-grid.js +1 -1
  299. package/dist/collection/components/co-switch/co-switch.css +16 -7
  300. package/dist/collection/components/co-switch/co-switch.js +3 -3
  301. package/dist/collection/components/co-tab/co-tab.css +33 -29
  302. package/dist/collection/components/co-tab/co-tab.js +2 -2
  303. package/dist/collection/components/co-tab-group/co-tab-group.css +26 -6
  304. package/dist/collection/components/co-tab-group/co-tab-group.js +78 -11
  305. package/dist/collection/components/co-tab-group/trackScroll.js +31 -0
  306. package/dist/collection/components/co-tags-field/co-tags-field.css +10 -5
  307. package/dist/collection/components/co-tags-field/co-tags-field.js +5 -5
  308. package/dist/collection/components/co-textarea/co-textarea.css +12 -7
  309. package/dist/collection/components/co-textarea/co-textarea.js +4 -4
  310. package/dist/collection/components/co-tile/co-tile.js +1 -1
  311. package/dist/collection/components/co-time-field/co-time-field.js +1 -1
  312. package/dist/collection/components/co-toast/co-toast.css +36 -25
  313. package/dist/collection/components/co-toast/co-toast.js +2 -2
  314. package/dist/collection/components/co-toggle-button/co-toggle-button.css +47 -0
  315. package/dist/collection/components/co-toggle-button/co-toggle-button.js +7 -5
  316. package/dist/collection/components/co-toggle-button-group/co-toggle-button-group.css +12 -0
  317. package/dist/collection/components/co-toggle-button-group/co-toggle-button-group.js +10 -8
  318. package/dist/collection/components/co-tooltip/co-tooltip.js +2 -2
  319. package/dist/collection/components/co-transfer-list/co-transfer-list.css +15 -8
  320. package/dist/collection/components/co-transfer-list/co-transfer-list.js +1 -1
  321. package/dist/collection/components/co-tree-item/co-tree-item.js +2 -2
  322. package/dist/collection/components/co-video/co-video.js +2 -2
  323. package/dist/collection/utils/amountText.js +5 -1
  324. package/dist/collection/utils/color.js +36 -2
  325. package/dist/collection/utils/eventColor.js +7 -3
  326. package/dist/collection/utils/fieldChip.js +1 -1
  327. package/dist/collection/utils/phoneI18n.js +34 -0
  328. package/dist/collection/utils/richTextI18n.js +12 -0
  329. package/dist/components/co-accordion.js +1 -1
  330. package/dist/components/co-action-bar.js +1 -1
  331. package/dist/components/co-app-shell.js +1 -1
  332. package/dist/components/co-audio-player.js +1 -1
  333. package/dist/components/co-autocomplete.js +1 -1
  334. package/dist/components/co-avatar-group.js +1 -1
  335. package/dist/components/co-avatar.js +1 -1
  336. package/dist/components/co-breadcrumb-item.js +1 -1
  337. package/dist/components/co-breadcrumb.js +1 -1
  338. package/dist/components/co-button.js +1 -1
  339. package/dist/components/co-calendar-month.js +1 -1
  340. package/dist/components/co-calendar-timegrid.js +1 -1
  341. package/dist/components/co-calendar.js +1 -1
  342. package/dist/components/co-carousel.js +1 -1
  343. package/dist/components/co-checkbox-group.js +1 -1
  344. package/dist/components/co-checkbox.js +1 -1
  345. package/dist/components/co-chip.js +1 -1
  346. package/dist/components/co-color-picker.js +1 -1
  347. package/dist/components/co-column-picker.js +1 -1
  348. package/dist/components/co-combobox.js +1 -1
  349. package/dist/components/co-command-search.js +1 -1
  350. package/dist/components/co-data-table-pagination.js +1 -1
  351. package/dist/components/co-data-table.js +1 -1
  352. package/dist/components/co-date-field.js +1 -1
  353. package/dist/components/co-date-picker.js +1 -1
  354. package/dist/components/co-date-range-picker.js +1 -1
  355. package/dist/components/co-date-range.js +1 -1
  356. package/dist/components/co-date-time-picker.js +1 -1
  357. package/dist/components/co-document-editor.js +1 -1
  358. package/dist/components/co-drawer.js +1 -1
  359. package/dist/components/co-drive-card.js +1 -1
  360. package/dist/components/co-drop-zone.js +1 -1
  361. package/dist/components/co-emoji-picker.js +1 -1
  362. package/dist/components/co-empty-state.js +1 -1
  363. package/dist/components/co-event-calendar.js +1 -1
  364. package/dist/components/co-event-popover.js +1 -1
  365. package/dist/components/co-fab.js +1 -1
  366. package/dist/components/co-file-field.js +1 -1
  367. package/dist/components/co-file-type-tile.js +1 -1
  368. package/dist/components/co-gradient-bar.js +1 -1
  369. package/dist/components/co-helper-text.js +1 -1
  370. package/dist/components/co-icon-button.js +1 -1
  371. package/dist/components/co-icon.js +1 -1
  372. package/dist/components/co-input.js +1 -1
  373. package/dist/components/co-json-field.js +1 -1
  374. package/dist/components/co-kbd.js +1 -1
  375. package/dist/components/co-lightbox.js +1 -1
  376. package/dist/components/co-list-footer.js +1 -1
  377. package/dist/components/co-list-item.js +1 -1
  378. package/dist/components/co-media-thumb.js +1 -1
  379. package/dist/components/co-menu-divider.js +1 -1
  380. package/dist/components/co-menu-item.js +1 -1
  381. package/dist/components/co-menu.js +1 -1
  382. package/dist/components/co-modal.js +1 -1
  383. package/dist/components/co-navbar.js +1 -1
  384. package/dist/components/co-number-field.js +1 -1
  385. package/dist/components/co-option-list.js +1 -1
  386. package/dist/components/co-overlay.js +1 -1
  387. package/dist/components/co-page-header.js +1 -1
  388. package/dist/components/co-phone-field.js +1 -1
  389. package/dist/components/co-popover.js +1 -1
  390. package/dist/components/co-progress-bar.js +1 -1
  391. package/dist/components/co-progress-circle.js +1 -1
  392. package/dist/components/co-radio-group.js +1 -1
  393. package/dist/components/co-radio.js +1 -1
  394. package/dist/components/co-rating.js +1 -1
  395. package/dist/components/co-ref-field.js +1 -1
  396. package/dist/components/co-rich-text-editor.js +1 -1
  397. package/dist/components/co-rich-text-toolbar.js +1 -1
  398. package/dist/components/co-rich-text-viewer.js +1 -1
  399. package/dist/components/co-row.js +1 -1
  400. package/dist/components/co-select.js +1 -1
  401. package/dist/components/co-separator.js +1 -1
  402. package/dist/components/co-sidebar-nav.js +1 -1
  403. package/dist/components/co-sidebar.js +1 -1
  404. package/dist/components/co-skeleton.js +1 -1
  405. package/dist/components/co-slider.js +1 -1
  406. package/dist/components/co-swatch-grid.js +1 -1
  407. package/dist/components/co-switch.js +1 -1
  408. package/dist/components/co-tab-group.js +1 -1
  409. package/dist/components/co-tab.js +1 -1
  410. package/dist/components/co-tags-field.js +1 -1
  411. package/dist/components/co-textarea.js +1 -1
  412. package/dist/components/co-tile.js +1 -1
  413. package/dist/components/co-time-field.js +1 -1
  414. package/dist/components/co-toast.js +1 -1
  415. package/dist/components/co-toggle-button-group.js +1 -1
  416. package/dist/components/co-toggle-button.js +1 -1
  417. package/dist/components/co-tooltip.js +1 -1
  418. package/dist/components/co-transfer-list.js +1 -1
  419. package/dist/components/co-tree-item.js +1 -1
  420. package/dist/components/co-video.js +1 -1
  421. package/dist/components/{p-CxWo3qDo.js → p-4Y3YkFf1.js} +1 -1
  422. package/dist/components/{p-V7HYy0VO.js → p-B5F93Ujt.js} +1 -1
  423. package/dist/components/p-B70R6xWE.js +1 -0
  424. package/dist/components/p-BSt2t5Fy.js +1 -0
  425. package/dist/components/p-BfDYq7JS.js +1 -0
  426. package/dist/components/{p-C4sZjIDj.js → p-BhmVj5-9.js} +1 -1
  427. package/dist/components/p-BzxEh7sq.js +1 -0
  428. package/dist/components/p-CDiRdG6I.js +1 -0
  429. package/dist/components/p-CMMv2RcH.js +1 -0
  430. package/dist/components/{p-Dn2wblrA.js → p-CO12CK0t.js} +1 -1
  431. package/dist/components/{p-DymSqdlK.js → p-COCcx0DN.js} +1 -1
  432. package/dist/components/{p-DXLeDZvr.js → p-CP7MznKV.js} +1 -1
  433. package/dist/components/{p-wUXcJGdy.js → p-CX0bNXK3.js} +1 -1
  434. package/dist/components/{p-Bw_b_czs.js → p-CXi0fhTi.js} +1 -1
  435. package/dist/components/p-CaAdnjC6.js +1 -0
  436. package/dist/components/p-CaFwCFgg.js +1 -0
  437. package/dist/components/p-CjB5Vqpy.js +1 -0
  438. package/dist/components/p-Co0eKIiO.js +1 -0
  439. package/dist/components/{p-Ch-Tygdb.js → p-CqQobidl.js} +1 -1
  440. package/dist/components/{p-BRZci8B3.js → p-CwRoHnzq.js} +1 -1
  441. package/dist/components/{p-Dnz99Ox_.js → p-DMW9TJ7Z.js} +1 -1
  442. package/dist/components/p-DTWqwwXO.js +1 -0
  443. package/dist/components/{p-8XzG8pzY.js → p-DldA2IL3.js} +1 -1
  444. package/dist/components/p-LnW75kr5.js +1 -0
  445. package/dist/components/p-R1W48hzW.js +1 -0
  446. package/dist/components/{p-BW10Sgiy.js → p-_S5htX1i.js} +1 -1
  447. package/dist/components/p-hXbDUT3I.js +1 -0
  448. package/dist/components/p-o5wUtH9g.js +1 -0
  449. package/dist/components/{p-KK2vAKs-.js → p-qMNHMnvI.js} +1 -1
  450. package/dist/components/{p-C6WHpL5X.js → p-rfvTj6cP.js} +1 -1
  451. package/dist/components/{p-BI_VaFsx.js → p-upZqhFKo.js} +1 -1
  452. package/dist/components/{p-COozgrEk.js → p-w3AQrtBx.js} +1 -1
  453. package/dist/components/p-xtGT3YeI.js +1 -0
  454. package/dist/esm/co-action-bar.entry.js +1 -1
  455. package/dist/esm/co-app-shell.entry.js +1 -1
  456. package/dist/esm/co-autocomplete.entry.js +1 -1
  457. package/dist/esm/co-avatar.entry.js +6 -3
  458. package/dist/esm/co-button.entry.js +14 -6
  459. package/dist/esm/co-calendar-month_2.entry.js +9 -5
  460. package/dist/esm/co-calendar_3.entry.js +23 -7
  461. package/dist/esm/co-checkbox-group.entry.js +1 -1
  462. package/dist/esm/co-checkbox.entry.js +1 -1
  463. package/dist/esm/co-chip_2.entry.js +4 -4
  464. package/dist/esm/co-color-picker.entry.js +24 -5
  465. package/dist/esm/co-column-picker.entry.js +3 -3
  466. package/dist/esm/co-combobox.entry.js +7 -5
  467. package/dist/esm/co-command-search.entry.js +1 -1
  468. package/dist/esm/co-data-table-pagination.entry.js +5 -5
  469. package/dist/esm/co-data-table.entry.js +1 -1
  470. package/dist/esm/co-date-picker.entry.js +1 -1
  471. package/dist/esm/co-date-range-picker.entry.js +1 -1
  472. package/dist/esm/co-date-range.entry.js +1 -1
  473. package/dist/esm/co-date-time-picker.entry.js +3 -3
  474. package/dist/esm/co-document-editor.entry.js +108 -7
  475. package/dist/esm/co-drive-card.entry.js +2 -2
  476. package/dist/esm/co-drop-zone.entry.js +1 -1
  477. package/dist/esm/co-emoji-picker.entry.js +2 -2
  478. package/dist/esm/co-empty-state.entry.js +3 -3
  479. package/dist/esm/co-event-calendar.entry.js +2 -2
  480. package/dist/esm/co-event-popover.entry.js +1 -1
  481. package/dist/esm/co-fab.entry.js +3 -3
  482. package/dist/esm/co-file-field.entry.js +87 -16
  483. package/dist/esm/co-file-type-tile.entry.js +2 -2
  484. package/dist/esm/co-gradient-bar.entry.js +4 -4
  485. package/dist/esm/co-helper-text.entry.js +3 -3
  486. package/dist/esm/co-icon-button.entry.js +3 -3
  487. package/dist/esm/co-icon.entry.js +2 -2
  488. package/dist/esm/co-input.entry.js +1 -1
  489. package/dist/esm/co-json-field.entry.js +4 -4
  490. package/dist/esm/co-kbd_2.entry.js +3 -3
  491. package/dist/esm/co-lightbox.entry.js +71 -7
  492. package/dist/esm/co-list-footer.entry.js +1 -1
  493. package/dist/esm/co-list-item.entry.js +4 -4
  494. package/dist/esm/co-media-thumb.entry.js +2 -2
  495. package/dist/esm/co-menu-divider.entry.js +1 -1
  496. package/dist/esm/co-menu-item.entry.js +1 -1
  497. package/dist/esm/co-menu.entry.js +3 -3
  498. package/dist/esm/co-modal.entry.js +23 -3
  499. package/dist/esm/co-navbar.entry.js +2 -2
  500. package/dist/esm/co-number-field.entry.js +9 -5
  501. package/dist/esm/co-overlay.entry.js +2 -2
  502. package/dist/esm/co-page-header.entry.js +1 -1
  503. package/dist/esm/co-phone-field.entry.js +52 -2
  504. package/dist/esm/co-popover.entry.js +33 -4
  505. package/dist/esm/co-progress-bar.entry.js +3 -3
  506. package/dist/esm/co-progress-circle.entry.js +2 -2
  507. package/dist/esm/co-provider-logo_2.entry.js +1 -1
  508. package/dist/esm/co-radio-group.entry.js +1 -1
  509. package/dist/esm/co-radio.entry.js +3 -3
  510. package/dist/esm/co-rating.entry.js +4 -4
  511. package/dist/esm/co-ref-field.entry.js +15 -8
  512. package/dist/esm/co-rich-text-editor.entry.js +80 -23
  513. package/dist/esm/co-rich-text-toolbar.entry.js +105 -2
  514. package/dist/esm/co-rich-text-viewer.entry.js +2 -2
  515. package/dist/esm/co-row.entry.js +2 -2
  516. package/dist/esm/co-select.entry.js +10 -8
  517. package/dist/esm/co-separator.entry.js +1 -1
  518. package/dist/esm/co-sidebar-nav.entry.js +11 -9
  519. package/dist/esm/co-sidebar.entry.js +2 -2
  520. package/dist/esm/co-slider.entry.js +3 -3
  521. package/dist/esm/co-swatch-grid.entry.js +3 -3
  522. package/dist/esm/co-switch.entry.js +4 -4
  523. package/dist/esm/co-tab-group.entry.js +110 -12
  524. package/dist/esm/co-tab.entry.js +3 -3
  525. package/dist/esm/co-tags-field.entry.js +7 -7
  526. package/dist/esm/co-textarea.entry.js +5 -5
  527. package/dist/esm/co-tile.entry.js +1 -1
  528. package/dist/esm/co-time-field.entry.js +1 -1
  529. package/dist/esm/co-toast.entry.js +1 -1
  530. package/dist/esm/co-toggle-button-group.entry.js +6 -4
  531. package/dist/esm/co-toggle-button.entry.js +5 -3
  532. package/dist/esm/co-transfer-list.entry.js +1 -1
  533. package/dist/esm/co-video.entry.js +2 -2
  534. package/dist/esm/cobalt.js +1 -1
  535. package/dist/esm/{color-BVGGRfNG.js → color-BzxEh7sq.js} +37 -3
  536. package/dist/esm/escapeLayers-hXbDUT3I.js +18 -0
  537. package/dist/esm/fieldChip-B0N8z5W-.js +5 -0
  538. package/dist/esm/{gradientStops-DDK0y8ra.js → gradientStops-W-_rTTl_.js} +1 -1
  539. package/dist/esm/{index-CgyOJePd.js → index-BNt7Zg14.js} +1 -1
  540. package/dist/esm/index-DJkaRtbb.js +14 -14
  541. package/dist/esm/loader.js +1 -1
  542. package/dist/esm/{pagination-BzrIQtrk.js → pagination-BXztNUE3.js} +30 -0
  543. package/dist/esm/{richTextI18n-xnrKkNWQ.js → richTextI18n-EtYK1iGx.js} +12 -0
  544. package/dist/types/components/co-button/co-button.d.ts +4 -0
  545. package/dist/types/components/co-color-picker/co-color-picker.d.ts +7 -0
  546. package/dist/types/components/co-document-editor/co-document-editor.d.ts +24 -1
  547. package/dist/types/components/co-document-editor/signature-bar.d.ts +26 -0
  548. package/dist/types/components/co-drawer/co-drawer.d.ts +2 -0
  549. package/dist/types/components/co-file-field/co-file-field.d.ts +6 -0
  550. package/dist/types/components/co-file-field/co-file-field.utils.d.ts +26 -0
  551. package/dist/types/components/co-lightbox/co-lightbox.d.ts +5 -0
  552. package/dist/types/components/co-lightbox/openInTab.d.ts +46 -0
  553. package/dist/types/components/co-modal/co-modal.d.ts +2 -0
  554. package/dist/types/components/co-overlay/escapeLayers.d.ts +18 -0
  555. package/dist/types/components/co-phone-field/co-phone-field.d.ts +11 -0
  556. package/dist/types/components/co-popover/co-popover.d.ts +7 -0
  557. package/dist/types/components/co-ref-field/co-ref-field.d.ts +3 -2
  558. package/dist/types/components/co-rich-text-editor/co-rich-text-editor.d.ts +14 -1
  559. package/dist/types/components/co-rich-text-toolbar/co-rich-text-toolbar.d.ts +10 -0
  560. package/dist/types/components/co-rich-text-toolbar/panelFit.d.ts +38 -0
  561. package/dist/types/components/co-tab-group/co-tab-group.d.ts +21 -3
  562. package/dist/types/components/co-tab-group/trackScroll.d.ts +19 -0
  563. package/dist/types/components/co-toggle-button/co-toggle-button.d.ts +3 -1
  564. package/dist/types/components/co-toggle-button-group/co-toggle-button-group.d.ts +6 -4
  565. package/dist/types/components.d.ts +50 -25
  566. package/dist/types/utils/color.d.ts +28 -1
  567. package/dist/types/utils/eventColor.d.ts +3 -1
  568. package/dist/types/utils/fieldChip.d.ts +6 -0
  569. package/dist/types/utils/phoneI18n.d.ts +18 -0
  570. package/dist/types/utils/richTextI18n.d.ts +4 -0
  571. package/package.json +3 -3
  572. package/dist/cjs/fieldChip-C7MxxBVO.js +0 -7
  573. package/dist/cobalt/p-0d046d98.entry.js +0 -1
  574. package/dist/cobalt/p-12914c0a.entry.js +0 -1
  575. package/dist/cobalt/p-1348d5ca.entry.js +0 -1
  576. package/dist/cobalt/p-2231bacc.entry.js +0 -1
  577. package/dist/cobalt/p-28cf05f3.entry.js +0 -1
  578. package/dist/cobalt/p-3d1a48e5.entry.js +0 -1
  579. package/dist/cobalt/p-4bcdd422.entry.js +0 -1
  580. package/dist/cobalt/p-58ebb303.entry.js +0 -1
  581. package/dist/cobalt/p-5e678e88.entry.js +0 -1
  582. package/dist/cobalt/p-60f948c4.entry.js +0 -1
  583. package/dist/cobalt/p-6974df59.entry.js +0 -1
  584. package/dist/cobalt/p-69ecc933.entry.js +0 -1
  585. package/dist/cobalt/p-6c1992c9.entry.js +0 -1
  586. package/dist/cobalt/p-6c7e423c.entry.js +0 -1
  587. package/dist/cobalt/p-6d4a660c.entry.js +0 -1
  588. package/dist/cobalt/p-763698b3.entry.js +0 -1
  589. package/dist/cobalt/p-77e0d401.entry.js +0 -1
  590. package/dist/cobalt/p-78412feb.entry.js +0 -1
  591. package/dist/cobalt/p-7c20207b.entry.js +0 -1
  592. package/dist/cobalt/p-7df18a52.entry.js +0 -1
  593. package/dist/cobalt/p-848f5ca4.entry.js +0 -1
  594. package/dist/cobalt/p-87de5469.entry.js +0 -1
  595. package/dist/cobalt/p-93063876.entry.js +0 -1
  596. package/dist/cobalt/p-9adbab95.entry.js +0 -1
  597. package/dist/cobalt/p-9b114836.entry.js +0 -1
  598. package/dist/cobalt/p-9dc01092.entry.js +0 -1
  599. package/dist/cobalt/p-BVGGRfNG.js +0 -1
  600. package/dist/cobalt/p-DGLDAl09.js +0 -1
  601. package/dist/cobalt/p-DgJovDdy.js +0 -1
  602. package/dist/cobalt/p-a56bd4a8.entry.js +0 -1
  603. package/dist/cobalt/p-a5eabecb.entry.js +0 -1
  604. package/dist/cobalt/p-a5ee1fc2.entry.js +0 -1
  605. package/dist/cobalt/p-ad752791.entry.js +0 -1
  606. package/dist/cobalt/p-b39a4999.entry.js +0 -1
  607. package/dist/cobalt/p-b5dabdc3.entry.js +0 -1
  608. package/dist/cobalt/p-b9b73dcb.entry.js +0 -1
  609. package/dist/cobalt/p-bb7bbe70.entry.js +0 -1
  610. package/dist/cobalt/p-c5464a98.entry.js +0 -1
  611. package/dist/cobalt/p-c567533e.entry.js +0 -1
  612. package/dist/cobalt/p-d6215d80.entry.js +0 -1
  613. package/dist/cobalt/p-ea24eea8.entry.js +0 -1
  614. package/dist/cobalt/p-f0898e21.entry.js +0 -1
  615. package/dist/cobalt/p-f403eeec.entry.js +0 -1
  616. package/dist/cobalt/p-xnrKkNWQ.js +0 -1
  617. package/dist/components/p-B3Egz082.js +0 -1
  618. package/dist/components/p-B9wdMd_0.js +0 -1
  619. package/dist/components/p-BVGGRfNG.js +0 -1
  620. package/dist/components/p-BdmzslA5.js +0 -1
  621. package/dist/components/p-BzNBPHen.js +0 -1
  622. package/dist/components/p-C4U2tbRp.js +0 -1
  623. package/dist/components/p-C_6szR7t.js +0 -1
  624. package/dist/components/p-CiYPJW0B.js +0 -1
  625. package/dist/components/p-D4XP17VP.js +0 -1
  626. package/dist/components/p-DB8DGMc-.js +0 -1
  627. package/dist/components/p-DGLDAl09.js +0 -1
  628. package/dist/components/p-DhPxNA2f.js +0 -1
  629. package/dist/components/p-DsuFNmTI.js +0 -1
  630. package/dist/components/p-TGRbLkLz.js +0 -1
  631. package/dist/components/p-dnaee7fS.js +0 -1
  632. package/dist/esm/fieldChip-B2ctp2m6.js +0 -5
@@ -40,6 +40,8 @@ export class CoToggleButton {
40
40
  /** Visual variant. 'track' renders the button as a detached rounded pill for a
41
41
  * sunken toggle-button-group track. 'soft' renders it as a separated gray-100
42
42
  * chip whose selected state uses the celeste-100/primary-azul accent pair.
43
+ * 'pill' renders a standalone 40px pill on the control surface (Figma filter
44
+ * chips); the selected chip switches to the inverse surface (black in light).
43
45
  * Normally set by the parent group. */
44
46
  this.variant = 'connected';
45
47
  this.handleClick = () => {
@@ -87,7 +89,7 @@ export class CoToggleButton {
87
89
  ? this.size === 'xs' ? 14 : 18
88
90
  : this.size === 'l' ? 20 : this.size === 'xs' ? 14 : 16;
89
91
  const iconWeight = this.selected && this.selectedIconWeight ? this.selectedIconWeight : undefined;
90
- return (h("button", { key: 'a0b0aa7d128e4ee66a91a223851b126684d8e997',
92
+ return (h("button", { key: '8294ac8c49a0c36c9b88192db084bacbce1b7a15',
91
93
  /* El `<button>` vive en shadow DOM: sin `part` el consumidor no podía
92
94
  tocarlo desde afuera — ni su `justify-content: center`, que está
93
95
  hardcodeado en el CSS (el editor terminó moviendo el texto a un slot
@@ -99,7 +101,7 @@ export class CoToggleButton {
99
101
  [`co-toggle-button--${this.size}`]: true,
100
102
  'co-toggle-button--disabled': this.disabled,
101
103
  'co-toggle-button--icon-only': !this.label && (!!this.iconLeft || !!this.iconRight),
102
- }, type: "button", disabled: this.disabled, "aria-pressed": String(this.selected), onClick: this.handleClick }, h("slot", { key: 'd683a91a68fb3820a01b8bd91dc3b81b8d8994f0', name: "leading" }), this.iconLeft && h("co-icon", { key: '6894633951caa68a614824af931a33dc46a552ab', name: this.iconLeft, size: iconSize, weight: iconWeight }), this.label && h("span", { key: '96d902f0f28a8ea8a810425cf775ff6a9437be4d', class: "co-toggle-button__label" }, this.label), this.iconRight && h("co-icon", { key: '4e5db3f34af24fffce2ec95e4a7767c82768db39', name: this.iconRight, size: iconSize, weight: iconWeight })));
104
+ }, type: "button", disabled: this.disabled, "aria-pressed": String(this.selected), onClick: this.handleClick }, h("slot", { key: '9430df624ac0477d9942f321676360e5fd0cf697', name: "leading" }), this.iconLeft && h("co-icon", { key: '78c8f2c1abcbbcae86e13712eeb8da7587ce7dd3', name: this.iconLeft, size: iconSize, weight: iconWeight }), this.label && h("span", { key: '8d2c2281ff3afe0b7a998c128718f3b9b3d700fe', class: "co-toggle-button__label" }, this.label), this.iconRight && h("co-icon", { key: '9219240493081a502ccaca2f8b3f252f652872ef', name: this.iconRight, size: iconSize, weight: iconWeight })));
103
105
  }
104
106
  static get is() { return "co-toggle-button"; }
105
107
  static get encapsulation() { return "shadow"; }
@@ -256,15 +258,15 @@ export class CoToggleButton {
256
258
  "type": "string",
257
259
  "mutable": false,
258
260
  "complexType": {
259
- "original": "'connected' | 'track' | 'soft'",
260
- "resolved": "\"connected\" | \"soft\" | \"track\"",
261
+ "original": "'connected' | 'track' | 'soft' | 'pill'",
262
+ "resolved": "\"connected\" | \"pill\" | \"soft\" | \"track\"",
261
263
  "references": {}
262
264
  },
263
265
  "required": false,
264
266
  "optional": false,
265
267
  "docs": {
266
268
  "tags": [],
267
- "text": "Visual variant. 'track' renders the button as a detached rounded pill for a\nsunken toggle-button-group track. 'soft' renders it as a separated gray-100\nchip whose selected state uses the celeste-100/primary-azul accent pair.\nNormally set by the parent group."
269
+ "text": "Visual variant. 'track' renders the button as a detached rounded pill for a\nsunken toggle-button-group track. 'soft' renders it as a separated gray-100\nchip whose selected state uses the celeste-100/primary-azul accent pair.\n'pill' renders a standalone 40px pill on the control surface (Figma filter\nchips); the selected chip switches to the inverse surface (black in light).\nNormally set by the parent group."
268
270
  },
269
271
  "getter": false,
270
272
  "setter": false,
@@ -124,3 +124,15 @@
124
124
  .co-toggle-button-group--soft ::slotted(co-toggle-button) {
125
125
  margin: 0 !important;
126
126
  }
127
+
128
+ /* Pill variant — chips de filtro sueltos (Figma, página Academy): sin costura
129
+ que achatar (cada pastilla es redonda por su cuenta) y con wrap para una
130
+ fila de filtros que no entra completa. */
131
+ .co-toggle-button-group--pill {
132
+ gap: var(--co-spacing-md);
133
+ flex-wrap: wrap;
134
+ }
135
+
136
+ .co-toggle-button-group--pill ::slotted(co-toggle-button) {
137
+ margin: 0 !important;
138
+ }
@@ -1,8 +1,8 @@
1
1
  import { h } from "@stencil/core";
2
2
  /**
3
3
  * Grupo de `co-toggle-button` que coordina la selección: única (default) o
4
- * `multiple`. `variant` elige el estilo (`connected`, `track`, `soft`) y se
5
- * propaga a los botones. Wrapper Vue: `CoToggleButtonGroup` de
4
+ * `multiple`. `variant` elige el estilo (`connected`, `track`, `soft`, `pill`) y
5
+ * se propaga a los botones. Wrapper Vue: `CoToggleButtonGroup` de
6
6
  * `@prolibu-suite/cobalt-vue`.
7
7
  */
8
8
  export class CoToggleButtonGroup {
@@ -36,7 +36,9 @@ export class CoToggleButtonGroup {
36
36
  * 'track' turns the group into a sunken gray track carrying detached rounded
37
37
  * pills (white + shadow when selected) — e.g. an icon-only view toggle.
38
38
  * 'soft' separates each button into its own gray-100 chip (gap between them);
39
- * the selected chip gets the celeste-100/primary-azul accent pair. */
39
+ * the selected chip gets the celeste-100/primary-azul accent pair.
40
+ * 'pill' separa cada botón en una pastilla de 40px; la seleccionada va en la
41
+ * superficie inversa. */
40
42
  this.variant = 'connected';
41
43
  }
42
44
  get selectedValues() {
@@ -92,7 +94,7 @@ export class CoToggleButtonGroup {
92
94
  });
93
95
  }
94
96
  render() {
95
- return (h("div", { key: '876d581e3c53b790f1e89ba3917325ccc7b5e8ba', class: {
97
+ return (h("div", { key: '5603238d8329580cec8916147854b8316e118882', class: {
96
98
  'co-toggle-button-group': true,
97
99
  [`co-toggle-button-group--${this.direction}`]: true,
98
100
  [`co-toggle-button-group--${this.variant}`]: true,
@@ -101,7 +103,7 @@ export class CoToggleButtonGroup {
101
103
  'co-toggle-button-group--xs': this.size === 'xs',
102
104
  'co-toggle-button-group--disabled': this.disabled,
103
105
  'co-toggle-button-group--full': this.fullWidth,
104
- }, role: "group" }, h("slot", { key: '9e791ede02a818a5fbe0bf571cc185cc3ea609a6' })));
106
+ }, role: "group" }, h("slot", { key: 'd9cf50452f22dff3f076d9b1cb3126a2924030e1' })));
105
107
  }
106
108
  static get is() { return "co-toggle-button-group"; }
107
109
  static get encapsulation() { return "shadow"; }
@@ -241,15 +243,15 @@ export class CoToggleButtonGroup {
241
243
  "type": "string",
242
244
  "mutable": false,
243
245
  "complexType": {
244
- "original": "'connected' | 'track' | 'soft'",
245
- "resolved": "\"connected\" | \"soft\" | \"track\"",
246
+ "original": "'connected' | 'track' | 'soft' | 'pill'",
247
+ "resolved": "\"connected\" | \"pill\" | \"soft\" | \"track\"",
246
248
  "references": {}
247
249
  },
248
250
  "required": false,
249
251
  "optional": false,
250
252
  "docs": {
251
253
  "tags": [],
252
- "text": "'connected' (default) keeps the seamless dark-fill segmented control.\n'track' turns the group into a sunken gray track carrying detached rounded\npills (white + shadow when selected) \u2014 e.g. an icon-only view toggle.\n'soft' separates each button into its own gray-100 chip (gap between them);\nthe selected chip gets the celeste-100/primary-azul accent pair."
254
+ "text": "'connected' (default) keeps the seamless dark-fill segmented control.\n'track' turns the group into a sunken gray track carrying detached rounded\npills (white + shadow when selected) \u2014 e.g. an icon-only view toggle.\n'soft' separates each button into its own gray-100 chip (gap between them);\nthe selected chip gets the celeste-100/primary-azul accent pair.\n'pill' separa cada bot\u00F3n en una pastilla de 40px; la seleccionada va en la\nsuperficie inversa."
253
255
  },
254
256
  "getter": false,
255
257
  "setter": false,
@@ -279,7 +279,7 @@ export class CoTooltip {
279
279
  // ── Render ─────────────────────────────────────────────────
280
280
  render() {
281
281
  const side = this.actualPlacement.split('-')[0];
282
- return (h("div", { key: '53c8dbd21619fd8caa4105b86b4b1765c2361252', class: "co-tooltip" }, h("div", { key: 'f9e5e3b352b37c69a67538c6db3d10f9fc945976', class: "co-tooltip__trigger", ref: (el) => (this.triggerEl = el), onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave, onPointerDown: this.handlePointerDown, onFocusin: this.handleFocusIn, onFocusout: this.handleFocusOut, onKeyDown: this.handleKeyDown, "aria-describedby": this.visible ? 'tooltip-panel' : undefined }, h("slot", { key: '067ac53e5b491c7990acfa7c236ae2090a6657fc' })), (this.visible || this.closing) && this.content && (h("div", { key: '42436edfbd802bfd8c23dea5b8cfdd290fa150c7', id: "tooltip-panel", class: {
282
+ return (h("div", { key: '3764a4c115b507187115cbd30f0400deb374df09', class: "co-tooltip" }, h("div", { key: '50b0c6325f1254e156f07eebe07e1abc81d8955f', class: "co-tooltip__trigger", ref: (el) => (this.triggerEl = el), onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave, onPointerDown: this.handlePointerDown, onFocusin: this.handleFocusIn, onFocusout: this.handleFocusOut, onKeyDown: this.handleKeyDown, "aria-describedby": this.visible ? 'tooltip-panel' : undefined }, h("slot", { key: 'd38c1723c6429912c66174a8885fa7062d2294b6' })), (this.visible || this.closing) && this.content && (h("div", { key: 'ee7495acdb7bc60c922c6dd3e2719fac3d818034', id: "tooltip-panel", class: {
283
283
  'co-tooltip__panel': true,
284
284
  [`co-tooltip__panel--${side}`]: true,
285
285
  'co-tooltip__panel--closing': this.closing,
@@ -292,7 +292,7 @@ export class CoTooltip {
292
292
  this.promotePanel();
293
293
  this.scheduleUpdate();
294
294
  }
295
- }, style: { maxWidth: this.maxWidth } }, this.arrow && h("div", { key: '7520aaa3245fea55a7fcac31f33c56247b1fb5d8', class: `co-tooltip__arrow co-tooltip__arrow--${side}` }), h("span", { key: 'd3797d1c3a31c64cb30d4d8f448204e3a9f8c017', class: "co-tooltip__content" }, this.content), this.shortcut && h("co-kbd", { key: '01354b1fd110de3000d48ad9eaef0e3329a64e48', keys: this.shortcut, surface: "dark", size: "xs" })))));
295
+ }, style: { maxWidth: this.maxWidth } }, this.arrow && h("div", { key: '97cfb106fdc759401fefafe9990aa9388bc8aed5', class: `co-tooltip__arrow co-tooltip__arrow--${side}` }), h("span", { key: '81856efa759cfdc905ca23d7982c9469622bf89b', class: "co-tooltip__content" }, this.content), this.shortcut && h("co-kbd", { key: '2a1b2bf4728c9e085e0e198c93a4057dacf6381c', keys: this.shortcut, surface: "dark", size: "xs" })))));
296
296
  }
297
297
  static get is() { return "co-tooltip"; }
298
298
  static get encapsulation() { return "shadow"; }
@@ -750,9 +750,11 @@ html[data-overlayscrollbars-viewport~=scrollbarHidden] > body::-webkit-scrollbar
750
750
  --os-padding-axis: 2px;
751
751
  --os-track-bg: transparent;
752
752
  --os-handle-border-radius: var(--co-border-radius-full);
753
- --os-handle-bg: var(--co-color-opacity-negro-16);
754
- --os-handle-bg-hover: var(--co-color-opacity-negro-25);
755
- --os-handle-bg-active: var(--co-color-opacity-negro-50);
753
+ /* Asa por bordes semánticos (negro-16/25/50 en claro, idénticos): opacity-negro no gira y en
754
+ oscuro el asa era invisible. Mismo molde que el scroll del panel de co-select. */
755
+ --os-handle-bg: var(--co-semantic-border-default);
756
+ --os-handle-bg-hover: var(--co-semantic-border-field);
757
+ --os-handle-bg-active: var(--co-semantic-border-strong);
756
758
  --os-handle-min-size: 24px;
757
759
  }
758
760
 
@@ -869,17 +871,19 @@ html[data-overlayscrollbars-viewport~=scrollbarHidden] > body::-webkit-scrollbar
869
871
  line-height: 1;
870
872
  }
871
873
 
874
+ /* Tinta de estado por --co-semantic-text-*: gira con el tema (status-* es relleno, no se
875
+ aclara, y como texto en oscuro daba <4,5). Fallback a la primitiva hasta publicar tokens. */
872
876
  .co-transfer-list__helper--error .co-transfer-list__helper-icon,
873
- .co-transfer-list__helper--error .co-transfer-list__helper-text { color: var(--co-semantic-status-error); }
877
+ .co-transfer-list__helper--error .co-transfer-list__helper-text { color: var(--co-semantic-text-error, var(--co-semantic-status-error)); }
874
878
 
875
879
  .co-transfer-list__helper--success .co-transfer-list__helper-icon,
876
- .co-transfer-list__helper--success .co-transfer-list__helper-text { color: var(--co-semantic-status-success); }
880
+ .co-transfer-list__helper--success .co-transfer-list__helper-text { color: var(--co-semantic-text-success, var(--co-semantic-status-success)); }
877
881
 
878
882
  .co-transfer-list__helper--warning .co-transfer-list__helper-icon,
879
- .co-transfer-list__helper--warning .co-transfer-list__helper-text { color: var(--co-color-status-review); }
883
+ .co-transfer-list__helper--warning .co-transfer-list__helper-text { color: var(--co-semantic-text-warning, var(--co-color-status-review)); }
880
884
 
881
885
  .co-transfer-list__helper--info .co-transfer-list__helper-icon,
882
- .co-transfer-list__helper--info .co-transfer-list__helper-text { color: var(--co-semantic-status-info); }
886
+ .co-transfer-list__helper--info .co-transfer-list__helper-text { color: var(--co-semantic-text-info, var(--co-semantic-status-info)); }
883
887
 
884
888
  /* ── Disabled global ────────────────────────────────────────── */
885
889
  .co-transfer-list--disabled .co-transfer-list__panel {
@@ -892,7 +896,10 @@ html[data-overlayscrollbars-viewport~=scrollbarHidden] > body::-webkit-scrollbar
892
896
  }
893
897
 
894
898
  /* ── Status borders ─────────────────────────────────────────── */
895
- .co-transfer-list--error .co-transfer-list__panel { border-color: var(--co-semantic-status-error); }
899
+ /* Borde de error de CAMPO por --co-semantic-border-error: gira con el tema (status-error es
900
+ relleno fijo y como trazo en oscuro daba 2,94:1). En claro vale status-error (idéntico).
901
+ Fallback: la primitiva de hoy, hasta publicar tokens. */
902
+ .co-transfer-list--error .co-transfer-list__panel { border-color: var(--co-semantic-border-error, var(--co-semantic-status-error)); }
896
903
  .co-transfer-list--success .co-transfer-list__panel { border-color: var(--co-semantic-status-success); }
897
904
  .co-transfer-list--warning .co-transfer-list__panel { border-color: var(--co-color-status-review); }
898
905
  .co-transfer-list--info .co-transfer-list__panel { border-color: var(--co-semantic-status-info); }
@@ -214,7 +214,7 @@ export class CoTransferList {
214
214
  "references": {
215
215
  "TransferOption": {
216
216
  "location": "local",
217
- "path": "/Users/agox/worktrees/cobalt-tooltip-tone/packages/core/src/components/co-transfer-list/co-transfer-list.tsx",
217
+ "path": "/Users/agox/Documents/Prolibu/prolibu-cobalt/packages/core/src/components/co-transfer-list/co-transfer-list.tsx",
218
218
  "id": "src/components/co-transfer-list/co-transfer-list.tsx::TransferOption"
219
219
  }
220
220
  }
@@ -243,7 +243,7 @@ export class CoTreeItem {
243
243
  "references": {
244
244
  "TreeItemSelection": {
245
245
  "location": "local",
246
- "path": "/Users/agox/worktrees/cobalt-tooltip-tone/packages/core/src/components/co-tree-item/co-tree-item.tsx",
246
+ "path": "/Users/agox/Documents/Prolibu/prolibu-cobalt/packages/core/src/components/co-tree-item/co-tree-item.tsx",
247
247
  "id": "src/components/co-tree-item/co-tree-item.tsx::TreeItemSelection"
248
248
  }
249
249
  }
@@ -269,7 +269,7 @@ export class CoTreeItem {
269
269
  "references": {
270
270
  "TreeItemSize": {
271
271
  "location": "local",
272
- "path": "/Users/agox/worktrees/cobalt-tooltip-tone/packages/core/src/components/co-tree-item/co-tree-item.tsx",
272
+ "path": "/Users/agox/Documents/Prolibu/prolibu-cobalt/packages/core/src/components/co-tree-item/co-tree-item.tsx",
273
273
  "id": "src/components/co-tree-item/co-tree-item.tsx::TreeItemSize"
274
274
  }
275
275
  }
@@ -833,14 +833,14 @@ export class CoVideo {
833
833
  // ═══════════════════════════════════════════════════
834
834
  render() {
835
835
  const aspectClass = `co-video--${this.aspectRatio.replace(':', '-')}`;
836
- return (h(Host, { key: 'd2f25697003337a41f2c6ac1f8b52b82c8341731' }, h("div", { key: 'b656b85d82072035f31358820db8c61a2db4cbbc', class: {
836
+ return (h(Host, { key: '427e45bb23b04ee57c9889ba9e465792cee33cb8' }, h("div", { key: 'b61ca55ad1fc9d0826d2f518f40e473fe26228ff', class: {
837
837
  'co-video': true,
838
838
  [aspectClass]: true,
839
839
  [`co-video--rounded-${this.rounded}`]: true,
840
840
  'co-video--disabled': this.disabled,
841
841
  'co-video--fullscreen': this.isFullscreen,
842
842
  'co-video--playing': this.isPlaying,
843
- }, part: "container", ref: el => (this.containerEl = el), role: "region", "aria-label": this.t.player, tabindex: 0, onKeyDown: this.handleKeyDown, onMouseMove: this.handleContainerMouseMove, onMouseLeave: this.handleContainerMouseLeave, onTouchStart: this.handleContainerTouchStart }, h("video", { key: '960e58a18058da5840fdbbdaf32a01afd1db06f9', ref: el => (this.videoEl = el), class: "co-video__native", part: "video", src: this.src || undefined, poster: undefined, preload: this.preload, loop: this.loop, playsinline: true, tabindex: -1, controlsList: this.allowDownload ? undefined : 'nodownload' }), this.renderPoster(), this.renderLoader(), this.renderBigPlayButton(), this.renderError(), h("div", { key: '4a772011fe579f90d3befe3ad925026835cece73', class: "co-video__click-area", onClick: this.handleVideoAreaClick }), this.renderControls())));
843
+ }, part: "container", ref: el => (this.containerEl = el), role: "region", "aria-label": this.t.player, tabindex: 0, onKeyDown: this.handleKeyDown, onMouseMove: this.handleContainerMouseMove, onMouseLeave: this.handleContainerMouseLeave, onTouchStart: this.handleContainerTouchStart }, h("video", { key: 'ee0a3135f7e8cce1648226ba8541bc98a504edca', ref: el => (this.videoEl = el), class: "co-video__native", part: "video", src: this.src || undefined, poster: undefined, preload: this.preload, loop: this.loop, playsinline: true, tabindex: -1, controlsList: this.allowDownload ? undefined : 'nodownload' }), this.renderPoster(), this.renderLoader(), this.renderBigPlayButton(), this.renderError(), h("div", { key: 'd2101a72f2d3e9a4abf6009f5e470e2f474b7b5d', class: "co-video__click-area", onClick: this.handleVideoAreaClick }), this.renderControls())));
844
844
  }
845
845
  static get is() { return "co-video"; }
846
846
  static get encapsulation() { return "shadow"; }
@@ -17,8 +17,12 @@
17
17
  */
18
18
  const MAX_INTEGER_DIGITS = 15;
19
19
  const MAX_DECIMAL_DIGITS = 8;
20
+ /**
21
+ * Además del tope, la parte entera pierde sus ceros a la izquierda (dejando UNO si es toda
22
+ * ceros): tipear sobre un campo en 0 daba «050,000». Vale para tipeo y pegado — ambos pasan acá.
23
+ */
20
24
  const capDigits = (integer, decimals) => ({
21
- integer: integer.slice(0, MAX_INTEGER_DIGITS),
25
+ integer: integer.replace(/^0+(?=\d)/, '').slice(0, MAX_INTEGER_DIGITS),
22
26
  decimals: decimals.slice(0, MAX_DECIMAL_DIGITS),
23
27
  });
24
28
  /**
@@ -132,7 +132,41 @@ export function luminance(hex) {
132
132
  const c = parseHex(hex);
133
133
  return c ? luminanceRgb(c) : 0;
134
134
  }
135
- /** Returns true when the color is perceptually light (needs dark foreground). */
135
+ /**
136
+ * Luminancia de la tinta oscura que el DS pone sobre un color propio
137
+ * (`--co-color-base-negro` #1F1C1B: chips de relleno, eventos del calendario).
138
+ */
139
+ const DARK_INK_LUMINANCE = luminance('#1F1C1B');
140
+ /**
141
+ * Cruce WCAG de la tinta: la luminancia de fondo donde la tinta oscura del DS
142
+ * y la blanca contrastan IGUAL — `(L + 0,05) / (Ln + 0,05) = 1,05 / (L + 0,05)`
143
+ * → L ≈ 0,205 con base-negro (0,179 sería con #000 puro; con base-negro ese
144
+ * tramo, p.ej. el rojo #EB1E1E, quedaba PEOR con tinta oscura: 3,8 vs 4,4:1).
145
+ * Por encima, la tinta oscura contrasta más que la blanca.
146
+ */
147
+ export const INK_CROSSOVER_LUMINANCE = Math.sqrt(1.05 * (DARK_INK_LUMINANCE + 0.05)) - 0.05;
148
+ /**
149
+ * True cuando el color pide tinta OSCURA encima (avatar, chip de relleno,
150
+ * swatch). 2026-09-27: el umbral era L > 0,4 y los tonos medios (verde de
151
+ * marca, naranja, celeste) salían con tinta blanca a 2,8–3,3:1 cuando la negra
152
+ * daba 6–7:1. Ahora es el cruce WCAG (`INK_CROSSOVER_LUMINANCE`), el mismo
153
+ * criterio que `readableTextToken` usa en los chips del calendario.
154
+ */
136
155
  export function isLightColor(hex) {
137
- return luminance(hex) > 0.4;
156
+ return luminance(hex) > INK_CROSSOVER_LUMINANCE;
157
+ }
158
+ /**
159
+ * Cruce WCAG con tinta NEGRA PURA opaca (#000, L = 0): `(L + 0,05) / 0,05 =
160
+ * 1,05 / (L + 0,05)` → L = √(1,05·0,05) − 0,05 ≈ 0,179. En el cruce ambas
161
+ * tintas dan 4,58:1, así que eligiendo la mejor nunca se baja de AA.
162
+ */
163
+ export const INK_CROSSOVER_BLACK = Math.sqrt(1.05 * 0.05) - 0.05;
164
+ /**
165
+ * True cuando, sobre este color, el #000 opaco contrasta más que el blanco.
166
+ * Para tintas que usan negro PURO (iniciales de co-avatar); las que usan
167
+ * base-negro siguen con `isLightColor`. Auditoría 2026-09-27 (L8): en la
168
+ * franja L 0,18-0,21 el avatar quedaba a 4,21-4,43:1.
169
+ */
170
+ export function prefersBlackInk(hex) {
171
+ return luminance(hex) > INK_CROSSOVER_BLACK;
138
172
  }
@@ -5,6 +5,7 @@
5
5
  * hex — es la regla del design system. El cálculo de contraste necesita un color
6
6
  * REAL, así que el token se resuelve contra el host antes de medir luminancia.
7
7
  */
8
+ import { INK_CROSSOVER_LUMINANCE, luminanceRgb } from "./color";
8
9
  /** Cache token→hex. La clave incluye el tema: light y dark pueden resolver
9
10
  * distinto el MISMO token, y servir el valor viejo daría texto ilegible. */
10
11
  const RESOLVED = new Map();
@@ -31,7 +32,9 @@ export function resolveCssColor(host, value) {
31
32
  return resolved;
32
33
  }
33
34
  /**
34
- * Token de color de texto legible sobre `bg` (luminancia YIQ), o `''` cuando el
35
+ * Token de color de texto legible sobre `bg` (cruce WCAG, mismo criterio que
36
+ * `isLightColor`; antes YIQ ≥ 150, que dejaba el naranja y el verde de marca
37
+ * con tinta blanca a < 3,5:1), o `''` cuando el
35
38
  * color no se puede medir — en ese caso el llamador NO debe escribir la
36
39
  * variable: pisarla con un `var(--co-cal-event-text)` la vuelve
37
40
  * AUTORREFERENTE, la declaración se invalida y el texto termina heredando el
@@ -47,6 +50,7 @@ export function readableTextToken(host, bg) {
47
50
  const b = parseInt(full.slice(4, 6), 16);
48
51
  if ([r, g, b].some((n) => Number.isNaN(n)))
49
52
  return '';
50
- const yiq = (r * 299 + g * 587 + b * 114) / 1000;
51
- return yiq >= 150 ? 'var(--co-cal-event-text-dark)' : 'var(--co-cal-event-text-light)';
53
+ return luminanceRgb({ r, g, b }) > INK_CROSSOVER_LUMINANCE
54
+ ? 'var(--co-cal-event-text-dark)'
55
+ : 'var(--co-cal-event-text-light)';
52
56
  }
@@ -1,2 +1,2 @@
1
1
  import { h } from "@stencil/core";
2
- export const FieldChip = ({ baseClass, label, modifiers = {}, style, title, key, onRemove, onChipDblClick }, children) => (h("span", { class: Object.assign({ [baseClass]: true }, modifiers), style: style, title: title, key: key, onDblClick: onChipDblClick }, children, h("span", { class: `${baseClass}-label` }, label), onRemove && (h("button", { class: `${baseClass}-remove`, type: "button", tabIndex: -1, onClick: onRemove }, h("co-icon", { name: "x-circle", weight: "fill", size: 16 })))));
2
+ export const FieldChip = ({ baseClass, label, modifiers = {}, style, title, key, onRemove, onChipDblClick, onEdit, editLabel }, children) => (h("span", { class: Object.assign({ [baseClass]: true }, modifiers), style: style, title: title, key: key, onDblClick: onChipDblClick }, onEdit && (h("button", { class: `${baseClass}-edit`, type: "button", tabIndex: -1, title: editLabel || undefined, "aria-label": editLabel || undefined, onClick: onEdit }, h("co-icon", { name: "pencil-simple", size: 14 }))), children, h("span", { class: `${baseClass}-label` }, label), onRemove && (h("button", { class: `${baseClass}-remove`, type: "button", tabIndex: -1, onClick: onRemove }, h("co-icon", { name: "x-circle", weight: "fill", size: 16 })))));
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Built-in UI string dictionary for co-phone-field.
3
+ *
4
+ * Same strategy as fileI18n/dateI18n: the component ships es/en/pt strings keyed
5
+ * by the `locale` prop. Until now the country search box said "Search country..."
6
+ * hardcoded in English, so a form rendered in Spanish or Portuguese leaked it.
7
+ */
8
+ const DICT = {
9
+ es: {
10
+ searchPlaceholder: 'Buscar país…',
11
+ selectCountry: 'Seleccionar país',
12
+ },
13
+ en: {
14
+ searchPlaceholder: 'Search country…',
15
+ selectCountry: 'Select country',
16
+ },
17
+ pt: {
18
+ searchPlaceholder: 'Buscar país…',
19
+ selectCountry: 'Selecionar país',
20
+ },
21
+ };
22
+ /** Map any BCP-47 locale (e.g. "es-CO") to a supported language; fallback 'en'. */
23
+ export function langFromLocale(locale) {
24
+ const l = (locale || '').toLowerCase();
25
+ if (l.startsWith('es'))
26
+ return 'es';
27
+ if (l.startsWith('pt'))
28
+ return 'pt';
29
+ return 'en';
30
+ }
31
+ /** Resolve the built-in UI strings for a locale. */
32
+ export function getPhoneStrings(locale) {
33
+ return DICT[langFromLocale(locale)];
34
+ }
@@ -139,6 +139,10 @@ const DICT = {
139
139
  imageLayoutBreak: 'Break text',
140
140
  imageLayoutLabel: 'Image layout',
141
141
  documentEditor: 'Document editor',
142
+ signatureToolsLabel: 'Signature options',
143
+ signatureDuplicate: 'Duplicate',
144
+ signaturePrevSigner: 'Previous signer',
145
+ signatureNextSigner: 'Next signer',
142
146
  },
143
147
  es: {
144
148
  bold: 'Negrita',
@@ -273,6 +277,10 @@ const DICT = {
273
277
  imageLayoutBreak: 'Separar del texto',
274
278
  imageLayoutLabel: 'Diseño de la imagen',
275
279
  documentEditor: 'Editor de documento',
280
+ signatureToolsLabel: 'Opciones de la firma',
281
+ signatureDuplicate: 'Duplicar',
282
+ signaturePrevSigner: 'Firmante anterior',
283
+ signatureNextSigner: 'Firmante siguiente',
276
284
  },
277
285
  pt: {
278
286
  bold: 'Negrito',
@@ -407,6 +415,10 @@ const DICT = {
407
415
  imageLayoutBreak: 'Separar do texto',
408
416
  imageLayoutLabel: 'Layout da imagem',
409
417
  documentEditor: 'Editor de documento',
418
+ signatureToolsLabel: 'Opções da assinatura',
419
+ signatureDuplicate: 'Duplicar',
420
+ signaturePrevSigner: 'Signatário anterior',
421
+ signatureNextSigner: 'Próximo signatário',
410
422
  },
411
423
  };
412
424
  /** Map any BCP-47 locale (e.g. "es-CO") to a supported language; fallback 'en'. */
@@ -1 +1 @@
1
- import{t as o,p as e,H as c,c as i,h as a}from"./index.js";import{d as t}from"./p-KK2vAKs-.js";function n(o){return"function"==typeof o.matches&&o.matches('a[href],button,input,select,textarea,label,summary,[contenteditable="true"],[role="button"],[role="link"],[role="checkbox"],[role="switch"],[role="menuitem"],[role="tab"],co-button,co-icon-button,co-switch,co-checkbox,co-radio,co-chip,co-input,co-select,co-combobox,co-autocomplete,co-ref-field,co-number-field,co-toggle-button,co-menu')}const r=e(class extends c{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow(),this.coToggle=i(this,"coToggle",3),this.open=!0,this.heading="",this.subheading="",this.disabled=!1,this.hasSubheadingSlot=!1,this.handleToggle=()=>{this.disabled||(this.open=!this.open,this.coToggle.emit(this.open))},this.handleHeadingClick=o=>{if(this.disabled)return;const e=o.currentTarget;for(const c of o.composedPath()){if(c===e)break;if(n(c))return}this.handleToggle()}}componentWillLoad(){this.hasSubheadingSlot=!!this.el.querySelector('[slot="subheading"]')}componentWillRender(){this.hasSubheadingSlot=!!this.el.querySelector('[slot="subheading"]')}get showSubheading(){return!(!this.subheading||!this.subheading.trim())||this.hasSubheadingSlot}render(){return a("div",{key:"0d1c2cca135ac9d62cb7d4b5c620843c5788101d",class:{"co-accordion":!0,"co-accordion--open":this.open,"co-accordion--disabled":this.disabled},part:"accordion"},a("div",{key:"aa80683852ba2b131c7ab29eed528ec87d92a565",class:"co-accordion__header",part:"header"},a("span",{key:"71c84f588f351279bb999a2ec84dd37b202203d0",class:"co-accordion__heading-group",onClick:this.handleHeadingClick},a("span",{key:"42201833527fd73790ab6391668ba8eb7986ed90",class:"co-accordion__heading",part:"heading"},a("slot",{key:"11528c94fa817e55ffb015975e29947111e98c08",name:"header"},this.heading)),this.showSubheading&&a("span",{key:"73bd7f8b5d7b967f0a5c84f207ab4452e96f6805",class:"co-accordion__subheading",part:"subheading"},a("slot",{key:"1cefb67a4b6809357ee9a5a9330ec3bcd3be42ab",name:"subheading"},this.subheading))),a("button",{key:"fef96df91611513ab6f6074578a31c3e7b23b4c2",class:"co-accordion__caret",type:"button","aria-expanded":this.open?"true":"false","aria-label":this.heading||"Toggle section",disabled:this.disabled,onClick:this.handleToggle,part:"caret"},a("co-icon",{key:"f32612853d42ea6f2c34b2554951b22d155d1afc",name:"caret-up",size:20}))),a("div",{key:"c3c90907e7114f20a917bae025012464182b8ea4",class:"co-accordion__body",part:"body"},a("div",{key:"44877e54213ae200cde25d5a2fb5ae4ed95b7df9",class:"co-accordion__body-inner",part:"body-inner"},a("slot",{key:"4ad41bab50239bb4ddca8ee8751afeb6dfb19227"}))))}get el(){return this}static get style(){return":host{display:block}.co-accordion{display:flex;flex-direction:column;width:100%}.co-accordion__header{display:flex;align-items:center;justify-content:space-between;gap:var(--co-spacing-sm, 6px);width:100%;font-family:var(--co-font-family-primary);color:var(--co-semantic-text-default);text-align:left}.co-accordion__heading-group{flex:1;min-width:0;display:flex;flex-direction:column;gap:var(--co-spacing-xxs, 2px);cursor:pointer}.co-accordion__heading{font-size:var(--co-font-size-24);font-weight:500;line-height:1.25;letter-spacing:-0.03em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.co-accordion__subheading{font-size:var(--co-font-size-14);font-weight:400;line-height:1.3;letter-spacing:normal;color:var(--co-semantic-text-secondary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.co-accordion__caret{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:none;background:transparent;border-radius:var(--co-border-radius-full, 9999px);color:var(--co-semantic-text-default);cursor:pointer;transition:transform var(--co-motion-duration-base) var(--co-motion-ease-out), background-color var(--co-motion-duration-fast) var(--co-motion-ease-out);transform:rotate(180deg);}.co-accordion__caret:hover:not(:disabled){background:var(--co-color-opacity-negro-8, rgba(31, 28, 27, 0.08))}.co-accordion--open .co-accordion__caret{transform:rotate(0deg);}.co-accordion__body{display:grid;grid-template-rows:0fr;transition:grid-template-rows var(--co-motion-duration-slow) var(--co-motion-ease-out)}.co-accordion__body-inner{min-height:0;overflow:hidden;padding-top:var(--co-spacing-md);transition:padding-top var(--co-motion-duration-slow) var(--co-motion-ease-out)}.co-accordion:not(.co-accordion--open) .co-accordion__body-inner{padding-top:0}.co-accordion--open .co-accordion__body{grid-template-rows:1fr}.co-accordion:not(.co-accordion--open) .co-accordion__body-inner{visibility:hidden;transition:padding-top var(--co-motion-duration-slow) var(--co-motion-ease-out), visibility 0s linear var(--co-motion-duration-slow)}.co-accordion--open .co-accordion__body-inner{visibility:visible;transition:padding-top var(--co-motion-duration-slow) var(--co-motion-ease-out), visibility 0s linear 0s}.co-accordion__caret:focus-visible{outline:2px solid var(--co-color-primary-azul, #2563eb);outline-offset:2px}.co-accordion--disabled .co-accordion__header{opacity:0.5}.co-accordion--disabled .co-accordion__caret{cursor:not-allowed}.co-accordion--disabled .co-accordion__heading-group{cursor:default}"}},[257,"co-accordion",{open:[1540],heading:[1],subheading:[1],disabled:[4],hasSubheadingSlot:[32]}]);function d(){"undefined"!=typeof customElements&&["co-accordion","co-icon"].forEach((e=>{switch(e){case"co-accordion":customElements.get(o(e))||customElements.define(o(e),r);break;case"co-icon":customElements.get(o(e))||t()}}))}d();const s=r,l=d;export{s as CoAccordion,l as defineCustomElement}
1
+ import{t as o,p as e,H as c,c as i,h as a}from"./index.js";import{d as t}from"./p-qMNHMnvI.js";function n(o){return"function"==typeof o.matches&&o.matches('a[href],button,input,select,textarea,label,summary,[contenteditable="true"],[role="button"],[role="link"],[role="checkbox"],[role="switch"],[role="menuitem"],[role="tab"],co-button,co-icon-button,co-switch,co-checkbox,co-radio,co-chip,co-input,co-select,co-combobox,co-autocomplete,co-ref-field,co-number-field,co-toggle-button,co-menu')}const r=e(class extends c{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow(),this.coToggle=i(this,"coToggle",3),this.open=!0,this.heading="",this.subheading="",this.disabled=!1,this.hasSubheadingSlot=!1,this.handleToggle=()=>{this.disabled||(this.open=!this.open,this.coToggle.emit(this.open))},this.handleHeadingClick=o=>{if(this.disabled)return;const e=o.currentTarget;for(const c of o.composedPath()){if(c===e)break;if(n(c))return}this.handleToggle()}}componentWillLoad(){this.hasSubheadingSlot=!!this.el.querySelector('[slot="subheading"]')}componentWillRender(){this.hasSubheadingSlot=!!this.el.querySelector('[slot="subheading"]')}get showSubheading(){return!(!this.subheading||!this.subheading.trim())||this.hasSubheadingSlot}render(){return a("div",{key:"0d1c2cca135ac9d62cb7d4b5c620843c5788101d",class:{"co-accordion":!0,"co-accordion--open":this.open,"co-accordion--disabled":this.disabled},part:"accordion"},a("div",{key:"aa80683852ba2b131c7ab29eed528ec87d92a565",class:"co-accordion__header",part:"header"},a("span",{key:"71c84f588f351279bb999a2ec84dd37b202203d0",class:"co-accordion__heading-group",onClick:this.handleHeadingClick},a("span",{key:"42201833527fd73790ab6391668ba8eb7986ed90",class:"co-accordion__heading",part:"heading"},a("slot",{key:"11528c94fa817e55ffb015975e29947111e98c08",name:"header"},this.heading)),this.showSubheading&&a("span",{key:"73bd7f8b5d7b967f0a5c84f207ab4452e96f6805",class:"co-accordion__subheading",part:"subheading"},a("slot",{key:"1cefb67a4b6809357ee9a5a9330ec3bcd3be42ab",name:"subheading"},this.subheading))),a("button",{key:"fef96df91611513ab6f6074578a31c3e7b23b4c2",class:"co-accordion__caret",type:"button","aria-expanded":this.open?"true":"false","aria-label":this.heading||"Toggle section",disabled:this.disabled,onClick:this.handleToggle,part:"caret"},a("co-icon",{key:"f32612853d42ea6f2c34b2554951b22d155d1afc",name:"caret-up",size:20}))),a("div",{key:"c3c90907e7114f20a917bae025012464182b8ea4",class:"co-accordion__body",part:"body"},a("div",{key:"44877e54213ae200cde25d5a2fb5ae4ed95b7df9",class:"co-accordion__body-inner",part:"body-inner"},a("slot",{key:"4ad41bab50239bb4ddca8ee8751afeb6dfb19227"}))))}get el(){return this}static get style(){return":host{display:block}.co-accordion{display:flex;flex-direction:column;width:100%}.co-accordion__header{display:flex;align-items:center;justify-content:space-between;gap:var(--co-spacing-sm, 6px);width:100%;font-family:var(--co-font-family-primary);color:var(--co-semantic-text-default);text-align:left}.co-accordion__heading-group{flex:1;min-width:0;display:flex;flex-direction:column;gap:var(--co-spacing-xxs, 2px);cursor:pointer}.co-accordion__heading{font-size:var(--co-font-size-24);font-weight:500;line-height:1.25;letter-spacing:-0.03em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.co-accordion__subheading{font-size:var(--co-font-size-14);font-weight:400;line-height:1.3;letter-spacing:normal;color:var(--co-semantic-text-secondary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.co-accordion__caret{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:none;background:transparent;border-radius:var(--co-border-radius-full, 9999px);color:var(--co-semantic-text-default);cursor:pointer;transition:transform var(--co-motion-duration-base) var(--co-motion-ease-out), background-color var(--co-motion-duration-fast) var(--co-motion-ease-out);transform:rotate(180deg);}.co-accordion__caret:hover:not(:disabled){background:var(--co-color-opacity-negro-8, rgba(31, 28, 27, 0.08))}.co-accordion--open .co-accordion__caret{transform:rotate(0deg);}.co-accordion__body{display:grid;grid-template-rows:0fr;transition:grid-template-rows var(--co-motion-duration-slow) var(--co-motion-ease-out)}.co-accordion__body-inner{min-height:0;overflow:hidden;padding-top:var(--co-spacing-md);transition:padding-top var(--co-motion-duration-slow) var(--co-motion-ease-out)}.co-accordion:not(.co-accordion--open) .co-accordion__body-inner{padding-top:0}.co-accordion--open .co-accordion__body{grid-template-rows:1fr}.co-accordion:not(.co-accordion--open) .co-accordion__body-inner{visibility:hidden;transition:padding-top var(--co-motion-duration-slow) var(--co-motion-ease-out), visibility 0s linear var(--co-motion-duration-slow)}.co-accordion--open .co-accordion__body-inner{visibility:visible;transition:padding-top var(--co-motion-duration-slow) var(--co-motion-ease-out), visibility 0s linear 0s}.co-accordion__caret:focus-visible{outline:2px solid var(--co-color-primary-azul, #2563eb);outline-offset:2px}.co-accordion--disabled .co-accordion__header{opacity:0.5}.co-accordion--disabled .co-accordion__caret{cursor:not-allowed}.co-accordion--disabled .co-accordion__heading-group{cursor:default}"}},[257,"co-accordion",{open:[1540],heading:[1],subheading:[1],disabled:[4],hasSubheadingSlot:[32]}]);function d(){"undefined"!=typeof customElements&&["co-accordion","co-icon"].forEach((e=>{switch(e){case"co-accordion":customElements.get(o(e))||customElements.define(o(e),r);break;case"co-icon":customElements.get(o(e))||t()}}))}d();const s=r,l=d;export{s as CoAccordion,l as defineCustomElement}
@@ -1 +1 @@
1
- import{t as a,p as i,H as o,c as t,h as e}from"./index.js";import{d as n}from"./p-KK2vAKs-.js";import{d as s}from"./p-DsuFNmTI.js";const c=i(class extends o{constructor(a){super(),!1!==a&&this.__registerHost(),this.__attachShadow(),this.coDismiss=t(this,"coDismiss",7),this.open=!1,this.dismissible=!0,this.position="none",this.liveText="",this.animated=!1,this.handleDismiss=()=>{this.coDismiss.emit()}}onLabelChange(a){void 0!==this.liveTimer&&clearTimeout(this.liveTimer),this.liveTimer=setTimeout((()=>{this.liveTimer=void 0,this.liveText=null!=a?a:""}),600)}componentWillLoad(){var a;this.liveText=null!==(a=this.label)&&void 0!==a?a:""}componentDidLoad(){const a=()=>this.animated=!0;"function"==typeof requestAnimationFrame?this.rafId=requestAnimationFrame(a):a()}disconnectedCallback(){void 0!==this.liveTimer&&(clearTimeout(this.liveTimer),this.liveTimer=void 0),void 0!==this.rafId&&"function"==typeof cancelAnimationFrame&&(cancelAnimationFrame(this.rafId),this.rafId=void 0)}render(){return e("div",{key:"142b59b00b772502ea25dfb13537b9b3dd546080",class:{"co-action-bar":!0,"co-action-bar--open":this.open,"co-action-bar--animated":this.animated},part:"bar",role:"group","aria-label":this.ariaLabelText||this.label,"aria-hidden":this.open?null:"true"},e("span",{key:"8d250df3de2ac4a0c656f90e43f113d0cf2725e2",class:"co-action-bar__live","aria-live":"polite"},this.liveText),e("span",{key:"0787a2c1d6a145dd95c6cca688b8a410c50dd8db",class:"co-action-bar__label",part:"label"},e("slot",{key:"ece9079fc9e5a06a75b4f9ff4da8d5b9c0362bbf",name:"label"},this.label)),e("div",{key:"29a587420ce044ee0fa1502bef229c15ab287a79",class:"co-action-bar__actions",part:"actions"},e("slot",{key:"359ce62b1f45b4c3292ee575b5a4bcf9c684fc07"})),!1!==this.dismissible&&e("co-icon-button",{key:"66439f013f0e3de6f184f6e600cd1eb5bca3b004",class:"co-action-bar__dismiss",part:"dismiss",icon:"x",variant:"ghost",surface:"dark",size:"xs",label:"Dismiss",onClick:this.handleDismiss}))}static get watchers(){return{label:[{onLabelChange:0}]}}static get style(){return":host{display:inline-flex;font-family:var(--co-font-family-primary);pointer-events:none}:host([position='bottom-center']){position:fixed;left:50%;transform:translateX(-50%);bottom:var(--co-action-bar-offset, 24px);z-index:var(--co-action-bar-z, 1000);max-width:calc(100% - 2 * var(--co-action-bar-inline-margin, 24px))}.co-action-bar{position:relative;display:flex;align-items:center;box-sizing:border-box;max-width:100%;gap:var(--co-spacing-sm2);padding:var(--co-spacing-sm2) var(--co-spacing-md) var(--co-spacing-sm2) var(--co-spacing-lg);border-radius:var(--co-border-radius-lg);background:var(--co-semantic-surface-primary);color:var(--co-semantic-text-inverse);box-shadow:var(--co-shadow-lg);opacity:0;transform:translateY(8px);pointer-events:none;visibility:hidden}.co-action-bar--open{opacity:1;transform:translateY(0);pointer-events:auto;visibility:visible}.co-action-bar--animated{transition:opacity var(--co-motion-duration-base) var(--co-motion-ease-out), transform var(--co-motion-duration-base) var(--co-motion-ease-out), visibility 0s linear var(--co-motion-duration-base)}.co-action-bar--animated.co-action-bar--open{transition:opacity var(--co-motion-duration-base) var(--co-motion-ease-out), transform var(--co-motion-duration-base) var(--co-motion-ease-out), visibility 0s}.co-action-bar__label{font-size:var(--co-font-size-14);font-weight:500;letter-spacing:var(--co-font-letter-spacing-body);line-height:1;white-space:nowrap;flex-shrink:0;padding-right:var(--co-spacing-xs)}.co-action-bar__actions{display:flex;align-items:center;gap:var(--co-spacing-xs);min-width:0}::slotted(hr){width:1px;height:24px;flex-shrink:0;align-self:center;margin:0 var(--co-spacing-xs);border:none;padding:0;background:color-mix(in srgb, var(--co-color-base-blanco, #fff) 28%, transparent)}.co-action-bar__dismiss{flex-shrink:0}.co-action-bar__live{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap}"}},[257,"co-action-bar",{open:[516],label:[1],dismissible:[4],position:[513],ariaLabelText:[1,"aria-label-text"],liveText:[32],animated:[32]},void 0,{label:[{onLabelChange:0}]}]);function r(){"undefined"!=typeof customElements&&["co-action-bar","co-icon","co-icon-button"].forEach((i=>{switch(i){case"co-action-bar":customElements.get(a(i))||customElements.define(a(i),c);break;case"co-icon":customElements.get(a(i))||n();break;case"co-icon-button":customElements.get(a(i))||s()}}))}r();const l=c,b=r;export{l as CoActionBar,b as defineCustomElement}
1
+ import{t as a,p as i,H as o,c as t,h as e}from"./index.js";import{d as n}from"./p-qMNHMnvI.js";import{d as s}from"./p-B70R6xWE.js";const c=i(class extends o{constructor(a){super(),!1!==a&&this.__registerHost(),this.__attachShadow(),this.coDismiss=t(this,"coDismiss",7),this.open=!1,this.dismissible=!0,this.position="none",this.liveText="",this.animated=!1,this.handleDismiss=()=>{this.coDismiss.emit()}}onLabelChange(a){void 0!==this.liveTimer&&clearTimeout(this.liveTimer),this.liveTimer=setTimeout((()=>{this.liveTimer=void 0,this.liveText=null!=a?a:""}),600)}componentWillLoad(){var a;this.liveText=null!==(a=this.label)&&void 0!==a?a:""}componentDidLoad(){const a=()=>this.animated=!0;"function"==typeof requestAnimationFrame?this.rafId=requestAnimationFrame(a):a()}disconnectedCallback(){void 0!==this.liveTimer&&(clearTimeout(this.liveTimer),this.liveTimer=void 0),void 0!==this.rafId&&"function"==typeof cancelAnimationFrame&&(cancelAnimationFrame(this.rafId),this.rafId=void 0)}render(){return e("div",{key:"142b59b00b772502ea25dfb13537b9b3dd546080",class:{"co-action-bar":!0,"co-action-bar--open":this.open,"co-action-bar--animated":this.animated},part:"bar",role:"group","aria-label":this.ariaLabelText||this.label,"aria-hidden":this.open?null:"true"},e("span",{key:"8d250df3de2ac4a0c656f90e43f113d0cf2725e2",class:"co-action-bar__live","aria-live":"polite"},this.liveText),e("span",{key:"0787a2c1d6a145dd95c6cca688b8a410c50dd8db",class:"co-action-bar__label",part:"label"},e("slot",{key:"ece9079fc9e5a06a75b4f9ff4da8d5b9c0362bbf",name:"label"},this.label)),e("div",{key:"29a587420ce044ee0fa1502bef229c15ab287a79",class:"co-action-bar__actions",part:"actions"},e("slot",{key:"359ce62b1f45b4c3292ee575b5a4bcf9c684fc07"})),!1!==this.dismissible&&e("co-icon-button",{key:"66439f013f0e3de6f184f6e600cd1eb5bca3b004",class:"co-action-bar__dismiss",part:"dismiss",icon:"x",variant:"ghost",surface:"dark",size:"xs",label:"Dismiss",onClick:this.handleDismiss}))}static get watchers(){return{label:[{onLabelChange:0}]}}static get style(){return":host{display:inline-flex;font-family:var(--co-font-family-primary);--co-surface-dark-ink:var(--co-semantic-on-primary);pointer-events:none}:host([position='bottom-center']){position:fixed;left:50%;transform:translateX(-50%);bottom:var(--co-action-bar-offset, 24px);z-index:var(--co-action-bar-z, 1000);max-width:calc(100% - 2 * var(--co-action-bar-inline-margin, 24px))}.co-action-bar{position:relative;display:flex;align-items:center;box-sizing:border-box;max-width:100%;gap:var(--co-spacing-sm2);padding:var(--co-spacing-sm2) var(--co-spacing-md) var(--co-spacing-sm2) var(--co-spacing-lg);border-radius:var(--co-border-radius-lg);background:var(--co-semantic-surface-primary);color:var(--co-semantic-text-inverse);box-shadow:var(--co-shadow-lg);opacity:0;transform:translateY(8px);pointer-events:none;visibility:hidden}.co-action-bar--open{opacity:1;transform:translateY(0);pointer-events:auto;visibility:visible}.co-action-bar--animated{transition:opacity var(--co-motion-duration-base) var(--co-motion-ease-out), transform var(--co-motion-duration-base) var(--co-motion-ease-out), visibility 0s linear var(--co-motion-duration-base)}.co-action-bar--animated.co-action-bar--open{transition:opacity var(--co-motion-duration-base) var(--co-motion-ease-out), transform var(--co-motion-duration-base) var(--co-motion-ease-out), visibility 0s}.co-action-bar__label{font-size:var(--co-font-size-14);font-weight:500;letter-spacing:var(--co-font-letter-spacing-body);line-height:1;white-space:nowrap;flex-shrink:0;padding-right:var(--co-spacing-xs)}.co-action-bar__actions{display:flex;align-items:center;gap:var(--co-spacing-xs);min-width:0}::slotted(hr){width:1px;height:24px;flex-shrink:0;align-self:center;margin:0 var(--co-spacing-xs);border:none;padding:0;background:color-mix(in srgb, var(--co-surface-dark-ink, var(--co-color-base-blanco, #fff)) 28%, transparent)}.co-action-bar__dismiss{flex-shrink:0}.co-action-bar__live{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap}"}},[257,"co-action-bar",{open:[516],label:[1],dismissible:[4],position:[513],ariaLabelText:[1,"aria-label-text"],liveText:[32],animated:[32]},void 0,{label:[{onLabelChange:0}]}]);function r(){"undefined"!=typeof customElements&&["co-action-bar","co-icon","co-icon-button"].forEach((i=>{switch(i){case"co-action-bar":customElements.get(a(i))||customElements.define(a(i),c);break;case"co-icon":customElements.get(a(i))||n();break;case"co-icon-button":customElements.get(a(i))||s()}}))}r();const l=c,d=r;export{l as CoActionBar,d as defineCustomElement}
@@ -1 +1 @@
1
- import{t as a,p as r,H as e,c as o,h as c,a as s}from"./index.js";const t=r(class extends e{constructor(a){super(),!1!==a&&this.__registerHost(),this.__attachShadow(),this.coSidebarModeChange=o(this,"coSidebarModeChange",7),this.sidebarMode="min",this.contentCard=!0}render(){return c(s,{key:"94ecab3775bfc41a8579c1d1c76c9312160aebad"},c("aside",{key:"3ddf6675b4d7ce1697c48e3e5885c1e303cdbc5f",class:"sidebar",part:"sidebar"},c("div",{key:"b64ecb693c193e4c8b4ac1e2facce961487e56cf",class:"sidebar__header",part:"sidebar-header"},c("slot",{key:"83d961e15824aea7b5fa7cc9da616d2e05da0cce",name:"sidebar-header"})),c("div",{key:"971f6ae8a723d811f2062963ab370a803284d5f8",class:"sidebar__body",part:"sidebar-body"},c("slot",{key:"be55e67e6344346e92eaf086fa139bc3e763949d",name:"sidebar"})),c("div",{key:"5b6680a3368ce37e0e34f99e8544e0007d1131c2",class:"sidebar__footer",part:"sidebar-footer"},c("slot",{key:"b0f72b695b2d5fd89e30d64982f9f43370c81341",name:"sidebar-footer"}))),c("div",{key:"fa85fc8ea88350e90df48e3853429641d6527014",class:"main co-sq-elevation co-sq-elevation-fallback",part:"main"},c("div",{key:"7a258e3649bb03756d8e56c69e1777bb9006cd53",class:"main__card co-sq-clip",part:"card"},c("header",{key:"bdfc99ad70e4c9772da3e8c99d631d2f7cbd7436",class:"main__header",part:"header"},c("slot",{key:"f697503aac1963ba4c86e57d45e5e5a3fe4781ee",name:"navbar"})),c("main",{key:"ca66e612ed04f5f829a0b75ac509c01012a6b4a5",class:{main__content:!0,"main__content--card":this.contentCard},part:"content"},c("slot",{key:"b99b1ea67e4ae8c059a3dcb03c0a04bbc2af569b"})))))}static get style(){return'.co-sq-elevation{border-radius:var(--co-sq-r);corner-shape:squircle;box-shadow:var(--co-sq-shadow)}.co-sq-clip{overflow:hidden;border-radius:var(--co-sq-r);corner-shape:squircle}@supports not (corner-shape: squircle){.co-sq-elevation{box-shadow:none}.co-sq-elevation-fallback{filter:var(--co-sq-drop-shadow)}.co-sq-clip{border-radius:0;--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>");-webkit-mask:var(--co-sq-tl) top left / var(--co-sq-r) var(--co-sq-r) no-repeat, var(--co-sq-tr) top right / var(--co-sq-r) var(--co-sq-r) no-repeat, var(--co-sq-bl) bottom left / var(--co-sq-r) var(--co-sq-r) no-repeat, var(--co-sq-br) bottom right / var(--co-sq-r) var(--co-sq-r) no-repeat, linear-gradient(#fff 0 0) center / 100% calc(100% - 2 * var(--co-sq-r) + 2px) no-repeat, linear-gradient(#fff 0 0) center / calc(100% - 2 * var(--co-sq-r) + 2px) 100% no-repeat;mask:var(--co-sq-tl) top left / var(--co-sq-r) var(--co-sq-r) no-repeat, var(--co-sq-tr) top right / var(--co-sq-r) var(--co-sq-r) no-repeat, var(--co-sq-bl) bottom left / var(--co-sq-r) var(--co-sq-r) no-repeat, var(--co-sq-br) bottom right / var(--co-sq-r) var(--co-sq-r) no-repeat, linear-gradient(#fff 0 0) center / 100% calc(100% - 2 * var(--co-sq-r) + 2px) no-repeat, linear-gradient(#fff 0 0) center / calc(100% - 2 * var(--co-sq-r) + 2px) 100% no-repeat}}: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 var(--co-motion-duration-base) var(--co-motion-ease-out);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;contain:layout;--co-shell-r:var(--co-border-radius-md);--co-sq-r:var(--co-shell-r);--co-sq-shadow:var(--co-app-shell-shadow, 0 1px 4px rgba(31, 28, 27, 0.06), 0 10px 56px rgba(31, 28, 27, 0.12));--co-sq-drop-shadow:var(--co-app-shell-drop-shadow, drop-shadow(0 1px 2px rgba(31, 28, 27, 0.06)) drop-shadow(0 10px 28px rgba(31, 28, 27, 0.12)))}.main__card{flex:1;min-height:0;display:flex;flex-direction:column}.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)}'}},[257,"co-app-shell",{sidebarMode:[1537,"sidebar-mode"],contentCard:[4,"content-card"]}]);function i(){"undefined"!=typeof customElements&&["co-app-shell"].forEach((r=>{"co-app-shell"===r&&(customElements.get(a(r))||customElements.define(a(r),t))}))}i();const d=t,n=i;export{d as CoAppShell,n as defineCustomElement}
1
+ import{t as a,p as r,H as e,c as o,h as s,a as t}from"./index.js";const c=r(class extends e{constructor(a){super(),!1!==a&&this.__registerHost(),this.__attachShadow(),this.coSidebarModeChange=o(this,"coSidebarModeChange",7),this.sidebarMode="min",this.contentCard=!0}render(){return s(t,{key:"94ecab3775bfc41a8579c1d1c76c9312160aebad"},s("aside",{key:"3ddf6675b4d7ce1697c48e3e5885c1e303cdbc5f",class:"sidebar",part:"sidebar"},s("div",{key:"b64ecb693c193e4c8b4ac1e2facce961487e56cf",class:"sidebar__header",part:"sidebar-header"},s("slot",{key:"83d961e15824aea7b5fa7cc9da616d2e05da0cce",name:"sidebar-header"})),s("div",{key:"971f6ae8a723d811f2062963ab370a803284d5f8",class:"sidebar__body",part:"sidebar-body"},s("slot",{key:"be55e67e6344346e92eaf086fa139bc3e763949d",name:"sidebar"})),s("div",{key:"5b6680a3368ce37e0e34f99e8544e0007d1131c2",class:"sidebar__footer",part:"sidebar-footer"},s("slot",{key:"b0f72b695b2d5fd89e30d64982f9f43370c81341",name:"sidebar-footer"}))),s("div",{key:"fa85fc8ea88350e90df48e3853429641d6527014",class:"main co-sq-elevation co-sq-elevation-fallback",part:"main"},s("div",{key:"7a258e3649bb03756d8e56c69e1777bb9006cd53",class:"main__card co-sq-clip",part:"card"},s("header",{key:"bdfc99ad70e4c9772da3e8c99d631d2f7cbd7436",class:"main__header",part:"header"},s("slot",{key:"f697503aac1963ba4c86e57d45e5e5a3fe4781ee",name:"navbar"})),s("main",{key:"ca66e612ed04f5f829a0b75ac509c01012a6b4a5",class:{main__content:!0,"main__content--card":this.contentCard},part:"content"},s("slot",{key:"b99b1ea67e4ae8c059a3dcb03c0a04bbc2af569b"})))))}static get style(){return'.co-sq-elevation{border-radius:var(--co-sq-r);corner-shape:squircle;box-shadow:var(--co-sq-shadow)}.co-sq-clip{overflow:hidden;border-radius:var(--co-sq-r);corner-shape:squircle}@supports not (corner-shape: squircle){.co-sq-elevation{box-shadow:none}.co-sq-elevation-fallback{filter:var(--co-sq-drop-shadow)}.co-sq-clip{border-radius:0;--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>");-webkit-mask:var(--co-sq-tl) top left / var(--co-sq-r) var(--co-sq-r) no-repeat, var(--co-sq-tr) top right / var(--co-sq-r) var(--co-sq-r) no-repeat, var(--co-sq-bl) bottom left / var(--co-sq-r) var(--co-sq-r) no-repeat, var(--co-sq-br) bottom right / var(--co-sq-r) var(--co-sq-r) no-repeat, linear-gradient(#fff 0 0) center / 100% calc(100% - 2 * var(--co-sq-r) + 2px) no-repeat, linear-gradient(#fff 0 0) center / calc(100% - 2 * var(--co-sq-r) + 2px) 100% no-repeat;mask:var(--co-sq-tl) top left / var(--co-sq-r) var(--co-sq-r) no-repeat, var(--co-sq-tr) top right / var(--co-sq-r) var(--co-sq-r) no-repeat, var(--co-sq-bl) bottom left / var(--co-sq-r) var(--co-sq-r) no-repeat, var(--co-sq-br) bottom right / var(--co-sq-r) var(--co-sq-r) no-repeat, linear-gradient(#fff 0 0) center / 100% calc(100% - 2 * var(--co-sq-r) + 2px) no-repeat, linear-gradient(#fff 0 0) center / calc(100% - 2 * var(--co-sq-r) + 2px) 100% no-repeat}}: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 var(--co-motion-duration-base) var(--co-motion-ease-out);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;contain:layout;--co-shell-r:var(--co-border-radius-md);--co-sq-r:var(--co-shell-r);--co-sq-shadow:var(--co-app-shell-shadow, 0 1px 4px rgba(31, 28, 27, 0.06), 0 10px 56px rgba(31, 28, 27, 0.12));--co-sq-drop-shadow:var(--co-app-shell-drop-shadow, drop-shadow(0 1px 2px rgba(31, 28, 27, 0.06)) drop-shadow(0 10px 28px rgba(31, 28, 27, 0.12)))}.main__card{flex:1;min-height:0;display:flex;flex-direction:column}.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-semantic-border-default) 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-semantic-border-default)}.main__content:hover::-webkit-scrollbar-thumb:hover{background:var(--co-semantic-border-field)}.main__content:hover::-webkit-scrollbar-thumb:active{background:var(--co-semantic-border-strong)}.main__content--card{background:var(--co-semantic-surface-secondary)}'}},[257,"co-app-shell",{sidebarMode:[1537,"sidebar-mode"],contentCard:[4,"content-card"]}]);function i(){"undefined"!=typeof customElements&&["co-app-shell"].forEach((r=>{"co-app-shell"===r&&(customElements.get(a(r))||customElements.define(a(r),c))}))}i();const d=c,n=i;export{d as CoAppShell,n as defineCustomElement}
@@ -1 +1 @@
1
- import{t,p as i,H as a,c as e,h as s}from"./index.js";import{d as o}from"./p-KK2vAKs-.js";function r(t){if(!Number.isFinite(t)||t<0)return"--:--";const i=Math.floor(t);return`${Math.floor(i/60)}:${(""+i%60).padStart(2,"0")}`}function n(t,i){const a=t.length;if(!a||i<=0)return[];const e=Math.max(1,Math.floor(a/i)),s=[];for(let o=0;o<i;o++){let i=0;const r=o*e;for(let s=r;s<r+e&&s<a;s++){const a=Math.abs(t[s]);a>i&&(i=a)}s.push(.12+.88*i)}return s}function h(t,i=65536){const a=t.length,e=Math.max(1,Math.ceil(a/Math.max(1,i))),s=Math.ceil(a/e),o=new Float32Array(s);for(let i=0;i<s;i++){let s=0;const r=Math.min(a,(i+1)*e);for(let a=i*e;a<r;a++){const i=Math.abs(t[a]);i>s&&(s=i)}o[i]=s}return{peaks:o,blockSize:e,length:a}}function c(t){if(t<=0)return[];const i=[];for(let a=0;a<t;a++)i.push(.12+(.6*Math.sin(a/Math.max(1,t)*Math.PI)+.3)*(.75+.25*Math.abs(Math.sin(1.7*a)))*.88);return i}const d=new Map,l=new Map;function u(t,i){for(d.delete(t),d.set(t,i);d.size>16;)d.delete(d.keys().next().value)}function p(t,i,a=f){const e=d.get(t);if(e)return u(t,e),Promise.resolve(e);const s=l.get(t);if(s)return i&&s.wanted.add(i),s.promise;const o=new Set(i?[i]:[]),r=a(t,o).then((i=>(l.delete(t),i&&u(t,i),i)),(i=>{throw l.delete(t),i}));return l.set(t,{promise:r,wanted:o}),r}async function f(t,i=new Set){var a;let e;try{const a=window.OfflineAudioContext||window.webkitOfflineAudioContext,s=window.AudioContext||window.webkitAudioContext;if(!a&&!s||"undefined"==typeof fetch)return null;e=a?new a(1,1,44100):new s;const o=await(await fetch(t)).arrayBuffer(),r=await e.decodeAudioData(o),n=r.getChannelData(0);return{envelope:h(n),exact:y(n,i),duration:r.duration}}finally{try{await(null===(a=null==e?void 0:e.close)||void 0===a?void 0:a.call(e))}catch(t){}}}function y(t,i){const a=new Map;for(const e of i){const i=e();i>0&&!a.has(i)&&a.set(i,n(t,i))}return a}const b=i(class extends a{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.coPlay=e(this,"coPlay",7),this.coPause=e(this,"coPause",7),this.coEnded=e(this,"coEnded",7),this.coError=e(this,"coError",7),this.coTimeUpdate=e(this,"coTimeUpdate",3),this.compact=!1,this.bars=64,this.barDensity=3,this.preload="metadata",this.downloadFilename="audio",this.noDownload=!1,this.isPlaying=!1,this.isLoading=!1,this.hasError=!1,this.currentTime=0,this.duration=NaN,this.peaks=[],this.containerWidth=0,this.playbackRate=1,this.peakEnvelope=null,this.exactPeaks=null,this.decodedDuration=NaN,this.loadToken=0,this.onMeta=()=>{this.syncDuration(),this.applyPendingSeek()},this.pendingSeek=null,this.onCanPlay=()=>{this.isLoading=!1,this.applyPendingSeek()},this.onWaiting=()=>{this.isLoading=!0},this.onTime=()=>{var t;this.currentTime=(null===(t=this.audio)||void 0===t?void 0:t.currentTime)||0,this.coTimeUpdate.emit({currentTime:this.currentTime,duration:this.knownDuration})},this.onEnded=()=>{this.isPlaying=!1,this.currentTime=0,this.coEnded.emit()},this.onErr=t=>{this.isLoading=!1,this.hasError=!0,this.coError.emit(t)},this.toggle=()=>{this.audio&&!this.hasError&&(this.isPlaying?(this.audio.pause(),this.isPlaying=!1,this.coPause.emit()):this.audio.play().then((()=>{this.isPlaying=!0,this.coPlay.emit()})).catch((()=>{})))},this.SPEEDS=[1,1.5,2,.5],this.cycleSpeed=()=>{const t=this.SPEEDS.indexOf(this.playbackRate);this.playbackRate=this.SPEEDS[(t+1)%this.SPEEDS.length],this.audio&&(this.audio.playbackRate=this.playbackRate)},this.seekAt=t=>{const i=this.knownDuration;if(!this.audio||!this.waveEl||!i)return;const a=function(t,i){return i.width?Math.max(0,Math.min(1,(t-i.left)/i.width)):0}(t,this.waveEl.getBoundingClientRect());this.audio.currentTime=a*i,this.currentTime=this.audio.currentTime},this.onWaveKey=t=>{if(" "===t.key||"Enter"===t.key)return t.preventDefault(),void this.toggle();if(!this.audio)return;const i=this.knownDuration,a=this.audio.currentTime;if("ArrowRight"===t.key)this.audio.currentTime=i?Math.min(i,a+5):a+5;else{if("ArrowLeft"!==t.key)return;this.audio.currentTime=Math.max(0,a-5)}this.currentTime=this.audio.currentTime}}get knownDuration(){return Number.isFinite(this.duration)&&this.duration>0?this.duration:0}get effectiveBars(){return this.containerWidth>0?Math.max(24,Math.floor(this.containerWidth/this.barDensity)):this.bars}componentWillLoad(){this.init()}componentDidLoad(){if("undefined"==typeof ResizeObserver||!this.waveEl)return;this.resizeObserver=new ResizeObserver((t=>{var i;for(const a of t){const t=(null===(i=a.contentRect)||void 0===i?void 0:i.width)||a.target.clientWidth||0;t>2&&Math.abs(t-this.containerWidth)>2&&(this.containerWidth=t,this.rebuildBars())}})),this.resizeObserver.observe(this.waveEl);const t=this.waveEl.clientWidth||0;t>2&&(this.containerWidth=t,this.rebuildBars())}disconnectedCallback(){var t;this.loadToken++,this.teardown(),null===(t=this.resizeObserver)||void 0===t||t.disconnect(),this.resizeObserver=void 0}onSrcChange(){this.init()}rebuildBars(){this.peaks=this.peakEnvelope?this.decodedBars(this.effectiveBars):c(this.effectiveBars)}decodedBars(t){var i,a;return null!==(a=null===(i=this.exactPeaks)||void 0===i?void 0:i.get(t))&&void 0!==a?a:function(t,i){const{peaks:a,blockSize:e,length:s}=t;if(!s||i<=0)return[];const o=Math.max(1,Math.floor(s/i)),r=[];for(let t=0;t<i;t++){const i=t*o,n=Math.min(i+o,s);let h=0;if(i<n){const t=Math.floor((n-1)/e);for(let s=Math.floor(i/e);s<=t;s++)a[s]>h&&(h=a[s])}r.push(.12+.88*h)}return r}(this.peakEnvelope,t)}init(){this.teardown();const t=++this.loadToken;if(this.peakEnvelope=null,this.exactPeaks=null,this.decodedDuration=NaN,this.peaks=c(this.effectiveBars),this.currentTime=0,this.duration=NaN,this.playbackRate=1,this.hasError=!1,!this.src)return;if(this.isLoading=!0,this.extractPeaks(this.src,t),"undefined"==typeof Audio)return;const i=new Audio;i.preload=this.preload,i.crossOrigin="anonymous",i.src=this.src,i.addEventListener("loadedmetadata",this.onMeta),i.addEventListener("timeupdate",this.onTime),i.addEventListener("ended",this.onEnded),i.addEventListener("error",this.onErr),i.addEventListener("canplay",this.onCanPlay),i.addEventListener("waiting",this.onWaiting),this.audio=i}teardown(){this.audio&&(this.audio.pause(),this.audio.removeEventListener("loadedmetadata",this.onMeta),this.audio.removeEventListener("timeupdate",this.onTime),this.audio.removeEventListener("ended",this.onEnded),this.audio.removeEventListener("error",this.onErr),this.audio.removeEventListener("canplay",this.onCanPlay),this.audio.removeEventListener("waiting",this.onWaiting),this.audio.src="",this.audio=void 0),this.isPlaying=!1}async extractPeaks(t,i){try{const a=await p(t,(()=>i===this.loadToken?this.effectiveBars:0));if(i!==this.loadToken)return;if(!a)return;this.peakEnvelope=a.envelope,this.exactPeaks=a.exact,this.decodedDuration=a.duration,this.peaks=this.decodedBars(this.effectiveBars)}catch(t){if(i!==this.loadToken)return;this.peakEnvelope=null,this.exactPeaks=null,this.decodedDuration=NaN,this.peaks=c(this.effectiveBars)}i===this.loadToken&&this.syncDuration()}syncDuration(){var t,i;const a=function(t,i){return Number.isFinite(t)&&t>0?t:Number.isFinite(i)&&i>0?i:NaN}(null!==(i=null===(t=this.audio)||void 0===t?void 0:t.duration)&&void 0!==i?i:NaN,this.decodedDuration);Object.is(a,this.duration)||(this.duration=a)}applyPendingSeek(){if(null==this.pendingSeek||!this.audio)return;const t=this.pendingSeek;this.pendingSeek=null,this.audio.currentTime=t,this.currentTime=this.audio.currentTime,this.coTimeUpdate.emit({currentTime:this.currentTime,duration:this.knownDuration})}async seek(t){var i;if(!this.audio||!Number.isFinite(t))return;const a=this.knownDuration,e=Math.max(0,a?Math.min(a,t):t);this.audio.currentTime=e,Math.abs((null!==(i=this.audio.currentTime)&&void 0!==i?i:0)-e)>.05&&(this.pendingSeek=e),this.currentTime=e,this.coTimeUpdate.emit({currentTime:this.currentTime,duration:a})}async play(){if(this.audio&&!this.isPlaying&&!this.hasError)try{await this.audio.play(),this.isPlaying=!0,this.coPlay.emit()}catch(t){}}async download(){if(this.src&&"undefined"!=typeof fetch)try{const t=await(await fetch(this.src)).blob(),i=URL.createObjectURL(t),a=document.createElement("a");a.href=i,a.download=this.downloadFilename,document.body.appendChild(a),a.click(),a.remove(),URL.revokeObjectURL(i)}catch(t){}}render(){const t=Math.max(1,3*this.peaks.length),i=this.knownDuration,a=i?this.currentTime/i*100:0,e=i?Math.floor(i):void 0,o=(t,i,a=!1)=>s("rect",{key:"a3d5a225a904e22ba9905ef8198fa7e1b14e0e2f",x:3*i,y:20-40*t/2,width:1.8,height:Math.max(40*t,2),rx:.6,class:{"co-audio-player__bar":!0,"co-audio-player__bar--played":a}});return s("div",{key:"afbbf524713a1146653e69928ee21e263202315f",class:{"co-audio-player":!0,"co-audio-player--compact":this.compact,"co-audio-player--error":this.hasError,"co-audio-player--playing":this.isPlaying},part:"player"},s("button",{key:"5918385fbd8fb6fad4795e1a75eed5d073e0654c",type:"button",class:"co-audio-player__play",part:"play","aria-label":this.hasError?"Audio no disponible":this.isPlaying?"Pausar":"Reproducir","aria-busy":this.isLoading?"true":"false",disabled:this.hasError||!this.src,onClick:this.toggle},s("co-icon",{key:"e7a566257df253914593712bd20029bb8f1bcdfd",name:this.hasError?"warning-circle":this.isPlaying?"pause":"play",weight:"fill",size:this.compact?12:14})),s("div",{key:"70488015726d0c966fa3e738d9f2893d71b99ebf",class:"co-audio-player__wave",part:"wave",role:"slider",tabindex:"0","aria-label":"Progreso de reproducción","aria-valuemin":0,"aria-valuemax":e,"aria-valuenow":Math.floor(this.currentTime),ref:t=>this.waveEl=t,onClick:t=>this.seekAt(t.clientX),onKeyDown:this.onWaveKey},s("svg",{key:"8c70e4f74537e5f8ab6f66bc0da464a72507e81c",class:"co-audio-player__svg",viewBox:`0 0 ${t} 40`,preserveAspectRatio:"none","aria-hidden":"true"},this.peaks.map(((t,i)=>o(t,i))),s("clipPath",{key:"f0d37d76b3d6ab09dbd09582c8657b3fe7cb8c4c",id:"co-ap-clip"},s("rect",{key:"436de0ce10f98c868760c76505d134f3db2dbb54",x:"0",y:"0",width:a/100*t,height:40})),s("g",{key:"939a1a8851d6e41b4d3c37d7201f87a6403830bb","clip-path":"url(#co-ap-clip)"},this.peaks.map(((t,i)=>o(t,i,!0)))))),s("span",{key:"bd57bdd97a780864aa633ec5174d4f733799a278",class:"co-audio-player__time",part:"time"},r(this.currentTime)," / ",r(this.duration)),!this.compact&&s("button",{key:"d1f559546da0b0f97009afca79fe922ce569e67f",type:"button",class:"co-audio-player__speed",part:"speed","aria-label":`Velocidad de reproducción ${this.playbackRate}x`,onClick:this.cycleSpeed},this.playbackRate,"x"),!this.compact&&!this.noDownload&&s("button",{key:"a1503b85bb2edf02566dcad9b8e83b1fea20b159",type:"button",class:"co-audio-player__dl",part:"download","aria-label":"Descargar",onClick:()=>this.download()},s("co-icon",{key:"dc96b8afdb8036e76a0c515d76c625460f4fc44d",name:"download-simple",size:14})))}static get watchers(){return{src:[{onSrcChange:0}]}}static get style(){return":host{display:block;font-family:var(--co-font-family-primary)}.co-audio-player{display:flex;align-items:center;gap:var(--co-spacing-md);padding:var(--co-spacing-sm) var(--co-spacing-md);border:1px solid var(--co-semantic-border-default);border-radius:var(--co-border-radius-xs);background:var(--co-semantic-surface-secondary);min-width:180px}.co-audio-player--compact{gap:var(--co-spacing-sm2);padding:var(--co-spacing-sm2) var(--co-spacing-sm);min-width:140px}.co-audio-player__play{flex:0 0 auto;width:28px;height:28px;border:none;border-radius:50%;cursor:pointer;background:var(--co-semantic-surface-primary);color:var(--co-semantic-text-inverse);display:inline-flex;align-items:center;justify-content:center}.co-audio-player--compact .co-audio-player__play{width:24px;height:24px}.co-audio-player__play:disabled{opacity:.5;cursor:not-allowed}.co-audio-player__play:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:2px}.co-audio-player__wave{flex:1;height:40px;min-width:0;cursor:pointer;display:flex;align-items:center}.co-audio-player__wave:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:2px;border-radius:var(--co-border-radius-xxs)}.co-audio-player__svg{width:100%;height:100%;display:block}.co-audio-player__bar{fill:var(--co-semantic-border-field);transition:fill var(--co-motion-duration-fast)}.co-audio-player__wave:hover .co-audio-player__bar{fill:var(--co-semantic-text-muted)}.co-audio-player__bar--played{fill:var(--co-semantic-surface-primary)}.co-audio-player__time{flex:0 0 auto;font-size:var(--co-font-size-12);color:var(--co-semantic-text-muted);font-variant-numeric:tabular-nums;min-width:62px;text-align:right}.co-audio-player__speed{flex:0 0 auto;border:none;background:transparent;cursor:pointer;padding:2px 4px;color:var(--co-semantic-text-muted);font-family:var(--co-font-family-primary);font-size:var(--co-font-size-12);font-variant-numeric:tabular-nums;min-width:34px;text-align:center}.co-audio-player__speed:hover{color:var(--co-semantic-text-default)}.co-audio-player__speed:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:2px;border-radius:var(--co-border-radius-xxs)}.co-audio-player__dl{flex:0 0 auto;border:none;background:transparent;cursor:pointer;padding:2px;color:var(--co-semantic-text-muted);display:inline-flex}.co-audio-player__dl:hover{color:var(--co-semantic-text-default)}.co-audio-player__dl:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:2px}.co-audio-player--error .co-audio-player__wave{opacity:.5}.co-audio-player--error .co-audio-player__play{background:var(--co-color-status-error);color:var(--co-semantic-text-inverse);opacity:1}"}},[1,"co-audio-player",{src:[1],compact:[4],bars:[2],barDensity:[2,"bar-density"],preload:[1],downloadFilename:[1,"download-filename"],noDownload:[4,"no-download"],isPlaying:[32],isLoading:[32],hasError:[32],currentTime:[32],duration:[32],peaks:[32],containerWidth:[32],playbackRate:[32],seek:[64],play:[64]},void 0,{src:[{onSrcChange:0}]}]);function m(){"undefined"!=typeof customElements&&["co-audio-player","co-icon"].forEach((i=>{switch(i){case"co-audio-player":customElements.get(t(i))||customElements.define(t(i),b);break;case"co-icon":customElements.get(t(i))||o()}}))}m();const v=b,w=m;export{v as CoAudioPlayer,w as defineCustomElement}
1
+ import{t,p as i,H as a,c as e,h as s}from"./index.js";import{d as o}from"./p-qMNHMnvI.js";function r(t){if(!Number.isFinite(t)||t<0)return"--:--";const i=Math.floor(t);return`${Math.floor(i/60)}:${(""+i%60).padStart(2,"0")}`}function n(t,i){const a=t.length;if(!a||i<=0)return[];const e=Math.max(1,Math.floor(a/i)),s=[];for(let o=0;o<i;o++){let i=0;const r=o*e;for(let s=r;s<r+e&&s<a;s++){const a=Math.abs(t[s]);a>i&&(i=a)}s.push(.12+.88*i)}return s}function h(t,i=65536){const a=t.length,e=Math.max(1,Math.ceil(a/Math.max(1,i))),s=Math.ceil(a/e),o=new Float32Array(s);for(let i=0;i<s;i++){let s=0;const r=Math.min(a,(i+1)*e);for(let a=i*e;a<r;a++){const i=Math.abs(t[a]);i>s&&(s=i)}o[i]=s}return{peaks:o,blockSize:e,length:a}}function c(t){if(t<=0)return[];const i=[];for(let a=0;a<t;a++)i.push(.12+(.6*Math.sin(a/Math.max(1,t)*Math.PI)+.3)*(.75+.25*Math.abs(Math.sin(1.7*a)))*.88);return i}const d=new Map,l=new Map;function u(t,i){for(d.delete(t),d.set(t,i);d.size>16;)d.delete(d.keys().next().value)}function p(t,i,a=f){const e=d.get(t);if(e)return u(t,e),Promise.resolve(e);const s=l.get(t);if(s)return i&&s.wanted.add(i),s.promise;const o=new Set(i?[i]:[]),r=a(t,o).then((i=>(l.delete(t),i&&u(t,i),i)),(i=>{throw l.delete(t),i}));return l.set(t,{promise:r,wanted:o}),r}async function f(t,i=new Set){var a;let e;try{const a=window.OfflineAudioContext||window.webkitOfflineAudioContext,s=window.AudioContext||window.webkitAudioContext;if(!a&&!s||"undefined"==typeof fetch)return null;e=a?new a(1,1,44100):new s;const o=await(await fetch(t)).arrayBuffer(),r=await e.decodeAudioData(o),n=r.getChannelData(0);return{envelope:h(n),exact:y(n,i),duration:r.duration}}finally{try{await(null===(a=null==e?void 0:e.close)||void 0===a?void 0:a.call(e))}catch(t){}}}function y(t,i){const a=new Map;for(const e of i){const i=e();i>0&&!a.has(i)&&a.set(i,n(t,i))}return a}const b=i(class extends a{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.coPlay=e(this,"coPlay",7),this.coPause=e(this,"coPause",7),this.coEnded=e(this,"coEnded",7),this.coError=e(this,"coError",7),this.coTimeUpdate=e(this,"coTimeUpdate",3),this.compact=!1,this.bars=64,this.barDensity=3,this.preload="metadata",this.downloadFilename="audio",this.noDownload=!1,this.isPlaying=!1,this.isLoading=!1,this.hasError=!1,this.currentTime=0,this.duration=NaN,this.peaks=[],this.containerWidth=0,this.playbackRate=1,this.peakEnvelope=null,this.exactPeaks=null,this.decodedDuration=NaN,this.loadToken=0,this.onMeta=()=>{this.syncDuration(),this.applyPendingSeek()},this.pendingSeek=null,this.onCanPlay=()=>{this.isLoading=!1,this.applyPendingSeek()},this.onWaiting=()=>{this.isLoading=!0},this.onTime=()=>{var t;this.currentTime=(null===(t=this.audio)||void 0===t?void 0:t.currentTime)||0,this.coTimeUpdate.emit({currentTime:this.currentTime,duration:this.knownDuration})},this.onEnded=()=>{this.isPlaying=!1,this.currentTime=0,this.coEnded.emit()},this.onErr=t=>{this.isLoading=!1,this.hasError=!0,this.coError.emit(t)},this.toggle=()=>{this.audio&&!this.hasError&&(this.isPlaying?(this.audio.pause(),this.isPlaying=!1,this.coPause.emit()):this.audio.play().then((()=>{this.isPlaying=!0,this.coPlay.emit()})).catch((()=>{})))},this.SPEEDS=[1,1.5,2,.5],this.cycleSpeed=()=>{const t=this.SPEEDS.indexOf(this.playbackRate);this.playbackRate=this.SPEEDS[(t+1)%this.SPEEDS.length],this.audio&&(this.audio.playbackRate=this.playbackRate)},this.seekAt=t=>{const i=this.knownDuration;if(!this.audio||!this.waveEl||!i)return;const a=function(t,i){return i.width?Math.max(0,Math.min(1,(t-i.left)/i.width)):0}(t,this.waveEl.getBoundingClientRect());this.audio.currentTime=a*i,this.currentTime=this.audio.currentTime},this.onWaveKey=t=>{if(" "===t.key||"Enter"===t.key)return t.preventDefault(),void this.toggle();if(!this.audio)return;const i=this.knownDuration,a=this.audio.currentTime;if("ArrowRight"===t.key)this.audio.currentTime=i?Math.min(i,a+5):a+5;else{if("ArrowLeft"!==t.key)return;this.audio.currentTime=Math.max(0,a-5)}this.currentTime=this.audio.currentTime}}get knownDuration(){return Number.isFinite(this.duration)&&this.duration>0?this.duration:0}get effectiveBars(){return this.containerWidth>0?Math.max(24,Math.floor(this.containerWidth/this.barDensity)):this.bars}componentWillLoad(){this.init()}componentDidLoad(){if("undefined"==typeof ResizeObserver||!this.waveEl)return;this.resizeObserver=new ResizeObserver((t=>{var i;for(const a of t){const t=(null===(i=a.contentRect)||void 0===i?void 0:i.width)||a.target.clientWidth||0;t>2&&Math.abs(t-this.containerWidth)>2&&(this.containerWidth=t,this.rebuildBars())}})),this.resizeObserver.observe(this.waveEl);const t=this.waveEl.clientWidth||0;t>2&&(this.containerWidth=t,this.rebuildBars())}disconnectedCallback(){var t;this.loadToken++,this.teardown(),null===(t=this.resizeObserver)||void 0===t||t.disconnect(),this.resizeObserver=void 0}onSrcChange(){this.init()}rebuildBars(){this.peaks=this.peakEnvelope?this.decodedBars(this.effectiveBars):c(this.effectiveBars)}decodedBars(t){var i,a;return null!==(a=null===(i=this.exactPeaks)||void 0===i?void 0:i.get(t))&&void 0!==a?a:function(t,i){const{peaks:a,blockSize:e,length:s}=t;if(!s||i<=0)return[];const o=Math.max(1,Math.floor(s/i)),r=[];for(let t=0;t<i;t++){const i=t*o,n=Math.min(i+o,s);let h=0;if(i<n){const t=Math.floor((n-1)/e);for(let s=Math.floor(i/e);s<=t;s++)a[s]>h&&(h=a[s])}r.push(.12+.88*h)}return r}(this.peakEnvelope,t)}init(){this.teardown();const t=++this.loadToken;if(this.peakEnvelope=null,this.exactPeaks=null,this.decodedDuration=NaN,this.peaks=c(this.effectiveBars),this.currentTime=0,this.duration=NaN,this.playbackRate=1,this.hasError=!1,!this.src)return;if(this.isLoading=!0,this.extractPeaks(this.src,t),"undefined"==typeof Audio)return;const i=new Audio;i.preload=this.preload,i.crossOrigin="anonymous",i.src=this.src,i.addEventListener("loadedmetadata",this.onMeta),i.addEventListener("timeupdate",this.onTime),i.addEventListener("ended",this.onEnded),i.addEventListener("error",this.onErr),i.addEventListener("canplay",this.onCanPlay),i.addEventListener("waiting",this.onWaiting),this.audio=i}teardown(){this.audio&&(this.audio.pause(),this.audio.removeEventListener("loadedmetadata",this.onMeta),this.audio.removeEventListener("timeupdate",this.onTime),this.audio.removeEventListener("ended",this.onEnded),this.audio.removeEventListener("error",this.onErr),this.audio.removeEventListener("canplay",this.onCanPlay),this.audio.removeEventListener("waiting",this.onWaiting),this.audio.src="",this.audio=void 0),this.isPlaying=!1}async extractPeaks(t,i){try{const a=await p(t,(()=>i===this.loadToken?this.effectiveBars:0));if(i!==this.loadToken)return;if(!a)return;this.peakEnvelope=a.envelope,this.exactPeaks=a.exact,this.decodedDuration=a.duration,this.peaks=this.decodedBars(this.effectiveBars)}catch(t){if(i!==this.loadToken)return;this.peakEnvelope=null,this.exactPeaks=null,this.decodedDuration=NaN,this.peaks=c(this.effectiveBars)}i===this.loadToken&&this.syncDuration()}syncDuration(){var t,i;const a=function(t,i){return Number.isFinite(t)&&t>0?t:Number.isFinite(i)&&i>0?i:NaN}(null!==(i=null===(t=this.audio)||void 0===t?void 0:t.duration)&&void 0!==i?i:NaN,this.decodedDuration);Object.is(a,this.duration)||(this.duration=a)}applyPendingSeek(){if(null==this.pendingSeek||!this.audio)return;const t=this.pendingSeek;this.pendingSeek=null,this.audio.currentTime=t,this.currentTime=this.audio.currentTime,this.coTimeUpdate.emit({currentTime:this.currentTime,duration:this.knownDuration})}async seek(t){var i;if(!this.audio||!Number.isFinite(t))return;const a=this.knownDuration,e=Math.max(0,a?Math.min(a,t):t);this.audio.currentTime=e,Math.abs((null!==(i=this.audio.currentTime)&&void 0!==i?i:0)-e)>.05&&(this.pendingSeek=e),this.currentTime=e,this.coTimeUpdate.emit({currentTime:this.currentTime,duration:a})}async play(){if(this.audio&&!this.isPlaying&&!this.hasError)try{await this.audio.play(),this.isPlaying=!0,this.coPlay.emit()}catch(t){}}async download(){if(this.src&&"undefined"!=typeof fetch)try{const t=await(await fetch(this.src)).blob(),i=URL.createObjectURL(t),a=document.createElement("a");a.href=i,a.download=this.downloadFilename,document.body.appendChild(a),a.click(),a.remove(),URL.revokeObjectURL(i)}catch(t){}}render(){const t=Math.max(1,3*this.peaks.length),i=this.knownDuration,a=i?this.currentTime/i*100:0,e=i?Math.floor(i):void 0,o=(t,i,a=!1)=>s("rect",{key:"a3d5a225a904e22ba9905ef8198fa7e1b14e0e2f",x:3*i,y:20-40*t/2,width:1.8,height:Math.max(40*t,2),rx:.6,class:{"co-audio-player__bar":!0,"co-audio-player__bar--played":a}});return s("div",{key:"afbbf524713a1146653e69928ee21e263202315f",class:{"co-audio-player":!0,"co-audio-player--compact":this.compact,"co-audio-player--error":this.hasError,"co-audio-player--playing":this.isPlaying},part:"player"},s("button",{key:"5918385fbd8fb6fad4795e1a75eed5d073e0654c",type:"button",class:"co-audio-player__play",part:"play","aria-label":this.hasError?"Audio no disponible":this.isPlaying?"Pausar":"Reproducir","aria-busy":this.isLoading?"true":"false",disabled:this.hasError||!this.src,onClick:this.toggle},s("co-icon",{key:"e7a566257df253914593712bd20029bb8f1bcdfd",name:this.hasError?"warning-circle":this.isPlaying?"pause":"play",weight:"fill",size:this.compact?12:14})),s("div",{key:"70488015726d0c966fa3e738d9f2893d71b99ebf",class:"co-audio-player__wave",part:"wave",role:"slider",tabindex:"0","aria-label":"Progreso de reproducción","aria-valuemin":0,"aria-valuemax":e,"aria-valuenow":Math.floor(this.currentTime),ref:t=>this.waveEl=t,onClick:t=>this.seekAt(t.clientX),onKeyDown:this.onWaveKey},s("svg",{key:"8c70e4f74537e5f8ab6f66bc0da464a72507e81c",class:"co-audio-player__svg",viewBox:`0 0 ${t} 40`,preserveAspectRatio:"none","aria-hidden":"true"},this.peaks.map(((t,i)=>o(t,i))),s("clipPath",{key:"f0d37d76b3d6ab09dbd09582c8657b3fe7cb8c4c",id:"co-ap-clip"},s("rect",{key:"436de0ce10f98c868760c76505d134f3db2dbb54",x:"0",y:"0",width:a/100*t,height:40})),s("g",{key:"939a1a8851d6e41b4d3c37d7201f87a6403830bb","clip-path":"url(#co-ap-clip)"},this.peaks.map(((t,i)=>o(t,i,!0)))))),s("span",{key:"bd57bdd97a780864aa633ec5174d4f733799a278",class:"co-audio-player__time",part:"time"},r(this.currentTime)," / ",r(this.duration)),!this.compact&&s("button",{key:"d1f559546da0b0f97009afca79fe922ce569e67f",type:"button",class:"co-audio-player__speed",part:"speed","aria-label":`Velocidad de reproducción ${this.playbackRate}x`,onClick:this.cycleSpeed},this.playbackRate,"x"),!this.compact&&!this.noDownload&&s("button",{key:"a1503b85bb2edf02566dcad9b8e83b1fea20b159",type:"button",class:"co-audio-player__dl",part:"download","aria-label":"Descargar",onClick:()=>this.download()},s("co-icon",{key:"dc96b8afdb8036e76a0c515d76c625460f4fc44d",name:"download-simple",size:14})))}static get watchers(){return{src:[{onSrcChange:0}]}}static get style(){return":host{display:block;font-family:var(--co-font-family-primary)}.co-audio-player{display:flex;align-items:center;gap:var(--co-spacing-md);padding:var(--co-spacing-sm) var(--co-spacing-md);border:1px solid var(--co-semantic-border-default);border-radius:var(--co-border-radius-xs);background:var(--co-semantic-surface-secondary);min-width:180px}.co-audio-player--compact{gap:var(--co-spacing-sm2);padding:var(--co-spacing-sm2) var(--co-spacing-sm);min-width:140px}.co-audio-player__play{flex:0 0 auto;width:28px;height:28px;border:none;border-radius:50%;cursor:pointer;background:var(--co-semantic-surface-primary);color:var(--co-semantic-text-inverse);display:inline-flex;align-items:center;justify-content:center}.co-audio-player--compact .co-audio-player__play{width:24px;height:24px}.co-audio-player__play:disabled{opacity:.5;cursor:not-allowed}.co-audio-player__play:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:2px}.co-audio-player__wave{flex:1;height:40px;min-width:0;cursor:pointer;display:flex;align-items:center}.co-audio-player__wave:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:2px;border-radius:var(--co-border-radius-xxs)}.co-audio-player__svg{width:100%;height:100%;display:block}.co-audio-player__bar{fill:var(--co-semantic-border-field);transition:fill var(--co-motion-duration-fast)}.co-audio-player__wave:hover .co-audio-player__bar{fill:var(--co-semantic-text-muted)}.co-audio-player__bar--played{fill:var(--co-semantic-surface-primary)}.co-audio-player__time{flex:0 0 auto;font-size:var(--co-font-size-12);color:var(--co-semantic-text-muted);font-variant-numeric:tabular-nums;min-width:62px;text-align:right}.co-audio-player__speed{flex:0 0 auto;border:none;background:transparent;cursor:pointer;padding:2px 4px;color:var(--co-semantic-text-muted);font-family:var(--co-font-family-primary);font-size:var(--co-font-size-12);font-variant-numeric:tabular-nums;min-width:34px;text-align:center}.co-audio-player__speed:hover{color:var(--co-semantic-text-default)}.co-audio-player__speed:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:2px;border-radius:var(--co-border-radius-xxs)}.co-audio-player__dl{flex:0 0 auto;border:none;background:transparent;cursor:pointer;padding:2px;color:var(--co-semantic-text-muted);display:inline-flex}.co-audio-player__dl:hover{color:var(--co-semantic-text-default)}.co-audio-player__dl:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:2px}.co-audio-player--error .co-audio-player__wave{opacity:.5}.co-audio-player--error .co-audio-player__play{background:var(--co-color-status-error);color:var(--co-semantic-text-inverse);opacity:1}"}},[1,"co-audio-player",{src:[1],compact:[4],bars:[2],barDensity:[2,"bar-density"],preload:[1],downloadFilename:[1,"download-filename"],noDownload:[4,"no-download"],isPlaying:[32],isLoading:[32],hasError:[32],currentTime:[32],duration:[32],peaks:[32],containerWidth:[32],playbackRate:[32],seek:[64],play:[64]},void 0,{src:[{onSrcChange:0}]}]);function m(){"undefined"!=typeof customElements&&["co-audio-player","co-icon"].forEach((i=>{switch(i){case"co-audio-player":customElements.get(t(i))||customElements.define(t(i),b);break;case"co-icon":customElements.get(t(i))||o()}}))}m();const v=b,w=m;export{v as CoAudioPlayer,w as defineCustomElement}