@ebay/ui-core-react 6.3.0 → 7.0.1
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/common/floating-label-utils/hooks.d.ts.map +1 -1
- package/common/floating-label-utils/hooks.js +3 -2
- package/ebay-alert-dialog/README.md +4 -1
- package/ebay-badge/README.md +2 -2
- package/ebay-breadcrumbs/README.md +1 -1
- package/ebay-button/README.md +1 -1
- package/ebay-calendar/README.md +27 -24
- package/ebay-carousel/README.md +4 -1
- package/ebay-checkbox/README.md +2 -2
- package/ebay-confirm-dialog/README.md +4 -1
- package/ebay-cta-button/README.md +1 -1
- package/ebay-date-textbox/README.md +31 -28
- package/ebay-dialog-base/README.md +1 -1
- package/ebay-drawer-dialog/README.md +3 -0
- package/ebay-eek/README.md +1 -1
- package/ebay-fake-menu/README.md +2 -2
- package/ebay-fake-menu-button/README.md +2 -2
- package/ebay-fake-tabs/README.md +2 -2
- package/ebay-field/README.md +2 -2
- package/ebay-fullscreen-dialog/README.md +4 -1
- package/ebay-icon/README.md +4 -1
- package/ebay-icon/icon.d.ts.map +1 -1
- package/ebay-icon/icon.js +29 -1
- package/ebay-icon/types.d.ts +1 -1
- package/ebay-icon/types.d.ts.map +1 -1
- package/ebay-icon-button/README.md +1 -1
- package/ebay-infotip/README.md +2 -2
- package/ebay-inline-notice/README.md +2 -2
- package/ebay-lightbox-dialog/README.md +4 -1
- package/ebay-lightbox-dialog/lightbox-dialog.d.ts +1 -1
- package/ebay-lightbox-dialog/lightbox-dialog.d.ts.map +1 -1
- package/ebay-listbox-button/README.md +2 -2
- package/ebay-menu/README.md +2 -2
- package/ebay-menu-button/README.md +2 -2
- package/ebay-page-notice/README.md +2 -3
- package/ebay-pagination/README.md +5 -2
- package/ebay-panel-dialog/README.md +4 -1
- package/ebay-progress-bar/README.md +1 -1
- package/ebay-progress-spinner/README.md +1 -1
- package/ebay-progress-spinner/progress-spinner.d.ts.map +1 -1
- package/ebay-progress-spinner/progress-spinner.js +6 -1
- package/ebay-progress-stepper/README.md +3 -4
- package/ebay-radio/README.md +14 -14
- package/ebay-section-notice/README.md +2 -3
- package/ebay-section-title/README.md +10 -9
- package/ebay-select/README.md +5 -2
- package/ebay-signal/README.md +2 -2
- package/ebay-snackbar-dialog/README.md +3 -0
- package/ebay-split-button/README.md +1 -1
- package/ebay-star-rating/README.md +3 -2
- package/ebay-star-rating-select/README.md +3 -2
- package/ebay-svg/README.md +1 -1
- package/ebay-svg/svg.d.ts.map +1 -1
- package/ebay-svg/svg.js +82 -42
- package/ebay-switch/README.md +10 -8
- package/ebay-tabs/README.md +2 -2
- package/ebay-textbox/README.md +32 -34
- package/ebay-textbox/index.d.ts +2 -0
- package/ebay-textbox/index.d.ts.map +1 -1
- package/ebay-textbox/index.js +5 -1
- package/ebay-textbox/postfix-text.d.ts +5 -0
- package/ebay-textbox/postfix-text.d.ts.map +1 -0
- package/ebay-textbox/postfix-text.js +8 -0
- package/ebay-textbox/prefix-text.d.ts +5 -0
- package/ebay-textbox/prefix-text.d.ts.map +1 -0
- package/ebay-textbox/prefix-text.js +8 -0
- package/ebay-textbox/textbox.d.ts +1 -1
- package/ebay-textbox/textbox.d.ts.map +1 -1
- package/ebay-textbox/textbox.js +21 -9
- package/ebay-textbox/types.d.ts +6 -0
- package/ebay-textbox/types.d.ts.map +1 -1
- package/ebay-toast-dialog/README.md +13 -10
- package/ebay-tooltip/README.md +2 -3
- package/ebay-tourtip/README.md +2 -3
- package/ebay-video/README.md +6 -2
- package/package.json +5 -4
package/ebay-switch/README.md
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
#
|
|
1
|
+
# EbaySwitch
|
|
2
2
|
|
|
3
3
|
## Demo
|
|
4
|
-
[Storybook](https://opensource.ebay.com/ebayui-core-react/main/?path=/story/ebay-switch--default-switch-button)
|
|
4
|
+
[Storybook](https://opensource.ebay.com/ebayui-core-react/main/?path=/story/form-input-ebay-switch--default-switch-button)
|
|
5
5
|
|
|
6
6
|
## Import JS
|
|
7
7
|
```jsx harmony
|
|
8
8
|
import { EbaySwitch } from '@ebay/ui-core-react/ebay-switch';
|
|
9
9
|
```
|
|
10
|
+
|
|
10
11
|
## Import following styles from SKIN
|
|
11
12
|
```jsx harmony
|
|
12
13
|
import '@ebay/skin/switch';
|
|
13
14
|
```
|
|
15
|
+
|
|
14
16
|
## Usage
|
|
15
17
|
```
|
|
16
18
|
yarn add @ebay/ui-core-react
|
|
@@ -24,14 +26,14 @@ yarn add @ebay/ui-core-react
|
|
|
24
26
|
|
|
25
27
|
## Attributes
|
|
26
28
|
|
|
27
|
-
Name
|
|
28
|
-
|
|
29
|
-
`disabled` | Boolean | No
|
|
29
|
+
| Name | Type | Stateful | Description |
|
|
30
|
+
| ---------- | ------- | -------- | ----------- |
|
|
31
|
+
| `disabled` | Boolean | No | |
|
|
30
32
|
|
|
31
33
|
## Callbacks
|
|
32
|
-
Name
|
|
33
|
-
|
|
34
|
-
`onChange` | `(ChangeEvent, { value: string, checked: boolean }` | Triggered on change
|
|
34
|
+
| Name | Data | Description |
|
|
35
|
+
| ---------- | --------------------------------------------------- | ----------- |
|
|
36
|
+
| `onChange` | `(ChangeEvent, { value: string, checked: boolean }` | Triggered on change |
|
|
35
37
|
|
|
36
38
|
Note: For this component, `className`/`style` are applied to the root tag, while all other HTML attributes are applied to the `input` tag.
|
|
37
39
|
|
package/ebay-tabs/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
#
|
|
1
|
+
# EbayTabs
|
|
2
2
|
|
|
3
3
|
## Demo
|
|
4
|
-
[Storybook](https://opensource.ebay.com/ebayui-core-react/main/?path=/story/ebay-tabs--default)
|
|
4
|
+
[Storybook](https://opensource.ebay.com/ebayui-core-react/main/?path=/story/navigation-disclosure-ebay-tabs--default-tabs)
|
|
5
5
|
|
|
6
6
|
## Import JS
|
|
7
7
|
```jsx harmony
|
package/ebay-textbox/README.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
#
|
|
1
|
+
# EbayTextbox
|
|
2
2
|
|
|
3
3
|
## Demo
|
|
4
|
-
|
|
5
|
-
[Storybook](https://opensource.ebay.com/ebayui-core-react/main/?path=/story/ebay-textbox--default)
|
|
4
|
+
[Storybook](https://opensource.ebay.com/ebayui-core-react/main/?path=/story/form-input-ebay-textbox--default-textbox)
|
|
6
5
|
|
|
7
6
|
## Usage
|
|
8
7
|
|
|
@@ -36,45 +35,44 @@ import "@ebay/skin/floating-label.css";
|
|
|
36
35
|
|
|
37
36
|
## Props
|
|
38
37
|
|
|
39
|
-
| Name | Type | Stateful | Required | Description
|
|
40
|
-
| --------------- | -------- | -------- | -------- |
|
|
41
|
-
| `fluid` | Boolean | No | No | Takes the full width of the container
|
|
42
|
-
| `multiline` | Boolean | No | No | Renders a multi-line textbox if true
|
|
43
|
-
| `opaqueLabel` | Boolean | No | No | Only works with floating label. If set, then background is obscured of the floating label. Used with textarea to prevent label overlap
|
|
44
|
-
| `invalid` | Boolean | No | No | Indicates a field-level error with red border if true
|
|
45
|
-
| `type` | String | No | No | Default: `text`, can be `password` if needed
|
|
46
|
-
| `value` | String | No | No | Indicates the value of the input element, required for a controlled component.
|
|
47
|
-
| `defaultValue` | String | No | No | Indicates the default input element value. Use when the component is not controlled
|
|
48
|
-
| `inputSize` | String | No | No | `default` (default), `large`
|
|
49
|
-
| `floatingLabel`
|
|
38
|
+
| Name | Type | Stateful | Required | Description |
|
|
39
|
+
| --------------- | -------- | -------- | -------- | ------------------------------------- |
|
|
40
|
+
| `fluid` | Boolean | No | No | Takes the full width of the container |
|
|
41
|
+
| `multiline` | Boolean | No | No | Renders a multi-line textbox if true |
|
|
42
|
+
| `opaqueLabel` | Boolean | No | No | Only works with floating label. If set, then background is obscured of the floating label. Used with textarea to prevent label overlap |
|
|
43
|
+
| `invalid` | Boolean | No | No | Indicates a field-level error with red border if true |
|
|
44
|
+
| `type` | String | No | No | Default: `text`, can be `password` if needed |
|
|
45
|
+
| `value` | String | No | No | Indicates the value of the input element, required for a controlled component. |
|
|
46
|
+
| `defaultValue` | String | No | No | Indicates the default input element value. Use when the component is not controlled.|
|
|
47
|
+
| `inputSize` | String | No | No | `default` (default), `large` |
|
|
48
|
+
| `floatingLabel` | String | No | No | Indicates that the input is a floating label type and renders it as a label |
|
|
50
49
|
|
|
51
50
|
## Callbacks
|
|
52
|
-
| Name
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
| `
|
|
56
|
-
| `
|
|
57
|
-
| `
|
|
58
|
-
| `
|
|
59
|
-
| `
|
|
60
|
-
| `
|
|
61
|
-
| `
|
|
62
|
-
| `
|
|
63
|
-
| `
|
|
64
|
-
| `onButtonClick` | No | Triggers when clicking on postfix-icon-button. Requires `buttonAriaLabel` to be present in order to attach correctly | `(MouseEvent, { value: string })` |
|
|
51
|
+
| Name | Required | Description | Arguments |
|
|
52
|
+
| --------------------- | -------- |--------------------------------------------------------------------------------------------------------------------- | ----------- |
|
|
53
|
+
| `onChange` | No | Triggered when focus leaves and value is changed. | `(ChangeEvent, { value: string })` |
|
|
54
|
+
| `onInputChange` | No | Triggered when the value of the input is changed. | `(ChangeEvent, { value: string })` |
|
|
55
|
+
| `onFocus` | No | Called when input gets focus | `(FocusEvent, { value: string })` |
|
|
56
|
+
| `onBlur` | No | Called when input loses focus | `(FocusEvent, { value: string })` |
|
|
57
|
+
| `onKeyPress` | No | Called on key press | `(KeyboardEvent, { value: string })` |
|
|
58
|
+
| `onKeyUp` | No | Called on key up | `(KeyboardEvent, { value: string })` |
|
|
59
|
+
| `onKeyDown` | No | Called on key down | `(KeyboardEvent, { value: string })` |
|
|
60
|
+
| `onInvalid` | No | Triggered when value is invalid | `(ChangeEvent, { value: string })` |
|
|
61
|
+
| `onFloatingLabelInit` | No | Triggered when floating label is initialized | `()` |
|
|
62
|
+
| `onButtonClick` | No | Triggers when clicking on postfix-icon-button. Requires `buttonAriaLabel` to be present in order to attach correctly | `(MouseEvent, { value: string })` |
|
|
65
63
|
|
|
66
64
|
It supports all the events supported by an input element (e.g. `onInput`, `onPaste`)
|
|
67
65
|
|
|
68
66
|
## EbayTextboxPrefixIcon
|
|
69
|
-
| Name | Type | Required | Description
|
|
70
|
-
| --------------- | -------- | -------- |
|
|
71
|
-
| `name`
|
|
67
|
+
| Name | Type | Required | Description |
|
|
68
|
+
| --------------- | -------- | -------- | ------------------------ |
|
|
69
|
+
| `name` | String | No | Name of the icon to show |
|
|
72
70
|
|
|
73
71
|
## EbayTextboxPostfixIcon
|
|
74
|
-
| Name
|
|
75
|
-
|
|
|
76
|
-
| `name`
|
|
77
|
-
| `buttonAriaLabel
|
|
72
|
+
| Name | Type | Required | Description |
|
|
73
|
+
| ----------------- | ------ | -------- | ------------------------ |
|
|
74
|
+
| `name` | String | No | Name of the icon to show |
|
|
75
|
+
| `buttonAriaLabel` | String | No | Aria-label for postfix icon/button. Required in order to render postfix button |
|
|
78
76
|
|
|
79
77
|
### EbayTextboxPrefixIcon example
|
|
80
78
|
```jsx
|
package/ebay-textbox/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { default as EbayTextbox, EbayTextboxProps } from './textbox';
|
|
2
2
|
export { default as EbayTextboxPrefixIcon } from './prefix-icon';
|
|
3
|
+
export { default as EbayTextboxPrefixText } from './prefix-text';
|
|
3
4
|
export { default as EbayTextboxPostfixIcon } from './postfix-icon';
|
|
5
|
+
export { default as EbayTextboxPostfixText } from './postfix-text';
|
|
4
6
|
export { Size } from './types';
|
|
5
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +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"}
|
|
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,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AAClE,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AAClE,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA"}
|
package/ebay-textbox/index.js
CHANGED
|
@@ -3,10 +3,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.EbayTextboxPostfixIcon = exports.EbayTextboxPrefixIcon = exports.EbayTextbox = void 0;
|
|
6
|
+
exports.EbayTextboxPostfixText = exports.EbayTextboxPostfixIcon = exports.EbayTextboxPrefixText = exports.EbayTextboxPrefixIcon = exports.EbayTextbox = void 0;
|
|
7
7
|
var textbox_1 = require("./textbox");
|
|
8
8
|
Object.defineProperty(exports, "EbayTextbox", { enumerable: true, get: function () { return __importDefault(textbox_1).default; } });
|
|
9
9
|
var prefix_icon_1 = require("./prefix-icon");
|
|
10
10
|
Object.defineProperty(exports, "EbayTextboxPrefixIcon", { enumerable: true, get: function () { return __importDefault(prefix_icon_1).default; } });
|
|
11
|
+
var prefix_text_1 = require("./prefix-text");
|
|
12
|
+
Object.defineProperty(exports, "EbayTextboxPrefixText", { enumerable: true, get: function () { return __importDefault(prefix_text_1).default; } });
|
|
11
13
|
var postfix_icon_1 = require("./postfix-icon");
|
|
12
14
|
Object.defineProperty(exports, "EbayTextboxPostfixIcon", { enumerable: true, get: function () { return __importDefault(postfix_icon_1).default; } });
|
|
15
|
+
var postfix_text_1 = require("./postfix-text");
|
|
16
|
+
Object.defineProperty(exports, "EbayTextboxPostfixText", { enumerable: true, get: function () { return __importDefault(postfix_text_1).default; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postfix-text.d.ts","sourceRoot":"","sources":["../../src/ebay-textbox/postfix-text.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAA;AAErD,QAAA,MAAM,sBAAsB,EAAE,EAAE,CAAC,2BAA2B,CAE3D,CAAA;AAED,eAAe,sBAAsB,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const EbayTextboxPostfixText = (props) => (react_1.default.createElement("span", Object.assign({}, props)));
|
|
8
|
+
exports.default = EbayTextboxPostfixText;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prefix-text.d.ts","sourceRoot":"","sources":["../../src/ebay-textbox/prefix-text.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAA;AAEpD,QAAA,MAAM,qBAAqB,EAAE,EAAE,CAAC,0BAA0B,CAEzD,CAAA;AAED,eAAe,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const EbayTextboxPrefixText = (props) => (react_1.default.createElement("span", Object.assign({}, props)));
|
|
8
|
+
exports.default = EbayTextboxPrefixText;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { ComponentProps, Ref } from 'react';
|
|
2
|
-
import { Size } from './index';
|
|
3
2
|
import { EbayChangeEventHandler, EbayEventHandler, EbayFocusEventHandler, EbayKeyboardEventHandler, EbayMouseEventHandler } from '../common/event-utils/types';
|
|
3
|
+
import type { Size } from './types';
|
|
4
4
|
export declare const isControlled: (value?: unknown) => boolean;
|
|
5
5
|
type TextInputProps = ComponentProps<'input'> & ComponentProps<'textarea'>;
|
|
6
6
|
export type TextboxEventProps = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textbox.d.ts","sourceRoot":"","sources":["../../src/ebay-textbox/textbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACI,cAAc,EAAM,GAAG,EAGxC,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"textbox.d.ts","sourceRoot":"","sources":["../../src/ebay-textbox/textbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACI,cAAc,EAAM,GAAG,EAGxC,MAAM,OAAO,CAAA;AAQd,OAAO,EACH,sBAAsB,EACtB,gBAAgB,EAChB,qBAAqB,EACrB,wBAAwB,EAAE,qBAAqB,EAClD,MAAM,6BAA6B,CAAA;AACpC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAEnC,eAAO,MAAM,YAAY,WAAY,OAAO,KAAG,OAAuC,CAAA;AAEtF,KAAK,cAAc,GAAG,cAAc,CAAC,OAAO,CAAC,GAAG,cAAc,CAAC,UAAU,CAAC,CAAA;AAE1E,MAAM,MAAM,iBAAiB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AACjD,MAAM,MAAM,gBAAgB,GAAG;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,sBAAsB,CAAC,mBAAmB,GAAG,gBAAgB,EAAE,iBAAiB,CAAC,CAAC;IAC7F,aAAa,CAAC,EAAE,sBAAsB,CAAC,mBAAmB,GAAG,gBAAgB,EAAE,iBAAiB,CAAC,CAAC;IAClG,OAAO,CAAC,EAAE,qBAAqB,CAAC,mBAAmB,GAAG,gBAAgB,EAAE,iBAAiB,CAAC,CAAC;IAC3F,MAAM,CAAC,EAAE,qBAAqB,CAAC,mBAAmB,GAAG,gBAAgB,EAAE,iBAAiB,CAAC,CAAC;IAC1F,UAAU,CAAC,EAAE,wBAAwB,CAAC,mBAAmB,GAAG,gBAAgB,EAAE,iBAAiB,CAAC,CAAC;IACjG,OAAO,CAAC,EAAE,wBAAwB,CAAC,mBAAmB,GAAG,gBAAgB,EAAE,iBAAiB,CAAC,CAAC;IAC9F,SAAS,CAAC,EAAE,wBAAwB,CAAC,mBAAmB,GAAG,gBAAgB,EAAE,iBAAiB,CAAC,CAAC;IAChG,SAAS,CAAC,EAAE,gBAAgB,CAAC,mBAAmB,GAAG,gBAAgB,EAAE,iBAAiB,CAAC,CAAC;IACxF,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC,aAAa,CAAC,EAAE,wBAAwB,CAAC,gBAAgB,EAAE,iBAAiB,CAAC,GACzE,qBAAqB,CAAC,gBAAgB,EAAE,iBAAiB,CAAC,CAAC;IAC/D,YAAY,CAAC,EAAE,GAAG,CAAC,mBAAmB,GAAG,gBAAgB,CAAC,CAAC;IAC3D,WAAW,CAAC,EAAE,OAAO,CAAC;CACzB,GAAG,IAAI,CAAC,cAAc,EAAE,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,YAAY,GAAG,SAAS,GAAG,WAAW,GAAG,WAAW,CAAC,CAAC;;AAmKnH,wBAA4D"}
|
package/ebay-textbox/textbox.js
CHANGED
|
@@ -41,11 +41,15 @@ exports.isControlled = void 0;
|
|
|
41
41
|
const react_1 = __importStar(require("react"));
|
|
42
42
|
const classnames_1 = __importDefault(require("classnames"));
|
|
43
43
|
const component_utils_1 = require("../common/component-utils");
|
|
44
|
-
const
|
|
44
|
+
const postfix_icon_1 = __importDefault(require("./postfix-icon"));
|
|
45
|
+
const postfix_text_1 = __importDefault(require("./postfix-text"));
|
|
46
|
+
const prefix_icon_1 = __importDefault(require("./prefix-icon"));
|
|
47
|
+
const prefix_text_1 = __importDefault(require("./prefix-text"));
|
|
45
48
|
const hooks_1 = require("../common/floating-label-utils/hooks");
|
|
46
49
|
const isControlled = (value) => typeof value !== 'undefined';
|
|
47
50
|
exports.isControlled = isControlled;
|
|
48
51
|
const EbayTextbox = (_a) => {
|
|
52
|
+
var _b, _c;
|
|
49
53
|
var { type = 'text', invalid, fluid, multiline, onChange = () => { }, onInputChange = () => { }, onFocus = () => { }, onBlur = () => { }, onKeyPress = () => { }, onKeyUp = () => { }, onKeyDown = () => { }, onInvalid = () => { }, onFloatingLabelInit = () => { }, onButtonClick = () => { }, autoFocus, defaultValue = '', value: controlledValue, forwardedRef, inputSize = 'default', floatingLabel, children, placeholder, opaqueLabel } = _a, rest = __rest(_a, ["type", "invalid", "fluid", "multiline", "onChange", "onInputChange", "onFocus", "onBlur", "onKeyPress", "onKeyUp", "onKeyDown", "onInvalid", "onFloatingLabelInit", "onButtonClick", "autoFocus", "defaultValue", "value", "forwardedRef", "inputSize", "floatingLabel", "children", "placeholder", "opaqueLabel"]);
|
|
50
54
|
const [value, setValue] = (0, react_1.useState)(defaultValue);
|
|
51
55
|
const [inputValue, setInputValue] = (0, react_1.useState)(defaultValue);
|
|
@@ -112,20 +116,28 @@ const EbayTextbox = (_a) => {
|
|
|
112
116
|
};
|
|
113
117
|
const Input = multiline ? 'textarea' : 'input';
|
|
114
118
|
const Wrapper = fluid ? 'div' : 'span';
|
|
115
|
-
const prefixIcon = (0, component_utils_1.findComponent)(children,
|
|
116
|
-
const
|
|
117
|
-
const
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
const prefixIcon = (0, component_utils_1.findComponent)(children, prefix_icon_1.default);
|
|
120
|
+
const prefixText = (0, component_utils_1.findComponent)(children, prefix_text_1.default);
|
|
121
|
+
const prefixId = (_b = prefixText === null || prefixText === void 0 ? void 0 : prefixText.props) === null || _b === void 0 ? void 0 : _b.id;
|
|
122
|
+
const postfixIcon = (0, component_utils_1.findComponent)(children, postfix_icon_1.default);
|
|
123
|
+
const postfixText = (0, component_utils_1.findComponent)(children, postfix_text_1.default);
|
|
124
|
+
const postfixId = (_c = postfixText === null || postfixText === void 0 ? void 0 : postfixText.props) === null || _c === void 0 ? void 0 : _c.id;
|
|
121
125
|
const wrapperClassName = (0, classnames_1.default)('textbox', rest.className, {
|
|
122
|
-
'textbox--
|
|
126
|
+
'textbox--fluid': fluid,
|
|
127
|
+
'textbox--large': inputSize === 'large',
|
|
128
|
+
/** start remove after `:has` support */
|
|
129
|
+
'textbox--disabled': rest.disabled,
|
|
130
|
+
'textbox--invalid': invalid,
|
|
131
|
+
'textbox--readonly': rest.readOnly
|
|
132
|
+
/** end remove after `:has` support */
|
|
123
133
|
});
|
|
124
134
|
return (react_1.default.createElement(Container, null,
|
|
125
135
|
label,
|
|
126
136
|
react_1.default.createElement(Wrapper, { className: wrapperClassName },
|
|
127
137
|
prefixIcon,
|
|
128
|
-
|
|
138
|
+
prefixText,
|
|
139
|
+
react_1.default.createElement(Input, Object.assign({ "aria-describedby": [prefixId, postfixId].filter(Boolean).join(' ') || undefined }, rest, { className: "textbox__control", type: type, "aria-invalid": invalid, value: (0, exports.isControlled)(controlledValue) ? controlledValue : inputValue, onChange: handleInputChange, onBlur: handleBlur, onFocus: handleFocus, onKeyPress: handleKeyPress, onKeyUp: handleKeyUp, onKeyDown: handleKeyDown, onInvalid: handleInvalid, autoFocus: autoFocus, ref: ref, placeholder: floatingLabelPlaceholder })),
|
|
140
|
+
postfixText,
|
|
129
141
|
postfixIcon && (0, react_1.cloneElement)(postfixIcon, Object.assign(Object.assign({}, postfixIcon.props), { onClick: (e) => {
|
|
130
142
|
const { onClick: iconClick = () => { } } = postfixIcon.props;
|
|
131
143
|
iconClick(e);
|
package/ebay-textbox/types.d.ts
CHANGED
|
@@ -6,4 +6,10 @@ export type EbayTextboxIconProps = ComponentProps<'button'> & ComponentProps<'a'
|
|
|
6
6
|
buttonAriaLabel?: string;
|
|
7
7
|
onClick?: (e: KeyboardEvent | MouseEvent) => void;
|
|
8
8
|
};
|
|
9
|
+
export type EbayTextboxPrefixTextProps = ComponentProps<'span'> & {
|
|
10
|
+
id: string;
|
|
11
|
+
};
|
|
12
|
+
export type EbayTextboxPostfixTextProps = ComponentProps<'span'> & {
|
|
13
|
+
id: string;
|
|
14
|
+
};
|
|
9
15
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ebay-textbox/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACjE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAExC,MAAM,MAAM,IAAI,GAAG,SAAS,GAAG,OAAO,CAAA;AAEtC,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,QAAQ,CAAC,GAAG,cAAc,CAAC,GAAG,CAAC,GAAG;IAChF,IAAI,EAAE,IAAI,CAAA;IACV,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,aAAa,GAAG,UAAU,KAAK,IAAI,CAAA;CACpD,CAAA"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ebay-textbox/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACjE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAExC,MAAM,MAAM,IAAI,GAAG,SAAS,GAAG,OAAO,CAAA;AAEtC,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,QAAQ,CAAC,GAAG,cAAc,CAAC,GAAG,CAAC,GAAG;IAChF,IAAI,EAAE,IAAI,CAAA;IACV,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,aAAa,GAAG,UAAU,KAAK,IAAI,CAAA;CACpD,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG,cAAc,CAAC,MAAM,CAAC,GAAG;IAC9D,EAAE,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,2BAA2B,GAAG,cAAc,CAAC,MAAM,CAAC,GAAG;IAC/D,EAAE,EAAE,MAAM,CAAA;CACb,CAAA"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
# EbayToast
|
|
2
2
|
|
|
3
|
+
## Demo
|
|
4
|
+
[Storybook](https://opensource.ebay.com/ebayui-core-react/main/?path=/story/dialogs-ebay-toast-dialog--default)
|
|
5
|
+
|
|
3
6
|
## EbayToast Usage
|
|
4
7
|
|
|
5
|
-
```
|
|
8
|
+
```jsx
|
|
6
9
|
<EbayToast open a11yClosetext="Close EbayToast">
|
|
7
10
|
<h1>Hello World</h1>
|
|
8
11
|
</EbayToast>
|
|
@@ -10,15 +13,15 @@
|
|
|
10
13
|
|
|
11
14
|
## Attributes
|
|
12
15
|
|
|
13
|
-
Name
|
|
14
|
-
|
|
15
|
-
`open`
|
|
16
|
-
`a11yCloseText` | String
|
|
17
|
-
`animated`
|
|
16
|
+
| Name | Type | Stateful | Required | Description |
|
|
17
|
+
| --------------- | ------- | -------- | -------- | ----------- |
|
|
18
|
+
| `open` | Boolean | Yes | No | Whether drawer is open. |
|
|
19
|
+
| `a11yCloseText` | String | No | Yes | A11y text for close button and mask. |
|
|
20
|
+
| `animated` | Boolean | Yes | No | Renders the dialog with an animation. Note that the dialog will always be present in the DOM |
|
|
18
21
|
|
|
19
22
|
## Events
|
|
20
23
|
|
|
21
|
-
Event
|
|
22
|
-
|
|
23
|
-
`onShow`
|
|
24
|
-
`onClose` |
|
|
24
|
+
| Event | Data | Description |
|
|
25
|
+
| --------- | ---- | ------------- |
|
|
26
|
+
| `onShow` | | drawer opened |
|
|
27
|
+
| `onClose` | | drawer closed |
|
package/ebay-tooltip/README.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
#
|
|
1
|
+
# EbayTooltip
|
|
2
2
|
|
|
3
3
|
## Demo
|
|
4
|
-
|
|
5
|
-
[Storybook](https://opensource.ebay.com/ebayui-core-react/main/?path=/story/ebay-tooltip--default-tooltip)
|
|
4
|
+
[Storybook](https://opensource.ebay.com/ebayui-core-react/main/?path=/story/notices-tips-ebay-tooltip--default-tooltip)
|
|
6
5
|
|
|
7
6
|
## Import JS
|
|
8
7
|
|
package/ebay-tourtip/README.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
#
|
|
1
|
+
# EbayTourtip
|
|
2
2
|
|
|
3
3
|
## Demo
|
|
4
|
-
|
|
5
|
-
[Storybook](https://opensource.ebay.com/ebayui-core-react/main/?path=/story/ebay-tourtip--default-tourtip)
|
|
4
|
+
[Storybook](https://opensource.ebay.com/ebayui-core-react/main/?path=/story/notices-tips-ebay-tourtip--default-tourtip)
|
|
6
5
|
|
|
7
6
|
## Import JS
|
|
8
7
|
|
package/ebay-video/README.md
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
#
|
|
1
|
+
# EbayVideo
|
|
2
|
+
|
|
2
3
|
Video player. Supports either MPD or M3U8 playlist formats.
|
|
3
4
|
Natively uses `shaka` player under the hood. For resizing, `ebay-video` supports fixed width or variable width. If no width is provided the video tag will resize based on the container size.
|
|
4
5
|
|
|
6
|
+
## Demo
|
|
7
|
+
[Storybook](https://opensource.ebay.com/ebayui-core-react/main/?path=/story/media-ebay-video--default)
|
|
8
|
+
|
|
5
9
|
## Usage
|
|
6
10
|
```bash
|
|
7
11
|
yarn add @ebay/ui-core-react shaka-player
|
|
@@ -37,6 +41,7 @@ import 'shaka-player/dist/controls.css'
|
|
|
37
41
|
| a11yPlayText | String | Yes | a11y text for the play button |
|
|
38
42
|
| errorText | String | Yes | content for error when an either the library or video cannot load |
|
|
39
43
|
| reportText | String | Yes | text for report button |
|
|
44
|
+
|
|
40
45
|
## Callbacks
|
|
41
46
|
| Name | Required | Description | Arguments |
|
|
42
47
|
|----------------|----------|------------------------------------------------------------------|---------------------------------------------|
|
|
@@ -45,7 +50,6 @@ import 'shaka-player/dist/controls.css'
|
|
|
45
50
|
| onVolumeChange | No | triggered when volume is changed | (Event, { volume: number, muted: boolean }) |
|
|
46
51
|
| onReport | No | triggered when report button is clicked | |
|
|
47
52
|
|
|
48
|
-
|
|
49
53
|
## EbayVideoSource Props
|
|
50
54
|
| Name | Type | Required | Description |
|
|
51
55
|
|------|--------|----------|-----------------------------------------------------------------------------------------------------------------|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ebay/ui-core-react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.1",
|
|
4
4
|
"description": "Skin components build off React",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
"storybook": "NODE_OPTIONS=--openssl-legacy-provider storybook dev -p 9001 -c .storybook",
|
|
17
17
|
"storybook-node16": "storybook dev -p 9001 -c .storybook",
|
|
18
18
|
"build-storybook": "storybook build",
|
|
19
|
+
"storybook:publish": "NODE_OPTIONS=--openssl-legacy-provider yarn build-storybook --output-dir storybook-static/$(git branch --show-current) && gh-pages --add --message=\"Deploying to gh-pages from @ eBay/ebayui-core-react@$(git rev-parse --short HEAD) 🚀\" -d storybook-static",
|
|
19
20
|
"test": "yarn jest",
|
|
20
21
|
"build": "yarn typecheck && yarn tsc",
|
|
21
22
|
"typecheck": "tsc --project tsconfig.typecheck.json",
|
|
22
23
|
"update-icons": "node ./scripts/update-icons",
|
|
23
24
|
"copy": "copyfiles package.json README.md lib; yarn copy:rest",
|
|
24
25
|
"copy:rest": "yarn copyfiles -u 1 'src/**/*.md' lib",
|
|
25
|
-
"prepublishOnly": "if [ -z \"$CI\" ]; then echo \"Please use CI, do not publish manually\"; exit 1; fi",
|
|
26
26
|
"prerelease": "npm version prerelease --preid rc && yarn clean && yarn build && yarn copy && CI=1 npm publish --tag rc lib/",
|
|
27
27
|
"prepare": "node scripts/husky-install || node ../scripts/husky-install"
|
|
28
28
|
},
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"author": "tmanyanov@ebay.com",
|
|
44
44
|
"license": "ISC",
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"@ebay/skin": "^
|
|
46
|
+
"@ebay/skin": "^18.0.0",
|
|
47
47
|
"react": ">= 16.0.0",
|
|
48
48
|
"react-dom": ">= 16.0.0",
|
|
49
49
|
"shaka-player": "^4.3.2"
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"@babel/preset-react": "^7.23.3",
|
|
61
61
|
"@babel/preset-typescript": "^7.23.3",
|
|
62
62
|
"@babel/register": "^7.0.0",
|
|
63
|
-
"@ebay/skin": "^
|
|
63
|
+
"@ebay/skin": "^18.0.0",
|
|
64
64
|
"@microsoft/eslint-formatter-sarif": "^3.0.0",
|
|
65
65
|
"@storybook/addon-a11y": "^7.6.12",
|
|
66
66
|
"@storybook/addon-essentials": "^7.4.6",
|
|
@@ -88,6 +88,7 @@
|
|
|
88
88
|
"eslint-plugin-jest": "^27.6.0",
|
|
89
89
|
"eslint-plugin-jsx-a11y": "^6.4.1",
|
|
90
90
|
"eslint-plugin-react": "^7.21.5",
|
|
91
|
+
"gh-pages": "^6.1.1",
|
|
91
92
|
"husky": "^8.0.0",
|
|
92
93
|
"identity-obj-proxy": "^3.0.0",
|
|
93
94
|
"jest": "^29.7.0",
|