@prolibu-suite/cobalt-core 0.1.2 → 0.2.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 +15359 -5571
- package/dist/cjs/co-accordion.cjs.entry.js +19 -4
- package/dist/cjs/co-app-shell.cjs.entry.js +1 -1
- package/dist/cjs/co-autocomplete.cjs.entry.js +51 -6
- package/dist/cjs/co-avatar.cjs.entry.js +40 -7
- package/dist/cjs/co-badge.cjs.entry.js +1 -1
- package/dist/cjs/co-button-group.cjs.entry.js +1 -1
- package/dist/cjs/co-button.cjs.entry.js +10 -5
- package/dist/cjs/co-calendar_3.cjs.entry.js +692 -0
- package/dist/cjs/co-card.cjs.entry.js +21 -4
- package/dist/cjs/co-checkbox-group.cjs.entry.js +7 -5
- package/dist/cjs/co-checkbox.cjs.entry.js +4 -4
- package/dist/cjs/co-chip.cjs.entry.js +3 -3
- package/dist/cjs/co-color-picker.cjs.entry.js +109 -0
- package/dist/cjs/co-column-picker.cjs.entry.js +443 -0
- package/dist/cjs/co-combobox.cjs.entry.js +51 -15
- package/dist/cjs/co-command-search.cjs.entry.js +14 -7
- package/dist/cjs/co-data-table-pagination.cjs.entry.js +5 -5
- package/dist/cjs/co-data-table.cjs.entry.js +17 -5
- package/dist/cjs/co-date-picker.cjs.entry.js +177 -0
- package/dist/cjs/co-date-range-picker.cjs.entry.js +378 -0
- package/dist/cjs/co-date-range.cjs.entry.js +13 -259
- package/dist/cjs/co-empty-state.cjs.entry.js +2 -2
- package/dist/cjs/co-fab.cjs.entry.js +3 -3
- package/dist/cjs/co-file-field.cjs.entry.js +498 -0
- package/dist/cjs/co-helper-text.cjs.entry.js +3 -3
- package/dist/cjs/co-icon-button.cjs.entry.js +4 -4
- package/dist/cjs/co-icon.cjs.entry.js +7 -4
- package/dist/cjs/co-input.cjs.entry.js +13 -8
- package/dist/cjs/co-json-field.cjs.entry.js +109 -0
- package/dist/cjs/co-lightbox.cjs.entry.js +344 -0
- package/dist/cjs/co-list-item.cjs.entry.js +14 -4
- package/dist/cjs/co-loader.cjs.entry.js +1 -1
- package/dist/cjs/co-menu-divider.cjs.entry.js +2 -2
- package/dist/cjs/co-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/co-menu.cjs.entry.js +2 -2
- package/dist/cjs/co-modal.cjs.entry.js +13 -3
- package/dist/cjs/co-navbar.cjs.entry.js +4 -4
- package/dist/cjs/co-number-field.cjs.entry.js +47 -11
- package/dist/cjs/co-overlay.cjs.entry.js +2 -2
- package/dist/cjs/co-page-header.cjs.entry.js +2 -2
- package/dist/cjs/co-phone-field.cjs.entry.js +376 -0
- package/dist/cjs/co-popover.cjs.entry.js +4 -4
- package/dist/cjs/co-progress-bar.cjs.entry.js +3 -3
- package/dist/cjs/co-progress-circle.cjs.entry.js +38 -0
- package/dist/cjs/co-radio-group.cjs.entry.js +7 -5
- 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 +191 -21
- package/dist/cjs/co-rich-text-editor.cjs.entry.js +235 -0
- package/dist/cjs/co-rich-text-toolbar.cjs.entry.js +184 -0
- package/dist/cjs/co-rich-text-viewer.cjs.entry.js +82 -0
- package/dist/cjs/co-row.cjs.entry.js +3 -3
- package/dist/cjs/co-select.cjs.entry.js +119 -18
- package/dist/cjs/co-separator.cjs.entry.js +2 -2
- package/dist/cjs/co-sidebar-nav.cjs.entry.js +30 -5
- package/dist/cjs/co-sidebar.cjs.entry.js +3 -3
- package/dist/cjs/co-slider.cjs.entry.js +3 -3
- package/dist/cjs/co-switch.cjs.entry.js +9 -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 +205 -0
- package/dist/cjs/co-textarea.cjs.entry.js +92 -0
- package/dist/cjs/co-toast.cjs.entry.js +2 -2
- package/dist/cjs/co-toggle-button-group.cjs.entry.js +7 -4
- package/dist/cjs/co-toggle-button.cjs.entry.js +4 -4
- package/dist/cjs/co-tooltip.cjs.entry.js +12 -6
- package/dist/cjs/co-transfer-list.cjs.entry.js +20 -6
- package/dist/cjs/cobalt.cjs.js +2 -2
- package/dist/cjs/dateI18n-BdiNAl0_.js +106 -0
- package/dist/cjs/dates-D8D-aS5d.js +432 -0
- package/dist/cjs/index-CaEJnpZe.js +27213 -0
- package/dist/cjs/{index-BEovErzl.js → index-DoFnrUVH.js} +79 -11
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/normalizeText-B-v-XPKf.js +96 -0
- package/dist/cjs/overlayScroll-ifzDNeyb.js +25 -0
- package/dist/cjs/overlayscrollbars-BlBHo2Xx.js +2842 -0
- package/dist/cjs/{positioning-DozpXyBd.js → positioning-DwHW399W.js} +40 -25
- package/dist/cjs/requiredMark-DA6y-4rp.js +16 -0
- package/dist/cjs/sanitizer-CjHZAkOm.js +1883 -0
- package/dist/cobalt/cobalt.css +1 -1
- package/dist/cobalt/cobalt.esm.js +1 -1
- package/dist/cobalt/{p-1021f612.entry.js → p-01fc77c4.entry.js} +1 -1
- package/dist/cobalt/p-0a6d8061.entry.js +1 -0
- package/dist/cobalt/{p-ff6a647c.entry.js → p-0bf288cd.entry.js} +1 -1
- package/dist/cobalt/p-136bdbd2.entry.js +1 -0
- package/dist/cobalt/{p-1b7d6808.entry.js → p-15708d32.entry.js} +1 -1
- package/dist/cobalt/{p-cc93ab05.entry.js → p-1578b019.entry.js} +1 -1
- package/dist/cobalt/{p-1b5c723a.entry.js → p-1e0282b8.entry.js} +1 -1
- package/dist/cobalt/p-23d48581.entry.js +1 -0
- package/dist/cobalt/p-2718ff27.entry.js +1 -0
- package/dist/cobalt/p-273afd93.entry.js +1 -0
- package/dist/cobalt/{p-c9b0e73f.entry.js → p-2b4d8535.entry.js} +1 -1
- package/dist/cobalt/p-3190d715.entry.js +1 -0
- package/dist/cobalt/p-3f9b3fcb.entry.js +1 -0
- package/dist/cobalt/p-41228dce.entry.js +1 -0
- package/dist/cobalt/{p-5a13e3a0.entry.js → p-44672953.entry.js} +1 -1
- package/dist/cobalt/{p-4cf6d1f4.entry.js → p-522fcdb7.entry.js} +1 -1
- package/dist/cobalt/p-53ce9023.entry.js +1 -0
- package/dist/cobalt/{p-4d8ff00a.entry.js → p-54f26e95.entry.js} +1 -1
- package/dist/cobalt/p-5d01bd4d.entry.js +1 -0
- package/dist/cobalt/p-5e7141aa.entry.js +1 -0
- package/dist/cobalt/p-5f905739.entry.js +1 -0
- package/dist/cobalt/{p-fb047df8.entry.js → p-6404bd21.entry.js} +1 -1
- package/dist/cobalt/p-654bbc2a.entry.js +1 -0
- package/dist/cobalt/p-6678ac0a.entry.js +1 -0
- package/dist/cobalt/{p-e808916c.entry.js → p-66a912dd.entry.js} +1 -1
- package/dist/cobalt/p-6759ee1c.entry.js +1 -0
- package/dist/cobalt/p-69a40bfd.entry.js +1 -0
- package/dist/cobalt/p-6a6a62cb.entry.js +1 -0
- package/dist/cobalt/p-6d43b6cd.entry.js +1 -0
- package/dist/cobalt/p-759c3dd0.entry.js +1 -0
- package/dist/cobalt/p-782f729f.entry.js +1 -0
- package/dist/cobalt/{p-ebd1555e.entry.js → p-7ef766c6.entry.js} +1 -1
- package/dist/cobalt/p-7f818368.entry.js +1 -0
- package/dist/cobalt/p-83b89bf8.entry.js +1 -0
- package/dist/cobalt/p-88dc561a.entry.js +1 -0
- package/dist/cobalt/{p-4905b51d.entry.js → p-8c27aff7.entry.js} +1 -1
- package/dist/cobalt/{p-a7fa4484.entry.js → p-95d14878.entry.js} +1 -1
- package/dist/cobalt/{p-1d7da33f.entry.js → p-97c20011.entry.js} +1 -1
- package/dist/cobalt/p-996179f7.entry.js +1 -0
- package/dist/cobalt/p-9c533830.entry.js +1 -0
- package/dist/cobalt/p-9d89bf47.entry.js +1 -0
- package/dist/cobalt/p-BKmfyPZK.js +2 -0
- package/dist/cobalt/p-BchB6Hdr.js +1 -0
- package/dist/cobalt/p-C1DCLOEl.js +1 -0
- package/dist/cobalt/p-C2mZ7x_Y.js +1 -0
- package/dist/cobalt/p-CQY6Ul7q.js +1 -0
- package/dist/cobalt/p-CyYF8IJE.js +1 -0
- package/dist/cobalt/p-DcK0GGZC.js +2 -0
- package/dist/cobalt/p-DqyWGweA.js +1 -0
- package/dist/cobalt/p-Qqq8fysz.js +1 -0
- package/dist/cobalt/p-aa17c70b.entry.js +1 -0
- package/dist/cobalt/{p-416bb5ae.entry.js → p-aa63812a.entry.js} +1 -1
- package/dist/cobalt/p-ad4c1b41.entry.js +1 -0
- package/dist/cobalt/p-ae4d3207.entry.js +1 -0
- package/dist/cobalt/p-af64da37.entry.js +1 -0
- package/dist/cobalt/p-b758c2e6.entry.js +1 -0
- package/dist/cobalt/p-bb07da22.entry.js +1 -0
- package/dist/cobalt/p-beb9c11d.entry.js +1 -0
- package/dist/cobalt/p-c6a242e4.entry.js +1 -0
- package/dist/cobalt/p-c87285b6.entry.js +1 -0
- package/dist/cobalt/p-cd57e8b4.entry.js +1 -0
- package/dist/cobalt/{p-4ffba5a3.entry.js → p-ce3a535f.entry.js} +1 -1
- package/dist/cobalt/p-d17e1444.entry.js +1 -0
- package/dist/cobalt/p-d958566a.entry.js +1 -0
- package/dist/cobalt/p-dd873bf8.entry.js +1 -0
- package/dist/cobalt/p-def448e4.entry.js +1 -0
- package/dist/cobalt/p-e4de8865.entry.js +1 -0
- package/dist/cobalt/{p-3b2f7959.entry.js → p-e8b58332.entry.js} +1 -1
- package/dist/cobalt/p-eba0bf7f.entry.js +1 -0
- package/dist/cobalt/p-f0e8fa7d.entry.js +1 -0
- package/dist/cobalt/{p-e50c4c6f.entry.js → p-f2c5cb74.entry.js} +1 -1
- package/dist/cobalt/p-f8728b21.entry.js +1 -0
- package/dist/cobalt/{p-697df797.entry.js → p-f97ad9ad.entry.js} +1 -1
- package/dist/cobalt/p-fad3605d.entry.js +1 -0
- package/dist/cobalt/{p-319937c3.entry.js → p-fe9e85b6.entry.js} +1 -1
- package/dist/cobalt/p-ff2690e5.entry.js +1 -0
- package/dist/cobalt/p-ox7HzCZn.js +10 -0
- package/dist/collection/collection-manifest.json +17 -1
- package/dist/collection/components/co-accordion/co-accordion.css +19 -1
- package/dist/collection/components/co-accordion/co-accordion.js +46 -4
- package/dist/collection/components/co-autocomplete/co-autocomplete.css +725 -7
- package/dist/collection/components/co-autocomplete/co-autocomplete.js +88 -4
- package/dist/collection/components/co-avatar/co-avatar.css +7 -0
- package/dist/collection/components/co-avatar/co-avatar.js +35 -6
- package/dist/collection/components/co-button/co-button.css +8 -5
- package/dist/collection/components/co-button/co-button.js +46 -3
- package/dist/collection/components/co-calendar/co-calendar.css +236 -0
- package/dist/collection/components/co-calendar/co-calendar.js +728 -0
- package/dist/collection/components/co-card/co-card.css +28 -5
- package/dist/collection/components/co-card/co-card.js +47 -4
- package/dist/collection/components/co-checkbox/co-checkbox.js +3 -3
- package/dist/collection/components/co-checkbox-group/co-checkbox-group.css +26 -0
- package/dist/collection/components/co-checkbox-group/co-checkbox-group.js +25 -3
- package/dist/collection/components/co-chip/co-chip.js +2 -2
- package/dist/collection/components/co-color-picker/co-color-picker.css +224 -0
- package/dist/collection/components/co-color-picker/co-color-picker.js +333 -0
- package/dist/collection/components/co-color-picker/presets.js +19 -0
- package/dist/collection/components/co-column-picker/co-column-picker.css +490 -0
- package/dist/collection/components/co-column-picker/co-column-picker.js +675 -0
- package/dist/collection/components/co-column-picker/column-picker-node.js +34 -0
- package/dist/collection/components/co-column-picker/utils/column-picker-tree.js +221 -0
- package/dist/collection/components/co-combobox/co-combobox.css +788 -21
- package/dist/collection/components/co-combobox/co-combobox.js +130 -15
- package/dist/collection/components/co-command-search/co-command-search.css +4 -0
- package/dist/collection/components/co-command-search/co-command-search.js +12 -5
- package/dist/collection/components/co-data-table/co-data-table.css +1 -1
- package/dist/collection/components/co-data-table/co-data-table.js +15 -3
- 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 +239 -0
- package/dist/collection/components/co-date-field/co-date-field.js +746 -0
- package/dist/collection/components/co-date-picker/co-date-picker.css +112 -0
- package/dist/collection/components/co-date-picker/co-date-picker.js +801 -0
- package/dist/collection/components/co-date-range/co-date-range.css +3 -254
- package/dist/collection/components/co-date-range/co-date-range.js +29 -433
- package/dist/collection/components/co-date-range-picker/co-date-range-picker.css +251 -0
- package/dist/collection/components/co-date-range-picker/co-date-range-picker.js +1142 -0
- package/dist/collection/components/co-drawer/co-drawer.css +19 -0
- package/dist/collection/components/co-drawer/co-drawer.js +46 -2
- package/dist/collection/components/co-empty-state/co-empty-state.js +1 -1
- package/dist/collection/components/co-fab/co-fab.js +2 -2
- package/dist/collection/components/co-file-field/co-file-field.css +389 -0
- package/dist/collection/components/co-file-field/co-file-field.js +841 -0
- package/dist/collection/components/co-file-field/co-file-field.utils.js +47 -0
- package/dist/collection/components/co-helper-text/co-helper-text.js +2 -2
- package/dist/collection/components/co-icon/co-icon.js +6 -3
- package/dist/collection/components/co-icon-button/co-icon-button.css +10 -0
- package/dist/collection/components/co-icon-button/co-icon-button.js +4 -4
- package/dist/collection/components/co-input/co-input.css +56 -10
- package/dist/collection/components/co-input/co-input.js +34 -9
- package/dist/collection/components/co-json-field/co-json-field.css +169 -0
- package/dist/collection/components/co-json-field/co-json-field.js +453 -0
- package/dist/collection/components/co-lightbox/co-lightbox.css +164 -0
- package/dist/collection/components/co-lightbox/co-lightbox.js +451 -0
- package/dist/collection/components/co-list-item/co-list-item.css +5 -0
- package/dist/collection/components/co-list-item/co-list-item.js +12 -2
- package/dist/collection/components/co-menu/co-menu.js +1 -1
- package/dist/collection/components/co-menu-divider/co-menu-divider.js +1 -1
- package/dist/collection/components/co-modal/co-modal.css +17 -3
- package/dist/collection/components/co-modal/co-modal.js +51 -1
- package/dist/collection/components/co-navbar/co-navbar.css +1 -1
- package/dist/collection/components/co-navbar/co-navbar.js +2 -2
- package/dist/collection/components/co-number-field/co-number-field.css +70 -0
- package/dist/collection/components/co-number-field/co-number-field.js +143 -13
- package/dist/collection/components/co-overlay/co-overlay.js +1 -1
- package/dist/collection/components/co-page-header/co-page-header.js +1 -1
- package/dist/collection/components/co-phone-field/co-phone-field.css +265 -0
- package/dist/collection/components/co-phone-field/co-phone-field.js +392 -0
- package/dist/collection/components/co-phone-field/dial-codes.js +208 -0
- package/dist/collection/components/co-popover/co-popover.js +2 -2
- package/dist/collection/components/co-progress-bar/co-progress-bar.js +2 -2
- package/dist/collection/components/co-progress-circle/co-progress-circle.css +50 -0
- package/dist/collection/components/co-progress-circle/co-progress-circle.js +148 -0
- package/dist/collection/components/co-radio/co-radio.js +3 -3
- package/dist/collection/components/co-radio-group/co-radio-group.css +26 -0
- package/dist/collection/components/co-radio-group/co-radio-group.js +25 -3
- package/dist/collection/components/co-rating/co-rating.js +3 -3
- package/dist/collection/components/co-ref-field/co-ref-field.css +816 -54
- 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 +238 -0
- package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.js +868 -0
- package/dist/collection/components/co-rich-text-toolbar/co-rich-text-toolbar.css +55 -0
- package/dist/collection/components/co-rich-text-toolbar/co-rich-text-toolbar.js +289 -0
- 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 +232 -0
- package/dist/collection/components/co-row/co-row.js +2 -2
- package/dist/collection/components/co-select/co-select.css +845 -7
- package/dist/collection/components/co-select/co-select.js +240 -17
- package/dist/collection/components/co-separator/co-separator.js +1 -1
- package/dist/collection/components/co-sidebar/co-sidebar.js +2 -2
- package/dist/collection/components/co-sidebar-nav/co-sidebar-nav.js +29 -4
- package/dist/collection/components/co-slider/co-slider.js +2 -2
- package/dist/collection/components/co-switch/co-switch.css +17 -0
- package/dist/collection/components/co-switch/co-switch.js +27 -4
- 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 +272 -0
- package/dist/collection/components/co-tags-field/co-tags-field.js +590 -0
- package/dist/collection/components/co-textarea/co-textarea.css +261 -0
- package/dist/collection/components/co-textarea/co-textarea.js +484 -0
- package/dist/collection/components/co-toast/co-toast.js +1 -1
- package/dist/collection/components/co-toggle-button/co-toggle-button.css +6 -4
- package/dist/collection/components/co-toggle-button/co-toggle-button.js +2 -2
- package/dist/collection/components/co-toggle-button-group/co-toggle-button-group.css +16 -0
- package/dist/collection/components/co-toggle-button-group/co-toggle-button-group.js +25 -2
- package/dist/collection/components/co-tooltip/co-tooltip.css +16 -0
- package/dist/collection/components/co-tooltip/co-tooltip.js +9 -3
- package/dist/collection/components/co-transfer-list/co-transfer-list.css +683 -7
- package/dist/collection/components/co-transfer-list/co-transfer-list.js +17 -4
- package/dist/collection/utils/dateI18n.js +101 -0
- package/dist/collection/utils/fileI18n.js +76 -0
- package/dist/collection/utils/icon-config.js +22 -0
- package/dist/collection/utils/lightboxI18n.js +42 -0
- package/dist/collection/utils/normalizeText.js +94 -0
- package/dist/collection/utils/overlayScroll.js +20 -0
- package/dist/collection/utils/positioning.js +40 -25
- package/dist/collection/utils/requiredMark.js +11 -0
- package/dist/components/co-accordion.js +1 -1
- package/dist/components/co-autocomplete.js +1 -1
- package/dist/components/co-avatar.js +1 -1
- package/dist/components/co-button.js +1 -1
- package/dist/components/co-calendar.d.ts +11 -0
- package/dist/components/co-calendar.js +1 -0
- 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.d.ts +11 -0
- package/dist/components/co-color-picker.js +1 -0
- package/dist/components/co-column-picker.d.ts +11 -0
- package/dist/components/co-column-picker.js +1 -0
- 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.d.ts +11 -0
- package/dist/components/co-date-field.js +1 -0
- package/dist/components/co-date-picker.d.ts +11 -0
- package/dist/components/co-date-picker.js +1 -0
- package/dist/components/co-date-range-picker.d.ts +11 -0
- package/dist/components/co-date-range-picker.js +1 -0
- 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-fab.js +1 -1
- package/dist/components/co-file-field.d.ts +11 -0
- package/dist/components/co-file-field.js +1 -0
- package/dist/components/co-helper-text.js +1 -1
- package/dist/components/co-icon-button.js +1 -1
- package/dist/components/co-icon.js +1 -1
- package/dist/components/co-input.js +1 -1
- package/dist/components/co-json-field.d.ts +11 -0
- package/dist/components/co-json-field.js +1 -0
- package/dist/components/co-lightbox.d.ts +11 -0
- package/dist/components/co-lightbox.js +1 -0
- package/dist/components/co-list-item.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.d.ts +11 -0
- package/dist/components/co-phone-field.js +1 -0
- package/dist/components/co-popover.js +1 -1
- package/dist/components/co-progress-bar.js +1 -1
- package/dist/components/co-progress-circle.d.ts +11 -0
- package/dist/components/co-progress-circle.js +1 -0
- package/dist/components/co-radio-group.js +1 -1
- package/dist/components/co-radio.js +1 -1
- package/dist/components/co-rating.js +1 -1
- package/dist/components/co-ref-field.js +1 -1
- package/dist/components/co-rich-text-editor.d.ts +11 -0
- package/dist/components/co-rich-text-editor.js +1 -0
- package/dist/components/co-rich-text-toolbar.d.ts +11 -0
- package/dist/components/co-rich-text-toolbar.js +1 -0
- package/dist/components/co-rich-text-viewer.d.ts +11 -0
- package/dist/components/co-rich-text-viewer.js +1 -0
- 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-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.d.ts +11 -0
- package/dist/components/co-tags-field.js +1 -0
- package/dist/components/co-textarea.d.ts +11 -0
- package/dist/components/co-textarea.js +1 -0
- 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/index.js +1 -1
- package/dist/components/{p-FBICWTuN.js → p-BXdfh__-.js} +1 -1
- package/dist/components/p-BchB6Hdr.js +1 -0
- package/dist/components/p-BeWXpX8I.js +1 -0
- package/dist/components/p-BiW0ubLs.js +1 -0
- package/dist/components/p-C1DCLOEl.js +1 -0
- package/dist/components/p-C2mZ7x_Y.js +1 -0
- package/dist/components/p-C9tHLXKS.js +1 -0
- package/dist/components/p-CQY6Ul7q.js +1 -0
- package/dist/components/p-CWneqh4n.js +1 -0
- package/dist/components/{p-B18FTYLq.js → p-CaMgu2_g.js} +1 -1
- package/dist/components/p-CyYF8IJE.js +1 -0
- package/dist/components/p-DBhNS7JD.js +1 -0
- package/dist/components/p-DObrQi5F.js +1 -0
- package/dist/components/p-DPi_U-Kl.js +1 -0
- package/dist/components/p-DcK0GGZC.js +2 -0
- package/dist/components/p-DqyWGweA.js +1 -0
- package/dist/components/{p-cpdUXBiS.js → p-MiSJXuBx.js} +1 -1
- package/dist/components/p-Sgn-2g8m.js +1 -0
- package/dist/components/{p-Cr8Yc0zj.js → p-jDjfGZJp.js} +1 -1
- package/dist/components/p-o8hrDIKe.js +1 -0
- package/dist/components/p-ox7HzCZn.js +10 -0
- package/dist/esm/co-accordion.entry.js +19 -4
- package/dist/esm/co-app-shell.entry.js +1 -1
- package/dist/esm/co-autocomplete.entry.js +51 -6
- package/dist/esm/co-avatar.entry.js +39 -6
- package/dist/esm/co-badge.entry.js +1 -1
- package/dist/esm/co-button-group.entry.js +1 -1
- package/dist/esm/co-button.entry.js +10 -5
- package/dist/esm/co-calendar_3.entry.js +688 -0
- package/dist/esm/co-card.entry.js +21 -4
- package/dist/esm/co-checkbox-group.entry.js +7 -5
- package/dist/esm/co-checkbox.entry.js +4 -4
- package/dist/esm/co-chip.entry.js +3 -3
- package/dist/esm/co-color-picker.entry.js +107 -0
- package/dist/esm/co-column-picker.entry.js +441 -0
- package/dist/esm/co-combobox.entry.js +51 -15
- package/dist/esm/co-command-search.entry.js +14 -7
- package/dist/esm/co-data-table-pagination.entry.js +5 -5
- package/dist/esm/co-data-table.entry.js +17 -5
- package/dist/esm/co-date-picker.entry.js +175 -0
- package/dist/esm/co-date-range-picker.entry.js +376 -0
- package/dist/esm/co-date-range.entry.js +13 -259
- package/dist/esm/co-empty-state.entry.js +2 -2
- package/dist/esm/co-fab.entry.js +3 -3
- package/dist/esm/co-file-field.entry.js +496 -0
- package/dist/esm/co-helper-text.entry.js +3 -3
- package/dist/esm/co-icon-button.entry.js +4 -4
- package/dist/esm/co-icon.entry.js +7 -4
- package/dist/esm/co-input.entry.js +13 -8
- package/dist/esm/co-json-field.entry.js +107 -0
- package/dist/esm/co-lightbox.entry.js +342 -0
- package/dist/esm/co-list-item.entry.js +14 -4
- package/dist/esm/co-loader.entry.js +1 -1
- package/dist/esm/co-menu-divider.entry.js +2 -2
- package/dist/esm/co-menu-item.entry.js +1 -1
- package/dist/esm/co-menu.entry.js +2 -2
- package/dist/esm/co-modal.entry.js +13 -3
- package/dist/esm/co-navbar.entry.js +4 -4
- package/dist/esm/co-number-field.entry.js +47 -11
- package/dist/esm/co-overlay.entry.js +2 -2
- package/dist/esm/co-page-header.entry.js +2 -2
- package/dist/esm/co-phone-field.entry.js +374 -0
- package/dist/esm/co-popover.entry.js +4 -4
- package/dist/esm/co-progress-bar.entry.js +3 -3
- package/dist/esm/co-progress-circle.entry.js +36 -0
- package/dist/esm/co-radio-group.entry.js +7 -5
- 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 +191 -21
- package/dist/esm/co-rich-text-editor.entry.js +233 -0
- package/dist/esm/co-rich-text-toolbar.entry.js +182 -0
- package/dist/esm/co-rich-text-viewer.entry.js +80 -0
- package/dist/esm/co-row.entry.js +3 -3
- package/dist/esm/co-select.entry.js +119 -18
- package/dist/esm/co-separator.entry.js +2 -2
- package/dist/esm/co-sidebar-nav.entry.js +30 -5
- package/dist/esm/co-sidebar.entry.js +3 -3
- package/dist/esm/co-slider.entry.js +3 -3
- package/dist/esm/co-switch.entry.js +9 -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 +203 -0
- package/dist/esm/co-textarea.entry.js +90 -0
- package/dist/esm/co-toast.entry.js +2 -2
- package/dist/esm/co-toggle-button-group.entry.js +7 -4
- package/dist/esm/co-toggle-button.entry.js +4 -4
- package/dist/esm/co-tooltip.entry.js +12 -6
- package/dist/esm/co-transfer-list.entry.js +20 -6
- package/dist/esm/cobalt.js +3 -3
- package/dist/esm/dateI18n-C1DCLOEl.js +103 -0
- package/dist/esm/dates-CyYF8IJE.js +416 -0
- package/dist/esm/{index-B0lqrhFo.js → index-BKmfyPZK.js} +79 -11
- package/dist/esm/index-BjAqSidM.js +27200 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/normalizeText-CQY6Ul7q.js +92 -0
- package/dist/esm/overlayScroll-Bpv882_z.js +23 -0
- package/dist/esm/overlayscrollbars-ox7HzCZn.js +2840 -0
- package/dist/esm/{positioning-Am-OlB8h.js → positioning-C2mZ7x_Y.js} +40 -25
- package/dist/esm/requiredMark-DFvtYtkE.js +14 -0
- package/dist/esm/sanitizer-DcK0GGZC.js +1880 -0
- package/dist/types/components/co-accordion/co-accordion.d.ts +12 -2
- package/dist/types/components/co-autocomplete/co-autocomplete.d.ts +11 -0
- package/dist/types/components/co-avatar/co-avatar.d.ts +6 -2
- package/dist/types/components/co-button/co-button.d.ts +4 -0
- package/dist/types/components/co-calendar/co-calendar.d.ts +108 -0
- package/dist/types/components/co-card/co-card.d.ts +10 -2
- package/dist/types/components/co-checkbox-group/co-checkbox-group.d.ts +2 -0
- package/dist/types/components/co-color-picker/co-color-picker.d.ts +48 -0
- package/dist/types/components/co-color-picker/presets.d.ts +10 -0
- package/dist/types/components/co-column-picker/co-column-picker.d.ts +60 -0
- package/dist/types/components/co-column-picker/column-picker-node.d.ts +18 -0
- package/dist/types/components/co-column-picker/utils/column-picker-tree.d.ts +37 -0
- package/dist/types/components/co-combobox/co-combobox.d.ts +14 -1
- package/dist/types/components/co-command-search/co-command-search.d.ts +2 -0
- package/dist/types/components/co-data-table/co-data-table.d.ts +1 -0
- package/dist/types/components/co-date-field/co-date-field.d.ts +96 -0
- package/dist/types/components/co-date-picker/co-date-picker.d.ts +92 -0
- package/dist/types/components/co-date-range/co-date-range.d.ts +12 -50
- package/dist/types/components/co-date-range-picker/co-date-range-picker.d.ts +112 -0
- package/dist/types/components/co-drawer/co-drawer.d.ts +4 -0
- package/dist/types/components/co-file-field/co-file-field.d.ts +146 -0
- package/dist/types/components/co-file-field/co-file-field.utils.d.ts +18 -0
- package/dist/types/components/co-icon-button/co-icon-button.d.ts +1 -1
- package/dist/types/components/co-input/co-input.d.ts +4 -1
- package/dist/types/components/co-json-field/co-json-field.d.ts +66 -0
- package/dist/types/components/co-lightbox/co-lightbox.d.ts +95 -0
- package/dist/types/components/co-list-item/co-list-item.d.ts +1 -0
- package/dist/types/components/co-modal/co-modal.d.ts +4 -0
- package/dist/types/components/co-number-field/co-number-field.d.ts +16 -2
- package/dist/types/components/co-phone-field/co-phone-field.d.ts +56 -0
- package/dist/types/components/co-phone-field/dial-codes.d.ts +14 -0
- package/dist/types/components/co-progress-circle/co-progress-circle.d.ts +16 -0
- package/dist/types/components/co-radio-group/co-radio-group.d.ts +2 -0
- package/dist/types/components/co-ref-field/co-ref-field.d.ts +54 -1
- package/dist/types/components/co-rich-text-editor/co-rich-text-editor.d.ts +94 -0
- package/dist/types/components/co-rich-text-toolbar/co-rich-text-toolbar.d.ts +42 -0
- package/dist/types/components/co-rich-text-viewer/co-rich-text-viewer.d.ts +32 -0
- package/dist/types/components/co-select/co-select.d.ts +31 -1
- package/dist/types/components/co-switch/co-switch.d.ts +2 -0
- package/dist/types/components/co-tags-field/co-tags-field.d.ts +82 -0
- package/dist/types/components/co-textarea/co-textarea.d.ts +65 -0
- package/dist/types/components/co-toggle-button-group/co-toggle-button-group.d.ts +2 -0
- package/dist/types/components/co-transfer-list/co-transfer-list.d.ts +4 -0
- package/dist/types/components.d.ts +3796 -422
- package/dist/types/utils/dateI18n.d.ts +39 -0
- package/dist/types/utils/fileI18n.d.ts +34 -0
- package/dist/types/utils/icon-config.d.ts +20 -0
- package/dist/types/utils/lightboxI18n.d.ts +12 -0
- package/dist/types/utils/normalizeText.d.ts +41 -0
- package/dist/types/utils/overlayScroll.d.ts +17 -0
- package/dist/types/utils/positioning.d.ts +7 -14
- package/dist/types/utils/requiredMark.d.ts +13 -0
- package/package.json +9 -1
- package/dist/cjs/co-drawer.cjs.entry.js +0 -75
- package/dist/cjs/color-YhUkm10t.js +0 -32
- package/dist/cobalt/p-08afdc51.entry.js +0 -1
- package/dist/cobalt/p-1d3338b6.entry.js +0 -1
- package/dist/cobalt/p-1d91ec93.entry.js +0 -1
- package/dist/cobalt/p-230a23f3.entry.js +0 -1
- package/dist/cobalt/p-31bc842d.entry.js +0 -1
- package/dist/cobalt/p-37c1f700.entry.js +0 -1
- package/dist/cobalt/p-4dd7499c.entry.js +0 -1
- package/dist/cobalt/p-4e7ce8ee.entry.js +0 -1
- package/dist/cobalt/p-6793c51e.entry.js +0 -1
- package/dist/cobalt/p-689e38b3.entry.js +0 -1
- package/dist/cobalt/p-7028880b.entry.js +0 -1
- package/dist/cobalt/p-72113ec2.entry.js +0 -1
- package/dist/cobalt/p-8e54e74d.entry.js +0 -1
- package/dist/cobalt/p-92c39eed.entry.js +0 -1
- package/dist/cobalt/p-9887b828.entry.js +0 -1
- package/dist/cobalt/p-9a5c6600.entry.js +0 -1
- package/dist/cobalt/p-Am-OlB8h.js +0 -1
- package/dist/cobalt/p-B0lqrhFo.js +0 -2
- package/dist/cobalt/p-BG4WRR22.js +0 -1
- package/dist/cobalt/p-a1b248ad.entry.js +0 -1
- package/dist/cobalt/p-a470b764.entry.js +0 -1
- package/dist/cobalt/p-a4d55b1a.entry.js +0 -1
- package/dist/cobalt/p-b6840df4.entry.js +0 -1
- package/dist/cobalt/p-b89d54d9.entry.js +0 -1
- package/dist/cobalt/p-ba84631a.entry.js +0 -1
- package/dist/cobalt/p-c7517f86.entry.js +0 -1
- package/dist/cobalt/p-ca41eec2.entry.js +0 -1
- package/dist/cobalt/p-d29c77cb.entry.js +0 -1
- package/dist/cobalt/p-d9d8b10e.entry.js +0 -1
- package/dist/cobalt/p-da55678f.entry.js +0 -1
- package/dist/cobalt/p-dc5598d1.entry.js +0 -1
- package/dist/cobalt/p-e2c9cb00.entry.js +0 -1
- package/dist/cobalt/p-ebd68f56.entry.js +0 -1
- package/dist/cobalt/p-f051f44d.entry.js +0 -1
- package/dist/cobalt/p-fe1447a3.entry.js +0 -1
- package/dist/components/p-Am-OlB8h.js +0 -1
- package/dist/components/p-BG4WRR22.js +0 -1
- package/dist/components/p-wwWquAtm.js +0 -1
- package/dist/esm/co-drawer.entry.js +0 -73
- package/dist/esm/color-BG4WRR22.js +0 -30
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/** Format bytes like the Figma spec: "59.25 KB" (base 1024, up to 2 decimals). */
|
|
2
|
+
export function formatBytes(bytes) {
|
|
3
|
+
if (bytes == null || isNaN(bytes))
|
|
4
|
+
return '';
|
|
5
|
+
if (bytes < 1024)
|
|
6
|
+
return `${bytes} B`;
|
|
7
|
+
const fmt = (n) => n.toFixed(2).replace(/\.?0+$/, '');
|
|
8
|
+
if (bytes < 1024 * 1024)
|
|
9
|
+
return `${fmt(bytes / 1024)} KB`;
|
|
10
|
+
return `${fmt(bytes / (1024 * 1024))} MB`;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Left-truncate long file names ("....nshot from 2024-07-12.png"), keeping the
|
|
14
|
+
* tail where the date/extension lives — same convention as the V1 selector.
|
|
15
|
+
* The CSS rtl+ellipsis trick is avoided on purpose: bidi reorders leading
|
|
16
|
+
* digits/punctuation, and file names start with digits all the time.
|
|
17
|
+
*/
|
|
18
|
+
export function truncateLeft(name, max = 35) {
|
|
19
|
+
if (!name || name.length <= max)
|
|
20
|
+
return name;
|
|
21
|
+
return `...${name.slice(-max)}`;
|
|
22
|
+
}
|
|
23
|
+
const IMAGE_EXTS = new Set(['png', 'jpg', 'jpeg', 'gif', 'webp', 'svg', 'avif', 'bmp']);
|
|
24
|
+
function hasImageExtension(item) {
|
|
25
|
+
const base = (item.name || item.url || '').split('?')[0];
|
|
26
|
+
const i = base.lastIndexOf('.');
|
|
27
|
+
return i >= 0 && IMAGE_EXTS.has(base.slice(i + 1).toLowerCase());
|
|
28
|
+
}
|
|
29
|
+
/** An item renders in the previews grid when it's a stored image we can show. */
|
|
30
|
+
export function isImage(item) {
|
|
31
|
+
if (item.status !== 'done')
|
|
32
|
+
return false;
|
|
33
|
+
const src = item.thumbnail || item.url;
|
|
34
|
+
if (!src)
|
|
35
|
+
return false;
|
|
36
|
+
if (item.thumbnail)
|
|
37
|
+
return true;
|
|
38
|
+
return hasImageExtension(item);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Best lightbox source: the original `url` only when it is itself an image —
|
|
42
|
+
* a PDF that entered the grid via its server-generated thumbnail must open
|
|
43
|
+
* the thumbnail (an `<img>` can't render the PDF).
|
|
44
|
+
*/
|
|
45
|
+
export function previewSrc(item) {
|
|
46
|
+
return hasImageExtension(item) ? item.url || item.thumbnail : item.thumbnail || item.url;
|
|
47
|
+
}
|
|
@@ -15,10 +15,10 @@ export class CoHelperText {
|
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
17
|
render() {
|
|
18
|
-
return (h("div", { key: '
|
|
18
|
+
return (h("div", { key: '730e2f2657f5656ea6992bff86be3903615c51d1', class: {
|
|
19
19
|
'co-helper-text': true,
|
|
20
20
|
[`co-helper-text--${this.status}`]: true,
|
|
21
|
-
}, part: "helper-text" }, h("co-icon", { key: '
|
|
21
|
+
}, part: "helper-text" }, h("co-icon", { key: '8612481e2e111104047506dc8ca93980723ed6b2', name: this.STATUS_ICON[this.status], size: 14, weight: "fill", class: "co-helper-text__icon" }), h("span", { key: '9842f85b0f184f4d5e05c989535add23d4c423cc', class: "co-helper-text__message" }, h("slot", { key: '940cf28c1c0f5033c16970ac469029d1ebb1e5e4' }, this.message))));
|
|
22
22
|
}
|
|
23
23
|
static get is() { return "co-helper-text"; }
|
|
24
24
|
static get encapsulation() { return "shadow"; }
|
|
@@ -2,6 +2,9 @@ import { h, Host } from "@stencil/core";
|
|
|
2
2
|
/** Module-level cache shared across all instances */
|
|
3
3
|
const iconCache = new Map();
|
|
4
4
|
const CDN_BASE = 'https://cdn.jsdelivr.net/npm/@phosphor-icons/core@2.1.1/assets';
|
|
5
|
+
function getBasePath() {
|
|
6
|
+
return globalThis.__cobaltIconBasePath || CDN_BASE;
|
|
7
|
+
}
|
|
5
8
|
/**
|
|
6
9
|
* File naming convention in @phosphor-icons/core:
|
|
7
10
|
* regular → "plus.svg"
|
|
@@ -15,7 +18,7 @@ async function loadSvg(name, weight) {
|
|
|
15
18
|
if (iconCache.has(key))
|
|
16
19
|
return iconCache.get(key);
|
|
17
20
|
const filename = toFilename(name, weight);
|
|
18
|
-
const url = `${
|
|
21
|
+
const url = `${getBasePath()}/${weight}/${filename}`;
|
|
19
22
|
try {
|
|
20
23
|
const res = await fetch(url);
|
|
21
24
|
if (!res.ok)
|
|
@@ -59,12 +62,12 @@ export class CoIcon {
|
|
|
59
62
|
this.svgContent = await loadSvg(this.name, this.weight);
|
|
60
63
|
}
|
|
61
64
|
render() {
|
|
62
|
-
return (h(Host, { key: '
|
|
65
|
+
return (h(Host, { key: '0fad4d5acc013ca70b12384477cb5413615c23d2', "aria-hidden": "true", style: {
|
|
63
66
|
display: 'inline-flex',
|
|
64
67
|
width: `${this.size}px`,
|
|
65
68
|
height: `${this.size}px`,
|
|
66
69
|
flexShrink: '0',
|
|
67
|
-
} }, h("span", { key: '
|
|
70
|
+
} }, h("span", { key: '7e5199c496bb07aade0400b61415260f5fd2ee2a', part: "svg", innerHTML: this.svgContent })));
|
|
68
71
|
}
|
|
69
72
|
static get is() { return "co-icon"; }
|
|
70
73
|
static get encapsulation() { return "shadow"; }
|
|
@@ -32,6 +32,16 @@
|
|
|
32
32
|
border: 1px solid var(--co-icon-button-border, var(--co-semantic-border-subtle));
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
/* Ghost = fully transparent, no border */
|
|
36
|
+
.co-icon-button--ghost {
|
|
37
|
+
background: transparent;
|
|
38
|
+
color: var(--co-icon-button-color, var(--co-semantic-text-default));
|
|
39
|
+
border: none;
|
|
40
|
+
}
|
|
41
|
+
.co-icon-button--ghost:hover:not(:disabled) {
|
|
42
|
+
background: var(--co-semantic-surface-hover, rgba(0, 0, 0, 0.04));
|
|
43
|
+
}
|
|
44
|
+
|
|
35
45
|
/* ─── SIZES · ROUNDED ───────────────────────────────────────── */
|
|
36
46
|
.co-icon-button--rounded.co-icon-button--xl {
|
|
37
47
|
width: 80px; height: 80px;
|
|
@@ -23,10 +23,10 @@ export class CoIconButton {
|
|
|
23
23
|
render() {
|
|
24
24
|
var _a;
|
|
25
25
|
const iconSizeMap = {
|
|
26
|
-
xl: 32, lg: 28, md: 24, sm: 20, xs: 16, xxs:
|
|
26
|
+
xl: 32, lg: 28, md: 24, sm: 20, xs: 16, xxs: 16,
|
|
27
27
|
};
|
|
28
28
|
const iconSize = (_a = iconSizeMap[this.size]) !== null && _a !== void 0 ? _a : 24;
|
|
29
|
-
return (h("button", { key: '
|
|
29
|
+
return (h("button", { key: 'd21f938003cb69f4747b94566a2054e4e2af4a04', class: {
|
|
30
30
|
'co-icon-button': true,
|
|
31
31
|
[`co-icon-button--${this.variant}`]: true,
|
|
32
32
|
[`co-icon-button--${this.shape}`]: true,
|
|
@@ -54,8 +54,8 @@ export class CoIconButton {
|
|
|
54
54
|
"type": "string",
|
|
55
55
|
"mutable": false,
|
|
56
56
|
"complexType": {
|
|
57
|
-
"original": "'filled' | 'outlined'",
|
|
58
|
-
"resolved": "\"filled\" | \"outlined\"",
|
|
57
|
+
"original": "'filled' | 'outlined' | 'ghost'",
|
|
58
|
+
"resolved": "\"filled\" | \"ghost\" | \"outlined\"",
|
|
59
59
|
"references": {}
|
|
60
60
|
},
|
|
61
61
|
"required": false,
|
|
@@ -18,20 +18,29 @@
|
|
|
18
18
|
gap: var(--co-spacing-sm2);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
/* Horizontal layout: label
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
/* ── Horizontal layout: label left; control + helper stacked right ──
|
|
22
|
+
Set --co-field-label-width on a container to align labels across fields. */
|
|
23
|
+
:host([layout='horizontal']) .co-input {
|
|
24
|
+
display: grid;
|
|
25
|
+
grid-template-columns: var(--co-field-label-width, max-content) 1fr;
|
|
26
|
+
align-items: start;
|
|
27
|
+
column-gap: var(--co-spacing-md);
|
|
28
|
+
row-gap: var(--co-spacing-sm2);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
:host([layout='horizontal']) .co-input__labels {
|
|
32
|
+
grid-column: 1;
|
|
33
|
+
grid-row: 1;
|
|
29
34
|
padding-top: var(--co-spacing-sm2);
|
|
30
35
|
min-width: 0;
|
|
31
36
|
}
|
|
32
37
|
|
|
33
|
-
|
|
34
|
-
|
|
38
|
+
:host([layout='horizontal']) .co-input__label {
|
|
39
|
+
white-space: normal;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:host([layout='horizontal']) .co-input > :not(.co-input__labels) {
|
|
43
|
+
grid-column: 2;
|
|
35
44
|
min-width: 0;
|
|
36
45
|
}
|
|
37
46
|
|
|
@@ -87,6 +96,27 @@
|
|
|
87
96
|
min-width: 0;
|
|
88
97
|
}
|
|
89
98
|
|
|
99
|
+
/* ---- Size variants ---- */
|
|
100
|
+
.co-input--s .co-input__field {
|
|
101
|
+
min-height: 28px;
|
|
102
|
+
padding: var(--co-spacing-xxs) var(--co-spacing-sm);
|
|
103
|
+
font-size: var(--co-font-size-12);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.co-input--sm .co-input__field {
|
|
107
|
+
min-height: 32px;
|
|
108
|
+
padding: var(--co-spacing-xs) var(--co-spacing-sm);
|
|
109
|
+
font-size: var(--co-font-size-14);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* md is the default (40px) — no override needed */
|
|
113
|
+
|
|
114
|
+
.co-input--lg .co-input__field {
|
|
115
|
+
min-height: 48px;
|
|
116
|
+
padding: var(--co-spacing-sm) var(--co-spacing-lg);
|
|
117
|
+
font-size: var(--co-font-size-16);
|
|
118
|
+
}
|
|
119
|
+
|
|
90
120
|
/* When action button is present, field gets left-only radius and no right border */
|
|
91
121
|
.co-input--has-action .co-input__field {
|
|
92
122
|
border-radius: var(--co-border-radius-xs) 0 0 var(--co-border-radius-xs);
|
|
@@ -349,3 +379,19 @@
|
|
|
349
379
|
.co-input__helper--info .co-input__helper-text {
|
|
350
380
|
color: var(--co-semantic-status-info);
|
|
351
381
|
}
|
|
382
|
+
|
|
383
|
+
.co-field-required {
|
|
384
|
+
margin-left: 2px;
|
|
385
|
+
color: var(--co-color-status-error);
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
.co-field-required__caption {
|
|
389
|
+
margin-left: 4px;
|
|
390
|
+
color: var(--co-semantic-text-muted);
|
|
391
|
+
font-size: var(--co-font-size-12);
|
|
392
|
+
font-weight: 400;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
.co-field-required__caption::before {
|
|
396
|
+
content: var(--co-field-required-text, ' (required)');
|
|
397
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
+
import { RequiredMark } from "../../utils/requiredMark";
|
|
2
3
|
/**
|
|
3
4
|
* Text input field with label, helper text, icons, and clear functionality.
|
|
4
5
|
* Supports vertical and horizontal label layouts, action button, and chips.
|
|
@@ -10,8 +11,9 @@ import { h } from "@stencil/core";
|
|
|
10
11
|
*/
|
|
11
12
|
export class CoInput {
|
|
12
13
|
constructor() {
|
|
13
|
-
/** Placeholder text
|
|
14
|
-
|
|
14
|
+
/** Placeholder text. Empty by default — a literal "Placeholder" leaking into
|
|
15
|
+
* product UIs when the consumer forgets the prop is worse than no hint. */
|
|
16
|
+
this.placeholder = '';
|
|
15
17
|
/** Current value */
|
|
16
18
|
this.value = '';
|
|
17
19
|
/** Disabled state */
|
|
@@ -28,6 +30,8 @@ export class CoInput {
|
|
|
28
30
|
this.required = false;
|
|
29
31
|
/** Validation status */
|
|
30
32
|
this.status = 'default';
|
|
33
|
+
/** Size variant: s (28px), sm (32px), md (40px, default), lg (48px) */
|
|
34
|
+
this.size = 'md';
|
|
31
35
|
this.hasFocus = false;
|
|
32
36
|
this.handleInput = (e) => {
|
|
33
37
|
const target = e.target;
|
|
@@ -84,23 +88,24 @@ export class CoInput {
|
|
|
84
88
|
case 'success': return 'check-circle';
|
|
85
89
|
case 'warning': return 'warning-circle';
|
|
86
90
|
case 'info': return 'info';
|
|
87
|
-
default: return
|
|
91
|
+
default: return null;
|
|
88
92
|
}
|
|
89
93
|
}
|
|
90
94
|
render() {
|
|
91
95
|
const showClear = this.clearable && this.hasValue && !this.disabled && !this.readonly;
|
|
92
|
-
return (h("div", { key: '
|
|
96
|
+
return (h("div", { key: 'ea8acfc26e68ae3fb1af4f7de1bcbd2acd4e7ac7', class: {
|
|
93
97
|
'co-input': true,
|
|
94
98
|
[`co-input--${this.layout}`]: true,
|
|
99
|
+
[`co-input--${this.size}`]: true,
|
|
95
100
|
'co-input--disabled': this.disabled,
|
|
96
101
|
'co-input--focused': this.hasFocus,
|
|
97
102
|
'co-input--filled': this.hasValue,
|
|
98
103
|
[`co-input--${this.status}`]: this.status !== 'default',
|
|
99
104
|
'co-input--has-action': this.hasAction,
|
|
100
|
-
}, part: "wrapper" }, (this.label || this.secondaryLabel) && (h("div", { key: '
|
|
105
|
+
}, part: "wrapper" }, (this.label || this.secondaryLabel) && (h("div", { key: '95a64f4c0139c5d5dac014f5a23f9a04b262329f', class: "co-input__labels" }, this.label && h("label", { key: 'dca544199d539ba2ebc7f554edc92211fe6b5c31', class: "co-input__label", part: "label" }, this.label, h(RequiredMark, { key: 'd3a156e415e060f506e48acc36dc243118afd7ca', required: this.required })), this.secondaryLabel && (h("span", { key: '8f15c42b9112f8fc35f60f43bb57552847354a71', class: "co-input__secondary-label", part: "secondary-label" }, this.secondaryLabel)))), h("div", { key: '1ede7a8c1e233dbbf418009585f70c8656c037cb', class: "co-input__field-row" }, h("div", { key: '8c02baab4dd1515e95ad5a4dfff5f48f55a7d63c', class: "co-input__field", part: "field" }, this.iconLeft && (h("co-icon", { key: '6f1bc645fc200a045e032c7d35692db442b88646', name: this.iconLeft, size: 16, class: "co-input__icon co-input__icon--left" })), h("slot", { key: 'bd5a9c82550358db4b150d4051552d37a9301af7', name: "chips" }), h("div", { key: '9ff10025bcae287a709719fd3dfae516404775b6', class: "co-input__input-wrapper" }, h("input", { key: '9c739fd0c317e5a9d90a1333323f6d2a866b1814', 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: '484e731b13fca8a9c5ce61fe72ddf6e48bb534a1', class: {
|
|
101
106
|
'co-input__clear': true,
|
|
102
107
|
'co-input__clear--hidden': !showClear,
|
|
103
|
-
}, type: "button", tabIndex: -1, onClick: this.handleClear, "aria-label": "Clear input", part: "clear" }, h("co-icon", { key: '
|
|
108
|
+
}, type: "button", tabIndex: -1, onClick: this.handleClear, "aria-label": "Clear input", part: "clear" }, h("co-icon", { key: '538191d5ef59bd4774b770a8607fd5d1974d1d94', name: "x-circle", size: 16, weight: "fill" }))), this.iconRight && (h("co-icon", { key: '35a708d4fbb3e6a555870624639e508ec3fbcc55', name: this.iconRight, size: 16, class: "co-input__icon co-input__icon--right" })), this.statusFieldIcon && (h("co-icon", { key: 'a752b406a2bca43f7f97f6105182e8284e627d05', name: this.statusFieldIcon, size: 16, class: "co-input__status-icon" })), h("slot", { key: '064462000405431972bedc978973b720f72942fe', name: "suffix" }), h("slot", { key: '990b12d2673dff2d95cd90d0965a4c4bd651814e' }), h("slot", { key: '123cdc8ca7fe31edc41aa3d5c22ff04d1715267b', name: "action" })), this.hasAction && (h("button", { key: '37884d459ba4b9381f76423a30b94875522155ae', class: "co-input__action", type: "button", onClick: this.handleAction, disabled: this.disabled, part: "action" }, this.actionIcon && (h("co-icon", { key: 'ff2d4309ba5fd1115e7055eeea0cd3ba5ccb7ca4', name: this.actionIcon, size: 16, class: "co-input__action-icon" })), this.actionLabel && (h("span", { key: '7b7d08e859dbadaf44f27fad2c447034476ce47d', class: "co-input__action-label" }, this.actionLabel))))), this.helperText && (h("div", { key: '5027ce06cacf8a9bef2b1ec59afce48b4a641494', class: `co-input__helper co-input__helper--${this.status}`, part: "helper" }, this.helperIcon && (h("co-icon", { key: '17a437667dfc378c997349c06cb25f0df0f34b58', name: this.helperIcon, size: 14, class: "co-input__helper-icon" })), h("span", { key: 'c3361adf7357c3de5c52f034e248fb9050f73b20', class: "co-input__helper-text" }, this.helperText)))));
|
|
104
109
|
}
|
|
105
110
|
static get is() { return "co-input"; }
|
|
106
111
|
static get encapsulation() { return "shadow"; }
|
|
@@ -166,13 +171,13 @@ export class CoInput {
|
|
|
166
171
|
"optional": false,
|
|
167
172
|
"docs": {
|
|
168
173
|
"tags": [],
|
|
169
|
-
"text": "Placeholder text"
|
|
174
|
+
"text": "Placeholder text. Empty by default \u2014 a literal \"Placeholder\" leaking into\nproduct UIs when the consumer forgets the prop is worse than no hint."
|
|
170
175
|
},
|
|
171
176
|
"getter": false,
|
|
172
177
|
"setter": false,
|
|
173
178
|
"reflect": false,
|
|
174
179
|
"attribute": "placeholder",
|
|
175
|
-
"defaultValue": "'
|
|
180
|
+
"defaultValue": "''"
|
|
176
181
|
},
|
|
177
182
|
"value": {
|
|
178
183
|
"type": "string",
|
|
@@ -327,7 +332,7 @@ export class CoInput {
|
|
|
327
332
|
},
|
|
328
333
|
"getter": false,
|
|
329
334
|
"setter": false,
|
|
330
|
-
"reflect":
|
|
335
|
+
"reflect": true,
|
|
331
336
|
"attribute": "layout",
|
|
332
337
|
"defaultValue": "'vertical'"
|
|
333
338
|
},
|
|
@@ -429,6 +434,26 @@ export class CoInput {
|
|
|
429
434
|
"attribute": "status",
|
|
430
435
|
"defaultValue": "'default'"
|
|
431
436
|
},
|
|
437
|
+
"size": {
|
|
438
|
+
"type": "string",
|
|
439
|
+
"mutable": false,
|
|
440
|
+
"complexType": {
|
|
441
|
+
"original": "'s' | 'sm' | 'md' | 'lg'",
|
|
442
|
+
"resolved": "\"lg\" | \"md\" | \"s\" | \"sm\"",
|
|
443
|
+
"references": {}
|
|
444
|
+
},
|
|
445
|
+
"required": false,
|
|
446
|
+
"optional": false,
|
|
447
|
+
"docs": {
|
|
448
|
+
"tags": [],
|
|
449
|
+
"text": "Size variant: s (28px), sm (32px), md (40px, default), lg (48px)"
|
|
450
|
+
},
|
|
451
|
+
"getter": false,
|
|
452
|
+
"setter": false,
|
|
453
|
+
"reflect": true,
|
|
454
|
+
"attribute": "size",
|
|
455
|
+
"defaultValue": "'md'"
|
|
456
|
+
},
|
|
432
457
|
"actionLabel": {
|
|
433
458
|
"type": "string",
|
|
434
459
|
"mutable": false,
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/* ============================================================
|
|
2
|
+
co-json-field — multiline JSON editor; mirrors co-input styling
|
|
3
|
+
with a monospace textarea.
|
|
4
|
+
============================================================ */
|
|
5
|
+
|
|
6
|
+
:host {
|
|
7
|
+
display: block;
|
|
8
|
+
font-family: var(--co-font-family-primary);
|
|
9
|
+
font-size: var(--co-font-size-14);
|
|
10
|
+
letter-spacing: var(--co-font-letter-spacing-body);
|
|
11
|
+
line-height: 1;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.co-json-field {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
gap: var(--co-spacing-sm2);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* ---- Labels ---- */
|
|
21
|
+
.co-json-field__labels {
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
justify-content: space-between;
|
|
25
|
+
padding: 0 var(--co-spacing-xs);
|
|
26
|
+
gap: var(--co-spacing-sm2);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.co-json-field__label {
|
|
30
|
+
color: var(--co-semantic-text-secondary);
|
|
31
|
+
font-size: var(--co-font-size-14);
|
|
32
|
+
font-weight: 400;
|
|
33
|
+
letter-spacing: var(--co-font-letter-spacing-body);
|
|
34
|
+
line-height: 1;
|
|
35
|
+
white-space: nowrap;
|
|
36
|
+
cursor: default;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.co-field-required {
|
|
40
|
+
margin-left: 2px;
|
|
41
|
+
color: var(--co-color-status-error);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.co-field-required__caption {
|
|
45
|
+
margin-left: 4px;
|
|
46
|
+
color: var(--co-semantic-text-muted);
|
|
47
|
+
font-size: var(--co-font-size-12);
|
|
48
|
+
font-weight: 400;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.co-field-required__caption::before {
|
|
52
|
+
content: var(--co-field-required-text, ' (required)');
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* ---- Field ---- */
|
|
56
|
+
.co-json-field__field {
|
|
57
|
+
display: flex;
|
|
58
|
+
background: var(--co-semantic-surface-secondary);
|
|
59
|
+
border: 1px solid var(--co-semantic-border-subtle);
|
|
60
|
+
border-radius: var(--co-border-radius-xs);
|
|
61
|
+
transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
|
62
|
+
box-sizing: border-box;
|
|
63
|
+
overflow: hidden;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.co-json-field__native {
|
|
67
|
+
width: 100%;
|
|
68
|
+
resize: vertical;
|
|
69
|
+
border: none;
|
|
70
|
+
outline: none;
|
|
71
|
+
background: transparent;
|
|
72
|
+
font-family: var(--co-font-family-mono, monospace);
|
|
73
|
+
font-size: var(--co-font-size-13, 13px);
|
|
74
|
+
font-weight: 400;
|
|
75
|
+
line-height: 1.5;
|
|
76
|
+
color: var(--co-semantic-text-default);
|
|
77
|
+
padding: var(--co-spacing-sm2) var(--co-spacing-md);
|
|
78
|
+
margin: 0;
|
|
79
|
+
box-sizing: border-box;
|
|
80
|
+
tab-size: 2;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.co-json-field__native::placeholder {
|
|
84
|
+
color: var(--co-semantic-text-muted);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* ---- Helper text ---- */
|
|
88
|
+
.co-json-field__helper {
|
|
89
|
+
display: flex;
|
|
90
|
+
align-items: center;
|
|
91
|
+
gap: var(--co-spacing-xs);
|
|
92
|
+
padding: 0 var(--co-spacing-xs);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.co-json-field__helper-icon {
|
|
96
|
+
flex-shrink: 0;
|
|
97
|
+
color: var(--co-semantic-text-muted);
|
|
98
|
+
display: flex;
|
|
99
|
+
align-items: center;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.co-json-field__helper-text {
|
|
103
|
+
color: var(--co-semantic-text-muted);
|
|
104
|
+
font-size: var(--co-font-size-14);
|
|
105
|
+
font-weight: 400;
|
|
106
|
+
line-height: 1;
|
|
107
|
+
letter-spacing: var(--co-font-letter-spacing-body);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/* ============================================================
|
|
111
|
+
States
|
|
112
|
+
============================================================ */
|
|
113
|
+
.co-json-field--focused .co-json-field__field {
|
|
114
|
+
border-color: var(--co-semantic-border-focus);
|
|
115
|
+
box-shadow: 0 0 0 2px var(--co-semantic-border-focus-ring);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.co-json-field--disabled {
|
|
119
|
+
opacity: 0.6;
|
|
120
|
+
pointer-events: none;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.co-json-field--disabled .co-json-field__field {
|
|
124
|
+
background: var(--co-semantic-surface-disabled);
|
|
125
|
+
border-color: transparent;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/* ---- Invalid / error (internal JSON parse OR external status) ---- */
|
|
129
|
+
.co-json-field--invalid .co-json-field__field,
|
|
130
|
+
.co-json-field--error .co-json-field__field {
|
|
131
|
+
border-color: var(--co-semantic-status-error);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.co-json-field--invalid.co-json-field--focused .co-json-field__field,
|
|
135
|
+
.co-json-field--error.co-json-field--focused .co-json-field__field {
|
|
136
|
+
border-color: var(--co-semantic-status-error);
|
|
137
|
+
box-shadow: 0 0 0 2px rgba(170, 46, 27, 0.12);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.co-json-field__helper--error .co-json-field__helper-icon,
|
|
141
|
+
.co-json-field__helper--error .co-json-field__helper-text {
|
|
142
|
+
color: var(--co-semantic-status-error);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* ── Horizontal layout: label left; control + helper stacked right ──
|
|
146
|
+
Set --co-field-label-width on a container to align labels across fields. */
|
|
147
|
+
:host([layout='horizontal']) .co-json-field {
|
|
148
|
+
display: grid;
|
|
149
|
+
grid-template-columns: var(--co-field-label-width, max-content) 1fr;
|
|
150
|
+
align-items: start;
|
|
151
|
+
column-gap: var(--co-spacing-md);
|
|
152
|
+
row-gap: var(--co-spacing-sm2);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
:host([layout='horizontal']) .co-json-field__labels {
|
|
156
|
+
grid-column: 1;
|
|
157
|
+
grid-row: 1;
|
|
158
|
+
padding-top: var(--co-spacing-sm2);
|
|
159
|
+
min-width: 0;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
:host([layout='horizontal']) .co-json-field__label {
|
|
163
|
+
white-space: normal;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
:host([layout='horizontal']) .co-json-field > :not(.co-json-field__labels) {
|
|
167
|
+
grid-column: 2;
|
|
168
|
+
min-width: 0;
|
|
169
|
+
}
|