@prolibu-suite/cobalt-core 0.10.4 → 0.11.1
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/README.md +12 -5
- package/custom-elements.json +7034 -1203
- package/dist/cjs/co-accordion.cjs.entry.js +3 -3
- package/dist/cjs/co-action-bar.cjs.entry.js +3 -3
- package/dist/cjs/co-app-shell.cjs.entry.js +3 -3
- package/dist/cjs/co-audio-player.cjs.entry.js +4 -4
- package/dist/cjs/co-autocomplete.cjs.entry.js +12 -5
- package/dist/cjs/co-avatar-group.cjs.entry.js +3 -3
- package/dist/cjs/co-avatar.cjs.entry.js +7 -4
- 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 +4 -3
- package/dist/cjs/co-button.cjs.entry.js +9 -7
- package/dist/cjs/co-calendar-month_2.cjs.entry.js +16 -4
- package/dist/cjs/co-calendar_3.cjs.entry.js +76 -27
- package/dist/cjs/co-card.cjs.entry.js +3 -3
- package/dist/cjs/co-carousel-item.cjs.entry.js +2 -2
- package/dist/cjs/co-carousel.cjs.entry.js +6 -3
- package/dist/cjs/co-checkbox-group.cjs.entry.js +4 -4
- package/dist/cjs/co-checkbox.cjs.entry.js +13 -5
- package/dist/cjs/co-chip_2.cjs.entry.js +20 -7
- package/dist/cjs/co-color-area.cjs.entry.js +169 -0
- package/dist/cjs/co-color-picker.cjs.entry.js +5 -5
- package/dist/cjs/co-color-slider.cjs.entry.js +189 -0
- package/dist/cjs/co-column-picker.cjs.entry.js +23 -3
- package/dist/cjs/co-combobox.cjs.entry.js +5 -5
- package/dist/cjs/co-command-search.cjs.entry.js +5 -5
- package/dist/cjs/co-data-table-pagination.cjs.entry.js +5 -5
- package/dist/cjs/co-data-table.cjs.entry.js +3 -3
- package/dist/cjs/co-date-picker.cjs.entry.js +10 -2
- package/dist/cjs/co-date-range-picker.cjs.entry.js +11 -2
- package/dist/cjs/co-date-range.cjs.entry.js +8 -2
- package/dist/cjs/co-date-time-picker.cjs.entry.js +11 -4
- package/dist/cjs/co-document-editor.cjs.entry.js +1167 -0
- 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 +3 -3
- package/dist/cjs/co-empty-state.cjs.entry.js +3 -3
- package/dist/cjs/co-event-calendar.cjs.entry.js +5 -3
- package/dist/cjs/co-event-popover.cjs.entry.js +7 -3
- package/dist/cjs/co-fab.cjs.entry.js +7 -3
- package/dist/cjs/co-file-field.cjs.entry.js +12 -8
- package/dist/cjs/co-file-type-tile.cjs.entry.js +3 -3
- package/dist/cjs/co-gradient-bar.cjs.entry.js +220 -0
- package/dist/cjs/co-helper-text.cjs.entry.js +3 -3
- package/dist/cjs/co-icon-button.cjs.entry.js +48 -9
- package/dist/cjs/co-icon.cjs.entry.js +3 -3
- package/dist/cjs/co-input.cjs.entry.js +14 -8
- package/dist/cjs/co-json-field.cjs.entry.js +10 -5
- package/dist/cjs/{co-tooltip.cjs.entry.js → co-kbd_2.cjs.entry.js} +194 -6
- package/dist/cjs/co-lightbox.cjs.entry.js +5 -5
- 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 +3 -3
- package/dist/cjs/co-menu-item.cjs.entry.js +41 -43
- package/dist/cjs/co-menu.cjs.entry.js +81 -5
- package/dist/cjs/co-modal.cjs.entry.js +350 -7
- package/dist/cjs/co-navbar.cjs.entry.js +3 -3
- package/dist/cjs/co-number-field.cjs.entry.js +11 -5
- package/dist/cjs/co-overlay.cjs.entry.js +8 -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 +69 -6
- 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 +2 -2
- package/dist/cjs/co-radio-group.cjs.entry.js +4 -4
- package/dist/cjs/co-radio.cjs.entry.js +4 -4
- package/dist/cjs/co-rating.cjs.entry.js +11 -4
- package/dist/cjs/co-ref-field.cjs.entry.js +14 -5
- package/dist/cjs/co-rich-text-editor.cjs.entry.js +40 -92
- package/dist/cjs/co-rich-text-toolbar.cjs.entry.js +80 -20
- package/dist/cjs/co-rich-text-viewer.cjs.entry.js +9 -2
- package/dist/cjs/co-row.cjs.entry.js +3 -3
- package/dist/cjs/co-segmented-bar.cjs.entry.js +3 -3
- package/dist/cjs/co-select.cjs.entry.js +171 -29
- package/dist/cjs/co-separator.cjs.entry.js +2 -2
- package/dist/cjs/co-sidebar-nav.cjs.entry.js +20 -5
- package/dist/cjs/co-sidebar.cjs.entry.js +3 -3
- package/dist/cjs/co-slider.cjs.entry.js +209 -23
- package/dist/cjs/co-swatch-grid.cjs.entry.js +121 -0
- package/dist/cjs/co-switch.cjs.entry.js +5 -5
- package/dist/cjs/co-tab-group.cjs.entry.js +113 -4
- package/dist/cjs/co-tab.cjs.entry.js +15 -5
- package/dist/cjs/co-tags-field.cjs.entry.js +13 -8
- package/dist/cjs/co-textarea.cjs.entry.js +6 -6
- package/dist/cjs/co-tile.cjs.entry.js +61 -0
- package/dist/cjs/co-time-field.cjs.entry.js +5 -2
- package/dist/cjs/co-toast.cjs.entry.js +3 -3
- package/dist/cjs/co-toggle-button-group.cjs.entry.js +29 -5
- package/dist/cjs/co-toggle-button.cjs.entry.js +70 -6
- package/dist/cjs/co-transfer-list.cjs.entry.js +7 -3
- package/dist/cjs/co-tree-item.cjs.entry.js +110 -0
- package/dist/cjs/co-video.cjs.entry.js +11 -3
- package/dist/cjs/cobalt.cjs.js +2 -2
- package/dist/cjs/{color-CML2Cfdh.js → color-DQVrQGi0.js} +10 -5
- package/dist/cjs/{fieldChip-B6YIGU1V.js → fieldChip-C7MxxBVO.js} +1 -1
- package/dist/cjs/gradientStops-CMpH4fB_.js +153 -0
- package/dist/cjs/hsv-DpfSF3M2.js +95 -0
- package/dist/cjs/{index-MDAnKsze.js → index-bHoidDwv.js} +67 -27
- package/dist/cjs/index-oMHzCXm6.js +144 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{index-2kMmd5-a.js → pagination-DV43TRj9.js} +1780 -297
- package/dist/cjs/{positioning-CyatXeT_.js → positioning-CILo5esi.js} +45 -18
- package/dist/cjs/{requiredMark-D-t-IPN0.js → requiredMark-21yHvvZS.js} +1 -1
- package/dist/cjs/rich-text-host-ueFSfW-6.js +119 -0
- package/dist/cjs/{richTextI18n-B28uAhh4.js → richTextI18n-DXGIv5w1.js} +45 -0
- package/dist/cjs/submenu-RlaX6irw.js +65 -0
- package/dist/cjs/{toolbar-config-CYACt9hh.js → toolbar-config-DczL6C4W.js} +32 -0
- package/dist/cobalt/cobalt.css +1 -1
- package/dist/cobalt/cobalt.esm.js +1 -1
- package/dist/cobalt/{p-76249983.entry.js → p-019eed8e.entry.js} +1 -1
- package/dist/cobalt/p-04e3e1f6.entry.js +1 -0
- package/dist/cobalt/p-06689166.entry.js +1 -0
- package/dist/cobalt/p-0d046d98.entry.js +1 -0
- package/dist/cobalt/{p-28764b8e.entry.js → p-0e4c2234.entry.js} +1 -1
- package/dist/cobalt/{p-b90d41e4.entry.js → p-1348d5ca.entry.js} +1 -1
- package/dist/cobalt/{p-49834b8e.entry.js → p-13e5b724.entry.js} +1 -1
- package/dist/cobalt/p-1a5bec8c.entry.js +1 -0
- package/dist/cobalt/p-21b4a830.entry.js +1 -0
- package/dist/cobalt/p-2231bacc.entry.js +1 -0
- package/dist/cobalt/{p-b437eff6.entry.js → p-26cbdc33.entry.js} +1 -1
- package/dist/cobalt/{p-aa9400bf.entry.js → p-28cf05f3.entry.js} +1 -1
- package/dist/cobalt/{p-eadfd661.entry.js → p-358a6c2a.entry.js} +1 -1
- package/dist/cobalt/p-3b5024ce.entry.js +1 -0
- package/dist/cobalt/p-3b6efb79.entry.js +1 -0
- package/dist/cobalt/p-3d1a48e5.entry.js +1 -0
- package/dist/cobalt/p-47eca182.entry.js +1 -0
- package/dist/cobalt/{p-eb82358d.entry.js → p-4bcdd422.entry.js} +1 -1
- package/dist/cobalt/{p-17244412.entry.js → p-4d743628.entry.js} +1 -1
- package/dist/cobalt/{p-011dc80b.entry.js → p-4e81e580.entry.js} +1 -1
- package/dist/cobalt/{p-ee9a623d.entry.js → p-53a251ca.entry.js} +1 -1
- package/dist/cobalt/{p-11c5ce78.entry.js → p-56176aa0.entry.js} +1 -1
- package/dist/cobalt/{p-a32b20eb.entry.js → p-58ebb303.entry.js} +1 -1
- package/dist/cobalt/{p-4592ca00.entry.js → p-5a32b9a2.entry.js} +1 -1
- package/dist/cobalt/{p-2636b7eb.entry.js → p-5e678e88.entry.js} +1 -1
- package/dist/cobalt/{p-996f4e38.entry.js → p-60f948c4.entry.js} +1 -1
- package/dist/cobalt/p-63908a8d.entry.js +1 -0
- package/dist/cobalt/p-65c191aa.entry.js +1 -0
- package/dist/cobalt/{p-c2ebf0ec.entry.js → p-65d44da2.entry.js} +1 -1
- package/dist/cobalt/p-67a024dd.entry.js +1 -0
- package/dist/cobalt/{p-ee149fd2.entry.js → p-6974df59.entry.js} +1 -1
- package/dist/cobalt/{p-000a15b8.entry.js → p-69ecc933.entry.js} +1 -1
- package/dist/cobalt/p-6c1992c9.entry.js +1 -0
- package/dist/cobalt/{p-b821d9de.entry.js → p-6d4a660c.entry.js} +1 -1
- package/dist/cobalt/{p-f57dffca.entry.js → p-713637f2.entry.js} +1 -1
- package/dist/cobalt/{p-292b0389.entry.js → p-71ae1551.entry.js} +1 -1
- package/dist/cobalt/{p-91e73a92.entry.js → p-71dc8e4a.entry.js} +1 -1
- package/dist/cobalt/{p-aaca6dab.entry.js → p-71ee36a8.entry.js} +1 -1
- package/dist/cobalt/p-71fe35c4.entry.js +1 -0
- package/dist/cobalt/{p-08e42e00.entry.js → p-73313cbe.entry.js} +1 -1
- package/dist/cobalt/{p-7b5c555c.entry.js → p-763698b3.entry.js} +1 -1
- package/dist/cobalt/p-77e0d401.entry.js +1 -0
- package/dist/cobalt/{p-c91d4fc6.entry.js → p-78412feb.entry.js} +1 -1
- package/dist/cobalt/p-7beface1.entry.js +1 -0
- package/dist/cobalt/{p-f4e1c3c3.entry.js → p-7d1718ed.entry.js} +1 -1
- package/dist/cobalt/{p-826ee074.entry.js → p-7df18a52.entry.js} +1 -1
- package/dist/cobalt/p-7e678cbd.entry.js +1 -0
- package/dist/cobalt/{p-d0b2c418.entry.js → p-7fabd8ba.entry.js} +1 -1
- package/dist/cobalt/{p-23ab0cc5.entry.js → p-848f5ca4.entry.js} +1 -1
- package/dist/cobalt/{p-623cc195.entry.js → p-8680559b.entry.js} +1 -1
- package/dist/cobalt/p-87de5469.entry.js +1 -0
- package/dist/cobalt/p-87e62e2b.entry.js +1 -0
- package/dist/cobalt/{p-1861fe41.entry.js → p-8a2a2b6c.entry.js} +1 -1
- package/dist/cobalt/p-903237f9.entry.js +1 -0
- package/dist/cobalt/{p-2c9dba2f.entry.js → p-95f2ebb1.entry.js} +1 -1
- package/dist/cobalt/{p-24196410.entry.js → p-99df434b.entry.js} +1 -1
- package/dist/cobalt/{p-290066ef.entry.js → p-9adbab95.entry.js} +1 -1
- package/dist/cobalt/p-9dc01092.entry.js +1 -0
- package/dist/cobalt/p-9ee5bef3.entry.js +1 -0
- package/dist/cobalt/p-B1JT7us1.js +1 -0
- package/dist/cobalt/{p-BRbgGqLw.js → p-BVGGRfNG.js} +1 -1
- package/dist/cobalt/p-BmdKHBZP.js +1 -0
- package/dist/cobalt/p-BtliEQAT.js +1 -0
- package/dist/cobalt/p-COJdaKBU.js +1 -0
- package/dist/cobalt/{p-BAYo-RBt.js → p-CRxTFT_z.js} +1 -1
- package/dist/cobalt/p-CYN5B3IQ.js +1 -0
- package/dist/cobalt/p-DJkaRtbb.js +2 -0
- package/dist/cobalt/p-DU-KOQ8L.js +1 -0
- package/dist/cobalt/p-DXLeDZvr.js +1 -0
- package/dist/cobalt/{p-D_zA1Pv4.js → p-DgJovDdy.js} +1 -1
- package/dist/cobalt/p-RVQJEYxa.js +1 -0
- package/dist/cobalt/{p-ee2023da.entry.js → p-a27013e6.entry.js} +1 -1
- package/dist/cobalt/{p-2f9cbbd5.entry.js → p-a4eb298c.entry.js} +1 -1
- package/dist/cobalt/p-a56bd4a8.entry.js +1 -0
- package/dist/cobalt/{p-59963937.entry.js → p-a5eabecb.entry.js} +1 -1
- package/dist/cobalt/p-a5ee1fc2.entry.js +1 -0
- package/dist/cobalt/{p-fb2d1144.entry.js → p-a7cd61ce.entry.js} +1 -1
- package/dist/cobalt/{p-39a50e7f.entry.js → p-ad752791.entry.js} +1 -1
- package/dist/cobalt/{p-07416e31.entry.js → p-ae999b94.entry.js} +1 -1
- package/dist/cobalt/{p-4d65e713.entry.js → p-aed832d5.entry.js} +1 -1
- package/dist/cobalt/p-b2457431.entry.js +1 -0
- package/dist/cobalt/{p-6dd220e0.entry.js → p-b39a4999.entry.js} +1 -1
- package/dist/cobalt/p-b5dabdc3.entry.js +1 -0
- package/dist/cobalt/{p-8471abe2.entry.js → p-b67fb616.entry.js} +1 -1
- package/dist/cobalt/{p-f7eb1a40.entry.js → p-b9b73dcb.entry.js} +1 -1
- package/dist/cobalt/{p-f9a7b7c6.entry.js → p-ba39a965.entry.js} +1 -1
- package/dist/cobalt/{p-58d9b650.entry.js → p-be520bd5.entry.js} +1 -1
- package/dist/cobalt/{p-1dc55e43.entry.js → p-bee30373.entry.js} +1 -1
- package/dist/cobalt/{p-44c4e4a3.entry.js → p-c220362c.entry.js} +1 -1
- package/dist/cobalt/p-c4c997f3.entry.js +1 -0
- package/dist/cobalt/{p-a2462d7a.entry.js → p-c5464a98.entry.js} +1 -1
- package/dist/cobalt/p-c567533e.entry.js +1 -0
- package/dist/cobalt/{p-c30b4cb5.entry.js → p-cf5b91be.entry.js} +1 -1
- package/dist/cobalt/p-cfaaa684.entry.js +1 -0
- package/dist/cobalt/p-d00c3894.entry.js +1 -0
- package/dist/cobalt/p-d1e83525.entry.js +1 -0
- package/dist/cobalt/{p-44ea675f.entry.js → p-d5d8fa8b.entry.js} +1 -1
- package/dist/cobalt/p-d6215d80.entry.js +1 -0
- package/dist/cobalt/p-d6e7c258.entry.js +1 -0
- package/dist/cobalt/p-dabcbba7.entry.js +1 -0
- package/dist/cobalt/p-db623519.entry.js +1 -0
- package/dist/cobalt/{p-c7d7d7f7.entry.js → p-df529110.entry.js} +1 -1
- package/dist/cobalt/{p-1cc818ca.entry.js → p-ea24eea8.entry.js} +1 -1
- package/dist/cobalt/{p-d29bb0fa.entry.js → p-efb3cbb0.entry.js} +1 -1
- package/dist/cobalt/{p-f6691108.entry.js → p-f0898e21.entry.js} +1 -1
- package/dist/cobalt/{p-0c004735.entry.js → p-f2fa2ac0.entry.js} +1 -1
- package/dist/cobalt/p-f403eeec.entry.js +1 -0
- package/dist/cobalt/{p-e4264532.entry.js → p-f69804a6.entry.js} +1 -1
- package/dist/cobalt/p-xnrKkNWQ.js +1 -0
- package/dist/collection/collection-manifest.json +8 -0
- package/dist/collection/components/co-accordion/co-accordion.js +12 -2
- package/dist/collection/components/co-action-bar/co-action-bar.css +6 -0
- package/dist/collection/components/co-action-bar/co-action-bar.js +3 -2
- package/dist/collection/components/co-app-shell/co-app-shell.css +6 -0
- package/dist/collection/components/co-app-shell/co-app-shell.js +13 -2
- package/dist/collection/components/co-audio-player/co-audio-player.js +19 -7
- package/dist/collection/components/co-autocomplete/co-autocomplete.js +30 -17
- package/dist/collection/components/co-avatar/co-avatar.css +16 -2
- package/dist/collection/components/co-avatar/co-avatar.js +14 -4
- package/dist/collection/components/co-avatar-group/co-avatar-group.css +4 -0
- package/dist/collection/components/co-avatar-group/co-avatar-group.js +8 -3
- package/dist/collection/components/co-badge/co-badge.js +8 -1
- package/dist/collection/components/co-bottom-sheet/co-bottom-sheet.js +13 -4
- package/dist/collection/components/co-breadcrumb/co-breadcrumb.js +5 -1
- package/dist/collection/components/co-breadcrumb-item/co-breadcrumb-item.js +8 -2
- package/dist/collection/components/co-button/co-button.css +81 -6
- package/dist/collection/components/co-button/co-button.js +39 -11
- package/dist/collection/components/co-button-group/co-button-group.js +10 -3
- package/dist/collection/components/co-calendar/calendarMarks.js +40 -0
- package/dist/collection/components/co-calendar/co-calendar.css +19 -1
- package/dist/collection/components/co-calendar/co-calendar.js +84 -20
- package/dist/collection/components/co-calendar-month/co-calendar-month.js +1 -1
- package/dist/collection/components/co-calendar-timegrid/co-calendar-timegrid.js +36 -19
- package/dist/collection/components/co-card/co-card.js +11 -2
- package/dist/collection/components/co-carousel/co-carousel.css +10 -0
- package/dist/collection/components/co-carousel/co-carousel.js +17 -5
- package/dist/collection/components/co-carousel-item/co-carousel-item.js +1 -1
- package/dist/collection/components/co-checkbox/co-checkbox.css +43 -1
- package/dist/collection/components/co-checkbox/co-checkbox.js +39 -3
- package/dist/collection/components/co-checkbox-group/co-checkbox-group.js +9 -4
- package/dist/collection/components/co-chip/co-chip.css +9 -0
- package/dist/collection/components/co-chip/co-chip.js +15 -2
- package/dist/collection/components/co-color-area/co-color-area.css +87 -0
- package/dist/collection/components/co-color-area/co-color-area.js +342 -0
- package/dist/collection/components/co-color-picker/co-color-picker.js +4 -2
- package/dist/collection/components/co-color-slider/co-color-slider.css +115 -0
- package/dist/collection/components/co-color-slider/co-color-slider.js +354 -0
- package/dist/collection/components/co-column-picker/co-column-picker.js +51 -25
- package/dist/collection/components/co-combobox/co-combobox.js +18 -4
- package/dist/collection/components/co-command-search/co-command-search.js +19 -8
- package/dist/collection/components/co-data-table/co-data-table.js +8 -3
- package/dist/collection/components/co-data-table-pagination/co-data-table-pagination.js +16 -4
- package/dist/collection/components/co-date-field/co-date-field.js +19 -13
- package/dist/collection/components/co-date-picker/co-date-picker.js +38 -25
- package/dist/collection/components/co-date-range/co-date-range.js +19 -10
- package/dist/collection/components/co-date-range-picker/co-date-range-picker.js +44 -30
- package/dist/collection/components/co-date-time-picker/co-date-time-picker.js +31 -22
- package/dist/collection/components/co-document-editor/change-throttle.js +30 -0
- package/dist/collection/components/co-document-editor/co-document-editor.css +438 -0
- package/dist/collection/components/co-document-editor/co-document-editor.js +1549 -0
- package/dist/collection/components/co-document-editor/document-props.js +40 -0
- package/dist/collection/components/co-document-editor/header-tools.js +11 -0
- package/dist/collection/components/co-document-editor/image-bar.js +66 -0
- package/dist/collection/components/co-document-editor/page-styles.js +90 -0
- package/dist/collection/components/co-document-editor/zoom.js +45 -0
- package/dist/collection/components/co-drawer/co-drawer.css +5 -0
- package/dist/collection/components/co-drawer/co-drawer.js +13 -0
- package/dist/collection/components/co-drive-card/co-drive-card.js +14 -1
- package/dist/collection/components/co-drop-zone/co-drop-zone.js +7 -2
- package/dist/collection/components/co-emoji-picker/co-emoji-picker.css +4 -0
- package/dist/collection/components/co-emoji-picker/co-emoji-picker.js +11 -2
- package/dist/collection/components/co-empty-state/co-empty-state.js +4 -2
- package/dist/collection/components/co-event-calendar/co-event-calendar.js +16 -4
- package/dist/collection/components/co-event-popover/co-event-popover.js +18 -6
- package/dist/collection/components/co-fab/co-fab.css +8 -0
- package/dist/collection/components/co-fab/co-fab.js +17 -8
- package/dist/collection/components/co-file-field/co-file-field.js +16 -11
- package/dist/collection/components/co-file-type-tile/co-file-type-tile.js +9 -2
- package/dist/collection/components/co-gradient-bar/co-gradient-bar.css +143 -0
- package/dist/collection/components/co-gradient-bar/co-gradient-bar.js +412 -0
- package/dist/collection/components/co-helper-text/co-helper-text.js +4 -2
- package/dist/collection/components/co-icon/co-icon.js +6 -2
- package/dist/collection/components/co-icon-button/co-icon-button.css +104 -19
- package/dist/collection/components/co-icon-button/co-icon-button.js +125 -10
- package/dist/collection/components/co-input/co-input.css +125 -0
- package/dist/collection/components/co-input/co-input.js +48 -11
- package/dist/collection/components/co-json-field/co-json-field.js +19 -12
- package/dist/collection/components/co-kbd/co-kbd.css +99 -0
- package/dist/collection/components/co-kbd/co-kbd.js +298 -0
- package/dist/collection/components/co-lightbox/co-lightbox.js +4 -4
- package/dist/collection/components/co-list-footer/co-list-footer.js +4 -1
- package/dist/collection/components/co-list-item/co-list-item.js +7 -4
- package/dist/collection/components/co-loader/co-loader.js +5 -0
- package/dist/collection/components/co-media-thumb/co-media-thumb.js +9 -2
- package/dist/collection/components/co-menu/co-menu.css +70 -0
- package/dist/collection/components/co-menu/co-menu.js +146 -6
- package/dist/collection/components/co-menu-divider/co-menu-divider.css +21 -0
- package/dist/collection/components/co-menu-divider/co-menu-divider.js +2 -1
- package/dist/collection/components/co-menu-item/co-menu-item.css +56 -6
- package/dist/collection/components/co-menu-item/co-menu-item.js +60 -4
- package/dist/collection/components/co-modal/co-modal.css +218 -1
- package/dist/collection/components/co-modal/co-modal.js +354 -12
- package/dist/collection/components/co-navbar/co-navbar.css +7 -0
- package/dist/collection/components/co-navbar/co-navbar.js +4 -2
- package/dist/collection/components/co-number-field/co-number-field.js +29 -15
- package/dist/collection/components/co-option-list/co-option-list.css +102 -21
- package/dist/collection/components/co-option-list/co-option-list.js +37 -16
- package/dist/collection/components/co-overlay/co-overlay.css +4 -0
- package/dist/collection/components/co-overlay/co-overlay.js +17 -3
- package/dist/collection/components/co-page-header/co-page-header.js +4 -1
- package/dist/collection/components/co-phone-field/co-phone-field.js +1 -1
- package/dist/collection/components/co-popover/co-popover.css +20 -2
- package/dist/collection/components/co-popover/co-popover.js +148 -10
- package/dist/collection/components/co-progress-bar/co-progress-bar.js +5 -2
- package/dist/collection/components/co-progress-circle/co-progress-circle.js +5 -2
- package/dist/collection/components/co-provider-logo/co-provider-logo.js +3 -0
- package/dist/collection/components/co-radio/co-radio.js +11 -3
- package/dist/collection/components/co-radio-group/co-radio-group.js +9 -4
- package/dist/collection/components/co-rating/co-rating.js +25 -13
- package/dist/collection/components/co-ref-field/co-ref-field.css +14 -0
- package/dist/collection/components/co-ref-field/co-ref-field.js +55 -27
- package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.js +66 -111
- package/dist/collection/components/co-rich-text-toolbar/co-rich-text-toolbar.css +12 -0
- package/dist/collection/components/co-rich-text-toolbar/co-rich-text-toolbar.js +127 -19
- package/dist/collection/components/co-rich-text-viewer/co-rich-text-viewer.js +16 -1
- package/dist/collection/components/co-row/co-row.js +5 -2
- package/dist/collection/components/co-segmented-bar/co-segmented-bar.js +9 -3
- package/dist/collection/components/co-select/co-select.css +207 -11
- package/dist/collection/components/co-select/co-select.js +198 -48
- package/dist/collection/components/co-select/virtualRows.js +57 -0
- package/dist/collection/components/co-separator/co-separator.js +8 -1
- package/dist/collection/components/co-sidebar/co-sidebar.js +10 -2
- package/dist/collection/components/co-sidebar-nav/co-sidebar-nav.css +15 -0
- package/dist/collection/components/co-sidebar-nav/co-sidebar-nav.js +20 -4
- package/dist/collection/components/co-skeleton/co-skeleton.js +4 -1
- package/dist/collection/components/co-slider/co-slider.css +155 -5
- package/dist/collection/components/co-slider/co-slider.js +263 -32
- package/dist/collection/components/co-swatch-grid/co-swatch-grid.css +56 -0
- package/dist/collection/components/co-swatch-grid/co-swatch-grid.js +293 -0
- package/dist/collection/components/co-switch/co-switch.css +4 -0
- package/dist/collection/components/co-switch/co-switch.js +12 -3
- package/dist/collection/components/co-tab/co-tab.css +60 -0
- package/dist/collection/components/co-tab/co-tab.js +44 -6
- package/dist/collection/components/co-tab-group/co-tab-group.css +24 -0
- package/dist/collection/components/co-tab-group/co-tab-group.js +133 -2
- package/dist/collection/components/co-tab-group/revealTab.js +26 -0
- package/dist/collection/components/co-tags-field/co-tags-field.js +21 -14
- package/dist/collection/components/co-textarea/co-textarea.js +4 -4
- package/dist/collection/components/co-tile/co-tile.css +63 -0
- package/dist/collection/components/co-tile/co-tile.js +167 -0
- package/dist/collection/components/co-time-field/co-time-field.js +9 -4
- package/dist/collection/components/co-toast/co-toast.css +11 -0
- package/dist/collection/components/co-toast/co-toast.js +13 -4
- package/dist/collection/components/co-toggle-button/co-toggle-button.css +106 -0
- package/dist/collection/components/co-toggle-button/co-toggle-button.js +91 -15
- package/dist/collection/components/co-toggle-button-group/co-toggle-button-group.css +21 -0
- package/dist/collection/components/co-toggle-button-group/co-toggle-button-group.js +41 -11
- package/dist/collection/components/co-tooltip/co-tooltip.css +36 -0
- package/dist/collection/components/co-tooltip/co-tooltip.js +61 -3
- package/dist/collection/components/co-transfer-list/co-transfer-list.js +19 -10
- package/dist/collection/components/co-tree-item/co-tree-item.css +235 -0
- package/dist/collection/components/co-tree-item/co-tree-item.js +355 -0
- package/dist/collection/components/co-tree-item/treeItemI18n.js +16 -0
- package/dist/collection/components/co-video/co-video.css +11 -0
- package/dist/collection/components/co-video/co-video.js +41 -22
- package/dist/collection/utils/color.js +9 -5
- package/dist/collection/utils/dragMove.js +95 -0
- package/dist/collection/utils/gradientBarI18n.js +24 -0
- package/dist/collection/utils/gradientStops.js +142 -0
- package/dist/collection/utils/hsv.js +114 -0
- package/dist/collection/utils/kbdI18n.js +29 -0
- package/dist/collection/utils/positioning.js +44 -18
- package/dist/collection/utils/rich-text-host.js +109 -0
- package/dist/collection/utils/richTextI18n.js +45 -0
- package/dist/collection/utils/submenu.js +23 -3
- package/dist/collection/utils/swatchGridI18n.js +14 -0
- package/dist/collection/utils/test/fake-block-layout.js +41 -0
- package/dist/collection/utils/test/prosemirror-dom-shim.js +17 -0
- package/dist/collection/utils/test/shared-contract-css.js +9 -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-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.js +1 -1
- 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-area.d.ts +11 -0
- package/dist/components/co-color-area.js +1 -0
- package/dist/components/co-color-picker.js +1 -1
- package/dist/components/co-color-slider.d.ts +11 -0
- package/dist/components/co-color-slider.js +1 -0
- 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-document-editor.d.ts +11 -0
- package/dist/components/co-document-editor.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-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-gradient-bar.d.ts +11 -0
- package/dist/components/co-gradient-bar.js +1 -0
- 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-kbd.d.ts +11 -0
- package/dist/components/co-kbd.js +1 -0
- 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-segmented-bar.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-swatch-grid.d.ts +11 -0
- package/dist/components/co-swatch-grid.js +1 -0
- 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-tile.d.ts +11 -0
- package/dist/components/co-tile.js +1 -0
- package/dist/components/co-time-field.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-tree-item.d.ts +11 -0
- package/dist/components/co-tree-item.js +1 -0
- package/dist/components/co-video.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/p-8XzG8pzY.js +1 -0
- package/dist/components/p-9VoFSbIH.js +1 -0
- package/dist/components/p-B1JT7us1.js +1 -0
- package/dist/components/{p-Dc_Kbari.js → p-B3Egz082.js} +1 -1
- package/dist/components/p-B9wdMd_0.js +1 -0
- package/dist/components/p-BRZci8B3.js +1 -0
- package/dist/components/{p-BRbgGqLw.js → p-BVGGRfNG.js} +1 -1
- package/dist/components/{p-B56LX2SH.js → p-BVdCvEza.js} +1 -1
- package/dist/components/p-BdmzslA5.js +1 -0
- package/dist/components/p-BmdKHBZP.js +1 -0
- package/dist/components/p-BtliEQAT.js +1 -0
- package/dist/components/{p-CT2enQ6h.js → p-Bw_b_czs.js} +1 -1
- package/dist/components/{p-NNxjElcX.js → p-C4sZjIDj.js} +1 -1
- package/dist/components/{p-Nt4JJxbL.js → p-C6WHpL5X.js} +1 -1
- package/dist/components/p-COJdaKBU.js +1 -0
- package/dist/components/p-COozgrEk.js +1 -0
- package/dist/components/{p-BAYo-RBt.js → p-CRxTFT_z.js} +1 -1
- package/dist/components/{p-uxdXViMV.js → p-CiYPJW0B.js} +1 -1
- package/dist/components/p-Cnfd6Zze.js +1 -0
- package/dist/components/{p-BhCVadcA.js → p-CxWo3qDo.js} +1 -1
- package/dist/components/p-D4XP17VP.js +1 -0
- package/dist/components/{p-e5KibEs8.js → p-DJ468fPu.js} +1 -1
- package/dist/components/p-DU-KOQ8L.js +1 -0
- package/dist/components/p-DXLeDZvr.js +1 -0
- package/dist/components/{p-DvR45CLa.js → p-Dn2wblrA.js} +1 -1
- package/dist/components/p-Dnz99Ox_.js +1 -0
- package/dist/components/p-DsuFNmTI.js +1 -0
- package/dist/components/{p-Du_CgT5E.js → p-Du8EpQb-.js} +1 -1
- package/dist/components/{p-DFlJMEJ-.js → p-DymSqdlK.js} +1 -1
- package/dist/components/p-Hi57w2_2.js +1 -0
- package/dist/components/{p-DNJAIVfI.js → p-KK2vAKs-.js} +1 -1
- package/dist/components/p-RVQJEYxa.js +1 -0
- package/dist/components/p-TGRbLkLz.js +1 -0
- package/dist/components/p-VcrjNCew.js +1 -0
- package/dist/components/{p-Dxa7c4Ap.js → p-dnaee7fS.js} +1 -1
- package/dist/components/p-nrwDl_gx.js +1 -0
- package/dist/components/{p-P4HlMBlL.js → p-zJ3pjFzW.js} +1 -1
- package/dist/esm/co-accordion.entry.js +3 -3
- package/dist/esm/co-action-bar.entry.js +3 -3
- package/dist/esm/co-app-shell.entry.js +3 -3
- package/dist/esm/co-audio-player.entry.js +4 -4
- package/dist/esm/co-autocomplete.entry.js +12 -5
- package/dist/esm/co-avatar-group.entry.js +3 -3
- package/dist/esm/co-avatar.entry.js +7 -4
- 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 +4 -3
- package/dist/esm/co-button.entry.js +9 -7
- package/dist/esm/co-calendar-month_2.entry.js +16 -4
- package/dist/esm/co-calendar_3.entry.js +76 -27
- package/dist/esm/co-card.entry.js +3 -3
- package/dist/esm/co-carousel-item.entry.js +2 -2
- package/dist/esm/co-carousel.entry.js +6 -3
- package/dist/esm/co-checkbox-group.entry.js +4 -4
- package/dist/esm/co-checkbox.entry.js +13 -5
- package/dist/esm/co-chip_2.entry.js +20 -7
- package/dist/esm/co-color-area.entry.js +167 -0
- package/dist/esm/co-color-picker.entry.js +5 -5
- package/dist/esm/co-color-slider.entry.js +187 -0
- package/dist/esm/co-column-picker.entry.js +23 -3
- package/dist/esm/co-combobox.entry.js +5 -5
- package/dist/esm/co-command-search.entry.js +5 -5
- package/dist/esm/co-data-table-pagination.entry.js +5 -5
- package/dist/esm/co-data-table.entry.js +3 -3
- package/dist/esm/co-date-picker.entry.js +10 -2
- package/dist/esm/co-date-range-picker.entry.js +11 -2
- package/dist/esm/co-date-range.entry.js +8 -2
- package/dist/esm/co-date-time-picker.entry.js +11 -4
- package/dist/esm/co-document-editor.entry.js +1165 -0
- 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 +3 -3
- package/dist/esm/co-empty-state.entry.js +3 -3
- package/dist/esm/co-event-calendar.entry.js +5 -3
- package/dist/esm/co-event-popover.entry.js +7 -3
- package/dist/esm/co-fab.entry.js +7 -3
- package/dist/esm/co-file-field.entry.js +12 -8
- package/dist/esm/co-file-type-tile.entry.js +3 -3
- package/dist/esm/co-gradient-bar.entry.js +218 -0
- package/dist/esm/co-helper-text.entry.js +3 -3
- package/dist/esm/co-icon-button.entry.js +48 -9
- package/dist/esm/co-icon.entry.js +3 -3
- package/dist/esm/co-input.entry.js +14 -8
- package/dist/esm/co-json-field.entry.js +10 -5
- package/dist/esm/{co-tooltip.entry.js → co-kbd_2.entry.js} +194 -7
- package/dist/esm/co-lightbox.entry.js +5 -5
- 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 +3 -3
- package/dist/esm/co-menu-item.entry.js +39 -41
- package/dist/esm/co-menu.entry.js +81 -5
- package/dist/esm/co-modal.entry.js +350 -7
- package/dist/esm/co-navbar.entry.js +3 -3
- package/dist/esm/co-number-field.entry.js +11 -5
- package/dist/esm/co-overlay.entry.js +8 -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 +69 -6
- 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 +2 -2
- package/dist/esm/co-radio-group.entry.js +4 -4
- package/dist/esm/co-radio.entry.js +4 -4
- package/dist/esm/co-rating.entry.js +11 -4
- package/dist/esm/co-ref-field.entry.js +14 -5
- package/dist/esm/co-rich-text-editor.entry.js +40 -92
- package/dist/esm/co-rich-text-toolbar.entry.js +80 -20
- package/dist/esm/co-rich-text-viewer.entry.js +9 -2
- package/dist/esm/co-row.entry.js +3 -3
- package/dist/esm/co-segmented-bar.entry.js +3 -3
- package/dist/esm/co-select.entry.js +171 -29
- package/dist/esm/co-separator.entry.js +2 -2
- package/dist/esm/co-sidebar-nav.entry.js +20 -5
- package/dist/esm/co-sidebar.entry.js +3 -3
- package/dist/esm/co-slider.entry.js +209 -23
- package/dist/esm/co-swatch-grid.entry.js +119 -0
- package/dist/esm/co-switch.entry.js +5 -5
- package/dist/esm/co-tab-group.entry.js +113 -4
- package/dist/esm/co-tab.entry.js +15 -5
- package/dist/esm/co-tags-field.entry.js +13 -8
- package/dist/esm/co-textarea.entry.js +6 -6
- package/dist/esm/co-tile.entry.js +59 -0
- package/dist/esm/co-time-field.entry.js +5 -2
- package/dist/esm/co-toast.entry.js +3 -3
- package/dist/esm/co-toggle-button-group.entry.js +29 -5
- package/dist/esm/co-toggle-button.entry.js +70 -6
- package/dist/esm/co-transfer-list.entry.js +7 -3
- package/dist/esm/co-tree-item.entry.js +108 -0
- package/dist/esm/co-video.entry.js +11 -3
- package/dist/esm/cobalt.js +3 -3
- package/dist/esm/{color-BRbgGqLw.js → color-BVGGRfNG.js} +10 -6
- package/dist/esm/{fieldChip-uyggU8VV.js → fieldChip-B2ctp2m6.js} +1 -1
- package/dist/esm/gradientStops-DDK0y8ra.js +145 -0
- package/dist/esm/hsv-COJdaKBU.js +90 -0
- package/dist/esm/index-Cpo8HTwr.js +142 -0
- package/dist/esm/{index-DH5lfRNj.js → index-DJkaRtbb.js} +67 -28
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{index-BBIYyvq-.js → pagination-D9OfZUnY.js} +1728 -297
- package/dist/esm/{positioning-DFHRS9cJ.js → positioning-BtliEQAT.js} +45 -19
- package/dist/esm/{requiredMark-BCJUuZvC.js → requiredMark-D5C5NzOE.js} +1 -1
- package/dist/esm/rich-text-host-BmdKHBZP.js +111 -0
- package/dist/esm/{richTextI18n-BYKAgwq3.js → richTextI18n-xnrKkNWQ.js} +45 -0
- package/dist/esm/submenu-DU-KOQ8L.js +57 -0
- package/dist/esm/{toolbar-config-BAYo-RBt.js → toolbar-config-CRxTFT_z.js} +32 -0
- package/dist/types/components/co-accordion/co-accordion.d.ts +10 -0
- package/dist/types/components/co-action-bar/co-action-bar.d.ts +1 -0
- package/dist/types/components/co-app-shell/co-app-shell.d.ts +11 -0
- package/dist/types/components/co-audio-player/co-audio-player.d.ts +16 -0
- package/dist/types/components/co-autocomplete/co-autocomplete.d.ts +21 -0
- package/dist/types/components/co-avatar/co-avatar.d.ts +11 -2
- package/dist/types/components/co-avatar-group/co-avatar-group.d.ts +5 -0
- package/dist/types/components/co-badge/co-badge.d.ts +7 -0
- package/dist/types/components/co-bottom-sheet/co-bottom-sheet.d.ts +9 -0
- package/dist/types/components/co-breadcrumb/co-breadcrumb.d.ts +4 -0
- package/dist/types/components/co-breadcrumb-item/co-breadcrumb-item.d.ts +6 -0
- package/dist/types/components/co-button/co-button.d.ts +12 -4
- package/dist/types/components/co-button-group/co-button-group.d.ts +7 -0
- package/dist/types/components/co-calendar/calendarMarks.d.ts +15 -0
- package/dist/types/components/co-calendar/co-calendar.d.ts +18 -0
- package/dist/types/components/co-calendar-timegrid/co-calendar-timegrid.d.ts +23 -0
- package/dist/types/components/co-card/co-card.d.ts +9 -0
- package/dist/types/components/co-carousel/co-carousel.d.ts +12 -0
- package/dist/types/components/co-checkbox/co-checkbox.d.ts +15 -0
- package/dist/types/components/co-checkbox-group/co-checkbox-group.d.ts +5 -0
- package/dist/types/components/co-chip/co-chip.d.ts +13 -0
- package/dist/types/components/co-color-area/co-color-area.d.ts +65 -0
- package/dist/types/components/co-color-picker/co-color-picker.d.ts +2 -0
- package/dist/types/components/co-color-slider/co-color-slider.d.ts +62 -0
- package/dist/types/components/co-column-picker/co-column-picker.d.ts +32 -0
- package/dist/types/components/co-combobox/co-combobox.d.ts +14 -0
- package/dist/types/components/co-command-search/co-command-search.d.ts +15 -0
- package/dist/types/components/co-data-table/co-data-table.d.ts +5 -0
- package/dist/types/components/co-data-table-pagination/co-data-table-pagination.d.ts +12 -0
- package/dist/types/components/co-date-field/co-date-field.d.ts +11 -0
- package/dist/types/components/co-date-picker/co-date-picker.d.ts +30 -0
- package/dist/types/components/co-date-range/co-date-range.d.ts +12 -0
- package/dist/types/components/co-date-range-picker/co-date-range-picker.d.ts +33 -0
- package/dist/types/components/co-date-time-picker/co-date-time-picker.d.ts +22 -1
- package/dist/types/components/co-document-editor/change-throttle.d.ts +9 -0
- package/dist/types/components/co-document-editor/co-document-editor.d.ts +284 -0
- package/dist/types/components/co-document-editor/document-props.d.ts +6 -0
- package/dist/types/components/co-document-editor/header-tools.d.ts +11 -0
- package/dist/types/components/co-document-editor/image-bar.d.ts +50 -0
- package/dist/types/components/co-document-editor/page-styles.d.ts +1 -0
- package/dist/types/components/co-document-editor/zoom.d.ts +26 -0
- package/dist/types/components/co-drawer/co-drawer.d.ts +13 -0
- package/dist/types/components/co-drive-card/co-drive-card.d.ts +13 -0
- package/dist/types/components/co-drop-zone/co-drop-zone.d.ts +6 -1
- package/dist/types/components/co-emoji-picker/co-emoji-picker.d.ts +9 -0
- package/dist/types/components/co-empty-state/co-empty-state.d.ts +2 -0
- package/dist/types/components/co-event-calendar/co-event-calendar.d.ts +12 -16
- package/dist/types/components/co-event-popover/co-event-popover.d.ts +13 -0
- package/dist/types/components/co-fab/co-fab.d.ts +11 -0
- package/dist/types/components/co-file-field/co-file-field.d.ts +6 -0
- package/dist/types/components/co-file-type-tile/co-file-type-tile.d.ts +7 -0
- package/dist/types/components/co-gradient-bar/co-gradient-bar.d.ts +77 -0
- package/dist/types/components/co-helper-text/co-helper-text.d.ts +2 -0
- package/dist/types/components/co-icon/co-icon.d.ts +4 -0
- package/dist/types/components/co-icon-button/co-icon-button.d.ts +39 -2
- package/dist/types/components/co-input/co-input.d.ts +25 -5
- package/dist/types/components/co-json-field/co-json-field.d.ts +11 -0
- package/dist/types/components/co-kbd/co-kbd.d.ts +50 -0
- package/dist/types/components/co-list-footer/co-list-footer.d.ts +3 -0
- package/dist/types/components/co-list-item/co-list-item.d.ts +3 -0
- package/dist/types/components/co-loader/co-loader.d.ts +5 -0
- package/dist/types/components/co-media-thumb/co-media-thumb.d.ts +7 -0
- package/dist/types/components/co-menu/co-menu.d.ts +42 -1
- package/dist/types/components/co-menu-divider/co-menu-divider.d.ts +1 -0
- package/dist/types/components/co-menu-item/co-menu-item.d.ts +19 -0
- package/dist/types/components/co-modal/co-modal.d.ts +126 -5
- package/dist/types/components/co-navbar/co-navbar.d.ts +2 -0
- package/dist/types/components/co-number-field/co-number-field.d.ts +20 -0
- package/dist/types/components/co-option-list/co-option-list.d.ts +29 -1
- package/dist/types/components/co-option-list/optionListLogic.d.ts +3 -0
- package/dist/types/components/co-overlay/co-overlay.d.ts +10 -0
- package/dist/types/components/co-page-header/co-page-header.d.ts +3 -0
- package/dist/types/components/co-popover/co-popover.d.ts +51 -0
- package/dist/types/components/co-progress-bar/co-progress-bar.d.ts +3 -0
- package/dist/types/components/co-progress-circle/co-progress-circle.d.ts +3 -0
- package/dist/types/components/co-provider-logo/co-provider-logo.d.ts +3 -0
- package/dist/types/components/co-radio/co-radio.d.ts +8 -0
- package/dist/types/components/co-radio-group/co-radio-group.d.ts +5 -0
- package/dist/types/components/co-rating/co-rating.d.ts +15 -0
- package/dist/types/components/co-ref-field/co-ref-field.d.ts +42 -0
- package/dist/types/components/co-rich-text-editor/co-rich-text-editor.d.ts +31 -5
- package/dist/types/components/co-rich-text-toolbar/co-rich-text-toolbar.d.ts +20 -2
- package/dist/types/components/co-rich-text-viewer/co-rich-text-viewer.d.ts +8 -0
- package/dist/types/components/co-row/co-row.d.ts +3 -0
- package/dist/types/components/co-segmented-bar/co-segmented-bar.d.ts +6 -0
- package/dist/types/components/co-select/co-select.d.ts +73 -5
- package/dist/types/components/co-select/virtualRows.d.ts +44 -0
- package/dist/types/components/co-separator/co-separator.d.ts +7 -0
- package/dist/types/components/co-sidebar/co-sidebar.d.ts +8 -0
- package/dist/types/components/co-sidebar-nav/co-sidebar-nav.d.ts +1 -0
- package/dist/types/components/co-skeleton/co-skeleton.d.ts +3 -0
- package/dist/types/components/co-slider/co-slider.d.ts +160 -1
- package/dist/types/components/co-swatch-grid/co-swatch-grid.d.ts +38 -0
- package/dist/types/components/co-switch/co-switch.d.ts +9 -0
- package/dist/types/components/co-tab/co-tab.d.ts +20 -2
- package/dist/types/components/co-tab-group/co-tab-group.d.ts +46 -0
- package/dist/types/components/co-tab-group/revealTab.d.ts +29 -0
- package/dist/types/components/co-tags-field/co-tags-field.d.ts +11 -0
- package/dist/types/components/co-tile/co-tile.d.ts +45 -0
- package/dist/types/components/co-time-field/co-time-field.d.ts +5 -0
- package/dist/types/components/co-toast/co-toast.d.ts +9 -0
- package/dist/types/components/co-toggle-button/co-toggle-button.d.ts +45 -2
- package/dist/types/components/co-toggle-button-group/co-toggle-button-group.d.ts +30 -2
- package/dist/types/components/co-tooltip/co-tooltip.d.ts +22 -0
- package/dist/types/components/co-transfer-list/co-transfer-list.d.ts +12 -0
- package/dist/types/components/co-tree-item/co-tree-item.d.ts +75 -0
- package/dist/types/components/co-tree-item/treeItemI18n.d.ts +6 -0
- package/dist/types/components/co-video/co-video.d.ts +31 -0
- package/dist/types/components.d.ts +3905 -85
- package/dist/types/utils/color.d.ts +9 -1
- package/dist/types/utils/dragMove.d.ts +63 -0
- package/dist/types/utils/gradientBarI18n.d.ts +8 -0
- package/dist/types/utils/gradientStops.d.ts +63 -0
- package/dist/types/utils/hsv.d.ts +44 -0
- package/dist/types/utils/kbdI18n.d.ts +25 -0
- package/dist/types/utils/positioning.d.ts +24 -0
- package/dist/types/utils/rich-text-host.d.ts +41 -0
- package/dist/types/utils/richTextI18n.d.ts +15 -0
- package/dist/types/utils/submenu.d.ts +16 -2
- package/dist/types/utils/swatchGridI18n.d.ts +6 -0
- package/dist/types/utils/test/fake-block-layout.d.ts +7 -0
- package/dist/types/utils/test/prosemirror-dom-shim.d.ts +1 -0
- package/dist/types/utils/test/shared-contract-css.d.ts +9 -0
- package/package.json +5 -5
- package/dist/cobalt/p-0678c797.entry.js +0 -1
- package/dist/cobalt/p-1d3a79af.entry.js +0 -1
- package/dist/cobalt/p-216a63ee.entry.js +0 -1
- package/dist/cobalt/p-3d31c575.entry.js +0 -1
- package/dist/cobalt/p-416795f5.entry.js +0 -1
- package/dist/cobalt/p-56551580.entry.js +0 -1
- package/dist/cobalt/p-58137c9e.entry.js +0 -1
- package/dist/cobalt/p-5a3e4c81.entry.js +0 -1
- package/dist/cobalt/p-5c756787.entry.js +0 -1
- package/dist/cobalt/p-67f3b9d6.entry.js +0 -1
- package/dist/cobalt/p-6a4f3179.entry.js +0 -1
- package/dist/cobalt/p-71cbc53c.entry.js +0 -1
- package/dist/cobalt/p-72e52af7.entry.js +0 -1
- package/dist/cobalt/p-8530ad16.entry.js +0 -1
- package/dist/cobalt/p-8a74bf7d.entry.js +0 -1
- package/dist/cobalt/p-8e05b979.entry.js +0 -1
- package/dist/cobalt/p-8ebc0c12.entry.js +0 -1
- package/dist/cobalt/p-8f2199ff.entry.js +0 -1
- package/dist/cobalt/p-9246e09c.entry.js +0 -1
- package/dist/cobalt/p-99a655f6.entry.js +0 -1
- package/dist/cobalt/p-BYKAgwq3.js +0 -1
- package/dist/cobalt/p-CJW9H3Gi.js +0 -1
- package/dist/cobalt/p-DFHRS9cJ.js +0 -1
- package/dist/cobalt/p-DH5lfRNj.js +0 -2
- package/dist/cobalt/p-a1b422ca.entry.js +0 -1
- package/dist/cobalt/p-ade07307.entry.js +0 -1
- package/dist/cobalt/p-b0762fd8.entry.js +0 -1
- package/dist/cobalt/p-b698188c.entry.js +0 -1
- package/dist/cobalt/p-bde32f8b.entry.js +0 -1
- package/dist/cobalt/p-d375014b.entry.js +0 -1
- package/dist/cobalt/p-db805569.entry.js +0 -1
- package/dist/cobalt/p-e3aae282.entry.js +0 -1
- package/dist/cobalt/p-e49a564c.entry.js +0 -1
- package/dist/cobalt/p-ef301976.entry.js +0 -1
- package/dist/cobalt/p-fMqVDypp.js +0 -1
- package/dist/components/p-2EOI1nrz.js +0 -1
- package/dist/components/p-7TncUlLN.js +0 -1
- package/dist/components/p-B4NCaKrR.js +0 -1
- package/dist/components/p-BGDqldEg.js +0 -1
- package/dist/components/p-BJh68Jqe.js +0 -1
- package/dist/components/p-BrAFTkAn.js +0 -1
- package/dist/components/p-Bsh0JMGf.js +0 -1
- package/dist/components/p-CJW9H3Gi.js +0 -1
- package/dist/components/p-CWCYYQrF.js +0 -1
- package/dist/components/p-D9T7zKeL.js +0 -1
- package/dist/components/p-DFHRS9cJ.js +0 -1
- package/dist/components/p-DTPYZwaZ.js +0 -1
- package/dist/components/p-Dcg4krSX.js +0 -1
- package/dist/components/p-Dh8ffSjK.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as i,h as o,a as t}from"./p-DH5lfRNj.js";import{R as r}from"./p-fMqVDypp.js";import{g as a,f as s}from"./p-gKnOhsd2.js";function c(e){if(null==e||isNaN(e))return"";if(e<1024)return`${e} B`;const i=e=>e.toFixed(2).replace(/\.?0+$/,"");return e<1048576?`${i(e/1024)} KB`:`${i(e/1048576)} MB`}const n=new Set(["png","jpg","jpeg","gif","webp","svg","avif","bmp"]),l=new Set(["mp4","mov","webm","m4v","ogv"]);function d(e){const i=(e||"").split("?")[0],o=i.lastIndexOf(".");return o>=0?i.slice(o+1).toLowerCase():""}function f(e){return d(e.name)||d(e.url)}function h(e){return n.has(f(e))}function p(e){return l.has(f(e))}function u(e){return"done"===e.status&&!!e.url&&p(e)}function v(e){return p(e)||h(e)?e.url||e.thumbnail:e.thumbnail||e.url}const _=class{constructor(o){e(this,o),this.coFilesSelected=i(this,"coFilesSelected",3),this.coRemove=i(this,"coRemove",3),this.coClear=i(this,"coClear",3),this.coReorder=i(this,"coReorder",3),this.coCopy=i(this,"coCopy",3),this.coPreviewOpen=i(this,"coPreviewOpen",3),this.disabled=!1,this.readonly=!1,this.required=!1,this.multiple=!1,this.maxFiles=100,this.status="default",this.layout="vertical",this.reorderable=!0,this.files="[]",this.dragOver=!1,this.localError="",this.copiedKey="",this.armedKey="",this.dragKey="",this.overKey="",this.failedPreviews=new Set,this.tempSeq=0,this.lastFilesStr="",this.lastParsed=[],this.handleDragOver=e=>{this.disabled||this.readonly||this.dragKey||(e.preventDefault(),this.dragOver=!0)},this.handleDragLeave=e=>{const i=e.relatedTarget;i&&e.currentTarget instanceof Node&&e.currentTarget.contains(i)||(this.dragOver=!1)},this.handleDrop=e=>{var i;e.preventDefault(),this.dragOver=!1,this.dragKey||(null===(i=e.dataTransfer)||void 0===i?void 0:i.files)&&this.handleFiles(e.dataTransfer.files)},this.handleBrowse=e=>{var i;this.disabled||this.readonly||e&&this.fromActionsSlot(e)||null===(i=this.inputEl)||void 0===i||i.click()},this.handleInputChange=e=>{const i=e.target;i.files&&this.handleFiles(i.files),i.value=""},this.disarmDrag=()=>{this.armedKey&&!this.dragKey&&(this.armedKey="")},this.handleRowDragEnd=()=>{this.resetDragState()}}componentWillLoad(){this.failedPreviews||(this.failedPreviews=new Set)}connectedCallback(){window.addEventListener("mouseup",this.disarmDrag)}disconnectedCallback(){window.removeEventListener("mouseup",this.disarmDrag),clearTimeout(this.copiedTimer),this.closeLightbox()}get parsedFiles(){const e=this.files;if("string"!=typeof e||!e.trim())return[];if(e===this.lastFilesStr)return this.lastParsed;let i=[];try{const o=JSON.parse(e);Array.isArray(o)&&(i=o)}catch(e){}return this.lastFilesStr=e,this.lastParsed=i,i}get strings(){return a(this.locale)}get acceptList(){const e=this.accept;if(!e)return[];let i=[];try{const o=JSON.parse(e);Array.isArray(o)&&(i=o.map(String))}catch(o){i=e.split(",")}return i.map((e=>e.trim().toLowerCase().replace(/^\./,""))).filter((e=>e&&"*"!==e))}get isInvalid(){return"error"===this.status||!!this.localError}get inputAccept(){const e=this.acceptList;if(e.length)return e.map((e=>e.includes("/")?e:`.${e}`)).join(",")}extOf(e){const i=e.lastIndexOf(".");return i>=0?e.slice(i+1).toLowerCase():""}validate(e){const i=this.acceptList;if(i.length){const o=this.extOf(e.name),t=i.includes(o),r=i.some((i=>i.includes("/")&&e.type===i));if(!t&&!r)return s(this.strings.errInvalidFormat,{x:o})}return this.maxBytes&&e.size>this.maxBytes?s(this.strings.errTooLarge,{x:c(e.size)}):null}handleFiles(e){if(this.disabled||this.readonly)return;this.localError="";const i=Array.from(e);if(!i.length)return;const o=this.multiple?i:i.slice(0,1);if(this.multiple){const e=this.maxFiles-this.parsedFiles.length;if(e<=0)return void(this.localError=s(this.strings.errMaxFiles,{n:this.maxFiles}));o.length>e&&(o.length=e)}const t=[],r=[];for(const e of o){const i=this.validate(e);i?this.localError=i:(t.push(e),r.push(`tmp-${Date.now()}-${this.tempSeq++}`))}t.length&&this.coFilesSelected.emit({files:t,tempIds:r})}fromActionsSlot(e){return e.composedPath().some((e=>{var i,o;return"actions"===(null===(o=(i=e).getAttribute)||void 0===o?void 0:o.call(i,"slot"))}))}keyFor(e){var i;return e.id||e.tempId||`${e.name}:${null!==(i=e.size)&&void 0!==i?i:""}`}handleCopy(e){var i;const o=e.url||"";if(!o)return;const t=this.keyFor(e);this.coCopy.emit({id:t,url:o}),(null===(i=navigator.clipboard)||void 0===i?void 0:i.writeText)&&navigator.clipboard.writeText(o).then((()=>{this.copiedKey=t,clearTimeout(this.copiedTimer),this.copiedTimer=setTimeout((()=>this.copiedKey=""),1500)})).catch((()=>{}))}previewItems(){return this.parsedFiles.filter((e=>{return(function(e){return"done"===e.status&&!u(e)&&!(!e.thumbnail&&!e.url)&&(!!e.thumbnail||h(e))}(i=e)||u(i))&&(u(e)||!this.failedPreviews.has(this.keyFor(e)));var i}))}handlePreviewOpen(e){const i=e.url||e.thumbnail;if(!i)return;this.coPreviewOpen.emit({id:this.keyFor(e),url:i});const o=this.previewItems(),t=o.map((e=>u(e)?{src:v(e),thumbnail:e.thumbnail,alt:e.name,kind:"video",poster:e.thumbnail}:{src:v(e),thumbnail:e.thumbnail,alt:e.name})),r=Math.max(0,o.findIndex((i=>this.keyFor(i)===this.keyFor(e))));this.closeLightbox();const a=document.createElement("co-lightbox");a.images=JSON.stringify(t),a.startIndex=r,this.locale&&(a.locale=this.locale),a.addEventListener("coClose",(()=>this.closeLightbox())),document.body.appendChild(a),this.lightboxEl=a,requestAnimationFrame((()=>{a.open=!0}))}closeLightbox(){const e=this.lightboxEl;this.lightboxEl=void 0,e&&(e.open=!1,setTimeout((()=>e.remove()),220))}handlePreviewError(e){this.failedPreviews=new Set([...this.failedPreviews,this.keyFor(e)])}handleRowDragStart(e,i){this.armedKey===i?(this.dragKey=i,e.dataTransfer&&(e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",i))):e.preventDefault()}handleRowDragOver(e,i){this.dragKey&&this.dragKey!==i&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="move"),this.overKey=i)}handleRowDrop(e,i){e.preventDefault(),e.stopPropagation();const o=this.parsedFiles.map((e=>this.keyFor(e))),t=o.indexOf(this.dragKey),r=o.indexOf(i);this.resetDragState(),t<0||r<0||t===r||(o.splice(r,0,...o.splice(t,1)),this.coReorder.emit(o))}resetDragState(){this.armedKey="",this.dragKey="",this.overKey=""}capacityHint(e){const i=this.maxBytes?c(this.maxBytes):"";return this.multiple&&this.maxBytes?s(e.helperBoth,{n:this.maxFiles,x:i}):this.multiple?s(e.helperFiles,{n:this.maxFiles}):this.maxBytes?s(e.helperBytes,{x:i}):""}render(){const e=this.strings,i=this.parsedFiles,t=this.localError||this.helperText,a=!(this.readonly||(this.multiple?this.multiple&&i.length>=this.maxFiles:0!==i.length)),s="default"!==this.status?`co-file-field--${this.status}`:"",n=this.previewItems(),l=this.reorderable&&this.multiple&&!this.disabled&&!this.readonly&&i.length>1,d=this.capacityHint(e);return o("div",{key:"47a8258c141901fcb3621a24d638f0849946172e",class:{"co-file-field":!0,"co-file-field--disabled":this.disabled,"co-file-field--invalid":this.isInvalid,[s]:!!s},part:"wrapper"},this.label&&o("div",{key:"603d04815a5730f45a2462d6c2904de4c7aa83af",class:"co-file-field__labels"},o("label",{key:"e280970feef1f6fad7c9ce336a5002746231a7c6",class:"co-file-field__label",part:"label"},this.label,o(r,{key:"075b35392df1a5be556dcc9dcbd2130d0a3c91a1",required:this.required}))),a&&o("div",{key:"d9dec9f08bc063239bd7b75acc43813ab3f9aebb",class:{"co-file-field__dropzone":!0,"co-file-field__dropzone--drag":this.dragOver},part:"dropzone",role:"button",tabIndex:this.disabled?-1:0,onClick:this.handleBrowse,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||this.fromActionsSlot(e)||(e.preventDefault(),this.handleBrowse())},onDragOver:this.handleDragOver,onDragLeave:this.handleDragLeave,onDrop:this.handleDrop},o("button",{key:"61afb508be3e46257e2ffdb2bdc62d66e37055ed",class:"co-file-field__upload-btn",part:"upload-button",type:"button",tabIndex:-1},o("co-icon",{key:"96bb8ef3107abbee44fb5bd7c80ff2cbf39915ec",name:"file-arrow-up",size:18}),o("span",{key:"53950664f09064e29d1427530058e0634b287a92"},this.uploadButtonText||e.uploadButton)),o("span",{key:"de085f9dac492ea1b7db278a34e25ec2a8baa1d3",class:"co-file-field__dropzone-text"},this.dropText||e.dropHint),d&&o("span",{key:"1617a52c9773a31ff8617e7310401a95911ecc2f",class:"co-file-field__dropzone-hint"},d),o("div",{key:"f6f07691b5ec339f2ae0fa302415dd3dba04fe69",class:"co-file-field__actions",part:"actions"},o("slot",{key:"b5332b03438a34a82ffb565b1d2901a69729af61",name:"actions"})),o("input",{key:"5d0089ebcd857f1fa97bedcd743ab0530e75715a",ref:e=>this.inputEl=e,class:"co-file-field__input",type:"file",multiple:this.multiple,accept:this.inputAccept,disabled:this.disabled,onChange:this.handleInputChange,"aria-hidden":"true",tabIndex:-1})),i.length>0&&o("div",{key:"cec19c438ec510dbae564c33dd3e6b739e156294",class:"co-file-field__uploaded"},this.multiple&&o("div",{key:"e97f2fe09fb30521d5b22238d2714d8f1002a2ed",class:"co-file-field__uploaded-title",part:"uploaded-title"},`${this.uploadedTitle||e.uploadedTitle} (${i.length})`),n.length>0&&o("div",{key:"569f37799d34182ff00996dd011232daf7f141a8",class:"co-file-field__previews",part:"previews"},n.map((i=>{const t=this.keyFor(i),r=u(i),a=this.failedPreviews.has(t)?"":i.thumbnail;return o("button",{class:{"co-file-field__preview":!0,"co-file-field__preview--video":r},part:"preview",type:"button",key:`prev-${t}`,title:i.name,"aria-label":`${r?e.playVideo:e.openPreview}: ${i.name}`,onClick:()=>this.handlePreviewOpen(i)},(!r||!!a)&&o("img",{src:r?a:i.thumbnail||i.url,alt:i.name,loading:"lazy",onError:()=>this.handlePreviewError(i)}),r&&o("span",{class:"co-file-field__preview-play","aria-hidden":"true"},o("span",{class:"co-file-field__preview-play-badge"},o("co-icon",{name:"play",size:20,weight:"fill"})),!a&&o("span",{class:"co-file-field__preview-ext"},f(i).toUpperCase())))}))),o("ul",{key:"2de5c71b79f82cd50c5aea5818d9848956eeb1eb",class:"co-file-field__list",part:"list"},i.map((i=>{const t=this.keyFor(i),r=l&&"done"===i.status;return o("li",{class:{"co-file-field__row":!0,[`co-file-field__row--${i.status}`]:!0,"co-file-field__row--dragging":this.dragKey===t,"co-file-field__row--drop-target":this.overKey===t},part:"row",key:t,draggable:this.armedKey===t,onDragStart:e=>this.handleRowDragStart(e,t),onDragOver:e=>this.handleRowDragOver(e,t),onDrop:e=>this.handleRowDrop(e,t),onDragEnd:this.handleRowDragEnd},r?o("co-tooltip",{content:e.dragToReorder},o("span",{class:"co-file-field__drag-handle",part:"drag-handle",onMouseDown:()=>this.armedKey=t},o("co-icon",{name:"list",size:18}))):o("co-icon",{name:"error"===i.status?"warning-circle":"uploading"===i.status?"spinner-gap":"file",size:18,class:{"co-file-field__row-icon":!0,"co-file-field__row-icon--spin":"uploading"===i.status}}),o("div",{class:"co-file-field__row-body"},o("span",{class:"co-file-field__row-name",title:i.name},function(e,i=35){return!e||e.length<=i?e:`...${e.slice(-i)}`}(i.name)),"uploading"===i.status&&o("div",{class:"co-file-field__progress"},o("div",{class:"co-file-field__progress-bar",style:"number"==typeof i.progress?{width:`${i.progress}%`}:void 0})),"error"===i.status&&i.error&&o("span",{class:"co-file-field__row-error"},i.error)),null!=i.size&&o("span",{class:"co-file-field__row-size"},c(i.size)),"done"===i.status&&!!i.url&&o("co-tooltip",{content:e.downloadFile},o("a",{class:"co-file-field__action",href:i.url,target:"_blank",rel:"noopener noreferrer",download:i.name,tabIndex:-1,"aria-label":e.downloadFile},o("co-icon",{name:"download",size:18}))),"done"===i.status&&!!i.url&&o("co-tooltip",{content:this.copiedKey===t?e.copied:e.copyUrl},o("button",{class:{"co-file-field__action":!0,"co-file-field__action--copied":this.copiedKey===t},type:"button",tabIndex:-1,"aria-label":e.copyUrl,onClick:()=>this.handleCopy(i)},o("co-icon",{name:this.copiedKey===t?"check":"copy",size:18}))),!this.disabled&&!this.readonly&&o("co-tooltip",{content:e.removeFile},o("button",{class:"co-file-field__action",type:"button",tabIndex:-1,"aria-label":e.removeFile,onClick:()=>this.coRemove.emit(t)},o("co-icon",{name:"trash",size:18}))))})))),t&&o("div",{key:"a6a14de91f12490b54717153520e3f59b9c9ef10",class:{"co-file-field__helper":!0,"co-file-field__helper--error":this.isInvalid},part:"helper"},this.isInvalid&&o("co-icon",{key:"500ff53b0e1b4f894891bfc3f442ca170a2da2d0",name:"warning-circle",size:14,class:"co-file-field__helper-icon"}),o("span",{key:"c723bcbf23a6bcecb9f781aede09120f78fe9b55",class:"co-file-field__helper-text"},t)))}get el(){return t(this)}};_.style=":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}.co-file-field{display:flex;flex-direction:column;gap:var(--co-spacing-sm2)}.co-file-field__labels{display:flex;align-items:center;justify-content:space-between;padding:0 var(--co-spacing-xs)}.co-file-field__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-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)')}.co-file-field__dropzone{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--co-spacing-md);padding:var(--co-spacing-4xl) var(--co-spacing-2xl);background:color-mix(in srgb, var(--co-semantic-surface-hover) 55%, transparent);border:1px dashed var(--co-semantic-border-field);border-radius:var(--co-border-radius-sm);cursor:pointer;text-align:center;transition:border-color var(--co-motion-duration-fast) var(--co-motion-ease-out), background var(--co-motion-duration-fast) var(--co-motion-ease-out)}.co-file-field__dropzone:hover{border-color:var(--co-semantic-border-focus)}.co-file-field__dropzone--drag{border-color:var(--co-semantic-border-focus);background:var(--co-semantic-surface-hover)}.co-file-field__upload-btn{display:inline-flex;align-items:center;gap:var(--co-spacing-sm2);padding:var(--co-spacing-md) var(--co-spacing-xl);margin-bottom:var(--co-spacing-xs);background:var(--co-semantic-surface-secondary);color:var(--co-semantic-text-default);border:none;border-radius:var(--co-border-radius-full);box-shadow:var(--co-shadow-lg);font-family:inherit;font-size:var(--co-font-size-16);font-weight:400;letter-spacing:var(--co-font-letter-spacing-body);line-height:1;cursor:pointer;transition:box-shadow var(--co-motion-duration-fast) var(--co-motion-ease-out), transform var(--co-motion-duration-fast) var(--co-motion-ease-out)}.co-file-field__upload-btn:hover{box-shadow:var(--co-shadow-xl, var(--co-shadow-lg));transform:translateY(-1px)}.co-file-field__upload-btn co-icon{display:inline-flex;flex-shrink:0}.co-file-field__dropzone-text{color:var(--co-semantic-text-default);font-size:var(--co-font-size-18);line-height:1.25}.co-file-field__dropzone-hint{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);line-height:1.25}.co-file-field__actions{display:contents}.co-file-field__input{display:none}.co-file-field__uploaded{display:flex;flex-direction:column;gap:var(--co-spacing-lg);margin-top:var(--co-spacing-sm2)}.co-file-field__uploaded-title{color:var(--co-semantic-text-default);font-size:var(--co-font-size-22);font-weight:500;letter-spacing:-0.03em;line-height:1.25}.co-file-field__previews{display:grid;grid-template-columns:repeat(auto-fill, minmax(150px, 180px));gap:var(--co-spacing-md)}.co-file-field__preview{padding:0;border:none;border-radius:var(--co-border-radius-sm);overflow:hidden;aspect-ratio:3 / 2;background:var(--co-semantic-surface-hover);cursor:pointer}.co-file-field__preview img{display:block;width:100%;height:100%;object-fit:cover;transition:transform var(--co-motion-duration-base) var(--co-motion-ease-out)}.co-file-field__preview:hover img{transform:scale(1.02)}.co-file-field__preview--video{position:relative;background:var(--co-color-base-negro)}.co-file-field__preview-play{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--co-spacing-sm2);color:var(--co-color-base-blanco);pointer-events:none}.co-file-field__preview-play-badge{display:flex;width:40px;height:40px;align-items:center;justify-content:center;border-radius:var(--co-border-radius-full);background:var(--co-color-opacity-negro-80);box-shadow:inset 0 0 0 1px var(--co-color-opacity-blanco-25);transition:transform var(--co-motion-duration-base) var(--co-motion-ease-out)}.co-file-field__preview--video:hover .co-file-field__preview-play-badge{transform:scale(1.08)}.co-file-field__preview-play-badge co-icon{transform:translateX(1px)}.co-file-field__preview-ext{font-family:var(--co-font-family-primary);font-size:var(--co-font-size-12);font-weight:var(--co-font-weight-medium);letter-spacing:var(--co-font-letter-spacing-overline);color:var(--co-color-opacity-blanco-80)}.co-file-field__list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:var(--co-spacing-sm2)}.co-file-field__row{display:flex;align-items:center;gap:var(--co-spacing-lg);padding:var(--co-spacing-xl);background:var(--co-semantic-surface-hover);border:1px solid transparent;border-radius:var(--co-border-radius-sm)}.co-file-field__row--error{border-color:var(--co-semantic-status-error)}.co-file-field__row--dragging{opacity:0.5}.co-file-field__row--drop-target{border-color:var(--co-semantic-border-focus);background:var(--co-semantic-surface-hover)}.co-file-field__drag-handle{flex-shrink:0;display:flex;align-items:center;color:var(--co-semantic-text-secondary);cursor:grab}.co-file-field__drag-handle:active{cursor:grabbing}.co-file-field__row-icon{flex-shrink:0;color:var(--co-semantic-text-secondary);display:flex;align-items:center}.co-file-field__row--error .co-file-field__row-icon{color:var(--co-semantic-status-error)}.co-file-field__row-icon--spin{animation:co-file-spin 0.8s linear infinite}@keyframes co-file-spin{to{transform:rotate(360deg)}}.co-file-field__row-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:var(--co-spacing-xs)}.co-file-field__row-name{color:var(--co-semantic-text-default);font-size:var(--co-font-size-14);line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.co-file-field__row-error{color:var(--co-semantic-status-error);font-size:var(--co-font-size-12)}.co-file-field__row-size{flex-shrink:0;color:var(--co-semantic-text-default);font-size:var(--co-font-size-14);line-height:1;white-space:nowrap}.co-file-field__progress{position:relative;height:4px;border-radius:var(--co-border-radius-full);background:var(--co-semantic-surface-hover);overflow:hidden}.co-file-field__progress-bar{position:absolute;inset:0;width:40%;border-radius:var(--co-border-radius-full);background:var(--co-semantic-status-info);transition:width var(--co-motion-duration-base) var(--co-motion-ease-out)}.co-file-field__progress-bar:not([style]){animation:co-file-indeterminate 1.2s ease-in-out infinite}@keyframes co-file-indeterminate{0%{left:-40%}100%{left:100%}}.co-file-field__action{flex-shrink:0;display:flex;align-items:center;justify-content:center;padding:0;border:none;background:transparent;cursor:pointer;text-decoration:none;color:var(--co-semantic-text-secondary);transition:color var(--co-motion-duration-fast) var(--co-motion-ease-out)}.co-file-field__action:hover{color:var(--co-semantic-text-default)}.co-file-field__action--copied,.co-file-field__action--copied:hover{color:var(--co-color-primary-verde)}.co-file-field__helper{display:flex;align-items:center;gap:var(--co-spacing-xs);padding:0 var(--co-spacing-xs)}.co-file-field__helper-icon{flex-shrink:0;color:var(--co-semantic-text-muted);display:flex;align-items:center}.co-file-field__helper-text{color:var(--co-semantic-text-muted);font-size:var(--co-font-size-14);line-height:1}.co-file-field--disabled{opacity:0.6;pointer-events:none}.co-file-field--invalid .co-file-field__dropzone,.co-file-field--error .co-file-field__dropzone{border-color:var(--co-semantic-status-error)}.co-file-field__helper--error .co-file-field__helper-icon,.co-file-field__helper--error .co-file-field__helper-text{color:var(--co-semantic-status-error)}:host([layout='horizontal']) .co-file-field{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-file-field__labels{grid-column:1;grid-row:1;padding-top:var(--co-spacing-sm2);min-width:0}:host([layout='horizontal']) .co-file-field__label{white-space:normal}:host([layout='horizontal']) .co-file-field>:not(.co-file-field__labels){grid-column:2;min-width:0}@supports not (background: color-mix(in srgb, red, transparent)){.co-file-field__dropzone{background:var(--co-semantic-surface-hover)}}";export{_ as co_file_field}
|
|
1
|
+
import{r as e,c as i,h as o,a as t}from"./p-DJkaRtbb.js";import{R as r}from"./p-CYN5B3IQ.js";import{g as a,f as s}from"./p-gKnOhsd2.js";function c(e){if(null==e||isNaN(e))return"";if(e<1024)return`${e} B`;const i=e=>e.toFixed(2).replace(/\.?0+$/,"");return e<1048576?`${i(e/1024)} KB`:`${i(e/1048576)} MB`}const n=new Set(["png","jpg","jpeg","gif","webp","svg","avif","bmp"]),l=new Set(["mp4","mov","webm","m4v","ogv"]);function d(e){const i=(e||"").split("?")[0],o=i.lastIndexOf(".");return o>=0?i.slice(o+1).toLowerCase():""}function f(e){return d(e.name)||d(e.url)}function h(e){return n.has(f(e))}function p(e){return l.has(f(e))}function u(e){return"done"===e.status&&!!e.url&&p(e)}function v(e){return p(e)||h(e)?e.url||e.thumbnail:e.thumbnail||e.url}const _=class{constructor(o){e(this,o),this.coFilesSelected=i(this,"coFilesSelected",3),this.coRemove=i(this,"coRemove",3),this.coClear=i(this,"coClear",3),this.coReorder=i(this,"coReorder",3),this.coCopy=i(this,"coCopy",3),this.coPreviewOpen=i(this,"coPreviewOpen",3),this.disabled=!1,this.readonly=!1,this.required=!1,this.multiple=!1,this.maxFiles=100,this.status="default",this.layout="vertical",this.reorderable=!0,this.files="[]",this.dragOver=!1,this.localError="",this.copiedKey="",this.armedKey="",this.dragKey="",this.overKey="",this.failedPreviews=new Set,this.tempSeq=0,this.lastFilesStr="",this.lastParsed=[],this.handleDragOver=e=>{this.disabled||this.readonly||this.dragKey||(e.preventDefault(),this.dragOver=!0)},this.handleDragLeave=e=>{const i=e.relatedTarget;i&&e.currentTarget instanceof Node&&e.currentTarget.contains(i)||(this.dragOver=!1)},this.handleDrop=e=>{var i;e.preventDefault(),this.dragOver=!1,this.dragKey||(null===(i=e.dataTransfer)||void 0===i?void 0:i.files)&&this.handleFiles(e.dataTransfer.files)},this.handleBrowse=e=>{var i;this.disabled||this.readonly||e&&this.fromActionsSlot(e)||null===(i=this.inputEl)||void 0===i||i.click()},this.handleInputChange=e=>{const i=e.target;i.files&&this.handleFiles(i.files),i.value=""},this.disarmDrag=()=>{this.armedKey&&!this.dragKey&&(this.armedKey="")},this.handleRowDragEnd=()=>{this.resetDragState()}}componentWillLoad(){this.failedPreviews||(this.failedPreviews=new Set)}connectedCallback(){window.addEventListener("mouseup",this.disarmDrag)}disconnectedCallback(){window.removeEventListener("mouseup",this.disarmDrag),clearTimeout(this.copiedTimer),this.closeLightbox()}get parsedFiles(){const e=this.files;if("string"!=typeof e||!e.trim())return[];if(e===this.lastFilesStr)return this.lastParsed;let i=[];try{const o=JSON.parse(e);Array.isArray(o)&&(i=o)}catch(e){}return this.lastFilesStr=e,this.lastParsed=i,i}get strings(){return a(this.locale)}get acceptList(){const e=this.accept;if(!e)return[];let i=[];try{const o=JSON.parse(e);Array.isArray(o)&&(i=o.map(String))}catch(o){i=e.split(",")}return i.map((e=>e.trim().toLowerCase().replace(/^\./,""))).filter((e=>e&&"*"!==e))}get isInvalid(){return"error"===this.status||!!this.localError}get inputAccept(){const e=this.acceptList;if(e.length)return e.map((e=>e.includes("/")?e:`.${e}`)).join(",")}extOf(e){const i=e.lastIndexOf(".");return i>=0?e.slice(i+1).toLowerCase():""}validate(e){const i=this.acceptList;if(i.length){const o=this.extOf(e.name),t=i.includes(o),r=i.some((i=>i.includes("/")&&e.type===i));if(!t&&!r)return s(this.strings.errInvalidFormat,{x:o})}return this.maxBytes&&e.size>this.maxBytes?s(this.strings.errTooLarge,{x:c(e.size)}):null}handleFiles(e){if(this.disabled||this.readonly)return;this.localError="";const i=Array.from(e);if(!i.length)return;const o=this.multiple?i:i.slice(0,1);if(this.multiple){const e=this.maxFiles-this.parsedFiles.length;if(e<=0)return void(this.localError=s(this.strings.errMaxFiles,{n:this.maxFiles}));o.length>e&&(o.length=e)}const t=[],r=[];for(const e of o){const i=this.validate(e);i?this.localError=i:(t.push(e),r.push(`tmp-${Date.now()}-${this.tempSeq++}`))}t.length&&this.coFilesSelected.emit({files:t,tempIds:r})}fromActionsSlot(e){return e.composedPath().some((e=>{var i,o;return"actions"===(null===(o=(i=e).getAttribute)||void 0===o?void 0:o.call(i,"slot"))}))}keyFor(e){var i;return e.id||e.tempId||`${e.name}:${null!==(i=e.size)&&void 0!==i?i:""}`}handleCopy(e){var i;const o=e.url||"";if(!o)return;const t=this.keyFor(e);this.coCopy.emit({id:t,url:o}),(null===(i=navigator.clipboard)||void 0===i?void 0:i.writeText)&&navigator.clipboard.writeText(o).then((()=>{this.copiedKey=t,clearTimeout(this.copiedTimer),this.copiedTimer=setTimeout((()=>this.copiedKey=""),1500)})).catch((()=>{}))}previewItems(){return this.parsedFiles.filter((e=>{return(function(e){return"done"===e.status&&!u(e)&&!(!e.thumbnail&&!e.url)&&(!!e.thumbnail||h(e))}(i=e)||u(i))&&(u(e)||!this.failedPreviews.has(this.keyFor(e)));var i}))}handlePreviewOpen(e){const i=e.url||e.thumbnail;if(!i)return;this.coPreviewOpen.emit({id:this.keyFor(e),url:i});const o=this.previewItems(),t=o.map((e=>u(e)?{src:v(e),thumbnail:e.thumbnail,alt:e.name,kind:"video",poster:e.thumbnail}:{src:v(e),thumbnail:e.thumbnail,alt:e.name})),r=Math.max(0,o.findIndex((i=>this.keyFor(i)===this.keyFor(e))));this.closeLightbox();const a=document.createElement("co-lightbox");a.images=JSON.stringify(t),a.startIndex=r,this.locale&&(a.locale=this.locale),a.addEventListener("coClose",(()=>this.closeLightbox())),document.body.appendChild(a),this.lightboxEl=a,requestAnimationFrame((()=>{a.open=!0}))}closeLightbox(){const e=this.lightboxEl;this.lightboxEl=void 0,e&&(e.open=!1,setTimeout((()=>e.remove()),220))}handlePreviewError(e){this.failedPreviews=new Set([...this.failedPreviews,this.keyFor(e)])}handleRowDragStart(e,i){this.armedKey===i?(this.dragKey=i,e.dataTransfer&&(e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",i))):e.preventDefault()}handleRowDragOver(e,i){this.dragKey&&this.dragKey!==i&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="move"),this.overKey=i)}handleRowDrop(e,i){e.preventDefault(),e.stopPropagation();const o=this.parsedFiles.map((e=>this.keyFor(e))),t=o.indexOf(this.dragKey),r=o.indexOf(i);this.resetDragState(),t<0||r<0||t===r||(o.splice(r,0,...o.splice(t,1)),this.coReorder.emit(o))}resetDragState(){this.armedKey="",this.dragKey="",this.overKey=""}capacityHint(e){const i=this.maxBytes?c(this.maxBytes):"";return this.multiple&&this.maxBytes?s(e.helperBoth,{n:this.maxFiles,x:i}):this.multiple?s(e.helperFiles,{n:this.maxFiles}):this.maxBytes?s(e.helperBytes,{x:i}):""}render(){const e=this.strings,i=this.parsedFiles,t=this.localError||this.helperText,a=!(this.readonly||(this.multiple?this.multiple&&i.length>=this.maxFiles:0!==i.length)),s="default"!==this.status?`co-file-field--${this.status}`:"",n=this.previewItems(),l=this.reorderable&&this.multiple&&!this.disabled&&!this.readonly&&i.length>1,d=this.capacityHint(e);return o("div",{key:"ee6fa70ea7fd466ec315eff1b6f3d044b1c6c6d9",class:{"co-file-field":!0,"co-file-field--disabled":this.disabled,"co-file-field--invalid":this.isInvalid,[s]:!!s},part:"wrapper"},this.label&&o("div",{key:"48a181a0cb1e0c53da9d61a856f3d2cc5e97d079",class:"co-file-field__labels"},o("label",{key:"47f162d9fdad44d4c8c8f7756c901eea216b7627",class:"co-file-field__label",part:"label"},this.label,o(r,{key:"4549d57f016e2874ea7b141d9dc83e09c38bdbf3",required:this.required}))),a&&o("div",{key:"3d16ff2e38de335e5fba78931cd6b1b009603a70",class:{"co-file-field__dropzone":!0,"co-file-field__dropzone--drag":this.dragOver},part:"dropzone",role:"button",tabIndex:this.disabled?-1:0,onClick:this.handleBrowse,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||this.fromActionsSlot(e)||(e.preventDefault(),this.handleBrowse())},onDragOver:this.handleDragOver,onDragLeave:this.handleDragLeave,onDrop:this.handleDrop},o("button",{key:"e9a2c51a238455e7887e8310c02ac739ebf89e4e",class:"co-file-field__upload-btn",part:"upload-button",type:"button",tabIndex:-1},o("co-icon",{key:"5a6fe016b2e26896a8b788bb1473c5434d71e85f",name:"file-arrow-up",size:18}),o("span",{key:"e69793c228fef62c5c0aec07f5f038aa3e931b3b"},this.uploadButtonText||e.uploadButton)),o("span",{key:"7343bd26d1132ac6b0b0ded57f1a2a32f228d0e8",class:"co-file-field__dropzone-text"},this.dropText||e.dropHint),d&&o("span",{key:"d7b68c8723c91b80b124298e29c9165c2489f59f",class:"co-file-field__dropzone-hint"},d),o("div",{key:"38318d6e86a90cc8faf6955ea480b39d242d8122",class:"co-file-field__actions",part:"actions"},o("slot",{key:"ad9f134cd0f01b1ed61d8d8966d5a7d40bda0812",name:"actions"})),o("input",{key:"8a3b769794a89213a1f02f0b82899e624a5578d6",ref:e=>this.inputEl=e,class:"co-file-field__input",type:"file",multiple:this.multiple,accept:this.inputAccept,disabled:this.disabled,onChange:this.handleInputChange,"aria-hidden":"true",tabIndex:-1})),i.length>0&&o("div",{key:"8040d77615d29a691bc2087eddd7298b3922066c",class:"co-file-field__uploaded"},this.multiple&&o("div",{key:"e4660cdfe20c1b4669b57a4474234161bac4c812",class:"co-file-field__uploaded-title",part:"uploaded-title"},`${this.uploadedTitle||e.uploadedTitle} (${i.length})`),n.length>0&&o("div",{key:"636e3e35dcb8ad263361e1b652dca23b499e5354",class:"co-file-field__previews",part:"previews"},n.map((i=>{const t=this.keyFor(i),r=u(i),a=this.failedPreviews.has(t)?"":i.thumbnail;return o("button",{class:{"co-file-field__preview":!0,"co-file-field__preview--video":r},part:"preview",type:"button",key:`prev-${t}`,title:i.name,"aria-label":`${r?e.playVideo:e.openPreview}: ${i.name}`,onClick:()=>this.handlePreviewOpen(i)},(!r||!!a)&&o("img",{src:r?a:i.thumbnail||i.url,alt:i.name,loading:"lazy",onError:()=>this.handlePreviewError(i)}),r&&o("span",{class:"co-file-field__preview-play","aria-hidden":"true"},o("span",{class:"co-file-field__preview-play-badge"},o("co-icon",{name:"play",size:20,weight:"fill"})),!a&&o("span",{class:"co-file-field__preview-ext"},f(i).toUpperCase())))}))),o("ul",{key:"b67b8c43f8c02c65e780b3fa644123bf0f29d69b",class:"co-file-field__list",part:"list"},i.map((i=>{const t=this.keyFor(i),r=l&&"done"===i.status;return o("li",{class:{"co-file-field__row":!0,[`co-file-field__row--${i.status}`]:!0,"co-file-field__row--dragging":this.dragKey===t,"co-file-field__row--drop-target":this.overKey===t},part:"row",key:t,draggable:this.armedKey===t,onDragStart:e=>this.handleRowDragStart(e,t),onDragOver:e=>this.handleRowDragOver(e,t),onDrop:e=>this.handleRowDrop(e,t),onDragEnd:this.handleRowDragEnd},r?o("co-tooltip",{content:e.dragToReorder},o("span",{class:"co-file-field__drag-handle",part:"drag-handle",onMouseDown:()=>this.armedKey=t},o("co-icon",{name:"list",size:18}))):o("co-icon",{name:"error"===i.status?"warning-circle":"uploading"===i.status?"spinner-gap":"file",size:18,class:{"co-file-field__row-icon":!0,"co-file-field__row-icon--spin":"uploading"===i.status}}),o("div",{class:"co-file-field__row-body"},o("span",{class:"co-file-field__row-name",title:i.name},function(e,i=35){return!e||e.length<=i?e:`...${e.slice(-i)}`}(i.name)),"uploading"===i.status&&o("div",{class:"co-file-field__progress"},o("div",{class:"co-file-field__progress-bar",style:"number"==typeof i.progress?{width:`${i.progress}%`}:void 0})),"error"===i.status&&i.error&&o("span",{class:"co-file-field__row-error"},i.error)),null!=i.size&&o("span",{class:"co-file-field__row-size"},c(i.size)),"done"===i.status&&!!i.url&&o("co-tooltip",{content:e.downloadFile},o("a",{class:"co-file-field__action",href:i.url,target:"_blank",rel:"noopener noreferrer",download:i.name,tabIndex:-1,"aria-label":e.downloadFile},o("co-icon",{name:"download",size:18}))),"done"===i.status&&!!i.url&&o("co-tooltip",{content:this.copiedKey===t?e.copied:e.copyUrl},o("button",{class:{"co-file-field__action":!0,"co-file-field__action--copied":this.copiedKey===t},type:"button",tabIndex:-1,"aria-label":e.copyUrl,onClick:()=>this.handleCopy(i)},o("co-icon",{name:this.copiedKey===t?"check":"copy",size:18}))),!this.disabled&&!this.readonly&&o("co-tooltip",{content:e.removeFile},o("button",{class:"co-file-field__action",type:"button",tabIndex:-1,"aria-label":e.removeFile,onClick:()=>this.coRemove.emit(t)},o("co-icon",{name:"trash",size:18}))))})))),t&&o("div",{key:"ff75602503a198d8598d2b35fd881c848a7b76d6",class:{"co-file-field__helper":!0,"co-file-field__helper--error":this.isInvalid},part:"helper"},this.isInvalid&&o("co-icon",{key:"af79e0b999c781560c316023897aaa850b1d6ae0",name:"warning-circle",size:14,class:"co-file-field__helper-icon"}),o("span",{key:"b5af4dab0d3c7dc317265604159a95f3bf8d200d",class:"co-file-field__helper-text"},t)))}get el(){return t(this)}};_.style=":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}.co-file-field{display:flex;flex-direction:column;gap:var(--co-spacing-sm2)}.co-file-field__labels{display:flex;align-items:center;justify-content:space-between;padding:0 var(--co-spacing-xs)}.co-file-field__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-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)')}.co-file-field__dropzone{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--co-spacing-md);padding:var(--co-spacing-4xl) var(--co-spacing-2xl);background:color-mix(in srgb, var(--co-semantic-surface-hover) 55%, transparent);border:1px dashed var(--co-semantic-border-field);border-radius:var(--co-border-radius-sm);cursor:pointer;text-align:center;transition:border-color var(--co-motion-duration-fast) var(--co-motion-ease-out), background var(--co-motion-duration-fast) var(--co-motion-ease-out)}.co-file-field__dropzone:hover{border-color:var(--co-semantic-border-focus)}.co-file-field__dropzone--drag{border-color:var(--co-semantic-border-focus);background:var(--co-semantic-surface-hover)}.co-file-field__upload-btn{display:inline-flex;align-items:center;gap:var(--co-spacing-sm2);padding:var(--co-spacing-md) var(--co-spacing-xl);margin-bottom:var(--co-spacing-xs);background:var(--co-semantic-surface-secondary);color:var(--co-semantic-text-default);border:none;border-radius:var(--co-border-radius-full);box-shadow:var(--co-shadow-lg);font-family:inherit;font-size:var(--co-font-size-16);font-weight:400;letter-spacing:var(--co-font-letter-spacing-body);line-height:1;cursor:pointer;transition:box-shadow var(--co-motion-duration-fast) var(--co-motion-ease-out), transform var(--co-motion-duration-fast) var(--co-motion-ease-out)}.co-file-field__upload-btn:hover{box-shadow:var(--co-shadow-xl, var(--co-shadow-lg));transform:translateY(-1px)}.co-file-field__upload-btn co-icon{display:inline-flex;flex-shrink:0}.co-file-field__dropzone-text{color:var(--co-semantic-text-default);font-size:var(--co-font-size-18);line-height:1.25}.co-file-field__dropzone-hint{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);line-height:1.25}.co-file-field__actions{display:contents}.co-file-field__input{display:none}.co-file-field__uploaded{display:flex;flex-direction:column;gap:var(--co-spacing-lg);margin-top:var(--co-spacing-sm2)}.co-file-field__uploaded-title{color:var(--co-semantic-text-default);font-size:var(--co-font-size-22);font-weight:500;letter-spacing:-0.03em;line-height:1.25}.co-file-field__previews{display:grid;grid-template-columns:repeat(auto-fill, minmax(150px, 180px));gap:var(--co-spacing-md)}.co-file-field__preview{padding:0;border:none;border-radius:var(--co-border-radius-sm);overflow:hidden;aspect-ratio:3 / 2;background:var(--co-semantic-surface-hover);cursor:pointer}.co-file-field__preview img{display:block;width:100%;height:100%;object-fit:cover;transition:transform var(--co-motion-duration-base) var(--co-motion-ease-out)}.co-file-field__preview:hover img{transform:scale(1.02)}.co-file-field__preview--video{position:relative;background:var(--co-color-base-negro)}.co-file-field__preview-play{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--co-spacing-sm2);color:var(--co-color-base-blanco);pointer-events:none}.co-file-field__preview-play-badge{display:flex;width:40px;height:40px;align-items:center;justify-content:center;border-radius:var(--co-border-radius-full);background:var(--co-color-opacity-negro-80);box-shadow:inset 0 0 0 1px var(--co-color-opacity-blanco-25);transition:transform var(--co-motion-duration-base) var(--co-motion-ease-out)}.co-file-field__preview--video:hover .co-file-field__preview-play-badge{transform:scale(1.08)}.co-file-field__preview-play-badge co-icon{transform:translateX(1px)}.co-file-field__preview-ext{font-family:var(--co-font-family-primary);font-size:var(--co-font-size-12);font-weight:var(--co-font-weight-medium);letter-spacing:var(--co-font-letter-spacing-overline);color:var(--co-color-opacity-blanco-80)}.co-file-field__list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:var(--co-spacing-sm2)}.co-file-field__row{display:flex;align-items:center;gap:var(--co-spacing-lg);padding:var(--co-spacing-xl);background:var(--co-semantic-surface-hover);border:1px solid transparent;border-radius:var(--co-border-radius-sm)}.co-file-field__row--error{border-color:var(--co-semantic-status-error)}.co-file-field__row--dragging{opacity:0.5}.co-file-field__row--drop-target{border-color:var(--co-semantic-border-focus);background:var(--co-semantic-surface-hover)}.co-file-field__drag-handle{flex-shrink:0;display:flex;align-items:center;color:var(--co-semantic-text-secondary);cursor:grab}.co-file-field__drag-handle:active{cursor:grabbing}.co-file-field__row-icon{flex-shrink:0;color:var(--co-semantic-text-secondary);display:flex;align-items:center}.co-file-field__row--error .co-file-field__row-icon{color:var(--co-semantic-status-error)}.co-file-field__row-icon--spin{animation:co-file-spin 0.8s linear infinite}@keyframes co-file-spin{to{transform:rotate(360deg)}}.co-file-field__row-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:var(--co-spacing-xs)}.co-file-field__row-name{color:var(--co-semantic-text-default);font-size:var(--co-font-size-14);line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.co-file-field__row-error{color:var(--co-semantic-status-error);font-size:var(--co-font-size-12)}.co-file-field__row-size{flex-shrink:0;color:var(--co-semantic-text-default);font-size:var(--co-font-size-14);line-height:1;white-space:nowrap}.co-file-field__progress{position:relative;height:4px;border-radius:var(--co-border-radius-full);background:var(--co-semantic-surface-hover);overflow:hidden}.co-file-field__progress-bar{position:absolute;inset:0;width:40%;border-radius:var(--co-border-radius-full);background:var(--co-semantic-status-info);transition:width var(--co-motion-duration-base) var(--co-motion-ease-out)}.co-file-field__progress-bar:not([style]){animation:co-file-indeterminate 1.2s ease-in-out infinite}@keyframes co-file-indeterminate{0%{left:-40%}100%{left:100%}}.co-file-field__action{flex-shrink:0;display:flex;align-items:center;justify-content:center;padding:0;border:none;background:transparent;cursor:pointer;text-decoration:none;color:var(--co-semantic-text-secondary);transition:color var(--co-motion-duration-fast) var(--co-motion-ease-out)}.co-file-field__action:hover{color:var(--co-semantic-text-default)}.co-file-field__action--copied,.co-file-field__action--copied:hover{color:var(--co-color-primary-verde)}.co-file-field__helper{display:flex;align-items:center;gap:var(--co-spacing-xs);padding:0 var(--co-spacing-xs)}.co-file-field__helper-icon{flex-shrink:0;color:var(--co-semantic-text-muted);display:flex;align-items:center}.co-file-field__helper-text{color:var(--co-semantic-text-muted);font-size:var(--co-font-size-14);line-height:1}.co-file-field--disabled{opacity:0.6;pointer-events:none}.co-file-field--invalid .co-file-field__dropzone,.co-file-field--error .co-file-field__dropzone{border-color:var(--co-semantic-status-error)}.co-file-field__helper--error .co-file-field__helper-icon,.co-file-field__helper--error .co-file-field__helper-text{color:var(--co-semantic-status-error)}:host([layout='horizontal']) .co-file-field{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-file-field__labels{grid-column:1;grid-row:1;padding-top:var(--co-spacing-sm2);min-width:0}:host([layout='horizontal']) .co-file-field__label{white-space:normal}:host([layout='horizontal']) .co-file-field>:not(.co-file-field__labels){grid-column:2;min-width:0}@supports not (background: color-mix(in srgb, red, transparent)){.co-file-field__dropzone{background:var(--co-semantic-surface-hover)}}";export{_ as co_file_field}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,c,h as e}from"./p-
|
|
1
|
+
import{r as o,c,h as e}from"./p-DJkaRtbb.js";const r=class{constructor(e){o(this,e),this.coChange=c(this,"coChange",7),this.layout="vertical",this.status="default",this.value="[]",this.options=[],this.direction="column",this.size="small",this.disabled=!1,this.handleToggle=o=>{if(this.disabled)return;const c=[...this.selectedValues],e=c.indexOf(o);e>=0?c.splice(e,1):c.push(o),this.value=JSON.stringify(c),this.coChange.emit(c)}}onValueChange(){}get parsedOptions(){let o=this.options;if("string"==typeof o)try{o=JSON.parse(o)}catch(o){return[]}return Array.isArray(o)?o.map((o=>"string"==typeof o?{label:o,value:o}:o)):[]}get selectedValues(){if("string"==typeof this.value)try{return JSON.parse(this.value)}catch(o){return[]}return this.value}get statusIcon(){return{error:"warning-circle",success:"check-circle",warning:"warning",info:"info"}[this.status]||null}render(){const o=this.label||this.secondaryLabel,c=this.parsedOptions,r=this.selectedValues;return e("div",{key:"9b4ee043c35d0be7da49ca2881671830d900dcb7",class:{"co-checkbox-group":!0,"co-checkbox-group--disabled":this.disabled,[`co-checkbox-group--${this.status}`]:"default"!==this.status},role:"group","aria-label":this.label||""},o&&e("div",{key:"fca5265d4bd96a5792840319443f48f4871f9e10",class:"co-checkbox-group__labels"},this.label&&e("span",{key:"b53daed7cea22897e978dc83eee817d0b67e73d2",class:"co-checkbox-group__label"},this.label),this.secondaryLabel&&e("span",{key:"88eb49c68465e27f53f91cdf73d9748effca7d8b",class:"co-checkbox-group__secondary-label"},this.secondaryLabel)),e("div",{key:"dae5337bf83e5dbc46e0afc6fd6eed5bb4aee6db",class:{"co-checkbox-group__options":!0,[`co-checkbox-group__options--${this.direction}`]:!0}},c.map((o=>{const c=this.disabled||!!o.disabled,t=r.includes(o.value);return e("div",{class:{"co-checkbox-group__item":!0,"co-checkbox-group__item--disabled":c},onClick:()=>!c&&this.handleToggle(o.value)},e("span",{class:{"co-checkbox-group__box":!0,[`co-checkbox-group__box--${this.size}`]:!0,"co-checkbox-group__box--checked":t,"co-checkbox-group__box--disabled":c},role:"checkbox","aria-checked":String(t),"aria-label":o.label}),e("span",{class:"co-checkbox-group__option-label"},o.label))}))),this.helperText&&e("div",{key:"af541135d225b51ad80e39edd3d6947f2567dd75",class:`co-checkbox-group__helper co-checkbox-group__helper--${this.status}`},this.statusIcon&&e("co-icon",{key:"52297bb73168c15af67b65eedaf6349a7c5dd6f3",name:this.statusIcon,size:14,weight:"fill",class:"co-checkbox-group__helper-icon"}),e("span",{key:"3ebd17867c2d36b0483d7620476bc5502c36fd73",class:"co-checkbox-group__helper-text"},this.helperText)))}static get watchers(){return{value:[{onValueChange:0}]}}};r.style=":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}.co-checkbox-group{display:flex;flex-direction:column;gap:var(--co-spacing-sm2)}.co-checkbox-group__labels{display:flex;align-items:center;justify-content:space-between;padding:0 var(--co-spacing-xs);gap:var(--co-spacing-sm2)}.co-checkbox-group__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-checkbox-group__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-checkbox-group--disabled .co-checkbox-group__label,.co-checkbox-group--disabled .co-checkbox-group__secondary-label{color:var(--co-semantic-text-disabled)}.co-checkbox-group__options{display:flex;gap:var(--co-spacing-md)}.co-checkbox-group__options--column{flex-direction:column;gap:var(--co-spacing-sm2)}.co-checkbox-group__options--row{flex-direction:row;flex-wrap:wrap;gap:var(--co-spacing-md)}.co-checkbox-group__item{display:flex;align-items:center;gap:var(--co-spacing-sm2);cursor:pointer;user-select:none}.co-checkbox-group__item--disabled{cursor:not-allowed}.co-checkbox-group__option-label{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);font-weight:400;line-height:1;white-space:nowrap}.co-checkbox-group__item--disabled .co-checkbox-group__option-label{color:var(--co-semantic-text-disabled)}.co-checkbox-group__box{position:relative;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;box-sizing:border-box;transition:background var(--co-motion-duration-fast) var(--co-motion-ease-out), border-color var(--co-motion-duration-fast) var(--co-motion-ease-out);overflow:hidden}.co-checkbox-group__box--small{width:16px;height:16px;border-radius:var(--co-border-radius-xxs)}.co-checkbox-group__box--large{width:24px;height:24px;border-radius:var(--co-spacing-sm)}.co-checkbox-group__box:not(.co-checkbox-group__box--checked){background:color-mix(in srgb, var(--co-semantic-surface-secondary) 35%, transparent);border:1px solid var(--co-semantic-border-subtle)}.co-checkbox-group__box--checked{background:var(--co-semantic-surface-primary);border:none}.co-checkbox-group__box--checked::after{content:'';display:block;box-sizing:border-box;border-style:solid;border-color:var(--co-semantic-on-primary);border-width:0 0 1.5px 1.5px;transform:rotate(-45deg) translateY(-15%)}.co-checkbox-group__box--small.co-checkbox-group__box--checked::after{width:7px;height:4px}.co-checkbox-group__box--large.co-checkbox-group__box--checked::after{width:10px;height:6px}.co-checkbox-group__box--disabled{opacity:0.4;cursor:not-allowed;pointer-events:none}.co-checkbox-group--error .co-checkbox-group__box:not(.co-checkbox-group__box--checked){border-color:var(--co-semantic-status-error)}.co-checkbox-group__helper{display:flex;align-items:center;gap:var(--co-spacing-xs);padding:0 var(--co-spacing-xs)}.co-checkbox-group__helper-icon{flex-shrink:0;display:flex;align-items:center}.co-checkbox-group__helper-text{color:var(--co-semantic-text-muted);font-size:var(--co-font-size-14);font-weight:400;line-height:1}.co-checkbox-group__helper--error .co-checkbox-group__helper-icon,.co-checkbox-group__helper--error .co-checkbox-group__helper-text{color:var(--co-semantic-status-error)}.co-checkbox-group__helper--success .co-checkbox-group__helper-icon,.co-checkbox-group__helper--success .co-checkbox-group__helper-text{color:var(--co-semantic-status-success)}.co-checkbox-group__helper--warning .co-checkbox-group__helper-icon,.co-checkbox-group__helper--warning .co-checkbox-group__helper-text{color:var(--co-color-status-review)}.co-checkbox-group__helper--info .co-checkbox-group__helper-icon,.co-checkbox-group__helper--info .co-checkbox-group__helper-text{color:var(--co-semantic-status-info)}:host([layout='horizontal']) .co-checkbox-group{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-checkbox-group__labels{grid-column:1;grid-row:1;padding-top:0;min-width:0}:host([layout='horizontal']) .co-checkbox-group__label{white-space:normal}:host([layout='horizontal']) .co-checkbox-group>:not(.co-checkbox-group__labels){grid-column:2;min-width:0}@supports not (background: color-mix(in srgb, red, transparent)){.co-checkbox-group__box:not(.co-checkbox-group__box--checked){background:transparent}}";export{r as co_checkbox_group}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as r}from"./p-
|
|
1
|
+
import{r as e,h as r}from"./p-DJkaRtbb.js";const t=class{constructor(r){e(this,r),this.thickness=10,this.radius="full",this.trackColor="var(--co-color-gray-100)",this.total=100,this.segments="[]"}get parsedSegments(){const e=this.segments;let r=e;if("string"==typeof e){if(!e.trim())return[];try{r=JSON.parse(e)}catch(e){return[]}}return Array.isArray(r)?r.filter((e=>!!e&&"number"==typeof e.value&&"string"==typeof e.color)).map((e=>({value:e.value,color:e.color,label:e.label}))):[]}render(){const e=this.parsedSegments,t=this.total>0?this.total:100;return r("div",{key:"17f9d7dbccca7bf7dbcd3907094712da67b74f97",class:"co-segmented-bar",part:"segmented-bar"},r("div",{key:"18747edfd30a3bf84e071570e8280b6d783c6c46",class:{"co-segmented-bar__track":!0,[`co-segmented-bar__track--radius-${this.radius}`]:!0},part:"track",style:{height:`${this.thickness}px`,background:this.trackColor}},e.map(((e,s)=>r("span",{key:s,class:"co-segmented-bar__segment",part:"segment",title:e.label,style:{width:e.value/t*100+"%",background:e.color}})))),r("slot",{key:"d04d1e4ade89c3b1e8e20486aceadf994c310092",name:"legend"}))}};t.style=":host{display:block;width:100%}.co-segmented-bar{width:100%}.co-segmented-bar__track{position:relative;width:100%;display:flex;overflow:hidden;}.co-segmented-bar__track--radius-full{border-radius:var(--co-border-radius-full, 9999px)}.co-segmented-bar__track--radius-sm{border-radius:var(--co-border-radius-sm, 12px)}.co-segmented-bar__track--radius-lg{border-radius:var(--co-border-radius-lg, 16px)}.co-segmented-bar__segment{display:block;height:100%;}";export{t as co_segmented_bar}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,h as o}from"./p-
|
|
1
|
+
import{r as a,h as o}from"./p-DJkaRtbb.js";const e=class{constructor(o){a(this,o),this.size="large",this.color="default",this.animated=!1}render(){return o("span",{key:"b22315d54caf4150b599d5a8b576a08e68f8bfea",class:{"co-badge":!0,[`co-badge--${this.size}`]:!0,[`co-badge--${this.color}`]:!0,"co-badge--animated":this.animated},part:"badge"})}};e.style=":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)}.co-badge--animated{animation:co-badge-pop var(--co-motion-duration-slower) var(--co-motion-ease-spring) both}@keyframes co-badge-pop{from{transform:scale(0);opacity:0;filter:blur(var(--co-motion-blur-sm))}to{transform:scale(1);opacity:1;filter:none}}";export{e as co_badge}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,r as o,c,a as t}from"./p-DH5lfRNj.js";import{n as r}from"./p-Ba_v-MzM.js";function i(e){return e?e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").replace(/^\w/,(e=>e.toUpperCase())):""}function n(e){return String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function s(e,o){if(!o)return n(e);const c=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return n(e).replace(new RegExp(`(${c})`,"gi"),"<mark>$1</mark>")}function a(e,o){const c=new Set(e),t={};for(const c of e){const e=c.split(".");let r=t;for(let c=0;c<e.length;c++){const t=e[c],i=e.slice(0,c+1).join(".");if(!r[t]){const n=c===e.length-1&&(null==o?void 0:o.get(i))||t;r[t]={label:n,key:i,childrenMap:{}}}c<e.length-1&&(r=r[t].childrenMap)}}const r=e=>Object.values(e).map((e=>{const o=r(e.childrenMap),t=o.length>0,i=t&&c.has(e.key),n={label:e.label,key:e.key,fullPath:e.key,children:t?o:null};return i&&n.children&&n.children.unshift({label:e.label,key:e.key+".__self",fullPath:e.key,children:null,isSelf:!0}),n}));return l(r(t))}function l(e){return[...e].sort(((e,o)=>{if(e.isSelf)return-1;if(o.isSelf)return 1;const c=e.children&&e.children.length>0,t=o.children&&o.children.length>0;return!c&&t?-1:c&&!t?1:e.label.localeCompare(o.label)})).map((e=>Object.assign(Object.assign({},e),{children:e.children?l(e.children):null})))}function d(e,o){const c=r(o);return e.map((e=>{const t=r(e.label).includes(c),n=r(i(e.label)).includes(c),s=r(e.fullPath).includes(c);if(!e.children||0===e.children.length)return t||n||s?e:null;const a=d(e.children,o);return t||n||a.length>0?Object.assign(Object.assign({},e),{children:a.length>0?a:e.children}):null})).filter(Boolean)}function p(e){const o=[];for(const c of e)c.children&&0!==c.children.length?o.push(...p(c.children)):o.push(c.fullPath);return o}const u=o=>{const{node:c,depth:t,selected:r,expandedKeys:n,disabled:a,query:l,onOptionClick:d,onParentCheck:h,onToggleExpand:m}=o,f=!c.children||0===c.children.length,_=n.has(c.key),b=f&&r.includes(c.fullPath);let k=!1,v=!1,g=0,x=0;if(!f&&c.children){const e=p(c.children);x=e.length,g=e.filter((e=>r.includes(e))).length,k=x>0&&g===x,v=g>0}return e("div",{class:"co-column-picker__node"},e("div",{class:{"co-column-picker__node-row":!0,"co-column-picker__node-row--leaf":f,"co-column-picker__node-row--parent":!f,"co-column-picker__node-row--expanded":!f&&_,"co-column-picker__node-row--selected":f&&b},style:{paddingLeft:20*t+10+"px"},onClick:e=>f?d(c.fullPath):m(c.key,e)},e("co-checkbox",{checked:f?b:k,indeterminate:!f&&v&&!k,disabled:a,onClick:e=>{e.stopPropagation(),f?d(c.fullPath):h(c)}}),e("span",{class:{"co-column-picker__node-label":!0,"co-column-picker__node-label--parent":!f,"co-column-picker__node-label--self":!!c.isSelf},innerHTML:s(i(c.label),l)}),c.isSelf&&e("span",{class:"co-column-picker__self-tag"},"self"),!f&&e("span",{class:"co-column-picker__node-counter"},g>0&&[e("span",{class:"co-column-picker__counter-selected"},g),e("span",{class:"co-column-picker__counter-sep"},"/")],e("span",{class:"co-column-picker__counter-total"},x)),!f&&e("span",{class:{"co-column-picker__chevron":!0,"co-column-picker__chevron--open":_},onClick:e=>m(c.key,e)},e("co-icon",{name:"caret-right",size:16}))),!f&&_&&c.children&&e("div",{class:"co-column-picker__node-children",style:{"--guide-left":20*t+19+"px"}},c.children.map((o=>e(u,{node:o,depth:t+1,selected:r,expandedKeys:n,disabled:a,query:l,onOptionClick:d,onParentCheck:h,onToggleExpand:m})))))},h=class{constructor(e){o(this,e),this.coChange=c(this,"coChange",7),this.coClear=c(this,"coClear",7),this.coSearch=c(this,"coSearch",7),this.options="[]",this.value="[]",this.multiple=!0,this.disabled=!1,this.showToolbar=!0,this.showSearch=!0,this.clearable=!0,this.placeholder="Select…",this.maxHeight=220,this.emptyText="No results found",this.selectAllText="Select all",this.clearText="Clear",this.expandText="Expand",this.collapseText="Collapse",this.selectedText="selected",this.sections="[]",this.status="default",this.isOpen=!1,this.query="",this.expandedKeys=new Set,this.focused=!1,this.handleFieldClick=()=>{this.disabled||(this.isOpen=!this.isOpen,this.focused=!0,this.isOpen&&requestAnimationFrame((()=>{var e;return null===(e=this.searchInputEl)||void 0===e?void 0:e.focus()})))},this.handleSearchInput=e=>{this.query=e.target.value,this.coSearch.emit(this.query),this.query&&(this.expandedKeys=function(e,o,c){const t=r(o),n=new Set(c),s=e=>{var o;let c=!1;for(const a of e)if(null===(o=a.children)||void 0===o?void 0:o.length){const e=s(a.children),o=r(a.label).includes(t)||r(i(a.label)).includes(t);(e||o)&&(n.add(a.key),c=!0)}else(r(a.label).includes(t)||r(i(a.label)).includes(t))&&(c=!0);return c};return s(e),n}(this.getTree(),this.query,this.expandedKeys))},this.handleSearchClear=e=>{var o;e.stopPropagation(),this.query="",this.coSearch.emit(""),null===(o=this.searchInputEl)||void 0===o||o.focus()},this.handleClear=e=>{e.stopPropagation(),this.value="[]",this.coClear.emit(),this.coChange.emit([])},this.handleSelectAll=()=>{this.disabled||this.emitSelection(p(this.getTree()))},this.handleDeselectAll=()=>{this.disabled||(this.value="[]",this.coClear.emit(),this.coChange.emit([]))},this.handleExpandAll=()=>{this.expandedKeys=function(e){const o=new Set,c=e=>{var t;for(const r of e)(null===(t=r.children)||void 0===t?void 0:t.length)&&(o.add(r.key),c(r.children))};return c(e),o}(this.getTree())},this.handleCollapseAll=()=>{this.expandedKeys=new Set},this.handleOptionClick=e=>{if(!this.disabled)if(this.multiple){const o=[...this.selectedValues],c=o.indexOf(e);c>=0?o.splice(c,1):o.push(e),this.emitSelection(o)}else this.emitSelection([e]),this.isOpen=!1},this.handleParentCheck=e=>{if(this.disabled)return;const o=p(e.children||[]),c=[...this.selectedValues];if(o.every((e=>c.includes(e))))this.emitSelection(c.filter((e=>!o.includes(e))));else{for(const e of o)c.includes(e)||c.push(e);this.emitSelection(c)}},this.handleChipRemove=(e,o)=>{o.stopPropagation(),this.disabled||this.emitSelection(this.selectedValues.filter((o=>o!==e)))},this.handleToggleExpand=(e,o)=>{o.stopPropagation();const c=new Set(this.expandedKeys);c.has(e)?c.delete(e):c.add(e),this.expandedKeys=c}}get parsedOptions(){return function(e){let o=e;if("string"==typeof o)try{o=JSON.parse(o)}catch(e){return[]}return Array.isArray(o)?o.map((e=>"string"==typeof e?e:e.value)):[]}(this.options)}get parsedSections(){return function(e){let o=e;if("string"==typeof o)try{o=JSON.parse(o)}catch(e){return[]}return Array.isArray(o)?o:[]}(this.sections)}get selectedValues(){return function(e){if("string"==typeof e)try{return JSON.parse(e)}catch(o){return e?[e]:[]}return Array.isArray(e)?e:[]}(this.value)}get optionLabelMap(){return function(e){let o=e;if("string"==typeof o)try{o=JSON.parse(o)}catch(e){return new Map}if(!Array.isArray(o))return new Map;const c=new Map;for(const e of o)"string"==typeof e?c.set(e,i(e.split(".").pop()||e)):c.set(e.value,e.label||e.value);return c}(this.options)}get hasValue(){return this.selectedValues.length>0}get statusIcon(){return{error:"warning-circle",success:"check-circle",warning:"warning",info:"info"}[this.status]||null}emitSelection(e){this.value=JSON.stringify(e),this.coChange.emit(e)}onOptionsChange(){this.expandedKeys=function(e,o,c){if(!o.length)return c;const t=new Set(c),r=e=>{var c;for(const i of e)(null===(c=i.children)||void 0===c?void 0:c.length)&&(p(i.children).some((e=>o.includes(e)))&&t.add(i.key),r(i.children))};return r(e),t}(this.getTree(),this.selectedValues,this.expandedKeys)}handleDocumentClick(e){this.el.contains(e.target)||(this.isOpen=!1,this.focused=!1)}getTree(){return a(this.parsedOptions,this.optionLabelMap)}getSectionedTree(){const e=this.parsedSections;if(!e.length)return[];const o=this.parsedOptions;return e.map((c=>{const t=o.filter((o=>c.prefix?o.startsWith(c.prefix+"."):!e.some((e=>e.prefix&&o.startsWith(e.prefix+".")))));return Object.assign(Object.assign({},c),{nodes:l(a(t,this.optionLabelMap))})})).filter((e=>e.nodes.length>0))}renderField(){const o=this.selectedValues,c=this.optionLabelMap;return e("div",{class:{"co-column-picker__field":!0,"co-column-picker__field--focused":this.focused,"co-column-picker__field--disabled":this.disabled,"co-column-picker__field--open":this.isOpen},onClick:this.handleFieldClick},this.multiple&&o.length>0&&e("div",{class:"co-column-picker__field-chips"},o.map((o=>e("co-chip",{label:c.get(o)||i(o.split(".").pop()||o),size:"small",removable:!this.disabled,onCoRemove:e=>this.handleChipRemove(o,e)})))),!this.multiple&&o.length>0&&e("span",{class:"co-column-picker__field-text"},o.map((e=>c.get(e)||i(e.split(".").pop()||e))).join(", ")),0===o.length&&e("span",{class:"co-column-picker__field-placeholder"},this.placeholder),e("div",{class:"co-column-picker__field-actions"},this.clearable&&this.hasValue&&!this.disabled&&e("button",{class:"co-column-picker__field-clear",type:"button",tabIndex:-1,onClick:this.handleClear,"aria-label":"Clear"},e("co-icon",{name:"x-circle",size:16,weight:"fill"})),e("co-icon",{name:this.isOpen?"caret-up":"caret-down",size:16,class:"co-column-picker__field-caret"})))}renderTree(){const o={selected:this.selectedValues,expandedKeys:this.expandedKeys,disabled:this.disabled,query:this.query,onOptionClick:this.handleOptionClick,onParentCheck:this.handleParentCheck,onToggleExpand:this.handleToggleExpand};if(this.parsedSections.length>0){const c=this.getSectionedTree(),t=this.query?c.map((e=>Object.assign(Object.assign({},e),{nodes:d(e.nodes,this.query)}))).filter((e=>e.nodes.length>0)):c;return t.length?e("div",{class:"co-column-picker__tree"},t.map((c=>[e("div",{class:"co-column-picker__section-header"},e("span",{class:"co-column-picker__section-label"},c.label),c.prefix&&e("span",{class:"co-column-picker__section-prefix"},"(",c.prefix,")")),...c.nodes.map((c=>e(u,Object.assign({node:c,depth:0},o))))]))):this.renderEmpty()}const c=this.getTree(),t=this.query?d(c,this.query):c;return t.length?e("div",{class:"co-column-picker__tree"},t.map((c=>e(u,Object.assign({node:c,depth:0},o))))):this.renderEmpty()}renderEmpty(){return e("div",{class:"co-column-picker__empty"},e("co-icon",{name:"magnifying-glass",size:40,class:"co-column-picker__empty-icon"}),e("span",null,this.emptyText))}render(){return e("div",{key:"bf11db2386df7088dfcec622ee02ce527fcef54f",class:{"co-column-picker":!0,"co-column-picker--open":this.isOpen,"co-column-picker--disabled":this.disabled,"co-column-picker--focused":this.focused,[`co-column-picker--${this.status}`]:"default"!==this.status}},(this.label||this.secondaryLabel)&&e("div",{key:"27543398ce1e3fc9e0f08ee2e4d59167e4e79894",class:"co-column-picker__labels"},this.label&&e("label",{key:"7051f1b7c44c7f0da7ae0e741a14cbe8a3f3ba26",class:"co-column-picker__label"},this.label),this.secondaryLabel&&e("span",{key:"17d011a13a7f5f7c1c44f3738f15b3438180fc7b",class:"co-column-picker__secondary-label"},this.secondaryLabel)),this.renderField(),this.isOpen&&e("div",{key:"4dcb6cb4289630a8238e53010aec69ec0cfc2e2a",class:"co-column-picker__dropdown"},this.showSearch&&e("div",{key:"0233bff4eeb82fe7fdf91aad530c97fc6dcac06f",class:"co-column-picker__search"},e("co-icon",{key:"64d1e6fc90c2380e509ca750854a40e416a902c1",name:"magnifying-glass",size:14,class:"co-column-picker__search-icon"}),e("input",{key:"60e75c92d5fa2991542063e5add78d8b1c79861b",ref:e=>this.searchInputEl=e,class:"co-column-picker__search-input",type:"text",value:this.query,placeholder:this.placeholder,onInput:this.handleSearchInput,onClick:e=>e.stopPropagation()}),this.query&&e("button",{key:"c894d1f8cd91368d9662e63f288384a111b7ffe0",class:"co-column-picker__search-clear",type:"button",onClick:this.handleSearchClear},e("co-icon",{key:"ea9d732d1c828fb3146046418d6b5d8dbc5c3c1b",name:"x",size:14}))),this.showToolbar&&this.multiple&&e("div",{key:"1aa8fde242c2b5d531411d67ef7ea96da4b0dbef",class:"co-column-picker__toolbar"},e("button",{key:"ce0bf82e65376e0eef1d83ee2e977617116e53ea",class:"co-column-picker__toolbar-btn",type:"button",onClick:this.handleSelectAll},this.selectAllText),e("button",{key:"7e418708aa8234f8e60ffd64d1ef7aad5baa5c98",class:"co-column-picker__toolbar-btn",type:"button",onClick:this.handleDeselectAll},this.clearText),e("span",{key:"5f1d2021e7b7ac9d51b4fb4f530a52204558818b",class:"co-column-picker__toolbar-sep"}),e("button",{key:"67a4b15e8b7ca43942866b502c2e28da9edb48d2",class:"co-column-picker__toolbar-btn",type:"button",onClick:this.handleExpandAll},this.expandText),e("button",{key:"c832eff1b36989819ad1b89c30c55398877c33b3",class:"co-column-picker__toolbar-btn",type:"button",onClick:this.handleCollapseAll},this.collapseText),e("span",{key:"1b0644a54e796cb85280850375dcade772a35648",style:{flex:"1"}}),this.selectedValues.length>0&&e("span",{key:"4292ea60a8c533dc67c57b029dee1c19403d68ed",class:"co-column-picker__toolbar-counter"},this.selectedValues.length," ",this.selectedText)),e("div",{key:"9b06012caa39e9704698a77981b994d31c1d60e3",class:"co-column-picker__scroll",style:{maxHeight:`${this.maxHeight}px`}},this.renderTree())),this.helperText&&e("div",{key:"c6c169d84d6b495101741df8012307cee8ada693",class:`co-column-picker__helper co-column-picker__helper--${this.status}`},this.statusIcon&&e("co-icon",{key:"e5e6d35e4b5356dbe1880742fe3c35ee9d845ae6",name:this.statusIcon,size:14,weight:"fill",class:"co-column-picker__helper-icon"}),e("span",{key:"e3a626266f8f68277ae8dbfa2d4194a57855af8d",class:"co-column-picker__helper-text"},this.helperText)))}get el(){return t(this)}static get watchers(){return{options:[{onOptionsChange:0}]}}};h.style=":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-column-picker{display:flex;flex-direction:column;gap:var(--co-spacing-xs);position:relative}.co-column-picker__labels{display:flex;align-items:center;justify-content:space-between;padding:0 var(--co-spacing-xs);gap:var(--co-spacing-xs)}.co-column-picker__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-column-picker__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-column-picker--disabled .co-column-picker__label,.co-column-picker--disabled .co-column-picker__secondary-label{color:var(--co-semantic-text-disabled)}.co-column-picker__field{display:flex;align-items:center;flex-wrap:wrap;gap:var(--co-spacing-xs);padding:var(--co-spacing-xs) var(--co-spacing-md);background:var(--co-semantic-surface-secondary);border:1px solid var(--co-semantic-border-subtle);border-radius:var(--co-border-radius-xs);min-height:40px;box-sizing:border-box;cursor:pointer;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-column-picker__field--focused{border-color:var(--co-semantic-border-focus);box-shadow:0 0 0 2px var(--co-semantic-border-focus-ring)}.co-column-picker__field--disabled{background:var(--co-semantic-surface-disabled);border-color:transparent;cursor:not-allowed}.co-column-picker--error .co-column-picker__field{border-color:var(--co-semantic-status-error)}.co-column-picker--success .co-column-picker__field{border-color:var(--co-semantic-status-success)}.co-column-picker--warning .co-column-picker__field{border-color:var(--co-color-status-review)}.co-column-picker--info .co-column-picker__field{border-color:var(--co-semantic-status-info)}.co-column-picker__field-text{flex:1;min-width:0;color:var(--co-semantic-text-default);font-size:var(--co-font-size-14);font-weight:400;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.co-column-picker__field-placeholder{flex:1;color:var(--co-semantic-text-muted);font-size:var(--co-font-size-14);font-weight:400}.co-column-picker__field-chips{display:flex;flex-wrap:wrap;gap:var(--co-spacing-xs);flex:1}.co-column-picker__field-actions{display:flex;align-items:center;gap:var(--co-spacing-xs);flex-shrink:0;margin-left:auto}.co-column-picker__field-clear{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-column-picker__field-clear:hover{color:var(--co-semantic-text-default)}.co-column-picker__field-caret{color:var(--co-semantic-text-muted);display:flex;align-items:center;transition:color var(--co-motion-duration-fast) var(--co-motion-ease-out)}.co-column-picker__field--open .co-column-picker__field-caret{color:var(--co-semantic-text-default)}.co-column-picker__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 var(--co-color-opacity-negro-8);overflow:hidden}.co-column-picker__search{display:flex;align-items:center;gap:var(--co-spacing-xs);padding:var(--co-spacing-xs) var(--co-spacing-md);border-bottom:1px solid var(--co-semantic-border-subtle);transition:border-color var(--co-motion-duration-base) var(--co-motion-ease-out)}.co-column-picker__search:focus-within{border-color:var(--co-semantic-border-focus)}.co-column-picker__search-icon{flex-shrink:0;color:var(--co-semantic-text-muted);display:flex;align-items:center}.co-column-picker__search-input{flex:1;border:none;outline:none;background:transparent;font-size:var(--co-font-size-14);font-family:inherit;color:var(--co-semantic-text-default);line-height:1.4;padding:0}.co-column-picker__search-input::placeholder{color:var(--co-semantic-text-muted)}.co-column-picker__search-clear{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:22px;height:22px;border:none;background:none;cursor:pointer;color:var(--co-semantic-text-muted);padding:0;border-radius:var(--co-border-radius-xxs);transition:all var(--co-motion-duration-fast) var(--co-motion-ease-out)}.co-column-picker__search-clear:hover{color:var(--co-semantic-text-default);background:var(--co-semantic-surface-hover)}.co-column-picker__toolbar{display:flex;align-items:center;gap:2px;padding:var(--co-spacing-xs) var(--co-spacing-md);border-bottom:1px solid var(--co-semantic-border-subtle)}.co-column-picker__toolbar-sep{width:1px;height:14px;background:var(--co-semantic-border-subtle);margin:0 var(--co-spacing-xs)}.co-column-picker__toolbar-btn{border:none;background:none;font-size:11.5px;font-family:inherit;color:var(--co-semantic-text-muted);cursor:pointer;padding:3px var(--co-spacing-xs);font-weight:500;transition:all var(--co-motion-duration-fast) var(--co-motion-ease-out);border-radius:var(--co-border-radius-xxs);line-height:1.4}.co-column-picker__toolbar-btn:hover{color:var(--co-semantic-text-default);background:var(--co-semantic-surface-hover)}.co-column-picker__toolbar-counter{font-size:11.5px;font-weight:500;color:var(--co-semantic-text-muted);font-variant-numeric:tabular-nums;padding:2px var(--co-spacing-xs);background:var(--co-semantic-surface-muted);border:1px solid var(--co-semantic-border-subtle);border-radius:var(--co-border-radius-xxs)}.co-column-picker__scroll{overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--co-semantic-border-default) transparent}.co-column-picker__scroll::-webkit-scrollbar{width:6px}.co-column-picker__scroll::-webkit-scrollbar-track{background:transparent}.co-column-picker__scroll::-webkit-scrollbar-thumb{background:var(--co-semantic-border-default);border-radius:var(--co-border-radius-full)}.co-column-picker__tree{padding:var(--co-spacing-xs) 0}.co-column-picker__node{user-select:none}.co-column-picker__node-row{display:flex;align-items:center;min-height:34px;padding:0 12px 0 10px;gap:var(--co-spacing-xs);cursor:pointer;transition:background-color var(--co-motion-duration-fast) var(--co-motion-ease-out)}.co-column-picker__node-row:hover{background-color:var(--co-semantic-surface-hover)}.co-column-picker__node-row--parent:hover{background-color:var(--co-semantic-surface-muted)}.co-column-picker__node-row--expanded{background-color:var(--co-semantic-surface-muted)}.co-column-picker__node-row--selected{background-color:var(--co-semantic-surface-muted)}.co-column-picker__node-label{flex:1;font-size:var(--co-font-size-14);font-weight:400;color:var(--co-semantic-text-default);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.4}.co-column-picker__node-label--parent{font-weight:600;text-transform:capitalize}.co-column-picker__node-label--self{font-weight:400;color:var(--co-semantic-text-muted);text-transform:none}.co-column-picker__node-label mark{background:color-mix(in srgb, var(--co-color-primary-amarillo) 30%, transparent);color:inherit;padding:0 1px;border-radius:1px}.co-column-picker__self-tag{flex-shrink:0;font-size:10px;font-weight:500;color:var(--co-semantic-text-muted);background:var(--co-semantic-surface-muted);padding:1px 6px;border-radius:var(--co-border-radius-xxs);border:1px solid var(--co-semantic-border-subtle);text-transform:lowercase}.co-column-picker__node-counter{flex-shrink:0;font-size:11px;font-weight:400;color:var(--co-semantic-text-muted);font-variant-numeric:tabular-nums}.co-column-picker__counter-selected{font-weight:600;color:var(--co-semantic-text-default)}.co-column-picker__counter-sep{color:var(--co-semantic-border-default);margin:0 1px}.co-column-picker__counter-total{color:var(--co-semantic-text-muted)}.co-column-picker__chevron{flex-shrink:0;width:20px;height:20px;display:flex;align-items:center;justify-content:center;color:var(--co-semantic-text-muted);margin-left:var(--co-spacing-xs);transition:transform var(--co-motion-duration-base) var(--co-motion-ease-out), color var(--co-motion-duration-base) var(--co-motion-ease-out)}.co-column-picker__chevron:hover{color:var(--co-semantic-text-default)}.co-column-picker__chevron--open{transform:rotate(90deg);color:var(--co-semantic-text-default)}.co-column-picker__node-children{position:relative}.co-column-picker__node-children::before{content:'';position:absolute;left:var(--guide-left, 19px);top:0;bottom:0;width:1px;background:var(--co-semantic-border-default)}.co-column-picker__section-header{display:flex;align-items:center;gap:6px;padding:var(--co-spacing-xs) var(--co-spacing-md) var(--co-spacing-xs);margin-top:var(--co-spacing-xs);border-top:1px solid var(--co-semantic-border-subtle)}.co-column-picker__section-header:first-child{margin-top:0;border-top:none}.co-column-picker__section-label{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:0.5px;color:var(--co-semantic-text-secondary)}.co-column-picker__section-prefix{font-size:10px;font-weight:500;color:var(--co-semantic-text-muted);opacity:0.75}.co-column-picker__empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--co-spacing-xs);padding:40px 16px;color:var(--co-semantic-text-muted);font-size:var(--co-font-size-14)}.co-column-picker__empty-icon{color:var(--co-semantic-border-default)}.co-column-picker__helper{display:flex;align-items:center;gap:var(--co-spacing-xs);padding:0 var(--co-spacing-xs)}.co-column-picker__helper-icon{flex-shrink:0;display:flex;align-items:center}.co-column-picker__helper-text{font-size:var(--co-font-size-12, 12px);font-weight:400;line-height:1.4;color:var(--co-semantic-text-muted)}.co-column-picker__helper--error .co-column-picker__helper-text,.co-column-picker__helper--error .co-column-picker__helper-icon{color:var(--co-semantic-status-error)}.co-column-picker__helper--success .co-column-picker__helper-text,.co-column-picker__helper--success .co-column-picker__helper-icon{color:var(--co-semantic-status-success)}.co-column-picker__helper--warning .co-column-picker__helper-text,.co-column-picker__helper--warning .co-column-picker__helper-icon{color:var(--co-color-status-review)}.co-column-picker__helper--info .co-column-picker__helper-text,.co-column-picker__helper--info .co-column-picker__helper-icon{color:var(--co-semantic-status-info)}";export{h as co_column_picker}
|
|
1
|
+
import{h as e,r as o,c,a as t}from"./p-DJkaRtbb.js";import{n as r}from"./p-Ba_v-MzM.js";function i(e){return e?e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").replace(/^\w/,(e=>e.toUpperCase())):""}function n(e){return String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function s(e,o){if(!o)return n(e);const c=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return n(e).replace(new RegExp(`(${c})`,"gi"),"<mark>$1</mark>")}function a(e,o){const c=new Set(e),t={};for(const c of e){const e=c.split(".");let r=t;for(let c=0;c<e.length;c++){const t=e[c],i=e.slice(0,c+1).join(".");if(!r[t]){const n=c===e.length-1&&(null==o?void 0:o.get(i))||t;r[t]={label:n,key:i,childrenMap:{}}}c<e.length-1&&(r=r[t].childrenMap)}}const r=e=>Object.values(e).map((e=>{const o=r(e.childrenMap),t=o.length>0,i=t&&c.has(e.key),n={label:e.label,key:e.key,fullPath:e.key,children:t?o:null};return i&&n.children&&n.children.unshift({label:e.label,key:e.key+".__self",fullPath:e.key,children:null,isSelf:!0}),n}));return l(r(t))}function l(e){return[...e].sort(((e,o)=>{if(e.isSelf)return-1;if(o.isSelf)return 1;const c=e.children&&e.children.length>0,t=o.children&&o.children.length>0;return!c&&t?-1:c&&!t?1:e.label.localeCompare(o.label)})).map((e=>Object.assign(Object.assign({},e),{children:e.children?l(e.children):null})))}function d(e,o){const c=r(o);return e.map((e=>{const t=r(e.label).includes(c),n=r(i(e.label)).includes(c),s=r(e.fullPath).includes(c);if(!e.children||0===e.children.length)return t||n||s?e:null;const a=d(e.children,o);return t||n||a.length>0?Object.assign(Object.assign({},e),{children:a.length>0?a:e.children}):null})).filter(Boolean)}function p(e){const o=[];for(const c of e)c.children&&0!==c.children.length?o.push(...p(c.children)):o.push(c.fullPath);return o}const u=o=>{const{node:c,depth:t,selected:r,expandedKeys:n,disabled:a,query:l,onOptionClick:d,onParentCheck:h,onToggleExpand:m}=o,f=!c.children||0===c.children.length,_=n.has(c.key),b=f&&r.includes(c.fullPath);let k=!1,v=!1,g=0,x=0;if(!f&&c.children){const e=p(c.children);x=e.length,g=e.filter((e=>r.includes(e))).length,k=x>0&&g===x,v=g>0}return e("div",{class:"co-column-picker__node"},e("div",{class:{"co-column-picker__node-row":!0,"co-column-picker__node-row--leaf":f,"co-column-picker__node-row--parent":!f,"co-column-picker__node-row--expanded":!f&&_,"co-column-picker__node-row--selected":f&&b},style:{paddingLeft:20*t+10+"px"},onClick:e=>f?d(c.fullPath):m(c.key,e)},e("co-checkbox",{checked:f?b:k,indeterminate:!f&&v&&!k,disabled:a,onClick:e=>{e.stopPropagation(),f?d(c.fullPath):h(c)}}),e("span",{class:{"co-column-picker__node-label":!0,"co-column-picker__node-label--parent":!f,"co-column-picker__node-label--self":!!c.isSelf},innerHTML:s(i(c.label),l)}),c.isSelf&&e("span",{class:"co-column-picker__self-tag"},"self"),!f&&e("span",{class:"co-column-picker__node-counter"},g>0&&[e("span",{class:"co-column-picker__counter-selected"},g),e("span",{class:"co-column-picker__counter-sep"},"/")],e("span",{class:"co-column-picker__counter-total"},x)),!f&&e("span",{class:{"co-column-picker__chevron":!0,"co-column-picker__chevron--open":_},onClick:e=>m(c.key,e)},e("co-icon",{name:"caret-right",size:16}))),!f&&_&&c.children&&e("div",{class:"co-column-picker__node-children",style:{"--guide-left":20*t+19+"px"}},c.children.map((o=>e(u,{node:o,depth:t+1,selected:r,expandedKeys:n,disabled:a,query:l,onOptionClick:d,onParentCheck:h,onToggleExpand:m})))))},h=class{constructor(e){o(this,e),this.coChange=c(this,"coChange",7),this.coClear=c(this,"coClear",7),this.coSearch=c(this,"coSearch",7),this.options="[]",this.value="[]",this.multiple=!0,this.disabled=!1,this.showToolbar=!0,this.showSearch=!0,this.clearable=!0,this.placeholder="Select…",this.maxHeight=220,this.emptyText="No results found",this.selectAllText="Select all",this.clearText="Clear",this.expandText="Expand",this.collapseText="Collapse",this.selectedText="selected",this.sections="[]",this.status="default",this.isOpen=!1,this.query="",this.expandedKeys=new Set,this.focused=!1,this.handleFieldClick=()=>{this.disabled||(this.isOpen=!this.isOpen,this.focused=!0,this.isOpen&&requestAnimationFrame((()=>{var e;return null===(e=this.searchInputEl)||void 0===e?void 0:e.focus()})))},this.handleSearchInput=e=>{this.query=e.target.value,this.coSearch.emit(this.query),this.query&&(this.expandedKeys=function(e,o,c){const t=r(o),n=new Set(c),s=e=>{var o;let c=!1;for(const a of e)if(null===(o=a.children)||void 0===o?void 0:o.length){const e=s(a.children),o=r(a.label).includes(t)||r(i(a.label)).includes(t);(e||o)&&(n.add(a.key),c=!0)}else(r(a.label).includes(t)||r(i(a.label)).includes(t))&&(c=!0);return c};return s(e),n}(this.getTree(),this.query,this.expandedKeys))},this.handleSearchClear=e=>{var o;e.stopPropagation(),this.query="",this.coSearch.emit(""),null===(o=this.searchInputEl)||void 0===o||o.focus()},this.handleClear=e=>{e.stopPropagation(),this.value="[]",this.coClear.emit(),this.coChange.emit([])},this.handleSelectAll=()=>{this.disabled||this.emitSelection(p(this.getTree()))},this.handleDeselectAll=()=>{this.disabled||(this.value="[]",this.coClear.emit(),this.coChange.emit([]))},this.handleExpandAll=()=>{this.expandedKeys=function(e){const o=new Set,c=e=>{var t;for(const r of e)(null===(t=r.children)||void 0===t?void 0:t.length)&&(o.add(r.key),c(r.children))};return c(e),o}(this.getTree())},this.handleCollapseAll=()=>{this.expandedKeys=new Set},this.handleOptionClick=e=>{if(!this.disabled)if(this.multiple){const o=[...this.selectedValues],c=o.indexOf(e);c>=0?o.splice(c,1):o.push(e),this.emitSelection(o)}else this.emitSelection([e]),this.isOpen=!1},this.handleParentCheck=e=>{if(this.disabled)return;const o=p(e.children||[]),c=[...this.selectedValues];if(o.every((e=>c.includes(e))))this.emitSelection(c.filter((e=>!o.includes(e))));else{for(const e of o)c.includes(e)||c.push(e);this.emitSelection(c)}},this.handleChipRemove=(e,o)=>{o.stopPropagation(),this.disabled||this.emitSelection(this.selectedValues.filter((o=>o!==e)))},this.handleToggleExpand=(e,o)=>{o.stopPropagation();const c=new Set(this.expandedKeys);c.has(e)?c.delete(e):c.add(e),this.expandedKeys=c}}get parsedOptions(){return function(e){let o=e;if("string"==typeof o)try{o=JSON.parse(o)}catch(e){return[]}return Array.isArray(o)?o.map((e=>"string"==typeof e?e:e.value)):[]}(this.options)}get parsedSections(){return function(e){let o=e;if("string"==typeof o)try{o=JSON.parse(o)}catch(e){return[]}return Array.isArray(o)?o:[]}(this.sections)}get selectedValues(){return function(e){if("string"==typeof e)try{return JSON.parse(e)}catch(o){return e?[e]:[]}return Array.isArray(e)?e:[]}(this.value)}get optionLabelMap(){return function(e){let o=e;if("string"==typeof o)try{o=JSON.parse(o)}catch(e){return new Map}if(!Array.isArray(o))return new Map;const c=new Map;for(const e of o)"string"==typeof e?c.set(e,i(e.split(".").pop()||e)):c.set(e.value,e.label||e.value);return c}(this.options)}get hasValue(){return this.selectedValues.length>0}get statusIcon(){return{error:"warning-circle",success:"check-circle",warning:"warning",info:"info"}[this.status]||null}emitSelection(e){this.value=JSON.stringify(e),this.coChange.emit(e)}onOptionsChange(){this.expandedKeys=function(e,o,c){if(!o.length)return c;const t=new Set(c),r=e=>{var c;for(const i of e)(null===(c=i.children)||void 0===c?void 0:c.length)&&(p(i.children).some((e=>o.includes(e)))&&t.add(i.key),r(i.children))};return r(e),t}(this.getTree(),this.selectedValues,this.expandedKeys)}handleDocumentClick(e){this.el.contains(e.target)||(this.isOpen=!1,this.focused=!1)}getTree(){return a(this.parsedOptions,this.optionLabelMap)}getSectionedTree(){const e=this.parsedSections;if(!e.length)return[];const o=this.parsedOptions;return e.map((c=>{const t=o.filter((o=>c.prefix?o.startsWith(c.prefix+"."):!e.some((e=>e.prefix&&o.startsWith(e.prefix+".")))));return Object.assign(Object.assign({},c),{nodes:l(a(t,this.optionLabelMap))})})).filter((e=>e.nodes.length>0))}renderField(){const o=this.selectedValues,c=this.optionLabelMap;return e("div",{class:{"co-column-picker__field":!0,"co-column-picker__field--focused":this.focused,"co-column-picker__field--disabled":this.disabled,"co-column-picker__field--open":this.isOpen},onClick:this.handleFieldClick},this.multiple&&o.length>0&&e("div",{class:"co-column-picker__field-chips"},o.map((o=>e("co-chip",{label:c.get(o)||i(o.split(".").pop()||o),size:"small",removable:!this.disabled,onCoRemove:e=>this.handleChipRemove(o,e)})))),!this.multiple&&o.length>0&&e("span",{class:"co-column-picker__field-text"},o.map((e=>c.get(e)||i(e.split(".").pop()||e))).join(", ")),0===o.length&&e("span",{class:"co-column-picker__field-placeholder"},this.placeholder),e("div",{class:"co-column-picker__field-actions"},this.clearable&&this.hasValue&&!this.disabled&&e("button",{class:"co-column-picker__field-clear",type:"button",tabIndex:-1,onClick:this.handleClear,"aria-label":"Clear"},e("co-icon",{name:"x-circle",size:16,weight:"fill"})),e("co-icon",{name:this.isOpen?"caret-up":"caret-down",size:16,class:"co-column-picker__field-caret"})))}renderTree(){const o={selected:this.selectedValues,expandedKeys:this.expandedKeys,disabled:this.disabled,query:this.query,onOptionClick:this.handleOptionClick,onParentCheck:this.handleParentCheck,onToggleExpand:this.handleToggleExpand};if(this.parsedSections.length>0){const c=this.getSectionedTree(),t=this.query?c.map((e=>Object.assign(Object.assign({},e),{nodes:d(e.nodes,this.query)}))).filter((e=>e.nodes.length>0)):c;return t.length?e("div",{class:"co-column-picker__tree"},t.map((c=>[e("div",{class:"co-column-picker__section-header"},e("span",{class:"co-column-picker__section-label"},c.label),c.prefix&&e("span",{class:"co-column-picker__section-prefix"},"(",c.prefix,")")),...c.nodes.map((c=>e(u,Object.assign({node:c,depth:0},o))))]))):this.renderEmpty()}const c=this.getTree(),t=this.query?d(c,this.query):c;return t.length?e("div",{class:"co-column-picker__tree"},t.map((c=>e(u,Object.assign({node:c,depth:0},o))))):this.renderEmpty()}renderEmpty(){return e("div",{class:"co-column-picker__empty"},e("co-icon",{name:"magnifying-glass",size:40,class:"co-column-picker__empty-icon"}),e("span",null,this.emptyText))}render(){return e("div",{key:"ab2ad3bd249351f19e223ee8437d0f66ea368f84",class:{"co-column-picker":!0,"co-column-picker--open":this.isOpen,"co-column-picker--disabled":this.disabled,"co-column-picker--focused":this.focused,[`co-column-picker--${this.status}`]:"default"!==this.status}},(this.label||this.secondaryLabel)&&e("div",{key:"eef032ff9774ee1ac9c656a8413ebf099a7d4a42",class:"co-column-picker__labels"},this.label&&e("label",{key:"6638950f784fac9809d853945b87dd8ce26d86b8",class:"co-column-picker__label"},this.label),this.secondaryLabel&&e("span",{key:"eeac25d27edddeabf25e7b62f9e7e550d9683f87",class:"co-column-picker__secondary-label"},this.secondaryLabel)),this.renderField(),this.isOpen&&e("div",{key:"761ac25d7c97c1b5b51e24dde8e0bd98d1471649",class:"co-column-picker__dropdown"},this.showSearch&&e("div",{key:"e54ed5eee5f71cb30b3e09728b0e4d4987d98e99",class:"co-column-picker__search"},e("co-icon",{key:"184a9b2193e53669fb10796bdd770a863fe642b7",name:"magnifying-glass",size:14,class:"co-column-picker__search-icon"}),e("input",{key:"9f41b5adf0dfeec083a300ce743c3bbe78b95fe9",ref:e=>this.searchInputEl=e,class:"co-column-picker__search-input",type:"text",value:this.query,placeholder:this.placeholder,onInput:this.handleSearchInput,onClick:e=>e.stopPropagation()}),this.query&&e("button",{key:"4dd69184260a2edead1737df4f2f07ecf6b10680",class:"co-column-picker__search-clear",type:"button",onClick:this.handleSearchClear},e("co-icon",{key:"5cf2e640b64683b3802696ac66d6ecfabfffdb3a",name:"x",size:14}))),this.showToolbar&&this.multiple&&e("div",{key:"d383004d0b209a93f11f7d070796b2944f3c6849",class:"co-column-picker__toolbar"},e("button",{key:"22dd890b4c35c8cac632f2c90ce0d0a4f20a166a",class:"co-column-picker__toolbar-btn",type:"button",onClick:this.handleSelectAll},this.selectAllText),e("button",{key:"5a69e90720c2e3724656ca9a9a774f496faafcb1",class:"co-column-picker__toolbar-btn",type:"button",onClick:this.handleDeselectAll},this.clearText),e("span",{key:"4c9bc30f4429d7e54f4040ec874ea18423e7de77",class:"co-column-picker__toolbar-sep"}),e("button",{key:"b3a106e5b4268f3ea6d6de8bdac162b247d43b91",class:"co-column-picker__toolbar-btn",type:"button",onClick:this.handleExpandAll},this.expandText),e("button",{key:"a79d4b5ba8a481c2db958ba9d685712e24b95feb",class:"co-column-picker__toolbar-btn",type:"button",onClick:this.handleCollapseAll},this.collapseText),e("span",{key:"53439fb7eab725a7e11261aa440106c68dbf7865",style:{flex:"1"}}),this.selectedValues.length>0&&e("span",{key:"d34736ad6f2081228f7cb43a5d88b69e7fc33e15",class:"co-column-picker__toolbar-counter"},this.selectedValues.length," ",this.selectedText)),e("div",{key:"28226718a1270e859742fe754d4ea75a0c23a8e6",class:"co-column-picker__scroll",style:{maxHeight:`${this.maxHeight}px`}},this.renderTree())),this.helperText&&e("div",{key:"e9a252deb5af1abd89d988bc354a8dbd6130a6cd",class:`co-column-picker__helper co-column-picker__helper--${this.status}`},this.statusIcon&&e("co-icon",{key:"051cd7eee2817ba288be2e8d38c2b92b0fc63cb8",name:this.statusIcon,size:14,weight:"fill",class:"co-column-picker__helper-icon"}),e("span",{key:"b496d726484740151c2830e1e4d2a85b1040d86f",class:"co-column-picker__helper-text"},this.helperText)))}get el(){return t(this)}static get watchers(){return{options:[{onOptionsChange:0}]}}};h.style=":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-column-picker{display:flex;flex-direction:column;gap:var(--co-spacing-xs);position:relative}.co-column-picker__labels{display:flex;align-items:center;justify-content:space-between;padding:0 var(--co-spacing-xs);gap:var(--co-spacing-xs)}.co-column-picker__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-column-picker__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-column-picker--disabled .co-column-picker__label,.co-column-picker--disabled .co-column-picker__secondary-label{color:var(--co-semantic-text-disabled)}.co-column-picker__field{display:flex;align-items:center;flex-wrap:wrap;gap:var(--co-spacing-xs);padding:var(--co-spacing-xs) var(--co-spacing-md);background:var(--co-semantic-surface-secondary);border:1px solid var(--co-semantic-border-subtle);border-radius:var(--co-border-radius-xs);min-height:40px;box-sizing:border-box;cursor:pointer;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-column-picker__field--focused{border-color:var(--co-semantic-border-focus);box-shadow:0 0 0 2px var(--co-semantic-border-focus-ring)}.co-column-picker__field--disabled{background:var(--co-semantic-surface-disabled);border-color:transparent;cursor:not-allowed}.co-column-picker--error .co-column-picker__field{border-color:var(--co-semantic-status-error)}.co-column-picker--success .co-column-picker__field{border-color:var(--co-semantic-status-success)}.co-column-picker--warning .co-column-picker__field{border-color:var(--co-color-status-review)}.co-column-picker--info .co-column-picker__field{border-color:var(--co-semantic-status-info)}.co-column-picker__field-text{flex:1;min-width:0;color:var(--co-semantic-text-default);font-size:var(--co-font-size-14);font-weight:400;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.co-column-picker__field-placeholder{flex:1;color:var(--co-semantic-text-muted);font-size:var(--co-font-size-14);font-weight:400}.co-column-picker__field-chips{display:flex;flex-wrap:wrap;gap:var(--co-spacing-xs);flex:1}.co-column-picker__field-actions{display:flex;align-items:center;gap:var(--co-spacing-xs);flex-shrink:0;margin-left:auto}.co-column-picker__field-clear{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-column-picker__field-clear:hover{color:var(--co-semantic-text-default)}.co-column-picker__field-caret{color:var(--co-semantic-text-muted);display:flex;align-items:center;transition:color var(--co-motion-duration-fast) var(--co-motion-ease-out)}.co-column-picker__field--open .co-column-picker__field-caret{color:var(--co-semantic-text-default)}.co-column-picker__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 var(--co-color-opacity-negro-8);overflow:hidden}.co-column-picker__search{display:flex;align-items:center;gap:var(--co-spacing-xs);padding:var(--co-spacing-xs) var(--co-spacing-md);border-bottom:1px solid var(--co-semantic-border-subtle);transition:border-color var(--co-motion-duration-base) var(--co-motion-ease-out)}.co-column-picker__search:focus-within{border-color:var(--co-semantic-border-focus)}.co-column-picker__search-icon{flex-shrink:0;color:var(--co-semantic-text-muted);display:flex;align-items:center}.co-column-picker__search-input{flex:1;border:none;outline:none;background:transparent;font-size:var(--co-font-size-14);font-family:inherit;color:var(--co-semantic-text-default);line-height:1.4;padding:0}.co-column-picker__search-input::placeholder{color:var(--co-semantic-text-muted)}.co-column-picker__search-clear{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:22px;height:22px;border:none;background:none;cursor:pointer;color:var(--co-semantic-text-muted);padding:0;border-radius:var(--co-border-radius-xxs);transition:all var(--co-motion-duration-fast) var(--co-motion-ease-out)}.co-column-picker__search-clear:hover{color:var(--co-semantic-text-default);background:var(--co-semantic-surface-hover)}.co-column-picker__toolbar{display:flex;align-items:center;gap:2px;padding:var(--co-spacing-xs) var(--co-spacing-md);border-bottom:1px solid var(--co-semantic-border-subtle)}.co-column-picker__toolbar-sep{width:1px;height:14px;background:var(--co-semantic-border-subtle);margin:0 var(--co-spacing-xs)}.co-column-picker__toolbar-btn{border:none;background:none;font-size:11.5px;font-family:inherit;color:var(--co-semantic-text-muted);cursor:pointer;padding:3px var(--co-spacing-xs);font-weight:500;transition:all var(--co-motion-duration-fast) var(--co-motion-ease-out);border-radius:var(--co-border-radius-xxs);line-height:1.4}.co-column-picker__toolbar-btn:hover{color:var(--co-semantic-text-default);background:var(--co-semantic-surface-hover)}.co-column-picker__toolbar-counter{font-size:11.5px;font-weight:500;color:var(--co-semantic-text-muted);font-variant-numeric:tabular-nums;padding:2px var(--co-spacing-xs);background:var(--co-semantic-surface-muted);border:1px solid var(--co-semantic-border-subtle);border-radius:var(--co-border-radius-xxs)}.co-column-picker__scroll{overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--co-semantic-border-default) transparent}.co-column-picker__scroll::-webkit-scrollbar{width:6px}.co-column-picker__scroll::-webkit-scrollbar-track{background:transparent}.co-column-picker__scroll::-webkit-scrollbar-thumb{background:var(--co-semantic-border-default);border-radius:var(--co-border-radius-full)}.co-column-picker__tree{padding:var(--co-spacing-xs) 0}.co-column-picker__node{user-select:none}.co-column-picker__node-row{display:flex;align-items:center;min-height:34px;padding:0 12px 0 10px;gap:var(--co-spacing-xs);cursor:pointer;transition:background-color var(--co-motion-duration-fast) var(--co-motion-ease-out)}.co-column-picker__node-row:hover{background-color:var(--co-semantic-surface-hover)}.co-column-picker__node-row--parent:hover{background-color:var(--co-semantic-surface-muted)}.co-column-picker__node-row--expanded{background-color:var(--co-semantic-surface-muted)}.co-column-picker__node-row--selected{background-color:var(--co-semantic-surface-muted)}.co-column-picker__node-label{flex:1;font-size:var(--co-font-size-14);font-weight:400;color:var(--co-semantic-text-default);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.4}.co-column-picker__node-label--parent{font-weight:600;text-transform:capitalize}.co-column-picker__node-label--self{font-weight:400;color:var(--co-semantic-text-muted);text-transform:none}.co-column-picker__node-label mark{background:color-mix(in srgb, var(--co-color-primary-amarillo) 30%, transparent);color:inherit;padding:0 1px;border-radius:1px}.co-column-picker__self-tag{flex-shrink:0;font-size:10px;font-weight:500;color:var(--co-semantic-text-muted);background:var(--co-semantic-surface-muted);padding:1px 6px;border-radius:var(--co-border-radius-xxs);border:1px solid var(--co-semantic-border-subtle);text-transform:lowercase}.co-column-picker__node-counter{flex-shrink:0;font-size:11px;font-weight:400;color:var(--co-semantic-text-muted);font-variant-numeric:tabular-nums}.co-column-picker__counter-selected{font-weight:600;color:var(--co-semantic-text-default)}.co-column-picker__counter-sep{color:var(--co-semantic-border-default);margin:0 1px}.co-column-picker__counter-total{color:var(--co-semantic-text-muted)}.co-column-picker__chevron{flex-shrink:0;width:20px;height:20px;display:flex;align-items:center;justify-content:center;color:var(--co-semantic-text-muted);margin-left:var(--co-spacing-xs);transition:transform var(--co-motion-duration-base) var(--co-motion-ease-out), color var(--co-motion-duration-base) var(--co-motion-ease-out)}.co-column-picker__chevron:hover{color:var(--co-semantic-text-default)}.co-column-picker__chevron--open{transform:rotate(90deg);color:var(--co-semantic-text-default)}.co-column-picker__node-children{position:relative}.co-column-picker__node-children::before{content:'';position:absolute;left:var(--guide-left, 19px);top:0;bottom:0;width:1px;background:var(--co-semantic-border-default)}.co-column-picker__section-header{display:flex;align-items:center;gap:6px;padding:var(--co-spacing-xs) var(--co-spacing-md) var(--co-spacing-xs);margin-top:var(--co-spacing-xs);border-top:1px solid var(--co-semantic-border-subtle)}.co-column-picker__section-header:first-child{margin-top:0;border-top:none}.co-column-picker__section-label{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:0.5px;color:var(--co-semantic-text-secondary)}.co-column-picker__section-prefix{font-size:10px;font-weight:500;color:var(--co-semantic-text-muted);opacity:0.75}.co-column-picker__empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--co-spacing-xs);padding:40px 16px;color:var(--co-semantic-text-muted);font-size:var(--co-font-size-14)}.co-column-picker__empty-icon{color:var(--co-semantic-border-default)}.co-column-picker__helper{display:flex;align-items:center;gap:var(--co-spacing-xs);padding:0 var(--co-spacing-xs)}.co-column-picker__helper-icon{flex-shrink:0;display:flex;align-items:center}.co-column-picker__helper-text{font-size:var(--co-font-size-12, 12px);font-weight:400;line-height:1.4;color:var(--co-semantic-text-muted)}.co-column-picker__helper--error .co-column-picker__helper-text,.co-column-picker__helper--error .co-column-picker__helper-icon{color:var(--co-semantic-status-error)}.co-column-picker__helper--success .co-column-picker__helper-text,.co-column-picker__helper--success .co-column-picker__helper-icon{color:var(--co-semantic-status-success)}.co-column-picker__helper--warning .co-column-picker__helper-text,.co-column-picker__helper--warning .co-column-picker__helper-icon{color:var(--co-color-status-review)}.co-column-picker__helper--info .co-column-picker__helper-text,.co-column-picker__helper--info .co-column-picker__helper-icon{color:var(--co-semantic-status-info)}";export{h as co_column_picker}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as o,H as s,a}from"./p-
|
|
1
|
+
import{r as t,c as i,h as o,H as s,a}from"./p-DJkaRtbb.js";import{c as e}from"./p-BtliEQAT.js";const d=class{constructor(o){t(this,o),this.coClose=i(this,"coClose",3),this.open=!1,this.placement="right-start",this.dot=!0,this.closeOnEscape=!0,this.closeOnClickOutside=!0,this.position=()=>{if(!this.open||!this.panelEl||!this.anchorRect)return;const t=this.anchorRect,i={top:t.top,left:t.left,right:t.left+t.width,bottom:t.top+t.height,width:t.width,height:t.height},o=this.panelEl.getBoundingClientRect(),{top:s,left:a}=e(i,o,{placement:this.placement,offset:8,flip:!0});this.panelEl.style.top=`${s}px`,this.panelEl.style.left=`${a}px`},this.onScroll=()=>{this.open&&this.requestClose()},this.onKeydown=t=>{this.open&&this.closeOnEscape&&"Escape"===t.key&&(t.stopPropagation(),this.requestClose())},this.onPointerDown=t=>{if(!this.open||!this.closeOnClickOutside||!this.panelEl)return;const i=t.composedPath();i.includes(this.panelEl)||i.includes(this.el)||this.requestClose()}}componentDidLoad(){this.open&&this.onOpenChange(!0)}onOpenChange(t){var i;t?(this.prevFocus=null!==(i=document.activeElement)&&void 0!==i?i:void 0,requestAnimationFrame((()=>this.promoteAndPosition()))):(this.dismissPanel(),this.prevFocus&&this.prevFocus.focus())}onAnchorChange(){this.open&&this.position()}disconnectedCallback(){this.teardownListeners()}promoteAndPosition(){var t,i;if(this.open&&this.panelEl){try{null===(i=(t=this.panelEl).showPopover)||void 0===i||i.call(t)}catch(t){}this.position(),this.panelEl.focus({preventScroll:!0}),window.addEventListener("resize",this.onScroll),window.addEventListener("scroll",this.onScroll,!0),window.addEventListener("keydown",this.onKeydown,!0),window.addEventListener("pointerdown",this.onPointerDown,!0)}}dismissPanel(){var t,i;try{null===(i=null===(t=this.panelEl)||void 0===t?void 0:t.hidePopover)||void 0===i||i.call(t)}catch(t){}this.teardownListeners()}teardownListeners(){window.removeEventListener("resize",this.onScroll),window.removeEventListener("scroll",this.onScroll,!0),window.removeEventListener("keydown",this.onKeydown,!0),window.removeEventListener("pointerdown",this.onPointerDown,!0)}requestClose(){this.coClose.emit()}render(){return o(s,{key:"9796ba38e83610ddb390dcab0818baf6bededc72"},o("div",{key:"e08bba8ebefb5206cbdd7a554e25ff9f4fcf9541",class:"pop",popover:"manual",role:"dialog","aria-modal":"false","aria-label":this.popoverLabel,tabIndex:-1,ref:t=>this.panelEl=t},o("div",{key:"185e30ed1640cbfb04e056d7a3433df2f5b94e06",class:"pop__actions",part:"actions"},o("slot",{key:"db04986cc1b63d52c5f1cc6579b5d00dbd46e476",name:"actions"})),o("div",{key:"89bbdc2a255e18d180183dbb127ce05a72ff262d",class:"pop__head"},this.dot&&o("span",{key:"6819901baff501958c8214dd7546a90a108c45f5",class:"pop__dot",style:this.color?{background:this.color}:{}}),o("div",{key:"1111598f3ee886a0f2d9360c57278f1d71b76ddc",class:"pop__body",part:"body"},o("slot",{key:"82c5eb8ff0e7752993d8b25b6d33a4d15d7edd25"})))))}get el(){return a(this)}static get watchers(){return{open:[{onOpenChange:0}],anchorRect:[{onAnchorChange:0}]}}};d.style=":host{display:contents}.pop{position:fixed;margin:0;inset:auto;width:400px;max-width:calc(100vw - 24px);max-height:calc(100vh - 24px);overflow:auto;background:var(--co-semantic-surface-page);border:1px solid var(--co-semantic-border-default);border-radius:var(--co-border-radius-md, 14px);box-shadow:var(--co-shadow-xl, var(--co-shadow-lg));padding:0;z-index:1000;font-family:var(--co-font-family-primary);color:var(--co-semantic-text-default);animation:co-pop-in var(--co-motion-duration-fast) var(--co-motion-ease-out);outline:none}@keyframes co-pop-in{from{opacity:0;transform:scale(0.96)}to{opacity:1;transform:scale(1)}}.pop__actions{display:flex;justify-content:flex-end;gap:var(--co-spacing-xxs);padding:var(--co-spacing-sm2) var(--co-spacing-sm2) 0}.pop__head{display:flex;gap:var(--co-spacing-md);padding:var(--co-spacing-xs) var(--co-spacing-xl) var(--co-spacing-xl)}.pop__dot{flex:0 0 auto;width:14px;height:14px;border-radius:var(--co-border-radius-xxs);margin-top:5px;background:var(--co-color-primary-azul)}.pop__body{min-width:0;flex:1 1 auto}";export{d as co_event_popover}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,h as o}from"./p-
|
|
1
|
+
import{r as a,h as o}from"./p-DJkaRtbb.js";const l=class{constructor(o){a(this,o),this.visible=!0,this.overlay=!1,this.size="md",this.text="",this.background=""}render(){return this.visible?o("div",{class:{"co-loader":!0,"co-loader--overlay":this.overlay},style:this.overlay&&this.background?{background:this.background}:void 0,part:"root",role:"status","aria-live":"polite"},o("div",{class:"co-loader__balls",part:"balls"},o("span",{class:"co-loader__ball co-loader__ball--blue"}),o("span",{class:"co-loader__ball co-loader__ball--yellow"}),o("span",{class:"co-loader__ball co-loader__ball--red"})),this.text&&o("p",{class:"co-loader__text",part:"text"},this.text)):null}};l.style=':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))}}';export{l as co_loader}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,c as t,h as s}from"./p-
|
|
1
|
+
import{r as o,c as t,h as s}from"./p-DJkaRtbb.js";const a={success:"info",error:"info",warning:"info",info:"info",neutral:null},c=["error","warning"],r=class{constructor(s){o(this,s),this.coDismiss=t(this,"coDismiss",7),this.entered=!1,this.message="",this.dismissible=!0,this.actionsLayout="inline",this.variant="neutral"}componentDidLoad(){requestAnimationFrame((()=>{this.entered=!0}))}render(){var o;const t=!!this.description,r="stacked"===this.actionsLayout,e=null!=this.progress,i=e?Math.max(0,Math.min(100,this.progress)):0,n="success"===this.variant&&!this.icon&&!e,l=n?null:null!==(o=this.icon)&&void 0!==o?o:e?"upload-simple":a[this.variant],d=c.includes(this.variant)?"alert":"status",u={"co-toast":!0,[`co-toast--${this.variant}`]:!0,"co-toast--multiline":t,"co-toast--stacked":r,"co-toast--progress":e,"co-toast--in":this.entered},f=s("div",{key:"77bab740efb16eb862d74d3a072baa0399ac5cdc",class:"co-toast__content"},s("span",{key:"5677e36f94c873b634e211aa7918ed44ace21b34",class:"co-toast__message"},this.message),t&&s("span",{key:"ca564a3e80564ac91a260d288f38a2ce28db66bb",class:"co-toast__description"},this.description));return s("div",{key:"d065c88d1d5e6465dab56a2fd59849051e0682d8",class:u,part:"toast",role:d},(n||l)&&s("span",{key:"ee73223250c29067ee3e1a40140a3f8ef44aed4f",class:"co-toast__icon"},l?s("co-icon",{name:l,size:20}):s("svg",{class:"co-toast__check",viewBox:"0 0 16 16",width:"20",height:"20","aria-hidden":"true"},s("path",{d:"M3.5 8.5l3 3 6-6.5",pathLength:"1",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))),s("div",{key:"5aad9debc4e7b0a319e50b0f75ef10ac0b903a73",class:"co-toast__body"},e?s("div",{class:"co-toast__progress"},s("div",{class:"co-toast__progress-header"},f,s("span",{class:"co-toast__percent"},i,"%")),s("div",{class:"co-toast__track",part:"track",role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100},s("span",{class:"co-toast__fill",part:"fill",style:{width:`${i}%`}}))):f,r&&s("div",{key:"f7b7332e1dd67f2f4b1a2d5b97785f8f9593f14f",class:"co-toast__actions"},s("slot",{key:"c4238c8ee27dc2211419f0c8af77021cb7a35ec2",name:"action"}))),!r&&s("div",{key:"06b844a254ecd51dcb21c9cf84f2a7e5094a08bc",class:"co-toast__actions"},s("slot",{key:"c15f765d10ae12b38d081f3ad4b403c98ecd54c5",name:"action"})),this.dismissible&&s("button",{key:"52482f3d953e68c7b6108bdedb889aa136739316",class:"co-toast__dismiss",type:"button","aria-label":"Dismiss",onClick:()=>this.coDismiss.emit()},s("co-icon",{key:"9c92e6bcc6ef0bc346a1f9104d382af5bf50c3a6",name:"x",size:16})))}};r.style=":host{display:block;--co-toast-bg:var(--co-semantic-surface-page);--co-toast-border:var(--co-semantic-border-subtle);--co-toast-text:var(--co-semantic-text-default);--co-toast-text-secondary:var(--co-semantic-text-secondary);--co-toast-icon:var(--co-semantic-text-default);--co-toast-dismiss-bg:var(--co-semantic-surface-disabled);--co-toast-dismiss-color:var(--co-semantic-text-default)}.co-toast{display:flex;align-items:center;gap:var(--co-spacing-md);padding:var(--co-spacing-lg);background:var(--co-toast-bg);border:1px solid var(--co-toast-border);border-radius:var(--co-border-radius-sm);font-family:var(--co-font-family-primary);box-sizing:border-box;width:100%;min-width:320px;max-width:458px}.co-toast--multiline,.co-toast--stacked,.co-toast--progress{align-items:flex-start}.co-toast__icon{display:inline-flex;flex-shrink:0;color:var(--co-toast-icon)}.co-toast--multiline .co-toast__icon,.co-toast--progress .co-toast__icon{padding-top:2px}.co-toast--progress .co-toast__icon{color:var(--co-color-primary-azul, #2563eb)}.co-toast__body{display:flex;flex-direction:column;flex:1;min-width:0;gap:var(--co-spacing-md)}.co-toast__content{display:flex;flex-direction:column;gap:var(--co-spacing-xs);min-width:0}.co-toast__message{font-size:var(--co-font-size-14);font-weight:400;line-height:1.25;letter-spacing:var(--co-font-letter-spacing-body);color:var(--co-toast-text)}.co-toast__description{font-size:var(--co-font-size-12);font-weight:400;line-height:1.4;letter-spacing:var(--co-font-letter-spacing-body);color:var(--co-toast-text-secondary)}.co-toast__actions{display:flex;align-items:center;gap:var(--co-spacing-sm2);flex-shrink:0}.co-toast__actions:empty{display:none}.co-toast--stacked .co-toast__actions{justify-content:flex-end;width:100%}.co-toast__dismiss{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;margin:0;border:none;border-radius:var(--co-border-radius-full);background:var(--co-toast-dismiss-bg);color:var(--co-toast-dismiss-color);cursor:pointer;flex-shrink:0;transition:opacity var(--co-motion-duration-fast) var(--co-motion-ease-out);-webkit-font-smoothing:antialiased}.co-toast__dismiss:hover{opacity:0.88}.co-toast__dismiss:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:2px}.co-toast--success{--co-toast-bg:var(--co-color-status-bg-success);--co-toast-border:var(--co-color-status-bg-success);--co-toast-text:var(--co-color-status-success);--co-toast-text-secondary:var(--co-color-status-success);--co-toast-icon:var(--co-color-status-success);--co-toast-dismiss-bg:var(--co-color-status-success);--co-toast-dismiss-color:var(--co-color-base-blanco)}.co-toast--error{--co-toast-bg:var(--co-color-status-bg-error);--co-toast-border:var(--co-color-status-bg-error);--co-toast-text:var(--co-color-status-error);--co-toast-text-secondary:var(--co-color-status-error);--co-toast-icon:var(--co-color-status-error);--co-toast-dismiss-bg:var(--co-color-status-error);--co-toast-dismiss-color:var(--co-color-base-blanco)}.co-toast--warning{--co-toast-bg:var(--co-color-status-bg-review);--co-toast-border:var(--co-color-status-bg-review);--co-toast-text:var(--co-color-status-review);--co-toast-text-secondary:var(--co-color-status-review);--co-toast-icon:var(--co-color-status-review);--co-toast-dismiss-bg:var(--co-color-status-review);--co-toast-dismiss-color:var(--co-color-base-blanco)}.co-toast--info{--co-toast-bg:var(--co-color-status-bg-progress);--co-toast-border:var(--co-color-status-bg-progress);--co-toast-text:var(--co-color-status-progress);--co-toast-text-secondary:var(--co-color-status-progress);--co-toast-icon:var(--co-color-status-progress);--co-toast-dismiss-bg:var(--co-color-status-progress);--co-toast-dismiss-color:var(--co-color-base-blanco)}.co-toast__progress{min-width:0}.co-toast__progress-header{display:flex;align-items:center;gap:var(--co-spacing-md);min-width:0}.co-toast__progress-header .co-toast__content{flex:1;min-width:0}.co-toast__percent{flex-shrink:0;font-size:var(--co-font-size-12, 12px);font-weight:400;line-height:1.25;letter-spacing:var(--co-font-letter-spacing-body);color:var(--co-color-gray-500, #888888);font-variant-numeric:tabular-nums}.co-toast__track{width:100%;height:6px;margin-top:9px;border-radius:9999px;background:var(--co-color-gray-100, #f6f6f6);overflow:hidden}.co-toast__fill{display:block;height:100%;border-radius:inherit;background:var(--co-color-primary-azul, #2563eb);transition:width 0.3s ease}.co-toast{opacity:0;transform:translateY(16px) scale(0.97);filter:blur(var(--co-motion-blur-sm))}.co-toast--in{opacity:1;transform:none;filter:none;transition:opacity var(--co-motion-duration-slow) var(--co-motion-ease-out), transform var(--co-motion-duration-slow) var(--co-motion-ease-out), filter var(--co-motion-duration-slow) var(--co-motion-ease-out)}.co-toast--in.co-toast--success{transition:opacity var(--co-motion-duration-slow) var(--co-motion-ease-out), filter var(--co-motion-duration-slow) var(--co-motion-ease-out), transform var(--co-motion-duration-slow) var(--co-motion-ease-spring)}.co-toast__check path{stroke-dasharray:1;stroke-dashoffset:1}.co-toast--in .co-toast__check path{stroke-dashoffset:0;transition:stroke-dashoffset var(--co-motion-duration-slow) var(--co-motion-ease-out) var(--co-motion-duration-fast)}";export{r as co_toast}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as t}from"./p-
|
|
1
|
+
import{r as e,h as t}from"./p-DJkaRtbb.js";const c=class{constructor(t){e(this,t),this.status="default",this.STATUS_ICON={default:"info",error:"x-circle",success:"check-circle",warning:"warning",info:"info"}}render(){return t("div",{key:"12a67e485fed5d931c4325a0139d3ae7669b8de4",class:{"co-helper-text":!0,[`co-helper-text--${this.status}`]:!0},part:"helper-text"},t("co-icon",{key:"5bdb8635fa1654a9e10176c9818ba4197fc252e8",name:this.STATUS_ICON[this.status],size:14,weight:"fill",class:"co-helper-text__icon"}),t("span",{key:"c2f165cc0226ea1d799c62d0929d6acbf5cc1b98",class:"co-helper-text__message"},t("slot",{key:"d8315ea3ea6c002f83f1d936f9a3521831593b3d"},this.message)))}};c.style=":host{display:block}.co-helper-text{display:flex;align-items:center;gap:var(--co-spacing-xs);font-family:var(--co-font-family-primary);font-size:var(--co-font-size-12);line-height:1.4}.co-helper-text__icon{flex-shrink:0}.co-helper-text--default{color:var(--co-semantic-text-muted)}.co-helper-text--error{color:var(--co-semantic-status-error)}.co-helper-text--success{color:var(--co-semantic-status-success)}.co-helper-text--warning{color:var(--co-semantic-status-warning)}.co-helper-text--info{color:var(--co-semantic-status-info)}";export{c as co_helper_text}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,c as e,h as t,a as r}from"./p-DJkaRtbb.js";import{M as a,m as s}from"./p-DU-KOQ8L.js";const i=class{constructor(t){o(this,t),this.coOpen=e(this,"coOpen",3),this.coClose=e(this,"coClose",3),this.placement="bottom-end",this.offset=4,this.autoClose=!0,this.open=!1,this.surface="light",this.shift=0,this.handleKeydown=o=>{if(this.open)switch(o.key){case"Escape":o.preventDefault(),o.stopPropagation(),this.open=!1;break;case"ArrowDown":case"ArrowUp":o.preventDefault(),this.moveFocus("ArrowDown"===o.key?1:-1)}},this.handlePopoverOpen=()=>{this.open=!0,this.coOpen.emit()},this.handlePlacement=o=>{this.el.setAttribute(a,s(o.detail.placement))},this.handlePopoverClose=()=>{this.open=!1,this.coClose.emit()}}handleMenuSelect(){this.autoClose&&(this.open=!1)}onOpenChange(o){o?(document.addEventListener("keydown",this.handleKeydown,!0),requestAnimationFrame((()=>this.focusFirstItem()))):document.removeEventListener("keydown",this.handleKeydown,!0)}componentDidLoad(){this.open&&this.onOpenChange(!0)}disconnectedCallback(){document.removeEventListener("keydown",this.handleKeydown,!0)}async focusFirstItem(){var o,e;null===(e=null===(o=this.getMenuItems()[0])||void 0===o?void 0:o.focusItem)||void 0===e||e.call(o)}getMenuItems(){return n(this.activePanel())}activePanel(){let o=this.el;for(;;){const e=n(o).find((o=>o.hasAttribute("data-submenu-open")));if(!e)return o;o=e}}moveFocus(o){var e,t;const r=this.getMenuItems().filter((o=>!o.disabled));if(0===r.length)return;const a=document.activeElement;let s=r.findIndex((o=>o===a||o.contains(a)));-1===s&&(s=o>0?-1:r.length),null===(t=null===(e=r[(s+o+r.length)%r.length])||void 0===e?void 0:e.focusItem)||void 0===t||t.call(e)}render(){return t("co-popover",{key:"66b0e90463829343152d2a9bdb821e19e70fa4d4",placement:this.placement,offset:this.offset,open:this.open,anchor:this.anchor,shift:this.shift,bare:!0,onCoOpen:this.handlePopoverOpen,onCoClose:this.handlePopoverClose,onCoPlacement:this.handlePlacement},t("slot",{key:"b78bcba7bc9542a82c78c1b8026bd4aa56629667",name:"trigger",slot:"trigger"}),t("div",{key:"0515763cb0b89320d4831befe1b6d984029ce309",class:"co-menu",role:"menu",style:this.width?{width:this.width,minWidth:this.width}:void 0},t("slot",{key:"baf72944333c4e912fe0a0aa58d8affb8e923a3e"})))}get el(){return r(this)}static get watchers(){return{open:[{onOpenChange:0}]}}};function n(o){const e="co-menu-item"===o.tagName.toLowerCase();return Array.from(o.querySelectorAll("co-menu-item")).filter((t=>{var r,a;const s=null!==(a=null===(r=t.parentElement)||void 0===r?void 0:r.closest("co-menu-item"))&&void 0!==a?a:null;return e?s===o:null===s}))}i.style=":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)}.co-menu{gap:var(--co-menu-gap, 2px);min-width:var(--co-menu-min-width, 200px);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-menu-border-color, var(--co-color-opacity-negro-8, rgba(31, 28, 27, 0.08)))}.co-menu{border-radius:var(--co-menu-radius, var(--co-border-radius-sm, 12px));max-height:var(--co-menu-max-height, none);overflow:var(--co-menu-overflow, visible)}:host([surface='dark']) .co-menu{background:var(--co-semantic-surface-primary);color:var(--co-semantic-text-inverse);box-shadow:var(--co-menu-shadow, none);border-radius:var(--co-menu-radius, var(--co-border-radius-xs, 8px));min-width:auto}:host([surface='dark']) ::slotted(co-menu-item){--co-menu-item-color:var(--co-semantic-text-inverse);--co-menu-item-hover-bg:var(--co-color-opacity-blanco-16, rgba(255, 255, 255, 0.16));--co-menu-item-selected-bg:transparent}:host([surface='dark']) ::slotted(co-menu-divider){--co-menu-divider-color:var(--co-color-opacity-blanco-16, rgba(255, 255, 255, 0.16))}";export{i as co_menu}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as o,h as r,a as s}from"./p-DJkaRtbb.js";import{a}from"./p-DXLeDZvr.js";import{l as e}from"./p-jYd9gu_c.js";import"./p-BVGGRfNG.js";import"./p-COJdaKBU.js";const i={es:{gridLabel:"Colores"},en:{gridLabel:"Colors"},pt:{gridLabel:"Cores"}},c=class{constructor(r){t(this,r),this.coSelect=o(this,"coSelect",7),this.colors=[],this.columns=8,this.swatchSize=24,this.gap=8,this.radius=6,this.swatchEls=[],this.handleKeyDown=(t,o)=>{var r;const s=this.colorList.length-1;if(s<0)return;const a=this.columnCount;let e;switch(o.key){case"ArrowRight":e=Math.min(s,t+1);break;case"ArrowLeft":e=Math.max(0,t-1);break;case"ArrowDown":e=t+a>s?t:t+a;break;case"ArrowUp":e=t-a<0?t:t-a;break;case"Home":e=0;break;case"End":e=s;break;default:return}o.preventDefault(),null===(r=this.swatchEls[e])||void 0===r||r.focus()}}static normalize(t){return(null!=t?t:"").trim().toLowerCase()}get colorList(){var t;return null!==(t=this.colors)&&void 0!==t?t:[]}get columnCount(){var t;return Math.max(1,Math.floor(null!==(t=this.columns)&&void 0!==t?t:8)||1)}selectedIndex(){const t=c.normalize(this.value);return t?this.colorList.findIndex((o=>c.normalize(o)===t)):-1}render(){var t,o,s;const c=i[e(this.locale)],h=null!==(t=this.swatchSize)&&void 0!==t?t:24,n=null!==(o=this.gap)&&void 0!==o?o:8,d=null!==(s=this.radius)&&void 0!==s?s:6,l=this.selectedIndex(),f=l>=0?l:0;return this.swatchEls=[],r("div",{key:"37b221ff9dbebc184310f1cd51d539b833876adf",class:"co-swatch-grid",role:"listbox","aria-label":this.label||c.gridLabel,style:{gridTemplateColumns:`repeat(${this.columnCount}, ${h}px)`,gap:`${n}px`}},this.colorList.map(((t,o)=>r("button",{type:"button",key:`${o}-${t}`,ref:t=>{t&&(this.swatchEls[o]=t)},class:{"co-swatch-grid__swatch":!0,"co-swatch-grid__swatch--selected":o===l,"co-swatch-grid__swatch--light":a(t)},role:"option","aria-selected":o===l?"true":"false","aria-label":t,tabIndex:o===f?0:-1,style:{width:`${h}px`,height:`${h}px`,borderRadius:`${d}px`,"--co-swatch-grid-color":t},onClick:()=>this.coSelect.emit(t),onKeyDown:t=>this.handleKeyDown(o,t)}))))}get el(){return s(this)}};c.style=":host{display:block}:host([hidden]){display:none}.co-swatch-grid{display:grid;justify-content:start}.co-swatch-grid__swatch{box-sizing:border-box;padding:0;margin:0;border:1px solid transparent;background:linear-gradient(var(--co-swatch-grid-color), var(--co-swatch-grid-color)), conic-gradient(var(--co-color-gray-200) 25%, #ffffff 0 50%, var(--co-color-gray-200) 0 75%, #ffffff 0) 0 0 / 8px 8px;cursor:pointer;outline:none;transition:box-shadow var(--co-motion-duration-fast) var(--co-motion-ease-out)}.co-swatch-grid__swatch--light{border-color:var(--co-color-opacity-negro-8)}.co-swatch-grid__swatch:hover{box-shadow:0 0 0 1px var(--co-color-opacity-negro-16)}.co-swatch-grid__swatch--selected,.co-swatch-grid__swatch--selected:hover{box-shadow:0 0 0 1px var(--co-semantic-surface-page, #ffffff), 0 0 0 3px var(--co-semantic-accent)}.co-swatch-grid__swatch:focus-visible{box-shadow:0 0 0 1px var(--co-semantic-surface-page, #ffffff), 0 0 0 3px var(--co-semantic-border-focus)}";export{c as co_swatch_grid}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,a as s}from"./p-DH5lfRNj.js";import{g as a}from"./p-jYd9gu_c.js";import{a as n,d as o,p as r,g as c,b as l,e as h}from"./p-BU7SQCje.js";import{b as d,t as u,g as f}from"./p-1EK-COrb.js";const b=/^\d{4}-\d{2}-\d{2}$/,v=864e5;function m(t){if(!b.exec(t))return null;const[e,i,s]=t.split("-").map(Number);return i<1||i>12||s<1||s>31?null:Date.UTC(e,i-1,s)}function p(t){return u(t).slice(0,10)}function g(t,e={}){if(!t||!t.id||!t.start)return null;const i=e.defaultDurationMinutes??60,s=!0===t.allDay;let a,n,o,r;if(s){const e=m(t.start.slice(0,10));if(null===e)return null;if(a=e,o=p(e),t.end){const i=m(t.end.slice(0,10));n=null!==i&&i>e?i:e+v}else n=e+v;r=p(n)}else{let e;try{e=d(t.start)}catch{return null}if(a=e,o=t.start,t.end){let s;try{s=d(t.end)}catch{return null}n=s>e?s:e+6e4*i}else n=e+6e4*i;r=u(n)}const c=t.status?e.statusColors?.[t.status]:void 0,l=t.editable??!0;return{id:t.id,title:t.title??"",allDay:s,start:o,end:r,startMs:a,endMs:n,status:t.status,responseState:t.responseState,backgroundColor:t.backgroundColor??t.color??c?.backgroundColor,borderColor:t.borderColor??c?.borderColor,className:t.className,editable:l,startEditable:t.startEditable??l,durationEditable:t.durationEditable??l,display:t.display??"block",extendedProps:t.extendedProps??{}}}const y=class{constructor(i){t(this,i),this.coEventClick=e(this,"coEventClick",3),this.coDateSelect=e(this,"coDateSelect",3),this.coEventDrop=e(this,"coEventDrop",3),this.coEventDblClick=e(this,"coEventDblClick",3),this.coDatesSet=e(this,"coDatesSet",3),this.coViewChange=e(this,"coViewChange",3),this.coMoreClick=e(this,"coMoreClick",3),this.view="month",this.events=[],this.locale="es-CO",this.editable=!0,this.selectable=!0,this.dayMaxEvents=3,this.firstDayOfWeek=1,this.availableViews=["month"],this.defaultDurationMinutes=60,this.allDaySlot=!0,this.minTime="00:00",this.maxTime="24:00",this.slotMinutes=15,this.snapMinutes=15,this.scrollTime="07:00",this.nowIndicator=!0,this.loading=!1,this.goToday=()=>this.setAnchor(n()),this.goPrev=()=>this.step(-1),this.goNext=()=>this.step(1),this.handleDaySelect=t=>{var e;const i=t.detail.date;this.coDateSelect.emit({start:i,end:o(i,1),allDay:!0,rect:null!==(e=t.detail.rect)&&void 0!==e?e:null})},this.handleRangeSelect=t=>{var e;this.coDateSelect.emit({start:t.detail.start,end:t.detail.end,allDay:!1,rect:null!==(e=t.detail.rect)&&void 0!==e?e:null})},this.handleEventClick=t=>{var e;const i=this.normalized.find((e=>e.id===t.detail.id));i&&this.coEventClick.emit({event:i,rect:null!==(e=t.detail.rect)&&void 0!==e?e:null})},this.handleEventDblClick=t=>{var e;const i=this.normalized.find((e=>e.id===t.detail.id));i&&this.coEventDblClick.emit({event:i,rect:null!==(e=t.detail.rect)&&void 0!==e?e:null})},this.handleEventDrop=t=>{const e=this.normalized.find((e=>e.id===t.detail.id));e&&this.coEventDrop.emit({event:e,start:t.detail.start,end:t.detail.end,oldStart:t.detail.oldStart,oldEnd:t.detail.oldEnd,allDay:t.detail.allDay,revert:()=>{}})},this.handleMoreClick=t=>{const e=t.detail.date,i=this.tz,s=this.normalized.filter((t=>{var s;return(t.allDay?t.start.slice(0,10):(s=t.startMs,new Intl.DateTimeFormat("en-CA",{timeZone:i,year:"numeric",month:"2-digit",day:"2-digit"}).format(new Date(s))))===e}));this.coMoreClick.emit({date:e,events:s})}}async clearRangeSelection(){var t,e;const i=null===(t=this.el.shadowRoot)||void 0===t?void 0:t.querySelector("co-calendar-timegrid, co-calendar-month");await(null===(e=null==i?void 0:i.clearSelection)||void 0===e?void 0:e.call(i))}componentWillLoad(){this.anchor=this.date&&r(this.date)?this.date:n()}componentDidLoad(){this.emitDatesSet()}onDateChange(t){t&&r(t)&&t!==this.anchor&&(this.anchor=t,this.emitDatesSet())}get tz(){return this.timeZone||f()}get normalized(){const t=this._normCache;if(t&&t.events===this.events&&t.dd===this.defaultDurationMinutes&&t.sc===this.statusColors)return t.result;const e=function(t,e={}){if(!Array.isArray(t))return[];const i=[];for(const s of t){const t=g(s,e);t&&i.push(t)}return i}(function(t){if(Array.isArray(t))return t;if("string"==typeof t&&t.trim())try{const e=JSON.parse(t);return Array.isArray(e)?e:[]}catch(t){return[]}return[]}(this.events),{defaultDurationMinutes:this.defaultDurationMinutes,statusColors:_(this.statusColors)});return this._normCache={events:this.events,dd:this.defaultDurationMinutes,sc:this.statusColors,result:e},e}get viewsList(){return Array.isArray(this.availableViews)?this.availableViews:String(this.availableViews).split(",").map((t=>t.trim())).filter(Boolean)}dowOf(t){const[e,i,s]=t.split("-").map(Number);return new Date(Date.UTC(e,i-1,s)).getUTCDay()}weekStart(t){const e=(this.dowOf(t)-this.firstDayOfWeek+7)%7;return o(t,-e)}get visibleDates(){if("week"===this.view){const t=this.weekStart(this.anchor);return Array.from({length:7},((e,i)=>o(t,i)))}return"day"===this.view?[this.anchor]:[]}visibleRange(){if("week"===this.view){const t=this.weekStart(this.anchor);return{start:t,end:o(t,7)}}if("day"===this.view)return{start:this.anchor,end:o(this.anchor,1)};const t=r(this.anchor),e=c(t.year,t.month,this.firstDayOfWeek);return{start:e[0][0].value,end:o(e[e.length-1][6].value,1)}}emitDatesSet(){const{start:t,end:e}=this.visibleRange();this.coDatesSet.emit({view:this.view,start:t,end:e,activeDate:this.anchor})}setAnchor(t){this.anchor=t,this.date=t,this.emitDatesSet()}step(t){this.setAnchor("month"===this.view?l(this.anchor,t):o(this.anchor,"day"===this.view?t:7*t))}switchView(t){t!==this.view&&(this.view=t,this.coViewChange.emit({view:t}),this.emitDatesSet())}title(){const t=r(this.anchor);if("month"===this.view)return h(t.year,t.month,this.locale,"long");if("day"===this.view)return new Intl.DateTimeFormat(this.locale,{weekday:"short",day:"numeric",month:"short",year:"numeric"}).format(x(this.anchor));const e=this.weekStart(this.anchor),i=o(e,6),s=new Intl.DateTimeFormat(this.locale,{day:"numeric",month:"short"}),a=new Intl.DateTimeFormat(this.locale,{year:"numeric"}).format(x(i));return`${s.format(x(e))} – ${s.format(x(i))} ${a}`}render(){var t;const e=a(this.locale),s=this.viewsList,n=r(this.anchor);return i("div",{key:"eb07a859a28ba0d09a3880a77a5b122c1ae063fb",class:"cal"},i("div",{key:"693683cddfad9a1aed4be0bf3651cfff8b2ba1c7",class:"cal__toolbar",part:"toolbar"},i("button",{key:"48f8fc44179b2950ea0498205f8f8a5d91d33e04",type:"button",class:"cal__btn",onClick:this.goToday},null!==(t=e.today)&&void 0!==t?t:"Today"),i("div",{key:"387a1cee67da85bf72e791ca2adc67f7482eb629",class:"cal__title-group"},i("button",{key:"24d316422fb98f7d7c66ed6154a90f54a56cab12",type:"button",class:"cal__icon-btn","aria-label":e.prevMonth,onClick:this.goPrev},i("co-icon",{key:"d0c575fce693943e91de8c578bb3371bfdb6425a",name:"caret-left",size:16})),i("h2",{key:"1bc26dd2c49d67854a1fc922cffc519485437f6a",class:"cal__title","aria-live":"polite"},this.title()),i("button",{key:"0e152157ed337011d00699b450b6a5cd10016b97",type:"button",class:"cal__icon-btn","aria-label":e.nextMonth,onClick:this.goNext},i("co-icon",{key:"c821a72abc278e325cadfeae54b4d2b05984d3ba",name:"caret-right",size:16}))),s.length>1?i("div",{class:"cal__views",role:"tablist"},s.map((t=>{var s;return i("button",{type:"button",role:"tab","aria-selected":this.view===t?"true":"false",class:{"cal__view-btn":!0,"cal__view-btn--active":this.view===t},onClick:()=>this.switchView(t)},null!==(s=e[t])&&void 0!==s?s:t)}))):i("span",{class:"cal__views-spacer"})),i("div",{key:"2472ed0d314a489f41f2f46dc7988ce8860a64c2",class:"cal__body",part:"body"},"month"===this.view?i("co-calendar-month",{loading:this.loading,events:this.normalized,year:n.year,month:n.month,locale:this.locale,firstDayOfWeek:this.firstDayOfWeek,timeZone:this.tz,minDate:this.minDate,maxDate:this.maxDate,editable:this.editable,selectable:this.selectable,maxLanes:this.dayMaxEvents,onCoDaySelect:this.handleDaySelect,onCoEventClick:this.handleEventClick,onCoEventDblClick:this.handleEventDblClick,onCoEventDrop:this.handleEventDrop,onCoMoreClick:this.handleMoreClick}):"week"===this.view||"day"===this.view?i("co-calendar-timegrid",{loading:this.loading,events:this.normalized,dates:this.visibleDates,locale:this.locale,timeZone:this.tz,editable:this.editable,selectable:this.selectable,minDate:this.minDate,maxDate:this.maxDate,onCoRangeSelect:this.handleRangeSelect,onCoEventClick:this.handleEventClick,onCoEventDblClick:this.handleEventDblClick,onCoEventDrop:this.handleEventDrop,defaultDurationMinutes:this.defaultDurationMinutes,allDaySlot:this.allDaySlot,minTime:this.minTime,maxTime:this.maxTime,slotMinutes:this.slotMinutes,snapMinutes:this.snapMinutes,scrollTime:this.scrollTime,nowIndicator:this.nowIndicator}):i("div",{class:"cal__placeholder"},i("co-icon",{name:"calendar-dots",size:32}),i("p",null,`${this.view} view — coming soon`))))}get el(){return s(this)}static get watchers(){return{date:[{onDateChange:0}]}}};function _(t){if(t){if("string"==typeof t)try{return JSON.parse(t)}catch(t){return}return t}}function x(t){const[e,i,s]=t.split("-").map(Number);return new Date(Date.UTC(e,i-1,s,12))}y.style=":host{display:flex;flex-direction:column;gap:var(--co-spacing-md);font-family:var(--co-font-family-primary);color:var(--co-semantic-text-default);block-size:100%;min-block-size:0}.cal{display:flex;flex-direction:column;gap:var(--co-spacing-md);block-size:100%;min-block-size:0}.cal__toolbar{display:flex;align-items:center;gap:var(--co-spacing-md)}.cal__title-group{flex:1 1 auto;min-width:0;display:flex;align-items:center;justify-content:center;gap:var(--co-spacing-xs)}.cal__title{margin:0;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:var(--co-font-size-20, 20px);font-weight:400;letter-spacing:-0.01em;text-transform:capitalize;color:var(--co-semantic-text-default)}.cal__views-spacer{flex:0 0 auto;inline-size:1px}.cal__btn{height:32px;padding:0 var(--co-spacing-md);background:none;border:1px solid var(--co-semantic-border-default);border-radius:var(--co-border-radius-full);font-family:inherit;font-size:var(--co-font-size-14, 14px);color:var(--co-semantic-text-default);cursor:pointer;transition:background var(--co-motion-duration-fast) var(--co-motion-ease-out)}.cal__btn:hover{background:var(--co-semantic-surface-hover)}.cal__btn:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:1px}.cal__icon-btn{height:32px;width:32px;display:inline-flex;align-items:center;justify-content:center;background:none;border:0;border-radius:var(--co-border-radius-xs);color:var(--co-semantic-text-default);cursor:pointer;transition:background var(--co-motion-duration-fast) var(--co-motion-ease-out)}.cal__icon-btn:hover{background:var(--co-semantic-surface-hover)}.cal__icon-btn:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:1px}.cal__views{display:inline-flex;gap:2px;padding:2px;background:var(--co-semantic-surface-hover);border-radius:var(--co-border-radius-xs)}.cal__view-btn{height:28px;padding:0 var(--co-spacing-md);background:none;border:0;border-radius:var(--co-border-radius-xxs);font-family:inherit;font-size:var(--co-font-size-14, 14px);color:var(--co-semantic-text-secondary);cursor:pointer;text-transform:capitalize}.cal__view-btn--active{background:var(--co-semantic-surface-page);color:var(--co-semantic-text-default);font-weight:600;box-shadow:0 1px 2px rgba(0, 0, 0, 0.08)}.cal__view-btn:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:1px}.cal__body{flex:1 1 auto;min-block-size:0;display:flex;flex-direction:column}.cal__body co-calendar-month{flex:1 1 auto;min-block-size:0}.cal__body co-calendar-timegrid{flex:1 1 auto;min-block-size:0}.cal__placeholder{flex:1 1 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--co-spacing-sm);color:var(--co-semantic-text-muted);text-transform:capitalize}";export{y as co_event_calendar}
|
|
1
|
+
import{r as t,c as e,h as i,a as s}from"./p-DJkaRtbb.js";import{g as a}from"./p-jYd9gu_c.js";import{a as n,d as o,p as r,g as c,b as l,e as h}from"./p-BU7SQCje.js";import{b as d,t as u,g as f}from"./p-1EK-COrb.js";const b=/^\d{4}-\d{2}-\d{2}$/,v=864e5;function m(t){if(!b.exec(t))return null;const[e,i,s]=t.split("-").map(Number);return i<1||i>12||s<1||s>31?null:Date.UTC(e,i-1,s)}function p(t){return u(t).slice(0,10)}function g(t,e={}){if(!t||!t.id||!t.start)return null;const i=e.defaultDurationMinutes??60,s=!0===t.allDay;let a,n,o,r;if(s){const e=m(t.start.slice(0,10));if(null===e)return null;if(a=e,o=p(e),t.end){const i=m(t.end.slice(0,10));n=null!==i&&i>e?i:e+v}else n=e+v;r=p(n)}else{let e;try{e=d(t.start)}catch{return null}if(a=e,o=t.start,t.end){let s;try{s=d(t.end)}catch{return null}n=s>e?s:e+6e4*i}else n=e+6e4*i;r=u(n)}const c=t.status?e.statusColors?.[t.status]:void 0,l=t.editable??!0;return{id:t.id,title:t.title??"",allDay:s,start:o,end:r,startMs:a,endMs:n,status:t.status,responseState:t.responseState,backgroundColor:t.backgroundColor??t.color??c?.backgroundColor,borderColor:t.borderColor??c?.borderColor,className:t.className,editable:l,startEditable:t.startEditable??l,durationEditable:t.durationEditable??l,display:t.display??"block",extendedProps:t.extendedProps??{}}}const y=class{constructor(i){t(this,i),this.coEventClick=e(this,"coEventClick",3),this.coDateSelect=e(this,"coDateSelect",3),this.coEventDrop=e(this,"coEventDrop",3),this.coEventDblClick=e(this,"coEventDblClick",3),this.coDatesSet=e(this,"coDatesSet",3),this.coViewChange=e(this,"coViewChange",3),this.coMoreClick=e(this,"coMoreClick",3),this.view="month",this.events=[],this.locale="es-CO",this.editable=!0,this.selectable=!0,this.dayMaxEvents=3,this.firstDayOfWeek=1,this.availableViews=["month"],this.defaultDurationMinutes=60,this.allDaySlot=!0,this.minTime="00:00",this.maxTime="24:00",this.slotMinutes=15,this.snapMinutes=15,this.scrollTime="07:00",this.nowIndicator=!0,this.loading=!1,this.goToday=()=>this.setAnchor(n()),this.goPrev=()=>this.step(-1),this.goNext=()=>this.step(1),this.handleDaySelect=t=>{var e;const i=t.detail.date;this.coDateSelect.emit({start:i,end:o(i,1),allDay:!0,rect:null!==(e=t.detail.rect)&&void 0!==e?e:null})},this.handleRangeSelect=t=>{var e;this.coDateSelect.emit({start:t.detail.start,end:t.detail.end,allDay:!1,rect:null!==(e=t.detail.rect)&&void 0!==e?e:null})},this.handleEventClick=t=>{var e;const i=this.normalized.find((e=>e.id===t.detail.id));i&&this.coEventClick.emit({event:i,rect:null!==(e=t.detail.rect)&&void 0!==e?e:null})},this.handleEventDblClick=t=>{var e;const i=this.normalized.find((e=>e.id===t.detail.id));i&&this.coEventDblClick.emit({event:i,rect:null!==(e=t.detail.rect)&&void 0!==e?e:null})},this.handleEventDrop=t=>{const e=this.normalized.find((e=>e.id===t.detail.id));e&&this.coEventDrop.emit({event:e,start:t.detail.start,end:t.detail.end,oldStart:t.detail.oldStart,oldEnd:t.detail.oldEnd,allDay:t.detail.allDay,revert:()=>{}})},this.handleMoreClick=t=>{const e=t.detail.date,i=this.tz,s=this.normalized.filter((t=>{var s;return(t.allDay?t.start.slice(0,10):(s=t.startMs,new Intl.DateTimeFormat("en-CA",{timeZone:i,year:"numeric",month:"2-digit",day:"2-digit"}).format(new Date(s))))===e}));this.coMoreClick.emit({date:e,events:s})}}async clearRangeSelection(){var t,e;const i=null===(t=this.el.shadowRoot)||void 0===t?void 0:t.querySelector("co-calendar-timegrid, co-calendar-month");await(null===(e=null==i?void 0:i.clearSelection)||void 0===e?void 0:e.call(i))}componentWillLoad(){this.anchor=this.date&&r(this.date)?this.date:n()}componentDidLoad(){this.emitDatesSet()}onDateChange(t){t&&r(t)&&t!==this.anchor&&(this.anchor=t,this.emitDatesSet())}get tz(){return this.timeZone||f()}get normalized(){const t=this._normCache;if(t&&t.events===this.events&&t.dd===this.defaultDurationMinutes&&t.sc===this.statusColors)return t.result;const e=function(t,e={}){if(!Array.isArray(t))return[];const i=[];for(const s of t){const t=g(s,e);t&&i.push(t)}return i}(function(t){if(Array.isArray(t))return t;if("string"==typeof t&&t.trim())try{const e=JSON.parse(t);return Array.isArray(e)?e:[]}catch(t){return[]}return[]}(this.events),{defaultDurationMinutes:this.defaultDurationMinutes,statusColors:_(this.statusColors)});return this._normCache={events:this.events,dd:this.defaultDurationMinutes,sc:this.statusColors,result:e},e}get viewsList(){return Array.isArray(this.availableViews)?this.availableViews:String(this.availableViews).split(",").map((t=>t.trim())).filter(Boolean)}dowOf(t){const[e,i,s]=t.split("-").map(Number);return new Date(Date.UTC(e,i-1,s)).getUTCDay()}weekStart(t){const e=(this.dowOf(t)-this.firstDayOfWeek+7)%7;return o(t,-e)}get visibleDates(){if("week"===this.view){const t=this.weekStart(this.anchor);return Array.from({length:7},((e,i)=>o(t,i)))}return"day"===this.view?[this.anchor]:[]}visibleRange(){if("week"===this.view){const t=this.weekStart(this.anchor);return{start:t,end:o(t,7)}}if("day"===this.view)return{start:this.anchor,end:o(this.anchor,1)};const t=r(this.anchor),e=c(t.year,t.month,this.firstDayOfWeek);return{start:e[0][0].value,end:o(e[e.length-1][6].value,1)}}emitDatesSet(){const{start:t,end:e}=this.visibleRange();this.coDatesSet.emit({view:this.view,start:t,end:e,activeDate:this.anchor})}setAnchor(t){this.anchor=t,this.date=t,this.emitDatesSet()}step(t){this.setAnchor("month"===this.view?l(this.anchor,t):o(this.anchor,"day"===this.view?t:7*t))}switchView(t){t!==this.view&&(this.view=t,this.coViewChange.emit({view:t}),this.emitDatesSet())}title(){const t=r(this.anchor);if("month"===this.view)return h(t.year,t.month,this.locale,"long");if("day"===this.view)return new Intl.DateTimeFormat(this.locale,{weekday:"short",day:"numeric",month:"short",year:"numeric"}).format(x(this.anchor));const e=this.weekStart(this.anchor),i=o(e,6),s=new Intl.DateTimeFormat(this.locale,{day:"numeric",month:"short"}),a=new Intl.DateTimeFormat(this.locale,{year:"numeric"}).format(x(i));return`${s.format(x(e))} – ${s.format(x(i))} ${a}`}render(){var t;const e=a(this.locale),s=this.viewsList,n=r(this.anchor);return i("div",{key:"523b25e47b0d586ead40867d0c496b6d8fd1a21b",class:"cal"},i("div",{key:"4943440f6f492be23a23f8820b1d638a0d292902",class:"cal__toolbar",part:"toolbar"},i("button",{key:"a6d890434149f15ef770db851e70e4d93646571b",type:"button",class:"cal__btn",onClick:this.goToday},null!==(t=e.today)&&void 0!==t?t:"Today"),i("div",{key:"a617c5087b9055bc4f8530eafe619cca49c0930e",class:"cal__title-group"},i("button",{key:"1b2f1ba3972d815be76a4527711e887066a994a1",type:"button",class:"cal__icon-btn","aria-label":e.prevMonth,onClick:this.goPrev},i("co-icon",{key:"918828dec396d69678618d40c8aeb3793c6aa620",name:"caret-left",size:16})),i("h2",{key:"c099fc2e18fa07f79fe0a0e72e372e71b658c553",class:"cal__title","aria-live":"polite"},this.title()),i("button",{key:"52c2ad1d1a06955f892ac6d179d905270df3a967",type:"button",class:"cal__icon-btn","aria-label":e.nextMonth,onClick:this.goNext},i("co-icon",{key:"9b4becd4d18465a86d42491291166ccad94973d3",name:"caret-right",size:16}))),s.length>1?i("div",{class:"cal__views",role:"tablist"},s.map((t=>{var s;return i("button",{type:"button",role:"tab","aria-selected":this.view===t?"true":"false",class:{"cal__view-btn":!0,"cal__view-btn--active":this.view===t},onClick:()=>this.switchView(t)},null!==(s=e[t])&&void 0!==s?s:t)}))):i("span",{class:"cal__views-spacer"})),i("div",{key:"266dc8d6f4b490559eaa648970328e0861d44ec8",class:"cal__body",part:"body"},"month"===this.view?i("co-calendar-month",{loading:this.loading,events:this.normalized,year:n.year,month:n.month,locale:this.locale,firstDayOfWeek:this.firstDayOfWeek,timeZone:this.tz,minDate:this.minDate,maxDate:this.maxDate,editable:this.editable,selectable:this.selectable,maxLanes:this.dayMaxEvents,onCoDaySelect:this.handleDaySelect,onCoEventClick:this.handleEventClick,onCoEventDblClick:this.handleEventDblClick,onCoEventDrop:this.handleEventDrop,onCoMoreClick:this.handleMoreClick}):"week"===this.view||"day"===this.view?i("co-calendar-timegrid",{loading:this.loading,events:this.normalized,dates:this.visibleDates,locale:this.locale,timeZone:this.tz,editable:this.editable,selectable:this.selectable,minDate:this.minDate,maxDate:this.maxDate,onCoRangeSelect:this.handleRangeSelect,onCoEventClick:this.handleEventClick,onCoEventDblClick:this.handleEventDblClick,onCoEventDrop:this.handleEventDrop,defaultDurationMinutes:this.defaultDurationMinutes,allDaySlot:this.allDaySlot,minTime:this.minTime,maxTime:this.maxTime,slotMinutes:this.slotMinutes,snapMinutes:this.snapMinutes,scrollTime:this.scrollTime,nowIndicator:this.nowIndicator}):i("div",{class:"cal__placeholder"},i("co-icon",{name:"calendar-dots",size:32}),i("p",null,`${this.view} view — coming soon`))))}get el(){return s(this)}static get watchers(){return{date:[{onDateChange:0}]}}};function _(t){if(t){if("string"==typeof t)try{return JSON.parse(t)}catch(t){return}return t}}function x(t){const[e,i,s]=t.split("-").map(Number);return new Date(Date.UTC(e,i-1,s,12))}y.style=":host{display:flex;flex-direction:column;gap:var(--co-spacing-md);font-family:var(--co-font-family-primary);color:var(--co-semantic-text-default);block-size:100%;min-block-size:0}.cal{display:flex;flex-direction:column;gap:var(--co-spacing-md);block-size:100%;min-block-size:0}.cal__toolbar{display:flex;align-items:center;gap:var(--co-spacing-md)}.cal__title-group{flex:1 1 auto;min-width:0;display:flex;align-items:center;justify-content:center;gap:var(--co-spacing-xs)}.cal__title{margin:0;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:var(--co-font-size-20, 20px);font-weight:400;letter-spacing:-0.01em;text-transform:capitalize;color:var(--co-semantic-text-default)}.cal__views-spacer{flex:0 0 auto;inline-size:1px}.cal__btn{height:32px;padding:0 var(--co-spacing-md);background:none;border:1px solid var(--co-semantic-border-default);border-radius:var(--co-border-radius-full);font-family:inherit;font-size:var(--co-font-size-14, 14px);color:var(--co-semantic-text-default);cursor:pointer;transition:background var(--co-motion-duration-fast) var(--co-motion-ease-out)}.cal__btn:hover{background:var(--co-semantic-surface-hover)}.cal__btn:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:1px}.cal__icon-btn{height:32px;width:32px;display:inline-flex;align-items:center;justify-content:center;background:none;border:0;border-radius:var(--co-border-radius-xs);color:var(--co-semantic-text-default);cursor:pointer;transition:background var(--co-motion-duration-fast) var(--co-motion-ease-out)}.cal__icon-btn:hover{background:var(--co-semantic-surface-hover)}.cal__icon-btn:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:1px}.cal__views{display:inline-flex;gap:2px;padding:2px;background:var(--co-semantic-surface-hover);border-radius:var(--co-border-radius-xs)}.cal__view-btn{height:28px;padding:0 var(--co-spacing-md);background:none;border:0;border-radius:var(--co-border-radius-xxs);font-family:inherit;font-size:var(--co-font-size-14, 14px);color:var(--co-semantic-text-secondary);cursor:pointer;text-transform:capitalize}.cal__view-btn--active{background:var(--co-semantic-surface-page);color:var(--co-semantic-text-default);font-weight:600;box-shadow:0 1px 2px rgba(0, 0, 0, 0.08)}.cal__view-btn:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:1px}.cal__body{flex:1 1 auto;min-block-size:0;display:flex;flex-direction:column}.cal__body co-calendar-month{flex:1 1 auto;min-block-size:0}.cal__body co-calendar-timegrid{flex:1 1 auto;min-block-size:0}.cal__placeholder{flex:1 1 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--co-spacing-sm);color:var(--co-semantic-text-muted);text-transform:capitalize}";export{y as co_event_calendar}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,c as a,h as t}from"./p-DJkaRtbb.js";import{a as i}from"./p-Ch1jfwZ2.js";import{s as r}from"./p-CBX_oabB.js";function e(o,a,t){const i=Math.min(a,0),r=Math.max(t,0);return Math.min(Math.max(o,i),r)}const s=["button","a[href]","input","select","textarea",'[role="button"]','[role="checkbox"]','[role="radio"]','[role="switch"]','[role="combobox"]','[role="option"]','[role="menuitem"]','[role="slider"]','[role="tab"]','[role="separator"]',"[data-no-drag]"].join(", "),n=class{constructor(t){o(this,t),this.coClose=a(this,"coClose",7),this.coAfterClose=a(this,"coAfterClose",3),this.coAfterOpen=a(this,"coAfterOpen",3),this.open=!1,this.heading="",this.closable=!0,this.closeOnOverlay=!0,this.closeOnEscape=!1,this.size="md",this.noDividers=!1,this.headerDivider=!0,this.appearance="default",this.backdrop="default",this.inline=!1,this.movable=!1,this.hasFooter=!1,this.handleFooterSlotChange=o=>{this.hasFooter=r(o)},this.handleOverlayClick=()=>{this.closeOnOverlay&&this.coClose.emit()},this.handleCloseClick=()=>{this.coClose.emit()},this.stopPropagation=o=>{o.stopPropagation()},this.handleTransitionEnd=o=>{if(o.target!==this.modalEl)return;const a=i(o.propertyName,this.open,"transform");"after-open"===a?this.coAfterOpen.emit():"after-close"===a&&this.coAfterClose.emit()},this.dragging=!1,this.committedOffset={x:0,y:0},this.liveOffset={x:0,y:0},this.handleDragDown=o=>{var a;if(!this.movable||this.dragging||0!==o.button)return;if(function(o,a){const t="function"==typeof o.composedPath?o.composedPath():[o.target];for(const o of t){if(a&&o===a)return!1;if(o&&"function"==typeof o.matches&&o.matches(s))return!0}return!1}(o,this.headerEl))return;const t=null===(a=this.modalEl)||void 0===a?void 0:a.getBoundingClientRect();t&&(o.preventDefault(),this.dragging=!0,this.dragPointerId=o.pointerId,this.dragStart={x:o.clientX,y:o.clientY},this.dragRect={left:t.left-this.committedOffset.x,top:t.top-this.committedOffset.y,width:t.width,height:t.height},this.dragViewport={width:window.innerWidth,height:window.innerHeight},this.capturePointer(o),window.addEventListener("blur",this.handleWindowBlur))},this.handleDragMove=o=>{if(!this.isActiveDragPointer(o))return;if(!this.dragStart||!this.dragRect||!this.dragViewport)return;const a={x:(t=this.committedOffset).x+(r={x:o.clientX,y:o.clientY}).x-(i=this.dragStart).x,y:t.y+r.y-i.y};var t,i,r;this.writeOffset(function(o,a,t,i=48){const r=Math.min(i,a.width),s=Math.min(i,a.height);return{x:e(o.x,r-a.left-a.width,t.width-r-a.left),y:e(o.y,-a.top,t.height-s-a.top)}}(a,this.dragRect,this.dragViewport))},this.handleDragUp=o=>{this.isActiveDragPointer(o)&&(this.committedOffset=this.liveOffset,this.releasePointer(o),this.endDrag())},this.handleDragCancel=o=>{this.isActiveDragPointer(o)&&(this.releasePointer(o),this.writeOffset(this.committedOffset),this.endDrag())},this.handleWindowBlur=()=>{this.dragging&&(this.writeOffset(this.committedOffset),this.endDrag())}}get usesOverlay(){return"none"!==this.backdrop&&!this.inline}handleKeydown(o){this.open&&this.closeOnEscape&&"Escape"===o.key&&this.coClose.emit()}resetPositionOnOpen(o){this.endDrag(),o&&(this.committedOffset={x:0,y:0},this.writeOffset({x:0,y:0}))}disconnectedCallback(){window.removeEventListener("blur",this.handleWindowBlur)}endDrag(){window.removeEventListener("blur",this.handleWindowBlur),this.dragging=!1,this.dragPointerId=void 0,this.dragStart=void 0,this.dragRect=void 0,this.dragViewport=void 0}isActiveDragPointer(o){return this.dragging&&o.pointerId==this.dragPointerId}capturePointer(o){const a=this.headerEl;if(a&&"function"==typeof a.setPointerCapture&&null!=o.pointerId)try{a.setPointerCapture(o.pointerId)}catch(o){}}releasePointer(o){const a=this.headerEl;if(a&&"function"==typeof a.releasePointerCapture&&null!=o.pointerId)try{a.releasePointerCapture(o.pointerId)}catch(o){}}writeOffset(o){this.liveOffset=o;const a=this.modalEl;a&&(0===o.x&&0===o.y?a.style.removeProperty("--co-modal-translate"):a.style.setProperty("--co-modal-translate",`${o.x}px ${o.y}px`))}render(){const o="panel"!==this.appearance&&"dialog"!==this.appearance,a=o?20:18,i=t("div",{class:{"co-modal__frame":!0,"co-sq-elevation-fallback":o,"co-modal__frame--standalone":!this.usesOverlay}},t("div",{class:{"co-modal":!0,"co-sq-clip":o,"co-sq-elevation":o,"co-modal--open":this.open,"co-modal--xs":"xs"===this.size,"co-modal--sm":"sm"===this.size,"co-modal--lg":"lg"===this.size,"co-modal--full":"full"===this.size,"co-modal--no-dividers":this.noDividers,"co-modal--no-header-divider":!this.headerDivider,"co-modal--panel":"panel"===this.appearance,"co-modal--dialog":"dialog"===this.appearance,"co-modal--movable":this.movable},part:"modal",ref:o=>this.modalEl=o,role:"dialog","aria-modal":"true","aria-labelledby":this.heading?"modal-heading":void 0,onClick:this.usesOverlay?this.stopPropagation:void 0,onTransitionEnd:this.handleTransitionEnd},t("div",{class:{"co-modal__header":!0,"co-modal__header--movable":this.movable,"co-modal__header--dragging":this.dragging},part:"header",ref:o=>this.headerEl=o,onPointerDown:this.movable?this.handleDragDown:void 0,onPointerMove:this.movable?this.handleDragMove:void 0,onPointerUp:this.movable?this.handleDragUp:void 0,onPointerCancel:this.movable?this.handleDragCancel:void 0},t("slot",{name:"header-leading"}),t("div",{class:"co-modal__header-text",part:"header-text"},t("h2",{class:"co-modal__heading",part:"heading",id:"modal-heading"},this.heading),this.description&&t("p",{class:"co-modal__description",part:"description"},this.description)),t("slot",{name:"header-actions"}),this.closable&&t("button",{class:"co-modal__close",type:"button","aria-label":"Close",onClick:this.handleCloseClick},t("co-icon",{name:"x",size:a}))),!this.noDividers&&t("div",{class:"co-modal__body",part:"body"},t("slot",null)),t("div",{class:{"co-modal__footer":!0,"co-modal__footer--empty":!this.hasFooter},part:"footer"},t("slot",{name:"footer",onSlotchange:this.handleFooterSlotChange}))));return this.usesOverlay?t("co-overlay",{open:this.open,onCoClose:this.handleOverlayClick},i):i}static get watchers(){return{open:[{resetPositionOnOpen:0}]}}};n.style='.co-sq-elevation{border-radius:var(--co-sq-r);corner-shape:squircle;box-shadow:var(--co-sq-shadow)}.co-sq-clip{overflow:hidden;border-radius:var(--co-sq-r);corner-shape:squircle}@supports not (corner-shape: squircle){.co-sq-elevation{box-shadow:none}.co-sq-elevation-fallback{filter:var(--co-sq-drop-shadow)}.co-sq-clip{border-radius:0;--co-sq-tl:url("data:image/svg+xml,<svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 100 100%27 preserveAspectRatio=%27none%27><path d=%27M100 0L97.5 0L95 0L92.5 0L90 0L87.5 0.01L85 0.01L82.5 0.02L80 0.04L77.5 0.06L75 0.1L72.5 0.14L70 0.2L67.5 0.28L65 0.38L62.5 0.5L60 0.65L57.5 0.83L55 1.04L52.5 1.3L50 1.6L47.5 1.96L45 2.37L42.5 2.85L40 3.41L37.5 4.05L35 4.8L32.5 5.65L30 6.63L27.5 7.77L25 9.07L22.5 10.58L20 12.34L17.5 14.41L15 16.85L12.5 19.79L10 23.42L7.5 28.06L5 34.37L2.5 44.29L0 100L100 100Z%27 fill=%27%23fff%27/></svg>");--co-sq-tr:url("data:image/svg+xml,<svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 100 100%27 preserveAspectRatio=%27none%27><path d=%27M0 0L2.5 0L5 0L7.5 0L10 0L12.5 0.01L15 0.01L17.5 0.02L20 0.04L22.5 0.06L25 0.1L27.5 0.14L30 0.2L32.5 0.28L35 0.38L37.5 0.5L40 0.65L42.5 0.83L45 1.04L47.5 1.3L50 1.6L52.5 1.96L55 2.37L57.5 2.85L60 3.41L62.5 4.05L65 4.8L67.5 5.65L70 6.63L72.5 7.77L75 9.07L77.5 10.58L80 12.34L82.5 14.41L85 16.85L87.5 19.79L90 23.42L92.5 28.06L95 34.37L97.5 44.29L100 100L0 100Z%27 fill=%27%23fff%27/></svg>");--co-sq-bl:url("data:image/svg+xml,<svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 100 100%27 preserveAspectRatio=%27none%27><path d=%27M0 0L2.5 55.71L5 65.63L7.5 71.94L10 76.58L12.5 80.21L15 83.15L17.5 85.59L20 87.66L22.5 89.42L25 90.93L27.5 92.23L30 93.37L32.5 94.35L35 95.2L37.5 95.95L40 96.59L42.5 97.15L45 97.63L47.5 98.04L50 98.4L52.5 98.7L55 98.96L57.5 99.17L60 99.35L62.5 99.5L65 99.62L67.5 99.72L70 99.8L72.5 99.86L75 99.9L77.5 99.94L80 99.96L82.5 99.98L85 99.99L87.5 99.99L90 100L92.5 100L95 100L97.5 100L100 100L100 0Z%27 fill=%27%23fff%27/></svg>");--co-sq-br:url("data:image/svg+xml,<svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 100 100%27 preserveAspectRatio=%27none%27><path d=%27M100 0L97.5 55.71L95 65.63L92.5 71.94L90 76.58L87.5 80.21L85 83.15L82.5 85.59L80 87.66L77.5 89.42L75 90.93L72.5 92.23L70 93.37L67.5 94.35L65 95.2L62.5 95.95L60 96.59L57.5 97.15L55 97.63L52.5 98.04L50 98.4L47.5 98.7L45 98.96L42.5 99.17L40 99.35L37.5 99.5L35 99.62L32.5 99.72L30 99.8L27.5 99.86L25 99.9L22.5 99.94L20 99.96L17.5 99.98L15 99.99L12.5 99.99L10 100L7.5 100L5 100L2.5 100L0 100L0 0Z%27 fill=%27%23fff%27/></svg>");-webkit-mask:var(--co-sq-tl) top left / var(--co-sq-r) var(--co-sq-r) no-repeat, var(--co-sq-tr) top right / var(--co-sq-r) var(--co-sq-r) no-repeat, var(--co-sq-bl) bottom left / var(--co-sq-r) var(--co-sq-r) no-repeat, var(--co-sq-br) bottom right / var(--co-sq-r) var(--co-sq-r) no-repeat, linear-gradient(#fff 0 0) center / 100% calc(100% - 2 * var(--co-sq-r) + 2px) no-repeat, linear-gradient(#fff 0 0) center / calc(100% - 2 * var(--co-sq-r) + 2px) 100% no-repeat;mask:var(--co-sq-tl) top left / var(--co-sq-r) var(--co-sq-r) no-repeat, var(--co-sq-tr) top right / var(--co-sq-r) var(--co-sq-r) no-repeat, var(--co-sq-bl) bottom left / var(--co-sq-r) var(--co-sq-r) no-repeat, var(--co-sq-br) bottom right / var(--co-sq-r) var(--co-sq-r) no-repeat, linear-gradient(#fff 0 0) center / 100% calc(100% - 2 * var(--co-sq-r) + 2px) no-repeat, linear-gradient(#fff 0 0) center / calc(100% - 2 * var(--co-sq-r) + 2px) 100% no-repeat}}:host{display:contents;--co-overlay-blur:8px;--co-overlay-bg:rgba(31, 28, 27, 0.35)}.co-modal__frame{display:flex;contain:layout;--co-sq-drop-shadow:drop-shadow(0 1px 2px rgba(31, 28, 27, 0.06)) drop-shadow(0 14px 34px rgba(31, 28, 27, 0.16))}.co-modal{display:flex;flex-direction:column;background:var(--co-semantic-surface-secondary);--co-modal-r:var(--co-border-radius-xl);--co-sq-r:var(--co-modal-r);--co-sq-shadow:0 1px 4px rgba(31, 28, 27, 0.06), 0 14px 68px rgba(31, 28, 27, 0.16);max-width:540px;width:90vw;max-height:80vh;font-family:var(--co-font-family-primary);transform:scale(0.96);opacity:0;transition:transform var(--co-motion-duration-fast) var(--co-motion-ease-in), opacity var(--co-motion-duration-fast) var(--co-motion-ease-in)}.co-modal--sm{max-width:400px}.co-modal--lg{max-width:680px}.co-modal--full{max-width:min(1400px, 95vw);width:95vw;height:92vh;max-height:92vh}.co-modal--full .co-modal__body{flex:1;min-height:0;padding:0;overflow:hidden}.co-modal--open{transform:scale(1);opacity:1;transition:transform var(--co-motion-duration-base) var(--co-motion-ease-out), opacity var(--co-motion-duration-base) var(--co-motion-ease-out)}.co-modal__header{display:flex;align-items:flex-start;gap:var(--co-spacing-md);padding:var(--co-spacing-xl) var(--co-spacing-xl) var(--co-spacing-md)}.co-modal__header-text{display:flex;flex-direction:column;gap:var(--co-spacing-sm);flex:1}.co-modal__heading{margin:0;font-size:var(--co-font-size-20);font-weight:700;color:var(--co-semantic-text-default);line-height:1.3}.co-modal__description{margin:0;font-size:var(--co-font-size-14);color:var(--co-semantic-text-secondary);line-height:1.5}.co-modal__close{display:flex;align-items:center;justify-content:center;padding:var(--co-spacing-xs);margin:0;border:none;background:transparent;cursor:pointer;color:var(--co-semantic-text-muted);border-radius:var(--co-border-radius-sm);flex-shrink:0;transition:background var(--co-motion-duration-fast) var(--co-motion-ease-out)}.co-modal__close:hover{background:var(--co-semantic-surface-hover)}.co-modal__body{padding:var(--co-spacing-lg) var(--co-spacing-xl);overflow-y:auto;overscroll-behavior:contain;font-size:var(--co-font-size-14);color:var(--co-semantic-text-secondary);line-height:1.6;border-top:1px solid var(--co-semantic-border-default)}.co-modal__body:empty{display:none}.co-modal__footer{display:flex;justify-content:flex-end;gap:var(--co-spacing-md);padding:var(--co-spacing-lg) var(--co-spacing-xl) var(--co-spacing-xl);border-top:1px solid var(--co-semantic-border-default);--co-button-radius:var(--co-border-radius-xs)}.co-modal__footer--empty{display:none}.co-modal--no-dividers .co-modal__footer{border-top:none}.co-modal--no-header-divider .co-modal__body{border-top:none;padding-top:0}.co-modal--xs{width:var(--co-modal-width, 369px);max-width:var(--co-modal-width, 369px)}.co-modal--panel{border-radius:var(--co-border-radius-sm);border:1px solid var(--co-semantic-border-subtle);box-shadow:var(--co-shadow-lg)}.co-modal--panel .co-modal__header{padding:16px 20px 16px 24px;align-items:center;border-bottom:1px solid var(--co-semantic-border-subtle)}.co-modal--panel .co-modal__heading{font-size:var(--co-font-size-20);font-weight:500;line-height:1.25;letter-spacing:var(--co-font-letter-spacing-body)}.co-modal--panel .co-modal__close{width:32px;height:32px;padding:0;border-radius:var(--co-border-radius-full);color:var(--co-semantic-text-default)}.co-modal--panel .co-modal__body{padding:24px;border-top:none}.co-modal--panel .co-modal__footer{padding:12px 24px;gap:12px;border-top:1px solid var(--co-semantic-border-subtle)}.co-modal__frame--standalone{position:fixed;inset:0;z-index:var(--co-modal-z-index, 1000);display:flex;align-items:center;justify-content:center;pointer-events:none}.co-modal__frame--standalone .co-modal--open{pointer-events:auto}.co-modal__frame--standalone .co-modal:not(.co-modal--open){visibility:hidden;transition:transform var(--co-motion-duration-fast) var(--co-motion-ease-in), opacity var(--co-motion-duration-fast) var(--co-motion-ease-in), visibility 0s linear var(--co-motion-duration-fast)}.co-modal--dialog{border-radius:var(--co-border-radius-lg)}.co-modal--dialog .co-modal__header{padding:var(--co-spacing-3xl) var(--co-spacing-3xl) 0;align-items:flex-start;gap:var(--co-spacing-lg)}.co-modal--dialog .co-modal__header-text{gap:var(--co-spacing-lg)}.co-modal--dialog .co-modal__heading{font-size:var(--co-font-size-22);font-weight:500;line-height:1.25;letter-spacing:var(--co-font-letter-spacing-body)}.co-modal--dialog .co-modal__description{font-size:var(--co-font-size-16);line-height:1.5;letter-spacing:var(--co-font-letter-spacing-body)}.co-modal--dialog .co-modal__close{width:32px;height:32px;padding:0;margin:-3px -6px 0 0;border-radius:var(--co-border-radius-full);color:var(--co-semantic-text-default)}.co-modal--dialog .co-modal__body{padding:var(--co-spacing-lg) var(--co-spacing-3xl) var(--co-spacing-3xl);border-top:none;font-size:var(--co-font-size-16);line-height:1.5;letter-spacing:var(--co-font-letter-spacing-body)}.co-modal--dialog.co-modal--full .co-modal__body{padding:0}.co-modal--dialog .co-modal__footer{padding:var(--co-spacing-lg) var(--co-spacing-2xl);gap:var(--co-spacing-md);border-top-color:var(--co-semantic-border-subtle);--co-button-radius:var(--co-border-radius-sm)}.co-modal--movable{translate:var(--co-modal-translate, none)}.co-modal__header--movable{cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none}.co-modal__header--movable .co-modal__close{cursor:pointer}.co-modal__header--dragging{cursor:grabbing}';export{n as co_modal}
|