@prolibu-suite/cobalt-core 0.7.0 → 0.8.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 +8266 -5138
- package/dist/cjs/co-action-bar.cjs.entry.js +89 -0
- package/dist/cjs/co-app-shell.cjs.entry.js +2 -2
- package/dist/cjs/co-audio-player.cjs.entry.js +279 -0
- package/dist/cjs/co-avatar_2.cjs.entry.js +3 -3
- package/dist/cjs/co-badge.cjs.entry.js +1 -1
- package/dist/cjs/co-bottom-sheet.cjs.entry.js +3 -3
- package/dist/cjs/co-breadcrumb-item.cjs.entry.js +2 -2
- package/dist/cjs/co-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/co-button-group.cjs.entry.js +2 -2
- package/dist/cjs/co-button.cjs.entry.js +12 -5
- package/dist/cjs/co-calendar-month_2.cjs.entry.js +1601 -0
- package/dist/cjs/co-calendar_3.cjs.entry.js +9 -9
- package/dist/cjs/co-card.cjs.entry.js +2 -2
- package/dist/cjs/co-carousel-item.cjs.entry.js +1 -1
- package/dist/cjs/co-carousel.cjs.entry.js +3 -3
- package/dist/cjs/co-checkbox.cjs.entry.js +4 -4
- package/dist/cjs/co-chip_2.cjs.entry.js +95 -6
- package/dist/cjs/co-color-picker.cjs.entry.js +2 -2
- package/dist/cjs/co-column-picker.cjs.entry.js +2 -2
- package/dist/cjs/co-data-table-pagination.cjs.entry.js +4 -4
- package/dist/cjs/co-data-table.cjs.entry.js +1 -1
- package/dist/cjs/co-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/co-date-range-picker.cjs.entry.js +2 -2
- package/dist/cjs/co-date-range.cjs.entry.js +1 -1
- package/dist/cjs/co-date-time-picker.cjs.entry.js +409 -0
- package/dist/cjs/co-drive-card.cjs.entry.js +1 -1
- package/dist/cjs/co-drop-zone.cjs.entry.js +1 -1
- package/dist/cjs/co-empty-state.cjs.entry.js +2 -2
- package/dist/cjs/co-event-calendar.cjs.entry.js +118 -17
- package/dist/cjs/co-event-popover.cjs.entry.js +132 -0
- package/dist/cjs/co-fab.cjs.entry.js +2 -2
- package/dist/cjs/co-file-field.cjs.entry.js +5 -5
- package/dist/cjs/co-file-type-tile.cjs.entry.js +2 -2
- package/dist/cjs/co-helper-text.cjs.entry.js +2 -2
- package/dist/cjs/co-icon-button.cjs.entry.js +1 -1
- package/dist/cjs/co-icon.cjs.entry.js +2 -2
- package/dist/cjs/co-json-field.cjs.entry.js +3 -3
- package/dist/cjs/co-lightbox.cjs.entry.js +5 -5
- package/dist/cjs/co-list-footer.cjs.entry.js +1 -1
- package/dist/cjs/co-list-item.cjs.entry.js +4 -4
- package/dist/cjs/co-media-thumb.cjs.entry.js +2 -2
- package/dist/cjs/co-menu-divider.cjs.entry.js +1 -1
- package/dist/cjs/co-menu-item.cjs.entry.js +2 -2
- package/dist/cjs/co-menu.cjs.entry.js +1 -1
- package/dist/cjs/co-modal.cjs.entry.js +2 -2
- package/dist/cjs/co-navbar.cjs.entry.js +2 -2
- package/dist/cjs/co-number-field.cjs.entry.js +2 -2
- package/dist/cjs/co-overlay.cjs.entry.js +1 -1
- package/dist/cjs/co-page-header.cjs.entry.js +1 -1
- package/dist/cjs/co-phone-field.cjs.entry.js +1 -1
- package/dist/cjs/co-popover.cjs.entry.js +1 -1
- package/dist/cjs/co-progress-bar.cjs.entry.js +2 -2
- package/dist/cjs/co-progress-circle.cjs.entry.js +2 -2
- package/dist/cjs/co-provider-logo_2.cjs.entry.js +72 -0
- package/dist/cjs/co-radio.cjs.entry.js +3 -3
- package/dist/cjs/co-rating.cjs.entry.js +3 -3
- package/dist/cjs/co-ref-field.cjs.entry.js +6 -2
- package/dist/cjs/co-rich-text-editor.cjs.entry.js +4 -4
- package/dist/cjs/co-rich-text-toolbar.cjs.entry.js +1 -1
- package/dist/cjs/co-row.cjs.entry.js +2 -2
- package/dist/cjs/co-select.cjs.entry.js +1 -1
- package/dist/cjs/co-separator.cjs.entry.js +1 -1
- package/dist/cjs/co-sidebar-nav.cjs.entry.js +12 -2
- package/dist/cjs/co-sidebar.cjs.entry.js +2 -2
- package/dist/cjs/co-slider.cjs.entry.js +2 -2
- package/dist/cjs/co-switch.cjs.entry.js +3 -3
- package/dist/cjs/co-tab-group.cjs.entry.js +19 -3
- package/dist/cjs/co-tab.cjs.entry.js +2 -2
- package/dist/cjs/co-tags-field.cjs.entry.js +5 -5
- package/dist/cjs/co-textarea.cjs.entry.js +4 -4
- package/dist/cjs/co-toggle-button-group.cjs.entry.js +2 -2
- package/dist/cjs/co-toggle-button.cjs.entry.js +2 -2
- package/dist/cjs/co-video.cjs.entry.js +2 -2
- package/dist/cjs/cobalt.cjs.js +1 -1
- package/dist/cjs/{dateI18n-BdiNAl0_.js → dateI18n-wblvKRq_.js} +21 -0
- package/dist/cjs/{dates-D8D-aS5d.js → dates-TQLHlFd2.js} +64 -13
- package/dist/cjs/index-kBiXCEE7.js +28 -12
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{positioning-DwHW399W.js → positioning-DCj_AJ2T.js} +10 -0
- package/dist/cjs/time-LBHtzLHe.js +42 -0
- package/dist/cobalt/cobalt.esm.js +1 -1
- package/dist/cobalt/{p-616e4286.entry.js → p-00830b8c.entry.js} +1 -1
- package/dist/cobalt/{p-9994fcd8.entry.js → p-0769eee9.entry.js} +1 -1
- package/dist/cobalt/{p-9bf42bf4.entry.js → p-0f18c4d2.entry.js} +1 -1
- package/dist/cobalt/{p-cdedaa82.entry.js → p-0fc1edca.entry.js} +1 -1
- package/dist/cobalt/p-15852fec.entry.js +1 -0
- package/dist/cobalt/{p-eec1c44c.entry.js → p-195c67ee.entry.js} +1 -1
- package/dist/cobalt/{p-B6JZk8fL.js → p-1EK-COrb.js} +1 -1
- package/dist/cobalt/{p-2da09948.entry.js → p-1e9c9d46.entry.js} +1 -1
- package/dist/cobalt/{p-e1b468c1.entry.js → p-20bd3702.entry.js} +1 -1
- package/dist/cobalt/p-25f59046.entry.js +1 -0
- package/dist/cobalt/{p-b06af5c6.entry.js → p-260196cb.entry.js} +1 -1
- package/dist/cobalt/p-2bf44b2b.entry.js +1 -0
- package/dist/cobalt/{p-8155d781.entry.js → p-2c100914.entry.js} +1 -1
- package/dist/cobalt/p-2e1d930f.entry.js +1 -0
- package/dist/cobalt/{p-080f62e4.entry.js → p-35518aee.entry.js} +1 -1
- package/dist/cobalt/{p-28ab9cef.entry.js → p-38ae8bff.entry.js} +1 -1
- package/dist/cobalt/{p-f0a98453.entry.js → p-38cf47b6.entry.js} +1 -1
- package/dist/cobalt/p-39dea0c0.entry.js +1 -0
- package/dist/cobalt/{p-3c681e3a.entry.js → p-3a746267.entry.js} +1 -1
- package/dist/cobalt/p-3ae69426.entry.js +1 -0
- package/dist/cobalt/{p-9211e794.entry.js → p-3d4e697e.entry.js} +1 -1
- package/dist/cobalt/{p-264508ae.entry.js → p-445acc4c.entry.js} +1 -1
- package/dist/cobalt/p-4de9232a.entry.js +1 -0
- package/dist/cobalt/{p-7f78e45c.entry.js → p-50bbfad8.entry.js} +1 -1
- package/dist/cobalt/{p-54f8c68c.entry.js → p-51a1ad38.entry.js} +1 -1
- package/dist/cobalt/{p-75515a8e.entry.js → p-523aca9f.entry.js} +1 -1
- package/dist/cobalt/{p-2f6c7eb5.entry.js → p-52af222b.entry.js} +1 -1
- package/dist/cobalt/{p-0b7359bb.entry.js → p-59f7d44b.entry.js} +1 -1
- package/dist/cobalt/{p-4f615cbd.entry.js → p-5b984323.entry.js} +1 -1
- package/dist/cobalt/{p-8fe5b07e.entry.js → p-5bfaca70.entry.js} +1 -1
- package/dist/cobalt/p-5c1328ff.entry.js +1 -0
- package/dist/cobalt/p-5e21ca17.entry.js +1 -0
- package/dist/cobalt/p-61d5ca3c.entry.js +1 -0
- package/dist/cobalt/{p-64115d66.entry.js → p-6357d9dd.entry.js} +1 -1
- package/dist/cobalt/{p-0a294205.entry.js → p-6985a964.entry.js} +1 -1
- package/dist/cobalt/p-69b8d98e.entry.js +1 -0
- package/dist/cobalt/{p-532baca4.entry.js → p-6b089060.entry.js} +1 -1
- package/dist/cobalt/{p-ceb85838.entry.js → p-6b256d01.entry.js} +1 -1
- package/dist/cobalt/{p-c9528a5f.entry.js → p-7c6b3175.entry.js} +1 -1
- package/dist/cobalt/{p-431cec34.entry.js → p-7d077a7c.entry.js} +1 -1
- package/dist/cobalt/{p-cbac0a11.entry.js → p-7f4bf341.entry.js} +1 -1
- package/dist/cobalt/p-869c338a.entry.js +1 -0
- package/dist/cobalt/p-890296f9.entry.js +1 -0
- package/dist/cobalt/{p-7178113f.entry.js → p-8fe08257.entry.js} +1 -1
- package/dist/cobalt/p-913b2a14.entry.js +1 -0
- package/dist/cobalt/{p-5b84cf37.entry.js → p-959556f4.entry.js} +1 -1
- package/dist/cobalt/{p-331a0108.entry.js → p-99c1ff0f.entry.js} +1 -1
- package/dist/cobalt/p-BMdapAL8.js +1 -0
- package/dist/cobalt/p-BU7SQCje.js +1 -0
- package/dist/cobalt/p-CF8OB_TM.js +1 -0
- package/dist/cobalt/p-CnNpoKwg.js +1 -0
- package/dist/cobalt/{p-ba5c6aa7.entry.js → p-a04feb70.entry.js} +1 -1
- package/dist/cobalt/p-a4f39ba2.entry.js +1 -0
- package/dist/cobalt/{p-d3a1a604.entry.js → p-a7c23027.entry.js} +1 -1
- package/dist/cobalt/p-ab8e150e.entry.js +1 -0
- package/dist/cobalt/{p-69ce2269.entry.js → p-acdb68a7.entry.js} +1 -1
- package/dist/cobalt/{p-3b9be8a8.entry.js → p-afd957c0.entry.js} +1 -1
- package/dist/cobalt/{p-c3004e1c.entry.js → p-b45ea918.entry.js} +1 -1
- package/dist/cobalt/{p-eeed80ac.entry.js → p-bad7ce84.entry.js} +1 -1
- package/dist/cobalt/{p-bcd38114.entry.js → p-bebacee2.entry.js} +1 -1
- package/dist/cobalt/{p-ec9dd3a3.entry.js → p-c32949a5.entry.js} +1 -1
- package/dist/cobalt/p-cd5555d2.entry.js +1 -0
- package/dist/cobalt/p-cd96aabf.entry.js +1 -0
- package/dist/cobalt/{p-2661557c.entry.js → p-ce961fba.entry.js} +1 -1
- package/dist/cobalt/p-d56b8a1f.entry.js +1 -0
- package/dist/cobalt/{p-c7d9ff39.entry.js → p-d6fff135.entry.js} +1 -1
- package/dist/cobalt/{p-6b38e8fb.entry.js → p-d71b87d3.entry.js} +1 -1
- package/dist/cobalt/{p-ff581807.entry.js → p-d83e5189.entry.js} +1 -1
- package/dist/cobalt/{p-741cf623.entry.js → p-dc269096.entry.js} +1 -1
- package/dist/cobalt/{p-e4555fda.entry.js → p-dc8e88f4.entry.js} +1 -1
- package/dist/cobalt/p-de5a05fc.entry.js +1 -0
- package/dist/cobalt/{p-0110108f.entry.js → p-df63f23c.entry.js} +1 -1
- package/dist/cobalt/{p-9fab9c1f.entry.js → p-e2188319.entry.js} +1 -1
- package/dist/cobalt/p-f0c589ad.entry.js +1 -0
- package/dist/cobalt/p-f4370423.entry.js +1 -0
- package/dist/cobalt/{p-b87a2e7a.entry.js → p-f4e4bebf.entry.js} +1 -1
- package/dist/cobalt/p-f53b9536.entry.js +1 -0
- package/dist/cobalt/{p-bb00ae4a.entry.js → p-f7ae0228.entry.js} +1 -1
- package/dist/collection/collection-manifest.json +6 -0
- package/dist/collection/components/co-action-bar/co-action-bar.css +148 -0
- package/dist/collection/components/co-action-bar/co-action-bar.js +247 -0
- package/dist/collection/components/co-app-shell/co-app-shell.js +2 -2
- package/dist/collection/components/co-audio-player/co-audio-player.css +58 -0
- package/dist/collection/components/co-audio-player/co-audio-player.js +453 -0
- package/dist/collection/components/co-audio-player/co-audio-player.utils.js +44 -0
- 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.css +19 -0
- package/dist/collection/components/co-button/co-button.js +31 -5
- package/dist/collection/components/co-button-group/co-button-group.js +2 -2
- package/dist/collection/components/co-calendar/co-calendar.js +1 -1
- package/dist/collection/components/co-calendar-month/co-calendar-month.css +52 -3
- package/dist/collection/components/co-calendar-month/co-calendar-month.js +238 -55
- package/dist/collection/components/co-calendar-timegrid/co-calendar-timegrid.css +265 -0
- package/dist/collection/components/co-calendar-timegrid/co-calendar-timegrid.js +1305 -0
- package/dist/collection/components/co-card/co-card.js +2 -2
- package/dist/collection/components/co-carousel/co-carousel.js +2 -2
- package/dist/collection/components/co-carousel-item/co-carousel-item.js +1 -1
- package/dist/collection/components/co-checkbox/co-checkbox.css +1 -1
- 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.js +2 -2
- package/dist/collection/components/co-column-picker/co-column-picker.js +2 -2
- package/dist/collection/components/co-data-table/co-data-table.css +4 -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.js +4 -4
- package/dist/collection/components/co-date-range/co-date-range.js +1 -1
- package/dist/collection/components/co-date-time-picker/co-date-time-picker.css +325 -0
- package/dist/collection/components/co-date-time-picker/co-date-time-picker.js +1079 -0
- package/dist/collection/components/co-drawer/co-drawer.css +46 -0
- package/dist/collection/components/co-drawer/co-drawer.js +1 -1
- 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.css +19 -7
- package/dist/collection/components/co-event-calendar/co-event-calendar.js +342 -39
- package/dist/collection/components/co-event-popover/co-event-popover.css +26 -0
- package/dist/collection/components/co-event-popover/co-event-popover.js +326 -0
- package/dist/collection/components/co-fab/co-fab.js +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-json-field/co-json-field.js +3 -3
- 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.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-menu-item/co-menu-item.css +21 -0
- package/dist/collection/components/co-menu-item/co-menu-item.js +20 -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.js +2 -2
- package/dist/collection/components/co-option-list/co-option-list.css +18 -0
- package/dist/collection/components/co-option-list/co-option-list.js +127 -5
- package/dist/collection/components/co-option-list/optionListLogic.js +13 -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.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-provider-logo/co-provider-logo.css +23 -0
- package/dist/collection/components/co-provider-logo/co-provider-logo.js +124 -0
- 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.js +6 -2
- package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.css +11 -0
- package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.js +3 -3
- package/dist/collection/components/co-rich-text-toolbar/co-rich-text-toolbar.css +8 -0
- package/dist/collection/components/co-row/co-row.js +2 -2
- package/dist/collection/components/co-select/co-select.js +1 -1
- 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.js +12 -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 +25 -0
- package/dist/collection/components/co-tab-group/co-tab-group.js +18 -2
- 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-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/dateI18n.js +21 -0
- package/dist/collection/utils/eventColor.js +52 -0
- package/dist/collection/utils/positioning.js +10 -0
- package/dist/components/co-accordion.js +1 -1
- package/dist/components/co-action-bar.d.ts +11 -0
- package/dist/components/co-action-bar.js +1 -0
- package/dist/components/co-app-shell.js +1 -1
- package/dist/components/co-audio-player.d.ts +11 -0
- package/dist/components/co-audio-player.js +1 -0
- package/dist/components/co-autocomplete.js +1 -1
- package/dist/components/co-avatar-group.js +1 -1
- package/dist/components/co-avatar.js +1 -1
- package/dist/components/co-badge.js +1 -1
- package/dist/components/co-bottom-sheet.js +1 -1
- package/dist/components/co-breadcrumb-item.js +1 -1
- package/dist/components/co-breadcrumb.js +1 -1
- package/dist/components/co-button-group.js +1 -1
- package/dist/components/co-button.js +1 -1
- package/dist/components/co-calendar-month.js +1 -1
- package/dist/components/co-calendar-timegrid.d.ts +11 -0
- package/dist/components/co-calendar-timegrid.js +1 -0
- package/dist/components/co-calendar.js +1 -1
- package/dist/components/co-card.js +1 -1
- package/dist/components/co-carousel-item.js +1 -1
- package/dist/components/co-carousel.js +1 -1
- package/dist/components/co-checkbox-group.js +1 -1
- package/dist/components/co-checkbox.js +1 -1
- package/dist/components/co-chip.js +1 -1
- package/dist/components/co-color-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-date-time-picker.d.ts +11 -0
- package/dist/components/co-date-time-picker.js +1 -0
- package/dist/components/co-drawer.js +1 -1
- package/dist/components/co-drive-card.js +1 -1
- package/dist/components/co-drop-zone.js +1 -1
- package/dist/components/co-empty-state.js +1 -1
- package/dist/components/co-event-calendar.js +1 -1
- package/dist/components/co-event-popover.d.ts +11 -0
- package/dist/components/co-event-popover.js +1 -0
- package/dist/components/co-fab.js +1 -1
- package/dist/components/co-file-field.js +1 -1
- package/dist/components/co-file-type-tile.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-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-provider-logo.d.ts +11 -0
- package/dist/components/co-provider-logo.js +1 -0
- 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-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/p-B21rOC2Y.js +1 -0
- package/dist/components/{p-Cd3inFSL.js → p-BC6sxVVr.js} +1 -1
- package/dist/components/p-BMdapAL8.js +1 -0
- package/dist/components/p-BQFperIX.js +1 -0
- package/dist/components/{p-CQ-8domm.js → p-BXtiFFM2.js} +1 -1
- package/dist/components/{p-CmCsm4L-.js → p-BdArvV6T.js} +1 -1
- package/dist/components/p-BnkGlFYy.js +1 -0
- package/dist/components/p-C-5cLeKr.js +1 -0
- package/dist/components/p-CDWXNRpo.js +1 -0
- package/dist/components/p-CF8OB_TM.js +1 -0
- package/dist/components/{p-oV_1MoAN.js → p-CIWoKlGj.js} +1 -1
- package/dist/components/{p-Bul6EdDX.js → p-CVCEiwOS.js} +1 -1
- package/dist/components/{p-B0b9Etx4.js → p-CfeNhAHW.js} +1 -1
- package/dist/components/p-Ch837Ggl.js +1 -0
- package/dist/components/p-ChLib-si.js +1 -0
- package/dist/components/{p-DfpOEXHC.js → p-ChPooamL.js} +1 -1
- package/dist/components/p-CnNpoKwg.js +1 -0
- package/dist/components/{p-B7Yv00g9.js → p-D-3BTFRs.js} +1 -1
- package/dist/components/p-D0wrmRH8.js +1 -0
- package/dist/components/p-DZX7cEqP.js +1 -0
- package/dist/components/{p-B3U63yZw.js → p-DbISGXT_.js} +1 -1
- package/dist/components/p-Dxa7c4Ap.js +1 -0
- package/dist/components/p-T0MdU7sb.js +1 -0
- package/dist/components/{p-DwwxS5bY.js → p-W8Y8ZuPs.js} +1 -1
- package/dist/components/{p-9aNhJfTT.js → p-cteJszd-.js} +1 -1
- package/dist/components/p-e5KibEs8.js +1 -0
- package/dist/components/{p-Bzg5FPSA.js → p-mUoTCiYa.js} +1 -1
- package/dist/components/p-uZ2D6ESV.js +1 -0
- package/dist/components/{p-BtpRnpaF.js → p-ySi6UG0O.js} +1 -1
- package/dist/esm/co-action-bar.entry.js +87 -0
- package/dist/esm/co-app-shell.entry.js +2 -2
- package/dist/esm/co-audio-player.entry.js +277 -0
- package/dist/esm/co-avatar_2.entry.js +3 -3
- package/dist/esm/co-badge.entry.js +1 -1
- package/dist/esm/co-bottom-sheet.entry.js +3 -3
- package/dist/esm/co-breadcrumb-item.entry.js +2 -2
- package/dist/esm/co-breadcrumb.entry.js +1 -1
- package/dist/esm/co-button-group.entry.js +2 -2
- package/dist/esm/co-button.entry.js +12 -5
- package/dist/esm/co-calendar-month_2.entry.js +1598 -0
- package/dist/esm/co-calendar_3.entry.js +9 -9
- package/dist/esm/co-card.entry.js +2 -2
- package/dist/esm/co-carousel-item.entry.js +1 -1
- package/dist/esm/co-carousel.entry.js +3 -3
- package/dist/esm/co-checkbox.entry.js +4 -4
- package/dist/esm/co-chip_2.entry.js +95 -6
- package/dist/esm/co-color-picker.entry.js +2 -2
- package/dist/esm/co-column-picker.entry.js +2 -2
- package/dist/esm/co-data-table-pagination.entry.js +4 -4
- package/dist/esm/co-data-table.entry.js +1 -1
- package/dist/esm/co-date-picker.entry.js +1 -1
- package/dist/esm/co-date-range-picker.entry.js +2 -2
- package/dist/esm/co-date-range.entry.js +1 -1
- package/dist/esm/co-date-time-picker.entry.js +407 -0
- package/dist/esm/co-drive-card.entry.js +1 -1
- package/dist/esm/co-drop-zone.entry.js +1 -1
- package/dist/esm/co-empty-state.entry.js +2 -2
- package/dist/esm/co-event-calendar.entry.js +120 -19
- package/dist/esm/co-event-popover.entry.js +130 -0
- package/dist/esm/co-fab.entry.js +2 -2
- package/dist/esm/co-file-field.entry.js +5 -5
- package/dist/esm/co-file-type-tile.entry.js +2 -2
- package/dist/esm/co-helper-text.entry.js +2 -2
- package/dist/esm/co-icon-button.entry.js +1 -1
- package/dist/esm/co-icon.entry.js +2 -2
- package/dist/esm/co-json-field.entry.js +3 -3
- package/dist/esm/co-lightbox.entry.js +5 -5
- package/dist/esm/co-list-footer.entry.js +1 -1
- package/dist/esm/co-list-item.entry.js +4 -4
- package/dist/esm/co-media-thumb.entry.js +2 -2
- package/dist/esm/co-menu-divider.entry.js +1 -1
- package/dist/esm/co-menu-item.entry.js +2 -2
- package/dist/esm/co-menu.entry.js +1 -1
- package/dist/esm/co-modal.entry.js +2 -2
- package/dist/esm/co-navbar.entry.js +2 -2
- package/dist/esm/co-number-field.entry.js +2 -2
- package/dist/esm/co-overlay.entry.js +1 -1
- package/dist/esm/co-page-header.entry.js +1 -1
- package/dist/esm/co-phone-field.entry.js +1 -1
- package/dist/esm/co-popover.entry.js +1 -1
- package/dist/esm/co-progress-bar.entry.js +2 -2
- package/dist/esm/co-progress-circle.entry.js +2 -2
- package/dist/esm/co-provider-logo_2.entry.js +69 -0
- package/dist/esm/co-radio.entry.js +3 -3
- package/dist/esm/co-rating.entry.js +3 -3
- package/dist/esm/co-ref-field.entry.js +6 -2
- package/dist/esm/co-rich-text-editor.entry.js +4 -4
- package/dist/esm/co-rich-text-toolbar.entry.js +1 -1
- package/dist/esm/co-row.entry.js +2 -2
- package/dist/esm/co-select.entry.js +1 -1
- package/dist/esm/co-separator.entry.js +1 -1
- package/dist/esm/co-sidebar-nav.entry.js +12 -2
- package/dist/esm/co-sidebar.entry.js +2 -2
- package/dist/esm/co-slider.entry.js +2 -2
- package/dist/esm/co-switch.entry.js +3 -3
- package/dist/esm/co-tab-group.entry.js +19 -3
- package/dist/esm/co-tab.entry.js +2 -2
- package/dist/esm/co-tags-field.entry.js +5 -5
- package/dist/esm/co-textarea.entry.js +4 -4
- package/dist/esm/co-toggle-button-group.entry.js +2 -2
- package/dist/esm/co-toggle-button.entry.js +2 -2
- package/dist/esm/co-video.entry.js +2 -2
- package/dist/esm/cobalt.js +1 -1
- package/dist/esm/{dateI18n-C1DCLOEl.js → dateI18n-CnNpoKwg.js} +21 -0
- package/dist/esm/{dates-tPYikBRJ.js → dates-BU7SQCje.js} +64 -13
- package/dist/esm/index-BCEz3S-z.js +28 -12
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{positioning-C2mZ7x_Y.js → positioning-BMdapAL8.js} +10 -0
- package/dist/esm/time-CF8OB_TM.js +37 -0
- package/dist/esm/{tz-B6JZk8fL.js → tz-1EK-COrb.js} +1 -1
- package/dist/types/components/co-action-bar/co-action-bar.d.ts +66 -0
- package/dist/types/components/co-audio-player/co-audio-player.d.ts +62 -0
- package/dist/types/components/co-audio-player/co-audio-player.utils.d.ts +11 -0
- package/dist/types/components/co-button/co-button.d.ts +18 -1
- package/dist/types/components/co-calendar-month/co-calendar-month.d.ts +33 -1
- package/dist/types/components/co-calendar-timegrid/co-calendar-timegrid.d.ts +178 -0
- package/dist/types/components/co-date-time-picker/co-date-time-picker.d.ts +131 -0
- package/dist/types/components/co-event-calendar/co-event-calendar.d.ts +61 -8
- package/dist/types/components/co-event-popover/co-event-popover.d.ts +45 -0
- package/dist/types/components/co-menu-item/co-menu-item.d.ts +3 -0
- package/dist/types/components/co-option-list/co-option-list.d.ts +23 -0
- package/dist/types/components/co-option-list/optionListLogic.d.ts +3 -0
- package/dist/types/components/co-provider-logo/co-provider-logo.d.ts +17 -0
- package/dist/types/components/co-ref-field/co-ref-field.d.ts +1 -0
- package/dist/types/components/co-tab-group/co-tab-group.d.ts +5 -0
- package/dist/types/components.d.ts +1245 -76
- package/dist/types/utils/dateI18n.d.ts +7 -0
- package/dist/types/utils/eventColor.d.ts +20 -0
- package/package.json +2 -2
- package/dist/cjs/co-calendar-month.cjs.entry.js +0 -381
- package/dist/cjs/co-skeleton.cjs.entry.js +0 -26
- package/dist/cobalt/p-037cc571.entry.js +0 -1
- package/dist/cobalt/p-0b92167a.entry.js +0 -1
- package/dist/cobalt/p-0bc5a962.entry.js +0 -1
- package/dist/cobalt/p-30c80e3a.entry.js +0 -1
- package/dist/cobalt/p-36ad3a96.entry.js +0 -1
- package/dist/cobalt/p-3ecbbe93.entry.js +0 -1
- package/dist/cobalt/p-3f1030fb.entry.js +0 -1
- package/dist/cobalt/p-3f7215e7.entry.js +0 -1
- package/dist/cobalt/p-54857f78.entry.js +0 -1
- package/dist/cobalt/p-585c132d.entry.js +0 -1
- package/dist/cobalt/p-59b114ab.entry.js +0 -1
- package/dist/cobalt/p-5d0510a5.entry.js +0 -1
- package/dist/cobalt/p-5e246304.entry.js +0 -1
- package/dist/cobalt/p-C1DCLOEl.js +0 -1
- package/dist/cobalt/p-C2mZ7x_Y.js +0 -1
- package/dist/cobalt/p-c589ae25.entry.js +0 -1
- package/dist/cobalt/p-c635417b.entry.js +0 -1
- package/dist/cobalt/p-cd28aa6d.entry.js +0 -1
- package/dist/cobalt/p-d71b800a.entry.js +0 -1
- package/dist/cobalt/p-df752f6e.entry.js +0 -1
- package/dist/cobalt/p-fffeb610.entry.js +0 -1
- package/dist/cobalt/p-tPYikBRJ.js +0 -1
- package/dist/components/p-BTa6ss5i.js +0 -1
- package/dist/components/p-C1DCLOEl.js +0 -1
- package/dist/components/p-C2mZ7x_Y.js +0 -1
- package/dist/components/p-CVeEoHr7.js +0 -1
- package/dist/components/p-CYi6V_Ss.js +0 -1
- package/dist/components/p-CuQjKAf5.js +0 -1
- package/dist/components/p-CyYF8IJE.js +0 -1
- package/dist/components/p-DKvTqEaf.js +0 -1
- package/dist/components/p-T0UfY6rA.js +0 -1
- package/dist/esm/co-calendar-month.entry.js +0 -379
- package/dist/esm/co-skeleton.entry.js +0 -24
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as
|
|
1
|
+
import{t as e,p as c,H as r,h as s}from"./index.js";const o=c(class extends r{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.value=0,this.status="default",this.size=40,this.strokeWidth=2,this.showLabel=!0}render(){const e=Math.max(0,Math.min(100,this.value)),c=e/100*360,r=Math.min(this.strokeWidth,this.size/2);return s("div",{key:"43d2823b3f20fb1c604fc0f9dab2cf15ca52db4e",class:{"co-progress-circle":!0,["co-progress-circle--"+this.status]:!0},role:"progressbar","aria-valuenow":e,"aria-valuemin":0,"aria-valuemax":100,part:"circle",style:{width:this.size+"px",height:this.size+"px","--co-pc-angle":c+"deg","--co-pc-stroke":r+"px"}},s("div",{key:"23165c28690602eeea2f22ecc66982dee7c2dd62",class:"co-progress-circle__track"}),this.showLabel&&s("span",{key:"47b3c3ef7122c94c7ae216b7a3f5cb81cc9a028c",class:"co-progress-circle__label"},e,"%"))}static get style(){return":host{display:inline-flex}.co-progress-circle{--_color:var(--co-semantic-status-info, #2563eb);--_track:var(--co-color-opacity-negro-8, rgba(0, 0, 0, 0.08));position:relative;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;background:conic-gradient( var(--_color) var(--co-pc-angle, 0deg), var(--_track) var(--co-pc-angle, 0deg) );transition:background 0.3s ease}.co-progress-circle__track{position:absolute;inset:var(--co-pc-stroke, 4px);border-radius:50%;background:var(--co-semantic-surface-page, #fff)}.co-progress-circle__label{position:relative;z-index:1;font-family:var(--co-font-family-primary);font-size:var(--co-font-size-11, 11px);font-weight:600;color:var(--_color);line-height:1;pointer-events:none}.co-progress-circle--success{--_color:var(--co-semantic-status-success, #0a7724)}.co-progress-circle--warning{--_color:var(--co-semantic-status-warning, #f59e0b)}.co-progress-circle--error{--_color:var(--co-semantic-status-error, #aa2e1b)}"}},[1,"co-progress-circle",{value:[2],status:[1],size:[2],strokeWidth:[2,"stroke-width"],showLabel:[4,"show-label"]}]);function t(){"undefined"!=typeof customElements&&["co-progress-circle"].forEach((c=>{"co-progress-circle"===c&&(customElements.get(e(c))||customElements.define(e(c),o))}))}t();const a=o,i=t;export{a as CoProgressCircle,i as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface CoProviderLogo extends Components.CoProviderLogo, HTMLElement {}
|
|
4
|
+
export const CoProviderLogo: {
|
|
5
|
+
prototype: CoProviderLogo;
|
|
6
|
+
new (): CoProviderLogo;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as o,d as r}from"./p-C-5cLeKr.js";const s=o,p=r;export{s as CoProviderLogo,p as defineCustomElement}
|
|
@@ -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-DbISGXT_.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:"336f85ea727de12ef444126ba6f428957463663c",class:{"co-radio-row":!0,"co-radio-row--disabled":this.disabled},onClick:this.handleClick},a("button",{key:"9f703411fc244639599918c9673e166ca6b820a6",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:"f7f027f702b41e9b52f281cb80ef05d57f0fae1b",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
|
|
1
|
+
import{t,p as e,H as i,c as r,h as a}from"./index.js";import{d as s}from"./p-DbISGXT_.js";const o=e(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.coChange=r(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 a("div",{key:"1f30917baf6de9922ebf76214c324b2669046f98",class:{"co-rating":!0,"co-rating--disabled":this.disabled,"co-rating--readonly":this.readOnly,["co-rating--"+this.size]:!0}},this.label&&a("label",{key:"f03d4bd39a49f4e16d5724478f4c0f15ac3a8c92",class:"co-rating__label"},this.label),a("div",{key:"96301d47ba510e923f0abd3f5fff63b5f8437099",class:"co-rating__stars",onMouseLeave:this.handleMouseLeave},i.map((i=>a("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}`},a("co-icon",{name:this.icon,size:t,weight:i<=e?"fill":"regular"}))))),this.helperText&&a("div",{key:"4e84ece3536c2e028057be76910eae6fa3ac6228",class:"co-rating__helper co-rating__helper--"+this.status},this.statusIcon&&a("co-icon",{key:"a24e3451108027dc941c96dbf03988e1cab92424",name:this.statusIcon,size:14,weight:"fill",class:"co-rating__helper-icon"}),a("span",{key:"734bc0b5515d95ac1d5545b20842d949e35a0d87",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 c(){"undefined"!=typeof customElements&&["co-rating","co-icon"].forEach((e=>{switch(e){case"co-rating":customElements.get(t(e))||customElements.define(t(e),o);break;case"co-icon":customElements.get(t(e))||s()}}))}c();const n=o,l=c;export{n as CoRating,l as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
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}
|
|
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-uZ2D6ESV.js";import{d as l}from"./p-DbISGXT_.js";import{d as n}from"./p-DzoNGEDU.js";import{d as f}from"./p-D0wrmRH8.js";import{d}from"./p-BdArvV6T.js";import{d as h}from"./p-cteJszd-.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.handleReorder=e=>{this.value=JSON.stringify(e.value),this.coChange.emit({value:e.value,item:e.item})},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,reorderable: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),onCoReorder:e=>this.handleReorder(e.detail),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:"0ce5a3a17573be110e31d9b9a852c9d38920ebe7",class:"co-ref-field"},(this.label||this.secondaryLabel)&&r("div",{key:"d8e57aa53a86c4a7eea93f5eb5bf599172028c8b",class:"co-ref-field__labels"},this.label&&r("label",{key:"85047359916520cb24dd41806bc55105d58546c0",class:"co-ref-field__label"},this.labelIcon&&r("co-icon",{key:"1a915ad0d00edde85e5a42c6aca46dd51d6934cd",class:"co-ref-field__label-icon",name:this.labelIcon,size:16}),this.label,r(s,{key:"117e40254873f5736cf0adf41f8e075975e46c28",required:this.required})),this.secondaryLabel&&r("span",{key:"054f1fe59359d4dafda008396867f1c9b70607cb",class:"co-ref-field__secondary-label"},this.secondaryLabel)),r("co-popover",{key:"56dbfeb3560e771908e9e0c4d41c34b0a69c8db4",open:this.isOpen,placement:"bottom-start",matchWidth:!0,offset:4,onCoOpen:this.handlePopoverOpen,onCoClose:this.handlePopoverClose},r("div",{key:"4fe5a05e993c561d5e721c778ed55e71a3e26260",slot:"trigger"},this.renderTrigger()),this.isOpen&&this.renderPanel()),this.helperText&&r("div",{key:"9a49dcd557477db1c8460ee974682a13730b360e",class:"co-ref-field__helper co-ref-field__helper--"+this.status},"default"!==this.status&&r("co-icon",{key:"a8868a9cf707dd1b202a86c03ccab43778857fe8",name:"error"===this.status?"warning-circle":"success"===this.status?"check-circle":"info",size:14}),r("span",{key:"a11dbf26c8c975089d5e384316a154a2f03eab7b"},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}
|