@ebay/ui-core-react 5.9.0 → 5.9.2
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 +1 -35
- package/ebay-listbox-button/listbox-button.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -118,41 +118,7 @@ Example of usage:
|
|
|
118
118
|
|
|
119
119
|
Create an issue on github
|
|
120
120
|
|
|
121
|
-
## Contributing
|
|
122
|
-
|
|
123
|
-
Write an email to tmanyanov@ebay.com
|
|
124
|
-
|
|
125
|
-
### How to update icons on `skin` changes
|
|
126
|
-
This will update `EbaySvg` and `EbayIcon` components:
|
|
127
|
-
```shell script
|
|
128
|
-
yarn update-icons
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
### Quick guidance for contribution:
|
|
132
|
-
|
|
133
|
-
- Create a feature branch `git checkout -b features/new-component`
|
|
134
|
-
- `yarn install` to install dependencies
|
|
135
|
-
- Add documentations:
|
|
136
|
-
* `README.md` on component level
|
|
137
|
-
* Unit test
|
|
138
|
-
* Storybook file for snapshot tests and also component showcase/demo
|
|
139
|
-
- Make your changes pass the:
|
|
140
|
-
* `yarn lint`. You can do `yarn lint --fix` to automatically fix small lint issues (e.g indentation, whitespace, semicolons, ...)
|
|
141
|
-
* `yarn test`. Do `yarn test -u` to automatically the snapshot tests.
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
### Requirements for new component
|
|
145
|
-
|
|
146
|
-
If you implement a new component, make sure that it complies with eBay UI guidelines:
|
|
147
|
-
* [Skin](https://ebay.github.io/skin/)
|
|
148
|
-
* [MIND pattern](https://ebay.gitbook.io/mindpatterns/) for accessibility
|
|
149
|
-
|
|
150
|
-
One way to comply those guidelines is to implement your new component as similiar as possible with the Marko [eBayUI Core](https://github.com/eBay/ebayui-core), or port the Marko implementation to React. This means the new component should:
|
|
151
|
-
|
|
152
|
-
* Output the same HTML structure
|
|
153
|
-
* Have similiar behaviour (e.g open menu dropdown on click and keyboard)
|
|
154
|
-
* Support the same attributes (e.g ebay-breadcrumb `a11y-heading-text`, or ebay-button `priority`)
|
|
155
|
-
* 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.
|
|
121
|
+
## [Contributing](CONTRIBUTING.md)
|
|
156
122
|
|
|
157
123
|
## Changelog
|
|
158
124
|
|
|
@@ -157,8 +157,8 @@ var ListboxButton = function (_a) {
|
|
|
157
157
|
}
|
|
158
158
|
};
|
|
159
159
|
var makeSelections = function (updatedIndex) {
|
|
160
|
-
makeOptionActive(updatedIndex);
|
|
161
|
-
makeOptionInActive(selectedIndex);
|
|
160
|
+
makeOptionActive(selectedIndex === undefined || updatedIndex === -1 ? 0 : updatedIndex);
|
|
161
|
+
makeOptionInActive(selectedIndex === undefined || selectedIndex === -1 ? 0 : selectedIndex);
|
|
162
162
|
scrollOptions(updatedIndex);
|
|
163
163
|
setActiveDescendant(updatedIndex);
|
|
164
164
|
setSelectedIndex(updatedIndex);
|