@ember-eui/core 11.0.3 → 12.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -7
- package/declarations/-private/random-id.d.ts +0 -1
- package/declarations/-private/random-id.d.ts.map +1 -1
- package/declarations/components/eui-accordion.d.ts +2 -1
- package/declarations/components/eui-accordion.d.ts.map +1 -1
- package/declarations/components/eui-breadcrumbs.d.ts +2 -1
- package/declarations/components/eui-breadcrumbs.d.ts.map +1 -1
- package/declarations/components/eui-code-block/virtualized.d.ts +1 -1
- package/declarations/components/eui-code-block.d.ts +2 -1
- package/declarations/components/eui-code-block.d.ts.map +1 -1
- package/declarations/components/eui-code.d.ts +2 -1
- package/declarations/components/eui-code.d.ts.map +1 -1
- package/declarations/components/eui-combo-box/options.d.ts +1 -1
- package/declarations/components/eui-combo-box/options.d.ts.map +1 -1
- package/declarations/components/eui-combo-box/trigger/input.d.ts +1 -1
- package/declarations/components/eui-combo-box/trigger/input.d.ts.map +1 -1
- package/declarations/components/eui-combo-box.d.ts +1 -0
- package/declarations/components/eui-combo-box.d.ts.map +1 -1
- package/declarations/components/eui-form-control-layout-custom-icon.d.ts +1 -1
- package/declarations/components/eui-global-toast-list.d.ts +2 -1
- package/declarations/components/eui-global-toast-list.d.ts.map +1 -1
- package/declarations/components/eui-hide-for.d.ts.map +1 -1
- package/declarations/components/eui-i18n.d.ts +1 -1
- package/declarations/components/eui-icon.d.ts +1 -0
- package/declarations/components/eui-icon.d.ts.map +1 -1
- package/declarations/components/eui-markdown-editor-toolbar.d.ts +1 -1
- package/declarations/components/eui-markdown-editor.d.ts +3 -2
- package/declarations/components/eui-markdown-editor.d.ts.map +1 -1
- package/declarations/components/eui-page-header-content.d.ts +1 -1
- package/declarations/components/eui-popover.d.ts +2 -1
- package/declarations/components/eui-popover.d.ts.map +1 -1
- package/declarations/components/eui-portal.d.ts +2 -1
- package/declarations/components/eui-portal.d.ts.map +1 -1
- package/declarations/components/eui-range-track.d.ts +1 -1
- package/declarations/components/eui-show-for.d.ts +1 -1
- package/declarations/components/eui-show-for.d.ts.map +1 -1
- package/declarations/components/eui-super-date-picker/date-popover/absolute-tab.d.ts +2 -1
- package/declarations/components/eui-super-date-picker/date-popover/absolute-tab.d.ts.map +1 -1
- package/declarations/components/eui-super-date-picker/date-popover/datetime-picker.d.ts +2 -1
- package/declarations/components/eui-super-date-picker/date-popover/datetime-picker.d.ts.map +1 -1
- package/declarations/components/eui-super-date-picker/date-popover/eui-date-popover-content.d.ts +1 -1
- package/declarations/components/eui-super-date-picker/date-popover/relative-tab.d.ts +2 -1
- package/declarations/components/eui-super-date-picker/date-popover/relative-tab.d.ts.map +1 -1
- package/declarations/components/eui-super-date-picker/eui-quick-select-popover/eui-quick-select.d.ts +2 -1
- package/declarations/components/eui-super-date-picker/eui-quick-select-popover/eui-quick-select.d.ts.map +1 -1
- package/declarations/components/eui-tabbed-content.d.ts +2 -1
- package/declarations/components/eui-tabbed-content.d.ts.map +1 -1
- package/declarations/components/eui-tool-tip-popover.d.ts +2 -1
- package/declarations/components/eui-tool-tip-popover.d.ts.map +1 -1
- package/declarations/components.d.ts +148 -148
- package/declarations/helpers/arg-or-default.d.ts +1 -1
- package/declarations/helpers/eui-page-restrict-width.d.ts +1 -1
- package/declarations/helpers/eui-palette.d.ts +1 -1
- package/declarations/helpers/get-range-tick.d.ts +2 -2
- package/declarations/helpers/hex-to-rgb.d.ts +1 -1
- package/declarations/helpers/is-color-dark.d.ts +1 -1
- package/declarations/helpers/is-item-open.d.ts +1 -1
- package/declarations/helpers/is-valid-hex.d.ts +1 -1
- package/declarations/helpers/nullish.d.ts +1 -1
- package/declarations/helpers/starts-with.d.ts +1 -1
- package/declarations/helpers/to-initials.d.ts +1 -1
- package/declarations/helpers/type-of.d.ts +3 -3
- package/declarations/helpers/type-of.d.ts.map +1 -1
- package/declarations/helpers/use-state.d.ts +1 -1
- package/declarations/modifiers/screen-reader-only.d.ts +1 -1
- package/declarations/modifiers/simple-style.d.ts +1 -1
- package/declarations/modifiers/validatable-control.d.ts +1 -1
- package/declarations/utils/markdown/markdown-modes.d.ts.map +1 -1
- package/dist/-private/random-id.js.map +1 -1
- package/dist/components/common.js.map +1 -1
- package/dist/components/eui-accordion.js +14 -14
- package/dist/components/eui-accordion.js.map +1 -1
- package/dist/components/eui-auto-sizer.js +31 -31
- package/dist/components/eui-auto-sizer.js.map +1 -1
- package/dist/components/eui-avatar.js +2 -2
- package/dist/components/eui-avatar.js.map +1 -1
- package/dist/components/eui-badge-group.js.map +1 -1
- package/dist/components/eui-badge.js +1 -1
- package/dist/components/eui-badge.js.map +1 -1
- package/dist/components/eui-beta-badge.js +1 -1
- package/dist/components/eui-beta-badge.js.map +1 -1
- package/dist/components/eui-bottom-bar.js +13 -13
- package/dist/components/eui-bottom-bar.js.map +1 -1
- package/dist/components/eui-breadcrumbs.js +40 -42
- package/dist/components/eui-breadcrumbs.js.map +1 -1
- package/dist/components/eui-button-content.js.map +1 -1
- package/dist/components/eui-button-empty.js +1 -1
- package/dist/components/eui-button-empty.js.map +1 -1
- package/dist/components/eui-button-group-button.js +1 -1
- package/dist/components/eui-button-group-button.js.map +1 -1
- package/dist/components/eui-button-group.js +1 -1
- package/dist/components/eui-button-group.js.map +1 -1
- package/dist/components/eui-button-icon.js +1 -1
- package/dist/components/eui-button-icon.js.map +1 -1
- package/dist/components/eui-button.js +2 -2
- package/dist/components/eui-button.js.map +1 -1
- package/dist/components/eui-call-out.js +1 -1
- package/dist/components/eui-call-out.js.map +1 -1
- package/dist/components/eui-card-select.js +8 -8
- package/dist/components/eui-card-select.js.map +1 -1
- package/dist/components/eui-card.js +6 -6
- package/dist/components/eui-card.js.map +1 -1
- package/dist/components/eui-checkable-card.js.map +1 -1
- package/dist/components/eui-checkbox-group.js +1 -1
- package/dist/components/eui-checkbox-group.js.map +1 -1
- package/dist/components/eui-checkbox.js +4 -4
- package/dist/components/eui-checkbox.js.map +1 -1
- package/dist/components/eui-code-block/controls.js.map +1 -1
- package/dist/components/eui-code-block/full-screen-display.js.map +1 -1
- package/dist/components/eui-code-block/virtualized.js +9 -9
- package/dist/components/eui-code-block/virtualized.js.map +1 -1
- package/dist/components/eui-code-block.js +71 -71
- package/dist/components/eui-code-block.js.map +1 -1
- package/dist/components/eui-code.js +16 -16
- package/dist/components/eui-code.js.map +1 -1
- package/dist/components/eui-collapsible-nav-group.js +1 -1
- package/dist/components/eui-collapsible-nav-group.js.map +1 -1
- package/dist/components/eui-collapsible-nav.js +21 -22
- package/dist/components/eui-collapsible-nav.js.map +1 -1
- package/dist/components/eui-combo-box/create-option.js +9 -9
- package/dist/components/eui-combo-box/create-option.js.map +1 -1
- package/dist/components/eui-combo-box/group.js.map +1 -1
- package/dist/components/eui-combo-box/no-matches-message.js.map +1 -1
- package/dist/components/eui-combo-box/options.js +16 -16
- package/dist/components/eui-combo-box/options.js.map +1 -1
- package/dist/components/eui-combo-box/search-message.js.map +1 -1
- package/dist/components/eui-combo-box/trigger/input.js +21 -22
- package/dist/components/eui-combo-box/trigger/input.js.map +1 -1
- package/dist/components/eui-combo-box/trigger.js +3 -3
- package/dist/components/eui-combo-box/trigger.js.map +1 -1
- package/dist/components/eui-combo-box-pill.js +1 -1
- package/dist/components/eui-combo-box-pill.js.map +1 -1
- package/dist/components/eui-combo-box.js +59 -60
- package/dist/components/eui-combo-box.js.map +1 -1
- package/dist/components/eui-comment-list.js.map +1 -1
- package/dist/components/eui-comment-timeline.js +1 -1
- package/dist/components/eui-comment-timeline.js.map +1 -1
- package/dist/components/eui-comment.js +1 -1
- package/dist/components/eui-comment.js.map +1 -1
- package/dist/components/eui-confirm-modal.js.map +1 -1
- package/dist/components/eui-context-menu-item.js +4 -4
- package/dist/components/eui-context-menu-item.js.map +1 -1
- package/dist/components/eui-context-menu-panel.js.map +1 -1
- package/dist/components/eui-copy.js +3 -3
- package/dist/components/eui-copy.js.map +1 -1
- package/dist/components/eui-described-form-group.js.map +1 -1
- package/dist/components/eui-description-list-description.js.map +1 -1
- package/dist/components/eui-description-list-title.js.map +1 -1
- package/dist/components/eui-description-list.js.map +1 -1
- package/dist/components/eui-dual-range.js +110 -110
- package/dist/components/eui-dual-range.js.map +1 -1
- package/dist/components/eui-empty-prompt.js +1 -1
- package/dist/components/eui-empty-prompt.js.map +1 -1
- package/dist/components/eui-field-number.js +1 -1
- package/dist/components/eui-field-number.js.map +1 -1
- package/dist/components/eui-field-password.js +1 -1
- package/dist/components/eui-field-password.js.map +1 -1
- package/dist/components/eui-field-search.js +26 -26
- package/dist/components/eui-field-search.js.map +1 -1
- package/dist/components/eui-field-text.js +1 -1
- package/dist/components/eui-field-text.js.map +1 -1
- package/dist/components/eui-file-picker.js +16 -16
- package/dist/components/eui-file-picker.js.map +1 -1
- package/dist/components/eui-flex-grid.js.map +1 -1
- package/dist/components/eui-flex-group.js.map +1 -1
- package/dist/components/eui-flex-item.js.map +1 -1
- package/dist/components/eui-flyout-body.js.map +1 -1
- package/dist/components/eui-flyout-footer.js.map +1 -1
- package/dist/components/eui-flyout-header.js.map +1 -1
- package/dist/components/eui-flyout.js +35 -36
- package/dist/components/eui-flyout.js.map +1 -1
- package/dist/components/eui-form-control-layout-clear-button.js.map +1 -1
- package/dist/components/eui-form-control-layout-custom-icon.js.map +1 -1
- package/dist/components/eui-form-control-layout-delimited.js +1 -1
- package/dist/components/eui-form-control-layout-delimited.js.map +1 -1
- package/dist/components/eui-form-control-layout-icons.js +1 -1
- package/dist/components/eui-form-control-layout-icons.js.map +1 -1
- package/dist/components/eui-form-control-layout.js +1 -1
- package/dist/components/eui-form-control-layout.js.map +1 -1
- package/dist/components/eui-form-error-text.js.map +1 -1
- package/dist/components/eui-form-fieldset.js.map +1 -1
- package/dist/components/eui-form-help-text.js.map +1 -1
- package/dist/components/eui-form-label.js.map +1 -1
- package/dist/components/eui-form-legend.js.map +1 -1
- package/dist/components/eui-form-row.js +4 -4
- package/dist/components/eui-form-row.js.map +1 -1
- package/dist/components/eui-form.js +1 -1
- package/dist/components/eui-form.js.map +1 -1
- package/dist/components/eui-global-toast-list.js +43 -43
- package/dist/components/eui-global-toast-list.js.map +1 -1
- package/dist/components/eui-header-alert.js.map +1 -1
- package/dist/components/eui-header-breadcrumbs.js.map +1 -1
- package/dist/components/eui-header-link.js.map +1 -1
- package/dist/components/eui-header-links.js +1 -1
- package/dist/components/eui-header-links.js.map +1 -1
- package/dist/components/eui-header-logo.js.map +1 -1
- package/dist/components/eui-header-section-item-button.js +6 -6
- package/dist/components/eui-header-section-item-button.js.map +1 -1
- package/dist/components/eui-header-section-item.js.map +1 -1
- package/dist/components/eui-header-section.js.map +1 -1
- package/dist/components/eui-header.js +2 -2
- package/dist/components/eui-header.js.map +1 -1
- package/dist/components/eui-health.js.map +1 -1
- package/dist/components/eui-hide-for.js.map +1 -1
- package/dist/components/eui-horizontal-rule.js.map +1 -1
- package/dist/components/eui-i18n/render.js.map +1 -1
- package/dist/components/eui-i18n.js +3 -3
- package/dist/components/eui-i18n.js.map +1 -1
- package/dist/components/eui-icon-tip.js.map +1 -1
- package/dist/components/eui-icon.js +43 -37
- package/dist/components/eui-icon.js.map +1 -1
- package/dist/components/eui-image.js +8 -8
- package/dist/components/eui-image.js.map +1 -1
- package/dist/components/eui-inner-text.js +11 -11
- package/dist/components/eui-inner-text.js.map +1 -1
- package/dist/components/eui-input-popover.js +32 -32
- package/dist/components/eui-input-popover.js.map +1 -1
- package/dist/components/eui-key-pad-menu-item.js +3 -3
- package/dist/components/eui-key-pad-menu-item.js.map +1 -1
- package/dist/components/eui-key-pad-menu.js.map +1 -1
- package/dist/components/eui-link.js +1 -1
- package/dist/components/eui-link.js.map +1 -1
- package/dist/components/eui-list-group-item.js +4 -1
- package/dist/components/eui-list-group-item.js.map +1 -1
- package/dist/components/eui-list-group.js +1 -1
- package/dist/components/eui-list-group.js.map +1 -1
- package/dist/components/eui-loading-content.js +1 -1
- package/dist/components/eui-loading-content.js.map +1 -1
- package/dist/components/eui-loading-logo.js.map +1 -1
- package/dist/components/eui-loading-spinner.js.map +1 -1
- package/dist/components/eui-markdown-editor-drop-zone.js.map +1 -1
- package/dist/components/eui-markdown-editor-footer/icons/markdown-logo.js.map +1 -1
- package/dist/components/eui-markdown-editor-footer.js +3 -3
- package/dist/components/eui-markdown-editor-footer.js.map +1 -1
- package/dist/components/eui-markdown-editor-text-area.js.map +1 -1
- package/dist/components/eui-markdown-editor-toolbar/icons/markdown-checkmark.js.map +1 -1
- package/dist/components/eui-markdown-editor-toolbar.js +9 -11
- package/dist/components/eui-markdown-editor-toolbar.js.map +1 -1
- package/dist/components/eui-markdown-editor.js +115 -117
- package/dist/components/eui-markdown-editor.js.map +1 -1
- package/dist/components/eui-markdown-format/markdown-checkbox.js +7 -7
- package/dist/components/eui-markdown-format/markdown-checkbox.js.map +1 -1
- package/dist/components/eui-markdown-format/markdown-code-block.js.map +1 -1
- package/dist/components/eui-markdown-format/markdown-code.js.map +1 -1
- package/dist/components/eui-markdown-format/markdown-tooltip.js.map +1 -1
- package/dist/components/eui-markdown-format.js +14 -16
- package/dist/components/eui-markdown-format.js.map +1 -1
- package/dist/components/eui-modal-body.js.map +1 -1
- package/dist/components/eui-modal-footer.js.map +1 -1
- package/dist/components/eui-modal-header-title.js.map +1 -1
- package/dist/components/eui-modal-header.js.map +1 -1
- package/dist/components/eui-modal.js +1 -1
- package/dist/components/eui-modal.js.map +1 -1
- package/dist/components/eui-notification-badge.js.map +1 -1
- package/dist/components/eui-notification-event-messages.js.map +1 -1
- package/dist/components/eui-notification-event-meta.js +1 -1
- package/dist/components/eui-notification-event-meta.js.map +1 -1
- package/dist/components/eui-notification-event-read-button.js.map +1 -1
- package/dist/components/eui-notification-event-read-icon.js.map +1 -1
- package/dist/components/eui-notification-event.js +1 -1
- package/dist/components/eui-notification-event.js.map +1 -1
- package/dist/components/eui-overlay-mask.js +6 -6
- package/dist/components/eui-overlay-mask.js.map +1 -1
- package/dist/components/eui-page-body.js.map +1 -1
- package/dist/components/eui-page-content-body.js.map +1 -1
- package/dist/components/eui-page-content-header-section.js.map +1 -1
- package/dist/components/eui-page-content-header.js.map +1 -1
- package/dist/components/eui-page-content.js.map +1 -1
- package/dist/components/eui-page-header-content.js +4 -4
- package/dist/components/eui-page-header-content.js.map +1 -1
- package/dist/components/eui-page-header-section.js.map +1 -1
- package/dist/components/eui-page-header.js +1 -1
- package/dist/components/eui-page-header.js.map +1 -1
- package/dist/components/eui-page-side-bar.js.map +1 -1
- package/dist/components/eui-page-template.js +12 -12
- package/dist/components/eui-page-template.js.map +1 -1
- package/dist/components/eui-page.js.map +1 -1
- package/dist/components/eui-pagination/button-wrapper.js.map +1 -1
- package/dist/components/eui-pagination/next-button.js +1 -1
- package/dist/components/eui-pagination/next-button.js.map +1 -1
- package/dist/components/eui-pagination/previous-button.js +1 -1
- package/dist/components/eui-pagination/previous-button.js.map +1 -1
- package/dist/components/eui-pagination-button.js.map +1 -1
- package/dist/components/eui-pagination.js +39 -39
- package/dist/components/eui-pagination.js.map +1 -1
- package/dist/components/eui-panel.js +1 -1
- package/dist/components/eui-panel.js.map +1 -1
- package/dist/components/eui-popover-footer.js.map +1 -1
- package/dist/components/eui-popover-title.js.map +1 -1
- package/dist/components/eui-popover.js +126 -126
- package/dist/components/eui-popover.js.map +1 -1
- package/dist/components/eui-portal.js +8 -8
- package/dist/components/eui-portal.js.map +1 -1
- package/dist/components/eui-progress.js +1 -1
- package/dist/components/eui-progress.js.map +1 -1
- package/dist/components/eui-radio-group.js +2 -2
- package/dist/components/eui-radio-group.js.map +1 -1
- package/dist/components/eui-radio.js +1 -1
- package/dist/components/eui-radio.js.map +1 -1
- package/dist/components/eui-range-highlight.js.map +1 -1
- package/dist/components/eui-range-input.js +1 -1
- package/dist/components/eui-range-input.js.map +1 -1
- package/dist/components/eui-range-label.js.map +1 -1
- package/dist/components/eui-range-levels.js +7 -7
- package/dist/components/eui-range-levels.js.map +1 -1
- package/dist/components/eui-range-slider.js.map +1 -1
- package/dist/components/eui-range-thumb.js.map +1 -1
- package/dist/components/eui-range-ticks.js +6 -6
- package/dist/components/eui-range-ticks.js.map +1 -1
- package/dist/components/eui-range-tooltip.js +20 -20
- package/dist/components/eui-range-tooltip.js.map +1 -1
- package/dist/components/eui-range-track.js +49 -49
- package/dist/components/eui-range-track.js.map +1 -1
- package/dist/components/eui-range-wrapper.js.map +1 -1
- package/dist/components/eui-range.js +26 -26
- package/dist/components/eui-range.js.map +1 -1
- package/dist/components/eui-select.js +1 -1
- package/dist/components/eui-select.js.map +1 -1
- package/dist/components/eui-selectable-list-item.js +1 -1
- package/dist/components/eui-selectable-list-item.js.map +1 -1
- package/dist/components/eui-show-for.js +8 -8
- package/dist/components/eui-show-for.js.map +1 -1
- package/dist/components/eui-side-nav-item/button.js.map +1 -1
- package/dist/components/eui-side-nav-item.js +1 -1
- package/dist/components/eui-side-nav-item.js.map +1 -1
- package/dist/components/eui-side-nav.js +4 -4
- package/dist/components/eui-side-nav.js.map +1 -1
- package/dist/components/eui-spacer.js.map +1 -1
- package/dist/components/eui-split-panel/inner.js.map +1 -1
- package/dist/components/eui-split-panel/outer.js +1 -1
- package/dist/components/eui-split-panel/outer.js.map +1 -1
- package/dist/components/eui-stat/description.js +1 -0
- package/dist/components/eui-stat/description.js.map +1 -1
- package/dist/components/eui-stat/title.js.map +1 -1
- package/dist/components/eui-stat.js +5 -5
- package/dist/components/eui-stat.js.map +1 -1
- package/dist/components/eui-step-horizontal.js.map +1 -1
- package/dist/components/eui-step-number.js +1 -1
- package/dist/components/eui-step-number.js.map +1 -1
- package/dist/components/eui-step.js.map +1 -1
- package/dist/components/eui-steps-horizontal.js.map +1 -1
- package/dist/components/eui-steps.js.map +1 -1
- package/dist/components/eui-sub-steps.js.map +1 -1
- package/dist/components/eui-super-date-picker/date-popover/absolute-tab.js +27 -27
- package/dist/components/eui-super-date-picker/date-popover/absolute-tab.js.map +1 -1
- package/dist/components/eui-super-date-picker/date-popover/datetime-picker.js +73 -73
- package/dist/components/eui-super-date-picker/date-popover/datetime-picker.js.map +1 -1
- package/dist/components/eui-super-date-picker/date-popover/eui-date-popover-button.js +6 -6
- package/dist/components/eui-super-date-picker/date-popover/eui-date-popover-button.js.map +1 -1
- package/dist/components/eui-super-date-picker/date-popover/eui-date-popover-content.js +5 -5
- package/dist/components/eui-super-date-picker/date-popover/eui-date-popover-content.js.map +1 -1
- package/dist/components/eui-super-date-picker/date-popover/now-tab.js.map +1 -1
- package/dist/components/eui-super-date-picker/date-popover/relative-tab.js +27 -27
- package/dist/components/eui-super-date-picker/date-popover/relative-tab.js.map +1 -1
- package/dist/components/eui-super-date-picker/eui-date-picker-range.js.map +1 -1
- package/dist/components/eui-super-date-picker/eui-quick-select-popover/eui-commonly-used-time-ranges.js +1 -1
- package/dist/components/eui-super-date-picker/eui-quick-select-popover/eui-commonly-used-time-ranges.js.map +1 -1
- package/dist/components/eui-super-date-picker/eui-quick-select-popover/eui-quick-select.js +25 -25
- package/dist/components/eui-super-date-picker/eui-quick-select-popover/eui-quick-select.js.map +1 -1
- package/dist/components/eui-super-date-picker/eui-quick-select-popover/eui-recently-used.js +1 -1
- package/dist/components/eui-super-date-picker/eui-quick-select-popover/eui-recently-used.js.map +1 -1
- package/dist/components/eui-super-date-picker/eui-quick-select-popover.js +9 -9
- package/dist/components/eui-super-date-picker/eui-quick-select-popover.js.map +1 -1
- package/dist/components/eui-super-date-picker/eui-super-update-button.js.map +1 -1
- package/dist/components/eui-super-date-picker/utils/date-utils.js.map +1 -1
- package/dist/components/eui-super-date-picker/utils/index.js.map +1 -1
- package/dist/components/eui-super-date-picker/utils/pretty-duration.js.map +1 -1
- package/dist/components/eui-super-date-picker/utils/quick-select.js +1 -1
- package/dist/components/eui-super-date-picker/utils/quick-select.js.map +1 -1
- package/dist/components/eui-super-date-picker/utils/time-options.js.map +1 -1
- package/dist/components/eui-super-date-picker.js +34 -34
- package/dist/components/eui-super-date-picker.js.map +1 -1
- package/dist/components/eui-switch.js +4 -4
- package/dist/components/eui-switch.js.map +1 -1
- package/dist/components/eui-tab.js +1 -1
- package/dist/components/eui-tab.js.map +1 -1
- package/dist/components/eui-tabbed-content.js +31 -31
- package/dist/components/eui-tabbed-content.js.map +1 -1
- package/dist/components/eui-tabs.js.map +1 -1
- package/dist/components/eui-text-align.js.map +1 -1
- package/dist/components/eui-text-area.js.map +1 -1
- package/dist/components/eui-text-color.js.map +1 -1
- package/dist/components/eui-text.js +1 -1
- package/dist/components/eui-text.js.map +1 -1
- package/dist/components/eui-title.js.map +1 -1
- package/dist/components/eui-toast.js.map +1 -1
- package/dist/components/eui-tool-tip-popover.js +5 -5
- package/dist/components/eui-tool-tip-popover.js.map +1 -1
- package/dist/components/eui-tool-tip.js +44 -46
- package/dist/components/eui-tool-tip.js.map +1 -1
- package/dist/components/text-block.js.map +1 -1
- package/dist/helpers/arg-or-default.js.map +1 -1
- package/dist/helpers/cast-to.js.map +1 -1
- package/dist/helpers/class-names.js.map +1 -1
- package/dist/helpers/eui-page-restrict-width.js.map +1 -1
- package/dist/helpers/eui-palette.js +1 -1
- package/dist/helpers/eui-palette.js.map +1 -1
- package/dist/helpers/get-eui-config.js +1 -1
- package/dist/helpers/get-eui-config.js.map +1 -1
- package/dist/helpers/get-range-tick.js.map +1 -1
- package/dist/helpers/hex-to-rgb.js.map +1 -1
- package/dist/helpers/inline-styles.js.map +1 -1
- package/dist/helpers/is-color-dark.js.map +1 -1
- package/dist/helpers/is-item-open.js.map +1 -1
- package/dist/helpers/is-valid-hex.js.map +1 -1
- package/dist/helpers/is-within-number.js.map +1 -1
- package/dist/helpers/merge.js.map +1 -1
- package/dist/helpers/nullish.js.map +1 -1
- package/dist/helpers/starts-with.js.map +1 -1
- package/dist/helpers/to-initials.js.map +1 -1
- package/dist/helpers/type-of.js.map +1 -1
- package/dist/helpers/use-state.js +1 -1
- package/dist/helpers/use-state.js.map +1 -1
- package/dist/i18n/util.js.map +1 -1
- package/dist/modifiers/mutation-observer.js.map +1 -1
- package/dist/modifiers/outside-click-detector.js +4 -0
- package/dist/modifiers/outside-click-detector.js.map +1 -1
- package/dist/modifiers/resize-observer.js +3 -0
- package/dist/modifiers/resize-observer.js.map +1 -1
- package/dist/modifiers/screen-reader-only.js.map +1 -1
- package/dist/modifiers/simple-style.js.map +1 -1
- package/dist/modifiers/use-is-within-breakpoints.js.map +1 -1
- package/dist/modifiers/validatable-control.js.map +1 -1
- package/dist/services/eui-config.js +1 -1
- package/dist/services/eui-config.js.map +1 -1
- package/dist/services/eui-i18n.js.map +1 -1
- package/dist/services/eui-toaster.js +1 -1
- package/dist/services/eui-toaster.js.map +1 -1
- package/dist/utils/accesibility/accessible-click-keys.js +1 -1
- package/dist/utils/accesibility/accessible-click-keys.js.map +1 -1
- package/dist/utils/accesibility/cascading-menu-keys.js +1 -1
- package/dist/utils/accesibility/cascading-menu-keys.js.map +1 -1
- package/dist/utils/accesibility/combo-box-keys.js +1 -1
- package/dist/utils/accesibility/combo-box-keys.js.map +1 -1
- package/dist/utils/breakpoint.js.map +1 -1
- package/dist/utils/browser/browser.js.map +1 -1
- package/dist/utils/code/utils.js.map +1 -1
- package/dist/utils/color/color_palette.js.map +1 -1
- package/dist/utils/color/eui_palettes.js.map +1 -1
- package/dist/utils/copy-to-clipboard.js.map +1 -1
- package/dist/utils/css-mappings/eui-accordion.js.map +1 -1
- package/dist/utils/css-mappings/eui-avatar.js +1 -1
- package/dist/utils/css-mappings/eui-avatar.js.map +1 -1
- package/dist/utils/css-mappings/eui-badge-group.js.map +1 -1
- package/dist/utils/css-mappings/eui-badge.js.map +1 -1
- package/dist/utils/css-mappings/eui-beta-badge.js.map +1 -1
- package/dist/utils/css-mappings/eui-bottom-bar.js.map +1 -1
- package/dist/utils/css-mappings/eui-button-empty.js.map +1 -1
- package/dist/utils/css-mappings/eui-button-group-button.js.map +1 -1
- package/dist/utils/css-mappings/eui-button-group.js.map +1 -1
- package/dist/utils/css-mappings/eui-button-icon.js.map +1 -1
- package/dist/utils/css-mappings/eui-button.js.map +1 -1
- package/dist/utils/css-mappings/eui-call-out.js.map +1 -1
- package/dist/utils/css-mappings/eui-card-select.js.map +1 -1
- package/dist/utils/css-mappings/eui-card.js.map +1 -1
- package/dist/utils/css-mappings/eui-code-block.js.map +1 -1
- package/dist/utils/css-mappings/eui-collapsible-nav-group.js.map +1 -1
- package/dist/utils/css-mappings/eui-comment-event.js.map +1 -1
- package/dist/utils/css-mappings/eui-comment-timeline-icon.js.map +1 -1
- package/dist/utils/css-mappings/eui-context-menu-item.js.map +1 -1
- package/dist/utils/css-mappings/eui-described-form-group.js.map +1 -1
- package/dist/utils/css-mappings/eui-description-list.js.map +1 -1
- package/dist/utils/css-mappings/eui-empty-prompt.js.map +1 -1
- package/dist/utils/css-mappings/eui-file-picker.js.map +1 -1
- package/dist/utils/css-mappings/eui-flex-grid.js.map +1 -1
- package/dist/utils/css-mappings/eui-flex-group.js.map +1 -1
- package/dist/utils/css-mappings/eui-flex-item.js.map +1 -1
- package/dist/utils/css-mappings/eui-flyout.js.map +1 -1
- package/dist/utils/css-mappings/eui-form-control-layout-clear-button.js.map +1 -1
- package/dist/utils/css-mappings/eui-form-row.js.map +1 -1
- package/dist/utils/css-mappings/eui-global-toast-list.js.map +1 -1
- package/dist/utils/css-mappings/eui-header-links.js.map +1 -1
- package/dist/utils/css-mappings/eui-header-section-item.js.map +1 -1
- package/dist/utils/css-mappings/eui-header-section.js.map +1 -1
- package/dist/utils/css-mappings/eui-header.js.map +1 -1
- package/dist/utils/css-mappings/eui-health.js.map +1 -1
- package/dist/utils/css-mappings/eui-horizontal-rule.js.map +1 -1
- package/dist/utils/css-mappings/eui-icon.js.map +1 -1
- package/dist/utils/css-mappings/eui-image.js.map +1 -1
- package/dist/utils/css-mappings/eui-link.js.map +1 -1
- package/dist/utils/css-mappings/eui-list-group-item.js.map +1 -1
- package/dist/utils/css-mappings/eui-list-group.js.map +1 -1
- package/dist/utils/css-mappings/eui-loading-spinner.js.map +1 -1
- package/dist/utils/css-mappings/eui-modal.js.map +1 -1
- package/dist/utils/css-mappings/eui-notification-badge.js.map +1 -1
- package/dist/utils/css-mappings/eui-page-body.js.map +1 -1
- package/dist/utils/css-mappings/eui-page-content-body.js.map +1 -1
- package/dist/utils/css-mappings/eui-page-content.js.map +1 -1
- package/dist/utils/css-mappings/eui-page-header.js.map +1 -1
- package/dist/utils/css-mappings/eui-page-side-bar.js.map +1 -1
- package/dist/utils/css-mappings/eui-page.js.map +1 -1
- package/dist/utils/css-mappings/eui-panel.js.map +1 -1
- package/dist/utils/css-mappings/eui-popover-footer.js.map +1 -1
- package/dist/utils/css-mappings/eui-popover-title.js.map +1 -1
- package/dist/utils/css-mappings/eui-popover.js.map +1 -1
- package/dist/utils/css-mappings/eui-progress-data.js.map +1 -1
- package/dist/utils/css-mappings/eui-progress.js.map +1 -1
- package/dist/utils/css-mappings/eui-range-highlight.js.map +1 -1
- package/dist/utils/css-mappings/eui-range-input.js.map +1 -1
- package/dist/utils/css-mappings/eui-range-levels.js.map +1 -1
- package/dist/utils/css-mappings/eui-selectable-list-item.js.map +1 -1
- package/dist/utils/css-mappings/eui-spacer.js.map +1 -1
- package/dist/utils/css-mappings/eui-stat.js.map +1 -1
- package/dist/utils/css-mappings/eui-step-number.js.map +1 -1
- package/dist/utils/css-mappings/eui-tabs.js.map +1 -1
- package/dist/utils/css-mappings/eui-text-align.js.map +1 -1
- package/dist/utils/css-mappings/eui-text-area.js.map +1 -1
- package/dist/utils/css-mappings/eui-text-color.js.map +1 -1
- package/dist/utils/css-mappings/eui-text.js.map +1 -1
- package/dist/utils/css-mappings/eui-title.js.map +1 -1
- package/dist/utils/css-mappings/eui-toast.js.map +1 -1
- package/dist/utils/css-mappings/eui-tool-tip.js.map +1 -1
- package/dist/utils/css-mappings/index.js +140 -140
- package/dist/utils/css-mappings/index.js.map +1 -1
- package/dist/utils/detect-element-resize.js.map +1 -1
- package/dist/utils/keys.js.map +1 -1
- package/dist/utils/markdown/markdown-actions.js +1 -0
- package/dist/utils/markdown/markdown-actions.js.map +1 -1
- package/dist/utils/markdown/markdown-modes.js.map +1 -1
- package/dist/utils/markdown/markdown-types.js.map +1 -1
- package/dist/utils/markdown/plugins/markdown-add-components/processor.js.map +1 -1
- package/dist/utils/markdown/plugins/markdown-checkbox/parser.js.map +1 -1
- package/dist/utils/markdown/plugins/markdown-default-plugins/parsing-plugins.js.map +1 -1
- package/dist/utils/markdown/plugins/markdown-default-plugins/plugins.js.map +1 -1
- package/dist/utils/markdown/plugins/markdown-default-plugins/processing-plugins.js.map +1 -1
- package/dist/utils/markdown/plugins/markdown-default-plugins/ui-plugins.js.map +1 -1
- package/dist/utils/markdown/plugins/markdown-tooltip/parser.js.map +1 -1
- package/dist/utils/markdown/plugins/markdown-tooltip/plugin.js.map +1 -1
- package/dist/utils/markdown/plugins/to-dom.js.map +1 -1
- package/dist/utils/markdown/remark/remark-prismjs.js.map +1 -1
- package/dist/utils/maybe-unwrap-proxy.js.map +1 -1
- package/dist/utils/number/number.js.map +1 -1
- package/dist/utils/popover/index.js +1 -4
- package/dist/utils/popover/index.js.map +1 -1
- package/dist/utils/predicate/common_predicates.js.map +1 -1
- package/dist/utils/predicate/lodash_predicates.js.map +1 -1
- package/dist/utils/timer.js +4 -1
- package/dist/utils/timer.js.map +1 -1
- package/dist/utils/transition.js.map +1 -1
- package/package.json +63 -46
- package/declarations/modifiers/open-collapsible-nav.d.ts +0 -9
- package/declarations/modifiers/open-collapsible-nav.d.ts.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
import { tracked } from '@glimmer/tracking';
|
|
3
3
|
import { assert } from '@ember/debug';
|
|
4
|
-
import {
|
|
4
|
+
import { hash, concat } from '@ember/helper';
|
|
5
5
|
import { action } from '@ember/object';
|
|
6
6
|
import didInsert from '@ember/render-modifiers/modifiers/did-insert';
|
|
7
7
|
import didUpdate from '@ember/render-modifiers/modifiers/did-update';
|
|
@@ -10,7 +10,7 @@ import { htmlSafe } from '@ember/template';
|
|
|
10
10
|
import optional from 'ember-composable-helpers/helpers/optional';
|
|
11
11
|
import { focusTrap } from 'ember-focus-trap';
|
|
12
12
|
import onKey from 'ember-keyboard/modifiers/on-key';
|
|
13
|
-
import {
|
|
13
|
+
import { and, not, or } from 'ember-truth-helpers';
|
|
14
14
|
import { tabbable } from 'tabbable';
|
|
15
15
|
import randomId from '../-private/random-id.js';
|
|
16
16
|
import { argOrDefaultDecorator } from '../helpers/arg-or-default.js';
|
|
@@ -36,31 +36,31 @@ const anchorPositionToPopoverPositionMap = {
|
|
|
36
36
|
down: 'bottom',
|
|
37
37
|
left: 'left'
|
|
38
38
|
};
|
|
39
|
-
function getPopoverPositionFromAnchorPosition(
|
|
39
|
+
function getPopoverPositionFromAnchorPosition(anchorPosition) {
|
|
40
40
|
// maps the anchor position to the matching popover position
|
|
41
41
|
// e.g. "upLeft" -> "top", "downRight" -> "bottom"
|
|
42
42
|
// extract the first positional word from anchorPosition:
|
|
43
43
|
// starts at the beginning (" ^ ") of anchorPosition and
|
|
44
44
|
// captures all of the characters (" (.*?) ") until the
|
|
45
45
|
// first capital letter (" [A-Z] ") is encountered
|
|
46
|
-
const
|
|
47
|
-
if (
|
|
48
|
-
return anchorPositionToPopoverPositionMap[
|
|
46
|
+
const match = anchorPosition.match(/^(.*?)[A-Z]/);
|
|
47
|
+
if (match?.length && match.length > 1) {
|
|
48
|
+
return anchorPositionToPopoverPositionMap[match[1]];
|
|
49
49
|
}
|
|
50
50
|
return anchorPositionToPopoverPositionMap['up'];
|
|
51
51
|
}
|
|
52
|
-
function getPopoverAlignFromAnchorPosition(
|
|
52
|
+
function getPopoverAlignFromAnchorPosition(anchorPosition) {
|
|
53
53
|
// maps the gravity to the matching popover position
|
|
54
54
|
// e.g. "upLeft" -> "left", "rightDown" -> "bottom"
|
|
55
55
|
// extract the second positional word from anchorPosition:
|
|
56
56
|
// starts a capture group at the first capital letter
|
|
57
57
|
// and includes everything after it
|
|
58
|
-
const
|
|
58
|
+
const match = anchorPosition.match(/([A-Z].*)/);
|
|
59
59
|
// this performs two tasks:
|
|
60
60
|
// 1. normalizes the align position by lowercasing it
|
|
61
61
|
// 2. `center` doesn't exist in the lookup map which converts it to `undefined` meaning no align
|
|
62
|
-
if (
|
|
63
|
-
return anchorPositionToPopoverPositionMap[
|
|
62
|
+
if (match?.length && match.length > 1) {
|
|
63
|
+
return anchorPositionToPopoverPositionMap[match[1]?.toLowerCase()];
|
|
64
64
|
}
|
|
65
65
|
return anchorPositionToPopoverPositionMap['left'];
|
|
66
66
|
}
|
|
@@ -70,109 +70,109 @@ const DEFAULT_POPOVER_STYLES = {
|
|
|
70
70
|
top: 50,
|
|
71
71
|
left: 50
|
|
72
72
|
};
|
|
73
|
-
function getElementFromInitialFocus(
|
|
74
|
-
const
|
|
75
|
-
if (
|
|
76
|
-
return document.querySelector(
|
|
73
|
+
function getElementFromInitialFocus(initialFocus) {
|
|
74
|
+
const initialFocusType = typeof initialFocus;
|
|
75
|
+
if (initialFocusType === 'string') {
|
|
76
|
+
return document.querySelector(initialFocus);
|
|
77
77
|
}
|
|
78
|
-
if (
|
|
79
|
-
return
|
|
78
|
+
if (initialFocusType === 'function') {
|
|
79
|
+
return initialFocus();
|
|
80
80
|
}
|
|
81
|
-
return
|
|
81
|
+
return initialFocus;
|
|
82
82
|
}
|
|
83
83
|
class EuiPopoverComponent extends Component {
|
|
84
84
|
static {
|
|
85
85
|
g(this.prototype, "isOpen", [argOrDefaultDecorator(false)]);
|
|
86
86
|
}
|
|
87
|
-
#isOpen = (i(this, "isOpen"),
|
|
87
|
+
#isOpen = (i(this, "isOpen"), undefined); // Defaults
|
|
88
88
|
static {
|
|
89
89
|
g(this.prototype, "ownFocus", [argOrDefaultDecorator(true)]);
|
|
90
90
|
}
|
|
91
|
-
#ownFocus = (i(this, "ownFocus"),
|
|
91
|
+
#ownFocus = (i(this, "ownFocus"), undefined);
|
|
92
92
|
static {
|
|
93
93
|
g(this.prototype, "anchorPosition", [argOrDefaultDecorator('downCenter')]);
|
|
94
94
|
}
|
|
95
|
-
#anchorPosition = (i(this, "anchorPosition"),
|
|
95
|
+
#anchorPosition = (i(this, "anchorPosition"), undefined);
|
|
96
96
|
static {
|
|
97
97
|
g(this.prototype, "panelPaddingSize", [argOrDefaultDecorator('m')]);
|
|
98
98
|
}
|
|
99
|
-
#panelPaddingSize = (i(this, "panelPaddingSize"),
|
|
99
|
+
#panelPaddingSize = (i(this, "panelPaddingSize"), undefined);
|
|
100
100
|
static {
|
|
101
101
|
g(this.prototype, "hasArrow", [argOrDefaultDecorator(true)]);
|
|
102
102
|
}
|
|
103
|
-
#hasArrow = (i(this, "hasArrow"),
|
|
103
|
+
#hasArrow = (i(this, "hasArrow"), undefined);
|
|
104
104
|
static {
|
|
105
105
|
g(this.prototype, "display", [argOrDefaultDecorator('inlineBlock')]);
|
|
106
106
|
}
|
|
107
|
-
#display = (i(this, "display"),
|
|
107
|
+
#display = (i(this, "display"), undefined);
|
|
108
108
|
static {
|
|
109
109
|
g(this.prototype, "shouldSelfFocus", [argOrDefaultDecorator(true)]);
|
|
110
110
|
}
|
|
111
|
-
#shouldSelfFocus = (i(this, "shouldSelfFocus"),
|
|
111
|
+
#shouldSelfFocus = (i(this, "shouldSelfFocus"), undefined);
|
|
112
112
|
static {
|
|
113
113
|
g(this.prototype, "isFocusTrapPaused", [argOrDefaultDecorator(false)]);
|
|
114
114
|
}
|
|
115
|
-
#isFocusTrapPaused = (i(this, "isFocusTrapPaused"),
|
|
115
|
+
#isFocusTrapPaused = (i(this, "isFocusTrapPaused"), undefined);
|
|
116
116
|
static {
|
|
117
117
|
g(this.prototype, "prevIsOpen", [tracked]);
|
|
118
118
|
}
|
|
119
|
-
#prevIsOpen = (i(this, "prevIsOpen"),
|
|
119
|
+
#prevIsOpen = (i(this, "prevIsOpen"), undefined); //State
|
|
120
120
|
static {
|
|
121
121
|
g(this.prototype, "suppressingPopover", [tracked]);
|
|
122
122
|
}
|
|
123
|
-
#suppressingPopover = (i(this, "suppressingPopover"),
|
|
123
|
+
#suppressingPopover = (i(this, "suppressingPopover"), undefined);
|
|
124
124
|
static {
|
|
125
125
|
g(this.prototype, "isClosing", [tracked], function () {
|
|
126
126
|
return false;
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
|
-
#isClosing = (i(this, "isClosing"),
|
|
129
|
+
#isClosing = (i(this, "isClosing"), undefined);
|
|
130
130
|
static {
|
|
131
131
|
g(this.prototype, "isOpening", [tracked], function () {
|
|
132
132
|
return false;
|
|
133
133
|
});
|
|
134
134
|
}
|
|
135
|
-
#isOpening = (i(this, "isOpening"),
|
|
135
|
+
#isOpening = (i(this, "isOpening"), undefined);
|
|
136
136
|
static {
|
|
137
137
|
g(this.prototype, "popoverStyles", [tracked], function () {
|
|
138
138
|
return {};
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
|
-
#popoverStyles = (i(this, "popoverStyles"),
|
|
141
|
+
#popoverStyles = (i(this, "popoverStyles"), undefined);
|
|
142
142
|
static {
|
|
143
143
|
g(this.prototype, "arrowStyles", [tracked], function () {
|
|
144
144
|
return {};
|
|
145
145
|
});
|
|
146
146
|
}
|
|
147
|
-
#arrowStyles = (i(this, "arrowStyles"),
|
|
147
|
+
#arrowStyles = (i(this, "arrowStyles"), undefined);
|
|
148
148
|
static {
|
|
149
149
|
g(this.prototype, "arrowPosition", [tracked], function () {
|
|
150
150
|
return null;
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
|
-
#arrowPosition = (i(this, "arrowPosition"),
|
|
153
|
+
#arrowPosition = (i(this, "arrowPosition"), undefined);
|
|
154
154
|
static {
|
|
155
155
|
g(this.prototype, "openPosition", [tracked], function () {
|
|
156
156
|
return null;
|
|
157
157
|
});
|
|
158
158
|
}
|
|
159
|
-
#openPosition = (i(this, "openPosition"),
|
|
159
|
+
#openPosition = (i(this, "openPosition"), undefined);
|
|
160
160
|
static {
|
|
161
161
|
g(this.prototype, "isOpenStable", [tracked], function () {
|
|
162
162
|
return false;
|
|
163
163
|
});
|
|
164
164
|
}
|
|
165
|
-
#isOpenStable = (i(this, "isOpenStable"),
|
|
165
|
+
#isOpenStable = (i(this, "isOpenStable"), undefined);
|
|
166
166
|
static {
|
|
167
167
|
g(this.prototype, "isCurrentlyOpen", [tracked]);
|
|
168
168
|
}
|
|
169
|
-
#isCurrentlyOpen = (i(this, "isCurrentlyOpen"),
|
|
169
|
+
#isCurrentlyOpen = (i(this, "isCurrentlyOpen"), undefined);
|
|
170
170
|
static {
|
|
171
171
|
g(this.prototype, "popoverHost", [tracked], function () {
|
|
172
172
|
return null;
|
|
173
173
|
});
|
|
174
174
|
}
|
|
175
|
-
#popoverHost = (i(this, "popoverHost"),
|
|
175
|
+
#popoverHost = (i(this, "popoverHost"), undefined);
|
|
176
176
|
///
|
|
177
177
|
respositionTimeout = null;
|
|
178
178
|
closingTransitionTimeout = null;
|
|
@@ -184,15 +184,15 @@ class EuiPopoverComponent extends Component {
|
|
|
184
184
|
return null;
|
|
185
185
|
});
|
|
186
186
|
}
|
|
187
|
-
#button = (i(this, "button"),
|
|
187
|
+
#button = (i(this, "button"), undefined);
|
|
188
188
|
static {
|
|
189
189
|
g(this.prototype, "panel", [tracked], function () {
|
|
190
190
|
return null;
|
|
191
191
|
});
|
|
192
192
|
}
|
|
193
|
-
#panel = (i(this, "panel"),
|
|
194
|
-
constructor(
|
|
195
|
-
super(
|
|
193
|
+
#panel = (i(this, "panel"), undefined);
|
|
194
|
+
constructor(owner, args) {
|
|
195
|
+
super(owner, args);
|
|
196
196
|
assert(`Must provide closePopover function`, this.args.closePopover);
|
|
197
197
|
this.prevIsOpen = this.isOpen;
|
|
198
198
|
this.suppressingPopover = this.isOpen;
|
|
@@ -220,33 +220,33 @@ class EuiPopoverComponent extends Component {
|
|
|
220
220
|
static {
|
|
221
221
|
n(this.prototype, "closePopover", [action]);
|
|
222
222
|
}
|
|
223
|
-
onEscapeKey(
|
|
223
|
+
onEscapeKey(event, ekEvent) {
|
|
224
224
|
if (this.isOpen) {
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
225
|
+
ekEvent?.stopPropagation();
|
|
226
|
+
ekEvent?.stopImmediatePropagation();
|
|
227
|
+
event.preventDefault();
|
|
228
|
+
event.stopPropagation();
|
|
229
229
|
this.closePopover();
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
232
|
static {
|
|
233
233
|
n(this.prototype, "onEscapeKey", [action]);
|
|
234
234
|
}
|
|
235
|
-
onKeyDown(
|
|
236
|
-
if (
|
|
237
|
-
this.onEscapeKey(
|
|
235
|
+
onKeyDown(event, ekEvent) {
|
|
236
|
+
if (event.key === cascadingMenuKeys.ESCAPE) {
|
|
237
|
+
this.onEscapeKey(event, ekEvent);
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
240
|
static {
|
|
241
241
|
n(this.prototype, "onKeyDown", [action]);
|
|
242
242
|
}
|
|
243
|
-
onClickOutside(
|
|
243
|
+
onClickOutside(event) {
|
|
244
244
|
if (this.args.focusTrapOptions?.onClickOutside) {
|
|
245
|
-
this.args.focusTrapOptions.onClickOutside(
|
|
245
|
+
this.args.focusTrapOptions.onClickOutside(event);
|
|
246
246
|
} else {
|
|
247
247
|
// only close the popover if the event source isn't the anchor button
|
|
248
248
|
// otherwise, it is up to the anchor to toggle the popover's open status
|
|
249
|
-
if (this.button && this.button.contains(
|
|
249
|
+
if (this.button && this.button.contains(event.target) === false) {
|
|
250
250
|
this.closePopover();
|
|
251
251
|
}
|
|
252
252
|
}
|
|
@@ -265,41 +265,41 @@ class EuiPopoverComponent extends Component {
|
|
|
265
265
|
return;
|
|
266
266
|
}
|
|
267
267
|
// Otherwise let's focus the first tabbable item and expedite input from the user.
|
|
268
|
-
let
|
|
268
|
+
let focusTarget;
|
|
269
269
|
if (this.args.initialFocus != null) {
|
|
270
|
-
|
|
270
|
+
focusTarget = getElementFromInitialFocus(this.args.initialFocus);
|
|
271
271
|
} else {
|
|
272
|
-
const
|
|
273
|
-
if (
|
|
274
|
-
|
|
272
|
+
const tabbableItems = tabbable(this.panel);
|
|
273
|
+
if (tabbableItems.length) {
|
|
274
|
+
focusTarget = tabbableItems[0];
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
277
|
// there's a race condition between the popover content becoming visible and this function call
|
|
278
278
|
// if the element isn't visible yet (due to css styling) then it can't accept focus
|
|
279
279
|
// so wait for another render and try again
|
|
280
|
-
if (
|
|
280
|
+
if (focusTarget == null) {
|
|
281
281
|
// there isn't a focus target, one of two reasons:
|
|
282
282
|
// #1 is the whole panel hidden? If so, schedule another check
|
|
283
283
|
// #2 panel is visible but no tabbables exist, move focus to the panel
|
|
284
|
-
const
|
|
285
|
-
if (
|
|
284
|
+
const panelVisibility = window.getComputedStyle(this.panel).opacity;
|
|
285
|
+
if (panelVisibility === '0') {
|
|
286
286
|
// #1
|
|
287
287
|
this.updateFocus();
|
|
288
288
|
} else {
|
|
289
289
|
// #2
|
|
290
|
-
|
|
290
|
+
focusTarget = this.panel;
|
|
291
291
|
}
|
|
292
292
|
} else {
|
|
293
293
|
// found an element to focus, but is it visible?
|
|
294
|
-
const
|
|
295
|
-
if (
|
|
294
|
+
const visibility = window.getComputedStyle(focusTarget).visibility;
|
|
295
|
+
if (visibility === 'hidden') {
|
|
296
296
|
// not visible, check again next render frame
|
|
297
297
|
this.updateFocus();
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
|
-
if (
|
|
300
|
+
if (focusTarget != null) {
|
|
301
301
|
this.hasSetInitialFocus = true;
|
|
302
|
-
|
|
302
|
+
focusTarget.focus();
|
|
303
303
|
}
|
|
304
304
|
});
|
|
305
305
|
}
|
|
@@ -312,16 +312,16 @@ class EuiPopoverComponent extends Component {
|
|
|
312
312
|
});
|
|
313
313
|
// for each child element of `this.panel`, find any transition duration we should wait for before stabilizing
|
|
314
314
|
const {
|
|
315
|
-
durationMatch
|
|
316
|
-
delayMatch
|
|
315
|
+
durationMatch,
|
|
316
|
+
delayMatch
|
|
317
317
|
} = Array.prototype.slice.call(this.panel ? this.panel.children : []).reduce(({
|
|
318
|
-
durationMatch
|
|
319
|
-
delayMatch
|
|
320
|
-
},
|
|
321
|
-
const
|
|
318
|
+
durationMatch,
|
|
319
|
+
delayMatch
|
|
320
|
+
}, element) => {
|
|
321
|
+
const transitionTimings = getTransitionTimings(element);
|
|
322
322
|
return {
|
|
323
|
-
durationMatch: Math.max(
|
|
324
|
-
delayMatch: Math.max(
|
|
323
|
+
durationMatch: Math.max(durationMatch, transitionTimings.durationMatch),
|
|
324
|
+
delayMatch: Math.max(delayMatch, transitionTimings.delayMatch)
|
|
325
325
|
};
|
|
326
326
|
}, {
|
|
327
327
|
durationMatch: 0,
|
|
@@ -329,12 +329,12 @@ class EuiPopoverComponent extends Component {
|
|
|
329
329
|
});
|
|
330
330
|
this.respositionTimeout = later(this, () => {
|
|
331
331
|
this.isOpenStable = true;
|
|
332
|
-
const
|
|
332
|
+
const fn = () => {
|
|
333
333
|
this.positionPopoverFixed();
|
|
334
334
|
this.updateFocus();
|
|
335
335
|
};
|
|
336
|
-
scheduleOnce('afterRender', this,
|
|
337
|
-
},
|
|
336
|
+
scheduleOnce('afterRender', this, fn);
|
|
337
|
+
}, durationMatch + delayMatch);
|
|
338
338
|
}
|
|
339
339
|
static {
|
|
340
340
|
n(this.prototype, "onOpenPopover", [action]);
|
|
@@ -342,24 +342,24 @@ class EuiPopoverComponent extends Component {
|
|
|
342
342
|
get shouldAccountForOtherPopovers() {
|
|
343
343
|
return this.args.shouldAccountForOtherPopovers ?? true;
|
|
344
344
|
}
|
|
345
|
-
checkIfPopoverIsInsideAnotherPopover(
|
|
346
|
-
const
|
|
347
|
-
this.popoverHost =
|
|
345
|
+
checkIfPopoverIsInsideAnotherPopover(ele) {
|
|
346
|
+
const otherPopover = ele.closest('div.euiPopover__panel');
|
|
347
|
+
this.popoverHost = otherPopover;
|
|
348
348
|
}
|
|
349
|
-
didInsertPopover(
|
|
349
|
+
didInsertPopover(ele) {
|
|
350
350
|
if (this.suppressingPopover) {
|
|
351
351
|
// component was created with isOpen=true; now that it's inserted
|
|
352
352
|
// stop suppressing and start opening
|
|
353
353
|
this.suppressingPopover = false;
|
|
354
354
|
this.isOpening = true;
|
|
355
|
-
const
|
|
356
|
-
scheduleOnce('afterRender', this,
|
|
355
|
+
const fn = () => this.onOpenPopover();
|
|
356
|
+
scheduleOnce('afterRender', this, fn);
|
|
357
357
|
}
|
|
358
358
|
if (this.args.repositionOnScroll) {
|
|
359
359
|
window.addEventListener('scroll', this.positionPopoverFixed, true);
|
|
360
360
|
}
|
|
361
361
|
if (this.shouldAccountForOtherPopovers) {
|
|
362
|
-
this.checkIfPopoverIsInsideAnotherPopover(
|
|
362
|
+
this.checkIfPopoverIsInsideAnotherPopover(ele);
|
|
363
363
|
}
|
|
364
364
|
this.updateFocus();
|
|
365
365
|
}
|
|
@@ -404,33 +404,33 @@ class EuiPopoverComponent extends Component {
|
|
|
404
404
|
cancelAnimationFrame(this.closingTransitionAnimationFrame);
|
|
405
405
|
cancelAnimationFrame(this.updateFocusAnimationFrame);
|
|
406
406
|
}
|
|
407
|
-
onMutation(
|
|
408
|
-
const
|
|
407
|
+
onMutation(records) {
|
|
408
|
+
const waitDuration = getWaitDuration(records);
|
|
409
409
|
this.positionPopoverFixed();
|
|
410
|
-
performOnFrame(
|
|
410
|
+
performOnFrame(waitDuration, this.positionPopoverFixed);
|
|
411
411
|
}
|
|
412
412
|
static {
|
|
413
413
|
n(this.prototype, "onMutation", [action]);
|
|
414
414
|
}
|
|
415
|
-
positionPopover(
|
|
415
|
+
positionPopover(allowEnforcePosition) {
|
|
416
416
|
if (this.button == null || this.panel == null) return;
|
|
417
|
-
let
|
|
418
|
-
let
|
|
419
|
-
if (
|
|
420
|
-
|
|
421
|
-
|
|
417
|
+
let position = getPopoverPositionFromAnchorPosition(this.anchorPosition);
|
|
418
|
+
let forcePosition = undefined;
|
|
419
|
+
if (allowEnforcePosition && this.isOpenStable && this.openPosition != null) {
|
|
420
|
+
position = this.openPosition;
|
|
421
|
+
forcePosition = true;
|
|
422
422
|
}
|
|
423
423
|
const {
|
|
424
|
-
top
|
|
425
|
-
left
|
|
426
|
-
position:
|
|
427
|
-
arrow
|
|
428
|
-
anchorBoundingBox
|
|
424
|
+
top,
|
|
425
|
+
left,
|
|
426
|
+
position: foundPosition,
|
|
427
|
+
arrow,
|
|
428
|
+
anchorBoundingBox
|
|
429
429
|
} = findPopoverPosition({
|
|
430
430
|
container: this.args.container,
|
|
431
431
|
host: this.shouldAccountForOtherPopovers ? this.popoverHost : null,
|
|
432
|
-
position
|
|
433
|
-
forcePosition
|
|
432
|
+
position,
|
|
433
|
+
forcePosition,
|
|
434
434
|
align: getPopoverAlignFromAnchorPosition(this.anchorPosition),
|
|
435
435
|
anchor: this.button,
|
|
436
436
|
popover: this.panel,
|
|
@@ -446,43 +446,43 @@ class EuiPopoverComponent extends Component {
|
|
|
446
446
|
// this keeps a button's popover under a flyout that would cover the button
|
|
447
447
|
// but a popover triggered inside a flyout will appear over that flyout
|
|
448
448
|
const {
|
|
449
|
-
zIndex:
|
|
449
|
+
zIndex: zIndexProp
|
|
450
450
|
} = this.args;
|
|
451
|
-
const
|
|
452
|
-
const
|
|
453
|
-
top
|
|
454
|
-
left: this.args.attachToAnchor &&
|
|
455
|
-
zIndex
|
|
451
|
+
const zIndex = zIndexProp == null ? getElementZIndex(this.button, this.panel) + 2000 : zIndexProp;
|
|
452
|
+
const popoverStyles = {
|
|
453
|
+
top,
|
|
454
|
+
left: this.args.attachToAnchor && anchorBoundingBox ? anchorBoundingBox.left : left,
|
|
455
|
+
zIndex
|
|
456
456
|
};
|
|
457
|
-
const
|
|
458
|
-
const
|
|
459
|
-
const
|
|
460
|
-
this.popoverStyles =
|
|
461
|
-
this.arrowStyles =
|
|
462
|
-
this.arrowPosition =
|
|
463
|
-
this.openPosition =
|
|
457
|
+
const willRenderArrow = !this.args.attachToAnchor && this.hasArrow;
|
|
458
|
+
const arrowStyles = willRenderArrow ? arrow : undefined;
|
|
459
|
+
const arrowPosition = foundPosition;
|
|
460
|
+
this.popoverStyles = popoverStyles;
|
|
461
|
+
this.arrowStyles = arrowStyles;
|
|
462
|
+
this.arrowPosition = arrowPosition;
|
|
463
|
+
this.openPosition = foundPosition;
|
|
464
464
|
}
|
|
465
465
|
static {
|
|
466
466
|
n(this.prototype, "positionPopover", [action]);
|
|
467
467
|
}
|
|
468
468
|
get _arrowStyles() {
|
|
469
469
|
const {
|
|
470
|
-
arrowStyles
|
|
470
|
+
arrowStyles
|
|
471
471
|
} = this;
|
|
472
|
-
return
|
|
472
|
+
return arrowStyles ? htmlSafe(`top: ${arrowStyles?.top}px; left: ${arrowStyles?.left}px;`) : undefined;
|
|
473
473
|
}
|
|
474
474
|
get _popoverStyles() {
|
|
475
475
|
const {
|
|
476
|
-
panelStyle
|
|
476
|
+
panelStyle
|
|
477
477
|
} = this.args;
|
|
478
478
|
const {
|
|
479
|
-
popoverStyles
|
|
479
|
+
popoverStyles
|
|
480
480
|
} = this;
|
|
481
481
|
return {
|
|
482
|
-
...
|
|
483
|
-
top: `${
|
|
484
|
-
left: `${
|
|
485
|
-
zIndex: `${
|
|
482
|
+
...panelStyle,
|
|
483
|
+
top: `${popoverStyles.top}px`,
|
|
484
|
+
left: `${popoverStyles.left}px`,
|
|
485
|
+
zIndex: `${popoverStyles.zIndex}`
|
|
486
486
|
};
|
|
487
487
|
}
|
|
488
488
|
get tabindex() {
|
|
@@ -503,17 +503,17 @@ class EuiPopoverComponent extends Component {
|
|
|
503
503
|
static {
|
|
504
504
|
n(this.prototype, "positionPopoverFluid", [action]);
|
|
505
505
|
}
|
|
506
|
-
registerButton(
|
|
507
|
-
this.button =
|
|
508
|
-
this.args.buttonRef?.(
|
|
506
|
+
registerButton(btn) {
|
|
507
|
+
this.button = btn;
|
|
508
|
+
this.args.buttonRef?.(btn);
|
|
509
509
|
}
|
|
510
510
|
static {
|
|
511
511
|
n(this.prototype, "registerButton", [action]);
|
|
512
512
|
}
|
|
513
|
-
registerPanel(
|
|
514
|
-
this.panel =
|
|
515
|
-
this.args.panelRef?.(
|
|
516
|
-
if (
|
|
513
|
+
registerPanel(panel) {
|
|
514
|
+
this.panel = panel;
|
|
515
|
+
this.args.panelRef?.(panel);
|
|
516
|
+
if (panel === null) {
|
|
517
517
|
// panel has unmounted, restore the state defaults
|
|
518
518
|
this.popoverStyles = DEFAULT_POPOVER_STYLES;
|
|
519
519
|
this.arrowStyles = {};
|