@ebay/ui-core-react 7.2.0-alpha.5 → 7.2.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/README.md CHANGED
@@ -6,26 +6,35 @@ eBayUI React components
6
6
 
7
7
  ### Requirements
8
8
 
9
- * [Node.js](https://nodejs.org/en/) (v18.13)
10
- * [React](https://reactjs.org/) (v16.8+)
11
- * [eBay Skin](https://ebay.github.io/skin/) (v16)
9
+ * [Node.js](https://nodejs.org/en/) (v20.12.2)
10
+ * [React](https://reactjs.org/) (v18+, v16.8+ in maintenance mode)
11
+ * [eBay Skin](https://ebay.github.io/skin/) (v18+)
12
12
 
13
13
  ### eBayUI Components
14
14
  * [ ] `ebay-3d-viewer`
15
15
  * [x] [ebay-alert-dialog](src/ebay-alert-dialog)
16
+ * [ ] `ebay-area-chart`
17
+ * [ ] `ebay-avatar`
16
18
  * [x] [ebay-confirm-dialog](src/ebay-confirm-dialog)
17
19
  * [x] [ebay-badge](src/ebay-badge)
20
+ * [ ] `ebay-bar-chart`
18
21
  * [x] [ebay-breadcrumbs](src/ebay-breadcrumbs)
19
22
  * [x] [ebay-button](src/ebay-button)
20
- * [ ] `ebay-calendar`
23
+ * [x] [ebay-calendar](src/ebay-calendar)
24
+ * [ ] `ebay-character-count`
21
25
  * [x] [ebay-carousel](src/ebay-carousel)
26
+ * [ ] `ebay-chart-legend`
22
27
  * [x] [ebay-checkbox](src/ebay-checkbox)
28
+ * [ ] `ebay-chip`
29
+ * [ ] `ebay-chips-combobox`
23
30
  * [ ] `ebay-combobox`
24
31
  * [x] [ebay-confirm-dialog](src/ebay-confirm-dialog)
25
32
  * [x] [ebay-cta-button](src/ebay-cta-button)
26
- * [ ] `ebay-date-textbox`
33
+ * [x] [ebay-date-textbox](src/ebay-date-textbox)
27
34
  * [ ] `ebay-details`
35
+ * [ ] `ebay-donut-chart`
28
36
  * [x] [ebay-drawer-dialog](src/ebay-drawer-dialog)
37
+ * [ ] `ebay-education-notice`
29
38
  * [x] [ebay-eek](src/ebay-eek)
30
39
  * [x] [ebay-fullscreen-dialog](src/ebay-fullscreen-dialog)
31
40
  * [ ] `ebay-fake-link`
@@ -33,11 +42,14 @@ eBayUI React components
33
42
  * [x] [ebay-fake-menu-button](src/ebay-fake-menu-button)
34
43
  * [x] [ebay-fake-tabs](src/ebay-fake-tabs)
35
44
  * [x] [ebay-field](src/ebay-field)
36
- * [ ] `ebay-filter` (in progress...)
45
+ * [ ] `ebay-filter`
37
46
  * [ ] `ebay-filter-menu`
38
47
  * [ ] `ebay-filter-menu-button`
48
+ * [ ] `ebay-flag`
49
+ * [x] [ebay-fullscreen-dialog](src/ebay-fullscreen-dialog)
39
50
  * [x] [ebay-icon-button](src/ebay-icon-button)
40
51
  * [x] [ebay-icon](src/ebay-icon)
52
+ * [ ] `ebay-image-placeholder`
41
53
  * [x] [ebay-infotip](src/ebay-infotip)
42
54
  * [x] [ebay-inline-notice](src/ebay-inline-notice)
43
55
  * [x] [ebay-lightbox-dialog](src/ebay-lightbox-dialog)
@@ -49,15 +61,20 @@ eBayUI React components
49
61
  * [x] [ebay-page-notice](src/ebay-page-notice)
50
62
  * [x] [ebay-pagination](src/ebay-pagination)
51
63
  * [x] [ebay-panel-dialog](src/ebay-panel-dialog)
64
+ * [ ] `ebay-phone-input`
52
65
  * [x] [ebay-progress-bar](src/ebay-progress-bar)
66
+ * [ ] `ebay-progress-bar-expressive`
53
67
  * [x] [ebay-progress-spinner](src/ebay-progress-spinner)
54
68
  * [x] [ebay-progress-stepper](src/ebay-progress-stepper)
55
69
  * [x] [ebay-radio](src/ebay-radio)
56
70
  * [x] [ebay-section-title](src/ebay-section-title)
57
71
  * [x] [ebay-section-notice](src/ebay-section-notice)
72
+ * [x] [ebay-segmented-buttons](src/ebay-segmented-buttons)
58
73
  * [x] [ebay-select](src/ebay-select)
59
74
  * [x] [ebay-signal](src/ebay-signal)
75
+ * [ ] `ebay-skeleton`
60
76
  * [x] [ebay-snackbar-dialog](src/ebay-snackbar-dialog)
77
+ * [ ] `ebay-spark-line`
61
78
  * [x] [ebay-split-button](src/ebay-split-button)
62
79
  * [x] [ebay-star-rating](src/ebay-star-rating)
63
80
  * [x] [ebay-star-rating-select](src/ebay-star-rating-select)
@@ -65,6 +82,8 @@ eBayUI React components
65
82
  * [x] [ebay-tabs](src/ebay-tabs)
66
83
  * [x] [ebay-textbox](src/ebay-textbox)
67
84
  * [x] [ebay-toast-dialog](src/ebay-toast-dialog)
85
+ * [ ] `ebay-toggle-button`
86
+ * [ ] `ebay-toggle-button-group`
68
87
  * [x] [ebay-tooltip](src/ebay-tooltip)
69
88
  * [x] [ebay-tourtip](src/ebay-tourtip)
70
89
  * [ ] `ebay-tri-state-checkbox`
@@ -77,18 +96,9 @@ These react components are available as `@ebay/ui-core-react` package on [NPM](h
77
96
  Use npm or yarn to add the package dependency to your project:
78
97
 
79
98
  ```sh
80
- yarn add @ebay/ui-core-react
81
- ```
82
-
83
- ### for quick development/POC
84
- ```jsx
85
- import { EbayTextbox, EbayButton } from '@ebay/ui-core-react'
86
-
87
- <EbayTextbox placeholder="Enter text here" />
88
- <EbayButton>Submit</EbayButton>
99
+ yarn add @ebay/ui-core-react @ebay/skin
89
100
  ```
90
101
 
91
- ### for smaller bundle size
92
102
  ```jsx harmony
93
103
  import { EbayTextbox } from '@ebay/ui-core-react/ebay-textbox'
94
104
  import { EbayButton } from '@ebay/ui-core-react/ebay-button'
@@ -123,16 +133,18 @@ Create an issue on github
123
133
  ## Changelog
124
134
 
125
135
  `@ebay/ui-core-react`
136
+ ### version 7.x (Skin 18, breaking changes in icon names)
137
+ ### version 6.x (Skin 17, breaking changes in icon names)
126
138
  ### version 5.x (Skin 16, breaking changes in event callbacks)
127
139
  ### version 4.x (Skin 16, breaking changes in icon names)
128
140
  ### version 3.x (Skin 15, some breaking changes in dialog components)
129
141
  ### version 2.x (Skin 15)
130
142
 
131
- `@ebay/ebayui-core-react`
143
+ `@ebay/ebayui-core-react` (obsolete)
132
144
  ### version 10.x (Skin 14)
133
145
  ### version 9.x (skin 13)
134
146
 
135
- `ebayui-core-react`
147
+ `ebayui-core-react` (obsolete)
136
148
  ### version 8.x (skin 12)
137
149
  ### version 6.x (skin 10)
138
150
  ### version 5.x (removed less, changed imports to minimize bundle size)
@@ -0,0 +1,42 @@
1
+ # EbaySegmentedButtons
2
+
3
+ ## Demo
4
+ [Storybook](https://opensource.ebay.com/ebayui-core-react/main/?path=/story/buttons-ebay-segmented-buttons--default)
5
+
6
+ ## Install
7
+ ```
8
+ yarn add @ebay/ui-core-react @ebay/skin
9
+ ```
10
+
11
+ ## Usage
12
+ ```
13
+ import React from 'react'
14
+ import { EbaySegmentedButtons, EbaySegmentedButton as Button } from '@ebay/ui-core-react/ebay-segmented-buttons'
15
+ import { EbayIcon } from '@ebay/ui-core-react/ebay-icon'
16
+ import '@ebay/skin/segmented-buttons'
17
+
18
+ export const Example = () => (
19
+ <EbaySegmentedButtons
20
+ size="large"
21
+ onChange={(e, { i, value }) => console.log('Selected:', i, value)}
22
+ >
23
+ <Button value="1" selected>Button 1</Button>
24
+ <Button value="2">Button 2</Button>
25
+ <Button value="3"><EbayIcon name="settings24" /> Button 3</Button>
26
+ />
27
+ );
28
+ ```
29
+
30
+ ## EbaySegmentedButtons Props
31
+
32
+ Name | Type | Required | Description
33
+ --- |----------| --- | ---
34
+ `size` | enum | No | Can be `regular` (default) or `large`
35
+ `onChange` | Function | No | props: (e: event, { index: number, value: string), triggered on selected button change
36
+
37
+ ## EbaySegmentedButton Props
38
+
39
+ Name | Type | Required | Description
40
+ --- | --- |---------------------------------| ---
41
+ `value` | String | No | the value to use with `onChange` callback
42
+ `selected` | Boolean | No | Whether or not the button is selected
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { SegmentedButtonProps } from './types';
3
+ declare const SegmentedButton: FC<SegmentedButtonProps>;
4
+ export default SegmentedButton;
5
+ //# sourceMappingURL=button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/ebay-segmented-buttons/button.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAIjC,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAE9C,QAAA,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CA8B7C,CAAA;AAED,eAAe,eAAe,CAAA"}
@@ -0,0 +1,4 @@
1
+ export { default as EbaySegmentedButtons } from './segmented-buttons';
2
+ export { default as EbaySegmentedButton } from './button';
3
+ export type { SegmentedButtonsProps, SegmentedButtonProps, SegmentedButtonSize } from './types';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-segmented-buttons/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AACrE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,UAAU,CAAA;AACzD,YAAY,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { SegmentedButtonsProps } from './types';
3
+ declare const EbaySegmentedButtons: FC<SegmentedButtonsProps>;
4
+ export default EbaySegmentedButtons;
5
+ //# sourceMappingURL=segmented-buttons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"segmented-buttons.d.ts","sourceRoot":"","sources":["../../src/ebay-segmented-buttons/segmented-buttons.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAgB,EAAE,EAA0B,MAAM,OAAO,CAAA;AAEvE,OAAO,EAAwB,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAIrE,QAAA,MAAM,oBAAoB,EAAE,EAAE,CAAC,qBAAqB,CAsCnD,CAAA;AAED,eAAe,oBAAoB,CAAA"}
@@ -0,0 +1,16 @@
1
+ import { ComponentProps } from 'react';
2
+ import { EbayChangeEventHandler, EbayMouseEventHandler } from '../common/event-utils/types';
3
+ export type SegmentedButtonProps = Omit<ComponentProps<'button'>, 'onClick'> & {
4
+ value?: string;
5
+ selected?: boolean;
6
+ onClick?: EbayMouseEventHandler<HTMLButtonElement>;
7
+ };
8
+ export type SegmentedButtonSize = 'large' | 'regular';
9
+ export type SegmentedButtonsProps = Omit<ComponentProps<'div'>, 'onChange'> & {
10
+ size?: SegmentedButtonSize;
11
+ onChange?: EbayChangeEventHandler<HTMLButtonElement, {
12
+ index: number;
13
+ value?: string;
14
+ }>;
15
+ };
16
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ebay-segmented-buttons/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAA;AAE3F,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC,GAAG;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,qBAAqB,CAAC,iBAAiB,CAAC,CAAC;CACtD,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,SAAS,CAAA;AAErD,MAAM,MAAM,qBAAqB,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG;IAC1E,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B,QAAQ,CAAC,EAAE,sBAAsB,CAAC,iBAAiB,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC3F,CAAA"}
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),b=require("classnames"),d=require("./common/component-utils/utils.js"),i=require("./icon-DEn4Lfbd.js"),p=({selected:s,children:n,className:u,...a})=>{const c=d.findComponent(n,i.EbayIcon),l=()=>{const r=d.excludeComponent(n,i.EbayIcon);return e.createElement("span",{className:"segmented-buttons__button-cell"},c,e.createElement("span",null,r))};return e.createElement("li",null,e.createElement("button",{className:b("segmented-buttons__button",u),"aria-current":s||void 0,...a},c?l():n))},_=({size:s,className:n,onChange:u=()=>{},children:a,...c})=>{const l=d.filterByType(a,p),[r,E]=e.useState(l.findIndex(t=>t.props.selected)||0),g=(t,o,m)=>{E(o),u(t,{index:o,value:m})};return e.createElement("div",{className:b("segmented-buttons",s&&`segmented-buttons--${s}`,n),...c},e.createElement("ul",null,l.map((t,o)=>{const{value:m,...y}=t.props;return e.cloneElement(t,{...y,onClick:S=>g(S,o,m),selected:o===r})})))};exports.EbaySegmentedButton=p;exports.EbaySegmentedButtons=_;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ebay/ui-core-react",
3
- "version": "7.2.0-alpha.5",
3
+ "version": "7.2.1",
4
4
  "description": "Skin components build off React",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org"