@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
|
@@ -0,0 +1,507 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { createVelocityTracker, decideRelease, rubberBand, } from "../../utils/sheetGesture";
|
|
3
|
+
/**
|
|
4
|
+
* Mobile bottom sheet with native drag physics: the sheet follows the finger
|
|
5
|
+
* 1:1 downward, a fast flick (or a slow release past ~45% of its height)
|
|
6
|
+
* dismisses it, upward overdrag rubber-bands, and the backdrop opacity is
|
|
7
|
+
* coupled to the drag. The body scrolls internally — dragging from the body
|
|
8
|
+
* only engages when its content is scrolled to the top.
|
|
9
|
+
*
|
|
10
|
+
* Height fits the content, capped by `maxHeight` (default 85dvh).
|
|
11
|
+
*
|
|
12
|
+
* @slot header - Custom header content (overrides `heading`). Dragging it moves the sheet.
|
|
13
|
+
* @slot - Sheet body (scrollable).
|
|
14
|
+
* @slot footer - Pinned action area below the body (outside the scroll), with safe-area padding.
|
|
15
|
+
*/
|
|
16
|
+
export class CoBottomSheet {
|
|
17
|
+
constructor() {
|
|
18
|
+
/** Whether the sheet is visible */
|
|
19
|
+
this.open = false;
|
|
20
|
+
/** Sheet title (used when the `header` slot is empty) */
|
|
21
|
+
this.heading = '';
|
|
22
|
+
/** Maximum sheet height (any CSS length; content shorter than this hugs) */
|
|
23
|
+
this.maxHeight = '85dvh';
|
|
24
|
+
/** Allow closing with the drag gesture. When false, drags rubber-band back. */
|
|
25
|
+
this.dismissible = true;
|
|
26
|
+
/** Close when tapping the backdrop */
|
|
27
|
+
this.closeOnOverlay = true;
|
|
28
|
+
/** Close when pressing Escape */
|
|
29
|
+
this.closeOnEscape = true;
|
|
30
|
+
/** Show the grab handle */
|
|
31
|
+
this.showHandle = true;
|
|
32
|
+
/* `:empty` can't see across a <slot>, so slotted presence is tracked in JS */
|
|
33
|
+
this.hasFooter = false;
|
|
34
|
+
this.hasHeaderSlot = false;
|
|
35
|
+
this.tracker = createVelocityTracker();
|
|
36
|
+
// gesture state
|
|
37
|
+
this.armed = false;
|
|
38
|
+
this.engaged = false;
|
|
39
|
+
this.fromBody = false;
|
|
40
|
+
this.startY = 0;
|
|
41
|
+
this.startX = 0;
|
|
42
|
+
this.startScrollTop = 0;
|
|
43
|
+
this.sheetHeight = 0;
|
|
44
|
+
this.dismissPending = false;
|
|
45
|
+
// after-events fire only for real open/close settles, never restore springs
|
|
46
|
+
this.pendingAfter = null;
|
|
47
|
+
this.handleBackdropClick = () => {
|
|
48
|
+
if (this.closeOnOverlay)
|
|
49
|
+
this.coClose.emit();
|
|
50
|
+
};
|
|
51
|
+
this.handleFooterSlotChange = (e) => {
|
|
52
|
+
this.hasFooter = this.slotHasContent(e);
|
|
53
|
+
};
|
|
54
|
+
this.handleHeaderSlotChange = (e) => {
|
|
55
|
+
this.hasHeaderSlot = this.slotHasContent(e);
|
|
56
|
+
};
|
|
57
|
+
this.handleTransitionEnd = (e) => {
|
|
58
|
+
if (e.propertyName !== 'transform' || e.target !== this.sheetEl)
|
|
59
|
+
return;
|
|
60
|
+
if (this.pendingAfter === 'open' && this.open)
|
|
61
|
+
this.coAfterOpen.emit();
|
|
62
|
+
if (this.pendingAfter === 'close' && !this.open)
|
|
63
|
+
this.coAfterClose.emit();
|
|
64
|
+
this.pendingAfter = null;
|
|
65
|
+
};
|
|
66
|
+
// ─── drag gesture ──────────────────────────────────────────────
|
|
67
|
+
this.handleGripPointerDown = (e) => {
|
|
68
|
+
this.arm(e, false);
|
|
69
|
+
};
|
|
70
|
+
this.handleBodyPointerDown = (e) => {
|
|
71
|
+
this.arm(e, true);
|
|
72
|
+
};
|
|
73
|
+
this.handlePointerMove = (e) => {
|
|
74
|
+
if (!this.armed || !e.isPrimary)
|
|
75
|
+
return;
|
|
76
|
+
const dy = e.clientY - this.startY;
|
|
77
|
+
const dx = e.clientX - this.startX;
|
|
78
|
+
if (!this.engaged) {
|
|
79
|
+
const slop = this.fromBody ? 8 : 4;
|
|
80
|
+
if (Math.abs(dy) < slop)
|
|
81
|
+
return;
|
|
82
|
+
if (this.fromBody) {
|
|
83
|
+
const scrollable = this.bodyEl
|
|
84
|
+
? this.bodyEl.scrollHeight > this.bodyEl.clientHeight
|
|
85
|
+
: false;
|
|
86
|
+
// content scroll wins: not at top, mostly-horizontal, or scrolling up
|
|
87
|
+
if (this.startScrollTop > 0 ||
|
|
88
|
+
Math.abs(dy) <= Math.abs(dx) ||
|
|
89
|
+
(dy < 0 && scrollable)) {
|
|
90
|
+
this.disarm();
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
// capture on the element that owns these listeners (grip or body) so
|
|
95
|
+
// retargeted move/up events keep flowing through them
|
|
96
|
+
this.engage(e, e.currentTarget);
|
|
97
|
+
}
|
|
98
|
+
// re-anchor so the sheet doesn't jump by the slop distance
|
|
99
|
+
const offsetRaw = e.clientY - this.startY;
|
|
100
|
+
let offset;
|
|
101
|
+
if (offsetRaw >= 0) {
|
|
102
|
+
offset = this.dismissible ? offsetRaw : rubberBand(offsetRaw);
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
offset = -rubberBand(-offsetRaw);
|
|
106
|
+
}
|
|
107
|
+
if (this.sheetEl) {
|
|
108
|
+
this.sheetEl.style.transform = `translate3d(0, ${offset}px, 0)`;
|
|
109
|
+
}
|
|
110
|
+
if (this.backdropEl && this.sheetHeight > 0) {
|
|
111
|
+
const progress = Math.min(Math.max(offset / this.sheetHeight, 0), 1);
|
|
112
|
+
this.backdropEl.style.opacity = String(1 - progress);
|
|
113
|
+
}
|
|
114
|
+
this.tracker.add(e.timeStamp, e.clientY);
|
|
115
|
+
};
|
|
116
|
+
this.handlePointerUp = (e) => {
|
|
117
|
+
if (!this.armed)
|
|
118
|
+
return;
|
|
119
|
+
const wasEngaged = this.engaged;
|
|
120
|
+
const offset = wasEngaged ? Math.max(e.clientY - this.startY, 0) : 0;
|
|
121
|
+
const velocity = this.tracker.velocity();
|
|
122
|
+
this.disarm();
|
|
123
|
+
if (!wasEngaged)
|
|
124
|
+
return;
|
|
125
|
+
const action = decideRelease({
|
|
126
|
+
offset,
|
|
127
|
+
height: this.sheetHeight,
|
|
128
|
+
velocity,
|
|
129
|
+
dismissible: this.dismissible,
|
|
130
|
+
});
|
|
131
|
+
if (action === 'dismiss') {
|
|
132
|
+
this.dismissPending = true;
|
|
133
|
+
if (this.sheetEl) {
|
|
134
|
+
this.sheetEl.style.transform = `translate3d(0, ${this.sheetHeight}px, 0)`;
|
|
135
|
+
}
|
|
136
|
+
if (this.backdropEl)
|
|
137
|
+
this.backdropEl.style.opacity = '0';
|
|
138
|
+
this.coClose.emit();
|
|
139
|
+
// host refused to close (open never flipped): spring back to consistency
|
|
140
|
+
this.dismissFallback = setTimeout(() => {
|
|
141
|
+
if (this.open && this.dismissPending) {
|
|
142
|
+
this.dismissPending = false;
|
|
143
|
+
this.clearInlineStyles();
|
|
144
|
+
}
|
|
145
|
+
}, 500);
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
this.clearInlineStyles();
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
this.handlePointerCancel = () => {
|
|
152
|
+
// native scroll (or the OS) claimed the gesture — always restore
|
|
153
|
+
if (!this.armed)
|
|
154
|
+
return;
|
|
155
|
+
this.disarm();
|
|
156
|
+
this.clearInlineStyles();
|
|
157
|
+
};
|
|
158
|
+
/**
|
|
159
|
+
* iOS: `touch-action` is frozen at gesture start and preventDefault on
|
|
160
|
+
* pointermove does not stop native scrolling — only a non-passive touchmove
|
|
161
|
+
* listener can claim the gesture from a scrollable body.
|
|
162
|
+
*/
|
|
163
|
+
this.touchBlocker = (e) => {
|
|
164
|
+
if (this.engaged) {
|
|
165
|
+
e.preventDefault();
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
if (this.armed && this.startScrollTop <= 0) {
|
|
169
|
+
const dy = e.touches[0].clientY - this.startY;
|
|
170
|
+
if (dy > 0)
|
|
171
|
+
e.preventDefault();
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
onOpenChange(next, prev) {
|
|
176
|
+
if (next === prev)
|
|
177
|
+
return;
|
|
178
|
+
this.pendingAfter = next ? 'open' : 'close';
|
|
179
|
+
if (next) {
|
|
180
|
+
this.coOpen.emit();
|
|
181
|
+
this.clearInlineStyles();
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
// dismiss gesture pinned the transform at the closed position; the
|
|
185
|
+
// class-driven closed transform is identical, so clearing on the next
|
|
186
|
+
// frame produces a single transition (or none if already there)
|
|
187
|
+
this.dismissPending = false;
|
|
188
|
+
if (this.dismissFallback)
|
|
189
|
+
clearTimeout(this.dismissFallback);
|
|
190
|
+
requestAnimationFrame(() => this.clearInlineStyles());
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
handleKey(e) {
|
|
194
|
+
if (this.open && this.closeOnEscape && e.key === 'Escape') {
|
|
195
|
+
this.coClose.emit();
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
disconnectedCallback() {
|
|
199
|
+
this.detachTouchBlocker();
|
|
200
|
+
if (this.dismissFallback)
|
|
201
|
+
clearTimeout(this.dismissFallback);
|
|
202
|
+
}
|
|
203
|
+
clearInlineStyles() {
|
|
204
|
+
if (this.sheetEl)
|
|
205
|
+
this.sheetEl.style.transform = '';
|
|
206
|
+
if (this.backdropEl)
|
|
207
|
+
this.backdropEl.style.opacity = '';
|
|
208
|
+
}
|
|
209
|
+
slotHasContent(e) {
|
|
210
|
+
return e.target
|
|
211
|
+
.assignedNodes({ flatten: true })
|
|
212
|
+
.some((node) => node.nodeType === Node.ELEMENT_NODE ||
|
|
213
|
+
(node.nodeType === Node.TEXT_NODE && (node.textContent || '').trim() !== ''));
|
|
214
|
+
}
|
|
215
|
+
arm(e, fromBody) {
|
|
216
|
+
if (!this.open || this.dismissPending || !e.isPrimary)
|
|
217
|
+
return;
|
|
218
|
+
this.armed = true;
|
|
219
|
+
this.engaged = false;
|
|
220
|
+
this.fromBody = fromBody;
|
|
221
|
+
this.startY = e.clientY;
|
|
222
|
+
this.startX = e.clientX;
|
|
223
|
+
this.startScrollTop = fromBody && this.bodyEl ? this.bodyEl.scrollTop : 0;
|
|
224
|
+
if (fromBody)
|
|
225
|
+
this.attachTouchBlocker();
|
|
226
|
+
}
|
|
227
|
+
engage(e, captureTarget) {
|
|
228
|
+
var _a, _b;
|
|
229
|
+
this.engaged = true;
|
|
230
|
+
this.startY = e.clientY; // re-anchor at the engage point
|
|
231
|
+
this.sheetHeight = ((_a = this.sheetEl) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().height) || 0;
|
|
232
|
+
(_b = this.sheetEl) === null || _b === void 0 ? void 0 : _b.classList.add('co-bottom-sheet--dragging');
|
|
233
|
+
try {
|
|
234
|
+
captureTarget === null || captureTarget === void 0 ? void 0 : captureTarget.setPointerCapture(e.pointerId);
|
|
235
|
+
}
|
|
236
|
+
catch (_c) {
|
|
237
|
+
/* pointer already gone — release will still arrive as pointercancel */
|
|
238
|
+
}
|
|
239
|
+
this.tracker.reset();
|
|
240
|
+
this.tracker.add(e.timeStamp, e.clientY);
|
|
241
|
+
}
|
|
242
|
+
disarm() {
|
|
243
|
+
var _a;
|
|
244
|
+
this.armed = false;
|
|
245
|
+
this.engaged = false;
|
|
246
|
+
(_a = this.sheetEl) === null || _a === void 0 ? void 0 : _a.classList.remove('co-bottom-sheet--dragging');
|
|
247
|
+
this.detachTouchBlocker();
|
|
248
|
+
}
|
|
249
|
+
attachTouchBlocker() {
|
|
250
|
+
var _a;
|
|
251
|
+
(_a = this.bodyEl) === null || _a === void 0 ? void 0 : _a.addEventListener('touchmove', this.touchBlocker, { passive: false });
|
|
252
|
+
}
|
|
253
|
+
detachTouchBlocker() {
|
|
254
|
+
var _a;
|
|
255
|
+
(_a = this.bodyEl) === null || _a === void 0 ? void 0 : _a.removeEventListener('touchmove', this.touchBlocker);
|
|
256
|
+
}
|
|
257
|
+
render() {
|
|
258
|
+
return (h("div", { key: '5a012ab0bd3939ed3266ba823d3d88949f6dbedc', class: { 'co-bottom-sheet-root': true, 'co-bottom-sheet-root--open': this.open } }, h("div", { key: '4ce730ddf26b6d594b61d53553a3ebca14ed4c5e', class: "co-bottom-sheet__backdrop", part: "backdrop", onClick: this.handleBackdropClick, ref: (el) => (this.backdropEl = el) }), h("section", { key: '75adb4689ffab355a074661adee3dfebfda4d9b5', class: { 'co-bottom-sheet': true, 'co-bottom-sheet--open': this.open }, part: "sheet", role: "dialog", "aria-modal": "true", "aria-labelledby": this.heading ? 'co-bottom-sheet-heading' : undefined, style: { '--co-bottom-sheet-max-height': this.maxHeight }, onTransitionEnd: this.handleTransitionEnd, ref: (el) => (this.sheetEl = el) }, h("div", { key: 'a654a44b53c0f9647324c2c587e1e47277a1cd3d', class: "co-bottom-sheet__grip", onPointerDown: this.handleGripPointerDown, onPointerMove: this.handlePointerMove, onPointerUp: this.handlePointerUp, onPointerCancel: this.handlePointerCancel }, this.showHandle && (h("div", { key: '71918dcc9b8ca914fa020cf2428671a2e747103d', class: "co-bottom-sheet__handle", part: "handle", "aria-hidden": "true" })), h("header", { key: '57040104cd32072ef0b81dbdb22e3475b94cf64d', class: {
|
|
259
|
+
'co-bottom-sheet__header': true,
|
|
260
|
+
'co-bottom-sheet__header--show': this.hasHeaderSlot || !!this.heading,
|
|
261
|
+
}, part: "header" }, h("slot", { key: '1ebe3576caee4e503930b8f042ae4ef57063427c', name: "header", onSlotchange: this.handleHeaderSlotChange }, this.heading && (h("h2", { key: '7b5a81b9a833d7a0d00a07b8de7830b7e263d688', class: "co-bottom-sheet__heading", id: "co-bottom-sheet-heading" }, this.heading))))), h("div", { key: 'a45ff0344563c24517cffed54bb4993bfa2a6f76', class: "co-bottom-sheet__body", part: "body", onPointerDown: this.handleBodyPointerDown, onPointerMove: this.handlePointerMove, onPointerUp: this.handlePointerUp, onPointerCancel: this.handlePointerCancel, ref: (el) => (this.bodyEl = el) }, h("slot", { key: 'b616b4a2fb6ea8634c4bb9889f9a3f1133bb863f' })), h("footer", { key: 'e4b192198526c78e2cd015bf116159c359a43292', class: {
|
|
262
|
+
'co-bottom-sheet__footer': true,
|
|
263
|
+
'co-bottom-sheet__footer--show': this.hasFooter,
|
|
264
|
+
}, part: "footer" }, h("slot", { key: 'f461a3a9b895581d849f490f9769f280eeb2ce2b', name: "footer", onSlotchange: this.handleFooterSlotChange })))));
|
|
265
|
+
}
|
|
266
|
+
static get is() { return "co-bottom-sheet"; }
|
|
267
|
+
static get encapsulation() { return "shadow"; }
|
|
268
|
+
static get originalStyleUrls() {
|
|
269
|
+
return {
|
|
270
|
+
"$": ["co-bottom-sheet.css"]
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
static get styleUrls() {
|
|
274
|
+
return {
|
|
275
|
+
"$": ["co-bottom-sheet.css"]
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
static get properties() {
|
|
279
|
+
return {
|
|
280
|
+
"open": {
|
|
281
|
+
"type": "boolean",
|
|
282
|
+
"mutable": true,
|
|
283
|
+
"complexType": {
|
|
284
|
+
"original": "boolean",
|
|
285
|
+
"resolved": "boolean",
|
|
286
|
+
"references": {}
|
|
287
|
+
},
|
|
288
|
+
"required": false,
|
|
289
|
+
"optional": false,
|
|
290
|
+
"docs": {
|
|
291
|
+
"tags": [],
|
|
292
|
+
"text": "Whether the sheet is visible"
|
|
293
|
+
},
|
|
294
|
+
"getter": false,
|
|
295
|
+
"setter": false,
|
|
296
|
+
"reflect": true,
|
|
297
|
+
"attribute": "open",
|
|
298
|
+
"defaultValue": "false"
|
|
299
|
+
},
|
|
300
|
+
"heading": {
|
|
301
|
+
"type": "string",
|
|
302
|
+
"mutable": false,
|
|
303
|
+
"complexType": {
|
|
304
|
+
"original": "string",
|
|
305
|
+
"resolved": "string",
|
|
306
|
+
"references": {}
|
|
307
|
+
},
|
|
308
|
+
"required": false,
|
|
309
|
+
"optional": false,
|
|
310
|
+
"docs": {
|
|
311
|
+
"tags": [],
|
|
312
|
+
"text": "Sheet title (used when the `header` slot is empty)"
|
|
313
|
+
},
|
|
314
|
+
"getter": false,
|
|
315
|
+
"setter": false,
|
|
316
|
+
"reflect": true,
|
|
317
|
+
"attribute": "heading",
|
|
318
|
+
"defaultValue": "''"
|
|
319
|
+
},
|
|
320
|
+
"maxHeight": {
|
|
321
|
+
"type": "string",
|
|
322
|
+
"mutable": false,
|
|
323
|
+
"complexType": {
|
|
324
|
+
"original": "string",
|
|
325
|
+
"resolved": "string",
|
|
326
|
+
"references": {}
|
|
327
|
+
},
|
|
328
|
+
"required": false,
|
|
329
|
+
"optional": false,
|
|
330
|
+
"docs": {
|
|
331
|
+
"tags": [],
|
|
332
|
+
"text": "Maximum sheet height (any CSS length; content shorter than this hugs)"
|
|
333
|
+
},
|
|
334
|
+
"getter": false,
|
|
335
|
+
"setter": false,
|
|
336
|
+
"reflect": true,
|
|
337
|
+
"attribute": "max-height",
|
|
338
|
+
"defaultValue": "'85dvh'"
|
|
339
|
+
},
|
|
340
|
+
"dismissible": {
|
|
341
|
+
"type": "boolean",
|
|
342
|
+
"mutable": false,
|
|
343
|
+
"complexType": {
|
|
344
|
+
"original": "boolean",
|
|
345
|
+
"resolved": "boolean",
|
|
346
|
+
"references": {}
|
|
347
|
+
},
|
|
348
|
+
"required": false,
|
|
349
|
+
"optional": false,
|
|
350
|
+
"docs": {
|
|
351
|
+
"tags": [],
|
|
352
|
+
"text": "Allow closing with the drag gesture. When false, drags rubber-band back."
|
|
353
|
+
},
|
|
354
|
+
"getter": false,
|
|
355
|
+
"setter": false,
|
|
356
|
+
"reflect": false,
|
|
357
|
+
"attribute": "dismissible",
|
|
358
|
+
"defaultValue": "true"
|
|
359
|
+
},
|
|
360
|
+
"closeOnOverlay": {
|
|
361
|
+
"type": "boolean",
|
|
362
|
+
"mutable": false,
|
|
363
|
+
"complexType": {
|
|
364
|
+
"original": "boolean",
|
|
365
|
+
"resolved": "boolean",
|
|
366
|
+
"references": {}
|
|
367
|
+
},
|
|
368
|
+
"required": false,
|
|
369
|
+
"optional": false,
|
|
370
|
+
"docs": {
|
|
371
|
+
"tags": [],
|
|
372
|
+
"text": "Close when tapping the backdrop"
|
|
373
|
+
},
|
|
374
|
+
"getter": false,
|
|
375
|
+
"setter": false,
|
|
376
|
+
"reflect": false,
|
|
377
|
+
"attribute": "close-on-overlay",
|
|
378
|
+
"defaultValue": "true"
|
|
379
|
+
},
|
|
380
|
+
"closeOnEscape": {
|
|
381
|
+
"type": "boolean",
|
|
382
|
+
"mutable": false,
|
|
383
|
+
"complexType": {
|
|
384
|
+
"original": "boolean",
|
|
385
|
+
"resolved": "boolean",
|
|
386
|
+
"references": {}
|
|
387
|
+
},
|
|
388
|
+
"required": false,
|
|
389
|
+
"optional": false,
|
|
390
|
+
"docs": {
|
|
391
|
+
"tags": [],
|
|
392
|
+
"text": "Close when pressing Escape"
|
|
393
|
+
},
|
|
394
|
+
"getter": false,
|
|
395
|
+
"setter": false,
|
|
396
|
+
"reflect": false,
|
|
397
|
+
"attribute": "close-on-escape",
|
|
398
|
+
"defaultValue": "true"
|
|
399
|
+
},
|
|
400
|
+
"showHandle": {
|
|
401
|
+
"type": "boolean",
|
|
402
|
+
"mutable": false,
|
|
403
|
+
"complexType": {
|
|
404
|
+
"original": "boolean",
|
|
405
|
+
"resolved": "boolean",
|
|
406
|
+
"references": {}
|
|
407
|
+
},
|
|
408
|
+
"required": false,
|
|
409
|
+
"optional": false,
|
|
410
|
+
"docs": {
|
|
411
|
+
"tags": [],
|
|
412
|
+
"text": "Show the grab handle"
|
|
413
|
+
},
|
|
414
|
+
"getter": false,
|
|
415
|
+
"setter": false,
|
|
416
|
+
"reflect": true,
|
|
417
|
+
"attribute": "show-handle",
|
|
418
|
+
"defaultValue": "true"
|
|
419
|
+
}
|
|
420
|
+
};
|
|
421
|
+
}
|
|
422
|
+
static get states() {
|
|
423
|
+
return {
|
|
424
|
+
"hasFooter": {},
|
|
425
|
+
"hasHeaderSlot": {}
|
|
426
|
+
};
|
|
427
|
+
}
|
|
428
|
+
static get events() {
|
|
429
|
+
return [{
|
|
430
|
+
"method": "coClose",
|
|
431
|
+
"name": "coClose",
|
|
432
|
+
"bubbles": false,
|
|
433
|
+
"cancelable": true,
|
|
434
|
+
"composed": true,
|
|
435
|
+
"docs": {
|
|
436
|
+
"tags": [],
|
|
437
|
+
"text": "Requested to close (gesture, backdrop, Esc). Consumer should set `open=false`."
|
|
438
|
+
},
|
|
439
|
+
"complexType": {
|
|
440
|
+
"original": "void",
|
|
441
|
+
"resolved": "void",
|
|
442
|
+
"references": {}
|
|
443
|
+
}
|
|
444
|
+
}, {
|
|
445
|
+
"method": "coOpen",
|
|
446
|
+
"name": "coOpen",
|
|
447
|
+
"bubbles": false,
|
|
448
|
+
"cancelable": true,
|
|
449
|
+
"composed": true,
|
|
450
|
+
"docs": {
|
|
451
|
+
"tags": [],
|
|
452
|
+
"text": "Transitioned to open=true."
|
|
453
|
+
},
|
|
454
|
+
"complexType": {
|
|
455
|
+
"original": "void",
|
|
456
|
+
"resolved": "void",
|
|
457
|
+
"references": {}
|
|
458
|
+
}
|
|
459
|
+
}, {
|
|
460
|
+
"method": "coAfterOpen",
|
|
461
|
+
"name": "coAfterOpen",
|
|
462
|
+
"bubbles": false,
|
|
463
|
+
"cancelable": true,
|
|
464
|
+
"composed": true,
|
|
465
|
+
"docs": {
|
|
466
|
+
"tags": [],
|
|
467
|
+
"text": "Slide-in animation finished."
|
|
468
|
+
},
|
|
469
|
+
"complexType": {
|
|
470
|
+
"original": "void",
|
|
471
|
+
"resolved": "void",
|
|
472
|
+
"references": {}
|
|
473
|
+
}
|
|
474
|
+
}, {
|
|
475
|
+
"method": "coAfterClose",
|
|
476
|
+
"name": "coAfterClose",
|
|
477
|
+
"bubbles": false,
|
|
478
|
+
"cancelable": true,
|
|
479
|
+
"composed": true,
|
|
480
|
+
"docs": {
|
|
481
|
+
"tags": [],
|
|
482
|
+
"text": "Slide-out animation finished."
|
|
483
|
+
},
|
|
484
|
+
"complexType": {
|
|
485
|
+
"original": "void",
|
|
486
|
+
"resolved": "void",
|
|
487
|
+
"references": {}
|
|
488
|
+
}
|
|
489
|
+
}];
|
|
490
|
+
}
|
|
491
|
+
static get elementRef() { return "el"; }
|
|
492
|
+
static get watchers() {
|
|
493
|
+
return [{
|
|
494
|
+
"propName": "open",
|
|
495
|
+
"methodName": "onOpenChange"
|
|
496
|
+
}];
|
|
497
|
+
}
|
|
498
|
+
static get listeners() {
|
|
499
|
+
return [{
|
|
500
|
+
"name": "keydown",
|
|
501
|
+
"method": "handleKey",
|
|
502
|
+
"target": "document",
|
|
503
|
+
"capture": false,
|
|
504
|
+
"passive": false
|
|
505
|
+
}];
|
|
506
|
+
}
|
|
507
|
+
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
align-items: center;
|
|
8
8
|
justify-content: center;
|
|
9
9
|
cursor: pointer;
|
|
10
|
-
border:
|
|
10
|
+
border: 1px solid transparent;
|
|
11
11
|
outline: none;
|
|
12
12
|
font-family: var(--co-font-family-primary);
|
|
13
13
|
font-weight: 400;
|
|
@@ -17,25 +17,43 @@
|
|
|
17
17
|
-webkit-font-smoothing: antialiased;
|
|
18
18
|
transition: opacity 0.15s ease, background 0.15s ease;
|
|
19
19
|
box-sizing: border-box;
|
|
20
|
+
-webkit-backdrop-filter: blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate));
|
|
21
|
+
backdrop-filter: blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate));
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
/* ─── VARIANTS ─────────────────────────────────────────────── */
|
|
23
25
|
.co-button--primary {
|
|
24
|
-
background: var(--co-semantic-surface-primary);
|
|
26
|
+
background: color-mix(in srgb, var(--co-semantic-surface-primary) 78%, transparent);
|
|
25
27
|
color: var(--co-semantic-on-primary);
|
|
28
|
+
border-color: color-mix(in srgb, var(--co-semantic-on-primary) 28%, transparent);
|
|
26
29
|
}
|
|
27
30
|
.co-button--secondary {
|
|
28
|
-
background: var(--co-semantic-surface-secondary);
|
|
31
|
+
background: color-mix(in srgb, var(--co-semantic-surface-secondary) 55%, transparent);
|
|
29
32
|
color: var(--co-semantic-on-secondary);
|
|
33
|
+
border-color: var(--co-semantic-border-subtle);
|
|
30
34
|
}
|
|
31
35
|
.co-button--stroke {
|
|
32
|
-
background: transparent;
|
|
36
|
+
background: color-mix(in srgb, var(--co-semantic-surface-secondary) 25%, transparent);
|
|
33
37
|
color: var(--co-semantic-text-default);
|
|
34
|
-
border:
|
|
38
|
+
border-color: var(--co-semantic-border-default);
|
|
35
39
|
}
|
|
36
40
|
.co-button--ghost {
|
|
37
41
|
background: transparent;
|
|
38
42
|
color: var(--co-semantic-text-default);
|
|
43
|
+
border-color: transparent;
|
|
44
|
+
/* Ghost: no chrome, no frost until hover */
|
|
45
|
+
-webkit-backdrop-filter: none;
|
|
46
|
+
backdrop-filter: none;
|
|
47
|
+
}
|
|
48
|
+
.co-button--danger {
|
|
49
|
+
background: var(--co-semantic-status-error);
|
|
50
|
+
color: var(--co-color-base-blanco);
|
|
51
|
+
border-color: transparent;
|
|
52
|
+
}
|
|
53
|
+
.co-button--success {
|
|
54
|
+
background: var(--co-semantic-status-success);
|
|
55
|
+
color: var(--co-color-base-blanco);
|
|
56
|
+
border-color: transparent;
|
|
39
57
|
}
|
|
40
58
|
|
|
41
59
|
/* ─── SIZES · ROUNDED (radius-full) ──────────────────────────
|
|
@@ -102,10 +120,18 @@
|
|
|
102
120
|
}
|
|
103
121
|
.co-button--primary:hover:not(:disabled) { opacity: 0.88; }
|
|
104
122
|
.co-button--secondary:hover:not(:disabled),
|
|
105
|
-
.co-button--stroke:hover:not(:disabled)
|
|
106
|
-
.co-button--ghost:hover:not(:disabled) {
|
|
123
|
+
.co-button--stroke:hover:not(:disabled) {
|
|
107
124
|
background: var(--co-semantic-surface-hover);
|
|
108
125
|
}
|
|
126
|
+
.co-button--ghost:hover:not(:disabled) {
|
|
127
|
+
background: color-mix(in srgb, var(--co-semantic-surface-hover) 60%, transparent);
|
|
128
|
+
-webkit-backdrop-filter: blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate));
|
|
129
|
+
backdrop-filter: blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate));
|
|
130
|
+
}
|
|
131
|
+
.co-button--danger:hover:not(:disabled),
|
|
132
|
+
.co-button--success:hover:not(:disabled) {
|
|
133
|
+
opacity: 0.88;
|
|
134
|
+
}
|
|
109
135
|
|
|
110
136
|
/* ─── ICON SLOTS ─────────────────────────────────────────────── */
|
|
111
137
|
::slotted([slot="icon-left"]),
|
|
@@ -113,3 +139,10 @@
|
|
|
113
139
|
display: inline-flex;
|
|
114
140
|
flex-shrink: 0;
|
|
115
141
|
}
|
|
142
|
+
|
|
143
|
+
/* ─── FALLBACK: no backdrop-filter → solid, legible surfaces ──── */
|
|
144
|
+
@supports not (background: color-mix(in srgb, red, transparent)) {
|
|
145
|
+
.co-button--primary { background: var(--co-semantic-surface-primary); }
|
|
146
|
+
.co-button--secondary { background: var(--co-semantic-surface-secondary); }
|
|
147
|
+
.co-button--stroke { background: transparent; }
|
|
148
|
+
}
|
|
@@ -35,14 +35,14 @@ export class CoButton {
|
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
render() {
|
|
38
|
-
var _a;
|
|
39
|
-
const iconSize = (_a = ICON_SIZE[this.size]) !== null &&
|
|
38
|
+
var _a, _b;
|
|
39
|
+
const iconSize = (_b = (_a = this.iconSize) !== null && _a !== void 0 ? _a : ICON_SIZE[this.size]) !== null && _b !== void 0 ? _b : 18;
|
|
40
40
|
const customStyle = {};
|
|
41
41
|
if (this.color)
|
|
42
42
|
customStyle.background = this.color;
|
|
43
43
|
if (this.textColor)
|
|
44
44
|
customStyle.color = this.textColor;
|
|
45
|
-
return (h("button", { key: '
|
|
45
|
+
return (h("button", { key: '05a61f0d95bb3c6e09207bb643545694c40b0976', class: {
|
|
46
46
|
'co-button': true,
|
|
47
47
|
[`co-button--${this.variant}`]: true,
|
|
48
48
|
[`co-button--${this.shape}`]: true,
|
|
@@ -50,7 +50,7 @@ export class CoButton {
|
|
|
50
50
|
'co-button--disabled': this.disabled,
|
|
51
51
|
}, style: Object.keys(customStyle).length ? customStyle : undefined, type: this.type, disabled: this.disabled, onClick: this.handleClick, part: "button" }, this.iconLeft
|
|
52
52
|
? h("co-icon", { name: this.iconLeft, weight: this.iconWeight, size: iconSize })
|
|
53
|
-
: null, h("slot", { key: '
|
|
53
|
+
: null, h("slot", { key: '9ebae938e533d11c31899023bf35c8e071dabc6e' }, this.label), this.iconRight
|
|
54
54
|
? h("co-icon", { name: this.iconRight, weight: this.iconWeight, size: iconSize })
|
|
55
55
|
: null));
|
|
56
56
|
}
|
|
@@ -72,8 +72,8 @@ export class CoButton {
|
|
|
72
72
|
"type": "string",
|
|
73
73
|
"mutable": false,
|
|
74
74
|
"complexType": {
|
|
75
|
-
"original": "'primary' | 'secondary' | 'stroke' | 'ghost'",
|
|
76
|
-
"resolved": "\"ghost\" | \"primary\" | \"secondary\" | \"stroke\"",
|
|
75
|
+
"original": "'primary' | 'secondary' | 'stroke' | 'ghost' | 'danger' | 'success'",
|
|
76
|
+
"resolved": "\"danger\" | \"ghost\" | \"primary\" | \"secondary\" | \"stroke\" | \"success\"",
|
|
77
77
|
"references": {}
|
|
78
78
|
},
|
|
79
79
|
"required": false,
|
|
@@ -104,7 +104,7 @@ export class CoButton {
|
|
|
104
104
|
},
|
|
105
105
|
"getter": false,
|
|
106
106
|
"setter": false,
|
|
107
|
-
"reflect":
|
|
107
|
+
"reflect": true,
|
|
108
108
|
"attribute": "shape",
|
|
109
109
|
"defaultValue": "'rounded'"
|
|
110
110
|
},
|
|
@@ -282,6 +282,25 @@ export class CoButton {
|
|
|
282
282
|
"setter": false,
|
|
283
283
|
"reflect": false,
|
|
284
284
|
"attribute": "text-color"
|
|
285
|
+
},
|
|
286
|
+
"iconSize": {
|
|
287
|
+
"type": "number",
|
|
288
|
+
"mutable": false,
|
|
289
|
+
"complexType": {
|
|
290
|
+
"original": "number",
|
|
291
|
+
"resolved": "number | undefined",
|
|
292
|
+
"references": {}
|
|
293
|
+
},
|
|
294
|
+
"required": false,
|
|
295
|
+
"optional": true,
|
|
296
|
+
"docs": {
|
|
297
|
+
"tags": [],
|
|
298
|
+
"text": "Override the size-derived glyph px (e.g. 24). Falls back to the size default."
|
|
299
|
+
},
|
|
300
|
+
"getter": false,
|
|
301
|
+
"setter": false,
|
|
302
|
+
"reflect": false,
|
|
303
|
+
"attribute": "icon-size"
|
|
285
304
|
}
|
|
286
305
|
};
|
|
287
306
|
}
|
|
@@ -10,12 +10,12 @@ export class CoButtonGroup {
|
|
|
10
10
|
this.disabled = false;
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
|
-
return (h("div", { key: '
|
|
13
|
+
return (h("div", { key: 'd95d8e7435cdef2385751f66442871f0f3bfea3b', class: {
|
|
14
14
|
'co-button-group': true,
|
|
15
15
|
[`co-button-group--${this.direction}`]: true,
|
|
16
16
|
[`co-button-group--${this.variant}`]: true,
|
|
17
17
|
'co-button-group--disabled': this.disabled,
|
|
18
|
-
}, role: "group" }, h("slot", { key: '
|
|
18
|
+
}, role: "group" }, h("slot", { key: 'd7e6aab7a87a34c080d922dca30b1e3d00e0a7b2' })));
|
|
19
19
|
}
|
|
20
20
|
static get is() { return "co-button-group"; }
|
|
21
21
|
static get encapsulation() { return "shadow"; }
|