@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,77 @@
|
|
|
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 EbayProgressStepper = function (_a) {
|
|
50
|
+
var _b = _a.direction, direction = _b === void 0 ? 'row' : _b, _c = _a.defaultState, defaultState = _c === void 0 ? 'active' : _c, children = _a.children, className = _a.className, rest = __rest(_a, ["direction", "defaultState", "children", "className"]);
|
|
51
|
+
var childrenArray = react_1.Children.toArray(children);
|
|
52
|
+
var currentIndex = childrenArray.findIndex(function (child) { return child.props.current; });
|
|
53
|
+
return (react_1.default.createElement("div", __assign({}, rest, { className: classnames_1.default(className, 'progress-stepper', {
|
|
54
|
+
'progress-stepper--vertical': direction === 'column'
|
|
55
|
+
}) }),
|
|
56
|
+
react_1.default.createElement("div", { role: "list", className: classnames_1.default('progress-stepper__items', {
|
|
57
|
+
'progress-stepper__items--upcoming': defaultState === 'upcoming'
|
|
58
|
+
}) }, childrenArray.map(function (child, index) {
|
|
59
|
+
var currentState = stepState(index, currentIndex);
|
|
60
|
+
var stepTypes = {
|
|
61
|
+
complete: 'complete',
|
|
62
|
+
active: currentState === 'complete' ? 'complete' : undefined,
|
|
63
|
+
upcoming: undefined
|
|
64
|
+
};
|
|
65
|
+
return (react_1.default.createElement(react_1.Fragment, { key: index },
|
|
66
|
+
index > 0 && react_1.default.createElement("hr", { className: "progress-stepper__separator", role: "presentation" }),
|
|
67
|
+
react_1.cloneElement(child, __assign({ type: stepTypes[defaultState], state: currentState }, child.props))));
|
|
68
|
+
}))));
|
|
69
|
+
};
|
|
70
|
+
function stepState(stepIndex, currentIndex) {
|
|
71
|
+
if (stepIndex < currentIndex)
|
|
72
|
+
return 'complete';
|
|
73
|
+
if (stepIndex > currentIndex)
|
|
74
|
+
return 'upcoming';
|
|
75
|
+
return 'active';
|
|
76
|
+
}
|
|
77
|
+
exports.default = EbayProgressStepper;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ebay-progress-title.d.ts","sourceRoot":"","sources":["../../src/ebay-progress-stepper/ebay-progress-title.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEpD,aAAK,KAAK,GAAG;IACT,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB,CAAA;AAED,QAAA,MAAM,iBAAiB,EAAE,EAAE,CAAC,KAAK,CAGgB,CAAA;AAEjD,eAAe,iBAAiB,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var react_1 = require("react");
|
|
4
|
+
var EbayProgressTitle = function (_a) {
|
|
5
|
+
var _b = _a.as, TitleComponent = _b === void 0 ? 'h4' : _b, children = _a.children;
|
|
6
|
+
return react_1.createElement(TitleComponent, {}, children);
|
|
7
|
+
};
|
|
8
|
+
exports.default = EbayProgressTitle;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as EbayProgressStepper } from './ebay-progress-stepper';
|
|
2
|
+
export { default as EbayProgressStep } from './ebay-progress-step';
|
|
3
|
+
export { default as EbayProgressTitle } from './ebay-progress-title';
|
|
4
|
+
export { StepperDirection, StepType, StepState } from './types';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-progress-stepper/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AACxE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAClE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AACpE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var ebay_progress_stepper_1 = require("./ebay-progress-stepper");
|
|
4
|
+
Object.defineProperty(exports, "EbayProgressStepper", { enumerable: true, get: function () { return ebay_progress_stepper_1.default; } });
|
|
5
|
+
var ebay_progress_step_1 = require("./ebay-progress-step");
|
|
6
|
+
Object.defineProperty(exports, "EbayProgressStep", { enumerable: true, get: function () { return ebay_progress_step_1.default; } });
|
|
7
|
+
var ebay_progress_title_1 = require("./ebay-progress-title");
|
|
8
|
+
Object.defineProperty(exports, "EbayProgressTitle", { enumerable: true, get: function () { return ebay_progress_title_1.default; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ebay-progress-stepper/types.ts"],"names":[],"mappings":"AAAA,oBAAY,gBAAgB,GAAG,QAAQ,GAAG,KAAK,CAAA;AAE/C,oBAAY,QAAQ,GAAG,UAAU,GAAG,aAAa,GAAG,WAAW,CAAA;AAE/D,oBAAY,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,QAAQ,CAAA"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# ebay-radio
|
|
2
|
+
|
|
3
|
+
## Demo
|
|
4
|
+
[Storybook](https://opensource.ebay.com/ebayui-core-react/main/?path=/story/ebay-radio--default-radio-button)
|
|
5
|
+
|
|
6
|
+
## Install
|
|
7
|
+
```
|
|
8
|
+
yarn add @ebay/ui-core-react
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
### Import JS
|
|
14
|
+
```jsx harmony
|
|
15
|
+
import { EbayRadio } from '@ebay/ui-core-react/ebay-radio'
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### Import LESS from SKIN
|
|
19
|
+
```jsx harmony
|
|
20
|
+
import "@ebay/skin/radio"
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### or SCSS/CSS
|
|
24
|
+
```jsx harmony
|
|
25
|
+
import '@ebay/skin/radio.css'
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## EbayRadio with EbayLabel
|
|
29
|
+
```jsx harmony
|
|
30
|
+
import { EbayLabel } from '@ebay/ui-core-react/ebay-field';
|
|
31
|
+
|
|
32
|
+
<EbayRadio value="1" id="radio-1">
|
|
33
|
+
<Ebaylabel>Choice 1</Ebaylabel>
|
|
34
|
+
</EbayRadio>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Icons
|
|
38
|
+
This component uses SVG icons, so you need to add the `<EbaySvg/>` component at the end of your html.
|
|
39
|
+
|
|
40
|
+
## Attributes
|
|
41
|
+
|
|
42
|
+
Name | Type | Description
|
|
43
|
+
--- | --- | --- | ---
|
|
44
|
+
`disabled` | Boolean | Disabled when true
|
|
45
|
+
`value` | string | The value of radio button component. For the radio checked/unchecked state, please use `checked` props.
|
|
46
|
+
`checked` | boolean | Set the radio button state to checked/unchecked. Use this for **controlled component**.
|
|
47
|
+
`defaultChecked` | boolean | Set the radio button initial state to checked/unchecked. Use this for **uncontrolled component**.
|
|
48
|
+
`size` | String | No | No | Either `large` or `regular` (default). Sets the radio icon size. For mweb this should be set to `large`. (Note: The dimensions of the radio will not change, but only the icon)
|
|
49
|
+
`onChange` | Function | Callback fired when selected is changed, with param `{ originalEvent, value }`
|
|
50
|
+
`onFocus` | Function | Callback fired when button is focused, with param `{ originalEvent, value }`
|
|
51
|
+
|
|
52
|
+
Note: For this component, `className`/`style` are applied to the container, while all other HTML attributes are applied to the input.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-radio/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ChangeEvent, ComponentProps, FC } from 'react';
|
|
2
|
+
declare type Size = 'default' | 'large';
|
|
3
|
+
declare type EbayRadioProps = {
|
|
4
|
+
size?: Size;
|
|
5
|
+
onChange?: (event: ChangeEvent<HTMLInputElement>, value: string | number) => void;
|
|
6
|
+
};
|
|
7
|
+
declare type InputProps = Omit<ComponentProps<'input'>, 'size'>;
|
|
8
|
+
declare const EbayRadio: FC<InputProps & EbayRadioProps>;
|
|
9
|
+
export default EbayRadio;
|
|
10
|
+
//# sourceMappingURL=radio.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["../../src/ebay-radio/radio.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,WAAW,EAA0B,cAAc,EAAE,EAAE,EAAgB,MAAM,OAAO,CAAA;AAKpG,aAAK,IAAI,GAAG,SAAS,GAAG,OAAO,CAAA;AAE/B,aAAK,cAAc,GAAG;IAClB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAC;CACrF,CAAA;AACD,aAAK,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,CAAA;AAEvD,QAAA,MAAM,SAAS,EAAE,EAAE,CAAC,UAAU,GAAG,cAAc,CAoD9C,CAAA;AAED,eAAe,SAAS,CAAA"}
|
|
@@ -0,0 +1,76 @@
|
|
|
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 ebay_field_1 = require("../ebay-field");
|
|
51
|
+
var EbayRadio = function (_a) {
|
|
52
|
+
var _b = _a.size, size = _b === void 0 ? 'default' : _b, checked = _a.checked, defaultChecked = _a.defaultChecked, className = _a.className, style = _a.style, id = _a.id, _c = _a.onChange, onChange = _c === void 0 ? function () { } : _c, children = _a.children, rest = __rest(_a, ["size", "checked", "defaultChecked", "className", "style", "id", "onChange", "children"]);
|
|
53
|
+
var handleChange = function (e) {
|
|
54
|
+
var input = e.target;
|
|
55
|
+
onChange(e, input === null || input === void 0 ? void 0 : input.value);
|
|
56
|
+
};
|
|
57
|
+
var containerClass = classnames_1.default('radio', className, { 'radio--large': size === 'large' });
|
|
58
|
+
var iconChecked = size === 'large' ?
|
|
59
|
+
react_1.default.createElement(ebay_icon_1.EbayIcon, { name: "radioCheckedLarge", className: "radio__checked" }) :
|
|
60
|
+
react_1.default.createElement(ebay_icon_1.EbayIcon, { name: "radioChecked", className: "radio__checked" });
|
|
61
|
+
var iconUnChecked = size === 'large' ?
|
|
62
|
+
react_1.default.createElement(ebay_icon_1.EbayIcon, { name: "radioUncheckedLarge", className: "radio__unchecked" }) :
|
|
63
|
+
react_1.default.createElement(ebay_icon_1.EbayIcon, { name: "radioUnchecked", className: "radio__unchecked" });
|
|
64
|
+
var childrenArray = react_1.Children.toArray(children);
|
|
65
|
+
var ebayLabel = childrenArray.find(function (child) { return child.type === ebay_field_1.EbayLabel; });
|
|
66
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
67
|
+
react_1.default.createElement("span", { className: containerClass, style: __assign(__assign({}, style), { alignItems: 'center' }) },
|
|
68
|
+
react_1.default.createElement("input", __assign({}, rest, { id: id, className: "radio__control", type: "radio", defaultChecked: defaultChecked, checked: checked, onChange: handleChange })),
|
|
69
|
+
react_1.default.createElement("span", { className: "radio__icon", hidden: true },
|
|
70
|
+
iconChecked,
|
|
71
|
+
iconUnChecked)),
|
|
72
|
+
ebayLabel ?
|
|
73
|
+
react_1.cloneElement(ebayLabel, __assign(__assign({}, ebayLabel.props), { position: 'end', htmlFor: id })) :
|
|
74
|
+
children));
|
|
75
|
+
};
|
|
76
|
+
exports.default = EbayRadio;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# ebay-section-notice
|
|
2
|
+
|
|
3
|
+
## Demo
|
|
4
|
+
|
|
5
|
+
[Storybook](https://opensource.ebay.com/ebayui-core-react/main/?path=/story/ebay-section-notice--default-message-with-no-action)
|
|
6
|
+
|
|
7
|
+
## Import JS
|
|
8
|
+
|
|
9
|
+
```jsx harmony
|
|
10
|
+
import {
|
|
11
|
+
EbaySectionNotice,
|
|
12
|
+
EbayNoticeContent,
|
|
13
|
+
EbaySectionNoticeTitle,
|
|
14
|
+
EbaySectionNoticeFooter,
|
|
15
|
+
} from '@ebay/ui-core-react/ebay-section-notice'
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### Import following styles from SKIN
|
|
19
|
+
|
|
20
|
+
```jsx harmony
|
|
21
|
+
import "@ebay/skin/section-notice";
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Use
|
|
25
|
+
|
|
26
|
+
```jsx harmony
|
|
27
|
+
<EbaySectionNotice status="confirmation" aria-label="Confirmation">
|
|
28
|
+
<EbayNoticeContent>
|
|
29
|
+
<EbaySectionNoticeTitle>Congratulations</EbaySectionNoticeTitle>
|
|
30
|
+
<p>
|
|
31
|
+
This successfully finished <a href="http://www.ebay.com">next page</a>
|
|
32
|
+
</p>
|
|
33
|
+
</EbayNoticeContent>
|
|
34
|
+
<EbaySectionNoticeFooter>
|
|
35
|
+
<EbayButton>Action</EbayButton>
|
|
36
|
+
</EbaySectionNoticeFooter>
|
|
37
|
+
</EbaySectionNotice>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Attributes
|
|
41
|
+
|
|
42
|
+
| Name | Type | Stateful | Description | Default |
|
|
43
|
+
| ---------------------- | -------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ---------- |
|
|
44
|
+
| `status` | String (`"general", "attention"`, `"confirmation"`, or `"information"`) | No | Determines the style and type of notice to be displayed | `"general"` |
|
|
45
|
+
| `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. | - |
|
|
46
|
+
| `aria-roledescription` | String | No | Adds role description attribute to the section notice | `"Notice"` |
|
|
47
|
+
| `children` | React Node | No | The content to be displayed within the notice. **Must have the EbayNoticeContent within the children!** | - |
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as EbaySectionNotice } from './section-notice';
|
|
2
|
+
export { default as EbaySectionNoticeTitle } from './section-notice-title';
|
|
3
|
+
export { default as EbaySectionNoticeFooter } from './section-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-section-notice/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAC/D,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAC1E,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var section_notice_1 = require("./section-notice");
|
|
4
|
+
Object.defineProperty(exports, "EbaySectionNotice", { enumerable: true, get: function () { return section_notice_1.default; } });
|
|
5
|
+
var section_notice_title_1 = require("./section-notice-title");
|
|
6
|
+
Object.defineProperty(exports, "EbaySectionNoticeTitle", { enumerable: true, get: function () { return section_notice_title_1.default; } });
|
|
7
|
+
var section_notice_footer_1 = require("./section-notice-footer");
|
|
8
|
+
Object.defineProperty(exports, "EbaySectionNoticeFooter", { enumerable: true, get: function () { return section_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":"section-notice-footer.d.ts","sourceRoot":"","sources":["../../src/ebay-section-notice/section-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,uBAAuB,EAAE,EAAE,CAAC,KAAK,CAItC,CAAA;AAED,eAAe,uBAAuB,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 EbaySectionNoticeFooter = function (_a) {
|
|
9
|
+
var className = _a.className, children = _a.children;
|
|
10
|
+
return (react_1.default.createElement(notice_footer_1.default, { className: className, type: "section" }, children));
|
|
11
|
+
};
|
|
12
|
+
exports.default = EbaySectionNoticeFooter;
|
|
@@ -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 EbaySectionNoticeTitle: FC<Props>;
|
|
7
|
+
export default EbaySectionNoticeTitle;
|
|
8
|
+
//# sourceMappingURL=section-notice-title.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"section-notice-title.d.ts","sourceRoot":"","sources":["../../src/ebay-section-notice/section-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,sBAAsB,EAAE,EAAE,CAAC,KAAK,CAIrC,CAAA;AAED,eAAe,sBAAsB,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 EbaySectionNoticeTitle = 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: "section" }), children));
|
|
33
|
+
};
|
|
34
|
+
exports.default = EbaySectionNoticeTitle;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
declare type Props = React.HTMLProps<HTMLElement> & {
|
|
3
|
+
status?: 'general' | 'none' | 'attention' | 'confirmation' | 'information';
|
|
4
|
+
'aria-label'?: string;
|
|
5
|
+
'aria-roledescription'?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
declare const EbaySectionNotice: FC<Props>;
|
|
9
|
+
export default EbaySectionNotice;
|
|
10
|
+
//# sourceMappingURL=section-notice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"section-notice.d.ts","sourceRoot":"","sources":["../../src/ebay-section-notice/section-notice.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,EAAgB,MAAM,OAAO,CAAA;AAM/C,aAAK,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,GAAG;IACxC,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,WAAW,GAAG,cAAc,GAAG,aAAa,CAAC;IAC3E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAA;AAED,QAAA,MAAM,iBAAiB,EAAE,EAAE,CAAC,KAAK,CAiChC,CAAA;AAED,eAAe,iBAAiB,CAAA"}
|
|
@@ -0,0 +1,50 @@
|
|
|
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_notice_content_1 = require("../ebay-notice-base/components/ebay-notice-content");
|
|
31
|
+
var notice_content_1 = __importDefault(require("../common/notice-utils/notice-content"));
|
|
32
|
+
var icon_1 = __importDefault(require("../ebay-icon/icon"));
|
|
33
|
+
var EbaySectionNotice = function (_a) {
|
|
34
|
+
var _b = _a.status, status = _b === void 0 ? 'general' : _b, children = _a.children, className = _a.className, ariaLabel = _a["aria-label"], _c = _a["aria-roledescription"], ariaRoleDescription = _c === void 0 ? 'Notice' : _c, rest = __rest(_a, ["status", "children", "className", 'aria-label', 'aria-roledescription']);
|
|
35
|
+
var childrenArray = react_1.default.Children.toArray(children);
|
|
36
|
+
var content = childrenArray.find(function (_a) {
|
|
37
|
+
var type = _a.type;
|
|
38
|
+
return type === ebay_notice_content_1.EbayNoticeContent;
|
|
39
|
+
});
|
|
40
|
+
var hasStatus = status !== 'general' && status !== 'none';
|
|
41
|
+
if (!content) {
|
|
42
|
+
throw new Error("EbaySectionNotice: Please use a EbayNoticeContent that defines the content of the notice");
|
|
43
|
+
}
|
|
44
|
+
return (react_1.default.createElement("section", __assign({}, rest, { className: classnames_1.default(className, "section-notice", hasStatus && "section-notice--" + status), role: "region", "aria-label": !hasStatus ? ariaLabel : null, "aria-labelledby": hasStatus ? "section-notice-" + status : null, "aria-roledescription": ariaRoleDescription }),
|
|
45
|
+
hasStatus && (react_1.default.createElement("div", { className: "section-notice__header", id: "section-notice-" + status },
|
|
46
|
+
react_1.default.createElement(icon_1.default, { name: status + "-filled", a11yText: ariaLabel, a11yVariant: "label" }))),
|
|
47
|
+
react_1.default.createElement(notice_content_1.default, __assign({}, content.props, { type: "section" })),
|
|
48
|
+
children));
|
|
49
|
+
};
|
|
50
|
+
exports.default = EbaySectionNotice;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# EbaySectionTitle
|
|
2
|
+
|
|
3
|
+
## Install
|
|
4
|
+
```shell
|
|
5
|
+
yarn add @ebay/ui-core-react
|
|
6
|
+
```
|
|
7
|
+
|
|
8
|
+
## Usage
|
|
9
|
+
|
|
10
|
+
### Import JS
|
|
11
|
+
```jsx
|
|
12
|
+
import {
|
|
13
|
+
EbaySectionTitle,
|
|
14
|
+
EbaySectionTitleTitle as Title,
|
|
15
|
+
EbaySectionTitleSubtitle as Subtitle
|
|
16
|
+
} from '@ebay/ui-core-react/ebay-section-title'
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Import styles from Skin
|
|
20
|
+
```jsx
|
|
21
|
+
import '@ebay/skin/section-title'
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### or if using CSS/SCSS
|
|
25
|
+
```jsx
|
|
26
|
+
import '@ebay/skin/section-title.css'
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
```jsx
|
|
30
|
+
<EbaySectionTitle>Today's Deals – All With Free Shipping</EbaySectionTitle>
|
|
31
|
+
|
|
32
|
+
<EbaySectionTitle href="https://www.ebay.com" ctaText="See All">
|
|
33
|
+
<Title>Today's Deals – All With Free Shipping</Title>
|
|
34
|
+
<Subtitle>Plus, guaranteed best prices.</Subtitle>
|
|
35
|
+
</EbaySectionTitle>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## EbaySectionTitle Props
|
|
39
|
+
|
|
40
|
+
Name | Type | Stateful | Required | Description
|
|
41
|
+
--- | --- | --- | --- | ---
|
|
42
|
+
`ctaText` | String | No | No | URL text. Optional content to be displayed next to title. `href` is required when using this attribute.
|
|
43
|
+
`href` | String | No | No | URL. Title content and optional CTA content will link to this. Populating `cta-text` is optional.
|
|
44
|
+
`size` | String | No | No | "small", "large", or "giant" (default: medium)
|
|
45
|
+
|
|
46
|
+
## Nested Components
|
|
47
|
+
Name | Required | Description
|
|
48
|
+
`title` | No | The main title content to be displayed. Title tag is required when using other sub-tags.
|
|
49
|
+
`subtitle` | No | The subtitle content to be displayed
|
|
50
|
+
`info` | No | Placeholder for `<EbayInfotip>` component
|
|
51
|
+
`overflow` | No | Placeholder for `<EbayMenuButton>` component
|
|
52
|
+
|
|
53
|
+
### Examples
|
|
54
|
+
|
|
55
|
+
```jsx
|
|
56
|
+
import { EbaySectionTitleInfo as Info } from '@ebay/ui-core-react/ebay-section-title'
|
|
57
|
+
import { EbayInfotip, EbayInfotipHeading, EbayInfotipContent } from '@ebay/ui-core-react/ebay-infotip'
|
|
58
|
+
|
|
59
|
+
<Info>
|
|
60
|
+
<EbayInfotip
|
|
61
|
+
a11yCloseText="Dismiss infotip"
|
|
62
|
+
aria-label="Important information"
|
|
63
|
+
pointer="top-left"
|
|
64
|
+
icon="information"
|
|
65
|
+
>
|
|
66
|
+
<EbayInfotipHeading>Important</EbayInfotipHeading>
|
|
67
|
+
<EbayInfotipContent><p>This is some important info</p></EbayInfotipContent>
|
|
68
|
+
</EbayInfotip>
|
|
69
|
+
</Info>
|
|
70
|
+
```
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ComponentProps, FC, ReactNode } from 'react';
|
|
2
|
+
import { Icon } from '../ebay-icon';
|
|
3
|
+
declare type Props = ComponentProps<'div'> & {
|
|
4
|
+
ctaText?: ReactNode;
|
|
5
|
+
href?: string;
|
|
6
|
+
icon?: Icon;
|
|
7
|
+
};
|
|
8
|
+
declare const Cta: FC<Props>;
|
|
9
|
+
export default Cta;
|
|
10
|
+
//# sourceMappingURL=cta.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cta.d.ts","sourceRoot":"","sources":["../../src/ebay-section-title/cta.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAE5D,OAAO,EAAY,IAAI,EAAE,MAAM,cAAc,CAAA;AAE7C,aAAK,KAAK,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IACnC,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,IAAI,CAAC;CACb,CAAA;AAED,QAAA,MAAM,GAAG,EAAE,EAAE,CAAC,KAAK,CAyBlB,CAAA;AAED,eAAe,GAAG,CAAA"}
|
|
@@ -0,0 +1,41 @@
|
|
|
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 Cta = function (_a) {
|
|
32
|
+
var ctaText = _a.ctaText, href = _a.href, _b = _a.icon, icon = _b === void 0 ? 'arrowRightBold' : _b, rest = __rest(_a, ["ctaText", "href", "icon"]);
|
|
33
|
+
var className = classnames_1.default('section-title__cta', {
|
|
34
|
+
'section-title__cta--no-text': !ctaText
|
|
35
|
+
});
|
|
36
|
+
return (react_1.default.createElement("div", __assign({}, rest, { className: className }),
|
|
37
|
+
react_1.default.createElement("a", { href: href, tabIndex: -1, "aria-hidden": "true" },
|
|
38
|
+
ctaText && react_1.default.createElement("span", { className: "section-title__cta-text" }, ctaText),
|
|
39
|
+
react_1.default.createElement(ebay_icon_1.EbayIcon, { name: icon, className: "section-title__cta-icon", noSkinClasses: true, height: "24", width: "24", "aria-hidden": "true" }))));
|
|
40
|
+
};
|
|
41
|
+
exports.default = Cta;
|