Package Exports
- @ebay/ui-core-react/ebay-breadcrumbs
- @ebay/ui-core-react/ebay-breadcrumbs/index.js
- @ebay/ui-core-react/ebay-button
- @ebay/ui-core-react/ebay-button/index.js
- @ebay/ui-core-react/ebay-checkbox
- @ebay/ui-core-react/ebay-checkbox/index.js
- @ebay/ui-core-react/ebay-confirm-dialog
- @ebay/ui-core-react/ebay-confirm-dialog/index.js
- @ebay/ui-core-react/ebay-dialog-base
- @ebay/ui-core-react/ebay-dialog-base/index.js
- @ebay/ui-core-react/ebay-fake-tabs
- @ebay/ui-core-react/ebay-fake-tabs/index.js
- @ebay/ui-core-react/ebay-field
- @ebay/ui-core-react/ebay-field/index.js
- @ebay/ui-core-react/ebay-icon
- @ebay/ui-core-react/ebay-icon-button
- @ebay/ui-core-react/ebay-icon-button/index.js
- @ebay/ui-core-react/ebay-icon/index.js
- @ebay/ui-core-react/ebay-infotip
- @ebay/ui-core-react/ebay-infotip/index.js
- @ebay/ui-core-react/ebay-inline-notice
- @ebay/ui-core-react/ebay-inline-notice/index.js
- @ebay/ui-core-react/ebay-lightbox-dialog
- @ebay/ui-core-react/ebay-lightbox-dialog/index.js
- @ebay/ui-core-react/ebay-page-notice
- @ebay/ui-core-react/ebay-page-notice/index.js
- @ebay/ui-core-react/ebay-progress-spinner
- @ebay/ui-core-react/ebay-progress-spinner/index.js
- @ebay/ui-core-react/ebay-select
- @ebay/ui-core-react/ebay-select/index.js
- @ebay/ui-core-react/ebay-switch
- @ebay/ui-core-react/ebay-switch/index.js
- @ebay/ui-core-react/ebay-tabs
- @ebay/ui-core-react/ebay-tabs/index.js
- @ebay/ui-core-react/ebay-textbox
- @ebay/ui-core-react/ebay-textbox/index.js
- @ebay/ui-core-react/ebay-tooltip
- @ebay/ui-core-react/ebay-tooltip/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@ebay/ui-core-react) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
ebayui-core-react
eBayUI React components
Requirements
eBayUI Components
-
ebay-3d-viewer - ebay-alert-dialog
- ebay-confirm-dialog
- ebay-badge
- ebay-breadcrumbs
- ebay-button
-
ebay-calendar - ebay-carousel
- ebay-checkbox
-
ebay-combobox - ebay-confirm-dialog
- ebay-cta-button
-
ebay-date-textbox -
ebay-details - ebay-drawer-dialog
- ebay-eek
- ebay-fullscreen-dialog
-
ebay-fake-link - ebay-fake-menu
- ebay-fake-menu-button
- ebay-fake-tabs
- ebay-field
-
ebay-filter(in progress...) -
ebay-filter-menu -
ebay-filter-menu-button - ebay-icon-button
- ebay-icon
- ebay-infotip
- ebay-inline-notice
- ebay-lightbox-dialog
-
ebay-line-chart - ebay-listbox-button
-
ebay-listbox - ebay-menu
- ebay-menu-button
- ebay-page-notice
- ebay-pagination
- ebay-panel-dialog
- ebay-progress-bar
- ebay-progress-spinner
- ebay-progress-stepper
- ebay-radio
- ebay-section-title
- ebay-section-notice
- ebay-select
- ebay-signal
- ebay-snackbar-dialog
- ebay-split-button
- ebay-star-rating
- ebay-star-rating-select
- ebay-switch
- ebay-tabs
- ebay-textbox
- ebay-toast-dialog
- ebay-tooltip
- ebay-tourtip
-
ebay-tri-state-checkbox - ebay-video
Getting Started
These react components are available as @ebay/ui-core-react package on NPM.
Use npm or yarn to add the package dependency to your project:
yarn add @ebay/ui-core-reactfor quick development/POC
import { EbayTextbox, EbayButton } from '@ebay/ui-core-react'
<EbayTextbox placeholder="Enter text here" />
<EbayButton>Submit</EbayButton>for smaller bundle size
import { EbayTextbox } from '@ebay/ui-core-react/ebay-textbox'
import { EbayButton } from '@ebay/ui-core-react/ebay-button'
<EbayTextbox placeholder="Enter text here" />
<EbayButton>Submit</EbayButton>Notes
If you render children components dynamically and don't want to get React key warnings then provide a key:
<EbayParentComponent>
{items.map((item, index) => <EbayChildComponent key={index}>{item}</EbayChildComponent>)}
</EbayParentComponent>IE-10/11 (deprecated)
You will need polyfills for IE. Recommended approach is using core-js with or without babel.
To manually use polyfills you need to import them:
import 'core-js/stable/object/values'
Object.values({ a: 'Hello' }).map(console.log)But we suggest to use polyfills automatically by editing your .babelrc:
{
"presets": [
[
"@babel/preset-env",
{
"useBuiltIns": "usage",
"corejs": "3",
"targets": {
"chrome": "63",
"safari": "12",
"ios": "12",
"edge": "18",
"ie": "11"
}
}
]
]
}targets can also be something like "> 0.2%, not dead"
Issues
Create an issue on github
Contributing
Write an email to tmanyanov@ebay.com
How to update icons on skin changes
This will update EbaySvg and EbayIcon components:
yarn update-iconsQuick guidance for contribution:
- Create a feature branch
git checkout -b features/new-component yarn installto install dependencies- Add documentations:
README.mdon component level- Unit test
- Storybook file for snapshot tests and also component showcase/demo
- Make your changes pass the:
yarn lint. You can doyarn lint --fixto automatically fix small lint issues (e.g indentation, whitespace, semicolons, ...)yarn test. Doyarn test -uto automatically the snapshot tests.
Requirements for new component
If you implement a new component, make sure that it complies with eBay UI guidelines:
- Skin
- MIND pattern for accessibility
One way to comply those guidelines is to implement your new component as similiar as possible with the Marko eBayUI Core, or port the Marko implementation to React. This means the new component should:
- Output the same HTML structure
- Have similiar behaviour (e.g open menu dropdown on click and keyboard)
- Support the same attributes (e.g ebay-breadcrumb
a11y-heading-text, or ebay-buttonpriority) - Support the same events (e.g ebay-select
select-change). Since React does not use event emitter (unlike Marko), one can implement this as a prop with Function.
Changelog
@ebay/ui-core-react
version 4.x (Skin 16, breaking changes in icon names)
version 3.x (Skin 15, some breaking changes in dialog components)
version 2.x (Skin 15)
@ebay/ebayui-core-react
version 10.x (Skin 14)
version 9.x (skin 13)
ebayui-core-react