@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
|
@@ -2,28 +2,61 @@ import { h } from "@stencil/core";
|
|
|
2
2
|
import { RequiredMark } from "../../utils/requiredMark";
|
|
3
3
|
import { OverlayScrollbars } from "overlayscrollbars";
|
|
4
4
|
import { highlightSegments, rankByMatch } from "../../utils/normalizeText";
|
|
5
|
+
import { LEGACY_ROW_METRICS, resolveRowMetrics, scrollTopToReveal, virtualSlice } from "./virtualRows";
|
|
6
|
+
/**
|
|
7
|
+
* Selector desplegable de una o varias opciones de una lista conocida, con
|
|
8
|
+
* búsqueda opcional del lado del cliente y lista virtualizada. Para opciones que
|
|
9
|
+
* vienen paginadas del servidor usá `co-ref-field`. Wrapper Vue: `CoSelect` de
|
|
10
|
+
* `@prolibu-suite/cobalt-vue`.
|
|
11
|
+
*/
|
|
5
12
|
export class CoSelect {
|
|
6
13
|
constructor() {
|
|
7
14
|
/** Whether the field is required (renders a required marker on the label). */
|
|
8
15
|
this.required = false;
|
|
16
|
+
/** Texto del trigger sin selección. */
|
|
9
17
|
this.placeholder = 'Select…';
|
|
18
|
+
/** Deshabilita el campo. */
|
|
10
19
|
this.disabled = false;
|
|
20
|
+
/** Botón × para vaciar la selección cuando hay valor; emite `coClear` y `coChange`. */
|
|
11
21
|
this.clearable = false;
|
|
12
22
|
/** Label layout: vertical (label above) or horizontal (label beside) */
|
|
13
23
|
this.layout = 'vertical';
|
|
24
|
+
/** Estado de validación: pinta el borde y el `helperText` con el color del estado. */
|
|
14
25
|
this.status = 'default';
|
|
26
|
+
/** Opciones: array de `{ value, label, icon?, image?, disabled? }`, array de strings
|
|
27
|
+
* (value = label), o ese mismo array como JSON desde HTML. */
|
|
15
28
|
this.options = '[]';
|
|
29
|
+
/** Selección: el `value` de la opción en single; en `multiple`, array o JSON array.
|
|
30
|
+
* `''` significa «sin selección» (una opción con `value: ''` no se puede marcar).
|
|
31
|
+
* El componente lo actualiza al elegir. */
|
|
16
32
|
this.value = '';
|
|
33
|
+
/** Selección múltiple: el panel queda abierto y `value`/`coChange` llevan un array. */
|
|
17
34
|
this.multiple = false;
|
|
35
|
+
/** Alto del trigger: `xs` 24 · `s` 28 · `sm` 32 · `md` 40 (default) · `lg` 48. Un valor fuera de la lista cae al default. */
|
|
18
36
|
this.size = 'md';
|
|
19
37
|
/** Visual style. `flat` strips the trigger's border and background so it
|
|
20
38
|
* reads as plain content instead of a boxed control — padding, label,
|
|
21
|
-
* focus ring, disabled and status states are unaffected. `
|
|
22
|
-
*
|
|
39
|
+
* focus ring, disabled and status states are unaffected. `soft` pinta un
|
|
40
|
+
* fondo `gray-100` sólido con borde transparente (mismo grosor que el
|
|
41
|
+
* default, no cambia el tamaño de la caja). `default` (the standard
|
|
42
|
+
* bordered box) renders identically to before this prop existed. */
|
|
23
43
|
this.variant = 'default';
|
|
44
|
+
/** Layout de la fila de etiqueta. `inline-help` la muestra en una sola fila
|
|
45
|
+
* (`label` a la izquierda, `secondaryLabel` a la derecha, alineados a la
|
|
46
|
+
* línea de base) y ajusta el borde/gap del trigger para ese contexto
|
|
47
|
+
* (modal). `default` mantiene el layout actual (labels apiladas arriba,
|
|
48
|
+
* centradas verticalmente entre sí). */
|
|
49
|
+
this.labelStyle = 'default';
|
|
50
|
+
/** Superficie del panel desplegable. `dark` = fondo `surface-primary` +
|
|
51
|
+
* texto `text-inverse`, con el check de la opción seleccionada al
|
|
52
|
+
* INICIO (hueco siempre reservado, como `co-menu-item leadingCheck`).
|
|
53
|
+
* `light` (default) conserva el panel y el check al final tal cual hoy. */
|
|
54
|
+
this.menuSurface = 'light';
|
|
24
55
|
/** Show a search box inside the dropdown to filter options client-side. */
|
|
25
56
|
this.searchable = false;
|
|
57
|
+
/** Placeholder del buscador del panel (`searchable`). */
|
|
26
58
|
this.searchPlaceholder = 'Search…';
|
|
59
|
+
/** Texto del panel cuando la búsqueda no encuentra opciones. */
|
|
27
60
|
this.emptyText = 'No results';
|
|
28
61
|
/** Footer de confirmación al pie del panel (paridad co-combobox/co-ref-field). */
|
|
29
62
|
this.showFooter = false;
|
|
@@ -39,12 +72,41 @@ export class CoSelect {
|
|
|
39
72
|
* Patrón APG de combobox: el foco NUNCA baja a las opciones — queda en el
|
|
40
73
|
* trigger (o en el search input) y esto viaja por `aria-activedescendant`. */
|
|
41
74
|
this.activeIndex = -1;
|
|
75
|
+
/** Alto y hueco de fila con los que virtualiza la lista. Se leen de los knobs
|
|
76
|
+
* del menú (`--co-select-option-height`, `--co-select-menu-gap`) en cada
|
|
77
|
+
* apertura; sin knobs, el paso histórico de 34 (ver `virtualRows.ts`). */
|
|
78
|
+
this.rowMetrics = LEGACY_ROW_METRICS;
|
|
42
79
|
/** Scroll pendiente hacia la opción activa, resuelto en componentDidRender. */
|
|
43
80
|
this.pendingActiveScroll = false;
|
|
44
81
|
this.activeScrollFrames = 0;
|
|
45
82
|
this.lastParsedOptions = [];
|
|
46
83
|
this.lastRankSearch = '';
|
|
47
84
|
this.lastRanked = [];
|
|
85
|
+
/** Valor en px de una custom property heredada por el host, o `null` si no
|
|
86
|
+
* está seteada o no resuelve a px. El caso común (`12px`, o un token `--co-*`
|
|
87
|
+
* en px, que ya llega sustituido) se lee directo; cualquier otra forma
|
|
88
|
+
* (`calc()`, `rem`…) la resuelve el motor CSS sobre un nodo de prueba
|
|
89
|
+
* `display: none` que vive solo durante la lectura. */
|
|
90
|
+
this.readCssLengthPx = (cssVar) => {
|
|
91
|
+
if (typeof getComputedStyle !== 'function')
|
|
92
|
+
return null;
|
|
93
|
+
const raw = getComputedStyle(this.el).getPropertyValue(cssVar).trim();
|
|
94
|
+
if (!raw)
|
|
95
|
+
return null;
|
|
96
|
+
const px = /^(-?\d*\.?\d+)px$/.exec(raw);
|
|
97
|
+
if (px)
|
|
98
|
+
return parseFloat(px[1]);
|
|
99
|
+
const root = this.el.shadowRoot;
|
|
100
|
+
if (!root)
|
|
101
|
+
return null;
|
|
102
|
+
const probe = document.createElement('div');
|
|
103
|
+
probe.style.display = 'none';
|
|
104
|
+
probe.style.setProperty('height', `var(${cssVar})`);
|
|
105
|
+
root.appendChild(probe);
|
|
106
|
+
const resolved = getComputedStyle(probe).height;
|
|
107
|
+
probe.remove();
|
|
108
|
+
return /px$/.test(resolved) ? parseFloat(resolved) : null;
|
|
109
|
+
};
|
|
48
110
|
this.handleSearchInput = (e) => {
|
|
49
111
|
this.searchText = e.target.value;
|
|
50
112
|
this.scrollTop = 0;
|
|
@@ -128,6 +190,24 @@ export class CoSelect {
|
|
|
128
190
|
e.preventDefault();
|
|
129
191
|
return true;
|
|
130
192
|
};
|
|
193
|
+
/** El puntero MUEVE la activa: hay un solo resaltado, el de `--active`, y el
|
|
194
|
+
* CSS ya no pinta `:hover` en las filas. Con los dos canales se veían DOS
|
|
195
|
+
* filas resaltadas a la vez (la activa por teclado y la de abajo del mouse).
|
|
196
|
+
*
|
|
197
|
+
* `pointermove` y no `mouseenter`/`mouseover`: cuando el TECLADO scrollea la
|
|
198
|
+
* lista bajo un mouse quieto, el navegador actualiza el hover y dispara esos
|
|
199
|
+
* eventos de borde, pero no un `pointermove` — la activa del teclado no se la
|
|
200
|
+
* roba una fila que pasó por debajo del cursor (medido en Chromium).
|
|
201
|
+
*
|
|
202
|
+
* Sin `scrollActiveIntoView`: la fila ya está bajo el puntero, scrollear la
|
|
203
|
+
* haría saltar. El toque no cuenta: arrastrar el dedo es scrollear. Una fila
|
|
204
|
+
* deshabilitada no llega acá (`pointer-events: none`). */
|
|
205
|
+
this.handleOptionPointerMove = (e, index) => {
|
|
206
|
+
if (e.pointerType === 'touch')
|
|
207
|
+
return;
|
|
208
|
+
if (this.activeIndex !== index)
|
|
209
|
+
this.activeIndex = index;
|
|
210
|
+
};
|
|
131
211
|
/** Alinea el scroll REAL con la ventana virtual ya renderizada.
|
|
132
212
|
*
|
|
133
213
|
* Escribe `scrollTop` DIRECTO sobre el viewport de OverlayScrollbars: el
|
|
@@ -153,8 +233,9 @@ export class CoSelect {
|
|
|
153
233
|
if (Math.abs(viewport.scrollTop - target) <= 1) {
|
|
154
234
|
this.pendingActiveScroll = false;
|
|
155
235
|
this.activeScrollFrames = 0;
|
|
156
|
-
// Afinado dentro del slice ya visible (
|
|
157
|
-
//
|
|
236
|
+
// Afinado dentro del slice ya visible (sin `--co-select-option-height`
|
|
237
|
+
// las filas miden 32 y el paso histórico es 34). jsdom no implementa
|
|
238
|
+
// scrollIntoView.
|
|
158
239
|
(_e = (_d = (_c = this.el.shadowRoot) === null || _c === void 0 ? void 0 : _c.getElementById(this.optionId(this.activeIndex))) === null || _d === void 0 ? void 0 : _d.scrollIntoView) === null || _e === void 0 ? void 0 : _e.call(_d, { block: 'nearest' });
|
|
159
240
|
return;
|
|
160
241
|
}
|
|
@@ -325,6 +406,8 @@ export class CoSelect {
|
|
|
325
406
|
onOpenChange(open) {
|
|
326
407
|
if (open) {
|
|
327
408
|
this.scrollTop = 0;
|
|
409
|
+
// ANTES de la activa: su scroll inicial se calcula con el paso de fila.
|
|
410
|
+
this.rowMetrics = resolveRowMetrics(this.readCssLengthPx);
|
|
328
411
|
this.resetActiveIndex();
|
|
329
412
|
if (this.searchable)
|
|
330
413
|
this.focusSearchWhenVisible();
|
|
@@ -357,7 +440,6 @@ export class CoSelect {
|
|
|
357
440
|
/** Deja la opción activa dentro de la ventana virtual (state) y agenda el
|
|
358
441
|
* scroll real para después del próximo render. */
|
|
359
442
|
scrollActiveIntoView() {
|
|
360
|
-
const { ITEM_HEIGHT, VIEWPORT_ITEMS } = CoSelect;
|
|
361
443
|
const index = this.activeIndex;
|
|
362
444
|
if (!(index >= 0))
|
|
363
445
|
return;
|
|
@@ -365,13 +447,10 @@ export class CoSelect {
|
|
|
365
447
|
// (apertura con la selección abajo, Home/End, wrap) no tendría nodo — y el
|
|
366
448
|
// `aria-activedescendant` quedaría colgado. Se empuja la posición virtual
|
|
367
449
|
// para que el próximo slice lo incluya.
|
|
368
|
-
const top = index * ITEM_HEIGHT;
|
|
369
|
-
const viewportH = ITEM_HEIGHT * VIEWPORT_ITEMS;
|
|
370
450
|
const from = this.scrollTop || 0;
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
this.scrollTop = top + ITEM_HEIGHT - viewportH;
|
|
451
|
+
const next = scrollTopToReveal(index, from, this.metrics, CoSelect.VIEWPORT_ITEMS);
|
|
452
|
+
if (next !== from)
|
|
453
|
+
this.scrollTop = next;
|
|
375
454
|
// El scroll REAL se resuelve en componentDidRender, no en un rAF suelto:
|
|
376
455
|
// al abrir, el @Watch('isOpen') corre ANTES de que Stencil agende el
|
|
377
456
|
// re-render, así que un rAF pedido acá se ejecutaría con el slice viejo
|
|
@@ -448,17 +527,17 @@ export class CoSelect {
|
|
|
448
527
|
return label;
|
|
449
528
|
return segs.map((s) => (s.match ? h("span", { class: "co-select__match" }, s.text) : s.text));
|
|
450
529
|
}
|
|
530
|
+
/** `?? LEGACY`: el harness de specs no siembra inicializadores de campo en
|
|
531
|
+
* todos los casos; en el build real `rowMetrics` siempre existe. */
|
|
532
|
+
get metrics() {
|
|
533
|
+
var _a;
|
|
534
|
+
return (_a = this.rowMetrics) !== null && _a !== void 0 ? _a : LEGACY_ROW_METRICS;
|
|
535
|
+
}
|
|
451
536
|
getVirtualSlice(items) {
|
|
452
|
-
|
|
453
|
-
const total = items.length;
|
|
454
|
-
const totalHeight = total * ITEM_HEIGHT;
|
|
455
|
-
const startIdx = Math.max(0, Math.floor(this.scrollTop / ITEM_HEIGHT) - OVERSCAN);
|
|
456
|
-
const endIdx = Math.min(total, startIdx + VIEWPORT_ITEMS + OVERSCAN * 2);
|
|
457
|
-
const offsetY = startIdx * ITEM_HEIGHT;
|
|
458
|
-
return { totalHeight, startIdx, endIdx, offsetY };
|
|
537
|
+
return virtualSlice(items.length, this.scrollTop || 0, this.metrics, CoSelect.VIEWPORT_ITEMS, CoSelect.OVERSCAN);
|
|
459
538
|
}
|
|
460
539
|
render() {
|
|
461
|
-
var _a;
|
|
540
|
+
var _a, _b;
|
|
462
541
|
const selected = this.selectedValues;
|
|
463
542
|
const options = this.filteredOptions;
|
|
464
543
|
// Se calcula UNA vez sobre `options` (no en un getter): el virtualizador
|
|
@@ -468,25 +547,36 @@ export class CoSelect {
|
|
|
468
547
|
const activeOptionId = this.isOpen && this.activeIndex >= 0 && this.activeIndex < options.length
|
|
469
548
|
? this.optionId(this.activeIndex)
|
|
470
549
|
: undefined;
|
|
471
|
-
return (h("div", { key: '
|
|
550
|
+
return (h("div", { key: '12cb506f80422c39f8f5a17b81afa6c01831f237', class: {
|
|
472
551
|
'co-select': true,
|
|
473
552
|
'co-select--open': this.isOpen,
|
|
474
553
|
'co-select--disabled': this.disabled,
|
|
475
554
|
[`co-select--${this.size}`]: true,
|
|
476
555
|
[`co-select--${this.status}`]: this.status !== 'default',
|
|
477
556
|
'co-select--flat': this.variant === 'flat',
|
|
478
|
-
|
|
557
|
+
'co-select--soft': this.variant === 'soft',
|
|
558
|
+
'co-select--inline-help': this.labelStyle === 'inline-help',
|
|
559
|
+
} }, (this.label || this.secondaryLabel) && (h("div", { key: 'bbb454e9d0ab08fd3abf5462711654c6eb8fe253', class: "co-select__labels" }, this.label && h("label", { key: '2dbf39a9e4fca24b95777078ecb6fea060aa2e19', class: "co-select__label" }, this.label, h(RequiredMark, { key: 'f5a62c06aa12a5556fc78d93918d673982183dfa', required: this.required })), this.secondaryLabel && h("span", { key: '2082ba20405dee16a08d35ec1ff67b59294056a0', class: "co-select__secondary-label" }, this.secondaryLabel))), h("co-popover", { key: '4f7e00909286922ff2b9d05f1ee4f42f8bc7aed9', open: this.isOpen, placement: "bottom-start", matchWidth: true, offset: 4,
|
|
560
|
+
// menuSurface="dark": el panel oscuro pinta su propio chrome (fondo
|
|
561
|
+
// negro, radio xs, sin borde ni sombra — Figma 4750:23242), así que
|
|
562
|
+
// el co-popover va `bare` para no sumar el borde hairline ni la
|
|
563
|
+
// sombra del panel claro (y cualquier --co-popover-shadow heredada
|
|
564
|
+
// del contexto). En "light" (default) no cambia nada.
|
|
565
|
+
bare: this.menuSurface === 'dark', onCoOpen: this.handlePopoverOpen, onCoClose: this.handlePopoverClose }, h("div", { key: '8537fcefbd02707af785ad623bcb1f19b276d3c4', slot: "trigger", class: "co-select__trigger", role: "combobox", "aria-expanded": this.isOpen ? 'true' : 'false', "aria-haspopup": "listbox", "aria-label": this.label || this.ariaLabelText || undefined, "aria-disabled": this.disabled ? 'true' : undefined, "aria-controls": CoSelect.LISTBOX_ID, "aria-activedescendant": activeOptionId, tabIndex: this.disabled ? -1 : 0, ref: (el) => (this.triggerEl = el), onClick: this.handleTriggerClick, onKeyDown: this.handleTriggerKeyDown }, this.iconLeft && (h("co-icon", { key: '6714adb30bb2c24824cf80048b579a05825652b9', name: this.iconLeft, size: (_a = this.iconSize) !== null && _a !== void 0 ? _a : 16, class: "co-select__icon" })), ((_b = this.selectedOption) === null || _b === void 0 ? void 0 : _b.image) && (h("img", { key: '8c0c6cca536a5edba4e3caa50ecd196f9e70117c', class: "co-select__flag", src: this.selectedOption.image, alt: "" })), this.multiple && this.hasValue ? (h("div", { class: "co-select__chips" }, this.selectedValues.map((v) => {
|
|
479
566
|
const opt = this.parsedOptions.find((o) => o.value === v);
|
|
480
567
|
return (h("span", { class: "co-select__chip", key: v }, h("span", { class: "co-select__chip-label" }, opt ? opt.label : v), h("button", { class: "co-select__chip-remove", type: "button", tabIndex: -1, "aria-label": "Remove", onClick: (e) => {
|
|
481
568
|
e.stopPropagation();
|
|
482
569
|
this.handleOptionClick(v);
|
|
483
570
|
} }, h("co-icon", { name: "x", size: 12 }))));
|
|
484
|
-
}))) : (h("span", { class: { 'co-select__text': true, 'co-select__text--placeholder': !this.hasValue } }, this.hasValue ? this.displayText : this.placeholder)), this.clearable && this.hasValue && !this.disabled && (h("button", { key: '
|
|
571
|
+
}))) : (h("span", { class: { 'co-select__text': true, 'co-select__text--placeholder': !this.hasValue } }, this.hasValue ? this.displayText : this.placeholder)), this.clearable && this.hasValue && !this.disabled && (h("button", { key: '65f1295511998e7ec9685ee45433e01c14ae65df', class: "co-select__clear", type: "button", tabIndex: -1, onClick: this.handleClear, "aria-label": "Clear" }, h("co-icon", { key: '23416924a88739bf6326095298bfaaeabbe980e1', name: "x-circle", size: 16, weight: "fill" }))), h("co-icon", { key: 'd4c3c23b8ceb6ef0b918348e8b0f724051380681', name: this.isOpen ? 'caret-up' : 'caret-down', size: 16, class: "co-select__caret" })), h("div", { key: 'd591730000ed4e58f6c2474b58949ae15cf65593', class: {
|
|
572
|
+
'co-select__dropdown': true,
|
|
573
|
+
'co-select__dropdown--dark': this.menuSurface === 'dark',
|
|
574
|
+
} }, this.isOpen && this.searchable && (h("div", { key: 'd663fdb315d997ed2325a5c385bbd5728bebdaa1', class: "co-select__search" }, h("co-icon", { key: '13d5e0bd54b6dfa6d926f7e9ec2057f814720e16', name: "magnifying-glass", size: 16, class: "co-select__search-icon" }), h("input", { key: 'e7edfe009febe2c681c47fa92105b62c868b53d5', class: "co-select__search-input", type: "text", placeholder: this.searchPlaceholder, value: this.searchText, "aria-controls": CoSelect.LISTBOX_ID, "aria-activedescendant": activeOptionId, onInput: this.handleSearchInput, onKeyDown: this.handleNavKeyDown, ref: (el) => (this.searchInputEl = el) }))), this.isOpen && this.searchable && options.length === 0 && (h("div", { key: 'bd0befdaba2cbead771171b609e2021c714ea247', class: "co-select__empty" }, this.emptyText)), h("div", { key: '0e395475bba6b693419986ff2cf582192a15a2e6', class: "co-select__options", id: CoSelect.LISTBOX_ID, role: "listbox", "aria-multiselectable": this.multiple ? 'true' : undefined, ref: (el) => (this.optionsContainerEl = el) }, this.isOpen && (() => {
|
|
485
575
|
const { totalHeight, startIdx, endIdx, offsetY } = this.getVirtualSlice(options);
|
|
486
576
|
return (
|
|
487
577
|
// Los wrappers del virtualizador van `presentation` para que las
|
|
488
578
|
// opciones sigan siendo hijas del listbox en el árbol de a11y.
|
|
489
|
-
h("div", { role: "presentation", class: "co-select__virtual-spacer", style: { height: `${totalHeight}px`, position: 'relative' } }, h("div", { role: "presentation", style: { position: 'absolute', top: `${offsetY}px`, left: '0', right: '0' } }, options.slice(startIdx, endIdx).map((opt, i) => {
|
|
579
|
+
h("div", { role: "presentation", class: "co-select__virtual-spacer", style: { height: `${totalHeight}px`, position: 'relative' } }, h("div", { role: "presentation", class: "co-select__virtual-window", style: { position: 'absolute', top: `${offsetY}px`, left: '0', right: '0' } }, options.slice(startIdx, endIdx).map((opt, i) => {
|
|
490
580
|
const index = startIdx + i;
|
|
491
581
|
const isSelected = selected.includes(opt.value);
|
|
492
582
|
const isDisabled = !!opt.disabled;
|
|
@@ -495,9 +585,9 @@ export class CoSelect {
|
|
|
495
585
|
'co-select__option--selected': isSelected,
|
|
496
586
|
'co-select__option--disabled': isDisabled,
|
|
497
587
|
'co-select__option--active': index === this.activeIndex,
|
|
498
|
-
}, onClick: () => !isDisabled && this.handleOptionClick(opt.value) }, opt.image ? (h("img", { class: "co-select__option-flag", src: opt.image, alt: "", loading: "lazy" })) : opt.icon ? (h("co-icon", { name: opt.icon, size: 20, class: "co-select__option-icon" })) : null, h("span", { class: "co-select__option-label" }, this.renderLabel(opt.label)), isSelected && h("co-icon", { name: "check", size: 16, class: "co-select__option-check" })));
|
|
588
|
+
}, onClick: () => !isDisabled && this.handleOptionClick(opt.value), onPointerMove: (e) => this.handleOptionPointerMove(e, index) }, this.menuSurface === 'dark' && (h("span", { class: "co-select__option-check-slot" }, isSelected && (h("co-icon", { name: "check", size: 12, class: "co-select__option-check co-select__option-check--leading" })))), opt.image ? (h("img", { class: "co-select__option-flag", src: opt.image, alt: "", loading: "lazy" })) : opt.icon ? (h("co-icon", { name: opt.icon, size: 20, class: "co-select__option-icon" })) : null, h("span", { class: "co-select__option-label" }, this.renderLabel(opt.label)), isSelected && this.menuSurface !== 'dark' && (h("co-icon", { name: "check", size: 16, class: "co-select__option-check" }))));
|
|
499
589
|
}))));
|
|
500
|
-
})()), this.isOpen && this.showFooter && (h("co-list-footer", { key: '
|
|
590
|
+
})()), this.isOpen && this.showFooter && (h("co-list-footer", { key: 'b5991f9a23e145990ba8d1a01f67c1744165aa36', class: "co-select__footer", primaryLabel: this.footerPrimaryLabel, primaryIcon: "check", onCoPrimary: this.handleFooterPrimary })))), this.helperText && (h("div", { key: '04d08f975108f5f86dcbf4078271cbb16c47f4c6', class: `co-select__helper co-select__helper--${this.status}` }, this.statusIcon && h("co-icon", { key: '26ab3e89c81d4c64aef536f561921d5c3f08ea62', name: this.statusIcon, size: 14, class: "co-select__helper-icon" }), h("span", { key: '0743ba35903d666a3ab4598e4639e8c0f94a190b', class: "co-select__helper-text" }, this.helperText)))));
|
|
501
591
|
}
|
|
502
592
|
static get is() { return "co-select"; }
|
|
503
593
|
static get encapsulation() { return "shadow"; }
|
|
@@ -525,7 +615,7 @@ export class CoSelect {
|
|
|
525
615
|
"optional": true,
|
|
526
616
|
"docs": {
|
|
527
617
|
"tags": [],
|
|
528
|
-
"text": ""
|
|
618
|
+
"text": "Etiqueta del campo (tambi\u00E9n es su nombre accesible)."
|
|
529
619
|
},
|
|
530
620
|
"getter": false,
|
|
531
621
|
"setter": false,
|
|
@@ -583,7 +673,7 @@ export class CoSelect {
|
|
|
583
673
|
"optional": true,
|
|
584
674
|
"docs": {
|
|
585
675
|
"tags": [],
|
|
586
|
-
"text": ""
|
|
676
|
+
"text": "Texto secundario junto a la etiqueta (p. ej. \u00ABOpcional\u00BB); con `labelStyle=\"inline-help\"` va a la derecha."
|
|
587
677
|
},
|
|
588
678
|
"getter": false,
|
|
589
679
|
"setter": false,
|
|
@@ -602,7 +692,7 @@ export class CoSelect {
|
|
|
602
692
|
"optional": false,
|
|
603
693
|
"docs": {
|
|
604
694
|
"tags": [],
|
|
605
|
-
"text": ""
|
|
695
|
+
"text": "Texto del trigger sin selecci\u00F3n."
|
|
606
696
|
},
|
|
607
697
|
"getter": false,
|
|
608
698
|
"setter": false,
|
|
@@ -622,7 +712,7 @@ export class CoSelect {
|
|
|
622
712
|
"optional": false,
|
|
623
713
|
"docs": {
|
|
624
714
|
"tags": [],
|
|
625
|
-
"text": ""
|
|
715
|
+
"text": "Deshabilita el campo."
|
|
626
716
|
},
|
|
627
717
|
"getter": false,
|
|
628
718
|
"setter": false,
|
|
@@ -642,13 +732,32 @@ export class CoSelect {
|
|
|
642
732
|
"optional": true,
|
|
643
733
|
"docs": {
|
|
644
734
|
"tags": [],
|
|
645
|
-
"text": ""
|
|
735
|
+
"text": "\u00CDcono Phosphor al inicio del trigger."
|
|
646
736
|
},
|
|
647
737
|
"getter": false,
|
|
648
738
|
"setter": false,
|
|
649
739
|
"reflect": false,
|
|
650
740
|
"attribute": "icon-left"
|
|
651
741
|
},
|
|
742
|
+
"iconSize": {
|
|
743
|
+
"type": "number",
|
|
744
|
+
"mutable": false,
|
|
745
|
+
"complexType": {
|
|
746
|
+
"original": "number",
|
|
747
|
+
"resolved": "number | undefined",
|
|
748
|
+
"references": {}
|
|
749
|
+
},
|
|
750
|
+
"required": false,
|
|
751
|
+
"optional": true,
|
|
752
|
+
"docs": {
|
|
753
|
+
"tags": [],
|
|
754
|
+
"text": "Tama\u00F1o (px) del `co-icon` de `iconLeft`. Sin setear, conserva el actual (16)."
|
|
755
|
+
},
|
|
756
|
+
"getter": false,
|
|
757
|
+
"setter": false,
|
|
758
|
+
"reflect": false,
|
|
759
|
+
"attribute": "icon-size"
|
|
760
|
+
},
|
|
652
761
|
"clearable": {
|
|
653
762
|
"type": "boolean",
|
|
654
763
|
"mutable": false,
|
|
@@ -661,7 +770,7 @@ export class CoSelect {
|
|
|
661
770
|
"optional": false,
|
|
662
771
|
"docs": {
|
|
663
772
|
"tags": [],
|
|
664
|
-
"text": ""
|
|
773
|
+
"text": "Bot\u00F3n \u00D7 para vaciar la selecci\u00F3n cuando hay valor; emite `coClear` y `coChange`."
|
|
665
774
|
},
|
|
666
775
|
"getter": false,
|
|
667
776
|
"setter": false,
|
|
@@ -681,7 +790,7 @@ export class CoSelect {
|
|
|
681
790
|
"optional": true,
|
|
682
791
|
"docs": {
|
|
683
792
|
"tags": [],
|
|
684
|
-
"text": ""
|
|
793
|
+
"text": "Texto de ayuda o de error bajo el campo."
|
|
685
794
|
},
|
|
686
795
|
"getter": false,
|
|
687
796
|
"setter": false,
|
|
@@ -720,7 +829,7 @@ export class CoSelect {
|
|
|
720
829
|
"optional": false,
|
|
721
830
|
"docs": {
|
|
722
831
|
"tags": [],
|
|
723
|
-
"text": ""
|
|
832
|
+
"text": "Estado de validaci\u00F3n: pinta el borde y el `helperText` con el color del estado."
|
|
724
833
|
},
|
|
725
834
|
"getter": false,
|
|
726
835
|
"setter": false,
|
|
@@ -737,7 +846,7 @@ export class CoSelect {
|
|
|
737
846
|
"references": {
|
|
738
847
|
"SelectOption": {
|
|
739
848
|
"location": "local",
|
|
740
|
-
"path": "/Users/agox/worktrees/cobalt-
|
|
849
|
+
"path": "/Users/agox/worktrees/cobalt-docs-2026-09-24/packages/core/src/components/co-select/co-select.tsx",
|
|
741
850
|
"id": "src/components/co-select/co-select.tsx::SelectOption"
|
|
742
851
|
}
|
|
743
852
|
}
|
|
@@ -746,7 +855,7 @@ export class CoSelect {
|
|
|
746
855
|
"optional": false,
|
|
747
856
|
"docs": {
|
|
748
857
|
"tags": [],
|
|
749
|
-
"text": ""
|
|
858
|
+
"text": "Opciones: array de `{ value, label, icon?, image?, disabled? }`, array de strings\n(value = label), o ese mismo array como JSON desde HTML."
|
|
750
859
|
},
|
|
751
860
|
"getter": false,
|
|
752
861
|
"setter": false,
|
|
@@ -766,7 +875,7 @@ export class CoSelect {
|
|
|
766
875
|
"optional": false,
|
|
767
876
|
"docs": {
|
|
768
877
|
"tags": [],
|
|
769
|
-
"text": ""
|
|
878
|
+
"text": "Selecci\u00F3n: el `value` de la opci\u00F3n en single; en `multiple`, array o JSON array.\n`''` significa \u00ABsin selecci\u00F3n\u00BB (una opci\u00F3n con `value: ''` no se puede marcar).\nEl componente lo actualiza al elegir."
|
|
770
879
|
},
|
|
771
880
|
"getter": false,
|
|
772
881
|
"setter": false,
|
|
@@ -786,7 +895,7 @@ export class CoSelect {
|
|
|
786
895
|
"optional": false,
|
|
787
896
|
"docs": {
|
|
788
897
|
"tags": [],
|
|
789
|
-
"text": ""
|
|
898
|
+
"text": "Selecci\u00F3n m\u00FAltiple: el panel queda abierto y `value`/`coChange` llevan un array."
|
|
790
899
|
},
|
|
791
900
|
"getter": false,
|
|
792
901
|
"setter": false,
|
|
@@ -798,15 +907,15 @@ export class CoSelect {
|
|
|
798
907
|
"type": "string",
|
|
799
908
|
"mutable": false,
|
|
800
909
|
"complexType": {
|
|
801
|
-
"original": "'s' | 'sm' | 'md' | 'lg'",
|
|
802
|
-
"resolved": "\"lg\" | \"md\" | \"s\" | \"sm\"",
|
|
910
|
+
"original": "'xs' | 's' | 'sm' | 'md' | 'lg'",
|
|
911
|
+
"resolved": "\"lg\" | \"md\" | \"s\" | \"sm\" | \"xs\"",
|
|
803
912
|
"references": {}
|
|
804
913
|
},
|
|
805
914
|
"required": false,
|
|
806
915
|
"optional": false,
|
|
807
916
|
"docs": {
|
|
808
917
|
"tags": [],
|
|
809
|
-
"text": ""
|
|
918
|
+
"text": "Alto del trigger: `xs` 24 \u00B7 `s` 28 \u00B7 `sm` 32 \u00B7 `md` 40 (default) \u00B7 `lg` 48. Un valor fuera de la lista cae al default."
|
|
810
919
|
},
|
|
811
920
|
"getter": false,
|
|
812
921
|
"setter": false,
|
|
@@ -818,15 +927,15 @@ export class CoSelect {
|
|
|
818
927
|
"type": "string",
|
|
819
928
|
"mutable": false,
|
|
820
929
|
"complexType": {
|
|
821
|
-
"original": "'default' | 'flat'",
|
|
822
|
-
"resolved": "\"default\" | \"flat\"",
|
|
930
|
+
"original": "'default' | 'flat' | 'soft'",
|
|
931
|
+
"resolved": "\"default\" | \"flat\" | \"soft\"",
|
|
823
932
|
"references": {}
|
|
824
933
|
},
|
|
825
934
|
"required": false,
|
|
826
935
|
"optional": false,
|
|
827
936
|
"docs": {
|
|
828
937
|
"tags": [],
|
|
829
|
-
"text": "Visual style. `flat` strips the trigger's border and background so it\nreads as plain content instead of a boxed control \u2014 padding, label,\nfocus ring, disabled and status states are unaffected. `default` (the\
|
|
938
|
+
"text": "Visual style. `flat` strips the trigger's border and background so it\nreads as plain content instead of a boxed control \u2014 padding, label,\nfocus ring, disabled and status states are unaffected. `soft` pinta un\nfondo `gray-100` s\u00F3lido con borde transparente (mismo grosor que el\ndefault, no cambia el tama\u00F1o de la caja). `default` (the standard\nbordered box) renders identically to before this prop existed."
|
|
830
939
|
},
|
|
831
940
|
"getter": false,
|
|
832
941
|
"setter": false,
|
|
@@ -834,6 +943,46 @@ export class CoSelect {
|
|
|
834
943
|
"attribute": "variant",
|
|
835
944
|
"defaultValue": "'default'"
|
|
836
945
|
},
|
|
946
|
+
"labelStyle": {
|
|
947
|
+
"type": "string",
|
|
948
|
+
"mutable": false,
|
|
949
|
+
"complexType": {
|
|
950
|
+
"original": "'default' | 'inline-help'",
|
|
951
|
+
"resolved": "\"default\" | \"inline-help\"",
|
|
952
|
+
"references": {}
|
|
953
|
+
},
|
|
954
|
+
"required": false,
|
|
955
|
+
"optional": false,
|
|
956
|
+
"docs": {
|
|
957
|
+
"tags": [],
|
|
958
|
+
"text": "Layout de la fila de etiqueta. `inline-help` la muestra en una sola fila\n(`label` a la izquierda, `secondaryLabel` a la derecha, alineados a la\nl\u00EDnea de base) y ajusta el borde/gap del trigger para ese contexto\n(modal). `default` mantiene el layout actual (labels apiladas arriba,\ncentradas verticalmente entre s\u00ED)."
|
|
959
|
+
},
|
|
960
|
+
"getter": false,
|
|
961
|
+
"setter": false,
|
|
962
|
+
"reflect": true,
|
|
963
|
+
"attribute": "label-style",
|
|
964
|
+
"defaultValue": "'default'"
|
|
965
|
+
},
|
|
966
|
+
"menuSurface": {
|
|
967
|
+
"type": "string",
|
|
968
|
+
"mutable": false,
|
|
969
|
+
"complexType": {
|
|
970
|
+
"original": "'light' | 'dark'",
|
|
971
|
+
"resolved": "\"dark\" | \"light\"",
|
|
972
|
+
"references": {}
|
|
973
|
+
},
|
|
974
|
+
"required": false,
|
|
975
|
+
"optional": false,
|
|
976
|
+
"docs": {
|
|
977
|
+
"tags": [],
|
|
978
|
+
"text": "Superficie del panel desplegable. `dark` = fondo `surface-primary` +\ntexto `text-inverse`, con el check de la opci\u00F3n seleccionada al\nINICIO (hueco siempre reservado, como `co-menu-item leadingCheck`).\n`light` (default) conserva el panel y el check al final tal cual hoy."
|
|
979
|
+
},
|
|
980
|
+
"getter": false,
|
|
981
|
+
"setter": false,
|
|
982
|
+
"reflect": true,
|
|
983
|
+
"attribute": "menu-surface",
|
|
984
|
+
"defaultValue": "'light'"
|
|
985
|
+
},
|
|
837
986
|
"searchable": {
|
|
838
987
|
"type": "boolean",
|
|
839
988
|
"mutable": false,
|
|
@@ -866,7 +1015,7 @@ export class CoSelect {
|
|
|
866
1015
|
"optional": false,
|
|
867
1016
|
"docs": {
|
|
868
1017
|
"tags": [],
|
|
869
|
-
"text": ""
|
|
1018
|
+
"text": "Placeholder del buscador del panel (`searchable`)."
|
|
870
1019
|
},
|
|
871
1020
|
"getter": false,
|
|
872
1021
|
"setter": false,
|
|
@@ -886,7 +1035,7 @@ export class CoSelect {
|
|
|
886
1035
|
"optional": false,
|
|
887
1036
|
"docs": {
|
|
888
1037
|
"tags": [],
|
|
889
|
-
"text": ""
|
|
1038
|
+
"text": "Texto del panel cuando la b\u00FAsqueda no encuentra opciones."
|
|
890
1039
|
},
|
|
891
1040
|
"getter": false,
|
|
892
1041
|
"setter": false,
|
|
@@ -954,7 +1103,7 @@ export class CoSelect {
|
|
|
954
1103
|
"composed": true,
|
|
955
1104
|
"docs": {
|
|
956
1105
|
"tags": [],
|
|
957
|
-
"text": ""
|
|
1106
|
+
"text": "Cambi\u00F3 la selecci\u00F3n (`value` ya est\u00E1 actualizado): `detail` = value elegido, o el\narray completo en `multiple`. Al vaciar con la \u00D7: `''` (o `[]`)."
|
|
958
1107
|
},
|
|
959
1108
|
"complexType": {
|
|
960
1109
|
"original": "string | string[]",
|
|
@@ -969,7 +1118,7 @@ export class CoSelect {
|
|
|
969
1118
|
"composed": true,
|
|
970
1119
|
"docs": {
|
|
971
1120
|
"tags": [],
|
|
972
|
-
"text": ""
|
|
1121
|
+
"text": "Se vaci\u00F3 la selecci\u00F3n con la \u00D7. Sin `detail`; le sigue un `coChange`."
|
|
973
1122
|
},
|
|
974
1123
|
"complexType": {
|
|
975
1124
|
"original": "void",
|
|
@@ -1001,7 +1150,8 @@ export class CoSelect {
|
|
|
1001
1150
|
}];
|
|
1002
1151
|
}
|
|
1003
1152
|
}
|
|
1004
|
-
|
|
1153
|
+
/** Filas visibles sin scroll. Es el mismo 8 del `max-height` de
|
|
1154
|
+
* `.co-select__options` (8 altos + 7 huecos): si cambia uno, cambia el otro. */
|
|
1005
1155
|
CoSelect.VIEWPORT_ITEMS = 8;
|
|
1006
1156
|
CoSelect.OVERSCAN = 3;
|
|
1007
1157
|
/** Ids del shadow root (únicos por instancia sin sufijos aleatorios).
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Geometría del virtualizador de filas de `co-select`, pura: recibe medidas y
|
|
3
|
+
* devuelve medidas, sin tocar el DOM (el componente es el que las lee del CSS).
|
|
4
|
+
*
|
|
5
|
+
* El paso de una fila es su ALTO más el HUECO hasta la siguiente. Los dos salen
|
|
6
|
+
* de los knobs del menú (`--co-select-option-height`, `--co-select-menu-gap`);
|
|
7
|
+
* sin ellos rige el paso de 0.10.x (ver `LEGACY_ROW_METRICS`).
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Paso histórico, el de 0.10.x: 34 px por fila, sin hueco. Las filas por defecto
|
|
11
|
+
* miden 32 (`min-height`), así que el virtualizador reserva 2 px de más por fila
|
|
12
|
+
* — la lista corta muestra ese sobrante como aire al pie del panel. Se conserva
|
|
13
|
+
* TAL CUAL para que ningún consumidor actual vea cambiar el alto de su menú; el
|
|
14
|
+
* que setea `--co-select-option-height` obtiene el paso exacto de sus filas. Es
|
|
15
|
+
* el mismo 34 del fallback del `max-height` de `.co-select__options`.
|
|
16
|
+
*/
|
|
17
|
+
export const LEGACY_ROW_METRICS = Object.freeze({ rowHeight: 34, gap: 0 });
|
|
18
|
+
const pitch = (m) => m.rowHeight + m.gap;
|
|
19
|
+
/** Alto de `count` filas apiladas: sin hueco colgando después de la última. */
|
|
20
|
+
export function listHeight(count, m) {
|
|
21
|
+
return count > 0 ? count * m.rowHeight + (count - 1) * m.gap : 0;
|
|
22
|
+
}
|
|
23
|
+
/** Ventana de filas a renderizar para un `scrollTop`, con `overscan` a cada lado. */
|
|
24
|
+
export function virtualSlice(total, scrollTop, m, viewportItems, overscan) {
|
|
25
|
+
const step = pitch(m);
|
|
26
|
+
const startIdx = Math.max(0, Math.floor(scrollTop / step) - overscan);
|
|
27
|
+
const endIdx = Math.min(total, startIdx + viewportItems + overscan * 2);
|
|
28
|
+
return { totalHeight: listHeight(total, m), startIdx, endIdx, offsetY: startIdx * step };
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* `scrollTop` que deja la fila `index` entera dentro de una ventana de
|
|
32
|
+
* `viewportItems` filas: si está arriba, la sube al borde superior; si está
|
|
33
|
+
* abajo, la pega al inferior; si ya se ve, no mueve nada.
|
|
34
|
+
*/
|
|
35
|
+
export function scrollTopToReveal(index, scrollTop, m, viewportItems) {
|
|
36
|
+
const top = index * pitch(m);
|
|
37
|
+
const bottom = top + m.rowHeight;
|
|
38
|
+
const viewportH = listHeight(viewportItems, m);
|
|
39
|
+
if (top < scrollTop)
|
|
40
|
+
return top;
|
|
41
|
+
if (bottom > scrollTop + viewportH)
|
|
42
|
+
return bottom - viewportH;
|
|
43
|
+
return scrollTop;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Medidas a partir de los knobs. `readPx` devuelve el valor en px de una custom
|
|
47
|
+
* property, o `null` si no está seteada o no se puede resolver a px. Lo que
|
|
48
|
+
* falte o sea inválido (alto ≤ 0, hueco < 0, NaN) cae al valor histórico.
|
|
49
|
+
*/
|
|
50
|
+
export function resolveRowMetrics(readPx) {
|
|
51
|
+
const h = readPx('--co-select-option-height');
|
|
52
|
+
const g = readPx('--co-select-menu-gap');
|
|
53
|
+
return {
|
|
54
|
+
rowHeight: h != null && h > 0 ? h : LEGACY_ROW_METRICS.rowHeight,
|
|
55
|
+
gap: g != null && g >= 0 ? g : LEGACY_ROW_METRICS.gap,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
+
/**
|
|
3
|
+
* Línea divisoria horizontal o vertical, con espaciado e inset opcionales y
|
|
4
|
+
* color/grosor configurables por prop. Wrapper Vue: `CoSeparator` de
|
|
5
|
+
* `@prolibu-suite/cobalt-vue`.
|
|
6
|
+
*
|
|
7
|
+
* @part separator - La línea.
|
|
8
|
+
*/
|
|
2
9
|
export class CoSeparator {
|
|
3
10
|
constructor() {
|
|
4
11
|
/** Orientation: horizontal (default) or vertical */
|
|
@@ -57,7 +64,7 @@ export class CoSeparator {
|
|
|
57
64
|
style['--co-separator-inset-end'] = '0px';
|
|
58
65
|
}
|
|
59
66
|
}
|
|
60
|
-
return (h("hr", { key: '
|
|
67
|
+
return (h("hr", { key: '1b15a22f07b7bf656d9b20b53d602bc7d47e3cf2', class: {
|
|
61
68
|
'co-separator': true,
|
|
62
69
|
'co-separator--vertical': this.vertical,
|
|
63
70
|
'co-separator--dark': this.dark,
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
/**
|
|
3
|
+
* Barra lateral de navegación con cabecera, cuerpo de ítems y pie. Wrapper Vue:
|
|
4
|
+
* `CoSidebar` de `@prolibu-suite/cobalt-vue`.
|
|
5
|
+
*
|
|
6
|
+
* @part sidebar - La barra completa.
|
|
7
|
+
* @part header - Área del slot `header`.
|
|
8
|
+
* @part body - Área de navegación (slot por defecto).
|
|
9
|
+
* @part footer - Área del slot `footer`.
|
|
10
|
+
*
|
|
3
11
|
* @slot header - Logo / branding area
|
|
4
12
|
* @slot - Navigation items (co-list-item, etc.)
|
|
5
13
|
* @slot footer - Bottom section
|
|
@@ -10,10 +18,10 @@ export class CoSidebar {
|
|
|
10
18
|
this.mode = 'full';
|
|
11
19
|
}
|
|
12
20
|
render() {
|
|
13
|
-
return (h("nav", { key: '
|
|
21
|
+
return (h("nav", { key: 'de782225d3dc1ef1def8af333a2a81809b50a84d', class: {
|
|
14
22
|
'co-sidebar': true,
|
|
15
23
|
[`co-sidebar--${this.mode}`]: true,
|
|
16
|
-
}, part: "sidebar" }, h("div", { key: '
|
|
24
|
+
}, part: "sidebar" }, h("div", { key: '7c4466bf0d14cba9ca008d0a1cf9c28972726301', class: "co-sidebar__header", part: "header" }, h("slot", { key: '1389f2fa757adcd7b97586534de4144f9b08d1a7', name: "header" })), h("div", { key: '298ea9f0183bb31b0a4b6d83053029b8f181fb7d', class: "co-sidebar__body", part: "body" }, h("slot", { key: 'f1c0c4b26b4be0441048f7f961529ce5371d4c6d' })), h("div", { key: '62666b4e1b9591c70196fccb73caf683925de906', class: "co-sidebar__footer", part: "footer" }, h("slot", { key: '83566f1745b802296b7db7b90032a3ca13849126', name: "footer" }))));
|
|
17
25
|
}
|
|
18
26
|
static get is() { return "co-sidebar"; }
|
|
19
27
|
static get encapsulation() { return "shadow"; }
|