@prolibu-suite/cobalt-core 0.9.6 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +750 -80
- package/dist/cjs/co-accordion.cjs.entry.js +1 -1
- package/dist/cjs/co-action-bar.cjs.entry.js +1 -1
- package/dist/cjs/co-app-shell.cjs.entry.js +4 -4
- package/dist/cjs/co-audio-player.cjs.entry.js +1 -1
- package/dist/cjs/co-autocomplete.cjs.entry.js +2 -2
- package/dist/cjs/co-avatar-group.cjs.entry.js +1 -1
- package/dist/cjs/co-avatar_2.cjs.entry.js +49 -17
- package/dist/cjs/co-badge.cjs.entry.js +11 -3
- package/dist/cjs/co-bottom-sheet.cjs.entry.js +1 -1
- package/dist/cjs/co-breadcrumb-item.cjs.entry.js +1 -1
- package/dist/cjs/co-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/co-button-group.cjs.entry.js +1 -1
- package/dist/cjs/co-button.cjs.entry.js +2 -2
- package/dist/cjs/co-calendar-month_2.cjs.entry.js +55 -20
- package/dist/cjs/co-calendar_3.cjs.entry.js +27 -15
- package/dist/cjs/co-card.cjs.entry.js +1 -1
- package/dist/cjs/co-carousel-item.cjs.entry.js +1 -1
- package/dist/cjs/co-carousel.cjs.entry.js +2 -2
- package/dist/cjs/co-checkbox-group.cjs.entry.js +2 -2
- package/dist/cjs/co-checkbox.cjs.entry.js +6 -6
- package/dist/cjs/co-chip_2.cjs.entry.js +8 -5
- package/dist/cjs/co-color-picker.cjs.entry.js +1048 -27
- package/dist/cjs/co-column-picker.cjs.entry.js +3 -3
- package/dist/cjs/co-combobox.cjs.entry.js +2 -2
- package/dist/cjs/co-command-search.cjs.entry.js +1 -1
- package/dist/cjs/co-data-table-pagination.cjs.entry.js +5 -5
- package/dist/cjs/co-data-table.cjs.entry.js +1 -1
- package/dist/cjs/co-date-picker.cjs.entry.js +3 -3
- package/dist/cjs/co-date-range-picker.cjs.entry.js +3 -3
- package/dist/cjs/co-date-range.cjs.entry.js +2 -2
- package/dist/cjs/co-date-time-picker.cjs.entry.js +101 -130
- package/dist/cjs/co-drive-card.cjs.entry.js +2 -2
- package/dist/cjs/co-drop-zone.cjs.entry.js +2 -2
- package/dist/cjs/co-emoji-picker.cjs.entry.js +4 -4
- package/dist/cjs/co-empty-state.cjs.entry.js +4 -4
- package/dist/cjs/co-event-calendar.cjs.entry.js +4 -4
- package/dist/cjs/co-event-popover.cjs.entry.js +3 -3
- package/dist/cjs/co-fab.cjs.entry.js +3 -3
- package/dist/cjs/co-file-field.cjs.entry.js +102 -106
- 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 +6 -6
- package/dist/cjs/co-icon.cjs.entry.js +3 -3
- package/dist/cjs/co-input.cjs.entry.js +26 -4
- package/dist/cjs/co-json-field.cjs.entry.js +5 -5
- package/dist/cjs/co-lightbox.cjs.entry.js +204 -21
- package/dist/cjs/co-list-footer.cjs.entry.js +2 -2
- package/dist/cjs/co-list-item.cjs.entry.js +5 -5
- 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 +84 -3
- package/dist/cjs/co-menu.cjs.entry.js +2 -2
- package/dist/cjs/co-modal.cjs.entry.js +6 -4
- package/dist/cjs/co-navbar.cjs.entry.js +4 -4
- package/dist/cjs/co-number-field.cjs.entry.js +272 -9
- package/dist/cjs/co-overlay.cjs.entry.js +6 -4
- package/dist/cjs/co-page-header.cjs.entry.js +2 -2
- package/dist/cjs/co-phone-field.cjs.entry.js +3 -3
- package/dist/cjs/co-popover.cjs.entry.js +58 -21
- package/dist/cjs/co-progress-bar.cjs.entry.js +3 -3
- package/dist/cjs/co-progress-circle.cjs.entry.js +3 -3
- package/dist/cjs/co-provider-logo_2.cjs.entry.js +47 -3
- package/dist/cjs/co-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/co-radio.cjs.entry.js +4 -4
- package/dist/cjs/co-rating.cjs.entry.js +4 -4
- package/dist/cjs/co-ref-field.cjs.entry.js +4 -4
- package/dist/cjs/co-rich-text-editor.cjs.entry.js +11 -8
- package/dist/cjs/co-rich-text-toolbar.cjs.entry.js +7 -3
- package/dist/cjs/co-rich-text-viewer.cjs.entry.js +4 -3
- 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 +2 -2
- package/dist/cjs/co-separator.cjs.entry.js +2 -2
- package/dist/cjs/co-sidebar-nav.cjs.entry.js +2 -2
- package/dist/cjs/co-sidebar.cjs.entry.js +3 -3
- package/dist/cjs/co-slider.cjs.entry.js +3 -3
- package/dist/cjs/co-switch.cjs.entry.js +6 -6
- package/dist/cjs/co-tab-group.cjs.entry.js +3 -3
- package/dist/cjs/co-tab.cjs.entry.js +3 -3
- package/dist/cjs/co-tags-field.cjs.entry.js +8 -8
- package/dist/cjs/co-textarea.cjs.entry.js +6 -6
- package/dist/cjs/co-time-field.cjs.entry.js +325 -0
- package/dist/cjs/co-toast.cjs.entry.js +2 -2
- package/dist/cjs/co-toggle-button-group.cjs.entry.js +4 -4
- package/dist/cjs/co-toggle-button.cjs.entry.js +4 -4
- package/dist/cjs/co-transfer-list.cjs.entry.js +1 -1
- package/dist/cjs/co-video.cjs.entry.js +32 -7
- package/dist/cjs/cobalt.cjs.js +2 -2
- package/dist/cjs/color-CML2Cfdh.js +142 -0
- package/dist/cjs/{dateI18n-wblvKRq_.js → dateI18n-BK2qHqoC.js} +36 -0
- package/dist/cjs/{fieldChip-BLzo9MEV.js → fieldChip-B6YIGU1V.js} +1 -1
- package/dist/cjs/fileI18n-6sdbKvo6.js +88 -0
- package/dist/cjs/{index-DFZ5YhIT.js → index-BYwrR87Z.js} +28 -10
- package/dist/cjs/{index-DK-2Lzmf.js → index-MDAnKsze.js} +25 -21
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{positioning-DCj_AJ2T.js → positioning-CyatXeT_.js} +32 -13
- package/dist/cjs/{requiredMark-C1xcrzSZ.js → requiredMark-D-t-IPN0.js} +1 -1
- package/dist/cjs/{toolbar-config-BQfWTW6P.js → toolbar-config-BSGas-Wl.js} +10 -0
- package/dist/cobalt/cobalt.css +1 -1
- package/dist/cobalt/cobalt.esm.js +1 -1
- package/dist/cobalt/{p-f83b48fd.entry.js → p-011dc80b.entry.js} +1 -1
- package/dist/cobalt/{p-316c62c0.entry.js → p-0678c797.entry.js} +1 -1
- package/dist/cobalt/{p-43bd298d.entry.js → p-08e42e00.entry.js} +1 -1
- package/dist/cobalt/{p-1c68bc41.entry.js → p-10b82207.entry.js} +1 -1
- package/dist/cobalt/{p-a8c64cc3.entry.js → p-15d59169.entry.js} +1 -1
- package/dist/cobalt/{p-07d570a6.entry.js → p-16954cea.entry.js} +1 -1
- package/dist/cobalt/{p-85a61e28.entry.js → p-17244412.entry.js} +1 -1
- package/dist/cobalt/p-1788aab5.entry.js +1 -0
- package/dist/cobalt/p-1a589c8e.entry.js +1 -0
- package/dist/cobalt/{p-da546d08.entry.js → p-1dc55e43.entry.js} +1 -1
- package/dist/cobalt/p-20a39218.entry.js +1 -0
- package/dist/cobalt/{p-4c7e3984.entry.js → p-23ab0cc5.entry.js} +1 -1
- package/dist/cobalt/{p-fabe5fb2.entry.js → p-2636b7eb.entry.js} +1 -1
- package/dist/cobalt/{p-88a0659f.entry.js → p-27a7e549.entry.js} +1 -1
- package/dist/cobalt/{p-18d34b01.entry.js → p-290066ef.entry.js} +1 -1
- package/dist/cobalt/{p-89e38c5e.entry.js → p-2f9cbbd5.entry.js} +1 -1
- package/dist/cobalt/{p-ef5e1167.entry.js → p-325b91b6.entry.js} +1 -1
- package/dist/cobalt/{p-60cb66f5.entry.js → p-37f5036b.entry.js} +1 -1
- package/dist/cobalt/p-3cc3ff93.entry.js +1 -0
- package/dist/cobalt/p-410bee4d.entry.js +1 -0
- package/dist/cobalt/{p-6795a258.entry.js → p-44c4e4a3.entry.js} +1 -1
- package/dist/cobalt/{p-4b083da4.entry.js → p-44ea675f.entry.js} +1 -1
- package/dist/cobalt/{p-2828ecf6.entry.js → p-4592ca00.entry.js} +1 -1
- package/dist/cobalt/p-4908f33f.entry.js +1 -0
- package/dist/cobalt/{p-342e1da4.entry.js → p-4d65e713.entry.js} +1 -1
- package/dist/cobalt/{p-dca4cd5f.entry.js → p-4d897896.entry.js} +1 -1
- package/dist/cobalt/{p-33ea4a90.entry.js → p-50bcc76f.entry.js} +1 -1
- package/dist/cobalt/{p-ac91259e.entry.js → p-5298c030.entry.js} +1 -1
- package/dist/cobalt/p-54c987d7.entry.js +1 -0
- package/dist/cobalt/p-56551580.entry.js +1 -0
- package/dist/cobalt/p-58137c9e.entry.js +1 -0
- package/dist/cobalt/{p-4f754c9a.entry.js → p-58d9b650.entry.js} +1 -1
- package/dist/cobalt/p-59963937.entry.js +1 -0
- package/dist/cobalt/{p-2d329ac8.entry.js → p-623cc195.entry.js} +1 -1
- package/dist/cobalt/p-63825d7f.entry.js +1 -0
- package/dist/cobalt/{p-8e667eb6.entry.js → p-66b11b38.entry.js} +1 -1
- package/dist/cobalt/{p-fb3a095b.entry.js → p-6bf6bc3e.entry.js} +1 -1
- package/dist/cobalt/p-6f700f0d.entry.js +1 -0
- package/dist/cobalt/p-73c6d735.entry.js +1 -0
- package/dist/cobalt/{p-a6357340.entry.js → p-76249983.entry.js} +1 -1
- package/dist/cobalt/{p-bfc2a849.entry.js → p-82266f11.entry.js} +1 -1
- package/dist/cobalt/{p-a9b29cc2.entry.js → p-826ee074.entry.js} +1 -1
- package/dist/cobalt/{p-23b3ff3f.entry.js → p-83a9a05a.entry.js} +1 -1
- package/dist/cobalt/{p-568cfe8d.entry.js → p-83ea631d.entry.js} +1 -1
- package/dist/cobalt/p-85501c6a.entry.js +1 -0
- package/dist/cobalt/{p-dfd25f1d.entry.js → p-88195a63.entry.js} +1 -1
- package/dist/cobalt/p-8fa5dc4a.entry.js +1 -0
- package/dist/cobalt/{p-c8dba82f.entry.js → p-91e73a92.entry.js} +1 -1
- package/dist/cobalt/{p-ac466658.entry.js → p-92b092db.entry.js} +1 -1
- package/dist/cobalt/{p-36197363.entry.js → p-996f4e38.entry.js} +1 -1
- package/dist/cobalt/p-BRbgGqLw.js +1 -0
- package/dist/cobalt/{p-BL0sCfMH.js → p-Bryf3-Js.js} +1 -1
- package/dist/cobalt/p-DFHRS9cJ.js +1 -0
- package/dist/cobalt/{p-CrtiywTB.js → p-DH5lfRNj.js} +1 -1
- package/dist/{components/p-WeuPA9Rw.js → cobalt/p-DOL2zACE.js} +1 -1
- package/dist/cobalt/p-D_zA1Pv4.js +1 -0
- package/dist/cobalt/{p-fef5db54.entry.js → p-a32b20eb.entry.js} +1 -1
- package/dist/cobalt/p-aa9400bf.entry.js +1 -0
- package/dist/cobalt/{p-8eb485c8.entry.js → p-aaca6dab.entry.js} +1 -1
- package/dist/cobalt/{p-e5495539.entry.js → p-aae86f96.entry.js} +1 -1
- package/dist/cobalt/{p-8f38e24d.entry.js → p-ad33c40e.entry.js} +1 -1
- package/dist/cobalt/p-b0c4fc71.entry.js +1 -0
- package/dist/cobalt/{p-da18b5f4.entry.js → p-b1e8d69e.entry.js} +1 -1
- package/dist/cobalt/p-b48917c9.entry.js +1 -0
- package/dist/cobalt/{p-7e53e9c8.entry.js → p-b565104d.entry.js} +1 -1
- package/dist/cobalt/{p-b0319a2d.entry.js → p-b90d41e4.entry.js} +1 -1
- package/dist/cobalt/{p-c5684c79.entry.js → p-bd683db3.entry.js} +1 -1
- package/dist/cobalt/{p-1ddbc48b.entry.js → p-c124e82b.entry.js} +1 -1
- package/dist/cobalt/{p-95efe661.entry.js → p-c2ebf0ec.entry.js} +1 -1
- package/dist/cobalt/{p-76420ac1.entry.js → p-c32c176a.entry.js} +1 -1
- package/dist/cobalt/{p-54ae807d.entry.js → p-c465d619.entry.js} +1 -1
- package/dist/cobalt/{p-ab45d9bd.entry.js → p-c91d4fc6.entry.js} +1 -1
- package/dist/cobalt/{p-ce35c898.entry.js → p-d29bb0fa.entry.js} +1 -1
- package/dist/cobalt/{p-7c5e846a.entry.js → p-db805569.entry.js} +1 -1
- package/dist/cobalt/p-e01f9b9a.entry.js +1 -0
- package/dist/cobalt/p-e3aae282.entry.js +1 -0
- package/dist/cobalt/{p-d15d3a97.entry.js → p-e4264532.entry.js} +1 -1
- package/dist/cobalt/{p-93c68029.entry.js → p-e48f4e45.entry.js} +1 -1
- package/dist/cobalt/{p-3f0eed59.entry.js → p-e49a564c.entry.js} +1 -1
- package/dist/cobalt/p-e8a2f993.entry.js +1 -0
- package/dist/cobalt/p-e8a4e6b0.entry.js +1 -0
- package/dist/cobalt/p-ea20f048.entry.js +1 -0
- package/dist/cobalt/{p-c1e7fb32.entry.js → p-eb063cc0.entry.js} +1 -1
- package/dist/cobalt/p-eb82358d.entry.js +1 -0
- package/dist/cobalt/{p-2114c036.entry.js → p-eb8691f2.entry.js} +1 -1
- package/dist/cobalt/{p-e8878cf9.entry.js → p-ee2023da.entry.js} +1 -1
- package/dist/cobalt/p-ee9a623d.entry.js +1 -0
- package/dist/cobalt/p-ef5ca521.entry.js +1 -0
- package/dist/cobalt/p-f4e1c3c3.entry.js +1 -0
- package/dist/cobalt/{p-e364b8a5.entry.js → p-f57dffca.entry.js} +1 -1
- package/dist/cobalt/p-f6691108.entry.js +1 -0
- package/dist/cobalt/p-f68dd124.entry.js +1 -0
- package/dist/cobalt/p-fMqVDypp.js +1 -0
- package/dist/cobalt/{p-0c463d9a.entry.js → p-fd150cc6.entry.js} +1 -1
- package/dist/cobalt/{p-0e91e5c4.entry.js → p-fe7e8813.entry.js} +1 -1
- package/dist/cobalt/p-gKnOhsd2.js +1 -0
- package/dist/cobalt/p-jYd9gu_c.js +1 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/co-app-shell/co-app-shell.css +107 -41
- package/dist/collection/components/co-app-shell/co-app-shell.js +2 -2
- package/dist/collection/components/co-autocomplete/co-autocomplete.js +1 -1
- package/dist/collection/components/co-avatar-group/co-avatar-group.js +1 -1
- package/dist/collection/components/co-badge/co-badge.css +18 -0
- package/dist/collection/components/co-badge/co-badge.js +29 -1
- package/dist/collection/components/co-button/co-button.css +4 -4
- package/dist/collection/components/co-checkbox/co-checkbox.css +12 -3
- package/dist/collection/components/co-checkbox/co-checkbox.js +6 -6
- package/dist/collection/components/co-checkbox-group/co-checkbox-group.css +1 -3
- package/dist/collection/components/co-checkbox-group/co-checkbox-group.js +1 -1
- package/dist/collection/components/co-color-picker/co-color-picker.css +252 -5
- package/dist/collection/components/co-color-picker/co-color-picker.js +932 -15
- package/dist/collection/components/co-color-picker/presets.js +113 -15
- package/dist/collection/components/co-column-picker/co-column-picker.js +2 -2
- 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.js +1 -1
- 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.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.js +2 -2
- package/dist/collection/components/co-date-time-picker/co-date-time-picker.css +128 -32
- package/dist/collection/components/co-date-time-picker/co-date-time-picker.js +142 -138
- package/dist/collection/components/co-drawer/co-drawer.css +99 -36
- package/dist/collection/components/co-drawer/co-drawer.js +19 -7
- 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-emoji-picker/co-emoji-picker.js +2 -2
- package/dist/collection/components/co-empty-state/co-empty-state.css +28 -0
- package/dist/collection/components/co-empty-state/co-empty-state.js +2 -2
- package/dist/collection/components/co-event-calendar/co-event-calendar.js +2 -2
- package/dist/collection/components/co-event-popover/co-event-popover.js +1 -1
- package/dist/collection/components/co-fab/co-fab.js +2 -2
- package/dist/collection/components/co-file-field/co-file-field.css +55 -2
- package/dist/collection/components/co-file-field/co-file-field.js +41 -13
- package/dist/collection/components/co-file-field/co-file-field.utils.js +51 -4
- 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 +40 -2
- package/dist/collection/components/co-icon-button/co-icon-button.js +43 -4
- package/dist/collection/components/co-input/co-input.css +33 -0
- package/dist/collection/components/co-input/co-input.js +25 -2
- package/dist/collection/components/co-json-field/co-json-field.js +3 -3
- package/dist/collection/components/co-lightbox/co-lightbox.css +23 -0
- package/dist/collection/components/co-lightbox/co-lightbox.js +209 -20
- package/dist/collection/components/co-list-footer/co-list-footer.js +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.js +67 -3
- package/dist/collection/components/co-modal/co-modal.css +106 -37
- package/dist/collection/components/co-modal/co-modal.js +4 -2
- package/dist/collection/components/co-navbar/co-navbar.css +4 -2
- package/dist/collection/components/co-navbar/co-navbar.js +2 -2
- package/dist/collection/components/co-number-field/co-number-field.css +22 -0
- package/dist/collection/components/co-number-field/co-number-field.js +216 -9
- package/dist/collection/components/co-option-list/co-option-list.css +25 -4
- package/dist/collection/components/co-option-list/co-option-list.js +26 -3
- package/dist/collection/components/co-overlay/co-overlay.js +5 -3
- package/dist/collection/components/co-page-header/co-page-header.js +1 -1
- package/dist/collection/components/co-phone-field/co-phone-field.js +1 -1
- package/dist/collection/components/co-popover/co-popover.css +18 -3
- package/dist/collection/components/co-popover/co-popover.js +83 -20
- 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.js +3 -3
- package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.css +14 -1
- package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.js +9 -6
- package/dist/collection/components/co-rich-text-toolbar/co-rich-text-toolbar.js +7 -3
- package/dist/collection/components/co-rich-text-viewer/co-rich-text-viewer.js +3 -2
- 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 +1 -1
- 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.css +2 -2
- package/dist/collection/components/co-sidebar-nav/co-sidebar-nav.js +1 -1
- package/dist/collection/components/co-skeleton/co-skeleton.css +18 -0
- package/dist/collection/components/co-skeleton/co-skeleton.js +83 -1
- package/dist/collection/components/co-slider/co-slider.js +2 -2
- package/dist/collection/components/co-switch/co-switch.css +3 -3
- 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.css +111 -0
- package/dist/collection/components/co-time-field/co-time-field.js +536 -0
- package/dist/collection/components/co-toast/co-toast.css +13 -7
- package/dist/collection/components/co-toast/co-toast.js +2 -2
- package/dist/collection/components/co-toggle-button/co-toggle-button.css +16 -11
- 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 +7 -1
- package/dist/collection/components/co-toggle-button-group/co-toggle-button-group.js +2 -2
- package/dist/collection/components/co-tooltip/co-tooltip.css +12 -1
- package/dist/collection/components/co-tooltip/co-tooltip.js +49 -16
- package/dist/collection/components/co-transfer-list/co-transfer-list.js +1 -1
- package/dist/collection/components/co-video/co-video.js +34 -9
- package/dist/collection/utils/amountText.js +95 -0
- package/dist/collection/utils/color.js +109 -3
- package/dist/collection/utils/colorPickerI18n.js +55 -0
- package/dist/collection/utils/dateI18n.js +36 -0
- package/dist/collection/utils/fileI18n.js +3 -0
- package/dist/collection/utils/positioning.js +37 -4
- package/dist/collection/utils/submenu.js +35 -0
- package/dist/components/co-accordion.js +1 -1
- package/dist/components/co-action-bar.js +1 -1
- package/dist/components/co-app-shell.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-badge.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.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-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.js +1 -1
- 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-emoji-picker.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.js +1 -1
- 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-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-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.d.ts +11 -0
- package/dist/components/co-time-field.js +1 -0
- 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-9ceBPSd1.js +1 -0
- package/dist/components/p-B1QFLcY9.js +1 -0
- package/dist/components/p-B2IsXte7.js +1 -0
- package/dist/components/p-B4NCaKrR.js +1 -0
- package/dist/components/p-BBP5__CY.js +1 -0
- package/dist/components/{p-Dabi98BI.js → p-BGDqldEg.js} +1 -1
- package/dist/components/p-BRbgGqLw.js +1 -0
- package/dist/components/p-Be_kyNRE.js +1 -0
- package/dist/components/{p-BL0sCfMH.js → p-Bryf3-Js.js} +1 -1
- package/dist/components/p-BsTO1uUA.js +1 -0
- package/dist/components/{p-CuZXTvDM.js → p-Bv6U5y3d.js} +1 -1
- package/dist/components/p-BxP8OBw6.js +1 -0
- package/dist/components/{p-P8wvwhM2.js → p-CFFDmGPS.js} +1 -1
- package/dist/components/{p-CA_JAK9s.js → p-CT2enQ6h.js} +1 -1
- package/dist/components/p-CXPRaTuo.js +1 -0
- package/dist/components/{p-D5EdMieb.js → p-Cl3AdEQJ.js} +1 -1
- package/dist/components/p-CnX3L8aF.js +1 -0
- package/dist/components/p-DFHRS9cJ.js +1 -0
- package/dist/components/p-DIo66nBr.js +1 -0
- package/dist/components/{p-Dj1EZ5qD.js → p-DNJAIVfI.js} +1 -1
- package/dist/{cobalt/p-WeuPA9Rw.js → components/p-DOL2zACE.js} +1 -1
- package/dist/components/p-DRP8D9ro.js +1 -0
- package/dist/components/p-DkDTmHCg.js +1 -0
- package/dist/components/{p-Bxk96Zgc.js → p-Du_CgT5E.js} +1 -1
- package/dist/components/{p-BHYtxTzM.js → p-HxVRXXXC.js} +1 -1
- package/dist/components/{p-B0Dc-I_C.js → p-NNxjElcX.js} +1 -1
- package/dist/components/p-gKnOhsd2.js +1 -0
- package/dist/components/p-jYd9gu_c.js +1 -0
- package/dist/components/{p-D4qzGifz.js → p-vby0ITbe.js} +1 -1
- package/dist/components/{p-D6OUW6oW.js → p-x4grh-eZ.js} +1 -1
- package/dist/esm/co-accordion.entry.js +1 -1
- package/dist/esm/co-action-bar.entry.js +1 -1
- package/dist/esm/co-app-shell.entry.js +4 -4
- package/dist/esm/co-audio-player.entry.js +1 -1
- package/dist/esm/co-autocomplete.entry.js +2 -2
- package/dist/esm/co-avatar-group.entry.js +1 -1
- package/dist/esm/co-avatar_2.entry.js +49 -17
- package/dist/esm/co-badge.entry.js +11 -3
- package/dist/esm/co-bottom-sheet.entry.js +1 -1
- package/dist/esm/co-breadcrumb-item.entry.js +1 -1
- package/dist/esm/co-breadcrumb.entry.js +1 -1
- package/dist/esm/co-button-group.entry.js +1 -1
- package/dist/esm/co-button.entry.js +2 -2
- package/dist/esm/co-calendar-month_2.entry.js +37 -2
- package/dist/esm/co-calendar_3.entry.js +27 -15
- package/dist/esm/co-card.entry.js +1 -1
- package/dist/esm/co-carousel-item.entry.js +1 -1
- package/dist/esm/co-carousel.entry.js +2 -2
- package/dist/esm/co-checkbox-group.entry.js +2 -2
- package/dist/esm/co-checkbox.entry.js +6 -6
- package/dist/esm/co-chip_2.entry.js +8 -5
- package/dist/esm/co-color-picker.entry.js +1048 -27
- package/dist/esm/co-column-picker.entry.js +3 -3
- package/dist/esm/co-combobox.entry.js +2 -2
- package/dist/esm/co-command-search.entry.js +1 -1
- package/dist/esm/co-data-table-pagination.entry.js +5 -5
- package/dist/esm/co-data-table.entry.js +1 -1
- package/dist/esm/co-date-picker.entry.js +3 -3
- package/dist/esm/co-date-range-picker.entry.js +3 -3
- package/dist/esm/co-date-range.entry.js +2 -2
- package/dist/esm/co-date-time-picker.entry.js +101 -130
- package/dist/esm/co-drive-card.entry.js +2 -2
- package/dist/esm/co-drop-zone.entry.js +2 -2
- package/dist/esm/co-emoji-picker.entry.js +4 -4
- package/dist/esm/co-empty-state.entry.js +4 -4
- package/dist/esm/co-event-calendar.entry.js +4 -4
- package/dist/esm/co-event-popover.entry.js +3 -3
- package/dist/esm/co-fab.entry.js +3 -3
- package/dist/esm/co-file-field.entry.js +95 -99
- 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 +6 -6
- package/dist/esm/co-icon.entry.js +3 -3
- package/dist/esm/co-input.entry.js +26 -4
- package/dist/esm/co-json-field.entry.js +5 -5
- package/dist/esm/co-lightbox.entry.js +204 -21
- package/dist/esm/co-list-footer.entry.js +2 -2
- package/dist/esm/co-list-item.entry.js +5 -5
- 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 +84 -3
- package/dist/esm/co-menu.entry.js +2 -2
- package/dist/esm/co-modal.entry.js +6 -4
- package/dist/esm/co-navbar.entry.js +4 -4
- package/dist/esm/co-number-field.entry.js +272 -9
- package/dist/esm/co-overlay.entry.js +6 -4
- package/dist/esm/co-page-header.entry.js +2 -2
- package/dist/esm/co-phone-field.entry.js +3 -3
- package/dist/esm/co-popover.entry.js +58 -21
- package/dist/esm/co-progress-bar.entry.js +3 -3
- package/dist/esm/co-progress-circle.entry.js +3 -3
- package/dist/esm/co-provider-logo_2.entry.js +47 -3
- package/dist/esm/co-radio-group.entry.js +1 -1
- package/dist/esm/co-radio.entry.js +4 -4
- package/dist/esm/co-rating.entry.js +4 -4
- package/dist/esm/co-ref-field.entry.js +4 -4
- package/dist/esm/co-rich-text-editor.entry.js +11 -8
- package/dist/esm/co-rich-text-toolbar.entry.js +7 -3
- package/dist/esm/co-rich-text-viewer.entry.js +4 -3
- 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 +2 -2
- package/dist/esm/co-separator.entry.js +2 -2
- package/dist/esm/co-sidebar-nav.entry.js +2 -2
- package/dist/esm/co-sidebar.entry.js +3 -3
- package/dist/esm/co-slider.entry.js +3 -3
- package/dist/esm/co-switch.entry.js +6 -6
- package/dist/esm/co-tab-group.entry.js +3 -3
- package/dist/esm/co-tab.entry.js +3 -3
- package/dist/esm/co-tags-field.entry.js +8 -8
- package/dist/esm/co-textarea.entry.js +6 -6
- package/dist/esm/co-time-field.entry.js +323 -0
- package/dist/esm/co-toast.entry.js +2 -2
- package/dist/esm/co-toggle-button-group.entry.js +4 -4
- package/dist/esm/co-toggle-button.entry.js +4 -4
- package/dist/esm/co-transfer-list.entry.js +1 -1
- package/dist/esm/co-video.entry.js +32 -7
- package/dist/esm/cobalt.js +3 -3
- package/dist/esm/color-BRbgGqLw.js +136 -0
- package/dist/esm/{dateI18n-CnNpoKwg.js → dateI18n-jYd9gu_c.js} +36 -0
- package/dist/esm/{fieldChip-DsAfq1e0.js → fieldChip-uyggU8VV.js} +1 -1
- package/dist/esm/fileI18n-gKnOhsd2.js +84 -0
- package/dist/esm/{index-RuXxdKzC.js → index-68iUQp5j.js} +28 -10
- package/dist/esm/{index-CrtiywTB.js → index-DH5lfRNj.js} +25 -21
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{positioning-BMdapAL8.js → positioning-DFHRS9cJ.js} +32 -13
- package/dist/esm/{requiredMark-DCD-ZA51.js → requiredMark-BCJUuZvC.js} +1 -1
- package/dist/esm/{toolbar-config-WeuPA9Rw.js → toolbar-config-DOL2zACE.js} +10 -0
- package/dist/types/components/co-badge/co-badge.d.ts +7 -0
- package/dist/types/components/co-checkbox/co-checkbox.d.ts +1 -1
- package/dist/types/components/co-color-picker/co-color-picker.d.ts +358 -4
- package/dist/types/components/co-color-picker/presets.d.ts +107 -4
- package/dist/types/components/co-date-time-picker/co-date-time-picker.d.ts +43 -21
- package/dist/types/components/co-drawer/co-drawer.d.ts +4 -3
- package/dist/types/components/co-file-field/co-file-field.d.ts +14 -0
- package/dist/types/components/co-file-field/co-file-field.utils.d.ts +18 -1
- package/dist/types/components/co-icon-button/co-icon-button.d.ts +9 -0
- package/dist/types/components/co-input/co-input.d.ts +4 -0
- package/dist/types/components/co-lightbox/co-lightbox.d.ts +60 -4
- package/dist/types/components/co-menu-item/co-menu-item.d.ts +16 -0
- package/dist/types/components/co-number-field/co-number-field.d.ts +42 -1
- package/dist/types/components/co-option-list/co-option-list.d.ts +3 -0
- package/dist/types/components/co-overlay/co-overlay.d.ts +4 -2
- package/dist/types/components/co-popover/co-popover.d.ts +16 -0
- package/dist/types/components/co-rich-text-toolbar/co-rich-text-toolbar.d.ts +1 -1
- package/dist/types/components/co-skeleton/co-skeleton.d.ts +13 -0
- package/dist/types/components/co-time-field/co-time-field.d.ts +60 -0
- package/dist/types/components/co-tooltip/co-tooltip.d.ts +5 -0
- package/dist/types/components/co-video/co-video.d.ts +4 -0
- package/dist/types/components.d.ts +451 -87
- package/dist/types/utils/amountText.d.ts +34 -0
- package/dist/types/utils/color.d.ts +44 -1
- package/dist/types/utils/colorPickerI18n.d.ts +26 -0
- package/dist/types/utils/dateI18n.d.ts +12 -0
- package/dist/types/utils/fileI18n.d.ts +1 -0
- package/dist/types/utils/positioning.d.ts +10 -0
- package/dist/types/utils/submenu.d.ts +44 -0
- package/package.json +3 -3
- package/dist/cjs/color-YhUkm10t.js +0 -32
- package/dist/cjs/time-LBHtzLHe.js +0 -42
- package/dist/cobalt/p-07904986.entry.js +0 -1
- package/dist/cobalt/p-09799193.entry.js +0 -1
- package/dist/cobalt/p-17ae943c.entry.js +0 -1
- package/dist/cobalt/p-23a103a0.entry.js +0 -1
- package/dist/cobalt/p-2f88d151.entry.js +0 -1
- package/dist/cobalt/p-3495fda1.entry.js +0 -1
- package/dist/cobalt/p-409f28bb.entry.js +0 -1
- package/dist/cobalt/p-682b3313.entry.js +0 -1
- package/dist/cobalt/p-6bf814f9.entry.js +0 -1
- package/dist/cobalt/p-7532c739.entry.js +0 -1
- package/dist/cobalt/p-7c88163e.entry.js +0 -1
- package/dist/cobalt/p-7cf4b4ae.entry.js +0 -1
- package/dist/cobalt/p-7ea87b75.entry.js +0 -1
- package/dist/cobalt/p-8183f56f.entry.js +0 -1
- package/dist/cobalt/p-8345b25f.entry.js +0 -1
- package/dist/cobalt/p-983af614.entry.js +0 -1
- package/dist/cobalt/p-BG4WRR22.js +0 -1
- package/dist/cobalt/p-BMdapAL8.js +0 -1
- package/dist/cobalt/p-CF8OB_TM.js +0 -1
- package/dist/cobalt/p-CnNpoKwg.js +0 -1
- package/dist/cobalt/p-T4la7ly_.js +0 -1
- package/dist/cobalt/p-a2d31248.entry.js +0 -1
- package/dist/cobalt/p-a6b5cadd.entry.js +0 -1
- package/dist/cobalt/p-b8581787.entry.js +0 -1
- package/dist/cobalt/p-bcedbd73.entry.js +0 -1
- package/dist/cobalt/p-d40a465f.entry.js +0 -1
- package/dist/cobalt/p-dea43204.entry.js +0 -1
- package/dist/cobalt/p-dfcf667d.entry.js +0 -1
- package/dist/cobalt/p-e6882ddd.entry.js +0 -1
- package/dist/cobalt/p-e84eda2e.entry.js +0 -1
- package/dist/cobalt/p-f25967fb.entry.js +0 -1
- package/dist/cobalt/p-f5f1b463.entry.js +0 -1
- package/dist/cobalt/p-fd39f410.entry.js +0 -1
- package/dist/cobalt/p-mAGnZXRn.js +0 -1
- package/dist/components/p-BMdapAL8.js +0 -1
- package/dist/components/p-BTQEg3UO.js +0 -1
- package/dist/components/p-Bbny3WUc.js +0 -1
- package/dist/components/p-Bz0QZqnB.js +0 -1
- package/dist/components/p-CF8OB_TM.js +0 -1
- package/dist/components/p-CR0izsJC.js +0 -1
- package/dist/components/p-CnNpoKwg.js +0 -1
- package/dist/components/p-DI1ek0EB.js +0 -1
- package/dist/components/p-DP0bbhfN.js +0 -1
- package/dist/components/p-D_9BRkj6.js +0 -1
- package/dist/components/p-DbipMAyT.js +0 -1
- package/dist/components/p-DgUBcJIS.js +0 -1
- package/dist/components/p-DolCkNsL.js +0 -1
- package/dist/components/p-hfGFsvaD.js +0 -1
- package/dist/esm/color-BG4WRR22.js +0 -30
- package/dist/esm/time-CF8OB_TM.js +0 -37
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var dateI18n = require('./dateI18n-
|
|
3
|
+
var index = require('./index-MDAnKsze.js');
|
|
4
|
+
var dateI18n = require('./dateI18n-BK2qHqoC.js');
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Built-in UI string dictionary for co-lightbox (aria labels + tooltips).
|
|
@@ -45,7 +45,7 @@ function getLightboxStrings(locale) {
|
|
|
45
45
|
return DICT[dateI18n.langFromLocale(locale)];
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
const coLightboxCss = () => `:host{display:contents;font-family:var(--co-font-family-primary)}.co-lightbox{position:fixed;inset:0;margin:0;border:0;padding:0;width:auto;height:auto;overflow:visible;color:inherit;z-index:1100;display:flex;align-items:center;justify-content:center;background:var(--co-color-opacity-negro-80);opacity:0;pointer-events:none;transition:opacity var(--co-motion-duration-base) var(--co-motion-ease-out)}.co-lightbox--open{opacity:1;pointer-events:auto}.co-lightbox__toolbar{position:absolute;top:0;left:0;right:0;z-index:2;display:flex;align-items:center;gap:var(--co-spacing-sm2);padding:var(--co-spacing-md) var(--co-spacing-lg);background:linear-gradient(var(--co-color-opacity-negro-50), transparent)}.co-lightbox__caption{flex:1;min-width:0;color:var(--co-color-base-blanco);font-size:var(--co-font-size-14);line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.co-lightbox__zoom{display:flex;align-items:center;gap:var(--co-spacing-xxs);padding:0 var(--co-spacing-xs);border-radius:var(--co-border-radius-full);background:var(--co-color-opacity-blanco-8)}.co-lightbox__btn{display:flex;align-items:center;justify-content:center;min-width:32px;height:32px;padding:0 var(--co-spacing-xs);border:none;border-radius:var(--co-border-radius-full);background:transparent;color:var(--co-color-base-blanco);font-family:inherit;font-size:var(--co-font-size-13, 13px);cursor:pointer;transition:background var(--co-motion-duration-fast) var(--co-motion-ease-out)}.co-lightbox__btn:hover{background:var(--co-color-opacity-blanco-16)}.co-lightbox__zoom-value{min-width:48px;font-variant-numeric:tabular-nums}.co-lightbox__stage{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;overflow:hidden;touch-action:none}.co-lightbox__img{max-width:calc(100vw - var(--co-spacing-5xl) * 2);max-height:calc(100vh - var(--co-spacing-5xl) * 2);border-radius:var(--co-border-radius-xs);user-select:none;transition:transform var(--co-motion-duration-base) var(--co-motion-ease-out)}.co-lightbox__img--zoomed{cursor:grab}.co-lightbox__img--dragging{cursor:grabbing;transition:none}.co-lightbox__nav{position:absolute;top:50%;transform:translateY(-50%);z-index:2;display:flex;align-items:center;justify-content:center;width:44px;height:44px;border:none;border-radius:var(--co-border-radius-full);background:var(--co-color-opacity-blanco-8);color:var(--co-color-base-blanco);cursor:pointer;transition:background var(--co-motion-duration-fast) var(--co-motion-ease-out)}.co-lightbox__nav:hover{background:var(--co-color-opacity-blanco-25)}.co-lightbox__nav--prev{left:var(--co-spacing-lg)}.co-lightbox__nav--next{right:var(--co-spacing-lg)}.co-lightbox__counter{position:absolute;bottom:var(--co-spacing-lg);left:50%;transform:translateX(-50%);z-index:2;padding:var(--co-spacing-xs) var(--co-spacing-md);border-radius:var(--co-border-radius-full);background:var(--co-color-opacity-blanco-8);color:var(--co-color-base-blanco);font-size:var(--co-font-size-13, 13px);font-variant-numeric:tabular-nums}`;
|
|
48
|
+
const coLightboxCss = () => `:host{display:contents;font-family:var(--co-font-family-primary)}.co-lightbox{position:fixed;inset:0;margin:0;border:0;padding:0;width:auto;height:auto;overflow:visible;color:inherit;z-index:1100;display:flex;align-items:center;justify-content:center;background:var(--co-color-opacity-negro-80);opacity:0;pointer-events:none;transition:opacity var(--co-motion-duration-base) var(--co-motion-ease-out)}.co-lightbox--open{opacity:1;pointer-events:auto}.co-lightbox__toolbar{position:absolute;top:0;left:0;right:0;z-index:2;display:flex;align-items:center;gap:var(--co-spacing-sm2);padding:var(--co-spacing-md) var(--co-spacing-lg);background:linear-gradient(var(--co-color-opacity-negro-50), transparent)}.co-lightbox__caption{flex:1;min-width:0;color:var(--co-color-base-blanco);font-size:var(--co-font-size-14);line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.co-lightbox__zoom{display:flex;align-items:center;gap:var(--co-spacing-xxs);padding:0 var(--co-spacing-xs);border-radius:var(--co-border-radius-full);background:var(--co-color-opacity-blanco-8)}.co-lightbox__btn{display:flex;align-items:center;justify-content:center;min-width:32px;height:32px;padding:0 var(--co-spacing-xs);border:none;border-radius:var(--co-border-radius-full);background:transparent;color:var(--co-color-base-blanco);font-family:inherit;font-size:var(--co-font-size-13, 13px);cursor:pointer;transition:background var(--co-motion-duration-fast) var(--co-motion-ease-out)}.co-lightbox__btn:hover{background:var(--co-color-opacity-blanco-16)}.co-lightbox__zoom-value{min-width:48px;font-variant-numeric:tabular-nums}.co-lightbox__stage{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;overflow:hidden;touch-action:none}.co-lightbox__img{max-width:calc(100vw - var(--co-spacing-5xl) * 2);max-height:calc(100vh - var(--co-spacing-5xl) * 2);border-radius:var(--co-border-radius-xs);user-select:none;transition:transform var(--co-motion-duration-base) var(--co-motion-ease-out)}.co-lightbox__video{--co-lb-ar:1.7778;flex:0 0 auto;width:auto;aspect-ratio:var(--co-lb-ar);height:min( calc(100vh - var(--co-spacing-5xl) * 2), calc((100vw - var(--co-spacing-5xl) * 2) / var(--co-lb-ar)), calc(1200px / var(--co-lb-ar)) );border-radius:var(--co-border-radius-xs);overflow:hidden}.co-lightbox__img--zoomed{cursor:grab}.co-lightbox__img--dragging{cursor:grabbing;transition:none}.co-lightbox__nav{position:absolute;top:50%;transform:translateY(-50%);z-index:2;display:flex;align-items:center;justify-content:center;width:44px;height:44px;border:none;border-radius:var(--co-border-radius-full);background:var(--co-color-opacity-blanco-8);color:var(--co-color-base-blanco);cursor:pointer;transition:background var(--co-motion-duration-fast) var(--co-motion-ease-out)}.co-lightbox__nav:hover{background:var(--co-color-opacity-blanco-25)}.co-lightbox__nav--prev{left:var(--co-spacing-lg)}.co-lightbox__nav--next{right:var(--co-spacing-lg)}.co-lightbox__counter{position:absolute;bottom:var(--co-spacing-lg);left:50%;transform:translateX(-50%);z-index:2;padding:var(--co-spacing-xs) var(--co-spacing-md);border-radius:var(--co-border-radius-full);background:var(--co-color-opacity-blanco-8);color:var(--co-color-base-blanco);font-size:var(--co-font-size-13, 13px);font-variant-numeric:tabular-nums}`;
|
|
49
49
|
|
|
50
50
|
const MIN_SCALE = 1;
|
|
51
51
|
const MAX_SCALE = 8;
|
|
@@ -100,10 +100,32 @@ const CoLightbox = class {
|
|
|
100
100
|
this.handleKey = (e) => {
|
|
101
101
|
if (!this.open)
|
|
102
102
|
return;
|
|
103
|
+
if (e.key === 'Escape') {
|
|
104
|
+
// This Escape belongs to something else — the browser leaving fullscreen,
|
|
105
|
+
// or the player closing its speed menu. Either way the viewer must NOT
|
|
106
|
+
// close... and must still swallow the event: an ancestor co-drawer also
|
|
107
|
+
// listens for Escape on document, so merely returning here would close
|
|
108
|
+
// THAT instead, tearing down the drawer (and its unsaved edits) under a
|
|
109
|
+
// user who only wanted to leave fullscreen.
|
|
110
|
+
if (this.escapeBelongsToPlayer()) {
|
|
111
|
+
e.stopPropagation();
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
this.requestClose();
|
|
115
|
+
e.preventDefault();
|
|
116
|
+
e.stopPropagation();
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
if (e.key === 'Tab') {
|
|
120
|
+
this.trapTab(e);
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
// While the player holds focus it owns the keyboard — space toggles play,
|
|
124
|
+
// arrows seek. Stealing those would leave the video keyboard-operable
|
|
125
|
+
// everywhere except when the user is actually inside it.
|
|
126
|
+
if (this.isFocusInPlayer())
|
|
127
|
+
return;
|
|
103
128
|
switch (e.key) {
|
|
104
|
-
case 'Escape':
|
|
105
|
-
this.requestClose();
|
|
106
|
-
break;
|
|
107
129
|
case 'ArrowLeft':
|
|
108
130
|
this.goTo(-1);
|
|
109
131
|
break;
|
|
@@ -112,17 +134,20 @@ const CoLightbox = class {
|
|
|
112
134
|
break;
|
|
113
135
|
case '+':
|
|
114
136
|
case '=':
|
|
137
|
+
if (this.isVideoSlide)
|
|
138
|
+
return;
|
|
115
139
|
this.zoomAt(this.scale * WHEEL_FACTOR, 0, 0);
|
|
116
140
|
break;
|
|
117
141
|
case '-':
|
|
142
|
+
if (this.isVideoSlide)
|
|
143
|
+
return;
|
|
118
144
|
this.zoomAt(this.scale / WHEEL_FACTOR, 0, 0);
|
|
119
145
|
break;
|
|
120
146
|
case '0':
|
|
147
|
+
if (this.isVideoSlide)
|
|
148
|
+
return;
|
|
121
149
|
this.resetView();
|
|
122
150
|
break;
|
|
123
|
-
case 'Tab':
|
|
124
|
-
this.trapTab(e);
|
|
125
|
-
return;
|
|
126
151
|
default:
|
|
127
152
|
return; // unhandled keys pass through untouched
|
|
128
153
|
}
|
|
@@ -132,6 +157,27 @@ const CoLightbox = class {
|
|
|
132
157
|
this.requestClose = () => {
|
|
133
158
|
this.coClose.emit();
|
|
134
159
|
};
|
|
160
|
+
// ── Video slide ───────────────────────────────────────────────────
|
|
161
|
+
this.mountPlayer = (el) => {
|
|
162
|
+
if (!el || el === this.playerEl)
|
|
163
|
+
return;
|
|
164
|
+
this.playerEl = el;
|
|
165
|
+
this.tryAutoplay();
|
|
166
|
+
};
|
|
167
|
+
/**
|
|
168
|
+
* Ajusta la caja del slide al frame real. Sin esto el player es un rectángulo
|
|
169
|
+
* FIJO (ancho tope × alto tope) y el `object-fit: contain` deja franjas negras
|
|
170
|
+
* a los costados: en un vertical — el caso típico, una grabación de pantalla —
|
|
171
|
+
* la losa negra tapa media pantalla y se traga los clicks que el usuario dirige
|
|
172
|
+
* al scrim para cerrar.
|
|
173
|
+
*/
|
|
174
|
+
this.handlePlayerReady = (e) => {
|
|
175
|
+
var _a;
|
|
176
|
+
const { width, height } = e.detail || {};
|
|
177
|
+
if (!width || !height)
|
|
178
|
+
return; // el navegador todavía no sabe el tamaño
|
|
179
|
+
(_a = this.playerEl) === null || _a === void 0 ? void 0 : _a.style.setProperty('--co-lb-ar', String(width / height));
|
|
180
|
+
};
|
|
135
181
|
this.handleWheel = (e) => {
|
|
136
182
|
e.preventDefault();
|
|
137
183
|
const [px, py] = this.stagePoint(e);
|
|
@@ -172,6 +218,14 @@ const CoLightbox = class {
|
|
|
172
218
|
};
|
|
173
219
|
this.stop = (e) => e.stopPropagation();
|
|
174
220
|
}
|
|
221
|
+
get activeItem() {
|
|
222
|
+
return this.parsedImages[this.index];
|
|
223
|
+
}
|
|
224
|
+
/** Zoom, pan and the toolbar's zoom cluster are all gated on this. */
|
|
225
|
+
get isVideoSlide() {
|
|
226
|
+
var _a;
|
|
227
|
+
return ((_a = this.activeItem) === null || _a === void 0 ? void 0 : _a.kind) === 'video';
|
|
228
|
+
}
|
|
175
229
|
get parsedImages() {
|
|
176
230
|
const raw = this.images;
|
|
177
231
|
if (typeof raw !== 'string' || !raw.trim())
|
|
@@ -193,6 +247,12 @@ const CoLightbox = class {
|
|
|
193
247
|
}
|
|
194
248
|
componentWillLoad() {
|
|
195
249
|
this.index = this.clampIndex(this.startIndex);
|
|
250
|
+
// Hosts that create the viewer imperatively flip `open` on the next frame,
|
|
251
|
+
// which lands BEFORE the lazy chunk hydrates — and Stencil skips @Watch
|
|
252
|
+
// callbacks fired before the instance exists, so `onOpenChange` never runs
|
|
253
|
+
// on that path (same reason connectedCallback re-checks `open` below).
|
|
254
|
+
// Seeding here is what makes a viewer opened straight onto a video play.
|
|
255
|
+
this.pendingAutoplay = this.open;
|
|
196
256
|
}
|
|
197
257
|
connectedCallback() {
|
|
198
258
|
if (this.open)
|
|
@@ -200,6 +260,7 @@ const CoLightbox = class {
|
|
|
200
260
|
}
|
|
201
261
|
disconnectedCallback() {
|
|
202
262
|
this.detachKeyListener();
|
|
263
|
+
this.pauseVideo();
|
|
203
264
|
clearTimeout(this.demoteTimer);
|
|
204
265
|
}
|
|
205
266
|
componentDidRender() {
|
|
@@ -217,12 +278,19 @@ const CoLightbox = class {
|
|
|
217
278
|
this.resetView();
|
|
218
279
|
this.preloadNeighbors();
|
|
219
280
|
this.attachKeyListener();
|
|
281
|
+
this.pendingAutoplay = true;
|
|
282
|
+
this.tryAutoplay();
|
|
220
283
|
// aria-modal dialog: move focus in on open, restore it on close.
|
|
221
284
|
this.previouslyFocused = (_a = document.activeElement) !== null && _a !== void 0 ? _a : undefined;
|
|
222
285
|
this.pendingFocus = true;
|
|
223
286
|
}
|
|
224
287
|
else {
|
|
225
288
|
this.detachKeyListener();
|
|
289
|
+
// The host fades the viewer out before dropping the node; a video left
|
|
290
|
+
// playing keeps its audio going through the whole fade (and beyond, if
|
|
291
|
+
// the node is detached rather than removed).
|
|
292
|
+
this.pauseVideo();
|
|
293
|
+
this.pendingAutoplay = false;
|
|
226
294
|
(_c = (_b = this.previouslyFocused) === null || _b === void 0 ? void 0 : _b.focus) === null || _c === void 0 ? void 0 : _c.call(_b);
|
|
227
295
|
this.previouslyFocused = undefined;
|
|
228
296
|
}
|
|
@@ -247,18 +315,66 @@ const CoLightbox = class {
|
|
|
247
315
|
detachKeyListener() {
|
|
248
316
|
window.removeEventListener('keydown', this.handleKey, { capture: true });
|
|
249
317
|
}
|
|
250
|
-
/**
|
|
251
|
-
|
|
318
|
+
/**
|
|
319
|
+
* Minimal focus trap: Tab cycles through the viewer's own buttons — plus the
|
|
320
|
+
* player's, on a video slide. A shadow root is opaque to `querySelectorAll`,
|
|
321
|
+
* so co-video's controls have to be pulled in explicitly; without this the
|
|
322
|
+
* trap would cycle around the player and its play/seek would be unreachable
|
|
323
|
+
* by keyboard. (Safe because the viewer pins the controls visible: an
|
|
324
|
+
* auto-hidden control bar is `opacity: 0` and would take focus invisibly.)
|
|
325
|
+
*/
|
|
326
|
+
focusables() {
|
|
327
|
+
var _a, _b;
|
|
328
|
+
const nodes = Array.from((_b = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('button, co-video')) !== null && _b !== void 0 ? _b : []);
|
|
329
|
+
return nodes.flatMap((el) => {
|
|
330
|
+
var _a, _b;
|
|
331
|
+
return el.tagName === 'CO-VIDEO'
|
|
332
|
+
? // `button` alone is not enough: the seek bar and the volume slider are
|
|
333
|
+
// `role="slider"` divs, and the player's own keyboard shortcuts live on
|
|
334
|
+
// its `role="region"` container — all three are tabindex 0, and all
|
|
335
|
+
// three would be skipped by a button-only sweep.
|
|
336
|
+
// `:not([tabindex="-1"])` importa: co-video marca así su overlay de
|
|
337
|
+
// play grande, que se DESMONTA al activarse — enfocarlo tira el foco
|
|
338
|
+
// fuera del visor en el mismo gesto.
|
|
339
|
+
Array.from((_b = (_a = el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('button:not([tabindex="-1"]), [tabindex="0"]')) !== null && _b !== void 0 ? _b : [])
|
|
340
|
+
: [el];
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
/** Deepest focused element, walking down through nested shadow roots. */
|
|
344
|
+
deepActive() {
|
|
252
345
|
var _a, _b, _c;
|
|
253
|
-
|
|
346
|
+
let a = (_b = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.activeElement) !== null && _b !== void 0 ? _b : null;
|
|
347
|
+
while ((_c = a === null || a === void 0 ? void 0 : a.shadowRoot) === null || _c === void 0 ? void 0 : _c.activeElement)
|
|
348
|
+
a = a.shadowRoot.activeElement;
|
|
349
|
+
return a;
|
|
350
|
+
}
|
|
351
|
+
/** True while the player owns this Escape: it is fullscreen (co-video enters
|
|
352
|
+
* through the webkit-prefixed API where that is all Safari has, so both
|
|
353
|
+
* spellings are checked), or its speed menu is open on top of it. */
|
|
354
|
+
escapeBelongsToPlayer() {
|
|
355
|
+
var _a, _b;
|
|
356
|
+
const doc = document;
|
|
357
|
+
if (doc.fullscreenElement || doc.webkitFullscreenElement)
|
|
358
|
+
return true;
|
|
359
|
+
return !!((_b = (_a = this.playerEl) === null || _a === void 0 ? void 0 : _a.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('.co-video__speed-menu'));
|
|
360
|
+
}
|
|
361
|
+
isFocusInPlayer() {
|
|
362
|
+
var _a;
|
|
363
|
+
const player = this.playerEl;
|
|
364
|
+
return !!player && ((_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.activeElement) === player;
|
|
365
|
+
}
|
|
366
|
+
trapTab(e) {
|
|
367
|
+
const focusables = this.focusables();
|
|
254
368
|
if (focusables.length === 0)
|
|
255
369
|
return;
|
|
256
370
|
e.preventDefault();
|
|
257
371
|
e.stopPropagation();
|
|
258
|
-
const active = (_c = this.el.shadowRoot) === null || _c === void 0 ? void 0 : _c.activeElement;
|
|
259
|
-
const i = focusables.indexOf(active);
|
|
260
372
|
const delta = e.shiftKey ? -1 : 1;
|
|
261
|
-
const
|
|
373
|
+
const i = focusables.indexOf(this.deepActive());
|
|
374
|
+
// Sin foco previo (i === -1) el módulo daría el ANTEÚLTIMO con Shift+Tab.
|
|
375
|
+
const next = i < 0
|
|
376
|
+
? focusables[delta > 0 ? 0 : focusables.length - 1]
|
|
377
|
+
: focusables[(i + delta + focusables.length) % focusables.length];
|
|
262
378
|
next.focus();
|
|
263
379
|
}
|
|
264
380
|
clampIndex(i) {
|
|
@@ -277,6 +393,9 @@ const CoLightbox = class {
|
|
|
277
393
|
const n = this.parsedImages.length;
|
|
278
394
|
if (n < 2)
|
|
279
395
|
return;
|
|
396
|
+
this.pauseVideo();
|
|
397
|
+
// From here on the user is driving: nothing plays unless they press play.
|
|
398
|
+
this.pendingAutoplay = false;
|
|
280
399
|
this.index = (this.index + delta + n) % n;
|
|
281
400
|
this.resetView();
|
|
282
401
|
this.coChange.emit(this.index);
|
|
@@ -288,8 +407,65 @@ const CoLightbox = class {
|
|
|
288
407
|
return;
|
|
289
408
|
for (const d of [1, -1]) {
|
|
290
409
|
const neighbor = imgs[(this.index + d + imgs.length) % imgs.length];
|
|
291
|
-
if (neighbor
|
|
292
|
-
|
|
410
|
+
if (!neighbor)
|
|
411
|
+
continue;
|
|
412
|
+
// A video's `src` is the media: pushing it through `new Image()` would
|
|
413
|
+
// download the whole file only to fail at decode. Its poster is what
|
|
414
|
+
// the slide paints first, so that is what's worth having warm.
|
|
415
|
+
const src = neighbor.kind === 'video' ? neighbor.poster : neighbor.src;
|
|
416
|
+
if (src)
|
|
417
|
+
new Image().src = src;
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* Autoplay rides the click that opened the viewer instead of co-video's own
|
|
422
|
+
* `autoplay` prop, which only fires when muted — and a silent video reads as
|
|
423
|
+
* a broken one. If the browser refuses the unmuted start (Safari), the
|
|
424
|
+
* rejection is swallowed and the player simply waits on its play button.
|
|
425
|
+
*
|
|
426
|
+
* Called from BOTH sides of a race: the player mounts on the first render,
|
|
427
|
+
* which hosts do while still closed (co-file-field fades the viewer in on
|
|
428
|
+
* the next frame), so `open` usually arrives second — but a host that
|
|
429
|
+
* renders the viewer already open flips the order.
|
|
430
|
+
*/
|
|
431
|
+
tryAutoplay() {
|
|
432
|
+
var _a;
|
|
433
|
+
if (!this.pendingAutoplay || !this.open)
|
|
434
|
+
return;
|
|
435
|
+
if (!this.isVideoSlide) {
|
|
436
|
+
// Opened onto an image: the chance is SPENT, not saved. Leaving the flag
|
|
437
|
+
// armed would make the first video the user arrows to start by itself.
|
|
438
|
+
this.pendingAutoplay = false;
|
|
439
|
+
return;
|
|
440
|
+
}
|
|
441
|
+
const player = this.playerEl;
|
|
442
|
+
if (!player)
|
|
443
|
+
return;
|
|
444
|
+
this.pendingAutoplay = false;
|
|
445
|
+
Promise.resolve((_a = player.componentOnReady) === null || _a === void 0 ? void 0 : _a.call(player))
|
|
446
|
+
.then(() => {
|
|
447
|
+
var _a;
|
|
448
|
+
// Revalidar: entre el click y el chunk lazy de co-video puede pasar
|
|
449
|
+
// cualquier cosa — el usuario cierra el visor o flecha a otro slide, y
|
|
450
|
+
// un play() a ciegas deja audio sonando sobre una pantalla que ya no
|
|
451
|
+
// muestra ese video (o que ya no muestra nada).
|
|
452
|
+
if (!this.open || this.playerEl !== player || !this.isVideoSlide)
|
|
453
|
+
return;
|
|
454
|
+
return (_a = player.play) === null || _a === void 0 ? void 0 : _a.call(player);
|
|
455
|
+
})
|
|
456
|
+
.catch(() => {
|
|
457
|
+
/* blocked by the autoplay policy — the play button takes over */
|
|
458
|
+
});
|
|
459
|
+
}
|
|
460
|
+
pauseVideo() {
|
|
461
|
+
var _a, _b;
|
|
462
|
+
try {
|
|
463
|
+
const p = (_b = (_a = this.playerEl) === null || _a === void 0 ? void 0 : _a.pause) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
464
|
+
if (p && typeof p.catch === 'function')
|
|
465
|
+
p.catch(() => { });
|
|
466
|
+
}
|
|
467
|
+
catch (_c) {
|
|
468
|
+
/* not hydrated yet — nothing is playing either */
|
|
293
469
|
}
|
|
294
470
|
}
|
|
295
471
|
// ── Zoom / pan ────────────────────────────────────────────────
|
|
@@ -338,20 +514,27 @@ const CoLightbox = class {
|
|
|
338
514
|
const imgs = this.parsedImages;
|
|
339
515
|
const img = imgs[this.index];
|
|
340
516
|
const multi = imgs.length > 1;
|
|
517
|
+
const video = (img === null || img === void 0 ? void 0 : img.kind) === 'video';
|
|
341
518
|
const counter = s.counter
|
|
342
519
|
.replace('{i}', String(this.index + 1))
|
|
343
520
|
.replace('{n}', String(imgs.length));
|
|
344
|
-
return (index.h("div", { key: '
|
|
521
|
+
return (index.h("div", { key: '1a3c29e98fd491c92b82ba9d9296588609cdd006', class: { 'co-lightbox': true, 'co-lightbox--open': this.open }, part: "overlay", role: "dialog", "aria-modal": "true", "aria-label": img === null || img === void 0 ? void 0 : img.alt, popover: "manual", ref: this.syncTopLayer, onClick: this.requestClose }, img && (index.h("div", { key: 'cc9e9db83ef082deab744f259c4da63a58eb0c3b', class: "co-lightbox__toolbar", part: "toolbar", onClick: this.stop }, index.h("span", { key: 'ab3fa42e21008407f2cab377566a1793a96a8a50', class: "co-lightbox__caption", title: img.alt }, img.alt), !video && (index.h("div", { key: 'af8761111e7c5e0e7a838d8e69971cc2863ee9d4', class: "co-lightbox__zoom" }, index.h("button", { key: 'e73628b4fd25fa7c3ed9ca947fccd196e6433f84', class: "co-lightbox__btn", type: "button", "aria-label": s.zoomOut, title: s.zoomOut, onClick: () => this.zoomAt(this.scale / WHEEL_FACTOR, 0, 0) }, index.h("co-icon", { key: '371f4edc5141561b348ce36a8791fb81500248fa', name: "minus", size: 16 })), index.h("button", { key: 'e07adc772687ef65d97db5669ed235749e43c034', class: "co-lightbox__btn co-lightbox__zoom-value", type: "button", "aria-label": s.zoomReset, title: s.zoomReset, onClick: () => this.resetView() }, Math.round(this.scale * 100), "%"), index.h("button", { key: '29ed305a4f464e38c4b4ef331dbbfc35aa6fdc95', class: "co-lightbox__btn", type: "button", "aria-label": s.zoomIn, title: s.zoomIn, onClick: () => this.zoomAt(this.scale * WHEEL_FACTOR, 0, 0) }, index.h("co-icon", { key: '6b56559a4dad36bee62545deb426734450f64f58', name: "plus", size: 16 })))), index.h("button", { key: '53099c4e3dec82cfc9087e89916154ef4a8845f6', class: "co-lightbox__btn", type: "button", "aria-label": s.openOriginal, title: s.openOriginal, onClick: this.openOriginal }, index.h("co-icon", { key: 'de160ed313ba0559cd1523f9f73fad7e3b167848', name: "arrow-square-out", size: 16 })), index.h("button", { key: 'd1658ff7b8d0fc22f1a489c0138a16077304a165', class: "co-lightbox__btn", part: "close", type: "button", "aria-label": s.close, title: s.close, ref: (el) => (this.closeBtnEl = el), onClick: this.requestClose }, index.h("co-icon", { key: 'fcbcbbf6001e67199b6ec7b99bde5f9f24537ca0', name: "x", size: 16 })))), img && (index.h("div", { key: '39cef6c2bd1bf3fe9f641778b48b618a62f1b5f8', class: "co-lightbox__stage", ref: (el) => (this.stageEl = el), onWheel: video ? undefined : this.handleWheel }, video ? (index.h("co-video", { class: "co-lightbox__video", part: "video",
|
|
522
|
+
/* Keyed per slide: a fresh player is the only way to be sure
|
|
523
|
+
poster, error state and playback all start clean. */
|
|
524
|
+
key: `video-${this.index}`, ref: this.mountPlayer, src: img.src, poster: img.poster || '', aspectRatio: "auto", rounded: "none",
|
|
525
|
+
/* Auto-hiding controls go `opacity: 0` while staying
|
|
526
|
+
focusable — invisible focus in a viewer that traps Tab. */
|
|
527
|
+
controlsAutoHide: false, showSpeed: true, showPip: true, locale: dateI18n.langFromLocale(this.locale), onCoReady: this.handlePlayerReady, onClick: this.stop })) : (index.h("img", { class: {
|
|
345
528
|
'co-lightbox__img': true,
|
|
346
529
|
'co-lightbox__img--zoomed': this.scale > MIN_SCALE,
|
|
347
530
|
'co-lightbox__img--dragging': this.dragging,
|
|
348
|
-
}, part: "image", ref: (el) => (this.imgEl = el), src: img.src, alt: img.alt || '', draggable: false, style: { transform: `translate(${this.tx}px, ${this.ty}px) scale(${this.scale})` }, onClick: this.stop, onDblClick: this.handleDblClick, onPointerDown: this.handlePointerDown, onPointerMove: this.handlePointerMove, onPointerUp: this.handlePointerUp, onPointerCancel: this.handlePointerUp }))), img && multi && (index.h("button", { key: '
|
|
531
|
+
}, part: "image", ref: (el) => (this.imgEl = el), src: img.src, alt: img.alt || '', draggable: false, style: { transform: `translate(${this.tx}px, ${this.ty}px) scale(${this.scale})` }, onClick: this.stop, onDblClick: this.handleDblClick, onPointerDown: this.handlePointerDown, onPointerMove: this.handlePointerMove, onPointerUp: this.handlePointerUp, onPointerCancel: this.handlePointerUp })))), img && multi && (index.h("button", { key: 'a161402e30021374f608755ea0a5dc6ccee0e99a', class: "co-lightbox__nav co-lightbox__nav--prev", part: "prev", type: "button", "aria-label": s.prevImage, title: s.prevImage, onClick: (e) => {
|
|
349
532
|
e.stopPropagation();
|
|
350
533
|
this.goTo(-1);
|
|
351
|
-
} }, index.h("co-icon", { key: '
|
|
534
|
+
} }, index.h("co-icon", { key: '649171d5330299b3ccb368bb0b434c643157c3f5', name: "caret-left", size: 24 }))), img && multi && (index.h("button", { key: '5cc5d07467e1ecf9c27094947ce421c28c35472d', class: "co-lightbox__nav co-lightbox__nav--next", part: "next", type: "button", "aria-label": s.nextImage, title: s.nextImage, onClick: (e) => {
|
|
352
535
|
e.stopPropagation();
|
|
353
536
|
this.goTo(1);
|
|
354
|
-
} }, index.h("co-icon", { key: '
|
|
537
|
+
} }, index.h("co-icon", { key: 'd9d32607a6b4350009db5c1719987aa8afcbb007', name: "caret-right", size: 24 }))), img && multi && (index.h("div", { key: 'a23f10a2c9d82c4295285feeedfbe0d9016f4db0', class: "co-lightbox__counter", part: "counter", onClick: this.stop }, counter))));
|
|
355
538
|
}
|
|
356
539
|
get el() { return index.getElement(this); }
|
|
357
540
|
static get watchers() { return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-MDAnKsze.js');
|
|
4
4
|
|
|
5
5
|
const coListFooterCss = () => `:host{display:block}.co-list-footer{display:flex;gap:var(--co-spacing-sm2);padding-top:var(--co-spacing-sm2)}.co-list-footer__btn{flex:1;display:flex;align-items:center;justify-content:center;gap:var(--co-spacing-sm);padding:var(--co-spacing-sm2) var(--co-spacing-md);border-radius:var(--co-border-radius-xs);font-family:var(--co-font-family-primary);font-size:var(--co-font-size-12, 12px);font-weight:500;line-height:1;letter-spacing:var(--co-font-letter-spacing-body);white-space:nowrap;cursor:pointer;transition:opacity var(--co-motion-duration-fast) var(--co-motion-ease-out);box-sizing:border-box;min-height:32px}.co-list-footer__btn:hover{opacity:0.85}.co-list-footer__btn:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:2px}.co-list-footer__btn--secondary{background:transparent;color:var(--co-semantic-text-default);border:1px solid var(--co-semantic-border-default)}.co-list-footer__btn--primary{background:var(--co-semantic-surface-primary);color:var(--co-semantic-on-primary);border:none}`;
|
|
6
6
|
|
|
@@ -17,7 +17,7 @@ const CoListFooter = class {
|
|
|
17
17
|
this.handleSecondary = () => this.coSecondary.emit();
|
|
18
18
|
}
|
|
19
19
|
render() {
|
|
20
|
-
return (index.h("div", { key: '
|
|
20
|
+
return (index.h("div", { key: 'fbf4ec72aa2f6814b558d51c44592e784355751e', class: "co-list-footer", part: "footer" }, this.secondaryLabel && (index.h("button", { key: '78abef0f79117263c7d30e5ce37a876d193ba5e4', class: "co-list-footer__btn co-list-footer__btn--secondary", type: "button", onClick: this.handleSecondary }, this.secondaryIcon && index.h("co-icon", { key: 'a765ab5be51d7eb5791d3161cf5c7d3688fa0fd7', name: this.secondaryIcon, size: 16 }), index.h("span", { key: '0f5d57201bcd6ce40439c26916e01f1e37fcd87e' }, this.secondaryLabel))), this.primaryLabel && (index.h("button", { key: '27aa3b20666c9fe2a6fb7f28a9ca6e2542dd8fd7', class: "co-list-footer__btn co-list-footer__btn--primary", type: "button", onClick: this.handlePrimary }, this.primaryIcon && index.h("co-icon", { key: 'bafe2ebb9cfb2cc26c682ae9b419b09a512652f8', name: this.primaryIcon, size: 16 }), index.h("span", { key: 'c3c9baead987beea02ead3a65d3372c5532a67b8' }, this.primaryLabel))), index.h("slot", { key: '7a1ce48c91cc95c320c4d680053f42555e601187' })));
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
CoListFooter.style = coListFooterCss();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-MDAnKsze.js');
|
|
4
4
|
|
|
5
5
|
const coListItemCss = () => `:host{display:block}.co-list-item{display:flex;align-items:center;gap:var(--co-spacing-md);padding:var(--co-spacing-md) var(--co-spacing-lg);font-family:var(--co-font-family-primary);cursor:pointer;border-radius:var(--co-border-radius-sm);transition:background var(--co-motion-duration-fast) var(--co-motion-ease-out);box-sizing:border-box;min-height:40px}.co-list-item--dense{gap:var(--co-spacing-sm);padding:6px var(--co-spacing-sm);border-radius:var(--co-border-radius-xxs);min-height:32px}.co-list-item--dense .co-list-item__label{font-size:var(--co-font-size-14)}.co-list-item:hover:not(.co-list-item--disabled){background:var(--co-semantic-surface-hover)}.co-list-item:focus-visible{outline:none;box-shadow:0 0 0 2px var(--co-semantic-border-focus)}.co-list-item--selected{background:var(--co-semantic-surface-muted)}.co-list-item--disabled{opacity:0.4;cursor:not-allowed}.co-list-item__prefix,.co-list-item__suffix{display:flex;align-items:center;gap:var(--co-spacing-sm);flex-shrink:0;color:var(--co-semantic-text-muted)}.co-list-item__prefix:empty,.co-list-item__suffix:empty{display:none}.co-list-item__content{display:flex;flex-direction:column;flex:1;min-width:0}.co-list-item__content>.co-list-item__tip{min-width:0;max-width:100%}.co-list-item__label{display:block;font-size:var(--co-font-size-14);font-weight:400;color:var(--co-semantic-text-default);line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.co-list-item__description{display:block;font-size:var(--co-font-size-12);color:var(--co-semantic-text-muted);line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}`;
|
|
6
6
|
|
|
@@ -71,21 +71,21 @@ const CoListItem = class {
|
|
|
71
71
|
requestAnimationFrame(this.measureTruncation);
|
|
72
72
|
}
|
|
73
73
|
render() {
|
|
74
|
-
return (index.h("div", { key: '
|
|
74
|
+
return (index.h("div", { key: '23cfee682f0e7d3a22ca793b9e6b29eb89cf8ca1', class: {
|
|
75
75
|
'co-list-item': true,
|
|
76
76
|
'co-list-item--selected': this.selected,
|
|
77
77
|
'co-list-item--disabled': this.disabled,
|
|
78
78
|
'co-list-item--dense': this.dense,
|
|
79
79
|
'co-list-item--has-description': !!this.description,
|
|
80
|
-
}, part: "item", role: "option", tabindex: this.disabled ? -1 : 0, "aria-selected": this.selected ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', onClick: this.handleClick, onKeyDown: this.handleKeyDown }, index.h("span", { key: '
|
|
80
|
+
}, part: "item", role: "option", tabindex: this.disabled ? -1 : 0, "aria-selected": this.selected ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', onClick: this.handleClick, onKeyDown: this.handleKeyDown }, index.h("span", { key: 'a0f3c86656e408225fdbfeb610a088f8adebfa55', class: "co-list-item__prefix" }, this.icon && index.h("co-icon", { key: '18be77a790afd7b83f8ad07c9af5925abed4f23b', name: this.icon, size: 18 }), index.h("slot", { key: '2e198e4c541e1c86c6c266cf93408e195c851428', name: "prefix" })), index.h("div", { key: 'cbb5768d0a7bb287dbab1e013ae5e03ff2194a1f', class: "co-list-item__content" }, this.label && (index.h("co-tooltip", { key: '79730131bb1a74660d6dba076b622358b7c1ee15', block: true, class: "co-list-item__tip", content: this.label, placement: "top", disabled: !this.labelTruncated }, index.h("span", { key: '778b003dc31bc196a770a7dc6c4eebe649faf8c3', class: "co-list-item__label", ref: (el) => {
|
|
81
81
|
this.labelEl = el;
|
|
82
82
|
if (el && this.ro)
|
|
83
83
|
this.ro.observe(el);
|
|
84
|
-
} }, this.label))), this.description && (index.h("co-tooltip", { key: '
|
|
84
|
+
} }, this.label))), this.description && (index.h("co-tooltip", { key: '56c81304ceec7039a659c1e2443a17df48bf88eb', block: true, class: "co-list-item__tip", content: this.description, placement: "top", disabled: !this.descTruncated }, index.h("span", { key: '5f1f870da25778bfbe801cfb769319cff71fac75', class: "co-list-item__description", ref: (el) => {
|
|
85
85
|
this.descEl = el;
|
|
86
86
|
if (el && this.ro)
|
|
87
87
|
this.ro.observe(el);
|
|
88
|
-
} }, this.description))), index.h("slot", { key: '
|
|
88
|
+
} }, this.description))), index.h("slot", { key: '136ec5db83f4d2a77126d734ecac511c92b36d91' })), index.h("span", { key: '759b18ea3bedcb7b7b8023cb6ca1444fbacb5748', class: "co-list-item__suffix" }, index.h("slot", { key: 'c6519a183c1b7cdb84e4d822a5e2fa523a99ab52', name: "suffix" }))));
|
|
89
89
|
}
|
|
90
90
|
get el() { return index.getElement(this); }
|
|
91
91
|
static get watchers() { return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-MDAnKsze.js');
|
|
4
4
|
|
|
5
5
|
const coLoaderCss = () => `:host{display:contents;--co-loader-ball:15px;--co-loader-step:25px;--co-loader-text:var(--co-font-size-14);--co-loader-gap:10px}:host([size="sm"]){--co-loader-ball:8px;--co-loader-step:14px;--co-loader-text:var(--co-font-size-12);--co-loader-gap:6px}:host([size="lg"]){--co-loader-ball:20px;--co-loader-step:33px;--co-loader-gap:12px}.co-loader{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--co-loader-gap)}.co-loader--overlay{position:absolute;inset:0;background:rgba(255, 255, 255, 0.72);z-index:10}.co-loader__balls{position:relative;width:calc(var(--co-loader-step) * 3);height:var(--co-loader-ball)}.co-loader__ball{position:absolute;width:var(--co-loader-ball);height:var(--co-loader-ball);border-radius:50%;animation:co-loader-bounce 2s infinite cubic-bezier(0.28, 0.84, 0.42, 1)}.co-loader__ball--blue{background-color:var(--co-color-primary-azul, #4285f4)}.co-loader__ball--yellow{background-color:var(--co-color-primary-amarillo, #fdbd00);animation-delay:0.4s}.co-loader__ball--red{background-color:var(--co-color-primary-rosado, #d4145a);animation-delay:0.8s}.co-loader__text{margin:0;font-family:var(--co-font-family-primary);font-size:var(--co-loader-text);color:var(--co-semantic-text-secondary);text-align:center;white-space:pre-line}@keyframes co-loader-bounce{0%,100%{transform:translateX(0) scale(1)}25%{transform:translateX(var(--co-loader-step)) scale(1.2)}50%{transform:translateX(calc(var(--co-loader-step) * 2)) scale(0.8)}75%{transform:translateX(var(--co-loader-step)) scale(1.2)}}@media (prefers-reduced-motion: reduce){.co-loader__ball{animation:none}.co-loader__ball--blue{transform:translateX(0)}.co-loader__ball--yellow{transform:translateX(var(--co-loader-step))}.co-loader__ball--red{transform:translateX(calc(var(--co-loader-step) * 2))}}`;
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-MDAnKsze.js');
|
|
4
4
|
|
|
5
5
|
const coMediaThumbCss = () => `:host{display:block}.co-media-thumb{position:relative;overflow:hidden;width:100%;background:var(--co-color-gray-100, #f6f6f6);box-sizing:border-box}.co-media-thumb__img{width:100%;height:100%;object-fit:cover;display:block}.co-media-thumb__scrim{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(31, 28, 27, 0.28)}.co-media-thumb__play{display:flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:50%;background:rgba(255, 255, 255, 0.92)}.co-media-thumb__play-icon{display:block;margin-left:2px;}`;
|
|
6
6
|
|
|
@@ -22,13 +22,13 @@ const CoMediaThumb = class {
|
|
|
22
22
|
}
|
|
23
23
|
render() {
|
|
24
24
|
var _a;
|
|
25
|
-
return (index.h("div", { key: '
|
|
25
|
+
return (index.h("div", { key: 'acd021eb5ebcc987eeb1528b874fdbdfa48f8b52', class: {
|
|
26
26
|
'co-media-thumb': true,
|
|
27
27
|
'co-media-thumb--video': this.video,
|
|
28
28
|
}, part: "thumb", style: {
|
|
29
29
|
height: this.toCss(this.height),
|
|
30
30
|
borderRadius: `${this.radius}px`,
|
|
31
|
-
} }, this.src ? (index.h("img", { class: "co-media-thumb__img", src: this.src, alt: (_a = this.alt) !== null && _a !== void 0 ? _a : '', part: "img" })) : (index.h("slot", null)), this.video && (index.h("div", { key: '
|
|
31
|
+
} }, this.src ? (index.h("img", { class: "co-media-thumb__img", src: this.src, alt: (_a = this.alt) !== null && _a !== void 0 ? _a : '', part: "img" })) : (index.h("slot", null)), this.video && (index.h("div", { key: 'a6ec84bed9d75673b7b917b2cb513f01545d5bf2', class: "co-media-thumb__scrim", part: "scrim" }, index.h("div", { key: '9ce636bf0a3d9e53eb271803fc0bbd60f4314989', class: "co-media-thumb__play", part: "play" }, index.h("svg", { key: '07016dfed6ee4ff793650d830f152d2555731550', class: "co-media-thumb__play-icon", width: "16", height: "18", viewBox: "0 0 16 18", fill: "none", "aria-hidden": "true" }, index.h("path", { key: '825b3921b94248f28b30ce91b63525fd2fda5b35', d: "M2 2l12 7-12 7z", fill: "var(--co-color-base-negro, #1f1c1b)" })))))));
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
34
|
CoMediaThumb.style = coMediaThumbCss();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-MDAnKsze.js');
|
|
4
4
|
|
|
5
5
|
const coMenuDividerCss = () => `:host{display:block}.co-menu-divider{border:0;border-top:1px solid var(--co-semantic-border-subtle, rgba(31, 28, 27, 0.08));margin:var(--co-spacing-xs, 4px) 0}`;
|
|
6
6
|
|
|
@@ -9,7 +9,7 @@ const CoMenuDivider = class {
|
|
|
9
9
|
index.registerInstance(this, hostRef);
|
|
10
10
|
}
|
|
11
11
|
render() {
|
|
12
|
-
return index.h("hr", { key: '
|
|
12
|
+
return index.h("hr", { key: '9896239f2395bd79f45309fb61e0a0173572947a', class: "co-menu-divider", role: "separator" });
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
CoMenuDivider.style = coMenuDividerCss();
|
|
@@ -1,6 +1,42 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-MDAnKsze.js');
|
|
4
|
+
|
|
5
|
+
/** Atributo con el que un `co-menu-item` publica hacia sus hijos el lado al que
|
|
6
|
+
* su propio submenú terminó abriendo (post-flip). Lo escribe el componente al
|
|
7
|
+
* recibir el `coPlacement` del popover. */
|
|
8
|
+
const SUBMENU_SIDE_ATTR = 'submenu-side';
|
|
9
|
+
/** Lado horizontal de un placement ya resuelto; null si es vertical (no hay
|
|
10
|
+
* nada que heredar en una cadena que abre hacia abajo). */
|
|
11
|
+
function sideOfPlacement(placement) {
|
|
12
|
+
const side = placement.split('-')[0];
|
|
13
|
+
return side === 'left' || side === 'right' ? side : null;
|
|
14
|
+
}
|
|
15
|
+
/** Placement que debe pedir un submenú, dado el lado al que resolvió el submenú
|
|
16
|
+
* de su ancestro. Sin ancestro (primer nivel) mantiene el comportamiento
|
|
17
|
+
* histórico: a la derecha, y que el flip decida. */
|
|
18
|
+
function submenuPlacement(parentSide) {
|
|
19
|
+
return parentSide === 'left' ? 'left-start' : 'right-start';
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Lado heredado del `co-menu-item` ancestro más cercano, o null si no hay (o si
|
|
23
|
+
* todavía no se posicionó).
|
|
24
|
+
*
|
|
25
|
+
* Arranca en `parentElement` a propósito: `el.closest('co-menu-item')` se
|
|
26
|
+
* matchearía al PROPIO elemento — un ítem con submenú se heredaría a sí mismo y
|
|
27
|
+
* el fix sería un no-op.
|
|
28
|
+
*
|
|
29
|
+
* Funciona sobre light DOM: los `co-menu-item` anidados son hijos reales del
|
|
30
|
+
* padre en el árbol (el `<slot/>` los proyecta visualmente pero no los mueve),
|
|
31
|
+
* así que la cadena `parentElement` conserva el anidamiento a través de
|
|
32
|
+
* cualquier wrapper intermedio.
|
|
33
|
+
*/
|
|
34
|
+
function inheritedSubmenuSide(el) {
|
|
35
|
+
var _a;
|
|
36
|
+
const ancestor = (_a = el.parentElement) === null || _a === void 0 ? void 0 : _a.closest('co-menu-item');
|
|
37
|
+
const side = ancestor === null || ancestor === void 0 ? void 0 : ancestor.getAttribute(SUBMENU_SIDE_ATTR);
|
|
38
|
+
return side === 'left' || side === 'right' ? side : null;
|
|
39
|
+
}
|
|
4
40
|
|
|
5
41
|
const coMenuItemCss = () => `:host{display:block}.co-menu-item__wrap{display:block}.co-menu-item{width:100%;display:flex;align-items:center;gap:var(--co-menu-item-gap, var(--co-spacing-sm, 8px));padding:var(--co-menu-item-padding, var(--co-spacing-sm, 8px) var(--co-spacing-md, 12px));background:transparent;border:0;border-radius:var(--co-border-radius-xs, 8px);font-family:var(--co-font-family-primary);font-size:var(--co-font-size-14, 14px);color:var(--co-semantic-text-default);text-align:left;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);min-height:var(--co-menu-item-height, 36px);box-sizing:border-box}.co-menu-item--dense{padding:var(--co-spacing-xs, 4px) var(--co-spacing-md, 12px);min-height:32px}.co-menu-item--selected{background:var(--co-color-gray-100, #f6f6f6)}.co-menu-item:hover,.co-menu-item--submenu-open{background:var(--co-semantic-surface-hover, rgba(31, 28, 27, 0.04))}.co-menu-item:focus-visible{outline:2px solid var(--co-semantic-border-focus, #2563eb);outline-offset:-2px}.co-menu-item--disabled{opacity:0.5;cursor:not-allowed;pointer-events:none}.co-menu-item--danger{color:var(--co-color-status-error, #aa2e1b)}.co-menu-item--danger:hover{background:var(--co-color-status-bg-error, #ffefef)}.co-menu-item__icon{display:inline-flex;align-items:center;flex-shrink:0;color:var(--co-menu-item-icon-color, currentColor)}.co-menu-item__check{display:inline-flex;align-items:center;flex-shrink:0;color:var(--co-semantic-text-default)}.co-menu-item__label{flex:1;display:inline-flex;align-items:center;gap:var(--co-spacing-xs, 4px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.co-menu-item__label--stacked{flex-direction:column;align-items:flex-start;gap:1px}.co-menu-item__label-main{display:inline-flex;align-items:center;gap:var(--co-spacing-xs, 4px)}.co-menu-item__caption{font-size:var(--co-font-size-11, 11px);color:var(--co-semantic-text-muted);line-height:1.3;white-space:nowrap}.co-menu-item__suffix{display:inline-flex;align-items:center;gap:var(--co-spacing-xs, 4px);flex-shrink:0;color:var(--co-semantic-text-muted)}.co-menu-item--submenu-open .co-menu-item__suffix{color:var(--co-semantic-text-default)}.co-menu-item__trigger-wrap{display:block}.co-menu-item__submenu{background:var(--co-semantic-surface-secondary, #fff);border-radius:var(--co-border-radius-sm, 12px);box-shadow:var(--co-shadow-lg, 0 4px 12px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04)), inset 0 0 0 1px var(--co-color-opacity-negro-8, rgba(31, 28, 27, 0.08));padding:var(--co-menu-padding, var(--co-spacing-xs, 4px));min-width:180px;display:flex;flex-direction:column;gap:2px;position:relative}.co-menu-item__submenu::before,.co-menu-item__submenu::after{content:'';position:absolute;top:0;bottom:0;width:6px;}.co-menu-item__submenu::before{left:-6px}.co-menu-item__submenu::after{right:-6px}`;
|
|
6
42
|
|
|
@@ -23,6 +59,11 @@ const CoMenuItem = class {
|
|
|
23
59
|
this.variant = 'default';
|
|
24
60
|
this.hasSubmenu = false;
|
|
25
61
|
this.submenuOpen = false;
|
|
62
|
+
/** Lado hacia el que este ítem PIDE abrir su submenú. Se recalcula en cada
|
|
63
|
+
* apertura (no en render) heredando la dirección del ancestro: para cuando
|
|
64
|
+
* el usuario puede hoverear una fila de este panel, el submenú del ancestro
|
|
65
|
+
* ya se posicionó y publicó su lado. Ver utils/submenu.ts. */
|
|
66
|
+
this.submenuPlacementValue = 'right-start';
|
|
26
67
|
this.handleClick = (e) => {
|
|
27
68
|
if (this.disabled)
|
|
28
69
|
return;
|
|
@@ -74,6 +115,16 @@ const CoMenuItem = class {
|
|
|
74
115
|
return;
|
|
75
116
|
this.scheduleClose();
|
|
76
117
|
};
|
|
118
|
+
/** El popover ya se posicionó: publicamos el lado RESUELTO (post-flip) en el
|
|
119
|
+
* host para que los co-menu-item anidados —hijos de light DOM— lo hereden.
|
|
120
|
+
* Va como atributo y no como evento que burbujee a propósito: `coPlacement`
|
|
121
|
+
* es `bubbles: false`, así que el de un submenú de adentro no se confunde
|
|
122
|
+
* con el nuestro. */
|
|
123
|
+
this.handlePlacement = (e) => {
|
|
124
|
+
const side = sideOfPlacement(e.detail.placement);
|
|
125
|
+
if (side)
|
|
126
|
+
this.el.setAttribute(SUBMENU_SIDE_ATTR, side);
|
|
127
|
+
};
|
|
77
128
|
// Arrow function (not a plain method) so `this` stays bound when it is passed
|
|
78
129
|
// directly as a JSX event handler (`onMouseEnter={this.cancelClose}`). Stencil
|
|
79
130
|
// does NOT auto-bind plain methods used as listeners — as a listener `this`
|
|
@@ -111,7 +162,37 @@ const CoMenuItem = class {
|
|
|
111
162
|
}
|
|
112
163
|
return false;
|
|
113
164
|
}
|
|
114
|
-
openSubmenu() {
|
|
165
|
+
openSubmenu() {
|
|
166
|
+
// Coordinación de HERMANOS: abrir este submenú cierra inmediato el de
|
|
167
|
+
// cualquier co-menu-item del mismo parent. Sin esto, el delay de gracia de
|
|
168
|
+
// 260ms de scheduleClose deja DOS paneles visibles cuando el cursor pasa
|
|
169
|
+
// rápido de un trigger al de al lado (los ancestros no se tocan: un
|
|
170
|
+
// submenú anidado vive DENTRO de su ancestro, no es hermano).
|
|
171
|
+
if (!this.submenuOpen)
|
|
172
|
+
this.closeSiblingSubmenus();
|
|
173
|
+
// La dirección se resuelve ACÁ y no en render: heredarla exige que el
|
|
174
|
+
// submenú del ancestro ya esté posicionado, y eso solo está garantizado
|
|
175
|
+
// cuando el cursor pudo llegar a esta fila (que vive dentro de ese panel).
|
|
176
|
+
this.submenuPlacementValue = submenuPlacement(inheritedSubmenuSide(this.el));
|
|
177
|
+
this.submenuOpen = true;
|
|
178
|
+
}
|
|
179
|
+
/** Cierra el submenú YA (sin delay de gracia). Público: lo invoca el hermano
|
|
180
|
+
* que se está abriendo, mismo patrón cross-elemento que `focusItem`. */
|
|
181
|
+
async closeSubmenu() {
|
|
182
|
+
this.cancelClose();
|
|
183
|
+
this.submenuOpen = false;
|
|
184
|
+
}
|
|
185
|
+
closeSiblingSubmenus() {
|
|
186
|
+
var _a, _b;
|
|
187
|
+
const parent = this.el.parentElement;
|
|
188
|
+
if (!parent)
|
|
189
|
+
return;
|
|
190
|
+
for (const sib of Array.from(parent.children)) {
|
|
191
|
+
if (sib !== this.el && sib.tagName.toLowerCase() === 'co-menu-item') {
|
|
192
|
+
(_b = (_a = sib).closeSubmenu) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
115
196
|
scheduleClose() {
|
|
116
197
|
this.cancelClose();
|
|
117
198
|
// Delay tolerates the cursor travelling from the trigger row, across the
|
|
@@ -136,7 +217,7 @@ const CoMenuItem = class {
|
|
|
136
217
|
}
|
|
137
218
|
// Submenu trigger — wrap the row in a co-popover anchored to the right.
|
|
138
219
|
// The default slot (nested co-menu-items) is projected into the popover.
|
|
139
|
-
return (index.h("div", { class: "co-menu-item__wrap co-menu-item__wrap--submenu", onMouseEnter: this.cancelClose, onMouseLeave: this.handleMouseLeave }, index.h("co-popover", { placement:
|
|
220
|
+
return (index.h("div", { class: "co-menu-item__wrap co-menu-item__wrap--submenu", onMouseEnter: this.cancelClose, onMouseLeave: this.handleMouseLeave }, index.h("co-popover", { placement: this.submenuPlacementValue, offset: 4, open: this.submenuOpen, onCoOpen: () => this.openSubmenu(), onCoClose: () => { this.submenuOpen = false; }, onCoPlacement: this.handlePlacement }, index.h("div", { slot: "trigger", class: "co-menu-item__trigger-wrap" }, row), index.h("div", { class: "co-menu-item__submenu", role: "menu", onMouseEnter: this.cancelClose, onMouseLeave: this.handleMouseLeave }, index.h("slot", null)))));
|
|
140
221
|
}
|
|
141
222
|
get el() { return index.getElement(this); }
|
|
142
223
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-MDAnKsze.js');
|
|
4
4
|
|
|
5
5
|
const coMenuCss = () => `:host{display:contents}.co-menu{background:var(--co-semantic-surface-secondary, #fff);border-radius:var(--co-border-radius-sm, 12px);box-shadow:var(--co-shadow-lg, 0 4px 12px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04)), inset 0 0 0 1px var(--co-color-opacity-negro-8, rgba(31, 28, 27, 0.08));padding:var(--co-menu-padding, var(--co-spacing-xs, 4px));min-width:200px;display:flex;flex-direction:column;gap:2px;font-family:var(--co-font-family-primary);font-size:var(--co-font-size-14, 14px);color:var(--co-semantic-text-default)}`;
|
|
6
6
|
|
|
@@ -92,7 +92,7 @@ const CoMenu = class {
|
|
|
92
92
|
(_b = (_a = items[next]) === null || _a === void 0 ? void 0 : _a.focusItem) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
93
93
|
}
|
|
94
94
|
render() {
|
|
95
|
-
return (index.h("co-popover", { key: '
|
|
95
|
+
return (index.h("co-popover", { key: 'a386ccd371e9eb5627b6c70f43e66d6844df0b8a', placement: this.placement, offset: this.offset, open: this.open, onCoOpen: this.handlePopoverOpen, onCoClose: this.handlePopoverClose }, index.h("slot", { key: '9115ac2e7689183d9d397bd602d1a8651dcf364d', name: "trigger", slot: "trigger" }), index.h("div", { key: 'a56a14dfc5810144b93ca68ce54aceb7e5c2b85c', class: "co-menu", role: "menu", style: this.width ? { width: this.width, minWidth: this.width } : undefined }, index.h("slot", { key: '045510a7bbde56d841eee17d7561249a090e6de3' }))));
|
|
96
96
|
}
|
|
97
97
|
get el() { return index.getElement(this); }
|
|
98
98
|
static get watchers() { return {
|