@prolibu-suite/cobalt-core 0.10.0 → 0.10.2
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.
- package/custom-elements.json +481 -35
- package/dist/cjs/co-accordion.cjs.entry.js +33 -4
- package/dist/cjs/co-action-bar.cjs.entry.js +1 -1
- package/dist/cjs/co-audio-player.cjs.entry.js +82 -12
- package/dist/cjs/co-avatar.cjs.entry.js +72 -0
- package/dist/cjs/co-button.cjs.entry.js +1 -1
- package/dist/cjs/co-calendar_3.cjs.entry.js +7 -3
- package/dist/cjs/co-checkbox.cjs.entry.js +3 -3
- package/dist/cjs/co-chip_2.cjs.entry.js +68 -14
- package/dist/cjs/co-color-picker.cjs.entry.js +40 -10
- package/dist/cjs/co-column-picker.cjs.entry.js +1 -1
- package/dist/cjs/co-combobox.cjs.entry.js +1 -1
- package/dist/cjs/co-command-search.cjs.entry.js +1 -1
- package/dist/cjs/co-data-table.cjs.entry.js +82 -4
- package/dist/cjs/co-date-range-picker.cjs.entry.js +3 -1
- package/dist/cjs/co-emoji-picker.cjs.entry.js +1 -1
- package/dist/cjs/co-file-type-tile.cjs.entry.js +23 -7
- package/dist/cjs/co-input.cjs.entry.js +6 -2
- package/dist/cjs/co-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/co-modal.cjs.entry.js +7 -3
- package/dist/cjs/co-navbar.cjs.entry.js +2 -2
- package/dist/cjs/co-number-field.cjs.entry.js +3 -3
- package/dist/cjs/co-overlay.cjs.entry.js +1 -1
- package/dist/cjs/co-page-header.cjs.entry.js +1 -1
- package/dist/cjs/co-phone-field.cjs.entry.js +5 -5
- package/dist/cjs/co-progress-bar.cjs.entry.js +2 -2
- package/dist/cjs/co-progress-circle.cjs.entry.js +2 -2
- package/dist/cjs/co-provider-logo_2.cjs.entry.js +1 -1
- package/dist/cjs/co-radio.cjs.entry.js +3 -3
- package/dist/cjs/co-rating.cjs.entry.js +3 -3
- package/dist/cjs/co-ref-field.cjs.entry.js +100 -9
- package/dist/cjs/co-rich-text-editor.cjs.entry.js +30 -10
- package/dist/cjs/co-rich-text-toolbar.cjs.entry.js +5 -2
- package/dist/cjs/co-rich-text-viewer.cjs.entry.js +19 -3
- package/dist/cjs/co-row.cjs.entry.js +2 -2
- package/dist/cjs/co-select.cjs.entry.js +8 -8
- package/dist/cjs/co-separator.cjs.entry.js +1 -1
- package/dist/cjs/co-sidebar-nav.cjs.entry.js +1 -1
- package/dist/cjs/co-sidebar.cjs.entry.js +2 -2
- package/dist/cjs/co-slider.cjs.entry.js +2 -2
- package/dist/cjs/co-switch.cjs.entry.js +3 -3
- package/dist/cjs/co-tab-group.cjs.entry.js +2 -2
- package/dist/cjs/co-tab.cjs.entry.js +2 -2
- package/dist/cjs/co-tags-field.cjs.entry.js +5 -5
- package/dist/cjs/co-textarea.cjs.entry.js +4 -4
- package/dist/cjs/co-time-field.cjs.entry.js +1 -1
- package/dist/cjs/co-toggle-button-group.cjs.entry.js +3 -3
- package/dist/cjs/co-toggle-button.cjs.entry.js +3 -3
- package/dist/cjs/{co-avatar_2.cjs.entry.js → co-tooltip.cjs.entry.js} +2 -70
- package/dist/cjs/co-video.cjs.entry.js +2 -2
- package/dist/cjs/cobalt.cjs.js +1 -1
- package/dist/cjs/{index-BYwrR87Z.js → index-2kMmd5-a.js} +6717 -6654
- package/dist/cjs/index-MDAnKsze.js +16 -12
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{normalizeText-B-v-XPKf.js → normalizeText-D9rlJWZa.js} +29 -18
- package/dist/cjs/{toolbar-config-BSGas-Wl.js → toolbar-config-CYACt9hh.js} +13 -1
- package/dist/cobalt/cobalt.esm.js +1 -1
- package/dist/cobalt/{p-82266f11.entry.js → p-000a15b8.entry.js} +1 -1
- package/dist/cobalt/{p-e01f9b9a.entry.js → p-0c004735.entry.js} +1 -1
- package/dist/cobalt/{p-16954cea.entry.js → p-11c5ce78.entry.js} +1 -1
- package/dist/cobalt/{p-c465d619.entry.js → p-1861fe41.entry.js} +1 -1
- package/dist/cobalt/p-1cc818ca.entry.js +1 -0
- package/dist/cobalt/p-216a63ee.entry.js +1 -0
- package/dist/cobalt/p-24196410.entry.js +1 -0
- package/dist/cobalt/{p-4d897896.entry.js → p-28764b8e.entry.js} +1 -1
- package/dist/cobalt/{p-1a589c8e.entry.js → p-292b0389.entry.js} +1 -1
- package/dist/cobalt/{p-73c6d735.entry.js → p-2a30c143.entry.js} +1 -1
- package/dist/cobalt/{p-e8a4e6b0.entry.js → p-2c9dba2f.entry.js} +1 -1
- package/dist/cobalt/{p-83ea631d.entry.js → p-39a50e7f.entry.js} +1 -1
- package/dist/cobalt/p-39dc4ec8.entry.js +1 -0
- package/dist/cobalt/{p-325b91b6.entry.js → p-3d31c575.entry.js} +1 -1
- package/dist/cobalt/p-416795f5.entry.js +1 -0
- package/dist/cobalt/{p-37f5036b.entry.js → p-49834b8e.entry.js} +1 -1
- package/dist/cobalt/{p-54c987d7.entry.js → p-5a3e4c81.entry.js} +1 -1
- package/dist/cobalt/p-5c756787.entry.js +1 -0
- package/dist/cobalt/{p-27a7e549.entry.js → p-67f3b9d6.entry.js} +1 -1
- package/dist/cobalt/{p-bd683db3.entry.js → p-6a4f3179.entry.js} +1 -1
- package/dist/cobalt/{p-b565104d.entry.js → p-6dd220e0.entry.js} +1 -1
- package/dist/cobalt/{p-eb063cc0.entry.js → p-71cbc53c.entry.js} +1 -1
- package/dist/cobalt/p-72e52af7.entry.js +1 -0
- package/dist/cobalt/{p-50bcc76f.entry.js → p-7b5c555c.entry.js} +1 -1
- package/dist/cobalt/{p-10b82207.entry.js → p-8471abe2.entry.js} +1 -1
- package/dist/cobalt/{p-fe7e8813.entry.js → p-8530ad16.entry.js} +1 -1
- package/dist/cobalt/p-8a74bf7d.entry.js +1 -0
- package/dist/cobalt/{p-ea20f048.entry.js → p-8ebc0c12.entry.js} +1 -1
- package/dist/cobalt/p-8f2199ff.entry.js +1 -0
- package/dist/cobalt/p-9246e09c.entry.js +1 -0
- package/dist/cobalt/p-99a655f6.entry.js +1 -0
- package/dist/cobalt/{p-DOL2zACE.js → p-BAYo-RBt.js} +1 -1
- package/dist/cobalt/p-Ba_v-MzM.js +1 -0
- package/dist/cobalt/{p-Bryf3-Js.js → p-CJW9H3Gi.js} +1 -1
- package/dist/cobalt/p-a1b422ca.entry.js +1 -0
- package/dist/cobalt/p-a2462d7a.entry.js +1 -0
- package/dist/cobalt/p-ade07307.entry.js +1 -0
- package/dist/cobalt/{p-5298c030.entry.js → p-b437eff6.entry.js} +1 -1
- package/dist/cobalt/p-b698188c.entry.js +1 -0
- package/dist/cobalt/{p-6bf6bc3e.entry.js → p-b821d9de.entry.js} +1 -1
- package/dist/cobalt/p-bde32f8b.entry.js +1 -0
- package/dist/cobalt/{p-92b092db.entry.js → p-be34e447.entry.js} +1 -1
- package/dist/cobalt/{p-ad33c40e.entry.js → p-c30b4cb5.entry.js} +1 -1
- package/dist/cobalt/p-c7d7d7f7.entry.js +1 -0
- package/dist/cobalt/{p-aae86f96.entry.js → p-d0b2c418.entry.js} +1 -1
- package/dist/cobalt/p-d375014b.entry.js +1 -0
- package/dist/cobalt/p-eadfd661.entry.js +1 -0
- package/dist/cobalt/p-ee149fd2.entry.js +1 -0
- package/dist/cobalt/p-ef301976.entry.js +1 -0
- package/dist/cobalt/{p-fd150cc6.entry.js → p-f7eb1a40.entry.js} +1 -1
- package/dist/cobalt/p-f9a7b7c6.entry.js +1 -0
- package/dist/cobalt/{p-f68dd124.entry.js → p-fb2d1144.entry.js} +1 -1
- package/dist/collection/components/co-accordion/co-accordion.css +11 -4
- package/dist/collection/components/co-accordion/co-accordion.js +37 -6
- package/dist/collection/components/co-action-bar/co-action-bar.css +9 -2
- package/dist/collection/components/co-audio-player/co-audio-player.js +138 -12
- package/dist/collection/components/co-autocomplete/co-autocomplete.js +1 -1
- package/dist/collection/components/co-avatar/co-avatar.css +22 -1
- package/dist/collection/components/co-avatar-group/co-avatar-group.js +1 -1
- package/dist/collection/components/co-button/co-button.css +15 -3
- package/dist/collection/components/co-calendar/co-calendar.css +10 -4
- package/dist/collection/components/co-calendar/co-calendar.js +6 -2
- package/dist/collection/components/co-checkbox/co-checkbox.js +22 -3
- package/dist/collection/components/co-checkbox-group/co-checkbox-group.js +1 -1
- package/dist/collection/components/co-color-picker/co-color-picker.js +40 -10
- package/dist/collection/components/co-combobox/co-combobox.js +1 -1
- package/dist/collection/components/co-command-search/co-command-search.js +1 -1
- package/dist/collection/components/co-data-table/co-data-table.css +63 -2
- package/dist/collection/components/co-data-table/co-data-table.js +59 -4
- package/dist/collection/components/co-data-table/headerTruncationLogic.js +34 -0
- package/dist/collection/components/co-date-range-picker/co-date-range-picker.css +13 -0
- package/dist/collection/components/co-date-range-picker/co-date-range-picker.js +4 -2
- package/dist/collection/components/co-file-type-tile/co-file-type-tile.js +4 -43
- package/dist/collection/components/co-file-type-tile/co-file-type-tile.utils.js +55 -0
- package/dist/collection/components/co-input/co-input.js +17 -5
- package/dist/collection/components/co-menu-item/co-menu-item.css +9 -0
- package/dist/collection/components/co-modal/co-modal.css +6 -0
- package/dist/collection/components/co-modal/co-modal.js +33 -2
- package/dist/collection/components/co-navbar/co-navbar.js +2 -2
- package/dist/collection/components/co-number-field/co-number-field.js +3 -3
- package/dist/collection/components/co-option-list/co-option-list.js +38 -7
- package/dist/collection/components/co-option-list/optionListLogic.js +31 -8
- package/dist/collection/components/co-overlay/co-overlay.js +1 -1
- package/dist/collection/components/co-page-header/co-page-header.js +1 -1
- package/dist/collection/components/co-phone-field/co-phone-field.js +5 -5
- package/dist/collection/components/co-popover/co-popover.js +1 -1
- package/dist/collection/components/co-progress-bar/co-progress-bar.js +2 -2
- package/dist/collection/components/co-progress-circle/co-progress-circle.js +2 -2
- package/dist/collection/components/co-radio/co-radio.js +3 -3
- package/dist/collection/components/co-radio-group/co-radio-group.js +1 -1
- package/dist/collection/components/co-rating/co-rating.js +3 -3
- package/dist/collection/components/co-ref-field/co-ref-field.css +40 -0
- package/dist/collection/components/co-ref-field/co-ref-field.js +207 -11
- package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.css +22 -0
- package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.js +48 -8
- package/dist/collection/components/co-rich-text-toolbar/co-rich-text-toolbar.css +52 -0
- package/dist/collection/components/co-rich-text-toolbar/co-rich-text-toolbar.js +25 -2
- package/dist/collection/components/co-rich-text-viewer/co-rich-text-viewer.css +5 -0
- package/dist/collection/components/co-rich-text-viewer/co-rich-text-viewer.js +17 -1
- package/dist/collection/components/co-row/co-row.js +2 -2
- package/dist/collection/components/co-segmented-bar/co-segmented-bar.js +1 -1
- package/dist/collection/components/co-select/co-select.js +28 -9
- package/dist/collection/components/co-separator/co-separator.js +1 -1
- package/dist/collection/components/co-sidebar/co-sidebar.js +2 -2
- package/dist/collection/components/co-sidebar-nav/co-sidebar-nav.js +1 -1
- package/dist/collection/components/co-skeleton/co-skeleton.js +1 -1
- package/dist/collection/components/co-slider/co-slider.js +2 -2
- package/dist/collection/components/co-switch/co-switch.js +3 -3
- package/dist/collection/components/co-tab/co-tab.js +2 -2
- package/dist/collection/components/co-tab-group/co-tab-group.js +2 -2
- package/dist/collection/components/co-tags-field/co-tags-field.js +5 -5
- package/dist/collection/components/co-textarea/co-textarea.js +4 -4
- package/dist/collection/components/co-time-field/co-time-field.js +1 -1
- package/dist/collection/components/co-toast/co-toast.js +2 -2
- package/dist/collection/components/co-toggle-button/co-toggle-button.css +6 -5
- package/dist/collection/components/co-toggle-button/co-toggle-button.js +2 -2
- package/dist/collection/components/co-toggle-button-group/co-toggle-button-group.css +9 -5
- package/dist/collection/components/co-toggle-button-group/co-toggle-button-group.js +2 -2
- package/dist/collection/components/co-tooltip/co-tooltip.js +2 -2
- package/dist/collection/components/co-transfer-list/co-transfer-list.js +1 -1
- package/dist/collection/components/co-video/co-video.js +2 -2
- package/dist/collection/utils/normalizeText.js +43 -0
- package/dist/components/co-accordion.js +1 -1
- package/dist/components/co-action-bar.js +1 -1
- package/dist/components/co-audio-player.js +1 -1
- package/dist/components/co-autocomplete.js +1 -1
- package/dist/components/co-avatar-group.js +1 -1
- package/dist/components/co-avatar.js +1 -1
- package/dist/components/co-button.js +1 -1
- package/dist/components/co-calendar-month.js +1 -1
- package/dist/components/co-calendar-timegrid.js +1 -1
- package/dist/components/co-calendar.js +1 -1
- package/dist/components/co-checkbox.js +1 -1
- package/dist/components/co-color-picker.js +1 -1
- package/dist/components/co-column-picker.js +1 -1
- package/dist/components/co-combobox.js +1 -1
- package/dist/components/co-command-search.js +1 -1
- package/dist/components/co-data-table.js +1 -1
- package/dist/components/co-date-picker.js +1 -1
- package/dist/components/co-date-range-picker.js +1 -1
- package/dist/components/co-date-range.js +1 -1
- package/dist/components/co-date-time-picker.js +1 -1
- package/dist/components/co-drawer.js +1 -1
- package/dist/components/co-drive-card.js +1 -1
- package/dist/components/co-emoji-picker.js +1 -1
- package/dist/components/co-event-calendar.js +1 -1
- package/dist/components/co-file-field.js +1 -1
- package/dist/components/co-file-type-tile.js +1 -1
- package/dist/components/co-input.js +1 -1
- package/dist/components/co-lightbox.js +1 -1
- package/dist/components/co-list-item.js +1 -1
- package/dist/components/co-menu-item.js +1 -1
- package/dist/components/co-modal.js +1 -1
- package/dist/components/co-navbar.js +1 -1
- package/dist/components/co-number-field.js +1 -1
- package/dist/components/co-option-list.js +1 -1
- package/dist/components/co-overlay.js +1 -1
- package/dist/components/co-page-header.js +1 -1
- package/dist/components/co-phone-field.js +1 -1
- package/dist/components/co-progress-bar.js +1 -1
- package/dist/components/co-progress-circle.js +1 -1
- package/dist/components/co-radio.js +1 -1
- package/dist/components/co-rating.js +1 -1
- package/dist/components/co-ref-field.js +1 -1
- package/dist/components/co-rich-text-editor.js +1 -1
- package/dist/components/co-rich-text-toolbar.js +1 -1
- package/dist/components/co-rich-text-viewer.js +1 -1
- package/dist/components/co-row.js +1 -1
- package/dist/components/co-select.js +1 -1
- package/dist/components/co-separator.js +1 -1
- package/dist/components/co-sidebar-nav.js +1 -1
- package/dist/components/co-sidebar.js +1 -1
- package/dist/components/co-skeleton.js +1 -1
- package/dist/components/co-slider.js +1 -1
- package/dist/components/co-switch.js +1 -1
- package/dist/components/co-tab-group.js +1 -1
- package/dist/components/co-tab.js +1 -1
- package/dist/components/co-tags-field.js +1 -1
- package/dist/components/co-textarea.js +1 -1
- package/dist/components/co-time-field.js +1 -1
- package/dist/components/co-toggle-button-group.js +1 -1
- package/dist/components/co-toggle-button.js +1 -1
- package/dist/components/co-tooltip.js +1 -1
- package/dist/components/co-video.js +1 -1
- package/dist/components/{p-CXPRaTuo.js → p-2EOI1nrz.js} +1 -1
- package/dist/components/p-7TncUlLN.js +1 -0
- package/dist/components/{p-DOL2zACE.js → p-BAYo-RBt.js} +1 -1
- package/dist/components/p-Ba_v-MzM.js +1 -0
- package/dist/components/p-BhCVadcA.js +1 -0
- package/dist/components/p-BrAFTkAn.js +1 -0
- package/dist/components/{p-DIo66nBr.js → p-Bsh0JMGf.js} +1 -1
- package/dist/components/{p-x4grh-eZ.js → p-CBTGN490.js} +1 -1
- package/dist/components/{p-Bryf3-Js.js → p-CJW9H3Gi.js} +1 -1
- package/dist/components/p-CWCYYQrF.js +1 -0
- package/dist/components/p-D7Lhxz7L.js +1 -0
- package/dist/components/{p-BxP8OBw6.js → p-DFlJMEJ-.js} +1 -1
- package/dist/components/p-DTPYZwaZ.js +1 -0
- package/dist/components/{p-Be_kyNRE.js → p-Dc_Kbari.js} +1 -1
- package/dist/components/{p-B1QFLcY9.js → p-Dcg4krSX.js} +1 -1
- package/dist/components/p-DrTRB8Ev.js +1 -0
- package/dist/components/{p-BBP5__CY.js → p-DvR45CLa.js} +1 -1
- package/dist/components/{p-CnX3L8aF.js → p-DxtNejr2.js} +1 -1
- package/dist/components/{p-DkDTmHCg.js → p-Nt4JJxbL.js} +1 -1
- package/dist/components/{p-Bv6U5y3d.js → p-uxdXViMV.js} +1 -1
- package/dist/esm/co-accordion.entry.js +33 -4
- package/dist/esm/co-action-bar.entry.js +1 -1
- package/dist/esm/co-audio-player.entry.js +82 -12
- package/dist/esm/co-avatar.entry.js +70 -0
- package/dist/esm/co-button.entry.js +1 -1
- package/dist/esm/co-calendar_3.entry.js +7 -3
- package/dist/esm/co-checkbox.entry.js +3 -3
- package/dist/esm/co-chip_2.entry.js +68 -14
- package/dist/esm/co-color-picker.entry.js +40 -10
- package/dist/esm/co-column-picker.entry.js +1 -1
- package/dist/esm/co-combobox.entry.js +1 -1
- package/dist/esm/co-command-search.entry.js +1 -1
- package/dist/esm/co-data-table.entry.js +82 -4
- package/dist/esm/co-date-range-picker.entry.js +3 -1
- package/dist/esm/co-emoji-picker.entry.js +1 -1
- package/dist/esm/co-file-type-tile.entry.js +23 -7
- package/dist/esm/co-input.entry.js +6 -2
- package/dist/esm/co-menu-item.entry.js +1 -1
- package/dist/esm/co-modal.entry.js +7 -3
- package/dist/esm/co-navbar.entry.js +2 -2
- package/dist/esm/co-number-field.entry.js +3 -3
- package/dist/esm/co-overlay.entry.js +1 -1
- package/dist/esm/co-page-header.entry.js +1 -1
- package/dist/esm/co-phone-field.entry.js +5 -5
- package/dist/esm/co-progress-bar.entry.js +2 -2
- package/dist/esm/co-progress-circle.entry.js +2 -2
- package/dist/esm/co-provider-logo_2.entry.js +1 -1
- package/dist/esm/co-radio.entry.js +3 -3
- package/dist/esm/co-rating.entry.js +3 -3
- package/dist/esm/co-ref-field.entry.js +100 -9
- package/dist/esm/co-rich-text-editor.entry.js +30 -10
- package/dist/esm/co-rich-text-toolbar.entry.js +5 -2
- package/dist/esm/co-rich-text-viewer.entry.js +19 -3
- package/dist/esm/co-row.entry.js +2 -2
- package/dist/esm/co-select.entry.js +8 -8
- package/dist/esm/co-separator.entry.js +1 -1
- package/dist/esm/co-sidebar-nav.entry.js +1 -1
- package/dist/esm/co-sidebar.entry.js +2 -2
- package/dist/esm/co-slider.entry.js +2 -2
- package/dist/esm/co-switch.entry.js +3 -3
- package/dist/esm/co-tab-group.entry.js +2 -2
- package/dist/esm/co-tab.entry.js +2 -2
- package/dist/esm/co-tags-field.entry.js +5 -5
- package/dist/esm/co-textarea.entry.js +4 -4
- package/dist/esm/co-time-field.entry.js +1 -1
- package/dist/esm/co-toggle-button-group.entry.js +3 -3
- package/dist/esm/co-toggle-button.entry.js +3 -3
- package/dist/esm/{co-avatar_2.entry.js → co-tooltip.entry.js} +3 -70
- package/dist/esm/co-video.entry.js +2 -2
- package/dist/esm/cobalt.js +1 -1
- package/dist/esm/{index-68iUQp5j.js → index-BBIYyvq-.js} +6717 -6654
- package/dist/esm/index-DH5lfRNj.js +16 -12
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{normalizeText-CQY6Ul7q.js → normalizeText-Ba_v-MzM.js} +29 -18
- package/dist/esm/{toolbar-config-DOL2zACE.js → toolbar-config-BAYo-RBt.js} +13 -1
- package/dist/types/components/co-accordion/co-accordion.d.ts +17 -2
- package/dist/types/components/co-audio-player/co-audio-player.d.ts +25 -0
- package/dist/types/components/co-checkbox/co-checkbox.d.ts +4 -0
- package/dist/types/components/co-color-picker/co-color-picker.d.ts +4 -2
- package/dist/types/components/co-data-table/co-data-table.d.ts +15 -0
- package/dist/types/components/co-data-table/headerTruncationLogic.d.ts +24 -0
- package/dist/types/components/co-file-type-tile/co-file-type-tile.utils.d.ts +12 -0
- package/dist/types/components/co-input/co-input.d.ts +5 -1
- package/dist/types/components/co-modal/co-modal.d.ts +10 -0
- package/dist/types/components/co-option-list/co-option-list.d.ts +13 -0
- package/dist/types/components/co-option-list/optionListLogic.d.ts +23 -6
- package/dist/types/components/co-ref-field/co-ref-field.d.ts +38 -0
- package/dist/types/components/co-rich-text-editor/co-rich-text-editor.d.ts +7 -0
- package/dist/types/components/co-rich-text-toolbar/co-rich-text-toolbar.d.ts +4 -1
- package/dist/types/components/co-select/co-select.d.ts +6 -0
- package/dist/types/components.d.ts +120 -14
- package/dist/types/utils/normalizeText.d.ts +13 -0
- package/package.json +2 -2
- package/dist/cobalt/p-15d59169.entry.js +0 -1
- package/dist/cobalt/p-1788aab5.entry.js +0 -1
- package/dist/cobalt/p-20a39218.entry.js +0 -1
- package/dist/cobalt/p-3cc3ff93.entry.js +0 -1
- package/dist/cobalt/p-4908f33f.entry.js +0 -1
- package/dist/cobalt/p-63825d7f.entry.js +0 -1
- package/dist/cobalt/p-66b11b38.entry.js +0 -1
- package/dist/cobalt/p-6f700f0d.entry.js +0 -1
- package/dist/cobalt/p-83a9a05a.entry.js +0 -1
- package/dist/cobalt/p-85501c6a.entry.js +0 -1
- package/dist/cobalt/p-88195a63.entry.js +0 -1
- package/dist/cobalt/p-8fa5dc4a.entry.js +0 -1
- package/dist/cobalt/p-CQY6Ul7q.js +0 -1
- package/dist/cobalt/p-b0c4fc71.entry.js +0 -1
- package/dist/cobalt/p-b1e8d69e.entry.js +0 -1
- package/dist/cobalt/p-b48917c9.entry.js +0 -1
- package/dist/cobalt/p-c124e82b.entry.js +0 -1
- package/dist/cobalt/p-c32c176a.entry.js +0 -1
- package/dist/cobalt/p-e48f4e45.entry.js +0 -1
- package/dist/cobalt/p-e8a2f993.entry.js +0 -1
- package/dist/cobalt/p-eb8691f2.entry.js +0 -1
- package/dist/cobalt/p-ef5ca521.entry.js +0 -1
- package/dist/components/p-9ceBPSd1.js +0 -1
- package/dist/components/p-B2IsXte7.js +0 -1
- package/dist/components/p-BsTO1uUA.js +0 -1
- package/dist/components/p-CFFDmGPS.js +0 -1
- package/dist/components/p-CQY6Ul7q.js +0 -1
- package/dist/components/p-Cl3AdEQJ.js +0 -1
- package/dist/components/p-HxVRXXXC.js +0 -1
- package/dist/components/p-vby0ITbe.js +0 -1
|
@@ -2,12 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
var index = require('./index-MDAnKsze.js');
|
|
4
4
|
|
|
5
|
-
const coAccordionCss = () => `: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)}.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-
|
|
5
|
+
const coAccordionCss = () => `: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}`;
|
|
6
6
|
|
|
7
|
+
/** Native controls, ARIA widgets and Cobalt fields: a click on them is theirs, not a toggle. */
|
|
8
|
+
const INTERACTIVE_SELECTOR = [
|
|
9
|
+
'a[href]', 'button', 'input', 'select', 'textarea', 'label', 'summary', '[contenteditable="true"]',
|
|
10
|
+
'[role="button"]', '[role="link"]', '[role="checkbox"]', '[role="switch"]', '[role="menuitem"]', '[role="tab"]',
|
|
11
|
+
'co-button', 'co-icon-button', 'co-switch', 'co-checkbox', 'co-radio', 'co-chip', 'co-input', 'co-select',
|
|
12
|
+
'co-combobox', 'co-autocomplete', 'co-ref-field', 'co-number-field', 'co-toggle-button', 'co-menu',
|
|
13
|
+
].join(',');
|
|
14
|
+
function isInteractive(node) {
|
|
15
|
+
const el = node;
|
|
16
|
+
return typeof el.matches === 'function' && el.matches(INTERACTIVE_SELECTOR);
|
|
17
|
+
}
|
|
7
18
|
const CoAccordion = class {
|
|
8
19
|
constructor(hostRef) {
|
|
9
20
|
index.registerInstance(this, hostRef);
|
|
10
|
-
this.coToggle = index.createEvent(this, "coToggle",
|
|
21
|
+
this.coToggle = index.createEvent(this, "coToggle", 3);
|
|
11
22
|
/** Whether the section is expanded. */
|
|
12
23
|
this.open = true;
|
|
13
24
|
/** Section heading text (used when the `header` slot is empty). */
|
|
@@ -24,6 +35,24 @@ const CoAccordion = class {
|
|
|
24
35
|
this.open = !this.open;
|
|
25
36
|
this.coToggle.emit(this.open);
|
|
26
37
|
};
|
|
38
|
+
/**
|
|
39
|
+
* The heading group is a convenience trigger: a click on its text toggles, a
|
|
40
|
+
* click that started on interactive content slotted into `header`/`subheading`
|
|
41
|
+
* does not. Walks the composed path (slotted light DOM included) up to the
|
|
42
|
+
* heading group looking for anything focusable/actionable.
|
|
43
|
+
*/
|
|
44
|
+
this.handleHeadingClick = (ev) => {
|
|
45
|
+
if (this.disabled)
|
|
46
|
+
return;
|
|
47
|
+
const group = ev.currentTarget;
|
|
48
|
+
for (const node of ev.composedPath()) {
|
|
49
|
+
if (node === group)
|
|
50
|
+
break;
|
|
51
|
+
if (isInteractive(node))
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
this.handleToggle();
|
|
55
|
+
};
|
|
27
56
|
}
|
|
28
57
|
componentWillLoad() {
|
|
29
58
|
this.hasSubheadingSlot = !!this.el.querySelector('[slot="subheading"]');
|
|
@@ -36,11 +65,11 @@ const CoAccordion = class {
|
|
|
36
65
|
return !!(this.subheading && this.subheading.trim()) || this.hasSubheadingSlot;
|
|
37
66
|
}
|
|
38
67
|
render() {
|
|
39
|
-
return (index.h("div", { key: '
|
|
68
|
+
return (index.h("div", { key: '5b02028e29aae87aa6377833042b2fa3d24bd9b6', class: {
|
|
40
69
|
'co-accordion': true,
|
|
41
70
|
'co-accordion--open': this.open,
|
|
42
71
|
'co-accordion--disabled': this.disabled,
|
|
43
|
-
}, part: "accordion" }, index.h("div", { key: '
|
|
72
|
+
}, part: "accordion" }, index.h("div", { key: '7d27e1b5cce6eefa1adc68dc7f7b34f9888dc484', class: "co-accordion__header", part: "header" }, index.h("span", { key: '1cfc8da7316afb37b0a2d2b79266646339842029', class: "co-accordion__heading-group", onClick: this.handleHeadingClick }, index.h("span", { key: 'ec95bf00c0f34b9fdd03b2ec399eba72cc7d9099', class: "co-accordion__heading", part: "heading" }, index.h("slot", { key: 'c90344072032603e2103272001b8918cba7b65a8', name: "header" }, this.heading)), this.showSubheading && (index.h("span", { key: 'bb5dc096a23144a38bf02abd71143400683d6c77', class: "co-accordion__subheading", part: "subheading" }, index.h("slot", { key: 'a257179892145204541c54bab5734173128ebd54', name: "subheading" }, this.subheading)))), index.h("button", { key: 'fd7415281a4da11657549260cdabec47c2d91ecf', 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" }, index.h("co-icon", { key: '6bf641e38529c66da0559642821bdf11dba92429', name: "caret-up", size: 20 }))), index.h("div", { key: 'bcabf0d1a18939a388a482832a3746d3480a19d7', class: "co-accordion__body", part: "body" }, index.h("div", { key: '2b701a3f007ad5bb34b2da5ddc69dd7e2b74a289', class: "co-accordion__body-inner", part: "body-inner" }, index.h("slot", { key: 'd721a0a49b2a9fc47c69de8f995ec7d440db284b' })))));
|
|
44
73
|
}
|
|
45
74
|
get el() { return index.getElement(this); }
|
|
46
75
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var index = require('./index-MDAnKsze.js');
|
|
4
4
|
|
|
5
|
-
const coActionBarCss = () => `: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(
|
|
5
|
+
const coActionBarCss = () => `: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}`;
|
|
6
6
|
|
|
7
7
|
const CoActionBar = class {
|
|
8
8
|
constructor(hostRef) {
|
|
@@ -81,6 +81,7 @@ const CoAudioPlayer = class {
|
|
|
81
81
|
this.coPause = index.createEvent(this, "coPause", 7);
|
|
82
82
|
this.coEnded = index.createEvent(this, "coEnded", 7);
|
|
83
83
|
this.coError = index.createEvent(this, "coError", 7);
|
|
84
|
+
this.coTimeUpdate = index.createEvent(this, "coTimeUpdate", 3);
|
|
84
85
|
/** Compact variant: narrower, hides the download button. */
|
|
85
86
|
this.compact = false;
|
|
86
87
|
/** Fallback bar count used before the container width is measured. Once
|
|
@@ -117,10 +118,22 @@ const CoAudioPlayer = class {
|
|
|
117
118
|
// Bumped by every init(); an in-flight extractPeaks whose token no longer matches
|
|
118
119
|
// belongs to a superseded `src` and must not write peaks/duration.
|
|
119
120
|
this.loadToken = 0;
|
|
120
|
-
this.onMeta = () => { this.syncDuration(); };
|
|
121
|
-
|
|
121
|
+
this.onMeta = () => { this.syncDuration(); this.applyPendingSeek(); };
|
|
122
|
+
/**
|
|
123
|
+
* A seek asked for before the media had data. `<audio>` DROPS a `currentTime`
|
|
124
|
+
* write while `readyState` is HAVE_NOTHING, silently: with `preload="metadata"`
|
|
125
|
+
* and a clip never played, the very first jump (clicking a transcript line on
|
|
126
|
+
* a recording nobody opened yet) went nowhere. Kept here and applied as soon
|
|
127
|
+
* as the element can take it.
|
|
128
|
+
*/
|
|
129
|
+
this.pendingSeek = null;
|
|
130
|
+
this.onCanPlay = () => { this.isLoading = false; this.applyPendingSeek(); };
|
|
122
131
|
this.onWaiting = () => { this.isLoading = true; };
|
|
123
|
-
this.onTime = () => {
|
|
132
|
+
this.onTime = () => {
|
|
133
|
+
var _a;
|
|
134
|
+
this.currentTime = ((_a = this.audio) === null || _a === void 0 ? void 0 : _a.currentTime) || 0;
|
|
135
|
+
this.coTimeUpdate.emit({ currentTime: this.currentTime, duration: this.knownDuration });
|
|
136
|
+
};
|
|
124
137
|
this.onEnded = () => { this.isPlaying = false; this.currentTime = 0; this.coEnded.emit(); };
|
|
125
138
|
this.onErr = (e) => { this.isLoading = false; this.hasError = true; this.coError.emit(e); };
|
|
126
139
|
this.toggle = () => {
|
|
@@ -277,12 +290,26 @@ const CoAudioPlayer = class {
|
|
|
277
290
|
this.isPlaying = false;
|
|
278
291
|
}
|
|
279
292
|
async extractPeaks(url, token) {
|
|
293
|
+
var _a;
|
|
280
294
|
let ctx;
|
|
281
295
|
try {
|
|
296
|
+
/**
|
|
297
|
+
* `OfflineAudioContext` FIRST, and a live `AudioContext` only as the
|
|
298
|
+
* fallback: decoding a waveform needs no audio OUTPUT, and a live context
|
|
299
|
+
* created before the user has interacted trips the browser's autoplay
|
|
300
|
+
* policy — "The AudioContext was not allowed to start. It must be resumed
|
|
301
|
+
* (or created) after a user gesture on the page", once per player. A page
|
|
302
|
+
* with 15 recordings logged it 15 times. The offline one has no output
|
|
303
|
+
* device, so the policy does not apply to it.
|
|
304
|
+
*
|
|
305
|
+
* Its arguments are placeholders: nothing is ever rendered through this
|
|
306
|
+
* context, it is only the host for `decodeAudioData`.
|
|
307
|
+
*/
|
|
308
|
+
const OfflineCtx = window.OfflineAudioContext || window.webkitOfflineAudioContext;
|
|
282
309
|
const Ctx = window.AudioContext || window.webkitAudioContext;
|
|
283
|
-
if (!Ctx || typeof fetch === 'undefined')
|
|
310
|
+
if ((!OfflineCtx && !Ctx) || typeof fetch === 'undefined')
|
|
284
311
|
return; // keep fallback
|
|
285
|
-
ctx = new Ctx();
|
|
312
|
+
ctx = OfflineCtx ? new OfflineCtx(1, 1, 44100) : new Ctx();
|
|
286
313
|
const buf = await (await fetch(url)).arrayBuffer();
|
|
287
314
|
const audioBuf = await ctx.decodeAudioData(buf);
|
|
288
315
|
if (token !== this.loadToken)
|
|
@@ -291,7 +318,7 @@ const CoAudioPlayer = class {
|
|
|
291
318
|
this.decodedDuration = audioBuf.duration;
|
|
292
319
|
this.peaks = resamplePeaks(this.rawChannelData, this.effectiveBars);
|
|
293
320
|
}
|
|
294
|
-
catch (
|
|
321
|
+
catch (_b) {
|
|
295
322
|
if (token !== this.loadToken)
|
|
296
323
|
return;
|
|
297
324
|
// Undecodable (codec WebAudio can't handle, CORS, network): keep the
|
|
@@ -304,11 +331,13 @@ const CoAudioPlayer = class {
|
|
|
304
331
|
finally {
|
|
305
332
|
// Always release the context. Chrome caps concurrent AudioContexts per
|
|
306
333
|
// document, so leaking one per failed decode would eventually stop every
|
|
307
|
-
// later player on the page from decoding at all.
|
|
334
|
+
// later player on the page from decoding at all. `close()` lives on
|
|
335
|
+
// AudioContext, not on every BaseAudioContext (an OfflineAudioContext
|
|
336
|
+
// needs no closing and may not implement it): optional call, not a cast.
|
|
308
337
|
try {
|
|
309
|
-
await (ctx === null || ctx === void 0 ? void 0 : ctx.close());
|
|
338
|
+
await ((_a = ctx === null || ctx === void 0 ? void 0 : ctx.close) === null || _a === void 0 ? void 0 : _a.call(ctx));
|
|
310
339
|
}
|
|
311
|
-
catch ( /* already closed */
|
|
340
|
+
catch ( /* already closed */_c) { /* already closed */ }
|
|
312
341
|
}
|
|
313
342
|
if (token === this.loadToken)
|
|
314
343
|
this.syncDuration();
|
|
@@ -323,6 +352,47 @@ const CoAudioPlayer = class {
|
|
|
323
352
|
if (!Object.is(next, this.duration))
|
|
324
353
|
this.duration = next;
|
|
325
354
|
}
|
|
355
|
+
applyPendingSeek() {
|
|
356
|
+
if (this.pendingSeek == null || !this.audio)
|
|
357
|
+
return;
|
|
358
|
+
const target = this.pendingSeek;
|
|
359
|
+
this.pendingSeek = null;
|
|
360
|
+
this.audio.currentTime = target;
|
|
361
|
+
this.currentTime = this.audio.currentTime;
|
|
362
|
+
this.coTimeUpdate.emit({ currentTime: this.currentTime, duration: this.knownDuration });
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* Move the playhead. Clamped to `[0, duration]`: `audio.currentTime` takes a
|
|
366
|
+
* restricted double and THROWS on a non-finite value, and a duration that is
|
|
367
|
+
* not known yet reads as 0 (see `knownDuration`).
|
|
368
|
+
*/
|
|
369
|
+
async seek(seconds) {
|
|
370
|
+
var _a;
|
|
371
|
+
if (!this.audio || !Number.isFinite(seconds))
|
|
372
|
+
return;
|
|
373
|
+
const total = this.knownDuration;
|
|
374
|
+
const target = total ? Math.max(0, Math.min(total, seconds)) : Math.max(0, seconds);
|
|
375
|
+
this.audio.currentTime = target;
|
|
376
|
+
// The element could not take it yet (no data): keep it for `loadedmetadata`.
|
|
377
|
+
// The readback is the only way to tell — the write throws nothing.
|
|
378
|
+
if (Math.abs(((_a = this.audio.currentTime) !== null && _a !== void 0 ? _a : 0) - target) > 0.05)
|
|
379
|
+
this.pendingSeek = target;
|
|
380
|
+
// Optimistic either way: the UI shows where playback is GOING, and the
|
|
381
|
+
// pending write lands on its own.
|
|
382
|
+
this.currentTime = target;
|
|
383
|
+
this.coTimeUpdate.emit({ currentTime: this.currentTime, duration: total });
|
|
384
|
+
}
|
|
385
|
+
/** Start playback if it is not already running (no-op on a failed load). */
|
|
386
|
+
async play() {
|
|
387
|
+
if (!this.audio || this.isPlaying || this.hasError)
|
|
388
|
+
return;
|
|
389
|
+
try {
|
|
390
|
+
await this.audio.play();
|
|
391
|
+
this.isPlaying = true;
|
|
392
|
+
this.coPlay.emit();
|
|
393
|
+
}
|
|
394
|
+
catch ( /* autoplay blocked or source not ready: the button still works */_a) { /* autoplay blocked or source not ready: the button still works */ }
|
|
395
|
+
}
|
|
326
396
|
async download() {
|
|
327
397
|
if (!this.src || typeof fetch === 'undefined')
|
|
328
398
|
return;
|
|
@@ -349,13 +419,13 @@ const CoAudioPlayer = class {
|
|
|
349
419
|
// below `aria-valuenow` the moment playback advances. ARIA 1.2 makes valuemax
|
|
350
420
|
// optional for `slider`, so leaving it off while unknown is well-formed.
|
|
351
421
|
const ariaMax = total ? Math.floor(total) : undefined;
|
|
352
|
-
const bar = (hFrac, i, played = false) => (index.h("rect", { key: '
|
|
353
|
-
return (index.h("div", { key: '
|
|
422
|
+
const bar = (hFrac, i, played = false) => (index.h("rect", { key: '7cbeb92ef52ffc865077340d72bae11139ced551', x: i * UNIT, y: H / 2 - (hFrac * H) / 2, width: W, height: Math.max(hFrac * H, 2), rx: R, class: { 'co-audio-player__bar': true, 'co-audio-player__bar--played': played } }));
|
|
423
|
+
return (index.h("div", { key: '34078ed0540dc72c87644c3ae830b3a2ff43a99e', class: {
|
|
354
424
|
'co-audio-player': true,
|
|
355
425
|
'co-audio-player--compact': this.compact,
|
|
356
426
|
'co-audio-player--error': this.hasError,
|
|
357
427
|
'co-audio-player--playing': this.isPlaying,
|
|
358
|
-
}, part: "player" }, index.h("button", { key: '
|
|
428
|
+
}, part: "player" }, index.h("button", { key: '7f692d951704a6e101f77512967d4b206f985e18', 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 }, index.h("co-icon", { key: 'fdc0a0a0703189efe10bbc1b1182572d1120a347', name: this.hasError ? 'warning-circle' : this.isPlaying ? 'pause' : 'play', weight: "fill", size: this.compact ? 12 : 14 })), index.h("div", { key: '6842ce24993895bf70461a28eb837a0558d277d7', class: "co-audio-player__wave", part: "wave", role: "slider", tabindex: "0", "aria-label": "Progreso de reproducci\u00F3n", "aria-valuemin": 0, "aria-valuemax": ariaMax, "aria-valuenow": Math.floor(this.currentTime), ref: (el) => (this.waveEl = el), onClick: (e) => this.seekAt(e.clientX), onKeyDown: this.onWaveKey }, index.h("svg", { key: 'e75c5e1f78633194608758f43a47987bc28c2081', class: "co-audio-player__svg", viewBox: `0 0 ${vbW} ${H}`, preserveAspectRatio: "none", "aria-hidden": "true" }, this.peaks.map((hFrac, i) => bar(hFrac, i)), index.h("clipPath", { key: 'c4136dddad555e8b5ef09a81c38433cd2bf39d7c', id: "co-ap-clip" }, index.h("rect", { key: 'edb79083fbc7d225bd5668443fb6541fe77c8f9d', x: "0", y: "0", width: (pct / 100) * vbW, height: H })), index.h("g", { key: 'c91b8b285f53b9dc4f6110f9cb73b7f3f892fad6', "clip-path": "url(#co-ap-clip)" }, this.peaks.map((hFrac, i) => bar(hFrac, i, true))))), index.h("span", { key: '26af75ef91f36d432add06bb636c4d3194902b0a', class: "co-audio-player__time", part: "time" }, formatTime(this.currentTime), " / ", formatTime(this.duration)), !this.compact && (index.h("button", { key: 'a2093fc2d9c9a9c120e97e59f5e8b91467e1c20c', 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 && (index.h("button", { key: '327336de6ad09adac5f8cba6e048b58bbef0008e', type: "button", class: "co-audio-player__dl", part: "download", "aria-label": "Descargar", onClick: () => this.download() }, index.h("co-icon", { key: '787738fea40ab74531c943f876e20acf6ceb54df', name: "download-simple", size: 14 })))));
|
|
359
429
|
}
|
|
360
430
|
static get watchers() { return {
|
|
361
431
|
"src": [{
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-MDAnKsze.js');
|
|
4
|
+
var color = require('./color-CML2Cfdh.js');
|
|
5
|
+
|
|
6
|
+
const coAvatarCss = () => `:host{display:inline-flex;--co-avatar-squircle:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'><path d='M100 50L99.94 68.06L99.75 73.81L99.44 77.94L99.01 81.26L98.44 84.05L97.74 86.46L96.91 88.57L95.94 90.43L94.81 92.07L93.53 93.53L92.07 94.81L90.43 95.94L88.57 96.91L86.46 97.74L84.05 98.44L81.26 99.01L77.94 99.44L73.81 99.75L68.06 99.94L50 100L31.94 99.94L26.19 99.75L22.06 99.44L18.74 99.01L15.95 98.44L13.54 97.74L11.43 96.91L9.57 95.94L7.93 94.81L6.47 93.53L5.19 92.07L4.06 90.43L3.09 88.57L2.26 86.46L1.56 84.05L0.99 81.26L0.56 77.94L0.25 73.81L0.06 68.06L0 50L0.06 31.94L0.25 26.19L0.56 22.06L0.99 18.74L1.56 15.95L2.26 13.54L3.09 11.43L4.06 9.57L5.19 7.93L6.47 6.47L7.93 5.19L9.57 4.06L11.43 3.09L13.54 2.26L15.95 1.56L18.74 0.99L22.06 0.56L26.19 0.25L31.94 0.06L50 0L68.06 0.06L73.81 0.25L77.94 0.56L81.26 0.99L84.05 1.56L86.46 2.26L88.57 3.09L90.43 4.06L92.07 5.19L93.53 6.47L94.81 7.93L95.94 9.57L96.91 11.43L97.74 13.54L98.44 15.95L99.01 18.74L99.44 22.06L99.75 26.19L99.94 31.94Z' fill='%23fff'/></svg>")}.co-avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--co-border-radius-full);background:var(--co-semantic-surface-primary);color:var(--co-semantic-on-primary);font-family:var(--co-font-family-primary);font-weight:500;line-height:1;letter-spacing:var(--co-font-letter-spacing-body);overflow:hidden;flex-shrink:0;user-select:none;-webkit-font-smoothing:antialiased}.co-avatar::after{content:'';position:absolute;inset:0;pointer-events:none;border-radius:inherit;box-shadow:inset 0 0 0 var(--co-avatar-border-width, 1px) var(--co-avatar-border-color, transparent)}.co-avatar__text{text-transform:uppercase}.co-avatar--xxs .co-avatar__text,.co-avatar--xs .co-avatar__text,.co-avatar--sm .co-avatar__text,.co-avatar--md .co-avatar__text{transform:translateY(0.5px)}.co-avatar__img{width:100%;height:100%;object-fit:cover;display:block}.co-avatar--square{border-radius:0;-webkit-mask:var(--co-avatar-squircle) center / 100% 100% no-repeat;mask:var(--co-avatar-squircle) center / 100% 100% no-repeat}.co-avatar--square::after{--co-avatar-bw:var(--co-avatar-border-width, 1px);box-shadow:none;background:var(--co-avatar-border-color, transparent);-webkit-mask:var(--co-avatar-squircle) center / 100% 100% no-repeat, var(--co-avatar-squircle) center / calc(100% - 2 * var(--co-avatar-bw)) calc(100% - 2 * var(--co-avatar-bw)) no-repeat;-webkit-mask-composite:xor;mask:var(--co-avatar-squircle) center / 100% 100% no-repeat, var(--co-avatar-squircle) center / calc(100% - 2 * var(--co-avatar-bw)) calc(100% - 2 * var(--co-avatar-bw)) no-repeat;mask-composite:exclude}.co-avatar--light{color:rgba(0, 0, 0, 0.87)}co-tooltip{display:inline-flex;align-items:center;line-height:0}`;
|
|
7
|
+
|
|
8
|
+
const SIZE_MAP = {
|
|
9
|
+
xl: 80, lg: 64, md: 56, sm: 48, xs: 32, xxs: 24,
|
|
10
|
+
};
|
|
11
|
+
const ICON_SIZE_MAP = {
|
|
12
|
+
xl: 32, lg: 28, md: 24, sm: 20, xs: 16, xxs: 12,
|
|
13
|
+
};
|
|
14
|
+
const FONT_SIZE_MAP = {
|
|
15
|
+
xl: 'var(--co-font-size-26)',
|
|
16
|
+
lg: 'var(--co-font-size-22)',
|
|
17
|
+
md: 'var(--co-font-size-18)',
|
|
18
|
+
sm: 'var(--co-font-size-16)',
|
|
19
|
+
xs: 'var(--co-font-size-12)',
|
|
20
|
+
xxs: 'var(--co-font-size-10)',
|
|
21
|
+
};
|
|
22
|
+
const CoAvatar = class {
|
|
23
|
+
constructor(hostRef) {
|
|
24
|
+
index.registerInstance(this, hostRef);
|
|
25
|
+
/** Display type: text shows initials, icon shows a Phosphor icon, image shows a picture */
|
|
26
|
+
this.type = 'text';
|
|
27
|
+
/** Size of the avatar */
|
|
28
|
+
this.size = 'md';
|
|
29
|
+
/** Phosphor icon name (type="icon"), defaults to "user" */
|
|
30
|
+
this.icon = 'user';
|
|
31
|
+
/** Icon weight */
|
|
32
|
+
this.iconWeight = 'regular';
|
|
33
|
+
/** Shape of the avatar */
|
|
34
|
+
this.shape = 'circle';
|
|
35
|
+
this.imgFailed = false;
|
|
36
|
+
this.handleImgError = () => {
|
|
37
|
+
this.imgFailed = true;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
render() {
|
|
41
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
42
|
+
const dim = (_a = SIZE_MAP[this.size]) !== null && _a !== void 0 ? _a : 56;
|
|
43
|
+
const iconSize = (_b = ICON_SIZE_MAP[this.size]) !== null && _b !== void 0 ? _b : 24;
|
|
44
|
+
const fontSize = (_c = FONT_SIZE_MAP[this.size]) !== null && _c !== void 0 ? _c : 'var(--co-font-size-18)';
|
|
45
|
+
const showImage = this.type === 'image' && this.src && !this.imgFailed;
|
|
46
|
+
// Broken/missing image without initials falls back to the ICON (default
|
|
47
|
+
// "user") — never an empty disc. With `text` present, initials win (they
|
|
48
|
+
// identify the record better than a generic glyph).
|
|
49
|
+
const showIcon = this.type === 'icon' || (this.type === 'image' && !showImage && !this.text);
|
|
50
|
+
const ariaLabel = this.type === 'text'
|
|
51
|
+
? this.text
|
|
52
|
+
: this.type === 'image'
|
|
53
|
+
? (_e = (_d = this.alt) !== null && _d !== void 0 ? _d : this.text) !== null && _e !== void 0 ? _e : this.icon
|
|
54
|
+
: this.icon;
|
|
55
|
+
const disc = (index.h("div", { class: {
|
|
56
|
+
'co-avatar': true,
|
|
57
|
+
[`co-avatar--${this.size}`]: true,
|
|
58
|
+
[`co-avatar--${this.type}`]: true,
|
|
59
|
+
'co-avatar--square': this.shape === 'square',
|
|
60
|
+
'co-avatar--light': !!this.color && color.isLightColor(this.color),
|
|
61
|
+
}, style: Object.assign(Object.assign({ width: `var(--co-avatar-size, ${dim}px)`, height: `var(--co-avatar-size, ${dim}px)`, fontSize }, (this.color ? { background: this.color } : {})), (this.ringColor
|
|
62
|
+
? { '--co-avatar-border-color': this.ringColor, '--co-avatar-border-width': '2px' }
|
|
63
|
+
: {})), part: "avatar", role: "img", "aria-label": ariaLabel }, showImage ? (index.h("img", { class: "co-avatar__img", src: this.src, alt: (_g = (_f = this.alt) !== null && _f !== void 0 ? _f : this.text) !== null && _g !== void 0 ? _g : '', onError: this.handleImgError })) : showIcon ? (index.h("co-icon", { name: this.icon, weight: this.iconWeight, size: iconSize })) : (index.h("span", { class: "co-avatar__text" }, this.text))));
|
|
64
|
+
// No tooltip when `name` is unset/empty — renders exactly as before, no wrapper.
|
|
65
|
+
if (!this.name)
|
|
66
|
+
return disc;
|
|
67
|
+
return index.h("co-tooltip", { content: this.name }, disc);
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
CoAvatar.style = coAvatarCss();
|
|
71
|
+
|
|
72
|
+
exports.co_avatar = CoAvatar;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var index = require('./index-MDAnKsze.js');
|
|
4
4
|
|
|
5
|
-
const coButtonCss = () => `:host{display:inline-flex}:host([disabled]){pointer-events:none}.co-button{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;border:1px solid transparent;outline:none;font-family:var(--co-font-family-primary);font-weight:400;line-height:1;letter-spacing:var(--co-font-letter-spacing-body);white-space:nowrap;-webkit-font-smoothing:antialiased;transition:opacity var(--co-motion-duration-fast) var(--co-motion-ease-out), background var(--co-motion-duration-fast) var(--co-motion-ease-out), transform var(--co-motion-duration-fast) var(--co-motion-ease-out);box-sizing:border-box;-webkit-backdrop-filter:var(--co-glass-filter, blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate)));backdrop-filter:var(--co-glass-filter, blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate)))}.co-button--primary{background:var(--co-semantic-surface-primary);color:var(--co-semantic-on-primary);border-color:color-mix(in srgb, var(--co-semantic-on-primary) 28%, transparent)}.co-button--secondary{background:color-mix(in srgb, var(--co-semantic-surface-secondary) 55%, transparent);color:var(--co-semantic-on-secondary);border-color:var(--co-semantic-border-subtle)}.co-button--stroke{background:color-mix(in srgb, var(--co-semantic-surface-secondary) 25%, transparent);color:var(--co-semantic-text-default);border-color:var(--co-semantic-border-default)}.co-button--ghost{background:transparent;color:var(--co-semantic-text-default);border-color:transparent;-webkit-backdrop-filter:none;backdrop-filter:none}.co-button--danger{background:var(--co-semantic-status-error);color:var(--co-color-base-blanco);border-color:transparent}.co-button--success{background:var(--co-semantic-status-success);color:var(--co-color-base-blanco);border-color:transparent}.co-button--rounded.co-button--l{padding:var(--co-spacing-xl) var(--co-spacing-2xl);gap:var(--co-spacing-md);font-size:var(--co-font-size-18);border-radius:var(--co-button-radius, var(--co-border-radius-full))}.co-button--rounded.co-button--m{padding:var(--co-spacing-lg) var(--co-spacing-xl);gap:var(--co-spacing-md);font-size:var(--co-font-size-16);border-radius:var(--co-button-radius, var(--co-border-radius-full))}.co-button--rounded.co-button--s{padding:var(--co-spacing-md) var(--co-spacing-lg);gap:var(--co-spacing-sm2);font-size:var(--co-font-size-14);border-radius:var(--co-button-radius, var(--co-border-radius-full))}.co-button--rounded.co-button--xs{padding:var(--co-spacing-md) var(--co-spacing-lg);gap:var(--co-spacing-sm2);font-size:var(--co-font-size-12);border-radius:var(--co-button-radius, var(--co-border-radius-full))}.co-button--square.co-button--l{padding:var(--co-spacing-lg) var(--co-spacing-xl);gap:var(--co-spacing-md);font-size:var(--co-font-size-18);border-radius:var(--co-border-radius-lg)}.co-button--square.co-button--m{padding:var(--co-spacing-md) var(--co-spacing-lg);gap:var(--co-spacing-sm2);font-size:var(--co-font-size-16);border-radius:var(--co-border-radius-sm)}.co-button--square.co-button--s{padding:var(--co-spacing-sm2) var(--co-spacing-md);gap:var(--co-spacing-sm);font-size:var(--co-font-size-14);border-radius:var(--co-border-radius-xs)}.co-button--square.co-button--xs{padding:var(--co-spacing-sm) var(--co-spacing-sm2);gap:var(--co-spacing-xs);font-size:var(--co-font-size-12);border-radius:var(--co-spacing-sm)}.co-button--disabled,.co-button:disabled{opacity:0.4;cursor:not-allowed;pointer-events:none}.co-button--primary:hover:not(:disabled){opacity:0.88}.co-button--secondary:hover:not(:disabled),.co-button--stroke:hover:not(:disabled){background:var(--co-semantic-surface-hover)}.co-button--ghost:hover:not(:disabled){background:color-mix(in srgb, var(--co-semantic-surface-hover) 60%, transparent);-webkit-backdrop-filter:var(--co-glass-filter, blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate)));backdrop-filter:var(--co-glass-filter, blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate)))}.co-button--danger:hover:not(:disabled),.co-button--success:hover:not(:disabled){opacity:0.88}.co-button:active:not(:disabled){transform:scale(0.97);transition-duration:var(--co-motion-duration-instant)}.co-button--primary{transition:opacity var(--co-motion-duration-fast) var(--co-motion-ease-out), background var(--co-motion-duration-fast) var(--co-motion-ease-out), transform var(--co-motion-duration-slow) var(--co-motion-ease-spring)}.co-button--secondary.co-button--elevated{box-shadow:var(--co-shadow-sm, 0 1px 2px 0 rgba(26, 26, 26, 0.04)), inset 0 0 0 1px var(--co-color-opacity-negro-8)}.co-button--ghost.co-button--surface-dark,.co-button--stroke.co-button--surface-dark{color:var(--co-color-base-blanco, #fff)}.co-button--ghost.co-button--surface-dark:hover:not(:disabled),.co-button--stroke.co-button--surface-dark:hover:not(:disabled){background:var(--co-color-opacity-blanco-16);-webkit-backdrop-filter:none;backdrop-filter:none}.co-button--danger.co-button--surface-dark:hover:not(:disabled){opacity:1;background:color-mix(in srgb, var(--co-semantic-status-error) 84%, var(--co-color-base-blanco, #fff))}.co-button--danger.co-button--surface-dark:focus-visible{box-shadow:0 0 0 2px color-mix(in srgb, var(--co-color-base-blanco, #fff) 45%, transparent)}::slotted([slot="icon-left"]),::slotted([slot="icon-right"]){display:inline-flex;flex-shrink:0}@supports not (background: color-mix(in srgb, red, transparent)){.co-button--primary{background:var(--co-semantic-surface-primary)}.co-button--secondary{background:var(--co-semantic-surface-secondary)}.co-button--stroke{background:transparent}}`;
|
|
5
|
+
const coButtonCss = () => `:host{display:inline-flex}:host([disabled]){pointer-events:none}.co-button{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;border:1px solid transparent;outline:none;font-family:var(--co-font-family-primary);font-weight:400;line-height:1;letter-spacing:var(--co-font-letter-spacing-body);white-space:nowrap;-webkit-font-smoothing:antialiased;transition:opacity var(--co-motion-duration-fast) var(--co-motion-ease-out), background var(--co-motion-duration-fast) var(--co-motion-ease-out), transform var(--co-motion-duration-fast) var(--co-motion-ease-out);box-sizing:border-box;-webkit-backdrop-filter:var(--co-glass-filter, blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate)));backdrop-filter:var(--co-glass-filter, blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate)))}.co-button--primary{background:var(--co-semantic-surface-primary);color:var(--co-semantic-on-primary);border-color:color-mix(in srgb, var(--co-semantic-on-primary) 28%, transparent)}.co-button--secondary{background:color-mix(in srgb, var(--co-button-bg, var(--co-semantic-surface-secondary)) 55%, transparent);color:var(--co-button-color, var(--co-semantic-on-secondary));border-color:var(--co-button-border, var(--co-semantic-border-subtle))}.co-button--stroke{background:color-mix(in srgb, var(--co-semantic-surface-secondary) 25%, transparent);color:var(--co-semantic-text-default);border-color:var(--co-semantic-border-default)}.co-button--ghost{background:transparent;color:var(--co-semantic-text-default);border-color:transparent;-webkit-backdrop-filter:none;backdrop-filter:none}.co-button--danger{background:var(--co-semantic-status-error);color:var(--co-color-base-blanco);border-color:transparent}.co-button--success{background:var(--co-semantic-status-success);color:var(--co-color-base-blanco);border-color:transparent}.co-button--rounded.co-button--l{padding:var(--co-spacing-xl) var(--co-spacing-2xl);gap:var(--co-spacing-md);font-size:var(--co-font-size-18);border-radius:var(--co-button-radius, var(--co-border-radius-full))}.co-button--rounded.co-button--m{padding:var(--co-spacing-lg) var(--co-spacing-xl);gap:var(--co-spacing-md);font-size:var(--co-font-size-16);border-radius:var(--co-button-radius, var(--co-border-radius-full))}.co-button--rounded.co-button--s{padding:var(--co-spacing-md) var(--co-spacing-lg);gap:var(--co-spacing-sm2);font-size:var(--co-font-size-14);border-radius:var(--co-button-radius, var(--co-border-radius-full))}.co-button--rounded.co-button--xs{padding:var(--co-spacing-md) var(--co-spacing-lg);gap:var(--co-spacing-sm2);font-size:var(--co-font-size-12);border-radius:var(--co-button-radius, var(--co-border-radius-full))}.co-button--square.co-button--l{padding:var(--co-spacing-lg) var(--co-spacing-xl);gap:var(--co-spacing-md);font-size:var(--co-font-size-18);border-radius:var(--co-border-radius-lg)}.co-button--square.co-button--m{padding:var(--co-spacing-md) var(--co-spacing-lg);gap:var(--co-spacing-sm2);font-size:var(--co-font-size-16);border-radius:var(--co-border-radius-sm)}.co-button--square.co-button--s{padding:var(--co-spacing-sm2) var(--co-spacing-md);gap:var(--co-spacing-sm);font-size:var(--co-font-size-14);border-radius:var(--co-border-radius-xs)}.co-button--square.co-button--xs{padding:var(--co-spacing-sm) var(--co-spacing-sm2);gap:var(--co-spacing-xs);font-size:var(--co-font-size-12);border-radius:var(--co-spacing-sm)}.co-button--disabled,.co-button:disabled{opacity:0.4;cursor:not-allowed;pointer-events:none}.co-button--primary:hover:not(:disabled){opacity:0.88}.co-button--secondary:hover:not(:disabled),.co-button--stroke:hover:not(:disabled){background:var(--co-semantic-surface-hover)}.co-button--ghost:hover:not(:disabled){background:color-mix(in srgb, var(--co-semantic-surface-hover) 60%, transparent);-webkit-backdrop-filter:var(--co-glass-filter, blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate)));backdrop-filter:var(--co-glass-filter, blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate)))}.co-button--danger:hover:not(:disabled),.co-button--success:hover:not(:disabled){opacity:0.88}.co-button:active:not(:disabled){transform:scale(0.97);transition-duration:var(--co-motion-duration-instant)}.co-button--primary{transition:opacity var(--co-motion-duration-fast) var(--co-motion-ease-out), background var(--co-motion-duration-fast) var(--co-motion-ease-out), transform var(--co-motion-duration-slow) var(--co-motion-ease-spring)}.co-button--secondary.co-button--elevated{box-shadow:var(--co-shadow-sm, 0 1px 2px 0 rgba(26, 26, 26, 0.04)), inset 0 0 0 1px var(--co-color-opacity-negro-8)}.co-button--ghost.co-button--surface-dark,.co-button--stroke.co-button--surface-dark{color:var(--co-color-base-blanco, #fff)}.co-button--ghost.co-button--surface-dark:hover:not(:disabled),.co-button--stroke.co-button--surface-dark:hover:not(:disabled){background:var(--co-color-opacity-blanco-16);-webkit-backdrop-filter:none;backdrop-filter:none}.co-button--danger.co-button--surface-dark:hover:not(:disabled){opacity:1;background:color-mix(in srgb, var(--co-semantic-status-error) 84%, var(--co-color-base-blanco, #fff))}.co-button--danger.co-button--surface-dark:focus-visible{box-shadow:0 0 0 2px color-mix(in srgb, var(--co-color-base-blanco, #fff) 45%, transparent)}::slotted([slot="icon-left"]),::slotted([slot="icon-right"]){display:inline-flex;flex-shrink:0}.co-button>co-icon{margin-block:-1px}@supports not (background: color-mix(in srgb, red, transparent)){.co-button--primary{background:var(--co-semantic-surface-primary)}.co-button--secondary{background:var(--co-semantic-surface-secondary)}.co-button--stroke{background:transparent}}`;
|
|
6
6
|
|
|
7
7
|
const ICON_SIZE = { l: 20, m: 18, s: 16, xs: 14 };
|
|
8
8
|
const CoButton = class {
|
|
@@ -7,7 +7,7 @@ var requiredMark = require('./requiredMark-D-t-IPN0.js');
|
|
|
7
7
|
var overlayAfterClose = require('./overlayAfterClose-BdeXrhVY.js');
|
|
8
8
|
var slotContent = require('./slotContent-Bm9RcM_Q.js');
|
|
9
9
|
|
|
10
|
-
const coCalendarCss = () => `:host{display:inline-block;font-family:var(--co-font-family-primary);--co-calendar-day-size:36px}:host([data-touch]){--co-calendar-day-size:44px}.co-calendar{display:flex;flex-direction:column;gap:var(--co-spacing-sm);width:max-content}.co-calendar__header{display:flex;align-items:center;justify-content:space-between;padding:0 var(--co-spacing-xs)}.co-calendar__month{font-size:var(--co-font-size-14);font-weight:600;color:var(--co-semantic-text-default);text-transform:capitalize}.co-calendar__title{display:inline-flex;align-items:center;gap:var(--co-spacing-xxs);background:none;border:0;cursor:pointer;font-family:inherit;font-size:var(--co-font-size-14);font-weight:600;color:var(--co-semantic-text-default);text-transform:capitalize;padding:var(--co-spacing-xxs) var(--co-spacing-sm);border-radius:var(--co-border-radius-xs)}.co-calendar__title:hover{background:var(--co-semantic-surface-hover)}.co-calendar__title:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:1px}.co-calendar__title-caret{color:var(--co-semantic-text-muted)}.co-calendar__panel{display:grid;grid-template-columns:repeat(3, 1fr);gap:var(--co-spacing-xs);width:calc(var(--co-calendar-day-size) * 7 + 12px);padding-top:var(--co-spacing-xs)}.co-calendar__cell{height:calc(var(--co-calendar-day-size) + 8px);display:inline-flex;align-items:center;justify-content:center;background:none;border:1px solid transparent;border-radius:var(--co-border-radius-xs);font-family:inherit;font-size:var(--co-font-size-14);color:var(--co-semantic-text-default);cursor:pointer;text-transform:capitalize;transition:background var(--co-motion-duration-fast) var(--co-motion-ease-out), color var(--co-motion-duration-fast) var(--co-motion-ease-out), border-color var(--co-motion-duration-fast) var(--co-motion-ease-out)}.co-calendar__cell:hover:not(.co-calendar__cell--disabled):not(.co-calendar__cell--selected){background:var(--co-semantic-surface-hover)}.co-calendar__cell:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:1px}.co-calendar__cell--muted{color:var(--co-semantic-text-muted)}.co-calendar__cell--today{border-color:var(--co-semantic-surface-primary);font-weight:600}.co-calendar__cell--selected{background:var(--co-semantic-surface-primary);border-color:var(--co-semantic-surface-primary);color:var(--co-semantic-on-primary);font-weight:600}.co-calendar__cell--disabled{color:var(--co-semantic-text-disabled);cursor:not-allowed}.co-calendar__nav{background:none;border:0;cursor:pointer;padding:var(--co-spacing-xs);border-radius:var(--co-border-radius-xxs);display:inline-flex;align-items:center;color:var(--co-semantic-text-default)}.co-calendar__nav:hover{background:var(--co-semantic-surface-hover)}.co-calendar__nav:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:1px}.co-calendar__grid{display:flex;flex-direction:column;gap:2px}.co-calendar__row{display:grid;grid-template-columns:repeat(7, var(--co-calendar-day-size));gap:2px}.co-calendar__row--dow{margin-bottom:2px}.co-calendar__dow{height:24px;display:inline-flex;align-items:center;justify-content:center;font-size:var(--co-font-size-10, 10px);font-weight:600;color:var(--co-semantic-text-muted);text-transform:uppercase;letter-spacing:0.04em}.co-calendar__day{width:var(--co-calendar-day-size);height:var(--co-calendar-day-size);display:inline-flex;align-items:center;justify-content:center;background:none;border:1px solid transparent;border-radius:var(--co-border-radius-xs);font-size:var(--co-font-size-14);font-family:inherit;color:var(--co-semantic-text-default);cursor:pointer;transition:background var(--co-motion-duration-fast) var(--co-motion-ease-out), color var(--co-motion-duration-fast) var(--co-motion-ease-out), border-color var(--co-motion-duration-fast) var(--co-motion-ease-out)}.co-calendar__day:hover:not(.co-calendar__day--disabled):not(.co-calendar__day--selected){background:var(--co-semantic-surface-hover)}.co-calendar__day:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:1px}.co-calendar__day--outside{color:var(--co-semantic-text-muted)}.co-calendar__day--today{border-color:var(--co-semantic-surface-primary);font-weight:600}.co-calendar__day--selected{background:var(--co-semantic-surface-primary);border-color:var(--co-semantic-surface-primary);color:var(--co-semantic-on-primary);font-weight:600}.co-calendar__day--disabled{color:var(--co-semantic-text-disabled);cursor:not-allowed;pointer-events:none}.co-calendar__day--in-range{background:color-mix(in srgb, var(--co-semantic-surface-primary) 8%, transparent);border-radius:0;color:var(--co-semantic-text-default)}.co-calendar__day--range-start,.co-calendar__day--range-end{background:var(--co-semantic-surface-primary);border-color:var(--co-semantic-surface-primary);color:var(--co-semantic-on-primary);font-weight:600}.co-calendar__day--range-start:not(.co-calendar__day--range-end){border-top-right-radius:0;border-bottom-right-radius:0}.co-calendar__day--range-end:not(.co-calendar__day--range-start){border-top-left-radius:0;border-bottom-left-radius:0}`;
|
|
10
|
+
const coCalendarCss = () => `:host{display:inline-block;font-family:var(--co-font-family-primary);--co-calendar-day-size:36px}:host([data-touch]){--co-calendar-day-size:44px}.co-calendar{display:flex;flex-direction:column;gap:var(--co-spacing-sm);width:var(--co-calendar-width, max-content)}.co-calendar__header{display:flex;align-items:center;justify-content:space-between;padding:0 var(--co-spacing-xs)}.co-calendar__month{font-size:var(--co-font-size-14);font-weight:600;color:var(--co-semantic-text-default);text-transform:capitalize}.co-calendar__title{display:inline-flex;align-items:center;gap:var(--co-spacing-xxs);background:none;border:0;cursor:pointer;font-family:inherit;font-size:var(--co-font-size-14);font-weight:600;color:var(--co-semantic-text-default);text-transform:capitalize;padding:var(--co-spacing-xxs) var(--co-spacing-sm);border-radius:var(--co-border-radius-xs)}.co-calendar__title:hover{background:var(--co-semantic-surface-hover)}.co-calendar__title:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:1px}.co-calendar__title-caret{color:var(--co-semantic-text-muted)}.co-calendar__panel{display:grid;grid-template-columns:repeat(3, 1fr);gap:var(--co-spacing-xs);width:var(--co-calendar-width, calc(var(--co-calendar-day-size) * 7 + 12px));padding-top:var(--co-spacing-xs)}.co-calendar__cell{height:calc(var(--co-calendar-day-size) + 8px);display:inline-flex;align-items:center;justify-content:center;background:none;border:1px solid transparent;border-radius:var(--co-border-radius-xs);font-family:inherit;font-size:var(--co-font-size-14);color:var(--co-semantic-text-default);cursor:pointer;text-transform:capitalize;transition:background var(--co-motion-duration-fast) var(--co-motion-ease-out), color var(--co-motion-duration-fast) var(--co-motion-ease-out), border-color var(--co-motion-duration-fast) var(--co-motion-ease-out)}.co-calendar__cell:hover:not(.co-calendar__cell--disabled):not(.co-calendar__cell--selected){background:var(--co-semantic-surface-hover)}.co-calendar__cell:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:1px}.co-calendar__cell--muted{color:var(--co-semantic-text-muted)}.co-calendar__cell--today{border-color:var(--co-semantic-surface-primary);font-weight:600}.co-calendar__cell--selected{background:var(--co-semantic-surface-primary);border-color:var(--co-semantic-surface-primary);color:var(--co-semantic-on-primary);font-weight:600}.co-calendar__cell--disabled{color:var(--co-semantic-text-disabled);cursor:not-allowed}.co-calendar__nav{background:none;border:0;cursor:pointer;padding:var(--co-spacing-xs);border-radius:var(--co-border-radius-xxs);display:inline-flex;align-items:center;color:var(--co-semantic-text-default)}.co-calendar__nav:hover{background:var(--co-semantic-surface-hover)}.co-calendar__nav:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:1px}.co-calendar__grid{display:flex;flex-direction:column;gap:2px}.co-calendar__row{display:grid;grid-template-columns:repeat(7, var(--co-calendar-col, var(--co-calendar-day-size)));gap:2px}.co-calendar__row--dow{margin-bottom:2px}.co-calendar__dow{height:24px;display:inline-flex;align-items:center;justify-content:center;font-size:var(--co-font-size-10, 10px);font-weight:600;color:var(--co-semantic-text-muted);text-transform:uppercase;letter-spacing:0.04em}.co-calendar__day{width:var(--co-calendar-day-width, var(--co-calendar-day-size));height:var(--co-calendar-day-size);display:inline-flex;align-items:center;justify-content:center;background:none;border:1px solid transparent;border-radius:var(--co-border-radius-xs);font-size:var(--co-font-size-14);font-family:inherit;color:var(--co-semantic-text-default);cursor:pointer;transition:background var(--co-motion-duration-fast) var(--co-motion-ease-out), color var(--co-motion-duration-fast) var(--co-motion-ease-out), border-color var(--co-motion-duration-fast) var(--co-motion-ease-out)}.co-calendar__day:hover:not(.co-calendar__day--disabled):not(.co-calendar__day--selected){background:var(--co-semantic-surface-hover)}.co-calendar__day:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:1px}.co-calendar__day--outside{color:var(--co-semantic-text-muted)}.co-calendar__day--today{border-color:var(--co-semantic-surface-primary);font-weight:600}.co-calendar__day--selected{background:var(--co-semantic-surface-primary);border-color:var(--co-semantic-surface-primary);color:var(--co-semantic-on-primary);font-weight:600}.co-calendar__day--disabled{color:var(--co-semantic-text-disabled);cursor:not-allowed;pointer-events:none}.co-calendar__day--in-range{background:color-mix(in srgb, var(--co-semantic-surface-primary) 8%, transparent);border-radius:0;color:var(--co-semantic-text-default)}.co-calendar__day--range-start,.co-calendar__day--range-end{background:var(--co-semantic-surface-primary);border-color:var(--co-semantic-surface-primary);color:var(--co-semantic-on-primary);font-weight:600}.co-calendar__day--range-start:not(.co-calendar__day--range-end){border-top-right-radius:0;border-bottom-right-radius:0}.co-calendar__day--range-end:not(.co-calendar__day--range-start){border-top-left-radius:0;border-bottom-left-radius:0}`;
|
|
11
11
|
|
|
12
12
|
const CoCalendar = class {
|
|
13
13
|
constructor(hostRef) {
|
|
@@ -303,7 +303,11 @@ const CoCalendar = class {
|
|
|
303
303
|
const monthLabel = dates.getMonthLabel(this.viewYear, this.viewMonth, this.locale, 'long');
|
|
304
304
|
const shortLabels = dates.getWeekdayLabels(this.locale, this.firstDayOfWeek, 'short');
|
|
305
305
|
const longLabels = dates.getWeekdayLabels(this.locale, this.firstDayOfWeek, 'long');
|
|
306
|
-
|
|
306
|
+
// Solo las semanas que tocan el mes: la matriz trae siempre 6, y un mes de
|
|
307
|
+
// 5 semanas cerraba con una fila ENTERA del mes siguiente en gris, que se
|
|
308
|
+
// leía como una franja en blanco al pie del panel (reporte 2026-09-16). El
|
|
309
|
+
// teclado no la necesita: moveFocus ya cambia de mes al salir de él.
|
|
310
|
+
const matrix = dates.getMonthMatrix(this.viewYear, this.viewMonth, this.firstDayOfWeek).filter((week) => week.some((cell) => cell.inMonth));
|
|
307
311
|
return (index.h("div", { class: "co-calendar__grid", part: "grid", role: "grid", "aria-label": monthLabel, onKeyDown: this.handleGridKeyDown }, index.h("div", { class: "co-calendar__row co-calendar__row--dow", role: "row" }, shortLabels.map((lbl, i) => (index.h("span", { class: "co-calendar__dow", role: "columnheader", "aria-label": longLabels[i] }, lbl)))), matrix.map((week) => (index.h("div", { class: "co-calendar__row", role: "row" }, week.map((cell) => {
|
|
308
312
|
const disabled = this.isDayDisabled(cell.value);
|
|
309
313
|
const isFocused = dates.compareYMD(cell.value, this.focused) === 0;
|
|
@@ -359,7 +363,7 @@ const CoCalendar = class {
|
|
|
359
363
|
render() {
|
|
360
364
|
var _a, _b;
|
|
361
365
|
const t = dateI18n.getDateStrings(this.locale);
|
|
362
|
-
return (index.h("div", { key: '
|
|
366
|
+
return (index.h("div", { key: '3b9f57fa8513746cb3133d80d574a0fafbc8b31e', class: "co-calendar", part: "root" }, index.h("div", { key: '6b3b0f8d1c582abbbf04c8b936486bd1e3fedaec', class: "co-calendar__header", part: "header" }, index.h("button", { key: '57f854f84162a5b09119385339c9993ee25cef72', type: "button", class: "co-calendar__nav", onClick: this.handlePrev, "aria-label": (_a = this.prevMonthLabel) !== null && _a !== void 0 ? _a : t.prevMonth }, index.h("co-icon", { key: '772ec0dfb48dfee33d506549e68ab7598ec0cf00', name: "caret-left", size: 16 })), index.h("button", { key: 'b9f3851082fbbe2d5f696dd0a51c442410b15fa1', type: "button", class: "co-calendar__title", "aria-live": "polite", onClick: this.toggleView }, this.headerTitle(), index.h("co-icon", { key: '3f660d39a851c97f299e6a6cc8c0ad8b5ed4ee7f', name: "caret-down", size: 12, class: "co-calendar__title-caret" })), index.h("button", { key: '6ac9d1af5f3dc36a34e94e129ab2db313dee74d2', type: "button", class: "co-calendar__nav", onClick: this.handleNext, "aria-label": (_b = this.nextMonthLabel) !== null && _b !== void 0 ? _b : t.nextMonth }, index.h("co-icon", { key: 'c8c962be3435e108f81968f6dde5f6f481c40733', name: "caret-right", size: 16 }))), this.view === 'days' && this.renderDays(t), this.view === 'months' && this.renderMonths(), this.view === 'years' && this.renderYears()));
|
|
363
367
|
}
|
|
364
368
|
get el() { return index.getElement(this); }
|
|
365
369
|
static get watchers() { return {
|
|
@@ -50,17 +50,17 @@ const CoCheckbox = class {
|
|
|
50
50
|
// Only override the fill when a custom color is provided AND the box is "on".
|
|
51
51
|
// Leaving this undefined keeps the default appearance byte-identical to before.
|
|
52
52
|
const boxStyle = this.checkedColor && isOn ? { background: this.checkedColor } : undefined;
|
|
53
|
-
return (index.h("div", { key: '
|
|
53
|
+
return (index.h("div", { key: 'cfcbd567066331d7751064f857407a8f9d56d386', class: {
|
|
54
54
|
'co-checkbox-row': true,
|
|
55
55
|
'co-checkbox-row--disabled': this.disabled,
|
|
56
|
-
}, onClick: this.handleClick }, index.h("span", { key: '
|
|
56
|
+
}, onClick: this.handleClick }, index.h("span", { key: '21c39833a43324e47718cc83ba74253f00e67e82', role: "checkbox", "aria-checked": this.indeterminate ? 'mixed' : String(this.checked), "aria-label": this.label || this.ariaLabelText || '', "aria-disabled": this.disabled ? 'true' : undefined, tabIndex: this.disabled ? -1 : 0, onKeyDown: this.handleKeyDown, class: {
|
|
57
57
|
'co-checkbox': true,
|
|
58
58
|
[`co-checkbox--${this.size}`]: true,
|
|
59
59
|
'co-checkbox--overlay': isOverlay,
|
|
60
60
|
'co-checkbox--checked': this.checked && !this.indeterminate,
|
|
61
61
|
'co-checkbox--indeterminate': this.indeterminate,
|
|
62
62
|
'co-checkbox--disabled': this.disabled,
|
|
63
|
-
}, style: boxStyle, part: "box" }, index.h("svg", { key: '
|
|
63
|
+
}, style: boxStyle, part: "box" }, index.h("svg", { key: '6e49dd81e78da092340b1cbdb5c45ee6e345fb3c', class: "co-checkbox__glyph", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true" }, index.h("path", { key: 'dbcadf848fb8cb64acea875fb03186258210c43f', class: "co-checkbox__check", d: "M3.5 8.5l3 3 6-6.5", pathLength: "1", "stroke-linecap": "round", "stroke-linejoin": "round" }), index.h("path", { key: '0b58a11353c3d8b8249e5852933f290cd63f0705', class: "co-checkbox__dash", d: "M3 8h10", pathLength: "1", "stroke-linecap": "round" }))), this.label && (index.h("span", { key: 'e1a4beabf2b472aeff1fe5ecd5bcb458e949ee11', class: "co-checkbox__label", part: "label" }, this.label))));
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
66
|
CoCheckbox.style = coCheckboxCss();
|