@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,33 @@
|
|
|
1
|
+
# ebay-switch
|
|
2
|
+
|
|
3
|
+
## Demo
|
|
4
|
+
[Storybook](https://opensource.ebay.com/ebayui-core-react/main/?path=/story/ebay-switch--default-switch-button)
|
|
5
|
+
|
|
6
|
+
## Import JS
|
|
7
|
+
```jsx harmony
|
|
8
|
+
import { EbaySwitch } from '@ebay/ui-core-react/ebay-switch';
|
|
9
|
+
```
|
|
10
|
+
## Import following styles from SKIN
|
|
11
|
+
```jsx harmony
|
|
12
|
+
import '@ebay/skin/switch';
|
|
13
|
+
```
|
|
14
|
+
## Usage
|
|
15
|
+
```
|
|
16
|
+
yarn add @ebay/ui-core-react
|
|
17
|
+
```
|
|
18
|
+
```jsx harmony
|
|
19
|
+
<span className="field">
|
|
20
|
+
<EbaySwitch value="123" id="switch-1" />
|
|
21
|
+
<label className="field__label field__label--end" htmlFor="switch-1">Remember me</label>
|
|
22
|
+
</span>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Attributes
|
|
26
|
+
|
|
27
|
+
Name | Type | Stateful | Description
|
|
28
|
+
--- | --- | --- | ---
|
|
29
|
+
`disabled` | Boolean | No |
|
|
30
|
+
`onChange` | `{ originalEvent, value, checked }` | selected value and checked status
|
|
31
|
+
|
|
32
|
+
Note: For this component, `className`/`style` are applied to the root tag, while all other HTML attributes are applied to the `input` tag.
|
|
33
|
+
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FC, ChangeEvent, ComponentProps } from 'react';
|
|
2
|
+
declare type Props = ComponentProps<'input'> & {
|
|
3
|
+
onChange?: (e: ChangeEvent<HTMLInputElement>, value: string | number, checked: boolean) => void;
|
|
4
|
+
};
|
|
5
|
+
declare const EbaySwitch: FC<Props>;
|
|
6
|
+
export default EbaySwitch;
|
|
7
|
+
//# sourceMappingURL=ebay-switch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ebay-switch.d.ts","sourceRoot":"","sources":["../../src/ebay-switch/ebay-switch.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAuB,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAGnF,aAAK,KAAK,GAAG,cAAc,CAAC,OAAO,CAAC,GAAG;IACnC,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CACnG,CAAA;AAED,QAAA,MAAM,UAAU,EAAE,EAAE,CAAC,KAAK,CAuCzB,CAAA;AAED,eAAe,UAAU,CAAA"}
|
|
@@ -0,0 +1,64 @@
|
|
|
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 EbaySwitch = function (_a) {
|
|
50
|
+
var id = _a.id, value = _a.value, name = _a.name, className = _a.className, checked = _a.checked, _b = _a.onChange, onChange = _b === void 0 ? function () { } : _b, rest = __rest(_a, ["id", "value", "name", "className", "checked", "onChange"]);
|
|
51
|
+
var _c = react_1.useState(!!checked), isChecked = _c[0], setChecked = _c[1];
|
|
52
|
+
react_1.useEffect(function () {
|
|
53
|
+
setChecked(!!checked);
|
|
54
|
+
}, [checked]);
|
|
55
|
+
var handleChange = function (e) {
|
|
56
|
+
var input = e.target || {};
|
|
57
|
+
onChange(e, input.value, input.checked);
|
|
58
|
+
setChecked(input.checked);
|
|
59
|
+
};
|
|
60
|
+
return (react_1.default.createElement("span", { className: "switch" },
|
|
61
|
+
react_1.default.createElement("input", __assign({}, rest, { className: classnames_1.default('switch__control', className), id: id, role: "switch", type: "checkbox", value: value, "aria-checked": isChecked, checked: isChecked, name: name, onChange: handleChange })),
|
|
62
|
+
react_1.default.createElement("span", { className: "switch__button" })));
|
|
63
|
+
};
|
|
64
|
+
exports.default = EbaySwitch;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-switch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,eAAe,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Deprecated, use [EbayTabs](../ebay-tabs) instead.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Activation, Size } from '../ebay-tabs';
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated Use Activation union type instead
|
|
4
|
+
*/
|
|
5
|
+
export declare const activations: {
|
|
6
|
+
[key: string]: Activation;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated Use Size union type instead
|
|
10
|
+
*/
|
|
11
|
+
export declare const sizes: {
|
|
12
|
+
[key: string]: Size;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=enums.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../src/ebay-tab/enums.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAE/C;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAA;CAGpD,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,KAAK,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;CAGxC,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sizes = exports.activations = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Use Activation union type instead
|
|
6
|
+
*/
|
|
7
|
+
exports.activations = {
|
|
8
|
+
AUTO: "auto",
|
|
9
|
+
MANUAL: "manual"
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated Use Size union type instead
|
|
13
|
+
*/
|
|
14
|
+
exports.sizes = {
|
|
15
|
+
MEDIUM: "medium",
|
|
16
|
+
LARGE: "large"
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-tab/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,QAAQ,IAAI,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAC3F,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Use EbayTabs instead
|
|
5
|
+
*/
|
|
6
|
+
var ebay_tabs_1 = require("../ebay-tabs");
|
|
7
|
+
Object.defineProperty(exports, "EbayTab", { enumerable: true, get: function () { return ebay_tabs_1.EbayTabs; } });
|
|
8
|
+
Object.defineProperty(exports, "EbayTabHeading", { enumerable: true, get: function () { return ebay_tabs_1.EbayTab; } });
|
|
9
|
+
Object.defineProperty(exports, "EbayTabPanel", { enumerable: true, get: function () { return ebay_tabs_1.EbayTabPanel; } });
|
|
10
|
+
var enums_1 = require("./enums");
|
|
11
|
+
Object.defineProperty(exports, "activations", { enumerable: true, get: function () { return enums_1.activations; } });
|
|
12
|
+
Object.defineProperty(exports, "sizes", { enumerable: true, get: function () { return enums_1.sizes; } });
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# ebay-tab
|
|
2
|
+
|
|
3
|
+
## Demo
|
|
4
|
+
[Storybook](https://opensource.ebay.com/ebayui-core-react/main/?path=/story/ebay-tabs--default)
|
|
5
|
+
|
|
6
|
+
## Import JS
|
|
7
|
+
```jsx harmony
|
|
8
|
+
import { EbayTab, EbayTabHeading, EbayTabPanel } from '@ebay/ui-core-react/ebay-tabs'
|
|
9
|
+
```
|
|
10
|
+
## Import following styles from SKIN
|
|
11
|
+
```jsx harmony
|
|
12
|
+
import '@ebay/skin/tabs.css';
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
```jsx harmony
|
|
17
|
+
<EbayTabs>
|
|
18
|
+
<EbayTabHeading>Tab 1</EbayTabHeading>
|
|
19
|
+
<EbayTabHeading>Tab 2</EbayTabHeading>
|
|
20
|
+
<EbayTabHeading>Tab 3</EbayTabHeading>
|
|
21
|
+
<EbayTabPanel>Panel 1</EbayTabPanel>
|
|
22
|
+
<EbayTabPanel>Panel 2</EbayTabPanel>
|
|
23
|
+
<EbayTabPanel>Panel 3</EbayTabPanel>
|
|
24
|
+
</EbayTabs>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Props
|
|
28
|
+
|
|
29
|
+
Name | Type | Stateful | Description
|
|
30
|
+
--- | --- | --- | ---
|
|
31
|
+
`index` |Number | Yes | 0-based index of selected tab heading and panel
|
|
32
|
+
`fake` | Boolean | No | Whether to use link behavior for tab headings (DEPRECATED, works automatically)
|
|
33
|
+
`activation` | Enum | Yes | whether to use automatic or manual activation when navigating by keyboard, can be `auto` (default) or `manual`
|
|
34
|
+
`size` | Enum | No | Whether to opt into larger font-size for tab headings, can be `medium` (default) or `large`
|
|
35
|
+
|
|
36
|
+
## Callbacks
|
|
37
|
+
|
|
38
|
+
Event | Data | Description
|
|
39
|
+
--- | --- | ---
|
|
40
|
+
`onTabSelect` | `{ index }` |
|
|
41
|
+
|
|
42
|
+
## EbayTabHeading
|
|
43
|
+
|
|
44
|
+
### EbayTabHeading Usage
|
|
45
|
+
|
|
46
|
+
```jsx harmony
|
|
47
|
+
<EbayTabHeading>Tab 1</EbayTabHeading>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## EbayTabHeading Attributes
|
|
51
|
+
|
|
52
|
+
Name | Type | Stateful | Description
|
|
53
|
+
--- | --- | --- | ---
|
|
54
|
+
`href` | String | No | For use with `fake` tab component (links instead of real tabs)
|
|
55
|
+
|
|
56
|
+
## EbayTabPanel usage
|
|
57
|
+
```jsx harmony
|
|
58
|
+
<EbayTabPanel>Panel 1</EbayTabPanel>
|
|
59
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-tabs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAC5C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,OAAO,CAAA;AAC1C,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,aAAa,CAAA;AACrD,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var tabs_1 = require("./tabs");
|
|
4
|
+
Object.defineProperty(exports, "EbayTabs", { enumerable: true, get: function () { return tabs_1.default; } });
|
|
5
|
+
var tab_1 = require("./tab");
|
|
6
|
+
Object.defineProperty(exports, "EbayTab", { enumerable: true, get: function () { return tab_1.default; } });
|
|
7
|
+
var tab_panel_1 = require("./tab-panel");
|
|
8
|
+
Object.defineProperty(exports, "EbayTabPanel", { enumerable: true, get: function () { return tab_panel_1.default; } });
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComponentProps, FC } from 'react';
|
|
2
|
+
declare type TabPanelProps = ComponentProps<'div'> & {
|
|
3
|
+
index?: number;
|
|
4
|
+
selected?: boolean;
|
|
5
|
+
fake?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const TabPanel: FC<TabPanelProps>;
|
|
8
|
+
export default TabPanel;
|
|
9
|
+
//# sourceMappingURL=tab-panel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tab-panel.d.ts","sourceRoot":"","sources":["../../src/ebay-tabs/tab-panel.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAGjD,aAAK,aAAa,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;CAClB,CAAA;AAED,QAAA,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAyB3B,CAAA;AAEL,eAAe,QAAQ,CAAA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
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 TabPanel = function (_a) {
|
|
31
|
+
var children = _a.children, index = _a.index, selected = _a.selected, fake = _a.fake, className = _a.className, rest = __rest(_a, ["children", "index", "selected", "fake", "className"]);
|
|
32
|
+
return fake ? (react_1.default.createElement("div", __assign({}, rest, { className: classnames_1.default(className, 'fake-tabs__cell') }), children)) : (react_1.default.createElement("div", __assign({}, rest, { "aria-labelledby": "default-tab-" + index, className: classnames_1.default(className, 'tabs__panel'), id: "default-tabpanel-" + index, role: "tabpanel", hidden: !selected }),
|
|
33
|
+
react_1.default.createElement("div", { className: "tabs__cell" }, children)));
|
|
34
|
+
};
|
|
35
|
+
exports.default = TabPanel;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComponentProps, FC } from 'react';
|
|
2
|
+
declare type TabProps = ComponentProps<'li'> & ComponentProps<'div'> & {
|
|
3
|
+
index?: number;
|
|
4
|
+
selected?: boolean;
|
|
5
|
+
href?: string;
|
|
6
|
+
onClick?: () => void;
|
|
7
|
+
onKeyDown?: () => void;
|
|
8
|
+
refCallback?: () => void;
|
|
9
|
+
};
|
|
10
|
+
declare const Tab: FC<TabProps>;
|
|
11
|
+
export default Tab;
|
|
12
|
+
//# sourceMappingURL=tab.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tab.d.ts","sourceRoot":"","sources":["../../src/ebay-tabs/tab.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAGjD,aAAK,QAAQ,GAAG,cAAc,CAAC,IAAI,CAAC,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IAC3D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;CAC5B,CAAA;AAED,QAAA,MAAM,GAAG,EAAE,EAAE,CAAC,QAAQ,CAkCjB,CAAA;AAEL,eAAe,GAAG,CAAA"}
|
package/ebay-tabs/tab.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
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 Tab = function (_a) {
|
|
31
|
+
var children = _a.children, index = _a.index, selected = _a.selected, href = _a.href, className = _a.className, refCallback = _a.refCallback, _b = _a.onClick, onClick = _b === void 0 ? function () { } : _b, _c = _a.onKeyDown, onKeyDown = _c === void 0 ? function () { } : _c, rest = __rest(_a, ["children", "index", "selected", "href", "className", "refCallback", "onClick", "onKeyDown"]);
|
|
32
|
+
return href ? (react_1.default.createElement("li", __assign({}, rest, { className: classnames_1.default(className, 'fake-tabs__item', { 'fake-tabs__item--current': selected }) }),
|
|
33
|
+
react_1.default.createElement("a", { href: href, "aria-current": selected ? "page" : null }, children))) : (react_1.default.createElement("div", __assign({}, rest, { ref: refCallback, "aria-controls": "default-tabpanel-" + index, "aria-selected": selected, className: classnames_1.default(className, 'tabs__item'), id: "default-tab-" + index, role: "tab", tabIndex: selected ? 0 : -1, onClick: onClick, onKeyDown: onKeyDown }),
|
|
34
|
+
react_1.default.createElement("span", null, children)));
|
|
35
|
+
};
|
|
36
|
+
exports.default = Tab;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Component, ComponentProps, ReactElement } from 'react';
|
|
2
|
+
import { Activation, Size } from './types';
|
|
3
|
+
declare type TabsProps = ComponentProps<'div'> & {
|
|
4
|
+
index?: number;
|
|
5
|
+
/** @deprecated Kept for backward-compatibility with eBayUI */
|
|
6
|
+
fake?: boolean;
|
|
7
|
+
size?: Size;
|
|
8
|
+
activation?: Activation;
|
|
9
|
+
onTabSelect?: (index: number) => void;
|
|
10
|
+
};
|
|
11
|
+
declare type State = {
|
|
12
|
+
selectedIndex: number;
|
|
13
|
+
focusedIndex: number;
|
|
14
|
+
};
|
|
15
|
+
declare class Tabs extends Component<TabsProps, State> {
|
|
16
|
+
headings: HTMLElement[];
|
|
17
|
+
constructor(props: TabsProps);
|
|
18
|
+
componentDidUpdate(prevProps: TabsProps): void;
|
|
19
|
+
onTabSelect(i: number): void;
|
|
20
|
+
/**
|
|
21
|
+
* Handle a11y for heading
|
|
22
|
+
* https://ebay.gitbooks.io/mindpatterns/content/disclosure/tabs.html
|
|
23
|
+
*/
|
|
24
|
+
onTabKeyDown(ev: KeyboardEvent, index: number): void;
|
|
25
|
+
render(): ReactElement;
|
|
26
|
+
}
|
|
27
|
+
export default Tabs;
|
|
28
|
+
//# sourceMappingURL=tabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../src/ebay-tabs/tabs.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAItE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAI1C,aAAK,SAAS,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8DAA8D;IAE9D,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC,CAAC;AAEF,aAAK,KAAK,GAAG;IACT,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;CACxB,CAAA;AAGD,cAAM,IAAK,SAAQ,SAAS,CAAC,SAAS,EAAE,KAAK,CAAC;IAC1C,QAAQ,EAAE,WAAW,EAAE,CAAC;gBAEZ,KAAK,EAAE,SAAS;IAc5B,kBAAkB,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI;IAO9C,WAAW,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;IAU5B;;;OAGG;IACH,YAAY,CAAC,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAyBpD,MAAM,IAAI,YAAY;CAwDzB;AAED,eAAe,IAAI,CAAA"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
extendStatics(d, b);
|
|
11
|
+
function __() { this.constructor = d; }
|
|
12
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
+
};
|
|
14
|
+
})();
|
|
15
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
18
|
+
}) : (function(o, m, k, k2) {
|
|
19
|
+
if (k2 === undefined) k2 = k;
|
|
20
|
+
o[k2] = m[k];
|
|
21
|
+
}));
|
|
22
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
23
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
24
|
+
}) : function(o, v) {
|
|
25
|
+
o["default"] = v;
|
|
26
|
+
});
|
|
27
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
35
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
|
+
};
|
|
37
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
+
var react_1 = __importStar(require("react"));
|
|
39
|
+
var event_utils_1 = require("../common/event-utils");
|
|
40
|
+
var tab_1 = __importDefault(require("./tab"));
|
|
41
|
+
var tab_panel_1 = __importDefault(require("./tab-panel"));
|
|
42
|
+
var component_utils_1 = require("../common/component-utils");
|
|
43
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
44
|
+
// todo: convert to hooks
|
|
45
|
+
var Tabs = /** @class */ (function (_super) {
|
|
46
|
+
__extends(Tabs, _super);
|
|
47
|
+
function Tabs(props) {
|
|
48
|
+
var _this = _super.call(this, props) || this;
|
|
49
|
+
var _a = props.index, index = _a === void 0 ? 0 : _a;
|
|
50
|
+
_this.onTabSelect = _this.onTabSelect.bind(_this);
|
|
51
|
+
_this.headings = [];
|
|
52
|
+
_this.state = {
|
|
53
|
+
selectedIndex: index,
|
|
54
|
+
focusedIndex: index
|
|
55
|
+
};
|
|
56
|
+
return _this;
|
|
57
|
+
}
|
|
58
|
+
Tabs.prototype.componentDidUpdate = function (prevProps) {
|
|
59
|
+
var _a;
|
|
60
|
+
if (this.props.index !== prevProps.index) {
|
|
61
|
+
this.onTabSelect(this.props.index);
|
|
62
|
+
}
|
|
63
|
+
(_a = this.headings[this.state.focusedIndex]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
64
|
+
};
|
|
65
|
+
Tabs.prototype.onTabSelect = function (i) {
|
|
66
|
+
if (this.props.onTabSelect) {
|
|
67
|
+
this.props.onTabSelect(i);
|
|
68
|
+
}
|
|
69
|
+
this.setState({
|
|
70
|
+
selectedIndex: i,
|
|
71
|
+
focusedIndex: i
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Handle a11y for heading
|
|
76
|
+
* https://ebay.gitbooks.io/mindpatterns/content/disclosure/tabs.html
|
|
77
|
+
*/
|
|
78
|
+
Tabs.prototype.onTabKeyDown = function (ev, index) {
|
|
79
|
+
var _this = this;
|
|
80
|
+
var _a = this.props, _b = _a.activation, activation = _b === void 0 ? 'auto' : _b, children = _a.children;
|
|
81
|
+
event_utils_1.handleActionKeydown(ev, function () {
|
|
82
|
+
ev.preventDefault();
|
|
83
|
+
if (activation === 'manual') {
|
|
84
|
+
_this.onTabSelect(index);
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
event_utils_1.handleLeftRightArrowsKeydown(ev, function () {
|
|
88
|
+
ev.preventDefault();
|
|
89
|
+
var len = component_utils_1.filterByType(children, tab_1.default).length;
|
|
90
|
+
var direction = ['Left', 'ArrowLeft'].includes(ev.key) ? -1 : 1;
|
|
91
|
+
var nextIndex = (_this.state.focusedIndex + len + direction) % len;
|
|
92
|
+
_this.setState({ focusedIndex: nextIndex });
|
|
93
|
+
if (activation !== 'manual') {
|
|
94
|
+
_this.onTabSelect(nextIndex);
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
Tabs.prototype.render = function () {
|
|
99
|
+
var _this = this;
|
|
100
|
+
var _a = this.props, className = _a.className, _b = _a.size, size = _b === void 0 ? 'medium' : _b, children = _a.children;
|
|
101
|
+
var fake = component_utils_1.filterBy(children, function (_a) {
|
|
102
|
+
var type = _a.type, props = _a.props;
|
|
103
|
+
return type === tab_1.default && props.href;
|
|
104
|
+
}).length > 0;
|
|
105
|
+
var large = size === 'large';
|
|
106
|
+
var tabHeadings = component_utils_1.filterByType(children, tab_1.default).map(function (item, i) {
|
|
107
|
+
var _a = item.props, href = _a.href, content = _a.children;
|
|
108
|
+
var itemProps = {
|
|
109
|
+
refCallback: function (ref) { _this.headings[i] = ref; },
|
|
110
|
+
index: i,
|
|
111
|
+
selected: _this.state.selectedIndex === i,
|
|
112
|
+
href: href,
|
|
113
|
+
children: content,
|
|
114
|
+
onClick: function () { _this.onTabSelect(i); },
|
|
115
|
+
onKeyDown: function (e) { _this.onTabKeyDown(e, i); }
|
|
116
|
+
};
|
|
117
|
+
return react_1.default.cloneElement(item, itemProps);
|
|
118
|
+
});
|
|
119
|
+
var tabPanels = component_utils_1.filterByType(children, tab_panel_1.default).map(function (item, i) {
|
|
120
|
+
var content = item.props.children;
|
|
121
|
+
var itemProps = {
|
|
122
|
+
index: i,
|
|
123
|
+
selected: _this.state.selectedIndex === i,
|
|
124
|
+
fake: fake,
|
|
125
|
+
children: content
|
|
126
|
+
};
|
|
127
|
+
return react_1.default.cloneElement(item, itemProps);
|
|
128
|
+
});
|
|
129
|
+
return fake ? (react_1.default.createElement("div", { className: classnames_1.default(className, 'fake-tabs') },
|
|
130
|
+
react_1.default.createElement("ul", { className: classnames_1.default('fake-tabs__items', { 'fake-tabs__items--large': large }) }, tabHeadings),
|
|
131
|
+
react_1.default.createElement("div", { className: "fake-tabs__content" }, tabPanels))) : (react_1.default.createElement("div", { className: classnames_1.default(className, 'tabs') },
|
|
132
|
+
react_1.default.createElement("div", { className: classnames_1.default('tabs__items', { 'tabs__items--large': large }), role: "tablist" }, tabHeadings),
|
|
133
|
+
react_1.default.createElement("div", { className: "tabs__content" }, tabPanels)));
|
|
134
|
+
};
|
|
135
|
+
return Tabs;
|
|
136
|
+
}(react_1.Component));
|
|
137
|
+
exports.default = Tabs;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ebay-tabs/types.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU,GAAG,MAAM,GAAG,QAAQ,CAAA;AAC1C,oBAAY,IAAI,GAAG,QAAQ,GAAG,OAAO,CAAA"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# ebay-textbox
|
|
2
|
+
|
|
3
|
+
## Demo
|
|
4
|
+
|
|
5
|
+
[Storybook](https://opensource.ebay.com/ebayui-core-react/main/?path=/story/ebay-textbox--default)
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
yarn add @ebay/ui-core-react
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
### Import JS
|
|
14
|
+
|
|
15
|
+
```jsx harmony
|
|
16
|
+
import { EbayTextbox } from '@ebay/ui-core-react/ebay-textbox'
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Import following styles from SKIN
|
|
20
|
+
|
|
21
|
+
```jsx harmony
|
|
22
|
+
import "@ebay/skin/textbox";
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### or if using CSS/SCSS
|
|
26
|
+
|
|
27
|
+
```jsx
|
|
28
|
+
import "@ebay/skin/textbox.css";
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
```jsx harmony
|
|
32
|
+
<EbayTextbox value="Search for anything" />
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Props
|
|
36
|
+
|
|
37
|
+
| Name | Type | Stateful | Required | Description |
|
|
38
|
+
| --------------- | -------- | -------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
39
|
+
| `fluid` | Boolean | No | No | Takes the full width of the container
|
|
40
|
+
| `multiline` | Boolean | No | No | Renders a multi-line textbox if true |
|
|
41
|
+
| `invalid` | Boolean | No | No | Indicates a field-level error with red border if true |
|
|
42
|
+
| `type` | String | No | No | Default: `text`, can be `password` if needed |
|
|
43
|
+
| `value` | String | No | No | Indicates the value of the input element, required for a controlled component. |
|
|
44
|
+
| `defaultValue` | String | No | No | Indicates the default input element value. Use when the component is not controlled. |
|
|
45
|
+
| `inputSize` | String | No | No | `default` (default), `large` |
|
|
46
|
+
| `floatingLabel` | String | No | No | Indicates that the input is a floating label type and renders it as a label |
|
|
47
|
+
| `onFocus` | Function | No | No | Called when input gets focus, parameters passed: `originalEvent`, `value` |
|
|
48
|
+
| `onBlur` | Function | No | No | Called when input loses focus, parameters passed: `originalEvent`, `value` |
|
|
49
|
+
| `onChange` | Function | No | No | Called when input changes value, parameters passed: `originalEvent`, `value` |
|
|
50
|
+
| `onButtonClick` | Function | No | No | Triggers when clicking on postfix-icon-button. Requires `buttonAriaLabel` to be present in order to attach correctly |
|
|
51
|
+
|
|
52
|
+
It supports all the events supported by an input element (e.g. `onInput`, `onKeyDown`, `onKeyUp`)
|
|
53
|
+
|
|
54
|
+
## EbayTextboxPrefixIcon
|
|
55
|
+
| Name | Type | Required | Description |
|
|
56
|
+
| --------------- | -------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
57
|
+
| `name` | String | No | Name of the icon to show
|
|
58
|
+
|
|
59
|
+
## EbayTextboxPostfixIcon
|
|
60
|
+
| Name | Type | Required | Description |
|
|
61
|
+
| --------------- | -------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
62
|
+
| `name` | String | No | Name of the icon to show
|
|
63
|
+
| `buttonAriaLabel`| String | No | Aria-label for postfix icon/button. Required in order to render postfix button |
|
|
64
|
+
|
|
65
|
+
### EbayTextboxPrefixIcon example
|
|
66
|
+
```jsx
|
|
67
|
+
import { EbayTextbox, EbayTextboxPrefixIcon } from '@ebay/ui-core-react/ebay-textbox'
|
|
68
|
+
|
|
69
|
+
<EbayTextbox placeholder="email">
|
|
70
|
+
<EbayTextboxPrefixIcon name="messages" />
|
|
71
|
+
</EbayTextbox>
|
|
72
|
+
```
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as EbayTextbox, EbayTextboxProps } from './textbox';
|
|
2
|
+
export { default as EbayTextboxPrefixIcon } from './prefix-icon';
|
|
3
|
+
export { default as EbayTextboxPostfixIcon } from './postfix-icon';
|
|
4
|
+
export { Size } from './types';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-textbox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AACpE,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AAClE,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA"}
|