@ebay/ui-core-react 8.1.3 → 8.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 +15 -14
- package/chip-CaMakGa6.js +1 -0
- package/combobox-BcAuEyib.js +1 -0
- package/common/dropdown.d.ts +1 -1
- package/common/dropdown.d.ts.map +1 -1
- package/common/notice-utils/notice-footer.d.ts +1 -1
- package/common/notice-utils/notice-footer.d.ts.map +1 -1
- package/common/notice-utils/notice-title.d.ts +1 -1
- package/common/notice-utils/notice-title.d.ts.map +1 -1
- package/ebay-chip/README.md +49 -0
- package/ebay-chip/chip.d.ts +11 -0
- package/ebay-chip/chip.d.ts.map +1 -0
- package/ebay-chip/index.d.ts +2 -0
- package/ebay-chip/index.d.ts.map +1 -0
- package/ebay-chip/index.js +1 -0
- package/ebay-chips-combobox/README.md +52 -0
- package/ebay-chips-combobox/chips-combobox.d.ts +14 -0
- package/ebay-chips-combobox/chips-combobox.d.ts.map +1 -0
- package/ebay-chips-combobox/index.d.ts +4 -0
- package/ebay-chips-combobox/index.d.ts.map +1 -0
- package/ebay-chips-combobox/index.js +1 -0
- package/ebay-chips-combobox/types.d.ts +6 -0
- package/ebay-chips-combobox/types.d.ts.map +1 -0
- package/ebay-combobox/README.md +1 -1
- package/ebay-combobox/combobox.d.ts +2 -1
- package/ebay-combobox/combobox.d.ts.map +1 -1
- package/ebay-combobox/index.js +1 -1
- package/ebay-date-textbox/index.js +1 -1
- package/ebay-education-notice/README.md +61 -0
- package/ebay-education-notice/education-notice-footer.d.ts +8 -0
- package/ebay-education-notice/education-notice-footer.d.ts.map +1 -0
- package/ebay-education-notice/education-notice-title.d.ts +8 -0
- package/ebay-education-notice/education-notice-title.d.ts.map +1 -0
- package/ebay-education-notice/education-notice.d.ts +17 -0
- package/ebay-education-notice/education-notice.d.ts.map +1 -0
- package/ebay-education-notice/index.d.ts +5 -0
- package/ebay-education-notice/index.d.ts.map +1 -0
- package/ebay-education-notice/index.js +1 -0
- package/ebay-education-notice/types.d.ts +3 -0
- package/ebay-education-notice/types.d.ts.map +1 -0
- package/ebay-fake-link/README.md +44 -0
- package/ebay-fake-link/fake-link.d.ts +9 -0
- package/ebay-fake-link/fake-link.d.ts.map +1 -0
- package/ebay-fake-link/index.d.ts +2 -0
- package/ebay-fake-link/index.d.ts.map +1 -0
- package/ebay-fake-link/index.js +1 -0
- package/ebay-filter/README.md +47 -0
- package/ebay-filter/filter.d.ts +12 -0
- package/ebay-filter/filter.d.ts.map +1 -0
- package/ebay-filter/index.d.ts +3 -0
- package/ebay-filter/index.d.ts.map +1 -0
- package/ebay-filter/index.js +1 -0
- package/ebay-filter/types.d.ts +6 -0
- package/ebay-filter/types.d.ts.map +1 -0
- package/ebay-filter-menu/README.md +57 -0
- package/ebay-filter-menu/filter-menu-footer-button.d.ts +16 -0
- package/ebay-filter-menu/filter-menu-footer-button.d.ts.map +1 -0
- package/ebay-filter-menu/filter-menu-item.d.ts +22 -0
- package/ebay-filter-menu/filter-menu-item.d.ts.map +1 -0
- package/ebay-filter-menu/filter-menu.d.ts +21 -0
- package/ebay-filter-menu/filter-menu.d.ts.map +1 -0
- package/ebay-filter-menu/index.d.ts +5 -0
- package/ebay-filter-menu/index.d.ts.map +1 -0
- package/ebay-filter-menu/index.js +1 -0
- package/ebay-filter-menu/types.d.ts +22 -0
- package/ebay-filter-menu/types.d.ts.map +1 -0
- package/ebay-filter-menu-button/README.md +48 -0
- package/ebay-filter-menu-button/filter-menu-button.d.ts +11 -0
- package/ebay-filter-menu-button/filter-menu-button.d.ts.map +1 -0
- package/ebay-filter-menu-button/index.d.ts +3 -0
- package/ebay-filter-menu-button/index.d.ts.map +1 -0
- package/ebay-filter-menu-button/index.js +1 -0
- package/ebay-page-notice/index.js +1 -1
- package/ebay-radio/index.js +1 -1
- package/ebay-section-notice/index.js +1 -1
- package/ebay-textbox/index.js +1 -1
- package/ebay-textbox/textbox.d.ts.map +1 -1
- package/filter-menu-CF5Lvzqu.js +1 -0
- package/notice-cta-CKl_qBge.js +1 -0
- package/notice-footer-G6VPjVZu.js +1 -0
- package/package.json +3 -1
- package/radio-wp0-bMIM.js +1 -0
- package/textbox-4AxUUs5r.js +1 -0
- package/notice-cta-hm2vI5MI.js +0 -1
- package/textbox-BdsI4r6_.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../tslib.es6-C4EgNkz1.js"),y=require("react"),u=require("classnames"),d=s=>{var{variant:t,type:o,className:i,onKeyDown:n,onEscape:a}=s,c=r.__rest(s,["variant","type","className","onKeyDown","onEscape"]);const l=e=>{n==null||n(e),(e.key==="Escape"||e.key==="Esc")&&(a==null||a(e))};return y.createElement("button",Object.assign({},c,{className:u("fake-link",t==="standalone"&&"standalone-link",i),onKeyDown:l,type:o||"button"}))};exports.EbayFakeLink=d;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# EbayFilter
|
|
2
|
+
|
|
3
|
+
## Demo
|
|
4
|
+
|
|
5
|
+
[Storybook](https://opensource.ebay.com/ebayui-core-react/main/?path=/story/building-blocks-ebay-filter--default)
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
### Import JS
|
|
10
|
+
|
|
11
|
+
```jsx harmony
|
|
12
|
+
import { EbayFilter } from "@ebay/ui-core-react/ebay-filter";
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Import following styles from SKIN
|
|
16
|
+
|
|
17
|
+
```jsx harmony
|
|
18
|
+
import "@ebay/skin/filter";
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### If tokens haven't been added to the project at a higher level, make sure to import
|
|
22
|
+
|
|
23
|
+
```jsx harmony
|
|
24
|
+
import "@ebay/skin/tokens";
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Or import styles using SCSS/CSS
|
|
28
|
+
|
|
29
|
+
```jsx harmony
|
|
30
|
+
import "@ebay/skin/filter.css";
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
```jsx harmony
|
|
34
|
+
<EbayFilter>Text</EbayFilter>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Attributes
|
|
38
|
+
|
|
39
|
+
| Name | Type | Required | Description | Data |
|
|
40
|
+
| ------------------ | -------- | -------- | --------------------------------------------------------------------------------- | ------------------------------ |
|
|
41
|
+
| `href` | String | No | For link that looks like a button | |
|
|
42
|
+
| `disabled` | Boolean | No | Whether the filter is disabled or not | |
|
|
43
|
+
| `selected` | Boolean | No | Whether the filter is selected or not (use this for controlled component) | |
|
|
44
|
+
| `defaultSelected` | Boolean | No | Whether the filter is first selected or not (use this for uncontrolled component) | |
|
|
45
|
+
| `useAriaPressed` | Boolean | No | defaults to `true` | |
|
|
46
|
+
| `a11ySelectedText` | String | No | defaults to `"Selected"`, but should be changed based on L10N or I18N | |
|
|
47
|
+
| `onClick` | Function | No | Triggered on item clicked | `(event: Event, { selected })` |
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComponentProps, FC } from 'react';
|
|
2
|
+
import { FilterClickHandler } from './types';
|
|
3
|
+
export type EbayFilterProps = Omit<ComponentProps<'button'> & ComponentProps<'a'>, 'onClick' | 'type'> & {
|
|
4
|
+
selected?: boolean;
|
|
5
|
+
defaultSelected?: boolean;
|
|
6
|
+
a11ySelectedText?: string;
|
|
7
|
+
useAriaPressed?: boolean;
|
|
8
|
+
onClick?: FilterClickHandler;
|
|
9
|
+
};
|
|
10
|
+
declare const EbayFilter: FC<EbayFilterProps>;
|
|
11
|
+
export default EbayFilter;
|
|
12
|
+
//# sourceMappingURL=filter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../src/ebay-filter/filter.tsx"],"names":[],"mappings":"AACA,OAAc,EAAE,cAAc,EAAE,EAAE,EAA+B,MAAM,OAAO,CAAA;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAE5C,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,GAAG,cAAc,CAAC,GAAG,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC,GAAG;IACrG,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,OAAO,CAAC,EAAE,kBAAkB,CAAA;CAC/B,CAAA;AAED,QAAA,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAiDnC,CAAA;AAED,eAAe,UAAU,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-filter/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,UAAU,CAAA;AACtE,cAAc,SAAS,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("../tslib.es6-C4EgNkz1.js"),h=require("classnames"),t=require("react"),k=c=>{var{defaultSelected:d,selected:a,href:e,className:i,useAriaPressed:o,a11ySelectedText:u,disabled:n,children:b,onClick:m=()=>{}}=c,S=N.__rest(c,["defaultSelected","selected","href","className","useAriaPressed","a11ySelectedText","disabled","children","onClick"]);const s=e?"filter-link":"filter-button",[f,p]=t.useState(d),l=typeof a<"u"?a:f,y=e?"a":"button",C=E=>{if(!n){const r=!l;p(r),m(E,{selected:r})}};return t.createElement(y,Object.assign({},S,{disabled:n,className:h(s,i,`${s}--${l?"selected":"unselected"}`),type:e?void 0:"button",href:e,"aria-pressed":o!==!1&&!e&&l?"true":void 0,onClick:C}),t.createElement("span",{className:`${s}__cell`},t.createElement("span",null,b),e&&l?t.createElement("span",{className:"clipped"},"- ",u||"Selected"):null))};exports.EbayFilter=k;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ebay-filter/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAA;AAEjD,MAAM,MAAM,SAAS,GAAG;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAE,qBAAqB,CAAC,iBAAiB,GAAG,iBAAiB,EAAE,SAAS,CAAC,CAAA"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# EbayFilterMenu
|
|
2
|
+
|
|
3
|
+
## Demo
|
|
4
|
+
|
|
5
|
+
[Storybook](https://opensource.ebay.com/ebayui-core-react/main/?path=/docs/building-blocks-ebay-filter-menu--docs)
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
### Import JS
|
|
10
|
+
|
|
11
|
+
```jsx harmony
|
|
12
|
+
import { EbayFilterMenu, EbayFilterMenuItem, EbayFilterMenuFooterButton } from "@ebay/ui-core-react/ebay-filter-menu";
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Import following styles from SKIN
|
|
16
|
+
|
|
17
|
+
```jsx harmony
|
|
18
|
+
import "@ebay/skin/filter-menu";
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### If tokens haven't been added to the project at a higher level, make sure to import
|
|
22
|
+
|
|
23
|
+
```jsx harmony
|
|
24
|
+
import "@ebay/skin/tokens";
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Or import styles using SCSS/CSS
|
|
28
|
+
|
|
29
|
+
```jsx harmony
|
|
30
|
+
import "@ebay/skin/filter-menu.css";
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
```jsx harmony
|
|
34
|
+
<EbayFilterMenu>
|
|
35
|
+
<EbayFilterMenuItem value="item1">Item 1</EbayFilterMenuItem>
|
|
36
|
+
<EbayFilterMenuItem value="item2">Item 2</EbayFilterMenuItem>
|
|
37
|
+
<EbayFilterMenuFooterButton>Submit</EbayFilterMenuFooterButton>
|
|
38
|
+
</EbayFilterMenu>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Attributes
|
|
42
|
+
|
|
43
|
+
| Name | Type | Required | Description | Data |
|
|
44
|
+
| ----------------------------- | -------- | -------- | ---------------------------------------------------------- | ------------------------------------------- |
|
|
45
|
+
| `classPrefix` | String | No | Modifies the base prefix for all Skin classes in the menu | `"filter-menu"` (default) |
|
|
46
|
+
| `formName` | String | No | Name attribute for the form | |
|
|
47
|
+
| `formAction` | String | No | Action attribute for the form | |
|
|
48
|
+
| `formMethod` | String | No | Method attribute for the form | |
|
|
49
|
+
| `variant` | String | No | Variant of the filter menu, `form` or `default` | |
|
|
50
|
+
| `type` | String | No | Type of the filter menu, `checkbox` or `radio` | |
|
|
51
|
+
| `searchHeaderValue` | String | No | Optional value override for the input in the search header | |
|
|
52
|
+
| `searchHeaderPlaceholderText` | String | No | Enables the search header and populates placeholder text | |
|
|
53
|
+
| `a11ySearchHeaderClearText` | String | No | Accessibility text for the search header clear button | |
|
|
54
|
+
| `onFormSubmit` | Function | No | Triggered on form submit | `(event: Event, { checked, checkedIndex })` |
|
|
55
|
+
| `onFooterClick` | Function | No | Triggered on footer button click | `(event: Event, { checked, checkedIndex })` |
|
|
56
|
+
| `onChange` | Function | No | Triggered on item change | `(event: Event, { checked, checkedIndex })` |
|
|
57
|
+
| `onSearchChange` | Function | No | Triggered on search input change | `(event: Event, { searchTerm })` |
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ComponentProps, FC, ReactNode } from 'react';
|
|
2
|
+
import { Variant } from './types';
|
|
3
|
+
export type EbayFilterMenuFooterButtonProps = Omit<ComponentProps<'button'>, 'type' | 'children'> & {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
/**
|
|
6
|
+
* These properties are used by EbayFilterMenu.
|
|
7
|
+
* NOTE: The flag "@deprecated" is only to not show this property in the autocomplete list on the top
|
|
8
|
+
* @deprecated
|
|
9
|
+
*/
|
|
10
|
+
__classPrefix?: string;
|
|
11
|
+
/** @deprecated */
|
|
12
|
+
__variant?: Variant;
|
|
13
|
+
};
|
|
14
|
+
declare const EbayFilterMenuFooterButton: FC<EbayFilterMenuFooterButtonProps>;
|
|
15
|
+
export default EbayFilterMenuFooterButton;
|
|
16
|
+
//# sourceMappingURL=filter-menu-footer-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter-menu-footer-button.d.ts","sourceRoot":"","sources":["../../src/ebay-filter-menu/filter-menu-footer-button.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAGjC,MAAM,MAAM,+BAA+B,GAAG,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,UAAU,CAAE,GAAG;IACjG,QAAQ,EAAE,SAAS,CAAA;IACnB;;;;MAIE;IACF,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,kBAAkB;IAClB,SAAS,CAAC,EAAE,OAAO,CAAA;CACtB,CAAA;AAED,QAAA,MAAM,0BAA0B,EAAE,EAAE,CAAC,+BAA+B,CAiBnE,CAAA;AAED,eAAe,0BAA0B,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ComponentProps, FC, ReactNode } from 'react';
|
|
2
|
+
import { FilterMenuItemClick, Type, Variant } from './types';
|
|
3
|
+
export type EbayFilterMenuItemProps = Omit<ComponentProps<'label'> & ComponentProps<'div'>, 'children' | 'onClick'> & {
|
|
4
|
+
checked?: boolean;
|
|
5
|
+
value?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
onClick?: FilterMenuItemClick;
|
|
9
|
+
/**
|
|
10
|
+
* These properties are used by EbayFilterMenu.
|
|
11
|
+
* NOTE: The flag "@deprecated" is only to not show this property in the autocomplete list on the top
|
|
12
|
+
* @deprecated
|
|
13
|
+
*/
|
|
14
|
+
__classPrefix?: string;
|
|
15
|
+
/** @deprecated */
|
|
16
|
+
__type?: Type;
|
|
17
|
+
/** @deprecated */
|
|
18
|
+
__variant?: Variant;
|
|
19
|
+
};
|
|
20
|
+
declare const EbayFilterMenuItem: FC<EbayFilterMenuItemProps>;
|
|
21
|
+
export default EbayFilterMenuItem;
|
|
22
|
+
//# sourceMappingURL=filter-menu-item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter-menu-item.d.ts","sourceRoot":"","sources":["../../src/ebay-filter-menu/filter-menu-item.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAM5D,OAAO,EAAE,mBAAmB,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAE5D,MAAM,MAAM,uBAAuB,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,GAAG,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC,GAAG;IAClH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,EAAE,SAAS,CAAA;IACnB,OAAO,CAAC,EAAE,mBAAmB,CAAA;IAE7B;;;;MAIE;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,kBAAkB;IAClB,MAAM,CAAC,EAAE,IAAI,CAAA;IACb,kBAAkB;IAClB,SAAS,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAED,QAAA,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CAoDnD,CAAA;AAED,eAAe,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React, { ComponentProps, RefObject } from 'react';
|
|
2
|
+
import { FilterMenuChange, FilterMenuFooterClick, FilterMenuFormSubmit, FilterMenuSearchChange, Type, Variant } from './types';
|
|
3
|
+
export type EbayFilterMenuProps = Omit<ComponentProps<'span'>, 'onChange'> & {
|
|
4
|
+
classPrefix?: string;
|
|
5
|
+
formName?: string;
|
|
6
|
+
formAction?: string;
|
|
7
|
+
formMethod?: string;
|
|
8
|
+
variant?: Variant;
|
|
9
|
+
type?: Type;
|
|
10
|
+
searchHeaderValue?: string;
|
|
11
|
+
searchHeaderPlaceholderText?: string;
|
|
12
|
+
a11ySearchHeaderClearText?: string;
|
|
13
|
+
forwardedRef?: RefObject<HTMLSpanElement>;
|
|
14
|
+
onSearchChange?: FilterMenuSearchChange;
|
|
15
|
+
onFormSubmit?: FilterMenuFormSubmit;
|
|
16
|
+
onFooterClick?: FilterMenuFooterClick;
|
|
17
|
+
onChange?: FilterMenuChange;
|
|
18
|
+
};
|
|
19
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<EbayFilterMenuProps, "ref"> & React.RefAttributes<React.FC<EbayFilterMenuProps>>>;
|
|
20
|
+
export default _default;
|
|
21
|
+
//# sourceMappingURL=filter-menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter-menu.d.ts","sourceRoot":"","sources":["../../src/ebay-filter-menu/filter-menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACV,cAAc,EAKd,SAAS,EAIZ,MAAM,OAAO,CAAA;AAMd,OAAO,EACH,gBAAgB,EAEhB,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACtB,IAAI,EACJ,OAAO,EACV,MAAM,SAAS,CAAA;AAKhB,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG;IACzE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,YAAY,CAAC,EAAE,SAAS,CAAC,eAAe,CAAC,CAAC;IAC1C,cAAc,CAAC,EAAE,sBAAsB,CAAA;IACvC,YAAY,CAAC,EAAE,oBAAoB,CAAA;IACnC,aAAa,CAAC,EAAE,qBAAqB,CAAA;IACrC,QAAQ,CAAC,EAAE,gBAAgB,CAAA;CAC9B,CAAA;;AAqND,wBAA6C"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as EbayFilterMenu, type EbayFilterMenuProps } from './filter-menu';
|
|
2
|
+
export { default as EbayFilterMenuItem, type EbayFilterMenuItemProps } from './filter-menu-item';
|
|
3
|
+
export { default as EbayFilterMenuFooterButton, type EbayFilterMenuFooterButtonProps } from './filter-menu-footer-button';
|
|
4
|
+
export * from './types';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-filter-menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,eAAe,CAAA;AACnF,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,KAAK,uBAAuB,EAAE,MAAM,oBAAoB,CAAA;AAChG,OAAO,EACH,OAAO,IAAI,0BAA0B,EACrC,KAAK,+BAA+B,EACvC,MAAM,6BAA6B,CAAA;AAEpC,cAAc,SAAS,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../filter-menu-CF5Lvzqu.js");exports.EbayFilterMenu=e.EbayFilterMenu;exports.EbayFilterMenuFooterButton=e.EbayFilterMenuFooterButton;exports.EbayFilterMenuItem=e.EbayFilterMenuItem;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { EbayChangeEventHandler, EbayEventHandler, EbayMouseEventHandler } from '../events';
|
|
2
|
+
export type Variant = 'form';
|
|
3
|
+
export type Type = 'radio' | 'checkbox';
|
|
4
|
+
export type FilterMenuItemEventData = {
|
|
5
|
+
value?: string;
|
|
6
|
+
checked?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export type FilterMenuItemClick = EbayMouseEventHandler<HTMLLabelElement | HTMLDivElement, FilterMenuItemEventData>;
|
|
9
|
+
export type FilterMenuSearchEventData = {
|
|
10
|
+
searchTerm?: string;
|
|
11
|
+
};
|
|
12
|
+
export type FilterMenuSearchChange = EbayChangeEventHandler<HTMLInputElement, FilterMenuSearchEventData>;
|
|
13
|
+
export type FilterMenuEventData = {
|
|
14
|
+
checked?: string[];
|
|
15
|
+
checkedIndex?: number[];
|
|
16
|
+
currentChecked?: boolean;
|
|
17
|
+
index?: number;
|
|
18
|
+
};
|
|
19
|
+
export type FilterMenuChange = EbayEventHandler<HTMLLabelElement | HTMLDivElement, FilterMenuEventData>;
|
|
20
|
+
export type FilterMenuFormSubmit = EbayEventHandler<HTMLFormElement, FilterMenuEventData>;
|
|
21
|
+
export type FilterMenuFooterClick = EbayMouseEventHandler<HTMLFormElement, FilterMenuEventData>;
|
|
22
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ebay-filter-menu/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAA;AAE3F,MAAM,MAAM,OAAO,GAAG,MAAM,CAAA;AAC5B,MAAM,MAAM,IAAI,GAAG,OAAO,GAAG,UAAU,CAAA;AAEvC,MAAM,MAAM,uBAAuB,GAAG;IAClC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG,qBAAqB,CAAC,gBAAgB,GAAG,cAAc,EAAE,uBAAuB,CAAC,CAAA;AAEnH,MAAM,MAAM,yBAAyB,GAAG;IACpC,UAAU,CAAC,EAAE,MAAM,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG,sBAAsB,CAAC,gBAAgB,EAAE,yBAAyB,CAAC,CAAA;AAGxG,MAAM,MAAM,mBAAmB,GAAG;IAC9B,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,CAAC,gBAAgB,GAAG,cAAc,EAAE,mBAAmB,CAAC,CAAA;AACvG,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,CAAC,eAAe,EAAE,mBAAmB,CAAC,CAAA;AACzF,MAAM,MAAM,qBAAqB,GAAG,qBAAqB,CAAC,eAAe,EAAE,mBAAmB,CAAC,CAAA"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# EbayFilterMenuButton
|
|
2
|
+
|
|
3
|
+
## Demo
|
|
4
|
+
|
|
5
|
+
[Storybook](https://opensource.ebay.com/ebayui-core-react/main/?path=/docs/buttons-ebay-filter-menu-button--docs)
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
### Import JS
|
|
10
|
+
|
|
11
|
+
```jsx harmony
|
|
12
|
+
import { EbayFilterMenuButton, EbayFilterMenuItem } from "@ebay/ui-core-react/ebay-filter-menu-button";
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Import following styles from SKIN
|
|
16
|
+
|
|
17
|
+
```jsx harmony
|
|
18
|
+
import "@ebay/skin/filter-menu-button";
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### If tokens haven't been added to the project at a higher level, make sure to import
|
|
22
|
+
|
|
23
|
+
```jsx harmony
|
|
24
|
+
import "@ebay/skin/tokens";
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Or import styles using SCSS/CSS
|
|
28
|
+
|
|
29
|
+
```jsx harmony
|
|
30
|
+
import "@ebay/skin/filter-menu-button.css";
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
```jsx harmony
|
|
34
|
+
<EbayFilterMenuButton>
|
|
35
|
+
<EbayFilterMenuItem value="item1">Item 1</EbayFilterMenuItem>
|
|
36
|
+
<EbayFilterMenuItem value="item2">Item 2</EbayFilterMenuItem>
|
|
37
|
+
</EbayFilterMenuButton>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Attributes
|
|
41
|
+
|
|
42
|
+
The `EbayFilterMenuButton` supports all properties from the [EbayFilterMenu](../ebay-filter-menu/README.md) component. Additionally, it includes the following specific attributes:
|
|
43
|
+
|
|
44
|
+
| Name | Type | Required | Description |
|
|
45
|
+
| ------------ | -------- | -------- | ------------------------------------------ |
|
|
46
|
+
| `onExpand` | Function | No | Triggered when the menu is expanded |
|
|
47
|
+
| `onCollapse` | Function | No | Triggered when the menu is collapsed |
|
|
48
|
+
| `text` | String | No | The text displayed on the button |
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { EbayFilterMenuProps } from '../ebay-filter-menu';
|
|
3
|
+
export type EbayFilterMenuButtonProps = EbayFilterMenuProps & {
|
|
4
|
+
className?: string;
|
|
5
|
+
text: string;
|
|
6
|
+
onExpand?: () => void;
|
|
7
|
+
onCollapse?: () => void;
|
|
8
|
+
};
|
|
9
|
+
declare const EbayFilterMenuButton: React.FC<EbayFilterMenuButtonProps>;
|
|
10
|
+
export default EbayFilterMenuButton;
|
|
11
|
+
//# sourceMappingURL=filter-menu-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter-menu-button.d.ts","sourceRoot":"","sources":["../../src/ebay-filter-menu-button/filter-menu-button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAA;AAI/C,OAAO,EAGH,mBAAmB,EAItB,MAAM,qBAAqB,CAAA;AAG5B,MAAM,MAAM,yBAAyB,GAAG,mBAAmB,GAAG;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;CAC1B,CAAA;AAED,QAAA,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAuF7D,CAAA;AAED,eAAe,oBAAoB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-filter-menu-button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,KAAK,yBAAyB,EAAE,MAAM,sBAAsB,CAAA;AACtG,OAAO,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,KAAK,uBAAuB,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("../tslib.es6-C4EgNkz1.js"),n=require("react"),q=require("classnames"),b=require("../dropdown-BLiIyhWy.js"),w=require("../icon-CeLPlCml.js"),a=require("../filter-menu-CF5Lvzqu.js"),N=require("../utils-C9NL3q0j.js"),B=u=>{var{className:d,text:p,"aria-label":y,onExpand:f,onCollapse:E,onChange:l,children:i}=u,o=S.__rest(u,["className","text","aria-label","onExpand","onCollapse","onChange","children"]);const c=n.useRef(null),h=N.filterByType(i,a.EbayFilterMenuItem),[v,F]=n.useState(()=>h.some(t=>t.props.checked)),{isExpanded:_,collapse:r}=b.useExpander({ref:c,options:{hostSelector:".filter-menu-button__button",contentSelector:".filter-menu-button__menu",focusManagement:"interactive",expandOnClick:!0,autoCollapse:!0,alwaysDoFocusManagement:!0},onExpand:f,onCollapse:E}),{overlayStyles:M,refs:m}=b.useFloatingDropdown({open:_}),C=t=>{var e;(e=o.onKeyDown)===null||e===void 0||e.call(o,t),t.key==="Escape"&&r()},g=(...t)=>{var e;(e=o.onFormSubmit)===null||e===void 0||e.call(o,...t),r()},x=(...t)=>{var e;(e=o.onFooterClick)===null||e===void 0||e.call(o,...t),r()},k=(t,e)=>{var s;l==null||l(t,e),F(((s=e.checked)===null||s===void 0?void 0:s.length)>0)};return n.createElement("span",{ref:c,className:q("filter-menu-button",d)},n.createElement("button",{type:"button",className:"filter-menu-button__button",ref:m.setHost,"aria-expanded":"false","aria-haspopup":"true","aria-label":y,"aria-pressed":v},n.createElement("span",{className:"filter-menu-button__button-cell"},n.createElement("span",{className:"filter-menu-button__button-text"},p),n.createElement(w.EbayIcon,{name:"chevronDown12"}))),n.createElement(a.EbayFilterMenu,Object.assign({},o,{onChange:k,classPrefix:"filter-menu-button",onKeyDown:C,onFooterClick:x,onFormSubmit:g,ref:m.setOverlay,style:M}),i))};exports.EbayFilterMenuFooterButton=a.EbayFilterMenuFooterButton;exports.EbayFilterMenuItem=a.EbayFilterMenuItem;exports.EbayFilterMenuButton=B;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("../tslib.es6-C4EgNkz1.js"),e=require("react"),h=require("../notice-content-9iF4T8uB.js"),y=require("../notice-content-C0ZStfuX.js"),r=require("../icon-CeLPlCml.js");require("classnames");const b=require("../notice-footer-G6VPjVZu.js"),C=require("../notice-cta-CKl_qBge.js"),P=t=>{var{id:a,status:n="general",children:i,a11yDismissText:s,"aria-label":m,onDismiss:E=()=>{}}=t,d=l.__rest(t,["id","status","children","a11yDismissText","aria-label","onDismiss"]);const[u,N]=e.useState(!1),c=e.Children.toArray(i).find(o=>o.type===y.EbayNoticeContent);if(!c)throw new Error("EbayPageNotice: Please use a EbayNoticeContent that defines the content of the notice");const p=o=>{N(!0),E(o)};return u?null:e.createElement("section",Object.assign({},d,{"aria-labelledby":a||`${n}-status`,className:`page-notice ${n!=="general"?`page-notice--${n}`:""}`,role:"region"}),n!=="general"?e.createElement("div",{className:"page-notice__header",id:a||`${n}-status`},e.createElement(r.EbayIcon,{name:`${n}Filled16`,a11yText:m,a11yVariant:"label"})):null,e.createElement(h.NoticeContent,Object.assign({},c.props,{type:"page"})),i,s&&e.createElement(g,null,e.createElement("button",{"aria-label":s,className:"fake-link page-notice__dismiss",onClick:p},e.createElement(r.EbayIcon,{name:"close16"}))))},T=t=>{var{className:a,as:n,children:i}=t,s=l.__rest(t,["className","as","children"]);return e.createElement(b.NoticeTitle,Object.assign({},s,{className:a,as:n,type:"page"}),i)},g=({className:t,children:a})=>e.createElement(b.NoticeFooter,{className:t,type:"page"},a),q=({className:t,children:a})=>e.createElement(C.NoticeCTA,{className:t,type:"page"},a);exports.EbayNoticeContent=y.EbayNoticeContent;exports.EbayPageNotice=P;exports.EbayPageNoticeCTA=q;exports.EbayPageNoticeFooter=g;exports.EbayPageNoticeTitle=T;
|
package/ebay-radio/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../radio-wp0-bMIM.js");exports.EbayRadio=e.EbayRadio;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../tslib.es6-C4EgNkz1.js"),e=require("react"),$=require("classnames"),E=require("../notice-content-C0ZStfuX.js"),A=require("../notice-content-9iF4T8uB.js"),b=require("../icon-CeLPlCml.js"),F=require("../forwardRef-irqyO_PF.js"),N=require("../notice-footer-G6VPjVZu.js"),j=require("../notice-cta-CKl_qBge.js"),v=n=>{var{status:t="general",children:i,className:s,"aria-label":o,"aria-roledescription":C="Notice",a11yDismissText:d,educationIcon:p,iconClass:S,prominent:f,onDismiss:g=()=>{}}=n,T=y.__rest(n,["status","children","className","aria-label","aria-roledescription","a11yDismissText","educationIcon","iconClass","prominent","onDismiss"]);const[q,D]=e.useState(!1),[m,I]=e.useState("");e.useEffect(()=>{I(F.randomId())},[]);const u=e.Children.toArray(i).find(({type:l})=>l===E.EbayNoticeContent),c=t!=="general"&&t!=="none",r=t==="education";let a=null;if(c&&(r?a=p||"lightbulb24":a=`${t}Filled16`),!u)throw new Error("EbaySectionNotice: Please use a EbayNoticeContent that defines the content of the notice");const _=l=>{D(!0),g(l)};return q?null:e.createElement("section",Object.assign({},T,{className:$(s,"section-notice",{[`section-notice--${t}`]:c,"section-notice--education":r&&f,"section-notice--large-icon":r}),role:"region","aria-label":c?null:o,"aria-labelledby":c?`section-notice-${t}-${m}`:null,"aria-roledescription":C}),a&&e.createElement("div",{className:"section-notice__header",id:`section-notice-${t}-${m}`},e.createElement(b.EbayIcon,{className:S,name:a,a11yText:o,a11yVariant:"label"})),e.createElement(A.NoticeContent,Object.assign({},u.props,{type:"section"})),i,d&&e.createElement(h,null,e.createElement("button",{"aria-label":d,className:"fake-link page-notice__dismiss",onClick:_},e.createElement(b.EbayIcon,{name:"close16"}))))},O=n=>{var{className:t,as:i,children:s}=n,o=y.__rest(n,["className","as","children"]);return e.createElement(N.NoticeTitle,Object.assign({},o,{className:t,as:i,type:"section"}),s)},h=({className:n,children:t})=>e.createElement(N.NoticeFooter,{className:n,type:"section"},t),R=({className:n,children:t})=>e.createElement(j.NoticeCTA,{className:n,type:"section"},t);exports.EbayNoticeContent=E.EbayNoticeContent;exports.EbaySectionNotice=v;exports.EbaySectionNoticeCTA=R;exports.EbaySectionNoticeFooter=h;exports.EbaySectionNoticeTitle=O;
|
package/ebay-textbox/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("../textbox-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("../textbox-4AxUUs5r.js");exports.EbayTextbox=x.EbayTextbox;exports.EbayTextboxPostfixIcon=x.EbayTextboxPostfixIcon;exports.EbayTextboxPostfixText=x.EbayTextboxPostfixText;exports.EbayTextboxPrefixIcon=x.EbayTextboxPrefixIcon;exports.EbayTextboxPrefixText=x.EbayTextboxPrefixText;
|
|
@@ -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;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;;
|
|
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;;AAsJnH,wBAA4D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const j=require("./tslib.es6-C4EgNkz1.js"),t=require("react"),ae=require("makeup-prevent-scroll-keys"),re=require("makeup-roving-tabindex"),B=require("./forwardRef-irqyO_PF.js"),U=require("./utils-C9NL3q0j.js"),D=require("classnames"),ne=require("./checkbox-Bb3s3Jof.js"),ce=require("./radio-wp0-bMIM.js"),M=require("./icon-CeLPlCml.js");require("./array.polyfill.flat-5BAolFdk.js");const oe=require("./button-DpMwH1cr.js");function se(r){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const s in r)if(s!=="default"){const m=Object.getOwnPropertyDescriptor(r,s);Object.defineProperty(c,s,m.get?m:{enumerable:!0,get:()=>r[s]})}}return c.default=r,Object.freeze(c)}const le=se(ae),A=r=>{var{__classPrefix:c,__variant:s,className:m,onClick:C}=r,E=j.__rest(r,["__classPrefix","__variant","className","onClick"]);const l=s==="form";return t.createElement("button",Object.assign({},E,{type:l?"submit":"button",className:D(m,`${c}__footer`),onClick:l?void 0:C}))},V=r=>{var{checked:c,value:s,disabled:m,children:C,className:E,onClick:l,__type:S,__variant:P,__classPrefix:v}=r,q=j.__rest(r,["checked","value","disabled","children","className","onClick","__type","__variant","__classPrefix"]);const R=P==="form",u=S==="radio",h=u?"radio":"checkbox",I=B.useRandomId(),y=`'${h}-${I}`,f=R?"label":"div",w=u?ce.EbayRadio:ne.EbayCheckbox,O=u?`${v}__radio`:`${v}__checkbox`,$=u?"radioChecked18":"checkboxChecked18",F=u?"radioUnchecked18":"checkboxUnchecked18",b=_=>{l==null||l(_,{value:s,checked:!c})};return t.createElement(f,Object.assign({},q,{className:D(E,`${v}__item`),htmlFor:R?y:void 0,role:u?"menuitemradio":"menuitemcheckbox",onClick:b,"aria-checked":c,"aria-disabled":m}),R?t.createElement(w,{id:y,checked:c}):t.createElement("span",{className:O},t.createElement(M.EbayIcon,{name:c?$:F})),t.createElement("span",{className:`${v}__text`},C))},ie=r=>{var{classPrefix:c,className:s,formMethod:m,formAction:C,formName:E,variant:l,children:S,type:P,searchHeaderValue:v,searchHeaderPlaceholderText:q,a11ySearchHeaderClearText:R,forwardedRef:u,onSearchChange:h,onFormSubmit:I,onFooterClick:y,onChange:f,"aria-label":w,"aria-labelledby":O}=r,$=j.__rest(r,["classPrefix","className","formMethod","formAction","formName","variant","children","type","searchHeaderValue","searchHeaderPlaceholderText","a11ySearchHeaderClearText","forwardedRef","onSearchChange","onFormSubmit","onFooterClick","onChange","aria-label","aria-labelledby"]);const F=t.useRef(null),b=l==="form",_=P==="radio",x=c||"filter-menu",H=U.findComponent(S,A),p=U.filterByType(S,V),z=B.useRandomId(),[G,K]=t.useState(v||""),[g,J]=t.useState(()=>p.map((e,a)=>e.props.checked&&a).find(e=>typeof e=="number")),[N,Q]=t.useState(()=>p.map(e=>!!e.props.checked));t.useEffect(()=>{let e;return b||(e=re.createLinear(F.current,"div",{autoInit:"interactive"}),le.add(F.current)),()=>{e&&(e.destroy(),e=null)}},[b]);const L=()=>({checked:p.filter((e,a)=>_?g===a:N[a]).map(e=>e.props.value),checkedIndex:p.map((e,a)=>_?a===g&&a:N[a]&&a).filter(e=>typeof e=="number")}),W=e=>{y==null||y(e,L())},X=e=>{I==null||I(e,L())},Y=e=>{K(""),h==null||h(e,{searchTerm:""})},Z=e=>{K(e.target.value),h==null||h(e,{searchTerm:e.target.value})},ee=b?"form":t.Fragment,te=b?{name:E,action:C,method:m,onSubmit:X}:{},T=(e,{checked:a,index:n})=>{const k=e.target;if(!(b&&k.type==="checkbox"))if(_)J(n),f==null||f(e,{index:n,checked:[p[n].props.value],checkedIndex:[n],currentChecked:a});else{const i=N.map((o,d)=>d===n?a:o);f==null||f(e,{index:n,checked:p.filter((o,d)=>i[d]).map(o=>o.props.value),checkedIndex:i.map((o,d)=>o&&d).filter(o=>typeof o=="number"),currentChecked:a}),Q(i)}};return t.createElement("span",Object.assign({},$,{ref:u,className:D(s,`${c?`${x}__menu`:x}`)}),q?t.createElement("div",{className:"filter-menu__header"},t.createElement(M.EbayIcon,{name:"search16"}),t.createElement("input",{type:"text",value:G,className:"filter-menu__search",placeholder:q,"aria-owns":"TODO with menuitems ID",onChange:Z}),t.createElement(oe.EbayButton,{type:"button",onClick:Y},t.createElement(M.EbayIcon,{name:"clear20"}))):null,t.createElement(ee,Object.assign({},te),t.createElement("div",{id:z,ref:F,className:`${x}__items`,role:b?void 0:"menu","aria-label":w,"aria-labelledby":O},p.map((e,a)=>t.cloneElement(e,{__classPrefix:x,__type:P,__variant:l,checked:_?a===g:N[a],onClick:(n,{checked:k,value:i})=>{var o,d;(d=(o=e.props).onClick)===null||d===void 0||d.call(o,n,{checked:k,value:i}),T(n,{checked:k,index:a})},onKeyDown:n=>{var k,i;if((i=(k=e.props).onKeyDown)===null||i===void 0||i.call(k,n),n.key==="Enter"||n.key===" "){const o=_?a===g:N[a];T(n,{checked:!o,index:a})}}}))),H&&t.cloneElement(H,{onClick:W,__classPrefix:x,__variant:l})))},de=B.withForwardRef(ie);exports.EbayFilterMenu=de;exports.EbayFilterMenuFooterButton=A;exports.EbayFilterMenuItem=V;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a=require("./tslib.es6-C4EgNkz1.js"),i=require("react"),n=require("classnames"),l=e=>{var{className:s,type:t,children:c}=e,r=a.__rest(e,["className","type","children"]);return i.createElement("p",Object.assign({className:n(s,`${t}-notice__cta`)},r),c)};exports.NoticeCTA=l;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a=require("./tslib.es6-C4EgNkz1.js"),i=require("react"),n=require("classnames"),N=e=>{var{className:t,type:s,as:c,children:r}=e,o=a.__rest(e,["className","type","as","children"]);const l=c||"h2";return i.createElement(l,Object.assign({className:n(t,`${s}-notice__title`)},o),r)},m=e=>{var{className:t,type:s,children:c}=e,r=a.__rest(e,["className","type","children"]);return i.createElement("div",Object.assign({className:n(t,`${s}-notice__footer`)},r),c)};exports.NoticeFooter=m;exports.NoticeTitle=N;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ebay/ui-core-react",
|
|
3
|
-
"version": "8.1
|
|
3
|
+
"version": "8.2.1",
|
|
4
4
|
"description": "Skin components build off React",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org",
|
|
@@ -67,6 +67,8 @@
|
|
|
67
67
|
"makeup-expander": "^0.10.1",
|
|
68
68
|
"makeup-floating-label": "^0.4.5",
|
|
69
69
|
"makeup-keyboard-trap": "^0.4.1",
|
|
70
|
+
"makeup-prevent-scroll-keys": "^0.3.3",
|
|
71
|
+
"makeup-roving-tabindex": "^0.7.3",
|
|
70
72
|
"makeup-screenreader-trap": "^0.4.1",
|
|
71
73
|
"makeup-typeahead": "^0.3.3",
|
|
72
74
|
"react-remove-scroll": "^2.2.0"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const p=require("./tslib.es6-C4EgNkz1.js"),a=require("react"),F=require("classnames"),c=require("./icon-CeLPlCml.js"),j=require("./label-BRztS0pw.js"),q=r=>{var{size:t="default",checked:i,defaultChecked:d,className:u,style:h,id:s,onChange:m=()=>{},onFocus:y=()=>{},onKeyDown:g=()=>{},children:l}=r,b=p.__rest(r,["size","checked","defaultChecked","className","style","id","onChange","onFocus","onKeyDown","children"]);const _=n=>{var e;return m(n,{value:(e=n.target)===null||e===void 0?void 0:e.value})},v=n=>{var e;return y(n,{value:(e=n.target)===null||e===void 0?void 0:e.value})},E=n=>{const e=n.target;return g(n,{value:e==null?void 0:e.value})},k=F("radio",u,{"radio--large":t==="large"}),C=t==="large"?a.createElement(c.EbayIcon,{name:"radioChecked24",className:"radio__checked"}):a.createElement(c.EbayIcon,{name:"radioChecked18",className:"radio__checked"}),N=t==="large"?a.createElement(c.EbayIcon,{name:"radioUnchecked24",className:"radio__unchecked"}):a.createElement(c.EbayIcon,{name:"radioUnchecked18",className:"radio__unchecked"}),o=a.Children.toArray(l).find(n=>n.type===j.Label);return a.createElement(a.Fragment,null,a.createElement("span",{className:k,style:Object.assign(Object.assign({},h),{alignItems:"center"})},a.createElement("input",Object.assign({},b,{id:s,className:"radio__control",type:"radio",defaultChecked:d,checked:i,onChange:_,onFocus:v,onKeyDown:E})),a.createElement("span",{className:"radio__icon",hidden:!0},C,N)),o?a.cloneElement(o,Object.assign(Object.assign({},o.props),{position:"end",htmlFor:s})):l)};exports.EbayRadio=q;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const m=require("./tslib.es6-C4EgNkz1.js"),t=require("react"),se=require("classnames"),re=require("./forwardRef-irqyO_PF.js"),v=require("./utils-C9NL3q0j.js"),w=require("./icon-CeLPlCml.js"),ce=require("./icon-button-CZtp0khK.js"),ue=require("./hooks-DqYMvHrS.js"),K=o=>{var{name:a,buttonAriaLabel:l,onClick:c=()=>{}}=o,s=m.__rest(o,["name","buttonAriaLabel","onClick"]);return l?t.createElement(ce.EbayIconButton,Object.assign({"aria-label":l,icon:a,transparent:!0,onClick:c},s)):t.createElement(w.EbayIcon,Object.assign({name:a},s))},L=o=>t.createElement("span",Object.assign({},o)),P=o=>{var{name:a}=o,l=m.__rest(o,["name"]);return t.createElement(w.EbayIcon,Object.assign({name:a},l))},F=o=>t.createElement("span",Object.assign({},o)),g=o=>typeof o<"u",de=o=>{var a,l,{type:c="text",invalid:s,fluid:p,multiline:_,onChange:q=()=>{},onInputChange:B=()=>{},onFocus:j=()=>{},onBlur:k=()=>{},onKeyPress:O=()=>{},onKeyUp:V=()=>{},onKeyDown:N=()=>{},onInvalid:R=()=>{},onFloatingLabelInit:D=()=>{},onButtonClick:S=()=>{},autoFocus:E,defaultValue:f="",value:y,forwardedRef:U,inputSize:C="default",floatingLabel:z,children:u,placeholder:A,opaqueLabel:M}=o,r=m.__rest(o,["type","invalid","fluid","multiline","onChange","onInputChange","onFocus","onBlur","onKeyPress","onKeyUp","onKeyDown","onInvalid","onFloatingLabelInit","onButtonClick","autoFocus","defaultValue","value","forwardedRef","inputSize","floatingLabel","children","placeholder","opaqueLabel"]);const[I,W]=t.useState(f),[$,G]=t.useState(f),h=ue.useFloatingLabel({text:z,disabled:r.disabled,size:C,invalid:s,type:c,opaqueLabel:M,onMount:D,containerTagName:p?"div":"span"}),T=n=>{var e;j(n,{value:((e=n==null?void 0:n.target)===null||e===void 0?void 0:e.value)||f})},H=n=>{var e;const i=(e=n.target)===null||e===void 0?void 0:e.value;k(n,{value:i}),i!==I&&(q(n,{value:i}),W(i))},J=n=>{const e=n.target;O(n,{value:e==null?void 0:e.value})},Q=n=>{const e=n.target;V(n,{value:e==null?void 0:e.value})},X=n=>{const e=n.target;N(n,{value:e==null?void 0:e.value})},Y=n=>{const e=n.target;R(n,{value:e==null?void 0:e.value})},Z=n=>{S(n,{value:I})};t.useEffect(()=>{E&&T()},[]);const ee=n=>{var e;const i=(e=n.target)===null||e===void 0?void 0:e.value;g(y)||G(i),B(n,{value:i})},ne=_?"textarea":"input",oe=p?"div":"span",te=v.findComponent(u,P),d=v.findComponent(u,F),ae=(a=d==null?void 0:d.props)===null||a===void 0?void 0:a.id,x=v.findComponent(u,K),b=v.findComponent(u,L),le=(l=b==null?void 0:b.props)===null||l===void 0?void 0:l.id,ie=se("textbox",r.className,{"textbox--fluid":p,"textbox--large":C==="large","textbox--disabled":r.disabled,"textbox--invalid":s,"textbox--readonly":r.readOnly});return t.createElement(h.Container,null,t.createElement(h.Label,{htmlFor:r.id}),t.createElement(oe,{className:ie},te,d,t.createElement(ne,Object.assign({"aria-describedby":[ae,le].filter(Boolean).join(" ")||void 0},r,{className:"textbox__control",type:c,"aria-invalid":s,value:g(y)?y:$,onChange:ee,onBlur:H,onFocus:T,onKeyPress:J,onKeyUp:Q,onKeyDown:X,onInvalid:Y,autoFocus:E,ref:U,placeholder:A})),b,x&&t.cloneElement(x,Object.assign(Object.assign({},x.props),{onClick:n=>{const{onClick:e=()=>{}}=x.props;e(n),Z(n)}}))))},xe=re.withForwardRef(de);exports.EbayTextbox=xe;exports.EbayTextboxPostfixIcon=K;exports.EbayTextboxPostfixText=L;exports.EbayTextboxPrefixIcon=P;exports.EbayTextboxPrefixText=F;exports.isControlled=g;
|
package/notice-cta-hm2vI5MI.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const a=require("./tslib.es6-C4EgNkz1.js"),i=require("react"),n=require("classnames"),N=e=>{var{className:t,type:s,as:c,children:r}=e,l=a.__rest(e,["className","type","as","children"]);const o=c||"h2";return i.createElement(o,Object.assign({className:n(t,`${s}-notice__title`)},l),r)},m=e=>{var{className:t,type:s,children:c}=e,r=a.__rest(e,["className","type","children"]);return i.createElement("div",Object.assign({className:n(t,`${s}-notice__footer`)},r),c)},_=e=>{var{className:t,type:s,children:c}=e,r=a.__rest(e,["className","type","children"]);return i.createElement("p",Object.assign({className:n(t,`${s}-notice__cta`)},r),c)};exports.NoticeCTA=_;exports.NoticeFooter=m;exports.NoticeTitle=N;
|
package/textbox-BdsI4r6_.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const g=require("./tslib.es6-C4EgNkz1.js"),n=require("react"),se=require("classnames"),re=require("./forwardRef-irqyO_PF.js"),v=require("./utils-C9NL3q0j.js"),w=require("./icon-CeLPlCml.js"),ce=require("./icon-button-CZtp0khK.js"),ue=require("./hooks-DqYMvHrS.js"),K=t=>{var{name:a,buttonAriaLabel:l,onClick:c=()=>{}}=t,s=g.__rest(t,["name","buttonAriaLabel","onClick"]);return l?n.createElement(ce.EbayIconButton,Object.assign({"aria-label":l,icon:a,transparent:!0,onClick:c},s)):n.createElement(w.EbayIcon,Object.assign({name:a},s))},L=t=>n.createElement("span",Object.assign({},t)),P=t=>{var{name:a}=t,l=g.__rest(t,["name"]);return n.createElement(w.EbayIcon,Object.assign({name:a},l))},F=t=>n.createElement("span",Object.assign({},t)),y=t=>typeof t<"u",de=t=>{var a,l,{type:c="text",invalid:s,fluid:m,multiline:_,onChange:q=()=>{},onInputChange:B=()=>{},onFocus:j=()=>{},onBlur:k=()=>{},onKeyPress:O=()=>{},onKeyUp:V=()=>{},onKeyDown:N=()=>{},onInvalid:R=()=>{},onFloatingLabelInit:D=()=>{},onButtonClick:S=()=>{},autoFocus:E,defaultValue:p="",value:f,forwardedRef:U,inputSize:C="default",floatingLabel:z,children:u,placeholder:A,opaqueLabel:M}=t,r=g.__rest(t,["type","invalid","fluid","multiline","onChange","onInputChange","onFocus","onBlur","onKeyPress","onKeyUp","onKeyDown","onInvalid","onFloatingLabelInit","onButtonClick","autoFocus","defaultValue","value","forwardedRef","inputSize","floatingLabel","children","placeholder","opaqueLabel"]);const[I,W]=n.useState(p),[$,G]=n.useState(p),h=ue.useFloatingLabel({text:z,disabled:r.disabled,size:C,invalid:s,type:c,opaqueLabel:M,onMount:D}),T=o=>{var e;j(o,{value:((e=o==null?void 0:o.target)===null||e===void 0?void 0:e.value)||p})},H=o=>{var e;const i=(e=o.target)===null||e===void 0?void 0:e.value;k(o,{value:i}),i!==I&&(q(o,{value:i}),W(i))},J=o=>{const e=o.target;O(o,{value:e==null?void 0:e.value})},Q=o=>{const e=o.target;V(o,{value:e==null?void 0:e.value})},X=o=>{const e=o.target;N(o,{value:e==null?void 0:e.value})},Y=o=>{const e=o.target;R(o,{value:e==null?void 0:e.value})},Z=o=>{S(o,{value:I})};n.useEffect(()=>{E&&T()},[]);const ee=o=>{var e;const i=(e=o.target)===null||e===void 0?void 0:e.value;y(f)||G(i),B(o,{value:i})},oe=_?"textarea":"input",te=m?"div":"span",ne=v.findComponent(u,P),d=v.findComponent(u,F),ae=(a=d==null?void 0:d.props)===null||a===void 0?void 0:a.id,x=v.findComponent(u,K),b=v.findComponent(u,L),le=(l=b==null?void 0:b.props)===null||l===void 0?void 0:l.id,ie=se("textbox",r.className,{"textbox--fluid":m,"textbox--large":C==="large","textbox--disabled":r.disabled,"textbox--invalid":s,"textbox--readonly":r.readOnly});return n.createElement(h.Container,null,n.createElement(h.Label,{htmlFor:r.id}),n.createElement(te,{className:ie},ne,d,n.createElement(oe,Object.assign({"aria-describedby":[ae,le].filter(Boolean).join(" ")||void 0},r,{className:"textbox__control",type:c,"aria-invalid":s,value:y(f)?f:$,onChange:ee,onBlur:H,onFocus:T,onKeyPress:J,onKeyUp:Q,onKeyDown:X,onInvalid:Y,autoFocus:E,ref:U,placeholder:A})),b,x&&n.cloneElement(x,Object.assign(Object.assign({},x.props),{onClick:o=>{const{onClick:e=()=>{}}=x.props;e(o),Z(o)}}))))},xe=re.withForwardRef(de);exports.EbayTextbox=xe;exports.EbayTextboxPostfixIcon=K;exports.EbayTextboxPostfixText=L;exports.EbayTextboxPrefixIcon=P;exports.EbayTextboxPrefixText=F;exports.isControlled=y;
|