@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,376 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-DoFnrUVH.js');
|
|
4
|
+
var requiredMark = require('./requiredMark-DA6y-4rp.js');
|
|
5
|
+
var normalizeText = require('./normalizeText-B-v-XPKf.js');
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Dial codes sorted by name. Covers the full ITU-T E.164 assignment.
|
|
9
|
+
* The iso2 key matches country-flag-icons' 3x2/{ISO2} naming.
|
|
10
|
+
*/
|
|
11
|
+
const DIAL_CODES = [
|
|
12
|
+
{ iso2: 'AF', dialCode: '+93', name: 'Afghanistan' },
|
|
13
|
+
{ iso2: 'AL', dialCode: '+355', name: 'Albania' },
|
|
14
|
+
{ iso2: 'DZ', dialCode: '+213', name: 'Algeria' },
|
|
15
|
+
{ iso2: 'AD', dialCode: '+376', name: 'Andorra' },
|
|
16
|
+
{ iso2: 'AO', dialCode: '+244', name: 'Angola' },
|
|
17
|
+
{ iso2: 'AG', dialCode: '+1268', name: 'Antigua and Barbuda' },
|
|
18
|
+
{ iso2: 'AR', dialCode: '+54', name: 'Argentina' },
|
|
19
|
+
{ iso2: 'AM', dialCode: '+374', name: 'Armenia' },
|
|
20
|
+
{ iso2: 'AU', dialCode: '+61', name: 'Australia' },
|
|
21
|
+
{ iso2: 'AT', dialCode: '+43', name: 'Austria' },
|
|
22
|
+
{ iso2: 'AZ', dialCode: '+994', name: 'Azerbaijan' },
|
|
23
|
+
{ iso2: 'BS', dialCode: '+1242', name: 'Bahamas' },
|
|
24
|
+
{ iso2: 'BH', dialCode: '+973', name: 'Bahrain' },
|
|
25
|
+
{ iso2: 'BD', dialCode: '+880', name: 'Bangladesh' },
|
|
26
|
+
{ iso2: 'BB', dialCode: '+1246', name: 'Barbados' },
|
|
27
|
+
{ iso2: 'BY', dialCode: '+375', name: 'Belarus' },
|
|
28
|
+
{ iso2: 'BE', dialCode: '+32', name: 'Belgium' },
|
|
29
|
+
{ iso2: 'BZ', dialCode: '+501', name: 'Belize' },
|
|
30
|
+
{ iso2: 'BJ', dialCode: '+229', name: 'Benin' },
|
|
31
|
+
{ iso2: 'BT', dialCode: '+975', name: 'Bhutan' },
|
|
32
|
+
{ iso2: 'BO', dialCode: '+591', name: 'Bolivia' },
|
|
33
|
+
{ iso2: 'BA', dialCode: '+387', name: 'Bosnia and Herzegovina' },
|
|
34
|
+
{ iso2: 'BW', dialCode: '+267', name: 'Botswana' },
|
|
35
|
+
{ iso2: 'BR', dialCode: '+55', name: 'Brazil' },
|
|
36
|
+
{ iso2: 'BN', dialCode: '+673', name: 'Brunei' },
|
|
37
|
+
{ iso2: 'BG', dialCode: '+359', name: 'Bulgaria' },
|
|
38
|
+
{ iso2: 'BF', dialCode: '+226', name: 'Burkina Faso' },
|
|
39
|
+
{ iso2: 'BI', dialCode: '+257', name: 'Burundi' },
|
|
40
|
+
{ iso2: 'KH', dialCode: '+855', name: 'Cambodia' },
|
|
41
|
+
{ iso2: 'CM', dialCode: '+237', name: 'Cameroon' },
|
|
42
|
+
{ iso2: 'CA', dialCode: '+1', name: 'Canada' },
|
|
43
|
+
{ iso2: 'CV', dialCode: '+238', name: 'Cape Verde' },
|
|
44
|
+
{ iso2: 'CF', dialCode: '+236', name: 'Central African Republic' },
|
|
45
|
+
{ iso2: 'TD', dialCode: '+235', name: 'Chad' },
|
|
46
|
+
{ iso2: 'CL', dialCode: '+56', name: 'Chile' },
|
|
47
|
+
{ iso2: 'CN', dialCode: '+86', name: 'China' },
|
|
48
|
+
{ iso2: 'CO', dialCode: '+57', name: 'Colombia' },
|
|
49
|
+
{ iso2: 'KM', dialCode: '+269', name: 'Comoros' },
|
|
50
|
+
{ iso2: 'CD', dialCode: '+243', name: 'Congo (DRC)' },
|
|
51
|
+
{ iso2: 'CG', dialCode: '+242', name: 'Congo (Republic)' },
|
|
52
|
+
{ iso2: 'CR', dialCode: '+506', name: 'Costa Rica' },
|
|
53
|
+
{ iso2: 'CI', dialCode: '+225', name: 'Côte d\'Ivoire' },
|
|
54
|
+
{ iso2: 'HR', dialCode: '+385', name: 'Croatia' },
|
|
55
|
+
{ iso2: 'CU', dialCode: '+53', name: 'Cuba' },
|
|
56
|
+
{ iso2: 'CY', dialCode: '+357', name: 'Cyprus' },
|
|
57
|
+
{ iso2: 'CZ', dialCode: '+420', name: 'Czech Republic' },
|
|
58
|
+
{ iso2: 'DK', dialCode: '+45', name: 'Denmark' },
|
|
59
|
+
{ iso2: 'DJ', dialCode: '+253', name: 'Djibouti' },
|
|
60
|
+
{ iso2: 'DM', dialCode: '+1767', name: 'Dominica' },
|
|
61
|
+
{ iso2: 'DO', dialCode: '+1809', name: 'Dominican Republic' },
|
|
62
|
+
{ iso2: 'EC', dialCode: '+593', name: 'Ecuador' },
|
|
63
|
+
{ iso2: 'EG', dialCode: '+20', name: 'Egypt' },
|
|
64
|
+
{ iso2: 'SV', dialCode: '+503', name: 'El Salvador' },
|
|
65
|
+
{ iso2: 'GQ', dialCode: '+240', name: 'Equatorial Guinea' },
|
|
66
|
+
{ iso2: 'ER', dialCode: '+291', name: 'Eritrea' },
|
|
67
|
+
{ iso2: 'EE', dialCode: '+372', name: 'Estonia' },
|
|
68
|
+
{ iso2: 'SZ', dialCode: '+268', name: 'Eswatini' },
|
|
69
|
+
{ iso2: 'ET', dialCode: '+251', name: 'Ethiopia' },
|
|
70
|
+
{ iso2: 'FJ', dialCode: '+679', name: 'Fiji' },
|
|
71
|
+
{ iso2: 'FI', dialCode: '+358', name: 'Finland' },
|
|
72
|
+
{ iso2: 'FR', dialCode: '+33', name: 'France' },
|
|
73
|
+
{ iso2: 'GA', dialCode: '+241', name: 'Gabon' },
|
|
74
|
+
{ iso2: 'GM', dialCode: '+220', name: 'Gambia' },
|
|
75
|
+
{ iso2: 'GE', dialCode: '+995', name: 'Georgia' },
|
|
76
|
+
{ iso2: 'DE', dialCode: '+49', name: 'Germany' },
|
|
77
|
+
{ iso2: 'GH', dialCode: '+233', name: 'Ghana' },
|
|
78
|
+
{ iso2: 'GR', dialCode: '+30', name: 'Greece' },
|
|
79
|
+
{ iso2: 'GD', dialCode: '+1473', name: 'Grenada' },
|
|
80
|
+
{ iso2: 'GT', dialCode: '+502', name: 'Guatemala' },
|
|
81
|
+
{ iso2: 'GN', dialCode: '+224', name: 'Guinea' },
|
|
82
|
+
{ iso2: 'GW', dialCode: '+245', name: 'Guinea-Bissau' },
|
|
83
|
+
{ iso2: 'GY', dialCode: '+592', name: 'Guyana' },
|
|
84
|
+
{ iso2: 'HT', dialCode: '+509', name: 'Haiti' },
|
|
85
|
+
{ iso2: 'HN', dialCode: '+504', name: 'Honduras' },
|
|
86
|
+
{ iso2: 'HU', dialCode: '+36', name: 'Hungary' },
|
|
87
|
+
{ iso2: 'IS', dialCode: '+354', name: 'Iceland' },
|
|
88
|
+
{ iso2: 'IN', dialCode: '+91', name: 'India' },
|
|
89
|
+
{ iso2: 'ID', dialCode: '+62', name: 'Indonesia' },
|
|
90
|
+
{ iso2: 'IR', dialCode: '+98', name: 'Iran' },
|
|
91
|
+
{ iso2: 'IQ', dialCode: '+964', name: 'Iraq' },
|
|
92
|
+
{ iso2: 'IE', dialCode: '+353', name: 'Ireland' },
|
|
93
|
+
{ iso2: 'IL', dialCode: '+972', name: 'Israel' },
|
|
94
|
+
{ iso2: 'IT', dialCode: '+39', name: 'Italy' },
|
|
95
|
+
{ iso2: 'JM', dialCode: '+1876', name: 'Jamaica' },
|
|
96
|
+
{ iso2: 'JP', dialCode: '+81', name: 'Japan' },
|
|
97
|
+
{ iso2: 'JO', dialCode: '+962', name: 'Jordan' },
|
|
98
|
+
{ iso2: 'KZ', dialCode: '+7', name: 'Kazakhstan' },
|
|
99
|
+
{ iso2: 'KE', dialCode: '+254', name: 'Kenya' },
|
|
100
|
+
{ iso2: 'KI', dialCode: '+686', name: 'Kiribati' },
|
|
101
|
+
{ iso2: 'KW', dialCode: '+965', name: 'Kuwait' },
|
|
102
|
+
{ iso2: 'KG', dialCode: '+996', name: 'Kyrgyzstan' },
|
|
103
|
+
{ iso2: 'LA', dialCode: '+856', name: 'Laos' },
|
|
104
|
+
{ iso2: 'LV', dialCode: '+371', name: 'Latvia' },
|
|
105
|
+
{ iso2: 'LB', dialCode: '+961', name: 'Lebanon' },
|
|
106
|
+
{ iso2: 'LS', dialCode: '+266', name: 'Lesotho' },
|
|
107
|
+
{ iso2: 'LR', dialCode: '+231', name: 'Liberia' },
|
|
108
|
+
{ iso2: 'LY', dialCode: '+218', name: 'Libya' },
|
|
109
|
+
{ iso2: 'LI', dialCode: '+423', name: 'Liechtenstein' },
|
|
110
|
+
{ iso2: 'LT', dialCode: '+370', name: 'Lithuania' },
|
|
111
|
+
{ iso2: 'LU', dialCode: '+352', name: 'Luxembourg' },
|
|
112
|
+
{ iso2: 'MG', dialCode: '+261', name: 'Madagascar' },
|
|
113
|
+
{ iso2: 'MW', dialCode: '+265', name: 'Malawi' },
|
|
114
|
+
{ iso2: 'MY', dialCode: '+60', name: 'Malaysia' },
|
|
115
|
+
{ iso2: 'MV', dialCode: '+960', name: 'Maldives' },
|
|
116
|
+
{ iso2: 'ML', dialCode: '+223', name: 'Mali' },
|
|
117
|
+
{ iso2: 'MT', dialCode: '+356', name: 'Malta' },
|
|
118
|
+
{ iso2: 'MH', dialCode: '+692', name: 'Marshall Islands' },
|
|
119
|
+
{ iso2: 'MR', dialCode: '+222', name: 'Mauritania' },
|
|
120
|
+
{ iso2: 'MU', dialCode: '+230', name: 'Mauritius' },
|
|
121
|
+
{ iso2: 'MX', dialCode: '+52', name: 'Mexico' },
|
|
122
|
+
{ iso2: 'FM', dialCode: '+691', name: 'Micronesia' },
|
|
123
|
+
{ iso2: 'MD', dialCode: '+373', name: 'Moldova' },
|
|
124
|
+
{ iso2: 'MC', dialCode: '+377', name: 'Monaco' },
|
|
125
|
+
{ iso2: 'MN', dialCode: '+976', name: 'Mongolia' },
|
|
126
|
+
{ iso2: 'ME', dialCode: '+382', name: 'Montenegro' },
|
|
127
|
+
{ iso2: 'MA', dialCode: '+212', name: 'Morocco' },
|
|
128
|
+
{ iso2: 'MZ', dialCode: '+258', name: 'Mozambique' },
|
|
129
|
+
{ iso2: 'MM', dialCode: '+95', name: 'Myanmar' },
|
|
130
|
+
{ iso2: 'NA', dialCode: '+264', name: 'Namibia' },
|
|
131
|
+
{ iso2: 'NR', dialCode: '+674', name: 'Nauru' },
|
|
132
|
+
{ iso2: 'NP', dialCode: '+977', name: 'Nepal' },
|
|
133
|
+
{ iso2: 'NL', dialCode: '+31', name: 'Netherlands' },
|
|
134
|
+
{ iso2: 'NZ', dialCode: '+64', name: 'New Zealand' },
|
|
135
|
+
{ iso2: 'NI', dialCode: '+505', name: 'Nicaragua' },
|
|
136
|
+
{ iso2: 'NE', dialCode: '+227', name: 'Niger' },
|
|
137
|
+
{ iso2: 'NG', dialCode: '+234', name: 'Nigeria' },
|
|
138
|
+
{ iso2: 'KP', dialCode: '+850', name: 'North Korea' },
|
|
139
|
+
{ iso2: 'MK', dialCode: '+389', name: 'North Macedonia' },
|
|
140
|
+
{ iso2: 'NO', dialCode: '+47', name: 'Norway' },
|
|
141
|
+
{ iso2: 'OM', dialCode: '+968', name: 'Oman' },
|
|
142
|
+
{ iso2: 'PK', dialCode: '+92', name: 'Pakistan' },
|
|
143
|
+
{ iso2: 'PW', dialCode: '+680', name: 'Palau' },
|
|
144
|
+
{ iso2: 'PS', dialCode: '+970', name: 'Palestine' },
|
|
145
|
+
{ iso2: 'PA', dialCode: '+507', name: 'Panama' },
|
|
146
|
+
{ iso2: 'PG', dialCode: '+675', name: 'Papua New Guinea' },
|
|
147
|
+
{ iso2: 'PY', dialCode: '+595', name: 'Paraguay' },
|
|
148
|
+
{ iso2: 'PE', dialCode: '+51', name: 'Peru' },
|
|
149
|
+
{ iso2: 'PH', dialCode: '+63', name: 'Philippines' },
|
|
150
|
+
{ iso2: 'PL', dialCode: '+48', name: 'Poland' },
|
|
151
|
+
{ iso2: 'PT', dialCode: '+351', name: 'Portugal' },
|
|
152
|
+
{ iso2: 'QA', dialCode: '+974', name: 'Qatar' },
|
|
153
|
+
{ iso2: 'RO', dialCode: '+40', name: 'Romania' },
|
|
154
|
+
{ iso2: 'RU', dialCode: '+7', name: 'Russia' },
|
|
155
|
+
{ iso2: 'RW', dialCode: '+250', name: 'Rwanda' },
|
|
156
|
+
{ iso2: 'KN', dialCode: '+1869', name: 'Saint Kitts and Nevis' },
|
|
157
|
+
{ iso2: 'LC', dialCode: '+1758', name: 'Saint Lucia' },
|
|
158
|
+
{ iso2: 'VC', dialCode: '+1784', name: 'Saint Vincent and the Grenadines' },
|
|
159
|
+
{ iso2: 'WS', dialCode: '+685', name: 'Samoa' },
|
|
160
|
+
{ iso2: 'SM', dialCode: '+378', name: 'San Marino' },
|
|
161
|
+
{ iso2: 'ST', dialCode: '+239', name: 'São Tomé and Príncipe' },
|
|
162
|
+
{ iso2: 'SA', dialCode: '+966', name: 'Saudi Arabia' },
|
|
163
|
+
{ iso2: 'SN', dialCode: '+221', name: 'Senegal' },
|
|
164
|
+
{ iso2: 'RS', dialCode: '+381', name: 'Serbia' },
|
|
165
|
+
{ iso2: 'SC', dialCode: '+248', name: 'Seychelles' },
|
|
166
|
+
{ iso2: 'SL', dialCode: '+232', name: 'Sierra Leone' },
|
|
167
|
+
{ iso2: 'SG', dialCode: '+65', name: 'Singapore' },
|
|
168
|
+
{ iso2: 'SK', dialCode: '+421', name: 'Slovakia' },
|
|
169
|
+
{ iso2: 'SI', dialCode: '+386', name: 'Slovenia' },
|
|
170
|
+
{ iso2: 'SB', dialCode: '+677', name: 'Solomon Islands' },
|
|
171
|
+
{ iso2: 'SO', dialCode: '+252', name: 'Somalia' },
|
|
172
|
+
{ iso2: 'ZA', dialCode: '+27', name: 'South Africa' },
|
|
173
|
+
{ iso2: 'KR', dialCode: '+82', name: 'South Korea' },
|
|
174
|
+
{ iso2: 'SS', dialCode: '+211', name: 'South Sudan' },
|
|
175
|
+
{ iso2: 'ES', dialCode: '+34', name: 'Spain' },
|
|
176
|
+
{ iso2: 'LK', dialCode: '+94', name: 'Sri Lanka' },
|
|
177
|
+
{ iso2: 'SD', dialCode: '+249', name: 'Sudan' },
|
|
178
|
+
{ iso2: 'SR', dialCode: '+597', name: 'Suriname' },
|
|
179
|
+
{ iso2: 'SE', dialCode: '+46', name: 'Sweden' },
|
|
180
|
+
{ iso2: 'CH', dialCode: '+41', name: 'Switzerland' },
|
|
181
|
+
{ iso2: 'SY', dialCode: '+963', name: 'Syria' },
|
|
182
|
+
{ iso2: 'TW', dialCode: '+886', name: 'Taiwan' },
|
|
183
|
+
{ iso2: 'TJ', dialCode: '+992', name: 'Tajikistan' },
|
|
184
|
+
{ iso2: 'TZ', dialCode: '+255', name: 'Tanzania' },
|
|
185
|
+
{ iso2: 'TH', dialCode: '+66', name: 'Thailand' },
|
|
186
|
+
{ iso2: 'TL', dialCode: '+670', name: 'Timor-Leste' },
|
|
187
|
+
{ iso2: 'TG', dialCode: '+228', name: 'Togo' },
|
|
188
|
+
{ iso2: 'TO', dialCode: '+676', name: 'Tonga' },
|
|
189
|
+
{ iso2: 'TT', dialCode: '+1868', name: 'Trinidad and Tobago' },
|
|
190
|
+
{ iso2: 'TN', dialCode: '+216', name: 'Tunisia' },
|
|
191
|
+
{ iso2: 'TR', dialCode: '+90', name: 'Turkey' },
|
|
192
|
+
{ iso2: 'TM', dialCode: '+993', name: 'Turkmenistan' },
|
|
193
|
+
{ iso2: 'TV', dialCode: '+688', name: 'Tuvalu' },
|
|
194
|
+
{ iso2: 'UG', dialCode: '+256', name: 'Uganda' },
|
|
195
|
+
{ iso2: 'UA', dialCode: '+380', name: 'Ukraine' },
|
|
196
|
+
{ iso2: 'AE', dialCode: '+971', name: 'United Arab Emirates' },
|
|
197
|
+
{ iso2: 'GB', dialCode: '+44', name: 'United Kingdom' },
|
|
198
|
+
{ iso2: 'US', dialCode: '+1', name: 'United States' },
|
|
199
|
+
{ iso2: 'UY', dialCode: '+598', name: 'Uruguay' },
|
|
200
|
+
{ iso2: 'UZ', dialCode: '+998', name: 'Uzbekistan' },
|
|
201
|
+
{ iso2: 'VU', dialCode: '+678', name: 'Vanuatu' },
|
|
202
|
+
{ iso2: 'VA', dialCode: '+379', name: 'Vatican City' },
|
|
203
|
+
{ iso2: 'VE', dialCode: '+58', name: 'Venezuela' },
|
|
204
|
+
{ iso2: 'VN', dialCode: '+84', name: 'Vietnam' },
|
|
205
|
+
{ iso2: 'YE', dialCode: '+967', name: 'Yemen' },
|
|
206
|
+
{ iso2: 'ZM', dialCode: '+260', name: 'Zambia' },
|
|
207
|
+
{ iso2: 'ZW', dialCode: '+263', name: 'Zimbabwe' },
|
|
208
|
+
];
|
|
209
|
+
/** ISO2 code → DialCode entry lookup. */
|
|
210
|
+
const DIAL_CODE_MAP = Object.fromEntries(DIAL_CODES.map((d) => [d.iso2, d]));
|
|
211
|
+
|
|
212
|
+
const coPhoneFieldCss = () => `:host{display:block;font-family:var(--co-font-family-primary);font-size:var(--co-font-size-14);letter-spacing:var(--co-font-letter-spacing-body);line-height:1;position:relative}.co-phone-field{display:flex;flex-direction:column;gap:var(--co-spacing-sm2);position:relative;font-family:var(--co-font-family-primary)}.co-phone-field--disabled{opacity:0.5;pointer-events:none}.co-phone-field__label{font-size:var(--co-font-size-14);font-weight:400;color:var(--co-semantic-text-secondary);padding:0 var(--co-spacing-xs)}.co-field-required{margin-left:2px;color:var(--co-color-status-error)}.co-field-required__caption{margin-left:4px;color:var(--co-semantic-text-muted);font-size:var(--co-font-size-12);font-weight:400}.co-field-required__caption::before{content:var(--co-field-required-text, ' (required)')}.co-phone-field__container{display:flex;align-items:center;gap:var(--co-spacing-sm2);padding:var(--co-spacing-sm2) var(--co-spacing-md);background:var(--co-semantic-surface-secondary);border:1px solid var(--co-semantic-border-subtle);border-radius:var(--co-border-radius-xs);transition:border-color 0.15s ease, box-shadow 0.15s ease;min-height:40px;box-sizing:border-box}.co-phone-field--error .co-phone-field__container{border-color:var(--co-color-status-error)}.co-phone-field__container:focus-within{border-color:var(--co-semantic-border-focus);box-shadow:0 0 0 2px color-mix(in srgb, var(--co-semantic-border-focus) 15%, transparent)}.co-phone-field__selector{display:flex;align-items:center;gap:var(--co-spacing-xs);padding:0;background:none;border:none;border-right:1px solid var(--co-semantic-border-subtle);padding-right:var(--co-spacing-sm);margin-right:var(--co-spacing-sm);cursor:pointer;font-size:inherit;font-family:inherit;color:var(--co-semantic-text-default);white-space:nowrap}.co-phone-field__selector:hover{opacity:0.8}.co-phone-field__flag{width:20px;height:15px;border-radius:2px;object-fit:cover}.co-phone-field__dial-code{font-size:var(--co-font-size-14);color:var(--co-semantic-text-secondary);font-weight:500}.co-phone-field__chevron{display:flex;align-items:center;color:var(--co-semantic-text-muted)}.co-phone-field__input{flex:1;min-width:0;padding:0;border:none;outline:none;font-size:inherit;font-family:inherit;font-weight:400;letter-spacing:inherit;color:var(--co-semantic-text-default);background:transparent;line-height:1}.co-phone-field__input::placeholder{color:var(--co-semantic-text-muted)}.co-phone-field__dropdown{position:absolute;top:100%;left:0;right:0;z-index:100;margin-top:var(--co-spacing-xs);background:var(--co-semantic-surface-page, #fff);border:1px solid var(--co-semantic-border-subtle);border-radius:var(--co-border-radius-xs);box-shadow:0 4px 16px rgba(0, 0, 0, 0.12);max-height:280px;display:flex;flex-direction:column;overflow:hidden}.co-phone-field__search{padding:var(--co-spacing-sm);border-bottom:1px solid var(--co-semantic-border-subtle)}.co-phone-field__search-input{width:100%;padding:var(--co-spacing-xs) var(--co-spacing-sm);border:1px solid var(--co-semantic-border-subtle);border-radius:var(--co-border-radius-xxs);font-size:var(--co-font-size-14);font-family:var(--co-font-family-primary);outline:none;background:var(--co-semantic-surface-secondary);color:var(--co-semantic-text-default);box-sizing:border-box}.co-phone-field__search-input:focus{border-color:var(--co-semantic-border-focus)}.co-phone-field__options{overflow-y:auto;flex:1}.co-phone-field__option{display:flex;align-items:center;gap:var(--co-spacing-sm);width:100%;padding:var(--co-spacing-sm) var(--co-spacing-md);border:none;background:none;cursor:pointer;font-size:var(--co-font-size-14);font-family:var(--co-font-family-primary);color:var(--co-semantic-text-default);text-align:left}.co-phone-field__option:hover{background:var(--co-semantic-surface-hover)}.co-phone-field__option--selected{background:color-mix(in srgb, var(--co-semantic-border-focus) 8%, transparent);font-weight:500}.co-phone-field__option-flag{width:20px;height:15px;border-radius:2px;object-fit:cover;flex-shrink:0}.co-phone-field__match{font-weight:700}.co-phone-field__option-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.co-phone-field__option-code{color:var(--co-semantic-text-muted);font-size:var(--co-font-size-12);white-space:nowrap}.co-phone-field__helper{display:flex;align-items:center;gap:var(--co-spacing-xs);padding:0 var(--co-spacing-xs);font-size:var(--co-font-size-14);color:var(--co-semantic-text-muted)}.co-phone-field__helper-icon{flex-shrink:0;display:flex;align-items:center}.co-phone-field--error .co-phone-field__helper{color:var(--co-semantic-status-error)}:host([layout='horizontal']) .co-phone-field{display:grid;grid-template-columns:var(--co-field-label-width, max-content) 1fr;align-items:start;column-gap:var(--co-spacing-md);row-gap:var(--co-spacing-sm2)}:host([layout='horizontal']) .co-phone-field__label{grid-column:1;grid-row:1;padding-top:var(--co-spacing-sm2);min-width:0}:host([layout='horizontal']) .co-phone-field__label{white-space:normal}:host([layout='horizontal']) .co-phone-field>:not(.co-phone-field__label){grid-column:2;min-width:0}`;
|
|
213
|
+
|
|
214
|
+
const CoPhoneField = class {
|
|
215
|
+
constructor(hostRef) {
|
|
216
|
+
index.registerInstance(this, hostRef);
|
|
217
|
+
this.coChange = index.createEvent(this, "coChange", 7);
|
|
218
|
+
/** Placeholder for the number input. */
|
|
219
|
+
this.placeholder = '';
|
|
220
|
+
/** Current full value (dialCode + number). */
|
|
221
|
+
this.value = '';
|
|
222
|
+
/** Disable the entire field. */
|
|
223
|
+
this.disabled = false;
|
|
224
|
+
/** Required indicator. */
|
|
225
|
+
this.required = false;
|
|
226
|
+
/** Validation status. */
|
|
227
|
+
this.status = 'default';
|
|
228
|
+
/** Label layout: vertical (label above) or horizontal (label beside) */
|
|
229
|
+
this.layout = 'vertical';
|
|
230
|
+
/** Default country ISO2 code (e.g. "CO", "US"). Optional — if not set, starts empty. */
|
|
231
|
+
this.defaultCountry = '';
|
|
232
|
+
this.selectedIso2 = '';
|
|
233
|
+
this.numberPart = '';
|
|
234
|
+
this.isOpen = false;
|
|
235
|
+
this.searchQuery = '';
|
|
236
|
+
this.handleOutsideClick = (e) => {
|
|
237
|
+
if (!this.isOpen)
|
|
238
|
+
return;
|
|
239
|
+
const path = e.composedPath();
|
|
240
|
+
const shadowRoot = this.host.shadowRoot;
|
|
241
|
+
if (!shadowRoot)
|
|
242
|
+
return;
|
|
243
|
+
const dropdown = shadowRoot.querySelector('.co-phone-field__dropdown');
|
|
244
|
+
const selector = shadowRoot.querySelector('.co-phone-field__selector');
|
|
245
|
+
if (dropdown && path.includes(dropdown))
|
|
246
|
+
return;
|
|
247
|
+
if (selector && path.includes(selector))
|
|
248
|
+
return;
|
|
249
|
+
this.isOpen = false;
|
|
250
|
+
this.searchQuery = '';
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
get selectedEntry() {
|
|
254
|
+
var _a;
|
|
255
|
+
if (!this.selectedIso2)
|
|
256
|
+
return null;
|
|
257
|
+
return (_a = DIAL_CODE_MAP[this.selectedIso2]) !== null && _a !== void 0 ? _a : null;
|
|
258
|
+
}
|
|
259
|
+
get filteredCountries() {
|
|
260
|
+
if (!this.searchQuery.trim())
|
|
261
|
+
return DIAL_CODES;
|
|
262
|
+
return normalizeText.rankByMatch(DIAL_CODES, this.searchQuery, (d) => [d.name, d.dialCode, d.iso2]);
|
|
263
|
+
}
|
|
264
|
+
/** Country name with the matched substring wrapped for highlighting. */
|
|
265
|
+
renderName(name) {
|
|
266
|
+
const seg = this.searchQuery.trim() ? normalizeText.highlightMatch(name, this.searchQuery) : null;
|
|
267
|
+
if (!seg)
|
|
268
|
+
return name;
|
|
269
|
+
return [seg.pre, index.h("span", { class: "co-phone-field__match" }, seg.match), seg.post];
|
|
270
|
+
}
|
|
271
|
+
onValueChange(newVal) {
|
|
272
|
+
if (!newVal) {
|
|
273
|
+
this.numberPart = '';
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
// Try to parse dial code from value.
|
|
277
|
+
const match = this.findDialCodeInValue(newVal);
|
|
278
|
+
if (match) {
|
|
279
|
+
this.selectedIso2 = match.iso2;
|
|
280
|
+
this.numberPart = newVal.slice(match.dialCode.length).trim();
|
|
281
|
+
}
|
|
282
|
+
else {
|
|
283
|
+
this.numberPart = newVal;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
onDefaultCountryChange(iso2) {
|
|
287
|
+
if (DIAL_CODE_MAP[iso2] && !this.value) {
|
|
288
|
+
this.selectedIso2 = iso2;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
componentWillLoad() {
|
|
292
|
+
if (this.defaultCountry && DIAL_CODE_MAP[this.defaultCountry]) {
|
|
293
|
+
this.selectedIso2 = this.defaultCountry;
|
|
294
|
+
}
|
|
295
|
+
if (this.value) {
|
|
296
|
+
this.onValueChange(this.value);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
get hasCountry() {
|
|
300
|
+
return !!this.selectedIso2 && !!this.selectedEntry;
|
|
301
|
+
}
|
|
302
|
+
get statusIcon() {
|
|
303
|
+
const map = {
|
|
304
|
+
error: 'warning-circle',
|
|
305
|
+
success: 'check-circle',
|
|
306
|
+
warning: 'warning',
|
|
307
|
+
info: 'info',
|
|
308
|
+
};
|
|
309
|
+
return map[this.status] || null;
|
|
310
|
+
}
|
|
311
|
+
findDialCodeInValue(val) {
|
|
312
|
+
if (!val.startsWith('+'))
|
|
313
|
+
return null;
|
|
314
|
+
// Try longest matching dial code first (max 5 digits after +).
|
|
315
|
+
for (let len = 5; len >= 1; len--) {
|
|
316
|
+
const prefix = val.slice(0, len + 1); // includes '+'
|
|
317
|
+
const entry = DIAL_CODES.find((d) => d.dialCode === prefix);
|
|
318
|
+
if (entry)
|
|
319
|
+
return entry;
|
|
320
|
+
}
|
|
321
|
+
return null;
|
|
322
|
+
}
|
|
323
|
+
emitValue() {
|
|
324
|
+
var _a, _b;
|
|
325
|
+
const dialCode = (_b = (_a = this.selectedEntry) === null || _a === void 0 ? void 0 : _a.dialCode) !== null && _b !== void 0 ? _b : '';
|
|
326
|
+
const full = this.numberPart
|
|
327
|
+
? `${dialCode}${this.numberPart}`
|
|
328
|
+
: '';
|
|
329
|
+
this.value = full;
|
|
330
|
+
this.coChange.emit(full);
|
|
331
|
+
}
|
|
332
|
+
handleCountrySelect(entry) {
|
|
333
|
+
this.selectedIso2 = entry.iso2;
|
|
334
|
+
this.isOpen = false;
|
|
335
|
+
this.searchQuery = '';
|
|
336
|
+
this.emitValue();
|
|
337
|
+
}
|
|
338
|
+
handleNumberInput(e) {
|
|
339
|
+
const input = e.target;
|
|
340
|
+
this.numberPart = input.value;
|
|
341
|
+
this.emitValue();
|
|
342
|
+
}
|
|
343
|
+
handleToggleDropdown() {
|
|
344
|
+
if (this.disabled)
|
|
345
|
+
return;
|
|
346
|
+
this.isOpen = !this.isOpen;
|
|
347
|
+
if (!this.isOpen)
|
|
348
|
+
this.searchQuery = '';
|
|
349
|
+
}
|
|
350
|
+
handleSearchInput(e) {
|
|
351
|
+
this.searchQuery = e.target.value;
|
|
352
|
+
}
|
|
353
|
+
connectedCallback() {
|
|
354
|
+
document.addEventListener('click', this.handleOutsideClick, true);
|
|
355
|
+
}
|
|
356
|
+
disconnectedCallback() {
|
|
357
|
+
document.removeEventListener('click', this.handleOutsideClick, true);
|
|
358
|
+
}
|
|
359
|
+
render() {
|
|
360
|
+
const entry = this.selectedEntry;
|
|
361
|
+
const statusClass = this.status !== 'default' ? `co-phone-field--${this.status}` : '';
|
|
362
|
+
return (index.h("div", { key: '61e58d6f39daa5130148bb229fed15e3402a4987', class: `co-phone-field ${statusClass} ${this.disabled ? 'co-phone-field--disabled' : ''}` }, this.label && (index.h("label", { key: 'cc24f2c92d24fa66828268158193b9dd64d050ae', class: "co-phone-field__label" }, this.label, index.h(requiredMark.RequiredMark, { key: 'ff8ab5e5247eb30dff31dfcdd3c9ac2ac3bc8dfb', required: this.required }))), index.h("div", { key: '1b766042a786a1f22409951c97aabc6c7ab82f44', class: "co-phone-field__container" }, index.h("button", { key: 'db0a2cf11103634f0402e6c7a6c6aa1121bc403b', type: "button", class: "co-phone-field__selector", disabled: this.disabled, onClick: () => this.handleToggleDropdown(), "aria-expanded": String(this.isOpen), "aria-haspopup": "listbox" }, entry ? (index.h("img", { class: "co-phone-field__flag", src: `https://flagcdn.com/w40/${entry.iso2.toLowerCase()}.png`, alt: entry.iso2 })) : (index.h("co-icon", { name: "phone", size: 16 })), index.h("span", { key: '5ad781fe48f4e3f5c88a0cd9f4a92e69cebaf393', class: "co-phone-field__dial-code" }, entry ? entry.dialCode : ''), index.h("span", { key: '69d004f8325baca6373bd6e9550fde42ce2b7fbe', class: "co-phone-field__chevron" }, index.h("co-icon", { key: 'd2a2f07e9d3aa20a2eb3ad3408c06e6d3efc2e22', name: "caret-down", size: 14 }))), index.h("input", { key: '258f24c54235fc4a38ef5c2cf42d68f5a80b73a8', class: "co-phone-field__input", type: "tel", placeholder: this.placeholder, value: this.numberPart, disabled: this.disabled, onInput: (e) => this.handleNumberInput(e) })), this.isOpen && (index.h("div", { key: 'c13b342deec9b8f6cc8c3da73858a9329de1e5c3', class: "co-phone-field__dropdown", role: "listbox" }, index.h("div", { key: '1f791495027ada8c1486e58b539867eb10554281', class: "co-phone-field__search" }, index.h("input", { key: '3ff02dd2e24efc501443c281ce93a96d4f4a3d7a', class: "co-phone-field__search-input", type: "text", placeholder: "Search country...", value: this.searchQuery, onInput: (e) => this.handleSearchInput(e), autoFocus: true })), index.h("div", { key: '05109209b87485b0c1d84711eb7c1628d09a75f4', class: "co-phone-field__options" }, this.filteredCountries.map((d) => (index.h("button", { type: "button", key: d.iso2, class: `co-phone-field__option ${d.iso2 === this.selectedIso2 ? 'co-phone-field__option--selected' : ''}`, role: "option", "aria-selected": d.iso2 === this.selectedIso2 ? 'true' : 'false', onClick: () => this.handleCountrySelect(d) }, index.h("img", { class: "co-phone-field__option-flag", src: `https://flagcdn.com/w40/${d.iso2.toLowerCase()}.png`, alt: d.iso2 }), index.h("span", { class: "co-phone-field__option-name" }, this.renderName(d.name)), index.h("span", { class: "co-phone-field__option-code" }, d.dialCode))))))), this.helperText && (index.h("div", { key: 'deb3306ebdd5cf47f68f9e3c62f8a3e7570692a6', class: "co-phone-field__helper" }, this.statusIcon && (index.h("co-icon", { key: '5bc8a04b4d0690dcae07eb2f9296ff80da52a9a6', name: this.statusIcon, size: 14, weight: "fill", class: "co-phone-field__helper-icon" })), index.h("span", { key: '9d32dcb09ef84562bde2ccd0341dfca85a982000', class: "co-phone-field__helper-text" }, this.helperText)))));
|
|
363
|
+
}
|
|
364
|
+
get host() { return index.getElement(this); }
|
|
365
|
+
static get watchers() { return {
|
|
366
|
+
"value": [{
|
|
367
|
+
"onValueChange": 0
|
|
368
|
+
}],
|
|
369
|
+
"defaultCountry": [{
|
|
370
|
+
"onDefaultCountryChange": 0
|
|
371
|
+
}]
|
|
372
|
+
}; }
|
|
373
|
+
};
|
|
374
|
+
CoPhoneField.style = coPhoneFieldCss();
|
|
375
|
+
|
|
376
|
+
exports.co_phone_field = CoPhoneField;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var positioning = require('./positioning-
|
|
3
|
+
var index = require('./index-DoFnrUVH.js');
|
|
4
|
+
var positioning = require('./positioning-DwHW399W.js');
|
|
5
5
|
|
|
6
6
|
const coPopoverCss = () => `:host{display:inline-block;position:relative}:host([match-width]){display:block;width:100%}.co-popover{display:block;width:100%}.co-popover__trigger{display:block;width:100%;cursor:pointer}.co-popover__panel{position:fixed;top:0;left:0;z-index:10000;visibility:hidden;background:var(--co-semantic-surface-page, #fff);border:1px solid var(--co-semantic-border-subtle);border-radius:var(--co-border-radius-sm, 12px);box-shadow:0 4px 16px rgba(31, 28, 27, 0.08);overflow:visible}.co-popover__panel--positioned{visibility:visible}`;
|
|
7
7
|
|
|
@@ -192,12 +192,12 @@ const CoPopover = class {
|
|
|
192
192
|
}
|
|
193
193
|
// ── Render ─────────────────────────────────────────────────
|
|
194
194
|
render() {
|
|
195
|
-
return (index.h("div", { key: '
|
|
195
|
+
return (index.h("div", { key: '4a41d0ad2982a876a0363d16aa10fce661dfbe2f', class: "co-popover" }, index.h("div", { key: 'fa8d4ad46ca09489beeafeb9a08106c09c2c8d70', class: "co-popover__trigger", ref: (el) => (this.triggerEl = el), onClick: this.handleTriggerClick }, index.h("slot", { key: '820c4741ee9f6d2e3d171b25b987c174a523db89', name: "trigger" })), this.open && (index.h("div", { key: '8abfea810cc0a2041c1280594a0c5c2eb71b1fd8', class: "co-popover__panel", ref: (el) => {
|
|
196
196
|
if (el && el !== this.panelEl) {
|
|
197
197
|
this.panelEl = el;
|
|
198
198
|
this.scheduleUpdate();
|
|
199
199
|
}
|
|
200
|
-
} }, index.h("slot", { key: '
|
|
200
|
+
} }, index.h("slot", { key: '50632e7bb1cbb34b05cf5f6f0ba86d458a074bc0' })))));
|
|
201
201
|
}
|
|
202
202
|
get el() { return index.getElement(this); }
|
|
203
203
|
static get watchers() { return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-DoFnrUVH.js');
|
|
4
4
|
|
|
5
5
|
const coProgressBarCss = () => `:host{display:block;width:100%}.co-progress-bar{width:100%;border-radius:9999px;overflow:hidden;background:var(--co-semantic-border-subtle);position:relative}.co-progress-bar__fill{height:100%;border-radius:9999px;transition:width 0.3s ease}.co-progress-bar--solid .co-progress-bar__fill{background:var(--co-semantic-status-info)}.co-progress-bar--solid.co-progress-bar--success .co-progress-bar__fill{background:var(--co-semantic-status-success)}.co-progress-bar--solid.co-progress-bar--warning .co-progress-bar__fill{background:var(--co-semantic-status-warning)}.co-progress-bar--solid.co-progress-bar--error .co-progress-bar__fill{background:var(--co-semantic-status-error)}.co-progress-bar--dashed{background:transparent;border:2px dashed var(--co-semantic-border-subtle)}.co-progress-bar--dashed .co-progress-bar__fill{background:transparent;border-bottom:2px dashed var(--co-semantic-status-info);border-radius:0}.co-progress-bar--dashed.co-progress-bar--success .co-progress-bar__fill{border-bottom-color:var(--co-semantic-status-success)}.co-progress-bar--dashed.co-progress-bar--warning .co-progress-bar__fill{border-bottom-color:var(--co-semantic-status-warning)}.co-progress-bar--dashed.co-progress-bar--error .co-progress-bar__fill{border-bottom-color:var(--co-semantic-status-error)}.co-progress-bar--dashed.co-progress-bar--default{border-color:var(--co-semantic-border-muted)}`;
|
|
6
6
|
|
|
@@ -18,11 +18,11 @@ const CoProgressBar = class {
|
|
|
18
18
|
}
|
|
19
19
|
render() {
|
|
20
20
|
const clamped = Math.max(0, Math.min(100, this.value));
|
|
21
|
-
return (index.h("div", { key: '
|
|
21
|
+
return (index.h("div", { key: '6d81d6941a783cbed036d81c4f0f9ffd2e5d504d', class: {
|
|
22
22
|
'co-progress-bar': true,
|
|
23
23
|
[`co-progress-bar--${this.status}`]: true,
|
|
24
24
|
[`co-progress-bar--${this.variant}`]: true,
|
|
25
|
-
}, role: "progressbar", "aria-valuenow": clamped, "aria-valuemin": 0, "aria-valuemax": 100, part: "bar", style: { height: `${this.thickness}px` } }, index.h("div", { key: '
|
|
25
|
+
}, role: "progressbar", "aria-valuenow": clamped, "aria-valuemin": 0, "aria-valuemax": 100, part: "bar", style: { height: `${this.thickness}px` } }, index.h("div", { key: '2a16b4532e464cf3bd2db8d809600b40d750b125', class: "co-progress-bar__fill", style: { width: `${clamped}%` } })));
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
CoProgressBar.style = coProgressBarCss();
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-DoFnrUVH.js');
|
|
4
|
+
|
|
5
|
+
const coProgressCircleCss = () => `:host{display:inline-flex}.co-progress-circle{--_color:var(--co-semantic-status-info, #2563eb);--_track:var(--co-color-opacity-negro-8, rgba(0, 0, 0, 0.08));position:relative;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;background:conic-gradient( var(--_color) var(--co-pc-angle, 0deg), var(--_track) var(--co-pc-angle, 0deg) );transition:background 0.3s ease}.co-progress-circle__track{position:absolute;inset:var(--co-pc-stroke, 4px);border-radius:50%;background:var(--co-semantic-surface-page, #fff)}.co-progress-circle__label{position:relative;z-index:1;font-family:var(--co-font-family-primary);font-size:var(--co-font-size-11, 11px);font-weight:600;color:var(--_color);line-height:1;pointer-events:none}.co-progress-circle--success{--_color:var(--co-semantic-status-success, #0a7724)}.co-progress-circle--warning{--_color:var(--co-semantic-status-warning, #f59e0b)}.co-progress-circle--error{--_color:var(--co-semantic-status-error, #aa2e1b)}`;
|
|
6
|
+
|
|
7
|
+
const CoProgressCircle = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
index.registerInstance(this, hostRef);
|
|
10
|
+
/** Progress value 0-100 */
|
|
11
|
+
this.value = 0;
|
|
12
|
+
/** Status / color variant */
|
|
13
|
+
this.status = 'default';
|
|
14
|
+
/** Diameter of the circle in px */
|
|
15
|
+
this.size = 40;
|
|
16
|
+
/** Stroke width in px */
|
|
17
|
+
this.strokeWidth = 2;
|
|
18
|
+
/** Show percentage label inside */
|
|
19
|
+
this.showLabel = true;
|
|
20
|
+
}
|
|
21
|
+
render() {
|
|
22
|
+
const clamped = Math.max(0, Math.min(100, this.value));
|
|
23
|
+
const angle = (clamped / 100) * 360;
|
|
24
|
+
const safeStroke = Math.min(this.strokeWidth, this.size / 2);
|
|
25
|
+
return (index.h("div", { key: '992ae1f0476cad32f27779742265333134c31d2e', class: {
|
|
26
|
+
'co-progress-circle': true,
|
|
27
|
+
[`co-progress-circle--${this.status}`]: true,
|
|
28
|
+
}, role: "progressbar", "aria-valuenow": clamped, "aria-valuemin": 0, "aria-valuemax": 100, part: "circle", style: {
|
|
29
|
+
width: `${this.size}px`,
|
|
30
|
+
height: `${this.size}px`,
|
|
31
|
+
'--co-pc-angle': `${angle}deg`,
|
|
32
|
+
'--co-pc-stroke': `${safeStroke}px`,
|
|
33
|
+
} }, index.h("div", { key: 'f39ad29a8ef70bc4c7f6c6afbeb817b7d3b3fcdd', class: "co-progress-circle__track" }), this.showLabel && (index.h("span", { key: 'b639b4730e3707cfaa613057805c4a196cc584d1', class: "co-progress-circle__label" }, clamped, "%"))));
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
CoProgressCircle.style = coProgressCircleCss();
|
|
37
|
+
|
|
38
|
+
exports.co_progress_circle = CoProgressCircle;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-DoFnrUVH.js');
|
|
4
4
|
|
|
5
|
-
const coRadioGroupCss = () => `:host{display:block;font-family:var(--co-font-family-primary);font-size:var(--co-font-size-14);letter-spacing:var(--co-font-letter-spacing-body);line-height:1}.co-radio-group{display:flex;flex-direction:column;gap:var(--co-spacing-sm2)}.co-radio-group__labels{display:flex;align-items:center;justify-content:space-between;padding:0 var(--co-spacing-xs);gap:var(--co-spacing-sm2)}.co-radio-group__label{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);font-weight:400;line-height:1;white-space:nowrap;cursor:default}.co-radio-group__secondary-label{color:var(--co-semantic-text-muted);font-size:var(--co-font-size-14);font-weight:400;line-height:1;white-space:nowrap;text-align:right}.co-radio-group--disabled .co-radio-group__label,.co-radio-group--disabled .co-radio-group__secondary-label{color:var(--co-semantic-text-disabled)}.co-radio-group__options{display:flex;gap:var(--co-spacing-md)}.co-radio-group__options--column{flex-direction:column;gap:var(--co-spacing-sm2)}.co-radio-group__options--row{flex-direction:row;flex-wrap:wrap;gap:var(--co-spacing-md)}.co-radio-group__item{display:flex;align-items:center;gap:var(--co-spacing-sm2);cursor:pointer;user-select:none}.co-radio-group__item--disabled{cursor:not-allowed}.co-radio-group__option-label{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);font-weight:400;line-height:1;white-space:nowrap}.co-radio-group__item--disabled .co-radio-group__option-label{color:var(--co-semantic-text-disabled)}.co-radio-group__circle{position:relative;display:inline-flex;align-items:center;justify-content:center;border-style:solid;border-width:1.5px;border-radius:var(--co-border-radius-full);background:transparent;flex-shrink:0;box-sizing:border-box;transition:border-color 0.15s ease;overflow:hidden}.co-radio-group__circle--small{width:16px;height:16px}.co-radio-group__circle--large{width:24px;height:24px}.co-radio-group__circle:not(.co-radio-group__circle--checked){border-color:var(--co-semantic-border-default)}.co-radio-group__circle--checked{border-color:var(--co-semantic-border-strong)}.co-radio-group__circle--checked::after{content:'';display:block;border-radius:var(--co-border-radius-full);background:var(--co-semantic-surface-primary)}.co-radio-group__circle--small.co-radio-group__circle--checked::after{width:8px;height:8px}.co-radio-group__circle--large.co-radio-group__circle--checked::after{width:14px;height:14px}.co-radio-group__circle--disabled{opacity:0.4;cursor:not-allowed;pointer-events:none}.co-radio-group--error .co-radio-group__circle{border-color:var(--co-semantic-status-error)}.co-radio-group__helper{display:flex;align-items:center;gap:var(--co-spacing-xs);padding:0 var(--co-spacing-xs)}.co-radio-group__helper-icon{flex-shrink:0;display:flex;align-items:center}.co-radio-group__helper-text{color:var(--co-semantic-text-muted);font-size:var(--co-font-size-14);font-weight:400;line-height:1}.co-radio-group__helper--error .co-radio-group__helper-icon,.co-radio-group__helper--error .co-radio-group__helper-text{color:var(--co-semantic-status-error)}.co-radio-group__helper--success .co-radio-group__helper-icon,.co-radio-group__helper--success .co-radio-group__helper-text{color:var(--co-semantic-status-success)}.co-radio-group__helper--warning .co-radio-group__helper-icon,.co-radio-group__helper--warning .co-radio-group__helper-text{color:var(--co-color-status-review)}.co-radio-group__helper--info .co-radio-group__helper-icon,.co-radio-group__helper--info .co-radio-group__helper-text{color:var(--co-semantic-status-info)}`;
|
|
5
|
+
const coRadioGroupCss = () => `:host{display:block;font-family:var(--co-font-family-primary);font-size:var(--co-font-size-14);letter-spacing:var(--co-font-letter-spacing-body);line-height:1}.co-radio-group{display:flex;flex-direction:column;gap:var(--co-spacing-sm2)}.co-radio-group__labels{display:flex;align-items:center;justify-content:space-between;padding:0 var(--co-spacing-xs);gap:var(--co-spacing-sm2)}.co-radio-group__label{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);font-weight:400;line-height:1;white-space:nowrap;cursor:default}.co-radio-group__secondary-label{color:var(--co-semantic-text-muted);font-size:var(--co-font-size-14);font-weight:400;line-height:1;white-space:nowrap;text-align:right}.co-radio-group--disabled .co-radio-group__label,.co-radio-group--disabled .co-radio-group__secondary-label{color:var(--co-semantic-text-disabled)}.co-radio-group__options{display:flex;gap:var(--co-spacing-md)}.co-radio-group__options--column{flex-direction:column;gap:var(--co-spacing-sm2)}.co-radio-group__options--row{flex-direction:row;flex-wrap:wrap;gap:var(--co-spacing-md)}.co-radio-group__item{display:flex;align-items:center;gap:var(--co-spacing-sm2);cursor:pointer;user-select:none}.co-radio-group__item--disabled{cursor:not-allowed}.co-radio-group__option-label{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);font-weight:400;line-height:1;white-space:nowrap}.co-radio-group__item--disabled .co-radio-group__option-label{color:var(--co-semantic-text-disabled)}.co-radio-group__circle{position:relative;display:inline-flex;align-items:center;justify-content:center;border-style:solid;border-width:1.5px;border-radius:var(--co-border-radius-full);background:transparent;flex-shrink:0;box-sizing:border-box;transition:border-color 0.15s ease;overflow:hidden}.co-radio-group__circle--small{width:16px;height:16px}.co-radio-group__circle--large{width:24px;height:24px}.co-radio-group__circle:not(.co-radio-group__circle--checked){border-color:var(--co-semantic-border-default)}.co-radio-group__circle--checked{border-color:var(--co-semantic-border-strong)}.co-radio-group__circle--checked::after{content:'';display:block;border-radius:var(--co-border-radius-full);background:var(--co-semantic-surface-primary)}.co-radio-group__circle--small.co-radio-group__circle--checked::after{width:8px;height:8px}.co-radio-group__circle--large.co-radio-group__circle--checked::after{width:14px;height:14px}.co-radio-group__circle--disabled{opacity:0.4;cursor:not-allowed;pointer-events:none}.co-radio-group--error .co-radio-group__circle{border-color:var(--co-semantic-status-error)}.co-radio-group__helper{display:flex;align-items:center;gap:var(--co-spacing-xs);padding:0 var(--co-spacing-xs)}.co-radio-group__helper-icon{flex-shrink:0;display:flex;align-items:center}.co-radio-group__helper-text{color:var(--co-semantic-text-muted);font-size:var(--co-font-size-14);font-weight:400;line-height:1}.co-radio-group__helper--error .co-radio-group__helper-icon,.co-radio-group__helper--error .co-radio-group__helper-text{color:var(--co-semantic-status-error)}.co-radio-group__helper--success .co-radio-group__helper-icon,.co-radio-group__helper--success .co-radio-group__helper-text{color:var(--co-semantic-status-success)}.co-radio-group__helper--warning .co-radio-group__helper-icon,.co-radio-group__helper--warning .co-radio-group__helper-text{color:var(--co-color-status-review)}.co-radio-group__helper--info .co-radio-group__helper-icon,.co-radio-group__helper--info .co-radio-group__helper-text{color:var(--co-semantic-status-info)}:host([layout='horizontal']) .co-radio-group{display:grid;grid-template-columns:var(--co-field-label-width, max-content) 1fr;align-items:start;column-gap:var(--co-spacing-md);row-gap:var(--co-spacing-sm2)}:host([layout='horizontal']) .co-radio-group__labels{grid-column:1;grid-row:1;padding-top:0;min-width:0}:host([layout='horizontal']) .co-radio-group__label{white-space:normal}:host([layout='horizontal']) .co-radio-group>:not(.co-radio-group__labels){grid-column:2;min-width:0}`;
|
|
6
6
|
|
|
7
7
|
const CoRadioGroup = class {
|
|
8
8
|
constructor(hostRef) {
|
|
9
9
|
index.registerInstance(this, hostRef);
|
|
10
10
|
this.coChange = index.createEvent(this, "coChange", 7);
|
|
11
|
+
/** Label layout: vertical (label above) or horizontal (label beside) */
|
|
12
|
+
this.layout = 'vertical';
|
|
11
13
|
/** Validation status */
|
|
12
14
|
this.status = 'default';
|
|
13
15
|
/**
|
|
@@ -64,11 +66,11 @@ const CoRadioGroup = class {
|
|
|
64
66
|
const hasLabels = this.label || this.secondaryLabel;
|
|
65
67
|
const hasHelper = this.helperText;
|
|
66
68
|
const opts = this.parsedOptions;
|
|
67
|
-
return (index.h("div", { key: '
|
|
69
|
+
return (index.h("div", { key: '9e3a5c50cf5b0797146b7d6649cd1e1f6176e7a8', class: {
|
|
68
70
|
'co-radio-group': true,
|
|
69
71
|
'co-radio-group--disabled': this.disabled,
|
|
70
72
|
[`co-radio-group--${this.status}`]: this.status !== 'default',
|
|
71
|
-
}, role: "radiogroup", "aria-label": this.label || '' }, hasLabels && (index.h("div", { key: '
|
|
73
|
+
}, role: "radiogroup", "aria-label": this.label || '' }, hasLabels && (index.h("div", { key: 'a6670dd8052801c17380161a875e5504c773f7cf', class: "co-radio-group__labels" }, this.label && index.h("span", { key: '2e11c6a1dc36e880975315147fd731a7811fd42f', class: "co-radio-group__label" }, this.label), this.secondaryLabel && (index.h("span", { key: 'cf844f3dfd22693afefb47bad0f467edd7e33329', class: "co-radio-group__secondary-label" }, this.secondaryLabel)))), index.h("div", { key: 'e2650512d0b9c217f4d6f0c041157e546f582fa2', class: {
|
|
72
74
|
'co-radio-group__options': true,
|
|
73
75
|
[`co-radio-group__options--${this.direction}`]: true,
|
|
74
76
|
} }, opts.map(opt => {
|
|
@@ -83,7 +85,7 @@ const CoRadioGroup = class {
|
|
|
83
85
|
'co-radio-group__circle--checked': isChecked,
|
|
84
86
|
'co-radio-group__circle--disabled': isDisabled,
|
|
85
87
|
}, role: "radio", "aria-checked": String(isChecked), "aria-label": opt.label }), index.h("span", { class: "co-radio-group__option-label" }, opt.label)));
|
|
86
|
-
})), hasHelper && (index.h("div", { key: '
|
|
88
|
+
})), hasHelper && (index.h("div", { key: '8684377f807fe91a0d88337e61cb7c7de0226832', class: `co-radio-group__helper co-radio-group__helper--${this.status}` }, this.statusIcon && (index.h("co-icon", { key: '2e12226109aec413ac76f71d0c32ac98f41b12f4', name: this.statusIcon, size: 14, weight: "fill", class: "co-radio-group__helper-icon" })), index.h("span", { key: 'e4d32771b3fe3a49ee1f907c0545fff31441e887', class: "co-radio-group__helper-text" }, this.helperText)))));
|
|
87
89
|
}
|
|
88
90
|
static get watchers() { return {
|
|
89
91
|
"value": [{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-DoFnrUVH.js');
|
|
4
4
|
|
|
5
5
|
const coRadioCss = () => `:host{display:inline-flex;font-family:var(--co-font-family-primary);font-size:var(--co-font-size-14);letter-spacing:var(--co-font-letter-spacing-body);line-height:1}.co-radio-row{display:flex;align-items:center;gap:var(--co-spacing-sm2);cursor:pointer}.co-radio-row--disabled{cursor:not-allowed}.co-radio__label{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);font-weight:400;line-height:1;white-space:nowrap;user-select:none}.co-radio-row--disabled .co-radio__label{color:var(--co-semantic-text-disabled)}.co-radio{position:relative;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;border-style:solid;border-width:1.5px;border-radius:var(--co-border-radius-full);outline:none;padding:0;background:transparent;flex-shrink:0;box-sizing:border-box;transition:border-color 0.15s ease;overflow:hidden}.co-radio--small{width:16px;height:16px}.co-radio--large{width:24px;height:24px}.co-radio:not(.co-radio--checked){border-color:var(--co-semantic-border-default)}.co-radio--checked{border-color:var(--co-semantic-border-strong)}.co-radio--checked::after{content:'';display:block;border-radius:var(--co-border-radius-full);background:var(--co-semantic-surface-primary)}.co-radio--small.co-radio--checked::after{width:8px;height:8px}.co-radio--large.co-radio--checked::after{width:14px;height:14px}.co-radio--disabled{opacity:0.4;cursor:not-allowed;pointer-events:none}`;
|
|
6
6
|
|
|
@@ -24,15 +24,15 @@ const CoRadio = class {
|
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
26
|
render() {
|
|
27
|
-
return (index.h("div", { key: '
|
|
27
|
+
return (index.h("div", { key: '5fb19abe8e70008fffa64cd1bce654d7052e9d7d', class: {
|
|
28
28
|
'co-radio-row': true,
|
|
29
29
|
'co-radio-row--disabled': this.disabled,
|
|
30
|
-
}, onClick: this.handleClick }, index.h("button", { key: '
|
|
30
|
+
}, onClick: this.handleClick }, index.h("button", { key: 'f9fc1b87defc09feda1937643d34e3cfad9662ed', role: "radio", "aria-checked": String(this.checked), "aria-label": this.label || '', class: {
|
|
31
31
|
'co-radio': true,
|
|
32
32
|
[`co-radio--${this.size}`]: true,
|
|
33
33
|
'co-radio--checked': this.checked,
|
|
34
34
|
'co-radio--disabled': this.disabled,
|
|
35
|
-
}, disabled: this.disabled, part: "circle" }), this.label && (index.h("span", { key: '
|
|
35
|
+
}, disabled: this.disabled, part: "circle" }), this.label && (index.h("span", { key: '3b4d359191f1dd87909ed760afd1ab86d9024162', class: "co-radio__label", part: "label" }, this.label))));
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
CoRadio.style = coRadioCss();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-DoFnrUVH.js');
|
|
4
4
|
|
|
5
5
|
const coRatingCss = () => `:host{display:inline-block;font-family:var(--co-font-family-primary);line-height:1}.co-rating{display:flex;flex-direction:column;gap:var(--co-spacing-sm2)}.co-rating__label{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);font-weight:400;cursor:default;padding:0 var(--co-spacing-xs)}.co-rating--disabled .co-rating__label{color:var(--co-semantic-text-disabled)}.co-rating__stars{display:inline-flex;gap:var(--co-spacing-xs)}.co-rating__star{display:flex;align-items:center;justify-content:center;padding:0;margin:0;border:none;background:transparent;cursor:pointer;color:var(--co-semantic-border-subtle);transition:color 0.1s ease, transform 0.1s ease}.co-rating__star:hover:not(:disabled){transform:scale(1.15)}.co-rating__star--active{color:#F5A623;}.co-rating__star--hover{color:#F5A623}.co-rating--disabled .co-rating__star{cursor:not-allowed;opacity:0.5}.co-rating--readonly .co-rating__star{cursor:default}.co-rating__helper{display:flex;align-items:center;gap:var(--co-spacing-xs);padding:0 var(--co-spacing-xs)}.co-rating__helper-icon{flex-shrink:0;display:flex;align-items:center}.co-rating__helper-text{color:var(--co-semantic-text-muted);font-size:var(--co-font-size-14);font-weight:400;line-height:1}.co-rating__helper--error .co-rating__helper-icon,.co-rating__helper--error .co-rating__helper-text{color:var(--co-semantic-status-error)}.co-rating__helper--success .co-rating__helper-icon,.co-rating__helper--success .co-rating__helper-text{color:var(--co-semantic-status-success)}.co-rating__helper--warning .co-rating__helper-icon,.co-rating__helper--warning .co-rating__helper-text{color:var(--co-color-status-review)}.co-rating__helper--info .co-rating__helper-icon,.co-rating__helper--info .co-rating__helper-text{color:var(--co-semantic-status-info)}`;
|
|
6
6
|
|
|
@@ -43,16 +43,16 @@ const CoRating = class {
|
|
|
43
43
|
const iconSize = this.size === 'large' ? 28 : 20;
|
|
44
44
|
const active = this.hoverValue || this.value;
|
|
45
45
|
const stars = Array.from({ length: this.max }, (_, i) => i + 1);
|
|
46
|
-
return (index.h("div", { key: '
|
|
46
|
+
return (index.h("div", { key: '67e3b30b95acbb48d96d572ac133b324b6872314', class: {
|
|
47
47
|
'co-rating': true,
|
|
48
48
|
'co-rating--disabled': this.disabled,
|
|
49
49
|
'co-rating--readonly': this.readOnly,
|
|
50
50
|
[`co-rating--${this.size}`]: true,
|
|
51
|
-
} }, this.label && index.h("label", { key: '
|
|
51
|
+
} }, this.label && index.h("label", { key: '06467dde87ab5b78e8db46bc7db542c57a58fcad', class: "co-rating__label" }, this.label), index.h("div", { key: '5a50067af1c8512c17ab787d156d214d3e8c7728', class: "co-rating__stars", onMouseLeave: this.handleMouseLeave }, stars.map(star => (index.h("button", { class: {
|
|
52
52
|
'co-rating__star': true,
|
|
53
53
|
'co-rating__star--active': star <= active,
|
|
54
54
|
'co-rating__star--hover': this.hoverValue > 0 && star <= this.hoverValue,
|
|
55
|
-
}, type: "button", tabIndex: this.disabled || this.readOnly ? -1 : 0, disabled: this.disabled, onClick: () => this.handleClick(star), onMouseEnter: () => this.handleMouseEnter(star), "aria-label": `${star} of ${this.max}` }, index.h("co-icon", { name: this.icon, size: iconSize, weight: star <= active ? 'fill' : 'regular' }))))), this.helperText && (index.h("div", { key: '
|
|
55
|
+
}, type: "button", tabIndex: this.disabled || this.readOnly ? -1 : 0, disabled: this.disabled, onClick: () => this.handleClick(star), onMouseEnter: () => this.handleMouseEnter(star), "aria-label": `${star} of ${this.max}` }, index.h("co-icon", { name: this.icon, size: iconSize, weight: star <= active ? 'fill' : 'regular' }))))), this.helperText && (index.h("div", { key: 'f040eba3fd1edd6ed9c6d6387d96f7f910abb855', class: `co-rating__helper co-rating__helper--${this.status}` }, this.statusIcon && index.h("co-icon", { key: '97603b28a2f29269f378af63324d706bf77e62ee', name: this.statusIcon, size: 14, weight: "fill", class: "co-rating__helper-icon" }), index.h("span", { key: '756b3518725bbfad6432907e78f4ced05add8700', class: "co-rating__helper-text" }, this.helperText)))));
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
58
|
CoRating.style = coRatingCss();
|