@prolibu-suite/cobalt-core 0.9.5 → 0.10.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 +750 -80
- package/dist/cjs/co-accordion.cjs.entry.js +1 -1
- package/dist/cjs/co-action-bar.cjs.entry.js +1 -1
- package/dist/cjs/co-app-shell.cjs.entry.js +4 -4
- package/dist/cjs/co-audio-player.cjs.entry.js +1 -1
- package/dist/cjs/co-autocomplete.cjs.entry.js +2 -2
- package/dist/cjs/co-avatar-group.cjs.entry.js +1 -1
- package/dist/cjs/co-avatar_2.cjs.entry.js +49 -17
- package/dist/cjs/co-badge.cjs.entry.js +11 -3
- package/dist/cjs/co-bottom-sheet.cjs.entry.js +1 -1
- package/dist/cjs/co-breadcrumb-item.cjs.entry.js +1 -1
- package/dist/cjs/co-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/co-button-group.cjs.entry.js +1 -1
- package/dist/cjs/co-button.cjs.entry.js +2 -2
- package/dist/cjs/co-calendar-month_2.cjs.entry.js +55 -20
- package/dist/cjs/co-calendar_3.cjs.entry.js +27 -15
- package/dist/cjs/co-card.cjs.entry.js +1 -1
- package/dist/cjs/co-carousel-item.cjs.entry.js +1 -1
- package/dist/cjs/co-carousel.cjs.entry.js +2 -2
- package/dist/cjs/co-checkbox-group.cjs.entry.js +2 -2
- package/dist/cjs/co-checkbox.cjs.entry.js +6 -6
- package/dist/cjs/co-chip_2.cjs.entry.js +8 -5
- package/dist/cjs/co-color-picker.cjs.entry.js +1048 -27
- package/dist/cjs/co-column-picker.cjs.entry.js +3 -3
- package/dist/cjs/co-combobox.cjs.entry.js +2 -2
- package/dist/cjs/co-command-search.cjs.entry.js +1 -1
- package/dist/cjs/co-data-table-pagination.cjs.entry.js +5 -5
- package/dist/cjs/co-data-table.cjs.entry.js +1 -1
- package/dist/cjs/co-date-picker.cjs.entry.js +3 -3
- package/dist/cjs/co-date-range-picker.cjs.entry.js +3 -3
- package/dist/cjs/co-date-range.cjs.entry.js +2 -2
- package/dist/cjs/co-date-time-picker.cjs.entry.js +101 -130
- package/dist/cjs/co-drive-card.cjs.entry.js +2 -2
- package/dist/cjs/co-drop-zone.cjs.entry.js +2 -2
- package/dist/cjs/co-emoji-picker.cjs.entry.js +4 -4
- package/dist/cjs/co-empty-state.cjs.entry.js +4 -4
- package/dist/cjs/co-event-calendar.cjs.entry.js +4 -4
- package/dist/cjs/co-event-popover.cjs.entry.js +3 -3
- package/dist/cjs/co-fab.cjs.entry.js +3 -3
- package/dist/cjs/co-file-field.cjs.entry.js +102 -106
- package/dist/cjs/co-file-type-tile.cjs.entry.js +3 -3
- package/dist/cjs/co-helper-text.cjs.entry.js +3 -3
- package/dist/cjs/co-icon-button.cjs.entry.js +6 -6
- package/dist/cjs/co-icon.cjs.entry.js +3 -3
- package/dist/cjs/co-input.cjs.entry.js +26 -4
- package/dist/cjs/co-json-field.cjs.entry.js +5 -5
- package/dist/cjs/co-lightbox.cjs.entry.js +204 -21
- package/dist/cjs/co-list-footer.cjs.entry.js +2 -2
- package/dist/cjs/co-list-item.cjs.entry.js +5 -5
- package/dist/cjs/co-loader.cjs.entry.js +1 -1
- package/dist/cjs/co-media-thumb.cjs.entry.js +3 -3
- package/dist/cjs/co-menu-divider.cjs.entry.js +2 -2
- package/dist/cjs/co-menu-item.cjs.entry.js +84 -3
- package/dist/cjs/co-menu.cjs.entry.js +2 -2
- package/dist/cjs/co-modal.cjs.entry.js +6 -4
- package/dist/cjs/co-navbar.cjs.entry.js +4 -4
- package/dist/cjs/co-number-field.cjs.entry.js +272 -9
- package/dist/cjs/co-overlay.cjs.entry.js +6 -4
- package/dist/cjs/co-page-header.cjs.entry.js +2 -2
- package/dist/cjs/co-phone-field.cjs.entry.js +3 -3
- package/dist/cjs/co-popover.cjs.entry.js +58 -21
- package/dist/cjs/co-progress-bar.cjs.entry.js +3 -3
- package/dist/cjs/co-progress-circle.cjs.entry.js +3 -3
- package/dist/cjs/co-provider-logo_2.cjs.entry.js +47 -3
- package/dist/cjs/co-radio-group.cjs.entry.js +1 -1
- 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 +4 -4
- package/dist/cjs/co-rich-text-editor.cjs.entry.js +11 -8
- package/dist/cjs/co-rich-text-toolbar.cjs.entry.js +7 -3
- package/dist/cjs/co-rich-text-viewer.cjs.entry.js +4 -3
- package/dist/cjs/co-row.cjs.entry.js +3 -3
- package/dist/cjs/co-segmented-bar.cjs.entry.js +1 -1
- package/dist/cjs/co-select.cjs.entry.js +2 -2
- package/dist/cjs/co-separator.cjs.entry.js +2 -2
- package/dist/cjs/co-sidebar-nav.cjs.entry.js +2 -2
- 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 +6 -6
- package/dist/cjs/co-tab-group.cjs.entry.js +3 -3
- package/dist/cjs/co-tab.cjs.entry.js +3 -3
- package/dist/cjs/co-tags-field.cjs.entry.js +8 -8
- package/dist/cjs/co-textarea.cjs.entry.js +6 -6
- package/dist/cjs/co-time-field.cjs.entry.js +325 -0
- package/dist/cjs/co-toast.cjs.entry.js +2 -2
- package/dist/cjs/co-toggle-button-group.cjs.entry.js +4 -4
- package/dist/cjs/co-toggle-button.cjs.entry.js +4 -4
- package/dist/cjs/co-transfer-list.cjs.entry.js +1 -1
- package/dist/cjs/co-video.cjs.entry.js +32 -7
- package/dist/cjs/cobalt.cjs.js +2 -2
- package/dist/cjs/color-CML2Cfdh.js +142 -0
- package/dist/cjs/{dateI18n-wblvKRq_.js → dateI18n-BK2qHqoC.js} +36 -0
- package/dist/cjs/{fieldChip-BLzo9MEV.js → fieldChip-B6YIGU1V.js} +1 -1
- package/dist/cjs/fileI18n-6sdbKvo6.js +88 -0
- package/dist/cjs/{index-DFZ5YhIT.js → index-BYwrR87Z.js} +28 -10
- package/dist/cjs/{index-DK-2Lzmf.js → index-MDAnKsze.js} +25 -21
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{positioning-DCj_AJ2T.js → positioning-CyatXeT_.js} +32 -13
- package/dist/cjs/{requiredMark-C1xcrzSZ.js → requiredMark-D-t-IPN0.js} +1 -1
- package/dist/cjs/{toolbar-config-BQfWTW6P.js → toolbar-config-BSGas-Wl.js} +10 -0
- package/dist/cobalt/cobalt.css +1 -1
- package/dist/cobalt/cobalt.esm.js +1 -1
- package/dist/cobalt/{p-f83b48fd.entry.js → p-011dc80b.entry.js} +1 -1
- package/dist/cobalt/{p-316c62c0.entry.js → p-0678c797.entry.js} +1 -1
- package/dist/cobalt/{p-43bd298d.entry.js → p-08e42e00.entry.js} +1 -1
- package/dist/cobalt/{p-1c68bc41.entry.js → p-10b82207.entry.js} +1 -1
- package/dist/cobalt/{p-a8c64cc3.entry.js → p-15d59169.entry.js} +1 -1
- package/dist/cobalt/{p-07d570a6.entry.js → p-16954cea.entry.js} +1 -1
- package/dist/cobalt/{p-85a61e28.entry.js → p-17244412.entry.js} +1 -1
- package/dist/cobalt/p-1788aab5.entry.js +1 -0
- package/dist/cobalt/p-1a589c8e.entry.js +1 -0
- package/dist/cobalt/{p-da546d08.entry.js → p-1dc55e43.entry.js} +1 -1
- package/dist/cobalt/p-20a39218.entry.js +1 -0
- package/dist/cobalt/{p-4c7e3984.entry.js → p-23ab0cc5.entry.js} +1 -1
- package/dist/cobalt/{p-fabe5fb2.entry.js → p-2636b7eb.entry.js} +1 -1
- package/dist/cobalt/{p-88a0659f.entry.js → p-27a7e549.entry.js} +1 -1
- package/dist/cobalt/{p-18d34b01.entry.js → p-290066ef.entry.js} +1 -1
- package/dist/cobalt/{p-89e38c5e.entry.js → p-2f9cbbd5.entry.js} +1 -1
- package/dist/cobalt/{p-ef5e1167.entry.js → p-325b91b6.entry.js} +1 -1
- package/dist/cobalt/{p-60cb66f5.entry.js → p-37f5036b.entry.js} +1 -1
- package/dist/cobalt/p-3cc3ff93.entry.js +1 -0
- package/dist/cobalt/p-410bee4d.entry.js +1 -0
- package/dist/cobalt/{p-6795a258.entry.js → p-44c4e4a3.entry.js} +1 -1
- package/dist/cobalt/{p-4b083da4.entry.js → p-44ea675f.entry.js} +1 -1
- package/dist/cobalt/{p-2828ecf6.entry.js → p-4592ca00.entry.js} +1 -1
- package/dist/cobalt/p-4908f33f.entry.js +1 -0
- package/dist/cobalt/{p-342e1da4.entry.js → p-4d65e713.entry.js} +1 -1
- package/dist/cobalt/{p-dca4cd5f.entry.js → p-4d897896.entry.js} +1 -1
- package/dist/cobalt/{p-33ea4a90.entry.js → p-50bcc76f.entry.js} +1 -1
- package/dist/cobalt/{p-ac91259e.entry.js → p-5298c030.entry.js} +1 -1
- package/dist/cobalt/p-54c987d7.entry.js +1 -0
- package/dist/cobalt/p-56551580.entry.js +1 -0
- package/dist/cobalt/p-58137c9e.entry.js +1 -0
- package/dist/cobalt/{p-4f754c9a.entry.js → p-58d9b650.entry.js} +1 -1
- package/dist/cobalt/p-59963937.entry.js +1 -0
- package/dist/cobalt/{p-2d329ac8.entry.js → p-623cc195.entry.js} +1 -1
- package/dist/cobalt/p-63825d7f.entry.js +1 -0
- package/dist/cobalt/{p-8e667eb6.entry.js → p-66b11b38.entry.js} +1 -1
- package/dist/cobalt/{p-fb3a095b.entry.js → p-6bf6bc3e.entry.js} +1 -1
- package/dist/cobalt/p-6f700f0d.entry.js +1 -0
- package/dist/cobalt/p-73c6d735.entry.js +1 -0
- package/dist/cobalt/{p-a6357340.entry.js → p-76249983.entry.js} +1 -1
- package/dist/cobalt/{p-bfc2a849.entry.js → p-82266f11.entry.js} +1 -1
- package/dist/cobalt/{p-a9b29cc2.entry.js → p-826ee074.entry.js} +1 -1
- package/dist/cobalt/{p-23b3ff3f.entry.js → p-83a9a05a.entry.js} +1 -1
- package/dist/cobalt/{p-568cfe8d.entry.js → p-83ea631d.entry.js} +1 -1
- package/dist/cobalt/p-85501c6a.entry.js +1 -0
- package/dist/cobalt/{p-dfd25f1d.entry.js → p-88195a63.entry.js} +1 -1
- package/dist/cobalt/p-8fa5dc4a.entry.js +1 -0
- package/dist/cobalt/{p-c8dba82f.entry.js → p-91e73a92.entry.js} +1 -1
- package/dist/cobalt/{p-ac466658.entry.js → p-92b092db.entry.js} +1 -1
- package/dist/cobalt/{p-36197363.entry.js → p-996f4e38.entry.js} +1 -1
- package/dist/cobalt/p-BRbgGqLw.js +1 -0
- package/dist/cobalt/{p-BL0sCfMH.js → p-Bryf3-Js.js} +1 -1
- package/dist/cobalt/p-DFHRS9cJ.js +1 -0
- package/dist/cobalt/{p-CrtiywTB.js → p-DH5lfRNj.js} +1 -1
- package/dist/{components/p-WeuPA9Rw.js → cobalt/p-DOL2zACE.js} +1 -1
- package/dist/cobalt/p-D_zA1Pv4.js +1 -0
- package/dist/cobalt/{p-fef5db54.entry.js → p-a32b20eb.entry.js} +1 -1
- package/dist/cobalt/p-aa9400bf.entry.js +1 -0
- package/dist/cobalt/{p-8eb485c8.entry.js → p-aaca6dab.entry.js} +1 -1
- package/dist/cobalt/{p-e5495539.entry.js → p-aae86f96.entry.js} +1 -1
- package/dist/cobalt/{p-8f38e24d.entry.js → p-ad33c40e.entry.js} +1 -1
- package/dist/cobalt/p-b0c4fc71.entry.js +1 -0
- package/dist/cobalt/{p-da18b5f4.entry.js → p-b1e8d69e.entry.js} +1 -1
- package/dist/cobalt/p-b48917c9.entry.js +1 -0
- package/dist/cobalt/{p-7e53e9c8.entry.js → p-b565104d.entry.js} +1 -1
- package/dist/cobalt/{p-b0319a2d.entry.js → p-b90d41e4.entry.js} +1 -1
- package/dist/cobalt/{p-c5684c79.entry.js → p-bd683db3.entry.js} +1 -1
- package/dist/cobalt/{p-1ddbc48b.entry.js → p-c124e82b.entry.js} +1 -1
- package/dist/cobalt/{p-95efe661.entry.js → p-c2ebf0ec.entry.js} +1 -1
- package/dist/cobalt/{p-76420ac1.entry.js → p-c32c176a.entry.js} +1 -1
- package/dist/cobalt/{p-54ae807d.entry.js → p-c465d619.entry.js} +1 -1
- package/dist/cobalt/{p-ab45d9bd.entry.js → p-c91d4fc6.entry.js} +1 -1
- package/dist/cobalt/{p-ce35c898.entry.js → p-d29bb0fa.entry.js} +1 -1
- package/dist/cobalt/{p-7c5e846a.entry.js → p-db805569.entry.js} +1 -1
- package/dist/cobalt/p-e01f9b9a.entry.js +1 -0
- package/dist/cobalt/p-e3aae282.entry.js +1 -0
- package/dist/cobalt/{p-d15d3a97.entry.js → p-e4264532.entry.js} +1 -1
- package/dist/cobalt/{p-93c68029.entry.js → p-e48f4e45.entry.js} +1 -1
- package/dist/cobalt/{p-3f0eed59.entry.js → p-e49a564c.entry.js} +1 -1
- package/dist/cobalt/p-e8a2f993.entry.js +1 -0
- package/dist/cobalt/p-e8a4e6b0.entry.js +1 -0
- package/dist/cobalt/p-ea20f048.entry.js +1 -0
- package/dist/cobalt/{p-c1e7fb32.entry.js → p-eb063cc0.entry.js} +1 -1
- package/dist/cobalt/p-eb82358d.entry.js +1 -0
- package/dist/cobalt/{p-2114c036.entry.js → p-eb8691f2.entry.js} +1 -1
- package/dist/cobalt/{p-e8878cf9.entry.js → p-ee2023da.entry.js} +1 -1
- package/dist/cobalt/p-ee9a623d.entry.js +1 -0
- package/dist/cobalt/p-ef5ca521.entry.js +1 -0
- package/dist/cobalt/p-f4e1c3c3.entry.js +1 -0
- package/dist/cobalt/{p-e364b8a5.entry.js → p-f57dffca.entry.js} +1 -1
- package/dist/cobalt/p-f6691108.entry.js +1 -0
- package/dist/cobalt/p-f68dd124.entry.js +1 -0
- package/dist/cobalt/p-fMqVDypp.js +1 -0
- package/dist/cobalt/{p-0c463d9a.entry.js → p-fd150cc6.entry.js} +1 -1
- package/dist/cobalt/{p-0e91e5c4.entry.js → p-fe7e8813.entry.js} +1 -1
- package/dist/cobalt/p-gKnOhsd2.js +1 -0
- package/dist/cobalt/p-jYd9gu_c.js +1 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/co-app-shell/co-app-shell.css +107 -41
- package/dist/collection/components/co-app-shell/co-app-shell.js +2 -2
- package/dist/collection/components/co-autocomplete/co-autocomplete.js +1 -1
- package/dist/collection/components/co-avatar-group/co-avatar-group.js +1 -1
- package/dist/collection/components/co-badge/co-badge.css +18 -0
- package/dist/collection/components/co-badge/co-badge.js +29 -1
- package/dist/collection/components/co-button/co-button.css +4 -4
- package/dist/collection/components/co-checkbox/co-checkbox.css +12 -3
- package/dist/collection/components/co-checkbox/co-checkbox.js +6 -6
- package/dist/collection/components/co-checkbox-group/co-checkbox-group.css +1 -3
- package/dist/collection/components/co-checkbox-group/co-checkbox-group.js +1 -1
- package/dist/collection/components/co-color-picker/co-color-picker.css +252 -5
- package/dist/collection/components/co-color-picker/co-color-picker.js +932 -15
- package/dist/collection/components/co-color-picker/presets.js +113 -15
- package/dist/collection/components/co-column-picker/co-column-picker.js +2 -2
- package/dist/collection/components/co-combobox/co-combobox.js +1 -1
- package/dist/collection/components/co-command-search/co-command-search.js +1 -1
- package/dist/collection/components/co-data-table/co-data-table.js +1 -1
- 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.js +4 -4
- package/dist/collection/components/co-date-range/co-date-range.js +1 -1
- package/dist/collection/components/co-date-range-picker/co-date-range-picker.js +2 -2
- package/dist/collection/components/co-date-time-picker/co-date-time-picker.css +128 -32
- package/dist/collection/components/co-date-time-picker/co-date-time-picker.js +142 -138
- package/dist/collection/components/co-drawer/co-drawer.css +99 -36
- package/dist/collection/components/co-drawer/co-drawer.js +19 -7
- package/dist/collection/components/co-drive-card/co-drive-card.js +1 -1
- package/dist/collection/components/co-drop-zone/co-drop-zone.js +1 -1
- package/dist/collection/components/co-emoji-picker/co-emoji-picker.js +2 -2
- package/dist/collection/components/co-empty-state/co-empty-state.css +28 -0
- package/dist/collection/components/co-empty-state/co-empty-state.js +2 -2
- package/dist/collection/components/co-event-calendar/co-event-calendar.js +2 -2
- package/dist/collection/components/co-event-popover/co-event-popover.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 +55 -2
- package/dist/collection/components/co-file-field/co-file-field.js +41 -13
- package/dist/collection/components/co-file-field/co-file-field.utils.js +51 -4
- package/dist/collection/components/co-file-type-tile/co-file-type-tile.js +2 -2
- package/dist/collection/components/co-helper-text/co-helper-text.js +2 -2
- package/dist/collection/components/co-icon/co-icon.js +2 -2
- package/dist/collection/components/co-icon-button/co-icon-button.css +40 -2
- package/dist/collection/components/co-icon-button/co-icon-button.js +43 -4
- package/dist/collection/components/co-input/co-input.css +33 -0
- package/dist/collection/components/co-input/co-input.js +25 -2
- package/dist/collection/components/co-json-field/co-json-field.js +3 -3
- package/dist/collection/components/co-lightbox/co-lightbox.css +23 -0
- package/dist/collection/components/co-lightbox/co-lightbox.js +209 -20
- package/dist/collection/components/co-list-footer/co-list-footer.js +1 -1
- package/dist/collection/components/co-list-item/co-list-item.js +4 -4
- package/dist/collection/components/co-media-thumb/co-media-thumb.js +2 -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-menu-item/co-menu-item.js +67 -3
- package/dist/collection/components/co-modal/co-modal.css +106 -37
- package/dist/collection/components/co-modal/co-modal.js +4 -2
- package/dist/collection/components/co-navbar/co-navbar.css +4 -2
- package/dist/collection/components/co-navbar/co-navbar.js +2 -2
- package/dist/collection/components/co-number-field/co-number-field.css +22 -0
- package/dist/collection/components/co-number-field/co-number-field.js +216 -9
- package/dist/collection/components/co-option-list/co-option-list.css +25 -4
- package/dist/collection/components/co-option-list/co-option-list.js +26 -3
- package/dist/collection/components/co-overlay/co-overlay.js +5 -3
- package/dist/collection/components/co-page-header/co-page-header.js +1 -1
- package/dist/collection/components/co-phone-field/co-phone-field.js +1 -1
- package/dist/collection/components/co-popover/co-popover.css +18 -3
- package/dist/collection/components/co-popover/co-popover.js +83 -20
- package/dist/collection/components/co-progress-bar/co-progress-bar.js +2 -2
- package/dist/collection/components/co-progress-circle/co-progress-circle.js +2 -2
- package/dist/collection/components/co-radio/co-radio.js +3 -3
- package/dist/collection/components/co-radio-group/co-radio-group.js +1 -1
- package/dist/collection/components/co-rating/co-rating.js +3 -3
- package/dist/collection/components/co-ref-field/co-ref-field.js +3 -3
- package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.css +14 -1
- package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.js +9 -6
- package/dist/collection/components/co-rich-text-toolbar/co-rich-text-toolbar.js +7 -3
- package/dist/collection/components/co-rich-text-viewer/co-rich-text-viewer.js +3 -2
- package/dist/collection/components/co-row/co-row.js +2 -2
- package/dist/collection/components/co-segmented-bar/co-segmented-bar.js +1 -1
- package/dist/collection/components/co-select/co-select.js +1 -1
- package/dist/collection/components/co-separator/co-separator.js +1 -1
- package/dist/collection/components/co-sidebar/co-sidebar.js +2 -2
- package/dist/collection/components/co-sidebar-nav/co-sidebar-nav.css +2 -2
- package/dist/collection/components/co-sidebar-nav/co-sidebar-nav.js +1 -1
- package/dist/collection/components/co-skeleton/co-skeleton.css +18 -0
- package/dist/collection/components/co-skeleton/co-skeleton.js +83 -1
- package/dist/collection/components/co-slider/co-slider.js +2 -2
- package/dist/collection/components/co-switch/co-switch.css +3 -3
- package/dist/collection/components/co-switch/co-switch.js +3 -3
- package/dist/collection/components/co-tab/co-tab.js +2 -2
- package/dist/collection/components/co-tab-group/co-tab-group.js +2 -2
- package/dist/collection/components/co-tags-field/co-tags-field.js +5 -5
- package/dist/collection/components/co-textarea/co-textarea.js +4 -4
- package/dist/collection/components/co-time-field/co-time-field.css +111 -0
- package/dist/collection/components/co-time-field/co-time-field.js +536 -0
- package/dist/collection/components/co-toast/co-toast.css +13 -7
- package/dist/collection/components/co-toast/co-toast.js +2 -2
- package/dist/collection/components/co-toggle-button/co-toggle-button.css +16 -11
- 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 +7 -1
- package/dist/collection/components/co-toggle-button-group/co-toggle-button-group.js +2 -2
- package/dist/collection/components/co-tooltip/co-tooltip.css +18 -1
- package/dist/collection/components/co-tooltip/co-tooltip.js +49 -16
- package/dist/collection/components/co-transfer-list/co-transfer-list.js +1 -1
- package/dist/collection/components/co-video/co-video.js +34 -9
- package/dist/collection/utils/amountText.js +95 -0
- package/dist/collection/utils/color.js +109 -3
- package/dist/collection/utils/colorPickerI18n.js +55 -0
- package/dist/collection/utils/dateI18n.js +36 -0
- package/dist/collection/utils/fileI18n.js +3 -0
- package/dist/collection/utils/positioning.js +37 -4
- package/dist/collection/utils/submenu.js +35 -0
- package/dist/components/co-accordion.js +1 -1
- package/dist/components/co-action-bar.js +1 -1
- package/dist/components/co-app-shell.js +1 -1
- package/dist/components/co-audio-player.js +1 -1
- package/dist/components/co-autocomplete.js +1 -1
- package/dist/components/co-avatar-group.js +1 -1
- package/dist/components/co-avatar.js +1 -1
- package/dist/components/co-badge.js +1 -1
- package/dist/components/co-breadcrumb-item.js +1 -1
- package/dist/components/co-breadcrumb.js +1 -1
- package/dist/components/co-button.js +1 -1
- package/dist/components/co-calendar-month.js +1 -1
- package/dist/components/co-calendar-timegrid.js +1 -1
- package/dist/components/co-calendar.js +1 -1
- package/dist/components/co-carousel.js +1 -1
- package/dist/components/co-checkbox-group.js +1 -1
- package/dist/components/co-checkbox.js +1 -1
- package/dist/components/co-chip.js +1 -1
- package/dist/components/co-color-picker.js +1 -1
- package/dist/components/co-column-picker.js +1 -1
- package/dist/components/co-combobox.js +1 -1
- package/dist/components/co-command-search.js +1 -1
- package/dist/components/co-data-table-pagination.js +1 -1
- package/dist/components/co-data-table.js +1 -1
- package/dist/components/co-date-field.js +1 -1
- package/dist/components/co-date-picker.js +1 -1
- package/dist/components/co-date-range-picker.js +1 -1
- package/dist/components/co-date-range.js +1 -1
- package/dist/components/co-date-time-picker.js +1 -1
- package/dist/components/co-drawer.js +1 -1
- package/dist/components/co-drive-card.js +1 -1
- package/dist/components/co-drop-zone.js +1 -1
- package/dist/components/co-emoji-picker.js +1 -1
- package/dist/components/co-empty-state.js +1 -1
- package/dist/components/co-event-calendar.js +1 -1
- package/dist/components/co-event-popover.js +1 -1
- package/dist/components/co-fab.js +1 -1
- package/dist/components/co-file-field.js +1 -1
- package/dist/components/co-file-type-tile.js +1 -1
- package/dist/components/co-helper-text.js +1 -1
- package/dist/components/co-icon-button.js +1 -1
- package/dist/components/co-icon.js +1 -1
- package/dist/components/co-input.js +1 -1
- package/dist/components/co-json-field.js +1 -1
- package/dist/components/co-lightbox.js +1 -1
- package/dist/components/co-list-footer.js +1 -1
- package/dist/components/co-list-item.js +1 -1
- package/dist/components/co-media-thumb.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-option-list.js +1 -1
- package/dist/components/co-overlay.js +1 -1
- package/dist/components/co-page-header.js +1 -1
- package/dist/components/co-phone-field.js +1 -1
- package/dist/components/co-popover.js +1 -1
- package/dist/components/co-progress-bar.js +1 -1
- package/dist/components/co-progress-circle.js +1 -1
- package/dist/components/co-radio-group.js +1 -1
- package/dist/components/co-radio.js +1 -1
- package/dist/components/co-rating.js +1 -1
- package/dist/components/co-ref-field.js +1 -1
- package/dist/components/co-rich-text-editor.js +1 -1
- package/dist/components/co-rich-text-toolbar.js +1 -1
- package/dist/components/co-rich-text-viewer.js +1 -1
- package/dist/components/co-row.js +1 -1
- package/dist/components/co-select.js +1 -1
- package/dist/components/co-separator.js +1 -1
- package/dist/components/co-sidebar-nav.js +1 -1
- package/dist/components/co-sidebar.js +1 -1
- package/dist/components/co-skeleton.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.js +1 -1
- package/dist/components/co-textarea.js +1 -1
- package/dist/components/co-time-field.d.ts +11 -0
- package/dist/components/co-time-field.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/co-video.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/p-9ceBPSd1.js +1 -0
- package/dist/components/p-B1QFLcY9.js +1 -0
- package/dist/components/p-B2IsXte7.js +1 -0
- package/dist/components/p-B4NCaKrR.js +1 -0
- package/dist/components/p-BBP5__CY.js +1 -0
- package/dist/components/{p-Dabi98BI.js → p-BGDqldEg.js} +1 -1
- package/dist/components/p-BRbgGqLw.js +1 -0
- package/dist/components/p-Be_kyNRE.js +1 -0
- package/dist/components/{p-BL0sCfMH.js → p-Bryf3-Js.js} +1 -1
- package/dist/components/p-BsTO1uUA.js +1 -0
- package/dist/components/{p-CuZXTvDM.js → p-Bv6U5y3d.js} +1 -1
- package/dist/components/p-BxP8OBw6.js +1 -0
- package/dist/components/{p-P8wvwhM2.js → p-CFFDmGPS.js} +1 -1
- package/dist/components/{p-CA_JAK9s.js → p-CT2enQ6h.js} +1 -1
- package/dist/components/p-CXPRaTuo.js +1 -0
- package/dist/components/{p-D5EdMieb.js → p-Cl3AdEQJ.js} +1 -1
- package/dist/components/p-CnX3L8aF.js +1 -0
- package/dist/components/p-DFHRS9cJ.js +1 -0
- package/dist/components/p-DIo66nBr.js +1 -0
- package/dist/components/{p-Dj1EZ5qD.js → p-DNJAIVfI.js} +1 -1
- package/dist/{cobalt/p-WeuPA9Rw.js → components/p-DOL2zACE.js} +1 -1
- package/dist/components/p-DRP8D9ro.js +1 -0
- package/dist/components/p-DkDTmHCg.js +1 -0
- package/dist/components/{p-Bxk96Zgc.js → p-Du_CgT5E.js} +1 -1
- package/dist/components/{p-BHYtxTzM.js → p-HxVRXXXC.js} +1 -1
- package/dist/components/{p-B0Dc-I_C.js → p-NNxjElcX.js} +1 -1
- package/dist/components/p-gKnOhsd2.js +1 -0
- package/dist/components/p-jYd9gu_c.js +1 -0
- package/dist/components/{p-D4qzGifz.js → p-vby0ITbe.js} +1 -1
- package/dist/components/{p-D6OUW6oW.js → p-x4grh-eZ.js} +1 -1
- package/dist/esm/co-accordion.entry.js +1 -1
- package/dist/esm/co-action-bar.entry.js +1 -1
- package/dist/esm/co-app-shell.entry.js +4 -4
- package/dist/esm/co-audio-player.entry.js +1 -1
- package/dist/esm/co-autocomplete.entry.js +2 -2
- package/dist/esm/co-avatar-group.entry.js +1 -1
- package/dist/esm/co-avatar_2.entry.js +49 -17
- package/dist/esm/co-badge.entry.js +11 -3
- package/dist/esm/co-bottom-sheet.entry.js +1 -1
- package/dist/esm/co-breadcrumb-item.entry.js +1 -1
- package/dist/esm/co-breadcrumb.entry.js +1 -1
- package/dist/esm/co-button-group.entry.js +1 -1
- package/dist/esm/co-button.entry.js +2 -2
- package/dist/esm/co-calendar-month_2.entry.js +37 -2
- package/dist/esm/co-calendar_3.entry.js +27 -15
- package/dist/esm/co-card.entry.js +1 -1
- package/dist/esm/co-carousel-item.entry.js +1 -1
- package/dist/esm/co-carousel.entry.js +2 -2
- package/dist/esm/co-checkbox-group.entry.js +2 -2
- package/dist/esm/co-checkbox.entry.js +6 -6
- package/dist/esm/co-chip_2.entry.js +8 -5
- package/dist/esm/co-color-picker.entry.js +1048 -27
- package/dist/esm/co-column-picker.entry.js +3 -3
- package/dist/esm/co-combobox.entry.js +2 -2
- package/dist/esm/co-command-search.entry.js +1 -1
- package/dist/esm/co-data-table-pagination.entry.js +5 -5
- package/dist/esm/co-data-table.entry.js +1 -1
- package/dist/esm/co-date-picker.entry.js +3 -3
- package/dist/esm/co-date-range-picker.entry.js +3 -3
- package/dist/esm/co-date-range.entry.js +2 -2
- package/dist/esm/co-date-time-picker.entry.js +101 -130
- package/dist/esm/co-drive-card.entry.js +2 -2
- package/dist/esm/co-drop-zone.entry.js +2 -2
- package/dist/esm/co-emoji-picker.entry.js +4 -4
- package/dist/esm/co-empty-state.entry.js +4 -4
- package/dist/esm/co-event-calendar.entry.js +4 -4
- package/dist/esm/co-event-popover.entry.js +3 -3
- package/dist/esm/co-fab.entry.js +3 -3
- package/dist/esm/co-file-field.entry.js +95 -99
- package/dist/esm/co-file-type-tile.entry.js +3 -3
- package/dist/esm/co-helper-text.entry.js +3 -3
- package/dist/esm/co-icon-button.entry.js +6 -6
- package/dist/esm/co-icon.entry.js +3 -3
- package/dist/esm/co-input.entry.js +26 -4
- package/dist/esm/co-json-field.entry.js +5 -5
- package/dist/esm/co-lightbox.entry.js +204 -21
- package/dist/esm/co-list-footer.entry.js +2 -2
- package/dist/esm/co-list-item.entry.js +5 -5
- package/dist/esm/co-loader.entry.js +1 -1
- package/dist/esm/co-media-thumb.entry.js +3 -3
- package/dist/esm/co-menu-divider.entry.js +2 -2
- package/dist/esm/co-menu-item.entry.js +84 -3
- package/dist/esm/co-menu.entry.js +2 -2
- package/dist/esm/co-modal.entry.js +6 -4
- package/dist/esm/co-navbar.entry.js +4 -4
- package/dist/esm/co-number-field.entry.js +272 -9
- package/dist/esm/co-overlay.entry.js +6 -4
- package/dist/esm/co-page-header.entry.js +2 -2
- package/dist/esm/co-phone-field.entry.js +3 -3
- package/dist/esm/co-popover.entry.js +58 -21
- package/dist/esm/co-progress-bar.entry.js +3 -3
- package/dist/esm/co-progress-circle.entry.js +3 -3
- package/dist/esm/co-provider-logo_2.entry.js +47 -3
- package/dist/esm/co-radio-group.entry.js +1 -1
- 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 +4 -4
- package/dist/esm/co-rich-text-editor.entry.js +11 -8
- package/dist/esm/co-rich-text-toolbar.entry.js +7 -3
- package/dist/esm/co-rich-text-viewer.entry.js +4 -3
- package/dist/esm/co-row.entry.js +3 -3
- package/dist/esm/co-segmented-bar.entry.js +1 -1
- package/dist/esm/co-select.entry.js +2 -2
- package/dist/esm/co-separator.entry.js +2 -2
- package/dist/esm/co-sidebar-nav.entry.js +2 -2
- 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 +6 -6
- package/dist/esm/co-tab-group.entry.js +3 -3
- package/dist/esm/co-tab.entry.js +3 -3
- package/dist/esm/co-tags-field.entry.js +8 -8
- package/dist/esm/co-textarea.entry.js +6 -6
- package/dist/esm/co-time-field.entry.js +323 -0
- package/dist/esm/co-toast.entry.js +2 -2
- package/dist/esm/co-toggle-button-group.entry.js +4 -4
- package/dist/esm/co-toggle-button.entry.js +4 -4
- package/dist/esm/co-transfer-list.entry.js +1 -1
- package/dist/esm/co-video.entry.js +32 -7
- package/dist/esm/cobalt.js +3 -3
- package/dist/esm/color-BRbgGqLw.js +136 -0
- package/dist/esm/{dateI18n-CnNpoKwg.js → dateI18n-jYd9gu_c.js} +36 -0
- package/dist/esm/{fieldChip-DsAfq1e0.js → fieldChip-uyggU8VV.js} +1 -1
- package/dist/esm/fileI18n-gKnOhsd2.js +84 -0
- package/dist/esm/{index-RuXxdKzC.js → index-68iUQp5j.js} +28 -10
- package/dist/esm/{index-CrtiywTB.js → index-DH5lfRNj.js} +25 -21
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{positioning-BMdapAL8.js → positioning-DFHRS9cJ.js} +32 -13
- package/dist/esm/{requiredMark-DCD-ZA51.js → requiredMark-BCJUuZvC.js} +1 -1
- package/dist/esm/{toolbar-config-WeuPA9Rw.js → toolbar-config-DOL2zACE.js} +10 -0
- package/dist/types/components/co-badge/co-badge.d.ts +7 -0
- package/dist/types/components/co-checkbox/co-checkbox.d.ts +1 -1
- package/dist/types/components/co-color-picker/co-color-picker.d.ts +358 -4
- package/dist/types/components/co-color-picker/presets.d.ts +107 -4
- package/dist/types/components/co-date-time-picker/co-date-time-picker.d.ts +43 -21
- package/dist/types/components/co-drawer/co-drawer.d.ts +4 -3
- package/dist/types/components/co-file-field/co-file-field.d.ts +14 -0
- package/dist/types/components/co-file-field/co-file-field.utils.d.ts +18 -1
- package/dist/types/components/co-icon-button/co-icon-button.d.ts +9 -0
- package/dist/types/components/co-input/co-input.d.ts +4 -0
- package/dist/types/components/co-lightbox/co-lightbox.d.ts +60 -4
- package/dist/types/components/co-menu-item/co-menu-item.d.ts +16 -0
- package/dist/types/components/co-number-field/co-number-field.d.ts +42 -1
- package/dist/types/components/co-option-list/co-option-list.d.ts +3 -0
- package/dist/types/components/co-overlay/co-overlay.d.ts +4 -2
- package/dist/types/components/co-popover/co-popover.d.ts +16 -0
- package/dist/types/components/co-rich-text-toolbar/co-rich-text-toolbar.d.ts +1 -1
- package/dist/types/components/co-skeleton/co-skeleton.d.ts +13 -0
- package/dist/types/components/co-time-field/co-time-field.d.ts +60 -0
- package/dist/types/components/co-tooltip/co-tooltip.d.ts +5 -0
- package/dist/types/components/co-video/co-video.d.ts +4 -0
- package/dist/types/components.d.ts +451 -87
- package/dist/types/utils/amountText.d.ts +34 -0
- package/dist/types/utils/color.d.ts +44 -1
- package/dist/types/utils/colorPickerI18n.d.ts +26 -0
- package/dist/types/utils/dateI18n.d.ts +12 -0
- package/dist/types/utils/fileI18n.d.ts +1 -0
- package/dist/types/utils/positioning.d.ts +10 -0
- package/dist/types/utils/submenu.d.ts +44 -0
- package/package.json +3 -3
- package/dist/cjs/color-YhUkm10t.js +0 -32
- package/dist/cjs/time-LBHtzLHe.js +0 -42
- package/dist/cobalt/p-07904986.entry.js +0 -1
- package/dist/cobalt/p-09799193.entry.js +0 -1
- package/dist/cobalt/p-17ae943c.entry.js +0 -1
- package/dist/cobalt/p-23a103a0.entry.js +0 -1
- package/dist/cobalt/p-2f88d151.entry.js +0 -1
- package/dist/cobalt/p-3495fda1.entry.js +0 -1
- package/dist/cobalt/p-409f28bb.entry.js +0 -1
- package/dist/cobalt/p-682b3313.entry.js +0 -1
- package/dist/cobalt/p-6bf814f9.entry.js +0 -1
- package/dist/cobalt/p-7c88163e.entry.js +0 -1
- package/dist/cobalt/p-7cf4b4ae.entry.js +0 -1
- package/dist/cobalt/p-7ea87b75.entry.js +0 -1
- package/dist/cobalt/p-8183f56f.entry.js +0 -1
- package/dist/cobalt/p-8345b25f.entry.js +0 -1
- package/dist/cobalt/p-8b4b3589.entry.js +0 -1
- package/dist/cobalt/p-983af614.entry.js +0 -1
- package/dist/cobalt/p-BG4WRR22.js +0 -1
- package/dist/cobalt/p-BMdapAL8.js +0 -1
- package/dist/cobalt/p-CF8OB_TM.js +0 -1
- package/dist/cobalt/p-CnNpoKwg.js +0 -1
- package/dist/cobalt/p-T4la7ly_.js +0 -1
- package/dist/cobalt/p-a2d31248.entry.js +0 -1
- package/dist/cobalt/p-a6b5cadd.entry.js +0 -1
- package/dist/cobalt/p-b8581787.entry.js +0 -1
- package/dist/cobalt/p-bcedbd73.entry.js +0 -1
- package/dist/cobalt/p-d40a465f.entry.js +0 -1
- package/dist/cobalt/p-dea43204.entry.js +0 -1
- package/dist/cobalt/p-dfcf667d.entry.js +0 -1
- package/dist/cobalt/p-e6882ddd.entry.js +0 -1
- package/dist/cobalt/p-e84eda2e.entry.js +0 -1
- package/dist/cobalt/p-f25967fb.entry.js +0 -1
- package/dist/cobalt/p-f5f1b463.entry.js +0 -1
- package/dist/cobalt/p-fd39f410.entry.js +0 -1
- package/dist/cobalt/p-mAGnZXRn.js +0 -1
- package/dist/components/p-BMdapAL8.js +0 -1
- package/dist/components/p-BTQEg3UO.js +0 -1
- package/dist/components/p-BZIB4JDs.js +0 -1
- package/dist/components/p-Bbny3WUc.js +0 -1
- package/dist/components/p-C1Kv3zYZ.js +0 -1
- package/dist/components/p-CF8OB_TM.js +0 -1
- package/dist/components/p-CR0izsJC.js +0 -1
- package/dist/components/p-CnNpoKwg.js +0 -1
- package/dist/components/p-DP0bbhfN.js +0 -1
- package/dist/components/p-DbipMAyT.js +0 -1
- package/dist/components/p-DgUBcJIS.js +0 -1
- package/dist/components/p-DolCkNsL.js +0 -1
- package/dist/components/p-gI62K3Be.js +0 -1
- package/dist/components/p-hfGFsvaD.js +0 -1
- package/dist/esm/color-BG4WRR22.js +0 -30
- package/dist/esm/time-CF8OB_TM.js +0 -37
|
@@ -0,0 +1,536 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { getDateStrings } from "../../utils/dateI18n";
|
|
3
|
+
const PERIOD_LABEL_CACHE = new Map();
|
|
4
|
+
/**
|
|
5
|
+
* Marcadores AM/PM localizados vía Intl (cacheados por locale a nivel de
|
|
6
|
+
* módulo — molde: `LABEL_FMT_CACHE` de co-date-time-picker.tsx). Nunca
|
|
7
|
+
* hardcodear "a. m./p. m.": en-US debe leer "AM"/"PM", no la forma es-CO.
|
|
8
|
+
*/
|
|
9
|
+
function dayPeriodLabels(locale) {
|
|
10
|
+
var _a, _b, _c, _d;
|
|
11
|
+
const hit = PERIOD_LABEL_CACHE.get(locale);
|
|
12
|
+
if (hit)
|
|
13
|
+
return hit;
|
|
14
|
+
const fmt = new Intl.DateTimeFormat(locale, { hour: 'numeric', hour12: true });
|
|
15
|
+
const am = (_b = (_a = fmt.formatToParts(new Date(2000, 0, 1, 9, 0)).find((p) => p.type === 'dayPeriod')) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : 'AM';
|
|
16
|
+
const pm = (_d = (_c = fmt.formatToParts(new Date(2000, 0, 1, 21, 0)).find((p) => p.type === 'dayPeriod')) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : 'PM';
|
|
17
|
+
const out = { am, pm };
|
|
18
|
+
PERIOD_LABEL_CACHE.set(locale, out);
|
|
19
|
+
return out;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Campo de hora segmentado (patrón React Aria TimeField): una parte enfocable
|
|
23
|
+
* por unidad — hora, minuto y a. m./p. m. (solo `hour12`). El VALOR es
|
|
24
|
+
* minutos-del-día (0–1439), tz-free a propósito: la zona es problema del host.
|
|
25
|
+
*
|
|
26
|
+
* Editar NO committea: cada edición válida emite `coInput` (draft). Enter emite
|
|
27
|
+
* `coCommit`; Escape emite `coEscape`. El host decide qué hacer con cada uno
|
|
28
|
+
* (co-date-time-picker: coInput→draft, coCommit→commit+close).
|
|
29
|
+
* `coEscape` = anuncio de intención; el picker NO lo wirea — ver
|
|
30
|
+
* co-date-time-picker.tsx (Escape lo posee su root handler).
|
|
31
|
+
*/
|
|
32
|
+
export class CoTimeField {
|
|
33
|
+
constructor() {
|
|
34
|
+
/** Minutos del día (0–1439) o null (vacío). */
|
|
35
|
+
this.value = null;
|
|
36
|
+
/** Reloj de 12 h. `false` = 00–23 sin segmento de período. */
|
|
37
|
+
this.hour12 = true;
|
|
38
|
+
this.locale = 'es-CO';
|
|
39
|
+
this.disabled = false;
|
|
40
|
+
/** Paso de PageUp/PageDown sobre el minuto. */
|
|
41
|
+
this.pageStep = 15;
|
|
42
|
+
this.hour24 = null; // 0–23
|
|
43
|
+
this.minute = null; // 0–59
|
|
44
|
+
this.focused = null;
|
|
45
|
+
/** Buffer de dígitos del segmento en edición (se resetea al cambiar de foco). */
|
|
46
|
+
this.buffer = '';
|
|
47
|
+
this.onSegKeyDown = (seg) => (e) => {
|
|
48
|
+
var _a;
|
|
49
|
+
if (this.disabled)
|
|
50
|
+
return;
|
|
51
|
+
const k = e.key;
|
|
52
|
+
if (k === 'Enter') {
|
|
53
|
+
e.preventDefault();
|
|
54
|
+
const m = this.minutesOfDay();
|
|
55
|
+
if (m != null)
|
|
56
|
+
this.coCommit.emit(m);
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (k === 'Escape') {
|
|
60
|
+
// stopPropagation NO: el host (picker) también escucha Escape en su root;
|
|
61
|
+
// acá solo se anuncia la intención y el host decide.
|
|
62
|
+
e.preventDefault();
|
|
63
|
+
this.coEscape.emit();
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
if (k === 'ArrowUp' || k === 'ArrowDown') {
|
|
67
|
+
e.preventDefault();
|
|
68
|
+
this.buffer = '';
|
|
69
|
+
this.stepSegment(seg, k === 'ArrowUp' ? 1 : -1);
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
if (k === 'PageUp' || k === 'PageDown') {
|
|
73
|
+
e.preventDefault();
|
|
74
|
+
this.buffer = '';
|
|
75
|
+
const step = Math.max(1, Math.round(this.pageStep)) * (k === 'PageUp' ? 1 : -1);
|
|
76
|
+
const cur = (_a = this.minutesOfDay()) !== null && _a !== void 0 ? _a : 9 * 60;
|
|
77
|
+
const next = (cur + step + 1440) % 1440;
|
|
78
|
+
this.hour24 = Math.floor(next / 60);
|
|
79
|
+
this.minute = next % 60;
|
|
80
|
+
this.emitDraft();
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
if (k === 'ArrowLeft' || k === 'ArrowRight') {
|
|
84
|
+
e.preventDefault();
|
|
85
|
+
this.buffer = '';
|
|
86
|
+
const order = this.hour12 ? ['hour', 'minute', 'period'] : ['hour', 'minute'];
|
|
87
|
+
const i = order.indexOf(seg) + (k === 'ArrowRight' ? 1 : -1);
|
|
88
|
+
const target = order[Math.max(0, Math.min(order.length - 1, i))];
|
|
89
|
+
if (target !== seg)
|
|
90
|
+
this.focusSegment(target);
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
if (k === 'Backspace' || k === 'Delete') {
|
|
94
|
+
e.preventDefault();
|
|
95
|
+
this.buffer = '';
|
|
96
|
+
if (seg === 'hour') {
|
|
97
|
+
this.hour24 = null;
|
|
98
|
+
this.coInput.emit(null);
|
|
99
|
+
}
|
|
100
|
+
else if (seg === 'minute') {
|
|
101
|
+
this.minute = null;
|
|
102
|
+
this.coInput.emit(null);
|
|
103
|
+
}
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
if (seg === 'period' && this.hour12 && /^[ap]$/i.test(k)) {
|
|
107
|
+
e.preventDefault();
|
|
108
|
+
const wantPm = k.toLowerCase() === 'p';
|
|
109
|
+
if (this.hour24 == null)
|
|
110
|
+
this.hour24 = wantPm ? 21 : 9;
|
|
111
|
+
else if (wantPm !== this.isPm)
|
|
112
|
+
this.hour24 = (this.hour24 + 12) % 24;
|
|
113
|
+
if (this.minute == null)
|
|
114
|
+
this.minute = 0;
|
|
115
|
+
this.emitDraft();
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
if (/^\d$/.test(k) && seg !== 'period') {
|
|
119
|
+
e.preventDefault();
|
|
120
|
+
this.typeDigit(seg, Number(k));
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
this.onStepperClick = (delta) => (e) => {
|
|
124
|
+
var _a;
|
|
125
|
+
// No robar el foco del segmento en edición.
|
|
126
|
+
e.preventDefault();
|
|
127
|
+
if (this.disabled)
|
|
128
|
+
return;
|
|
129
|
+
this.buffer = '';
|
|
130
|
+
this.stepSegment((_a = this.focused) !== null && _a !== void 0 ? _a : 'hour', delta);
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
componentWillLoad() {
|
|
134
|
+
this.syncFromValue(this.value);
|
|
135
|
+
}
|
|
136
|
+
syncFromValue(v) {
|
|
137
|
+
if (v == null || !Number.isFinite(v)) {
|
|
138
|
+
// El host limpió el value: sí vacía el estado, así que también invalida
|
|
139
|
+
// cualquier dígito a medio teclear.
|
|
140
|
+
this.buffer = '';
|
|
141
|
+
this.hour24 = null;
|
|
142
|
+
this.minute = null;
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
const m = Math.max(0, Math.min(1439, Math.round(v)));
|
|
146
|
+
// No pisar el estado si ya representa este valor (evita loops host↔campo:
|
|
147
|
+
// el host suele hacer eco de cada `coInput` de vuelta en `value`, y ese
|
|
148
|
+
// eco NO debe borrar un dígito a medio teclear — este guard protege el
|
|
149
|
+
// buffer tanto como el estado).
|
|
150
|
+
if (this.minutesOfDay() === m)
|
|
151
|
+
return;
|
|
152
|
+
// El value externo sí difiere del estado actual: invalida el buffer.
|
|
153
|
+
this.buffer = '';
|
|
154
|
+
this.hour24 = Math.floor(m / 60);
|
|
155
|
+
this.minute = m % 60;
|
|
156
|
+
}
|
|
157
|
+
async focusInput() {
|
|
158
|
+
var _a;
|
|
159
|
+
(_a = this.hourEl) === null || _a === void 0 ? void 0 : _a.focus();
|
|
160
|
+
}
|
|
161
|
+
// ── Derivados ──────────────────────────────────────────────
|
|
162
|
+
minutesOfDay() {
|
|
163
|
+
if (this.hour24 == null || this.minute == null)
|
|
164
|
+
return null;
|
|
165
|
+
return this.hour24 * 60 + this.minute;
|
|
166
|
+
}
|
|
167
|
+
get isPm() {
|
|
168
|
+
var _a;
|
|
169
|
+
return ((_a = this.hour24) !== null && _a !== void 0 ? _a : 0) >= 12;
|
|
170
|
+
}
|
|
171
|
+
/** Hora mostrada: 1–12 en 12 h, 0–23 en 24 h. */
|
|
172
|
+
displayHour() {
|
|
173
|
+
if (this.hour24 == null)
|
|
174
|
+
return null;
|
|
175
|
+
if (!this.hour12)
|
|
176
|
+
return this.hour24;
|
|
177
|
+
return this.hour24 % 12 || 12;
|
|
178
|
+
}
|
|
179
|
+
emitDraft() {
|
|
180
|
+
const m = this.minutesOfDay();
|
|
181
|
+
if (m != null)
|
|
182
|
+
this.coInput.emit(m);
|
|
183
|
+
}
|
|
184
|
+
// ── Edición ────────────────────────────────────────────────
|
|
185
|
+
setDisplayHour(h12) {
|
|
186
|
+
if (!this.hour12) {
|
|
187
|
+
this.hour24 = Math.max(0, Math.min(23, h12));
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
const base = h12 % 12; // 12 → 0
|
|
191
|
+
this.hour24 = this.isPm ? base + 12 : base;
|
|
192
|
+
}
|
|
193
|
+
if (this.minute == null)
|
|
194
|
+
this.minute = 0;
|
|
195
|
+
this.emitDraft();
|
|
196
|
+
}
|
|
197
|
+
stepSegment(seg, delta) {
|
|
198
|
+
var _a, _b, _c;
|
|
199
|
+
if (seg === 'hour') {
|
|
200
|
+
const cur = (_a = this.hour24) !== null && _a !== void 0 ? _a : 9; // vacío: arranca en el default del picker (09)
|
|
201
|
+
this.hour24 = (cur + delta + 24) % 24;
|
|
202
|
+
if (this.minute == null)
|
|
203
|
+
this.minute = 0;
|
|
204
|
+
}
|
|
205
|
+
else if (seg === 'minute') {
|
|
206
|
+
const cur = (_b = this.minute) !== null && _b !== void 0 ? _b : 0;
|
|
207
|
+
this.minute = (cur + delta + 60) % 60;
|
|
208
|
+
if (this.hour24 == null)
|
|
209
|
+
this.hour24 = 9;
|
|
210
|
+
}
|
|
211
|
+
else {
|
|
212
|
+
this.hour24 = (((_c = this.hour24) !== null && _c !== void 0 ? _c : 9) + 12) % 24;
|
|
213
|
+
if (this.minute == null)
|
|
214
|
+
this.minute = 0;
|
|
215
|
+
}
|
|
216
|
+
this.emitDraft();
|
|
217
|
+
}
|
|
218
|
+
typeDigit(seg, d) {
|
|
219
|
+
this.buffer += String(d);
|
|
220
|
+
const n = Number(this.buffer);
|
|
221
|
+
if (seg === 'hour') {
|
|
222
|
+
const max = this.hour12 ? 12 : 23;
|
|
223
|
+
if (n > max) {
|
|
224
|
+
// El buffer se pasó: el dígito arranca una hora nueva.
|
|
225
|
+
this.buffer = String(d);
|
|
226
|
+
}
|
|
227
|
+
const v = Number(this.buffer);
|
|
228
|
+
if (this.hour12) {
|
|
229
|
+
if (v >= 1)
|
|
230
|
+
this.setDisplayHour(v);
|
|
231
|
+
}
|
|
232
|
+
else if (this.buffer.length === 2 || v > 2) {
|
|
233
|
+
this.hour24 = Math.min(23, v);
|
|
234
|
+
if (this.minute == null)
|
|
235
|
+
this.minute = 0;
|
|
236
|
+
this.emitDraft();
|
|
237
|
+
}
|
|
238
|
+
else if (v > 0) {
|
|
239
|
+
this.hour24 = v;
|
|
240
|
+
if (this.minute == null)
|
|
241
|
+
this.minute = 0;
|
|
242
|
+
this.emitDraft();
|
|
243
|
+
}
|
|
244
|
+
// Avance automático: 2 dígitos, o el próximo dígito ya no puede extender.
|
|
245
|
+
const done = this.buffer.length === 2 || (this.hour12 ? v * 10 > 12 : v * 10 > 23);
|
|
246
|
+
if (done)
|
|
247
|
+
this.advanceFrom('hour');
|
|
248
|
+
}
|
|
249
|
+
else if (seg === 'minute') {
|
|
250
|
+
if (n > 59)
|
|
251
|
+
this.buffer = String(d);
|
|
252
|
+
const v = Number(this.buffer);
|
|
253
|
+
this.minute = v;
|
|
254
|
+
if (this.hour24 == null)
|
|
255
|
+
this.hour24 = 9;
|
|
256
|
+
this.emitDraft();
|
|
257
|
+
if (this.buffer.length === 2 || v > 5)
|
|
258
|
+
this.advanceFrom('minute');
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
advanceFrom(seg) {
|
|
262
|
+
this.buffer = '';
|
|
263
|
+
const order = this.hour12 ? ['hour', 'minute', 'period'] : ['hour', 'minute'];
|
|
264
|
+
const i = order.indexOf(seg);
|
|
265
|
+
const next = order[i + 1];
|
|
266
|
+
if (next)
|
|
267
|
+
this.focusSegment(next);
|
|
268
|
+
}
|
|
269
|
+
focusSegment(seg) {
|
|
270
|
+
var _a;
|
|
271
|
+
(_a = this.el.shadowRoot.querySelector(`.co-time-field__seg--${seg}`)) === null || _a === void 0 ? void 0 : _a.focus();
|
|
272
|
+
}
|
|
273
|
+
// ── Render ─────────────────────────────────────────────────
|
|
274
|
+
renderSeg(seg, t) {
|
|
275
|
+
const label = seg === 'hour' ? t.hourLabel : seg === 'minute' ? t.minuteLabel : t.dayPeriodLabel;
|
|
276
|
+
let text;
|
|
277
|
+
let now = null;
|
|
278
|
+
let min = 0;
|
|
279
|
+
let max = 59;
|
|
280
|
+
if (seg === 'hour') {
|
|
281
|
+
const dh = this.displayHour();
|
|
282
|
+
text = dh == null ? '––' : String(dh).padStart(2, '0');
|
|
283
|
+
now = dh;
|
|
284
|
+
min = this.hour12 ? 1 : 0;
|
|
285
|
+
max = this.hour12 ? 12 : 23;
|
|
286
|
+
}
|
|
287
|
+
else if (seg === 'minute') {
|
|
288
|
+
text = this.minute == null ? '––' : String(this.minute).padStart(2, '0');
|
|
289
|
+
now = this.minute;
|
|
290
|
+
}
|
|
291
|
+
else {
|
|
292
|
+
const empty = this.hour24 == null;
|
|
293
|
+
const { am, pm } = dayPeriodLabels(this.locale);
|
|
294
|
+
text = this.isPm ? pm : am;
|
|
295
|
+
now = empty ? null : this.isPm ? 1 : 0;
|
|
296
|
+
min = 0;
|
|
297
|
+
max = 1;
|
|
298
|
+
}
|
|
299
|
+
const isEmpty = (seg === 'hour' && this.hour24 == null) ||
|
|
300
|
+
(seg === 'minute' && this.minute == null) ||
|
|
301
|
+
(seg === 'period' && this.hour24 == null);
|
|
302
|
+
return (h("span", { ref: seg === 'hour' ? (el) => (this.hourEl = el) : undefined, class: {
|
|
303
|
+
'co-time-field__seg': true,
|
|
304
|
+
[`co-time-field__seg--${seg}`]: true,
|
|
305
|
+
'co-time-field__seg--empty': isEmpty,
|
|
306
|
+
}, role: "spinbutton", tabIndex: this.disabled ? -1 : 0, "aria-label": label, "aria-valuemin": String(min), "aria-valuemax": String(max), "aria-valuenow": now == null ? undefined : String(now), "aria-valuetext": isEmpty ? undefined : text, "aria-disabled": this.disabled ? 'true' : undefined, onKeyDown: this.onSegKeyDown(seg), onFocus: () => {
|
|
307
|
+
this.focused = seg;
|
|
308
|
+
this.buffer = '';
|
|
309
|
+
}, onBlur: () => {
|
|
310
|
+
if (this.focused === seg)
|
|
311
|
+
this.focused = null;
|
|
312
|
+
} }, text));
|
|
313
|
+
}
|
|
314
|
+
render() {
|
|
315
|
+
const t = getDateStrings(this.locale);
|
|
316
|
+
return (h("div", { key: '81a230dc1e49e62e2aecd3b4ac73b8909475f3cb', class: { 'co-time-field': true, 'co-time-field--disabled': this.disabled }, role: "group", "aria-label": this.fieldLabel || t.timeFieldLabel }, h("span", { key: 'e9eb2d8f0db674ffaad0352288a251df27c0fcba', class: "co-time-field__segs" }, this.renderSeg('hour', t), h("span", { key: 'cc23898617970361ed16d14acc2626c6d3d59a0a', class: "co-time-field__sep", "aria-hidden": "true" }, ":"), this.renderSeg('minute', t), this.hour12 && this.renderSeg('period', t)), h("span", { key: '3ed62834befde05e6b5d13d4acdb6594aee7b8b2', class: "co-time-field__steppers" }, h("button", { key: 'bac654a419940ada7f321c9560f2445180024283', type: "button", tabIndex: -1, "aria-hidden": "true", onMouseDown: (e) => e.preventDefault(), onClick: this.onStepperClick(1) }, h("co-icon", { key: '62c6d9fe38fa737cec659774b90bf498ffe05088', name: "caret-up", size: 10 })), h("button", { key: '90de8aef9d1eef09f9c3cc0e2680bbea4fda883e', type: "button", tabIndex: -1, "aria-hidden": "true", onMouseDown: (e) => e.preventDefault(), onClick: this.onStepperClick(-1) }, h("co-icon", { key: 'b4a1cb6877b4e415d2d94c14b2ccc1bbafb70adb', name: "caret-down", size: 10 })))));
|
|
317
|
+
}
|
|
318
|
+
static get is() { return "co-time-field"; }
|
|
319
|
+
static get encapsulation() { return "shadow"; }
|
|
320
|
+
static get originalStyleUrls() {
|
|
321
|
+
return {
|
|
322
|
+
"$": ["co-time-field.css"]
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
static get styleUrls() {
|
|
326
|
+
return {
|
|
327
|
+
"$": ["co-time-field.css"]
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
static get properties() {
|
|
331
|
+
return {
|
|
332
|
+
"value": {
|
|
333
|
+
"type": "number",
|
|
334
|
+
"mutable": false,
|
|
335
|
+
"complexType": {
|
|
336
|
+
"original": "number | null",
|
|
337
|
+
"resolved": "null | number",
|
|
338
|
+
"references": {}
|
|
339
|
+
},
|
|
340
|
+
"required": false,
|
|
341
|
+
"optional": false,
|
|
342
|
+
"docs": {
|
|
343
|
+
"tags": [],
|
|
344
|
+
"text": "Minutos del d\u00EDa (0\u20131439) o null (vac\u00EDo)."
|
|
345
|
+
},
|
|
346
|
+
"getter": false,
|
|
347
|
+
"setter": false,
|
|
348
|
+
"reflect": false,
|
|
349
|
+
"attribute": "value",
|
|
350
|
+
"defaultValue": "null"
|
|
351
|
+
},
|
|
352
|
+
"hour12": {
|
|
353
|
+
"type": "boolean",
|
|
354
|
+
"mutable": false,
|
|
355
|
+
"complexType": {
|
|
356
|
+
"original": "boolean",
|
|
357
|
+
"resolved": "boolean",
|
|
358
|
+
"references": {}
|
|
359
|
+
},
|
|
360
|
+
"required": false,
|
|
361
|
+
"optional": false,
|
|
362
|
+
"docs": {
|
|
363
|
+
"tags": [],
|
|
364
|
+
"text": "Reloj de 12 h. `false` = 00\u201323 sin segmento de per\u00EDodo."
|
|
365
|
+
},
|
|
366
|
+
"getter": false,
|
|
367
|
+
"setter": false,
|
|
368
|
+
"reflect": false,
|
|
369
|
+
"attribute": "hour-1-2",
|
|
370
|
+
"defaultValue": "true"
|
|
371
|
+
},
|
|
372
|
+
"locale": {
|
|
373
|
+
"type": "string",
|
|
374
|
+
"mutable": false,
|
|
375
|
+
"complexType": {
|
|
376
|
+
"original": "string",
|
|
377
|
+
"resolved": "string",
|
|
378
|
+
"references": {}
|
|
379
|
+
},
|
|
380
|
+
"required": false,
|
|
381
|
+
"optional": false,
|
|
382
|
+
"docs": {
|
|
383
|
+
"tags": [],
|
|
384
|
+
"text": ""
|
|
385
|
+
},
|
|
386
|
+
"getter": false,
|
|
387
|
+
"setter": false,
|
|
388
|
+
"reflect": false,
|
|
389
|
+
"attribute": "locale",
|
|
390
|
+
"defaultValue": "'es-CO'"
|
|
391
|
+
},
|
|
392
|
+
"disabled": {
|
|
393
|
+
"type": "boolean",
|
|
394
|
+
"mutable": false,
|
|
395
|
+
"complexType": {
|
|
396
|
+
"original": "boolean",
|
|
397
|
+
"resolved": "boolean",
|
|
398
|
+
"references": {}
|
|
399
|
+
},
|
|
400
|
+
"required": false,
|
|
401
|
+
"optional": false,
|
|
402
|
+
"docs": {
|
|
403
|
+
"tags": [],
|
|
404
|
+
"text": ""
|
|
405
|
+
},
|
|
406
|
+
"getter": false,
|
|
407
|
+
"setter": false,
|
|
408
|
+
"reflect": false,
|
|
409
|
+
"attribute": "disabled",
|
|
410
|
+
"defaultValue": "false"
|
|
411
|
+
},
|
|
412
|
+
"pageStep": {
|
|
413
|
+
"type": "number",
|
|
414
|
+
"mutable": false,
|
|
415
|
+
"complexType": {
|
|
416
|
+
"original": "number",
|
|
417
|
+
"resolved": "number",
|
|
418
|
+
"references": {}
|
|
419
|
+
},
|
|
420
|
+
"required": false,
|
|
421
|
+
"optional": false,
|
|
422
|
+
"docs": {
|
|
423
|
+
"tags": [],
|
|
424
|
+
"text": "Paso de PageUp/PageDown sobre el minuto."
|
|
425
|
+
},
|
|
426
|
+
"getter": false,
|
|
427
|
+
"setter": false,
|
|
428
|
+
"reflect": false,
|
|
429
|
+
"attribute": "page-step",
|
|
430
|
+
"defaultValue": "15"
|
|
431
|
+
},
|
|
432
|
+
"fieldLabel": {
|
|
433
|
+
"type": "string",
|
|
434
|
+
"mutable": false,
|
|
435
|
+
"complexType": {
|
|
436
|
+
"original": "string",
|
|
437
|
+
"resolved": "string | undefined",
|
|
438
|
+
"references": {}
|
|
439
|
+
},
|
|
440
|
+
"required": false,
|
|
441
|
+
"optional": true,
|
|
442
|
+
"docs": {
|
|
443
|
+
"tags": [],
|
|
444
|
+
"text": "aria-label del grupo cuando el host no pinta label visible."
|
|
445
|
+
},
|
|
446
|
+
"getter": false,
|
|
447
|
+
"setter": false,
|
|
448
|
+
"reflect": false,
|
|
449
|
+
"attribute": "field-label"
|
|
450
|
+
}
|
|
451
|
+
};
|
|
452
|
+
}
|
|
453
|
+
static get states() {
|
|
454
|
+
return {
|
|
455
|
+
"hour24": {},
|
|
456
|
+
"minute": {},
|
|
457
|
+
"focused": {}
|
|
458
|
+
};
|
|
459
|
+
}
|
|
460
|
+
static get events() {
|
|
461
|
+
return [{
|
|
462
|
+
"method": "coInput",
|
|
463
|
+
"name": "coInput",
|
|
464
|
+
"bubbles": true,
|
|
465
|
+
"cancelable": true,
|
|
466
|
+
"composed": true,
|
|
467
|
+
"docs": {
|
|
468
|
+
"tags": [],
|
|
469
|
+
"text": "Draft: cada edici\u00F3n v\u00E1lida (d\u00EDgitos, flechas, stepper, a/p).\n`null` = draft incompleto (el segmento qued\u00F3 vaciado por Backspace/Delete);\nel host conserva su \u00FAltimo draft v\u00E1lido en ese caso."
|
|
470
|
+
},
|
|
471
|
+
"complexType": {
|
|
472
|
+
"original": "number | null",
|
|
473
|
+
"resolved": "null | number",
|
|
474
|
+
"references": {}
|
|
475
|
+
}
|
|
476
|
+
}, {
|
|
477
|
+
"method": "coCommit",
|
|
478
|
+
"name": "coCommit",
|
|
479
|
+
"bubbles": true,
|
|
480
|
+
"cancelable": true,
|
|
481
|
+
"composed": true,
|
|
482
|
+
"docs": {
|
|
483
|
+
"tags": [],
|
|
484
|
+
"text": "Enter: el host committea y cierra."
|
|
485
|
+
},
|
|
486
|
+
"complexType": {
|
|
487
|
+
"original": "number",
|
|
488
|
+
"resolved": "number",
|
|
489
|
+
"references": {}
|
|
490
|
+
}
|
|
491
|
+
}, {
|
|
492
|
+
"method": "coEscape",
|
|
493
|
+
"name": "coEscape",
|
|
494
|
+
"bubbles": true,
|
|
495
|
+
"cancelable": true,
|
|
496
|
+
"composed": true,
|
|
497
|
+
"docs": {
|
|
498
|
+
"tags": [],
|
|
499
|
+
"text": "Escape: el host cierra sin aplicar."
|
|
500
|
+
},
|
|
501
|
+
"complexType": {
|
|
502
|
+
"original": "void",
|
|
503
|
+
"resolved": "void",
|
|
504
|
+
"references": {}
|
|
505
|
+
}
|
|
506
|
+
}];
|
|
507
|
+
}
|
|
508
|
+
static get methods() {
|
|
509
|
+
return {
|
|
510
|
+
"focusInput": {
|
|
511
|
+
"complexType": {
|
|
512
|
+
"signature": "() => Promise<void>",
|
|
513
|
+
"parameters": [],
|
|
514
|
+
"references": {
|
|
515
|
+
"Promise": {
|
|
516
|
+
"location": "global",
|
|
517
|
+
"id": "global::Promise"
|
|
518
|
+
}
|
|
519
|
+
},
|
|
520
|
+
"return": "Promise<void>"
|
|
521
|
+
},
|
|
522
|
+
"docs": {
|
|
523
|
+
"text": "",
|
|
524
|
+
"tags": []
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
};
|
|
528
|
+
}
|
|
529
|
+
static get elementRef() { return "el"; }
|
|
530
|
+
static get watchers() {
|
|
531
|
+
return [{
|
|
532
|
+
"propName": "value",
|
|
533
|
+
"methodName": "syncFromValue"
|
|
534
|
+
}];
|
|
535
|
+
}
|
|
536
|
+
}
|
|
@@ -235,26 +235,32 @@
|
|
|
235
235
|
|
|
236
236
|
.co-toast {
|
|
237
237
|
opacity: 0;
|
|
238
|
-
transform: translateY(
|
|
238
|
+
transform: translateY(16px) scale(0.97);
|
|
239
|
+
filter: blur(var(--co-motion-blur-sm));
|
|
239
240
|
}
|
|
240
241
|
|
|
241
242
|
.co-toast--in {
|
|
242
243
|
opacity: 1;
|
|
243
244
|
transform: none;
|
|
245
|
+
filter: none;
|
|
244
246
|
transition:
|
|
245
|
-
opacity var(--co-motion-duration-
|
|
246
|
-
transform var(--co-motion-duration-
|
|
247
|
+
opacity var(--co-motion-duration-slow) var(--co-motion-ease-out),
|
|
248
|
+
transform var(--co-motion-duration-slow) var(--co-motion-ease-out),
|
|
249
|
+
filter var(--co-motion-duration-slow) var(--co-motion-ease-out);
|
|
247
250
|
}
|
|
248
251
|
|
|
249
|
-
/* Success entra con pop: el transform rebota (spring)
|
|
250
|
-
*
|
|
251
|
-
*
|
|
252
|
+
/* Success entra con pop: el transform rebota (spring). La duración es la
|
|
253
|
+
* MISMA (slow) que el resto de los toasts — solo cambia la curva del
|
|
254
|
+
* transform a spring; la opacidad se queda en base/ease-out porque un
|
|
255
|
+
* spring sobre opacity sobrepasaría de 1 y el rebote no se vería, solo se
|
|
256
|
+
* recortaría.
|
|
252
257
|
* Ambas clases caen en el MISMO nodo, así que el selector compuesto tiene
|
|
253
258
|
* más especificidad (0,2,0) que `.co-toast--in` (0,1,0) y gana sin depender
|
|
254
259
|
* del orden. */
|
|
255
260
|
.co-toast--in.co-toast--success {
|
|
256
261
|
transition:
|
|
257
|
-
opacity var(--co-motion-duration-
|
|
262
|
+
opacity var(--co-motion-duration-slow) var(--co-motion-ease-out),
|
|
263
|
+
filter var(--co-motion-duration-slow) var(--co-motion-ease-out),
|
|
258
264
|
transform var(--co-motion-duration-slow) var(--co-motion-ease-spring);
|
|
259
265
|
}
|
|
260
266
|
|
|
@@ -180,7 +180,7 @@ export class CoToast {
|
|
|
180
180
|
"references": {
|
|
181
181
|
"CoToastActionsLayout": {
|
|
182
182
|
"location": "local",
|
|
183
|
-
"path": "/Users/agox/
|
|
183
|
+
"path": "/Users/agox/Documents/Prolibu/prolibu-cobalt/packages/core/src/components/co-toast/co-toast.tsx",
|
|
184
184
|
"id": "src/components/co-toast/co-toast.tsx::CoToastActionsLayout"
|
|
185
185
|
}
|
|
186
186
|
}
|
|
@@ -206,7 +206,7 @@ export class CoToast {
|
|
|
206
206
|
"references": {
|
|
207
207
|
"CoToastVariant": {
|
|
208
208
|
"location": "local",
|
|
209
|
-
"path": "/Users/agox/
|
|
209
|
+
"path": "/Users/agox/Documents/Prolibu/prolibu-cobalt/packages/core/src/components/co-toast/co-toast.tsx",
|
|
210
210
|
"id": "src/components/co-toast/co-toast.tsx::CoToastVariant"
|
|
211
211
|
}
|
|
212
212
|
}
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
border-bottom-right-radius: var(--co-tbr-br, var(--co-toggle-button-radius));
|
|
27
27
|
border-bottom-left-radius: var(--co-tbr-bl, var(--co-toggle-button-radius));
|
|
28
28
|
background: color-mix(in srgb, var(--co-semantic-surface-secondary) 35%, transparent);
|
|
29
|
-
-webkit-backdrop-filter: blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate));
|
|
30
|
-
|
|
29
|
+
-webkit-backdrop-filter: var(--co-glass-filter, blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate)));
|
|
30
|
+
backdrop-filter: var(--co-glass-filter, blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate)));
|
|
31
31
|
color: var(--co-semantic-text-default);
|
|
32
32
|
font-family: var(--co-font-family-primary);
|
|
33
33
|
font-weight: 500;
|
|
@@ -85,13 +85,16 @@
|
|
|
85
85
|
/* Track variant — detached rounded pills that sit on the group's sunken track.
|
|
86
86
|
The parent co-toggle-button-group[variant='track'] reflects variant='track'
|
|
87
87
|
onto each child, so all styling below is fully self-contained per pill.
|
|
88
|
-
Connected variant is untouched.
|
|
88
|
+
Connected variant is untouched.
|
|
89
|
+
Contraste: los NO seleccionados van en text-secondary (gray-600), no en muted
|
|
90
|
+
(gray-500 sobre gray-100 quedaba ilegible); todo semántico para que el track
|
|
91
|
+
se tematice en dark (las primitivas gray-* no tienen contraparte). */
|
|
89
92
|
:host([variant='track']) .co-toggle-button {
|
|
90
93
|
height: 30px;
|
|
91
94
|
border-radius: 8px;
|
|
92
95
|
border-color: transparent;
|
|
93
96
|
background: transparent;
|
|
94
|
-
color: var(--co-
|
|
97
|
+
color: var(--co-semantic-text-secondary);
|
|
95
98
|
box-shadow: none;
|
|
96
99
|
padding: 0 12px;
|
|
97
100
|
-webkit-backdrop-filter: none;
|
|
@@ -104,18 +107,20 @@
|
|
|
104
107
|
}
|
|
105
108
|
|
|
106
109
|
:host([variant='track']) .co-toggle-button:hover:not(:disabled) {
|
|
107
|
-
background:
|
|
108
|
-
color: var(--co-
|
|
110
|
+
background: var(--co-semantic-surface-hover);
|
|
111
|
+
color: var(--co-semantic-text-default);
|
|
109
112
|
}
|
|
110
113
|
|
|
114
|
+
/* Pill seleccionada: superficie de página + hairline (la sombra sola no la
|
|
115
|
+
separaba del track). */
|
|
111
116
|
:host([variant='track']) .co-toggle-button--selected {
|
|
112
|
-
background: var(--co-
|
|
113
|
-
color: var(--co-
|
|
114
|
-
border-color:
|
|
117
|
+
background: var(--co-semantic-surface-page);
|
|
118
|
+
color: var(--co-semantic-text-default);
|
|
119
|
+
border-color: var(--co-semantic-border-default);
|
|
115
120
|
box-shadow: var(--co-shadow-sm, 0 1px 2px 0 rgba(26, 26, 26, 0.04));
|
|
116
121
|
}
|
|
117
122
|
|
|
118
123
|
:host([variant='track']) .co-toggle-button--selected:hover:not(:disabled) {
|
|
119
|
-
background: var(--co-
|
|
120
|
-
border-color:
|
|
124
|
+
background: var(--co-semantic-surface-page);
|
|
125
|
+
border-color: var(--co-semantic-border-default);
|
|
121
126
|
}
|
|
@@ -18,13 +18,13 @@ export class CoToggleButton {
|
|
|
18
18
|
render() {
|
|
19
19
|
const iconSize = this.variant === 'track' ? 18 : this.size === 'l' ? 20 : this.size === 'xs' ? 14 : 16;
|
|
20
20
|
const iconWeight = this.selected && this.selectedIconWeight ? this.selectedIconWeight : undefined;
|
|
21
|
-
return (h("button", { key: '
|
|
21
|
+
return (h("button", { key: 'fb4d5d58a3f0f1be3899a5c0ff5c6f3ce3b1385b', class: {
|
|
22
22
|
'co-toggle-button': true,
|
|
23
23
|
'co-toggle-button--selected': this.selected,
|
|
24
24
|
[`co-toggle-button--${this.size}`]: true,
|
|
25
25
|
'co-toggle-button--disabled': this.disabled,
|
|
26
26
|
'co-toggle-button--icon-only': !this.label && (!!this.iconLeft || !!this.iconRight),
|
|
27
|
-
}, type: "button", disabled: this.disabled, "aria-pressed": String(this.selected), onClick: this.handleClick }, h("slot", { key: '
|
|
27
|
+
}, type: "button", disabled: this.disabled, "aria-pressed": String(this.selected), onClick: this.handleClick }, h("slot", { key: '9a3704621b35a69806808d336afb182222bfadd1', name: "leading" }), this.iconLeft && h("co-icon", { key: '937ca1ccf6bd59a40bc2901cf4df51aa83a8db8d', name: this.iconLeft, size: iconSize, weight: iconWeight }), this.label && h("span", { key: 'fdd4c2240f8ded0b0486534f7ad9d1dc2a9a6673', class: "co-toggle-button__label" }, this.label), this.iconRight && h("co-icon", { key: 'af8ee769cb015d33b9bfa6f725360d662234da68', name: this.iconRight, size: iconSize, weight: iconWeight })));
|
|
28
28
|
}
|
|
29
29
|
static get is() { return "co-toggle-button"; }
|
|
30
30
|
static get encapsulation() { return "shadow"; }
|