@prolibu-suite/cobalt-core 0.9.0 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +589 -27
- package/dist/cjs/co-accordion.cjs.entry.js +2 -2
- package/dist/cjs/co-action-bar.cjs.entry.js +2 -2
- package/dist/cjs/co-app-shell.cjs.entry.js +2 -2
- package/dist/cjs/co-audio-player.cjs.entry.js +3 -3
- package/dist/cjs/co-autocomplete.cjs.entry.js +1 -1
- package/dist/cjs/co-avatar_2.cjs.entry.js +2 -2
- package/dist/cjs/co-badge.cjs.entry.js +1 -1
- package/dist/cjs/co-bottom-sheet.cjs.entry.js +10 -11
- package/dist/cjs/co-breadcrumb-item.cjs.entry.js +2 -2
- package/dist/cjs/co-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/co-button-group.cjs.entry.js +2 -2
- package/dist/cjs/co-button.cjs.entry.js +2 -2
- package/dist/cjs/co-calendar-month_2.cjs.entry.js +3 -3
- package/dist/cjs/co-calendar_3.cjs.entry.js +42 -7
- package/dist/cjs/co-card.cjs.entry.js +2 -2
- package/dist/cjs/co-carousel-item.cjs.entry.js +1 -1
- package/dist/cjs/co-carousel.cjs.entry.js +2 -2
- package/dist/cjs/co-checkbox.cjs.entry.js +3 -3
- package/dist/cjs/co-chip_2.cjs.entry.js +11 -11
- package/dist/cjs/co-color-picker.cjs.entry.js +2 -2
- package/dist/cjs/co-column-picker.cjs.entry.js +2 -2
- package/dist/cjs/co-combobox.cjs.entry.js +1 -1
- package/dist/cjs/co-data-table-pagination.cjs.entry.js +4 -4
- package/dist/cjs/co-data-table.cjs.entry.js +127 -8
- package/dist/cjs/co-date-range.cjs.entry.js +1 -1
- package/dist/cjs/co-date-time-picker.cjs.entry.js +2 -2
- package/dist/cjs/co-drive-card.cjs.entry.js +1 -1
- package/dist/cjs/co-drop-zone.cjs.entry.js +1 -1
- package/dist/cjs/co-emoji-picker.cjs.entry.js +2808 -0
- package/dist/cjs/co-empty-state.cjs.entry.js +2 -2
- package/dist/cjs/co-event-calendar.cjs.entry.js +2 -2
- package/dist/cjs/co-event-popover.cjs.entry.js +1 -1
- package/dist/cjs/co-fab.cjs.entry.js +3 -3
- package/dist/cjs/co-file-field.cjs.entry.js +5 -5
- package/dist/cjs/co-file-type-tile.cjs.entry.js +2 -2
- package/dist/cjs/co-helper-text.cjs.entry.js +2 -2
- package/dist/cjs/co-icon-button.cjs.entry.js +2 -2
- package/dist/cjs/co-icon.cjs.entry.js +2 -2
- package/dist/cjs/co-json-field.cjs.entry.js +3 -3
- package/dist/cjs/co-lightbox.cjs.entry.js +4 -4
- package/dist/cjs/co-list-footer.cjs.entry.js +1 -1
- package/dist/cjs/co-list-item.cjs.entry.js +4 -4
- package/dist/cjs/co-media-thumb.cjs.entry.js +2 -2
- package/dist/cjs/co-menu-divider.cjs.entry.js +1 -1
- package/dist/cjs/co-menu.cjs.entry.js +1 -1
- package/dist/cjs/co-modal.cjs.entry.js +9 -3
- package/dist/cjs/co-navbar.cjs.entry.js +2 -2
- package/dist/cjs/co-number-field.cjs.entry.js +2 -2
- package/dist/cjs/co-overlay.cjs.entry.js +1 -1
- package/dist/cjs/co-page-header.cjs.entry.js +1 -1
- package/dist/cjs/co-phone-field.cjs.entry.js +1 -1
- package/dist/cjs/co-popover.cjs.entry.js +49 -3
- package/dist/cjs/co-progress-bar.cjs.entry.js +2 -2
- package/dist/cjs/co-progress-circle.cjs.entry.js +2 -2
- package/dist/cjs/co-provider-logo_2.cjs.entry.js +1 -1
- package/dist/cjs/co-radio.cjs.entry.js +3 -3
- package/dist/cjs/co-rating.cjs.entry.js +3 -3
- package/dist/cjs/co-ref-field.cjs.entry.js +13 -4
- package/dist/cjs/co-rich-text-editor.cjs.entry.js +3 -3
- package/dist/cjs/co-row.cjs.entry.js +2 -2
- package/dist/cjs/co-select.cjs.entry.js +13 -4
- package/dist/cjs/co-separator.cjs.entry.js +1 -1
- package/dist/cjs/co-sidebar-nav.cjs.entry.js +2 -2
- package/dist/cjs/co-sidebar.cjs.entry.js +2 -2
- package/dist/cjs/co-slider.cjs.entry.js +2 -2
- package/dist/cjs/co-switch.cjs.entry.js +3 -3
- package/dist/cjs/co-tab-group.cjs.entry.js +2 -2
- package/dist/cjs/co-tab.cjs.entry.js +2 -2
- package/dist/cjs/co-tags-field.cjs.entry.js +5 -5
- package/dist/cjs/co-textarea.cjs.entry.js +4 -4
- package/dist/cjs/co-toast.cjs.entry.js +2 -2
- package/dist/cjs/co-toggle-button-group.cjs.entry.js +2 -2
- package/dist/cjs/co-toggle-button.cjs.entry.js +2 -2
- package/dist/cjs/co-transfer-list.cjs.entry.js +2 -2
- package/dist/cjs/co-video.cjs.entry.js +2 -2
- package/dist/cjs/cobalt.cjs.js +1 -1
- package/dist/cjs/emojiNames.es-BjpSEJ0c.js +1925 -0
- package/dist/cjs/emojiNames.pt-DWupaZMJ.js +1925 -0
- package/dist/cjs/index-DK-2Lzmf.js +16 -12
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/slotContent-Bm9RcM_Q.js +34 -0
- package/dist/cobalt/cobalt.esm.js +1 -1
- package/dist/cobalt/{p-142506d9.entry.js → p-02ac492f.entry.js} +1 -1
- package/dist/cobalt/p-07904986.entry.js +1 -0
- package/dist/cobalt/{p-24e93fcb.entry.js → p-07d570a6.entry.js} +1 -1
- package/dist/cobalt/p-09799193.entry.js +1 -0
- package/dist/cobalt/{p-e5b5ae89.entry.js → p-0ccb672b.entry.js} +1 -1
- package/dist/cobalt/{p-49bde154.entry.js → p-0e91e5c4.entry.js} +1 -1
- package/dist/cobalt/{p-724b9b54.entry.js → p-17ae943c.entry.js} +1 -1
- package/dist/cobalt/{p-fa5c25d6.entry.js → p-18af9e44.entry.js} +1 -1
- package/dist/cobalt/{p-b9ac1f25.entry.js → p-18d34b01.entry.js} +1 -1
- package/dist/cobalt/{p-d7b00e5f.entry.js → p-1c68bc41.entry.js} +1 -1
- package/dist/cobalt/{p-2a9ba4c8.entry.js → p-2114c036.entry.js} +1 -1
- package/dist/cobalt/{p-37541725.entry.js → p-23a103a0.entry.js} +1 -1
- package/dist/cobalt/{p-7255ab63.entry.js → p-23b3ff3f.entry.js} +1 -1
- package/dist/cobalt/{p-baeb5d55.entry.js → p-2d329ac8.entry.js} +1 -1
- package/dist/cobalt/{p-417ce874.entry.js → p-2d81b292.entry.js} +1 -1
- package/dist/cobalt/{p-b64b0a07.entry.js → p-316c62c0.entry.js} +1 -1
- package/dist/cobalt/{p-c3c2087e.entry.js → p-33ea4a90.entry.js} +1 -1
- package/dist/cobalt/{p-8a93beb0.entry.js → p-342e1da4.entry.js} +1 -1
- package/dist/cobalt/p-3495fda1.entry.js +1 -0
- package/dist/cobalt/{p-5f1b273b.entry.js → p-36197363.entry.js} +1 -1
- package/dist/cobalt/{p-2d0354cc.entry.js → p-3f0eed59.entry.js} +1 -1
- package/dist/cobalt/{p-6d532475.entry.js → p-43bd298d.entry.js} +1 -1
- package/dist/cobalt/{p-81866f71.entry.js → p-4a503187.entry.js} +1 -1
- package/dist/cobalt/{p-c7a809c7.entry.js → p-4b083da4.entry.js} +1 -1
- package/dist/cobalt/{p-f1284fcd.entry.js → p-4c7e3984.entry.js} +1 -1
- package/dist/cobalt/p-4f754c9a.entry.js +1 -0
- package/dist/cobalt/p-54ae807d.entry.js +1 -0
- package/dist/cobalt/{p-d21da71a.entry.js → p-55566b37.entry.js} +1 -1
- package/dist/cobalt/p-682b3313.entry.js +1 -0
- package/dist/cobalt/{p-a5d84c7a.entry.js → p-7457aa89.entry.js} +1 -1
- package/dist/cobalt/{p-8b7a4f6c.entry.js → p-77719335.entry.js} +1 -1
- package/dist/cobalt/{p-94a8a119.entry.js → p-7c5e846a.entry.js} +1 -1
- package/dist/cobalt/{p-9c2ce487.entry.js → p-7c88163e.entry.js} +1 -1
- package/dist/cobalt/{p-12a0ae24.entry.js → p-7cf4b4ae.entry.js} +1 -1
- package/dist/cobalt/{p-3ac316e0.entry.js → p-7e53e9c8.entry.js} +1 -1
- package/dist/cobalt/{p-e99832a9.entry.js → p-8183f56f.entry.js} +1 -1
- package/dist/cobalt/p-8345b25f.entry.js +1 -0
- package/dist/cobalt/{p-b004c3bb.entry.js → p-88a0659f.entry.js} +1 -1
- package/dist/cobalt/{p-87fc5aed.entry.js → p-89e38c5e.entry.js} +1 -1
- package/dist/cobalt/{p-a074f2ba.entry.js → p-8eb485c8.entry.js} +1 -1
- package/dist/cobalt/{p-c31f5c1b.entry.js → p-8f38e24d.entry.js} +1 -1
- package/dist/cobalt/{p-f52f61d4.entry.js → p-8f600512.entry.js} +1 -1
- package/dist/cobalt/{p-09fe6ece.entry.js → p-95efe661.entry.js} +1 -1
- package/dist/cobalt/{p-c42c505c.entry.js → p-983af614.entry.js} +1 -1
- package/dist/cobalt/p-B6oiFdUY.js +1 -0
- package/dist/cobalt/p-CBX_oabB.js +1 -0
- package/dist/cobalt/p-a02db338.entry.js +1 -0
- package/dist/cobalt/{p-19f5d480.entry.js → p-a51d8775.entry.js} +1 -1
- package/dist/cobalt/{p-d3c765e3.entry.js → p-a6357340.entry.js} +1 -1
- package/dist/cobalt/p-a6b5cadd.entry.js +1 -0
- package/dist/cobalt/{p-5d7c26f2.entry.js → p-a8c64cc3.entry.js} +1 -1
- package/dist/cobalt/{p-19706923.entry.js → p-a9096b5c.entry.js} +1 -1
- package/dist/cobalt/{p-b800e107.entry.js → p-a9b29cc2.entry.js} +1 -1
- package/dist/cobalt/p-aafb9d11.entry.js +1 -0
- package/dist/cobalt/{p-cc72557d.entry.js → p-ab45d9bd.entry.js} +1 -1
- package/dist/cobalt/{p-43b1f8fb.entry.js → p-ac466658.entry.js} +1 -1
- package/dist/cobalt/{p-3ecc29fa.entry.js → p-ac91259e.entry.js} +1 -1
- package/dist/cobalt/{p-a45e2c00.entry.js → p-b0319a2d.entry.js} +1 -1
- package/dist/cobalt/{p-8206c7c0.entry.js → p-b8581787.entry.js} +1 -1
- package/dist/cobalt/{p-debe0d79.entry.js → p-bfc2a849.entry.js} +1 -1
- package/dist/cobalt/{p-4e2379e4.entry.js → p-c1e7fb32.entry.js} +1 -1
- package/dist/cobalt/{p-21832273.entry.js → p-c5684c79.entry.js} +1 -1
- package/dist/cobalt/p-c6b9b9d6.entry.js +1 -0
- package/dist/cobalt/{p-ed2ca588.entry.js → p-ce35c898.entry.js} +1 -1
- package/dist/cobalt/{p-e5296961.entry.js → p-d15d3a97.entry.js} +1 -1
- package/dist/cobalt/p-d40a465f.entry.js +1 -0
- package/dist/cobalt/{p-d85a751d.entry.js → p-d4debd6f.entry.js} +1 -1
- package/dist/cobalt/{p-7ec85887.entry.js → p-d629fb4e.entry.js} +1 -1
- package/dist/cobalt/p-da18b5f4.entry.js +1 -0
- package/dist/cobalt/{p-360714ae.entry.js → p-dca4cd5f.entry.js} +1 -1
- package/dist/cobalt/{p-a530bec2.entry.js → p-dea43204.entry.js} +1 -1
- package/dist/cobalt/{p-f4cebc1f.entry.js → p-dfcf667d.entry.js} +1 -1
- package/dist/cobalt/{p-9fe9e2fe.entry.js → p-e5495539.entry.js} +1 -1
- package/dist/cobalt/{p-39bce45f.entry.js → p-e8878cf9.entry.js} +1 -1
- package/dist/cobalt/{p-39007b6c.entry.js → p-ef5e1167.entry.js} +1 -1
- package/dist/cobalt/{p-b1ef5107.entry.js → p-fabe5fb2.entry.js} +1 -1
- package/dist/cobalt/{p-76dff399.entry.js → p-fb3a095b.entry.js} +1 -1
- package/dist/cobalt/p-reaWaY4g.js +1 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/co-accordion/co-accordion.js +2 -2
- package/dist/collection/components/co-action-bar/co-action-bar.js +2 -2
- package/dist/collection/components/co-app-shell/co-app-shell.js +2 -2
- package/dist/collection/components/co-audio-player/co-audio-player.js +3 -3
- package/dist/collection/components/co-autocomplete/co-autocomplete.css +1 -1
- package/dist/collection/components/co-autocomplete/co-autocomplete.js +1 -1
- package/dist/collection/components/co-avatar-group/co-avatar-group.js +1 -1
- package/dist/collection/components/co-badge/co-badge.js +1 -1
- package/dist/collection/components/co-bottom-sheet/co-bottom-sheet.js +10 -11
- 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.js +1 -1
- package/dist/collection/components/co-calendar-month/co-calendar-month.js +1 -1
- package/dist/collection/components/co-calendar-timegrid/co-calendar-timegrid.js +2 -2
- package/dist/collection/components/co-card/co-card.js +2 -2
- package/dist/collection/components/co-carousel/co-carousel.js +2 -2
- package/dist/collection/components/co-carousel-item/co-carousel-item.js +1 -1
- package/dist/collection/components/co-checkbox/co-checkbox.js +3 -3
- package/dist/collection/components/co-checkbox-group/co-checkbox-group.js +1 -1
- 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 +3 -1
- package/dist/collection/components/co-combobox/co-combobox.js +1 -1
- package/dist/collection/components/co-command-search/co-command-search.js +1 -1
- package/dist/collection/components/co-data-table/co-data-table.css +33 -0
- package/dist/collection/components/co-data-table/co-data-table.js +90 -8
- package/dist/collection/components/co-data-table-pagination/co-data-table-pagination.js +4 -4
- package/dist/collection/components/co-date-field/co-date-field.js +4 -4
- package/dist/collection/components/co-date-range/co-date-range.js +1 -1
- package/dist/collection/components/co-date-range-picker/co-date-range-picker.js +2 -2
- package/dist/collection/components/co-date-time-picker/co-date-time-picker.js +2 -2
- package/dist/collection/components/co-drawer/co-drawer.css +5 -2
- package/dist/collection/components/co-drawer/co-drawer.js +43 -1
- package/dist/collection/components/co-drive-card/co-drive-card.js +1 -1
- package/dist/collection/components/co-drop-zone/co-drop-zone.js +1 -1
- package/dist/collection/components/co-emoji-picker/co-emoji-picker.css +290 -0
- package/dist/collection/components/co-emoji-picker/co-emoji-picker.js +682 -0
- package/dist/collection/components/co-emoji-picker/emojiData.js +1953 -0
- package/dist/collection/components/co-emoji-picker/emojiNames.es.js +1922 -0
- package/dist/collection/components/co-emoji-picker/emojiNames.pt.js +1922 -0
- package/dist/collection/components/co-emoji-picker/emojiPickerLogic.js +375 -0
- package/dist/collection/components/co-empty-state/co-empty-state.js +2 -2
- package/dist/collection/components/co-event-calendar/co-event-calendar.js +2 -2
- package/dist/collection/components/co-event-popover/co-event-popover.js +1 -1
- package/dist/collection/components/co-fab/co-fab.css +8 -5
- package/dist/collection/components/co-fab/co-fab.js +2 -2
- package/dist/collection/components/co-file-field/co-file-field.js +5 -5
- package/dist/collection/components/co-file-type-tile/co-file-type-tile.js +2 -2
- package/dist/collection/components/co-helper-text/co-helper-text.js +2 -2
- package/dist/collection/components/co-icon/co-icon.js +2 -2
- package/dist/collection/components/co-icon-button/co-icon-button.css +25 -0
- package/dist/collection/components/co-icon-button/co-icon-button.js +1 -1
- package/dist/collection/components/co-json-field/co-json-field.js +3 -3
- package/dist/collection/components/co-lightbox/co-lightbox.js +4 -4
- package/dist/collection/components/co-list-footer/co-list-footer.js +1 -1
- package/dist/collection/components/co-list-item/co-list-item.js +4 -4
- package/dist/collection/components/co-media-thumb/co-media-thumb.js +2 -2
- package/dist/collection/components/co-menu/co-menu.js +1 -1
- package/dist/collection/components/co-menu-divider/co-menu-divider.js +1 -1
- package/dist/collection/components/co-modal/co-modal.css +3 -1
- package/dist/collection/components/co-modal/co-modal.js +13 -2
- package/dist/collection/components/co-navbar/co-navbar.js +2 -2
- package/dist/collection/components/co-number-field/co-number-field.js +2 -2
- package/dist/collection/components/co-option-list/co-option-list.css +11 -9
- package/dist/collection/components/co-option-list/co-option-list.js +8 -8
- package/dist/collection/components/co-overlay/co-overlay.js +1 -1
- package/dist/collection/components/co-page-header/co-page-header.js +1 -1
- package/dist/collection/components/co-phone-field/co-phone-field.js +1 -1
- package/dist/collection/components/co-popover/co-popover.js +27 -5
- package/dist/collection/components/co-progress-bar/co-progress-bar.js +2 -2
- package/dist/collection/components/co-progress-circle/co-progress-circle.js +2 -2
- package/dist/collection/components/co-radio/co-radio.js +3 -3
- package/dist/collection/components/co-radio-group/co-radio-group.js +1 -1
- package/dist/collection/components/co-rating/co-rating.js +3 -3
- package/dist/collection/components/co-ref-field/co-ref-field.css +15 -0
- package/dist/collection/components/co-ref-field/co-ref-field.js +72 -4
- package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.js +3 -3
- package/dist/collection/components/co-row/co-row.js +2 -2
- package/dist/collection/components/co-segmented-bar/co-segmented-bar.js +1 -1
- package/dist/collection/components/co-select/co-select.js +68 -5
- package/dist/collection/components/co-separator/co-separator.js +1 -1
- package/dist/collection/components/co-sidebar/co-sidebar.js +2 -2
- package/dist/collection/components/co-sidebar-nav/co-sidebar-nav.js +3 -3
- package/dist/collection/components/co-skeleton/co-skeleton.js +1 -1
- package/dist/collection/components/co-slider/co-slider.js +2 -2
- package/dist/collection/components/co-switch/co-switch.js +3 -3
- package/dist/collection/components/co-tab/co-tab.js +2 -2
- package/dist/collection/components/co-tab-group/co-tab-group.js +2 -2
- package/dist/collection/components/co-tags-field/co-tags-field.js +5 -5
- package/dist/collection/components/co-textarea/co-textarea.js +4 -4
- package/dist/collection/components/co-toast/co-toast.js +4 -4
- package/dist/collection/components/co-toggle-button/co-toggle-button.js +2 -2
- package/dist/collection/components/co-toggle-button-group/co-toggle-button-group.js +2 -2
- package/dist/collection/components/co-tooltip/co-tooltip.js +2 -2
- package/dist/collection/components/co-transfer-list/co-transfer-list.js +3 -3
- package/dist/collection/components/co-video/co-video.js +2 -2
- package/dist/collection/utils/columnResize.js +37 -0
- package/dist/collection/utils/emojiI18n.js +92 -0
- package/dist/collection/utils/popover-stack.js +28 -0
- package/dist/collection/utils/slotContent.js +30 -0
- package/dist/components/co-accordion.js +1 -1
- package/dist/components/co-action-bar.js +1 -1
- package/dist/components/co-app-shell.js +1 -1
- package/dist/components/co-audio-player.js +1 -1
- package/dist/components/co-autocomplete.js +1 -1
- package/dist/components/co-avatar-group.js +1 -1
- package/dist/components/co-avatar.js +1 -1
- package/dist/components/co-badge.js +1 -1
- package/dist/components/co-bottom-sheet.js +1 -1
- package/dist/components/co-breadcrumb-item.js +1 -1
- package/dist/components/co-breadcrumb.js +1 -1
- package/dist/components/co-button-group.js +1 -1
- package/dist/components/co-button.js +1 -1
- package/dist/components/co-calendar-month.js +1 -1
- package/dist/components/co-calendar-timegrid.js +1 -1
- package/dist/components/co-calendar.js +1 -1
- package/dist/components/co-card.js +1 -1
- package/dist/components/co-carousel-item.js +1 -1
- package/dist/components/co-carousel.js +1 -1
- package/dist/components/co-checkbox-group.js +1 -1
- package/dist/components/co-checkbox.js +1 -1
- package/dist/components/co-chip.js +1 -1
- package/dist/components/co-color-picker.js +1 -1
- package/dist/components/co-column-picker.js +1 -1
- package/dist/components/co-combobox.js +1 -1
- package/dist/components/co-command-search.js +1 -1
- package/dist/components/co-data-table-pagination.js +1 -1
- package/dist/components/co-data-table.js +1 -1
- package/dist/components/co-date-field.js +1 -1
- package/dist/components/co-date-picker.js +1 -1
- package/dist/components/co-date-range-picker.js +1 -1
- package/dist/components/co-date-range.js +1 -1
- package/dist/components/co-date-time-picker.js +1 -1
- package/dist/components/co-drawer.js +1 -1
- package/dist/components/co-drive-card.js +1 -1
- package/dist/components/co-drop-zone.js +1 -1
- package/dist/components/co-emoji-picker.d.ts +11 -0
- package/dist/components/co-emoji-picker.js +1 -0
- package/dist/components/co-empty-state.js +1 -1
- package/dist/components/co-event-calendar.js +1 -1
- package/dist/components/co-event-popover.js +1 -1
- package/dist/components/co-fab.js +1 -1
- package/dist/components/co-file-field.js +1 -1
- package/dist/components/co-file-type-tile.js +1 -1
- package/dist/components/co-helper-text.js +1 -1
- package/dist/components/co-icon-button.js +1 -1
- package/dist/components/co-icon.js +1 -1
- package/dist/components/co-input.js +1 -1
- package/dist/components/co-json-field.js +1 -1
- package/dist/components/co-lightbox.js +1 -1
- package/dist/components/co-list-footer.js +1 -1
- package/dist/components/co-list-item.js +1 -1
- package/dist/components/co-media-thumb.js +1 -1
- package/dist/components/co-menu-divider.js +1 -1
- package/dist/components/co-menu-item.js +1 -1
- package/dist/components/co-menu.js +1 -1
- package/dist/components/co-modal.js +1 -1
- package/dist/components/co-navbar.js +1 -1
- package/dist/components/co-number-field.js +1 -1
- package/dist/components/co-option-list.js +1 -1
- package/dist/components/co-overlay.js +1 -1
- package/dist/components/co-page-header.js +1 -1
- package/dist/components/co-phone-field.js +1 -1
- package/dist/components/co-popover.js +1 -1
- package/dist/components/co-progress-bar.js +1 -1
- package/dist/components/co-progress-circle.js +1 -1
- package/dist/components/co-radio-group.js +1 -1
- package/dist/components/co-radio.js +1 -1
- package/dist/components/co-rating.js +1 -1
- package/dist/components/co-ref-field.js +1 -1
- package/dist/components/co-rich-text-editor.js +1 -1
- package/dist/components/co-rich-text-toolbar.js +1 -1
- package/dist/components/co-row.js +1 -1
- package/dist/components/co-select.js +1 -1
- package/dist/components/co-separator.js +1 -1
- package/dist/components/co-sidebar-nav.js +1 -1
- package/dist/components/co-sidebar.js +1 -1
- package/dist/components/co-skeleton.js +1 -1
- package/dist/components/co-slider.js +1 -1
- package/dist/components/co-switch.js +1 -1
- package/dist/components/co-tab-group.js +1 -1
- package/dist/components/co-tab.js +1 -1
- package/dist/components/co-tags-field.js +1 -1
- package/dist/components/co-textarea.js +1 -1
- package/dist/components/co-toast.js +1 -1
- package/dist/components/co-toggle-button-group.js +1 -1
- package/dist/components/co-toggle-button.js +1 -1
- package/dist/components/co-tooltip.js +1 -1
- package/dist/components/co-transfer-list.js +1 -1
- package/dist/components/co-video.js +1 -1
- package/dist/components/p-AvSaw4Ua.js +1 -0
- package/dist/components/p-B3TkpLNh.js +1 -0
- package/dist/components/p-B6oiFdUY.js +1 -0
- package/dist/components/{p-CmxZEGYq.js → p-B7hvddnu.js} +1 -1
- package/dist/components/{p-Ce0ZJcks.js → p-BGD3oQ73.js} +1 -1
- package/dist/components/{p-CJNo2JDc.js → p-BT5tSgZa.js} +1 -1
- package/dist/components/{p-CYv2ig6I.js → p-BsQQ7Mki.js} +1 -1
- package/dist/components/p-CBX_oabB.js +1 -0
- package/dist/components/{p-Cv5yuGLz.js → p-CXLX8DpD.js} +1 -1
- package/dist/components/{p-DFT1qsVu.js → p-CklsvHeL.js} +1 -1
- package/dist/components/{p-CKKBJaNB.js → p-CyMaOb1j.js} +1 -1
- package/dist/components/{p-xvWmYN3W.js → p-D5QJpmqf.js} +1 -1
- package/dist/components/{p-BlvsTlsS.js → p-D6OUW6oW.js} +1 -1
- package/dist/components/p-DP0bbhfN.js +1 -0
- package/dist/components/{p-BUE9mBqk.js → p-DTvb412h.js} +1 -1
- package/dist/components/{p-Bsll5Ofy.js → p-DkmKOF60.js} +1 -1
- package/dist/components/{p-re2gJwnQ.js → p-DolCkNsL.js} +1 -1
- package/dist/components/{p-CkQqqKRp.js → p-KWTokD0C.js} +1 -1
- package/dist/components/{p-BCnjq3jN.js → p-Q6caHt79.js} +1 -1
- package/dist/components/{p-2zy1K6zg.js → p-WWlZiln1.js} +1 -1
- package/dist/components/{p-DAaKsGqj.js → p-_131DL6m.js} +1 -1
- package/dist/components/{p-ushHimOL.js → p-gI62K3Be.js} +1 -1
- package/dist/components/{p-_YYd42XM.js → p-mom5kiBa.js} +1 -1
- package/dist/components/p-nwy6X1QT.js +1 -0
- package/dist/components/p-reaWaY4g.js +1 -0
- package/dist/esm/co-accordion.entry.js +2 -2
- package/dist/esm/co-action-bar.entry.js +2 -2
- package/dist/esm/co-app-shell.entry.js +2 -2
- package/dist/esm/co-audio-player.entry.js +3 -3
- package/dist/esm/co-autocomplete.entry.js +1 -1
- package/dist/esm/co-avatar_2.entry.js +2 -2
- package/dist/esm/co-badge.entry.js +1 -1
- package/dist/esm/co-bottom-sheet.entry.js +10 -11
- package/dist/esm/co-breadcrumb-item.entry.js +2 -2
- package/dist/esm/co-breadcrumb.entry.js +1 -1
- package/dist/esm/co-button-group.entry.js +2 -2
- package/dist/esm/co-button.entry.js +2 -2
- package/dist/esm/co-calendar-month_2.entry.js +3 -3
- package/dist/esm/co-calendar_3.entry.js +42 -7
- package/dist/esm/co-card.entry.js +2 -2
- package/dist/esm/co-carousel-item.entry.js +1 -1
- package/dist/esm/co-carousel.entry.js +2 -2
- package/dist/esm/co-checkbox.entry.js +3 -3
- package/dist/esm/co-chip_2.entry.js +11 -11
- package/dist/esm/co-color-picker.entry.js +2 -2
- package/dist/esm/co-column-picker.entry.js +2 -2
- package/dist/esm/co-combobox.entry.js +1 -1
- package/dist/esm/co-data-table-pagination.entry.js +4 -4
- package/dist/esm/co-data-table.entry.js +127 -8
- package/dist/esm/co-date-range.entry.js +1 -1
- package/dist/esm/co-date-time-picker.entry.js +2 -2
- package/dist/esm/co-drive-card.entry.js +1 -1
- package/dist/esm/co-drop-zone.entry.js +1 -1
- package/dist/esm/co-emoji-picker.entry.js +2806 -0
- package/dist/esm/co-empty-state.entry.js +2 -2
- package/dist/esm/co-event-calendar.entry.js +2 -2
- package/dist/esm/co-event-popover.entry.js +1 -1
- package/dist/esm/co-fab.entry.js +3 -3
- package/dist/esm/co-file-field.entry.js +5 -5
- package/dist/esm/co-file-type-tile.entry.js +2 -2
- package/dist/esm/co-helper-text.entry.js +2 -2
- package/dist/esm/co-icon-button.entry.js +2 -2
- package/dist/esm/co-icon.entry.js +2 -2
- package/dist/esm/co-json-field.entry.js +3 -3
- package/dist/esm/co-lightbox.entry.js +4 -4
- package/dist/esm/co-list-footer.entry.js +1 -1
- package/dist/esm/co-list-item.entry.js +4 -4
- package/dist/esm/co-media-thumb.entry.js +2 -2
- package/dist/esm/co-menu-divider.entry.js +1 -1
- package/dist/esm/co-menu.entry.js +1 -1
- package/dist/esm/co-modal.entry.js +9 -3
- package/dist/esm/co-navbar.entry.js +2 -2
- package/dist/esm/co-number-field.entry.js +2 -2
- package/dist/esm/co-overlay.entry.js +1 -1
- package/dist/esm/co-page-header.entry.js +1 -1
- package/dist/esm/co-phone-field.entry.js +1 -1
- package/dist/esm/co-popover.entry.js +49 -3
- package/dist/esm/co-progress-bar.entry.js +2 -2
- package/dist/esm/co-progress-circle.entry.js +2 -2
- package/dist/esm/co-provider-logo_2.entry.js +1 -1
- package/dist/esm/co-radio.entry.js +3 -3
- package/dist/esm/co-rating.entry.js +3 -3
- package/dist/esm/co-ref-field.entry.js +13 -4
- package/dist/esm/co-rich-text-editor.entry.js +3 -3
- package/dist/esm/co-row.entry.js +2 -2
- package/dist/esm/co-select.entry.js +13 -4
- package/dist/esm/co-separator.entry.js +1 -1
- package/dist/esm/co-sidebar-nav.entry.js +2 -2
- package/dist/esm/co-sidebar.entry.js +2 -2
- package/dist/esm/co-slider.entry.js +2 -2
- package/dist/esm/co-switch.entry.js +3 -3
- package/dist/esm/co-tab-group.entry.js +2 -2
- package/dist/esm/co-tab.entry.js +2 -2
- package/dist/esm/co-tags-field.entry.js +5 -5
- package/dist/esm/co-textarea.entry.js +4 -4
- package/dist/esm/co-toast.entry.js +2 -2
- package/dist/esm/co-toggle-button-group.entry.js +2 -2
- package/dist/esm/co-toggle-button.entry.js +2 -2
- package/dist/esm/co-transfer-list.entry.js +2 -2
- package/dist/esm/co-video.entry.js +2 -2
- package/dist/esm/cobalt.js +1 -1
- package/dist/esm/emojiNames.es-reaWaY4g.js +1923 -0
- package/dist/esm/emojiNames.pt-B6oiFdUY.js +1923 -0
- package/dist/esm/index-CrtiywTB.js +16 -12
- package/dist/esm/loader.js +1 -1
- package/dist/esm/slotContent-CBX_oabB.js +32 -0
- package/dist/types/components/co-bottom-sheet/co-bottom-sheet.d.ts +0 -1
- package/dist/types/components/co-data-table/co-data-table.d.ts +5 -0
- package/dist/types/components/co-drawer/co-drawer.d.ts +23 -0
- package/dist/types/components/co-emoji-picker/co-emoji-picker.d.ts +145 -0
- package/dist/types/components/co-emoji-picker/emojiData.d.ts +24 -0
- package/dist/types/components/co-emoji-picker/emojiNames.es.d.ts +12 -0
- package/dist/types/components/co-emoji-picker/emojiNames.pt.d.ts +12 -0
- package/dist/types/components/co-emoji-picker/emojiPickerLogic.d.ts +149 -0
- package/dist/types/components/co-modal/co-modal.d.ts +2 -0
- package/dist/types/components/co-popover/co-popover.d.ts +8 -1
- package/dist/types/components/co-ref-field/co-ref-field.d.ts +17 -0
- package/dist/types/components/co-select/co-select.d.ts +7 -0
- package/dist/types/components.d.ts +255 -2
- package/dist/types/utils/columnResize.d.ts +42 -0
- package/dist/types/utils/emojiI18n.d.ts +22 -0
- package/dist/types/utils/popover-stack.d.ts +5 -0
- package/dist/types/utils/slotContent.d.ts +19 -0
- package/package.json +4 -4
- package/dist/cobalt/p-212ed2ba.entry.js +0 -1
- package/dist/cobalt/p-2aeb1471.entry.js +0 -1
- package/dist/cobalt/p-30ec230e.entry.js +0 -1
- package/dist/cobalt/p-5ddebd10.entry.js +0 -1
- package/dist/cobalt/p-5f0f5d4b.entry.js +0 -1
- package/dist/cobalt/p-7521ec0c.entry.js +0 -1
- package/dist/cobalt/p-77593319.entry.js +0 -1
- package/dist/cobalt/p-7a2dab23.entry.js +0 -1
- package/dist/cobalt/p-e054cb52.entry.js +0 -1
- package/dist/cobalt/p-e612b43c.entry.js +0 -1
- package/dist/cobalt/p-e7e34852.entry.js +0 -1
- package/dist/cobalt/p-f1731fe9.entry.js +0 -1
- package/dist/components/p-Bh2__nEw.js +0 -1
- package/dist/components/p-BiefJDu3.js +0 -1
- package/dist/components/p-CL4dicvk.js +0 -1
- package/dist/components/p-DTJsO_Eg.js +0 -1
|
@@ -0,0 +1,682 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { EMOJI_CATEGORY_ICONS, getEmojiStrings } from "../../utils/emojiI18n";
|
|
3
|
+
import { langFromLocale } from "../../utils/dateI18n";
|
|
4
|
+
import { EMOJI_CATEGORIES } from "./emojiData";
|
|
5
|
+
import { RECENT_CATEGORY, ROW_HEIGHT, SKIN_TONE_KEYS, applySkinTone, buildPositionMap, buildRecentEntries, categoryAtRow, categoryRowStarts, displayName, getEmojiEntries, hasLocalePack, layoutRows, loadLocaleNames, moveActive, searchEmojis, toneFromKey, virtualSlice, } from "./emojiPickerLogic";
|
|
6
|
+
const NAV_KEYS = [
|
|
7
|
+
'ArrowRight', 'ArrowLeft', 'ArrowDown', 'ArrowUp', 'Home', 'End', 'PageDown', 'PageUp',
|
|
8
|
+
];
|
|
9
|
+
/**
|
|
10
|
+
* Selector de emoji: buscador + strip de categorías + grilla virtualizada.
|
|
11
|
+
*
|
|
12
|
+
* Es un PRIMITIVO de panel, igual que co-option-list: no renderiza trigger ni
|
|
13
|
+
* chrome (popover/dialog/ancho). El host lo compone — típicamente dentro de un
|
|
14
|
+
* `<co-popover>` colgado de su propio botón.
|
|
15
|
+
*
|
|
16
|
+
* Dataset: 1906 emoji del set RGI, empaquetados como texto (~16 KB gz). Los
|
|
17
|
+
* nombres localizados (es/pt) se cargan con `import()` dinámico solo cuando el
|
|
18
|
+
* `locale` los pide; en inglés no se descargan nunca.
|
|
19
|
+
*
|
|
20
|
+
* @event coSelect - El emoji elegido: `{ emoji, name }`.
|
|
21
|
+
* @event coClose - Escape con el buscador vacío (el host decide si cierra).
|
|
22
|
+
*/
|
|
23
|
+
export class CoEmojiPicker {
|
|
24
|
+
constructor() {
|
|
25
|
+
/** Placeholder del buscador. Vacío = el del `locale`. */
|
|
26
|
+
this.searchPlaceholder = '';
|
|
27
|
+
/** Mensaje de "sin resultados". Vacío = el del `locale`. */
|
|
28
|
+
this.emptyMessage = '';
|
|
29
|
+
/** aria-label del panel. Vacío = el del `locale`. */
|
|
30
|
+
this.label = '';
|
|
31
|
+
/** Muestra el buscador. */
|
|
32
|
+
this.searchable = true;
|
|
33
|
+
/** Muestra el strip de categorías. */
|
|
34
|
+
this.showCategories = true;
|
|
35
|
+
/** Columnas de la grilla. */
|
|
36
|
+
this.columns = 8;
|
|
37
|
+
/**
|
|
38
|
+
* Tono de piel aplicado a toda la grilla: `''` (por defecto) | `'light'` |
|
|
39
|
+
* `'medium-light'` | `'medium'` | `'medium-dark'` | `'dark'`.
|
|
40
|
+
*
|
|
41
|
+
* Es `mutable`: el componente la actualiza al elegir un tono para que funcione
|
|
42
|
+
* suelto, y emite `coSkinToneChange`. La PERSISTENCIA es del consumidor —
|
|
43
|
+
* Cobalt no escribe storage (ver el comentario de `recent`).
|
|
44
|
+
*/
|
|
45
|
+
this.skinTone = '';
|
|
46
|
+
/**
|
|
47
|
+
* Emoji usados recientemente, del más nuevo al más viejo. Se pintan como una
|
|
48
|
+
* categoría propia al tope de la grilla; con la lista vacía la categoría no
|
|
49
|
+
* existe (ni fila, ni header, ni botón en el strip).
|
|
50
|
+
*
|
|
51
|
+
* El historial lo posee el CONSUMIDOR, igual que el tono. Ningún componente de
|
|
52
|
+
* Cobalt escribe `localStorage`: el design system no conoce el scope de la
|
|
53
|
+
* preferencia (¿por usuario? ¿por workspace? ¿sincronizada al backend?) y
|
|
54
|
+
* escribir por su cuenta le impondría esa decisión a toda la suite. El
|
|
55
|
+
* consumidor recibe `coSelect` y actualiza esta prop; `pushRecent()` de
|
|
56
|
+
* `emojiPickerLogic` implementa la política MRU si no la quiere reescribir.
|
|
57
|
+
*
|
|
58
|
+
* Es RECIENTES (orden temporal), no "frecuentes" (por conteo): lo último que
|
|
59
|
+
* usaste queda primero, sin contadores que se calcifiquen arriba con el uso.
|
|
60
|
+
*/
|
|
61
|
+
this.recent = [];
|
|
62
|
+
/** Tope de emoji recientes mostrados. */
|
|
63
|
+
this.recentLimit = 16;
|
|
64
|
+
this.term = '';
|
|
65
|
+
this.activeIndex = -1;
|
|
66
|
+
this.scrollTop = 0;
|
|
67
|
+
this.viewportHeight = ROW_HEIGHT * 8;
|
|
68
|
+
/** Nombres localizados, o null mientras carga / si el locale no tiene pack. */
|
|
69
|
+
this.localeNames = null;
|
|
70
|
+
/** Fila de tonos desplegada. */
|
|
71
|
+
this.toneOpen = false;
|
|
72
|
+
/** Descarta un pack que llegó tarde tras cambiar de locale. */
|
|
73
|
+
this.localeToken = 0;
|
|
74
|
+
/** Evita que el foco vuelva al toggle si el cierre vino de un click afuera. */
|
|
75
|
+
this.restoreToneFocus = false;
|
|
76
|
+
/** Memo del layout — ver el getter `view`. */
|
|
77
|
+
this.viewCache = null;
|
|
78
|
+
/** Manda el foco al tono activo en el render que sigue a abrir la fila. */
|
|
79
|
+
this.pendingToneFocus = false;
|
|
80
|
+
// ── Interacción ───────────────────────────────────────────
|
|
81
|
+
this.handleInput = (e) => {
|
|
82
|
+
this.term = e.target.value;
|
|
83
|
+
// La grilla cambia por completo: el activo viejo ya no existe.
|
|
84
|
+
this.activeIndex = -1;
|
|
85
|
+
this.scrollTop = 0;
|
|
86
|
+
if (this.scrollEl)
|
|
87
|
+
this.scrollEl.scrollTop = 0;
|
|
88
|
+
};
|
|
89
|
+
this.handleKeyDown = (e) => {
|
|
90
|
+
if (e.key === 'Escape') {
|
|
91
|
+
e.preventDefault();
|
|
92
|
+
// Escape acota: la fila de tonos abierta se cierra primero, después la
|
|
93
|
+
// búsqueda, y recién con todo limpio se le avisa al host.
|
|
94
|
+
if (this.toneOpen) {
|
|
95
|
+
this.restoreToneFocus = true;
|
|
96
|
+
this.toneOpen = false;
|
|
97
|
+
}
|
|
98
|
+
else if (this.term) {
|
|
99
|
+
this.term = '';
|
|
100
|
+
this.activeIndex = -1;
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
this.coClose.emit();
|
|
104
|
+
}
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
108
|
+
const entry = this.view.entries.find((x) => x.index === this.activeIndex);
|
|
109
|
+
// Space sin celda activa es un espacio legítimo dentro del buscador.
|
|
110
|
+
if (!entry)
|
|
111
|
+
return;
|
|
112
|
+
e.preventDefault();
|
|
113
|
+
this.select(entry);
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
if (!NAV_KEYS.includes(e.key))
|
|
117
|
+
return;
|
|
118
|
+
const rows = this.rows;
|
|
119
|
+
const next = moveActive(rows, buildPositionMap(rows), this.activeIndex, e.key);
|
|
120
|
+
if (next < 0)
|
|
121
|
+
return;
|
|
122
|
+
e.preventDefault();
|
|
123
|
+
this.activeIndex = next;
|
|
124
|
+
this.scrollActiveIntoView(rows, next);
|
|
125
|
+
};
|
|
126
|
+
this.handleScroll = () => {
|
|
127
|
+
if (this.scrollEl)
|
|
128
|
+
this.scrollTop = this.scrollEl.scrollTop;
|
|
129
|
+
};
|
|
130
|
+
// ── Tono de piel ──────────────────────────────────────────
|
|
131
|
+
this.toggleTones = () => {
|
|
132
|
+
this.toneOpen = !this.toneOpen;
|
|
133
|
+
if (this.toneOpen)
|
|
134
|
+
this.pendingToneFocus = true;
|
|
135
|
+
};
|
|
136
|
+
/** Teclado de la fila de tonos: flechas entre opciones, Escape vuelve al
|
|
137
|
+
* toggle. Corta la propagación porque el panel entero escucha keydown para
|
|
138
|
+
* navegar la grilla — sin esto, una flecha acá también movería la selección. */
|
|
139
|
+
this.handleToneKeyDown = (e, i) => {
|
|
140
|
+
var _a;
|
|
141
|
+
const keys = ['ArrowRight', 'ArrowLeft', 'ArrowDown', 'ArrowUp', 'Home', 'End', 'Escape'];
|
|
142
|
+
if (!keys.includes(e.key))
|
|
143
|
+
return;
|
|
144
|
+
e.preventDefault();
|
|
145
|
+
e.stopPropagation();
|
|
146
|
+
if (e.key === 'Escape') {
|
|
147
|
+
this.restoreToneFocus = true;
|
|
148
|
+
this.toneOpen = false;
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
const last = SKIN_TONE_KEYS.length - 1;
|
|
152
|
+
const next = e.key === 'Home' ? 0
|
|
153
|
+
: e.key === 'End' ? last
|
|
154
|
+
: e.key === 'ArrowRight' || e.key === 'ArrowDown' ? Math.min(last, i + 1)
|
|
155
|
+
: Math.max(0, i - 1);
|
|
156
|
+
const el = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(`[data-tone-index="${next}"]`);
|
|
157
|
+
el === null || el === void 0 ? void 0 : el.focus();
|
|
158
|
+
};
|
|
159
|
+
this.jumpToCategory = (category) => {
|
|
160
|
+
var _a;
|
|
161
|
+
// El strip navega el dataset completo; con una búsqueda activa hay que
|
|
162
|
+
// volver a idle o la categoría podría no estar en los resultados.
|
|
163
|
+
if (this.term) {
|
|
164
|
+
this.term = '';
|
|
165
|
+
this.activeIndex = -1;
|
|
166
|
+
}
|
|
167
|
+
// Las filas se recalculan con el término ya limpio.
|
|
168
|
+
const row = categoryRowStarts(this.rows).get(category);
|
|
169
|
+
if (row === undefined || !this.scrollEl)
|
|
170
|
+
return;
|
|
171
|
+
this.scrollEl.scrollTop = row * ROW_HEIGHT;
|
|
172
|
+
this.scrollTop = row * ROW_HEIGHT;
|
|
173
|
+
(_a = this.inputEl) === null || _a === void 0 ? void 0 : _a.focus();
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
// ── Ciclo de vida ─────────────────────────────────────────
|
|
177
|
+
componentWillLoad() {
|
|
178
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
179
|
+
// Semilla explícita del estado (mismo patrón que co-option-list, que
|
|
180
|
+
// asigna `this.term` acá en vez de confiar en el inicializador de campo).
|
|
181
|
+
// El entorno de spec de @stencil/vitest NO aplica los inicializadores de
|
|
182
|
+
// los miembros decorados —ni de @State ni de los defaults de @Prop—, así
|
|
183
|
+
// que sin esto el primer render ve `undefined`. En el build real es una
|
|
184
|
+
// reasignación inocua.
|
|
185
|
+
(_a = this.term) !== null && _a !== void 0 ? _a : (this.term = '');
|
|
186
|
+
(_b = this.activeIndex) !== null && _b !== void 0 ? _b : (this.activeIndex = -1);
|
|
187
|
+
(_c = this.scrollTop) !== null && _c !== void 0 ? _c : (this.scrollTop = 0);
|
|
188
|
+
(_d = this.viewportHeight) !== null && _d !== void 0 ? _d : (this.viewportHeight = ROW_HEIGHT * 8);
|
|
189
|
+
(_e = this.toneOpen) !== null && _e !== void 0 ? _e : (this.toneOpen = false);
|
|
190
|
+
(_f = this.skinTone) !== null && _f !== void 0 ? _f : (this.skinTone = '');
|
|
191
|
+
(_g = this.recentLimit) !== null && _g !== void 0 ? _g : (this.recentLimit = 16);
|
|
192
|
+
this.syncLocaleNames();
|
|
193
|
+
}
|
|
194
|
+
componentDidLoad() {
|
|
195
|
+
this.measureViewport();
|
|
196
|
+
if (typeof ResizeObserver !== 'undefined' && this.scrollEl) {
|
|
197
|
+
this.resizeObserver = new ResizeObserver(() => this.measureViewport());
|
|
198
|
+
this.resizeObserver.observe(this.scrollEl);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
componentDidRender() {
|
|
202
|
+
var _a, _b, _c;
|
|
203
|
+
// El foco sigue a la fila de tonos: al abrir va al tono activo, al cerrar
|
|
204
|
+
// vuelve al toggle. Sin esto, cerrar con Escape deja el foco en un botón
|
|
205
|
+
// que ya no está en el DOM y el navegador lo manda al <body>.
|
|
206
|
+
if (this.toneOpen && this.pendingToneFocus) {
|
|
207
|
+
this.pendingToneFocus = false;
|
|
208
|
+
const i = Math.max(0, SKIN_TONE_KEYS.indexOf(this.skinTone));
|
|
209
|
+
(_b = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(`[data-tone-index="${i}"]`)) === null || _b === void 0 ? void 0 : _b.focus();
|
|
210
|
+
}
|
|
211
|
+
else if (!this.toneOpen && this.restoreToneFocus) {
|
|
212
|
+
this.restoreToneFocus = false;
|
|
213
|
+
(_c = this.toneToggleEl) === null || _c === void 0 ? void 0 : _c.focus();
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
disconnectedCallback() {
|
|
217
|
+
var _a;
|
|
218
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
219
|
+
this.resizeObserver = undefined;
|
|
220
|
+
}
|
|
221
|
+
onLocaleChange() {
|
|
222
|
+
this.syncLocaleNames();
|
|
223
|
+
}
|
|
224
|
+
/** Carga (o descarta) el pack de nombres del locale activo. */
|
|
225
|
+
syncLocaleNames() {
|
|
226
|
+
const lang = langFromLocale(this.locale);
|
|
227
|
+
const token = ++this.localeToken;
|
|
228
|
+
// Hasta que el pack llegue (o si no hay), los nombres son los ingleses.
|
|
229
|
+
this.localeNames = null;
|
|
230
|
+
if (!hasLocalePack(lang))
|
|
231
|
+
return;
|
|
232
|
+
loadLocaleNames(lang).then((names) => {
|
|
233
|
+
// Otro cambio de locale ganó la carrera → el pack viejo se descarta.
|
|
234
|
+
if (token === this.localeToken)
|
|
235
|
+
this.localeNames = names;
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
measureViewport() {
|
|
239
|
+
var _a;
|
|
240
|
+
const h = (_a = this.scrollEl) === null || _a === void 0 ? void 0 : _a.clientHeight;
|
|
241
|
+
if (h && h !== this.viewportHeight)
|
|
242
|
+
this.viewportHeight = h;
|
|
243
|
+
}
|
|
244
|
+
// ── Derivados ─────────────────────────────────────────────
|
|
245
|
+
get strings() {
|
|
246
|
+
return getEmojiStrings(this.locale);
|
|
247
|
+
}
|
|
248
|
+
get grouped() {
|
|
249
|
+
return !this.term.trim();
|
|
250
|
+
}
|
|
251
|
+
/** Modificador Unicode del tono activo ('' = por defecto). */
|
|
252
|
+
get tone() {
|
|
253
|
+
return toneFromKey(this.skinTone);
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Entradas + layout de la vista actual, memoizados.
|
|
257
|
+
*
|
|
258
|
+
* `render()` corre en CADA tick de scroll (handleScroll escribe scrollTop), y
|
|
259
|
+
* rearmar el layout ahí significaba recorrer los 1906 emoji y construir ~240
|
|
260
|
+
* objetos de fila por frame. La clave cubre todo lo que cambia el layout; el
|
|
261
|
+
* tono NO entra: solo afecta el glifo que pinta la celda, no su posición.
|
|
262
|
+
*/
|
|
263
|
+
get view() {
|
|
264
|
+
var _a;
|
|
265
|
+
const grouped = this.grouped;
|
|
266
|
+
const recentEntries = grouped ? buildRecentEntries(this.recent, this.recentLimit) : [];
|
|
267
|
+
const key = [
|
|
268
|
+
this.term,
|
|
269
|
+
this.columns,
|
|
270
|
+
this.localeToken,
|
|
271
|
+
this.localeNames ? 1 : 0,
|
|
272
|
+
recentEntries.map((e) => e.char).join(''),
|
|
273
|
+
].join('\u0000');
|
|
274
|
+
if (((_a = this.viewCache) === null || _a === void 0 ? void 0 : _a.key) === key)
|
|
275
|
+
return this.viewCache;
|
|
276
|
+
const entries = grouped
|
|
277
|
+
? [...recentEntries, ...getEmojiEntries()]
|
|
278
|
+
: searchEmojis(getEmojiEntries(), this.term, this.localeNames);
|
|
279
|
+
const rows = layoutRows(entries, this.columns, grouped);
|
|
280
|
+
this.viewCache = { key, entries, rows };
|
|
281
|
+
return this.viewCache;
|
|
282
|
+
}
|
|
283
|
+
get rows() {
|
|
284
|
+
return this.view.rows;
|
|
285
|
+
}
|
|
286
|
+
/** Mantiene la celda activa dentro del viewport virtualizado. Se hace con
|
|
287
|
+
* matemática de filas y no con `scrollIntoView`: la celda puede no estar
|
|
288
|
+
* montada todavía (está fuera de la ventana virtual). */
|
|
289
|
+
scrollActiveIntoView(rows, index) {
|
|
290
|
+
const pos = buildPositionMap(rows).get(index);
|
|
291
|
+
if (!pos || !this.scrollEl)
|
|
292
|
+
return;
|
|
293
|
+
const top = pos.row * ROW_HEIGHT;
|
|
294
|
+
const bottom = top + ROW_HEIGHT;
|
|
295
|
+
const view = this.scrollEl.scrollTop;
|
|
296
|
+
if (top < view)
|
|
297
|
+
this.scrollEl.scrollTop = top;
|
|
298
|
+
else if (bottom > view + this.viewportHeight)
|
|
299
|
+
this.scrollEl.scrollTop = bottom - this.viewportHeight;
|
|
300
|
+
}
|
|
301
|
+
select(entry) {
|
|
302
|
+
this.coSelect.emit({
|
|
303
|
+
emoji: this.charOf(entry),
|
|
304
|
+
name: displayName(entry, this.localeNames),
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
/** Glifo final de una entrada: el tono activo aplicado si lo soporta. Las
|
|
308
|
+
* entradas de recientes ya vienen resueltas (tone '0') y salen tal cual. */
|
|
309
|
+
charOf(entry) {
|
|
310
|
+
return applySkinTone(entry.char, entry.tone, this.tone);
|
|
311
|
+
}
|
|
312
|
+
chooseTone(key) {
|
|
313
|
+
if (key !== this.skinTone) {
|
|
314
|
+
this.skinTone = key;
|
|
315
|
+
this.coSkinToneChange.emit({ skinTone: key });
|
|
316
|
+
}
|
|
317
|
+
this.restoreToneFocus = true;
|
|
318
|
+
this.toneOpen = false;
|
|
319
|
+
}
|
|
320
|
+
// ── Render ────────────────────────────────────────────────
|
|
321
|
+
renderCell(entry, fallbackTabIndex) {
|
|
322
|
+
const active = entry.index === this.activeIndex;
|
|
323
|
+
const name = displayName(entry, this.localeNames);
|
|
324
|
+
// Roving tabindex: UNA sola celda tabbable. Con activo, esa; sin activo, la
|
|
325
|
+
// primera de la grilla (`fallbackTabIndex`) — no todas las montadas, o la
|
|
326
|
+
// grilla metería ~100 paradas de tab en el recorrido de la página.
|
|
327
|
+
const tabbable = this.searchable
|
|
328
|
+
? false
|
|
329
|
+
: active || (this.activeIndex < 0 && entry.index === fallbackTabIndex);
|
|
330
|
+
return (h("button", { type: "button", key: entry.index, id: CoEmojiPicker.cellId(entry.index), class: { 'co-emoji-picker__cell': true, 'co-emoji-picker__cell--active': active }, role: "option", "aria-selected": active ? 'true' : 'false', "aria-label": name, title: name,
|
|
331
|
+
// El foco vive en el buscador (patrón combobox + aria-activedescendant);
|
|
332
|
+
// sin buscador la grilla toma roving tabindex para seguir siendo operable.
|
|
333
|
+
tabIndex: tabbable ? 0 : -1, onFocus: () => {
|
|
334
|
+
if (!this.searchable)
|
|
335
|
+
this.activeIndex = entry.index;
|
|
336
|
+
},
|
|
337
|
+
// El hover se resalta SOLO por CSS (:hover). Escribirlo a @State
|
|
338
|
+
// re-renderizaba la ventana entera (~100 botones) en cada mousemove, y
|
|
339
|
+
// además ensuciaba aria-activedescendant, que debe seguir al teclado.
|
|
340
|
+
onClick: () => this.select(entry) }, h("span", { class: "co-emoji-picker__glyph", "aria-hidden": "true" }, this.charOf(entry))));
|
|
341
|
+
}
|
|
342
|
+
/** Botón de tono + fila desplegable. La fila es un `radiogroup` con roving
|
|
343
|
+
* tabindex: una sola parada de tab, flechas para moverse. */
|
|
344
|
+
renderTones() {
|
|
345
|
+
var _a;
|
|
346
|
+
const s = this.strings;
|
|
347
|
+
const current = Math.max(0, SKIN_TONE_KEYS.indexOf(this.skinTone));
|
|
348
|
+
const currentName = (_a = s.skinTones[current]) !== null && _a !== void 0 ? _a : '';
|
|
349
|
+
return (h("div", { class: "co-emoji-picker__tones", part: "tones" }, h("button", { type: "button", class: "co-emoji-picker__tone-toggle", "aria-label": `${s.skinToneLabel}: ${currentName}`, "aria-expanded": this.toneOpen ? 'true' : 'false', "aria-haspopup": "true", title: s.skinToneLabel, ref: (el) => (this.toneToggleEl = el), onClick: this.toggleTones }, h("span", { "aria-hidden": "true" }, applySkinTone('\u{270B}', '1', this.tone))), this.toneOpen && (h("div", { class: "co-emoji-picker__tone-row", role: "radiogroup", "aria-label": s.skinToneLabel }, SKIN_TONE_KEYS.map((key, i) => {
|
|
350
|
+
var _a, _b;
|
|
351
|
+
const selected = key === this.skinTone;
|
|
352
|
+
return (h("button", { type: "button", key: key || 'default', "data-tone-index": i, class: {
|
|
353
|
+
'co-emoji-picker__tone': true,
|
|
354
|
+
'co-emoji-picker__tone--selected': selected,
|
|
355
|
+
}, role: "radio", "aria-checked": selected ? 'true' : 'false', "aria-label": (_a = s.skinTones[i]) !== null && _a !== void 0 ? _a : key, title: (_b = s.skinTones[i]) !== null && _b !== void 0 ? _b : key, tabIndex: selected ? 0 : -1, onKeyDown: (e) => this.handleToneKeyDown(e, i), onClick: () => this.chooseTone(key) }, h("span", { "aria-hidden": "true" }, applySkinTone('\u{270B}', '1', toneFromKey(key)))));
|
|
356
|
+
})))));
|
|
357
|
+
}
|
|
358
|
+
renderRows(rows) {
|
|
359
|
+
const { totalHeight, start, end, offsetY } = virtualSlice(this.scrollTop, this.viewportHeight, rows.length);
|
|
360
|
+
const { categories } = this.strings;
|
|
361
|
+
// Primera celda del layout COMPLETO (no de la ventana): es la que sostiene
|
|
362
|
+
// el tab-stop mientras no haya celda activa.
|
|
363
|
+
const firstRow = rows.find((r) => r.kind === 'emoji');
|
|
364
|
+
const firstIndex = (firstRow === null || firstRow === void 0 ? void 0 : firstRow.kind) === 'emoji' ? firstRow.entries[0].index : -1;
|
|
365
|
+
return (h("div", { class: "co-emoji-picker__sizer", style: { height: `${totalHeight}px` } }, h("div", { class: "co-emoji-picker__window", style: { transform: `translateY(${offsetY}px)` } }, rows.slice(start, end).map((row, i) => {
|
|
366
|
+
var _a;
|
|
367
|
+
return row.kind === 'header' ? (h("div", { class: "co-emoji-picker__section", key: `h-${start + i}`, role: "presentation" }, (_a = categories[row.category]) !== null && _a !== void 0 ? _a : row.category)) : (h("div", { class: "co-emoji-picker__row", key: `r-${start + i}`, role: "presentation" }, row.entries.map((entry) => this.renderCell(entry, firstIndex))));
|
|
368
|
+
}))));
|
|
369
|
+
}
|
|
370
|
+
render() {
|
|
371
|
+
const s = this.strings;
|
|
372
|
+
const rows = this.rows;
|
|
373
|
+
const isEmpty = rows.length === 0;
|
|
374
|
+
const activeCategory = this.grouped
|
|
375
|
+
? categoryAtRow(rows, Math.floor(this.scrollTop / ROW_HEIGHT))
|
|
376
|
+
: null;
|
|
377
|
+
const activeCellId = this.activeIndex >= 0 ? CoEmojiPicker.cellId(this.activeIndex) : undefined;
|
|
378
|
+
// La categoría de recientes solo existe si hay historial que mostrar: con la
|
|
379
|
+
// lista vacía no hay botón fantasma en el strip ni hueco en la grilla. Se
|
|
380
|
+
// decide sobre la prop cruda y no sobre la vista, así el strip no cambia de
|
|
381
|
+
// ancho al empezar a buscar (saltar a una categoría ya limpia la búsqueda).
|
|
382
|
+
const hasRecent = buildRecentEntries(this.recent, this.recentLimit).length > 0;
|
|
383
|
+
const stripCategories = hasRecent
|
|
384
|
+
? [RECENT_CATEGORY, ...EMOJI_CATEGORIES]
|
|
385
|
+
: [...EMOJI_CATEGORIES];
|
|
386
|
+
return (h("div", { key: '7f3da124283afb57ac05c388746d07a7f63a0eca', class: "co-emoji-picker", part: "panel", role: "group", "aria-label": this.label || s.pickerLabel, style: { '--co-emoji-picker-columns': String(Math.max(1, this.columns)) }, onKeyDown: this.handleKeyDown }, this.searchable && (h("div", { key: 'eb4efeeed738dc094f155bc7bdc907e3075c2dad', class: "co-emoji-picker__search", part: "search" }, h("co-icon", { key: '042c32db076e3628e9459304f12304c7c3d85ae9', name: "magnifying-glass", size: 16 }), h("input", { key: '21c74e3a55e9b332061e73812cff512807afaabc', class: "co-emoji-picker__input", part: "input", type: "text", value: this.term, placeholder: this.searchPlaceholder || s.searchPlaceholder, onInput: this.handleInput, ref: (el) => (this.inputEl = el), role: "combobox", "aria-expanded": "true", "aria-autocomplete": "list", "aria-controls": CoEmojiPicker.GRID_ID, "aria-activedescendant": activeCellId }), this.renderTones())), this.showCategories && (h("div", { key: '7b08cac53699f975e7f331e91700f6182d208cab', class: "co-emoji-picker__categories", part: "categories", "aria-label": s.categoriesLabel }, !this.searchable && this.renderTones(), stripCategories.map((category) => {
|
|
387
|
+
var _a, _b;
|
|
388
|
+
const name = (_a = s.categories[category]) !== null && _a !== void 0 ? _a : category;
|
|
389
|
+
return (h("button", { type: "button", key: category, class: {
|
|
390
|
+
'co-emoji-picker__category': true,
|
|
391
|
+
'co-emoji-picker__category--active': category === activeCategory,
|
|
392
|
+
}, "aria-label": name, "aria-current": category === activeCategory ? 'true' : undefined, title: name, onClick: () => this.jumpToCategory(category) }, h("co-icon", { name: (_b = EMOJI_CATEGORY_ICONS[category]) !== null && _b !== void 0 ? _b : 'circle', size: 16 })));
|
|
393
|
+
}))), h("div", { key: '349078ee46f1833797620c5c97da23807b7db384', class: "co-emoji-picker__scroll", part: "grid", id: CoEmojiPicker.GRID_ID, role: "listbox", "aria-label": s.gridLabel, ref: (el) => (this.scrollEl = el), onScroll: this.handleScroll }, isEmpty ? (h("div", { class: "co-emoji-picker__empty" }, h("co-icon", { name: "magnifying-glass", size: 20 }), h("span", null, this.emptyMessage || s.emptyMessage))) : (this.renderRows(rows)))));
|
|
394
|
+
}
|
|
395
|
+
static get is() { return "co-emoji-picker"; }
|
|
396
|
+
static get encapsulation() { return "shadow"; }
|
|
397
|
+
static get originalStyleUrls() {
|
|
398
|
+
return {
|
|
399
|
+
"$": ["co-emoji-picker.css"]
|
|
400
|
+
};
|
|
401
|
+
}
|
|
402
|
+
static get styleUrls() {
|
|
403
|
+
return {
|
|
404
|
+
"$": ["co-emoji-picker.css"]
|
|
405
|
+
};
|
|
406
|
+
}
|
|
407
|
+
static get properties() {
|
|
408
|
+
return {
|
|
409
|
+
"locale": {
|
|
410
|
+
"type": "string",
|
|
411
|
+
"mutable": false,
|
|
412
|
+
"complexType": {
|
|
413
|
+
"original": "string",
|
|
414
|
+
"resolved": "string | undefined",
|
|
415
|
+
"references": {}
|
|
416
|
+
},
|
|
417
|
+
"required": false,
|
|
418
|
+
"optional": true,
|
|
419
|
+
"docs": {
|
|
420
|
+
"tags": [],
|
|
421
|
+
"text": "Locale de los textos de UI y de los nombres de emoji ('es' | 'en' | 'pt')."
|
|
422
|
+
},
|
|
423
|
+
"getter": false,
|
|
424
|
+
"setter": false,
|
|
425
|
+
"reflect": false,
|
|
426
|
+
"attribute": "locale"
|
|
427
|
+
},
|
|
428
|
+
"searchPlaceholder": {
|
|
429
|
+
"type": "string",
|
|
430
|
+
"mutable": false,
|
|
431
|
+
"complexType": {
|
|
432
|
+
"original": "string",
|
|
433
|
+
"resolved": "string",
|
|
434
|
+
"references": {}
|
|
435
|
+
},
|
|
436
|
+
"required": false,
|
|
437
|
+
"optional": false,
|
|
438
|
+
"docs": {
|
|
439
|
+
"tags": [],
|
|
440
|
+
"text": "Placeholder del buscador. Vac\u00EDo = el del `locale`."
|
|
441
|
+
},
|
|
442
|
+
"getter": false,
|
|
443
|
+
"setter": false,
|
|
444
|
+
"reflect": false,
|
|
445
|
+
"attribute": "search-placeholder",
|
|
446
|
+
"defaultValue": "''"
|
|
447
|
+
},
|
|
448
|
+
"emptyMessage": {
|
|
449
|
+
"type": "string",
|
|
450
|
+
"mutable": false,
|
|
451
|
+
"complexType": {
|
|
452
|
+
"original": "string",
|
|
453
|
+
"resolved": "string",
|
|
454
|
+
"references": {}
|
|
455
|
+
},
|
|
456
|
+
"required": false,
|
|
457
|
+
"optional": false,
|
|
458
|
+
"docs": {
|
|
459
|
+
"tags": [],
|
|
460
|
+
"text": "Mensaje de \"sin resultados\". Vac\u00EDo = el del `locale`."
|
|
461
|
+
},
|
|
462
|
+
"getter": false,
|
|
463
|
+
"setter": false,
|
|
464
|
+
"reflect": false,
|
|
465
|
+
"attribute": "empty-message",
|
|
466
|
+
"defaultValue": "''"
|
|
467
|
+
},
|
|
468
|
+
"label": {
|
|
469
|
+
"type": "string",
|
|
470
|
+
"mutable": false,
|
|
471
|
+
"complexType": {
|
|
472
|
+
"original": "string",
|
|
473
|
+
"resolved": "string",
|
|
474
|
+
"references": {}
|
|
475
|
+
},
|
|
476
|
+
"required": false,
|
|
477
|
+
"optional": false,
|
|
478
|
+
"docs": {
|
|
479
|
+
"tags": [],
|
|
480
|
+
"text": "aria-label del panel. Vac\u00EDo = el del `locale`."
|
|
481
|
+
},
|
|
482
|
+
"getter": false,
|
|
483
|
+
"setter": false,
|
|
484
|
+
"reflect": false,
|
|
485
|
+
"attribute": "label",
|
|
486
|
+
"defaultValue": "''"
|
|
487
|
+
},
|
|
488
|
+
"searchable": {
|
|
489
|
+
"type": "boolean",
|
|
490
|
+
"mutable": false,
|
|
491
|
+
"complexType": {
|
|
492
|
+
"original": "boolean",
|
|
493
|
+
"resolved": "boolean",
|
|
494
|
+
"references": {}
|
|
495
|
+
},
|
|
496
|
+
"required": false,
|
|
497
|
+
"optional": false,
|
|
498
|
+
"docs": {
|
|
499
|
+
"tags": [],
|
|
500
|
+
"text": "Muestra el buscador."
|
|
501
|
+
},
|
|
502
|
+
"getter": false,
|
|
503
|
+
"setter": false,
|
|
504
|
+
"reflect": true,
|
|
505
|
+
"attribute": "searchable",
|
|
506
|
+
"defaultValue": "true"
|
|
507
|
+
},
|
|
508
|
+
"showCategories": {
|
|
509
|
+
"type": "boolean",
|
|
510
|
+
"mutable": false,
|
|
511
|
+
"complexType": {
|
|
512
|
+
"original": "boolean",
|
|
513
|
+
"resolved": "boolean",
|
|
514
|
+
"references": {}
|
|
515
|
+
},
|
|
516
|
+
"required": false,
|
|
517
|
+
"optional": false,
|
|
518
|
+
"docs": {
|
|
519
|
+
"tags": [],
|
|
520
|
+
"text": "Muestra el strip de categor\u00EDas."
|
|
521
|
+
},
|
|
522
|
+
"getter": false,
|
|
523
|
+
"setter": false,
|
|
524
|
+
"reflect": true,
|
|
525
|
+
"attribute": "show-categories",
|
|
526
|
+
"defaultValue": "true"
|
|
527
|
+
},
|
|
528
|
+
"columns": {
|
|
529
|
+
"type": "number",
|
|
530
|
+
"mutable": false,
|
|
531
|
+
"complexType": {
|
|
532
|
+
"original": "number",
|
|
533
|
+
"resolved": "number",
|
|
534
|
+
"references": {}
|
|
535
|
+
},
|
|
536
|
+
"required": false,
|
|
537
|
+
"optional": false,
|
|
538
|
+
"docs": {
|
|
539
|
+
"tags": [],
|
|
540
|
+
"text": "Columnas de la grilla."
|
|
541
|
+
},
|
|
542
|
+
"getter": false,
|
|
543
|
+
"setter": false,
|
|
544
|
+
"reflect": false,
|
|
545
|
+
"attribute": "columns",
|
|
546
|
+
"defaultValue": "8"
|
|
547
|
+
},
|
|
548
|
+
"skinTone": {
|
|
549
|
+
"type": "string",
|
|
550
|
+
"mutable": true,
|
|
551
|
+
"complexType": {
|
|
552
|
+
"original": "string",
|
|
553
|
+
"resolved": "string",
|
|
554
|
+
"references": {}
|
|
555
|
+
},
|
|
556
|
+
"required": false,
|
|
557
|
+
"optional": false,
|
|
558
|
+
"docs": {
|
|
559
|
+
"tags": [],
|
|
560
|
+
"text": "Tono de piel aplicado a toda la grilla: `''` (por defecto) | `'light'` |\n`'medium-light'` | `'medium'` | `'medium-dark'` | `'dark'`.\n\nEs `mutable`: el componente la actualiza al elegir un tono para que funcione\nsuelto, y emite `coSkinToneChange`. La PERSISTENCIA es del consumidor \u2014\nCobalt no escribe storage (ver el comentario de `recent`)."
|
|
561
|
+
},
|
|
562
|
+
"getter": false,
|
|
563
|
+
"setter": false,
|
|
564
|
+
"reflect": true,
|
|
565
|
+
"attribute": "skin-tone",
|
|
566
|
+
"defaultValue": "''"
|
|
567
|
+
},
|
|
568
|
+
"recent": {
|
|
569
|
+
"type": "unknown",
|
|
570
|
+
"mutable": false,
|
|
571
|
+
"complexType": {
|
|
572
|
+
"original": "string[]",
|
|
573
|
+
"resolved": "string[]",
|
|
574
|
+
"references": {}
|
|
575
|
+
},
|
|
576
|
+
"required": false,
|
|
577
|
+
"optional": false,
|
|
578
|
+
"docs": {
|
|
579
|
+
"tags": [],
|
|
580
|
+
"text": "Emoji usados recientemente, del m\u00E1s nuevo al m\u00E1s viejo. Se pintan como una\ncategor\u00EDa propia al tope de la grilla; con la lista vac\u00EDa la categor\u00EDa no\nexiste (ni fila, ni header, ni bot\u00F3n en el strip).\n\nEl historial lo posee el CONSUMIDOR, igual que el tono. Ning\u00FAn componente de\nCobalt escribe `localStorage`: el design system no conoce el scope de la\npreferencia (\u00BFpor usuario? \u00BFpor workspace? \u00BFsincronizada al backend?) y\nescribir por su cuenta le impondr\u00EDa esa decisi\u00F3n a toda la suite. El\nconsumidor recibe `coSelect` y actualiza esta prop; `pushRecent()` de\n`emojiPickerLogic` implementa la pol\u00EDtica MRU si no la quiere reescribir.\n\nEs RECIENTES (orden temporal), no \"frecuentes\" (por conteo): lo \u00FAltimo que\nusaste queda primero, sin contadores que se calcifiquen arriba con el uso."
|
|
581
|
+
},
|
|
582
|
+
"getter": false,
|
|
583
|
+
"setter": false,
|
|
584
|
+
"defaultValue": "[]"
|
|
585
|
+
},
|
|
586
|
+
"recentLimit": {
|
|
587
|
+
"type": "number",
|
|
588
|
+
"mutable": false,
|
|
589
|
+
"complexType": {
|
|
590
|
+
"original": "number",
|
|
591
|
+
"resolved": "number",
|
|
592
|
+
"references": {}
|
|
593
|
+
},
|
|
594
|
+
"required": false,
|
|
595
|
+
"optional": false,
|
|
596
|
+
"docs": {
|
|
597
|
+
"tags": [],
|
|
598
|
+
"text": "Tope de emoji recientes mostrados."
|
|
599
|
+
},
|
|
600
|
+
"getter": false,
|
|
601
|
+
"setter": false,
|
|
602
|
+
"reflect": false,
|
|
603
|
+
"attribute": "recent-limit",
|
|
604
|
+
"defaultValue": "16"
|
|
605
|
+
}
|
|
606
|
+
};
|
|
607
|
+
}
|
|
608
|
+
static get states() {
|
|
609
|
+
return {
|
|
610
|
+
"term": {},
|
|
611
|
+
"activeIndex": {},
|
|
612
|
+
"scrollTop": {},
|
|
613
|
+
"viewportHeight": {},
|
|
614
|
+
"localeNames": {},
|
|
615
|
+
"toneOpen": {}
|
|
616
|
+
};
|
|
617
|
+
}
|
|
618
|
+
static get events() {
|
|
619
|
+
return [{
|
|
620
|
+
"method": "coSelect",
|
|
621
|
+
"name": "coSelect",
|
|
622
|
+
"bubbles": false,
|
|
623
|
+
"cancelable": true,
|
|
624
|
+
"composed": false,
|
|
625
|
+
"docs": {
|
|
626
|
+
"tags": [],
|
|
627
|
+
"text": "Emitido al elegir un emoji. `emoji` ya viene con el tono aplicado."
|
|
628
|
+
},
|
|
629
|
+
"complexType": {
|
|
630
|
+
"original": "{ emoji: string; name: string }",
|
|
631
|
+
"resolved": "{ emoji: string; name: string; }",
|
|
632
|
+
"references": {}
|
|
633
|
+
}
|
|
634
|
+
}, {
|
|
635
|
+
"method": "coSkinToneChange",
|
|
636
|
+
"name": "coSkinToneChange",
|
|
637
|
+
"bubbles": false,
|
|
638
|
+
"cancelable": true,
|
|
639
|
+
"composed": false,
|
|
640
|
+
"docs": {
|
|
641
|
+
"tags": [],
|
|
642
|
+
"text": "Emitido al cambiar el tono de piel \u2014 el consumidor lo persiste."
|
|
643
|
+
},
|
|
644
|
+
"complexType": {
|
|
645
|
+
"original": "{ skinTone: string }",
|
|
646
|
+
"resolved": "{ skinTone: string; }",
|
|
647
|
+
"references": {}
|
|
648
|
+
}
|
|
649
|
+
}, {
|
|
650
|
+
"method": "coClose",
|
|
651
|
+
"name": "coClose",
|
|
652
|
+
"bubbles": false,
|
|
653
|
+
"cancelable": true,
|
|
654
|
+
"composed": false,
|
|
655
|
+
"docs": {
|
|
656
|
+
"tags": [],
|
|
657
|
+
"text": "Emitido con Escape y el buscador ya vac\u00EDo."
|
|
658
|
+
},
|
|
659
|
+
"complexType": {
|
|
660
|
+
"original": "void",
|
|
661
|
+
"resolved": "void",
|
|
662
|
+
"references": {}
|
|
663
|
+
}
|
|
664
|
+
}];
|
|
665
|
+
}
|
|
666
|
+
static get elementRef() { return "el"; }
|
|
667
|
+
static get watchers() {
|
|
668
|
+
return [{
|
|
669
|
+
"propName": "locale",
|
|
670
|
+
"methodName": "onLocaleChange"
|
|
671
|
+
}];
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
/**
|
|
675
|
+
* Ids del shadow root de ESTA instancia (constantes, no aleatorios: los
|
|
676
|
+
* shadow roots no comparten espacio de ids). El input los referencia con
|
|
677
|
+
* aria-controls/aria-activedescendant, ambos dentro del mismo root — que es
|
|
678
|
+
* la razón por la que este patrón SÍ funciona acá y no en co-command-search,
|
|
679
|
+
* donde la lista vive en otro shadow root.
|
|
680
|
+
*/
|
|
681
|
+
CoEmojiPicker.GRID_ID = 'co-emoji-grid';
|
|
682
|
+
CoEmojiPicker.cellId = (index) => `co-emoji-cell-${index}`;
|