@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
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as r,p as o,H as e,c as a,h as t}from"./index.js";import{d as s,a as c}from"./p-x4grh-eZ.js";import{s as i}from"./p-CBX_oabB.js";import{d as n}from"./p-DNJAIVfI.js";import{d}from"./p-BH184F0X.js";const l=o(class extends e{constructor(r){super(),!1!==r&&this.__registerHost(),this.__attachShadow(),this.coClose=a(this,"coClose",7),this.coOpen=a(this,"coOpen",7),this.coAfterOpen=a(this,"coAfterOpen",7),this.coAfterClose=a(this,"coAfterClose",7),this.open=!1,this.position="right",this.size="md",this.heading="",this.description="",this.icon="",this.closable=!0,this.closeOnOverlay=!0,this.closeOnEscape=!0,this.modeless=!1,this.loading=!1,this.hasFooter=!1,this.hasTabs=!1,this.hasHeaderSlot=!1,this.handleFooterSlotChange=r=>{this.hasFooter=i(r)},this.handleTabsSlotChange=r=>{this.hasTabs=i(r)},this.handleHeaderSlotChange=r=>{this.hasHeaderSlot=i(r)},this.handleOverlayClose=()=>{this.closeOnOverlay&&this.coClose.emit()},this.handleCloseClick=()=>{this.coClose.emit()},this.stopPropagation=r=>{r.stopPropagation()},this.handleTransitionEnd=r=>{if(r.target!==this.asideEl)return;const o=c(r.propertyName,this.open,"transform");"after-open"===o?this.coAfterOpen.emit():"after-close"===o&&this.coAfterClose.emit()},this.promoteModeless=r=>{r&&(this.asideEl=r);const o=this.asideEl;if(this.modeless&&o&&"function"==typeof o.showPopover)try{o.matches(":popover-open")||o.showPopover()}catch(r){}}}get labelledBy(){return this.hasHeaderSlot?"co-drawer-header-content":this.heading?"co-drawer-heading":void 0}onOpenChange(r,o){r&&!o&&this.coOpen.emit()}handleKey(r){this.open&&this.closeOnEscape&&"Escape"===r.key&&(this.modeless&&document.querySelector("co-drawer[open]:not([modeless]), co-modal[open]")||this.coClose.emit())}componentDidLoad(){this.promoteModeless()}render(){const r=t("aside",{class:{"co-drawer":!0,"co-sq-elevation":!0,"co-sq-elevation-fallback":!0,"co-drawer--open":this.open,"co-drawer--modeless":this.modeless,[`co-drawer--${this.position}`]:!0,[`co-drawer--${this.size}`]:!0},popover:this.modeless?"manual":void 0,ref:this.promoteModeless,part:"drawer",role:"dialog","aria-modal":this.modeless?"false":"true","aria-labelledby":this.labelledBy,onClick:this.stopPropagation,onTransitionEnd:this.handleTransitionEnd},t("div",{class:"co-drawer__card co-sq-clip",part:"card"},t("header",{class:"co-drawer__header",part:"header"},t("div",{class:"co-drawer__header-content",id:"co-drawer-header-content"},t("slot",{name:"header",onSlotchange:this.handleHeaderSlotChange},t("div",{class:"co-drawer__heading-row"},this.icon&&t("co-icon",{name:this.icon,size:20,class:"co-drawer__icon"}),t("h2",{class:"co-drawer__heading",id:"co-drawer-heading"},this.heading)),this.description&&t("p",{class:"co-drawer__description"},this.description))),this.closable&&t("button",{class:"co-drawer__close",type:"button","aria-label":"Close",onClick:this.handleCloseClick},t("co-icon",{name:"x",size:20}))),t("div",{class:{"co-drawer__tabs":!0,"co-drawer__tabs--empty":!this.hasTabs},part:"tabs"},t("slot",{name:"tabs",onSlotchange:this.handleTabsSlotChange})),t("div",{class:"co-drawer__body",part:"body"},t("slot",null),t("co-loader",{overlay:!0,visible:this.loading,part:"loader"})),t("footer",{class:{"co-drawer__footer":!0,"co-drawer__footer--empty":!this.hasFooter},part:"footer"},t("slot",{name:"footer",onSlotchange:this.handleFooterSlotChange}))));return this.modeless?r:t("co-overlay",{open:this.open,onCoClose:this.handleOverlayClose},r)}get el(){return this}static get watchers(){return{open:[{onOpenChange:0}]}}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:contents}.co-drawer{position:fixed;display:flex;flex-direction:column;font-family:var(--co-font-family-primary);transition:transform var(--co-motion-duration-slow) var(--co-motion-ease-in-out);will-change:transform;z-index:1;contain:layout;--co-drawer-r:var(--co-shell-r, var(--co-border-radius-md));--co-sq-r:var(--co-drawer-r);--co-sq-shadow:0 1px 4px rgba(31, 28, 27, 0.06), 0 10px 56px rgba(31, 28, 27, 0.12);--co-sq-drop-shadow:drop-shadow(0 1px 2px rgba(31, 28, 27, 0.06)) drop-shadow(0 10px 28px rgba(31, 28, 27, 0.12))}.co-drawer--right{top:0;right:0;margin:6px;height:100vh;height:-webkit-fill-available;transform:translateX(calc(100% + 12px))}.co-drawer--right.co-drawer--open{transform:translateX(0)}.co-drawer--left{top:0;left:0;margin:6px;height:100vh;height:-webkit-fill-available;transform:translateX(calc(-100% - 12px))}.co-drawer--left.co-drawer--open{transform:translateX(0)}.co-drawer--bottom{bottom:0;left:0;right:0;margin:6px;width:auto;transform:translateY(calc(100% + 12px))}.co-drawer--bottom.co-drawer--open{transform:translateY(0)}.co-drawer--right.co-drawer--sm,.co-drawer--left.co-drawer--sm{width:400px;max-width:100vw}.co-drawer--right.co-drawer--md,.co-drawer--left.co-drawer--md{width:520px;max-width:100vw}.co-drawer--right.co-drawer--lg,.co-drawer--left.co-drawer--lg{width:672px;max-width:100vw}.co-drawer--right.co-drawer--xl,.co-drawer--left.co-drawer--xl{width:960px;max-width:100vw}.co-drawer--right.co-drawer--full,.co-drawer--left.co-drawer--full{width:100vw}.co-drawer--bottom.co-drawer--sm{height:40vh}.co-drawer--bottom.co-drawer--md{height:60vh}.co-drawer--bottom.co-drawer--lg{height:80vh}.co-drawer--bottom.co-drawer--xl{height:95vh}.co-drawer--bottom.co-drawer--full{height:100vh}.co-drawer__card{flex:1;min-height:0;display:flex;flex-direction:column;background:var(--co-semantic-surface-page)}.co-drawer__header{display:flex;align-items:center;gap:var(--co-spacing-md);padding:var(--co-spacing-lg) var(--co-spacing-xl);border-bottom:1px solid var(--co-semantic-border-default);flex-shrink:0}.co-drawer__header-content{flex:1;min-width:0}.co-drawer__heading-row{display:flex;align-items:center;gap:var(--co-spacing-sm, 8px)}.co-drawer__icon{flex-shrink:0;color:var(--co-semantic-text-secondary)}.co-drawer__heading{margin:0;font-size:var(--co-font-size-18);font-weight:600;color:var(--co-semantic-text-default);line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.co-drawer__description{margin:var(--co-spacing-xs) 0 0;font-size:var(--co-font-size-13, 13px);font-weight:400;color:var(--co-semantic-text-muted);line-height:1.4}.co-drawer__close{display:flex;align-items:center;justify-content:center;padding:var(--co-spacing-xs);margin:0;border:none;background:transparent;cursor:pointer;color:var(--co-semantic-text-muted);border-radius:var(--co-border-radius-sm);transition:background var(--co-motion-duration-fast) var(--co-motion-ease-out);flex-shrink:0}.co-drawer__close:hover{background:var(--co-semantic-surface-hover)}.co-drawer__close:focus-visible{outline:2px solid var(--co-color-primary-azul);outline-offset:2px}.co-drawer__tabs{flex-shrink:0;border-bottom:1px solid var(--co-semantic-border-default)}.co-drawer__tabs--empty{display:none}.co-drawer__body{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:var(--co-spacing-xl);position:relative}.co-drawer__body{scrollbar-width:thin;scrollbar-color:transparent transparent}.co-drawer__body:hover{scrollbar-color:var(--co-color-opacity-negro-16) transparent}.co-drawer__body::-webkit-scrollbar{width:6px}.co-drawer__body::-webkit-scrollbar-track{background:transparent}.co-drawer__body::-webkit-scrollbar-thumb{background:transparent;border-radius:9999px}.co-drawer__body:hover::-webkit-scrollbar-thumb{background:var(--co-color-opacity-negro-16)}.co-drawer__body:hover::-webkit-scrollbar-thumb:hover{background:var(--co-color-opacity-negro-25)}.co-drawer__body:hover::-webkit-scrollbar-thumb:active{background:var(--co-color-opacity-negro-50)}.co-drawer__footer{display:flex;justify-content:flex-end;align-items:center;gap:var(--co-spacing-md);padding:var(--co-spacing-lg) var(--co-spacing-xl);border-top:1px solid var(--co-semantic-border-default);flex-shrink:0}.co-drawer__footer--empty{display:none}@media (max-width: 600px){.co-drawer--right,.co-drawer--left{width:100vw !important}}.co-drawer--modeless{z-index:1000;border:0;padding:0;background:transparent}.co-drawer--modeless.co-drawer--right{left:auto;bottom:auto}.co-drawer--modeless.co-drawer--left{right:auto;bottom:auto}.co-drawer--modeless.co-drawer--bottom{top:auto}'}},[257,"co-drawer",{open:[1540],position:[513],size:[513],heading:[1],description:[1],icon:[1],closable:[4],closeOnOverlay:[4,"close-on-overlay"],closeOnEscape:[4,"close-on-escape"],modeless:[516],loading:[4],hasFooter:[32],hasTabs:[32],hasHeaderSlot:[32]},[[4,"keydown","handleKey"]],{open:[{onOpenChange:0}]}]);function h(){"undefined"!=typeof customElements&&["co-drawer","co-icon","co-loader","co-overlay"].forEach((o=>{switch(o){case"co-drawer":customElements.get(r(o))||customElements.define(r(o),l);break;case"co-icon":customElements.get(r(o))||n();break;case"co-loader":customElements.get(r(o))||d();break;case"co-overlay":customElements.get(r(o))||s()}}))}h();export{l as C,h as d}
|
|
1
|
+
import{t as r,p as o,H as e,c as a,h as t}from"./index.js";import{d as s,a as c}from"./p-CBTGN490.js";import{s as i}from"./p-CBX_oabB.js";import{d as n}from"./p-DNJAIVfI.js";import{d}from"./p-BH184F0X.js";const l=o(class extends e{constructor(r){super(),!1!==r&&this.__registerHost(),this.__attachShadow(),this.coClose=a(this,"coClose",7),this.coOpen=a(this,"coOpen",7),this.coAfterOpen=a(this,"coAfterOpen",7),this.coAfterClose=a(this,"coAfterClose",7),this.open=!1,this.position="right",this.size="md",this.heading="",this.description="",this.icon="",this.closable=!0,this.closeOnOverlay=!0,this.closeOnEscape=!0,this.modeless=!1,this.loading=!1,this.hasFooter=!1,this.hasTabs=!1,this.hasHeaderSlot=!1,this.handleFooterSlotChange=r=>{this.hasFooter=i(r)},this.handleTabsSlotChange=r=>{this.hasTabs=i(r)},this.handleHeaderSlotChange=r=>{this.hasHeaderSlot=i(r)},this.handleOverlayClose=()=>{this.closeOnOverlay&&this.coClose.emit()},this.handleCloseClick=()=>{this.coClose.emit()},this.stopPropagation=r=>{r.stopPropagation()},this.handleTransitionEnd=r=>{if(r.target!==this.asideEl)return;const o=c(r.propertyName,this.open,"transform");"after-open"===o?this.coAfterOpen.emit():"after-close"===o&&this.coAfterClose.emit()},this.promoteModeless=r=>{r&&(this.asideEl=r);const o=this.asideEl;if(this.modeless&&o&&"function"==typeof o.showPopover)try{o.matches(":popover-open")||o.showPopover()}catch(r){}}}get labelledBy(){return this.hasHeaderSlot?"co-drawer-header-content":this.heading?"co-drawer-heading":void 0}onOpenChange(r,o){r&&!o&&this.coOpen.emit()}handleKey(r){this.open&&this.closeOnEscape&&"Escape"===r.key&&(this.modeless&&document.querySelector("co-drawer[open]:not([modeless]), co-modal[open]")||this.coClose.emit())}componentDidLoad(){this.promoteModeless()}render(){const r=t("aside",{class:{"co-drawer":!0,"co-sq-elevation":!0,"co-sq-elevation-fallback":!0,"co-drawer--open":this.open,"co-drawer--modeless":this.modeless,[`co-drawer--${this.position}`]:!0,[`co-drawer--${this.size}`]:!0},popover:this.modeless?"manual":void 0,ref:this.promoteModeless,part:"drawer",role:"dialog","aria-modal":this.modeless?"false":"true","aria-labelledby":this.labelledBy,onClick:this.stopPropagation,onTransitionEnd:this.handleTransitionEnd},t("div",{class:"co-drawer__card co-sq-clip",part:"card"},t("header",{class:"co-drawer__header",part:"header"},t("div",{class:"co-drawer__header-content",id:"co-drawer-header-content"},t("slot",{name:"header",onSlotchange:this.handleHeaderSlotChange},t("div",{class:"co-drawer__heading-row"},this.icon&&t("co-icon",{name:this.icon,size:20,class:"co-drawer__icon"}),t("h2",{class:"co-drawer__heading",id:"co-drawer-heading"},this.heading)),this.description&&t("p",{class:"co-drawer__description"},this.description))),this.closable&&t("button",{class:"co-drawer__close",type:"button","aria-label":"Close",onClick:this.handleCloseClick},t("co-icon",{name:"x",size:20}))),t("div",{class:{"co-drawer__tabs":!0,"co-drawer__tabs--empty":!this.hasTabs},part:"tabs"},t("slot",{name:"tabs",onSlotchange:this.handleTabsSlotChange})),t("div",{class:"co-drawer__body",part:"body"},t("slot",null),t("co-loader",{overlay:!0,visible:this.loading,part:"loader"})),t("footer",{class:{"co-drawer__footer":!0,"co-drawer__footer--empty":!this.hasFooter},part:"footer"},t("slot",{name:"footer",onSlotchange:this.handleFooterSlotChange}))));return this.modeless?r:t("co-overlay",{open:this.open,onCoClose:this.handleOverlayClose},r)}get el(){return this}static get watchers(){return{open:[{onOpenChange:0}]}}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:contents}.co-drawer{position:fixed;display:flex;flex-direction:column;font-family:var(--co-font-family-primary);transition:transform var(--co-motion-duration-slow) var(--co-motion-ease-in-out);will-change:transform;z-index:1;contain:layout;--co-drawer-r:var(--co-shell-r, var(--co-border-radius-md));--co-sq-r:var(--co-drawer-r);--co-sq-shadow:0 1px 4px rgba(31, 28, 27, 0.06), 0 10px 56px rgba(31, 28, 27, 0.12);--co-sq-drop-shadow:drop-shadow(0 1px 2px rgba(31, 28, 27, 0.06)) drop-shadow(0 10px 28px rgba(31, 28, 27, 0.12))}.co-drawer--right{top:0;right:0;margin:6px;height:100vh;height:-webkit-fill-available;transform:translateX(calc(100% + 12px))}.co-drawer--right.co-drawer--open{transform:translateX(0)}.co-drawer--left{top:0;left:0;margin:6px;height:100vh;height:-webkit-fill-available;transform:translateX(calc(-100% - 12px))}.co-drawer--left.co-drawer--open{transform:translateX(0)}.co-drawer--bottom{bottom:0;left:0;right:0;margin:6px;width:auto;transform:translateY(calc(100% + 12px))}.co-drawer--bottom.co-drawer--open{transform:translateY(0)}.co-drawer--right.co-drawer--sm,.co-drawer--left.co-drawer--sm{width:400px;max-width:100vw}.co-drawer--right.co-drawer--md,.co-drawer--left.co-drawer--md{width:520px;max-width:100vw}.co-drawer--right.co-drawer--lg,.co-drawer--left.co-drawer--lg{width:672px;max-width:100vw}.co-drawer--right.co-drawer--xl,.co-drawer--left.co-drawer--xl{width:960px;max-width:100vw}.co-drawer--right.co-drawer--full,.co-drawer--left.co-drawer--full{width:100vw}.co-drawer--bottom.co-drawer--sm{height:40vh}.co-drawer--bottom.co-drawer--md{height:60vh}.co-drawer--bottom.co-drawer--lg{height:80vh}.co-drawer--bottom.co-drawer--xl{height:95vh}.co-drawer--bottom.co-drawer--full{height:100vh}.co-drawer__card{flex:1;min-height:0;display:flex;flex-direction:column;background:var(--co-semantic-surface-page)}.co-drawer__header{display:flex;align-items:center;gap:var(--co-spacing-md);padding:var(--co-spacing-lg) var(--co-spacing-xl);border-bottom:1px solid var(--co-semantic-border-default);flex-shrink:0}.co-drawer__header-content{flex:1;min-width:0}.co-drawer__heading-row{display:flex;align-items:center;gap:var(--co-spacing-sm, 8px)}.co-drawer__icon{flex-shrink:0;color:var(--co-semantic-text-secondary)}.co-drawer__heading{margin:0;font-size:var(--co-font-size-18);font-weight:600;color:var(--co-semantic-text-default);line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.co-drawer__description{margin:var(--co-spacing-xs) 0 0;font-size:var(--co-font-size-13, 13px);font-weight:400;color:var(--co-semantic-text-muted);line-height:1.4}.co-drawer__close{display:flex;align-items:center;justify-content:center;padding:var(--co-spacing-xs);margin:0;border:none;background:transparent;cursor:pointer;color:var(--co-semantic-text-muted);border-radius:var(--co-border-radius-sm);transition:background var(--co-motion-duration-fast) var(--co-motion-ease-out);flex-shrink:0}.co-drawer__close:hover{background:var(--co-semantic-surface-hover)}.co-drawer__close:focus-visible{outline:2px solid var(--co-color-primary-azul);outline-offset:2px}.co-drawer__tabs{flex-shrink:0;border-bottom:1px solid var(--co-semantic-border-default)}.co-drawer__tabs--empty{display:none}.co-drawer__body{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:var(--co-spacing-xl);position:relative}.co-drawer__body{scrollbar-width:thin;scrollbar-color:transparent transparent}.co-drawer__body:hover{scrollbar-color:var(--co-color-opacity-negro-16) transparent}.co-drawer__body::-webkit-scrollbar{width:6px}.co-drawer__body::-webkit-scrollbar-track{background:transparent}.co-drawer__body::-webkit-scrollbar-thumb{background:transparent;border-radius:9999px}.co-drawer__body:hover::-webkit-scrollbar-thumb{background:var(--co-color-opacity-negro-16)}.co-drawer__body:hover::-webkit-scrollbar-thumb:hover{background:var(--co-color-opacity-negro-25)}.co-drawer__body:hover::-webkit-scrollbar-thumb:active{background:var(--co-color-opacity-negro-50)}.co-drawer__footer{display:flex;justify-content:flex-end;align-items:center;gap:var(--co-spacing-md);padding:var(--co-spacing-lg) var(--co-spacing-xl);border-top:1px solid var(--co-semantic-border-default);flex-shrink:0}.co-drawer__footer--empty{display:none}@media (max-width: 600px){.co-drawer--right,.co-drawer--left{width:100vw !important}}.co-drawer--modeless{z-index:1000;border:0;padding:0;background:transparent}.co-drawer--modeless.co-drawer--right{left:auto;bottom:auto}.co-drawer--modeless.co-drawer--left{right:auto;bottom:auto}.co-drawer--modeless.co-drawer--bottom{top:auto}'}},[257,"co-drawer",{open:[1540],position:[513],size:[513],heading:[1],description:[1],icon:[1],closable:[4],closeOnOverlay:[4,"close-on-overlay"],closeOnEscape:[4,"close-on-escape"],modeless:[516],loading:[4],hasFooter:[32],hasTabs:[32],hasHeaderSlot:[32]},[[4,"keydown","handleKey"]],{open:[{onOpenChange:0}]}]);function h(){"undefined"!=typeof customElements&&["co-drawer","co-icon","co-loader","co-overlay"].forEach((o=>{switch(o){case"co-drawer":customElements.get(r(o))||customElements.define(r(o),l);break;case"co-icon":customElements.get(r(o))||n();break;case"co-loader":customElements.get(r(o))||d();break;case"co-overlay":customElements.get(r(o))||s()}}))}h();export{l as C,h as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as t,H as s,c as o,h as i}from"./index.js";const n=t(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.coRevealEnd=o(this,"coRevealEnd",7),this.variant="rect",this.width="100%",this.height="",this.revealed=!1,this.revealEndEmitted=!1,this.handleTransitionEnd=e=>{this.revealed&&"opacity"===e.propertyName&&this.emitRevealEnd()}}onRevealedChange(e){clearTimeout(this.revealFallbackTimer),e?(this.revealEndEmitted=!1,this.revealFallbackTimer=setTimeout((()=>this.emitRevealEnd()),400)):this.revealEndEmitted=!1}disconnectedCallback(){clearTimeout(this.revealFallbackTimer)}emitRevealEnd(){clearTimeout(this.revealFallbackTimer),this.revealEndEmitted||(this.revealEndEmitted=!0,this.coRevealEnd.emit())}render(){const e={width:this.width};return this.height&&(e.height=this.height),i("div",{key:"
|
|
1
|
+
import{t as e,p as t,H as s,c as o,h as i}from"./index.js";const n=t(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.coRevealEnd=o(this,"coRevealEnd",7),this.variant="rect",this.width="100%",this.height="",this.revealed=!1,this.revealEndEmitted=!1,this.handleTransitionEnd=e=>{this.revealed&&"opacity"===e.propertyName&&this.emitRevealEnd()}}onRevealedChange(e){clearTimeout(this.revealFallbackTimer),e?(this.revealEndEmitted=!1,this.revealFallbackTimer=setTimeout((()=>this.emitRevealEnd()),400)):this.revealEndEmitted=!1}disconnectedCallback(){clearTimeout(this.revealFallbackTimer)}emitRevealEnd(){clearTimeout(this.revealFallbackTimer),this.revealEndEmitted||(this.revealEndEmitted=!0,this.coRevealEnd.emit())}render(){const e={width:this.width};return this.height&&(e.height=this.height),i("div",{key:"744fb805939c99587c4d0b72355da54d1f5aad43",class:{"co-skeleton":!0,[`co-skeleton--${this.variant}`]:!0,"co-skeleton--revealed":this.revealed},part:"skeleton",style:e,"aria-hidden":"true",onTransitionEnd:this.handleTransitionEnd})}static get watchers(){return{revealed:[{onRevealedChange:0}]}}static get style(){return":host{display:block}.co-skeleton{height:1em;border-radius:var(--co-border-radius-xs);background:linear-gradient( 90deg, var(--co-semantic-surface-secondary) 0%, var(--co-semantic-surface-hover, rgba(0, 0, 0, 0.04)) 50%, var(--co-semantic-surface-secondary) 100% );background-size:200% 100%;animation:co-skeleton-sweep 1.2s ease-in-out infinite}.co-skeleton--text{border-radius:var(--co-border-radius-xxs)}.co-skeleton--circle{border-radius:var(--co-border-radius-full)}.co-skeleton{transition:opacity var(--co-motion-duration-base) var(--co-motion-ease-in-out)}.co-skeleton--revealed{opacity:0;pointer-events:none;animation:none}@keyframes co-skeleton-sweep{0%{background-position:200% 0}100%{background-position:-200% 0}}@media (prefers-reduced-motion: reduce){.co-skeleton{animation:none}}"}},[1,"co-skeleton",{variant:[513],width:[1],height:[1],revealed:[516]},void 0,{revealed:[{onRevealedChange:0}]}]);function a(){"undefined"!=typeof customElements&&["co-skeleton"].forEach((t=>{"co-skeleton"===t&&(customElements.get(e(t))||customElements.define(e(t),n))}))}a();export{n as C,a as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as e,H as a,c as o,h as i}from"./index.js";import{l as c,r as n}from"./p-Dxa7c4Ap.js";import{d as r}from"./p-DNJAIVfI.js";import{d as s}from"./p-C-5cLeKr.js";import{d as l}from"./p-DkDTmHCg.js";import{b as h,t as d,p as u,c as p,f as m,e as v,d as f}from"./p-e5KibEs8.js";import{z as g,a as b,t as x,g as _,w as y}from"./p-Ch837Ggl.js";const w=e(class extends a{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.coDaySelect=o(this,"coDaySelect",1),this.coEventClick=o(this,"coEventClick",1),this.coEventDrop=o(this,"coEventDrop",1),this.coMoreClick=o(this,"coMoreClick",1),this.coEventDblClick=o(this,"coEventDblClick",1),this.events=[],this.locale="es-CO",this.firstDayOfWeek=1,this.editable=!0,this.selectable=!0,this.maxLanes=3,this.loading=!1,this.dragOverDate=null,this.dragId=null,this.nowMs=0,this.onPointerUp=()=>this.finishDrag(),this.onPointerMove=t=>this.trackDrag(t),this.dragArmedId=null,this.dragStartPointer=null,this.suppressNextClick=!1,this.selectedDate=null,this.handleKeyDown=t=>{const e=this.focused;let a=!0;switch(t.key){case"ArrowLeft":this.moveFocus(h(e,-1));break;case"ArrowRight":this.moveFocus(h(e,1));break;case"ArrowUp":this.moveFocus(h(e,-7));break;case"ArrowDown":this.moveFocus(h(e,7));break;case"Enter":case" ":this.selectDay(e);break;default:a=!1}a&&(t.preventDefault(),t.stopPropagation())}}componentWillLoad(){this.focused=this.defaultFocus(),this.nowMs=Date.now()}componentDidLoad(){this.nowTimer=window.setInterval((()=>this.nowMs=Date.now()),6e4)}connectedCallback(){window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointermove",this.onPointerMove)}disconnectedCallback(){window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointermove",this.onPointerMove),this.nowTimer&&window.clearInterval(this.nowTimer)}defaultFocus(){const t=`${C(this.year)}-${D(this.month)}-01`,e=d(),a=u(e);return a.year===this.year&&a.month===this.month?e:t}eventById(t){var e,a;return null!==(a=null===(e=this._layoutCache)||void 0===e?void 0:e.byId.get(t))&&void 0!==a?a:this.events.find((e=>e.id===t))}isDayInteractable(t){return!p(t,{min:this.minDate,max:this.maxDate})}selectDay(t,e){this.selectable&&this.isDayInteractable(t)&&(this.selectedDate=t,this.coDaySelect.emit({date:t,rect:e}))}async clearSelection(){this.selectedDate=null}onEventsChange(){this.selectedDate=null}activateEvent(t,e){this.coEventClick.emit({id:t,rect:e})}moveFocus(t){this.focused=t,requestAnimationFrame((()=>this.focusCell()))}focusCell(){var t,e;null===(e=null===(t=this.el.shadowRoot)||void 0===t?void 0:t.querySelector(`[data-date="${this.focused}"]`))||void 0===e||e.focus()}setInteracting(t){var e;null===(e=this.rootEl)||void 0===e||e.classList.toggle("cal-month--interacting",t)}startDrag(t,e){const a=this.eventById(e);a&&this.editable&&!1!==a.editable&&!1!==a.startEditable&&(t.stopPropagation(),this.dragArmedId=e,this.dragStartPointer={x:t.clientX,y:t.clientY})}trackDrag(t){if(!this.dragArmedId||this.dragId)return;const e=this.dragStartPointer;e&&(Math.hypot(t.clientX-e.x,t.clientY-e.y)<5||(this.dragId=this.dragArmedId,this.dragArmedId=null,this.dragOverDate=null,this.setInteracting(!0)))}finishDrag(){if(this.dragArmedId&&!this.dragId)return this.dragArmedId=null,void(this.dragStartPointer=null);const t=this.dragId,e=this.dragOverDate;if(this.dragId=null,this.dragOverDate=null,this.dragStartPointer=null,this.setInteracting(!1),!t||!e)return;const a=this.eventById(t);if(!a)return;const o=function(t,e){const[a,o,i]=t.split("-").map(Number),[c,n,r]=e.split("-").map(Number);return Math.round((Date.UTC(c,n-1,r)-Date.UTC(a,o-1,i))/864e5)}(a.allDay?a.start.slice(0,10):g(a.startMs,this.timeZone),e);if(0===o)return;if(!this.isDayInteractable(e))return;this.suppressNextClick=!0,setTimeout((()=>{this.suppressNextClick=!1}),0);const i=function(t,e,a){return t.allDay?{start:h(t.start.slice(0,10),e),end:h(t.end.slice(0,10),e)}:{start:x(z(t.startMs,e,a)),end:x(z(t.endMs,e,a))}}(a,o,this.timeZone);this.coEventDrop.emit({id:t,start:i.start,end:i.end,oldStart:a.start,oldEnd:a.end,allDay:a.allDay})}getLayouts(){var t;const e=this._layoutCache;if(e&&e.events===this.events&&e.year===this.year&&e.month===this.month&&e.firstDayOfWeek===this.firstDayOfWeek&&e.timeZone===this.timeZone&&e.maxLanes===this.maxLanes)return e;const a=m(this.year,this.month,this.firstDayOfWeek).map((t=>t.map((t=>t.value)))),o=c(this.events,a,{maxLanes:this.maxLanes,timeZone:this.timeZone}),i=new Map;for(const e of o.segments){if(e.lane>=this.maxLanes)continue;const a=null!==(t=i.get(e.weekIndex))&&void 0!==t?t:[];a.push(e),i.set(e.weekIndex,a)}const n=new Map(this.events.map((t=>[t.id,t])));return this._layoutCache={events:this.events,year:this.year,month:this.month,firstDayOfWeek:this.firstDayOfWeek,timeZone:this.timeZone,maxLanes:this.maxLanes,matrix:a,layout:o,segByWeek:i,byId:n},this._layoutCache}renderChip(t,e){var a;const o=this.eventById(t.eventId);if(!o)return null;const c=e.length,r=t.startCol/c*100,s=(t.endCol-t.startCol+1)/c*100,l=o.endMs<=this.nowMs,h=!0===(null===(a=o.extendedProps)||void 0===a?void 0:a.isExternal),d=!this.editable||!1===o.editable,u=o.allDay||!t.isStart?"":function(t,e){const a=`${e}|${t}`,o=E.get(a);if(void 0!==o)return o;let i=$.get(e);i||(i=new Intl.DateTimeFormat(e,{hour:"numeric",minute:"2-digit"}),$.set(e,i));const c=Math.floor(t/60),n=i.format(new Date(2e3,0,1,c,t%60));return E.size>2e3&&E.clear(),E.set(a,n),n}(b(o.startMs,this.timeZone),this.locale),p={left:`${r}%`,width:`${s}%`,top:`calc(var(--co-cal-daynum-h) + ${t.lane} * var(--co-cal-lane-h))`};if(o.backgroundColor){p["--co-cal-event-bg"]=o.backgroundColor;const t=n(this.rootEl,o.backgroundColor);t&&(p["--co-cal-event-text"]=t)}return o.borderColor&&(p["--co-cal-event-border"]=o.borderColor),i("button",{type:"button",key:`${t.eventId}-${t.weekIndex}`,class:{"cal-chip":!0,"cal-chip--all-day":o.allDay,"cal-chip--past":l,"cal-chip--external":h,"cal-chip--locked":d,"cal-chip--dragging":this.dragId===o.id,"cal-chip--continues-before":t.continuesBefore,"cal-chip--continues-after":t.continuesAfter,"cal-chip--tentative":"tentative"===o.responseState,"cal-chip--cancelled":"cancelled"===o.responseState||"declined"===o.responseState},style:p,title:o.title,"aria-label":o.title,onClick:t=>{t.stopPropagation(),this.suppressNextClick?this.suppressNextClick=!1:this.activateEvent(o.id,t.currentTarget.getBoundingClientRect())},onDblClick:t=>{t.stopPropagation(),this.coEventDblClick.emit({id:o.id,rect:t.currentTarget.getBoundingClientRect()})},onPointerDown:t=>this.startDrag(t,o.id)},!o.allDay&&i("span",{class:"cal-chip__dot","aria-hidden":"true"}),u&&i("span",{class:"cal-chip__time"},u),i("span",{class:"cal-chip__title"},o.title||"—"),h&&(I(o)?i("co-provider-logo",{provider:I(o),size:11,plated:!0,class:"cal-chip__ext"}):i("co-icon",{name:"link",size:11,class:"cal-chip__ext"})))}render(){const{matrix:t,layout:e,segByWeek:a}=this.getLayouts(),o=v(this.locale,this.firstDayOfWeek,"short"),c=v(this.locale,this.firstDayOfWeek,"long"),n=d();return i("div",{key:"7cb63a84f7005ee7b5552a5d9b88c598f579b7be",class:"cal-month",part:"grid",role:"grid",onKeyDown:this.handleKeyDown,ref:t=>this.rootEl=t},i("div",{key:"70281a5799b9b95957d152e15a374001a2ec8fa2",class:"cal-month__dow",role:"row"},o.map(((t,e)=>i("span",{class:"cal-month__dow-cell",role:"columnheader","aria-label":c[e]},t)))),t.map(((t,o)=>{var c;return i("div",{class:"cal-month__week",role:"row"},i("div",{class:"cal-month__days"},t.map((t=>{const e=u(t),a=e.month===this.month,o=0===f(t,n),c=0===f(t,this.focused),r=this.isDayInteractable(t);return i("div",{role:"gridcell","data-date":t,tabIndex:c?0:-1,"aria-current":o?"date":void 0,"aria-disabled":r?void 0:"true",class:{"cal-month__day":!0,"cal-month__day--outside":!a,"cal-month__day--today":o,"cal-month__day--disabled":!r,"cal-month__day--drag-over":null!==this.dragId&&this.dragOverDate===t,"cal-month__day--selected":this.selectedDate===t},onClick:e=>this.selectDay(t,e.currentTarget.getBoundingClientRect()),onPointerEnter:()=>{this.dragId&&(this.dragOverDate=t)}},i("span",{class:"cal-month__daynum"},e.day))}))),i("div",{class:"cal-month__events"},this.loading&&k[o%k.length].map((([e,a,o])=>i("div",{class:"cal-month__chip-skeleton","aria-hidden":"true",style:{left:e/t.length*100+"%",width:a/t.length*100+"%",top:`calc(var(--co-cal-daynum-h) + ${o} * var(--co-cal-lane-h))`}},i("co-skeleton",{variant:"rect",width:"100%",height:"100%"})))),!this.loading&&(null!==(c=a.get(o))&&void 0!==c?c:[]).map((e=>this.renderChip(e,t))),!this.loading&&t.map(((a,o)=>{var c;const n=null!==(c=e.overflow[a])&&void 0!==c?c:0;return n<=0?null:i("button",{type:"button",class:"cal-month__more",style:{left:o/t.length*100+"%",width:1/t.length*100+"%",top:`calc(var(--co-cal-daynum-h) + ${this.maxLanes} * var(--co-cal-lane-h))`},onClick:t=>{t.stopPropagation(),this.coMoreClick.emit({date:a})}},"+",n)}))))})))}get el(){return this}static get watchers(){return{events:[{onEventsChange:0}]}}static get style(){return":host{display:block;font-family:var(--co-font-family-primary);--co-cal-daynum-h:24px;--co-cal-lane-h:22px;--co-cal-min-week-h:92px;--co-cal-gap:2px;--co-cal-surface:var(--co-semantic-surface-page);--co-cal-border:var(--co-semantic-border-default);--co-cal-text:var(--co-semantic-text-default);--co-cal-text-muted:var(--co-semantic-text-muted);--co-cal-hover:var(--co-semantic-surface-hover);--co-cal-today-ring:var(--co-color-primary-azul);--co-cal-event-radius:6px;--co-cal-elevation-hover:var(--co-shadow-lg);--co-cal-event-bg:var(--co-color-primary-azul);--co-cal-event-border:transparent;--co-cal-event-text:var(--co-color-base-blanco, #fff);--co-cal-event-text-light:var(--co-color-base-blanco, #fff);--co-cal-event-text-dark:var(--co-semantic-text-default)}.cal-month{display:flex;flex-direction:column;height:100%;border-radius:var(--co-border-radius-xs);overflow:hidden;background:var(--co-cal-surface)}.cal-month__dow{display:grid;grid-template-columns:repeat(7, 1fr);border-bottom:1px solid var(--co-cal-border)}.cal-month__dow-cell{padding:var(--co-spacing-xs) var(--co-spacing-sm);font-size:var(--co-font-size-10, 10px);font-weight:600;text-transform:uppercase;letter-spacing:0.04em;color:var(--co-cal-text-muted);text-align:right}.cal-month__week{position:relative;min-height:var(--co-cal-min-week-h);flex:1 0 auto}.cal-month__week:not(:last-child){border-bottom:1px solid var(--co-cal-border)}.cal-month__days{display:grid;grid-template-columns:repeat(7, 1fr);height:100%;position:absolute;inset:0}.cal-month__day{border-right:1px solid var(--co-cal-border);padding:var(--co-spacing-xxs);cursor:pointer;transition:background var(--co-motion-duration-fast) var(--co-motion-ease-out)}.cal-month__day:last-child{border-right:0}.cal-month__day:hover{background:var(--co-cal-hover)}.cal-month__day:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:-2px}.cal-month__day--outside .cal-month__daynum{color:var(--co-cal-text-muted)}.cal-month__day--disabled{cursor:not-allowed;background:color-mix(in srgb, var(--co-cal-border) 20%, transparent)}.cal-month__day--drag-over{background:color-mix(in srgb, var(--co-cal-today-ring) 14%, transparent);box-shadow:inset 0 0 0 2px var(--co-cal-today-ring)}.cal-month__day--selected{background:color-mix(in srgb, var(--co-cal-today-ring) 10%, transparent)}.cal-month__daynum{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;margin-left:auto;float:right;font-size:var(--co-font-size-12, 12px);color:var(--co-cal-text);border-radius:var(--co-border-radius-full)}.cal-month__day--today .cal-month__daynum{background:var(--co-cal-today-ring);color:var(--co-color-base-blanco, #fff);font-weight:600}.cal-month__events{position:absolute;inset:0;pointer-events:none;}.cal-chip,.cal-month__more{position:absolute;height:calc(var(--co-cal-lane-h) - 3px);box-sizing:border-box;pointer-events:auto;display:flex;align-items:center;gap:var(--co-spacing-xxs);margin:0 3px;padding:0 var(--co-spacing-xs);border:1px solid var(--co-cal-event-border);border-radius:var(--co-cal-event-radius);font-family:inherit;font-size:var(--co-font-size-12, 12px);line-height:1;text-align:left;cursor:pointer;overflow:hidden;white-space:nowrap}.cal-chip{background:var(--co-cal-event-bg);color:var(--co-cal-event-text);user-select:none;-webkit-user-select:none;touch-action:none}.cal-month__chip-skeleton{position:absolute;height:calc(var(--co-cal-lane-h) - 3px);box-sizing:border-box;margin:0 3px;border-radius:var(--co-cal-event-radius);overflow:hidden;pointer-events:none}.cal-month__chip-skeleton co-skeleton{display:block;block-size:100%}.cal-chip--all-day:hover{filter:brightness(0.95);box-shadow:var(--co-cal-elevation-hover)}.cal-chip:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:1px}.cal-chip--all-day{font-weight:500}.cal-chip__dot{flex:0 0 auto;width:7px;height:7px;border-radius:var(--co-border-radius-full);background:var(--co-cal-event-bg)}.cal-chip:not(.cal-chip--all-day){background:transparent;color:var(--co-cal-text);border-color:transparent}.cal-chip:not(.cal-chip--all-day):hover{background:var(--co-cal-hover);filter:none}.cal-chip__time{flex:0 0 auto;color:var(--co-cal-text-muted);font-variant-numeric:tabular-nums}.cal-chip__title{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis}.cal-chip__ext{flex:0 0 auto;margin-inline-start:auto;opacity:0.8}.cal-chip--past{opacity:0.55}.cal-chip--locked{cursor:default}.cal-chip--external{border-style:dashed}.cal-chip--dragging{opacity:0.4}.cal-month--interacting .cal-chip{pointer-events:none}.cal-chip--all-day.cal-chip--tentative{background-image:repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.5) 0 4px, transparent 4px 8px)}.cal-chip--cancelled{opacity:0.6}.cal-chip--cancelled .cal-chip__title{text-decoration:line-through}.cal-chip--continues-before{border-top-left-radius:0;border-bottom-left-radius:0;margin-left:0}.cal-chip--continues-after{border-top-right-radius:0;border-bottom-right-radius:0;margin-right:0}.cal-month__more{background:transparent;color:var(--co-cal-text-muted);border-color:transparent;font-weight:600;font-size:var(--co-font-size-11, 11px)}.cal-month__more:hover{background:var(--co-cal-hover);color:var(--co-cal-text)}"}},[1,"co-calendar-month",{events:[16],year:[2],month:[2],locale:[1],firstDayOfWeek:[2,"first-day-of-week"],timeZone:[1,"time-zone"],minDate:[1,"min-date"],maxDate:[1,"max-date"],editable:[4],selectable:[4],maxLanes:[2,"max-lanes"],loading:[4],focused:[32],dragOverDate:[32],dragId:[32],nowMs:[32],selectedDate:[32],clearSelection:[64]},void 0,{events:[{onEventsChange:0}]}]),k=[[[0,2,0],[3,1,0],[5,1,1]],[[1,1,0],[2,3,1]],[[0,1,0],[2,1,0],[4,2,1],[6,1,0]],[[1,2,0],[4,1,1]],[[2,1,0],[3,2,1],[6,1,0]],[[0,3,0],[5,1,1]]];function D(t){return String(t).padStart(2,"0")}function C(t){return String(t).padStart(4,"0")}function z(t,e,a){const o=_(t,a),i=h(`${C(o.year)}-${D(o.month)}-${D(o.day)}`,e),[c,n,r]=i.split("-").map(Number);return y({year:c,month:n,day:r,hour:o.hour,minute:o.minute,second:o.second},a)}const E=new Map,$=new Map;function I(t){var e,a;const o=String(null!==(a=null===(e=t.extendedProps)||void 0===e?void 0:e.provider)&&void 0!==a?a:"").toLowerCase();return o.includes("google")?"google":o.includes("microsoft")||o.includes("outlook")?"microsoft":""}function M(){"undefined"!=typeof customElements&&["co-calendar-month","co-icon","co-provider-logo","co-skeleton"].forEach((e=>{switch(e){case"co-calendar-month":customElements.get(t(e))||customElements.define(t(e),w);break;case"co-icon":customElements.get(t(e))||r();break;case"co-provider-logo":customElements.get(t(e))||s();break;case"co-skeleton":customElements.get(t(e))||l()}}))}M();export{w as C,M as d}
|
|
1
|
+
import{t,p as e,H as a,c as o,h as i}from"./index.js";import{l as c,r as n}from"./p-Dxa7c4Ap.js";import{d as r}from"./p-DNJAIVfI.js";import{d as s}from"./p-C-5cLeKr.js";import{d as l}from"./p-Nt4JJxbL.js";import{b as h,t as d,p as u,c as p,f as m,e as v,d as f}from"./p-e5KibEs8.js";import{z as g,a as b,t as x,g as _,w as y}from"./p-Ch837Ggl.js";const w=e(class extends a{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.coDaySelect=o(this,"coDaySelect",1),this.coEventClick=o(this,"coEventClick",1),this.coEventDrop=o(this,"coEventDrop",1),this.coMoreClick=o(this,"coMoreClick",1),this.coEventDblClick=o(this,"coEventDblClick",1),this.events=[],this.locale="es-CO",this.firstDayOfWeek=1,this.editable=!0,this.selectable=!0,this.maxLanes=3,this.loading=!1,this.dragOverDate=null,this.dragId=null,this.nowMs=0,this.onPointerUp=()=>this.finishDrag(),this.onPointerMove=t=>this.trackDrag(t),this.dragArmedId=null,this.dragStartPointer=null,this.suppressNextClick=!1,this.selectedDate=null,this.handleKeyDown=t=>{const e=this.focused;let a=!0;switch(t.key){case"ArrowLeft":this.moveFocus(h(e,-1));break;case"ArrowRight":this.moveFocus(h(e,1));break;case"ArrowUp":this.moveFocus(h(e,-7));break;case"ArrowDown":this.moveFocus(h(e,7));break;case"Enter":case" ":this.selectDay(e);break;default:a=!1}a&&(t.preventDefault(),t.stopPropagation())}}componentWillLoad(){this.focused=this.defaultFocus(),this.nowMs=Date.now()}componentDidLoad(){this.nowTimer=window.setInterval((()=>this.nowMs=Date.now()),6e4)}connectedCallback(){window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointermove",this.onPointerMove)}disconnectedCallback(){window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointermove",this.onPointerMove),this.nowTimer&&window.clearInterval(this.nowTimer)}defaultFocus(){const t=`${C(this.year)}-${D(this.month)}-01`,e=d(),a=u(e);return a.year===this.year&&a.month===this.month?e:t}eventById(t){var e,a;return null!==(a=null===(e=this._layoutCache)||void 0===e?void 0:e.byId.get(t))&&void 0!==a?a:this.events.find((e=>e.id===t))}isDayInteractable(t){return!p(t,{min:this.minDate,max:this.maxDate})}selectDay(t,e){this.selectable&&this.isDayInteractable(t)&&(this.selectedDate=t,this.coDaySelect.emit({date:t,rect:e}))}async clearSelection(){this.selectedDate=null}onEventsChange(){this.selectedDate=null}activateEvent(t,e){this.coEventClick.emit({id:t,rect:e})}moveFocus(t){this.focused=t,requestAnimationFrame((()=>this.focusCell()))}focusCell(){var t,e;null===(e=null===(t=this.el.shadowRoot)||void 0===t?void 0:t.querySelector(`[data-date="${this.focused}"]`))||void 0===e||e.focus()}setInteracting(t){var e;null===(e=this.rootEl)||void 0===e||e.classList.toggle("cal-month--interacting",t)}startDrag(t,e){const a=this.eventById(e);a&&this.editable&&!1!==a.editable&&!1!==a.startEditable&&(t.stopPropagation(),this.dragArmedId=e,this.dragStartPointer={x:t.clientX,y:t.clientY})}trackDrag(t){if(!this.dragArmedId||this.dragId)return;const e=this.dragStartPointer;e&&(Math.hypot(t.clientX-e.x,t.clientY-e.y)<5||(this.dragId=this.dragArmedId,this.dragArmedId=null,this.dragOverDate=null,this.setInteracting(!0)))}finishDrag(){if(this.dragArmedId&&!this.dragId)return this.dragArmedId=null,void(this.dragStartPointer=null);const t=this.dragId,e=this.dragOverDate;if(this.dragId=null,this.dragOverDate=null,this.dragStartPointer=null,this.setInteracting(!1),!t||!e)return;const a=this.eventById(t);if(!a)return;const o=function(t,e){const[a,o,i]=t.split("-").map(Number),[c,n,r]=e.split("-").map(Number);return Math.round((Date.UTC(c,n-1,r)-Date.UTC(a,o-1,i))/864e5)}(a.allDay?a.start.slice(0,10):g(a.startMs,this.timeZone),e);if(0===o)return;if(!this.isDayInteractable(e))return;this.suppressNextClick=!0,setTimeout((()=>{this.suppressNextClick=!1}),0);const i=function(t,e,a){return t.allDay?{start:h(t.start.slice(0,10),e),end:h(t.end.slice(0,10),e)}:{start:x(z(t.startMs,e,a)),end:x(z(t.endMs,e,a))}}(a,o,this.timeZone);this.coEventDrop.emit({id:t,start:i.start,end:i.end,oldStart:a.start,oldEnd:a.end,allDay:a.allDay})}getLayouts(){var t;const e=this._layoutCache;if(e&&e.events===this.events&&e.year===this.year&&e.month===this.month&&e.firstDayOfWeek===this.firstDayOfWeek&&e.timeZone===this.timeZone&&e.maxLanes===this.maxLanes)return e;const a=m(this.year,this.month,this.firstDayOfWeek).map((t=>t.map((t=>t.value)))),o=c(this.events,a,{maxLanes:this.maxLanes,timeZone:this.timeZone}),i=new Map;for(const e of o.segments){if(e.lane>=this.maxLanes)continue;const a=null!==(t=i.get(e.weekIndex))&&void 0!==t?t:[];a.push(e),i.set(e.weekIndex,a)}const n=new Map(this.events.map((t=>[t.id,t])));return this._layoutCache={events:this.events,year:this.year,month:this.month,firstDayOfWeek:this.firstDayOfWeek,timeZone:this.timeZone,maxLanes:this.maxLanes,matrix:a,layout:o,segByWeek:i,byId:n},this._layoutCache}renderChip(t,e){var a;const o=this.eventById(t.eventId);if(!o)return null;const c=e.length,r=t.startCol/c*100,s=(t.endCol-t.startCol+1)/c*100,l=o.endMs<=this.nowMs,h=!0===(null===(a=o.extendedProps)||void 0===a?void 0:a.isExternal),d=!this.editable||!1===o.editable,u=o.allDay||!t.isStart?"":function(t,e){const a=`${e}|${t}`,o=E.get(a);if(void 0!==o)return o;let i=$.get(e);i||(i=new Intl.DateTimeFormat(e,{hour:"numeric",minute:"2-digit"}),$.set(e,i));const c=Math.floor(t/60),n=i.format(new Date(2e3,0,1,c,t%60));return E.size>2e3&&E.clear(),E.set(a,n),n}(b(o.startMs,this.timeZone),this.locale),p={left:`${r}%`,width:`${s}%`,top:`calc(var(--co-cal-daynum-h) + ${t.lane} * var(--co-cal-lane-h))`};if(o.backgroundColor){p["--co-cal-event-bg"]=o.backgroundColor;const t=n(this.rootEl,o.backgroundColor);t&&(p["--co-cal-event-text"]=t)}return o.borderColor&&(p["--co-cal-event-border"]=o.borderColor),i("button",{type:"button",key:`${t.eventId}-${t.weekIndex}`,class:{"cal-chip":!0,"cal-chip--all-day":o.allDay,"cal-chip--past":l,"cal-chip--external":h,"cal-chip--locked":d,"cal-chip--dragging":this.dragId===o.id,"cal-chip--continues-before":t.continuesBefore,"cal-chip--continues-after":t.continuesAfter,"cal-chip--tentative":"tentative"===o.responseState,"cal-chip--cancelled":"cancelled"===o.responseState||"declined"===o.responseState},style:p,title:o.title,"aria-label":o.title,onClick:t=>{t.stopPropagation(),this.suppressNextClick?this.suppressNextClick=!1:this.activateEvent(o.id,t.currentTarget.getBoundingClientRect())},onDblClick:t=>{t.stopPropagation(),this.coEventDblClick.emit({id:o.id,rect:t.currentTarget.getBoundingClientRect()})},onPointerDown:t=>this.startDrag(t,o.id)},!o.allDay&&i("span",{class:"cal-chip__dot","aria-hidden":"true"}),u&&i("span",{class:"cal-chip__time"},u),i("span",{class:"cal-chip__title"},o.title||"—"),h&&(I(o)?i("co-provider-logo",{provider:I(o),size:11,plated:!0,class:"cal-chip__ext"}):i("co-icon",{name:"link",size:11,class:"cal-chip__ext"})))}render(){const{matrix:t,layout:e,segByWeek:a}=this.getLayouts(),o=v(this.locale,this.firstDayOfWeek,"short"),c=v(this.locale,this.firstDayOfWeek,"long"),n=d();return i("div",{key:"7cb63a84f7005ee7b5552a5d9b88c598f579b7be",class:"cal-month",part:"grid",role:"grid",onKeyDown:this.handleKeyDown,ref:t=>this.rootEl=t},i("div",{key:"70281a5799b9b95957d152e15a374001a2ec8fa2",class:"cal-month__dow",role:"row"},o.map(((t,e)=>i("span",{class:"cal-month__dow-cell",role:"columnheader","aria-label":c[e]},t)))),t.map(((t,o)=>{var c;return i("div",{class:"cal-month__week",role:"row"},i("div",{class:"cal-month__days"},t.map((t=>{const e=u(t),a=e.month===this.month,o=0===f(t,n),c=0===f(t,this.focused),r=this.isDayInteractable(t);return i("div",{role:"gridcell","data-date":t,tabIndex:c?0:-1,"aria-current":o?"date":void 0,"aria-disabled":r?void 0:"true",class:{"cal-month__day":!0,"cal-month__day--outside":!a,"cal-month__day--today":o,"cal-month__day--disabled":!r,"cal-month__day--drag-over":null!==this.dragId&&this.dragOverDate===t,"cal-month__day--selected":this.selectedDate===t},onClick:e=>this.selectDay(t,e.currentTarget.getBoundingClientRect()),onPointerEnter:()=>{this.dragId&&(this.dragOverDate=t)}},i("span",{class:"cal-month__daynum"},e.day))}))),i("div",{class:"cal-month__events"},this.loading&&k[o%k.length].map((([e,a,o])=>i("div",{class:"cal-month__chip-skeleton","aria-hidden":"true",style:{left:e/t.length*100+"%",width:a/t.length*100+"%",top:`calc(var(--co-cal-daynum-h) + ${o} * var(--co-cal-lane-h))`}},i("co-skeleton",{variant:"rect",width:"100%",height:"100%"})))),!this.loading&&(null!==(c=a.get(o))&&void 0!==c?c:[]).map((e=>this.renderChip(e,t))),!this.loading&&t.map(((a,o)=>{var c;const n=null!==(c=e.overflow[a])&&void 0!==c?c:0;return n<=0?null:i("button",{type:"button",class:"cal-month__more",style:{left:o/t.length*100+"%",width:1/t.length*100+"%",top:`calc(var(--co-cal-daynum-h) + ${this.maxLanes} * var(--co-cal-lane-h))`},onClick:t=>{t.stopPropagation(),this.coMoreClick.emit({date:a})}},"+",n)}))))})))}get el(){return this}static get watchers(){return{events:[{onEventsChange:0}]}}static get style(){return":host{display:block;font-family:var(--co-font-family-primary);--co-cal-daynum-h:24px;--co-cal-lane-h:22px;--co-cal-min-week-h:92px;--co-cal-gap:2px;--co-cal-surface:var(--co-semantic-surface-page);--co-cal-border:var(--co-semantic-border-default);--co-cal-text:var(--co-semantic-text-default);--co-cal-text-muted:var(--co-semantic-text-muted);--co-cal-hover:var(--co-semantic-surface-hover);--co-cal-today-ring:var(--co-color-primary-azul);--co-cal-event-radius:6px;--co-cal-elevation-hover:var(--co-shadow-lg);--co-cal-event-bg:var(--co-color-primary-azul);--co-cal-event-border:transparent;--co-cal-event-text:var(--co-color-base-blanco, #fff);--co-cal-event-text-light:var(--co-color-base-blanco, #fff);--co-cal-event-text-dark:var(--co-semantic-text-default)}.cal-month{display:flex;flex-direction:column;height:100%;border-radius:var(--co-border-radius-xs);overflow:hidden;background:var(--co-cal-surface)}.cal-month__dow{display:grid;grid-template-columns:repeat(7, 1fr);border-bottom:1px solid var(--co-cal-border)}.cal-month__dow-cell{padding:var(--co-spacing-xs) var(--co-spacing-sm);font-size:var(--co-font-size-10, 10px);font-weight:600;text-transform:uppercase;letter-spacing:0.04em;color:var(--co-cal-text-muted);text-align:right}.cal-month__week{position:relative;min-height:var(--co-cal-min-week-h);flex:1 0 auto}.cal-month__week:not(:last-child){border-bottom:1px solid var(--co-cal-border)}.cal-month__days{display:grid;grid-template-columns:repeat(7, 1fr);height:100%;position:absolute;inset:0}.cal-month__day{border-right:1px solid var(--co-cal-border);padding:var(--co-spacing-xxs);cursor:pointer;transition:background var(--co-motion-duration-fast) var(--co-motion-ease-out)}.cal-month__day:last-child{border-right:0}.cal-month__day:hover{background:var(--co-cal-hover)}.cal-month__day:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:-2px}.cal-month__day--outside .cal-month__daynum{color:var(--co-cal-text-muted)}.cal-month__day--disabled{cursor:not-allowed;background:color-mix(in srgb, var(--co-cal-border) 20%, transparent)}.cal-month__day--drag-over{background:color-mix(in srgb, var(--co-cal-today-ring) 14%, transparent);box-shadow:inset 0 0 0 2px var(--co-cal-today-ring)}.cal-month__day--selected{background:color-mix(in srgb, var(--co-cal-today-ring) 10%, transparent)}.cal-month__daynum{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;margin-left:auto;float:right;font-size:var(--co-font-size-12, 12px);color:var(--co-cal-text);border-radius:var(--co-border-radius-full)}.cal-month__day--today .cal-month__daynum{background:var(--co-cal-today-ring);color:var(--co-color-base-blanco, #fff);font-weight:600}.cal-month__events{position:absolute;inset:0;pointer-events:none;}.cal-chip,.cal-month__more{position:absolute;height:calc(var(--co-cal-lane-h) - 3px);box-sizing:border-box;pointer-events:auto;display:flex;align-items:center;gap:var(--co-spacing-xxs);margin:0 3px;padding:0 var(--co-spacing-xs);border:1px solid var(--co-cal-event-border);border-radius:var(--co-cal-event-radius);font-family:inherit;font-size:var(--co-font-size-12, 12px);line-height:1;text-align:left;cursor:pointer;overflow:hidden;white-space:nowrap}.cal-chip{background:var(--co-cal-event-bg);color:var(--co-cal-event-text);user-select:none;-webkit-user-select:none;touch-action:none}.cal-month__chip-skeleton{position:absolute;height:calc(var(--co-cal-lane-h) - 3px);box-sizing:border-box;margin:0 3px;border-radius:var(--co-cal-event-radius);overflow:hidden;pointer-events:none}.cal-month__chip-skeleton co-skeleton{display:block;block-size:100%}.cal-chip--all-day:hover{filter:brightness(0.95);box-shadow:var(--co-cal-elevation-hover)}.cal-chip:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:1px}.cal-chip--all-day{font-weight:500}.cal-chip__dot{flex:0 0 auto;width:7px;height:7px;border-radius:var(--co-border-radius-full);background:var(--co-cal-event-bg)}.cal-chip:not(.cal-chip--all-day){background:transparent;color:var(--co-cal-text);border-color:transparent}.cal-chip:not(.cal-chip--all-day):hover{background:var(--co-cal-hover);filter:none}.cal-chip__time{flex:0 0 auto;color:var(--co-cal-text-muted);font-variant-numeric:tabular-nums}.cal-chip__title{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis}.cal-chip__ext{flex:0 0 auto;margin-inline-start:auto;opacity:0.8}.cal-chip--past{opacity:0.55}.cal-chip--locked{cursor:default}.cal-chip--external{border-style:dashed}.cal-chip--dragging{opacity:0.4}.cal-month--interacting .cal-chip{pointer-events:none}.cal-chip--all-day.cal-chip--tentative{background-image:repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.5) 0 4px, transparent 4px 8px)}.cal-chip--cancelled{opacity:0.6}.cal-chip--cancelled .cal-chip__title{text-decoration:line-through}.cal-chip--continues-before{border-top-left-radius:0;border-bottom-left-radius:0;margin-left:0}.cal-chip--continues-after{border-top-right-radius:0;border-bottom-right-radius:0;margin-right:0}.cal-month__more{background:transparent;color:var(--co-cal-text-muted);border-color:transparent;font-weight:600;font-size:var(--co-font-size-11, 11px)}.cal-month__more:hover{background:var(--co-cal-hover);color:var(--co-cal-text)}"}},[1,"co-calendar-month",{events:[16],year:[2],month:[2],locale:[1],firstDayOfWeek:[2,"first-day-of-week"],timeZone:[1,"time-zone"],minDate:[1,"min-date"],maxDate:[1,"max-date"],editable:[4],selectable:[4],maxLanes:[2,"max-lanes"],loading:[4],focused:[32],dragOverDate:[32],dragId:[32],nowMs:[32],selectedDate:[32],clearSelection:[64]},void 0,{events:[{onEventsChange:0}]}]),k=[[[0,2,0],[3,1,0],[5,1,1]],[[1,1,0],[2,3,1]],[[0,1,0],[2,1,0],[4,2,1],[6,1,0]],[[1,2,0],[4,1,1]],[[2,1,0],[3,2,1],[6,1,0]],[[0,3,0],[5,1,1]]];function D(t){return String(t).padStart(2,"0")}function C(t){return String(t).padStart(4,"0")}function z(t,e,a){const o=_(t,a),i=h(`${C(o.year)}-${D(o.month)}-${D(o.day)}`,e),[c,n,r]=i.split("-").map(Number);return y({year:c,month:n,day:r,hour:o.hour,minute:o.minute,second:o.second},a)}const E=new Map,$=new Map;function I(t){var e,a;const o=String(null!==(a=null===(e=t.extendedProps)||void 0===e?void 0:e.provider)&&void 0!==a?a:"").toLowerCase();return o.includes("google")?"google":o.includes("microsoft")||o.includes("outlook")?"microsoft":""}function L(){"undefined"!=typeof customElements&&["co-calendar-month","co-icon","co-provider-logo","co-skeleton"].forEach((e=>{switch(e){case"co-calendar-month":customElements.get(t(e))||customElements.define(t(e),w);break;case"co-icon":customElements.get(t(e))||r();break;case"co-provider-logo":customElements.get(t(e))||s();break;case"co-skeleton":customElements.get(t(e))||l()}}))}L();export{w as C,L as d}
|
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, a as getElement } from './index-DH5lfRNj.js';
|
|
2
2
|
|
|
3
|
-
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-
|
|
3
|
+
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}`;
|
|
4
4
|
|
|
5
|
+
/** Native controls, ARIA widgets and Cobalt fields: a click on them is theirs, not a toggle. */
|
|
6
|
+
const INTERACTIVE_SELECTOR = [
|
|
7
|
+
'a[href]', 'button', 'input', 'select', 'textarea', 'label', 'summary', '[contenteditable="true"]',
|
|
8
|
+
'[role="button"]', '[role="link"]', '[role="checkbox"]', '[role="switch"]', '[role="menuitem"]', '[role="tab"]',
|
|
9
|
+
'co-button', 'co-icon-button', 'co-switch', 'co-checkbox', 'co-radio', 'co-chip', 'co-input', 'co-select',
|
|
10
|
+
'co-combobox', 'co-autocomplete', 'co-ref-field', 'co-number-field', 'co-toggle-button', 'co-menu',
|
|
11
|
+
].join(',');
|
|
12
|
+
function isInteractive(node) {
|
|
13
|
+
const el = node;
|
|
14
|
+
return typeof el.matches === 'function' && el.matches(INTERACTIVE_SELECTOR);
|
|
15
|
+
}
|
|
5
16
|
const CoAccordion = class {
|
|
6
17
|
constructor(hostRef) {
|
|
7
18
|
registerInstance(this, hostRef);
|
|
8
|
-
this.coToggle = createEvent(this, "coToggle",
|
|
19
|
+
this.coToggle = createEvent(this, "coToggle", 3);
|
|
9
20
|
/** Whether the section is expanded. */
|
|
10
21
|
this.open = true;
|
|
11
22
|
/** Section heading text (used when the `header` slot is empty). */
|
|
@@ -22,6 +33,24 @@ const CoAccordion = class {
|
|
|
22
33
|
this.open = !this.open;
|
|
23
34
|
this.coToggle.emit(this.open);
|
|
24
35
|
};
|
|
36
|
+
/**
|
|
37
|
+
* The heading group is a convenience trigger: a click on its text toggles, a
|
|
38
|
+
* click that started on interactive content slotted into `header`/`subheading`
|
|
39
|
+
* does not. Walks the composed path (slotted light DOM included) up to the
|
|
40
|
+
* heading group looking for anything focusable/actionable.
|
|
41
|
+
*/
|
|
42
|
+
this.handleHeadingClick = (ev) => {
|
|
43
|
+
if (this.disabled)
|
|
44
|
+
return;
|
|
45
|
+
const group = ev.currentTarget;
|
|
46
|
+
for (const node of ev.composedPath()) {
|
|
47
|
+
if (node === group)
|
|
48
|
+
break;
|
|
49
|
+
if (isInteractive(node))
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
this.handleToggle();
|
|
53
|
+
};
|
|
25
54
|
}
|
|
26
55
|
componentWillLoad() {
|
|
27
56
|
this.hasSubheadingSlot = !!this.el.querySelector('[slot="subheading"]');
|
|
@@ -34,11 +63,11 @@ const CoAccordion = class {
|
|
|
34
63
|
return !!(this.subheading && this.subheading.trim()) || this.hasSubheadingSlot;
|
|
35
64
|
}
|
|
36
65
|
render() {
|
|
37
|
-
return (h("div", { key: '
|
|
66
|
+
return (h("div", { key: '5b02028e29aae87aa6377833042b2fa3d24bd9b6', class: {
|
|
38
67
|
'co-accordion': true,
|
|
39
68
|
'co-accordion--open': this.open,
|
|
40
69
|
'co-accordion--disabled': this.disabled,
|
|
41
|
-
}, part: "accordion" }, h("div", { key: '
|
|
70
|
+
}, part: "accordion" }, h("div", { key: '7d27e1b5cce6eefa1adc68dc7f7b34f9888dc484', class: "co-accordion__header", part: "header" }, h("span", { key: '1cfc8da7316afb37b0a2d2b79266646339842029', class: "co-accordion__heading-group", onClick: this.handleHeadingClick }, h("span", { key: 'ec95bf00c0f34b9fdd03b2ec399eba72cc7d9099', class: "co-accordion__heading", part: "heading" }, h("slot", { key: 'c90344072032603e2103272001b8918cba7b65a8', name: "header" }, this.heading)), this.showSubheading && (h("span", { key: 'bb5dc096a23144a38bf02abd71143400683d6c77', class: "co-accordion__subheading", part: "subheading" }, h("slot", { key: 'a257179892145204541c54bab5734173128ebd54', name: "subheading" }, this.subheading)))), 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" }, h("co-icon", { key: '6bf641e38529c66da0559642821bdf11dba92429', name: "caret-up", size: 20 }))), h("div", { key: 'bcabf0d1a18939a388a482832a3746d3480a19d7', class: "co-accordion__body", part: "body" }, h("div", { key: '2b701a3f007ad5bb34b2da5ddc69dd7e2b74a289', class: "co-accordion__body-inner", part: "body-inner" }, h("slot", { key: 'd721a0a49b2a9fc47c69de8f995ec7d440db284b' })))));
|
|
42
71
|
}
|
|
43
72
|
get el() { return getElement(this); }
|
|
44
73
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h } from './index-DH5lfRNj.js';
|
|
2
2
|
|
|
3
|
-
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(
|
|
3
|
+
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}`;
|
|
4
4
|
|
|
5
5
|
const CoActionBar = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -79,6 +79,7 @@ const CoAudioPlayer = class {
|
|
|
79
79
|
this.coPause = createEvent(this, "coPause", 7);
|
|
80
80
|
this.coEnded = createEvent(this, "coEnded", 7);
|
|
81
81
|
this.coError = createEvent(this, "coError", 7);
|
|
82
|
+
this.coTimeUpdate = createEvent(this, "coTimeUpdate", 3);
|
|
82
83
|
/** Compact variant: narrower, hides the download button. */
|
|
83
84
|
this.compact = false;
|
|
84
85
|
/** Fallback bar count used before the container width is measured. Once
|
|
@@ -115,10 +116,22 @@ const CoAudioPlayer = class {
|
|
|
115
116
|
// Bumped by every init(); an in-flight extractPeaks whose token no longer matches
|
|
116
117
|
// belongs to a superseded `src` and must not write peaks/duration.
|
|
117
118
|
this.loadToken = 0;
|
|
118
|
-
this.onMeta = () => { this.syncDuration(); };
|
|
119
|
-
|
|
119
|
+
this.onMeta = () => { this.syncDuration(); this.applyPendingSeek(); };
|
|
120
|
+
/**
|
|
121
|
+
* A seek asked for before the media had data. `<audio>` DROPS a `currentTime`
|
|
122
|
+
* write while `readyState` is HAVE_NOTHING, silently: with `preload="metadata"`
|
|
123
|
+
* and a clip never played, the very first jump (clicking a transcript line on
|
|
124
|
+
* a recording nobody opened yet) went nowhere. Kept here and applied as soon
|
|
125
|
+
* as the element can take it.
|
|
126
|
+
*/
|
|
127
|
+
this.pendingSeek = null;
|
|
128
|
+
this.onCanPlay = () => { this.isLoading = false; this.applyPendingSeek(); };
|
|
120
129
|
this.onWaiting = () => { this.isLoading = true; };
|
|
121
|
-
this.onTime = () => {
|
|
130
|
+
this.onTime = () => {
|
|
131
|
+
var _a;
|
|
132
|
+
this.currentTime = ((_a = this.audio) === null || _a === void 0 ? void 0 : _a.currentTime) || 0;
|
|
133
|
+
this.coTimeUpdate.emit({ currentTime: this.currentTime, duration: this.knownDuration });
|
|
134
|
+
};
|
|
122
135
|
this.onEnded = () => { this.isPlaying = false; this.currentTime = 0; this.coEnded.emit(); };
|
|
123
136
|
this.onErr = (e) => { this.isLoading = false; this.hasError = true; this.coError.emit(e); };
|
|
124
137
|
this.toggle = () => {
|
|
@@ -275,12 +288,26 @@ const CoAudioPlayer = class {
|
|
|
275
288
|
this.isPlaying = false;
|
|
276
289
|
}
|
|
277
290
|
async extractPeaks(url, token) {
|
|
291
|
+
var _a;
|
|
278
292
|
let ctx;
|
|
279
293
|
try {
|
|
294
|
+
/**
|
|
295
|
+
* `OfflineAudioContext` FIRST, and a live `AudioContext` only as the
|
|
296
|
+
* fallback: decoding a waveform needs no audio OUTPUT, and a live context
|
|
297
|
+
* created before the user has interacted trips the browser's autoplay
|
|
298
|
+
* policy — "The AudioContext was not allowed to start. It must be resumed
|
|
299
|
+
* (or created) after a user gesture on the page", once per player. A page
|
|
300
|
+
* with 15 recordings logged it 15 times. The offline one has no output
|
|
301
|
+
* device, so the policy does not apply to it.
|
|
302
|
+
*
|
|
303
|
+
* Its arguments are placeholders: nothing is ever rendered through this
|
|
304
|
+
* context, it is only the host for `decodeAudioData`.
|
|
305
|
+
*/
|
|
306
|
+
const OfflineCtx = window.OfflineAudioContext || window.webkitOfflineAudioContext;
|
|
280
307
|
const Ctx = window.AudioContext || window.webkitAudioContext;
|
|
281
|
-
if (!Ctx || typeof fetch === 'undefined')
|
|
308
|
+
if ((!OfflineCtx && !Ctx) || typeof fetch === 'undefined')
|
|
282
309
|
return; // keep fallback
|
|
283
|
-
ctx = new Ctx();
|
|
310
|
+
ctx = OfflineCtx ? new OfflineCtx(1, 1, 44100) : new Ctx();
|
|
284
311
|
const buf = await (await fetch(url)).arrayBuffer();
|
|
285
312
|
const audioBuf = await ctx.decodeAudioData(buf);
|
|
286
313
|
if (token !== this.loadToken)
|
|
@@ -289,7 +316,7 @@ const CoAudioPlayer = class {
|
|
|
289
316
|
this.decodedDuration = audioBuf.duration;
|
|
290
317
|
this.peaks = resamplePeaks(this.rawChannelData, this.effectiveBars);
|
|
291
318
|
}
|
|
292
|
-
catch (
|
|
319
|
+
catch (_b) {
|
|
293
320
|
if (token !== this.loadToken)
|
|
294
321
|
return;
|
|
295
322
|
// Undecodable (codec WebAudio can't handle, CORS, network): keep the
|
|
@@ -302,11 +329,13 @@ const CoAudioPlayer = class {
|
|
|
302
329
|
finally {
|
|
303
330
|
// Always release the context. Chrome caps concurrent AudioContexts per
|
|
304
331
|
// document, so leaking one per failed decode would eventually stop every
|
|
305
|
-
// later player on the page from decoding at all.
|
|
332
|
+
// later player on the page from decoding at all. `close()` lives on
|
|
333
|
+
// AudioContext, not on every BaseAudioContext (an OfflineAudioContext
|
|
334
|
+
// needs no closing and may not implement it): optional call, not a cast.
|
|
306
335
|
try {
|
|
307
|
-
await (ctx === null || ctx === void 0 ? void 0 : ctx.close());
|
|
336
|
+
await ((_a = ctx === null || ctx === void 0 ? void 0 : ctx.close) === null || _a === void 0 ? void 0 : _a.call(ctx));
|
|
308
337
|
}
|
|
309
|
-
catch ( /* already closed */
|
|
338
|
+
catch ( /* already closed */_c) { /* already closed */ }
|
|
310
339
|
}
|
|
311
340
|
if (token === this.loadToken)
|
|
312
341
|
this.syncDuration();
|
|
@@ -321,6 +350,47 @@ const CoAudioPlayer = class {
|
|
|
321
350
|
if (!Object.is(next, this.duration))
|
|
322
351
|
this.duration = next;
|
|
323
352
|
}
|
|
353
|
+
applyPendingSeek() {
|
|
354
|
+
if (this.pendingSeek == null || !this.audio)
|
|
355
|
+
return;
|
|
356
|
+
const target = this.pendingSeek;
|
|
357
|
+
this.pendingSeek = null;
|
|
358
|
+
this.audio.currentTime = target;
|
|
359
|
+
this.currentTime = this.audio.currentTime;
|
|
360
|
+
this.coTimeUpdate.emit({ currentTime: this.currentTime, duration: this.knownDuration });
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* Move the playhead. Clamped to `[0, duration]`: `audio.currentTime` takes a
|
|
364
|
+
* restricted double and THROWS on a non-finite value, and a duration that is
|
|
365
|
+
* not known yet reads as 0 (see `knownDuration`).
|
|
366
|
+
*/
|
|
367
|
+
async seek(seconds) {
|
|
368
|
+
var _a;
|
|
369
|
+
if (!this.audio || !Number.isFinite(seconds))
|
|
370
|
+
return;
|
|
371
|
+
const total = this.knownDuration;
|
|
372
|
+
const target = total ? Math.max(0, Math.min(total, seconds)) : Math.max(0, seconds);
|
|
373
|
+
this.audio.currentTime = target;
|
|
374
|
+
// The element could not take it yet (no data): keep it for `loadedmetadata`.
|
|
375
|
+
// The readback is the only way to tell — the write throws nothing.
|
|
376
|
+
if (Math.abs(((_a = this.audio.currentTime) !== null && _a !== void 0 ? _a : 0) - target) > 0.05)
|
|
377
|
+
this.pendingSeek = target;
|
|
378
|
+
// Optimistic either way: the UI shows where playback is GOING, and the
|
|
379
|
+
// pending write lands on its own.
|
|
380
|
+
this.currentTime = target;
|
|
381
|
+
this.coTimeUpdate.emit({ currentTime: this.currentTime, duration: total });
|
|
382
|
+
}
|
|
383
|
+
/** Start playback if it is not already running (no-op on a failed load). */
|
|
384
|
+
async play() {
|
|
385
|
+
if (!this.audio || this.isPlaying || this.hasError)
|
|
386
|
+
return;
|
|
387
|
+
try {
|
|
388
|
+
await this.audio.play();
|
|
389
|
+
this.isPlaying = true;
|
|
390
|
+
this.coPlay.emit();
|
|
391
|
+
}
|
|
392
|
+
catch ( /* autoplay blocked or source not ready: the button still works */_a) { /* autoplay blocked or source not ready: the button still works */ }
|
|
393
|
+
}
|
|
324
394
|
async download() {
|
|
325
395
|
if (!this.src || typeof fetch === 'undefined')
|
|
326
396
|
return;
|
|
@@ -347,13 +417,13 @@ const CoAudioPlayer = class {
|
|
|
347
417
|
// below `aria-valuenow` the moment playback advances. ARIA 1.2 makes valuemax
|
|
348
418
|
// optional for `slider`, so leaving it off while unknown is well-formed.
|
|
349
419
|
const ariaMax = total ? Math.floor(total) : undefined;
|
|
350
|
-
const bar = (hFrac, i, played = false) => (h("rect", { key: '
|
|
351
|
-
return (h("div", { key: '
|
|
420
|
+
const bar = (hFrac, i, played = false) => (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 } }));
|
|
421
|
+
return (h("div", { key: '34078ed0540dc72c87644c3ae830b3a2ff43a99e', class: {
|
|
352
422
|
'co-audio-player': true,
|
|
353
423
|
'co-audio-player--compact': this.compact,
|
|
354
424
|
'co-audio-player--error': this.hasError,
|
|
355
425
|
'co-audio-player--playing': this.isPlaying,
|
|
356
|
-
}, part: "player" }, h("button", { key: '
|
|
426
|
+
}, part: "player" }, 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 }, h("co-icon", { key: 'fdc0a0a0703189efe10bbc1b1182572d1120a347', name: this.hasError ? 'warning-circle' : this.isPlaying ? 'pause' : 'play', weight: "fill", size: this.compact ? 12 : 14 })), 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 }, 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)), h("clipPath", { key: 'c4136dddad555e8b5ef09a81c38433cd2bf39d7c', id: "co-ap-clip" }, h("rect", { key: 'edb79083fbc7d225bd5668443fb6541fe77c8f9d', x: "0", y: "0", width: (pct / 100) * vbW, height: H })), h("g", { key: 'c91b8b285f53b9dc4f6110f9cb73b7f3f892fad6', "clip-path": "url(#co-ap-clip)" }, this.peaks.map((hFrac, i) => bar(hFrac, i, true))))), h("span", { key: '26af75ef91f36d432add06bb636c4d3194902b0a', class: "co-audio-player__time", part: "time" }, formatTime(this.currentTime), " / ", formatTime(this.duration)), !this.compact && (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 && (h("button", { key: '327336de6ad09adac5f8cba6e048b58bbef0008e', type: "button", class: "co-audio-player__dl", part: "download", "aria-label": "Descargar", onClick: () => this.download() }, h("co-icon", { key: '787738fea40ab74531c943f876e20acf6ceb54df', name: "download-simple", size: 14 })))));
|
|
357
427
|
}
|
|
358
428
|
static get watchers() { return {
|
|
359
429
|
"src": [{
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index-DH5lfRNj.js';
|
|
2
|
+
import { i as isLightColor } from './color-BRbgGqLw.js';
|
|
3
|
+
|
|
4
|
+
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}`;
|
|
5
|
+
|
|
6
|
+
const SIZE_MAP = {
|
|
7
|
+
xl: 80, lg: 64, md: 56, sm: 48, xs: 32, xxs: 24,
|
|
8
|
+
};
|
|
9
|
+
const ICON_SIZE_MAP = {
|
|
10
|
+
xl: 32, lg: 28, md: 24, sm: 20, xs: 16, xxs: 12,
|
|
11
|
+
};
|
|
12
|
+
const FONT_SIZE_MAP = {
|
|
13
|
+
xl: 'var(--co-font-size-26)',
|
|
14
|
+
lg: 'var(--co-font-size-22)',
|
|
15
|
+
md: 'var(--co-font-size-18)',
|
|
16
|
+
sm: 'var(--co-font-size-16)',
|
|
17
|
+
xs: 'var(--co-font-size-12)',
|
|
18
|
+
xxs: 'var(--co-font-size-10)',
|
|
19
|
+
};
|
|
20
|
+
const CoAvatar = class {
|
|
21
|
+
constructor(hostRef) {
|
|
22
|
+
registerInstance(this, hostRef);
|
|
23
|
+
/** Display type: text shows initials, icon shows a Phosphor icon, image shows a picture */
|
|
24
|
+
this.type = 'text';
|
|
25
|
+
/** Size of the avatar */
|
|
26
|
+
this.size = 'md';
|
|
27
|
+
/** Phosphor icon name (type="icon"), defaults to "user" */
|
|
28
|
+
this.icon = 'user';
|
|
29
|
+
/** Icon weight */
|
|
30
|
+
this.iconWeight = 'regular';
|
|
31
|
+
/** Shape of the avatar */
|
|
32
|
+
this.shape = 'circle';
|
|
33
|
+
this.imgFailed = false;
|
|
34
|
+
this.handleImgError = () => {
|
|
35
|
+
this.imgFailed = true;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
render() {
|
|
39
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
40
|
+
const dim = (_a = SIZE_MAP[this.size]) !== null && _a !== void 0 ? _a : 56;
|
|
41
|
+
const iconSize = (_b = ICON_SIZE_MAP[this.size]) !== null && _b !== void 0 ? _b : 24;
|
|
42
|
+
const fontSize = (_c = FONT_SIZE_MAP[this.size]) !== null && _c !== void 0 ? _c : 'var(--co-font-size-18)';
|
|
43
|
+
const showImage = this.type === 'image' && this.src && !this.imgFailed;
|
|
44
|
+
// Broken/missing image without initials falls back to the ICON (default
|
|
45
|
+
// "user") — never an empty disc. With `text` present, initials win (they
|
|
46
|
+
// identify the record better than a generic glyph).
|
|
47
|
+
const showIcon = this.type === 'icon' || (this.type === 'image' && !showImage && !this.text);
|
|
48
|
+
const ariaLabel = this.type === 'text'
|
|
49
|
+
? this.text
|
|
50
|
+
: this.type === 'image'
|
|
51
|
+
? (_e = (_d = this.alt) !== null && _d !== void 0 ? _d : this.text) !== null && _e !== void 0 ? _e : this.icon
|
|
52
|
+
: this.icon;
|
|
53
|
+
const disc = (h("div", { class: {
|
|
54
|
+
'co-avatar': true,
|
|
55
|
+
[`co-avatar--${this.size}`]: true,
|
|
56
|
+
[`co-avatar--${this.type}`]: true,
|
|
57
|
+
'co-avatar--square': this.shape === 'square',
|
|
58
|
+
'co-avatar--light': !!this.color && isLightColor(this.color),
|
|
59
|
+
}, 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
|
|
60
|
+
? { '--co-avatar-border-color': this.ringColor, '--co-avatar-border-width': '2px' }
|
|
61
|
+
: {})), part: "avatar", role: "img", "aria-label": ariaLabel }, showImage ? (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 ? (h("co-icon", { name: this.icon, weight: this.iconWeight, size: iconSize })) : (h("span", { class: "co-avatar__text" }, this.text))));
|
|
62
|
+
// No tooltip when `name` is unset/empty — renders exactly as before, no wrapper.
|
|
63
|
+
if (!this.name)
|
|
64
|
+
return disc;
|
|
65
|
+
return h("co-tooltip", { content: this.name }, disc);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
CoAvatar.style = coAvatarCss();
|
|
69
|
+
|
|
70
|
+
export { CoAvatar as co_avatar };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h, a as getElement } from './index-DH5lfRNj.js';
|
|
2
2
|
|
|
3
|
-
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}}`;
|
|
3
|
+
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}}`;
|
|
4
4
|
|
|
5
5
|
const ICON_SIZE = { l: 20, m: 18, s: 16, xs: 14 };
|
|
6
6
|
const CoButton = class {
|
|
@@ -5,7 +5,7 @@ import { R as RequiredMark } from './requiredMark-BCJUuZvC.js';
|
|
|
5
5
|
import { a as afterEventFor } from './overlayAfterClose-Ch1jfwZ2.js';
|
|
6
6
|
import { s as slotHasContent } from './slotContent-CBX_oabB.js';
|
|
7
7
|
|
|
8
|
-
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}`;
|
|
8
|
+
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}`;
|
|
9
9
|
|
|
10
10
|
const CoCalendar = class {
|
|
11
11
|
constructor(hostRef) {
|
|
@@ -301,7 +301,11 @@ const CoCalendar = class {
|
|
|
301
301
|
const monthLabel = getMonthLabel(this.viewYear, this.viewMonth, this.locale, 'long');
|
|
302
302
|
const shortLabels = getWeekdayLabels(this.locale, this.firstDayOfWeek, 'short');
|
|
303
303
|
const longLabels = getWeekdayLabels(this.locale, this.firstDayOfWeek, 'long');
|
|
304
|
-
|
|
304
|
+
// Solo las semanas que tocan el mes: la matriz trae siempre 6, y un mes de
|
|
305
|
+
// 5 semanas cerraba con una fila ENTERA del mes siguiente en gris, que se
|
|
306
|
+
// leía como una franja en blanco al pie del panel (reporte 2026-09-16). El
|
|
307
|
+
// teclado no la necesita: moveFocus ya cambia de mes al salir de él.
|
|
308
|
+
const matrix = getMonthMatrix(this.viewYear, this.viewMonth, this.firstDayOfWeek).filter((week) => week.some((cell) => cell.inMonth));
|
|
305
309
|
return (h("div", { class: "co-calendar__grid", part: "grid", role: "grid", "aria-label": monthLabel, onKeyDown: this.handleGridKeyDown }, h("div", { class: "co-calendar__row co-calendar__row--dow", role: "row" }, shortLabels.map((lbl, i) => (h("span", { class: "co-calendar__dow", role: "columnheader", "aria-label": longLabels[i] }, lbl)))), matrix.map((week) => (h("div", { class: "co-calendar__row", role: "row" }, week.map((cell) => {
|
|
306
310
|
const disabled = this.isDayDisabled(cell.value);
|
|
307
311
|
const isFocused = compareYMD(cell.value, this.focused) === 0;
|
|
@@ -357,7 +361,7 @@ const CoCalendar = class {
|
|
|
357
361
|
render() {
|
|
358
362
|
var _a, _b;
|
|
359
363
|
const t = getDateStrings(this.locale);
|
|
360
|
-
return (h("div", { key: '
|
|
364
|
+
return (h("div", { key: '3b9f57fa8513746cb3133d80d574a0fafbc8b31e', class: "co-calendar", part: "root" }, h("div", { key: '6b3b0f8d1c582abbbf04c8b936486bd1e3fedaec', class: "co-calendar__header", part: "header" }, 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 }, h("co-icon", { key: '772ec0dfb48dfee33d506549e68ab7598ec0cf00', name: "caret-left", size: 16 })), h("button", { key: 'b9f3851082fbbe2d5f696dd0a51c442410b15fa1', type: "button", class: "co-calendar__title", "aria-live": "polite", onClick: this.toggleView }, this.headerTitle(), h("co-icon", { key: '3f660d39a851c97f299e6a6cc8c0ad8b5ed4ee7f', name: "caret-down", size: 12, class: "co-calendar__title-caret" })), 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 }, 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()));
|
|
361
365
|
}
|
|
362
366
|
get el() { return getElement(this); }
|
|
363
367
|
static get watchers() { return {
|