@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,119 @@
|
|
|
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 __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
16
|
+
}) : (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
o[k2] = m[k];
|
|
19
|
+
}));
|
|
20
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
+
}) : function(o, v) {
|
|
23
|
+
o["default"] = v;
|
|
24
|
+
});
|
|
25
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
26
|
+
if (mod && mod.__esModule) return mod;
|
|
27
|
+
var result = {};
|
|
28
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
29
|
+
__setModuleDefault(result, mod);
|
|
30
|
+
return result;
|
|
31
|
+
};
|
|
32
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
33
|
+
var t = {};
|
|
34
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
35
|
+
t[p] = s[p];
|
|
36
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
37
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
38
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
39
|
+
t[p[i]] = s[p[i]];
|
|
40
|
+
}
|
|
41
|
+
return t;
|
|
42
|
+
};
|
|
43
|
+
var __spreadArrays = (this && this.__spreadArrays) || function () {
|
|
44
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
45
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
46
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
47
|
+
r[k] = a[j];
|
|
48
|
+
return r;
|
|
49
|
+
};
|
|
50
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
51
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
52
|
+
};
|
|
53
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
var react_1 = __importStar(require("react"));
|
|
55
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
56
|
+
var debounce_1 = require("../common/debounce");
|
|
57
|
+
var helpers_1 = require("./helpers");
|
|
58
|
+
var component_utils_1 = require("../common/component-utils");
|
|
59
|
+
var EbayPagination = function (_a) {
|
|
60
|
+
var _b = _a.id, id = _b === void 0 ? 'ebay-pagination' : _b, className = _a.className, _c = _a.a11yCurrentText, a11yCurrentText = _c === void 0 ? 'Pagination - Current Page' : _c, _d = _a.a11yPreviousText, a11yPreviousText = _d === void 0 ? 'Previous page' : _d, _e = _a.a11yNextText, a11yNextText = _e === void 0 ? 'Next page' : _e, _f = _a.variant, variant = _f === void 0 ? 'show-range' : _f, _g = _a.fluid, fluid = _g === void 0 ? false : _g, _h = _a.onPrevious, onPrevious = _h === void 0 ? function () { } : _h, _j = _a.onNext, onNext = _j === void 0 ? function () { } : _j, _k = _a.onSelect, onSelect = _k === void 0 ? function () { } : _k, children = _a.children, rest = __rest(_a, ["id", "className", "a11yCurrentText", "a11yPreviousText", "a11yNextText", "variant", "fluid", "onPrevious", "onNext", "onSelect", "children"]);
|
|
61
|
+
var paginationContainerRef = react_1.useRef(null);
|
|
62
|
+
var childPageRefs = react_1.useRef([]);
|
|
63
|
+
childPageRefs.current = react_1.Children.map(children, react_1.createRef);
|
|
64
|
+
var totalPages = component_utils_1.filterBy(children, function (_a) {
|
|
65
|
+
var props = _a.props;
|
|
66
|
+
return props.type === undefined || props.type === 'page';
|
|
67
|
+
}).length;
|
|
68
|
+
var itemWidthRef = react_1.useRef(0);
|
|
69
|
+
var arrowWidthRef = react_1.useRef(0);
|
|
70
|
+
var getNumOfVisiblePageItems = function () {
|
|
71
|
+
var _a, _b, _c, _d;
|
|
72
|
+
var pageArrowWidth = arrowWidthRef.current || ((_b = (_a = childPageRefs.current[0]) === null || _a === void 0 ? void 0 : _a.current) === null || _b === void 0 ? void 0 : _b.offsetWidth);
|
|
73
|
+
arrowWidthRef.current = pageArrowWidth; // cache arrow width since it should be static
|
|
74
|
+
var pageItemWidth = itemWidthRef.current || ((_d = (_c = childPageRefs.current[1]) === null || _c === void 0 ? void 0 : _c.current) === null || _d === void 0 ? void 0 : _d.offsetWidth);
|
|
75
|
+
itemWidthRef.current = pageItemWidth; // cache item width since it should be static
|
|
76
|
+
return pageItemWidth ?
|
|
77
|
+
Math.floor((helpers_1.getMaxWidth(paginationContainerRef.current) - pageArrowWidth * 2) / pageItemWidth) :
|
|
78
|
+
0;
|
|
79
|
+
};
|
|
80
|
+
var _l = react_1.useState([]), page = _l[0], setPage = _l[1];
|
|
81
|
+
var updatePages = function () {
|
|
82
|
+
var selectedPageIndex = childPageRefs.current.findIndex(function (pageRef) { var _a; return ((_a = pageRef.current) === null || _a === void 0 ? void 0 : _a.getAttribute('aria-current')) === 'page'; });
|
|
83
|
+
var visiblePageItems = getNumOfVisiblePageItems();
|
|
84
|
+
var pageState = helpers_1.calcPageState(selectedPageIndex, visiblePageItems, totalPages, variant);
|
|
85
|
+
setPage(__spreadArrays(['hidden'], pageState));
|
|
86
|
+
};
|
|
87
|
+
react_1.useEffect(function () {
|
|
88
|
+
var debouncedUpdate = debounce_1.debounce(updatePages, 16);
|
|
89
|
+
updatePages();
|
|
90
|
+
window.addEventListener('resize', debouncedUpdate);
|
|
91
|
+
return function () {
|
|
92
|
+
window.removeEventListener('resize', debouncedUpdate);
|
|
93
|
+
};
|
|
94
|
+
}, [children]);
|
|
95
|
+
var createChildItems = function (itemType) {
|
|
96
|
+
var pageIndex = 0;
|
|
97
|
+
return react_1.Children.map(children, function (item, index) {
|
|
98
|
+
var _a = item.props, _b = _a.type, type = _b === void 0 ? 'page' : _b, current = _a.current, disabled = _a.disabled, href = _a.href, text = _a.children;
|
|
99
|
+
var newProps = {
|
|
100
|
+
type: type, current: current, disabled: disabled, href: href,
|
|
101
|
+
children: page[index] === 'dots' ? '…' : text,
|
|
102
|
+
pageIndex: type === 'page' ? pageIndex++ : undefined,
|
|
103
|
+
key: id + "-item-" + index,
|
|
104
|
+
hide: page[index] === 'hidden',
|
|
105
|
+
onPrevious: onPrevious, onNext: onNext, onSelect: onSelect, a11yPreviousText: a11yPreviousText, a11yNextText: a11yNextText,
|
|
106
|
+
ref: childPageRefs.current[index]
|
|
107
|
+
};
|
|
108
|
+
return itemType === type ? react_1.cloneElement(item, newProps) : null;
|
|
109
|
+
});
|
|
110
|
+
};
|
|
111
|
+
var headingId = id + "-pagination-heading";
|
|
112
|
+
return (react_1.default.createElement("nav", __assign({}, rest, { role: "navigation", className: classnames_1.default(className, 'pagination', { 'pagination--fluid': fluid }), "aria-labelledby": headingId, ref: paginationContainerRef }),
|
|
113
|
+
react_1.default.createElement("span", { "aria-live": "polite", role: "status" },
|
|
114
|
+
react_1.default.createElement("h2", { className: "clipped", id: headingId }, a11yCurrentText)),
|
|
115
|
+
createChildItems('previous'),
|
|
116
|
+
react_1.default.createElement("ol", { className: "pagination__items" }, createChildItems('page')),
|
|
117
|
+
createChildItems('next')));
|
|
118
|
+
};
|
|
119
|
+
exports.default = EbayPagination;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ebay-pagination/types.ts"],"names":[],"mappings":"AAAA,oBAAY,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAA;AACrD,oBAAY,iBAAiB,GAAG,WAAW,GAAG,YAAY,CAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# EbayPanelDialog
|
|
2
|
+
|
|
3
|
+
## Usage
|
|
4
|
+
|
|
5
|
+
```react
|
|
6
|
+
<EbayPanelDialog open a11yClosetext="Close">
|
|
7
|
+
<EbayDialogHeader>Heading</EbayDialogHeader>
|
|
8
|
+
<p>Body content</p>
|
|
9
|
+
<EbayCloseButton>X</EbayCloseButton>
|
|
10
|
+
</EbayPanelDialog>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Attributes
|
|
14
|
+
|
|
15
|
+
Name | Type | Stateful | Required | Description
|
|
16
|
+
--- | --- | --- | --- | ---
|
|
17
|
+
`open` | Boolean | Yes | No | Whether dialog is open.
|
|
18
|
+
`position` | String | No | No | `end` or `start` (default), the position of the panel, either at the start (left side) of the page, or end (right side) of the page.
|
|
19
|
+
`focus` | String | No | No | An id for an element which will receive focus when the drawer opens (defaults to close button).
|
|
20
|
+
`a11yCloseText` | String | No | Yes | A11y text for close button and mask.
|
|
21
|
+
`animated` | Boolean | Yes | No | Renders the dialog with an animation. Note that the dialog will always be present in the DOM
|
|
22
|
+
|
|
23
|
+
## Events
|
|
24
|
+
|
|
25
|
+
Event | Data | Description
|
|
26
|
+
--- | --- | ---
|
|
27
|
+
`onOpen` | | Trigggered when dialog is opened
|
|
28
|
+
`onClose` | | Triggered when dialog is closed
|
|
29
|
+
|
|
30
|
+
## EbayDialogHeader
|
|
31
|
+
Will render a header content for the dialog. Will always render the header element even if this is not present
|
|
32
|
+
|
|
33
|
+
## EbayCloseButton
|
|
34
|
+
If present will render this as the close button content. Otherwise will render a close icon (X). This content will be rendered inside a button tag
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-panel-dialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { DialogBaseProps } from '../ebay-dialog-base';
|
|
3
|
+
declare type Position = 'start' | 'end';
|
|
4
|
+
export interface Props<T = any> extends DialogBaseProps<T> {
|
|
5
|
+
open?: boolean;
|
|
6
|
+
animated?: boolean;
|
|
7
|
+
position?: Position;
|
|
8
|
+
onOpen?: () => void;
|
|
9
|
+
onClose?: () => void;
|
|
10
|
+
}
|
|
11
|
+
declare const EbayPanelDialog: FC<Props>;
|
|
12
|
+
export default EbayPanelDialog;
|
|
13
|
+
//# sourceMappingURL=panel-dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel-dialog.d.ts","sourceRoot":"","sources":["../../src/ebay-panel-dialog/panel-dialog.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAE,eAAe,EAAuB,MAAM,qBAAqB,CAAA;AAI1E,aAAK,QAAQ,GAAG,OAAO,GAAG,KAAK,CAAA;AAE/B,MAAM,WAAW,KAAK,CAAC,CAAC,GAAG,GAAG,CAAE,SAAQ,eAAe,CAAC,CAAC,CAAC;IACxD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,QAAA,MAAM,eAAe,EAAE,EAAE,CAAC,KAAK,CAuB9B,CAAA;AAED,eAAe,eAAe,CAAA"}
|
|
@@ -0,0 +1,39 @@
|
|
|
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 classnames_1 = __importDefault(require("classnames"));
|
|
30
|
+
var ebay_dialog_base_1 = require("../ebay-dialog-base");
|
|
31
|
+
var classPrefix = 'panel-dialog';
|
|
32
|
+
var EbayPanelDialog = function (_a) {
|
|
33
|
+
var _b, _c;
|
|
34
|
+
var open = _a.open, animated = _a.animated, _d = _a.position, position = _d === void 0 ? 'start' : _d, _e = _a.onClose, onClose = _e === void 0 ? function () { } : _e, _f = _a.onOpen, onOpen = _f === void 0 ? function () { } : _f, className = _a.className, rest = __rest(_a, ["open", "animated", "position", "onClose", "onOpen", "className"]);
|
|
35
|
+
return (react_1.default.createElement(ebay_dialog_base_1.DialogBaseWithState, __assign({}, rest, { "aria-label": "Infotip", classPrefix: classPrefix, buttonPosition: "right", onCloseBtnClick: onClose, onBackgroundClick: onClose, animated: animated, className: classnames_1.default(className, (_b = {}, _b[classPrefix + "--mask-fade-slow"] = animated, _b)), windowClass: classnames_1.default(classPrefix + "__window--slide", (_c = {},
|
|
36
|
+
_c[classPrefix + "__window--end"] = position === 'end',
|
|
37
|
+
_c)), open: open })));
|
|
38
|
+
};
|
|
39
|
+
exports.default = EbayPanelDialog;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# EbayProgressBar
|
|
2
|
+
The progress bar gives an immediate, real-time visualisation of the current task completion status. The progress bar's value does not include its min, so giving a value <= min will set the value to min + 1.
|
|
3
|
+
|
|
4
|
+
## Demo
|
|
5
|
+
[Storybook](https://opensource.ebay.com/ebayui-core-react/main/?path=/story/ebay-progress-bar--default)
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
### Import JS
|
|
10
|
+
```jsx harmony
|
|
11
|
+
import { EbayProgressSpinner } from '@ebay/ui-core-react/ebay-progress-bar'
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
### Import styles from Skin
|
|
15
|
+
```jsx
|
|
16
|
+
import '@ebay/skin/progress-bar'
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### or if using CSS/SCSS
|
|
20
|
+
```jsx
|
|
21
|
+
import '@ebay/skin/progress-bar.css';
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
```jsx harmony
|
|
25
|
+
<EbayProgressBar value={50} />
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Props
|
|
29
|
+
|
|
30
|
+
Name | Type | Stateful | Required | Description | Data
|
|
31
|
+
--- | --- | --- | --- | --- | ---
|
|
32
|
+
`value` | Integer | No | No | Current value (<= Max)
|
|
33
|
+
`max` | Integer | No | No | Maximal value, default: 100
|
|
34
|
+
`fluid` | Boolean | No | No | Fills the full width of its container
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-progress-bar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ComponentProps, FC } from 'react';
|
|
2
|
+
export declare type EbayProgressBarProps = ComponentProps<'progress'> & {
|
|
3
|
+
fluid?: boolean;
|
|
4
|
+
};
|
|
5
|
+
declare const EbayProgressBar: FC<EbayProgressBarProps>;
|
|
6
|
+
export default EbayProgressBar;
|
|
7
|
+
//# sourceMappingURL=progress-bar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress-bar.d.ts","sourceRoot":"","sources":["../../src/ebay-progress-bar/progress-bar.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAGjD,oBAAY,oBAAoB,GAAG,cAAc,CAAC,UAAU,CAAC,GAAG;IAC5D,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB,CAAA;AAED,QAAA,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAa7C,CAAA;AAED,eAAe,eAAe,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 classnames_1 = __importDefault(require("classnames"));
|
|
30
|
+
var EbayProgressBar = function (_a) {
|
|
31
|
+
var _b = _a.value, value = _b === void 0 ? 0 : _b, _c = _a.max, max = _c === void 0 ? 100 : _c, fluid = _a.fluid, className = _a.className, rest = __rest(_a, ["value", "max", "fluid", "className"]);
|
|
32
|
+
return (react_1.default.createElement("progress", __assign({}, rest, { className: classnames_1.default('progress-bar', className, { 'progress-bar--fluid': fluid }), value: value, max: max })));
|
|
33
|
+
};
|
|
34
|
+
exports.default = EbayProgressBar;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# EbayProgressSpinner
|
|
2
|
+
|
|
3
|
+
## Demo
|
|
4
|
+
[Storybook](https://opensource.ebay.com/ebayui-core-react/main/?path=/story/ebay-progress-spinner--default-large)
|
|
5
|
+
|
|
6
|
+
## Usage
|
|
7
|
+
|
|
8
|
+
### Import JS
|
|
9
|
+
```jsx harmony
|
|
10
|
+
import { EbayProgressSpinner } from '@ebay/ui-core-react/ebay-progress-spinner'
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
### Import styles from Skin
|
|
14
|
+
```jsx
|
|
15
|
+
import '@ebay/skin/progress-spinner'
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### or if using CSS/SCSS
|
|
19
|
+
```jsx
|
|
20
|
+
import '@ebay/skin/progress-spinner.css';
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Big spinner
|
|
24
|
+
```jsx harmony
|
|
25
|
+
<EbayProgressSpinner size="large">
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Attributes
|
|
29
|
+
|
|
30
|
+
Name | Type | Stateful | Required | Description | Data
|
|
31
|
+
--- | --- | --- | --- | --- | ---
|
|
32
|
+
`size` | String | No | No | `small` (default), `large`
|
|
33
|
+
`aria-label` | String | No | No | custom aria label instead of `Busy`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-progress-spinner/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,oBAAoB,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ComponentProps, FC } from 'react';
|
|
2
|
+
export declare type SpinnerSize = 'small' | 'large';
|
|
3
|
+
declare type EbayProgressSpinnerProps = {
|
|
4
|
+
size?: SpinnerSize;
|
|
5
|
+
'aria-label'?: string;
|
|
6
|
+
};
|
|
7
|
+
declare type SpanProps = Omit<ComponentProps<'span'>, 'size'>;
|
|
8
|
+
declare const EbayProgressSpinner: FC<SpanProps & EbayProgressSpinnerProps>;
|
|
9
|
+
export default EbayProgressSpinner;
|
|
10
|
+
//# sourceMappingURL=progress-spinner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress-spinner.d.ts","sourceRoot":"","sources":["../../src/ebay-progress-spinner/progress-spinner.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAIjD,oBAAY,WAAW,GAAG,OAAO,GAAG,OAAO,CAAA;AAE3C,aAAK,wBAAwB,GAAG;IAC5B,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB,CAAA;AAED,aAAK,SAAS,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;AAOtD,QAAA,MAAM,mBAAmB,EAAE,EAAE,CAAC,SAAS,GAAG,wBAAwB,CAcjE,CAAA;AAED,eAAe,mBAAmB,CAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
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 classnames_1 = __importDefault(require("classnames"));
|
|
30
|
+
var ebay_icon_1 = require("../ebay-icon");
|
|
31
|
+
var sizeClass = {
|
|
32
|
+
'small': '',
|
|
33
|
+
'large': 'progress-spinner--large'
|
|
34
|
+
};
|
|
35
|
+
var EbayProgressSpinner = function (_a) {
|
|
36
|
+
var _b = _a.size, size = _b === void 0 ? 'SMALL' : _b, _c = _a["aria-label"], ariaLabel = _c === void 0 ? 'Busy' : _c, className = _a.className, rest = __rest(_a, ["size", 'aria-label', "className"]);
|
|
37
|
+
return (react_1.default.createElement("span", __assign({}, rest, { className: classnames_1.default('progress-spinner', sizeClass[size], className), "aria-label": ariaLabel, role: "img" }),
|
|
38
|
+
react_1.default.createElement(ebay_icon_1.EbayIcon, { name: "spinner" })));
|
|
39
|
+
};
|
|
40
|
+
exports.default = EbayProgressSpinner;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# ebay-progress-stepper
|
|
2
|
+
|
|
3
|
+
## Demo
|
|
4
|
+
|
|
5
|
+
[Storybook](https://opensource.ebay.com/ebayui-core-react/main/?path=/story/ebay-progress-stepper--default)
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
yarn add @ebay/ui-core-react
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Import JS
|
|
14
|
+
|
|
15
|
+
```jsx harmony
|
|
16
|
+
import { EbayProgressStepper, EbayProgressStep as Step } from '@ebay/ui-core-react/ebay-progress-stepper'
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Import styles from Skin
|
|
20
|
+
|
|
21
|
+
```jsx
|
|
22
|
+
import '@ebay/skin/stepper'
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
```jsx
|
|
26
|
+
<EbayProgressStepper>
|
|
27
|
+
<Step>Started</Step>
|
|
28
|
+
<Step>Shipped</Step>
|
|
29
|
+
<Step current>Transit</Step>
|
|
30
|
+
<Step>Delivered</Step>
|
|
31
|
+
</EbayProgressStepper>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Components
|
|
35
|
+
|
|
36
|
+
### EbayProgressStepper
|
|
37
|
+
|
|
38
|
+
This is the container of the wizard stepper and you can define the direction of the stepper and pass properties to
|
|
39
|
+
customize the layout (`className` or `style`)
|
|
40
|
+
|
|
41
|
+
#### Props
|
|
42
|
+
|
|
43
|
+
Name | Type | Stateful | Required | Description
|
|
44
|
+
--- | --- | --- | --- | ---
|
|
45
|
+
`direction` | String | No | No | Either `column` or `row` (default). Will display stepper as a vertical column or horizontal row.
|
|
46
|
+
`defaultState` | String | Yes | No | Either `complete`, `upcoming` or `active` (default). Defines the default state for all steps.
|
|
47
|
+
|
|
48
|
+
### EbayProgressStep
|
|
49
|
+
|
|
50
|
+
This component is used to render each step. It renders an icon, a title and a text label.
|
|
51
|
+
|
|
52
|
+
#### Props
|
|
53
|
+
|
|
54
|
+
Name | Type | Stateful | Required | Description
|
|
55
|
+
--- | --- | --- | --- | ---
|
|
56
|
+
`current` | Boolean | No | No | The current step. Only first step that has this property will be considered current. All steps before will be rendered as complete, and all after will render as upcoming. If not present on any step, then will render based on `defaultState` property
|
|
57
|
+
`type` | String | No | No | Either `attention`, `information`, or `complete`. This takes prescedence over current. Will render the current step with the given icon and color
|
|
58
|
+
`number` | Number | No | No | Renders the current step with the given number. Overrides the default number counting for this step
|
|
59
|
+
|
|
60
|
+
### EbayProgressTitle
|
|
61
|
+
|
|
62
|
+
The bolded title for each step. Will be rendered in an `h4` by default.
|
|
63
|
+
|
|
64
|
+
#### Props
|
|
65
|
+
|
|
66
|
+
Name | Type | Stateful | Required | Description
|
|
67
|
+
--- | --- | --- | --- | ---
|
|
68
|
+
`as` | String | No | No | HTML tag to use instead of `h4`
|
|
69
|
+
|
|
70
|
+
#### Example
|
|
71
|
+
|
|
72
|
+
```jsx
|
|
73
|
+
<EbayProgressStepper>
|
|
74
|
+
<EbayProgressStep>
|
|
75
|
+
<EbayProgressTitle>Started</EbayProgressTitle>
|
|
76
|
+
July 3rd
|
|
77
|
+
</EbayProgressStep>
|
|
78
|
+
|
|
79
|
+
<EbayProgressStep current>
|
|
80
|
+
<EbayProgressTitle>Shipped</EbayProgressTitle>
|
|
81
|
+
July 4th
|
|
82
|
+
</EbayProgressStep>
|
|
83
|
+
</EbayProgressStepper>
|
|
84
|
+
```
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { StepState, StepType } from './types';
|
|
3
|
+
export declare type EbayProgressStepProps = {
|
|
4
|
+
type?: StepType;
|
|
5
|
+
state?: StepState;
|
|
6
|
+
current?: boolean;
|
|
7
|
+
number?: number;
|
|
8
|
+
className?: string;
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
};
|
|
11
|
+
declare const EbayProgressStep: FC<EbayProgressStepProps>;
|
|
12
|
+
export default EbayProgressStep;
|
|
13
|
+
//# sourceMappingURL=ebay-progress-step.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ebay-progress-step.d.ts","sourceRoot":"","sources":["../../src/ebay-progress-stepper/ebay-progress-step.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAY,EAAE,EAAgB,SAAS,EAAE,MAAM,OAAO,CAAA;AAGpE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAG7C,oBAAY,qBAAqB,GAAG;IAChC,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB,CAAA;AAcD,QAAA,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CA8C/C,CAAA;AAED,eAAe,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,82 @@
|
|
|
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 __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
16
|
+
}) : (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
o[k2] = m[k];
|
|
19
|
+
}));
|
|
20
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
+
}) : function(o, v) {
|
|
23
|
+
o["default"] = v;
|
|
24
|
+
});
|
|
25
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
26
|
+
if (mod && mod.__esModule) return mod;
|
|
27
|
+
var result = {};
|
|
28
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
29
|
+
__setModuleDefault(result, mod);
|
|
30
|
+
return result;
|
|
31
|
+
};
|
|
32
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
33
|
+
var t = {};
|
|
34
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
35
|
+
t[p] = s[p];
|
|
36
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
37
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
38
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
39
|
+
t[p[i]] = s[p[i]];
|
|
40
|
+
}
|
|
41
|
+
return t;
|
|
42
|
+
};
|
|
43
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
44
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
45
|
+
};
|
|
46
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
|
+
var react_1 = __importStar(require("react"));
|
|
48
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
49
|
+
var ebay_icon_1 = require("../ebay-icon");
|
|
50
|
+
var index_1 = require("./index");
|
|
51
|
+
var typeClasses = {
|
|
52
|
+
attention: 'progress-stepper__item--attention',
|
|
53
|
+
information: 'progress-stepper__item--information',
|
|
54
|
+
complete: 'progress-stepper__item--confirmation'
|
|
55
|
+
};
|
|
56
|
+
var typeIcons = {
|
|
57
|
+
complete: 'stepperConfirmation',
|
|
58
|
+
information: 'informationFilled',
|
|
59
|
+
attention: 'attentionFilled'
|
|
60
|
+
};
|
|
61
|
+
var EbayProgressStep = function (_a) {
|
|
62
|
+
var type = _a.type, current = _a.current, state = _a.state,
|
|
63
|
+
/**
|
|
64
|
+
* @deprecated Don't use number in v9+ (Skin 13+), left for backward-compatibility. TODO: remove in v10.
|
|
65
|
+
*/
|
|
66
|
+
number = _a.number, children = _a.children, className = _a.className, rest = __rest(_a, ["type", "current", "state", "number", "children", "className"]);
|
|
67
|
+
var childrenArray = react_1.Children.toArray(children);
|
|
68
|
+
var title = childrenArray.find(function (child) { return child.type === index_1.EbayProgressTitle; });
|
|
69
|
+
var text = childrenArray.filter(function (child) { return child.type !== index_1.EbayProgressTitle; });
|
|
70
|
+
var stepClassNames = classnames_1.default(className, 'progress-stepper__item', typeClasses[type], { 'progress-stepper__item--current': current });
|
|
71
|
+
var ariaLabel = number === undefined ? state : number.toString();
|
|
72
|
+
var content = number === undefined ? null : number;
|
|
73
|
+
var icon = typeIcons[type];
|
|
74
|
+
return (react_1.default.createElement("div", __assign({}, rest, { className: stepClassNames, role: "listitem", "aria-current": current ? 'step' : undefined }),
|
|
75
|
+
react_1.default.createElement("div", { className: "progress-stepper__icon" }, icon ?
|
|
76
|
+
react_1.default.createElement(ebay_icon_1.EbayIcon, { name: icon, height: "24", width: "24" }) :
|
|
77
|
+
react_1.default.createElement("span", { role: "img", "aria-label": ariaLabel }, content)),
|
|
78
|
+
react_1.default.createElement("div", { className: "progress-stepper__text" },
|
|
79
|
+
title,
|
|
80
|
+
text)));
|
|
81
|
+
};
|
|
82
|
+
exports.default = EbayProgressStep;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { StepperDirection, StepState } from './types';
|
|
3
|
+
declare type ProgressStepperProps = {
|
|
4
|
+
direction?: StepperDirection;
|
|
5
|
+
defaultState?: StepState;
|
|
6
|
+
className?: string;
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
};
|
|
9
|
+
declare const EbayProgressStepper: FC<ProgressStepperProps>;
|
|
10
|
+
export default EbayProgressStepper;
|
|
11
|
+
//# sourceMappingURL=ebay-progress-stepper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ebay-progress-stepper.d.ts","sourceRoot":"","sources":["../../src/ebay-progress-stepper/ebay-progress-stepper.tsx"],"names":[],"mappings":"AAAA,OAAc,EAA0B,EAAE,EAA0B,SAAS,EAAE,MAAM,OAAO,CAAA;AAE5F,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAY,MAAM,SAAS,CAAA;AAG/D,aAAK,oBAAoB,GAAG;IACxB,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB,CAAA;AAED,QAAA,MAAM,mBAAmB,EAAE,EAAE,CAAC,oBAAoB,CA6CjD,CAAA;AAQD,eAAe,mBAAmB,CAAA"}
|