@ebay/ui-core-react 5.6.3 → 5.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common/component-utils/array.polyfill.flat.js +1 -0
- package/common/component-utils/forwardRef.js +9 -4
- package/common/component-utils/index.js +6 -2
- package/common/component-utils/usePrevious.js +2 -2
- package/common/debounce.d.ts +1 -1
- package/common/debounce.d.ts.map +1 -1
- package/common/debounce.js +5 -16
- package/common/event-utils/index.d.ts +2 -2
- package/common/event-utils/index.d.ts.map +1 -1
- package/common/event-utils/types.d.ts +10 -10
- package/common/event-utils/types.d.ts.map +1 -1
- package/common/event-utils/use-key-press.js +3 -3
- package/common/event-utils/use-roving-index.d.ts.map +1 -1
- package/common/event-utils/use-roving-index.js +12 -10
- package/common/floating-label-utils/hooks.d.ts +3 -3
- package/common/floating-label-utils/hooks.d.ts.map +1 -1
- package/common/floating-label-utils/hooks.js +22 -18
- package/common/notice-utils/notice-content.d.ts +1 -1
- package/common/notice-utils/notice-content.d.ts.map +1 -1
- package/common/notice-utils/notice-content.js +1 -1
- package/common/notice-utils/notice-cta.d.ts +1 -1
- package/common/notice-utils/notice-cta.d.ts.map +1 -1
- package/common/notice-utils/notice-cta.js +1 -1
- package/common/notice-utils/notice-footer.d.ts +1 -1
- package/common/notice-utils/notice-footer.d.ts.map +1 -1
- package/common/notice-utils/notice-footer.js +1 -1
- package/common/notice-utils/notice-title.d.ts +1 -1
- package/common/notice-utils/notice-title.d.ts.map +1 -1
- package/common/notice-utils/notice-title.js +1 -1
- package/common/random-id.js +2 -1
- package/common/range.js +2 -1
- package/common/tooltip-utils/index.js +8 -4
- package/common/tooltip-utils/tooltip-content.d.ts +1 -1
- package/common/tooltip-utils/tooltip-content.d.ts.map +1 -1
- package/common/tooltip-utils/tooltip-content.js +9 -9
- package/common/tooltip-utils/tooltip-footer.d.ts +1 -1
- package/common/tooltip-utils/tooltip-footer.d.ts.map +1 -1
- package/common/tooltip-utils/tooltip-footer.js +1 -1
- package/common/tooltip-utils/tooltip-host.d.ts +1 -1
- package/common/tooltip-utils/tooltip-host.d.ts.map +1 -1
- package/common/tooltip-utils/tooltip-host.js +1 -1
- package/common/tooltip-utils/tooltip.d.ts +2 -2
- package/common/tooltip-utils/tooltip.d.ts.map +1 -1
- package/common/tooltip-utils/tooltip.js +12 -8
- package/common/tooltip-utils/types.d.ts +2 -2
- package/common/tooltip-utils/types.d.ts.map +1 -1
- package/common/tooltip-utils/use-tooltip.d.ts +2 -2
- package/common/tooltip-utils/use-tooltip.d.ts.map +1 -1
- package/common/tooltip-utils/use-tooltip.js +3 -2
- package/ebay-alert-dialog/alert-dialog.js +8 -4
- package/ebay-alert-dialog/index.js +5 -1
- package/ebay-badge/badge.d.ts +2 -2
- package/ebay-badge/badge.d.ts.map +1 -1
- package/ebay-badge/badge.js +1 -1
- package/ebay-badge/index.js +5 -1
- package/ebay-breadcrumbs/breadcrumb-item.d.ts +2 -2
- package/ebay-breadcrumbs/breadcrumb-item.d.ts.map +1 -1
- package/ebay-breadcrumbs/breadcrumbs.d.ts +1 -1
- package/ebay-breadcrumbs/breadcrumbs.d.ts.map +1 -1
- package/ebay-breadcrumbs/breadcrumbs.js +9 -5
- package/ebay-breadcrumbs/index.js +6 -2
- package/ebay-button/button-cell.d.ts +2 -2
- package/ebay-button/button-cell.d.ts.map +1 -1
- package/ebay-button/button-cell.js +1 -1
- package/ebay-button/button-text.d.ts +1 -1
- package/ebay-button/button-text.d.ts.map +1 -1
- package/ebay-button/button-text.js +1 -1
- package/ebay-button/button.d.ts +3 -3
- package/ebay-button/button.d.ts.map +1 -1
- package/ebay-button/button.js +14 -10
- package/ebay-button/index.js +6 -2
- package/ebay-button/types.d.ts +5 -5
- package/ebay-button/types.d.ts.map +1 -1
- package/ebay-carousel/carousel-control-button.d.ts +1 -1
- package/ebay-carousel/carousel-control-button.d.ts.map +1 -1
- package/ebay-carousel/carousel-control-button.js +2 -2
- package/ebay-carousel/carousel-item.d.ts +3 -3
- package/ebay-carousel/carousel-item.d.ts.map +1 -1
- package/ebay-carousel/carousel-item.js +11 -7
- package/ebay-carousel/carousel-list.d.ts +1 -1
- package/ebay-carousel/carousel-list.d.ts.map +1 -1
- package/ebay-carousel/carousel-list.js +18 -14
- package/ebay-carousel/carousel.d.ts +1 -1
- package/ebay-carousel/carousel.d.ts.map +1 -1
- package/ebay-carousel/carousel.js +23 -19
- package/ebay-carousel/helpers.d.ts.map +1 -1
- package/ebay-carousel/helpers.js +19 -13
- package/ebay-carousel/index.d.ts +1 -1
- package/ebay-carousel/index.d.ts.map +1 -1
- package/ebay-carousel/index.js +6 -2
- package/ebay-carousel/scroll-to-transition.d.ts +1 -1
- package/ebay-carousel/scroll-to-transition.d.ts.map +1 -1
- package/ebay-carousel/types.d.ts +4 -4
- package/ebay-carousel/types.d.ts.map +1 -1
- package/ebay-checkbox/checkbox.d.ts +3 -3
- package/ebay-checkbox/checkbox.d.ts.map +1 -1
- package/ebay-checkbox/checkbox.js +10 -6
- package/ebay-checkbox/index.js +5 -1
- package/ebay-confirm-dialog/confirm-dialog.js +8 -4
- package/ebay-confirm-dialog/index.js +5 -1
- package/ebay-cta-button/cta-button.d.ts +3 -3
- package/ebay-cta-button/cta-button.d.ts.map +1 -1
- package/ebay-cta-button/cta-button.js +2 -2
- package/ebay-cta-button/index.js +5 -1
- package/ebay-dialog-base/components/animation.d.ts +1 -1
- package/ebay-dialog-base/components/animation.d.ts.map +1 -1
- package/ebay-dialog-base/components/animation.js +5 -5
- package/ebay-dialog-base/components/dialog-actions.d.ts +1 -1
- package/ebay-dialog-base/components/dialog-actions.d.ts.map +1 -1
- package/ebay-dialog-base/components/dialog-footer.d.ts +1 -1
- package/ebay-dialog-base/components/dialog-footer.d.ts.map +1 -1
- package/ebay-dialog-base/components/dialog-header.d.ts +1 -1
- package/ebay-dialog-base/components/dialog-header.d.ts.map +1 -1
- package/ebay-dialog-base/components/dialog-previous-button.d.ts +1 -1
- package/ebay-dialog-base/components/dialog-previous-button.d.ts.map +1 -1
- package/ebay-dialog-base/components/dialog-previous-button.js +1 -1
- package/ebay-dialog-base/components/dialogBase.d.ts +3 -3
- package/ebay-dialog-base/components/dialogBase.d.ts.map +1 -1
- package/ebay-dialog-base/components/dialogBase.js +28 -23
- package/ebay-dialog-base/dialog-base-with-state.d.ts.map +1 -1
- package/ebay-dialog-base/dialog-base-with-state.js +8 -3
- package/ebay-dialog-base/index.js +10 -6
- package/ebay-drawer-dialog/components/drawer.js +11 -7
- package/ebay-drawer-dialog/index.js +5 -1
- package/ebay-eek/eek-rating.d.ts +1 -1
- package/ebay-eek/eek-rating.d.ts.map +1 -1
- package/ebay-eek/eek-rating.js +3 -3
- package/ebay-eek/index.js +5 -1
- package/ebay-fake-menu/index.js +7 -3
- package/ebay-fake-menu/menu-item-separator.d.ts +1 -1
- package/ebay-fake-menu/menu-item-separator.d.ts.map +1 -1
- package/ebay-fake-menu/menu-item-separator.js +1 -1
- package/ebay-fake-menu/menu-item.d.ts +1 -1
- package/ebay-fake-menu/menu-item.d.ts.map +1 -1
- package/ebay-fake-menu/menu-item.js +9 -5
- package/ebay-fake-menu/menu.d.ts +2 -2
- package/ebay-fake-menu/menu.d.ts.map +1 -1
- package/ebay-fake-menu/menu.js +8 -4
- package/ebay-fake-menu-button/index.js +8 -4
- package/ebay-fake-menu-button/menu-button-separator.d.ts +1 -1
- package/ebay-fake-menu-button/menu-button-separator.d.ts.map +1 -1
- package/ebay-fake-menu-button/menu-button-separator.js +1 -1
- package/ebay-fake-menu-button/menu-button.d.ts +4 -4
- package/ebay-fake-menu-button/menu-button.d.ts.map +1 -1
- package/ebay-fake-menu-button/menu-button.js +20 -16
- package/ebay-fake-tabs/fake-tabs.d.ts +1 -1
- package/ebay-fake-tabs/fake-tabs.d.ts.map +1 -1
- package/ebay-fake-tabs/fake-tabs.js +10 -6
- package/ebay-fake-tabs/index.js +6 -2
- package/ebay-fake-tabs/tab.d.ts +1 -1
- package/ebay-fake-tabs/tab.d.ts.map +1 -1
- package/ebay-fake-tabs/tab.js +1 -1
- package/ebay-field/description.d.ts +1 -1
- package/ebay-field/description.d.ts.map +1 -1
- package/ebay-field/description.js +1 -1
- package/ebay-field/field.d.ts +1 -1
- package/ebay-field/field.d.ts.map +1 -1
- package/ebay-field/field.js +1 -1
- package/ebay-field/index.js +7 -3
- package/ebay-field/label.d.ts +1 -1
- package/ebay-field/label.d.ts.map +1 -1
- package/ebay-field/label.js +1 -1
- package/ebay-field/types.d.ts +4 -4
- package/ebay-field/types.d.ts.map +1 -1
- package/ebay-fullscreen-dialog/fullscreen-dialog.js +1 -1
- package/ebay-fullscreen-dialog/index.js +5 -1
- package/ebay-icon/icon.d.ts +3 -3
- package/ebay-icon/icon.d.ts.map +1 -1
- package/ebay-icon/icon.js +15 -11
- package/ebay-icon/index.js +5 -1
- package/ebay-icon/types.d.ts +1 -1
- package/ebay-icon/types.d.ts.map +1 -1
- package/ebay-icon-button/icon-button.d.ts +5 -5
- package/ebay-icon-button/icon-button.d.ts.map +1 -1
- package/ebay-icon-button/icon-button.js +4 -4
- package/ebay-icon-button/index.js +5 -1
- package/ebay-infotip/ebay-infotip-heading.d.ts +1 -1
- package/ebay-infotip/ebay-infotip-heading.d.ts.map +1 -1
- package/ebay-infotip/ebay-infotip-heading.js +1 -1
- package/ebay-infotip/ebay-infotip-host.d.ts +2 -2
- package/ebay-infotip/ebay-infotip-host.d.ts.map +1 -1
- package/ebay-infotip/ebay-infotip-host.js +2 -2
- package/ebay-infotip/ebay-infotip.d.ts +1 -1
- package/ebay-infotip/ebay-infotip.d.ts.map +1 -1
- package/ebay-infotip/ebay-infotip.js +14 -11
- package/ebay-infotip/index.js +8 -4
- package/ebay-infotip/types.d.ts +1 -1
- package/ebay-infotip/types.d.ts.map +1 -1
- package/ebay-inline-notice/index.js +5 -1
- package/ebay-inline-notice/inline-notice.d.ts +1 -1
- package/ebay-inline-notice/inline-notice.d.ts.map +1 -1
- package/ebay-inline-notice/inline-notice.js +10 -6
- package/ebay-inline-notice/types.d.ts +1 -1
- package/ebay-inline-notice/types.d.ts.map +1 -1
- package/ebay-lightbox-dialog/index.js +5 -1
- package/ebay-lightbox-dialog/lightbox-dialog.d.ts +1 -1
- package/ebay-lightbox-dialog/lightbox-dialog.d.ts.map +1 -1
- package/ebay-lightbox-dialog/lightbox-dialog.js +2 -2
- package/ebay-listbox-button/index.js +6 -2
- package/ebay-listbox-button/listbox-button-option.d.ts +1 -1
- package/ebay-listbox-button/listbox-button-option.d.ts.map +1 -1
- package/ebay-listbox-button/listbox-button-option.js +2 -2
- package/ebay-listbox-button/listbox-button.d.ts +2 -2
- package/ebay-listbox-button/listbox-button.d.ts.map +1 -1
- package/ebay-listbox-button/listbox-button.js +22 -18
- package/ebay-menu/index.js +13 -5
- package/ebay-menu/menu-item-separator.d.ts +1 -1
- package/ebay-menu/menu-item-separator.d.ts.map +1 -1
- package/ebay-menu/menu-item-separator.js +1 -1
- package/ebay-menu/menu-item.d.ts +1 -1
- package/ebay-menu/menu-item.d.ts.map +1 -1
- package/ebay-menu/menu-item.js +9 -5
- package/ebay-menu/menu.d.ts +1 -1
- package/ebay-menu/menu.js +23 -17
- package/ebay-menu/types.d.ts +10 -10
- package/ebay-menu/types.d.ts.map +1 -1
- package/ebay-menu-button/index.js +14 -6
- package/ebay-menu-button/menu-button-separator.d.ts +1 -1
- package/ebay-menu-button/menu-button-separator.d.ts.map +1 -1
- package/ebay-menu-button/menu-button-separator.js +1 -1
- package/ebay-menu-button/menu-button.d.ts +3 -3
- package/ebay-menu-button/menu-button.d.ts.map +1 -1
- package/ebay-menu-button/menu-button.js +21 -17
- package/ebay-menu-button/types.d.ts +1 -1
- package/ebay-menu-button/types.d.ts.map +1 -1
- package/ebay-notice-base/components/ebay-notice-content/index.js +5 -1
- package/ebay-notice-base/components/ebay-notice-content/notice-content.d.ts +1 -1
- package/ebay-notice-base/components/ebay-notice-content/notice-content.d.ts.map +1 -1
- package/ebay-notice-base/components/ebay-notice-title/index.js +5 -1
- package/ebay-notice-base/index.js +1 -0
- package/ebay-page-notice/index.js +8 -4
- package/ebay-page-notice/page-notice-cta.d.ts +1 -1
- package/ebay-page-notice/page-notice-cta.d.ts.map +1 -1
- package/ebay-page-notice/page-notice-footer.d.ts +1 -1
- package/ebay-page-notice/page-notice-footer.d.ts.map +1 -1
- package/ebay-page-notice/page-notice-title.d.ts +1 -1
- package/ebay-page-notice/page-notice-title.d.ts.map +1 -1
- package/ebay-page-notice/page-notice.d.ts +2 -2
- package/ebay-page-notice/page-notice.d.ts.map +1 -1
- package/ebay-page-notice/page-notice.js +10 -6
- package/ebay-pagination/index.js +6 -2
- package/ebay-pagination/pagination-item.d.ts +4 -4
- package/ebay-pagination/pagination-item.d.ts.map +1 -1
- package/ebay-pagination/pagination-item.js +3 -3
- package/ebay-pagination/pagination.d.ts +1 -1
- package/ebay-pagination/pagination.d.ts.map +1 -1
- package/ebay-pagination/pagination.js +40 -28
- package/ebay-pagination/types.d.ts +2 -2
- package/ebay-pagination/types.d.ts.map +1 -1
- package/ebay-panel-dialog/index.js +5 -1
- package/ebay-panel-dialog/panel-dialog.d.ts +1 -1
- package/ebay-panel-dialog/panel-dialog.d.ts.map +1 -1
- package/ebay-panel-dialog/panel-dialog.js +2 -2
- package/ebay-progress-bar/index.js +5 -1
- package/ebay-progress-bar/progress-bar.d.ts +1 -1
- package/ebay-progress-bar/progress-bar.d.ts.map +1 -1
- package/ebay-progress-bar/progress-bar.js +1 -1
- package/ebay-progress-spinner/index.js +5 -1
- package/ebay-progress-spinner/progress-spinner.d.ts +3 -3
- package/ebay-progress-spinner/progress-spinner.d.ts.map +1 -1
- package/ebay-progress-spinner/progress-spinner.js +1 -1
- package/ebay-progress-stepper/ebay-progress-step.d.ts +1 -1
- package/ebay-progress-stepper/ebay-progress-step.d.ts.map +1 -1
- package/ebay-progress-stepper/ebay-progress-step.js +7 -3
- package/ebay-progress-stepper/ebay-progress-stepper.d.ts +1 -1
- package/ebay-progress-stepper/ebay-progress-stepper.d.ts.map +1 -1
- package/ebay-progress-stepper/ebay-progress-stepper.js +8 -4
- package/ebay-progress-stepper/ebay-progress-title.d.ts +1 -1
- package/ebay-progress-stepper/ebay-progress-title.d.ts.map +1 -1
- package/ebay-progress-stepper/ebay-progress-title.js +1 -1
- package/ebay-progress-stepper/index.js +7 -3
- package/ebay-progress-stepper/types.d.ts +2 -2
- package/ebay-progress-stepper/types.d.ts.map +1 -1
- package/ebay-radio/index.js +5 -1
- package/ebay-radio/radio.d.ts +3 -3
- package/ebay-radio/radio.d.ts.map +1 -1
- package/ebay-radio/radio.js +8 -4
- package/ebay-section-notice/index.js +7 -3
- package/ebay-section-notice/section-notice-footer.d.ts +1 -1
- package/ebay-section-notice/section-notice-footer.d.ts.map +1 -1
- package/ebay-section-notice/section-notice-title.d.ts +1 -1
- package/ebay-section-notice/section-notice-title.d.ts.map +1 -1
- package/ebay-section-notice/section-notice.d.ts +2 -2
- package/ebay-section-notice/section-notice.d.ts.map +1 -1
- package/ebay-section-notice/section-notice.js +12 -8
- package/ebay-section-title/cta.d.ts +1 -1
- package/ebay-section-title/cta.d.ts.map +1 -1
- package/ebay-section-title/cta.js +1 -1
- package/ebay-section-title/index.js +9 -5
- package/ebay-section-title/info.d.ts +1 -1
- package/ebay-section-title/info.d.ts.map +1 -1
- package/ebay-section-title/info.js +1 -1
- package/ebay-section-title/overflow.d.ts +1 -1
- package/ebay-section-title/overflow.d.ts.map +1 -1
- package/ebay-section-title/overflow.js +1 -1
- package/ebay-section-title/section-title.d.ts +1 -1
- package/ebay-section-title/section-title.d.ts.map +1 -1
- package/ebay-section-title/section-title.js +5 -5
- package/ebay-section-title/subtitle.d.ts +1 -1
- package/ebay-section-title/subtitle.d.ts.map +1 -1
- package/ebay-section-title/subtitle.js +1 -1
- package/ebay-section-title/title.d.ts +1 -1
- package/ebay-section-title/title.d.ts.map +1 -1
- package/ebay-section-title/title.js +1 -1
- package/ebay-select/ebay-select-option.d.ts +1 -1
- package/ebay-select/ebay-select-option.d.ts.map +1 -1
- package/ebay-select/ebay-select.d.ts +3 -3
- package/ebay-select/ebay-select.d.ts.map +1 -1
- package/ebay-select/ebay-select.js +12 -8
- package/ebay-select/index.js +6 -2
- package/ebay-signal/index.js +5 -1
- package/ebay-signal/signal.d.ts +2 -2
- package/ebay-signal/signal.d.ts.map +1 -1
- package/ebay-signal/signal.js +1 -1
- package/ebay-snackbar-dialog/components/ebay-snackbar-dialog-action.d.ts.map +1 -1
- package/ebay-snackbar-dialog/components/ebay-snackbar-dialog-action.js +3 -2
- package/ebay-snackbar-dialog/components/ebay-snackbar-dialog.d.ts +1 -1
- package/ebay-snackbar-dialog/components/ebay-snackbar-dialog.d.ts.map +1 -1
- package/ebay-snackbar-dialog/components/ebay-snackbar-dialog.js +14 -9
- package/ebay-snackbar-dialog/index.js +1 -0
- package/ebay-split-button/index.js +11 -3
- package/ebay-split-button/split-button.js +2 -2
- package/ebay-split-button/types.d.ts +3 -3
- package/ebay-split-button/types.d.ts.map +1 -1
- package/ebay-star-rating/index.js +11 -3
- package/ebay-star-rating/star-rating.d.ts +1 -1
- package/ebay-star-rating/star-rating.d.ts.map +1 -1
- package/ebay-star-rating/star-rating.js +2 -2
- package/ebay-star-rating-select/index.js +11 -3
- package/ebay-star-rating-select/star-rating-select.d.ts +2 -2
- package/ebay-star-rating-select/star-rating-select.d.ts.map +1 -1
- package/ebay-star-rating-select/star-rating-select.js +12 -8
- package/ebay-svg/index.js +5 -1
- package/ebay-switch/ebay-switch.d.ts +1 -1
- package/ebay-switch/ebay-switch.d.ts.map +1 -1
- package/ebay-switch/ebay-switch.js +9 -5
- package/ebay-switch/index.js +5 -1
- package/ebay-tabs/index.d.ts +1 -1
- package/ebay-tabs/index.d.ts.map +1 -1
- package/ebay-tabs/index.js +7 -3
- package/ebay-tabs/tab-panel.d.ts +1 -1
- package/ebay-tabs/tab-panel.d.ts.map +1 -1
- package/ebay-tabs/tab-panel.js +1 -1
- package/ebay-tabs/tab.d.ts +1 -1
- package/ebay-tabs/tab.d.ts.map +1 -1
- package/ebay-tabs/tab.js +1 -1
- package/ebay-tabs/tabs.d.ts +2 -14
- package/ebay-tabs/tabs.d.ts.map +1 -1
- package/ebay-tabs/tabs.js +18 -14
- package/ebay-tabs/types.d.ts +16 -2
- package/ebay-tabs/types.d.ts.map +1 -1
- package/ebay-textbox/index.js +7 -3
- package/ebay-textbox/textbox.d.ts +4 -4
- package/ebay-textbox/textbox.d.ts.map +1 -1
- package/ebay-textbox/textbox.js +16 -12
- package/ebay-textbox/types.d.ts +2 -2
- package/ebay-textbox/types.d.ts.map +1 -1
- package/ebay-toast-dialog/components/toast.d.ts +1 -1
- package/ebay-toast-dialog/components/toast.d.ts.map +1 -1
- package/ebay-toast-dialog/components/toast.js +3 -2
- package/ebay-toast-dialog/index.js +5 -1
- package/ebay-tooltip/ebay-tooltip.d.ts +1 -1
- package/ebay-tooltip/ebay-tooltip.d.ts.map +1 -1
- package/ebay-tooltip/ebay-tooltip.js +10 -6
- package/ebay-tooltip/index.js +7 -3
- package/ebay-tourtip/ebay-tourtip-footer.d.ts +1 -1
- package/ebay-tourtip/ebay-tourtip-footer.d.ts.map +1 -1
- package/ebay-tourtip/ebay-tourtip-heading.d.ts +1 -1
- package/ebay-tourtip/ebay-tourtip-heading.d.ts.map +1 -1
- package/ebay-tourtip/ebay-tourtip-heading.js +1 -1
- package/ebay-tourtip/ebay-tourtip.d.ts +1 -1
- package/ebay-tourtip/ebay-tourtip.d.ts.map +1 -1
- package/ebay-tourtip/ebay-tourtip.js +13 -9
- package/ebay-tourtip/index.js +9 -5
- package/ebay-video/controls.js +3 -1
- package/ebay-video/index.js +12 -4
- package/ebay-video/reportButton.js +2 -1
- package/ebay-video/source.d.ts +1 -1
- package/ebay-video/source.d.ts.map +1 -1
- package/ebay-video/types.d.ts +5 -5
- package/ebay-video/types.d.ts.map +1 -1
- package/ebay-video/video.d.ts +3 -3
- package/ebay-video/video.d.ts.map +1 -1
- package/ebay-video/video.js +32 -26
- package/package.json +2 -2
|
@@ -12,7 +12,11 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
};
|
|
13
13
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
14
|
if (k2 === undefined) k2 = k;
|
|
15
|
-
Object.
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
16
20
|
}) : (function(o, m, k, k2) {
|
|
17
21
|
if (k2 === undefined) k2 = k;
|
|
18
22
|
o[k2] = m[k];
|
|
@@ -25,7 +29,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
25
29
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
26
30
|
if (mod && mod.__esModule) return mod;
|
|
27
31
|
var result = {};
|
|
28
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
29
33
|
__setModuleDefault(result, mod);
|
|
30
34
|
return result;
|
|
31
35
|
};
|
|
@@ -36,10 +40,11 @@ var getDisplayName = function (Component) { return Component.displayName || Comp
|
|
|
36
40
|
// Typescript will automatically find the return type crom forwardRef() function
|
|
37
41
|
// Disabling eslint for this use case
|
|
38
42
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
39
|
-
|
|
40
|
-
var ForwardRef = react_1.forwardRef(function (props, ref) {
|
|
43
|
+
var withForwardRef = function (Component) {
|
|
44
|
+
var ForwardRef = (0, react_1.forwardRef)(function (props, ref) {
|
|
41
45
|
return react_1.default.createElement(Component, __assign({}, props, { forwardedRef: ref }));
|
|
42
46
|
});
|
|
43
47
|
ForwardRef.displayName = getDisplayName(Component);
|
|
44
48
|
return ForwardRef;
|
|
45
49
|
};
|
|
50
|
+
exports.withForwardRef = withForwardRef;
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
8
12
|
}));
|
|
9
13
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
15
|
};
|
|
12
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
17
|
__exportStar(require("./forwardRef"), exports);
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.usePrevious = void 0;
|
|
4
4
|
var react_1 = require("react");
|
|
5
5
|
function usePrevious(value) {
|
|
6
|
-
var ref = react_1.useRef();
|
|
7
|
-
react_1.useEffect(function () {
|
|
6
|
+
var ref = (0, react_1.useRef)();
|
|
7
|
+
(0, react_1.useEffect)(function () {
|
|
8
8
|
ref.current = value;
|
|
9
9
|
}, [value]);
|
|
10
10
|
return ref.current;
|
package/common/debounce.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function debounce
|
|
1
|
+
export declare function debounce<F extends (...args: Parameters<F>) => ReturnType<F>>(fn: F, ms: number): (...args: Parameters<F>) => void;
|
|
2
2
|
//# sourceMappingURL=debounce.d.ts.map
|
package/common/debounce.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debounce.d.ts","sourceRoot":"","sources":["../../src/common/debounce.ts"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"debounce.d.ts","sourceRoot":"","sources":["../../src/common/debounce.ts"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CAAC,CAAC,SAAQ,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC,EACvE,EAAE,EAAE,CAAC,EACL,EAAE,EAAE,MAAM,GACX,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,CAOlC"}
|
package/common/debounce.js
CHANGED
|
@@ -1,26 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __spreadArrays = (this && this.__spreadArrays) || function () {
|
|
3
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
4
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
5
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
6
|
-
r[k] = a[j];
|
|
7
|
-
return r;
|
|
8
|
-
};
|
|
9
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
3
|
exports.debounce = void 0;
|
|
11
4
|
function debounce(fn, ms) {
|
|
12
|
-
var _this = this;
|
|
13
5
|
var timer;
|
|
14
6
|
return function () {
|
|
7
|
+
var args = [];
|
|
8
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
9
|
+
args[_i] = arguments[_i];
|
|
10
|
+
}
|
|
15
11
|
clearTimeout(timer);
|
|
16
|
-
timer = setTimeout(function () {
|
|
17
|
-
var args = [];
|
|
18
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
19
|
-
args[_i] = arguments[_i];
|
|
20
|
-
}
|
|
21
|
-
timer = null;
|
|
22
|
-
fn.apply.apply(fn, __spreadArrays([_this], args));
|
|
23
|
-
}, ms);
|
|
12
|
+
timer = setTimeout(function () { return fn.apply(void 0, args); }, ms);
|
|
24
13
|
};
|
|
25
14
|
}
|
|
26
15
|
exports.debounce = debounce;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Key } from './types';
|
|
3
|
-
|
|
3
|
+
type Callback = () => void;
|
|
4
4
|
export declare function handleEnterKeydown(e: React.KeyboardEvent, callback: Callback): void;
|
|
5
5
|
export declare function handleActionKeydown(e: React.KeyboardEvent, callback: Callback): void;
|
|
6
6
|
export declare function isActionKey(key: Key): boolean;
|
|
@@ -9,7 +9,7 @@ export declare function handleUpDownArrowsKeydown(e: React.KeyboardEvent, callba
|
|
|
9
9
|
export declare function handleLeftRightArrowsKeydown(e: React.KeyboardEvent, callback: Callback): void;
|
|
10
10
|
export declare function handleTextInput(e: React.KeyboardEvent, callback: Callback): void;
|
|
11
11
|
export declare function preventDefaultIfHijax(e: React.KeyboardEvent, hijax: boolean): void;
|
|
12
|
-
|
|
12
|
+
type Handler = (e: KeyboardEvent) => void;
|
|
13
13
|
export declare function addEventListener(_: unknown, handler: Handler): void;
|
|
14
14
|
export declare function removeEventListener(_: unknown, handler: Handler): void;
|
|
15
15
|
export declare function handleResize(e: KeyboardEvent): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/event-utils/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,GAAG,EAAE,MAAM,SAAS,CAAA;AAE7B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/event-utils/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,GAAG,EAAE,MAAM,SAAS,CAAA;AAE7B,KAAK,QAAQ,GAAG,MAAM,IAAI,CAAA;AAqB1B,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAInF;AAED,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAIpF;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAE7C;AAED,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAEpF;AAED,wBAAgB,yBAAyB,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAE1F;AAED,wBAAgB,4BAA4B,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAE7F;AAGD,wBAAgB,eAAe,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAwBhF;AAED,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAIlF;AAED,KAAK,OAAO,GAAG,CAAC,CAAC,EAAE,aAAa,KAAK,IAAI,CAAA;AAIzC,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAKnE;AACD,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAKtE;AACD,wBAAgB,YAAY,CAAC,CAAC,EAAE,aAAa,GAAG,IAAI,CAanD;AAED,wBAAgB,SAAS,CAAC,kBAAkB,EAAE,OAAkB,EAAE,iBAAiB,EAAE,OAAO,OAC7E,aAAa,KAAG,IAAI,CAMlC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ChangeEvent, KeyboardEvent, MouseEvent, FocusEvent, SyntheticEvent } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
2
|
+
type ModifierKeys = 'Alt' | 'AltGraph' | 'Control' | 'Shift' | 'CapsLock' | 'Meta';
|
|
3
|
+
type NavigationKeys = 'ArrowDown' | 'ArrowLeft' | 'ArrowRight' | 'ArrowUp' | 'Enter' | 'Tab' | ' ' | 'Escape' | 'End' | 'Home' | 'PageDown' | 'PageUp';
|
|
4
|
+
type NavigationKeysEdge = 'Down' | 'Left' | 'Right' | 'Up' | 'Esc';
|
|
5
|
+
export type Key = ModifierKeys | NavigationKeys | NavigationKeysEdge;
|
|
6
|
+
type BaseEventHandler<E extends SyntheticEvent<any>, P> = (event: E, props?: P) => void;
|
|
7
|
+
export type EbayEventHandler<ElementType = Element, PropsObject = Record<string, any>> = BaseEventHandler<SyntheticEvent<ElementType>, PropsObject>;
|
|
8
|
+
export type EbayMouseEventHandler<ElementType = Element, PropsObject = Record<string, any>> = BaseEventHandler<MouseEvent<ElementType>, PropsObject>;
|
|
9
|
+
export type EbayKeyboardEventHandler<ElementType = Element, PropsObject = Record<string, any>> = BaseEventHandler<KeyboardEvent<ElementType>, PropsObject>;
|
|
10
|
+
export type EbayChangeEventHandler<ElementType = Element, PropsObject = Record<string, any>> = BaseEventHandler<ChangeEvent<ElementType>, PropsObject>;
|
|
11
|
+
export type EbayFocusEventHandler<ElementType = Element, PropsObject = Record<string, any>> = BaseEventHandler<FocusEvent<ElementType>, PropsObject>;
|
|
12
12
|
export {};
|
|
13
13
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/common/event-utils/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAE1F,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/common/event-utils/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAE1F,KAAK,YAAY,GAAG,KAAK,GAAG,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM,CAAA;AAElF,KAAK,cAAc,GAAG,WAAW,GAAG,WAAW,GAAG,YAAY,GAAG,SAAS,GAAG,OAAO,GAAG,KAAK,GAAG,GAAG,GAAG,QAAQ,GACvG,KAAK,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,CAAA;AAC5C,KAAK,kBAAkB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,KAAK,CAAA;AAMlE,MAAM,MAAM,GAAG,GAAG,YAAY,GAAG,cAAc,GAAG,kBAAkB,CAAA;AAEpE,KAAK,gBAAgB,CAAC,CAAC,SAAS,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC;AAExF,MAAM,MAAM,gBAAgB,CAAC,WAAW,GAAG,OAAO,EAAE,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IACjF,gBAAgB,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,CAAC;AAC/D,MAAM,MAAM,qBAAqB,CAAC,WAAW,GAAG,OAAO,EAAE,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IACtF,gBAAgB,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,CAAC;AAC3D,MAAM,MAAM,wBAAwB,CAAC,WAAW,GAAG,OAAO,EAAE,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IACzF,gBAAgB,CAAC,aAAa,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,CAAC;AAC9D,MAAM,MAAM,sBAAsB,CAAC,WAAW,GAAG,OAAO,EAAE,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IACvF,gBAAgB,CAAC,WAAW,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,CAAC;AAC5D,MAAM,MAAM,qBAAqB,CAAC,WAAW,GAAG,OAAO,EAAE,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IACtF,gBAAgB,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,CAAC"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var react_1 = require("react");
|
|
4
4
|
var useKeyPress = function () {
|
|
5
|
-
var _a = react_1.useState(false), arrowUpPressed = _a[0], setArrowUpPressed = _a[1];
|
|
6
|
-
var _b = react_1.useState(false), arrowDownPressed = _b[0], setArrowDownPressed = _b[1];
|
|
5
|
+
var _a = (0, react_1.useState)(false), arrowUpPressed = _a[0], setArrowUpPressed = _a[1];
|
|
6
|
+
var _b = (0, react_1.useState)(false), arrowDownPressed = _b[0], setArrowDownPressed = _b[1];
|
|
7
7
|
var upHandler = function (_a) {
|
|
8
8
|
var key = _a.key;
|
|
9
9
|
var fn = {
|
|
@@ -22,7 +22,7 @@ var useKeyPress = function () {
|
|
|
22
22
|
if (fn)
|
|
23
23
|
fn(true);
|
|
24
24
|
};
|
|
25
|
-
react_1.useEffect(function () {
|
|
25
|
+
(0, react_1.useEffect)(function () {
|
|
26
26
|
window.addEventListener('keydown', downHandler);
|
|
27
27
|
window.addEventListener('keyup', upHandler);
|
|
28
28
|
return function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-roving-index.d.ts","sourceRoot":"","sources":["../../../src/common/event-utils/use-roving-index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,QAAQ,EAAE,EAAE,EAAgB,SAAS,EAAE,cAAc,EAAuB,MAAM,OAAO,CAAA;AAG5G,QAAA,MAAM,cAAc,aACN,SAAS,iBACJ,EAAE,iBACF,MAAM,KACtB,CAAC,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"use-roving-index.d.ts","sourceRoot":"","sources":["../../../src/common/event-utils/use-roving-index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,QAAQ,EAAE,EAAE,EAAgB,SAAS,EAAE,cAAc,EAAuB,MAAM,OAAO,CAAA;AAG5G,QAAA,MAAM,cAAc,aACN,SAAS,iBACJ,EAAE,iBACF,MAAM,KACtB,CAAC,MAAM,EAAE,SAAS,eAAe,MAAM,CAAC,CAAC,CA+B3C,CAAA;AAED,eAAe,cAAc,CAAA"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
3
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
4
|
+
if (ar || !(i in from)) {
|
|
5
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
6
|
+
ar[i] = from[i];
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
8
10
|
};
|
|
9
11
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -13,12 +15,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
13
15
|
var react_1 = require("react");
|
|
14
16
|
var use_key_press_1 = __importDefault(require("./use-key-press"));
|
|
15
17
|
var useRovingIndex = function (children, FocusableType, defaultValue) {
|
|
16
|
-
var _a = react_1.useState(defaultValue), rovingIndex = _a[0], setRovingIndex = _a[1];
|
|
17
|
-
var _b = use_key_press_1.default(), arrowUpPressed = _b[0], arrowDownPressed = _b[1];
|
|
18
|
+
var _a = (0, react_1.useState)(defaultValue), rovingIndex = _a[0], setRovingIndex = _a[1];
|
|
19
|
+
var _b = (0, use_key_press_1.default)(), arrowUpPressed = _b[0], arrowDownPressed = _b[1];
|
|
18
20
|
var rovingIndexArray = react_1.Children
|
|
19
21
|
.toArray(children)
|
|
20
22
|
.reduce(function (focusables, child, i) {
|
|
21
|
-
return child.type === FocusableType ?
|
|
23
|
+
return child.type === FocusableType ? __spreadArray(__spreadArray([], focusables, true), [i], false) : focusables;
|
|
22
24
|
}, []);
|
|
23
25
|
var currentIndex = rovingIndexArray.indexOf(rovingIndex);
|
|
24
26
|
var previousOrCurrent = function () {
|
|
@@ -33,7 +35,7 @@ var useRovingIndex = function (children, FocusableType, defaultValue) {
|
|
|
33
35
|
var nextRovingIndex = rovingIndexArray[currentIndex + 1];
|
|
34
36
|
return nextRovingIndex === undefined ? rovingIndex : nextRovingIndex;
|
|
35
37
|
};
|
|
36
|
-
react_1.useEffect(function () {
|
|
38
|
+
(0, react_1.useEffect)(function () {
|
|
37
39
|
if (arrowUpPressed)
|
|
38
40
|
setRovingIndex(previousOrCurrent());
|
|
39
41
|
if (arrowDownPressed)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FC, RefObject, ReactNode, ComponentProps } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
type InputRef = RefObject<HTMLSelectElement | HTMLTextAreaElement | HTMLInputElement> | any;
|
|
3
|
+
type FloatingLabelHookProps = {
|
|
4
4
|
type?: string;
|
|
5
5
|
inputId?: string;
|
|
6
6
|
ref?: InputRef;
|
|
@@ -14,7 +14,7 @@ declare type FloatingLabelHookProps = {
|
|
|
14
14
|
opaqueLabel?: boolean;
|
|
15
15
|
onMount?: () => void;
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
type FloatingLabelHookReturn = {
|
|
18
18
|
label: ReactNode;
|
|
19
19
|
onBlur: () => void;
|
|
20
20
|
onFocus: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/common/floating-label-utils/hooks.tsx"],"names":[],"mappings":"AAAA,OAAc,EAA+B,EAAE,EAAE,SAAS,EAAe,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAGjH,
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/common/floating-label-utils/hooks.tsx"],"names":[],"mappings":"AAAA,OAAc,EAA+B,EAAE,EAAE,SAAS,EAAe,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAGjH,KAAK,QAAQ,GAAG,SAAS,CAAC,iBAAiB,GAAG,mBAAmB,GAAG,gBAAgB,CAAC,GAAG,GAAG,CAAA;AAC3F,KAAK,sBAAsB,GAAG;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,QAAQ,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAChC,UAAU,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB,CAAA;AAED,KAAK,uBAAuB,GAAG;IAC3B,KAAK,EAAE,SAAS,CAAC;IACjB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,EAAE,CAAC;QAAE,QAAQ,CAAC,EAAE,SAAS,CAAA;KAAE,CAAC,CAAC;IACxC,GAAG,EAAE,QAAQ,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACvB,CAAA;AA4CD,wBAAgB,gBAAgB,CAAC,EAC7B,GAAG,EACH,OAAO,EACP,SAAS,EACT,QAAQ,EACR,KAAK,EACL,SAAS,EACT,UAAU,EACV,WAAW,EACX,OAAO,EACP,WAAW,EACX,IAAI,EACJ,OAAkB,EACrB,EAAG,sBAAsB,GAAG,uBAAuB,CA6EnD"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -14,7 +18,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
14
18
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
19
|
if (mod && mod.__esModule) return mod;
|
|
16
20
|
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
22
|
__setModuleDefault(result, mod);
|
|
19
23
|
return result;
|
|
20
24
|
};
|
|
@@ -48,7 +52,7 @@ var setPlaceholder = function (element, value) {
|
|
|
48
52
|
var beforeWidth = element.offsetWidth;
|
|
49
53
|
element.querySelector("option").text = value;
|
|
50
54
|
if (!value && beforeWidth > element.offsetWidth) {
|
|
51
|
-
element.style['min-width'] = beforeWidth
|
|
55
|
+
element.style['min-width'] = "".concat(beforeWidth, "px");
|
|
52
56
|
}
|
|
53
57
|
}
|
|
54
58
|
};
|
|
@@ -61,12 +65,12 @@ var getPlaceholder = function (element) {
|
|
|
61
65
|
function useFloatingLabel(_a) {
|
|
62
66
|
var _b;
|
|
63
67
|
var ref = _a.ref, inputId = _a.inputId, className = _a.className, disabled = _a.disabled, label = _a.label, inputSize = _a.inputSize, inputValue = _a.inputValue, placeholder = _a.placeholder, invalid = _a.invalid, opaqueLabel = _a.opaqueLabel, type = _a.type, _c = _a.onMount, onMount = _c === void 0 ? function () { } : _c;
|
|
64
|
-
var _internalInputRef = react_1.useRef(null);
|
|
68
|
+
var _internalInputRef = (0, react_1.useRef)(null);
|
|
65
69
|
var inputRef = function () { return ref || _internalInputRef; };
|
|
66
|
-
var _d = react_1.useState(Boolean(inputValue)), isFloating = _d[0], setFloating = _d[1];
|
|
67
|
-
var _e = react_1.useState(false), shouldAnimate = _e[0], setAnimate = _e[1];
|
|
68
|
-
var _f = react_1.useState(false), isFocused = _f[0], setFocused = _f[1];
|
|
69
|
-
var selectFirstOptionText = react_1.useRef("");
|
|
70
|
+
var _d = (0, react_1.useState)(Boolean(inputValue)), isFloating = _d[0], setFloating = _d[1];
|
|
71
|
+
var _e = (0, react_1.useState)(false), shouldAnimate = _e[0], setAnimate = _e[1];
|
|
72
|
+
var _f = (0, react_1.useState)(false), isFocused = _f[0], setFocused = _f[1];
|
|
73
|
+
var selectFirstOptionText = (0, react_1.useRef)("");
|
|
70
74
|
var onBlur = function () {
|
|
71
75
|
var _a;
|
|
72
76
|
setAnimate(true);
|
|
@@ -81,7 +85,7 @@ function useFloatingLabel(_a) {
|
|
|
81
85
|
setFocused(true);
|
|
82
86
|
setPlaceholder((_a = inputRef()) === null || _a === void 0 ? void 0 : _a.current, selectFirstOptionText.current);
|
|
83
87
|
};
|
|
84
|
-
react_1.useEffect(function () {
|
|
88
|
+
(0, react_1.useEffect)(function () {
|
|
85
89
|
var _a, _b;
|
|
86
90
|
if (!label) {
|
|
87
91
|
return;
|
|
@@ -90,28 +94,28 @@ function useFloatingLabel(_a) {
|
|
|
90
94
|
setPlaceholder((_b = inputRef()) === null || _b === void 0 ? void 0 : _b.current, "");
|
|
91
95
|
onMount();
|
|
92
96
|
}, []);
|
|
93
|
-
react_1.useEffect(function () {
|
|
97
|
+
(0, react_1.useEffect)(function () {
|
|
94
98
|
var _a, _b;
|
|
95
99
|
if (!label) {
|
|
96
100
|
return;
|
|
97
101
|
}
|
|
98
102
|
setFloating(isFocused || hasValue((_a = inputRef()) === null || _a === void 0 ? void 0 : _a.current) || isAutofilled((_b = inputRef()) === null || _b === void 0 ? void 0 : _b.current));
|
|
99
103
|
}, [isFocused, inputValue]);
|
|
100
|
-
var labelClassName = classnames_1.default(className, classPrefix, (_b = {},
|
|
101
|
-
_b[classPrefix
|
|
102
|
-
_b[classPrefix
|
|
103
|
-
_b[classPrefix
|
|
104
|
-
_b[classPrefix
|
|
104
|
+
var labelClassName = (0, classnames_1.default)(className, classPrefix, (_b = {},
|
|
105
|
+
_b["".concat(classPrefix, "--disabled")] = disabled,
|
|
106
|
+
_b["".concat(classPrefix, "--animate")] = shouldAnimate,
|
|
107
|
+
_b["".concat(classPrefix, "--inline")] = !isFloating && type !== 'date',
|
|
108
|
+
_b["".concat(classPrefix, "--invalid")] = invalid,
|
|
105
109
|
_b));
|
|
106
|
-
var floatingLabelClassName = classnames_1.default("floating-label", {
|
|
110
|
+
var floatingLabelClassName = (0, classnames_1.default)("floating-label", {
|
|
107
111
|
'floating-label--large': inputSize === "large",
|
|
108
112
|
'floating-label--opaque': opaqueLabel
|
|
109
113
|
});
|
|
110
|
-
var FragmentContainer = react_1.useCallback(function (_a) {
|
|
114
|
+
var FragmentContainer = (0, react_1.useCallback)(function (_a) {
|
|
111
115
|
var children = _a.children;
|
|
112
116
|
return react_1.default.createElement(react_1.default.Fragment, null, children);
|
|
113
117
|
}, []);
|
|
114
|
-
var FloatingLabelContainer = react_1.useCallback(function (_a) {
|
|
118
|
+
var FloatingLabelContainer = (0, react_1.useCallback)(function (_a) {
|
|
115
119
|
var children = _a.children;
|
|
116
120
|
return react_1.default.createElement("span", { className: floatingLabelClassName }, children);
|
|
117
121
|
}, [floatingLabelClassName]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notice-content.d.ts","sourceRoot":"","sources":["../../../src/common/notice-utils/notice-content.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAG5C,
|
|
1
|
+
{"version":3,"file":"notice-content.d.ts","sourceRoot":"","sources":["../../../src/common/notice-utils/notice-content.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAG5C,MAAM,MAAM,kBAAkB,GAAG;IAC7B,IAAI,EAAE,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB,CAAA;AAED,QAAA,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAOzC,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -8,6 +8,6 @@ var classnames_1 = __importDefault(require("classnames"));
|
|
|
8
8
|
var NoticeContent = function (_a) {
|
|
9
9
|
var className = _a.className, type = _a.type, children = _a.children;
|
|
10
10
|
var ContentTag = type === 'inline' ? 'span' : 'div';
|
|
11
|
-
return (react_1.default.createElement(ContentTag, { className: classnames_1.default(className, type
|
|
11
|
+
return (react_1.default.createElement(ContentTag, { className: (0, classnames_1.default)(className, "".concat(type, "-notice__main")) }, children));
|
|
12
12
|
};
|
|
13
13
|
exports.default = NoticeContent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notice-cta.d.ts","sourceRoot":"","sources":["../../../src/common/notice-utils/notice-cta.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAGjC,
|
|
1
|
+
{"version":3,"file":"notice-cta.d.ts","sourceRoot":"","sources":["../../../src/common/notice-utils/notice-cta.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAGjC,KAAK,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,GAAG;IAC3C,IAAI,EAAE,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAA;AAED,QAAA,MAAM,SAAS,EAAE,EAAE,CAAC,KAAK,CAIxB,CAAA;AAED,eAAe,SAAS,CAAA"}
|
|
@@ -29,6 +29,6 @@ var react_1 = __importDefault(require("react"));
|
|
|
29
29
|
var classnames_1 = __importDefault(require("classnames"));
|
|
30
30
|
var NoticeCTA = function (_a) {
|
|
31
31
|
var className = _a.className, type = _a.type, children = _a.children, rest = __rest(_a, ["className", "type", "children"]);
|
|
32
|
-
return (react_1.default.createElement("p", __assign({ className: classnames_1.default(className, type
|
|
32
|
+
return (react_1.default.createElement("p", __assign({ className: (0, classnames_1.default)(className, "".concat(type, "-notice__cta")) }, rest), children));
|
|
33
33
|
};
|
|
34
34
|
exports.default = NoticeCTA;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notice-footer.d.ts","sourceRoot":"","sources":["../../../src/common/notice-utils/notice-footer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAGjC,
|
|
1
|
+
{"version":3,"file":"notice-footer.d.ts","sourceRoot":"","sources":["../../../src/common/notice-utils/notice-footer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAGjC,KAAK,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,GAAG;IAC3C,IAAI,EAAE,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,EAAE,CAAC,KAAK,CAI3B,CAAA;AAED,eAAe,YAAY,CAAA"}
|
|
@@ -29,6 +29,6 @@ var react_1 = __importDefault(require("react"));
|
|
|
29
29
|
var classnames_1 = __importDefault(require("classnames"));
|
|
30
30
|
var NoticeFooter = function (_a) {
|
|
31
31
|
var className = _a.className, type = _a.type, children = _a.children, rest = __rest(_a, ["className", "type", "children"]);
|
|
32
|
-
return (react_1.default.createElement("div", __assign({ className: classnames_1.default(className, type
|
|
32
|
+
return (react_1.default.createElement("div", __assign({ className: (0, classnames_1.default)(className, "".concat(type, "-notice__footer")) }, rest), children));
|
|
33
33
|
};
|
|
34
34
|
exports.default = NoticeFooter;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notice-title.d.ts","sourceRoot":"","sources":["../../../src/common/notice-utils/notice-title.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAGjC,
|
|
1
|
+
{"version":3,"file":"notice-title.d.ts","sourceRoot":"","sources":["../../../src/common/notice-utils/notice-title.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAGjC,KAAK,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,kBAAkB,CAAC,GAAG;IAC/C,IAAI,EAAE,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;IACpC,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAA;AAED,QAAA,MAAM,WAAW,EAAE,EAAE,CAAC,KAAK,CAO1B,CAAA;AAED,eAAe,WAAW,CAAA"}
|
|
@@ -30,6 +30,6 @@ var classnames_1 = __importDefault(require("classnames"));
|
|
|
30
30
|
var NoticeTitle = function (_a) {
|
|
31
31
|
var className = _a.className, type = _a.type, as = _a.as, children = _a.children, rest = __rest(_a, ["className", "type", "as", "children"]);
|
|
32
32
|
var HeadingTag = as || "h2";
|
|
33
|
-
return (react_1.default.createElement(HeadingTag, __assign({ className: classnames_1.default(className, type
|
|
33
|
+
return (react_1.default.createElement(HeadingTag, __assign({ className: (0, classnames_1.default)(className, "".concat(type, "-notice__title")) }, rest), children));
|
|
34
34
|
};
|
|
35
35
|
exports.default = NoticeTitle;
|
package/common/random-id.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.randomId = void 0;
|
|
4
|
-
|
|
4
|
+
var randomId = function () { return Math.random().toString(16).slice(-4); };
|
|
5
|
+
exports.randomId = randomId;
|
package/common/range.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.range = void 0;
|
|
4
|
-
|
|
4
|
+
var range = function (start, stop, step) {
|
|
5
5
|
if (step === void 0) { step = 1; }
|
|
6
6
|
return Array(Math.ceil(((stop + 1) - start) / step)).fill(start).map(function (x, y) { return x + y * step; });
|
|
7
7
|
};
|
|
8
|
+
exports.range = range;
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.POINTER_STYLES = exports.DEFAULT_POINTER_DIRECTION = exports.useTooltip = exports.TooltipFooter = exports.TooltipContent = exports.TooltipHost = exports.Tooltip = void 0;
|
|
3
7
|
var tooltip_1 = require("./tooltip");
|
|
4
|
-
Object.defineProperty(exports, "Tooltip", { enumerable: true, get: function () { return tooltip_1.default; } });
|
|
8
|
+
Object.defineProperty(exports, "Tooltip", { enumerable: true, get: function () { return __importDefault(tooltip_1).default; } });
|
|
5
9
|
var tooltip_host_1 = require("./tooltip-host");
|
|
6
|
-
Object.defineProperty(exports, "TooltipHost", { enumerable: true, get: function () { return tooltip_host_1.default; } });
|
|
10
|
+
Object.defineProperty(exports, "TooltipHost", { enumerable: true, get: function () { return __importDefault(tooltip_host_1).default; } });
|
|
7
11
|
var tooltip_content_1 = require("./tooltip-content");
|
|
8
|
-
Object.defineProperty(exports, "TooltipContent", { enumerable: true, get: function () { return tooltip_content_1.default; } });
|
|
12
|
+
Object.defineProperty(exports, "TooltipContent", { enumerable: true, get: function () { return __importDefault(tooltip_content_1).default; } });
|
|
9
13
|
var tooltip_footer_1 = require("./tooltip-footer");
|
|
10
|
-
Object.defineProperty(exports, "TooltipFooter", { enumerable: true, get: function () { return tooltip_footer_1.default; } });
|
|
14
|
+
Object.defineProperty(exports, "TooltipFooter", { enumerable: true, get: function () { return __importDefault(tooltip_footer_1).default; } });
|
|
11
15
|
var use_tooltip_1 = require("./use-tooltip");
|
|
12
16
|
Object.defineProperty(exports, "useTooltip", { enumerable: true, get: function () { return use_tooltip_1.useTooltip; } });
|
|
13
17
|
var constants_1 = require("./constants");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip-content.d.ts","sourceRoot":"","sources":["../../../src/common/tooltip-utils/tooltip-content.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAG3D,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAKvD,
|
|
1
|
+
{"version":3,"file":"tooltip-content.d.ts","sourceRoot":"","sources":["../../../src/common/tooltip-utils/tooltip-content.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAG3D,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAKvD,MAAM,MAAM,mBAAmB,GAAG;IAC9B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB,CAAA;AAED,QAAA,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAwC3C,CAAA;AAED,eAAe,cAAc,CAAA"}
|
|
@@ -22,15 +22,15 @@ var tooltip_close_button_1 = __importDefault(require("./tooltip-close-button"));
|
|
|
22
22
|
var tooltip_footer_1 = __importDefault(require("./tooltip-footer"));
|
|
23
23
|
var TooltipContent = function (_a) {
|
|
24
24
|
var id = _a.id, style = _a.style, _b = _a.pointer, pointer = _b === void 0 ? constants_1.DEFAULT_POINTER_DIRECTION : _b, children = _a.children, _c = _a.type, type = _c === void 0 ? 'tooltip' : _c, showCloseButton = _a.showCloseButton, a11yCloseText = _a.a11yCloseText, onClose = _a.onClose;
|
|
25
|
-
var closeButton = component_utils_1.findComponent(children, tooltip_close_button_1.default);
|
|
26
|
-
var footer = component_utils_1.findComponent(children, tooltip_footer_1.default);
|
|
27
|
-
var allChildrenExceptFooter = component_utils_1.excludeComponent(children, tooltip_footer_1.default);
|
|
28
|
-
return (react_1.default.createElement("span", { className: type
|
|
29
|
-
react_1.default.createElement("span", { className: type
|
|
30
|
-
react_1.default.createElement("span", { className: type
|
|
31
|
-
react_1.default.createElement("span", { className: type
|
|
32
|
-
react_1.default.createElement("span", { className: type
|
|
33
|
-
showCloseButton ? (react_1.default.createElement("button", __assign({}, closeButton === null || closeButton === void 0 ? void 0 : closeButton.props, { className: "icon-btn icon-btn--transparent "
|
|
25
|
+
var closeButton = (0, component_utils_1.findComponent)(children, tooltip_close_button_1.default);
|
|
26
|
+
var footer = (0, component_utils_1.findComponent)(children, tooltip_footer_1.default);
|
|
27
|
+
var allChildrenExceptFooter = (0, component_utils_1.excludeComponent)(children, tooltip_footer_1.default);
|
|
28
|
+
return (react_1.default.createElement("span", { className: "".concat(type, "__overlay"), id: id, role: constants_1.TYPE_ROLES[type] || null, style: __assign(__assign({}, constants_1.POINTER_STYLES[pointer]), style) },
|
|
29
|
+
react_1.default.createElement("span", { className: "".concat(type, "__pointer ").concat(type, "__pointer--").concat(pointer) }),
|
|
30
|
+
react_1.default.createElement("span", { className: "".concat(type, "__mask") },
|
|
31
|
+
react_1.default.createElement("span", { className: "".concat(type, "__cell") },
|
|
32
|
+
react_1.default.createElement("span", { className: "".concat(type, "__content") }, allChildrenExceptFooter),
|
|
33
|
+
showCloseButton ? (react_1.default.createElement("button", __assign({}, closeButton === null || closeButton === void 0 ? void 0 : closeButton.props, { className: "icon-btn icon-btn--transparent ".concat(type, "__close"), type: "button", "aria-label": a11yCloseText, onClick: onClose }),
|
|
34
34
|
react_1.default.createElement(ebay_icon_1.EbayIcon, { name: "close16" }))) : null,
|
|
35
35
|
footer))));
|
|
36
36
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip-footer.d.ts","sourceRoot":"","sources":["../../../src/common/tooltip-utils/tooltip-footer.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAGjD,
|
|
1
|
+
{"version":3,"file":"tooltip-footer.d.ts","sourceRoot":"","sources":["../../../src/common/tooltip-utils/tooltip-footer.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAGjD,KAAK,kBAAkB,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IAC9C,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB,CAAA;AAED,QAAA,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAK4C,CAAA;AAEtF,eAAe,aAAa,CAAA"}
|
|
@@ -7,6 +7,6 @@ var react_1 = __importDefault(require("react"));
|
|
|
7
7
|
var classnames_1 = __importDefault(require("classnames"));
|
|
8
8
|
var TooltipFooter = function (_a) {
|
|
9
9
|
var children = _a.children, className = _a.className, _b = _a.type, type = _b === void 0 ? 'tourtip' : _b;
|
|
10
|
-
return (react_1.default.createElement("div", { className: classnames_1.default(type
|
|
10
|
+
return (react_1.default.createElement("div", { className: (0, classnames_1.default)("".concat(type, "__footer"), className) }, children));
|
|
11
11
|
};
|
|
12
12
|
exports.default = TooltipFooter;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip-host.d.ts","sourceRoot":"","sources":["../../../src/common/tooltip-utils/tooltip-host.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA0B,EAAE,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAG3E,
|
|
1
|
+
{"version":3,"file":"tooltip-host.d.ts","sourceRoot":"","sources":["../../../src/common/tooltip-utils/tooltip-host.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA0B,EAAE,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAG3E,MAAM,MAAM,gBAAgB,GAAG;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,YAAY,CAAC,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;CACjC,CAAA;AAED,QAAA,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAYrC,CAAA;AAED,eAAe,WAAW,CAAA"}
|