@prolibu-suite/cobalt-core 0.6.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 +7924 -3799
- package/dist/cjs/co-accordion.cjs.entry.js +1 -1
- package/dist/cjs/co-action-bar.cjs.entry.js +89 -0
- package/dist/cjs/co-app-shell.cjs.entry.js +3 -3
- package/dist/cjs/co-audio-player.cjs.entry.js +279 -0
- package/dist/cjs/co-autocomplete.cjs.entry.js +3 -3
- package/dist/cjs/co-avatar-group.cjs.entry.js +3 -3
- package/dist/cjs/{co-tooltip.cjs.entry.js → co-avatar_2.cjs.entry.js} +96 -4
- package/dist/cjs/co-badge.cjs.entry.js +2 -2
- package/dist/cjs/co-bottom-sheet.cjs.entry.js +4 -4
- package/dist/cjs/co-breadcrumb-item.cjs.entry.js +3 -3
- package/dist/cjs/co-breadcrumb.cjs.entry.js +2 -2
- package/dist/cjs/co-button-group.cjs.entry.js +3 -3
- package/dist/cjs/co-button.cjs.entry.js +13 -6
- package/dist/cjs/co-calendar-month_2.cjs.entry.js +1601 -0
- package/dist/cjs/co-calendar_3.cjs.entry.js +12 -12
- package/dist/cjs/co-card.cjs.entry.js +3 -3
- package/dist/cjs/co-carousel-item.cjs.entry.js +17 -0
- package/dist/cjs/co-carousel.cjs.entry.js +368 -0
- package/dist/cjs/co-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/co-checkbox.cjs.entry.js +5 -5
- package/dist/cjs/co-chip_2.cjs.entry.js +96 -7
- package/dist/cjs/co-color-picker.cjs.entry.js +5 -5
- package/dist/cjs/co-column-picker.cjs.entry.js +3 -3
- package/dist/cjs/co-combobox.cjs.entry.js +3 -3
- 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 +2 -2
- package/dist/cjs/co-date-picker.cjs.entry.js +12 -5
- package/dist/cjs/co-date-range-picker.cjs.entry.js +11 -5
- package/dist/cjs/co-date-range.cjs.entry.js +2 -2
- package/dist/cjs/co-date-time-picker.cjs.entry.js +409 -0
- 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-empty-state.cjs.entry.js +3 -3
- package/dist/cjs/co-event-calendar.cjs.entry.js +119 -18
- package/dist/cjs/co-event-popover.cjs.entry.js +132 -0
- package/dist/cjs/co-fab.cjs.entry.js +21 -6
- package/dist/cjs/co-file-field.cjs.entry.js +8 -8
- 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 +2 -2
- package/dist/cjs/co-icon.cjs.entry.js +3 -3
- package/dist/cjs/co-input.cjs.entry.js +9 -3
- package/dist/cjs/co-json-field.cjs.entry.js +6 -6
- package/dist/cjs/co-lightbox.cjs.entry.js +34 -7
- 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 +3 -3
- package/dist/cjs/co-menu.cjs.entry.js +2 -2
- package/dist/cjs/co-modal.cjs.entry.js +3 -3
- package/dist/cjs/co-navbar.cjs.entry.js +3 -3
- package/dist/cjs/co-number-field.cjs.entry.js +5 -5
- package/dist/cjs/co-overlay.cjs.entry.js +2 -2
- package/dist/cjs/co-page-header.cjs.entry.js +2 -2
- package/dist/cjs/co-phone-field.cjs.entry.js +4 -4
- package/dist/cjs/co-popover.cjs.entry.js +2 -2
- 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 +72 -0
- 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 +16 -6
- package/dist/cjs/co-rich-text-editor.cjs.entry.js +22 -7
- package/dist/cjs/co-rich-text-toolbar.cjs.entry.js +37 -5
- package/dist/cjs/co-rich-text-viewer.cjs.entry.js +36 -6
- 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 +13 -7
- package/dist/cjs/co-separator.cjs.entry.js +2 -2
- package/dist/cjs/co-sidebar-nav.cjs.entry.js +13 -3
- 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 +5 -5
- package/dist/cjs/co-tab-group.cjs.entry.js +20 -4
- package/dist/cjs/co-tab.cjs.entry.js +3 -3
- package/dist/cjs/co-tags-field.cjs.entry.js +9 -9
- package/dist/cjs/co-textarea.cjs.entry.js +13 -7
- package/dist/cjs/co-toast.cjs.entry.js +1 -1
- package/dist/cjs/co-toggle-button-group.cjs.entry.js +3 -3
- package/dist/cjs/co-toggle-button.cjs.entry.js +3 -3
- package/dist/cjs/co-transfer-list.cjs.entry.js +1 -1
- package/dist/cjs/co-video.cjs.entry.js +3 -3
- package/dist/cjs/cobalt.cjs.js +2 -2
- 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/{fieldChip-D8YJCyQF.js → fieldChip-B_npd9rL.js} +1 -1
- package/dist/cjs/{index-4y1Dm145.js → index-DFZ5YhIT.js} +171 -11
- package/dist/cjs/{index-DxEFsH_t.js → index-kBiXCEE7.js} +41 -21
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{positioning-DwHW399W.js → positioning-DCj_AJ2T.js} +10 -0
- package/dist/cjs/{requiredMark-B3pKyqYI.js → requiredMark-DuMIcKtt.js} +1 -1
- package/dist/cjs/{richTextI18n-B7ktXg3M.js → richTextI18n-B28uAhh4.js} +3 -0
- package/dist/cjs/time-LBHtzLHe.js +42 -0
- package/dist/cjs/{toolbar-config-3PlT-3zm.js → toolbar-config-BQfWTW6P.js} +2 -0
- package/dist/cobalt/cobalt.css +1 -1
- package/dist/cobalt/cobalt.esm.js +1 -1
- package/dist/cobalt/{p-075eed3d.entry.js → p-00830b8c.entry.js} +1 -1
- package/dist/cobalt/{p-cc0a4617.entry.js → p-0769eee9.entry.js} +1 -1
- package/dist/cobalt/p-0f18c4d2.entry.js +1 -0
- package/dist/cobalt/{p-5c3101b5.entry.js → p-0fc1edca.entry.js} +1 -1
- package/dist/cobalt/p-15852fec.entry.js +1 -0
- package/dist/cobalt/p-195c67ee.entry.js +1 -0
- package/dist/cobalt/{p-B6JZk8fL.js → p-1EK-COrb.js} +1 -1
- package/dist/cobalt/{p-d9608046.entry.js → p-1e9c9d46.entry.js} +1 -1
- package/dist/cobalt/{p-02c5a9a9.entry.js → p-202eadfc.entry.js} +1 -1
- package/dist/cobalt/{p-b4bed98b.entry.js → p-20bd3702.entry.js} +1 -1
- package/dist/cobalt/p-25f59046.entry.js +1 -0
- package/dist/cobalt/{p-809015dd.entry.js → p-260196cb.entry.js} +1 -1
- package/dist/cobalt/{p-771bc8fe.entry.js → p-27dce0ac.entry.js} +1 -1
- package/dist/cobalt/p-2bf44b2b.entry.js +1 -0
- package/dist/cobalt/{p-3f06d373.entry.js → p-2c100914.entry.js} +1 -1
- package/dist/cobalt/p-2e1d930f.entry.js +1 -0
- package/dist/cobalt/{p-47a2dd67.entry.js → p-35518aee.entry.js} +1 -1
- package/dist/cobalt/{p-c3462def.entry.js → p-38ae8bff.entry.js} +1 -1
- package/dist/cobalt/p-38cf47b6.entry.js +1 -0
- package/dist/cobalt/p-39dea0c0.entry.js +1 -0
- package/dist/cobalt/p-3a746267.entry.js +1 -0
- package/dist/cobalt/{p-9c6ca902.entry.js → p-3ae69426.entry.js} +1 -1
- package/dist/cobalt/{p-8dfb6886.entry.js → p-3af74ab8.entry.js} +1 -1
- package/dist/cobalt/{p-9a587867.entry.js → p-3d4e697e.entry.js} +1 -1
- package/dist/cobalt/{p-1681ce1d.entry.js → p-445acc4c.entry.js} +1 -1
- package/dist/cobalt/p-48fbf051.entry.js +1 -0
- package/dist/cobalt/p-4de9232a.entry.js +1 -0
- package/dist/cobalt/{p-fd27c2bd.entry.js → p-50bbfad8.entry.js} +1 -1
- package/dist/cobalt/{p-85eed52c.entry.js → p-51a1ad38.entry.js} +1 -1
- package/dist/cobalt/{p-1726ce07.entry.js → p-523aca9f.entry.js} +1 -1
- package/dist/cobalt/p-52af222b.entry.js +1 -0
- package/dist/cobalt/{p-81cfd951.entry.js → p-5319ac3f.entry.js} +1 -1
- package/dist/cobalt/{p-ba66584f.entry.js → p-53a276a8.entry.js} +1 -1
- package/dist/cobalt/{p-f0de4415.entry.js → p-543cc00d.entry.js} +1 -1
- package/dist/cobalt/{p-a9afbaa6.entry.js → p-59f7d44b.entry.js} +1 -1
- package/dist/cobalt/{p-e420d5c9.entry.js → p-5b984323.entry.js} +1 -1
- package/dist/cobalt/{p-e710b9ea.entry.js → p-5bfaca70.entry.js} +1 -1
- package/dist/cobalt/p-5c1328ff.entry.js +1 -0
- package/dist/cobalt/{p-0d7536a8.entry.js → p-5c250889.entry.js} +1 -1
- package/dist/cobalt/p-5e21ca17.entry.js +1 -0
- package/dist/cobalt/p-61d5ca3c.entry.js +1 -0
- package/dist/cobalt/{p-8e823c15.entry.js → p-6357d9dd.entry.js} +1 -1
- package/dist/cobalt/{p-495c9b99.entry.js → p-69723cc1.entry.js} +1 -1
- package/dist/cobalt/{p-8128e84a.entry.js → p-6985a964.entry.js} +1 -1
- package/dist/cobalt/p-69b8d98e.entry.js +1 -0
- package/dist/cobalt/p-6b089060.entry.js +1 -0
- package/dist/cobalt/{p-627d2d1a.entry.js → p-6b256d01.entry.js} +1 -1
- package/dist/cobalt/{p-c1e53e4c.entry.js → p-7c6b3175.entry.js} +1 -1
- package/dist/cobalt/p-7d077a7c.entry.js +1 -0
- package/dist/cobalt/{p-20ba59a2.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-5c43d30e.entry.js → p-8fe08257.entry.js} +1 -1
- package/dist/cobalt/p-913b2a14.entry.js +1 -0
- package/dist/cobalt/{p-2d1cbd7f.entry.js → p-959556f4.entry.js} +1 -1
- package/dist/cobalt/p-97875bde.entry.js +1 -0
- package/dist/cobalt/p-9824c478.entry.js +1 -0
- package/dist/cobalt/p-99c1ff0f.entry.js +1 -0
- package/dist/cobalt/p-BCEz3S-z.js +2 -0
- package/dist/cobalt/{p-Bgxofdfb.js → p-BL0sCfMH.js} +1 -1
- package/dist/cobalt/p-BMdapAL8.js +1 -0
- package/dist/cobalt/p-BU7SQCje.js +1 -0
- package/dist/cobalt/p-BYKAgwq3.js +1 -0
- package/dist/cobalt/p-C-d15gih.js +1 -0
- package/dist/cobalt/p-CF8OB_TM.js +1 -0
- package/dist/cobalt/p-CnNpoKwg.js +1 -0
- package/dist/cobalt/p-D5gr2ent.js +1 -0
- package/dist/cobalt/p-WeuPA9Rw.js +1 -0
- package/dist/cobalt/{p-fb251497.entry.js → p-a04feb70.entry.js} +1 -1
- package/dist/cobalt/{p-77d01b39.entry.js → p-a252f8c5.entry.js} +1 -1
- package/dist/cobalt/p-a4f39ba2.entry.js +1 -0
- package/dist/cobalt/{p-5e9a9caf.entry.js → p-a7c23027.entry.js} +1 -1
- package/dist/cobalt/p-ab8e150e.entry.js +1 -0
- package/dist/cobalt/{p-6ad1625a.entry.js → p-acdb68a7.entry.js} +1 -1
- package/dist/cobalt/{p-c6fedc59.entry.js → p-afd957c0.entry.js} +1 -1
- package/dist/cobalt/{p-c750b2d2.entry.js → p-b45ea918.entry.js} +1 -1
- package/dist/cobalt/p-bad7ce84.entry.js +1 -0
- package/dist/cobalt/{p-5edd0d3f.entry.js → p-bebacee2.entry.js} +1 -1
- package/dist/cobalt/{p-bb534985.entry.js → p-c237add6.entry.js} +1 -1
- package/dist/cobalt/p-c32949a5.entry.js +1 -0
- package/dist/cobalt/{p-3f68fd2e.entry.js → p-cd5555d2.entry.js} +1 -1
- package/dist/cobalt/p-cd96aabf.entry.js +1 -0
- package/dist/cobalt/{p-b8ec0cc1.entry.js → p-ce961fba.entry.js} +1 -1
- package/dist/cobalt/p-d56b8a1f.entry.js +1 -0
- package/dist/cobalt/p-d6fff135.entry.js +1 -0
- package/dist/cobalt/{p-b1197c08.entry.js → p-d71b87d3.entry.js} +1 -1
- package/dist/cobalt/{p-af4cb263.entry.js → p-d83e5189.entry.js} +1 -1
- package/dist/cobalt/p-dc269096.entry.js +1 -0
- package/dist/cobalt/{p-0d6a562d.entry.js → p-dc8e88f4.entry.js} +1 -1
- package/dist/cobalt/p-de5a05fc.entry.js +1 -0
- package/dist/cobalt/{p-86e60cfa.entry.js → p-df63f23c.entry.js} +1 -1
- package/dist/cobalt/p-e2188319.entry.js +1 -0
- package/dist/cobalt/p-f0c589ad.entry.js +1 -0
- package/dist/cobalt/{p-e9aaeaf7.entry.js → p-f4370423.entry.js} +1 -1
- package/dist/cobalt/p-f4e4bebf.entry.js +1 -0
- package/dist/cobalt/p-f53b9536.entry.js +1 -0
- package/dist/cobalt/{p-373cd08e.entry.js → p-f7ae0228.entry.js} +1 -1
- package/dist/collection/collection-manifest.json +8 -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-autocomplete/co-autocomplete.css +1 -1
- package/dist/collection/components/co-avatar/co-avatar.css +23 -0
- package/dist/collection/components/co-avatar/co-avatar.js +24 -1
- package/dist/collection/components/co-avatar-group/co-avatar-group.css +9 -5
- package/dist/collection/components/co-avatar-group/co-avatar-group.js +2 -2
- 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.css +152 -0
- package/dist/collection/components/co-carousel/co-carousel.js +633 -0
- package/dist/collection/components/co-carousel-item/co-carousel-item.css +6 -0
- package/dist/collection/components/co-carousel-item/co-carousel-item.js +25 -0
- 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.css +11 -10
- 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-combobox/co-combobox.css +6 -8
- package/dist/collection/components/co-data-table/co-data-table.css +23 -8
- package/dist/collection/components/co-data-table-pagination/co-data-table-pagination.js +4 -4
- package/dist/collection/components/co-date-field/co-date-field.css +6 -7
- package/dist/collection/components/co-date-field/co-date-field.js +4 -4
- package/dist/collection/components/co-date-picker/co-date-picker.css +16 -0
- package/dist/collection/components/co-date-picker/co-date-picker.js +28 -1
- 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.css +13 -1
- package/dist/collection/components/co-date-range-picker/co-date-range-picker.js +26 -0
- 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.css +70 -10
- package/dist/collection/components/co-fab/co-fab.js +39 -4
- package/dist/collection/components/co-file-field/co-file-field.css +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-input/co-input.css +13 -1
- package/dist/collection/components/co-input/co-input.js +26 -0
- package/dist/collection/components/co-json-field/co-json-field.css +4 -8
- package/dist/collection/components/co-json-field/co-json-field.js +3 -3
- package/dist/collection/components/co-lightbox/co-lightbox.css +12 -1
- package/dist/collection/components/co-lightbox/co-lightbox.js +31 -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.css +1 -1
- 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.css +2 -2
- 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.css +17 -1
- package/dist/collection/components/co-ref-field/co-ref-field.js +32 -2
- package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.css +32 -3
- package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.js +97 -4
- package/dist/collection/components/co-rich-text-toolbar/co-rich-text-toolbar.css +8 -0
- package/dist/collection/components/co-rich-text-toolbar/co-rich-text-toolbar.js +93 -3
- package/dist/collection/components/co-rich-text-viewer/co-rich-text-viewer.css +19 -0
- package/dist/collection/components/co-rich-text-viewer/co-rich-text-viewer.js +53 -4
- package/dist/collection/components/co-row/co-row.js +2 -2
- package/dist/collection/components/co-select/co-select.css +12 -1
- package/dist/collection/components/co-select/co-select.js +30 -4
- 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 +32 -4
- package/dist/collection/components/co-tab-group/co-tab-group.js +18 -2
- package/dist/collection/components/co-tags-field/co-tags-field.css +12 -21
- package/dist/collection/components/co-tags-field/co-tags-field.js +5 -5
- package/dist/collection/components/co-textarea/co-textarea.css +18 -8
- package/dist/collection/components/co-textarea/co-textarea.js +30 -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/carouselI18n.js +36 -0
- 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/collection/utils/richTextI18n.js +3 -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.d.ts +11 -0
- package/dist/components/co-carousel-item.js +1 -0
- package/dist/components/co-carousel.d.ts +11 -0
- package/dist/components/co-carousel.js +1 -0
- 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-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-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-B21rOC2Y.js +1 -0
- package/dist/components/{p-DvL2TcDG.js → p-BC6sxVVr.js} +1 -1
- package/dist/components/{p-Bgxofdfb.js → p-BL0sCfMH.js} +1 -1
- package/dist/components/p-BMdapAL8.js +1 -0
- package/dist/components/p-BQFperIX.js +1 -0
- package/dist/components/{p-Cam92sWP.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-_k-j03K-.js → p-CIWoKlGj.js} +1 -1
- package/dist/components/{p-lus32JrB.js → p-CVCEiwOS.js} +1 -1
- package/dist/components/{p-QWi9AmnD.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-ChPooamL.js +1 -0
- package/dist/components/p-CnNpoKwg.js +1 -0
- package/dist/components/p-D-3BTFRs.js +1 -0
- package/dist/components/p-D0wrmRH8.js +1 -0
- package/dist/components/p-DZX7cEqP.js +1 -0
- package/dist/components/{p-D4SOCy8I.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-W8Y8ZuPs.js +1 -0
- package/dist/components/p-WeuPA9Rw.js +1 -0
- package/dist/components/{p-CNIs9j-h.js → p-cteJszd-.js} +1 -1
- package/dist/components/p-e5KibEs8.js +1 -0
- package/dist/components/{p-COb8X_fE.js → p-mUoTCiYa.js} +1 -1
- package/dist/components/p-uZ2D6ESV.js +1 -0
- package/dist/components/p-ySi6UG0O.js +1 -0
- package/dist/esm/co-accordion.entry.js +1 -1
- package/dist/esm/co-action-bar.entry.js +87 -0
- package/dist/esm/co-app-shell.entry.js +3 -3
- package/dist/esm/co-audio-player.entry.js +277 -0
- package/dist/esm/co-autocomplete.entry.js +3 -3
- package/dist/esm/co-avatar-group.entry.js +3 -3
- package/dist/esm/{co-tooltip.entry.js → co-avatar_2.entry.js} +96 -5
- package/dist/esm/co-badge.entry.js +2 -2
- package/dist/esm/co-bottom-sheet.entry.js +4 -4
- package/dist/esm/co-breadcrumb-item.entry.js +3 -3
- package/dist/esm/co-breadcrumb.entry.js +2 -2
- package/dist/esm/co-button-group.entry.js +3 -3
- package/dist/esm/co-button.entry.js +13 -6
- package/dist/esm/co-calendar-month_2.entry.js +1598 -0
- package/dist/esm/co-calendar_3.entry.js +12 -12
- package/dist/esm/co-card.entry.js +3 -3
- package/dist/esm/co-carousel-item.entry.js +15 -0
- package/dist/esm/co-carousel.entry.js +366 -0
- package/dist/esm/co-checkbox-group.entry.js +1 -1
- package/dist/esm/co-checkbox.entry.js +5 -5
- package/dist/esm/co-chip_2.entry.js +96 -7
- package/dist/esm/co-color-picker.entry.js +5 -5
- package/dist/esm/co-column-picker.entry.js +3 -3
- package/dist/esm/co-combobox.entry.js +3 -3
- 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 +2 -2
- package/dist/esm/co-date-picker.entry.js +12 -5
- package/dist/esm/co-date-range-picker.entry.js +11 -5
- package/dist/esm/co-date-range.entry.js +2 -2
- package/dist/esm/co-date-time-picker.entry.js +407 -0
- package/dist/esm/co-drive-card.entry.js +2 -2
- package/dist/esm/co-drop-zone.entry.js +2 -2
- package/dist/esm/co-empty-state.entry.js +3 -3
- 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 +21 -6
- package/dist/esm/co-file-field.entry.js +8 -8
- 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 +2 -2
- package/dist/esm/co-icon.entry.js +3 -3
- package/dist/esm/co-input.entry.js +9 -3
- package/dist/esm/co-json-field.entry.js +6 -6
- package/dist/esm/co-lightbox.entry.js +34 -7
- 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 +3 -3
- package/dist/esm/co-menu.entry.js +2 -2
- package/dist/esm/co-modal.entry.js +3 -3
- package/dist/esm/co-navbar.entry.js +3 -3
- package/dist/esm/co-number-field.entry.js +5 -5
- package/dist/esm/co-overlay.entry.js +2 -2
- package/dist/esm/co-page-header.entry.js +2 -2
- package/dist/esm/co-phone-field.entry.js +4 -4
- package/dist/esm/co-popover.entry.js +2 -2
- 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 +69 -0
- 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 +16 -6
- package/dist/esm/co-rich-text-editor.entry.js +22 -7
- package/dist/esm/co-rich-text-toolbar.entry.js +37 -5
- package/dist/esm/co-rich-text-viewer.entry.js +36 -6
- 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 +13 -7
- package/dist/esm/co-separator.entry.js +2 -2
- package/dist/esm/co-sidebar-nav.entry.js +13 -3
- 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 +5 -5
- package/dist/esm/co-tab-group.entry.js +20 -4
- package/dist/esm/co-tab.entry.js +3 -3
- package/dist/esm/co-tags-field.entry.js +9 -9
- package/dist/esm/co-textarea.entry.js +13 -7
- package/dist/esm/co-toast.entry.js +1 -1
- package/dist/esm/co-toggle-button-group.entry.js +3 -3
- package/dist/esm/co-toggle-button.entry.js +3 -3
- package/dist/esm/co-transfer-list.entry.js +1 -1
- package/dist/esm/co-video.entry.js +3 -3
- package/dist/esm/cobalt.js +3 -3
- 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/{fieldChip-ChXW__C5.js → fieldChip-Bb8YIN0J.js} +1 -1
- package/dist/esm/{index-tT-aZV0-.js → index-BCEz3S-z.js} +41 -21
- package/dist/esm/{index-Cyrxk8Qq.js → index-RuXxdKzC.js} +171 -11
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{positioning-C2mZ7x_Y.js → positioning-BMdapAL8.js} +10 -0
- package/dist/esm/{requiredMark-C7-_2UhB.js → requiredMark-D7kAMXHM.js} +1 -1
- package/dist/esm/{richTextI18n-B-ckjCUA.js → richTextI18n-BYKAgwq3.js} +3 -0
- package/dist/esm/time-CF8OB_TM.js +37 -0
- package/dist/esm/{toolbar-config-ChibIpZv.js → toolbar-config-WeuPA9Rw.js} +2 -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-avatar/co-avatar.d.ts +5 -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-carousel/co-carousel.d.ts +85 -0
- package/dist/types/components/co-carousel-item/co-carousel-item.d.ts +10 -0
- package/dist/types/components/co-date-picker/co-date-picker.d.ts +7 -0
- package/dist/types/components/co-date-range-picker/co-date-range-picker.d.ts +5 -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-fab/co-fab.d.ts +6 -0
- package/dist/types/components/co-input/co-input.d.ts +5 -0
- package/dist/types/components/co-lightbox/co-lightbox.d.ts +7 -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 +6 -0
- package/dist/types/components/co-rich-text-editor/co-rich-text-editor.d.ts +17 -0
- package/dist/types/components/co-rich-text-toolbar/co-rich-text-toolbar.d.ts +12 -1
- package/dist/types/components/co-rich-text-viewer/co-rich-text-viewer.d.ts +10 -0
- package/dist/types/components/co-select/co-select.d.ts +5 -0
- package/dist/types/components/co-tab-group/co-tab-group.d.ts +5 -0
- package/dist/types/components/co-textarea/co-textarea.d.ts +5 -0
- package/dist/types/components.d.ts +1632 -103
- package/dist/types/utils/carouselI18n.d.ts +10 -0
- package/dist/types/utils/dateI18n.d.ts +7 -0
- package/dist/types/utils/eventColor.d.ts +20 -0
- package/dist/types/utils/richTextI18n.d.ts +1 -0
- package/package.json +4 -4
- package/dist/cjs/co-avatar.cjs.entry.js +0 -92
- 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-002e5beb.entry.js +0 -1
- package/dist/cobalt/p-0c0621a7.entry.js +0 -1
- package/dist/cobalt/p-13fc9c8a.entry.js +0 -1
- package/dist/cobalt/p-14d4c5c7.entry.js +0 -1
- package/dist/cobalt/p-4a075257.entry.js +0 -1
- package/dist/cobalt/p-5647ca9d.entry.js +0 -1
- package/dist/cobalt/p-5b31d45b.entry.js +0 -1
- package/dist/cobalt/p-6911a034.entry.js +0 -1
- package/dist/cobalt/p-70f70e02.entry.js +0 -1
- package/dist/cobalt/p-73b30ebb.entry.js +0 -1
- package/dist/cobalt/p-75dcaeb0.entry.js +0 -1
- package/dist/cobalt/p-7780ddb5.entry.js +0 -1
- package/dist/cobalt/p-7FZXeBK4.js +0 -1
- package/dist/cobalt/p-86d4e016.entry.js +0 -1
- package/dist/cobalt/p-8a9ed2da.entry.js +0 -1
- package/dist/cobalt/p-8f194753.entry.js +0 -1
- package/dist/cobalt/p-9c873a6a.entry.js +0 -1
- package/dist/cobalt/p-B-ckjCUA.js +0 -1
- package/dist/cobalt/p-BAA4ln31.js +0 -1
- package/dist/cobalt/p-C1DCLOEl.js +0 -1
- package/dist/cobalt/p-C2mZ7x_Y.js +0 -1
- package/dist/cobalt/p-ChibIpZv.js +0 -1
- package/dist/cobalt/p-a6900010.entry.js +0 -1
- package/dist/cobalt/p-aa20ffca.entry.js +0 -1
- package/dist/cobalt/p-ac5df270.entry.js +0 -1
- package/dist/cobalt/p-c0f39ddd.entry.js +0 -1
- package/dist/cobalt/p-c2e2eee9.entry.js +0 -1
- package/dist/cobalt/p-cc8e2f16.entry.js +0 -1
- package/dist/cobalt/p-e1957078.entry.js +0 -1
- package/dist/cobalt/p-e2762263.entry.js +0 -1
- package/dist/cobalt/p-e33853fa.entry.js +0 -1
- package/dist/cobalt/p-e4a539da.entry.js +0 -1
- package/dist/cobalt/p-e7085f08.entry.js +0 -1
- package/dist/cobalt/p-f073b467.entry.js +0 -1
- package/dist/cobalt/p-f36e461f.entry.js +0 -1
- package/dist/cobalt/p-f6ac5301.entry.js +0 -1
- package/dist/cobalt/p-f6b0c4a0.entry.js +0 -1
- package/dist/cobalt/p-f86ccb38.entry.js +0 -1
- package/dist/cobalt/p-tPYikBRJ.js +0 -1
- package/dist/cobalt/p-tT-aZV0-.js +0 -2
- package/dist/components/p-BHqdcGDh.js +0 -1
- package/dist/components/p-BJTMFYax.js +0 -1
- package/dist/components/p-Ba5lW0pA.js +0 -1
- package/dist/components/p-Bsq90mo4.js +0 -1
- package/dist/components/p-C1DCLOEl.js +0 -1
- package/dist/components/p-C2mZ7x_Y.js +0 -1
- package/dist/components/p-ChibIpZv.js +0 -1
- package/dist/components/p-CyYF8IJE.js +0 -1
- package/dist/components/p-D3ts7oo9.js +0 -1
- package/dist/components/p-Dh-h40mY.js +0 -1
- package/dist/components/p-DrQh1Cb8.js +0 -1
- package/dist/components/p-OKwHt2i9.js +0 -1
- package/dist/components/p-Xwo2HQmt.js +0 -1
- package/dist/components/p-eSq2ze8W.js +0 -1
- package/dist/esm/co-avatar.entry.js +0 -90
- package/dist/esm/co-calendar-month.entry.js +0 -379
- package/dist/esm/co-skeleton.entry.js +0 -24
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as a,p as t,H as r,h as e}from"./index.js";import{d as o}from"./p-D4SOCy8I.js";function s(a){const t=function(a){if(!a||"string"!=typeof a)return null;const t=a.replace("#","");return 3===t.length?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16)}:6===t.length?{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16)}:null}(a);if(!t)return 0;const[r,e,o]=[t.r/255,t.g/255,t.b/255].map((a=>a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4)));return.2126*r+.7152*e+.0722*o}const i={xl:80,lg:64,md:56,sm:48,xs:32,xxs:24},c={xl:32,lg:28,md:24,sm:20,xs:16,xxs:12},n={xl:"var(--co-font-size-26)",lg:"var(--co-font-size-22)",md:"var(--co-font-size-18)",sm:"var(--co-font-size-16)",xs:"var(--co-font-size-12)",xxs:"var(--co-font-size-10)"},l=t(class extends r{constructor(a){super(),!1!==a&&this.__registerHost(),this.__attachShadow(),this.type="text",this.size="md",this.icon="user",this.iconWeight="regular",this.shape="circle",this.imgFailed=!1,this.handleImgError=()=>{this.imgFailed=!0}}render(){var a,t,r,o,l,v,L;const h=null!==(a=i[this.size])&&void 0!==a?a:56,d=null!==(t=c[this.size])&&void 0!==t?t:24,u=null!==(r=n[this.size])&&void 0!==r?r:"var(--co-font-size-18)",p="image"===this.type&&this.src&&!this.imgFailed,m="text"===this.type?this.text:"image"===this.type&&null!==(l=null!==(o=this.alt)&&void 0!==o?o:this.text)&&void 0!==l?l:this.icon;return e("div",{key:"41da32ebacadf5fd33c9f6a10ac0069ddaa81ce6",class:{"co-avatar":!0,[`co-avatar--${this.size}`]:!0,[`co-avatar--${this.type}`]:!0,"co-avatar--square":"square"===this.shape,"co-avatar--light":!!this.color&&(f=this.color,s(f)>.4)},style:Object.assign(Object.assign({width:`var(--co-avatar-size, ${h}px)`,height:`var(--co-avatar-size, ${h}px)`,fontSize:u},this.color?{background:this.color}:{}),this.ringColor?{"--co-avatar-border-color":this.ringColor,"--co-avatar-border-width":"2px"}:{}),part:"avatar",role:"img","aria-label":m},p?e("img",{class:"co-avatar__img",src:this.src,alt:null!==(L=null!==(v=this.alt)&&void 0!==v?v:this.text)&&void 0!==L?L:"",onError:this.handleImgError}):"icon"===this.type?e("co-icon",{name:this.icon,weight:this.iconWeight,size:d}):e("span",{class:"co-avatar__text"},this.text));var f}static get style(){return":host{display:inline-flex;--co-avatar-squircle:url(\"data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'><path d='M100 50L99.94 68.06L99.75 73.81L99.44 77.94L99.01 81.26L98.44 84.05L97.74 86.46L96.91 88.57L95.94 90.43L94.81 92.07L93.53 93.53L92.07 94.81L90.43 95.94L88.57 96.91L86.46 97.74L84.05 98.44L81.26 99.01L77.94 99.44L73.81 99.75L68.06 99.94L50 100L31.94 99.94L26.19 99.75L22.06 99.44L18.74 99.01L15.95 98.44L13.54 97.74L11.43 96.91L9.57 95.94L7.93 94.81L6.47 93.53L5.19 92.07L4.06 90.43L3.09 88.57L2.26 86.46L1.56 84.05L0.99 81.26L0.56 77.94L0.25 73.81L0.06 68.06L0 50L0.06 31.94L0.25 26.19L0.56 22.06L0.99 18.74L1.56 15.95L2.26 13.54L3.09 11.43L4.06 9.57L5.19 7.93L6.47 6.47L7.93 5.19L9.57 4.06L11.43 3.09L13.54 2.26L15.95 1.56L18.74 0.99L22.06 0.56L26.19 0.25L31.94 0.06L50 0L68.06 0.06L73.81 0.25L77.94 0.56L81.26 0.99L84.05 1.56L86.46 2.26L88.57 3.09L90.43 4.06L92.07 5.19L93.53 6.47L94.81 7.93L95.94 9.57L96.91 11.43L97.74 13.54L98.44 15.95L99.01 18.74L99.44 22.06L99.75 26.19L99.94 31.94Z' fill='%23fff'/></svg>\")}.co-avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--co-border-radius-full);background:var(--co-semantic-surface-primary);color:var(--co-semantic-on-primary);font-family:var(--co-font-family-primary);font-weight:600;line-height:1;letter-spacing:var(--co-font-letter-spacing-body);overflow:hidden;flex-shrink:0;user-select:none;-webkit-font-smoothing:antialiased}.co-avatar::after{content:'';position:absolute;inset:0;pointer-events:none;border-radius:inherit;box-shadow:inset 0 0 0 var(--co-avatar-border-width, 1px) var(--co-avatar-border-color, transparent)}.co-avatar__text{text-transform:uppercase}.co-avatar__img{width:100%;height:100%;object-fit:cover;display:block}.co-avatar--square{border-radius:0;-webkit-mask:var(--co-avatar-squircle) center / 100% 100% no-repeat;mask:var(--co-avatar-squircle) center / 100% 100% no-repeat}.co-avatar--square::after{--co-avatar-bw:var(--co-avatar-border-width, 1px);box-shadow:none;background:var(--co-avatar-border-color, transparent);-webkit-mask:var(--co-avatar-squircle) center / 100% 100% no-repeat, var(--co-avatar-squircle) center / calc(100% - 2 * var(--co-avatar-bw)) calc(100% - 2 * var(--co-avatar-bw)) no-repeat;-webkit-mask-composite:xor;mask:var(--co-avatar-squircle) center / 100% 100% no-repeat, var(--co-avatar-squircle) center / calc(100% - 2 * var(--co-avatar-bw)) calc(100% - 2 * var(--co-avatar-bw)) no-repeat;mask-composite:exclude}.co-avatar--light{color:rgba(0, 0, 0, 0.87)}"}},[1,"co-avatar",{type:[1],size:[1],text:[1],src:[1],alt:[1],icon:[1],iconWeight:[1,"icon-weight"],shape:[1],color:[1],ringColor:[513,"ring-color"],imgFailed:[32]}]);function v(){"undefined"!=typeof customElements&&["co-avatar","co-icon"].forEach((t=>{switch(t){case"co-avatar":customElements.get(a(t))||customElements.define(a(t),l);break;case"co-icon":customElements.get(a(t))||o()}}))}v();export{l as C,v as d}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e,p as t,H as a,c as r,h as i}from"./index.js";import{R as s}from"./p-CWneqh4n.js";import{g as o}from"./p-C1DCLOEl.js";import{d as c}from"./p-COb8X_fE.js";import{d as n}from"./p-D3ts7oo9.js";import{d as l}from"./p-DrQh1Cb8.js";import{d}from"./p-D4SOCy8I.js";import{d as h}from"./p-DzoNGEDU.js";import{d as p}from"./p-lus32JrB.js";import{d as g}from"./p-CmCsm4L-.js";import{i as m,t as u,p as b,c as f,a as _,b as k,s as v,d as y,f as x}from"./p-CyYF8IJE.js";const w=t(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.coRangeStartChange=r(this,"coRangeStartChange",7),this.coRangeEndChange=r(this,"coRangeEndChange",7),this.coRangeChange=r(this,"coRangeChange",7),this.coApply=r(this,"coApply",7),this.coCancel=r(this,"coCancel",7),this.coClear=r(this,"coClear",7),this.coOpen=r(this,"coOpen",3),this.coClose=r(this,"coClose",3),this.value="",this.locale="es-CO",this.displayFormat="d MMM yyyy",this.firstDayOfWeek=1,this.presets=!0,this.allowSameDay=!0,this.clearable=!0,this.applyOnSelect=!1,this.disabled=!1,this.readonly=!1,this.invalid=!1,this.required=!1,this.layout="vertical",this.size="md",this.placement="bottom-start",this.open=!1,this.mobileBreakpoint=600,this.draftFrom=null,this.draftTo=null,this.isMobile=!1,this.mqlHandler=e=>{this.isMobile=e.matches},this.onPopoverOpen=()=>{this.open||(this.open=!0,this.coOpen.emit()),this.syncDraftFromValue()},this.onPopoverClose=()=>{this.open&&(this.open=!1,this.coClose.emit()),this.syncDraftFromValue()},this.onRootKeyDown=e=>{"Escape"===e.key&&this.open&&(e.stopPropagation(),this.handleCancel())},this.onCalendarRange=e=>{this.updateDraft(e.detail.start,e.detail.end)},this.onFromChange=e=>{this.updateDraft(e.detail,this.draftTo)},this.onToChange=e=>{this.updateDraft(this.draftFrom,e.detail)},this.openSheet=()=>{this.disabled||this.open||(this.syncDraftFromValue(),this.open=!0,this.coOpen.emit())},this.handleApply=()=>{this.canApply&&(this.value=JSON.stringify({from:this.draftFrom,to:this.draftTo}),this.coApply.emit({from:this.draftFrom,to:this.draftTo}),this.open=!1)},this.handleCancel=()=>{this.coCancel.emit(),this.syncDraftFromValue(),this.open=!1},this.handleClear=()=>{this.value="",this.draftFrom=null,this.draftTo=null,this.coClear.emit(),this.coRangeChange.emit({from:null,to:null}),this.open=!1}}componentWillLoad(){const e=this.parseValue();this.draftFrom=e.from,this.draftTo=e.to}connectedCallback(){this.mql=window.matchMedia(`(max-width: ${this.mobileBreakpoint}px)`),this.isMobile=this.mql.matches,this.mql.addEventListener("change",this.mqlHandler)}disconnectedCallback(){var e;null===(e=this.mql)||void 0===e||e.removeEventListener("change",this.mqlHandler)}onValueChange(){const e=this.parseValue();this.draftFrom=e.from,this.draftTo=e.to}parseValue(){if(!this.value)return{from:null,to:null};try{const e=JSON.parse(this.value);return{from:m(e.from)?e.from:null,to:m(e.to)?e.to:null}}catch(e){return{from:null,to:null}}}get committed(){return this.parseValue()}inclusiveDays(e,t){const a=u(b(t)).getTime()-u(b(e)).getTime();return Math.round(a/864e5)+1}get canApply(){const e=this.draftFrom,t=this.draftTo;if(!e||!t)return!1;if(f(e,t)>0)return!1;if(!this.allowSameDay&&0===f(e,t))return!1;const a=this.inclusiveDays(e,t);return!(this.minRangeDays&&a<this.minRangeDays||this.maxRangeDays&&a>this.maxRangeDays)}syncDraftFromValue(){const e=this.parseValue();this.draftFrom=e.from,this.draftTo=e.to}updateDraft(e,t){const a=this.draftFrom,r=this.draftTo;this.draftFrom=e,this.draftTo=t,e!==a&&this.coRangeStartChange.emit(e),t!==r&&this.coRangeEndChange.emit(t),this.coRangeChange.emit({from:e,to:t}),this.applyOnSelect&&this.canApply&&this.scheduleApply()}scheduleApply(){clearTimeout(this.applyTimer),this.applyTimer=setTimeout((()=>{this.canApply&&this.handleApply()}),250)}applyPreset(e){const t=_();let a=null,r=null;switch(e){case"today":a=t,r=t;break;case"yesterday":a=y(t,-1),r=a;break;case"last7Days":r=t,a=y(t,-6);break;case"last14Days":r=t,a=y(t,-13);break;case"last30Days":r=t,a=y(t,-29);break;case"last90Days":r=t,a=y(t,-89);break;case"thisWeek":a=function(e,t){const a=b(e);if(!a)return e;const r=u(a).getDay();return y(e,-(r-t+7)%7)}(t,this.firstDayOfWeek),r=y(a,6);break;case"thisMonth":a=v(t),r=C(t);break;case"lastMonth":{const e=k(t,-1);a=v(e),r=C(e);break}case"thisYear":{const e=b(t).year;a=`${e}-01-01`,r=`${e}-12-31`;break}case"lastYear":{const e=b(t).year-1;a=`${e}-01-01`,r=`${e}-12-31`;break}case"custom":a=null,r=null}this.updateDraft(a,r)}get hasCommitted(){const e=this.committed;return!(!e.from&&!e.to)}triggerText(e){const t=this.committed,a=t.from?x(t.from,this.displayFormat,this.locale):null,r=t.to?x(t.to,this.displayFormat,this.locale):null;return a&&r?`${a} → ${r}`:a?`${a} → …`:this.placeholder||e.setDate}presetItems(e){const t=function(e){if(Array.isArray(e))return e;if("string"==typeof e&&e.trim()){const t=e.trim();try{const e=JSON.parse(t);if(Array.isArray(e))return e.map(String)}catch(e){}return t.split(",").map((e=>e.trim())).filter(Boolean)}return[]}(this.presetIds);return(t.length?t:["today","yesterday","last7Days","last30Days","thisWeek","thisMonth","lastMonth","custom"]).map((t=>{var a;return{id:t,label:null!==(a=e[t])&&void 0!==a?a:t}}))}renderTriggerChildren(e,t){var a;return[i("co-icon",{name:"calendar",size:16,class:"co-date-range-picker__icon"}),i("span",{class:{"co-date-range-picker__trigger-text":!0,"co-date-range-picker__trigger-text--placeholder":!this.hasCommitted}},this.triggerText(e)),t&&i("button",{class:"co-date-range-picker__clear",type:"button",tabIndex:-1,onMouseDown:e=>e.preventDefault(),onClick:e=>{e.stopPropagation(),this.handleClear()},"aria-label":null!==(a=this.clearLabel)&&void 0!==a?a:e.clear},i("co-icon",{name:"x-circle",size:16,weight:"fill"})),i("co-icon",{name:"caret-down",size:14,class:"co-date-range-picker__caret"})]}renderPanel(e,t){var a,r,s,o,c,n;return i("div",{class:"co-date-range-picker__panel"},i("div",{class:"co-date-range-picker__fields"},i("co-date-field",{class:"co-date-range-picker__field",label:null!==(a=this.fromLabel)&&void 0!==a?a:e.from,value:this.draftFrom,min:this.min,max:null!==(r=this.draftTo)&&void 0!==r?r:this.max,locale:this.locale,displayFormat:this.displayFormat,clearable:!1,onCoChange:this.onFromChange}),i("co-date-field",{class:"co-date-range-picker__field",label:null!==(s=this.toLabel)&&void 0!==s?s:e.to,value:this.draftTo,min:null!==(o=this.draftFrom)&&void 0!==o?o:this.min,max:this.max,locale:this.locale,displayFormat:this.displayFormat,clearable:!1,onCoChange:this.onToChange})),i("div",{class:{"co-date-range-picker__body":!0,"co-date-range-picker__body--touch":t}},this.presets&&i("div",{class:"co-date-range-picker__presets"},this.presetItems(e).map((e=>i("button",{key:e.id,type:"button",class:"co-date-range-picker__preset",onClick:()=>this.applyPreset(e.id)},e.label)))),i("co-calendar",{mode:"range","data-touch":t?"":void 0,rangeStart:this.draftFrom,rangeEnd:this.draftTo,min:this.min,max:this.max,locale:this.locale,firstDayOfWeek:this.firstDayOfWeek,onCoRangeSelect:this.onCalendarRange})),i("div",{class:"co-date-range-picker__footer"},i("button",{type:"button",class:"co-date-range-picker__btn co-date-range-picker__btn--ghost",onClick:this.handleCancel},null!==(c=this.cancelLabel)&&void 0!==c?c:e.cancel),i("button",{type:"button",class:"co-date-range-picker__btn co-date-range-picker__btn--primary",disabled:!this.canApply,onClick:this.handleApply},null!==(n=this.applyLabel)&&void 0!==n?n:e.apply)))}renderHelper(e,t){return t?i("div",{class:{"co-date-range-picker__helper":!0,"co-date-range-picker__helper--error":e},part:"helper"},e&&i("co-icon",{name:"warning-circle",size:14}),i("span",null,t)):null}render(){const e=o(this.locale),t=this.invalid,a=t?this.errorMessage:this.helperText,r=this.clearable&&this.hasCommitted&&!this.disabled&&!this.readonly,c={"co-date-range-picker__trigger":!0,"co-date-range-picker__trigger--open":this.open,"co-date-range-picker__trigger--disabled":this.disabled};return this.isMobile?i("div",{class:{"co-date-range-picker":!0,"co-date-range-picker--invalid":t,[`co-date-range-picker--${this.size}`]:!0},onKeyDown:this.onRootKeyDown},this.label&&i("label",{class:"co-date-range-picker__label",part:"label"},this.label,i(s,{required:this.required})),i("div",{class:c,part:"trigger",role:"button",tabIndex:this.disabled?-1:0,"aria-haspopup":"dialog","aria-expanded":this.open?"true":"false",onClick:this.openSheet},this.renderTriggerChildren(e,r)),i("co-drawer",{position:"bottom",open:this.open,heading:e.selectDate,onCoClose:this.handleCancel},this.renderPanel(e,!0)),this.renderHelper(t,a)):i("div",{class:{"co-date-range-picker":!0,"co-date-range-picker--invalid":t,[`co-date-range-picker--${this.size}`]:!0},onKeyDown:this.onRootKeyDown},this.label&&i("label",{class:"co-date-range-picker__label",part:"label"},this.label,i(s,{required:this.required})),i("co-popover",{open:this.open,placement:this.placement,offset:4,closeOnEscape:!1,onCoOpen:this.onPopoverOpen,onCoClose:this.onPopoverClose},i("div",{slot:"trigger",class:c,part:"trigger",role:"button",tabIndex:this.disabled?-1:0,"aria-haspopup":"dialog","aria-expanded":this.open?"true":"false"},this.renderTriggerChildren(e,r)),this.open&&this.renderPanel(e,!1)),this.renderHelper(t,a))}get el(){return this}static get watchers(){return{value:[{onValueChange:0}]}}static get style(){return":host{display:block;font-family:var(--co-font-family-primary);font-size:var(--co-font-size-14)}.co-date-range-picker{display:flex;flex-direction:column;gap:var(--co-spacing-sm2)}.co-date-range-picker__label{font-size:var(--co-font-size-14);font-weight:400;color:var(--co-semantic-text-secondary);line-height:1;padding:0 var(--co-spacing-xs)}.co-date-range-picker co-popover{display:block;width:100%}.co-date-range-picker--s .co-date-range-picker__trigger{min-height:28px;padding:0 var(--co-spacing-sm)}.co-date-range-picker--sm .co-date-range-picker__trigger{min-height:32px;padding:0 var(--co-spacing-sm)}.co-date-range-picker--lg .co-date-range-picker__trigger{min-height:48px;padding:0 var(--co-spacing-lg)}.co-date-range-picker__trigger{display:inline-flex;align-items:center;gap:var(--co-spacing-sm2);width:100%;min-height:40px;padding:0 var(--co-spacing-md);background:var(--co-semantic-surface-page);border:1px solid var(--co-color-opacity-negro-25, rgba(31, 28, 27, 0.25));border-radius:var(--co-border-radius-xs);cursor:pointer;color:var(--co-semantic-text-default);box-sizing:border-box;transition:border-color 0.15s ease, box-shadow 0.15s ease}.co-date-range-picker__trigger--open{border-color:var(--co-semantic-border-focus);box-shadow:0 0 0 2px var(--co-semantic-border-focus-ring)}.co-date-range-picker__trigger--disabled{opacity:0.5;cursor:not-allowed}.co-date-range-picker--invalid .co-date-range-picker__trigger{border-color:var(--co-semantic-status-error)}.co-date-range-picker__icon,.co-date-range-picker__caret{color:var(--co-semantic-text-muted);flex-shrink:0}.co-date-range-picker__trigger-text{flex:1;min-width:0;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.co-date-range-picker__trigger-text--placeholder{color:var(--co-semantic-text-muted)}.co-date-range-picker__clear{background:none;border:0;padding:0;cursor:pointer;color:var(--co-semantic-text-muted);display:inline-flex;align-items:center;flex-shrink:0}.co-date-range-picker__clear:hover{color:var(--co-semantic-text-default)}.co-date-range-picker__panel{display:flex;flex-direction:column;gap:var(--co-spacing-md);padding:var(--co-spacing-md);min-width:280px}.co-date-range-picker__fields{display:grid;grid-template-columns:1fr 1fr;gap:var(--co-spacing-sm)}.co-date-range-picker__body{display:flex;gap:var(--co-spacing-md);align-items:flex-start}.co-date-range-picker__body--touch{flex-direction:column;align-items:stretch}.co-date-range-picker__body--touch .co-date-range-picker__presets{flex-direction:row;flex-wrap:wrap;min-width:0;border-right:0;padding-right:0;border-bottom:1px solid var(--co-semantic-border-subtle);padding-bottom:var(--co-spacing-sm)}.co-date-range-picker__body--touch co-calendar{align-self:center}.co-date-range-picker__presets{display:flex;flex-direction:column;gap:var(--co-spacing-xxs);min-width:120px;border-right:1px solid var(--co-semantic-border-subtle);padding-right:var(--co-spacing-md)}.co-date-range-picker__preset{text-align:left;background:none;border:0;padding:var(--co-spacing-xs) var(--co-spacing-sm);border-radius:var(--co-border-radius-xs);font-size:var(--co-font-size-14);font-family:inherit;color:var(--co-semantic-text-default);cursor:pointer;transition:background 0.1s ease}.co-date-range-picker__preset:hover{background:var(--co-semantic-surface-hover)}.co-date-range-picker__footer{display:flex;justify-content:flex-end;gap:var(--co-spacing-sm);padding-top:var(--co-spacing-sm);border-top:1px solid var(--co-semantic-border-subtle)}.co-date-range-picker__btn{padding:var(--co-spacing-xs) var(--co-spacing-md);border-radius:var(--co-border-radius-xs);font-size:var(--co-font-size-14);font-family:inherit;font-weight:500;cursor:pointer;border:0}.co-date-range-picker__btn--ghost{background:transparent;color:var(--co-semantic-text-default)}.co-date-range-picker__btn--ghost:hover{background:var(--co-semantic-surface-hover)}.co-date-range-picker__btn--primary{background:var(--co-semantic-surface-primary);color:var(--co-semantic-on-primary)}.co-date-range-picker__btn--primary:hover:not(:disabled){opacity:0.88}.co-date-range-picker__btn--primary:disabled{opacity:0.5;cursor:not-allowed}.co-date-range-picker__helper{display:inline-flex;align-items:center;gap:var(--co-spacing-xs);font-size:var(--co-font-size-14);color:var(--co-semantic-text-muted);padding:0 var(--co-spacing-xs)}.co-date-range-picker__helper--error{color:var(--co-semantic-status-error)}:host([layout='horizontal']) .co-date-range-picker{display:grid;grid-template-columns:var(--co-field-label-width, max-content) 1fr;align-items:start;column-gap:var(--co-spacing-md);row-gap:var(--co-spacing-sm2)}:host([layout='horizontal']) .co-date-range-picker__label{grid-column:1;grid-row:1;padding-top:var(--co-spacing-sm2);min-width:0}:host([layout='horizontal']) .co-date-range-picker__label{white-space:normal}:host([layout='horizontal']) .co-date-range-picker>:not(.co-date-range-picker__label){grid-column:2;min-width:0}.co-field-required{margin-left:2px;color:var(--co-color-status-error)}.co-field-required__caption{margin-left:4px;color:var(--co-semantic-text-muted);font-size:var(--co-font-size-12);font-weight:400}.co-field-required__caption::before{content:var(--co-field-required-text, ' (required)')}"}},[1,"co-date-range-picker",{value:[1025],min:[1],max:[1],locale:[1],displayFormat:[1,"display-format"],firstDayOfWeek:[2,"first-day-of-week"],presets:[4],presetIds:[1,"preset-ids"],allowSameDay:[4,"allow-same-day"],minRangeDays:[2,"min-range-days"],maxRangeDays:[2,"max-range-days"],clearable:[4],applyOnSelect:[4,"apply-on-select"],disabled:[4],readonly:[4],invalid:[4],errorMessage:[1,"error-message"],helperText:[1,"helper-text"],label:[1],required:[4],placeholder:[1],layout:[513],size:[513],placement:[1],open:[1540],applyLabel:[1,"apply-label"],cancelLabel:[1,"cancel-label"],clearLabel:[1,"clear-label"],fromLabel:[1,"from-label"],toLabel:[1,"to-label"],mobileBreakpoint:[2,"mobile-breakpoint"],draftFrom:[32],draftTo:[32],isMobile:[32]},void 0,{value:[{onValueChange:0}]}]);function C(e){return y(v(k(e,1)),-1)}function z(){"undefined"!=typeof customElements&&["co-date-range-picker","co-calendar","co-date-field","co-drawer","co-icon","co-loader","co-overlay","co-popover"].forEach((t=>{switch(t){case"co-date-range-picker":customElements.get(e(t))||customElements.define(e(t),w);break;case"co-calendar":customElements.get(e(t))||c();break;case"co-date-field":customElements.get(e(t))||n();break;case"co-drawer":customElements.get(e(t))||l();break;case"co-icon":customElements.get(e(t))||d();break;case"co-loader":customElements.get(e(t))||h();break;case"co-overlay":customElements.get(e(t))||p();break;case"co-popover":customElements.get(e(t))||g()}}))}z();export{w as C,z as d}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-tT-aZV0-.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Shared color utilities for Cobalt components.
|
|
5
|
-
* WCAG sRGB relative luminance for contrast detection.
|
|
6
|
-
*/
|
|
7
|
-
function parseHex(hex) {
|
|
8
|
-
if (!hex || typeof hex !== 'string')
|
|
9
|
-
return null;
|
|
10
|
-
const h = hex.replace('#', '');
|
|
11
|
-
if (h.length === 3) {
|
|
12
|
-
return { r: parseInt(h[0] + h[0], 16), g: parseInt(h[1] + h[1], 16), b: parseInt(h[2] + h[2], 16) };
|
|
13
|
-
}
|
|
14
|
-
if (h.length === 6) {
|
|
15
|
-
return { r: parseInt(h.slice(0, 2), 16), g: parseInt(h.slice(2, 4), 16), b: parseInt(h.slice(4, 6), 16) };
|
|
16
|
-
}
|
|
17
|
-
return null;
|
|
18
|
-
}
|
|
19
|
-
/** WCAG sRGB relative luminance (0–1). */
|
|
20
|
-
function luminance(hex) {
|
|
21
|
-
const c = parseHex(hex);
|
|
22
|
-
if (!c)
|
|
23
|
-
return 0;
|
|
24
|
-
const [rs, gs, bs] = [c.r / 255, c.g / 255, c.b / 255].map((v) => v <= 0.03928 ? v / 12.92 : Math.pow((v + 0.055) / 1.055, 2.4));
|
|
25
|
-
return 0.2126 * rs + 0.7152 * gs + 0.0722 * bs;
|
|
26
|
-
}
|
|
27
|
-
/** Returns true when the color is perceptually light (needs dark foreground). */
|
|
28
|
-
function isLightColor(hex) {
|
|
29
|
-
return luminance(hex) > 0.4;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const coAvatarCss = () => `:host{display:inline-flex;--co-avatar-squircle:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'><path d='M100 50L99.94 68.06L99.75 73.81L99.44 77.94L99.01 81.26L98.44 84.05L97.74 86.46L96.91 88.57L95.94 90.43L94.81 92.07L93.53 93.53L92.07 94.81L90.43 95.94L88.57 96.91L86.46 97.74L84.05 98.44L81.26 99.01L77.94 99.44L73.81 99.75L68.06 99.94L50 100L31.94 99.94L26.19 99.75L22.06 99.44L18.74 99.01L15.95 98.44L13.54 97.74L11.43 96.91L9.57 95.94L7.93 94.81L6.47 93.53L5.19 92.07L4.06 90.43L3.09 88.57L2.26 86.46L1.56 84.05L0.99 81.26L0.56 77.94L0.25 73.81L0.06 68.06L0 50L0.06 31.94L0.25 26.19L0.56 22.06L0.99 18.74L1.56 15.95L2.26 13.54L3.09 11.43L4.06 9.57L5.19 7.93L6.47 6.47L7.93 5.19L9.57 4.06L11.43 3.09L13.54 2.26L15.95 1.56L18.74 0.99L22.06 0.56L26.19 0.25L31.94 0.06L50 0L68.06 0.06L73.81 0.25L77.94 0.56L81.26 0.99L84.05 1.56L86.46 2.26L88.57 3.09L90.43 4.06L92.07 5.19L93.53 6.47L94.81 7.93L95.94 9.57L96.91 11.43L97.74 13.54L98.44 15.95L99.01 18.74L99.44 22.06L99.75 26.19L99.94 31.94Z' fill='%23fff'/></svg>")}.co-avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--co-border-radius-full);background:var(--co-semantic-surface-primary);color:var(--co-semantic-on-primary);font-family:var(--co-font-family-primary);font-weight:600;line-height:1;letter-spacing:var(--co-font-letter-spacing-body);overflow:hidden;flex-shrink:0;user-select:none;-webkit-font-smoothing:antialiased}.co-avatar::after{content:'';position:absolute;inset:0;pointer-events:none;border-radius:inherit;box-shadow:inset 0 0 0 var(--co-avatar-border-width, 1px) var(--co-avatar-border-color, transparent)}.co-avatar__text{text-transform:uppercase}.co-avatar__img{width:100%;height:100%;object-fit:cover;display:block}.co-avatar--square{border-radius:0;-webkit-mask:var(--co-avatar-squircle) center / 100% 100% no-repeat;mask:var(--co-avatar-squircle) center / 100% 100% no-repeat}.co-avatar--square::after{--co-avatar-bw:var(--co-avatar-border-width, 1px);box-shadow:none;background:var(--co-avatar-border-color, transparent);-webkit-mask:var(--co-avatar-squircle) center / 100% 100% no-repeat, var(--co-avatar-squircle) center / calc(100% - 2 * var(--co-avatar-bw)) calc(100% - 2 * var(--co-avatar-bw)) no-repeat;-webkit-mask-composite:xor;mask:var(--co-avatar-squircle) center / 100% 100% no-repeat, var(--co-avatar-squircle) center / calc(100% - 2 * var(--co-avatar-bw)) calc(100% - 2 * var(--co-avatar-bw)) no-repeat;mask-composite:exclude}.co-avatar--light{color:rgba(0, 0, 0, 0.87)}`;
|
|
33
|
-
|
|
34
|
-
const SIZE_MAP = {
|
|
35
|
-
xl: 80, lg: 64, md: 56, sm: 48, xs: 32, xxs: 24,
|
|
36
|
-
};
|
|
37
|
-
const ICON_SIZE_MAP = {
|
|
38
|
-
xl: 32, lg: 28, md: 24, sm: 20, xs: 16, xxs: 12,
|
|
39
|
-
};
|
|
40
|
-
const FONT_SIZE_MAP = {
|
|
41
|
-
xl: 'var(--co-font-size-26)',
|
|
42
|
-
lg: 'var(--co-font-size-22)',
|
|
43
|
-
md: 'var(--co-font-size-18)',
|
|
44
|
-
sm: 'var(--co-font-size-16)',
|
|
45
|
-
xs: 'var(--co-font-size-12)',
|
|
46
|
-
xxs: 'var(--co-font-size-10)',
|
|
47
|
-
};
|
|
48
|
-
const CoAvatar = class {
|
|
49
|
-
constructor(hostRef) {
|
|
50
|
-
registerInstance(this, hostRef);
|
|
51
|
-
/** Display type: text shows initials, icon shows a Phosphor icon, image shows a picture */
|
|
52
|
-
this.type = 'text';
|
|
53
|
-
/** Size of the avatar */
|
|
54
|
-
this.size = 'md';
|
|
55
|
-
/** Phosphor icon name (type="icon"), defaults to "user" */
|
|
56
|
-
this.icon = 'user';
|
|
57
|
-
/** Icon weight */
|
|
58
|
-
this.iconWeight = 'regular';
|
|
59
|
-
/** Shape of the avatar */
|
|
60
|
-
this.shape = 'circle';
|
|
61
|
-
this.imgFailed = false;
|
|
62
|
-
this.handleImgError = () => {
|
|
63
|
-
this.imgFailed = true;
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
render() {
|
|
67
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
68
|
-
const dim = (_a = SIZE_MAP[this.size]) !== null && _a !== void 0 ? _a : 56;
|
|
69
|
-
const iconSize = (_b = ICON_SIZE_MAP[this.size]) !== null && _b !== void 0 ? _b : 24;
|
|
70
|
-
const fontSize = (_c = FONT_SIZE_MAP[this.size]) !== null && _c !== void 0 ? _c : 'var(--co-font-size-18)';
|
|
71
|
-
const showImage = this.type === 'image' && this.src && !this.imgFailed;
|
|
72
|
-
const ariaLabel = this.type === 'text'
|
|
73
|
-
? this.text
|
|
74
|
-
: this.type === 'image'
|
|
75
|
-
? (_e = (_d = this.alt) !== null && _d !== void 0 ? _d : this.text) !== null && _e !== void 0 ? _e : this.icon
|
|
76
|
-
: this.icon;
|
|
77
|
-
return (h("div", { key: '41da32ebacadf5fd33c9f6a10ac0069ddaa81ce6', class: {
|
|
78
|
-
'co-avatar': true,
|
|
79
|
-
[`co-avatar--${this.size}`]: true,
|
|
80
|
-
[`co-avatar--${this.type}`]: true,
|
|
81
|
-
'co-avatar--square': this.shape === 'square',
|
|
82
|
-
'co-avatar--light': !!this.color && isLightColor(this.color),
|
|
83
|
-
}, style: Object.assign(Object.assign({ width: `var(--co-avatar-size, ${dim}px)`, height: `var(--co-avatar-size, ${dim}px)`, fontSize }, (this.color ? { background: this.color } : {})), (this.ringColor
|
|
84
|
-
? { '--co-avatar-border-color': this.ringColor, '--co-avatar-border-width': '2px' }
|
|
85
|
-
: {})), part: "avatar", role: "img", "aria-label": ariaLabel }, showImage ? (h("img", { class: "co-avatar__img", src: this.src, alt: (_g = (_f = this.alt) !== null && _f !== void 0 ? _f : this.text) !== null && _g !== void 0 ? _g : '', onError: this.handleImgError })) : this.type === 'icon' ? (h("co-icon", { name: this.icon, weight: this.iconWeight, size: iconSize })) : (h("span", { class: "co-avatar__text" }, this.text))));
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
CoAvatar.style = coAvatarCss();
|
|
89
|
-
|
|
90
|
-
export { CoAvatar as co_avatar };
|
|
@@ -1,379 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, a as getElement } from './index-tT-aZV0-.js';
|
|
2
|
-
import { c as compareYMD, d as addDays, a as todayYMD, p as parseISO, g as getMonthMatrix, h as isDisabled, j as getWeekdayLabels } from './dates-tPYikBRJ.js';
|
|
3
|
-
import { z as zonedDateKey, b as zonedMinutesOfDay, a as toUtcISO, c as getWallClock, w as wallClockToEpoch } from './tz-B6JZk8fL.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* layout-month.ts — lane assignment for the month grid.
|
|
7
|
-
*
|
|
8
|
-
* Multi-day (all-day) events render as continuous bars spanning day cells; they
|
|
9
|
-
* must keep a stable vertical lane across the days they cover, and overlapping
|
|
10
|
-
* events must not share a lane. Single-day chips (timed events, single all-day)
|
|
11
|
-
* are degenerate one-column bars. Days exceeding `maxLanes` report an overflow
|
|
12
|
-
* count for the "+N more" affordance.
|
|
13
|
-
*
|
|
14
|
-
* Days are addressed by a week matrix of "YYYY-MM-DD" keys (e.g. from
|
|
15
|
-
* `getMonthMatrix` in `@prolibu-suite/cobalt-date-utils`). Lexicographic string
|
|
16
|
-
* comparison is correct for ISO dates, so no Date objects are needed here.
|
|
17
|
-
*/
|
|
18
|
-
/** Inclusive day span of an event in calendar days. */
|
|
19
|
-
function eventDaySpan(event, timeZone) {
|
|
20
|
-
if (event.allDay) {
|
|
21
|
-
// end is exclusive → last visible day is end - 1.
|
|
22
|
-
const firstDay = event.start.slice(0, 10);
|
|
23
|
-
const lastDay = addDays(event.end.slice(0, 10), -1);
|
|
24
|
-
if (compareYMD(lastDay, firstDay) < 0)
|
|
25
|
-
return { event, firstDay, lastDay: firstDay };
|
|
26
|
-
return { event, firstDay, lastDay };
|
|
27
|
-
}
|
|
28
|
-
// Timed events occupy their (wall-clock) start day in the month grid.
|
|
29
|
-
const day = timeZone ? zonedDateKey(event.startMs, timeZone) : event.start.slice(0, 10);
|
|
30
|
-
return { event, firstDay: day, lastDay: day };
|
|
31
|
-
}
|
|
32
|
-
function layoutMonth(events, weeks, options = {}) {
|
|
33
|
-
const maxLanes = options.maxLanes ?? Infinity;
|
|
34
|
-
const segments = [];
|
|
35
|
-
const overflow = {};
|
|
36
|
-
let laneCount = 0;
|
|
37
|
-
const spans = events
|
|
38
|
-
.map((e) => eventDaySpan(e, options.timeZone))
|
|
39
|
-
.filter((s) => s !== null);
|
|
40
|
-
weeks.forEach((days, weekIndex) => {
|
|
41
|
-
if (!days.length)
|
|
42
|
-
return;
|
|
43
|
-
const weekStart = days[0];
|
|
44
|
-
const weekEnd = days[days.length - 1];
|
|
45
|
-
const colOf = new Map(days.map((d, i) => [d, i]));
|
|
46
|
-
// Candidate segments intersecting this week.
|
|
47
|
-
const candidates = spans
|
|
48
|
-
.filter((s) => compareYMD(s.firstDay, weekEnd) <= 0 && compareYMD(weekStart, s.lastDay) <= 0)
|
|
49
|
-
.map((s) => {
|
|
50
|
-
const segFirst = compareYMD(s.firstDay, weekStart) >= 0 ? s.firstDay : weekStart;
|
|
51
|
-
const segLast = compareYMD(s.lastDay, weekEnd) <= 0 ? s.lastDay : weekEnd;
|
|
52
|
-
return {
|
|
53
|
-
span: s,
|
|
54
|
-
startCol: colOf.get(segFirst) ?? 0,
|
|
55
|
-
endCol: colOf.get(segLast) ?? days.length - 1,
|
|
56
|
-
};
|
|
57
|
-
})
|
|
58
|
-
// Multi-day/earlier events claim lanes first → stable, readable bars.
|
|
59
|
-
.sort((a, b) => a.startCol - b.startCol ||
|
|
60
|
-
b.endCol - b.startCol - (a.endCol - a.startCol) ||
|
|
61
|
-
a.span.event.startMs - b.span.event.startMs ||
|
|
62
|
-
(a.span.event.id < b.span.event.id ? -1 : 1));
|
|
63
|
-
const placed = [];
|
|
64
|
-
for (const cand of candidates) {
|
|
65
|
-
let lane = 0;
|
|
66
|
-
while (placed.some((p) => p.lane === lane && !(cand.endCol < p.startCol || cand.startCol > p.endCol))) {
|
|
67
|
-
lane++;
|
|
68
|
-
}
|
|
69
|
-
placed.push({ lane, startCol: cand.startCol, endCol: cand.endCol });
|
|
70
|
-
laneCount = Math.max(laneCount, lane + 1);
|
|
71
|
-
segments.push({
|
|
72
|
-
eventId: cand.span.event.id,
|
|
73
|
-
weekIndex,
|
|
74
|
-
lane,
|
|
75
|
-
startCol: cand.startCol,
|
|
76
|
-
endCol: cand.endCol,
|
|
77
|
-
isStart: compareYMD(cand.span.firstDay, weekStart) >= 0,
|
|
78
|
-
isEnd: compareYMD(cand.span.lastDay, weekEnd) <= 0,
|
|
79
|
-
continuesBefore: compareYMD(cand.span.firstDay, weekStart) < 0,
|
|
80
|
-
continuesAfter: compareYMD(cand.span.lastDay, weekEnd) > 0,
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
if (Number.isFinite(maxLanes)) {
|
|
85
|
-
for (const seg of segments) {
|
|
86
|
-
if (seg.lane >= maxLanes) {
|
|
87
|
-
for (let c = seg.startCol; c <= seg.endCol; c++) {
|
|
88
|
-
const dk = weeks[seg.weekIndex][c];
|
|
89
|
-
overflow[dk] = (overflow[dk] ?? 0) + 1;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
return { segments, overflow, laneCount };
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
const coCalendarMonthCss = () => `:host{display:block;font-family:var(--co-font-family-primary);--co-cal-daynum-h:24px;--co-cal-lane-h:22px;--co-cal-min-week-h:92px;--co-cal-gap:2px;--co-cal-surface:var(--co-semantic-surface-page);--co-cal-border:var(--co-semantic-border-default);--co-cal-text:var(--co-semantic-text-default);--co-cal-text-muted:var(--co-semantic-text-muted);--co-cal-hover:var(--co-semantic-surface-hover);--co-cal-today-ring:var(--co-color-primary-azul);--co-cal-event-bg:var(--co-color-primary-azul);--co-cal-event-border:transparent;--co-cal-event-text:var(--co-color-base-blanco, #fff);--co-cal-event-text-light:var(--co-color-base-blanco, #fff);--co-cal-event-text-dark:var(--co-semantic-text-default)}.cal-month{display:flex;flex-direction:column;border:1px solid var(--co-cal-border);border-radius:var(--co-border-radius-xs);overflow:hidden;background:var(--co-cal-surface)}.cal-month__dow{display:grid;grid-template-columns:repeat(7, 1fr);border-bottom:1px solid var(--co-cal-border)}.cal-month__dow-cell{padding:var(--co-spacing-xs) var(--co-spacing-sm);font-size:var(--co-font-size-10, 10px);font-weight:600;text-transform:uppercase;letter-spacing:0.04em;color:var(--co-cal-text-muted);text-align:right}.cal-month__week{position:relative;min-height:var(--co-cal-min-week-h)}.cal-month__week:not(:last-child){border-bottom:1px solid var(--co-cal-border)}.cal-month__days{display:grid;grid-template-columns:repeat(7, 1fr);height:100%;position:absolute;inset:0}.cal-month__day{border-right:1px solid var(--co-cal-border);padding:var(--co-spacing-xxs);cursor:pointer;transition:background 0.1s ease}.cal-month__day:last-child{border-right:0}.cal-month__day:hover{background:var(--co-cal-hover)}.cal-month__day:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:-2px}.cal-month__day--outside .cal-month__daynum{color:var(--co-cal-text-muted)}.cal-month__day--disabled{cursor:not-allowed;background:color-mix(in srgb, var(--co-cal-border) 20%, transparent)}.cal-month__day--drag-over{background:color-mix(in srgb, var(--co-cal-today-ring) 14%, transparent);box-shadow:inset 0 0 0 2px var(--co-cal-today-ring)}.cal-month__daynum{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;margin-left:auto;float:right;font-size:var(--co-font-size-12, 12px);color:var(--co-cal-text);border-radius:var(--co-border-radius-full)}.cal-month__day--today .cal-month__daynum{background:var(--co-cal-today-ring);color:var(--co-color-base-blanco, #fff);font-weight:600}.cal-month__events{position:absolute;inset:0;pointer-events:none;}.cal-chip,.cal-month__more{position:absolute;height:calc(var(--co-cal-lane-h) - 3px);box-sizing:border-box;pointer-events:auto;display:flex;align-items:center;gap:var(--co-spacing-xxs);margin:0 3px;padding:0 var(--co-spacing-xs);border:1px solid var(--co-cal-event-border);border-radius:var(--co-border-radius-xxs);font-family:inherit;font-size:var(--co-font-size-12, 12px);line-height:1;text-align:left;cursor:pointer;overflow:hidden;white-space:nowrap}.cal-chip{background:var(--co-cal-event-bg);color:var(--co-cal-event-text)}.cal-chip:hover{filter:brightness(0.95)}.cal-chip:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:1px}.cal-chip--all-day{font-weight:500}.cal-chip__dot{flex:0 0 auto;width:7px;height:7px;border-radius:var(--co-border-radius-full);background:var(--co-cal-event-bg)}.cal-chip:not(.cal-chip--all-day){background:transparent;color:var(--co-cal-text);border-color:transparent}.cal-chip:not(.cal-chip--all-day):hover{background:var(--co-cal-hover);filter:none}.cal-chip__time{flex:0 0 auto;color:var(--co-cal-text-muted);font-variant-numeric:tabular-nums}.cal-chip__title{overflow:hidden;text-overflow:ellipsis}.cal-chip__ext{flex:0 0 auto;opacity:0.8}.cal-chip--past{opacity:0.55}.cal-chip--locked{cursor:default}.cal-chip--external{border-style:dashed}.cal-chip--dragging{opacity:0.4}.cal-chip--continues-before{border-top-left-radius:0;border-bottom-left-radius:0;margin-left:0}.cal-chip--continues-after{border-top-right-radius:0;border-bottom-right-radius:0;margin-right:0}.cal-month__more{background:transparent;color:var(--co-cal-text-muted);border-color:transparent;font-weight:600;font-size:var(--co-font-size-11, 11px)}.cal-month__more:hover{background:var(--co-cal-hover);color:var(--co-cal-text)}`;
|
|
98
|
-
|
|
99
|
-
const CoCalendarMonth = class {
|
|
100
|
-
constructor(hostRef) {
|
|
101
|
-
registerInstance(this, hostRef);
|
|
102
|
-
this.coDaySelect = createEvent(this, "coDaySelect", 3);
|
|
103
|
-
this.coEventClick = createEvent(this, "coEventClick", 3);
|
|
104
|
-
this.coEventDrop = createEvent(this, "coEventDrop", 3);
|
|
105
|
-
this.coMoreClick = createEvent(this, "coMoreClick", 3);
|
|
106
|
-
/** Normalized events to render (from the engine's `normalizeEvents`). */
|
|
107
|
-
this.events = [];
|
|
108
|
-
/** BCP-47 locale for weekday labels. */
|
|
109
|
-
this.locale = 'es-CO';
|
|
110
|
-
/** First day of week, 0=Sun..6=Sat. */
|
|
111
|
-
this.firstDayOfWeek = 1;
|
|
112
|
-
/** Master interaction gate. */
|
|
113
|
-
this.editable = true;
|
|
114
|
-
/** Allow empty-day click to request a create. */
|
|
115
|
-
this.selectable = true;
|
|
116
|
-
/** Max event lanes per day before "+N more". */
|
|
117
|
-
this.maxLanes = 3;
|
|
118
|
-
/** Day currently hovered while dragging an event. */
|
|
119
|
-
this.dragOverDate = null;
|
|
120
|
-
/** Id of the event being dragged. */
|
|
121
|
-
this.dragId = null;
|
|
122
|
-
this.onPointerUp = () => this.finishDrag();
|
|
123
|
-
this.handleKeyDown = (e) => {
|
|
124
|
-
const cur = this.focused;
|
|
125
|
-
let handled = true;
|
|
126
|
-
switch (e.key) {
|
|
127
|
-
case 'ArrowLeft':
|
|
128
|
-
this.moveFocus(addDays(cur, -1));
|
|
129
|
-
break;
|
|
130
|
-
case 'ArrowRight':
|
|
131
|
-
this.moveFocus(addDays(cur, 1));
|
|
132
|
-
break;
|
|
133
|
-
case 'ArrowUp':
|
|
134
|
-
this.moveFocus(addDays(cur, -7));
|
|
135
|
-
break;
|
|
136
|
-
case 'ArrowDown':
|
|
137
|
-
this.moveFocus(addDays(cur, 7));
|
|
138
|
-
break;
|
|
139
|
-
case 'Enter':
|
|
140
|
-
case ' ':
|
|
141
|
-
this.selectDay(cur);
|
|
142
|
-
break;
|
|
143
|
-
default:
|
|
144
|
-
handled = false;
|
|
145
|
-
}
|
|
146
|
-
if (handled) {
|
|
147
|
-
e.preventDefault();
|
|
148
|
-
e.stopPropagation();
|
|
149
|
-
}
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
componentWillLoad() {
|
|
153
|
-
this.focused = this.defaultFocus();
|
|
154
|
-
}
|
|
155
|
-
connectedCallback() {
|
|
156
|
-
window.addEventListener('pointerup', this.onPointerUp);
|
|
157
|
-
}
|
|
158
|
-
disconnectedCallback() {
|
|
159
|
-
window.removeEventListener('pointerup', this.onPointerUp);
|
|
160
|
-
}
|
|
161
|
-
defaultFocus() {
|
|
162
|
-
const first = `${pad4(this.year)}-${pad2(this.month)}-01`;
|
|
163
|
-
const today = todayYMD();
|
|
164
|
-
const t = parseISO(today);
|
|
165
|
-
return t.year === this.year && t.month === this.month ? today : first;
|
|
166
|
-
}
|
|
167
|
-
get matrix() {
|
|
168
|
-
return getMonthMatrix(this.year, this.month, this.firstDayOfWeek).map((row) => row.map((c) => c.value));
|
|
169
|
-
}
|
|
170
|
-
eventById(id) {
|
|
171
|
-
return this.events.find((e) => e.id === id);
|
|
172
|
-
}
|
|
173
|
-
isDayInteractable(date) {
|
|
174
|
-
return !isDisabled(date, { min: this.minDate, max: this.maxDate });
|
|
175
|
-
}
|
|
176
|
-
// ── Selection / activation ──────────────────────────────────────────────
|
|
177
|
-
selectDay(date) {
|
|
178
|
-
if (!this.selectable || !this.isDayInteractable(date))
|
|
179
|
-
return;
|
|
180
|
-
this.coDaySelect.emit({ date });
|
|
181
|
-
}
|
|
182
|
-
activateEvent(id) {
|
|
183
|
-
this.coEventClick.emit({ id });
|
|
184
|
-
}
|
|
185
|
-
// ── Keyboard (WAI-ARIA grid, forked from co-calendar) ───────────────────
|
|
186
|
-
moveFocus(next) {
|
|
187
|
-
this.focused = next;
|
|
188
|
-
requestAnimationFrame(() => this.focusCell());
|
|
189
|
-
}
|
|
190
|
-
focusCell() {
|
|
191
|
-
var _a, _b;
|
|
192
|
-
(_b = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(`[data-date="${this.focused}"]`)) === null || _b === void 0 ? void 0 : _b.focus();
|
|
193
|
-
}
|
|
194
|
-
// ── Drag-move (day granularity) ─────────────────────────────────────────
|
|
195
|
-
startDrag(e, id) {
|
|
196
|
-
const ev = this.eventById(id);
|
|
197
|
-
if (!ev || !this.editable || ev.editable === false || ev.startEditable === false)
|
|
198
|
-
return;
|
|
199
|
-
e.preventDefault();
|
|
200
|
-
e.stopPropagation();
|
|
201
|
-
this.dragId = id;
|
|
202
|
-
this.dragOverDate = null;
|
|
203
|
-
}
|
|
204
|
-
finishDrag() {
|
|
205
|
-
const id = this.dragId;
|
|
206
|
-
const target = this.dragOverDate;
|
|
207
|
-
this.dragId = null;
|
|
208
|
-
this.dragOverDate = null;
|
|
209
|
-
if (!id || !target)
|
|
210
|
-
return;
|
|
211
|
-
const ev = this.eventById(id);
|
|
212
|
-
if (!ev)
|
|
213
|
-
return;
|
|
214
|
-
const originDay = ev.allDay
|
|
215
|
-
? ev.start.slice(0, 10)
|
|
216
|
-
: zonedDateKey(ev.startMs, this.timeZone);
|
|
217
|
-
const deltaDays = daysBetween(originDay, target);
|
|
218
|
-
if (deltaDays === 0)
|
|
219
|
-
return;
|
|
220
|
-
if (!this.isDayInteractable(target))
|
|
221
|
-
return;
|
|
222
|
-
const shifted = shiftEventByDays(ev, deltaDays, this.timeZone);
|
|
223
|
-
this.coEventDrop.emit({
|
|
224
|
-
id,
|
|
225
|
-
start: shifted.start,
|
|
226
|
-
end: shifted.end,
|
|
227
|
-
oldStart: ev.start,
|
|
228
|
-
oldEnd: ev.end,
|
|
229
|
-
allDay: ev.allDay,
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
// ── Render ──────────────────────────────────────────────────────────────
|
|
233
|
-
renderChip(seg, weekDays) {
|
|
234
|
-
var _a;
|
|
235
|
-
const ev = this.eventById(seg.eventId);
|
|
236
|
-
if (!ev)
|
|
237
|
-
return null;
|
|
238
|
-
const cols = weekDays.length;
|
|
239
|
-
const left = (seg.startCol / cols) * 100;
|
|
240
|
-
const width = ((seg.endCol - seg.startCol + 1) / cols) * 100;
|
|
241
|
-
const isPast = ev.endMs <= Date.now();
|
|
242
|
-
const isExternal = ((_a = ev.extendedProps) === null || _a === void 0 ? void 0 : _a.isExternal) === true;
|
|
243
|
-
const locked = !this.editable || ev.editable === false;
|
|
244
|
-
const timeText = ev.allDay || !seg.isStart
|
|
245
|
-
? ''
|
|
246
|
-
: minutesToLabel(zonedMinutesOfDay(ev.startMs, this.timeZone), this.locale);
|
|
247
|
-
const style = {
|
|
248
|
-
left: `${left}%`,
|
|
249
|
-
width: `${width}%`,
|
|
250
|
-
top: `calc(var(--co-cal-daynum-h) + ${seg.lane} * var(--co-cal-lane-h))`,
|
|
251
|
-
};
|
|
252
|
-
if (ev.backgroundColor) {
|
|
253
|
-
style['--co-cal-event-bg'] = ev.backgroundColor;
|
|
254
|
-
style['--co-cal-event-text'] = readableText(ev.backgroundColor);
|
|
255
|
-
}
|
|
256
|
-
if (ev.borderColor)
|
|
257
|
-
style['--co-cal-event-border'] = ev.borderColor;
|
|
258
|
-
return (h("button", { type: "button", key: `${seg.eventId}-${seg.weekIndex}`, class: {
|
|
259
|
-
'cal-chip': true,
|
|
260
|
-
'cal-chip--all-day': ev.allDay,
|
|
261
|
-
'cal-chip--past': isPast,
|
|
262
|
-
'cal-chip--external': isExternal,
|
|
263
|
-
'cal-chip--locked': locked,
|
|
264
|
-
'cal-chip--dragging': this.dragId === ev.id,
|
|
265
|
-
'cal-chip--continues-before': seg.continuesBefore,
|
|
266
|
-
'cal-chip--continues-after': seg.continuesAfter,
|
|
267
|
-
}, style: style, title: ev.title, "aria-label": ev.title, onClick: (e) => {
|
|
268
|
-
e.stopPropagation();
|
|
269
|
-
this.activateEvent(ev.id);
|
|
270
|
-
}, onPointerDown: (e) => this.startDrag(e, ev.id) }, !ev.allDay && h("span", { class: "cal-chip__dot", "aria-hidden": "true" }), timeText && h("span", { class: "cal-chip__time" }, timeText), h("span", { class: "cal-chip__title" }, ev.title || '—'), isExternal && h("co-icon", { name: "link", size: 11, class: "cal-chip__ext" })));
|
|
271
|
-
}
|
|
272
|
-
render() {
|
|
273
|
-
var _a;
|
|
274
|
-
const matrix = this.matrix;
|
|
275
|
-
const normalized = this.events;
|
|
276
|
-
const layout = layoutMonth(normalized, matrix, {
|
|
277
|
-
maxLanes: this.maxLanes,
|
|
278
|
-
timeZone: this.timeZone,
|
|
279
|
-
});
|
|
280
|
-
const segByWeek = new Map();
|
|
281
|
-
for (const seg of layout.segments) {
|
|
282
|
-
if (seg.lane >= this.maxLanes)
|
|
283
|
-
continue;
|
|
284
|
-
const arr = (_a = segByWeek.get(seg.weekIndex)) !== null && _a !== void 0 ? _a : [];
|
|
285
|
-
arr.push(seg);
|
|
286
|
-
segByWeek.set(seg.weekIndex, arr);
|
|
287
|
-
}
|
|
288
|
-
const short = getWeekdayLabels(this.locale, this.firstDayOfWeek, 'short');
|
|
289
|
-
const long = getWeekdayLabels(this.locale, this.firstDayOfWeek, 'long');
|
|
290
|
-
const today = todayYMD();
|
|
291
|
-
return (h("div", { key: '94afb2cd963e8292d09dda372b7f115e235c8cd3', class: "cal-month", part: "grid", role: "grid", onKeyDown: this.handleKeyDown }, h("div", { key: '381021f254ac5f36d3d59e108cbe64f7f4fb1b91', class: "cal-month__dow", role: "row" }, short.map((lbl, i) => (h("span", { class: "cal-month__dow-cell", role: "columnheader", "aria-label": long[i] }, lbl)))), matrix.map((week, wi) => {
|
|
292
|
-
var _a;
|
|
293
|
-
return (h("div", { class: "cal-month__week", role: "row" }, h("div", { class: "cal-month__days" }, week.map((date) => {
|
|
294
|
-
const ymd = parseISO(date);
|
|
295
|
-
const inMonth = ymd.month === this.month;
|
|
296
|
-
const isToday = compareYMD(date, today) === 0;
|
|
297
|
-
const isFocused = compareYMD(date, this.focused) === 0;
|
|
298
|
-
const interactable = this.isDayInteractable(date);
|
|
299
|
-
return (h("div", { role: "gridcell", "data-date": date, tabIndex: isFocused ? 0 : -1, "aria-current": isToday ? 'date' : undefined, "aria-disabled": interactable ? undefined : 'true', class: {
|
|
300
|
-
'cal-month__day': true,
|
|
301
|
-
'cal-month__day--outside': !inMonth,
|
|
302
|
-
'cal-month__day--today': isToday,
|
|
303
|
-
'cal-month__day--disabled': !interactable,
|
|
304
|
-
'cal-month__day--drag-over': this.dragId !== null && this.dragOverDate === date,
|
|
305
|
-
}, onClick: () => this.selectDay(date), onPointerEnter: () => {
|
|
306
|
-
if (this.dragId)
|
|
307
|
-
this.dragOverDate = date;
|
|
308
|
-
} }, h("span", { class: "cal-month__daynum" }, ymd.day)));
|
|
309
|
-
})), h("div", { class: "cal-month__events" }, ((_a = segByWeek.get(wi)) !== null && _a !== void 0 ? _a : []).map((seg) => this.renderChip(seg, week)), week.map((date, col) => {
|
|
310
|
-
var _a;
|
|
311
|
-
const more = (_a = layout.overflow[date]) !== null && _a !== void 0 ? _a : 0;
|
|
312
|
-
if (more <= 0)
|
|
313
|
-
return null;
|
|
314
|
-
return (h("button", { type: "button", class: "cal-month__more", style: {
|
|
315
|
-
left: `${(col / week.length) * 100}%`,
|
|
316
|
-
width: `${(1 / week.length) * 100}%`,
|
|
317
|
-
top: `calc(var(--co-cal-daynum-h) + ${this.maxLanes} * var(--co-cal-lane-h))`,
|
|
318
|
-
}, onClick: (e) => {
|
|
319
|
-
e.stopPropagation();
|
|
320
|
-
this.coMoreClick.emit({ date });
|
|
321
|
-
} }, "+", more));
|
|
322
|
-
}))));
|
|
323
|
-
})));
|
|
324
|
-
}
|
|
325
|
-
get el() { return getElement(this); }
|
|
326
|
-
};
|
|
327
|
-
// ── helpers ─────────────────────────────────────────────────────────────────
|
|
328
|
-
function pad2(n) {
|
|
329
|
-
return String(n).padStart(2, '0');
|
|
330
|
-
}
|
|
331
|
-
function pad4(n) {
|
|
332
|
-
return String(n).padStart(4, '0');
|
|
333
|
-
}
|
|
334
|
-
/** Whole-day delta between two "YYYY-MM-DD" using UTC-midnight arithmetic. */
|
|
335
|
-
function daysBetween(a, b) {
|
|
336
|
-
const [ay, am, ad] = a.split('-').map(Number);
|
|
337
|
-
const [by, bm, bd] = b.split('-').map(Number);
|
|
338
|
-
return Math.round((Date.UTC(by, bm - 1, bd) - Date.UTC(ay, am - 1, ad)) / 86400000);
|
|
339
|
-
}
|
|
340
|
-
/** Shift an event by N days, preserving wall-clock time (DST-correct for timed). */
|
|
341
|
-
function shiftEventByDays(ev, deltaDays, timeZone) {
|
|
342
|
-
if (ev.allDay) {
|
|
343
|
-
return {
|
|
344
|
-
start: addDays(ev.start.slice(0, 10), deltaDays),
|
|
345
|
-
end: addDays(ev.end.slice(0, 10), deltaDays),
|
|
346
|
-
};
|
|
347
|
-
}
|
|
348
|
-
return {
|
|
349
|
-
start: toUtcISO(shiftInstant(ev.startMs, deltaDays, timeZone)),
|
|
350
|
-
end: toUtcISO(shiftInstant(ev.endMs, deltaDays, timeZone)),
|
|
351
|
-
};
|
|
352
|
-
}
|
|
353
|
-
function shiftInstant(ms, deltaDays, timeZone) {
|
|
354
|
-
const wc = getWallClock(ms, timeZone);
|
|
355
|
-
const newDate = addDays(`${pad4(wc.year)}-${pad2(wc.month)}-${pad2(wc.day)}`, deltaDays);
|
|
356
|
-
const [y, m, d] = newDate.split('-').map(Number);
|
|
357
|
-
return wallClockToEpoch({ year: y, month: m, day: d, hour: wc.hour, minute: wc.minute, second: wc.second }, timeZone);
|
|
358
|
-
}
|
|
359
|
-
/** Short localized time label, e.g. "9:00 a. m." / "09:00". */
|
|
360
|
-
function minutesToLabel(minutes, locale) {
|
|
361
|
-
const h = Math.floor(minutes / 60);
|
|
362
|
-
const m = minutes % 60;
|
|
363
|
-
return new Intl.DateTimeFormat(locale, { hour: 'numeric', minute: '2-digit' }).format(new Date(2000, 0, 1, h, m));
|
|
364
|
-
}
|
|
365
|
-
/** Pick a readable text token for an arbitrary background color (YIQ luminance). */
|
|
366
|
-
function readableText(bg) {
|
|
367
|
-
const hex = bg.replace('#', '').trim();
|
|
368
|
-
if (hex.length !== 3 && hex.length !== 6)
|
|
369
|
-
return 'var(--co-cal-event-text)';
|
|
370
|
-
const full = hex.length === 3 ? hex.split('').map((c) => c + c).join('') : hex;
|
|
371
|
-
const r = parseInt(full.slice(0, 2), 16);
|
|
372
|
-
const g = parseInt(full.slice(2, 4), 16);
|
|
373
|
-
const b = parseInt(full.slice(4, 6), 16);
|
|
374
|
-
const yiq = (r * 299 + g * 587 + b * 114) / 1000;
|
|
375
|
-
return yiq >= 150 ? 'var(--co-cal-event-text-dark)' : 'var(--co-cal-event-text-light)';
|
|
376
|
-
}
|
|
377
|
-
CoCalendarMonth.style = coCalendarMonthCss();
|
|
378
|
-
|
|
379
|
-
export { CoCalendarMonth as co_calendar_month };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-tT-aZV0-.js';
|
|
2
|
-
|
|
3
|
-
const coSkeletonCss = () => `:host{display:block}.co-skeleton{height:1em;border-radius:var(--co-border-radius-xs);background:linear-gradient( 90deg, var(--co-semantic-surface-secondary) 0%, var(--co-semantic-surface-hover, rgba(0, 0, 0, 0.04)) 50%, var(--co-semantic-surface-secondary) 100% );background-size:200% 100%;animation:co-skeleton-sweep 1.2s ease-in-out infinite}.co-skeleton--text{border-radius:var(--co-border-radius-xxs)}.co-skeleton--circle{border-radius:var(--co-border-radius-full)}@keyframes co-skeleton-sweep{0%{background-position:200% 0}100%{background-position:-200% 0}}@media (prefers-reduced-motion: reduce){.co-skeleton{animation:none}}`;
|
|
4
|
-
|
|
5
|
-
const CoSkeleton = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
/** rect (default) | text (radio menor) | circle */
|
|
9
|
-
this.variant = 'rect';
|
|
10
|
-
/** Ancho CSS (default 100%) */
|
|
11
|
-
this.width = '100%';
|
|
12
|
-
/** Alto CSS (default por variante en CSS) */
|
|
13
|
-
this.height = '';
|
|
14
|
-
}
|
|
15
|
-
render() {
|
|
16
|
-
const style = { width: this.width };
|
|
17
|
-
if (this.height)
|
|
18
|
-
style.height = this.height;
|
|
19
|
-
return (h("div", { key: 'e62aec4781b1ef8b7b4fa2ba423cf9e94184646a', class: { 'co-skeleton': true, [`co-skeleton--${this.variant}`]: true }, part: "skeleton", style: style, "aria-hidden": "true" }));
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
CoSkeleton.style = coSkeletonCss();
|
|
23
|
-
|
|
24
|
-
export { CoSkeleton as co_skeleton };
|