@prolibu-suite/cobalt-core 0.2.0 → 0.3.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 +15675 -11199
- package/dist/cjs/co-accordion.cjs.entry.js +3 -3
- package/dist/cjs/co-app-shell.cjs.entry.js +4 -4
- package/dist/cjs/co-autocomplete.cjs.entry.js +10 -7
- package/dist/cjs/co-avatar-group.cjs.entry.js +77 -0
- package/dist/cjs/co-avatar.cjs.entry.js +6 -4
- package/dist/cjs/co-badge.cjs.entry.js +2 -2
- package/dist/cjs/co-bottom-sheet.cjs.entry.js +325 -0
- package/dist/cjs/co-button-group.cjs.entry.js +3 -3
- package/dist/cjs/co-button.cjs.entry.js +6 -6
- package/dist/cjs/co-calendar-month.cjs.entry.js +381 -0
- package/dist/cjs/co-calendar_3.cjs.entry.js +11 -11
- package/dist/cjs/co-card.cjs.entry.js +3 -3
- package/dist/cjs/co-checkbox-group.cjs.entry.js +5 -5
- package/dist/cjs/co-checkbox.cjs.entry.js +5 -5
- package/dist/cjs/co-chip.cjs.entry.js +11 -8
- package/dist/cjs/co-color-picker.cjs.entry.js +7 -5
- package/dist/cjs/co-column-picker.cjs.entry.js +3 -3
- package/dist/cjs/co-combobox.cjs.entry.js +7 -7
- package/dist/cjs/co-command-search.cjs.entry.js +151 -12
- package/dist/cjs/co-data-table-pagination.cjs.entry.js +5 -5
- package/dist/cjs/co-data-table.cjs.entry.js +25 -11
- package/dist/cjs/co-date-picker.cjs.entry.js +2 -2
- package/dist/cjs/co-date-range-picker.cjs.entry.js +3 -3
- package/dist/cjs/co-date-range.cjs.entry.js +2 -2
- package/dist/cjs/co-empty-state.cjs.entry.js +2 -2
- package/dist/cjs/co-event-calendar.cjs.entry.js +318 -0
- package/dist/cjs/co-fab.cjs.entry.js +3 -3
- package/dist/cjs/co-file-field.cjs.entry.js +8 -8
- package/dist/cjs/co-helper-text.cjs.entry.js +3 -3
- package/dist/cjs/co-icon-button.cjs.entry.js +5 -5
- package/dist/cjs/co-icon.cjs.entry.js +33 -25
- package/dist/cjs/co-input.cjs.entry.js +6 -6
- package/dist/cjs/co-json-field.cjs.entry.js +10 -6
- package/dist/cjs/co-lightbox.cjs.entry.js +5 -5
- package/dist/cjs/co-list-footer.cjs.entry.js +25 -0
- package/dist/cjs/co-list-item.cjs.entry.js +60 -4
- package/dist/cjs/co-loader_2.cjs.entry.js +293 -0
- package/dist/cjs/co-menu-divider.cjs.entry.js +2 -2
- package/dist/cjs/co-menu-item.cjs.entry.js +17 -10
- package/dist/cjs/co-menu.cjs.entry.js +2 -2
- package/dist/cjs/co-modal.cjs.entry.js +16 -4
- package/dist/cjs/co-navbar.cjs.entry.js +3 -3
- package/dist/cjs/co-number-field.cjs.entry.js +18 -6
- package/dist/cjs/co-page-header.cjs.entry.js +2 -2
- package/dist/cjs/co-phone-field.cjs.entry.js +6 -4
- package/dist/cjs/co-popover.cjs.entry.js +45 -14
- package/dist/cjs/co-progress-bar.cjs.entry.js +8 -4
- package/dist/cjs/co-progress-circle.cjs.entry.js +3 -3
- package/dist/cjs/co-radio-group.cjs.entry.js +4 -4
- package/dist/cjs/co-radio.cjs.entry.js +4 -4
- package/dist/cjs/co-rating.cjs.entry.js +4 -4
- package/dist/cjs/co-ref-field.cjs.entry.js +36 -13
- package/dist/cjs/co-rich-text-editor.cjs.entry.js +1879 -33
- package/dist/cjs/co-rich-text-toolbar.cjs.entry.js +995 -71
- package/dist/cjs/co-rich-text-viewer.cjs.entry.js +55 -19
- package/dist/cjs/co-row.cjs.entry.js +3 -3
- package/dist/cjs/co-select.cjs.entry.js +8 -8
- package/dist/cjs/co-separator.cjs.entry.js +2 -2
- package/dist/cjs/co-sidebar-nav.cjs.entry.js +29 -9
- package/dist/cjs/co-sidebar.cjs.entry.js +3 -3
- package/dist/cjs/co-skeleton.cjs.entry.js +26 -0
- package/dist/cjs/co-slider.cjs.entry.js +3 -3
- package/dist/cjs/co-switch.cjs.entry.js +6 -6
- package/dist/cjs/co-tab-group.cjs.entry.js +2 -2
- package/dist/cjs/co-tab.cjs.entry.js +3 -3
- package/dist/cjs/co-tags-field.cjs.entry.js +19 -13
- package/dist/cjs/co-textarea.cjs.entry.js +11 -7
- package/dist/cjs/co-toast.cjs.entry.js +2 -2
- package/dist/cjs/co-toggle-button-group.cjs.entry.js +4 -4
- package/dist/cjs/co-toggle-button.cjs.entry.js +4 -4
- package/dist/cjs/co-tooltip.cjs.entry.js +51 -16
- package/dist/cjs/co-transfer-list.cjs.entry.js +3 -3
- package/dist/cjs/co-video.cjs.entry.js +839 -0
- package/dist/cjs/cobalt.cjs.js +2 -2
- package/dist/cjs/fieldChip-CDIMz_Y6.js +7 -0
- package/dist/cjs/{index-CaEJnpZe.js → index-5NdsiFjZ.js} +14509 -6317
- package/dist/cjs/{index-DoFnrUVH.js → index-BumlM92r.js} +45 -21
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/overlayAfterClose-BdeXrhVY.js +12 -0
- package/dist/{esm/sanitizer-DcK0GGZC.js → cjs/purify.es-DX41ZWS2.js} +3 -107
- package/dist/cjs/{requiredMark-DA6y-4rp.js → requiredMark-CqMGt1H1.js} +1 -1
- package/dist/cjs/richTextI18n-B7ktXg3M.js +382 -0
- package/dist/cjs/toolbar-config-3PlT-3zm.js +216 -0
- package/dist/cjs/tz-Dgom0W69.js +127 -0
- package/dist/cobalt/cobalt.css +1 -1
- package/dist/cobalt/cobalt.esm.js +1 -1
- package/dist/cobalt/p-0a506c9d.entry.js +1 -0
- package/dist/cobalt/p-0bb55163.entry.js +1 -0
- package/dist/cobalt/{p-6404bd21.entry.js → p-0e8c0d87.entry.js} +1 -1
- package/dist/cobalt/p-12e2c2c4.entry.js +1 -0
- package/dist/cobalt/p-136ad468.entry.js +1 -0
- package/dist/cobalt/{p-654bbc2a.entry.js → p-14b59277.entry.js} +1 -1
- package/dist/cobalt/p-1531d3c9.entry.js +1 -0
- package/dist/cobalt/p-1774d211.entry.js +1 -0
- package/dist/cobalt/p-180e1106.entry.js +1 -0
- package/dist/cobalt/p-1a07c23c.entry.js +1 -0
- package/dist/cobalt/p-1dc9c49e.entry.js +1 -0
- package/dist/cobalt/p-1f747e45.entry.js +1 -0
- package/dist/cobalt/p-201eaf35.entry.js +1 -0
- package/dist/cobalt/p-260101ab.entry.js +1 -0
- package/dist/cobalt/p-279bf91c.entry.js +1 -0
- package/dist/cobalt/p-29be61a9.entry.js +1 -0
- package/dist/cobalt/p-2d2ce434.entry.js +1 -0
- package/dist/cobalt/{p-aa63812a.entry.js → p-2f86e1e0.entry.js} +1 -1
- package/dist/cobalt/{p-522fcdb7.entry.js → p-31ab9a46.entry.js} +1 -1
- package/dist/cobalt/{p-fe9e85b6.entry.js → p-37595103.entry.js} +1 -1
- package/dist/cobalt/{p-def448e4.entry.js → p-377c2ccc.entry.js} +1 -1
- package/dist/cobalt/p-3863ea91.entry.js +1 -0
- package/dist/cobalt/p-3a257cb0.entry.js +1 -0
- package/dist/cobalt/p-3e187456.entry.js +1 -0
- package/dist/cobalt/{p-5d01bd4d.entry.js → p-4431faac.entry.js} +1 -1
- package/dist/cobalt/{p-54f26e95.entry.js → p-4504f7b0.entry.js} +1 -1
- package/dist/cobalt/{p-f8728b21.entry.js → p-456fa86f.entry.js} +1 -1
- package/dist/cobalt/{p-3f9b3fcb.entry.js → p-4871690e.entry.js} +1 -1
- package/dist/cobalt/{p-d17e1444.entry.js → p-4c01d984.entry.js} +1 -1
- package/dist/cobalt/p-51a53177.entry.js +1 -0
- package/dist/cobalt/p-52de17da.entry.js +1 -0
- package/dist/cobalt/p-5890e4d1.entry.js +1 -0
- package/dist/cobalt/{p-f2c5cb74.entry.js → p-58a53421.entry.js} +1 -1
- package/dist/cobalt/p-62274eba.entry.js +1 -0
- package/dist/cobalt/p-635b03d5.entry.js +1 -0
- package/dist/cobalt/p-64ddee92.entry.js +1 -0
- package/dist/cobalt/p-65af5017.entry.js +1 -0
- package/dist/cobalt/p-69d4c0c8.entry.js +1 -0
- package/dist/cobalt/p-6c480916.entry.js +1 -0
- package/dist/cobalt/p-6d1217c3.entry.js +1 -0
- package/dist/cobalt/{p-f0e8fa7d.entry.js → p-6e808b3a.entry.js} +1 -1
- package/dist/cobalt/{p-f97ad9ad.entry.js → p-70b14b05.entry.js} +1 -1
- package/dist/cobalt/{p-97c20011.entry.js → p-790d384e.entry.js} +1 -1
- package/dist/cobalt/p-8012e152.entry.js +1 -0
- package/dist/cobalt/p-80b27203.entry.js +1 -0
- package/dist/cobalt/p-867c1465.entry.js +1 -0
- package/dist/cobalt/p-86a143d7.entry.js +1 -0
- package/dist/cobalt/{p-e8b58332.entry.js → p-8d59f5ad.entry.js} +1 -1
- package/dist/cobalt/p-8d7fdb9d.entry.js +1 -0
- package/dist/cobalt/{p-7f818368.entry.js → p-8dc1dab8.entry.js} +1 -1
- package/dist/cobalt/{p-beb9c11d.entry.js → p-8e1dc062.entry.js} +1 -1
- package/dist/cobalt/p-929e647f.entry.js +1 -0
- package/dist/cobalt/p-92bd9b29.entry.js +1 -0
- package/dist/cobalt/p-93046365.entry.js +1 -0
- package/dist/cobalt/p-98ab5f3f.entry.js +1 -0
- package/dist/cobalt/{p-c87285b6.entry.js → p-9a04ca90.entry.js} +1 -1
- package/dist/cobalt/{p-7ef766c6.entry.js → p-9a088515.entry.js} +1 -1
- package/dist/cobalt/p-9abbd436.entry.js +1 -0
- package/dist/cobalt/p-9d69c067.entry.js +1 -0
- package/dist/cobalt/p-B-ckjCUA.js +1 -0
- package/dist/cobalt/p-B2QLgWrz.js +2 -0
- package/dist/cobalt/p-B6JZk8fL.js +1 -0
- package/dist/cobalt/p-BZJ7NCm5.js +1 -0
- package/dist/cobalt/p-CYsftTKf.js +2 -0
- package/dist/cobalt/p-CegCk7FL.js +1 -0
- package/dist/cobalt/p-Ch1jfwZ2.js +1 -0
- package/dist/cobalt/p-ChibIpZv.js +1 -0
- package/dist/cobalt/p-afb7e19e.entry.js +1 -0
- package/dist/cobalt/{p-b758c2e6.entry.js → p-b6f20268.entry.js} +1 -1
- package/dist/cobalt/{p-bb07da22.entry.js → p-ba90e871.entry.js} +1 -1
- package/dist/cobalt/p-c10697e1.entry.js +1 -0
- package/dist/cobalt/p-c4f59532.entry.js +1 -0
- package/dist/cobalt/{p-1e0282b8.entry.js → p-cb235aa7.entry.js} +1 -1
- package/dist/cobalt/p-cfb36943.entry.js +1 -0
- package/dist/cobalt/p-d809bd44.entry.js +1 -0
- package/dist/cobalt/p-e53861e4.entry.js +1 -0
- package/dist/cobalt/p-e54dd404.entry.js +1 -0
- package/dist/cobalt/{p-01fc77c4.entry.js → p-eb18fdbf.entry.js} +1 -1
- package/dist/cobalt/{p-95d14878.entry.js → p-eb73052a.entry.js} +1 -1
- package/dist/cobalt/{p-273afd93.entry.js → p-ef7d4ae3.entry.js} +1 -1
- package/dist/cobalt/p-f4063c41.entry.js +1 -0
- package/dist/cobalt/p-oImf-7fN.js +1 -0
- package/dist/cobalt/{p-CyYF8IJE.js → p-tPYikBRJ.js} +1 -1
- package/dist/collection/collection-manifest.json +10 -3
- package/dist/collection/components/co-accordion/co-accordion.js +2 -2
- package/dist/collection/components/co-app-shell/co-app-shell.css +79 -6
- package/dist/collection/components/co-app-shell/co-app-shell.js +2 -2
- package/dist/collection/components/co-autocomplete/co-autocomplete.css +28 -1
- package/dist/collection/components/co-autocomplete/co-autocomplete.js +27 -4
- package/dist/collection/components/co-avatar/co-avatar.css +38 -1
- package/dist/collection/components/co-avatar/co-avatar.js +23 -2
- package/dist/collection/components/co-avatar-group/co-avatar-group.css +86 -0
- package/dist/collection/components/co-avatar-group/co-avatar-group.js +224 -0
- package/dist/collection/components/co-badge/co-badge.js +1 -1
- package/dist/collection/components/co-bottom-sheet/co-bottom-sheet.css +136 -0
- package/dist/collection/components/co-bottom-sheet/co-bottom-sheet.js +507 -0
- package/dist/collection/components/co-button/co-button.css +40 -7
- package/dist/collection/components/co-button/co-button.js +26 -7
- package/dist/collection/components/co-button-group/co-button-group.js +2 -2
- package/dist/collection/components/co-calendar/co-calendar.js +1 -1
- package/dist/collection/components/co-calendar-month/co-calendar-month.css +231 -0
- package/dist/collection/components/co-calendar-month/co-calendar-month.js +594 -0
- package/dist/collection/components/co-card/co-card.js +2 -2
- package/dist/collection/components/co-checkbox/co-checkbox.css +7 -1
- package/dist/collection/components/co-checkbox/co-checkbox.js +3 -3
- package/dist/collection/components/co-checkbox-group/co-checkbox-group.css +7 -1
- package/dist/collection/components/co-checkbox-group/co-checkbox-group.js +3 -3
- package/dist/collection/components/co-chip/co-chip.css +27 -7
- package/dist/collection/components/co-chip/co-chip.js +52 -10
- package/dist/collection/components/co-color-picker/co-color-picker.css +35 -1
- package/dist/collection/components/co-color-picker/co-color-picker.js +24 -2
- package/dist/collection/components/co-column-picker/co-column-picker.js +2 -2
- package/dist/collection/components/co-combobox/co-combobox.css +7 -47
- package/dist/collection/components/co-combobox/co-combobox.js +4 -4
- package/dist/collection/components/co-command-search/co-command-search.css +163 -1
- package/dist/collection/components/co-command-search/co-command-search.js +355 -14
- package/dist/collection/components/co-command-search/commandSearchGroup.js +17 -0
- package/dist/collection/components/co-command-search/commandSearchLogic.js +27 -0
- package/dist/collection/components/co-data-table/co-data-table.css +37 -1
- package/dist/collection/components/co-data-table/co-data-table.js +25 -11
- package/dist/collection/components/co-data-table-pagination/co-data-table-pagination.js +4 -4
- package/dist/collection/components/co-date-field/co-date-field.css +7 -1
- package/dist/collection/components/co-date-field/co-date-field.js +4 -4
- package/dist/collection/components/co-date-range/co-date-range.js +1 -1
- package/dist/collection/components/co-date-range-picker/co-date-range-picker.css +7 -1
- package/dist/collection/components/co-drawer/co-drawer.css +1 -0
- package/dist/collection/components/co-drawer/co-drawer.js +2 -2
- package/dist/collection/components/co-empty-state/co-empty-state.js +1 -1
- package/dist/collection/components/co-event-calendar/co-event-calendar.css +146 -0
- package/dist/collection/components/co-event-calendar/co-event-calendar.js +620 -0
- package/dist/collection/components/co-fab/co-fab.js +2 -2
- package/dist/collection/components/co-file-field/co-file-field.css +7 -1
- package/dist/collection/components/co-file-field/co-file-field.js +5 -5
- package/dist/collection/components/co-helper-text/co-helper-text.js +2 -2
- package/dist/collection/components/co-icon/co-icon.js +7 -37
- package/dist/collection/components/co-icon/iconLoader.js +39 -0
- package/dist/collection/components/co-icon-button/co-icon-button.css +19 -8
- package/dist/collection/components/co-icon-button/co-icon-button.js +23 -4
- package/dist/collection/components/co-input/co-input.css +7 -1
- package/dist/collection/components/co-input/co-input.js +3 -3
- package/dist/collection/components/co-json-field/co-json-field.css +25 -1
- package/dist/collection/components/co-json-field/co-json-field.js +27 -3
- package/dist/collection/components/co-lightbox/co-lightbox.js +4 -4
- package/dist/collection/components/co-list-footer/co-list-footer.css +50 -0
- package/dist/collection/components/co-list-footer/co-list-footer.js +149 -0
- package/dist/collection/components/co-list-item/co-list-item.css +7 -0
- package/dist/collection/components/co-list-item/co-list-item.js +65 -2
- package/dist/collection/components/co-loader/co-loader.css +9 -0
- package/dist/collection/components/co-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 +18 -0
- package/dist/collection/components/co-menu-item/co-menu-item.js +15 -8
- package/dist/collection/components/co-modal/co-modal.css +42 -2
- package/dist/collection/components/co-modal/co-modal.js +42 -2
- package/dist/collection/components/co-navbar/co-navbar.js +2 -2
- package/dist/collection/components/co-number-field/co-number-field.css +19 -1
- package/dist/collection/components/co-number-field/co-number-field.js +34 -3
- package/dist/collection/components/co-overlay/co-overlay.css +15 -1
- package/dist/collection/components/co-overlay/co-overlay.js +266 -1
- package/dist/collection/components/co-overlay/focusTrap.js +53 -0
- package/dist/collection/components/co-overlay/overlayAfterClose.js +8 -0
- package/dist/collection/components/co-page-header/co-page-header.js +1 -1
- package/dist/collection/components/co-phone-field/co-phone-field.css +30 -2
- package/dist/collection/components/co-phone-field/co-phone-field.js +23 -1
- package/dist/collection/components/co-popover/co-popover.css +9 -0
- package/dist/collection/components/co-popover/co-popover.js +43 -12
- package/dist/collection/components/co-progress-bar/co-progress-bar.css +22 -0
- package/dist/collection/components/co-progress-bar/co-progress-bar.js +26 -2
- package/dist/collection/components/co-progress-circle/co-progress-circle.js +2 -2
- package/dist/collection/components/co-radio/co-radio.js +3 -3
- package/dist/collection/components/co-radio-group/co-radio-group.js +3 -3
- package/dist/collection/components/co-rating/co-rating.js +3 -3
- package/dist/collection/components/co-ref-field/co-ref-field.css +64 -6
- package/dist/collection/components/co-ref-field/co-ref-field.js +0 -0
- package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.css +1125 -41
- package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.js +2008 -53
- package/dist/collection/components/co-rich-text-toolbar/co-rich-text-toolbar.css +791 -9
- package/dist/collection/components/co-rich-text-toolbar/co-rich-text-toolbar.js +1071 -71
- package/dist/collection/components/co-rich-text-viewer/co-rich-text-viewer.css +78 -0
- package/dist/collection/components/co-rich-text-viewer/co-rich-text-viewer.js +46 -41
- package/dist/collection/components/co-row/co-row.js +2 -2
- package/dist/collection/components/co-select/co-select.css +7 -1
- package/dist/collection/components/co-select/co-select.js +5 -5
- package/dist/collection/components/co-separator/co-separator.js +1 -1
- package/dist/collection/components/co-sidebar/co-sidebar.js +2 -2
- package/dist/collection/components/co-sidebar-nav/co-sidebar-nav.css +99 -12
- package/dist/collection/components/co-sidebar-nav/co-sidebar-nav.js +28 -8
- package/dist/collection/components/co-skeleton/co-skeleton.css +28 -0
- package/dist/collection/components/co-skeleton/co-skeleton.js +97 -0
- package/dist/collection/components/co-slider/co-slider.js +2 -2
- package/dist/collection/components/co-switch/co-switch.css +9 -1
- package/dist/collection/components/co-switch/co-switch.js +3 -3
- package/dist/collection/components/co-tab/co-tab.js +2 -2
- package/dist/collection/components/co-tab-group/co-tab-group.js +1 -1
- package/dist/collection/components/co-tags-field/co-tags-field.css +39 -1
- package/dist/collection/components/co-tags-field/co-tags-field.js +36 -10
- package/dist/collection/components/co-textarea/co-textarea.css +26 -1
- package/dist/collection/components/co-textarea/co-textarea.js +28 -4
- package/dist/collection/components/co-toast/co-toast.js +1 -1
- package/dist/collection/components/co-toggle-button/co-toggle-button.css +26 -4
- package/dist/collection/components/co-toggle-button/co-toggle-button.js +3 -3
- package/dist/collection/components/co-toggle-button-group/co-toggle-button-group.css +16 -12
- package/dist/collection/components/co-toggle-button-group/co-toggle-button-group.js +2 -2
- package/dist/collection/components/co-tooltip/co-tooltip.css +8 -0
- package/dist/collection/components/co-tooltip/co-tooltip.js +69 -14
- package/dist/collection/components/co-transfer-list/co-transfer-list.js +2 -2
- package/dist/collection/components/co-video/co-video.css +497 -0
- package/dist/collection/components/co-video/co-video.js +1772 -0
- package/dist/collection/utils/fieldChip.js +2 -0
- package/dist/collection/utils/icon-config.js +12 -0
- package/dist/collection/utils/richTextI18n.js +378 -0
- package/dist/collection/utils/sheetGesture.js +53 -0
- package/dist/components/co-accordion.js +1 -1
- package/dist/components/co-app-shell.js +1 -1
- package/dist/components/co-autocomplete.js +1 -1
- package/dist/components/co-avatar-group.d.ts +11 -0
- package/dist/components/co-avatar-group.js +1 -0
- package/dist/components/co-avatar.js +1 -1
- package/dist/components/co-badge.js +1 -1
- package/dist/components/co-bottom-sheet.d.ts +11 -0
- package/dist/components/co-bottom-sheet.js +1 -0
- package/dist/components/co-button-group.js +1 -1
- package/dist/components/co-button.js +1 -1
- package/dist/components/co-calendar-month.d.ts +11 -0
- package/dist/components/co-calendar-month.js +1 -0
- package/dist/components/co-calendar.js +1 -1
- package/dist/components/co-card.js +1 -1
- package/dist/components/co-checkbox-group.js +1 -1
- package/dist/components/co-checkbox.js +1 -1
- package/dist/components/co-chip.js +1 -1
- package/dist/components/co-color-picker.js +1 -1
- package/dist/components/co-column-picker.js +1 -1
- package/dist/components/co-combobox.js +1 -1
- package/dist/components/co-command-search.js +1 -1
- package/dist/components/co-data-table-pagination.js +1 -1
- package/dist/components/co-data-table.js +1 -1
- package/dist/components/co-date-field.js +1 -1
- package/dist/components/co-date-picker.js +1 -1
- package/dist/components/co-date-range-picker.js +1 -1
- package/dist/components/co-date-range.js +1 -1
- package/dist/components/co-drawer.js +1 -1
- package/dist/components/co-empty-state.js +1 -1
- package/dist/components/co-event-calendar.d.ts +11 -0
- package/dist/components/co-event-calendar.js +1 -0
- package/dist/components/co-fab.js +1 -1
- package/dist/components/co-file-field.js +1 -1
- package/dist/components/co-helper-text.js +1 -1
- package/dist/components/co-icon-button.js +1 -1
- package/dist/components/co-icon.js +1 -1
- package/dist/components/co-input.js +1 -1
- package/dist/components/co-json-field.js +1 -1
- package/dist/components/co-lightbox.js +1 -1
- package/dist/components/co-list-footer.d.ts +11 -0
- package/dist/components/co-list-footer.js +1 -0
- package/dist/components/co-list-item.js +1 -1
- package/dist/components/co-loader.js +1 -1
- package/dist/components/co-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-overlay.js +1 -1
- package/dist/components/co-page-header.js +1 -1
- package/dist/components/co-phone-field.js +1 -1
- package/dist/components/co-popover.js +1 -1
- package/dist/components/co-progress-bar.js +1 -1
- package/dist/components/co-progress-circle.js +1 -1
- package/dist/components/co-radio-group.js +1 -1
- package/dist/components/co-radio.js +1 -1
- package/dist/components/co-rating.js +1 -1
- package/dist/components/co-ref-field.js +1 -1
- package/dist/components/co-rich-text-editor.js +1 -1
- package/dist/components/co-rich-text-toolbar.js +1 -1
- package/dist/components/co-rich-text-viewer.js +1 -1
- package/dist/components/co-row.js +1 -1
- package/dist/components/co-select.js +1 -1
- package/dist/components/co-separator.js +1 -1
- package/dist/components/co-sidebar-nav.js +1 -1
- package/dist/components/co-sidebar.js +1 -1
- package/dist/components/co-skeleton.d.ts +11 -0
- package/dist/components/co-skeleton.js +1 -0
- package/dist/components/co-slider.js +1 -1
- package/dist/components/co-switch.js +1 -1
- package/dist/components/co-tab-group.js +1 -1
- package/dist/components/co-tab.js +1 -1
- package/dist/components/co-tags-field.js +1 -1
- package/dist/components/co-textarea.js +1 -1
- package/dist/components/co-toast.js +1 -1
- package/dist/components/co-toggle-button-group.js +1 -1
- package/dist/components/co-toggle-button.js +1 -1
- package/dist/components/co-tooltip.js +1 -1
- package/dist/components/co-transfer-list.js +1 -1
- package/dist/components/co-video.d.ts +11 -0
- package/dist/components/co-video.js +1 -0
- package/dist/components/index.js +1 -1
- package/dist/components/p-B2QLgWrz.js +2 -0
- package/dist/components/{p-BeWXpX8I.js → p-B7vGYFbO.js} +1 -1
- package/dist/components/p-BB2OaYKF.js +1 -0
- package/dist/components/p-BFeE_fiq.js +1 -0
- package/dist/components/p-BNKz39GA.js +1 -0
- package/dist/components/p-Ba4v1NXo.js +1 -0
- package/dist/components/p-C_ULDaks.js +1 -0
- package/dist/components/p-CegCk7FL.js +1 -0
- package/dist/components/p-ChibIpZv.js +1 -0
- package/dist/components/p-D3Y_ti3Q.js +1 -0
- package/dist/components/{p-DObrQi5F.js → p-DKh8ZK4U.js} +1 -1
- package/dist/components/{p-C9tHLXKS.js → p-DeZxp9vb.js} +1 -1
- package/dist/components/p-DvhR3H61.js +1 -0
- package/dist/components/p-DxCFMMfY.js +1 -0
- package/dist/components/{p-OGpfa9Yd.js → p-DzoNGEDU.js} +1 -1
- package/dist/components/p-EPZfLt5l.js +1 -0
- package/dist/components/p-FMnqPWcM.js +1 -0
- package/dist/components/p-Hzh9U2cM.js +1 -0
- package/dist/components/p-WZ06pT2Y.js +1 -0
- package/dist/components/p-tloAgDin.js +1 -0
- package/dist/esm/co-accordion.entry.js +3 -3
- package/dist/esm/co-app-shell.entry.js +4 -4
- package/dist/esm/co-autocomplete.entry.js +10 -7
- package/dist/esm/co-avatar-group.entry.js +75 -0
- package/dist/esm/co-avatar.entry.js +6 -4
- package/dist/esm/co-badge.entry.js +2 -2
- package/dist/esm/co-bottom-sheet.entry.js +323 -0
- package/dist/esm/co-button-group.entry.js +3 -3
- package/dist/esm/co-button.entry.js +6 -6
- package/dist/esm/co-calendar-month.entry.js +379 -0
- package/dist/esm/co-calendar_3.entry.js +12 -12
- package/dist/esm/co-card.entry.js +3 -3
- package/dist/esm/co-checkbox-group.entry.js +5 -5
- package/dist/esm/co-checkbox.entry.js +5 -5
- package/dist/esm/co-chip.entry.js +11 -8
- package/dist/esm/co-color-picker.entry.js +7 -5
- package/dist/esm/co-column-picker.entry.js +3 -3
- package/dist/esm/co-combobox.entry.js +7 -7
- package/dist/esm/co-command-search.entry.js +151 -12
- package/dist/esm/co-data-table-pagination.entry.js +5 -5
- package/dist/esm/co-data-table.entry.js +25 -11
- package/dist/esm/co-date-picker.entry.js +2 -2
- package/dist/esm/co-date-range-picker.entry.js +4 -4
- package/dist/esm/co-date-range.entry.js +2 -2
- package/dist/esm/co-empty-state.entry.js +2 -2
- package/dist/esm/co-event-calendar.entry.js +316 -0
- package/dist/esm/co-fab.entry.js +3 -3
- package/dist/esm/co-file-field.entry.js +8 -8
- package/dist/esm/co-helper-text.entry.js +3 -3
- package/dist/esm/co-icon-button.entry.js +5 -5
- package/dist/esm/co-icon.entry.js +33 -25
- package/dist/esm/co-input.entry.js +6 -6
- package/dist/esm/co-json-field.entry.js +10 -6
- package/dist/esm/co-lightbox.entry.js +5 -5
- package/dist/esm/co-list-footer.entry.js +23 -0
- package/dist/esm/co-list-item.entry.js +60 -4
- package/dist/esm/co-loader_2.entry.js +290 -0
- package/dist/esm/co-menu-divider.entry.js +2 -2
- package/dist/esm/co-menu-item.entry.js +17 -10
- package/dist/esm/co-menu.entry.js +2 -2
- package/dist/esm/co-modal.entry.js +16 -4
- package/dist/esm/co-navbar.entry.js +3 -3
- package/dist/esm/co-number-field.entry.js +18 -6
- package/dist/esm/co-page-header.entry.js +2 -2
- package/dist/esm/co-phone-field.entry.js +6 -4
- package/dist/esm/co-popover.entry.js +45 -14
- package/dist/esm/co-progress-bar.entry.js +8 -4
- package/dist/esm/co-progress-circle.entry.js +3 -3
- package/dist/esm/co-radio-group.entry.js +4 -4
- package/dist/esm/co-radio.entry.js +4 -4
- package/dist/esm/co-rating.entry.js +4 -4
- package/dist/esm/co-ref-field.entry.js +36 -13
- package/dist/esm/co-rich-text-editor.entry.js +1879 -33
- package/dist/esm/co-rich-text-toolbar.entry.js +995 -71
- package/dist/esm/co-rich-text-viewer.entry.js +55 -19
- package/dist/esm/co-row.entry.js +3 -3
- package/dist/esm/co-select.entry.js +8 -8
- package/dist/esm/co-separator.entry.js +2 -2
- package/dist/esm/co-sidebar-nav.entry.js +29 -9
- package/dist/esm/co-sidebar.entry.js +3 -3
- package/dist/esm/co-skeleton.entry.js +24 -0
- package/dist/esm/co-slider.entry.js +3 -3
- package/dist/esm/co-switch.entry.js +6 -6
- package/dist/esm/co-tab-group.entry.js +2 -2
- package/dist/esm/co-tab.entry.js +3 -3
- package/dist/esm/co-tags-field.entry.js +19 -13
- package/dist/esm/co-textarea.entry.js +11 -7
- package/dist/esm/co-toast.entry.js +2 -2
- package/dist/esm/co-toggle-button-group.entry.js +4 -4
- package/dist/esm/co-toggle-button.entry.js +4 -4
- package/dist/esm/co-tooltip.entry.js +51 -16
- package/dist/esm/co-transfer-list.entry.js +3 -3
- package/dist/esm/co-video.entry.js +837 -0
- package/dist/esm/cobalt.js +3 -3
- package/dist/esm/{dates-CyYF8IJE.js → dates-tPYikBRJ.js} +1 -1
- package/dist/esm/fieldChip-GPikjpYw.js +5 -0
- package/dist/esm/{index-BKmfyPZK.js → index-CYsftTKf.js} +45 -21
- package/dist/esm/{index-BjAqSidM.js → index-w_Wxgclf.js} +14508 -6305
- package/dist/esm/loader.js +3 -3
- package/dist/esm/overlayAfterClose-Ch1jfwZ2.js +10 -0
- package/dist/{cjs/sanitizer-CjHZAkOm.js → esm/purify.es-B2QLgWrz.js} +1 -110
- package/dist/esm/{requiredMark-DFvtYtkE.js → requiredMark-CEbXKHcU.js} +1 -1
- package/dist/esm/richTextI18n-B-ckjCUA.js +380 -0
- package/dist/esm/toolbar-config-ChibIpZv.js +212 -0
- package/dist/esm/tz-B6JZk8fL.js +119 -0
- package/dist/types/components/co-autocomplete/co-autocomplete.d.ts +2 -0
- package/dist/types/components/co-avatar/co-avatar.d.ts +2 -0
- package/dist/types/components/co-avatar-group/co-avatar-group.d.ts +33 -0
- package/dist/types/components/co-bottom-sheet/co-bottom-sheet.d.ts +81 -0
- package/dist/types/components/co-button/co-button.d.ts +3 -1
- package/dist/types/components/co-calendar-month/co-calendar-month.d.ts +83 -0
- package/dist/types/components/co-chip/co-chip.d.ts +7 -2
- package/dist/types/components/co-color-picker/co-color-picker.d.ts +2 -0
- package/dist/types/components/co-command-search/co-command-search.d.ts +39 -6
- package/dist/types/components/co-command-search/commandSearchGroup.d.ts +20 -0
- package/dist/types/components/co-command-search/commandSearchLogic.d.ts +17 -0
- package/dist/types/components/co-data-table/co-data-table.d.ts +2 -1
- package/dist/types/components/co-event-calendar/co-event-calendar.d.ts +110 -0
- package/dist/types/components/co-icon/co-icon.d.ts +1 -1
- package/dist/types/components/co-icon/iconLoader.d.ts +6 -0
- package/dist/types/components/co-icon-button/co-icon-button.d.ts +2 -0
- package/dist/types/components/co-json-field/co-json-field.d.ts +3 -0
- package/dist/types/components/co-list-footer/co-list-footer.d.ts +26 -0
- package/dist/types/components/co-list-item/co-list-item.d.ts +11 -0
- package/dist/types/components/co-modal/co-modal.d.ts +6 -0
- package/dist/types/components/co-number-field/co-number-field.d.ts +13 -0
- package/dist/types/components/co-overlay/co-overlay.d.ts +45 -0
- package/dist/types/components/co-overlay/focusTrap.d.ts +20 -0
- package/dist/types/components/co-overlay/overlayAfterClose.d.ts +5 -0
- package/dist/types/components/co-phone-field/co-phone-field.d.ts +2 -0
- package/dist/types/components/co-popover/co-popover.d.ts +9 -0
- package/dist/types/components/co-progress-bar/co-progress-bar.d.ts +2 -0
- package/dist/types/components/co-ref-field/co-ref-field.d.ts +17 -2
- package/dist/types/components/co-rich-text-editor/co-rich-text-editor.d.ts +161 -9
- package/dist/types/components/co-rich-text-toolbar/co-rich-text-toolbar.d.ts +119 -13
- package/dist/types/components/co-rich-text-viewer/co-rich-text-viewer.d.ts +1 -14
- package/dist/types/components/co-skeleton/co-skeleton.d.ts +13 -0
- package/dist/types/components/co-tags-field/co-tags-field.d.ts +2 -0
- package/dist/types/components/co-textarea/co-textarea.d.ts +3 -0
- package/dist/types/components/co-tooltip/co-tooltip.d.ts +12 -0
- package/dist/types/components/co-video/co-video.d.ts +203 -0
- package/dist/types/components.d.ts +1729 -72
- package/dist/types/utils/fieldChip.d.ts +37 -0
- package/dist/types/utils/icon-config.d.ts +11 -0
- package/dist/types/utils/richTextI18n.d.ts +130 -0
- package/dist/types/utils/sheetGesture.d.ts +31 -0
- package/package.json +3 -2
- package/dist/cjs/co-loader.cjs.entry.js +0 -34
- package/dist/cjs/co-overlay.cjs.entry.js +0 -23
- package/dist/cobalt/p-0a6d8061.entry.js +0 -1
- package/dist/cobalt/p-0bf288cd.entry.js +0 -1
- package/dist/cobalt/p-136bdbd2.entry.js +0 -1
- package/dist/cobalt/p-15708d32.entry.js +0 -1
- package/dist/cobalt/p-1578b019.entry.js +0 -1
- package/dist/cobalt/p-23d48581.entry.js +0 -1
- package/dist/cobalt/p-2718ff27.entry.js +0 -1
- package/dist/cobalt/p-2b4d8535.entry.js +0 -1
- package/dist/cobalt/p-3190d715.entry.js +0 -1
- package/dist/cobalt/p-41228dce.entry.js +0 -1
- package/dist/cobalt/p-44672953.entry.js +0 -1
- package/dist/cobalt/p-53ce9023.entry.js +0 -1
- package/dist/cobalt/p-5e7141aa.entry.js +0 -1
- package/dist/cobalt/p-5f905739.entry.js +0 -1
- package/dist/cobalt/p-6678ac0a.entry.js +0 -1
- package/dist/cobalt/p-66a912dd.entry.js +0 -1
- package/dist/cobalt/p-6759ee1c.entry.js +0 -1
- package/dist/cobalt/p-69a40bfd.entry.js +0 -1
- package/dist/cobalt/p-6a6a62cb.entry.js +0 -1
- package/dist/cobalt/p-6d43b6cd.entry.js +0 -1
- package/dist/cobalt/p-759c3dd0.entry.js +0 -1
- package/dist/cobalt/p-782f729f.entry.js +0 -1
- package/dist/cobalt/p-83b89bf8.entry.js +0 -1
- package/dist/cobalt/p-88dc561a.entry.js +0 -1
- package/dist/cobalt/p-8c27aff7.entry.js +0 -1
- package/dist/cobalt/p-996179f7.entry.js +0 -1
- package/dist/cobalt/p-9c533830.entry.js +0 -1
- package/dist/cobalt/p-9d89bf47.entry.js +0 -1
- package/dist/cobalt/p-BKmfyPZK.js +0 -2
- package/dist/cobalt/p-BchB6Hdr.js +0 -1
- package/dist/cobalt/p-DcK0GGZC.js +0 -2
- package/dist/cobalt/p-Qqq8fysz.js +0 -1
- package/dist/cobalt/p-aa17c70b.entry.js +0 -1
- package/dist/cobalt/p-ad4c1b41.entry.js +0 -1
- package/dist/cobalt/p-ae4d3207.entry.js +0 -1
- package/dist/cobalt/p-af64da37.entry.js +0 -1
- package/dist/cobalt/p-c6a242e4.entry.js +0 -1
- package/dist/cobalt/p-cd57e8b4.entry.js +0 -1
- package/dist/cobalt/p-ce3a535f.entry.js +0 -1
- package/dist/cobalt/p-d958566a.entry.js +0 -1
- package/dist/cobalt/p-dd873bf8.entry.js +0 -1
- package/dist/cobalt/p-e4de8865.entry.js +0 -1
- package/dist/cobalt/p-eba0bf7f.entry.js +0 -1
- package/dist/cobalt/p-fad3605d.entry.js +0 -1
- package/dist/cobalt/p-ff2690e5.entry.js +0 -1
- package/dist/components/p-BXdfh__-.js +0 -1
- package/dist/components/p-BchB6Hdr.js +0 -1
- package/dist/components/p-BiW0ubLs.js +0 -1
- package/dist/components/p-CaMgu2_g.js +0 -1
- package/dist/components/p-DBhNS7JD.js +0 -1
- package/dist/components/p-DPi_U-Kl.js +0 -1
- package/dist/components/p-DcK0GGZC.js +0 -2
- package/dist/components/p-MiSJXuBx.js +0 -1
- package/dist/components/p-Sgn-2g8m.js +0 -1
- package/dist/components/p-jDjfGZJp.js +0 -1
- package/dist/components/p-o8hrDIKe.js +0 -1
- package/dist/esm/co-loader.entry.js +0 -32
- package/dist/esm/co-overlay.entry.js +0 -21
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, a as getElement } from './index-
|
|
2
|
-
import { R as RequiredMark } from './requiredMark-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, a as getElement } from './index-CYsftTKf.js';
|
|
2
|
+
import { R as RequiredMark } from './requiredMark-CEbXKHcU.js';
|
|
3
3
|
|
|
4
|
-
const coInputCss = () => `: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-input{display:flex;flex-direction:column;gap:var(--co-spacing-sm2)}:host([layout='horizontal']) .co-input{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-input__labels{grid-column:1;grid-row:1;padding-top:var(--co-spacing-sm2);min-width:0}:host([layout='horizontal']) .co-input__label{white-space:normal}:host([layout='horizontal']) .co-input>:not(.co-input__labels){grid-column:2;min-width:0}.co-input__labels{display:flex;align-items:center;justify-content:space-between;padding:0 var(--co-spacing-xs);gap:var(--co-spacing-sm2)}.co-input__label{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);font-weight:400;letter-spacing:var(--co-font-letter-spacing-body);line-height:1;white-space:nowrap;cursor:default}.co-input__secondary-label{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);font-weight:400;letter-spacing:var(--co-font-letter-spacing-body);line-height:1;white-space:nowrap;text-align:right}.co-input__field-row{display:flex;align-items:stretch}.co-input__field{display:flex;align-items:center;gap:var(--co-spacing-sm2);padding:var(--co-spacing-sm2) var(--co-spacing-md);background:var(--co-semantic-surface-secondary);border:1px solid var(--co-semantic-border-subtle);border-radius:var(--co-border-radius-xs);transition:border-color 0.15s ease, box-shadow 0.15s ease;min-height:40px;box-sizing:border-box;overflow:hidden;flex:1;min-width:0}.co-input--s .co-input__field{min-height:28px;padding:var(--co-spacing-xxs) var(--co-spacing-sm);font-size:var(--co-font-size-12)}.co-input--sm .co-input__field{min-height:32px;padding:var(--co-spacing-xs) var(--co-spacing-sm);font-size:var(--co-font-size-14)}.co-input--lg .co-input__field{min-height:48px;padding:var(--co-spacing-sm) var(--co-spacing-lg);font-size:var(--co-font-size-16)}.co-input--has-action .co-input__field{border-radius:var(--co-border-radius-xs) 0 0 var(--co-border-radius-xs);border-right:none}.co-input__field ::slotted([slot="action"]){margin-left:auto;margin-right:calc(-1 * var(--co-spacing-md));margin-top:calc(-1 * var(--co-spacing-sm2));margin-bottom:calc(-1 * var(--co-spacing-sm2));border-radius:0 var(--co-border-radius-xs) var(--co-border-radius-xs) 0;flex-shrink:0}.co-input__field ::slotted([slot="chips"]){display:flex;gap:var(--co-spacing-xxs);align-items:center;flex-wrap:wrap;min-width:0}.co-input__input-wrapper{flex:1;display:flex;align-items:center;min-width:0;min-height:24px;padding:var(--co-spacing-xxs) 0}.co-input__native{width:100%;border:none;outline:none;background:transparent;font-family:inherit;font-size:inherit;font-weight:400;letter-spacing:inherit;line-height:1;color:var(--co-semantic-text-default);padding:0;margin:0}.co-input__native::placeholder{color:var(--co-semantic-text-muted)}.co-input__icon{flex-shrink:0;color:var(--co-semantic-text-muted);display:flex;align-items:center}.co-input__clear{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:16px;padding:0;margin:0;border:none;background:transparent;cursor:pointer;color:var(--co-semantic-text-muted);transition:color 0.15s ease}.co-input__clear--hidden{visibility:hidden;pointer-events:none}.co-input__clear:hover{color:var(--co-semantic-text-default)}.co-input__action{display:flex;align-items:center;gap:var(--co-spacing-sm);padding:var(--co-spacing-sm2) var(--co-spacing-md) var(--co-spacing-sm2) var(--co-spacing-sm2);background:var(--co-semantic-surface-primary);color:var(--co-semantic-on-primary);border:none;border-radius:0 var(--co-border-radius-xs) var(--co-border-radius-xs) 0;cursor:pointer;font-family:var(--co-font-family-primary);font-size:var(--co-font-size-14);font-weight:400;letter-spacing:var(--co-font-letter-spacing-body);line-height:1;white-space:nowrap;flex-shrink:0;transition:opacity 0.15s ease;box-sizing:border-box}.co-input__action:hover{opacity:0.85}.co-input__action:disabled{opacity:0.4;cursor:not-allowed}.co-input__action-icon{display:flex;align-items:center;flex-shrink:0}.co-input__action-label{display:flex;align-items:center}.co-input__helper{display:flex;align-items:center;gap:var(--co-spacing-xs);padding:0 var(--co-spacing-xs)}.co-input__helper-icon{flex-shrink:0;color:var(--co-semantic-text-muted);display:flex;align-items:center}.co-input__helper-text{color:var(--co-semantic-text-muted);font-size:var(--co-font-size-14);font-weight:400;line-height:1;letter-spacing:var(--co-font-letter-spacing-body)}.co-input--focused .co-input__field{border-color:var(--co-semantic-border-focus);box-shadow:0 0 0 2px var(--co-semantic-border-focus-ring)}.co-input--disabled .co-input__labels .co-input__label,.co-input--disabled .co-input__labels .co-input__secondary-label{color:var(--co-semantic-text-disabled)}.co-input--disabled .co-input__field{background:var(--co-semantic-surface-disabled);border-color:transparent;cursor:not-allowed}.co-input--disabled .co-input__native{color:var(--co-semantic-text-disabled);cursor:not-allowed}.co-input--disabled .co-input__native::placeholder{color:var(--co-semantic-text-disabled)}.co-input--disabled .co-input__icon{color:var(--co-semantic-text-disabled)}.co-input__status-icon{flex-shrink:0;display:flex;align-items:center}.co-input--success .co-input__status-icon{color:var(--co-semantic-status-success)}.co-input--error .co-input__status-icon{color:var(--co-semantic-status-error)}.co-input--warning .co-input__status-icon{color:var(--co-color-status-review)}.co-input--info .co-input__status-icon{color:var(--co-semantic-status-info)}.co-input--error .co-input__field{border-color:var(--co-semantic-status-error)}.co-input--error.co-input--focused .co-input__field{border-color:var(--co-semantic-status-error);box-shadow:0 0 0 2px rgba(170, 46, 27, 0.12)}.co-input__helper--error .co-input__helper-icon,.co-input__helper--error .co-input__helper-text{color:var(--co-semantic-status-error)}.co-input--success .co-input__field{border-color:var(--co-semantic-status-success)}.co-input--success.co-input--focused .co-input__field{border-color:var(--co-semantic-status-success);box-shadow:0 0 0 2px rgba(10, 119, 36, 0.12)}.co-input__helper--success .co-input__helper-icon,.co-input__helper--success .co-input__helper-text{color:var(--co-semantic-status-success)}.co-input--warning .co-input__field{border-color:var(--co-color-status-review)}.co-input--warning.co-input--focused .co-input__field{border-color:var(--co-color-status-review);box-shadow:0 0 0 2px rgba(133, 87, 31, 0.12)}.co-input__helper--warning .co-input__helper-icon,.co-input__helper--warning .co-input__helper-text{color:var(--co-color-status-review)}.co-input--info .co-input__field{border-color:var(--co-semantic-status-info)}.co-input--info.co-input--focused .co-input__field{border-color:var(--co-semantic-status-info);box-shadow:0 0 0 2px rgba(45, 108, 197, 0.12)}.co-input__helper--info .co-input__helper-icon,.co-input__helper--info .co-input__helper-text{color:var(--co-semantic-status-info)}.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)')}`;
|
|
4
|
+
const coInputCss = () => `: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-input{display:flex;flex-direction:column;gap:var(--co-spacing-sm2)}:host([layout='horizontal']) .co-input{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-input__labels{grid-column:1;grid-row:1;padding-top:var(--co-spacing-sm2);min-width:0}:host([layout='horizontal']) .co-input__label{white-space:normal}:host([layout='horizontal']) .co-input>:not(.co-input__labels){grid-column:2;min-width:0}.co-input__labels{display:flex;align-items:center;justify-content:space-between;padding:0 var(--co-spacing-xs);gap:var(--co-spacing-sm2)}.co-input__label{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);font-weight:400;letter-spacing:var(--co-font-letter-spacing-body);line-height:1;white-space:nowrap;cursor:default}.co-input__secondary-label{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);font-weight:400;letter-spacing:var(--co-font-letter-spacing-body);line-height:1;white-space:nowrap;text-align:right}.co-input__field-row{display:flex;align-items:stretch}.co-input__field{display:flex;align-items:center;gap:var(--co-spacing-sm2);padding:var(--co-spacing-sm2) var(--co-spacing-md);background:color-mix(in srgb, var(--co-semantic-surface-secondary) 55%, transparent);-webkit-backdrop-filter:blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate));backdrop-filter:blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate));border:1px solid var(--co-semantic-border-subtle);border-radius:var(--co-border-radius-xs);transition:border-color 0.15s ease, box-shadow 0.15s ease;min-height:40px;box-sizing:border-box;overflow:hidden;flex:1;min-width:0}.co-input--s .co-input__field{min-height:28px;padding:var(--co-spacing-xxs) var(--co-spacing-sm);font-size:var(--co-font-size-12)}.co-input--sm .co-input__field{min-height:32px;padding:var(--co-spacing-xs) var(--co-spacing-sm);font-size:var(--co-font-size-14)}.co-input--lg .co-input__field{min-height:48px;padding:var(--co-spacing-sm) var(--co-spacing-lg);font-size:var(--co-font-size-16)}.co-input--has-action .co-input__field{border-radius:var(--co-border-radius-xs) 0 0 var(--co-border-radius-xs);border-right:none}.co-input__field ::slotted([slot="action"]){margin-left:auto;margin-right:calc(-1 * var(--co-spacing-md));margin-top:calc(-1 * var(--co-spacing-sm2));margin-bottom:calc(-1 * var(--co-spacing-sm2));border-radius:0 var(--co-border-radius-xs) var(--co-border-radius-xs) 0;flex-shrink:0}.co-input__field ::slotted([slot="chips"]){display:flex;gap:var(--co-spacing-xxs);align-items:center;flex-wrap:wrap;min-width:0}.co-input__input-wrapper{flex:1;display:flex;align-items:center;min-width:0;min-height:24px;padding:var(--co-spacing-xxs) 0}.co-input__native{width:100%;border:none;outline:none;background:transparent;font-family:inherit;font-size:inherit;font-weight:400;letter-spacing:inherit;line-height:1;color:var(--co-semantic-text-default);padding:0;margin:0}.co-input__native::placeholder{color:var(--co-semantic-text-muted)}.co-input__icon{flex-shrink:0;color:var(--co-semantic-text-muted);display:flex;align-items:center}.co-input__clear{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:16px;padding:0;margin:0;border:none;background:transparent;cursor:pointer;color:var(--co-semantic-text-muted);transition:color 0.15s ease}.co-input__clear--hidden{visibility:hidden;pointer-events:none}.co-input__clear:hover{color:var(--co-semantic-text-default)}.co-input__action{display:flex;align-items:center;gap:var(--co-spacing-sm);padding:var(--co-spacing-sm2) var(--co-spacing-md) var(--co-spacing-sm2) var(--co-spacing-sm2);background:var(--co-semantic-surface-primary);color:var(--co-semantic-on-primary);border:none;border-radius:0 var(--co-border-radius-xs) var(--co-border-radius-xs) 0;cursor:pointer;font-family:var(--co-font-family-primary);font-size:var(--co-font-size-14);font-weight:400;letter-spacing:var(--co-font-letter-spacing-body);line-height:1;white-space:nowrap;flex-shrink:0;transition:opacity 0.15s ease;box-sizing:border-box}.co-input__action:hover{opacity:0.85}.co-input__action:disabled{opacity:0.4;cursor:not-allowed}.co-input__action-icon{display:flex;align-items:center;flex-shrink:0}.co-input__action-label{display:flex;align-items:center}.co-input__helper{display:flex;align-items:center;gap:var(--co-spacing-xs);padding:0 var(--co-spacing-xs)}.co-input__helper-icon{flex-shrink:0;color:var(--co-semantic-text-muted);display:flex;align-items:center}.co-input__helper-text{color:var(--co-semantic-text-muted);font-size:var(--co-font-size-14);font-weight:400;line-height:1;letter-spacing:var(--co-font-letter-spacing-body)}.co-input--focused .co-input__field{border-color:var(--co-semantic-border-focus);box-shadow:0 0 0 2px var(--co-semantic-border-focus-ring)}.co-input--disabled .co-input__labels .co-input__label,.co-input--disabled .co-input__labels .co-input__secondary-label{color:var(--co-semantic-text-disabled)}.co-input--disabled .co-input__field{background:var(--co-semantic-surface-disabled);border-color:transparent;cursor:not-allowed}.co-input--disabled .co-input__native{color:var(--co-semantic-text-disabled);cursor:not-allowed}.co-input--disabled .co-input__native::placeholder{color:var(--co-semantic-text-disabled)}.co-input--disabled .co-input__icon{color:var(--co-semantic-text-disabled)}.co-input__status-icon{flex-shrink:0;display:flex;align-items:center}.co-input--success .co-input__status-icon{color:var(--co-semantic-status-success)}.co-input--error .co-input__status-icon{color:var(--co-semantic-status-error)}.co-input--warning .co-input__status-icon{color:var(--co-color-status-review)}.co-input--info .co-input__status-icon{color:var(--co-semantic-status-info)}.co-input--error .co-input__field{border-color:var(--co-semantic-status-error)}.co-input--error.co-input--focused .co-input__field{border-color:var(--co-semantic-status-error);box-shadow:0 0 0 2px rgba(170, 46, 27, 0.12)}.co-input__helper--error .co-input__helper-icon,.co-input__helper--error .co-input__helper-text{color:var(--co-semantic-status-error)}.co-input--success .co-input__field{border-color:var(--co-semantic-status-success)}.co-input--success.co-input--focused .co-input__field{border-color:var(--co-semantic-status-success);box-shadow:0 0 0 2px rgba(10, 119, 36, 0.12)}.co-input__helper--success .co-input__helper-icon,.co-input__helper--success .co-input__helper-text{color:var(--co-semantic-status-success)}.co-input--warning .co-input__field{border-color:var(--co-color-status-review)}.co-input--warning.co-input--focused .co-input__field{border-color:var(--co-color-status-review);box-shadow:0 0 0 2px rgba(133, 87, 31, 0.12)}.co-input__helper--warning .co-input__helper-icon,.co-input__helper--warning .co-input__helper-text{color:var(--co-color-status-review)}.co-input--info .co-input__field{border-color:var(--co-semantic-status-info)}.co-input--info.co-input--focused .co-input__field{border-color:var(--co-semantic-status-info);box-shadow:0 0 0 2px rgba(45, 108, 197, 0.12)}.co-input__helper--info .co-input__helper-icon,.co-input__helper--info .co-input__helper-text{color:var(--co-semantic-status-info)}.co-field-required{margin-left:2px;color:var(--co-color-status-error)}.co-field-required__caption{margin-left:4px;color:var(--co-semantic-text-muted);font-size:var(--co-font-size-12);font-weight:400}.co-field-required__caption::before{content:var(--co-field-required-text, ' (required)')}@supports not (background: color-mix(in srgb, red, transparent)){.co-input__field{background:var(--co-semantic-surface-secondary)}}`;
|
|
5
5
|
|
|
6
6
|
const CoInput = class {
|
|
7
7
|
constructor(hostRef) {
|
|
@@ -94,7 +94,7 @@ const CoInput = class {
|
|
|
94
94
|
}
|
|
95
95
|
render() {
|
|
96
96
|
const showClear = this.clearable && this.hasValue && !this.disabled && !this.readonly;
|
|
97
|
-
return (h("div", { key: '
|
|
97
|
+
return (h("div", { key: '3c628ddcc708f39637038f25118918fbe0f9cff2', class: {
|
|
98
98
|
'co-input': true,
|
|
99
99
|
[`co-input--${this.layout}`]: true,
|
|
100
100
|
[`co-input--${this.size}`]: true,
|
|
@@ -103,10 +103,10 @@ const CoInput = class {
|
|
|
103
103
|
'co-input--filled': this.hasValue,
|
|
104
104
|
[`co-input--${this.status}`]: this.status !== 'default',
|
|
105
105
|
'co-input--has-action': this.hasAction,
|
|
106
|
-
}, part: "wrapper" }, (this.label || this.secondaryLabel) && (h("div", { key: '
|
|
106
|
+
}, part: "wrapper" }, (this.label || this.secondaryLabel) && (h("div", { key: '89513c64c7d590c77159f6a983ed4973289be0d2', class: "co-input__labels" }, this.label && h("label", { key: '4a0874ec1828c5a19ef87c23878d2317f3d441df', class: "co-input__label", part: "label" }, this.label, h(RequiredMark, { key: 'e7a72a5c861923f43968ad95a6c47b46ae13b9ed', required: this.required })), this.secondaryLabel && (h("span", { key: '87911501ccb15a2bd4ef4e58e3537bc968e0f0d2', class: "co-input__secondary-label", part: "secondary-label" }, this.secondaryLabel)))), h("div", { key: '0c1a530d1a687798f0803564be36409b23d5a1fd', class: "co-input__field-row" }, h("div", { key: 'bb731973f9406d649c3aff55071bd50fd7ebc991', class: "co-input__field", part: "field" }, this.iconLeft && (h("co-icon", { key: '4d244ba725651414653c531e3017f8d3a6ccbfd4', name: this.iconLeft, size: 16, class: "co-input__icon co-input__icon--left" })), h("slot", { key: '9c2c242a1887a05c4fcc88dbbb99c86ce0b5113f', name: "chips" }), h("div", { key: '8568e8abdc2c37b565b2446126638b43a649d721', class: "co-input__input-wrapper" }, h("input", { key: '6f311f448b23a936e1da7fe547e7510e236bcf99', ref: (el) => (this.inputEl = el), class: "co-input__native", type: this.type, name: this.name, value: this.value, placeholder: this.placeholder, disabled: this.disabled, readOnly: this.readonly, required: this.required, autoComplete: this.autocomplete, onInput: this.handleInput, onChange: this.handleChange, onFocus: this.handleFocus, onBlur: this.handleBlur, onKeyDown: this.handleKeyDown, part: "input" })), this.clearable && (h("button", { key: '5826d5d68a03b1cec942a004578f969920a13609', class: {
|
|
107
107
|
'co-input__clear': true,
|
|
108
108
|
'co-input__clear--hidden': !showClear,
|
|
109
|
-
}, type: "button", tabIndex: -1, onClick: this.handleClear, "aria-label": "Clear input", part: "clear" }, h("co-icon", { key: '
|
|
109
|
+
}, type: "button", tabIndex: -1, onClick: this.handleClear, "aria-label": "Clear input", part: "clear" }, h("co-icon", { key: 'b987c7ceeb51c7a2bde1a53b6e80484b1fe2ff90', name: "x-circle", size: 16, weight: "fill" }))), this.iconRight && (h("co-icon", { key: '07e2d8f0ffca417ed82d95b97cf42efaf24212e9', name: this.iconRight, size: 16, class: "co-input__icon co-input__icon--right" })), this.statusFieldIcon && (h("co-icon", { key: '7f1ce796c3d8fda6e3d5b5f63ffa819c6925daef', name: this.statusFieldIcon, size: 16, class: "co-input__status-icon" })), h("slot", { key: '7294036e68f6f2ff1efe57c957765415691b7d21', name: "suffix" }), h("slot", { key: 'ca865d10565b3b1f140b5d23c52781ea71f5f0ae' }), h("slot", { key: '2422fd84d5ce0f4d1c4eacedeaa72ea259cb1580', name: "action" })), this.hasAction && (h("button", { key: '5dd232fc1a449cf73ddda1e06d28c9d8a9dc4a0d', class: "co-input__action", type: "button", onClick: this.handleAction, disabled: this.disabled, part: "action" }, this.actionIcon && (h("co-icon", { key: '7cada4fa70ea0ec79754c5a46a59367ea8c66fad', name: this.actionIcon, size: 16, class: "co-input__action-icon" })), this.actionLabel && (h("span", { key: 'f27e5c1ea7ff1f83714ae5f542558518dc00a937', class: "co-input__action-label" }, this.actionLabel))))), this.helperText && (h("div", { key: 'd806c9e918ac1edac3eb703926c0c405019190e1', class: `co-input__helper co-input__helper--${this.status}`, part: "helper" }, this.helperIcon && (h("co-icon", { key: '80f6b84d4354ccf965596cb9546a531cbbc932e0', name: this.helperIcon, size: 14, class: "co-input__helper-icon" })), h("span", { key: '8f01456c3cfec988ffc6f7c6a03c1ecc43ee4c2c', class: "co-input__helper-text" }, this.helperText)))));
|
|
110
110
|
}
|
|
111
111
|
get el() { return getElement(this); }
|
|
112
112
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, a as getElement } from './index-
|
|
2
|
-
import { R as RequiredMark } from './requiredMark-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, a as getElement } from './index-CYsftTKf.js';
|
|
2
|
+
import { R as RequiredMark } from './requiredMark-CEbXKHcU.js';
|
|
3
3
|
|
|
4
|
-
const coJsonFieldCss = () => `: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-json-field{display:flex;flex-direction:column;gap:var(--co-spacing-sm2)}.co-json-field__labels{display:flex;align-items:center;justify-content:space-between;padding:0 var(--co-spacing-xs);gap:var(--co-spacing-sm2)}.co-json-field__label{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);font-weight:400;letter-spacing:var(--co-font-letter-spacing-body);line-height:1;white-space:nowrap;cursor:default}.co-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)')}.co-json-field__field{display:flex;background:var(--co-semantic-surface-secondary);border:1px solid var(--co-semantic-border-subtle);border-radius:var(--co-border-radius-xs);transition:border-color 0.15s ease, box-shadow 0.15s ease;box-sizing:border-box;overflow:hidden}.co-json-field__native{width:100%;resize:vertical;border:none;outline:none;background:transparent;font-family:var(--co-font-family-mono, monospace);font-size:var(--co-font-size-13, 13px);font-weight:400;line-height:1.5;color:var(--co-semantic-text-default);padding:var(--co-spacing-sm2) var(--co-spacing-md);margin:0;box-sizing:border-box;tab-size:2}.co-json-field__native::placeholder{color:var(--co-semantic-text-muted)}.co-json-field__helper{display:flex;align-items:center;gap:var(--co-spacing-xs);padding:0 var(--co-spacing-xs)}.co-json-field__helper-icon{flex-shrink:0;color:var(--co-semantic-text-muted);display:flex;align-items:center}.co-json-field__helper-text{color:var(--co-semantic-text-muted);font-size:var(--co-font-size-14);font-weight:400;line-height:1;letter-spacing:var(--co-font-letter-spacing-body)}.co-json-field--focused .co-json-field__field{border-color:var(--co-semantic-border-focus);box-shadow:0 0 0 2px var(--co-semantic-border-focus-ring)}.co-json-field--disabled{opacity:0.6;pointer-events:none}.co-json-field--disabled .co-json-field__field{background:var(--co-semantic-surface-disabled);border-color:transparent}.co-json-field--invalid .co-json-field__field,.co-json-field--error .co-json-field__field{border-color:var(--co-semantic-status-error)}.co-json-field--invalid.co-json-field--focused .co-json-field__field,.co-json-field--error.co-json-field--focused .co-json-field__field{border-color:var(--co-semantic-status-error);box-shadow:0 0 0 2px rgba(170, 46, 27, 0.12)}.co-json-field__helper--error .co-json-field__helper-icon,.co-json-field__helper--error .co-json-field__helper-text{color:var(--co-semantic-status-error)}:host([layout='horizontal']) .co-json-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-json-field__labels{grid-column:1;grid-row:1;padding-top:var(--co-spacing-sm2);min-width:0}:host([layout='horizontal']) .co-json-field__label{white-space:normal}:host([layout='horizontal']) .co-json-field>:not(.co-json-field__labels){grid-column:2;min-width:0}`;
|
|
4
|
+
const coJsonFieldCss = () => `: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-json-field{display:flex;flex-direction:column;gap:var(--co-spacing-sm2)}.co-json-field__labels{display:flex;align-items:center;justify-content:space-between;padding:0 var(--co-spacing-xs);gap:var(--co-spacing-sm2)}.co-json-field__label{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);font-weight:400;letter-spacing:var(--co-font-letter-spacing-body);line-height:1;white-space:nowrap;cursor:default}.co-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)')}.co-json-field__field{display:flex;background:color-mix(in srgb, var(--co-semantic-surface-secondary) 55%, transparent);-webkit-backdrop-filter:blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate));backdrop-filter:blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate));border:1px solid var(--co-semantic-border-subtle);border-radius:var(--co-border-radius-xs);transition:border-color 0.15s ease, box-shadow 0.15s ease;box-sizing:border-box;overflow:hidden}.co-json-field__native{width:100%;resize:vertical;border:none;outline:none;background:transparent;font-family:var(--co-font-family-mono, monospace);font-size:var(--co-font-size-13, 13px);font-weight:400;line-height:1.5;color:var(--co-semantic-text-default);padding:var(--co-spacing-sm2) var(--co-spacing-md);margin:0;box-sizing:border-box;tab-size:2}.co-json-field__native::placeholder{color:var(--co-semantic-text-muted)}.co-json-field--s .co-json-field__native{padding:var(--co-spacing-xxs) var(--co-spacing-sm);font-size:var(--co-font-size-12, 12px)}.co-json-field--sm .co-json-field__native{padding:var(--co-spacing-xs) var(--co-spacing-sm)}.co-json-field--lg .co-json-field__native{padding:var(--co-spacing-sm) var(--co-spacing-lg);font-size:var(--co-font-size-14)}.co-json-field__helper{display:flex;align-items:center;gap:var(--co-spacing-xs);padding:0 var(--co-spacing-xs)}.co-json-field__helper-icon{flex-shrink:0;color:var(--co-semantic-text-muted);display:flex;align-items:center}.co-json-field__helper-text{color:var(--co-semantic-text-muted);font-size:var(--co-font-size-14);font-weight:400;line-height:1;letter-spacing:var(--co-font-letter-spacing-body)}.co-json-field--focused .co-json-field__field{border-color:var(--co-semantic-border-focus);box-shadow:0 0 0 2px var(--co-semantic-border-focus-ring)}.co-json-field--disabled{opacity:0.6;pointer-events:none}.co-json-field--disabled .co-json-field__field{background:var(--co-semantic-surface-disabled);border-color:transparent}.co-json-field--invalid .co-json-field__field,.co-json-field--error .co-json-field__field{border-color:var(--co-semantic-status-error)}.co-json-field--invalid.co-json-field--focused .co-json-field__field,.co-json-field--error.co-json-field--focused .co-json-field__field{border-color:var(--co-semantic-status-error);box-shadow:0 0 0 2px rgba(170, 46, 27, 0.12)}.co-json-field__helper--error .co-json-field__helper-icon,.co-json-field__helper--error .co-json-field__helper-text{color:var(--co-semantic-status-error)}:host([layout='horizontal']) .co-json-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-json-field__labels{grid-column:1;grid-row:1;padding-top:var(--co-spacing-sm2);min-width:0}:host([layout='horizontal']) .co-json-field__label{white-space:normal}:host([layout='horizontal']) .co-json-field>:not(.co-json-field__labels){grid-column:2;min-width:0}@supports not (background: color-mix(in srgb, red, transparent)){.co-json-field__field{background:var(--co-semantic-surface-secondary)}}`;
|
|
5
5
|
|
|
6
6
|
const CoJsonField = class {
|
|
7
7
|
constructor(hostRef) {
|
|
@@ -24,6 +24,9 @@ const CoJsonField = class {
|
|
|
24
24
|
this.invalidMessage = 'Invalid JSON';
|
|
25
25
|
/** Label layout: vertical (label above) or horizontal (label beside) */
|
|
26
26
|
this.layout = 'vertical';
|
|
27
|
+
/** Field size (mirrors co-input paddings; mono font scales 12/13/13/14).
|
|
28
|
+
* Vertical extent still comes from `rows`. */
|
|
29
|
+
this.size = 'md';
|
|
27
30
|
/** Raw text in the textarea. */
|
|
28
31
|
this.draft = '';
|
|
29
32
|
/** Internal JSON parse-failure flag. */
|
|
@@ -84,16 +87,17 @@ const CoJsonField = class {
|
|
|
84
87
|
render() {
|
|
85
88
|
const helper = this.internalInvalid ? this.invalidMessage : this.helperText;
|
|
86
89
|
const statusClass = this.status !== 'default' ? `co-json-field--${this.status}` : '';
|
|
87
|
-
return (h("div", { key: '
|
|
90
|
+
return (h("div", { key: '0f1319b6cd930e576dbba45dfb3bbb9050c8a4c0', class: {
|
|
88
91
|
'co-json-field': true,
|
|
89
92
|
'co-json-field--disabled': this.disabled,
|
|
90
93
|
'co-json-field--focused': this.hasFocus,
|
|
91
94
|
'co-json-field--invalid': this.isInvalid,
|
|
95
|
+
[`co-json-field--${this.size}`]: true,
|
|
92
96
|
[statusClass]: !!statusClass,
|
|
93
|
-
}, part: "wrapper" }, this.label && (h("div", { key: '
|
|
97
|
+
}, part: "wrapper" }, this.label && (h("div", { key: '50cfffd0dedb3b091cebadf7b908594d855c1e92', class: "co-json-field__labels" }, h("label", { key: '77410a04bc4ca4f61dd8be107acb159a918f811c', class: "co-json-field__label", part: "label" }, this.label, h(RequiredMark, { key: '21f0c872f95b39e38e16388a0935aebe333640ad', required: this.required })))), h("div", { key: 'f7da7b3e56bc9bb1bfe1759f4e6ea260bd45b19e', class: "co-json-field__field", part: "field" }, h("textarea", { key: '8f5413bb82906a15d83130ca963b771e6539d7f6', class: "co-json-field__native", rows: this.rows, spellcheck: false, autocomplete: "off", value: this.draft, placeholder: this.placeholder, disabled: this.disabled, readOnly: this.readonly, required: this.required, "aria-invalid": this.isInvalid ? 'true' : 'false', "aria-label": !this.label ? 'JSON' : undefined, onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, part: "input" })), this.name && h("input", { key: '5c844c980cafec58d64ff473022ace4b11f10b26', type: "hidden", name: this.name, value: this.draft }), helper && (h("div", { key: 'af8b770be33f336be652e0b6b567a602a59d8e63', class: {
|
|
94
98
|
'co-json-field__helper': true,
|
|
95
99
|
'co-json-field__helper--error': this.isInvalid,
|
|
96
|
-
}, part: "helper" }, this.isInvalid && (h("co-icon", { key: '
|
|
100
|
+
}, part: "helper" }, this.isInvalid && (h("co-icon", { key: '8ed6b6f2444fbf408818b1ac9911f4513c963dee', name: "warning-circle", size: 14, class: "co-json-field__helper-icon" })), h("span", { key: '9282196dfd8f2662c073d7589dd7fd93447101f8', class: "co-json-field__helper-text" }, helper)))));
|
|
97
101
|
}
|
|
98
102
|
get el() { return getElement(this); }
|
|
99
103
|
static get watchers() { return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, a as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, a as getElement } from './index-CYsftTKf.js';
|
|
2
2
|
import { l as langFromLocale } from './dateI18n-C1DCLOEl.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -312,17 +312,17 @@ const CoLightbox = class {
|
|
|
312
312
|
const counter = s.counter
|
|
313
313
|
.replace('{i}', String(this.index + 1))
|
|
314
314
|
.replace('{n}', String(imgs.length));
|
|
315
|
-
return (h("div", { key: '
|
|
315
|
+
return (h("div", { key: 'bfffaae28680b214a562aa3c3ec52aaf16a61571', class: { 'co-lightbox': true, 'co-lightbox--open': this.open }, part: "overlay", role: "dialog", "aria-modal": "true", "aria-label": img === null || img === void 0 ? void 0 : img.alt, onClick: this.requestClose }, img && (h("div", { key: 'e1bed6448e4878d0e459bdda89d1da98712d8207', class: "co-lightbox__toolbar", part: "toolbar", onClick: this.stop }, h("span", { key: '7ff4d35aaa6c4207c2b623951f14802278e1c631', class: "co-lightbox__caption", title: img.alt }, img.alt), h("div", { key: 'bf369f9204faf17c9047c339d893933159078714', class: "co-lightbox__zoom" }, h("button", { key: '94aa9ab08f21bf7d9e77e4ad31325cd13a80bb4d', class: "co-lightbox__btn", type: "button", "aria-label": s.zoomOut, title: s.zoomOut, onClick: () => this.zoomAt(this.scale / WHEEL_FACTOR, 0, 0) }, h("co-icon", { key: 'd04c038ec26081190c67eedcccf8e4c61c8cf6d7', name: "minus", size: 16 })), h("button", { key: 'd4333d0c970e71012786915be49be6c0efada12f', class: "co-lightbox__btn co-lightbox__zoom-value", type: "button", "aria-label": s.zoomReset, title: s.zoomReset, onClick: () => this.resetView() }, Math.round(this.scale * 100), "%"), h("button", { key: 'b9efbf3e3912fb557eba59cce0300468a8e86861', class: "co-lightbox__btn", type: "button", "aria-label": s.zoomIn, title: s.zoomIn, onClick: () => this.zoomAt(this.scale * WHEEL_FACTOR, 0, 0) }, h("co-icon", { key: '1d56f6fca5858ba8413f378bc6ac63870663143a', name: "plus", size: 16 }))), h("button", { key: '0fc6adbb0b1c80cb2e8da9eb09dfe107349a59cf', class: "co-lightbox__btn", type: "button", "aria-label": s.openOriginal, title: s.openOriginal, onClick: this.openOriginal }, h("co-icon", { key: 'b1151b279b700caa0712ff74b09c0440d4b37dd4', name: "arrow-square-out", size: 16 })), h("button", { key: '984f9d2b9498d9715dabff254d2f3da9a42d9172', class: "co-lightbox__btn", part: "close", type: "button", "aria-label": s.close, title: s.close, ref: (el) => (this.closeBtnEl = el), onClick: this.requestClose }, h("co-icon", { key: '054e307f9116c8dca66412ae54dfee8e3a86da9b', name: "x", size: 16 })))), img && (h("div", { key: 'cd21ae63400375474fca02ebf77c35d4b4fd8b55', class: "co-lightbox__stage", ref: (el) => (this.stageEl = el), onWheel: this.handleWheel }, h("img", { key: 'b33b767ba92e4a1ed685409b1a96acc98767c4f7', class: {
|
|
316
316
|
'co-lightbox__img': true,
|
|
317
317
|
'co-lightbox__img--zoomed': this.scale > MIN_SCALE,
|
|
318
318
|
'co-lightbox__img--dragging': this.dragging,
|
|
319
|
-
}, part: "image", ref: (el) => (this.imgEl = el), src: img.src, alt: img.alt || '', draggable: false, style: { transform: `translate(${this.tx}px, ${this.ty}px) scale(${this.scale})` }, onClick: this.stop, onDblClick: this.handleDblClick, onPointerDown: this.handlePointerDown, onPointerMove: this.handlePointerMove, onPointerUp: this.handlePointerUp, onPointerCancel: this.handlePointerUp }))), img && multi && (h("button", { key: '
|
|
319
|
+
}, part: "image", ref: (el) => (this.imgEl = el), src: img.src, alt: img.alt || '', draggable: false, style: { transform: `translate(${this.tx}px, ${this.ty}px) scale(${this.scale})` }, onClick: this.stop, onDblClick: this.handleDblClick, onPointerDown: this.handlePointerDown, onPointerMove: this.handlePointerMove, onPointerUp: this.handlePointerUp, onPointerCancel: this.handlePointerUp }))), img && multi && (h("button", { key: '0b35f47557bf3e05db3c98e0df2c6e8d6f5cef94', class: "co-lightbox__nav co-lightbox__nav--prev", part: "prev", type: "button", "aria-label": s.prevImage, title: s.prevImage, onClick: (e) => {
|
|
320
320
|
e.stopPropagation();
|
|
321
321
|
this.goTo(-1);
|
|
322
|
-
} }, h("co-icon", { key: '
|
|
322
|
+
} }, h("co-icon", { key: 'f84159324fe97c957f0e8b2f0b92f865f180f7ed', name: "caret-left", size: 24 }))), img && multi && (h("button", { key: '7c1a9f250bb4b881112a57a2f3455b3c82fc77cc', class: "co-lightbox__nav co-lightbox__nav--next", part: "next", type: "button", "aria-label": s.nextImage, title: s.nextImage, onClick: (e) => {
|
|
323
323
|
e.stopPropagation();
|
|
324
324
|
this.goTo(1);
|
|
325
|
-
} }, h("co-icon", { key: '
|
|
325
|
+
} }, h("co-icon", { key: '00efc2dd2e09c2dc1df35b6317e5bc42a63b2c20', name: "caret-right", size: 24 }))), img && multi && (h("div", { key: '7b148b3a2a1c3032c037439293b2b4c6e0100c52', class: "co-lightbox__counter", part: "counter", onClick: this.stop }, counter))));
|
|
326
326
|
}
|
|
327
327
|
get el() { return getElement(this); }
|
|
328
328
|
static get watchers() { return {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-CYsftTKf.js';
|
|
2
|
+
|
|
3
|
+
const coListFooterCss = () => `:host{display:block}.co-list-footer{display:flex;gap:var(--co-spacing-sm2);padding-top:var(--co-spacing-sm2)}.co-list-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-list-footer__btn:hover{opacity:0.85}.co-list-footer__btn:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:2px}.co-list-footer__btn--secondary{background:transparent;color:var(--co-semantic-text-default);border:1px solid var(--co-semantic-border-default)}.co-list-footer__btn--primary{background:var(--co-semantic-surface-primary);color:var(--co-semantic-on-primary);border:none}`;
|
|
4
|
+
|
|
5
|
+
const CoListFooter = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this.coPrimary = createEvent(this, "coPrimary", 7);
|
|
9
|
+
this.coSecondary = createEvent(this, "coSecondary", 7);
|
|
10
|
+
/** Primary action leading icon (Phosphor). Set to '' to hide the icon. */
|
|
11
|
+
this.primaryIcon = 'plus';
|
|
12
|
+
/** Secondary action leading icon (Phosphor). Set to '' to hide the icon. */
|
|
13
|
+
this.secondaryIcon = 'plus';
|
|
14
|
+
this.handlePrimary = () => this.coPrimary.emit();
|
|
15
|
+
this.handleSecondary = () => this.coSecondary.emit();
|
|
16
|
+
}
|
|
17
|
+
render() {
|
|
18
|
+
return (h("div", { key: '408e27a26e9d2d1802ba336690c84c745a79a22d', class: "co-list-footer", part: "footer" }, this.secondaryLabel && (h("button", { key: '9a597df6466ebf5c5720b50d0d4d2993ba3af9ab', class: "co-list-footer__btn co-list-footer__btn--secondary", type: "button", onClick: this.handleSecondary }, this.secondaryIcon && h("co-icon", { key: 'c743c1399b14d175c51ea553d508110e8bcaef05', name: this.secondaryIcon, size: 16 }), h("span", { key: '3c32ad1ea326da99debeb716980b38cf9777b168' }, this.secondaryLabel))), this.primaryLabel && (h("button", { key: 'ce57a3fe3456d4cd3959d556304de9de7558ec40', class: "co-list-footer__btn co-list-footer__btn--primary", type: "button", onClick: this.handlePrimary }, this.primaryIcon && h("co-icon", { key: '584416793ecbf91a960b2b55f54e703ba1d0ca5c', name: this.primaryIcon, size: 16 }), h("span", { key: 'f227d58236ab0f4d31b398cfc9bf7419efd57d02' }, this.primaryLabel))), h("slot", { key: '601ef71ed5374dab62a79ad875da9b6f7a0fcfed' })));
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
CoListFooter.style = coListFooterCss();
|
|
22
|
+
|
|
23
|
+
export { CoListFooter as co_list_footer };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, a as getElement } from './index-CYsftTKf.js';
|
|
2
2
|
|
|
3
|
-
const coListItemCss = () => `:host{display:block}.co-list-item{display:flex;align-items:center;gap:var(--co-spacing-md);padding:var(--co-spacing-md) var(--co-spacing-lg);font-family:var(--co-font-family-primary);cursor:pointer;border-radius:var(--co-border-radius-sm);transition:background 0.1s ease;box-sizing:border-box;min-height:40px}.co-list-item--dense{gap:var(--co-spacing-sm);padding:6px var(--co-spacing-sm);border-radius:var(--co-border-radius-xxs);min-height:32px}.co-list-item--dense .co-list-item__label{font-size:var(--co-font-size-14)}.co-list-item:hover:not(.co-list-item--disabled){background:var(--co-semantic-surface-hover)}.co-list-item:focus-visible{outline:none;box-shadow:0 0 0 2px var(--co-semantic-border-focus)}.co-list-item--selected{background:var(--co-semantic-surface-muted)}.co-list-item--disabled{opacity:0.4;cursor:not-allowed}.co-list-item__prefix,.co-list-item__suffix{display:flex;align-items:center;gap:var(--co-spacing-sm);flex-shrink:0;color:var(--co-semantic-text-muted)}.co-list-item__prefix:empty,.co-list-item__suffix:empty{display:none}.co-list-item__content{display:flex;flex-direction:column;flex:1;min-width:0}.co-list-item__label{font-size:var(--co-font-size-14);font-weight:400;color:var(--co-semantic-text-default);line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.co-list-item__description{font-size:var(--co-font-size-12);color:var(--co-semantic-text-muted);line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}`;
|
|
3
|
+
const coListItemCss = () => `:host{display:block}.co-list-item{display:flex;align-items:center;gap:var(--co-spacing-md);padding:var(--co-spacing-md) var(--co-spacing-lg);font-family:var(--co-font-family-primary);cursor:pointer;border-radius:var(--co-border-radius-sm);transition:background 0.1s ease;box-sizing:border-box;min-height:40px}.co-list-item--dense{gap:var(--co-spacing-sm);padding:6px var(--co-spacing-sm);border-radius:var(--co-border-radius-xxs);min-height:32px}.co-list-item--dense .co-list-item__label{font-size:var(--co-font-size-14)}.co-list-item:hover:not(.co-list-item--disabled){background:var(--co-semantic-surface-hover)}.co-list-item:focus-visible{outline:none;box-shadow:0 0 0 2px var(--co-semantic-border-focus)}.co-list-item--selected{background:var(--co-semantic-surface-muted)}.co-list-item--disabled{opacity:0.4;cursor:not-allowed}.co-list-item__prefix,.co-list-item__suffix{display:flex;align-items:center;gap:var(--co-spacing-sm);flex-shrink:0;color:var(--co-semantic-text-muted)}.co-list-item__prefix:empty,.co-list-item__suffix:empty{display:none}.co-list-item__content{display:flex;flex-direction:column;flex:1;min-width:0}.co-list-item__content>.co-list-item__tip{min-width:0;max-width:100%}.co-list-item__label{display:block;font-size:var(--co-font-size-14);font-weight:400;color:var(--co-semantic-text-default);line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.co-list-item__description{display:block;font-size:var(--co-font-size-12);color:var(--co-semantic-text-muted);line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}`;
|
|
4
4
|
|
|
5
5
|
const CoListItem = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -13,6 +13,21 @@ const CoListItem = class {
|
|
|
13
13
|
/** Compact variant — tighter padding + smaller radius for dropdowns / menus
|
|
14
14
|
* (the default size is tuned for sidebar nav rows). */
|
|
15
15
|
this.dense = false;
|
|
16
|
+
/** Whether the label / description is currently ellipsis-truncated (drives the tooltip). */
|
|
17
|
+
this.labelTruncated = false;
|
|
18
|
+
this.descTruncated = false;
|
|
19
|
+
// Drives co-tooltip's `disabled`: show the full-text tooltip ONLY when the
|
|
20
|
+
// label / description is actually ellipsis-truncated. Guarded writes prevent
|
|
21
|
+
// a render loop; read synchronously, so it's correct before co-tooltip reads
|
|
22
|
+
// `disabled` on the trigger's mouseenter.
|
|
23
|
+
this.measureTruncation = () => {
|
|
24
|
+
const l = this.labelEl ? this.labelEl.scrollWidth > this.labelEl.clientWidth + 1 : false;
|
|
25
|
+
const d = this.descEl ? this.descEl.scrollWidth > this.descEl.clientWidth + 1 : false;
|
|
26
|
+
if (l !== this.labelTruncated)
|
|
27
|
+
this.labelTruncated = l;
|
|
28
|
+
if (d !== this.descTruncated)
|
|
29
|
+
this.descTruncated = d;
|
|
30
|
+
};
|
|
16
31
|
this.handleClick = () => {
|
|
17
32
|
if (this.disabled)
|
|
18
33
|
return;
|
|
@@ -29,15 +44,56 @@ const CoListItem = class {
|
|
|
29
44
|
}
|
|
30
45
|
};
|
|
31
46
|
}
|
|
47
|
+
componentDidLoad() {
|
|
48
|
+
// A ResizeObserver re-measures when the row gets its real width — e.g. a
|
|
49
|
+
// top-layer popover panel going from display:none to shown (where a one-shot
|
|
50
|
+
// load-time measure would read 0) — and on any later resize.
|
|
51
|
+
if (typeof ResizeObserver !== 'undefined') {
|
|
52
|
+
this.ro = new ResizeObserver(() => this.measureTruncation());
|
|
53
|
+
if (this.labelEl)
|
|
54
|
+
this.ro.observe(this.labelEl);
|
|
55
|
+
if (this.descEl)
|
|
56
|
+
this.ro.observe(this.descEl);
|
|
57
|
+
}
|
|
58
|
+
this.measureTruncation();
|
|
59
|
+
}
|
|
60
|
+
disconnectedCallback() {
|
|
61
|
+
var _a;
|
|
62
|
+
(_a = this.ro) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
63
|
+
this.ro = undefined;
|
|
64
|
+
}
|
|
65
|
+
// A width-stable text swap (same column, new text) won't trip the
|
|
66
|
+
// ResizeObserver — re-measure on prop change; rAF so the DOM holds the new
|
|
67
|
+
// text first.
|
|
68
|
+
onTextChange() {
|
|
69
|
+
requestAnimationFrame(this.measureTruncation);
|
|
70
|
+
}
|
|
32
71
|
render() {
|
|
33
|
-
return (h("div", { key: '
|
|
72
|
+
return (h("div", { key: '984e2c7fcb5f4124c871dda103e450b858143c0f', class: {
|
|
34
73
|
'co-list-item': true,
|
|
35
74
|
'co-list-item--selected': this.selected,
|
|
36
75
|
'co-list-item--disabled': this.disabled,
|
|
37
76
|
'co-list-item--dense': this.dense,
|
|
38
77
|
'co-list-item--has-description': !!this.description,
|
|
39
|
-
}, part: "item", role: "option", tabindex: this.disabled ? -1 : 0, "aria-selected": this.selected ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', onClick: this.handleClick, onKeyDown: this.handleKeyDown }, h("span", { key: '
|
|
78
|
+
}, part: "item", role: "option", tabindex: this.disabled ? -1 : 0, "aria-selected": this.selected ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', onClick: this.handleClick, onKeyDown: this.handleKeyDown }, h("span", { key: 'd1a3466d6ecc565435d3918a596bc7620cce2197', class: "co-list-item__prefix" }, this.icon && h("co-icon", { key: '2374265eac83fb8d86ee26ab3317da2c2c9d2998', name: this.icon, size: 18 }), h("slot", { key: '6bb538d2212c2bd25d61c54a59120295ff55692b', name: "prefix" })), h("div", { key: '052ed53fb59580780a0d1c2b1dbdff7711fbb585', class: "co-list-item__content" }, this.label && (h("co-tooltip", { key: '027cb3026c0ac2efdfb76f7eeb9600d21899e865', block: true, class: "co-list-item__tip", content: this.label, placement: "top", disabled: !this.labelTruncated }, h("span", { key: '3b27db5590486bab2c4b8819548dbb13c332a13b', class: "co-list-item__label", ref: (el) => {
|
|
79
|
+
this.labelEl = el;
|
|
80
|
+
if (el && this.ro)
|
|
81
|
+
this.ro.observe(el);
|
|
82
|
+
} }, this.label))), this.description && (h("co-tooltip", { key: '220243aafd77d681315f0847cb3db72110330b7e', block: true, class: "co-list-item__tip", content: this.description, placement: "top", disabled: !this.descTruncated }, h("span", { key: 'fb8543457be7e67c7eca8461f207dad833503462', class: "co-list-item__description", ref: (el) => {
|
|
83
|
+
this.descEl = el;
|
|
84
|
+
if (el && this.ro)
|
|
85
|
+
this.ro.observe(el);
|
|
86
|
+
} }, this.description))), h("slot", { key: 'ed7e997155bec808ef01c6300109f435a5e698b1' })), h("span", { key: '1601e81a0d25f685b69ebea30a13b1dac9337866', class: "co-list-item__suffix" }, h("slot", { key: 'f23ac07bc12c9a02810574bcb30b2a323b07b3ee', name: "suffix" }))));
|
|
40
87
|
}
|
|
88
|
+
get el() { return getElement(this); }
|
|
89
|
+
static get watchers() { return {
|
|
90
|
+
"label": [{
|
|
91
|
+
"onTextChange": 0
|
|
92
|
+
}],
|
|
93
|
+
"description": [{
|
|
94
|
+
"onTextChange": 0
|
|
95
|
+
}]
|
|
96
|
+
}; }
|
|
41
97
|
};
|
|
42
98
|
CoListItem.style = coListItemCss();
|
|
43
99
|
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
import { r as registerInstance, h, c as createEvent, a as getElement } from './index-CYsftTKf.js';
|
|
2
|
+
import { a as afterEventFor } from './overlayAfterClose-Ch1jfwZ2.js';
|
|
3
|
+
|
|
4
|
+
const coLoaderCss = () => `:host{display:contents;--co-loader-ball:15px;--co-loader-step:25px;--co-loader-text:var(--co-font-size-14);--co-loader-gap:10px}:host([size="sm"]){--co-loader-ball:8px;--co-loader-step:14px;--co-loader-text:var(--co-font-size-12);--co-loader-gap:6px}:host([size="lg"]){--co-loader-ball:20px;--co-loader-step:33px;--co-loader-gap:12px}.co-loader{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--co-loader-gap)}.co-loader--overlay{position:absolute;inset:0;background:rgba(255, 255, 255, 0.72);z-index:10}.co-loader__balls{position:relative;width:calc(var(--co-loader-step) * 3);height:var(--co-loader-ball)}.co-loader__ball{position:absolute;width:var(--co-loader-ball);height:var(--co-loader-ball);border-radius:50%;animation:co-loader-bounce 2s infinite cubic-bezier(0.28, 0.84, 0.42, 1)}.co-loader__ball--blue{background-color:#4285f4}.co-loader__ball--yellow{background-color:#fdbd00;animation-delay:0.4s}.co-loader__ball--red{background-color:#d4145a;animation-delay:0.8s}.co-loader__text{margin:0;font-family:var(--co-font-family-primary);font-size:var(--co-loader-text);color:var(--co-semantic-text-secondary);text-align:center;white-space:pre-line}@keyframes co-loader-bounce{0%,100%{transform:translateX(0) scale(1)}25%{transform:translateX(var(--co-loader-step)) scale(1.2)}50%{transform:translateX(calc(var(--co-loader-step) * 2)) scale(0.8)}75%{transform:translateX(var(--co-loader-step)) scale(1.2)}}@media (prefers-reduced-motion: reduce){.co-loader__ball{animation:none}.co-loader__ball--blue{transform:translateX(0)}.co-loader__ball--yellow{transform:translateX(var(--co-loader-step))}.co-loader__ball--red{transform:translateX(calc(var(--co-loader-step) * 2))}}`;
|
|
5
|
+
|
|
6
|
+
const CoLoader = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
/** Show the loader. When false the component renders nothing so it doesn't
|
|
10
|
+
* hold layout space or run animations while hidden. */
|
|
11
|
+
this.visible = true;
|
|
12
|
+
/** Render as an absolute-positioned overlay over the nearest positioned
|
|
13
|
+
* ancestor. When false (default) the loader is inline. */
|
|
14
|
+
this.overlay = false;
|
|
15
|
+
/** Size of the ball animation. `sm` ~42px wide for tight UI like dropdown
|
|
16
|
+
* bodies; `md` (default) ~75px for drawers/boot; `lg` ~100px for big
|
|
17
|
+
* empty screens. */
|
|
18
|
+
this.size = 'md';
|
|
19
|
+
/** Optional text label below the balls. Multi-line is supported. */
|
|
20
|
+
this.text = '';
|
|
21
|
+
/** CSS color for the overlay backdrop. Only applied when `overlay=true`. */
|
|
22
|
+
this.background = '';
|
|
23
|
+
}
|
|
24
|
+
render() {
|
|
25
|
+
if (!this.visible)
|
|
26
|
+
return null;
|
|
27
|
+
const style = this.overlay && this.background ? { background: this.background } : undefined;
|
|
28
|
+
return (h("div", { class: { 'co-loader': true, 'co-loader--overlay': this.overlay }, style: style, part: "root", role: "status", "aria-live": "polite" }, h("div", { class: "co-loader__balls", part: "balls" }, h("span", { class: "co-loader__ball co-loader__ball--blue" }), h("span", { class: "co-loader__ball co-loader__ball--yellow" }), h("span", { class: "co-loader__ball co-loader__ball--red" })), this.text && h("p", { class: "co-loader__text", part: "text" }, this.text)));
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
CoLoader.style = coLoaderCss();
|
|
32
|
+
|
|
33
|
+
// focusTrap.ts
|
|
34
|
+
//
|
|
35
|
+
// Focus-trap helpers for co-overlay. The Tab-cycling decision is a PURE function
|
|
36
|
+
// (`resolveTabIndex`) so it can be unit-tested in a node env, mirroring the
|
|
37
|
+
// `overlayAfterClose` split. The DOM query lives here too but is only invoked by
|
|
38
|
+
// the component at runtime.
|
|
39
|
+
/** CSS selector matching natively tabbable elements. */
|
|
40
|
+
const FOCUSABLE_SELECTOR = [
|
|
41
|
+
'a[href]',
|
|
42
|
+
'area[href]',
|
|
43
|
+
'button:not([disabled])',
|
|
44
|
+
'input:not([disabled]):not([type="hidden"])',
|
|
45
|
+
'select:not([disabled])',
|
|
46
|
+
'textarea:not([disabled])',
|
|
47
|
+
'iframe',
|
|
48
|
+
'audio[controls]',
|
|
49
|
+
'video[controls]',
|
|
50
|
+
'[contenteditable]:not([contenteditable="false"])',
|
|
51
|
+
'[tabindex]:not([tabindex="-1"])',
|
|
52
|
+
].join(',');
|
|
53
|
+
/**
|
|
54
|
+
* Decide which focusable index a Tab / Shift+Tab keystroke should move to.
|
|
55
|
+
*
|
|
56
|
+
* @param count number of focusable elements inside the trap
|
|
57
|
+
* @param activeIndex index of the currently focused element, or -1 when focus
|
|
58
|
+
* is outside the trap (e.g. it escaped to the body)
|
|
59
|
+
* @param shiftKey whether Shift is held (backward tabbing)
|
|
60
|
+
* @returns the index to focus, or -1 when there is nothing to trap
|
|
61
|
+
*
|
|
62
|
+
* Pure — no DOM — so the wrap-around edge cases stay unit-testable.
|
|
63
|
+
*/
|
|
64
|
+
function resolveTabIndex(count, activeIndex, shiftKey) {
|
|
65
|
+
if (count <= 0)
|
|
66
|
+
return -1;
|
|
67
|
+
if (shiftKey) {
|
|
68
|
+
// Backward: from the first element (or from outside) wrap to the last.
|
|
69
|
+
return activeIndex <= 0 ? count - 1 : activeIndex - 1;
|
|
70
|
+
}
|
|
71
|
+
// Forward: from the last element (or from outside) wrap to the first.
|
|
72
|
+
return activeIndex === -1 || activeIndex >= count - 1 ? 0 : activeIndex + 1;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Collect the tabbable elements slotted into the overlay's light DOM, skipping
|
|
76
|
+
* hidden / aria-hidden ones. (Focusables nested inside further shadow roots are
|
|
77
|
+
* out of scope — the common dialog/modal content lives in the slotted subtree.)
|
|
78
|
+
*/
|
|
79
|
+
function getFocusableElements(root) {
|
|
80
|
+
const nodes = Array.from(root.querySelectorAll(FOCUSABLE_SELECTOR));
|
|
81
|
+
return nodes.filter((el) => !el.hasAttribute('disabled') &&
|
|
82
|
+
el.getAttribute('aria-hidden') !== 'true' &&
|
|
83
|
+
// offsetParent is null for display:none; getClientRects covers position:fixed.
|
|
84
|
+
(el.offsetParent !== null || el.getClientRects().length > 0));
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const coOverlayCss = () => `:host{display:contents}.co-overlay{position:fixed;inset:0;z-index:1000;margin:0;border:0;padding:0;width:auto;height:auto;max-width:none;max-height:none;overflow:visible;display:flex;align-items:center;justify-content:center;background:var(--co-overlay-bg, rgba(0, 0, 0, 0.4));-webkit-backdrop-filter:blur(var(--co-overlay-blur, 2px));backdrop-filter:blur(var(--co-overlay-blur, 2px));opacity:0;pointer-events:none;transition:opacity 0.2s ease}.co-overlay--open{opacity:1;pointer-events:auto;transition:opacity 0.12s ease}`;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Module-level body-scroll lock shared by every overlay instance.
|
|
91
|
+
* Ref-counted so stacked/nested overlays (e.g. a modal opened from a drawer)
|
|
92
|
+
* don't release the lock until the LAST one closes.
|
|
93
|
+
*/
|
|
94
|
+
let lockCount = 0;
|
|
95
|
+
let savedOverflow = '';
|
|
96
|
+
function lockBodyScroll() {
|
|
97
|
+
if (typeof document === 'undefined')
|
|
98
|
+
return;
|
|
99
|
+
if (lockCount === 0) {
|
|
100
|
+
savedOverflow = document.body.style.overflow;
|
|
101
|
+
document.body.style.overflow = 'hidden';
|
|
102
|
+
}
|
|
103
|
+
lockCount++;
|
|
104
|
+
}
|
|
105
|
+
function unlockBodyScroll() {
|
|
106
|
+
if (typeof document === 'undefined')
|
|
107
|
+
return;
|
|
108
|
+
if (lockCount === 0)
|
|
109
|
+
return;
|
|
110
|
+
lockCount--;
|
|
111
|
+
if (lockCount === 0) {
|
|
112
|
+
document.body.style.overflow = savedOverflow;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
function nextFrame(cb) {
|
|
116
|
+
if (typeof requestAnimationFrame === 'function')
|
|
117
|
+
requestAnimationFrame(cb);
|
|
118
|
+
else
|
|
119
|
+
cb();
|
|
120
|
+
}
|
|
121
|
+
const CoOverlay = class {
|
|
122
|
+
constructor(hostRef) {
|
|
123
|
+
registerInstance(this, hostRef);
|
|
124
|
+
this.coClose = createEvent(this, "coClose", 7);
|
|
125
|
+
this.coAfterClose = createEvent(this, "coAfterClose", 3);
|
|
126
|
+
this.coAfterOpen = createEvent(this, "coAfterOpen", 3);
|
|
127
|
+
/** Whether the overlay is visible */
|
|
128
|
+
this.open = false;
|
|
129
|
+
/**
|
|
130
|
+
* Opt-in accessible focus trap. When true, opening the overlay records the
|
|
131
|
+
* previously-focused element, moves focus into the overlay, cycles Tab /
|
|
132
|
+
* Shift+Tab within the slotted content, and restores focus on close.
|
|
133
|
+
* Default false → existing consumers are unchanged.
|
|
134
|
+
*/
|
|
135
|
+
this.trapFocus = false;
|
|
136
|
+
/**
|
|
137
|
+
* Opt-in: emit `coClose` when Escape is pressed while open.
|
|
138
|
+
* Default false → existing consumers are unchanged.
|
|
139
|
+
*/
|
|
140
|
+
this.closeOnEscape = false;
|
|
141
|
+
/** Whether THIS instance currently holds a scroll lock (prevents double-count). */
|
|
142
|
+
this.hasLock = false;
|
|
143
|
+
this.handleClick = () => {
|
|
144
|
+
this.coClose.emit();
|
|
145
|
+
};
|
|
146
|
+
this.handleTransitionEnd = (e) => {
|
|
147
|
+
if (e.target !== this.overlayEl)
|
|
148
|
+
return;
|
|
149
|
+
const ev = afterEventFor(e.propertyName, this.open, 'opacity');
|
|
150
|
+
if (ev === 'after-open')
|
|
151
|
+
this.coAfterOpen.emit();
|
|
152
|
+
else if (ev === 'after-close')
|
|
153
|
+
this.coAfterClose.emit();
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
onOpenChange(isOpen) {
|
|
157
|
+
if (isOpen)
|
|
158
|
+
this.acquireLock();
|
|
159
|
+
else
|
|
160
|
+
this.releaseLock();
|
|
161
|
+
this.syncPopover();
|
|
162
|
+
if (this.trapFocus) {
|
|
163
|
+
if (isOpen)
|
|
164
|
+
this.captureAndFocus();
|
|
165
|
+
else
|
|
166
|
+
this.restoreFocus();
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
componentDidLoad() {
|
|
170
|
+
// Handle the case where the overlay mounts already open.
|
|
171
|
+
if (this.open)
|
|
172
|
+
this.acquireLock();
|
|
173
|
+
this.syncPopover();
|
|
174
|
+
if (this.open && this.trapFocus)
|
|
175
|
+
this.captureAndFocus();
|
|
176
|
+
}
|
|
177
|
+
disconnectedCallback() {
|
|
178
|
+
// Safety: never leave the body locked if removed while open.
|
|
179
|
+
this.releaseLock();
|
|
180
|
+
// Safety: return focus if we were removed while trapping.
|
|
181
|
+
if (this.trapFocus)
|
|
182
|
+
this.restoreFocus();
|
|
183
|
+
}
|
|
184
|
+
acquireLock() {
|
|
185
|
+
if (this.hasLock)
|
|
186
|
+
return;
|
|
187
|
+
this.hasLock = true;
|
|
188
|
+
lockBodyScroll();
|
|
189
|
+
}
|
|
190
|
+
releaseLock() {
|
|
191
|
+
if (!this.hasLock)
|
|
192
|
+
return;
|
|
193
|
+
this.hasLock = false;
|
|
194
|
+
unlockBodyScroll();
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Promote the scrim to the browser top layer so it covers the whole viewport
|
|
198
|
+
* regardless of ancestor `filter`/`mask`/`transform` (which would otherwise
|
|
199
|
+
* make `position: fixed` resolve against that ancestor, confining the scrim).
|
|
200
|
+
* The Popover API promotes WITHOUT moving the DOM node, so slots and Stencil
|
|
201
|
+
* reconciliation are untouched. No-ops gracefully where unsupported.
|
|
202
|
+
*/
|
|
203
|
+
syncPopover() {
|
|
204
|
+
const el = this.overlayEl;
|
|
205
|
+
if (!el || typeof el.showPopover !== 'function')
|
|
206
|
+
return;
|
|
207
|
+
try {
|
|
208
|
+
const isShown = el.matches(':popover-open');
|
|
209
|
+
if (this.open && !isShown)
|
|
210
|
+
el.showPopover();
|
|
211
|
+
else if (!this.open && isShown)
|
|
212
|
+
el.hidePopover();
|
|
213
|
+
}
|
|
214
|
+
catch (_a) {
|
|
215
|
+
/* not connected yet, or already in the desired state */
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
/** Record the current focus and move it into the overlay (guarded by trapFocus). */
|
|
219
|
+
captureAndFocus() {
|
|
220
|
+
if (typeof document !== 'undefined') {
|
|
221
|
+
this.returnFocusEl = document.activeElement;
|
|
222
|
+
}
|
|
223
|
+
// Defer so slotted content / the open transition is ready to take focus.
|
|
224
|
+
nextFrame(() => {
|
|
225
|
+
var _a;
|
|
226
|
+
if (!this.open)
|
|
227
|
+
return;
|
|
228
|
+
const focusables = getFocusableElements(this.el);
|
|
229
|
+
if (focusables.length > 0)
|
|
230
|
+
focusables[0].focus();
|
|
231
|
+
else
|
|
232
|
+
(_a = this.overlayEl) === null || _a === void 0 ? void 0 : _a.focus();
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
/** Restore focus to the element that had it before the trap engaged. */
|
|
236
|
+
restoreFocus() {
|
|
237
|
+
const target = this.returnFocusEl;
|
|
238
|
+
this.returnFocusEl = null;
|
|
239
|
+
if (target && typeof target.focus === 'function')
|
|
240
|
+
target.focus();
|
|
241
|
+
}
|
|
242
|
+
/** Deepest active element, descending through nested shadow roots. */
|
|
243
|
+
deepActiveElement() {
|
|
244
|
+
if (typeof document === 'undefined')
|
|
245
|
+
return null;
|
|
246
|
+
let node = document.activeElement;
|
|
247
|
+
while (node && node.shadowRoot && node.shadowRoot.activeElement) {
|
|
248
|
+
node = node.shadowRoot.activeElement;
|
|
249
|
+
}
|
|
250
|
+
return node;
|
|
251
|
+
}
|
|
252
|
+
handleKeydown(e) {
|
|
253
|
+
if (!this.open)
|
|
254
|
+
return;
|
|
255
|
+
if (this.closeOnEscape && e.key === 'Escape') {
|
|
256
|
+
this.coClose.emit();
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
if (this.trapFocus && e.key === 'Tab')
|
|
260
|
+
this.trapTab(e);
|
|
261
|
+
}
|
|
262
|
+
trapTab(e) {
|
|
263
|
+
var _a;
|
|
264
|
+
const focusables = getFocusableElements(this.el);
|
|
265
|
+
if (focusables.length === 0) {
|
|
266
|
+
// Nothing to move to — keep focus pinned to the overlay container.
|
|
267
|
+
e.preventDefault();
|
|
268
|
+
(_a = this.overlayEl) === null || _a === void 0 ? void 0 : _a.focus();
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
271
|
+
const activeIndex = focusables.indexOf(this.deepActiveElement());
|
|
272
|
+
const nextIndex = resolveTabIndex(focusables.length, activeIndex, e.shiftKey);
|
|
273
|
+
if (nextIndex < 0)
|
|
274
|
+
return;
|
|
275
|
+
e.preventDefault();
|
|
276
|
+
focusables[nextIndex].focus();
|
|
277
|
+
}
|
|
278
|
+
render() {
|
|
279
|
+
return (h("div", { key: 'e6a474574b171c1f4f0b55b9165aa22ee7faa7f1', class: { 'co-overlay': true, 'co-overlay--open': this.open }, part: "overlay", popover: "manual", tabindex: this.trapFocus ? -1 : undefined, ref: (el) => (this.overlayEl = el), onClick: this.handleClick, onTransitionEnd: this.handleTransitionEnd }, h("slot", { key: '05a95bc4822c57de49137f2e604f4dbb54f81f9e' })));
|
|
280
|
+
}
|
|
281
|
+
get el() { return getElement(this); }
|
|
282
|
+
static get watchers() { return {
|
|
283
|
+
"open": [{
|
|
284
|
+
"onOpenChange": 0
|
|
285
|
+
}]
|
|
286
|
+
}; }
|
|
287
|
+
};
|
|
288
|
+
CoOverlay.style = coOverlayCss();
|
|
289
|
+
|
|
290
|
+
export { CoLoader as co_loader, CoOverlay as co_overlay };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h } from './index-CYsftTKf.js';
|
|
2
2
|
|
|
3
3
|
const coMenuDividerCss = () => `:host{display:block}.co-menu-divider{border:0;border-top:1px solid var(--co-semantic-border-subtle, rgba(31, 28, 27, 0.08));margin:var(--co-spacing-xs, 4px) 0}`;
|
|
4
4
|
|
|
@@ -7,7 +7,7 @@ const CoMenuDivider = class {
|
|
|
7
7
|
registerInstance(this, hostRef);
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
|
-
return h("hr", { key: '
|
|
10
|
+
return h("hr", { key: '08549f09b4a76d1bc2cd572a8f09ed9289551175', class: "co-menu-divider", role: "separator" });
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
13
|
CoMenuDivider.style = coMenuDividerCss();
|