Research
Security News
Malicious PyPI Package ‘pycord-self’ Targets Discord Developers with Token Theft and Backdoor Exploit
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
@ebay/ebayui-core
Advanced tools
Collection of core eBay components; considered to be the building blocks for all composite structures, pages & apps.
Collection of Marko widgets; considered to be the core building blocks for all eBay components, pages & apps.
Note:
Marko v3 requires Marko Widgets v6
Marko v4 requires Marko Widgets v7
The eBayUI components are Marko custom tags that follow the core principles of HTML. For example:
For more information, please read Building a UI Component in 2017 and Beyond.
All components are developed and tested cross-browser using BrowserStack, in accordance with our official eBay Browser Policy.
We take accessibility very seriously. Very seriously indeed. Therefore all components are built in accordance to the eBay MIND Patterns. These patterns, in turn, build on from the specifications provided by the WAI-ARIA Authoring Practices.
Components are built in a layered, progressively enhanced fashion, utilizing the following resources:
Each layer does its bit to enforce and enhance accessibility. We consider this level of support to be one of our chief selling points, and we hope you do too!
ebay-dialog
ebay-icon
ebay-infotip
ebay-menu
ebay-notice
ebay-pagination
ebay-radio
ebay-select
ebay-switch
ebay-tab
ebay-textbox
ebay-tooltip
ebay-tourtip
The eBayUI core components are available as the @ebay/ebayui-core
package on NPM.
Use npm or yarn to add the package dependency to your project:
yarn add @ebay/ebayui-core
Once the package dependency is added, the eBay customs tags are now available for use in your Marko templates. For example, to use an ebay-menu
component:
template.marko
<ebay-menu text="Sort" type="radio">
<ebay-menu-item>Price</ebay-menu-item>
<ebay-menu-item>Time</ebay-menu-item>
<ebay-menu-item>Distance</ebay-menu-item>
</ebay-menu>
On Marko v3, remember to include the component's resources in your browser.json
file.
browser.json
{
"dependencies": [
"@ebay/ebayui-core/ebay-menu"
]
}
Attributes provide initial state for a component. We can see that the menu has text
and type
attributes:
template.marko
<ebay-menu text="Sort" type="radio">
<ebay-menu-item>Price</ebay-menu-item>
<ebay-menu-item>Time</ebay-menu-item>
<ebay-menu-item>Distance</ebay-menu-item>
</ebay-menu>
Some attributes are stateful and can be updated via the DOM. The text attribute, for example:
var menu = document.querySelector('.menu');
menu.text = 'Sortieren';
HTML attributes can be used on any component, and they will be passed through to the most prominent tag of the component. The most prominent tag is usually the root, but individual components will note if it varies for specific cases.
Example of static usage:
<ebay-button id="my-button"/>
For using pass-through attributes dynamically, they should be sent through the html-attributes
attribute:
<!-- data.htmlAttributes = { id: 'my-button' } -->
<ebay-button html-attributes=data.htmlAttributes/>
Static and dynamic pass-through attributes can be used simulatenously (html-attributes takes precedence in conflicts):
<!-- data.htmlAttributes = { id: 'my-button' } -->
<ebay-button html-attributes=data.htmlAttributes type="submit"/>
Events can be handled via the DOM. For example, the menu emits a menu-change
event:
menu.addEventListener('menu-change', onMenuChange);
Events can also be handled using Marko syntax:
template.marko
<ebay-menu text="Sort" type="radio" on-change("onMenuChange")>
<ebay-menu-item>Price</ebay-menu-item>
<ebay-menu-item>Time</ebay-menu-item>
<ebay-menu-item>Distance</ebay-menu-item>
</ebay-menu>
Note: when using DOM events, you should also handle event destruction and delegation as needed.
For upcoming roadmap and release history, please refer to our releases and milestones pages.
The ebayui-core package follows strict Semantic Versioning.
Given a version number MAJOR.MINOR.PATCH:
Please use our issues page to ask questions, report issues or submit feature requests.
To help track your issue, our admins will assign it with one or more coloured labels:
Looking to contribute to eBay UI? Please visit our contributing page for more information.
Copyright (c) 2018 eBay Inc.
Use of this source code is governed by a MIT-style license that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
FAQs
Collection of core eBay components; considered to be the building blocks for all composite structures, pages & apps.
The npm package @ebay/ebayui-core receives a total of 430 weekly downloads. As such, @ebay/ebayui-core popularity was classified as not popular.
We found that @ebay/ebayui-core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.