@prolibu-suite/cobalt-core 0.3.0 → 0.5.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/README.md +3 -3
- package/custom-elements.json +6887 -3484
- package/dist/cjs/co-accordion.cjs.entry.js +4 -4
- package/dist/cjs/co-app-shell.cjs.entry.js +3 -3
- package/dist/cjs/co-autocomplete.cjs.entry.js +38 -73
- package/dist/cjs/co-avatar-group.cjs.entry.js +3 -3
- package/dist/cjs/co-avatar.cjs.entry.js +9 -4
- package/dist/cjs/co-badge.cjs.entry.js +2 -2
- package/dist/cjs/co-bottom-sheet.cjs.entry.js +4 -4
- 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 +10 -4
- package/dist/cjs/co-calendar-month.cjs.entry.js +2 -2
- package/dist/cjs/co-calendar_3.cjs.entry.js +50 -15
- package/dist/cjs/co-card.cjs.entry.js +3 -3
- package/dist/cjs/co-checkbox-group.cjs.entry.js +4 -4
- package/dist/cjs/co-checkbox.cjs.entry.js +18 -6
- package/dist/cjs/co-chip_2.cjs.entry.js +485 -0
- package/dist/cjs/co-color-picker.cjs.entry.js +4 -4
- package/dist/cjs/co-column-picker.cjs.entry.js +3 -3
- package/dist/cjs/co-combobox.cjs.entry.js +51 -82
- package/dist/cjs/co-command-search.cjs.entry.js +20 -59
- package/dist/cjs/co-data-table-pagination.cjs.entry.js +5 -5
- package/dist/cjs/co-data-table.cjs.entry.js +73 -17
- 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 +3 -3
- package/dist/cjs/co-fab.cjs.entry.js +5 -5
- package/dist/cjs/co-file-field.cjs.entry.js +7 -7
- 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 +23 -7
- package/dist/cjs/co-icon.cjs.entry.js +3 -3
- package/dist/cjs/co-input.cjs.entry.js +36 -7
- package/dist/cjs/co-json-field.cjs.entry.js +5 -5
- package/dist/cjs/co-lightbox.cjs.entry.js +6 -6
- package/dist/cjs/co-list-footer.cjs.entry.js +2 -2
- package/dist/cjs/co-list-item.cjs.entry.js +5 -5
- package/dist/cjs/co-loader.cjs.entry.js +34 -0
- 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 +11 -3
- package/dist/cjs/co-menu.cjs.entry.js +3 -3
- package/dist/cjs/co-modal.cjs.entry.js +29 -5
- package/dist/cjs/co-navbar.cjs.entry.js +3 -3
- package/dist/cjs/co-number-field.cjs.entry.js +5 -5
- package/dist/cjs/{co-loader_2.cjs.entry.js → co-overlay.cjs.entry.js} +2 -32
- package/dist/cjs/co-page-header.cjs.entry.js +2 -2
- package/dist/cjs/co-phone-field.cjs.entry.js +4 -4
- package/dist/cjs/co-popover.cjs.entry.js +12 -3
- package/dist/cjs/co-progress-bar.cjs.entry.js +4 -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 +31 -135
- package/dist/cjs/co-rich-text-editor.cjs.entry.js +5 -5
- package/dist/cjs/co-rich-text-toolbar.cjs.entry.js +1 -1
- package/dist/cjs/co-rich-text-viewer.cjs.entry.js +2 -2
- 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 +7 -7
- package/dist/cjs/co-separator.cjs.entry.js +2 -2
- package/dist/cjs/co-sidebar-nav.cjs.entry.js +10 -8
- package/dist/cjs/co-sidebar.cjs.entry.js +3 -3
- package/dist/cjs/co-skeleton.cjs.entry.js +2 -2
- 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 +21 -3
- package/dist/cjs/co-tab.cjs.entry.js +8 -5
- package/dist/cjs/co-tags-field.cjs.entry.js +8 -8
- package/dist/cjs/co-textarea.cjs.entry.js +6 -6
- package/dist/cjs/co-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 +3 -3
- package/dist/cjs/co-transfer-list.cjs.entry.js +3 -3
- package/dist/cjs/co-video.cjs.entry.js +4 -4
- package/dist/cjs/cobalt.cjs.js +2 -2
- package/dist/cjs/{fieldChip-CDIMz_Y6.js → fieldChip-D8YJCyQF.js} +1 -1
- package/dist/cjs/{index-5NdsiFjZ.js → index-4y1Dm145.js} +64 -11
- package/dist/cjs/{index-BumlM92r.js → index-DxEFsH_t.js} +69 -13
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{requiredMark-CqMGt1H1.js → requiredMark-B3pKyqYI.js} +1 -1
- package/dist/cobalt/cobalt.css +1 -1
- package/dist/cobalt/cobalt.esm.js +1 -1
- package/dist/cobalt/p-002e5beb.entry.js +1 -0
- package/dist/cobalt/{p-ba90e871.entry.js → p-02c5a9a9.entry.js} +1 -1
- package/dist/cobalt/p-075eed3d.entry.js +1 -0
- package/dist/cobalt/p-0c0621a7.entry.js +1 -0
- package/dist/cobalt/{p-ef7d4ae3.entry.js → p-0d6a562d.entry.js} +1 -1
- package/dist/cobalt/p-0d7536a8.entry.js +1 -0
- package/dist/cobalt/{p-6d1217c3.entry.js → p-13fc9c8a.entry.js} +1 -1
- package/dist/cobalt/{p-afb7e19e.entry.js → p-14d4c5c7.entry.js} +1 -1
- package/dist/cobalt/{p-31ab9a46.entry.js → p-1681ce1d.entry.js} +1 -1
- package/dist/cobalt/{p-93046365.entry.js → p-1726ce07.entry.js} +1 -1
- package/dist/cobalt/p-20ba59a2.entry.js +1 -0
- package/dist/cobalt/p-2d1cbd7f.entry.js +1 -0
- package/dist/cobalt/{p-4871690e.entry.js → p-373cd08e.entry.js} +1 -1
- package/dist/cobalt/{p-37595103.entry.js → p-3f06d373.entry.js} +1 -1
- package/dist/cobalt/p-3f68fd2e.entry.js +1 -0
- package/dist/cobalt/p-47a2dd67.entry.js +1 -0
- package/dist/cobalt/p-495c9b99.entry.js +1 -0
- package/dist/cobalt/p-4a075257.entry.js +1 -0
- package/dist/cobalt/{p-52de17da.entry.js → p-5647ca9d.entry.js} +1 -1
- package/dist/cobalt/{p-1a07c23c.entry.js → p-5b31d45b.entry.js} +1 -1
- package/dist/cobalt/{p-929e647f.entry.js → p-5c3101b5.entry.js} +1 -1
- package/dist/cobalt/{p-8d59f5ad.entry.js → p-5c43d30e.entry.js} +1 -1
- package/dist/cobalt/{p-4504f7b0.entry.js → p-5e9a9caf.entry.js} +1 -1
- package/dist/cobalt/p-5edd0d3f.entry.js +1 -0
- package/dist/cobalt/{p-12e2c2c4.entry.js → p-627d2d1a.entry.js} +1 -1
- package/dist/cobalt/p-6911a034.entry.js +1 -0
- package/dist/cobalt/{p-e53861e4.entry.js → p-6ad1625a.entry.js} +1 -1
- package/dist/cobalt/{p-f4063c41.entry.js → p-70f70e02.entry.js} +1 -1
- package/dist/cobalt/p-73b30ebb.entry.js +1 -0
- package/dist/cobalt/p-771bc8fe.entry.js +1 -0
- package/dist/cobalt/p-7780ddb5.entry.js +1 -0
- package/dist/cobalt/p-77d01b39.entry.js +1 -0
- package/dist/cobalt/p-7FZXeBK4.js +1 -0
- package/dist/cobalt/p-7a3fb93b.entry.js +1 -0
- package/dist/cobalt/{p-0bb55163.entry.js → p-809015dd.entry.js} +1 -1
- package/dist/cobalt/p-8128e84a.entry.js +1 -0
- package/dist/cobalt/p-81cfd951.entry.js +1 -0
- package/dist/cobalt/p-82ce1178.entry.js +1 -0
- package/dist/cobalt/p-85eed52c.entry.js +1 -0
- package/dist/cobalt/p-86d4e016.entry.js +1 -0
- package/dist/cobalt/{p-cb235aa7.entry.js → p-86e60cfa.entry.js} +1 -1
- package/dist/cobalt/p-8a9ed2da.entry.js +1 -0
- package/dist/cobalt/{p-8e1dc062.entry.js → p-8dfb6886.entry.js} +1 -1
- package/dist/cobalt/{p-2f86e1e0.entry.js → p-8e823c15.entry.js} +1 -1
- package/dist/cobalt/p-9a587867.entry.js +1 -0
- package/dist/cobalt/p-9c6ca902.entry.js +1 -0
- package/dist/cobalt/{p-279bf91c.entry.js → p-9c873a6a.entry.js} +1 -1
- package/dist/cobalt/{p-BZJ7NCm5.js → p-BAA4ln31.js} +1 -1
- package/dist/cobalt/{p-CegCk7FL.js → p-Bgxofdfb.js} +1 -1
- package/dist/cobalt/p-a6900010.entry.js +1 -0
- package/dist/cobalt/p-a9afbaa6.entry.js +1 -0
- package/dist/cobalt/{p-c10697e1.entry.js → p-aa20ffca.entry.js} +1 -1
- package/dist/cobalt/{p-3863ea91.entry.js → p-ac5df270.entry.js} +1 -1
- package/dist/cobalt/{p-b6f20268.entry.js → p-af4cb263.entry.js} +1 -1
- package/dist/cobalt/p-b1197c08.entry.js +1 -0
- package/dist/cobalt/{p-4c01d984.entry.js → p-b4bed98b.entry.js} +1 -1
- package/dist/cobalt/{p-58a53421.entry.js → p-b8ec0cc1.entry.js} +1 -1
- package/dist/cobalt/p-ba66584f.entry.js +1 -0
- package/dist/cobalt/p-bb534985.entry.js +1 -0
- package/dist/cobalt/{p-1531d3c9.entry.js → p-c0f39ddd.entry.js} +1 -1
- package/dist/cobalt/{p-51a53177.entry.js → p-c1e53e4c.entry.js} +1 -1
- package/dist/cobalt/p-c2e2eee9.entry.js +1 -0
- package/dist/cobalt/p-c3462def.entry.js +1 -0
- package/dist/cobalt/p-c6fedc59.entry.js +1 -0
- package/dist/cobalt/{p-6e808b3a.entry.js → p-c750b2d2.entry.js} +1 -1
- package/dist/cobalt/{p-70b14b05.entry.js → p-cc0a4617.entry.js} +1 -1
- package/dist/cobalt/{p-29be61a9.entry.js → p-cc8e2f16.entry.js} +1 -1
- package/dist/cobalt/{p-790d384e.entry.js → p-d9608046.entry.js} +1 -1
- package/dist/cobalt/{p-cfb36943.entry.js → p-e1957078.entry.js} +1 -1
- package/dist/cobalt/{p-8d7fdb9d.entry.js → p-e2762263.entry.js} +1 -1
- package/dist/cobalt/p-e33853fa.entry.js +1 -0
- package/dist/cobalt/p-e420d5c9.entry.js +1 -0
- package/dist/cobalt/{p-377c2ccc.entry.js → p-e4a539da.entry.js} +1 -1
- package/dist/cobalt/{p-d809bd44.entry.js → p-e7085f08.entry.js} +1 -1
- package/dist/cobalt/p-e710b9ea.entry.js +1 -0
- package/dist/cobalt/{p-eb18fdbf.entry.js → p-e9aaeaf7.entry.js} +1 -1
- package/dist/cobalt/{p-65af5017.entry.js → p-f073b467.entry.js} +1 -1
- package/dist/cobalt/p-f0de4415.entry.js +1 -0
- package/dist/cobalt/p-f36e461f.entry.js +1 -0
- package/dist/cobalt/p-f6ac5301.entry.js +1 -0
- package/dist/cobalt/{p-9a04ca90.entry.js → p-f6b0c4a0.entry.js} +1 -1
- package/dist/cobalt/p-f86ccb38.entry.js +1 -0
- package/dist/cobalt/{p-1f747e45.entry.js → p-fb251497.entry.js} +1 -1
- package/dist/cobalt/p-fd27c2bd.entry.js +1 -0
- package/dist/cobalt/p-tT-aZV0-.js +2 -0
- package/dist/collection/collection-manifest.json +9 -1
- package/dist/collection/components/co-accordion/co-accordion.css +20 -8
- package/dist/collection/components/co-accordion/co-accordion.js +5 -2
- package/dist/collection/components/co-app-shell/co-app-shell.js +2 -2
- package/dist/collection/components/co-autocomplete/co-autocomplete.css +4 -751
- package/dist/collection/components/co-autocomplete/co-autocomplete.js +41 -76
- package/dist/collection/components/co-avatar/co-avatar.js +27 -3
- package/dist/collection/components/co-avatar-group/co-avatar-group.js +2 -2
- package/dist/collection/components/co-badge/co-badge.js +1 -1
- package/dist/collection/components/co-bottom-sheet/co-bottom-sheet.js +3 -3
- 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 +23 -0
- package/dist/collection/components/co-button/co-button.js +48 -2
- package/dist/collection/components/co-button-group/co-button-group.js +2 -2
- package/dist/collection/components/co-calendar/co-calendar.css +12 -12
- package/dist/collection/components/co-calendar/co-calendar.js +1 -1
- package/dist/collection/components/co-calendar-month/co-calendar-month.js +1 -1
- package/dist/collection/components/co-card/co-card.js +2 -2
- package/dist/collection/components/co-checkbox/co-checkbox.css +63 -0
- package/dist/collection/components/co-checkbox/co-checkbox.js +58 -7
- package/dist/collection/components/co-checkbox-group/co-checkbox-group.js +3 -3
- package/dist/collection/components/co-chip/co-chip.css +56 -1
- package/dist/collection/components/co-chip/co-chip.js +52 -9
- package/dist/collection/components/co-color-picker/co-color-picker.js +2 -2
- package/dist/collection/components/co-column-picker/co-column-picker.js +2 -2
- package/dist/collection/components/co-combobox/co-combobox.css +6 -830
- package/dist/collection/components/co-combobox/co-combobox.js +73 -84
- package/dist/collection/components/co-command-search/co-command-search.css +2 -60
- package/dist/collection/components/co-command-search/co-command-search.js +23 -48
- package/dist/collection/components/co-data-table/co-data-table.css +47 -8
- package/dist/collection/components/co-data-table/co-data-table.js +199 -15
- 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 +4 -7
- 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 +9 -9
- package/dist/collection/components/co-drawer/co-drawer.css +63 -10
- package/dist/collection/components/co-drawer/co-drawer.js +60 -5
- 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 +39 -1
- package/dist/collection/components/co-empty-state/co-empty-state.js +72 -1
- package/dist/collection/components/co-event-calendar/co-event-calendar.js +2 -2
- package/dist/collection/components/co-fab/co-fab.css +8 -1
- package/dist/collection/components/co-fab/co-fab.js +24 -5
- package/dist/collection/components/co-file-field/co-file-field.js +5 -5
- package/dist/collection/components/co-file-type-tile/co-file-type-tile.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 +2 -2
- package/dist/collection/components/co-icon-button/co-icon-button.css +11 -4
- package/dist/collection/components/co-icon-button/co-icon-button.js +80 -25
- package/dist/collection/components/co-input/co-input.css +67 -6
- package/dist/collection/components/co-input/co-input.js +54 -5
- package/dist/collection/components/co-json-field/co-json-field.js +3 -3
- package/dist/collection/components/co-lightbox/co-lightbox.css +2 -2
- package/dist/collection/components/co-lightbox/co-lightbox.js +4 -4
- package/dist/collection/components/co-list-footer/co-list-footer.js +1 -1
- package/dist/collection/components/co-list-item/co-list-item.js +4 -4
- package/dist/collection/components/co-media-thumb/co-media-thumb.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 +27 -9
- package/dist/collection/components/co-menu-item/co-menu-item.js +69 -2
- package/dist/collection/components/co-modal/co-modal.css +17 -0
- package/dist/collection/components/co-modal/co-modal.js +59 -6
- package/dist/collection/components/co-navbar/co-navbar.js +2 -2
- package/dist/collection/components/co-number-field/co-number-field.css +10 -11
- package/dist/collection/components/co-number-field/co-number-field.js +2 -2
- package/dist/collection/components/co-option-list/co-option-list.css +966 -0
- package/dist/collection/components/co-option-list/co-option-list.js +899 -0
- package/dist/collection/components/co-option-list/optionListLogic.js +100 -0
- package/dist/collection/components/co-overlay/co-overlay.js +1 -1
- package/dist/collection/components/co-page-header/co-page-header.js +1 -1
- package/dist/collection/components/co-phone-field/co-phone-field.css +4 -7
- package/dist/collection/components/co-phone-field/co-phone-field.js +1 -1
- package/dist/collection/components/co-popover/co-popover.js +11 -2
- package/dist/collection/components/co-progress-bar/co-progress-bar.css +1 -1
- package/dist/collection/components/co-progress-bar/co-progress-bar.js +2 -2
- package/dist/collection/components/co-progress-circle/co-progress-circle.js +2 -2
- package/dist/collection/components/co-radio/co-radio.js +3 -3
- package/dist/collection/components/co-radio-group/co-radio-group.js +3 -3
- package/dist/collection/components/co-rating/co-rating.js +3 -3
- package/dist/collection/components/co-ref-field/co-ref-field.css +6 -897
- 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 +1 -1
- package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.js +2 -2
- 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 +4 -7
- package/dist/collection/components/co-select/co-select.js +4 -4
- 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 +8 -6
- package/dist/collection/components/co-sidebar-nav/co-sidebar-nav.js +8 -6
- package/dist/collection/components/co-skeleton/co-skeleton.js +1 -1
- package/dist/collection/components/co-slider/co-slider.js +2 -2
- package/dist/collection/components/co-switch/co-switch.css +3 -1
- package/dist/collection/components/co-switch/co-switch.js +3 -3
- package/dist/collection/components/co-tab/co-tab.css +93 -7
- package/dist/collection/components/co-tab/co-tab.js +45 -3
- package/dist/collection/components/co-tab-group/co-tab-group.css +19 -0
- package/dist/collection/components/co-tab-group/co-tab-group.js +41 -1
- package/dist/collection/components/co-tags-field/co-tags-field.js +5 -5
- package/dist/collection/components/co-textarea/co-textarea.js +4 -4
- package/dist/collection/components/co-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 +38 -0
- package/dist/collection/components/co-toggle-button/co-toggle-button.js +46 -3
- package/dist/collection/components/co-toggle-button-group/co-toggle-button-group.css +16 -0
- package/dist/collection/components/co-toggle-button-group/co-toggle-button-group.js +34 -2
- package/dist/collection/components/co-tooltip/co-tooltip.js +2 -2
- package/dist/collection/components/co-transfer-list/co-transfer-list.js +2 -2
- package/dist/collection/components/co-video/co-video.css +2 -2
- package/dist/collection/components/co-video/co-video.js +2 -2
- 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.js +1 -1
- package/dist/components/co-avatar.js +1 -1
- package/dist/components/co-badge.js +1 -1
- package/dist/components/co-bottom-sheet.js +1 -1
- package/dist/components/co-breadcrumb-item.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.js +1 -1
- 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.js +1 -1
- package/dist/components/co-fab.js +1 -1
- package/dist/components/co-file-field.js +1 -1
- package/dist/components/co-file-type-tile.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.js +1 -1
- package/dist/components/co-list-item.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.js +1 -1
- package/dist/components/co-slider.js +1 -1
- package/dist/components/co-switch.js +1 -1
- package/dist/components/co-tab-group.js +1 -1
- package/dist/components/co-tab.js +1 -1
- package/dist/components/co-tags-field.js +1 -1
- package/dist/components/co-textarea.js +1 -1
- package/dist/components/co-toast.js +1 -1
- package/dist/components/co-toggle-button-group.js +1 -1
- package/dist/components/co-toggle-button.js +1 -1
- package/dist/components/co-tooltip.js +1 -1
- package/dist/components/co-transfer-list.js +1 -1
- package/dist/components/co-video.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/p-BHqdcGDh.js +1 -0
- package/dist/components/{p-D3Y_ti3Q.js → p-BJTMFYax.js} +1 -1
- package/dist/components/p-Ba5lW0pA.js +1 -0
- package/dist/components/{p-CegCk7FL.js → p-Bgxofdfb.js} +1 -1
- package/dist/components/{p-BB2OaYKF.js → p-CNIs9j-h.js} +1 -1
- package/dist/components/{p-DeZxp9vb.js → p-COb8X_fE.js} +1 -1
- package/dist/components/{p-BFeE_fiq.js → p-Cam92sWP.js} +1 -1
- package/dist/components/p-CmCsm4L-.js +1 -0
- package/dist/components/p-D3ts7oo9.js +1 -0
- package/dist/components/{p-BNKz39GA.js → p-D4SOCy8I.js} +1 -1
- package/dist/components/{p-DKh8ZK4U.js → p-Dh-h40mY.js} +1 -1
- package/dist/components/p-DrQh1Cb8.js +1 -0
- package/dist/components/p-DvL2TcDG.js +1 -0
- package/dist/components/{p-C_ULDaks.js → p-OKwHt2i9.js} +1 -1
- package/dist/components/p-QWi9AmnD.js +1 -0
- package/dist/components/p-Xwo2HQmt.js +1 -0
- package/dist/components/p-_k-j03K-.js +1 -0
- package/dist/components/{p-B7vGYFbO.js → p-eSq2ze8W.js} +1 -1
- package/dist/components/p-ivjj-BP8.js +1 -0
- package/dist/components/{p-DxCFMMfY.js → p-lus32JrB.js} +1 -1
- package/dist/esm/co-accordion.entry.js +4 -4
- package/dist/esm/co-app-shell.entry.js +3 -3
- package/dist/esm/co-autocomplete.entry.js +38 -73
- package/dist/esm/co-avatar-group.entry.js +3 -3
- package/dist/esm/co-avatar.entry.js +9 -4
- package/dist/esm/co-badge.entry.js +2 -2
- package/dist/esm/co-bottom-sheet.entry.js +4 -4
- 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 +10 -4
- package/dist/esm/co-calendar-month.entry.js +2 -2
- package/dist/esm/co-calendar_3.entry.js +50 -15
- package/dist/esm/co-card.entry.js +3 -3
- package/dist/esm/co-checkbox-group.entry.js +4 -4
- package/dist/esm/co-checkbox.entry.js +18 -6
- package/dist/esm/co-chip_2.entry.js +482 -0
- package/dist/esm/co-color-picker.entry.js +4 -4
- package/dist/esm/co-column-picker.entry.js +3 -3
- package/dist/esm/co-combobox.entry.js +52 -83
- package/dist/esm/co-command-search.entry.js +21 -60
- package/dist/esm/co-data-table-pagination.entry.js +5 -5
- package/dist/esm/co-data-table.entry.js +73 -17
- package/dist/esm/co-date-picker.entry.js +2 -2
- package/dist/esm/co-date-range-picker.entry.js +3 -3
- package/dist/esm/co-date-range.entry.js +2 -2
- package/dist/esm/co-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 +3 -3
- package/dist/esm/co-fab.entry.js +5 -5
- package/dist/esm/co-file-field.entry.js +7 -7
- 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 +23 -7
- package/dist/esm/co-icon.entry.js +3 -3
- package/dist/esm/co-input.entry.js +36 -7
- package/dist/esm/co-json-field.entry.js +5 -5
- package/dist/esm/co-lightbox.entry.js +6 -6
- package/dist/esm/co-list-footer.entry.js +2 -2
- package/dist/esm/co-list-item.entry.js +5 -5
- package/dist/esm/co-loader.entry.js +32 -0
- 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 +11 -3
- package/dist/esm/co-menu.entry.js +3 -3
- package/dist/esm/co-modal.entry.js +29 -5
- package/dist/esm/co-navbar.entry.js +3 -3
- package/dist/esm/co-number-field.entry.js +5 -5
- package/dist/esm/{co-loader_2.entry.js → co-overlay.entry.js} +3 -32
- package/dist/esm/co-page-header.entry.js +2 -2
- package/dist/esm/co-phone-field.entry.js +4 -4
- package/dist/esm/co-popover.entry.js +12 -3
- package/dist/esm/co-progress-bar.entry.js +4 -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 +31 -135
- package/dist/esm/co-rich-text-editor.entry.js +5 -5
- package/dist/esm/co-rich-text-toolbar.entry.js +1 -1
- package/dist/esm/co-rich-text-viewer.entry.js +2 -2
- 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 +7 -7
- package/dist/esm/co-separator.entry.js +2 -2
- package/dist/esm/co-sidebar-nav.entry.js +10 -8
- package/dist/esm/co-sidebar.entry.js +3 -3
- package/dist/esm/co-skeleton.entry.js +2 -2
- 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 +21 -3
- package/dist/esm/co-tab.entry.js +8 -5
- package/dist/esm/co-tags-field.entry.js +8 -8
- package/dist/esm/co-textarea.entry.js +6 -6
- 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 +3 -3
- package/dist/esm/co-transfer-list.entry.js +3 -3
- package/dist/esm/co-video.entry.js +4 -4
- package/dist/esm/cobalt.js +3 -3
- package/dist/esm/{fieldChip-GPikjpYw.js → fieldChip-ChXW__C5.js} +1 -1
- package/dist/esm/{index-w_Wxgclf.js → index-Cyrxk8Qq.js} +64 -11
- package/dist/esm/{index-CYsftTKf.js → index-tT-aZV0-.js} +69 -13
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{requiredMark-CEbXKHcU.js → requiredMark-C7-_2UhB.js} +1 -1
- package/dist/types/components/co-accordion/co-accordion.d.ts +3 -0
- package/dist/types/components/co-autocomplete/co-autocomplete.d.ts +12 -14
- package/dist/types/components/co-avatar/co-avatar.d.ts +2 -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 +4 -0
- package/dist/types/components/co-checkbox/co-checkbox.d.ts +10 -2
- package/dist/types/components/co-chip/co-chip.d.ts +15 -3
- package/dist/types/components/co-combobox/co-combobox.d.ts +29 -15
- package/dist/types/components/co-command-search/co-command-search.d.ts +13 -5
- package/dist/types/components/co-command-search/commandSearchLogic.d.ts +1 -1
- package/dist/types/components/co-data-table/co-data-table.d.ts +35 -1
- 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-fab/co-fab.d.ts +3 -1
- package/dist/types/components/co-file-type-tile/co-file-type-tile.d.ts +11 -0
- package/dist/types/components/co-icon-button/co-icon-button.d.ts +18 -3
- package/dist/types/components/co-input/co-input.d.ts +13 -1
- 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 +20 -2
- package/dist/types/components/co-option-list/co-option-list.d.ts +105 -0
- package/dist/types/components/co-option-list/optionListLogic.d.ts +69 -0
- package/dist/types/components/co-popover/co-popover.d.ts +1 -0
- package/dist/types/components/co-ref-field/co-ref-field.d.ts +8 -30
- package/dist/types/components/co-segmented-bar/co-segmented-bar.d.ts +32 -0
- package/dist/types/components/co-sidebar-nav/co-sidebar-nav.d.ts +2 -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 +7 -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.d.ts +1451 -82
- package/package.json +3 -3
- package/dist/cjs/co-chip.cjs.entry.js +0 -86
- package/dist/cobalt/p-0a506c9d.entry.js +0 -1
- package/dist/cobalt/p-0e8c0d87.entry.js +0 -1
- package/dist/cobalt/p-136ad468.entry.js +0 -1
- package/dist/cobalt/p-14b59277.entry.js +0 -1
- package/dist/cobalt/p-1774d211.entry.js +0 -1
- package/dist/cobalt/p-180e1106.entry.js +0 -1
- package/dist/cobalt/p-1dc9c49e.entry.js +0 -1
- package/dist/cobalt/p-201eaf35.entry.js +0 -1
- package/dist/cobalt/p-260101ab.entry.js +0 -1
- package/dist/cobalt/p-2d2ce434.entry.js +0 -1
- package/dist/cobalt/p-3a257cb0.entry.js +0 -1
- package/dist/cobalt/p-3e187456.entry.js +0 -1
- package/dist/cobalt/p-4431faac.entry.js +0 -1
- package/dist/cobalt/p-456fa86f.entry.js +0 -1
- package/dist/cobalt/p-5890e4d1.entry.js +0 -1
- package/dist/cobalt/p-62274eba.entry.js +0 -1
- package/dist/cobalt/p-635b03d5.entry.js +0 -1
- package/dist/cobalt/p-64ddee92.entry.js +0 -1
- package/dist/cobalt/p-69d4c0c8.entry.js +0 -1
- package/dist/cobalt/p-6c480916.entry.js +0 -1
- package/dist/cobalt/p-8012e152.entry.js +0 -1
- package/dist/cobalt/p-80b27203.entry.js +0 -1
- package/dist/cobalt/p-867c1465.entry.js +0 -1
- package/dist/cobalt/p-86a143d7.entry.js +0 -1
- package/dist/cobalt/p-8dc1dab8.entry.js +0 -1
- package/dist/cobalt/p-92bd9b29.entry.js +0 -1
- package/dist/cobalt/p-98ab5f3f.entry.js +0 -1
- package/dist/cobalt/p-9a088515.entry.js +0 -1
- package/dist/cobalt/p-9abbd436.entry.js +0 -1
- package/dist/cobalt/p-9d69c067.entry.js +0 -1
- package/dist/cobalt/p-CYsftTKf.js +0 -2
- package/dist/cobalt/p-c4f59532.entry.js +0 -1
- package/dist/cobalt/p-e54dd404.entry.js +0 -1
- package/dist/cobalt/p-eb73052a.entry.js +0 -1
- package/dist/cobalt/p-oImf-7fN.js +0 -1
- package/dist/collection/components/co-command-search/commandSearchGroup.js +0 -17
- package/dist/components/p-Ba4v1NXo.js +0 -1
- package/dist/components/p-EPZfLt5l.js +0 -1
- package/dist/components/p-FMnqPWcM.js +0 -1
- package/dist/components/p-Hzh9U2cM.js +0 -1
- package/dist/components/p-WZ06pT2Y.js +0 -1
- package/dist/components/p-tloAgDin.js +0 -1
- package/dist/esm/co-chip.entry.js +0 -84
- package/dist/types/components/co-command-search/commandSearchGroup.d.ts +0 -20
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { RequiredMark } from "../../utils/requiredMark";
|
|
3
|
-
import { initOverlayScroll } from "../../utils/overlayScroll";
|
|
4
3
|
export class CoAutocomplete {
|
|
5
4
|
constructor() {
|
|
6
5
|
/** Whether the field is required (renders a required marker on the label). */
|
|
@@ -21,12 +20,11 @@ export class CoAutocomplete {
|
|
|
21
20
|
/** Minimum characters before emitting coSearch */
|
|
22
21
|
this.minChars = 1;
|
|
23
22
|
/** Debounce time in ms for coSearch */
|
|
24
|
-
this.
|
|
23
|
+
this.searchDebounce = 300;
|
|
25
24
|
/** Message when options are empty after search */
|
|
26
|
-
this.
|
|
25
|
+
this.emptyMessage = 'No results';
|
|
27
26
|
this.isOpen = false;
|
|
28
27
|
this.query = '';
|
|
29
|
-
this.scrollTop = 0;
|
|
30
28
|
this.focused = false;
|
|
31
29
|
this.handleInput = (e) => {
|
|
32
30
|
const q = e.target.value;
|
|
@@ -34,7 +32,7 @@ export class CoAutocomplete {
|
|
|
34
32
|
if (this.debounceTimer)
|
|
35
33
|
clearTimeout(this.debounceTimer);
|
|
36
34
|
if (q.length >= this.minChars) {
|
|
37
|
-
this.debounceTimer = setTimeout(() => this.coSearch.emit(q), this.
|
|
35
|
+
this.debounceTimer = setTimeout(() => this.coSearch.emit(q), this.searchDebounce);
|
|
38
36
|
this.isOpen = true;
|
|
39
37
|
}
|
|
40
38
|
else {
|
|
@@ -54,35 +52,43 @@ export class CoAutocomplete {
|
|
|
54
52
|
this.value = this.multiple ? '[]' : '';
|
|
55
53
|
this.isOpen = false;
|
|
56
54
|
this.coClear.emit();
|
|
57
|
-
this.coChange.emit(this.multiple ? [] : '');
|
|
55
|
+
this.coChange.emit({ value: this.multiple ? [] : '', item: null });
|
|
58
56
|
(_a = this.inputEl) === null || _a === void 0 ? void 0 : _a.focus();
|
|
59
57
|
};
|
|
60
|
-
this.
|
|
58
|
+
this.handleChipRemove = (val) => {
|
|
59
|
+
const sel = this.selectedValues.filter(v => v !== val);
|
|
60
|
+
this.value = JSON.stringify(sel);
|
|
61
|
+
this.coChange.emit({ value: sel, item: { _id: val, label: val } });
|
|
62
|
+
};
|
|
63
|
+
this.handleListChange = (detail) => {
|
|
61
64
|
if (this.multiple) {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
if (idx >= 0)
|
|
65
|
-
sel.splice(idx, 1);
|
|
66
|
-
else
|
|
67
|
-
sel.push(optValue);
|
|
68
|
-
this.value = JSON.stringify(sel);
|
|
69
|
-
this.coChange.emit(sel);
|
|
65
|
+
this.value = JSON.stringify(detail.value);
|
|
66
|
+
this.coChange.emit({ value: detail.value, item: detail.item });
|
|
70
67
|
}
|
|
71
68
|
else {
|
|
72
|
-
this.value =
|
|
73
|
-
|
|
74
|
-
this.query = opt ? opt.label : optValue;
|
|
69
|
+
this.value = detail.value;
|
|
70
|
+
this.query = detail.item.label;
|
|
75
71
|
this.isOpen = false;
|
|
76
|
-
this.coChange.emit(
|
|
72
|
+
this.coChange.emit({ value: detail.value, item: detail.item });
|
|
77
73
|
}
|
|
78
74
|
};
|
|
79
|
-
this.
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
75
|
+
this.handleInputKeyDown = async (e) => {
|
|
76
|
+
if (e.key === 'Escape') {
|
|
77
|
+
this.isOpen = false;
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
if (!this.isOpen || !this.optionListEl)
|
|
81
|
+
return;
|
|
82
|
+
if (e.key === 'ArrowDown' || e.key === 'ArrowUp' || e.key === 'Enter') {
|
|
83
|
+
// preventDefault BEFORE the await: handleKey() is async (it may run
|
|
84
|
+
// across a render tick), so a post-await preventDefault would land too
|
|
85
|
+
// late for the browser to honor it deterministically. The default
|
|
86
|
+
// behavior for these 3 keys on a single-line input is harmless either
|
|
87
|
+
// way (caret move / no-op submit), but calling it upfront removes any
|
|
88
|
+
// timing ambiguity instead of relying on that harmlessness.
|
|
89
|
+
e.preventDefault();
|
|
90
|
+
await this.optionListEl.handleKey(e);
|
|
91
|
+
}
|
|
86
92
|
};
|
|
87
93
|
}
|
|
88
94
|
get parsedOptions() {
|
|
@@ -150,56 +156,19 @@ export class CoAutocomplete {
|
|
|
150
156
|
this.focused = false;
|
|
151
157
|
}
|
|
152
158
|
}
|
|
153
|
-
getVirtualSlice(items) {
|
|
154
|
-
const { ITEM_HEIGHT, VIEWPORT_ITEMS, OVERSCAN } = CoAutocomplete;
|
|
155
|
-
const total = items.length;
|
|
156
|
-
const totalHeight = total * ITEM_HEIGHT;
|
|
157
|
-
const startIdx = Math.max(0, Math.floor(this.scrollTop / ITEM_HEIGHT) - OVERSCAN);
|
|
158
|
-
const endIdx = Math.min(total, startIdx + VIEWPORT_ITEMS + OVERSCAN * 2);
|
|
159
|
-
const offsetY = startIdx * ITEM_HEIGHT;
|
|
160
|
-
return { totalHeight, startIdx, endIdx, offsetY };
|
|
161
|
-
}
|
|
162
|
-
// OverlayScrollbars: init when the dropdown is open, tear down when it closes.
|
|
163
|
-
// Virtual scroll keeps working — scrollTop is read from the OS viewport.
|
|
164
|
-
componentDidRender() {
|
|
165
|
-
if (this.isOpen && this.optionsEl && !this.osInstance) {
|
|
166
|
-
this.osInstance = initOverlayScroll(this.optionsEl, (vp) => { this.scrollTop = vp.scrollTop; });
|
|
167
|
-
}
|
|
168
|
-
else if (!this.isOpen && this.osInstance) {
|
|
169
|
-
this.osInstance.destroy();
|
|
170
|
-
this.osInstance = undefined;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
disconnectedCallback() {
|
|
174
|
-
var _a;
|
|
175
|
-
(_a = this.osInstance) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
176
|
-
this.osInstance = undefined;
|
|
177
|
-
}
|
|
178
159
|
render() {
|
|
179
160
|
const options = this.parsedOptions;
|
|
180
161
|
const selected = this.selectedValues;
|
|
181
|
-
return (h("div", { key: '
|
|
162
|
+
return (h("div", { key: 'a152ee025b4c76813f8783ba1cd0e6791a7372ee', class: {
|
|
182
163
|
'co-autocomplete': true,
|
|
183
|
-
'co-autocomplete--open': this.isOpen,
|
|
184
164
|
'co-autocomplete--disabled': this.disabled,
|
|
185
165
|
'co-autocomplete--focused': this.focused,
|
|
186
166
|
[`co-autocomplete--${this.size}`]: true,
|
|
187
167
|
[`co-autocomplete--${this.status}`]: this.status !== 'default',
|
|
188
|
-
} }, (this.label || this.secondaryLabel) && (h("div", { key: '
|
|
168
|
+
} }, (this.label || this.secondaryLabel) && (h("div", { key: '484443890da0c01c028716095ef2215f56b64e93', class: "co-autocomplete__labels" }, this.label && h("label", { key: '24fc760c0fa0322e1952d948e8daf463a4999226', class: "co-autocomplete__label" }, this.label, h(RequiredMark, { key: '250f449b8d860d5476652dd906b5405e76cba1d1', required: this.required })), this.secondaryLabel && h("span", { key: '5f7b6c3b0308cc031336d945ce629aa06495404d', class: "co-autocomplete__secondary-label" }, this.secondaryLabel))), h("div", { key: '632abdc8eb131cf8f5c482487d377d9297c11ad6', class: "co-autocomplete__field" }, this.iconLeft && h("co-icon", { key: '7c1f1af01c2a9b9686de933a38d4da0302f40cbc', name: this.iconLeft, size: 16, class: "co-autocomplete__icon" }), this.multiple && selected.length > 0 && (h("div", { key: 'bfe9c9fbce1c7050f928128fb77f8bf5018903d1', class: "co-autocomplete__chips" }, selected.map(val => {
|
|
189
169
|
const opt = this.parsedOptions.find(o => o.value === val);
|
|
190
170
|
return (h("co-chip", { label: opt ? opt.label : val, size: "small", removable: true, onCoRemove: () => this.handleChipRemove(val) }));
|
|
191
|
-
}))), h("input", { key: '
|
|
192
|
-
const { totalHeight, startIdx, endIdx, offsetY } = this.getVirtualSlice(options);
|
|
193
|
-
return (h("div", { class: "co-autocomplete__virtual-spacer", style: { height: `${totalHeight}px`, position: 'relative' } }, h("div", { style: { position: 'absolute', top: `${offsetY}px`, left: '0', right: '0' } }, options.slice(startIdx, endIdx).map(opt => {
|
|
194
|
-
const isSelected = selected.includes(opt.value);
|
|
195
|
-
const isDisabled = !!opt.disabled;
|
|
196
|
-
return (h("div", { class: {
|
|
197
|
-
'co-autocomplete__option': true,
|
|
198
|
-
'co-autocomplete__option--selected': isSelected,
|
|
199
|
-
'co-autocomplete__option--disabled': isDisabled,
|
|
200
|
-
}, onClick: () => !isDisabled && this.handleOptionClick(opt.value) }, opt.icon && h("co-icon", { name: opt.icon, size: 20, class: "co-autocomplete__option-icon" }), h("span", { class: "co-autocomplete__option-label" }, opt.label), isSelected && h("co-icon", { name: "check", size: 16, class: "co-autocomplete__option-check" })));
|
|
201
|
-
}))));
|
|
202
|
-
})())))), this.helperText && (h("div", { key: '10718ee7ba24570057e2f130ef950b304c510c02', class: `co-autocomplete__helper co-autocomplete__helper--${this.status}` }, this.statusIcon && h("co-icon", { key: 'e8d88e8278f9ea3b28f6b5767991e484d6fc7eb6', name: this.statusIcon, size: 14, weight: "fill", class: "co-autocomplete__helper-icon" }), h("span", { key: '0a9a6ef20def10b8efe92c55d3e66f1acd34525f', class: "co-autocomplete__helper-text" }, this.helperText)))));
|
|
171
|
+
}))), h("input", { key: 'fc621839dde68853a1b28231551e6cb0a6f415e7', ref: el => (this.inputEl = el), class: "co-autocomplete__input", type: "text", value: this.query, placeholder: this.placeholder, disabled: this.disabled, onInput: this.handleInput, onFocus: this.handleFocus, onKeyDown: this.handleInputKeyDown }), this.loading && h("div", { key: 'fbe41e89ca6202a4de04a09437f1f11f756f25eb', class: "co-autocomplete__spinner" }), this.clearable && (this.hasValue || this.query) && !this.disabled && (h("button", { key: 'e3096cd897d7a98fa7cd203d21eb57dc6ce961a5', class: "co-autocomplete__clear", type: "button", tabIndex: -1, onClick: this.handleClear, "aria-label": "Clear" }, h("co-icon", { key: '3211cf54fcdae0a73afb62e2b6cb25081486f3a7', name: "x-circle", size: 16, weight: "fill" })))), this.isOpen && (h("div", { key: '9c5e500a17c9486b6834c46be9e95c0e0fea6beb', class: "co-autocomplete__dropdown" }, h("co-option-list", { key: 'b44c39253a07c470dc5e059223fce58548e8d02d', ref: (el) => (this.optionListEl = el), items: JSON.stringify(options.map((o) => ({ _id: o.value, label: o.label, icon: o.icon, disabled: o.disabled }))), value: this.multiple ? JSON.stringify(this.selectedValues) : (this.selectedValues[0] || ''), multiple: this.multiple, selectedAffordance: "check", virtual: true, loading: this.loading, emptyMessage: this.emptyMessage, onCoChange: (e) => this.handleListChange(e.detail) }))), this.helperText && (h("div", { key: '30ac040bfef45e66d1b18bfdda9b5b07b8f2c3d5', class: `co-autocomplete__helper co-autocomplete__helper--${this.status}` }, this.statusIcon && h("co-icon", { key: 'a4fc8c4c9695c13cd515d9b7562986a62bf07110', name: this.statusIcon, size: 14, weight: "fill", class: "co-autocomplete__helper-icon" }), h("span", { key: '4a7f3031b62c451e0561024d232331b1c7679a07', class: "co-autocomplete__helper-text" }, this.helperText)))));
|
|
203
172
|
}
|
|
204
173
|
static get is() { return "co-autocomplete"; }
|
|
205
174
|
static get encapsulation() { return "shadow"; }
|
|
@@ -537,7 +506,7 @@ export class CoAutocomplete {
|
|
|
537
506
|
"attribute": "min-chars",
|
|
538
507
|
"defaultValue": "1"
|
|
539
508
|
},
|
|
540
|
-
"
|
|
509
|
+
"searchDebounce": {
|
|
541
510
|
"type": "number",
|
|
542
511
|
"mutable": false,
|
|
543
512
|
"complexType": {
|
|
@@ -554,10 +523,10 @@ export class CoAutocomplete {
|
|
|
554
523
|
"getter": false,
|
|
555
524
|
"setter": false,
|
|
556
525
|
"reflect": false,
|
|
557
|
-
"attribute": "debounce",
|
|
526
|
+
"attribute": "search-debounce",
|
|
558
527
|
"defaultValue": "300"
|
|
559
528
|
},
|
|
560
|
-
"
|
|
529
|
+
"emptyMessage": {
|
|
561
530
|
"type": "string",
|
|
562
531
|
"mutable": false,
|
|
563
532
|
"complexType": {
|
|
@@ -574,7 +543,7 @@ export class CoAutocomplete {
|
|
|
574
543
|
"getter": false,
|
|
575
544
|
"setter": false,
|
|
576
545
|
"reflect": false,
|
|
577
|
-
"attribute": "empty-
|
|
546
|
+
"attribute": "empty-message",
|
|
578
547
|
"defaultValue": "'No results'"
|
|
579
548
|
}
|
|
580
549
|
};
|
|
@@ -583,7 +552,6 @@ export class CoAutocomplete {
|
|
|
583
552
|
return {
|
|
584
553
|
"isOpen": {},
|
|
585
554
|
"query": {},
|
|
586
|
-
"scrollTop": {},
|
|
587
555
|
"focused": {}
|
|
588
556
|
};
|
|
589
557
|
}
|
|
@@ -614,8 +582,8 @@ export class CoAutocomplete {
|
|
|
614
582
|
"text": ""
|
|
615
583
|
},
|
|
616
584
|
"complexType": {
|
|
617
|
-
"original": "string | string[]",
|
|
618
|
-
"resolved": "string | string[]",
|
|
585
|
+
"original": "{ value: string | string[]; item: { _id: string; label: string } | null }",
|
|
586
|
+
"resolved": "{ value: string | string[]; item: { _id: string; label: string; } | null; }",
|
|
619
587
|
"references": {}
|
|
620
588
|
}
|
|
621
589
|
}, {
|
|
@@ -655,6 +623,3 @@ export class CoAutocomplete {
|
|
|
655
623
|
}];
|
|
656
624
|
}
|
|
657
625
|
}
|
|
658
|
-
CoAutocomplete.ITEM_HEIGHT = 34;
|
|
659
|
-
CoAutocomplete.VIEWPORT_ITEMS = 8;
|
|
660
|
-
CoAutocomplete.OVERSCAN = 3;
|
|
@@ -32,12 +32,17 @@ export class CoAvatar {
|
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
34
|
render() {
|
|
35
|
-
var _a, _b, _c;
|
|
35
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
36
36
|
const dim = (_a = SIZE_MAP[this.size]) !== null && _a !== void 0 ? _a : 56;
|
|
37
37
|
const iconSize = (_b = ICON_SIZE_MAP[this.size]) !== null && _b !== void 0 ? _b : 24;
|
|
38
38
|
const fontSize = (_c = FONT_SIZE_MAP[this.size]) !== null && _c !== void 0 ? _c : 'var(--co-font-size-18)';
|
|
39
39
|
const showImage = this.type === 'image' && this.src && !this.imgFailed;
|
|
40
|
-
|
|
40
|
+
const ariaLabel = this.type === 'text'
|
|
41
|
+
? this.text
|
|
42
|
+
: this.type === 'image'
|
|
43
|
+
? (_e = (_d = this.alt) !== null && _d !== void 0 ? _d : this.text) !== null && _e !== void 0 ? _e : this.icon
|
|
44
|
+
: this.icon;
|
|
45
|
+
return (h("div", { key: '41da32ebacadf5fd33c9f6a10ac0069ddaa81ce6', class: {
|
|
41
46
|
'co-avatar': true,
|
|
42
47
|
[`co-avatar--${this.size}`]: true,
|
|
43
48
|
[`co-avatar--${this.type}`]: true,
|
|
@@ -45,7 +50,7 @@ export class CoAvatar {
|
|
|
45
50
|
'co-avatar--light': !!this.color && isLightColor(this.color),
|
|
46
51
|
}, style: Object.assign(Object.assign({ width: `var(--co-avatar-size, ${dim}px)`, height: `var(--co-avatar-size, ${dim}px)`, fontSize }, (this.color ? { background: this.color } : {})), (this.ringColor
|
|
47
52
|
? { '--co-avatar-border-color': this.ringColor, '--co-avatar-border-width': '2px' }
|
|
48
|
-
: {})), part: "avatar", role: "img", "aria-label":
|
|
53
|
+
: {})), part: "avatar", role: "img", "aria-label": ariaLabel }, showImage ? (h("img", { class: "co-avatar__img", src: this.src, alt: (_g = (_f = this.alt) !== null && _f !== void 0 ? _f : this.text) !== null && _g !== void 0 ? _g : '', onError: this.handleImgError })) : this.type === 'icon' ? (h("co-icon", { name: this.icon, weight: this.iconWeight, size: iconSize })) : (h("span", { class: "co-avatar__text" }, this.text))));
|
|
49
54
|
}
|
|
50
55
|
static get is() { return "co-avatar"; }
|
|
51
56
|
static get encapsulation() { return "shadow"; }
|
|
@@ -139,6 +144,25 @@ export class CoAvatar {
|
|
|
139
144
|
"reflect": false,
|
|
140
145
|
"attribute": "src"
|
|
141
146
|
},
|
|
147
|
+
"alt": {
|
|
148
|
+
"type": "string",
|
|
149
|
+
"mutable": false,
|
|
150
|
+
"complexType": {
|
|
151
|
+
"original": "string",
|
|
152
|
+
"resolved": "string | undefined",
|
|
153
|
+
"references": {}
|
|
154
|
+
},
|
|
155
|
+
"required": false,
|
|
156
|
+
"optional": true,
|
|
157
|
+
"docs": {
|
|
158
|
+
"tags": [],
|
|
159
|
+
"text": "Alternative text for the image (type=\"image\"); falls back to text when unset"
|
|
160
|
+
},
|
|
161
|
+
"getter": false,
|
|
162
|
+
"setter": false,
|
|
163
|
+
"reflect": false,
|
|
164
|
+
"attribute": "alt"
|
|
165
|
+
},
|
|
142
166
|
"icon": {
|
|
143
167
|
"type": "string",
|
|
144
168
|
"mutable": false,
|
|
@@ -56,13 +56,13 @@ export class CoAvatarGroup {
|
|
|
56
56
|
onClick: this.activate,
|
|
57
57
|
}
|
|
58
58
|
: { role: 'group' };
|
|
59
|
-
return (h(Tag, Object.assign({ key: '
|
|
59
|
+
return (h(Tag, Object.assign({ key: 'efe3aa5c3a13c33d220caf93f8ce7dfc929f9833', class: {
|
|
60
60
|
'co-avatar-group': true,
|
|
61
61
|
'co-avatar-group--interactive': this.interactive,
|
|
62
62
|
} }, interactiveAttrs), visible.map((it, i) => {
|
|
63
63
|
var _a, _b, _c;
|
|
64
64
|
return (h("co-tooltip", { key: i, class: "co-avatar-group__slot", content: it.name || it.text || '', placement: "bottom" }, h("co-avatar", { class: "co-avatar-group__avatar", type: (_a = it.type) !== null && _a !== void 0 ? _a : (it.src ? 'image' : it.icon ? 'icon' : 'text'), size: this.size, shape: (_b = it.shape) !== null && _b !== void 0 ? _b : this.shape, text: it.text, src: it.src, icon: (_c = it.icon) !== null && _c !== void 0 ? _c : 'user', color: it.color, "ring-color": it.ringColor })));
|
|
65
|
-
}), extra > 0 && (h("co-tooltip", { key: '
|
|
65
|
+
}), extra > 0 && (h("co-tooltip", { key: 'c2888162dd23d0b1a2c853e6adbe7a8f5f61efe5', class: "co-avatar-group__slot", content: overflowLabel, placement: "bottom" }, h("div", { key: '5f0d9a321b52db23356b107564605b18b8c75692', class: "co-avatar-group__overflow", style: { width: `${dim}px`, height: `${dim}px`, fontSize }, role: "img", "aria-label": `+${extra}` }, "+", extra)))));
|
|
66
66
|
}
|
|
67
67
|
static get is() { return "co-avatar-group"; }
|
|
68
68
|
static get encapsulation() { return "shadow"; }
|
|
@@ -10,7 +10,7 @@ export class CoBadge {
|
|
|
10
10
|
this.color = 'default';
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
|
-
return (h("span", { key: '
|
|
13
|
+
return (h("span", { key: 'f805a0acdea25b90802785fa7cf5e7115d60e3c3', class: {
|
|
14
14
|
'co-badge': true,
|
|
15
15
|
[`co-badge--${this.size}`]: true,
|
|
16
16
|
[`co-badge--${this.color}`]: true,
|
|
@@ -255,13 +255,13 @@ export class CoBottomSheet {
|
|
|
255
255
|
(_a = this.bodyEl) === null || _a === void 0 ? void 0 : _a.removeEventListener('touchmove', this.touchBlocker);
|
|
256
256
|
}
|
|
257
257
|
render() {
|
|
258
|
-
return (h("div", { key: '
|
|
258
|
+
return (h("div", { key: '6655150e6dfb829ae937433983d93e0a16b4f544', class: { 'co-bottom-sheet-root': true, 'co-bottom-sheet-root--open': this.open } }, h("div", { key: '3657a637ec0ac2705375805381be639bc3da4b82', class: "co-bottom-sheet__backdrop", part: "backdrop", onClick: this.handleBackdropClick, ref: (el) => (this.backdropEl = el) }), h("section", { key: 'f3cac714dbc2703506a51fd960c34b64b33731b1', class: { 'co-bottom-sheet': true, 'co-bottom-sheet--open': this.open }, part: "sheet", role: "dialog", "aria-modal": "true", "aria-labelledby": this.heading ? 'co-bottom-sheet-heading' : undefined, style: { '--co-bottom-sheet-max-height': this.maxHeight }, onTransitionEnd: this.handleTransitionEnd, ref: (el) => (this.sheetEl = el) }, h("div", { key: '063d6b43784022a2646614b0462c8c8dccce1320', class: "co-bottom-sheet__grip", onPointerDown: this.handleGripPointerDown, onPointerMove: this.handlePointerMove, onPointerUp: this.handlePointerUp, onPointerCancel: this.handlePointerCancel }, this.showHandle && (h("div", { key: '8e9611f02a9d59e9af91d77b476b7e8f93724aa4', class: "co-bottom-sheet__handle", part: "handle", "aria-hidden": "true" })), h("header", { key: 'f58de5177d9620ea61cffba530ef190936537194', class: {
|
|
259
259
|
'co-bottom-sheet__header': true,
|
|
260
260
|
'co-bottom-sheet__header--show': this.hasHeaderSlot || !!this.heading,
|
|
261
|
-
}, part: "header" }, h("slot", { key: '
|
|
261
|
+
}, part: "header" }, h("slot", { key: '76fda370a9276e99d41782f08312e6e887dafd21', name: "header", onSlotchange: this.handleHeaderSlotChange }, this.heading && (h("h2", { key: 'dcc7ba68ba7b306805ca49881a4808947217392a', class: "co-bottom-sheet__heading", id: "co-bottom-sheet-heading" }, this.heading))))), h("div", { key: '55fd08122d422bbfe0cef9d7a64297e481349172', class: "co-bottom-sheet__body", part: "body", onPointerDown: this.handleBodyPointerDown, onPointerMove: this.handlePointerMove, onPointerUp: this.handlePointerUp, onPointerCancel: this.handlePointerCancel, ref: (el) => (this.bodyEl = el) }, h("slot", { key: '3c86d67c93d8c64458e431ab959704f4e43b382b' })), h("footer", { key: '14a97f22eee74e514111d87414e23cf1580e1456', class: {
|
|
262
262
|
'co-bottom-sheet__footer': true,
|
|
263
263
|
'co-bottom-sheet__footer--show': this.hasFooter,
|
|
264
|
-
}, part: "footer" }, h("slot", { key: '
|
|
264
|
+
}, part: "footer" }, h("slot", { key: 'd2b6fbeca8233f3d6e33d6be7b05bd4a2fe5d59f', name: "footer", onSlotchange: this.handleFooterSlotChange })))));
|
|
265
265
|
}
|
|
266
266
|
static get is() { return "co-bottom-sheet"; }
|
|
267
267
|
static get encapsulation() { return "shadow"; }
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
/**
|
|
3
|
+
* Horizontal breadcrumb trail. Accepts `co-breadcrumb-item` children via the
|
|
4
|
+
* default slot, or auto-renders them from the `items` JSON prop.
|
|
5
|
+
*
|
|
6
|
+
* The separator between crumbs is drawn by each `co-breadcrumb-item` as a
|
|
7
|
+
* leading icon (hidden on the first crumb via CSS), so no separator markup is
|
|
8
|
+
* interleaved here. This component propagates its `separator` prop down to the
|
|
9
|
+
* slotted items and layouts them in a `align-items:center; gap:4px` flex row.
|
|
10
|
+
*/
|
|
11
|
+
export class CoBreadcrumb {
|
|
12
|
+
constructor() {
|
|
13
|
+
/** Icon name (Phosphor) for the separator between crumbs. Propagated to
|
|
14
|
+
* slotted `co-breadcrumb-item` children. */
|
|
15
|
+
this.separator = 'caret-right';
|
|
16
|
+
this.handleSlotChange = () => this.propagateSeparator();
|
|
17
|
+
}
|
|
18
|
+
watchSeparator() {
|
|
19
|
+
this.propagateSeparator();
|
|
20
|
+
}
|
|
21
|
+
componentDidLoad() {
|
|
22
|
+
this.propagateSeparator();
|
|
23
|
+
}
|
|
24
|
+
/** Push the current `separator` onto every slotted (light-DOM) crumb. Items
|
|
25
|
+
* auto-rendered from `items` get it directly in render() instead. */
|
|
26
|
+
propagateSeparator() {
|
|
27
|
+
const nodes = this.el.querySelectorAll('co-breadcrumb-item');
|
|
28
|
+
nodes.forEach((n) => {
|
|
29
|
+
n.separator = this.separator;
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
parseItems() {
|
|
33
|
+
if (!this.items)
|
|
34
|
+
return null;
|
|
35
|
+
try {
|
|
36
|
+
const parsed = JSON.parse(this.items);
|
|
37
|
+
return Array.isArray(parsed) ? parsed : null;
|
|
38
|
+
}
|
|
39
|
+
catch (_a) {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
render() {
|
|
44
|
+
const data = this.parseItems();
|
|
45
|
+
return (h(Host, { key: '3306e9e038677813f1c16183e4fb3a146d723643', part: "breadcrumb", role: "navigation", "aria-label": "Breadcrumb" }, data
|
|
46
|
+
? data.map((it, i) => (h("co-breadcrumb-item", { key: i, label: it.label, value: it.value, icon: it.icon, separator: this.separator, current: i === data.length - 1 })))
|
|
47
|
+
: h("slot", { onSlotchange: this.handleSlotChange })));
|
|
48
|
+
}
|
|
49
|
+
static get is() { return "co-breadcrumb"; }
|
|
50
|
+
static get encapsulation() { return "shadow"; }
|
|
51
|
+
static get originalStyleUrls() {
|
|
52
|
+
return {
|
|
53
|
+
"$": ["co-breadcrumb.css"]
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
static get styleUrls() {
|
|
57
|
+
return {
|
|
58
|
+
"$": ["co-breadcrumb.css"]
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
static get properties() {
|
|
62
|
+
return {
|
|
63
|
+
"separator": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"mutable": false,
|
|
66
|
+
"complexType": {
|
|
67
|
+
"original": "string",
|
|
68
|
+
"resolved": "string",
|
|
69
|
+
"references": {}
|
|
70
|
+
},
|
|
71
|
+
"required": false,
|
|
72
|
+
"optional": false,
|
|
73
|
+
"docs": {
|
|
74
|
+
"tags": [],
|
|
75
|
+
"text": "Icon name (Phosphor) for the separator between crumbs. Propagated to\nslotted `co-breadcrumb-item` children."
|
|
76
|
+
},
|
|
77
|
+
"getter": false,
|
|
78
|
+
"setter": false,
|
|
79
|
+
"reflect": false,
|
|
80
|
+
"attribute": "separator",
|
|
81
|
+
"defaultValue": "'caret-right'"
|
|
82
|
+
},
|
|
83
|
+
"items": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"mutable": false,
|
|
86
|
+
"complexType": {
|
|
87
|
+
"original": "string",
|
|
88
|
+
"resolved": "string | undefined",
|
|
89
|
+
"references": {}
|
|
90
|
+
},
|
|
91
|
+
"required": false,
|
|
92
|
+
"optional": true,
|
|
93
|
+
"docs": {
|
|
94
|
+
"tags": [],
|
|
95
|
+
"text": "Optional JSON array to auto-render crumbs instead of using the slot, e.g.\n`[{ \"label\": \"Mi unidad\", \"icon\": \"cloud\", \"value\": \"root\" }]`. The last\nentry is marked `current`. When set, slotted children are ignored."
|
|
96
|
+
},
|
|
97
|
+
"getter": false,
|
|
98
|
+
"setter": false,
|
|
99
|
+
"reflect": false,
|
|
100
|
+
"attribute": "items"
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
static get elementRef() { return "el"; }
|
|
105
|
+
static get watchers() {
|
|
106
|
+
return [{
|
|
107
|
+
"propName": "separator",
|
|
108
|
+
"methodName": "watchSeparator"
|
|
109
|
+
}];
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
min-width: 0;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
/* Leading separator — caret-right size 13, gray-400 (NOT gray-500). The 4px on
|
|
8
|
+
its left comes from the parent co-breadcrumb's gap; margin-right adds the
|
|
9
|
+
matching 4px on its right so the separator sits symmetrically between crumbs. */
|
|
10
|
+
.co-breadcrumb-item__sep {
|
|
11
|
+
display: inline-flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
flex-shrink: 0;
|
|
14
|
+
margin-right: var(--co-spacing-xs, 4px);
|
|
15
|
+
color: var(--co-color-gray-400, #a0a0a0);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* The first crumb has no leading separator. `:first-child` matches the first
|
|
19
|
+
element child both when slotted (light DOM child of co-breadcrumb) and when
|
|
20
|
+
auto-rendered from the `items` prop (shadow child of co-breadcrumb). */
|
|
21
|
+
:host(:first-child) .co-breadcrumb-item__sep {
|
|
22
|
+
display: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* Clickable crumb. No padding, no radius, no hover background. */
|
|
26
|
+
.co-breadcrumb-item__content {
|
|
27
|
+
display: inline-flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
gap: 7px;
|
|
30
|
+
min-width: 0;
|
|
31
|
+
padding: 0;
|
|
32
|
+
border: 0;
|
|
33
|
+
background: transparent;
|
|
34
|
+
cursor: pointer;
|
|
35
|
+
white-space: nowrap;
|
|
36
|
+
font-family: var(--co-font-family-primary);
|
|
37
|
+
font-size: var(--co-font-size-14, 14px);
|
|
38
|
+
font-weight: 400;
|
|
39
|
+
letter-spacing: var(--co-font-letter-spacing-body, -0.03em);
|
|
40
|
+
color: var(--co-color-gray-500, #888888);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.co-breadcrumb-item__content:focus-visible {
|
|
44
|
+
outline: 2px solid var(--co-semantic-border-focus, var(--co-color-primary-azul, #2563eb));
|
|
45
|
+
outline-offset: 2px;
|
|
46
|
+
border-radius: 2px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* Current (last) crumb — medium weight + text-default ink. */
|
|
50
|
+
.co-breadcrumb-item--current .co-breadcrumb-item__content {
|
|
51
|
+
font-weight: 500;
|
|
52
|
+
color: var(--co-color-base-negro, #1f1c1b);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.co-breadcrumb-item__icon {
|
|
56
|
+
display: inline-flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
flex-shrink: 0;
|
|
59
|
+
/* Inherits the crumb color (gray-500 / negro) via currentColor. */
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.co-breadcrumb-item__label {
|
|
63
|
+
min-width: 0;
|
|
64
|
+
overflow: hidden;
|
|
65
|
+
text-overflow: ellipsis;
|
|
66
|
+
}
|