@prolibu-suite/cobalt-core 0.4.0 → 0.5.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/README.md +3 -3
- package/custom-elements.json +317 -153
- package/dist/cjs/co-accordion.cjs.entry.js +4 -4
- package/dist/cjs/co-app-shell.cjs.entry.js +3 -3
- package/dist/cjs/co-autocomplete.cjs.entry.js +38 -73
- package/dist/cjs/co-avatar-group.cjs.entry.js +3 -3
- package/dist/cjs/co-avatar.cjs.entry.js +2 -2
- 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 +3 -3
- package/dist/cjs/co-calendar-month.cjs.entry.js +2 -2
- package/dist/cjs/co-calendar_3.cjs.entry.js +19 -14
- package/dist/cjs/co-card.cjs.entry.js +3 -3
- package/dist/cjs/co-checkbox-group.cjs.entry.js +4 -4
- package/dist/cjs/co-checkbox.cjs.entry.js +4 -4
- package/dist/cjs/co-chip_2.cjs.entry.js +485 -0
- package/dist/cjs/co-color-picker.cjs.entry.js +4 -4
- package/dist/cjs/co-column-picker.cjs.entry.js +3 -3
- package/dist/cjs/co-combobox.cjs.entry.js +51 -82
- package/dist/cjs/co-command-search.cjs.entry.js +20 -59
- package/dist/cjs/co-data-table-pagination.cjs.entry.js +5 -5
- package/dist/cjs/co-data-table.cjs.entry.js +54 -5
- package/dist/cjs/co-date-picker.cjs.entry.js +2 -2
- package/dist/cjs/co-date-range-picker.cjs.entry.js +3 -3
- package/dist/cjs/co-date-range.cjs.entry.js +2 -2
- package/dist/cjs/co-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 +4 -4
- package/dist/cjs/co-event-calendar.cjs.entry.js +3 -3
- package/dist/cjs/co-fab.cjs.entry.js +5 -5
- package/dist/cjs/co-file-field.cjs.entry.js +7 -7
- 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 +3 -3
- package/dist/cjs/co-json-field.cjs.entry.js +5 -5
- package/dist/cjs/co-lightbox.cjs.entry.js +6 -6
- 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 +2 -2
- 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 +12 -3
- package/dist/cjs/co-progress-bar.cjs.entry.js +4 -4
- package/dist/cjs/co-progress-circle.cjs.entry.js +3 -3
- package/dist/cjs/co-radio-group.cjs.entry.js +4 -4
- 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 +31 -135
- 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-rich-text-viewer.cjs.entry.js +1 -1
- package/dist/cjs/co-row.cjs.entry.js +3 -3
- package/dist/cjs/co-segmented-bar.cjs.entry.js +3 -3
- package/dist/cjs/co-select.cjs.entry.js +7 -7
- package/dist/cjs/co-separator.cjs.entry.js +2 -2
- package/dist/cjs/co-sidebar-nav.cjs.entry.js +10 -8
- package/dist/cjs/co-sidebar.cjs.entry.js +3 -3
- package/dist/cjs/co-skeleton.cjs.entry.js +2 -2
- package/dist/cjs/co-slider.cjs.entry.js +3 -3
- package/dist/cjs/co-switch.cjs.entry.js +6 -6
- package/dist/cjs/co-tab-group.cjs.entry.js +10 -4
- package/dist/cjs/co-tab.cjs.entry.js +5 -5
- package/dist/cjs/co-tags-field.cjs.entry.js +8 -8
- package/dist/cjs/co-textarea.cjs.entry.js +6 -6
- package/dist/cjs/co-toast.cjs.entry.js +3 -3
- 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-tooltip.cjs.entry.js +3 -3
- package/dist/cjs/co-transfer-list.cjs.entry.js +3 -3
- package/dist/cjs/co-video.cjs.entry.js +4 -4
- package/dist/cjs/cobalt.cjs.js +2 -2
- package/dist/cjs/{fieldChip-DtYUP0VZ.js → fieldChip-D8YJCyQF.js} +1 -1
- package/dist/cjs/{index-NNvye1ul.js → index-DxEFsH_t.js} +9 -13
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{requiredMark-DyjZzUCd.js → requiredMark-B3pKyqYI.js} +1 -1
- package/dist/cobalt/cobalt.css +1 -1
- package/dist/cobalt/cobalt.esm.js +1 -1
- package/dist/cobalt/{p-69289e82.entry.js → p-002e5beb.entry.js} +1 -1
- package/dist/cobalt/{p-c23a2ff6.entry.js → p-02c5a9a9.entry.js} +1 -1
- package/dist/cobalt/{p-9310739f.entry.js → p-075eed3d.entry.js} +1 -1
- package/dist/cobalt/p-0c0621a7.entry.js +1 -0
- package/dist/cobalt/{p-20c68308.entry.js → p-0d6a562d.entry.js} +1 -1
- package/dist/cobalt/p-0d7536a8.entry.js +1 -0
- package/dist/cobalt/{p-f72f0e38.entry.js → p-13fc9c8a.entry.js} +1 -1
- package/dist/cobalt/{p-39a29bbb.entry.js → p-14d4c5c7.entry.js} +1 -1
- package/dist/cobalt/{p-96baec0e.entry.js → p-1681ce1d.entry.js} +1 -1
- package/dist/cobalt/{p-593fd213.entry.js → p-1726ce07.entry.js} +1 -1
- package/dist/cobalt/{p-7d9f2021.entry.js → p-20ba59a2.entry.js} +1 -1
- package/dist/cobalt/{p-35c63fdc.entry.js → p-2d1cbd7f.entry.js} +1 -1
- package/dist/cobalt/{p-7040e4c5.entry.js → p-373cd08e.entry.js} +1 -1
- package/dist/cobalt/{p-4aeefe3f.entry.js → p-3f06d373.entry.js} +1 -1
- package/dist/cobalt/{p-8fdf2163.entry.js → p-3f68fd2e.entry.js} +1 -1
- package/dist/cobalt/{p-ca108c6d.entry.js → p-47a2dd67.entry.js} +1 -1
- package/dist/cobalt/{p-328f0470.entry.js → p-495c9b99.entry.js} +1 -1
- package/dist/cobalt/p-4a075257.entry.js +1 -0
- package/dist/cobalt/{p-aa1ad9fa.entry.js → p-5647ca9d.entry.js} +1 -1
- package/dist/cobalt/{p-3d07e4a9.entry.js → p-5b31d45b.entry.js} +1 -1
- package/dist/cobalt/p-5c3101b5.entry.js +1 -0
- package/dist/cobalt/{p-0e1afdea.entry.js → p-5c43d30e.entry.js} +1 -1
- package/dist/cobalt/{p-c85a6a9e.entry.js → p-5e9a9caf.entry.js} +1 -1
- package/dist/cobalt/{p-b4dcc260.entry.js → p-5edd0d3f.entry.js} +1 -1
- package/dist/cobalt/{p-d7c9cf93.entry.js → p-627d2d1a.entry.js} +1 -1
- package/dist/cobalt/{p-e8e752f9.entry.js → p-6911a034.entry.js} +1 -1
- package/dist/cobalt/{p-1388eac6.entry.js → p-6ad1625a.entry.js} +1 -1
- package/dist/cobalt/{p-c682453a.entry.js → p-70f70e02.entry.js} +1 -1
- package/dist/cobalt/p-73b30ebb.entry.js +1 -0
- package/dist/cobalt/p-771bc8fe.entry.js +1 -0
- package/dist/cobalt/p-7780ddb5.entry.js +1 -0
- package/dist/cobalt/{p-e55fb916.entry.js → p-77d01b39.entry.js} +1 -1
- package/dist/cobalt/p-7FZXeBK4.js +1 -0
- package/dist/cobalt/{p-6a3ed174.entry.js → p-7a3fb93b.entry.js} +1 -1
- package/dist/cobalt/{p-860a685f.entry.js → p-809015dd.entry.js} +1 -1
- package/dist/cobalt/{p-d403d9c4.entry.js → p-8128e84a.entry.js} +1 -1
- package/dist/cobalt/p-81cfd951.entry.js +1 -0
- package/dist/cobalt/p-82ce1178.entry.js +1 -0
- package/dist/cobalt/{p-dd03c00b.entry.js → p-85eed52c.entry.js} +1 -1
- package/dist/cobalt/p-86d4e016.entry.js +1 -0
- package/dist/cobalt/{p-3dd6b57b.entry.js → p-86e60cfa.entry.js} +1 -1
- package/dist/cobalt/p-8a9ed2da.entry.js +1 -0
- package/dist/cobalt/{p-fb86cdb9.entry.js → p-8dfb6886.entry.js} +1 -1
- package/dist/cobalt/{p-d4086c34.entry.js → p-8e823c15.entry.js} +1 -1
- package/dist/cobalt/{p-08519a7c.entry.js → p-9a587867.entry.js} +1 -1
- package/dist/cobalt/{p-376c43b8.entry.js → p-9c6ca902.entry.js} +1 -1
- package/dist/cobalt/{p-bae82095.entry.js → p-9c873a6a.entry.js} +1 -1
- package/dist/cobalt/{p-BxzuCRMr.js → p-BAA4ln31.js} +1 -1
- package/dist/cobalt/{p-b8200f7f.entry.js → p-a6900010.entry.js} +1 -1
- package/dist/cobalt/p-a9afbaa6.entry.js +1 -0
- package/dist/cobalt/{p-2d4e1ca8.entry.js → p-aa20ffca.entry.js} +1 -1
- package/dist/cobalt/{p-e93644cb.entry.js → p-ac5df270.entry.js} +1 -1
- package/dist/cobalt/{p-8ae5da0c.entry.js → p-af4cb263.entry.js} +1 -1
- package/dist/cobalt/p-b1197c08.entry.js +1 -0
- package/dist/cobalt/p-b4bed98b.entry.js +1 -0
- package/dist/cobalt/{p-1cecb9e1.entry.js → p-b8ec0cc1.entry.js} +1 -1
- package/dist/cobalt/p-ba66584f.entry.js +1 -0
- package/dist/cobalt/{p-ff6be242.entry.js → p-bb534985.entry.js} +1 -1
- package/dist/cobalt/{p-6f12e721.entry.js → p-c0f39ddd.entry.js} +1 -1
- package/dist/cobalt/{p-804d025f.entry.js → p-c1e53e4c.entry.js} +1 -1
- package/dist/cobalt/p-c2e2eee9.entry.js +1 -0
- package/dist/cobalt/{p-af0495d8.entry.js → p-c3462def.entry.js} +1 -1
- package/dist/cobalt/p-c6fedc59.entry.js +1 -0
- package/dist/cobalt/{p-f6b93f17.entry.js → p-c750b2d2.entry.js} +1 -1
- package/dist/cobalt/{p-363a5262.entry.js → p-cc0a4617.entry.js} +1 -1
- package/dist/cobalt/{p-1af6ef83.entry.js → p-cc8e2f16.entry.js} +1 -1
- package/dist/cobalt/{p-c857b9ff.entry.js → p-d9608046.entry.js} +1 -1
- package/dist/cobalt/{p-be3e61f4.entry.js → p-e1957078.entry.js} +1 -1
- package/dist/cobalt/{p-a0749d7b.entry.js → p-e2762263.entry.js} +1 -1
- package/dist/cobalt/{p-21916f82.entry.js → p-e33853fa.entry.js} +1 -1
- package/dist/cobalt/p-e420d5c9.entry.js +1 -0
- package/dist/cobalt/{p-304c3be1.entry.js → p-e4a539da.entry.js} +1 -1
- package/dist/cobalt/{p-0be124d5.entry.js → p-e7085f08.entry.js} +1 -1
- package/dist/cobalt/p-e710b9ea.entry.js +1 -0
- package/dist/cobalt/p-e9aaeaf7.entry.js +1 -0
- package/dist/cobalt/{p-79e49749.entry.js → p-f073b467.entry.js} +1 -1
- package/dist/cobalt/p-f0de4415.entry.js +1 -0
- package/dist/cobalt/p-f36e461f.entry.js +1 -0
- package/dist/cobalt/p-f6ac5301.entry.js +1 -0
- package/dist/cobalt/{p-58aed8d6.entry.js → p-f6b0c4a0.entry.js} +1 -1
- package/dist/cobalt/p-f86ccb38.entry.js +1 -0
- package/dist/cobalt/{p-d7cbb4c7.entry.js → p-fb251497.entry.js} +1 -1
- package/dist/cobalt/p-fd27c2bd.entry.js +1 -0
- package/dist/cobalt/p-tT-aZV0-.js +2 -0
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/co-accordion/co-accordion.css +20 -8
- package/dist/collection/components/co-accordion/co-accordion.js +5 -2
- package/dist/collection/components/co-app-shell/co-app-shell.js +2 -2
- package/dist/collection/components/co-autocomplete/co-autocomplete.css +4 -751
- package/dist/collection/components/co-autocomplete/co-autocomplete.js +41 -76
- package/dist/collection/components/co-avatar/co-avatar.js +1 -1
- 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.js +2 -2
- package/dist/collection/components/co-button-group/co-button-group.js +2 -2
- package/dist/collection/components/co-calendar/co-calendar.css +12 -12
- package/dist/collection/components/co-calendar/co-calendar.js +1 -1
- package/dist/collection/components/co-calendar-month/co-calendar-month.js +1 -1
- package/dist/collection/components/co-card/co-card.js +2 -2
- package/dist/collection/components/co-checkbox/co-checkbox.js +3 -3
- package/dist/collection/components/co-checkbox-group/co-checkbox-group.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-combobox/co-combobox.css +6 -830
- package/dist/collection/components/co-combobox/co-combobox.js +73 -84
- package/dist/collection/components/co-command-search/co-command-search.css +2 -60
- package/dist/collection/components/co-command-search/co-command-search.js +23 -48
- package/dist/collection/components/co-data-table/co-data-table.css +42 -7
- package/dist/collection/components/co-data-table/co-data-table.js +108 -3
- package/dist/collection/components/co-data-table-pagination/co-data-table-pagination.js +4 -4
- package/dist/collection/components/co-date-field/co-date-field.css +4 -7
- package/dist/collection/components/co-date-field/co-date-field.js +4 -4
- package/dist/collection/components/co-date-range/co-date-range.js +1 -1
- package/dist/collection/components/co-date-range-picker/co-date-range-picker.css +9 -9
- package/dist/collection/components/co-drawer/co-drawer.css +49 -13
- package/dist/collection/components/co-drawer/co-drawer.js +9 -4
- 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.css +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.js +2 -2
- package/dist/collection/components/co-fab/co-fab.css +8 -1
- package/dist/collection/components/co-fab/co-fab.js +24 -5
- 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 +9 -6
- package/dist/collection/components/co-json-field/co-json-field.js +3 -3
- package/dist/collection/components/co-lightbox/co-lightbox.css +2 -2
- 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 +1 -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 +10 -11
- package/dist/collection/components/co-number-field/co-number-field.js +2 -2
- package/dist/collection/components/co-option-list/co-option-list.css +796 -58
- package/dist/collection/components/co-option-list/co-option-list.js +45 -6
- 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 +4 -7
- package/dist/collection/components/co-phone-field/co-phone-field.js +1 -1
- package/dist/collection/components/co-popover/co-popover.js +11 -2
- package/dist/collection/components/co-progress-bar/co-progress-bar.css +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-radio/co-radio.js +3 -3
- package/dist/collection/components/co-radio-group/co-radio-group.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 +6 -897
- package/dist/collection/components/co-ref-field/co-ref-field.js +0 -0
- package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.css +1 -1
- package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.js +2 -2
- package/dist/collection/components/co-row/co-row.js +2 -2
- package/dist/collection/components/co-segmented-bar/co-segmented-bar.js +2 -2
- package/dist/collection/components/co-select/co-select.css +4 -7
- package/dist/collection/components/co-select/co-select.js +4 -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.css +8 -6
- package/dist/collection/components/co-sidebar-nav/co-sidebar-nav.js +8 -6
- 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.css +3 -1
- package/dist/collection/components/co-switch/co-switch.js +3 -3
- package/dist/collection/components/co-tab/co-tab.css +39 -4
- package/dist/collection/components/co-tab/co-tab.js +6 -6
- package/dist/collection/components/co-tab-group/co-tab-group.css +11 -0
- package/dist/collection/components/co-tab-group/co-tab-group.js +10 -4
- 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-toast/co-toast.js +2 -2
- 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-transfer-list/co-transfer-list.js +2 -2
- package/dist/collection/components/co-video/co-video.css +2 -2
- package/dist/collection/components/co-video/co-video.js +2 -2
- package/dist/components/co-accordion.js +1 -1
- package/dist/components/co-app-shell.js +1 -1
- package/dist/components/co-autocomplete.js +1 -1
- package/dist/components/co-avatar-group.js +1 -1
- package/dist/components/co-avatar.js +1 -1
- package/dist/components/co-badge.js +1 -1
- package/dist/components/co-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.js +1 -1
- package/dist/components/co-card.js +1 -1
- package/dist/components/co-checkbox-group.js +1 -1
- package/dist/components/co-checkbox.js +1 -1
- package/dist/components/co-chip.js +1 -1
- package/dist/components/co-color-picker.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-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-fab.js +1 -1
- package/dist/components/co-file-field.js +1 -1
- package/dist/components/co-file-type-tile.js +1 -1
- package/dist/components/co-helper-text.js +1 -1
- package/dist/components/co-icon-button.js +1 -1
- package/dist/components/co-icon.js +1 -1
- package/dist/components/co-input.js +1 -1
- package/dist/components/co-json-field.js +1 -1
- package/dist/components/co-lightbox.js +1 -1
- package/dist/components/co-list-footer.js +1 -1
- package/dist/components/co-list-item.js +1 -1
- package/dist/components/co-media-thumb.js +1 -1
- package/dist/components/co-menu-divider.js +1 -1
- package/dist/components/co-menu-item.js +1 -1
- package/dist/components/co-menu.js +1 -1
- package/dist/components/co-modal.js +1 -1
- package/dist/components/co-navbar.js +1 -1
- package/dist/components/co-number-field.js +1 -1
- package/dist/components/co-option-list.js +1 -1
- package/dist/components/co-overlay.js +1 -1
- package/dist/components/co-page-header.js +1 -1
- package/dist/components/co-phone-field.js +1 -1
- package/dist/components/co-popover.js +1 -1
- package/dist/components/co-progress-bar.js +1 -1
- package/dist/components/co-progress-circle.js +1 -1
- package/dist/components/co-radio-group.js +1 -1
- package/dist/components/co-radio.js +1 -1
- package/dist/components/co-rating.js +1 -1
- package/dist/components/co-ref-field.js +1 -1
- package/dist/components/co-rich-text-editor.js +1 -1
- package/dist/components/co-rich-text-toolbar.js +1 -1
- package/dist/components/co-row.js +1 -1
- package/dist/components/co-segmented-bar.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-BHqdcGDh.js +1 -0
- package/dist/components/{p-B0buzt_E.js → p-BJTMFYax.js} +1 -1
- package/dist/components/{p-vLFwJ77w.js → p-Ba5lW0pA.js} +1 -1
- package/dist/components/{p-CybHxq25.js → p-CNIs9j-h.js} +1 -1
- package/dist/components/{p-Bx1OwdIV.js → p-COb8X_fE.js} +1 -1
- package/dist/components/{p-CzkeIavk.js → p-Cam92sWP.js} +1 -1
- package/dist/components/p-CmCsm4L-.js +1 -0
- package/dist/components/p-D3ts7oo9.js +1 -0
- package/dist/components/{p-CUvAZhuM.js → p-D4SOCy8I.js} +1 -1
- package/dist/components/{p-BnTTeIFH.js → p-Dh-h40mY.js} +1 -1
- package/dist/components/p-DrQh1Cb8.js +1 -0
- package/dist/components/{p-D7dk2gM7.js → p-DvL2TcDG.js} +1 -1
- package/dist/components/{p-BxiKVtk4.js → p-OKwHt2i9.js} +1 -1
- package/dist/components/{p-CBzpUqwG.js → p-QWi9AmnD.js} +1 -1
- package/dist/components/{p-B3igDRut.js → p-Xwo2HQmt.js} +1 -1
- package/dist/components/{p-DTS-dgEe.js → p-_k-j03K-.js} +1 -1
- package/dist/components/{p-HXlAaApx.js → p-eSq2ze8W.js} +1 -1
- package/dist/components/{p-LAxCvyJl.js → p-ivjj-BP8.js} +1 -1
- package/dist/components/{p-C7tPadNy.js → p-lus32JrB.js} +1 -1
- package/dist/esm/co-accordion.entry.js +4 -4
- package/dist/esm/co-app-shell.entry.js +3 -3
- package/dist/esm/co-autocomplete.entry.js +38 -73
- package/dist/esm/co-avatar-group.entry.js +3 -3
- package/dist/esm/co-avatar.entry.js +2 -2
- 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 +3 -3
- package/dist/esm/co-calendar-month.entry.js +2 -2
- package/dist/esm/co-calendar_3.entry.js +19 -14
- package/dist/esm/co-card.entry.js +3 -3
- package/dist/esm/co-checkbox-group.entry.js +4 -4
- package/dist/esm/co-checkbox.entry.js +4 -4
- package/dist/esm/co-chip_2.entry.js +482 -0
- package/dist/esm/co-color-picker.entry.js +4 -4
- package/dist/esm/co-column-picker.entry.js +3 -3
- package/dist/esm/co-combobox.entry.js +52 -83
- package/dist/esm/co-command-search.entry.js +21 -60
- package/dist/esm/co-data-table-pagination.entry.js +5 -5
- package/dist/esm/co-data-table.entry.js +54 -5
- package/dist/esm/co-date-picker.entry.js +2 -2
- package/dist/esm/co-date-range-picker.entry.js +3 -3
- package/dist/esm/co-date-range.entry.js +2 -2
- package/dist/esm/co-drive-card.entry.js +2 -2
- package/dist/esm/co-drop-zone.entry.js +2 -2
- package/dist/esm/co-empty-state.entry.js +4 -4
- package/dist/esm/co-event-calendar.entry.js +3 -3
- package/dist/esm/co-fab.entry.js +5 -5
- package/dist/esm/co-file-field.entry.js +7 -7
- 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 +3 -3
- package/dist/esm/co-json-field.entry.js +5 -5
- package/dist/esm/co-lightbox.entry.js +6 -6
- 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 +2 -2
- 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 +12 -3
- package/dist/esm/co-progress-bar.entry.js +4 -4
- package/dist/esm/co-progress-circle.entry.js +3 -3
- package/dist/esm/co-radio-group.entry.js +4 -4
- 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 +31 -135
- 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-rich-text-viewer.entry.js +1 -1
- package/dist/esm/co-row.entry.js +3 -3
- package/dist/esm/co-segmented-bar.entry.js +3 -3
- package/dist/esm/co-select.entry.js +7 -7
- package/dist/esm/co-separator.entry.js +2 -2
- package/dist/esm/co-sidebar-nav.entry.js +10 -8
- package/dist/esm/co-sidebar.entry.js +3 -3
- package/dist/esm/co-skeleton.entry.js +2 -2
- package/dist/esm/co-slider.entry.js +3 -3
- package/dist/esm/co-switch.entry.js +6 -6
- package/dist/esm/co-tab-group.entry.js +10 -4
- package/dist/esm/co-tab.entry.js +5 -5
- package/dist/esm/co-tags-field.entry.js +8 -8
- package/dist/esm/co-textarea.entry.js +6 -6
- package/dist/esm/co-toast.entry.js +3 -3
- 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-tooltip.entry.js +3 -3
- package/dist/esm/co-transfer-list.entry.js +3 -3
- package/dist/esm/co-video.entry.js +4 -4
- package/dist/esm/cobalt.js +3 -3
- package/dist/esm/{fieldChip-BBu4ukje.js → fieldChip-ChXW__C5.js} +1 -1
- package/dist/esm/{index-Es9IUmmt.js → index-tT-aZV0-.js} +9 -13
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{requiredMark-Bg25QWFn.js → requiredMark-C7-_2UhB.js} +1 -1
- package/dist/types/components/co-accordion/co-accordion.d.ts +3 -0
- package/dist/types/components/co-autocomplete/co-autocomplete.d.ts +12 -14
- package/dist/types/components/co-combobox/co-combobox.d.ts +29 -15
- package/dist/types/components/co-command-search/co-command-search.d.ts +13 -5
- package/dist/types/components/co-command-search/commandSearchLogic.d.ts +1 -1
- package/dist/types/components/co-data-table/co-data-table.d.ts +22 -0
- package/dist/types/components/co-fab/co-fab.d.ts +3 -1
- package/dist/types/components/co-option-list/co-option-list.d.ts +4 -0
- package/dist/types/components/co-popover/co-popover.d.ts +1 -0
- package/dist/types/components/co-ref-field/co-ref-field.d.ts +8 -30
- package/dist/types/components/co-sidebar-nav/co-sidebar-nav.d.ts +2 -0
- package/dist/types/components/co-tab/co-tab.d.ts +2 -2
- package/dist/types/components/co-tab-group/co-tab-group.d.ts +5 -1
- package/dist/types/components.d.ts +108 -45
- package/package.json +3 -3
- package/dist/cjs/co-chip.cjs.entry.js +0 -91
- package/dist/cjs/co-option-list.cjs.entry.js +0 -379
- package/dist/cobalt/p-06c27cc5.entry.js +0 -1
- package/dist/cobalt/p-075f6ca4.entry.js +0 -1
- package/dist/cobalt/p-0810ee1e.entry.js +0 -1
- package/dist/cobalt/p-0b41e76e.entry.js +0 -1
- package/dist/cobalt/p-19f7ee64.entry.js +0 -1
- package/dist/cobalt/p-23c9208a.entry.js +0 -1
- package/dist/cobalt/p-311118cb.entry.js +0 -1
- package/dist/cobalt/p-48c5f311.entry.js +0 -1
- package/dist/cobalt/p-523cfd98.entry.js +0 -1
- package/dist/cobalt/p-5eecea26.entry.js +0 -1
- package/dist/cobalt/p-64a0b656.entry.js +0 -1
- package/dist/cobalt/p-755ecee1.entry.js +0 -1
- package/dist/cobalt/p-76b46336.entry.js +0 -1
- package/dist/cobalt/p-7b5dec05.entry.js +0 -1
- package/dist/cobalt/p-87289d32.entry.js +0 -1
- package/dist/cobalt/p-BUgUTjOB.js +0 -1
- package/dist/cobalt/p-Es9IUmmt.js +0 -2
- package/dist/cobalt/p-a71fd4f1.entry.js +0 -1
- package/dist/cobalt/p-b045d680.entry.js +0 -1
- package/dist/cobalt/p-b3c8fc9a.entry.js +0 -1
- package/dist/cobalt/p-b8f36f12.entry.js +0 -1
- package/dist/cobalt/p-ba6f0f90.entry.js +0 -1
- package/dist/cobalt/p-c1abc74b.entry.js +0 -1
- package/dist/cobalt/p-cf239452.entry.js +0 -1
- package/dist/cobalt/p-d2507f04.entry.js +0 -1
- package/dist/cobalt/p-d55652f2.entry.js +0 -1
- package/dist/cobalt/p-da211abf.entry.js +0 -1
- package/dist/cobalt/p-dcc7fc95.entry.js +0 -1
- package/dist/collection/components/co-command-search/commandSearchGroup.js +0 -17
- package/dist/components/p-BhSJcOUS.js +0 -1
- package/dist/components/p-CZKHHCdL.js +0 -1
- package/dist/components/p-K6LC1Hz4.js +0 -1
- package/dist/esm/co-chip.entry.js +0 -89
- package/dist/esm/co-option-list.entry.js +0 -377
- package/dist/types/components/co-command-search/commandSearchGroup.d.ts +0 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as s,H as t,c as a,h as o}from"./index.js";import{d as c}from"./p-
|
|
1
|
+
import{t as e,p as s,H as t,c as a,h as o}from"./index.js";import{d as c}from"./p-COb8X_fE.js";import{d as r}from"./p-D3ts7oo9.js";import{d as l}from"./p-eSq2ze8W.js";import{d as i}from"./p-DrQh1Cb8.js";import{d}from"./p-D4SOCy8I.js";import{d as p}from"./p-DzoNGEDU.js";import{d as n}from"./p-lus32JrB.js";import{d as h}from"./p-CmCsm4L-.js";const m=s(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.coChange=a(this,"coChange",7),this.coClear=a(this,"coClear",7),this.value="",this.label="",this.placeholder="Select range",this.disabled=!1,this.clearable=!0,this.presets=!0,this.helperText="",this.locale="es",this.warned=!1,this.handleApply=e=>{this.value=JSON.stringify(e.detail),this.coChange.emit(e.detail)}}connectedCallback(){this.warned||(this.warned=!0,console.warn("[cobalt] <co-date-range> is deprecated — use <co-date-range-picker>."))}render(){return o("co-date-range-picker",{key:"4982a84de425fdf533128dc3ce3665b51d8c885d",value:this.value,label:this.label,placeholder:this.placeholder,disabled:this.disabled,clearable:this.clearable,presets:this.presets,helperText:this.helperText,locale:this.locale,applyLabel:this.applyLabel,clearLabel:this.clearLabel,onCoApply:this.handleApply,onCoClear:()=>this.coClear.emit()})}get el(){return this}static get style(){return":host{display:block}"}},[1,"co-date-range",{value:[1025],label:[1],placeholder:[1],disabled:[4],clearable:[4],presets:[4],helperText:[1,"helper-text"],locale:[1],applyLabel:[1,"apply-label"],clearLabel:[1,"clear-label"]}]);function b(){"undefined"!=typeof customElements&&["co-date-range","co-calendar","co-date-field","co-date-range-picker","co-drawer","co-icon","co-loader","co-overlay","co-popover"].forEach((s=>{switch(s){case"co-date-range":customElements.get(e(s))||customElements.define(e(s),m);break;case"co-calendar":customElements.get(e(s))||c();break;case"co-date-field":customElements.get(e(s))||r();break;case"co-date-range-picker":customElements.get(e(s))||l();break;case"co-drawer":customElements.get(e(s))||i();break;case"co-icon":customElements.get(e(s))||d();break;case"co-loader":customElements.get(e(s))||p();break;case"co-overlay":customElements.get(e(s))||n();break;case"co-popover":customElements.get(e(s))||h()}}))}b();const u=m,f=b;export{u as CoDateRange,f as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as o,d as
|
|
1
|
+
import{C as o,d as r}from"./p-DrQh1Cb8.js";const s=o,p=r;export{s as CoDrawer,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as r,H as c,c as o,h as i}from"./index.js";import{d as a}from"./p-
|
|
1
|
+
import{t as e,p as r,H as c,c as o,h as i}from"./index.js";import{d as a}from"./p-_k-j03K-.js";import{d as t}from"./p-D4SOCy8I.js";const d=r(class extends c{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.coOpen=o(this,"coOpen",7),this.coToggleSelect=o(this,"coToggleSelect",7),this.coStar=o(this,"coStar",7),this.variant="folder",this.density="comfy",this.accent="var(--co-color-primary-azul)",this.name="",this.meta="",this.selected=!1,this.starred=!1,this.active=!1,this.handleOpen=()=>{this.coOpen.emit()},this.handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.coOpen.emit())},this.handleToggleSelect=e=>{e.stopPropagation(),this.coToggleSelect.emit(!this.selected)},this.handleStar=e=>{e.stopPropagation(),this.coStar.emit()}}renderSelectChip(e){return i("span",{class:"co-drive-card__select",part:"select",role:"checkbox","aria-checked":this.selected+"","aria-label":"Select item",onClick:this.handleToggleSelect},this.selected&&i("svg",{class:"co-drive-card__check",width:e,height:e,viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},i("path",{d:"M3.5 8.5l3 3 6-6.5",stroke:"#fff","stroke-width":"2.2","stroke-linecap":"round","stroke-linejoin":"round"})))}renderFolder(){const e="compact"===this.density?20:24;return[this.renderSelectChip(12),i("span",{class:"co-drive-card__tile",part:"tile"},i("co-icon",{name:"folder",size:e,weight:"fill"})),i("div",{class:"co-drive-card__text"},i("span",{class:"co-drive-card__name",part:"name"},this.name),this.meta&&i("span",{class:"co-drive-card__meta",part:"meta"},this.meta)),i("div",{class:"co-drive-card__trailing",part:"trailing"},this.starred&&i("co-icon",{class:"co-drive-card__star",name:"star",size:15,weight:"fill"}),i("slot",{name:"trailing"}))]}renderFile(){return[i("div",{class:"co-drive-card__thumb",part:"thumb"},i("slot",{name:"thumb"})),this.renderSelectChip(13),i("span",{class:"co-drive-card__star-overlay",part:"star",role:"button","aria-label":this.starred?"Unstar item":"Star item",onClick:this.handleStar},i("co-icon",{name:"star",size:17,weight:this.starred?"fill":"regular"})),i("div",{class:"co-drive-card__foot",part:"foot"},i("span",{class:"co-drive-card__type"},i("slot",{name:"type"},this.ext?i("co-file-type-tile",{ext:this.ext,size:26,radius:7}):null)),i("div",{class:"co-drive-card__foot-text"},i("span",{class:"co-drive-card__name",part:"name"},this.name),this.meta&&i("span",{class:"co-drive-card__sub",part:"meta"},this.meta)),i("span",{class:"co-drive-card__actions",part:"actions"},i("slot",{name:"actions"})))]}render(){const e="file"===this.variant;return i("div",{key:"8f843886a6953476f075dcec86567da6d6160d51",class:{"co-drive-card":!0,["co-drive-card--"+this.variant]:!0,["co-drive-card--"+this.density]:!0,"co-drive-card--selected":this.selected,"co-drive-card--starred":this.starred,"co-drive-card--active":this.active&&e},part:"card",role:"button",tabIndex:0,style:{"--dc-accent":this.accent},onClick:this.handleOpen,onKeyDown:this.handleKeyDown},e?this.renderFile():this.renderFolder())}static get style(){return":host{display:block}.co-drive-card{--dc-accent:var(--co-color-primary-azul, #2563eb);position:relative;box-sizing:border-box;width:100%;border-radius:14px;cursor:pointer;outline:none;font-family:var(--co-font-family-primary);background:var(--co-color-base-blanco, #fff);box-shadow:inset 0 0 0 1px var(--co-color-opacity-negro-8, rgba(31, 28, 27, 0.08))}.co-drive-card:focus-visible{box-shadow:inset 0 0 0 1.5px var(--dc-accent)}.co-drive-card--folder{display:flex;align-items:center;gap:12px;transition:box-shadow 0.14s ease, background 0.12s ease}.co-drive-card--folder.co-drive-card--comfy{padding:14px}.co-drive-card--folder.co-drive-card--compact{padding:10px 12px}.co-drive-card--folder:hover:not(.co-drive-card--selected){box-shadow:var(--co-shadow-sm, 0 1px 2px 0 rgba(26, 26, 26, 0.04)), inset 0 0 0 1px var(--co-color-opacity-negro-8, rgba(31, 28, 27, 0.08))}.co-drive-card--folder.co-drive-card--selected{background:color-mix(in srgb, var(--dc-accent) 7%, white);box-shadow:inset 0 0 0 1.5px var(--dc-accent)}.co-drive-card__tile{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;border-radius:11px;background:color-mix(in srgb, var(--dc-accent) 12%, white);color:var(--dc-accent)}.co-drive-card--comfy .co-drive-card__tile{width:44px;height:44px}.co-drive-card--compact .co-drive-card__tile{width:38px;height:38px}.co-drive-card__text{flex:1;min-width:0;display:flex;flex-direction:column}.co-drive-card__name{font-family:var(--co-font-family-primary);font-size:14px;font-weight:500;line-height:1.3;color:var(--co-color-base-negro, #1f1c1b);letter-spacing:var(--co-font-letter-spacing-body, -0.03em);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.co-drive-card__meta{font-family:var(--co-font-family-primary);font-size:12px;color:var(--co-color-gray-500, #888888);margin-top:2px;letter-spacing:var(--co-font-letter-spacing-body, -0.03em);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.co-drive-card__trailing{flex-shrink:0;display:flex;align-items:center;gap:6px}.co-drive-card__star{display:inline-flex;color:var(--co-color-primary-amarillo, #fdbf00)}.co-drive-card--file{display:flex;flex-direction:column;gap:10px;transition:box-shadow 0.14s ease}.co-drive-card--file.co-drive-card--comfy{padding:10px}.co-drive-card--file.co-drive-card--compact{padding:8px}.co-drive-card--file:hover:not(.co-drive-card--selected):not(.co-drive-card--active){box-shadow:var(--co-shadow-sm, 0 1px 2px 0 rgba(26, 26, 26, 0.04)), inset 0 0 0 1px var(--co-color-opacity-negro-8, rgba(31, 28, 27, 0.08))}.co-drive-card--file.co-drive-card--active:not(.co-drive-card--selected){box-shadow:inset 0 0 0 1.5px var(--co-color-opacity-negro-25, rgba(31, 28, 27, 0.25))}.co-drive-card--file.co-drive-card--selected{box-shadow:inset 0 0 0 1.5px var(--dc-accent)}.co-drive-card__thumb{display:block;border-radius:10px;overflow:hidden;background:var(--co-color-gray-100, #f6f6f6)}.co-drive-card--comfy .co-drive-card__thumb{height:132px}.co-drive-card--compact .co-drive-card__thumb{height:96px}.co-drive-card__thumb ::slotted(*){display:block;width:100%;height:100%}.co-drive-card__thumb ::slotted(img){object-fit:cover}.co-drive-card--file .co-drive-card__name{font-size:13px}.co-drive-card__sub{font-family:var(--co-font-family-primary);font-size:11.5px;color:var(--co-color-gray-500, #888888);margin-top:1px;letter-spacing:var(--co-font-letter-spacing-body, -0.03em);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.co-drive-card__foot{display:flex;align-items:center;gap:8px;padding:0 2px 2px}.co-drive-card__type{flex-shrink:0;display:inline-flex}.co-drive-card__foot-text{flex:1;min-width:0;display:flex;flex-direction:column}.co-drive-card__actions{flex-shrink:0;display:inline-flex;align-items:center;color:var(--co-color-gray-400, #a0a0a0);opacity:0;transition:opacity 0.12s ease}.co-drive-card:hover .co-drive-card__actions{opacity:1}.co-drive-card__star-overlay{position:absolute;top:16px;right:16px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;color:var(--co-color-base-blanco, #fff);opacity:0;transition:opacity 0.12s ease}.co-drive-card:hover .co-drive-card__star-overlay,.co-drive-card--starred .co-drive-card__star-overlay{opacity:1}.co-drive-card--starred .co-drive-card__star-overlay{color:var(--co-color-primary-amarillo, #fdbf00)}.co-drive-card__select{position:absolute;display:inline-flex;align-items:center;justify-content:center;border-radius:6px;cursor:pointer;opacity:0;transition:opacity 0.12s ease;background:rgba(255, 255, 255, 0.9);box-shadow:inset 0 0 0 1px var(--co-color-opacity-negro-16, rgba(31, 28, 27, 0.16))}.co-drive-card:hover .co-drive-card__select,.co-drive-card--selected .co-drive-card__select{opacity:1}.co-drive-card--folder .co-drive-card__select{top:8px;left:8px;width:20px;height:20px}.co-drive-card--file .co-drive-card__select{top:16px;left:16px;width:22px;height:22px;background:rgba(255, 255, 255, 0.92)}.co-drive-card--selected .co-drive-card__select{background:var(--dc-accent);box-shadow:none}.co-drive-card__check{display:block;pointer-events:none}"}},[257,"co-drive-card",{variant:[1],density:[1],accent:[1],name:[1],meta:[1],selected:[516],starred:[516],active:[516],ext:[1]}]);function s(){"undefined"!=typeof customElements&&["co-drive-card","co-file-type-tile","co-icon"].forEach((r=>{switch(r){case"co-drive-card":customElements.get(e(r))||customElements.define(e(r),d);break;case"co-file-type-tile":customElements.get(e(r))||a();break;case"co-icon":customElements.get(e(r))||t()}}))}s();const l=d,n=s;export{l as CoDriveCard,n as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as o,p as e,H as t,c as a,h as r,a as
|
|
1
|
+
import{t as o,p as e,H as t,c as a,h as r,a as c}from"./index.js";import{d as s}from"./p-D4SOCy8I.js";const i=e(class extends t{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow(),this.coDrop=a(this,"coDrop",7),this.coDragStateChange=a(this,"coDragStateChange",7),this.active=!1,this.accent="var(--co-color-primary-azul)",this.label="Suelta para subir",this.icon="upload-simple",this.dragDepth=0,this.handleDragEnter=o=>{o.preventDefault(),this.dragDepth++,this.setActive(!0)},this.handleDragOver=o=>{o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect="copy")},this.handleDragLeave=o=>{o.preventDefault(),this.dragDepth=Math.max(0,this.dragDepth-1),0===this.dragDepth&&this.setActive(!1)},this.handleDrop=o=>{o.preventDefault(),this.dragDepth=0;const e=o.dataTransfer?Array.from(o.dataTransfer.files):[];this.setActive(!1),this.coDrop.emit(e)}}setActive(o){this.active!==o&&(this.active=o,this.coDragStateChange.emit(o))}render(){return r(c,{key:"015443db8a6c29e05a99dfd947c9dbc258a244a2",class:{"co-drop-zone":!0,"co-drop-zone--active":this.active},part:"host",style:{"--co-drop-zone-accent":this.accent},onDragEnter:this.handleDragEnter,onDragOver:this.handleDragOver,onDragLeave:this.handleDragLeave,onDrop:this.handleDrop},r("slot",{key:"5d1756f75bf122e538842f146635ed7d6181b376"}),this.active&&r("div",{key:"1f52982512900c61cfbfa38f2fcf05db785c656e",class:"co-drop-zone__overlay",part:"overlay"},r("div",{key:"32a754269cb02d8010403545ab351eaa870e42e7",class:"co-drop-zone__badge",part:"badge"},r("co-icon",{key:"fa72d2e3802970233742faf1ce48b16594fd1d25",name:this.icon,size:34})),r("span",{key:"92d2d4b8daa9d1cb3eb1d79c1fe0a59ac290c9aa",class:"co-drop-zone__label",part:"label"},this.label)))}static get style(){return":host{position:relative;display:block}.co-drop-zone__overlay{position:absolute;inset:12px;z-index:70;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;border-radius:16px;border:2px dashed var(--co-drop-zone-accent, var(--co-color-primary-azul, #2563eb));background:color-mix( in srgb, var(--co-drop-zone-accent, var(--co-color-primary-azul, #2563eb)) 8%, rgba(255, 255, 255, 0.85) );-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);pointer-events:none}.co-drop-zone__badge{display:inline-flex;align-items:center;justify-content:center;width:72px;height:72px;border-radius:20px;background:var(--co-color-base-blanco, #fff);color:var(--co-drop-zone-accent, var(--co-color-primary-azul, #2563eb));box-shadow:var(--co-shadow-sm, 0 1px 2px 0 rgba(26, 26, 26, 0.04))}.co-drop-zone__label{font-family:var(--co-font-family-primary);letter-spacing:var(--co-font-letter-spacing-body, -0.03em);font-size:18px;font-weight:500;color:var(--co-color-base-negro, #1f1c1b)}"}},[257,"co-drop-zone",{active:[1540],accent:[1],label:[1],icon:[1]}]);function n(){"undefined"!=typeof customElements&&["co-drop-zone","co-icon"].forEach((e=>{switch(e){case"co-drop-zone":customElements.get(o(e))||customElements.define(o(e),i);break;case"co-icon":customElements.get(o(e))||s()}}))}n();const d=i,l=n;export{d as CoDropZone,l as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as e,H as a,h as
|
|
1
|
+
import{t,p as e,H as a,h as o}from"./index.js";import{d as c}from"./p-D4SOCy8I.js";const i=e(class extends a{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.variant="plain",this.size="m"}render(){var t;const e=null!==(t=this.iconWeight)&&void 0!==t?t:"card"===this.variant?"regular":"light";return o("div",{key:"4cf85c1fd72560c3fde039901adbac86a4fc147f",class:{"co-empty-state":!0,["co-empty-state--"+this.variant]:!0,["co-empty-state--"+this.size]:!0},part:"empty-state"},this.icon&&o("div",{key:"4f8e8922631a5b88a9e158c2a6235515e8d09022",class:"co-empty-state__icon"},o("co-icon",{key:"66fe90f142047bd3c03f901443e91b9a654e2bfa",name:this.icon,size:40,weight:e})),this.heading&&o("div",{key:"fba5fe8abb82a90902e069d2f06730a3240b3cff",class:"co-empty-state__heading"},this.heading),this.description&&o("div",{key:"82bb5115feb16737e9a6658a508ba6faa1ab1e24",class:"co-empty-state__description"},this.description),o("div",{key:"048fb44e84e107232753f0d203f512dba556338b",class:"co-empty-state__actions"},o("slot",{key:"d7b1111baa84f9eeda18606f18b721865678bfd5"})))}static get style(){return":host{display:block}.co-empty-state{display:flex;flex-direction:column;align-items:center;text-align:center;padding:var(--co-spacing-2xl) var(--co-spacing-xl);font-family:var(--co-font-family-primary);max-width:492px;margin:0 auto}.co-empty-state__icon{display:flex;align-items:center;justify-content:center;width:72px;height:72px;border-radius:50%;background:var(--co-color-gray-100, #f6f6f6);color:var(--co-semantic-text-muted);margin-bottom:var(--co-spacing-xl)}.co-empty-state__heading{font-size:var(--co-font-size-20);font-weight:600;color:var(--co-semantic-text-default);margin-bottom:var(--co-spacing-sm)}.co-empty-state__description{font-size:var(--co-font-size-14);color:var(--co-semantic-text-muted);line-height:1.5;margin-bottom:var(--co-spacing-xl)}.co-empty-state__actions{display:flex;gap:var(--co-spacing-md);flex-wrap:wrap;justify-content:center}.co-empty-state__actions:empty{display:none}.co-empty-state--card{gap:var(--co-spacing-3xl, 32px);padding:var(--co-spacing-5xl, 48px) var(--co-spacing-3xl, 32px);background:var(--co-color-base-blanco, #fff);box-shadow:inset 0 0 0 1px var(--co-color-opacity-negro-8);border-radius:var(--co-border-radius-lg, 16px)}.co-empty-state--card .co-empty-state__icon{margin-bottom:0;background:var(--co-color-gray-100, #f6f6f6);color:var(--co-color-gray-600, #585858)}.co-empty-state--card .co-empty-state__heading{margin-bottom:0}.co-empty-state--card .co-empty-state__description{margin-bottom:0;line-height:1.35;color:var(--co-color-gray-600, #585858);max-width:366px}.co-empty-state--l .co-empty-state__icon{width:98px;height:98px}.co-empty-state--l .co-empty-state__heading{font-size:var(--co-font-size-24, 24px);font-weight:500;line-height:1.25}"}},[257,"co-empty-state",{icon:[1],heading:[1],description:[1],variant:[1],size:[1],iconWeight:[1,"icon-weight"]}]);function s(){"undefined"!=typeof customElements&&["co-empty-state","co-icon"].forEach((e=>{switch(e){case"co-empty-state":customElements.get(t(e))||customElements.define(t(e),i);break;case"co-icon":customElements.get(t(e))||c()}}))}s();const n=i,r=s;export{n as CoEmptyState,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as e,H as a,c as i,h as s}from"./index.js";import{g as o}from"./p-C1DCLOEl.js";import{t as n,a as c,d as r,g as l}from"./p-
|
|
1
|
+
import{t,p as e,H as a,c as i,h as s}from"./index.js";import{g as o}from"./p-C1DCLOEl.js";import{t as n,a as c,d as r,g as l}from"./p-OKwHt2i9.js";import{d}from"./p-D4SOCy8I.js";import{a as h,d as u,p as f,j as b,b as m,g as p}from"./p-CyYF8IJE.js";const v=/^\d{4}-\d{2}-\d{2}$/,x=864e5;function y(t){if(!v.exec(t))return null;const[e,a,i]=t.split("-").map(Number);return a<1||a>12||i<1||i>31?null:Date.UTC(e,a-1,i)}function g(t){return c(t).slice(0,10)}function _(t,e={}){if(!t||!t.id||!t.start)return null;const a=e.defaultDurationMinutes??60,i=!0===t.allDay;let s,o,r,l;if(i){const e=y(t.start.slice(0,10));if(null===e)return null;if(s=e,r=g(e),t.end){const a=y(t.end.slice(0,10));o=null!==a&&a>e?a:e+x}else o=e+x;l=g(o)}else{let e;try{e=n(t.start)}catch{return null}if(s=e,r=t.start,t.end){let i;try{i=n(t.end)}catch{return null}o=i>e?i:e+6e4*a}else o=e+6e4*a;l=c(o)}const d=t.status?e.statusColors?.[t.status]:void 0,h=t.editable??!0;return{id:t.id,title:t.title??"",allDay:i,start:r,end:l,startMs:s,endMs:o,status:t.status,backgroundColor:t.backgroundColor??t.color??d?.backgroundColor,borderColor:t.borderColor??d?.borderColor,className:t.className,editable:h,startEditable:t.startEditable??h,durationEditable:t.durationEditable??h,display:t.display??"block",extendedProps:t.extendedProps??{}}}const k=e(class extends a{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.coEventClick=i(this,"coEventClick",3),this.coDateSelect=i(this,"coDateSelect",3),this.coEventDrop=i(this,"coEventDrop",3),this.coDatesSet=i(this,"coDatesSet",3),this.coViewChange=i(this,"coViewChange",3),this.coMoreClick=i(this,"coMoreClick",3),this.view="month",this.events=[],this.locale="es-CO",this.editable=!0,this.selectable=!0,this.dayMaxEvents=3,this.firstDayOfWeek=1,this.availableViews=["month"],this.defaultDurationMinutes=60,this.goToday=()=>this.setAnchor(h()),this.goPrev=()=>this.step(-1),this.goNext=()=>this.step(1),this.handleDaySelect=t=>{const e=t.detail.date;this.coDateSelect.emit({start:e,end:u(e,1),allDay:!0})},this.handleEventClick=t=>{const e=this.normalized.find((e=>e.id===t.detail.id));e&&this.coEventClick.emit({event:e})},this.handleEventDrop=t=>{const e=this.normalized.find((e=>e.id===t.detail.id));e&&this.coEventDrop.emit({event:e,start:t.detail.start,end:t.detail.end,oldStart:t.detail.oldStart,oldEnd:t.detail.oldEnd,allDay:t.detail.allDay,revert:()=>{}})},this.handleMoreClick=t=>{const e=t.detail.date,a=this.tz,i=this.normalized.filter((t=>(t.allDay?t.start.slice(0,10):function(t,e){return new Intl.DateTimeFormat("en-CA",{timeZone:e,year:"numeric",month:"2-digit",day:"2-digit"}).format(new Date(t))}(t.startMs,a))===e));this.coMoreClick.emit({date:e,events:i})}}componentWillLoad(){this.anchor=this.date&&f(this.date)?this.date:h()}componentDidLoad(){this.emitDatesSet()}onDateChange(t){t&&f(t)&&t!==this.anchor&&(this.anchor=t,this.emitDatesSet())}get tz(){return this.timeZone||l()}get normalized(){return function(t,e={}){if(!Array.isArray(t))return[];const a=[];for(const i of t){const t=_(i,e);t&&a.push(t)}return a}(function(t){if(Array.isArray(t))return t;if("string"==typeof t&&t.trim())try{const e=JSON.parse(t);return Array.isArray(e)?e:[]}catch(t){return[]}return[]}(this.events),{defaultDurationMinutes:this.defaultDurationMinutes,statusColors:w(this.statusColors)})}get viewsList(){return Array.isArray(this.availableViews)?this.availableViews:(this.availableViews+"").split(",").map((t=>t.trim())).filter(Boolean)}visibleRange(){const t=f(this.anchor),e=b(t.year,t.month,this.firstDayOfWeek);return{start:e[0][0].value,end:u(e[e.length-1][6].value,1)}}emitDatesSet(){const{start:t,end:e}=this.visibleRange();this.coDatesSet.emit({view:this.view,start:t,end:e,activeDate:this.anchor})}setAnchor(t){this.anchor=t,this.date=t,this.emitDatesSet()}step(t){this.setAnchor("month"===this.view?m(this.anchor,t):u(this.anchor,7*t))}switchView(t){t!==this.view&&(this.view=t,this.coViewChange.emit({view:t}),this.emitDatesSet())}title(){const t=f(this.anchor);return p(t.year,t.month,this.locale,"long")}render(){var t;const e=o(this.locale),a=this.viewsList,i=f(this.anchor);return s("div",{key:"dce81390ee349de59285e31506ec397aead8c1c5",class:"cal"},s("div",{key:"58f3acb8a74558505aab88e95fbea15bc65cce2f",class:"cal__toolbar",part:"toolbar"},s("div",{key:"9249edf79de99180871667f813aa40e288f130b7",class:"cal__nav-group"},s("button",{key:"2cb250065f64860466b141b6dcaffeef60158dcc",type:"button",class:"cal__btn",onClick:this.goToday},null!==(t=e.today)&&void 0!==t?t:"Today"),s("button",{key:"15ebc01c5be71b48042735ee6247ad16a957493b",type:"button",class:"cal__icon-btn","aria-label":e.prevMonth,onClick:this.goPrev},s("co-icon",{key:"dc74fc8780144c952c7012cf0e984998650e96a7",name:"caret-left",size:16})),s("button",{key:"e4d2ee75a2c8fa818d327a9d82fa23051ec8a24c",type:"button",class:"cal__icon-btn","aria-label":e.nextMonth,onClick:this.goNext},s("co-icon",{key:"d489365423552d000655898ac267fdbfddd216c0",name:"caret-right",size:16}))),s("h2",{key:"370e61c61a12860d36b4a04cdbc5dee447fdfe46",class:"cal__title","aria-live":"polite"},this.title()),a.length>1?s("div",{class:"cal__views",role:"tablist"},a.map((t=>{var a;return s("button",{type:"button",role:"tab","aria-selected":this.view===t?"true":"false",class:{"cal__view-btn":!0,"cal__view-btn--active":this.view===t},onClick:()=>this.switchView(t)},null!==(a=e[t])&&void 0!==a?a:t)}))):s("span",{class:"cal__views-spacer"})),s("div",{key:"26677d79d63d957315c09df9b18597009c9681cc",class:"cal__body",part:"body"},"month"===this.view?s("co-calendar-month",{events:this.normalized,year:i.year,month:i.month,locale:this.locale,firstDayOfWeek:this.firstDayOfWeek,timeZone:this.tz,minDate:this.minDate,maxDate:this.maxDate,editable:this.editable,selectable:this.selectable,maxLanes:this.dayMaxEvents,onCoDaySelect:this.handleDaySelect,onCoEventClick:this.handleEventClick,onCoEventDrop:this.handleEventDrop,onCoMoreClick:this.handleMoreClick}):s("div",{class:"cal__placeholder"},s("co-icon",{name:"calendar-dots",size:32}),s("p",null,this.view+" view — coming soon"))))}static get watchers(){return{date:[{onDateChange:0}]}}static get style(){return":host{display:flex;flex-direction:column;gap:var(--co-spacing-md);font-family:var(--co-font-family-primary);color:var(--co-semantic-text-default);block-size:100%;min-block-size:0}.cal{display:flex;flex-direction:column;gap:var(--co-spacing-md);block-size:100%;min-block-size:0}.cal__toolbar{display:flex;align-items:center;gap:var(--co-spacing-md)}.cal__nav-group{display:inline-flex;align-items:center;gap:var(--co-spacing-xs)}.cal__title{flex:1 1 auto;margin:0;text-align:center;font-size:var(--co-font-size-16, 16px);font-weight:600;text-transform:capitalize;color:var(--co-semantic-text-default)}.cal__views-spacer{flex:0 0 auto;inline-size:1px}.cal__btn{height:32px;padding:0 var(--co-spacing-md);background:none;border:1px solid var(--co-semantic-border-default);border-radius:var(--co-border-radius-xs);font-family:inherit;font-size:var(--co-font-size-14, 14px);color:var(--co-semantic-text-default);cursor:pointer;transition:background 0.1s ease}.cal__btn:hover{background:var(--co-semantic-surface-hover)}.cal__btn:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:1px}.cal__icon-btn{height:32px;width:32px;display:inline-flex;align-items:center;justify-content:center;background:none;border:0;border-radius:var(--co-border-radius-xs);color:var(--co-semantic-text-default);cursor:pointer;transition:background 0.1s ease}.cal__icon-btn:hover{background:var(--co-semantic-surface-hover)}.cal__icon-btn:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:1px}.cal__views{display:inline-flex;gap:2px;padding:2px;background:var(--co-semantic-surface-hover);border-radius:var(--co-border-radius-xs)}.cal__view-btn{height:28px;padding:0 var(--co-spacing-md);background:none;border:0;border-radius:var(--co-border-radius-xxs);font-family:inherit;font-size:var(--co-font-size-14, 14px);color:var(--co-semantic-text-secondary);cursor:pointer;text-transform:capitalize}.cal__view-btn--active{background:var(--co-semantic-surface-page);color:var(--co-semantic-text-default);font-weight:600;box-shadow:0 1px 2px rgba(0, 0, 0, 0.08)}.cal__view-btn:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:1px}.cal__body{flex:1 1 auto;min-block-size:0;display:flex;flex-direction:column}.cal__body co-calendar-month{flex:1 1 auto;min-block-size:0}.cal__placeholder{flex:1 1 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--co-spacing-sm);color:var(--co-semantic-text-muted);text-transform:capitalize}"}},[1,"co-event-calendar",{view:[1537],date:[1025],events:[1],locale:[1],timeZone:[1,"time-zone"],editable:[4],selectable:[4],dayMaxEvents:[2,"day-max-events"],minDate:[1,"min-date"],maxDate:[1,"max-date"],firstDayOfWeek:[2,"first-day-of-week"],availableViews:[1,"available-views"],statusColors:[1,"status-colors"],defaultDurationMinutes:[2,"default-duration-minutes"],anchor:[32]},void 0,{date:[{onDateChange:0}]}]);function w(t){if(t){if("string"==typeof t)try{return JSON.parse(t)}catch(t){return}return t}}function C(){"undefined"!=typeof customElements&&["co-event-calendar","co-calendar-month","co-icon"].forEach((e=>{switch(e){case"co-event-calendar":customElements.get(t(e))||customElements.define(t(e),k);break;case"co-calendar-month":customElements.get(t(e))||r();break;case"co-icon":customElements.get(t(e))||d()}}))}C();const D=k,z=C;export{D as CoEventCalendar,z as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as o,p as a,H as e,c as t,h as i}from"./index.js";import{d as s}from"./p-
|
|
1
|
+
import{t as o,p as a,H as e,c as t,h as i}from"./index.js";import{d as s}from"./p-D4SOCy8I.js";const c=a(class extends e{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow(),this.coClick=t(this,"coClick",7),this.icon="plus",this.variant="primary",this.size="m",this.disabled=!1,this.position="none",this.handleClick=()=>{this.disabled||this.coClick.emit()}}render(){const o="xl"===this.size||"l"===this.size?24:"s"===this.size?18:20,a=!!this.label;return i("button",{key:"508484d86d0d65218b8e5039ce81b6a1860347db",class:{"co-fab":!0,["co-fab--"+this.variant]:!0,["co-fab--"+this.size]:!0,"co-fab--extended":a,"co-fab--disabled":this.disabled,["co-fab--"+this.position]:"none"!==this.position},type:"button",disabled:this.disabled,onClick:this.handleClick,"aria-label":this.ariaLabelText||this.label||this.icon},i("co-icon",{key:"47e47f74b93a1cdbe706d6e0a577f4396a68507c",name:this.icon,size:o}),this.label&&i("span",{key:"a4fd981b11c467261eba9de0731b37e01aae0ed2",class:"co-fab__label"},this.label))}static get style(){return":host{display:inline-flex;font-family:var(--co-font-family-primary);line-height:1}.co-fab{display:inline-flex;align-items:center;justify-content:center;gap:var(--co-spacing-sm2);border:none;border-radius:var(--co-border-radius-full);cursor:pointer;font-family:inherit;font-weight:500;white-space:nowrap;box-sizing:border-box;transition:background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;box-shadow:0 4px 12px rgba(31, 28, 27, 0.15)}.co-fab--xl{width:64px;height:64px;font-size:var(--co-font-size-16)}.co-fab--l{width:56px;height:56px;font-size:var(--co-font-size-16)}.co-fab--m{width:48px;height:48px;font-size:var(--co-font-size-14)}.co-fab--s{width:40px;height:40px;font-size:var(--co-font-size-14)}.co-fab--extended{width:auto;border-radius:var(--co-border-radius-lg)}.co-fab--extended.co-fab--xl{padding:0 var(--co-spacing-xl)}.co-fab--extended.co-fab--l{padding:0 var(--co-spacing-xl)}.co-fab--extended.co-fab--m{padding:0 var(--co-spacing-lg)}.co-fab--extended.co-fab--s{padding:0 var(--co-spacing-md)}.co-fab--primary{background:var(--co-fab-bg, var(--co-color-opacity-negro-80, rgba(31, 28, 27, 0.8)));color:var(--co-semantic-on-primary);-webkit-backdrop-filter:blur(40px);backdrop-filter:blur(40px)}.co-fab--primary:hover:not(:disabled){box-shadow:0 6px 20px rgba(31, 28, 27, 0.2);transform:translateY(-1px)}.co-fab--secondary{background:var(--co-semantic-surface-secondary);color:var(--co-semantic-text-default);border:1px solid var(--co-semantic-border-subtle)}.co-fab--secondary:hover:not(:disabled){background:var(--co-semantic-surface-hover)}.co-fab--stroke{background:transparent;color:var(--co-semantic-text-default);border:1px solid var(--co-semantic-border-default)}.co-fab--stroke:hover:not(:disabled){background:var(--co-semantic-surface-hover)}.co-fab:active:not(:disabled){transform:translateY(0) scale(0.96)}.co-fab--disabled{opacity:0.4;cursor:not-allowed;box-shadow:none}.co-fab--bottom-right{position:fixed;bottom:24px;right:24px;z-index:1000}.co-fab--bottom-left{position:fixed;bottom:24px;left:24px;z-index:1000}.co-fab--top-right{position:fixed;top:24px;right:24px;z-index:1000}.co-fab--top-left{position:fixed;top:24px;left:24px;z-index:1000}.co-fab__label{line-height:1}"}},[1,"co-fab",{icon:[1],label:[1],variant:[1],size:[1],ariaLabelText:[1,"aria-label-text"],disabled:[4],position:[1]}]);function r(){"undefined"!=typeof customElements&&["co-fab","co-icon"].forEach((a=>{switch(a){case"co-fab":customElements.get(o(a))||customElements.define(o(a),c);break;case"co-icon":customElements.get(o(a))||s()}}))}r();const n=c,d=r;export{n as CoFab,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as i,H as o,c as t,h as r}from"./index.js";import{R as a}from"./p-CWneqh4n.js";import{d as s}from"./p-CUvAZhuM.js";import{d as l}from"./p-BnTTeIFH.js";const c={es:{uploadButton:"Cargar archivo",dropHint:"Arrastra y suelta archivos aquí",helperBoth:"Puedes subir hasta {n} archivos, cada uno hasta {x}",helperFiles:"Puedes subir hasta {n} archivos",helperBytes:"Cada archivo hasta {x}",uploadedTitle:"Archivos subidos",removeFile:"Eliminar archivo",copyUrl:"Copiar enlace",copied:"Copiado",dragToReorder:"Arrastra para reordenar",openPreview:"Abrir vista previa",errInvalidFormat:"Formato no permitido: .{x}",errTooLarge:"Archivo demasiado grande: {x}",errMaxFiles:"Puedes subir hasta {n} archivos"},en:{uploadButton:"Upload file",dropHint:"Drag and drop files here",helperBoth:"You can upload up to {n} files, each up to {x}",helperFiles:"You can upload up to {n} files",helperBytes:"Each file up to {x}",uploadedTitle:"Uploaded files",removeFile:"Remove file",copyUrl:"Copy link",copied:"Copied",dragToReorder:"Drag to reorder",openPreview:"Open preview",errInvalidFormat:"Invalid format: .{x}",errTooLarge:"File too large: {x}",errMaxFiles:"You can upload up to {n} files"},pt:{uploadButton:"Carregar arquivo",dropHint:"Arraste e solte arquivos aqui",helperBoth:"Você pode enviar até {n} arquivos, cada um até {x}",helperFiles:"Você pode enviar até {n} arquivos",helperBytes:"Cada arquivo até {x}",uploadedTitle:"Arquivos enviados",removeFile:"Remover arquivo",copyUrl:"Copiar link",copied:"Copiado",dragToReorder:"Arraste para reordenar",openPreview:"Abrir pré-visualização",errInvalidFormat:"Formato inválido: .{x}",errTooLarge:"Arquivo muito grande: {x}",errMaxFiles:"Você pode enviar até {n} arquivos"}};function n(e,i){var o,t;return e.replace("{n}",(null!==(o=i.n)&&void 0!==o?o:"")+"").replace("{x}",null!==(t=i.x)&&void 0!==t?t:"")}function d(e){if(null==e||isNaN(e))return"";if(e<1024)return e+" B";const i=e=>e.toFixed(2).replace(/\.?0+$/,"");return e<1048576?i(e/1024)+" KB":i(e/1048576)+" MB"}const f=new Set(["png","jpg","jpeg","gif","webp","svg","avif","bmp"]);function h(e){const i=(e.name||e.url||"").split("?")[0],o=i.lastIndexOf(".");return o>=0&&f.has(i.slice(o+1).toLowerCase())}function p(e){return"done"===e.status&&(!(!e.thumbnail&&!e.url)&&(!!e.thumbnail||h(e)))}function u(e){return h(e)?e.url||e.thumbnail:e.thumbnail||e.url}const v=i(class extends o{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.coFilesSelected=t(this,"coFilesSelected",3),this.coRemove=t(this,"coRemove",3),this.coClear=t(this,"coClear",3),this.coReorder=t(this,"coReorder",3),this.coCopy=t(this,"coCopy",3),this.coPreviewOpen=t(this,"coPreviewOpen",3),this.disabled=!1,this.readonly=!1,this.required=!1,this.multiple=!1,this.maxFiles=100,this.status="default",this.layout="vertical",this.reorderable=!0,this.files="[]",this.dragOver=!1,this.localError="",this.copiedKey="",this.armedKey="",this.dragKey="",this.overKey="",this.failedPreviews=new Set,this.tempSeq=0,this.lastFilesStr="",this.lastParsed=[],this.handleDragOver=e=>{this.disabled||this.readonly||this.dragKey||(e.preventDefault(),this.dragOver=!0)},this.handleDragLeave=e=>{const i=e.relatedTarget;i&&e.currentTarget instanceof Node&&e.currentTarget.contains(i)||(this.dragOver=!1)},this.handleDrop=e=>{var i;e.preventDefault(),this.dragOver=!1,this.dragKey||(null===(i=e.dataTransfer)||void 0===i?void 0:i.files)&&this.handleFiles(e.dataTransfer.files)},this.handleBrowse=e=>{var i;this.disabled||this.readonly||e&&this.fromActionsSlot(e)||null===(i=this.inputEl)||void 0===i||i.click()},this.handleInputChange=e=>{const i=e.target;i.files&&this.handleFiles(i.files),i.value=""},this.disarmDrag=()=>{this.armedKey&&!this.dragKey&&(this.armedKey="")},this.handleRowDragEnd=()=>{this.resetDragState()}}connectedCallback(){window.addEventListener("mouseup",this.disarmDrag)}disconnectedCallback(){window.removeEventListener("mouseup",this.disarmDrag),clearTimeout(this.copiedTimer),this.closeLightbox()}get parsedFiles(){const e=this.files;if("string"!=typeof e||!e.trim())return[];if(e===this.lastFilesStr)return this.lastParsed;let i=[];try{const o=JSON.parse(e);Array.isArray(o)&&(i=o)}catch(e){}return this.lastFilesStr=e,this.lastParsed=i,i}get strings(){return function(e){return c[function(e){const i=(e||"").toLowerCase();return i.startsWith("es")?"es":i.startsWith("pt")?"pt":"en"}(e)]}(this.locale)}get acceptList(){const e=this.accept;if(!e)return[];let i=[];try{const o=JSON.parse(e);Array.isArray(o)&&(i=o.map(String))}catch(o){i=e.split(",")}return i.map((e=>e.trim().toLowerCase().replace(/^\./,""))).filter((e=>e&&"*"!==e))}get isInvalid(){return"error"===this.status||!!this.localError}get inputAccept(){const e=this.acceptList;if(e.length)return e.map((e=>e.includes("/")?e:"."+e)).join(",")}extOf(e){const i=e.lastIndexOf(".");return i>=0?e.slice(i+1).toLowerCase():""}validate(e){const i=this.acceptList;if(i.length){const o=this.extOf(e.name),t=i.includes(o),r=i.some((i=>i.includes("/")&&e.type===i));if(!t&&!r)return n(this.strings.errInvalidFormat,{x:o})}return this.maxBytes&&e.size>this.maxBytes?n(this.strings.errTooLarge,{x:d(e.size)}):null}handleFiles(e){if(this.disabled||this.readonly)return;this.localError="";const i=Array.from(e);if(!i.length)return;const o=this.multiple?i:i.slice(0,1);if(this.multiple){const e=this.maxFiles-this.parsedFiles.length;if(e<=0)return void(this.localError=n(this.strings.errMaxFiles,{n:this.maxFiles}));o.length>e&&(o.length=e)}const t=[],r=[];for(const e of o){const i=this.validate(e);i?this.localError=i:(t.push(e),r.push(`tmp-${Date.now()}-${this.tempSeq++}`))}t.length&&this.coFilesSelected.emit({files:t,tempIds:r})}fromActionsSlot(e){return e.composedPath().some((e=>{var i,o;return"actions"===(null===(o=(i=e).getAttribute)||void 0===o?void 0:o.call(i,"slot"))}))}keyFor(e){var i;return e.id||e.tempId||`${e.name}:${null!==(i=e.size)&&void 0!==i?i:""}`}handleCopy(e){var i;const o=e.url||"";if(!o)return;const t=this.keyFor(e);this.coCopy.emit({id:t,url:o}),(null===(i=navigator.clipboard)||void 0===i?void 0:i.writeText)&&navigator.clipboard.writeText(o).then((()=>{this.copiedKey=t,clearTimeout(this.copiedTimer),this.copiedTimer=setTimeout((()=>this.copiedKey=""),1500)})).catch((()=>{}))}handlePreviewOpen(e){const i=e.url||e.thumbnail;if(!i)return;this.coPreviewOpen.emit({id:this.keyFor(e),url:i});const o=this.parsedFiles.filter((e=>p(e)&&!this.failedPreviews.has(this.keyFor(e)))),t=o.map((e=>({src:u(e),thumbnail:e.thumbnail,alt:e.name}))),r=Math.max(0,o.findIndex((i=>this.keyFor(i)===this.keyFor(e))));this.closeLightbox();const a=document.createElement("co-lightbox");a.images=JSON.stringify(t),a.startIndex=r,this.locale&&(a.locale=this.locale),a.addEventListener("coClose",(()=>this.closeLightbox())),document.body.appendChild(a),this.lightboxEl=a,requestAnimationFrame((()=>{a.open=!0}))}closeLightbox(){const e=this.lightboxEl;this.lightboxEl=void 0,e&&(e.open=!1,setTimeout((()=>e.remove()),220))}handlePreviewError(e){this.failedPreviews=new Set([...this.failedPreviews,this.keyFor(e)])}handleRowDragStart(e,i){this.armedKey===i?(this.dragKey=i,e.dataTransfer&&(e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",i))):e.preventDefault()}handleRowDragOver(e,i){this.dragKey&&this.dragKey!==i&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="move"),this.overKey=i)}handleRowDrop(e,i){e.preventDefault(),e.stopPropagation();const o=this.parsedFiles.map((e=>this.keyFor(e))),t=o.indexOf(this.dragKey),r=o.indexOf(i);this.resetDragState(),t<0||r<0||t===r||(o.splice(r,0,...o.splice(t,1)),this.coReorder.emit(o))}resetDragState(){this.armedKey="",this.dragKey="",this.overKey=""}capacityHint(e){const i=this.maxBytes?d(this.maxBytes):"";return this.multiple&&this.maxBytes?n(e.helperBoth,{n:this.maxFiles,x:i}):this.multiple?n(e.helperFiles,{n:this.maxFiles}):this.maxBytes?n(e.helperBytes,{x:i}):""}render(){const e=this.strings,i=this.parsedFiles,o=this.localError||this.helperText,t=!(this.readonly||(this.multiple?this.multiple&&i.length>=this.maxFiles:0!==i.length)),s="default"!==this.status?"co-file-field--"+this.status:"",l=i.filter((e=>p(e)&&!this.failedPreviews.has(this.keyFor(e)))),c=this.reorderable&&this.multiple&&!this.disabled&&!this.readonly&&i.length>1,n=this.capacityHint(e);return r("div",{key:"5f851ab10c6bae9b2f06ef5f1a7acd130eebf40b",class:{"co-file-field":!0,"co-file-field--disabled":this.disabled,"co-file-field--invalid":this.isInvalid,[s]:!!s},part:"wrapper"},this.label&&r("div",{key:"c97389b2d98e3c97e367425a354b7184c0915c0b",class:"co-file-field__labels"},r("label",{key:"5ee9359c1d07c30179330fe8921aab9b4633d165",class:"co-file-field__label",part:"label"},this.label,r(a,{key:"0cc79f6ae165e74600152c1e1adaa2bd9a8133ee",required:this.required}))),t&&r("div",{key:"80be725bcd67b24d0fa086dabb82d033b6e68f9f",class:{"co-file-field__dropzone":!0,"co-file-field__dropzone--drag":this.dragOver},part:"dropzone",role:"button",tabIndex:this.disabled?-1:0,onClick:this.handleBrowse,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||this.fromActionsSlot(e)||(e.preventDefault(),this.handleBrowse())},onDragOver:this.handleDragOver,onDragLeave:this.handleDragLeave,onDrop:this.handleDrop},r("button",{key:"6378b733d6de2dfbefacfae2a33ebabe3557b013",class:"co-file-field__upload-btn",part:"upload-button",type:"button",tabIndex:-1},r("co-icon",{key:"6b6fd92b0ca0230375020952e05aee09c0d5d3f6",name:"file-arrow-up",size:18}),r("span",{key:"de33f04a2715781a3a5853d051856b17625eac31"},this.uploadButtonText||e.uploadButton)),r("span",{key:"881304671a167b3052b37749457aa6d77773b3a9",class:"co-file-field__dropzone-text"},this.dropText||e.dropHint),n&&r("span",{key:"331c798170b47a0fbe48fd6bb9c742c1927222e5",class:"co-file-field__dropzone-hint"},n),r("div",{key:"821977df4fd123864ebe2bef8576711addd89578",class:"co-file-field__actions",part:"actions"},r("slot",{key:"cab4df18f87f2b4f70790451ad7bcf4d83d66142",name:"actions"})),r("input",{key:"fe9afd3562558f9a03d3f7fc1cfe8fbde84d290a",ref:e=>this.inputEl=e,class:"co-file-field__input",type:"file",multiple:this.multiple,accept:this.inputAccept,disabled:this.disabled,onChange:this.handleInputChange,"aria-hidden":"true",tabIndex:-1})),i.length>0&&r("div",{key:"635ec6cd392c6e28e01ce90c1386db5c233de07f",class:"co-file-field__uploaded"},this.multiple&&r("div",{key:"433ef13bc077e247bd72601ce1e6b5f76ac3dba3",class:"co-file-field__uploaded-title",part:"uploaded-title"},`${this.uploadedTitle||e.uploadedTitle} (${i.length})`),l.length>0&&r("div",{key:"92f9a138e2317751554cd5c4a5a6c33c730ac909",class:"co-file-field__previews",part:"previews"},l.map((i=>r("button",{class:"co-file-field__preview",part:"preview",type:"button",key:"prev-"+this.keyFor(i),title:i.name,"aria-label":e.openPreview,onClick:()=>this.handlePreviewOpen(i)},r("img",{src:i.thumbnail||i.url,alt:i.name,loading:"lazy",onError:()=>this.handlePreviewError(i)}))))),r("ul",{key:"fc600da498880f6d07402204c5edadb87aa94d0c",class:"co-file-field__list",part:"list"},i.map((i=>{const o=this.keyFor(i),t=c&&"done"===i.status;return r("li",{class:{"co-file-field__row":!0,["co-file-field__row--"+i.status]:!0,"co-file-field__row--dragging":this.dragKey===o,"co-file-field__row--drop-target":this.overKey===o},part:"row",key:o,draggable:this.armedKey===o,onDragStart:e=>this.handleRowDragStart(e,o),onDragOver:e=>this.handleRowDragOver(e,o),onDrop:e=>this.handleRowDrop(e,o),onDragEnd:this.handleRowDragEnd},t?r("span",{class:"co-file-field__drag-handle",part:"drag-handle",title:e.dragToReorder,onMouseDown:()=>this.armedKey=o},r("co-icon",{name:"list",size:18})):r("co-icon",{name:"error"===i.status?"warning-circle":"uploading"===i.status?"spinner-gap":"file",size:18,class:{"co-file-field__row-icon":!0,"co-file-field__row-icon--spin":"uploading"===i.status}}),r("div",{class:"co-file-field__row-body"},r("span",{class:"co-file-field__row-name",title:i.name},function(e,i=35){return!e||e.length<=i?e:"..."+e.slice(-i)}(i.name)),"uploading"===i.status&&r("div",{class:"co-file-field__progress"},r("div",{class:"co-file-field__progress-bar",style:"number"==typeof i.progress?{width:i.progress+"%"}:void 0})),"error"===i.status&&i.error&&r("span",{class:"co-file-field__row-error"},i.error)),null!=i.size&&r("span",{class:"co-file-field__row-size"},d(i.size)),"done"===i.status&&!!i.url&&r("button",{class:{"co-file-field__action":!0,"co-file-field__action--copied":this.copiedKey===o},type:"button",tabIndex:-1,title:this.copiedKey===o?e.copied:e.copyUrl,"aria-label":e.copyUrl,onClick:()=>this.handleCopy(i)},r("co-icon",{name:this.copiedKey===o?"check":"copy",size:18})),!this.disabled&&!this.readonly&&r("button",{class:"co-file-field__action",type:"button",tabIndex:-1,title:e.removeFile,"aria-label":e.removeFile,onClick:()=>this.coRemove.emit(o)},r("co-icon",{name:"trash",size:18})))})))),o&&r("div",{key:"6393f353fff2597d24e91850525068646d4563cc",class:{"co-file-field__helper":!0,"co-file-field__helper--error":this.isInvalid},part:"helper"},this.isInvalid&&r("co-icon",{key:"7bd66efa2c2d2f35b3c11283fc28cd672a77e4e5",name:"warning-circle",size:14,class:"co-file-field__helper-icon"}),r("span",{key:"7744d3bd75b84354db79bb0796f4e3d2bc293d2e",class:"co-file-field__helper-text"},o)))}get el(){return this}static get style(){return":host{display:block;font-family:var(--co-font-family-primary);font-size:var(--co-font-size-14);letter-spacing:var(--co-font-letter-spacing-body);line-height:1}.co-file-field{display:flex;flex-direction:column;gap:var(--co-spacing-sm2)}.co-file-field__labels{display:flex;align-items:center;justify-content:space-between;padding:0 var(--co-spacing-xs)}.co-file-field__label{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);font-weight:400;line-height:1;white-space:nowrap;cursor:default}.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)')}.co-file-field__dropzone{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--co-spacing-md);padding:var(--co-spacing-4xl) var(--co-spacing-2xl);background:color-mix(in srgb, var(--co-semantic-surface-hover) 55%, transparent);-webkit-backdrop-filter:blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate));backdrop-filter:blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate));border:1px dashed var(--co-semantic-border-default);border-radius:var(--co-border-radius-sm);cursor:pointer;text-align:center;transition:border-color 0.15s ease, background 0.15s ease}.co-file-field__dropzone:hover{border-color:var(--co-semantic-border-focus)}.co-file-field__dropzone--drag{border-color:var(--co-semantic-border-focus);background:var(--co-semantic-surface-hover)}.co-file-field__upload-btn{display:inline-flex;align-items:center;gap:var(--co-spacing-sm2);padding:var(--co-spacing-md) var(--co-spacing-xl);margin-bottom:var(--co-spacing-xs);background:var(--co-semantic-surface-secondary);color:var(--co-semantic-text-default);border:none;border-radius:var(--co-border-radius-full);box-shadow:var(--co-shadow-lg);font-family:inherit;font-size:var(--co-font-size-16);font-weight:400;letter-spacing:var(--co-font-letter-spacing-body);line-height:1;cursor:pointer;transition:box-shadow 0.15s ease, transform 0.15s ease}.co-file-field__upload-btn:hover{box-shadow:var(--co-shadow-xl, var(--co-shadow-lg));transform:translateY(-1px)}.co-file-field__upload-btn co-icon{display:inline-flex;flex-shrink:0}.co-file-field__dropzone-text{color:var(--co-semantic-text-default);font-size:var(--co-font-size-18);line-height:1.25}.co-file-field__dropzone-hint{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);line-height:1.25}.co-file-field__actions{display:contents}.co-file-field__input{display:none}.co-file-field__uploaded{display:flex;flex-direction:column;gap:var(--co-spacing-lg);margin-top:var(--co-spacing-sm2)}.co-file-field__uploaded-title{color:var(--co-semantic-text-default);font-size:var(--co-font-size-22);font-weight:500;letter-spacing:-0.03em;line-height:1.25}.co-file-field__previews{display:grid;grid-template-columns:repeat(auto-fill, minmax(240px, 282px));gap:var(--co-spacing-md)}.co-file-field__preview{padding:0;border:none;border-radius:var(--co-border-radius-sm);overflow:hidden;aspect-ratio:3 / 2;background:var(--co-semantic-surface-hover);cursor:pointer}.co-file-field__preview img{display:block;width:100%;height:100%;object-fit:cover;transition:transform 0.2s ease}.co-file-field__preview:hover img{transform:scale(1.02)}.co-file-field__list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:var(--co-spacing-sm2)}.co-file-field__row{display:flex;align-items:center;gap:var(--co-spacing-lg);padding:var(--co-spacing-xl);background:var(--co-semantic-surface-hover);border:1px solid transparent;border-radius:var(--co-border-radius-sm)}.co-file-field__row--error{border-color:var(--co-semantic-status-error)}.co-file-field__row--dragging{opacity:0.5}.co-file-field__row--drop-target{border-color:var(--co-semantic-border-focus);background:var(--co-semantic-surface-hover)}.co-file-field__drag-handle{flex-shrink:0;display:flex;align-items:center;color:var(--co-semantic-text-secondary);cursor:grab}.co-file-field__drag-handle:active{cursor:grabbing}.co-file-field__row-icon{flex-shrink:0;color:var(--co-semantic-text-secondary);display:flex;align-items:center}.co-file-field__row--error .co-file-field__row-icon{color:var(--co-semantic-status-error)}.co-file-field__row-icon--spin{animation:co-file-spin 0.8s linear infinite}@keyframes co-file-spin{to{transform:rotate(360deg)}}.co-file-field__row-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:var(--co-spacing-xs)}.co-file-field__row-name{color:var(--co-semantic-text-default);font-size:var(--co-font-size-14);line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.co-file-field__row-error{color:var(--co-semantic-status-error);font-size:var(--co-font-size-12)}.co-file-field__row-size{flex-shrink:0;color:var(--co-semantic-text-default);font-size:var(--co-font-size-14);line-height:1;white-space:nowrap}.co-file-field__progress{position:relative;height:4px;border-radius:var(--co-border-radius-full);background:var(--co-semantic-surface-hover);overflow:hidden}.co-file-field__progress-bar{position:absolute;inset:0;width:40%;border-radius:var(--co-border-radius-full);background:var(--co-semantic-border-focus);transition:width 0.2s ease}.co-file-field__progress-bar:not([style]){animation:co-file-indeterminate 1.2s ease-in-out infinite}@keyframes co-file-indeterminate{0%{left:-40%}100%{left:100%}}.co-file-field__action{flex-shrink:0;display:flex;align-items:center;justify-content:center;padding:0;border:none;background:transparent;cursor:pointer;color:var(--co-semantic-text-secondary);transition:color 0.15s ease}.co-file-field__action:hover{color:var(--co-semantic-text-default)}.co-file-field__action--copied,.co-file-field__action--copied:hover{color:var(--co-color-primary-verde)}.co-file-field__helper{display:flex;align-items:center;gap:var(--co-spacing-xs);padding:0 var(--co-spacing-xs)}.co-file-field__helper-icon{flex-shrink:0;color:var(--co-semantic-text-muted);display:flex;align-items:center}.co-file-field__helper-text{color:var(--co-semantic-text-muted);font-size:var(--co-font-size-14);line-height:1}.co-file-field--disabled{opacity:0.6;pointer-events:none}.co-file-field--invalid .co-file-field__dropzone,.co-file-field--error .co-file-field__dropzone{border-color:var(--co-semantic-status-error)}.co-file-field__helper--error .co-file-field__helper-icon,.co-file-field__helper--error .co-file-field__helper-text{color:var(--co-semantic-status-error)}:host([layout='horizontal']) .co-file-field{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-file-field__labels{grid-column:1;grid-row:1;padding-top:var(--co-spacing-sm2);min-width:0}:host([layout='horizontal']) .co-file-field__label{white-space:normal}:host([layout='horizontal']) .co-file-field>:not(.co-file-field__labels){grid-column:2;min-width:0}@supports not (background: color-mix(in srgb, red, transparent)){.co-file-field__dropzone{background:var(--co-semantic-surface-hover)}}"}},[257,"co-file-field",{label:[1],disabled:[4],readonly:[4],required:[4],multiple:[4],accept:[1],maxFiles:[2,"max-files"],maxBytes:[2,"max-bytes"],status:[1],helperText:[1,"helper-text"],layout:[513],locale:[1],uploadButtonText:[1,"upload-button-text"],dropText:[1,"drop-text"],uploadedTitle:[1,"uploaded-title"],reorderable:[4],files:[1],dragOver:[32],localError:[32],copiedKey:[32],armedKey:[32],dragKey:[32],overKey:[32],failedPreviews:[32]}]);function g(){"undefined"!=typeof customElements&&["co-file-field","co-icon","co-lightbox"].forEach((i=>{switch(i){case"co-file-field":customElements.get(e(i))||customElements.define(e(i),v);break;case"co-icon":customElements.get(e(i))||s();break;case"co-lightbox":customElements.get(e(i))||l()}}))}g();const b=v,_=g;export{b as CoFileField,_ as defineCustomElement}
|
|
1
|
+
import{t as e,p as i,H as o,c as t,h as r}from"./index.js";import{R as a}from"./p-CWneqh4n.js";import{d as s}from"./p-D4SOCy8I.js";import{d as l}from"./p-Dh-h40mY.js";const c={es:{uploadButton:"Cargar archivo",dropHint:"Arrastra y suelta archivos aquí",helperBoth:"Puedes subir hasta {n} archivos, cada uno hasta {x}",helperFiles:"Puedes subir hasta {n} archivos",helperBytes:"Cada archivo hasta {x}",uploadedTitle:"Archivos subidos",removeFile:"Eliminar archivo",copyUrl:"Copiar enlace",copied:"Copiado",dragToReorder:"Arrastra para reordenar",openPreview:"Abrir vista previa",errInvalidFormat:"Formato no permitido: .{x}",errTooLarge:"Archivo demasiado grande: {x}",errMaxFiles:"Puedes subir hasta {n} archivos"},en:{uploadButton:"Upload file",dropHint:"Drag and drop files here",helperBoth:"You can upload up to {n} files, each up to {x}",helperFiles:"You can upload up to {n} files",helperBytes:"Each file up to {x}",uploadedTitle:"Uploaded files",removeFile:"Remove file",copyUrl:"Copy link",copied:"Copied",dragToReorder:"Drag to reorder",openPreview:"Open preview",errInvalidFormat:"Invalid format: .{x}",errTooLarge:"File too large: {x}",errMaxFiles:"You can upload up to {n} files"},pt:{uploadButton:"Carregar arquivo",dropHint:"Arraste e solte arquivos aqui",helperBoth:"Você pode enviar até {n} arquivos, cada um até {x}",helperFiles:"Você pode enviar até {n} arquivos",helperBytes:"Cada arquivo até {x}",uploadedTitle:"Arquivos enviados",removeFile:"Remover arquivo",copyUrl:"Copiar link",copied:"Copiado",dragToReorder:"Arraste para reordenar",openPreview:"Abrir pré-visualização",errInvalidFormat:"Formato inválido: .{x}",errTooLarge:"Arquivo muito grande: {x}",errMaxFiles:"Você pode enviar até {n} arquivos"}};function n(e,i){var o,t;return e.replace("{n}",(null!==(o=i.n)&&void 0!==o?o:"")+"").replace("{x}",null!==(t=i.x)&&void 0!==t?t:"")}function d(e){if(null==e||isNaN(e))return"";if(e<1024)return e+" B";const i=e=>e.toFixed(2).replace(/\.?0+$/,"");return e<1048576?i(e/1024)+" KB":i(e/1048576)+" MB"}const f=new Set(["png","jpg","jpeg","gif","webp","svg","avif","bmp"]);function h(e){const i=(e.name||e.url||"").split("?")[0],o=i.lastIndexOf(".");return o>=0&&f.has(i.slice(o+1).toLowerCase())}function p(e){return"done"===e.status&&(!(!e.thumbnail&&!e.url)&&(!!e.thumbnail||h(e)))}function u(e){return h(e)?e.url||e.thumbnail:e.thumbnail||e.url}const v=i(class extends o{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.coFilesSelected=t(this,"coFilesSelected",3),this.coRemove=t(this,"coRemove",3),this.coClear=t(this,"coClear",3),this.coReorder=t(this,"coReorder",3),this.coCopy=t(this,"coCopy",3),this.coPreviewOpen=t(this,"coPreviewOpen",3),this.disabled=!1,this.readonly=!1,this.required=!1,this.multiple=!1,this.maxFiles=100,this.status="default",this.layout="vertical",this.reorderable=!0,this.files="[]",this.dragOver=!1,this.localError="",this.copiedKey="",this.armedKey="",this.dragKey="",this.overKey="",this.failedPreviews=new Set,this.tempSeq=0,this.lastFilesStr="",this.lastParsed=[],this.handleDragOver=e=>{this.disabled||this.readonly||this.dragKey||(e.preventDefault(),this.dragOver=!0)},this.handleDragLeave=e=>{const i=e.relatedTarget;i&&e.currentTarget instanceof Node&&e.currentTarget.contains(i)||(this.dragOver=!1)},this.handleDrop=e=>{var i;e.preventDefault(),this.dragOver=!1,this.dragKey||(null===(i=e.dataTransfer)||void 0===i?void 0:i.files)&&this.handleFiles(e.dataTransfer.files)},this.handleBrowse=e=>{var i;this.disabled||this.readonly||e&&this.fromActionsSlot(e)||null===(i=this.inputEl)||void 0===i||i.click()},this.handleInputChange=e=>{const i=e.target;i.files&&this.handleFiles(i.files),i.value=""},this.disarmDrag=()=>{this.armedKey&&!this.dragKey&&(this.armedKey="")},this.handleRowDragEnd=()=>{this.resetDragState()}}connectedCallback(){window.addEventListener("mouseup",this.disarmDrag)}disconnectedCallback(){window.removeEventListener("mouseup",this.disarmDrag),clearTimeout(this.copiedTimer),this.closeLightbox()}get parsedFiles(){const e=this.files;if("string"!=typeof e||!e.trim())return[];if(e===this.lastFilesStr)return this.lastParsed;let i=[];try{const o=JSON.parse(e);Array.isArray(o)&&(i=o)}catch(e){}return this.lastFilesStr=e,this.lastParsed=i,i}get strings(){return function(e){return c[function(e){const i=(e||"").toLowerCase();return i.startsWith("es")?"es":i.startsWith("pt")?"pt":"en"}(e)]}(this.locale)}get acceptList(){const e=this.accept;if(!e)return[];let i=[];try{const o=JSON.parse(e);Array.isArray(o)&&(i=o.map(String))}catch(o){i=e.split(",")}return i.map((e=>e.trim().toLowerCase().replace(/^\./,""))).filter((e=>e&&"*"!==e))}get isInvalid(){return"error"===this.status||!!this.localError}get inputAccept(){const e=this.acceptList;if(e.length)return e.map((e=>e.includes("/")?e:"."+e)).join(",")}extOf(e){const i=e.lastIndexOf(".");return i>=0?e.slice(i+1).toLowerCase():""}validate(e){const i=this.acceptList;if(i.length){const o=this.extOf(e.name),t=i.includes(o),r=i.some((i=>i.includes("/")&&e.type===i));if(!t&&!r)return n(this.strings.errInvalidFormat,{x:o})}return this.maxBytes&&e.size>this.maxBytes?n(this.strings.errTooLarge,{x:d(e.size)}):null}handleFiles(e){if(this.disabled||this.readonly)return;this.localError="";const i=Array.from(e);if(!i.length)return;const o=this.multiple?i:i.slice(0,1);if(this.multiple){const e=this.maxFiles-this.parsedFiles.length;if(e<=0)return void(this.localError=n(this.strings.errMaxFiles,{n:this.maxFiles}));o.length>e&&(o.length=e)}const t=[],r=[];for(const e of o){const i=this.validate(e);i?this.localError=i:(t.push(e),r.push(`tmp-${Date.now()}-${this.tempSeq++}`))}t.length&&this.coFilesSelected.emit({files:t,tempIds:r})}fromActionsSlot(e){return e.composedPath().some((e=>{var i,o;return"actions"===(null===(o=(i=e).getAttribute)||void 0===o?void 0:o.call(i,"slot"))}))}keyFor(e){var i;return e.id||e.tempId||`${e.name}:${null!==(i=e.size)&&void 0!==i?i:""}`}handleCopy(e){var i;const o=e.url||"";if(!o)return;const t=this.keyFor(e);this.coCopy.emit({id:t,url:o}),(null===(i=navigator.clipboard)||void 0===i?void 0:i.writeText)&&navigator.clipboard.writeText(o).then((()=>{this.copiedKey=t,clearTimeout(this.copiedTimer),this.copiedTimer=setTimeout((()=>this.copiedKey=""),1500)})).catch((()=>{}))}handlePreviewOpen(e){const i=e.url||e.thumbnail;if(!i)return;this.coPreviewOpen.emit({id:this.keyFor(e),url:i});const o=this.parsedFiles.filter((e=>p(e)&&!this.failedPreviews.has(this.keyFor(e)))),t=o.map((e=>({src:u(e),thumbnail:e.thumbnail,alt:e.name}))),r=Math.max(0,o.findIndex((i=>this.keyFor(i)===this.keyFor(e))));this.closeLightbox();const a=document.createElement("co-lightbox");a.images=JSON.stringify(t),a.startIndex=r,this.locale&&(a.locale=this.locale),a.addEventListener("coClose",(()=>this.closeLightbox())),document.body.appendChild(a),this.lightboxEl=a,requestAnimationFrame((()=>{a.open=!0}))}closeLightbox(){const e=this.lightboxEl;this.lightboxEl=void 0,e&&(e.open=!1,setTimeout((()=>e.remove()),220))}handlePreviewError(e){this.failedPreviews=new Set([...this.failedPreviews,this.keyFor(e)])}handleRowDragStart(e,i){this.armedKey===i?(this.dragKey=i,e.dataTransfer&&(e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",i))):e.preventDefault()}handleRowDragOver(e,i){this.dragKey&&this.dragKey!==i&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="move"),this.overKey=i)}handleRowDrop(e,i){e.preventDefault(),e.stopPropagation();const o=this.parsedFiles.map((e=>this.keyFor(e))),t=o.indexOf(this.dragKey),r=o.indexOf(i);this.resetDragState(),t<0||r<0||t===r||(o.splice(r,0,...o.splice(t,1)),this.coReorder.emit(o))}resetDragState(){this.armedKey="",this.dragKey="",this.overKey=""}capacityHint(e){const i=this.maxBytes?d(this.maxBytes):"";return this.multiple&&this.maxBytes?n(e.helperBoth,{n:this.maxFiles,x:i}):this.multiple?n(e.helperFiles,{n:this.maxFiles}):this.maxBytes?n(e.helperBytes,{x:i}):""}render(){const e=this.strings,i=this.parsedFiles,o=this.localError||this.helperText,t=!(this.readonly||(this.multiple?this.multiple&&i.length>=this.maxFiles:0!==i.length)),s="default"!==this.status?"co-file-field--"+this.status:"",l=i.filter((e=>p(e)&&!this.failedPreviews.has(this.keyFor(e)))),c=this.reorderable&&this.multiple&&!this.disabled&&!this.readonly&&i.length>1,n=this.capacityHint(e);return r("div",{key:"31d820478276fee18bf2df79dd277ef1cbcf2ac2",class:{"co-file-field":!0,"co-file-field--disabled":this.disabled,"co-file-field--invalid":this.isInvalid,[s]:!!s},part:"wrapper"},this.label&&r("div",{key:"b7df2e7f427fb6306191c07aebd41b2a2c7303c6",class:"co-file-field__labels"},r("label",{key:"d3dcd5886777a09fea5d4082f4a941a24056184e",class:"co-file-field__label",part:"label"},this.label,r(a,{key:"6cf4505b762c9335798de30362e1eac8bc6e123c",required:this.required}))),t&&r("div",{key:"af761f6f87b10397bc3e5ebf3ee4c43c0c815449",class:{"co-file-field__dropzone":!0,"co-file-field__dropzone--drag":this.dragOver},part:"dropzone",role:"button",tabIndex:this.disabled?-1:0,onClick:this.handleBrowse,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||this.fromActionsSlot(e)||(e.preventDefault(),this.handleBrowse())},onDragOver:this.handleDragOver,onDragLeave:this.handleDragLeave,onDrop:this.handleDrop},r("button",{key:"72ab595ccd9a7f275cd214fcb17c15972057557a",class:"co-file-field__upload-btn",part:"upload-button",type:"button",tabIndex:-1},r("co-icon",{key:"686287ddfba61763e98e8753f078f8bc1ac98460",name:"file-arrow-up",size:18}),r("span",{key:"8faab79ab89c6a2fc83069ae7bcafb4b21feb416"},this.uploadButtonText||e.uploadButton)),r("span",{key:"761ab4b4e58490fe8e0024e6881a8d73fef5e7fd",class:"co-file-field__dropzone-text"},this.dropText||e.dropHint),n&&r("span",{key:"c6a88193c0aacefa6bd1534600ad56d3577b2228",class:"co-file-field__dropzone-hint"},n),r("div",{key:"ecd504e94b4ab9a1784868a357399e766b2dd68c",class:"co-file-field__actions",part:"actions"},r("slot",{key:"4e6572288387694e7e43cfa7fd58b4fb1952be2c",name:"actions"})),r("input",{key:"708ef841bab08935f125e6aa4338f67502b8689f",ref:e=>this.inputEl=e,class:"co-file-field__input",type:"file",multiple:this.multiple,accept:this.inputAccept,disabled:this.disabled,onChange:this.handleInputChange,"aria-hidden":"true",tabIndex:-1})),i.length>0&&r("div",{key:"f7423a91e47af3fbc4eb8257569df98da889bebf",class:"co-file-field__uploaded"},this.multiple&&r("div",{key:"da179d8d456ac934ee0d88679cb9866f3d9af3a9",class:"co-file-field__uploaded-title",part:"uploaded-title"},`${this.uploadedTitle||e.uploadedTitle} (${i.length})`),l.length>0&&r("div",{key:"73ffb49c6090eb21c471f9cfe145df23b8fb8592",class:"co-file-field__previews",part:"previews"},l.map((i=>r("button",{class:"co-file-field__preview",part:"preview",type:"button",key:"prev-"+this.keyFor(i),title:i.name,"aria-label":e.openPreview,onClick:()=>this.handlePreviewOpen(i)},r("img",{src:i.thumbnail||i.url,alt:i.name,loading:"lazy",onError:()=>this.handlePreviewError(i)}))))),r("ul",{key:"ecbc35245db8e66eca656423657a0223e33a156e",class:"co-file-field__list",part:"list"},i.map((i=>{const o=this.keyFor(i),t=c&&"done"===i.status;return r("li",{class:{"co-file-field__row":!0,["co-file-field__row--"+i.status]:!0,"co-file-field__row--dragging":this.dragKey===o,"co-file-field__row--drop-target":this.overKey===o},part:"row",key:o,draggable:this.armedKey===o,onDragStart:e=>this.handleRowDragStart(e,o),onDragOver:e=>this.handleRowDragOver(e,o),onDrop:e=>this.handleRowDrop(e,o),onDragEnd:this.handleRowDragEnd},t?r("span",{class:"co-file-field__drag-handle",part:"drag-handle",title:e.dragToReorder,onMouseDown:()=>this.armedKey=o},r("co-icon",{name:"list",size:18})):r("co-icon",{name:"error"===i.status?"warning-circle":"uploading"===i.status?"spinner-gap":"file",size:18,class:{"co-file-field__row-icon":!0,"co-file-field__row-icon--spin":"uploading"===i.status}}),r("div",{class:"co-file-field__row-body"},r("span",{class:"co-file-field__row-name",title:i.name},function(e,i=35){return!e||e.length<=i?e:"..."+e.slice(-i)}(i.name)),"uploading"===i.status&&r("div",{class:"co-file-field__progress"},r("div",{class:"co-file-field__progress-bar",style:"number"==typeof i.progress?{width:i.progress+"%"}:void 0})),"error"===i.status&&i.error&&r("span",{class:"co-file-field__row-error"},i.error)),null!=i.size&&r("span",{class:"co-file-field__row-size"},d(i.size)),"done"===i.status&&!!i.url&&r("button",{class:{"co-file-field__action":!0,"co-file-field__action--copied":this.copiedKey===o},type:"button",tabIndex:-1,title:this.copiedKey===o?e.copied:e.copyUrl,"aria-label":e.copyUrl,onClick:()=>this.handleCopy(i)},r("co-icon",{name:this.copiedKey===o?"check":"copy",size:18})),!this.disabled&&!this.readonly&&r("button",{class:"co-file-field__action",type:"button",tabIndex:-1,title:e.removeFile,"aria-label":e.removeFile,onClick:()=>this.coRemove.emit(o)},r("co-icon",{name:"trash",size:18})))})))),o&&r("div",{key:"e171dcd572d9b82734433eaa20f44c85c2c24735",class:{"co-file-field__helper":!0,"co-file-field__helper--error":this.isInvalid},part:"helper"},this.isInvalid&&r("co-icon",{key:"3ba44c6324cd56a470dc4668a15b31c61b58b990",name:"warning-circle",size:14,class:"co-file-field__helper-icon"}),r("span",{key:"24c06c19e336ddb0f6a5266d9a9b84f7fbf3b80e",class:"co-file-field__helper-text"},o)))}get el(){return this}static get style(){return":host{display:block;font-family:var(--co-font-family-primary);font-size:var(--co-font-size-14);letter-spacing:var(--co-font-letter-spacing-body);line-height:1}.co-file-field{display:flex;flex-direction:column;gap:var(--co-spacing-sm2)}.co-file-field__labels{display:flex;align-items:center;justify-content:space-between;padding:0 var(--co-spacing-xs)}.co-file-field__label{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);font-weight:400;line-height:1;white-space:nowrap;cursor:default}.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)')}.co-file-field__dropzone{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--co-spacing-md);padding:var(--co-spacing-4xl) var(--co-spacing-2xl);background:color-mix(in srgb, var(--co-semantic-surface-hover) 55%, transparent);-webkit-backdrop-filter:blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate));backdrop-filter:blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate));border:1px dashed var(--co-semantic-border-default);border-radius:var(--co-border-radius-sm);cursor:pointer;text-align:center;transition:border-color 0.15s ease, background 0.15s ease}.co-file-field__dropzone:hover{border-color:var(--co-semantic-border-focus)}.co-file-field__dropzone--drag{border-color:var(--co-semantic-border-focus);background:var(--co-semantic-surface-hover)}.co-file-field__upload-btn{display:inline-flex;align-items:center;gap:var(--co-spacing-sm2);padding:var(--co-spacing-md) var(--co-spacing-xl);margin-bottom:var(--co-spacing-xs);background:var(--co-semantic-surface-secondary);color:var(--co-semantic-text-default);border:none;border-radius:var(--co-border-radius-full);box-shadow:var(--co-shadow-lg);font-family:inherit;font-size:var(--co-font-size-16);font-weight:400;letter-spacing:var(--co-font-letter-spacing-body);line-height:1;cursor:pointer;transition:box-shadow 0.15s ease, transform 0.15s ease}.co-file-field__upload-btn:hover{box-shadow:var(--co-shadow-xl, var(--co-shadow-lg));transform:translateY(-1px)}.co-file-field__upload-btn co-icon{display:inline-flex;flex-shrink:0}.co-file-field__dropzone-text{color:var(--co-semantic-text-default);font-size:var(--co-font-size-18);line-height:1.25}.co-file-field__dropzone-hint{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);line-height:1.25}.co-file-field__actions{display:contents}.co-file-field__input{display:none}.co-file-field__uploaded{display:flex;flex-direction:column;gap:var(--co-spacing-lg);margin-top:var(--co-spacing-sm2)}.co-file-field__uploaded-title{color:var(--co-semantic-text-default);font-size:var(--co-font-size-22);font-weight:500;letter-spacing:-0.03em;line-height:1.25}.co-file-field__previews{display:grid;grid-template-columns:repeat(auto-fill, minmax(240px, 282px));gap:var(--co-spacing-md)}.co-file-field__preview{padding:0;border:none;border-radius:var(--co-border-radius-sm);overflow:hidden;aspect-ratio:3 / 2;background:var(--co-semantic-surface-hover);cursor:pointer}.co-file-field__preview img{display:block;width:100%;height:100%;object-fit:cover;transition:transform 0.2s ease}.co-file-field__preview:hover img{transform:scale(1.02)}.co-file-field__list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:var(--co-spacing-sm2)}.co-file-field__row{display:flex;align-items:center;gap:var(--co-spacing-lg);padding:var(--co-spacing-xl);background:var(--co-semantic-surface-hover);border:1px solid transparent;border-radius:var(--co-border-radius-sm)}.co-file-field__row--error{border-color:var(--co-semantic-status-error)}.co-file-field__row--dragging{opacity:0.5}.co-file-field__row--drop-target{border-color:var(--co-semantic-border-focus);background:var(--co-semantic-surface-hover)}.co-file-field__drag-handle{flex-shrink:0;display:flex;align-items:center;color:var(--co-semantic-text-secondary);cursor:grab}.co-file-field__drag-handle:active{cursor:grabbing}.co-file-field__row-icon{flex-shrink:0;color:var(--co-semantic-text-secondary);display:flex;align-items:center}.co-file-field__row--error .co-file-field__row-icon{color:var(--co-semantic-status-error)}.co-file-field__row-icon--spin{animation:co-file-spin 0.8s linear infinite}@keyframes co-file-spin{to{transform:rotate(360deg)}}.co-file-field__row-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:var(--co-spacing-xs)}.co-file-field__row-name{color:var(--co-semantic-text-default);font-size:var(--co-font-size-14);line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.co-file-field__row-error{color:var(--co-semantic-status-error);font-size:var(--co-font-size-12)}.co-file-field__row-size{flex-shrink:0;color:var(--co-semantic-text-default);font-size:var(--co-font-size-14);line-height:1;white-space:nowrap}.co-file-field__progress{position:relative;height:4px;border-radius:var(--co-border-radius-full);background:var(--co-semantic-surface-hover);overflow:hidden}.co-file-field__progress-bar{position:absolute;inset:0;width:40%;border-radius:var(--co-border-radius-full);background:var(--co-semantic-border-focus);transition:width 0.2s ease}.co-file-field__progress-bar:not([style]){animation:co-file-indeterminate 1.2s ease-in-out infinite}@keyframes co-file-indeterminate{0%{left:-40%}100%{left:100%}}.co-file-field__action{flex-shrink:0;display:flex;align-items:center;justify-content:center;padding:0;border:none;background:transparent;cursor:pointer;color:var(--co-semantic-text-secondary);transition:color 0.15s ease}.co-file-field__action:hover{color:var(--co-semantic-text-default)}.co-file-field__action--copied,.co-file-field__action--copied:hover{color:var(--co-color-primary-verde)}.co-file-field__helper{display:flex;align-items:center;gap:var(--co-spacing-xs);padding:0 var(--co-spacing-xs)}.co-file-field__helper-icon{flex-shrink:0;color:var(--co-semantic-text-muted);display:flex;align-items:center}.co-file-field__helper-text{color:var(--co-semantic-text-muted);font-size:var(--co-font-size-14);line-height:1}.co-file-field--disabled{opacity:0.6;pointer-events:none}.co-file-field--invalid .co-file-field__dropzone,.co-file-field--error .co-file-field__dropzone{border-color:var(--co-semantic-status-error)}.co-file-field__helper--error .co-file-field__helper-icon,.co-file-field__helper--error .co-file-field__helper-text{color:var(--co-semantic-status-error)}:host([layout='horizontal']) .co-file-field{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-file-field__labels{grid-column:1;grid-row:1;padding-top:var(--co-spacing-sm2);min-width:0}:host([layout='horizontal']) .co-file-field__label{white-space:normal}:host([layout='horizontal']) .co-file-field>:not(.co-file-field__labels){grid-column:2;min-width:0}@supports not (background: color-mix(in srgb, red, transparent)){.co-file-field__dropzone{background:var(--co-semantic-surface-hover)}}"}},[257,"co-file-field",{label:[1],disabled:[4],readonly:[4],required:[4],multiple:[4],accept:[1],maxFiles:[2,"max-files"],maxBytes:[2,"max-bytes"],status:[1],helperText:[1,"helper-text"],layout:[513],locale:[1],uploadButtonText:[1,"upload-button-text"],dropText:[1,"drop-text"],uploadedTitle:[1,"uploaded-title"],reorderable:[4],files:[1],dragOver:[32],localError:[32],copiedKey:[32],armedKey:[32],dragKey:[32],overKey:[32],failedPreviews:[32]}]);function g(){"undefined"!=typeof customElements&&["co-file-field","co-icon","co-lightbox"].forEach((i=>{switch(i){case"co-file-field":customElements.get(e(i))||customElements.define(e(i),v);break;case"co-icon":customElements.get(e(i))||s();break;case"co-lightbox":customElements.get(e(i))||l()}}))}g();const b=v,_=g;export{b as CoFileField,_ as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as o,d as s}from"./p-
|
|
1
|
+
import{C as o,d as s}from"./p-_k-j03K-.js";const p=o,r=s;export{p as CoFileTypeTile,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as t,H as
|
|
1
|
+
import{t as e,p as t,H as c,h as s}from"./index.js";import{d as o}from"./p-D4SOCy8I.js";const r=t(class extends c{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.status="default",this.STATUS_ICON={default:"info",error:"x-circle",success:"check-circle",warning:"warning",info:"info"}}render(){return s("div",{key:"edb5f0cdd150dcaa06230b90d3385d18684e2261",class:{"co-helper-text":!0,["co-helper-text--"+this.status]:!0},part:"helper-text"},s("co-icon",{key:"7f9cce7182cd39893e0f6abfab2d1a27c266ea17",name:this.STATUS_ICON[this.status],size:14,weight:"fill",class:"co-helper-text__icon"}),s("span",{key:"38757c70aca1891bfd43b505d57d7455b22512b3",class:"co-helper-text__message"},s("slot",{key:"9382e95880c71e3da4eed22ed6c14589c4890252"},this.message)))}static get style(){return":host{display:block}.co-helper-text{display:flex;align-items:center;gap:var(--co-spacing-xs);font-family:var(--co-font-family-primary);font-size:var(--co-font-size-12);line-height:1.4}.co-helper-text__icon{flex-shrink:0}.co-helper-text--default{color:var(--co-semantic-text-muted)}.co-helper-text--error{color:var(--co-semantic-status-error)}.co-helper-text--success{color:var(--co-semantic-status-success)}.co-helper-text--warning{color:var(--co-semantic-status-warning)}.co-helper-text--info{color:var(--co-semantic-status-info)}"}},[257,"co-helper-text",{status:[1],message:[1]}]);function a(){"undefined"!=typeof customElements&&["co-helper-text","co-icon"].forEach((t=>{switch(t){case"co-helper-text":customElements.get(e(t))||customElements.define(e(t),r);break;case"co-icon":customElements.get(e(t))||o()}}))}a();const i=r,n=a;export{i as CoHelperText,n as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as o,p as t,H as r,h as i}from"./index.js";import{d as n}from"./p-
|
|
1
|
+
import{t as o,p as t,H as r,h as i}from"./index.js";import{d as n}from"./p-D4SOCy8I.js";const c=t(class extends r{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow(),this.variant="filled",this.surface="light",this.shape="rounded",this.size="md",this.disabled=!1,this.label="",this.iconWeight="regular"}render(){var o,t;const r=null!==(o=this.iconSize)&&void 0!==o?o:null!==(t={xl:32,lg:28,md:24,sm:20,xs:16,xxs:16}[this.size])&&void 0!==t?t:24,n=null!=this.boxSize?{width:this.boxSize+"px",height:this.boxSize+"px",borderRadius:"square"===this.shape?"var(--co-border-radius-xs, 8px)":"var(--co-border-radius-full)"}:void 0;return i("button",{key:"bf9aad13fe7360a7135da123ba555b64ee90cadc",class:{"co-icon-button":!0,["co-icon-button--"+this.variant]:!0,["co-icon-button--"+this.shape]:!0,["co-icon-button--"+this.size]:!0,"co-icon-button--dark":"dark"===this.surface,"co-icon-button--disabled":this.disabled},style:n,disabled:this.disabled,"aria-label":this.label||this.icon,part:"button"},this.icon?i("co-icon",{name:this.icon,weight:this.iconWeight,size:r}):null)}static get style(){return":host{display:inline-flex}.co-icon-button{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;border:1px solid transparent;outline:none;padding:0;flex-shrink:0;transition:opacity 0.15s ease, background 0.15s ease;box-sizing:border-box;-webkit-font-smoothing:antialiased;-webkit-backdrop-filter:var(--co-icon-button-backdrop-filter, blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate)));backdrop-filter:var(--co-icon-button-backdrop-filter, blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate)))}.co-icon-button--filled{background:color-mix(in srgb, var(--co-semantic-surface-primary) 78%, transparent);color:var(--co-semantic-on-primary);border-color:color-mix(in srgb, var(--co-semantic-on-primary) 28%, transparent)}.co-icon-button--outlined{background:color-mix(in srgb, var(--co-icon-button-bg, var(--co-semantic-surface-secondary)) 55%, transparent);color:var(--co-icon-button-color, var(--co-semantic-on-secondary));border:1px solid var(--co-icon-button-border, var(--co-semantic-border-subtle))}.co-icon-button--ghost{background:transparent;color:var(--co-icon-button-color, var(--co-semantic-text-default));border:none;-webkit-backdrop-filter:none;backdrop-filter:none}.co-icon-button--ghost:hover:not(:disabled){background:var(--co-color-opacity-negro-8, rgba(31, 28, 27, 0.08))}.co-icon-button--dark{color:var(--co-icon-button-color, var(--co-color-base-blanco, #fff))}.co-icon-button--dark.co-icon-button--ghost:hover:not(:disabled){background:var(--co-color-opacity-blanco-16, rgba(255, 255, 255, 0.16))}.co-icon-button--rounded.co-icon-button--xl{width:80px;height:80px;border-radius:var(--co-border-radius-full)}.co-icon-button--rounded.co-icon-button--lg{width:64px;height:64px;border-radius:var(--co-border-radius-full)}.co-icon-button--rounded.co-icon-button--md{width:56px;height:56px;border-radius:var(--co-border-radius-full)}.co-icon-button--rounded.co-icon-button--sm{width:48px;height:48px;border-radius:var(--co-border-radius-full)}.co-icon-button--rounded.co-icon-button--xs{width:32px;height:32px;border-radius:var(--co-border-radius-full)}.co-icon-button--rounded.co-icon-button--xxs{width:24px;height:24px;border-radius:var(--co-border-radius-full)}.co-icon-button--square.co-icon-button--xl{width:80px;height:80px;border-radius:var(--co-border-radius-xl);}.co-icon-button--square.co-icon-button--lg{width:64px;height:64px;border-radius:var(--co-border-radius-lg);}.co-icon-button--square.co-icon-button--md{width:56px;height:56px;border-radius:var(--co-border-radius-lg);}.co-icon-button--square.co-icon-button--sm{width:48px;height:48px;border-radius:var(--co-border-radius-sm);}.co-icon-button--square.co-icon-button--xs{width:32px;height:32px;border-radius:var(--co-border-radius-xs);}.co-icon-button--square.co-icon-button--xxs{width:24px;height:24px;border-radius:var(--co-spacing-sm);}.co-icon-button--xl ::slotted(*){width:32px;height:32px}.co-icon-button--lg ::slotted(*){width:24px;height:24px}.co-icon-button--md ::slotted(*){width:20px;height:20px}.co-icon-button--sm ::slotted(*){width:18px;height:18px}.co-icon-button--xs ::slotted(*){width:16px;height:16px}.co-icon-button--xxs ::slotted(*){width:12px;height:12px}.co-icon-button--disabled,.co-icon-button:disabled{opacity:0.4;cursor:not-allowed;pointer-events:none}.co-icon-button:hover:not(:disabled){opacity:0.88}@supports not (background: color-mix(in srgb, red, transparent)){.co-icon-button--filled{background:var(--co-semantic-surface-primary)}.co-icon-button--outlined{background:var(--co-icon-button-bg, var(--co-semantic-surface-secondary))}}"}},[1,"co-icon-button",{variant:[1],surface:[1],shape:[513],size:[1],boxSize:[2,"box-size"],iconSize:[2,"icon-size"],disabled:[4],label:[1],icon:[1],iconWeight:[1,"icon-weight"]}]);function e(){"undefined"!=typeof customElements&&["co-icon-button","co-icon"].forEach((t=>{switch(t){case"co-icon-button":customElements.get(o(t))||customElements.define(o(t),c);break;case"co-icon":customElements.get(o(t))||n()}}))}e();const a=c,s=e;export{a as CoIconButton,s as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as o,d as s}from"./p-
|
|
1
|
+
import{C as o,d as s}from"./p-D4SOCy8I.js";const p=o,r=s;export{p as CoIcon,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as i,p as t,H as o,c as e,h as c}from"./index.js";import{R as n}from"./p-CWneqh4n.js";import{d as s}from"./p-CUvAZhuM.js";const a=t(class extends o{constructor(i){super(),!1!==i&&this.__registerHost(),this.__attachShadow(),this.coInput=e(this,"coInput",7),this.coChange=e(this,"coChange",7),this.coClear=e(this,"coClear",7),this.coFocus=e(this,"coFocus",7),this.coBlur=e(this,"coBlur",7),this.coAction=e(this,"coAction",7),this.placeholder="",this.value="",this.disabled=!1,this.readonly=!1,this.clearable=!1,this.layout="vertical",this.type="text",this.required=!1,this.status="default",this.size="md",this.fill=!1,this.hasFocus=!1,this.handleInput=i=>{this.value=i.target.value,this.coInput.emit(this.value)},this.handleChange=()=>{this.coChange.emit(this.value)},this.handleFocus=()=>{this.hasFocus=!0,this.coFocus.emit()},this.handleBlur=()=>{this.hasFocus=!1,this.coBlur.emit()},this.handleKeyDown=i=>{if("Enter"===i.key){const i=this.el.closest("form");i&&i.requestSubmit()}},this.handleClear=()=>{var i;this.value="",this.coClear.emit(),this.coInput.emit(""),null===(i=this.inputEl)||void 0===i||i.focus()},this.handleAction=()=>{this.coAction.emit()}}get hasAction(){return!(!this.actionLabel&&!this.actionIcon)}get hasValue(){return null!=this.value&&""!==this.value}get statusFieldIcon(){switch(this.status){case"success":return"check";case"error":case"warning":return"warning";case"info":return"info";default:return null}}get helperIcon(){switch(this.status){case"error":case"warning":return"warning-circle";case"success":return"check-circle";case"info":return"info";default:return null}}renderFill(){const i=this.clearable&&this.hasValue&&!this.disabled&&!this.readonly,t=this.iconLeft||"magnifying-glass";return c("div",{class:{"co-input":!0,"co-input--fill":!0,["co-input--"+this.size]:!0,"co-input--disabled":this.disabled,"co-input--focused":this.hasFocus,"co-input--filled":this.hasValue},part:"wrapper"},c("div",{class:"co-input__field-row"},c("div",{class:"co-input__field",part:"field"},c("co-icon",{name:t,size:17,class:"co-input__icon co-input__icon--left"}),c("div",{class:"co-input__input-wrapper"},c("input",{ref:i=>this.inputEl=i,class:"co-input__native",type:this.type,name:this.name,value:this.value,placeholder:this.placeholder,disabled:this.disabled,readOnly:this.readonly,required:this.required,autoComplete:this.autocomplete,onInput:this.handleInput,onChange:this.handleChange,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,part:"input"})),this.clearable&&c("button",{class:{"co-input__clear":!0,"co-input__clear--hidden":!i},type:"button",tabIndex:-1,onClick:this.handleClear,"aria-label":"Clear input",part:"clear"},c("co-icon",{name:"x",size:14})))))}render(){if(this.fill)return this.renderFill();const i=this.clearable&&this.hasValue&&!this.disabled&&!this.readonly;return c("div",{class:{"co-input":!0,["co-input--"+this.layout]:!0,["co-input--"+this.size]:!0,"co-input--disabled":this.disabled,"co-input--focused":this.hasFocus,"co-input--filled":this.hasValue,["co-input--"+this.status]:"default"!==this.status,"co-input--has-action":this.hasAction},part:"wrapper"},(this.label||this.secondaryLabel)&&c("div",{class:"co-input__labels"},this.label&&c("label",{class:"co-input__label",part:"label"},this.label,c(n,{required:this.required})),this.secondaryLabel&&c("span",{class:"co-input__secondary-label",part:"secondary-label"},this.secondaryLabel)),c("div",{class:"co-input__field-row"},c("div",{class:"co-input__field",part:"field"},this.iconLeft&&c("co-icon",{name:this.iconLeft,size:16,class:"co-input__icon co-input__icon--left"}),c("slot",{name:"chips"}),c("div",{class:"co-input__input-wrapper"},c("input",{ref:i=>this.inputEl=i,class:"co-input__native",type:this.type,name:this.name,value:this.value,placeholder:this.placeholder,disabled:this.disabled,readOnly:this.readonly,required:this.required,autoComplete:this.autocomplete,onInput:this.handleInput,onChange:this.handleChange,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,part:"input"})),this.clearable&&c("button",{class:{"co-input__clear":!0,"co-input__clear--hidden":!i},type:"button",tabIndex:-1,onClick:this.handleClear,"aria-label":"Clear input",part:"clear"},c("co-icon",{name:"x-circle",size:16,weight:"fill"})),this.iconRight&&c("co-icon",{name:this.iconRight,size:16,class:"co-input__icon co-input__icon--right"}),this.statusFieldIcon&&c("co-icon",{name:this.statusFieldIcon,size:16,class:"co-input__status-icon"}),c("slot",{name:"suffix"}),c("slot",null),c("slot",{name:"action"})),this.hasAction&&c("button",{class:"co-input__action",type:"button",onClick:this.handleAction,disabled:this.disabled,part:"action"},this.actionIcon&&c("co-icon",{name:this.actionIcon,size:16,class:"co-input__action-icon"}),this.actionLabel&&c("span",{class:"co-input__action-label"},this.actionLabel))),this.helperText&&c("div",{class:"co-input__helper co-input__helper--"+this.status,part:"helper"},this.helperIcon&&c("co-icon",{name:this.helperIcon,size:14,class:"co-input__helper-icon"}),c("span",{class:"co-input__helper-text"},this.helperText)))}get el(){return this}static get style(){return":host{display:block;font-family:var(--co-font-family-primary);font-size:var(--co-font-size-14);letter-spacing:var(--co-font-letter-spacing-body);line-height:1}.co-input{display:flex;flex-direction:column;gap:var(--co-spacing-sm2)}:host([layout='horizontal']) .co-input{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-input__labels{grid-column:1;grid-row:1;padding-top:var(--co-spacing-sm2);min-width:0}:host([layout='horizontal']) .co-input__label{white-space:normal}:host([layout='horizontal']) .co-input>:not(.co-input__labels){grid-column:2;min-width:0}.co-input__labels{display:flex;align-items:center;justify-content:space-between;padding:0 var(--co-spacing-xs);gap:var(--co-spacing-sm2)}.co-input__label{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);font-weight:400;letter-spacing:var(--co-font-letter-spacing-body);line-height:1;white-space:nowrap;cursor:default}.co-input__secondary-label{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);font-weight:400;letter-spacing:var(--co-font-letter-spacing-body);line-height:1;white-space:nowrap;text-align:right}.co-input__field-row{display:flex;align-items:stretch}.co-input__field{display:flex;align-items:center;gap:var(--co-spacing-sm2);padding:var(--co-spacing-sm2) var(--co-spacing-md);background:color-mix(in srgb, var(--co-semantic-surface-secondary) 55%, transparent);-webkit-backdrop-filter:blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate));backdrop-filter:blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate));border:1px solid var(--co-semantic-border-subtle);border-radius:var(--co-border-radius-xs);transition:border-color 0.15s ease, box-shadow 0.15s ease;min-height:40px;box-sizing:border-box;overflow:hidden;flex:1;min-width:0}.co-input--s .co-input__field{min-height:28px;padding:var(--co-spacing-xxs) var(--co-spacing-sm);font-size:var(--co-font-size-12)}.co-input--sm .co-input__field{min-height:32px;padding:var(--co-spacing-xs) var(--co-spacing-sm);font-size:var(--co-font-size-14)}.co-input--lg .co-input__field{min-height:48px;padding:var(--co-spacing-sm) var(--co-spacing-lg);font-size:var(--co-font-size-16)}.co-input--has-action .co-input__field{border-radius:var(--co-border-radius-xs) 0 0 var(--co-border-radius-xs);border-right:none}.co-input__field ::slotted([slot=\"action\"]){margin-left:auto;margin-right:calc(-1 * var(--co-spacing-md));margin-top:calc(-1 * var(--co-spacing-sm2));margin-bottom:calc(-1 * var(--co-spacing-sm2));border-radius:0 var(--co-border-radius-xs) var(--co-border-radius-xs) 0;flex-shrink:0}.co-input__field ::slotted([slot=\"chips\"]){display:flex;gap:var(--co-spacing-xxs);align-items:center;flex-wrap:wrap;min-width:0}.co-input__input-wrapper{flex:1;display:flex;align-items:center;min-width:0;min-height:24px;padding:var(--co-spacing-xxs) 0}.co-input__native{width:100%;border:none;outline:none;background:transparent;font-family:inherit;font-size:inherit;font-weight:400;letter-spacing:inherit;line-height:1;color:var(--co-semantic-text-default);padding:0;margin:0}.co-input__native::placeholder{color:var(--co-semantic-text-muted)}.co-input__icon{flex-shrink:0;color:var(--co-semantic-text-muted);display:flex;align-items:center}.co-input__clear{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:16px;padding:0;margin:0;border:none;background:transparent;cursor:pointer;color:var(--co-semantic-text-muted);transition:color 0.15s ease}.co-input__clear--hidden{visibility:hidden;pointer-events:none}.co-input__clear:hover{color:var(--co-semantic-text-default)}.co-input__action{display:flex;align-items:center;gap:var(--co-spacing-sm);padding:var(--co-spacing-sm2) var(--co-spacing-md) var(--co-spacing-sm2) var(--co-spacing-sm2);background:var(--co-semantic-surface-primary);color:var(--co-semantic-on-primary);border:none;border-radius:0 var(--co-border-radius-xs) var(--co-border-radius-xs) 0;cursor:pointer;font-family:var(--co-font-family-primary);font-size:var(--co-font-size-14);font-weight:400;letter-spacing:var(--co-font-letter-spacing-body);line-height:1;white-space:nowrap;flex-shrink:0;transition:opacity 0.15s ease;box-sizing:border-box}.co-input__action:hover{opacity:0.85}.co-input__action:disabled{opacity:0.4;cursor:not-allowed}.co-input__action-icon{display:flex;align-items:center;flex-shrink:0}.co-input__action-label{display:flex;align-items:center}.co-input__helper{display:flex;align-items:center;gap:var(--co-spacing-xs);padding:0 var(--co-spacing-xs)}.co-input__helper-icon{flex-shrink:0;color:var(--co-semantic-text-muted);display:flex;align-items:center}.co-input__helper-text{color:var(--co-semantic-text-muted);font-size:var(--co-font-size-14);font-weight:400;line-height:1;letter-spacing:var(--co-font-letter-spacing-body)}.co-input--focused .co-input__field{border-color:var(--co-semantic-border-focus);box-shadow:0 0 0 2px var(--co-semantic-border-focus-ring)}.co-input--disabled .co-input__labels .co-input__label,.co-input--disabled .co-input__labels .co-input__secondary-label{color:var(--co-semantic-text-disabled)}.co-input--disabled .co-input__field{background:var(--co-semantic-surface-disabled);border-color:transparent;cursor:not-allowed}.co-input--disabled .co-input__native{color:var(--co-semantic-text-disabled);cursor:not-allowed}.co-input--disabled .co-input__native::placeholder{color:var(--co-semantic-text-disabled)}.co-input--disabled .co-input__icon{color:var(--co-semantic-text-disabled)}.co-input__status-icon{flex-shrink:0;display:flex;align-items:center}.co-input--success .co-input__status-icon{color:var(--co-semantic-status-success)}.co-input--error .co-input__status-icon{color:var(--co-semantic-status-error)}.co-input--warning .co-input__status-icon{color:var(--co-color-status-review)}.co-input--info .co-input__status-icon{color:var(--co-semantic-status-info)}.co-input--error .co-input__field{border-color:var(--co-semantic-status-error)}.co-input--error.co-input--focused .co-input__field{border-color:var(--co-semantic-status-error);box-shadow:0 0 0 2px rgba(170, 46, 27, 0.12)}.co-input__helper--error .co-input__helper-icon,.co-input__helper--error .co-input__helper-text{color:var(--co-semantic-status-error)}.co-input--success .co-input__field{border-color:var(--co-semantic-status-success)}.co-input--success.co-input--focused .co-input__field{border-color:var(--co-semantic-status-success);box-shadow:0 0 0 2px rgba(10, 119, 36, 0.12)}.co-input__helper--success .co-input__helper-icon,.co-input__helper--success .co-input__helper-text{color:var(--co-semantic-status-success)}.co-input--warning .co-input__field{border-color:var(--co-color-status-review)}.co-input--warning.co-input--focused .co-input__field{border-color:var(--co-color-status-review);box-shadow:0 0 0 2px rgba(133, 87, 31, 0.12)}.co-input__helper--warning .co-input__helper-icon,.co-input__helper--warning .co-input__helper-text{color:var(--co-color-status-review)}.co-input--info .co-input__field{border-color:var(--co-semantic-status-info)}.co-input--info.co-input--focused .co-input__field{border-color:var(--co-semantic-status-info);box-shadow:0 0 0 2px rgba(45, 108, 197, 0.12)}.co-input__helper--info .co-input__helper-icon,.co-input__helper--info .co-input__helper-text{color:var(--co-semantic-status-info)}.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)')}@supports not (background: color-mix(in srgb, red, transparent)){.co-input__field{background:var(--co-semantic-surface-secondary)}}.co-input--fill .co-input__field{background:var(--co-color-gray-100, #f6f6f6);border:none;box-shadow:none;border-radius:10px;padding:0 12px;gap:var(--co-spacing-sm2);min-height:46px;font-size:13.5px;-webkit-backdrop-filter:none;backdrop-filter:none}.co-input--fill.co-input--s .co-input__field{min-height:38px}.co-input--fill.co-input--sm .co-input__field{min-height:42px}.co-input--fill.co-input--lg .co-input__field{min-height:52px}.co-input--fill .co-input__native{font-size:13.5px;font-family:var(--co-font-family-primary);letter-spacing:var(--co-font-letter-spacing-body)}.co-input--fill .co-input__native::placeholder{color:var(--co-color-gray-400, #a0a0a0)}.co-input--fill .co-input__icon{color:var(--co-color-gray-400, #a0a0a0)}.co-input--fill .co-input__clear{color:var(--co-color-gray-400, #a0a0a0)}.co-input--fill .co-input__clear:hover{color:var(--co-color-gray-600, #585858)}.co-input--fill.co-input--focused .co-input__field{border-color:transparent;box-shadow:none}"}},[257,"co-input",{label:[1],secondaryLabel:[1,"secondary-label"],placeholder:[1],value:[1025],helperText:[1,"helper-text"],disabled:[4],readonly:[4],clearable:[4],iconLeft:[1,"icon-left"],iconRight:[1,"icon-right"],layout:[513],type:[1],name:[1],required:[4],autocomplete:[1],status:[1],size:[513],fill:[4],actionLabel:[1,"action-label"],actionIcon:[1,"action-icon"],hasFocus:[32]}]);function r(){"undefined"!=typeof customElements&&["co-input","co-icon"].forEach((t=>{switch(t){case"co-input":customElements.get(i(t))||customElements.define(i(t),a);break;case"co-icon":customElements.get(i(t))||s()}}))}r();const l=a,p=r;export{l as CoInput,p as defineCustomElement}
|
|
1
|
+
import{t as i,p as t,H as o,c as e,h as c}from"./index.js";import{R as n}from"./p-CWneqh4n.js";import{d as s}from"./p-D4SOCy8I.js";const a=t(class extends o{constructor(i){super(),!1!==i&&this.__registerHost(),this.__attachShadow(),this.coInput=e(this,"coInput",7),this.coChange=e(this,"coChange",7),this.coClear=e(this,"coClear",7),this.coFocus=e(this,"coFocus",7),this.coBlur=e(this,"coBlur",7),this.coAction=e(this,"coAction",7),this.placeholder="",this.value="",this.disabled=!1,this.readonly=!1,this.clearable=!1,this.layout="vertical",this.type="text",this.required=!1,this.status="default",this.size="md",this.fill=!1,this.hasFocus=!1,this.handleInput=i=>{this.value=i.target.value,this.coInput.emit(this.value)},this.handleChange=()=>{this.coChange.emit(this.value)},this.handleFocus=()=>{this.hasFocus=!0,this.coFocus.emit()},this.handleBlur=()=>{this.hasFocus=!1,this.coBlur.emit()},this.handleKeyDown=i=>{if("Enter"===i.key){const i=this.el.closest("form");i&&i.requestSubmit()}},this.handleClear=()=>{var i;this.value="",this.coClear.emit(),this.coInput.emit(""),null===(i=this.inputEl)||void 0===i||i.focus()},this.handleAction=()=>{this.coAction.emit()}}get hasAction(){return!(!this.actionLabel&&!this.actionIcon)}get hasValue(){return null!=this.value&&""!==this.value}get statusFieldIcon(){switch(this.status){case"success":return"check";case"error":case"warning":return"warning";case"info":return"info";default:return null}}get helperIcon(){switch(this.status){case"error":case"warning":return"warning-circle";case"success":return"check-circle";case"info":return"info";default:return null}}renderFill(){const i=this.clearable&&this.hasValue&&!this.disabled&&!this.readonly,t=this.iconLeft||"magnifying-glass";return c("div",{class:{"co-input":!0,"co-input--fill":!0,["co-input--"+this.size]:!0,"co-input--disabled":this.disabled,"co-input--focused":this.hasFocus,"co-input--filled":this.hasValue},part:"wrapper"},c("div",{class:"co-input__field-row"},c("div",{class:"co-input__field",part:"field"},c("co-icon",{name:t,size:17,class:"co-input__icon co-input__icon--left"}),c("div",{class:"co-input__input-wrapper"},c("input",{ref:i=>this.inputEl=i,class:"co-input__native",type:this.type,name:this.name,value:this.value,placeholder:this.placeholder,disabled:this.disabled,readOnly:this.readonly,required:this.required,autoComplete:this.autocomplete,onInput:this.handleInput,onChange:this.handleChange,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,part:"input"})),this.clearable&&c("button",{class:{"co-input__clear":!0,"co-input__clear--hidden":!i},type:"button",tabIndex:-1,onClick:this.handleClear,"aria-label":"Clear input",part:"clear"},c("co-icon",{name:"x",size:14})))))}render(){if(this.fill)return this.renderFill();const i=this.clearable&&this.hasValue&&!this.disabled&&!this.readonly;return c("div",{class:{"co-input":!0,["co-input--"+this.layout]:!0,["co-input--"+this.size]:!0,"co-input--disabled":this.disabled,"co-input--focused":this.hasFocus,"co-input--filled":this.hasValue,["co-input--"+this.status]:"default"!==this.status,"co-input--has-action":this.hasAction},part:"wrapper"},(this.label||this.secondaryLabel)&&c("div",{class:"co-input__labels"},this.label&&c("label",{class:"co-input__label",part:"label"},this.label,c(n,{required:this.required})),this.secondaryLabel&&c("span",{class:"co-input__secondary-label",part:"secondary-label"},this.secondaryLabel)),c("div",{class:"co-input__field-row"},c("div",{class:"co-input__field",part:"field"},this.iconLeft&&c("co-icon",{name:this.iconLeft,size:16,class:"co-input__icon co-input__icon--left"}),c("slot",{name:"chips"}),c("div",{class:"co-input__input-wrapper"},c("input",{ref:i=>this.inputEl=i,class:"co-input__native",type:this.type,name:this.name,value:this.value,placeholder:this.placeholder,disabled:this.disabled,readOnly:this.readonly,required:this.required,autoComplete:this.autocomplete,onInput:this.handleInput,onChange:this.handleChange,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,part:"input"})),this.clearable&&c("button",{class:{"co-input__clear":!0,"co-input__clear--hidden":!i},type:"button",tabIndex:-1,onClick:this.handleClear,"aria-label":"Clear input",part:"clear"},c("co-icon",{name:"x-circle",size:16,weight:"fill"})),this.iconRight&&c("co-icon",{name:this.iconRight,size:16,class:"co-input__icon co-input__icon--right"}),this.statusFieldIcon&&c("co-icon",{name:this.statusFieldIcon,size:16,class:"co-input__status-icon"}),c("slot",{name:"suffix"}),c("slot",null),c("slot",{name:"action"})),this.hasAction&&c("button",{class:"co-input__action",type:"button",onClick:this.handleAction,disabled:this.disabled,part:"action"},this.actionIcon&&c("co-icon",{name:this.actionIcon,size:16,class:"co-input__action-icon"}),this.actionLabel&&c("span",{class:"co-input__action-label"},this.actionLabel))),this.helperText&&c("div",{class:"co-input__helper co-input__helper--"+this.status,part:"helper"},this.helperIcon&&c("co-icon",{name:this.helperIcon,size:14,class:"co-input__helper-icon"}),c("span",{class:"co-input__helper-text"},this.helperText)))}get el(){return this}static get style(){return":host{display:block;font-family:var(--co-font-family-primary);font-size:var(--co-font-size-14);letter-spacing:var(--co-font-letter-spacing-body);line-height:1}.co-input{display:flex;flex-direction:column;gap:var(--co-spacing-sm2)}:host([layout='horizontal']) .co-input{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-input__labels{grid-column:1;grid-row:1;padding-top:var(--co-spacing-sm2);min-width:0}:host([layout='horizontal']) .co-input__label{white-space:normal}:host([layout='horizontal']) .co-input>:not(.co-input__labels){grid-column:2;min-width:0}.co-input__labels{display:flex;align-items:center;justify-content:space-between;padding:0 var(--co-spacing-xs);gap:var(--co-spacing-sm2)}.co-input__label{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);font-weight:400;letter-spacing:var(--co-font-letter-spacing-body);line-height:1;white-space:nowrap;cursor:default}.co-input__secondary-label{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);font-weight:400;letter-spacing:var(--co-font-letter-spacing-body);line-height:1;white-space:nowrap;text-align:right}.co-input__field-row{display:flex;align-items:stretch}.co-input__field{display:flex;align-items:center;gap:var(--co-spacing-sm2);padding:var(--co-spacing-sm2) 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);transition:border-color 0.15s ease, box-shadow 0.15s ease;min-height:40px;box-sizing:border-box;overflow:hidden;flex:1;min-width:0}.co-input--s .co-input__field{min-height:28px;padding:var(--co-spacing-xxs) var(--co-spacing-sm);font-size:var(--co-font-size-12)}.co-input--sm .co-input__field{min-height:32px;padding:var(--co-spacing-xs) var(--co-spacing-sm);font-size:var(--co-font-size-14)}.co-input--lg .co-input__field{min-height:48px;padding:var(--co-spacing-sm) var(--co-spacing-lg);font-size:var(--co-font-size-16)}.co-input--has-action .co-input__field{border-radius:var(--co-border-radius-xs) 0 0 var(--co-border-radius-xs);border-right:none}.co-input__field ::slotted([slot=\"action\"]){margin-left:auto;margin-right:calc(-1 * var(--co-spacing-md));margin-top:calc(-1 * var(--co-spacing-sm2));margin-bottom:calc(-1 * var(--co-spacing-sm2));border-radius:0 var(--co-border-radius-xs) var(--co-border-radius-xs) 0;flex-shrink:0}.co-input__field ::slotted([slot=\"chips\"]){display:flex;gap:var(--co-spacing-xxs);align-items:center;flex-wrap:wrap;min-width:0}.co-input__input-wrapper{flex:1;display:flex;align-items:center;min-width:0;min-height:22px;padding:0}.co-input__native{width:100%;border:none;outline:none;background:transparent;font-family:inherit;font-size:inherit;font-weight:400;letter-spacing:inherit;line-height:1;color:var(--co-semantic-text-default);padding:0;margin:0}.co-input__native::placeholder{color:var(--co-semantic-text-muted)}.co-input__icon{flex-shrink:0;color:var(--co-semantic-text-muted);display:flex;align-items:center}.co-input__clear{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:16px;padding:0;margin:0;border:none;background:transparent;cursor:pointer;color:var(--co-semantic-text-muted);transition:color 0.15s ease}.co-input__clear--hidden{visibility:hidden;pointer-events:none}.co-input__clear:hover{color:var(--co-semantic-text-default)}.co-input__action{display:flex;align-items:center;gap:var(--co-spacing-sm);padding:var(--co-spacing-sm2) var(--co-spacing-md) var(--co-spacing-sm2) var(--co-spacing-sm2);background:var(--co-semantic-surface-primary);color:var(--co-semantic-on-primary);border:none;border-radius:0 var(--co-border-radius-xs) var(--co-border-radius-xs) 0;cursor:pointer;font-family:var(--co-font-family-primary);font-size:var(--co-font-size-14);font-weight:400;letter-spacing:var(--co-font-letter-spacing-body);line-height:1;white-space:nowrap;flex-shrink:0;transition:opacity 0.15s ease;box-sizing:border-box}.co-input__action:hover{opacity:0.85}.co-input__action:disabled{opacity:0.4;cursor:not-allowed}.co-input__action-icon{display:flex;align-items:center;flex-shrink:0}.co-input__action-label{display:flex;align-items:center}.co-input__helper{display:flex;align-items:center;gap:var(--co-spacing-xs);padding:0 var(--co-spacing-xs)}.co-input__helper-icon{flex-shrink:0;color:var(--co-semantic-text-muted);display:flex;align-items:center}.co-input__helper-text{color:var(--co-semantic-text-muted);font-size:var(--co-font-size-14);font-weight:400;line-height:1;letter-spacing:var(--co-font-letter-spacing-body)}.co-input--focused .co-input__field{border-color:var(--co-semantic-border-focus);box-shadow:0 0 0 2px var(--co-semantic-border-focus-ring)}.co-input--disabled .co-input__labels .co-input__label,.co-input--disabled .co-input__labels .co-input__secondary-label{color:var(--co-semantic-text-disabled)}.co-input--disabled .co-input__field{background:var(--co-semantic-surface-disabled);border-color:transparent;cursor:not-allowed}.co-input--disabled .co-input__native{color:var(--co-semantic-text-disabled);cursor:not-allowed}.co-input--disabled .co-input__native::placeholder{color:var(--co-semantic-text-disabled)}.co-input--disabled .co-input__icon{color:var(--co-semantic-text-disabled)}.co-input__status-icon{flex-shrink:0;display:flex;align-items:center}.co-input--success .co-input__status-icon{color:var(--co-semantic-status-success)}.co-input--error .co-input__status-icon{color:var(--co-semantic-status-error)}.co-input--warning .co-input__status-icon{color:var(--co-color-status-review)}.co-input--info .co-input__status-icon{color:var(--co-semantic-status-info)}.co-input--error .co-input__field{border-color:var(--co-semantic-status-error)}.co-input--error.co-input--focused .co-input__field{border-color:var(--co-semantic-status-error);box-shadow:0 0 0 2px rgba(170, 46, 27, 0.12)}.co-input__helper--error .co-input__helper-icon,.co-input__helper--error .co-input__helper-text{color:var(--co-semantic-status-error)}.co-input--success .co-input__field{border-color:var(--co-semantic-status-success)}.co-input--success.co-input--focused .co-input__field{border-color:var(--co-semantic-status-success);box-shadow:0 0 0 2px rgba(10, 119, 36, 0.12)}.co-input__helper--success .co-input__helper-icon,.co-input__helper--success .co-input__helper-text{color:var(--co-semantic-status-success)}.co-input--warning .co-input__field{border-color:var(--co-color-status-review)}.co-input--warning.co-input--focused .co-input__field{border-color:var(--co-color-status-review);box-shadow:0 0 0 2px rgba(133, 87, 31, 0.12)}.co-input__helper--warning .co-input__helper-icon,.co-input__helper--warning .co-input__helper-text{color:var(--co-color-status-review)}.co-input--info .co-input__field{border-color:var(--co-semantic-status-info)}.co-input--info.co-input--focused .co-input__field{border-color:var(--co-semantic-status-info);box-shadow:0 0 0 2px rgba(45, 108, 197, 0.12)}.co-input__helper--info .co-input__helper-icon,.co-input__helper--info .co-input__helper-text{color:var(--co-semantic-status-info)}.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)')}@supports not (background: color-mix(in srgb, red, transparent)){.co-input__field{background:var(--co-semantic-surface-secondary)}}.co-input--fill .co-input__field{background:var(--co-color-gray-100, #f6f6f6);border:none;box-shadow:none;border-radius:10px;padding:0 12px;gap:var(--co-spacing-sm2);min-height:46px;font-size:13.5px;-webkit-backdrop-filter:none;backdrop-filter:none}.co-input--fill.co-input--s .co-input__field{min-height:38px}.co-input--fill.co-input--sm .co-input__field{min-height:42px}.co-input--fill.co-input--lg .co-input__field{min-height:52px}.co-input--fill .co-input__native{font-size:13.5px;font-family:var(--co-font-family-primary);letter-spacing:var(--co-font-letter-spacing-body)}.co-input--fill .co-input__native::placeholder{color:var(--co-color-gray-400, #a0a0a0)}.co-input--fill .co-input__icon{color:var(--co-color-gray-400, #a0a0a0)}.co-input--fill .co-input__clear{color:var(--co-color-gray-400, #a0a0a0)}.co-input--fill .co-input__clear:hover{color:var(--co-color-gray-600, #585858)}.co-input--fill.co-input--focused .co-input__field{border-color:transparent;box-shadow:none}"}},[257,"co-input",{label:[1],secondaryLabel:[1,"secondary-label"],placeholder:[1],value:[1025],helperText:[1,"helper-text"],disabled:[4],readonly:[4],clearable:[4],iconLeft:[1,"icon-left"],iconRight:[1,"icon-right"],layout:[513],type:[1],name:[1],required:[4],autocomplete:[1],status:[1],size:[513],fill:[4],actionLabel:[1,"action-label"],actionIcon:[1,"action-icon"],hasFocus:[32]}]);function r(){"undefined"!=typeof customElements&&["co-input","co-icon"].forEach((t=>{switch(t){case"co-input":customElements.get(i(t))||customElements.define(i(t),a);break;case"co-icon":customElements.get(i(t))||s()}}))}r();const l=a,p=r;export{l as CoInput,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as o,H as i,c as s,h as
|
|
1
|
+
import{t as e,p as o,H as i,c as s,h as t}from"./index.js";import{R as a}from"./p-CWneqh4n.js";import{d as r}from"./p-D4SOCy8I.js";const c=o(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.coInput=s(this,"coInput",7),this.coChange=s(this,"coChange",7),this.coValidity=s(this,"coValidity",7),this.coFocus=s(this,"coFocus",7),this.coBlur=s(this,"coBlur",7),this.value="",this.placeholder="{ }",this.required=!1,this.disabled=!1,this.readonly=!1,this.rows=8,this.status="default",this.invalidMessage="Invalid JSON",this.layout="vertical",this.size="md",this.draft="",this.internalInvalid=!1,this.hasFocus=!1,this.handleInput=e=>{this.draft=e.target.value,this.validate(!0),this.coInput.emit(this.draft)},this.handleFocus=()=>{this.hasFocus=!0,this.coFocus.emit()},this.handleBlur=()=>{this.hasFocus=!1,this.value=this.draft,this.coChange.emit(this.draft),this.coBlur.emit()}}componentWillLoad(){var e;this.draft=null!==(e=this.value)&&void 0!==e?e:"",this.validate(!1)}onValueChange(){var e;this.hasFocus||(this.draft=null!==(e=this.value)&&void 0!==e?e:"",this.validate(!1))}get isInvalid(){return"error"===this.status||this.internalInvalid}validate(e){const o=this.draft.trim(),i=""===o||this.tryParse(o);return!i!==this.internalInvalid&&(this.internalInvalid=!i,e&&this.coValidity.emit({valid:i,message:i?void 0:this.invalidMessage})),i}tryParse(e){try{return JSON.parse(e),!0}catch(e){return!1}}render(){const e=this.internalInvalid?this.invalidMessage:this.helperText,o="default"!==this.status?"co-json-field--"+this.status:"";return t("div",{key:"6b5f24ad2f616fa1b4e9d2fcf8c6e9dddc85b5e7",class:{"co-json-field":!0,"co-json-field--disabled":this.disabled,"co-json-field--focused":this.hasFocus,"co-json-field--invalid":this.isInvalid,["co-json-field--"+this.size]:!0,[o]:!!o},part:"wrapper"},this.label&&t("div",{key:"df075fb85235c8c607580a2f2825047252998ec3",class:"co-json-field__labels"},t("label",{key:"77f9b5da9f1667331242b601ba5941818408e866",class:"co-json-field__label",part:"label"},this.label,t(a,{key:"25bfbe4ecd2c97938cc8b36f915f8219396935f6",required:this.required}))),t("div",{key:"bf06e69915f1705a310cb0c115d0ee3c8e5ee3f8",class:"co-json-field__field",part:"field"},t("textarea",{key:"c317495385581e32f779e4a243794a5493ebc28a",class:"co-json-field__native",rows:this.rows,spellcheck:!1,autocomplete:"off",value:this.draft,placeholder:this.placeholder,disabled:this.disabled,readOnly:this.readonly,required:this.required,"aria-invalid":this.isInvalid?"true":"false","aria-label":this.label?void 0:"JSON",onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,part:"input"})),this.name&&t("input",{key:"d68efdf098beb43710572d10517159597181b2f5",type:"hidden",name:this.name,value:this.draft}),e&&t("div",{key:"d5aa71be869d4731e5807f43abb47ae84c3eb0cb",class:{"co-json-field__helper":!0,"co-json-field__helper--error":this.isInvalid},part:"helper"},this.isInvalid&&t("co-icon",{key:"2612ac57f2f0593a2f7438f26a99e78cd841ed35",name:"warning-circle",size:14,class:"co-json-field__helper-icon"}),t("span",{key:"bdee3108962929c93b67551636f0d8514cbc2979",class:"co-json-field__helper-text"},e)))}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);letter-spacing:var(--co-font-letter-spacing-body);line-height:1}.co-json-field{display:flex;flex-direction:column;gap:var(--co-spacing-sm2)}.co-json-field__labels{display:flex;align-items:center;justify-content:space-between;padding:0 var(--co-spacing-xs);gap:var(--co-spacing-sm2)}.co-json-field__label{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);font-weight:400;letter-spacing:var(--co-font-letter-spacing-body);line-height:1;white-space:nowrap;cursor:default}.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)')}.co-json-field__field{display:flex;background:color-mix(in srgb, var(--co-semantic-surface-secondary) 55%, transparent);-webkit-backdrop-filter:blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate));backdrop-filter:blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate));border:1px solid var(--co-semantic-border-subtle);border-radius:var(--co-border-radius-xs);transition:border-color 0.15s ease, box-shadow 0.15s ease;box-sizing:border-box;overflow:hidden}.co-json-field__native{width:100%;resize:vertical;border:none;outline:none;background:transparent;font-family:var(--co-font-family-mono, monospace);font-size:var(--co-font-size-13, 13px);font-weight:400;line-height:1.5;color:var(--co-semantic-text-default);padding:var(--co-spacing-sm2) var(--co-spacing-md);margin:0;box-sizing:border-box;tab-size:2}.co-json-field__native::placeholder{color:var(--co-semantic-text-muted)}.co-json-field--s .co-json-field__native{padding:var(--co-spacing-xxs) var(--co-spacing-sm);font-size:var(--co-font-size-12, 12px)}.co-json-field--sm .co-json-field__native{padding:var(--co-spacing-xs) var(--co-spacing-sm)}.co-json-field--lg .co-json-field__native{padding:var(--co-spacing-sm) var(--co-spacing-lg);font-size:var(--co-font-size-14)}.co-json-field__helper{display:flex;align-items:center;gap:var(--co-spacing-xs);padding:0 var(--co-spacing-xs)}.co-json-field__helper-icon{flex-shrink:0;color:var(--co-semantic-text-muted);display:flex;align-items:center}.co-json-field__helper-text{color:var(--co-semantic-text-muted);font-size:var(--co-font-size-14);font-weight:400;line-height:1;letter-spacing:var(--co-font-letter-spacing-body)}.co-json-field--focused .co-json-field__field{border-color:var(--co-semantic-border-focus);box-shadow:0 0 0 2px var(--co-semantic-border-focus-ring)}.co-json-field--disabled{opacity:0.6;pointer-events:none}.co-json-field--disabled .co-json-field__field{background:var(--co-semantic-surface-disabled);border-color:transparent}.co-json-field--invalid .co-json-field__field,.co-json-field--error .co-json-field__field{border-color:var(--co-semantic-status-error)}.co-json-field--invalid.co-json-field--focused .co-json-field__field,.co-json-field--error.co-json-field--focused .co-json-field__field{border-color:var(--co-semantic-status-error);box-shadow:0 0 0 2px rgba(170, 46, 27, 0.12)}.co-json-field__helper--error .co-json-field__helper-icon,.co-json-field__helper--error .co-json-field__helper-text{color:var(--co-semantic-status-error)}:host([layout='horizontal']) .co-json-field{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-json-field__labels{grid-column:1;grid-row:1;padding-top:var(--co-spacing-sm2);min-width:0}:host([layout='horizontal']) .co-json-field__label{white-space:normal}:host([layout='horizontal']) .co-json-field>:not(.co-json-field__labels){grid-column:2;min-width:0}@supports not (background: color-mix(in srgb, red, transparent)){.co-json-field__field{background:var(--co-semantic-surface-secondary)}}"}},[1,"co-json-field",{value:[1025],label:[1],placeholder:[1],name:[1],required:[4],disabled:[4],readonly:[4],rows:[2],status:[1],helperText:[1,"helper-text"],invalidMessage:[1,"invalid-message"],layout:[513],size:[513],draft:[32],internalInvalid:[32],hasFocus:[32]},void 0,{value:[{onValueChange:0}]}]);function n(){"undefined"!=typeof customElements&&["co-json-field","co-icon"].forEach((o=>{switch(o){case"co-json-field":customElements.get(e(o))||customElements.define(e(o),c);break;case"co-icon":customElements.get(e(o))||r()}}))}n();const l=c,d=n;export{l as CoJsonField,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as o,d as s}from"./p-
|
|
1
|
+
import{C as o,d as s}from"./p-Dh-h40mY.js";const m=o,p=s;export{m as CoLightbox,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as
|
|
1
|
+
import{C as s,d as o}from"./p-Cam92sWP.js";const a=s,m=o;export{a as CoListFooter,m as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as t,H as i,c as s,h as
|
|
1
|
+
import{t as e,p as t,H as i,c as s,h as o}from"./index.js";import{d as c}from"./p-D4SOCy8I.js";import{d as a}from"./p-CNIs9j-h.js";const n=t(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.coSelect=s(this,"coSelect",7),this.selected=!1,this.disabled=!1,this.dense=!1,this.labelTruncated=!1,this.descTruncated=!1,this.measureTruncation=()=>{const e=!!this.labelEl&&this.labelEl.scrollWidth>this.labelEl.clientWidth+1,t=!!this.descEl&&this.descEl.scrollWidth>this.descEl.clientWidth+1;e!==this.labelTruncated&&(this.labelTruncated=e),t!==this.descTruncated&&(this.descTruncated=t)},this.handleClick=()=>{this.disabled||this.coSelect.emit()},this.handleKeyDown=e=>{this.disabled||"Enter"!==e.key&&" "!==e.key&&"Spacebar"!==e.key||(e.preventDefault(),this.coSelect.emit())}}componentDidLoad(){"undefined"!=typeof ResizeObserver&&(this.ro=new ResizeObserver((()=>this.measureTruncation())),this.labelEl&&this.ro.observe(this.labelEl),this.descEl&&this.ro.observe(this.descEl)),this.measureTruncation()}disconnectedCallback(){var e;null===(e=this.ro)||void 0===e||e.disconnect(),this.ro=void 0}onTextChange(){requestAnimationFrame(this.measureTruncation)}render(){return o("div",{key:"9e287e86942493229ae39c750c8d53056795d844",class:{"co-list-item":!0,"co-list-item--selected":this.selected,"co-list-item--disabled":this.disabled,"co-list-item--dense":this.dense,"co-list-item--has-description":!!this.description},part:"item",role:"option",tabindex:this.disabled?-1:0,"aria-selected":this.selected?"true":"false","aria-disabled":this.disabled?"true":"false",onClick:this.handleClick,onKeyDown:this.handleKeyDown},o("span",{key:"da8fd1370809682631096a21da839a4092314a1b",class:"co-list-item__prefix"},this.icon&&o("co-icon",{key:"74c1a4cd94f272ff08f2236b130e60420e39aaf5",name:this.icon,size:18}),o("slot",{key:"e70c4aa6c6498b410e2a4e88e5ab31b833d1ed81",name:"prefix"})),o("div",{key:"b3e358b51214013373dc0b357ca9456ce96e23d3",class:"co-list-item__content"},this.label&&o("co-tooltip",{key:"4fe172f4d48b26883edc4455f06a7b6f2127314d",block:!0,class:"co-list-item__tip",content:this.label,placement:"top",disabled:!this.labelTruncated},o("span",{key:"3885043ecaa5b3a302b2c1d34bce6c50546deaf0",class:"co-list-item__label",ref:e=>{this.labelEl=e,e&&this.ro&&this.ro.observe(e)}},this.label)),this.description&&o("co-tooltip",{key:"b57c867bd1e925fb1778caf8d7bd27ad31ede8f4",block:!0,class:"co-list-item__tip",content:this.description,placement:"top",disabled:!this.descTruncated},o("span",{key:"40b8331ec57e572bad8e774b51e251a2671fc3b1",class:"co-list-item__description",ref:e=>{this.descEl=e,e&&this.ro&&this.ro.observe(e)}},this.description)),o("slot",{key:"61914fe8d8701e99d6a6f8b5e596c410d90544c7"})),o("span",{key:"dbf531af497bf9f191351288894c4284582cc384",class:"co-list-item__suffix"},o("slot",{key:"1a3c7df388d987a3b9835220bb847f3952c838d7",name:"suffix"})))}get el(){return this}static get watchers(){return{label:[{onTextChange:0}],description:[{onTextChange:0}]}}static get style(){return":host{display:block}.co-list-item{display:flex;align-items:center;gap:var(--co-spacing-md);padding:var(--co-spacing-md) var(--co-spacing-lg);font-family:var(--co-font-family-primary);cursor:pointer;border-radius:var(--co-border-radius-sm);transition:background 0.1s ease;box-sizing:border-box;min-height:40px}.co-list-item--dense{gap:var(--co-spacing-sm);padding:6px var(--co-spacing-sm);border-radius:var(--co-border-radius-xxs);min-height:32px}.co-list-item--dense .co-list-item__label{font-size:var(--co-font-size-14)}.co-list-item:hover:not(.co-list-item--disabled){background:var(--co-semantic-surface-hover)}.co-list-item:focus-visible{outline:none;box-shadow:0 0 0 2px var(--co-semantic-border-focus)}.co-list-item--selected{background:var(--co-semantic-surface-muted)}.co-list-item--disabled{opacity:0.4;cursor:not-allowed}.co-list-item__prefix,.co-list-item__suffix{display:flex;align-items:center;gap:var(--co-spacing-sm);flex-shrink:0;color:var(--co-semantic-text-muted)}.co-list-item__prefix:empty,.co-list-item__suffix:empty{display:none}.co-list-item__content{display:flex;flex-direction:column;flex:1;min-width:0}.co-list-item__content>.co-list-item__tip{min-width:0;max-width:100%}.co-list-item__label{display:block;font-size:var(--co-font-size-14);font-weight:400;color:var(--co-semantic-text-default);line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.co-list-item__description{display:block;font-size:var(--co-font-size-12);color:var(--co-semantic-text-muted);line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"}},[257,"co-list-item",{label:[1],description:[1],icon:[1],selected:[516],disabled:[4],dense:[516],labelTruncated:[32],descTruncated:[32]},void 0,{label:[{onTextChange:0}],description:[{onTextChange:0}]}]);function l(){"undefined"!=typeof customElements&&["co-list-item","co-icon","co-tooltip"].forEach((t=>{switch(t){case"co-list-item":customElements.get(e(t))||customElements.define(e(t),n);break;case"co-icon":customElements.get(e(t))||c();break;case"co-tooltip":customElements.get(e(t))||a()}}))}l();const d=n,r=l;export{d as CoListItem,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as
|
|
1
|
+
import{t as e,p as t,H as i,h as a}from"./index.js";const s=t(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.video=!1,this.height="132px",this.radius=10}toCss(e){if("number"==typeof e)return e+"px";const t=(e+"").trim();return/^-?\d*\.?\d+$/.test(t)?t+"px":t}render(){var e;return a("div",{key:"daac4e719cbee00b1561e1c177e1c10c41c9b176",class:{"co-media-thumb":!0,"co-media-thumb--video":this.video},part:"thumb",style:{height:this.toCss(this.height),borderRadius:this.radius+"px"}},this.src?a("img",{class:"co-media-thumb__img",src:this.src,alt:null!==(e=this.alt)&&void 0!==e?e:"",part:"img"}):a("slot",null),this.video&&a("div",{key:"eb18d3023fe5d0ed32157f29b9237ad817ddb9ba",class:"co-media-thumb__scrim",part:"scrim"},a("div",{key:"17746010acbdae2dfb6e6493ea283a8213bbfc66",class:"co-media-thumb__play",part:"play"},a("svg",{key:"ba88d6ce47d207c74982da22130f7d3df5f2b989",class:"co-media-thumb__play-icon",width:"16",height:"18",viewBox:"0 0 16 18",fill:"none","aria-hidden":"true"},a("path",{key:"6b92c3bfa258ec5937d1c649d379a0f79a4fd8d6",d:"M2 2l12 7-12 7z",fill:"var(--co-color-base-negro, #1f1c1b)"})))))}static get style(){return":host{display:block}.co-media-thumb{position:relative;overflow:hidden;width:100%;background:var(--co-color-gray-100, #f6f6f6);box-sizing:border-box}.co-media-thumb__img{width:100%;height:100%;object-fit:cover;display:block}.co-media-thumb__scrim{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(31, 28, 27, 0.28)}.co-media-thumb__play{display:flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:50%;background:rgba(255, 255, 255, 0.92)}.co-media-thumb__play-icon{display:block;margin-left:2px;}"}},[257,"co-media-thumb",{src:[1],video:[4],height:[8],radius:[2],alt:[1]}]);function c(){"undefined"!=typeof customElements&&["co-media-thumb"].forEach((t=>{"co-media-thumb"===t&&(customElements.get(e(t))||customElements.define(e(t),s))}))}c();const d=s,o=c;export{d as CoMediaThumb,o as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as r,H as s,h as t}from"./index.js";const o=r(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}render(){return t("hr",{key:"
|
|
1
|
+
import{t as e,p as r,H as s,h as t}from"./index.js";const o=r(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}render(){return t("hr",{key:"9e29bc7905c4b9d83846ea9e85021ae0f1e34fc3",class:"co-menu-divider",role:"separator"})}static get style(){return":host{display:block}.co-menu-divider{border:0;border-top:1px solid var(--co-semantic-border-subtle, rgba(31, 28, 27, 0.08));margin:var(--co-spacing-xs, 4px) 0}"}},[1,"co-menu-divider"]);function c(){"undefined"!=typeof customElements&&["co-menu-divider"].forEach((r=>{"co-menu-divider"===r&&(customElements.get(e(r))||customElements.define(e(r),o))}))}c();const n=o,i=c;export{n as CoMenuDivider,i as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as i,H as t,c as o,h as s}from"./index.js";import{d as n}from"./p-
|
|
1
|
+
import{t as e,p as i,H as t,c as o,h as s}from"./index.js";import{d as n}from"./p-D4SOCy8I.js";import{d as c}from"./p-CmCsm4L-.js";const a=i(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.coSelect=o(this,"coSelect",7),this.coMenuSelect=o(this,"coMenuSelect",7),this.dense=!1,this.selected=!1,this.trailingCheck=!1,this.disabled=!1,this.variant="default",this.hasSubmenu=!1,this.submenuOpen=!1,this.handleClick=e=>{if(!this.disabled){if(this.hasSubmenu)return e.stopPropagation(),void this.openSubmenu();this.coSelect.emit(),this.coMenuSelect.emit()}},this.handleKeydown=e=>{var i;this.disabled||("Enter"===e.key||" "===e.key?(e.preventDefault(),this.handleClick(e)):"ArrowRight"===e.key&&this.hasSubmenu?(e.preventDefault(),this.openSubmenu(),requestAnimationFrame((()=>{var e;const i=this.el.querySelector("co-menu-item");null===(e=null==i?void 0:i.focusItem)||void 0===e||e.call(i)}))):"ArrowLeft"===e.key&&this.submenuOpen&&(e.preventDefault(),this.submenuOpen=!1,null===(i=this.rowEl)||void 0===i||i.focus()))},this.handleMouseEnter=()=>{!this.disabled&&this.hasSubmenu&&(this.cancelClose(),this.openSubmenu())},this.handleMouseLeave=()=>{this.hasSubmenu&&this.scheduleClose()},this.cancelClose=()=>{this.closeTimer&&(window.clearTimeout(this.closeTimer),this.closeTimer=void 0)}}async focusItem(){var e;null===(e=this.rowEl)||void 0===e||e.focus()}componentWillLoad(){this.hasSubmenu=this.detectSubmenu()}disconnectedCallback(){this.cancelClose()}detectSubmenu(){for(const e of Array.from(this.el.children)){const i=e.tagName.toLowerCase();if("co-menu-item"===i||"co-menu-divider"===i)return!0}return!1}openSubmenu(){this.submenuOpen=!0}scheduleClose(){this.cancelClose(),this.closeTimer=window.setTimeout((()=>{this.submenuOpen=!1}),260)}render(){var e;const i=s("button",{ref:e=>this.rowEl=e,class:{"co-menu-item":!0,"co-menu-item--dense":this.dense,"co-menu-item--selected":this.selected,"co-menu-item--disabled":this.disabled,"co-menu-item--danger":"danger"===this.variant,"co-menu-item--submenu":this.hasSubmenu,"co-menu-item--submenu-open":this.hasSubmenu&&this.submenuOpen},type:"button",role:"menuitem","aria-haspopup":this.hasSubmenu?"menu":void 0,"aria-expanded":this.hasSubmenu?this.submenuOpen?"true":"false":void 0,disabled:this.disabled,onClick:this.handleClick,onKeyDown:this.handleKeydown,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},this.icon&&s("span",{class:"co-menu-item__icon"},s("co-icon",{name:this.icon,size:null!==(e=this.iconSize)&&void 0!==e?e:16})),s("span",{class:"co-menu-item__label"},this.label,s("slot",{name:"label"})),this.trailingCheck&&s("span",{class:"co-menu-item__check"},s("co-icon",{name:"check",size:15})),s("span",{class:"co-menu-item__suffix"},s("slot",{name:"suffix"}),this.hasSubmenu&&s("co-icon",{name:"caret-right",size:14})));return this.hasSubmenu?s("div",{class:"co-menu-item__wrap co-menu-item__wrap--submenu",onMouseEnter:this.cancelClose,onMouseLeave:this.handleMouseLeave},s("co-popover",{placement:"right-start",offset:4,open:this.submenuOpen,onCoOpen:()=>{this.submenuOpen=!0},onCoClose:()=>{this.submenuOpen=!1}},s("div",{slot:"trigger",class:"co-menu-item__trigger-wrap"},i),s("div",{class:"co-menu-item__submenu",role:"menu",onMouseEnter:this.cancelClose,onMouseLeave:this.handleMouseLeave},s("slot",null)))):s("div",{class:"co-menu-item__wrap"},i)}get el(){return this}static get style(){return":host{display:block}.co-menu-item__wrap{display:block}.co-menu-item{width:100%;display:flex;align-items:center;gap:var(--co-menu-item-gap, var(--co-spacing-sm, 8px));padding:var(--co-menu-item-padding, var(--co-spacing-sm, 8px) var(--co-spacing-md, 12px));background:transparent;border:0;border-radius:var(--co-border-radius-xs, 8px);font-family:var(--co-font-family-primary);font-size:var(--co-font-size-14, 14px);color:var(--co-semantic-text-default);text-align:left;cursor:pointer;transition:background 0.1s ease, color 0.1s ease;min-height:var(--co-menu-item-height, 36px);box-sizing:border-box}.co-menu-item--dense{padding:var(--co-spacing-xs, 4px) var(--co-spacing-md, 12px);min-height:32px}.co-menu-item--selected{background:var(--co-color-gray-100, #f6f6f6)}.co-menu-item:hover,.co-menu-item--submenu-open{background:var(--co-semantic-surface-hover, rgba(31, 28, 27, 0.04))}.co-menu-item:focus-visible{outline:2px solid var(--co-semantic-border-focus, #2563eb);outline-offset:-2px}.co-menu-item--disabled{opacity:0.5;cursor:not-allowed;pointer-events:none}.co-menu-item--danger{color:var(--co-color-status-error, #aa2e1b)}.co-menu-item--danger:hover{background:var(--co-color-status-bg-error, #ffefef)}.co-menu-item__icon{display:inline-flex;align-items:center;flex-shrink:0;color:var(--co-menu-item-icon-color, currentColor)}.co-menu-item__check{display:inline-flex;align-items:center;flex-shrink:0;color:var(--co-semantic-text-default)}.co-menu-item__label{flex:1;display:inline-flex;align-items:center;gap:var(--co-spacing-xs, 4px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.co-menu-item__suffix{display:inline-flex;align-items:center;gap:var(--co-spacing-xs, 4px);flex-shrink:0;color:var(--co-semantic-text-muted)}.co-menu-item--submenu-open .co-menu-item__suffix{color:var(--co-semantic-text-default)}.co-menu-item__trigger-wrap{display:block}.co-menu-item__submenu{background:var(--co-semantic-surface-secondary, #fff);border-radius:var(--co-border-radius-sm, 12px);box-shadow:var(--co-shadow-lg, 0 4px 12px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04)), inset 0 0 0 1px var(--co-color-opacity-negro-8, rgba(31, 28, 27, 0.08));padding:var(--co-menu-padding, var(--co-spacing-xs, 4px));min-width:180px;display:flex;flex-direction:column;gap:2px;position:relative}.co-menu-item__submenu::before,.co-menu-item__submenu::after{content:'';position:absolute;top:0;bottom:0;width:6px;}.co-menu-item__submenu::before{left:-6px}.co-menu-item__submenu::after{right:-6px}"}},[257,"co-menu-item",{icon:[1],iconSize:[2,"icon-size"],label:[1],dense:[4],selected:[4],trailingCheck:[4,"trailing-check"],disabled:[4],variant:[1],hasSubmenu:[32],submenuOpen:[32],focusItem:[64]}]);function r(){"undefined"!=typeof customElements&&["co-menu-item","co-icon","co-popover"].forEach((i=>{switch(i){case"co-menu-item":customElements.get(e(i))||customElements.define(e(i),a);break;case"co-icon":customElements.get(e(i))||n();break;case"co-popover":customElements.get(e(i))||c()}}))}r();const m=a,u=r;export{m as CoMenuItem,u as defineCustomElement}
|