@prolibu-suite/cobalt-core 0.7.0 → 0.8.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 +8266 -5138
- package/dist/cjs/co-action-bar.cjs.entry.js +89 -0
- package/dist/cjs/co-app-shell.cjs.entry.js +2 -2
- package/dist/cjs/co-audio-player.cjs.entry.js +279 -0
- package/dist/cjs/co-avatar_2.cjs.entry.js +3 -3
- package/dist/cjs/co-badge.cjs.entry.js +1 -1
- package/dist/cjs/co-bottom-sheet.cjs.entry.js +3 -3
- package/dist/cjs/co-breadcrumb-item.cjs.entry.js +2 -2
- package/dist/cjs/co-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/co-button-group.cjs.entry.js +2 -2
- package/dist/cjs/co-button.cjs.entry.js +12 -5
- package/dist/cjs/co-calendar-month_2.cjs.entry.js +1601 -0
- package/dist/cjs/co-calendar_3.cjs.entry.js +9 -9
- package/dist/cjs/co-card.cjs.entry.js +2 -2
- package/dist/cjs/co-carousel-item.cjs.entry.js +1 -1
- package/dist/cjs/co-carousel.cjs.entry.js +3 -3
- package/dist/cjs/co-checkbox.cjs.entry.js +4 -4
- package/dist/cjs/co-chip_2.cjs.entry.js +95 -6
- package/dist/cjs/co-color-picker.cjs.entry.js +2 -2
- package/dist/cjs/co-column-picker.cjs.entry.js +2 -2
- package/dist/cjs/co-data-table-pagination.cjs.entry.js +4 -4
- package/dist/cjs/co-data-table.cjs.entry.js +1 -1
- package/dist/cjs/co-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/co-date-range-picker.cjs.entry.js +2 -2
- package/dist/cjs/co-date-range.cjs.entry.js +1 -1
- package/dist/cjs/co-date-time-picker.cjs.entry.js +409 -0
- package/dist/cjs/co-drive-card.cjs.entry.js +1 -1
- package/dist/cjs/co-drop-zone.cjs.entry.js +1 -1
- package/dist/cjs/co-empty-state.cjs.entry.js +2 -2
- package/dist/cjs/co-event-calendar.cjs.entry.js +118 -17
- package/dist/cjs/co-event-popover.cjs.entry.js +132 -0
- package/dist/cjs/co-fab.cjs.entry.js +2 -2
- package/dist/cjs/co-file-field.cjs.entry.js +5 -5
- package/dist/cjs/co-file-type-tile.cjs.entry.js +2 -2
- package/dist/cjs/co-helper-text.cjs.entry.js +2 -2
- package/dist/cjs/co-icon-button.cjs.entry.js +1 -1
- package/dist/cjs/co-icon.cjs.entry.js +2 -2
- package/dist/cjs/co-json-field.cjs.entry.js +3 -3
- package/dist/cjs/co-lightbox.cjs.entry.js +5 -5
- package/dist/cjs/co-list-footer.cjs.entry.js +1 -1
- package/dist/cjs/co-list-item.cjs.entry.js +4 -4
- package/dist/cjs/co-media-thumb.cjs.entry.js +2 -2
- package/dist/cjs/co-menu-divider.cjs.entry.js +1 -1
- package/dist/cjs/co-menu-item.cjs.entry.js +2 -2
- package/dist/cjs/co-menu.cjs.entry.js +1 -1
- package/dist/cjs/co-modal.cjs.entry.js +2 -2
- package/dist/cjs/co-navbar.cjs.entry.js +2 -2
- package/dist/cjs/co-number-field.cjs.entry.js +2 -2
- package/dist/cjs/co-overlay.cjs.entry.js +1 -1
- package/dist/cjs/co-page-header.cjs.entry.js +1 -1
- package/dist/cjs/co-phone-field.cjs.entry.js +1 -1
- package/dist/cjs/co-popover.cjs.entry.js +1 -1
- package/dist/cjs/co-progress-bar.cjs.entry.js +2 -2
- package/dist/cjs/co-progress-circle.cjs.entry.js +2 -2
- package/dist/cjs/co-provider-logo_2.cjs.entry.js +72 -0
- package/dist/cjs/co-radio.cjs.entry.js +3 -3
- package/dist/cjs/co-rating.cjs.entry.js +3 -3
- package/dist/cjs/co-ref-field.cjs.entry.js +6 -2
- package/dist/cjs/co-rich-text-editor.cjs.entry.js +4 -4
- package/dist/cjs/co-rich-text-toolbar.cjs.entry.js +1 -1
- package/dist/cjs/co-row.cjs.entry.js +2 -2
- package/dist/cjs/co-select.cjs.entry.js +1 -1
- package/dist/cjs/co-separator.cjs.entry.js +1 -1
- package/dist/cjs/co-sidebar-nav.cjs.entry.js +12 -2
- package/dist/cjs/co-sidebar.cjs.entry.js +2 -2
- package/dist/cjs/co-slider.cjs.entry.js +2 -2
- package/dist/cjs/co-switch.cjs.entry.js +3 -3
- package/dist/cjs/co-tab-group.cjs.entry.js +19 -3
- package/dist/cjs/co-tab.cjs.entry.js +2 -2
- package/dist/cjs/co-tags-field.cjs.entry.js +5 -5
- package/dist/cjs/co-textarea.cjs.entry.js +4 -4
- package/dist/cjs/co-toggle-button-group.cjs.entry.js +2 -2
- package/dist/cjs/co-toggle-button.cjs.entry.js +2 -2
- package/dist/cjs/co-video.cjs.entry.js +2 -2
- package/dist/cjs/cobalt.cjs.js +1 -1
- package/dist/cjs/{dateI18n-BdiNAl0_.js → dateI18n-wblvKRq_.js} +21 -0
- package/dist/cjs/{dates-D8D-aS5d.js → dates-TQLHlFd2.js} +64 -13
- package/dist/cjs/index-kBiXCEE7.js +28 -12
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{positioning-DwHW399W.js → positioning-DCj_AJ2T.js} +10 -0
- package/dist/cjs/time-LBHtzLHe.js +42 -0
- package/dist/cobalt/cobalt.esm.js +1 -1
- package/dist/cobalt/{p-616e4286.entry.js → p-00830b8c.entry.js} +1 -1
- package/dist/cobalt/{p-9994fcd8.entry.js → p-0769eee9.entry.js} +1 -1
- package/dist/cobalt/{p-9bf42bf4.entry.js → p-0f18c4d2.entry.js} +1 -1
- package/dist/cobalt/{p-cdedaa82.entry.js → p-0fc1edca.entry.js} +1 -1
- package/dist/cobalt/p-15852fec.entry.js +1 -0
- package/dist/cobalt/{p-eec1c44c.entry.js → p-195c67ee.entry.js} +1 -1
- package/dist/cobalt/{p-B6JZk8fL.js → p-1EK-COrb.js} +1 -1
- package/dist/cobalt/{p-2da09948.entry.js → p-1e9c9d46.entry.js} +1 -1
- package/dist/cobalt/{p-e1b468c1.entry.js → p-20bd3702.entry.js} +1 -1
- package/dist/cobalt/p-25f59046.entry.js +1 -0
- package/dist/cobalt/{p-b06af5c6.entry.js → p-260196cb.entry.js} +1 -1
- package/dist/cobalt/p-2bf44b2b.entry.js +1 -0
- package/dist/cobalt/{p-8155d781.entry.js → p-2c100914.entry.js} +1 -1
- package/dist/cobalt/p-2e1d930f.entry.js +1 -0
- package/dist/cobalt/{p-080f62e4.entry.js → p-35518aee.entry.js} +1 -1
- package/dist/cobalt/{p-28ab9cef.entry.js → p-38ae8bff.entry.js} +1 -1
- package/dist/cobalt/{p-f0a98453.entry.js → p-38cf47b6.entry.js} +1 -1
- package/dist/cobalt/p-39dea0c0.entry.js +1 -0
- package/dist/cobalt/{p-3c681e3a.entry.js → p-3a746267.entry.js} +1 -1
- package/dist/cobalt/p-3ae69426.entry.js +1 -0
- package/dist/cobalt/{p-9211e794.entry.js → p-3d4e697e.entry.js} +1 -1
- package/dist/cobalt/{p-264508ae.entry.js → p-445acc4c.entry.js} +1 -1
- package/dist/cobalt/p-4de9232a.entry.js +1 -0
- package/dist/cobalt/{p-7f78e45c.entry.js → p-50bbfad8.entry.js} +1 -1
- package/dist/cobalt/{p-54f8c68c.entry.js → p-51a1ad38.entry.js} +1 -1
- package/dist/cobalt/{p-75515a8e.entry.js → p-523aca9f.entry.js} +1 -1
- package/dist/cobalt/{p-2f6c7eb5.entry.js → p-52af222b.entry.js} +1 -1
- package/dist/cobalt/{p-0b7359bb.entry.js → p-59f7d44b.entry.js} +1 -1
- package/dist/cobalt/{p-4f615cbd.entry.js → p-5b984323.entry.js} +1 -1
- package/dist/cobalt/{p-8fe5b07e.entry.js → p-5bfaca70.entry.js} +1 -1
- package/dist/cobalt/p-5c1328ff.entry.js +1 -0
- package/dist/cobalt/p-5e21ca17.entry.js +1 -0
- package/dist/cobalt/p-61d5ca3c.entry.js +1 -0
- package/dist/cobalt/{p-64115d66.entry.js → p-6357d9dd.entry.js} +1 -1
- package/dist/cobalt/{p-0a294205.entry.js → p-6985a964.entry.js} +1 -1
- package/dist/cobalt/p-69b8d98e.entry.js +1 -0
- package/dist/cobalt/{p-532baca4.entry.js → p-6b089060.entry.js} +1 -1
- package/dist/cobalt/{p-ceb85838.entry.js → p-6b256d01.entry.js} +1 -1
- package/dist/cobalt/{p-c9528a5f.entry.js → p-7c6b3175.entry.js} +1 -1
- package/dist/cobalt/{p-431cec34.entry.js → p-7d077a7c.entry.js} +1 -1
- package/dist/cobalt/{p-cbac0a11.entry.js → p-7f4bf341.entry.js} +1 -1
- package/dist/cobalt/p-869c338a.entry.js +1 -0
- package/dist/cobalt/p-890296f9.entry.js +1 -0
- package/dist/cobalt/{p-7178113f.entry.js → p-8fe08257.entry.js} +1 -1
- package/dist/cobalt/p-913b2a14.entry.js +1 -0
- package/dist/cobalt/{p-5b84cf37.entry.js → p-959556f4.entry.js} +1 -1
- package/dist/cobalt/{p-331a0108.entry.js → p-99c1ff0f.entry.js} +1 -1
- package/dist/cobalt/p-BMdapAL8.js +1 -0
- package/dist/cobalt/p-BU7SQCje.js +1 -0
- package/dist/cobalt/p-CF8OB_TM.js +1 -0
- package/dist/cobalt/p-CnNpoKwg.js +1 -0
- package/dist/cobalt/{p-ba5c6aa7.entry.js → p-a04feb70.entry.js} +1 -1
- package/dist/cobalt/p-a4f39ba2.entry.js +1 -0
- package/dist/cobalt/{p-d3a1a604.entry.js → p-a7c23027.entry.js} +1 -1
- package/dist/cobalt/p-ab8e150e.entry.js +1 -0
- package/dist/cobalt/{p-69ce2269.entry.js → p-acdb68a7.entry.js} +1 -1
- package/dist/cobalt/{p-3b9be8a8.entry.js → p-afd957c0.entry.js} +1 -1
- package/dist/cobalt/{p-c3004e1c.entry.js → p-b45ea918.entry.js} +1 -1
- package/dist/cobalt/{p-eeed80ac.entry.js → p-bad7ce84.entry.js} +1 -1
- package/dist/cobalt/{p-bcd38114.entry.js → p-bebacee2.entry.js} +1 -1
- package/dist/cobalt/{p-ec9dd3a3.entry.js → p-c32949a5.entry.js} +1 -1
- package/dist/cobalt/p-cd5555d2.entry.js +1 -0
- package/dist/cobalt/p-cd96aabf.entry.js +1 -0
- package/dist/cobalt/{p-2661557c.entry.js → p-ce961fba.entry.js} +1 -1
- package/dist/cobalt/p-d56b8a1f.entry.js +1 -0
- package/dist/cobalt/{p-c7d9ff39.entry.js → p-d6fff135.entry.js} +1 -1
- package/dist/cobalt/{p-6b38e8fb.entry.js → p-d71b87d3.entry.js} +1 -1
- package/dist/cobalt/{p-ff581807.entry.js → p-d83e5189.entry.js} +1 -1
- package/dist/cobalt/{p-741cf623.entry.js → p-dc269096.entry.js} +1 -1
- package/dist/cobalt/{p-e4555fda.entry.js → p-dc8e88f4.entry.js} +1 -1
- package/dist/cobalt/p-de5a05fc.entry.js +1 -0
- package/dist/cobalt/{p-0110108f.entry.js → p-df63f23c.entry.js} +1 -1
- package/dist/cobalt/{p-9fab9c1f.entry.js → p-e2188319.entry.js} +1 -1
- package/dist/cobalt/p-f0c589ad.entry.js +1 -0
- package/dist/cobalt/p-f4370423.entry.js +1 -0
- package/dist/cobalt/{p-b87a2e7a.entry.js → p-f4e4bebf.entry.js} +1 -1
- package/dist/cobalt/p-f53b9536.entry.js +1 -0
- package/dist/cobalt/{p-bb00ae4a.entry.js → p-f7ae0228.entry.js} +1 -1
- package/dist/collection/collection-manifest.json +6 -0
- package/dist/collection/components/co-action-bar/co-action-bar.css +148 -0
- package/dist/collection/components/co-action-bar/co-action-bar.js +247 -0
- package/dist/collection/components/co-app-shell/co-app-shell.js +2 -2
- package/dist/collection/components/co-audio-player/co-audio-player.css +58 -0
- package/dist/collection/components/co-audio-player/co-audio-player.js +453 -0
- package/dist/collection/components/co-audio-player/co-audio-player.utils.js +44 -0
- package/dist/collection/components/co-badge/co-badge.js +1 -1
- package/dist/collection/components/co-bottom-sheet/co-bottom-sheet.js +3 -3
- package/dist/collection/components/co-breadcrumb/co-breadcrumb.js +1 -1
- package/dist/collection/components/co-breadcrumb-item/co-breadcrumb-item.js +2 -2
- package/dist/collection/components/co-button/co-button.css +19 -0
- package/dist/collection/components/co-button/co-button.js +31 -5
- package/dist/collection/components/co-button-group/co-button-group.js +2 -2
- package/dist/collection/components/co-calendar/co-calendar.js +1 -1
- package/dist/collection/components/co-calendar-month/co-calendar-month.css +52 -3
- package/dist/collection/components/co-calendar-month/co-calendar-month.js +238 -55
- package/dist/collection/components/co-calendar-timegrid/co-calendar-timegrid.css +265 -0
- package/dist/collection/components/co-calendar-timegrid/co-calendar-timegrid.js +1305 -0
- package/dist/collection/components/co-card/co-card.js +2 -2
- package/dist/collection/components/co-carousel/co-carousel.js +2 -2
- package/dist/collection/components/co-carousel-item/co-carousel-item.js +1 -1
- package/dist/collection/components/co-checkbox/co-checkbox.css +1 -1
- package/dist/collection/components/co-checkbox/co-checkbox.js +3 -3
- package/dist/collection/components/co-chip/co-chip.js +2 -2
- package/dist/collection/components/co-color-picker/co-color-picker.js +2 -2
- package/dist/collection/components/co-column-picker/co-column-picker.js +2 -2
- package/dist/collection/components/co-data-table/co-data-table.css +4 -4
- 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-time-picker/co-date-time-picker.css +325 -0
- package/dist/collection/components/co-date-time-picker/co-date-time-picker.js +1079 -0
- package/dist/collection/components/co-drawer/co-drawer.css +46 -0
- package/dist/collection/components/co-drawer/co-drawer.js +1 -1
- 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-empty-state/co-empty-state.js +2 -2
- package/dist/collection/components/co-event-calendar/co-event-calendar.css +19 -7
- package/dist/collection/components/co-event-calendar/co-event-calendar.js +342 -39
- package/dist/collection/components/co-event-popover/co-event-popover.css +26 -0
- package/dist/collection/components/co-event-popover/co-event-popover.js +326 -0
- package/dist/collection/components/co-fab/co-fab.js +2 -2
- package/dist/collection/components/co-file-field/co-file-field.js +5 -5
- 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.js +1 -1
- package/dist/collection/components/co-json-field/co-json-field.js +3 -3
- package/dist/collection/components/co-lightbox/co-lightbox.js +4 -4
- 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 +21 -0
- package/dist/collection/components/co-menu-item/co-menu-item.js +20 -1
- package/dist/collection/components/co-modal/co-modal.js +2 -2
- package/dist/collection/components/co-navbar/co-navbar.js +2 -2
- package/dist/collection/components/co-number-field/co-number-field.js +2 -2
- package/dist/collection/components/co-option-list/co-option-list.css +18 -0
- package/dist/collection/components/co-option-list/co-option-list.js +127 -5
- package/dist/collection/components/co-option-list/optionListLogic.js +13 -0
- package/dist/collection/components/co-overlay/co-overlay.js +1 -1
- package/dist/collection/components/co-page-header/co-page-header.js +1 -1
- package/dist/collection/components/co-phone-field/co-phone-field.js +1 -1
- 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-provider-logo/co-provider-logo.css +23 -0
- package/dist/collection/components/co-provider-logo/co-provider-logo.js +124 -0
- package/dist/collection/components/co-radio/co-radio.js +3 -3
- package/dist/collection/components/co-rating/co-rating.js +3 -3
- package/dist/collection/components/co-ref-field/co-ref-field.js +6 -2
- package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.css +11 -0
- package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.js +3 -3
- package/dist/collection/components/co-rich-text-toolbar/co-rich-text-toolbar.css +8 -0
- package/dist/collection/components/co-row/co-row.js +2 -2
- 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.js +12 -2
- package/dist/collection/components/co-skeleton/co-skeleton.js +1 -1
- package/dist/collection/components/co-slider/co-slider.js +2 -2
- 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.css +25 -0
- package/dist/collection/components/co-tab-group/co-tab-group.js +18 -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-toggle-button/co-toggle-button.js +2 -2
- package/dist/collection/components/co-toggle-button-group/co-toggle-button-group.js +2 -2
- package/dist/collection/components/co-tooltip/co-tooltip.js +2 -2
- package/dist/collection/components/co-video/co-video.js +2 -2
- package/dist/collection/utils/dateI18n.js +21 -0
- package/dist/collection/utils/eventColor.js +52 -0
- package/dist/collection/utils/positioning.js +10 -0
- package/dist/components/co-accordion.js +1 -1
- package/dist/components/co-action-bar.d.ts +11 -0
- package/dist/components/co-action-bar.js +1 -0
- package/dist/components/co-app-shell.js +1 -1
- package/dist/components/co-audio-player.d.ts +11 -0
- package/dist/components/co-audio-player.js +1 -0
- 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-bottom-sheet.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-group.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.d.ts +11 -0
- package/dist/components/co-calendar-timegrid.js +1 -0
- package/dist/components/co-calendar.js +1 -1
- package/dist/components/co-card.js +1 -1
- package/dist/components/co-carousel-item.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.d.ts +11 -0
- package/dist/components/co-date-time-picker.js +1 -0
- 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-empty-state.js +1 -1
- package/dist/components/co-event-calendar.js +1 -1
- package/dist/components/co-event-popover.d.ts +11 -0
- package/dist/components/co-event-popover.js +1 -0
- 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-provider-logo.d.ts +11 -0
- package/dist/components/co-provider-logo.js +1 -0
- package/dist/components/co-radio-group.js +1 -1
- package/dist/components/co-radio.js +1 -1
- package/dist/components/co-rating.js +1 -1
- package/dist/components/co-ref-field.js +1 -1
- package/dist/components/co-rich-text-editor.js +1 -1
- package/dist/components/co-rich-text-toolbar.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-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/p-B21rOC2Y.js +1 -0
- package/dist/components/{p-Cd3inFSL.js → p-BC6sxVVr.js} +1 -1
- package/dist/components/p-BMdapAL8.js +1 -0
- package/dist/components/p-BQFperIX.js +1 -0
- package/dist/components/{p-CQ-8domm.js → p-BXtiFFM2.js} +1 -1
- package/dist/components/{p-CmCsm4L-.js → p-BdArvV6T.js} +1 -1
- package/dist/components/p-BnkGlFYy.js +1 -0
- package/dist/components/p-C-5cLeKr.js +1 -0
- package/dist/components/p-CDWXNRpo.js +1 -0
- package/dist/components/p-CF8OB_TM.js +1 -0
- package/dist/components/{p-oV_1MoAN.js → p-CIWoKlGj.js} +1 -1
- package/dist/components/{p-Bul6EdDX.js → p-CVCEiwOS.js} +1 -1
- package/dist/components/{p-B0b9Etx4.js → p-CfeNhAHW.js} +1 -1
- package/dist/components/p-Ch837Ggl.js +1 -0
- package/dist/components/p-ChLib-si.js +1 -0
- package/dist/components/{p-DfpOEXHC.js → p-ChPooamL.js} +1 -1
- package/dist/components/p-CnNpoKwg.js +1 -0
- package/dist/components/{p-B7Yv00g9.js → p-D-3BTFRs.js} +1 -1
- package/dist/components/p-D0wrmRH8.js +1 -0
- package/dist/components/p-DZX7cEqP.js +1 -0
- package/dist/components/{p-B3U63yZw.js → p-DbISGXT_.js} +1 -1
- package/dist/components/p-Dxa7c4Ap.js +1 -0
- package/dist/components/p-T0MdU7sb.js +1 -0
- package/dist/components/{p-DwwxS5bY.js → p-W8Y8ZuPs.js} +1 -1
- package/dist/components/{p-9aNhJfTT.js → p-cteJszd-.js} +1 -1
- package/dist/components/p-e5KibEs8.js +1 -0
- package/dist/components/{p-Bzg5FPSA.js → p-mUoTCiYa.js} +1 -1
- package/dist/components/p-uZ2D6ESV.js +1 -0
- package/dist/components/{p-BtpRnpaF.js → p-ySi6UG0O.js} +1 -1
- package/dist/esm/co-action-bar.entry.js +87 -0
- package/dist/esm/co-app-shell.entry.js +2 -2
- package/dist/esm/co-audio-player.entry.js +277 -0
- package/dist/esm/co-avatar_2.entry.js +3 -3
- package/dist/esm/co-badge.entry.js +1 -1
- package/dist/esm/co-bottom-sheet.entry.js +3 -3
- package/dist/esm/co-breadcrumb-item.entry.js +2 -2
- package/dist/esm/co-breadcrumb.entry.js +1 -1
- package/dist/esm/co-button-group.entry.js +2 -2
- package/dist/esm/co-button.entry.js +12 -5
- package/dist/esm/co-calendar-month_2.entry.js +1598 -0
- package/dist/esm/co-calendar_3.entry.js +9 -9
- package/dist/esm/co-card.entry.js +2 -2
- package/dist/esm/co-carousel-item.entry.js +1 -1
- package/dist/esm/co-carousel.entry.js +3 -3
- package/dist/esm/co-checkbox.entry.js +4 -4
- package/dist/esm/co-chip_2.entry.js +95 -6
- package/dist/esm/co-color-picker.entry.js +2 -2
- package/dist/esm/co-column-picker.entry.js +2 -2
- package/dist/esm/co-data-table-pagination.entry.js +4 -4
- package/dist/esm/co-data-table.entry.js +1 -1
- package/dist/esm/co-date-picker.entry.js +1 -1
- package/dist/esm/co-date-range-picker.entry.js +2 -2
- package/dist/esm/co-date-range.entry.js +1 -1
- package/dist/esm/co-date-time-picker.entry.js +407 -0
- package/dist/esm/co-drive-card.entry.js +1 -1
- package/dist/esm/co-drop-zone.entry.js +1 -1
- package/dist/esm/co-empty-state.entry.js +2 -2
- package/dist/esm/co-event-calendar.entry.js +120 -19
- package/dist/esm/co-event-popover.entry.js +130 -0
- package/dist/esm/co-fab.entry.js +2 -2
- package/dist/esm/co-file-field.entry.js +5 -5
- package/dist/esm/co-file-type-tile.entry.js +2 -2
- package/dist/esm/co-helper-text.entry.js +2 -2
- package/dist/esm/co-icon-button.entry.js +1 -1
- package/dist/esm/co-icon.entry.js +2 -2
- package/dist/esm/co-json-field.entry.js +3 -3
- package/dist/esm/co-lightbox.entry.js +5 -5
- package/dist/esm/co-list-footer.entry.js +1 -1
- package/dist/esm/co-list-item.entry.js +4 -4
- package/dist/esm/co-media-thumb.entry.js +2 -2
- package/dist/esm/co-menu-divider.entry.js +1 -1
- package/dist/esm/co-menu-item.entry.js +2 -2
- package/dist/esm/co-menu.entry.js +1 -1
- package/dist/esm/co-modal.entry.js +2 -2
- package/dist/esm/co-navbar.entry.js +2 -2
- package/dist/esm/co-number-field.entry.js +2 -2
- package/dist/esm/co-overlay.entry.js +1 -1
- package/dist/esm/co-page-header.entry.js +1 -1
- package/dist/esm/co-phone-field.entry.js +1 -1
- package/dist/esm/co-popover.entry.js +1 -1
- package/dist/esm/co-progress-bar.entry.js +2 -2
- package/dist/esm/co-progress-circle.entry.js +2 -2
- package/dist/esm/co-provider-logo_2.entry.js +69 -0
- package/dist/esm/co-radio.entry.js +3 -3
- package/dist/esm/co-rating.entry.js +3 -3
- package/dist/esm/co-ref-field.entry.js +6 -2
- package/dist/esm/co-rich-text-editor.entry.js +4 -4
- package/dist/esm/co-rich-text-toolbar.entry.js +1 -1
- package/dist/esm/co-row.entry.js +2 -2
- package/dist/esm/co-select.entry.js +1 -1
- package/dist/esm/co-separator.entry.js +1 -1
- package/dist/esm/co-sidebar-nav.entry.js +12 -2
- package/dist/esm/co-sidebar.entry.js +2 -2
- package/dist/esm/co-slider.entry.js +2 -2
- package/dist/esm/co-switch.entry.js +3 -3
- package/dist/esm/co-tab-group.entry.js +19 -3
- package/dist/esm/co-tab.entry.js +2 -2
- package/dist/esm/co-tags-field.entry.js +5 -5
- package/dist/esm/co-textarea.entry.js +4 -4
- package/dist/esm/co-toggle-button-group.entry.js +2 -2
- package/dist/esm/co-toggle-button.entry.js +2 -2
- package/dist/esm/co-video.entry.js +2 -2
- package/dist/esm/cobalt.js +1 -1
- package/dist/esm/{dateI18n-C1DCLOEl.js → dateI18n-CnNpoKwg.js} +21 -0
- package/dist/esm/{dates-tPYikBRJ.js → dates-BU7SQCje.js} +64 -13
- package/dist/esm/index-BCEz3S-z.js +28 -12
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{positioning-C2mZ7x_Y.js → positioning-BMdapAL8.js} +10 -0
- package/dist/esm/time-CF8OB_TM.js +37 -0
- package/dist/esm/{tz-B6JZk8fL.js → tz-1EK-COrb.js} +1 -1
- package/dist/types/components/co-action-bar/co-action-bar.d.ts +66 -0
- package/dist/types/components/co-audio-player/co-audio-player.d.ts +62 -0
- package/dist/types/components/co-audio-player/co-audio-player.utils.d.ts +11 -0
- package/dist/types/components/co-button/co-button.d.ts +18 -1
- package/dist/types/components/co-calendar-month/co-calendar-month.d.ts +33 -1
- package/dist/types/components/co-calendar-timegrid/co-calendar-timegrid.d.ts +178 -0
- package/dist/types/components/co-date-time-picker/co-date-time-picker.d.ts +131 -0
- package/dist/types/components/co-event-calendar/co-event-calendar.d.ts +61 -8
- package/dist/types/components/co-event-popover/co-event-popover.d.ts +45 -0
- package/dist/types/components/co-menu-item/co-menu-item.d.ts +3 -0
- package/dist/types/components/co-option-list/co-option-list.d.ts +23 -0
- package/dist/types/components/co-option-list/optionListLogic.d.ts +3 -0
- package/dist/types/components/co-provider-logo/co-provider-logo.d.ts +17 -0
- package/dist/types/components/co-ref-field/co-ref-field.d.ts +1 -0
- package/dist/types/components/co-tab-group/co-tab-group.d.ts +5 -0
- package/dist/types/components.d.ts +1245 -76
- package/dist/types/utils/dateI18n.d.ts +7 -0
- package/dist/types/utils/eventColor.d.ts +20 -0
- package/package.json +2 -2
- package/dist/cjs/co-calendar-month.cjs.entry.js +0 -381
- package/dist/cjs/co-skeleton.cjs.entry.js +0 -26
- package/dist/cobalt/p-037cc571.entry.js +0 -1
- package/dist/cobalt/p-0b92167a.entry.js +0 -1
- package/dist/cobalt/p-0bc5a962.entry.js +0 -1
- package/dist/cobalt/p-30c80e3a.entry.js +0 -1
- package/dist/cobalt/p-36ad3a96.entry.js +0 -1
- package/dist/cobalt/p-3ecbbe93.entry.js +0 -1
- package/dist/cobalt/p-3f1030fb.entry.js +0 -1
- package/dist/cobalt/p-3f7215e7.entry.js +0 -1
- package/dist/cobalt/p-54857f78.entry.js +0 -1
- package/dist/cobalt/p-585c132d.entry.js +0 -1
- package/dist/cobalt/p-59b114ab.entry.js +0 -1
- package/dist/cobalt/p-5d0510a5.entry.js +0 -1
- package/dist/cobalt/p-5e246304.entry.js +0 -1
- package/dist/cobalt/p-C1DCLOEl.js +0 -1
- package/dist/cobalt/p-C2mZ7x_Y.js +0 -1
- package/dist/cobalt/p-c589ae25.entry.js +0 -1
- package/dist/cobalt/p-c635417b.entry.js +0 -1
- package/dist/cobalt/p-cd28aa6d.entry.js +0 -1
- package/dist/cobalt/p-d71b800a.entry.js +0 -1
- package/dist/cobalt/p-df752f6e.entry.js +0 -1
- package/dist/cobalt/p-fffeb610.entry.js +0 -1
- package/dist/cobalt/p-tPYikBRJ.js +0 -1
- package/dist/components/p-BTa6ss5i.js +0 -1
- package/dist/components/p-C1DCLOEl.js +0 -1
- package/dist/components/p-C2mZ7x_Y.js +0 -1
- package/dist/components/p-CVeEoHr7.js +0 -1
- package/dist/components/p-CYi6V_Ss.js +0 -1
- package/dist/components/p-CuQjKAf5.js +0 -1
- package/dist/components/p-CyYF8IJE.js +0 -1
- package/dist/components/p-DKvTqEaf.js +0 -1
- package/dist/components/p-T0UfY6rA.js +0 -1
- package/dist/esm/co-calendar-month.entry.js +0 -379
- package/dist/esm/co-skeleton.entry.js +0 -24
|
@@ -0,0 +1,1079 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { RequiredMark } from "../../utils/requiredMark";
|
|
3
|
+
import { getDateStrings } from "../../utils/dateI18n";
|
|
4
|
+
import { formatDisplay } from "@prolibu-suite/cobalt-date-utils";
|
|
5
|
+
import { MINUTES_PER_DAY, getLocalTimeZone, toUtcISO, wallClockToEpoch, zonedDateKey, zonedMinutesOfDay, } from "@prolibu-suite/cobalt-calendar-utils";
|
|
6
|
+
/** Wall-clock minute assumed when the incoming value carries no time of day. */
|
|
7
|
+
const DEFAULT_MINUTES = 9 * 60;
|
|
8
|
+
/**
|
|
9
|
+
* Date + TIME picker: one field, one popover. Composes `co-popover` (floating
|
|
10
|
+
* panel, outside-click) + `co-calendar` (day grid) + a scrollable list of times
|
|
11
|
+
* beside it — the Google Calendar layout.
|
|
12
|
+
*
|
|
13
|
+
* VALUE CONTRACT — the committed `value` is a UTC ISO instant
|
|
14
|
+
* ("2026-07-25T21:30:00.000Z"), never a wall-clock string. The wall clock the
|
|
15
|
+
* user sees and edits is rendered in `timeZone` (IANA; browser zone when
|
|
16
|
+
* omitted). All ISO↔wall-clock conversion goes through the calendar engine
|
|
17
|
+
* (`@prolibu-suite/cobalt-calendar-utils`), so DST comes from the platform tz
|
|
18
|
+
* database — the same boundary `co-calendar-timegrid` uses. A date-only value
|
|
19
|
+
* ("2026-07-25") is NOT an instant: it is read as that wall-clock day in
|
|
20
|
+
* `timeZone` at {@link DEFAULT_MINUTES} (09:00), never as UTC midnight (which
|
|
21
|
+
* would shift the day west of UTC).
|
|
22
|
+
*
|
|
23
|
+
* INTERACTION (Google):
|
|
24
|
+
* - Click the field → opens. Picking a DAY commits and keeps the panel open
|
|
25
|
+
* (you almost always want to set the hour next); picking a TIME commits and
|
|
26
|
+
* closes. So there is no draft/apply step and no confirm button.
|
|
27
|
+
* - ArrowDown on the field → moves focus into the calendar grid.
|
|
28
|
+
* - The time list is a listbox: Arrow/Home/End/PageUp/PageDown move the active
|
|
29
|
+
* option, Enter/Space selects it.
|
|
30
|
+
* - Escape → closes and returns focus to the field. Outside click → closes.
|
|
31
|
+
*
|
|
32
|
+
* Escape is owned here (co-popover `closeOnEscape=false`) so focus can return to
|
|
33
|
+
* the field; outside-click stays with co-popover.
|
|
34
|
+
*
|
|
35
|
+
* @part field - The bordered trigger row
|
|
36
|
+
* @part label - The field label
|
|
37
|
+
* @part display - The button that shows the formatted value
|
|
38
|
+
* @part clear - The clear button
|
|
39
|
+
* @part helper - The helper/error text row
|
|
40
|
+
*/
|
|
41
|
+
export class CoDateTimePicker {
|
|
42
|
+
constructor() {
|
|
43
|
+
/** Committed value: UTC ISO instant ("2026-07-25T21:30:00.000Z") or null. */
|
|
44
|
+
this.value = null;
|
|
45
|
+
/** Minutes between consecutive options in the time list. */
|
|
46
|
+
this.stepMinutes = 15;
|
|
47
|
+
/** 12-hour clock (Google style). `false` renders a 24h clock. */
|
|
48
|
+
this.hour12 = true;
|
|
49
|
+
this.locale = 'es-CO';
|
|
50
|
+
/** Date part of the trigger text (tokens yyyy/yy/MMMM/MMM/MM/M/dd/d). */
|
|
51
|
+
this.displayFormat = 'd MMM yyyy';
|
|
52
|
+
this.firstDayOfWeek = 1;
|
|
53
|
+
/** Field size, mirrors co-input/co-date-field: s 28 / sm 32 / md 40 / lg 48. */
|
|
54
|
+
this.size = 'md';
|
|
55
|
+
/** `flat` strips the trigger's border/background so it reads as content. */
|
|
56
|
+
this.variant = 'default';
|
|
57
|
+
this.disabled = false;
|
|
58
|
+
this.readonly = false;
|
|
59
|
+
this.required = false;
|
|
60
|
+
this.clearable = true;
|
|
61
|
+
this.invalid = false;
|
|
62
|
+
/** Label layout: vertical (label above) or horizontal (label beside). */
|
|
63
|
+
this.layout = 'vertical';
|
|
64
|
+
/** Popover placement relative to the field. */
|
|
65
|
+
this.placement = 'bottom-start';
|
|
66
|
+
/** Whether the panel is open. */
|
|
67
|
+
this.open = false;
|
|
68
|
+
/** Max viewport width (px) that renders the panel as a bottom sheet. */
|
|
69
|
+
this.mobileBreakpoint = 600;
|
|
70
|
+
/** True when the viewport is at/under `mobileBreakpoint`. */
|
|
71
|
+
this.isMobile = false;
|
|
72
|
+
/** Minutes-of-day highlighted by the keyboard in the time list. */
|
|
73
|
+
this.activeMinutes = DEFAULT_MINUTES;
|
|
74
|
+
this.pendingFocusGrid = false;
|
|
75
|
+
this.pendingFocusTrigger = false;
|
|
76
|
+
/** 'center' when the list is (re)opened, 'nearest' while arrowing through it. */
|
|
77
|
+
this.pendingScroll = null;
|
|
78
|
+
this.mqlHandler = (e) => {
|
|
79
|
+
this.isMobile = e.matches;
|
|
80
|
+
};
|
|
81
|
+
// ── Trigger ────────────────────────────────────────────────
|
|
82
|
+
this.onTriggerKeyDown = (e) => {
|
|
83
|
+
if (e.key !== 'ArrowDown')
|
|
84
|
+
return;
|
|
85
|
+
e.preventDefault();
|
|
86
|
+
if (this.disabled || this.readonly)
|
|
87
|
+
return;
|
|
88
|
+
if (!this.open)
|
|
89
|
+
this.setOpen(true);
|
|
90
|
+
this.pendingFocusGrid = true;
|
|
91
|
+
if (this.calendarEl)
|
|
92
|
+
this.focusGridSoon();
|
|
93
|
+
};
|
|
94
|
+
this.onClearClick = (e) => {
|
|
95
|
+
// The clear button lives INSIDE co-popover's trigger box, which toggles the
|
|
96
|
+
// panel on any click it sees — clearing must not open/close it.
|
|
97
|
+
e.stopPropagation();
|
|
98
|
+
if (this.disabled || this.readonly)
|
|
99
|
+
return;
|
|
100
|
+
this.value = null;
|
|
101
|
+
this.coClear.emit();
|
|
102
|
+
this.coChange.emit(null);
|
|
103
|
+
};
|
|
104
|
+
// ── Calendar / time list ───────────────────────────────────
|
|
105
|
+
this.onCalendarSelect = (e) => {
|
|
106
|
+
var _a, _b;
|
|
107
|
+
const dayKey = e.detail;
|
|
108
|
+
if (!dayKey)
|
|
109
|
+
return;
|
|
110
|
+
// Google behaviour: the day commits but the panel STAYS open so the hour can
|
|
111
|
+
// be picked next. The previously chosen hour is preserved (09:00 if none).
|
|
112
|
+
const minutes = (_b = (_a = this.parts) === null || _a === void 0 ? void 0 : _a.minutes) !== null && _b !== void 0 ? _b : DEFAULT_MINUTES;
|
|
113
|
+
this.commit(dayKey, minutes);
|
|
114
|
+
this.activeMinutes = minutes;
|
|
115
|
+
this.pendingScroll = 'center';
|
|
116
|
+
};
|
|
117
|
+
this.pickTime = (minutes) => {
|
|
118
|
+
var _a, _b;
|
|
119
|
+
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
|
+
this.commit(dayKey, minutes);
|
|
121
|
+
this.activeMinutes = minutes;
|
|
122
|
+
// Picking the hour is the terminal step → apply and close.
|
|
123
|
+
this.setOpen(false);
|
|
124
|
+
this.pendingFocusTrigger = true;
|
|
125
|
+
};
|
|
126
|
+
this.onListKeyDown = (e) => {
|
|
127
|
+
const opts = this.options;
|
|
128
|
+
const hourStep = Math.max(1, Math.round(60 / this.step));
|
|
129
|
+
let i = opts.indexOf(this.activeMinutes);
|
|
130
|
+
if (i < 0)
|
|
131
|
+
i = 0;
|
|
132
|
+
switch (e.key) {
|
|
133
|
+
case 'ArrowDown':
|
|
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';
|
|
162
|
+
};
|
|
163
|
+
// ── Popover lifecycle ──────────────────────────────────────
|
|
164
|
+
this.onPopoverOpen = () => {
|
|
165
|
+
var _a, _b;
|
|
166
|
+
if (this.disabled || this.readonly) {
|
|
167
|
+
// co-popover toggles itself on trigger click; a non-interactive field must
|
|
168
|
+
// not open, so push it back closed instead of mirroring the state.
|
|
169
|
+
(_b = (_a = this.popoverEl) === null || _a === void 0 ? void 0 : _a.hide) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
if (!this.open) {
|
|
173
|
+
this.open = true; // triggers @Watch('open') → active hour + scroll
|
|
174
|
+
this.coOpen.emit();
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
this.onPopoverClose = () => {
|
|
178
|
+
if (this.open) {
|
|
179
|
+
this.open = false;
|
|
180
|
+
this.coClose.emit();
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
this.onRootKeyDown = (e) => {
|
|
184
|
+
if (e.key === 'Escape' && this.open) {
|
|
185
|
+
e.stopPropagation();
|
|
186
|
+
this.setOpen(false);
|
|
187
|
+
this.pendingFocusTrigger = true;
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
connectedCallback() {
|
|
192
|
+
// Guarded: jsdom-style hosts (unit tests, SSR shims) have no matchMedia —
|
|
193
|
+
// the desktop popover is the right fallback there.
|
|
194
|
+
if (typeof window.matchMedia !== 'function')
|
|
195
|
+
return;
|
|
196
|
+
this.mql = window.matchMedia(`(max-width: ${this.mobileBreakpoint}px)`);
|
|
197
|
+
this.isMobile = this.mql.matches;
|
|
198
|
+
this.mql.addEventListener('change', this.mqlHandler);
|
|
199
|
+
}
|
|
200
|
+
disconnectedCallback() {
|
|
201
|
+
var _a;
|
|
202
|
+
(_a = this.mql) === null || _a === void 0 ? void 0 : _a.removeEventListener('change', this.mqlHandler);
|
|
203
|
+
}
|
|
204
|
+
onOpenChange(next) {
|
|
205
|
+
var _a, _b;
|
|
206
|
+
if (!next)
|
|
207
|
+
return;
|
|
208
|
+
// Opening: highlight (and scroll to) the committed hour, 09:00 when empty.
|
|
209
|
+
this.activeMinutes = (_b = (_a = this.parts) === null || _a === void 0 ? void 0 : _a.minutes) !== null && _b !== void 0 ? _b : DEFAULT_MINUTES;
|
|
210
|
+
this.pendingScroll = 'center';
|
|
211
|
+
}
|
|
212
|
+
// ── Derived value ──────────────────────────────────────────
|
|
213
|
+
get zone() {
|
|
214
|
+
return this.timeZone || getLocalTimeZone();
|
|
215
|
+
}
|
|
216
|
+
get isInvalid() {
|
|
217
|
+
return this.invalid;
|
|
218
|
+
}
|
|
219
|
+
/** Wall clock of the committed value in `zone`, or null when empty/invalid. */
|
|
220
|
+
get parts() {
|
|
221
|
+
const v = this.value;
|
|
222
|
+
if (!v)
|
|
223
|
+
return null;
|
|
224
|
+
// Date-only: a calendar day, not an instant (see the class doc).
|
|
225
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(v))
|
|
226
|
+
return { dayKey: v, minutes: DEFAULT_MINUTES };
|
|
227
|
+
try {
|
|
228
|
+
return { dayKey: zonedDateKey(v, this.zone), minutes: zonedMinutesOfDay(v, this.zone) };
|
|
229
|
+
}
|
|
230
|
+
catch (_a) {
|
|
231
|
+
return null;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
/** Calendar bounds are date-only; accept an instant and reduce it to its day. */
|
|
235
|
+
dayBound(v) {
|
|
236
|
+
if (!v)
|
|
237
|
+
return undefined;
|
|
238
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(v))
|
|
239
|
+
return v;
|
|
240
|
+
try {
|
|
241
|
+
return zonedDateKey(v, this.zone);
|
|
242
|
+
}
|
|
243
|
+
catch (_a) {
|
|
244
|
+
return undefined;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
setOpen(next) {
|
|
248
|
+
if (this.open === next)
|
|
249
|
+
return;
|
|
250
|
+
this.open = next;
|
|
251
|
+
if (next)
|
|
252
|
+
this.coOpen.emit();
|
|
253
|
+
else
|
|
254
|
+
this.coClose.emit();
|
|
255
|
+
}
|
|
256
|
+
/** Write day+minutes as a UTC instant and notify. */
|
|
257
|
+
commit(dayKey, minutes) {
|
|
258
|
+
const [year, month, day] = dayKey.split('-').map(Number);
|
|
259
|
+
if (!year || !month || !day)
|
|
260
|
+
return;
|
|
261
|
+
const epoch = wallClockToEpoch({ year, month, day, hour: Math.floor(minutes / 60), minute: minutes % 60, second: 0 }, this.zone);
|
|
262
|
+
const iso = toUtcISO(epoch);
|
|
263
|
+
this.value = iso;
|
|
264
|
+
this.coChange.emit(iso);
|
|
265
|
+
}
|
|
266
|
+
// ── Focus / scroll bookkeeping ─────────────────────────────
|
|
267
|
+
focusGridSoon() {
|
|
268
|
+
requestAnimationFrame(() => {
|
|
269
|
+
var _a, _b;
|
|
270
|
+
(_b = (_a = this.calendarEl) === null || _a === void 0 ? void 0 : _a.focusGrid) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
271
|
+
});
|
|
272
|
+
}
|
|
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
|
+
componentDidRender() {
|
|
297
|
+
var _a;
|
|
298
|
+
if (this.pendingFocusGrid && this.open && this.calendarEl) {
|
|
299
|
+
this.pendingFocusGrid = false;
|
|
300
|
+
this.focusGridSoon();
|
|
301
|
+
}
|
|
302
|
+
if (this.pendingScroll && this.open && this.listEl) {
|
|
303
|
+
const mode = this.pendingScroll;
|
|
304
|
+
this.pendingScroll = null;
|
|
305
|
+
this.scrollActiveIntoView(mode);
|
|
306
|
+
}
|
|
307
|
+
if (this.pendingFocusTrigger) {
|
|
308
|
+
this.pendingFocusTrigger = false;
|
|
309
|
+
(_a = this.triggerBtn) === null || _a === void 0 ? void 0 : _a.focus();
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
// ── Options ────────────────────────────────────────────────
|
|
313
|
+
get step() {
|
|
314
|
+
const s = Math.round(Number(this.stepMinutes));
|
|
315
|
+
return Number.isFinite(s) && s > 0 ? Math.min(720, s) : 15;
|
|
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
|
+
// ── Render ─────────────────────────────────────────────────
|
|
324
|
+
renderTrigger(t) {
|
|
325
|
+
const p = this.parts;
|
|
326
|
+
const text = p
|
|
327
|
+
? `${formatDisplay(p.dayKey, this.displayFormat, this.locale)}, ${clockLabel(p.minutes, this.locale, this.hour12)}`
|
|
328
|
+
: '';
|
|
329
|
+
const showClear = this.clearable && !!p && !this.disabled && !this.readonly;
|
|
330
|
+
return (h("div", { class: {
|
|
331
|
+
'co-date-time-picker__field': true,
|
|
332
|
+
'co-date-time-picker__field--disabled': this.disabled,
|
|
333
|
+
'co-date-time-picker__field--readonly': this.readonly,
|
|
334
|
+
'co-date-time-picker__field--invalid': this.isInvalid,
|
|
335
|
+
[`co-date-time-picker__field--${this.size}`]: true,
|
|
336
|
+
}, part: "field" }, h("co-icon", { name: "calendar", size: 16, class: "co-date-time-picker__icon" }), h("button", { ref: (el) => (this.triggerBtn = el), type: "button", class: "co-date-time-picker__display", disabled: this.disabled, "aria-haspopup": "dialog", "aria-expanded": this.open ? 'true' : 'false', "aria-invalid": this.isInvalid ? 'true' : 'false', "aria-label": !this.label ? t.dateLabel : undefined, onKeyDown: this.onTriggerKeyDown, onFocus: () => this.coFocus.emit(), onBlur: () => this.coBlur.emit(), part: "display" }, text ? (h("span", { class: "co-date-time-picker__text" }, text)) : (h("span", { class: "co-date-time-picker__placeholder" }, this.placeholder || t.setDateTime))), this.clearable && (h("button", { class: {
|
|
337
|
+
'co-date-time-picker__clear': true,
|
|
338
|
+
'co-date-time-picker__clear--hidden': !showClear,
|
|
339
|
+
}, 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
|
+
}
|
|
341
|
+
renderPanel(t, touch) {
|
|
342
|
+
var _a, _b, _c, _d;
|
|
343
|
+
const selected = (_b = (_a = this.parts) === null || _a === void 0 ? void 0 : _a.minutes) !== null && _b !== void 0 ? _b : null;
|
|
344
|
+
return (h("div", { class: {
|
|
345
|
+
'co-date-time-picker__panel': true,
|
|
346
|
+
'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: (_d = (_c = this.parts) === null || _c === void 0 ? void 0 : _c.dayKey) !== null && _d !== void 0 ? _d : 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", { ref: (el) => (this.listEl = el), class: "co-date-time-picker__times", role: "listbox", tabIndex: 0, "aria-label": t.timeLabel, "aria-activedescendant": `co-dtp-time-${this.activeMinutes}`, onKeyDown: this.onListKeyDown }, this.options.map((m) => (h("div", { key: m, id: `co-dtp-time-${m}`, role: "option", "aria-selected": m === selected ? 'true' : 'false', "data-active": m === this.activeMinutes ? 'true' : undefined, class: {
|
|
348
|
+
'co-date-time-picker__time': true,
|
|
349
|
+
'co-date-time-picker__time--selected': m === selected,
|
|
350
|
+
'co-date-time-picker__time--active': m === this.activeMinutes,
|
|
351
|
+
}, onClick: () => this.pickTime(m) }, clockLabel(m, this.locale, this.hour12)))))));
|
|
352
|
+
}
|
|
353
|
+
renderHelper() {
|
|
354
|
+
const helper = this.isInvalid ? this.errorMessage : this.helperText;
|
|
355
|
+
if (!helper)
|
|
356
|
+
return null;
|
|
357
|
+
return (h("div", { class: {
|
|
358
|
+
'co-date-time-picker__helper': true,
|
|
359
|
+
'co-date-time-picker__helper--error': this.isInvalid,
|
|
360
|
+
}, part: "helper" }, this.isInvalid && h("co-icon", { name: "warning-circle", size: 14 }), h("span", null, helper)));
|
|
361
|
+
}
|
|
362
|
+
renderLabel() {
|
|
363
|
+
if (!this.label)
|
|
364
|
+
return null;
|
|
365
|
+
return (h("label", { class: "co-date-time-picker__label", part: "label" }, this.label, h(RequiredMark, { required: this.required })));
|
|
366
|
+
}
|
|
367
|
+
render() {
|
|
368
|
+
var _a;
|
|
369
|
+
const t = getDateStrings(this.locale);
|
|
370
|
+
return (h("div", { key: '45d0284c91912bd5ee6f2c6a348611e0ef7c0dfc', class: "co-date-time-picker", onKeyDown: this.onRootKeyDown }, this.renderLabel(), this.isMobile ? ([
|
|
371
|
+
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: () => this.setOpen(false) }, h("div", { class: "co-date-time-picker__sheet" }, this.renderPanel(t, true))),
|
|
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: '1afc6190afea10f2dc7c9a04ed2624cc3a80e0f5', type: "hidden", name: this.name, value: (_a = this.value) !== null && _a !== void 0 ? _a : '' }), this.renderHelper()));
|
|
374
|
+
}
|
|
375
|
+
static get is() { return "co-date-time-picker"; }
|
|
376
|
+
static get encapsulation() { return "shadow"; }
|
|
377
|
+
static get originalStyleUrls() {
|
|
378
|
+
return {
|
|
379
|
+
"$": ["co-date-time-picker.css"]
|
|
380
|
+
};
|
|
381
|
+
}
|
|
382
|
+
static get styleUrls() {
|
|
383
|
+
return {
|
|
384
|
+
"$": ["co-date-time-picker.css"]
|
|
385
|
+
};
|
|
386
|
+
}
|
|
387
|
+
static get properties() {
|
|
388
|
+
return {
|
|
389
|
+
"value": {
|
|
390
|
+
"type": "string",
|
|
391
|
+
"mutable": true,
|
|
392
|
+
"complexType": {
|
|
393
|
+
"original": "string | null",
|
|
394
|
+
"resolved": "null | string",
|
|
395
|
+
"references": {}
|
|
396
|
+
},
|
|
397
|
+
"required": false,
|
|
398
|
+
"optional": false,
|
|
399
|
+
"docs": {
|
|
400
|
+
"tags": [],
|
|
401
|
+
"text": "Committed value: UTC ISO instant (\"2026-07-25T21:30:00.000Z\") or null."
|
|
402
|
+
},
|
|
403
|
+
"getter": false,
|
|
404
|
+
"setter": false,
|
|
405
|
+
"reflect": false,
|
|
406
|
+
"attribute": "value",
|
|
407
|
+
"defaultValue": "null"
|
|
408
|
+
},
|
|
409
|
+
"timeZone": {
|
|
410
|
+
"type": "string",
|
|
411
|
+
"mutable": false,
|
|
412
|
+
"complexType": {
|
|
413
|
+
"original": "string",
|
|
414
|
+
"resolved": "string | undefined",
|
|
415
|
+
"references": {}
|
|
416
|
+
},
|
|
417
|
+
"required": false,
|
|
418
|
+
"optional": true,
|
|
419
|
+
"docs": {
|
|
420
|
+
"tags": [],
|
|
421
|
+
"text": "IANA zone the wall clock is rendered in. Defaults to the browser zone."
|
|
422
|
+
},
|
|
423
|
+
"getter": false,
|
|
424
|
+
"setter": false,
|
|
425
|
+
"reflect": false,
|
|
426
|
+
"attribute": "time-zone"
|
|
427
|
+
},
|
|
428
|
+
"stepMinutes": {
|
|
429
|
+
"type": "number",
|
|
430
|
+
"mutable": false,
|
|
431
|
+
"complexType": {
|
|
432
|
+
"original": "number",
|
|
433
|
+
"resolved": "number",
|
|
434
|
+
"references": {}
|
|
435
|
+
},
|
|
436
|
+
"required": false,
|
|
437
|
+
"optional": false,
|
|
438
|
+
"docs": {
|
|
439
|
+
"tags": [],
|
|
440
|
+
"text": "Minutes between consecutive options in the time list."
|
|
441
|
+
},
|
|
442
|
+
"getter": false,
|
|
443
|
+
"setter": false,
|
|
444
|
+
"reflect": false,
|
|
445
|
+
"attribute": "step-minutes",
|
|
446
|
+
"defaultValue": "15"
|
|
447
|
+
},
|
|
448
|
+
"hour12": {
|
|
449
|
+
"type": "boolean",
|
|
450
|
+
"mutable": false,
|
|
451
|
+
"complexType": {
|
|
452
|
+
"original": "boolean",
|
|
453
|
+
"resolved": "boolean",
|
|
454
|
+
"references": {}
|
|
455
|
+
},
|
|
456
|
+
"required": false,
|
|
457
|
+
"optional": false,
|
|
458
|
+
"docs": {
|
|
459
|
+
"tags": [],
|
|
460
|
+
"text": "12-hour clock (Google style). `false` renders a 24h clock."
|
|
461
|
+
},
|
|
462
|
+
"getter": false,
|
|
463
|
+
"setter": false,
|
|
464
|
+
"reflect": false,
|
|
465
|
+
"attribute": "hour-1-2",
|
|
466
|
+
"defaultValue": "true"
|
|
467
|
+
},
|
|
468
|
+
"min": {
|
|
469
|
+
"type": "string",
|
|
470
|
+
"mutable": false,
|
|
471
|
+
"complexType": {
|
|
472
|
+
"original": "string",
|
|
473
|
+
"resolved": "string | undefined",
|
|
474
|
+
"references": {}
|
|
475
|
+
},
|
|
476
|
+
"required": false,
|
|
477
|
+
"optional": true,
|
|
478
|
+
"docs": {
|
|
479
|
+
"tags": [],
|
|
480
|
+
"text": "Earliest selectable day. Date-only \"YYYY-MM-DD\" or an instant."
|
|
481
|
+
},
|
|
482
|
+
"getter": false,
|
|
483
|
+
"setter": false,
|
|
484
|
+
"reflect": false,
|
|
485
|
+
"attribute": "min"
|
|
486
|
+
},
|
|
487
|
+
"max": {
|
|
488
|
+
"type": "string",
|
|
489
|
+
"mutable": false,
|
|
490
|
+
"complexType": {
|
|
491
|
+
"original": "string",
|
|
492
|
+
"resolved": "string | undefined",
|
|
493
|
+
"references": {}
|
|
494
|
+
},
|
|
495
|
+
"required": false,
|
|
496
|
+
"optional": true,
|
|
497
|
+
"docs": {
|
|
498
|
+
"tags": [],
|
|
499
|
+
"text": "Latest selectable day. Date-only \"YYYY-MM-DD\" or an instant."
|
|
500
|
+
},
|
|
501
|
+
"getter": false,
|
|
502
|
+
"setter": false,
|
|
503
|
+
"reflect": false,
|
|
504
|
+
"attribute": "max"
|
|
505
|
+
},
|
|
506
|
+
"disabledDates": {
|
|
507
|
+
"type": "string",
|
|
508
|
+
"mutable": false,
|
|
509
|
+
"complexType": {
|
|
510
|
+
"original": "string[] | string",
|
|
511
|
+
"resolved": "string | string[] | undefined",
|
|
512
|
+
"references": {}
|
|
513
|
+
},
|
|
514
|
+
"required": false,
|
|
515
|
+
"optional": true,
|
|
516
|
+
"docs": {
|
|
517
|
+
"tags": [],
|
|
518
|
+
"text": ""
|
|
519
|
+
},
|
|
520
|
+
"getter": false,
|
|
521
|
+
"setter": false,
|
|
522
|
+
"reflect": false,
|
|
523
|
+
"attribute": "disabled-dates"
|
|
524
|
+
},
|
|
525
|
+
"disabledDaysOfWeek": {
|
|
526
|
+
"type": "string",
|
|
527
|
+
"mutable": false,
|
|
528
|
+
"complexType": {
|
|
529
|
+
"original": "number[] | string",
|
|
530
|
+
"resolved": "number[] | string | undefined",
|
|
531
|
+
"references": {}
|
|
532
|
+
},
|
|
533
|
+
"required": false,
|
|
534
|
+
"optional": true,
|
|
535
|
+
"docs": {
|
|
536
|
+
"tags": [],
|
|
537
|
+
"text": ""
|
|
538
|
+
},
|
|
539
|
+
"getter": false,
|
|
540
|
+
"setter": false,
|
|
541
|
+
"reflect": false,
|
|
542
|
+
"attribute": "disabled-days-of-week"
|
|
543
|
+
},
|
|
544
|
+
"locale": {
|
|
545
|
+
"type": "string",
|
|
546
|
+
"mutable": false,
|
|
547
|
+
"complexType": {
|
|
548
|
+
"original": "string",
|
|
549
|
+
"resolved": "string",
|
|
550
|
+
"references": {}
|
|
551
|
+
},
|
|
552
|
+
"required": false,
|
|
553
|
+
"optional": false,
|
|
554
|
+
"docs": {
|
|
555
|
+
"tags": [],
|
|
556
|
+
"text": ""
|
|
557
|
+
},
|
|
558
|
+
"getter": false,
|
|
559
|
+
"setter": false,
|
|
560
|
+
"reflect": false,
|
|
561
|
+
"attribute": "locale",
|
|
562
|
+
"defaultValue": "'es-CO'"
|
|
563
|
+
},
|
|
564
|
+
"displayFormat": {
|
|
565
|
+
"type": "string",
|
|
566
|
+
"mutable": false,
|
|
567
|
+
"complexType": {
|
|
568
|
+
"original": "string",
|
|
569
|
+
"resolved": "string",
|
|
570
|
+
"references": {}
|
|
571
|
+
},
|
|
572
|
+
"required": false,
|
|
573
|
+
"optional": false,
|
|
574
|
+
"docs": {
|
|
575
|
+
"tags": [],
|
|
576
|
+
"text": "Date part of the trigger text (tokens yyyy/yy/MMMM/MMM/MM/M/dd/d)."
|
|
577
|
+
},
|
|
578
|
+
"getter": false,
|
|
579
|
+
"setter": false,
|
|
580
|
+
"reflect": false,
|
|
581
|
+
"attribute": "display-format",
|
|
582
|
+
"defaultValue": "'d MMM yyyy'"
|
|
583
|
+
},
|
|
584
|
+
"firstDayOfWeek": {
|
|
585
|
+
"type": "number",
|
|
586
|
+
"mutable": false,
|
|
587
|
+
"complexType": {
|
|
588
|
+
"original": "number",
|
|
589
|
+
"resolved": "number",
|
|
590
|
+
"references": {}
|
|
591
|
+
},
|
|
592
|
+
"required": false,
|
|
593
|
+
"optional": false,
|
|
594
|
+
"docs": {
|
|
595
|
+
"tags": [],
|
|
596
|
+
"text": ""
|
|
597
|
+
},
|
|
598
|
+
"getter": false,
|
|
599
|
+
"setter": false,
|
|
600
|
+
"reflect": false,
|
|
601
|
+
"attribute": "first-day-of-week",
|
|
602
|
+
"defaultValue": "1"
|
|
603
|
+
},
|
|
604
|
+
"label": {
|
|
605
|
+
"type": "string",
|
|
606
|
+
"mutable": false,
|
|
607
|
+
"complexType": {
|
|
608
|
+
"original": "string",
|
|
609
|
+
"resolved": "string | undefined",
|
|
610
|
+
"references": {}
|
|
611
|
+
},
|
|
612
|
+
"required": false,
|
|
613
|
+
"optional": true,
|
|
614
|
+
"docs": {
|
|
615
|
+
"tags": [],
|
|
616
|
+
"text": ""
|
|
617
|
+
},
|
|
618
|
+
"getter": false,
|
|
619
|
+
"setter": false,
|
|
620
|
+
"reflect": false,
|
|
621
|
+
"attribute": "label"
|
|
622
|
+
},
|
|
623
|
+
"placeholder": {
|
|
624
|
+
"type": "string",
|
|
625
|
+
"mutable": false,
|
|
626
|
+
"complexType": {
|
|
627
|
+
"original": "string",
|
|
628
|
+
"resolved": "string | undefined",
|
|
629
|
+
"references": {}
|
|
630
|
+
},
|
|
631
|
+
"required": false,
|
|
632
|
+
"optional": true,
|
|
633
|
+
"docs": {
|
|
634
|
+
"tags": [],
|
|
635
|
+
"text": ""
|
|
636
|
+
},
|
|
637
|
+
"getter": false,
|
|
638
|
+
"setter": false,
|
|
639
|
+
"reflect": false,
|
|
640
|
+
"attribute": "placeholder"
|
|
641
|
+
},
|
|
642
|
+
"size": {
|
|
643
|
+
"type": "string",
|
|
644
|
+
"mutable": false,
|
|
645
|
+
"complexType": {
|
|
646
|
+
"original": "'s' | 'sm' | 'md' | 'lg'",
|
|
647
|
+
"resolved": "\"lg\" | \"md\" | \"s\" | \"sm\"",
|
|
648
|
+
"references": {}
|
|
649
|
+
},
|
|
650
|
+
"required": false,
|
|
651
|
+
"optional": false,
|
|
652
|
+
"docs": {
|
|
653
|
+
"tags": [],
|
|
654
|
+
"text": "Field size, mirrors co-input/co-date-field: s 28 / sm 32 / md 40 / lg 48."
|
|
655
|
+
},
|
|
656
|
+
"getter": false,
|
|
657
|
+
"setter": false,
|
|
658
|
+
"reflect": true,
|
|
659
|
+
"attribute": "size",
|
|
660
|
+
"defaultValue": "'md'"
|
|
661
|
+
},
|
|
662
|
+
"variant": {
|
|
663
|
+
"type": "string",
|
|
664
|
+
"mutable": false,
|
|
665
|
+
"complexType": {
|
|
666
|
+
"original": "'default' | 'flat'",
|
|
667
|
+
"resolved": "\"default\" | \"flat\"",
|
|
668
|
+
"references": {}
|
|
669
|
+
},
|
|
670
|
+
"required": false,
|
|
671
|
+
"optional": false,
|
|
672
|
+
"docs": {
|
|
673
|
+
"tags": [],
|
|
674
|
+
"text": "`flat` strips the trigger's border/background so it reads as content."
|
|
675
|
+
},
|
|
676
|
+
"getter": false,
|
|
677
|
+
"setter": false,
|
|
678
|
+
"reflect": true,
|
|
679
|
+
"attribute": "variant",
|
|
680
|
+
"defaultValue": "'default'"
|
|
681
|
+
},
|
|
682
|
+
"name": {
|
|
683
|
+
"type": "string",
|
|
684
|
+
"mutable": false,
|
|
685
|
+
"complexType": {
|
|
686
|
+
"original": "string",
|
|
687
|
+
"resolved": "string | undefined",
|
|
688
|
+
"references": {}
|
|
689
|
+
},
|
|
690
|
+
"required": false,
|
|
691
|
+
"optional": true,
|
|
692
|
+
"docs": {
|
|
693
|
+
"tags": [],
|
|
694
|
+
"text": ""
|
|
695
|
+
},
|
|
696
|
+
"getter": false,
|
|
697
|
+
"setter": false,
|
|
698
|
+
"reflect": false,
|
|
699
|
+
"attribute": "name"
|
|
700
|
+
},
|
|
701
|
+
"disabled": {
|
|
702
|
+
"type": "boolean",
|
|
703
|
+
"mutable": false,
|
|
704
|
+
"complexType": {
|
|
705
|
+
"original": "boolean",
|
|
706
|
+
"resolved": "boolean",
|
|
707
|
+
"references": {}
|
|
708
|
+
},
|
|
709
|
+
"required": false,
|
|
710
|
+
"optional": false,
|
|
711
|
+
"docs": {
|
|
712
|
+
"tags": [],
|
|
713
|
+
"text": ""
|
|
714
|
+
},
|
|
715
|
+
"getter": false,
|
|
716
|
+
"setter": false,
|
|
717
|
+
"reflect": false,
|
|
718
|
+
"attribute": "disabled",
|
|
719
|
+
"defaultValue": "false"
|
|
720
|
+
},
|
|
721
|
+
"readonly": {
|
|
722
|
+
"type": "boolean",
|
|
723
|
+
"mutable": false,
|
|
724
|
+
"complexType": {
|
|
725
|
+
"original": "boolean",
|
|
726
|
+
"resolved": "boolean",
|
|
727
|
+
"references": {}
|
|
728
|
+
},
|
|
729
|
+
"required": false,
|
|
730
|
+
"optional": false,
|
|
731
|
+
"docs": {
|
|
732
|
+
"tags": [],
|
|
733
|
+
"text": ""
|
|
734
|
+
},
|
|
735
|
+
"getter": false,
|
|
736
|
+
"setter": false,
|
|
737
|
+
"reflect": false,
|
|
738
|
+
"attribute": "readonly",
|
|
739
|
+
"defaultValue": "false"
|
|
740
|
+
},
|
|
741
|
+
"required": {
|
|
742
|
+
"type": "boolean",
|
|
743
|
+
"mutable": false,
|
|
744
|
+
"complexType": {
|
|
745
|
+
"original": "boolean",
|
|
746
|
+
"resolved": "boolean",
|
|
747
|
+
"references": {}
|
|
748
|
+
},
|
|
749
|
+
"required": false,
|
|
750
|
+
"optional": false,
|
|
751
|
+
"docs": {
|
|
752
|
+
"tags": [],
|
|
753
|
+
"text": ""
|
|
754
|
+
},
|
|
755
|
+
"getter": false,
|
|
756
|
+
"setter": false,
|
|
757
|
+
"reflect": false,
|
|
758
|
+
"attribute": "required",
|
|
759
|
+
"defaultValue": "false"
|
|
760
|
+
},
|
|
761
|
+
"clearable": {
|
|
762
|
+
"type": "boolean",
|
|
763
|
+
"mutable": false,
|
|
764
|
+
"complexType": {
|
|
765
|
+
"original": "boolean",
|
|
766
|
+
"resolved": "boolean",
|
|
767
|
+
"references": {}
|
|
768
|
+
},
|
|
769
|
+
"required": false,
|
|
770
|
+
"optional": false,
|
|
771
|
+
"docs": {
|
|
772
|
+
"tags": [],
|
|
773
|
+
"text": ""
|
|
774
|
+
},
|
|
775
|
+
"getter": false,
|
|
776
|
+
"setter": false,
|
|
777
|
+
"reflect": false,
|
|
778
|
+
"attribute": "clearable",
|
|
779
|
+
"defaultValue": "true"
|
|
780
|
+
},
|
|
781
|
+
"invalid": {
|
|
782
|
+
"type": "boolean",
|
|
783
|
+
"mutable": false,
|
|
784
|
+
"complexType": {
|
|
785
|
+
"original": "boolean",
|
|
786
|
+
"resolved": "boolean",
|
|
787
|
+
"references": {}
|
|
788
|
+
},
|
|
789
|
+
"required": false,
|
|
790
|
+
"optional": false,
|
|
791
|
+
"docs": {
|
|
792
|
+
"tags": [],
|
|
793
|
+
"text": ""
|
|
794
|
+
},
|
|
795
|
+
"getter": false,
|
|
796
|
+
"setter": false,
|
|
797
|
+
"reflect": false,
|
|
798
|
+
"attribute": "invalid",
|
|
799
|
+
"defaultValue": "false"
|
|
800
|
+
},
|
|
801
|
+
"errorMessage": {
|
|
802
|
+
"type": "string",
|
|
803
|
+
"mutable": false,
|
|
804
|
+
"complexType": {
|
|
805
|
+
"original": "string",
|
|
806
|
+
"resolved": "string | undefined",
|
|
807
|
+
"references": {}
|
|
808
|
+
},
|
|
809
|
+
"required": false,
|
|
810
|
+
"optional": true,
|
|
811
|
+
"docs": {
|
|
812
|
+
"tags": [],
|
|
813
|
+
"text": ""
|
|
814
|
+
},
|
|
815
|
+
"getter": false,
|
|
816
|
+
"setter": false,
|
|
817
|
+
"reflect": false,
|
|
818
|
+
"attribute": "error-message"
|
|
819
|
+
},
|
|
820
|
+
"helperText": {
|
|
821
|
+
"type": "string",
|
|
822
|
+
"mutable": false,
|
|
823
|
+
"complexType": {
|
|
824
|
+
"original": "string",
|
|
825
|
+
"resolved": "string | undefined",
|
|
826
|
+
"references": {}
|
|
827
|
+
},
|
|
828
|
+
"required": false,
|
|
829
|
+
"optional": true,
|
|
830
|
+
"docs": {
|
|
831
|
+
"tags": [],
|
|
832
|
+
"text": ""
|
|
833
|
+
},
|
|
834
|
+
"getter": false,
|
|
835
|
+
"setter": false,
|
|
836
|
+
"reflect": false,
|
|
837
|
+
"attribute": "helper-text"
|
|
838
|
+
},
|
|
839
|
+
"layout": {
|
|
840
|
+
"type": "string",
|
|
841
|
+
"mutable": false,
|
|
842
|
+
"complexType": {
|
|
843
|
+
"original": "'vertical' | 'horizontal'",
|
|
844
|
+
"resolved": "\"horizontal\" | \"vertical\"",
|
|
845
|
+
"references": {}
|
|
846
|
+
},
|
|
847
|
+
"required": false,
|
|
848
|
+
"optional": false,
|
|
849
|
+
"docs": {
|
|
850
|
+
"tags": [],
|
|
851
|
+
"text": "Label layout: vertical (label above) or horizontal (label beside)."
|
|
852
|
+
},
|
|
853
|
+
"getter": false,
|
|
854
|
+
"setter": false,
|
|
855
|
+
"reflect": true,
|
|
856
|
+
"attribute": "layout",
|
|
857
|
+
"defaultValue": "'vertical'"
|
|
858
|
+
},
|
|
859
|
+
"placement": {
|
|
860
|
+
"type": "string",
|
|
861
|
+
"mutable": false,
|
|
862
|
+
"complexType": {
|
|
863
|
+
"original": "Placement",
|
|
864
|
+
"resolved": "\"bottom\" | \"bottom-end\" | \"bottom-start\" | \"left\" | \"left-end\" | \"left-start\" | \"right\" | \"right-end\" | \"right-start\" | \"top\" | \"top-end\" | \"top-start\"",
|
|
865
|
+
"references": {
|
|
866
|
+
"Placement": {
|
|
867
|
+
"location": "import",
|
|
868
|
+
"path": "../../utils/positioning",
|
|
869
|
+
"id": "src/utils/positioning.ts::Placement",
|
|
870
|
+
"referenceLocation": "Placement"
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
},
|
|
874
|
+
"required": false,
|
|
875
|
+
"optional": false,
|
|
876
|
+
"docs": {
|
|
877
|
+
"tags": [],
|
|
878
|
+
"text": "Popover placement relative to the field."
|
|
879
|
+
},
|
|
880
|
+
"getter": false,
|
|
881
|
+
"setter": false,
|
|
882
|
+
"reflect": false,
|
|
883
|
+
"attribute": "placement",
|
|
884
|
+
"defaultValue": "'bottom-start'"
|
|
885
|
+
},
|
|
886
|
+
"open": {
|
|
887
|
+
"type": "boolean",
|
|
888
|
+
"mutable": true,
|
|
889
|
+
"complexType": {
|
|
890
|
+
"original": "boolean",
|
|
891
|
+
"resolved": "boolean",
|
|
892
|
+
"references": {}
|
|
893
|
+
},
|
|
894
|
+
"required": false,
|
|
895
|
+
"optional": false,
|
|
896
|
+
"docs": {
|
|
897
|
+
"tags": [],
|
|
898
|
+
"text": "Whether the panel is open."
|
|
899
|
+
},
|
|
900
|
+
"getter": false,
|
|
901
|
+
"setter": false,
|
|
902
|
+
"reflect": true,
|
|
903
|
+
"attribute": "open",
|
|
904
|
+
"defaultValue": "false"
|
|
905
|
+
},
|
|
906
|
+
"mobileBreakpoint": {
|
|
907
|
+
"type": "number",
|
|
908
|
+
"mutable": false,
|
|
909
|
+
"complexType": {
|
|
910
|
+
"original": "number",
|
|
911
|
+
"resolved": "number",
|
|
912
|
+
"references": {}
|
|
913
|
+
},
|
|
914
|
+
"required": false,
|
|
915
|
+
"optional": false,
|
|
916
|
+
"docs": {
|
|
917
|
+
"tags": [],
|
|
918
|
+
"text": "Max viewport width (px) that renders the panel as a bottom sheet."
|
|
919
|
+
},
|
|
920
|
+
"getter": false,
|
|
921
|
+
"setter": false,
|
|
922
|
+
"reflect": false,
|
|
923
|
+
"attribute": "mobile-breakpoint",
|
|
924
|
+
"defaultValue": "600"
|
|
925
|
+
}
|
|
926
|
+
};
|
|
927
|
+
}
|
|
928
|
+
static get states() {
|
|
929
|
+
return {
|
|
930
|
+
"isMobile": {},
|
|
931
|
+
"activeMinutes": {}
|
|
932
|
+
};
|
|
933
|
+
}
|
|
934
|
+
static get events() {
|
|
935
|
+
return [{
|
|
936
|
+
"method": "coChange",
|
|
937
|
+
"name": "coChange",
|
|
938
|
+
"bubbles": true,
|
|
939
|
+
"cancelable": true,
|
|
940
|
+
"composed": true,
|
|
941
|
+
"docs": {
|
|
942
|
+
"tags": [],
|
|
943
|
+
"text": "Committed instant (UTC ISO) or null."
|
|
944
|
+
},
|
|
945
|
+
"complexType": {
|
|
946
|
+
"original": "string | null",
|
|
947
|
+
"resolved": "null | string",
|
|
948
|
+
"references": {}
|
|
949
|
+
}
|
|
950
|
+
}, {
|
|
951
|
+
"method": "coClear",
|
|
952
|
+
"name": "coClear",
|
|
953
|
+
"bubbles": true,
|
|
954
|
+
"cancelable": true,
|
|
955
|
+
"composed": true,
|
|
956
|
+
"docs": {
|
|
957
|
+
"tags": [],
|
|
958
|
+
"text": ""
|
|
959
|
+
},
|
|
960
|
+
"complexType": {
|
|
961
|
+
"original": "void",
|
|
962
|
+
"resolved": "void",
|
|
963
|
+
"references": {}
|
|
964
|
+
}
|
|
965
|
+
}, {
|
|
966
|
+
"method": "coFocus",
|
|
967
|
+
"name": "coFocus",
|
|
968
|
+
"bubbles": true,
|
|
969
|
+
"cancelable": true,
|
|
970
|
+
"composed": true,
|
|
971
|
+
"docs": {
|
|
972
|
+
"tags": [],
|
|
973
|
+
"text": ""
|
|
974
|
+
},
|
|
975
|
+
"complexType": {
|
|
976
|
+
"original": "void",
|
|
977
|
+
"resolved": "void",
|
|
978
|
+
"references": {}
|
|
979
|
+
}
|
|
980
|
+
}, {
|
|
981
|
+
"method": "coBlur",
|
|
982
|
+
"name": "coBlur",
|
|
983
|
+
"bubbles": true,
|
|
984
|
+
"cancelable": true,
|
|
985
|
+
"composed": true,
|
|
986
|
+
"docs": {
|
|
987
|
+
"tags": [],
|
|
988
|
+
"text": ""
|
|
989
|
+
},
|
|
990
|
+
"complexType": {
|
|
991
|
+
"original": "void",
|
|
992
|
+
"resolved": "void",
|
|
993
|
+
"references": {}
|
|
994
|
+
}
|
|
995
|
+
}, {
|
|
996
|
+
"method": "coOpen",
|
|
997
|
+
"name": "coOpen",
|
|
998
|
+
"bubbles": false,
|
|
999
|
+
"cancelable": true,
|
|
1000
|
+
"composed": true,
|
|
1001
|
+
"docs": {
|
|
1002
|
+
"tags": [],
|
|
1003
|
+
"text": ""
|
|
1004
|
+
},
|
|
1005
|
+
"complexType": {
|
|
1006
|
+
"original": "void",
|
|
1007
|
+
"resolved": "void",
|
|
1008
|
+
"references": {}
|
|
1009
|
+
}
|
|
1010
|
+
}, {
|
|
1011
|
+
"method": "coClose",
|
|
1012
|
+
"name": "coClose",
|
|
1013
|
+
"bubbles": false,
|
|
1014
|
+
"cancelable": true,
|
|
1015
|
+
"composed": true,
|
|
1016
|
+
"docs": {
|
|
1017
|
+
"tags": [],
|
|
1018
|
+
"text": ""
|
|
1019
|
+
},
|
|
1020
|
+
"complexType": {
|
|
1021
|
+
"original": "void",
|
|
1022
|
+
"resolved": "void",
|
|
1023
|
+
"references": {}
|
|
1024
|
+
}
|
|
1025
|
+
}];
|
|
1026
|
+
}
|
|
1027
|
+
static get elementRef() { return "el"; }
|
|
1028
|
+
static get watchers() {
|
|
1029
|
+
return [{
|
|
1030
|
+
"propName": "open",
|
|
1031
|
+
"methodName": "onOpenChange"
|
|
1032
|
+
}];
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
// ── Module-level caches ──────────────────────────────────────
|
|
1036
|
+
// Intl.DateTimeFormat is expensive to construct and these labels are recomputed
|
|
1037
|
+
// on every render over a BOUNDED domain (≤96 minutes-of-day × 1-2 locales): the
|
|
1038
|
+
// RESULT is cached (and the formatter, for the miss). Hygiene clear at 2000
|
|
1039
|
+
// entries — unreachable in normal use, it only guards pathological iteration.
|
|
1040
|
+
const LABEL_CACHE = new Map();
|
|
1041
|
+
const LABEL_FMT_CACHE = new Map();
|
|
1042
|
+
const OPTIONS_CACHE = new Map();
|
|
1043
|
+
/** Minutes-of-day → localized clock label ("4:30 p. m." / "16:30"). */
|
|
1044
|
+
function clockLabel(minutes, locale, hour12) {
|
|
1045
|
+
const key = `${locale}|${hour12 ? 12 : 24}|${minutes}`;
|
|
1046
|
+
const hit = LABEL_CACHE.get(key);
|
|
1047
|
+
if (hit !== undefined)
|
|
1048
|
+
return hit;
|
|
1049
|
+
let fmt = LABEL_FMT_CACHE.get(`${locale}|${hour12 ? 12 : 24}`);
|
|
1050
|
+
if (!fmt) {
|
|
1051
|
+
// hour12 forced (not left to the locale): "es" bare is a 24h locale and
|
|
1052
|
+
// would render bare numbers with no am/pm marker.
|
|
1053
|
+
fmt = new Intl.DateTimeFormat(locale, Object.assign({ hour: 'numeric', minute: '2-digit' }, (hour12 ? { hour12: true } : { hourCycle: 'h23' })));
|
|
1054
|
+
LABEL_FMT_CACHE.set(`${locale}|${hour12 ? 12 : 24}`, fmt);
|
|
1055
|
+
}
|
|
1056
|
+
const out = fmt.format(new Date(2000, 0, 1, Math.floor(minutes / 60), minutes % 60));
|
|
1057
|
+
if (LABEL_CACHE.size > 2000)
|
|
1058
|
+
LABEL_CACHE.clear();
|
|
1059
|
+
LABEL_CACHE.set(key, out);
|
|
1060
|
+
return out;
|
|
1061
|
+
}
|
|
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
|
+
}
|