@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,416 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cobalt date utilities — timezone-safe, date-only ("YYYY-MM-DD") helpers.
|
|
3
|
+
*
|
|
4
|
+
* Design rules (see the date-picker plan):
|
|
5
|
+
* 1. The value IS the string. `YYYY-MM-DD` is the source of truth. Compare
|
|
6
|
+
* lexicographically — for ISO dates `"2026-06-03" < "2026-06-10"` holds.
|
|
7
|
+
* 2. Parse a string to a `Date` ONLY when unavoidable (Intl labels) and ALWAYS
|
|
8
|
+
* via local parts: `new Date(y, m - 1, d)`. NEVER `new Date("2026-06-03")`
|
|
9
|
+
* or `Date.parse(...)` — those parse as UTC midnight and shift the day in
|
|
10
|
+
* negative-offset zones (e.g. es-CO / UTC-5).
|
|
11
|
+
* 3. Display formatting builds the string from the tuple — never via toISOString.
|
|
12
|
+
*
|
|
13
|
+
* Everything here is pure TS with zero dependencies so it can be consumed by
|
|
14
|
+
* `core` (Stencil web components), `form-core` and `form-vue` without creating a
|
|
15
|
+
* dependency cycle.
|
|
16
|
+
*/
|
|
17
|
+
const ISO_RE = /^(\d{4})-(\d{2})-(\d{2})$/;
|
|
18
|
+
const pad2 = (n) => String(n).padStart(2, '0');
|
|
19
|
+
// ── Core round-trip ─────────────────────────────────────────────────────────
|
|
20
|
+
/** Build a LOCAL Date from a tuple. The only sanctioned string→Date path. */
|
|
21
|
+
function toLocalDate(ymd) {
|
|
22
|
+
return new Date(ymd.year, ymd.month - 1, ymd.day);
|
|
23
|
+
}
|
|
24
|
+
/** Extract local-part tuple from a Date. Never uses UTC getters. */
|
|
25
|
+
function fromLocalDate(d) {
|
|
26
|
+
return { year: d.getFullYear(), month: d.getMonth() + 1, day: d.getDate() };
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* True when `value` is a syntactically well-formed AND real calendar date
|
|
30
|
+
* (rejects "2026-02-31", "2026-13-01", etc.) in strict "YYYY-MM-DD" form.
|
|
31
|
+
*/
|
|
32
|
+
function isValidYMD(value) {
|
|
33
|
+
if (typeof value !== 'string')
|
|
34
|
+
return false;
|
|
35
|
+
const m = ISO_RE.exec(value);
|
|
36
|
+
if (!m)
|
|
37
|
+
return false;
|
|
38
|
+
const year = Number(m[1]);
|
|
39
|
+
const month = Number(m[2]);
|
|
40
|
+
const day = Number(m[3]);
|
|
41
|
+
if (month < 1 || month > 12 || day < 1 || day > 31)
|
|
42
|
+
return false;
|
|
43
|
+
// Reconstruct and confirm nothing rolled over (e.g. Feb 31 → Mar 3).
|
|
44
|
+
const d = new Date(year, month - 1, day);
|
|
45
|
+
return d.getFullYear() === year && d.getMonth() === month - 1 && d.getDate() === day;
|
|
46
|
+
}
|
|
47
|
+
/** Parse strict "YYYY-MM-DD" → tuple, or null when invalid. */
|
|
48
|
+
function parseISO(value) {
|
|
49
|
+
if (!isValidYMD(value))
|
|
50
|
+
return null;
|
|
51
|
+
const m = ISO_RE.exec(value);
|
|
52
|
+
return { year: Number(m[1]), month: Number(m[2]), day: Number(m[3]) };
|
|
53
|
+
}
|
|
54
|
+
/** Format a tuple → "YYYY-MM-DD". */
|
|
55
|
+
function formatISO(ymd) {
|
|
56
|
+
return `${String(ymd.year).padStart(4, '0')}-${pad2(ymd.month)}-${pad2(ymd.day)}`;
|
|
57
|
+
}
|
|
58
|
+
/** Today's local date as "YYYY-MM-DD". Never uses toISOString (UTC). */
|
|
59
|
+
function todayYMD() {
|
|
60
|
+
return formatISO(fromLocalDate(new Date()));
|
|
61
|
+
}
|
|
62
|
+
// ── Flexible manual-input parsing ───────────────────────────────────────────
|
|
63
|
+
/**
|
|
64
|
+
* Parse free-form user text into a normalized "YYYY-MM-DD".
|
|
65
|
+
*
|
|
66
|
+
* Accepts separators `/ . -`, partial input (year omitted → `defaultYear`),
|
|
67
|
+
* 2-digit years, and a canonical ISO string. Validates by reconstruction so
|
|
68
|
+
* impossible dates like "31/02/2026" come back as `{ status: 'invalid' }`.
|
|
69
|
+
*
|
|
70
|
+
* Returns `{ status: 'empty' }` for blank input (the field should commit `null`).
|
|
71
|
+
*/
|
|
72
|
+
function parseFlexible(input, opts = {}) {
|
|
73
|
+
const order = opts.order ?? 'dmy';
|
|
74
|
+
const pivot = opts.twoDigitYearPivot ?? 69;
|
|
75
|
+
const invalid = { status: 'invalid', value: null };
|
|
76
|
+
const raw = (input ?? '').trim();
|
|
77
|
+
if (raw === '')
|
|
78
|
+
return { status: 'empty', value: null };
|
|
79
|
+
// Fast path: already canonical ISO.
|
|
80
|
+
if (ISO_RE.test(raw)) {
|
|
81
|
+
return isValidYMD(raw) ? { status: 'valid', value: raw } : invalid;
|
|
82
|
+
}
|
|
83
|
+
// Tokenize on separators + whitespace; drop filler words ("de", "of").
|
|
84
|
+
const tokens = raw
|
|
85
|
+
.split(/[/.\-\s]+/)
|
|
86
|
+
.filter(Boolean)
|
|
87
|
+
.filter((t) => !FILLER_WORDS.has(normalizeName(t)));
|
|
88
|
+
if (tokens.length < 2 || tokens.length > 3)
|
|
89
|
+
return invalid;
|
|
90
|
+
// Classify tokens into numerics (with position) and an optional month name.
|
|
91
|
+
const monthIdx = monthNameIndex(opts.locale);
|
|
92
|
+
const numerics = [];
|
|
93
|
+
let monthFromName = null;
|
|
94
|
+
tokens.forEach((t, pos) => {
|
|
95
|
+
if (/^\d+$/.test(t)) {
|
|
96
|
+
numerics.push({ val: Number(t), pos });
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
const m = monthIdx[normalizeName(t)];
|
|
100
|
+
if (m && monthFromName === null)
|
|
101
|
+
monthFromName = m;
|
|
102
|
+
else
|
|
103
|
+
monthFromName = -1; // unknown/duplicate name → force invalid
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
if (monthFromName === -1)
|
|
107
|
+
return invalid;
|
|
108
|
+
let day;
|
|
109
|
+
let month;
|
|
110
|
+
let year;
|
|
111
|
+
if (monthFromName !== null) {
|
|
112
|
+
// Month came from a name; the numerics are day and/or year.
|
|
113
|
+
month = monthFromName;
|
|
114
|
+
if (numerics.length === 2) {
|
|
115
|
+
const [a, b] = numerics; // already in original order
|
|
116
|
+
// Prefer an explicit 4-digit / >31 value as the year.
|
|
117
|
+
if (a.val > 31 || tokenLen(tokens, a.pos) === 4) {
|
|
118
|
+
year = a.val;
|
|
119
|
+
day = b.val;
|
|
120
|
+
}
|
|
121
|
+
else if (b.val > 31 || tokenLen(tokens, b.pos) === 4) {
|
|
122
|
+
year = b.val;
|
|
123
|
+
day = a.val;
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
// Ambiguous → use order (ymd: year first, else year last).
|
|
127
|
+
year = order === 'ymd' ? a.val : b.val;
|
|
128
|
+
day = order === 'ymd' ? b.val : a.val;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
else if (numerics.length === 1) {
|
|
132
|
+
day = numerics[0].val;
|
|
133
|
+
year = opts.defaultYear ?? new Date().getFullYear();
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
return invalid;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
// All numeric.
|
|
141
|
+
const nums = numerics.map((n) => n.val);
|
|
142
|
+
if (nums.length === 2) {
|
|
143
|
+
const [a, b] = nums;
|
|
144
|
+
// With the year omitted, year-first locales (ymd) fall back to the ISO
|
|
145
|
+
// month-day order — only day-first locales (dmy) read it as day/month.
|
|
146
|
+
if (order === 'mdy' || order === 'ymd') {
|
|
147
|
+
month = a;
|
|
148
|
+
day = b;
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
day = a;
|
|
152
|
+
month = b;
|
|
153
|
+
}
|
|
154
|
+
year = opts.defaultYear ?? new Date().getFullYear();
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
const [a, b, c] = nums;
|
|
158
|
+
if (order === 'ymd') {
|
|
159
|
+
year = a;
|
|
160
|
+
month = b;
|
|
161
|
+
day = c;
|
|
162
|
+
}
|
|
163
|
+
else if (order === 'mdy') {
|
|
164
|
+
month = a;
|
|
165
|
+
day = b;
|
|
166
|
+
year = c;
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
day = a;
|
|
170
|
+
month = b;
|
|
171
|
+
year = c;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
year = normalizeYear(year, pivot);
|
|
176
|
+
const candidate = formatISO({ year, month, day });
|
|
177
|
+
return isValidYMD(candidate) ? { status: 'valid', value: candidate } : invalid;
|
|
178
|
+
}
|
|
179
|
+
function tokenLen(tokens, pos) {
|
|
180
|
+
return tokens[pos]?.length ?? 0;
|
|
181
|
+
}
|
|
182
|
+
function normalizeYear(year, pivot) {
|
|
183
|
+
if (year >= 100)
|
|
184
|
+
return year;
|
|
185
|
+
// 2-digit (or 1-digit) year.
|
|
186
|
+
return year <= pivot ? 2000 + year : 1900 + year;
|
|
187
|
+
}
|
|
188
|
+
const FILLER_WORDS = new Set(['de', 'del', 'of', 'the']);
|
|
189
|
+
/** Lowercase, strip accents and a trailing period. */
|
|
190
|
+
function normalizeName(s) {
|
|
191
|
+
return s
|
|
192
|
+
.normalize('NFD')
|
|
193
|
+
.replace(/[̀-ͯ]/g, '')
|
|
194
|
+
.toLowerCase()
|
|
195
|
+
.replace(/\.$/, '')
|
|
196
|
+
.trim();
|
|
197
|
+
}
|
|
198
|
+
// Hardcoded Spanish + English month names (normalized) as a stable fallback,
|
|
199
|
+
// regardless of the runtime Intl data.
|
|
200
|
+
const BASE_MONTHS = {
|
|
201
|
+
// Spanish
|
|
202
|
+
enero: 1, febrero: 2, marzo: 3, abril: 4, mayo: 5, junio: 6, julio: 7,
|
|
203
|
+
agosto: 8, septiembre: 9, setiembre: 9, octubre: 10, noviembre: 11, diciembre: 12,
|
|
204
|
+
ene: 1, feb: 2, mar: 3, abr: 4, may: 5, jun: 6, jul: 7, ago: 8,
|
|
205
|
+
sep: 9, set: 9, oct: 10, nov: 11, dic: 12,
|
|
206
|
+
// English
|
|
207
|
+
january: 1, february: 2, march: 3, april: 4, june: 6, july: 7,
|
|
208
|
+
august: 8, september: 9, october: 10, november: 11, december: 12,
|
|
209
|
+
jan: 1, apr: 4, aug: 8, dec: 12,
|
|
210
|
+
// Portuguese (accents already stripped by normalizeName: "março" → "marco")
|
|
211
|
+
janeiro: 1, fevereiro: 2, marco: 3, maio: 5, junho: 6, julho: 7,
|
|
212
|
+
setembro: 9, outubro: 10, novembro: 11, dezembro: 12,
|
|
213
|
+
fev: 2, mai: 5, out: 10, dez: 12,
|
|
214
|
+
};
|
|
215
|
+
const monthIndexCache = new Map();
|
|
216
|
+
/** Build a normalized month-name → 1..12 lookup for a locale (memoized). */
|
|
217
|
+
function monthNameIndex(locale) {
|
|
218
|
+
const key = locale || '_base';
|
|
219
|
+
const cached = monthIndexCache.get(key);
|
|
220
|
+
if (cached)
|
|
221
|
+
return cached;
|
|
222
|
+
const map = { ...BASE_MONTHS };
|
|
223
|
+
if (locale) {
|
|
224
|
+
for (let m = 0; m < 12; m++) {
|
|
225
|
+
const d = new Date(2020, m, 1);
|
|
226
|
+
for (const style of ['short', 'long']) {
|
|
227
|
+
const name = normalizeName(new Intl.DateTimeFormat(locale, { month: style }).format(d));
|
|
228
|
+
if (name) {
|
|
229
|
+
map[name] = m + 1;
|
|
230
|
+
// Also index the 3-letter prefix (covers locale-specific abbreviations).
|
|
231
|
+
if (name.length >= 3)
|
|
232
|
+
map[name.slice(0, 3)] = m + 1;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
monthIndexCache.set(key, map);
|
|
238
|
+
return map;
|
|
239
|
+
}
|
|
240
|
+
// ── Display formatting ──────────────────────────────────────────────────────
|
|
241
|
+
/**
|
|
242
|
+
* Format "YYYY-MM-DD" for display using a token pattern. Supported tokens:
|
|
243
|
+
* `yyyy`, `yy`, `MMMM` (full month name), `MMM` (short month name), `MM`, `M`,
|
|
244
|
+
* `dd`, `d`. Month names are localized via `Intl` (trailing "." stripped).
|
|
245
|
+
* Default pattern `dd/MM/yyyy`. Returns '' when value is null/empty/invalid.
|
|
246
|
+
*
|
|
247
|
+
* Uses a single regex pass (not chained .replace) so an inserted month name
|
|
248
|
+
* like "dic"/"ene" is never re-scanned by the `d`/`M` token replacers.
|
|
249
|
+
*/
|
|
250
|
+
function formatDisplay(value, displayFormat = 'dd/MM/yyyy', locale = 'en-US') {
|
|
251
|
+
if (!value)
|
|
252
|
+
return '';
|
|
253
|
+
const ymd = parseISO(value);
|
|
254
|
+
if (!ymd)
|
|
255
|
+
return '';
|
|
256
|
+
const d = toLocalDate(ymd);
|
|
257
|
+
return displayFormat.replace(/yyyy|yy|MMMM|MMM|MM|M|dd|d/g, (tok) => {
|
|
258
|
+
switch (tok) {
|
|
259
|
+
case 'yyyy':
|
|
260
|
+
return String(ymd.year).padStart(4, '0');
|
|
261
|
+
case 'yy':
|
|
262
|
+
return String(ymd.year).slice(-2);
|
|
263
|
+
case 'MMMM':
|
|
264
|
+
return new Intl.DateTimeFormat(locale, { month: 'long' }).format(d);
|
|
265
|
+
case 'MMM':
|
|
266
|
+
return stripTrailingDot(new Intl.DateTimeFormat(locale, { month: 'short' }).format(d));
|
|
267
|
+
case 'MM':
|
|
268
|
+
return pad2(ymd.month);
|
|
269
|
+
case 'M':
|
|
270
|
+
return String(ymd.month);
|
|
271
|
+
case 'dd':
|
|
272
|
+
return pad2(ymd.day);
|
|
273
|
+
case 'd':
|
|
274
|
+
return String(ymd.day);
|
|
275
|
+
default:
|
|
276
|
+
return tok;
|
|
277
|
+
}
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
function stripTrailingDot(s) {
|
|
281
|
+
return s.replace(/\.$/, '');
|
|
282
|
+
}
|
|
283
|
+
// ── Comparison & arithmetic ─────────────────────────────────────────────────
|
|
284
|
+
/** Lexicographic compare of two "YYYY-MM-DD" strings → -1 | 0 | 1. */
|
|
285
|
+
function compareYMD(a, b) {
|
|
286
|
+
if (a === b)
|
|
287
|
+
return 0;
|
|
288
|
+
return a < b ? -1 : 1;
|
|
289
|
+
}
|
|
290
|
+
/** Add (or subtract) calendar days, returning "YYYY-MM-DD".
|
|
291
|
+
* An unparseable input is returned unchanged (pass-through, NOT null —
|
|
292
|
+
* callers chaining arithmetic keep their original value instead of crashing;
|
|
293
|
+
* validate with `parseISO` first if you need to reject bad input). */
|
|
294
|
+
function addDays(value, n) {
|
|
295
|
+
const ymd = parseISO(value);
|
|
296
|
+
if (!ymd)
|
|
297
|
+
return value;
|
|
298
|
+
const d = toLocalDate(ymd);
|
|
299
|
+
d.setDate(d.getDate() + n);
|
|
300
|
+
return formatISO(fromLocalDate(d));
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Add (or subtract) months. Clamps the day to the target month's length so
|
|
304
|
+
* "2026-01-31" + 1 month → "2026-02-28" (not a March rollover).
|
|
305
|
+
* Unparseable input passes through unchanged (same contract as `addDays`).
|
|
306
|
+
*/
|
|
307
|
+
function addMonths(value, n) {
|
|
308
|
+
const ymd = parseISO(value);
|
|
309
|
+
if (!ymd)
|
|
310
|
+
return value;
|
|
311
|
+
const targetMonthIndex = ymd.month - 1 + n;
|
|
312
|
+
const targetYear = ymd.year + Math.floor(targetMonthIndex / 12);
|
|
313
|
+
const targetMonth = ((targetMonthIndex % 12) + 12) % 12; // 0-11
|
|
314
|
+
const lastDay = new Date(targetYear, targetMonth + 1, 0).getDate();
|
|
315
|
+
const day = Math.min(ymd.day, lastDay);
|
|
316
|
+
return formatISO({ year: targetYear, month: targetMonth + 1, day });
|
|
317
|
+
}
|
|
318
|
+
/** First day of the month for a given date. */
|
|
319
|
+
function startOfMonth(value) {
|
|
320
|
+
const ymd = parseISO(value);
|
|
321
|
+
if (!ymd)
|
|
322
|
+
return value;
|
|
323
|
+
return formatISO({ year: ymd.year, month: ymd.month, day: 1 });
|
|
324
|
+
}
|
|
325
|
+
/** Whether `value` lies within [min, max] (inclusive). */
|
|
326
|
+
function isWithinRange(value, min, max) {
|
|
327
|
+
if (min && compareYMD(value, min) < 0)
|
|
328
|
+
return false;
|
|
329
|
+
if (max && compareYMD(value, max) > 0)
|
|
330
|
+
return false;
|
|
331
|
+
return true;
|
|
332
|
+
}
|
|
333
|
+
/** Weekday for a date, 0=Sunday .. 6=Saturday (local, tz-safe). */
|
|
334
|
+
function dayOfWeek(value) {
|
|
335
|
+
const ymd = parseISO(value);
|
|
336
|
+
if (!ymd)
|
|
337
|
+
return -1;
|
|
338
|
+
return toLocalDate(ymd).getDay();
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* Whether a date should be non-selectable given range/explicit/weekday rules.
|
|
342
|
+
* Invalid input counts as disabled.
|
|
343
|
+
*/
|
|
344
|
+
function isDisabled(value, opts = {}) {
|
|
345
|
+
if (!isValidYMD(value))
|
|
346
|
+
return true;
|
|
347
|
+
if (!isWithinRange(value, opts.min, opts.max))
|
|
348
|
+
return true;
|
|
349
|
+
if (opts.disabledDates && opts.disabledDates.includes(value))
|
|
350
|
+
return true;
|
|
351
|
+
if (opts.disabledDaysOfWeek && opts.disabledDaysOfWeek.includes(dayOfWeek(value)))
|
|
352
|
+
return true;
|
|
353
|
+
return false;
|
|
354
|
+
}
|
|
355
|
+
// ── Calendar grid ───────────────────────────────────────────────────────────
|
|
356
|
+
/**
|
|
357
|
+
* Build a month grid of {value, inMonth} cells. Includes leading/trailing days
|
|
358
|
+
* from adjacent months so the calendar can render the `outside-month` state.
|
|
359
|
+
*
|
|
360
|
+
* @param year full year
|
|
361
|
+
* @param month 1-12
|
|
362
|
+
* @param firstDayOfWeek 0=Sunday .. 6=Saturday. Default 1 (Monday).
|
|
363
|
+
* @param weeks number of week rows. Default 6 (stable height).
|
|
364
|
+
*/
|
|
365
|
+
function getMonthMatrix(year, month, firstDayOfWeek = 1, weeks = 6) {
|
|
366
|
+
const first = new Date(year, month - 1, 1);
|
|
367
|
+
const lead = (first.getDay() - firstDayOfWeek + 7) % 7;
|
|
368
|
+
const start = new Date(year, month - 1, 1 - lead);
|
|
369
|
+
const rows = [];
|
|
370
|
+
for (let w = 0; w < weeks; w++) {
|
|
371
|
+
const row = [];
|
|
372
|
+
for (let d = 0; d < 7; d++) {
|
|
373
|
+
const cur = new Date(start.getFullYear(), start.getMonth(), start.getDate() + (w * 7 + d));
|
|
374
|
+
row.push({
|
|
375
|
+
value: formatISO(fromLocalDate(cur)),
|
|
376
|
+
inMonth: cur.getMonth() === month - 1,
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
rows.push(row);
|
|
380
|
+
}
|
|
381
|
+
return rows;
|
|
382
|
+
}
|
|
383
|
+
// ── Locale-aware labels (Intl, fed by local-parts Dates) ────────────────────
|
|
384
|
+
/**
|
|
385
|
+
* Weekday short labels starting at `firstDayOfWeek`, in `locale`.
|
|
386
|
+
* e.g. es-CO Monday-first → ["lun.","mar.",...] (caller may trim/uppercase).
|
|
387
|
+
*/
|
|
388
|
+
function getWeekdayLabels(locale, firstDayOfWeek = 1, weekday = 'short') {
|
|
389
|
+
const fmt = new Intl.DateTimeFormat(locale, { weekday });
|
|
390
|
+
const labels = [];
|
|
391
|
+
// 2024-01-01 is a Monday; anchor from it then offset to firstDayOfWeek.
|
|
392
|
+
for (let i = 0; i < 7; i++) {
|
|
393
|
+
const offset = (i + (firstDayOfWeek - 1) + 7) % 7;
|
|
394
|
+
const d = new Date(2024, 0, 1 + offset); // local-parts Date
|
|
395
|
+
labels.push(fmt.format(d));
|
|
396
|
+
}
|
|
397
|
+
return labels;
|
|
398
|
+
}
|
|
399
|
+
/** Localized "month year" header label, e.g. "junio de 2026". */
|
|
400
|
+
function getMonthLabel(year, month, locale, monthStyle = 'long') {
|
|
401
|
+
return new Intl.DateTimeFormat(locale, { month: monthStyle, year: 'numeric' }).format(new Date(year, month - 1, 1));
|
|
402
|
+
}
|
|
403
|
+
/** Localized full label for a single date, for screen-reader announcements. */
|
|
404
|
+
function getFullDateLabel(value, locale) {
|
|
405
|
+
const ymd = parseISO(value);
|
|
406
|
+
if (!ymd)
|
|
407
|
+
return '';
|
|
408
|
+
return new Intl.DateTimeFormat(locale, {
|
|
409
|
+
weekday: 'long',
|
|
410
|
+
day: 'numeric',
|
|
411
|
+
month: 'long',
|
|
412
|
+
year: 'numeric',
|
|
413
|
+
}).format(toLocalDate(ymd));
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
export { todayYMD as a, addMonths as b, compareYMD as c, addDays as d, isDisabled as e, formatDisplay as f, getMonthLabel as g, getWeekdayLabels as h, isValidYMD as i, getMonthMatrix as j, getFullDateLabel as k, parseFlexible as l, parseISO as p, startOfMonth as s, toLocalDate as t };
|
|
@@ -2,7 +2,7 @@ const NAMESPACE = 'cobalt';
|
|
|
2
2
|
const BUILD = /* cobalt */ { hotModuleReplacement: false, hydratedSelectorName: "hydrated", lazyLoad: true, propChangeCallback: true, slotRelocation: true, state: true, updatable: true};
|
|
3
3
|
|
|
4
4
|
const globalScripts = () => {};
|
|
5
|
-
const globalStyles = ":root{--co-color-base-negro:#1f1c1b;--co-color-base-blanco:#ffffff;--co-color-base-off-white:#f7f6f0;--co-color-primary-verde:#02a270;--co-color-primary-amarillo:#fdbf00;--co-color-primary-azul:#2563eb;--co-color-primary-rosado:#f32a73;--co-color-azul-100:#eff4ff;--co-color-azul-200:#dbe6fe;--co-color-azul-300:#bfd3fe;--co-color-azul-400:#93b4fd;--co-color-azul-500:#6090fa;--co-color-azul-600:#3b76f6;--co-color-azul-700:#2563eb;--co-color-azul-800:#1d58d8;--co-color-azul-900:#1e408a;--co-color-rosado-100:#fef1f6;--co-color-rosado-200:#fde6f0;--co-color-rosado-300:#fdcde2;--co-color-rosado-400:#fda4c8;--co-color-rosado-500:#fb6ba3;--co-color-rosado-600:#f32a73;--co-color-rosado-700:#e41e5c;--co-color-rosado-800:#c61044;--co-color-rosado-900:#a41039;--co-color-amarillo-100:#ffffea;--co-color-amarillo-200:#fffbc5;--co-color-amarillo-300:#fff885;--co-color-amarillo-400:#ffe01b;--co-color-amarillo-500:#fdbf00;--co-color-amarillo-600:#e29500;--co-color-amarillo-700:#bb6902;--co-color-amarillo-800:#985108;--co-color-amarillo-900:#7c420b;--co-color-verde-100:#ecfdf5;--co-color-verde-200:#d0fbe5;--co-color-verde-300:#a5f5d0;--co-color-verde-400:#6beab8;--co-color-verde-500:#31d69a;--co-color-verde-600:#0cbd82;--co-color-verde-700:#02a270;--co-color-verde-800:#027a58;--co-color-verde-900:#046147;--co-color-neutral-100:#e6e5df;--co-color-neutral-200:#eeede7;--co-color-neutral-300:#f3f2ec;--co-color-gray-100:#f6f6f6;--co-color-gray-200:#e3e3e3;--co-color-gray-300:#c4c4c4;--co-color-gray-400:#a0a0a0;--co-color-gray-500:#888888;--co-color-gray-600:#585858;--co-color-gray-700:#1f1c1b;--co-color-gray-800:#0a0a0a;--co-color-secondary-rosado-100:#d74ba0;--co-color-secondary-rosado-50:#ffc8eb;--co-color-secondary-rosado-25:#ffe6f5;--co-color-secondary-rojo-100:#eb1e1e;--co-color-secondary-rojo-50:#ff878c;--co-color-secondary-rojo-25:#ffd7dc;--co-color-secondary-naranja-100:#f0821e;--co-color-secondary-naranja-50:#ffbe82;--co-color-secondary-naranja-25:#ffe6d2;--co-color-secondary-amarillo-100:#fad223;--co-color-secondary-amarillo-50:#ffe67d;--co-color-secondary-amarillo-25:#fffac3;--co-color-secondary-verde-100:#afe664;--co-color-secondary-verde-50:#d7ffb4;--co-color-secondary-verde-25:#ebffc8;--co-color-secondary-oliva-100:#aab43c;--co-color-secondary-oliva-50:#d2dc96;--co-color-secondary-oliva-25:#f0f0d2;--co-color-secondary-turquesa-100:#00afaf;--co-color-secondary-turquesa-50:#3ce1c8;--co-color-secondary-turquesa-25:#c8f0f0;--co-color-secondary-azul-claro-100:#00bee6;--co-color-secondary-azul-claro-50:#6ee6f0;--co-color-secondary-azul-claro-25:#befaff;--co-color-secondary-azul-electrico-100:#000aff;--co-color-secondary-azul-electrico-50:#8095ff;--co-color-secondary-azul-electrico-25:#cce0ff;--co-color-secondary-violeta-100:#5f4bd7;--co-color-secondary-violeta-50:#b9b4ff;--co-color-secondary-violeta-25:#e1e1ff;--co-color-secondary-marron-100:#af7355;--co-color-secondary-marron-50:#d7b9a5;--co-color-secondary-marron-25:#f0e1d7;--co-color-secondary-guinda-100:#811137;--co-color-secondary-guinda-50:#c0889c;--co-color-secondary-guinda-25:#e6cfd7;--co-color-status-success:#0a7724;--co-color-status-bg-success:#ebf9ec;--co-color-status-progress:#2d6cc5;--co-color-status-bg-progress:#eef3fa;--co-color-status-submitted:#7556ca;--co-color-status-bg-submitted:#f4f1fb;--co-color-status-review:#85571f;--co-color-status-bg-review:#fcf5db;--co-color-status-pending:#b45103;--co-color-status-bg-pending:#f9f1eb;--co-color-status-error:#aa2e1b;--co-color-status-bg-error:#ffefef;--co-color-opacity-negro-4:rgba(31, 28, 27, 0.04);--co-color-opacity-negro-8:rgba(31, 28, 27, 0.08);--co-color-opacity-negro-16:rgba(31, 28, 27, 0.16);--co-color-opacity-negro-25:rgba(31, 28, 27, 0.25);--co-color-opacity-negro-50:rgba(31, 28, 27, 0.50);--co-color-opacity-negro-80:rgba(31, 28, 27, 0.80);--co-color-opacity-blanco-4:rgba(255, 255, 255, 0.04);--co-color-opacity-blanco-8:rgba(255, 255, 255, 0.08);--co-color-opacity-blanco-16:rgba(255, 255, 255, 0.16);--co-color-opacity-blanco-25:rgba(255, 255, 255, 0.25);--co-color-opacity-blanco-50:rgba(255, 255, 255, 0.50);--co-color-opacity-blanco-80:rgba(255, 255, 255, 0.80);--co-border-radius-xxs:4px;--co-border-radius-xs:8px;--co-border-radius-sm:12px;--co-border-radius-lg:16px;--co-border-radius-xl:24px;--co-border-radius-2xl:32px;--co-border-radius-3xl:40px;--co-border-radius-4xl:48px;--co-border-radius-5xl:56px;--co-border-radius-6xl:64px;--co-border-radius-full:9999px;--co-shadow-lg:0 10px 15px -3px rgba(26, 26, 26, 0.05), 0 4px 6px -4px rgba(26, 26, 26, 0.05);--co-spacing-xxs:2px;--co-spacing-xs:4px;--co-spacing-sm:6px;--co-spacing-sm2:8px;--co-spacing-md:12px;--co-spacing-lg:16px;--co-spacing-xl:20px;--co-spacing-2xl:24px;--co-spacing-3xl:32px;--co-spacing-4xl:40px;--co-spacing-5xl:48px;--co-spacing-6xl:56px;--co-spacing-7xl:64px;--co-spacing-8xl:72px;--co-spacing-9xl:80px;--co-spacing-10xl:88px;--co-spacing-11xl:96px;--co-spacing-12xl:104px;--co-spacing-13xl:112px;--co-spacing-14xl:120px;--co-spacing-full:9999px;--co-font-family-primary:'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;--co-font-family-mono:'Geist Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;--co-font-size-10:10px;--co-font-size-12:12px;--co-font-size-14:14px;--co-font-size-16:16px;--co-font-size-18:18px;--co-font-size-20:20px;--co-font-size-22:22px;--co-font-size-24:24px;--co-font-size-26:26px;--co-font-size-30:30px;--co-font-size-32:32px;--co-font-size-36:36px;--co-font-size-40:40px;--co-font-size-44:44px;--co-font-size-48:48px;--co-font-size-50:50px;--co-font-size-56:56px;--co-font-size-64:64px;--co-font-size-72:72px;--co-font-size-80:80px;--co-font-size-96:96px;--co-font-size-104:104px;--co-font-size-112:112px;--co-font-size-128:128px;--co-font-size-144:144px;--co-font-size-160:160px;--co-font-size-180:180px;--co-font-size-200:200px;--co-font-size-220:220px;--co-font-weight-regular:400;--co-font-weight-medium:500;--co-font-weight-semibold:600;--co-font-weight-bold:700;--co-font-line-height-none:1;--co-font-line-height-tight:1.2;--co-font-line-height-snug:1.3;--co-font-line-height-normal:1.5;--co-font-line-height-relaxed:1.6;--co-font-letter-spacing-body:-0.03em;--co-font-letter-spacing-overline:0.08em;--co-semantic-surface-primary:var(--co-color-base-negro);--co-semantic-surface-secondary:var(--co-color-base-blanco);--co-semantic-surface-page:var(--co-color-base-blanco);--co-semantic-surface-muted:var(--co-color-gray-200);--co-semantic-surface-hover:var(--co-color-opacity-negro-4);--co-semantic-surface-disabled:var(--co-color-gray-100);--co-semantic-on-primary:var(--co-color-base-blanco);--co-semantic-on-secondary:var(--co-color-base-negro);--co-semantic-text-default:var(--co-color-base-negro);--co-semantic-text-inverse:var(--co-color-base-blanco);--co-semantic-text-secondary:var(--co-color-gray-600);--co-semantic-text-muted:var(--co-color-gray-500);--co-semantic-text-disabled:var(--co-color-gray-400);--co-semantic-border-default:var(--co-color-opacity-negro-16);--co-semantic-border-subtle:var(--co-color-opacity-negro-8);--co-semantic-border-strong:var(--co-color-opacity-negro-50);--co-semantic-border-focus:var(--co-color-opacity-negro-25);--co-semantic-border-focus-ring:var(--co-color-opacity-negro-8);--co-semantic-control-thumb:var(--co-color-base-blanco);--co-semantic-control-shadow:var(--co-color-opacity-negro-16);--co-semantic-status-success:var(--co-color-status-success);--co-semantic-status-error:var(--co-color-status-error);--co-semantic-status-warning:var(--co-color-primary-amarillo);--co-semantic-status-info:var(--co-color-status-progress)}:root{--co-color-negro:var(--co-color-base-negro);--co-color-blanco:var(--co-color-base-blanco);--co-color-neutral-beige:var(--co-color-base-off-white);--co-color-secondary-rojo:var(--co-color-secondary-rojo-100);--co-color-secondary-naranja:var(--co-color-secondary-naranja-100);--co-color-secondary-oliva:var(--co-color-secondary-oliva-100);--co-color-secondary-violeta:var(--co-color-secondary-violeta-100);--co-color-secondary-marron:var(--co-color-secondary-marron-100);--co-color-status-success-bg:var(--co-color-status-bg-success);--co-font-family:var(--co-font-family-primary);--co-border-radius-md:var(--co-border-radius-lg);--co-font-size-11:11px;--co-font-size-28:28px}";
|
|
5
|
+
const globalStyles = ":root{--co-color-base-negro:#1f1c1b;--co-color-base-blanco:#ffffff;--co-color-base-off-white:#f7f6f0;--co-color-primary-verde:#02a270;--co-color-primary-amarillo:#fdbf00;--co-color-primary-azul:#2563eb;--co-color-primary-rosado:#f32a73;--co-color-azul-100:#eff4ff;--co-color-azul-200:#dbe6fe;--co-color-azul-300:#bfd3fe;--co-color-azul-400:#93b4fd;--co-color-azul-500:#6090fa;--co-color-azul-600:#3b76f6;--co-color-azul-700:#2563eb;--co-color-azul-800:#1d58d8;--co-color-azul-900:#1e408a;--co-color-rosado-100:#fef1f6;--co-color-rosado-200:#fde6f0;--co-color-rosado-300:#fdcde2;--co-color-rosado-400:#fda4c8;--co-color-rosado-500:#fb6ba3;--co-color-rosado-600:#f32a73;--co-color-rosado-700:#e41e5c;--co-color-rosado-800:#c61044;--co-color-rosado-900:#a41039;--co-color-amarillo-100:#ffffea;--co-color-amarillo-200:#fffbc5;--co-color-amarillo-300:#fff885;--co-color-amarillo-400:#ffe01b;--co-color-amarillo-500:#fdbf00;--co-color-amarillo-600:#e29500;--co-color-amarillo-700:#bb6902;--co-color-amarillo-800:#985108;--co-color-amarillo-900:#7c420b;--co-color-verde-100:#ecfdf5;--co-color-verde-200:#d0fbe5;--co-color-verde-300:#a5f5d0;--co-color-verde-400:#6beab8;--co-color-verde-500:#31d69a;--co-color-verde-600:#0cbd82;--co-color-verde-700:#02a270;--co-color-verde-800:#027a58;--co-color-verde-900:#046147;--co-color-neutral-100:#e6e5df;--co-color-neutral-200:#eeede7;--co-color-neutral-300:#f3f2ec;--co-color-gray-100:#f6f6f6;--co-color-gray-200:#e3e3e3;--co-color-gray-300:#c4c4c4;--co-color-gray-400:#a0a0a0;--co-color-gray-500:#888888;--co-color-gray-600:#585858;--co-color-gray-700:#1f1c1b;--co-color-gray-800:#0a0a0a;--co-color-secondary-rosado-100:#d74ba0;--co-color-secondary-rosado-50:#ffc8eb;--co-color-secondary-rosado-25:#ffe6f5;--co-color-secondary-rojo-100:#eb1e1e;--co-color-secondary-rojo-50:#ff878c;--co-color-secondary-rojo-25:#ffd7dc;--co-color-secondary-naranja-100:#f0821e;--co-color-secondary-naranja-50:#ffbe82;--co-color-secondary-naranja-25:#ffe6d2;--co-color-secondary-amarillo-100:#fad223;--co-color-secondary-amarillo-50:#ffe67d;--co-color-secondary-amarillo-25:#fffac3;--co-color-secondary-verde-100:#afe664;--co-color-secondary-verde-50:#d7ffb4;--co-color-secondary-verde-25:#ebffc8;--co-color-secondary-oliva-100:#aab43c;--co-color-secondary-oliva-50:#d2dc96;--co-color-secondary-oliva-25:#f0f0d2;--co-color-secondary-turquesa-100:#00afaf;--co-color-secondary-turquesa-50:#3ce1c8;--co-color-secondary-turquesa-25:#c8f0f0;--co-color-secondary-azul-claro-100:#00bee6;--co-color-secondary-azul-claro-50:#6ee6f0;--co-color-secondary-azul-claro-25:#befaff;--co-color-secondary-azul-electrico-100:#000aff;--co-color-secondary-azul-electrico-50:#8095ff;--co-color-secondary-azul-electrico-25:#cce0ff;--co-color-secondary-violeta-100:#5f4bd7;--co-color-secondary-violeta-50:#b9b4ff;--co-color-secondary-violeta-25:#e1e1ff;--co-color-secondary-marron-100:#af7355;--co-color-secondary-marron-50:#d7b9a5;--co-color-secondary-marron-25:#f0e1d7;--co-color-secondary-guinda-100:#811137;--co-color-secondary-guinda-50:#c0889c;--co-color-secondary-guinda-25:#e6cfd7;--co-color-status-success:#0a7724;--co-color-status-bg-success:#ebf9ec;--co-color-status-progress:#2d6cc5;--co-color-status-bg-progress:#eef3fa;--co-color-status-submitted:#7556ca;--co-color-status-bg-submitted:#f4f1fb;--co-color-status-review:#85571f;--co-color-status-bg-review:#fcf5db;--co-color-status-pending:#b45103;--co-color-status-bg-pending:#f9f1eb;--co-color-status-error:#aa2e1b;--co-color-status-bg-error:#ffefef;--co-color-opacity-negro-4:rgba(31, 28, 27, 0.04);--co-color-opacity-negro-8:rgba(31, 28, 27, 0.08);--co-color-opacity-negro-16:rgba(31, 28, 27, 0.16);--co-color-opacity-negro-25:rgba(31, 28, 27, 0.25);--co-color-opacity-negro-50:rgba(31, 28, 27, 0.50);--co-color-opacity-negro-80:rgba(31, 28, 27, 0.80);--co-color-opacity-blanco-4:rgba(255, 255, 255, 0.04);--co-color-opacity-blanco-8:rgba(255, 255, 255, 0.08);--co-color-opacity-blanco-16:rgba(255, 255, 255, 0.16);--co-color-opacity-blanco-25:rgba(255, 255, 255, 0.25);--co-color-opacity-blanco-50:rgba(255, 255, 255, 0.50);--co-color-opacity-blanco-80:rgba(255, 255, 255, 0.80);--co-border-radius-xxs:4px;--co-border-radius-xs:8px;--co-border-radius-sm:12px;--co-border-radius-lg:16px;--co-border-radius-xl:24px;--co-border-radius-2xl:32px;--co-border-radius-3xl:40px;--co-border-radius-4xl:48px;--co-border-radius-5xl:56px;--co-border-radius-6xl:64px;--co-border-radius-full:9999px;--co-shadow-lg:0 10px 15px -3px rgba(26, 26, 26, 0.05), 0 4px 6px -4px rgba(26, 26, 26, 0.05);--co-spacing-xxs:2px;--co-spacing-xs:4px;--co-spacing-sm:6px;--co-spacing-sm2:8px;--co-spacing-md:12px;--co-spacing-lg:16px;--co-spacing-xl:20px;--co-spacing-2xl:24px;--co-spacing-3xl:32px;--co-spacing-4xl:40px;--co-spacing-5xl:48px;--co-spacing-6xl:56px;--co-spacing-7xl:64px;--co-spacing-8xl:72px;--co-spacing-9xl:80px;--co-spacing-10xl:88px;--co-spacing-11xl:96px;--co-spacing-12xl:104px;--co-spacing-13xl:112px;--co-spacing-14xl:120px;--co-spacing-full:9999px;--co-font-family-primary:'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;--co-font-family-mono:'Geist Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;--co-font-size-10:10px;--co-font-size-12:12px;--co-font-size-14:14px;--co-font-size-16:16px;--co-font-size-18:18px;--co-font-size-20:20px;--co-font-size-22:22px;--co-font-size-24:24px;--co-font-size-26:26px;--co-font-size-30:30px;--co-font-size-32:32px;--co-font-size-36:36px;--co-font-size-40:40px;--co-font-size-44:44px;--co-font-size-48:48px;--co-font-size-50:50px;--co-font-size-56:56px;--co-font-size-64:64px;--co-font-size-72:72px;--co-font-size-80:80px;--co-font-size-96:96px;--co-font-size-104:104px;--co-font-size-112:112px;--co-font-size-128:128px;--co-font-size-144:144px;--co-font-size-160:160px;--co-font-size-180:180px;--co-font-size-200:200px;--co-font-size-220:220px;--co-font-weight-regular:400;--co-font-weight-medium:500;--co-font-weight-semibold:600;--co-font-weight-bold:700;--co-font-line-height-none:1;--co-font-line-height-tight:1.2;--co-font-line-height-snug:1.3;--co-font-line-height-normal:1.5;--co-font-line-height-relaxed:1.6;--co-font-letter-spacing-body:-0.03em;--co-font-letter-spacing-overline:0.08em;--co-semantic-surface-primary:var(--co-color-base-negro);--co-semantic-surface-inverse:var(--co-semantic-surface-primary);--co-semantic-surface-secondary:var(--co-color-base-blanco);--co-semantic-surface-page:var(--co-color-base-blanco);--co-semantic-surface-muted:var(--co-color-gray-200);--co-semantic-surface-hover:var(--co-color-opacity-negro-4);--co-semantic-surface-disabled:var(--co-color-gray-100);--co-semantic-on-primary:var(--co-color-base-blanco);--co-semantic-on-secondary:var(--co-color-base-negro);--co-semantic-text-default:var(--co-color-base-negro);--co-semantic-text-inverse:var(--co-color-base-blanco);--co-semantic-text-secondary:var(--co-color-gray-600);--co-semantic-text-muted:var(--co-color-gray-500);--co-semantic-text-disabled:var(--co-color-gray-400);--co-semantic-border-default:var(--co-color-opacity-negro-16);--co-semantic-border-subtle:var(--co-color-opacity-negro-8);--co-semantic-border-strong:var(--co-color-opacity-negro-50);--co-semantic-border-focus:var(--co-color-opacity-negro-25);--co-semantic-border-focus-ring:var(--co-color-opacity-negro-8);--co-semantic-control-thumb:var(--co-color-base-blanco);--co-semantic-control-shadow:var(--co-color-opacity-negro-16);--co-semantic-status-success:var(--co-color-status-success);--co-semantic-status-error:var(--co-color-status-error);--co-semantic-status-warning:var(--co-color-primary-amarillo);--co-semantic-status-info:var(--co-color-status-progress)}:root{--co-color-negro:var(--co-color-base-negro);--co-color-blanco:var(--co-color-base-blanco);--co-color-neutral-beige:var(--co-color-base-off-white);--co-color-secondary-rojo:var(--co-color-secondary-rojo-100);--co-color-secondary-naranja:var(--co-color-secondary-naranja-100);--co-color-secondary-oliva:var(--co-color-secondary-oliva-100);--co-color-secondary-violeta:var(--co-color-secondary-violeta-100);--co-color-secondary-marron:var(--co-color-secondary-marron-100);--co-color-status-success-bg:var(--co-color-status-bg-success);--co-font-family:var(--co-font-family-primary);--co-border-radius-md:var(--co-border-radius-lg);--co-font-size-11:11px;--co-font-size-28:28px}";
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
Stencil Client Platform v4.43.4 | MIT Licensed | https://stenciljs.com
|
|
@@ -123,10 +123,6 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
123
123
|
return import(
|
|
124
124
|
/* webpackMode: "lazy" */
|
|
125
125
|
'./co-autocomplete.entry.js').then(processMod, consoleError);
|
|
126
|
-
case 'co-avatar':
|
|
127
|
-
return import(
|
|
128
|
-
/* webpackMode: "lazy" */
|
|
129
|
-
'./co-avatar.entry.js').then(processMod, consoleError);
|
|
130
126
|
case 'co-badge':
|
|
131
127
|
return import(
|
|
132
128
|
/* webpackMode: "lazy" */
|
|
@@ -163,14 +159,14 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
163
159
|
return import(
|
|
164
160
|
/* webpackMode: "lazy" */
|
|
165
161
|
'./co-data-table-pagination.entry.js').then(processMod, consoleError);
|
|
166
|
-
case 'co-date-
|
|
162
|
+
case 'co-date-picker':
|
|
167
163
|
return import(
|
|
168
164
|
/* webpackMode: "lazy" */
|
|
169
|
-
'./co-date-
|
|
170
|
-
case 'co-
|
|
165
|
+
'./co-date-picker.entry.js').then(processMod, consoleError);
|
|
166
|
+
case 'co-date-range':
|
|
171
167
|
return import(
|
|
172
168
|
/* webpackMode: "lazy" */
|
|
173
|
-
'./co-
|
|
169
|
+
'./co-date-range.entry.js').then(processMod, consoleError);
|
|
174
170
|
case 'co-empty-state':
|
|
175
171
|
return import(
|
|
176
172
|
/* webpackMode: "lazy" */
|
|
@@ -191,6 +187,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
191
187
|
return import(
|
|
192
188
|
/* webpackMode: "lazy" */
|
|
193
189
|
'./co-input.entry.js').then(processMod, consoleError);
|
|
190
|
+
case 'co-json-field':
|
|
191
|
+
return import(
|
|
192
|
+
/* webpackMode: "lazy" */
|
|
193
|
+
'./co-json-field.entry.js').then(processMod, consoleError);
|
|
194
194
|
case 'co-list-item':
|
|
195
195
|
return import(
|
|
196
196
|
/* webpackMode: "lazy" */
|
|
@@ -227,6 +227,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
227
227
|
return import(
|
|
228
228
|
/* webpackMode: "lazy" */
|
|
229
229
|
'./co-progress-bar.entry.js').then(processMod, consoleError);
|
|
230
|
+
case 'co-progress-circle':
|
|
231
|
+
return import(
|
|
232
|
+
/* webpackMode: "lazy" */
|
|
233
|
+
'./co-progress-circle.entry.js').then(processMod, consoleError);
|
|
230
234
|
case 'co-radio':
|
|
231
235
|
return import(
|
|
232
236
|
/* webpackMode: "lazy" */
|
|
@@ -243,6 +247,14 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
243
247
|
return import(
|
|
244
248
|
/* webpackMode: "lazy" */
|
|
245
249
|
'./co-ref-field.entry.js').then(processMod, consoleError);
|
|
250
|
+
case 'co-rich-text-editor':
|
|
251
|
+
return import(
|
|
252
|
+
/* webpackMode: "lazy" */
|
|
253
|
+
'./co-rich-text-editor.entry.js').then(processMod, consoleError);
|
|
254
|
+
case 'co-rich-text-viewer':
|
|
255
|
+
return import(
|
|
256
|
+
/* webpackMode: "lazy" */
|
|
257
|
+
'./co-rich-text-viewer.entry.js').then(processMod, consoleError);
|
|
246
258
|
case 'co-row':
|
|
247
259
|
return import(
|
|
248
260
|
/* webpackMode: "lazy" */
|
|
@@ -279,6 +291,14 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
279
291
|
return import(
|
|
280
292
|
/* webpackMode: "lazy" */
|
|
281
293
|
'./co-tab-group.entry.js').then(processMod, consoleError);
|
|
294
|
+
case 'co-tags-field':
|
|
295
|
+
return import(
|
|
296
|
+
/* webpackMode: "lazy" */
|
|
297
|
+
'./co-tags-field.entry.js').then(processMod, consoleError);
|
|
298
|
+
case 'co-textarea':
|
|
299
|
+
return import(
|
|
300
|
+
/* webpackMode: "lazy" */
|
|
301
|
+
'./co-textarea.entry.js').then(processMod, consoleError);
|
|
282
302
|
case 'co-toast':
|
|
283
303
|
return import(
|
|
284
304
|
/* webpackMode: "lazy" */
|
|
@@ -299,6 +319,14 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
299
319
|
return import(
|
|
300
320
|
/* webpackMode: "lazy" */
|
|
301
321
|
'./co-transfer-list.entry.js').then(processMod, consoleError);
|
|
322
|
+
case 'co-date-range-picker':
|
|
323
|
+
return import(
|
|
324
|
+
/* webpackMode: "lazy" */
|
|
325
|
+
'./co-date-range-picker.entry.js').then(processMod, consoleError);
|
|
326
|
+
case 'co-rich-text-toolbar':
|
|
327
|
+
return import(
|
|
328
|
+
/* webpackMode: "lazy" */
|
|
329
|
+
'./co-rich-text-toolbar.entry.js').then(processMod, consoleError);
|
|
302
330
|
case 'co-checkbox':
|
|
303
331
|
return import(
|
|
304
332
|
/* webpackMode: "lazy" */
|
|
@@ -323,6 +351,34 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
323
351
|
return import(
|
|
324
352
|
/* webpackMode: "lazy" */
|
|
325
353
|
'./co-icon.entry.js').then(processMod, consoleError);
|
|
354
|
+
case 'co-color-picker':
|
|
355
|
+
return import(
|
|
356
|
+
/* webpackMode: "lazy" */
|
|
357
|
+
'./co-color-picker.entry.js').then(processMod, consoleError);
|
|
358
|
+
case 'co-phone-field':
|
|
359
|
+
return import(
|
|
360
|
+
/* webpackMode: "lazy" */
|
|
361
|
+
'./co-phone-field.entry.js').then(processMod, consoleError);
|
|
362
|
+
case 'co-avatar':
|
|
363
|
+
return import(
|
|
364
|
+
/* webpackMode: "lazy" */
|
|
365
|
+
'./co-avatar.entry.js').then(processMod, consoleError);
|
|
366
|
+
case 'co-lightbox':
|
|
367
|
+
return import(
|
|
368
|
+
/* webpackMode: "lazy" */
|
|
369
|
+
'./co-lightbox.entry.js').then(processMod, consoleError);
|
|
370
|
+
case 'co-column-picker':
|
|
371
|
+
return import(
|
|
372
|
+
/* webpackMode: "lazy" */
|
|
373
|
+
'./co-column-picker.entry.js').then(processMod, consoleError);
|
|
374
|
+
case 'co-file-field':
|
|
375
|
+
return import(
|
|
376
|
+
/* webpackMode: "lazy" */
|
|
377
|
+
'./co-file-field.entry.js').then(processMod, consoleError);
|
|
378
|
+
case 'co-calendar_3':
|
|
379
|
+
return import(
|
|
380
|
+
/* webpackMode: "lazy" */
|
|
381
|
+
'./co-calendar_3.entry.js').then(processMod, consoleError);
|
|
326
382
|
}
|
|
327
383
|
}
|
|
328
384
|
return import(
|
|
@@ -348,6 +404,7 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
348
404
|
var styles = /* @__PURE__ */ new Map();
|
|
349
405
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
350
406
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
407
|
+
var XLINK_NS = "http://www.w3.org/1999/xlink";
|
|
351
408
|
var win = typeof window !== "undefined" ? window : {};
|
|
352
409
|
var plt = {
|
|
353
410
|
$flags$: 0,
|
|
@@ -1009,15 +1066,26 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
1009
1066
|
} catch (e) {
|
|
1010
1067
|
}
|
|
1011
1068
|
}
|
|
1069
|
+
let xlink = false;
|
|
1070
|
+
{
|
|
1071
|
+
if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
|
|
1072
|
+
memberName = ln;
|
|
1073
|
+
xlink = true;
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1012
1076
|
if (newValue == null || newValue === false) {
|
|
1013
1077
|
if (newValue !== false || elm.getAttribute(memberName) === "") {
|
|
1014
|
-
{
|
|
1078
|
+
if (xlink) {
|
|
1079
|
+
elm.removeAttributeNS(XLINK_NS, memberName);
|
|
1080
|
+
} else {
|
|
1015
1081
|
elm.removeAttribute(memberName);
|
|
1016
1082
|
}
|
|
1017
1083
|
}
|
|
1018
1084
|
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
|
|
1019
1085
|
newValue = newValue === true ? "" : newValue;
|
|
1020
|
-
{
|
|
1086
|
+
if (xlink) {
|
|
1087
|
+
elm.setAttributeNS(XLINK_NS, memberName, newValue);
|
|
1088
|
+
} else {
|
|
1021
1089
|
elm.setAttribute(memberName, newValue);
|
|
1022
1090
|
}
|
|
1023
1091
|
}
|