@prolibu-suite/cobalt-core 0.7.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +8275 -5147
- package/dist/cjs/co-accordion.cjs.entry.js +4 -4
- package/dist/cjs/co-action-bar.cjs.entry.js +89 -0
- package/dist/cjs/co-app-shell.cjs.entry.js +4 -4
- package/dist/cjs/co-audio-player.cjs.entry.js +279 -0
- package/dist/cjs/co-autocomplete.cjs.entry.js +15 -6
- package/dist/cjs/co-avatar-group.cjs.entry.js +2 -2
- package/dist/cjs/co-avatar_2.cjs.entry.js +17 -6
- package/dist/cjs/co-badge.cjs.entry.js +2 -2
- package/dist/cjs/co-bottom-sheet.cjs.entry.js +5 -5
- package/dist/cjs/co-breadcrumb-item.cjs.entry.js +3 -3
- package/dist/cjs/co-breadcrumb.cjs.entry.js +2 -2
- package/dist/cjs/co-button-group.cjs.entry.js +3 -3
- package/dist/cjs/co-button.cjs.entry.js +13 -6
- package/dist/cjs/co-calendar-month_2.cjs.entry.js +1601 -0
- package/dist/cjs/co-calendar_3.cjs.entry.js +13 -13
- package/dist/cjs/co-card.cjs.entry.js +4 -4
- package/dist/cjs/co-carousel-item.cjs.entry.js +2 -2
- package/dist/cjs/co-carousel.cjs.entry.js +4 -4
- package/dist/cjs/co-checkbox-group.cjs.entry.js +2 -2
- package/dist/cjs/co-checkbox.cjs.entry.js +5 -5
- package/dist/cjs/co-chip_2.cjs.entry.js +109 -8
- package/dist/cjs/co-color-picker.cjs.entry.js +5 -5
- package/dist/cjs/co-column-picker.cjs.entry.js +4 -4
- package/dist/cjs/co-combobox.cjs.entry.js +14 -6
- package/dist/cjs/co-command-search.cjs.entry.js +20 -6
- package/dist/cjs/co-data-table-pagination.cjs.entry.js +6 -6
- package/dist/cjs/co-data-table.cjs.entry.js +2 -2
- package/dist/cjs/co-date-picker.cjs.entry.js +3 -3
- package/dist/cjs/co-date-range-picker.cjs.entry.js +5 -5
- package/dist/cjs/co-date-range.cjs.entry.js +2 -2
- package/dist/cjs/co-date-time-picker.cjs.entry.js +409 -0
- package/dist/cjs/co-drive-card.cjs.entry.js +3 -3
- package/dist/cjs/co-drop-zone.cjs.entry.js +2 -2
- package/dist/cjs/co-empty-state.cjs.entry.js +3 -3
- package/dist/cjs/co-event-calendar.cjs.entry.js +119 -18
- package/dist/cjs/co-event-popover.cjs.entry.js +132 -0
- package/dist/cjs/co-fab.cjs.entry.js +4 -4
- package/dist/cjs/co-file-field.cjs.entry.js +8 -8
- package/dist/cjs/co-file-type-tile.cjs.entry.js +3 -3
- package/dist/cjs/co-helper-text.cjs.entry.js +3 -3
- package/dist/cjs/co-icon-button.cjs.entry.js +3 -3
- package/dist/cjs/co-icon.cjs.entry.js +3 -3
- package/dist/cjs/co-input.cjs.entry.js +3 -3
- package/dist/cjs/co-json-field.cjs.entry.js +6 -6
- package/dist/cjs/co-lightbox.cjs.entry.js +7 -7
- package/dist/cjs/co-list-footer.cjs.entry.js +3 -3
- package/dist/cjs/co-list-item.cjs.entry.js +6 -6
- package/dist/cjs/co-loader.cjs.entry.js +1 -1
- package/dist/cjs/co-media-thumb.cjs.entry.js +3 -3
- package/dist/cjs/co-menu-divider.cjs.entry.js +2 -2
- package/dist/cjs/co-menu-item.cjs.entry.js +3 -3
- package/dist/cjs/co-menu.cjs.entry.js +2 -2
- package/dist/cjs/co-modal.cjs.entry.js +4 -4
- package/dist/cjs/co-navbar.cjs.entry.js +3 -3
- package/dist/cjs/co-number-field.cjs.entry.js +5 -5
- package/dist/cjs/co-overlay.cjs.entry.js +3 -3
- package/dist/cjs/co-page-header.cjs.entry.js +2 -2
- package/dist/cjs/co-phone-field.cjs.entry.js +4 -4
- package/dist/cjs/co-popover.cjs.entry.js +33 -7
- package/dist/cjs/co-progress-bar.cjs.entry.js +3 -3
- package/dist/cjs/co-progress-circle.cjs.entry.js +4 -4
- package/dist/cjs/co-provider-logo_2.cjs.entry.js +72 -0
- package/dist/cjs/co-radio-group.cjs.entry.js +2 -2
- package/dist/cjs/co-radio.cjs.entry.js +5 -5
- package/dist/cjs/co-rating.cjs.entry.js +5 -5
- package/dist/cjs/co-ref-field.cjs.entry.js +22 -6
- package/dist/cjs/co-rich-text-editor.cjs.entry.js +5 -5
- package/dist/cjs/co-rich-text-toolbar.cjs.entry.js +2 -2
- package/dist/cjs/co-rich-text-viewer.cjs.entry.js +1 -1
- package/dist/cjs/co-row.cjs.entry.js +3 -3
- package/dist/cjs/co-segmented-bar.cjs.entry.js +1 -1
- package/dist/cjs/co-select.cjs.entry.js +4 -4
- package/dist/cjs/co-separator.cjs.entry.js +2 -2
- package/dist/cjs/co-sidebar-nav.cjs.entry.js +14 -4
- package/dist/cjs/co-sidebar.cjs.entry.js +4 -4
- package/dist/cjs/co-slider.cjs.entry.js +4 -4
- package/dist/cjs/co-switch.cjs.entry.js +6 -6
- package/dist/cjs/co-tab-group.cjs.entry.js +20 -4
- package/dist/cjs/co-tab.cjs.entry.js +4 -4
- package/dist/cjs/co-tags-field.cjs.entry.js +9 -9
- package/dist/cjs/co-textarea.cjs.entry.js +7 -7
- package/dist/cjs/co-toast.cjs.entry.js +35 -5
- package/dist/cjs/co-toggle-button-group.cjs.entry.js +3 -3
- package/dist/cjs/co-toggle-button.cjs.entry.js +4 -4
- package/dist/cjs/co-transfer-list.cjs.entry.js +4 -4
- package/dist/cjs/co-video.cjs.entry.js +4 -4
- package/dist/cjs/cobalt.cjs.js +2 -2
- package/dist/cjs/{dateI18n-BdiNAl0_.js → dateI18n-wblvKRq_.js} +21 -0
- package/dist/cjs/{dates-D8D-aS5d.js → dates-TQLHlFd2.js} +64 -13
- package/dist/cjs/{fieldChip-B_npd9rL.js → fieldChip-xNJPEFcS.js} +1 -1
- package/dist/cjs/{index-kBiXCEE7.js → index-DK-2Lzmf.js} +29 -13
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{positioning-DwHW399W.js → positioning-DCj_AJ2T.js} +10 -0
- package/dist/cjs/{requiredMark-DuMIcKtt.js → requiredMark-C1xcrzSZ.js} +1 -1
- package/dist/cjs/time-LBHtzLHe.js +42 -0
- package/dist/cobalt/cobalt.css +1 -1
- package/dist/cobalt/cobalt.esm.js +1 -1
- package/dist/cobalt/p-09fe6ece.entry.js +1 -0
- package/dist/cobalt/p-12a0ae24.entry.js +1 -0
- package/dist/cobalt/p-142506d9.entry.js +1 -0
- package/dist/cobalt/{p-e4555fda.entry.js → p-19706923.entry.js} +1 -1
- package/dist/cobalt/p-19f5d480.entry.js +1 -0
- package/dist/cobalt/{p-B6JZk8fL.js → p-1EK-COrb.js} +1 -1
- package/dist/cobalt/p-1ddbc48b.entry.js +1 -0
- package/dist/cobalt/p-212ed2ba.entry.js +1 -0
- package/dist/cobalt/p-21832273.entry.js +1 -0
- package/dist/cobalt/p-24e93fcb.entry.js +1 -0
- package/dist/cobalt/{p-9211e794.entry.js → p-2a9ba4c8.entry.js} +1 -1
- package/dist/cobalt/p-2aeb1471.entry.js +1 -0
- package/dist/cobalt/p-2d0354cc.entry.js +1 -0
- package/dist/cobalt/p-30ec230e.entry.js +1 -0
- package/dist/cobalt/p-360714ae.entry.js +1 -0
- package/dist/cobalt/{p-3c681e3a.entry.js → p-37541725.entry.js} +1 -1
- package/dist/cobalt/p-39007b6c.entry.js +1 -0
- package/dist/cobalt/{p-2f6c7eb5.entry.js → p-39bce45f.entry.js} +1 -1
- package/dist/cobalt/{p-7f78e45c.entry.js → p-3ac316e0.entry.js} +1 -1
- package/dist/cobalt/{p-69723cc1.entry.js → p-3ced4269.entry.js} +1 -1
- package/dist/cobalt/{p-9994fcd8.entry.js → p-3ecc29fa.entry.js} +1 -1
- package/dist/cobalt/p-417ce874.entry.js +1 -0
- package/dist/cobalt/{p-28ab9cef.entry.js → p-43b1f8fb.entry.js} +1 -1
- package/dist/cobalt/p-49bde154.entry.js +1 -0
- package/dist/cobalt/{p-54f8c68c.entry.js → p-4e2379e4.entry.js} +1 -1
- package/dist/cobalt/p-5d7c26f2.entry.js +1 -0
- package/dist/cobalt/p-5ddebd10.entry.js +1 -0
- package/dist/cobalt/{p-bcd38114.entry.js → p-5f0f5d4b.entry.js} +1 -1
- package/dist/cobalt/{p-2661557c.entry.js → p-5f1b273b.entry.js} +1 -1
- package/dist/cobalt/p-60cb66f5.entry.js +1 -0
- package/dist/cobalt/{p-48fbf051.entry.js → p-6795a258.entry.js} +1 -1
- package/dist/cobalt/{p-5b84cf37.entry.js → p-6d532475.entry.js} +1 -1
- package/dist/cobalt/{p-0110108f.entry.js → p-724b9b54.entry.js} +1 -1
- package/dist/cobalt/{p-ceb85838.entry.js → p-7255ab63.entry.js} +1 -1
- package/dist/cobalt/p-7521ec0c.entry.js +1 -0
- package/dist/cobalt/{p-69ce2269.entry.js → p-76dff399.entry.js} +1 -1
- package/dist/cobalt/p-77593319.entry.js +1 -0
- package/dist/cobalt/p-7a2dab23.entry.js +1 -0
- package/dist/cobalt/p-7ec85887.entry.js +1 -0
- package/dist/cobalt/p-81866f71.entry.js +1 -0
- package/dist/cobalt/{p-c3004e1c.entry.js → p-8206c7c0.entry.js} +1 -1
- package/dist/cobalt/p-85a61e28.entry.js +1 -0
- package/dist/cobalt/p-87fc5aed.entry.js +1 -0
- package/dist/cobalt/p-8a93beb0.entry.js +1 -0
- package/dist/cobalt/p-8b7a4f6c.entry.js +1 -0
- package/dist/cobalt/{p-741cf623.entry.js → p-8e667eb6.entry.js} +1 -1
- package/dist/cobalt/{p-3b9be8a8.entry.js → p-94a8a119.entry.js} +1 -1
- package/dist/cobalt/p-9c2ce487.entry.js +1 -0
- package/dist/cobalt/p-9fe9e2fe.entry.js +1 -0
- package/dist/cobalt/p-BMdapAL8.js +1 -0
- package/dist/cobalt/p-BU7SQCje.js +1 -0
- package/dist/cobalt/p-CF8OB_TM.js +1 -0
- package/dist/cobalt/p-CQAYgqA6.js +1 -0
- package/dist/cobalt/p-CnNpoKwg.js +1 -0
- package/dist/cobalt/p-CrtiywTB.js +2 -0
- package/dist/cobalt/p-T4la7ly_.js +1 -0
- package/dist/cobalt/{p-2da09948.entry.js → p-a074f2ba.entry.js} +1 -1
- package/dist/cobalt/{p-0a294205.entry.js → p-a45e2c00.entry.js} +1 -1
- package/dist/cobalt/p-a530bec2.entry.js +1 -0
- package/dist/cobalt/p-a5d84c7a.entry.js +1 -0
- package/dist/cobalt/p-b004c3bb.entry.js +1 -0
- package/dist/cobalt/p-b1ef5107.entry.js +1 -0
- package/dist/cobalt/p-b28dc0fe.entry.js +1 -0
- package/dist/cobalt/{p-cdedaa82.entry.js → p-b64b0a07.entry.js} +1 -1
- package/dist/cobalt/p-b800e107.entry.js +1 -0
- package/dist/cobalt/p-b9ac1f25.entry.js +1 -0
- package/dist/cobalt/{p-202eadfc.entry.js → p-baeb5d55.entry.js} +1 -1
- package/dist/cobalt/{p-7178113f.entry.js → p-c31f5c1b.entry.js} +1 -1
- package/dist/cobalt/p-c3c2087e.entry.js +1 -0
- package/dist/cobalt/p-c42c505c.entry.js +1 -0
- package/dist/cobalt/p-c7a809c7.entry.js +1 -0
- package/dist/cobalt/{p-eec1c44c.entry.js → p-c8dba82f.entry.js} +1 -1
- package/dist/cobalt/p-cc72557d.entry.js +1 -0
- package/dist/cobalt/p-d21da71a.entry.js +1 -0
- package/dist/cobalt/{p-e1b468c1.entry.js → p-d3c765e3.entry.js} +1 -1
- package/dist/cobalt/p-d7b00e5f.entry.js +1 -0
- package/dist/cobalt/p-d85a751d.entry.js +1 -0
- package/dist/cobalt/{p-3af74ab8.entry.js → p-da546d08.entry.js} +1 -1
- package/dist/cobalt/p-debe0d79.entry.js +1 -0
- package/dist/cobalt/p-e054cb52.entry.js +1 -0
- package/dist/cobalt/p-e5296961.entry.js +1 -0
- package/dist/cobalt/p-e5b5ae89.entry.js +1 -0
- package/dist/cobalt/p-e612b43c.entry.js +1 -0
- package/dist/cobalt/{p-97875bde.entry.js → p-e6882ddd.entry.js} +1 -1
- package/dist/cobalt/p-e7e34852.entry.js +1 -0
- package/dist/cobalt/p-e99832a9.entry.js +1 -0
- package/dist/cobalt/{p-616e4286.entry.js → p-ed2ca588.entry.js} +1 -1
- package/dist/cobalt/p-f1284fcd.entry.js +1 -0
- package/dist/cobalt/{p-6b38e8fb.entry.js → p-f1731fe9.entry.js} +1 -1
- package/dist/cobalt/{p-ba5c6aa7.entry.js → p-f4cebc1f.entry.js} +1 -1
- package/dist/cobalt/p-f52f61d4.entry.js +1 -0
- package/dist/cobalt/{p-a252f8c5.entry.js → p-f83b48fd.entry.js} +1 -1
- package/dist/cobalt/p-fa5c25d6.entry.js +1 -0
- package/dist/cobalt/p-fd39f410.entry.js +1 -0
- package/dist/collection/collection-manifest.json +6 -0
- package/dist/collection/components/co-accordion/co-accordion.css +12 -4
- package/dist/collection/components/co-accordion/co-accordion.js +2 -2
- package/dist/collection/components/co-action-bar/co-action-bar.css +136 -0
- package/dist/collection/components/co-action-bar/co-action-bar.js +247 -0
- package/dist/collection/components/co-app-shell/co-app-shell.css +1 -1
- package/dist/collection/components/co-app-shell/co-app-shell.js +2 -2
- package/dist/collection/components/co-audio-player/co-audio-player.css +57 -0
- package/dist/collection/components/co-audio-player/co-audio-player.js +453 -0
- package/dist/collection/components/co-audio-player/co-audio-player.utils.js +44 -0
- package/dist/collection/components/co-autocomplete/co-autocomplete.css +2 -2
- package/dist/collection/components/co-autocomplete/co-autocomplete.js +14 -5
- package/dist/collection/components/co-avatar-group/co-avatar-group.css +1 -1
- package/dist/collection/components/co-badge/co-badge.js +1 -1
- package/dist/collection/components/co-bottom-sheet/co-bottom-sheet.css +4 -12
- package/dist/collection/components/co-bottom-sheet/co-bottom-sheet.js +3 -3
- package/dist/collection/components/co-breadcrumb/co-breadcrumb.js +1 -1
- package/dist/collection/components/co-breadcrumb-item/co-breadcrumb-item.js +2 -2
- package/dist/collection/components/co-button/co-button.css +36 -1
- package/dist/collection/components/co-button/co-button.js +31 -5
- package/dist/collection/components/co-button-group/co-button-group.js +2 -2
- package/dist/collection/components/co-calendar/co-calendar.css +2 -2
- package/dist/collection/components/co-calendar/co-calendar.js +1 -1
- package/dist/collection/components/co-calendar-month/co-calendar-month.css +53 -4
- package/dist/collection/components/co-calendar-month/co-calendar-month.js +238 -55
- package/dist/collection/components/co-calendar-timegrid/co-calendar-timegrid.css +265 -0
- package/dist/collection/components/co-calendar-timegrid/co-calendar-timegrid.js +1305 -0
- package/dist/collection/components/co-card/co-card.css +1 -1
- package/dist/collection/components/co-card/co-card.js +2 -2
- package/dist/collection/components/co-carousel/co-carousel.js +2 -2
- package/dist/collection/components/co-carousel-item/co-carousel-item.js +1 -1
- package/dist/collection/components/co-checkbox/co-checkbox.css +85 -59
- package/dist/collection/components/co-checkbox/co-checkbox.js +3 -3
- package/dist/collection/components/co-checkbox-group/co-checkbox-group.css +1 -1
- package/dist/collection/components/co-chip/co-chip.css +2 -2
- package/dist/collection/components/co-chip/co-chip.js +2 -2
- package/dist/collection/components/co-color-picker/co-color-picker.css +3 -3
- package/dist/collection/components/co-color-picker/co-color-picker.js +2 -2
- package/dist/collection/components/co-column-picker/co-column-picker.css +8 -8
- package/dist/collection/components/co-column-picker/co-column-picker.js +2 -2
- package/dist/collection/components/co-combobox/co-combobox.css +2 -2
- package/dist/collection/components/co-combobox/co-combobox.js +13 -5
- package/dist/collection/components/co-command-search/co-command-search.css +13 -3
- package/dist/collection/components/co-command-search/co-command-search.js +18 -4
- package/dist/collection/components/co-data-table/co-data-table.css +9 -9
- package/dist/collection/components/co-data-table-pagination/co-data-table-pagination.css +5 -5
- package/dist/collection/components/co-data-table-pagination/co-data-table-pagination.js +4 -4
- package/dist/collection/components/co-date-field/co-date-field.css +2 -2
- package/dist/collection/components/co-date-field/co-date-field.js +4 -4
- package/dist/collection/components/co-date-range/co-date-range.js +1 -1
- package/dist/collection/components/co-date-range-picker/co-date-range-picker.css +2 -2
- package/dist/collection/components/co-date-time-picker/co-date-time-picker.css +325 -0
- package/dist/collection/components/co-date-time-picker/co-date-time-picker.js +1079 -0
- package/dist/collection/components/co-drawer/co-drawer.css +48 -2
- package/dist/collection/components/co-drawer/co-drawer.js +1 -1
- package/dist/collection/components/co-drive-card/co-drive-card.css +5 -5
- package/dist/collection/components/co-drive-card/co-drive-card.js +1 -1
- package/dist/collection/components/co-drop-zone/co-drop-zone.js +1 -1
- package/dist/collection/components/co-empty-state/co-empty-state.js +2 -2
- package/dist/collection/components/co-event-calendar/co-event-calendar.css +21 -9
- package/dist/collection/components/co-event-calendar/co-event-calendar.js +342 -39
- package/dist/collection/components/co-event-popover/co-event-popover.css +25 -0
- package/dist/collection/components/co-event-popover/co-event-popover.js +326 -0
- package/dist/collection/components/co-fab/co-fab.css +18 -12
- package/dist/collection/components/co-fab/co-fab.js +2 -2
- package/dist/collection/components/co-file-field/co-file-field.css +5 -5
- package/dist/collection/components/co-file-field/co-file-field.js +5 -5
- package/dist/collection/components/co-file-type-tile/co-file-type-tile.js +2 -2
- package/dist/collection/components/co-helper-text/co-helper-text.js +2 -2
- package/dist/collection/components/co-icon/co-icon.js +2 -2
- package/dist/collection/components/co-icon-button/co-icon-button.css +10 -1
- package/dist/collection/components/co-icon-button/co-icon-button.js +1 -1
- package/dist/collection/components/co-input/co-input.css +3 -3
- package/dist/collection/components/co-json-field/co-json-field.css +1 -1
- package/dist/collection/components/co-json-field/co-json-field.js +3 -3
- package/dist/collection/components/co-lightbox/co-lightbox.css +4 -4
- package/dist/collection/components/co-lightbox/co-lightbox.js +4 -4
- package/dist/collection/components/co-list-footer/co-list-footer.css +1 -1
- package/dist/collection/components/co-list-footer/co-list-footer.js +1 -1
- package/dist/collection/components/co-list-item/co-list-item.css +1 -1
- package/dist/collection/components/co-list-item/co-list-item.js +4 -4
- package/dist/collection/components/co-media-thumb/co-media-thumb.js +2 -2
- package/dist/collection/components/co-menu/co-menu.js +1 -1
- package/dist/collection/components/co-menu-divider/co-menu-divider.js +1 -1
- package/dist/collection/components/co-menu-item/co-menu-item.css +22 -1
- package/dist/collection/components/co-menu-item/co-menu-item.js +20 -1
- package/dist/collection/components/co-modal/co-modal.css +2 -2
- package/dist/collection/components/co-modal/co-modal.js +2 -2
- package/dist/collection/components/co-navbar/co-navbar.js +2 -2
- package/dist/collection/components/co-number-field/co-number-field.css +3 -3
- package/dist/collection/components/co-number-field/co-number-field.js +2 -2
- package/dist/collection/components/co-option-list/co-option-list.css +20 -2
- package/dist/collection/components/co-option-list/co-option-list.js +141 -7
- package/dist/collection/components/co-option-list/optionListLogic.js +13 -0
- package/dist/collection/components/co-overlay/co-overlay.css +2 -2
- 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.css +1 -1
- package/dist/collection/components/co-phone-field/co-phone-field.js +1 -1
- package/dist/collection/components/co-popover/co-popover.css +27 -0
- package/dist/collection/components/co-popover/co-popover.js +30 -4
- package/dist/collection/components/co-progress-bar/co-progress-bar.js +2 -2
- package/dist/collection/components/co-progress-circle/co-progress-circle.css +1 -1
- package/dist/collection/components/co-progress-circle/co-progress-circle.js +2 -2
- package/dist/collection/components/co-provider-logo/co-provider-logo.css +23 -0
- package/dist/collection/components/co-provider-logo/co-provider-logo.js +124 -0
- package/dist/collection/components/co-radio/co-radio.css +1 -1
- package/dist/collection/components/co-radio/co-radio.js +3 -3
- package/dist/collection/components/co-radio-group/co-radio-group.css +1 -1
- package/dist/collection/components/co-rating/co-rating.css +1 -1
- package/dist/collection/components/co-rating/co-rating.js +3 -3
- package/dist/collection/components/co-ref-field/co-ref-field.css +4 -4
- package/dist/collection/components/co-ref-field/co-ref-field.js +18 -2
- package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.css +16 -5
- package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.js +3 -3
- package/dist/collection/components/co-rich-text-toolbar/co-rich-text-toolbar.css +20 -12
- package/dist/collection/components/co-row/co-row.js +2 -2
- package/dist/collection/components/co-select/co-select.css +4 -4
- package/dist/collection/components/co-select/co-select.js +1 -1
- package/dist/collection/components/co-separator/co-separator.js +1 -1
- package/dist/collection/components/co-sidebar/co-sidebar.css +1 -1
- package/dist/collection/components/co-sidebar/co-sidebar.js +2 -2
- package/dist/collection/components/co-sidebar-nav/co-sidebar-nav.css +33 -7
- package/dist/collection/components/co-sidebar-nav/co-sidebar-nav.js +12 -2
- package/dist/collection/components/co-skeleton/co-skeleton.js +1 -1
- package/dist/collection/components/co-slider/co-slider.css +9 -2
- package/dist/collection/components/co-slider/co-slider.js +2 -2
- package/dist/collection/components/co-switch/co-switch.css +5 -4
- package/dist/collection/components/co-switch/co-switch.js +3 -3
- package/dist/collection/components/co-tab/co-tab.css +2 -2
- package/dist/collection/components/co-tab/co-tab.js +2 -2
- package/dist/collection/components/co-tab-group/co-tab-group.css +25 -0
- package/dist/collection/components/co-tab-group/co-tab-group.js +18 -2
- package/dist/collection/components/co-tags-field/co-tags-field.css +3 -3
- package/dist/collection/components/co-tags-field/co-tags-field.js +5 -5
- package/dist/collection/components/co-textarea/co-textarea.css +2 -2
- package/dist/collection/components/co-textarea/co-textarea.js +4 -4
- package/dist/collection/components/co-toast/co-toast.css +63 -1
- package/dist/collection/components/co-toast/co-toast.js +38 -3
- package/dist/collection/components/co-toggle-button/co-toggle-button.css +1 -1
- 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.js +2 -2
- package/dist/collection/components/co-tooltip/co-tooltip.css +1 -1
- package/dist/collection/components/co-tooltip/co-tooltip.js +14 -3
- package/dist/collection/components/co-transfer-list/co-transfer-list.css +3 -3
- package/dist/collection/components/co-transfer-list/co-transfer-list.js +2 -2
- package/dist/collection/components/co-video/co-video.css +9 -9
- package/dist/collection/components/co-video/co-video.js +2 -2
- package/dist/collection/utils/dateI18n.js +21 -0
- package/dist/collection/utils/eventColor.js +52 -0
- package/dist/collection/utils/positioning.js +10 -0
- package/dist/components/co-accordion.js +1 -1
- package/dist/components/co-action-bar.d.ts +11 -0
- package/dist/components/co-action-bar.js +1 -0
- package/dist/components/co-app-shell.js +1 -1
- package/dist/components/co-audio-player.d.ts +11 -0
- package/dist/components/co-audio-player.js +1 -0
- 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-badge.js +1 -1
- package/dist/components/co-bottom-sheet.js +1 -1
- package/dist/components/co-breadcrumb-item.js +1 -1
- package/dist/components/co-breadcrumb.js +1 -1
- package/dist/components/co-button-group.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.d.ts +11 -0
- package/dist/components/co-calendar-timegrid.js +1 -0
- package/dist/components/co-calendar.js +1 -1
- package/dist/components/co-card.js +1 -1
- package/dist/components/co-carousel-item.js +1 -1
- package/dist/components/co-carousel.js +1 -1
- package/dist/components/co-checkbox-group.js +1 -1
- package/dist/components/co-checkbox.js +1 -1
- package/dist/components/co-chip.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-pagination.js +1 -1
- package/dist/components/co-data-table.js +1 -1
- package/dist/components/co-date-field.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.d.ts +11 -0
- package/dist/components/co-date-time-picker.js +1 -0
- package/dist/components/co-drawer.js +1 -1
- package/dist/components/co-drive-card.js +1 -1
- package/dist/components/co-drop-zone.js +1 -1
- package/dist/components/co-empty-state.js +1 -1
- package/dist/components/co-event-calendar.js +1 -1
- package/dist/components/co-event-popover.d.ts +11 -0
- package/dist/components/co-event-popover.js +1 -0
- package/dist/components/co-fab.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-helper-text.js +1 -1
- package/dist/components/co-icon-button.js +1 -1
- package/dist/components/co-icon.js +1 -1
- package/dist/components/co-input.js +1 -1
- package/dist/components/co-json-field.js +1 -1
- package/dist/components/co-lightbox.js +1 -1
- package/dist/components/co-list-footer.js +1 -1
- package/dist/components/co-list-item.js +1 -1
- package/dist/components/co-media-thumb.js +1 -1
- package/dist/components/co-menu-divider.js +1 -1
- package/dist/components/co-menu-item.js +1 -1
- package/dist/components/co-menu.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-popover.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-provider-logo.d.ts +11 -0
- package/dist/components/co-provider-logo.js +1 -0
- package/dist/components/co-radio-group.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-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-toast.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-transfer-list.js +1 -1
- package/dist/components/co-video.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/p-2zy1K6zg.js +1 -0
- package/dist/components/{p-B3U63yZw.js → p-BCnjq3jN.js} +1 -1
- package/dist/components/p-BMdapAL8.js +1 -0
- package/dist/components/{p-T0UfY6rA.js → p-BUE9mBqk.js} +1 -1
- package/dist/components/p-Bh2__nEw.js +1 -0
- package/dist/components/{p-Cd3inFSL.js → p-BiefJDu3.js} +1 -1
- package/dist/components/{p-Bul6EdDX.js → p-BlvsTlsS.js} +1 -1
- package/dist/components/p-Bsll5Ofy.js +1 -0
- package/dist/components/p-C-5cLeKr.js +1 -0
- package/dist/components/p-CF8OB_TM.js +1 -0
- package/dist/components/p-CJNo2JDc.js +1 -0
- package/dist/components/p-CKKBJaNB.js +1 -0
- package/dist/components/p-CL4dicvk.js +1 -0
- package/dist/components/{p-DfpOEXHC.js → p-CYv2ig6I.js} +1 -1
- package/dist/components/p-Ce0ZJcks.js +1 -0
- package/dist/components/p-Ch837Ggl.js +1 -0
- package/dist/components/p-CkQqqKRp.js +1 -0
- package/dist/components/p-CmxZEGYq.js +1 -0
- package/dist/components/p-CnNpoKwg.js +1 -0
- package/dist/components/p-Cv5yuGLz.js +1 -0
- package/dist/components/{p-oV_1MoAN.js → p-DAaKsGqj.js} +1 -1
- package/dist/components/p-DFT1qsVu.js +1 -0
- package/dist/components/p-DTJsO_Eg.js +1 -0
- package/dist/components/p-Dxa7c4Ap.js +1 -0
- package/dist/components/p-_YYd42XM.js +1 -0
- package/dist/components/p-e5KibEs8.js +1 -0
- package/dist/components/p-re2gJwnQ.js +1 -0
- package/dist/components/p-ushHimOL.js +1 -0
- package/dist/components/p-xvWmYN3W.js +1 -0
- package/dist/esm/co-accordion.entry.js +4 -4
- package/dist/esm/co-action-bar.entry.js +87 -0
- package/dist/esm/co-app-shell.entry.js +4 -4
- package/dist/esm/co-audio-player.entry.js +277 -0
- package/dist/esm/co-autocomplete.entry.js +15 -6
- package/dist/esm/co-avatar-group.entry.js +2 -2
- package/dist/esm/co-avatar_2.entry.js +17 -6
- package/dist/esm/co-badge.entry.js +2 -2
- package/dist/esm/co-bottom-sheet.entry.js +5 -5
- package/dist/esm/co-breadcrumb-item.entry.js +3 -3
- package/dist/esm/co-breadcrumb.entry.js +2 -2
- package/dist/esm/co-button-group.entry.js +3 -3
- package/dist/esm/co-button.entry.js +13 -6
- package/dist/esm/co-calendar-month_2.entry.js +1598 -0
- package/dist/esm/co-calendar_3.entry.js +13 -13
- package/dist/esm/co-card.entry.js +4 -4
- package/dist/esm/co-carousel-item.entry.js +2 -2
- package/dist/esm/co-carousel.entry.js +4 -4
- package/dist/esm/co-checkbox-group.entry.js +2 -2
- package/dist/esm/co-checkbox.entry.js +5 -5
- package/dist/esm/co-chip_2.entry.js +109 -8
- package/dist/esm/co-color-picker.entry.js +5 -5
- package/dist/esm/co-column-picker.entry.js +4 -4
- package/dist/esm/co-combobox.entry.js +14 -6
- package/dist/esm/co-command-search.entry.js +20 -6
- package/dist/esm/co-data-table-pagination.entry.js +6 -6
- package/dist/esm/co-data-table.entry.js +2 -2
- package/dist/esm/co-date-picker.entry.js +3 -3
- package/dist/esm/co-date-range-picker.entry.js +5 -5
- package/dist/esm/co-date-range.entry.js +2 -2
- package/dist/esm/co-date-time-picker.entry.js +407 -0
- package/dist/esm/co-drive-card.entry.js +3 -3
- package/dist/esm/co-drop-zone.entry.js +2 -2
- package/dist/esm/co-empty-state.entry.js +3 -3
- package/dist/esm/co-event-calendar.entry.js +120 -19
- package/dist/esm/co-event-popover.entry.js +130 -0
- package/dist/esm/co-fab.entry.js +4 -4
- package/dist/esm/co-file-field.entry.js +8 -8
- package/dist/esm/co-file-type-tile.entry.js +3 -3
- package/dist/esm/co-helper-text.entry.js +3 -3
- package/dist/esm/co-icon-button.entry.js +3 -3
- package/dist/esm/co-icon.entry.js +3 -3
- package/dist/esm/co-input.entry.js +3 -3
- package/dist/esm/co-json-field.entry.js +6 -6
- package/dist/esm/co-lightbox.entry.js +7 -7
- package/dist/esm/co-list-footer.entry.js +3 -3
- package/dist/esm/co-list-item.entry.js +6 -6
- package/dist/esm/co-loader.entry.js +1 -1
- package/dist/esm/co-media-thumb.entry.js +3 -3
- package/dist/esm/co-menu-divider.entry.js +2 -2
- package/dist/esm/co-menu-item.entry.js +3 -3
- package/dist/esm/co-menu.entry.js +2 -2
- package/dist/esm/co-modal.entry.js +4 -4
- package/dist/esm/co-navbar.entry.js +3 -3
- package/dist/esm/co-number-field.entry.js +5 -5
- package/dist/esm/co-overlay.entry.js +3 -3
- package/dist/esm/co-page-header.entry.js +2 -2
- package/dist/esm/co-phone-field.entry.js +4 -4
- package/dist/esm/co-popover.entry.js +33 -7
- package/dist/esm/co-progress-bar.entry.js +3 -3
- package/dist/esm/co-progress-circle.entry.js +4 -4
- package/dist/esm/co-provider-logo_2.entry.js +69 -0
- package/dist/esm/co-radio-group.entry.js +2 -2
- package/dist/esm/co-radio.entry.js +5 -5
- package/dist/esm/co-rating.entry.js +5 -5
- package/dist/esm/co-ref-field.entry.js +22 -6
- package/dist/esm/co-rich-text-editor.entry.js +5 -5
- package/dist/esm/co-rich-text-toolbar.entry.js +2 -2
- package/dist/esm/co-rich-text-viewer.entry.js +1 -1
- package/dist/esm/co-row.entry.js +3 -3
- package/dist/esm/co-segmented-bar.entry.js +1 -1
- package/dist/esm/co-select.entry.js +4 -4
- package/dist/esm/co-separator.entry.js +2 -2
- package/dist/esm/co-sidebar-nav.entry.js +14 -4
- package/dist/esm/co-sidebar.entry.js +4 -4
- package/dist/esm/co-slider.entry.js +4 -4
- package/dist/esm/co-switch.entry.js +6 -6
- package/dist/esm/co-tab-group.entry.js +20 -4
- package/dist/esm/co-tab.entry.js +4 -4
- package/dist/esm/co-tags-field.entry.js +9 -9
- package/dist/esm/co-textarea.entry.js +7 -7
- package/dist/esm/co-toast.entry.js +35 -5
- package/dist/esm/co-toggle-button-group.entry.js +3 -3
- package/dist/esm/co-toggle-button.entry.js +4 -4
- package/dist/esm/co-transfer-list.entry.js +4 -4
- package/dist/esm/co-video.entry.js +4 -4
- package/dist/esm/cobalt.js +3 -3
- package/dist/esm/{dateI18n-C1DCLOEl.js → dateI18n-CnNpoKwg.js} +21 -0
- package/dist/esm/{dates-tPYikBRJ.js → dates-BU7SQCje.js} +64 -13
- package/dist/esm/{fieldChip-Bb8YIN0J.js → fieldChip-BZDUy9Z-.js} +1 -1
- package/dist/esm/{index-BCEz3S-z.js → index-CrtiywTB.js} +29 -13
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{positioning-C2mZ7x_Y.js → positioning-BMdapAL8.js} +10 -0
- package/dist/esm/{requiredMark-D7kAMXHM.js → requiredMark-DCD-ZA51.js} +1 -1
- package/dist/esm/time-CF8OB_TM.js +37 -0
- package/dist/esm/{tz-B6JZk8fL.js → tz-1EK-COrb.js} +1 -1
- package/dist/types/components/co-action-bar/co-action-bar.d.ts +66 -0
- package/dist/types/components/co-audio-player/co-audio-player.d.ts +62 -0
- package/dist/types/components/co-audio-player/co-audio-player.utils.d.ts +11 -0
- package/dist/types/components/co-autocomplete/co-autocomplete.d.ts +1 -1
- package/dist/types/components/co-button/co-button.d.ts +18 -1
- package/dist/types/components/co-calendar-month/co-calendar-month.d.ts +33 -1
- package/dist/types/components/co-calendar-timegrid/co-calendar-timegrid.d.ts +178 -0
- package/dist/types/components/co-combobox/co-combobox.d.ts +1 -1
- package/dist/types/components/co-command-search/co-command-search.d.ts +7 -0
- package/dist/types/components/co-date-time-picker/co-date-time-picker.d.ts +131 -0
- package/dist/types/components/co-event-calendar/co-event-calendar.d.ts +61 -8
- package/dist/types/components/co-event-popover/co-event-popover.d.ts +45 -0
- package/dist/types/components/co-menu-item/co-menu-item.d.ts +3 -0
- package/dist/types/components/co-option-list/co-option-list.d.ts +28 -1
- package/dist/types/components/co-option-list/optionListLogic.d.ts +3 -0
- package/dist/types/components/co-provider-logo/co-provider-logo.d.ts +17 -0
- package/dist/types/components/co-ref-field/co-ref-field.d.ts +5 -0
- package/dist/types/components/co-tab-group/co-tab-group.d.ts +5 -0
- package/dist/types/components/co-toast/co-toast.d.ts +19 -0
- package/dist/types/components/co-tooltip/co-tooltip.d.ts +6 -0
- package/dist/types/components.d.ts +1251 -82
- package/dist/types/utils/dateI18n.d.ts +7 -0
- package/dist/types/utils/eventColor.d.ts +20 -0
- package/package.json +3 -3
- package/dist/cjs/co-calendar-month.cjs.entry.js +0 -381
- package/dist/cjs/co-skeleton.cjs.entry.js +0 -26
- package/dist/cobalt/p-037cc571.entry.js +0 -1
- package/dist/cobalt/p-080f62e4.entry.js +0 -1
- package/dist/cobalt/p-0b7359bb.entry.js +0 -1
- package/dist/cobalt/p-0b92167a.entry.js +0 -1
- package/dist/cobalt/p-0bc5a962.entry.js +0 -1
- package/dist/cobalt/p-264508ae.entry.js +0 -1
- package/dist/cobalt/p-27dce0ac.entry.js +0 -1
- package/dist/cobalt/p-30c80e3a.entry.js +0 -1
- package/dist/cobalt/p-331a0108.entry.js +0 -1
- package/dist/cobalt/p-36ad3a96.entry.js +0 -1
- package/dist/cobalt/p-3ecbbe93.entry.js +0 -1
- package/dist/cobalt/p-3f1030fb.entry.js +0 -1
- package/dist/cobalt/p-3f7215e7.entry.js +0 -1
- package/dist/cobalt/p-431cec34.entry.js +0 -1
- package/dist/cobalt/p-4f615cbd.entry.js +0 -1
- package/dist/cobalt/p-5319ac3f.entry.js +0 -1
- package/dist/cobalt/p-532baca4.entry.js +0 -1
- package/dist/cobalt/p-53a276a8.entry.js +0 -1
- package/dist/cobalt/p-543cc00d.entry.js +0 -1
- package/dist/cobalt/p-54857f78.entry.js +0 -1
- package/dist/cobalt/p-585c132d.entry.js +0 -1
- package/dist/cobalt/p-59b114ab.entry.js +0 -1
- package/dist/cobalt/p-5c250889.entry.js +0 -1
- package/dist/cobalt/p-5d0510a5.entry.js +0 -1
- package/dist/cobalt/p-5e246304.entry.js +0 -1
- package/dist/cobalt/p-64115d66.entry.js +0 -1
- package/dist/cobalt/p-75515a8e.entry.js +0 -1
- package/dist/cobalt/p-8155d781.entry.js +0 -1
- package/dist/cobalt/p-8fe5b07e.entry.js +0 -1
- package/dist/cobalt/p-9824c478.entry.js +0 -1
- package/dist/cobalt/p-9bf42bf4.entry.js +0 -1
- package/dist/cobalt/p-9fab9c1f.entry.js +0 -1
- package/dist/cobalt/p-BCEz3S-z.js +0 -2
- package/dist/cobalt/p-C-d15gih.js +0 -1
- package/dist/cobalt/p-C1DCLOEl.js +0 -1
- package/dist/cobalt/p-C2mZ7x_Y.js +0 -1
- package/dist/cobalt/p-D5gr2ent.js +0 -1
- package/dist/cobalt/p-b06af5c6.entry.js +0 -1
- package/dist/cobalt/p-b87a2e7a.entry.js +0 -1
- package/dist/cobalt/p-bb00ae4a.entry.js +0 -1
- package/dist/cobalt/p-c237add6.entry.js +0 -1
- package/dist/cobalt/p-c589ae25.entry.js +0 -1
- package/dist/cobalt/p-c635417b.entry.js +0 -1
- package/dist/cobalt/p-c7d9ff39.entry.js +0 -1
- package/dist/cobalt/p-c9528a5f.entry.js +0 -1
- package/dist/cobalt/p-cbac0a11.entry.js +0 -1
- package/dist/cobalt/p-cd28aa6d.entry.js +0 -1
- package/dist/cobalt/p-d3a1a604.entry.js +0 -1
- package/dist/cobalt/p-d71b800a.entry.js +0 -1
- package/dist/cobalt/p-df752f6e.entry.js +0 -1
- package/dist/cobalt/p-ec9dd3a3.entry.js +0 -1
- package/dist/cobalt/p-eeed80ac.entry.js +0 -1
- package/dist/cobalt/p-f0a98453.entry.js +0 -1
- package/dist/cobalt/p-ff581807.entry.js +0 -1
- package/dist/cobalt/p-fffeb610.entry.js +0 -1
- package/dist/cobalt/p-tPYikBRJ.js +0 -1
- package/dist/components/p-9aNhJfTT.js +0 -1
- package/dist/components/p-B0b9Etx4.js +0 -1
- package/dist/components/p-B7Yv00g9.js +0 -1
- package/dist/components/p-BTa6ss5i.js +0 -1
- package/dist/components/p-BtpRnpaF.js +0 -1
- package/dist/components/p-Bzg5FPSA.js +0 -1
- package/dist/components/p-C1DCLOEl.js +0 -1
- package/dist/components/p-C2mZ7x_Y.js +0 -1
- package/dist/components/p-CQ-8domm.js +0 -1
- package/dist/components/p-CVeEoHr7.js +0 -1
- package/dist/components/p-CYi6V_Ss.js +0 -1
- package/dist/components/p-CmCsm4L-.js +0 -1
- package/dist/components/p-CuQjKAf5.js +0 -1
- package/dist/components/p-CyYF8IJE.js +0 -1
- package/dist/components/p-DKvTqEaf.js +0 -1
- package/dist/components/p-DwwxS5bY.js +0 -1
- package/dist/esm/co-calendar-month.entry.js +0 -379
- package/dist/esm/co-skeleton.entry.js +0 -24
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-CrtiywTB.js';
|
|
2
|
+
|
|
3
|
+
/** Seconds → "m:ss" (floors; 0 for NaN/negative). */
|
|
4
|
+
function formatTime(seconds) {
|
|
5
|
+
const s = Math.max(0, Math.floor(seconds || 0));
|
|
6
|
+
const m = Math.floor(s / 60);
|
|
7
|
+
const sec = s % 60;
|
|
8
|
+
return `${m}:${sec.toString().padStart(2, '0')}`;
|
|
9
|
+
}
|
|
10
|
+
/** Downsample raw PCM to `bars` peak heights, each normalized to a 0..1 fraction. */
|
|
11
|
+
function resamplePeaks(channelData, bars) {
|
|
12
|
+
const len = channelData.length;
|
|
13
|
+
if (!len || bars <= 0)
|
|
14
|
+
return [];
|
|
15
|
+
const step = Math.max(1, Math.floor(len / bars));
|
|
16
|
+
const peaks = [];
|
|
17
|
+
for (let i = 0; i < bars; i++) {
|
|
18
|
+
let max = 0;
|
|
19
|
+
const start = i * step;
|
|
20
|
+
for (let j = start; j < start + step && j < len; j++) {
|
|
21
|
+
const abs = Math.abs(channelData[j]);
|
|
22
|
+
if (abs > max)
|
|
23
|
+
max = abs;
|
|
24
|
+
}
|
|
25
|
+
peaks.push(0.12 + max * 0.88); // floor of 0.12 so silent buckets still show a sliver
|
|
26
|
+
}
|
|
27
|
+
return peaks;
|
|
28
|
+
}
|
|
29
|
+
/** Deterministic pseudo-waveform (stable render + testable — no Math.random). */
|
|
30
|
+
function fallbackPeaks(bars) {
|
|
31
|
+
if (bars <= 0)
|
|
32
|
+
return [];
|
|
33
|
+
const peaks = [];
|
|
34
|
+
for (let i = 0; i < bars; i++) {
|
|
35
|
+
const envelope = Math.sin((i / Math.max(1, bars)) * Math.PI) * 0.6 + 0.3;
|
|
36
|
+
const wobble = 0.75 + 0.25 * Math.abs(Math.sin(i * 1.7));
|
|
37
|
+
peaks.push(0.12 + envelope * wobble * 0.88);
|
|
38
|
+
}
|
|
39
|
+
return peaks;
|
|
40
|
+
}
|
|
41
|
+
/** Clamped 0..1 position of a click within a track rect. */
|
|
42
|
+
function scrubFraction(clientX, rect) {
|
|
43
|
+
if (!rect.width)
|
|
44
|
+
return 0;
|
|
45
|
+
return Math.max(0, Math.min(1, (clientX - rect.left) / rect.width));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const coAudioPlayerCss = () => `:host{display:block;font-family:var(--co-font-family-primary)}.co-audio-player{display:flex;align-items:center;gap:var(--co-spacing-md);padding:var(--co-spacing-sm) var(--co-spacing-md);border:1px solid var(--co-semantic-border-default);border-radius:var(--co-border-radius-xs);background:var(--co-semantic-surface-secondary);min-width:180px}.co-audio-player--compact{gap:var(--co-spacing-sm2);padding:var(--co-spacing-sm2) var(--co-spacing-sm);min-width:140px}.co-audio-player__play{flex:0 0 auto;width:28px;height:28px;border:none;border-radius:50%;cursor:pointer;background:var(--co-semantic-surface-primary);color:var(--co-semantic-text-inverse);display:inline-flex;align-items:center;justify-content:center}.co-audio-player--compact .co-audio-player__play{width:24px;height:24px}.co-audio-player__play:disabled{opacity:.5;cursor:not-allowed}.co-audio-player__play:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:2px}.co-audio-player__wave{flex:1;height:40px;min-width:0;cursor:pointer;display:flex;align-items:center}.co-audio-player__wave:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:2px;border-radius:var(--co-border-radius-xxs)}.co-audio-player__svg{width:100%;height:100%;display:block}.co-audio-player__bar{fill:var(--co-semantic-border-field);transition:fill var(--co-motion-duration-fast)}.co-audio-player__wave:hover .co-audio-player__bar{fill:var(--co-semantic-text-muted)}.co-audio-player__bar--played{fill:var(--co-semantic-surface-primary)}.co-audio-player__time{flex:0 0 auto;font-size:var(--co-font-size-12);color:var(--co-semantic-text-muted);font-variant-numeric:tabular-nums;min-width:62px;text-align:right}.co-audio-player__speed{flex:0 0 auto;border:none;background:transparent;cursor:pointer;padding:2px 4px;color:var(--co-semantic-text-muted);font-family:var(--co-font-family-primary);font-size:var(--co-font-size-12);font-variant-numeric:tabular-nums;min-width:34px;text-align:center}.co-audio-player__speed:hover{color:var(--co-semantic-text-default)}.co-audio-player__speed:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:2px;border-radius:var(--co-border-radius-xxs)}.co-audio-player__dl{flex:0 0 auto;border:none;background:transparent;cursor:pointer;padding:2px;color:var(--co-semantic-text-muted);display:inline-flex}.co-audio-player__dl:hover{color:var(--co-semantic-text-default)}.co-audio-player__dl:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:2px}.co-audio-player--error .co-audio-player__wave{opacity:.5}.co-audio-player--error .co-audio-player__play{background:var(--co-color-status-error);color:var(--co-semantic-text-inverse);opacity:1}`;
|
|
49
|
+
|
|
50
|
+
const CoAudioPlayer = class {
|
|
51
|
+
constructor(hostRef) {
|
|
52
|
+
registerInstance(this, hostRef);
|
|
53
|
+
this.coPlay = createEvent(this, "coPlay", 7);
|
|
54
|
+
this.coPause = createEvent(this, "coPause", 7);
|
|
55
|
+
this.coEnded = createEvent(this, "coEnded", 7);
|
|
56
|
+
this.coError = createEvent(this, "coError", 7);
|
|
57
|
+
/** Compact variant: narrower, hides the download button. */
|
|
58
|
+
this.compact = false;
|
|
59
|
+
/** Fallback bar count used before the container width is measured. Once
|
|
60
|
+
* measured, the real bar count is derived from the width via `barDensity`
|
|
61
|
+
* (V1 parity: a dense, detail-rich waveform rather than a fixed count). */
|
|
62
|
+
this.bars = 64;
|
|
63
|
+
/** Pixels per waveform bar (bar + gap). Lower = denser/more detailed, like V1
|
|
64
|
+
* (`SkAudioPlayer` used 3). The measured bar count = floor(width / barDensity). */
|
|
65
|
+
this.barDensity = 3;
|
|
66
|
+
/** Passthrough to the underlying <audio> preload. */
|
|
67
|
+
this.preload = 'metadata';
|
|
68
|
+
/** Filename for the download button. */
|
|
69
|
+
this.downloadFilename = 'audio';
|
|
70
|
+
/** Hide the download button even in full mode. */
|
|
71
|
+
this.noDownload = false;
|
|
72
|
+
this.isPlaying = false;
|
|
73
|
+
this.isLoading = false;
|
|
74
|
+
this.hasError = false;
|
|
75
|
+
this.currentTime = 0;
|
|
76
|
+
this.duration = 0;
|
|
77
|
+
this.peaks = [];
|
|
78
|
+
/** Measured wave width (px); 0 until the ResizeObserver reports it. */
|
|
79
|
+
this.containerWidth = 0;
|
|
80
|
+
/** Current playback rate; the speed control cycles through `SPEEDS`. */
|
|
81
|
+
this.playbackRate = 1;
|
|
82
|
+
// Decoded mono PCM, kept so bars can be re-resampled on resize without re-fetching.
|
|
83
|
+
this.rawChannelData = null;
|
|
84
|
+
this.onMeta = () => { var _a; this.duration = ((_a = this.audio) === null || _a === void 0 ? void 0 : _a.duration) || 0; };
|
|
85
|
+
this.onCanPlay = () => { this.isLoading = false; };
|
|
86
|
+
this.onWaiting = () => { this.isLoading = true; };
|
|
87
|
+
this.onTime = () => { var _a; this.currentTime = ((_a = this.audio) === null || _a === void 0 ? void 0 : _a.currentTime) || 0; };
|
|
88
|
+
this.onEnded = () => { this.isPlaying = false; this.currentTime = 0; this.coEnded.emit(); };
|
|
89
|
+
this.onErr = (e) => { this.isLoading = false; this.hasError = true; this.coError.emit(e); };
|
|
90
|
+
this.toggle = () => {
|
|
91
|
+
if (!this.audio || this.hasError)
|
|
92
|
+
return;
|
|
93
|
+
if (this.isPlaying) {
|
|
94
|
+
this.audio.pause();
|
|
95
|
+
this.isPlaying = false;
|
|
96
|
+
this.coPause.emit();
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
this.audio.play().then(() => { this.isPlaying = true; this.coPlay.emit(); }).catch(() => { });
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
// Playback-speed cycle (V1 SkAudioPlayer parity): the label shows the current
|
|
103
|
+
// rate and clicking it advances to the next.
|
|
104
|
+
this.SPEEDS = [1, 1.5, 2, 0.5];
|
|
105
|
+
this.cycleSpeed = () => {
|
|
106
|
+
const i = this.SPEEDS.indexOf(this.playbackRate);
|
|
107
|
+
this.playbackRate = this.SPEEDS[(i + 1) % this.SPEEDS.length];
|
|
108
|
+
if (this.audio)
|
|
109
|
+
this.audio.playbackRate = this.playbackRate;
|
|
110
|
+
};
|
|
111
|
+
this.seekAt = (clientX) => {
|
|
112
|
+
if (!this.audio || !this.waveEl || !this.duration)
|
|
113
|
+
return;
|
|
114
|
+
const frac = scrubFraction(clientX, this.waveEl.getBoundingClientRect());
|
|
115
|
+
this.audio.currentTime = frac * this.duration;
|
|
116
|
+
this.currentTime = this.audio.currentTime;
|
|
117
|
+
};
|
|
118
|
+
this.onWaveKey = (e) => {
|
|
119
|
+
if (e.key === ' ' || e.key === 'Enter') {
|
|
120
|
+
e.preventDefault();
|
|
121
|
+
this.toggle();
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
if (!this.audio || !this.duration)
|
|
125
|
+
return;
|
|
126
|
+
if (e.key === 'ArrowRight')
|
|
127
|
+
this.audio.currentTime = Math.min(this.duration, this.audio.currentTime + 5);
|
|
128
|
+
else if (e.key === 'ArrowLeft')
|
|
129
|
+
this.audio.currentTime = Math.max(0, this.audio.currentTime - 5);
|
|
130
|
+
else
|
|
131
|
+
return;
|
|
132
|
+
this.currentTime = this.audio.currentTime;
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
/** Bar count: derived from the measured width (V1-style density) once known,
|
|
136
|
+
* else the `bars` fallback. Floored at 24 so a narrow player still reads as a wave. */
|
|
137
|
+
get effectiveBars() {
|
|
138
|
+
return this.containerWidth > 0
|
|
139
|
+
? Math.max(24, Math.floor(this.containerWidth / this.barDensity))
|
|
140
|
+
: this.bars;
|
|
141
|
+
}
|
|
142
|
+
// componentWillLoad (not componentDidLoad) so `init()` seeds @State before the
|
|
143
|
+
// FIRST render pass. Under @stencil/vitest's test-bundle transform, class-field
|
|
144
|
+
// defaults for @Prop/@State are not seeded on the element ahead of render (see
|
|
145
|
+
// the co-tab-group.spec.tsx comment on this repo's harness gap) — running before
|
|
146
|
+
// the first render, not after, is what keeps this.peaks/duration/etc. defined.
|
|
147
|
+
componentWillLoad() { this.init(); }
|
|
148
|
+
// Measure the wave width so the bar count tracks it (V1 density). The wave
|
|
149
|
+
// element exists only after the first render, hence componentDidLoad.
|
|
150
|
+
componentDidLoad() {
|
|
151
|
+
if (typeof ResizeObserver === 'undefined' || !this.waveEl)
|
|
152
|
+
return;
|
|
153
|
+
this.resizeObserver = new ResizeObserver((entries) => {
|
|
154
|
+
var _a;
|
|
155
|
+
for (const entry of entries) {
|
|
156
|
+
const w = ((_a = entry.contentRect) === null || _a === void 0 ? void 0 : _a.width) || entry.target.clientWidth || 0;
|
|
157
|
+
if (w > 2 && Math.abs(w - this.containerWidth) > 2) {
|
|
158
|
+
this.containerWidth = w;
|
|
159
|
+
this.rebuildBars();
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
this.resizeObserver.observe(this.waveEl);
|
|
164
|
+
const w0 = this.waveEl.clientWidth || 0;
|
|
165
|
+
if (w0 > 2) {
|
|
166
|
+
this.containerWidth = w0;
|
|
167
|
+
this.rebuildBars();
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
disconnectedCallback() {
|
|
171
|
+
var _a;
|
|
172
|
+
this.teardown();
|
|
173
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
174
|
+
this.resizeObserver = undefined;
|
|
175
|
+
}
|
|
176
|
+
onSrcChange() { this.init(); }
|
|
177
|
+
// Re-derive bars for the current width: from cached PCM if decoded, else the
|
|
178
|
+
// deterministic fallback shape. Reassign the array so Stencil re-renders.
|
|
179
|
+
rebuildBars() {
|
|
180
|
+
this.peaks = this.rawChannelData
|
|
181
|
+
? resamplePeaks(this.rawChannelData, this.effectiveBars)
|
|
182
|
+
: fallbackPeaks(this.effectiveBars);
|
|
183
|
+
}
|
|
184
|
+
init() {
|
|
185
|
+
this.teardown();
|
|
186
|
+
this.rawChannelData = null;
|
|
187
|
+
this.peaks = fallbackPeaks(this.effectiveBars); // draw immediately; refine with real peaks
|
|
188
|
+
this.currentTime = 0;
|
|
189
|
+
this.duration = 0;
|
|
190
|
+
this.playbackRate = 1; // a fresh source starts at 1x (new <audio> defaults to 1)
|
|
191
|
+
this.hasError = false;
|
|
192
|
+
if (!this.src)
|
|
193
|
+
return;
|
|
194
|
+
this.isLoading = true;
|
|
195
|
+
this.extractPeaks(this.src);
|
|
196
|
+
if (typeof Audio === 'undefined')
|
|
197
|
+
return; // test/SSR guard
|
|
198
|
+
const el = new Audio();
|
|
199
|
+
el.preload = this.preload;
|
|
200
|
+
el.crossOrigin = 'anonymous';
|
|
201
|
+
el.src = this.src;
|
|
202
|
+
el.addEventListener('loadedmetadata', this.onMeta);
|
|
203
|
+
el.addEventListener('timeupdate', this.onTime);
|
|
204
|
+
el.addEventListener('ended', this.onEnded);
|
|
205
|
+
el.addEventListener('error', this.onErr);
|
|
206
|
+
el.addEventListener('canplay', this.onCanPlay);
|
|
207
|
+
el.addEventListener('waiting', this.onWaiting);
|
|
208
|
+
this.audio = el;
|
|
209
|
+
}
|
|
210
|
+
teardown() {
|
|
211
|
+
if (this.audio) {
|
|
212
|
+
this.audio.pause();
|
|
213
|
+
this.audio.removeEventListener('loadedmetadata', this.onMeta);
|
|
214
|
+
this.audio.removeEventListener('timeupdate', this.onTime);
|
|
215
|
+
this.audio.removeEventListener('ended', this.onEnded);
|
|
216
|
+
this.audio.removeEventListener('error', this.onErr);
|
|
217
|
+
this.audio.removeEventListener('canplay', this.onCanPlay);
|
|
218
|
+
this.audio.removeEventListener('waiting', this.onWaiting);
|
|
219
|
+
this.audio.src = '';
|
|
220
|
+
this.audio = undefined;
|
|
221
|
+
}
|
|
222
|
+
this.isPlaying = false;
|
|
223
|
+
}
|
|
224
|
+
async extractPeaks(url) {
|
|
225
|
+
try {
|
|
226
|
+
const Ctx = window.AudioContext || window.webkitAudioContext;
|
|
227
|
+
if (!Ctx || typeof fetch === 'undefined')
|
|
228
|
+
return; // keep fallback
|
|
229
|
+
const ctx = new Ctx();
|
|
230
|
+
const buf = await (await fetch(url)).arrayBuffer();
|
|
231
|
+
const audioBuf = await ctx.decodeAudioData(buf);
|
|
232
|
+
this.rawChannelData = audioBuf.getChannelData(0);
|
|
233
|
+
this.peaks = resamplePeaks(this.rawChannelData, this.effectiveBars);
|
|
234
|
+
ctx.close();
|
|
235
|
+
}
|
|
236
|
+
catch (_a) {
|
|
237
|
+
this.rawChannelData = null;
|
|
238
|
+
this.peaks = fallbackPeaks(this.effectiveBars); // stays functional
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
async download() {
|
|
242
|
+
if (!this.src || typeof fetch === 'undefined')
|
|
243
|
+
return;
|
|
244
|
+
try {
|
|
245
|
+
const blob = await (await fetch(this.src)).blob();
|
|
246
|
+
const url = URL.createObjectURL(blob);
|
|
247
|
+
const a = document.createElement('a');
|
|
248
|
+
a.href = url;
|
|
249
|
+
a.download = this.downloadFilename;
|
|
250
|
+
document.body.appendChild(a);
|
|
251
|
+
a.click();
|
|
252
|
+
a.remove();
|
|
253
|
+
URL.revokeObjectURL(url);
|
|
254
|
+
}
|
|
255
|
+
catch ( /* ignore */_a) { /* ignore */ }
|
|
256
|
+
}
|
|
257
|
+
render() {
|
|
258
|
+
const H = 40, UNIT = 3, W = 1.8, R = 0.6;
|
|
259
|
+
const vbW = Math.max(1, this.peaks.length * UNIT);
|
|
260
|
+
const pct = this.duration ? (this.currentTime / this.duration) * 100 : 0;
|
|
261
|
+
const bar = (hFrac, i, played = false) => (h("rect", { key: '4775b84d9af61824dcd56d79aca4d198802fd9ab', 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 } }));
|
|
262
|
+
return (h("div", { key: 'b1e8e33109602b0f88c2d95a1bc004d282ae1985', class: {
|
|
263
|
+
'co-audio-player': true,
|
|
264
|
+
'co-audio-player--compact': this.compact,
|
|
265
|
+
'co-audio-player--error': this.hasError,
|
|
266
|
+
'co-audio-player--playing': this.isPlaying,
|
|
267
|
+
}, part: "player" }, h("button", { key: '37c0b83df324d87382aa6c3c1793597f74f9cefe', 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: '5dd0f24e7ca67fa080e4e9dd8b0512b322d5e53e', name: this.hasError ? 'warning-circle' : this.isPlaying ? 'pause' : 'play', weight: "fill", size: this.compact ? 12 : 14 })), h("div", { key: 'ad0e201fec15d2cebf9d049c83a19221f9a00f68', class: "co-audio-player__wave", part: "wave", role: "slider", tabindex: "0", "aria-label": "Progreso de reproducci\u00F3n", "aria-valuemin": 0, "aria-valuemax": Math.floor(this.duration), "aria-valuenow": Math.floor(this.currentTime), ref: (el) => (this.waveEl = el), onClick: (e) => this.seekAt(e.clientX), onKeyDown: this.onWaveKey }, h("svg", { key: '2407820a1b05cfd4f433a15824be006698353d05', 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: 'ef30411f2c3db0167adbe22828c3eff9fbc9faf9', id: "co-ap-clip" }, h("rect", { key: 'c63779f30c3cc18b5e44d33f243ab8ddf209bb06', x: "0", y: "0", width: (pct / 100) * vbW, height: H })), h("g", { key: '0d56c6299e0affdea922048205365ced7e5b135b', "clip-path": "url(#co-ap-clip)" }, this.peaks.map((hFrac, i) => bar(hFrac, i, true))))), h("span", { key: 'd123e909e5c0641968d5d5c18f11a48e416a9ccc', class: "co-audio-player__time", part: "time" }, formatTime(this.currentTime), " / ", formatTime(this.duration)), !this.compact && (h("button", { key: 'ec9bf8ec5d81105dfc8346d69f6cd63b127a3d72', 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: '28be3e9a09967e836fde4a4422971edb576998f0', type: "button", class: "co-audio-player__dl", part: "download", "aria-label": "Descargar", onClick: () => this.download() }, h("co-icon", { key: 'fad58b255cc75b70f692136c516913131c25677c', name: "download-simple", size: 14 })))));
|
|
268
|
+
}
|
|
269
|
+
static get watchers() { return {
|
|
270
|
+
"src": [{
|
|
271
|
+
"onSrcChange": 0
|
|
272
|
+
}]
|
|
273
|
+
}; }
|
|
274
|
+
};
|
|
275
|
+
CoAudioPlayer.style = coAudioPlayerCss();
|
|
276
|
+
|
|
277
|
+
export { CoAudioPlayer as co_audio_player };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, a as getElement } from './index-
|
|
2
|
-
import { R as RequiredMark } from './requiredMark-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, a as getElement } from './index-CrtiywTB.js';
|
|
2
|
+
import { R as RequiredMark } from './requiredMark-DCD-ZA51.js';
|
|
3
3
|
|
|
4
|
-
const coAutocompleteCss = () => `:host{display:block;font-family:var(--co-font-family-primary);font-size:var(--co-font-size-14);letter-spacing:var(--co-font-letter-spacing-body);line-height:1;position:relative}.co-autocomplete{display:flex;flex-direction:column;gap:var(--co-spacing-sm2);position:relative}.co-autocomplete__labels{display:flex;align-items:center;justify-content:space-between;padding:0 var(--co-spacing-xs);gap:var(--co-spacing-sm2)}.co-autocomplete__label{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);font-weight:400;line-height:1;white-space:nowrap;cursor:default}.co-autocomplete__secondary-label{color:var(--co-semantic-text-muted);font-size:var(--co-font-size-14);font-weight:400;line-height:1;white-space:nowrap;text-align:right}.co-autocomplete--disabled .co-autocomplete__label,.co-autocomplete--disabled .co-autocomplete__secondary-label{color:var(--co-semantic-text-disabled)}.co-autocomplete__field{display:flex;align-items:center;flex-wrap:wrap;gap:var(--co-spacing-xs);padding:var(--co-spacing-sm2) var(--co-spacing-md);background:var(--co-semantic-surface-page);border:1px solid var(--co-semantic-border-field);border-radius:var(--co-border-radius-xs);min-height:40px;box-sizing:border-box;transition:border-color
|
|
4
|
+
const coAutocompleteCss = () => `:host{display:block;font-family:var(--co-font-family-primary);font-size:var(--co-font-size-14);letter-spacing:var(--co-font-letter-spacing-body);line-height:1;position:relative}.co-autocomplete{display:flex;flex-direction:column;gap:var(--co-spacing-sm2);position:relative}.co-autocomplete__labels{display:flex;align-items:center;justify-content:space-between;padding:0 var(--co-spacing-xs);gap:var(--co-spacing-sm2)}.co-autocomplete__label{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);font-weight:400;line-height:1;white-space:nowrap;cursor:default}.co-autocomplete__secondary-label{color:var(--co-semantic-text-muted);font-size:var(--co-font-size-14);font-weight:400;line-height:1;white-space:nowrap;text-align:right}.co-autocomplete--disabled .co-autocomplete__label,.co-autocomplete--disabled .co-autocomplete__secondary-label{color:var(--co-semantic-text-disabled)}.co-autocomplete__field{display:flex;align-items:center;flex-wrap:wrap;gap:var(--co-spacing-xs);padding:var(--co-spacing-sm2) var(--co-spacing-md);background:var(--co-semantic-surface-page);border:1px solid var(--co-semantic-border-field);border-radius:var(--co-border-radius-xs);min-height:40px;box-sizing:border-box;transition:border-color var(--co-motion-duration-fast) var(--co-motion-ease-out), box-shadow var(--co-motion-duration-fast) var(--co-motion-ease-out)}.co-autocomplete--s .co-autocomplete__field{min-height:28px;padding:var(--co-spacing-xxs) var(--co-spacing-sm);font-size:var(--co-font-size-12)}.co-autocomplete--sm .co-autocomplete__field{min-height:32px;padding:var(--co-spacing-xs) var(--co-spacing-sm);font-size:var(--co-font-size-14)}.co-autocomplete--lg .co-autocomplete__field{min-height:48px;padding:var(--co-spacing-sm) var(--co-spacing-lg);font-size:var(--co-font-size-16)}.co-autocomplete--focused .co-autocomplete__field{border-color:var(--co-semantic-border-focus);box-shadow:0 0 0 2px var(--co-semantic-border-focus-ring)}.co-autocomplete--disabled .co-autocomplete__field{background:var(--co-semantic-surface-disabled);border-color:transparent;cursor:not-allowed}.co-autocomplete--error .co-autocomplete__field{border-color:var(--co-semantic-status-error)}.co-autocomplete--success .co-autocomplete__field{border-color:var(--co-semantic-status-success)}.co-autocomplete--warning .co-autocomplete__field{border-color:var(--co-color-status-review)}.co-autocomplete--info .co-autocomplete__field{border-color:var(--co-semantic-status-info)}.co-autocomplete__icon{flex-shrink:0;color:var(--co-semantic-text-muted);display:flex;align-items:center}.co-autocomplete__chips{display:flex;flex-wrap:wrap;gap:var(--co-spacing-xs)}.co-autocomplete__input{flex:1;min-width:80px;border:none;background:transparent;color:var(--co-semantic-text-default);font-family:inherit;font-size:inherit;font-weight:400;line-height:1;padding:0;outline:none}.co-autocomplete__input::placeholder{color:var(--co-semantic-text-muted)}.co-autocomplete--disabled .co-autocomplete__input{color:var(--co-semantic-text-disabled);cursor:not-allowed}.co-autocomplete__clear{flex-shrink:0;display:flex;align-items:center;padding:0;margin:0;border:none;background:transparent;cursor:pointer;color:var(--co-semantic-text-muted);transition:color var(--co-motion-duration-fast) var(--co-motion-ease-out)}.co-autocomplete__clear:hover{color:var(--co-semantic-text-default)}.co-autocomplete__spinner{width:16px;height:16px;border:2px solid var(--co-semantic-border-subtle);border-top-color:var(--co-semantic-text-default);border-radius:var(--co-border-radius-full);animation:co-spin 0.6s linear infinite;flex-shrink:0}@keyframes co-spin{to{transform:rotate(360deg)}}.co-autocomplete__dropdown{position:absolute;top:100%;left:0;right:0;z-index:100;margin-top:var(--co-spacing-xs);background:var(--co-semantic-surface-secondary);border:1px solid var(--co-semantic-border-subtle);border-radius:var(--co-border-radius-sm, 12px);box-shadow:0 4px 16px rgba(31, 28, 27, 0.08);overflow:hidden;padding:var(--co-spacing-sm2)}.co-autocomplete__helper{display:flex;align-items:center;gap:var(--co-spacing-xs);padding:0 var(--co-spacing-xs)}.co-autocomplete__helper-icon{flex-shrink:0;display:flex;align-items:center}.co-autocomplete__helper-text{color:var(--co-semantic-text-muted);font-size:var(--co-font-size-14);font-weight:400;line-height:1}.co-autocomplete__helper--error .co-autocomplete__helper-icon,.co-autocomplete__helper--error .co-autocomplete__helper-text{color:var(--co-semantic-status-error)}.co-autocomplete__helper--success .co-autocomplete__helper-icon,.co-autocomplete__helper--success .co-autocomplete__helper-text{color:var(--co-semantic-status-success)}.co-autocomplete__helper--warning .co-autocomplete__helper-icon,.co-autocomplete__helper--warning .co-autocomplete__helper-text{color:var(--co-color-status-review)}.co-autocomplete__helper--info .co-autocomplete__helper-icon,.co-autocomplete__helper--info .co-autocomplete__helper-text{color:var(--co-semantic-status-info)}:host([layout='horizontal']) .co-autocomplete{display:grid;grid-template-columns:var(--co-field-label-width, max-content) 1fr;align-items:start;column-gap:var(--co-spacing-md);row-gap:var(--co-spacing-sm2)}:host([layout='horizontal']) .co-autocomplete__labels{grid-column:1;grid-row:1;padding-top:var(--co-spacing-sm2);min-width:0}:host([layout='horizontal']) .co-autocomplete__label{white-space:normal}:host([layout='horizontal']) .co-autocomplete>:not(.co-autocomplete__labels){grid-column:2;min-width:0}.co-field-required{margin-left:2px;color:var(--co-color-status-error)}.co-field-required__caption{margin-left:4px;color:var(--co-semantic-text-muted);font-size:var(--co-font-size-12);font-weight:400}.co-field-required__caption::before{content:var(--co-field-required-text, ' (required)')}`;
|
|
5
5
|
|
|
6
6
|
const CoAutocomplete = class {
|
|
7
7
|
constructor(hostRef) {
|
|
@@ -68,6 +68,15 @@ const CoAutocomplete = class {
|
|
|
68
68
|
this.coChange.emit({ value: sel, item: { _id: val, label: val } });
|
|
69
69
|
};
|
|
70
70
|
this.handleListChange = (detail) => {
|
|
71
|
+
// co-option-list emite value:null al DESELECCIONAR → limpiar y PROPAGAR el
|
|
72
|
+
// deselect (value:null) para que el host distinga "vacío" de "sin cambio".
|
|
73
|
+
if (detail.value == null) {
|
|
74
|
+
this.value = this.multiple ? '[]' : '';
|
|
75
|
+
this.query = '';
|
|
76
|
+
this.isOpen = false;
|
|
77
|
+
this.coChange.emit({ value: null, item: null });
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
71
80
|
if (this.multiple) {
|
|
72
81
|
this.value = JSON.stringify(detail.value);
|
|
73
82
|
this.coChange.emit({ value: detail.value, item: detail.item });
|
|
@@ -166,16 +175,16 @@ const CoAutocomplete = class {
|
|
|
166
175
|
render() {
|
|
167
176
|
const options = this.parsedOptions;
|
|
168
177
|
const selected = this.selectedValues;
|
|
169
|
-
return (h("div", { key: '
|
|
178
|
+
return (h("div", { key: '0fad340e2daa5ee4b56e28325d5eaec4d60d7188', class: {
|
|
170
179
|
'co-autocomplete': true,
|
|
171
180
|
'co-autocomplete--disabled': this.disabled,
|
|
172
181
|
'co-autocomplete--focused': this.focused,
|
|
173
182
|
[`co-autocomplete--${this.size}`]: true,
|
|
174
183
|
[`co-autocomplete--${this.status}`]: this.status !== 'default',
|
|
175
|
-
} }, (this.label || this.secondaryLabel) && (h("div", { key: '
|
|
184
|
+
} }, (this.label || this.secondaryLabel) && (h("div", { key: 'a724b6267fd6dbe267725f3619677e043843c96c', class: "co-autocomplete__labels" }, this.label && h("label", { key: '45c176c82f0967c6ff0f1f323d36834d247f8ac6', class: "co-autocomplete__label" }, this.label, h(RequiredMark, { key: '52940ac88fa7ba5f2b662990a66b0ad84d728ecc', required: this.required })), this.secondaryLabel && h("span", { key: '5eac2ccf44d59067f7ca070561c18c9b45b4cfc1', class: "co-autocomplete__secondary-label" }, this.secondaryLabel))), h("div", { key: '4837e011ac491a34efdfb84bd80f2baa52c4f451', class: "co-autocomplete__field" }, this.iconLeft && h("co-icon", { key: '1a46dba433dec3b8dec82b6d2e93cee0575f5673', name: this.iconLeft, size: 16, class: "co-autocomplete__icon" }), this.multiple && selected.length > 0 && (h("div", { key: '95054c8e5ec371ba04f6fa5938d74babffef473f', class: "co-autocomplete__chips" }, selected.map(val => {
|
|
176
185
|
const opt = this.parsedOptions.find(o => o.value === val);
|
|
177
186
|
return (h("co-chip", { label: opt ? opt.label : val, size: "small", removable: true, onCoRemove: () => this.handleChipRemove(val) }));
|
|
178
|
-
}))), h("input", { key: '
|
|
187
|
+
}))), h("input", { key: '016887bf4fa1872bafd1ba60a7fb960ca89e8b76', ref: el => (this.inputEl = el), class: "co-autocomplete__input", type: "text", value: this.query, placeholder: this.placeholder, disabled: this.disabled, onInput: this.handleInput, onFocus: this.handleFocus, onKeyDown: this.handleInputKeyDown }), this.loading && h("div", { key: 'eac7e752a8d8f18b866c5fe4283707e851355328', class: "co-autocomplete__spinner" }), this.clearable && (this.hasValue || this.query) && !this.disabled && (h("button", { key: 'aac8dcfced13e8abf3bb6beb0fa56124814804ea', class: "co-autocomplete__clear", type: "button", tabIndex: -1, onClick: this.handleClear, "aria-label": "Clear" }, h("co-icon", { key: '8a5605cfe09eb17ca65c9fd97662ceec893431b7', name: "x-circle", size: 16, weight: "fill" })))), this.isOpen && (h("div", { key: '7263c42e73656db3ee8d1c1c2f5f5cd941b0e40b', class: "co-autocomplete__dropdown" }, h("co-option-list", { key: '32071562943c992b0013451c8b89da20590554cf', ref: (el) => (this.optionListEl = el), items: JSON.stringify(options.map((o) => ({ _id: o.value, label: o.label, icon: o.icon, disabled: o.disabled }))), value: this.multiple ? JSON.stringify(this.selectedValues) : (this.selectedValues[0] || ''), multiple: this.multiple, selectedAffordance: "check", virtual: true, loading: this.loading, emptyMessage: this.emptyMessage, onCoChange: (e) => this.handleListChange(e.detail) }))), this.helperText && (h("div", { key: '47ba4956d829c700700a7509e8fd2fc58dd6e4d9', class: `co-autocomplete__helper co-autocomplete__helper--${this.status}` }, this.statusIcon && h("co-icon", { key: 'b4363e83a7258241d23f4911c1f6fb352330c19d', name: this.statusIcon, size: 14, weight: "fill", class: "co-autocomplete__helper-icon" }), h("span", { key: '952777047bd27a6604daea9531f26ce5aab0c475', class: "co-autocomplete__helper-text" }, this.helperText)))));
|
|
179
188
|
}
|
|
180
189
|
get el() { return getElement(this); }
|
|
181
190
|
static get watchers() { return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-CrtiywTB.js';
|
|
2
2
|
|
|
3
|
-
const coAvatarGroupCss = () => `:host{display:inline-flex}.co-avatar-group{display:inline-flex;align-items:center}.co-avatar-group--interactive{appearance:none;-webkit-appearance:none;background:none;border:0;margin:0;padding:0;font:inherit;color:inherit;cursor:pointer;border-radius:var(--co-border-radius-full);outline:none;transition:opacity
|
|
3
|
+
const coAvatarGroupCss = () => `:host{display:inline-flex}.co-avatar-group{display:inline-flex;align-items:center}.co-avatar-group--interactive{appearance:none;-webkit-appearance:none;background:none;border:0;margin:0;padding:0;font:inherit;color:inherit;cursor:pointer;border-radius:var(--co-border-radius-full);outline:none;transition:opacity var(--co-motion-duration-fast) var(--co-motion-ease-out)}.co-avatar-group--interactive:hover{opacity:0.88}.co-avatar-group--interactive:focus-visible{box-shadow:0 0 0 2px var(--co-semantic-surface-page), 0 0 0 4px var(--co-semantic-border-focus)}.co-avatar-group__slot{display:inline-flex;align-items:center;line-height:0}.co-avatar-group>*:not(:first-child){margin-left:calc(-1 * var(--co-avatar-group-overlap, var(--co-spacing-sm)))}.co-avatar-group__avatar::part(avatar),.co-avatar-group__overflow{box-shadow:0 0 0 var(--co-avatar-group-ring-width, 2px) var(--co-semantic-surface-page)}.co-avatar-group__avatar,.co-avatar-group__overflow{vertical-align:middle}.co-avatar-group__overflow{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;border-radius:var(--co-border-radius-full);background:var(--co-semantic-surface-muted);color:var(--co-semantic-text-secondary);font-family:var(--co-font-family-primary);font-weight:600;line-height:1;letter-spacing:var(--co-font-letter-spacing-body);flex-shrink:0;user-select:none;-webkit-font-smoothing:antialiased}`;
|
|
4
4
|
|
|
5
5
|
/** Disc dimensions per size — kept in sync with `co-avatar`'s SIZE_MAP. */
|
|
6
6
|
const SIZE_MAP = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, h, a as getElement } from './index-
|
|
2
|
-
import { c as computePosition, g as getOffsetAncestor, f as findNearestScrollParent } from './positioning-
|
|
1
|
+
import { r as registerInstance, h, a as getElement } from './index-CrtiywTB.js';
|
|
2
|
+
import { c as computePosition, g as getOffsetAncestor, f as findNearestScrollParent } from './positioning-BMdapAL8.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Shared color utilities for Cobalt components.
|
|
@@ -92,7 +92,7 @@ const CoAvatar = class {
|
|
|
92
92
|
};
|
|
93
93
|
CoAvatar.style = coAvatarCss();
|
|
94
94
|
|
|
95
|
-
const coTooltipCss = () => `:host{display:inline-block;position:relative}.co-tooltip{display:inline-block}.co-tooltip__trigger{display:inline-block}:host([block]){display:block;width:100%;min-width:0}:host([block]) .co-tooltip,:host([block]) .co-tooltip__trigger{display:block;width:100%;min-width:0}.co-tooltip__panel{position:fixed;inset:auto;top:0;left:0;margin:0;border:0;max-height:none;overflow:visible;z-index:10000;visibility:hidden;opacity:0;pointer-events:none;background:var(--co-color-base-negro, #1f1c1b);color:var(--co-color-base-blanco, #fff);font-family:var(--co-font-family-primary, 'Geist', sans-serif);font-size:var(--co-font-size-12, 12px);line-height:1.4;font-weight:400;padding:var(--co-spacing-xs, 4px) var(--co-spacing-sm, 8px);border-radius:var(--co-border-radius-xxs, 4px);box-shadow:0 4px 12px rgba(31, 28, 27, 0.12);white-space:normal;word-wrap:break-word;transition:opacity
|
|
95
|
+
const coTooltipCss = () => `:host{display:inline-block;position:relative}.co-tooltip{display:inline-block}.co-tooltip__trigger{display:inline-block}:host([block]){display:block;width:100%;min-width:0}:host([block]) .co-tooltip,:host([block]) .co-tooltip__trigger{display:block;width:100%;min-width:0}.co-tooltip__panel{position:fixed;inset:auto;top:0;left:0;margin:0;border:0;max-height:none;overflow:visible;z-index:10000;visibility:hidden;opacity:0;pointer-events:none;background:var(--co-color-base-negro, #1f1c1b);color:var(--co-color-base-blanco, #fff);font-family:var(--co-font-family-primary, 'Geist', sans-serif);font-size:var(--co-font-size-12, 12px);line-height:1.4;font-weight:400;padding:var(--co-spacing-xs, 4px) var(--co-spacing-sm, 8px);border-radius:var(--co-border-radius-xxs, 4px);box-shadow:0 4px 12px rgba(31, 28, 27, 0.12);white-space:normal;word-wrap:break-word;transition:opacity var(--co-motion-duration-base) var(--co-motion-ease-out), transform var(--co-motion-duration-base) var(--co-motion-ease-out)}.co-tooltip__panel--positioned{visibility:visible;opacity:1}.co-tooltip__panel--top{transform:translateY(4px)}.co-tooltip__panel--top.co-tooltip__panel--positioned{transform:translateY(0)}.co-tooltip__panel--bottom{transform:translateY(-4px)}.co-tooltip__panel--bottom.co-tooltip__panel--positioned{transform:translateY(0)}.co-tooltip__panel--left{transform:translateX(4px)}.co-tooltip__panel--left.co-tooltip__panel--positioned{transform:translateX(0)}.co-tooltip__panel--right{transform:translateX(-4px)}.co-tooltip__panel--right.co-tooltip__panel--positioned{transform:translateX(0)}.co-tooltip__arrow{position:absolute;width:0;height:0;border:5px solid transparent}.co-tooltip__arrow--top{bottom:-10px;left:50%;transform:translateX(-50%);border-top-color:var(--co-color-base-negro, #1f1c1b);border-bottom:none}.co-tooltip__arrow--bottom{top:-5px;left:50%;transform:translateX(-50%);border-bottom-color:var(--co-color-base-negro, #1f1c1b);border-top:none}.co-tooltip__arrow--left{right:-10px;top:50%;transform:translateY(-50%);border-left-color:var(--co-color-base-negro, #1f1c1b);border-right:none}.co-tooltip__arrow--right{left:-5px;top:50%;transform:translateY(-50%);border-right-color:var(--co-color-base-negro, #1f1c1b);border-left:none}.co-tooltip__content{display:block}`;
|
|
96
96
|
|
|
97
97
|
const CoTooltip = class {
|
|
98
98
|
constructor(hostRef) {
|
|
@@ -123,12 +123,17 @@ const CoTooltip = class {
|
|
|
123
123
|
// ── State ──────────────────────────────────────────────────
|
|
124
124
|
this.visible = false;
|
|
125
125
|
this.actualPlacement = 'top';
|
|
126
|
+
/** Activación del trigger (click/tap): el tooltip se oculta y queda
|
|
127
|
+
* SUPRIMIDO hasta que el puntero salga y vuelva a entrar (o el foco salga).
|
|
128
|
+
* Sin esto, el tooltip re-aparece SOBRE el menú/popover que el click abrió
|
|
129
|
+
* (el botón conserva hover+focus). El foco por teclado no suprime. */
|
|
130
|
+
this.suppressed = false;
|
|
126
131
|
this.scrollParents = [];
|
|
127
132
|
this.cachedOffsetAncestor = null;
|
|
128
133
|
this.offsetAncestorComputed = false;
|
|
129
134
|
// ── Show / Hide ────────────────────────────────────────────
|
|
130
135
|
this.scheduleShow = () => {
|
|
131
|
-
if (this.disabled || !this.content)
|
|
136
|
+
if (this.disabled || !this.content || this.suppressed)
|
|
132
137
|
return;
|
|
133
138
|
this.clearHideTimeout();
|
|
134
139
|
if (this.visible)
|
|
@@ -154,12 +159,18 @@ const CoTooltip = class {
|
|
|
154
159
|
this.scheduleShow();
|
|
155
160
|
};
|
|
156
161
|
this.handleMouseLeave = () => {
|
|
162
|
+
this.suppressed = false;
|
|
157
163
|
this.scheduleHide();
|
|
158
164
|
};
|
|
165
|
+
this.handlePointerDown = () => {
|
|
166
|
+
this.suppressed = true;
|
|
167
|
+
this.hideImmediate();
|
|
168
|
+
};
|
|
159
169
|
this.handleFocusIn = () => {
|
|
160
170
|
this.scheduleShow();
|
|
161
171
|
};
|
|
162
172
|
this.handleFocusOut = () => {
|
|
173
|
+
this.suppressed = false;
|
|
163
174
|
this.scheduleHide();
|
|
164
175
|
};
|
|
165
176
|
this.handleKeyDown = (e) => {
|
|
@@ -309,7 +320,7 @@ const CoTooltip = class {
|
|
|
309
320
|
// ── Render ─────────────────────────────────────────────────
|
|
310
321
|
render() {
|
|
311
322
|
const side = this.actualPlacement.split('-')[0];
|
|
312
|
-
return (h("div", { key: '
|
|
323
|
+
return (h("div", { key: '5a96ea6ece5fc1b0f0479013317ce436a6d1c7a1', class: "co-tooltip" }, h("div", { key: 'fec326dce031c56e8f03963dd681bf63f80e3438', class: "co-tooltip__trigger", ref: (el) => (this.triggerEl = el), onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave, onPointerDown: this.handlePointerDown, onFocusin: this.handleFocusIn, onFocusout: this.handleFocusOut, onKeyDown: this.handleKeyDown, "aria-describedby": this.visible ? 'tooltip-panel' : undefined }, h("slot", { key: 'a480bf1d93a8a234c7d903fc5e4008b40b75c6ed' })), this.visible && this.content && (h("div", { key: '8ed6640fd0e44f115efeaf41994804030749bc0c', id: "tooltip-panel", class: {
|
|
313
324
|
'co-tooltip__panel': true,
|
|
314
325
|
[`co-tooltip__panel--${side}`]: true,
|
|
315
326
|
}, role: "tooltip", popover: "manual", ref: (el) => {
|
|
@@ -318,7 +329,7 @@ const CoTooltip = class {
|
|
|
318
329
|
this.promotePanel();
|
|
319
330
|
this.scheduleUpdate();
|
|
320
331
|
}
|
|
321
|
-
}, style: { maxWidth: this.maxWidth } }, this.arrow && h("div", { key: '
|
|
332
|
+
}, style: { maxWidth: this.maxWidth } }, this.arrow && h("div", { key: 'ed6b26c594bddbb9d5d044a279f481c37194dd4c', class: `co-tooltip__arrow co-tooltip__arrow--${side}` }), h("span", { key: 'd776ef95bc1ff38c6128ce1557ac6d0929ca063a', class: "co-tooltip__content" }, this.content)))));
|
|
322
333
|
}
|
|
323
334
|
get el() { return getElement(this); }
|
|
324
335
|
static get watchers() { return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h } from './index-CrtiywTB.js';
|
|
2
2
|
|
|
3
3
|
const coBadgeCss = () => `:host{display:inline-flex}.co-badge{display:inline-block;border-radius:var(--co-border-radius-full);flex-shrink:0}.co-badge--large{width:16px;height:16px}.co-badge--small{width:6px;height:6px}.co-badge--default{background:var(--co-semantic-surface-primary)}.co-badge--success{background:var(--co-semantic-status-success)}.co-badge--error{background:var(--co-semantic-status-error)}.co-badge--warning{background:var(--co-semantic-status-warning)}.co-badge--info{background:var(--co-semantic-status-info)}`;
|
|
4
4
|
|
|
@@ -14,7 +14,7 @@ const CoBadge = class {
|
|
|
14
14
|
this.color = 'default';
|
|
15
15
|
}
|
|
16
16
|
render() {
|
|
17
|
-
return (h("span", { key: '
|
|
17
|
+
return (h("span", { key: '8e24eae365e19b27d3af88bda2b292b8087ccbe7', class: {
|
|
18
18
|
'co-badge': true,
|
|
19
19
|
[`co-badge--${this.size}`]: true,
|
|
20
20
|
[`co-badge--${this.color}`]: true,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, a as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, a as getElement } from './index-CrtiywTB.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Pure gesture math for co-bottom-sheet (DOM-free, unit-tested).
|
|
@@ -54,7 +54,7 @@ function decideRelease({ offset, height, velocity, dismissible }) {
|
|
|
54
54
|
return 'restore';
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
const coBottomSheetCss = () => `:host{display:contents}.co-bottom-sheet__backdrop{position:fixed;inset:0;z-index:1000;background:rgba(0, 0, 0, 0.4);-webkit-backdrop-filter:blur(var(--co-overlay-blur, 2px));backdrop-filter:blur(var(--co-overlay-blur, 2px));opacity:0;pointer-events:none;transition:opacity
|
|
57
|
+
const coBottomSheetCss = () => `:host{display:contents}.co-bottom-sheet__backdrop{position:fixed;inset:0;z-index:1000;background:rgba(0, 0, 0, 0.4);-webkit-backdrop-filter:blur(var(--co-overlay-blur, 2px));backdrop-filter:blur(var(--co-overlay-blur, 2px));opacity:0;pointer-events:none;transition:opacity var(--co-motion-duration-fast) var(--co-motion-ease-in)}.co-bottom-sheet-root--open .co-bottom-sheet__backdrop{opacity:1;pointer-events:auto;transition:opacity var(--co-motion-duration-base) var(--co-motion-ease-out)}.co-bottom-sheet{position:fixed;left:0;right:0;bottom:0;z-index:1001;display:flex;flex-direction:column;height:auto;max-height:var(--co-bottom-sheet-max-height, 85dvh);background:var(--co-semantic-surface-page);font-family:var(--co-font-family-primary);border-radius:var(--co-border-radius-xl) var(--co-border-radius-xl) 0 0;box-shadow:0 -4px 24px rgba(0, 0, 0, 0.12);transform:translateY(100%);transition:transform var(--co-motion-duration-slow) var(--co-motion-ease-in-out);will-change:transform;overflow:hidden;visibility:hidden}.co-bottom-sheet--open{transform:translateY(0);visibility:visible}.co-bottom-sheet:not(.co-bottom-sheet--open){transition:transform var(--co-motion-duration-slow) var(--co-motion-ease-in-out), visibility 0s linear var(--co-motion-duration-slow)}.co-bottom-sheet--dragging,.co-bottom-sheet-root:has(.co-bottom-sheet--dragging) .co-bottom-sheet__backdrop{transition:none !important}.co-bottom-sheet__grip{flex-shrink:0;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent;cursor:grab}.co-bottom-sheet--dragging .co-bottom-sheet__grip{cursor:grabbing}.co-bottom-sheet__handle{width:40px;height:4px;margin:var(--co-spacing-sm) auto var(--co-spacing-xs);border-radius:var(--co-border-radius-full);background:var(--co-semantic-border-default)}.co-bottom-sheet__header{padding:0 var(--co-spacing-xl)}.co-bottom-sheet__header--show{padding-bottom:var(--co-spacing-sm)}.co-bottom-sheet__heading{margin:0;font-size:var(--co-font-size-16);font-weight:700;color:var(--co-semantic-text-default)}.co-bottom-sheet__body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior-y:contain;touch-action:pan-y}.co-bottom-sheet__footer{flex-shrink:0;display:none}.co-bottom-sheet__footer--show{display:block;border-top:1px solid var(--co-semantic-border-default);padding:var(--co-spacing-md) var(--co-spacing-xl) calc(var(--co-spacing-lg) + env(safe-area-inset-bottom, 0px));background:var(--co-semantic-surface-page)}`;
|
|
58
58
|
|
|
59
59
|
const CoBottomSheet = class {
|
|
60
60
|
constructor(hostRef) {
|
|
@@ -303,13 +303,13 @@ const CoBottomSheet = class {
|
|
|
303
303
|
(_a = this.bodyEl) === null || _a === void 0 ? void 0 : _a.removeEventListener('touchmove', this.touchBlocker);
|
|
304
304
|
}
|
|
305
305
|
render() {
|
|
306
|
-
return (h("div", { key: '
|
|
306
|
+
return (h("div", { key: 'cbb30d66c27b5abd51309a1e55a920656a1a0c6a', class: { 'co-bottom-sheet-root': true, 'co-bottom-sheet-root--open': this.open } }, h("div", { key: '0b6d164ff4a4520eb9f7cb54991540ba30a9d1e0', class: "co-bottom-sheet__backdrop", part: "backdrop", onClick: this.handleBackdropClick, ref: (el) => (this.backdropEl = el) }), h("section", { key: 'd0a06e9c2ef7389dee933edf6251e0578a78ca71', class: { 'co-bottom-sheet': true, 'co-bottom-sheet--open': this.open }, part: "sheet", role: "dialog", "aria-modal": "true", "aria-labelledby": this.heading ? 'co-bottom-sheet-heading' : undefined, style: { '--co-bottom-sheet-max-height': this.maxHeight }, onTransitionEnd: this.handleTransitionEnd, ref: (el) => (this.sheetEl = el) }, h("div", { key: '749d7123e579ab46b63f6ccd14df28af0890f2fd', class: "co-bottom-sheet__grip", onPointerDown: this.handleGripPointerDown, onPointerMove: this.handlePointerMove, onPointerUp: this.handlePointerUp, onPointerCancel: this.handlePointerCancel }, this.showHandle && (h("div", { key: '1c007545c0ab262abe4a2276fe10c18068c1d5c7', class: "co-bottom-sheet__handle", part: "handle", "aria-hidden": "true" })), h("header", { key: 'd1be5c0085c6dc30009ab792b91e86e97477861d', class: {
|
|
307
307
|
'co-bottom-sheet__header': true,
|
|
308
308
|
'co-bottom-sheet__header--show': this.hasHeaderSlot || !!this.heading,
|
|
309
|
-
}, part: "header" }, h("slot", { key: '
|
|
309
|
+
}, part: "header" }, h("slot", { key: '2163362b13cf19b1221f9655ec5b4b09085a2b6c', name: "header", onSlotchange: this.handleHeaderSlotChange }, this.heading && (h("h2", { key: 'c2f8f34cc167b14d62ac4a27396c8c72e05ab274', class: "co-bottom-sheet__heading", id: "co-bottom-sheet-heading" }, this.heading))))), h("div", { key: 'a89e7b39bd72311b5b0ccd5358c9f9e45618fa86', class: "co-bottom-sheet__body", part: "body", onPointerDown: this.handleBodyPointerDown, onPointerMove: this.handlePointerMove, onPointerUp: this.handlePointerUp, onPointerCancel: this.handlePointerCancel, ref: (el) => (this.bodyEl = el) }, h("slot", { key: '4424ce944ef083fc9c760774b30d66b48320fe8a' })), h("footer", { key: 'b3452533a6d25a0528c3f0456ce3413e9dcccef4', class: {
|
|
310
310
|
'co-bottom-sheet__footer': true,
|
|
311
311
|
'co-bottom-sheet__footer--show': this.hasFooter,
|
|
312
|
-
}, part: "footer" }, h("slot", { key: '
|
|
312
|
+
}, part: "footer" }, h("slot", { key: 'd697688035f2767aef0894f9cdf2b99bce9d2fb6', name: "footer", onSlotchange: this.handleFooterSlotChange })))));
|
|
313
313
|
}
|
|
314
314
|
get el() { return getElement(this); }
|
|
315
315
|
static get watchers() { return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-CrtiywTB.js';
|
|
2
2
|
|
|
3
3
|
const coBreadcrumbItemCss = () => `:host{display:inline-flex;align-items:center;min-width:0}.co-breadcrumb-item__sep{display:inline-flex;align-items:center;flex-shrink:0;margin-right:var(--co-spacing-xs, 4px);color:var(--co-color-gray-400, #a0a0a0)}:host(:first-child) .co-breadcrumb-item__sep{display:none}.co-breadcrumb-item__content{display:inline-flex;align-items:center;gap:7px;min-width:0;padding:0;border:0;background:transparent;cursor:pointer;white-space:nowrap;font-family:var(--co-font-family-primary);font-size:var(--co-font-size-14, 14px);font-weight:400;letter-spacing:var(--co-font-letter-spacing-body, -0.03em);color:var(--co-color-gray-500, #888888)}.co-breadcrumb-item__content:focus-visible{outline:2px solid var(--co-semantic-border-focus, var(--co-color-primary-azul, #2563eb));outline-offset:2px;border-radius:2px}.co-breadcrumb-item--current .co-breadcrumb-item__content{font-weight:500;color:var(--co-color-base-negro, #1f1c1b)}.co-breadcrumb-item__icon{display:inline-flex;align-items:center;flex-shrink:0;}.co-breadcrumb-item__label{min-width:0;overflow:hidden;text-overflow:ellipsis}`;
|
|
4
4
|
|
|
@@ -23,10 +23,10 @@ const CoBreadcrumbItem = class {
|
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
25
|
render() {
|
|
26
|
-
return (h(Host, { key: '
|
|
26
|
+
return (h(Host, { key: '255696950cd3a032a2c5e81afe2b7e495bc974f4', part: "breadcrumb-item", class: {
|
|
27
27
|
'co-breadcrumb-item': true,
|
|
28
28
|
'co-breadcrumb-item--current': this.current,
|
|
29
|
-
} }, h("span", { key: '
|
|
29
|
+
} }, h("span", { key: '6a54693a183953f9eaeabf2b4d687f28c479eef6', class: "co-breadcrumb-item__sep", "aria-hidden": "true" }, h("co-icon", { key: '2bce60612e26554fd22a2bc03117e50e0d8efe36', name: this.separator, size: 13 })), h("span", { key: '889634ee730f05686916132456086e9f9a6f21db', class: "co-breadcrumb-item__content", part: "content", role: "link", tabindex: "0", "aria-current": this.current ? 'page' : undefined, onClick: this.handleClick, onKeyDown: this.handleKeydown }, this.icon && (h("span", { key: 'c90e7812924e4fab4b928c7d892a4cba2f9a59f5', class: "co-breadcrumb-item__icon" }, h("co-icon", { key: '344ff71c4fa9832600ad62df6935dcc695f9a4d7', name: this.icon, size: 16 }))), h("span", { key: '488e831a5cf405f135b7ddd20d95fe823e21ae29', class: "co-breadcrumb-item__label" }, this.label, h("slot", { key: 'c5b05d33b49d273cfc3360df9395ce2417234eae' })))));
|
|
30
30
|
}
|
|
31
31
|
get el() { return getElement(this); }
|
|
32
32
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, a as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host, a as getElement } from './index-CrtiywTB.js';
|
|
2
2
|
|
|
3
3
|
const coBreadcrumbCss = () => `:host{display:flex;align-items:center;gap:var(--co-spacing-xs, 4px);min-width:0}`;
|
|
4
4
|
|
|
@@ -37,7 +37,7 @@ const CoBreadcrumb = class {
|
|
|
37
37
|
}
|
|
38
38
|
render() {
|
|
39
39
|
const data = this.parseItems();
|
|
40
|
-
return (h(Host, { key: '
|
|
40
|
+
return (h(Host, { key: '25dce93deb73a903ac025ffeed54ca53ab1f22e3', part: "breadcrumb", role: "navigation", "aria-label": "Breadcrumb" }, data
|
|
41
41
|
? data.map((it, i) => (h("co-breadcrumb-item", { key: i, label: it.label, value: it.value, icon: it.icon, separator: this.separator, current: i === data.length - 1 })))
|
|
42
42
|
: h("slot", { onSlotchange: this.handleSlotChange })));
|
|
43
43
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h } from './index-CrtiywTB.js';
|
|
2
2
|
|
|
3
3
|
const coButtonGroupCss = () => `:host{display:inline-flex}.co-button-group{display:inline-flex;gap:0}.co-button-group--row{flex-direction:row}.co-button-group--column{flex-direction:column}.co-button-group--row ::slotted(co-button){--co-btn-border-radius:0}.co-button-group--row ::slotted(co-button:first-child){--co-btn-border-radius-left:var(--co-border-radius-xs)}.co-button-group--row ::slotted(co-button:last-child){--co-btn-border-radius-right:var(--co-border-radius-xs)}.co-button-group--column ::slotted(co-button){--co-btn-border-radius:0;width:100%}.co-button-group--column ::slotted(co-button:first-child){--co-btn-border-radius-top:var(--co-border-radius-xs)}.co-button-group--column ::slotted(co-button:last-child){--co-btn-border-radius-bottom:var(--co-border-radius-xs)}.co-button-group--stroke.co-button-group--row ::slotted(co-button:not(:first-child)){margin-left:-1px}.co-button-group--stroke.co-button-group--column ::slotted(co-button:not(:first-child)){margin-top:-1px}.co-button-group--disabled{opacity:0.4;pointer-events:none}`;
|
|
4
4
|
|
|
@@ -14,12 +14,12 @@ const CoButtonGroup = class {
|
|
|
14
14
|
this.disabled = false;
|
|
15
15
|
}
|
|
16
16
|
render() {
|
|
17
|
-
return (h("div", { key: '
|
|
17
|
+
return (h("div", { key: '3d04106570e94fdd1787e5a1336b84b523c22607', class: {
|
|
18
18
|
'co-button-group': true,
|
|
19
19
|
[`co-button-group--${this.direction}`]: true,
|
|
20
20
|
[`co-button-group--${this.variant}`]: true,
|
|
21
21
|
'co-button-group--disabled': this.disabled,
|
|
22
|
-
}, role: "group" }, h("slot", { key: '
|
|
22
|
+
}, role: "group" }, h("slot", { key: '6121a73fbe3f565b251f4db3f9d2ab45450f0a3c' })));
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
25
|
CoButtonGroup.style = coButtonGroupCss();
|