@prolibu-suite/cobalt-core 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +19263 -11548
- package/dist/cjs/co-accordion.cjs.entry.js +3 -3
- package/dist/cjs/co-app-shell.cjs.entry.js +4 -4
- package/dist/cjs/co-autocomplete.cjs.entry.js +10 -7
- package/dist/cjs/co-avatar-group.cjs.entry.js +77 -0
- package/dist/cjs/co-avatar.cjs.entry.js +12 -5
- package/dist/cjs/co-badge.cjs.entry.js +2 -2
- package/dist/cjs/co-bottom-sheet.cjs.entry.js +325 -0
- package/dist/cjs/co-breadcrumb-item.cjs.entry.js +37 -0
- package/dist/cjs/co-breadcrumb.cjs.entry.js +55 -0
- package/dist/cjs/co-button-group.cjs.entry.js +3 -3
- package/dist/cjs/co-button.cjs.entry.js +12 -6
- package/dist/cjs/co-calendar-month.cjs.entry.js +381 -0
- package/dist/cjs/co-calendar_3.cjs.entry.js +41 -11
- package/dist/cjs/co-card.cjs.entry.js +3 -3
- package/dist/cjs/co-checkbox-group.cjs.entry.js +5 -5
- package/dist/cjs/co-checkbox.cjs.entry.js +18 -6
- package/dist/cjs/co-chip.cjs.entry.js +19 -11
- package/dist/cjs/co-color-picker.cjs.entry.js +7 -5
- package/dist/cjs/co-column-picker.cjs.entry.js +3 -3
- package/dist/cjs/co-combobox.cjs.entry.js +7 -7
- package/dist/cjs/co-command-search.cjs.entry.js +151 -12
- package/dist/cjs/co-data-table-pagination.cjs.entry.js +5 -5
- package/dist/cjs/co-data-table.cjs.entry.js +44 -23
- package/dist/cjs/co-date-picker.cjs.entry.js +2 -2
- package/dist/cjs/co-date-range-picker.cjs.entry.js +3 -3
- package/dist/cjs/co-date-range.cjs.entry.js +2 -2
- package/dist/cjs/co-drive-card.cjs.entry.js +81 -0
- package/dist/cjs/co-drop-zone.cjs.entry.js +63 -0
- package/dist/cjs/co-empty-state.cjs.entry.js +13 -3
- package/dist/cjs/co-event-calendar.cjs.entry.js +318 -0
- package/dist/cjs/co-fab.cjs.entry.js +3 -3
- package/dist/cjs/co-file-field.cjs.entry.js +8 -8
- package/dist/cjs/co-file-type-tile.cjs.entry.js +78 -0
- package/dist/cjs/co-helper-text.cjs.entry.js +3 -3
- package/dist/cjs/co-icon-button.cjs.entry.js +24 -8
- package/dist/cjs/co-icon.cjs.entry.js +33 -25
- package/dist/cjs/co-input.cjs.entry.js +36 -7
- package/dist/cjs/co-json-field.cjs.entry.js +10 -6
- package/dist/cjs/co-lightbox.cjs.entry.js +5 -5
- package/dist/cjs/co-list-footer.cjs.entry.js +25 -0
- package/dist/cjs/co-list-item.cjs.entry.js +60 -4
- package/dist/cjs/co-loader.cjs.entry.js +2 -2
- package/dist/cjs/co-media-thumb.cjs.entry.js +36 -0
- package/dist/cjs/co-menu-divider.cjs.entry.js +2 -2
- package/dist/cjs/co-menu-item.cjs.entry.js +26 -11
- package/dist/cjs/co-menu.cjs.entry.js +3 -3
- package/dist/cjs/co-modal.cjs.entry.js +41 -5
- package/dist/cjs/co-navbar.cjs.entry.js +3 -3
- package/dist/cjs/co-number-field.cjs.entry.js +18 -6
- package/dist/cjs/co-option-list.cjs.entry.js +379 -0
- package/dist/cjs/co-overlay.cjs.entry.js +243 -3
- package/dist/cjs/co-page-header.cjs.entry.js +2 -2
- package/dist/cjs/co-phone-field.cjs.entry.js +6 -4
- package/dist/cjs/co-popover.cjs.entry.js +45 -14
- package/dist/cjs/co-progress-bar.cjs.entry.js +8 -4
- package/dist/cjs/co-progress-circle.cjs.entry.js +3 -3
- 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 +4 -4
- package/dist/cjs/co-ref-field.cjs.entry.js +36 -13
- package/dist/cjs/co-rich-text-editor.cjs.entry.js +1879 -33
- package/dist/cjs/co-rich-text-toolbar.cjs.entry.js +995 -71
- package/dist/cjs/co-rich-text-viewer.cjs.entry.js +55 -19
- package/dist/cjs/co-row.cjs.entry.js +3 -3
- package/dist/cjs/co-segmented-bar.cjs.entry.js +58 -0
- package/dist/cjs/co-select.cjs.entry.js +8 -8
- package/dist/cjs/co-separator.cjs.entry.js +2 -2
- package/dist/cjs/co-sidebar-nav.cjs.entry.js +29 -9
- package/dist/cjs/co-sidebar.cjs.entry.js +3 -3
- package/dist/cjs/co-skeleton.cjs.entry.js +26 -0
- package/dist/cjs/co-slider.cjs.entry.js +3 -3
- package/dist/cjs/co-switch.cjs.entry.js +6 -6
- package/dist/cjs/co-tab-group.cjs.entry.js +15 -3
- package/dist/cjs/co-tab.cjs.entry.js +8 -5
- package/dist/cjs/co-tags-field.cjs.entry.js +19 -13
- package/dist/cjs/co-textarea.cjs.entry.js +11 -7
- package/dist/cjs/co-toast.cjs.entry.js +10 -4
- package/dist/cjs/co-toggle-button-group.cjs.entry.js +16 -4
- package/dist/cjs/co-toggle-button.cjs.entry.js +9 -5
- package/dist/cjs/co-tooltip.cjs.entry.js +51 -16
- package/dist/cjs/co-transfer-list.cjs.entry.js +3 -3
- package/dist/cjs/co-video.cjs.entry.js +839 -0
- package/dist/cjs/cobalt.cjs.js +2 -2
- package/dist/cjs/fieldChip-DtYUP0VZ.js +7 -0
- package/dist/{esm/index-BjAqSidM.js → cjs/index-4y1Dm145.js} +14436 -6178
- package/dist/cjs/{index-DoFnrUVH.js → index-NNvye1ul.js} +105 -21
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/overlayAfterClose-BdeXrhVY.js +12 -0
- package/dist/{esm/sanitizer-DcK0GGZC.js → cjs/purify.es-DX41ZWS2.js} +3 -107
- package/dist/cjs/{requiredMark-DA6y-4rp.js → requiredMark-DyjZzUCd.js} +1 -1
- package/dist/cjs/richTextI18n-B7ktXg3M.js +382 -0
- package/dist/cjs/toolbar-config-3PlT-3zm.js +216 -0
- package/dist/cjs/tz-Dgom0W69.js +127 -0
- package/dist/cobalt/cobalt.css +1 -1
- package/dist/cobalt/cobalt.esm.js +1 -1
- package/dist/cobalt/p-06c27cc5.entry.js +1 -0
- package/dist/cobalt/{p-136bdbd2.entry.js → p-075f6ca4.entry.js} +1 -1
- package/dist/cobalt/p-0810ee1e.entry.js +1 -0
- package/dist/cobalt/p-08519a7c.entry.js +1 -0
- package/dist/cobalt/p-0b41e76e.entry.js +1 -0
- package/dist/cobalt/p-0be124d5.entry.js +1 -0
- package/dist/cobalt/{p-e8b58332.entry.js → p-0e1afdea.entry.js} +1 -1
- package/dist/cobalt/p-1388eac6.entry.js +1 -0
- package/dist/cobalt/{p-7f818368.entry.js → p-19f7ee64.entry.js} +1 -1
- package/dist/cobalt/p-1af6ef83.entry.js +1 -0
- package/dist/cobalt/{p-f2c5cb74.entry.js → p-1cecb9e1.entry.js} +1 -1
- package/dist/cobalt/{p-273afd93.entry.js → p-20c68308.entry.js} +1 -1
- package/dist/cobalt/p-21916f82.entry.js +1 -0
- package/dist/cobalt/p-23c9208a.entry.js +1 -0
- package/dist/cobalt/p-2d4e1ca8.entry.js +1 -0
- package/dist/cobalt/{p-def448e4.entry.js → p-304c3be1.entry.js} +1 -1
- package/dist/cobalt/p-311118cb.entry.js +1 -0
- package/dist/cobalt/{p-2b4d8535.entry.js → p-328f0470.entry.js} +1 -1
- package/dist/cobalt/p-35c63fdc.entry.js +1 -0
- package/dist/cobalt/{p-f97ad9ad.entry.js → p-363a5262.entry.js} +1 -1
- package/dist/cobalt/p-376c43b8.entry.js +1 -0
- package/dist/cobalt/p-39a29bbb.entry.js +1 -0
- package/dist/cobalt/p-3d07e4a9.entry.js +1 -0
- package/dist/cobalt/{p-1e0282b8.entry.js → p-3dd6b57b.entry.js} +1 -1
- package/dist/cobalt/{p-7ef766c6.entry.js → p-48c5f311.entry.js} +1 -1
- package/dist/cobalt/{p-fe9e85b6.entry.js → p-4aeefe3f.entry.js} +1 -1
- package/dist/cobalt/p-523cfd98.entry.js +1 -0
- package/dist/cobalt/{p-c87285b6.entry.js → p-58aed8d6.entry.js} +1 -1
- package/dist/cobalt/p-593fd213.entry.js +1 -0
- package/dist/cobalt/p-5eecea26.entry.js +1 -0
- package/dist/cobalt/p-64a0b656.entry.js +1 -0
- package/dist/cobalt/p-69289e82.entry.js +1 -0
- package/dist/cobalt/p-6a3ed174.entry.js +1 -0
- package/dist/cobalt/p-6f12e721.entry.js +1 -0
- package/dist/cobalt/{p-3f9b3fcb.entry.js → p-7040e4c5.entry.js} +1 -1
- package/dist/cobalt/p-755ecee1.entry.js +1 -0
- package/dist/cobalt/p-76b46336.entry.js +1 -0
- package/dist/cobalt/p-79e49749.entry.js +1 -0
- package/dist/cobalt/p-7b5dec05.entry.js +1 -0
- package/dist/cobalt/p-7d9f2021.entry.js +1 -0
- package/dist/cobalt/p-804d025f.entry.js +1 -0
- package/dist/cobalt/p-860a685f.entry.js +1 -0
- package/dist/cobalt/p-87289d32.entry.js +1 -0
- package/dist/cobalt/{p-b758c2e6.entry.js → p-8ae5da0c.entry.js} +1 -1
- package/dist/cobalt/{p-ff2690e5.entry.js → p-8fdf2163.entry.js} +1 -1
- package/dist/cobalt/p-9310739f.entry.js +1 -0
- package/dist/cobalt/{p-522fcdb7.entry.js → p-96baec0e.entry.js} +1 -1
- package/dist/cobalt/p-B-ckjCUA.js +1 -0
- package/dist/cobalt/p-B2QLgWrz.js +2 -0
- package/dist/cobalt/p-B6JZk8fL.js +1 -0
- package/dist/cobalt/p-BUgUTjOB.js +1 -0
- package/dist/cobalt/p-Bgxofdfb.js +1 -0
- package/dist/cobalt/p-BxzuCRMr.js +1 -0
- package/dist/cobalt/p-Ch1jfwZ2.js +1 -0
- package/dist/cobalt/p-ChibIpZv.js +1 -0
- package/dist/cobalt/p-Es9IUmmt.js +2 -0
- package/dist/cobalt/p-a0749d7b.entry.js +1 -0
- package/dist/cobalt/p-a71fd4f1.entry.js +1 -0
- package/dist/cobalt/p-aa1ad9fa.entry.js +1 -0
- package/dist/cobalt/p-af0495d8.entry.js +1 -0
- package/dist/cobalt/p-b045d680.entry.js +1 -0
- package/dist/cobalt/p-b3c8fc9a.entry.js +1 -0
- package/dist/cobalt/p-b4dcc260.entry.js +1 -0
- package/dist/cobalt/p-b8200f7f.entry.js +1 -0
- package/dist/cobalt/p-b8f36f12.entry.js +1 -0
- package/dist/cobalt/p-ba6f0f90.entry.js +1 -0
- package/dist/cobalt/p-bae82095.entry.js +1 -0
- package/dist/cobalt/p-be3e61f4.entry.js +1 -0
- package/dist/cobalt/p-c1abc74b.entry.js +1 -0
- package/dist/cobalt/{p-bb07da22.entry.js → p-c23a2ff6.entry.js} +1 -1
- package/dist/cobalt/p-c682453a.entry.js +1 -0
- package/dist/cobalt/{p-97c20011.entry.js → p-c857b9ff.entry.js} +1 -1
- package/dist/cobalt/{p-54f26e95.entry.js → p-c85a6a9e.entry.js} +1 -1
- package/dist/cobalt/p-ca108c6d.entry.js +1 -0
- package/dist/cobalt/p-cf239452.entry.js +1 -0
- package/dist/cobalt/p-d2507f04.entry.js +1 -0
- package/dist/cobalt/p-d403d9c4.entry.js +1 -0
- package/dist/cobalt/{p-aa63812a.entry.js → p-d4086c34.entry.js} +1 -1
- package/dist/cobalt/p-d55652f2.entry.js +1 -0
- package/dist/cobalt/p-d7c9cf93.entry.js +1 -0
- package/dist/cobalt/p-d7cbb4c7.entry.js +1 -0
- package/dist/cobalt/p-da211abf.entry.js +1 -0
- package/dist/cobalt/p-dcc7fc95.entry.js +1 -0
- package/dist/cobalt/p-dd03c00b.entry.js +1 -0
- package/dist/cobalt/p-e55fb916.entry.js +1 -0
- package/dist/cobalt/p-e8e752f9.entry.js +1 -0
- package/dist/cobalt/p-e93644cb.entry.js +1 -0
- package/dist/cobalt/{p-f0e8fa7d.entry.js → p-f6b93f17.entry.js} +1 -1
- package/dist/cobalt/p-f72f0e38.entry.js +1 -0
- package/dist/cobalt/{p-beb9c11d.entry.js → p-fb86cdb9.entry.js} +1 -1
- package/dist/cobalt/p-ff6be242.entry.js +1 -0
- package/dist/cobalt/{p-CyYF8IJE.js → p-tPYikBRJ.js} +1 -1
- package/dist/collection/collection-manifest.json +18 -3
- package/dist/collection/components/co-accordion/co-accordion.js +2 -2
- package/dist/collection/components/co-app-shell/co-app-shell.css +79 -6
- package/dist/collection/components/co-app-shell/co-app-shell.js +2 -2
- package/dist/collection/components/co-autocomplete/co-autocomplete.css +28 -1
- package/dist/collection/components/co-autocomplete/co-autocomplete.js +27 -4
- package/dist/collection/components/co-avatar/co-avatar.css +38 -1
- package/dist/collection/components/co-avatar/co-avatar.js +48 -3
- package/dist/collection/components/co-avatar-group/co-avatar-group.css +86 -0
- package/dist/collection/components/co-avatar-group/co-avatar-group.js +224 -0
- package/dist/collection/components/co-badge/co-badge.js +1 -1
- package/dist/collection/components/co-bottom-sheet/co-bottom-sheet.css +136 -0
- package/dist/collection/components/co-bottom-sheet/co-bottom-sheet.js +507 -0
- package/dist/collection/components/co-breadcrumb/co-breadcrumb.css +6 -0
- package/dist/collection/components/co-breadcrumb/co-breadcrumb.js +111 -0
- package/dist/collection/components/co-breadcrumb-item/co-breadcrumb-item.css +66 -0
- package/dist/collection/components/co-breadcrumb-item/co-breadcrumb-item.js +169 -0
- package/dist/collection/components/co-button/co-button.css +63 -7
- package/dist/collection/components/co-button/co-button.js +72 -7
- package/dist/collection/components/co-button-group/co-button-group.js +2 -2
- package/dist/collection/components/co-calendar/co-calendar.js +1 -1
- package/dist/collection/components/co-calendar-month/co-calendar-month.css +231 -0
- package/dist/collection/components/co-calendar-month/co-calendar-month.js +594 -0
- package/dist/collection/components/co-card/co-card.js +2 -2
- package/dist/collection/components/co-checkbox/co-checkbox.css +70 -1
- package/dist/collection/components/co-checkbox/co-checkbox.js +58 -7
- package/dist/collection/components/co-checkbox-group/co-checkbox-group.css +7 -1
- package/dist/collection/components/co-checkbox-group/co-checkbox-group.js +3 -3
- package/dist/collection/components/co-chip/co-chip.css +82 -7
- package/dist/collection/components/co-chip/co-chip.js +102 -17
- package/dist/collection/components/co-color-picker/co-color-picker.css +35 -1
- package/dist/collection/components/co-color-picker/co-color-picker.js +24 -2
- package/dist/collection/components/co-column-picker/co-column-picker.js +2 -2
- package/dist/collection/components/co-combobox/co-combobox.css +7 -47
- package/dist/collection/components/co-combobox/co-combobox.js +4 -4
- package/dist/collection/components/co-command-search/co-command-search.css +163 -1
- package/dist/collection/components/co-command-search/co-command-search.js +355 -14
- package/dist/collection/components/co-command-search/commandSearchGroup.js +17 -0
- package/dist/collection/components/co-command-search/commandSearchLogic.js +27 -0
- package/dist/collection/components/co-data-table/co-data-table.css +42 -2
- package/dist/collection/components/co-data-table/co-data-table.js +116 -23
- package/dist/collection/components/co-data-table-pagination/co-data-table-pagination.js +4 -4
- package/dist/collection/components/co-date-field/co-date-field.css +7 -1
- package/dist/collection/components/co-date-field/co-date-field.js +4 -4
- package/dist/collection/components/co-date-range/co-date-range.js +1 -1
- package/dist/collection/components/co-date-range-picker/co-date-range-picker.css +7 -1
- package/dist/collection/components/co-drawer/co-drawer.css +21 -3
- package/dist/collection/components/co-drawer/co-drawer.js +52 -2
- package/dist/collection/components/co-drive-card/co-drive-card.css +285 -0
- package/dist/collection/components/co-drive-card/co-drive-card.js +329 -0
- package/dist/collection/components/co-drop-zone/co-drop-zone.css +49 -0
- package/dist/collection/components/co-drop-zone/co-drop-zone.js +197 -0
- package/dist/collection/components/co-empty-state/co-empty-state.css +38 -0
- package/dist/collection/components/co-empty-state/co-empty-state.js +72 -1
- package/dist/collection/components/co-event-calendar/co-event-calendar.css +146 -0
- package/dist/collection/components/co-event-calendar/co-event-calendar.js +620 -0
- package/dist/collection/components/co-fab/co-fab.js +2 -2
- package/dist/collection/components/co-file-field/co-file-field.css +7 -1
- package/dist/collection/components/co-file-field/co-file-field.js +5 -5
- package/dist/collection/components/co-file-type-tile/co-file-type-tile.css +14 -0
- package/dist/collection/components/co-file-type-tile/co-file-type-tile.js +164 -0
- package/dist/collection/components/co-helper-text/co-helper-text.js +2 -2
- package/dist/collection/components/co-icon/co-icon.js +7 -37
- package/dist/collection/components/co-icon/iconLoader.js +39 -0
- package/dist/collection/components/co-icon-button/co-icon-button.css +26 -8
- package/dist/collection/components/co-icon-button/co-icon-button.js +82 -8
- package/dist/collection/components/co-input/co-input.css +65 -1
- package/dist/collection/components/co-input/co-input.js +54 -5
- package/dist/collection/components/co-json-field/co-json-field.css +25 -1
- package/dist/collection/components/co-json-field/co-json-field.js +27 -3
- package/dist/collection/components/co-lightbox/co-lightbox.js +4 -4
- package/dist/collection/components/co-list-footer/co-list-footer.css +50 -0
- package/dist/collection/components/co-list-footer/co-list-footer.js +149 -0
- package/dist/collection/components/co-list-item/co-list-item.css +7 -0
- package/dist/collection/components/co-list-item/co-list-item.js +65 -2
- package/dist/collection/components/co-loader/co-loader.css +9 -0
- package/dist/collection/components/co-media-thumb/co-media-thumb.css +43 -0
- package/dist/collection/components/co-media-thumb/co-media-thumb.js +148 -0
- package/dist/collection/components/co-menu/co-menu.css +6 -4
- package/dist/collection/components/co-menu/co-menu.js +20 -1
- package/dist/collection/components/co-menu-divider/co-menu-divider.js +1 -1
- package/dist/collection/components/co-menu-item/co-menu-item.css +44 -8
- package/dist/collection/components/co-menu-item/co-menu-item.js +84 -10
- package/dist/collection/components/co-modal/co-modal.css +59 -2
- package/dist/collection/components/co-modal/co-modal.js +99 -6
- package/dist/collection/components/co-navbar/co-navbar.js +2 -2
- package/dist/collection/components/co-number-field/co-number-field.css +19 -1
- package/dist/collection/components/co-number-field/co-number-field.js +34 -3
- package/dist/collection/components/co-option-list/co-option-list.css +228 -0
- package/dist/collection/components/co-option-list/co-option-list.js +860 -0
- package/dist/collection/components/co-option-list/optionListLogic.js +100 -0
- package/dist/collection/components/co-overlay/co-overlay.css +15 -1
- package/dist/collection/components/co-overlay/co-overlay.js +266 -1
- package/dist/collection/components/co-overlay/focusTrap.js +53 -0
- package/dist/collection/components/co-overlay/overlayAfterClose.js +8 -0
- package/dist/collection/components/co-page-header/co-page-header.js +1 -1
- package/dist/collection/components/co-phone-field/co-phone-field.css +30 -2
- package/dist/collection/components/co-phone-field/co-phone-field.js +23 -1
- package/dist/collection/components/co-popover/co-popover.css +9 -0
- package/dist/collection/components/co-popover/co-popover.js +43 -12
- package/dist/collection/components/co-progress-bar/co-progress-bar.css +22 -0
- package/dist/collection/components/co-progress-bar/co-progress-bar.js +26 -2
- package/dist/collection/components/co-progress-circle/co-progress-circle.js +2 -2
- package/dist/collection/components/co-radio/co-radio.js +3 -3
- package/dist/collection/components/co-radio-group/co-radio-group.js +3 -3
- package/dist/collection/components/co-rating/co-rating.js +3 -3
- package/dist/collection/components/co-ref-field/co-ref-field.css +64 -6
- package/dist/collection/components/co-ref-field/co-ref-field.js +0 -0
- package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.css +1125 -41
- package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.js +2008 -53
- package/dist/collection/components/co-rich-text-toolbar/co-rich-text-toolbar.css +791 -9
- package/dist/collection/components/co-rich-text-toolbar/co-rich-text-toolbar.js +1071 -71
- package/dist/collection/components/co-rich-text-viewer/co-rich-text-viewer.css +78 -0
- package/dist/collection/components/co-rich-text-viewer/co-rich-text-viewer.js +46 -41
- package/dist/collection/components/co-row/co-row.js +2 -2
- package/dist/collection/components/co-segmented-bar/co-segmented-bar.css +36 -0
- package/dist/collection/components/co-segmented-bar/co-segmented-bar.js +176 -0
- package/dist/collection/components/co-select/co-select.css +7 -1
- package/dist/collection/components/co-select/co-select.js +5 -5
- package/dist/collection/components/co-separator/co-separator.js +1 -1
- package/dist/collection/components/co-sidebar/co-sidebar.js +2 -2
- package/dist/collection/components/co-sidebar-nav/co-sidebar-nav.css +99 -12
- package/dist/collection/components/co-sidebar-nav/co-sidebar-nav.js +28 -8
- package/dist/collection/components/co-skeleton/co-skeleton.css +28 -0
- package/dist/collection/components/co-skeleton/co-skeleton.js +97 -0
- package/dist/collection/components/co-slider/co-slider.js +2 -2
- package/dist/collection/components/co-switch/co-switch.css +9 -1
- package/dist/collection/components/co-switch/co-switch.js +3 -3
- package/dist/collection/components/co-tab/co-tab.css +54 -3
- package/dist/collection/components/co-tab/co-tab.js +45 -3
- package/dist/collection/components/co-tab-group/co-tab-group.css +8 -0
- package/dist/collection/components/co-tab-group/co-tab-group.js +35 -1
- package/dist/collection/components/co-tags-field/co-tags-field.css +39 -1
- package/dist/collection/components/co-tags-field/co-tags-field.js +36 -10
- package/dist/collection/components/co-textarea/co-textarea.css +26 -1
- package/dist/collection/components/co-textarea/co-textarea.js +28 -4
- package/dist/collection/components/co-toast/co-toast.css +56 -2
- package/dist/collection/components/co-toast/co-toast.js +27 -2
- package/dist/collection/components/co-toggle-button/co-toggle-button.css +64 -4
- package/dist/collection/components/co-toggle-button/co-toggle-button.js +47 -4
- package/dist/collection/components/co-toggle-button-group/co-toggle-button-group.css +32 -12
- package/dist/collection/components/co-toggle-button-group/co-toggle-button-group.js +34 -2
- package/dist/collection/components/co-tooltip/co-tooltip.css +8 -0
- package/dist/collection/components/co-tooltip/co-tooltip.js +69 -14
- package/dist/collection/components/co-transfer-list/co-transfer-list.js +2 -2
- package/dist/collection/components/co-video/co-video.css +497 -0
- package/dist/collection/components/co-video/co-video.js +1772 -0
- package/dist/collection/utils/fieldChip.js +2 -0
- package/dist/collection/utils/icon-config.js +12 -0
- package/dist/collection/utils/richTextI18n.js +378 -0
- package/dist/collection/utils/sheetGesture.js +53 -0
- package/dist/components/co-accordion.js +1 -1
- package/dist/components/co-app-shell.js +1 -1
- package/dist/components/co-autocomplete.js +1 -1
- package/dist/components/co-avatar-group.d.ts +11 -0
- package/dist/components/co-avatar-group.js +1 -0
- package/dist/components/co-avatar.js +1 -1
- package/dist/components/co-badge.js +1 -1
- package/dist/components/co-bottom-sheet.d.ts +11 -0
- package/dist/components/co-bottom-sheet.js +1 -0
- package/dist/components/co-breadcrumb-item.d.ts +11 -0
- package/dist/components/co-breadcrumb-item.js +1 -0
- package/dist/components/co-breadcrumb.d.ts +11 -0
- package/dist/components/co-breadcrumb.js +1 -0
- package/dist/components/co-button-group.js +1 -1
- package/dist/components/co-button.js +1 -1
- package/dist/components/co-calendar-month.d.ts +11 -0
- package/dist/components/co-calendar-month.js +1 -0
- package/dist/components/co-calendar.js +1 -1
- package/dist/components/co-card.js +1 -1
- package/dist/components/co-checkbox-group.js +1 -1
- package/dist/components/co-checkbox.js +1 -1
- package/dist/components/co-chip.js +1 -1
- package/dist/components/co-color-picker.js +1 -1
- package/dist/components/co-column-picker.js +1 -1
- package/dist/components/co-combobox.js +1 -1
- package/dist/components/co-command-search.js +1 -1
- package/dist/components/co-data-table-pagination.js +1 -1
- package/dist/components/co-data-table.js +1 -1
- package/dist/components/co-date-field.js +1 -1
- package/dist/components/co-date-picker.js +1 -1
- package/dist/components/co-date-range-picker.js +1 -1
- package/dist/components/co-date-range.js +1 -1
- package/dist/components/co-drawer.js +1 -1
- package/dist/components/co-drive-card.d.ts +11 -0
- package/dist/components/co-drive-card.js +1 -0
- package/dist/components/co-drop-zone.d.ts +11 -0
- package/dist/components/co-drop-zone.js +1 -0
- package/dist/components/co-empty-state.js +1 -1
- package/dist/components/co-event-calendar.d.ts +11 -0
- package/dist/components/co-event-calendar.js +1 -0
- package/dist/components/co-fab.js +1 -1
- package/dist/components/co-file-field.js +1 -1
- package/dist/components/co-file-type-tile.d.ts +11 -0
- package/dist/components/co-file-type-tile.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-lightbox.js +1 -1
- package/dist/components/co-list-footer.d.ts +11 -0
- package/dist/components/co-list-footer.js +1 -0
- package/dist/components/co-list-item.js +1 -1
- package/dist/components/co-loader.js +1 -1
- package/dist/components/co-media-thumb.d.ts +11 -0
- package/dist/components/co-media-thumb.js +1 -0
- 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.d.ts +11 -0
- package/dist/components/co-option-list.js +1 -0
- 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.d.ts +11 -0
- package/dist/components/co-segmented-bar.js +1 -0
- 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.d.ts +11 -0
- package/dist/components/co-skeleton.js +1 -0
- package/dist/components/co-slider.js +1 -1
- package/dist/components/co-switch.js +1 -1
- package/dist/components/co-tab-group.js +1 -1
- package/dist/components/co-tab.js +1 -1
- package/dist/components/co-tags-field.js +1 -1
- package/dist/components/co-textarea.js +1 -1
- package/dist/components/co-toast.js +1 -1
- package/dist/components/co-toggle-button-group.js +1 -1
- package/dist/components/co-toggle-button.js +1 -1
- package/dist/components/co-tooltip.js +1 -1
- package/dist/components/co-transfer-list.js +1 -1
- package/dist/components/co-video.d.ts +11 -0
- package/dist/components/co-video.js +1 -0
- package/dist/components/index.js +1 -1
- package/dist/components/p-B0buzt_E.js +1 -0
- package/dist/components/p-B2QLgWrz.js +2 -0
- package/dist/components/p-B3igDRut.js +1 -0
- package/dist/components/p-Bgxofdfb.js +1 -0
- package/dist/components/p-BhSJcOUS.js +1 -0
- package/dist/components/{p-DObrQi5F.js → p-BnTTeIFH.js} +1 -1
- package/dist/components/{p-C9tHLXKS.js → p-Bx1OwdIV.js} +1 -1
- package/dist/components/p-BxiKVtk4.js +1 -0
- package/dist/components/p-C7tPadNy.js +1 -0
- package/dist/components/p-CBzpUqwG.js +1 -0
- package/dist/components/p-CUvAZhuM.js +1 -0
- package/dist/components/p-CZKHHCdL.js +1 -0
- package/dist/components/p-ChibIpZv.js +1 -0
- package/dist/components/p-CybHxq25.js +1 -0
- package/dist/components/p-CzkeIavk.js +1 -0
- package/dist/components/p-D7dk2gM7.js +1 -0
- package/dist/components/p-DTS-dgEe.js +1 -0
- package/dist/components/p-DvhR3H61.js +1 -0
- package/dist/components/{p-OGpfa9Yd.js → p-DzoNGEDU.js} +1 -1
- package/dist/components/{p-BeWXpX8I.js → p-HXlAaApx.js} +1 -1
- package/dist/components/p-K6LC1Hz4.js +1 -0
- package/dist/components/p-LAxCvyJl.js +1 -0
- package/dist/components/p-vLFwJ77w.js +1 -0
- package/dist/esm/co-accordion.entry.js +3 -3
- package/dist/esm/co-app-shell.entry.js +4 -4
- package/dist/esm/co-autocomplete.entry.js +10 -7
- package/dist/esm/co-avatar-group.entry.js +75 -0
- package/dist/esm/co-avatar.entry.js +12 -5
- package/dist/esm/co-badge.entry.js +2 -2
- package/dist/esm/co-bottom-sheet.entry.js +323 -0
- package/dist/esm/co-breadcrumb-item.entry.js +35 -0
- package/dist/esm/co-breadcrumb.entry.js +53 -0
- package/dist/esm/co-button-group.entry.js +3 -3
- package/dist/esm/co-button.entry.js +12 -6
- package/dist/esm/co-calendar-month.entry.js +379 -0
- package/dist/esm/co-calendar_3.entry.js +42 -12
- package/dist/esm/co-card.entry.js +3 -3
- package/dist/esm/co-checkbox-group.entry.js +5 -5
- package/dist/esm/co-checkbox.entry.js +18 -6
- package/dist/esm/co-chip.entry.js +19 -11
- package/dist/esm/co-color-picker.entry.js +7 -5
- package/dist/esm/co-column-picker.entry.js +3 -3
- package/dist/esm/co-combobox.entry.js +7 -7
- package/dist/esm/co-command-search.entry.js +151 -12
- package/dist/esm/co-data-table-pagination.entry.js +5 -5
- package/dist/esm/co-data-table.entry.js +44 -23
- package/dist/esm/co-date-picker.entry.js +2 -2
- package/dist/esm/co-date-range-picker.entry.js +4 -4
- package/dist/esm/co-date-range.entry.js +2 -2
- package/dist/esm/co-drive-card.entry.js +79 -0
- package/dist/esm/co-drop-zone.entry.js +61 -0
- package/dist/esm/co-empty-state.entry.js +13 -3
- package/dist/esm/co-event-calendar.entry.js +316 -0
- package/dist/esm/co-fab.entry.js +3 -3
- package/dist/esm/co-file-field.entry.js +8 -8
- package/dist/esm/co-file-type-tile.entry.js +76 -0
- package/dist/esm/co-helper-text.entry.js +3 -3
- package/dist/esm/co-icon-button.entry.js +24 -8
- package/dist/esm/co-icon.entry.js +33 -25
- package/dist/esm/co-input.entry.js +36 -7
- package/dist/esm/co-json-field.entry.js +10 -6
- package/dist/esm/co-lightbox.entry.js +5 -5
- package/dist/esm/co-list-footer.entry.js +23 -0
- package/dist/esm/co-list-item.entry.js +60 -4
- package/dist/esm/co-loader.entry.js +2 -2
- package/dist/esm/co-media-thumb.entry.js +34 -0
- package/dist/esm/co-menu-divider.entry.js +2 -2
- package/dist/esm/co-menu-item.entry.js +26 -11
- package/dist/esm/co-menu.entry.js +3 -3
- package/dist/esm/co-modal.entry.js +41 -5
- package/dist/esm/co-navbar.entry.js +3 -3
- package/dist/esm/co-number-field.entry.js +18 -6
- package/dist/esm/co-option-list.entry.js +377 -0
- package/dist/esm/co-overlay.entry.js +243 -3
- package/dist/esm/co-page-header.entry.js +2 -2
- package/dist/esm/co-phone-field.entry.js +6 -4
- package/dist/esm/co-popover.entry.js +45 -14
- package/dist/esm/co-progress-bar.entry.js +8 -4
- package/dist/esm/co-progress-circle.entry.js +3 -3
- 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 +4 -4
- package/dist/esm/co-ref-field.entry.js +36 -13
- package/dist/esm/co-rich-text-editor.entry.js +1879 -33
- package/dist/esm/co-rich-text-toolbar.entry.js +995 -71
- package/dist/esm/co-rich-text-viewer.entry.js +55 -19
- package/dist/esm/co-row.entry.js +3 -3
- package/dist/esm/co-segmented-bar.entry.js +56 -0
- package/dist/esm/co-select.entry.js +8 -8
- package/dist/esm/co-separator.entry.js +2 -2
- package/dist/esm/co-sidebar-nav.entry.js +29 -9
- package/dist/esm/co-sidebar.entry.js +3 -3
- package/dist/esm/co-skeleton.entry.js +24 -0
- package/dist/esm/co-slider.entry.js +3 -3
- package/dist/esm/co-switch.entry.js +6 -6
- package/dist/esm/co-tab-group.entry.js +15 -3
- package/dist/esm/co-tab.entry.js +8 -5
- package/dist/esm/co-tags-field.entry.js +19 -13
- package/dist/esm/co-textarea.entry.js +11 -7
- package/dist/esm/co-toast.entry.js +10 -4
- package/dist/esm/co-toggle-button-group.entry.js +16 -4
- package/dist/esm/co-toggle-button.entry.js +9 -5
- package/dist/esm/co-tooltip.entry.js +51 -16
- package/dist/esm/co-transfer-list.entry.js +3 -3
- package/dist/esm/co-video.entry.js +837 -0
- package/dist/esm/cobalt.js +3 -3
- package/dist/esm/{dates-CyYF8IJE.js → dates-tPYikBRJ.js} +1 -1
- package/dist/esm/fieldChip-BBu4ukje.js +5 -0
- package/dist/{cjs/index-CaEJnpZe.js → esm/index-Cyrxk8Qq.js} +14437 -6194
- package/dist/esm/{index-BKmfyPZK.js → index-Es9IUmmt.js} +105 -21
- package/dist/esm/loader.js +3 -3
- package/dist/esm/overlayAfterClose-Ch1jfwZ2.js +10 -0
- package/dist/{cjs/sanitizer-CjHZAkOm.js → esm/purify.es-B2QLgWrz.js} +1 -110
- package/dist/esm/{requiredMark-DFvtYtkE.js → requiredMark-Bg25QWFn.js} +1 -1
- package/dist/esm/richTextI18n-B-ckjCUA.js +380 -0
- package/dist/esm/toolbar-config-ChibIpZv.js +212 -0
- package/dist/esm/tz-B6JZk8fL.js +119 -0
- package/dist/types/components/co-autocomplete/co-autocomplete.d.ts +2 -0
- package/dist/types/components/co-avatar/co-avatar.d.ts +4 -0
- package/dist/types/components/co-avatar-group/co-avatar-group.d.ts +33 -0
- package/dist/types/components/co-bottom-sheet/co-bottom-sheet.d.ts +81 -0
- package/dist/types/components/co-breadcrumb/co-breadcrumb.d.ts +27 -0
- package/dist/types/components/co-breadcrumb-item/co-breadcrumb-item.d.ts +33 -0
- package/dist/types/components/co-button/co-button.d.ts +7 -1
- package/dist/types/components/co-calendar-month/co-calendar-month.d.ts +83 -0
- package/dist/types/components/co-checkbox/co-checkbox.d.ts +10 -2
- package/dist/types/components/co-chip/co-chip.d.ts +22 -5
- package/dist/types/components/co-color-picker/co-color-picker.d.ts +2 -0
- package/dist/types/components/co-command-search/co-command-search.d.ts +39 -6
- package/dist/types/components/co-command-search/commandSearchGroup.d.ts +20 -0
- package/dist/types/components/co-command-search/commandSearchLogic.d.ts +17 -0
- package/dist/types/components/co-data-table/co-data-table.d.ts +15 -2
- package/dist/types/components/co-drawer/co-drawer.d.ts +12 -0
- package/dist/types/components/co-drive-card/co-drive-card.d.ts +52 -0
- package/dist/types/components/co-drop-zone/co-drop-zone.d.ts +38 -0
- package/dist/types/components/co-empty-state/co-empty-state.d.ts +6 -0
- package/dist/types/components/co-event-calendar/co-event-calendar.d.ts +110 -0
- package/dist/types/components/co-file-type-tile/co-file-type-tile.d.ts +11 -0
- package/dist/types/components/co-icon/co-icon.d.ts +1 -1
- package/dist/types/components/co-icon/iconLoader.d.ts +6 -0
- package/dist/types/components/co-icon-button/co-icon-button.d.ts +18 -1
- package/dist/types/components/co-input/co-input.d.ts +13 -1
- package/dist/types/components/co-json-field/co-json-field.d.ts +3 -0
- package/dist/types/components/co-list-footer/co-list-footer.d.ts +26 -0
- package/dist/types/components/co-list-item/co-list-item.d.ts +11 -0
- package/dist/types/components/co-media-thumb/co-media-thumb.d.ts +21 -0
- package/dist/types/components/co-menu/co-menu.d.ts +4 -0
- package/dist/types/components/co-menu-item/co-menu-item.d.ts +10 -1
- package/dist/types/components/co-modal/co-modal.d.ts +26 -2
- package/dist/types/components/co-number-field/co-number-field.d.ts +13 -0
- package/dist/types/components/co-option-list/co-option-list.d.ts +101 -0
- package/dist/types/components/co-option-list/optionListLogic.d.ts +69 -0
- package/dist/types/components/co-overlay/co-overlay.d.ts +45 -0
- package/dist/types/components/co-overlay/focusTrap.d.ts +20 -0
- package/dist/types/components/co-overlay/overlayAfterClose.d.ts +5 -0
- package/dist/types/components/co-phone-field/co-phone-field.d.ts +2 -0
- package/dist/types/components/co-popover/co-popover.d.ts +9 -0
- package/dist/types/components/co-progress-bar/co-progress-bar.d.ts +2 -0
- package/dist/types/components/co-ref-field/co-ref-field.d.ts +17 -2
- package/dist/types/components/co-rich-text-editor/co-rich-text-editor.d.ts +161 -9
- package/dist/types/components/co-rich-text-toolbar/co-rich-text-toolbar.d.ts +119 -13
- package/dist/types/components/co-rich-text-viewer/co-rich-text-viewer.d.ts +1 -14
- package/dist/types/components/co-segmented-bar/co-segmented-bar.d.ts +32 -0
- package/dist/types/components/co-skeleton/co-skeleton.d.ts +13 -0
- package/dist/types/components/co-tab/co-tab.d.ts +4 -0
- package/dist/types/components/co-tab-group/co-tab-group.d.ts +3 -0
- package/dist/types/components/co-tags-field/co-tags-field.d.ts +2 -0
- package/dist/types/components/co-textarea/co-textarea.d.ts +3 -0
- package/dist/types/components/co-toast/co-toast.d.ts +7 -0
- package/dist/types/components/co-toggle-button/co-toggle-button.d.ts +6 -0
- package/dist/types/components/co-toggle-button-group/co-toggle-button-group.d.ts +5 -0
- package/dist/types/components/co-tooltip/co-tooltip.d.ts +12 -0
- package/dist/types/components/co-video/co-video.d.ts +203 -0
- package/dist/types/components.d.ts +3184 -221
- package/dist/types/utils/fieldChip.d.ts +37 -0
- package/dist/types/utils/icon-config.d.ts +11 -0
- package/dist/types/utils/richTextI18n.d.ts +130 -0
- package/dist/types/utils/sheetGesture.d.ts +31 -0
- package/package.json +5 -4
- package/dist/cobalt/p-01fc77c4.entry.js +0 -1
- package/dist/cobalt/p-0a6d8061.entry.js +0 -1
- package/dist/cobalt/p-0bf288cd.entry.js +0 -1
- package/dist/cobalt/p-15708d32.entry.js +0 -1
- package/dist/cobalt/p-1578b019.entry.js +0 -1
- package/dist/cobalt/p-23d48581.entry.js +0 -1
- package/dist/cobalt/p-2718ff27.entry.js +0 -1
- package/dist/cobalt/p-3190d715.entry.js +0 -1
- package/dist/cobalt/p-41228dce.entry.js +0 -1
- package/dist/cobalt/p-44672953.entry.js +0 -1
- package/dist/cobalt/p-53ce9023.entry.js +0 -1
- package/dist/cobalt/p-5d01bd4d.entry.js +0 -1
- package/dist/cobalt/p-5e7141aa.entry.js +0 -1
- package/dist/cobalt/p-5f905739.entry.js +0 -1
- package/dist/cobalt/p-6404bd21.entry.js +0 -1
- package/dist/cobalt/p-654bbc2a.entry.js +0 -1
- package/dist/cobalt/p-6678ac0a.entry.js +0 -1
- package/dist/cobalt/p-66a912dd.entry.js +0 -1
- package/dist/cobalt/p-6759ee1c.entry.js +0 -1
- package/dist/cobalt/p-69a40bfd.entry.js +0 -1
- package/dist/cobalt/p-6a6a62cb.entry.js +0 -1
- package/dist/cobalt/p-6d43b6cd.entry.js +0 -1
- package/dist/cobalt/p-759c3dd0.entry.js +0 -1
- package/dist/cobalt/p-782f729f.entry.js +0 -1
- package/dist/cobalt/p-83b89bf8.entry.js +0 -1
- package/dist/cobalt/p-88dc561a.entry.js +0 -1
- package/dist/cobalt/p-8c27aff7.entry.js +0 -1
- package/dist/cobalt/p-95d14878.entry.js +0 -1
- package/dist/cobalt/p-996179f7.entry.js +0 -1
- package/dist/cobalt/p-9c533830.entry.js +0 -1
- package/dist/cobalt/p-9d89bf47.entry.js +0 -1
- package/dist/cobalt/p-BKmfyPZK.js +0 -2
- package/dist/cobalt/p-BchB6Hdr.js +0 -1
- package/dist/cobalt/p-DcK0GGZC.js +0 -2
- package/dist/cobalt/p-Qqq8fysz.js +0 -1
- package/dist/cobalt/p-aa17c70b.entry.js +0 -1
- package/dist/cobalt/p-ad4c1b41.entry.js +0 -1
- package/dist/cobalt/p-ae4d3207.entry.js +0 -1
- package/dist/cobalt/p-af64da37.entry.js +0 -1
- package/dist/cobalt/p-c6a242e4.entry.js +0 -1
- package/dist/cobalt/p-cd57e8b4.entry.js +0 -1
- package/dist/cobalt/p-ce3a535f.entry.js +0 -1
- package/dist/cobalt/p-d17e1444.entry.js +0 -1
- package/dist/cobalt/p-d958566a.entry.js +0 -1
- package/dist/cobalt/p-dd873bf8.entry.js +0 -1
- package/dist/cobalt/p-e4de8865.entry.js +0 -1
- package/dist/cobalt/p-eba0bf7f.entry.js +0 -1
- package/dist/cobalt/p-f8728b21.entry.js +0 -1
- package/dist/cobalt/p-fad3605d.entry.js +0 -1
- package/dist/components/p-BXdfh__-.js +0 -1
- package/dist/components/p-BchB6Hdr.js +0 -1
- package/dist/components/p-BiW0ubLs.js +0 -1
- package/dist/components/p-CaMgu2_g.js +0 -1
- package/dist/components/p-DBhNS7JD.js +0 -1
- package/dist/components/p-DPi_U-Kl.js +0 -1
- package/dist/components/p-DcK0GGZC.js +0 -2
- package/dist/components/p-MiSJXuBx.js +0 -1
- package/dist/components/p-Sgn-2g8m.js +0 -1
- package/dist/components/p-jDjfGZJp.js +0 -1
- package/dist/components/p-o8hrDIKe.js +0 -1
|
@@ -1,13 +1,64 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, a as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, a as getElement } from './index-Es9IUmmt.js';
|
|
2
2
|
import { r as rankByMatch, h as highlightMatch } from './normalizeText-CQY6Ul7q.js';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
/** Flatten an ordered CommandItem[] into render rows, inserting a header
|
|
5
|
+
* whenever the section changes. `index` counts items only (drives activeIndex). */
|
|
6
|
+
function groupItems(items) {
|
|
7
|
+
const rows = [];
|
|
8
|
+
let lastSection;
|
|
9
|
+
let i = 0;
|
|
10
|
+
for (const item of items) {
|
|
11
|
+
const section = item.section;
|
|
12
|
+
if (section && section !== lastSection) {
|
|
13
|
+
rows.push({ kind: 'header', label: section });
|
|
14
|
+
}
|
|
15
|
+
lastSection = section;
|
|
16
|
+
rows.push({ kind: 'item', item, index: i });
|
|
17
|
+
i++;
|
|
18
|
+
}
|
|
19
|
+
return rows;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Pure: should the component keep open and emit coScopeChange
|
|
24
|
+
* instead of the default coSelect+close?
|
|
25
|
+
*/
|
|
26
|
+
function shouldKeepOpen(item) {
|
|
27
|
+
return item.keepOpen === true;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Pure: should coBackspaceEmpty fire?
|
|
31
|
+
* True when the user presses Backspace with an empty query.
|
|
32
|
+
*/
|
|
33
|
+
function isEmptyBackspace(key, query) {
|
|
34
|
+
return key === 'Backspace' && query === '';
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Pure: client-side item filtering.
|
|
38
|
+
* Mirrors the filteredItems getter logic from co-command-search.tsx.
|
|
39
|
+
* When async=true all items pass through (host already filtered them).
|
|
40
|
+
*/
|
|
41
|
+
function applyClientFilter(items, query, async) {
|
|
42
|
+
if (async)
|
|
43
|
+
return items;
|
|
44
|
+
if (!query)
|
|
45
|
+
return items;
|
|
46
|
+
return rankByMatch(items, query, item => [item.label, item.value]);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const coCommandSearchCss = () => `:host{display:contents}co-overlay{--co-overlay-bg:rgba(0, 0, 0, 0.16)}.co-command-search__trigger{display:contents}.co-command-search{display:flex;flex-direction:column;width:90vw;max-width:560px;max-height:420px;background:var(--co-semantic-surface-page);border-radius:var(--co-border-radius-lg);box-shadow:0 8px 32px rgba(0, 0, 0, 0.12);overflow:hidden;font-family:var(--co-font-family-primary);transform:translateY(8px) scale(0.98);opacity:0;transition:transform 0.15s ease, opacity 0.15s ease;margin-top:-15vh}.co-command-search--open{transform:translateY(0) scale(1);opacity:1}.co-command-search__input-row{display:flex;align-items:center;gap:var(--co-spacing-sm);padding:var(--co-spacing-md) var(--co-spacing-lg);border-bottom:1px solid var(--co-semantic-border-default);color:var(--co-semantic-text-muted)}.co-command-search__input{flex:1;border:none;outline:none;background:transparent;font-size:var(--co-font-size-16);font-family:var(--co-font-family-primary);color:var(--co-semantic-text-default);min-width:0}.co-command-search__input::placeholder{color:var(--co-semantic-text-muted)}.co-command-search__shortcut{font-size:var(--co-font-size-10);color:var(--co-semantic-text-muted);background:var(--co-semantic-surface-muted);padding:2px var(--co-spacing-xs);border-radius:var(--co-border-radius-xxs);font-weight:500;line-height:1.4;flex-shrink:0}.co-command-search__results{flex:1;overflow-y:auto;padding:var(--co-spacing-xs) 0}.co-command-search__item{display:flex;align-items:center;gap:var(--co-spacing-sm);padding:var(--co-spacing-sm) var(--co-spacing-lg);cursor:pointer;font-size:var(--co-font-size-14);color:var(--co-semantic-text-default);transition:background 0.08s ease}.co-command-search__item:hover,.co-command-search__item--active{background:var(--co-semantic-surface-hover)}.co-command-search__item-label{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.co-command-search__match{font-weight:700}.co-command-search__empty{padding:var(--co-spacing-2xl) var(--co-spacing-lg);text-align:center;font-size:var(--co-font-size-14);color:var(--co-semantic-text-muted)}.co-command-search__section{padding:var(--co-spacing-sm) var(--co-spacing-lg) var(--co-spacing-xs);font-size:var(--co-font-size-12);font-weight:600;text-transform:uppercase;letter-spacing:0.04em;color:var(--co-semantic-text-muted)}.co-command-search__item-text{flex:1;min-width:0;display:flex;flex-direction:column}.co-command-search__item-subtitle{font-size:var(--co-font-size-12);color:var(--co-semantic-text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.co-command-search__loading{flex-shrink:0;display:flex;align-items:center}.co-command-search__facet-chip{display:inline-flex;align-items:center;gap:2px;padding:2px var(--co-spacing-xs);background:var(--co-color-primary-azul);color:var(--co-color-base-blanco, #fff);border-radius:var(--co-border-radius-full);font-size:var(--co-font-size-12);font-weight:500;white-space:nowrap;flex-shrink:0}.co-command-search__facet-chip-label{max-width:110px;overflow:hidden;text-overflow:ellipsis}.co-command-search__facet-chip-remove{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;border:none;border-radius:var(--co-border-radius-full);background:rgba(255, 255, 255, 0.25);color:inherit;cursor:pointer;padding:0;line-height:1;transition:background 0.1s ease}.co-command-search__facet-chip-remove:hover{background:rgba(255, 255, 255, 0.4)}.co-command-search__tabs{display:flex;align-items:center;gap:var(--co-spacing-sm);padding:var(--co-spacing-md);overflow-x:auto;border-bottom:1px solid var(--co-semantic-border-default);scroll-padding-right:104px}.co-command-search__tab{flex:0 0 auto}.co-command-search__tab--more{position:sticky;right:0;padding-left:var(--co-spacing-sm);background:var(--co-semantic-surface-page);box-shadow:-12px 0 10px -4px var(--co-semantic-surface-page)}.co-command-search__fav{padding:var(--co-spacing-sm) var(--co-spacing-lg) var(--co-spacing-md);border-bottom:1px solid var(--co-semantic-border-default)}.co-command-search__fav-grid{display:grid;grid-template-columns:repeat(auto-fill, minmax(88px, 1fr));gap:var(--co-spacing-xs)}.co-command-search__fav-card{display:flex;flex-direction:column;align-items:center;gap:var(--co-spacing-sm);padding:var(--co-spacing-sm) var(--co-spacing-xs);background:transparent;border:none;border-radius:var(--co-border-radius-sm);cursor:pointer;font-family:inherit;text-align:center;min-width:0;transition:background 0.12s ease}.co-command-search__fav-card:hover{background:var(--co-semantic-surface-hover)}.co-command-search__fav-card:focus-visible{outline:none;box-shadow:0 0 0 2px var(--co-semantic-border-focus-ring)}.co-command-search__fav-icon{flex:none;width:50px;height:50px;border-radius:var(--co-border-radius-sm);display:flex;align-items:center;justify-content:center;color:var(--co-color-base-blanco, #fff);box-shadow:0 2px 6px rgba(0, 0, 0, 0.14)}.co-command-search__fav-label{font-size:var(--co-font-size-12);font-weight:500;line-height:1.2;color:var(--co-semantic-text-default);max-width:100%;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}`;
|
|
5
50
|
|
|
6
51
|
const CoCommandSearch = class {
|
|
7
52
|
constructor(hostRef) {
|
|
8
53
|
registerInstance(this, hostRef);
|
|
9
54
|
this.coSelect = createEvent(this, "coSelect", 7);
|
|
10
55
|
this.coClose = createEvent(this, "coClose", 7);
|
|
56
|
+
this.coQueryChange = createEvent(this, "coQueryChange", 7);
|
|
57
|
+
this.coScopeChange = createEvent(this, "coScopeChange", 1);
|
|
58
|
+
this.coBackspaceEmpty = createEvent(this, "coBackspaceEmpty", 1);
|
|
59
|
+
this.coChipRemove = createEvent(this, "coChipRemove", 1);
|
|
60
|
+
this.coTabSelect = createEvent(this, "coTabSelect", 1);
|
|
61
|
+
this.coMoreTabs = createEvent(this, "coMoreTabs", 1);
|
|
11
62
|
/** Whether the command palette is open */
|
|
12
63
|
this.open = false;
|
|
13
64
|
/** Placeholder text for the search input */
|
|
@@ -16,13 +67,38 @@ const CoCommandSearch = class {
|
|
|
16
67
|
this.items = [];
|
|
17
68
|
/** Empty state message when no results match */
|
|
18
69
|
this.emptyMessage = 'No results found';
|
|
70
|
+
/** When true, the host supplies already-filtered, ordered items: disable
|
|
71
|
+
* internal client filtering so fetch-as-you-type results pass through. */
|
|
72
|
+
this.async = false;
|
|
73
|
+
/** Show a loading indicator in the results area (async fetch in flight). */
|
|
74
|
+
this.loading = false;
|
|
75
|
+
/** Facet chips as JSON string: [{label:string, icon?:string}[]] */
|
|
76
|
+
this.chips = '[]';
|
|
77
|
+
/** Module tabs (mac-Spotlight style) as JSON: [{value,label,icon}]. Empty = no tabs row. */
|
|
78
|
+
this.tabs = '[]';
|
|
79
|
+
/** The active tab's value (the scope model key), or '' = no active tab. */
|
|
80
|
+
this.activeTab = '';
|
|
81
|
+
/** Show the "Más ▾" overflow tab. */
|
|
82
|
+
this.hasMore = false;
|
|
83
|
+
/** Label for the overflow tab. */
|
|
84
|
+
this.moreLabel = 'More';
|
|
85
|
+
/** Favorites / shortcuts grid (mac-Spotlight app grid) as JSON: [{value,label,icon,color}].
|
|
86
|
+
* Shown as a grid at the top of the results, only while the query is empty. */
|
|
87
|
+
this.favorites = '[]';
|
|
19
88
|
this.query = '';
|
|
20
89
|
this.activeIndex = 0;
|
|
21
90
|
this.handleInput = (e) => {
|
|
22
91
|
this.query = e.target.value;
|
|
23
92
|
this.activeIndex = 0;
|
|
93
|
+
this.coQueryChange.emit(this.query);
|
|
24
94
|
};
|
|
25
95
|
this.handleKeyDown = (e) => {
|
|
96
|
+
// Backspace with empty query → notify host to pop scope or last facet-chip
|
|
97
|
+
if (isEmptyBackspace(e.key, this.query)) {
|
|
98
|
+
e.preventDefault();
|
|
99
|
+
this.coBackspaceEmpty.emit(this.query);
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
26
102
|
const items = this.filteredItems;
|
|
27
103
|
switch (e.key) {
|
|
28
104
|
case 'ArrowDown':
|
|
@@ -43,6 +119,14 @@ const CoCommandSearch = class {
|
|
|
43
119
|
e.preventDefault();
|
|
44
120
|
this.close();
|
|
45
121
|
break;
|
|
122
|
+
case 'Tab':
|
|
123
|
+
e.preventDefault();
|
|
124
|
+
if (items.length > 0) {
|
|
125
|
+
this.activeIndex = e.shiftKey
|
|
126
|
+
? (this.activeIndex - 1 + items.length) % items.length
|
|
127
|
+
: (this.activeIndex + 1) % items.length;
|
|
128
|
+
}
|
|
129
|
+
break;
|
|
46
130
|
}
|
|
47
131
|
};
|
|
48
132
|
this.handleOverlayClick = () => {
|
|
@@ -67,9 +151,34 @@ const CoCommandSearch = class {
|
|
|
67
151
|
return this.items;
|
|
68
152
|
}
|
|
69
153
|
get filteredItems() {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
154
|
+
return applyClientFilter(this.parsedItems, this.query, this.async);
|
|
155
|
+
}
|
|
156
|
+
get parsedChips() {
|
|
157
|
+
try {
|
|
158
|
+
const arr = typeof this.chips === 'string' ? JSON.parse(this.chips) : this.chips;
|
|
159
|
+
return Array.isArray(arr) ? arr : [];
|
|
160
|
+
}
|
|
161
|
+
catch (_a) {
|
|
162
|
+
return [];
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
get parsedTabs() {
|
|
166
|
+
try {
|
|
167
|
+
const a = typeof this.tabs === 'string' ? JSON.parse(this.tabs) : this.tabs;
|
|
168
|
+
return Array.isArray(a) ? a : [];
|
|
169
|
+
}
|
|
170
|
+
catch (_a) {
|
|
171
|
+
return [];
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
get parsedFavorites() {
|
|
175
|
+
try {
|
|
176
|
+
const a = typeof this.favorites === 'string' ? JSON.parse(this.favorites) : this.favorites;
|
|
177
|
+
return Array.isArray(a) ? a : [];
|
|
178
|
+
}
|
|
179
|
+
catch (_a) {
|
|
180
|
+
return [];
|
|
181
|
+
}
|
|
73
182
|
}
|
|
74
183
|
/** Item label with the matched substring wrapped for highlighting. */
|
|
75
184
|
renderLabel(label) {
|
|
@@ -78,6 +187,20 @@ const CoCommandSearch = class {
|
|
|
78
187
|
return label;
|
|
79
188
|
return [seg.pre, h("span", { class: "co-command-search__match" }, seg.match), seg.post];
|
|
80
189
|
}
|
|
190
|
+
onActiveTabChange(newVal) {
|
|
191
|
+
if (newVal) {
|
|
192
|
+
this.query = '';
|
|
193
|
+
this.activeIndex = 0;
|
|
194
|
+
}
|
|
195
|
+
// The active tab may be appended past the visible width (e.g. a model picked
|
|
196
|
+
// from "Más"). Scroll it into view; scroll-padding-right keeps it clear of the
|
|
197
|
+
// sticky "Más" chip.
|
|
198
|
+
requestAnimationFrame(() => {
|
|
199
|
+
var _a;
|
|
200
|
+
const active = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.co-command-search__tab[aria-selected="true"]');
|
|
201
|
+
active === null || active === void 0 ? void 0 : active.scrollIntoView({ inline: 'nearest', block: 'nearest' });
|
|
202
|
+
});
|
|
203
|
+
}
|
|
81
204
|
onOpenChange(newVal) {
|
|
82
205
|
if (newVal) {
|
|
83
206
|
this.query = '';
|
|
@@ -85,7 +208,12 @@ const CoCommandSearch = class {
|
|
|
85
208
|
requestAnimationFrame(() => { var _a; return (_a = this.inputEl) === null || _a === void 0 ? void 0 : _a.focus(); });
|
|
86
209
|
}
|
|
87
210
|
}
|
|
211
|
+
/** Two-stage commit: keepOpen items emit coScopeChange only; all others emit coSelect + close. */
|
|
88
212
|
selectItem(item) {
|
|
213
|
+
if (shouldKeepOpen(item)) {
|
|
214
|
+
this.coScopeChange.emit(item.value);
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
89
217
|
this.coSelect.emit(item.value);
|
|
90
218
|
this.close();
|
|
91
219
|
}
|
|
@@ -96,17 +224,28 @@ const CoCommandSearch = class {
|
|
|
96
224
|
render() {
|
|
97
225
|
const items = this.filteredItems;
|
|
98
226
|
return [
|
|
99
|
-
h("div", { key: '
|
|
100
|
-
h("co-overlay", { key: '
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
227
|
+
h("div", { key: '8997e31184c5531e5b329432f6ff29496d1070f5', class: "co-command-search__trigger", onClick: this.handleTriggerClick }, h("slot", { key: '63bf6dbcb3aaf35a0fdacd70b96b8f5701cd27cf', name: "trigger" })),
|
|
228
|
+
h("co-overlay", { key: '7f96e661c6cab4f6440beab808993665efb86cab', open: this.open, onCoClose: this.handleOverlayClick }, h("div", { key: '20b27b7609cd00cb52d903babbb7565885ce1188', class: { 'co-command-search': true, 'co-command-search--open': this.open }, part: "panel", role: "dialog", "aria-modal": "true", "aria-label": "Command palette", onClick: this.handlePanelClick }, h("div", { key: 'c9bb1834d60ea728cb70e4ebb9ce08c76abafec1', class: "co-command-search__input-row", part: "input-row" }, h("co-icon", { key: '971da90765cf33c7d427c173e974fb7f68e96ed5', name: "magnifying-glass", size: 20 }), this.parsedChips.map((chip, idx) => (h("span", { class: "co-command-search__facet-chip" }, chip.icon && h("co-icon", { name: chip.icon, size: 12 }), h("span", { class: "co-command-search__facet-chip-label" }, chip.label), h("button", { class: "co-command-search__facet-chip-remove", type: "button", "aria-label": `Remove filter ${chip.label}`, onClick: (e) => {
|
|
229
|
+
e.stopPropagation();
|
|
230
|
+
this.coChipRemove.emit(idx);
|
|
231
|
+
} }, h("co-icon", { name: "x", size: 10, weight: "bold" }))))), h("input", { key: '81921bb9085d6bfb3ed4a274ef195e299dd01023', class: "co-command-search__input", type: "text", placeholder: this.placeholder, value: this.query, onInput: this.handleInput, onKeyDown: this.handleKeyDown, ref: el => (this.inputEl = el), part: "input", role: "combobox", "aria-expanded": this.open ? 'true' : 'false', "aria-controls": "co-cmd-results", "aria-autocomplete": "list", "aria-activedescendant": this.filteredItems[this.activeIndex] ? 'co-cmd-opt-' + this.activeIndex : undefined }), this.loading && (h("co-loader", { key: 'd5ab9e9a98b7a94c3c6f8d16682994666f1c5b18', class: "co-command-search__loading", part: "loading", size: "sm" })), h("span", { key: 'eb62a8d79faff742108246565ede12ff7ee145f1', class: "co-command-search__shortcut" }, "ESC")), (this.parsedTabs.length > 0 || this.hasMore) && (h("div", { key: '4533b27e38469ab4ab6ddc9e918b408e136e097b', class: "co-command-search__tabs", part: "tabs", role: "tablist" }, this.parsedTabs.map(tab => {
|
|
232
|
+
const active = tab.value === this.activeTab;
|
|
233
|
+
return (h("co-chip", { class: "co-command-search__tab", role: "tab", "aria-selected": active ? 'true' : 'false', clickable: true, selected: active, variant: active ? 'filled' : 'outlined', color: active ? 'primary' : 'default', iconLeft: tab.icon, label: tab.label, onCoClick: () => this.coTabSelect.emit(active ? '' : tab.value) }));
|
|
234
|
+
}), this.hasMore && (h("co-chip", { key: '4efe5ab79e9e5b3b5c973ff4bbc80caf2f49bb9c', class: "co-command-search__tab co-command-search__tab--more", clickable: true, variant: "outlined", label: this.moreLabel, iconRight: "caret-down", onCoClick: () => this.coMoreTabs.emit() })))), h("div", { key: 'd2e6d24d6d7aba13111d3f148bed12157e80ea6d', class: "co-command-search__results", part: "results", role: "listbox", id: "co-cmd-results" }, this.parsedFavorites.length > 0 && !this.query && (h("div", { key: '17abc91e955610afec6ef6c68aae5bac25bd6820', class: "co-command-search__fav", part: "favorites" }, h("div", { key: 'dc5dee8ec8f9d1a5c1dc9b4119e04ca4459750bf', class: "co-command-search__fav-grid" }, this.parsedFavorites.map(fav => (h("button", { class: "co-command-search__fav-card", type: "button", onClick: () => this.coSelect.emit(fav.value) }, h("span", { class: "co-command-search__fav-icon", style: { background: fav.color || 'var(--co-semantic-surface-muted)' } }, h("co-icon", { name: fav.icon || 'circle', size: 26, weight: "fill" })), h("span", { class: "co-command-search__fav-label" }, fav.label))))))), items.length > 0
|
|
235
|
+
? groupItems(items).map(row => row.kind === 'header'
|
|
236
|
+
? h("div", { class: "co-command-search__section", part: "section", role: "presentation" }, row.label)
|
|
237
|
+
: (h("div", { class: {
|
|
238
|
+
'co-command-search__item': true,
|
|
239
|
+
'co-command-search__item--active': row.index === this.activeIndex,
|
|
240
|
+
}, part: "item", role: "option", id: 'co-cmd-opt-' + row.index, "aria-selected": row.index === this.activeIndex ? 'true' : 'false', onClick: () => this.selectItem(row.item), onMouseEnter: () => { this.activeIndex = row.index; } }, row.item.icon && h("co-icon", { name: row.item.icon, size: 18 }), h("span", { class: "co-command-search__item-text" }, h("span", { class: "co-command-search__item-label" }, this.renderLabel(row.item.label)), row.item.subtitle && (h("span", { class: "co-command-search__item-subtitle" }, row.item.subtitle))))))
|
|
241
|
+
: !this.loading && (h("div", { class: "co-command-search__empty", part: "empty" }, this.emptyMessage))))),
|
|
106
242
|
];
|
|
107
243
|
}
|
|
108
244
|
get el() { return getElement(this); }
|
|
109
245
|
static get watchers() { return {
|
|
246
|
+
"activeTab": [{
|
|
247
|
+
"onActiveTabChange": 0
|
|
248
|
+
}],
|
|
110
249
|
"open": [{
|
|
111
250
|
"onOpenChange": 0
|
|
112
251
|
}]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-Es9IUmmt.js';
|
|
2
2
|
|
|
3
3
|
const coDataTablePaginationCss = () => `:host{display:block;font-family:var(--co-font-family-primary)}.co-pagination{display:flex;align-items:center;gap:var(--co-spacing-lg);padding:var(--co-spacing-md) var(--co-spacing-lg);border-top:1px solid var(--co-color-opacity-negro-8);background:var(--co-color-base-blanco);font-size:var(--co-font-size-12);color:var(--co-semantic-text-secondary);letter-spacing:var(--co-font-letter-spacing-body);user-select:none}.co-pagination__section{display:flex;align-items:center;gap:var(--co-spacing-sm);flex-shrink:0}.co-pagination__spacer{flex:1}.co-pagination__label{color:var(--co-semantic-text-secondary);white-space:nowrap}.co-pagination__count{color:var(--co-semantic-text-secondary);white-space:nowrap}.co-pagination__jump-input{width:32px;height:28px;border:1px solid var(--co-color-opacity-negro-8);border-radius:var(--co-border-radius-xxs);background:var(--co-color-base-blanco);font-family:var(--co-font-family-primary);font-size:var(--co-font-size-12);color:var(--co-semantic-text-default);text-align:center;padding:0 var(--co-spacing-xs);outline:none;transition:border-color 0.15s ease}.co-pagination__jump-input:focus{border-color:var(--co-color-primary-azul)}.co-pagination__section--page-size{position:relative}.co-pagination__page-size-trigger{display:flex;align-items:center;gap:var(--co-spacing-xs);cursor:pointer;padding:var(--co-spacing-xs) var(--co-spacing-sm);border-radius:var(--co-border-radius-xxs);transition:background-color 0.15s ease}.co-pagination__page-size-trigger:hover{background:var(--co-semantic-surface-hover)}.co-pagination__page-size-value{font-weight:500;color:var(--co-semantic-text-default)}.co-pagination__page-size-dropdown{position:absolute;bottom:calc(100% + 4px);left:0;min-width:72px;background:var(--co-color-base-blanco);border:1px solid var(--co-color-opacity-negro-8);border-radius:var(--co-border-radius-xs);box-shadow:0 4px 12px var(--co-color-opacity-negro-8);padding:var(--co-spacing-xs) 0;z-index:10}.co-pagination__page-size-option{display:block;width:100%;padding:var(--co-spacing-sm) var(--co-spacing-md);border:none;background:none;font-family:var(--co-font-family-primary);font-size:var(--co-font-size-12);color:var(--co-semantic-text-default);text-align:left;cursor:pointer;transition:background-color 0.1s ease}.co-pagination__page-size-option:hover{background:var(--co-semantic-surface-hover)}.co-pagination__page-size-option--active{font-weight:500;color:var(--co-color-primary-azul)}.co-pagination__nav{display:flex;align-items:center;gap:var(--co-spacing-xxs)}.co-pagination__nav-btn{display:flex;align-items:center;gap:var(--co-spacing-xs);padding:var(--co-spacing-xs) var(--co-spacing-sm);border:1px solid var(--co-color-opacity-negro-8);border-radius:var(--co-border-radius-xxs);background:var(--co-color-base-blanco);font-family:var(--co-font-family-primary);font-size:var(--co-font-size-12);color:var(--co-semantic-text-default);cursor:pointer;transition:background-color 0.15s ease;white-space:nowrap}.co-pagination__nav-btn:hover:not(:disabled){background:var(--co-semantic-surface-hover)}.co-pagination__nav-btn:disabled{opacity:0.4;cursor:not-allowed}.co-pagination__page-btn{min-width:28px;height:28px;display:flex;align-items:center;justify-content:center;border:none;border-radius:var(--co-border-radius-xxs);background:none;font-family:var(--co-font-family-primary);font-size:var(--co-font-size-12);color:var(--co-semantic-text-secondary);cursor:pointer;transition:background-color 0.1s ease}.co-pagination__page-btn:hover{background:var(--co-semantic-surface-hover)}.co-pagination__page-btn--active{background:var(--co-color-base-negro);color:var(--co-color-base-blanco);font-weight:500}.co-pagination__page-btn--active:hover{background:var(--co-color-base-negro)}.co-pagination__ellipsis{display:flex;align-items:center;justify-content:center;min-width:28px;height:28px;color:var(--co-color-gray-400)}`;
|
|
4
4
|
|
|
@@ -89,17 +89,17 @@ const CoDataTablePagination = class {
|
|
|
89
89
|
}
|
|
90
90
|
render() {
|
|
91
91
|
const pages = this.getVisiblePages();
|
|
92
|
-
return (h("div", { key: '
|
|
92
|
+
return (h("div", { key: '58fdc57923ac061b83b248ad47bfc898b66fb512', class: "co-pagination", part: "pagination" }, h("div", { key: '918fdaecef593fdde7095353be9d28a19b1a89c4', class: "co-pagination__section" }, h("span", { key: '4b962d74a9655b6fd6a6ec670df4139b28bd49c1', class: "co-pagination__label" }, this.jumpToPageLabel), h("input", { key: 'c4db59aea2a672f6b103ec1b3183af94c10168b2', type: "text", class: "co-pagination__jump-input", value: this.jumpToValue || String(this.page), onInput: (e) => {
|
|
93
93
|
this.jumpToValue = e.target.value;
|
|
94
94
|
}, onKeyDown: (e) => this.handleJumpToPage(e), onFocus: (e) => {
|
|
95
95
|
e.target.select();
|
|
96
|
-
}, part: "jump-input" })), h("div", { key: '
|
|
96
|
+
}, part: "jump-input" })), h("div", { key: '76de3483638cab4fbd2161c3ecd0331d8ce479c9', class: "co-pagination__section co-pagination__section--page-size" }, h("div", { key: '816fce2951c214419670d7bc060476beb1d3dda3', class: "co-pagination__page-size-trigger", onClick: () => { this.showPageSizeDropdown = !this.showPageSizeDropdown; } }, h("span", { key: 'c65b889eb1c7287559c40e7449e4053e3ffafa87', class: "co-pagination__page-size-value" }, this.pageSize), h("span", { key: '72191c99bb24055f6a239aeb301452240ad954b3', class: "co-pagination__label" }, this.perPageLabel), h("co-icon", { key: 'f9688b7b17af70c9348b837bdacc2cf879a50e71', name: "caret-down", size: 14 })), this.showPageSizeDropdown && (h("div", { key: '47273c123ecdcfd8aee50d6d67d27bddcd78efcb', class: "co-pagination__page-size-dropdown", part: "dropdown" }, this.parsedPageSizes.map(size => (h("button", { class: {
|
|
97
97
|
'co-pagination__page-size-option': true,
|
|
98
98
|
'co-pagination__page-size-option--active': size === this.pageSize,
|
|
99
|
-
}, onClick: () => this.changePageSize(size) }, size)))))), h("div", { key: '
|
|
99
|
+
}, onClick: () => this.changePageSize(size) }, size)))))), h("div", { key: '38fa750720d8df2087b6579d287f79681c6b0ff8', class: "co-pagination__spacer" }), h("div", { key: '17f1557e704f2f466efe06babc9ba4d065d67c7f', class: "co-pagination__section" }, h("span", { key: '376d1c381f7efc92ee1afafa664e665ab80f6b17', class: "co-pagination__count" }, this.totalCount.toLocaleString(), " ", this.recordsLabel)), h("div", { key: 'cea4fe162d5610c6fd847be228f672fc3ae088cb', class: "co-pagination__section co-pagination__nav" }, h("button", { key: '64b7983f49a768631265f82af2904b15b6b927ef', class: "co-pagination__nav-btn", disabled: this.page <= 1, onClick: () => this.goToPage(this.page - 1), part: "prev-btn" }, this.previousLabel), pages.map(p => p === '...' ? (h("span", { class: "co-pagination__ellipsis" }, "\u2026")) : (h("button", { class: {
|
|
100
100
|
'co-pagination__page-btn': true,
|
|
101
101
|
'co-pagination__page-btn--active': p === this.page,
|
|
102
|
-
}, onClick: () => this.goToPage(p) }, p))), h("button", { key: '
|
|
102
|
+
}, onClick: () => this.goToPage(p) }, p))), h("button", { key: 'efd6ec713cb22bdb9eb6774e094f8fbc12cb4811', class: "co-pagination__nav-btn", disabled: this.page >= this.totalPages, onClick: () => this.goToPage(this.page + 1), part: "next-btn" }, this.nextLabel))));
|
|
103
103
|
}
|
|
104
104
|
static get watchers() { return {
|
|
105
105
|
"pageSizes": [{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, a as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, a as getElement } from './index-Es9IUmmt.js';
|
|
2
2
|
|
|
3
|
-
const coDataTableCss = () => `co-data-table{display:block;flex:1;min-height:0;overflow:hidden}.co-data-table{position:relative;font-family:var(--co-font-family-primary);background:var(--co-color-base-blanco);display:flex;flex-direction:column;height:100%}.co-data-table--resizing{cursor:col-resize;user-select:none}.co-data-table__scroll{flex:1;overflow-x:auto;overflow-y:auto;min-height:0}.co-data-table__table{min-width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed}.co-data-table__head{position:sticky;top:0;z-index:2}.co-data-table__header-row{height:40px}.co-data-table__th{position:relative;padding:var(--co-spacing-md);background:var(--co-color-base-blanco);border-bottom:1px solid var(--co-color-opacity-negro-8);border-right:1px solid var(--co-color-opacity-negro-8);text-align:left;vertical-align:middle;font-size:var(--co-font-size-14);font-weight:500;color:var(--co-semantic-text-default);letter-spacing:var(--co-font-letter-spacing-body);white-space:nowrap;overflow:hidden;box-sizing:border-box}.co-data-table__th:last-child{border-right:none}.co-data-table__th--sortable{cursor:pointer}.co-data-table__th--sortable:hover{background:var(--co-semantic-surface-hover)}.co-data-table__th-content{display:flex;align-items:center;justify-content:space-between;gap:var(--co-spacing-sm)}.co-data-table__pin-icon{display:flex;align-items:center;flex-shrink:0;color:var(--co-color-gray-300);cursor:pointer;opacity:0;transition:opacity 0.15s ease, color 0.15s ease}.co-data-table__pin-icon--active{opacity:1;color:var(--co-semantic-text-default)}.co-data-table__th:hover .co-data-table__pin-icon{opacity:1}.co-data-table__pin-icon:hover{color:var(--co-semantic-text-default)}.co-data-table__th-label{flex:1;overflow:hidden;text-overflow:ellipsis}.co-data-table__sort-icon{display:flex;align-items:center;flex-shrink:0;color:var(--co-color-gray-400);transition:color 0.15s ease}.co-data-table__sort-icon--active{color:var(--co-semantic-text-default)}.co-data-table__th--checkbox,.co-data-table__td--checkbox{width:48px;min-width:48px;max-width:48px;padding:var(--co-spacing-md);text-align:center}.co-data-table__th--sticky,.co-data-table__td--sticky{position:sticky;z-index:1;background:var(--co-color-base-blanco)}.co-data-table__th--sticky{z-index:3}.co-data-table__td--sticky::after,.co-data-table__th--sticky::after{content:'';position:absolute;top:0;right:-4px;bottom:0;width:4px;pointer-events:none;opacity:0;background:linear-gradient(to right, var(--co-color-opacity-negro-8), transparent);transition:opacity 0.15s ease}.co-data-table__resize-handle{position:absolute;top:0;right:-2px;width:5px;height:100%;cursor:col-resize;z-index:1}.co-data-table__resize-handle:hover{background:var(--co-color-primary-azul);opacity:0.3}.co-data-table__resize-handle--active{background:var(--co-color-primary-azul);opacity:0.3}.co-data-table__row{height:48px;transition:background-color 0.15s ease;content-visibility:auto;contain-intrinsic-size:auto 48px}.co-data-table__row:hover{background:var(--co-semantic-surface-hover)}.co-data-table__row--selected{background:var(--co-color-opacity-negro-4)}.co-data-table__row--selected:hover{background:var(--co-color-opacity-negro-8)}.co-data-table__td{padding:var(--co-spacing-
|
|
3
|
+
const coDataTableCss = () => `co-data-table{display:block;flex:1;min-height:0;overflow:hidden;contain:layout}.co-data-table{position:relative;font-family:var(--co-font-family-primary);background:var(--co-color-base-blanco);display:flex;flex-direction:column;height:100%}.co-data-table--resizing{cursor:col-resize;user-select:none}.co-data-table__scroll{flex:1;overflow-x:auto;overflow-y:auto;min-height:0}.co-data-table__table{min-width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed}.co-data-table__head{position:sticky;top:0;z-index:2}.co-data-table__header-row{height:40px}.co-data-table__th{position:relative;padding:var(--co-spacing-md);background:var(--co-color-base-blanco);border-bottom:1px solid var(--co-color-opacity-negro-8);border-right:1px solid var(--co-color-opacity-negro-8);text-align:left;vertical-align:middle;font-size:var(--co-font-size-14);font-weight:500;color:var(--co-semantic-text-default);letter-spacing:var(--co-font-letter-spacing-body);white-space:nowrap;overflow:hidden;box-sizing:border-box}.co-data-table__th:last-child{border-right:none}.co-data-table__th--sortable{cursor:pointer}.co-data-table__th--sortable:hover{background-image:linear-gradient(var(--co-semantic-surface-hover), var(--co-semantic-surface-hover))}.co-data-table__th-content{display:flex;align-items:center;justify-content:space-between;gap:var(--co-spacing-sm)}.co-data-table__pin-icon{display:flex;align-items:center;flex-shrink:0;color:var(--co-color-gray-300);cursor:pointer;opacity:0;transition:opacity 0.15s ease, color 0.15s ease}.co-data-table__pin-icon--active{opacity:1;color:var(--co-semantic-text-default)}.co-data-table__th:hover .co-data-table__pin-icon{opacity:1}.co-data-table__pin-icon:hover{color:var(--co-semantic-text-default)}.co-data-table__th-label{flex:1;overflow:hidden;text-overflow:ellipsis}.co-data-table__sort-icon{display:flex;align-items:center;flex-shrink:0;color:var(--co-color-gray-400);transition:color 0.15s ease}.co-data-table__sort-icon--active{color:var(--co-semantic-text-default)}.co-data-table__sort-button{flex:1;min-width:0;display:flex;align-items:center;justify-content:space-between;gap:var(--co-spacing-sm);background:transparent;border:0;padding:0;margin:0;font:inherit;color:inherit;letter-spacing:inherit;text-align:left;cursor:pointer}.co-data-table__sort-button:focus-visible{outline:2px solid var(--co-semantic-border-focus, var(--co-color-primary-azul));outline-offset:-2px;border-radius:var(--co-border-radius-xxs)}.co-data-table__th--checkbox,.co-data-table__td--checkbox{width:48px;min-width:48px;max-width:48px;padding:var(--co-spacing-md);text-align:center}.co-data-table__th--sticky,.co-data-table__td--sticky{position:sticky;z-index:1;background:var(--co-color-base-blanco)}.co-data-table__th--sticky{z-index:3}.co-data-table__td--sticky::after,.co-data-table__th--sticky::after{content:'';position:absolute;top:0;right:-4px;bottom:0;width:4px;pointer-events:none;opacity:0;background:linear-gradient(to right, var(--co-color-opacity-negro-8), transparent);transition:opacity 0.15s ease}.co-data-table__resize-handle{position:absolute;top:0;right:-2px;width:5px;height:100%;cursor:col-resize;z-index:1}.co-data-table__resize-handle:hover{background:var(--co-color-primary-azul);opacity:0.3}.co-data-table__resize-handle--active{background:var(--co-color-primary-azul);opacity:0.3}.co-data-table__row{height:48px;transition:background-color 0.15s ease;content-visibility:auto;contain-intrinsic-size:auto 48px}.co-data-table__row:hover{background:var(--co-semantic-surface-hover)}.co-data-table__row--selected{background:var(--co-color-opacity-negro-4)}.co-data-table__row--selected:hover{background:var(--co-color-opacity-negro-8)}.co-data-table__td{height:48px;padding:0 var(--co-spacing-md);background:inherit;border-bottom:1px solid var(--co-color-opacity-negro-8);border-right:1px solid var(--co-color-opacity-negro-8);vertical-align:middle;font-size:var(--co-font-size-12);color:var(--co-semantic-text-default);letter-spacing:var(--co-font-letter-spacing-body);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box}.co-data-table__td:last-child{border-right:none}.co-data-table__th--align-center,.co-data-table__td--align-center{text-align:center}.co-data-table__th--align-right,.co-data-table__td--align-right{text-align:right}.co-data-table__cell-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}.co-data-table--empty .co-data-table__scroll{flex:0 0 auto;overflow:hidden}.co-data-table__empty{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;flex:1;min-height:280px;padding:var(--co-spacing-3xl) var(--co-spacing-lg);gap:var(--co-spacing-sm)}.co-data-table__empty-icon{display:inline-flex;align-items:center;justify-content:center;width:64px;height:64px;border-radius:var(--co-border-radius-full);background:var(--co-semantic-surface-muted);color:var(--co-semantic-text-secondary);margin-bottom:var(--co-spacing-sm)}.co-data-table__empty-title{font-size:var(--co-font-size-16);font-weight:600;color:var(--co-semantic-text-default);letter-spacing:-0.03em;margin:0}.co-data-table__empty-message{font-size:var(--co-font-size-14);font-weight:400;color:var(--co-semantic-text-secondary);margin:0;max-width:360px}.co-data-table__empty-action{margin-top:var(--co-spacing-md);display:inline-flex}.co-data-table__empty-action:empty{display:none}.co-data-table__skeleton{height:14px;border-radius:var(--co-border-radius-xxs);background:var(--co-color-gray-100);animation:co-dt-shimmer 1.5s ease-in-out infinite;width:70%}.co-data-table__skeleton--checkbox{width:16px;height:16px;margin:0 auto}@keyframes co-dt-shimmer{0%,100%{opacity:1}50%{opacity:0.4}}.co-data-table__row--skeleton{pointer-events:none;content-visibility:visible}.co-data-table__row--flash-create{animation:co-dt-flash-create 1s ease-out}.co-data-table__row--flash-update{animation:co-dt-flash-update 1s ease-out}.co-data-table__row--flash-delete{animation:co-dt-flash-delete 0.5s ease-out forwards}@keyframes co-dt-flash-create{0%{background-color:rgba(2, 162, 112, 0.15)}100%{background-color:transparent}}@keyframes co-dt-flash-update{0%{background-color:rgba(37, 99, 235, 0.15)}100%{background-color:transparent}}@keyframes co-dt-flash-delete{0%{opacity:1;background-color:rgba(170, 46, 27, 0.1)}100%{opacity:0;height:0;padding:0;overflow:hidden}}`;
|
|
4
4
|
|
|
5
5
|
const CoDataTable = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -12,6 +12,7 @@ const CoDataTable = class {
|
|
|
12
12
|
this.coColumnPin = createEvent(this, "coColumnPin", 7);
|
|
13
13
|
this.coRowDblClick = createEvent(this, "coRowDblClick", 7);
|
|
14
14
|
this.coRowClick = createEvent(this, "coRowClick", 7);
|
|
15
|
+
this.coEmptyAction = createEvent(this, "coEmptyAction", 7);
|
|
15
16
|
/* ─── DATA ──────────────────────────────────────────────── */
|
|
16
17
|
/** Column definitions (JSON string or array) */
|
|
17
18
|
this.columns = '[]';
|
|
@@ -30,6 +31,8 @@ const CoDataTable = class {
|
|
|
30
31
|
this.emptyMessage = 'No records found';
|
|
31
32
|
/** Empty state icon (Phosphor icon name). */
|
|
32
33
|
this.emptyIcon = 'magnifying-glass';
|
|
34
|
+
/** Variant for the prop-driven empty-action button. */
|
|
35
|
+
this.emptyActionVariant = 'stroke';
|
|
33
36
|
/* ─── SORT ──────────────────────────────────────────────── */
|
|
34
37
|
/** Current sort field */
|
|
35
38
|
this.sortField = '';
|
|
@@ -101,14 +104,17 @@ const CoDataTable = class {
|
|
|
101
104
|
this.suppressNextSort = false;
|
|
102
105
|
return;
|
|
103
106
|
}
|
|
107
|
+
// Standalone 3-state cycle: asc → desc → unsorted ('').
|
|
108
|
+
// (Controlled consumers like suite-v2 ignore `order` and drive sortField/
|
|
109
|
+
// sortOrder via props, so their own policy wins regardless of this.)
|
|
104
110
|
let order;
|
|
105
111
|
if (this.sortField === field) {
|
|
106
|
-
order = this.sortOrder === 'asc' ? 'desc' : 'asc';
|
|
112
|
+
order = this.sortOrder === 'asc' ? 'desc' : this.sortOrder === 'desc' ? '' : 'asc';
|
|
107
113
|
}
|
|
108
114
|
else {
|
|
109
115
|
order = 'asc';
|
|
110
116
|
}
|
|
111
|
-
this.sortField = field;
|
|
117
|
+
this.sortField = order === '' ? '' : field;
|
|
112
118
|
this.sortOrder = order;
|
|
113
119
|
this.coSort.emit({ field, order });
|
|
114
120
|
}
|
|
@@ -249,6 +255,18 @@ const CoDataTable = class {
|
|
|
249
255
|
renderColgroup() {
|
|
250
256
|
return (h("colgroup", null, this.selectable && h("col", { style: { width: '48px' } }), this.parsedColumns.map(col => (h("col", { style: { width: `${this.getColumnWidth(col)}px`, minWidth: `${col.minWidth || 80}px` } })))));
|
|
251
257
|
}
|
|
258
|
+
renderSortIcon(col) {
|
|
259
|
+
if (!col.sortable)
|
|
260
|
+
return null;
|
|
261
|
+
const isActive = this.sortField === col.field && this.sortOrder !== '';
|
|
262
|
+
const iconName = !isActive
|
|
263
|
+
? 'caret-up-down'
|
|
264
|
+
: (this.sortOrder === 'asc' ? 'caret-up' : 'caret-down');
|
|
265
|
+
return (h("span", { class: {
|
|
266
|
+
'co-data-table__sort-icon': true,
|
|
267
|
+
'co-data-table__sort-icon--active': isActive,
|
|
268
|
+
} }, h("co-icon", { name: iconName, size: 16, weight: isActive ? 'fill' : 'regular' })));
|
|
269
|
+
}
|
|
252
270
|
renderHeader() {
|
|
253
271
|
return (h("thead", { class: "co-data-table__head" }, h("tr", { class: "co-data-table__header-row" }, this.selectable && (h("th", { class: "co-data-table__th co-data-table__th--checkbox co-data-table__th--sticky", style: { left: '0px' } }, h("co-checkbox", { size: "small", checked: this.isAllSelected(), indeterminate: this.isSomeSelected(), onCoChange: () => this.handleSelectAll() }))), this.parsedColumns.map((col, i) => (h("th", { class: {
|
|
254
272
|
'co-data-table__th': true,
|
|
@@ -256,41 +274,44 @@ const CoDataTable = class {
|
|
|
256
274
|
'co-data-table__th--sortable': !!col.sortable,
|
|
257
275
|
'co-data-table__th--sorted': this.sortField === col.field,
|
|
258
276
|
[`co-data-table__th--align-${col.align || 'left'}`]: true,
|
|
259
|
-
}, style: this.getColumnStyle(col),
|
|
277
|
+
}, style: this.getColumnStyle(col), "aria-sort": col.sortable && this.sortField === col.field && this.sortOrder !== ''
|
|
278
|
+
? (this.sortOrder === 'asc' ? 'ascending' : 'descending')
|
|
279
|
+
: undefined }, h("span", { class: "co-data-table__th-content" }, h("span", { class: {
|
|
260
280
|
'co-data-table__pin-icon': true,
|
|
261
281
|
'co-data-table__pin-icon--active': !!col.sticky,
|
|
262
|
-
}, title: col.sticky ? 'Unpin column' : 'Pin column', onClick: (e) => this.handleColumnPin(col.field, e) }, h("co-icon", { name: "push-pin", size: 14, weight: col.sticky ? 'fill' : 'regular' })), h("span", { class: "co-data-table__th-label" }, col.label), col.
|
|
263
|
-
'co-data-table__sort-icon': true,
|
|
264
|
-
'co-data-table__sort-icon--active': this.sortField === col.field,
|
|
265
|
-
} }, h("co-icon", { name: "caret-up-down", size: 16, weight: this.sortField === col.field ? 'fill' : 'regular' })))), this.resizable && i < this.parsedColumns.length - 1 && (h("span", { class: {
|
|
282
|
+
}, title: col.sticky ? 'Unpin column' : 'Pin column', onClick: (e) => this.handleColumnPin(col.field, e) }, h("co-icon", { name: "push-pin", size: 14, weight: col.sticky ? 'fill' : 'regular' })), col.sortable ? (h("button", { type: "button", class: "co-data-table__sort-button", "aria-label": `Sort by ${col.label}`, onClick: () => this.handleSort(col.field) }, h("span", { class: "co-data-table__th-label" }, col.label), this.renderSortIcon(col))) : (h("span", { class: "co-data-table__th-label" }, col.label))), this.resizable && i < this.parsedColumns.length - 1 && (h("span", { class: {
|
|
266
283
|
'co-data-table__resize-handle': true,
|
|
267
284
|
'co-data-table__resize-handle--active': this.resizingColumn === col.field,
|
|
268
285
|
}, onMouseDown: (e) => this.handleResizeStart(col.field, e), onClick: (e) => e.stopPropagation() }))))))));
|
|
269
286
|
}
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
287
|
+
// Skeleton rows shown WHILE loading. Rendered as a SEPARATE <tbody> that
|
|
288
|
+
// co-exists with the always-mounted default <slot/> (see render()) — it never
|
|
289
|
+
// REPLACES it. Previously the body position was swapped between this skeleton
|
|
290
|
+
// and <slot/> on every `loading` toggle; that swap tore the slot down and
|
|
291
|
+
// orphaned the consumer's projected rows (e.g. Vue's <tbody>), so a concurrent
|
|
292
|
+
// consumer patch threw "insertBefore ... not a child of this node" on data/model
|
|
293
|
+
// switches. Row rendering itself is still delegated to the consumer via the
|
|
294
|
+
// default slot — this avoids Stencil's costly per-cell named-slot relocation.
|
|
295
|
+
renderSkeletonBody() {
|
|
296
|
+
return (h("tbody", { class: "co-data-table__body co-data-table__body--skeleton", "aria-hidden": "true" }, Array.from({ length: this.skeletonRows }).map((_, rowIndex) => (h("tr", { class: "co-data-table__row co-data-table__row--skeleton", key: `skeleton-${rowIndex}` }, this.selectable && (h("td", { class: "co-data-table__td co-data-table__td--checkbox co-data-table__td--sticky", style: { left: '0px' } }, h("div", { class: "co-data-table__skeleton co-data-table__skeleton--checkbox" }))), this.parsedColumns.map(col => (h("td", { class: {
|
|
297
|
+
'co-data-table__td': true,
|
|
298
|
+
'co-data-table__td--sticky': !!col.sticky,
|
|
299
|
+
}, style: Object.assign({}, this.getColumnStyle(col)) }, h("div", { class: "co-data-table__skeleton" })))))))));
|
|
281
300
|
}
|
|
282
301
|
renderEmpty() {
|
|
283
302
|
if (this.loading || this.parsedRows.length > 0)
|
|
284
303
|
return null;
|
|
285
|
-
return (h("div", { class: "co-data-table__empty", part: "empty" }, h("div", { class: "co-data-table__empty-icon" }, h("co-icon", { name: this.emptyIcon, size: 32, weight: "regular" })), this.emptyTitle && (h("h3", { class: "co-data-table__empty-title" }, this.emptyTitle)), this.emptyMessage && (h("p", { class: "co-data-table__empty-message" }, this.emptyMessage)), h("div", { class: "co-data-table__empty-action" },
|
|
304
|
+
return (h("div", { class: "co-data-table__empty", part: "empty" }, h("div", { class: "co-data-table__empty-icon" }, h("co-icon", { name: this.emptyIcon, size: 32, weight: "regular" })), this.emptyTitle && (h("h3", { class: "co-data-table__empty-title" }, this.emptyTitle)), this.emptyMessage && (h("p", { class: "co-data-table__empty-message" }, this.emptyMessage)), h("div", { class: "co-data-table__empty-action" }, this.emptyActionLabel
|
|
305
|
+
? (h("co-button", { variant: this.emptyActionVariant, size: "m", label: this.emptyActionLabel, iconLeft: this.emptyActionIcon, onClick: () => this.coEmptyAction.emit() }))
|
|
306
|
+
: h("slot", { name: "empty-action" }))));
|
|
286
307
|
}
|
|
287
308
|
render() {
|
|
288
|
-
return (h("div", { key: '
|
|
309
|
+
return (h("div", { key: '0ca5b4b0a0a31c1ea7488a7ca22b64683a9d35e1', class: {
|
|
289
310
|
'co-data-table': true,
|
|
290
311
|
'co-data-table--resizing': this.resizingColumn !== null,
|
|
291
312
|
'co-data-table--loading': this.loading,
|
|
292
313
|
'co-data-table--empty': !this.loading && this.parsedRows.length === 0,
|
|
293
|
-
} }, h("div", { key: '
|
|
314
|
+
} }, h("div", { key: 'b2155d0ad52836223b65bb396775bfe726f25966', class: "co-data-table__scroll" }, h("table", { key: 'f950dc3e38660fd1d80f6883bb58384f6e03ef07', class: "co-data-table__table", style: { width: `${this.getTableWidth()}px`, minWidth: '100%' } }, this.renderColgroup(), this.renderHeader(), h("slot", { key: '33751ea8dfef38c5c285b8a08dc763845f509bb7' }), this.loading ? this.renderSkeletonBody() : null)), this.renderEmpty()));
|
|
294
315
|
}
|
|
295
316
|
get el() { return getElement(this); }
|
|
296
317
|
static get watchers() { return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, a as getElement } from './index-
|
|
2
|
-
import { R as RequiredMark } from './requiredMark-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, a as getElement } from './index-Es9IUmmt.js';
|
|
2
|
+
import { R as RequiredMark } from './requiredMark-Bg25QWFn.js';
|
|
3
3
|
import { g as getDateStrings } from './dateI18n-C1DCLOEl.js';
|
|
4
4
|
|
|
5
5
|
const coDatePickerCss = () => `:host{display:block;font-family:var(--co-font-family-primary)}.co-date-picker{display:flex;flex-direction:column;gap:var(--co-spacing-sm2)}.co-date-picker__label{padding:0 var(--co-spacing-xs);color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);font-weight:400;letter-spacing:var(--co-font-letter-spacing-body);line-height:1;white-space:nowrap;cursor:default}.co-date-picker__helper{display:flex;align-items:center;gap:var(--co-spacing-xs);padding:0 var(--co-spacing-xs);color:var(--co-semantic-text-muted);font-size:var(--co-font-size-14);font-weight:400;letter-spacing:var(--co-font-letter-spacing-body);line-height:1}.co-date-picker__helper--error{color:var(--co-semantic-status-error)}.co-date-picker co-popover{display:block;width:100%}.co-date-picker__trigger{display:block;width:100%;cursor:text}.co-date-picker__panel{padding:var(--co-spacing-md)}.co-date-picker__sheet{display:flex;justify-content:center;padding:var(--co-spacing-sm) 0 var(--co-spacing-lg)}:host([layout='horizontal']) .co-date-picker{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-date-picker__label{grid-column:1;grid-row:1;padding-top:var(--co-spacing-sm2);min-width:0}:host([layout='horizontal']) .co-date-picker__label{white-space:normal}:host([layout='horizontal']) .co-date-picker>:not(.co-date-picker__label){grid-column:2;min-width:0}.co-field-required{margin-left:2px;color:var(--co-color-status-error)}.co-field-required__caption{margin-left:4px;color:var(--co-semantic-text-muted);font-size:var(--co-font-size-12);font-weight:400}.co-field-required__caption::before{content:var(--co-field-required-text, ' (required)')}`;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, a as getElement } from './index-
|
|
2
|
-
import { R as RequiredMark } from './requiredMark-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, a as getElement } from './index-Es9IUmmt.js';
|
|
2
|
+
import { R as RequiredMark } from './requiredMark-Bg25QWFn.js';
|
|
3
3
|
import { g as getDateStrings } from './dateI18n-C1DCLOEl.js';
|
|
4
|
-
import { i as isValidYMD, t as toLocalDate, p as parseISO, c as compareYMD, a as todayYMD, b as addMonths, s as startOfMonth, d as addDays, f as formatDisplay } from './dates-
|
|
4
|
+
import { i as isValidYMD, t as toLocalDate, p as parseISO, c as compareYMD, a as todayYMD, b as addMonths, s as startOfMonth, d as addDays, f as formatDisplay } from './dates-tPYikBRJ.js';
|
|
5
5
|
|
|
6
|
-
const coDateRangePickerCss = () => `:host{display:block;font-family:var(--co-font-family-primary);font-size:var(--co-font-size-14)}.co-date-range-picker{display:flex;flex-direction:column;gap:var(--co-spacing-sm2)}.co-date-range-picker__label{font-size:var(--co-font-size-14);font-weight:400;color:var(--co-semantic-text-secondary);line-height:1;padding:0 var(--co-spacing-xs)}.co-date-range-picker co-popover{display:block;width:100%}.co-date-range-picker--s .co-date-range-picker__trigger{min-height:28px;padding:0 var(--co-spacing-sm)}.co-date-range-picker--sm .co-date-range-picker__trigger{min-height:32px;padding:0 var(--co-spacing-sm)}.co-date-range-picker--lg .co-date-range-picker__trigger{min-height:48px;padding:0 var(--co-spacing-lg)}.co-date-range-picker__trigger{display:inline-flex;align-items:center;gap:var(--co-spacing-sm2);width:100%;min-height:40px;padding:0 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);cursor:pointer;color:var(--co-semantic-text-default);box-sizing:border-box;transition:border-color 0.15s ease, box-shadow 0.15s ease}.co-date-range-picker__trigger--open{border-color:var(--co-semantic-border-focus);box-shadow:0 0 0 2px var(--co-semantic-border-focus-ring)}.co-date-range-picker__trigger--disabled{opacity:0.5;cursor:not-allowed}.co-date-range-picker--invalid .co-date-range-picker__trigger{border-color:var(--co-semantic-status-error)}.co-date-range-picker__icon,.co-date-range-picker__caret{color:var(--co-semantic-text-muted);flex-shrink:0}.co-date-range-picker__trigger-text{flex:1;min-width:0;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.co-date-range-picker__trigger-text--placeholder{color:var(--co-semantic-text-muted)}.co-date-range-picker__clear{background:none;border:0;padding:0;cursor:pointer;color:var(--co-semantic-text-muted);display:inline-flex;align-items:center;flex-shrink:0}.co-date-range-picker__clear:hover{color:var(--co-semantic-text-default)}.co-date-range-picker__panel{display:flex;flex-direction:column;gap:var(--co-spacing-md);padding:var(--co-spacing-md);min-width:280px}.co-date-range-picker__fields{display:grid;grid-template-columns:1fr 1fr;gap:var(--co-spacing-sm)}.co-date-range-picker__body{display:flex;gap:var(--co-spacing-md);align-items:flex-start}.co-date-range-picker__body--touch{flex-direction:column;align-items:stretch}.co-date-range-picker__body--touch .co-date-range-picker__presets{flex-direction:row;flex-wrap:wrap;min-width:0;border-right:0;padding-right:0;border-bottom:1px solid var(--co-semantic-border-subtle);padding-bottom:var(--co-spacing-sm)}.co-date-range-picker__body--touch co-calendar{align-self:center}.co-date-range-picker__presets{display:flex;flex-direction:column;gap:var(--co-spacing-xxs);min-width:120px;border-right:1px solid var(--co-semantic-border-subtle);padding-right:var(--co-spacing-md)}.co-date-range-picker__preset{text-align:left;background:none;border:0;padding:var(--co-spacing-xs) var(--co-spacing-sm);border-radius:var(--co-border-radius-xs);font-size:var(--co-font-size-14);font-family:inherit;color:var(--co-semantic-text-default);cursor:pointer;transition:background 0.1s ease}.co-date-range-picker__preset:hover{background:var(--co-semantic-surface-hover)}.co-date-range-picker__footer{display:flex;justify-content:flex-end;gap:var(--co-spacing-sm);padding-top:var(--co-spacing-sm);border-top:1px solid var(--co-semantic-border-subtle)}.co-date-range-picker__btn{padding:var(--co-spacing-xs) var(--co-spacing-md);border-radius:var(--co-border-radius-xs);font-size:var(--co-font-size-14);font-family:inherit;font-weight:500;cursor:pointer;border:0}.co-date-range-picker__btn--ghost{background:transparent;color:var(--co-semantic-text-default)}.co-date-range-picker__btn--ghost:hover{background:var(--co-semantic-surface-hover)}.co-date-range-picker__btn--primary{background:var(--co-color-primary-azul);color:var(--co-color-base-blanco, #fff)}.co-date-range-picker__btn--primary:disabled{opacity:0.5;cursor:not-allowed}.co-date-range-picker__helper{display:inline-flex;align-items:center;gap:var(--co-spacing-xs);font-size:var(--co-font-size-14);color:var(--co-semantic-text-muted);padding:0 var(--co-spacing-xs)}.co-date-range-picker__helper--error{color:var(--co-semantic-status-error)}:host([layout='horizontal']) .co-date-range-picker{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-date-range-picker__label{grid-column:1;grid-row:1;padding-top:var(--co-spacing-sm2);min-width:0}:host([layout='horizontal']) .co-date-range-picker__label{white-space:normal}:host([layout='horizontal']) .co-date-range-picker>:not(.co-date-range-picker__label){grid-column:2;min-width:0}.co-field-required{margin-left:2px;color:var(--co-color-status-error)}.co-field-required__caption{margin-left:4px;color:var(--co-semantic-text-muted);font-size:var(--co-font-size-12);font-weight:400}.co-field-required__caption::before{content:var(--co-field-required-text, ' (required)')}`;
|
|
6
|
+
const coDateRangePickerCss = () => `:host{display:block;font-family:var(--co-font-family-primary);font-size:var(--co-font-size-14)}.co-date-range-picker{display:flex;flex-direction:column;gap:var(--co-spacing-sm2)}.co-date-range-picker__label{font-size:var(--co-font-size-14);font-weight:400;color:var(--co-semantic-text-secondary);line-height:1;padding:0 var(--co-spacing-xs)}.co-date-range-picker co-popover{display:block;width:100%}.co-date-range-picker--s .co-date-range-picker__trigger{min-height:28px;padding:0 var(--co-spacing-sm)}.co-date-range-picker--sm .co-date-range-picker__trigger{min-height:32px;padding:0 var(--co-spacing-sm)}.co-date-range-picker--lg .co-date-range-picker__trigger{min-height:48px;padding:0 var(--co-spacing-lg)}.co-date-range-picker__trigger{display:inline-flex;align-items:center;gap:var(--co-spacing-sm2);width:100%;min-height:40px;padding:0 var(--co-spacing-md);background:color-mix(in srgb, var(--co-semantic-surface-secondary) 55%, transparent);-webkit-backdrop-filter:blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate));backdrop-filter:blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate));border:1px solid var(--co-semantic-border-subtle);border-radius:var(--co-border-radius-xs);cursor:pointer;color:var(--co-semantic-text-default);box-sizing:border-box;transition:border-color 0.15s ease, box-shadow 0.15s ease}.co-date-range-picker__trigger--open{border-color:var(--co-semantic-border-focus);box-shadow:0 0 0 2px var(--co-semantic-border-focus-ring)}.co-date-range-picker__trigger--disabled{opacity:0.5;cursor:not-allowed}.co-date-range-picker--invalid .co-date-range-picker__trigger{border-color:var(--co-semantic-status-error)}.co-date-range-picker__icon,.co-date-range-picker__caret{color:var(--co-semantic-text-muted);flex-shrink:0}.co-date-range-picker__trigger-text{flex:1;min-width:0;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.co-date-range-picker__trigger-text--placeholder{color:var(--co-semantic-text-muted)}.co-date-range-picker__clear{background:none;border:0;padding:0;cursor:pointer;color:var(--co-semantic-text-muted);display:inline-flex;align-items:center;flex-shrink:0}.co-date-range-picker__clear:hover{color:var(--co-semantic-text-default)}.co-date-range-picker__panel{display:flex;flex-direction:column;gap:var(--co-spacing-md);padding:var(--co-spacing-md);min-width:280px}.co-date-range-picker__fields{display:grid;grid-template-columns:1fr 1fr;gap:var(--co-spacing-sm)}.co-date-range-picker__body{display:flex;gap:var(--co-spacing-md);align-items:flex-start}.co-date-range-picker__body--touch{flex-direction:column;align-items:stretch}.co-date-range-picker__body--touch .co-date-range-picker__presets{flex-direction:row;flex-wrap:wrap;min-width:0;border-right:0;padding-right:0;border-bottom:1px solid var(--co-semantic-border-subtle);padding-bottom:var(--co-spacing-sm)}.co-date-range-picker__body--touch co-calendar{align-self:center}.co-date-range-picker__presets{display:flex;flex-direction:column;gap:var(--co-spacing-xxs);min-width:120px;border-right:1px solid var(--co-semantic-border-subtle);padding-right:var(--co-spacing-md)}.co-date-range-picker__preset{text-align:left;background:none;border:0;padding:var(--co-spacing-xs) var(--co-spacing-sm);border-radius:var(--co-border-radius-xs);font-size:var(--co-font-size-14);font-family:inherit;color:var(--co-semantic-text-default);cursor:pointer;transition:background 0.1s ease}.co-date-range-picker__preset:hover{background:var(--co-semantic-surface-hover)}.co-date-range-picker__footer{display:flex;justify-content:flex-end;gap:var(--co-spacing-sm);padding-top:var(--co-spacing-sm);border-top:1px solid var(--co-semantic-border-subtle)}.co-date-range-picker__btn{padding:var(--co-spacing-xs) var(--co-spacing-md);border-radius:var(--co-border-radius-xs);font-size:var(--co-font-size-14);font-family:inherit;font-weight:500;cursor:pointer;border:0}.co-date-range-picker__btn--ghost{background:transparent;color:var(--co-semantic-text-default)}.co-date-range-picker__btn--ghost:hover{background:var(--co-semantic-surface-hover)}.co-date-range-picker__btn--primary{background:var(--co-color-primary-azul);color:var(--co-color-base-blanco, #fff)}.co-date-range-picker__btn--primary:disabled{opacity:0.5;cursor:not-allowed}.co-date-range-picker__helper{display:inline-flex;align-items:center;gap:var(--co-spacing-xs);font-size:var(--co-font-size-14);color:var(--co-semantic-text-muted);padding:0 var(--co-spacing-xs)}.co-date-range-picker__helper--error{color:var(--co-semantic-status-error)}:host([layout='horizontal']) .co-date-range-picker{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-date-range-picker__label{grid-column:1;grid-row:1;padding-top:var(--co-spacing-sm2);min-width:0}:host([layout='horizontal']) .co-date-range-picker__label{white-space:normal}:host([layout='horizontal']) .co-date-range-picker>:not(.co-date-range-picker__label){grid-column:2;min-width:0}.co-field-required{margin-left:2px;color:var(--co-color-status-error)}.co-field-required__caption{margin-left:4px;color:var(--co-semantic-text-muted);font-size:var(--co-font-size-12);font-weight:400}.co-field-required__caption::before{content:var(--co-field-required-text, ' (required)')}@supports not (background: color-mix(in srgb, red, transparent)){.co-date-range-picker__trigger{background:var(--co-semantic-surface-secondary)}}`;
|
|
7
7
|
|
|
8
8
|
const CoDateRangePicker = class {
|
|
9
9
|
constructor(hostRef) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, a as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, a as getElement } from './index-Es9IUmmt.js';
|
|
2
2
|
|
|
3
3
|
const coDateRangeCss = () => `:host{display:block}`;
|
|
4
4
|
|
|
@@ -31,7 +31,7 @@ const CoDateRange = class {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
render() {
|
|
34
|
-
return (h("co-date-range-picker", { key: '
|
|
34
|
+
return (h("co-date-range-picker", { key: 'a366a10a7980292014ac8a9f48a97077cac09299', value: this.value, label: this.label, placeholder: this.placeholder, disabled: this.disabled, clearable: this.clearable, presets: this.presets, helperText: this.helperText, locale: this.locale, applyLabel: this.applyLabel, clearLabel: this.clearLabel, onCoApply: this.handleApply, onCoClear: () => this.coClear.emit() }));
|
|
35
35
|
}
|
|
36
36
|
get el() { return getElement(this); }
|
|
37
37
|
};
|