@prolibu-suite/cobalt-core 0.9.6 → 0.10.1
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 +1125 -89
- package/dist/cjs/co-accordion.cjs.entry.js +5 -5
- package/dist/cjs/co-action-bar.cjs.entry.js +2 -2
- package/dist/cjs/co-app-shell.cjs.entry.js +4 -4
- package/dist/cjs/co-audio-player.cjs.entry.js +83 -13
- 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.cjs.entry.js +72 -0
- 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 +68 -13
- package/dist/cjs/co-color-picker.cjs.entry.js +1078 -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 +83 -5
- 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 +32 -6
- 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 +85 -4
- package/dist/cjs/co-menu.cjs.entry.js +2 -2
- package/dist/cjs/co-modal.cjs.entry.js +10 -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 +104 -13
- 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 +6 -6
- 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-avatar_2.cjs.entry.js → co-tooltip.cjs.entry.js} +48 -84
- 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} +35 -27
- 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-bfc2a849.entry.js → p-000a15b8.entry.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-0e91e5c4.entry.js → p-148d4aa6.entry.js} +1 -1
- package/dist/cobalt/{p-07d570a6.entry.js → p-16954cea.entry.js} +1 -1
- package/dist/cobalt/{p-d40a465f.entry.js → p-16f8cee6.entry.js} +1 -1
- package/dist/cobalt/{p-85a61e28.entry.js → p-17244412.entry.js} +1 -1
- package/dist/cobalt/{p-da546d08.entry.js → p-1dc55e43.entry.js} +1 -1
- package/dist/cobalt/p-239c5c5f.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-dca4cd5f.entry.js → p-28764b8e.entry.js} +1 -1
- package/dist/cobalt/{p-18d34b01.entry.js → p-290066ef.entry.js} +1 -1
- package/dist/cobalt/p-2a30c143.entry.js +1 -0
- package/dist/cobalt/p-2f0f3bb1.entry.js +1 -0
- package/dist/cobalt/{p-89e38c5e.entry.js → p-2f9cbbd5.entry.js} +1 -1
- package/dist/cobalt/p-2fba312b.entry.js +1 -0
- package/dist/cobalt/p-354d5089.entry.js +1 -0
- package/dist/cobalt/{p-60cb66f5.entry.js → p-37f5036b.entry.js} +1 -1
- package/dist/cobalt/{p-ac91259e.entry.js → p-383a998e.entry.js} +1 -1
- package/dist/cobalt/{p-ef5e1167.entry.js → p-3c4f7026.entry.js} +1 -1
- package/dist/cobalt/p-410bee4d.entry.js +1 -0
- package/dist/cobalt/p-416795f5.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-342e1da4.entry.js → p-4d65e713.entry.js} +1 -1
- 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-5a3e4c81.entry.js +1 -0
- package/dist/cobalt/p-5adf117c.entry.js +1 -0
- package/dist/cobalt/{p-23b3ff3f.entry.js → p-5ca394b1.entry.js} +1 -1
- package/dist/cobalt/p-5e4973a6.entry.js +1 -0
- package/dist/cobalt/{p-2d329ac8.entry.js → p-623cc195.entry.js} +1 -1
- package/dist/cobalt/{p-8e667eb6.entry.js → p-66b11b38.entry.js} +1 -1
- package/dist/cobalt/{p-7e53e9c8.entry.js → p-6c82a892.entry.js} +1 -1
- package/dist/cobalt/{p-a6357340.entry.js → p-76249983.entry.js} +1 -1
- package/dist/cobalt/{p-568cfe8d.entry.js → p-789c4b3e.entry.js} +1 -1
- package/dist/cobalt/p-7e8e6907.entry.js +1 -0
- package/dist/cobalt/{p-a9b29cc2.entry.js → p-826ee074.entry.js} +1 -1
- package/dist/cobalt/{p-1c68bc41.entry.js → p-8471abe2.entry.js} +1 -1
- package/dist/cobalt/p-8f2199ff.entry.js +1 -0
- package/dist/cobalt/{p-c8dba82f.entry.js → p-91e73a92.entry.js} +1 -1
- package/dist/cobalt/p-9246e09c.entry.js +1 -0
- package/dist/cobalt/{p-c1e7fb32.entry.js → p-93fe45fd.entry.js} +1 -1
- package/dist/cobalt/{p-8f38e24d.entry.js → p-95cfcb34.entry.js} +1 -1
- package/dist/cobalt/{p-36197363.entry.js → p-996f4e38.entry.js} +1 -1
- package/dist/cobalt/{p-c5684c79.entry.js → p-9cf738ed.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-a2462d7a.entry.js +1 -0
- package/dist/cobalt/p-a325ea0c.entry.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-b0c4fc71.entry.js +1 -0
- package/dist/cobalt/p-b5bba7fe.entry.js +1 -0
- package/dist/cobalt/{p-fb3a095b.entry.js → p-b821d9de.entry.js} +1 -1
- package/dist/cobalt/{p-b0319a2d.entry.js → p-b90d41e4.entry.js} +1 -1
- package/dist/cobalt/{p-ac466658.entry.js → p-be34e447.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-54ae807d.entry.js → p-c465d619.entry.js} +1 -1
- package/dist/cobalt/p-c7d7d7f7.entry.js +1 -0
- package/dist/cobalt/{p-ab45d9bd.entry.js → p-c91d4fc6.entry.js} +1 -1
- package/dist/cobalt/{p-e5495539.entry.js → p-d0b2c418.entry.js} +1 -1
- package/dist/cobalt/{p-ce35c898.entry.js → p-d29bb0fa.entry.js} +1 -1
- package/dist/cobalt/{p-33ea4a90.entry.js → p-d3344187.entry.js} +1 -1
- package/dist/cobalt/p-d375014b.entry.js +1 -0
- package/dist/cobalt/p-d9d9e8ae.entry.js +1 -0
- package/dist/cobalt/{p-7c5e846a.entry.js → p-db805569.entry.js} +1 -1
- package/dist/cobalt/p-e371ec7a.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-3f0eed59.entry.js → p-e49a564c.entry.js} +1 -1
- package/dist/cobalt/p-e8a2f993.entry.js +1 -0
- package/dist/cobalt/p-eadfd661.entry.js +1 -0
- 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-ef301976.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-fMqVDypp.js +1 -0
- package/dist/cobalt/p-fb2d1144.entry.js +1 -0
- package/dist/cobalt/{p-0c463d9a.entry.js → p-fd150cc6.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-accordion/co-accordion.css +2 -2
- package/dist/collection/components/co-accordion/co-accordion.js +4 -4
- package/dist/collection/components/co-action-bar/co-action-bar.css +9 -2
- 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-audio-player/co-audio-player.js +138 -12
- 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 +10 -7
- package/dist/collection/components/co-checkbox/co-checkbox.css +12 -3
- package/dist/collection/components/co-checkbox/co-checkbox.js +25 -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 +962 -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.css +63 -2
- package/dist/collection/components/co-data-table/co-data-table.js +59 -4
- package/dist/collection/components/co-data-table/headerTruncationLogic.js +34 -0
- 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 +42 -7
- 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.css +9 -0
- package/dist/collection/components/co-menu-item/co-menu-item.js +67 -3
- package/dist/collection/components/co-modal/co-modal.css +112 -37
- package/dist/collection/components/co-modal/co-modal.js +35 -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 +56 -4
- package/dist/collection/components/co-option-list/optionListLogic.js +31 -8
- 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.css +40 -0
- package/dist/collection/components/co-ref-field/co-ref-field.js +207 -11
- 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 +24 -5
- package/dist/collection/components/co-separator/co-separator.js +1 -1
- package/dist/collection/components/co-sidebar/co-sidebar.js +2 -2
- package/dist/collection/components/co-sidebar-nav/co-sidebar-nav.css +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 +20 -14
- 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 +14 -4
- package/dist/collection/components/co-toggle-button-group/co-toggle-button-group.js +2 -2
- package/dist/collection/components/co-tooltip/co-tooltip.css +12 -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-7TncUlLN.js +1 -0
- package/dist/components/p-B4NCaKrR.js +1 -0
- package/dist/components/p-B9xitpGU.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-BL0sCfMH.js → p-Bryf3-Js.js} +1 -1
- package/dist/components/{p-D6OUW6oW.js → p-CBTGN490.js} +1 -1
- package/dist/components/{p-P8wvwhM2.js → p-CFFDmGPS.js} +1 -1
- package/dist/components/p-CLsAo0-A.js +1 -0
- package/dist/components/{p-CA_JAK9s.js → p-CT2enQ6h.js} +1 -1
- package/dist/components/p-D2ldYZo1.js +1 -0
- package/dist/components/{p-CuZXTvDM.js → p-D3mVYO-G.js} +1 -1
- package/dist/components/p-DDV_bRcU.js +1 -0
- package/dist/components/p-DFHRS9cJ.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-DSnJWzQw.js +1 -0
- package/dist/components/p-DTi2O4O8.js +1 -0
- package/dist/components/p-De7w9k6_.js +1 -0
- package/dist/components/{p-D5EdMieb.js → p-DoHLTC0n.js} +1 -1
- package/dist/components/{p-Bxk96Zgc.js → p-Du_CgT5E.js} +1 -1
- package/dist/components/p-DxtNejr2.js +1 -0
- 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-wjt4IAGZ.js +1 -0
- package/dist/components/p-zuhal3IZ.js +1 -0
- package/dist/esm/co-accordion.entry.js +5 -5
- package/dist/esm/co-action-bar.entry.js +2 -2
- package/dist/esm/co-app-shell.entry.js +4 -4
- package/dist/esm/co-audio-player.entry.js +83 -13
- package/dist/esm/co-autocomplete.entry.js +2 -2
- package/dist/esm/co-avatar-group.entry.js +1 -1
- package/dist/esm/co-avatar.entry.js +70 -0
- 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 +68 -13
- package/dist/esm/co-color-picker.entry.js +1078 -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 +83 -5
- 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 +32 -6
- 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 +85 -4
- package/dist/esm/co-menu.entry.js +2 -2
- package/dist/esm/co-modal.entry.js +10 -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 +104 -13
- 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 +6 -6
- 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-avatar_2.entry.js → co-tooltip.entry.js} +49 -84
- 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} +35 -27
- 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-accordion/co-accordion.d.ts +6 -0
- package/dist/types/components/co-audio-player/co-audio-player.d.ts +25 -0
- package/dist/types/components/co-badge/co-badge.d.ts +7 -0
- package/dist/types/components/co-checkbox/co-checkbox.d.ts +5 -1
- package/dist/types/components/co-color-picker/co-color-picker.d.ts +360 -4
- package/dist/types/components/co-color-picker/presets.d.ts +107 -4
- package/dist/types/components/co-data-table/co-data-table.d.ts +15 -0
- package/dist/types/components/co-data-table/headerTruncationLogic.d.ts +24 -0
- 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 +9 -1
- 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-modal/co-modal.d.ts +10 -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 +16 -0
- package/dist/types/components/co-option-list/optionListLogic.d.ts +23 -6
- 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-ref-field/co-ref-field.d.ts +38 -0
- package/dist/types/components/co-rich-text-toolbar/co-rich-text-toolbar.d.ts +1 -1
- package/dist/types/components/co-select/co-select.d.ts +6 -0
- 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 +530 -90
- 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-7532c739.entry.js +0 -1
- package/dist/cobalt/p-76420ac1.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-93c68029.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-a8c64cc3.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-da18b5f4.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-dfd25f1d.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-Bbny3WUc.js +0 -1
- package/dist/components/p-Bz0QZqnB.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-DI1ek0EB.js +0 -1
- package/dist/components/p-DP0bbhfN.js +0 -1
- package/dist/components/p-D_9BRkj6.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-hfGFsvaD.js +0 -1
- package/dist/esm/color-BG4WRR22.js +0 -30
- package/dist/esm/time-CF8OB_TM.js +0 -37
|
@@ -211,50 +211,109 @@
|
|
|
211
211
|
flex: 0 0 auto;
|
|
212
212
|
}
|
|
213
213
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
padding-left: var(--co-spacing-sm2);
|
|
214
|
+
/* ---- Columna derecha: atajos + hora exacta + footer ---- */
|
|
215
|
+
.co-date-time-picker__side {
|
|
216
|
+
width: 12.5rem;
|
|
217
|
+
display: flex;
|
|
218
|
+
flex-direction: column;
|
|
219
|
+
gap: var(--co-spacing-sm2);
|
|
220
|
+
padding-left: var(--co-spacing-md);
|
|
222
221
|
border-left: 1px solid var(--co-semantic-border-default);
|
|
223
|
-
outline: none;
|
|
224
222
|
box-sizing: border-box;
|
|
225
223
|
}
|
|
226
224
|
|
|
227
|
-
.co-date-time-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
225
|
+
.co-date-time-picker__sect {
|
|
226
|
+
padding: var(--co-spacing-xxs) var(--co-spacing-sm2) 0;
|
|
227
|
+
font-size: var(--co-font-size-11);
|
|
228
|
+
font-weight: 600;
|
|
229
|
+
letter-spacing: 0.04em;
|
|
230
|
+
text-transform: uppercase;
|
|
231
|
+
color: var(--co-semantic-text-muted);
|
|
231
232
|
}
|
|
232
233
|
|
|
233
|
-
.co-date-time-
|
|
234
|
-
padding: var(--co-spacing-
|
|
235
|
-
border-
|
|
236
|
-
|
|
234
|
+
.co-date-time-picker__sect--time {
|
|
235
|
+
padding-top: var(--co-spacing-sm2);
|
|
236
|
+
border-top: 1px solid var(--co-semantic-border-subtle);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.co-date-time-picker__presets {
|
|
240
|
+
display: flex;
|
|
241
|
+
flex-direction: column;
|
|
242
|
+
gap: var(--co-spacing-xxs);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.co-date-time-picker__preset {
|
|
246
|
+
display: flex;
|
|
247
|
+
align-items: center;
|
|
248
|
+
gap: var(--co-spacing-sm2);
|
|
249
|
+
min-height: 32px;
|
|
250
|
+
padding: var(--co-spacing-xs) var(--co-spacing-sm2);
|
|
251
|
+
border: 0;
|
|
252
|
+
border-radius: var(--co-border-radius-xs);
|
|
253
|
+
background: transparent;
|
|
254
|
+
font-family: inherit;
|
|
237
255
|
font-size: var(--co-font-size-14);
|
|
238
|
-
|
|
256
|
+
letter-spacing: inherit;
|
|
257
|
+
color: var(--co-semantic-text-default);
|
|
258
|
+
text-align: left;
|
|
239
259
|
white-space: nowrap;
|
|
240
260
|
cursor: pointer;
|
|
241
|
-
|
|
261
|
+
transition: background var(--co-motion-duration-fast) var(--co-motion-ease-out);
|
|
242
262
|
}
|
|
243
263
|
|
|
244
|
-
.co-date-time-
|
|
264
|
+
.co-date-time-picker__preset:hover {
|
|
245
265
|
background: var(--co-semantic-surface-hover);
|
|
246
266
|
}
|
|
247
267
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
268
|
+
.co-date-time-picker__preset:focus-visible {
|
|
269
|
+
outline: 2px solid var(--co-semantic-border-focus);
|
|
270
|
+
outline-offset: 1px;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.co-date-time-picker__preset-icon {
|
|
274
|
+
color: var(--co-semantic-text-muted);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.co-date-time-picker__preset-label {
|
|
278
|
+
min-width: 0;
|
|
279
|
+
overflow: hidden;
|
|
280
|
+
text-overflow: ellipsis;
|
|
251
281
|
}
|
|
252
282
|
|
|
253
|
-
|
|
254
|
-
|
|
283
|
+
.co-date-time-picker__preset-hint {
|
|
284
|
+
margin-left: auto;
|
|
285
|
+
font-size: var(--co-font-size-12);
|
|
286
|
+
color: var(--co-semantic-text-muted);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.co-date-time-picker__footer {
|
|
290
|
+
margin-top: auto;
|
|
291
|
+
padding-top: var(--co-spacing-sm2);
|
|
292
|
+
border-top: 1px solid var(--co-semantic-border-subtle);
|
|
293
|
+
display: flex;
|
|
294
|
+
justify-content: flex-end;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.co-date-time-picker__btn {
|
|
298
|
+
border: 0;
|
|
299
|
+
border-radius: var(--co-border-radius-xs);
|
|
300
|
+
height: 28px;
|
|
301
|
+
padding: 0 var(--co-spacing-md);
|
|
302
|
+
font-family: inherit;
|
|
303
|
+
font-size: var(--co-font-size-13);
|
|
304
|
+
font-weight: 500;
|
|
305
|
+
letter-spacing: inherit;
|
|
306
|
+
cursor: pointer;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
.co-date-time-picker__btn--primary {
|
|
255
310
|
background: var(--co-semantic-surface-primary);
|
|
256
311
|
color: var(--co-semantic-on-primary);
|
|
257
|
-
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.co-date-time-picker__btn--primary:focus-visible {
|
|
315
|
+
outline: 2px solid var(--co-semantic-border-focus);
|
|
316
|
+
outline-offset: 2px;
|
|
258
317
|
}
|
|
259
318
|
|
|
260
319
|
/* ---- Mobile bottom sheet: calendar on top, hours below ---- */
|
|
@@ -269,20 +328,57 @@
|
|
|
269
328
|
align-items: center;
|
|
270
329
|
}
|
|
271
330
|
|
|
272
|
-
|
|
331
|
+
/* ---- Bottom sheet: columna → calendario arriba, atajos como chips, campo y
|
|
332
|
+
Listo full-width. Targets ≥44px. ---- */
|
|
333
|
+
.co-date-time-picker__panel--touch .co-date-time-picker__side {
|
|
273
334
|
width: 100%;
|
|
274
335
|
max-width: 20rem;
|
|
275
|
-
max-height: 12rem;
|
|
276
336
|
padding-left: 0;
|
|
277
|
-
padding-top: var(--co-spacing-sm2);
|
|
278
337
|
border-left: none;
|
|
338
|
+
padding-top: var(--co-spacing-sm2);
|
|
279
339
|
border-top: 1px solid var(--co-semantic-border-default);
|
|
280
340
|
}
|
|
281
341
|
|
|
282
|
-
.co-date-time-picker__panel--touch .co-date-time-
|
|
342
|
+
.co-date-time-picker__panel--touch .co-date-time-picker__sect {
|
|
343
|
+
display: none; /* el sheet respira menos: los grupos se leen solos */
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.co-date-time-picker__panel--touch .co-date-time-picker__sect--time {
|
|
347
|
+
display: none;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.co-date-time-picker__panel--touch .co-date-time-picker__presets {
|
|
351
|
+
flex-direction: row;
|
|
352
|
+
gap: var(--co-spacing-sm);
|
|
353
|
+
overflow-x: auto;
|
|
354
|
+
scrollbar-width: none;
|
|
355
|
+
padding-inline-end: var(--co-spacing-2xl);
|
|
356
|
+
scroll-padding-inline-end: var(--co-spacing-2xl);
|
|
357
|
+
-webkit-mask-image: linear-gradient(90deg, #000 calc(100% - var(--co-spacing-2xl)), transparent);
|
|
358
|
+
mask-image: linear-gradient(90deg, #000 calc(100% - var(--co-spacing-2xl)), transparent);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
.co-date-time-picker__panel--touch .co-date-time-picker__preset {
|
|
362
|
+
flex: 0 0 auto;
|
|
283
363
|
min-height: 44px;
|
|
284
|
-
|
|
285
|
-
|
|
364
|
+
padding: 0 var(--co-spacing-md);
|
|
365
|
+
border: 1px solid var(--co-semantic-border-default);
|
|
366
|
+
border-radius: var(--co-border-radius-full);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
.co-date-time-picker__panel--touch .co-date-time-picker__preset-hint {
|
|
370
|
+
display: none; /* el chip queda corto; la hora la muestra el campo al elegir */
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
.co-date-time-picker__panel--touch .co-date-time-picker__footer {
|
|
374
|
+
margin-top: var(--co-spacing-sm2);
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
.co-date-time-picker__panel--touch .co-date-time-picker__btn--primary {
|
|
378
|
+
width: 100%;
|
|
379
|
+
height: 44px;
|
|
380
|
+
font-size: var(--co-font-size-15, 15px);
|
|
381
|
+
border-radius: var(--co-border-radius-sm);
|
|
286
382
|
}
|
|
287
383
|
|
|
288
384
|
/* ── Horizontal layout: label left; control + helper stacked right ──
|
|
@@ -2,13 +2,15 @@ import { h } from "@stencil/core";
|
|
|
2
2
|
import { RequiredMark } from "../../utils/requiredMark";
|
|
3
3
|
import { getDateStrings } from "../../utils/dateI18n";
|
|
4
4
|
import { formatDisplay } from "@prolibu-suite/cobalt-date-utils";
|
|
5
|
-
import {
|
|
5
|
+
import { getLocalTimeZone, toUtcISO, wallClockToEpoch, zonedDateKey, zonedMinutesOfDay, } from "@prolibu-suite/cobalt-calendar-utils";
|
|
6
6
|
/** Wall-clock minute assumed when the incoming value carries no time of day. */
|
|
7
7
|
const DEFAULT_MINUTES = 9 * 60;
|
|
8
8
|
/**
|
|
9
9
|
* Date + TIME picker: one field, one popover. Composes `co-popover` (floating
|
|
10
|
-
* panel, outside-click) + `co-calendar` (day grid) + a
|
|
11
|
-
*
|
|
10
|
+
* panel, outside-click) + `co-calendar` (day grid) + a side panel with
|
|
11
|
+
* shortcuts (`presetIds`: morning/noon/afternoon/endOfDay/now) and a segmented
|
|
12
|
+
* `co-time-field` (hh:mm, PageUp/PageDown stepping by `stepMinutes`) for the
|
|
13
|
+
* exact hour, plus a "Listo" button.
|
|
12
14
|
*
|
|
13
15
|
* VALUE CONTRACT — the committed `value` is a UTC ISO instant
|
|
14
16
|
* ("2026-07-25T21:30:00.000Z"), never a wall-clock string. The wall clock the
|
|
@@ -21,16 +23,26 @@ const DEFAULT_MINUTES = 9 * 60;
|
|
|
21
23
|
* would shift the day west of UTC).
|
|
22
24
|
*
|
|
23
25
|
* INTERACTION (Google):
|
|
24
|
-
* - Click the field → opens. Picking a DAY commits
|
|
25
|
-
*
|
|
26
|
-
*
|
|
26
|
+
* - Click the field → opens. Picking a DAY commits (with the current DRAFT
|
|
27
|
+
* hour, not the previously committed one) and keeps the panel open — you
|
|
28
|
+
* almost always want to set the hour next.
|
|
29
|
+
* - The exact time is a DRAFT (`draftMinutes`) while `co-time-field` is
|
|
30
|
+
* edited (`coInput`) — editing alone never commits. It only commits (and
|
|
31
|
+
* closes) on: clicking a shortcut, Enter/`coCommit` from the time field,
|
|
32
|
+
* or the "Listo" button.
|
|
33
|
+
* - Outside click — and, on mobile, swiping the bottom sheet down — commits
|
|
34
|
+
* the draft if it changed, then closes: the same "apply on blur" model a
|
|
35
|
+
* text field uses.
|
|
36
|
+
* - Escape is the opposite: an explicit DISCARD. It closes WITHOUT applying
|
|
37
|
+
* the draft and returns focus to the trigger field.
|
|
27
38
|
* - ArrowDown on the field → moves focus into the calendar grid.
|
|
28
|
-
* -
|
|
29
|
-
*
|
|
30
|
-
*
|
|
39
|
+
* - Mobile (viewport ≤ `mobileBreakpoint`) renders the same panel as a
|
|
40
|
+
* bottom sheet (`co-drawer position="bottom"`) instead of the desktop
|
|
41
|
+
* popover; the draft/commit/discard model is identical.
|
|
31
42
|
*
|
|
32
|
-
* Escape is owned here (co-popover `closeOnEscape=false`) so focus can return
|
|
33
|
-
* the field; outside-click
|
|
43
|
+
* Escape is owned here (co-popover `closeOnEscape=false`) so focus can return
|
|
44
|
+
* to the field; outside-click/sheet-dismiss stay with co-popover/co-drawer and
|
|
45
|
+
* are handled by `closeApplyingDraft` (see its doc for the Escape asymmetry).
|
|
34
46
|
*
|
|
35
47
|
* @part field - The bordered trigger row
|
|
36
48
|
* @part label - The field label
|
|
@@ -42,8 +54,10 @@ export class CoDateTimePicker {
|
|
|
42
54
|
constructor() {
|
|
43
55
|
/** Committed value: UTC ISO instant ("2026-07-25T21:30:00.000Z") or null. */
|
|
44
56
|
this.value = null;
|
|
45
|
-
/**
|
|
57
|
+
/** Paso de PageUp/PageDown del campo de hora (antes: paso de la lista). */
|
|
46
58
|
this.stepMinutes = 15;
|
|
59
|
+
/** Atajos del panel, en orden. Ids del catálogo: morning|noon|afternoon|endOfDay|now. */
|
|
60
|
+
this.presetIds = ['morning', 'noon', 'afternoon', 'endOfDay', 'now'];
|
|
47
61
|
/** 12-hour clock (Google style). `false` renders a 24h clock. */
|
|
48
62
|
this.hour12 = true;
|
|
49
63
|
this.locale = 'es-CO';
|
|
@@ -69,12 +83,10 @@ export class CoDateTimePicker {
|
|
|
69
83
|
this.mobileBreakpoint = 600;
|
|
70
84
|
/** True when the viewport is at/under `mobileBreakpoint`. */
|
|
71
85
|
this.isMobile = false;
|
|
72
|
-
/** Minutes-of-day
|
|
73
|
-
this.
|
|
86
|
+
/** Minutes-of-day drafted in the exact-time field (co-time-field), not yet committed. */
|
|
87
|
+
this.draftMinutes = DEFAULT_MINUTES;
|
|
74
88
|
this.pendingFocusGrid = false;
|
|
75
89
|
this.pendingFocusTrigger = false;
|
|
76
|
-
/** 'center' when the list is (re)opened, 'nearest' while arrowing through it. */
|
|
77
|
-
this.pendingScroll = null;
|
|
78
90
|
this.mqlHandler = (e) => {
|
|
79
91
|
this.isMobile = e.matches;
|
|
80
92
|
};
|
|
@@ -101,65 +113,44 @@ export class CoDateTimePicker {
|
|
|
101
113
|
this.coClear.emit();
|
|
102
114
|
this.coChange.emit(null);
|
|
103
115
|
};
|
|
104
|
-
// ── Calendar / time
|
|
116
|
+
// ── Calendar / exact time ──────────────────────────────────
|
|
105
117
|
this.onCalendarSelect = (e) => {
|
|
106
|
-
var _a, _b;
|
|
107
118
|
const dayKey = e.detail;
|
|
108
119
|
if (!dayKey)
|
|
109
120
|
return;
|
|
110
|
-
// Google
|
|
111
|
-
//
|
|
112
|
-
|
|
113
|
-
this.commit(dayKey,
|
|
114
|
-
this.activeMinutes = minutes;
|
|
115
|
-
this.pendingScroll = 'center';
|
|
121
|
+
// Google: el día committea sin cerrar. La hora que acompaña es el DRAFT
|
|
122
|
+
// (lo último editado en el campo), no la committeada — así "cambio la hora
|
|
123
|
+
// y después el día" no pisa la edición.
|
|
124
|
+
this.commit(dayKey, this.draftMinutes);
|
|
116
125
|
};
|
|
117
126
|
this.pickTime = (minutes) => {
|
|
118
127
|
var _a, _b;
|
|
119
128
|
const dayKey = (_b = (_a = this.parts) === null || _a === void 0 ? void 0 : _a.dayKey) !== null && _b !== void 0 ? _b : zonedDateKey(Date.now(), this.zone);
|
|
120
129
|
this.commit(dayKey, minutes);
|
|
121
|
-
this.
|
|
130
|
+
this.draftMinutes = minutes;
|
|
122
131
|
// Picking the hour is the terminal step → apply and close.
|
|
123
132
|
this.setOpen(false);
|
|
124
133
|
this.pendingFocusTrigger = true;
|
|
125
134
|
};
|
|
126
|
-
this.
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
i += 1;
|
|
135
|
-
break;
|
|
136
|
-
case 'ArrowUp':
|
|
137
|
-
i -= 1;
|
|
138
|
-
break;
|
|
139
|
-
case 'PageDown':
|
|
140
|
-
i += hourStep;
|
|
141
|
-
break;
|
|
142
|
-
case 'PageUp':
|
|
143
|
-
i -= hourStep;
|
|
144
|
-
break;
|
|
145
|
-
case 'Home':
|
|
146
|
-
i = 0;
|
|
147
|
-
break;
|
|
148
|
-
case 'End':
|
|
149
|
-
i = opts.length - 1;
|
|
150
|
-
break;
|
|
151
|
-
case 'Enter':
|
|
152
|
-
case ' ':
|
|
153
|
-
e.preventDefault();
|
|
154
|
-
this.pickTime(this.activeMinutes);
|
|
155
|
-
return;
|
|
156
|
-
default:
|
|
157
|
-
return;
|
|
158
|
-
}
|
|
159
|
-
e.preventDefault();
|
|
160
|
-
this.activeMinutes = opts[Math.min(opts.length - 1, Math.max(0, i))];
|
|
161
|
-
this.pendingScroll = 'nearest';
|
|
135
|
+
this.onTimeFieldInput = (e) => {
|
|
136
|
+
// null = draft incompleto (segmento vaciado): se conserva el último draft
|
|
137
|
+
// válido, así Listo/Enter nunca committean basura ni quedan bloqueados.
|
|
138
|
+
if (e.detail != null)
|
|
139
|
+
this.draftMinutes = e.detail;
|
|
140
|
+
};
|
|
141
|
+
this.onTimeFieldCommit = (e) => {
|
|
142
|
+
this.pickTime(e.detail);
|
|
162
143
|
};
|
|
144
|
+
// co-time-field emits `coEscape` on Escape but the host does NOT wire it: its
|
|
145
|
+
// own onSegKeyDown does NOT stopPropagation on the native keydown on purpose
|
|
146
|
+
// ("el host también escucha Escape en su root; acá solo se anuncia la
|
|
147
|
+
// intención"), so the ONLY owner of Escape is `onRootKeyDown` below — it must
|
|
148
|
+
// still see `this.open === true` when the (still-bubbling) native keydown
|
|
149
|
+
// reaches it. Wiring a synchronous host handler to `coEscape` would flip
|
|
150
|
+
// `open` to false BEFORE the native keydown finishes bubbling, so the root's
|
|
151
|
+
// `this.open` guard would already be false, skip `stopPropagation()`, and
|
|
152
|
+
// let Escape reach `document` — closing a host co-drawer wrapped around this
|
|
153
|
+
// picker (co-drawer's default `closeOnEscape=true`).
|
|
163
154
|
// ── Popover lifecycle ──────────────────────────────────────
|
|
164
155
|
this.onPopoverOpen = () => {
|
|
165
156
|
var _a, _b;
|
|
@@ -170,15 +161,30 @@ export class CoDateTimePicker {
|
|
|
170
161
|
return;
|
|
171
162
|
}
|
|
172
163
|
if (!this.open) {
|
|
173
|
-
this.open = true; // triggers @Watch('open') →
|
|
164
|
+
this.open = true; // triggers @Watch('open') → seeds the draft hour
|
|
174
165
|
this.coOpen.emit();
|
|
175
166
|
}
|
|
176
167
|
};
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
168
|
+
/**
|
|
169
|
+
* Closes applying whatever is drafted (R7) — outside click / drawer
|
|
170
|
+
* swipe-down behave like a field's blur: what you typed sticks. This is
|
|
171
|
+
* the ONLY path that commits the draft on close; Escape is the opposite —
|
|
172
|
+
* an explicit discard — and it does NOT go through here: `onRootKeyDown`
|
|
173
|
+
* flips `this.open` to `false` via `setOpen()` FIRST, so by the time the
|
|
174
|
+
* real co-popover/co-drawer finish closing and bubble their own `coClose`
|
|
175
|
+
* back to `onPopoverClose`/this drawer's `onCoClose`, the guard below
|
|
176
|
+
* already reads `false` and no-ops — the draft is discarded, not applied.
|
|
177
|
+
*/
|
|
178
|
+
this.closeApplyingDraft = () => {
|
|
179
|
+
if (!this.open)
|
|
180
|
+
return;
|
|
181
|
+
if (this.parts && this.draftMinutes !== this.parts.minutes) {
|
|
182
|
+
this.commit(this.parts.dayKey, this.draftMinutes);
|
|
181
183
|
}
|
|
184
|
+
this.setOpen(false);
|
|
185
|
+
};
|
|
186
|
+
this.onPopoverClose = () => {
|
|
187
|
+
this.closeApplyingDraft();
|
|
182
188
|
};
|
|
183
189
|
this.onRootKeyDown = (e) => {
|
|
184
190
|
if (e.key === 'Escape' && this.open) {
|
|
@@ -201,13 +207,20 @@ export class CoDateTimePicker {
|
|
|
201
207
|
var _a;
|
|
202
208
|
(_a = this.mql) === null || _a === void 0 ? void 0 : _a.removeEventListener('change', this.mqlHandler);
|
|
203
209
|
}
|
|
210
|
+
componentWillLoad() {
|
|
211
|
+
var _a, _b;
|
|
212
|
+
// Seeds the draft once at load: @Watch('open') below only fires on a
|
|
213
|
+
// LATER open transition, not for a host mounted with open=true from the
|
|
214
|
+
// start (a bound `open` prop that's already true at construction) — that
|
|
215
|
+
// mount path would otherwise leave `draftMinutes` unset.
|
|
216
|
+
this.draftMinutes = (_b = (_a = this.parts) === null || _a === void 0 ? void 0 : _a.minutes) !== null && _b !== void 0 ? _b : DEFAULT_MINUTES;
|
|
217
|
+
}
|
|
204
218
|
onOpenChange(next) {
|
|
205
219
|
var _a, _b;
|
|
206
220
|
if (!next)
|
|
207
221
|
return;
|
|
208
|
-
// Opening:
|
|
209
|
-
this.
|
|
210
|
-
this.pendingScroll = 'center';
|
|
222
|
+
// Opening: seed the draft with the committed hour, 09:00 when empty.
|
|
223
|
+
this.draftMinutes = (_b = (_a = this.parts) === null || _a === void 0 ? void 0 : _a.minutes) !== null && _b !== void 0 ? _b : DEFAULT_MINUTES;
|
|
211
224
|
}
|
|
212
225
|
// ── Derived value ──────────────────────────────────────────
|
|
213
226
|
get zone() {
|
|
@@ -263,6 +276,21 @@ export class CoDateTimePicker {
|
|
|
263
276
|
this.value = iso;
|
|
264
277
|
this.coChange.emit(iso);
|
|
265
278
|
}
|
|
279
|
+
get presets() {
|
|
280
|
+
const raw = typeof this.presetIds === 'string'
|
|
281
|
+
? this.presetIds.split(',').map((s) => s.trim()).filter(Boolean)
|
|
282
|
+
: this.presetIds;
|
|
283
|
+
// Dedupe: a repeated id in presetIds would otherwise render duplicate
|
|
284
|
+
// buttons with the SAME `key`, which Stencil's vdom can't reconcile.
|
|
285
|
+
const ids = Array.from(new Set(raw !== null && raw !== void 0 ? raw : []));
|
|
286
|
+
return ids
|
|
287
|
+
.filter((id) => id in CoDateTimePicker.PRESET_CATALOG)
|
|
288
|
+
.map((id) => {
|
|
289
|
+
const def = CoDateTimePicker.PRESET_CATALOG[id];
|
|
290
|
+
const minutes = def.minutes === 'now' ? zonedMinutesOfDay(Date.now(), this.zone) : def.minutes;
|
|
291
|
+
return { id, icon: def.icon, minutes };
|
|
292
|
+
});
|
|
293
|
+
}
|
|
266
294
|
// ── Focus / scroll bookkeeping ─────────────────────────────
|
|
267
295
|
focusGridSoon() {
|
|
268
296
|
requestAnimationFrame(() => {
|
|
@@ -270,56 +298,22 @@ export class CoDateTimePicker {
|
|
|
270
298
|
(_b = (_a = this.calendarEl) === null || _a === void 0 ? void 0 : _a.focusGrid) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
271
299
|
});
|
|
272
300
|
}
|
|
273
|
-
scrollActiveIntoView(mode) {
|
|
274
|
-
const list = this.listEl;
|
|
275
|
-
if (!list)
|
|
276
|
-
return;
|
|
277
|
-
const el = list.querySelector('[data-active="true"]');
|
|
278
|
-
if (!el)
|
|
279
|
-
return;
|
|
280
|
-
// Manual scrollTop (not scrollIntoView): the panel lives in the top layer and
|
|
281
|
-
// scrollIntoView would also scroll the page behind it.
|
|
282
|
-
if (mode === 'center') {
|
|
283
|
-
list.scrollTop = Math.max(0, el.offsetTop - list.clientHeight / 2 + el.offsetHeight / 2);
|
|
284
|
-
return;
|
|
285
|
-
}
|
|
286
|
-
// Arrowing: only reveal when the option fell out of view, so the list does
|
|
287
|
-
// not jump under the cursor on every keystroke.
|
|
288
|
-
const top = el.offsetTop;
|
|
289
|
-
const bottom = top + el.offsetHeight;
|
|
290
|
-
if (top < list.scrollTop)
|
|
291
|
-
list.scrollTop = top;
|
|
292
|
-
else if (bottom > list.scrollTop + list.clientHeight) {
|
|
293
|
-
list.scrollTop = bottom - list.clientHeight;
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
301
|
componentDidRender() {
|
|
297
302
|
var _a;
|
|
298
303
|
if (this.pendingFocusGrid && this.open && this.calendarEl) {
|
|
299
304
|
this.pendingFocusGrid = false;
|
|
300
305
|
this.focusGridSoon();
|
|
301
306
|
}
|
|
302
|
-
if (this.pendingScroll && this.open && this.listEl) {
|
|
303
|
-
const mode = this.pendingScroll;
|
|
304
|
-
this.pendingScroll = null;
|
|
305
|
-
this.scrollActiveIntoView(mode);
|
|
306
|
-
}
|
|
307
307
|
if (this.pendingFocusTrigger) {
|
|
308
308
|
this.pendingFocusTrigger = false;
|
|
309
309
|
(_a = this.triggerBtn) === null || _a === void 0 ? void 0 : _a.focus();
|
|
310
310
|
}
|
|
311
311
|
}
|
|
312
|
-
// ──
|
|
312
|
+
// ── Time field paging ─────────────────────────────────────
|
|
313
313
|
get step() {
|
|
314
314
|
const s = Math.round(Number(this.stepMinutes));
|
|
315
315
|
return Number.isFinite(s) && s > 0 ? Math.min(720, s) : 15;
|
|
316
316
|
}
|
|
317
|
-
/** Grid of minutes-of-day, plus the committed hour when it falls off-grid
|
|
318
|
-
* (an imported 16:37 meeting must stay visible and selectable). */
|
|
319
|
-
get options() {
|
|
320
|
-
var _a, _b;
|
|
321
|
-
return timeOptions(this.step, (_b = (_a = this.parts) === null || _a === void 0 ? void 0 : _a.minutes) !== null && _b !== void 0 ? _b : null);
|
|
322
|
-
}
|
|
323
317
|
// ── Render ─────────────────────────────────────────────────
|
|
324
318
|
renderTrigger(t) {
|
|
325
319
|
const p = this.parts;
|
|
@@ -339,16 +333,17 @@ export class CoDateTimePicker {
|
|
|
339
333
|
}, type: "button", tabIndex: -1, onMouseDown: (e) => e.preventDefault(), onClick: this.onClearClick, "aria-label": t.clearDateTime, part: "clear" }, h("co-icon", { name: "x-circle", size: 16, weight: "fill" })))));
|
|
340
334
|
}
|
|
341
335
|
renderPanel(t, touch) {
|
|
342
|
-
var _a, _b
|
|
343
|
-
const selected = (_b = (_a = this.parts) === null || _a === void 0 ? void 0 : _a.minutes) !== null && _b !== void 0 ? _b : null;
|
|
336
|
+
var _a, _b;
|
|
344
337
|
return (h("div", { class: {
|
|
345
338
|
'co-date-time-picker__panel': true,
|
|
346
339
|
'co-date-time-picker__panel--touch': touch,
|
|
347
|
-
} }, h("co-calendar", { ref: (el) => (this.calendarEl = el), class: "co-date-time-picker__calendar", "data-touch": touch ? '' : undefined, value: (
|
|
348
|
-
'
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
340
|
+
} }, h("co-calendar", { ref: (el) => (this.calendarEl = el), class: "co-date-time-picker__calendar", "data-touch": touch ? '' : undefined, value: (_b = (_a = this.parts) === null || _a === void 0 ? void 0 : _a.dayKey) !== null && _b !== void 0 ? _b : null, min: this.dayBound(this.min), max: this.dayBound(this.max), disabledDates: this.disabledDates, disabledDaysOfWeek: this.disabledDaysOfWeek, locale: this.locale, firstDayOfWeek: this.firstDayOfWeek, onCoSelect: this.onCalendarSelect }), h("div", { class: "co-date-time-picker__side" }, h("div", { class: "co-date-time-picker__sect" }, t.shortcuts), h("div", { class: "co-date-time-picker__presets" }, this.presets.map((p) => (h("button", { key: p.id, type: "button", class: "co-date-time-picker__preset", disabled: this.disabled || this.readonly, onClick: () => {
|
|
341
|
+
// 'now' is resolved fresh AT CLICK, not frozen at the render
|
|
342
|
+
// that computed `p.minutes` for the hint — a panel left open
|
|
343
|
+
// past the minute must still commit the current time.
|
|
344
|
+
const m = p.id === 'now' ? zonedMinutesOfDay(Date.now(), this.zone) : p.minutes;
|
|
345
|
+
this.pickTime(m);
|
|
346
|
+
} }, h("co-icon", { name: p.icon, size: 16, class: "co-date-time-picker__preset-icon" }), h("span", { class: "co-date-time-picker__preset-label" }, t[p.id]), h("span", { class: "co-date-time-picker__preset-hint" }, clockLabel(p.minutes, this.locale, this.hour12)))))), h("div", { class: "co-date-time-picker__sect co-date-time-picker__sect--time" }, t.timeExact), h("co-time-field", { "data-touch": touch ? '' : undefined, value: this.draftMinutes, hour12: this.hour12, locale: this.locale, pageStep: this.step, disabled: this.disabled || this.readonly, onCoInput: this.onTimeFieldInput, onCoCommit: this.onTimeFieldCommit }), h("div", { class: "co-date-time-picker__footer" }, h("button", { type: "button", class: "co-date-time-picker__btn co-date-time-picker__btn--primary", disabled: this.disabled || this.readonly, onClick: () => this.pickTime(this.draftMinutes) }, t.done)))));
|
|
352
347
|
}
|
|
353
348
|
renderHelper() {
|
|
354
349
|
const helper = this.isInvalid ? this.errorMessage : this.helperText;
|
|
@@ -367,10 +362,10 @@ export class CoDateTimePicker {
|
|
|
367
362
|
render() {
|
|
368
363
|
var _a;
|
|
369
364
|
const t = getDateStrings(this.locale);
|
|
370
|
-
return (h("div", { key: '
|
|
365
|
+
return (h("div", { key: 'a128077a99e226422be0ce805cfa16db44212cd1', class: "co-date-time-picker", onKeyDown: this.onRootKeyDown }, this.renderLabel(), this.isMobile ? ([
|
|
371
366
|
h("div", { class: "co-date-time-picker__trigger", onClick: () => !this.disabled && !this.readonly && this.setOpen(true) }, this.renderTrigger(t)),
|
|
372
|
-
h("co-drawer", { position: "bottom", open: this.open, heading: t.selectDateTime, onCoClose:
|
|
373
|
-
]) : (h("co-popover", { ref: (el) => (this.popoverEl = el), open: this.open, placement: this.placement, offset: 4, closeOnEscape: false, onCoOpen: this.onPopoverOpen, onCoClose: this.onPopoverClose }, h("div", { slot: "trigger", class: "co-date-time-picker__trigger" }, this.renderTrigger(t)), this.open && this.renderPanel(t, false))), this.name && h("input", { key: '
|
|
367
|
+
h("co-drawer", { position: "bottom", open: this.open, heading: t.selectDateTime, onCoClose: this.closeApplyingDraft }, h("div", { class: "co-date-time-picker__sheet" }, this.renderPanel(t, true))),
|
|
368
|
+
]) : (h("co-popover", { ref: (el) => (this.popoverEl = el), open: this.open, placement: this.placement, offset: 4, closeOnEscape: false, onCoOpen: this.onPopoverOpen, onCoClose: this.onPopoverClose }, h("div", { slot: "trigger", class: "co-date-time-picker__trigger" }, this.renderTrigger(t)), this.open && this.renderPanel(t, false))), this.name && h("input", { key: '18d0a3100dcb58c86fd7081b654fdf7d8d7e5e19', type: "hidden", name: this.name, value: (_a = this.value) !== null && _a !== void 0 ? _a : '' }), this.renderHelper()));
|
|
374
369
|
}
|
|
375
370
|
static get is() { return "co-date-time-picker"; }
|
|
376
371
|
static get encapsulation() { return "shadow"; }
|
|
@@ -437,7 +432,7 @@ export class CoDateTimePicker {
|
|
|
437
432
|
"optional": false,
|
|
438
433
|
"docs": {
|
|
439
434
|
"tags": [],
|
|
440
|
-
"text": "
|
|
435
|
+
"text": "Paso de PageUp/PageDown del campo de hora (antes: paso de la lista)."
|
|
441
436
|
},
|
|
442
437
|
"getter": false,
|
|
443
438
|
"setter": false,
|
|
@@ -445,6 +440,26 @@ export class CoDateTimePicker {
|
|
|
445
440
|
"attribute": "step-minutes",
|
|
446
441
|
"defaultValue": "15"
|
|
447
442
|
},
|
|
443
|
+
"presetIds": {
|
|
444
|
+
"type": "string",
|
|
445
|
+
"mutable": false,
|
|
446
|
+
"complexType": {
|
|
447
|
+
"original": "string[] | string",
|
|
448
|
+
"resolved": "string | string[]",
|
|
449
|
+
"references": {}
|
|
450
|
+
},
|
|
451
|
+
"required": false,
|
|
452
|
+
"optional": false,
|
|
453
|
+
"docs": {
|
|
454
|
+
"tags": [],
|
|
455
|
+
"text": "Atajos del panel, en orden. Ids del cat\u00E1logo: morning|noon|afternoon|endOfDay|now."
|
|
456
|
+
},
|
|
457
|
+
"getter": false,
|
|
458
|
+
"setter": false,
|
|
459
|
+
"reflect": false,
|
|
460
|
+
"attribute": "preset-ids",
|
|
461
|
+
"defaultValue": "['morning', 'noon', 'afternoon', 'endOfDay', 'now']"
|
|
462
|
+
},
|
|
448
463
|
"hour12": {
|
|
449
464
|
"type": "boolean",
|
|
450
465
|
"mutable": false,
|
|
@@ -928,7 +943,7 @@ export class CoDateTimePicker {
|
|
|
928
943
|
static get states() {
|
|
929
944
|
return {
|
|
930
945
|
"isMobile": {},
|
|
931
|
-
"
|
|
946
|
+
"draftMinutes": {}
|
|
932
947
|
};
|
|
933
948
|
}
|
|
934
949
|
static get events() {
|
|
@@ -1032,14 +1047,21 @@ export class CoDateTimePicker {
|
|
|
1032
1047
|
}];
|
|
1033
1048
|
}
|
|
1034
1049
|
}
|
|
1050
|
+
CoDateTimePicker.PRESET_CATALOG = {
|
|
1051
|
+
morning: { icon: 'sun-horizon', minutes: 9 * 60 },
|
|
1052
|
+
noon: { icon: 'sun', minutes: 12 * 60 },
|
|
1053
|
+
afternoon: { icon: 'coffee', minutes: 15 * 60 },
|
|
1054
|
+
endOfDay: { icon: 'moon', minutes: 18 * 60 },
|
|
1055
|
+
now: { icon: 'clock', minutes: 'now' },
|
|
1056
|
+
};
|
|
1035
1057
|
// ── Module-level caches ──────────────────────────────────────
|
|
1036
1058
|
// Intl.DateTimeFormat is expensive to construct and these labels are recomputed
|
|
1037
|
-
// on every render over a BOUNDED domain (
|
|
1038
|
-
//
|
|
1039
|
-
//
|
|
1059
|
+
// on every render over a BOUNDED domain (the trigger's 1 value + up to 5
|
|
1060
|
+
// presets, ≤6 minutes-of-day × 1-2 locales): the RESULT is cached (and the
|
|
1061
|
+
// formatter, for the miss). Hygiene clear at 2000 entries — unreachable in
|
|
1062
|
+
// normal use, it only guards pathological iteration.
|
|
1040
1063
|
const LABEL_CACHE = new Map();
|
|
1041
1064
|
const LABEL_FMT_CACHE = new Map();
|
|
1042
|
-
const OPTIONS_CACHE = new Map();
|
|
1043
1065
|
/** Minutes-of-day → localized clock label ("4:30 p. m." / "16:30"). */
|
|
1044
1066
|
function clockLabel(minutes, locale, hour12) {
|
|
1045
1067
|
const key = `${locale}|${hour12 ? 12 : 24}|${minutes}`;
|
|
@@ -1059,21 +1081,3 @@ function clockLabel(minutes, locale, hour12) {
|
|
|
1059
1081
|
LABEL_CACHE.set(key, out);
|
|
1060
1082
|
return out;
|
|
1061
1083
|
}
|
|
1062
|
-
/** Minutes-of-day grid at `step`, plus `extra` when it falls off-grid. */
|
|
1063
|
-
function timeOptions(step, extra) {
|
|
1064
|
-
const key = `${step}|${extra !== null && extra !== void 0 ? extra : ''}`;
|
|
1065
|
-
const hit = OPTIONS_CACHE.get(key);
|
|
1066
|
-
if (hit)
|
|
1067
|
-
return hit;
|
|
1068
|
-
const out = [];
|
|
1069
|
-
for (let m = 0; m < MINUTES_PER_DAY; m += step)
|
|
1070
|
-
out.push(m);
|
|
1071
|
-
if (extra != null && extra >= 0 && extra < MINUTES_PER_DAY && !out.includes(extra)) {
|
|
1072
|
-
out.push(extra);
|
|
1073
|
-
out.sort((a, b) => a - b);
|
|
1074
|
-
}
|
|
1075
|
-
if (OPTIONS_CACHE.size > 200)
|
|
1076
|
-
OPTIONS_CACHE.clear();
|
|
1077
|
-
OPTIONS_CACHE.set(key, out);
|
|
1078
|
-
return out;
|
|
1079
|
-
}
|