@ebay/ui-core-react 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +186 -0
- package/common/component-utils/forwardRef.d.ts +3 -0
- package/common/component-utils/forwardRef.d.ts.map +1 -0
- package/common/component-utils/forwardRef.js +45 -0
- package/common/component-utils/index.d.ts +3 -0
- package/common/component-utils/index.d.ts.map +1 -0
- package/common/component-utils/index.js +14 -0
- package/common/component-utils/usePrevious.d.ts +2 -0
- package/common/component-utils/usePrevious.d.ts.map +1 -0
- package/common/component-utils/usePrevious.js +12 -0
- package/common/component-utils/utils.d.ts +6 -0
- package/common/component-utils/utils.d.ts.map +1 -0
- package/common/component-utils/utils.js +37 -0
- package/common/debounce.d.ts +2 -0
- package/common/debounce.d.ts.map +1 -0
- package/common/debounce.js +26 -0
- package/common/event-utils/index.d.ts +15 -0
- package/common/event-utils/index.d.ts.map +1 -0
- package/common/event-utils/index.js +118 -0
- package/common/event-utils/types.d.ts +6 -0
- package/common/event-utils/types.d.ts.map +1 -0
- package/common/event-utils/types.js +2 -0
- package/common/event-utils/use-key-press.d.ts +3 -0
- package/common/event-utils/use-key-press.d.ts.map +1 -0
- package/common/event-utils/use-key-press.js +35 -0
- package/common/event-utils/use-roving-index.d.ts +4 -0
- package/common/event-utils/use-roving-index.d.ts.map +1 -0
- package/common/event-utils/use-roving-index.js +44 -0
- package/common/notice-utils/notice-content.d.ts +9 -0
- package/common/notice-utils/notice-content.d.ts.map +1 -0
- package/common/notice-utils/notice-content.js +13 -0
- package/common/notice-utils/notice-footer.d.ts +8 -0
- package/common/notice-utils/notice-footer.d.ts.map +1 -0
- package/common/notice-utils/notice-footer.js +34 -0
- package/common/notice-utils/notice-title.d.ts +9 -0
- package/common/notice-utils/notice-title.d.ts.map +1 -0
- package/common/notice-utils/notice-title.js +35 -0
- package/common/random-id.d.ts +2 -0
- package/common/random-id.d.ts.map +1 -0
- package/common/random-id.js +4 -0
- package/common/tooltip-utils/constants-legacy.d.ts +10 -0
- package/common/tooltip-utils/constants-legacy.d.ts.map +1 -0
- package/common/tooltip-utils/constants-legacy.js +16 -0
- package/common/tooltip-utils/constants.d.ts +6 -0
- package/common/tooltip-utils/constants.d.ts.map +1 -0
- package/common/tooltip-utils/constants.js +86 -0
- package/common/tooltip-utils/index.d.ts +8 -0
- package/common/tooltip-utils/index.d.ts.map +1 -0
- package/common/tooltip-utils/index.js +16 -0
- package/common/tooltip-utils/tooltip-close-button.d.ts +8 -0
- package/common/tooltip-utils/tooltip-close-button.d.ts.map +1 -0
- package/common/tooltip-utils/tooltip-close-button.js +8 -0
- package/common/tooltip-utils/tooltip-content.d.ts +15 -0
- package/common/tooltip-utils/tooltip-content.d.ts.map +1 -0
- package/common/tooltip-utils/tooltip-content.js +33 -0
- package/common/tooltip-utils/tooltip-host.d.ts +8 -0
- package/common/tooltip-utils/tooltip-host.d.ts.map +1 -0
- package/common/tooltip-utils/tooltip-host.js +35 -0
- package/common/tooltip-utils/tooltip.d.ts +10 -0
- package/common/tooltip-utils/tooltip.d.ts.map +1 -0
- package/common/tooltip-utils/tooltip.js +74 -0
- package/common/tooltip-utils/types.d.ts +3 -0
- package/common/tooltip-utils/types.d.ts.map +1 -0
- package/common/tooltip-utils/types.js +2 -0
- package/common/tooltip-utils/use-tooltip.d.ts +13 -0
- package/common/tooltip-utils/use-tooltip.d.ts.map +1 -0
- package/common/tooltip-utils/use-tooltip.js +25 -0
- package/ebay-alert-dialog/README.md +32 -0
- package/ebay-alert-dialog/alert-dialog.d.ts +11 -0
- package/ebay-alert-dialog/alert-dialog.d.ts.map +1 -0
- package/ebay-alert-dialog/alert-dialog.js +62 -0
- package/ebay-alert-dialog/index.d.ts +2 -0
- package/ebay-alert-dialog/index.d.ts.map +1 -0
- package/ebay-alert-dialog/index.js +4 -0
- package/ebay-badge/README.md +36 -0
- package/ebay-badge/badge.d.ts +9 -0
- package/ebay-badge/badge.d.ts.map +1 -0
- package/ebay-badge/badge.js +36 -0
- package/ebay-badge/index.d.ts +2 -0
- package/ebay-badge/index.d.ts.map +1 -0
- package/ebay-badge/index.js +4 -0
- package/ebay-breadcrumbs/README.md +48 -0
- package/ebay-breadcrumbs/breadcrumb-item.d.ts +14 -0
- package/ebay-breadcrumbs/breadcrumb-item.d.ts.map +1 -0
- package/ebay-breadcrumbs/breadcrumb-item.js +38 -0
- package/ebay-breadcrumbs/breadcrumbs.d.ts +17 -0
- package/ebay-breadcrumbs/breadcrumbs.d.ts.map +1 -0
- package/ebay-breadcrumbs/breadcrumbs.js +71 -0
- package/ebay-breadcrumbs/index.d.ts +3 -0
- package/ebay-breadcrumbs/index.d.ts.map +1 -0
- package/ebay-breadcrumbs/index.js +6 -0
- package/ebay-button/README.md +57 -0
- package/ebay-button/button-cell.d.ts +8 -0
- package/ebay-button/button-cell.d.ts.map +1 -0
- package/ebay-button/button-cell.js +40 -0
- package/ebay-button/button-loading.d.ts +4 -0
- package/ebay-button/button-loading.d.ts.map +1 -0
- package/ebay-button/button-loading.js +11 -0
- package/ebay-button/button.d.ts +19 -0
- package/ebay-button/button.d.ts.map +1 -0
- package/ebay-button/button.js +83 -0
- package/ebay-button/index.d.ts +4 -0
- package/ebay-button/index.d.ts.map +1 -0
- package/ebay-button/index.js +6 -0
- package/ebay-button/types.d.ts +4 -0
- package/ebay-button/types.d.ts.map +1 -0
- package/ebay-button/types.js +2 -0
- package/ebay-checkbox/README.md +46 -0
- package/ebay-checkbox/checkbox.d.ts +10 -0
- package/ebay-checkbox/checkbox.d.ts.map +1 -0
- package/ebay-checkbox/checkbox.js +79 -0
- package/ebay-checkbox/index.d.ts +2 -0
- package/ebay-checkbox/index.d.ts.map +1 -0
- package/ebay-checkbox/index.js +4 -0
- package/ebay-confirm-dialog/README.md +34 -0
- package/ebay-confirm-dialog/confirm-dialog.d.ts +13 -0
- package/ebay-confirm-dialog/confirm-dialog.d.ts.map +1 -0
- package/ebay-confirm-dialog/confirm-dialog.js +63 -0
- package/ebay-confirm-dialog/index.d.ts +2 -0
- package/ebay-confirm-dialog/index.d.ts.map +1 -0
- package/ebay-confirm-dialog/index.js +4 -0
- package/ebay-cta-button/README.md +34 -0
- package/ebay-cta-button/cta-button.d.ts +12 -0
- package/ebay-cta-button/cta-button.d.ts.map +1 -0
- package/ebay-cta-button/cta-button.js +41 -0
- package/ebay-cta-button/index.d.ts +2 -0
- package/ebay-cta-button/index.d.ts.map +1 -0
- package/ebay-cta-button/index.js +4 -0
- package/ebay-dialog/README.md +4 -0
- package/ebay-dialog-base/README.md +36 -0
- package/ebay-dialog-base/components/animation.d.ts +14 -0
- package/ebay-dialog-base/components/animation.d.ts.map +1 -0
- package/ebay-dialog-base/components/animation.js +99 -0
- package/ebay-dialog-base/components/dialog-close-button.d.ts +4 -0
- package/ebay-dialog-base/components/dialog-close-button.d.ts.map +1 -0
- package/ebay-dialog-base/components/dialog-close-button.js +11 -0
- package/ebay-dialog-base/components/dialog-footer.d.ts +7 -0
- package/ebay-dialog-base/components/dialog-footer.d.ts.map +1 -0
- package/ebay-dialog-base/components/dialog-footer.js +11 -0
- package/ebay-dialog-base/components/dialog-header.d.ts +5 -0
- package/ebay-dialog-base/components/dialog-header.d.ts.map +1 -0
- package/ebay-dialog-base/components/dialog-header.js +33 -0
- package/ebay-dialog-base/components/dialogBase.d.ts +31 -0
- package/ebay-dialog-base/components/dialogBase.d.ts.map +1 -0
- package/ebay-dialog-base/components/dialogBase.js +149 -0
- package/ebay-dialog-base/dialog-base-with-state.d.ts +5 -0
- package/ebay-dialog-base/dialog-base-with-state.d.ts.map +1 -0
- package/ebay-dialog-base/dialog-base-with-state.js +68 -0
- package/ebay-dialog-base/index.d.ts +6 -0
- package/ebay-dialog-base/index.d.ts.map +1 -0
- package/ebay-dialog-base/index.js +10 -0
- package/ebay-drawer-dialog/README.md +60 -0
- package/ebay-drawer-dialog/components/drawer.d.ts +18 -0
- package/ebay-drawer-dialog/components/drawer.d.ts.map +1 -0
- package/ebay-drawer-dialog/components/drawer.js +120 -0
- package/ebay-drawer-dialog/index.d.ts +2 -0
- package/ebay-drawer-dialog/index.d.ts.map +1 -0
- package/ebay-drawer-dialog/index.js +4 -0
- package/ebay-eek/README.md +34 -0
- package/ebay-eek/eek-rating.d.ts +11 -0
- package/ebay-eek/eek-rating.d.ts.map +1 -0
- package/ebay-eek/eek-rating.js +25 -0
- package/ebay-eek/eek-util.d.ts +4 -0
- package/ebay-eek/eek-util.d.ts.map +1 -0
- package/ebay-eek/eek-util.js +33 -0
- package/ebay-eek/index.d.ts +2 -0
- package/ebay-eek/index.d.ts.map +1 -0
- package/ebay-eek/index.js +4 -0
- package/ebay-expand-button/README.md +36 -0
- package/ebay-expand-button/expand-button.d.ts +13 -0
- package/ebay-expand-button/expand-button.d.ts.map +1 -0
- package/ebay-expand-button/expand-button.js +73 -0
- package/ebay-expand-button/index.d.ts +2 -0
- package/ebay-expand-button/index.d.ts.map +1 -0
- package/ebay-expand-button/index.js +4 -0
- package/ebay-field/README.md +53 -0
- package/ebay-field/description.d.ts +9 -0
- package/ebay-field/description.d.ts.map +1 -0
- package/ebay-field/description.js +38 -0
- package/ebay-field/enums.d.ts +20 -0
- package/ebay-field/enums.d.ts.map +1 -0
- package/ebay-field/enums.js +27 -0
- package/ebay-field/field.d.ts +10 -0
- package/ebay-field/field.d.ts.map +1 -0
- package/ebay-field/field.js +13 -0
- package/ebay-field/index.d.ts +6 -0
- package/ebay-field/index.d.ts.map +1 -0
- package/ebay-field/index.js +12 -0
- package/ebay-field/label.d.ts +11 -0
- package/ebay-field/label.d.ts.map +1 -0
- package/ebay-field/label.js +40 -0
- package/ebay-field/types.d.ts +5 -0
- package/ebay-field/types.d.ts.map +1 -0
- package/ebay-field/types.js +2 -0
- package/ebay-floating-label/README.md +51 -0
- package/ebay-floating-label/floating-label.d.ts +10 -0
- package/ebay-floating-label/floating-label.d.ts.map +1 -0
- package/ebay-floating-label/floating-label.js +40 -0
- package/ebay-floating-label/hooks.d.ts +26 -0
- package/ebay-floating-label/hooks.d.ts.map +1 -0
- package/ebay-floating-label/hooks.js +135 -0
- package/ebay-floating-label/index.d.ts +3 -0
- package/ebay-floating-label/index.d.ts.map +1 -0
- package/ebay-floating-label/index.js +4 -0
- package/ebay-fullscreen-dialog/README.md +33 -0
- package/ebay-fullscreen-dialog/fullscreen-dialog.d.ts +11 -0
- package/ebay-fullscreen-dialog/fullscreen-dialog.d.ts.map +1 -0
- package/ebay-fullscreen-dialog/fullscreen-dialog.js +36 -0
- package/ebay-fullscreen-dialog/index.d.ts +2 -0
- package/ebay-fullscreen-dialog/index.d.ts.map +1 -0
- package/ebay-fullscreen-dialog/index.js +4 -0
- package/ebay-icon/README.md +21 -0
- package/ebay-icon/icon.d.ts +14 -0
- package/ebay-icon/icon.d.ts.map +1 -0
- package/ebay-icon/icon.js +87 -0
- package/ebay-icon/index.d.ts +3 -0
- package/ebay-icon/index.d.ts.map +1 -0
- package/ebay-icon/index.js +4 -0
- package/ebay-icon/types.d.ts +2 -0
- package/ebay-icon/types.d.ts.map +1 -0
- package/ebay-icon/types.js +3 -0
- package/ebay-icon-button/README.md +36 -0
- package/ebay-icon-button/icon-button.d.ts +15 -0
- package/ebay-icon-button/icon-button.d.ts.map +1 -0
- package/ebay-icon-button/icon-button.js +45 -0
- package/ebay-icon-button/index.d.ts +2 -0
- package/ebay-icon-button/index.d.ts.map +1 -0
- package/ebay-icon-button/index.js +4 -0
- package/ebay-infotip/README.md +82 -0
- package/ebay-infotip/ebay-infotip-content.d.ts +8 -0
- package/ebay-infotip/ebay-infotip-content.d.ts.map +1 -0
- package/ebay-infotip/ebay-infotip-content.js +15 -0
- package/ebay-infotip/ebay-infotip-heading.d.ts +5 -0
- package/ebay-infotip/ebay-infotip-heading.d.ts.map +1 -0
- package/ebay-infotip/ebay-infotip-heading.js +34 -0
- package/ebay-infotip/ebay-infotip-host.d.ts +14 -0
- package/ebay-infotip/ebay-infotip-host.d.ts.map +1 -0
- package/ebay-infotip/ebay-infotip-host.js +39 -0
- package/ebay-infotip/ebay-infotip.d.ts +21 -0
- package/ebay-infotip/ebay-infotip.d.ts.map +1 -0
- package/ebay-infotip/ebay-infotip.js +84 -0
- package/ebay-infotip/enums.d.ts +8 -0
- package/ebay-infotip/enums.d.ts.map +1 -0
- package/ebay-infotip/enums.js +10 -0
- package/ebay-infotip/index.d.ts +7 -0
- package/ebay-infotip/index.d.ts.map +1 -0
- package/ebay-infotip/index.js +12 -0
- package/ebay-infotip/types.d.ts +2 -0
- package/ebay-infotip/types.d.ts.map +1 -0
- package/ebay-infotip/types.js +2 -0
- package/ebay-inline-notice/README.md +44 -0
- package/ebay-inline-notice/index.d.ts +4 -0
- package/ebay-inline-notice/index.d.ts.map +1 -0
- package/ebay-inline-notice/index.js +6 -0
- package/ebay-inline-notice/inline-notice.d.ts +13 -0
- package/ebay-inline-notice/inline-notice.d.ts.map +1 -0
- package/ebay-inline-notice/inline-notice.js +62 -0
- package/ebay-inline-notice/types.d.ts +2 -0
- package/ebay-inline-notice/types.d.ts.map +1 -0
- package/ebay-inline-notice/types.js +2 -0
- package/ebay-legacy-floating-label/README.md +47 -0
- package/ebay-legacy-floating-label/index.d.ts +2 -0
- package/ebay-legacy-floating-label/index.d.ts.map +1 -0
- package/ebay-legacy-floating-label/index.js +4 -0
- package/ebay-legacy-floating-label/legacy-floating-label.d.ts +8 -0
- package/ebay-legacy-floating-label/legacy-floating-label.d.ts.map +1 -0
- package/ebay-legacy-floating-label/legacy-floating-label.js +91 -0
- package/ebay-lightbox-dialog/README.md +34 -0
- package/ebay-lightbox-dialog/index.d.ts +2 -0
- package/ebay-lightbox-dialog/index.d.ts.map +1 -0
- package/ebay-lightbox-dialog/index.js +4 -0
- package/ebay-lightbox-dialog/lightbox-dialog.d.ts +12 -0
- package/ebay-lightbox-dialog/lightbox-dialog.d.ts.map +1 -0
- package/ebay-lightbox-dialog/lightbox-dialog.js +39 -0
- package/ebay-listbox-button/README.md +38 -0
- package/ebay-listbox-button/index.d.ts +3 -0
- package/ebay-listbox-button/index.d.ts.map +1 -0
- package/ebay-listbox-button/index.js +6 -0
- package/ebay-listbox-button/listbox-button-option.d.ts +10 -0
- package/ebay-listbox-button/listbox-button-option.d.ts.map +1 -0
- package/ebay-listbox-button/listbox-button-option.js +38 -0
- package/ebay-listbox-button/listbox-button.d.ts +12 -0
- package/ebay-listbox-button/listbox-button.d.ts.map +1 -0
- package/ebay-listbox-button/listbox-button.js +235 -0
- package/ebay-menu/README.md +54 -0
- package/ebay-menu/index.d.ts +5 -0
- package/ebay-menu/index.d.ts.map +1 -0
- package/ebay-menu/index.js +8 -0
- package/ebay-menu/menu-item-separator.d.ts +5 -0
- package/ebay-menu/menu-item-separator.d.ts.map +1 -0
- package/ebay-menu/menu-item-separator.js +34 -0
- package/ebay-menu/menu-item.d.ts +12 -0
- package/ebay-menu/menu-item.d.ts.map +1 -0
- package/ebay-menu/menu-item.js +65 -0
- package/ebay-menu/menu.d.ts +15 -0
- package/ebay-menu/menu.d.ts.map +1 -0
- package/ebay-menu/menu.js +127 -0
- package/ebay-menu/types.d.ts +3 -0
- package/ebay-menu/types.d.ts.map +1 -0
- package/ebay-menu/types.js +2 -0
- package/ebay-notice-base/components/ebay-notice-content/index.d.ts +2 -0
- package/ebay-notice-base/components/ebay-notice-content/index.d.ts.map +1 -0
- package/ebay-notice-base/components/ebay-notice-content/index.js +4 -0
- package/ebay-notice-base/components/ebay-notice-content/notice-content.d.ts +8 -0
- package/ebay-notice-base/components/ebay-notice-content/notice-content.d.ts.map +1 -0
- package/ebay-notice-base/components/ebay-notice-content/notice-content.js +4 -0
- package/ebay-notice-base/components/ebay-notice-title/index.d.ts +2 -0
- package/ebay-notice-base/components/ebay-notice-title/index.d.ts.map +1 -0
- package/ebay-notice-base/components/ebay-notice-title/index.js +4 -0
- package/ebay-notice-base/components/ebay-notice-title/notice-title.d.ts +4 -0
- package/ebay-notice-base/components/ebay-notice-title/notice-title.d.ts.map +1 -0
- package/ebay-notice-base/components/ebay-notice-title/notice-title.js +11 -0
- package/ebay-notice-base/index.d.ts +3 -0
- package/ebay-notice-base/index.d.ts.map +1 -0
- package/ebay-notice-base/index.js +6 -0
- package/ebay-notice-content/README.md +6 -0
- package/ebay-notice-content/index.d.ts +2 -0
- package/ebay-notice-content/index.d.ts.map +1 -0
- package/ebay-notice-content/index.js +4 -0
- package/ebay-page-notice/README.md +48 -0
- package/ebay-page-notice/index.d.ts +5 -0
- package/ebay-page-notice/index.d.ts.map +1 -0
- package/ebay-page-notice/index.js +10 -0
- package/ebay-page-notice/page-notice-footer.d.ts +8 -0
- package/ebay-page-notice/page-notice-footer.d.ts.map +1 -0
- package/ebay-page-notice/page-notice-footer.js +12 -0
- package/ebay-page-notice/page-notice-title.d.ts +8 -0
- package/ebay-page-notice/page-notice-title.d.ts.map +1 -0
- package/ebay-page-notice/page-notice-title.js +34 -0
- package/ebay-page-notice/page-notice.d.ts +8 -0
- package/ebay-page-notice/page-notice.d.ts.map +1 -0
- package/ebay-page-notice/page-notice.js +45 -0
- package/ebay-pagination/README.md +72 -0
- package/ebay-pagination/const.d.ts +3 -0
- package/ebay-pagination/const.d.ts.map +1 -0
- package/ebay-pagination/const.js +5 -0
- package/ebay-pagination/helpers.d.ts +11 -0
- package/ebay-pagination/helpers.d.ts.map +1 -0
- package/ebay-pagination/helpers.js +67 -0
- package/ebay-pagination/index.d.ts +4 -0
- package/ebay-pagination/index.d.ts.map +1 -0
- package/ebay-pagination/index.js +6 -0
- package/ebay-pagination/pagination-item.d.ts +23 -0
- package/ebay-pagination/pagination-item.d.ts.map +1 -0
- package/ebay-pagination/pagination-item.js +62 -0
- package/ebay-pagination/pagination.d.ts +17 -0
- package/ebay-pagination/pagination.d.ts.map +1 -0
- package/ebay-pagination/pagination.js +119 -0
- package/ebay-pagination/types.d.ts +3 -0
- package/ebay-pagination/types.d.ts.map +1 -0
- package/ebay-pagination/types.js +2 -0
- package/ebay-panel-dialog/README.md +34 -0
- package/ebay-panel-dialog/index.d.ts +2 -0
- package/ebay-panel-dialog/index.d.ts.map +1 -0
- package/ebay-panel-dialog/index.js +4 -0
- package/ebay-panel-dialog/panel-dialog.d.ts +13 -0
- package/ebay-panel-dialog/panel-dialog.d.ts.map +1 -0
- package/ebay-panel-dialog/panel-dialog.js +39 -0
- package/ebay-progress-bar/README.md +34 -0
- package/ebay-progress-bar/index.d.ts +2 -0
- package/ebay-progress-bar/index.d.ts.map +1 -0
- package/ebay-progress-bar/index.js +4 -0
- package/ebay-progress-bar/progress-bar.d.ts +7 -0
- package/ebay-progress-bar/progress-bar.d.ts.map +1 -0
- package/ebay-progress-bar/progress-bar.js +34 -0
- package/ebay-progress-spinner/README.md +33 -0
- package/ebay-progress-spinner/index.d.ts +2 -0
- package/ebay-progress-spinner/index.d.ts.map +1 -0
- package/ebay-progress-spinner/index.js +4 -0
- package/ebay-progress-spinner/progress-spinner.d.ts +10 -0
- package/ebay-progress-spinner/progress-spinner.d.ts.map +1 -0
- package/ebay-progress-spinner/progress-spinner.js +40 -0
- package/ebay-progress-stepper/README.md +84 -0
- package/ebay-progress-stepper/ebay-progress-step.d.ts +13 -0
- package/ebay-progress-stepper/ebay-progress-step.d.ts.map +1 -0
- package/ebay-progress-stepper/ebay-progress-step.js +82 -0
- package/ebay-progress-stepper/ebay-progress-stepper.d.ts +11 -0
- package/ebay-progress-stepper/ebay-progress-stepper.d.ts.map +1 -0
- package/ebay-progress-stepper/ebay-progress-stepper.js +77 -0
- package/ebay-progress-stepper/ebay-progress-title.d.ts +8 -0
- package/ebay-progress-stepper/ebay-progress-title.d.ts.map +1 -0
- package/ebay-progress-stepper/ebay-progress-title.js +8 -0
- package/ebay-progress-stepper/index.d.ts +5 -0
- package/ebay-progress-stepper/index.d.ts.map +1 -0
- package/ebay-progress-stepper/index.js +8 -0
- package/ebay-progress-stepper/types.d.ts +4 -0
- package/ebay-progress-stepper/types.d.ts.map +1 -0
- package/ebay-progress-stepper/types.js +2 -0
- package/ebay-radio/README.md +52 -0
- package/ebay-radio/index.d.ts +2 -0
- package/ebay-radio/index.d.ts.map +1 -0
- package/ebay-radio/index.js +4 -0
- package/ebay-radio/radio.d.ts +10 -0
- package/ebay-radio/radio.d.ts.map +1 -0
- package/ebay-radio/radio.js +76 -0
- package/ebay-section-notice/README.md +47 -0
- package/ebay-section-notice/index.d.ts +5 -0
- package/ebay-section-notice/index.d.ts.map +1 -0
- package/ebay-section-notice/index.js +10 -0
- package/ebay-section-notice/section-notice-footer.d.ts +8 -0
- package/ebay-section-notice/section-notice-footer.d.ts.map +1 -0
- package/ebay-section-notice/section-notice-footer.js +12 -0
- package/ebay-section-notice/section-notice-title.d.ts +8 -0
- package/ebay-section-notice/section-notice-title.d.ts.map +1 -0
- package/ebay-section-notice/section-notice-title.js +34 -0
- package/ebay-section-notice/section-notice.d.ts +10 -0
- package/ebay-section-notice/section-notice.d.ts.map +1 -0
- package/ebay-section-notice/section-notice.js +50 -0
- package/ebay-section-title/README.md +70 -0
- package/ebay-section-title/cta.d.ts +10 -0
- package/ebay-section-title/cta.d.ts.map +1 -0
- package/ebay-section-title/cta.js +41 -0
- package/ebay-section-title/index.d.ts +6 -0
- package/ebay-section-title/index.d.ts.map +1 -0
- package/ebay-section-title/index.js +12 -0
- package/ebay-section-title/info.d.ts +5 -0
- package/ebay-section-title/info.d.ts.map +1 -0
- package/ebay-section-title/info.js +34 -0
- package/ebay-section-title/overflow.d.ts +5 -0
- package/ebay-section-title/overflow.d.ts.map +1 -0
- package/ebay-section-title/overflow.js +34 -0
- package/ebay-section-title/section-title.d.ts +9 -0
- package/ebay-section-title/section-title.d.ts.map +1 -0
- package/ebay-section-title/section-title.js +49 -0
- package/ebay-section-title/subtitle.d.ts +5 -0
- package/ebay-section-title/subtitle.d.ts.map +1 -0
- package/ebay-section-title/subtitle.js +34 -0
- package/ebay-section-title/title.d.ts +5 -0
- package/ebay-section-title/title.d.ts.map +1 -0
- package/ebay-section-title/title.js +34 -0
- package/ebay-select/README.md +62 -0
- package/ebay-select/ebay-select-option.d.ts +7 -0
- package/ebay-select/ebay-select-option.d.ts.map +1 -0
- package/ebay-select/ebay-select-option.js +33 -0
- package/ebay-select/ebay-select.d.ts +13 -0
- package/ebay-select/ebay-select.d.ts.map +1 -0
- package/ebay-select/ebay-select.js +137 -0
- package/ebay-select/index.d.ts +3 -0
- package/ebay-select/index.d.ts.map +1 -0
- package/ebay-select/index.js +6 -0
- package/ebay-signal/README.md +35 -0
- package/ebay-signal/index.d.ts +2 -0
- package/ebay-signal/index.d.ts.map +1 -0
- package/ebay-signal/index.js +4 -0
- package/ebay-signal/signal.d.ts +8 -0
- package/ebay-signal/signal.d.ts.map +1 -0
- package/ebay-signal/signal.js +35 -0
- package/ebay-svg/README.md +19 -0
- package/ebay-svg/index.d.ts +2 -0
- package/ebay-svg/index.d.ts.map +1 -0
- package/ebay-svg/index.js +4 -0
- package/ebay-svg/svg.d.ts +4 -0
- package/ebay-svg/svg.d.ts.map +1 -0
- package/ebay-svg/svg.js +545 -0
- package/ebay-switch/README.md +33 -0
- package/ebay-switch/ebay-switch.d.ts +7 -0
- package/ebay-switch/ebay-switch.d.ts.map +1 -0
- package/ebay-switch/ebay-switch.js +64 -0
- package/ebay-switch/index.d.ts +2 -0
- package/ebay-switch/index.d.ts.map +1 -0
- package/ebay-switch/index.js +4 -0
- package/ebay-tab/README.md +1 -0
- package/ebay-tab/enums.d.ts +14 -0
- package/ebay-tab/enums.d.ts.map +1 -0
- package/ebay-tab/enums.js +17 -0
- package/ebay-tab/index.d.ts +6 -0
- package/ebay-tab/index.d.ts.map +1 -0
- package/ebay-tab/index.js +12 -0
- package/ebay-tabs/README.md +59 -0
- package/ebay-tabs/index.d.ts +5 -0
- package/ebay-tabs/index.d.ts.map +1 -0
- package/ebay-tabs/index.js +8 -0
- package/ebay-tabs/tab-panel.d.ts +9 -0
- package/ebay-tabs/tab-panel.d.ts.map +1 -0
- package/ebay-tabs/tab-panel.js +35 -0
- package/ebay-tabs/tab.d.ts +12 -0
- package/ebay-tabs/tab.d.ts.map +1 -0
- package/ebay-tabs/tab.js +36 -0
- package/ebay-tabs/tabs.d.ts +28 -0
- package/ebay-tabs/tabs.d.ts.map +1 -0
- package/ebay-tabs/tabs.js +137 -0
- package/ebay-tabs/types.d.ts +3 -0
- package/ebay-tabs/types.d.ts.map +1 -0
- package/ebay-tabs/types.js +2 -0
- package/ebay-textbox/README.md +72 -0
- package/ebay-textbox/index.d.ts +5 -0
- package/ebay-textbox/index.d.ts.map +1 -0
- package/ebay-textbox/index.js +8 -0
- package/ebay-textbox/postfix-icon.d.ts +5 -0
- package/ebay-textbox/postfix-icon.d.ts.map +1 -0
- package/ebay-textbox/postfix-icon.js +15 -0
- package/ebay-textbox/prefix-icon.d.ts +5 -0
- package/ebay-textbox/prefix-icon.d.ts.map +1 -0
- package/ebay-textbox/prefix-icon.js +12 -0
- package/ebay-textbox/textbox.d.ts +20 -0
- package/ebay-textbox/textbox.d.ts.map +1 -0
- package/ebay-textbox/textbox.js +106 -0
- package/ebay-textbox/types.d.ts +9 -0
- package/ebay-textbox/types.d.ts.map +1 -0
- package/ebay-textbox/types.js +2 -0
- package/ebay-toast-dialog/README.md +24 -0
- package/ebay-toast-dialog/components/toast.d.ts +8 -0
- package/ebay-toast-dialog/components/toast.d.ts.map +1 -0
- package/ebay-toast-dialog/components/toast.js +36 -0
- package/ebay-toast-dialog/index.d.ts +2 -0
- package/ebay-toast-dialog/index.d.ts.map +1 -0
- package/ebay-toast-dialog/index.js +4 -0
- package/ebay-tooltip/README.md +55 -0
- package/ebay-tooltip/ebay-tooltip-content.d.ts +8 -0
- package/ebay-tooltip/ebay-tooltip-content.d.ts.map +1 -0
- package/ebay-tooltip/ebay-tooltip-content.js +8 -0
- package/ebay-tooltip/ebay-tooltip-host.d.ts +8 -0
- package/ebay-tooltip/ebay-tooltip-host.d.ts.map +1 -0
- package/ebay-tooltip/ebay-tooltip-host.js +8 -0
- package/ebay-tooltip/ebay-tooltip.d.ts +12 -0
- package/ebay-tooltip/ebay-tooltip.d.ts.map +1 -0
- package/ebay-tooltip/ebay-tooltip.js +92 -0
- package/ebay-tooltip/index.d.ts +6 -0
- package/ebay-tooltip/index.d.ts.map +1 -0
- package/ebay-tooltip/index.js +13 -0
- package/index.d.ts +38 -0
- package/index.d.ts.map +1 -0
- package/index.js +114 -0
- package/package.json +106 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notice-title.d.ts","sourceRoot":"","sources":["../../../../src/ebay-notice-base/components/ebay-notice-title/notice-title.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAa,MAAM,OAAO,CAAA;AAM5C,QAAA,MAAM,eAAe,EAAE,EAItB,CAAA;AAED,eAAe,eAAe,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var react_1 = __importDefault(require("react"));
|
|
7
|
+
var EbayNoticeTitle = function (_a) {
|
|
8
|
+
var children = _a.children;
|
|
9
|
+
return (react_1.default.createElement("span", { className: "page-notice__title" }, children));
|
|
10
|
+
};
|
|
11
|
+
exports.default = EbayNoticeTitle;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-notice-base/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var ebay_notice_title_1 = require("./components/ebay-notice-title");
|
|
4
|
+
Object.defineProperty(exports, "EbayNoticeTitle", { enumerable: true, get: function () { return ebay_notice_title_1.EbayNoticeTitle; } });
|
|
5
|
+
var ebay_notice_content_1 = require("./components/ebay-notice-content");
|
|
6
|
+
Object.defineProperty(exports, "EbayNoticeContent", { enumerable: true, get: function () { return ebay_notice_content_1.EbayNoticeContent; } });
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# DEPRECATED
|
|
2
|
+
Use those instead:
|
|
3
|
+
- `import { EbayNoticeContent } from '@ebay/ui-core-react/ebay-notice-base`
|
|
4
|
+
- `import { EbayNoticeContent } from '@ebay/ui-core-react/ebay-page-notice`
|
|
5
|
+
- `import { EbayNoticeContent } from '@ebay/ui-core-react/ebay-section-notice`
|
|
6
|
+
- `import { EbayNoticeContent } from '@ebay/ui-core-react/ebay-inline-notice`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-notice-content/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var ebay_notice_base_1 = require("../ebay-notice-base");
|
|
4
|
+
Object.defineProperty(exports, "EbayNoticeContent", { enumerable: true, get: function () { return ebay_notice_base_1.EbayNoticeContent; } });
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# ebay-page-notice
|
|
2
|
+
|
|
3
|
+
## Demo
|
|
4
|
+
|
|
5
|
+
[Storybook](https://opensource.ebay.com/ebayui-core-react/main/?path=/story/ebay-page-notice--confirmation-message)
|
|
6
|
+
|
|
7
|
+
## Import JS
|
|
8
|
+
|
|
9
|
+
```jsx harmony
|
|
10
|
+
import {
|
|
11
|
+
EbayPageNotice,
|
|
12
|
+
EbayNoticeContent,
|
|
13
|
+
EbayPageNoticeTitle,
|
|
14
|
+
EbayPageNoticeFooter,
|
|
15
|
+
} from '@ebay/ui-core-react/ebay-page-notice'
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### Import following styles from SKIN
|
|
19
|
+
|
|
20
|
+
```jsx harmony
|
|
21
|
+
import "@ebay/skin/page-notice";
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Use
|
|
25
|
+
|
|
26
|
+
```jsx harmony
|
|
27
|
+
<EbayPageNotice status="attention">
|
|
28
|
+
<EbayNoticeContent>
|
|
29
|
+
<EbayPageNoticeTitle>Your order's in!</EbayPageNoticeTitle>
|
|
30
|
+
<p>
|
|
31
|
+
<strong>Error.</strong> Please take another look at the following:
|
|
32
|
+
<br />
|
|
33
|
+
<a href="#">Card number</a>, <a href="#">Expiration date</a> & <a href="#">Security code</a>.
|
|
34
|
+
</p>
|
|
35
|
+
</EbayNoticeContent>
|
|
36
|
+
<EbaySectionNoticeFooter>
|
|
37
|
+
<EbayButton>Action</EbayButton>
|
|
38
|
+
</EbaySectionNoticeFooter>
|
|
39
|
+
</EbayPageNotice>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Attributes
|
|
43
|
+
|
|
44
|
+
| Name | Type | Stateful | Description | Default |
|
|
45
|
+
| ------------ | ----------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
|
|
46
|
+
| `status` | String ( `"general"`,`"attention"`, `"confirmation"`, or `"information"`) | No | Determines the style and type of notice to be displayed | `"general"` |
|
|
47
|
+
| `aria-label` | String | No | The description of the notice itself for screen readers. Check out [this issue](https://github.com/eBay/skin/issues/1001) for more context. | - |
|
|
48
|
+
| `children` | React Node | No | The content to be displayed within the notice | - |
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as EbayPageNotice } from './page-notice';
|
|
2
|
+
export { default as EbayPageNoticeTitle } from './page-notice-title';
|
|
3
|
+
export { default as EbayPageNoticeFooter } from './page-notice-footer';
|
|
4
|
+
export { EbayNoticeContent } from '../ebay-notice-base/components/ebay-notice-content';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-page-notice/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,eAAe,CAAA;AACzD,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AACpE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var page_notice_1 = require("./page-notice");
|
|
4
|
+
Object.defineProperty(exports, "EbayPageNotice", { enumerable: true, get: function () { return page_notice_1.default; } });
|
|
5
|
+
var page_notice_title_1 = require("./page-notice-title");
|
|
6
|
+
Object.defineProperty(exports, "EbayPageNoticeTitle", { enumerable: true, get: function () { return page_notice_title_1.default; } });
|
|
7
|
+
var page_notice_footer_1 = require("./page-notice-footer");
|
|
8
|
+
Object.defineProperty(exports, "EbayPageNoticeFooter", { enumerable: true, get: function () { return page_notice_footer_1.default; } });
|
|
9
|
+
var ebay_notice_content_1 = require("../ebay-notice-base/components/ebay-notice-content");
|
|
10
|
+
Object.defineProperty(exports, "EbayNoticeContent", { enumerable: true, get: function () { return ebay_notice_content_1.EbayNoticeContent; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-notice-footer.d.ts","sourceRoot":"","sources":["../../src/ebay-page-notice/page-notice-footer.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAG5C,aAAK,KAAK,GAAG;IACT,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB,CAAA;AAED,QAAA,MAAM,oBAAoB,EAAE,EAAE,CAAC,KAAK,CAInC,CAAA;AAED,eAAe,oBAAoB,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var react_1 = __importDefault(require("react"));
|
|
7
|
+
var notice_footer_1 = __importDefault(require("../common/notice-utils/notice-footer"));
|
|
8
|
+
var EbayPageNoticeFooter = function (_a) {
|
|
9
|
+
var className = _a.className, children = _a.children;
|
|
10
|
+
return (react_1.default.createElement(notice_footer_1.default, { className: className, type: "page" }, children));
|
|
11
|
+
};
|
|
12
|
+
exports.default = EbayPageNoticeFooter;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
declare type Props = React.HTMLProps<HTMLHeadingElement> & {
|
|
3
|
+
as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
4
|
+
className?: string;
|
|
5
|
+
};
|
|
6
|
+
declare const EbayPageNoticeTitle: FC<Props>;
|
|
7
|
+
export default EbayPageNoticeTitle;
|
|
8
|
+
//# sourceMappingURL=page-notice-title.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-notice-title.d.ts","sourceRoot":"","sources":["../../src/ebay-page-notice/page-notice-title.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAGjC,aAAK,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,kBAAkB,CAAC,GAAG;IAC/C,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,mBAAmB,EAAE,EAAE,CAAC,KAAK,CAIlC,CAAA;AAED,eAAe,mBAAmB,CAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
var react_1 = __importDefault(require("react"));
|
|
29
|
+
var notice_title_1 = __importDefault(require("../common/notice-utils/notice-title"));
|
|
30
|
+
var EbayPageNoticeTitle = function (_a) {
|
|
31
|
+
var className = _a.className, as = _a.as, children = _a.children, rest = __rest(_a, ["className", "as", "children"]);
|
|
32
|
+
return (react_1.default.createElement(notice_title_1.default, __assign({}, rest, { className: className, as: as, type: "page" }), children));
|
|
33
|
+
};
|
|
34
|
+
exports.default = EbayPageNoticeTitle;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
declare type Props = React.HTMLProps<HTMLElement> & {
|
|
3
|
+
status?: 'general' | 'attention' | 'confirmation' | 'information';
|
|
4
|
+
'aria-label'?: string;
|
|
5
|
+
};
|
|
6
|
+
declare const EbayPageNotice: FC<Props>;
|
|
7
|
+
export default EbayPageNotice;
|
|
8
|
+
//# sourceMappingURL=page-notice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-notice.d.ts","sourceRoot":"","sources":["../../src/ebay-page-notice/page-notice.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,EAAgB,MAAM,OAAO,CAAA;AAK/C,aAAK,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,GAAG;IACxC,MAAM,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,cAAc,GAAG,aAAa,CAAC;IAClE,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,QAAA,MAAM,cAAc,EAAE,EAAE,CAAC,KAAK,CAgC7B,CAAA;AAED,eAAe,cAAc,CAAA"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
var react_1 = __importDefault(require("react"));
|
|
29
|
+
var notice_content_1 = __importDefault(require("../common/notice-utils/notice-content"));
|
|
30
|
+
var ebay_notice_content_1 = require("../ebay-notice-base/components/ebay-notice-content");
|
|
31
|
+
var icon_1 = __importDefault(require("../ebay-icon/icon"));
|
|
32
|
+
var EbayPageNotice = function (_a) {
|
|
33
|
+
var _b = _a.status, status = _b === void 0 ? 'general' : _b, children = _a.children, ariaLabel = _a["aria-label"], rest = __rest(_a, ["status", "children", 'aria-label']);
|
|
34
|
+
var childrenArray = react_1.default.Children.toArray(children);
|
|
35
|
+
var content = childrenArray.find(function (child) { return child.type === ebay_notice_content_1.EbayNoticeContent; });
|
|
36
|
+
if (!content) {
|
|
37
|
+
throw new Error("EbayPageNotice: Please use a EbayNoticeContent that defines the content of the notice");
|
|
38
|
+
}
|
|
39
|
+
return (react_1.default.createElement("section", __assign({}, rest, { "aria-labelledby": status + "-status", className: "page-notice " + (status !== "general" ? "page-notice--" + status : ""), role: "region" }),
|
|
40
|
+
status !== "general" ? (react_1.default.createElement("div", { className: "page-notice__header", id: status + "-status" },
|
|
41
|
+
react_1.default.createElement(icon_1.default, { name: status + "-filled", a11yText: ariaLabel, a11yVariant: "label" }))) : null,
|
|
42
|
+
react_1.default.createElement(notice_content_1.default, __assign({}, content.props, { type: "page" })),
|
|
43
|
+
children));
|
|
44
|
+
};
|
|
45
|
+
exports.default = EbayPageNotice;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# EbayPagination
|
|
2
|
+
|
|
3
|
+
The `<EbayPagination>` is a tag used to create a pagination navigation. It will display up to 9 page links.
|
|
4
|
+
If pagination doesn't fit the page it will adjust to the available width.
|
|
5
|
+
|
|
6
|
+
## Import JS
|
|
7
|
+
```jsx harmony
|
|
8
|
+
import { EbayPagination, EbayPaginationItem } from '@ebay/ui-core-react/ebay-pagination'
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Import styles from Skin
|
|
12
|
+
```jsx harmony
|
|
13
|
+
import '@ebay/skin/pagination'
|
|
14
|
+
import '@ebay/skin/utility'
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### or if using CSS/SCSS
|
|
18
|
+
```jsx
|
|
19
|
+
import '@ebay/skin/pagination.css'
|
|
20
|
+
import '@ebay/skin/utility.css'
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### EbayPagination Usage
|
|
24
|
+
|
|
25
|
+
```React
|
|
26
|
+
<EbayPagination a11yPreviousText="Previous page" a11yNextText="Next page" a11yCurrentText="Results Pagination - Page 2">
|
|
27
|
+
<EbayPaginationItem href="#" type="previous" disabled/>
|
|
28
|
+
<EbayPaginationItem href="#" current>item 1</EbayPaginationItem>
|
|
29
|
+
<EbayPaginationItem href="#">item 2</EbayPaginationItem>
|
|
30
|
+
<EbayPaginationItem href="#">item 3</EbayPaginationItem>
|
|
31
|
+
<EbayPaginationItem href="#" type="next"/>
|
|
32
|
+
</EbayPagination>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### EbayPagination Attributes
|
|
36
|
+
|
|
37
|
+
Name | Type | Stateful | Description
|
|
38
|
+
--- | --- | --- | ---
|
|
39
|
+
`a11yPreviousText` | String | No | a11y text for previous arrow button
|
|
40
|
+
`a11yNextText` | String | No | a11y text for next arrow button
|
|
41
|
+
`a11yCurrentText` | String | No | Description for the current page (e.g. Results of Page 1)
|
|
42
|
+
`variant` | String | No | Either `show-last`, or `show-range` (default). If show-last then will show the last page always and will put `…` between the last visible range and the last page. `…` and the last page will take up two items in the range. `…` will be hidden when the range to the last item is fully visible.
|
|
43
|
+
`fluid` | Boolean | No | Will fill all available horizontal space. Horizontal space will be distributed around each item as necessary.
|
|
44
|
+
|
|
45
|
+
### EbayPagination Events
|
|
46
|
+
|
|
47
|
+
Event | Data | Description
|
|
48
|
+
--- | --- | ---
|
|
49
|
+
`onPrevious` | `{ originalEvent }`| clicked previous arrow button
|
|
50
|
+
`onNext` | `{ originalEvent }` | clicked next arrow button
|
|
51
|
+
`onSelect` | `{ originalEvent, value, index }` | page selected clicked
|
|
52
|
+
|
|
53
|
+
## EbayPaginationItem Tag
|
|
54
|
+
|
|
55
|
+
### EbayPaginationItem Usage
|
|
56
|
+
|
|
57
|
+
```React
|
|
58
|
+
<EbayPaginationItem>1</EbayPaginationItem>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### EbayPaginationItem Attributes
|
|
62
|
+
|
|
63
|
+
Name | Type | Stateful | Description
|
|
64
|
+
--- | --- | --- | ---
|
|
65
|
+
`disabled` | Boolean | No | Previous/next button is disabled or not
|
|
66
|
+
`href` | String | No | for link that looks like a menu-item; omitting the href will switch to a button
|
|
67
|
+
`current` | Boolean | No | the current page
|
|
68
|
+
`type` | String | No | "previous", "next" or "page"(default). To specify if the information entered is for the previous or next arrow button or a page. If the `type='previous|next'` isn't provided the previous/next arrow buttons will be taken as `disabled`
|
|
69
|
+
|
|
70
|
+
Notes:
|
|
71
|
+
|
|
72
|
+
* If you want to have client side or ajax based navigation then you should omit the `href` attribute on each item. This will cause each item to be `<button>` instead of an `<a>`.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"const.d.ts","sourceRoot":"","sources":["../../src/ebay-pagination/const.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,IAAI,CAAA;AAC1B,eAAO,MAAM,SAAS,IAAI,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ItemState, PaginationVariant } from './types';
|
|
2
|
+
export declare function pageNumbersAround(totalPages: number, selectedPage: number, maxVisiblePages?: number, withDots?: boolean): ItemState[];
|
|
3
|
+
export declare function calcPageState(selectedPage: number, visiblePages: number, totalPages: number, variant?: PaginationVariant): ItemState[];
|
|
4
|
+
/**
|
|
5
|
+
* Calculates the maximum width for an element within its container.
|
|
6
|
+
*
|
|
7
|
+
* Based on eBayUI Core Marko implementation.
|
|
8
|
+
* See https://github.com/eBay/ebayui-core/blob/v8.6.0/src/components/ebay-pagination/component.js#L119-L132
|
|
9
|
+
*/
|
|
10
|
+
export declare function getMaxWidth(el?: HTMLElement): number;
|
|
11
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/ebay-pagination/helpers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAEtD,wBAAgB,iBAAiB,CAC7B,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,EACpB,eAAe,GAAE,MAAmB,EACpC,QAAQ,UAAQ,GACjB,SAAS,EAAE,CA6Bb;AAED,wBAAgB,aAAa,CACzB,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,iBAAgC,GAC1C,SAAS,EAAE,CAQb;AAaD;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,EAAE,CAAC,EAAE,WAAW,GAAG,MAAM,CASpD"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getMaxWidth = exports.calcPageState = exports.pageNumbersAround = void 0;
|
|
4
|
+
var const_1 = require("./const");
|
|
5
|
+
function pageNumbersAround(totalPages, selectedPage, maxVisiblePages, withDots) {
|
|
6
|
+
if (maxVisiblePages === void 0) { maxVisiblePages = totalPages; }
|
|
7
|
+
if (withDots === void 0) { withDots = false; }
|
|
8
|
+
var visibleItems = Math.min(maxVisiblePages, totalPages);
|
|
9
|
+
var startIndexWithoutDots = Math.max(0, selectedPage - Math.ceil((visibleItems - 1) / 2));
|
|
10
|
+
var startIndexWithDots = visibleItems < 4 ? selectedPage :
|
|
11
|
+
Math.max(0, selectedPage - Math.floor((visibleItems - 1) / 2));
|
|
12
|
+
var endIndex = (withDots ? startIndexWithDots : startIndexWithoutDots) + visibleItems;
|
|
13
|
+
var closeToEnd = endIndex >= totalPages;
|
|
14
|
+
var visibleRangeWithDots = function (start, end) {
|
|
15
|
+
var items = visibleRange(totalPages, start, end);
|
|
16
|
+
if (visibleItems > 2) {
|
|
17
|
+
items[end - 2] = 'dots';
|
|
18
|
+
items[end - 1] = 'hidden';
|
|
19
|
+
items[totalPages - 1] = 'visible';
|
|
20
|
+
}
|
|
21
|
+
else if (visibleItems > 1) {
|
|
22
|
+
items[end - 1] = 'dots';
|
|
23
|
+
}
|
|
24
|
+
return items;
|
|
25
|
+
};
|
|
26
|
+
if (closeToEnd) {
|
|
27
|
+
return visibleRange(totalPages, totalPages - visibleItems);
|
|
28
|
+
}
|
|
29
|
+
return withDots ?
|
|
30
|
+
visibleRangeWithDots(startIndexWithDots, endIndex) :
|
|
31
|
+
visibleRange(totalPages, startIndexWithoutDots, endIndex);
|
|
32
|
+
}
|
|
33
|
+
exports.pageNumbersAround = pageNumbersAround;
|
|
34
|
+
function calcPageState(selectedPage, visiblePages, totalPages, variant) {
|
|
35
|
+
if (variant === void 0) { variant = 'show-range'; }
|
|
36
|
+
if (selectedPage === -1) {
|
|
37
|
+
return [];
|
|
38
|
+
}
|
|
39
|
+
var adjustedNumPages = clamp(Math.min(totalPages, visiblePages), const_1.MIN_PAGES, const_1.MAX_PAGES);
|
|
40
|
+
return pageNumbersAround(totalPages, selectedPage - 1, adjustedNumPages, variant === 'show-last');
|
|
41
|
+
}
|
|
42
|
+
exports.calcPageState = calcPageState;
|
|
43
|
+
function clamp(n, min, max) {
|
|
44
|
+
// eslint-disable-next-line no-nested-ternary
|
|
45
|
+
return n <= min ? min : n >= max ? max : n;
|
|
46
|
+
}
|
|
47
|
+
function visibleRange(totalItems, start, end) {
|
|
48
|
+
return Array(totalItems)
|
|
49
|
+
.fill('hidden')
|
|
50
|
+
.fill('visible', start, end);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Calculates the maximum width for an element within its container.
|
|
54
|
+
*
|
|
55
|
+
* Based on eBayUI Core Marko implementation.
|
|
56
|
+
* See https://github.com/eBay/ebayui-core/blob/v8.6.0/src/components/ebay-pagination/component.js#L119-L132
|
|
57
|
+
*/
|
|
58
|
+
function getMaxWidth(el) {
|
|
59
|
+
if (!el) {
|
|
60
|
+
return 0;
|
|
61
|
+
}
|
|
62
|
+
el.style.width = '100vw';
|
|
63
|
+
var result = el.offsetWidth;
|
|
64
|
+
el.style.width = null;
|
|
65
|
+
return result;
|
|
66
|
+
}
|
|
67
|
+
exports.getMaxWidth = getMaxWidth;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-pagination/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var pagination_1 = require("./pagination");
|
|
4
|
+
Object.defineProperty(exports, "EbayPagination", { enumerable: true, get: function () { return pagination_1.default; } });
|
|
5
|
+
var pagination_item_1 = require("./pagination-item");
|
|
6
|
+
Object.defineProperty(exports, "EbayPaginationItem", { enumerable: true, get: function () { return pagination_item_1.default; } });
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React, { Key, ReactNode, RefObject, StyleHTMLAttributes, MouseEvent, ComponentProps } from 'react';
|
|
2
|
+
export declare type PaginationItemType = 'previous' | 'next' | 'page';
|
|
3
|
+
declare type HtmlProps = Omit<ComponentProps<'button'>, 'type'> & ComponentProps<'a'> & ComponentProps<'li'>;
|
|
4
|
+
export declare type PaginationItemProps = HtmlProps & {
|
|
5
|
+
pageIndex?: number;
|
|
6
|
+
key?: Key;
|
|
7
|
+
type?: PaginationItemType;
|
|
8
|
+
current?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
href?: string;
|
|
11
|
+
hide?: boolean;
|
|
12
|
+
a11yPreviousText?: string;
|
|
13
|
+
a11yNextText?: string;
|
|
14
|
+
onSelect?: (e: MouseEvent | KeyboardEvent, value: string, index: number) => void;
|
|
15
|
+
onNext?: (e: MouseEvent | KeyboardEvent) => void;
|
|
16
|
+
onPrevious?: (e: MouseEvent | KeyboardEvent) => void;
|
|
17
|
+
style?: StyleHTMLAttributes<HTMLButtonElement & HTMLAnchorElement>;
|
|
18
|
+
forwardedRef?: RefObject<HTMLAnchorElement & HTMLButtonElement>;
|
|
19
|
+
children?: ReactNode;
|
|
20
|
+
};
|
|
21
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<PaginationItemProps, "form" | "slot" | "style" | "title" | "type" | "download" | "name" | "className" | "forwardedRef" | "color" | "id" | "lang" | "media" | "target" | "role" | "tabIndex" | "href" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "disabled" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value" | "hrefLang" | "ping" | "rel" | "referrerPolicy" | "hide" | "pageIndex" | "current" | "a11yPreviousText" | "a11yNextText" | "onNext" | "onPrevious"> & React.RefAttributes<React.FC<PaginationItemProps>>>;
|
|
22
|
+
export default _default;
|
|
23
|
+
//# sourceMappingURL=pagination-item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination-item.d.ts","sourceRoot":"","sources":["../../src/ebay-pagination/pagination-item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAM,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,mBAAmB,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAK7G,oBAAY,kBAAkB,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,CAAA;AAC7D,aAAK,SAAS,GAAG,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,GAAG,cAAc,CAAC,GAAG,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC,CAAA;AACpG,oBAAY,mBAAmB,GAAG,SAAS,GAAG;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,GAAG,aAAa,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjF,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,GAAG,aAAa,KAAK,IAAI,CAAC;IACjD,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,GAAG,aAAa,KAAK,IAAI,CAAC;IACrD,KAAK,CAAC,EAAE,mBAAmB,CAAC,iBAAiB,GAAG,iBAAiB,CAAC,CAAC;IACnE,YAAY,CAAC,EAAE,SAAS,CAAC,iBAAiB,GAAG,iBAAiB,CAAC,CAAC;IAChE,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB,CAAC;;AAyFF,wBAAiD"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
var react_1 = __importDefault(require("react"));
|
|
29
|
+
var ebay_icon_1 = require("../ebay-icon");
|
|
30
|
+
var component_utils_1 = require("../common/component-utils");
|
|
31
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
32
|
+
var EbayPaginationItem = function (_a) {
|
|
33
|
+
var _b = _a.pageIndex, pageIndex = _b === void 0 ? 0 : _b, key = _a.key, current = _a.current, disabled = _a.disabled, _c = _a.type, type = _c === void 0 ? 'page' : _c, href = _a.href, hide = _a.hide, children = _a.children, _d = _a.a11yPreviousText, a11yPreviousText = _d === void 0 ? 'Previous page' : _d, _e = _a.a11yNextText, a11yNextText = _e === void 0 ? 'Next page' : _e, onSelect = _a.onSelect, onNext = _a.onNext, onPrevious = _a.onPrevious, className = _a.className, style = _a.style, forwardedRef = _a.forwardedRef, rest = __rest(_a, ["pageIndex", "key", "current", "disabled", "type", "href", "hide", "children", "a11yPreviousText", "a11yNextText", "onSelect", "onNext", "onPrevious", "className", "style", "forwardedRef"]);
|
|
34
|
+
var handlePageNumber = function (e) {
|
|
35
|
+
onSelect(e, e.currentTarget.innerText, pageIndex);
|
|
36
|
+
};
|
|
37
|
+
var handleNextPage = function (e) {
|
|
38
|
+
if (!e.currentTarget.getAttribute('aria-disabled')) {
|
|
39
|
+
onNext(e);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
var handlePreviousPage = function (e) {
|
|
43
|
+
if (!e.currentTarget.getAttribute('aria-disabled')) {
|
|
44
|
+
onPrevious(e);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
var isAnchor = !!href;
|
|
48
|
+
var ButtonOrAnchor = isAnchor ? 'a' : 'button';
|
|
49
|
+
var iconClassName = isAnchor ? 'icon-link' : 'icon-btn';
|
|
50
|
+
switch (type) {
|
|
51
|
+
case 'previous':
|
|
52
|
+
return (react_1.default.createElement(ButtonOrAnchor, __assign({}, rest, { ref: forwardedRef, "aria-disabled": disabled ? 'true' : undefined, "aria-label": a11yPreviousText, href: disabled ? undefined : href, className: classnames_1.default(iconClassName, 'pagination__previous'), style: style, onClick: handlePreviousPage }),
|
|
53
|
+
react_1.default.createElement(ebay_icon_1.EbayIcon, { name: "paginationPrev" })));
|
|
54
|
+
case 'next':
|
|
55
|
+
return (react_1.default.createElement(ButtonOrAnchor, __assign({}, rest, { ref: forwardedRef, "aria-disabled": disabled ? 'true' : undefined, "aria-label": a11yNextText, href: disabled ? undefined : href, className: classnames_1.default(iconClassName, 'pagination__next'), style: style, onClick: handleNextPage }),
|
|
56
|
+
react_1.default.createElement(ebay_icon_1.EbayIcon, { name: "paginationNext" })));
|
|
57
|
+
default:
|
|
58
|
+
return (react_1.default.createElement("li", __assign({}, rest, { hidden: hide }),
|
|
59
|
+
react_1.default.createElement(ButtonOrAnchor, { ref: forwardedRef, "aria-current": current ? 'page' : undefined, href: href, className: "pagination__item", style: style, key: key, onClick: handlePageNumber }, children)));
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
exports.default = component_utils_1.withForwardRef(EbayPaginationItem);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ComponentProps, FC } from 'react';
|
|
2
|
+
import { PaginationVariant } from './types';
|
|
3
|
+
declare type PaginationCallback = (e?: Event, value?: string) => void;
|
|
4
|
+
declare type PaginationProps = Omit<ComponentProps<'nav'>, 'onSelect'> & {
|
|
5
|
+
id?: string;
|
|
6
|
+
a11yPreviousText?: string;
|
|
7
|
+
a11yNextText?: string;
|
|
8
|
+
a11yCurrentText?: string;
|
|
9
|
+
onPrevious?: PaginationCallback;
|
|
10
|
+
onNext?: PaginationCallback;
|
|
11
|
+
onSelect?: (e?: Event, value?: string, index?: number) => void;
|
|
12
|
+
variant?: PaginationVariant;
|
|
13
|
+
fluid?: boolean;
|
|
14
|
+
};
|
|
15
|
+
declare const EbayPagination: FC<PaginationProps>;
|
|
16
|
+
export default EbayPagination;
|
|
17
|
+
//# sourceMappingURL=pagination.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../src/ebay-pagination/pagination.tsx"],"names":[],"mappings":"AAAA,OAAc,EACA,cAAc,EAAE,EAAE,EAE/B,MAAM,OAAO,CAAA;AAMd,OAAO,EAAa,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAEtD,aAAK,kBAAkB,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;AAC9D,aAAK,eAAe,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG;IAC7D,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,kBAAkB,CAAC;IAChC,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/D,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,QAAA,MAAM,cAAc,EAAE,EAAE,CAAC,eAAe,CAoGvC,CAAA;AAED,eAAe,cAAc,CAAA"}
|