@prolibu-suite/cobalt-core 0.6.0 → 0.7.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 +1049 -52
- package/dist/cjs/co-accordion.cjs.entry.js +1 -1
- package/dist/cjs/co-app-shell.cjs.entry.js +1 -1
- package/dist/cjs/co-autocomplete.cjs.entry.js +3 -3
- package/dist/cjs/co-avatar-group.cjs.entry.js +3 -3
- package/dist/cjs/{co-tooltip.cjs.entry.js → co-avatar_2.cjs.entry.js} +95 -3
- 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 +3 -3
- package/dist/cjs/co-breadcrumb.cjs.entry.js +2 -2
- package/dist/cjs/co-button-group.cjs.entry.js +3 -3
- package/dist/cjs/co-button.cjs.entry.js +3 -3
- package/dist/cjs/co-calendar-month.cjs.entry.js +2 -2
- package/dist/cjs/co-calendar_3.cjs.entry.js +8 -8
- package/dist/cjs/co-card.cjs.entry.js +3 -3
- package/dist/cjs/co-carousel-item.cjs.entry.js +17 -0
- package/dist/cjs/co-carousel.cjs.entry.js +368 -0
- package/dist/cjs/co-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/co-checkbox.cjs.entry.js +4 -4
- package/dist/cjs/co-chip_2.cjs.entry.js +5 -5
- package/dist/cjs/co-color-picker.cjs.entry.js +5 -5
- package/dist/cjs/co-column-picker.cjs.entry.js +3 -3
- package/dist/cjs/co-combobox.cjs.entry.js +3 -3
- package/dist/cjs/co-command-search.cjs.entry.js +1 -1
- package/dist/cjs/co-data-table-pagination.cjs.entry.js +5 -5
- package/dist/cjs/co-data-table.cjs.entry.js +2 -2
- package/dist/cjs/co-date-picker.cjs.entry.js +11 -4
- package/dist/cjs/co-date-range-picker.cjs.entry.js +9 -3
- package/dist/cjs/co-date-range.cjs.entry.js +2 -2
- package/dist/cjs/co-drive-card.cjs.entry.js +2 -2
- package/dist/cjs/co-drop-zone.cjs.entry.js +2 -2
- package/dist/cjs/co-empty-state.cjs.entry.js +3 -3
- package/dist/cjs/co-event-calendar.cjs.entry.js +3 -3
- package/dist/cjs/co-fab.cjs.entry.js +21 -6
- package/dist/cjs/co-file-field.cjs.entry.js +8 -8
- package/dist/cjs/co-file-type-tile.cjs.entry.js +3 -3
- package/dist/cjs/co-helper-text.cjs.entry.js +3 -3
- package/dist/cjs/co-icon-button.cjs.entry.js +2 -2
- package/dist/cjs/co-icon.cjs.entry.js +3 -3
- package/dist/cjs/co-input.cjs.entry.js +9 -3
- package/dist/cjs/co-json-field.cjs.entry.js +6 -6
- package/dist/cjs/co-lightbox.cjs.entry.js +33 -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 +1 -1
- package/dist/cjs/co-media-thumb.cjs.entry.js +3 -3
- package/dist/cjs/co-menu-divider.cjs.entry.js +2 -2
- package/dist/cjs/co-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/co-menu.cjs.entry.js +2 -2
- package/dist/cjs/co-modal.cjs.entry.js +3 -3
- 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-overlay.cjs.entry.js +2 -2
- 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 +1 -1
- package/dist/cjs/co-progress-bar.cjs.entry.js +3 -3
- package/dist/cjs/co-progress-circle.cjs.entry.js +3 -3
- package/dist/cjs/co-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/co-radio.cjs.entry.js +4 -4
- package/dist/cjs/co-rating.cjs.entry.js +4 -4
- package/dist/cjs/co-ref-field.cjs.entry.js +11 -5
- package/dist/cjs/co-rich-text-editor.cjs.entry.js +22 -7
- package/dist/cjs/co-rich-text-toolbar.cjs.entry.js +36 -4
- package/dist/cjs/co-rich-text-viewer.cjs.entry.js +36 -6
- package/dist/cjs/co-row.cjs.entry.js +3 -3
- package/dist/cjs/co-segmented-bar.cjs.entry.js +1 -1
- package/dist/cjs/co-select.cjs.entry.js +13 -7
- package/dist/cjs/co-separator.cjs.entry.js +2 -2
- package/dist/cjs/co-sidebar-nav.cjs.entry.js +1 -1
- 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 +5 -5
- package/dist/cjs/co-tab-group.cjs.entry.js +4 -4
- package/dist/cjs/co-tab.cjs.entry.js +3 -3
- package/dist/cjs/co-tags-field.cjs.entry.js +9 -9
- package/dist/cjs/co-textarea.cjs.entry.js +13 -7
- package/dist/cjs/co-toast.cjs.entry.js +1 -1
- package/dist/cjs/co-toggle-button-group.cjs.entry.js +3 -3
- package/dist/cjs/co-toggle-button.cjs.entry.js +3 -3
- package/dist/cjs/co-transfer-list.cjs.entry.js +1 -1
- package/dist/cjs/co-video.cjs.entry.js +3 -3
- package/dist/cjs/cobalt.cjs.js +2 -2
- package/dist/cjs/{fieldChip-D8YJCyQF.js → fieldChip-B_npd9rL.js} +1 -1
- package/dist/cjs/{index-4y1Dm145.js → index-DFZ5YhIT.js} +171 -11
- package/dist/cjs/{index-DxEFsH_t.js → index-kBiXCEE7.js} +13 -9
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{requiredMark-B3pKyqYI.js → requiredMark-DuMIcKtt.js} +1 -1
- package/dist/cjs/{richTextI18n-B7ktXg3M.js → richTextI18n-B28uAhh4.js} +3 -0
- package/dist/cjs/{toolbar-config-3PlT-3zm.js → toolbar-config-BQfWTW6P.js} +2 -0
- package/dist/cobalt/cobalt.css +1 -1
- package/dist/cobalt/cobalt.esm.js +1 -1
- package/dist/cobalt/{p-86e60cfa.entry.js → p-0110108f.entry.js} +1 -1
- package/dist/cobalt/p-037cc571.entry.js +1 -0
- package/dist/cobalt/{p-47a2dd67.entry.js → p-080f62e4.entry.js} +1 -1
- package/dist/cobalt/{p-8128e84a.entry.js → p-0a294205.entry.js} +1 -1
- package/dist/cobalt/{p-a9afbaa6.entry.js → p-0b7359bb.entry.js} +1 -1
- package/dist/cobalt/p-0b92167a.entry.js +1 -0
- package/dist/cobalt/p-0bc5a962.entry.js +1 -0
- package/dist/cobalt/{p-02c5a9a9.entry.js → p-202eadfc.entry.js} +1 -1
- package/dist/cobalt/{p-1681ce1d.entry.js → p-264508ae.entry.js} +1 -1
- package/dist/cobalt/{p-b8ec0cc1.entry.js → p-2661557c.entry.js} +1 -1
- package/dist/cobalt/{p-771bc8fe.entry.js → p-27dce0ac.entry.js} +1 -1
- package/dist/cobalt/{p-c3462def.entry.js → p-28ab9cef.entry.js} +1 -1
- package/dist/cobalt/{p-d9608046.entry.js → p-2da09948.entry.js} +1 -1
- package/dist/cobalt/p-2f6c7eb5.entry.js +1 -0
- package/dist/cobalt/{p-002e5beb.entry.js → p-30c80e3a.entry.js} +1 -1
- package/dist/cobalt/p-331a0108.entry.js +1 -0
- package/dist/cobalt/{p-c0f39ddd.entry.js → p-36ad3a96.entry.js} +1 -1
- package/dist/cobalt/{p-8dfb6886.entry.js → p-3af74ab8.entry.js} +1 -1
- package/dist/cobalt/{p-c6fedc59.entry.js → p-3b9be8a8.entry.js} +1 -1
- package/dist/cobalt/p-3c681e3a.entry.js +1 -0
- package/dist/cobalt/{p-14d4c5c7.entry.js → p-3ecbbe93.entry.js} +1 -1
- package/dist/cobalt/{p-9c873a6a.entry.js → p-3f1030fb.entry.js} +1 -1
- package/dist/cobalt/p-3f7215e7.entry.js +1 -0
- package/dist/cobalt/p-431cec34.entry.js +1 -0
- package/dist/cobalt/p-48fbf051.entry.js +1 -0
- package/dist/cobalt/{p-e420d5c9.entry.js → p-4f615cbd.entry.js} +1 -1
- package/dist/cobalt/{p-81cfd951.entry.js → p-5319ac3f.entry.js} +1 -1
- package/dist/cobalt/p-532baca4.entry.js +1 -0
- package/dist/cobalt/{p-ba66584f.entry.js → p-53a276a8.entry.js} +1 -1
- package/dist/cobalt/{p-f0de4415.entry.js → p-543cc00d.entry.js} +1 -1
- package/dist/cobalt/{p-f073b467.entry.js → p-54857f78.entry.js} +1 -1
- package/dist/cobalt/{p-85eed52c.entry.js → p-54f8c68c.entry.js} +1 -1
- package/dist/cobalt/{p-9c6ca902.entry.js → p-585c132d.entry.js} +1 -1
- package/dist/cobalt/{p-8f194753.entry.js → p-59b114ab.entry.js} +1 -1
- package/dist/cobalt/{p-2d1cbd7f.entry.js → p-5b84cf37.entry.js} +1 -1
- package/dist/cobalt/{p-0d7536a8.entry.js → p-5c250889.entry.js} +1 -1
- package/dist/cobalt/{p-e33853fa.entry.js → p-5d0510a5.entry.js} +1 -1
- package/dist/cobalt/{p-f86ccb38.entry.js → p-5e246304.entry.js} +1 -1
- package/dist/cobalt/{p-075eed3d.entry.js → p-616e4286.entry.js} +1 -1
- package/dist/cobalt/{p-8e823c15.entry.js → p-64115d66.entry.js} +1 -1
- package/dist/cobalt/{p-495c9b99.entry.js → p-69723cc1.entry.js} +1 -1
- package/dist/cobalt/{p-6ad1625a.entry.js → p-69ce2269.entry.js} +1 -1
- package/dist/cobalt/{p-b1197c08.entry.js → p-6b38e8fb.entry.js} +1 -1
- package/dist/cobalt/{p-5c43d30e.entry.js → p-7178113f.entry.js} +1 -1
- package/dist/cobalt/p-741cf623.entry.js +1 -0
- package/dist/cobalt/{p-1726ce07.entry.js → p-75515a8e.entry.js} +1 -1
- package/dist/cobalt/{p-fd27c2bd.entry.js → p-7f78e45c.entry.js} +1 -1
- package/dist/cobalt/{p-3f06d373.entry.js → p-8155d781.entry.js} +1 -1
- package/dist/cobalt/{p-e710b9ea.entry.js → p-8fe5b07e.entry.js} +1 -1
- package/dist/cobalt/{p-9a587867.entry.js → p-9211e794.entry.js} +1 -1
- package/dist/cobalt/p-97875bde.entry.js +1 -0
- package/dist/cobalt/p-9824c478.entry.js +1 -0
- package/dist/cobalt/{p-cc0a4617.entry.js → p-9994fcd8.entry.js} +1 -1
- package/dist/cobalt/p-9bf42bf4.entry.js +1 -0
- package/dist/cobalt/{p-f6ac5301.entry.js → p-9fab9c1f.entry.js} +1 -1
- package/dist/cobalt/p-BCEz3S-z.js +2 -0
- package/dist/cobalt/{p-Bgxofdfb.js → p-BL0sCfMH.js} +1 -1
- package/dist/cobalt/p-BYKAgwq3.js +1 -0
- package/dist/cobalt/p-C-d15gih.js +1 -0
- package/dist/cobalt/p-D5gr2ent.js +1 -0
- package/dist/cobalt/p-WeuPA9Rw.js +1 -0
- package/dist/cobalt/{p-77d01b39.entry.js → p-a252f8c5.entry.js} +1 -1
- package/dist/cobalt/{p-809015dd.entry.js → p-b06af5c6.entry.js} +1 -1
- package/dist/cobalt/p-b87a2e7a.entry.js +1 -0
- package/dist/cobalt/{p-fb251497.entry.js → p-ba5c6aa7.entry.js} +1 -1
- package/dist/cobalt/{p-373cd08e.entry.js → p-bb00ae4a.entry.js} +1 -1
- package/dist/cobalt/{p-5edd0d3f.entry.js → p-bcd38114.entry.js} +1 -1
- package/dist/cobalt/{p-bb534985.entry.js → p-c237add6.entry.js} +1 -1
- package/dist/cobalt/{p-c750b2d2.entry.js → p-c3004e1c.entry.js} +1 -1
- package/dist/cobalt/p-c589ae25.entry.js +1 -0
- package/dist/cobalt/p-c635417b.entry.js +1 -0
- package/dist/cobalt/p-c7d9ff39.entry.js +1 -0
- package/dist/cobalt/{p-c1e53e4c.entry.js → p-c9528a5f.entry.js} +1 -1
- package/dist/cobalt/{p-20ba59a2.entry.js → p-cbac0a11.entry.js} +1 -1
- package/dist/cobalt/p-cd28aa6d.entry.js +1 -0
- package/dist/cobalt/{p-5c3101b5.entry.js → p-cdedaa82.entry.js} +1 -1
- package/dist/cobalt/{p-627d2d1a.entry.js → p-ceb85838.entry.js} +1 -1
- package/dist/cobalt/{p-5e9a9caf.entry.js → p-d3a1a604.entry.js} +1 -1
- package/dist/cobalt/{p-a6900010.entry.js → p-d71b800a.entry.js} +1 -1
- package/dist/cobalt/p-df752f6e.entry.js +1 -0
- package/dist/cobalt/{p-b4bed98b.entry.js → p-e1b468c1.entry.js} +1 -1
- package/dist/cobalt/{p-0d6a562d.entry.js → p-e4555fda.entry.js} +1 -1
- package/dist/cobalt/p-ec9dd3a3.entry.js +1 -0
- package/dist/cobalt/p-eec1c44c.entry.js +1 -0
- package/dist/cobalt/p-eeed80ac.entry.js +1 -0
- package/dist/cobalt/p-f0a98453.entry.js +1 -0
- package/dist/cobalt/{p-af4cb263.entry.js → p-ff581807.entry.js} +1 -1
- package/dist/cobalt/p-fffeb610.entry.js +1 -0
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/co-autocomplete/co-autocomplete.css +1 -1
- package/dist/collection/components/co-avatar/co-avatar.css +23 -0
- package/dist/collection/components/co-avatar/co-avatar.js +24 -1
- package/dist/collection/components/co-avatar-group/co-avatar-group.css +9 -5
- 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.js +1 -1
- package/dist/collection/components/co-breadcrumb-item/co-breadcrumb-item.js +2 -2
- package/dist/collection/components/co-button/co-button.js +2 -2
- 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.js +1 -1
- package/dist/collection/components/co-card/co-card.js +2 -2
- package/dist/collection/components/co-carousel/co-carousel.css +152 -0
- package/dist/collection/components/co-carousel/co-carousel.js +633 -0
- package/dist/collection/components/co-carousel-item/co-carousel-item.css +6 -0
- package/dist/collection/components/co-carousel-item/co-carousel-item.js +25 -0
- package/dist/collection/components/co-checkbox/co-checkbox.js +3 -3
- package/dist/collection/components/co-chip/co-chip.js +2 -2
- package/dist/collection/components/co-color-picker/co-color-picker.css +11 -10
- 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 -8
- package/dist/collection/components/co-data-table/co-data-table.css +19 -4
- 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 +6 -7
- package/dist/collection/components/co-date-field/co-date-field.js +4 -4
- package/dist/collection/components/co-date-picker/co-date-picker.css +16 -0
- package/dist/collection/components/co-date-picker/co-date-picker.js +28 -1
- 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 +13 -1
- package/dist/collection/components/co-date-range-picker/co-date-range-picker.js +26 -0
- package/dist/collection/components/co-drive-card/co-drive-card.js +1 -1
- package/dist/collection/components/co-drop-zone/co-drop-zone.js +1 -1
- package/dist/collection/components/co-empty-state/co-empty-state.js +2 -2
- package/dist/collection/components/co-event-calendar/co-event-calendar.js +2 -2
- package/dist/collection/components/co-fab/co-fab.css +70 -10
- package/dist/collection/components/co-fab/co-fab.js +39 -4
- package/dist/collection/components/co-file-field/co-file-field.css +2 -2
- 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.js +2 -2
- package/dist/collection/components/co-helper-text/co-helper-text.js +2 -2
- package/dist/collection/components/co-icon/co-icon.js +2 -2
- package/dist/collection/components/co-icon-button/co-icon-button.js +1 -1
- package/dist/collection/components/co-input/co-input.css +13 -1
- package/dist/collection/components/co-input/co-input.js +26 -0
- package/dist/collection/components/co-json-field/co-json-field.css +4 -8
- package/dist/collection/components/co-json-field/co-json-field.js +3 -3
- package/dist/collection/components/co-lightbox/co-lightbox.css +12 -1
- package/dist/collection/components/co-lightbox/co-lightbox.js +31 -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.js +2 -2
- package/dist/collection/components/co-menu/co-menu.js +1 -1
- package/dist/collection/components/co-menu-divider/co-menu-divider.js +1 -1
- package/dist/collection/components/co-modal/co-modal.js +2 -2
- package/dist/collection/components/co-navbar/co-navbar.js +2 -2
- package/dist/collection/components/co-number-field/co-number-field.css +1 -1
- package/dist/collection/components/co-number-field/co-number-field.js +2 -2
- package/dist/collection/components/co-option-list/co-option-list.js +2 -2
- 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 +2 -2
- package/dist/collection/components/co-phone-field/co-phone-field.js +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-rating/co-rating.js +3 -3
- package/dist/collection/components/co-ref-field/co-ref-field.css +17 -1
- package/dist/collection/components/co-ref-field/co-ref-field.js +27 -1
- package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.css +21 -3
- package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.js +97 -4
- package/dist/collection/components/co-rich-text-toolbar/co-rich-text-toolbar.js +93 -3
- package/dist/collection/components/co-rich-text-viewer/co-rich-text-viewer.css +19 -0
- package/dist/collection/components/co-rich-text-viewer/co-rich-text-viewer.js +53 -4
- package/dist/collection/components/co-row/co-row.js +2 -2
- package/dist/collection/components/co-select/co-select.css +12 -1
- package/dist/collection/components/co-select/co-select.js +30 -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-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.js +3 -3
- package/dist/collection/components/co-tab/co-tab.js +2 -2
- package/dist/collection/components/co-tab-group/co-tab-group.css +7 -4
- package/dist/collection/components/co-tab-group/co-tab-group.js +2 -2
- package/dist/collection/components/co-tags-field/co-tags-field.css +12 -21
- package/dist/collection/components/co-tags-field/co-tags-field.js +5 -5
- package/dist/collection/components/co-textarea/co-textarea.css +18 -8
- package/dist/collection/components/co-textarea/co-textarea.js +30 -4
- package/dist/collection/components/co-toggle-button/co-toggle-button.js +2 -2
- package/dist/collection/components/co-toggle-button-group/co-toggle-button-group.js +2 -2
- package/dist/collection/components/co-tooltip/co-tooltip.js +2 -2
- package/dist/collection/components/co-video/co-video.js +2 -2
- package/dist/collection/utils/carouselI18n.js +36 -0
- package/dist/collection/utils/richTextI18n.js +3 -0
- package/dist/components/co-accordion.js +1 -1
- package/dist/components/co-autocomplete.js +1 -1
- package/dist/components/co-avatar-group.js +1 -1
- package/dist/components/co-avatar.js +1 -1
- package/dist/components/co-badge.js +1 -1
- package/dist/components/co-bottom-sheet.js +1 -1
- package/dist/components/co-breadcrumb-item.js +1 -1
- package/dist/components/co-breadcrumb.js +1 -1
- package/dist/components/co-button-group.js +1 -1
- package/dist/components/co-button.js +1 -1
- package/dist/components/co-calendar-month.js +1 -1
- package/dist/components/co-calendar.js +1 -1
- package/dist/components/co-card.js +1 -1
- package/dist/components/co-carousel-item.d.ts +11 -0
- package/dist/components/co-carousel-item.js +1 -0
- package/dist/components/co-carousel.d.ts +11 -0
- package/dist/components/co-carousel.js +1 -0
- 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.js +1 -1
- package/dist/components/co-drop-zone.js +1 -1
- package/dist/components/co-empty-state.js +1 -1
- package/dist/components/co-event-calendar.js +1 -1
- package/dist/components/co-fab.js +1 -1
- package/dist/components/co-file-field.js +1 -1
- package/dist/components/co-file-type-tile.js +1 -1
- package/dist/components/co-helper-text.js +1 -1
- package/dist/components/co-icon-button.js +1 -1
- package/dist/components/co-icon.js +1 -1
- package/dist/components/co-input.js +1 -1
- package/dist/components/co-json-field.js +1 -1
- package/dist/components/co-lightbox.js +1 -1
- package/dist/components/co-list-footer.js +1 -1
- package/dist/components/co-list-item.js +1 -1
- package/dist/components/co-media-thumb.js +1 -1
- package/dist/components/co-menu-divider.js +1 -1
- package/dist/components/co-menu-item.js +1 -1
- package/dist/components/co-menu.js +1 -1
- package/dist/components/co-modal.js +1 -1
- package/dist/components/co-navbar.js +1 -1
- package/dist/components/co-number-field.js +1 -1
- package/dist/components/co-option-list.js +1 -1
- package/dist/components/co-overlay.js +1 -1
- package/dist/components/co-page-header.js +1 -1
- package/dist/components/co-phone-field.js +1 -1
- package/dist/components/co-progress-bar.js +1 -1
- package/dist/components/co-progress-circle.js +1 -1
- package/dist/components/co-radio-group.js +1 -1
- package/dist/components/co-radio.js +1 -1
- package/dist/components/co-rating.js +1 -1
- package/dist/components/co-ref-field.js +1 -1
- package/dist/components/co-rich-text-editor.js +1 -1
- package/dist/components/co-rich-text-toolbar.js +1 -1
- package/dist/components/co-rich-text-viewer.js +1 -1
- package/dist/components/co-row.js +1 -1
- package/dist/components/co-select.js +1 -1
- package/dist/components/co-separator.js +1 -1
- package/dist/components/co-sidebar-nav.js +1 -1
- package/dist/components/co-sidebar.js +1 -1
- package/dist/components/co-skeleton.js +1 -1
- package/dist/components/co-slider.js +1 -1
- package/dist/components/co-switch.js +1 -1
- package/dist/components/co-tab-group.js +1 -1
- package/dist/components/co-tab.js +1 -1
- package/dist/components/co-tags-field.js +1 -1
- package/dist/components/co-textarea.js +1 -1
- package/dist/components/co-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-CNIs9j-h.js → p-9aNhJfTT.js} +1 -1
- package/dist/components/{p-QWi9AmnD.js → p-B0b9Etx4.js} +1 -1
- package/dist/components/{p-D4SOCy8I.js → p-B3U63yZw.js} +1 -1
- package/dist/components/p-B7Yv00g9.js +1 -0
- package/dist/components/{p-Bgxofdfb.js → p-BL0sCfMH.js} +1 -1
- package/dist/components/{p-DrQh1Cb8.js → p-BTa6ss5i.js} +1 -1
- package/dist/components/p-BtpRnpaF.js +1 -0
- package/dist/components/{p-lus32JrB.js → p-Bul6EdDX.js} +1 -1
- package/dist/components/{p-COb8X_fE.js → p-Bzg5FPSA.js} +1 -1
- package/dist/components/{p-Cam92sWP.js → p-CQ-8domm.js} +1 -1
- package/dist/components/{p-Bsq90mo4.js → p-CVeEoHr7.js} +1 -1
- package/dist/components/p-CYi6V_Ss.js +1 -0
- package/dist/components/{p-DvL2TcDG.js → p-Cd3inFSL.js} +1 -1
- package/dist/components/{p-OKwHt2i9.js → p-CuQjKAf5.js} +1 -1
- package/dist/components/{p-Ba5lW0pA.js → p-DKvTqEaf.js} +1 -1
- package/dist/components/p-DfpOEXHC.js +1 -0
- package/dist/components/p-DwwxS5bY.js +1 -0
- package/dist/components/p-T0UfY6rA.js +1 -0
- package/dist/components/p-WeuPA9Rw.js +1 -0
- package/dist/components/{p-_k-j03K-.js → p-oV_1MoAN.js} +1 -1
- package/dist/esm/co-accordion.entry.js +1 -1
- package/dist/esm/co-app-shell.entry.js +1 -1
- package/dist/esm/co-autocomplete.entry.js +3 -3
- package/dist/esm/co-avatar-group.entry.js +3 -3
- package/dist/esm/{co-tooltip.entry.js → co-avatar_2.entry.js} +95 -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 +3 -3
- package/dist/esm/co-breadcrumb.entry.js +2 -2
- package/dist/esm/co-button-group.entry.js +3 -3
- package/dist/esm/co-button.entry.js +3 -3
- package/dist/esm/co-calendar-month.entry.js +2 -2
- package/dist/esm/co-calendar_3.entry.js +8 -8
- package/dist/esm/co-card.entry.js +3 -3
- package/dist/esm/co-carousel-item.entry.js +15 -0
- package/dist/esm/co-carousel.entry.js +366 -0
- package/dist/esm/co-checkbox-group.entry.js +1 -1
- package/dist/esm/co-checkbox.entry.js +4 -4
- package/dist/esm/co-chip_2.entry.js +5 -5
- package/dist/esm/co-color-picker.entry.js +5 -5
- package/dist/esm/co-column-picker.entry.js +3 -3
- package/dist/esm/co-combobox.entry.js +3 -3
- package/dist/esm/co-command-search.entry.js +1 -1
- package/dist/esm/co-data-table-pagination.entry.js +5 -5
- package/dist/esm/co-data-table.entry.js +2 -2
- package/dist/esm/co-date-picker.entry.js +11 -4
- package/dist/esm/co-date-range-picker.entry.js +9 -3
- package/dist/esm/co-date-range.entry.js +2 -2
- package/dist/esm/co-drive-card.entry.js +2 -2
- package/dist/esm/co-drop-zone.entry.js +2 -2
- package/dist/esm/co-empty-state.entry.js +3 -3
- package/dist/esm/co-event-calendar.entry.js +3 -3
- package/dist/esm/co-fab.entry.js +21 -6
- package/dist/esm/co-file-field.entry.js +8 -8
- package/dist/esm/co-file-type-tile.entry.js +3 -3
- package/dist/esm/co-helper-text.entry.js +3 -3
- package/dist/esm/co-icon-button.entry.js +2 -2
- package/dist/esm/co-icon.entry.js +3 -3
- package/dist/esm/co-input.entry.js +9 -3
- package/dist/esm/co-json-field.entry.js +6 -6
- package/dist/esm/co-lightbox.entry.js +33 -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 +1 -1
- package/dist/esm/co-media-thumb.entry.js +3 -3
- package/dist/esm/co-menu-divider.entry.js +2 -2
- package/dist/esm/co-menu-item.entry.js +1 -1
- package/dist/esm/co-menu.entry.js +2 -2
- package/dist/esm/co-modal.entry.js +3 -3
- package/dist/esm/co-navbar.entry.js +3 -3
- package/dist/esm/co-number-field.entry.js +5 -5
- package/dist/esm/co-overlay.entry.js +2 -2
- 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 +1 -1
- package/dist/esm/co-progress-bar.entry.js +3 -3
- package/dist/esm/co-progress-circle.entry.js +3 -3
- package/dist/esm/co-radio-group.entry.js +1 -1
- package/dist/esm/co-radio.entry.js +4 -4
- package/dist/esm/co-rating.entry.js +4 -4
- package/dist/esm/co-ref-field.entry.js +11 -5
- package/dist/esm/co-rich-text-editor.entry.js +22 -7
- package/dist/esm/co-rich-text-toolbar.entry.js +36 -4
- package/dist/esm/co-rich-text-viewer.entry.js +36 -6
- package/dist/esm/co-row.entry.js +3 -3
- package/dist/esm/co-segmented-bar.entry.js +1 -1
- package/dist/esm/co-select.entry.js +13 -7
- package/dist/esm/co-separator.entry.js +2 -2
- package/dist/esm/co-sidebar-nav.entry.js +1 -1
- 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 +5 -5
- package/dist/esm/co-tab-group.entry.js +4 -4
- package/dist/esm/co-tab.entry.js +3 -3
- package/dist/esm/co-tags-field.entry.js +9 -9
- package/dist/esm/co-textarea.entry.js +13 -7
- package/dist/esm/co-toast.entry.js +1 -1
- package/dist/esm/co-toggle-button-group.entry.js +3 -3
- package/dist/esm/co-toggle-button.entry.js +3 -3
- package/dist/esm/co-transfer-list.entry.js +1 -1
- package/dist/esm/co-video.entry.js +3 -3
- package/dist/esm/cobalt.js +3 -3
- package/dist/esm/{fieldChip-ChXW__C5.js → fieldChip-Bb8YIN0J.js} +1 -1
- package/dist/esm/{index-tT-aZV0-.js → index-BCEz3S-z.js} +13 -9
- package/dist/esm/{index-Cyrxk8Qq.js → index-RuXxdKzC.js} +171 -11
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{requiredMark-C7-_2UhB.js → requiredMark-D7kAMXHM.js} +1 -1
- package/dist/esm/{richTextI18n-B-ckjCUA.js → richTextI18n-BYKAgwq3.js} +3 -0
- package/dist/esm/{toolbar-config-ChibIpZv.js → toolbar-config-WeuPA9Rw.js} +2 -0
- package/dist/types/components/co-avatar/co-avatar.d.ts +5 -0
- package/dist/types/components/co-carousel/co-carousel.d.ts +85 -0
- package/dist/types/components/co-carousel-item/co-carousel-item.d.ts +10 -0
- package/dist/types/components/co-date-picker/co-date-picker.d.ts +7 -0
- package/dist/types/components/co-date-range-picker/co-date-range-picker.d.ts +5 -0
- package/dist/types/components/co-fab/co-fab.d.ts +6 -0
- package/dist/types/components/co-input/co-input.d.ts +5 -0
- package/dist/types/components/co-lightbox/co-lightbox.d.ts +7 -0
- package/dist/types/components/co-ref-field/co-ref-field.d.ts +5 -0
- package/dist/types/components/co-rich-text-editor/co-rich-text-editor.d.ts +17 -0
- package/dist/types/components/co-rich-text-toolbar/co-rich-text-toolbar.d.ts +12 -1
- package/dist/types/components/co-rich-text-viewer/co-rich-text-viewer.d.ts +10 -0
- package/dist/types/components/co-select/co-select.d.ts +5 -0
- package/dist/types/components/co-textarea/co-textarea.d.ts +5 -0
- package/dist/types/components.d.ts +363 -3
- package/dist/types/utils/carouselI18n.d.ts +10 -0
- package/dist/types/utils/richTextI18n.d.ts +1 -0
- package/package.json +4 -4
- package/dist/cjs/co-avatar.cjs.entry.js +0 -92
- package/dist/cobalt/p-0c0621a7.entry.js +0 -1
- package/dist/cobalt/p-13fc9c8a.entry.js +0 -1
- package/dist/cobalt/p-3f68fd2e.entry.js +0 -1
- package/dist/cobalt/p-4a075257.entry.js +0 -1
- package/dist/cobalt/p-5647ca9d.entry.js +0 -1
- package/dist/cobalt/p-5b31d45b.entry.js +0 -1
- package/dist/cobalt/p-6911a034.entry.js +0 -1
- package/dist/cobalt/p-70f70e02.entry.js +0 -1
- package/dist/cobalt/p-73b30ebb.entry.js +0 -1
- package/dist/cobalt/p-75dcaeb0.entry.js +0 -1
- package/dist/cobalt/p-7780ddb5.entry.js +0 -1
- package/dist/cobalt/p-7FZXeBK4.js +0 -1
- package/dist/cobalt/p-86d4e016.entry.js +0 -1
- package/dist/cobalt/p-8a9ed2da.entry.js +0 -1
- package/dist/cobalt/p-B-ckjCUA.js +0 -1
- package/dist/cobalt/p-BAA4ln31.js +0 -1
- package/dist/cobalt/p-ChibIpZv.js +0 -1
- package/dist/cobalt/p-aa20ffca.entry.js +0 -1
- package/dist/cobalt/p-ac5df270.entry.js +0 -1
- package/dist/cobalt/p-c2e2eee9.entry.js +0 -1
- package/dist/cobalt/p-cc8e2f16.entry.js +0 -1
- package/dist/cobalt/p-e1957078.entry.js +0 -1
- package/dist/cobalt/p-e2762263.entry.js +0 -1
- package/dist/cobalt/p-e4a539da.entry.js +0 -1
- package/dist/cobalt/p-e7085f08.entry.js +0 -1
- package/dist/cobalt/p-e9aaeaf7.entry.js +0 -1
- package/dist/cobalt/p-f36e461f.entry.js +0 -1
- package/dist/cobalt/p-f6b0c4a0.entry.js +0 -1
- package/dist/cobalt/p-tT-aZV0-.js +0 -2
- package/dist/components/p-BHqdcGDh.js +0 -1
- package/dist/components/p-BJTMFYax.js +0 -1
- package/dist/components/p-ChibIpZv.js +0 -1
- package/dist/components/p-D3ts7oo9.js +0 -1
- package/dist/components/p-Dh-h40mY.js +0 -1
- package/dist/components/p-Xwo2HQmt.js +0 -1
- package/dist/components/p-eSq2ze8W.js +0 -1
- package/dist/esm/co-avatar.entry.js +0 -90
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as o,p as r,H as e,c as i,h as a}from"./index.js";import{d as c}from"./p-
|
|
1
|
+
import{t as o,p as r,H as e,c as i,h as a}from"./index.js";import{d as c}from"./p-B3U63yZw.js";const t=r(class extends e{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow(),this.coChange=i(this,"coChange",7),this.layout="vertical",this.status="default",this.options=[],this.direction="column",this.size="small",this.disabled=!1,this.handleSelect=o=>{this.disabled||(this.value=o,this.coChange.emit(o))}}onValueChange(){}get parsedOptions(){let o=this.options;if("string"==typeof o)try{o=JSON.parse(o)}catch(o){return[]}return Array.isArray(o)?o.map((o=>"string"==typeof o?{label:o,value:o}:o)):[]}get statusIcon(){return{error:"warning-circle",success:"check-circle",warning:"warning",info:"info"}[this.status]||null}render(){const o=this.label||this.secondaryLabel,r=this.helperText,e=this.parsedOptions;return a("div",{key:"9e3a5c50cf5b0797146b7d6649cd1e1f6176e7a8",class:{"co-radio-group":!0,"co-radio-group--disabled":this.disabled,["co-radio-group--"+this.status]:"default"!==this.status},role:"radiogroup","aria-label":this.label||""},o&&a("div",{key:"a6670dd8052801c17380161a875e5504c773f7cf",class:"co-radio-group__labels"},this.label&&a("span",{key:"2e11c6a1dc36e880975315147fd731a7811fd42f",class:"co-radio-group__label"},this.label),this.secondaryLabel&&a("span",{key:"cf844f3dfd22693afefb47bad0f467edd7e33329",class:"co-radio-group__secondary-label"},this.secondaryLabel)),a("div",{key:"e2650512d0b9c217f4d6f0c041157e546f582fa2",class:{"co-radio-group__options":!0,["co-radio-group__options--"+this.direction]:!0}},e.map((o=>{const r=this.disabled||!!o.disabled,e=this.value===o.value;return a("div",{class:{"co-radio-group__item":!0,"co-radio-group__item--disabled":r},onClick:()=>!r&&this.handleSelect(o.value)},a("span",{class:{"co-radio-group__circle":!0,["co-radio-group__circle--"+this.size]:!0,"co-radio-group__circle--checked":e,"co-radio-group__circle--disabled":r},role:"radio","aria-checked":e+"","aria-label":o.label}),a("span",{class:"co-radio-group__option-label"},o.label))}))),r&&a("div",{key:"8684377f807fe91a0d88337e61cb7c7de0226832",class:"co-radio-group__helper co-radio-group__helper--"+this.status},this.statusIcon&&a("co-icon",{key:"2e12226109aec413ac76f71d0c32ac98f41b12f4",name:this.statusIcon,size:14,weight:"fill",class:"co-radio-group__helper-icon"}),a("span",{key:"e4d32771b3fe3a49ee1f907c0545fff31441e887",class:"co-radio-group__helper-text"},this.helperText)))}static get watchers(){return{value:[{onValueChange:0}]}}static get style(){return":host{display:block;font-family:var(--co-font-family-primary);font-size:var(--co-font-size-14);letter-spacing:var(--co-font-letter-spacing-body);line-height:1}.co-radio-group{display:flex;flex-direction:column;gap:var(--co-spacing-sm2)}.co-radio-group__labels{display:flex;align-items:center;justify-content:space-between;padding:0 var(--co-spacing-xs);gap:var(--co-spacing-sm2)}.co-radio-group__label{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);font-weight:400;line-height:1;white-space:nowrap;cursor:default}.co-radio-group__secondary-label{color:var(--co-semantic-text-muted);font-size:var(--co-font-size-14);font-weight:400;line-height:1;white-space:nowrap;text-align:right}.co-radio-group--disabled .co-radio-group__label,.co-radio-group--disabled .co-radio-group__secondary-label{color:var(--co-semantic-text-disabled)}.co-radio-group__options{display:flex;gap:var(--co-spacing-md)}.co-radio-group__options--column{flex-direction:column;gap:var(--co-spacing-sm2)}.co-radio-group__options--row{flex-direction:row;flex-wrap:wrap;gap:var(--co-spacing-md)}.co-radio-group__item{display:flex;align-items:center;gap:var(--co-spacing-sm2);cursor:pointer;user-select:none}.co-radio-group__item--disabled{cursor:not-allowed}.co-radio-group__option-label{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);font-weight:400;line-height:1;white-space:nowrap}.co-radio-group__item--disabled .co-radio-group__option-label{color:var(--co-semantic-text-disabled)}.co-radio-group__circle{position:relative;display:inline-flex;align-items:center;justify-content:center;border-style:solid;border-width:1.5px;border-radius:var(--co-border-radius-full);background:transparent;flex-shrink:0;box-sizing:border-box;transition:border-color 0.15s ease;overflow:hidden}.co-radio-group__circle--small{width:16px;height:16px}.co-radio-group__circle--large{width:24px;height:24px}.co-radio-group__circle:not(.co-radio-group__circle--checked){border-color:var(--co-semantic-border-default)}.co-radio-group__circle--checked{border-color:var(--co-semantic-border-strong)}.co-radio-group__circle--checked::after{content:'';display:block;border-radius:var(--co-border-radius-full);background:var(--co-semantic-surface-primary)}.co-radio-group__circle--small.co-radio-group__circle--checked::after{width:8px;height:8px}.co-radio-group__circle--large.co-radio-group__circle--checked::after{width:14px;height:14px}.co-radio-group__circle--disabled{opacity:0.4;cursor:not-allowed;pointer-events:none}.co-radio-group--error .co-radio-group__circle{border-color:var(--co-semantic-status-error)}.co-radio-group__helper{display:flex;align-items:center;gap:var(--co-spacing-xs);padding:0 var(--co-spacing-xs)}.co-radio-group__helper-icon{flex-shrink:0;display:flex;align-items:center}.co-radio-group__helper-text{color:var(--co-semantic-text-muted);font-size:var(--co-font-size-14);font-weight:400;line-height:1}.co-radio-group__helper--error .co-radio-group__helper-icon,.co-radio-group__helper--error .co-radio-group__helper-text{color:var(--co-semantic-status-error)}.co-radio-group__helper--success .co-radio-group__helper-icon,.co-radio-group__helper--success .co-radio-group__helper-text{color:var(--co-semantic-status-success)}.co-radio-group__helper--warning .co-radio-group__helper-icon,.co-radio-group__helper--warning .co-radio-group__helper-text{color:var(--co-color-status-review)}.co-radio-group__helper--info .co-radio-group__helper-icon,.co-radio-group__helper--info .co-radio-group__helper-text{color:var(--co-semantic-status-info)}:host([layout='horizontal']) .co-radio-group{display:grid;grid-template-columns:var(--co-field-label-width, max-content) 1fr;align-items:start;column-gap:var(--co-spacing-md);row-gap:var(--co-spacing-sm2)}:host([layout='horizontal']) .co-radio-group__labels{grid-column:1;grid-row:1;padding-top:0;min-width:0}:host([layout='horizontal']) .co-radio-group__label{white-space:normal}:host([layout='horizontal']) .co-radio-group>:not(.co-radio-group__labels){grid-column:2;min-width:0}"}},[1,"co-radio-group",{label:[1],secondaryLabel:[1,"secondary-label"],helperText:[1,"helper-text"],layout:[513],status:[1],value:[1025],options:[1],direction:[1],size:[1],disabled:[4],name:[1]},void 0,{value:[{onValueChange:0}]}]);function s(){"undefined"!=typeof customElements&&["co-radio-group","co-icon"].forEach((r=>{switch(r){case"co-radio-group":customElements.get(o(r))||customElements.define(o(r),t);break;case"co-icon":customElements.get(o(r))||c()}}))}s();const l=t,d=s;export{l as CoRadioGroup,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as o,p as e,H as i,c as r,h as a}from"./index.js";const t=e(class extends i{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow(),this.coChange=r(this,"coChange",7),this.checked=!1,this.size="small",this.disabled=!1,this.value="",this.handleClick=()=>{this.disabled||this.checked||(this.checked=!0,this.coChange.emit(this.value))}}render(){return a("div",{key:"
|
|
1
|
+
import{t as o,p as e,H as i,c as r,h as a}from"./index.js";const t=e(class extends i{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow(),this.coChange=r(this,"coChange",7),this.checked=!1,this.size="small",this.disabled=!1,this.value="",this.handleClick=()=>{this.disabled||this.checked||(this.checked=!0,this.coChange.emit(this.value))}}render(){return a("div",{key:"65bc1f5e350693d2ccbe1fb7e83af03bee729904",class:{"co-radio-row":!0,"co-radio-row--disabled":this.disabled},onClick:this.handleClick},a("button",{key:"16dfd7001260a09ef6c77b85b8d3b9b465a3fa98",role:"radio","aria-checked":this.checked+"","aria-label":this.label||"",class:{"co-radio":!0,["co-radio--"+this.size]:!0,"co-radio--checked":this.checked,"co-radio--disabled":this.disabled},disabled:this.disabled,part:"circle"}),this.label&&a("span",{key:"87ae90a0b64ca95b0806599f16f7770e06329dfc",class:"co-radio__label",part:"label"},this.label))}static get style(){return":host{display:inline-flex;font-family:var(--co-font-family-primary);font-size:var(--co-font-size-14);letter-spacing:var(--co-font-letter-spacing-body);line-height:1}.co-radio-row{display:flex;align-items:center;gap:var(--co-spacing-sm2);cursor:pointer}.co-radio-row--disabled{cursor:not-allowed}.co-radio__label{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);font-weight:400;line-height:1;white-space:nowrap;user-select:none}.co-radio-row--disabled .co-radio__label{color:var(--co-semantic-text-disabled)}.co-radio{position:relative;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;border-style:solid;border-width:1.5px;border-radius:var(--co-border-radius-full);outline:none;padding:0;background:transparent;flex-shrink:0;box-sizing:border-box;transition:border-color 0.15s ease;overflow:hidden}.co-radio--small{width:16px;height:16px}.co-radio--large{width:24px;height:24px}.co-radio:not(.co-radio--checked){border-color:var(--co-semantic-border-default)}.co-radio--checked{border-color:var(--co-semantic-border-strong)}.co-radio--checked::after{content:'';display:block;border-radius:var(--co-border-radius-full);background:var(--co-semantic-surface-primary)}.co-radio--small.co-radio--checked::after{width:8px;height:8px}.co-radio--large.co-radio--checked::after{width:14px;height:14px}.co-radio--disabled{opacity:0.4;cursor:not-allowed;pointer-events:none}"}},[1,"co-radio",{checked:[1540],size:[1],disabled:[4],label:[1],value:[1]}]);function c(){"undefined"!=typeof customElements&&["co-radio"].forEach((e=>{"co-radio"===e&&(customElements.get(o(e))||customElements.define(o(e),t))}))}c();const s=t,d=c;export{s as CoRadio,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as e,H as i,c as a,h as r}from"./index.js";import{d as s}from"./p-
|
|
1
|
+
import{t,p as e,H as i,c as a,h as r}from"./index.js";import{d as s}from"./p-B3U63yZw.js";const c=e(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.coChange=a(this,"coChange",7),this.value=0,this.max=5,this.size="small",this.disabled=!1,this.readOnly=!1,this.icon="star",this.status="default",this.hoverValue=0,this.handleClick=t=>{if(this.disabled||this.readOnly)return;const e=this.value===t?0:t;this.value=e,this.coChange.emit(e)},this.handleMouseEnter=t=>{this.disabled||this.readOnly||(this.hoverValue=t)},this.handleMouseLeave=()=>{this.hoverValue=0}}get statusIcon(){return{error:"warning-circle",success:"check-circle",warning:"warning",info:"info"}[this.status]||null}render(){const t="large"===this.size?28:20,e=this.hoverValue||this.value,i=Array.from({length:this.max},((t,e)=>e+1));return r("div",{key:"0c7b3f29a8dd3604712402d76d97e7bd89d5009f",class:{"co-rating":!0,"co-rating--disabled":this.disabled,"co-rating--readonly":this.readOnly,["co-rating--"+this.size]:!0}},this.label&&r("label",{key:"a371c03388a9854bbaaf7a9388159a7684a90c2f",class:"co-rating__label"},this.label),r("div",{key:"0479a6b098fe059d800bc1c33b833a3c67f0f2c7",class:"co-rating__stars",onMouseLeave:this.handleMouseLeave},i.map((i=>r("button",{class:{"co-rating__star":!0,"co-rating__star--active":i<=e,"co-rating__star--hover":this.hoverValue>0&&i<=this.hoverValue},type:"button",tabIndex:this.disabled||this.readOnly?-1:0,disabled:this.disabled,onClick:()=>this.handleClick(i),onMouseEnter:()=>this.handleMouseEnter(i),"aria-label":`${i} of ${this.max}`},r("co-icon",{name:this.icon,size:t,weight:i<=e?"fill":"regular"}))))),this.helperText&&r("div",{key:"18267dee4784ba5c2a49acb12374f7d1ae696cdd",class:"co-rating__helper co-rating__helper--"+this.status},this.statusIcon&&r("co-icon",{key:"be16cbf699c2e9360d90106546b8150b3329885b",name:this.statusIcon,size:14,weight:"fill",class:"co-rating__helper-icon"}),r("span",{key:"c7f3f02d072ded7d59bd0a23ff4a6de9cb73cf72",class:"co-rating__helper-text"},this.helperText)))}static get style(){return":host{display:inline-block;font-family:var(--co-font-family-primary);line-height:1}.co-rating{display:flex;flex-direction:column;gap:var(--co-spacing-sm2)}.co-rating__label{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);font-weight:400;cursor:default;padding:0 var(--co-spacing-xs)}.co-rating--disabled .co-rating__label{color:var(--co-semantic-text-disabled)}.co-rating__stars{display:inline-flex;gap:var(--co-spacing-xs)}.co-rating__star{display:flex;align-items:center;justify-content:center;padding:0;margin:0;border:none;background:transparent;cursor:pointer;color:var(--co-semantic-border-subtle);transition:color 0.1s ease, transform 0.1s ease}.co-rating__star:hover:not(:disabled){transform:scale(1.15)}.co-rating__star--active{color:#F5A623;}.co-rating__star--hover{color:#F5A623}.co-rating--disabled .co-rating__star{cursor:not-allowed;opacity:0.5}.co-rating--readonly .co-rating__star{cursor:default}.co-rating__helper{display:flex;align-items:center;gap:var(--co-spacing-xs);padding:0 var(--co-spacing-xs)}.co-rating__helper-icon{flex-shrink:0;display:flex;align-items:center}.co-rating__helper-text{color:var(--co-semantic-text-muted);font-size:var(--co-font-size-14);font-weight:400;line-height:1}.co-rating__helper--error .co-rating__helper-icon,.co-rating__helper--error .co-rating__helper-text{color:var(--co-semantic-status-error)}.co-rating__helper--success .co-rating__helper-icon,.co-rating__helper--success .co-rating__helper-text{color:var(--co-semantic-status-success)}.co-rating__helper--warning .co-rating__helper-icon,.co-rating__helper--warning .co-rating__helper-text{color:var(--co-color-status-review)}.co-rating__helper--info .co-rating__helper-icon,.co-rating__helper--info .co-rating__helper-text{color:var(--co-semantic-status-info)}"}},[1,"co-rating",{label:[1],value:[1538],max:[2],size:[1],disabled:[4],readOnly:[4,"read-only"],icon:[1],helperText:[1,"helper-text"],status:[1],hoverValue:[32]}]);function o(){"undefined"!=typeof customElements&&["co-rating","co-icon"].forEach((e=>{switch(e){case"co-rating":customElements.get(t(e))||customElements.define(t(e),c);break;case"co-icon":customElements.get(t(e))||s()}}))}o();const n=c,l=o;export{n as CoRating,l as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as i,H as o,c as r,h as t}from"./index.js";import{R as s}from"./p-CWneqh4n.js";import{F as a}from"./p-DvhR3H61.js";import{d as c}from"./p-Xwo2HQmt.js";import{d as l}from"./p-D4SOCy8I.js";import{d as n}from"./p-DzoNGEDU.js";import{d as f}from"./p-BHqdcGDh.js";import{d}from"./p-CmCsm4L-.js";const h=i(class extends o{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.coChange=r(this,"coChange",7),this.coClear=r(this,"coClear",7),this.coSearch=r(this,"coSearch",7),this.coLoadMore=r(this,"coLoadMore",7),this.coOpen=r(this,"coOpen",3),this.coClose=r(this,"coClose",3),this.coRemove=r(this,"coRemove",7),this.coFooterPrimary=r(this,"coFooterPrimary",7),this.coFooterSecondary=r(this,"coFooterSecondary",7),this.required=!1,this.placeholder="Select…",this.disabled=!1,this.clearable=!0,this.multiple=!1,this.status="default",this.layout="vertical",this.size="md",this.value="",this.options="[]",this.selectedDisplay="[]",this.loading=!1,this.total=0,this.searchable=!0,this.searchPlaceholder="Search…",this.searchDebounce=350,this.emptyMessage="No results found",this.showFooter=!1,this.footerPrimaryLabel="Ok",this.footerSecondaryLabel="New",this.maxChips=0,this.panelTheme="auto",this.avatarShape="circle",this.isOpen=!1,this.overflowCount=0,this.lastChipsKey="\0",this.pendingFocus=!1,this.handlePopoverOpen=()=>{this.isOpen=!0},this.handlePopoverClose=()=>{this.isOpen=!1},this.handleTriggerClick=e=>{this.disabled&&e.stopPropagation()},this.handleOptionClick=e=>{if(this.multiple){const i=this.parsedValue;let o;o=i.indexOf(e._id)>=0?i.filter((i=>i!==e._id)):[...i,e._id],this.value=JSON.stringify(o),this.coChange.emit({value:o,item:e})}else this.value=e._id,this.coChange.emit({value:e._id,item:e}),this.isOpen=!1},this.handleClear=e=>{e.stopPropagation(),this.value=this.multiple?"[]":"",this.coClear.emit()},this.handleRemoveChip=(e,i)=>{i.stopPropagation();const o=this.parsedValue.filter((i=>i!==e));this.value=JSON.stringify(o),this.coRemove.emit(e)},this.handleFooterPrimary=()=>{this.coFooterPrimary.emit(),this.isOpen=!1},this.handleFooterSecondary=()=>{this.coFooterSecondary.emit()}}get normalizedSize(){return"default"===this.size?"md":this.size}get parsedOptions(){try{const e="string"==typeof this.options?JSON.parse(this.options):this.options;return Array.isArray(e)?e:[]}catch(e){return[]}}get parsedSelectedDisplay(){try{const e="string"==typeof this.selectedDisplay?JSON.parse(this.selectedDisplay):this.selectedDisplay;return Array.isArray(e)?e:[]}catch(e){return[]}}get effectiveDisplayItems(){const e=this.parsedValue;if(0===e.length)return[];const i=new Map;for(const e of this.parsedSelectedDisplay)i.set(e._id,e);for(const e of this.parsedOptions)i.has(e._id)||i.set(e._id,{_id:e._id,label:e.label,description:e.description,color:e.color,avatar:e.avatar,image:e.image});return e.map((e=>i.get(e))).filter(Boolean)}get parsedValue(){if(!this.value)return[];try{const e=JSON.parse(this.value);return Array.isArray(e)?e:[this.value]}catch(e){return this.value?[this.value]:[]}}connectedCallback(){this.resizeObserver=new ResizeObserver((()=>this.calcOverflow()))}componentDidRender(){var e,i,o,r;this.chipsEl!==this.observedChipsEl&&(null===(e=this.resizeObserver)||void 0===e||e.disconnect(),this.chipsEl&&(null===(i=this.resizeObserver)||void 0===i||i.observe(this.chipsEl)),this.observedChipsEl=this.chipsEl);const t=null===(o=this.chipsEl)||void 0===o?void 0:o.querySelectorAll(".co-ref-field__chip"),s=t?Array.from(t,(e=>e.textContent)).join(""):"";s!==this.lastChipsKey&&(this.lastChipsKey=s,this.calcOverflow()),this.pendingFocus&&(null===(r=this.optionListEl)||void 0===r?void 0:r.isConnected)&&(this.pendingFocus=!1,this.optionListEl.focusSearch())}disconnectedCallback(){var e;null===(e=this.resizeObserver)||void 0===e||e.disconnect()}calcOverflow(){if(!this.multiple||this.maxChips>0||!this.chipsEl)return void(0!==this.overflowCount&&(this.overflowCount=0));const e=Array.from(this.chipsEl.querySelectorAll(".co-ref-field__chip"));if(0===e.length)return void(0!==this.overflowCount&&(this.overflowCount=0));const i=this.chipsEl.getBoundingClientRect().right;let o=0;for(let r=e.length-1;r>=0&&e[r].getBoundingClientRect().right>i+1;r--)o++;o!==this.overflowCount&&(this.overflowCount=o)}onOpenChange(e){e?(this.coOpen.emit(),this.pendingFocus=!0):this.coClose.emit()}renderTrigger(){const e=this.effectiveDisplayItems,i=e.length>0;return t("div",{class:{"co-ref-field__trigger":!0,"co-ref-field--open":this.isOpen,"co-ref-field--disabled":this.disabled,["co-ref-field--"+this.normalizedSize]:!0,["co-ref-field--"+this.status]:"default"!==this.status},onClick:this.handleTriggerClick},this.iconLeft&&t("span",{class:"co-ref-field__icon"},t("co-icon",{name:this.iconLeft,size:16})),t("div",{class:"co-ref-field__value"},!i&&t("span",{class:"co-ref-field__placeholder",part:"trigger-placeholder"},this.placeholder),i&&!this.multiple&&this.renderSingleValue(e[0]),i&&this.multiple&&this.renderMultipleValue(e)),i&&this.clearable&&!this.disabled&&t("button",{class:"co-ref-field__clear",part:"trigger-clear",onClick:this.handleClear,type:"button"},t("co-icon",{name:"x",size:14})),t("span",{class:"co-ref-field__caret",part:"trigger-chevron"},t("co-icon",{name:"caret-up-down",size:16})))}renderItemAvatar(e){return e.image||e.avatar?t("co-avatar",{class:"co-ref-field__avatar",type:e.image?"image":"text",src:e.image,text:e.avatar,color:e.color,size:"xxs",shape:this.avatarShape}):e.color?t("span",{class:"co-ref-field__color-dot",style:{backgroundColor:e.color}}):null}renderSingleValue(e){return t("div",{class:"co-ref-field__selected"},this.renderItemAvatar(e),t("span",{class:"co-ref-field__selected-label",part:"trigger-text"},e.label))}renderMultipleValue(e){const i=this.maxChips>0,o=Math.min(this.overflowCount,Math.max(0,e.length-1)),r=i?e.slice(0,this.maxChips):e,s=i?e.length-this.maxChips:o,c=e.length-(i?0:o);return t("div",{class:"co-ref-field__chips-row"},t("div",{class:"co-ref-field__chips",ref:e=>this.chipsEl=e},r.map(((e,o)=>t(a,{key:e._id,baseClass:"co-ref-field__chip",label:e.label,modifiers:{"co-ref-field__chip--avatar":!(!e.image&&!e.avatar),"co-ref-field__chip--clipped":!i&&o>=c,["co-ref-field__chip--"+this.normalizedSize]:!0},onRemove:i=>this.handleRemoveChip(e._id,i)},e.image||e.avatar?this.renderItemAvatar(e):e.color?t("span",{class:"co-ref-field__chip-dot",style:{backgroundColor:e.color}}):null)))),s>0&&t("span",{class:"co-ref-field__chip-overflow"},"+",s))}renderPanel(){return t("div",{class:{"co-ref-field__panel":!0,"co-ref-field__panel--dark":"dark"===this.panelTheme,"co-ref-field__panel--light":"light"===this.panelTheme}},t("co-option-list",{ref:e=>this.optionListEl=e,items:"string"==typeof this.options?this.options:JSON.stringify(this.options),value:this.value,selectedItems:"string"==typeof this.selectedDisplay?this.selectedDisplay:JSON.stringify(this.selectedDisplay),multiple:this.multiple,selectedFirst:this.multiple,selectedAffordance:"deselect",searchable:this.searchable,searchPlaceholder:this.searchPlaceholder,searchDebounce:this.searchDebounce,loading:this.loading,total:this.total,emptyMessage:this.emptyMessage,avatarShape:this.avatarShape,onCoSearch:e=>this.coSearch.emit(e.detail),onCoChange:e=>this.handleOptionClick(e.detail.item),onCoLoadMore:()=>this.coLoadMore.emit()},this.showFooter&&t("div",{class:"co-ref-field__footer",slot:"footer"},t("button",{class:"co-ref-field__footer-btn co-ref-field__footer-btn--secondary",type:"button",onClick:this.handleFooterSecondary},t("co-icon",{name:"plus",size:16}),t("span",null,this.footerSecondaryLabel)),t("button",{class:"co-ref-field__footer-btn co-ref-field__footer-btn--primary",type:"button",onClick:this.handleFooterPrimary},t("co-icon",{name:"check",size:16}),t("span",null,this.footerPrimaryLabel)))))}render(){return t("div",{key:"0a0d45f7d4bd24ab9f0d7f5beeb5d444fae8d5af",class:"co-ref-field"},(this.label||this.secondaryLabel)&&t("div",{key:"da3a3f9d1a5d3abfede2d561793cb905b9764910",class:"co-ref-field__labels"},this.label&&t("label",{key:"89add7a385fcb6ace824e1f5d3a83db86be49b61",class:"co-ref-field__label"},this.labelIcon&&t("co-icon",{key:"224b3ad35fb667b6ba6b7f29a6977f8c982dac54",class:"co-ref-field__label-icon",name:this.labelIcon,size:16}),this.label,t(s,{key:"43dbec013e8110b6a80f6b79f92b93e9bfa5c475",required:this.required})),this.secondaryLabel&&t("span",{key:"8c12c993b8743b4083e9eba68bd5cae1be6141fe",class:"co-ref-field__secondary-label"},this.secondaryLabel)),t("co-popover",{key:"6dc3087da1ac993100c24232e753b9648e1a3503",open:this.isOpen,placement:"bottom-start",matchWidth:!0,offset:4,onCoOpen:this.handlePopoverOpen,onCoClose:this.handlePopoverClose},t("div",{key:"bf97e3528bafe25727a352d9a59c7a2116824336",slot:"trigger"},this.renderTrigger()),this.isOpen&&this.renderPanel()),this.helperText&&t("div",{key:"e43a260c5acfe19f18956a029ad9dceecb05adf2",class:"co-ref-field__helper co-ref-field__helper--"+this.status},"default"!==this.status&&t("co-icon",{key:"7965e269ee23603880e1b215f12688071d26f138",name:"error"===this.status?"warning-circle":"success"===this.status?"check-circle":"info",size:14}),t("span",{key:"9f36e0298724cc9c5296528be84b08d2c17bb6fa"},this.helperText)))}get el(){return this}static get watchers(){return{isOpen:[{onOpenChange:0}]}}static get style(){return":host{display:block;font-family:var(--co-font-family-primary);font-size:var(--co-font-size-14);letter-spacing:var(--co-font-letter-spacing-body);line-height:1;position:relative}.co-ref-field{display:flex;flex-direction:column;gap:var(--co-spacing-sm2)}.co-ref-field__labels{display:flex;align-items:center;justify-content:space-between;padding:0 var(--co-spacing-xs);gap:var(--co-spacing-sm2)}.co-ref-field__label{display:inline-flex;align-items:center;color:var(--co-ref-field-label-color, var(--co-semantic-text-secondary));font-family:var(--co-ref-field-label-font-family, var(--co-font-family-primary));font-size:var(--co-ref-field-label-font-size, var(--co-font-size-14));font-weight:var(--co-ref-field-label-font-weight, 400);line-height:1;white-space:nowrap;cursor:default;text-transform:var(--co-ref-field-label-text-transform, none);letter-spacing:var(--co-ref-field-label-letter-spacing, var(--co-font-letter-spacing-body))}.co-ref-field__secondary-label{color:var(--co-semantic-text-muted);font-family:var(--co-font-family-mono);font-size:var(--co-font-size-12);font-weight:400;line-height:1;white-space:nowrap;text-align:right}.co-ref-field__trigger{display:flex;align-items:center;gap:var(--co-spacing-sm2);padding:var(--co-spacing-sm2) var(--co-spacing-md);background:var(--co-ref-field-trigger-bg, var(--co-semantic-surface-page));border:1px solid var(--co-ref-field-trigger-border-color, var(--co-color-opacity-negro-25, rgba(31, 28, 27, 0.25)));border-radius:var(--co-border-radius-xs);min-height:40px;box-sizing:border-box;cursor:pointer;transition:border-color 0.15s ease, box-shadow 0.15s ease}.co-ref-field--s{min-height:28px;padding:var(--co-spacing-xxs) var(--co-spacing-sm);font-size:var(--co-font-size-12)}.co-ref-field--sm{min-height:32px;padding:var(--co-spacing-xs) var(--co-spacing-sm);font-size:var(--co-font-size-12)}.co-ref-field--lg{min-height:48px;padding:var(--co-spacing-sm) var(--co-spacing-lg);font-size:var(--co-font-size-16)}.co-ref-field--open{border-color:var(--co-semantic-border-focus);box-shadow:0 0 0 2px var(--co-semantic-border-focus-ring)}.co-ref-field--disabled{background:var(--co-semantic-surface-disabled);border-color:transparent;cursor:not-allowed}.co-ref-field--error{border-color:var(--co-semantic-status-error)}.co-ref-field--success{border-color:var(--co-semantic-status-success)}.co-ref-field--warning{border-color:var(--co-color-status-review)}.co-ref-field--s .co-ref-field__selected{--co-avatar-size:20px}.co-ref-field--sm .co-ref-field__selected{--co-avatar-size:22px}.co-ref-field--md .co-ref-field__selected{--co-avatar-size:22px}.co-ref-field--lg .co-ref-field__selected{--co-avatar-size:28px}.co-ref-field__icon{flex-shrink:0;color:var(--co-semantic-text-muted);display:flex;align-items:center}.co-ref-field__label-icon{flex-shrink:0;margin-right:var(--co-spacing-xs);color:var(--co-semantic-text-secondary)}.co-ref-field__value{flex:1;min-width:0;display:flex;align-items:center}.co-ref-field__placeholder{color:var(--co-semantic-text-muted);font-size:inherit;font-weight:400;line-height:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.co-ref-field__caret{flex-shrink:0;color:var(--co-semantic-text-muted);display:flex;align-items:center}.co-ref-field__clear{flex-shrink:0;display:flex;align-items:center;padding:0;margin:0;border:none;background:transparent;cursor:pointer;color:var(--co-semantic-text-muted);transition:color 0.15s ease}.co-ref-field__clear:hover{color:var(--co-semantic-text-default)}.co-ref-field__selected{display:flex;align-items:center;gap:var(--co-spacing-sm);min-width:0}.co-ref-field__color-dot{width:10px;height:10px;min-width:10px;border-radius:var(--co-border-radius-full);flex-shrink:0}.co-ref-field__avatar{flex-shrink:0}.co-ref-field__selected-label{color:var(--co-semantic-text-default);font-size:inherit;font-weight:400;line-height:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.co-ref-field__chips-row{flex:1;min-width:0;display:flex;align-items:center;gap:var(--co-spacing-xs)}.co-ref-field__chips{flex:1;min-width:0;display:flex;flex-wrap:nowrap;overflow:hidden;gap:var(--co-spacing-xs);align-items:center}.co-ref-field__chip{display:inline-flex;align-items:center;gap:var(--co-spacing-sm);padding:0 var(--co-spacing-sm2);background:var(--co-color-gray-100);border-radius:var(--co-border-radius-full);line-height:1;max-width:min(160px, 100%);flex-shrink:0}.co-ref-field__chip--avatar{padding-left:var(--co-spacing-xxs)}.co-ref-field__chip--s{min-height:20px;--co-avatar-size:20px;font-size:var(--co-font-size-12)}.co-ref-field__chip--sm{min-height:22px;--co-avatar-size:22px;font-size:var(--co-font-size-12)}.co-ref-field__chip--md{min-height:22px;--co-avatar-size:22px;font-size:var(--co-font-size-14)}.co-ref-field__chip--lg{min-height:28px;--co-avatar-size:28px;font-size:var(--co-font-size-14)}.co-ref-field__chip--clipped{visibility:hidden}.co-ref-field__chip-dot{width:8px;height:8px;min-width:8px;border-radius:var(--co-border-radius-full);flex-shrink:0}.co-ref-field__chip-label{color:var(--co-semantic-text-default);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.co-ref-field__chip-remove{display:flex;align-items:center;padding:0;margin:0;border:none;background:transparent;cursor:pointer;color:var(--co-color-gray-500);transition:color 0.1s ease;flex-shrink:0}.co-ref-field__chip-remove:hover{color:var(--co-semantic-text-default)}.co-ref-field__chip-overflow{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;padding:var(--co-spacing-xs) var(--co-spacing-sm);background:var(--co-color-opacity-negro-8);border-radius:var(--co-border-radius-full);font-size:var(--co-font-size-12);font-weight:600;color:var(--co-semantic-text-secondary);line-height:1}.co-ref-field__panel{display:flex;flex-direction:column;border-radius:var(--co-border-radius-sm, 12px);overflow:hidden}.co-ref-field__panel--dark{--co-semantic-surface-page:#0A0A0A;--co-semantic-surface-primary:#0A0A0A;--co-semantic-surface-hover:rgba(255, 255, 255, 0.08);--co-semantic-surface-muted:rgba(255, 255, 255, 0.12);--co-semantic-text-default:#ffffff;--co-semantic-text-secondary:rgba(255, 255, 255, 0.8);--co-semantic-text-muted:rgba(255, 255, 255, 0.5);--co-semantic-border-subtle:rgba(255, 255, 255, 0.12);--co-semantic-border-default:rgba(255, 255, 255, 0.16);background:#0A0A0A;color:#ffffff}.co-ref-field__panel--light{--co-semantic-surface-page:#ffffff;--co-semantic-surface-primary:#ffffff;--co-semantic-surface-hover:var(--co-color-gray-100, #f5f5f5);--co-semantic-surface-muted:var(--co-color-gray-200, #e5e5e5);--co-semantic-text-default:var(--co-color-gray-700, #1F1C1B);--co-semantic-text-secondary:rgba(0, 0, 0, 0.6);--co-semantic-text-muted:rgba(0, 0, 0, 0.45);--co-semantic-border-subtle:var(--co-color-gray-200, #e5e5e5);--co-semantic-border-default:var(--co-color-gray-300, #d4d4d4);background:#ffffff;color:var(--co-color-gray-700, #1F1C1B)}.co-ref-field__footer{display:flex;gap:var(--co-spacing-sm2);border-top:1px solid var(--co-semantic-border-subtle);padding:var(--co-spacing-sm2)}.co-ref-field__footer-btn{flex:1;display:flex;align-items:center;justify-content:center;gap:var(--co-spacing-sm);padding:var(--co-spacing-sm2) var(--co-spacing-md);border-radius:var(--co-border-radius-xs);font-family:var(--co-font-family-primary);font-size:var(--co-font-size-12, 12px);font-weight:500;line-height:1;letter-spacing:var(--co-font-letter-spacing-body);white-space:nowrap;cursor:pointer;transition:opacity 0.15s ease;box-sizing:border-box;min-height:32px}.co-ref-field__footer-btn:hover{opacity:0.85}.co-ref-field__footer-btn--secondary{background:transparent;color:var(--co-semantic-text-default);border:1px solid var(--co-semantic-border-default)}.co-ref-field__footer-btn--primary{background:var(--co-semantic-surface-primary);color:var(--co-semantic-on-primary);border:none}.co-ref-field__helper{display:flex;align-items:center;gap:var(--co-spacing-xs);padding:0 var(--co-spacing-xs);font-size:var(--co-font-size-14);font-weight:400;color:var(--co-semantic-text-muted)}.co-ref-field__helper--error{color:var(--co-semantic-status-error)}.co-ref-field__helper--success{color:var(--co-semantic-status-success)}.co-ref-field__helper--warning{color:var(--co-color-status-review)}:host([layout='horizontal']) .co-ref-field{display:grid;grid-template-columns:var(--co-field-label-width, max-content) 1fr;align-items:start;column-gap:var(--co-spacing-md);row-gap:var(--co-spacing-sm2)}:host([layout='horizontal']) .co-ref-field__labels{grid-column:1;grid-row:1;padding-top:var(--co-spacing-sm2);min-width:0}:host([layout='horizontal']) .co-ref-field__label{white-space:normal}:host([layout='horizontal']) .co-ref-field>:not(.co-ref-field__labels){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,"co-ref-field",{label:[1],required:[4],secondaryLabel:[1,"secondary-label"],labelIcon:[513,"label-icon"],placeholder:[1],disabled:[4],clearable:[4],multiple:[4],status:[1],helperText:[1,"helper-text"],iconLeft:[1,"icon-left"],layout:[513],size:[513],value:[1025],options:[1],selectedDisplay:[1,"selected-display"],loading:[4],total:[2],searchable:[4],searchPlaceholder:[1,"search-placeholder"],searchDebounce:[2,"search-debounce"],emptyMessage:[1,"empty-message"],showFooter:[4,"show-footer"],footerPrimaryLabel:[1,"footer-primary-label"],footerSecondaryLabel:[1,"footer-secondary-label"],maxChips:[2,"max-chips"],panelTheme:[1,"panel-theme"],avatarShape:[1,"avatar-shape"],isOpen:[32],overflowCount:[32]},void 0,{isOpen:[{onOpenChange:0}]}]);function p(){"undefined"!=typeof customElements&&["co-ref-field","co-avatar","co-icon","co-loader","co-option-list","co-popover"].forEach((i=>{switch(i){case"co-ref-field":customElements.get(e(i))||customElements.define(e(i),h);break;case"co-avatar":customElements.get(e(i))||c();break;case"co-icon":customElements.get(e(i))||l();break;case"co-loader":customElements.get(e(i))||n();break;case"co-option-list":customElements.get(e(i))||f();break;case"co-popover":customElements.get(e(i))||d()}}))}p();const m=h,g=p;export{m as CoRefField,g as defineCustomElement}
|
|
1
|
+
import{t as e,p as i,H as o,c as t,h as r}from"./index.js";import{R as s}from"./p-CWneqh4n.js";import{F as a}from"./p-DvhR3H61.js";import{d as c}from"./p-T0UfY6rA.js";import{d as l}from"./p-B3U63yZw.js";import{d as n}from"./p-DzoNGEDU.js";import{d as f}from"./p-CYi6V_Ss.js";import{d}from"./p-CmCsm4L-.js";import{d as h}from"./p-9aNhJfTT.js";const p=i(class extends o{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.coChange=t(this,"coChange",7),this.coClear=t(this,"coClear",7),this.coSearch=t(this,"coSearch",7),this.coLoadMore=t(this,"coLoadMore",7),this.coOpen=t(this,"coOpen",3),this.coClose=t(this,"coClose",3),this.coRemove=t(this,"coRemove",7),this.coFooterPrimary=t(this,"coFooterPrimary",7),this.coFooterSecondary=t(this,"coFooterSecondary",7),this.required=!1,this.placeholder="Select…",this.disabled=!1,this.clearable=!0,this.multiple=!1,this.status="default",this.layout="vertical",this.size="md",this.variant="default",this.value="",this.options="[]",this.selectedDisplay="[]",this.loading=!1,this.total=0,this.searchable=!0,this.searchPlaceholder="Search…",this.searchDebounce=350,this.emptyMessage="No results found",this.showFooter=!1,this.footerPrimaryLabel="Ok",this.footerSecondaryLabel="New",this.maxChips=0,this.panelTheme="auto",this.avatarShape="circle",this.isOpen=!1,this.overflowCount=0,this.lastChipsKey="\0",this.pendingFocus=!1,this.handlePopoverOpen=()=>{this.isOpen=!0},this.handlePopoverClose=()=>{this.isOpen=!1},this.handleTriggerClick=e=>{this.disabled&&e.stopPropagation()},this.handleOptionClick=e=>{if(this.multiple){const i=this.parsedValue;let o;o=i.indexOf(e._id)>=0?i.filter((i=>i!==e._id)):[...i,e._id],this.value=JSON.stringify(o),this.coChange.emit({value:o,item:e})}else this.value=e._id,this.coChange.emit({value:e._id,item:e}),this.isOpen=!1},this.handleClear=e=>{e.stopPropagation(),this.value=this.multiple?"[]":"",this.coClear.emit()},this.handleRemoveChip=(e,i)=>{i.stopPropagation();const o=this.parsedValue.filter((i=>i!==e));this.value=JSON.stringify(o),this.coRemove.emit(e)},this.handleFooterPrimary=()=>{this.coFooterPrimary.emit(),this.isOpen=!1},this.handleFooterSecondary=()=>{this.coFooterSecondary.emit()}}get normalizedSize(){return"default"===this.size?"md":this.size}get parsedOptions(){try{const e="string"==typeof this.options?JSON.parse(this.options):this.options;return Array.isArray(e)?e:[]}catch(e){return[]}}get parsedSelectedDisplay(){try{const e="string"==typeof this.selectedDisplay?JSON.parse(this.selectedDisplay):this.selectedDisplay;return Array.isArray(e)?e:[]}catch(e){return[]}}get effectiveDisplayItems(){const e=this.parsedValue;if(0===e.length)return[];const i=new Map;for(const e of this.parsedSelectedDisplay)i.set(e._id,e);for(const e of this.parsedOptions)i.has(e._id)||i.set(e._id,{_id:e._id,label:e.label,description:e.description,color:e.color,avatar:e.avatar,image:e.image});return e.map((e=>i.get(e))).filter(Boolean)}get parsedValue(){if(!this.value)return[];try{const e=JSON.parse(this.value);return Array.isArray(e)?e:[this.value]}catch(e){return this.value?[this.value]:[]}}connectedCallback(){this.resizeObserver=new ResizeObserver((()=>this.calcOverflow()))}componentDidRender(){var e,i,o,t;this.chipsEl!==this.observedChipsEl&&(null===(e=this.resizeObserver)||void 0===e||e.disconnect(),this.chipsEl&&(null===(i=this.resizeObserver)||void 0===i||i.observe(this.chipsEl)),this.observedChipsEl=this.chipsEl);const r=null===(o=this.chipsEl)||void 0===o?void 0:o.querySelectorAll(".co-ref-field__chip"),s=r?Array.from(r,(e=>e.textContent)).join(""):"";s!==this.lastChipsKey&&(this.lastChipsKey=s,this.calcOverflow()),this.pendingFocus&&(null===(t=this.optionListEl)||void 0===t?void 0:t.isConnected)&&(this.pendingFocus=!1,this.optionListEl.focusSearch())}disconnectedCallback(){var e;null===(e=this.resizeObserver)||void 0===e||e.disconnect()}calcOverflow(){if(!this.multiple||this.maxChips>0||!this.chipsEl)return void(0!==this.overflowCount&&(this.overflowCount=0));const e=Array.from(this.chipsEl.querySelectorAll(".co-ref-field__chip"));if(0===e.length)return void(0!==this.overflowCount&&(this.overflowCount=0));const i=this.chipsEl.getBoundingClientRect().right;let o=0;for(let t=e.length-1;t>=0&&e[t].getBoundingClientRect().right>i+1;t--)o++;o!==this.overflowCount&&(this.overflowCount=o)}onOpenChange(e){e?(this.coOpen.emit(),this.pendingFocus=!0):this.coClose.emit()}renderTrigger(){const e=this.effectiveDisplayItems,i=e.length>0;return r("div",{class:{"co-ref-field__trigger":!0,"co-ref-field--open":this.isOpen,"co-ref-field--disabled":this.disabled,["co-ref-field--"+this.normalizedSize]:!0,["co-ref-field--"+this.status]:"default"!==this.status,"co-ref-field--flat":"flat"===this.variant},onClick:this.handleTriggerClick},this.iconLeft&&r("span",{class:"co-ref-field__icon"},r("co-icon",{name:this.iconLeft,size:16})),r("div",{class:"co-ref-field__value"},!i&&r("span",{class:"co-ref-field__placeholder",part:"trigger-placeholder"},this.placeholder),i&&!this.multiple&&this.renderSingleValue(e[0]),i&&this.multiple&&this.renderMultipleValue(e)),i&&this.clearable&&!this.disabled&&r("button",{class:"co-ref-field__clear",part:"trigger-clear",onClick:this.handleClear,type:"button"},r("co-icon",{name:"x",size:14})),r("span",{class:"co-ref-field__caret",part:"trigger-chevron"},r("co-icon",{name:"caret-up-down",size:16})))}renderItemAvatar(e){return e.image||e.avatar?r("co-avatar",{class:"co-ref-field__avatar",type:e.image?"image":"text",src:e.image,text:e.avatar,color:e.color,size:"xxs",shape:this.avatarShape}):e.color?r("span",{class:"co-ref-field__color-dot",style:{backgroundColor:e.color}}):null}renderSingleValue(e){return r("div",{class:"co-ref-field__selected"},this.renderItemAvatar(e),r("span",{class:"co-ref-field__selected-label",part:"trigger-text"},e.label))}renderMultipleValue(e){const i=this.maxChips>0,o=Math.min(this.overflowCount,Math.max(0,e.length-1)),t=i?e.slice(0,this.maxChips):e,s=i?e.length-this.maxChips:o,c=e.length-(i?0:o);return r("div",{class:"co-ref-field__chips-row"},r("div",{class:"co-ref-field__chips",ref:e=>this.chipsEl=e},t.map(((e,o)=>r(a,{key:e._id,baseClass:"co-ref-field__chip",label:e.label,modifiers:{"co-ref-field__chip--avatar":!(!e.image&&!e.avatar),"co-ref-field__chip--clipped":!i&&o>=c,["co-ref-field__chip--"+this.normalizedSize]:!0},onRemove:i=>this.handleRemoveChip(e._id,i)},e.image||e.avatar?this.renderItemAvatar(e):e.color?r("span",{class:"co-ref-field__chip-dot",style:{backgroundColor:e.color}}):null)))),s>0&&r("span",{class:"co-ref-field__chip-overflow"},"+",s))}renderPanel(){return r("div",{class:{"co-ref-field__panel":!0,"co-ref-field__panel--dark":"dark"===this.panelTheme,"co-ref-field__panel--light":"light"===this.panelTheme}},r("co-option-list",{ref:e=>this.optionListEl=e,items:"string"==typeof this.options?this.options:JSON.stringify(this.options),value:this.value,selectedItems:"string"==typeof this.selectedDisplay?this.selectedDisplay:JSON.stringify(this.selectedDisplay),multiple:this.multiple,selectedFirst:this.multiple,selectedAffordance:"deselect",searchable:this.searchable,searchPlaceholder:this.searchPlaceholder,searchDebounce:this.searchDebounce,loading:this.loading,total:this.total,emptyMessage:this.emptyMessage,avatarShape:this.avatarShape,onCoSearch:e=>this.coSearch.emit(e.detail),onCoChange:e=>this.handleOptionClick(e.detail.item),onCoLoadMore:()=>this.coLoadMore.emit()},this.showFooter&&r("div",{class:"co-ref-field__footer",slot:"footer"},r("button",{class:"co-ref-field__footer-btn co-ref-field__footer-btn--secondary",type:"button",onClick:this.handleFooterSecondary},r("co-icon",{name:"plus",size:16}),r("span",null,this.footerSecondaryLabel)),r("button",{class:"co-ref-field__footer-btn co-ref-field__footer-btn--primary",type:"button",onClick:this.handleFooterPrimary},r("co-icon",{name:"check",size:16}),r("span",null,this.footerPrimaryLabel)))))}render(){return r("div",{key:"19b3543f876fa1396cb08ac5d24f0cdfdfff06ad",class:"co-ref-field"},(this.label||this.secondaryLabel)&&r("div",{key:"2ae2a6946b2fecc67551acd7b1e966bb8b4fc392",class:"co-ref-field__labels"},this.label&&r("label",{key:"0552bc35602d1f03ff68bb8cee9ab79a43b39a14",class:"co-ref-field__label"},this.labelIcon&&r("co-icon",{key:"b9731bccb2dcf66749e6240d83c25385c4bc312c",class:"co-ref-field__label-icon",name:this.labelIcon,size:16}),this.label,r(s,{key:"c49c5dd8d0bf8824363a1eba27386a6c87b64688",required:this.required})),this.secondaryLabel&&r("span",{key:"2c23a1ab30fe332e7d80d02f162876f1d56d5817",class:"co-ref-field__secondary-label"},this.secondaryLabel)),r("co-popover",{key:"91ac16f115e0d631a27bf6fae212dffba274cbcb",open:this.isOpen,placement:"bottom-start",matchWidth:!0,offset:4,onCoOpen:this.handlePopoverOpen,onCoClose:this.handlePopoverClose},r("div",{key:"410a56a47f7092904d09d41cb2e269b8627b8151",slot:"trigger"},this.renderTrigger()),this.isOpen&&this.renderPanel()),this.helperText&&r("div",{key:"044055f24a9cf11eacd22383d793c2133b555419",class:"co-ref-field__helper co-ref-field__helper--"+this.status},"default"!==this.status&&r("co-icon",{key:"96dd504f4900f394370ad938b458f044abd2aa9a",name:"error"===this.status?"warning-circle":"success"===this.status?"check-circle":"info",size:14}),r("span",{key:"ac4bc95df2bb54dc7b60fc5fa098f8cf40c81153"},this.helperText)))}get el(){return this}static get watchers(){return{isOpen:[{onOpenChange:0}]}}static get style(){return":host{display:block;font-family:var(--co-font-family-primary);font-size:var(--co-font-size-14);letter-spacing:var(--co-font-letter-spacing-body);line-height:1;position:relative}.co-ref-field{display:flex;flex-direction:column;gap:var(--co-spacing-sm2)}.co-ref-field__labels{display:flex;align-items:center;justify-content:space-between;padding:0 var(--co-spacing-xs);gap:var(--co-spacing-sm2)}.co-ref-field__label{display:inline-flex;align-items:center;color:var(--co-ref-field-label-color, var(--co-semantic-text-secondary));font-family:var(--co-ref-field-label-font-family, var(--co-font-family-primary));font-size:var(--co-ref-field-label-font-size, var(--co-font-size-14));font-weight:var(--co-ref-field-label-font-weight, 400);line-height:1;white-space:nowrap;cursor:default;text-transform:var(--co-ref-field-label-text-transform, none);letter-spacing:var(--co-ref-field-label-letter-spacing, var(--co-font-letter-spacing-body))}.co-ref-field__secondary-label{color:var(--co-semantic-text-muted);font-family:var(--co-font-family-mono);font-size:var(--co-font-size-12);font-weight:400;line-height:1;white-space:nowrap;text-align:right}.co-ref-field__trigger{display:flex;align-items:center;gap:var(--co-spacing-sm2);padding:var(--co-spacing-sm2) var(--co-spacing-md);background:var(--co-ref-field-trigger-bg, var(--co-semantic-surface-page));border:1px solid var(--co-ref-field-trigger-border-color, var(--co-semantic-border-field));border-radius:var(--co-border-radius-xs);min-height:40px;box-sizing:border-box;cursor:pointer;transition:border-color 0.15s ease, box-shadow 0.15s ease}.co-ref-field--flat{background:transparent;border-color:transparent}.co-ref-field--s{min-height:28px;padding:var(--co-spacing-xxs) var(--co-spacing-sm);font-size:var(--co-font-size-12)}.co-ref-field--sm{min-height:32px;padding:var(--co-spacing-xs) var(--co-spacing-sm);font-size:var(--co-font-size-12)}.co-ref-field--lg{min-height:48px;padding:var(--co-spacing-sm) var(--co-spacing-lg);font-size:var(--co-font-size-16)}.co-ref-field--open{border-color:var(--co-semantic-border-focus);box-shadow:0 0 0 2px var(--co-semantic-border-focus-ring)}.co-ref-field--disabled{background:var(--co-semantic-surface-disabled);border-color:transparent;cursor:not-allowed}.co-ref-field--error{border-color:var(--co-semantic-status-error)}.co-ref-field--success{border-color:var(--co-semantic-status-success)}.co-ref-field--warning{border-color:var(--co-color-status-review)}.co-ref-field--s .co-ref-field__selected{--co-avatar-size:20px}.co-ref-field--sm .co-ref-field__selected{--co-avatar-size:22px}.co-ref-field--md .co-ref-field__selected{--co-avatar-size:22px}.co-ref-field--lg .co-ref-field__selected{--co-avatar-size:28px}.co-ref-field__icon{flex-shrink:0;color:var(--co-semantic-text-muted);display:flex;align-items:center}.co-ref-field__label-icon{flex-shrink:0;margin-right:var(--co-spacing-xs);color:var(--co-semantic-text-secondary)}.co-ref-field__value{flex:1;min-width:0;display:flex;align-items:center}.co-ref-field__placeholder{color:var(--co-semantic-text-muted);font-size:inherit;font-weight:400;line-height:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.co-ref-field__caret{flex-shrink:0;color:var(--co-semantic-text-muted);display:flex;align-items:center}.co-ref-field__clear{flex-shrink:0;display:flex;align-items:center;padding:0;margin:0;border:none;background:transparent;cursor:pointer;color:var(--co-semantic-text-muted);transition:color 0.15s ease}.co-ref-field__clear:hover{color:var(--co-semantic-text-default)}.co-ref-field__selected{display:flex;align-items:center;gap:var(--co-spacing-sm);min-width:0}.co-ref-field__color-dot{width:10px;height:10px;min-width:10px;border-radius:var(--co-border-radius-full);flex-shrink:0}.co-ref-field__avatar{flex-shrink:0}.co-ref-field__selected-label{color:var(--co-semantic-text-default);font-size:inherit;font-weight:400;line-height:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.co-ref-field__chips-row{flex:1;min-width:0;display:flex;align-items:center;gap:var(--co-spacing-xs)}.co-ref-field__chips{flex:1;min-width:0;display:flex;flex-wrap:nowrap;overflow:hidden;gap:var(--co-spacing-xs);align-items:center}.co-ref-field__chip{display:inline-flex;align-items:center;gap:var(--co-spacing-sm);padding:0 var(--co-spacing-sm2);background:var(--co-color-gray-100);border-radius:var(--co-border-radius-full);line-height:1;max-width:min(160px, 100%);flex-shrink:0}.co-ref-field__chip--avatar{padding-left:var(--co-spacing-xxs)}.co-ref-field__chip--s{min-height:20px;--co-avatar-size:20px;font-size:var(--co-font-size-12)}.co-ref-field__chip--sm{min-height:22px;--co-avatar-size:22px;font-size:var(--co-font-size-12)}.co-ref-field__chip--md{min-height:22px;--co-avatar-size:22px;font-size:var(--co-font-size-14)}.co-ref-field__chip--lg{min-height:28px;--co-avatar-size:28px;font-size:var(--co-font-size-14)}.co-ref-field__chip--clipped{visibility:hidden}.co-ref-field__chip-dot{width:8px;height:8px;min-width:8px;border-radius:var(--co-border-radius-full);flex-shrink:0}.co-ref-field__chip-label{color:var(--co-semantic-text-default);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.co-ref-field__chip-remove{display:flex;align-items:center;padding:0;margin:0;border:none;background:transparent;cursor:pointer;color:var(--co-color-gray-500);transition:color 0.1s ease;flex-shrink:0}.co-ref-field__chip-remove:hover{color:var(--co-semantic-text-default)}.co-ref-field__chip-overflow{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;padding:var(--co-spacing-xs) var(--co-spacing-sm);background:var(--co-color-opacity-negro-8);border-radius:var(--co-border-radius-full);font-size:var(--co-font-size-12);font-weight:600;color:var(--co-semantic-text-secondary);line-height:1}.co-ref-field__panel{display:flex;flex-direction:column;border-radius:var(--co-border-radius-sm, 12px);overflow:hidden}.co-ref-field__panel--dark{--co-semantic-surface-page:#0A0A0A;--co-semantic-surface-primary:#0A0A0A;--co-semantic-surface-hover:rgba(255, 255, 255, 0.08);--co-semantic-surface-muted:rgba(255, 255, 255, 0.12);--co-semantic-text-default:#ffffff;--co-semantic-text-secondary:rgba(255, 255, 255, 0.8);--co-semantic-text-muted:rgba(255, 255, 255, 0.5);--co-semantic-border-subtle:rgba(255, 255, 255, 0.12);--co-semantic-border-default:rgba(255, 255, 255, 0.16);background:#0A0A0A;color:#ffffff}.co-ref-field__panel--light{--co-semantic-surface-page:#ffffff;--co-semantic-surface-primary:#ffffff;--co-semantic-surface-hover:var(--co-color-gray-100, #f5f5f5);--co-semantic-surface-muted:var(--co-color-gray-200, #e5e5e5);--co-semantic-text-default:var(--co-color-gray-700, #1F1C1B);--co-semantic-text-secondary:rgba(0, 0, 0, 0.6);--co-semantic-text-muted:rgba(0, 0, 0, 0.45);--co-semantic-border-subtle:var(--co-color-gray-200, #e5e5e5);--co-semantic-border-default:var(--co-color-gray-300, #d4d4d4);background:#ffffff;color:var(--co-color-gray-700, #1F1C1B)}.co-ref-field__footer{display:flex;gap:var(--co-spacing-sm2);border-top:1px solid var(--co-semantic-border-subtle);padding:var(--co-spacing-sm2)}.co-ref-field__footer-btn{flex:1;display:flex;align-items:center;justify-content:center;gap:var(--co-spacing-sm);padding:var(--co-spacing-sm2) var(--co-spacing-md);border-radius:var(--co-border-radius-xs);font-family:var(--co-font-family-primary);font-size:var(--co-font-size-12, 12px);font-weight:500;line-height:1;letter-spacing:var(--co-font-letter-spacing-body);white-space:nowrap;cursor:pointer;transition:opacity 0.15s ease;box-sizing:border-box;min-height:32px}.co-ref-field__footer-btn:hover{opacity:0.85}.co-ref-field__footer-btn--secondary{background:transparent;color:var(--co-semantic-text-default);border:1px solid var(--co-semantic-border-default)}.co-ref-field__footer-btn--primary{background:var(--co-semantic-surface-primary);color:var(--co-semantic-on-primary);border:none}.co-ref-field__helper{display:flex;align-items:center;gap:var(--co-spacing-xs);padding:0 var(--co-spacing-xs);font-size:var(--co-font-size-14);font-weight:400;color:var(--co-semantic-text-muted)}.co-ref-field__helper--error{color:var(--co-semantic-status-error)}.co-ref-field__helper--success{color:var(--co-semantic-status-success)}.co-ref-field__helper--warning{color:var(--co-color-status-review)}:host([layout='horizontal']) .co-ref-field{display:grid;grid-template-columns:var(--co-field-label-width, max-content) 1fr;align-items:start;column-gap:var(--co-spacing-md);row-gap:var(--co-spacing-sm2)}:host([layout='horizontal']) .co-ref-field__labels{grid-column:1;grid-row:1;padding-top:var(--co-spacing-sm2);min-width:0}:host([layout='horizontal']) .co-ref-field__label{white-space:normal}:host([layout='horizontal']) .co-ref-field>:not(.co-ref-field__labels){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,"co-ref-field",{label:[1],required:[4],secondaryLabel:[1,"secondary-label"],labelIcon:[513,"label-icon"],placeholder:[1],disabled:[4],clearable:[4],multiple:[4],status:[1],helperText:[1,"helper-text"],iconLeft:[1,"icon-left"],layout:[513],size:[513],variant:[513],value:[1025],options:[1],selectedDisplay:[1,"selected-display"],loading:[4],total:[2],searchable:[4],searchPlaceholder:[1,"search-placeholder"],searchDebounce:[2,"search-debounce"],emptyMessage:[1,"empty-message"],showFooter:[4,"show-footer"],footerPrimaryLabel:[1,"footer-primary-label"],footerSecondaryLabel:[1,"footer-secondary-label"],maxChips:[2,"max-chips"],panelTheme:[1,"panel-theme"],avatarShape:[1,"avatar-shape"],isOpen:[32],overflowCount:[32]},void 0,{isOpen:[{onOpenChange:0}]}]);function m(){"undefined"!=typeof customElements&&["co-ref-field","co-avatar","co-icon","co-loader","co-option-list","co-popover","co-tooltip"].forEach((i=>{switch(i){case"co-ref-field":customElements.get(e(i))||customElements.define(e(i),p);break;case"co-avatar":customElements.get(e(i))||c();break;case"co-icon":customElements.get(e(i))||l();break;case"co-loader":customElements.get(e(i))||n();break;case"co-option-list":customElements.get(e(i))||f();break;case"co-popover":customElements.get(e(i))||d();break;case"co-tooltip":customElements.get(e(i))||h()}}))}m();const g=p,v=m;export{g as CoRefField,v as defineCustomElement}
|